aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/.Xdefaults1
-rw-r--r--xorg-server/Xext/Makefile37
-rw-r--r--xorg-server/Xext/Makefile.am266
-rw-r--r--xorg-server/Xext/dpms.c2
-rw-r--r--xorg-server/Xext/panoramiX.c2598
-rw-r--r--xorg-server/Xext/panoramiXsrv.h108
-rw-r--r--xorg-server/Xext/saver.c6
-rw-r--r--xorg-server/Xext/security.c2
-rw-r--r--xorg-server/Xext/securitysrv.h5
-rw-r--r--xorg-server/Xext/shape.c2
-rw-r--r--xorg-server/Xext/shm.c19
-rw-r--r--xorg-server/Xext/sync.c4
-rw-r--r--xorg-server/Xext/xace.c2
-rw-r--r--xorg-server/Xext/xselinux_hooks.c1870
-rw-r--r--xorg-server/Xext/xvdix.h550
-rw-r--r--xorg-server/Xext/xvmain.c2366
-rw-r--r--xorg-server/Xext/xvmc.c1578
-rw-r--r--xorg-server/Xi/exevents.c4365
-rw-r--r--xorg-server/Xi/exglobals.h168
-rw-r--r--xorg-server/Xi/extinit.c2618
-rw-r--r--xorg-server/Xi/makefile55
-rw-r--r--xorg-server/Xi/opendev.c3
-rw-r--r--xorg-server/Xi/xichangehierarchy.c984
-rw-r--r--xorg-server/Xi/xiquerydevice.c1006
-rw-r--r--xorg-server/Xi/xiquerypointer.c458
-rw-r--r--xorg-server/Xi/xiwarppointer.c406
-rw-r--r--xorg-server/XtErrorDB236
-rw-r--r--xorg-server/composite/compalloc.c2
-rw-r--r--xorg-server/composite/compoverlay.c4
-rw-r--r--xorg-server/composite/makefile9
-rw-r--r--xorg-server/config/makefile4
-rw-r--r--xorg-server/damageext/makefile4
-rw-r--r--xorg-server/dbe/makefile4
-rw-r--r--xorg-server/dix/Makefile.am148
-rw-r--r--xorg-server/dix/Xserver-dtrace.h75
-rw-r--r--xorg-server/dix/colormap.c4
-rw-r--r--xorg-server/dix/devices.c8
-rw-r--r--xorg-server/dix/dispatch.c7863
-rw-r--r--xorg-server/dix/dixfonts.c108
-rw-r--r--xorg-server/dix/events.c11710
-rw-r--r--xorg-server/dix/gc.c20
-rw-r--r--xorg-server/dix/getevents.c17
-rw-r--r--xorg-server/dix/inpututils.c1116
-rw-r--r--xorg-server/dix/main.c757
-rw-r--r--xorg-server/dix/makefile42
-rw-r--r--xorg-server/dix/privates.c91
-rw-r--r--xorg-server/dix/ptrveloc.c9
-rw-r--r--xorg-server/dix/region.c2850
-rw-r--r--xorg-server/dix/registry.c1
-rw-r--r--xorg-server/dix/resource.c61
-rw-r--r--xorg-server/exa/exa.h1686
-rw-r--r--xorg-server/exa/exa_accel.c2
-rw-r--r--xorg-server/exa/exa_classic.c532
-rw-r--r--xorg-server/exa/exa_driver.c452
-rw-r--r--xorg-server/exa/exa_migration_classic.c10
-rw-r--r--xorg-server/exa/exa_migration_mixed.c522
-rw-r--r--xorg-server/exa/exa_mixed.c580
-rw-r--r--xorg-server/exa/exa_priv.h1450
-rw-r--r--xorg-server/exa/exa_unaccel.c2
-rw-r--r--xorg-server/exa/makefile14
-rw-r--r--xorg-server/fb/fb.h4153
-rw-r--r--xorg-server/fb/fb24_32.c1270
-rw-r--r--xorg-server/fb/fbcopy.c33
-rw-r--r--xorg-server/fb/fbpict.h176
-rw-r--r--xorg-server/fb/fbpixmap.c771
-rw-r--r--xorg-server/fb/fbtrap.c420
-rw-r--r--xorg-server/fb/makefile37
-rw-r--r--xorg-server/fb/wfbrename.h2
-rw-r--r--xorg-server/fonts.src/100dpi/makefile357
-rw-r--r--xorg-server/fonts.src/75dpi/makefile357
-rw-r--r--xorg-server/fonts.src/OTF/makefile53
-rw-r--r--xorg-server/fonts.src/Speedo/makefile39
-rw-r--r--xorg-server/fonts.src/TTF/makefile54
-rw-r--r--xorg-server/fonts.src/Type1/makefile93
-rw-r--r--xorg-server/fonts.src/cyrillic/makefile114
-rw-r--r--xorg-server/fonts.src/encodings/large/makefile40
-rw-r--r--xorg-server/fonts.src/encodings/makefile63
-rw-r--r--xorg-server/fonts.src/font-util/makefile5
-rw-r--r--xorg-server/fonts.src/makefile1
-rw-r--r--xorg-server/fonts.src/misc/makefile345
-rw-r--r--xorg-server/fonts.src/terminus-font/Makefile2839
-rw-r--r--xorg-server/fonts.src/terminus-font/xfonts-terminus.alias212
-rw-r--r--xorg-server/glx/dispatch.h8270
-rw-r--r--xorg-server/glx/glapi.c985
-rw-r--r--xorg-server/glx/glapi.h329
-rw-r--r--xorg-server/glx/glapioffsets.h1174
-rw-r--r--xorg-server/glx/glapitable.h1752
-rw-r--r--xorg-server/glx/glapitemp.h1845
-rw-r--r--xorg-server/glx/glheader.h24
-rw-r--r--xorg-server/glx/glprocs.h4927
-rw-r--r--xorg-server/glx/glxcmds.c78
-rw-r--r--xorg-server/glx/glxcmdsswap.c5
-rw-r--r--xorg-server/glx/glxcontext.h26
-rw-r--r--xorg-server/glx/glxdri.c23
-rw-r--r--xorg-server/glx/glxdri2.c26
-rw-r--r--xorg-server/glx/glxdricommon.c34
-rw-r--r--xorg-server/glx/glxdriswrast.c43
-rw-r--r--xorg-server/glx/glxext.c45
-rw-r--r--xorg-server/glx/glxext.h4
-rw-r--r--xorg-server/glx/glxscreens.c8
-rw-r--r--xorg-server/glx/glxscreens.h5
-rw-r--r--xorg-server/glx/glxserver.h509
-rw-r--r--xorg-server/glx/glxutil.h2
-rw-r--r--xorg-server/glx/indirect_dispatch.c231
-rw-r--r--xorg-server/glx/indirect_dispatch.h66
-rw-r--r--xorg-server/glx/indirect_dispatch_swap.c263
-rw-r--r--xorg-server/glx/indirect_program.c7
-rw-r--r--xorg-server/glx/indirect_reqsize.c427
-rw-r--r--xorg-server/glx/indirect_reqsize.h4
-rw-r--r--xorg-server/glx/indirect_size.h30
-rw-r--r--xorg-server/glx/indirect_size_get.c1838
-rw-r--r--xorg-server/glx/indirect_size_get.h39
-rw-r--r--xorg-server/glx/indirect_table.c209
-rw-r--r--xorg-server/glx/indirect_texture_compression.c9
-rw-r--r--xorg-server/glx/indirect_util.c4
-rw-r--r--xorg-server/glx/makefile46
-rw-r--r--xorg-server/glx/render2.c4
-rw-r--r--xorg-server/glx/render2swap.c4
-rw-r--r--xorg-server/glx/renderpix.c4
-rw-r--r--xorg-server/glx/renderpixswap.c4
-rw-r--r--xorg-server/glx/rensize.c6
-rw-r--r--xorg-server/glx/single2.c16
-rw-r--r--xorg-server/glx/single2swap.c14
-rw-r--r--xorg-server/glx/singlepix.c20
-rw-r--r--xorg-server/glx/singlepixswap.c20
-rw-r--r--xorg-server/glx/singlesize.c4
-rw-r--r--xorg-server/glx/swap_interval.c7
-rw-r--r--xorg-server/glx/xfont.c6
-rw-r--r--xorg-server/hw/dmx/dmxinit.c1
-rw-r--r--xorg-server/hw/dmx/dmxpixmap.c500
-rw-r--r--xorg-server/hw/dmx/dmxpixmap.h128
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxcmds.c7290
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxsingle.c2032
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxvendor.c1170
-rw-r--r--xorg-server/hw/dmx/glxProxy/render2swap.c572
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.c13
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.h410
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrinit.c842
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrlog.h4
-rw-r--r--xorg-server/hw/kdrive/ephyr/hostx.c40
-rw-r--r--xorg-server/hw/kdrive/ephyr/hostx.h4
-rw-r--r--xorg-server/hw/kdrive/ephyr/makefile6
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.c4
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.h2
-rw-r--r--xorg-server/hw/kdrive/src/kinput.c27
-rw-r--r--xorg-server/hw/kdrive/src/makefile14
-rw-r--r--xorg-server/hw/xfree86/common/compiler.h6
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.c5034
-rw-r--r--xorg-server/hw/xfree86/common/xf86Helper.c4096
-rw-r--r--xorg-server/hw/xfree86/common/xf86Module.h424
-rw-r--r--xorg-server/hw/xfree86/common/xf86Option.c1832
-rw-r--r--xorg-server/hw/xfree86/common/xf86RandR.c970
-rw-r--r--xorg-server/hw/xfree86/common/xf86VGAarbiter.c2254
-rw-r--r--xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h506
-rw-r--r--xorg-server/hw/xfree86/common/xf86sbusBus.c1428
-rw-r--r--xorg-server/hw/xfree86/loader/Makefile.am66
-rw-r--r--xorg-server/hw/xfree86/loader/sdksyms.sh850
-rw-r--r--xorg-server/hw/xfree86/man/xorg.conf.man4970
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.h1944
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Cursors.c1376
-rw-r--r--xorg-server/hw/xfree86/modes/xf86RandR12.c3648
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Rotate.c1050
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_init.c1512
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86Cursor.c950
-rw-r--r--xorg-server/hw/xfree86/vbe/vbe.c2178
-rw-r--r--xorg-server/hw/xfree86/xaa/xaaInit.c1270
-rw-r--r--xorg-server/hw/xnest/Pixmap.c272
-rw-r--r--xorg-server/hw/xnest/XNPixmap.h74
-rw-r--r--xorg-server/hw/xquartz/X11Application.h224
-rw-r--r--xorg-server/hw/xquartz/X11Application.m2698
-rw-r--r--xorg-server/hw/xquartz/bundle/Info.plist.cpp98
-rw-r--r--xorg-server/hw/xquartz/bundle/Resources/French.lproj/locversion.plist28
-rw-r--r--xorg-server/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib7534
-rw-r--r--xorg-server/hw/xquartz/bundle/Resources/German.lproj/locversion.plist28
-rw-r--r--xorg-server/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib7518
-rw-r--r--xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist28
-rw-r--r--xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib7530
-rw-r--r--xorg-server/hw/xquartz/pbproxy/x-selection.h220
-rw-r--r--xorg-server/hw/xquartz/quartz.c966
-rw-r--r--xorg-server/hw/xquartz/quartz.h294
-rw-r--r--xorg-server/hw/xquartz/quartzRandR.c1140
-rw-r--r--xorg-server/hw/xquartz/xpr/xprAppleWM.c324
-rw-r--r--xorg-server/hw/xquartz/xpr/xprFrame.c1292
-rw-r--r--xorg-server/hw/xquartz/xpr/xprScreen.c966
-rw-r--r--xorg-server/hw/xwin/InitInput.c27
-rw-r--r--xorg-server/hw/xwin/InitOutput.c99
-rw-r--r--xorg-server/hw/xwin/Makefile.am1
-rw-r--r--xorg-server/hw/xwin/XWin.rc224
-rw-r--r--xorg-server/hw/xwin/ddraw.h2106
-rw-r--r--xorg-server/hw/xwin/doflexbison.bat18
-rw-r--r--xorg-server/hw/xwin/glx/Makefile.am120
-rw-r--r--xorg-server/hw/xwin/glx/gen_gl_wrappers.py12
-rw-r--r--xorg-server/hw/xwin/glx/gl.spec31488
-rw-r--r--xorg-server/hw/xwin/glx/gl.tm328
-rw-r--r--xorg-server/hw/xwin/glx/glwindows.h8
-rw-r--r--xorg-server/hw/xwin/glx/glwrap.c17
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c616
-rw-r--r--xorg-server/hw/xwin/glx/makefile45
-rw-r--r--xorg-server/hw/xwin/glx/wgl.tm36
-rw-r--r--xorg-server/hw/xwin/glx/wgl_ext_api.c5
-rw-r--r--xorg-server/hw/xwin/glx/wgl_ext_api.h26
-rw-r--r--xorg-server/hw/xwin/glx/wglext.h901
-rw-r--r--xorg-server/hw/xwin/glx/wglext.spec1126
-rw-r--r--xorg-server/hw/xwin/glx/winpriv.c123
-rw-r--r--xorg-server/hw/xwin/glx/winpriv.h2
-rw-r--r--xorg-server/hw/xwin/makefile164
-rw-r--r--xorg-server/hw/xwin/win.h2956
-rw-r--r--xorg-server/hw/xwin/winallpriv.c10
-rw-r--r--xorg-server/hw/xwin/winauth.c28
-rw-r--r--xorg-server/hw/xwin/winclip.c2
-rw-r--r--xorg-server/hw/xwin/winclipboard.h15
-rw-r--r--xorg-server/hw/xwin/winclipboardinit.c9
-rw-r--r--xorg-server/hw/xwin/winclipboardtextconv.c310
-rw-r--r--xorg-server/hw/xwin/winclipboardthread.c183
-rw-r--r--xorg-server/hw/xwin/winclipboardunicode.c34
-rw-r--r--xorg-server/hw/xwin/winclipboardwndproc.c1195
-rw-r--r--xorg-server/hw/xwin/winclipboardwrappers.c222
-rw-r--r--xorg-server/hw/xwin/winclipboardxevents.c113
-rw-r--r--xorg-server/hw/xwin/wincmap.c60
-rw-r--r--xorg-server/hw/xwin/winconfig.c97
-rw-r--r--xorg-server/hw/xwin/wincreatewnd.c34
-rw-r--r--xorg-server/hw/xwin/wincursor.c35
-rw-r--r--xorg-server/hw/xwin/windialogs.c54
-rw-r--r--xorg-server/hw/xwin/windisplay.c60
-rw-r--r--xorg-server/hw/xwin/winengine.c32
-rw-r--r--xorg-server/hw/xwin/winerror.c29
-rw-r--r--xorg-server/hw/xwin/winfont.c12
-rw-r--r--xorg-server/hw/xwin/wingc.c91
-rw-r--r--xorg-server/hw/xwin/wingetsp.c19
-rw-r--r--xorg-server/hw/xwin/winglobals.c6
-rw-r--r--xorg-server/hw/xwin/winglobals.h1
-rw-r--r--xorg-server/hw/xwin/winkeybd.c31
-rw-r--r--xorg-server/hw/xwin/winkeybd.h34
-rw-r--r--xorg-server/hw/xwin/winlayouts.h1
-rw-r--r--xorg-server/hw/xwin/winmisc.c2
-rw-r--r--xorg-server/hw/xwin/winmonitors.c31
-rw-r--r--xorg-server/hw/xwin/winmouse.c15
-rw-r--r--xorg-server/hw/xwin/winmsg.c85
-rw-r--r--xorg-server/hw/xwin/winmsg.h23
-rw-r--r--xorg-server/hw/xwin/winmultiwindowclass.c12
-rw-r--r--xorg-server/hw/xwin/winmultiwindowicons.c34
-rw-r--r--xorg-server/hw/xwin/winmultiwindowshape.c17
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c331
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c436
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwndproc.c82
-rw-r--r--xorg-server/hw/xwin/winnativegdi.c16
-rw-r--r--xorg-server/hw/xwin/winpfbdd.c24
-rw-r--r--xorg-server/hw/xwin/winpixmap.c414
-rw-r--r--xorg-server/hw/xwin/winpolyline.c2
-rw-r--r--xorg-server/hw/xwin/winprefs.c62
-rw-r--r--xorg-server/hw/xwin/winprefs.h2
-rw-r--r--xorg-server/hw/xwin/winprefslex.l2
-rw-r--r--xorg-server/hw/xwin/winprefsyacc.y917
-rw-r--r--xorg-server/hw/xwin/winprocarg.c71
-rw-r--r--xorg-server/hw/xwin/winrandr.c20
-rw-r--r--xorg-server/hw/xwin/winregistry.c4
-rw-r--r--xorg-server/hw/xwin/winresource.h2
-rw-r--r--xorg-server/hw/xwin/winscrinit.c47
-rw-r--r--xorg-server/hw/xwin/winsetsp.c13
-rw-r--r--xorg-server/hw/xwin/winshaddd.c55
-rw-r--r--xorg-server/hw/xwin/winshadddnl.c309
-rw-r--r--xorg-server/hw/xwin/winshadgdi.c46
-rw-r--r--xorg-server/hw/xwin/wintrayicon.c86
-rw-r--r--xorg-server/hw/xwin/winwin32rootless.c221
-rw-r--r--xorg-server/hw/xwin/winwin32rootlesswindow.c13
-rw-r--r--xorg-server/hw/xwin/winwin32rootlesswndproc.c134
-rw-r--r--xorg-server/hw/xwin/winwindow.c75
-rw-r--r--xorg-server/hw/xwin/winwindow.h32
-rw-r--r--xorg-server/hw/xwin/winwindowswm.c61
-rw-r--r--xorg-server/hw/xwin/winwndproc.c96
-rw-r--r--xorg-server/hw/xwin/xdmcphostselect.c183
-rw-r--r--xorg-server/hw/xwin/xlaunch/Makefile79
-rw-r--r--xorg-server/hw/xwin/xlaunch/config.cc480
-rw-r--r--xorg-server/hw/xwin/xlaunch/config.h53
-rw-r--r--xorg-server/hw/xwin/xlaunch/main.cc917
-rw-r--r--xorg-server/hw/xwin/xlaunch/makefile36
-rw-r--r--xorg-server/hw/xwin/xlaunch/resources/dialog.rc50
-rw-r--r--xorg-server/hw/xwin/xlaunch/resources/resources.h146
-rw-r--r--xorg-server/hw/xwin/xlaunch/resources/resources.rc2
-rw-r--r--xorg-server/hw/xwin/xlaunch/resources/strings.rc33
-rw-r--r--xorg-server/hw/xwin/xlaunch/window/makefile4
-rw-r--r--xorg-server/hw/xwin/xlaunch/window/util.cc2
-rw-r--r--xorg-server/hw/xwin/xlaunch/window/util.h4
-rw-r--r--xorg-server/hw/xwin/xlaunch/window/wizard.h1
-rw-r--r--xorg-server/include/Makefile.am144
-rw-r--r--xorg-server/include/callback.h4
-rw-r--r--xorg-server/include/closestr.h5
-rw-r--r--xorg-server/include/colormapst.h264
-rw-r--r--xorg-server/include/dix-config.h.in904
-rw-r--r--xorg-server/include/dix.h1158
-rw-r--r--xorg-server/include/dixstruct.h384
-rw-r--r--xorg-server/include/eventconvert.h80
-rw-r--r--xorg-server/include/globals.h2
-rw-r--r--xorg-server/include/inputstr.h1230
-rw-r--r--xorg-server/include/list.h562
-rw-r--r--xorg-server/include/misc.h15
-rw-r--r--xorg-server/include/os.h10
-rw-r--r--xorg-server/include/pixmapstr.h168
-rw-r--r--xorg-server/include/privates.h2
-rw-r--r--xorg-server/include/protocol-versions.h288
-rw-r--r--xorg-server/include/regionstr.h720
-rw-r--r--xorg-server/include/resource.h2
-rw-r--r--xorg-server/include/scrnintstr.h1150
-rw-r--r--xorg-server/include/servermd.h6
-rw-r--r--xorg-server/include/site.h4
-rw-r--r--xorg-server/include/version-config.h16
-rw-r--r--xorg-server/include/windowstr.h2
-rw-r--r--xorg-server/include/xkb-config.h36
-rw-r--r--xorg-server/include/xkbsrv.h1974
-rw-r--r--xorg-server/include/xkbstr.h2
-rw-r--r--xorg-server/include/xorg-server.h.in382
-rw-r--r--xorg-server/include/xwin-config.h37
-rw-r--r--xorg-server/installer/genruntimeinclude.py82
-rw-r--r--xorg-server/installer/packageall.bat21
-rw-r--r--xorg-server/installer/vcxsrv.nsi313
-rw-r--r--xorg-server/makefile154
-rw-r--r--xorg-server/mi/makefile39
-rw-r--r--xorg-server/mi/miarc.c4
-rw-r--r--xorg-server/mi/micmap.c17
-rw-r--r--xorg-server/mi/micoord.h8
-rw-r--r--xorg-server/mi/midispcur.c1184
-rw-r--r--xorg-server/mi/mieq.c995
-rw-r--r--xorg-server/mi/miinitext.c3
-rw-r--r--xorg-server/mi/mioverlay.c4
-rw-r--r--xorg-server/mi/mipointrst.h114
-rw-r--r--xorg-server/mi/misprite.c13
-rw-r--r--xorg-server/mi/miwideline.c4
-rw-r--r--xorg-server/miext/damage/damage.c4254
-rw-r--r--xorg-server/miext/damage/makefile7
-rw-r--r--xorg-server/miext/rootless/makefile10
-rw-r--r--xorg-server/miext/rootless/rootlessGC.c3
-rw-r--r--xorg-server/miext/rootless/rootlessScreen.c2
-rw-r--r--xorg-server/miext/rootless/rootlessWindow.c18
-rw-r--r--xorg-server/miext/rootless/xplugin.h592
-rw-r--r--xorg-server/miext/shadow/makefile25
-rw-r--r--xorg-server/miext/sync/makefile4
-rw-r--r--xorg-server/os/Makefile.am122
-rw-r--r--xorg-server/os/WaitFor.c6
-rw-r--r--xorg-server/os/access.c363
-rw-r--r--xorg-server/os/auth.c12
-rw-r--r--xorg-server/os/connection.c80
-rw-r--r--xorg-server/os/io.c1
-rw-r--r--xorg-server/os/log.c18
-rw-r--r--xorg-server/os/makefile49
-rw-r--r--xorg-server/os/oscolor.c4
-rw-r--r--xorg-server/os/osinit.c5
-rw-r--r--xorg-server/os/utils.c154
-rw-r--r--xorg-server/os/xdmcp.c142
-rw-r--r--xorg-server/os/xprintf.c7
-rw-r--r--xorg-server/os/xstrans.c4
-rw-r--r--xorg-server/randr/Makefile.am58
-rw-r--r--xorg-server/randr/makefile26
-rw-r--r--xorg-server/randr/rrcrtc.c2
-rw-r--r--xorg-server/randr/rrdispatch.c456
-rw-r--r--xorg-server/randr/rrinfo.c682
-rw-r--r--xorg-server/randr/rrscreen.c2026
-rw-r--r--xorg-server/randr/rrsdispatch.c1006
-rw-r--r--xorg-server/randr/rrtransform.c566
-rw-r--r--xorg-server/randr/rrtransform.h150
-rw-r--r--xorg-server/record/makefile4
-rw-r--r--xorg-server/render/makefile15
-rw-r--r--xorg-server/render/mipict.c2
-rw-r--r--xorg-server/render/mitrap.c158
-rw-r--r--xorg-server/render/render.c6788
-rw-r--r--xorg-server/startmulti.bat1
-rw-r--r--xorg-server/startxdmcp.bat2
-rw-r--r--xorg-server/system.XWinrc127
-rw-r--r--xorg-server/test/input.c2464
-rw-r--r--xorg-server/test/xi2/protocol-xiquerypointer.c440
-rw-r--r--xorg-server/test/xi2/protocol-xiwarppointer.c432
-rw-r--r--xorg-server/vcxsrv.sln26
-rw-r--r--xorg-server/xfixes/cursor.c2
-rw-r--r--xorg-server/xfixes/makefile9
-rw-r--r--xorg-server/xkb/XKBAlloc.c708
-rw-r--r--xorg-server/xkb/XKBGAlloc.c1948
-rw-r--r--xorg-server/xkb/ddxList.c7
-rw-r--r--xorg-server/xkb/ddxLoad.c1012
-rw-r--r--xorg-server/xkb/makefile42
-rw-r--r--xorg-server/xkb/maprules.c2036
-rw-r--r--xorg-server/xkb/xkb.c13494
-rw-r--r--xorg-server/xkb/xkbAccessX.c1546
-rw-r--r--xorg-server/xkb/xkbActions.c3
-rw-r--r--xorg-server/xkb/xkbInit.c1536
-rw-r--r--xorg-server/xkb/xkbfmisc.c882
-rw-r--r--xorg-server/xkb/xkmread.c2456
-rw-r--r--xorg-server/xkeyboard-config/compat/default.in (renamed from xorg-server/xkeyboard-config/compat/default)24
-rw-r--r--xorg-server/xkeyboard-config/compat/makefile20
-rw-r--r--xorg-server/xkeyboard-config/configure.in192
-rw-r--r--xorg-server/xkeyboard-config/geometry/digital_vndr/makefile12
-rw-r--r--xorg-server/xkeyboard-config/geometry/makefile25
-rw-r--r--xorg-server/xkeyboard-config/geometry/sgi_vndr/makefile13
-rw-r--r--xorg-server/xkeyboard-config/keycodes/digital_vndr/makefile12
-rw-r--r--xorg-server/xkeyboard-config/keycodes/makefile33
-rw-r--r--xorg-server/xkeyboard-config/keycodes/sgi_vndr/makefile12
-rw-r--r--xorg-server/xkeyboard-config/keymap/digital_vndr/makefile12
-rw-r--r--xorg-server/xkeyboard-config/keymap/makefile22
-rw-r--r--xorg-server/xkeyboard-config/keymap/sgi_vndr/makefile20
-rw-r--r--xorg-server/xkeyboard-config/keymap/sun_vndr/all.in (renamed from xorg-server/xkeyboard-config/keymap/sun_vndr/all)2182
-rw-r--r--xorg-server/xkeyboard-config/keymap/sun_vndr/makefile20
-rw-r--r--xorg-server/xkeyboard-config/makefile9
-rw-r--r--xorg-server/xkeyboard-config/rules/Makefile.am472
-rw-r--r--xorg-server/xkeyboard-config/rules/base.extras.xml.in236
-rw-r--r--xorg-server/xkeyboard-config/rules/base.ml_s.part82
-rw-r--r--xorg-server/xkeyboard-config/rules/base.o_s.part286
-rw-r--r--xorg-server/xkeyboard-config/rules/bin/ml1_s.sh19
-rw-r--r--xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh11
-rw-r--r--xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh11
-rw-r--r--xorg-server/xkeyboard-config/rules/bin/ml_s.sh15
-rw-r--r--xorg-server/xkeyboard-config/rules/bin/mln_s.sh22
-rw-r--r--xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh14
-rw-r--r--xorg-server/xkeyboard-config/rules/bin/mlv_s.sh11
-rw-r--r--xorg-server/xkeyboard-config/rules/compat/Makefile.am134
-rw-r--r--xorg-server/xkeyboard-config/rules/compat/makefile53
-rw-r--r--xorg-server/xkeyboard-config/rules/makefile197
-rw-r--r--xorg-server/xkeyboard-config/rules/merge.py13
-rw-r--r--xorg-server/xkeyboard-config/rules/xkb.dtd110
-rw-r--r--xorg-server/xkeyboard-config/rules/xml2lst.pl524
-rw-r--r--xorg-server/xkeyboard-config/semantics/default.in (renamed from xorg-server/xkeyboard-config/semantics/default)12
-rw-r--r--xorg-server/xkeyboard-config/semantics/makefile17
-rw-r--r--xorg-server/xkeyboard-config/symbols/af794
-rw-r--r--xorg-server/xkeyboard-config/symbols/capslock148
-rw-r--r--xorg-server/xkeyboard-config/symbols/cd.in (renamed from xorg-server/xkeyboard-config/symbols/cd)0
-rw-r--r--xorg-server/xkeyboard-config/symbols/digital_vndr/makefile13
-rw-r--r--xorg-server/xkeyboard-config/symbols/es434
-rw-r--r--xorg-server/xkeyboard-config/symbols/et146
-rw-r--r--xorg-server/xkeyboard-config/symbols/fujitsu_vndr/makefile12
-rw-r--r--xorg-server/xkeyboard-config/symbols/hp_vndr/makefile12
-rw-r--r--xorg-server/xkeyboard-config/symbols/in2846
-rw-r--r--xorg-server/xkeyboard-config/symbols/ir612
-rw-r--r--xorg-server/xkeyboard-config/symbols/level32
-rw-r--r--xorg-server/xkeyboard-config/symbols/macintosh_vndr/makefile16
-rw-r--r--xorg-server/xkeyboard-config/symbols/makefile56
-rw-r--r--xorg-server/xkeyboard-config/symbols/mn164
-rw-r--r--xorg-server/xkeyboard-config/symbols/nec_vndr/makefile12
-rw-r--r--xorg-server/xkeyboard-config/symbols/nokia_vndr/makefile14
-rw-r--r--xorg-server/xkeyboard-config/symbols/np242
-rw-r--r--xorg-server/xkeyboard-config/symbols/ro510
-rw-r--r--xorg-server/xkeyboard-config/symbols/rs690
-rw-r--r--xorg-server/xkeyboard-config/symbols/ru1176
-rw-r--r--xorg-server/xkeyboard-config/symbols/sgi_vndr/makefile12
-rw-r--r--xorg-server/xkeyboard-config/symbols/sony_vndr/makefile12
-rw-r--r--xorg-server/xkeyboard-config/symbols/sun_vndr/makefile18
-rw-r--r--xorg-server/xkeyboard-config/symbols/us2674
-rw-r--r--xorg-server/xkeyboard-config/symbols/xfree68_vndr/makefile12
-rw-r--r--xorg-server/xkeyboard-config/types/default.in (renamed from xorg-server/xkeyboard-config/types/default)18
-rw-r--r--xorg-server/xkeyboard-config/types/makefile17
-rw-r--r--xorg-server/xkeyboard-config/xkbrules.mak20
-rw-r--r--xorg-server/xkeyboard-config/xslt/reg2ll.xsl46
-rw-r--r--xorg-server/xkeysymdb380
449 files changed, 164350 insertions, 125411 deletions
diff --git a/xorg-server/.Xdefaults b/xorg-server/.Xdefaults
new file mode 100644
index 000000000..06c29211a
--- /dev/null
+++ b/xorg-server/.Xdefaults
@@ -0,0 +1 @@
+*customization:-color
diff --git a/xorg-server/Xext/Makefile b/xorg-server/Xext/Makefile
new file mode 100644
index 000000000..1fd048d52
--- /dev/null
+++ b/xorg-server/Xext/Makefile
@@ -0,0 +1,37 @@
+CSRCS=\
+bigreq.c \
+dpms.c \
+dpmsstubs.c \
+saver.c \
+security.c \
+shape.c \
+sleepuntil.c \
+sync.c \
+xace.c \
+xcmisc.c \
+xres.c \
+xtest.c \
+geext.c \
+panoramiX.c \
+panoramiXprocs.c \
+panoramiXSwap.c
+
+#shm.c \
+#appgroup.c \
+#fontcache.c \
+#mbufbf.c \
+#mbufpx.c \
+#xcalibrate.c \
+#xf86bigfont.c \
+#xprint.c \
+#xselinux.c \
+#xvdisp.c \
+#xvmain.c \
+#xvmc.c
+
+LIBRARY=libxext
+
+INCLUDES += ..\hw\xfree86\dixmods\extmod ..\composite ..\miext\sync
+
+
+
diff --git a/xorg-server/Xext/Makefile.am b/xorg-server/Xext/Makefile.am
index cb432e00e..cb47d38cc 100644
--- a/xorg-server/Xext/Makefile.am
+++ b/xorg-server/Xext/Makefile.am
@@ -1,133 +1,133 @@
-# libXext.la: includes all extensions and should be linked into Xvfb,
-# Xnest, Xdmx and Xprt
-# libXextbuiltin.la: includes those extensions that are built directly into
-# Xorg by default
-# libXextmodule.la: includes those extensions that are built into a module
-# that Xorg loads
-if XORG
-noinst_LTLIBRARIES = libXext.la libXextbuiltin.la libXextmodule.la
-else
-noinst_LTLIBRARIES = libXext.la
-endif
-
-INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
-
-AM_CFLAGS = $(DIX_CFLAGS)
-
-if XORG
-sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h syncsdk.h
-endif
-
-# Sources always included in libXextbuiltin.la & libXext.la
-BUILTIN_SRCS = \
- bigreq.c \
- geext.c \
- shape.c \
- sleepuntil.c \
- sleepuntil.h \
- sync.c \
- syncsdk.h \
- syncsrv.h \
- xcmisc.c \
- xtest.c
-
-# Sources always included in libXextmodule.la & libXext.la. That's right, zero.
-MODULE_SRCS =
-MODULE_LIBS =
-
-# Optional sources included if extension enabled by configure.ac rules
-
-# MIT Shared Memory extension
-MITSHM_SRCS = shm.c shmint.h
-if MITSHM
-BUILTIN_SRCS += $(MITSHM_SRCS)
-endif
-
-# XVideo extension
-XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h
-if XV
-MODULE_SRCS += $(XV_SRCS)
-endif
-
-# XResource extension: lets clients get data about per-client resource usage
-RES_SRCS = xres.c
-if RES
-MODULE_SRCS += $(RES_SRCS)
-endif
-
-# MIT ScreenSaver extension
-SCREENSAVER_SRCS = saver.c
-if SCREENSAVER
-MODULE_SRCS += $(SCREENSAVER_SRCS)
-endif
-
-# Xinerama extension: making multiple video devices act as one virtual screen
-XINERAMA_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c
-if XINERAMA
-BUILTIN_SRCS += $(XINERAMA_SRCS)
-if XORG
-sdk_HEADERS += panoramiXsrv.h panoramiX.h
-endif
-endif
-
-# X-ACE extension: provides hooks for building security policy extensions
-# like XC-Security, X-SELinux & XTSol
-XACE_SRCS = xace.c xace.h xacestr.h
-if XACE
-BUILTIN_SRCS += $(XACE_SRCS)
-if XORG
-sdk_HEADERS += xace.h xacestr.h
-endif
-endif
-
-# SELinux extension: provides SELinux policy support for X objects
-# requires X-ACE extension
-XSELINUX_SRCS = xselinux_ext.c xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.h
-if XSELINUX
-MODULE_SRCS += $(XSELINUX_SRCS)
-MODULE_LIBS += $(SELINUX_LIBS)
-endif
-
-# Security extension: multi-level security to protect clients from each other
-XCSECURITY_SRCS = security.c securitysrv.h
-if XCSECURITY
-BUILTIN_SRCS += $(XCSECURITY_SRCS)
-endif
-
-# XF86 Big Font extension
-BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h
-if XF86BIGFONT
-BUILTIN_SRCS += $(BIGFONT_SRCS)
-endif
-
-# DPMS extension
-DPMS_SRCS = dpms.c dpmsproc.h
-if DPMSExtension
-MODULE_SRCS += $(DPMS_SRCS)
-endif
-
-# Now take all of the above, mix well, bake for 10 minutes and get libXext*.la
-
-libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS)
-libXext_la_LIBADD = $(MODULE_LIBS)
-
-if XORG
-libXextbuiltin_la_SOURCES = $(BUILTIN_SRCS)
-
-libXextmodule_la_SOURCES = $(MODULE_SRCS)
-libXextmodule_la_LIBADD = $(MODULE_LIBS)
-endif
-
-EXTRA_DIST = \
- $(MITSHM_SRCS) \
- $(XV_SRCS) \
- $(RES_SRCS) \
- $(SCREENSAVER_SRCS) \
- $(XACE_SRCS) \
- $(XCSECURITY_SRCS) \
- $(XSELINUX_SRCS) \
- $(XINERAMA_SRCS) \
- $(BIGFONT_SRCS) \
- $(DPMS_SRCS) \
- $(GE_SRCS)
-
+# libXext.la: includes all extensions and should be linked into Xvfb,
+# Xnest, Xdmx and Xprt
+# libXextbuiltin.la: includes those extensions that are built directly into
+# Xorg by default
+# libXextmodule.la: includes those extensions that are built into a module
+# that Xorg loads
+if XORG
+noinst_LTLIBRARIES = libXext.la libXextbuiltin.la libXextmodule.la
+else
+noinst_LTLIBRARIES = libXext.la
+endif
+
+INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
+
+AM_CFLAGS = $(DIX_CFLAGS)
+
+if XORG
+sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h syncsdk.h
+endif
+
+# Sources always included in libXextbuiltin.la & libXext.la
+BUILTIN_SRCS = \
+ bigreq.c \
+ geext.c \
+ shape.c \
+ sleepuntil.c \
+ sleepuntil.h \
+ sync.c \
+ syncsdk.h \
+ syncsrv.h \
+ xcmisc.c \
+ xtest.c
+
+# Sources always included in libXextmodule.la & libXext.la. That's right, zero.
+MODULE_SRCS =
+MODULE_LIBS =
+
+# Optional sources included if extension enabled by configure.ac rules
+
+# MIT Shared Memory extension
+MITSHM_SRCS = shm.c shmint.h
+if MITSHM
+BUILTIN_SRCS += $(MITSHM_SRCS)
+endif
+
+# XVideo extension
+XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h
+if XV
+MODULE_SRCS += $(XV_SRCS)
+endif
+
+# XResource extension: lets clients get data about per-client resource usage
+RES_SRCS = xres.c
+if RES
+MODULE_SRCS += $(RES_SRCS)
+endif
+
+# MIT ScreenSaver extension
+SCREENSAVER_SRCS = saver.c
+if SCREENSAVER
+MODULE_SRCS += $(SCREENSAVER_SRCS)
+endif
+
+# Xinerama extension: making multiple video devices act as one virtual screen
+XINERAMA_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c
+if XINERAMA
+BUILTIN_SRCS += $(XINERAMA_SRCS)
+if XORG
+sdk_HEADERS += panoramiXsrv.h panoramiX.h
+endif
+endif
+
+# X-ACE extension: provides hooks for building security policy extensions
+# like XC-Security, X-SELinux & XTSol
+XACE_SRCS = xace.c xace.h xacestr.h
+if XACE
+BUILTIN_SRCS += $(XACE_SRCS)
+if XORG
+sdk_HEADERS += xace.h xacestr.h
+endif
+endif
+
+# SELinux extension: provides SELinux policy support for X objects
+# requires X-ACE extension
+XSELINUX_SRCS = xselinux_ext.c xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.h
+if XSELINUX
+MODULE_SRCS += $(XSELINUX_SRCS)
+MODULE_LIBS += $(SELINUX_LIBS)
+endif
+
+# Security extension: multi-level security to protect clients from each other
+XCSECURITY_SRCS = security.c securitysrv.h
+if XCSECURITY
+BUILTIN_SRCS += $(XCSECURITY_SRCS)
+endif
+
+# XF86 Big Font extension
+BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h
+if XF86BIGFONT
+BUILTIN_SRCS += $(BIGFONT_SRCS)
+endif
+
+# DPMS extension
+DPMS_SRCS = dpms.c dpmsproc.h
+if DPMSExtension
+MODULE_SRCS += $(DPMS_SRCS)
+endif
+
+# Now take all of the above, mix well, bake for 10 minutes and get libXext*.la
+
+libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS)
+libXext_la_LIBADD = $(MODULE_LIBS)
+
+if XORG
+libXextbuiltin_la_SOURCES = $(BUILTIN_SRCS)
+
+libXextmodule_la_SOURCES = $(MODULE_SRCS)
+libXextmodule_la_LIBADD = $(MODULE_LIBS)
+endif
+
+EXTRA_DIST = \
+ $(MITSHM_SRCS) \
+ $(XV_SRCS) \
+ $(RES_SRCS) \
+ $(SCREENSAVER_SRCS) \
+ $(XACE_SRCS) \
+ $(XCSECURITY_SRCS) \
+ $(XSELINUX_SRCS) \
+ $(XINERAMA_SRCS) \
+ $(BIGFONT_SRCS) \
+ $(DPMS_SRCS) \
+ $(GE_SRCS)
+
diff --git a/xorg-server/Xext/dpms.c b/xorg-server/Xext/dpms.c
index 13854f704..79b2e2944 100644
--- a/xorg-server/Xext/dpms.c
+++ b/xorg-server/Xext/dpms.c
@@ -28,6 +28,8 @@ Equipment Corporation.
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+#define DPMSExtension
#endif
#include <X11/X.h>
diff --git a/xorg-server/Xext/panoramiX.c b/xorg-server/Xext/panoramiX.c
index 391346a6b..309c09cda 100644
--- a/xorg-server/Xext/panoramiX.c
+++ b/xorg-server/Xext/panoramiX.c
@@ -1,1299 +1,1299 @@
-/*****************************************************************
-Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
-BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Digital Equipment Corporation
-shall not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from Digital
-Equipment Corporation.
-******************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include <stdio.h>
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/Xarch.h>
-#include "misc.h"
-#include "cursor.h"
-#include "cursorstr.h"
-#include "extnsionst.h"
-#include "dixstruct.h"
-#include "gc.h"
-#include "gcstruct.h"
-#include "scrnintstr.h"
-#include "window.h"
-#include "windowstr.h"
-#include "pixmapstr.h"
-#include "panoramiX.h"
-#include <X11/extensions/panoramiXproto.h>
-#include "panoramiXsrv.h"
-#include "globals.h"
-#include "servermd.h"
-#include "resource.h"
-#include "picturestr.h"
-#ifdef XFIXES
-#include "xfixesint.h"
-#endif
-#ifdef COMPOSITE
-#include "compint.h"
-#endif
-#include "modinit.h"
-#include "protocol-versions.h"
-
-#ifdef GLXPROXY
-extern VisualPtr glxMatchVisual(ScreenPtr pScreen,
- VisualPtr pVisual,
- ScreenPtr pMatchScreen);
-#endif
-
-/*
- * PanoramiX data declarations
- */
-
-int PanoramiXPixWidth = 0;
-int PanoramiXPixHeight = 0;
-int PanoramiXNumScreens = 0;
-
-static RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL};
-
-static int PanoramiXNumDepths;
-static DepthPtr PanoramiXDepths;
-static int PanoramiXNumVisuals;
-static VisualPtr PanoramiXVisuals;
-
-RESTYPE XRC_DRAWABLE;
-RESTYPE XRT_WINDOW;
-RESTYPE XRT_PIXMAP;
-RESTYPE XRT_GC;
-RESTYPE XRT_COLORMAP;
-
-static Bool VisualsEqual(VisualPtr, ScreenPtr, VisualPtr);
-XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr = &VisualsEqual;
-
-/*
- * Function prototypes
- */
-
-static int panoramiXGeneration;
-static int ProcPanoramiXDispatch(ClientPtr client);
-
-static void PanoramiXResetProc(ExtensionEntry*);
-
-/*
- * External references for functions and data variables
- */
-
-#include "panoramiXh.h"
-
-int (* SavedProcVector[256]) (ClientPtr client) = { NULL, };
-
-static DevPrivateKeyRec PanoramiXGCKeyRec;
-#define PanoramiXGCKey (&PanoramiXGCKeyRec)
-static DevPrivateKeyRec PanoramiXScreenKeyRec;
-#define PanoramiXScreenKey (&PanoramiXScreenKeyRec)
-
-typedef struct {
- DDXPointRec clipOrg;
- DDXPointRec patOrg;
- GCFuncs *wrapFuncs;
-} PanoramiXGCRec, *PanoramiXGCPtr;
-
-typedef struct {
- CreateGCProcPtr CreateGC;
- CloseScreenProcPtr CloseScreen;
-} PanoramiXScreenRec, *PanoramiXScreenPtr;
-
-static void XineramaValidateGC(GCPtr, unsigned long, DrawablePtr);
-static void XineramaChangeGC(GCPtr, unsigned long);
-static void XineramaCopyGC(GCPtr, unsigned long, GCPtr);
-static void XineramaDestroyGC(GCPtr);
-static void XineramaChangeClip(GCPtr, int, pointer, int);
-static void XineramaDestroyClip(GCPtr);
-static void XineramaCopyClip(GCPtr, GCPtr);
-
-static GCFuncs XineramaGCFuncs = {
- XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC,
- XineramaChangeClip, XineramaDestroyClip, XineramaCopyClip
-};
-
-#define Xinerama_GC_FUNC_PROLOGUE(pGC)\
- PanoramiXGCPtr pGCPriv = (PanoramiXGCPtr) \
- dixLookupPrivate(&(pGC)->devPrivates, PanoramiXGCKey); \
- (pGC)->funcs = pGCPriv->wrapFuncs;
-
-#define Xinerama_GC_FUNC_EPILOGUE(pGC)\
- pGCPriv->wrapFuncs = (pGC)->funcs;\
- (pGC)->funcs = &XineramaGCFuncs;
-
-
-static Bool
-XineramaCloseScreen (int i, ScreenPtr pScreen)
-{
- PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr)
- dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey);
-
- pScreen->CloseScreen = pScreenPriv->CloseScreen;
- pScreen->CreateGC = pScreenPriv->CreateGC;
-
- if (pScreen->myNum == 0)
- RegionUninit(&PanoramiXScreenRegion);
-
- free((pointer) pScreenPriv);
-
- return (*pScreen->CloseScreen) (i, pScreen);
-}
-
-static Bool
-XineramaCreateGC(GCPtr pGC)
-{
- ScreenPtr pScreen = pGC->pScreen;
- PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr)
- dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey);
- Bool ret;
-
- pScreen->CreateGC = pScreenPriv->CreateGC;
- if((ret = (*pScreen->CreateGC)(pGC))) {
- PanoramiXGCPtr pGCPriv = (PanoramiXGCPtr)
- dixLookupPrivate(&pGC->devPrivates, PanoramiXGCKey);
-
- pGCPriv->wrapFuncs = pGC->funcs;
- pGC->funcs = &XineramaGCFuncs;
-
- pGCPriv->clipOrg.x = pGC->clipOrg.x;
- pGCPriv->clipOrg.y = pGC->clipOrg.y;
- pGCPriv->patOrg.x = pGC->patOrg.x;
- pGCPriv->patOrg.y = pGC->patOrg.y;
- }
- pScreen->CreateGC = XineramaCreateGC;
-
- return ret;
-}
-
-static void
-XineramaValidateGC(
- GCPtr pGC,
- unsigned long changes,
- DrawablePtr pDraw
-){
- Xinerama_GC_FUNC_PROLOGUE (pGC);
-
- if((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr)pDraw)->parent)) {
- /* the root window */
- int x_off = pGC->pScreen->x;
- int y_off = pGC->pScreen->y;
- int new_val;
-
- new_val = pGCPriv->clipOrg.x - x_off;
- if(pGC->clipOrg.x != new_val) {
- pGC->clipOrg.x = new_val;
- changes |= GCClipXOrigin;
- }
- new_val = pGCPriv->clipOrg.y - y_off;
- if(pGC->clipOrg.y != new_val) {
- pGC->clipOrg.y = new_val;
- changes |= GCClipYOrigin;
- }
- new_val = pGCPriv->patOrg.x - x_off;
- if(pGC->patOrg.x != new_val) {
- pGC->patOrg.x = new_val;
- changes |= GCTileStipXOrigin;
- }
- new_val = pGCPriv->patOrg.y - y_off;
- if(pGC->patOrg.y != new_val) {
- pGC->patOrg.y = new_val;
- changes |= GCTileStipYOrigin;
- }
- } else {
- if(pGC->clipOrg.x != pGCPriv->clipOrg.x) {
- pGC->clipOrg.x = pGCPriv->clipOrg.x;
- changes |= GCClipXOrigin;
- }
- if(pGC->clipOrg.y != pGCPriv->clipOrg.y) {
- pGC->clipOrg.y = pGCPriv->clipOrg.y;
- changes |= GCClipYOrigin;
- }
- if(pGC->patOrg.x != pGCPriv->patOrg.x) {
- pGC->patOrg.x = pGCPriv->patOrg.x;
- changes |= GCTileStipXOrigin;
- }
- if(pGC->patOrg.y != pGCPriv->patOrg.y) {
- pGC->patOrg.y = pGCPriv->patOrg.y;
- changes |= GCTileStipYOrigin;
- }
- }
-
- (*pGC->funcs->ValidateGC)(pGC, changes, pDraw);
- Xinerama_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-XineramaDestroyGC(GCPtr pGC)
-{
- Xinerama_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->DestroyGC)(pGC);
- Xinerama_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-XineramaChangeGC (
- GCPtr pGC,
- unsigned long mask
-){
- Xinerama_GC_FUNC_PROLOGUE (pGC);
-
- if(mask & GCTileStipXOrigin)
- pGCPriv->patOrg.x = pGC->patOrg.x;
- if(mask & GCTileStipYOrigin)
- pGCPriv->patOrg.y = pGC->patOrg.y;
- if(mask & GCClipXOrigin)
- pGCPriv->clipOrg.x = pGC->clipOrg.x;
- if(mask & GCClipYOrigin)
- pGCPriv->clipOrg.y = pGC->clipOrg.y;
-
- (*pGC->funcs->ChangeGC) (pGC, mask);
- Xinerama_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-XineramaCopyGC (
- GCPtr pGCSrc,
- unsigned long mask,
- GCPtr pGCDst
-){
- PanoramiXGCPtr pSrcPriv = (PanoramiXGCPtr)
- dixLookupPrivate(&pGCSrc->devPrivates, PanoramiXGCKey);
- Xinerama_GC_FUNC_PROLOGUE (pGCDst);
-
- if(mask & GCTileStipXOrigin)
- pGCPriv->patOrg.x = pSrcPriv->patOrg.x;
- if(mask & GCTileStipYOrigin)
- pGCPriv->patOrg.y = pSrcPriv->patOrg.y;
- if(mask & GCClipXOrigin)
- pGCPriv->clipOrg.x = pSrcPriv->clipOrg.x;
- if(mask & GCClipYOrigin)
- pGCPriv->clipOrg.y = pSrcPriv->clipOrg.y;
-
- (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst);
- Xinerama_GC_FUNC_EPILOGUE (pGCDst);
-}
-
-static void
-XineramaChangeClip (
- GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects
-){
- Xinerama_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
- Xinerama_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-XineramaCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
-{
- Xinerama_GC_FUNC_PROLOGUE (pgcDst);
- (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc);
- Xinerama_GC_FUNC_EPILOGUE (pgcDst);
-}
-
-static void
-XineramaDestroyClip(GCPtr pGC)
-{
- Xinerama_GC_FUNC_PROLOGUE (pGC);
- (* pGC->funcs->DestroyClip)(pGC);
- Xinerama_GC_FUNC_EPILOGUE (pGC);
-}
-
-int
-XineramaDeleteResource(pointer data, XID id)
-{
- free(data);
- return 1;
-}
-
-typedef struct {
- int screen;
- int id;
-} PanoramiXSearchData;
-
-static Bool
-XineramaFindIDByScrnum(pointer resource, XID id, pointer privdata)
-{
- PanoramiXRes *res = (PanoramiXRes*)resource;
- PanoramiXSearchData *data = (PanoramiXSearchData*)privdata;
-
- return res->info[data->screen].id == data->id;
-}
-
-PanoramiXRes *
-PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen)
-{
- PanoramiXSearchData data;
- pointer val;
-
- if(!screen) {
- dixLookupResourceByType(&val, id, type, serverClient, DixReadAccess);
- return val;
- }
-
- data.screen = screen;
- data.id = id;
-
- return LookupClientResourceComplex(clients[CLIENT_ID(id)], type,
- XineramaFindIDByScrnum, &data);
-}
-
-typedef struct _connect_callback_list {
- void (*func)(void);
- struct _connect_callback_list *next;
-} XineramaConnectionCallbackList;
-
-static XineramaConnectionCallbackList *ConnectionCallbackList = NULL;
-
-Bool
-XineramaRegisterConnectionBlockCallback(void (*func)(void))
-{
- XineramaConnectionCallbackList *newlist;
-
- if(!(newlist = malloc(sizeof(XineramaConnectionCallbackList))))
- return FALSE;
-
- newlist->next = ConnectionCallbackList;
- newlist->func = func;
- ConnectionCallbackList = newlist;
-
- return TRUE;
-}
-
-static void XineramaInitData(ScreenPtr pScreen)
-{
- int i, w, h;
-
- RegionNull(&PanoramiXScreenRegion);
- for (i = 0; i < PanoramiXNumScreens; i++) {
- BoxRec TheBox;
- RegionRec ScreenRegion;
-
- pScreen = screenInfo.screens[i];
-
- TheBox.x1 = pScreen->x;
- TheBox.x2 = TheBox.x1 + pScreen->width;
- TheBox.y1 = pScreen->y;
- TheBox.y2 = TheBox.y1 + pScreen->height;
-
- RegionInit(&ScreenRegion, &TheBox, 1);
- RegionUnion(&PanoramiXScreenRegion, &PanoramiXScreenRegion,
- &ScreenRegion);
- RegionUninit(&ScreenRegion);
- }
-
- PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width;
- PanoramiXPixHeight = screenInfo.screens[0]->y + screenInfo.screens[0]->height;
-
- for (i = 1; i < PanoramiXNumScreens; i++) {
- pScreen = screenInfo.screens[i];
- w = pScreen->x + pScreen->width;
- h = pScreen->y + pScreen->height;
-
- if (PanoramiXPixWidth < w)
- PanoramiXPixWidth = w;
- if (PanoramiXPixHeight < h)
- PanoramiXPixHeight = h;
- }
-}
-
-void XineramaReinitData(ScreenPtr pScreen)
-{
- RegionUninit(&PanoramiXScreenRegion);
- XineramaInitData(pScreen);
-}
-
-/*
- * PanoramiXExtensionInit():
- * Called from InitExtensions in main().
- * Register PanoramiXeen Extension
- * Initialize global variables.
- */
-
-void PanoramiXExtensionInit(int argc, char *argv[])
-{
- int i;
- Bool success = FALSE;
- ExtensionEntry *extEntry;
- ScreenPtr pScreen = screenInfo.screens[0];
- PanoramiXScreenPtr pScreenPriv;
-
- if (noPanoramiXExtension)
- return;
-
- if (!dixRegisterPrivateKey(&PanoramiXScreenKeyRec, PRIVATE_SCREEN, 0)) {
- noPanoramiXExtension = TRUE;
- return;
- }
-
- if (!dixRegisterPrivateKey(&PanoramiXGCKeyRec, PRIVATE_GC, sizeof(PanoramiXGCRec))) {
- noPanoramiXExtension = TRUE;
- return;
- }
-
- PanoramiXNumScreens = screenInfo.numScreens;
- if (PanoramiXNumScreens == 1) { /* Only 1 screen */
- noPanoramiXExtension = TRUE;
- return;
- }
-
- while (panoramiXGeneration != serverGeneration) {
- extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0,0,
- ProcPanoramiXDispatch,
- SProcPanoramiXDispatch, PanoramiXResetProc,
- StandardMinorOpcode);
- if (!extEntry)
- break;
-
- /*
- * First make sure all the basic allocations succeed. If not,
- * run in non-PanoramiXeen mode.
- */
-
- for (i = 0; i < PanoramiXNumScreens; i++) {
- pScreen = screenInfo.screens[i];
- pScreenPriv = malloc(sizeof(PanoramiXScreenRec));
- dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey,
- pScreenPriv);
- if(!pScreenPriv) {
- noPanoramiXExtension = TRUE;
- return;
- }
-
- pScreenPriv->CreateGC = pScreen->CreateGC;
- pScreenPriv->CloseScreen = pScreen->CloseScreen;
-
- pScreen->CreateGC = XineramaCreateGC;
- pScreen->CloseScreen = XineramaCloseScreen;
- }
-
- XRC_DRAWABLE = CreateNewResourceClass();
- XRT_WINDOW = CreateNewResourceType(XineramaDeleteResource,
- "XineramaWindow");
- if (XRT_WINDOW)
- XRT_WINDOW |= XRC_DRAWABLE;
- XRT_PIXMAP = CreateNewResourceType(XineramaDeleteResource,
- "XineramaPixmap");
- if (XRT_PIXMAP)
- XRT_PIXMAP |= XRC_DRAWABLE;
- XRT_GC = CreateNewResourceType(XineramaDeleteResource,
- "XineramaGC");
- XRT_COLORMAP = CreateNewResourceType(XineramaDeleteResource,
- "XineramaColormap");
-
- if (XRT_WINDOW && XRT_PIXMAP && XRT_GC && XRT_COLORMAP) {
- panoramiXGeneration = serverGeneration;
- success = TRUE;
- }
- SetResourceTypeErrorValue(XRT_WINDOW, BadWindow);
- SetResourceTypeErrorValue(XRT_PIXMAP, BadPixmap);
- SetResourceTypeErrorValue(XRT_GC, BadGC);
- SetResourceTypeErrorValue(XRT_COLORMAP, BadColor);
- }
-
- if (!success) {
- noPanoramiXExtension = TRUE;
- ErrorF(PANORAMIX_PROTOCOL_NAME " extension failed to initialize\n");
- return;
- }
-
- XineramaInitData(pScreen);
-
- /*
- * Put our processes into the ProcVector
- */
-
- for (i = 256; i--; )
- SavedProcVector[i] = ProcVector[i];
-
- ProcVector[X_CreateWindow] = PanoramiXCreateWindow;
- ProcVector[X_ChangeWindowAttributes] = PanoramiXChangeWindowAttributes;
- ProcVector[X_DestroyWindow] = PanoramiXDestroyWindow;
- ProcVector[X_DestroySubwindows] = PanoramiXDestroySubwindows;
- ProcVector[X_ChangeSaveSet] = PanoramiXChangeSaveSet;
- ProcVector[X_ReparentWindow] = PanoramiXReparentWindow;
- ProcVector[X_MapWindow] = PanoramiXMapWindow;
- ProcVector[X_MapSubwindows] = PanoramiXMapSubwindows;
- ProcVector[X_UnmapWindow] = PanoramiXUnmapWindow;
- ProcVector[X_UnmapSubwindows] = PanoramiXUnmapSubwindows;
- ProcVector[X_ConfigureWindow] = PanoramiXConfigureWindow;
- ProcVector[X_CirculateWindow] = PanoramiXCirculateWindow;
- ProcVector[X_GetGeometry] = PanoramiXGetGeometry;
- ProcVector[X_TranslateCoords] = PanoramiXTranslateCoords;
- ProcVector[X_CreatePixmap] = PanoramiXCreatePixmap;
- ProcVector[X_FreePixmap] = PanoramiXFreePixmap;
- ProcVector[X_CreateGC] = PanoramiXCreateGC;
- ProcVector[X_ChangeGC] = PanoramiXChangeGC;
- ProcVector[X_CopyGC] = PanoramiXCopyGC;
- ProcVector[X_SetDashes] = PanoramiXSetDashes;
- ProcVector[X_SetClipRectangles] = PanoramiXSetClipRectangles;
- ProcVector[X_FreeGC] = PanoramiXFreeGC;
- ProcVector[X_ClearArea] = PanoramiXClearToBackground;
- ProcVector[X_CopyArea] = PanoramiXCopyArea;
- ProcVector[X_CopyPlane] = PanoramiXCopyPlane;
- ProcVector[X_PolyPoint] = PanoramiXPolyPoint;
- ProcVector[X_PolyLine] = PanoramiXPolyLine;
- ProcVector[X_PolySegment] = PanoramiXPolySegment;
- ProcVector[X_PolyRectangle] = PanoramiXPolyRectangle;
- ProcVector[X_PolyArc] = PanoramiXPolyArc;
- ProcVector[X_FillPoly] = PanoramiXFillPoly;
- ProcVector[X_PolyFillRectangle] = PanoramiXPolyFillRectangle;
- ProcVector[X_PolyFillArc] = PanoramiXPolyFillArc;
- ProcVector[X_PutImage] = PanoramiXPutImage;
- ProcVector[X_GetImage] = PanoramiXGetImage;
- ProcVector[X_PolyText8] = PanoramiXPolyText8;
- ProcVector[X_PolyText16] = PanoramiXPolyText16;
- ProcVector[X_ImageText8] = PanoramiXImageText8;
- ProcVector[X_ImageText16] = PanoramiXImageText16;
- ProcVector[X_CreateColormap] = PanoramiXCreateColormap;
- ProcVector[X_FreeColormap] = PanoramiXFreeColormap;
- ProcVector[X_CopyColormapAndFree] = PanoramiXCopyColormapAndFree;
- ProcVector[X_InstallColormap] = PanoramiXInstallColormap;
- ProcVector[X_UninstallColormap] = PanoramiXUninstallColormap;
- ProcVector[X_AllocColor] = PanoramiXAllocColor;
- ProcVector[X_AllocNamedColor] = PanoramiXAllocNamedColor;
- ProcVector[X_AllocColorCells] = PanoramiXAllocColorCells;
- ProcVector[X_AllocColorPlanes] = PanoramiXAllocColorPlanes;
- ProcVector[X_FreeColors] = PanoramiXFreeColors;
- ProcVector[X_StoreColors] = PanoramiXStoreColors;
- ProcVector[X_StoreNamedColor] = PanoramiXStoreNamedColor;
-
- PanoramiXRenderInit ();
-#ifdef XFIXES
- PanoramiXFixesInit ();
-#endif
-#ifdef COMPOSITE
- PanoramiXCompositeInit ();
-#endif
-
-}
-
-extern Bool CreateConnectionBlock(void);
-
-Bool PanoramiXCreateConnectionBlock(void)
-{
- int i, j, length;
- Bool disableBackingStore = FALSE;
- int old_width, old_height;
- float width_mult, height_mult;
- xWindowRoot *root;
- xVisualType *visual;
- xDepth *depth;
- VisualPtr pVisual;
- ScreenPtr pScreen;
-
- /*
- * Do normal CreateConnectionBlock but faking it for only one screen
- */
-
- if(!PanoramiXNumDepths) {
- ErrorF("Xinerama error: No common visuals\n");
- return FALSE;
- }
-
- for(i = 1; i < screenInfo.numScreens; i++) {
- pScreen = screenInfo.screens[i];
- if(pScreen->rootDepth != screenInfo.screens[0]->rootDepth) {
- ErrorF("Xinerama error: Root window depths differ\n");
- return FALSE;
- }
- if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport)
- disableBackingStore = TRUE;
- }
-
- if (disableBackingStore) {
- for (i = 0; i < screenInfo.numScreens; i++) {
- pScreen = screenInfo.screens[i];
- pScreen->backingStoreSupport = NotUseful;
- }
- }
-
- i = screenInfo.numScreens;
- screenInfo.numScreens = 1;
- if (!CreateConnectionBlock()) {
- screenInfo.numScreens = i;
- return FALSE;
- }
-
- screenInfo.numScreens = i;
-
- root = (xWindowRoot *) (ConnectionInfo + connBlockScreenStart);
- length = connBlockScreenStart + sizeof(xWindowRoot);
-
- /* overwrite the connection block */
- root->nDepths = PanoramiXNumDepths;
-
- for (i = 0; i < PanoramiXNumDepths; i++) {
- depth = (xDepth *) (ConnectionInfo + length);
- depth->depth = PanoramiXDepths[i].depth;
- depth->nVisuals = PanoramiXDepths[i].numVids;
- length += sizeof(xDepth);
- visual = (xVisualType *)(ConnectionInfo + length);
-
- for (j = 0; j < depth->nVisuals; j++, visual++) {
- visual->visualID = PanoramiXDepths[i].vids[j];
-
- for (pVisual = PanoramiXVisuals;
- pVisual->vid != visual->visualID;
- pVisual++)
- ;
-
- visual->class = pVisual->class;
- visual->bitsPerRGB = pVisual->bitsPerRGBValue;
- visual->colormapEntries = pVisual->ColormapEntries;
- visual->redMask = pVisual->redMask;
- visual->greenMask = pVisual->greenMask;
- visual->blueMask = pVisual->blueMask;
- }
-
- length += (depth->nVisuals * sizeof(xVisualType));
- }
-
- connSetupPrefix.length = bytes_to_int32(length);
-
- for (i = 0; i < PanoramiXNumDepths; i++)
- free(PanoramiXDepths[i].vids);
- free(PanoramiXDepths);
- PanoramiXDepths = NULL;
-
- /*
- * OK, change some dimensions so it looks as if it were one big screen
- */
-
- old_width = root->pixWidth;
- old_height = root->pixHeight;
-
- root->pixWidth = PanoramiXPixWidth;
- root->pixHeight = PanoramiXPixHeight;
- width_mult = (1.0 * root->pixWidth) / old_width;
- height_mult = (1.0 * root->pixHeight) / old_height;
- root->mmWidth *= width_mult;
- root->mmHeight *= height_mult;
-
- while(ConnectionCallbackList) {
- pointer tmp;
-
- tmp = (pointer)ConnectionCallbackList;
- (*ConnectionCallbackList->func)();
- ConnectionCallbackList = ConnectionCallbackList->next;
- free(tmp);
- }
-
- return TRUE;
-}
-
-/*
- * This isn't just memcmp(), bitsPerRGBValue is skipped. markv made that
- * change way back before xf86 4.0, but the comment for _why_ is a bit
- * opaque, so I'm not going to question it for now.
- *
- * This is probably better done as a screen hook so DBE/EVI/GLX can add
- * their own tests, and adding privates to VisualRec so they don't have to
- * do their own back-mapping.
- */
-static Bool
-VisualsEqual(VisualPtr a, ScreenPtr pScreenB, VisualPtr b)
-{
- return ((a->class == b->class) &&
- (a->ColormapEntries == b->ColormapEntries) &&
- (a->nplanes == b->nplanes) &&
- (a->redMask == b->redMask) &&
- (a->greenMask == b->greenMask) &&
- (a->blueMask == b->blueMask) &&
- (a->offsetRed == b->offsetRed) &&
- (a->offsetGreen == b->offsetGreen) &&
- (a->offsetBlue == b->offsetBlue));
-}
-
-static void
-PanoramiXMaybeAddDepth(DepthPtr pDepth)
-{
- ScreenPtr pScreen;
- int j, k;
- Bool found = FALSE;
-
- for (j = 1; j < PanoramiXNumScreens; j++) {
- pScreen = screenInfo.screens[j];
- for (k = 0; k < pScreen->numDepths; k++) {
- if (pScreen->allowedDepths[k].depth == pDepth->depth) {
- found = TRUE;
- break;
- }
- }
- }
-
- if (!found)
- return;
-
- j = PanoramiXNumDepths;
- PanoramiXNumDepths++;
- PanoramiXDepths = realloc(PanoramiXDepths,
- PanoramiXNumDepths * sizeof(DepthRec));
- PanoramiXDepths[j].depth = pDepth->depth;
- PanoramiXDepths[j].numVids = 0;
- /* XXX suboptimal, should grow these dynamically */
- if(pDepth->numVids)
- PanoramiXDepths[j].vids = malloc(sizeof(VisualID) * pDepth->numVids);
- else
- PanoramiXDepths[j].vids = NULL;
-}
-
-static void
-PanoramiXMaybeAddVisual(VisualPtr pVisual)
-{
- ScreenPtr pScreen;
- int j, k;
- Bool found = FALSE;
-
- for (j = 1; j < PanoramiXNumScreens; j++) {
- pScreen = screenInfo.screens[j];
- found = FALSE;
-
- for (k = 0; k < pScreen->numVisuals; k++) {
- VisualPtr candidate = &pScreen->visuals[k];
-
- if ((*XineramaVisualsEqualPtr)(pVisual, pScreen, candidate)
-#ifdef GLXPROXY
- && glxMatchVisual(screenInfo.screens[0], pVisual, pScreen)
-#endif
- ) {
- found = TRUE;
- break;
- }
- }
-
- if (!found)
- return;
- }
-
- /* found a matching visual on all screens, add it to the subset list */
- j = PanoramiXNumVisuals;
- PanoramiXNumVisuals++;
- PanoramiXVisuals = realloc(PanoramiXVisuals,
- PanoramiXNumVisuals * sizeof(VisualRec));
-
- memcpy(&PanoramiXVisuals[j], pVisual, sizeof(VisualRec));
-
- for (k = 0; k < PanoramiXNumDepths; k++) {
- if (PanoramiXDepths[k].depth == pVisual->nplanes) {
- PanoramiXDepths[k].vids[PanoramiXDepths[k].numVids] = pVisual->vid;
- PanoramiXDepths[k].numVids++;
- break;
- }
- }
-}
-
-extern void
-PanoramiXConsolidate(void)
-{
- int i;
- PanoramiXRes *root, *defmap, *saver;
- ScreenPtr pScreen = screenInfo.screens[0];
- DepthPtr pDepth = pScreen->allowedDepths;
- VisualPtr pVisual = pScreen->visuals;
-
- PanoramiXNumDepths = 0;
- PanoramiXNumVisuals = 0;
-
- for (i = 0; i < pScreen->numDepths; i++)
- PanoramiXMaybeAddDepth(pDepth++);
-
- for (i = 0; i < pScreen->numVisuals; i++)
- PanoramiXMaybeAddVisual(pVisual++);
-
- root = malloc(sizeof(PanoramiXRes));
- root->type = XRT_WINDOW;
- defmap = malloc(sizeof(PanoramiXRes));
- defmap->type = XRT_COLORMAP;
- saver = malloc(sizeof(PanoramiXRes));
- saver->type = XRT_WINDOW;
-
- for (i = 0; i < PanoramiXNumScreens; i++) {
- ScreenPtr pScreen = screenInfo.screens[i];
- root->info[i].id = pScreen->root->drawable.id;
- root->u.win.class = InputOutput;
- root->u.win.root = TRUE;
- saver->info[i].id = pScreen->screensaver.wid;
- saver->u.win.class = InputOutput;
- saver->u.win.root = TRUE;
- defmap->info[i].id = pScreen->defColormap;
- }
-
- AddResource(root->info[0].id, XRT_WINDOW, root);
- AddResource(saver->info[0].id, XRT_WINDOW, saver);
- AddResource(defmap->info[0].id, XRT_COLORMAP, defmap);
-}
-
-VisualID
-PanoramiXTranslateVisualID(int screen, VisualID orig)
-{
- ScreenPtr pOtherScreen = screenInfo.screens[screen];
- VisualPtr pVisual = NULL;
- int i;
-
- for (i = 0; i < PanoramiXNumVisuals; i++) {
- if (orig == PanoramiXVisuals[i].vid) {
- pVisual = &PanoramiXVisuals[i];
- break;
- }
- }
-
- if (!pVisual)
- return 0;
-
- /* if screen is 0, orig is already the correct visual ID */
- if (screen == 0)
- return orig;
-
- /* found the original, now translate it relative to the backend screen */
- for (i = 0; i < pOtherScreen->numVisuals; i++) {
- VisualPtr pOtherVisual = &pOtherScreen->visuals[i];
-
- if ((*XineramaVisualsEqualPtr)(pVisual, pOtherScreen, pOtherVisual))
- return pOtherVisual->vid;
- }
-
- return 0;
-}
-
-
-/*
- * PanoramiXResetProc()
- * Exit, deallocating as needed.
- */
-
-static void PanoramiXResetProc(ExtensionEntry* extEntry)
-{
- int i;
-
- PanoramiXRenderReset ();
-#ifdef XFIXES
- PanoramiXFixesReset ();
-#endif
- screenInfo.numScreens = PanoramiXNumScreens;
- for (i = 256; i--; )
- ProcVector[i] = SavedProcVector[i];
-}
-
-
-int
-ProcPanoramiXQueryVersion (ClientPtr client)
-{
- /* REQUEST(xPanoramiXQueryVersionReq); */
- xPanoramiXQueryVersionReply rep;
- register int n;
-
- REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.majorVersion = SERVER_PANORAMIX_MAJOR_VERSION;
- rep.minorVersion = SERVER_PANORAMIX_MINOR_VERSION;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swaps(&rep.majorVersion, n);
- swaps(&rep.minorVersion, n);
- }
- WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep);
- return Success;
-}
-
-int
-ProcPanoramiXGetState(ClientPtr client)
-{
- REQUEST(xPanoramiXGetStateReq);
- WindowPtr pWin;
- xPanoramiXGetStateReply rep;
- int n, rc;
-
- REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.state = !noPanoramiXExtension;
- rep.window = stuff->window;
- if (client->swapped) {
- swaps (&rep.sequenceNumber, n);
- swapl (&rep.length, n);
- swapl (&rep.window, n);
- }
- WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
- return Success;
-
-}
-
-int
-ProcPanoramiXGetScreenCount(ClientPtr client)
-{
- REQUEST(xPanoramiXGetScreenCountReq);
- WindowPtr pWin;
- xPanoramiXGetScreenCountReply rep;
- int n, rc;
-
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.ScreenCount = PanoramiXNumScreens;
- rep.window = stuff->window;
- if (client->swapped) {
- swaps (&rep.sequenceNumber, n);
- swapl (&rep.length, n);
- swapl (&rep.window, n);
- }
- WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep);
- return Success;
-}
-
-int
-ProcPanoramiXGetScreenSize(ClientPtr client)
-{
- REQUEST(xPanoramiXGetScreenSizeReq);
- WindowPtr pWin;
- xPanoramiXGetScreenSizeReply rep;
- int n, rc;
-
- if (stuff->screen >= PanoramiXNumScreens)
- return BadMatch;
-
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- /* screen dimensions */
- rep.width = screenInfo.screens[stuff->screen]->width;
- rep.height = screenInfo.screens[stuff->screen]->height;
- rep.window = stuff->window;
- rep.screen = stuff->screen;
- if (client->swapped) {
- swaps (&rep.sequenceNumber, n);
- swapl (&rep.length, n);
- swapl (&rep.width, n);
- swapl (&rep.height, n);
- swapl (&rep.window, n);
- swapl (&rep.screen, n);
- }
- WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep);
- return Success;
-}
-
-
-int
-ProcXineramaIsActive(ClientPtr client)
-{
- /* REQUEST(xXineramaIsActiveReq); */
- xXineramaIsActiveReply rep;
-
- REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
-
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-#if 1
- {
- /* The following hack fools clients into thinking that Xinerama
- * is disabled even though it is not. */
- rep.state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack;
- }
-#else
- rep.state = !noPanoramiXExtension;
-#endif
- if (client->swapped) {
- int n;
- swaps (&rep.sequenceNumber, n);
- swapl (&rep.length, n);
- swapl (&rep.state, n);
- }
- WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
- return Success;
-}
-
-
-int
-ProcXineramaQueryScreens(ClientPtr client)
-{
- /* REQUEST(xXineramaQueryScreensReq); */
- xXineramaQueryScreensReply rep;
-
- REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
- rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
- if (client->swapped) {
- int n;
- swaps (&rep.sequenceNumber, n);
- swapl (&rep.length, n);
- swapl (&rep.number, n);
- }
- WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep);
-
- if(!noPanoramiXExtension) {
- xXineramaScreenInfo scratch;
- int i;
-
- for(i = 0; i < PanoramiXNumScreens; i++) {
- scratch.x_org = screenInfo.screens[i]->x;
- scratch.y_org = screenInfo.screens[i]->y;
- scratch.width = screenInfo.screens[i]->width;
- scratch.height = screenInfo.screens[i]->height;
-
- if(client->swapped) {
- int n;
- swaps (&scratch.x_org, n);
- swaps (&scratch.y_org, n);
- swaps (&scratch.width, n);
- swaps (&scratch.height, n);
- }
- WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
- }
- }
-
- return Success;
-}
-
-
-static int
-ProcPanoramiXDispatch (ClientPtr client)
-{ REQUEST(xReq);
- switch (stuff->data)
- {
- case X_PanoramiXQueryVersion:
- return ProcPanoramiXQueryVersion(client);
- case X_PanoramiXGetState:
- return ProcPanoramiXGetState(client);
- case X_PanoramiXGetScreenCount:
- return ProcPanoramiXGetScreenCount(client);
- case X_PanoramiXGetScreenSize:
- return ProcPanoramiXGetScreenSize(client);
- case X_XineramaIsActive:
- return ProcXineramaIsActive(client);
- case X_XineramaQueryScreens:
- return ProcXineramaQueryScreens(client);
- }
- return BadRequest;
-}
-
-
-#if X_BYTE_ORDER == X_LITTLE_ENDIAN
-#define SHIFT_L(v,s) (v) << (s)
-#define SHIFT_R(v,s) (v) >> (s)
-#else
-#define SHIFT_L(v,s) (v) >> (s)
-#define SHIFT_R(v,s) (v) << (s)
-#endif
-
-static void
-CopyBits(char *dst, int shiftL, char *src, int bytes)
-{
- /* Just get it to work. Worry about speed later */
- int shiftR = 8 - shiftL;
-
- while(bytes--) {
- *dst |= SHIFT_L(*src, shiftL);
- *(dst + 1) |= SHIFT_R(*src, shiftR);
- dst++; src++;
- }
-}
-
-
-/* Caution. This doesn't support 2 and 4 bpp formats. We expect
- 1 bpp and planar data to be already cleared when presented
- to this function */
-
-void
-XineramaGetImageData(
- DrawablePtr *pDrawables,
- int left,
- int top,
- int width,
- int height,
- unsigned int format,
- unsigned long planemask,
- char *data,
- int pitch,
- Bool isRoot
-){
- RegionRec SrcRegion, ScreenRegion, GrabRegion;
- BoxRec SrcBox, *pbox;
- int x, y, w, h, i, j, nbox, size, sizeNeeded, ScratchPitch, inOut, depth;
- DrawablePtr pDraw = pDrawables[0];
- char *ScratchMem = NULL;
-
- size = 0;
-
- /* find box in logical screen space */
- SrcBox.x1 = left;
- SrcBox.y1 = top;
- if(!isRoot) {
- SrcBox.x1 += pDraw->x + screenInfo.screens[0]->x;
- SrcBox.y1 += pDraw->y + screenInfo.screens[0]->y;
- }
- SrcBox.x2 = SrcBox.x1 + width;
- SrcBox.y2 = SrcBox.y1 + height;
-
- RegionInit(&SrcRegion, &SrcBox, 1);
- RegionNull(&GrabRegion);
-
- depth = (format == XYPixmap) ? 1 : pDraw->depth;
-
- for(i = 0; i < PanoramiXNumScreens; i++) {
- BoxRec TheBox;
- ScreenPtr pScreen;
- pDraw = pDrawables[i];
- pScreen = pDraw->pScreen;
-
- TheBox.x1 = pScreen->x;
- TheBox.x2 = TheBox.x1 + pScreen->width;
- TheBox.y1 = pScreen->y;
- TheBox.y2 = TheBox.y1 + pScreen->height;
-
- RegionInit(&ScreenRegion, &TheBox, 1);
- inOut = RegionContainsRect(&ScreenRegion, &SrcBox);
- if(inOut == rgnPART)
- RegionIntersect(&GrabRegion, &SrcRegion, &ScreenRegion);
- RegionUninit(&ScreenRegion);
-
- if(inOut == rgnIN) {
- (*pScreen->GetImage)(pDraw,
- SrcBox.x1 - pDraw->x - screenInfo.screens[i]->x,
- SrcBox.y1 - pDraw->y - screenInfo.screens[i]->y,
- width, height, format, planemask, data);
- break;
- } else if (inOut == rgnOUT)
- continue;
-
- nbox = RegionNumRects(&GrabRegion);
-
- if(nbox) {
- pbox = RegionRects(&GrabRegion);
-
- while(nbox--) {
- w = pbox->x2 - pbox->x1;
- h = pbox->y2 - pbox->y1;
- ScratchPitch = PixmapBytePad(w, depth);
- sizeNeeded = ScratchPitch * h;
-
- if(sizeNeeded > size) {
- char *tmpdata = ScratchMem;
- ScratchMem = realloc(ScratchMem, sizeNeeded);
- if(ScratchMem)
- size = sizeNeeded;
- else {
- ScratchMem = tmpdata;
- break;
- }
- }
-
- x = pbox->x1 - pDraw->x - screenInfo.screens[i]->x;
- y = pbox->y1 - pDraw->y - screenInfo.screens[i]->y;
-
- (*pScreen->GetImage)(pDraw, x, y, w, h,
- format, planemask, ScratchMem);
-
- /* copy the memory over */
-
- if(depth == 1) {
- int k, shift, leftover, index, index2;
-
- x = pbox->x1 - SrcBox.x1;
- y = pbox->y1 - SrcBox.y1;
- shift = x & 7;
- x >>= 3;
- leftover = w & 7;
- w >>= 3;
-
- /* clean up the edge */
- if(leftover) {
- int mask = (1 << leftover) - 1;
- for(j = h, k = w; j--; k += ScratchPitch)
- ScratchMem[k] &= mask;
- }
-
- for(j = 0, index = (pitch * y) + x, index2 = 0; j < h;
- j++, index += pitch, index2 += ScratchPitch)
- {
- if(w) {
- if(!shift)
- memcpy(data + index, ScratchMem + index2, w);
- else
- CopyBits(data + index, shift,
- ScratchMem + index2, w);
- }
-
- if(leftover) {
- data[index + w] |=
- SHIFT_L(ScratchMem[index2 + w], shift);
- if((shift + leftover) > 8)
- data[index + w + 1] |=
- SHIFT_R(ScratchMem[index2 + w],(8 - shift));
- }
- }
- } else {
- j = BitsPerPixel(depth) >> 3;
- x = (pbox->x1 - SrcBox.x1) * j;
- y = pbox->y1 - SrcBox.y1;
- w *= j;
-
- for(j = 0; j < h; j++) {
- memcpy(data + (pitch * (y + j)) + x,
- ScratchMem + (ScratchPitch * j), w);
- }
- }
- pbox++;
- }
-
- RegionSubtract(&SrcRegion, &SrcRegion, &GrabRegion);
- if(!RegionNotEmpty(&SrcRegion))
- break;
- }
-
- }
-
- free(ScratchMem);
-
- RegionUninit(&SrcRegion);
- RegionUninit(&GrabRegion);
-}
+/*****************************************************************
+Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+******************************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifdef HAVE_DMX_CONFIG_H
+#include <dmx-config.h>
+#endif
+
+#include <stdio.h>
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/Xarch.h>
+#include "misc.h"
+#include "cursor.h"
+#include "cursorstr.h"
+#include "extnsionst.h"
+#include "dixstruct.h"
+#include "gc.h"
+#include "gcstruct.h"
+#include "scrnintstr.h"
+#include "window.h"
+#include "windowstr.h"
+#include "pixmapstr.h"
+#include "panoramiX.h"
+#include <X11/extensions/panoramiXproto.h>
+#include "panoramiXsrv.h"
+#include "globals.h"
+#include "servermd.h"
+#include "resource.h"
+#include "picturestr.h"
+#ifdef XFIXES
+#include "xfixesint.h"
+#endif
+#ifdef COMPOSITE
+#include "compint.h"
+#endif
+#include "modinit.h"
+#include "protocol-versions.h"
+
+#ifdef GLXPROXY
+extern VisualPtr glxMatchVisual(ScreenPtr pScreen,
+ VisualPtr pVisual,
+ ScreenPtr pMatchScreen);
+#endif
+
+/*
+ * PanoramiX data declarations
+ */
+
+int PanoramiXPixWidth = 0;
+int PanoramiXPixHeight = 0;
+int PanoramiXNumScreens = 0;
+
+static RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL};
+
+static int PanoramiXNumDepths;
+static DepthPtr PanoramiXDepths;
+static int PanoramiXNumVisuals;
+static VisualPtr PanoramiXVisuals;
+
+RESTYPE XRC_DRAWABLE;
+RESTYPE XRT_WINDOW;
+RESTYPE XRT_PIXMAP;
+RESTYPE XRT_GC;
+RESTYPE XRT_COLORMAP;
+
+static Bool VisualsEqual(VisualPtr, ScreenPtr, VisualPtr);
+XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr = &VisualsEqual;
+
+/*
+ * Function prototypes
+ */
+
+static int panoramiXGeneration;
+static int ProcPanoramiXDispatch(ClientPtr client);
+
+static void PanoramiXResetProc(ExtensionEntry*);
+
+/*
+ * External references for functions and data variables
+ */
+
+#include "panoramiXh.h"
+
+int (* SavedProcVector[256]) (ClientPtr client) = { NULL, };
+
+static DevPrivateKeyRec PanoramiXGCKeyRec;
+#define PanoramiXGCKey (&PanoramiXGCKeyRec)
+static DevPrivateKeyRec PanoramiXScreenKeyRec;
+#define PanoramiXScreenKey (&PanoramiXScreenKeyRec)
+
+typedef struct {
+ DDXPointRec clipOrg;
+ DDXPointRec patOrg;
+ GCFuncs *wrapFuncs;
+} PanoramiXGCRec, *PanoramiXGCPtr;
+
+typedef struct {
+ CreateGCProcPtr CreateGC;
+ CloseScreenProcPtr CloseScreen;
+} PanoramiXScreenRec, *PanoramiXScreenPtr;
+
+static void XineramaValidateGC(GCPtr, unsigned long, DrawablePtr);
+static void XineramaChangeGC(GCPtr, unsigned long);
+static void XineramaCopyGC(GCPtr, unsigned long, GCPtr);
+static void XineramaDestroyGC(GCPtr);
+static void XineramaChangeClip(GCPtr, int, pointer, int);
+static void XineramaDestroyClip(GCPtr);
+static void XineramaCopyClip(GCPtr, GCPtr);
+
+static GCFuncs XineramaGCFuncs = {
+ XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC,
+ XineramaChangeClip, XineramaDestroyClip, XineramaCopyClip
+};
+
+#define Xinerama_GC_FUNC_PROLOGUE(pGC)\
+ PanoramiXGCPtr pGCPriv = (PanoramiXGCPtr) \
+ dixLookupPrivate(&(pGC)->devPrivates, PanoramiXGCKey); \
+ (pGC)->funcs = pGCPriv->wrapFuncs;
+
+#define Xinerama_GC_FUNC_EPILOGUE(pGC)\
+ pGCPriv->wrapFuncs = (pGC)->funcs;\
+ (pGC)->funcs = &XineramaGCFuncs;
+
+
+static Bool
+XineramaCloseScreen (int i, ScreenPtr pScreen)
+{
+ PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr)
+ dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey);
+
+ pScreen->CloseScreen = pScreenPriv->CloseScreen;
+ pScreen->CreateGC = pScreenPriv->CreateGC;
+
+ if (pScreen->myNum == 0)
+ RegionUninit(&PanoramiXScreenRegion);
+
+ free((pointer) pScreenPriv);
+
+ return (*pScreen->CloseScreen) (i, pScreen);
+}
+
+static Bool
+XineramaCreateGC(GCPtr pGC)
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr)
+ dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey);
+ Bool ret;
+
+ pScreen->CreateGC = pScreenPriv->CreateGC;
+ if((ret = (*pScreen->CreateGC)(pGC))) {
+ PanoramiXGCPtr pGCPriv = (PanoramiXGCPtr)
+ dixLookupPrivate(&pGC->devPrivates, PanoramiXGCKey);
+
+ pGCPriv->wrapFuncs = pGC->funcs;
+ pGC->funcs = &XineramaGCFuncs;
+
+ pGCPriv->clipOrg.x = pGC->clipOrg.x;
+ pGCPriv->clipOrg.y = pGC->clipOrg.y;
+ pGCPriv->patOrg.x = pGC->patOrg.x;
+ pGCPriv->patOrg.y = pGC->patOrg.y;
+ }
+ pScreen->CreateGC = XineramaCreateGC;
+
+ return ret;
+}
+
+static void
+XineramaValidateGC(
+ GCPtr pGC,
+ unsigned long changes,
+ DrawablePtr pDraw
+){
+ Xinerama_GC_FUNC_PROLOGUE (pGC);
+
+ if((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr)pDraw)->parent)) {
+ /* the root window */
+ int x_off = pGC->pScreen->x;
+ int y_off = pGC->pScreen->y;
+ int new_val;
+
+ new_val = pGCPriv->clipOrg.x - x_off;
+ if(pGC->clipOrg.x != new_val) {
+ pGC->clipOrg.x = new_val;
+ changes |= GCClipXOrigin;
+ }
+ new_val = pGCPriv->clipOrg.y - y_off;
+ if(pGC->clipOrg.y != new_val) {
+ pGC->clipOrg.y = new_val;
+ changes |= GCClipYOrigin;
+ }
+ new_val = pGCPriv->patOrg.x - x_off;
+ if(pGC->patOrg.x != new_val) {
+ pGC->patOrg.x = new_val;
+ changes |= GCTileStipXOrigin;
+ }
+ new_val = pGCPriv->patOrg.y - y_off;
+ if(pGC->patOrg.y != new_val) {
+ pGC->patOrg.y = new_val;
+ changes |= GCTileStipYOrigin;
+ }
+ } else {
+ if(pGC->clipOrg.x != pGCPriv->clipOrg.x) {
+ pGC->clipOrg.x = pGCPriv->clipOrg.x;
+ changes |= GCClipXOrigin;
+ }
+ if(pGC->clipOrg.y != pGCPriv->clipOrg.y) {
+ pGC->clipOrg.y = pGCPriv->clipOrg.y;
+ changes |= GCClipYOrigin;
+ }
+ if(pGC->patOrg.x != pGCPriv->patOrg.x) {
+ pGC->patOrg.x = pGCPriv->patOrg.x;
+ changes |= GCTileStipXOrigin;
+ }
+ if(pGC->patOrg.y != pGCPriv->patOrg.y) {
+ pGC->patOrg.y = pGCPriv->patOrg.y;
+ changes |= GCTileStipYOrigin;
+ }
+ }
+
+ (*pGC->funcs->ValidateGC)(pGC, changes, pDraw);
+ Xinerama_GC_FUNC_EPILOGUE (pGC);
+}
+
+static void
+XineramaDestroyGC(GCPtr pGC)
+{
+ Xinerama_GC_FUNC_PROLOGUE (pGC);
+ (*pGC->funcs->DestroyGC)(pGC);
+ Xinerama_GC_FUNC_EPILOGUE (pGC);
+}
+
+static void
+XineramaChangeGC (
+ GCPtr pGC,
+ unsigned long mask
+){
+ Xinerama_GC_FUNC_PROLOGUE (pGC);
+
+ if(mask & GCTileStipXOrigin)
+ pGCPriv->patOrg.x = pGC->patOrg.x;
+ if(mask & GCTileStipYOrigin)
+ pGCPriv->patOrg.y = pGC->patOrg.y;
+ if(mask & GCClipXOrigin)
+ pGCPriv->clipOrg.x = pGC->clipOrg.x;
+ if(mask & GCClipYOrigin)
+ pGCPriv->clipOrg.y = pGC->clipOrg.y;
+
+ (*pGC->funcs->ChangeGC) (pGC, mask);
+ Xinerama_GC_FUNC_EPILOGUE (pGC);
+}
+
+static void
+XineramaCopyGC (
+ GCPtr pGCSrc,
+ unsigned long mask,
+ GCPtr pGCDst
+){
+ PanoramiXGCPtr pSrcPriv = (PanoramiXGCPtr)
+ dixLookupPrivate(&pGCSrc->devPrivates, PanoramiXGCKey);
+ Xinerama_GC_FUNC_PROLOGUE (pGCDst);
+
+ if(mask & GCTileStipXOrigin)
+ pGCPriv->patOrg.x = pSrcPriv->patOrg.x;
+ if(mask & GCTileStipYOrigin)
+ pGCPriv->patOrg.y = pSrcPriv->patOrg.y;
+ if(mask & GCClipXOrigin)
+ pGCPriv->clipOrg.x = pSrcPriv->clipOrg.x;
+ if(mask & GCClipYOrigin)
+ pGCPriv->clipOrg.y = pSrcPriv->clipOrg.y;
+
+ (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst);
+ Xinerama_GC_FUNC_EPILOGUE (pGCDst);
+}
+
+static void
+XineramaChangeClip (
+ GCPtr pGC,
+ int type,
+ pointer pvalue,
+ int nrects
+){
+ Xinerama_GC_FUNC_PROLOGUE (pGC);
+ (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
+ Xinerama_GC_FUNC_EPILOGUE (pGC);
+}
+
+static void
+XineramaCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
+{
+ Xinerama_GC_FUNC_PROLOGUE (pgcDst);
+ (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc);
+ Xinerama_GC_FUNC_EPILOGUE (pgcDst);
+}
+
+static void
+XineramaDestroyClip(GCPtr pGC)
+{
+ Xinerama_GC_FUNC_PROLOGUE (pGC);
+ (* pGC->funcs->DestroyClip)(pGC);
+ Xinerama_GC_FUNC_EPILOGUE (pGC);
+}
+
+int
+XineramaDeleteResource(pointer data, XID id)
+{
+ free(data);
+ return 1;
+}
+
+typedef struct {
+ int screen;
+ int id;
+} PanoramiXSearchData;
+
+static Bool
+XineramaFindIDByScrnum(pointer resource, XID id, pointer privdata)
+{
+ PanoramiXRes *res = (PanoramiXRes*)resource;
+ PanoramiXSearchData *data = (PanoramiXSearchData*)privdata;
+
+ return res->info[data->screen].id == data->id;
+}
+
+PanoramiXRes *
+PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen)
+{
+ PanoramiXSearchData data;
+ pointer val;
+
+ if(!screen) {
+ dixLookupResourceByType(&val, id, type, serverClient, DixReadAccess);
+ return val;
+ }
+
+ data.screen = screen;
+ data.id = id;
+
+ return LookupClientResourceComplex(clients[CLIENT_ID(id)], type,
+ XineramaFindIDByScrnum, &data);
+}
+
+typedef struct _connect_callback_list {
+ void (*func)(void);
+ struct _connect_callback_list *next;
+} XineramaConnectionCallbackList;
+
+static XineramaConnectionCallbackList *ConnectionCallbackList = NULL;
+
+Bool
+XineramaRegisterConnectionBlockCallback(void (*func)(void))
+{
+ XineramaConnectionCallbackList *newlist;
+
+ if(!(newlist = malloc(sizeof(XineramaConnectionCallbackList))))
+ return FALSE;
+
+ newlist->next = ConnectionCallbackList;
+ newlist->func = func;
+ ConnectionCallbackList = newlist;
+
+ return TRUE;
+}
+
+static void XineramaInitData(ScreenPtr pScreen)
+{
+ int i, w, h;
+
+ RegionNull(&PanoramiXScreenRegion);
+ for (i = 0; i < PanoramiXNumScreens; i++) {
+ BoxRec TheBox;
+ RegionRec ScreenRegion;
+
+ pScreen = screenInfo.screens[i];
+
+ TheBox.x1 = pScreen->x;
+ TheBox.x2 = TheBox.x1 + pScreen->width;
+ TheBox.y1 = pScreen->y;
+ TheBox.y2 = TheBox.y1 + pScreen->height;
+
+ RegionInit(&ScreenRegion, &TheBox, 1);
+ RegionUnion(&PanoramiXScreenRegion, &PanoramiXScreenRegion,
+ &ScreenRegion);
+ RegionUninit(&ScreenRegion);
+ }
+
+ PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width;
+ PanoramiXPixHeight = screenInfo.screens[0]->y + screenInfo.screens[0]->height;
+
+ for (i = 1; i < PanoramiXNumScreens; i++) {
+ pScreen = screenInfo.screens[i];
+ w = pScreen->x + pScreen->width;
+ h = pScreen->y + pScreen->height;
+
+ if (PanoramiXPixWidth < w)
+ PanoramiXPixWidth = w;
+ if (PanoramiXPixHeight < h)
+ PanoramiXPixHeight = h;
+ }
+}
+
+void XineramaReinitData(ScreenPtr pScreen)
+{
+ RegionUninit(&PanoramiXScreenRegion);
+ XineramaInitData(pScreen);
+}
+
+/*
+ * PanoramiXExtensionInit():
+ * Called from InitExtensions in main().
+ * Register PanoramiXeen Extension
+ * Initialize global variables.
+ */
+
+void PanoramiXExtensionInit(int argc, char *argv[])
+{
+ int i;
+ Bool success = FALSE;
+ ExtensionEntry *extEntry;
+ ScreenPtr pScreen = screenInfo.screens[0];
+ PanoramiXScreenPtr pScreenPriv;
+
+ if (noPanoramiXExtension)
+ return;
+
+ if (!dixRegisterPrivateKey(&PanoramiXScreenKeyRec, PRIVATE_SCREEN, 0)) {
+ noPanoramiXExtension = TRUE;
+ return;
+ }
+
+ if (!dixRegisterPrivateKey(&PanoramiXGCKeyRec, PRIVATE_GC, sizeof(PanoramiXGCRec))) {
+ noPanoramiXExtension = TRUE;
+ return;
+ }
+
+ PanoramiXNumScreens = screenInfo.numScreens;
+ if (PanoramiXNumScreens == 1) { /* Only 1 screen */
+ noPanoramiXExtension = TRUE;
+ return;
+ }
+
+ while (panoramiXGeneration != serverGeneration) {
+ extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0,0,
+ ProcPanoramiXDispatch,
+ SProcPanoramiXDispatch, PanoramiXResetProc,
+ StandardMinorOpcode);
+ if (!extEntry)
+ break;
+
+ /*
+ * First make sure all the basic allocations succeed. If not,
+ * run in non-PanoramiXeen mode.
+ */
+
+ for (i = 0; i < PanoramiXNumScreens; i++) {
+ pScreen = screenInfo.screens[i];
+ pScreenPriv = malloc(sizeof(PanoramiXScreenRec));
+ dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey,
+ pScreenPriv);
+ if(!pScreenPriv) {
+ noPanoramiXExtension = TRUE;
+ return;
+ }
+
+ pScreenPriv->CreateGC = pScreen->CreateGC;
+ pScreenPriv->CloseScreen = pScreen->CloseScreen;
+
+ pScreen->CreateGC = XineramaCreateGC;
+ pScreen->CloseScreen = XineramaCloseScreen;
+ }
+
+ XRC_DRAWABLE = CreateNewResourceClass();
+ XRT_WINDOW = CreateNewResourceType(XineramaDeleteResource,
+ "XineramaWindow");
+ if (XRT_WINDOW)
+ XRT_WINDOW |= XRC_DRAWABLE;
+ XRT_PIXMAP = CreateNewResourceType(XineramaDeleteResource,
+ "XineramaPixmap");
+ if (XRT_PIXMAP)
+ XRT_PIXMAP |= XRC_DRAWABLE;
+ XRT_GC = CreateNewResourceType(XineramaDeleteResource,
+ "XineramaGC");
+ XRT_COLORMAP = CreateNewResourceType(XineramaDeleteResource,
+ "XineramaColormap");
+
+ if (XRT_WINDOW && XRT_PIXMAP && XRT_GC && XRT_COLORMAP) {
+ panoramiXGeneration = serverGeneration;
+ success = TRUE;
+ }
+ SetResourceTypeErrorValue(XRT_WINDOW, BadWindow);
+ SetResourceTypeErrorValue(XRT_PIXMAP, BadPixmap);
+ SetResourceTypeErrorValue(XRT_GC, BadGC);
+ SetResourceTypeErrorValue(XRT_COLORMAP, BadColor);
+ }
+
+ if (!success) {
+ noPanoramiXExtension = TRUE;
+ ErrorF(PANORAMIX_PROTOCOL_NAME " extension failed to initialize\n");
+ return;
+ }
+
+ XineramaInitData(pScreen);
+
+ /*
+ * Put our processes into the ProcVector
+ */
+
+ for (i = 256; i--; )
+ SavedProcVector[i] = ProcVector[i];
+
+ ProcVector[X_CreateWindow] = PanoramiXCreateWindow;
+ ProcVector[X_ChangeWindowAttributes] = PanoramiXChangeWindowAttributes;
+ ProcVector[X_DestroyWindow] = PanoramiXDestroyWindow;
+ ProcVector[X_DestroySubwindows] = PanoramiXDestroySubwindows;
+ ProcVector[X_ChangeSaveSet] = PanoramiXChangeSaveSet;
+ ProcVector[X_ReparentWindow] = PanoramiXReparentWindow;
+ ProcVector[X_MapWindow] = PanoramiXMapWindow;
+ ProcVector[X_MapSubwindows] = PanoramiXMapSubwindows;
+ ProcVector[X_UnmapWindow] = PanoramiXUnmapWindow;
+ ProcVector[X_UnmapSubwindows] = PanoramiXUnmapSubwindows;
+ ProcVector[X_ConfigureWindow] = PanoramiXConfigureWindow;
+ ProcVector[X_CirculateWindow] = PanoramiXCirculateWindow;
+ ProcVector[X_GetGeometry] = PanoramiXGetGeometry;
+ ProcVector[X_TranslateCoords] = PanoramiXTranslateCoords;
+ ProcVector[X_CreatePixmap] = PanoramiXCreatePixmap;
+ ProcVector[X_FreePixmap] = PanoramiXFreePixmap;
+ ProcVector[X_CreateGC] = PanoramiXCreateGC;
+ ProcVector[X_ChangeGC] = PanoramiXChangeGC;
+ ProcVector[X_CopyGC] = PanoramiXCopyGC;
+ ProcVector[X_SetDashes] = PanoramiXSetDashes;
+ ProcVector[X_SetClipRectangles] = PanoramiXSetClipRectangles;
+ ProcVector[X_FreeGC] = PanoramiXFreeGC;
+ ProcVector[X_ClearArea] = PanoramiXClearToBackground;
+ ProcVector[X_CopyArea] = PanoramiXCopyArea;
+ ProcVector[X_CopyPlane] = PanoramiXCopyPlane;
+ ProcVector[X_PolyPoint] = PanoramiXPolyPoint;
+ ProcVector[X_PolyLine] = PanoramiXPolyLine;
+ ProcVector[X_PolySegment] = PanoramiXPolySegment;
+ ProcVector[X_PolyRectangle] = PanoramiXPolyRectangle;
+ ProcVector[X_PolyArc] = PanoramiXPolyArc;
+ ProcVector[X_FillPoly] = PanoramiXFillPoly;
+ ProcVector[X_PolyFillRectangle] = PanoramiXPolyFillRectangle;
+ ProcVector[X_PolyFillArc] = PanoramiXPolyFillArc;
+ ProcVector[X_PutImage] = PanoramiXPutImage;
+ ProcVector[X_GetImage] = PanoramiXGetImage;
+ ProcVector[X_PolyText8] = PanoramiXPolyText8;
+ ProcVector[X_PolyText16] = PanoramiXPolyText16;
+ ProcVector[X_ImageText8] = PanoramiXImageText8;
+ ProcVector[X_ImageText16] = PanoramiXImageText16;
+ ProcVector[X_CreateColormap] = PanoramiXCreateColormap;
+ ProcVector[X_FreeColormap] = PanoramiXFreeColormap;
+ ProcVector[X_CopyColormapAndFree] = PanoramiXCopyColormapAndFree;
+ ProcVector[X_InstallColormap] = PanoramiXInstallColormap;
+ ProcVector[X_UninstallColormap] = PanoramiXUninstallColormap;
+ ProcVector[X_AllocColor] = PanoramiXAllocColor;
+ ProcVector[X_AllocNamedColor] = PanoramiXAllocNamedColor;
+ ProcVector[X_AllocColorCells] = PanoramiXAllocColorCells;
+ ProcVector[X_AllocColorPlanes] = PanoramiXAllocColorPlanes;
+ ProcVector[X_FreeColors] = PanoramiXFreeColors;
+ ProcVector[X_StoreColors] = PanoramiXStoreColors;
+ ProcVector[X_StoreNamedColor] = PanoramiXStoreNamedColor;
+
+ PanoramiXRenderInit ();
+#ifdef XFIXES
+ PanoramiXFixesInit ();
+#endif
+#ifdef COMPOSITE
+ PanoramiXCompositeInit ();
+#endif
+
+}
+
+extern Bool CreateConnectionBlock(void);
+
+Bool PanoramiXCreateConnectionBlock(void)
+{
+ int i, j, length;
+ Bool disableBackingStore = FALSE;
+ int old_width, old_height;
+ float width_mult, height_mult;
+ xWindowRoot *root;
+ xVisualType *visual;
+ xDepth *depth;
+ VisualPtr pVisual;
+ ScreenPtr pScreen;
+
+ /*
+ * Do normal CreateConnectionBlock but faking it for only one screen
+ */
+
+ if(!PanoramiXNumDepths) {
+ ErrorF("Xinerama error: No common visuals\n");
+ return FALSE;
+ }
+
+ for(i = 1; i < screenInfo.numScreens; i++) {
+ pScreen = screenInfo.screens[i];
+ if(pScreen->rootDepth != screenInfo.screens[0]->rootDepth) {
+ ErrorF("Xinerama error: Root window depths differ\n");
+ return FALSE;
+ }
+ if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport)
+ disableBackingStore = TRUE;
+ }
+
+ if (disableBackingStore) {
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ pScreen = screenInfo.screens[i];
+ pScreen->backingStoreSupport = NotUseful;
+ }
+ }
+
+ i = screenInfo.numScreens;
+ screenInfo.numScreens = 1;
+ if (!CreateConnectionBlock()) {
+ screenInfo.numScreens = i;
+ return FALSE;
+ }
+
+ screenInfo.numScreens = i;
+
+ root = (xWindowRoot *) (ConnectionInfo + connBlockScreenStart);
+ length = connBlockScreenStart + sizeof(xWindowRoot);
+
+ /* overwrite the connection block */
+ root->nDepths = PanoramiXNumDepths;
+
+ for (i = 0; i < PanoramiXNumDepths; i++) {
+ depth = (xDepth *) (ConnectionInfo + length);
+ depth->depth = PanoramiXDepths[i].depth;
+ depth->nVisuals = PanoramiXDepths[i].numVids;
+ length += sizeof(xDepth);
+ visual = (xVisualType *)(ConnectionInfo + length);
+
+ for (j = 0; j < depth->nVisuals; j++, visual++) {
+ visual->visualID = PanoramiXDepths[i].vids[j];
+
+ for (pVisual = PanoramiXVisuals;
+ pVisual->vid != visual->visualID;
+ pVisual++)
+ ;
+
+ visual->class = pVisual->class;
+ visual->bitsPerRGB = pVisual->bitsPerRGBValue;
+ visual->colormapEntries = pVisual->ColormapEntries;
+ visual->redMask = pVisual->redMask;
+ visual->greenMask = pVisual->greenMask;
+ visual->blueMask = pVisual->blueMask;
+ }
+
+ length += (depth->nVisuals * sizeof(xVisualType));
+ }
+
+ connSetupPrefix.length = bytes_to_int32(length);
+
+ for (i = 0; i < PanoramiXNumDepths; i++)
+ free(PanoramiXDepths[i].vids);
+ free(PanoramiXDepths);
+ PanoramiXDepths = NULL;
+
+ /*
+ * OK, change some dimensions so it looks as if it were one big screen
+ */
+
+ old_width = root->pixWidth;
+ old_height = root->pixHeight;
+
+ root->pixWidth = PanoramiXPixWidth;
+ root->pixHeight = PanoramiXPixHeight;
+ width_mult = (1.0 * root->pixWidth) / old_width;
+ height_mult = (1.0 * root->pixHeight) / old_height;
+ root->mmWidth *= width_mult;
+ root->mmHeight *= height_mult;
+
+ while(ConnectionCallbackList) {
+ pointer tmp;
+
+ tmp = (pointer)ConnectionCallbackList;
+ (*ConnectionCallbackList->func)();
+ ConnectionCallbackList = ConnectionCallbackList->next;
+ free(tmp);
+ }
+
+ return TRUE;
+}
+
+/*
+ * This isn't just memcmp(), bitsPerRGBValue is skipped. markv made that
+ * change way back before xf86 4.0, but the comment for _why_ is a bit
+ * opaque, so I'm not going to question it for now.
+ *
+ * This is probably better done as a screen hook so DBE/EVI/GLX can add
+ * their own tests, and adding privates to VisualRec so they don't have to
+ * do their own back-mapping.
+ */
+static Bool
+VisualsEqual(VisualPtr a, ScreenPtr pScreenB, VisualPtr b)
+{
+ return ((a->class == b->class) &&
+ (a->ColormapEntries == b->ColormapEntries) &&
+ (a->nplanes == b->nplanes) &&
+ (a->redMask == b->redMask) &&
+ (a->greenMask == b->greenMask) &&
+ (a->blueMask == b->blueMask) &&
+ (a->offsetRed == b->offsetRed) &&
+ (a->offsetGreen == b->offsetGreen) &&
+ (a->offsetBlue == b->offsetBlue));
+}
+
+static void
+PanoramiXMaybeAddDepth(DepthPtr pDepth)
+{
+ ScreenPtr pScreen;
+ int j, k;
+ Bool found = FALSE;
+
+ for (j = 1; j < PanoramiXNumScreens; j++) {
+ pScreen = screenInfo.screens[j];
+ for (k = 0; k < pScreen->numDepths; k++) {
+ if (pScreen->allowedDepths[k].depth == pDepth->depth) {
+ found = TRUE;
+ break;
+ }
+ }
+ }
+
+ if (!found)
+ return;
+
+ j = PanoramiXNumDepths;
+ PanoramiXNumDepths++;
+ PanoramiXDepths = realloc(PanoramiXDepths,
+ PanoramiXNumDepths * sizeof(DepthRec));
+ PanoramiXDepths[j].depth = pDepth->depth;
+ PanoramiXDepths[j].numVids = 0;
+ /* XXX suboptimal, should grow these dynamically */
+ if(pDepth->numVids)
+ PanoramiXDepths[j].vids = malloc(sizeof(VisualID) * pDepth->numVids);
+ else
+ PanoramiXDepths[j].vids = NULL;
+}
+
+static void
+PanoramiXMaybeAddVisual(VisualPtr pVisual)
+{
+ ScreenPtr pScreen;
+ int j, k;
+ Bool found = FALSE;
+
+ for (j = 1; j < PanoramiXNumScreens; j++) {
+ pScreen = screenInfo.screens[j];
+ found = FALSE;
+
+ for (k = 0; k < pScreen->numVisuals; k++) {
+ VisualPtr candidate = &pScreen->visuals[k];
+
+ if ((*XineramaVisualsEqualPtr)(pVisual, pScreen, candidate)
+#ifdef GLXPROXY
+ && glxMatchVisual(screenInfo.screens[0], pVisual, pScreen)
+#endif
+ ) {
+ found = TRUE;
+ break;
+ }
+ }
+
+ if (!found)
+ return;
+ }
+
+ /* found a matching visual on all screens, add it to the subset list */
+ j = PanoramiXNumVisuals;
+ PanoramiXNumVisuals++;
+ PanoramiXVisuals = realloc(PanoramiXVisuals,
+ PanoramiXNumVisuals * sizeof(VisualRec));
+
+ memcpy(&PanoramiXVisuals[j], pVisual, sizeof(VisualRec));
+
+ for (k = 0; k < PanoramiXNumDepths; k++) {
+ if (PanoramiXDepths[k].depth == pVisual->nplanes) {
+ PanoramiXDepths[k].vids[PanoramiXDepths[k].numVids] = pVisual->vid;
+ PanoramiXDepths[k].numVids++;
+ break;
+ }
+ }
+}
+
+extern void
+PanoramiXConsolidate(void)
+{
+ int i;
+ PanoramiXRes *root, *defmap, *saver;
+ ScreenPtr pScreen = screenInfo.screens[0];
+ DepthPtr pDepth = pScreen->allowedDepths;
+ VisualPtr pVisual = pScreen->visuals;
+
+ PanoramiXNumDepths = 0;
+ PanoramiXNumVisuals = 0;
+
+ for (i = 0; i < pScreen->numDepths; i++)
+ PanoramiXMaybeAddDepth(pDepth++);
+
+ for (i = 0; i < pScreen->numVisuals; i++)
+ PanoramiXMaybeAddVisual(pVisual++);
+
+ root = malloc(sizeof(PanoramiXRes));
+ root->type = XRT_WINDOW;
+ defmap = malloc(sizeof(PanoramiXRes));
+ defmap->type = XRT_COLORMAP;
+ saver = malloc(sizeof(PanoramiXRes));
+ saver->type = XRT_WINDOW;
+
+ for (i = 0; i < PanoramiXNumScreens; i++) {
+ ScreenPtr pScreen = screenInfo.screens[i];
+ root->info[i].id = pScreen->root->drawable.id;
+ root->u.win.class = InputOutput;
+ root->u.win.root = TRUE;
+ saver->info[i].id = pScreen->screensaver.wid;
+ saver->u.win.class = InputOutput;
+ saver->u.win.root = TRUE;
+ defmap->info[i].id = pScreen->defColormap;
+ }
+
+ AddResource(root->info[0].id, XRT_WINDOW, root);
+ AddResource(saver->info[0].id, XRT_WINDOW, saver);
+ AddResource(defmap->info[0].id, XRT_COLORMAP, defmap);
+}
+
+VisualID
+PanoramiXTranslateVisualID(int screen, VisualID orig)
+{
+ ScreenPtr pOtherScreen = screenInfo.screens[screen];
+ VisualPtr pVisual = NULL;
+ int i;
+
+ for (i = 0; i < PanoramiXNumVisuals; i++) {
+ if (orig == PanoramiXVisuals[i].vid) {
+ pVisual = &PanoramiXVisuals[i];
+ break;
+ }
+ }
+
+ if (!pVisual)
+ return 0;
+
+ /* if screen is 0, orig is already the correct visual ID */
+ if (screen == 0)
+ return orig;
+
+ /* found the original, now translate it relative to the backend screen */
+ for (i = 0; i < pOtherScreen->numVisuals; i++) {
+ VisualPtr pOtherVisual = &pOtherScreen->visuals[i];
+
+ if ((*XineramaVisualsEqualPtr)(pVisual, pOtherScreen, pOtherVisual))
+ return pOtherVisual->vid;
+ }
+
+ return 0;
+}
+
+
+/*
+ * PanoramiXResetProc()
+ * Exit, deallocating as needed.
+ */
+
+static void PanoramiXResetProc(ExtensionEntry* extEntry)
+{
+ int i;
+
+ PanoramiXRenderReset ();
+#ifdef XFIXES
+ PanoramiXFixesReset ();
+#endif
+ screenInfo.numScreens = PanoramiXNumScreens;
+ for (i = 256; i--; )
+ ProcVector[i] = SavedProcVector[i];
+}
+
+
+int
+ProcPanoramiXQueryVersion (ClientPtr client)
+{
+ /* REQUEST(xPanoramiXQueryVersionReq); */
+ xPanoramiXQueryVersionReply rep;
+ register int n;
+
+ REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.majorVersion = SERVER_PANORAMIX_MAJOR_VERSION;
+ rep.minorVersion = SERVER_PANORAMIX_MINOR_VERSION;
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ swaps(&rep.majorVersion, n);
+ swaps(&rep.minorVersion, n);
+ }
+ WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep);
+ return Success;
+}
+
+int
+ProcPanoramiXGetState(ClientPtr client)
+{
+ REQUEST(xPanoramiXGetStateReq);
+ WindowPtr pWin;
+ xPanoramiXGetStateReply rep;
+ int n, rc;
+
+ REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.state = !noPanoramiXExtension;
+ rep.window = stuff->window;
+ if (client->swapped) {
+ swaps (&rep.sequenceNumber, n);
+ swapl (&rep.length, n);
+ swapl (&rep.window, n);
+ }
+ WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
+ return Success;
+
+}
+
+int
+ProcPanoramiXGetScreenCount(ClientPtr client)
+{
+ REQUEST(xPanoramiXGetScreenCountReq);
+ WindowPtr pWin;
+ xPanoramiXGetScreenCountReply rep;
+ int n, rc;
+
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.ScreenCount = PanoramiXNumScreens;
+ rep.window = stuff->window;
+ if (client->swapped) {
+ swaps (&rep.sequenceNumber, n);
+ swapl (&rep.length, n);
+ swapl (&rep.window, n);
+ }
+ WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep);
+ return Success;
+}
+
+int
+ProcPanoramiXGetScreenSize(ClientPtr client)
+{
+ REQUEST(xPanoramiXGetScreenSizeReq);
+ WindowPtr pWin;
+ xPanoramiXGetScreenSizeReply rep;
+ int n, rc;
+
+ if (stuff->screen >= PanoramiXNumScreens)
+ return BadMatch;
+
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ /* screen dimensions */
+ rep.width = screenInfo.screens[stuff->screen]->width;
+ rep.height = screenInfo.screens[stuff->screen]->height;
+ rep.window = stuff->window;
+ rep.screen = stuff->screen;
+ if (client->swapped) {
+ swaps (&rep.sequenceNumber, n);
+ swapl (&rep.length, n);
+ swapl (&rep.width, n);
+ swapl (&rep.height, n);
+ swapl (&rep.window, n);
+ swapl (&rep.screen, n);
+ }
+ WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep);
+ return Success;
+}
+
+
+int
+ProcXineramaIsActive(ClientPtr client)
+{
+ /* REQUEST(xXineramaIsActiveReq); */
+ xXineramaIsActiveReply rep;
+
+ REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
+
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+#if 1
+ {
+ /* The following hack fools clients into thinking that Xinerama
+ * is disabled even though it is not. */
+ rep.state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack;
+ }
+#else
+ rep.state = !noPanoramiXExtension;
+#endif
+ if (client->swapped) {
+ int n;
+ swaps (&rep.sequenceNumber, n);
+ swapl (&rep.length, n);
+ swapl (&rep.state, n);
+ }
+ WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
+ return Success;
+}
+
+
+int
+ProcXineramaQueryScreens(ClientPtr client)
+{
+ /* REQUEST(xXineramaQueryScreensReq); */
+ xXineramaQueryScreensReply rep;
+
+ REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
+ rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
+ if (client->swapped) {
+ int n;
+ swaps (&rep.sequenceNumber, n);
+ swapl (&rep.length, n);
+ swapl (&rep.number, n);
+ }
+ WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep);
+
+ if(!noPanoramiXExtension) {
+ xXineramaScreenInfo scratch;
+ int i;
+
+ for(i = 0; i < PanoramiXNumScreens; i++) {
+ scratch.x_org = screenInfo.screens[i]->x;
+ scratch.y_org = screenInfo.screens[i]->y;
+ scratch.width = screenInfo.screens[i]->width;
+ scratch.height = screenInfo.screens[i]->height;
+
+ if(client->swapped) {
+ int n;
+ swaps (&scratch.x_org, n);
+ swaps (&scratch.y_org, n);
+ swaps (&scratch.width, n);
+ swaps (&scratch.height, n);
+ }
+ WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
+ }
+ }
+
+ return Success;
+}
+
+
+static int
+ProcPanoramiXDispatch (ClientPtr client)
+{ REQUEST(xReq);
+ switch (stuff->data)
+ {
+ case X_PanoramiXQueryVersion:
+ return ProcPanoramiXQueryVersion(client);
+ case X_PanoramiXGetState:
+ return ProcPanoramiXGetState(client);
+ case X_PanoramiXGetScreenCount:
+ return ProcPanoramiXGetScreenCount(client);
+ case X_PanoramiXGetScreenSize:
+ return ProcPanoramiXGetScreenSize(client);
+ case X_XineramaIsActive:
+ return ProcXineramaIsActive(client);
+ case X_XineramaQueryScreens:
+ return ProcXineramaQueryScreens(client);
+ }
+ return BadRequest;
+}
+
+
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+#define SHIFT_L(v,s) (v) << (s)
+#define SHIFT_R(v,s) (v) >> (s)
+#else
+#define SHIFT_L(v,s) (v) >> (s)
+#define SHIFT_R(v,s) (v) << (s)
+#endif
+
+static void
+CopyBits(char *dst, int shiftL, char *src, int bytes)
+{
+ /* Just get it to work. Worry about speed later */
+ int shiftR = 8 - shiftL;
+
+ while(bytes--) {
+ *dst |= SHIFT_L(*src, shiftL);
+ *(dst + 1) |= SHIFT_R(*src, shiftR);
+ dst++; src++;
+ }
+}
+
+
+/* Caution. This doesn't support 2 and 4 bpp formats. We expect
+ 1 bpp and planar data to be already cleared when presented
+ to this function */
+
+void
+XineramaGetImageData(
+ DrawablePtr *pDrawables,
+ int left,
+ int top,
+ int width,
+ int height,
+ unsigned int format,
+ unsigned long planemask,
+ char *data,
+ int pitch,
+ Bool isRoot
+){
+ RegionRec SrcRegion, ScreenRegion, GrabRegion;
+ BoxRec SrcBox, *pbox;
+ int x, y, w, h, i, j, nbox, size, sizeNeeded, ScratchPitch, inOut, depth;
+ DrawablePtr pDraw = pDrawables[0];
+ char *ScratchMem = NULL;
+
+ size = 0;
+
+ /* find box in logical screen space */
+ SrcBox.x1 = left;
+ SrcBox.y1 = top;
+ if(!isRoot) {
+ SrcBox.x1 += pDraw->x + screenInfo.screens[0]->x;
+ SrcBox.y1 += pDraw->y + screenInfo.screens[0]->y;
+ }
+ SrcBox.x2 = SrcBox.x1 + width;
+ SrcBox.y2 = SrcBox.y1 + height;
+
+ RegionInit(&SrcRegion, &SrcBox, 1);
+ RegionNull(&GrabRegion);
+
+ depth = (format == XYPixmap) ? 1 : pDraw->depth;
+
+ for(i = 0; i < PanoramiXNumScreens; i++) {
+ BoxRec TheBox;
+ ScreenPtr pScreen;
+ pDraw = pDrawables[i];
+ pScreen = pDraw->pScreen;
+
+ TheBox.x1 = pScreen->x;
+ TheBox.x2 = TheBox.x1 + pScreen->width;
+ TheBox.y1 = pScreen->y;
+ TheBox.y2 = TheBox.y1 + pScreen->height;
+
+ RegionInit(&ScreenRegion, &TheBox, 1);
+ inOut = RegionContainsRect(&ScreenRegion, &SrcBox);
+ if(inOut == rgnPART)
+ RegionIntersect(&GrabRegion, &SrcRegion, &ScreenRegion);
+ RegionUninit(&ScreenRegion);
+
+ if(inOut == rgnIN) {
+ (*pScreen->GetImage)(pDraw,
+ SrcBox.x1 - pDraw->x - screenInfo.screens[i]->x,
+ SrcBox.y1 - pDraw->y - screenInfo.screens[i]->y,
+ width, height, format, planemask, data);
+ break;
+ } else if (inOut == rgnOUT)
+ continue;
+
+ nbox = RegionNumRects(&GrabRegion);
+
+ if(nbox) {
+ pbox = RegionRects(&GrabRegion);
+
+ while(nbox--) {
+ w = pbox->x2 - pbox->x1;
+ h = pbox->y2 - pbox->y1;
+ ScratchPitch = PixmapBytePad(w, depth);
+ sizeNeeded = ScratchPitch * h;
+
+ if(sizeNeeded > size) {
+ char *tmpdata = ScratchMem;
+ ScratchMem = realloc(ScratchMem, sizeNeeded);
+ if(ScratchMem)
+ size = sizeNeeded;
+ else {
+ ScratchMem = tmpdata;
+ break;
+ }
+ }
+
+ x = pbox->x1 - pDraw->x - screenInfo.screens[i]->x;
+ y = pbox->y1 - pDraw->y - screenInfo.screens[i]->y;
+
+ (*pScreen->GetImage)(pDraw, x, y, w, h,
+ format, planemask, ScratchMem);
+
+ /* copy the memory over */
+
+ if(depth == 1) {
+ int k, shift, leftover, index, index2;
+
+ x = pbox->x1 - SrcBox.x1;
+ y = pbox->y1 - SrcBox.y1;
+ shift = x & 7;
+ x >>= 3;
+ leftover = w & 7;
+ w >>= 3;
+
+ /* clean up the edge */
+ if(leftover) {
+ int mask = (1 << leftover) - 1;
+ for(j = h, k = w; j--; k += ScratchPitch)
+ ScratchMem[k] &= mask;
+ }
+
+ for(j = 0, index = (pitch * y) + x, index2 = 0; j < h;
+ j++, index += pitch, index2 += ScratchPitch)
+ {
+ if(w) {
+ if(!shift)
+ memcpy(data + index, ScratchMem + index2, w);
+ else
+ CopyBits(data + index, shift,
+ ScratchMem + index2, w);
+ }
+
+ if(leftover) {
+ data[index + w] |=
+ SHIFT_L(ScratchMem[index2 + w], shift);
+ if((shift + leftover) > 8)
+ data[index + w + 1] |=
+ SHIFT_R(ScratchMem[index2 + w],(8 - shift));
+ }
+ }
+ } else {
+ j = BitsPerPixel(depth) >> 3;
+ x = (pbox->x1 - SrcBox.x1) * j;
+ y = pbox->y1 - SrcBox.y1;
+ w *= j;
+
+ for(j = 0; j < h; j++) {
+ memcpy(data + (pitch * (y + j)) + x,
+ ScratchMem + (ScratchPitch * j), w);
+ }
+ }
+ pbox++;
+ }
+
+ RegionSubtract(&SrcRegion, &SrcRegion, &GrabRegion);
+ if(!RegionNotEmpty(&SrcRegion))
+ break;
+ }
+
+ }
+
+ free(ScratchMem);
+
+ RegionUninit(&SrcRegion);
+ RegionUninit(&GrabRegion);
+}
diff --git a/xorg-server/Xext/panoramiXsrv.h b/xorg-server/Xext/panoramiXsrv.h
index 9751feb54..21f1b4cb8 100644
--- a/xorg-server/Xext/panoramiXsrv.h
+++ b/xorg-server/Xext/panoramiXsrv.h
@@ -1,54 +1,54 @@
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _PANORAMIXSRV_H_
-#define _PANORAMIXSRV_H_
-
-#include "panoramiX.h"
-
-extern _X_EXPORT int PanoramiXNumScreens;
-extern _X_EXPORT int PanoramiXPixWidth;
-extern _X_EXPORT int PanoramiXPixHeight;
-
-extern _X_EXPORT VisualID PanoramiXTranslateVisualID(int screen, VisualID orig);
-extern _X_EXPORT void PanoramiXConsolidate(void);
-extern _X_EXPORT Bool PanoramiXCreateConnectionBlock(void);
-extern _X_EXPORT PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int);
-extern _X_EXPORT Bool XineramaRegisterConnectionBlockCallback(void (*func)(void));
-extern _X_EXPORT int XineramaDeleteResource(pointer, XID);
-
-extern _X_EXPORT void XineramaReinitData(ScreenPtr);
-
-extern _X_EXPORT RESTYPE XRC_DRAWABLE;
-extern _X_EXPORT RESTYPE XRT_WINDOW;
-extern _X_EXPORT RESTYPE XRT_PIXMAP;
-extern _X_EXPORT RESTYPE XRT_GC;
-extern _X_EXPORT RESTYPE XRT_COLORMAP;
-extern _X_EXPORT RESTYPE XRT_PICTURE;
-
-/*
- * Drivers are allowed to wrap this function. Each wrapper can decide that the
- * two visuals are unequal, but if they are deemed equal, the wrapper must call
- * down and return FALSE if the wrapped function does. This ensures that all
- * layers agree that the visuals are equal. The first visual is always from
- * screen 0.
- */
-typedef Bool (*XineramaVisualsEqualProcPtr)(VisualPtr, ScreenPtr, VisualPtr);
-extern _X_EXPORT XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr;
-
-extern _X_EXPORT void XineramaGetImageData(
- DrawablePtr *pDrawables,
- int left,
- int top,
- int width,
- int height,
- unsigned int format,
- unsigned long planemask,
- char *data,
- int pitch,
- Bool isRoot
-);
-
-#endif /* _PANORAMIXSRV_H_ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _PANORAMIXSRV_H_
+#define _PANORAMIXSRV_H_
+
+#include "panoramiX.h"
+
+extern _X_EXPORT int PanoramiXNumScreens;
+extern _X_EXPORT int PanoramiXPixWidth;
+extern _X_EXPORT int PanoramiXPixHeight;
+
+extern _X_EXPORT VisualID PanoramiXTranslateVisualID(int screen, VisualID orig);
+extern _X_EXPORT void PanoramiXConsolidate(void);
+extern _X_EXPORT Bool PanoramiXCreateConnectionBlock(void);
+extern _X_EXPORT PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int);
+extern _X_EXPORT Bool XineramaRegisterConnectionBlockCallback(void (*func)(void));
+extern _X_EXPORT int XineramaDeleteResource(pointer, XID);
+
+extern _X_EXPORT void XineramaReinitData(ScreenPtr);
+
+extern _X_EXPORT RESTYPE XRC_DRAWABLE;
+extern _X_EXPORT RESTYPE XRT_WINDOW;
+extern _X_EXPORT RESTYPE XRT_PIXMAP;
+extern _X_EXPORT RESTYPE XRT_GC;
+extern _X_EXPORT RESTYPE XRT_COLORMAP;
+extern _X_EXPORT RESTYPE XRT_PICTURE;
+
+/*
+ * Drivers are allowed to wrap this function. Each wrapper can decide that the
+ * two visuals are unequal, but if they are deemed equal, the wrapper must call
+ * down and return FALSE if the wrapped function does. This ensures that all
+ * layers agree that the visuals are equal. The first visual is always from
+ * screen 0.
+ */
+typedef Bool (*XineramaVisualsEqualProcPtr)(VisualPtr, ScreenPtr, VisualPtr);
+extern _X_EXPORT XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr;
+
+extern _X_EXPORT void XineramaGetImageData(
+ DrawablePtr *pDrawables,
+ int left,
+ int top,
+ int width,
+ int height,
+ unsigned int format,
+ unsigned long planemask,
+ char *data,
+ int pitch,
+ Bool isRoot
+);
+
+#endif /* _PANORAMIXSRV_H_ */
diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c
index 3b8b6de59..5fd6c895d 100644
--- a/xorg-server/Xext/saver.c
+++ b/xorg-server/Xext/saver.c
@@ -29,6 +29,12 @@ in this Software without prior written authorization from the X Consortium.
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+#define SCREENSAVER
+#endif
+
+#ifdef CreateWindow
+#undef CreateWindow
#endif
#include <X11/X.h>
diff --git a/xorg-server/Xext/security.c b/xorg-server/Xext/security.c
index d687926c6..ad6f9a3ef 100644
--- a/xorg-server/Xext/security.c
+++ b/xorg-server/Xext/security.c
@@ -26,6 +26,8 @@ in this Software without prior written authorization from The Open Group.
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+#define XACE
#endif
#include "scrnintstr.h"
diff --git a/xorg-server/Xext/securitysrv.h b/xorg-server/Xext/securitysrv.h
index 3d3894a18..68f51d2f5 100644
--- a/xorg-server/Xext/securitysrv.h
+++ b/xorg-server/Xext/securitysrv.h
@@ -31,10 +31,7 @@ from The Open Group.
#define _SECURITY_SRV_H
/* Allow client side portions of <X11/extensions/security.h> to compile */
-#ifndef Status
-# define Status int
-# define NEED_UNDEF_Status
-#endif
+typedef int Status;
#ifndef Display
# define Display void
# define NEED_UNDEF_Display
diff --git a/xorg-server/Xext/shape.c b/xorg-server/Xext/shape.c
index 79dc77635..6a35a0451 100644
--- a/xorg-server/Xext/shape.c
+++ b/xorg-server/Xext/shape.c
@@ -26,6 +26,8 @@ in this Software without prior written authorization from The Open Group.
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+#define SHAPE
#endif
#include <stdlib.h>
diff --git a/xorg-server/Xext/shm.c b/xorg-server/Xext/shm.c
index 8a048deb0..7099e8f36 100644
--- a/xorg-server/Xext/shm.c
+++ b/xorg-server/Xext/shm.c
@@ -34,8 +34,10 @@ in this Software without prior written authorization from The Open Group.
#endif
#include <sys/types.h>
+#if !defined(_MSC_VER)
#include <sys/ipc.h>
#include <sys/shm.h>
+#endif
#include <unistd.h>
#include <sys/stat.h>
#include <X11/X.h>
@@ -300,8 +302,10 @@ ProcShmQueryVersion(ClientPtr client)
rep.pixmapFormat = sharedPixmaps ? ZPixmap : 0;
rep.majorVersion = SERVER_SHM_MAJOR_VERSION;
rep.minorVersion = SERVER_SHM_MINOR_VERSION;
+#ifndef _MSC_VER
rep.uid = geteuid();
rep.gid = getegid();
+#endif
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);
@@ -351,6 +355,9 @@ shm_access(ClientPtr client, SHMPERM_TYPE *perm, int readonly)
if (uid == 0) {
return 0;
}
+ #ifdef _MSC_VER
+ __asm int 3;
+ #else
/* Check the owner */
if (SHMPERM_UID(perm) == uid || SHMPERM_CUID(perm) == uid) {
mask = S_IRUSR;
@@ -359,10 +366,14 @@ shm_access(ClientPtr client, SHMPERM_TYPE *perm, int readonly)
}
return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1;
}
+ #endif
}
if (gidset) {
/* Check the group */
+ #ifdef _MSC_VER
+ __asm int 3;
+ #else
if (SHMPERM_GID(perm) == gid || SHMPERM_CGID(perm) == gid) {
mask = S_IRGRP;
if (!readonly) {
@@ -370,14 +381,20 @@ shm_access(ClientPtr client, SHMPERM_TYPE *perm, int readonly)
}
return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1;
}
+ #endif
}
}
+ #ifdef _MSC_VER
+ __asm int 3;
+ return -1;
+ #else
/* Otherwise, check everyone else */
mask = S_IROTH;
if (!readonly) {
mask |= S_IWOTH;
}
return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1;
+ #endif
}
static int
@@ -450,7 +467,9 @@ ShmDetachSegment(pointer value, /* must conform to DeleteType */
if (--shmdesc->refcnt)
return TRUE;
+#ifndef _MSC_VER
shmdt(shmdesc->addr);
+#endif
for (prev = &Shmsegs; *prev != shmdesc; prev = &(*prev)->next)
;
*prev = shmdesc->next;
diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c
index 4f80c7f30..60bcfe8d8 100644
--- a/xorg-server/Xext/sync.c
+++ b/xorg-server/Xext/sync.c
@@ -1235,6 +1235,10 @@ FreeAwait(void *addr, XID id)
return Success;
}
+#ifdef _MSC_VER
+#pragma warning(disable:4715) /* Not all control paths return a value */
+#endif
+
/* loosely based on dix/events.c/OtherClientGone */
static int
FreeAlarmClient(void *value, XID id)
diff --git a/xorg-server/Xext/xace.c b/xorg-server/Xext/xace.c
index 28c51687c..77b713ffb 100644
--- a/xorg-server/Xext/xace.c
+++ b/xorg-server/Xext/xace.c
@@ -19,6 +19,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+#define XACE
#endif
#include <stdarg.h>
diff --git a/xorg-server/Xext/xselinux_hooks.c b/xorg-server/Xext/xselinux_hooks.c
index f1d8e5d2f..1c048bd68 100644
--- a/xorg-server/Xext/xselinux_hooks.c
+++ b/xorg-server/Xext/xselinux_hooks.c
@@ -1,935 +1,935 @@
-/************************************************************
-
-Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-this permission notice appear in supporting documentation. This permission
-notice shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-********************************************************/
-
-/*
- * Portions of this code copyright (c) 2005 by Trusted Computer Solutions, Inc.
- * All rights reserved.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <sys/socket.h>
-#include <stdio.h>
-#include <stdarg.h>
-
-#include <libaudit.h>
-
-#include <X11/Xatom.h>
-#include "selection.h"
-#include "inputstr.h"
-#include "scrnintstr.h"
-#include "windowstr.h"
-#include "propertyst.h"
-#include "extnsionst.h"
-#include "xacestr.h"
-#include "client.h"
-#include "../os/osdep.h"
-#define _XSELINUX_NEED_FLASK_MAP
-#include "xselinuxint.h"
-
-
-/* structure passed to auditing callback */
-typedef struct {
- ClientPtr client; /* client */
- DeviceIntPtr dev; /* device */
- char *command; /* client's executable path */
- unsigned id; /* resource id, if any */
- int restype; /* resource type, if any */
- int event; /* event type, if any */
- Atom property; /* property name, if any */
- Atom selection; /* selection name, if any */
- char *extension; /* extension name, if any */
-} SELinuxAuditRec;
-
-/* private state keys */
-DevPrivateKeyRec subjectKeyRec;
-DevPrivateKeyRec objectKeyRec;
-DevPrivateKeyRec dataKeyRec;
-
-/* audit file descriptor */
-static int audit_fd;
-
-/* atoms for window label properties */
-static Atom atom_ctx;
-static Atom atom_client_ctx;
-
-/* The unlabeled SID */
-static security_id_t unlabeled_sid;
-
-/* forward declarations */
-static void SELinuxScreen(CallbackListPtr *, pointer, pointer);
-
-/* "true" pointer value for use as callback data */
-static pointer truep = (pointer)1;
-
-
-/*
- * Performs an SELinux permission check.
- */
-static int
-SELinuxDoCheck(SELinuxSubjectRec *subj, SELinuxObjectRec *obj,
- security_class_t class, Mask mode, SELinuxAuditRec *auditdata)
-{
- /* serverClient requests OK */
- if (subj->privileged)
- return Success;
-
- auditdata->command = subj->command;
- errno = 0;
-
- if (avc_has_perm(subj->sid, obj->sid, class, mode, &subj->aeref,
- auditdata) < 0) {
- if (mode == DixUnknownAccess)
- return Success; /* DixUnknownAccess requests OK ... for now */
- if (errno == EACCES)
- return BadAccess;
- ErrorF("SELinux: avc_has_perm: unexpected error %d\n", errno);
- return BadValue;
- }
-
- return Success;
-}
-
-/*
- * Labels a newly connected client.
- */
-static void
-SELinuxLabelClient(ClientPtr client)
-{
- int fd = XaceGetConnectionNumber(client);
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj;
- security_context_t ctx;
-
- subj = dixLookupPrivate(&client->devPrivates, subjectKey);
- obj = dixLookupPrivate(&client->devPrivates, objectKey);
-
- /* Try to get a context from the socket */
- if (fd < 0 || getpeercon_raw(fd, &ctx) < 0) {
- /* Otherwise, fall back to a default context */
- ctx = SELinuxDefaultClientLabel();
- }
-
- /* For local clients, try and determine the executable name */
- if (XaceIsLocal(client)) {
- /* Get cached command name if CLIENTIDS is enabled. */
- const char *cmdname = GetClientCmdName(client);
- Bool cached = (cmdname != NULL);
- /* If CLIENTIDS is disabled, figure out the command name from
- * scratch. */
- if (!cmdname)
- {
- pid_t pid = DetermineClientPid(client);
- if (pid != -1)
- DetermineClientCmd(pid, &cmdname, NULL);
- }
-
- if (!cmdname)
- goto finish;
-
- strncpy(subj->command, cmdname, COMMAND_LEN - 1);
-
- if (!cached)
- free((void *) cmdname); /* const char * */
- }
-
-finish:
- /* Get a SID from the context */
- if (avc_context_to_sid_raw(ctx, &subj->sid) < 0)
- FatalError("SELinux: client %d: context_to_sid_raw(%s) failed\n",
- client->index, ctx);
-
- obj->sid = subj->sid;
- freecon(ctx);
-}
-
-/*
- * Labels initial server objects.
- */
-static void
-SELinuxLabelInitial(void)
-{
- int i;
- XaceScreenAccessRec srec;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj;
- security_context_t ctx;
- pointer unused;
-
- /* Do the serverClient */
- subj = dixLookupPrivate(&serverClient->devPrivates, subjectKey);
- obj = dixLookupPrivate(&serverClient->devPrivates, objectKey);
- subj->privileged = 1;
-
- /* Use the context of the X server process for the serverClient */
- if (getcon_raw(&ctx) < 0)
- FatalError("SELinux: couldn't get context of X server process\n");
-
- /* Get a SID from the context */
- if (avc_context_to_sid_raw(ctx, &subj->sid) < 0)
- FatalError("SELinux: serverClient: context_to_sid(%s) failed\n", ctx);
-
- obj->sid = subj->sid;
- freecon(ctx);
-
- srec.client = serverClient;
- srec.access_mode = DixCreateAccess;
- srec.status = Success;
-
- for (i = 0; i < screenInfo.numScreens; i++) {
- /* Do the screen object */
- srec.screen = screenInfo.screens[i];
- SELinuxScreen(NULL, NULL, &srec);
-
- /* Do the default colormap */
- dixLookupResourceByType(&unused, screenInfo.screens[i]->defColormap,
- RT_COLORMAP, serverClient, DixCreateAccess);
- }
-}
-
-/*
- * Labels new resource objects.
- */
-static int
-SELinuxLabelResource(XaceResourceAccessRec *rec, SELinuxSubjectRec *subj,
- SELinuxObjectRec *obj, security_class_t class)
-{
- int offset;
- security_id_t tsid;
-
- /* Check for a create context */
- if (rec->rtype & RC_DRAWABLE && subj->win_create_sid) {
- obj->sid = subj->win_create_sid;
- return Success;
- }
-
- if (rec->parent)
- offset = dixLookupPrivateOffset(rec->ptype);
-
- if (rec->parent && offset >= 0) {
- /* Use the SID of the parent object in the labeling operation */
- PrivateRec **privatePtr = DEVPRIV_AT(rec->parent, offset);
- SELinuxObjectRec *pobj = dixLookupPrivate(privatePtr, objectKey);
- tsid = pobj->sid;
- } else {
- /* Use the SID of the subject */
- tsid = subj->sid;
- }
-
- /* Perform a transition to obtain the final SID */
- if (avc_compute_create(subj->sid, tsid, class, &obj->sid) < 0) {
- ErrorF("SELinux: a compute_create call failed!\n");
- return BadValue;
- }
-
- return Success;
-}
-
-
-/*
- * Libselinux Callbacks
- */
-
-static int
-SELinuxAudit(void *auditdata,
- security_class_t class,
- char *msgbuf,
- size_t msgbufsize)
-{
- SELinuxAuditRec *audit = auditdata;
- ClientPtr client = audit->client;
- char idNum[16];
- const char *propertyName, *selectionName;
- int major = -1, minor = -1;
-
- if (client) {
- REQUEST(xReq);
- if (stuff) {
- major = stuff->reqType;
- minor = MinorOpcodeOfRequest(client);
- }
- }
- if (audit->id)
- snprintf(idNum, 16, "%x", audit->id);
-
- propertyName = audit->property ? NameForAtom(audit->property) : NULL;
- selectionName = audit->selection ? NameForAtom(audit->selection) : NULL;
-
- return snprintf(msgbuf, msgbufsize,
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
- (major >= 0) ? "request=" : "",
- (major >= 0) ? LookupRequestName(major, minor) : "",
- audit->command ? " comm=" : "",
- audit->command ? audit->command : "",
- audit->dev ? " xdevice=\"" : "",
- audit->dev ? audit->dev->name : "",
- audit->dev ? "\"" : "",
- audit->id ? " resid=" : "",
- audit->id ? idNum : "",
- audit->restype ? " restype=" : "",
- audit->restype ? LookupResourceName(audit->restype) : "",
- audit->event ? " event=" : "",
- audit->event ? LookupEventName(audit->event & 127) : "",
- audit->property ? " property=" : "",
- audit->property ? propertyName : "",
- audit->selection ? " selection=" : "",
- audit->selection ? selectionName : "",
- audit->extension ? " extension=" : "",
- audit->extension ? audit->extension : "");
-}
-
-static int
-SELinuxLog(int type, const char *fmt, ...)
-{
- va_list ap;
- char buf[MAX_AUDIT_MESSAGE_LENGTH];
- int rc, aut;
-
- switch (type) {
- case SELINUX_INFO:
- aut = AUDIT_USER_MAC_POLICY_LOAD;
- break;
- case SELINUX_AVC:
- aut = AUDIT_USER_AVC;
- break;
- default:
- aut = AUDIT_USER_SELINUX_ERR;
- break;
- }
-
- va_start(ap, fmt);
- vsnprintf(buf, MAX_AUDIT_MESSAGE_LENGTH, fmt, ap);
- rc = audit_log_user_avc_message(audit_fd, aut, buf, NULL, NULL, NULL, 0);
- va_end(ap);
- LogMessageVerb(X_WARNING, 0, "%s", buf);
- return 0;
-}
-
-/*
- * XACE Callbacks
- */
-
-static void
-SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- XaceDeviceAccessRec *rec = calldata;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj;
- SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev };
- security_class_t cls;
- int rc;
-
- subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
- obj = dixLookupPrivate(&rec->dev->devPrivates, objectKey);
-
- /* If this is a new object that needs labeling, do it now */
- if (rec->access_mode & DixCreateAccess) {
- SELinuxSubjectRec *dsubj;
- dsubj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey);
-
- if (subj->dev_create_sid) {
- /* Label the device with the create context */
- obj->sid = subj->dev_create_sid;
- dsubj->sid = subj->dev_create_sid;
- } else {
- /* Label the device directly with the process SID */
- obj->sid = subj->sid;
- dsubj->sid = subj->sid;
- }
- }
-
- cls = IsPointerDevice(rec->dev) ? SECCLASS_X_POINTER : SECCLASS_X_KEYBOARD;
- rc = SELinuxDoCheck(subj, obj, cls, rec->access_mode, &auditdata);
- if (rc != Success)
- rec->status = rc;
-}
-
-static void
-SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- XaceSendAccessRec *rec = calldata;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj, ev_sid;
- SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev };
- security_class_t class;
- int rc, i, type;
-
- if (rec->dev)
- subj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey);
- else
- subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
-
- obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey);
-
- /* Check send permission on window */
- rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixSendAccess,
- &auditdata);
- if (rc != Success)
- goto err;
-
- /* Check send permission on specific event types */
- for (i = 0; i < rec->count; i++) {
- type = rec->events[i].u.u.type;
- class = (type & 128) ? SECCLASS_X_FAKEEVENT : SECCLASS_X_EVENT;
-
- rc = SELinuxEventToSID(type, obj->sid, &ev_sid);
- if (rc != Success)
- goto err;
-
- auditdata.event = type;
- rc = SELinuxDoCheck(subj, &ev_sid, class, DixSendAccess, &auditdata);
- if (rc != Success)
- goto err;
- }
- return;
-err:
- rec->status = rc;
-}
-
-static void
-SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- XaceReceiveAccessRec *rec = calldata;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj, ev_sid;
- SELinuxAuditRec auditdata = { .client = NULL };
- security_class_t class;
- int rc, i, type;
-
- subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
- obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey);
-
- /* Check receive permission on window */
- rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixReceiveAccess,
- &auditdata);
- if (rc != Success)
- goto err;
-
- /* Check receive permission on specific event types */
- for (i = 0; i < rec->count; i++) {
- type = rec->events[i].u.u.type;
- class = (type & 128) ? SECCLASS_X_FAKEEVENT : SECCLASS_X_EVENT;
-
- rc = SELinuxEventToSID(type, obj->sid, &ev_sid);
- if (rc != Success)
- goto err;
-
- auditdata.event = type;
- rc = SELinuxDoCheck(subj, &ev_sid, class, DixReceiveAccess, &auditdata);
- if (rc != Success)
- goto err;
- }
- return;
-err:
- rec->status = rc;
-}
-
-static void
-SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- XaceExtAccessRec *rec = calldata;
- SELinuxSubjectRec *subj, *serv;
- SELinuxObjectRec *obj;
- SELinuxAuditRec auditdata = { .client = rec->client };
- int rc;
-
- subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
- obj = dixLookupPrivate(&rec->ext->devPrivates, objectKey);
-
- /* If this is a new object that needs labeling, do it now */
- /* XXX there should be a separate callback for this */
- if (obj->sid == NULL) {
- security_id_t sid;
-
- serv = dixLookupPrivate(&serverClient->devPrivates, subjectKey);
- rc = SELinuxExtensionToSID(rec->ext->name, &sid);
- if (rc != Success) {
- rec->status = rc;
- return;
- }
-
- /* Perform a transition to obtain the final SID */
- if (avc_compute_create(serv->sid, sid, SECCLASS_X_EXTENSION,
- &obj->sid) < 0) {
- ErrorF("SELinux: a SID transition call failed!\n");
- rec->status = BadValue;
- return;
- }
- }
-
- /* Perform the security check */
- auditdata.extension = rec->ext->name;
- rc = SELinuxDoCheck(subj, obj, SECCLASS_X_EXTENSION, rec->access_mode,
- &auditdata);
- if (rc != Success)
- rec->status = rc;
-}
-
-static void
-SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- XaceSelectionAccessRec *rec = calldata;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj, *data;
- Selection *pSel = *rec->ppSel;
- Atom name = pSel->selection;
- Mask access_mode = rec->access_mode;
- SELinuxAuditRec auditdata = { .client = rec->client, .selection = name };
- security_id_t tsid;
- int rc;
-
- subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
- obj = dixLookupPrivate(&pSel->devPrivates, objectKey);
-
- /* If this is a new object that needs labeling, do it now */
- if (access_mode & DixCreateAccess) {
- rc = SELinuxSelectionToSID(name, subj, &obj->sid, &obj->poly);
- if (rc != Success)
- obj->sid = unlabeled_sid;
- access_mode = DixSetAttrAccess;
- }
- /* If this is a polyinstantiated object, find the right instance */
- else if (obj->poly) {
- rc = SELinuxSelectionToSID(name, subj, &tsid, NULL);
- if (rc != Success) {
- rec->status = rc;
- return;
- }
- while (pSel->selection != name || obj->sid != tsid) {
- if ((pSel = pSel->next) == NULL)
- break;
- obj = dixLookupPrivate(&pSel->devPrivates, objectKey);
- }
-
- if (pSel)
- *rec->ppSel = pSel;
- else {
- rec->status = BadMatch;
- return;
- }
- }
-
- /* Perform the security check */
- rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SELECTION, access_mode,
- &auditdata);
- if (rc != Success)
- rec->status = rc;
-
- /* Label the content (advisory only) */
- if (access_mode & DixSetAttrAccess) {
- data = dixLookupPrivate(&pSel->devPrivates, dataKey);
- if (subj->sel_create_sid)
- data->sid = subj->sel_create_sid;
- else
- data->sid = obj->sid;
- }
-}
-
-static void
-SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- XacePropertyAccessRec *rec = calldata;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj, *data;
- PropertyPtr pProp = *rec->ppProp;
- Atom name = pProp->propertyName;
- SELinuxAuditRec auditdata = { .client = rec->client, .property = name };
- security_id_t tsid;
- int rc;
-
- /* Don't care about the new content check */
- if (rec->access_mode & DixPostAccess)
- return;
-
- subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
- obj = dixLookupPrivate(&pProp->devPrivates, objectKey);
-
- /* If this is a new object that needs labeling, do it now */
- if (rec->access_mode & DixCreateAccess) {
- rc = SELinuxPropertyToSID(name, subj, &obj->sid, &obj->poly);
- if (rc != Success) {
- rec->status = rc;
- return;
- }
- }
- /* If this is a polyinstantiated object, find the right instance */
- else if (obj->poly) {
- rc = SELinuxPropertyToSID(name, subj, &tsid, NULL);
- if (rc != Success) {
- rec->status = rc;
- return;
- }
- while (pProp->propertyName != name || obj->sid != tsid) {
- if ((pProp = pProp->next) == NULL)
- break;
- obj = dixLookupPrivate(&pProp->devPrivates, objectKey);
- }
-
- if (pProp)
- *rec->ppProp = pProp;
- else {
- rec->status = BadMatch;
- return;
- }
- }
-
- /* Perform the security check */
- rc = SELinuxDoCheck(subj, obj, SECCLASS_X_PROPERTY, rec->access_mode,
- &auditdata);
- if (rc != Success)
- rec->status = rc;
-
- /* Label the content (advisory only) */
- if (rec->access_mode & DixWriteAccess) {
- data = dixLookupPrivate(&pProp->devPrivates, dataKey);
- if (subj->prp_create_sid)
- data->sid = subj->prp_create_sid;
- else
- data->sid = obj->sid;
- }
-}
-
-static void
-SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- XaceResourceAccessRec *rec = calldata;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj;
- SELinuxAuditRec auditdata = { .client = rec->client };
- Mask access_mode = rec->access_mode;
- PrivateRec **privatePtr;
- security_class_t class;
- int rc, offset;
-
- subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
-
- /* Determine if the resource object has a devPrivates field */
- offset = dixLookupPrivateOffset(rec->rtype);
- if (offset < 0) {
- /* No: use the SID of the owning client */
- class = SECCLASS_X_RESOURCE;
- privatePtr = &clients[CLIENT_ID(rec->id)]->devPrivates;
- obj = dixLookupPrivate(privatePtr, objectKey);
- } else {
- /* Yes: use the SID from the resource object itself */
- class = SELinuxTypeToClass(rec->rtype);
- privatePtr = DEVPRIV_AT(rec->res, offset);
- obj = dixLookupPrivate(privatePtr, objectKey);
- }
-
- /* If this is a new object that needs labeling, do it now */
- if (access_mode & DixCreateAccess && offset >= 0) {
- rc = SELinuxLabelResource(rec, subj, obj, class);
- if (rc != Success) {
- rec->status = rc;
- return;
- }
- }
-
- /* Collapse generic resource permissions down to read/write */
- if (class == SECCLASS_X_RESOURCE) {
- access_mode = !!(rec->access_mode & SELinuxReadMask); /* rd */
- access_mode |= !!(rec->access_mode & ~SELinuxReadMask) << 1; /* wr */
- }
-
- /* Perform the security check */
- auditdata.restype = rec->rtype;
- auditdata.id = rec->id;
- rc = SELinuxDoCheck(subj, obj, class, access_mode, &auditdata);
- if (rc != Success)
- rec->status = rc;
-
- /* Perform the background none check on windows */
- if (access_mode & DixCreateAccess && rec->rtype == RT_WINDOW) {
- rc = SELinuxDoCheck(subj, obj, class, DixBlendAccess, &auditdata);
- if (rc != Success)
- ((WindowPtr)rec->res)->forcedBG = TRUE;
- }
-}
-
-static void
-SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata)
-{
- XaceScreenAccessRec *rec = calldata;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj;
- SELinuxAuditRec auditdata = { .client = rec->client };
- Mask access_mode = rec->access_mode;
- int rc;
-
- subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
- obj = dixLookupPrivate(&rec->screen->devPrivates, objectKey);
-
- /* If this is a new object that needs labeling, do it now */
- if (access_mode & DixCreateAccess) {
- /* Perform a transition to obtain the final SID */
- if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SCREEN,
- &obj->sid) < 0) {
- ErrorF("SELinux: a compute_create call failed!\n");
- rec->status = BadValue;
- return;
- }
- }
-
- if (is_saver)
- access_mode <<= 2;
-
- rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SCREEN, access_mode, &auditdata);
- if (rc != Success)
- rec->status = rc;
-}
-
-static void
-SELinuxClient(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- XaceClientAccessRec *rec = calldata;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj;
- SELinuxAuditRec auditdata = { .client = rec->client };
- int rc;
-
- subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
- obj = dixLookupPrivate(&rec->target->devPrivates, objectKey);
-
- rc = SELinuxDoCheck(subj, obj, SECCLASS_X_CLIENT, rec->access_mode,
- &auditdata);
- if (rc != Success)
- rec->status = rc;
-}
-
-static void
-SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- XaceServerAccessRec *rec = calldata;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj;
- SELinuxAuditRec auditdata = { .client = rec->client };
- int rc;
-
- subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
- obj = dixLookupPrivate(&serverClient->devPrivates, objectKey);
-
- rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SERVER, rec->access_mode,
- &auditdata);
- if (rc != Success)
- rec->status = rc;
-}
-
-
-/*
- * DIX Callbacks
- */
-
-static void
-SELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- NewClientInfoRec *pci = calldata;
-
- switch (pci->client->clientState) {
- case ClientStateInitial:
- SELinuxLabelClient(pci->client);
- break;
-
- default:
- break;
- }
-}
-
-static void
-SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
- ResourceStateInfoRec *rec = calldata;
- SELinuxSubjectRec *subj;
- SELinuxObjectRec *obj;
- WindowPtr pWin;
-
- if (rec->type != RT_WINDOW)
- return;
- if (rec->state != ResourceStateAdding)
- return;
-
- pWin = (WindowPtr)rec->value;
- subj = dixLookupPrivate(&wClient(pWin)->devPrivates, subjectKey);
-
- if (subj->sid) {
- security_context_t ctx;
- int rc = avc_sid_to_context_raw(subj->sid, &ctx);
- if (rc < 0)
- FatalError("SELinux: Failed to get security context!\n");
- rc = dixChangeWindowProperty(serverClient,
- pWin, atom_client_ctx, XA_STRING, 8,
- PropModeReplace, strlen(ctx), ctx, FALSE);
- if (rc != Success)
- FatalError("SELinux: Failed to set label property on window!\n");
- freecon(ctx);
- } else
- FatalError("SELinux: Unexpected unlabeled client found\n");
-
- obj = dixLookupPrivate(&pWin->devPrivates, objectKey);
-
- if (obj->sid) {
- security_context_t ctx;
- int rc = avc_sid_to_context_raw(obj->sid, &ctx);
- if (rc < 0)
- FatalError("SELinux: Failed to get security context!\n");
- rc = dixChangeWindowProperty(serverClient,
- pWin, atom_ctx, XA_STRING, 8,
- PropModeReplace, strlen(ctx), ctx, FALSE);
- if (rc != Success)
- FatalError("SELinux: Failed to set label property on window!\n");
- freecon(ctx);
- } else
- FatalError("SELinux: Unexpected unlabeled window found\n");
-}
-
-
-static int netlink_fd;
-
-static void
-SELinuxBlockHandler(void *data, struct timeval **tv, void *read_mask)
-{
-}
-
-static void
-SELinuxWakeupHandler(void *data, int err, void *read_mask)
-{
- if (FD_ISSET(netlink_fd, (fd_set *)read_mask))
- avc_netlink_check_nb();
-}
-
-void
-SELinuxFlaskReset(void)
-{
- /* Unregister callbacks */
- DeleteCallback(&ClientStateCallback, SELinuxClientState, NULL);
- DeleteCallback(&ResourceStateCallback, SELinuxResourceState, NULL);
-
- XaceDeleteCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL);
- XaceDeleteCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL);
- XaceDeleteCallback(XACE_DEVICE_ACCESS, SELinuxDevice, NULL);
- XaceDeleteCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, NULL);
- XaceDeleteCallback(XACE_SEND_ACCESS, SELinuxSend, NULL);
- XaceDeleteCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, NULL);
- XaceDeleteCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL);
- XaceDeleteCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL);
- XaceDeleteCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL);
- XaceDeleteCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL);
- XaceDeleteCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL);
- XaceDeleteCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep);
-
- /* Tear down SELinux stuff */
- audit_close(audit_fd);
- avc_netlink_release_fd();
- RemoveBlockAndWakeupHandlers(SELinuxBlockHandler, SELinuxWakeupHandler,
- NULL);
- RemoveGeneralSocket(netlink_fd);
-
- avc_destroy();
-}
-
-void
-SELinuxFlaskInit(void)
-{
- struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *)0 };
- security_context_t ctx;
- int ret = TRUE;
-
- switch(selinuxEnforcingState) {
- case SELINUX_MODE_ENFORCING:
- LogMessage(X_INFO, "SELinux: Configured in enforcing mode\n");
- avc_option.value = (char *)1;
- break;
- case SELINUX_MODE_PERMISSIVE:
- LogMessage(X_INFO, "SELinux: Configured in permissive mode\n");
- avc_option.value = (char *)0;
- break;
- default:
- avc_option.type = AVC_OPT_UNUSED;
- break;
- }
-
- /* Set up SELinux stuff */
- selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback)SELinuxLog);
- selinux_set_callback(SELINUX_CB_AUDIT, (union selinux_callback)SELinuxAudit);
-
- if (selinux_set_mapping(map) < 0) {
- if (errno == EINVAL) {
- ErrorF("SELinux: Invalid object class mapping, disabling SELinux support.\n");
- return;
- }
- FatalError("SELinux: Failed to set up security class mapping\n");
- }
-
- if (avc_open(&avc_option, 1) < 0)
- FatalError("SELinux: Couldn't initialize SELinux userspace AVC\n");
-
- if (security_get_initial_context_raw("unlabeled", &ctx) < 0)
- FatalError("SELinux: Failed to look up unlabeled context\n");
- if (avc_context_to_sid_raw(ctx, &unlabeled_sid) < 0)
- FatalError("SELinux: a context_to_SID call failed!\n");
- freecon(ctx);
-
- /* Prepare for auditing */
- audit_fd = audit_open();
- if (audit_fd < 0)
- FatalError("SELinux: Failed to open the system audit log\n");
-
- /* Allocate private storage */
- if (!dixRegisterPrivateKey(subjectKey, PRIVATE_XSELINUX, sizeof(SELinuxSubjectRec)) ||
- !dixRegisterPrivateKey(objectKey, PRIVATE_XSELINUX, sizeof(SELinuxObjectRec)) ||
- !dixRegisterPrivateKey(dataKey, PRIVATE_XSELINUX, sizeof(SELinuxObjectRec)))
- FatalError("SELinux: Failed to allocate private storage.\n");
-
- /* Create atoms for doing window labeling */
- atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, TRUE);
- if (atom_ctx == BAD_RESOURCE)
- FatalError("SELinux: Failed to create atom\n");
- atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, TRUE);
- if (atom_client_ctx == BAD_RESOURCE)
- FatalError("SELinux: Failed to create atom\n");
-
- netlink_fd = avc_netlink_acquire_fd();
- AddGeneralSocket(netlink_fd);
- RegisterBlockAndWakeupHandlers(SELinuxBlockHandler, SELinuxWakeupHandler,
- NULL);
-
- /* Register callbacks */
- ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL);
- ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL);
-
- ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL);
- ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL);
- ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SELinuxDevice, NULL);
- ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, NULL);
- ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SELinuxSend, NULL);
- ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, NULL);
- ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL);
- ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL);
- ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL);
- ret &= XaceRegisterCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL);
- ret &= XaceRegisterCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL);
- ret &= XaceRegisterCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep);
- if (!ret)
- FatalError("SELinux: Failed to register one or more callbacks\n");
-
- /* Label objects that were created before we could register ourself */
- SELinuxLabelInitial();
-}
+/************************************************************
+
+Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+this permission notice appear in supporting documentation. This permission
+notice shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+********************************************************/
+
+/*
+ * Portions of this code copyright (c) 2005 by Trusted Computer Solutions, Inc.
+ * All rights reserved.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <sys/socket.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#include <libaudit.h>
+
+#include <X11/Xatom.h>
+#include "selection.h"
+#include "inputstr.h"
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include "propertyst.h"
+#include "extnsionst.h"
+#include "xacestr.h"
+#include "client.h"
+#include "../os/osdep.h"
+#define _XSELINUX_NEED_FLASK_MAP
+#include "xselinuxint.h"
+
+
+/* structure passed to auditing callback */
+typedef struct {
+ ClientPtr client; /* client */
+ DeviceIntPtr dev; /* device */
+ char *command; /* client's executable path */
+ unsigned id; /* resource id, if any */
+ int restype; /* resource type, if any */
+ int event; /* event type, if any */
+ Atom property; /* property name, if any */
+ Atom selection; /* selection name, if any */
+ char *extension; /* extension name, if any */
+} SELinuxAuditRec;
+
+/* private state keys */
+DevPrivateKeyRec subjectKeyRec;
+DevPrivateKeyRec objectKeyRec;
+DevPrivateKeyRec dataKeyRec;
+
+/* audit file descriptor */
+static int audit_fd;
+
+/* atoms for window label properties */
+static Atom atom_ctx;
+static Atom atom_client_ctx;
+
+/* The unlabeled SID */
+static security_id_t unlabeled_sid;
+
+/* forward declarations */
+static void SELinuxScreen(CallbackListPtr *, pointer, pointer);
+
+/* "true" pointer value for use as callback data */
+static pointer truep = (pointer)1;
+
+
+/*
+ * Performs an SELinux permission check.
+ */
+static int
+SELinuxDoCheck(SELinuxSubjectRec *subj, SELinuxObjectRec *obj,
+ security_class_t class, Mask mode, SELinuxAuditRec *auditdata)
+{
+ /* serverClient requests OK */
+ if (subj->privileged)
+ return Success;
+
+ auditdata->command = subj->command;
+ errno = 0;
+
+ if (avc_has_perm(subj->sid, obj->sid, class, mode, &subj->aeref,
+ auditdata) < 0) {
+ if (mode == DixUnknownAccess)
+ return Success; /* DixUnknownAccess requests OK ... for now */
+ if (errno == EACCES)
+ return BadAccess;
+ ErrorF("SELinux: avc_has_perm: unexpected error %d\n", errno);
+ return BadValue;
+ }
+
+ return Success;
+}
+
+/*
+ * Labels a newly connected client.
+ */
+static void
+SELinuxLabelClient(ClientPtr client)
+{
+ int fd = XaceGetConnectionNumber(client);
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj;
+ security_context_t ctx;
+
+ subj = dixLookupPrivate(&client->devPrivates, subjectKey);
+ obj = dixLookupPrivate(&client->devPrivates, objectKey);
+
+ /* Try to get a context from the socket */
+ if (fd < 0 || getpeercon_raw(fd, &ctx) < 0) {
+ /* Otherwise, fall back to a default context */
+ ctx = SELinuxDefaultClientLabel();
+ }
+
+ /* For local clients, try and determine the executable name */
+ if (XaceIsLocal(client)) {
+ /* Get cached command name if CLIENTIDS is enabled. */
+ const char *cmdname = GetClientCmdName(client);
+ Bool cached = (cmdname != NULL);
+ /* If CLIENTIDS is disabled, figure out the command name from
+ * scratch. */
+ if (!cmdname)
+ {
+ pid_t pid = DetermineClientPid(client);
+ if (pid != -1)
+ DetermineClientCmd(pid, &cmdname, NULL);
+ }
+
+ if (!cmdname)
+ goto finish;
+
+ strncpy(subj->command, cmdname, COMMAND_LEN - 1);
+
+ if (!cached)
+ free((void *) cmdname); /* const char * */
+ }
+
+finish:
+ /* Get a SID from the context */
+ if (avc_context_to_sid_raw(ctx, &subj->sid) < 0)
+ FatalError("SELinux: client %d: context_to_sid_raw(%s) failed\n",
+ client->index, ctx);
+
+ obj->sid = subj->sid;
+ freecon(ctx);
+}
+
+/*
+ * Labels initial server objects.
+ */
+static void
+SELinuxLabelInitial(void)
+{
+ int i;
+ XaceScreenAccessRec srec;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj;
+ security_context_t ctx;
+ pointer unused;
+
+ /* Do the serverClient */
+ subj = dixLookupPrivate(&serverClient->devPrivates, subjectKey);
+ obj = dixLookupPrivate(&serverClient->devPrivates, objectKey);
+ subj->privileged = 1;
+
+ /* Use the context of the X server process for the serverClient */
+ if (getcon_raw(&ctx) < 0)
+ FatalError("SELinux: couldn't get context of X server process\n");
+
+ /* Get a SID from the context */
+ if (avc_context_to_sid_raw(ctx, &subj->sid) < 0)
+ FatalError("SELinux: serverClient: context_to_sid(%s) failed\n", ctx);
+
+ obj->sid = subj->sid;
+ freecon(ctx);
+
+ srec.client = serverClient;
+ srec.access_mode = DixCreateAccess;
+ srec.status = Success;
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ /* Do the screen object */
+ srec.screen = screenInfo.screens[i];
+ SELinuxScreen(NULL, NULL, &srec);
+
+ /* Do the default colormap */
+ dixLookupResourceByType(&unused, screenInfo.screens[i]->defColormap,
+ RT_COLORMAP, serverClient, DixCreateAccess);
+ }
+}
+
+/*
+ * Labels new resource objects.
+ */
+static int
+SELinuxLabelResource(XaceResourceAccessRec *rec, SELinuxSubjectRec *subj,
+ SELinuxObjectRec *obj, security_class_t class)
+{
+ int offset;
+ security_id_t tsid;
+
+ /* Check for a create context */
+ if (rec->rtype & RC_DRAWABLE && subj->win_create_sid) {
+ obj->sid = subj->win_create_sid;
+ return Success;
+ }
+
+ if (rec->parent)
+ offset = dixLookupPrivateOffset(rec->ptype);
+
+ if (rec->parent && offset >= 0) {
+ /* Use the SID of the parent object in the labeling operation */
+ PrivateRec **privatePtr = DEVPRIV_AT(rec->parent, offset);
+ SELinuxObjectRec *pobj = dixLookupPrivate(privatePtr, objectKey);
+ tsid = pobj->sid;
+ } else {
+ /* Use the SID of the subject */
+ tsid = subj->sid;
+ }
+
+ /* Perform a transition to obtain the final SID */
+ if (avc_compute_create(subj->sid, tsid, class, &obj->sid) < 0) {
+ ErrorF("SELinux: a compute_create call failed!\n");
+ return BadValue;
+ }
+
+ return Success;
+}
+
+
+/*
+ * Libselinux Callbacks
+ */
+
+static int
+SELinuxAudit(void *auditdata,
+ security_class_t class,
+ char *msgbuf,
+ size_t msgbufsize)
+{
+ SELinuxAuditRec *audit = auditdata;
+ ClientPtr client = audit->client;
+ char idNum[16];
+ const char *propertyName, *selectionName;
+ int major = -1, minor = -1;
+
+ if (client) {
+ REQUEST(xReq);
+ if (stuff) {
+ major = stuff->reqType;
+ minor = MinorOpcodeOfRequest(client);
+ }
+ }
+ if (audit->id)
+ snprintf(idNum, 16, "%x", audit->id);
+
+ propertyName = audit->property ? NameForAtom(audit->property) : NULL;
+ selectionName = audit->selection ? NameForAtom(audit->selection) : NULL;
+
+ return snprintf(msgbuf, msgbufsize,
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+ (major >= 0) ? "request=" : "",
+ (major >= 0) ? LookupRequestName(major, minor) : "",
+ audit->command ? " comm=" : "",
+ audit->command ? audit->command : "",
+ audit->dev ? " xdevice=\"" : "",
+ audit->dev ? audit->dev->name : "",
+ audit->dev ? "\"" : "",
+ audit->id ? " resid=" : "",
+ audit->id ? idNum : "",
+ audit->restype ? " restype=" : "",
+ audit->restype ? LookupResourceName(audit->restype) : "",
+ audit->event ? " event=" : "",
+ audit->event ? LookupEventName(audit->event & 127) : "",
+ audit->property ? " property=" : "",
+ audit->property ? propertyName : "",
+ audit->selection ? " selection=" : "",
+ audit->selection ? selectionName : "",
+ audit->extension ? " extension=" : "",
+ audit->extension ? audit->extension : "");
+}
+
+static int
+SELinuxLog(int type, const char *fmt, ...)
+{
+ va_list ap;
+ char buf[MAX_AUDIT_MESSAGE_LENGTH];
+ int rc, aut;
+
+ switch (type) {
+ case SELINUX_INFO:
+ aut = AUDIT_USER_MAC_POLICY_LOAD;
+ break;
+ case SELINUX_AVC:
+ aut = AUDIT_USER_AVC;
+ break;
+ default:
+ aut = AUDIT_USER_SELINUX_ERR;
+ break;
+ }
+
+ va_start(ap, fmt);
+ vsnprintf(buf, MAX_AUDIT_MESSAGE_LENGTH, fmt, ap);
+ rc = audit_log_user_avc_message(audit_fd, aut, buf, NULL, NULL, NULL, 0);
+ va_end(ap);
+ LogMessageVerb(X_WARNING, 0, "%s", buf);
+ return 0;
+}
+
+/*
+ * XACE Callbacks
+ */
+
+static void
+SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ XaceDeviceAccessRec *rec = calldata;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj;
+ SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev };
+ security_class_t cls;
+ int rc;
+
+ subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+ obj = dixLookupPrivate(&rec->dev->devPrivates, objectKey);
+
+ /* If this is a new object that needs labeling, do it now */
+ if (rec->access_mode & DixCreateAccess) {
+ SELinuxSubjectRec *dsubj;
+ dsubj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey);
+
+ if (subj->dev_create_sid) {
+ /* Label the device with the create context */
+ obj->sid = subj->dev_create_sid;
+ dsubj->sid = subj->dev_create_sid;
+ } else {
+ /* Label the device directly with the process SID */
+ obj->sid = subj->sid;
+ dsubj->sid = subj->sid;
+ }
+ }
+
+ cls = IsPointerDevice(rec->dev) ? SECCLASS_X_POINTER : SECCLASS_X_KEYBOARD;
+ rc = SELinuxDoCheck(subj, obj, cls, rec->access_mode, &auditdata);
+ if (rc != Success)
+ rec->status = rc;
+}
+
+static void
+SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ XaceSendAccessRec *rec = calldata;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj, ev_sid;
+ SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev };
+ security_class_t class;
+ int rc, i, type;
+
+ if (rec->dev)
+ subj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey);
+ else
+ subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+
+ obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey);
+
+ /* Check send permission on window */
+ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixSendAccess,
+ &auditdata);
+ if (rc != Success)
+ goto err;
+
+ /* Check send permission on specific event types */
+ for (i = 0; i < rec->count; i++) {
+ type = rec->events[i].u.u.type;
+ class = (type & 128) ? SECCLASS_X_FAKEEVENT : SECCLASS_X_EVENT;
+
+ rc = SELinuxEventToSID(type, obj->sid, &ev_sid);
+ if (rc != Success)
+ goto err;
+
+ auditdata.event = type;
+ rc = SELinuxDoCheck(subj, &ev_sid, class, DixSendAccess, &auditdata);
+ if (rc != Success)
+ goto err;
+ }
+ return;
+err:
+ rec->status = rc;
+}
+
+static void
+SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ XaceReceiveAccessRec *rec = calldata;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj, ev_sid;
+ SELinuxAuditRec auditdata = { .client = NULL };
+ security_class_t class;
+ int rc, i, type;
+
+ subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+ obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey);
+
+ /* Check receive permission on window */
+ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixReceiveAccess,
+ &auditdata);
+ if (rc != Success)
+ goto err;
+
+ /* Check receive permission on specific event types */
+ for (i = 0; i < rec->count; i++) {
+ type = rec->events[i].u.u.type;
+ class = (type & 128) ? SECCLASS_X_FAKEEVENT : SECCLASS_X_EVENT;
+
+ rc = SELinuxEventToSID(type, obj->sid, &ev_sid);
+ if (rc != Success)
+ goto err;
+
+ auditdata.event = type;
+ rc = SELinuxDoCheck(subj, &ev_sid, class, DixReceiveAccess, &auditdata);
+ if (rc != Success)
+ goto err;
+ }
+ return;
+err:
+ rec->status = rc;
+}
+
+static void
+SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ XaceExtAccessRec *rec = calldata;
+ SELinuxSubjectRec *subj, *serv;
+ SELinuxObjectRec *obj;
+ SELinuxAuditRec auditdata = { .client = rec->client };
+ int rc;
+
+ subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+ obj = dixLookupPrivate(&rec->ext->devPrivates, objectKey);
+
+ /* If this is a new object that needs labeling, do it now */
+ /* XXX there should be a separate callback for this */
+ if (obj->sid == NULL) {
+ security_id_t sid;
+
+ serv = dixLookupPrivate(&serverClient->devPrivates, subjectKey);
+ rc = SELinuxExtensionToSID(rec->ext->name, &sid);
+ if (rc != Success) {
+ rec->status = rc;
+ return;
+ }
+
+ /* Perform a transition to obtain the final SID */
+ if (avc_compute_create(serv->sid, sid, SECCLASS_X_EXTENSION,
+ &obj->sid) < 0) {
+ ErrorF("SELinux: a SID transition call failed!\n");
+ rec->status = BadValue;
+ return;
+ }
+ }
+
+ /* Perform the security check */
+ auditdata.extension = rec->ext->name;
+ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_EXTENSION, rec->access_mode,
+ &auditdata);
+ if (rc != Success)
+ rec->status = rc;
+}
+
+static void
+SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ XaceSelectionAccessRec *rec = calldata;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj, *data;
+ Selection *pSel = *rec->ppSel;
+ Atom name = pSel->selection;
+ Mask access_mode = rec->access_mode;
+ SELinuxAuditRec auditdata = { .client = rec->client, .selection = name };
+ security_id_t tsid;
+ int rc;
+
+ subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+ obj = dixLookupPrivate(&pSel->devPrivates, objectKey);
+
+ /* If this is a new object that needs labeling, do it now */
+ if (access_mode & DixCreateAccess) {
+ rc = SELinuxSelectionToSID(name, subj, &obj->sid, &obj->poly);
+ if (rc != Success)
+ obj->sid = unlabeled_sid;
+ access_mode = DixSetAttrAccess;
+ }
+ /* If this is a polyinstantiated object, find the right instance */
+ else if (obj->poly) {
+ rc = SELinuxSelectionToSID(name, subj, &tsid, NULL);
+ if (rc != Success) {
+ rec->status = rc;
+ return;
+ }
+ while (pSel->selection != name || obj->sid != tsid) {
+ if ((pSel = pSel->next) == NULL)
+ break;
+ obj = dixLookupPrivate(&pSel->devPrivates, objectKey);
+ }
+
+ if (pSel)
+ *rec->ppSel = pSel;
+ else {
+ rec->status = BadMatch;
+ return;
+ }
+ }
+
+ /* Perform the security check */
+ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SELECTION, access_mode,
+ &auditdata);
+ if (rc != Success)
+ rec->status = rc;
+
+ /* Label the content (advisory only) */
+ if (access_mode & DixSetAttrAccess) {
+ data = dixLookupPrivate(&pSel->devPrivates, dataKey);
+ if (subj->sel_create_sid)
+ data->sid = subj->sel_create_sid;
+ else
+ data->sid = obj->sid;
+ }
+}
+
+static void
+SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ XacePropertyAccessRec *rec = calldata;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj, *data;
+ PropertyPtr pProp = *rec->ppProp;
+ Atom name = pProp->propertyName;
+ SELinuxAuditRec auditdata = { .client = rec->client, .property = name };
+ security_id_t tsid;
+ int rc;
+
+ /* Don't care about the new content check */
+ if (rec->access_mode & DixPostAccess)
+ return;
+
+ subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+ obj = dixLookupPrivate(&pProp->devPrivates, objectKey);
+
+ /* If this is a new object that needs labeling, do it now */
+ if (rec->access_mode & DixCreateAccess) {
+ rc = SELinuxPropertyToSID(name, subj, &obj->sid, &obj->poly);
+ if (rc != Success) {
+ rec->status = rc;
+ return;
+ }
+ }
+ /* If this is a polyinstantiated object, find the right instance */
+ else if (obj->poly) {
+ rc = SELinuxPropertyToSID(name, subj, &tsid, NULL);
+ if (rc != Success) {
+ rec->status = rc;
+ return;
+ }
+ while (pProp->propertyName != name || obj->sid != tsid) {
+ if ((pProp = pProp->next) == NULL)
+ break;
+ obj = dixLookupPrivate(&pProp->devPrivates, objectKey);
+ }
+
+ if (pProp)
+ *rec->ppProp = pProp;
+ else {
+ rec->status = BadMatch;
+ return;
+ }
+ }
+
+ /* Perform the security check */
+ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_PROPERTY, rec->access_mode,
+ &auditdata);
+ if (rc != Success)
+ rec->status = rc;
+
+ /* Label the content (advisory only) */
+ if (rec->access_mode & DixWriteAccess) {
+ data = dixLookupPrivate(&pProp->devPrivates, dataKey);
+ if (subj->prp_create_sid)
+ data->sid = subj->prp_create_sid;
+ else
+ data->sid = obj->sid;
+ }
+}
+
+static void
+SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ XaceResourceAccessRec *rec = calldata;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj;
+ SELinuxAuditRec auditdata = { .client = rec->client };
+ Mask access_mode = rec->access_mode;
+ PrivateRec **privatePtr;
+ security_class_t class;
+ int rc, offset;
+
+ subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+
+ /* Determine if the resource object has a devPrivates field */
+ offset = dixLookupPrivateOffset(rec->rtype);
+ if (offset < 0) {
+ /* No: use the SID of the owning client */
+ class = SECCLASS_X_RESOURCE;
+ privatePtr = &clients[CLIENT_ID(rec->id)]->devPrivates;
+ obj = dixLookupPrivate(privatePtr, objectKey);
+ } else {
+ /* Yes: use the SID from the resource object itself */
+ class = SELinuxTypeToClass(rec->rtype);
+ privatePtr = DEVPRIV_AT(rec->res, offset);
+ obj = dixLookupPrivate(privatePtr, objectKey);
+ }
+
+ /* If this is a new object that needs labeling, do it now */
+ if (access_mode & DixCreateAccess && offset >= 0) {
+ rc = SELinuxLabelResource(rec, subj, obj, class);
+ if (rc != Success) {
+ rec->status = rc;
+ return;
+ }
+ }
+
+ /* Collapse generic resource permissions down to read/write */
+ if (class == SECCLASS_X_RESOURCE) {
+ access_mode = !!(rec->access_mode & SELinuxReadMask); /* rd */
+ access_mode |= !!(rec->access_mode & ~SELinuxReadMask) << 1; /* wr */
+ }
+
+ /* Perform the security check */
+ auditdata.restype = rec->rtype;
+ auditdata.id = rec->id;
+ rc = SELinuxDoCheck(subj, obj, class, access_mode, &auditdata);
+ if (rc != Success)
+ rec->status = rc;
+
+ /* Perform the background none check on windows */
+ if (access_mode & DixCreateAccess && rec->rtype == RT_WINDOW) {
+ rc = SELinuxDoCheck(subj, obj, class, DixBlendAccess, &auditdata);
+ if (rc != Success)
+ ((WindowPtr)rec->res)->forcedBG = TRUE;
+ }
+}
+
+static void
+SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata)
+{
+ XaceScreenAccessRec *rec = calldata;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj;
+ SELinuxAuditRec auditdata = { .client = rec->client };
+ Mask access_mode = rec->access_mode;
+ int rc;
+
+ subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+ obj = dixLookupPrivate(&rec->screen->devPrivates, objectKey);
+
+ /* If this is a new object that needs labeling, do it now */
+ if (access_mode & DixCreateAccess) {
+ /* Perform a transition to obtain the final SID */
+ if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SCREEN,
+ &obj->sid) < 0) {
+ ErrorF("SELinux: a compute_create call failed!\n");
+ rec->status = BadValue;
+ return;
+ }
+ }
+
+ if (is_saver)
+ access_mode <<= 2;
+
+ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SCREEN, access_mode, &auditdata);
+ if (rc != Success)
+ rec->status = rc;
+}
+
+static void
+SELinuxClient(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ XaceClientAccessRec *rec = calldata;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj;
+ SELinuxAuditRec auditdata = { .client = rec->client };
+ int rc;
+
+ subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+ obj = dixLookupPrivate(&rec->target->devPrivates, objectKey);
+
+ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_CLIENT, rec->access_mode,
+ &auditdata);
+ if (rc != Success)
+ rec->status = rc;
+}
+
+static void
+SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ XaceServerAccessRec *rec = calldata;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj;
+ SELinuxAuditRec auditdata = { .client = rec->client };
+ int rc;
+
+ subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+ obj = dixLookupPrivate(&serverClient->devPrivates, objectKey);
+
+ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SERVER, rec->access_mode,
+ &auditdata);
+ if (rc != Success)
+ rec->status = rc;
+}
+
+
+/*
+ * DIX Callbacks
+ */
+
+static void
+SELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ NewClientInfoRec *pci = calldata;
+
+ switch (pci->client->clientState) {
+ case ClientStateInitial:
+ SELinuxLabelClient(pci->client);
+ break;
+
+ default:
+ break;
+ }
+}
+
+static void
+SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+ ResourceStateInfoRec *rec = calldata;
+ SELinuxSubjectRec *subj;
+ SELinuxObjectRec *obj;
+ WindowPtr pWin;
+
+ if (rec->type != RT_WINDOW)
+ return;
+ if (rec->state != ResourceStateAdding)
+ return;
+
+ pWin = (WindowPtr)rec->value;
+ subj = dixLookupPrivate(&wClient(pWin)->devPrivates, subjectKey);
+
+ if (subj->sid) {
+ security_context_t ctx;
+ int rc = avc_sid_to_context_raw(subj->sid, &ctx);
+ if (rc < 0)
+ FatalError("SELinux: Failed to get security context!\n");
+ rc = dixChangeWindowProperty(serverClient,
+ pWin, atom_client_ctx, XA_STRING, 8,
+ PropModeReplace, strlen(ctx), ctx, FALSE);
+ if (rc != Success)
+ FatalError("SELinux: Failed to set label property on window!\n");
+ freecon(ctx);
+ } else
+ FatalError("SELinux: Unexpected unlabeled client found\n");
+
+ obj = dixLookupPrivate(&pWin->devPrivates, objectKey);
+
+ if (obj->sid) {
+ security_context_t ctx;
+ int rc = avc_sid_to_context_raw(obj->sid, &ctx);
+ if (rc < 0)
+ FatalError("SELinux: Failed to get security context!\n");
+ rc = dixChangeWindowProperty(serverClient,
+ pWin, atom_ctx, XA_STRING, 8,
+ PropModeReplace, strlen(ctx), ctx, FALSE);
+ if (rc != Success)
+ FatalError("SELinux: Failed to set label property on window!\n");
+ freecon(ctx);
+ } else
+ FatalError("SELinux: Unexpected unlabeled window found\n");
+}
+
+
+static int netlink_fd;
+
+static void
+SELinuxBlockHandler(void *data, struct timeval **tv, void *read_mask)
+{
+}
+
+static void
+SELinuxWakeupHandler(void *data, int err, void *read_mask)
+{
+ if (FD_ISSET(netlink_fd, (fd_set *)read_mask))
+ avc_netlink_check_nb();
+}
+
+void
+SELinuxFlaskReset(void)
+{
+ /* Unregister callbacks */
+ DeleteCallback(&ClientStateCallback, SELinuxClientState, NULL);
+ DeleteCallback(&ResourceStateCallback, SELinuxResourceState, NULL);
+
+ XaceDeleteCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL);
+ XaceDeleteCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL);
+ XaceDeleteCallback(XACE_DEVICE_ACCESS, SELinuxDevice, NULL);
+ XaceDeleteCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, NULL);
+ XaceDeleteCallback(XACE_SEND_ACCESS, SELinuxSend, NULL);
+ XaceDeleteCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, NULL);
+ XaceDeleteCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL);
+ XaceDeleteCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL);
+ XaceDeleteCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL);
+ XaceDeleteCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL);
+ XaceDeleteCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL);
+ XaceDeleteCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep);
+
+ /* Tear down SELinux stuff */
+ audit_close(audit_fd);
+ avc_netlink_release_fd();
+ RemoveBlockAndWakeupHandlers(SELinuxBlockHandler, SELinuxWakeupHandler,
+ NULL);
+ RemoveGeneralSocket(netlink_fd);
+
+ avc_destroy();
+}
+
+void
+SELinuxFlaskInit(void)
+{
+ struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *)0 };
+ security_context_t ctx;
+ int ret = TRUE;
+
+ switch(selinuxEnforcingState) {
+ case SELINUX_MODE_ENFORCING:
+ LogMessage(X_INFO, "SELinux: Configured in enforcing mode\n");
+ avc_option.value = (char *)1;
+ break;
+ case SELINUX_MODE_PERMISSIVE:
+ LogMessage(X_INFO, "SELinux: Configured in permissive mode\n");
+ avc_option.value = (char *)0;
+ break;
+ default:
+ avc_option.type = AVC_OPT_UNUSED;
+ break;
+ }
+
+ /* Set up SELinux stuff */
+ selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback)SELinuxLog);
+ selinux_set_callback(SELINUX_CB_AUDIT, (union selinux_callback)SELinuxAudit);
+
+ if (selinux_set_mapping(map) < 0) {
+ if (errno == EINVAL) {
+ ErrorF("SELinux: Invalid object class mapping, disabling SELinux support.\n");
+ return;
+ }
+ FatalError("SELinux: Failed to set up security class mapping\n");
+ }
+
+ if (avc_open(&avc_option, 1) < 0)
+ FatalError("SELinux: Couldn't initialize SELinux userspace AVC\n");
+
+ if (security_get_initial_context_raw("unlabeled", &ctx) < 0)
+ FatalError("SELinux: Failed to look up unlabeled context\n");
+ if (avc_context_to_sid_raw(ctx, &unlabeled_sid) < 0)
+ FatalError("SELinux: a context_to_SID call failed!\n");
+ freecon(ctx);
+
+ /* Prepare for auditing */
+ audit_fd = audit_open();
+ if (audit_fd < 0)
+ FatalError("SELinux: Failed to open the system audit log\n");
+
+ /* Allocate private storage */
+ if (!dixRegisterPrivateKey(subjectKey, PRIVATE_XSELINUX, sizeof(SELinuxSubjectRec)) ||
+ !dixRegisterPrivateKey(objectKey, PRIVATE_XSELINUX, sizeof(SELinuxObjectRec)) ||
+ !dixRegisterPrivateKey(dataKey, PRIVATE_XSELINUX, sizeof(SELinuxObjectRec)))
+ FatalError("SELinux: Failed to allocate private storage.\n");
+
+ /* Create atoms for doing window labeling */
+ atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, TRUE);
+ if (atom_ctx == BAD_RESOURCE)
+ FatalError("SELinux: Failed to create atom\n");
+ atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, TRUE);
+ if (atom_client_ctx == BAD_RESOURCE)
+ FatalError("SELinux: Failed to create atom\n");
+
+ netlink_fd = avc_netlink_acquire_fd();
+ AddGeneralSocket(netlink_fd);
+ RegisterBlockAndWakeupHandlers(SELinuxBlockHandler, SELinuxWakeupHandler,
+ NULL);
+
+ /* Register callbacks */
+ ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL);
+ ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL);
+
+ ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL);
+ ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL);
+ ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SELinuxDevice, NULL);
+ ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, NULL);
+ ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SELinuxSend, NULL);
+ ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, NULL);
+ ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL);
+ ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL);
+ ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL);
+ ret &= XaceRegisterCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL);
+ ret &= XaceRegisterCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL);
+ ret &= XaceRegisterCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep);
+ if (!ret)
+ FatalError("SELinux: Failed to register one or more callbacks\n");
+
+ /* Label objects that were created before we could register ourself */
+ SELinuxLabelInitial();
+}
diff --git a/xorg-server/Xext/xvdix.h b/xorg-server/Xext/xvdix.h
index e9c22bf65..58069f040 100644
--- a/xorg-server/Xext/xvdix.h
+++ b/xorg-server/Xext/xvdix.h
@@ -1,275 +1,275 @@
-/***********************************************************
-Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef XVDIX_H
-#define XVDIX_H
-/*
-** File:
-**
-** xvdix.h --- Xv device independent header file
-**
-** Author:
-**
-** David Carver (Digital Workstation Engineering/Project Athena)
-**
-** Revisions:
-**
-** 29.08.91 Carver
-** - removed UnrealizeWindow wrapper unrealizing windows no longer
-** preempts video
-**
-** 11.06.91 Carver
-** - changed SetPortControl to SetPortAttribute
-** - changed GetPortControl to GetPortAttribute
-** - changed QueryBestSize
-**
-** 15.05.91 Carver
-** - version 2.0 upgrade
-**
-** 24.01.91 Carver
-** - version 1.4 upgrade
-**
-*/
-
-#include "scrnintstr.h"
-#include <X11/extensions/Xvproto.h>
-
-#ifndef XorgLoader
-extern _X_EXPORT unsigned long XvExtensionGeneration;
-extern _X_EXPORT unsigned long XvScreenGeneration;
-extern _X_EXPORT unsigned long XvResourceGeneration;
-
-extern _X_EXPORT int XvReqCode;
-extern _X_EXPORT int XvEventBase;
-extern _X_EXPORT int XvErrorBase;
-
-extern _X_EXPORT RESTYPE XvRTPort;
-extern _X_EXPORT RESTYPE XvRTEncoding;
-extern _X_EXPORT RESTYPE XvRTGrab;
-extern _X_EXPORT RESTYPE XvRTVideoNotify;
-extern _X_EXPORT RESTYPE XvRTVideoNotifyList;
-extern _X_EXPORT RESTYPE XvRTPortNotify;
-#endif
-
-typedef struct {
- int numerator;
- int denominator;
-} XvRationalRec, *XvRationalPtr;
-
-typedef struct {
- char depth;
- unsigned long visual;
-} XvFormatRec, *XvFormatPtr;
-
-typedef struct {
- unsigned long id;
- ClientPtr client;
-} XvGrabRec, *XvGrabPtr;
-
-typedef struct _XvVideoNotifyRec {
- struct _XvVideoNotifyRec *next;
- ClientPtr client;
- unsigned long id;
- unsigned long mask;
-} XvVideoNotifyRec, *XvVideoNotifyPtr;
-
-typedef struct _XvPortNotifyRec {
- struct _XvPortNotifyRec *next;
- ClientPtr client;
- unsigned long id;
-} XvPortNotifyRec, *XvPortNotifyPtr;
-
-typedef struct {
- int id;
- ScreenPtr pScreen;
- char *name;
- unsigned short width, height;
- XvRationalRec rate;
-} XvEncodingRec, *XvEncodingPtr;
-
-typedef struct _XvAttributeRec {
- int flags;
- int min_value;
- int max_value;
- char *name;
-} XvAttributeRec, *XvAttributePtr;
-
-typedef struct {
- int id;
- int type;
- int byte_order;
- char guid[16];
- int bits_per_pixel;
- int format;
- int num_planes;
-
- /* for RGB formats only */
- int depth;
- unsigned int red_mask;
- unsigned int green_mask;
- unsigned int blue_mask;
-
- /* for YUV formats only */
- unsigned int y_sample_bits;
- unsigned int u_sample_bits;
- unsigned int v_sample_bits;
- unsigned int horz_y_period;
- unsigned int horz_u_period;
- unsigned int horz_v_period;
- unsigned int vert_y_period;
- unsigned int vert_u_period;
- unsigned int vert_v_period;
- char component_order[32];
- int scanline_order;
-} XvImageRec, *XvImagePtr;
-
-typedef struct {
- unsigned long base_id;
- unsigned char type;
- char *name;
- int nEncodings;
- XvEncodingPtr pEncodings;
- int nFormats;
- XvFormatPtr pFormats;
- int nAttributes;
- XvAttributePtr pAttributes;
- int nImages;
- XvImagePtr pImages;
- int nPorts;
- struct _XvPortRec *pPorts;
- ScreenPtr pScreen;
- int (* ddAllocatePort)(unsigned long, struct _XvPortRec*,
- struct _XvPortRec**);
- int (* ddFreePort)(struct _XvPortRec*);
- int (* ddPutVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
- INT16, INT16, CARD16, CARD16,
- INT16, INT16, CARD16, CARD16);
- int (* ddPutStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
- INT16, INT16, CARD16, CARD16,
- INT16, INT16, CARD16, CARD16);
- int (* ddGetVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
- INT16, INT16, CARD16, CARD16,
- INT16, INT16, CARD16, CARD16);
- int (* ddGetStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
- INT16, INT16, CARD16, CARD16,
- INT16, INT16, CARD16, CARD16);
- int (* ddStopVideo)(ClientPtr, struct _XvPortRec*, DrawablePtr);
- int (* ddSetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32);
- int (* ddGetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32*);
- int (* ddQueryBestSize)(ClientPtr, struct _XvPortRec*, CARD8,
- CARD16, CARD16,CARD16, CARD16,
- unsigned int*, unsigned int*);
- int (* ddPutImage)(ClientPtr, DrawablePtr, struct _XvPortRec*, GCPtr,
- INT16, INT16, CARD16, CARD16,
- INT16, INT16, CARD16, CARD16,
- XvImagePtr, unsigned char*, Bool,
- CARD16, CARD16);
- int (* ddQueryImageAttributes)(ClientPtr, struct _XvPortRec*, XvImagePtr,
- CARD16*, CARD16*, int*, int*);
- DevUnion devPriv;
-} XvAdaptorRec, *XvAdaptorPtr;
-
-typedef struct _XvPortRec {
- unsigned long id;
- XvAdaptorPtr pAdaptor;
- XvPortNotifyPtr pNotify;
- DrawablePtr pDraw;
- ClientPtr client;
- XvGrabRec grab;
- TimeStamp time;
- DevUnion devPriv;
-} XvPortRec, *XvPortPtr;
-
-#define VALIDATE_XV_PORT(portID, pPort, mode)\
- {\
- int rc = dixLookupResourceByType((pointer *)&(pPort), portID,\
- XvRTPort, client, mode);\
- if (rc != Success)\
- return rc;\
- }
-
-typedef struct {
- int version, revision;
- int nAdaptors;
- XvAdaptorPtr pAdaptors;
- DestroyWindowProcPtr DestroyWindow;
- DestroyPixmapProcPtr DestroyPixmap;
- CloseScreenProcPtr CloseScreen;
- Bool (* ddCloseScreen)(int, ScreenPtr);
- int (* ddQueryAdaptors)(ScreenPtr, XvAdaptorPtr*, int*);
- DevUnion devPriv;
-} XvScreenRec, *XvScreenPtr;
-
-#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \
- dixLookupPrivate(&(pScreen)->devPrivates, XvScreenKey))->field)
-
-#define SCREEN_EPILOGUE(pScreen, field, wrapper)\
- ((pScreen)->field = wrapper)
-
-/* Errors */
-
-#define _XvBadPort (XvBadPort+XvErrorBase)
-#define _XvBadEncoding (XvBadEncoding+XvErrorBase)
-
-#ifndef XorgLoader
-extern _X_EXPORT int ProcXvDispatch(ClientPtr);
-extern _X_EXPORT int SProcXvDispatch(ClientPtr);
-
-extern _X_EXPORT void XvExtensionInit(void);
-extern _X_EXPORT int XvScreenInit(ScreenPtr);
-extern _X_EXPORT DevPrivateKey XvGetScreenKey(void);
-extern _X_EXPORT unsigned long XvGetRTPort(void);
-extern _X_EXPORT int XvdiSendPortNotify(XvPortPtr, Atom, INT32);
-extern _X_EXPORT int XvdiVideoStopped(XvPortPtr, int);
-
-extern _X_EXPORT int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
- INT16, INT16, CARD16, CARD16,
- INT16, INT16, CARD16, CARD16);
-extern _X_EXPORT int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
- INT16, INT16, CARD16, CARD16,
- INT16, INT16, CARD16, CARD16);
-extern _X_EXPORT int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
- INT16, INT16, CARD16, CARD16,
- INT16, INT16, CARD16, CARD16);
-extern _X_EXPORT int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
- INT16, INT16, CARD16, CARD16,
- INT16, INT16, CARD16, CARD16);
-extern _X_EXPORT int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
- INT16, INT16, CARD16, CARD16,
- INT16, INT16, CARD16, CARD16,
- XvImagePtr, unsigned char*, Bool,
- CARD16, CARD16);
-extern _X_EXPORT int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL);
-extern _X_EXPORT int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL);
-extern _X_EXPORT int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32);
-extern _X_EXPORT int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32*);
-extern _X_EXPORT int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr);
-extern _X_EXPORT int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr);
-extern _X_EXPORT int XvdiMatchPort(XvPortPtr, DrawablePtr);
-extern _X_EXPORT int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *);
-extern _X_EXPORT int XvdiUngrabPort( ClientPtr, XvPortPtr, Time);
-#endif /* XorgLoader */
-
-#endif /* XVDIX_H */
-
+/***********************************************************
+Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef XVDIX_H
+#define XVDIX_H
+/*
+** File:
+**
+** xvdix.h --- Xv device independent header file
+**
+** Author:
+**
+** David Carver (Digital Workstation Engineering/Project Athena)
+**
+** Revisions:
+**
+** 29.08.91 Carver
+** - removed UnrealizeWindow wrapper unrealizing windows no longer
+** preempts video
+**
+** 11.06.91 Carver
+** - changed SetPortControl to SetPortAttribute
+** - changed GetPortControl to GetPortAttribute
+** - changed QueryBestSize
+**
+** 15.05.91 Carver
+** - version 2.0 upgrade
+**
+** 24.01.91 Carver
+** - version 1.4 upgrade
+**
+*/
+
+#include "scrnintstr.h"
+#include <X11/extensions/Xvproto.h>
+
+#ifndef XorgLoader
+extern _X_EXPORT unsigned long XvExtensionGeneration;
+extern _X_EXPORT unsigned long XvScreenGeneration;
+extern _X_EXPORT unsigned long XvResourceGeneration;
+
+extern _X_EXPORT int XvReqCode;
+extern _X_EXPORT int XvEventBase;
+extern _X_EXPORT int XvErrorBase;
+
+extern _X_EXPORT RESTYPE XvRTPort;
+extern _X_EXPORT RESTYPE XvRTEncoding;
+extern _X_EXPORT RESTYPE XvRTGrab;
+extern _X_EXPORT RESTYPE XvRTVideoNotify;
+extern _X_EXPORT RESTYPE XvRTVideoNotifyList;
+extern _X_EXPORT RESTYPE XvRTPortNotify;
+#endif
+
+typedef struct {
+ int numerator;
+ int denominator;
+} XvRationalRec, *XvRationalPtr;
+
+typedef struct {
+ char depth;
+ unsigned long visual;
+} XvFormatRec, *XvFormatPtr;
+
+typedef struct {
+ unsigned long id;
+ ClientPtr client;
+} XvGrabRec, *XvGrabPtr;
+
+typedef struct _XvVideoNotifyRec {
+ struct _XvVideoNotifyRec *next;
+ ClientPtr client;
+ unsigned long id;
+ unsigned long mask;
+} XvVideoNotifyRec, *XvVideoNotifyPtr;
+
+typedef struct _XvPortNotifyRec {
+ struct _XvPortNotifyRec *next;
+ ClientPtr client;
+ unsigned long id;
+} XvPortNotifyRec, *XvPortNotifyPtr;
+
+typedef struct {
+ int id;
+ ScreenPtr pScreen;
+ char *name;
+ unsigned short width, height;
+ XvRationalRec rate;
+} XvEncodingRec, *XvEncodingPtr;
+
+typedef struct _XvAttributeRec {
+ int flags;
+ int min_value;
+ int max_value;
+ char *name;
+} XvAttributeRec, *XvAttributePtr;
+
+typedef struct {
+ int id;
+ int type;
+ int byte_order;
+ char guid[16];
+ int bits_per_pixel;
+ int format;
+ int num_planes;
+
+ /* for RGB formats only */
+ int depth;
+ unsigned int red_mask;
+ unsigned int green_mask;
+ unsigned int blue_mask;
+
+ /* for YUV formats only */
+ unsigned int y_sample_bits;
+ unsigned int u_sample_bits;
+ unsigned int v_sample_bits;
+ unsigned int horz_y_period;
+ unsigned int horz_u_period;
+ unsigned int horz_v_period;
+ unsigned int vert_y_period;
+ unsigned int vert_u_period;
+ unsigned int vert_v_period;
+ char component_order[32];
+ int scanline_order;
+} XvImageRec, *XvImagePtr;
+
+typedef struct {
+ unsigned long base_id;
+ unsigned char type;
+ char *name;
+ int nEncodings;
+ XvEncodingPtr pEncodings;
+ int nFormats;
+ XvFormatPtr pFormats;
+ int nAttributes;
+ XvAttributePtr pAttributes;
+ int nImages;
+ XvImagePtr pImages;
+ int nPorts;
+ struct _XvPortRec *pPorts;
+ ScreenPtr pScreen;
+ int (* ddAllocatePort)(unsigned long, struct _XvPortRec*,
+ struct _XvPortRec**);
+ int (* ddFreePort)(struct _XvPortRec*);
+ int (* ddPutVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+ int (* ddPutStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+ int (* ddGetVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+ int (* ddGetStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+ int (* ddStopVideo)(ClientPtr, struct _XvPortRec*, DrawablePtr);
+ int (* ddSetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32);
+ int (* ddGetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32*);
+ int (* ddQueryBestSize)(ClientPtr, struct _XvPortRec*, CARD8,
+ CARD16, CARD16,CARD16, CARD16,
+ unsigned int*, unsigned int*);
+ int (* ddPutImage)(ClientPtr, DrawablePtr, struct _XvPortRec*, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16,
+ XvImagePtr, unsigned char*, Bool,
+ CARD16, CARD16);
+ int (* ddQueryImageAttributes)(ClientPtr, struct _XvPortRec*, XvImagePtr,
+ CARD16*, CARD16*, int*, int*);
+ DevUnion devPriv;
+} XvAdaptorRec, *XvAdaptorPtr;
+
+typedef struct _XvPortRec {
+ unsigned long id;
+ XvAdaptorPtr pAdaptor;
+ XvPortNotifyPtr pNotify;
+ DrawablePtr pDraw;
+ ClientPtr client;
+ XvGrabRec grab;
+ TimeStamp time;
+ DevUnion devPriv;
+} XvPortRec, *XvPortPtr;
+
+#define VALIDATE_XV_PORT(portID, pPort, mode)\
+ {\
+ int rc = dixLookupResourceByType((pointer *)&(pPort), portID,\
+ XvRTPort, client, mode);\
+ if (rc != Success)\
+ return rc;\
+ }
+
+typedef struct {
+ int version, revision;
+ int nAdaptors;
+ XvAdaptorPtr pAdaptors;
+ DestroyWindowProcPtr DestroyWindow;
+ DestroyPixmapProcPtr DestroyPixmap;
+ CloseScreenProcPtr CloseScreen;
+ Bool (* ddCloseScreen)(int, ScreenPtr);
+ int (* ddQueryAdaptors)(ScreenPtr, XvAdaptorPtr*, int*);
+ DevUnion devPriv;
+} XvScreenRec, *XvScreenPtr;
+
+#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, XvScreenKey))->field)
+
+#define SCREEN_EPILOGUE(pScreen, field, wrapper)\
+ ((pScreen)->field = wrapper)
+
+/* Errors */
+
+#define _XvBadPort (XvBadPort+XvErrorBase)
+#define _XvBadEncoding (XvBadEncoding+XvErrorBase)
+
+#ifndef XorgLoader
+extern _X_EXPORT int ProcXvDispatch(ClientPtr);
+extern _X_EXPORT int SProcXvDispatch(ClientPtr);
+
+extern _X_EXPORT void XvExtensionInit(void);
+extern _X_EXPORT int XvScreenInit(ScreenPtr);
+extern _X_EXPORT DevPrivateKey XvGetScreenKey(void);
+extern _X_EXPORT unsigned long XvGetRTPort(void);
+extern _X_EXPORT int XvdiSendPortNotify(XvPortPtr, Atom, INT32);
+extern _X_EXPORT int XvdiVideoStopped(XvPortPtr, int);
+
+extern _X_EXPORT int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+extern _X_EXPORT int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+extern _X_EXPORT int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+extern _X_EXPORT int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+extern _X_EXPORT int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16,
+ XvImagePtr, unsigned char*, Bool,
+ CARD16, CARD16);
+extern _X_EXPORT int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL);
+extern _X_EXPORT int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL);
+extern _X_EXPORT int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32);
+extern _X_EXPORT int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32*);
+extern _X_EXPORT int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr);
+extern _X_EXPORT int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr);
+extern _X_EXPORT int XvdiMatchPort(XvPortPtr, DrawablePtr);
+extern _X_EXPORT int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *);
+extern _X_EXPORT int XvdiUngrabPort( ClientPtr, XvPortPtr, Time);
+#endif /* XorgLoader */
+
+#endif /* XVDIX_H */
+
diff --git a/xorg-server/Xext/xvmain.c b/xorg-server/Xext/xvmain.c
index cd6f0979c..bbd2b3c6c 100644
--- a/xorg-server/Xext/xvmain.c
+++ b/xorg-server/Xext/xvmain.c
@@ -1,1183 +1,1183 @@
-/***********************************************************
-Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-/*
-** File:
-**
-** xvmain.c --- Xv server extension main device independent module.
-**
-** Author:
-**
-** David Carver (Digital Workstation Engineering/Project Athena)
-**
-** Revisions:
-**
-** 04.09.91 Carver
-** - change: stop video always generates an event even when video
-** wasn't active
-**
-** 29.08.91 Carver
-** - change: unrealizing windows no longer preempts video
-**
-** 11.06.91 Carver
-** - changed SetPortControl to SetPortAttribute
-** - changed GetPortControl to GetPortAttribute
-** - changed QueryBestSize
-**
-** 28.05.91 Carver
-** - fixed Put and Get requests to not preempt operations to same drawable
-**
-** 15.05.91 Carver
-** - version 2.0 upgrade
-**
-** 19.03.91 Carver
-** - fixed Put and Get requests to honor grabbed ports.
-** - fixed Video requests to update di structure with new drawable, and
-** client after calling ddx.
-**
-** 24.01.91 Carver
-** - version 1.4 upgrade
-**
-** Notes:
-**
-** Port structures reference client structures in a two different
-** ways: when grabs, or video is active. Each reference is encoded
-** as fake client resources and thus when the client is goes away so
-** does the reference (it is zeroed). No other action is taken, so
-** video doesn't necessarily stop. It probably will as a result of
-** other resources going away, but if a client starts video using
-** none of its own resources, then the video will continue to play
-** after the client disappears.
-**
-**
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <string.h>
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "os.h"
-#include "scrnintstr.h"
-#include "windowstr.h"
-#include "pixmapstr.h"
-#include "gc.h"
-#include "extnsionst.h"
-#include "dixstruct.h"
-#include "resource.h"
-#include "opaque.h"
-#include "input.h"
-
-#define GLOBAL
-
-#include <X11/extensions/Xv.h>
-#include <X11/extensions/Xvproto.h>
-#include "xvdix.h"
-
-#ifdef PANORAMIX
-#include "panoramiX.h"
-#include "panoramiXsrv.h"
-#endif
-#include "xvdisp.h"
-
-static DevPrivateKeyRec XvScreenKeyRec;
-#define XvScreenKey (&XvScreenKeyRec)
-unsigned long XvExtensionGeneration = 0;
-unsigned long XvScreenGeneration = 0;
-unsigned long XvResourceGeneration = 0;
-
-int XvReqCode;
-int XvEventBase;
-int XvErrorBase;
-
-RESTYPE XvRTPort;
-RESTYPE XvRTEncoding;
-RESTYPE XvRTGrab;
-RESTYPE XvRTVideoNotify;
-RESTYPE XvRTVideoNotifyList;
-RESTYPE XvRTPortNotify;
-
-/* EXTERNAL */
-
-static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *);
-static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *);
-static Bool CreateResourceTypes(void);
-
-static Bool XvCloseScreen(int, ScreenPtr);
-static Bool XvDestroyPixmap(PixmapPtr);
-static Bool XvDestroyWindow(WindowPtr);
-static void XvResetProc(ExtensionEntry*);
-static int XvdiDestroyGrab(pointer, XID);
-static int XvdiDestroyEncoding(pointer, XID);
-static int XvdiDestroyVideoNotify(pointer, XID);
-static int XvdiDestroyPortNotify(pointer, XID);
-static int XvdiDestroyVideoNotifyList(pointer, XID);
-static int XvdiDestroyPort(pointer, XID);
-static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int);
-
-
-
-
-/*
-** XvExtensionInit
-**
-**
-*/
-
-void
-XvExtensionInit(void)
-{
- ExtensionEntry *extEntry;
-
- if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0))
- return;
-
- /* LOOK TO SEE IF ANY SCREENS WERE INITIALIZED; IF NOT THEN
- INIT GLOBAL VARIABLES SO THE EXTENSION CAN FUNCTION */
- if (XvScreenGeneration != serverGeneration)
- {
- if (!CreateResourceTypes())
- {
- ErrorF("XvExtensionInit: Unable to allocate resource types\n");
- return;
- }
-#ifdef PANORAMIX
- XineramaRegisterConnectionBlockCallback(XineramifyXv);
-#endif
- XvScreenGeneration = serverGeneration;
- }
-
- if (XvExtensionGeneration != serverGeneration)
- {
- XvExtensionGeneration = serverGeneration;
-
- extEntry = AddExtension(XvName, XvNumEvents, XvNumErrors,
- ProcXvDispatch, SProcXvDispatch,
- XvResetProc, StandardMinorOpcode);
- if (!extEntry)
- {
- FatalError("XvExtensionInit: AddExtensions failed\n");
- }
-
- XvReqCode = extEntry->base;
- XvEventBase = extEntry->eventBase;
- XvErrorBase = extEntry->errorBase;
-
- EventSwapVector[XvEventBase+XvVideoNotify] =
- (EventSwapPtr)WriteSwappedVideoNotifyEvent;
- EventSwapVector[XvEventBase+XvPortNotify] =
- (EventSwapPtr)WriteSwappedPortNotifyEvent;
-
- SetResourceTypeErrorValue(XvRTPort, _XvBadPort);
- (void)MakeAtom(XvName, strlen(XvName), xTrue);
-
- }
-}
-
-static Bool
-CreateResourceTypes(void)
-
-{
-
- if (XvResourceGeneration == serverGeneration) return TRUE;
-
- XvResourceGeneration = serverGeneration;
-
- if (!(XvRTPort = CreateNewResourceType(XvdiDestroyPort, "XvRTPort")))
- {
- ErrorF("CreateResourceTypes: failed to allocate port resource.\n");
- return FALSE;
- }
-
- if (!(XvRTGrab = CreateNewResourceType(XvdiDestroyGrab, "XvRTGrab")))
- {
- ErrorF("CreateResourceTypes: failed to allocate grab resource.\n");
- return FALSE;
- }
-
- if (!(XvRTEncoding = CreateNewResourceType(XvdiDestroyEncoding,
- "XvRTEncoding")))
- {
- ErrorF("CreateResourceTypes: failed to allocate encoding resource.\n");
- return FALSE;
- }
-
- if (!(XvRTVideoNotify = CreateNewResourceType(XvdiDestroyVideoNotify,
- "XvRTVideoNotify")))
- {
- ErrorF("CreateResourceTypes: failed to allocate video notify resource.\n");
- return FALSE;
- }
-
- if (!(XvRTVideoNotifyList = CreateNewResourceType(XvdiDestroyVideoNotifyList,
- "XvRTVideoNotifyList")))
- {
- ErrorF("CreateResourceTypes: failed to allocate video notify list resource.\n");
- return FALSE;
- }
-
- if (!(XvRTPortNotify = CreateNewResourceType(XvdiDestroyPortNotify,
- "XvRTPortNotify")))
- {
- ErrorF("CreateResourceTypes: failed to allocate port notify resource.\n");
- return FALSE;
- }
-
- return TRUE;
-
-}
-
-int
-XvScreenInit(ScreenPtr pScreen)
-{
- XvScreenPtr pxvs;
-
- if (XvScreenGeneration != serverGeneration)
- {
- if (!CreateResourceTypes())
- {
- ErrorF("XvScreenInit: Unable to allocate resource types\n");
- return BadAlloc;
- }
-#ifdef PANORAMIX
- XineramaRegisterConnectionBlockCallback(XineramifyXv);
-#endif
- XvScreenGeneration = serverGeneration;
- }
-
- if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0))
- return BadAlloc;
-
- if (dixLookupPrivate(&pScreen->devPrivates, XvScreenKey))
- {
- ErrorF("XvScreenInit: screen devPrivates ptr non-NULL before init\n");
- }
-
- /* ALLOCATE SCREEN PRIVATE RECORD */
-
- pxvs = malloc(sizeof (XvScreenRec));
- if (!pxvs)
- {
- ErrorF("XvScreenInit: Unable to allocate screen private structure\n");
- return BadAlloc;
- }
-
- dixSetPrivate(&pScreen->devPrivates, XvScreenKey, pxvs);
-
- pxvs->DestroyPixmap = pScreen->DestroyPixmap;
- pxvs->DestroyWindow = pScreen->DestroyWindow;
- pxvs->CloseScreen = pScreen->CloseScreen;
-
- pScreen->DestroyPixmap = XvDestroyPixmap;
- pScreen->DestroyWindow = XvDestroyWindow;
- pScreen->CloseScreen = XvCloseScreen;
-
- return Success;
-}
-
-static Bool
-XvCloseScreen(
- int ii,
- ScreenPtr pScreen
-){
-
- XvScreenPtr pxvs;
-
- pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
-
- pScreen->DestroyPixmap = pxvs->DestroyPixmap;
- pScreen->DestroyWindow = pxvs->DestroyWindow;
- pScreen->CloseScreen = pxvs->CloseScreen;
-
- (* pxvs->ddCloseScreen)(ii, pScreen);
-
- free(pxvs);
-
- dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL);
-
- return (*pScreen->CloseScreen)(ii, pScreen);
-}
-
-static void
-XvResetProc(ExtensionEntry* extEntry)
-{
- XvResetProcVector();
-}
-
-DevPrivateKey
-XvGetScreenKey(void)
-{
- return XvScreenKey;
-}
-
-unsigned long
-XvGetRTPort(void)
-{
- return XvRTPort;
-}
-
-static Bool
-XvDestroyPixmap(PixmapPtr pPix)
-{
- Bool status;
- ScreenPtr pScreen;
- XvScreenPtr pxvs;
- XvAdaptorPtr pa;
- int na;
- XvPortPtr pp;
- int np;
-
- pScreen = pPix->drawable.pScreen;
-
- SCREEN_PROLOGUE(pScreen, DestroyPixmap);
-
- pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
-
- /* CHECK TO SEE IF THIS PORT IS IN USE */
-
- pa = pxvs->pAdaptors;
- na = pxvs->nAdaptors;
- while (na--)
- {
- np = pa->nPorts;
- pp = pa->pPorts;
-
- while (np--)
- {
- if (pp->pDraw == (DrawablePtr)pPix)
- {
- XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
-
- (void)(* pp->pAdaptor->ddStopVideo)(NULL, pp, pp->pDraw);
-
- pp->pDraw = NULL;
- pp->client = NULL;
- pp->time = currentTime;
- }
- pp++;
- }
- pa++;
- }
-
- status = (* pScreen->DestroyPixmap)(pPix);
-
- SCREEN_EPILOGUE(pScreen, DestroyPixmap, XvDestroyPixmap);
-
- return status;
-
-}
-
-static Bool
-XvDestroyWindow(WindowPtr pWin)
-{
- Bool status;
- ScreenPtr pScreen;
- XvScreenPtr pxvs;
- XvAdaptorPtr pa;
- int na;
- XvPortPtr pp;
- int np;
-
- pScreen = pWin->drawable.pScreen;
-
- SCREEN_PROLOGUE(pScreen, DestroyWindow);
-
- pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
-
- /* CHECK TO SEE IF THIS PORT IS IN USE */
-
- pa = pxvs->pAdaptors;
- na = pxvs->nAdaptors;
- while (na--)
- {
- np = pa->nPorts;
- pp = pa->pPorts;
-
- while (np--)
- {
- if (pp->pDraw == (DrawablePtr)pWin)
- {
- XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
-
- (void)(* pp->pAdaptor->ddStopVideo)(NULL, pp, pp->pDraw);
-
- pp->pDraw = NULL;
- pp->client = NULL;
- pp->time = currentTime;
- }
- pp++;
- }
- pa++;
- }
-
-
- status = (* pScreen->DestroyWindow)(pWin);
-
- SCREEN_EPILOGUE(pScreen, DestroyWindow, XvDestroyWindow);
-
- return status;
-
-}
-
-/* The XvdiVideoStopped procedure is a hook for the device dependent layer.
- It provides a way for the dd layer to inform the di layer that video has
- stopped in a port for reasons that the di layer had no control over; note
- that it doesn't call back into the dd layer */
-
-int
-XvdiVideoStopped(XvPortPtr pPort, int reason)
-{
-
- /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */
-
- if (!pPort->pDraw) return Success;
-
- XvdiSendVideoNotify(pPort, pPort->pDraw, reason);
-
- pPort->pDraw = NULL;
- pPort->client = NULL;
- pPort->time = currentTime;
-
- return Success;
-
-}
-
-static int
-XvdiDestroyPort(pointer pPort, XID id)
-{
- return (* ((XvPortPtr)pPort)->pAdaptor->ddFreePort)(pPort);
-}
-
-static int
-XvdiDestroyGrab(pointer pGrab, XID id)
-{
- ((XvGrabPtr)pGrab)->client = NULL;
- return Success;
-}
-
-static int
-XvdiDestroyVideoNotify(pointer pn, XID id)
-{
- /* JUST CLEAR OUT THE client POINTER FIELD */
-
- ((XvVideoNotifyPtr)pn)->client = NULL;
- return Success;
-}
-
-static int
-XvdiDestroyPortNotify(pointer pn, XID id)
-{
- /* JUST CLEAR OUT THE client POINTER FIELD */
-
- ((XvPortNotifyPtr)pn)->client = NULL;
- return Success;
-}
-
-static int
-XvdiDestroyVideoNotifyList(pointer pn, XID id)
-{
- XvVideoNotifyPtr npn,cpn;
-
- /* ACTUALLY DESTROY THE NOTITY LIST */
-
- cpn = (XvVideoNotifyPtr)pn;
-
- while (cpn)
- {
- npn = cpn->next;
- if (cpn->client) FreeResource(cpn->id, XvRTVideoNotify);
- free(cpn);
- cpn = npn;
- }
- return Success;
-}
-
-static int
-XvdiDestroyEncoding(pointer value, XID id)
-{
- return Success;
-}
-
-static int
-XvdiSendVideoNotify(XvPortPtr pPort, DrawablePtr pDraw, int reason)
-{
- xvEvent event;
- XvVideoNotifyPtr pn;
-
- dixLookupResourceByType((pointer *)&pn, pDraw->id, XvRTVideoNotifyList,
- serverClient, DixReadAccess);
-
- while (pn)
- {
- event.u.u.type = XvEventBase + XvVideoNotify;
- event.u.videoNotify.time = currentTime.milliseconds;
- event.u.videoNotify.drawable = pDraw->id;
- event.u.videoNotify.port = pPort->id;
- event.u.videoNotify.reason = reason;
- WriteEventsToClient(pn->client, 1, (xEventPtr)&event);
- pn = pn->next;
- }
-
- return Success;
-
-}
-
-
-int
-XvdiSendPortNotify(
- XvPortPtr pPort,
- Atom attribute,
- INT32 value
-){
- xvEvent event;
- XvPortNotifyPtr pn;
-
- pn = pPort->pNotify;
-
- while (pn)
- {
- event.u.u.type = XvEventBase + XvPortNotify;
- event.u.portNotify.time = currentTime.milliseconds;
- event.u.portNotify.port = pPort->id;
- event.u.portNotify.attribute = attribute;
- event.u.portNotify.value = value;
- WriteEventsToClient(pn->client, 1, (xEventPtr)&event);
- pn = pn->next;
- }
-
- return Success;
-
-}
-
-
-#define CHECK_SIZE(dw, dh, sw, sh) { \
- if(!dw || !dh || !sw || !sh) return Success; \
- /* The region code will break these if they are too large */ \
- if((dw > 32767) || (dh > 32767) || (sw > 32767) || (sh > 32767)) \
- return BadValue; \
-}
-
-
-int
-XvdiPutVideo(
- ClientPtr client,
- DrawablePtr pDraw,
- XvPortPtr pPort,
- GCPtr pGC,
- INT16 vid_x, INT16 vid_y,
- CARD16 vid_w, CARD16 vid_h,
- INT16 drw_x, INT16 drw_y,
- CARD16 drw_w, CARD16 drw_h
-){
- DrawablePtr pOldDraw;
-
- CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
-
- /* UPDATE TIME VARIABLES FOR USE IN EVENTS */
-
- UpdateCurrentTime();
-
- /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
- INFORM CLIENT OF ITS FAILURE */
-
- if (pPort->grab.client && (pPort->grab.client != client))
- {
- XvdiSendVideoNotify(pPort, pDraw, XvBusy);
- return Success;
- }
-
- /* CHECK TO SEE IF PORT IS IN USE; IF SO THEN WE MUST DELIVER INTERRUPTED
- EVENTS TO ANY CLIENTS WHO WANT THEM */
-
- pOldDraw = pPort->pDraw;
- if ((pOldDraw) && (pOldDraw != pDraw))
- {
- XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted);
- }
-
- (void) (* pPort->pAdaptor->ddPutVideo)(client, pDraw, pPort, pGC,
- vid_x, vid_y, vid_w, vid_h,
- drw_x, drw_y, drw_w, drw_h);
-
- if ((pPort->pDraw) && (pOldDraw != pDraw))
- {
- pPort->client = client;
- XvdiSendVideoNotify(pPort, pPort->pDraw, XvStarted);
- }
-
- pPort->time = currentTime;
-
- return Success;
-
-}
-
-int
-XvdiPutStill(
- ClientPtr client,
- DrawablePtr pDraw,
- XvPortPtr pPort,
- GCPtr pGC,
- INT16 vid_x, INT16 vid_y,
- CARD16 vid_w, CARD16 vid_h,
- INT16 drw_x, INT16 drw_y,
- CARD16 drw_w, CARD16 drw_h
-){
- int status;
-
- CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
-
- /* UPDATE TIME VARIABLES FOR USE IN EVENTS */
-
- UpdateCurrentTime();
-
- /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
- INFORM CLIENT OF ITS FAILURE */
-
- if (pPort->grab.client && (pPort->grab.client != client))
- {
- XvdiSendVideoNotify(pPort, pDraw, XvBusy);
- return Success;
- }
-
- pPort->time = currentTime;
-
- status = (* pPort->pAdaptor->ddPutStill)(client, pDraw, pPort, pGC,
- vid_x, vid_y, vid_w, vid_h,
- drw_x, drw_y, drw_w, drw_h);
-
- return status;
-
-}
-
-int
-XvdiPutImage(
- ClientPtr client,
- DrawablePtr pDraw,
- XvPortPtr pPort,
- GCPtr pGC,
- INT16 src_x, INT16 src_y,
- CARD16 src_w, CARD16 src_h,
- INT16 drw_x, INT16 drw_y,
- CARD16 drw_w, CARD16 drw_h,
- XvImagePtr image,
- unsigned char* data,
- Bool sync,
- CARD16 width, CARD16 height
-){
- CHECK_SIZE(drw_w, drw_h, src_w, src_h);
-
- /* UPDATE TIME VARIABLES FOR USE IN EVENTS */
-
- UpdateCurrentTime();
-
- /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
- INFORM CLIENT OF ITS FAILURE */
-
- if (pPort->grab.client && (pPort->grab.client != client))
- {
- XvdiSendVideoNotify(pPort, pDraw, XvBusy);
- return Success;
- }
-
- pPort->time = currentTime;
-
- return (* pPort->pAdaptor->ddPutImage)(client, pDraw, pPort, pGC,
- src_x, src_y, src_w, src_h,
- drw_x, drw_y, drw_w, drw_h,
- image, data, sync, width, height);
-}
-
-
-int
-XvdiGetVideo(
- ClientPtr client,
- DrawablePtr pDraw,
- XvPortPtr pPort,
- GCPtr pGC,
- INT16 vid_x, INT16 vid_y,
- CARD16 vid_w, CARD16 vid_h,
- INT16 drw_x, INT16 drw_y,
- CARD16 drw_w, CARD16 drw_h
-){
- DrawablePtr pOldDraw;
-
- CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
-
- /* UPDATE TIME VARIABLES FOR USE IN EVENTS */
-
- UpdateCurrentTime();
-
- /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
- INFORM CLIENT OF ITS FAILURE */
-
- if (pPort->grab.client && (pPort->grab.client != client))
- {
- XvdiSendVideoNotify(pPort, pDraw, XvBusy);
- return Success;
- }
-
- /* CHECK TO SEE IF PORT IS IN USE; IF SO THEN WE MUST DELIVER INTERRUPTED
- EVENTS TO ANY CLIENTS WHO WANT THEM */
-
- pOldDraw = pPort->pDraw;
- if ((pOldDraw) && (pOldDraw != pDraw))
- {
- XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted);
- }
-
- (void) (* pPort->pAdaptor->ddGetVideo)(client, pDraw, pPort, pGC,
- vid_x, vid_y, vid_w, vid_h,
- drw_x, drw_y, drw_w, drw_h);
-
- if ((pPort->pDraw) && (pOldDraw != pDraw))
- {
- pPort->client = client;
- XvdiSendVideoNotify(pPort, pPort->pDraw, XvStarted);
- }
-
- pPort->time = currentTime;
-
- return Success;
-
-}
-
-int
-XvdiGetStill(
- ClientPtr client,
- DrawablePtr pDraw,
- XvPortPtr pPort,
- GCPtr pGC,
- INT16 vid_x, INT16 vid_y,
- CARD16 vid_w, CARD16 vid_h,
- INT16 drw_x, INT16 drw_y,
- CARD16 drw_w, CARD16 drw_h
-){
- int status;
-
- CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
-
- /* UPDATE TIME VARIABLES FOR USE IN EVENTS */
-
- UpdateCurrentTime();
-
- /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
- INFORM CLIENT OF ITS FAILURE */
-
- if (pPort->grab.client && (pPort->grab.client != client))
- {
- XvdiSendVideoNotify(pPort, pDraw, XvBusy);
- return Success;
- }
-
- status = (* pPort->pAdaptor->ddGetStill)(client, pDraw, pPort, pGC,
- vid_x, vid_y, vid_w, vid_h,
- drw_x, drw_y, drw_w, drw_h);
-
- pPort->time = currentTime;
-
- return status;
-
-}
-
-int
-XvdiGrabPort(
- ClientPtr client,
- XvPortPtr pPort,
- Time ctime,
- int *p_result
-){
- unsigned long id;
- TimeStamp time;
-
- UpdateCurrentTime();
- time = ClientTimeToServerTime(ctime);
-
- if (pPort->grab.client && (client != pPort->grab.client))
- {
- *p_result = XvAlreadyGrabbed;
- return Success;
- }
-
- if ((CompareTimeStamps(time, currentTime) == LATER) ||
- (CompareTimeStamps(time, pPort->time) == EARLIER))
- {
- *p_result = XvInvalidTime;
- return Success;
- }
-
- if (client == pPort->grab.client)
- {
- *p_result = Success;
- return Success;
- }
-
- id = FakeClientID(client->index);
-
- if (!AddResource(id, XvRTGrab, &pPort->grab))
- {
- return BadAlloc;
- }
-
- /* IF THERE IS ACTIVE VIDEO THEN STOP IT */
-
- if ((pPort->pDraw) && (client != pPort->client))
- {
- XvdiStopVideo(NULL, pPort, pPort->pDraw);
- }
-
- pPort->grab.client = client;
- pPort->grab.id = id;
-
- pPort->time = currentTime;
-
- *p_result = Success;
-
- return Success;
-
-}
-
-int
-XvdiUngrabPort(
- ClientPtr client,
- XvPortPtr pPort,
- Time ctime
-){
- TimeStamp time;
-
- UpdateCurrentTime();
- time = ClientTimeToServerTime(ctime);
-
- if ((!pPort->grab.client) || (client != pPort->grab.client))
- {
- return Success;
- }
-
- if ((CompareTimeStamps(time, currentTime) == LATER) ||
- (CompareTimeStamps(time, pPort->time) == EARLIER))
- {
- return Success;
- }
-
- /* FREE THE GRAB RESOURCE; AND SET THE GRAB CLIENT TO NULL */
-
- FreeResource(pPort->grab.id, XvRTGrab);
- pPort->grab.client = NULL;
-
- pPort->time = currentTime;
-
- return Success;
-
-}
-
-
-int
-XvdiSelectVideoNotify(
- ClientPtr client,
- DrawablePtr pDraw,
- BOOL onoff
-){
- XvVideoNotifyPtr pn,tpn,fpn;
- int rc;
-
- /* FIND VideoNotify LIST */
-
- rc = dixLookupResourceByType((pointer *)&pn, pDraw->id, XvRTVideoNotifyList,
- client, DixWriteAccess);
- if (rc != Success && rc != BadValue)
- return rc;
-
- /* IF ONE DONES'T EXIST AND NO MASK, THEN JUST RETURN */
-
- if (!onoff && !pn) return Success;
-
- /* IF ONE DOESN'T EXIST CREATE IT AND ADD A RESOURCE SO THAT THE LIST
- WILL BE DELETED WHEN THE DRAWABLE IS DESTROYED */
-
- if (!pn)
- {
- if (!(tpn = malloc(sizeof(XvVideoNotifyRec))))
- return BadAlloc;
- tpn->next = NULL;
- if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn))
- {
- free(tpn);
- return BadAlloc;
- }
- }
- else
- {
- /* LOOK TO SEE IF ENTRY ALREADY EXISTS */
-
- fpn = NULL;
- tpn = pn;
- while (tpn)
- {
- if (tpn->client == client)
- {
- if (!onoff) tpn->client = NULL;
- return Success;
- }
- if (!tpn->client) fpn = tpn; /* TAKE NOTE OF FREE ENTRY */
- tpn = tpn->next;
- }
-
- /* IF TUNNING OFF, THEN JUST RETURN */
-
- if (!onoff) return Success;
-
- /* IF ONE ISN'T FOUND THEN ALLOCATE ONE AND LINK IT INTO THE LIST */
-
- if (fpn)
- {
- tpn = fpn;
- }
- else
- {
- if (!(tpn = malloc(sizeof(XvVideoNotifyRec))))
- return BadAlloc;
- tpn->next = pn->next;
- pn->next = tpn;
- }
- }
-
- /* INIT CLIENT PTR IN CASE WE CAN'T ADD RESOURCE */
- /* ADD RESOURCE SO THAT IF CLIENT EXITS THE CLIENT PTR WILL BE CLEARED */
-
- tpn->client = NULL;
- tpn->id = FakeClientID(client->index);
- AddResource(tpn->id, XvRTVideoNotify, tpn);
-
- tpn->client = client;
- return Success;
-
-}
-
-int
-XvdiSelectPortNotify(
- ClientPtr client,
- XvPortPtr pPort,
- BOOL onoff
-){
- XvPortNotifyPtr pn,tpn;
-
- /* SEE IF CLIENT IS ALREADY IN LIST */
-
- tpn = NULL;
- pn = pPort->pNotify;
- while (pn)
- {
- if (!pn->client) tpn = pn; /* TAKE NOTE OF FREE ENTRY */
- if (pn->client == client) break;
- pn = pn->next;
- }
-
- /* IS THE CLIENT ALREADY ON THE LIST? */
-
- if (pn)
- {
- /* REMOVE IT? */
-
- if (!onoff)
- {
- pn->client = NULL;
- FreeResource(pn->id, XvRTPortNotify);
- }
-
- return Success;
- }
-
- /* DIDN'T FIND IT; SO REUSE LIST ELEMENT IF ONE IS FREE OTHERWISE
- CREATE A NEW ONE AND ADD IT TO THE BEGINNING OF THE LIST */
-
- if (!tpn)
- {
- if (!(tpn = malloc(sizeof(XvPortNotifyRec))))
- return BadAlloc;
- tpn->next = pPort->pNotify;
- pPort->pNotify = tpn;
- }
-
- tpn->client = client;
- tpn->id = FakeClientID(client->index);
- AddResource(tpn->id, XvRTPortNotify, tpn);
-
- return Success;
-
-}
-
-int
-XvdiStopVideo(
- ClientPtr client,
- XvPortPtr pPort,
- DrawablePtr pDraw
-){
- int status;
-
- /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */
-
- if (!pPort->pDraw || (pPort->pDraw != pDraw))
- {
- XvdiSendVideoNotify(pPort, pDraw, XvStopped);
- return Success;
- }
-
- /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
- INFORM CLIENT OF ITS FAILURE */
-
- if ((client) && (pPort->grab.client) && (pPort->grab.client != client))
- {
- XvdiSendVideoNotify(pPort, pDraw, XvBusy);
- return Success;
- }
-
- XvdiSendVideoNotify(pPort, pDraw, XvStopped);
-
- status = (* pPort->pAdaptor->ddStopVideo)(client, pPort, pDraw);
-
- pPort->pDraw = NULL;
- pPort->client = (ClientPtr)client;
- pPort->time = currentTime;
-
- return status;
-
-}
-
-int
-XvdiPreemptVideo(
- ClientPtr client,
- XvPortPtr pPort,
- DrawablePtr pDraw
-){
- int status;
-
- /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */
-
- if (!pPort->pDraw || (pPort->pDraw != pDraw)) return Success;
-
- XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted);
-
- status = (* pPort->pAdaptor->ddStopVideo)(client, pPort, pPort->pDraw);
-
- pPort->pDraw = NULL;
- pPort->client = (ClientPtr)client;
- pPort->time = currentTime;
-
- return status;
-
-}
-
-int
-XvdiMatchPort(
- XvPortPtr pPort,
- DrawablePtr pDraw
-){
-
- XvAdaptorPtr pa;
- XvFormatPtr pf;
- int nf;
-
- pa = pPort->pAdaptor;
-
- if (pa->pScreen != pDraw->pScreen) return BadMatch;
-
- nf = pa->nFormats;
- pf = pa->pFormats;
-
- while (nf--)
- {
- if ((pf->depth == pDraw->depth)
-#if 0
- && ((pDraw->type == DRAWABLE_PIXMAP) ||
- (wVisual(((WindowPtr)pDraw)) == pf->visual))
-#endif
- )
- return Success;
- pf++;
- }
-
- return BadMatch;
-
-}
-
-int
-XvdiSetPortAttribute(
- ClientPtr client,
- XvPortPtr pPort,
- Atom attribute,
- INT32 value
-){
- int status;
-
- status = (* pPort->pAdaptor->ddSetPortAttribute)(client, pPort, attribute, value);
- if (status == Success)
- XvdiSendPortNotify(pPort, attribute, value);
-
- return status;
-}
-
-int
-XvdiGetPortAttribute(
- ClientPtr client,
- XvPortPtr pPort,
- Atom attribute,
- INT32 *p_value
-){
-
- return
- (* pPort->pAdaptor->ddGetPortAttribute)(client, pPort, attribute, p_value);
-
-}
-
-static void
-WriteSwappedVideoNotifyEvent(xvEvent *from, xvEvent *to)
-
-{
-
- to->u.u.type = from->u.u.type;
- to->u.u.detail = from->u.u.detail;
- cpswaps(from->u.videoNotify.sequenceNumber,
- to->u.videoNotify.sequenceNumber);
- cpswapl(from->u.videoNotify.time, to->u.videoNotify.time);
- cpswapl(from->u.videoNotify.drawable, to->u.videoNotify.drawable);
- cpswapl(from->u.videoNotify.port, to->u.videoNotify.port);
-
-}
-
-static void
-WriteSwappedPortNotifyEvent(xvEvent *from, xvEvent *to)
-
-{
-
- to->u.u.type = from->u.u.type;
- to->u.u.detail = from->u.u.detail;
- cpswaps(from->u.portNotify.sequenceNumber, to->u.portNotify.sequenceNumber);
- cpswapl(from->u.portNotify.time, to->u.portNotify.time);
- cpswapl(from->u.portNotify.port, to->u.portNotify.port);
- cpswapl(from->u.portNotify.value, to->u.portNotify.value);
-
-}
+/***********************************************************
+Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/*
+** File:
+**
+** xvmain.c --- Xv server extension main device independent module.
+**
+** Author:
+**
+** David Carver (Digital Workstation Engineering/Project Athena)
+**
+** Revisions:
+**
+** 04.09.91 Carver
+** - change: stop video always generates an event even when video
+** wasn't active
+**
+** 29.08.91 Carver
+** - change: unrealizing windows no longer preempts video
+**
+** 11.06.91 Carver
+** - changed SetPortControl to SetPortAttribute
+** - changed GetPortControl to GetPortAttribute
+** - changed QueryBestSize
+**
+** 28.05.91 Carver
+** - fixed Put and Get requests to not preempt operations to same drawable
+**
+** 15.05.91 Carver
+** - version 2.0 upgrade
+**
+** 19.03.91 Carver
+** - fixed Put and Get requests to honor grabbed ports.
+** - fixed Video requests to update di structure with new drawable, and
+** client after calling ddx.
+**
+** 24.01.91 Carver
+** - version 1.4 upgrade
+**
+** Notes:
+**
+** Port structures reference client structures in a two different
+** ways: when grabs, or video is active. Each reference is encoded
+** as fake client resources and thus when the client is goes away so
+** does the reference (it is zeroed). No other action is taken, so
+** video doesn't necessarily stop. It probably will as a result of
+** other resources going away, but if a client starts video using
+** none of its own resources, then the video will continue to play
+** after the client disappears.
+**
+**
+*/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <string.h>
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "os.h"
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include "pixmapstr.h"
+#include "gc.h"
+#include "extnsionst.h"
+#include "dixstruct.h"
+#include "resource.h"
+#include "opaque.h"
+#include "input.h"
+
+#define GLOBAL
+
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/Xvproto.h>
+#include "xvdix.h"
+
+#ifdef PANORAMIX
+#include "panoramiX.h"
+#include "panoramiXsrv.h"
+#endif
+#include "xvdisp.h"
+
+static DevPrivateKeyRec XvScreenKeyRec;
+#define XvScreenKey (&XvScreenKeyRec)
+unsigned long XvExtensionGeneration = 0;
+unsigned long XvScreenGeneration = 0;
+unsigned long XvResourceGeneration = 0;
+
+int XvReqCode;
+int XvEventBase;
+int XvErrorBase;
+
+RESTYPE XvRTPort;
+RESTYPE XvRTEncoding;
+RESTYPE XvRTGrab;
+RESTYPE XvRTVideoNotify;
+RESTYPE XvRTVideoNotifyList;
+RESTYPE XvRTPortNotify;
+
+/* EXTERNAL */
+
+static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *);
+static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *);
+static Bool CreateResourceTypes(void);
+
+static Bool XvCloseScreen(int, ScreenPtr);
+static Bool XvDestroyPixmap(PixmapPtr);
+static Bool XvDestroyWindow(WindowPtr);
+static void XvResetProc(ExtensionEntry*);
+static int XvdiDestroyGrab(pointer, XID);
+static int XvdiDestroyEncoding(pointer, XID);
+static int XvdiDestroyVideoNotify(pointer, XID);
+static int XvdiDestroyPortNotify(pointer, XID);
+static int XvdiDestroyVideoNotifyList(pointer, XID);
+static int XvdiDestroyPort(pointer, XID);
+static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int);
+
+
+
+
+/*
+** XvExtensionInit
+**
+**
+*/
+
+void
+XvExtensionInit(void)
+{
+ ExtensionEntry *extEntry;
+
+ if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0))
+ return;
+
+ /* LOOK TO SEE IF ANY SCREENS WERE INITIALIZED; IF NOT THEN
+ INIT GLOBAL VARIABLES SO THE EXTENSION CAN FUNCTION */
+ if (XvScreenGeneration != serverGeneration)
+ {
+ if (!CreateResourceTypes())
+ {
+ ErrorF("XvExtensionInit: Unable to allocate resource types\n");
+ return;
+ }
+#ifdef PANORAMIX
+ XineramaRegisterConnectionBlockCallback(XineramifyXv);
+#endif
+ XvScreenGeneration = serverGeneration;
+ }
+
+ if (XvExtensionGeneration != serverGeneration)
+ {
+ XvExtensionGeneration = serverGeneration;
+
+ extEntry = AddExtension(XvName, XvNumEvents, XvNumErrors,
+ ProcXvDispatch, SProcXvDispatch,
+ XvResetProc, StandardMinorOpcode);
+ if (!extEntry)
+ {
+ FatalError("XvExtensionInit: AddExtensions failed\n");
+ }
+
+ XvReqCode = extEntry->base;
+ XvEventBase = extEntry->eventBase;
+ XvErrorBase = extEntry->errorBase;
+
+ EventSwapVector[XvEventBase+XvVideoNotify] =
+ (EventSwapPtr)WriteSwappedVideoNotifyEvent;
+ EventSwapVector[XvEventBase+XvPortNotify] =
+ (EventSwapPtr)WriteSwappedPortNotifyEvent;
+
+ SetResourceTypeErrorValue(XvRTPort, _XvBadPort);
+ (void)MakeAtom(XvName, strlen(XvName), xTrue);
+
+ }
+}
+
+static Bool
+CreateResourceTypes(void)
+
+{
+
+ if (XvResourceGeneration == serverGeneration) return TRUE;
+
+ XvResourceGeneration = serverGeneration;
+
+ if (!(XvRTPort = CreateNewResourceType(XvdiDestroyPort, "XvRTPort")))
+ {
+ ErrorF("CreateResourceTypes: failed to allocate port resource.\n");
+ return FALSE;
+ }
+
+ if (!(XvRTGrab = CreateNewResourceType(XvdiDestroyGrab, "XvRTGrab")))
+ {
+ ErrorF("CreateResourceTypes: failed to allocate grab resource.\n");
+ return FALSE;
+ }
+
+ if (!(XvRTEncoding = CreateNewResourceType(XvdiDestroyEncoding,
+ "XvRTEncoding")))
+ {
+ ErrorF("CreateResourceTypes: failed to allocate encoding resource.\n");
+ return FALSE;
+ }
+
+ if (!(XvRTVideoNotify = CreateNewResourceType(XvdiDestroyVideoNotify,
+ "XvRTVideoNotify")))
+ {
+ ErrorF("CreateResourceTypes: failed to allocate video notify resource.\n");
+ return FALSE;
+ }
+
+ if (!(XvRTVideoNotifyList = CreateNewResourceType(XvdiDestroyVideoNotifyList,
+ "XvRTVideoNotifyList")))
+ {
+ ErrorF("CreateResourceTypes: failed to allocate video notify list resource.\n");
+ return FALSE;
+ }
+
+ if (!(XvRTPortNotify = CreateNewResourceType(XvdiDestroyPortNotify,
+ "XvRTPortNotify")))
+ {
+ ErrorF("CreateResourceTypes: failed to allocate port notify resource.\n");
+ return FALSE;
+ }
+
+ return TRUE;
+
+}
+
+int
+XvScreenInit(ScreenPtr pScreen)
+{
+ XvScreenPtr pxvs;
+
+ if (XvScreenGeneration != serverGeneration)
+ {
+ if (!CreateResourceTypes())
+ {
+ ErrorF("XvScreenInit: Unable to allocate resource types\n");
+ return BadAlloc;
+ }
+#ifdef PANORAMIX
+ XineramaRegisterConnectionBlockCallback(XineramifyXv);
+#endif
+ XvScreenGeneration = serverGeneration;
+ }
+
+ if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0))
+ return BadAlloc;
+
+ if (dixLookupPrivate(&pScreen->devPrivates, XvScreenKey))
+ {
+ ErrorF("XvScreenInit: screen devPrivates ptr non-NULL before init\n");
+ }
+
+ /* ALLOCATE SCREEN PRIVATE RECORD */
+
+ pxvs = calloc (1,sizeof (XvScreenRec));
+ if (!pxvs)
+ {
+ ErrorF("XvScreenInit: Unable to allocate screen private structure\n");
+ return BadAlloc;
+ }
+
+ dixSetPrivate(&pScreen->devPrivates, XvScreenKey, pxvs);
+
+ pxvs->DestroyPixmap = pScreen->DestroyPixmap;
+ pxvs->DestroyWindow = pScreen->DestroyWindow;
+ pxvs->CloseScreen = pScreen->CloseScreen;
+
+ pScreen->DestroyPixmap = XvDestroyPixmap;
+ pScreen->DestroyWindow = XvDestroyWindow;
+ pScreen->CloseScreen = XvCloseScreen;
+
+ return Success;
+}
+
+static Bool
+XvCloseScreen(
+ int ii,
+ ScreenPtr pScreen
+){
+
+ XvScreenPtr pxvs;
+
+ pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
+
+ pScreen->DestroyPixmap = pxvs->DestroyPixmap;
+ pScreen->DestroyWindow = pxvs->DestroyWindow;
+ pScreen->CloseScreen = pxvs->CloseScreen;
+
+ if (pxvs->ddCloseScreen) (* pxvs->ddCloseScreen)(ii, pScreen);
+
+ free(pxvs);
+
+ dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL);
+
+ return (*pScreen->CloseScreen)(ii, pScreen);
+}
+
+static void
+XvResetProc(ExtensionEntry* extEntry)
+{
+ XvResetProcVector();
+}
+
+DevPrivateKey
+XvGetScreenKey(void)
+{
+ return XvScreenKey;
+}
+
+unsigned long
+XvGetRTPort(void)
+{
+ return XvRTPort;
+}
+
+static Bool
+XvDestroyPixmap(PixmapPtr pPix)
+{
+ Bool status;
+ ScreenPtr pScreen;
+ XvScreenPtr pxvs;
+ XvAdaptorPtr pa;
+ int na;
+ XvPortPtr pp;
+ int np;
+
+ pScreen = pPix->drawable.pScreen;
+
+ SCREEN_PROLOGUE(pScreen, DestroyPixmap);
+
+ pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
+
+ /* CHECK TO SEE IF THIS PORT IS IN USE */
+
+ pa = pxvs->pAdaptors;
+ na = pxvs->nAdaptors;
+ while (na--)
+ {
+ np = pa->nPorts;
+ pp = pa->pPorts;
+
+ while (np--)
+ {
+ if (pp->pDraw == (DrawablePtr)pPix)
+ {
+ XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
+
+ (void)(* pp->pAdaptor->ddStopVideo)(NULL, pp, pp->pDraw);
+
+ pp->pDraw = NULL;
+ pp->client = NULL;
+ pp->time = currentTime;
+ }
+ pp++;
+ }
+ pa++;
+ }
+
+ status = (* pScreen->DestroyPixmap)(pPix);
+
+ SCREEN_EPILOGUE(pScreen, DestroyPixmap, XvDestroyPixmap);
+
+ return status;
+
+}
+
+static Bool
+XvDestroyWindow(WindowPtr pWin)
+{
+ Bool status;
+ ScreenPtr pScreen;
+ XvScreenPtr pxvs;
+ XvAdaptorPtr pa;
+ int na;
+ XvPortPtr pp;
+ int np;
+
+ pScreen = pWin->drawable.pScreen;
+
+ SCREEN_PROLOGUE(pScreen, DestroyWindow);
+
+ pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
+
+ /* CHECK TO SEE IF THIS PORT IS IN USE */
+
+ pa = pxvs->pAdaptors;
+ na = pxvs->nAdaptors;
+ while (na--)
+ {
+ np = pa->nPorts;
+ pp = pa->pPorts;
+
+ while (np--)
+ {
+ if (pp->pDraw == (DrawablePtr)pWin)
+ {
+ XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
+
+ (void)(* pp->pAdaptor->ddStopVideo)(NULL, pp, pp->pDraw);
+
+ pp->pDraw = NULL;
+ pp->client = NULL;
+ pp->time = currentTime;
+ }
+ pp++;
+ }
+ pa++;
+ }
+
+
+ status = (* pScreen->DestroyWindow)(pWin);
+
+ SCREEN_EPILOGUE(pScreen, DestroyWindow, XvDestroyWindow);
+
+ return status;
+
+}
+
+/* The XvdiVideoStopped procedure is a hook for the device dependent layer.
+ It provides a way for the dd layer to inform the di layer that video has
+ stopped in a port for reasons that the di layer had no control over; note
+ that it doesn't call back into the dd layer */
+
+int
+XvdiVideoStopped(XvPortPtr pPort, int reason)
+{
+
+ /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */
+
+ if (!pPort->pDraw) return Success;
+
+ XvdiSendVideoNotify(pPort, pPort->pDraw, reason);
+
+ pPort->pDraw = NULL;
+ pPort->client = NULL;
+ pPort->time = currentTime;
+
+ return Success;
+
+}
+
+static int
+XvdiDestroyPort(pointer pPort, XID id)
+{
+ return (* ((XvPortPtr)pPort)->pAdaptor->ddFreePort)(pPort);
+}
+
+static int
+XvdiDestroyGrab(pointer pGrab, XID id)
+{
+ ((XvGrabPtr)pGrab)->client = NULL;
+ return Success;
+}
+
+static int
+XvdiDestroyVideoNotify(pointer pn, XID id)
+{
+ /* JUST CLEAR OUT THE client POINTER FIELD */
+
+ ((XvVideoNotifyPtr)pn)->client = NULL;
+ return Success;
+}
+
+static int
+XvdiDestroyPortNotify(pointer pn, XID id)
+{
+ /* JUST CLEAR OUT THE client POINTER FIELD */
+
+ ((XvPortNotifyPtr)pn)->client = NULL;
+ return Success;
+}
+
+static int
+XvdiDestroyVideoNotifyList(pointer pn, XID id)
+{
+ XvVideoNotifyPtr npn,cpn;
+
+ /* ACTUALLY DESTROY THE NOTITY LIST */
+
+ cpn = (XvVideoNotifyPtr)pn;
+
+ while (cpn)
+ {
+ npn = cpn->next;
+ if (cpn->client) FreeResource(cpn->id, XvRTVideoNotify);
+ free(cpn);
+ cpn = npn;
+ }
+ return Success;
+}
+
+static int
+XvdiDestroyEncoding(pointer value, XID id)
+{
+ return Success;
+}
+
+static int
+XvdiSendVideoNotify(XvPortPtr pPort, DrawablePtr pDraw, int reason)
+{
+ xvEvent event;
+ XvVideoNotifyPtr pn;
+
+ dixLookupResourceByType((pointer *)&pn, pDraw->id, XvRTVideoNotifyList,
+ serverClient, DixReadAccess);
+
+ while (pn)
+ {
+ event.u.u.type = XvEventBase + XvVideoNotify;
+ event.u.videoNotify.time = currentTime.milliseconds;
+ event.u.videoNotify.drawable = pDraw->id;
+ event.u.videoNotify.port = pPort->id;
+ event.u.videoNotify.reason = reason;
+ WriteEventsToClient(pn->client, 1, (xEventPtr)&event);
+ pn = pn->next;
+ }
+
+ return Success;
+
+}
+
+
+int
+XvdiSendPortNotify(
+ XvPortPtr pPort,
+ Atom attribute,
+ INT32 value
+){
+ xvEvent event;
+ XvPortNotifyPtr pn;
+
+ pn = pPort->pNotify;
+
+ while (pn)
+ {
+ event.u.u.type = XvEventBase + XvPortNotify;
+ event.u.portNotify.time = currentTime.milliseconds;
+ event.u.portNotify.port = pPort->id;
+ event.u.portNotify.attribute = attribute;
+ event.u.portNotify.value = value;
+ WriteEventsToClient(pn->client, 1, (xEventPtr)&event);
+ pn = pn->next;
+ }
+
+ return Success;
+
+}
+
+
+#define CHECK_SIZE(dw, dh, sw, sh) { \
+ if(!dw || !dh || !sw || !sh) return Success; \
+ /* The region code will break these if they are too large */ \
+ if((dw > 32767) || (dh > 32767) || (sw > 32767) || (sh > 32767)) \
+ return BadValue; \
+}
+
+
+int
+XvdiPutVideo(
+ ClientPtr client,
+ DrawablePtr pDraw,
+ XvPortPtr pPort,
+ GCPtr pGC,
+ INT16 vid_x, INT16 vid_y,
+ CARD16 vid_w, CARD16 vid_h,
+ INT16 drw_x, INT16 drw_y,
+ CARD16 drw_w, CARD16 drw_h
+){
+ DrawablePtr pOldDraw;
+
+ CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
+
+ /* UPDATE TIME VARIABLES FOR USE IN EVENTS */
+
+ UpdateCurrentTime();
+
+ /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
+ INFORM CLIENT OF ITS FAILURE */
+
+ if (pPort->grab.client && (pPort->grab.client != client))
+ {
+ XvdiSendVideoNotify(pPort, pDraw, XvBusy);
+ return Success;
+ }
+
+ /* CHECK TO SEE IF PORT IS IN USE; IF SO THEN WE MUST DELIVER INTERRUPTED
+ EVENTS TO ANY CLIENTS WHO WANT THEM */
+
+ pOldDraw = pPort->pDraw;
+ if ((pOldDraw) && (pOldDraw != pDraw))
+ {
+ XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted);
+ }
+
+ (void) (* pPort->pAdaptor->ddPutVideo)(client, pDraw, pPort, pGC,
+ vid_x, vid_y, vid_w, vid_h,
+ drw_x, drw_y, drw_w, drw_h);
+
+ if ((pPort->pDraw) && (pOldDraw != pDraw))
+ {
+ pPort->client = client;
+ XvdiSendVideoNotify(pPort, pPort->pDraw, XvStarted);
+ }
+
+ pPort->time = currentTime;
+
+ return Success;
+
+}
+
+int
+XvdiPutStill(
+ ClientPtr client,
+ DrawablePtr pDraw,
+ XvPortPtr pPort,
+ GCPtr pGC,
+ INT16 vid_x, INT16 vid_y,
+ CARD16 vid_w, CARD16 vid_h,
+ INT16 drw_x, INT16 drw_y,
+ CARD16 drw_w, CARD16 drw_h
+){
+ int status;
+
+ CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
+
+ /* UPDATE TIME VARIABLES FOR USE IN EVENTS */
+
+ UpdateCurrentTime();
+
+ /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
+ INFORM CLIENT OF ITS FAILURE */
+
+ if (pPort->grab.client && (pPort->grab.client != client))
+ {
+ XvdiSendVideoNotify(pPort, pDraw, XvBusy);
+ return Success;
+ }
+
+ pPort->time = currentTime;
+
+ status = (* pPort->pAdaptor->ddPutStill)(client, pDraw, pPort, pGC,
+ vid_x, vid_y, vid_w, vid_h,
+ drw_x, drw_y, drw_w, drw_h);
+
+ return status;
+
+}
+
+int
+XvdiPutImage(
+ ClientPtr client,
+ DrawablePtr pDraw,
+ XvPortPtr pPort,
+ GCPtr pGC,
+ INT16 src_x, INT16 src_y,
+ CARD16 src_w, CARD16 src_h,
+ INT16 drw_x, INT16 drw_y,
+ CARD16 drw_w, CARD16 drw_h,
+ XvImagePtr image,
+ unsigned char* data,
+ Bool sync,
+ CARD16 width, CARD16 height
+){
+ CHECK_SIZE(drw_w, drw_h, src_w, src_h);
+
+ /* UPDATE TIME VARIABLES FOR USE IN EVENTS */
+
+ UpdateCurrentTime();
+
+ /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
+ INFORM CLIENT OF ITS FAILURE */
+
+ if (pPort->grab.client && (pPort->grab.client != client))
+ {
+ XvdiSendVideoNotify(pPort, pDraw, XvBusy);
+ return Success;
+ }
+
+ pPort->time = currentTime;
+
+ return (* pPort->pAdaptor->ddPutImage)(client, pDraw, pPort, pGC,
+ src_x, src_y, src_w, src_h,
+ drw_x, drw_y, drw_w, drw_h,
+ image, data, sync, width, height);
+}
+
+
+int
+XvdiGetVideo(
+ ClientPtr client,
+ DrawablePtr pDraw,
+ XvPortPtr pPort,
+ GCPtr pGC,
+ INT16 vid_x, INT16 vid_y,
+ CARD16 vid_w, CARD16 vid_h,
+ INT16 drw_x, INT16 drw_y,
+ CARD16 drw_w, CARD16 drw_h
+){
+ DrawablePtr pOldDraw;
+
+ CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
+
+ /* UPDATE TIME VARIABLES FOR USE IN EVENTS */
+
+ UpdateCurrentTime();
+
+ /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
+ INFORM CLIENT OF ITS FAILURE */
+
+ if (pPort->grab.client && (pPort->grab.client != client))
+ {
+ XvdiSendVideoNotify(pPort, pDraw, XvBusy);
+ return Success;
+ }
+
+ /* CHECK TO SEE IF PORT IS IN USE; IF SO THEN WE MUST DELIVER INTERRUPTED
+ EVENTS TO ANY CLIENTS WHO WANT THEM */
+
+ pOldDraw = pPort->pDraw;
+ if ((pOldDraw) && (pOldDraw != pDraw))
+ {
+ XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted);
+ }
+
+ (void) (* pPort->pAdaptor->ddGetVideo)(client, pDraw, pPort, pGC,
+ vid_x, vid_y, vid_w, vid_h,
+ drw_x, drw_y, drw_w, drw_h);
+
+ if ((pPort->pDraw) && (pOldDraw != pDraw))
+ {
+ pPort->client = client;
+ XvdiSendVideoNotify(pPort, pPort->pDraw, XvStarted);
+ }
+
+ pPort->time = currentTime;
+
+ return Success;
+
+}
+
+int
+XvdiGetStill(
+ ClientPtr client,
+ DrawablePtr pDraw,
+ XvPortPtr pPort,
+ GCPtr pGC,
+ INT16 vid_x, INT16 vid_y,
+ CARD16 vid_w, CARD16 vid_h,
+ INT16 drw_x, INT16 drw_y,
+ CARD16 drw_w, CARD16 drw_h
+){
+ int status;
+
+ CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
+
+ /* UPDATE TIME VARIABLES FOR USE IN EVENTS */
+
+ UpdateCurrentTime();
+
+ /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
+ INFORM CLIENT OF ITS FAILURE */
+
+ if (pPort->grab.client && (pPort->grab.client != client))
+ {
+ XvdiSendVideoNotify(pPort, pDraw, XvBusy);
+ return Success;
+ }
+
+ status = (* pPort->pAdaptor->ddGetStill)(client, pDraw, pPort, pGC,
+ vid_x, vid_y, vid_w, vid_h,
+ drw_x, drw_y, drw_w, drw_h);
+
+ pPort->time = currentTime;
+
+ return status;
+
+}
+
+int
+XvdiGrabPort(
+ ClientPtr client,
+ XvPortPtr pPort,
+ Time ctime,
+ int *p_result
+){
+ unsigned long id;
+ TimeStamp time;
+
+ UpdateCurrentTime();
+ time = ClientTimeToServerTime(ctime);
+
+ if (pPort->grab.client && (client != pPort->grab.client))
+ {
+ *p_result = XvAlreadyGrabbed;
+ return Success;
+ }
+
+ if ((CompareTimeStamps(time, currentTime) == LATER) ||
+ (CompareTimeStamps(time, pPort->time) == EARLIER))
+ {
+ *p_result = XvInvalidTime;
+ return Success;
+ }
+
+ if (client == pPort->grab.client)
+ {
+ *p_result = Success;
+ return Success;
+ }
+
+ id = FakeClientID(client->index);
+
+ if (!AddResource(id, XvRTGrab, &pPort->grab))
+ {
+ return BadAlloc;
+ }
+
+ /* IF THERE IS ACTIVE VIDEO THEN STOP IT */
+
+ if ((pPort->pDraw) && (client != pPort->client))
+ {
+ XvdiStopVideo(NULL, pPort, pPort->pDraw);
+ }
+
+ pPort->grab.client = client;
+ pPort->grab.id = id;
+
+ pPort->time = currentTime;
+
+ *p_result = Success;
+
+ return Success;
+
+}
+
+int
+XvdiUngrabPort(
+ ClientPtr client,
+ XvPortPtr pPort,
+ Time ctime
+){
+ TimeStamp time;
+
+ UpdateCurrentTime();
+ time = ClientTimeToServerTime(ctime);
+
+ if ((!pPort->grab.client) || (client != pPort->grab.client))
+ {
+ return Success;
+ }
+
+ if ((CompareTimeStamps(time, currentTime) == LATER) ||
+ (CompareTimeStamps(time, pPort->time) == EARLIER))
+ {
+ return Success;
+ }
+
+ /* FREE THE GRAB RESOURCE; AND SET THE GRAB CLIENT TO NULL */
+
+ FreeResource(pPort->grab.id, XvRTGrab);
+ pPort->grab.client = NULL;
+
+ pPort->time = currentTime;
+
+ return Success;
+
+}
+
+
+int
+XvdiSelectVideoNotify(
+ ClientPtr client,
+ DrawablePtr pDraw,
+ BOOL onoff
+){
+ XvVideoNotifyPtr pn,tpn,fpn;
+ int rc;
+
+ /* FIND VideoNotify LIST */
+
+ rc = dixLookupResourceByType((pointer *)&pn, pDraw->id, XvRTVideoNotifyList,
+ client, DixWriteAccess);
+ if (rc != Success && rc != BadValue)
+ return rc;
+
+ /* IF ONE DONES'T EXIST AND NO MASK, THEN JUST RETURN */
+
+ if (!onoff && !pn) return Success;
+
+ /* IF ONE DOESN'T EXIST CREATE IT AND ADD A RESOURCE SO THAT THE LIST
+ WILL BE DELETED WHEN THE DRAWABLE IS DESTROYED */
+
+ if (!pn)
+ {
+ if (!(tpn = malloc(sizeof(XvVideoNotifyRec))))
+ return BadAlloc;
+ tpn->next = NULL;
+ if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn))
+ {
+ free(tpn);
+ return BadAlloc;
+ }
+ }
+ else
+ {
+ /* LOOK TO SEE IF ENTRY ALREADY EXISTS */
+
+ fpn = NULL;
+ tpn = pn;
+ while (tpn)
+ {
+ if (tpn->client == client)
+ {
+ if (!onoff) tpn->client = NULL;
+ return Success;
+ }
+ if (!tpn->client) fpn = tpn; /* TAKE NOTE OF FREE ENTRY */
+ tpn = tpn->next;
+ }
+
+ /* IF TUNNING OFF, THEN JUST RETURN */
+
+ if (!onoff) return Success;
+
+ /* IF ONE ISN'T FOUND THEN ALLOCATE ONE AND LINK IT INTO THE LIST */
+
+ if (fpn)
+ {
+ tpn = fpn;
+ }
+ else
+ {
+ if (!(tpn = malloc(sizeof(XvVideoNotifyRec))))
+ return BadAlloc;
+ tpn->next = pn->next;
+ pn->next = tpn;
+ }
+ }
+
+ /* INIT CLIENT PTR IN CASE WE CAN'T ADD RESOURCE */
+ /* ADD RESOURCE SO THAT IF CLIENT EXITS THE CLIENT PTR WILL BE CLEARED */
+
+ tpn->client = NULL;
+ tpn->id = FakeClientID(client->index);
+ AddResource(tpn->id, XvRTVideoNotify, tpn);
+
+ tpn->client = client;
+ return Success;
+
+}
+
+int
+XvdiSelectPortNotify(
+ ClientPtr client,
+ XvPortPtr pPort,
+ BOOL onoff
+){
+ XvPortNotifyPtr pn,tpn;
+
+ /* SEE IF CLIENT IS ALREADY IN LIST */
+
+ tpn = NULL;
+ pn = pPort->pNotify;
+ while (pn)
+ {
+ if (!pn->client) tpn = pn; /* TAKE NOTE OF FREE ENTRY */
+ if (pn->client == client) break;
+ pn = pn->next;
+ }
+
+ /* IS THE CLIENT ALREADY ON THE LIST? */
+
+ if (pn)
+ {
+ /* REMOVE IT? */
+
+ if (!onoff)
+ {
+ pn->client = NULL;
+ FreeResource(pn->id, XvRTPortNotify);
+ }
+
+ return Success;
+ }
+
+ /* DIDN'T FIND IT; SO REUSE LIST ELEMENT IF ONE IS FREE OTHERWISE
+ CREATE A NEW ONE AND ADD IT TO THE BEGINNING OF THE LIST */
+
+ if (!tpn)
+ {
+ if (!(tpn = malloc(sizeof(XvPortNotifyRec))))
+ return BadAlloc;
+ tpn->next = pPort->pNotify;
+ pPort->pNotify = tpn;
+ }
+
+ tpn->client = client;
+ tpn->id = FakeClientID(client->index);
+ AddResource(tpn->id, XvRTPortNotify, tpn);
+
+ return Success;
+
+}
+
+int
+XvdiStopVideo(
+ ClientPtr client,
+ XvPortPtr pPort,
+ DrawablePtr pDraw
+){
+ int status;
+
+ /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */
+
+ if (!pPort->pDraw || (pPort->pDraw != pDraw))
+ {
+ XvdiSendVideoNotify(pPort, pDraw, XvStopped);
+ return Success;
+ }
+
+ /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN
+ INFORM CLIENT OF ITS FAILURE */
+
+ if ((client) && (pPort->grab.client) && (pPort->grab.client != client))
+ {
+ XvdiSendVideoNotify(pPort, pDraw, XvBusy);
+ return Success;
+ }
+
+ XvdiSendVideoNotify(pPort, pDraw, XvStopped);
+
+ status = (* pPort->pAdaptor->ddStopVideo)(client, pPort, pDraw);
+
+ pPort->pDraw = NULL;
+ pPort->client = (ClientPtr)client;
+ pPort->time = currentTime;
+
+ return status;
+
+}
+
+int
+XvdiPreemptVideo(
+ ClientPtr client,
+ XvPortPtr pPort,
+ DrawablePtr pDraw
+){
+ int status;
+
+ /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */
+
+ if (!pPort->pDraw || (pPort->pDraw != pDraw)) return Success;
+
+ XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted);
+
+ status = (* pPort->pAdaptor->ddStopVideo)(client, pPort, pPort->pDraw);
+
+ pPort->pDraw = NULL;
+ pPort->client = (ClientPtr)client;
+ pPort->time = currentTime;
+
+ return status;
+
+}
+
+int
+XvdiMatchPort(
+ XvPortPtr pPort,
+ DrawablePtr pDraw
+){
+
+ XvAdaptorPtr pa;
+ XvFormatPtr pf;
+ int nf;
+
+ pa = pPort->pAdaptor;
+
+ if (pa->pScreen != pDraw->pScreen) return BadMatch;
+
+ nf = pa->nFormats;
+ pf = pa->pFormats;
+
+ while (nf--)
+ {
+ if ((pf->depth == pDraw->depth)
+#if 0
+ && ((pDraw->type == DRAWABLE_PIXMAP) ||
+ (wVisual(((WindowPtr)pDraw)) == pf->visual))
+#endif
+ )
+ return Success;
+ pf++;
+ }
+
+ return BadMatch;
+
+}
+
+int
+XvdiSetPortAttribute(
+ ClientPtr client,
+ XvPortPtr pPort,
+ Atom attribute,
+ INT32 value
+){
+ int status;
+
+ status = (* pPort->pAdaptor->ddSetPortAttribute)(client, pPort, attribute, value);
+ if (status == Success)
+ XvdiSendPortNotify(pPort, attribute, value);
+
+ return status;
+}
+
+int
+XvdiGetPortAttribute(
+ ClientPtr client,
+ XvPortPtr pPort,
+ Atom attribute,
+ INT32 *p_value
+){
+
+ return
+ (* pPort->pAdaptor->ddGetPortAttribute)(client, pPort, attribute, p_value);
+
+}
+
+static void
+WriteSwappedVideoNotifyEvent(xvEvent *from, xvEvent *to)
+
+{
+
+ to->u.u.type = from->u.u.type;
+ to->u.u.detail = from->u.u.detail;
+ cpswaps(from->u.videoNotify.sequenceNumber,
+ to->u.videoNotify.sequenceNumber);
+ cpswapl(from->u.videoNotify.time, to->u.videoNotify.time);
+ cpswapl(from->u.videoNotify.drawable, to->u.videoNotify.drawable);
+ cpswapl(from->u.videoNotify.port, to->u.videoNotify.port);
+
+}
+
+static void
+WriteSwappedPortNotifyEvent(xvEvent *from, xvEvent *to)
+
+{
+
+ to->u.u.type = from->u.u.type;
+ to->u.u.detail = from->u.u.detail;
+ cpswaps(from->u.portNotify.sequenceNumber, to->u.portNotify.sequenceNumber);
+ cpswapl(from->u.portNotify.time, to->u.portNotify.time);
+ cpswapl(from->u.portNotify.port, to->u.portNotify.port);
+ cpswapl(from->u.portNotify.value, to->u.portNotify.value);
+
+}
diff --git a/xorg-server/Xext/xvmc.c b/xorg-server/Xext/xvmc.c
index 4d29941ee..0a0e9415e 100644
--- a/xorg-server/Xext/xvmc.c
+++ b/xorg-server/Xext/xvmc.c
@@ -1,789 +1,789 @@
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <string.h>
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "os.h"
-#include "dixstruct.h"
-#include "resource.h"
-#include "scrnintstr.h"
-#include "extnsionst.h"
-#include "servermd.h"
-#include <X11/Xfuncproto.h>
-#include "xvdix.h"
-#include <X11/extensions/XvMC.h>
-#include <X11/extensions/Xvproto.h>
-#include <X11/extensions/XvMCproto.h>
-#include "xvmcext.h"
-#include "protocol-versions.h"
-
-#ifdef HAS_XVMCSHM
-#include <sys/ipc.h>
-#include <sys/types.h>
-#include <sys/shm.h>
-#endif /* HAS_XVMCSHM */
-
-
-
-#define DR_CLIENT_DRIVER_NAME_SIZE 48
-#define DR_BUSID_SIZE 48
-
-static DevPrivateKeyRec XvMCScreenKeyRec;
-#define XvMCScreenKey (&XvMCScreenKeyRec)
-static Bool XvMCInUse;
-
-unsigned long XvMCGeneration = 0;
-
-int XvMCReqCode;
-int XvMCEventBase;
-
-static RESTYPE XvMCRTContext;
-static RESTYPE XvMCRTSurface;
-static RESTYPE XvMCRTSubpicture;
-
-typedef struct {
- int num_adaptors;
- XvMCAdaptorPtr adaptors;
- CloseScreenProcPtr CloseScreen;
- char clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE];
- char busID[DR_BUSID_SIZE];
- int major;
- int minor;
- int patchLevel;
-} XvMCScreenRec, *XvMCScreenPtr;
-
-#define XVMC_GET_PRIVATE(pScreen) \
- (XvMCScreenPtr)(dixLookupPrivate(&(pScreen)->devPrivates, XvMCScreenKey))
-
-
-static int
-XvMCDestroyContextRes(pointer data, XID id)
-{
- XvMCContextPtr pContext = (XvMCContextPtr)data;
-
- pContext->refcnt--;
-
- if(!pContext->refcnt) {
- XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
- (*pScreenPriv->adaptors[pContext->adapt_num].DestroyContext)(pContext);
- free(pContext);
- }
-
- return Success;
-}
-
-static int
-XvMCDestroySurfaceRes(pointer data, XID id)
-{
- XvMCSurfacePtr pSurface = (XvMCSurfacePtr)data;
- XvMCContextPtr pContext = pSurface->context;
- XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
-
- (*pScreenPriv->adaptors[pContext->adapt_num].DestroySurface)(pSurface);
- free(pSurface);
-
- XvMCDestroyContextRes((pointer)pContext, pContext->context_id);
-
- return Success;
-}
-
-
-static int
-XvMCDestroySubpictureRes(pointer data, XID id)
-{
- XvMCSubpicturePtr pSubpict = (XvMCSubpicturePtr)data;
- XvMCContextPtr pContext = pSubpict->context;
- XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
-
- (*pScreenPriv->adaptors[pContext->adapt_num].DestroySubpicture)(pSubpict);
- free(pSubpict);
-
- XvMCDestroyContextRes((pointer)pContext, pContext->context_id);
-
- return Success;
-}
-
-static int
-ProcXvMCQueryVersion(ClientPtr client)
-{
- xvmcQueryVersionReply rep;
- /* REQUEST(xvmcQueryVersionReq); */
- REQUEST_SIZE_MATCH(xvmcQueryVersionReq);
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.major = SERVER_XVMC_MAJOR_VERSION;
- rep.minor = SERVER_XVMC_MINOR_VERSION;
- WriteToClient(client, sizeof(xvmcQueryVersionReply), (char*)&rep);
- return Success;
-}
-
-
-static int
-ProcXvMCListSurfaceTypes(ClientPtr client)
-{
- XvPortPtr pPort;
- int i;
- XvMCScreenPtr pScreenPriv;
- xvmcListSurfaceTypesReply rep;
- xvmcSurfaceInfo info;
- XvMCAdaptorPtr adaptor = NULL;
- XvMCSurfaceInfoPtr surface;
- REQUEST(xvmcListSurfaceTypesReq);
- REQUEST_SIZE_MATCH(xvmcListSurfaceTypesReq);
-
- VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
-
- if(XvMCInUse) { /* any adaptors at all */
- ScreenPtr pScreen = pPort->pAdaptor->pScreen;
- if((pScreenPriv = XVMC_GET_PRIVATE(pScreen))) { /* any this screen */
- for(i = 0; i < pScreenPriv->num_adaptors; i++) {
- if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) {
- adaptor = &(pScreenPriv->adaptors[i]);
- break;
- }
- }
- }
- }
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.num = (adaptor) ? adaptor->num_surfaces : 0;
- rep.length = bytes_to_int32(rep.num * sizeof(xvmcSurfaceInfo));
-
- WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), (char*)&rep);
-
- for(i = 0; i < rep.num; i++) {
- surface = adaptor->surfaces[i];
- info.surface_type_id = surface->surface_type_id;
- info.chroma_format = surface->chroma_format;
- info.max_width = surface->max_width;
- info.max_height = surface->max_height;
- info.subpicture_max_width = surface->subpicture_max_width;
- info.subpicture_max_height = surface->subpicture_max_height;
- info.mc_type = surface->mc_type;
- info.flags = surface->flags;
- WriteToClient(client, sizeof(xvmcSurfaceInfo), (char*)&info);
- }
-
- return Success;
-}
-
-static int
-ProcXvMCCreateContext(ClientPtr client)
-{
- XvPortPtr pPort;
- CARD32 *data = NULL;
- int dwords = 0;
- int i, result, adapt_num = -1;
- ScreenPtr pScreen;
- XvMCContextPtr pContext;
- XvMCScreenPtr pScreenPriv;
- XvMCAdaptorPtr adaptor = NULL;
- XvMCSurfaceInfoPtr surface = NULL;
- xvmcCreateContextReply rep;
- REQUEST(xvmcCreateContextReq);
- REQUEST_SIZE_MATCH(xvmcCreateContextReq);
-
- VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
-
- pScreen = pPort->pAdaptor->pScreen;
-
- if(!XvMCInUse) /* no XvMC adaptors */
- return BadMatch;
-
- if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) /* none this screen */
- return BadMatch;
-
- for(i = 0; i < pScreenPriv->num_adaptors; i++) {
- if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) {
- adaptor = &(pScreenPriv->adaptors[i]);
- adapt_num = i;
- break;
- }
- }
-
- if(adapt_num < 0) /* none this port */
- return BadMatch;
-
- for(i = 0; i < adaptor->num_surfaces; i++) {
- if(adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) {
- surface = adaptor->surfaces[i];
- break;
- }
- }
-
- /* adaptor doesn't support this suface_type_id */
- if(!surface) return BadMatch;
-
-
- if((stuff->width > surface->max_width) ||
- (stuff->height > surface->max_height))
- return BadValue;
-
- if(!(pContext = malloc(sizeof(XvMCContextRec)))) {
- return BadAlloc;
- }
-
-
- pContext->pScreen = pScreen;
- pContext->adapt_num = adapt_num;
- pContext->context_id = stuff->context_id;
- pContext->surface_type_id = stuff->surface_type_id;
- pContext->width = stuff->width;
- pContext->height = stuff->height;
- pContext->flags = stuff->flags;
- pContext->refcnt = 1;
-
- result = (*adaptor->CreateContext)(pPort, pContext, &dwords, &data);
-
- if(result != Success) {
- free(pContext);
- return result;
- }
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.width_actual = pContext->width;
- rep.height_actual = pContext->height;
- rep.flags_return = pContext->flags;
- rep.length = dwords;
-
- WriteToClient(client, sizeof(xvmcCreateContextReply), (char*)&rep);
- if(dwords)
- WriteToClient(client, dwords << 2, (char*)data);
- AddResource(pContext->context_id, XvMCRTContext, pContext);
-
- free(data);
-
- return Success;
-}
-
-static int
-ProcXvMCDestroyContext(ClientPtr client)
-{
- pointer val;
- int rc;
- REQUEST(xvmcDestroyContextReq);
- REQUEST_SIZE_MATCH(xvmcDestroyContextReq);
-
- rc = dixLookupResourceByType(&val, stuff->context_id, XvMCRTContext,
- client, DixDestroyAccess);
- if (rc != Success)
- return rc;
-
- FreeResource(stuff->context_id, RT_NONE);
-
- return Success;
-}
-
-static int
-ProcXvMCCreateSurface(ClientPtr client)
-{
- CARD32 *data = NULL;
- int dwords = 0;
- int result;
- XvMCContextPtr pContext;
- XvMCSurfacePtr pSurface;
- XvMCScreenPtr pScreenPriv;
- xvmcCreateSurfaceReply rep;
- REQUEST(xvmcCreateSurfaceReq);
- REQUEST_SIZE_MATCH(xvmcCreateSurfaceReq);
-
- result = dixLookupResourceByType((pointer *)&pContext, stuff->context_id,
- XvMCRTContext, client, DixUseAccess);
- if (result != Success)
- return result;
-
- pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
-
- if(!(pSurface = malloc(sizeof(XvMCSurfaceRec))))
- return BadAlloc;
-
- pSurface->surface_id = stuff->surface_id;
- pSurface->surface_type_id = pContext->surface_type_id;
- pSurface->context = pContext;
-
- result = (*pScreenPriv->adaptors[pContext->adapt_num].CreateSurface)(
- pSurface, &dwords, &data);
-
- if(result != Success) {
- free(pSurface);
- return result;
- }
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = dwords;
-
- WriteToClient(client, sizeof(xvmcCreateSurfaceReply), (char*)&rep);
- if(dwords)
- WriteToClient(client, dwords << 2, (char*)data);
- AddResource(pSurface->surface_id, XvMCRTSurface, pSurface);
-
- free(data);
-
- pContext->refcnt++;
-
- return Success;
-}
-
-static int
-ProcXvMCDestroySurface(ClientPtr client)
-{
- pointer val;
- int rc;
- REQUEST(xvmcDestroySurfaceReq);
- REQUEST_SIZE_MATCH(xvmcDestroySurfaceReq);
-
- rc = dixLookupResourceByType(&val, stuff->surface_id, XvMCRTSurface,
- client, DixDestroyAccess);
- if (rc != Success)
- return rc;
-
- FreeResource(stuff->surface_id, RT_NONE);
-
- return Success;
-}
-
-static int
-ProcXvMCCreateSubpicture(ClientPtr client)
-{
- Bool image_supported = FALSE;
- CARD32 *data = NULL;
- int i, result, dwords = 0;
- XvMCContextPtr pContext;
- XvMCSubpicturePtr pSubpicture;
- XvMCScreenPtr pScreenPriv;
- xvmcCreateSubpictureReply rep;
- XvMCAdaptorPtr adaptor;
- XvMCSurfaceInfoPtr surface = NULL;
- REQUEST(xvmcCreateSubpictureReq);
- REQUEST_SIZE_MATCH(xvmcCreateSubpictureReq);
-
- result = dixLookupResourceByType((pointer *)&pContext, stuff->context_id,
- XvMCRTContext, client, DixUseAccess);
- if (result != Success)
- return result;
-
- pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
-
- adaptor = &(pScreenPriv->adaptors[pContext->adapt_num]);
-
- /* find which surface this context supports */
- for(i = 0; i < adaptor->num_surfaces; i++) {
- if(adaptor->surfaces[i]->surface_type_id == pContext->surface_type_id){
- surface = adaptor->surfaces[i];
- break;
- }
- }
-
- if(!surface) return BadMatch;
-
- /* make sure this surface supports that xvimage format */
- if(!surface->compatible_subpictures) return BadMatch;
-
- for(i = 0; i < surface->compatible_subpictures->num_xvimages; i++) {
- if(surface->compatible_subpictures->xvimage_ids[i] == stuff->xvimage_id) {
- image_supported = TRUE;
- break;
- }
- }
-
- if(!image_supported) return BadMatch;
-
- /* make sure the size is OK */
- if((stuff->width > surface->subpicture_max_width) ||
- (stuff->height > surface->subpicture_max_height))
- return BadValue;
-
- if(!(pSubpicture = malloc(sizeof(XvMCSubpictureRec))))
- return BadAlloc;
-
- pSubpicture->subpicture_id = stuff->subpicture_id;
- pSubpicture->xvimage_id = stuff->xvimage_id;
- pSubpicture->width = stuff->width;
- pSubpicture->height = stuff->height;
- pSubpicture->num_palette_entries = 0; /* overwritten by DDX */
- pSubpicture->entry_bytes = 0; /* overwritten by DDX */
- pSubpicture->component_order[0] = 0; /* overwritten by DDX */
- pSubpicture->component_order[1] = 0;
- pSubpicture->component_order[2] = 0;
- pSubpicture->component_order[3] = 0;
- pSubpicture->context = pContext;
-
- result = (*pScreenPriv->adaptors[pContext->adapt_num].CreateSubpicture)(
- pSubpicture, &dwords, &data);
-
- if(result != Success) {
- free(pSubpicture);
- return result;
- }
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.width_actual = pSubpicture->width;
- rep.height_actual = pSubpicture->height;
- rep.num_palette_entries = pSubpicture->num_palette_entries;
- rep.entry_bytes = pSubpicture->entry_bytes;
- rep.component_order[0] = pSubpicture->component_order[0];
- rep.component_order[1] = pSubpicture->component_order[1];
- rep.component_order[2] = pSubpicture->component_order[2];
- rep.component_order[3] = pSubpicture->component_order[3];
- rep.length = dwords;
-
- WriteToClient(client, sizeof(xvmcCreateSubpictureReply), (char*)&rep);
- if(dwords)
- WriteToClient(client, dwords << 2, (char*)data);
- AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture);
-
- free(data);
-
- pContext->refcnt++;
-
- return Success;
-}
-
-static int
-ProcXvMCDestroySubpicture(ClientPtr client)
-{
- pointer val;
- int rc;
- REQUEST(xvmcDestroySubpictureReq);
- REQUEST_SIZE_MATCH(xvmcDestroySubpictureReq);
-
- rc = dixLookupResourceByType(&val, stuff->subpicture_id, XvMCRTSubpicture,
- client, DixDestroyAccess);
- if (rc != Success)
- return rc;
-
- FreeResource(stuff->subpicture_id, RT_NONE);
-
- return Success;
-}
-
-
-static int
-ProcXvMCListSubpictureTypes(ClientPtr client)
-{
- XvPortPtr pPort;
- xvmcListSubpictureTypesReply rep;
- XvMCScreenPtr pScreenPriv;
- ScreenPtr pScreen;
- XvMCAdaptorPtr adaptor = NULL;
- XvMCSurfaceInfoPtr surface = NULL;
- xvImageFormatInfo info;
- XvImagePtr pImage;
- int i, j;
- REQUEST(xvmcListSubpictureTypesReq);
- REQUEST_SIZE_MATCH(xvmcListSubpictureTypesReq);
-
- VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
-
- pScreen = pPort->pAdaptor->pScreen;
-
- if(XvMCScreenKey == NULL) /* No XvMC adaptors */
- return BadMatch;
-
- if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen)))
- return BadMatch; /* None this screen */
-
- for(i = 0; i < pScreenPriv->num_adaptors; i++) {
- if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) {
- adaptor = &(pScreenPriv->adaptors[i]);
- break;
- }
- }
-
- if(!adaptor) return BadMatch;
-
- for(i = 0; i < adaptor->num_surfaces; i++) {
- if(adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) {
- surface = adaptor->surfaces[i];
- break;
- }
- }
-
- if(!surface) return BadMatch;
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.num = 0;
- if(surface->compatible_subpictures)
- rep.num = surface->compatible_subpictures->num_xvimages;
-
- rep.length = bytes_to_int32(rep.num * sizeof(xvImageFormatInfo));
-
- WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), (char*)&rep);
-
- for(i = 0; i < rep.num; i++) {
- pImage = NULL;
- for(j = 0; j < adaptor->num_subpictures; j++) {
- if(surface->compatible_subpictures->xvimage_ids[i] ==
- adaptor->subpictures[j]->id)
- {
- pImage = adaptor->subpictures[j];
- break;
- }
- }
- if(!pImage) return BadImplementation;
-
- info.id = pImage->id;
- info.type = pImage->type;
- info.byte_order = pImage->byte_order;
- memcpy(&info.guid, pImage->guid, 16);
- info.bpp = pImage->bits_per_pixel;
- info.num_planes = pImage->num_planes;
- info.depth = pImage->depth;
- info.red_mask = pImage->red_mask;
- info.green_mask = pImage->green_mask;
- info.blue_mask = pImage->blue_mask;
- info.format = pImage->format;
- info.y_sample_bits = pImage->y_sample_bits;
- info.u_sample_bits = pImage->u_sample_bits;
- info.v_sample_bits = pImage->v_sample_bits;
- info.horz_y_period = pImage->horz_y_period;
- info.horz_u_period = pImage->horz_u_period;
- info.horz_v_period = pImage->horz_v_period;
- info.vert_y_period = pImage->vert_y_period;
- info.vert_u_period = pImage->vert_u_period;
- info.vert_v_period = pImage->vert_v_period;
- memcpy(&info.comp_order, pImage->component_order, 32);
- info.scanline_order = pImage->scanline_order;
- WriteToClient(client, sizeof(xvImageFormatInfo), (char*)&info);
- }
-
- return Success;
-}
-
-static int
-ProcXvMCGetDRInfo(ClientPtr client)
-{
- xvmcGetDRInfoReply rep;
- XvPortPtr pPort;
- ScreenPtr pScreen;
- XvMCScreenPtr pScreenPriv;
-
-#ifdef HAS_XVMCSHM
- volatile CARD32 *patternP;
-#endif
-
- REQUEST(xvmcGetDRInfoReq);
- REQUEST_SIZE_MATCH(xvmcGetDRInfoReq);
-
- VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
-
- pScreen = pPort->pAdaptor->pScreen;
- pScreenPriv = XVMC_GET_PRIVATE(pScreen);
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.major = pScreenPriv->major;
- rep.minor = pScreenPriv->minor;
- rep.patchLevel = pScreenPriv->patchLevel;
- rep.nameLen = bytes_to_int32(strlen(pScreenPriv->clientDriverName) + 1);
- rep.busIDLen = bytes_to_int32(strlen(pScreenPriv->busID) + 1);
-
- rep.length = rep.nameLen + rep.busIDLen;
- rep.nameLen <<=2;
- rep.busIDLen <<=2;
-
- /*
- * Read back to the client what she has put in the shared memory
- * segment she prepared for us.
- */
-
- rep.isLocal = 1;
-#ifdef HAS_XVMCSHM
- patternP = (CARD32 *)shmat( stuff->shmKey, NULL, SHM_RDONLY );
- if ( -1 != (long) patternP) {
- volatile CARD32 *patternC = patternP;
- int i;
- CARD32 magic = stuff->magic;
-
- rep.isLocal = 1;
- i = 1024 / sizeof(CARD32);
-
- while ( i-- ) {
- if (*patternC++ != magic) {
- rep.isLocal = 0;
- break;
- }
- magic = ~magic;
- }
- shmdt( (char *)patternP );
- }
-#endif /* HAS_XVMCSHM */
-
- WriteToClient(client, sizeof(xvmcGetDRInfoReply),
- (char*)&rep);
- if (rep.length) {
- WriteToClient(client, rep.nameLen,
- pScreenPriv->clientDriverName);
- WriteToClient(client, rep.busIDLen,
- pScreenPriv->busID);
- }
- return Success;
-}
-
-
-int (*ProcXvMCVector[xvmcNumRequest])(ClientPtr) = {
- ProcXvMCQueryVersion,
- ProcXvMCListSurfaceTypes,
- ProcXvMCCreateContext,
- ProcXvMCDestroyContext,
- ProcXvMCCreateSurface,
- ProcXvMCDestroySurface,
- ProcXvMCCreateSubpicture,
- ProcXvMCDestroySubpicture,
- ProcXvMCListSubpictureTypes,
- ProcXvMCGetDRInfo
-};
-
-static int
-ProcXvMCDispatch (ClientPtr client)
-{
- REQUEST(xReq);
-
- if(stuff->data < xvmcNumRequest)
- return (*ProcXvMCVector[stuff->data])(client);
- else
- return BadRequest;
-}
-
-static int
-SProcXvMCDispatch (ClientPtr client)
-{
- /* We only support local */
- return BadImplementation;
-}
-
-void
-XvMCExtensionInit(void)
-{
- ExtensionEntry *extEntry;
-
- if(XvMCScreenKey == NULL) /* nobody supports it */
- return;
-
- if(!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes,
- "XvMCRTContext")))
- return;
-
- if(!(XvMCRTSurface = CreateNewResourceType(XvMCDestroySurfaceRes,
- "XvMCRTSurface")))
- return;
-
- if(!(XvMCRTSubpicture = CreateNewResourceType(XvMCDestroySubpictureRes,
- "XvMCRTSubpicture")))
- return;
-
- extEntry = AddExtension(XvMCName, XvMCNumEvents, XvMCNumErrors,
- ProcXvMCDispatch, SProcXvMCDispatch,
- NULL, StandardMinorOpcode);
-
- if(!extEntry) return;
-
- XvMCReqCode = extEntry->base;
- XvMCEventBase = extEntry->eventBase;
- SetResourceTypeErrorValue(XvMCRTContext, extEntry->errorBase + XvMCBadContext);
- SetResourceTypeErrorValue(XvMCRTSurface, extEntry->errorBase + XvMCBadSurface);
- SetResourceTypeErrorValue(XvMCRTSubpicture, extEntry->errorBase + XvMCBadSubpicture);
-}
-
-static Bool
-XvMCCloseScreen (int i, ScreenPtr pScreen)
-{
- XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen);
-
- pScreen->CloseScreen = pScreenPriv->CloseScreen;
-
- free(pScreenPriv);
-
- return (*pScreen->CloseScreen)(i, pScreen);
-}
-
-
-int
-XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt)
-{
- XvMCScreenPtr pScreenPriv;
-
- if (!dixRegisterPrivateKey(&XvMCScreenKeyRec, PRIVATE_SCREEN, 0))
- return BadAlloc;
-
- if(!(pScreenPriv = malloc(sizeof(XvMCScreenRec))))
- return BadAlloc;
-
- dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, pScreenPriv);
-
- pScreenPriv->CloseScreen = pScreen->CloseScreen;
- pScreen->CloseScreen = XvMCCloseScreen;
-
- pScreenPriv->num_adaptors = num;
- pScreenPriv->adaptors = pAdapt;
- pScreenPriv->clientDriverName[0] = 0;
- pScreenPriv->busID[0] = 0;
- pScreenPriv->major = 0;
- pScreenPriv->minor = 0;
- pScreenPriv->patchLevel = 0;
-
- XvMCInUse = TRUE;
-
- return Success;
-}
-
-XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id)
-{
- XvImagePtr pImage = NULL;
- ScreenPtr pScreen = pPort->pAdaptor->pScreen;
- XvMCScreenPtr pScreenPriv;
- XvMCAdaptorPtr adaptor = NULL;
- int i;
-
- if(XvMCScreenKey == NULL) return NULL;
-
- if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen)))
- return NULL;
-
- for(i = 0; i < pScreenPriv->num_adaptors; i++) {
- if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) {
- adaptor = &(pScreenPriv->adaptors[i]);
- break;
- }
- }
-
- if(!adaptor) return NULL;
-
- for(i = 0; i < adaptor->num_subpictures; i++) {
- if(adaptor->subpictures[i]->id == id) {
- pImage = adaptor->subpictures[i];
- break;
- }
- }
-
- return pImage;
-}
-
-int
-xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name,
- char *busID, int major, int minor,
- int patchLevel)
-{
- XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen);
- strncpy(pScreenPriv->clientDriverName, name,
- DR_CLIENT_DRIVER_NAME_SIZE);
- strncpy(pScreenPriv->busID, busID, DR_BUSID_SIZE);
- pScreenPriv->major = major;
- pScreenPriv->minor = minor;
- pScreenPriv->patchLevel = patchLevel;
- pScreenPriv->clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE-1] = 0;
- pScreenPriv->busID[DR_BUSID_SIZE-1] = 0;
- return Success;
-}
-
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <string.h>
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "resource.h"
+#include "scrnintstr.h"
+#include "extnsionst.h"
+#include "servermd.h"
+#include <X11/Xfuncproto.h>
+#include "xvdix.h"
+#include <X11/extensions/XvMC.h>
+#include <X11/extensions/Xvproto.h>
+#include <X11/extensions/XvMCproto.h>
+#include "xvmcext.h"
+#include "protocol-versions.h"
+
+#ifdef HAS_XVMCSHM
+#include <sys/ipc.h>
+#include <sys/types.h>
+#include <sys/shm.h>
+#endif /* HAS_XVMCSHM */
+
+
+
+#define DR_CLIENT_DRIVER_NAME_SIZE 48
+#define DR_BUSID_SIZE 48
+
+static DevPrivateKeyRec XvMCScreenKeyRec;
+#define XvMCScreenKey (&XvMCScreenKeyRec)
+static Bool XvMCInUse;
+
+unsigned long XvMCGeneration = 0;
+
+int XvMCReqCode;
+int XvMCEventBase;
+
+static RESTYPE XvMCRTContext;
+static RESTYPE XvMCRTSurface;
+static RESTYPE XvMCRTSubpicture;
+
+typedef struct {
+ int num_adaptors;
+ XvMCAdaptorPtr adaptors;
+ CloseScreenProcPtr CloseScreen;
+ char clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE];
+ char busID[DR_BUSID_SIZE];
+ int major;
+ int minor;
+ int patchLevel;
+} XvMCScreenRec, *XvMCScreenPtr;
+
+#define XVMC_GET_PRIVATE(pScreen) \
+ (XvMCScreenPtr)(dixLookupPrivate(&(pScreen)->devPrivates, XvMCScreenKey))
+
+
+static int
+XvMCDestroyContextRes(pointer data, XID id)
+{
+ XvMCContextPtr pContext = (XvMCContextPtr)data;
+
+ pContext->refcnt--;
+
+ if(!pContext->refcnt) {
+ XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
+ (*pScreenPriv->adaptors[pContext->adapt_num].DestroyContext)(pContext);
+ free(pContext);
+ }
+
+ return Success;
+}
+
+static int
+XvMCDestroySurfaceRes(pointer data, XID id)
+{
+ XvMCSurfacePtr pSurface = (XvMCSurfacePtr)data;
+ XvMCContextPtr pContext = pSurface->context;
+ XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
+
+ (*pScreenPriv->adaptors[pContext->adapt_num].DestroySurface)(pSurface);
+ free(pSurface);
+
+ XvMCDestroyContextRes((pointer)pContext, pContext->context_id);
+
+ return Success;
+}
+
+
+static int
+XvMCDestroySubpictureRes(pointer data, XID id)
+{
+ XvMCSubpicturePtr pSubpict = (XvMCSubpicturePtr)data;
+ XvMCContextPtr pContext = pSubpict->context;
+ XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
+
+ (*pScreenPriv->adaptors[pContext->adapt_num].DestroySubpicture)(pSubpict);
+ free(pSubpict);
+
+ XvMCDestroyContextRes((pointer)pContext, pContext->context_id);
+
+ return Success;
+}
+
+static int
+ProcXvMCQueryVersion(ClientPtr client)
+{
+ xvmcQueryVersionReply rep;
+ /* REQUEST(xvmcQueryVersionReq); */
+ REQUEST_SIZE_MATCH(xvmcQueryVersionReq);
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.major = SERVER_XVMC_MAJOR_VERSION;
+ rep.minor = SERVER_XVMC_MINOR_VERSION;
+ WriteToClient(client, sizeof(xvmcQueryVersionReply), (char*)&rep);
+ return Success;
+}
+
+
+static int
+ProcXvMCListSurfaceTypes(ClientPtr client)
+{
+ XvPortPtr pPort;
+ int i;
+ XvMCScreenPtr pScreenPriv;
+ xvmcListSurfaceTypesReply rep;
+ xvmcSurfaceInfo info;
+ XvMCAdaptorPtr adaptor = NULL;
+ XvMCSurfaceInfoPtr surface;
+ REQUEST(xvmcListSurfaceTypesReq);
+ REQUEST_SIZE_MATCH(xvmcListSurfaceTypesReq);
+
+ VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
+
+ if(XvMCInUse) { /* any adaptors at all */
+ ScreenPtr pScreen = pPort->pAdaptor->pScreen;
+ if((pScreenPriv = XVMC_GET_PRIVATE(pScreen))) { /* any this screen */
+ for(i = 0; i < pScreenPriv->num_adaptors; i++) {
+ if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) {
+ adaptor = &(pScreenPriv->adaptors[i]);
+ break;
+ }
+ }
+ }
+ }
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.num = (adaptor) ? adaptor->num_surfaces : 0;
+ rep.length = bytes_to_int32(rep.num * sizeof(xvmcSurfaceInfo));
+
+ WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), (char*)&rep);
+
+ for(i = 0; i < rep.num; i++) {
+ surface = adaptor->surfaces[i];
+ info.surface_type_id = surface->surface_type_id;
+ info.chroma_format = surface->chroma_format;
+ info.max_width = surface->max_width;
+ info.max_height = surface->max_height;
+ info.subpicture_max_width = surface->subpicture_max_width;
+ info.subpicture_max_height = surface->subpicture_max_height;
+ info.mc_type = surface->mc_type;
+ info.flags = surface->flags;
+ WriteToClient(client, sizeof(xvmcSurfaceInfo), (char*)&info);
+ }
+
+ return Success;
+}
+
+static int
+ProcXvMCCreateContext(ClientPtr client)
+{
+ XvPortPtr pPort;
+ CARD32 *data = NULL;
+ int dwords = 0;
+ int i, result, adapt_num = -1;
+ ScreenPtr pScreen;
+ XvMCContextPtr pContext;
+ XvMCScreenPtr pScreenPriv;
+ XvMCAdaptorPtr adaptor = NULL;
+ XvMCSurfaceInfoPtr surface = NULL;
+ xvmcCreateContextReply rep;
+ REQUEST(xvmcCreateContextReq);
+ REQUEST_SIZE_MATCH(xvmcCreateContextReq);
+
+ VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
+
+ pScreen = pPort->pAdaptor->pScreen;
+
+ if(!XvMCInUse) /* no XvMC adaptors */
+ return BadMatch;
+
+ if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) /* none this screen */
+ return BadMatch;
+
+ for(i = 0; i < pScreenPriv->num_adaptors; i++) {
+ if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) {
+ adaptor = &(pScreenPriv->adaptors[i]);
+ adapt_num = i;
+ break;
+ }
+ }
+
+ if(adapt_num < 0) /* none this port */
+ return BadMatch;
+
+ for(i = 0; i < adaptor->num_surfaces; i++) {
+ if(adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) {
+ surface = adaptor->surfaces[i];
+ break;
+ }
+ }
+
+ /* adaptor doesn't support this suface_type_id */
+ if(!surface) return BadMatch;
+
+
+ if((stuff->width > surface->max_width) ||
+ (stuff->height > surface->max_height))
+ return BadValue;
+
+ if(!(pContext = malloc(sizeof(XvMCContextRec)))) {
+ return BadAlloc;
+ }
+
+
+ pContext->pScreen = pScreen;
+ pContext->adapt_num = adapt_num;
+ pContext->context_id = stuff->context_id;
+ pContext->surface_type_id = stuff->surface_type_id;
+ pContext->width = stuff->width;
+ pContext->height = stuff->height;
+ pContext->flags = stuff->flags;
+ pContext->refcnt = 1;
+
+ result = (*adaptor->CreateContext)(pPort, pContext, &dwords, &data);
+
+ if(result != Success) {
+ free(pContext);
+ return result;
+ }
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.width_actual = pContext->width;
+ rep.height_actual = pContext->height;
+ rep.flags_return = pContext->flags;
+ rep.length = dwords;
+
+ WriteToClient(client, sizeof(xvmcCreateContextReply), (char*)&rep);
+ if(dwords)
+ WriteToClient(client, dwords << 2, (char*)data);
+ AddResource(pContext->context_id, XvMCRTContext, pContext);
+
+ free(data);
+
+ return Success;
+}
+
+static int
+ProcXvMCDestroyContext(ClientPtr client)
+{
+ pointer val;
+ int rc;
+ REQUEST(xvmcDestroyContextReq);
+ REQUEST_SIZE_MATCH(xvmcDestroyContextReq);
+
+ rc = dixLookupResourceByType(&val, stuff->context_id, XvMCRTContext,
+ client, DixDestroyAccess);
+ if (rc != Success)
+ return rc;
+
+ FreeResource(stuff->context_id, RT_NONE);
+
+ return Success;
+}
+
+static int
+ProcXvMCCreateSurface(ClientPtr client)
+{
+ CARD32 *data = NULL;
+ int dwords = 0;
+ int result;
+ XvMCContextPtr pContext;
+ XvMCSurfacePtr pSurface;
+ XvMCScreenPtr pScreenPriv;
+ xvmcCreateSurfaceReply rep;
+ REQUEST(xvmcCreateSurfaceReq);
+ REQUEST_SIZE_MATCH(xvmcCreateSurfaceReq);
+
+ result = dixLookupResourceByType((pointer *)&pContext, stuff->context_id,
+ XvMCRTContext, client, DixUseAccess);
+ if (result != Success)
+ return result;
+
+ pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
+
+ if(!(pSurface = malloc(sizeof(XvMCSurfaceRec))))
+ return BadAlloc;
+
+ pSurface->surface_id = stuff->surface_id;
+ pSurface->surface_type_id = pContext->surface_type_id;
+ pSurface->context = pContext;
+
+ result = (*pScreenPriv->adaptors[pContext->adapt_num].CreateSurface)(
+ pSurface, &dwords, &data);
+
+ if(result != Success) {
+ free(pSurface);
+ return result;
+ }
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = dwords;
+
+ WriteToClient(client, sizeof(xvmcCreateSurfaceReply), (char*)&rep);
+ if(dwords)
+ WriteToClient(client, dwords << 2, (char*)data);
+ AddResource(pSurface->surface_id, XvMCRTSurface, pSurface);
+
+ free(data);
+
+ pContext->refcnt++;
+
+ return Success;
+}
+
+static int
+ProcXvMCDestroySurface(ClientPtr client)
+{
+ pointer val;
+ int rc;
+ REQUEST(xvmcDestroySurfaceReq);
+ REQUEST_SIZE_MATCH(xvmcDestroySurfaceReq);
+
+ rc = dixLookupResourceByType(&val, stuff->surface_id, XvMCRTSurface,
+ client, DixDestroyAccess);
+ if (rc != Success)
+ return rc;
+
+ FreeResource(stuff->surface_id, RT_NONE);
+
+ return Success;
+}
+
+static int
+ProcXvMCCreateSubpicture(ClientPtr client)
+{
+ Bool image_supported = FALSE;
+ CARD32 *data = NULL;
+ int i, result, dwords = 0;
+ XvMCContextPtr pContext;
+ XvMCSubpicturePtr pSubpicture;
+ XvMCScreenPtr pScreenPriv;
+ xvmcCreateSubpictureReply rep;
+ XvMCAdaptorPtr adaptor;
+ XvMCSurfaceInfoPtr surface = NULL;
+ REQUEST(xvmcCreateSubpictureReq);
+ REQUEST_SIZE_MATCH(xvmcCreateSubpictureReq);
+
+ result = dixLookupResourceByType((pointer *)&pContext, stuff->context_id,
+ XvMCRTContext, client, DixUseAccess);
+ if (result != Success)
+ return result;
+
+ pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen);
+
+ adaptor = &(pScreenPriv->adaptors[pContext->adapt_num]);
+
+ /* find which surface this context supports */
+ for(i = 0; i < adaptor->num_surfaces; i++) {
+ if(adaptor->surfaces[i]->surface_type_id == pContext->surface_type_id){
+ surface = adaptor->surfaces[i];
+ break;
+ }
+ }
+
+ if(!surface) return BadMatch;
+
+ /* make sure this surface supports that xvimage format */
+ if(!surface->compatible_subpictures) return BadMatch;
+
+ for(i = 0; i < surface->compatible_subpictures->num_xvimages; i++) {
+ if(surface->compatible_subpictures->xvimage_ids[i] == stuff->xvimage_id) {
+ image_supported = TRUE;
+ break;
+ }
+ }
+
+ if(!image_supported) return BadMatch;
+
+ /* make sure the size is OK */
+ if((stuff->width > surface->subpicture_max_width) ||
+ (stuff->height > surface->subpicture_max_height))
+ return BadValue;
+
+ if(!(pSubpicture = malloc(sizeof(XvMCSubpictureRec))))
+ return BadAlloc;
+
+ pSubpicture->subpicture_id = stuff->subpicture_id;
+ pSubpicture->xvimage_id = stuff->xvimage_id;
+ pSubpicture->width = stuff->width;
+ pSubpicture->height = stuff->height;
+ pSubpicture->num_palette_entries = 0; /* overwritten by DDX */
+ pSubpicture->entry_bytes = 0; /* overwritten by DDX */
+ pSubpicture->component_order[0] = 0; /* overwritten by DDX */
+ pSubpicture->component_order[1] = 0;
+ pSubpicture->component_order[2] = 0;
+ pSubpicture->component_order[3] = 0;
+ pSubpicture->context = pContext;
+
+ result = (*pScreenPriv->adaptors[pContext->adapt_num].CreateSubpicture)(
+ pSubpicture, &dwords, &data);
+
+ if(result != Success) {
+ free(pSubpicture);
+ return result;
+ }
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.width_actual = pSubpicture->width;
+ rep.height_actual = pSubpicture->height;
+ rep.num_palette_entries = pSubpicture->num_palette_entries;
+ rep.entry_bytes = pSubpicture->entry_bytes;
+ rep.component_order[0] = pSubpicture->component_order[0];
+ rep.component_order[1] = pSubpicture->component_order[1];
+ rep.component_order[2] = pSubpicture->component_order[2];
+ rep.component_order[3] = pSubpicture->component_order[3];
+ rep.length = dwords;
+
+ WriteToClient(client, sizeof(xvmcCreateSubpictureReply), (char*)&rep);
+ if(dwords)
+ WriteToClient(client, dwords << 2, (char*)data);
+ AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture);
+
+ free(data);
+
+ pContext->refcnt++;
+
+ return Success;
+}
+
+static int
+ProcXvMCDestroySubpicture(ClientPtr client)
+{
+ pointer val;
+ int rc;
+ REQUEST(xvmcDestroySubpictureReq);
+ REQUEST_SIZE_MATCH(xvmcDestroySubpictureReq);
+
+ rc = dixLookupResourceByType(&val, stuff->subpicture_id, XvMCRTSubpicture,
+ client, DixDestroyAccess);
+ if (rc != Success)
+ return rc;
+
+ FreeResource(stuff->subpicture_id, RT_NONE);
+
+ return Success;
+}
+
+
+static int
+ProcXvMCListSubpictureTypes(ClientPtr client)
+{
+ XvPortPtr pPort;
+ xvmcListSubpictureTypesReply rep;
+ XvMCScreenPtr pScreenPriv;
+ ScreenPtr pScreen;
+ XvMCAdaptorPtr adaptor = NULL;
+ XvMCSurfaceInfoPtr surface = NULL;
+ xvImageFormatInfo info;
+ XvImagePtr pImage;
+ int i, j;
+ REQUEST(xvmcListSubpictureTypesReq);
+ REQUEST_SIZE_MATCH(xvmcListSubpictureTypesReq);
+
+ VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
+
+ pScreen = pPort->pAdaptor->pScreen;
+
+ if(XvMCScreenKey == NULL) /* No XvMC adaptors */
+ return BadMatch;
+
+ if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen)))
+ return BadMatch; /* None this screen */
+
+ for(i = 0; i < pScreenPriv->num_adaptors; i++) {
+ if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) {
+ adaptor = &(pScreenPriv->adaptors[i]);
+ break;
+ }
+ }
+
+ if(!adaptor) return BadMatch;
+
+ for(i = 0; i < adaptor->num_surfaces; i++) {
+ if(adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) {
+ surface = adaptor->surfaces[i];
+ break;
+ }
+ }
+
+ if(!surface) return BadMatch;
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.num = 0;
+ if(surface->compatible_subpictures)
+ rep.num = surface->compatible_subpictures->num_xvimages;
+
+ rep.length = bytes_to_int32(rep.num * sizeof(xvImageFormatInfo));
+
+ WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), (char*)&rep);
+
+ for(i = 0; i < rep.num; i++) {
+ pImage = NULL;
+ for(j = 0; j < adaptor->num_subpictures; j++) {
+ if(surface->compatible_subpictures->xvimage_ids[i] ==
+ adaptor->subpictures[j]->id)
+ {
+ pImage = adaptor->subpictures[j];
+ break;
+ }
+ }
+ if(!pImage) return BadImplementation;
+
+ info.id = pImage->id;
+ info.type = pImage->type;
+ info.byte_order = pImage->byte_order;
+ memcpy(&info.guid, pImage->guid, 16);
+ info.bpp = pImage->bits_per_pixel;
+ info.num_planes = pImage->num_planes;
+ info.depth = pImage->depth;
+ info.red_mask = pImage->red_mask;
+ info.green_mask = pImage->green_mask;
+ info.blue_mask = pImage->blue_mask;
+ info.format = pImage->format;
+ info.y_sample_bits = pImage->y_sample_bits;
+ info.u_sample_bits = pImage->u_sample_bits;
+ info.v_sample_bits = pImage->v_sample_bits;
+ info.horz_y_period = pImage->horz_y_period;
+ info.horz_u_period = pImage->horz_u_period;
+ info.horz_v_period = pImage->horz_v_period;
+ info.vert_y_period = pImage->vert_y_period;
+ info.vert_u_period = pImage->vert_u_period;
+ info.vert_v_period = pImage->vert_v_period;
+ memcpy(&info.comp_order, pImage->component_order, 32);
+ info.scanline_order = pImage->scanline_order;
+ WriteToClient(client, sizeof(xvImageFormatInfo), (char*)&info);
+ }
+
+ return Success;
+}
+
+static int
+ProcXvMCGetDRInfo(ClientPtr client)
+{
+ xvmcGetDRInfoReply rep;
+ XvPortPtr pPort;
+ ScreenPtr pScreen;
+ XvMCScreenPtr pScreenPriv;
+
+#ifdef HAS_XVMCSHM
+ volatile CARD32 *patternP;
+#endif
+
+ REQUEST(xvmcGetDRInfoReq);
+ REQUEST_SIZE_MATCH(xvmcGetDRInfoReq);
+
+ VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
+
+ pScreen = pPort->pAdaptor->pScreen;
+ pScreenPriv = XVMC_GET_PRIVATE(pScreen);
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.major = pScreenPriv->major;
+ rep.minor = pScreenPriv->minor;
+ rep.patchLevel = pScreenPriv->patchLevel;
+ rep.nameLen = bytes_to_int32(strlen(pScreenPriv->clientDriverName) + 1);
+ rep.busIDLen = bytes_to_int32(strlen(pScreenPriv->busID) + 1);
+
+ rep.length = rep.nameLen + rep.busIDLen;
+ rep.nameLen <<=2;
+ rep.busIDLen <<=2;
+
+ /*
+ * Read back to the client what she has put in the shared memory
+ * segment she prepared for us.
+ */
+
+ rep.isLocal = 1;
+#ifdef HAS_XVMCSHM
+ patternP = (CARD32 *)shmat( stuff->shmKey, NULL, SHM_RDONLY );
+ if ( -1 != (long) patternP) {
+ volatile CARD32 *patternC = patternP;
+ int i;
+ CARD32 magic = stuff->magic;
+
+ rep.isLocal = 1;
+ i = 1024 / sizeof(CARD32);
+
+ while ( i-- ) {
+ if (*patternC++ != magic) {
+ rep.isLocal = 0;
+ break;
+ }
+ magic = ~magic;
+ }
+ shmdt( (char *)patternP );
+ }
+#endif /* HAS_XVMCSHM */
+
+ WriteToClient(client, sizeof(xvmcGetDRInfoReply),
+ (char*)&rep);
+ if (rep.length) {
+ WriteToClient(client, rep.nameLen,
+ pScreenPriv->clientDriverName);
+ WriteToClient(client, rep.busIDLen,
+ pScreenPriv->busID);
+ }
+ return Success;
+}
+
+
+int (*ProcXvMCVector[xvmcNumRequest])(ClientPtr) = {
+ ProcXvMCQueryVersion,
+ ProcXvMCListSurfaceTypes,
+ ProcXvMCCreateContext,
+ ProcXvMCDestroyContext,
+ ProcXvMCCreateSurface,
+ ProcXvMCDestroySurface,
+ ProcXvMCCreateSubpicture,
+ ProcXvMCDestroySubpicture,
+ ProcXvMCListSubpictureTypes,
+ ProcXvMCGetDRInfo
+};
+
+static int
+ProcXvMCDispatch (ClientPtr client)
+{
+ REQUEST(xReq);
+
+ if(stuff->data < xvmcNumRequest)
+ return (*ProcXvMCVector[stuff->data])(client);
+ else
+ return BadRequest;
+}
+
+static int
+SProcXvMCDispatch (ClientPtr client)
+{
+ /* We only support local */
+ return BadImplementation;
+}
+
+void
+XvMCExtensionInit(void)
+{
+ ExtensionEntry *extEntry;
+
+ if(XvMCScreenKey == NULL) /* nobody supports it */
+ return;
+
+ if(!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes,
+ "XvMCRTContext")))
+ return;
+
+ if(!(XvMCRTSurface = CreateNewResourceType(XvMCDestroySurfaceRes,
+ "XvMCRTSurface")))
+ return;
+
+ if(!(XvMCRTSubpicture = CreateNewResourceType(XvMCDestroySubpictureRes,
+ "XvMCRTSubpicture")))
+ return;
+
+ extEntry = AddExtension(XvMCName, XvMCNumEvents, XvMCNumErrors,
+ ProcXvMCDispatch, SProcXvMCDispatch,
+ NULL, StandardMinorOpcode);
+
+ if(!extEntry) return;
+
+ XvMCReqCode = extEntry->base;
+ XvMCEventBase = extEntry->eventBase;
+ SetResourceTypeErrorValue(XvMCRTContext, extEntry->errorBase + XvMCBadContext);
+ SetResourceTypeErrorValue(XvMCRTSurface, extEntry->errorBase + XvMCBadSurface);
+ SetResourceTypeErrorValue(XvMCRTSubpicture, extEntry->errorBase + XvMCBadSubpicture);
+}
+
+static Bool
+XvMCCloseScreen (int i, ScreenPtr pScreen)
+{
+ XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen);
+
+ pScreen->CloseScreen = pScreenPriv->CloseScreen;
+
+ free(pScreenPriv);
+
+ return (*pScreen->CloseScreen)(i, pScreen);
+}
+
+
+int
+XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt)
+{
+ XvMCScreenPtr pScreenPriv;
+
+ if (!dixRegisterPrivateKey(&XvMCScreenKeyRec, PRIVATE_SCREEN, 0))
+ return BadAlloc;
+
+ if(!(pScreenPriv = malloc(sizeof(XvMCScreenRec))))
+ return BadAlloc;
+
+ dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, pScreenPriv);
+
+ pScreenPriv->CloseScreen = pScreen->CloseScreen;
+ pScreen->CloseScreen = XvMCCloseScreen;
+
+ pScreenPriv->num_adaptors = num;
+ pScreenPriv->adaptors = pAdapt;
+ pScreenPriv->clientDriverName[0] = 0;
+ pScreenPriv->busID[0] = 0;
+ pScreenPriv->major = 0;
+ pScreenPriv->minor = 0;
+ pScreenPriv->patchLevel = 0;
+
+ XvMCInUse = TRUE;
+
+ return Success;
+}
+
+XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id)
+{
+ XvImagePtr pImage = NULL;
+ ScreenPtr pScreen = pPort->pAdaptor->pScreen;
+ XvMCScreenPtr pScreenPriv;
+ XvMCAdaptorPtr adaptor = NULL;
+ int i;
+
+ if(XvMCScreenKey == NULL) return NULL;
+
+ if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen)))
+ return NULL;
+
+ for(i = 0; i < pScreenPriv->num_adaptors; i++) {
+ if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) {
+ adaptor = &(pScreenPriv->adaptors[i]);
+ break;
+ }
+ }
+
+ if(!adaptor) return NULL;
+
+ for(i = 0; i < adaptor->num_subpictures; i++) {
+ if(adaptor->subpictures[i]->id == id) {
+ pImage = adaptor->subpictures[i];
+ break;
+ }
+ }
+
+ return pImage;
+}
+
+int
+xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name,
+ char *busID, int major, int minor,
+ int patchLevel)
+{
+ XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen);
+ strncpy(pScreenPriv->clientDriverName, name,
+ DR_CLIENT_DRIVER_NAME_SIZE);
+ strncpy(pScreenPriv->busID, busID, DR_BUSID_SIZE);
+ pScreenPriv->major = major;
+ pScreenPriv->minor = minor;
+ pScreenPriv->patchLevel = patchLevel;
+ pScreenPriv->clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE-1] = 0;
+ pScreenPriv->busID[DR_BUSID_SIZE-1] = 0;
+ return Success;
+}
+
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index c7089bb69..b17b61990 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -1,2178 +1,2187 @@
-/************************************************************
-
-Copyright 1989, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Hewlett-Packard not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-********************************************************/
-
-/********************************************************************
- *
- * Routines to register and initialize extension input devices.
- * This also contains ProcessOtherEvent, the routine called from DDX
- * to route extension events.
- *
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "inputstr.h"
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include <X11/extensions/XI2proto.h>
-#include <X11/extensions/geproto.h>
-#include "windowstr.h"
-#include "miscstruct.h"
-#include "region.h"
-#include "exevents.h"
-#include "extnsionst.h"
-#include "exglobals.h"
-#include "dixevents.h" /* DeliverFocusedEvent */
-#include "dixgrabs.h" /* CreateGrab() */
-#include "scrnintstr.h"
-#include "listdev.h" /* for CopySwapXXXClass */
-#include "xace.h"
-#include "xiquerydevice.h" /* For List*Info */
-#include "eventconvert.h"
-#include "eventstr.h"
-
-#include <X11/extensions/XKBproto.h>
-#include "xkbsrv.h"
-
-#define WID(w) ((w) ? ((w)->drawable.id) : 0)
-#define AllModifiersMask ( \
- ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \
- Mod3Mask | Mod4Mask | Mod5Mask )
-#define AllButtonsMask ( \
- Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask )
-
-Bool ShouldFreeInputMasks(WindowPtr /* pWin */ ,
- Bool /* ignoreSelectedEvents */
- );
-static Bool MakeInputMasks(WindowPtr /* pWin */
- );
-
-/*
- * Only let the given client know of core events which will affect its
- * interpretation of input events, if the client's ClientPointer (or the
- * paired keyboard) is the current device.
- */
-int
-XIShouldNotify(ClientPtr client, DeviceIntPtr dev)
-{
- DeviceIntPtr current_ptr = PickPointer(client);
- DeviceIntPtr current_kbd = GetPairedDevice(current_ptr);
-
- if (dev == current_kbd || dev == current_ptr)
- return 1;
-
- return 0;
-}
-
-Bool
-IsPointerEvent(InternalEvent* event)
-{
- switch(event->any.type)
- {
- case ET_ButtonPress:
- case ET_ButtonRelease:
- case ET_Motion:
- /* XXX: enter/leave ?? */
- return TRUE;
- default:
- break;
- }
- return FALSE;
-}
-
-/**
- * @return the device matching the deviceid of the device set in the event, or
- * NULL if the event is not an XInput event.
- */
-DeviceIntPtr
-XIGetDevice(xEvent* xE)
-{
- DeviceIntPtr pDev = NULL;
-
- if (xE->u.u.type == DeviceButtonPress ||
- xE->u.u.type == DeviceButtonRelease ||
- xE->u.u.type == DeviceMotionNotify ||
- xE->u.u.type == ProximityIn ||
- xE->u.u.type == ProximityOut ||
- xE->u.u.type == DevicePropertyNotify)
- {
- int rc;
- int id;
-
- id = ((deviceKeyButtonPointer*)xE)->deviceid & ~MORE_EVENTS;
-
- rc = dixLookupDevice(&pDev, id, serverClient, DixUnknownAccess);
- if (rc != Success)
- ErrorF("[dix] XIGetDevice failed on XACE restrictions (%d)\n", rc);
- }
- return pDev;
-}
-
-
-/**
- * Copy the device->key into master->key and send a mapping notify to the
- * clients if appropriate.
- * master->key needs to be allocated by the caller.
- *
- * Device is the slave device. If it is attached to a master device, we may
- * need to send a mapping notify to the client because it causes the MD
- * to change state.
- *
- * Mapping notify needs to be sent in the following cases:
- * - different slave device on same master
- * - different master
- *
- * XXX: They way how the code is we also send a map notify if the slave device
- * stays the same, but the master changes. This isn't really necessary though.
- *
- * XXX: this gives you funny behaviour with the ClientPointer. When a
- * MappingNotify is sent to the client, the client usually responds with a
- * GetKeyboardMapping. This will retrieve the ClientPointer's keyboard
- * mapping, regardless of which keyboard sent the last mapping notify request.
- * So depending on the CP setting, your keyboard may change layout in each
- * app...
- *
- * This code is basically the old SwitchCoreKeyboard.
- */
-
-void
-CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
-{
- KeyClassPtr mk = master->key;
-
- if (device == master)
- return;
-
- mk->sourceid = device->id;
-
-
- if (!XkbCopyDeviceKeymap(master, device))
- FatalError("Couldn't pivot keymap from device to core!\n");
-}
-
-/**
- * Copies the feedback classes from device "from" into device "to". Classes
- * are duplicated (not just flipping the pointers). All feedback classes are
- * linked lists, the full list is duplicated.
- */
-static void
-DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
-{
- ClassesPtr classes;
-
-
- if (from->intfeed)
- {
- IntegerFeedbackPtr *i, it;
-
- if (!to->intfeed)
- {
- classes = to->unused_classes;
- to->intfeed = classes->intfeed;
- classes->intfeed = NULL;
- }
-
- i = &to->intfeed;
- for (it = from->intfeed; it; it = it->next)
- {
- if (!(*i))
- {
- *i = calloc(1, sizeof(IntegerFeedbackClassRec));
- if (!(*i))
- {
- ErrorF("[Xi] Cannot alloc memory for class copy.");
- return;
- }
- }
- (*i)->CtrlProc = it->CtrlProc;
- (*i)->ctrl = it->ctrl;
-
- i = &(*i)->next;
- }
- } else if (to->intfeed && !from->intfeed)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->intfeed = to->intfeed;
- to->intfeed = NULL;
- }
-
- if (from->stringfeed)
- {
- StringFeedbackPtr *s, it;
-
- if (!to->stringfeed)
- {
- classes = to->unused_classes;
- to->stringfeed = classes->stringfeed;
- classes->stringfeed = NULL;
- }
-
- s = &to->stringfeed;
- for (it = from->stringfeed; it; it = it->next)
- {
- if (!(*s))
- {
- *s = calloc(1, sizeof(StringFeedbackClassRec));
- if (!(*s))
- {
- ErrorF("[Xi] Cannot alloc memory for class copy.");
- return;
- }
- }
- (*s)->CtrlProc = it->CtrlProc;
- (*s)->ctrl = it->ctrl;
-
- s = &(*s)->next;
- }
- } else if (to->stringfeed && !from->stringfeed)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->stringfeed = to->stringfeed;
- to->stringfeed = NULL;
- }
-
- if (from->bell)
- {
- BellFeedbackPtr *b, it;
-
- if (!to->bell)
- {
- classes = to->unused_classes;
- to->bell = classes->bell;
- classes->bell = NULL;
- }
-
- b = &to->bell;
- for (it = from->bell; it; it = it->next)
- {
- if (!(*b))
- {
- *b = calloc(1, sizeof(BellFeedbackClassRec));
- if (!(*b))
- {
- ErrorF("[Xi] Cannot alloc memory for class copy.");
- return;
- }
- }
- (*b)->BellProc = it->BellProc;
- (*b)->CtrlProc = it->CtrlProc;
- (*b)->ctrl = it->ctrl;
-
- b = &(*b)->next;
- }
- } else if (to->bell && !from->bell)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->bell = to->bell;
- to->bell = NULL;
- }
-
- if (from->leds)
- {
- LedFeedbackPtr *l, it;
-
- if (!to->leds)
- {
- classes = to->unused_classes;
- to->leds = classes->leds;
- classes->leds = NULL;
- }
-
- l = &to->leds;
- for (it = from->leds; it; it = it->next)
- {
- if (!(*l))
- {
- *l = calloc(1, sizeof(LedFeedbackClassRec));
- if (!(*l))
- {
- ErrorF("[Xi] Cannot alloc memory for class copy.");
- return;
- }
- }
- (*l)->CtrlProc = it->CtrlProc;
- (*l)->ctrl = it->ctrl;
- if ((*l)->xkb_sli)
- XkbFreeSrvLedInfo((*l)->xkb_sli);
- (*l)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, NULL, *l);
-
- l = &(*l)->next;
- }
- } else if (to->leds && !from->leds)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->leds = to->leds;
- to->leds = NULL;
- }
-}
-
-static void
-DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to)
-{
- ClassesPtr classes;
-
- /* XkbInitDevice (->XkbInitIndicatorMap->XkbFindSrvLedInfo) relies on the
- * kbdfeed to be set up properly, so let's do the feedback classes first.
- */
- if (from->kbdfeed)
- {
- KbdFeedbackPtr *k, it;
-
- if (!to->kbdfeed)
- {
- classes = to->unused_classes;
-
- to->kbdfeed = classes->kbdfeed;
- if (!to->kbdfeed)
- InitKeyboardDeviceStruct(to, NULL, NULL, NULL);
- classes->kbdfeed = NULL;
- }
-
- k = &to->kbdfeed;
- for(it = from->kbdfeed; it; it = it->next)
- {
- if (!(*k))
- {
- *k = calloc(1, sizeof(KbdFeedbackClassRec));
- if (!*k)
- {
- ErrorF("[Xi] Cannot alloc memory for class copy.");
- return;
- }
- }
- (*k)->BellProc = it->BellProc;
- (*k)->CtrlProc = it->CtrlProc;
- (*k)->ctrl = it->ctrl;
- if ((*k)->xkb_sli)
- XkbFreeSrvLedInfo((*k)->xkb_sli);
- (*k)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, *k, NULL);
-
- k = &(*k)->next;
- }
- } else if (to->kbdfeed && !from->kbdfeed)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->kbdfeed = to->kbdfeed;
- to->kbdfeed = NULL;
- }
-
- if (from->key)
- {
- if (!to->key)
- {
- classes = to->unused_classes;
- to->key = classes->key;
- if (!to->key)
- InitKeyboardDeviceStruct(to, NULL, NULL, NULL);
- else
- classes->key = NULL;
- }
-
- CopyKeyClass(from, to);
- } else if (to->key && !from->key)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->key = to->key;
- to->key = NULL;
- }
-
- /* If a SrvLedInfoPtr's flags are XkbSLI_IsDefault, the names and maps
- * pointer point into the xkbInfo->desc struct. XkbCopySrvLedInfo
- * didn't update the pointers so we need to do it manually here.
- */
- if (to->kbdfeed)
- {
- KbdFeedbackPtr k;
-
- for (k = to->kbdfeed; k; k = k->next)
- {
- if (!k->xkb_sli)
- continue;
- if (k->xkb_sli->flags & XkbSLI_IsDefault)
- {
- k->xkb_sli->names = to->key->xkbInfo->desc->names->indicators;
- k->xkb_sli->maps = to->key->xkbInfo->desc->indicators->maps;
- }
- }
- }
-
- /* We can't just copy over the focus class. When an app sets the focus,
- * it'll do so on the master device. Copying the SDs focus means losing
- * the focus.
- * So we only copy the focus class if the device didn't have one,
- * otherwise we leave it as it is.
- */
- if (from->focus)
- {
- if (!to->focus)
- {
- WindowPtr *oldTrace;
-
- classes = to->unused_classes;
- to->focus = classes->focus;
- if (!to->focus)
- {
- to->focus = calloc(1, sizeof(FocusClassRec));
- if (!to->focus)
- FatalError("[Xi] no memory for class shift.\n");
- } else
- classes->focus = NULL;
-
- oldTrace = to->focus->trace;
- memcpy(to->focus, from->focus, sizeof(FocusClassRec));
- to->focus->trace = realloc(oldTrace,
- to->focus->traceSize * sizeof(WindowPtr));
- if (!to->focus->trace && to->focus->traceSize)
- FatalError("[Xi] no memory for trace.\n");
- memcpy(to->focus->trace, from->focus->trace,
- from->focus->traceSize * sizeof(WindowPtr));
- to->focus->sourceid = from->id;
- }
- } else if (to->focus)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->focus = to->focus;
- to->focus = NULL;
- }
-
-}
-
-static void
-DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
-{
- ClassesPtr classes;
-
- /* Feedback classes must be copied first */
- if (from->ptrfeed)
- {
- PtrFeedbackPtr *p, it;
- if (!to->ptrfeed)
- {
- classes = to->unused_classes;
- to->ptrfeed = classes->ptrfeed;
- classes->ptrfeed = NULL;
- }
-
- p = &to->ptrfeed;
- for (it = from->ptrfeed; it; it = it->next)
- {
- if (!(*p))
- {
- *p = calloc(1, sizeof(PtrFeedbackClassRec));
- if (!*p)
- {
- ErrorF("[Xi] Cannot alloc memory for class copy.");
- return;
- }
- }
- (*p)->CtrlProc = it->CtrlProc;
- (*p)->ctrl = it->ctrl;
-
- p = &(*p)->next;
- }
- } else if (to->ptrfeed && !from->ptrfeed)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->ptrfeed = to->ptrfeed;
- to->ptrfeed = NULL;
- }
-
- if (from->valuator)
- {
- ValuatorClassPtr v;
- if (!to->valuator)
- {
- classes = to->unused_classes;
- to->valuator = classes->valuator;
- if (to->valuator)
- classes->valuator = NULL;
- }
-
- to->valuator = realloc(to->valuator, sizeof(ValuatorClassRec) +
- from->valuator->numAxes * sizeof(AxisInfo) +
- from->valuator->numAxes * sizeof(double));
- v = to->valuator;
- if (!v)
- FatalError("[Xi] no memory for class shift.\n");
-
- v->numAxes = from->valuator->numAxes;
- v->axes = (AxisInfoPtr)&v[1];
- memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo));
-
- v->axisVal = (double*)(v->axes + from->valuator->numAxes);
- v->sourceid = from->id;
- } else if (to->valuator && !from->valuator)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->valuator = to->valuator;
- to->valuator = NULL;
- }
-
- if (from->button)
- {
- if (!to->button)
- {
- classes = to->unused_classes;
- to->button = classes->button;
- if (!to->button)
- {
- to->button = calloc(1, sizeof(ButtonClassRec));
- if (!to->button)
- FatalError("[Xi] no memory for class shift.\n");
- } else
- classes->button = NULL;
- }
-
- if (from->button->xkb_acts)
- {
- if (!to->button->xkb_acts)
- {
- to->button->xkb_acts = calloc(1, sizeof(XkbAction));
- if (!to->button->xkb_acts)
- FatalError("[Xi] not enough memory for xkb_acts.\n");
- }
- memcpy(to->button->xkb_acts, from->button->xkb_acts,
- sizeof(XkbAction));
- } else
- free(to->button->xkb_acts);
-
- memcpy(to->button->labels, from->button->labels,
- from->button->numButtons * sizeof(Atom));
- to->button->sourceid = from->id;
- } else if (to->button && !from->button)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->button = to->button;
- to->button = NULL;
- }
-
- if (from->proximity)
- {
- if (!to->proximity)
- {
- classes = to->unused_classes;
- to->proximity = classes->proximity;
- if (!to->proximity)
- {
- to->proximity = calloc(1, sizeof(ProximityClassRec));
- if (!to->proximity)
- FatalError("[Xi] no memory for class shift.\n");
- } else
- classes->proximity = NULL;
- }
- memcpy(to->proximity, from->proximity, sizeof(ProximityClassRec));
- to->proximity->sourceid = from->id;
- } else if (to->proximity)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->proximity = to->proximity;
- to->proximity = NULL;
- }
-
- if (from->absolute)
- {
- if (!to->absolute)
- {
- classes = to->unused_classes;
- to->absolute = classes->absolute;
- if (!to->absolute)
- {
- to->absolute = calloc(1, sizeof(AbsoluteClassRec));
- if (!to->absolute)
- FatalError("[Xi] no memory for class shift.\n");
- } else
- classes->absolute = NULL;
- }
- memcpy(to->absolute, from->absolute, sizeof(AbsoluteClassRec));
- to->absolute->sourceid = from->id;
- } else if (to->absolute)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->absolute = to->absolute;
- to->absolute = NULL;
- }
-}
-
-/**
- * Copies the CONTENT of the classes of device from into the classes in device
- * to. From and to are identical after finishing.
- *
- * If to does not have classes from currenly has, the classes are stored in
- * to's devPrivates system. Later, we recover it again from there if needed.
- * Saves a few memory allocations.
- */
-void
-DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to, DeviceChangedEvent *dce)
-{
- /* generic feedback classes, not tied to pointer and/or keyboard */
- DeepCopyFeedbackClasses(from, to);
-
- if ((dce->flags & DEVCHANGE_KEYBOARD_EVENT))
- DeepCopyKeyboardClasses(from, to);
- if ((dce->flags & DEVCHANGE_POINTER_EVENT))
- DeepCopyPointerClasses(from, to);
-}
-
-
-/**
- * Send an XI2 DeviceChangedEvent to all interested clients.
- */
-void
-XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, DeviceChangedEvent *dce)
-{
- xXIDeviceChangedEvent *dcce;
- int rc;
-
- rc = EventToXI2((InternalEvent*)dce, (xEvent**)&dcce);
- if (rc != Success)
- {
- ErrorF("[Xi] event conversion from DCE failed with code %d\n", rc);
- return;
- }
-
- /* we don't actually swap if there's a NullClient, swapping is done
- * later when event is delivered. */
- SendEventToAllWindows(master, XI_DeviceChangedMask, (xEvent*)dcce, 1);
- free(dcce);
-}
-
-static void
-ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce)
-{
- DeviceIntPtr slave;
- int rc;
-
- /* For now, we don't have devices that change physically. */
- if (!IsMaster(device))
- return;
-
- rc = dixLookupDevice(&slave, dce->sourceid, serverClient, DixReadAccess);
-
- if (rc != Success)
- return; /* Device has disappeared */
-
- if (IsMaster(slave))
- return;
-
- if (IsFloating(slave))
- return; /* set floating since the event */
-
- if (GetMaster(slave, MASTER_ATTACHED)->id != dce->masterid)
- return; /* not our slave anymore, don't care */
-
- /* FIXME: we probably need to send a DCE for the new slave now */
-
- device->public.devicePrivate = slave->public.devicePrivate;
-
- /* FIXME: the classes may have changed since we generated the event. */
- DeepCopyDeviceClasses(slave, device, dce);
- XISendDeviceChangedEvent(slave, device, dce);
-}
-
-/**
- * Update the device state according to the data in the event.
- *
- * return values are
- * DEFAULT ... process as normal
- * DONT_PROCESS ... return immediately from caller
- */
-#define DEFAULT 0
-#define DONT_PROCESS 1
-int
-UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
-{
- int i;
- int key = 0,
- bit = 0,
- last_valuator;
-
- KeyClassPtr k = NULL;
- ButtonClassPtr b = NULL;
- ValuatorClassPtr v = NULL;
-
- /* This event is always the first we get, before the actual events with
- * the data. However, the way how the DDX is set up, "device" will
- * actually be the slave device that caused the event.
- */
- switch(event->type)
- {
- case ET_DeviceChanged:
- ChangeMasterDeviceClasses(device, (DeviceChangedEvent*)event);
- return DONT_PROCESS; /* event has been sent already */
- case ET_Motion:
- case ET_ButtonPress:
- case ET_ButtonRelease:
- case ET_KeyPress:
- case ET_KeyRelease:
- case ET_ProximityIn:
- case ET_ProximityOut:
- break;
- default:
- /* other events don't update the device */
- return DEFAULT;
- }
-
- k = device->key;
- v = device->valuator;
- b = device->button;
-
- key = event->detail.key;
- bit = 1 << (key & 7);
-
- /* Update device axis */
- /* Check valuators first */
- last_valuator = -1;
- for (i = 0; i < MAX_VALUATORS; i++)
- {
- if (BitIsOn(&event->valuators.mask, i))
- {
- if (!v)
- {
- ErrorF("[Xi] Valuators reported for non-valuator device '%s'. "
- "Ignoring event.\n", device->name);
- return DONT_PROCESS;
- } else if (v->numAxes < i)
- {
- ErrorF("[Xi] Too many valuators reported for device '%s'. "
- "Ignoring event.\n", device->name);
- return DONT_PROCESS;
- }
- last_valuator = i;
- }
- }
-
- for (i = 0; i <= last_valuator && i < v->numAxes; i++)
- {
- if (BitIsOn(&event->valuators.mask, i))
- {
- /* XXX: Relative/Absolute mode */
- v->axisVal[i] = event->valuators.data[i];
- v->axisVal[i] += (event->valuators.data_frac[i] * 1.0f / (1 << 16) / (1 << 16));
- }
- }
-
- if (event->type == ET_KeyPress) {
- if (!k)
- return DONT_PROCESS;
-
- /* don't allow ddx to generate multiple downs, but repeats are okay */
- if (key_is_down(device, key, KEY_PROCESSED) && !event->key_repeat)
- return DONT_PROCESS;
-
- if (device->valuator)
- device->valuator->motionHintWindow = NullWindow;
- set_key_down(device, key, KEY_PROCESSED);
- } else if (event->type == ET_KeyRelease) {
- if (!k)
- return DONT_PROCESS;
-
- if (!key_is_down(device, key, KEY_PROCESSED)) /* guard against duplicates */
- return DONT_PROCESS;
- if (device->valuator)
- device->valuator->motionHintWindow = NullWindow;
- set_key_up(device, key, KEY_PROCESSED);
- } else if (event->type == ET_ButtonPress) {
- Mask mask;
- if (!b)
- return DONT_PROCESS;
-
- if (button_is_down(device, key, BUTTON_PROCESSED))
- return DONT_PROCESS;
-
- set_button_down(device, key, BUTTON_PROCESSED);
- if (device->valuator)
- device->valuator->motionHintWindow = NullWindow;
- if (!b->map[key])
- return DONT_PROCESS;
- b->buttonsDown++;
- b->motionMask = DeviceButtonMotionMask;
- if (b->map[key] <= 5)
- b->state |= (Button1Mask >> 1) << b->map[key];
-
- /* Add state and motionMask to the filter for this event */
- mask = DevicePointerMotionMask | b->state | b->motionMask;
- SetMaskForEvent(device->id, mask, DeviceMotionNotify);
- mask = PointerMotionMask | b->state | b->motionMask;
- SetMaskForEvent(device->id, mask, MotionNotify);
- } else if (event->type == ET_ButtonRelease) {
- Mask mask;
- if (!b)
- return DONT_PROCESS;
-
- if (!button_is_down(device, key, BUTTON_PROCESSED))
- return DONT_PROCESS;
- if (IsMaster(device)) {
- DeviceIntPtr sd;
-
- /*
- * Leave the button down if any slave has the
- * button still down. Note that this depends on the
- * event being delivered through the slave first
- */
- for (sd = inputInfo.devices; sd; sd = sd->next) {
- if (IsMaster(sd) || GetMaster(sd, MASTER_POINTER) != device)
- continue;
- if (!sd->button)
- continue;
- for (i = 1; i <= sd->button->numButtons; i++)
- if (sd->button->map[i] == key &&
- button_is_down(sd, i, BUTTON_PROCESSED))
- return DONT_PROCESS;
- }
- }
- set_button_up(device, key, BUTTON_PROCESSED);
- if (device->valuator)
- device->valuator->motionHintWindow = NullWindow;
- if (!b->map[key])
- return DONT_PROCESS;
- if (b->buttonsDown >= 1 && !--b->buttonsDown)
- b->motionMask = 0;
- if (b->map[key] <= 5)
- b->state &= ~((Button1Mask >> 1) << b->map[key]);
-
- /* Add state and motionMask to the filter for this event */
- mask = DevicePointerMotionMask | b->state | b->motionMask;
- SetMaskForEvent(device->id, mask, DeviceMotionNotify);
- mask = PointerMotionMask | b->state | b->motionMask;
- SetMaskForEvent(device->id, mask, MotionNotify);
- } else if (event->type == ET_ProximityIn)
- device->proximity->in_proximity = TRUE;
- else if (event->type == ET_ProximityOut)
- device->proximity->in_proximity = FALSE;
-
- return DEFAULT;
-}
-
-static void
-ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
-{
- GrabPtr grab = device->deviceGrab.grab;
-
- if (grab)
- DeliverGrabbedEvent((InternalEvent*)ev, device, FALSE);
- else { /* deliver to all root windows */
- xEvent *xi;
- int i;
-
- i = EventToXI2((InternalEvent*)ev, (xEvent**)&xi);
- if (i != Success)
- {
- ErrorF("[Xi] %s: XI2 conversion failed in ProcessRawEvent (%d)\n",
- device->name, i);
- return;
- }
-
- for (i = 0; i < screenInfo.numScreens; i++)
- DeliverEventsToWindow(device, screenInfo.screens[i]->root, xi, 1,
- GetEventFilter(device, xi), NULL);
- free(xi);
- }
-}
-
-/**
- * Main device event processing function.
- * Called from when processing the events from the event queue.
- *
- */
-void
-ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
-{
- GrabPtr grab;
- Bool deactivateDeviceGrab = FALSE;
- int key = 0, rootX, rootY;
- ButtonClassPtr b;
- KeyClassPtr k;
- ValuatorClassPtr v;
- int ret = 0;
- int state, i;
- DeviceIntPtr mouse = NULL, kbd = NULL;
- DeviceEvent *event = &ev->device_event;
-
- CHECKEVENT(ev);
-
- if (ev->any.type == ET_RawKeyPress ||
- ev->any.type == ET_RawKeyRelease ||
- ev->any.type == ET_RawButtonPress ||
- ev->any.type == ET_RawButtonRelease ||
- ev->any.type == ET_RawMotion)
- {
- ProcessRawEvent(&ev->raw_event, device);
- return;
- }
-
- if (IsPointerDevice(device))
- {
- kbd = GetPairedDevice(device);
- mouse = device;
- if (!kbd->key) /* can happen with floating SDs */
- kbd = NULL;
- } else
- {
- mouse = GetPairedDevice(device);
- kbd = device;
- if (!mouse->valuator || !mouse->button) /* may be float. SDs */
- mouse = NULL;
- }
-
- /* State needs to be assembled BEFORE the device is updated. */
- state = (kbd && kbd->key) ? XkbStateFieldFromRec(&kbd->key->xkbInfo->state) : 0;
- state |= (mouse && mouse->button) ? (mouse->button->state) : 0;
-
- for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
- if (BitIsOn(mouse->button->down, i))
- SetBit(event->buttons, i);
-
- if (kbd && kbd->key)
- {
- XkbStatePtr state;
- /* we need the state before the event happens */
- if (event->type == ET_KeyPress || event->type == ET_KeyRelease)
- state = &kbd->key->xkbInfo->prev_state;
- else
- state = &kbd->key->xkbInfo->state;
-
- event->mods.base = state->base_mods;
- event->mods.latched = state->latched_mods;
- event->mods.locked = state->locked_mods;
- event->mods.effective = state->mods;
-
- event->group.base = state->base_group;
- event->group.latched = state->latched_group;
- event->group.locked = state->locked_group;
- event->group.effective = state->group;
- }
-
- ret = UpdateDeviceState(device, event);
- if (ret == DONT_PROCESS)
- return;
-
- v = device->valuator;
- b = device->button;
- k = device->key;
-
- if (IsMaster(device) || IsFloating(device))
- CheckMotion(event, device);
-
- switch (event->type)
- {
- case ET_Motion:
- case ET_ButtonPress:
- case ET_ButtonRelease:
- case ET_KeyPress:
- case ET_KeyRelease:
- case ET_ProximityIn:
- case ET_ProximityOut:
- GetSpritePosition(device, &rootX, &rootY);
- event->root_x = rootX;
- event->root_y = rootY;
- NoticeEventTime((InternalEvent*)event);
- event->corestate = state;
- key = event->detail.key;
- break;
- default:
- break;
- }
-
- if (DeviceEventCallback && !syncEvents.playingEvents) {
- DeviceEventInfoRec eventinfo;
- SpritePtr pSprite = device->spriteInfo->sprite;
-
- /* see comment in EnqueueEvents regarding the next three lines */
- if (ev->any.type == ET_Motion)
- ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id;
-
- eventinfo.device = device;
- eventinfo.event = ev;
- CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
- }
-
- grab = device->deviceGrab.grab;
-
- switch(event->type)
- {
- case ET_KeyPress:
- if (!grab && CheckDeviceGrabs(device, event, 0))
- return;
- break;
- case ET_KeyRelease:
- if (grab && device->deviceGrab.fromPassiveGrab &&
- (key == device->deviceGrab.activatingKey) &&
- (device->deviceGrab.grab->type == KeyPress ||
- device->deviceGrab.grab->type == DeviceKeyPress ||
- device->deviceGrab.grab->type == XI_KeyPress))
- deactivateDeviceGrab = TRUE;
- break;
- case ET_ButtonPress:
- event->detail.button = b->map[key];
- if (!event->detail.button) { /* there's no button 0 */
- event->detail.button = key;
- return;
- }
- if (!grab && CheckDeviceGrabs(device, event, 0))
- {
- /* if a passive grab was activated, the event has been sent
- * already */
- return;
- }
- break;
- case ET_ButtonRelease:
- event->detail.button = b->map[key];
- if (!event->detail.button) { /* there's no button 0 */
- event->detail.button = key;
- return;
- }
- if (grab && !b->buttonsDown &&
- device->deviceGrab.fromPassiveGrab &&
- (device->deviceGrab.grab->type == ButtonPress ||
- device->deviceGrab.grab->type == DeviceButtonPress ||
- device->deviceGrab.grab->type == XI_ButtonPress))
- deactivateDeviceGrab = TRUE;
- default:
- break;
- }
-
-
- if (grab)
- DeliverGrabbedEvent((InternalEvent*)event, device, deactivateDeviceGrab);
- else if (device->focus && !IsPointerEvent((InternalEvent*)ev))
- DeliverFocusedEvent(device, (InternalEvent*)event,
- GetSpriteWindow(device));
- else
- DeliverDeviceEvents(GetSpriteWindow(device), (InternalEvent*)event,
- NullGrab, NullWindow, device);
-
- if (deactivateDeviceGrab == TRUE)
- (*device->deviceGrab.DeactivateGrab) (device);
- event->detail.key = key;
-}
-
-int
-InitProximityClassDeviceStruct(DeviceIntPtr dev)
-{
- ProximityClassPtr proxc;
-
- proxc = (ProximityClassPtr) malloc(sizeof(ProximityClassRec));
- if (!proxc)
- return FALSE;
- proxc->sourceid = dev->id;
- proxc->in_proximity = TRUE;
- dev->proximity = proxc;
- return TRUE;
-}
-
-/**
- * Initialise the device's valuators. The memory must already be allocated,
- * this function merely inits the matching axis (specified through axnum) to
- * sane values.
- *
- * It is a condition that (minval < maxval).
- *
- * @see InitValuatorClassDeviceStruct
- */
-void
-InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval,
- int resolution, int min_res, int max_res, int mode)
-{
- AxisInfoPtr ax;
-
- if (!dev || !dev->valuator || minval > maxval)
- return;
- if (axnum >= dev->valuator->numAxes)
- return;
-
- ax = dev->valuator->axes + axnum;
-
- ax->min_value = minval;
- ax->max_value = maxval;
- ax->resolution = resolution;
- ax->min_resolution = min_res;
- ax->max_resolution = max_res;
- ax->label = label;
- ax->mode = mode;
-
- if (mode & OutOfProximity)
- dev->proximity->in_proximity = FALSE;
-}
-
-static void
-FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
- ButtonClassPtr b, ValuatorClassPtr v, int first)
-{
- ev->type = DeviceStateNotify;
- ev->deviceid = dev->id;
- ev->time = currentTime.milliseconds;
- ev->classes_reported = 0;
- ev->num_keys = 0;
- ev->num_buttons = 0;
- ev->num_valuators = 0;
-
- if (b) {
- ev->classes_reported |= (1 << ButtonClass);
- ev->num_buttons = b->numButtons;
- memcpy((char*)ev->buttons, (char*)b->down, 4);
- } else if (k) {
- ev->classes_reported |= (1 << KeyClass);
- ev->num_keys = k->xkbInfo->desc->max_key_code -
- k->xkbInfo->desc->min_key_code;
- memmove((char *)&ev->keys[0], (char *)k->down, 4);
- }
- if (v) {
- int nval = v->numAxes - first;
-
- ev->classes_reported |= (1 << ValuatorClass);
- ev->classes_reported |= valuator_get_mode(dev, 0) << ModeBitsShift;
- ev->num_valuators = nval < 3 ? nval : 3;
- switch (ev->num_valuators) {
- case 3:
- ev->valuator2 = v->axisVal[first + 2];
- case 2:
- ev->valuator1 = v->axisVal[first + 1];
- case 1:
- ev->valuator0 = v->axisVal[first];
- break;
- }
- }
-}
-
-static void
-FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v,
- int first)
-{
- int nval = v->numAxes - first;
-
- ev->type = DeviceValuator;
- ev->deviceid = dev->id;
- ev->num_valuators = nval < 3 ? nval : 3;
- ev->first_valuator = first;
- switch (ev->num_valuators) {
- case 3:
- ev->valuator2 = v->axisVal[first + 2];
- case 2:
- ev->valuator1 = v->axisVal[first + 1];
- case 1:
- ev->valuator0 = v->axisVal[first];
- break;
- }
- first += ev->num_valuators;
-}
-
-void
-DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
- WindowPtr pWin)
-{
- deviceFocus event;
- xXIFocusInEvent *xi2event;
- DeviceIntPtr mouse;
- int btlen, len, i;
-
- mouse = IsFloating(dev) ? dev : GetMaster(dev, MASTER_POINTER);
-
- /* XI 2 event */
- btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0;
- btlen = bytes_to_int32(btlen);
- len = sizeof(xXIFocusInEvent) + btlen * 4;
-
- xi2event = calloc(1, len);
- xi2event->type = GenericEvent;
- xi2event->extension = IReqCode;
- xi2event->evtype = type;
- xi2event->length = bytes_to_int32(len - sizeof(xEvent));
- xi2event->buttons_len = btlen;
- xi2event->detail = detail;
- xi2event->time = currentTime.milliseconds;
- xi2event->deviceid = dev->id;
- xi2event->sourceid = dev->id; /* a device doesn't change focus by itself */
- xi2event->mode = mode;
- xi2event->root_x = FP1616(mouse->spriteInfo->sprite->hot.x, 0);
- xi2event->root_y = FP1616(mouse->spriteInfo->sprite->hot.y, 0);
-
- for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
- if (BitIsOn(mouse->button->down, i))
- SetBit(&xi2event[1], i);
-
- if (dev->key)
- {
- xi2event->mods.base_mods = dev->key->xkbInfo->state.base_mods;
- xi2event->mods.latched_mods = dev->key->xkbInfo->state.latched_mods;
- xi2event->mods.locked_mods = dev->key->xkbInfo->state.locked_mods;
- xi2event->mods.effective_mods = dev->key->xkbInfo->state.mods;
-
- xi2event->group.base_group = dev->key->xkbInfo->state.base_group;
- xi2event->group.latched_group = dev->key->xkbInfo->state.latched_group;
- xi2event->group.locked_group = dev->key->xkbInfo->state.locked_group;
- xi2event->group.effective_group = dev->key->xkbInfo->state.group;
- }
-
- FixUpEventFromWindow(dev->spriteInfo->sprite, (xEvent*)xi2event, pWin,
- None, FALSE);
-
- DeliverEventsToWindow(dev, pWin, (xEvent*)xi2event, 1,
- GetEventFilter(dev, (xEvent*)xi2event), NullGrab);
-
- free(xi2event);
-
- /* XI 1.x event */
- event.deviceid = dev->id;
- event.mode = mode;
- event.type = (type == XI_FocusIn) ? DeviceFocusIn : DeviceFocusOut;
- event.detail = detail;
- event.window = pWin->drawable.id;
- event.time = currentTime.milliseconds;
-
- DeliverEventsToWindow(dev, pWin, (xEvent *) & event, 1,
- DeviceFocusChangeMask, NullGrab);
-
- if ((event.type == DeviceFocusIn) &&
- (wOtherInputMasks(pWin)) &&
- (wOtherInputMasks(pWin)->inputEvents[dev->id] & DeviceStateNotifyMask))
- {
- int evcount = 1;
- deviceStateNotify *ev, *sev;
- deviceKeyStateNotify *kev;
- deviceButtonStateNotify *bev;
-
- KeyClassPtr k;
- ButtonClassPtr b;
- ValuatorClassPtr v;
- int nval = 0, nkeys = 0, nbuttons = 0, first = 0;
-
- if ((b = dev->button) != NULL) {
- nbuttons = b->numButtons;
- if (nbuttons > 32)
- evcount++;
- }
- if ((k = dev->key) != NULL) {
- nkeys = k->xkbInfo->desc->max_key_code -
- k->xkbInfo->desc->min_key_code;
- if (nkeys > 32)
- evcount++;
- if (nbuttons > 0) {
- evcount++;
- }
- }
- if ((v = dev->valuator) != NULL) {
- nval = v->numAxes;
-
- if (nval > 3)
- evcount++;
- if (nval > 6) {
- if (!(k && b))
- evcount++;
- if (nval > 9)
- evcount += ((nval - 7) / 3);
- }
- }
-
- sev = ev = (deviceStateNotify *) malloc(evcount * sizeof(xEvent));
- FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first);
-
- if (b != NULL) {
- FixDeviceStateNotify(dev, ev++, NULL, b, v, first);
- first += 3;
- nval -= 3;
- if (nbuttons > 32) {
- (ev - 1)->deviceid |= MORE_EVENTS;
- bev = (deviceButtonStateNotify *) ev++;
- bev->type = DeviceButtonStateNotify;
- bev->deviceid = dev->id;
- memcpy((char*)&bev->buttons[4], (char*)&b->down[4], DOWN_LENGTH - 4);
- }
- if (nval > 0) {
- (ev - 1)->deviceid |= MORE_EVENTS;
- FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
- first += 3;
- nval -= 3;
- }
- }
-
- if (k != NULL) {
- FixDeviceStateNotify(dev, ev++, k, NULL, v, first);
- first += 3;
- nval -= 3;
- if (nkeys > 32) {
- (ev - 1)->deviceid |= MORE_EVENTS;
- kev = (deviceKeyStateNotify *) ev++;
- kev->type = DeviceKeyStateNotify;
- kev->deviceid = dev->id;
- memmove((char *)&kev->keys[0], (char *)&k->down[4], 28);
- }
- if (nval > 0) {
- (ev - 1)->deviceid |= MORE_EVENTS;
- FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
- first += 3;
- nval -= 3;
- }
- }
-
- while (nval > 0) {
- FixDeviceStateNotify(dev, ev++, NULL, NULL, v, first);
- first += 3;
- nval -= 3;
- if (nval > 0) {
- (ev - 1)->deviceid |= MORE_EVENTS;
- FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
- first += 3;
- nval -= 3;
- }
- }
-
- DeliverEventsToWindow(dev, pWin, (xEvent *) sev, evcount,
- DeviceStateNotifyMask, NullGrab);
- free(sev);
- }
-}
-
-int
-CheckGrabValues(ClientPtr client, GrabParameters* param)
-{
- if (param->grabtype != GRABTYPE_CORE &&
- param->grabtype != GRABTYPE_XI &&
- param->grabtype != GRABTYPE_XI2)
- {
- ErrorF("[Xi] grabtype is invalid. This is a bug.\n");
- return BadImplementation;
- }
-
- if ((param->this_device_mode != GrabModeSync) &&
- (param->this_device_mode != GrabModeAsync)) {
- client->errorValue = param->this_device_mode;
- return BadValue;
- }
- if ((param->other_devices_mode != GrabModeSync) &&
- (param->other_devices_mode != GrabModeAsync)) {
- client->errorValue = param->other_devices_mode;
- return BadValue;
- }
-
- if (param->grabtype != GRABTYPE_XI2 && (param->modifiers != AnyModifier) &&
- (param->modifiers & ~AllModifiersMask)) {
- client->errorValue = param->modifiers;
- return BadValue;
- }
-
- if ((param->ownerEvents != xFalse) && (param->ownerEvents != xTrue)) {
- client->errorValue = param->ownerEvents;
- return BadValue;
- }
- return Success;
-}
-
-int
-GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
- int button, GrabParameters *param, GrabType grabtype,
- GrabMask *mask)
-{
- WindowPtr pWin, confineTo;
- CursorPtr cursor;
- GrabPtr grab;
- int rc, type = -1;
- Mask access_mode = DixGrabAccess;
-
- rc = CheckGrabValues(client, param);
- if (rc != Success)
- return rc;
- if (param->confineTo == None)
- confineTo = NullWindow;
- else {
- rc = dixLookupWindow(&confineTo, param->confineTo, client, DixSetAttrAccess);
- if (rc != Success)
- return rc;
- }
- if (param->cursor == None)
- cursor = NullCursor;
- else {
- rc = dixLookupResourceByType((pointer *)&cursor, param->cursor,
- RT_CURSOR, client, DixUseAccess);
- if (rc != Success)
- {
- client->errorValue = param->cursor;
- return rc;
- }
- access_mode |= DixForceAccess;
- }
- if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync)
- access_mode |= DixFreezeAccess;
- rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode);
- if (rc != Success)
- return rc;
- rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess);
- if (rc != Success)
- return rc;
-
- if (grabtype == GRABTYPE_XI)
- type = DeviceButtonPress;
- else if (grabtype == GRABTYPE_XI2)
- type = XI_ButtonPress;
-
- grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype,
- mask, param, type, button, confineTo, cursor);
- if (!grab)
- return BadAlloc;
- return AddPassiveGrabToList(client, grab);
-}
-
-/**
- * Grab the given key. If grabtype is GRABTYPE_XI, the key is a keycode. If
- * grabtype is GRABTYPE_XI2, the key is a keysym.
- */
-int
-GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
- int key, GrabParameters *param, GrabType grabtype, GrabMask *mask)
-{
- WindowPtr pWin;
- GrabPtr grab;
- KeyClassPtr k = dev->key;
- Mask access_mode = DixGrabAccess;
- int rc, type = -1;
-
- rc = CheckGrabValues(client, param);
- if (rc != Success)
- return rc;
- if (k == NULL)
- return BadMatch;
- if (grabtype == GRABTYPE_XI)
- {
- if ((key > k->xkbInfo->desc->max_key_code ||
- key < k->xkbInfo->desc->min_key_code)
- && (key != AnyKey)) {
- client->errorValue = key;
- return BadValue;
- }
- type = DeviceKeyPress;
- } else if (grabtype == GRABTYPE_XI2)
- type = XI_KeyPress;
-
- rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess);
- if (rc != Success)
- return rc;
- if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync)
- access_mode |= DixFreezeAccess;
- rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode);
- if (rc != Success)
- return rc;
-
- grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype,
- mask, param, type, key, NULL, NULL);
- if (!grab)
- return BadAlloc;
- return AddPassiveGrabToList(client, grab);
-}
-
-/* Enter/FocusIn grab */
-int
-GrabWindow(ClientPtr client, DeviceIntPtr dev, int type,
- GrabParameters *param, GrabMask *mask)
-{
- WindowPtr pWin;
- CursorPtr cursor;
- GrabPtr grab;
- Mask access_mode = DixGrabAccess;
- int rc;
-
- rc = CheckGrabValues(client, param);
- if (rc != Success)
- return rc;
-
- rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess);
- if (rc != Success)
- return rc;
- if (param->cursor == None)
- cursor = NullCursor;
- else {
- rc = dixLookupResourceByType((pointer *)&cursor, param->cursor,
- RT_CURSOR, client, DixUseAccess);
- if (rc != Success)
- {
- client->errorValue = param->cursor;
- return rc;
- }
- access_mode |= DixForceAccess;
- }
- if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync)
- access_mode |= DixFreezeAccess;
- rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode);
- if (rc != Success)
- return rc;
-
- grab = CreateGrab(client->index, dev, dev, pWin, GRABTYPE_XI2,
- mask, param, (type == XIGrabtypeEnter) ? XI_Enter : XI_FocusIn,
- 0, NULL, cursor);
-
- if (!grab)
- return BadAlloc;
-
- return AddPassiveGrabToList(client, grab);
-}
-
-int
-SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client,
- Mask mask, Mask exclusivemasks)
-{
- int mskidx = dev->id;
- int i, ret;
- Mask check;
- InputClientsPtr others;
-
- check = (mask & exclusivemasks);
- if (wOtherInputMasks(pWin)) {
- if (check & wOtherInputMasks(pWin)->inputEvents[mskidx]) { /* It is illegal for two different
- * clients to select on any of the
- * events for maskcheck. However,
- * it is OK, for some client to
- * continue selecting on one of those
- * events. */
- for (others = wOtherInputMasks(pWin)->inputClients; others;
- others = others->next) {
- if (!SameClient(others, client) && (check &
- others->mask[mskidx]))
- return BadAccess;
- }
- }
- for (others = wOtherInputMasks(pWin)->inputClients; others;
- others = others->next) {
- if (SameClient(others, client)) {
- check = others->mask[mskidx];
- others->mask[mskidx] = mask;
- if (mask == 0) {
- for (i = 0; i < EMASKSIZE; i++)
- if (i != mskidx && others->mask[i] != 0)
- break;
- if (i == EMASKSIZE) {
- RecalculateDeviceDeliverableEvents(pWin);
- if (ShouldFreeInputMasks(pWin, FALSE))
- FreeResource(others->resource, RT_NONE);
- return Success;
- }
- }
- goto maskSet;
- }
- }
- }
- check = 0;
- if ((ret = AddExtensionClient(pWin, client, mask, mskidx)) != Success)
- return ret;
- maskSet:
- if (dev->valuator)
- if ((dev->valuator->motionHintWindow == pWin) &&
- (mask & DevicePointerMotionHintMask) &&
- !(check & DevicePointerMotionHintMask) && !dev->deviceGrab.grab)
- dev->valuator->motionHintWindow = NullWindow;
- RecalculateDeviceDeliverableEvents(pWin);
- return Success;
-}
-
-int
-AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx)
-{
- InputClientsPtr others;
-
- if (!pWin->optional && !MakeWindowOptional(pWin))
- return BadAlloc;
- others = calloc(1, sizeof(InputClients));
- if (!others)
- return BadAlloc;
- if (!pWin->optional->inputMasks && !MakeInputMasks(pWin))
- return BadAlloc;
- others->mask[mskidx] = mask;
- others->resource = FakeClientID(client->index);
- others->next = pWin->optional->inputMasks->inputClients;
- pWin->optional->inputMasks->inputClients = others;
- if (!AddResource(others->resource, RT_INPUTCLIENT, (pointer) pWin))
- return BadAlloc;
- return Success;
-}
-
-static Bool
-MakeInputMasks(WindowPtr pWin)
-{
- struct _OtherInputMasks *imasks;
-
- imasks = calloc(1, sizeof(struct _OtherInputMasks));
- if (!imasks)
- return FALSE;
- pWin->optional->inputMasks = imasks;
- return TRUE;
-}
-
-void
-RecalculateDeviceDeliverableEvents(WindowPtr pWin)
-{
- InputClientsPtr others;
- struct _OtherInputMasks *inputMasks; /* default: NULL */
- WindowPtr pChild, tmp;
- int i, j;
-
- pChild = pWin;
- while (1) {
- if ((inputMasks = wOtherInputMasks(pChild)) != 0) {
- for (i = 0; i < EMASKSIZE; i++)
- memset(inputMasks->xi2mask[i], 0, sizeof(inputMasks->xi2mask[i]));
- for (others = inputMasks->inputClients; others;
- others = others->next) {
- for (i = 0; i < EMASKSIZE; i++)
- inputMasks->inputEvents[i] |= others->mask[i];
- for (i = 0; i < EMASKSIZE; i++)
- for (j = 0; j < XI2MASKSIZE; j++)
- inputMasks->xi2mask[i][j] |= others->xi2mask[i][j];
- }
- for (i = 0; i < EMASKSIZE; i++)
- inputMasks->deliverableEvents[i] = inputMasks->inputEvents[i];
- for (tmp = pChild->parent; tmp; tmp = tmp->parent)
- if (wOtherInputMasks(tmp))
- for (i = 0; i < EMASKSIZE; i++)
- inputMasks->deliverableEvents[i] |=
- (wOtherInputMasks(tmp)->deliverableEvents[i]
- & ~inputMasks->
- dontPropagateMask[i] & PropagateMask[i]);
- }
- if (pChild->firstChild) {
- pChild = pChild->firstChild;
- continue;
- }
- while (!pChild->nextSib && (pChild != pWin))
- pChild = pChild->parent;
- if (pChild == pWin)
- break;
- pChild = pChild->nextSib;
- }
-}
-
-int
-InputClientGone(WindowPtr pWin, XID id)
-{
- InputClientsPtr other, prev;
-
- if (!wOtherInputMasks(pWin))
- return Success;
- prev = 0;
- for (other = wOtherInputMasks(pWin)->inputClients; other;
- other = other->next) {
- if (other->resource == id) {
- if (prev) {
- prev->next = other->next;
- free(other);
- } else if (!(other->next)) {
- if (ShouldFreeInputMasks(pWin, TRUE)) {
- wOtherInputMasks(pWin)->inputClients = other->next;
- free(wOtherInputMasks(pWin));
- pWin->optional->inputMasks = (OtherInputMasks *) NULL;
- CheckWindowOptionalNeed(pWin);
- free(other);
- } else {
- other->resource = FakeClientID(0);
- if (!AddResource(other->resource, RT_INPUTCLIENT,
- (pointer) pWin))
- return BadAlloc;
- }
- } else {
- wOtherInputMasks(pWin)->inputClients = other->next;
- free(other);
- }
- RecalculateDeviceDeliverableEvents(pWin);
- return Success;
- }
- prev = other;
- }
- FatalError("client not on device event list");
-}
-
-int
-SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate,
- xEvent * ev, Mask mask, int count)
-{
- WindowPtr pWin;
- WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
- WindowPtr spriteWin = GetSpriteWindow(d);
-
- if (dest == PointerWindow)
- pWin = spriteWin;
- else if (dest == InputFocus) {
- WindowPtr inputFocus;
-
- if (!d->focus)
- inputFocus = spriteWin;
- else
- inputFocus = d->focus->win;
-
- if (inputFocus == FollowKeyboardWin)
- inputFocus = inputInfo.keyboard->focus->win;
-
- if (inputFocus == NoneWin)
- return Success;
-
- /* If the input focus is PointerRootWin, send the event to where
- * the pointer is if possible, then perhaps propogate up to root. */
- if (inputFocus == PointerRootWin)
- inputFocus = GetCurrentRootWindow(d);
-
- if (IsParent(inputFocus, spriteWin)) {
- effectiveFocus = inputFocus;
- pWin = spriteWin;
- } else
- effectiveFocus = pWin = inputFocus;
- } else
- dixLookupWindow(&pWin, dest, client, DixSendAccess);
- if (!pWin)
- return BadWindow;
- if ((propagate != xFalse) && (propagate != xTrue)) {
- client->errorValue = propagate;
- return BadValue;
- }
- ev->u.u.type |= 0x80;
- if (propagate) {
- for (; pWin; pWin = pWin->parent) {
- if (DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab))
- return Success;
- if (pWin == effectiveFocus)
- return Success;
- if (wOtherInputMasks(pWin))
- mask &= ~wOtherInputMasks(pWin)->dontPropagateMask[d->id];
- if (!mask)
- break;
- }
- } else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, ev, count))
- DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab);
- return Success;
-}
-
-int
-SetButtonMapping(ClientPtr client, DeviceIntPtr dev, int nElts, BYTE * map)
-{
- int i;
- ButtonClassPtr b = dev->button;
-
- if (b == NULL)
- return BadMatch;
-
- if (nElts != b->numButtons) {
- client->errorValue = nElts;
- return BadValue;
- }
- if (BadDeviceMap(&map[0], nElts, 1, 255, &client->errorValue))
- return BadValue;
- for (i = 0; i < nElts; i++)
- if ((b->map[i + 1] != map[i]) && BitIsOn(b->down, i + 1))
- return MappingBusy;
- for (i = 0; i < nElts; i++)
- b->map[i + 1] = map[i];
- return Success;
-}
-
-int
-ChangeKeyMapping(ClientPtr client,
- DeviceIntPtr dev,
- unsigned len,
- int type,
- KeyCode firstKeyCode,
- CARD8 keyCodes, CARD8 keySymsPerKeyCode, KeySym * map)
-{
- KeySymsRec keysyms;
- KeyClassPtr k = dev->key;
-
- if (k == NULL)
- return BadMatch;
-
- if (len != (keyCodes * keySymsPerKeyCode))
- return BadLength;
-
- if ((firstKeyCode < k->xkbInfo->desc->min_key_code) ||
- (firstKeyCode + keyCodes - 1 > k->xkbInfo->desc->max_key_code)) {
- client->errorValue = firstKeyCode;
- return BadValue;
- }
- if (keySymsPerKeyCode == 0) {
- client->errorValue = 0;
- return BadValue;
- }
- keysyms.minKeyCode = firstKeyCode;
- keysyms.maxKeyCode = firstKeyCode + keyCodes - 1;
- keysyms.mapWidth = keySymsPerKeyCode;
- keysyms.map = map;
-
- XkbApplyMappingChange(dev, &keysyms, firstKeyCode, keyCodes, NULL,
- serverClient);
-
- return Success;
-}
-
-static void
-DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev)
-{
- WindowPtr parent;
-
- /* Deactivate any grabs performed on this window, before making
- * any input focus changes.
- * Deactivating a device grab should cause focus events. */
-
- if (dev->deviceGrab.grab && (dev->deviceGrab.grab->window == pWin))
- (*dev->deviceGrab.DeactivateGrab) (dev);
-
- /* If the focus window is a root window (ie. has no parent)
- * then don't delete the focus from it. */
-
- if (dev->focus && (pWin == dev->focus->win) && (pWin->parent != NullWindow)) {
- int focusEventMode = NotifyNormal;
-
- /* If a grab is in progress, then alter the mode of focus events. */
-
- if (dev->deviceGrab.grab)
- focusEventMode = NotifyWhileGrabbed;
-
- switch (dev->focus->revert) {
- case RevertToNone:
- if (!ActivateFocusInGrab(dev, pWin, NoneWin))
- DoFocusEvents(dev, pWin, NoneWin, focusEventMode);
- dev->focus->win = NoneWin;
- dev->focus->traceGood = 0;
- break;
- case RevertToParent:
- parent = pWin;
- do {
- parent = parent->parent;
- dev->focus->traceGood--;
- }
- while (!parent->realized);
- if (!ActivateFocusInGrab(dev, pWin, parent))
- DoFocusEvents(dev, pWin, parent, focusEventMode);
- dev->focus->win = parent;
- dev->focus->revert = RevertToNone;
- break;
- case RevertToPointerRoot:
- if (!ActivateFocusInGrab(dev, pWin, PointerRootWin))
- DoFocusEvents(dev, pWin, PointerRootWin, focusEventMode);
- dev->focus->win = PointerRootWin;
- dev->focus->traceGood = 0;
- break;
- case RevertToFollowKeyboard:
- {
- DeviceIntPtr kbd = GetMaster(dev, MASTER_KEYBOARD);
- if (!kbd || (kbd == dev && kbd != inputInfo.keyboard))
- kbd = inputInfo.keyboard;
- if (kbd->focus->win) {
- if (!ActivateFocusInGrab(dev, pWin, kbd->focus->win))
- DoFocusEvents(dev, pWin, kbd->focus->win, focusEventMode);
- dev->focus->win = FollowKeyboardWin;
- dev->focus->traceGood = 0;
- } else {
- if (!ActivateFocusInGrab(dev, pWin, NoneWin))
- DoFocusEvents(dev, pWin, NoneWin, focusEventMode);
- dev->focus->win = NoneWin;
- dev->focus->traceGood = 0;
- }
- }
- break;
- }
- }
-
- if (dev->valuator)
- if (dev->valuator->motionHintWindow == pWin)
- dev->valuator->motionHintWindow = NullWindow;
-}
-
-void
-DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources)
-{
- int i;
- DeviceIntPtr dev;
- InputClientsPtr ic;
- struct _OtherInputMasks *inputMasks;
-
- for (dev = inputInfo.devices; dev; dev = dev->next) {
- DeleteDeviceFromAnyExtEvents(pWin, dev);
- }
-
- for (dev = inputInfo.off_devices; dev; dev = dev->next)
- DeleteDeviceFromAnyExtEvents(pWin, dev);
-
- if (freeResources)
- while ((inputMasks = wOtherInputMasks(pWin)) != 0) {
- ic = inputMasks->inputClients;
- for (i = 0; i < EMASKSIZE; i++)
- inputMasks->dontPropagateMask[i] = 0;
- FreeResource(ic->resource, RT_NONE);
- }
-}
-
-int
-MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask)
-{
- DeviceIntPtr dev;
-
- dixLookupDevice(&dev, pEvents->deviceid & DEVICE_BITS, serverClient,
- DixReadAccess);
- if (!dev)
- return 0;
-
- if (pEvents->type == DeviceMotionNotify) {
- if (mask & DevicePointerMotionHintMask) {
- if (WID(dev->valuator->motionHintWindow) == pEvents->event) {
- return 1; /* don't send, but pretend we did */
- }
- pEvents->detail = NotifyHint;
- } else {
- pEvents->detail = NotifyNormal;
- }
- }
- return 0;
-}
-
-void
-CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type,
- deviceKeyButtonPointer * xE, GrabPtr grab,
- ClientPtr client, Mask deliveryMask)
-{
- DeviceIntPtr dev;
-
- dixLookupDevice(&dev, xE->deviceid & DEVICE_BITS, serverClient,
- DixGrabAccess);
- if (!dev)
- return;
-
- if (type == DeviceMotionNotify)
- dev->valuator->motionHintWindow = pWin;
- else if ((type == DeviceButtonPress) && (!grab) &&
- (deliveryMask & DeviceButtonGrabMask)) {
- GrabRec tempGrab;
-
- tempGrab.device = dev;
- tempGrab.resource = client->clientAsMask;
- tempGrab.window = pWin;
- tempGrab.ownerEvents =
- (deliveryMask & DeviceOwnerGrabButtonMask) ? TRUE : FALSE;
- tempGrab.eventMask = deliveryMask;
- tempGrab.keyboardMode = GrabModeAsync;
- tempGrab.pointerMode = GrabModeAsync;
- tempGrab.confineTo = NullWindow;
- tempGrab.cursor = NullCursor;
- tempGrab.next = NULL;
- (*dev->deviceGrab.ActivateGrab) (dev, &tempGrab, currentTime, TRUE);
- }
-}
-
-static Mask
-DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
-{
- InputClientsPtr other;
-
- if (!wOtherInputMasks(pWin))
- return 0;
- for (other = wOtherInputMasks(pWin)->inputClients; other;
- other = other->next) {
- if (SameClient(other, client))
- return other->mask[dev->id];
- }
- return 0;
-}
-
-void
-MaybeStopDeviceHint(DeviceIntPtr dev, ClientPtr client)
-{
- WindowPtr pWin;
- GrabPtr grab = dev->deviceGrab.grab;
-
- pWin = dev->valuator->motionHintWindow;
-
- if ((grab && SameClient(grab, client) &&
- ((grab->eventMask & DevicePointerMotionHintMask) ||
- (grab->ownerEvents &&
- (DeviceEventMaskForClient(dev, pWin, client) &
- DevicePointerMotionHintMask)))) ||
- (!grab &&
- (DeviceEventMaskForClient(dev, pWin, client) &
- DevicePointerMotionHintMask)))
- dev->valuator->motionHintWindow = NullWindow;
-}
-
-int
-DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask,
- int maskndx)
-{
- struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin);
-
- if (mask & ~PropagateMask[maskndx]) {
- client->errorValue = mask;
- return BadValue;
- }
-
- if (mask == 0) {
- if (inputMasks)
- inputMasks->dontPropagateMask[maskndx] = mask;
- } else {
- if (!inputMasks)
- AddExtensionClient(pWin, client, 0, 0);
- inputMasks = wOtherInputMasks(pWin);
- inputMasks->dontPropagateMask[maskndx] = mask;
- }
- RecalculateDeviceDeliverableEvents(pWin);
- if (ShouldFreeInputMasks(pWin, FALSE))
- FreeResource(inputMasks->inputClients->resource, RT_NONE);
- return Success;
-}
-
-Bool
-ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents)
-{
- int i;
- Mask allInputEventMasks = 0;
- struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin);
-
- for (i = 0; i < EMASKSIZE; i++)
- allInputEventMasks |= inputMasks->dontPropagateMask[i];
- if (!ignoreSelectedEvents)
- for (i = 0; i < EMASKSIZE; i++)
- allInputEventMasks |= inputMasks->inputEvents[i];
- if (allInputEventMasks == 0)
- return TRUE;
- else
- return FALSE;
-}
-
-/***********************************************************************
- *
- * Walk through the window tree, finding all clients that want to know
- * about the Event.
- *
- */
-
-static void
-FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask,
- xEvent * ev, int count)
-{
- WindowPtr p2;
-
- while (p1) {
- p2 = p1->firstChild;
- DeliverEventsToWindow(dev, p1, ev, count, mask, NullGrab);
- FindInterestedChildren(dev, p2, mask, ev, count);
- p1 = p1->nextSib;
- }
-}
-
-/***********************************************************************
- *
- * Send an event to interested clients in all windows on all screens.
- *
- */
-
-void
-SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count)
-{
- int i;
- WindowPtr pWin, p1;
-
- for (i = 0; i < screenInfo.numScreens; i++) {
- pWin = screenInfo.screens[i]->root;
- if (!pWin)
- continue;
- DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab);
- p1 = pWin->firstChild;
- FindInterestedChildren(dev, p1, mask, ev, count);
- }
-}
-
-/**
- * Set the XI2 mask for the given client on the given window.
- * @param dev The device to set the mask for.
- * @param win The window to set the mask on.
- * @param client The client setting the mask.
- * @param len Number of bytes in mask.
- * @param mask Event mask in the form of (1 << eventtype)
- */
-int
-XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
- unsigned int len, unsigned char* mask)
-{
- OtherInputMasks *masks;
- InputClientsPtr others = NULL;
-
- masks = wOtherInputMasks(win);
- if (masks)
- {
- for (others = wOtherInputMasks(win)->inputClients; others;
- others = others->next) {
- if (SameClient(others, client)) {
- memset(others->xi2mask[dev->id], 0,
- sizeof(others->xi2mask[dev->id]));
- break;
- }
- }
- }
-
- len = min(len, sizeof(others->xi2mask[dev->id]));
-
- if (len && !others)
- {
- if (AddExtensionClient(win, client, 0, 0) != Success)
- return BadAlloc;
- others= wOtherInputMasks(win)->inputClients;
- }
-
- if (others)
- memset(others->xi2mask[dev->id], 0, sizeof(others->xi2mask[dev->id]));
-
- if (len)
- memcpy(others->xi2mask[dev->id], mask, len);
-
- RecalculateDeviceDeliverableEvents(win);
-
- return Success;
-}
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Hewlett-Packard not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+/********************************************************************
+ *
+ * Routines to register and initialize extension input devices.
+ * This also contains ProcessOtherEvent, the routine called from DDX
+ * to route extension events.
+ *
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#else
+#define XINPUT
+#endif
+
+#include "inputstr.h"
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/extensions/XI.h>
+#include <X11/extensions/XIproto.h>
+#include <X11/extensions/XI2proto.h>
+#include <X11/extensions/geproto.h>
+#include "windowstr.h"
+#include "miscstruct.h"
+#include "region.h"
+#include "exevents.h"
+#include "extnsionst.h"
+#include "exglobals.h"
+#include "dixevents.h" /* DeliverFocusedEvent */
+#include "dixgrabs.h" /* CreateGrab() */
+#include "scrnintstr.h"
+#include "listdev.h" /* for CopySwapXXXClass */
+#include "xace.h"
+#include "xiquerydevice.h" /* For List*Info */
+#include "eventconvert.h"
+#include "eventstr.h"
+
+#include <X11/extensions/XKBproto.h>
+#include "xkbsrv.h"
+
+#define WID(w) ((w) ? ((w)->drawable.id) : 0)
+#define AllModifiersMask ( \
+ ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \
+ Mod3Mask | Mod4Mask | Mod5Mask )
+#define AllButtonsMask ( \
+ Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask )
+
+Bool ShouldFreeInputMasks(WindowPtr /* pWin */ ,
+ Bool /* ignoreSelectedEvents */
+ );
+static Bool MakeInputMasks(WindowPtr /* pWin */
+ );
+
+/*
+ * Only let the given client know of core events which will affect its
+ * interpretation of input events, if the client's ClientPointer (or the
+ * paired keyboard) is the current device.
+ */
+int
+XIShouldNotify(ClientPtr client, DeviceIntPtr dev)
+{
+ DeviceIntPtr current_ptr = PickPointer(client);
+ DeviceIntPtr current_kbd = GetPairedDevice(current_ptr);
+
+ if (dev == current_kbd || dev == current_ptr)
+ return 1;
+
+ return 0;
+}
+
+Bool
+IsPointerEvent(InternalEvent* event)
+{
+ switch(event->any.type)
+ {
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ case ET_Motion:
+ /* XXX: enter/leave ?? */
+ return TRUE;
+ default:
+ break;
+ }
+ return FALSE;
+}
+
+/**
+ * @return the device matching the deviceid of the device set in the event, or
+ * NULL if the event is not an XInput event.
+ */
+DeviceIntPtr
+XIGetDevice(xEvent* xE)
+{
+ DeviceIntPtr pDev = NULL;
+
+ if (xE->u.u.type == DeviceButtonPress ||
+ xE->u.u.type == DeviceButtonRelease ||
+ xE->u.u.type == DeviceMotionNotify ||
+ xE->u.u.type == ProximityIn ||
+ xE->u.u.type == ProximityOut ||
+ xE->u.u.type == DevicePropertyNotify)
+ {
+ int rc;
+ int id;
+
+ id = ((deviceKeyButtonPointer*)xE)->deviceid & ~MORE_EVENTS;
+
+ rc = dixLookupDevice(&pDev, id, serverClient, DixUnknownAccess);
+ if (rc != Success)
+ ErrorF("[dix] XIGetDevice failed on XACE restrictions (%d)\n", rc);
+ }
+ return pDev;
+}
+
+
+/**
+ * Copy the device->key into master->key and send a mapping notify to the
+ * clients if appropriate.
+ * master->key needs to be allocated by the caller.
+ *
+ * Device is the slave device. If it is attached to a master device, we may
+ * need to send a mapping notify to the client because it causes the MD
+ * to change state.
+ *
+ * Mapping notify needs to be sent in the following cases:
+ * - different slave device on same master
+ * - different master
+ *
+ * XXX: They way how the code is we also send a map notify if the slave device
+ * stays the same, but the master changes. This isn't really necessary though.
+ *
+ * XXX: this gives you funny behaviour with the ClientPointer. When a
+ * MappingNotify is sent to the client, the client usually responds with a
+ * GetKeyboardMapping. This will retrieve the ClientPointer's keyboard
+ * mapping, regardless of which keyboard sent the last mapping notify request.
+ * So depending on the CP setting, your keyboard may change layout in each
+ * app...
+ *
+ * This code is basically the old SwitchCoreKeyboard.
+ */
+
+void
+CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
+{
+ KeyClassPtr mk = master->key;
+
+ if (device == master)
+ return;
+
+ mk->sourceid = device->id;
+
+
+ if (!XkbCopyDeviceKeymap(master, device))
+ FatalError("Couldn't pivot keymap from device to core!\n");
+}
+
+/**
+ * Copies the feedback classes from device "from" into device "to". Classes
+ * are duplicated (not just flipping the pointers). All feedback classes are
+ * linked lists, the full list is duplicated.
+ */
+static void
+DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
+{
+ ClassesPtr classes;
+
+
+ if (from->intfeed)
+ {
+ IntegerFeedbackPtr *i, it;
+
+ if (!to->intfeed)
+ {
+ classes = to->unused_classes;
+ to->intfeed = classes->intfeed;
+ classes->intfeed = NULL;
+ }
+
+ i = &to->intfeed;
+ for (it = from->intfeed; it; it = it->next)
+ {
+ if (!(*i))
+ {
+ *i = calloc(1, sizeof(IntegerFeedbackClassRec));
+ if (!(*i))
+ {
+ ErrorF("[Xi] Cannot alloc memory for class copy.");
+ return;
+ }
+ }
+ (*i)->CtrlProc = it->CtrlProc;
+ (*i)->ctrl = it->ctrl;
+
+ i = &(*i)->next;
+ }
+ } else if (to->intfeed && !from->intfeed)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->intfeed = to->intfeed;
+ to->intfeed = NULL;
+ }
+
+ if (from->stringfeed)
+ {
+ StringFeedbackPtr *s, it;
+
+ if (!to->stringfeed)
+ {
+ classes = to->unused_classes;
+ to->stringfeed = classes->stringfeed;
+ classes->stringfeed = NULL;
+ }
+
+ s = &to->stringfeed;
+ for (it = from->stringfeed; it; it = it->next)
+ {
+ if (!(*s))
+ {
+ *s = calloc(1, sizeof(StringFeedbackClassRec));
+ if (!(*s))
+ {
+ ErrorF("[Xi] Cannot alloc memory for class copy.");
+ return;
+ }
+ }
+ (*s)->CtrlProc = it->CtrlProc;
+ (*s)->ctrl = it->ctrl;
+
+ s = &(*s)->next;
+ }
+ } else if (to->stringfeed && !from->stringfeed)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->stringfeed = to->stringfeed;
+ to->stringfeed = NULL;
+ }
+
+ if (from->bell)
+ {
+ BellFeedbackPtr *b, it;
+
+ if (!to->bell)
+ {
+ classes = to->unused_classes;
+ to->bell = classes->bell;
+ classes->bell = NULL;
+ }
+
+ b = &to->bell;
+ for (it = from->bell; it; it = it->next)
+ {
+ if (!(*b))
+ {
+ *b = calloc(1, sizeof(BellFeedbackClassRec));
+ if (!(*b))
+ {
+ ErrorF("[Xi] Cannot alloc memory for class copy.");
+ return;
+ }
+ }
+ (*b)->BellProc = it->BellProc;
+ (*b)->CtrlProc = it->CtrlProc;
+ (*b)->ctrl = it->ctrl;
+
+ b = &(*b)->next;
+ }
+ } else if (to->bell && !from->bell)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->bell = to->bell;
+ to->bell = NULL;
+ }
+
+ if (from->leds)
+ {
+ LedFeedbackPtr *l, it;
+
+ if (!to->leds)
+ {
+ classes = to->unused_classes;
+ to->leds = classes->leds;
+ classes->leds = NULL;
+ }
+
+ l = &to->leds;
+ for (it = from->leds; it; it = it->next)
+ {
+ if (!(*l))
+ {
+ *l = calloc(1, sizeof(LedFeedbackClassRec));
+ if (!(*l))
+ {
+ ErrorF("[Xi] Cannot alloc memory for class copy.");
+ return;
+ }
+ }
+ (*l)->CtrlProc = it->CtrlProc;
+ (*l)->ctrl = it->ctrl;
+ if ((*l)->xkb_sli)
+ XkbFreeSrvLedInfo((*l)->xkb_sli);
+ (*l)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, NULL, *l);
+
+ l = &(*l)->next;
+ }
+ } else if (to->leds && !from->leds)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->leds = to->leds;
+ to->leds = NULL;
+ }
+}
+
+static void
+DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to)
+{
+ ClassesPtr classes;
+
+ /* XkbInitDevice (->XkbInitIndicatorMap->XkbFindSrvLedInfo) relies on the
+ * kbdfeed to be set up properly, so let's do the feedback classes first.
+ */
+ if (from->kbdfeed)
+ {
+ KbdFeedbackPtr *k, it;
+
+ if (!to->kbdfeed)
+ {
+ classes = to->unused_classes;
+
+ to->kbdfeed = classes->kbdfeed;
+ if (!to->kbdfeed)
+ InitKeyboardDeviceStruct(to, NULL, NULL, NULL);
+ classes->kbdfeed = NULL;
+ }
+
+ k = &to->kbdfeed;
+ for(it = from->kbdfeed; it; it = it->next)
+ {
+ if (!(*k))
+ {
+ *k = calloc(1, sizeof(KbdFeedbackClassRec));
+ if (!*k)
+ {
+ ErrorF("[Xi] Cannot alloc memory for class copy.");
+ return;
+ }
+ }
+ (*k)->BellProc = it->BellProc;
+ (*k)->CtrlProc = it->CtrlProc;
+ (*k)->ctrl = it->ctrl;
+ if ((*k)->xkb_sli)
+ XkbFreeSrvLedInfo((*k)->xkb_sli);
+ (*k)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, *k, NULL);
+
+ k = &(*k)->next;
+ }
+ } else if (to->kbdfeed && !from->kbdfeed)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->kbdfeed = to->kbdfeed;
+ to->kbdfeed = NULL;
+ }
+
+ if (from->key)
+ {
+ if (!to->key)
+ {
+ classes = to->unused_classes;
+ to->key = classes->key;
+ if (!to->key)
+ InitKeyboardDeviceStruct(to, NULL, NULL, NULL);
+ else
+ classes->key = NULL;
+ }
+
+ CopyKeyClass(from, to);
+ } else if (to->key && !from->key)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->key = to->key;
+ to->key = NULL;
+ }
+
+ /* If a SrvLedInfoPtr's flags are XkbSLI_IsDefault, the names and maps
+ * pointer point into the xkbInfo->desc struct. XkbCopySrvLedInfo
+ * didn't update the pointers so we need to do it manually here.
+ */
+ if (to->kbdfeed)
+ {
+ KbdFeedbackPtr k;
+
+ for (k = to->kbdfeed; k; k = k->next)
+ {
+ if (!k->xkb_sli)
+ continue;
+ if (k->xkb_sli->flags & XkbSLI_IsDefault)
+ {
+ k->xkb_sli->names = to->key->xkbInfo->desc->names->indicators;
+ k->xkb_sli->maps = to->key->xkbInfo->desc->indicators->maps;
+ }
+ }
+ }
+
+ /* We can't just copy over the focus class. When an app sets the focus,
+ * it'll do so on the master device. Copying the SDs focus means losing
+ * the focus.
+ * So we only copy the focus class if the device didn't have one,
+ * otherwise we leave it as it is.
+ */
+ if (from->focus)
+ {
+ if (!to->focus)
+ {
+ WindowPtr *oldTrace;
+
+ classes = to->unused_classes;
+ to->focus = classes->focus;
+ if (!to->focus)
+ {
+ to->focus = calloc(1, sizeof(FocusClassRec));
+ if (!to->focus)
+ FatalError("[Xi] no memory for class shift.\n");
+ } else
+ classes->focus = NULL;
+
+ oldTrace = to->focus->trace;
+ memcpy(to->focus, from->focus, sizeof(FocusClassRec));
+ to->focus->trace = realloc(oldTrace,
+ to->focus->traceSize * sizeof(WindowPtr));
+ if (!to->focus->trace && to->focus->traceSize)
+ FatalError("[Xi] no memory for trace.\n");
+ memcpy(to->focus->trace, from->focus->trace,
+ from->focus->traceSize * sizeof(WindowPtr));
+ to->focus->sourceid = from->id;
+ }
+ } else if (to->focus)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->focus = to->focus;
+ to->focus = NULL;
+ }
+
+}
+
+static void
+DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
+{
+ ClassesPtr classes;
+
+ /* Feedback classes must be copied first */
+ if (from->ptrfeed)
+ {
+ PtrFeedbackPtr *p, it;
+ if (!to->ptrfeed)
+ {
+ classes = to->unused_classes;
+ to->ptrfeed = classes->ptrfeed;
+ classes->ptrfeed = NULL;
+ }
+
+ p = &to->ptrfeed;
+ for (it = from->ptrfeed; it; it = it->next)
+ {
+ if (!(*p))
+ {
+ *p = calloc(1, sizeof(PtrFeedbackClassRec));
+ if (!*p)
+ {
+ ErrorF("[Xi] Cannot alloc memory for class copy.");
+ return;
+ }
+ }
+ (*p)->CtrlProc = it->CtrlProc;
+ (*p)->ctrl = it->ctrl;
+
+ p = &(*p)->next;
+ }
+ } else if (to->ptrfeed && !from->ptrfeed)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->ptrfeed = to->ptrfeed;
+ to->ptrfeed = NULL;
+ }
+
+ if (from->valuator)
+ {
+ ValuatorClassPtr v;
+ if (!to->valuator)
+ {
+ classes = to->unused_classes;
+ to->valuator = classes->valuator;
+ if (to->valuator)
+ classes->valuator = NULL;
+ }
+
+ to->valuator = realloc(to->valuator, sizeof(ValuatorClassRec) +
+ from->valuator->numAxes * sizeof(AxisInfo) +
+ from->valuator->numAxes * sizeof(double));
+ v = to->valuator;
+ if (!v)
+ FatalError("[Xi] no memory for class shift.\n");
+
+ v->numAxes = from->valuator->numAxes;
+ v->axes = (AxisInfoPtr)&v[1];
+ memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo));
+
+ v->axisVal = (double*)(v->axes + from->valuator->numAxes);
+ v->sourceid = from->id;
+ } else if (to->valuator && !from->valuator)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->valuator = to->valuator;
+ to->valuator = NULL;
+ }
+
+ if (from->button)
+ {
+ if (!to->button)
+ {
+ classes = to->unused_classes;
+ to->button = classes->button;
+ if (!to->button)
+ {
+ to->button = calloc(1, sizeof(ButtonClassRec));
+ if (!to->button)
+ FatalError("[Xi] no memory for class shift.\n");
+ } else
+ classes->button = NULL;
+ }
+
+ if (from->button->xkb_acts)
+ {
+ if (!to->button->xkb_acts)
+ {
+ to->button->xkb_acts = calloc(1, sizeof(XkbAction));
+ if (!to->button->xkb_acts)
+ FatalError("[Xi] not enough memory for xkb_acts.\n");
+ }
+ memcpy(to->button->xkb_acts, from->button->xkb_acts,
+ sizeof(XkbAction));
+ } else
+ free(to->button->xkb_acts);
+
+ memcpy(to->button->labels, from->button->labels,
+ from->button->numButtons * sizeof(Atom));
+ to->button->sourceid = from->id;
+ } else if (to->button && !from->button)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->button = to->button;
+ to->button = NULL;
+ }
+
+ if (from->proximity)
+ {
+ if (!to->proximity)
+ {
+ classes = to->unused_classes;
+ to->proximity = classes->proximity;
+ if (!to->proximity)
+ {
+ to->proximity = calloc(1, sizeof(ProximityClassRec));
+ if (!to->proximity)
+ FatalError("[Xi] no memory for class shift.\n");
+ } else
+ classes->proximity = NULL;
+ }
+ memcpy(to->proximity, from->proximity, sizeof(ProximityClassRec));
+ to->proximity->sourceid = from->id;
+ } else if (to->proximity)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->proximity = to->proximity;
+ to->proximity = NULL;
+ }
+
+ if (from->absolute)
+ {
+ if (!to->absolute)
+ {
+ classes = to->unused_classes;
+ to->absolute = classes->absolute;
+ if (!to->absolute)
+ {
+ to->absolute = calloc(1, sizeof(AbsoluteClassRec));
+ if (!to->absolute)
+ FatalError("[Xi] no memory for class shift.\n");
+ } else
+ classes->absolute = NULL;
+ }
+ memcpy(to->absolute, from->absolute, sizeof(AbsoluteClassRec));
+ to->absolute->sourceid = from->id;
+ } else if (to->absolute)
+ {
+ ClassesPtr classes;
+ classes = to->unused_classes;
+ classes->absolute = to->absolute;
+ to->absolute = NULL;
+ }
+}
+
+/**
+ * Copies the CONTENT of the classes of device from into the classes in device
+ * to. From and to are identical after finishing.
+ *
+ * If to does not have classes from currenly has, the classes are stored in
+ * to's devPrivates system. Later, we recover it again from there if needed.
+ * Saves a few memory allocations.
+ */
+void
+DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to, DeviceChangedEvent *dce)
+{
+ /* generic feedback classes, not tied to pointer and/or keyboard */
+ DeepCopyFeedbackClasses(from, to);
+
+ if ((dce->flags & DEVCHANGE_KEYBOARD_EVENT))
+ DeepCopyKeyboardClasses(from, to);
+ if ((dce->flags & DEVCHANGE_POINTER_EVENT))
+ DeepCopyPointerClasses(from, to);
+}
+
+
+/**
+ * Send an XI2 DeviceChangedEvent to all interested clients.
+ */
+void
+XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, DeviceChangedEvent *dce)
+{
+ xXIDeviceChangedEvent *dcce;
+ int rc;
+
+ rc = EventToXI2((InternalEvent*)dce, (xEvent**)&dcce);
+ if (rc != Success)
+ {
+ ErrorF("[Xi] event conversion from DCE failed with code %d\n", rc);
+ return;
+ }
+
+ /* we don't actually swap if there's a NullClient, swapping is done
+ * later when event is delivered. */
+ SendEventToAllWindows(master, XI_DeviceChangedMask, (xEvent*)dcce, 1);
+ free(dcce);
+}
+
+static void
+ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce)
+{
+ DeviceIntPtr slave;
+ int rc;
+
+ /* For now, we don't have devices that change physically. */
+ if (!IsMaster(device))
+ return;
+
+ rc = dixLookupDevice(&slave, dce->sourceid, serverClient, DixReadAccess);
+
+ if (rc != Success)
+ return; /* Device has disappeared */
+
+ if (IsMaster(slave))
+ return;
+
+ if (IsFloating(slave))
+ return; /* set floating since the event */
+
+ if (GetMaster(slave, MASTER_ATTACHED)->id != dce->masterid)
+ return; /* not our slave anymore, don't care */
+
+ /* FIXME: we probably need to send a DCE for the new slave now */
+
+ device->public.devicePrivate = slave->public.devicePrivate;
+
+ /* FIXME: the classes may have changed since we generated the event. */
+ DeepCopyDeviceClasses(slave, device, dce);
+ XISendDeviceChangedEvent(slave, device, dce);
+}
+
+/**
+ * Update the device state according to the data in the event.
+ *
+ * return values are
+ * DEFAULT ... process as normal
+ * DONT_PROCESS ... return immediately from caller
+ */
+#define DEFAULT 0
+#define DONT_PROCESS 1
+int
+UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
+{
+ int i;
+ int key = 0,
+ bit = 0,
+ last_valuator;
+
+ KeyClassPtr k = NULL;
+ ButtonClassPtr b = NULL;
+ ValuatorClassPtr v = NULL;
+
+ /* This event is always the first we get, before the actual events with
+ * the data. However, the way how the DDX is set up, "device" will
+ * actually be the slave device that caused the event.
+ */
+ switch(event->type)
+ {
+ case ET_DeviceChanged:
+ ChangeMasterDeviceClasses(device, (DeviceChangedEvent*)event);
+ return DONT_PROCESS; /* event has been sent already */
+ case ET_Motion:
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ case ET_KeyPress:
+ case ET_KeyRelease:
+ case ET_ProximityIn:
+ case ET_ProximityOut:
+ break;
+ default:
+ /* other events don't update the device */
+ return DEFAULT;
+ }
+
+ k = device->key;
+ v = device->valuator;
+ b = device->button;
+
+ key = event->detail.key;
+ bit = 1 << (key & 7);
+
+ /* Update device axis */
+ /* Check valuators first */
+ last_valuator = -1;
+ for (i = 0; i < MAX_VALUATORS; i++)
+ {
+ if (BitIsOn(&event->valuators.mask, i))
+ {
+ if (!v)
+ {
+ ErrorF("[Xi] Valuators reported for non-valuator device '%s'. "
+ "Ignoring event.\n", device->name);
+ return DONT_PROCESS;
+ } else if (v->numAxes < i)
+ {
+ ErrorF("[Xi] Too many valuators reported for device '%s'. "
+ "Ignoring event.\n", device->name);
+ return DONT_PROCESS;
+ }
+ last_valuator = i;
+ }
+ }
+
+ for (i = 0; i <= last_valuator && i < v->numAxes; i++)
+ {
+ if (BitIsOn(&event->valuators.mask, i))
+ {
+ /* XXX: Relative/Absolute mode */
+ v->axisVal[i] = event->valuators.data[i];
+ v->axisVal[i] += (event->valuators.data_frac[i] * 1.0f / (1 << 16) / (1 << 16));
+ }
+ }
+
+ if (event->type == ET_KeyPress) {
+ if (!k)
+ return DONT_PROCESS;
+
+ /* don't allow ddx to generate multiple downs, but repeats are okay */
+ if (key_is_down(device, key, KEY_PROCESSED) && !event->key_repeat)
+ return DONT_PROCESS;
+
+ if (device->valuator)
+ device->valuator->motionHintWindow = NullWindow;
+ set_key_down(device, key, KEY_PROCESSED);
+ } else if (event->type == ET_KeyRelease) {
+ if (!k)
+ return DONT_PROCESS;
+
+ if (!key_is_down(device, key, KEY_PROCESSED)) /* guard against duplicates */
+ return DONT_PROCESS;
+ if (device->valuator)
+ device->valuator->motionHintWindow = NullWindow;
+ set_key_up(device, key, KEY_PROCESSED);
+ } else if (event->type == ET_ButtonPress) {
+ Mask mask;
+ if (!b)
+ return DONT_PROCESS;
+
+ if (button_is_down(device, key, BUTTON_PROCESSED))
+ return DONT_PROCESS;
+
+ set_button_down(device, key, BUTTON_PROCESSED);
+ if (device->valuator)
+ device->valuator->motionHintWindow = NullWindow;
+ if (!b->map[key])
+ return DONT_PROCESS;
+ b->buttonsDown++;
+ b->motionMask = DeviceButtonMotionMask;
+ if (b->map[key] <= 5)
+ b->state |= (Button1Mask >> 1) << b->map[key];
+
+ /* Add state and motionMask to the filter for this event */
+ mask = DevicePointerMotionMask | b->state | b->motionMask;
+ SetMaskForEvent(device->id, mask, DeviceMotionNotify);
+ mask = PointerMotionMask | b->state | b->motionMask;
+ SetMaskForEvent(device->id, mask, MotionNotify);
+ } else if (event->type == ET_ButtonRelease) {
+ Mask mask;
+ if (!b)
+ return DONT_PROCESS;
+
+ if (!button_is_down(device, key, BUTTON_PROCESSED))
+ return DONT_PROCESS;
+ if (IsMaster(device)) {
+ DeviceIntPtr sd;
+
+ /*
+ * Leave the button down if any slave has the
+ * button still down. Note that this depends on the
+ * event being delivered through the slave first
+ */
+ for (sd = inputInfo.devices; sd; sd = sd->next) {
+ if (IsMaster(sd) || GetMaster(sd, MASTER_POINTER) != device)
+ continue;
+ if (!sd->button)
+ continue;
+ for (i = 1; i <= sd->button->numButtons; i++)
+ if (sd->button->map[i] == key &&
+ button_is_down(sd, i, BUTTON_PROCESSED))
+ return DONT_PROCESS;
+ }
+ }
+ set_button_up(device, key, BUTTON_PROCESSED);
+ if (device->valuator)
+ device->valuator->motionHintWindow = NullWindow;
+ if (!b->map[key])
+ return DONT_PROCESS;
+ if (b->buttonsDown >= 1 && !--b->buttonsDown)
+ b->motionMask = 0;
+ if (b->map[key] <= 5)
+ b->state &= ~((Button1Mask >> 1) << b->map[key]);
+
+ /* Add state and motionMask to the filter for this event */
+ mask = DevicePointerMotionMask | b->state | b->motionMask;
+ SetMaskForEvent(device->id, mask, DeviceMotionNotify);
+ mask = PointerMotionMask | b->state | b->motionMask;
+ SetMaskForEvent(device->id, mask, MotionNotify);
+ } else if (event->type == ET_ProximityIn)
+ device->proximity->in_proximity = TRUE;
+ else if (event->type == ET_ProximityOut)
+ device->proximity->in_proximity = FALSE;
+
+ return DEFAULT;
+}
+
+static void
+ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
+{
+ GrabPtr grab = device->deviceGrab.grab;
+
+ if (grab)
+ DeliverGrabbedEvent((InternalEvent*)ev, device, FALSE);
+ else { /* deliver to all root windows */
+ xEvent *xi;
+ int i;
+
+ i = EventToXI2((InternalEvent*)ev, (xEvent**)&xi);
+ if (i != Success)
+ {
+ ErrorF("[Xi] %s: XI2 conversion failed in ProcessRawEvent (%d)\n",
+ device->name, i);
+ return;
+ }
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ if (screenInfo.screens[i] && screenInfo.screens[i]->root)
+ DeliverEventsToWindow(device, screenInfo.screens[i]->root, xi, 1,
+ GetEventFilter(device, xi), NULL);
+ free(xi);
+ }
+}
+
+/**
+ * Main device event processing function.
+ * Called from when processing the events from the event queue.
+ *
+ */
+void
+ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
+{
+ GrabPtr grab;
+ Bool deactivateDeviceGrab = FALSE;
+ int key = 0, rootX, rootY;
+ ButtonClassPtr b;
+ KeyClassPtr k;
+ ValuatorClassPtr v;
+ int ret = 0;
+ int state, i;
+ DeviceIntPtr mouse = NULL, kbd = NULL;
+ DeviceEvent *event = &ev->device_event;
+
+ CHECKEVENT(ev);
+
+ if (ev->any.type == ET_RawKeyPress ||
+ ev->any.type == ET_RawKeyRelease ||
+ ev->any.type == ET_RawButtonPress ||
+ ev->any.type == ET_RawButtonRelease ||
+ ev->any.type == ET_RawMotion)
+ {
+ ProcessRawEvent(&ev->raw_event, device);
+ return;
+ }
+
+ if (IsPointerDevice(device))
+ {
+ kbd = GetPairedDevice(device);
+ mouse = device;
+ if (kbd && !kbd->key) /* can happen with floating SDs */
+ kbd = NULL;
+ } else
+ {
+ mouse = GetPairedDevice(device);
+ kbd = device;
+ if (!mouse->valuator || !mouse->button) /* may be float. SDs */
+ mouse = NULL;
+ }
+
+ /* State needs to be assembled BEFORE the device is updated. */
+ state = (kbd && kbd->key) ? XkbStateFieldFromRec(&kbd->key->xkbInfo->state) : 0;
+ state |= (mouse && mouse->button) ? (mouse->button->state) : 0;
+
+ for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
+ if (BitIsOn(mouse->button->down, i))
+ SetBit(event->buttons, i);
+
+ if (kbd && kbd->key)
+ {
+ XkbStatePtr state;
+ /* we need the state before the event happens */
+ if (event->type == ET_KeyPress || event->type == ET_KeyRelease)
+ state = &kbd->key->xkbInfo->prev_state;
+ else
+ state = &kbd->key->xkbInfo->state;
+
+ event->mods.base = state->base_mods;
+ event->mods.latched = state->latched_mods;
+ event->mods.locked = state->locked_mods;
+ event->mods.effective = state->mods;
+
+ event->group.base = state->base_group;
+ event->group.latched = state->latched_group;
+ event->group.locked = state->locked_group;
+ event->group.effective = state->group;
+ }
+
+ ret = UpdateDeviceState(device, event);
+ if (ret == DONT_PROCESS)
+ return;
+
+ v = device->valuator;
+ b = device->button;
+ k = device->key;
+
+ if (IsMaster(device) || IsFloating(device))
+ CheckMotion(event, device);
+
+ switch (event->type)
+ {
+ case ET_Motion:
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ case ET_KeyPress:
+ case ET_KeyRelease:
+ case ET_ProximityIn:
+ case ET_ProximityOut:
+ if (!device->spriteInfo->sprite)
+ return;
+ GetSpritePosition(device, &rootX, &rootY);
+ event->root_x = rootX;
+ event->root_y = rootY;
+ NoticeEventTime((InternalEvent*)event);
+ event->corestate = state;
+ key = event->detail.key;
+ break;
+ default:
+ break;
+ }
+
+ if (DeviceEventCallback && !syncEvents.playingEvents) {
+ DeviceEventInfoRec eventinfo;
+ SpritePtr pSprite = device->spriteInfo->sprite;
+
+ /* see comment in EnqueueEvents regarding the next three lines */
+ if (ev->any.type == ET_Motion)
+ ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id;
+
+ eventinfo.device = device;
+ eventinfo.event = ev;
+ CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
+ }
+
+ grab = device->deviceGrab.grab;
+
+ switch(event->type)
+ {
+ case ET_KeyPress:
+ if (!grab && CheckDeviceGrabs(device, event, 0))
+ return;
+ break;
+ case ET_KeyRelease:
+ if (grab && device->deviceGrab.fromPassiveGrab &&
+ (key == device->deviceGrab.activatingKey) &&
+ (device->deviceGrab.grab->type == KeyPress ||
+ device->deviceGrab.grab->type == DeviceKeyPress ||
+ device->deviceGrab.grab->type == XI_KeyPress))
+ deactivateDeviceGrab = TRUE;
+ break;
+ case ET_ButtonPress:
+ event->detail.button = b->map[key];
+ if (!event->detail.button) { /* there's no button 0 */
+ event->detail.button = key;
+ return;
+ }
+ if (!grab && CheckDeviceGrabs(device, event, 0))
+ {
+ /* if a passive grab was activated, the event has been sent
+ * already */
+ return;
+ }
+ break;
+ case ET_ButtonRelease:
+ event->detail.button = b->map[key];
+ if (!event->detail.button) { /* there's no button 0 */
+ event->detail.button = key;
+ return;
+ }
+ if (grab && !b->buttonsDown &&
+ device->deviceGrab.fromPassiveGrab &&
+ (device->deviceGrab.grab->type == ButtonPress ||
+ device->deviceGrab.grab->type == DeviceButtonPress ||
+ device->deviceGrab.grab->type == XI_ButtonPress))
+ deactivateDeviceGrab = TRUE;
+ default:
+ break;
+ }
+
+
+ if (grab)
+ DeliverGrabbedEvent((InternalEvent*)event, device, deactivateDeviceGrab);
+ else if (device->focus && !IsPointerEvent((InternalEvent*)ev))
+ DeliverFocusedEvent(device, (InternalEvent*)event,
+ GetSpriteWindow(device));
+ else
+ DeliverDeviceEvents(GetSpriteWindow(device), (InternalEvent*)event,
+ NullGrab, NullWindow, device);
+
+ if (deactivateDeviceGrab == TRUE)
+ (*device->deviceGrab.DeactivateGrab) (device);
+ event->detail.key = key;
+}
+
+int
+InitProximityClassDeviceStruct(DeviceIntPtr dev)
+{
+ ProximityClassPtr proxc;
+
+ proxc = (ProximityClassPtr) malloc(sizeof(ProximityClassRec));
+ if (!proxc)
+ return FALSE;
+ proxc->sourceid = dev->id;
+ proxc->in_proximity = TRUE;
+ dev->proximity = proxc;
+ return TRUE;
+}
+
+/**
+ * Initialise the device's valuators. The memory must already be allocated,
+ * this function merely inits the matching axis (specified through axnum) to
+ * sane values.
+ *
+ * It is a condition that (minval < maxval).
+ *
+ * @see InitValuatorClassDeviceStruct
+ */
+void
+InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval,
+ int resolution, int min_res, int max_res, int mode)
+{
+ AxisInfoPtr ax;
+
+ if (!dev || !dev->valuator || minval > maxval)
+ return;
+ if (axnum >= dev->valuator->numAxes)
+ return;
+
+ ax = dev->valuator->axes + axnum;
+
+ ax->min_value = minval;
+ ax->max_value = maxval;
+ ax->resolution = resolution;
+ ax->min_resolution = min_res;
+ ax->max_resolution = max_res;
+ ax->label = label;
+ ax->mode = mode;
+
+ if (mode & OutOfProximity)
+ dev->proximity->in_proximity = FALSE;
+}
+
+static void
+FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
+ ButtonClassPtr b, ValuatorClassPtr v, int first)
+{
+ ev->type = DeviceStateNotify;
+ ev->deviceid = dev->id;
+ ev->time = currentTime.milliseconds;
+ ev->classes_reported = 0;
+ ev->num_keys = 0;
+ ev->num_buttons = 0;
+ ev->num_valuators = 0;
+
+ if (b) {
+ ev->classes_reported |= (1 << ButtonClass);
+ ev->num_buttons = b->numButtons;
+ memcpy((char*)ev->buttons, (char*)b->down, 4);
+ } else if (k) {
+ ev->classes_reported |= (1 << KeyClass);
+ ev->num_keys = k->xkbInfo->desc->max_key_code -
+ k->xkbInfo->desc->min_key_code;
+ memmove((char *)&ev->keys[0], (char *)k->down, 4);
+ }
+ if (v) {
+ int nval = v->numAxes - first;
+
+ ev->classes_reported |= (1 << ValuatorClass);
+ ev->classes_reported |= valuator_get_mode(dev, 0) << ModeBitsShift;
+ ev->num_valuators = nval < 3 ? nval : 3;
+ switch (ev->num_valuators) {
+ case 3:
+ ev->valuator2 = v->axisVal[first + 2];
+ case 2:
+ ev->valuator1 = v->axisVal[first + 1];
+ case 1:
+ ev->valuator0 = v->axisVal[first];
+ break;
+ }
+ }
+}
+
+static void
+FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v,
+ int first)
+{
+ int nval = v->numAxes - first;
+
+ ev->type = DeviceValuator;
+ ev->deviceid = dev->id;
+ ev->num_valuators = nval < 3 ? nval : 3;
+ ev->first_valuator = first;
+ switch (ev->num_valuators) {
+ case 3:
+ ev->valuator2 = v->axisVal[first + 2];
+ case 2:
+ ev->valuator1 = v->axisVal[first + 1];
+ case 1:
+ ev->valuator0 = v->axisVal[first];
+ break;
+ }
+ first += ev->num_valuators;
+}
+
+void
+DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
+ WindowPtr pWin)
+{
+ deviceFocus event;
+ xXIFocusInEvent *xi2event;
+ DeviceIntPtr mouse;
+ int btlen, len, i;
+
+ mouse = IsFloating(dev) ? dev : GetMaster(dev, MASTER_POINTER);
+
+ /* XI 2 event */
+ btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0;
+ btlen = bytes_to_int32(btlen);
+ len = sizeof(xXIFocusInEvent) + btlen * 4;
+
+ xi2event = calloc(1, len);
+ xi2event->type = GenericEvent;
+ xi2event->extension = IReqCode;
+ xi2event->evtype = type;
+ xi2event->length = bytes_to_int32(len - sizeof(xEvent));
+ xi2event->buttons_len = btlen;
+ xi2event->detail = detail;
+ xi2event->time = currentTime.milliseconds;
+ xi2event->deviceid = dev->id;
+ xi2event->sourceid = dev->id; /* a device doesn't change focus by itself */
+ xi2event->mode = mode;
+ xi2event->root_x = FP1616(mouse->spriteInfo->sprite->hot.x, 0);
+ xi2event->root_y = FP1616(mouse->spriteInfo->sprite->hot.y, 0);
+
+ for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
+ if (BitIsOn(mouse->button->down, i))
+ SetBit(&xi2event[1], i);
+
+ if (dev->key)
+ {
+ xi2event->mods.base_mods = dev->key->xkbInfo->state.base_mods;
+ xi2event->mods.latched_mods = dev->key->xkbInfo->state.latched_mods;
+ xi2event->mods.locked_mods = dev->key->xkbInfo->state.locked_mods;
+ xi2event->mods.effective_mods = dev->key->xkbInfo->state.mods;
+
+ xi2event->group.base_group = dev->key->xkbInfo->state.base_group;
+ xi2event->group.latched_group = dev->key->xkbInfo->state.latched_group;
+ xi2event->group.locked_group = dev->key->xkbInfo->state.locked_group;
+ xi2event->group.effective_group = dev->key->xkbInfo->state.group;
+ }
+
+ FixUpEventFromWindow(dev->spriteInfo->sprite, (xEvent*)xi2event, pWin,
+ None, FALSE);
+
+ DeliverEventsToWindow(dev, pWin, (xEvent*)xi2event, 1,
+ GetEventFilter(dev, (xEvent*)xi2event), NullGrab);
+
+ free(xi2event);
+
+ /* XI 1.x event */
+ event.deviceid = dev->id;
+ event.mode = mode;
+ event.type = (type == XI_FocusIn) ? DeviceFocusIn : DeviceFocusOut;
+ event.detail = detail;
+ event.window = pWin->drawable.id;
+ event.time = currentTime.milliseconds;
+
+ DeliverEventsToWindow(dev, pWin, (xEvent *) & event, 1,
+ DeviceFocusChangeMask, NullGrab);
+
+ if ((event.type == DeviceFocusIn) &&
+ (wOtherInputMasks(pWin)) &&
+ (wOtherInputMasks(pWin)->inputEvents[dev->id] & DeviceStateNotifyMask))
+ {
+ int evcount = 1;
+ deviceStateNotify *ev, *sev;
+ deviceKeyStateNotify *kev;
+ deviceButtonStateNotify *bev;
+
+ KeyClassPtr k;
+ ButtonClassPtr b;
+ ValuatorClassPtr v;
+ int nval = 0, nkeys = 0, nbuttons = 0, first = 0;
+
+ if ((b = dev->button) != NULL) {
+ nbuttons = b->numButtons;
+ if (nbuttons > 32)
+ evcount++;
+ }
+ if ((k = dev->key) != NULL) {
+ nkeys = k->xkbInfo->desc->max_key_code -
+ k->xkbInfo->desc->min_key_code;
+ if (nkeys > 32)
+ evcount++;
+ if (nbuttons > 0) {
+ evcount++;
+ }
+ }
+ if ((v = dev->valuator) != NULL) {
+ nval = v->numAxes;
+
+ if (nval > 3)
+ evcount++;
+ if (nval > 6) {
+ if (!(k && b))
+ evcount++;
+ if (nval > 9)
+ evcount += ((nval - 7) / 3);
+ }
+ }
+
+ sev = ev = (deviceStateNotify *) malloc(evcount * sizeof(xEvent));
+ FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first);
+
+ if (b != NULL) {
+ FixDeviceStateNotify(dev, ev++, NULL, b, v, first);
+ first += 3;
+ nval -= 3;
+ if (nbuttons > 32) {
+ (ev - 1)->deviceid |= MORE_EVENTS;
+ bev = (deviceButtonStateNotify *) ev++;
+ bev->type = DeviceButtonStateNotify;
+ bev->deviceid = dev->id;
+ memcpy((char*)&bev->buttons[4], (char*)&b->down[4], DOWN_LENGTH - 4);
+ }
+ if (nval > 0) {
+ (ev - 1)->deviceid |= MORE_EVENTS;
+ FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
+ first += 3;
+ nval -= 3;
+ }
+ }
+
+ if (k != NULL) {
+ FixDeviceStateNotify(dev, ev++, k, NULL, v, first);
+ first += 3;
+ nval -= 3;
+ if (nkeys > 32) {
+ (ev - 1)->deviceid |= MORE_EVENTS;
+ kev = (deviceKeyStateNotify *) ev++;
+ kev->type = DeviceKeyStateNotify;
+ kev->deviceid = dev->id;
+ memmove((char *)&kev->keys[0], (char *)&k->down[4], 28);
+ }
+ if (nval > 0) {
+ (ev - 1)->deviceid |= MORE_EVENTS;
+ FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
+ first += 3;
+ nval -= 3;
+ }
+ }
+
+ while (nval > 0) {
+ FixDeviceStateNotify(dev, ev++, NULL, NULL, v, first);
+ first += 3;
+ nval -= 3;
+ if (nval > 0) {
+ (ev - 1)->deviceid |= MORE_EVENTS;
+ FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
+ first += 3;
+ nval -= 3;
+ }
+ }
+
+ DeliverEventsToWindow(dev, pWin, (xEvent *) sev, evcount,
+ DeviceStateNotifyMask, NullGrab);
+ free(sev);
+ }
+}
+
+int
+CheckGrabValues(ClientPtr client, GrabParameters* param)
+{
+ if (param->grabtype != GRABTYPE_CORE &&
+ param->grabtype != GRABTYPE_XI &&
+ param->grabtype != GRABTYPE_XI2)
+ {
+ ErrorF("[Xi] grabtype is invalid. This is a bug.\n");
+ return BadImplementation;
+ }
+
+ if ((param->this_device_mode != GrabModeSync) &&
+ (param->this_device_mode != GrabModeAsync)) {
+ client->errorValue = param->this_device_mode;
+ return BadValue;
+ }
+ if ((param->other_devices_mode != GrabModeSync) &&
+ (param->other_devices_mode != GrabModeAsync)) {
+ client->errorValue = param->other_devices_mode;
+ return BadValue;
+ }
+
+ if (param->grabtype != GRABTYPE_XI2 && (param->modifiers != AnyModifier) &&
+ (param->modifiers & ~AllModifiersMask)) {
+ client->errorValue = param->modifiers;
+ return BadValue;
+ }
+
+ if ((param->ownerEvents != xFalse) && (param->ownerEvents != xTrue)) {
+ client->errorValue = param->ownerEvents;
+ return BadValue;
+ }
+ return Success;
+}
+
+int
+GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
+ int button, GrabParameters *param, GrabType grabtype,
+ GrabMask *mask)
+{
+ WindowPtr pWin, confineTo;
+ CursorPtr cursor;
+ GrabPtr grab;
+ int rc, type = -1;
+ Mask access_mode = DixGrabAccess;
+
+ rc = CheckGrabValues(client, param);
+ if (rc != Success)
+ return rc;
+ if (param->confineTo == None)
+ confineTo = NullWindow;
+ else {
+ rc = dixLookupWindow(&confineTo, param->confineTo, client, DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+ }
+ if (param->cursor == None)
+ cursor = NullCursor;
+ else {
+ rc = dixLookupResourceByType((pointer *)&cursor, param->cursor,
+ RT_CURSOR, client, DixUseAccess);
+ if (rc != Success)
+ {
+ client->errorValue = param->cursor;
+ return rc;
+ }
+ access_mode |= DixForceAccess;
+ }
+ if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync)
+ access_mode |= DixFreezeAccess;
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode);
+ if (rc != Success)
+ return rc;
+ rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ if (grabtype == GRABTYPE_XI)
+ type = DeviceButtonPress;
+ else if (grabtype == GRABTYPE_XI2)
+ type = XI_ButtonPress;
+
+ grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype,
+ mask, param, type, button, confineTo, cursor);
+ if (!grab)
+ return BadAlloc;
+ return AddPassiveGrabToList(client, grab);
+}
+
+/**
+ * Grab the given key. If grabtype is GRABTYPE_XI, the key is a keycode. If
+ * grabtype is GRABTYPE_XI2, the key is a keysym.
+ */
+int
+GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
+ int key, GrabParameters *param, GrabType grabtype, GrabMask *mask)
+{
+ WindowPtr pWin;
+ GrabPtr grab;
+ KeyClassPtr k = dev->key;
+ Mask access_mode = DixGrabAccess;
+ int rc, type = -1;
+
+ rc = CheckGrabValues(client, param);
+ if (rc != Success)
+ return rc;
+ if (k == NULL)
+ return BadMatch;
+ if (grabtype == GRABTYPE_XI)
+ {
+ if ((key > k->xkbInfo->desc->max_key_code ||
+ key < k->xkbInfo->desc->min_key_code)
+ && (key != AnyKey)) {
+ client->errorValue = key;
+ return BadValue;
+ }
+ type = DeviceKeyPress;
+ } else if (grabtype == GRABTYPE_XI2)
+ type = XI_KeyPress;
+
+ rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+ if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync)
+ access_mode |= DixFreezeAccess;
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode);
+ if (rc != Success)
+ return rc;
+
+ grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype,
+ mask, param, type, key, NULL, NULL);
+ if (!grab)
+ return BadAlloc;
+ return AddPassiveGrabToList(client, grab);
+}
+
+/* Enter/FocusIn grab */
+int
+GrabWindow(ClientPtr client, DeviceIntPtr dev, int type,
+ GrabParameters *param, GrabMask *mask)
+{
+ WindowPtr pWin;
+ CursorPtr cursor;
+ GrabPtr grab;
+ Mask access_mode = DixGrabAccess;
+ int rc;
+
+ rc = CheckGrabValues(client, param);
+ if (rc != Success)
+ return rc;
+
+ rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+ if (param->cursor == None)
+ cursor = NullCursor;
+ else {
+ rc = dixLookupResourceByType((pointer *)&cursor, param->cursor,
+ RT_CURSOR, client, DixUseAccess);
+ if (rc != Success)
+ {
+ client->errorValue = param->cursor;
+ return rc;
+ }
+ access_mode |= DixForceAccess;
+ }
+ if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync)
+ access_mode |= DixFreezeAccess;
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode);
+ if (rc != Success)
+ return rc;
+
+ grab = CreateGrab(client->index, dev, dev, pWin, GRABTYPE_XI2,
+ mask, param, (type == XIGrabtypeEnter) ? XI_Enter : XI_FocusIn,
+ 0, NULL, cursor);
+
+ if (!grab)
+ return BadAlloc;
+
+ return AddPassiveGrabToList(client, grab);
+}
+
+int
+SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client,
+ Mask mask, Mask exclusivemasks)
+{
+ int mskidx = dev->id;
+ int i, ret;
+ Mask check;
+ InputClientsPtr others;
+
+ check = (mask & exclusivemasks);
+ if (wOtherInputMasks(pWin)) {
+ if (check & wOtherInputMasks(pWin)->inputEvents[mskidx]) { /* It is illegal for two different
+ * clients to select on any of the
+ * events for maskcheck. However,
+ * it is OK, for some client to
+ * continue selecting on one of those
+ * events. */
+ for (others = wOtherInputMasks(pWin)->inputClients; others;
+ others = others->next) {
+ if (!SameClient(others, client) && (check &
+ others->mask[mskidx]))
+ return BadAccess;
+ }
+ }
+ for (others = wOtherInputMasks(pWin)->inputClients; others;
+ others = others->next) {
+ if (SameClient(others, client)) {
+ check = others->mask[mskidx];
+ others->mask[mskidx] = mask;
+ if (mask == 0) {
+ for (i = 0; i < EMASKSIZE; i++)
+ if (i != mskidx && others->mask[i] != 0)
+ break;
+ if (i == EMASKSIZE) {
+ RecalculateDeviceDeliverableEvents(pWin);
+ if (ShouldFreeInputMasks(pWin, FALSE))
+ FreeResource(others->resource, RT_NONE);
+ return Success;
+ }
+ }
+ goto maskSet;
+ }
+ }
+ }
+ check = 0;
+ if ((ret = AddExtensionClient(pWin, client, mask, mskidx)) != Success)
+ return ret;
+ maskSet:
+ if (dev->valuator)
+ if ((dev->valuator->motionHintWindow == pWin) &&
+ (mask & DevicePointerMotionHintMask) &&
+ !(check & DevicePointerMotionHintMask) && !dev->deviceGrab.grab)
+ dev->valuator->motionHintWindow = NullWindow;
+ RecalculateDeviceDeliverableEvents(pWin);
+ return Success;
+}
+
+int
+AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx)
+{
+ InputClientsPtr others;
+
+ if (!pWin->optional && !MakeWindowOptional(pWin))
+ return BadAlloc;
+ others = calloc(1, sizeof(InputClients));
+ if (!others)
+ return BadAlloc;
+ if (!pWin->optional->inputMasks && !MakeInputMasks(pWin))
+ return BadAlloc;
+ others->mask[mskidx] = mask;
+ others->resource = FakeClientID(client->index);
+ others->next = pWin->optional->inputMasks->inputClients;
+ pWin->optional->inputMasks->inputClients = others;
+ if (!AddResource(others->resource, RT_INPUTCLIENT, (pointer) pWin))
+ return BadAlloc;
+ return Success;
+}
+
+static Bool
+MakeInputMasks(WindowPtr pWin)
+{
+ struct _OtherInputMasks *imasks;
+
+ imasks = calloc(1, sizeof(struct _OtherInputMasks));
+ if (!imasks)
+ return FALSE;
+ pWin->optional->inputMasks = imasks;
+ return TRUE;
+}
+
+void
+RecalculateDeviceDeliverableEvents(WindowPtr pWin)
+{
+ InputClientsPtr others;
+ struct _OtherInputMasks *inputMasks; /* default: NULL */
+ WindowPtr pChild, tmp;
+ int i, j;
+
+ pChild = pWin;
+ while (1) {
+ if ((inputMasks = wOtherInputMasks(pChild)) != 0) {
+ for (i = 0; i < EMASKSIZE; i++)
+ memset(inputMasks->xi2mask[i], 0, sizeof(inputMasks->xi2mask[i]));
+ for (others = inputMasks->inputClients; others;
+ others = others->next) {
+ for (i = 0; i < EMASKSIZE; i++)
+ inputMasks->inputEvents[i] |= others->mask[i];
+ for (i = 0; i < EMASKSIZE; i++)
+ for (j = 0; j < XI2MASKSIZE; j++)
+ inputMasks->xi2mask[i][j] |= others->xi2mask[i][j];
+ }
+ for (i = 0; i < EMASKSIZE; i++)
+ inputMasks->deliverableEvents[i] = inputMasks->inputEvents[i];
+ for (tmp = pChild->parent; tmp; tmp = tmp->parent)
+ if (wOtherInputMasks(tmp))
+ for (i = 0; i < EMASKSIZE; i++)
+ inputMasks->deliverableEvents[i] |=
+ (wOtherInputMasks(tmp)->deliverableEvents[i]
+ & ~inputMasks->
+ dontPropagateMask[i] & PropagateMask[i]);
+ }
+ if (pChild->firstChild) {
+ pChild = pChild->firstChild;
+ continue;
+ }
+ while (!pChild->nextSib && (pChild != pWin))
+ pChild = pChild->parent;
+ if (pChild == pWin)
+ break;
+ pChild = pChild->nextSib;
+ }
+}
+
+#ifdef _MSC_VER
+#pragma warning(disable:4715) /* Not all control paths return a value */
+#endif
+
+int
+InputClientGone(WindowPtr pWin, XID id)
+{
+ InputClientsPtr other, prev;
+
+ if (!wOtherInputMasks(pWin))
+ return Success;
+ prev = 0;
+ for (other = wOtherInputMasks(pWin)->inputClients; other;
+ other = other->next) {
+ if (other->resource == id) {
+ if (prev) {
+ prev->next = other->next;
+ free(other);
+ } else if (!(other->next)) {
+ if (ShouldFreeInputMasks(pWin, TRUE)) {
+ wOtherInputMasks(pWin)->inputClients = other->next;
+ free(wOtherInputMasks(pWin));
+ pWin->optional->inputMasks = (OtherInputMasks *) NULL;
+ CheckWindowOptionalNeed(pWin);
+ free(other);
+ } else {
+ other->resource = FakeClientID(0);
+ if (!AddResource(other->resource, RT_INPUTCLIENT,
+ (pointer) pWin))
+ return BadAlloc;
+ }
+ } else {
+ wOtherInputMasks(pWin)->inputClients = other->next;
+ free(other);
+ }
+ RecalculateDeviceDeliverableEvents(pWin);
+ return Success;
+ }
+ prev = other;
+ }
+ FatalError("client not on device event list");
+}
+
+int
+SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate,
+ xEvent * ev, Mask mask, int count)
+{
+ WindowPtr pWin;
+ WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
+ WindowPtr spriteWin = GetSpriteWindow(d);
+
+ if (dest == PointerWindow)
+ pWin = spriteWin;
+ else if (dest == InputFocus) {
+ WindowPtr inputFocus;
+
+ if (!d->focus)
+ inputFocus = spriteWin;
+ else
+ inputFocus = d->focus->win;
+
+ if (inputFocus == FollowKeyboardWin)
+ inputFocus = inputInfo.keyboard->focus->win;
+
+ if (inputFocus == NoneWin)
+ return Success;
+
+ /* If the input focus is PointerRootWin, send the event to where
+ * the pointer is if possible, then perhaps propogate up to root. */
+ if (inputFocus == PointerRootWin)
+ inputFocus = GetCurrentRootWindow(d);
+
+ if (IsParent(inputFocus, spriteWin)) {
+ effectiveFocus = inputFocus;
+ pWin = spriteWin;
+ } else
+ effectiveFocus = pWin = inputFocus;
+ } else
+ dixLookupWindow(&pWin, dest, client, DixSendAccess);
+ if (!pWin)
+ return BadWindow;
+ if ((propagate != xFalse) && (propagate != xTrue)) {
+ client->errorValue = propagate;
+ return BadValue;
+ }
+ ev->u.u.type |= 0x80;
+ if (propagate) {
+ for (; pWin; pWin = pWin->parent) {
+ if (DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab))
+ return Success;
+ if (pWin == effectiveFocus)
+ return Success;
+ if (wOtherInputMasks(pWin))
+ mask &= ~wOtherInputMasks(pWin)->dontPropagateMask[d->id];
+ if (!mask)
+ break;
+ }
+ } else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, ev, count))
+ DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab);
+ return Success;
+}
+
+int
+SetButtonMapping(ClientPtr client, DeviceIntPtr dev, int nElts, BYTE * map)
+{
+ int i;
+ ButtonClassPtr b = dev->button;
+
+ if (b == NULL)
+ return BadMatch;
+
+ if (nElts != b->numButtons) {
+ client->errorValue = nElts;
+ return BadValue;
+ }
+ if (BadDeviceMap(&map[0], nElts, 1, 255, &client->errorValue))
+ return BadValue;
+ for (i = 0; i < nElts; i++)
+ if ((b->map[i + 1] != map[i]) && BitIsOn(b->down, i + 1))
+ return MappingBusy;
+ for (i = 0; i < nElts; i++)
+ b->map[i + 1] = map[i];
+ return Success;
+}
+
+int
+ChangeKeyMapping(ClientPtr client,
+ DeviceIntPtr dev,
+ unsigned len,
+ int type,
+ KeyCode firstKeyCode,
+ CARD8 keyCodes, CARD8 keySymsPerKeyCode, KeySym * map)
+{
+ KeySymsRec keysyms;
+ KeyClassPtr k = dev->key;
+
+ if (k == NULL)
+ return BadMatch;
+
+ if (len != (keyCodes * keySymsPerKeyCode))
+ return BadLength;
+
+ if ((firstKeyCode < k->xkbInfo->desc->min_key_code) ||
+ (firstKeyCode + keyCodes - 1 > k->xkbInfo->desc->max_key_code)) {
+ client->errorValue = firstKeyCode;
+ return BadValue;
+ }
+ if (keySymsPerKeyCode == 0) {
+ client->errorValue = 0;
+ return BadValue;
+ }
+ keysyms.minKeyCode = firstKeyCode;
+ keysyms.maxKeyCode = firstKeyCode + keyCodes - 1;
+ keysyms.mapWidth = keySymsPerKeyCode;
+ keysyms.map = map;
+
+ XkbApplyMappingChange(dev, &keysyms, firstKeyCode, keyCodes, NULL,
+ serverClient);
+
+ return Success;
+}
+
+static void
+DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev)
+{
+ WindowPtr parent;
+
+ /* Deactivate any grabs performed on this window, before making
+ * any input focus changes.
+ * Deactivating a device grab should cause focus events. */
+
+ if (dev->deviceGrab.grab && (dev->deviceGrab.grab->window == pWin))
+ (*dev->deviceGrab.DeactivateGrab) (dev);
+
+ /* If the focus window is a root window (ie. has no parent)
+ * then don't delete the focus from it. */
+
+ if (dev->focus && (pWin == dev->focus->win) && (pWin->parent != NullWindow)) {
+ int focusEventMode = NotifyNormal;
+
+ /* If a grab is in progress, then alter the mode of focus events. */
+
+ if (dev->deviceGrab.grab)
+ focusEventMode = NotifyWhileGrabbed;
+
+ switch (dev->focus->revert) {
+ case RevertToNone:
+ if (!ActivateFocusInGrab(dev, pWin, NoneWin))
+ DoFocusEvents(dev, pWin, NoneWin, focusEventMode);
+ dev->focus->win = NoneWin;
+ dev->focus->traceGood = 0;
+ break;
+ case RevertToParent:
+ parent = pWin;
+ do {
+ parent = parent->parent;
+ dev->focus->traceGood--;
+ }
+ while (!parent->realized);
+ if (!ActivateFocusInGrab(dev, pWin, parent))
+ DoFocusEvents(dev, pWin, parent, focusEventMode);
+ dev->focus->win = parent;
+ dev->focus->revert = RevertToNone;
+ break;
+ case RevertToPointerRoot:
+ if (!ActivateFocusInGrab(dev, pWin, PointerRootWin))
+ DoFocusEvents(dev, pWin, PointerRootWin, focusEventMode);
+ dev->focus->win = PointerRootWin;
+ dev->focus->traceGood = 0;
+ break;
+ case RevertToFollowKeyboard:
+ {
+ DeviceIntPtr kbd = GetMaster(dev, MASTER_KEYBOARD);
+ if (!kbd || (kbd == dev && kbd != inputInfo.keyboard))
+ kbd = inputInfo.keyboard;
+ if (kbd->focus->win) {
+ if (!ActivateFocusInGrab(dev, pWin, kbd->focus->win))
+ DoFocusEvents(dev, pWin, kbd->focus->win, focusEventMode);
+ dev->focus->win = FollowKeyboardWin;
+ dev->focus->traceGood = 0;
+ } else {
+ if (!ActivateFocusInGrab(dev, pWin, NoneWin))
+ DoFocusEvents(dev, pWin, NoneWin, focusEventMode);
+ dev->focus->win = NoneWin;
+ dev->focus->traceGood = 0;
+ }
+ }
+ break;
+ }
+ }
+
+ if (dev->valuator)
+ if (dev->valuator->motionHintWindow == pWin)
+ dev->valuator->motionHintWindow = NullWindow;
+}
+
+void
+DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources)
+{
+ int i;
+ DeviceIntPtr dev;
+ InputClientsPtr ic;
+ struct _OtherInputMasks *inputMasks;
+
+ for (dev = inputInfo.devices; dev; dev = dev->next) {
+ DeleteDeviceFromAnyExtEvents(pWin, dev);
+ }
+
+ for (dev = inputInfo.off_devices; dev; dev = dev->next)
+ DeleteDeviceFromAnyExtEvents(pWin, dev);
+
+ if (freeResources)
+ while ((inputMasks = wOtherInputMasks(pWin)) != 0) {
+ ic = inputMasks->inputClients;
+ for (i = 0; i < EMASKSIZE; i++)
+ inputMasks->dontPropagateMask[i] = 0;
+ FreeResource(ic->resource, RT_NONE);
+ }
+}
+
+int
+MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask)
+{
+ DeviceIntPtr dev;
+
+ dixLookupDevice(&dev, pEvents->deviceid & DEVICE_BITS, serverClient,
+ DixReadAccess);
+ if (!dev)
+ return 0;
+
+ if (pEvents->type == DeviceMotionNotify) {
+ if (mask & DevicePointerMotionHintMask) {
+ if (WID(dev->valuator->motionHintWindow) == pEvents->event) {
+ return 1; /* don't send, but pretend we did */
+ }
+ pEvents->detail = NotifyHint;
+ } else {
+ pEvents->detail = NotifyNormal;
+ }
+ }
+ return 0;
+}
+
+void
+CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type,
+ deviceKeyButtonPointer * xE, GrabPtr grab,
+ ClientPtr client, Mask deliveryMask)
+{
+ DeviceIntPtr dev;
+
+ dixLookupDevice(&dev, xE->deviceid & DEVICE_BITS, serverClient,
+ DixGrabAccess);
+ if (!dev)
+ return;
+
+ if (type == DeviceMotionNotify)
+ dev->valuator->motionHintWindow = pWin;
+ else if ((type == DeviceButtonPress) && (!grab) &&
+ (deliveryMask & DeviceButtonGrabMask)) {
+ GrabRec tempGrab;
+
+ tempGrab.device = dev;
+ tempGrab.resource = client->clientAsMask;
+ tempGrab.window = pWin;
+ tempGrab.ownerEvents =
+ (deliveryMask & DeviceOwnerGrabButtonMask) ? TRUE : FALSE;
+ tempGrab.eventMask = deliveryMask;
+ tempGrab.keyboardMode = GrabModeAsync;
+ tempGrab.pointerMode = GrabModeAsync;
+ tempGrab.confineTo = NullWindow;
+ tempGrab.cursor = NullCursor;
+ tempGrab.next = NULL;
+ (*dev->deviceGrab.ActivateGrab) (dev, &tempGrab, currentTime, TRUE);
+ }
+}
+
+static Mask
+DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
+{
+ InputClientsPtr other;
+
+ if (!wOtherInputMasks(pWin))
+ return 0;
+ for (other = wOtherInputMasks(pWin)->inputClients; other;
+ other = other->next) {
+ if (SameClient(other, client))
+ return other->mask[dev->id];
+ }
+ return 0;
+}
+
+void
+MaybeStopDeviceHint(DeviceIntPtr dev, ClientPtr client)
+{
+ WindowPtr pWin;
+ GrabPtr grab = dev->deviceGrab.grab;
+
+ pWin = dev->valuator->motionHintWindow;
+
+ if ((grab && SameClient(grab, client) &&
+ ((grab->eventMask & DevicePointerMotionHintMask) ||
+ (grab->ownerEvents &&
+ (DeviceEventMaskForClient(dev, pWin, client) &
+ DevicePointerMotionHintMask)))) ||
+ (!grab &&
+ (DeviceEventMaskForClient(dev, pWin, client) &
+ DevicePointerMotionHintMask)))
+ dev->valuator->motionHintWindow = NullWindow;
+}
+
+int
+DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask,
+ int maskndx)
+{
+ struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin);
+
+ if (mask & ~PropagateMask[maskndx]) {
+ client->errorValue = mask;
+ return BadValue;
+ }
+
+ if (mask == 0) {
+ if (inputMasks)
+ inputMasks->dontPropagateMask[maskndx] = mask;
+ } else {
+ if (!inputMasks)
+ AddExtensionClient(pWin, client, 0, 0);
+ inputMasks = wOtherInputMasks(pWin);
+ inputMasks->dontPropagateMask[maskndx] = mask;
+ }
+ RecalculateDeviceDeliverableEvents(pWin);
+ if (ShouldFreeInputMasks(pWin, FALSE))
+ FreeResource(inputMasks->inputClients->resource, RT_NONE);
+ return Success;
+}
+
+Bool
+ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents)
+{
+ int i;
+ Mask allInputEventMasks = 0;
+ struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin);
+
+ for (i = 0; i < EMASKSIZE; i++)
+ allInputEventMasks |= inputMasks->dontPropagateMask[i];
+ if (!ignoreSelectedEvents)
+ for (i = 0; i < EMASKSIZE; i++)
+ allInputEventMasks |= inputMasks->inputEvents[i];
+ if (allInputEventMasks == 0)
+ return TRUE;
+ else
+ return FALSE;
+}
+
+/***********************************************************************
+ *
+ * Walk through the window tree, finding all clients that want to know
+ * about the Event.
+ *
+ */
+
+static void
+FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask,
+ xEvent * ev, int count)
+{
+ WindowPtr p2;
+
+ while (p1) {
+ p2 = p1->firstChild;
+ DeliverEventsToWindow(dev, p1, ev, count, mask, NullGrab);
+ FindInterestedChildren(dev, p2, mask, ev, count);
+ p1 = p1->nextSib;
+ }
+}
+
+/***********************************************************************
+ *
+ * Send an event to interested clients in all windows on all screens.
+ *
+ */
+
+void
+SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count)
+{
+ int i;
+ WindowPtr pWin, p1;
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ pWin = screenInfo.screens[i]->root;
+ if (!pWin)
+ continue;
+ DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab);
+ p1 = pWin->firstChild;
+ FindInterestedChildren(dev, p1, mask, ev, count);
+ }
+}
+
+/**
+ * Set the XI2 mask for the given client on the given window.
+ * @param dev The device to set the mask for.
+ * @param win The window to set the mask on.
+ * @param client The client setting the mask.
+ * @param len Number of bytes in mask.
+ * @param mask Event mask in the form of (1 << eventtype)
+ */
+int
+XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
+ unsigned int len, unsigned char* mask)
+{
+ OtherInputMasks *masks;
+ InputClientsPtr others = NULL;
+
+ masks = wOtherInputMasks(win);
+ if (masks)
+ {
+ for (others = wOtherInputMasks(win)->inputClients; others;
+ others = others->next) {
+ if (SameClient(others, client)) {
+ memset(others->xi2mask[dev->id], 0,
+ sizeof(others->xi2mask[dev->id]));
+ break;
+ }
+ }
+ }
+
+ len = min(len, sizeof(others->xi2mask[dev->id]));
+
+ if (len && !others)
+ {
+ if (AddExtensionClient(win, client, 0, 0) != Success)
+ return BadAlloc;
+ others= wOtherInputMasks(win)->inputClients;
+ }
+
+ if (others)
+ memset(others->xi2mask[dev->id], 0, sizeof(others->xi2mask[dev->id]));
+
+ if (len)
+ memcpy(others->xi2mask[dev->id], mask, len);
+
+ RecalculateDeviceDeliverableEvents(win);
+
+ return Success;
+}
diff --git a/xorg-server/Xi/exglobals.h b/xorg-server/Xi/exglobals.h
index 8c5a42e6e..cba7efed7 100644
--- a/xorg-server/Xi/exglobals.h
+++ b/xorg-server/Xi/exglobals.h
@@ -1,84 +1,84 @@
-/************************************************************
-
-Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of the above listed
-copyright holder(s) not be used in advertising or publicity pertaining
-to distribution of the software without specific, written prior
-permission.
-
-THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
-TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
-LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-/*****************************************************************
- *
- * Globals referenced elsewhere in the server.
- *
- */
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-#include "privates.h"
-
-#ifndef EXGLOBALS_H
-#define EXGLOBALS_H 1
-
-extern int IReqCode;
-extern int IEventBase;
-extern int BadDevice;
-extern int BadMode;
-extern int DeviceBusy;
-extern int BadClass;
-
-/* Note: only the ones needed in files other than extinit.c are declared */
-extern const Mask DevicePointerMotionMask;
-extern const Mask DevicePointerMotionHintMask;
-extern const Mask DeviceFocusChangeMask;
-extern const Mask DeviceStateNotifyMask;
-extern const Mask DeviceMappingNotifyMask;
-extern const Mask DeviceOwnerGrabButtonMask;
-extern const Mask DeviceButtonGrabMask;
-extern const Mask DeviceButtonMotionMask;
-extern const Mask DevicePresenceNotifyMask;
-extern const Mask DevicePropertyNotifyMask;
-extern const Mask XIAllMasks;
-
-extern Mask PropagateMask[];
-
-extern int DeviceValuator;
-extern int DeviceKeyPress;
-extern int DeviceKeyRelease;
-extern int DeviceButtonPress;
-extern int DeviceButtonRelease;
-extern int DeviceMotionNotify;
-extern int DeviceFocusIn;
-extern int DeviceFocusOut;
-extern int ProximityIn;
-extern int ProximityOut;
-extern int DeviceStateNotify;
-extern int DeviceKeyStateNotify;
-extern int DeviceButtonStateNotify;
-extern int DeviceMappingNotify;
-extern int ChangeDeviceNotify;
-extern int DevicePresenceNotify;
-extern int DevicePropertyNotify;
-
-extern RESTYPE RT_INPUTCLIENT;
-
-extern DevPrivateKeyRec XIClientPrivateKeyRec;
-#define XIClientPrivateKey (&XIClientPrivateKeyRec)
-
-#endif /* EXGLOBALS_H */
+/************************************************************
+
+Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+/*****************************************************************
+ *
+ * Globals referenced elsewhere in the server.
+ *
+ */
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+#include "privates.h"
+
+#ifndef EXGLOBALS_H
+#define EXGLOBALS_H 1
+
+extern int IReqCode;
+extern int IEventBase;
+extern int BadDevice;
+extern int BadMode;
+extern int DeviceBusy;
+extern int BadClass;
+
+/* Note: only the ones needed in files other than extinit.c are declared */
+extern const Mask DevicePointerMotionMask;
+extern const Mask DevicePointerMotionHintMask;
+extern const Mask DeviceFocusChangeMask;
+extern const Mask DeviceStateNotifyMask;
+extern const Mask DeviceMappingNotifyMask;
+extern const Mask DeviceOwnerGrabButtonMask;
+extern const Mask DeviceButtonGrabMask;
+extern const Mask DeviceButtonMotionMask;
+extern const Mask DevicePresenceNotifyMask;
+extern const Mask DevicePropertyNotifyMask;
+extern const Mask XIAllMasks;
+
+extern Mask PropagateMask[];
+
+extern int DeviceValuator;
+extern int DeviceKeyPress;
+extern int DeviceKeyRelease;
+extern int DeviceButtonPress;
+extern int DeviceButtonRelease;
+extern int DeviceMotionNotify;
+extern int DeviceFocusIn;
+extern int DeviceFocusOut;
+extern int ProximityIn;
+extern int ProximityOut;
+extern int DeviceStateNotify;
+extern int DeviceKeyStateNotify;
+extern int DeviceButtonStateNotify;
+extern int DeviceMappingNotify;
+extern int ChangeDeviceNotify;
+extern int DevicePresenceNotify;
+extern int DevicePropertyNotify;
+
+extern RESTYPE RT_INPUTCLIENT;
+
+extern DevPrivateKeyRec XIClientPrivateKeyRec;
+#define XIClientPrivateKey (&XIClientPrivateKeyRec)
+
+#endif /* EXGLOBALS_H */
diff --git a/xorg-server/Xi/extinit.c b/xorg-server/Xi/extinit.c
index 46d34599c..63f7fca8b 100644
--- a/xorg-server/Xi/extinit.c
+++ b/xorg-server/Xi/extinit.c
@@ -1,1309 +1,1309 @@
-/************************************************************
-
-Copyright 1989, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Hewlett-Packard not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-********************************************************/
-
-/********************************************************************
- *
- * Dispatch routines and initialization routines for the X input extension.
- *
- */
-
-#define NUMTYPES 15
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "inputstr.h"
-#include "gcstruct.h" /* pointer for extnsionst.h */
-#include "extnsionst.h" /* extension entry */
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include <X11/extensions/XI2proto.h>
-#include <X11/extensions/geproto.h>
-#include "geext.h" /* extension interfaces for ge */
-
-#include "dixevents.h"
-#include "exevents.h"
-#include "extinit.h"
-#include "exglobals.h"
-#include "swaprep.h"
-#include "privates.h"
-#include "protocol-versions.h"
-
-/* modules local to Xi */
-#include "allowev.h"
-#include "chgdctl.h"
-#include "chgfctl.h"
-#include "chgkbd.h"
-#include "chgprop.h"
-#include "chgptr.h"
-#include "closedev.h"
-#include "devbell.h"
-#include "getbmap.h"
-#include "getbmap.h"
-#include "getdctl.h"
-#include "getfctl.h"
-#include "getfocus.h"
-#include "getkmap.h"
-#include "getmmap.h"
-#include "getprop.h"
-#include "getselev.h"
-#include "getvers.h"
-#include "getvers.h"
-#include "grabdev.h"
-#include "grabdevb.h"
-#include "grabdevk.h"
-#include "gtmotion.h"
-#include "listdev.h"
-#include "opendev.h"
-#include "queryst.h"
-#include "selectev.h"
-#include "sendexev.h"
-#include "chgkmap.h"
-#include "setbmap.h"
-#include "setdval.h"
-#include "setfocus.h"
-#include "setmmap.h"
-#include "setmode.h"
-#include "ungrdev.h"
-#include "ungrdevb.h"
-#include "ungrdevk.h"
-#include "xiallowev.h"
-#include "xiselectev.h"
-#include "xigrabdev.h"
-#include "xipassivegrab.h"
-#include "xisetdevfocus.h"
-#include "xiproperty.h"
-#include "xichangecursor.h"
-#include "xichangehierarchy.h"
-#include "xigetclientpointer.h"
-#include "xiquerydevice.h"
-#include "xiquerypointer.h"
-#include "xiqueryversion.h"
-#include "xisetclientpointer.h"
-#include "xiwarppointer.h"
-
-
-/* Masks for XI events have to be aligned with core event (partially anyway).
- * If DeviceButtonMotionMask is != ButtonMotionMask, event delivery
- * breaks down. The device needs the dev->button->motionMask. If DBMM is
- * the same as BMM, we can ensure that both core and device events can be
- * delivered, without the need for extra structures in the DeviceIntRec. */
-const Mask DeviceKeyPressMask = KeyPressMask;
-const Mask DeviceKeyReleaseMask = KeyReleaseMask;
-const Mask DeviceButtonPressMask = ButtonPressMask;
-const Mask DeviceButtonReleaseMask = ButtonReleaseMask;
-const Mask DeviceProximityMask = (1L << 4);
-const Mask DeviceStateNotifyMask = (1L << 5);
-const Mask DevicePointerMotionMask = PointerMotionMask;
-const Mask DevicePointerMotionHintMask = PointerMotionHintMask;
-const Mask DeviceButton1MotionMask = Button1MotionMask;
-const Mask DeviceButton2MotionMask = Button2MotionMask;
-const Mask DeviceButton3MotionMask = Button3MotionMask;
-const Mask DeviceButton4MotionMask = Button4MotionMask;
-const Mask DeviceButton5MotionMask = Button5MotionMask;
-const Mask DeviceButtonMotionMask = ButtonMotionMask;
-const Mask DeviceFocusChangeMask = (1L << 14);
-const Mask DeviceMappingNotifyMask = (1L << 15);
-const Mask ChangeDeviceNotifyMask = (1L << 16);
-const Mask DeviceButtonGrabMask = (1L << 17);
-const Mask DeviceOwnerGrabButtonMask = (1L << 17);
-const Mask DevicePresenceNotifyMask = (1L << 18);
-const Mask DeviceEnterWindowMask = (1L << 18);
-const Mask DeviceLeaveWindowMask = (1L << 19);
-const Mask DevicePropertyNotifyMask = (1L << 20);
-const Mask XIAllMasks = (1L << 21) - 1;
-
-int ExtEventIndex;
-Mask ExtExclusiveMasks[EMASKSIZE];
-
-static struct dev_type
-{
- Atom type;
- char *name;
-} dev_type[] = {
- {
- 0, XI_KEYBOARD}, {
- 0, XI_MOUSE}, {
- 0, XI_TABLET}, {
- 0, XI_TOUCHSCREEN}, {
- 0, XI_TOUCHPAD}, {
- 0, XI_BARCODE}, {
- 0, XI_BUTTONBOX}, {
- 0, XI_KNOB_BOX}, {
- 0, XI_ONE_KNOB}, {
- 0, XI_NINE_KNOB}, {
- 0, XI_TRACKBALL}, {
- 0, XI_QUADRATURE}, {
- 0, XI_ID_MODULE}, {
- 0, XI_SPACEBALL}, {
- 0, XI_DATAGLOVE}, {
- 0, XI_EYETRACKER}, {
- 0, XI_CURSORKEYS}, {
-0, XI_FOOTMOUSE}};
-
-CARD8 event_base[numInputClasses];
-XExtEventInfo EventInfo[32];
-
-static DeviceIntRec xi_all_devices;
-static DeviceIntRec xi_all_master_devices;
-
-/**
- * Dispatch vector. Functions defined in here will be called when the matching
- * request arrives.
- */
-static int (*ProcIVector[])(ClientPtr) = {
- NULL, /* 0 */
- ProcXGetExtensionVersion, /* 1 */
- ProcXListInputDevices, /* 2 */
- ProcXOpenDevice, /* 3 */
- ProcXCloseDevice, /* 4 */
- ProcXSetDeviceMode, /* 5 */
- ProcXSelectExtensionEvent, /* 6 */
- ProcXGetSelectedExtensionEvents, /* 7 */
- ProcXChangeDeviceDontPropagateList, /* 8 */
- ProcXGetDeviceDontPropagateList, /* 9 */
- ProcXGetDeviceMotionEvents, /* 10 */
- ProcXChangeKeyboardDevice, /* 11 */
- ProcXChangePointerDevice, /* 12 */
- ProcXGrabDevice, /* 13 */
- ProcXUngrabDevice, /* 14 */
- ProcXGrabDeviceKey, /* 15 */
- ProcXUngrabDeviceKey, /* 16 */
- ProcXGrabDeviceButton, /* 17 */
- ProcXUngrabDeviceButton, /* 18 */
- ProcXAllowDeviceEvents, /* 19 */
- ProcXGetDeviceFocus, /* 20 */
- ProcXSetDeviceFocus, /* 21 */
- ProcXGetFeedbackControl, /* 22 */
- ProcXChangeFeedbackControl, /* 23 */
- ProcXGetDeviceKeyMapping, /* 24 */
- ProcXChangeDeviceKeyMapping, /* 25 */
- ProcXGetDeviceModifierMapping, /* 26 */
- ProcXSetDeviceModifierMapping, /* 27 */
- ProcXGetDeviceButtonMapping, /* 28 */
- ProcXSetDeviceButtonMapping, /* 29 */
- ProcXQueryDeviceState, /* 30 */
- ProcXSendExtensionEvent, /* 31 */
- ProcXDeviceBell, /* 32 */
- ProcXSetDeviceValuators, /* 33 */
- ProcXGetDeviceControl, /* 34 */
- ProcXChangeDeviceControl, /* 35 */
- /* XI 1.5 */
- ProcXListDeviceProperties, /* 36 */
- ProcXChangeDeviceProperty, /* 37 */
- ProcXDeleteDeviceProperty, /* 38 */
- ProcXGetDeviceProperty, /* 39 */
- /* XI 2 */
- ProcXIQueryPointer, /* 40 */
- ProcXIWarpPointer, /* 41 */
- ProcXIChangeCursor, /* 42 */
- ProcXIChangeHierarchy, /* 43 */
- ProcXISetClientPointer, /* 44 */
- ProcXIGetClientPointer, /* 45 */
- ProcXISelectEvents, /* 46 */
- ProcXIQueryVersion, /* 47 */
- ProcXIQueryDevice, /* 48 */
- ProcXISetFocus, /* 49 */
- ProcXIGetFocus, /* 50 */
- ProcXIGrabDevice, /* 51 */
- ProcXIUngrabDevice, /* 52 */
- ProcXIAllowEvents, /* 53 */
- ProcXIPassiveGrabDevice, /* 54 */
- ProcXIPassiveUngrabDevice, /* 55 */
- ProcXIListProperties, /* 56 */
- ProcXIChangeProperty, /* 57 */
- ProcXIDeleteProperty, /* 58 */
- ProcXIGetProperty, /* 59 */
- ProcXIGetSelectedEvents /* 60 */
-};
-
-/* For swapped clients */
-static int (*SProcIVector[])(ClientPtr) = {
- NULL, /* 0 */
- SProcXGetExtensionVersion, /* 1 */
- SProcXListInputDevices, /* 2 */
- SProcXOpenDevice, /* 3 */
- SProcXCloseDevice, /* 4 */
- SProcXSetDeviceMode, /* 5 */
- SProcXSelectExtensionEvent, /* 6 */
- SProcXGetSelectedExtensionEvents, /* 7 */
- SProcXChangeDeviceDontPropagateList, /* 8 */
- SProcXGetDeviceDontPropagateList, /* 9 */
- SProcXGetDeviceMotionEvents, /* 10 */
- SProcXChangeKeyboardDevice, /* 11 */
- SProcXChangePointerDevice, /* 12 */
- SProcXGrabDevice, /* 13 */
- SProcXUngrabDevice, /* 14 */
- SProcXGrabDeviceKey, /* 15 */
- SProcXUngrabDeviceKey, /* 16 */
- SProcXGrabDeviceButton, /* 17 */
- SProcXUngrabDeviceButton, /* 18 */
- SProcXAllowDeviceEvents, /* 19 */
- SProcXGetDeviceFocus, /* 20 */
- SProcXSetDeviceFocus, /* 21 */
- SProcXGetFeedbackControl, /* 22 */
- SProcXChangeFeedbackControl, /* 23 */
- SProcXGetDeviceKeyMapping, /* 24 */
- SProcXChangeDeviceKeyMapping, /* 25 */
- SProcXGetDeviceModifierMapping, /* 26 */
- SProcXSetDeviceModifierMapping, /* 27 */
- SProcXGetDeviceButtonMapping, /* 28 */
- SProcXSetDeviceButtonMapping, /* 29 */
- SProcXQueryDeviceState, /* 30 */
- SProcXSendExtensionEvent, /* 31 */
- SProcXDeviceBell, /* 32 */
- SProcXSetDeviceValuators, /* 33 */
- SProcXGetDeviceControl, /* 34 */
- SProcXChangeDeviceControl, /* 35 */
- SProcXListDeviceProperties, /* 36 */
- SProcXChangeDeviceProperty, /* 37 */
- SProcXDeleteDeviceProperty, /* 38 */
- SProcXGetDeviceProperty, /* 39 */
- SProcXIQueryPointer, /* 40 */
- SProcXIWarpPointer, /* 41 */
- SProcXIChangeCursor, /* 42 */
- SProcXIChangeHierarchy, /* 43 */
- SProcXISetClientPointer, /* 44 */
- SProcXIGetClientPointer, /* 45 */
- SProcXISelectEvents, /* 46 */
- SProcXIQueryVersion, /* 47 */
- SProcXIQueryDevice, /* 48 */
- SProcXISetFocus, /* 49 */
- SProcXIGetFocus, /* 50 */
- SProcXIGrabDevice, /* 51 */
- SProcXIUngrabDevice, /* 52 */
- SProcXIAllowEvents, /* 53 */
- SProcXIPassiveGrabDevice, /* 54 */
- SProcXIPassiveUngrabDevice, /* 55 */
- SProcXIListProperties, /* 56 */
- SProcXIChangeProperty, /* 57 */
- SProcXIDeleteProperty, /* 58 */
- SProcXIGetProperty, /* 59 */
- SProcXIGetSelectedEvents /* 60 */
-};
-
-/*****************************************************************
- *
- * Globals referenced elsewhere in the server.
- *
- */
-
-int IReqCode = 0;
-int IEventBase = 0;
-int BadDevice = 0;
-static int BadEvent = 1;
-int BadMode = 2;
-int DeviceBusy = 3;
-int BadClass = 4;
-
-int DeviceValuator;
-int DeviceKeyPress;
-int DeviceKeyRelease;
-int DeviceButtonPress;
-int DeviceButtonRelease;
-int DeviceMotionNotify;
-int DeviceFocusIn;
-int DeviceFocusOut;
-int ProximityIn;
-int ProximityOut;
-int DeviceStateNotify;
-int DeviceKeyStateNotify;
-int DeviceButtonStateNotify;
-int DeviceMappingNotify;
-int ChangeDeviceNotify;
-int DevicePresenceNotify;
-int DevicePropertyNotify;
-
-RESTYPE RT_INPUTCLIENT;
-
-/*****************************************************************
- *
- * Externs defined elsewhere in the X server.
- *
- */
-
-extern XExtensionVersion XIVersion;
-
-
-Mask PropagateMask[MAXDEVICES];
-
-/*****************************************************************
- *
- * Versioning support
- *
- */
-
-DevPrivateKeyRec XIClientPrivateKeyRec;
-
-/*****************************************************************
- *
- * Declarations of local routines.
- *
- */
-
-static void
-XIClientCallback(CallbackListPtr *list,
- pointer closure,
- pointer data)
-{
- NewClientInfoRec *clientinfo = (NewClientInfoRec*)data;
- ClientPtr pClient = clientinfo->client;
- XIClientPtr pXIClient;
-
- pXIClient = dixLookupPrivate(&pClient->devPrivates, XIClientPrivateKey);
- pXIClient->major_version = 0;
- pXIClient->minor_version = 0;
-}
-
-/*************************************************************************
- *
- * ProcIDispatch - main dispatch routine for requests to this extension.
- * This routine is used if server and client have the same byte ordering.
- *
- */
-
-static int
-ProcIDispatch(ClientPtr client)
-{
- REQUEST(xReq);
- if (stuff->data > (IREQUESTS + XI2REQUESTS) || !ProcIVector[stuff->data])
- return BadRequest;
-
- return (*ProcIVector[stuff->data])(client);
-}
-
-/*******************************************************************************
- *
- * SProcXDispatch
- *
- * Main swapped dispatch routine for requests to this extension.
- * This routine is used if server and client do not have the same byte ordering.
- *
- */
-
-static int
-SProcIDispatch(ClientPtr client)
-{
- REQUEST(xReq);
- if (stuff->data > IREQUESTS || !SProcIVector[stuff->data])
- return BadRequest;
-
- return (*SProcIVector[stuff->data])(client);
-}
-
-/**********************************************************************
- *
- * SReplyIDispatch
- * Swap any replies defined in this extension.
- *
- */
-
-static void
-SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
- /* All we look at is the type field */
-{ /* This is common to all replies */
- if (rep->RepType == X_GetExtensionVersion)
- SRepXGetExtensionVersion(client, len,
- (xGetExtensionVersionReply *) rep);
- else if (rep->RepType == X_ListInputDevices)
- SRepXListInputDevices(client, len, (xListInputDevicesReply *) rep);
- else if (rep->RepType == X_OpenDevice)
- SRepXOpenDevice(client, len, (xOpenDeviceReply *) rep);
- else if (rep->RepType == X_SetDeviceMode)
- SRepXSetDeviceMode(client, len, (xSetDeviceModeReply *) rep);
- else if (rep->RepType == X_GetSelectedExtensionEvents)
- SRepXGetSelectedExtensionEvents(client, len,
- (xGetSelectedExtensionEventsReply *)
- rep);
- else if (rep->RepType == X_GetDeviceDontPropagateList)
- SRepXGetDeviceDontPropagateList(client, len,
- (xGetDeviceDontPropagateListReply *)
- rep);
- else if (rep->RepType == X_GetDeviceMotionEvents)
- SRepXGetDeviceMotionEvents(client, len,
- (xGetDeviceMotionEventsReply *) rep);
- else if (rep->RepType == X_GrabDevice)
- SRepXGrabDevice(client, len, (xGrabDeviceReply *) rep);
- else if (rep->RepType == X_GetDeviceFocus)
- SRepXGetDeviceFocus(client, len, (xGetDeviceFocusReply *) rep);
- else if (rep->RepType == X_GetFeedbackControl)
- SRepXGetFeedbackControl(client, len, (xGetFeedbackControlReply *) rep);
- else if (rep->RepType == X_GetDeviceKeyMapping)
- SRepXGetDeviceKeyMapping(client, len,
- (xGetDeviceKeyMappingReply *) rep);
- else if (rep->RepType == X_GetDeviceModifierMapping)
- SRepXGetDeviceModifierMapping(client, len,
- (xGetDeviceModifierMappingReply *) rep);
- else if (rep->RepType == X_SetDeviceModifierMapping)
- SRepXSetDeviceModifierMapping(client, len,
- (xSetDeviceModifierMappingReply *) rep);
- else if (rep->RepType == X_GetDeviceButtonMapping)
- SRepXGetDeviceButtonMapping(client, len,
- (xGetDeviceButtonMappingReply *) rep);
- else if (rep->RepType == X_SetDeviceButtonMapping)
- SRepXSetDeviceButtonMapping(client, len,
- (xSetDeviceButtonMappingReply *) rep);
- else if (rep->RepType == X_QueryDeviceState)
- SRepXQueryDeviceState(client, len, (xQueryDeviceStateReply *) rep);
- else if (rep->RepType == X_SetDeviceValuators)
- SRepXSetDeviceValuators(client, len, (xSetDeviceValuatorsReply *) rep);
- else if (rep->RepType == X_GetDeviceControl)
- SRepXGetDeviceControl(client, len, (xGetDeviceControlReply *) rep);
- else if (rep->RepType == X_ChangeDeviceControl)
- SRepXChangeDeviceControl(client, len,
- (xChangeDeviceControlReply *) rep);
- else if (rep->RepType == X_ListDeviceProperties)
- SRepXListDeviceProperties(client, len, (xListDevicePropertiesReply*)rep);
- else if (rep->RepType == X_GetDeviceProperty)
- SRepXGetDeviceProperty(client, len, (xGetDevicePropertyReply *) rep);
- else if (rep->RepType == X_XIQueryPointer)
- SRepXIQueryPointer(client, len, (xXIQueryPointerReply *) rep);
- else if (rep->RepType == X_XIGetClientPointer)
- SRepXIGetClientPointer(client, len, (xXIGetClientPointerReply*) rep);
- else if (rep->RepType == X_XIQueryVersion)
- SRepXIQueryVersion(client, len, (xXIQueryVersionReply*)rep);
- else if (rep->RepType == X_XIQueryDevice)
- SRepXIQueryDevice(client, len, (xXIQueryDeviceReply*)rep);
- else if (rep->RepType == X_XIGrabDevice)
- SRepXIGrabDevice(client, len, (xXIGrabDeviceReply *) rep);
- else if (rep->RepType == X_XIGrabDevice)
- SRepXIPassiveGrabDevice(client, len, (xXIPassiveGrabDeviceReply *) rep);
- else if (rep->RepType == X_XIListProperties)
- SRepXIListProperties(client, len, (xXIListPropertiesReply *) rep);
- else if (rep->RepType == X_XIGetProperty)
- SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep);
- else if (rep->RepType == X_XIGetSelectedEvents)
- SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep);
- else if (rep->RepType == X_XIGetFocus)
- SRepXIGetFocus(client, len, (xXIGetFocusReply *) rep);
- else {
- FatalError("XINPUT confused sending swapped reply");
- }
-}
-
-/************************************************************************
- *
- * This function swaps the DeviceValuator event.
- *
- */
-
-static void
-SEventDeviceValuator(deviceValuator * from, deviceValuator * to)
-{
- char n;
- int i;
- INT32 *ip B32;
-
- *to = *from;
- swaps(&to->sequenceNumber, n);
- swaps(&to->device_state, n);
- ip = &to->valuator0;
- for (i = 0; i < 6; i++) {
- swapl((ip + i), n); /* macro - braces are required */
- }
-}
-
-static void
-SEventFocus(deviceFocus * from, deviceFocus * to)
-{
- char n;
-
- *to = *from;
- swaps(&to->sequenceNumber, n);
- swapl(&to->time, n);
- swapl(&to->window, n);
-}
-
-static void
-SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to)
-{
- int i;
- char n;
- INT32 *ip B32;
-
- *to = *from;
- swaps(&to->sequenceNumber, n);
- swapl(&to->time, n);
- ip = &to->valuator0;
- for (i = 0; i < 3; i++) {
- swapl((ip + i), n); /* macro - braces are required */
- }
-}
-
-static void
-SDeviceKeyStateNotifyEvent(deviceKeyStateNotify * from,
- deviceKeyStateNotify * to)
-{
- char n;
-
- *to = *from;
- swaps(&to->sequenceNumber, n);
-}
-
-static void
-SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from,
- deviceButtonStateNotify * to)
-{
- char n;
-
- *to = *from;
- swaps(&to->sequenceNumber, n);
-}
-
-static void
-SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to)
-{
- char n;
-
- *to = *from;
- swaps(&to->sequenceNumber, n);
- swapl(&to->time, n);
-}
-
-static void
-SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to)
-{
- char n;
-
- *to = *from;
- swaps(&to->sequenceNumber, n);
- swapl(&to->time, n);
-}
-
-static void
-SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to)
-{
- char n;
-
- *to = *from;
- swaps(&to->sequenceNumber,n);
- swapl(&to->time, n);
- swaps(&to->control, n);
-}
-
-static void
-SDevicePropertyNotifyEvent (devicePropertyNotify *from, devicePropertyNotify *to)
-{
- char n;
-
- *to = *from;
- swaps(&to->sequenceNumber,n);
- swapl(&to->time, n);
- swapl(&to->atom, n);
-}
-
-static void
-SDeviceLeaveNotifyEvent (xXILeaveEvent *from, xXILeaveEvent *to)
-{
- char n;
-
- *to = *from;
- swaps(&to->sequenceNumber,n);
- swapl(&to->length, n);
- swaps(&to->evtype, n);
- swaps(&to->deviceid, n);
- swapl(&to->time, n);
- swapl(&to->root, n);
- swapl(&to->event, n);
- swapl(&to->child, n);
- swapl(&to->root_x, n);
- swapl(&to->root_y, n);
- swapl(&to->event_x, n);
- swapl(&to->event_y, n);
- swaps(&to->sourceid, n);
- swaps(&to->buttons_len, n);
- swapl(&to->mods.base_mods, n);
- swapl(&to->mods.latched_mods, n);
- swapl(&to->mods.locked_mods, n);
-}
-
-static void
-SDeviceChangedEvent(xXIDeviceChangedEvent* from, xXIDeviceChangedEvent* to)
-{
- char n;
- int i, j;
- xXIAnyInfo *any;
-
- *to = *from;
- memcpy(&to[1], &from[1], from->length * 4);
-
- any = (xXIAnyInfo*)&to[1];
- for (i = 0; i < to->num_classes; i++)
- {
- int length = any->length;
-
- switch(any->type)
- {
- case KeyClass:
- {
- xXIKeyInfo *ki = (xXIKeyInfo*)any;
- uint32_t *key = (uint32_t*)&ki[1];
- for (j = 0; j < ki->num_keycodes; j++, key++)
- swapl(key, n);
- swaps(&ki->num_keycodes, n);
- }
- break;
- case ButtonClass:
- {
- xXIButtonInfo *bi = (xXIButtonInfo*)any;
- Atom *labels = (Atom*)((char*)bi + sizeof(xXIButtonInfo) +
- pad_to_int32(bits_to_bytes(bi->num_buttons)));
- for (j = 0; j < bi->num_buttons; j++)
- swapl(&labels[j], n);
- swaps(&bi->num_buttons, n);
- }
- break;
- case ValuatorClass:
- {
- xXIValuatorInfo* ai = (xXIValuatorInfo*)any;
- swapl(&ai->label, n);
- swapl(&ai->min.integral, n);
- swapl(&ai->min.frac, n);
- swapl(&ai->max.integral, n);
- swapl(&ai->max.frac, n);
- swapl(&ai->resolution, n);
- swaps(&ai->number, n);
- }
- break;
- }
-
- swaps(&any->type, n);
- swaps(&any->length, n);
- swaps(&any->sourceid, n);
-
- any = (xXIAnyInfo*)((char*)any + length * 4);
- }
-
- swaps(&to->sequenceNumber, n);
- swapl(&to->length, n);
- swaps(&to->evtype, n);
- swaps(&to->deviceid, n);
- swapl(&to->time, n);
- swaps(&to->num_classes, n);
- swaps(&to->sourceid, n);
-
-}
-
-static void SDeviceEvent(xXIDeviceEvent *from, xXIDeviceEvent *to)
-{
- int i;
- char n;
- char *ptr;
- char *vmask;
-
- memcpy(to, from, sizeof(xEvent) + from->length * 4);
-
- swaps(&to->sequenceNumber, n);
- swapl(&to->length, n);
- swaps(&to->evtype, n);
- swaps(&to->deviceid, n);
- swapl(&to->time, n);
- swapl(&to->detail, n);
- swapl(&to->root, n);
- swapl(&to->event, n);
- swapl(&to->child, n);
- swapl(&to->root_x, n);
- swapl(&to->root_y, n);
- swapl(&to->event_x, n);
- swapl(&to->event_y, n);
- swaps(&to->buttons_len, n);
- swaps(&to->valuators_len, n);
- swaps(&to->sourceid, n);
- swapl(&to->mods.base_mods, n);
- swapl(&to->mods.latched_mods, n);
- swapl(&to->mods.locked_mods, n);
- swapl(&to->mods.effective_mods, n);
- swapl(&to->flags, n);
-
- ptr = (char*)(&to[1]);
- ptr += from->buttons_len * 4;
- vmask = ptr; /* valuator mask */
- ptr += from->valuators_len * 4;
- for (i = 0; i < from->valuators_len * 32; i++)
- {
- if (BitIsOn(vmask, i))
- {
- swapl(((uint32_t*)ptr), n);
- ptr += 4;
- swapl(((uint32_t*)ptr), n);
- ptr += 4;
- }
- }
-}
-
-static void SDeviceHierarchyEvent(xXIHierarchyEvent *from,
- xXIHierarchyEvent *to)
-{
- int i;
- char n;
- xXIHierarchyInfo *info;
-
- *to = *from;
- memcpy(&to[1], &from[1], from->length * 4);
- swaps(&to->sequenceNumber, n);
- swapl(&to->length, n);
- swaps(&to->evtype, n);
- swaps(&to->deviceid, n);
- swapl(&to->time, n);
- swapl(&to->flags, n);
- swaps(&to->num_info, n);
-
- info = (xXIHierarchyInfo*)&to[1];
- for (i = 0; i< from->num_info; i++)
- {
- swaps(&info->deviceid, n);
- swaps(&info->attachment, n);
- info++;
- }
-}
-
-static void SXIPropertyEvent(xXIPropertyEvent *from, xXIPropertyEvent *to)
-{
- char n;
-
- *to = *from;
- swaps(&to->sequenceNumber, n);
- swapl(&to->length, n);
- swaps(&to->evtype, n);
- swaps(&to->deviceid, n);
- swapl(&to->property, n);
-}
-
-static void SRawEvent(xXIRawEvent *from, xXIRawEvent *to)
-{
- char n;
- int i;
- FP3232 *values;
- unsigned char *mask;
-
- memcpy(to, from, sizeof(xEvent) + from->length * 4);
-
- swaps(&to->sequenceNumber, n);
- swapl(&to->length, n);
- swaps(&to->evtype, n);
- swaps(&to->deviceid, n);
- swapl(&to->time, n);
- swapl(&to->detail, n);
-
-
- mask = (unsigned char*)&to[1];
- values = (FP3232*)(mask + from->valuators_len * 4);
-
- for (i = 0; i < from->valuators_len * 4 * 8; i++)
- {
- if (BitIsOn(mask, i))
- {
- /* for each bit set there are two FP3232 values on the wire, in
- * the order abcABC for data and data_raw. Here we swap as if
- * they were in aAbBcC order because it's easier and really
- * doesn't matter.
- */
- swapl(&values->integral, n);
- swapl(&values->frac, n);
- values++;
- swapl(&values->integral, n);
- swapl(&values->frac, n);
- values++;
- }
- }
-
- swaps(&to->valuators_len, n);
-}
-
-
-/** Event swapping function for XI2 events. */
-void
-XI2EventSwap(xGenericEvent *from, xGenericEvent *to)
-{
- switch(from->evtype)
- {
- case XI_Enter:
- case XI_Leave:
- SDeviceLeaveNotifyEvent((xXILeaveEvent*)from, (xXILeaveEvent*)to);
- break;
- case XI_DeviceChanged:
- SDeviceChangedEvent((xXIDeviceChangedEvent*)from,
- (xXIDeviceChangedEvent*)to);
- break;
- case XI_HierarchyChanged:
- SDeviceHierarchyEvent((xXIHierarchyEvent*)from, (xXIHierarchyEvent*)to);
- break;
- case XI_PropertyEvent:
- SXIPropertyEvent((xXIPropertyEvent*)from,
- (xXIPropertyEvent*)to);
- break;
- case XI_Motion:
- case XI_KeyPress:
- case XI_KeyRelease:
- case XI_ButtonPress:
- case XI_ButtonRelease:
- SDeviceEvent((xXIDeviceEvent*)from, (xXIDeviceEvent*)to);
- break;
- case XI_RawMotion:
- case XI_RawKeyPress:
- case XI_RawKeyRelease:
- case XI_RawButtonPress:
- case XI_RawButtonRelease:
- SRawEvent((xXIRawEvent*)from, (xXIRawEvent*)to);
- break;
- default:
- ErrorF("[Xi] Unknown event type to swap. This is a bug.\n");
- break;
- }
-}
-
-/**************************************************************************
- *
- * Allow the specified event to have its propagation suppressed.
- * The default is to not allow suppression of propagation.
- *
- */
-
-static void
-AllowPropagateSuppress(Mask mask)
-{
- int i;
-
- for (i = 0; i < MAXDEVICES; i++)
- PropagateMask[i] |= mask;
-}
-
-/**************************************************************************
- *
- * Record an event mask where there is no unique corresponding event type.
- * We can't call SetMaskForEvent, since that would clobber the existing
- * mask for that event. MotionHint and ButtonMotion are examples.
- *
- * Since extension event types will never be less than 64, we can use
- * 0-63 in the EventInfo array as the "type" to be used to look up this
- * mask. This means that the corresponding macros such as
- * DevicePointerMotionHint must have access to the same constants.
- *
- */
-
-static void
-SetEventInfo(Mask mask, int constant)
-{
- EventInfo[ExtEventIndex].mask = mask;
- EventInfo[ExtEventIndex++].type = constant;
-}
-
-/**************************************************************************
- *
- * Allow the specified event to be restricted to being selected by one
- * client at a time.
- * The default is to allow more than one client to select the event.
- *
- */
-
-static void
-SetExclusiveAccess(Mask mask)
-{
- int i;
-
- for (i = 0; i < MAXDEVICES; i++)
- ExtExclusiveMasks[i] |= mask;
-}
-
-/**************************************************************************
- *
- * Assign the specified mask to the specified event.
- *
- */
-
-static void
-SetMaskForExtEvent(Mask mask, int event)
-{
- int i;
-
- EventInfo[ExtEventIndex].mask = mask;
- EventInfo[ExtEventIndex++].type = event;
-
- if ((event < LASTEvent) || (event >= 128))
- FatalError("MaskForExtensionEvent: bogus event number");
-
- for (i = 0; i < MAXDEVICES; i++)
- SetMaskForEvent(i, mask, event);
-}
-
-/************************************************************************
- *
- * This function sets up extension event types and masks.
- *
- */
-
-static void
-FixExtensionEvents(ExtensionEntry * extEntry)
-{
- DeviceValuator = extEntry->eventBase;
- DeviceKeyPress = DeviceValuator + 1;
- DeviceKeyRelease = DeviceKeyPress + 1;
- DeviceButtonPress = DeviceKeyRelease + 1;
- DeviceButtonRelease = DeviceButtonPress + 1;
- DeviceMotionNotify = DeviceButtonRelease + 1;
- DeviceFocusIn = DeviceMotionNotify + 1;
- DeviceFocusOut = DeviceFocusIn + 1;
- ProximityIn = DeviceFocusOut + 1;
- ProximityOut = ProximityIn + 1;
- DeviceStateNotify = ProximityOut + 1;
- DeviceMappingNotify = DeviceStateNotify + 1;
- ChangeDeviceNotify = DeviceMappingNotify + 1;
- DeviceKeyStateNotify = ChangeDeviceNotify + 1;
- DeviceButtonStateNotify = DeviceKeyStateNotify + 1;
- DevicePresenceNotify = DeviceButtonStateNotify + 1;
- DevicePropertyNotify = DevicePresenceNotify + 1;
-
- event_base[KeyClass] = DeviceKeyPress;
- event_base[ButtonClass] = DeviceButtonPress;
- event_base[ValuatorClass] = DeviceMotionNotify;
- event_base[ProximityClass] = ProximityIn;
- event_base[FocusClass] = DeviceFocusIn;
- event_base[OtherClass] = DeviceStateNotify;
-
- BadDevice += extEntry->errorBase;
- BadEvent += extEntry->errorBase;
- BadMode += extEntry->errorBase;
- DeviceBusy += extEntry->errorBase;
- BadClass += extEntry->errorBase;
-
- SetMaskForExtEvent(DeviceKeyPressMask, DeviceKeyPress);
- AllowPropagateSuppress(DeviceKeyPressMask);
- SetCriticalEvent(DeviceKeyPress);
-
- SetMaskForExtEvent(DeviceKeyReleaseMask, DeviceKeyRelease);
- AllowPropagateSuppress(DeviceKeyReleaseMask);
- SetCriticalEvent(DeviceKeyRelease);
-
- SetMaskForExtEvent(DeviceButtonPressMask, DeviceButtonPress);
- AllowPropagateSuppress(DeviceButtonPressMask);
- SetCriticalEvent(DeviceButtonPress);
-
- SetMaskForExtEvent(DeviceButtonReleaseMask, DeviceButtonRelease);
- AllowPropagateSuppress(DeviceButtonReleaseMask);
- SetCriticalEvent(DeviceButtonRelease);
-
- SetMaskForExtEvent(DeviceProximityMask, ProximityIn);
- SetMaskForExtEvent(DeviceProximityMask, ProximityOut);
-
- SetMaskForExtEvent(DeviceStateNotifyMask, DeviceStateNotify);
-
- SetMaskForExtEvent(DevicePointerMotionMask, DeviceMotionNotify);
- AllowPropagateSuppress(DevicePointerMotionMask);
- SetCriticalEvent(DeviceMotionNotify);
-
- SetEventInfo(DevicePointerMotionHintMask, _devicePointerMotionHint);
- SetEventInfo(DeviceButton1MotionMask, _deviceButton1Motion);
- SetEventInfo(DeviceButton2MotionMask, _deviceButton2Motion);
- SetEventInfo(DeviceButton3MotionMask, _deviceButton3Motion);
- SetEventInfo(DeviceButton4MotionMask, _deviceButton4Motion);
- SetEventInfo(DeviceButton5MotionMask, _deviceButton5Motion);
- SetEventInfo(DeviceButtonMotionMask, _deviceButtonMotion);
-
- SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusIn);
- SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusOut);
-
- SetMaskForExtEvent(DeviceMappingNotifyMask, DeviceMappingNotify);
- SetMaskForExtEvent(ChangeDeviceNotifyMask, ChangeDeviceNotify);
-
- SetEventInfo(DeviceButtonGrabMask, _deviceButtonGrab);
- SetExclusiveAccess(DeviceButtonGrabMask);
-
- SetEventInfo(DeviceOwnerGrabButtonMask, _deviceOwnerGrabButton);
- SetEventInfo(DevicePresenceNotifyMask, _devicePresence);
- SetMaskForExtEvent(DevicePropertyNotifyMask, DevicePropertyNotify);
-
- SetEventInfo(0, _noExtensionEvent);
-}
-
-/************************************************************************
- *
- * This function restores extension event types and masks to their
- * initial state.
- *
- */
-
-static void
-RestoreExtensionEvents(void)
-{
- int i, j;
-
- IReqCode = 0;
- IEventBase = 0;
-
- for (i = 0; i < ExtEventIndex - 1; i++) {
- if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128))
- {
- for (j = 0; j < MAXDEVICES; j++)
- SetMaskForEvent(j, 0, EventInfo[i].type);
- }
- EventInfo[i].mask = 0;
- EventInfo[i].type = 0;
- }
- ExtEventIndex = 0;
- DeviceValuator = 0;
- DeviceKeyPress = 1;
- DeviceKeyRelease = 2;
- DeviceButtonPress = 3;
- DeviceButtonRelease = 4;
- DeviceMotionNotify = 5;
- DeviceFocusIn = 6;
- DeviceFocusOut = 7;
- ProximityIn = 8;
- ProximityOut = 9;
- DeviceStateNotify = 10;
- DeviceMappingNotify = 11;
- ChangeDeviceNotify = 12;
- DeviceKeyStateNotify = 13;
- DeviceButtonStateNotify = 13;
- DevicePresenceNotify = 14;
- DevicePropertyNotify = 15;
-
- BadDevice = 0;
- BadEvent = 1;
- BadMode = 2;
- DeviceBusy = 3;
- BadClass = 4;
-
-}
-
-/***********************************************************************
- *
- * IResetProc.
- * Remove reply-swapping routine.
- * Remove event-swapping routine.
- *
- */
-
-static void
-IResetProc(ExtensionEntry * unused)
-{
- ReplySwapVector[IReqCode] = ReplyNotSwappd;
- EventSwapVector[DeviceValuator] = NotImplemented;
- EventSwapVector[DeviceKeyPress] = NotImplemented;
- EventSwapVector[DeviceKeyRelease] = NotImplemented;
- EventSwapVector[DeviceButtonPress] = NotImplemented;
- EventSwapVector[DeviceButtonRelease] = NotImplemented;
- EventSwapVector[DeviceMotionNotify] = NotImplemented;
- EventSwapVector[DeviceFocusIn] = NotImplemented;
- EventSwapVector[DeviceFocusOut] = NotImplemented;
- EventSwapVector[ProximityIn] = NotImplemented;
- EventSwapVector[ProximityOut] = NotImplemented;
- EventSwapVector[DeviceStateNotify] = NotImplemented;
- EventSwapVector[DeviceKeyStateNotify] = NotImplemented;
- EventSwapVector[DeviceButtonStateNotify] = NotImplemented;
- EventSwapVector[DeviceMappingNotify] = NotImplemented;
- EventSwapVector[ChangeDeviceNotify] = NotImplemented;
- EventSwapVector[DevicePresenceNotify] = NotImplemented;
- EventSwapVector[DevicePropertyNotify] = NotImplemented;
- RestoreExtensionEvents();
-}
-
-
-/***********************************************************************
- *
- * Assign an id and type to an input device.
- *
- */
-
-void
-AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name)
-{
- dev->xinput_type = type;
- dev->name = strdup(name);
-}
-
-/***********************************************************************
- *
- * Make device type atoms.
- *
- */
-
-static void
-MakeDeviceTypeAtoms(void)
-{
- int i;
-
- for (i = 0; i < NUMTYPES; i++)
- dev_type[i].type =
- MakeAtom(dev_type[i].name, strlen(dev_type[i].name), 1);
-}
-
-/*****************************************************************************
- *
- * SEventIDispatch
- *
- * Swap any events defined in this extension.
- */
-#define DO_SWAP(func,type) func ((type *)from, (type *)to)
-
-static void
-SEventIDispatch(xEvent * from, xEvent * to)
-{
- int type = from->u.u.type & 0177;
-
- if (type == DeviceValuator)
- DO_SWAP(SEventDeviceValuator, deviceValuator);
- else if (type == DeviceKeyPress) {
- SKeyButtonPtrEvent(from, to);
- to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
- } else if (type == DeviceKeyRelease) {
- SKeyButtonPtrEvent(from, to);
- to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
- } else if (type == DeviceButtonPress) {
- SKeyButtonPtrEvent(from, to);
- to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
- } else if (type == DeviceButtonRelease) {
- SKeyButtonPtrEvent(from, to);
- to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
- } else if (type == DeviceMotionNotify) {
- SKeyButtonPtrEvent(from, to);
- to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
- } else if (type == DeviceFocusIn)
- DO_SWAP(SEventFocus, deviceFocus);
- else if (type == DeviceFocusOut)
- DO_SWAP(SEventFocus, deviceFocus);
- else if (type == ProximityIn) {
- SKeyButtonPtrEvent(from, to);
- to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
- } else if (type == ProximityOut) {
- SKeyButtonPtrEvent(from, to);
- to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
- } else if (type == DeviceStateNotify)
- DO_SWAP(SDeviceStateNotifyEvent, deviceStateNotify);
- else if (type == DeviceKeyStateNotify)
- DO_SWAP(SDeviceKeyStateNotifyEvent, deviceKeyStateNotify);
- else if (type == DeviceButtonStateNotify)
- DO_SWAP(SDeviceButtonStateNotifyEvent, deviceButtonStateNotify);
- else if (type == DeviceMappingNotify)
- DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify);
- else if (type == ChangeDeviceNotify)
- DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify);
- else if (type == DevicePresenceNotify)
- DO_SWAP(SDevicePresenceNotifyEvent, devicePresenceNotify);
- else if (type == DevicePropertyNotify)
- DO_SWAP(SDevicePropertyNotifyEvent, devicePropertyNotify);
- else {
- FatalError("XInputExtension: Impossible event!\n");
- }
-}
-
-/**********************************************************************
- *
- * IExtensionInit - initialize the input extension.
- *
- * Called from InitExtensions in main() or from QueryExtension() if the
- * extension is dynamically loaded.
- *
- * This extension has several events and errors.
- *
- * XI is mandatory nowadays, so if we fail to init XI, we die.
- */
-
-void
-XInputExtensionInit(void)
-{
- ExtensionEntry *extEntry;
- XExtensionVersion thisversion = { XI_Present,
- SERVER_XI_MAJOR_VERSION,
- SERVER_XI_MINOR_VERSION,
- };
-
- if (!dixRegisterPrivateKey(&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec)))
- FatalError("Cannot request private for XI.\n");
-
- if (!AddCallback(&ClientStateCallback, XIClientCallback, 0))
- FatalError("Failed to add callback to XI.\n");
-
- extEntry = AddExtension(INAME, IEVENTS, IERRORS, ProcIDispatch,
- SProcIDispatch, IResetProc, StandardMinorOpcode);
- if (extEntry) {
- IReqCode = extEntry->base;
- IEventBase = extEntry->eventBase;
- XIVersion = thisversion;
- MakeDeviceTypeAtoms();
- RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone,
- "INPUTCLIENT");
- if (!RT_INPUTCLIENT)
- FatalError("Failed to add resource type for XI.\n");
- FixExtensionEvents(extEntry);
- ReplySwapVector[IReqCode] = (ReplySwapPtr) SReplyIDispatch;
- EventSwapVector[DeviceValuator] = SEventIDispatch;
- EventSwapVector[DeviceKeyPress] = SEventIDispatch;
- EventSwapVector[DeviceKeyRelease] = SEventIDispatch;
- EventSwapVector[DeviceButtonPress] = SEventIDispatch;
- EventSwapVector[DeviceButtonRelease] = SEventIDispatch;
- EventSwapVector[DeviceMotionNotify] = SEventIDispatch;
- EventSwapVector[DeviceFocusIn] = SEventIDispatch;
- EventSwapVector[DeviceFocusOut] = SEventIDispatch;
- EventSwapVector[ProximityIn] = SEventIDispatch;
- EventSwapVector[ProximityOut] = SEventIDispatch;
- EventSwapVector[DeviceStateNotify] = SEventIDispatch;
- EventSwapVector[DeviceKeyStateNotify] = SEventIDispatch;
- EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch;
- EventSwapVector[DeviceMappingNotify] = SEventIDispatch;
- EventSwapVector[ChangeDeviceNotify] = SEventIDispatch;
- EventSwapVector[DevicePresenceNotify] = SEventIDispatch;
-
- GERegisterExtension(IReqCode, XI2EventSwap);
-
-
- memset(&xi_all_devices, 0, sizeof(xi_all_devices));
- memset(&xi_all_master_devices, 0, sizeof(xi_all_master_devices));
- xi_all_devices.id = XIAllDevices;
- xi_all_devices.name = "XIAllDevices";
- xi_all_master_devices.id = XIAllMasterDevices;
- xi_all_master_devices.name = "XIAllMasterDevices";
-
- inputInfo.all_devices = &xi_all_devices;
- inputInfo.all_master_devices = &xi_all_master_devices;
-
- XIResetProperties();
- } else {
- FatalError("IExtensionInit: AddExtensions failed\n");
- }
-}
-
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Hewlett-Packard not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+/********************************************************************
+ *
+ * Dispatch routines and initialization routines for the X input extension.
+ *
+ */
+
+#define NUMTYPES 15
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "inputstr.h"
+#include "gcstruct.h" /* pointer for extnsionst.h */
+#include "extnsionst.h" /* extension entry */
+#include <X11/extensions/XI.h>
+#include <X11/extensions/XIproto.h>
+#include <X11/extensions/XI2proto.h>
+#include <X11/extensions/geproto.h>
+#include "geext.h" /* extension interfaces for ge */
+
+#include "dixevents.h"
+#include "exevents.h"
+#include "extinit.h"
+#include "exglobals.h"
+#include "swaprep.h"
+#include "privates.h"
+#include "protocol-versions.h"
+
+/* modules local to Xi */
+#include "allowev.h"
+#include "chgdctl.h"
+#include "chgfctl.h"
+#include "chgkbd.h"
+#include "chgprop.h"
+#include "chgptr.h"
+#include "closedev.h"
+#include "devbell.h"
+#include "getbmap.h"
+#include "getbmap.h"
+#include "getdctl.h"
+#include "getfctl.h"
+#include "getfocus.h"
+#include "getkmap.h"
+#include "getmmap.h"
+#include "getprop.h"
+#include "getselev.h"
+#include "getvers.h"
+#include "getvers.h"
+#include "grabdev.h"
+#include "grabdevb.h"
+#include "grabdevk.h"
+#include "gtmotion.h"
+#include "listdev.h"
+#include "opendev.h"
+#include "queryst.h"
+#include "selectev.h"
+#include "sendexev.h"
+#include "chgkmap.h"
+#include "setbmap.h"
+#include "setdval.h"
+#include "setfocus.h"
+#include "setmmap.h"
+#include "setmode.h"
+#include "ungrdev.h"
+#include "ungrdevb.h"
+#include "ungrdevk.h"
+#include "xiallowev.h"
+#include "xiselectev.h"
+#include "xigrabdev.h"
+#include "xipassivegrab.h"
+#include "xisetdevfocus.h"
+#include "xiproperty.h"
+#include "xichangecursor.h"
+#include "xichangehierarchy.h"
+#include "xigetclientpointer.h"
+#include "xiquerydevice.h"
+#include "xiquerypointer.h"
+#include "xiqueryversion.h"
+#include "xisetclientpointer.h"
+#include "xiwarppointer.h"
+
+
+/* Masks for XI events have to be aligned with core event (partially anyway).
+ * If DeviceButtonMotionMask is != ButtonMotionMask, event delivery
+ * breaks down. The device needs the dev->button->motionMask. If DBMM is
+ * the same as BMM, we can ensure that both core and device events can be
+ * delivered, without the need for extra structures in the DeviceIntRec. */
+const Mask DeviceKeyPressMask = KeyPressMask;
+const Mask DeviceKeyReleaseMask = KeyReleaseMask;
+const Mask DeviceButtonPressMask = ButtonPressMask;
+const Mask DeviceButtonReleaseMask = ButtonReleaseMask;
+const Mask DeviceProximityMask = (1L << 4);
+const Mask DeviceStateNotifyMask = (1L << 5);
+const Mask DevicePointerMotionMask = PointerMotionMask;
+const Mask DevicePointerMotionHintMask = PointerMotionHintMask;
+const Mask DeviceButton1MotionMask = Button1MotionMask;
+const Mask DeviceButton2MotionMask = Button2MotionMask;
+const Mask DeviceButton3MotionMask = Button3MotionMask;
+const Mask DeviceButton4MotionMask = Button4MotionMask;
+const Mask DeviceButton5MotionMask = Button5MotionMask;
+const Mask DeviceButtonMotionMask = ButtonMotionMask;
+const Mask DeviceFocusChangeMask = (1L << 14);
+const Mask DeviceMappingNotifyMask = (1L << 15);
+const Mask ChangeDeviceNotifyMask = (1L << 16);
+const Mask DeviceButtonGrabMask = (1L << 17);
+const Mask DeviceOwnerGrabButtonMask = (1L << 17);
+const Mask DevicePresenceNotifyMask = (1L << 18);
+const Mask DeviceEnterWindowMask = (1L << 18);
+const Mask DeviceLeaveWindowMask = (1L << 19);
+const Mask DevicePropertyNotifyMask = (1L << 20);
+const Mask XIAllMasks = (1L << 21) - 1;
+
+int ExtEventIndex;
+Mask ExtExclusiveMasks[EMASKSIZE];
+
+static struct dev_type
+{
+ Atom type;
+ char *name;
+} dev_type[] = {
+ {
+ 0, XI_KEYBOARD}, {
+ 0, XI_MOUSE}, {
+ 0, XI_TABLET}, {
+ 0, XI_TOUCHSCREEN}, {
+ 0, XI_TOUCHPAD}, {
+ 0, XI_BARCODE}, {
+ 0, XI_BUTTONBOX}, {
+ 0, XI_KNOB_BOX}, {
+ 0, XI_ONE_KNOB}, {
+ 0, XI_NINE_KNOB}, {
+ 0, XI_TRACKBALL}, {
+ 0, XI_QUADRATURE}, {
+ 0, XI_ID_MODULE}, {
+ 0, XI_SPACEBALL}, {
+ 0, XI_DATAGLOVE}, {
+ 0, XI_EYETRACKER}, {
+ 0, XI_CURSORKEYS}, {
+0, XI_FOOTMOUSE}};
+
+CARD8 event_base[numInputClasses];
+XExtEventInfo EventInfo[32];
+
+static DeviceIntRec xi_all_devices;
+static DeviceIntRec xi_all_master_devices;
+
+/**
+ * Dispatch vector. Functions defined in here will be called when the matching
+ * request arrives.
+ */
+static int (*ProcIVector[])(ClientPtr) = {
+ NULL, /* 0 */
+ ProcXGetExtensionVersion, /* 1 */
+ ProcXListInputDevices, /* 2 */
+ ProcXOpenDevice, /* 3 */
+ ProcXCloseDevice, /* 4 */
+ ProcXSetDeviceMode, /* 5 */
+ ProcXSelectExtensionEvent, /* 6 */
+ ProcXGetSelectedExtensionEvents, /* 7 */
+ ProcXChangeDeviceDontPropagateList, /* 8 */
+ ProcXGetDeviceDontPropagateList, /* 9 */
+ ProcXGetDeviceMotionEvents, /* 10 */
+ ProcXChangeKeyboardDevice, /* 11 */
+ ProcXChangePointerDevice, /* 12 */
+ ProcXGrabDevice, /* 13 */
+ ProcXUngrabDevice, /* 14 */
+ ProcXGrabDeviceKey, /* 15 */
+ ProcXUngrabDeviceKey, /* 16 */
+ ProcXGrabDeviceButton, /* 17 */
+ ProcXUngrabDeviceButton, /* 18 */
+ ProcXAllowDeviceEvents, /* 19 */
+ ProcXGetDeviceFocus, /* 20 */
+ ProcXSetDeviceFocus, /* 21 */
+ ProcXGetFeedbackControl, /* 22 */
+ ProcXChangeFeedbackControl, /* 23 */
+ ProcXGetDeviceKeyMapping, /* 24 */
+ ProcXChangeDeviceKeyMapping, /* 25 */
+ ProcXGetDeviceModifierMapping, /* 26 */
+ ProcXSetDeviceModifierMapping, /* 27 */
+ ProcXGetDeviceButtonMapping, /* 28 */
+ ProcXSetDeviceButtonMapping, /* 29 */
+ ProcXQueryDeviceState, /* 30 */
+ ProcXSendExtensionEvent, /* 31 */
+ ProcXDeviceBell, /* 32 */
+ ProcXSetDeviceValuators, /* 33 */
+ ProcXGetDeviceControl, /* 34 */
+ ProcXChangeDeviceControl, /* 35 */
+ /* XI 1.5 */
+ ProcXListDeviceProperties, /* 36 */
+ ProcXChangeDeviceProperty, /* 37 */
+ ProcXDeleteDeviceProperty, /* 38 */
+ ProcXGetDeviceProperty, /* 39 */
+ /* XI 2 */
+ ProcXIQueryPointer, /* 40 */
+ ProcXIWarpPointer, /* 41 */
+ ProcXIChangeCursor, /* 42 */
+ ProcXIChangeHierarchy, /* 43 */
+ ProcXISetClientPointer, /* 44 */
+ ProcXIGetClientPointer, /* 45 */
+ ProcXISelectEvents, /* 46 */
+ ProcXIQueryVersion, /* 47 */
+ ProcXIQueryDevice, /* 48 */
+ ProcXISetFocus, /* 49 */
+ ProcXIGetFocus, /* 50 */
+ ProcXIGrabDevice, /* 51 */
+ ProcXIUngrabDevice, /* 52 */
+ ProcXIAllowEvents, /* 53 */
+ ProcXIPassiveGrabDevice, /* 54 */
+ ProcXIPassiveUngrabDevice, /* 55 */
+ ProcXIListProperties, /* 56 */
+ ProcXIChangeProperty, /* 57 */
+ ProcXIDeleteProperty, /* 58 */
+ ProcXIGetProperty, /* 59 */
+ ProcXIGetSelectedEvents /* 60 */
+};
+
+/* For swapped clients */
+static int (*SProcIVector[])(ClientPtr) = {
+ NULL, /* 0 */
+ SProcXGetExtensionVersion, /* 1 */
+ SProcXListInputDevices, /* 2 */
+ SProcXOpenDevice, /* 3 */
+ SProcXCloseDevice, /* 4 */
+ SProcXSetDeviceMode, /* 5 */
+ SProcXSelectExtensionEvent, /* 6 */
+ SProcXGetSelectedExtensionEvents, /* 7 */
+ SProcXChangeDeviceDontPropagateList, /* 8 */
+ SProcXGetDeviceDontPropagateList, /* 9 */
+ SProcXGetDeviceMotionEvents, /* 10 */
+ SProcXChangeKeyboardDevice, /* 11 */
+ SProcXChangePointerDevice, /* 12 */
+ SProcXGrabDevice, /* 13 */
+ SProcXUngrabDevice, /* 14 */
+ SProcXGrabDeviceKey, /* 15 */
+ SProcXUngrabDeviceKey, /* 16 */
+ SProcXGrabDeviceButton, /* 17 */
+ SProcXUngrabDeviceButton, /* 18 */
+ SProcXAllowDeviceEvents, /* 19 */
+ SProcXGetDeviceFocus, /* 20 */
+ SProcXSetDeviceFocus, /* 21 */
+ SProcXGetFeedbackControl, /* 22 */
+ SProcXChangeFeedbackControl, /* 23 */
+ SProcXGetDeviceKeyMapping, /* 24 */
+ SProcXChangeDeviceKeyMapping, /* 25 */
+ SProcXGetDeviceModifierMapping, /* 26 */
+ SProcXSetDeviceModifierMapping, /* 27 */
+ SProcXGetDeviceButtonMapping, /* 28 */
+ SProcXSetDeviceButtonMapping, /* 29 */
+ SProcXQueryDeviceState, /* 30 */
+ SProcXSendExtensionEvent, /* 31 */
+ SProcXDeviceBell, /* 32 */
+ SProcXSetDeviceValuators, /* 33 */
+ SProcXGetDeviceControl, /* 34 */
+ SProcXChangeDeviceControl, /* 35 */
+ SProcXListDeviceProperties, /* 36 */
+ SProcXChangeDeviceProperty, /* 37 */
+ SProcXDeleteDeviceProperty, /* 38 */
+ SProcXGetDeviceProperty, /* 39 */
+ SProcXIQueryPointer, /* 40 */
+ SProcXIWarpPointer, /* 41 */
+ SProcXIChangeCursor, /* 42 */
+ SProcXIChangeHierarchy, /* 43 */
+ SProcXISetClientPointer, /* 44 */
+ SProcXIGetClientPointer, /* 45 */
+ SProcXISelectEvents, /* 46 */
+ SProcXIQueryVersion, /* 47 */
+ SProcXIQueryDevice, /* 48 */
+ SProcXISetFocus, /* 49 */
+ SProcXIGetFocus, /* 50 */
+ SProcXIGrabDevice, /* 51 */
+ SProcXIUngrabDevice, /* 52 */
+ SProcXIAllowEvents, /* 53 */
+ SProcXIPassiveGrabDevice, /* 54 */
+ SProcXIPassiveUngrabDevice, /* 55 */
+ SProcXIListProperties, /* 56 */
+ SProcXIChangeProperty, /* 57 */
+ SProcXIDeleteProperty, /* 58 */
+ SProcXIGetProperty, /* 59 */
+ SProcXIGetSelectedEvents /* 60 */
+};
+
+/*****************************************************************
+ *
+ * Globals referenced elsewhere in the server.
+ *
+ */
+
+int IReqCode = 0;
+int IEventBase = 0;
+int BadDevice = 0;
+static int BadEvent = 1;
+int BadMode = 2;
+int DeviceBusy = 3;
+int BadClass = 4;
+
+int DeviceValuator;
+int DeviceKeyPress;
+int DeviceKeyRelease;
+int DeviceButtonPress;
+int DeviceButtonRelease;
+int DeviceMotionNotify;
+int DeviceFocusIn;
+int DeviceFocusOut;
+int ProximityIn;
+int ProximityOut;
+int DeviceStateNotify;
+int DeviceKeyStateNotify;
+int DeviceButtonStateNotify;
+int DeviceMappingNotify;
+int ChangeDeviceNotify;
+int DevicePresenceNotify;
+int DevicePropertyNotify;
+
+RESTYPE RT_INPUTCLIENT;
+
+/*****************************************************************
+ *
+ * Externs defined elsewhere in the X server.
+ *
+ */
+
+extern XExtensionVersion XIVersion;
+
+
+Mask PropagateMask[MAXDEVICES];
+
+/*****************************************************************
+ *
+ * Versioning support
+ *
+ */
+
+DevPrivateKeyRec XIClientPrivateKeyRec;
+
+/*****************************************************************
+ *
+ * Declarations of local routines.
+ *
+ */
+
+static void
+XIClientCallback(CallbackListPtr *list,
+ pointer closure,
+ pointer data)
+{
+ NewClientInfoRec *clientinfo = (NewClientInfoRec*)data;
+ ClientPtr pClient = clientinfo->client;
+ XIClientPtr pXIClient;
+
+ pXIClient = dixLookupPrivate(&pClient->devPrivates, XIClientPrivateKey);
+ pXIClient->major_version = 0;
+ pXIClient->minor_version = 0;
+}
+
+/*************************************************************************
+ *
+ * ProcIDispatch - main dispatch routine for requests to this extension.
+ * This routine is used if server and client have the same byte ordering.
+ *
+ */
+
+static int
+ProcIDispatch(ClientPtr client)
+{
+ REQUEST(xReq);
+ if (stuff->data > (IREQUESTS + XI2REQUESTS) || !ProcIVector[stuff->data])
+ return BadRequest;
+
+ return (*ProcIVector[stuff->data])(client);
+}
+
+/*******************************************************************************
+ *
+ * SProcXDispatch
+ *
+ * Main swapped dispatch routine for requests to this extension.
+ * This routine is used if server and client do not have the same byte ordering.
+ *
+ */
+
+static int
+SProcIDispatch(ClientPtr client)
+{
+ REQUEST(xReq);
+ if (stuff->data > IREQUESTS || !SProcIVector[stuff->data])
+ return BadRequest;
+
+ return (*SProcIVector[stuff->data])(client);
+}
+
+/**********************************************************************
+ *
+ * SReplyIDispatch
+ * Swap any replies defined in this extension.
+ *
+ */
+
+static void
+SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
+ /* All we look at is the type field */
+{ /* This is common to all replies */
+ if (rep->RepType == X_GetExtensionVersion)
+ SRepXGetExtensionVersion(client, len,
+ (xGetExtensionVersionReply *) rep);
+ else if (rep->RepType == X_ListInputDevices)
+ SRepXListInputDevices(client, len, (xListInputDevicesReply *) rep);
+ else if (rep->RepType == X_OpenDevice)
+ SRepXOpenDevice(client, len, (xOpenDeviceReply *) rep);
+ else if (rep->RepType == X_SetDeviceMode)
+ SRepXSetDeviceMode(client, len, (xSetDeviceModeReply *) rep);
+ else if (rep->RepType == X_GetSelectedExtensionEvents)
+ SRepXGetSelectedExtensionEvents(client, len,
+ (xGetSelectedExtensionEventsReply *)
+ rep);
+ else if (rep->RepType == X_GetDeviceDontPropagateList)
+ SRepXGetDeviceDontPropagateList(client, len,
+ (xGetDeviceDontPropagateListReply *)
+ rep);
+ else if (rep->RepType == X_GetDeviceMotionEvents)
+ SRepXGetDeviceMotionEvents(client, len,
+ (xGetDeviceMotionEventsReply *) rep);
+ else if (rep->RepType == X_GrabDevice)
+ SRepXGrabDevice(client, len, (xGrabDeviceReply *) rep);
+ else if (rep->RepType == X_GetDeviceFocus)
+ SRepXGetDeviceFocus(client, len, (xGetDeviceFocusReply *) rep);
+ else if (rep->RepType == X_GetFeedbackControl)
+ SRepXGetFeedbackControl(client, len, (xGetFeedbackControlReply *) rep);
+ else if (rep->RepType == X_GetDeviceKeyMapping)
+ SRepXGetDeviceKeyMapping(client, len,
+ (xGetDeviceKeyMappingReply *) rep);
+ else if (rep->RepType == X_GetDeviceModifierMapping)
+ SRepXGetDeviceModifierMapping(client, len,
+ (xGetDeviceModifierMappingReply *) rep);
+ else if (rep->RepType == X_SetDeviceModifierMapping)
+ SRepXSetDeviceModifierMapping(client, len,
+ (xSetDeviceModifierMappingReply *) rep);
+ else if (rep->RepType == X_GetDeviceButtonMapping)
+ SRepXGetDeviceButtonMapping(client, len,
+ (xGetDeviceButtonMappingReply *) rep);
+ else if (rep->RepType == X_SetDeviceButtonMapping)
+ SRepXSetDeviceButtonMapping(client, len,
+ (xSetDeviceButtonMappingReply *) rep);
+ else if (rep->RepType == X_QueryDeviceState)
+ SRepXQueryDeviceState(client, len, (xQueryDeviceStateReply *) rep);
+ else if (rep->RepType == X_SetDeviceValuators)
+ SRepXSetDeviceValuators(client, len, (xSetDeviceValuatorsReply *) rep);
+ else if (rep->RepType == X_GetDeviceControl)
+ SRepXGetDeviceControl(client, len, (xGetDeviceControlReply *) rep);
+ else if (rep->RepType == X_ChangeDeviceControl)
+ SRepXChangeDeviceControl(client, len,
+ (xChangeDeviceControlReply *) rep);
+ else if (rep->RepType == X_ListDeviceProperties)
+ SRepXListDeviceProperties(client, len, (xListDevicePropertiesReply*)rep);
+ else if (rep->RepType == X_GetDeviceProperty)
+ SRepXGetDeviceProperty(client, len, (xGetDevicePropertyReply *) rep);
+ else if (rep->RepType == X_XIQueryPointer)
+ SRepXIQueryPointer(client, len, (xXIQueryPointerReply *) rep);
+ else if (rep->RepType == X_XIGetClientPointer)
+ SRepXIGetClientPointer(client, len, (xXIGetClientPointerReply*) rep);
+ else if (rep->RepType == X_XIQueryVersion)
+ SRepXIQueryVersion(client, len, (xXIQueryVersionReply*)rep);
+ else if (rep->RepType == X_XIQueryDevice)
+ SRepXIQueryDevice(client, len, (xXIQueryDeviceReply*)rep);
+ else if (rep->RepType == X_XIGrabDevice)
+ SRepXIGrabDevice(client, len, (xXIGrabDeviceReply *) rep);
+ else if (rep->RepType == X_XIGrabDevice)
+ SRepXIPassiveGrabDevice(client, len, (xXIPassiveGrabDeviceReply *) rep);
+ else if (rep->RepType == X_XIListProperties)
+ SRepXIListProperties(client, len, (xXIListPropertiesReply *) rep);
+ else if (rep->RepType == X_XIGetProperty)
+ SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep);
+ else if (rep->RepType == X_XIGetSelectedEvents)
+ SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep);
+ else if (rep->RepType == X_XIGetFocus)
+ SRepXIGetFocus(client, len, (xXIGetFocusReply *) rep);
+ else {
+ FatalError("XINPUT confused sending swapped reply");
+ }
+}
+
+/************************************************************************
+ *
+ * This function swaps the DeviceValuator event.
+ *
+ */
+
+static void
+SEventDeviceValuator(deviceValuator * from, deviceValuator * to)
+{
+ char n;
+ int i;
+ INT32 *ip B32;
+
+ *to = *from;
+ swaps(&to->sequenceNumber, n);
+ swaps(&to->device_state, n);
+ ip = &to->valuator0;
+ for (i = 0; i < 6; i++) {
+ swapl((ip + i), n); /* macro - braces are required */
+ }
+}
+
+static void
+SEventFocus(deviceFocus * from, deviceFocus * to)
+{
+ char n;
+
+ *to = *from;
+ swaps(&to->sequenceNumber, n);
+ swapl(&to->time, n);
+ swapl(&to->window, n);
+}
+
+static void
+SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to)
+{
+ int i;
+ char n;
+ INT32 *ip B32;
+
+ *to = *from;
+ swaps(&to->sequenceNumber, n);
+ swapl(&to->time, n);
+ ip = &to->valuator0;
+ for (i = 0; i < 3; i++) {
+ swapl((ip + i), n); /* macro - braces are required */
+ }
+}
+
+static void
+SDeviceKeyStateNotifyEvent(deviceKeyStateNotify * from,
+ deviceKeyStateNotify * to)
+{
+ char n;
+
+ *to = *from;
+ swaps(&to->sequenceNumber, n);
+}
+
+static void
+SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from,
+ deviceButtonStateNotify * to)
+{
+ char n;
+
+ *to = *from;
+ swaps(&to->sequenceNumber, n);
+}
+
+static void
+SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to)
+{
+ char n;
+
+ *to = *from;
+ swaps(&to->sequenceNumber, n);
+ swapl(&to->time, n);
+}
+
+static void
+SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to)
+{
+ char n;
+
+ *to = *from;
+ swaps(&to->sequenceNumber, n);
+ swapl(&to->time, n);
+}
+
+static void
+SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to)
+{
+ char n;
+
+ *to = *from;
+ swaps(&to->sequenceNumber,n);
+ swapl(&to->time, n);
+ swaps(&to->control, n);
+}
+
+static void
+SDevicePropertyNotifyEvent (devicePropertyNotify *from, devicePropertyNotify *to)
+{
+ char n;
+
+ *to = *from;
+ swaps(&to->sequenceNumber,n);
+ swapl(&to->time, n);
+ swapl(&to->atom, n);
+}
+
+static void
+SDeviceLeaveNotifyEvent (xXILeaveEvent *from, xXILeaveEvent *to)
+{
+ char n;
+
+ *to = *from;
+ swaps(&to->sequenceNumber,n);
+ swapl(&to->length, n);
+ swaps(&to->evtype, n);
+ swaps(&to->deviceid, n);
+ swapl(&to->time, n);
+ swapl(&to->root, n);
+ swapl(&to->event, n);
+ swapl(&to->child, n);
+ swapl(&to->root_x, n);
+ swapl(&to->root_y, n);
+ swapl(&to->event_x, n);
+ swapl(&to->event_y, n);
+ swaps(&to->sourceid, n);
+ swaps(&to->buttons_len, n);
+ swapl(&to->mods.base_mods, n);
+ swapl(&to->mods.latched_mods, n);
+ swapl(&to->mods.locked_mods, n);
+}
+
+static void
+SDeviceChangedEvent(xXIDeviceChangedEvent* from, xXIDeviceChangedEvent* to)
+{
+ char n;
+ int i, j;
+ xXIAnyInfo *any;
+
+ *to = *from;
+ memcpy(&to[1], &from[1], from->length * 4);
+
+ any = (xXIAnyInfo*)&to[1];
+ for (i = 0; i < to->num_classes; i++)
+ {
+ int length = any->length;
+
+ switch(any->type)
+ {
+ case KeyClass:
+ {
+ xXIKeyInfo *ki = (xXIKeyInfo*)any;
+ uint32_t *key = (uint32_t*)&ki[1];
+ for (j = 0; j < ki->num_keycodes; j++, key++)
+ swapl(key, n);
+ swaps(&ki->num_keycodes, n);
+ }
+ break;
+ case ButtonClass:
+ {
+ xXIButtonInfo *bi = (xXIButtonInfo*)any;
+ Atom *labels = (Atom*)((char*)bi + sizeof(xXIButtonInfo) +
+ pad_to_int32(bits_to_bytes(bi->num_buttons)));
+ for (j = 0; j < bi->num_buttons; j++)
+ swapl(&labels[j], n);
+ swaps(&bi->num_buttons, n);
+ }
+ break;
+ case ValuatorClass:
+ {
+ xXIValuatorInfo* ai = (xXIValuatorInfo*)any;
+ swapl(&ai->label, n);
+ swapl(&ai->min.integral, n);
+ swapl(&ai->min.frac, n);
+ swapl(&ai->max.integral, n);
+ swapl(&ai->max.frac, n);
+ swapl(&ai->resolution, n);
+ swaps(&ai->number, n);
+ }
+ break;
+ }
+
+ swaps(&any->type, n);
+ swaps(&any->length, n);
+ swaps(&any->sourceid, n);
+
+ any = (xXIAnyInfo*)((char*)any + length * 4);
+ }
+
+ swaps(&to->sequenceNumber, n);
+ swapl(&to->length, n);
+ swaps(&to->evtype, n);
+ swaps(&to->deviceid, n);
+ swapl(&to->time, n);
+ swaps(&to->num_classes, n);
+ swaps(&to->sourceid, n);
+
+}
+
+static void SDeviceEvent(xXIDeviceEvent *from, xXIDeviceEvent *to)
+{
+ int i;
+ char n;
+ char *ptr;
+ char *vmask;
+
+ memcpy(to, from, sizeof(xEvent) + from->length * 4);
+
+ swaps(&to->sequenceNumber, n);
+ swapl(&to->length, n);
+ swaps(&to->evtype, n);
+ swaps(&to->deviceid, n);
+ swapl(&to->time, n);
+ swapl(&to->detail, n);
+ swapl(&to->root, n);
+ swapl(&to->event, n);
+ swapl(&to->child, n);
+ swapl(&to->root_x, n);
+ swapl(&to->root_y, n);
+ swapl(&to->event_x, n);
+ swapl(&to->event_y, n);
+ swaps(&to->buttons_len, n);
+ swaps(&to->valuators_len, n);
+ swaps(&to->sourceid, n);
+ swapl(&to->mods.base_mods, n);
+ swapl(&to->mods.latched_mods, n);
+ swapl(&to->mods.locked_mods, n);
+ swapl(&to->mods.effective_mods, n);
+ swapl(&to->flags, n);
+
+ ptr = (char*)(&to[1]);
+ ptr += from->buttons_len * 4;
+ vmask = ptr; /* valuator mask */
+ ptr += from->valuators_len * 4;
+ for (i = 0; i < from->valuators_len * 32; i++)
+ {
+ if (BitIsOn(vmask, i))
+ {
+ swapl(((uint32_t*)ptr), n);
+ ptr += 4;
+ swapl(((uint32_t*)ptr), n);
+ ptr += 4;
+ }
+ }
+}
+
+static void SDeviceHierarchyEvent(xXIHierarchyEvent *from,
+ xXIHierarchyEvent *to)
+{
+ int i;
+ char n;
+ xXIHierarchyInfo *info;
+
+ *to = *from;
+ memcpy(&to[1], &from[1], from->length * 4);
+ swaps(&to->sequenceNumber, n);
+ swapl(&to->length, n);
+ swaps(&to->evtype, n);
+ swaps(&to->deviceid, n);
+ swapl(&to->time, n);
+ swapl(&to->flags, n);
+ swaps(&to->num_info, n);
+
+ info = (xXIHierarchyInfo*)&to[1];
+ for (i = 0; i< from->num_info; i++)
+ {
+ swaps(&info->deviceid, n);
+ swaps(&info->attachment, n);
+ info++;
+ }
+}
+
+static void SXIPropertyEvent(xXIPropertyEvent *from, xXIPropertyEvent *to)
+{
+ char n;
+
+ *to = *from;
+ swaps(&to->sequenceNumber, n);
+ swapl(&to->length, n);
+ swaps(&to->evtype, n);
+ swaps(&to->deviceid, n);
+ swapl(&to->property, n);
+}
+
+static void SRawEvent(xXIRawEvent *from, xXIRawEvent *to)
+{
+ char n;
+ int i;
+ FP3232 *values;
+ unsigned char *mask;
+
+ memcpy(to, from, sizeof(xEvent) + from->length * 4);
+
+ swaps(&to->sequenceNumber, n);
+ swapl(&to->length, n);
+ swaps(&to->evtype, n);
+ swaps(&to->deviceid, n);
+ swapl(&to->time, n);
+ swapl(&to->detail, n);
+
+
+ mask = (unsigned char*)&to[1];
+ values = (FP3232*)(mask + from->valuators_len * 4);
+
+ for (i = 0; i < from->valuators_len * 4 * 8; i++)
+ {
+ if (BitIsOn(mask, i))
+ {
+ /* for each bit set there are two FP3232 values on the wire, in
+ * the order abcABC for data and data_raw. Here we swap as if
+ * they were in aAbBcC order because it's easier and really
+ * doesn't matter.
+ */
+ swapl(&values->integral, n);
+ swapl(&values->frac, n);
+ values++;
+ swapl(&values->integral, n);
+ swapl(&values->frac, n);
+ values++;
+ }
+ }
+
+ swaps(&to->valuators_len, n);
+}
+
+
+/** Event swapping function for XI2 events. */
+void
+XI2EventSwap(xGenericEvent *from, xGenericEvent *to)
+{
+ switch(from->evtype)
+ {
+ case XI_Enter:
+ case XI_Leave:
+ SDeviceLeaveNotifyEvent((xXILeaveEvent*)from, (xXILeaveEvent*)to);
+ break;
+ case XI_DeviceChanged:
+ SDeviceChangedEvent((xXIDeviceChangedEvent*)from,
+ (xXIDeviceChangedEvent*)to);
+ break;
+ case XI_HierarchyChanged:
+ SDeviceHierarchyEvent((xXIHierarchyEvent*)from, (xXIHierarchyEvent*)to);
+ break;
+ case XI_PropertyEvent:
+ SXIPropertyEvent((xXIPropertyEvent*)from,
+ (xXIPropertyEvent*)to);
+ break;
+ case XI_Motion:
+ case XI_KeyPress:
+ case XI_KeyRelease:
+ case XI_ButtonPress:
+ case XI_ButtonRelease:
+ SDeviceEvent((xXIDeviceEvent*)from, (xXIDeviceEvent*)to);
+ break;
+ case XI_RawMotion:
+ case XI_RawKeyPress:
+ case XI_RawKeyRelease:
+ case XI_RawButtonPress:
+ case XI_RawButtonRelease:
+ SRawEvent((xXIRawEvent*)from, (xXIRawEvent*)to);
+ break;
+ default:
+ ErrorF("[Xi] Unknown event type to swap. This is a bug.\n");
+ break;
+ }
+}
+
+/**************************************************************************
+ *
+ * Allow the specified event to have its propagation suppressed.
+ * The default is to not allow suppression of propagation.
+ *
+ */
+
+static void
+AllowPropagateSuppress(Mask mask)
+{
+ int i;
+
+ for (i = 0; i < MAXDEVICES; i++)
+ PropagateMask[i] |= mask;
+}
+
+/**************************************************************************
+ *
+ * Record an event mask where there is no unique corresponding event type.
+ * We can't call SetMaskForEvent, since that would clobber the existing
+ * mask for that event. MotionHint and ButtonMotion are examples.
+ *
+ * Since extension event types will never be less than 64, we can use
+ * 0-63 in the EventInfo array as the "type" to be used to look up this
+ * mask. This means that the corresponding macros such as
+ * DevicePointerMotionHint must have access to the same constants.
+ *
+ */
+
+static void
+SetEventInfo(Mask mask, int constant)
+{
+ EventInfo[ExtEventIndex].mask = mask;
+ EventInfo[ExtEventIndex++].type = constant;
+}
+
+/**************************************************************************
+ *
+ * Allow the specified event to be restricted to being selected by one
+ * client at a time.
+ * The default is to allow more than one client to select the event.
+ *
+ */
+
+static void
+SetExclusiveAccess(Mask mask)
+{
+ int i;
+
+ for (i = 0; i < MAXDEVICES; i++)
+ ExtExclusiveMasks[i] |= mask;
+}
+
+/**************************************************************************
+ *
+ * Assign the specified mask to the specified event.
+ *
+ */
+
+static void
+SetMaskForExtEvent(Mask mask, int event)
+{
+ int i;
+
+ EventInfo[ExtEventIndex].mask = mask;
+ EventInfo[ExtEventIndex++].type = event;
+
+ if ((event < LASTEvent) || (event >= 128))
+ FatalError("MaskForExtensionEvent: bogus event number");
+
+ for (i = 0; i < MAXDEVICES; i++)
+ SetMaskForEvent(i, mask, event);
+}
+
+/************************************************************************
+ *
+ * This function sets up extension event types and masks.
+ *
+ */
+
+static void
+FixExtensionEvents(ExtensionEntry * extEntry)
+{
+ DeviceValuator = extEntry->eventBase;
+ DeviceKeyPress = DeviceValuator + 1;
+ DeviceKeyRelease = DeviceKeyPress + 1;
+ DeviceButtonPress = DeviceKeyRelease + 1;
+ DeviceButtonRelease = DeviceButtonPress + 1;
+ DeviceMotionNotify = DeviceButtonRelease + 1;
+ DeviceFocusIn = DeviceMotionNotify + 1;
+ DeviceFocusOut = DeviceFocusIn + 1;
+ ProximityIn = DeviceFocusOut + 1;
+ ProximityOut = ProximityIn + 1;
+ DeviceStateNotify = ProximityOut + 1;
+ DeviceMappingNotify = DeviceStateNotify + 1;
+ ChangeDeviceNotify = DeviceMappingNotify + 1;
+ DeviceKeyStateNotify = ChangeDeviceNotify + 1;
+ DeviceButtonStateNotify = DeviceKeyStateNotify + 1;
+ DevicePresenceNotify = DeviceButtonStateNotify + 1;
+ DevicePropertyNotify = DevicePresenceNotify + 1;
+
+ event_base[KeyClass] = DeviceKeyPress;
+ event_base[ButtonClass] = DeviceButtonPress;
+ event_base[ValuatorClass] = DeviceMotionNotify;
+ event_base[ProximityClass] = ProximityIn;
+ event_base[FocusClass] = DeviceFocusIn;
+ event_base[OtherClass] = DeviceStateNotify;
+
+ BadDevice += extEntry->errorBase;
+ BadEvent += extEntry->errorBase;
+ BadMode += extEntry->errorBase;
+ DeviceBusy += extEntry->errorBase;
+ BadClass += extEntry->errorBase;
+
+ SetMaskForExtEvent(DeviceKeyPressMask, DeviceKeyPress);
+ AllowPropagateSuppress(DeviceKeyPressMask);
+ SetCriticalEvent(DeviceKeyPress);
+
+ SetMaskForExtEvent(DeviceKeyReleaseMask, DeviceKeyRelease);
+ AllowPropagateSuppress(DeviceKeyReleaseMask);
+ SetCriticalEvent(DeviceKeyRelease);
+
+ SetMaskForExtEvent(DeviceButtonPressMask, DeviceButtonPress);
+ AllowPropagateSuppress(DeviceButtonPressMask);
+ SetCriticalEvent(DeviceButtonPress);
+
+ SetMaskForExtEvent(DeviceButtonReleaseMask, DeviceButtonRelease);
+ AllowPropagateSuppress(DeviceButtonReleaseMask);
+ SetCriticalEvent(DeviceButtonRelease);
+
+ SetMaskForExtEvent(DeviceProximityMask, ProximityIn);
+ SetMaskForExtEvent(DeviceProximityMask, ProximityOut);
+
+ SetMaskForExtEvent(DeviceStateNotifyMask, DeviceStateNotify);
+
+ SetMaskForExtEvent(DevicePointerMotionMask, DeviceMotionNotify);
+ AllowPropagateSuppress(DevicePointerMotionMask);
+ SetCriticalEvent(DeviceMotionNotify);
+
+ SetEventInfo(DevicePointerMotionHintMask, _devicePointerMotionHint);
+ SetEventInfo(DeviceButton1MotionMask, _deviceButton1Motion);
+ SetEventInfo(DeviceButton2MotionMask, _deviceButton2Motion);
+ SetEventInfo(DeviceButton3MotionMask, _deviceButton3Motion);
+ SetEventInfo(DeviceButton4MotionMask, _deviceButton4Motion);
+ SetEventInfo(DeviceButton5MotionMask, _deviceButton5Motion);
+ SetEventInfo(DeviceButtonMotionMask, _deviceButtonMotion);
+
+ SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusIn);
+ SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusOut);
+
+ SetMaskForExtEvent(DeviceMappingNotifyMask, DeviceMappingNotify);
+ SetMaskForExtEvent(ChangeDeviceNotifyMask, ChangeDeviceNotify);
+
+ SetEventInfo(DeviceButtonGrabMask, _deviceButtonGrab);
+ SetExclusiveAccess(DeviceButtonGrabMask);
+
+ SetEventInfo(DeviceOwnerGrabButtonMask, _deviceOwnerGrabButton);
+ SetEventInfo(DevicePresenceNotifyMask, _devicePresence);
+ SetMaskForExtEvent(DevicePropertyNotifyMask, DevicePropertyNotify);
+
+ SetEventInfo(0, _noExtensionEvent);
+}
+
+/************************************************************************
+ *
+ * This function restores extension event types and masks to their
+ * initial state.
+ *
+ */
+
+static void
+RestoreExtensionEvents(void)
+{
+ int i, j;
+
+ IReqCode = 0;
+ IEventBase = 0;
+
+ for (i = 0; i < ExtEventIndex - 1; i++) {
+ if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128))
+ {
+ for (j = 0; j < MAXDEVICES; j++)
+ SetMaskForEvent(j, 0, EventInfo[i].type);
+ }
+ EventInfo[i].mask = 0;
+ EventInfo[i].type = 0;
+ }
+ ExtEventIndex = 0;
+ DeviceValuator = 0;
+ DeviceKeyPress = 1;
+ DeviceKeyRelease = 2;
+ DeviceButtonPress = 3;
+ DeviceButtonRelease = 4;
+ DeviceMotionNotify = 5;
+ DeviceFocusIn = 6;
+ DeviceFocusOut = 7;
+ ProximityIn = 8;
+ ProximityOut = 9;
+ DeviceStateNotify = 10;
+ DeviceMappingNotify = 11;
+ ChangeDeviceNotify = 12;
+ DeviceKeyStateNotify = 13;
+ DeviceButtonStateNotify = 13;
+ DevicePresenceNotify = 14;
+ DevicePropertyNotify = 15;
+
+ BadDevice = 0;
+ BadEvent = 1;
+ BadMode = 2;
+ DeviceBusy = 3;
+ BadClass = 4;
+
+}
+
+/***********************************************************************
+ *
+ * IResetProc.
+ * Remove reply-swapping routine.
+ * Remove event-swapping routine.
+ *
+ */
+
+static void
+IResetProc(ExtensionEntry * unused)
+{
+ ReplySwapVector[IReqCode] = ReplyNotSwappd;
+ EventSwapVector[DeviceValuator] = NotImplemented;
+ EventSwapVector[DeviceKeyPress] = NotImplemented;
+ EventSwapVector[DeviceKeyRelease] = NotImplemented;
+ EventSwapVector[DeviceButtonPress] = NotImplemented;
+ EventSwapVector[DeviceButtonRelease] = NotImplemented;
+ EventSwapVector[DeviceMotionNotify] = NotImplemented;
+ EventSwapVector[DeviceFocusIn] = NotImplemented;
+ EventSwapVector[DeviceFocusOut] = NotImplemented;
+ EventSwapVector[ProximityIn] = NotImplemented;
+ EventSwapVector[ProximityOut] = NotImplemented;
+ EventSwapVector[DeviceStateNotify] = NotImplemented;
+ EventSwapVector[DeviceKeyStateNotify] = NotImplemented;
+ EventSwapVector[DeviceButtonStateNotify] = NotImplemented;
+ EventSwapVector[DeviceMappingNotify] = NotImplemented;
+ EventSwapVector[ChangeDeviceNotify] = NotImplemented;
+ EventSwapVector[DevicePresenceNotify] = NotImplemented;
+ EventSwapVector[DevicePropertyNotify] = NotImplemented;
+ RestoreExtensionEvents();
+}
+
+
+/***********************************************************************
+ *
+ * Assign an id and type to an input device.
+ *
+ */
+
+void
+AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name)
+{
+ dev->xinput_type = type;
+ dev->name = strdup(name);
+}
+
+/***********************************************************************
+ *
+ * Make device type atoms.
+ *
+ */
+
+static void
+MakeDeviceTypeAtoms(void)
+{
+ int i;
+
+ for (i = 0; i < NUMTYPES; i++)
+ dev_type[i].type =
+ MakeAtom(dev_type[i].name, strlen(dev_type[i].name), 1);
+}
+
+/*****************************************************************************
+ *
+ * SEventIDispatch
+ *
+ * Swap any events defined in this extension.
+ */
+#define DO_SWAP(func,type) func ((type *)from, (type *)to)
+
+static void
+SEventIDispatch(xEvent * from, xEvent * to)
+{
+ int type = from->u.u.type & 0177;
+
+ if (type == DeviceValuator)
+ DO_SWAP(SEventDeviceValuator, deviceValuator);
+ else if (type == DeviceKeyPress) {
+ SKeyButtonPtrEvent(from, to);
+ to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
+ } else if (type == DeviceKeyRelease) {
+ SKeyButtonPtrEvent(from, to);
+ to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
+ } else if (type == DeviceButtonPress) {
+ SKeyButtonPtrEvent(from, to);
+ to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
+ } else if (type == DeviceButtonRelease) {
+ SKeyButtonPtrEvent(from, to);
+ to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
+ } else if (type == DeviceMotionNotify) {
+ SKeyButtonPtrEvent(from, to);
+ to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
+ } else if (type == DeviceFocusIn)
+ DO_SWAP(SEventFocus, deviceFocus);
+ else if (type == DeviceFocusOut)
+ DO_SWAP(SEventFocus, deviceFocus);
+ else if (type == ProximityIn) {
+ SKeyButtonPtrEvent(from, to);
+ to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
+ } else if (type == ProximityOut) {
+ SKeyButtonPtrEvent(from, to);
+ to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
+ } else if (type == DeviceStateNotify)
+ DO_SWAP(SDeviceStateNotifyEvent, deviceStateNotify);
+ else if (type == DeviceKeyStateNotify)
+ DO_SWAP(SDeviceKeyStateNotifyEvent, deviceKeyStateNotify);
+ else if (type == DeviceButtonStateNotify)
+ DO_SWAP(SDeviceButtonStateNotifyEvent, deviceButtonStateNotify);
+ else if (type == DeviceMappingNotify)
+ DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify);
+ else if (type == ChangeDeviceNotify)
+ DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify);
+ else if (type == DevicePresenceNotify)
+ DO_SWAP(SDevicePresenceNotifyEvent, devicePresenceNotify);
+ else if (type == DevicePropertyNotify)
+ DO_SWAP(SDevicePropertyNotifyEvent, devicePropertyNotify);
+ else {
+ FatalError("XInputExtension: Impossible event!\n");
+ }
+}
+
+/**********************************************************************
+ *
+ * IExtensionInit - initialize the input extension.
+ *
+ * Called from InitExtensions in main() or from QueryExtension() if the
+ * extension is dynamically loaded.
+ *
+ * This extension has several events and errors.
+ *
+ * XI is mandatory nowadays, so if we fail to init XI, we die.
+ */
+
+void
+XInputExtensionInit(void)
+{
+ ExtensionEntry *extEntry;
+ XExtensionVersion thisversion = { XI_Present,
+ SERVER_XI_MAJOR_VERSION,
+ SERVER_XI_MINOR_VERSION,
+ };
+
+ if (!dixRegisterPrivateKey(&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec)))
+ FatalError("Cannot request private for XI.\n");
+
+ if (!AddCallback(&ClientStateCallback, XIClientCallback, 0))
+ FatalError("Failed to add callback to XI.\n");
+
+ extEntry = AddExtension(INAME, IEVENTS, IERRORS, ProcIDispatch,
+ SProcIDispatch, IResetProc, StandardMinorOpcode);
+ if (extEntry) {
+ IReqCode = extEntry->base;
+ IEventBase = extEntry->eventBase;
+ XIVersion = thisversion;
+ MakeDeviceTypeAtoms();
+ RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone,
+ "INPUTCLIENT");
+ if (!RT_INPUTCLIENT)
+ FatalError("Failed to add resource type for XI.\n");
+ FixExtensionEvents(extEntry);
+ ReplySwapVector[IReqCode] = (ReplySwapPtr) SReplyIDispatch;
+ EventSwapVector[DeviceValuator] = SEventIDispatch;
+ EventSwapVector[DeviceKeyPress] = SEventIDispatch;
+ EventSwapVector[DeviceKeyRelease] = SEventIDispatch;
+ EventSwapVector[DeviceButtonPress] = SEventIDispatch;
+ EventSwapVector[DeviceButtonRelease] = SEventIDispatch;
+ EventSwapVector[DeviceMotionNotify] = SEventIDispatch;
+ EventSwapVector[DeviceFocusIn] = SEventIDispatch;
+ EventSwapVector[DeviceFocusOut] = SEventIDispatch;
+ EventSwapVector[ProximityIn] = SEventIDispatch;
+ EventSwapVector[ProximityOut] = SEventIDispatch;
+ EventSwapVector[DeviceStateNotify] = SEventIDispatch;
+ EventSwapVector[DeviceKeyStateNotify] = SEventIDispatch;
+ EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch;
+ EventSwapVector[DeviceMappingNotify] = SEventIDispatch;
+ EventSwapVector[ChangeDeviceNotify] = SEventIDispatch;
+ EventSwapVector[DevicePresenceNotify] = SEventIDispatch;
+
+ GERegisterExtension(IReqCode, XI2EventSwap);
+
+
+ memset(&xi_all_devices, 0, sizeof(xi_all_devices));
+ memset(&xi_all_master_devices, 0, sizeof(xi_all_master_devices));
+ xi_all_devices.id = XIAllDevices;
+ xi_all_devices.name = "XIAllDevices";
+ xi_all_master_devices.id = XIAllMasterDevices;
+ xi_all_master_devices.name = "XIAllMasterDevices";
+
+ inputInfo.all_devices = &xi_all_devices;
+ inputInfo.all_master_devices = &xi_all_master_devices;
+
+ XIResetProperties();
+ } else {
+ FatalError("IExtensionInit: AddExtensions failed\n");
+ }
+}
+
diff --git a/xorg-server/Xi/makefile b/xorg-server/Xi/makefile
new file mode 100644
index 000000000..a466c84f0
--- /dev/null
+++ b/xorg-server/Xi/makefile
@@ -0,0 +1,55 @@
+CSRCS=allowev.c \
+ chgdctl.c \
+ chgfctl.c \
+ chgkbd.c \
+ chgkmap.c \
+ chgprop.c \
+ chgptr.c \
+ closedev.c \
+ devbell.c \
+ exevents.c \
+ extinit.c \
+ getbmap.c \
+ getdctl.c \
+ getfctl.c \
+ getfocus.c \
+ getkmap.c \
+ getmmap.c \
+ getprop.c \
+ getselev.c \
+ getvers.c \
+ grabdev.c \
+ grabdevb.c \
+ grabdevk.c \
+ gtmotion.c \
+ listdev.c \
+ opendev.c \
+ queryst.c \
+ selectev.c \
+ sendexev.c \
+ setbmap.c \
+ setdval.c \
+ setfocus.c \
+ setmmap.c \
+ setmode.c \
+ ungrdev.c \
+ ungrdevb.c \
+ ungrdevk.c \
+ xiallowev.c \
+ xichangecursor.c \
+ xichangehierarchy.c \
+ xigetclientpointer.c \
+ xigrabdev.c \
+ xipassivegrab.c \
+ xiproperty.c \
+ xiquerydevice.c \
+ xiquerypointer.c \
+ xiqueryversion.c \
+ xiselectev.c \
+ xisetclientpointer.c \
+ xisetdevfocus.c \
+ xiwarppointer.c \
+ stubs.c
+
+LIBRARY=libXi
+
diff --git a/xorg-server/Xi/opendev.c b/xorg-server/Xi/opendev.c
index 273cb2404..23a3a1b5b 100644
--- a/xorg-server/Xi/opendev.c
+++ b/xorg-server/Xi/opendev.c
@@ -115,9 +115,6 @@ ProcXOpenDevice(ClientPtr client)
if (IsMaster(dev))
return BadDevice;
- if (status != Success)
- return status;
-
memset(&rep, 0, sizeof(xOpenDeviceReply));
rep.repType = X_Reply;
rep.RepType = X_OpenDevice;
diff --git a/xorg-server/Xi/xichangehierarchy.c b/xorg-server/Xi/xichangehierarchy.c
index a3dcab57e..d48200b04 100644
--- a/xorg-server/Xi/xichangehierarchy.c
+++ b/xorg-server/Xi/xichangehierarchy.c
@@ -1,492 +1,492 @@
-/*
- * Copyright 2007-2008 Peter Hutterer
- * Copyright 2009 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Author: Peter Hutterer, University of South Australia, NICTA
- */
-
-/***********************************************************************
- *
- * Request change in the device hierarchy.
- *
- */
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h> /* for inputstr.h */
-#include <X11/Xproto.h> /* Request macro */
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
-#include "scrnintstr.h" /* screen structure */
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XI2proto.h>
-#include <X11/extensions/geproto.h>
-#include "extnsionst.h"
-#include "exevents.h"
-#include "exglobals.h"
-#include "geext.h"
-#include "xace.h"
-#include "xiquerydevice.h" /* for GetDeviceUse */
-
-#include "xkbsrv.h"
-
-#include "xichangehierarchy.h"
-
-/**
- * Send the current state of the device hierarchy to all clients.
- */
-void XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
-{
- xXIHierarchyEvent *ev;
- xXIHierarchyInfo *info;
- DeviceIntRec dummyDev;
- DeviceIntPtr dev;
- int i;
-
- if (!flags)
- return;
-
- ev = calloc(1, sizeof(xXIHierarchyEvent) +
- MAXDEVICES * sizeof(xXIHierarchyInfo));
- if (!ev)
- return;
- ev->type = GenericEvent;
- ev->extension = IReqCode;
- ev->evtype = XI_HierarchyChanged;
- ev->time = GetTimeInMillis();
- ev->flags = 0;
- ev->num_info = inputInfo.numDevices;
-
- info = (xXIHierarchyInfo*)&ev[1];
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- info->deviceid = dev->id;
- info->enabled = dev->enabled;
- info->use = GetDeviceUse(dev, &info->attachment);
- info->flags = flags[dev->id];
- ev->flags |= info->flags;
- info++;
- }
- for (dev = inputInfo.off_devices; dev; dev = dev->next)
- {
- info->deviceid = dev->id;
- info->enabled = dev->enabled;
- info->use = GetDeviceUse(dev, &info->attachment);
- info->flags = flags[dev->id];
- ev->flags |= info->flags;
- info++;
- }
-
-
- for (i = 0; i < MAXDEVICES; i++)
- {
- if (flags[i] & (XIMasterRemoved | XISlaveRemoved))
- {
- info->deviceid = i;
- info->enabled = FALSE;
- info->flags = flags[i];
- info->use = 0;
- ev->flags |= info->flags;
- ev->num_info++;
- info++;
- }
- }
-
- ev->length = bytes_to_int32(ev->num_info * sizeof(xXIHierarchyInfo));
-
- dummyDev.id = XIAllDevices;
- SendEventToAllWindows(&dummyDev, (XI_HierarchyChangedMask >> 8), (xEvent*)ev, 1);
- free(ev);
-}
-
-
-/***********************************************************************
- *
- * This procedure allows a client to change the device hierarchy through
- * adding new master devices, removing them, etc.
- *
- */
-
-int SProcXIChangeHierarchy(ClientPtr client)
-{
- char n;
-
- REQUEST(xXIChangeHierarchyReq);
- swaps(&stuff->length, n);
- return (ProcXIChangeHierarchy(client));
-}
-
-static int
-add_master(ClientPtr client, xXIAddMasterInfo *c, int flags[MAXDEVICES])
-{
- DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd;
- char* name;
- int rc;
-
- name = calloc(c->name_len + 1, sizeof(char));
- strncpy(name, (char*)&c[1], c->name_len);
-
- rc = AllocDevicePair(client, name, &ptr, &keybd,
- CorePointerProc, CoreKeyboardProc, TRUE);
- if (rc != Success)
- goto unwind;
-
- if (!c->send_core)
- ptr->coreEvents = keybd->coreEvents = FALSE;
-
- /* Allocate virtual slave devices for xtest events */
- rc = AllocXTestDevice(client, name, &XTestptr, &XTestkeybd, ptr, keybd);
- if (rc != Success)
- {
- DeleteInputDeviceRequest(ptr);
- DeleteInputDeviceRequest(keybd);
- goto unwind;
- }
-
- ActivateDevice(ptr, FALSE);
- ActivateDevice(keybd, FALSE);
- flags[ptr->id] |= XIMasterAdded;
- flags[keybd->id] |= XIMasterAdded;
-
- ActivateDevice(XTestptr, FALSE);
- ActivateDevice(XTestkeybd, FALSE);
- flags[XTestptr->id] |= XISlaveAdded;
- flags[XTestkeybd->id] |= XISlaveAdded;
-
- if (c->enable)
- {
- EnableDevice(ptr, FALSE);
- EnableDevice(keybd, FALSE);
- flags[ptr->id] |= XIDeviceEnabled;
- flags[keybd->id] |= XIDeviceEnabled;
-
- EnableDevice(XTestptr, FALSE);
- EnableDevice(XTestkeybd, FALSE);
- flags[XTestptr->id] |= XIDeviceEnabled;
- flags[XTestkeybd->id] |= XIDeviceEnabled;
- }
-
- /* Attach the XTest virtual devices to the newly
- created master device */
- AttachDevice(NULL, XTestptr, ptr);
- AttachDevice(NULL, XTestkeybd, keybd);
- flags[XTestptr->id] |= XISlaveAttached;
- flags[XTestkeybd->id] |= XISlaveAttached;
-
-unwind:
- free(name);
- return rc;
-}
-
-static int
-remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
- int flags[MAXDEVICES])
-{
- DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd;
- int rc = Success;
-
- if (r->return_mode != XIAttachToMaster &&
- r->return_mode != XIFloating)
- return BadValue;
-
- rc = dixLookupDevice(&ptr, r->deviceid, client, DixDestroyAccess);
- if (rc != Success)
- goto unwind;
-
- if (!IsMaster(ptr))
- {
- client->errorValue = r->deviceid;
- rc = BadDevice;
- goto unwind;
- }
-
- /* XXX: For now, don't allow removal of VCP, VCK */
- if (ptr == inputInfo.pointer || ptr == inputInfo.keyboard)
- {
- rc = BadDevice;
- goto unwind;
- }
-
-
- ptr = GetMaster(ptr, MASTER_POINTER);
- rc = dixLookupDevice(&ptr, ptr->id, client, DixDestroyAccess);
- if (rc != Success)
- goto unwind;
- keybd = GetMaster(ptr, MASTER_KEYBOARD);
- rc = dixLookupDevice(&keybd, keybd->id, client, DixDestroyAccess);
- if (rc != Success)
- goto unwind;
-
- XTestptr = GetXTestDevice(ptr);
- rc = dixLookupDevice(&XTestptr, XTestptr->id, client, DixDestroyAccess);
- if (rc != Success)
- goto unwind;
-
- XTestkeybd = GetXTestDevice(keybd);
- rc = dixLookupDevice(&XTestkeybd, XTestkeybd->id, client,
- DixDestroyAccess);
- if (rc != Success)
- goto unwind;
-
- /* Disabling sends the devices floating, reattach them if
- * desired. */
- if (r->return_mode == XIAttachToMaster)
- {
- DeviceIntPtr attached,
- newptr,
- newkeybd;
-
- rc = dixLookupDevice(&newptr, r->return_pointer, client, DixAddAccess);
- if (rc != Success)
- goto unwind;
-
- if (!IsMaster(newptr))
- {
- client->errorValue = r->return_pointer;
- rc = BadDevice;
- goto unwind;
- }
-
- rc = dixLookupDevice(&newkeybd, r->return_keyboard,
- client, DixAddAccess);
- if (rc != Success)
- goto unwind;
-
- if (!IsMaster(newkeybd))
- {
- client->errorValue = r->return_keyboard;
- rc = BadDevice;
- goto unwind;
- }
-
- for (attached = inputInfo.devices; attached; attached = attached->next)
- {
- if (!IsMaster(attached)) {
- if (GetMaster(attached, MASTER_ATTACHED) == ptr)
- {
- AttachDevice(client, attached, newptr);
- flags[attached->id] |= XISlaveAttached;
- }
- if (GetMaster(attached, MASTER_ATTACHED) == keybd)
- {
- AttachDevice(client, attached, newkeybd);
- flags[attached->id] |= XISlaveAttached;
- }
- }
- }
- }
-
- /* can't disable until we removed pairing */
- keybd->spriteInfo->paired = NULL;
- ptr->spriteInfo->paired = NULL;
- XTestptr->spriteInfo->paired = NULL;
- XTestkeybd->spriteInfo->paired = NULL;
-
- /* disable the remove the devices, XTest devices must be done first
- else the sprites they rely on will be destroyed */
- DisableDevice(XTestptr, FALSE);
- DisableDevice(XTestkeybd, FALSE);
- DisableDevice(keybd, FALSE);
- DisableDevice(ptr, FALSE);
- flags[XTestptr->id] |= XIDeviceDisabled | XISlaveDetached;
- flags[XTestkeybd->id] |= XIDeviceDisabled | XISlaveDetached;
- flags[keybd->id] |= XIDeviceDisabled;
- flags[ptr->id] |= XIDeviceDisabled;
-
- RemoveDevice(XTestptr, FALSE);
- RemoveDevice(XTestkeybd, FALSE);
- RemoveDevice(keybd, FALSE);
- RemoveDevice(ptr, FALSE);
- flags[XTestptr->id] |= XISlaveRemoved;
- flags[XTestkeybd->id] |= XISlaveRemoved;
- flags[keybd->id] |= XIMasterRemoved;
- flags[ptr->id] |= XIMasterRemoved;
-
-unwind:
- return rc;
-}
-
-static int
-detach_slave(ClientPtr client, xXIDetachSlaveInfo *c, int flags[MAXDEVICES])
-{
- DeviceIntPtr dev;
- int rc;
-
- rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess);
- if (rc != Success)
- goto unwind;
-
- if (IsMaster(dev))
- {
- client->errorValue = c->deviceid;
- rc = BadDevice;
- goto unwind;
- }
-
- /* Don't allow changes to XTest Devices, these are fixed */
- if (IsXTestDevice(dev, NULL))
- {
- client->errorValue = c->deviceid;
- rc = BadDevice;
- goto unwind;
- }
-
- AttachDevice(client, dev, NULL);
- flags[dev->id] |= XISlaveDetached;
-
-unwind:
- return rc;
-}
-
-static int
-attach_slave(ClientPtr client, xXIAttachSlaveInfo *c,
- int flags[MAXDEVICES])
-{
- DeviceIntPtr dev;
- DeviceIntPtr newmaster;
- int rc;
-
- rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess);
- if (rc != Success)
- goto unwind;
-
- if (IsMaster(dev))
- {
- client->errorValue = c->deviceid;
- rc = BadDevice;
- goto unwind;
- }
-
- /* Don't allow changes to XTest Devices, these are fixed */
- if (IsXTestDevice(dev, NULL))
- {
- client->errorValue = c->deviceid;
- rc = BadDevice;
- goto unwind;
- }
-
- rc = dixLookupDevice(&newmaster, c->new_master, client, DixAddAccess);
- if (rc != Success)
- goto unwind;
- if (!IsMaster(newmaster))
- {
- client->errorValue = c->new_master;
- rc = BadDevice;
- goto unwind;
- }
-
- if (!((IsPointerDevice(newmaster) && IsPointerDevice(dev)) ||
- (IsKeyboardDevice(newmaster) && IsKeyboardDevice(dev))))
- {
- rc = BadDevice;
- goto unwind;
- }
-
- AttachDevice(client, dev, newmaster);
- flags[dev->id] |= XISlaveAttached;
-
-unwind:
- return rc;
-}
-
-
-
-#define SWAPIF(cmd) if (client->swapped) { cmd; }
-
-int
-ProcXIChangeHierarchy(ClientPtr client)
-{
- xXIAnyHierarchyChangeInfo *any;
- int required_len = sizeof(xXIChangeHierarchyReq);
- char n;
- int rc = Success;
- int flags[MAXDEVICES] = {0};
-
- REQUEST(xXIChangeHierarchyReq);
- REQUEST_AT_LEAST_SIZE(xXIChangeHierarchyReq);
-
- if (!stuff->num_changes)
- return rc;
-
- any = (xXIAnyHierarchyChangeInfo*)&stuff[1];
- while(stuff->num_changes--)
- {
- SWAPIF(swapl(&any->type, n));
- SWAPIF(swaps(&any->length, n));
-
- required_len += any->length;
- if ((stuff->length * 4) < required_len)
- return BadLength;
-
- switch(any->type)
- {
- case XIAddMaster:
- {
- xXIAddMasterInfo* c = (xXIAddMasterInfo*)any;
- SWAPIF(swaps(&c->name_len, n));
-
- rc = add_master(client, c, flags);
- if (rc != Success)
- goto unwind;
- }
- break;
- case XIRemoveMaster:
- {
- xXIRemoveMasterInfo* r = (xXIRemoveMasterInfo*)any;
-
- rc = remove_master(client, r, flags);
- if (rc != Success)
- goto unwind;
- }
- break;
- case XIDetachSlave:
- {
- xXIDetachSlaveInfo* c = (xXIDetachSlaveInfo*)any;
-
- rc = detach_slave(client, c, flags);
- if (rc != Success)
- goto unwind;
- }
- break;
- case XIAttachSlave:
- {
- xXIAttachSlaveInfo* c = (xXIAttachSlaveInfo*)any;
-
- rc = attach_slave(client, c, flags);
- if (rc != Success)
- goto unwind;
- }
- break;
- }
-
- any = (xXIAnyHierarchyChangeInfo*)((char*)any + any->length * 4);
- }
-
-unwind:
-
- XISendDeviceHierarchyEvent(flags);
- return rc;
-}
-
+/*
+ * Copyright 2007-2008 Peter Hutterer
+ * Copyright 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Peter Hutterer, University of South Australia, NICTA
+ */
+
+/***********************************************************************
+ *
+ * Request change in the device hierarchy.
+ *
+ */
+
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <X11/X.h> /* for inputstr.h */
+#include <X11/Xproto.h> /* Request macro */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
+#include "scrnintstr.h" /* screen structure */
+#include <X11/extensions/XI.h>
+#include <X11/extensions/XI2proto.h>
+#include <X11/extensions/geproto.h>
+#include "extnsionst.h"
+#include "exevents.h"
+#include "exglobals.h"
+#include "geext.h"
+#include "xace.h"
+#include "xiquerydevice.h" /* for GetDeviceUse */
+
+#include "xkbsrv.h"
+
+#include "xichangehierarchy.h"
+
+/**
+ * Send the current state of the device hierarchy to all clients.
+ */
+void XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
+{
+ xXIHierarchyEvent *ev;
+ xXIHierarchyInfo *info;
+ DeviceIntRec dummyDev;
+ DeviceIntPtr dev;
+ int i;
+
+ if (!flags)
+ return;
+
+ ev = calloc(1, sizeof(xXIHierarchyEvent) +
+ MAXDEVICES * sizeof(xXIHierarchyInfo));
+ if (!ev)
+ return;
+ ev->type = GenericEvent;
+ ev->extension = IReqCode;
+ ev->evtype = XI_HierarchyChanged;
+ ev->time = GetTimeInMillis();
+ ev->flags = 0;
+ ev->num_info = inputInfo.numDevices;
+
+ info = (xXIHierarchyInfo*)&ev[1];
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ info->deviceid = dev->id;
+ info->enabled = dev->enabled;
+ info->use = GetDeviceUse(dev, &info->attachment);
+ info->flags = flags[dev->id];
+ ev->flags |= info->flags;
+ info++;
+ }
+ for (dev = inputInfo.off_devices; dev; dev = dev->next)
+ {
+ info->deviceid = dev->id;
+ info->enabled = dev->enabled;
+ info->use = GetDeviceUse(dev, &info->attachment);
+ info->flags = flags[dev->id];
+ ev->flags |= info->flags;
+ info++;
+ }
+
+
+ for (i = 0; i < MAXDEVICES; i++)
+ {
+ if (flags[i] & (XIMasterRemoved | XISlaveRemoved))
+ {
+ info->deviceid = i;
+ info->enabled = FALSE;
+ info->flags = flags[i];
+ info->use = 0;
+ ev->flags |= info->flags;
+ ev->num_info++;
+ info++;
+ }
+ }
+
+ ev->length = bytes_to_int32(ev->num_info * sizeof(xXIHierarchyInfo));
+
+ dummyDev.id = XIAllDevices;
+ SendEventToAllWindows(&dummyDev, (XI_HierarchyChangedMask >> 8), (xEvent*)ev, 1);
+ free(ev);
+}
+
+
+/***********************************************************************
+ *
+ * This procedure allows a client to change the device hierarchy through
+ * adding new master devices, removing them, etc.
+ *
+ */
+
+int SProcXIChangeHierarchy(ClientPtr client)
+{
+ char n;
+
+ REQUEST(xXIChangeHierarchyReq);
+ swaps(&stuff->length, n);
+ return (ProcXIChangeHierarchy(client));
+}
+
+static int
+add_master(ClientPtr client, xXIAddMasterInfo *c, int flags[MAXDEVICES])
+{
+ DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd;
+ char* name;
+ int rc;
+
+ name = calloc(c->name_len + 1, sizeof(char));
+ strncpy(name, (char*)&c[1], c->name_len);
+
+ rc = AllocDevicePair(client, name, &ptr, &keybd,
+ CorePointerProc, CoreKeyboardProc, TRUE);
+ if (rc != Success)
+ goto unwind;
+
+ if (!c->send_core)
+ ptr->coreEvents = keybd->coreEvents = FALSE;
+
+ /* Allocate virtual slave devices for xtest events */
+ rc = AllocXTestDevice(client, name, &XTestptr, &XTestkeybd, ptr, keybd);
+ if (rc != Success)
+ {
+ DeleteInputDeviceRequest(ptr);
+ DeleteInputDeviceRequest(keybd);
+ goto unwind;
+ }
+
+ ActivateDevice(ptr, FALSE);
+ ActivateDevice(keybd, FALSE);
+ flags[ptr->id] |= XIMasterAdded;
+ flags[keybd->id] |= XIMasterAdded;
+
+ ActivateDevice(XTestptr, FALSE);
+ ActivateDevice(XTestkeybd, FALSE);
+ flags[XTestptr->id] |= XISlaveAdded;
+ flags[XTestkeybd->id] |= XISlaveAdded;
+
+ if (c->enable)
+ {
+ EnableDevice(ptr, FALSE);
+ EnableDevice(keybd, FALSE);
+ flags[ptr->id] |= XIDeviceEnabled;
+ flags[keybd->id] |= XIDeviceEnabled;
+
+ EnableDevice(XTestptr, FALSE);
+ EnableDevice(XTestkeybd, FALSE);
+ flags[XTestptr->id] |= XIDeviceEnabled;
+ flags[XTestkeybd->id] |= XIDeviceEnabled;
+ }
+
+ /* Attach the XTest virtual devices to the newly
+ created master device */
+ AttachDevice(NULL, XTestptr, ptr);
+ AttachDevice(NULL, XTestkeybd, keybd);
+ flags[XTestptr->id] |= XISlaveAttached;
+ flags[XTestkeybd->id] |= XISlaveAttached;
+
+unwind:
+ free(name);
+ return rc;
+}
+
+static int
+remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
+ int flags[MAXDEVICES])
+{
+ DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd;
+ int rc = Success;
+
+ if (r->return_mode != XIAttachToMaster &&
+ r->return_mode != XIFloating)
+ return BadValue;
+
+ rc = dixLookupDevice(&ptr, r->deviceid, client, DixDestroyAccess);
+ if (rc != Success)
+ goto unwind;
+
+ if (!IsMaster(ptr))
+ {
+ client->errorValue = r->deviceid;
+ rc = BadDevice;
+ goto unwind;
+ }
+
+ /* XXX: For now, don't allow removal of VCP, VCK */
+ if (ptr == inputInfo.pointer || ptr == inputInfo.keyboard)
+ {
+ rc = BadDevice;
+ goto unwind;
+ }
+
+
+ ptr = GetMaster(ptr, MASTER_POINTER);
+ rc = dixLookupDevice(&ptr, ptr->id, client, DixDestroyAccess);
+ if (rc != Success)
+ goto unwind;
+ keybd = GetMaster(ptr, MASTER_KEYBOARD);
+ rc = dixLookupDevice(&keybd, keybd->id, client, DixDestroyAccess);
+ if (rc != Success)
+ goto unwind;
+
+ XTestptr = GetXTestDevice(ptr);
+ rc = dixLookupDevice(&XTestptr, XTestptr->id, client, DixDestroyAccess);
+ if (rc != Success)
+ goto unwind;
+
+ XTestkeybd = GetXTestDevice(keybd);
+ rc = dixLookupDevice(&XTestkeybd, XTestkeybd->id, client,
+ DixDestroyAccess);
+ if (rc != Success)
+ goto unwind;
+
+ /* Disabling sends the devices floating, reattach them if
+ * desired. */
+ if (r->return_mode == XIAttachToMaster)
+ {
+ DeviceIntPtr attached,
+ newptr,
+ newkeybd;
+
+ rc = dixLookupDevice(&newptr, r->return_pointer, client, DixAddAccess);
+ if (rc != Success)
+ goto unwind;
+
+ if (!IsMaster(newptr))
+ {
+ client->errorValue = r->return_pointer;
+ rc = BadDevice;
+ goto unwind;
+ }
+
+ rc = dixLookupDevice(&newkeybd, r->return_keyboard,
+ client, DixAddAccess);
+ if (rc != Success)
+ goto unwind;
+
+ if (!IsMaster(newkeybd))
+ {
+ client->errorValue = r->return_keyboard;
+ rc = BadDevice;
+ goto unwind;
+ }
+
+ for (attached = inputInfo.devices; attached; attached = attached->next)
+ {
+ if (!IsMaster(attached)) {
+ if (GetMaster(attached, MASTER_ATTACHED) == ptr)
+ {
+ AttachDevice(client, attached, newptr);
+ flags[attached->id] |= XISlaveAttached;
+ }
+ if (GetMaster(attached, MASTER_ATTACHED) == keybd)
+ {
+ AttachDevice(client, attached, newkeybd);
+ flags[attached->id] |= XISlaveAttached;
+ }
+ }
+ }
+ }
+
+ /* can't disable until we removed pairing */
+ keybd->spriteInfo->paired = NULL;
+ ptr->spriteInfo->paired = NULL;
+ XTestptr->spriteInfo->paired = NULL;
+ XTestkeybd->spriteInfo->paired = NULL;
+
+ /* disable the remove the devices, XTest devices must be done first
+ else the sprites they rely on will be destroyed */
+ DisableDevice(XTestptr, FALSE);
+ DisableDevice(XTestkeybd, FALSE);
+ DisableDevice(keybd, FALSE);
+ DisableDevice(ptr, FALSE);
+ flags[XTestptr->id] |= XIDeviceDisabled | XISlaveDetached;
+ flags[XTestkeybd->id] |= XIDeviceDisabled | XISlaveDetached;
+ flags[keybd->id] |= XIDeviceDisabled;
+ flags[ptr->id] |= XIDeviceDisabled;
+
+ RemoveDevice(XTestptr, FALSE);
+ RemoveDevice(XTestkeybd, FALSE);
+ RemoveDevice(keybd, FALSE);
+ RemoveDevice(ptr, FALSE);
+ flags[XTestptr->id] |= XISlaveRemoved;
+ flags[XTestkeybd->id] |= XISlaveRemoved;
+ flags[keybd->id] |= XIMasterRemoved;
+ flags[ptr->id] |= XIMasterRemoved;
+
+unwind:
+ return rc;
+}
+
+static int
+detach_slave(ClientPtr client, xXIDetachSlaveInfo *c, int flags[MAXDEVICES])
+{
+ DeviceIntPtr dev;
+ int rc;
+
+ rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess);
+ if (rc != Success)
+ goto unwind;
+
+ if (IsMaster(dev))
+ {
+ client->errorValue = c->deviceid;
+ rc = BadDevice;
+ goto unwind;
+ }
+
+ /* Don't allow changes to XTest Devices, these are fixed */
+ if (IsXTestDevice(dev, NULL))
+ {
+ client->errorValue = c->deviceid;
+ rc = BadDevice;
+ goto unwind;
+ }
+
+ AttachDevice(client, dev, NULL);
+ flags[dev->id] |= XISlaveDetached;
+
+unwind:
+ return rc;
+}
+
+static int
+attach_slave(ClientPtr client, xXIAttachSlaveInfo *c,
+ int flags[MAXDEVICES])
+{
+ DeviceIntPtr dev;
+ DeviceIntPtr newmaster;
+ int rc;
+
+ rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess);
+ if (rc != Success)
+ goto unwind;
+
+ if (IsMaster(dev))
+ {
+ client->errorValue = c->deviceid;
+ rc = BadDevice;
+ goto unwind;
+ }
+
+ /* Don't allow changes to XTest Devices, these are fixed */
+ if (IsXTestDevice(dev, NULL))
+ {
+ client->errorValue = c->deviceid;
+ rc = BadDevice;
+ goto unwind;
+ }
+
+ rc = dixLookupDevice(&newmaster, c->new_master, client, DixAddAccess);
+ if (rc != Success)
+ goto unwind;
+ if (!IsMaster(newmaster))
+ {
+ client->errorValue = c->new_master;
+ rc = BadDevice;
+ goto unwind;
+ }
+
+ if (!((IsPointerDevice(newmaster) && IsPointerDevice(dev)) ||
+ (IsKeyboardDevice(newmaster) && IsKeyboardDevice(dev))))
+ {
+ rc = BadDevice;
+ goto unwind;
+ }
+
+ AttachDevice(client, dev, newmaster);
+ flags[dev->id] |= XISlaveAttached;
+
+unwind:
+ return rc;
+}
+
+
+
+#define SWAPIF(cmd) if (client->swapped) { cmd; }
+
+int
+ProcXIChangeHierarchy(ClientPtr client)
+{
+ xXIAnyHierarchyChangeInfo *any;
+ int required_len = sizeof(xXIChangeHierarchyReq);
+ char n;
+ int rc = Success;
+ int flags[MAXDEVICES] = {0};
+
+ REQUEST(xXIChangeHierarchyReq);
+ REQUEST_AT_LEAST_SIZE(xXIChangeHierarchyReq);
+
+ if (!stuff->num_changes)
+ return rc;
+
+ any = (xXIAnyHierarchyChangeInfo*)&stuff[1];
+ while(stuff->num_changes--)
+ {
+ SWAPIF(swapl(&any->type, n));
+ SWAPIF(swaps(&any->length, n));
+
+ required_len += any->length;
+ if ((stuff->length * 4) < required_len)
+ return BadLength;
+
+ switch(any->type)
+ {
+ case XIAddMaster:
+ {
+ xXIAddMasterInfo* c = (xXIAddMasterInfo*)any;
+ SWAPIF(swaps(&c->name_len, n));
+
+ rc = add_master(client, c, flags);
+ if (rc != Success)
+ goto unwind;
+ }
+ break;
+ case XIRemoveMaster:
+ {
+ xXIRemoveMasterInfo* r = (xXIRemoveMasterInfo*)any;
+
+ rc = remove_master(client, r, flags);
+ if (rc != Success)
+ goto unwind;
+ }
+ break;
+ case XIDetachSlave:
+ {
+ xXIDetachSlaveInfo* c = (xXIDetachSlaveInfo*)any;
+
+ rc = detach_slave(client, c, flags);
+ if (rc != Success)
+ goto unwind;
+ }
+ break;
+ case XIAttachSlave:
+ {
+ xXIAttachSlaveInfo* c = (xXIAttachSlaveInfo*)any;
+
+ rc = attach_slave(client, c, flags);
+ if (rc != Success)
+ goto unwind;
+ }
+ break;
+ }
+
+ any = (xXIAnyHierarchyChangeInfo*)((char*)any + any->length * 4);
+ }
+
+unwind:
+
+ XISendDeviceHierarchyEvent(flags);
+ return rc;
+}
+
diff --git a/xorg-server/Xi/xiquerydevice.c b/xorg-server/Xi/xiquerydevice.c
index 8b5421130..f8a4eb8a5 100644
--- a/xorg-server/Xi/xiquerydevice.c
+++ b/xorg-server/Xi/xiquerydevice.c
@@ -1,503 +1,503 @@
-/*
- * Copyright © 2009 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors: Peter Hutterer
- *
- */
-
-/**
- * @file Protocol handling for the XIQueryDevice request/reply.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "inputstr.h"
-#include <X11/X.h>
-#include <X11/Xatom.h>
-#include <X11/extensions/XI2proto.h>
-#include "xkbstr.h"
-#include "xkbsrv.h"
-#include "xserver-properties.h"
-#include "exevents.h"
-#include "xace.h"
-
-#include "xiquerydevice.h"
-
-static Bool ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr d);
-static int
-ListDeviceInfo(ClientPtr client, DeviceIntPtr dev, xXIDeviceInfo* info);
-static int SizeDeviceInfo(DeviceIntPtr dev);
-static void SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info);
-int
-SProcXIQueryDevice(ClientPtr client)
-{
- char n;
-
- REQUEST(xXIQueryDeviceReq);
-
- swaps(&stuff->length, n);
- swaps(&stuff->deviceid, n);
-
- return ProcXIQueryDevice(client);
-}
-
-int
-ProcXIQueryDevice(ClientPtr client)
-{
- xXIQueryDeviceReply rep;
- DeviceIntPtr dev = NULL;
- int rc = Success;
- int i = 0, len = 0;
- char *info, *ptr;
- Bool *skip = NULL;
-
- REQUEST(xXIQueryDeviceReq);
- REQUEST_SIZE_MATCH(xXIQueryDeviceReq);
-
- if (stuff->deviceid != XIAllDevices && stuff->deviceid != XIAllMasterDevices)
- {
- rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
- if (rc != Success)
- {
- client->errorValue = stuff->deviceid;
- return rc;
- }
- len += SizeDeviceInfo(dev);
- }
- else
- {
- skip = calloc(sizeof(Bool), inputInfo.numDevices);
- if (!skip)
- return BadAlloc;
-
- for (dev = inputInfo.devices; dev; dev = dev->next, i++)
- {
- skip[i] = ShouldSkipDevice(client, stuff->deviceid, dev);
- if (!skip[i])
- len += SizeDeviceInfo(dev);
- }
-
- for (dev = inputInfo.off_devices; dev; dev = dev->next, i++)
- {
- skip[i] = ShouldSkipDevice(client, stuff->deviceid, dev);
- if (!skip[i])
- len += SizeDeviceInfo(dev);
- }
- }
-
- info = calloc(1, len);
- if (!info)
- return BadAlloc;
-
- memset(&rep, 0, sizeof(xXIQueryDeviceReply));
- rep.repType = X_Reply;
- rep.RepType = X_XIQueryDevice;
- rep.sequenceNumber = client->sequence;
- rep.length = len/4;
- rep.num_devices = 0;
-
- ptr = info;
- if (dev)
- {
- len = ListDeviceInfo(client, dev, (xXIDeviceInfo*)info);
- if (client->swapped)
- SwapDeviceInfo(dev, (xXIDeviceInfo*)info);
- info += len;
- rep.num_devices = 1;
- } else
- {
- i = 0;
- for (dev = inputInfo.devices; dev; dev = dev->next, i++)
- {
- if (!skip[i])
- {
- len = ListDeviceInfo(client, dev, (xXIDeviceInfo*)info);
- if (client->swapped)
- SwapDeviceInfo(dev, (xXIDeviceInfo*)info);
- info += len;
- rep.num_devices++;
- }
- }
-
- for (dev = inputInfo.off_devices; dev; dev = dev->next, i++)
- {
- if (!skip[i])
- {
- len = ListDeviceInfo(client, dev, (xXIDeviceInfo*)info);
- if (client->swapped)
- SwapDeviceInfo(dev, (xXIDeviceInfo*)info);
- info += len;
- rep.num_devices++;
- }
- }
- }
-
- WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep);
- WriteToClient(client, rep.length * 4, ptr);
- free(ptr);
- free(skip);
- return rc;
-}
-
-void
-SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply *rep)
-{
- char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- swaps(&rep->num_devices, n);
-
- /* Device info is already swapped, see ProcXIQueryDevice */
-
- WriteToClient(client, size, (char *)rep);
-}
-
-
-/**
- * @return Whether the device should be included in the returned list.
- */
-static Bool
-ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr dev)
-{
- /* if all devices are not being queried, only master devices are */
- if (deviceid == XIAllDevices || IsMaster(dev))
- {
- int rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess);
- if (rc == Success)
- return FALSE;
- }
- return TRUE;
-}
-
-/**
- * @return The number of bytes needed to store this device's xXIDeviceInfo
- * (and its classes).
- */
-static int
-SizeDeviceInfo(DeviceIntPtr dev)
-{
- int len = sizeof(xXIDeviceInfo);
-
- /* 4-padded name */
- len += pad_to_int32(strlen(dev->name));
-
- return len + SizeDeviceClasses(dev);
-
-}
-
-/*
- * @return The number of bytes needed to store this device's classes.
- */
-int
-SizeDeviceClasses(DeviceIntPtr dev)
-{
- int len = 0;
-
- if (dev->button)
- {
- len += sizeof(xXIButtonInfo);
- len += dev->button->numButtons * sizeof(Atom);
- len += pad_to_int32(bits_to_bytes(dev->button->numButtons));
- }
-
- if (dev->key)
- {
- XkbDescPtr xkb = dev->key->xkbInfo->desc;
- len += sizeof(xXIKeyInfo);
- len += (xkb->max_key_code - xkb->min_key_code + 1) * sizeof(uint32_t);
- }
-
- if (dev->valuator)
- len += sizeof(xXIValuatorInfo) * dev->valuator->numAxes;
-
- return len;
-}
-
-
-/**
- * Write button information into info.
- * @return Number of bytes written into info.
- */
-int
-ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState)
-{
- unsigned char *bits;
- int mask_len;
- int i;
-
- if (!dev || !dev->button)
- return 0;
-
- mask_len = bytes_to_int32(bits_to_bytes(dev->button->numButtons));
-
- info->type = ButtonClass;
- info->num_buttons = dev->button->numButtons;
- info->length = bytes_to_int32(sizeof(xXIButtonInfo)) +
- info->num_buttons + mask_len;
- info->sourceid = dev->button->sourceid;
-
- bits = (unsigned char*)&info[1];
- memset(bits, 0, mask_len * 4);
-
- if (reportState)
- for (i = 0; i < dev->button->numButtons; i++)
- if (BitIsOn(dev->button->down, i))
- SetBit(bits, i);
-
- bits += mask_len * 4;
- memcpy(bits, dev->button->labels, dev->button->numButtons * sizeof(Atom));
-
- return info->length * 4;
-}
-
-static void
-SwapButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info)
-{
- char n;
- Atom *btn;
- int i;
- swaps(&info->type, n);
- swaps(&info->length, n);
- swaps(&info->sourceid, n);
-
- for (i = 0, btn = (Atom*)&info[1]; i < info->num_buttons; i++, btn++)
- swaps(btn, n);
-
- swaps(&info->num_buttons, n);
-}
-
-/**
- * Write key information into info.
- * @return Number of bytes written into info.
- */
-int
-ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info)
-{
- int i;
- XkbDescPtr xkb = dev->key->xkbInfo->desc;
- uint32_t *kc;
-
- info->type = KeyClass;
- info->num_keycodes = xkb->max_key_code - xkb->min_key_code + 1;
- info->length = sizeof(xXIKeyInfo)/4 + info->num_keycodes;
- info->sourceid = dev->key->sourceid;
-
- kc = (uint32_t*)&info[1];
- for (i = xkb->min_key_code; i <= xkb->max_key_code; i++, kc++)
- *kc = i;
-
- return info->length * 4;
-}
-
-static void
-SwapKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info)
-{
- char n;
- uint32_t *key;
- int i;
- swaps(&info->type, n);
- swaps(&info->length, n);
- swaps(&info->sourceid, n);
-
- for (i = 0, key = (uint32_t*)&info[1]; i < info->num_keycodes; i++, key++)
- swapl(key, n);
-
- swaps(&info->num_keycodes, n);
-}
-
-/**
- * List axis information for the given axis.
- *
- * @return The number of bytes written into info.
- */
-int
-ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber,
- Bool reportState)
-{
- ValuatorClassPtr v = dev->valuator;
-
- info->type = ValuatorClass;
- info->length = sizeof(xXIValuatorInfo)/4;
- info->label = v->axes[axisnumber].label;
- info->min.integral = v->axes[axisnumber].min_value;
- info->min.frac = 0;
- info->max.integral = v->axes[axisnumber].max_value;
- info->max.frac = 0;
- info->value.integral = (int)v->axisVal[axisnumber];
- info->value.frac = (int)(v->axisVal[axisnumber] * (1 << 16) * (1 << 16));
- info->resolution = v->axes[axisnumber].resolution;
- info->number = axisnumber;
- info->mode = valuator_get_mode(dev, axisnumber);
- info->sourceid = v->sourceid;
-
- if (!reportState)
- info->value = info->min;
-
- return info->length * 4;
-}
-
-static void
-SwapValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info)
-{
- char n;
- swaps(&info->type, n);
- swaps(&info->length, n);
- swapl(&info->label, n);
- swapl(&info->min.integral, n);
- swapl(&info->min.frac, n);
- swapl(&info->max.integral, n);
- swapl(&info->max.frac, n);
- swaps(&info->number, n);
- swaps(&info->sourceid, n);
-}
-
-int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment)
-{
- DeviceIntPtr master = GetMaster(dev, MASTER_ATTACHED);
- int use;
-
- if (IsMaster(dev))
- {
- DeviceIntPtr paired = GetPairedDevice(dev);
- use = IsPointerDevice(dev) ? XIMasterPointer : XIMasterKeyboard;
- *attachment = (paired ? paired->id : 0);
- } else if (!IsFloating(dev))
- {
- use = IsPointerDevice(master) ? XISlavePointer : XISlaveKeyboard;
- *attachment = master->id;
- } else
- use = XIFloatingSlave;
-
- return use;
-}
-
-/**
- * Write the info for device dev into the buffer pointed to by info.
- *
- * @return The number of bytes used.
- */
-static int
-ListDeviceInfo(ClientPtr client, DeviceIntPtr dev, xXIDeviceInfo* info)
-{
- char *any = (char*)&info[1];
- int len = 0, total_len = 0;
-
- info->deviceid = dev->id;
- info->use = GetDeviceUse(dev, &info->attachment);
- info->num_classes = 0;
- info->name_len = strlen(dev->name);
- info->enabled = dev->enabled;
- total_len = sizeof(xXIDeviceInfo);
-
- len = pad_to_int32(info->name_len);
- memset(any, 0, len);
- strncpy(any, dev->name, info->name_len);
- any += len;
- total_len += len;
-
- total_len += ListDeviceClasses(client, dev, any, &info->num_classes);
- return total_len;
-}
-
-/**
- * Write the class info of the device into the memory pointed to by any, set
- * nclasses to the number of classes in total and return the number of bytes
- * written.
- */
-int
-ListDeviceClasses(ClientPtr client, DeviceIntPtr dev,
- char *any, uint16_t *nclasses)
-{
- int total_len = 0;
- int len;
- int i;
- int rc;
-
- /* Check if the current device state should be suppressed */
- rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess);
-
- if (dev->button)
- {
- (*nclasses)++;
- len = ListButtonInfo(dev, (xXIButtonInfo*)any, rc == Success);
- any += len;
- total_len += len;
- }
-
- if (dev->key)
- {
- (*nclasses)++;
- len = ListKeyInfo(dev, (xXIKeyInfo*)any);
- any += len;
- total_len += len;
- }
-
- for (i = 0; dev->valuator && i < dev->valuator->numAxes; i++)
- {
- (*nclasses)++;
- len = ListValuatorInfo(dev, (xXIValuatorInfo*)any, i, rc == Success);
- any += len;
- total_len += len;
- }
-
- return total_len;
-}
-
-static void
-SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info)
-{
- char n;
- char *any = (char*)&info[1];
- int i;
-
- /* Skip over name */
- any += pad_to_int32(info->name_len);
-
- for (i = 0; i < info->num_classes; i++)
- {
- int len = ((xXIAnyInfo*)any)->length;
- switch(((xXIAnyInfo*)any)->type)
- {
- case XIButtonClass:
- SwapButtonInfo(dev, (xXIButtonInfo*)any);
- break;
- case XIKeyClass:
- SwapKeyInfo(dev, (xXIKeyInfo*)any);
- break;
- case XIValuatorClass:
- SwapValuatorInfo(dev, (xXIValuatorInfo*)any);
- break;
- }
-
- any += len * 4;
- }
-
- swaps(&info->deviceid, n);
- swaps(&info->use, n);
- swaps(&info->attachment, n);
- swaps(&info->num_classes, n);
- swaps(&info->name_len, n);
-
-}
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Peter Hutterer
+ *
+ */
+
+/**
+ * @file Protocol handling for the XIQueryDevice request/reply.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "inputstr.h"
+#include <X11/X.h>
+#include <X11/Xatom.h>
+#include <X11/extensions/XI2proto.h>
+#include "xkbstr.h"
+#include "xkbsrv.h"
+#include "xserver-properties.h"
+#include "exevents.h"
+#include "xace.h"
+
+#include "xiquerydevice.h"
+
+static Bool ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr d);
+static int
+ListDeviceInfo(ClientPtr client, DeviceIntPtr dev, xXIDeviceInfo* info);
+static int SizeDeviceInfo(DeviceIntPtr dev);
+static void SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info);
+int
+SProcXIQueryDevice(ClientPtr client)
+{
+ char n;
+
+ REQUEST(xXIQueryDeviceReq);
+
+ swaps(&stuff->length, n);
+ swaps(&stuff->deviceid, n);
+
+ return ProcXIQueryDevice(client);
+}
+
+int
+ProcXIQueryDevice(ClientPtr client)
+{
+ xXIQueryDeviceReply rep;
+ DeviceIntPtr dev = NULL;
+ int rc = Success;
+ int i = 0, len = 0;
+ char *info, *ptr;
+ Bool *skip = NULL;
+
+ REQUEST(xXIQueryDeviceReq);
+ REQUEST_SIZE_MATCH(xXIQueryDeviceReq);
+
+ if (stuff->deviceid != XIAllDevices && stuff->deviceid != XIAllMasterDevices)
+ {
+ rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
+ if (rc != Success)
+ {
+ client->errorValue = stuff->deviceid;
+ return rc;
+ }
+ len += SizeDeviceInfo(dev);
+ }
+ else
+ {
+ skip = calloc(sizeof(Bool), inputInfo.numDevices);
+ if (!skip)
+ return BadAlloc;
+
+ for (dev = inputInfo.devices; dev; dev = dev->next, i++)
+ {
+ skip[i] = ShouldSkipDevice(client, stuff->deviceid, dev);
+ if (!skip[i])
+ len += SizeDeviceInfo(dev);
+ }
+
+ for (dev = inputInfo.off_devices; dev; dev = dev->next, i++)
+ {
+ skip[i] = ShouldSkipDevice(client, stuff->deviceid, dev);
+ if (!skip[i])
+ len += SizeDeviceInfo(dev);
+ }
+ }
+
+ info = calloc(1, len);
+ if (!info)
+ return BadAlloc;
+
+ memset(&rep, 0, sizeof(xXIQueryDeviceReply));
+ rep.repType = X_Reply;
+ rep.RepType = X_XIQueryDevice;
+ rep.sequenceNumber = client->sequence;
+ rep.length = len/4;
+ rep.num_devices = 0;
+
+ ptr = info;
+ if (dev)
+ {
+ len = ListDeviceInfo(client, dev, (xXIDeviceInfo*)info);
+ if (client->swapped)
+ SwapDeviceInfo(dev, (xXIDeviceInfo*)info);
+ info += len;
+ rep.num_devices = 1;
+ } else
+ {
+ i = 0;
+ for (dev = inputInfo.devices; dev; dev = dev->next, i++)
+ {
+ if (!skip[i])
+ {
+ len = ListDeviceInfo(client, dev, (xXIDeviceInfo*)info);
+ if (client->swapped)
+ SwapDeviceInfo(dev, (xXIDeviceInfo*)info);
+ info += len;
+ rep.num_devices++;
+ }
+ }
+
+ for (dev = inputInfo.off_devices; dev; dev = dev->next, i++)
+ {
+ if (!skip[i])
+ {
+ len = ListDeviceInfo(client, dev, (xXIDeviceInfo*)info);
+ if (client->swapped)
+ SwapDeviceInfo(dev, (xXIDeviceInfo*)info);
+ info += len;
+ rep.num_devices++;
+ }
+ }
+ }
+
+ WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep);
+ WriteToClient(client, rep.length * 4, ptr);
+ free(ptr);
+ free(skip);
+ return rc;
+}
+
+void
+SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply *rep)
+{
+ char n;
+
+ swaps(&rep->sequenceNumber, n);
+ swapl(&rep->length, n);
+ swaps(&rep->num_devices, n);
+
+ /* Device info is already swapped, see ProcXIQueryDevice */
+
+ WriteToClient(client, size, (char *)rep);
+}
+
+
+/**
+ * @return Whether the device should be included in the returned list.
+ */
+static Bool
+ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr dev)
+{
+ /* if all devices are not being queried, only master devices are */
+ if (deviceid == XIAllDevices || IsMaster(dev))
+ {
+ int rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess);
+ if (rc == Success)
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/**
+ * @return The number of bytes needed to store this device's xXIDeviceInfo
+ * (and its classes).
+ */
+static int
+SizeDeviceInfo(DeviceIntPtr dev)
+{
+ int len = sizeof(xXIDeviceInfo);
+
+ /* 4-padded name */
+ len += pad_to_int32(strlen(dev->name));
+
+ return len + SizeDeviceClasses(dev);
+
+}
+
+/*
+ * @return The number of bytes needed to store this device's classes.
+ */
+int
+SizeDeviceClasses(DeviceIntPtr dev)
+{
+ int len = 0;
+
+ if (dev->button)
+ {
+ len += sizeof(xXIButtonInfo);
+ len += dev->button->numButtons * sizeof(Atom);
+ len += pad_to_int32(bits_to_bytes(dev->button->numButtons));
+ }
+
+ if (dev->key)
+ {
+ XkbDescPtr xkb = dev->key->xkbInfo->desc;
+ len += sizeof(xXIKeyInfo);
+ len += (xkb->max_key_code - xkb->min_key_code + 1) * sizeof(uint32_t);
+ }
+
+ if (dev->valuator)
+ len += sizeof(xXIValuatorInfo) * dev->valuator->numAxes;
+
+ return len;
+}
+
+
+/**
+ * Write button information into info.
+ * @return Number of bytes written into info.
+ */
+int
+ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState)
+{
+ unsigned char *bits;
+ int mask_len;
+ int i;
+
+ if (!dev || !dev->button)
+ return 0;
+
+ mask_len = bytes_to_int32(bits_to_bytes(dev->button->numButtons));
+
+ info->type = ButtonClass;
+ info->num_buttons = dev->button->numButtons;
+ info->length = bytes_to_int32(sizeof(xXIButtonInfo)) +
+ info->num_buttons + mask_len;
+ info->sourceid = dev->button->sourceid;
+
+ bits = (unsigned char*)&info[1];
+ memset(bits, 0, mask_len * 4);
+
+ if (reportState)
+ for (i = 0; i < dev->button->numButtons; i++)
+ if (BitIsOn(dev->button->down, i))
+ SetBit(bits, i);
+
+ bits += mask_len * 4;
+ memcpy(bits, dev->button->labels, dev->button->numButtons * sizeof(Atom));
+
+ return info->length * 4;
+}
+
+static void
+SwapButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info)
+{
+ char n;
+ Atom *btn;
+ int i;
+ swaps(&info->type, n);
+ swaps(&info->length, n);
+ swaps(&info->sourceid, n);
+
+ for (i = 0, btn = (Atom*)&info[1]; i < info->num_buttons; i++, btn++)
+ swaps(btn, n);
+
+ swaps(&info->num_buttons, n);
+}
+
+/**
+ * Write key information into info.
+ * @return Number of bytes written into info.
+ */
+int
+ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info)
+{
+ int i;
+ XkbDescPtr xkb = dev->key->xkbInfo->desc;
+ uint32_t *kc;
+
+ info->type = KeyClass;
+ info->num_keycodes = xkb->max_key_code - xkb->min_key_code + 1;
+ info->length = sizeof(xXIKeyInfo)/4 + info->num_keycodes;
+ info->sourceid = dev->key->sourceid;
+
+ kc = (uint32_t*)&info[1];
+ for (i = xkb->min_key_code; i <= xkb->max_key_code; i++, kc++)
+ *kc = i;
+
+ return info->length * 4;
+}
+
+static void
+SwapKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info)
+{
+ char n;
+ uint32_t *key;
+ int i;
+ swaps(&info->type, n);
+ swaps(&info->length, n);
+ swaps(&info->sourceid, n);
+
+ for (i = 0, key = (uint32_t*)&info[1]; i < info->num_keycodes; i++, key++)
+ swapl(key, n);
+
+ swaps(&info->num_keycodes, n);
+}
+
+/**
+ * List axis information for the given axis.
+ *
+ * @return The number of bytes written into info.
+ */
+int
+ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber,
+ Bool reportState)
+{
+ ValuatorClassPtr v = dev->valuator;
+
+ info->type = ValuatorClass;
+ info->length = sizeof(xXIValuatorInfo)/4;
+ info->label = v->axes[axisnumber].label;
+ info->min.integral = v->axes[axisnumber].min_value;
+ info->min.frac = 0;
+ info->max.integral = v->axes[axisnumber].max_value;
+ info->max.frac = 0;
+ info->value.integral = (int)v->axisVal[axisnumber];
+ info->value.frac = (int)(v->axisVal[axisnumber] * (1 << 16) * (1 << 16));
+ info->resolution = v->axes[axisnumber].resolution;
+ info->number = axisnumber;
+ info->mode = valuator_get_mode(dev, axisnumber);
+ info->sourceid = v->sourceid;
+
+ if (!reportState)
+ info->value = info->min;
+
+ return info->length * 4;
+}
+
+static void
+SwapValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info)
+{
+ char n;
+ swaps(&info->type, n);
+ swaps(&info->length, n);
+ swapl(&info->label, n);
+ swapl(&info->min.integral, n);
+ swapl(&info->min.frac, n);
+ swapl(&info->max.integral, n);
+ swapl(&info->max.frac, n);
+ swaps(&info->number, n);
+ swaps(&info->sourceid, n);
+}
+
+int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment)
+{
+ DeviceIntPtr master = GetMaster(dev, MASTER_ATTACHED);
+ int use;
+
+ if (IsMaster(dev))
+ {
+ DeviceIntPtr paired = GetPairedDevice(dev);
+ use = IsPointerDevice(dev) ? XIMasterPointer : XIMasterKeyboard;
+ *attachment = (paired ? paired->id : 0);
+ } else if (!IsFloating(dev))
+ {
+ use = IsPointerDevice(master) ? XISlavePointer : XISlaveKeyboard;
+ *attachment = master->id;
+ } else
+ use = XIFloatingSlave;
+
+ return use;
+}
+
+/**
+ * Write the info for device dev into the buffer pointed to by info.
+ *
+ * @return The number of bytes used.
+ */
+static int
+ListDeviceInfo(ClientPtr client, DeviceIntPtr dev, xXIDeviceInfo* info)
+{
+ char *any = (char*)&info[1];
+ int len = 0, total_len = 0;
+
+ info->deviceid = dev->id;
+ info->use = GetDeviceUse(dev, &info->attachment);
+ info->num_classes = 0;
+ info->name_len = strlen(dev->name);
+ info->enabled = dev->enabled;
+ total_len = sizeof(xXIDeviceInfo);
+
+ len = pad_to_int32(info->name_len);
+ memset(any, 0, len);
+ strncpy(any, dev->name, info->name_len);
+ any += len;
+ total_len += len;
+
+ total_len += ListDeviceClasses(client, dev, any, &info->num_classes);
+ return total_len;
+}
+
+/**
+ * Write the class info of the device into the memory pointed to by any, set
+ * nclasses to the number of classes in total and return the number of bytes
+ * written.
+ */
+int
+ListDeviceClasses(ClientPtr client, DeviceIntPtr dev,
+ char *any, uint16_t *nclasses)
+{
+ int total_len = 0;
+ int len;
+ int i;
+ int rc;
+
+ /* Check if the current device state should be suppressed */
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess);
+
+ if (dev->button)
+ {
+ (*nclasses)++;
+ len = ListButtonInfo(dev, (xXIButtonInfo*)any, rc == Success);
+ any += len;
+ total_len += len;
+ }
+
+ if (dev->key)
+ {
+ (*nclasses)++;
+ len = ListKeyInfo(dev, (xXIKeyInfo*)any);
+ any += len;
+ total_len += len;
+ }
+
+ for (i = 0; dev->valuator && i < dev->valuator->numAxes; i++)
+ {
+ (*nclasses)++;
+ len = ListValuatorInfo(dev, (xXIValuatorInfo*)any, i, rc == Success);
+ any += len;
+ total_len += len;
+ }
+
+ return total_len;
+}
+
+static void
+SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info)
+{
+ char n;
+ char *any = (char*)&info[1];
+ int i;
+
+ /* Skip over name */
+ any += pad_to_int32(info->name_len);
+
+ for (i = 0; i < info->num_classes; i++)
+ {
+ int len = ((xXIAnyInfo*)any)->length;
+ switch(((xXIAnyInfo*)any)->type)
+ {
+ case XIButtonClass:
+ SwapButtonInfo(dev, (xXIButtonInfo*)any);
+ break;
+ case XIKeyClass:
+ SwapKeyInfo(dev, (xXIKeyInfo*)any);
+ break;
+ case XIValuatorClass:
+ SwapValuatorInfo(dev, (xXIValuatorInfo*)any);
+ break;
+ }
+
+ any += len * 4;
+ }
+
+ swaps(&info->deviceid, n);
+ swaps(&info->use, n);
+ swaps(&info->attachment, n);
+ swaps(&info->num_classes, n);
+ swaps(&info->name_len, n);
+
+}
diff --git a/xorg-server/Xi/xiquerypointer.c b/xorg-server/Xi/xiquerypointer.c
index 51317994b..ce025432e 100644
--- a/xorg-server/Xi/xiquerypointer.c
+++ b/xorg-server/Xi/xiquerypointer.c
@@ -1,229 +1,229 @@
-/*
- * Copyright 2007-2008 Peter Hutterer
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Author: Peter Hutterer, University of South Australia, NICTA
- */
-
-/***********************************************************************
- *
- * Request to query the pointer location of an extension input device.
- *
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h> /* for inputstr.h */
-#include <X11/Xproto.h> /* Request macro */
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XI2proto.h>
-#include "extnsionst.h"
-#include "exevents.h"
-#include "exglobals.h"
-#include "eventconvert.h"
-#include "scrnintstr.h"
-#include "xkbsrv.h"
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-#include "xiquerypointer.h"
-
-/***********************************************************************
- *
- * This procedure allows a client to query the pointer of a device.
- *
- */
-
-int
-SProcXIQueryPointer(ClientPtr client)
-{
- char n;
-
- REQUEST(xXIQueryPointerReq);
- swaps(&stuff->length, n);
- swaps(&stuff->deviceid, n);
- swapl(&stuff->win, n);
- return (ProcXIQueryPointer(client));
-}
-
-int
-ProcXIQueryPointer(ClientPtr client)
-{
- int rc;
- xXIQueryPointerReply rep;
- DeviceIntPtr pDev, kbd;
- WindowPtr pWin, t;
- SpritePtr pSprite;
- XkbStatePtr state;
- char *buttons = NULL;
- int buttons_size = 0; /* size of buttons array */
-
- REQUEST(xXIQueryPointerReq);
- REQUEST_SIZE_MATCH(xXIQueryPointerReq);
-
- rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixReadAccess);
- if (rc != Success)
- {
- client->errorValue = stuff->deviceid;
- return rc;
- }
-
- if (pDev->valuator == NULL || IsKeyboardDevice(pDev) ||
- (!IsMaster(pDev) && !IsFloating(pDev))) /* no attached devices */
- {
- client->errorValue = stuff->deviceid;
- return BadDevice;
- }
-
- rc = dixLookupWindow(&pWin, stuff->win, client, DixGetAttrAccess);
- if (rc != Success)
- {
- SendErrorToClient(client, IReqCode, X_XIQueryPointer,
- stuff->win, rc);
- return Success;
- }
-
- if (pDev->valuator->motionHintWindow)
- MaybeStopHint(pDev, client);
-
- if (IsMaster(pDev))
- kbd = GetPairedDevice(pDev);
- else
- kbd = (pDev->key) ? pDev : NULL;
-
- pSprite = pDev->spriteInfo->sprite;
-
- memset(&rep, 0, sizeof(rep));
- rep.repType = X_Reply;
- rep.RepType = X_XIQueryPointer;
- rep.length = 6;
- rep.sequenceNumber = client->sequence;
- rep.root = (GetCurrentRootWindow(pDev))->drawable.id;
- rep.root_x = FP1616(pSprite->hot.x, 0);
- rep.root_y = FP1616(pSprite->hot.y, 0);
- rep.child = None;
-
- if (kbd)
- {
- state = &kbd->key->xkbInfo->state;
- rep.mods.base_mods = state->base_mods;
- rep.mods.latched_mods = state->latched_mods;
- rep.mods.locked_mods = state->locked_mods;
-
- rep.group.base_group = state->base_group;
- rep.group.latched_group = state->latched_group;
- rep.group.locked_group = state->locked_group;
- }
-
- if (pDev->button)
- {
- int i, down;
- rep.buttons_len = bytes_to_int32(bits_to_bytes(pDev->button->numButtons));
- rep.length += rep.buttons_len;
- buttons_size = rep.buttons_len * 4;
- buttons = calloc(1, buttons_size);
- if (!buttons)
- return BadAlloc;
-
- down = pDev->button->buttonsDown;
-
- for (i = 0; i < pDev->button->numButtons && down; i++)
- {
- if (BitIsOn(pDev->button->down, i))
- {
- SetBit(buttons, i);
- down--;
- }
- }
- } else
- rep.buttons_len = 0;
-
- if (pSprite->hot.pScreen == pWin->drawable.pScreen)
- {
- rep.same_screen = xTrue;
- rep.win_x = FP1616(pSprite->hot.x - pWin->drawable.x, 0);
- rep.win_y = FP1616(pSprite->hot.y - pWin->drawable.y, 0);
- for (t = pSprite->win; t; t = t->parent)
- if (t->parent == pWin)
- {
- rep.child = t->drawable.id;
- break;
- }
- } else
- {
- rep.same_screen = xFalse;
- rep.win_x = 0;
- rep.win_y = 0;
- }
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension) {
- rep.root_x += FP1616(screenInfo.screens[0]->x, 0);
- rep.root_y += FP1616(screenInfo.screens[0]->y, 0);
- if (stuff->win == rep.root)
- {
- rep.win_x += FP1616(screenInfo.screens[0]->x, 0);
- rep.win_y += FP1616(screenInfo.screens[0]->y, 0);
- }
- }
-#endif
-
- WriteReplyToClient(client, sizeof(xXIQueryPointerReply), &rep);
- if (buttons)
- WriteToClient(client, buttons_size, buttons);
-
- free(buttons);
-
- return Success;
-}
-
-/***********************************************************************
- *
- * This procedure writes the reply for the XIQueryPointer function,
- * if the client and server have a different byte ordering.
- *
- */
-
-void
-SRepXIQueryPointer(ClientPtr client, int size,
- xXIQueryPointerReply * rep)
-{
- char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- swapl(&rep->root, n);
- swapl(&rep->child, n);
- swapl(&rep->root_x, n);
- swapl(&rep->root_y, n);
- swapl(&rep->win_x, n);
- swapl(&rep->win_y, n);
- swaps(&rep->buttons_len, n);
-
- WriteToClient(client, size, (char *)rep);
-}
-
+/*
+ * Copyright 2007-2008 Peter Hutterer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Peter Hutterer, University of South Australia, NICTA
+ */
+
+/***********************************************************************
+ *
+ * Request to query the pointer location of an extension input device.
+ *
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <X11/X.h> /* for inputstr.h */
+#include <X11/Xproto.h> /* Request macro */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
+#include <X11/extensions/XI.h>
+#include <X11/extensions/XI2proto.h>
+#include "extnsionst.h"
+#include "exevents.h"
+#include "exglobals.h"
+#include "eventconvert.h"
+#include "scrnintstr.h"
+#include "xkbsrv.h"
+
+#ifdef PANORAMIX
+#include "panoramiXsrv.h"
+#endif
+
+#include "xiquerypointer.h"
+
+/***********************************************************************
+ *
+ * This procedure allows a client to query the pointer of a device.
+ *
+ */
+
+int
+SProcXIQueryPointer(ClientPtr client)
+{
+ char n;
+
+ REQUEST(xXIQueryPointerReq);
+ swaps(&stuff->length, n);
+ swaps(&stuff->deviceid, n);
+ swapl(&stuff->win, n);
+ return (ProcXIQueryPointer(client));
+}
+
+int
+ProcXIQueryPointer(ClientPtr client)
+{
+ int rc;
+ xXIQueryPointerReply rep;
+ DeviceIntPtr pDev, kbd;
+ WindowPtr pWin, t;
+ SpritePtr pSprite;
+ XkbStatePtr state;
+ char *buttons = NULL;
+ int buttons_size = 0; /* size of buttons array */
+
+ REQUEST(xXIQueryPointerReq);
+ REQUEST_SIZE_MATCH(xXIQueryPointerReq);
+
+ rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixReadAccess);
+ if (rc != Success)
+ {
+ client->errorValue = stuff->deviceid;
+ return rc;
+ }
+
+ if (pDev->valuator == NULL || IsKeyboardDevice(pDev) ||
+ (!IsMaster(pDev) && !IsFloating(pDev))) /* no attached devices */
+ {
+ client->errorValue = stuff->deviceid;
+ return BadDevice;
+ }
+
+ rc = dixLookupWindow(&pWin, stuff->win, client, DixGetAttrAccess);
+ if (rc != Success)
+ {
+ SendErrorToClient(client, IReqCode, X_XIQueryPointer,
+ stuff->win, rc);
+ return Success;
+ }
+
+ if (pDev->valuator->motionHintWindow)
+ MaybeStopHint(pDev, client);
+
+ if (IsMaster(pDev))
+ kbd = GetPairedDevice(pDev);
+ else
+ kbd = (pDev->key) ? pDev : NULL;
+
+ pSprite = pDev->spriteInfo->sprite;
+
+ memset(&rep, 0, sizeof(rep));
+ rep.repType = X_Reply;
+ rep.RepType = X_XIQueryPointer;
+ rep.length = 6;
+ rep.sequenceNumber = client->sequence;
+ rep.root = (GetCurrentRootWindow(pDev))->drawable.id;
+ rep.root_x = FP1616(pSprite->hot.x, 0);
+ rep.root_y = FP1616(pSprite->hot.y, 0);
+ rep.child = None;
+
+ if (kbd)
+ {
+ state = &kbd->key->xkbInfo->state;
+ rep.mods.base_mods = state->base_mods;
+ rep.mods.latched_mods = state->latched_mods;
+ rep.mods.locked_mods = state->locked_mods;
+
+ rep.group.base_group = state->base_group;
+ rep.group.latched_group = state->latched_group;
+ rep.group.locked_group = state->locked_group;
+ }
+
+ if (pDev->button)
+ {
+ int i, down;
+ rep.buttons_len = bytes_to_int32(bits_to_bytes(pDev->button->numButtons));
+ rep.length += rep.buttons_len;
+ buttons_size = rep.buttons_len * 4;
+ buttons = calloc(1, buttons_size);
+ if (!buttons)
+ return BadAlloc;
+
+ down = pDev->button->buttonsDown;
+
+ for (i = 0; i < pDev->button->numButtons && down; i++)
+ {
+ if (BitIsOn(pDev->button->down, i))
+ {
+ SetBit(buttons, i);
+ down--;
+ }
+ }
+ } else
+ rep.buttons_len = 0;
+
+ if (pSprite->hot.pScreen == pWin->drawable.pScreen)
+ {
+ rep.same_screen = xTrue;
+ rep.win_x = FP1616(pSprite->hot.x - pWin->drawable.x, 0);
+ rep.win_y = FP1616(pSprite->hot.y - pWin->drawable.y, 0);
+ for (t = pSprite->win; t; t = t->parent)
+ if (t->parent == pWin)
+ {
+ rep.child = t->drawable.id;
+ break;
+ }
+ } else
+ {
+ rep.same_screen = xFalse;
+ rep.win_x = 0;
+ rep.win_y = 0;
+ }
+
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension) {
+ rep.root_x += FP1616(screenInfo.screens[0]->x, 0);
+ rep.root_y += FP1616(screenInfo.screens[0]->y, 0);
+ if (stuff->win == rep.root)
+ {
+ rep.win_x += FP1616(screenInfo.screens[0]->x, 0);
+ rep.win_y += FP1616(screenInfo.screens[0]->y, 0);
+ }
+ }
+#endif
+
+ WriteReplyToClient(client, sizeof(xXIQueryPointerReply), &rep);
+ if (buttons)
+ WriteToClient(client, buttons_size, buttons);
+
+ free(buttons);
+
+ return Success;
+}
+
+/***********************************************************************
+ *
+ * This procedure writes the reply for the XIQueryPointer function,
+ * if the client and server have a different byte ordering.
+ *
+ */
+
+void
+SRepXIQueryPointer(ClientPtr client, int size,
+ xXIQueryPointerReply * rep)
+{
+ char n;
+
+ swaps(&rep->sequenceNumber, n);
+ swapl(&rep->length, n);
+ swapl(&rep->root, n);
+ swapl(&rep->child, n);
+ swapl(&rep->root_x, n);
+ swapl(&rep->root_y, n);
+ swapl(&rep->win_x, n);
+ swapl(&rep->win_y, n);
+ swaps(&rep->buttons_len, n);
+
+ WriteToClient(client, size, (char *)rep);
+}
+
diff --git a/xorg-server/Xi/xiwarppointer.c b/xorg-server/Xi/xiwarppointer.c
index a463ab94d..66888008f 100644
--- a/xorg-server/Xi/xiwarppointer.c
+++ b/xorg-server/Xi/xiwarppointer.c
@@ -1,203 +1,203 @@
-/*
- * Copyright 2007-2008 Peter Hutterer
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Author: Peter Hutterer, University of South Australia, NICTA
- */
-
-/***********************************************************************
- *
- * Request to Warp the pointer location of an extension input device.
- *
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h> /* for inputstr.h */
-#include <X11/Xproto.h> /* Request macro */
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
-#include "scrnintstr.h" /* screen structure */
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XI2proto.h>
-#include "extnsionst.h"
-#include "exevents.h"
-#include "exglobals.h"
-#include "mipointer.h" /* for miPointerUpdateSprite */
-
-
-#include "xiwarppointer.h"
-/***********************************************************************
- *
- * This procedure allows a client to warp the pointer of a device.
- *
- */
-
-int
-SProcXIWarpPointer(ClientPtr client)
-{
- char n;
-
- REQUEST(xXIWarpPointerReq);
- swaps(&stuff->length, n);
- swapl(&stuff->src_win, n);
- swapl(&stuff->dst_win, n);
- swapl(&stuff->src_x, n);
- swapl(&stuff->src_y, n);
- swaps(&stuff->src_width, n);
- swaps(&stuff->src_height, n);
- swapl(&stuff->dst_x, n);
- swapl(&stuff->dst_y, n);
- swaps(&stuff->deviceid, n);
- return (ProcXIWarpPointer(client));
-}
-
-int
-ProcXIWarpPointer(ClientPtr client)
-{
- int rc;
- int x, y;
- WindowPtr dest = NULL;
- DeviceIntPtr pDev;
- SpritePtr pSprite;
- ScreenPtr newScreen;
- int src_x, src_y;
- int dst_x, dst_y;
-
- REQUEST(xXIWarpPointerReq);
- REQUEST_SIZE_MATCH(xXIWarpPointerReq);
-
- /* FIXME: panoramix stuff is missing, look at ProcWarpPointer */
-
- rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixWriteAccess);
-
- if (rc != Success)
- {
- client->errorValue = stuff->deviceid;
- return rc;
- }
-
- if ((!IsMaster(pDev) && !IsFloating(pDev)) ||
- (IsMaster(pDev) && !IsPointerDevice(pDev)))
- {
- client->errorValue = stuff->deviceid;
- return BadDevice;
- }
-
- if (stuff->dst_win != None)
- {
- rc = dixLookupWindow(&dest, stuff->dst_win, client, DixGetAttrAccess);
- if (rc != Success)
- {
- client->errorValue = stuff->dst_win;
- return rc;
- }
- }
-
- pSprite = pDev->spriteInfo->sprite;
- x = pSprite->hotPhys.x;
- y = pSprite->hotPhys.y;
-
- src_x = stuff->src_x / (double)(1 << 16);
- src_y = stuff->src_y / (double)(1 << 16);
- dst_x = stuff->dst_x / (double)(1 << 16);
- dst_y = stuff->dst_y / (double)(1 << 16);
-
- if (stuff->src_win != None)
- {
- int winX, winY;
- WindowPtr src;
-
- rc = dixLookupWindow(&src, stuff->src_win, client, DixGetAttrAccess);
- if (rc != Success)
- {
- client->errorValue = stuff->src_win;
- return rc;
- }
-
- winX = src->drawable.x;
- winY = src->drawable.y;
- if (src->drawable.pScreen != pSprite->hotPhys.pScreen ||
- x < winX + src_x ||
- y < winY + src_y ||
- (stuff->src_width != 0 &&
- winX + src_x + (int)stuff->src_width < 0) ||
- (stuff->src_height != 0 &&
- winY + src_y + (int)stuff->src_height < y) ||
- !PointInWindowIsVisible(src, x, y))
- return Success;
- }
-
- if (dest)
- {
- x = dest->drawable.x;
- y = dest->drawable.y;
- newScreen = dest->drawable.pScreen;
- } else
- newScreen = pSprite->hotPhys.pScreen;
-
- x += dst_x;
- y += dst_y;
-
- if (x < 0)
- x = 0;
- else if (x > newScreen->width)
- x = newScreen->width - 1;
-
- if (y < 0)
- y = 0;
- else if (y > newScreen->height)
- y = newScreen->height - 1;
-
- if (newScreen == pSprite->hotPhys.pScreen)
- {
- if (x < pSprite->physLimits.x1)
- x = pSprite->physLimits.x1;
- else if (x >= pSprite->physLimits.x2)
- x = pSprite->physLimits.x2 - 1;
-
- if (y < pSprite->physLimits.y1)
- y = pSprite->physLimits.y1;
- else if (y >= pSprite->physLimits.y2)
- y = pSprite->physLimits.y2 - 1;
-
- if (pSprite->hotShape)
- ConfineToShape(pDev, pSprite->hotShape, &x, &y);
- (*newScreen->SetCursorPosition)(pDev, newScreen, x, y, TRUE);
- } else if (!PointerConfinedToScreen(pDev))
- {
- NewCurrentScreen(pDev, newScreen, x, y);
- }
-
- /* if we don't update the device, we get a jump next time it moves */
- pDev->last.valuators[0] = x;
- pDev->last.valuators[1] = y;
- pDev->last.remainder[0] = 0;
- pDev->last.remainder[1] = 0;
- miPointerUpdateSprite(pDev);
-
- /* FIXME: XWarpPointer is supposed to generate an event. It doesn't do it
- here though. */
- return Success;
-}
-
+/*
+ * Copyright 2007-2008 Peter Hutterer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Peter Hutterer, University of South Australia, NICTA
+ */
+
+/***********************************************************************
+ *
+ * Request to Warp the pointer location of an extension input device.
+ *
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <X11/X.h> /* for inputstr.h */
+#include <X11/Xproto.h> /* Request macro */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
+#include "scrnintstr.h" /* screen structure */
+#include <X11/extensions/XI.h>
+#include <X11/extensions/XI2proto.h>
+#include "extnsionst.h"
+#include "exevents.h"
+#include "exglobals.h"
+#include "mipointer.h" /* for miPointerUpdateSprite */
+
+
+#include "xiwarppointer.h"
+/***********************************************************************
+ *
+ * This procedure allows a client to warp the pointer of a device.
+ *
+ */
+
+int
+SProcXIWarpPointer(ClientPtr client)
+{
+ char n;
+
+ REQUEST(xXIWarpPointerReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->src_win, n);
+ swapl(&stuff->dst_win, n);
+ swapl(&stuff->src_x, n);
+ swapl(&stuff->src_y, n);
+ swaps(&stuff->src_width, n);
+ swaps(&stuff->src_height, n);
+ swapl(&stuff->dst_x, n);
+ swapl(&stuff->dst_y, n);
+ swaps(&stuff->deviceid, n);
+ return (ProcXIWarpPointer(client));
+}
+
+int
+ProcXIWarpPointer(ClientPtr client)
+{
+ int rc;
+ int x, y;
+ WindowPtr dest = NULL;
+ DeviceIntPtr pDev;
+ SpritePtr pSprite;
+ ScreenPtr newScreen;
+ int src_x, src_y;
+ int dst_x, dst_y;
+
+ REQUEST(xXIWarpPointerReq);
+ REQUEST_SIZE_MATCH(xXIWarpPointerReq);
+
+ /* FIXME: panoramix stuff is missing, look at ProcWarpPointer */
+
+ rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixWriteAccess);
+
+ if (rc != Success)
+ {
+ client->errorValue = stuff->deviceid;
+ return rc;
+ }
+
+ if ((!IsMaster(pDev) && !IsFloating(pDev)) ||
+ (IsMaster(pDev) && !IsPointerDevice(pDev)))
+ {
+ client->errorValue = stuff->deviceid;
+ return BadDevice;
+ }
+
+ if (stuff->dst_win != None)
+ {
+ rc = dixLookupWindow(&dest, stuff->dst_win, client, DixGetAttrAccess);
+ if (rc != Success)
+ {
+ client->errorValue = stuff->dst_win;
+ return rc;
+ }
+ }
+
+ pSprite = pDev->spriteInfo->sprite;
+ x = pSprite->hotPhys.x;
+ y = pSprite->hotPhys.y;
+
+ src_x = stuff->src_x / (double)(1 << 16);
+ src_y = stuff->src_y / (double)(1 << 16);
+ dst_x = stuff->dst_x / (double)(1 << 16);
+ dst_y = stuff->dst_y / (double)(1 << 16);
+
+ if (stuff->src_win != None)
+ {
+ int winX, winY;
+ WindowPtr src;
+
+ rc = dixLookupWindow(&src, stuff->src_win, client, DixGetAttrAccess);
+ if (rc != Success)
+ {
+ client->errorValue = stuff->src_win;
+ return rc;
+ }
+
+ winX = src->drawable.x;
+ winY = src->drawable.y;
+ if (src->drawable.pScreen != pSprite->hotPhys.pScreen ||
+ x < winX + src_x ||
+ y < winY + src_y ||
+ (stuff->src_width != 0 &&
+ winX + src_x + (int)stuff->src_width < 0) ||
+ (stuff->src_height != 0 &&
+ winY + src_y + (int)stuff->src_height < y) ||
+ !PointInWindowIsVisible(src, x, y))
+ return Success;
+ }
+
+ if (dest)
+ {
+ x = dest->drawable.x;
+ y = dest->drawable.y;
+ newScreen = dest->drawable.pScreen;
+ } else
+ newScreen = pSprite->hotPhys.pScreen;
+
+ x += dst_x;
+ y += dst_y;
+
+ if (x < 0)
+ x = 0;
+ else if (x > newScreen->width)
+ x = newScreen->width - 1;
+
+ if (y < 0)
+ y = 0;
+ else if (y > newScreen->height)
+ y = newScreen->height - 1;
+
+ if (newScreen == pSprite->hotPhys.pScreen)
+ {
+ if (x < pSprite->physLimits.x1)
+ x = pSprite->physLimits.x1;
+ else if (x >= pSprite->physLimits.x2)
+ x = pSprite->physLimits.x2 - 1;
+
+ if (y < pSprite->physLimits.y1)
+ y = pSprite->physLimits.y1;
+ else if (y >= pSprite->physLimits.y2)
+ y = pSprite->physLimits.y2 - 1;
+
+ if (pSprite->hotShape)
+ ConfineToShape(pDev, pSprite->hotShape, &x, &y);
+ (*newScreen->SetCursorPosition)(pDev, newScreen, x, y, TRUE);
+ } else if (!PointerConfinedToScreen(pDev))
+ {
+ NewCurrentScreen(pDev, newScreen, x, y);
+ }
+
+ /* if we don't update the device, we get a jump next time it moves */
+ pDev->last.valuators[0] = x;
+ pDev->last.valuators[1] = y;
+ pDev->last.remainder[0] = 0;
+ pDev->last.remainder[1] = 0;
+ miPointerUpdateSprite(pDev);
+
+ /* FIXME: XWarpPointer is supposed to generate an event. It doesn't do it
+ here though. */
+ return Success;
+}
+
diff --git a/xorg-server/XtErrorDB b/xorg-server/XtErrorDB
new file mode 100644
index 000000000..312862419
--- /dev/null
+++ b/xorg-server/XtErrorDB
@@ -0,0 +1,236 @@
+#****************************************************************************
+#* *
+#* COPYRIGHT (c) 1988 BY *
+#* DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. *
+#* ALL RIGHTS RESERVED *
+#* *
+#* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED *
+#* ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE *
+#* INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER *
+#* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY *
+#* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY *
+#* TRANSFERRED. *
+#* *
+#* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE *
+#* AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT *
+#* CORPORATION. *
+#* *
+#* DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS *
+#* SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. *
+#* *
+#****************************************************************************
+#*++
+#* FACILITY:
+#*
+#* < to be supplied >
+#*
+#* ABSTRACT:
+#*
+#* < to be supplied >
+#*
+#* ENVIRONMENT:
+#*
+#* < to be supplied >
+#*
+#* MODIFICATION HISTORY:
+#*
+#* < to be supplied >
+#*
+#*--
+#
+# toolkit error and warning messages - used in XtGetErrorDatabaseText
+#
+# toolkit error messages:
+#
+# CALLING SEQUENCE:
+#
+# DWTERROR(key, message)
+# XtError (key, "dwtlibError", "DwtlibError", message, NULL, NULL)
+#
+# XtError(name,type,class,defaultp,params,num_params)
+# (*errorHandler)(name,type,class,defaultp,params,num_params);
+#
+# _XtDefaultError (name,type,class,defaultp,params,num_params)
+# XtGetErrorDatabaseText(name,type,class,defaultp, buffer, 1000);
+#
+# XtGetErrorDatabaseText(name,type,class,defaultp, buffer, nbytes)
+# (void) sprintf(temp, "%s.%s", name, type);
+# (void) XrmGetResource(errorDB, temp, class, &type_str, &result);
+#
+attacheddbCircularDependency.dwtlibError: Circular dependency in Attached Dialog Box children
+ClipBoardBadDataType.dwtlibError: bad data type
+ClipBoardCorrupt.dwtlibError: internal error - corrupt data structure
+CvtStringToFontList.dwtlibError: String to FontList conversion needs character_set and screen
+fao_main.dwtlibError: DDIS CS functions have returned an undefined status
+HelpShellOneChild.dwtlibError: Helpshell widget only supports one child
+HiddenShellOneChild.dwtlibError: Hiddenshell widget only supports one child
+#
+# INTRINSIC ROUTINE ERROR MESSAGES
+#
+# CALLING SEQUENCE:
+#
+# XtError(name,type,class,defaultp,params,num_params)
+# (*errorHandler)(name,type,class,defaultp,params,num_params);
+#
+# _XtDefaultError (name,type,class,defaultp,params,num_params)
+# XtGetErrorDatabaseText(name,type,class,defaultp, buffer, 1000);
+#
+# XtGetErrorDatabaseText(name,type,class,defaultp, buffer, nbytes)
+# (void) sprintf(temp, "%s.%s", name, type);
+# (void) XrmGetResource(errorDB, temp, class, &type_str, &result);
+#
+allocError.malloc: Cannot perform malloc
+allocError.realloc: Cannot perform realloc
+allocError.calloc: Cannot perform calloc
+wrongParameters.cvtIntOrPixelToXColor: Pixel to color conversion needs screen and colormap arguments
+wrongParameters.cvtStringToPixel: String to pixel conversion needs screen and colormap arguments
+wrongParameters.cvtStringToCursor: String to cursor conversion needs screen argument
+wrongParamters.cvtStringToFont: String to font conversion needs screen argument
+wrongParameters.cvtStringToFontStruct: String to cursor conversion needs screen argument
+invalidParent.xtCreateWidget: XtCreateWidget requires non-NULL parent
+invalidClass.xtCreateWidget: XtCreateWidget requires non-NULL widget class
+nullProc.insertChild: NULL insert_child procedure
+invalidParameter.removePopupFromParent: RemovePopupFromParent requires non-NULL popuplist
+invalidParent.xtCreatePopupShell: XtCreatePopupShell requires non-NULL parent
+invalidClass.xtCreatePopupShell: XtCreatePopupShell requires non-NULL widget class
+invalidClass.xtCreateApplicationShell: XtCreateApplicationShell requires non-NULL widget class
+invalidParent.xtMakeGeometryRequest: XtMakeGeometryRequest - NULL parent. Use SetValues instead
+invalidParent.xtMakeGeometryRequest: XtMakeGeometryRequest - parent not composite
+invalidGeometryManager.xtMakeGeometryRequest: XtMakeGeometryRequest - parent has no geometry manger
+invalidDisplay.xtInitialize: Can't Open display
+invalidProcedure.realizeProc: No realize class procedure defined
+invalidProcedure.inheritanceProc: Unresolved inheritance operation
+communicationError.select: Select failed
+invalidParameter.xtAddInput: invalid condition passed to XtAddInput
+communicationError.notSelect: Error in notSelect
+communicationError.notSelect: Error in notSelect
+invalidClass.xtPopup: XtPopup requires a subclass of shellWidgetClass
+invalidClass.xtPopdown: XtPopdown requires a subclass of shellWidgetClass
+invalidArgCount.xtGetValues: Argument count > 0 on NULL argument list in XtGetValues
+invalidClass.constraintSetValue: Subclass of Constraint required in CallConstraintSetValues
+invalidArgCount.xtSetValues: Argument count > 0 on NULL argument list in XtSetValues
+noSelectionProperties.freeSelectionProperty: internal error: no selection property context for display
+invalidWindow.eventHandler: Event with wrong window
+invalidParameter.numberChildren: The root and popup shells widget only support one child
+invalidParameter.numberChildren: The root and popup shells widget only support one child
+missingEvent.shell: Events are disappearing from under Shell
+internalError.shell: Shell's window manager interaction is broken
+translationError.mergingTablesWithCycles: Trying to merge translation tables with cycles, and can't resolve this cycle
+invalidParameters.xtmenuPopup: XtMenuPopup called with num_params != 2
+invalidParameters.xtMenuPopup: Bad first parameter to _XtMenuPopup
+invalidPopup.xtMenuPopup: Can't find popup in _XtMenuPopup
+invalidParameters.xtMenuPopupAction: MenuPopup wants exactly one argument
+allocError.malloc: Cannot perform malloc
+allocError.realloc: Cannot perform realloc
+allocError.calloc: Cannot perform calloc
+#
+#
+# toolkit warning messages:
+#
+# CALLING SEQUENCE:
+#
+# DWTWARNING(key, message)
+# XtWarning (key, "dwtlibWarning", "DwtlibWarning", message, NULL, NULL)
+#
+# XtWarning(name,type,class,defaultp,params,num_params)
+# (*warningHandler)(name,type,class,defaultp,params,num_params);
+#
+# _XtDefaultWarning (name,type,class,defaultp,params,num_params)
+# XtGetErrorDatabaseText(name,type,class,defaultp, buffer, 1000);
+#
+# XtGetErrorDatabaseText(name,type,class,defaultp, buffer, nbytes)
+# (void) sprintf(temp, "%s.%s", name, type);
+# (void) XrmGetResource(errorDB, temp, class, &type_str, &result);
+#
+CSCharSetIdOutOfRange.dwtlibWarning: get_charset: Character set ID is out of range
+DialogPopupParent.dwtlibWarning: Parent of DwtModal/Modeless Dialog widget must be Shell
+STextCantFindPosition.dwtlibWarning: Can't find position in MovePreviousLine???
+MenuUnrealizedParent.dwtlibWarning: Can not create a popup menu with unrealized parent
+PulldownNoSubMenu.dwtlibWarning: Can not create a pulldown without a submenu.
+PulldownBadParent.dwtlibWarning: Pulldown widgets must have menuclass parents!
+PulldownBadParent.dwtlibWarning: Pulldown widgets must have menuclass parents!
+PushButton.dwtlibWarning: Accelerator translation table overflow
+ToggleButton.dwtlibWarning: Accelerator translation table overflow
+#
+# DRMSignalError.string: ", "DRMGeneralError",
+# msg, NULL, 0) ;
+#
+# intrinsic routines warning messages
+#
+# CALLING SEQUENCE:
+#
+# XtWarning(name,type,class,defaultp,params,num_params)
+# (*warningHandler)(name,type,class,defaultp,params,num_params);
+#
+# _XtDefaultWarning (name,type,class,defaultp,params,num_params)
+# XtGetErrorDatabaseText(name,type,class,defaultp, buffer, 1000);
+#
+# XtGetErrorDatabaseText(name,type,class,defaultp, buffer, nbytes)
+# (void) sprintf(temp, "%s.%s", name, type);
+# (void) XrmGetResource(errorDB, temp, class, &type_str, &result);
+#
+invalidCallbackList.xtAddCallback: Cannot find callback list in XtAddCallbacks
+invalidCallbackList.xtAddCallback: Cannot find callback list in XtAddCallbacks
+invalidCallbackList.xtRemoveCallback: Cannot find callback list in XtRemoveCallbacks
+invalidCallbackList.xtRemoveCallback: Cannot find callback list in XtRemoveCallbacks
+invalidCallbackList.xtRemoveAllCallback: Cannot find callback list in XtRemoveAllCallbacks
+invalidCallbackList.xtCallCallback: Cannot find callback list in XtCallCallbacks
+invalidCallbackList.xtOverrideCallback: Cannot find callback list in XtOverrideCallbacks
+invalidResourceName.computeArgs: Cannot find resource name %s as argument to conversion
+typeConversionError.noConverter: No type converter registered for '%s' to '%s' conversion
+conversionError.string: Cannot convert string \"%s\" to type %s
+wrongParameters.cvtIntToBoolean: Integer to Boolean conversion needs no extra arguments
+wrongParamters.cvtStringToBoolean: String to Boolean conversion needs no extra arguments
+wrongParamters.cvtIntToLongBoolean: Integer to LongBoolean conversion needs no extra arguments
+wrongParameters.cvtStringToLongBoolean: String to LongBoolean conversion needs no extra arguments
+noColormap.cvtStringToPixel: Cannot allocate colormap entry for \"%s\"
+wrongParameters.cvtStringToDisplay: String to Display conversion needs no extra arguments
+wrongParameters.cvtStringToFile: String to File conversion needs no extra arguments
+wrongParameters.cvtIntToFont: Integer to Font conversion needs no extra arguments
+wrongParameters.cvtStringToInt: String to Integer conversion needs no extra arguments
+wrongParameters.cvtStringToShort: String to Integer conversion needs no extra arguments
+wrongParameters.cvtStringToUnsignedChar: String to Integer conversion needs no extra arguments
+wrongParameters.cvtXColorToPixel: Color to Pixel conversion needs no extra arguments
+wrongParameters.cvtIntToPixel: Integer to Pixel conversion needs no extra arguments
+wrongParameters.cvtIntToPixmap: Integer to Pixmap conversion needs no extra arguments
+invalidDepth.setValues: Can't change widget depth
+versionMismatch.widget: Widget class %s version mismatch:\n widget %d vs. intrinsics %d
+invalidWidget.removePopupFromParent: RemovePopupFromParent,widget not on parent list
+invalidProcedure.deleteChild: null delete_child procedure in XtDestroy
+registerWindowError.xtRegisterWindow: Attempt to change already registered window
+registerWindowError.xtUnregisterWindow: Attempt to unregister invalid window
+grabError.grabDestroyCallback: XtAddGrab requires exclusive grab if spring_loaded is TRUE
+grabError.xtRemoveGrab: XtRemoveGrab asked to remove a widget not on the grab list
+invalidShell.xtTranslateCoords: Widget has no shell ancestor
+invalidChild.xtUnmanageChildren: Null child passed to XtUnmanageChildren
+invalidChild.xtUnmanageChildren: Null child passed to XtUnmanageChildren
+ambigiousParent.xtUnmanageChildren: Not all children have same parent in XtUnmanageChildren
+invalidChild.xtManageChildren: null child passed to XtManageChildren
+invalidChild.xtManageChildren: null child passed to XtManageChildren
+ambigiousParent.xtManageChildren: Not all children have same parent in XtManageChildren
+unimplementedFunction.xtAddInput: XtAddInput is not implemented
+invalidProcedure.inputHandler: XtRemoveInput: Input handler not found
+unimplementedFunction.xtRemoveInput: XtRemoveInput is not implemented
+invalidParent.xtCopyFromParent: CopyFromParent must have non-NULL parent
+invalidArgCount.getResources: argument count > 0 on NULL argument list
+invalidResourceCount.getResources: resource count > 0 on NULL resource list
+invalidGeometry.xtMakeGeometryRequest: Shell subclass did not take care of geometry in XtSetValues
+invalidProcedure.set_values_almost: set_values_almost procedure shouldn't be NULL
+initializationError.xtInitialize: Initializing Resource Lists twice
+communicationError.windowManager: Window Manager is confused
+translationParseError.parseError: translation table syntax error: %s
+translationParseError.parseEvent: Events follow '+' repeat count
+translationParseError.parseEvent: Events follow '+' repeat count
+translationParseError.parseString: Missing \
+invalidParameters.compileAccelerators: String to TranslationTable needs no extra arguments
+invalidParameters.compileTranslations: String to TranslationTable needs no extra arguments
+translationError.xtTranslateInitialize: Intializing Translation manager twice
+#
+# ReportUnboundActions - warnings include state table - should split?
+#
+translationError.unboundActions: Actions not found
+translationError.ambigiousActions: Overriding earlier translation manager actions
+translationError.mergingNullTable: Old translation table was null, cannot modify
+invalidParameters.mergeTranslations: MergeTM to TranslationTable needs no extra arguments
+invalidPopup.unsupportedOperation: Pop-up menu creation is only supported on ButtonPress or EnterNotify events
+invalidPopup.unsupportedOperation: Pop-up menu creation is only supported on ButtonPress or EnterNotify events
diff --git a/xorg-server/composite/compalloc.c b/xorg-server/composite/compalloc.c
index 745166621..8853f7058 100644
--- a/xorg-server/composite/compalloc.c
+++ b/xorg-server/composite/compalloc.c
@@ -145,7 +145,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
*/
if (!cw)
{
- cw = malloc(sizeof (CompWindowRec));
+ cw = calloc (1,sizeof (CompWindowRec));
if (!cw)
{
free(ccw);
diff --git a/xorg-server/composite/compoverlay.c b/xorg-server/composite/compoverlay.c
index 55ce3145b..6ac05e8ad 100644
--- a/xorg-server/composite/compoverlay.c
+++ b/xorg-server/composite/compoverlay.c
@@ -45,6 +45,10 @@
#include <dix-config.h>
#endif
+#ifdef CreateWindow
+#undef CreateWindow
+#endif
+
#include "compint.h"
#include "xace.h"
diff --git a/xorg-server/composite/makefile b/xorg-server/composite/makefile
new file mode 100644
index 000000000..1ab95ebba
--- /dev/null
+++ b/xorg-server/composite/makefile
@@ -0,0 +1,9 @@
+
+LIBRARY=libcomposite
+
+CSRCS = \
+ compalloc.c \
+ compext.c \
+ compinit.c \
+ compoverlay.c \
+ compwindow.c
diff --git a/xorg-server/config/makefile b/xorg-server/config/makefile
new file mode 100644
index 000000000..937785271
--- /dev/null
+++ b/xorg-server/config/makefile
@@ -0,0 +1,4 @@
+CSRCS=config.c
+
+LIBRARY=libconfig
+
diff --git a/xorg-server/damageext/makefile b/xorg-server/damageext/makefile
new file mode 100644
index 000000000..c8481cd3c
--- /dev/null
+++ b/xorg-server/damageext/makefile
@@ -0,0 +1,4 @@
+CSRCS=damageext.c
+
+LIBRARY=libdamageext
+
diff --git a/xorg-server/dbe/makefile b/xorg-server/dbe/makefile
new file mode 100644
index 000000000..70fb81430
--- /dev/null
+++ b/xorg-server/dbe/makefile
@@ -0,0 +1,4 @@
+CSRCS=dbe.c midbe.c
+
+LIBRARY=libdbe
+
diff --git a/xorg-server/dix/Makefile.am b/xorg-server/dix/Makefile.am
index 543554669..c48c71e98 100644
--- a/xorg-server/dix/Makefile.am
+++ b/xorg-server/dix/Makefile.am
@@ -1,74 +1,74 @@
-noinst_LTLIBRARIES = libdix.la libmain.la
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = $(DIX_CFLAGS)
-
-libmain_la_SOURCES = \
- main.c
-
-libdix_la_SOURCES = \
- atom.c \
- colormap.c \
- cursor.c \
- devices.c \
- dispatch.c \
- dispatch.h \
- dixfonts.c \
- dixutils.c \
- enterleave.c \
- enterleave.h \
- events.c \
- eventconvert.c \
- extension.c \
- ffs.c \
- gc.c \
- getevents.c \
- globals.c \
- glyphcurs.c \
- grabs.c \
- initatoms.c \
- inpututils.c \
- pixmap.c \
- privates.c \
- property.c \
- ptrveloc.c \
- region.c \
- registry.c \
- resource.c \
- selection.c \
- swaprep.c \
- swapreq.c \
- tables.c \
- window.c
-
-EXTRA_DIST = buildatoms BuiltInAtoms Xserver.d Xserver-dtrace.h.in
-
-# Install list of protocol names
-miscconfigdir = $(SERVER_MISC_CONFIG_PATH)
-dist_miscconfig_DATA = protocol.txt
-
-if XSERVER_DTRACE
-# Generate dtrace header file for C sources to include
-BUILT_SOURCES = Xserver-dtrace.h
-
-Xserver-dtrace.h: $(srcdir)/Xserver.d
- $(AM_V_GEN)$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \
- || cp Xserver-dtrace.h.in $@
-
-endif
-
-if SPECIAL_DTRACE_OBJECTS
-# Generate dtrace object code for probes in libdix
-dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS)
- $(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
-
-noinst_PROGRAMS = dix.O
-
-dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS)
- $(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
-endif
-
-dix.c:
- touch $@
-
-CLEANFILES = dix.c Xserver-dtrace.h
+noinst_LTLIBRARIES = libdix.la libmain.la
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CFLAGS = $(DIX_CFLAGS)
+
+libmain_la_SOURCES = \
+ main.c
+
+libdix_la_SOURCES = \
+ atom.c \
+ colormap.c \
+ cursor.c \
+ devices.c \
+ dispatch.c \
+ dispatch.h \
+ dixfonts.c \
+ dixutils.c \
+ enterleave.c \
+ enterleave.h \
+ events.c \
+ eventconvert.c \
+ extension.c \
+ ffs.c \
+ gc.c \
+ getevents.c \
+ globals.c \
+ glyphcurs.c \
+ grabs.c \
+ initatoms.c \
+ inpututils.c \
+ pixmap.c \
+ privates.c \
+ property.c \
+ ptrveloc.c \
+ region.c \
+ registry.c \
+ resource.c \
+ selection.c \
+ swaprep.c \
+ swapreq.c \
+ tables.c \
+ window.c
+
+EXTRA_DIST = buildatoms BuiltInAtoms Xserver.d Xserver-dtrace.h.in
+
+# Install list of protocol names
+miscconfigdir = $(SERVER_MISC_CONFIG_PATH)
+dist_miscconfig_DATA = protocol.txt
+
+if XSERVER_DTRACE
+# Generate dtrace header file for C sources to include
+BUILT_SOURCES = Xserver-dtrace.h
+
+Xserver-dtrace.h: $(srcdir)/Xserver.d
+ $(AM_V_GEN)$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \
+ || cp Xserver-dtrace.h.in $@
+
+endif
+
+if SPECIAL_DTRACE_OBJECTS
+# Generate dtrace object code for probes in libdix
+dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS)
+ $(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
+
+noinst_PROGRAMS = dix.O
+
+dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS)
+ $(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
+endif
+
+dix.c:
+ touch $@
+
+CLEANFILES = dix.c Xserver-dtrace.h
diff --git a/xorg-server/dix/Xserver-dtrace.h b/xorg-server/dix/Xserver-dtrace.h
new file mode 100644
index 000000000..0ced498af
--- /dev/null
+++ b/xorg-server/dix/Xserver-dtrace.h
@@ -0,0 +1,75 @@
+/* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
+/*
+ * Generated by dtrace(1M), and then modified for backwards compatibility
+ * with older versions of dtrace. Used if dtrace -h fails.
+ * (Since _ENABLED support was added after dtrace -h, this assumes if
+ * dtrace -h fails, _ENABLED will too.)
+ */
+
+#ifndef _XSERVER_DTRACE_H
+#define _XSERVER_DTRACE_H
+
+#include <unistd.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3) \
+ winDebug4("XSERVER_CLIENT_AUTH: %d %s %d %d\n",arg0, arg1, arg2, arg3)
+#define XSERVER_CLIENT_CONNECT(arg0, arg1) \
+ winDebug4("XSERVER_CLIENT_CONNECT: %d %d\n",arg0, arg1)
+#define XSERVER_CLIENT_DISCONNECT(arg0) \
+ winDebug4("XSERVER_CLIENT_DISCONNECT: %d %d\n",arg0)
+#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4) \
+ winDebug4("XSERVER_REQUEST_DONE: %s %d %d %d %d\n",arg0, arg1, arg2, arg3, arg4)
+#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4) \
+ winDebug4("XSERVER_REQUEST_START: %s %d %d %d ->%p\n",arg0, arg1, arg2, arg3, arg4)
+#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3) \
+ winDebug4("XSERVER_RESOURCE_ALLOC: 0x%x 0x%x ->%p %s\n",arg0, arg1, arg2, arg3)
+#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3) \
+ winDebug4("XSERVER_RESOURCE_FREE: 0x%x 0x%x ->%p %s\n",arg0, arg1, arg2, arg3)
+#define XSERVER_SEND_EVENT(arg0, arg1, arg2) \
+ winDebug4("XSERVER_SEND_EVENT: 0x%x 0x%x ->%p\n",arg0, arg1, arg2)
+
+#define XSERVER_CLIENT_AUTH_ENABLED() (1)
+#define XSERVER_CLIENT_CONNECT_ENABLED() (1)
+#define XSERVER_CLIENT_DISCONNECT_ENABLED() (1)
+#define XSERVER_REQUEST_DONE_ENABLED() (1)
+#define XSERVER_REQUEST_START_ENABLED() (1)
+#define XSERVER_RESOURCE_ALLOC_ENABLED() (1)
+#define XSERVER_RESOURCE_FREE_ENABLED() (1)
+#define XSERVER_SEND_EVENT_ENABLED() (1)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _XSERVER_DTRACE_H */
diff --git a/xorg-server/dix/colormap.c b/xorg-server/dix/colormap.c
index b04739ad0..d8c702703 100644
--- a/xorg-server/dix/colormap.c
+++ b/xorg-server/dix/colormap.c
@@ -66,6 +66,10 @@ SOFTWARE.
#include "privates.h"
#include "xace.h"
+#ifdef _MSC_VER
+#define UpdateColors thisUpdateColors
+#endif
+
static Pixel FindBestPixel(
EntryPtr /*pentFirst*/,
int /*size*/,
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 7f500d63d..925cf0979 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -87,6 +87,10 @@ SOFTWARE.
#include "xserver-properties.h"
#include "xichangehierarchy.h" /* For XISendDeviceHierarchyEvent */
+#ifdef _MSC_VER
+#define isfinite(val) _finite(val)
+#endif
+
/** @file
* This file handles input device-related stuff.
*/
@@ -991,6 +995,10 @@ CloseDownDevices(void)
{
if (!IsMaster(dev) && !IsFloating(dev))
dev->master = NULL;
+ /* Initialise the sprite and paired members of all devices
+ to avoid crashes in CloseDevice later */
+ dev->spriteInfo->sprite=NULL;
+ dev->spriteInfo->paired=NULL;
}
CloseDeviceList(&inputInfo.devices);
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index 601b14a71..5e1c858b6 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -1,3911 +1,3952 @@
-/************************************************************
-
-Copyright 1987, 1989, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-********************************************************/
-
-/* The panoramix components contained the following notice */
-/*****************************************************************
-
-Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
-BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Digital Equipment Corporation
-shall not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from Digital
-Equipment Corporation.
-
-******************************************************************/
-
-/* XSERVER_DTRACE additions:
- * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#include <version-config.h>
-#endif
-
-#ifdef PANORAMIX_DEBUG
-#include <stdio.h>
-int ProcInitialConnection();
-#endif
-
-#include "windowstr.h"
-#include <X11/fonts/fontstruct.h>
-#include "dixfontstr.h"
-#include "gcstruct.h"
-#include "selection.h"
-#include "colormapst.h"
-#include "cursorstr.h"
-#include "scrnintstr.h"
-#include "opaque.h"
-#include "input.h"
-#include "servermd.h"
-#include "extnsionst.h"
-#include "dixfont.h"
-#include "dispatch.h"
-#include "swaprep.h"
-#include "swapreq.h"
-#include "privates.h"
-#include "xace.h"
-#include "inputstr.h"
-#include "xkbsrv.h"
-#include "site.h"
-#include "client.h"
-
-#ifdef XSERVER_DTRACE
-#include "registry.h"
-#include <sys/types.h>
-typedef const char *string;
-#include "Xserver-dtrace.h"
-#endif
-
-#define mskcnt ((MAXCLIENTS + 31) / 32)
-#define BITMASK(i) (1U << ((i) & 31))
-#define MASKIDX(i) ((i) >> 5)
-#define MASKWORD(buf, i) buf[MASKIDX(i)]
-#define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i)
-#define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i)
-#define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i))
-
-xConnSetupPrefix connSetupPrefix;
-
-PaddingInfo PixmapWidthPaddingInfo[33];
-
-static ClientPtr grabClient;
-#define GrabNone 0
-#define GrabActive 1
-#define GrabKickout 2
-static int grabState = GrabNone;
-static long grabWaiters[mskcnt];
-CallbackListPtr ServerGrabCallback = NULL;
-HWEventQueuePtr checkForInput[2];
-int connBlockScreenStart;
-
-static void KillAllClients(void);
-
-static int nextFreeClientID; /* always MIN free client ID */
-
-static int nClients; /* number of authorized clients */
-
-CallbackListPtr ClientStateCallback;
-
-/* dispatchException & isItTimeToYield must be declared volatile since they
- * are modified by signal handlers - otherwise optimizer may assume it doesn't
- * need to actually check value in memory when used and may miss changes from
- * signal handlers.
- */
-volatile char dispatchException = 0;
-volatile char isItTimeToYield;
-
-#define SAME_SCREENS(a, b) (\
- (a.pScreen == b.pScreen))
-
-void
-SetInputCheck(HWEventQueuePtr c0, HWEventQueuePtr c1)
-{
- checkForInput[0] = c0;
- checkForInput[1] = c1;
-}
-
-void
-UpdateCurrentTime(void)
-{
- TimeStamp systime;
-
- /* To avoid time running backwards, we must call GetTimeInMillis before
- * calling ProcessInputEvents.
- */
- systime.months = currentTime.months;
- systime.milliseconds = GetTimeInMillis();
- if (systime.milliseconds < currentTime.milliseconds)
- systime.months++;
- if (*checkForInput[0] != *checkForInput[1])
- ProcessInputEvents();
- if (CompareTimeStamps(systime, currentTime) == LATER)
- currentTime = systime;
-}
-
-/* Like UpdateCurrentTime, but can't call ProcessInputEvents */
-void
-UpdateCurrentTimeIf(void)
-{
- TimeStamp systime;
-
- systime.months = currentTime.months;
- systime.milliseconds = GetTimeInMillis();
- if (systime.milliseconds < currentTime.milliseconds)
- systime.months++;
- if (*checkForInput[0] == *checkForInput[1])
- currentTime = systime;
-}
-
-
-#undef SMART_DEBUG
-
-#define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */
-#define SMART_SCHEDULE_MAX_SLICE 200 /* ms */
-
-Bool SmartScheduleDisable = FALSE;
-long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL;
-long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL;
-long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE;
-long SmartScheduleTime;
-int SmartScheduleLatencyLimited = 0;
-static ClientPtr SmartLastClient;
-static int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1];
-
-#ifdef SMART_DEBUG
-long SmartLastPrint;
-#endif
-
-void Dispatch(void);
-
-static int
-SmartScheduleClient (int *clientReady, int nready)
-{
- ClientPtr pClient;
- int i;
- int client;
- int bestPrio, best = 0;
- int bestRobin, robin;
- long now = SmartScheduleTime;
- long idle;
-
- bestPrio = -0x7fffffff;
- bestRobin = 0;
- idle = 2 * SmartScheduleSlice;
- for (i = 0; i < nready; i++)
- {
- client = clientReady[i];
- pClient = clients[client];
- /* Praise clients which are idle */
- if ((now - pClient->smart_check_tick) >= idle)
- {
- if (pClient->smart_priority < 0)
- pClient->smart_priority++;
- }
- pClient->smart_check_tick = now;
-
- /* check priority to select best client */
- robin = (pClient->index - SmartLastIndex[pClient->smart_priority-SMART_MIN_PRIORITY]) & 0xff;
- if (pClient->smart_priority > bestPrio ||
- (pClient->smart_priority == bestPrio && robin > bestRobin))
- {
- bestPrio = pClient->smart_priority;
- bestRobin = robin;
- best = client;
- }
-#ifdef SMART_DEBUG
- if ((now - SmartLastPrint) >= 5000)
- fprintf (stderr, " %2d: %3d", client, pClient->smart_priority);
-#endif
- }
-#ifdef SMART_DEBUG
- if ((now - SmartLastPrint) >= 5000)
- {
- fprintf (stderr, " use %2d\n", best);
- SmartLastPrint = now;
- }
-#endif
- pClient = clients[best];
- SmartLastIndex[bestPrio-SMART_MIN_PRIORITY] = pClient->index;
- /*
- * Set current client pointer
- */
- if (SmartLastClient != pClient)
- {
- pClient->smart_start_tick = now;
- SmartLastClient = pClient;
- }
- /*
- * Adjust slice
- */
- if (nready == 1 && SmartScheduleLatencyLimited == 0)
- {
- /*
- * If it's been a long time since another client
- * has run, bump the slice up to get maximal
- * performance from a single client
- */
- if ((now - pClient->smart_start_tick) > 1000 &&
- SmartScheduleSlice < SmartScheduleMaxSlice)
- {
- SmartScheduleSlice += SmartScheduleInterval;
- }
- }
- else
- {
- SmartScheduleSlice = SmartScheduleInterval;
- }
- return best;
-}
-
-void
-EnableLimitedSchedulingLatency(void)
-{
- ++SmartScheduleLatencyLimited;
- SmartScheduleSlice = SmartScheduleInterval;
-}
-
-void
-DisableLimitedSchedulingLatency(void)
-{
- --SmartScheduleLatencyLimited;
-
- /* protect against bugs */
- if (SmartScheduleLatencyLimited < 0)
- SmartScheduleLatencyLimited = 0;
-}
-
-#define MAJOROP ((xReq *)client->requestBuffer)->reqType
-
-void
-Dispatch(void)
-{
- int *clientReady; /* array of request ready clients */
- int result;
- ClientPtr client;
- int nready;
- HWEventQueuePtr* icheck = checkForInput;
- long start_tick;
-
- nextFreeClientID = 1;
- nClients = 0;
-
- clientReady = malloc(sizeof(int) * MaxClients);
- if (!clientReady)
- return;
-
- SmartScheduleSlice = SmartScheduleInterval;
- while (!dispatchException)
- {
- if (*icheck[0] != *icheck[1])
- {
- ProcessInputEvents();
- FlushIfCriticalOutputPending();
- }
-
- nready = WaitForSomething(clientReady);
-
- if (nready && !SmartScheduleDisable)
- {
- clientReady[0] = SmartScheduleClient (clientReady, nready);
- nready = 1;
- }
- /*****************
- * Handle events in round robin fashion, doing input between
- * each round
- *****************/
-
- while (!dispatchException && (--nready >= 0))
- {
- client = clients[clientReady[nready]];
- if (! client)
- {
- /* KillClient can cause this to happen */
- continue;
- }
- /* GrabServer activation can cause this to be true */
- if (grabState == GrabKickout)
- {
- grabState = GrabActive;
- break;
- }
- isItTimeToYield = FALSE;
-
- start_tick = SmartScheduleTime;
- while (!isItTimeToYield)
- {
- if (*icheck[0] != *icheck[1])
- ProcessInputEvents();
-
- FlushIfCriticalOutputPending();
- if (!SmartScheduleDisable &&
- (SmartScheduleTime - start_tick) >= SmartScheduleSlice)
- {
- /* Penalize clients which consume ticks */
- if (client->smart_priority > SMART_MIN_PRIORITY)
- client->smart_priority--;
- break;
- }
- /* now, finally, deal with client requests */
-
- result = ReadRequestFromClient(client);
- if (result <= 0)
- {
- if (result < 0)
- CloseDownClient(client);
- break;
- }
-
- client->sequence++;
-#ifdef XSERVER_DTRACE
- XSERVER_REQUEST_START(LookupMajorName(MAJOROP), MAJOROP,
- ((xReq *)client->requestBuffer)->length,
- client->index, client->requestBuffer);
-#endif
- if (result > (maxBigRequestSize << 2))
- result = BadLength;
- else {
- result = XaceHookDispatch(client, MAJOROP);
- if (result == Success)
- result = (* client->requestVector[MAJOROP])(client);
- XaceHookAuditEnd(client, result);
- }
-#ifdef XSERVER_DTRACE
- XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP,
- client->sequence, client->index, result);
-#endif
-
- if (client->noClientException != Success)
- {
- CloseDownClient(client);
- break;
- }
- else if (result != Success)
- {
- SendErrorToClient(client, MAJOROP,
- MinorOpcodeOfRequest(client),
- client->errorValue, result);
- break;
- }
- }
- FlushAllOutput();
- client = clients[clientReady[nready]];
- if (client)
- client->smart_stop_tick = SmartScheduleTime;
- }
- dispatchException &= ~DE_PRIORITYCHANGE;
- }
-#if defined(DDXBEFORERESET)
- ddxBeforeReset ();
-#endif
- KillAllClients();
- free(clientReady);
- dispatchException &= ~DE_RESET;
- SmartScheduleLatencyLimited = 0;
-}
-
-#undef MAJOROP
-
-static int VendorRelease = VENDOR_RELEASE;
-static char *VendorString = VENDOR_NAME;
-
-static const int padlength[4] = {0, 3, 2, 1};
-
-void
-SetVendorRelease(int release)
-{
- VendorRelease = release;
-}
-
-void
-SetVendorString(char *string)
-{
- VendorString = string;
-}
-
-Bool
-CreateConnectionBlock(void)
-{
- xConnSetup setup;
- xWindowRoot root;
- xDepth depth;
- xVisualType visual;
- xPixmapFormat format;
- unsigned long vid;
- int i, j, k,
- lenofblock,
- sizesofar = 0;
- char *pBuf;
-
-
- memset(&setup, 0, sizeof(xConnSetup));
- /* Leave off the ridBase and ridMask, these must be sent with
- connection */
-
- setup.release = VendorRelease;
- /*
- * per-server image and bitmap parameters are defined in Xmd.h
- */
- setup.imageByteOrder = screenInfo.imageByteOrder;
-
- setup.bitmapScanlineUnit = screenInfo.bitmapScanlineUnit;
- setup.bitmapScanlinePad = screenInfo.bitmapScanlinePad;
-
- setup.bitmapBitOrder = screenInfo.bitmapBitOrder;
- setup.motionBufferSize = NumMotionEvents();
- setup.numRoots = screenInfo.numScreens;
- setup.nbytesVendor = strlen(VendorString);
- setup.numFormats = screenInfo.numPixmapFormats;
- setup.maxRequestSize = MAX_REQUEST_SIZE;
- QueryMinMaxKeyCodes(&setup.minKeyCode, &setup.maxKeyCode);
-
- lenofblock = sizeof(xConnSetup) +
- pad_to_int32(setup.nbytesVendor) +
- (setup.numFormats * sizeof(xPixmapFormat)) +
- (setup.numRoots * sizeof(xWindowRoot));
- ConnectionInfo = malloc(lenofblock);
- if (!ConnectionInfo)
- return FALSE;
-
- memmove(ConnectionInfo, (char *)&setup, sizeof(xConnSetup));
- sizesofar = sizeof(xConnSetup);
- pBuf = ConnectionInfo + sizeof(xConnSetup);
-
- memmove(pBuf, VendorString, (int)setup.nbytesVendor);
- sizesofar += setup.nbytesVendor;
- pBuf += setup.nbytesVendor;
- i = padlength[setup.nbytesVendor & 3];
- sizesofar += i;
- while (--i >= 0)
- *pBuf++ = 0;
-
- memset(&format, 0, sizeof(xPixmapFormat));
- for (i=0; i<screenInfo.numPixmapFormats; i++)
- {
- format.depth = screenInfo.formats[i].depth;
- format.bitsPerPixel = screenInfo.formats[i].bitsPerPixel;
- format.scanLinePad = screenInfo.formats[i].scanlinePad;
- memmove(pBuf, (char *)&format, sizeof(xPixmapFormat));
- pBuf += sizeof(xPixmapFormat);
- sizesofar += sizeof(xPixmapFormat);
- }
-
- connBlockScreenStart = sizesofar;
- memset(&depth, 0, sizeof(xDepth));
- memset(&visual, 0, sizeof(xVisualType));
- for (i=0; i<screenInfo.numScreens; i++)
- {
- ScreenPtr pScreen;
- DepthPtr pDepth;
- VisualPtr pVisual;
-
- pScreen = screenInfo.screens[i];
- root.windowId = pScreen->root->drawable.id;
- root.defaultColormap = pScreen->defColormap;
- root.whitePixel = pScreen->whitePixel;
- root.blackPixel = pScreen->blackPixel;
- root.currentInputMask = 0; /* filled in when sent */
- root.pixWidth = pScreen->width;
- root.pixHeight = pScreen->height;
- root.mmWidth = pScreen->mmWidth;
- root.mmHeight = pScreen->mmHeight;
- root.minInstalledMaps = pScreen->minInstalledCmaps;
- root.maxInstalledMaps = pScreen->maxInstalledCmaps;
- root.rootVisualID = pScreen->rootVisual;
- root.backingStore = pScreen->backingStoreSupport;
- root.saveUnders = FALSE;
- root.rootDepth = pScreen->rootDepth;
- root.nDepths = pScreen->numDepths;
- memmove(pBuf, (char *)&root, sizeof(xWindowRoot));
- sizesofar += sizeof(xWindowRoot);
- pBuf += sizeof(xWindowRoot);
-
- pDepth = pScreen->allowedDepths;
- for(j = 0; j < pScreen->numDepths; j++, pDepth++)
- {
- lenofblock += sizeof(xDepth) +
- (pDepth->numVids * sizeof(xVisualType));
- pBuf = (char *)realloc(ConnectionInfo, lenofblock);
- if (!pBuf)
- {
- free(ConnectionInfo);
- return FALSE;
- }
- ConnectionInfo = pBuf;
- pBuf += sizesofar;
- depth.depth = pDepth->depth;
- depth.nVisuals = pDepth->numVids;
- memmove(pBuf, (char *)&depth, sizeof(xDepth));
- pBuf += sizeof(xDepth);
- sizesofar += sizeof(xDepth);
- for(k = 0; k < pDepth->numVids; k++)
- {
- vid = pDepth->vids[k];
- for (pVisual = pScreen->visuals;
- pVisual->vid != vid;
- pVisual++)
- ;
- visual.visualID = vid;
- visual.class = pVisual->class;
- visual.bitsPerRGB = pVisual->bitsPerRGBValue;
- visual.colormapEntries = pVisual->ColormapEntries;
- visual.redMask = pVisual->redMask;
- visual.greenMask = pVisual->greenMask;
- visual.blueMask = pVisual->blueMask;
- memmove(pBuf, (char *)&visual, sizeof(xVisualType));
- pBuf += sizeof(xVisualType);
- sizesofar += sizeof(xVisualType);
- }
- }
- }
- connSetupPrefix.success = xTrue;
- connSetupPrefix.length = lenofblock/4;
- connSetupPrefix.majorVersion = X_PROTOCOL;
- connSetupPrefix.minorVersion = X_PROTOCOL_REVISION;
- return TRUE;
-}
-
-
-int
-ProcBadRequest(ClientPtr client)
-{
- return BadRequest;
-}
-
-int
-ProcCreateWindow(ClientPtr client)
-{
- WindowPtr pParent, pWin;
- REQUEST(xCreateWindowReq);
- int len, rc;
-
- REQUEST_AT_LEAST_SIZE(xCreateWindowReq);
-
- LEGAL_NEW_RESOURCE(stuff->wid, client);
- rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess);
- if (rc != Success)
- return rc;
- len = client->req_len - bytes_to_int32(sizeof(xCreateWindowReq));
- if (Ones(stuff->mask) != len)
- return BadLength;
- if (!stuff->width || !stuff->height)
- {
- client->errorValue = 0;
- return BadValue;
- }
- pWin = CreateWindow(stuff->wid, pParent, stuff->x,
- stuff->y, stuff->width, stuff->height,
- stuff->borderWidth, stuff->class,
- stuff->mask, (XID *) &stuff[1],
- (int)stuff->depth,
- client, stuff->visual, &rc);
- if (pWin)
- {
- Mask mask = pWin->eventMask;
-
- pWin->eventMask = 0; /* subterfuge in case AddResource fails */
- if (!AddResource(stuff->wid, RT_WINDOW, (pointer)pWin))
- return BadAlloc;
- pWin->eventMask = mask;
- }
- return rc;
-}
-
-int
-ProcChangeWindowAttributes(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xChangeWindowAttributesReq);
- int len, rc;
- Mask access_mode = 0;
-
- REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
- access_mode |= (stuff->valueMask & CWEventMask) ? DixReceiveAccess : 0;
- access_mode |= (stuff->valueMask & ~CWEventMask) ? DixSetAttrAccess : 0;
- rc = dixLookupWindow(&pWin, stuff->window, client, access_mode);
- if (rc != Success)
- return rc;
- len = client->req_len - bytes_to_int32(sizeof(xChangeWindowAttributesReq));
- if (len != Ones(stuff->valueMask))
- return BadLength;
- return ChangeWindowAttributes(pWin,
- stuff->valueMask,
- (XID *) &stuff[1],
- client);
-}
-
-int
-ProcGetWindowAttributes(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xResourceReq);
- xGetWindowAttributesReply wa;
- int rc;
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
- memset(&wa, 0, sizeof(xGetWindowAttributesReply));
- GetWindowAttributes(pWin, client, &wa);
- WriteReplyToClient(client, sizeof(xGetWindowAttributesReply), &wa);
- return Success;
-}
-
-int
-ProcDestroyWindow(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xResourceReq);
- int rc;
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess);
- if (rc != Success)
- return rc;
- if (pWin->parent) {
- rc = dixLookupWindow(&pWin, pWin->parent->drawable.id, client,
- DixRemoveAccess);
- if (rc != Success)
- return rc;
- FreeResource(stuff->id, RT_NONE);
- }
- return Success;
-}
-
-int
-ProcDestroySubwindows(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xResourceReq);
- int rc;
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupWindow(&pWin, stuff->id, client, DixRemoveAccess);
- if (rc != Success)
- return rc;
- DestroySubwindows(pWin, client);
- return Success;
-}
-
-int
-ProcChangeSaveSet(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xChangeSaveSetReq);
- int rc;
-
- REQUEST_SIZE_MATCH(xChangeSaveSetReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
- if (rc != Success)
- return rc;
- if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id)))
- return BadMatch;
- if ((stuff->mode == SetModeInsert) || (stuff->mode == SetModeDelete))
- return AlterSaveSetForClient(client, pWin, stuff->mode, FALSE, TRUE);
- client->errorValue = stuff->mode;
- return BadValue;
-}
-
-int
-ProcReparentWindow(ClientPtr client)
-{
- WindowPtr pWin, pParent;
- REQUEST(xReparentWindowReq);
- int rc;
-
- REQUEST_SIZE_MATCH(xReparentWindowReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
- if (rc != Success)
- return rc;
- rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess);
- if (rc != Success)
- return rc;
- if (!SAME_SCREENS(pWin->drawable, pParent->drawable))
- return BadMatch;
- if ((pWin->backgroundState == ParentRelative) &&
- (pParent->drawable.depth != pWin->drawable.depth))
- return BadMatch;
- if ((pWin->drawable.class != InputOnly) &&
- (pParent->drawable.class == InputOnly))
- return BadMatch;
- return ReparentWindow(pWin, pParent,
- (short)stuff->x, (short)stuff->y, client);
-}
-
-int
-ProcMapWindow(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xResourceReq);
- int rc;
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupWindow(&pWin, stuff->id, client, DixShowAccess);
- if (rc != Success)
- return rc;
- MapWindow(pWin, client);
- /* update cache to say it is mapped */
- return Success;
-}
-
-int
-ProcMapSubwindows(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xResourceReq);
- int rc;
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
- if (rc != Success)
- return rc;
- MapSubwindows(pWin, client);
- /* update cache to say it is mapped */
- return Success;
-}
-
-int
-ProcUnmapWindow(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xResourceReq);
- int rc;
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupWindow(&pWin, stuff->id, client, DixHideAccess);
- if (rc != Success)
- return rc;
- UnmapWindow(pWin, FALSE);
- /* update cache to say it is mapped */
- return Success;
-}
-
-int
-ProcUnmapSubwindows(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xResourceReq);
- int rc;
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
- if (rc != Success)
- return rc;
- UnmapSubwindows(pWin);
- return Success;
-}
-
-int
-ProcConfigureWindow(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xConfigureWindowReq);
- int len, rc;
-
- REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
- rc = dixLookupWindow(&pWin, stuff->window, client,
- DixManageAccess|DixSetAttrAccess);
- if (rc != Success)
- return rc;
- len = client->req_len - bytes_to_int32(sizeof(xConfigureWindowReq));
- if (Ones((Mask)stuff->mask) != len)
- return BadLength;
- return ConfigureWindow(pWin, (Mask)stuff->mask, (XID *) &stuff[1], client);
-}
-
-int
-ProcCirculateWindow(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xCirculateWindowReq);
- int rc;
-
- REQUEST_SIZE_MATCH(xCirculateWindowReq);
- if ((stuff->direction != RaiseLowest) &&
- (stuff->direction != LowerHighest))
- {
- client->errorValue = stuff->direction;
- return BadValue;
- }
- rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
- if (rc != Success)
- return rc;
- CirculateWindow(pWin, (int)stuff->direction, client);
- return Success;
-}
-
-static int
-GetGeometry(ClientPtr client, xGetGeometryReply *rep)
-{
- DrawablePtr pDraw;
- int rc;
- REQUEST(xResourceReq);
- REQUEST_SIZE_MATCH(xResourceReq);
-
- rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- rep->type = X_Reply;
- rep->length = 0;
- rep->sequenceNumber = client->sequence;
- rep->root = pDraw->pScreen->root->drawable.id;
- rep->depth = pDraw->depth;
- rep->width = pDraw->width;
- rep->height = pDraw->height;
-
- if (WindowDrawable(pDraw->type))
- {
- WindowPtr pWin = (WindowPtr)pDraw;
- rep->x = pWin->origin.x - wBorderWidth (pWin);
- rep->y = pWin->origin.y - wBorderWidth (pWin);
- rep->borderWidth = pWin->borderWidth;
- }
- else /* DRAWABLE_PIXMAP */
- {
- rep->x = rep->y = rep->borderWidth = 0;
- }
-
- return Success;
-}
-
-
-int
-ProcGetGeometry(ClientPtr client)
-{
- xGetGeometryReply rep;
- int status;
-
- memset(&rep, 0, sizeof(xGetGeometryReply));
- if ((status = GetGeometry(client, &rep)) != Success)
- return status;
-
- WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep);
- return Success;
-}
-
-
-int
-ProcQueryTree(ClientPtr client)
-{
- xQueryTreeReply reply;
- int rc, numChildren = 0;
- WindowPtr pChild, pWin, pHead;
- Window *childIDs = (Window *)NULL;
- REQUEST(xResourceReq);
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
- if (rc != Success)
- return rc;
- memset(&reply, 0, sizeof(xQueryTreeReply));
- reply.type = X_Reply;
- reply.root = pWin->drawable.pScreen->root->drawable.id;
- reply.sequenceNumber = client->sequence;
- if (pWin->parent)
- reply.parent = pWin->parent->drawable.id;
- else
- reply.parent = (Window)None;
- pHead = RealChildHead(pWin);
- for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib)
- numChildren++;
- if (numChildren)
- {
- int curChild = 0;
-
- childIDs = malloc(numChildren * sizeof(Window));
- if (!childIDs)
- return BadAlloc;
- for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib)
- childIDs[curChild++] = pChild->drawable.id;
- }
-
- reply.nChildren = numChildren;
- reply.length = bytes_to_int32(numChildren * sizeof(Window));
-
- WriteReplyToClient(client, sizeof(xQueryTreeReply), &reply);
- if (numChildren)
- {
- client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
- WriteSwappedDataToClient(client, numChildren * sizeof(Window), childIDs);
- free(childIDs);
- }
-
- return Success;
-}
-
-int
-ProcInternAtom(ClientPtr client)
-{
- Atom atom;
- char *tchar;
- REQUEST(xInternAtomReq);
-
- REQUEST_FIXED_SIZE(xInternAtomReq, stuff->nbytes);
- if ((stuff->onlyIfExists != xTrue) && (stuff->onlyIfExists != xFalse))
- {
- client->errorValue = stuff->onlyIfExists;
- return BadValue;
- }
- tchar = (char *) &stuff[1];
- atom = MakeAtom(tchar, stuff->nbytes, !stuff->onlyIfExists);
- if (atom != BAD_RESOURCE)
- {
- xInternAtomReply reply;
- memset(&reply, 0, sizeof(xInternAtomReply));
- reply.type = X_Reply;
- reply.length = 0;
- reply.sequenceNumber = client->sequence;
- reply.atom = atom;
- WriteReplyToClient(client, sizeof(xInternAtomReply), &reply);
- return Success;
- }
- else
- return BadAlloc;
-}
-
-int
-ProcGetAtomName(ClientPtr client)
-{
- const char *str;
- xGetAtomNameReply reply;
- int len;
- REQUEST(xResourceReq);
-
- REQUEST_SIZE_MATCH(xResourceReq);
- if ( (str = NameForAtom(stuff->id)) )
- {
- len = strlen(str);
- memset(&reply, 0, sizeof(xGetAtomNameReply));
- reply.type = X_Reply;
- reply.length = bytes_to_int32(len);
- reply.sequenceNumber = client->sequence;
- reply.nameLength = len;
- WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply);
- (void)WriteToClient(client, len, str);
- return Success;
- }
- else
- {
- client->errorValue = stuff->id;
- return BadAtom;
- }
-}
-
-int
-ProcGrabServer(ClientPtr client)
-{
- int rc;
- REQUEST_SIZE_MATCH(xReq);
- if (grabState != GrabNone && client != grabClient)
- {
- ResetCurrentRequest(client);
- client->sequence--;
- BITSET(grabWaiters, client->index);
- IgnoreClient(client);
- return Success;
- }
- rc = OnlyListenToOneClient(client);
- if (rc != Success)
- return rc;
- grabState = GrabKickout;
- grabClient = client;
-
- if (ServerGrabCallback)
- {
- ServerGrabInfoRec grabinfo;
- grabinfo.client = client;
- grabinfo.grabstate = SERVER_GRABBED;
- CallCallbacks(&ServerGrabCallback, (pointer)&grabinfo);
- }
-
- return Success;
-}
-
-static void
-UngrabServer(ClientPtr client)
-{
- int i;
-
- grabState = GrabNone;
- ListenToAllClients();
- for (i = mskcnt; --i >= 0 && !grabWaiters[i]; )
- ;
- if (i >= 0)
- {
- i <<= 5;
- while (!GETBIT(grabWaiters, i))
- i++;
- BITCLEAR(grabWaiters, i);
- AttendClient(clients[i]);
- }
-
- if (ServerGrabCallback)
- {
- ServerGrabInfoRec grabinfo;
- grabinfo.client = client;
- grabinfo.grabstate = SERVER_UNGRABBED;
- CallCallbacks(&ServerGrabCallback, (pointer)&grabinfo);
- }
-}
-
-int
-ProcUngrabServer(ClientPtr client)
-{
- REQUEST_SIZE_MATCH(xReq);
- UngrabServer(client);
- return Success;
-}
-
-int
-ProcTranslateCoords(ClientPtr client)
-{
- REQUEST(xTranslateCoordsReq);
-
- WindowPtr pWin, pDst;
- xTranslateCoordsReply rep;
- int rc;
-
- REQUEST_SIZE_MATCH(xTranslateCoordsReq);
- rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
- rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
- memset(&rep, 0, sizeof(xTranslateCoordsReply));
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- if (!SAME_SCREENS(pWin->drawable, pDst->drawable))
- {
- rep.sameScreen = xFalse;
- rep.child = None;
- rep.dstX = rep.dstY = 0;
- }
- else
- {
- INT16 x, y;
- rep.sameScreen = xTrue;
- rep.child = None;
- /* computing absolute coordinates -- adjust to destination later */
- x = pWin->drawable.x + stuff->srcX;
- y = pWin->drawable.y + stuff->srcY;
- pWin = pDst->firstChild;
- while (pWin)
- {
- BoxRec box;
- if ((pWin->mapped) &&
- (x >= pWin->drawable.x - wBorderWidth (pWin)) &&
- (x < pWin->drawable.x + (int)pWin->drawable.width +
- wBorderWidth (pWin)) &&
- (y >= pWin->drawable.y - wBorderWidth (pWin)) &&
- (y < pWin->drawable.y + (int)pWin->drawable.height +
- wBorderWidth (pWin))
- /* When a window is shaped, a further check
- * is made to see if the point is inside
- * borderSize
- */
- && (!wBoundingShape(pWin) ||
- RegionContainsPoint(&pWin->borderSize, x, y, &box))
-
- && (!wInputShape(pWin) ||
- RegionContainsPoint(wInputShape(pWin),
- x - pWin->drawable.x,
- y - pWin->drawable.y, &box))
- )
- {
- rep.child = pWin->drawable.id;
- pWin = (WindowPtr) NULL;
- }
- else
- pWin = pWin->nextSib;
- }
- /* adjust to destination coordinates */
- rep.dstX = x - pDst->drawable.x;
- rep.dstY = y - pDst->drawable.y;
- }
- WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep);
- return Success;
-}
-
-int
-ProcOpenFont(ClientPtr client)
-{
- int err;
- REQUEST(xOpenFontReq);
-
- REQUEST_FIXED_SIZE(xOpenFontReq, stuff->nbytes);
- client->errorValue = stuff->fid;
- LEGAL_NEW_RESOURCE(stuff->fid, client);
- err = OpenFont(client, stuff->fid, (Mask) 0,
- stuff->nbytes, (char *)&stuff[1]);
- if (err == Success)
- {
- return Success;
- }
- else
- return err;
-}
-
-int
-ProcCloseFont(ClientPtr client)
-{
- FontPtr pFont;
- int rc;
- REQUEST(xResourceReq);
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT,
- client, DixDestroyAccess);
- if (rc == Success)
- {
- FreeResource(stuff->id, RT_NONE);
- return Success;
- }
- else
- {
- client->errorValue = stuff->id;
- return rc;
- }
-}
-
-int
-ProcQueryFont(ClientPtr client)
-{
- xQueryFontReply *reply;
- FontPtr pFont;
- int rc;
- REQUEST(xResourceReq);
- REQUEST_SIZE_MATCH(xResourceReq);
-
- rc = dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- {
- xCharInfo *pmax = FONTINKMAX(pFont);
- xCharInfo *pmin = FONTINKMIN(pFont);
- int nprotoxcistructs;
- int rlength;
-
- nprotoxcistructs = (
- pmax->rightSideBearing == pmin->rightSideBearing &&
- pmax->leftSideBearing == pmin->leftSideBearing &&
- pmax->descent == pmin->descent &&
- pmax->ascent == pmin->ascent &&
- pmax->characterWidth == pmin->characterWidth) ?
- 0 : N2dChars(pFont);
-
- rlength = sizeof(xQueryFontReply) +
- FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) +
- nprotoxcistructs * sizeof(xCharInfo);
- reply = calloc(1, rlength);
- if(!reply)
- {
- return BadAlloc;
- }
-
- reply->type = X_Reply;
- reply->length = bytes_to_int32(rlength - sizeof(xGenericReply));
- reply->sequenceNumber = client->sequence;
- QueryFont( pFont, reply, nprotoxcistructs);
-
- WriteReplyToClient(client, rlength, reply);
- free(reply);
- return Success;
- }
-}
-
-int
-ProcQueryTextExtents(ClientPtr client)
-{
- xQueryTextExtentsReply reply;
- FontPtr pFont;
- ExtentInfoRec info;
- unsigned long length;
- int rc;
- REQUEST(xQueryTextExtentsReq);
- REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq);
-
- rc = dixLookupFontable(&pFont, stuff->fid, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- length = client->req_len - bytes_to_int32(sizeof(xQueryTextExtentsReq));
- length = length << 1;
- if (stuff->oddLength)
- {
- if (length == 0)
- return BadLength;
- length--;
- }
- if (!QueryTextExtents(pFont, length, (unsigned char *)&stuff[1], &info))
- return BadAlloc;
- reply.type = X_Reply;
- reply.length = 0;
- reply.sequenceNumber = client->sequence;
- reply.drawDirection = info.drawDirection;
- reply.fontAscent = info.fontAscent;
- reply.fontDescent = info.fontDescent;
- reply.overallAscent = info.overallAscent;
- reply.overallDescent = info.overallDescent;
- reply.overallWidth = info.overallWidth;
- reply.overallLeft = info.overallLeft;
- reply.overallRight = info.overallRight;
- WriteReplyToClient(client, sizeof(xQueryTextExtentsReply), &reply);
- return Success;
-}
-
-int
-ProcListFonts(ClientPtr client)
-{
- REQUEST(xListFontsReq);
-
- REQUEST_FIXED_SIZE(xListFontsReq, stuff->nbytes);
-
- return ListFonts(client, (unsigned char *) &stuff[1], stuff->nbytes,
- stuff->maxNames);
-}
-
-int
-ProcListFontsWithInfo(ClientPtr client)
-{
- REQUEST(xListFontsWithInfoReq);
-
- REQUEST_FIXED_SIZE(xListFontsWithInfoReq, stuff->nbytes);
-
- return StartListFontsWithInfo(client, stuff->nbytes,
- (unsigned char *) &stuff[1], stuff->maxNames);
-}
-
-/**
- *
- * \param value must conform to DeleteType
- */
-int
-dixDestroyPixmap(pointer value, XID pid)
-{
- PixmapPtr pPixmap = (PixmapPtr)value;
- return (*pPixmap->drawable.pScreen->DestroyPixmap)(pPixmap);
-}
-
-int
-ProcCreatePixmap(ClientPtr client)
-{
- PixmapPtr pMap;
- DrawablePtr pDraw;
- REQUEST(xCreatePixmapReq);
- DepthPtr pDepth;
- int i, rc;
-
- REQUEST_SIZE_MATCH(xCreatePixmapReq);
- client->errorValue = stuff->pid;
- LEGAL_NEW_RESOURCE(stuff->pid, client);
-
- rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY,
- DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- if (!stuff->width || !stuff->height)
- {
- client->errorValue = 0;
- return BadValue;
- }
- if (stuff->width > 32767 || stuff->height > 32767)
- {
- /* It is allowed to try and allocate a pixmap which is larger than
- * 32767 in either dimension. However, all of the framebuffer code
- * is buggy and does not reliably draw to such big pixmaps, basically
- * because the Region data structure operates with signed shorts
- * for the rectangles in it.
- *
- * Furthermore, several places in the X server computes the
- * size in bytes of the pixmap and tries to store it in an
- * integer. This integer can overflow and cause the allocated size
- * to be much smaller.
- *
- * So, such big pixmaps are rejected here with a BadAlloc
- */
- return BadAlloc;
- }
- if (stuff->depth != 1)
- {
- pDepth = pDraw->pScreen->allowedDepths;
- for (i=0; i<pDraw->pScreen->numDepths; i++, pDepth++)
- if (pDepth->depth == stuff->depth)
- goto CreatePmap;
- client->errorValue = stuff->depth;
- return BadValue;
- }
-CreatePmap:
- pMap = (PixmapPtr)(*pDraw->pScreen->CreatePixmap)
- (pDraw->pScreen, stuff->width,
- stuff->height, stuff->depth, 0);
- if (pMap)
- {
- pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
- pMap->drawable.id = stuff->pid;
- /* security creation/labeling check */
- rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, RT_PIXMAP,
- pMap, RT_NONE, NULL, DixCreateAccess);
- if (rc != Success) {
- (*pDraw->pScreen->DestroyPixmap)(pMap);
- return rc;
- }
- if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap))
- return Success;
- (*pDraw->pScreen->DestroyPixmap)(pMap);
- }
- return BadAlloc;
-}
-
-int
-ProcFreePixmap(ClientPtr client)
-{
- PixmapPtr pMap;
- int rc;
- REQUEST(xResourceReq);
- REQUEST_SIZE_MATCH(xResourceReq);
-
- rc = dixLookupResourceByType((pointer *)&pMap, stuff->id, RT_PIXMAP, client,
- DixDestroyAccess);
- if (rc == Success)
- {
- FreeResource(stuff->id, RT_NONE);
- return Success;
- }
- else
- {
- client->errorValue = stuff->id;
- return rc;
- }
-}
-
-int
-ProcCreateGC(ClientPtr client)
-{
- int error, rc;
- GC *pGC;
- DrawablePtr pDraw;
- unsigned len;
- REQUEST(xCreateGCReq);
-
- REQUEST_AT_LEAST_SIZE(xCreateGCReq);
- client->errorValue = stuff->gc;
- LEGAL_NEW_RESOURCE(stuff->gc, client);
- rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
- DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- len = client->req_len - bytes_to_int32(sizeof(xCreateGCReq));
- if (len != Ones(stuff->mask))
- return BadLength;
- pGC = (GC *)CreateGC(pDraw, stuff->mask, (XID *) &stuff[1], &error,
- stuff->gc, client);
- if (error != Success)
- return error;
- if (!AddResource(stuff->gc, RT_GC, (pointer)pGC))
- return BadAlloc;
- return Success;
-}
-
-int
-ProcChangeGC(ClientPtr client)
-{
- GC *pGC;
- int result;
- unsigned len;
- REQUEST(xChangeGCReq);
- REQUEST_AT_LEAST_SIZE(xChangeGCReq);
-
- result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess);
- if (result != Success)
- return result;
-
- len = client->req_len - bytes_to_int32(sizeof(xChangeGCReq));
- if (len != Ones(stuff->mask))
- return BadLength;
-
- return ChangeGCXIDs(client, pGC, stuff->mask, (CARD32 *) &stuff[1]);
-}
-
-int
-ProcCopyGC(ClientPtr client)
-{
- GC *dstGC;
- GC *pGC;
- int result;
- REQUEST(xCopyGCReq);
- REQUEST_SIZE_MATCH(xCopyGCReq);
-
- result = dixLookupGC(&pGC, stuff->srcGC, client, DixGetAttrAccess);
- if (result != Success)
- return result;
- result = dixLookupGC(&dstGC, stuff->dstGC, client, DixSetAttrAccess);
- if (result != Success)
- return result;
- if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth))
- return BadMatch;
- if (stuff->mask & ~GCAllBits)
- {
- client->errorValue = stuff->mask;
- return BadValue;
- }
- return CopyGC(pGC, dstGC, stuff->mask);
-}
-
-int
-ProcSetDashes(ClientPtr client)
-{
- GC *pGC;
- int result;
- REQUEST(xSetDashesReq);
-
- REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes);
- if (stuff->nDashes == 0)
- {
- client->errorValue = 0;
- return BadValue;
- }
-
- result = dixLookupGC(&pGC,stuff->gc, client, DixSetAttrAccess);
- if (result != Success)
- return result;
-
- /* If there's an error, either there's no sensible errorValue,
- * or there was a dash segment of 0. */
- client->errorValue = 0;
- return SetDashes(pGC, stuff->dashOffset, stuff->nDashes,
- (unsigned char *)&stuff[1]);
-}
-
-int
-ProcSetClipRectangles(ClientPtr client)
-{
- int nr, result;
- GC *pGC;
- REQUEST(xSetClipRectanglesReq);
-
- REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
- if ((stuff->ordering != Unsorted) && (stuff->ordering != YSorted) &&
- (stuff->ordering != YXSorted) && (stuff->ordering != YXBanded))
- {
- client->errorValue = stuff->ordering;
- return BadValue;
- }
- result = dixLookupGC(&pGC,stuff->gc, client, DixSetAttrAccess);
- if (result != Success)
- return result;
-
- nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq);
- if (nr & 4)
- return BadLength;
- nr >>= 3;
- return SetClipRects(pGC, stuff->xOrigin, stuff->yOrigin,
- nr, (xRectangle *)&stuff[1], (int)stuff->ordering);
-}
-
-int
-ProcFreeGC(ClientPtr client)
-{
- GC *pGC;
- int rc;
- REQUEST(xResourceReq);
- REQUEST_SIZE_MATCH(xResourceReq);
-
- rc = dixLookupGC(&pGC, stuff->id, client, DixDestroyAccess);
- if (rc != Success)
- return rc;
-
- FreeResource(stuff->id, RT_NONE);
- return Success;
-}
-
-int
-ProcClearToBackground(ClientPtr client)
-{
- REQUEST(xClearAreaReq);
- WindowPtr pWin;
- int rc;
-
- REQUEST_SIZE_MATCH(xClearAreaReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
- if (rc != Success)
- return rc;
- if (pWin->drawable.class == InputOnly)
- {
- client->errorValue = stuff->window;
- return BadMatch;
- }
- if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse))
- {
- client->errorValue = stuff->exposures;
- return BadValue;
- }
- (*pWin->drawable.pScreen->ClearToBackground)(pWin, stuff->x, stuff->y,
- stuff->width, stuff->height,
- (Bool)stuff->exposures);
- return Success;
-}
-
-int
-ProcCopyArea(ClientPtr client)
-{
- DrawablePtr pDst;
- DrawablePtr pSrc;
- GC *pGC;
- REQUEST(xCopyAreaReq);
- RegionPtr pRgn;
- int rc;
-
- REQUEST_SIZE_MATCH(xCopyAreaReq);
-
- VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess);
- if (stuff->dstDrawable != stuff->srcDrawable)
- {
- rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0,
- DixReadAccess);
- if (rc != Success)
- return rc;
- if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth))
- {
- client->errorValue = stuff->dstDrawable;
- return BadMatch;
- }
- }
- else
- pSrc = pDst;
-
- pRgn = (*pGC->ops->CopyArea)(pSrc, pDst, pGC, stuff->srcX, stuff->srcY,
- stuff->width, stuff->height,
- stuff->dstX, stuff->dstY);
- if (pGC->graphicsExposures)
- {
- (*pDst->pScreen->SendGraphicsExpose)
- (client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
- if (pRgn)
- RegionDestroy(pRgn);
- }
-
- return Success;
-}
-
-int
-ProcCopyPlane(ClientPtr client)
-{
- DrawablePtr psrcDraw, pdstDraw;
- GC *pGC;
- REQUEST(xCopyPlaneReq);
- RegionPtr pRgn;
- int rc;
-
- REQUEST_SIZE_MATCH(xCopyPlaneReq);
-
- VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess);
- if (stuff->dstDrawable != stuff->srcDrawable)
- {
- rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0,
- DixReadAccess);
- if (rc != Success)
- return rc;
-
- if (pdstDraw->pScreen != psrcDraw->pScreen)
- {
- client->errorValue = stuff->dstDrawable;
- return BadMatch;
- }
- }
- else
- psrcDraw = pdstDraw;
-
- /* Check to see if stuff->bitPlane has exactly ONE good bit set */
- if(stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) ||
- (stuff->bitPlane > (1L << (psrcDraw->depth - 1))))
- {
- client->errorValue = stuff->bitPlane;
- return BadValue;
- }
-
- pRgn = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC, stuff->srcX, stuff->srcY,
- stuff->width, stuff->height,
- stuff->dstX, stuff->dstY, stuff->bitPlane);
- if (pGC->graphicsExposures)
- {
- (*pdstDraw->pScreen->SendGraphicsExpose)
- (client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
- if (pRgn)
- RegionDestroy(pRgn);
- }
- return Success;
-}
-
-int
-ProcPolyPoint(ClientPtr client)
-{
- int npoint;
- GC *pGC;
- DrawablePtr pDraw;
- REQUEST(xPolyPointReq);
-
- REQUEST_AT_LEAST_SIZE(xPolyPointReq);
- if ((stuff->coordMode != CoordModeOrigin) &&
- (stuff->coordMode != CoordModePrevious))
- {
- client->errorValue = stuff->coordMode;
- return BadValue;
- }
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
- npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq));
- if (npoint)
- (*pGC->ops->PolyPoint)(pDraw, pGC, stuff->coordMode, npoint,
- (xPoint *) &stuff[1]);
- return Success;
-}
-
-int
-ProcPolyLine(ClientPtr client)
-{
- int npoint;
- GC *pGC;
- DrawablePtr pDraw;
- REQUEST(xPolyLineReq);
-
- REQUEST_AT_LEAST_SIZE(xPolyLineReq);
- if ((stuff->coordMode != CoordModeOrigin) &&
- (stuff->coordMode != CoordModePrevious))
- {
- client->errorValue = stuff->coordMode;
- return BadValue;
- }
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
- npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq));
- if (npoint > 1)
- (*pGC->ops->Polylines)(pDraw, pGC, stuff->coordMode, npoint,
- (DDXPointPtr) &stuff[1]);
- return Success;
-}
-
-int
-ProcPolySegment(ClientPtr client)
-{
- int nsegs;
- GC *pGC;
- DrawablePtr pDraw;
- REQUEST(xPolySegmentReq);
-
- REQUEST_AT_LEAST_SIZE(xPolySegmentReq);
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
- nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq);
- if (nsegs & 4)
- return BadLength;
- nsegs >>= 3;
- if (nsegs)
- (*pGC->ops->PolySegment)(pDraw, pGC, nsegs, (xSegment *) &stuff[1]);
- return Success;
-}
-
-int
-ProcPolyRectangle (ClientPtr client)
-{
- int nrects;
- GC *pGC;
- DrawablePtr pDraw;
- REQUEST(xPolyRectangleReq);
-
- REQUEST_AT_LEAST_SIZE(xPolyRectangleReq);
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
- nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq);
- if (nrects & 4)
- return BadLength;
- nrects >>= 3;
- if (nrects)
- (*pGC->ops->PolyRectangle)(pDraw, pGC,
- nrects, (xRectangle *) &stuff[1]);
- return Success;
-}
-
-int
-ProcPolyArc(ClientPtr client)
-{
- int narcs;
- GC *pGC;
- DrawablePtr pDraw;
- REQUEST(xPolyArcReq);
-
- REQUEST_AT_LEAST_SIZE(xPolyArcReq);
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
- narcs = (client->req_len << 2) - sizeof(xPolyArcReq);
- if (narcs % sizeof(xArc))
- return BadLength;
- narcs /= sizeof(xArc);
- if (narcs)
- (*pGC->ops->PolyArc)(pDraw, pGC, narcs, (xArc *) &stuff[1]);
- return Success;
-}
-
-int
-ProcFillPoly(ClientPtr client)
-{
- int things;
- GC *pGC;
- DrawablePtr pDraw;
- REQUEST(xFillPolyReq);
-
- REQUEST_AT_LEAST_SIZE(xFillPolyReq);
- if ((stuff->shape != Complex) && (stuff->shape != Nonconvex) &&
- (stuff->shape != Convex))
- {
- client->errorValue = stuff->shape;
- return BadValue;
- }
- if ((stuff->coordMode != CoordModeOrigin) &&
- (stuff->coordMode != CoordModePrevious))
- {
- client->errorValue = stuff->coordMode;
- return BadValue;
- }
-
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
- things = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq));
- if (things)
- (*pGC->ops->FillPolygon) (pDraw, pGC, stuff->shape,
- stuff->coordMode, things,
- (DDXPointPtr) &stuff[1]);
- return Success;
-}
-
-int
-ProcPolyFillRectangle(ClientPtr client)
-{
- int things;
- GC *pGC;
- DrawablePtr pDraw;
- REQUEST(xPolyFillRectangleReq);
-
- REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq);
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
- things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq);
- if (things & 4)
- return BadLength;
- things >>= 3;
-
- if (things)
- (*pGC->ops->PolyFillRect) (pDraw, pGC, things,
- (xRectangle *) &stuff[1]);
- return Success;
-}
-
-int
-ProcPolyFillArc(ClientPtr client)
-{
- int narcs;
- GC *pGC;
- DrawablePtr pDraw;
- REQUEST(xPolyFillArcReq);
-
- REQUEST_AT_LEAST_SIZE(xPolyFillArcReq);
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
- narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq);
- if (narcs % sizeof(xArc))
- return BadLength;
- narcs /= sizeof(xArc);
- if (narcs)
- (*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]);
- return Success;
-}
-
-#ifdef MATCH_CLIENT_ENDIAN
-
-int
-ServerOrder (void)
-{
- int whichbyte = 1;
-
- if (*((char *) &whichbyte))
- return LSBFirst;
- return MSBFirst;
-}
-
-#define ClientOrder(client) ((client)->swapped ? !ServerOrder() : ServerOrder())
-
-void
-ReformatImage (char *base, int nbytes, int bpp, int order)
-{
- switch (bpp) {
- case 1: /* yuck */
- if (BITMAP_BIT_ORDER != order)
- BitOrderInvert ((unsigned char *) base, nbytes);
-#if IMAGE_BYTE_ORDER != BITMAP_BIT_ORDER && BITMAP_SCANLINE_UNIT != 8
- ReformatImage (base, nbytes, BITMAP_SCANLINE_UNIT, order);
-#endif
- break;
- case 4:
- break; /* yuck */
- case 8:
- break;
- case 16:
- if (IMAGE_BYTE_ORDER != order)
- TwoByteSwap ((unsigned char *) base, nbytes);
- break;
- case 32:
- if (IMAGE_BYTE_ORDER != order)
- FourByteSwap ((unsigned char *) base, nbytes);
- break;
- }
-}
-#else
-#define ReformatImage(b,n,bpp,o)
-#endif
-
-/* 64-bit server notes: the protocol restricts padding of images to
- * 8-, 16-, or 32-bits. We would like to have 64-bits for the server
- * to use internally. Removes need for internal alignment checking.
- * All of the PutImage functions could be changed individually, but
- * as currently written, they call other routines which require things
- * to be 64-bit padded on scanlines, so we changed things here.
- * If an image would be padded differently for 64- versus 32-, then
- * copy each scanline to a 64-bit padded scanline.
- * Also, we need to make sure that the image is aligned on a 64-bit
- * boundary, even if the scanlines are padded to our satisfaction.
- */
-int
-ProcPutImage(ClientPtr client)
-{
- GC *pGC;
- DrawablePtr pDraw;
- long length; /* length of scanline server padded */
- long lengthProto; /* length of scanline protocol padded */
- char *tmpImage;
- REQUEST(xPutImageReq);
-
- REQUEST_AT_LEAST_SIZE(xPutImageReq);
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
- if (stuff->format == XYBitmap)
- {
- if ((stuff->depth != 1) ||
- (stuff->leftPad >= (unsigned int)screenInfo.bitmapScanlinePad))
- return BadMatch;
- length = BitmapBytePad(stuff->width + stuff->leftPad);
- }
- else if (stuff->format == XYPixmap)
- {
- if ((pDraw->depth != stuff->depth) ||
- (stuff->leftPad >= (unsigned int)screenInfo.bitmapScanlinePad))
- return BadMatch;
- length = BitmapBytePad(stuff->width + stuff->leftPad);
- length *= stuff->depth;
- }
- else if (stuff->format == ZPixmap)
- {
- if ((pDraw->depth != stuff->depth) || (stuff->leftPad != 0))
- return BadMatch;
- length = PixmapBytePad(stuff->width, stuff->depth);
- }
- else
- {
- client->errorValue = stuff->format;
- return BadValue;
- }
-
- tmpImage = (char *)&stuff[1];
- lengthProto = length;
-
- if ((bytes_to_int32(lengthProto * stuff->height) +
- bytes_to_int32(sizeof(xPutImageReq))) != client->req_len)
- return BadLength;
-
- ReformatImage (tmpImage, lengthProto * stuff->height,
- stuff->format == ZPixmap ? BitsPerPixel (stuff->depth) : 1,
- ClientOrder(client));
-
- (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, stuff->dstX, stuff->dstY,
- stuff->width, stuff->height,
- stuff->leftPad, stuff->format, tmpImage);
-
- return Success;
-}
-
-static int
-DoGetImage(ClientPtr client, int format, Drawable drawable,
- int x, int y, int width, int height,
- Mask planemask, xGetImageReply **im_return)
-{
- DrawablePtr pDraw, pBoundingDraw;
- int nlines, linesPerBuf, rc;
- int linesDone;
- /* coordinates relative to the bounding drawable */
- int relx, rely;
- long widthBytesLine, length;
- Mask plane = 0;
- char *pBuf;
- xGetImageReply xgi;
- RegionPtr pVisibleRegion = NULL;
-
- if ((format != XYPixmap) && (format != ZPixmap))
- {
- client->errorValue = format;
- return BadValue;
- }
- rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixReadAccess);
- if (rc != Success)
- return rc;
-
- memset(&xgi, 0, sizeof(xGetImageReply));
-
- relx = x;
- rely = y;
-
- if(pDraw->type == DRAWABLE_WINDOW)
- {
- WindowPtr pWin = (WindowPtr)pDraw;
-
- /* "If the drawable is a window, the window must be viewable ... or a
- * BadMatch error results" */
- if (!pWin->viewable)
- return BadMatch;
-
- relx += pDraw->x;
- rely += pDraw->y;
-
- if (pDraw->pScreen->GetWindowPixmap) {
- PixmapPtr pPix = (*pDraw->pScreen->GetWindowPixmap) (pWin);
-
- pBoundingDraw = &pPix->drawable;
-#ifdef COMPOSITE
- relx -= pPix->screen_x;
- rely -= pPix->screen_y;
-#endif
- }
- else
- {
- pBoundingDraw = (DrawablePtr)pDraw->pScreen->root;
- }
-
- xgi.visual = wVisual (pWin);
- }
- else
- {
- pBoundingDraw = pDraw;
- xgi.visual = None;
- }
-
- /* "If the drawable is a pixmap, the given rectangle must be wholly
- * contained within the pixmap, or a BadMatch error results. If the
- * drawable is a window [...] it must be the case that if there were no
- * inferiors or overlapping windows, the specified rectangle of the window
- * would be fully visible on the screen and wholly contained within the
- * outside edges of the window, or a BadMatch error results."
- *
- * We relax the window case slightly to mean that the rectangle must exist
- * within the bounds of the window's backing pixmap. In particular, this
- * means that a GetImage request may succeed or fail with BadMatch depending
- * on whether any of its ancestor windows are redirected. */
- if(relx < 0 || relx + width > (int)pBoundingDraw->width ||
- rely < 0 || rely + height > (int)pBoundingDraw->height)
- return BadMatch;
-
- xgi.type = X_Reply;
- xgi.sequenceNumber = client->sequence;
- xgi.depth = pDraw->depth;
- if(format == ZPixmap)
- {
- widthBytesLine = PixmapBytePad(width, pDraw->depth);
- length = widthBytesLine * height;
-
- }
- else
- {
- widthBytesLine = BitmapBytePad(width);
- plane = ((Mask)1) << (pDraw->depth - 1);
- /* only planes asked for */
- length = widthBytesLine * height *
- Ones(planemask & (plane | (plane - 1)));
-
- }
-
- xgi.length = length;
-
- if (im_return) {
- pBuf = calloc(1, sz_xGetImageReply + length);
- if (!pBuf)
- return BadAlloc;
- if (widthBytesLine == 0)
- linesPerBuf = 0;
- else
- linesPerBuf = height;
- *im_return = (xGetImageReply *)pBuf;
- *(xGetImageReply *)pBuf = xgi;
- pBuf += sz_xGetImageReply;
- } else {
- xgi.length = bytes_to_int32(xgi.length);
- if (widthBytesLine == 0 || height == 0)
- linesPerBuf = 0;
- else if (widthBytesLine >= IMAGE_BUFSIZE)
- linesPerBuf = 1;
- else
- {
- linesPerBuf = IMAGE_BUFSIZE / widthBytesLine;
- if (linesPerBuf > height)
- linesPerBuf = height;
- }
- length = linesPerBuf * widthBytesLine;
- if (linesPerBuf < height)
- {
- /* we have to make sure intermediate buffers don't need padding */
- while ((linesPerBuf > 1) &&
- (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD)-1)))
- {
- linesPerBuf--;
- length -= widthBytesLine;
- }
- while (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD)-1))
- {
- linesPerBuf++;
- length += widthBytesLine;
- }
- }
- if(!(pBuf = calloc(1, length)))
- return BadAlloc;
- WriteReplyToClient(client, sizeof (xGetImageReply), &xgi);
- }
-
- if (pDraw->type == DRAWABLE_WINDOW)
- {
- pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
- if (pVisibleRegion)
- {
- RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y);
- }
- }
-
- if (linesPerBuf == 0)
- {
- /* nothing to do */
- }
- else if (format == ZPixmap)
- {
- linesDone = 0;
- while (height - linesDone > 0)
- {
- nlines = min(linesPerBuf, height - linesDone);
- (*pDraw->pScreen->GetImage) (pDraw,
- x,
- y + linesDone,
- width,
- nlines,
- format,
- planemask,
- (pointer) pBuf);
- if (pVisibleRegion)
- XaceCensorImage(client, pVisibleRegion, widthBytesLine,
- pDraw, x, y + linesDone, width,
- nlines, format, pBuf);
-
- /* Note that this is NOT a call to WriteSwappedDataToClient,
- as we do NOT byte swap */
- if (!im_return)
- {
- ReformatImage (pBuf, (int)(nlines * widthBytesLine),
- BitsPerPixel (pDraw->depth),
- ClientOrder(client));
-
-/* Don't split me, gcc pukes when you do */
- (void)WriteToClient(client,
- (int)(nlines * widthBytesLine),
- pBuf);
- }
- linesDone += nlines;
- }
- }
- else /* XYPixmap */
- {
- for (; plane; plane >>= 1)
- {
- if (planemask & plane)
- {
- linesDone = 0;
- while (height - linesDone > 0)
- {
- nlines = min(linesPerBuf, height - linesDone);
- (*pDraw->pScreen->GetImage) (pDraw,
- x,
- y + linesDone,
- width,
- nlines,
- format,
- plane,
- (pointer)pBuf);
- if (pVisibleRegion)
- XaceCensorImage(client, pVisibleRegion,
- widthBytesLine,
- pDraw, x, y + linesDone, width,
- nlines, format, pBuf);
-
- /* Note: NOT a call to WriteSwappedDataToClient,
- as we do NOT byte swap */
- if (im_return) {
- pBuf += nlines * widthBytesLine;
- } else {
- ReformatImage (pBuf,
- (int)(nlines * widthBytesLine),
- 1,
- ClientOrder (client));
-
-/* Don't split me, gcc pukes when you do */
- (void)WriteToClient(client,
- (int)(nlines * widthBytesLine),
- pBuf);
- }
- linesDone += nlines;
- }
- }
- }
- }
- if (pVisibleRegion)
- RegionDestroy(pVisibleRegion);
- if (!im_return)
- free(pBuf);
- return Success;
-}
-
-int
-ProcGetImage(ClientPtr client)
-{
- REQUEST(xGetImageReq);
-
- REQUEST_SIZE_MATCH(xGetImageReq);
-
- return DoGetImage(client, stuff->format, stuff->drawable,
- stuff->x, stuff->y,
- (int)stuff->width, (int)stuff->height,
- stuff->planeMask, (xGetImageReply **)NULL);
-}
-
-int
-ProcPolyText(ClientPtr client)
-{
- int err;
- REQUEST(xPolyTextReq);
- DrawablePtr pDraw;
- GC *pGC;
-
- REQUEST_AT_LEAST_SIZE(xPolyTextReq);
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
-
- err = PolyText(client,
- pDraw,
- pGC,
- (unsigned char *)&stuff[1],
- ((unsigned char *) stuff) + (client->req_len << 2),
- stuff->x,
- stuff->y,
- stuff->reqType,
- stuff->drawable);
-
- if (err == Success)
- {
- return Success;
- }
- else
- return err;
-}
-
-int
-ProcImageText8(ClientPtr client)
-{
- int err;
- DrawablePtr pDraw;
- GC *pGC;
-
- REQUEST(xImageTextReq);
-
- REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars);
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
-
- err = ImageText(client,
- pDraw,
- pGC,
- stuff->nChars,
- (unsigned char *)&stuff[1],
- stuff->x,
- stuff->y,
- stuff->reqType,
- stuff->drawable);
-
- if (err == Success)
- {
- return Success;
- }
- else
- return err;
-}
-
-int
-ProcImageText16(ClientPtr client)
-{
- int err;
- DrawablePtr pDraw;
- GC *pGC;
-
- REQUEST(xImageTextReq);
-
- REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1);
- VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
-
- err = ImageText(client,
- pDraw,
- pGC,
- stuff->nChars,
- (unsigned char *)&stuff[1],
- stuff->x,
- stuff->y,
- stuff->reqType,
- stuff->drawable);
-
- if (err == Success)
- {
- return Success;
- }
- else
- return err;
-}
-
-
-int
-ProcCreateColormap(ClientPtr client)
-{
- VisualPtr pVisual;
- ColormapPtr pmap;
- Colormap mid;
- WindowPtr pWin;
- ScreenPtr pScreen;
- REQUEST(xCreateColormapReq);
- int i, result;
-
- REQUEST_SIZE_MATCH(xCreateColormapReq);
-
- if ((stuff->alloc != AllocNone) && (stuff->alloc != AllocAll))
- {
- client->errorValue = stuff->alloc;
- return BadValue;
- }
- mid = stuff->mid;
- LEGAL_NEW_RESOURCE(mid, client);
- result = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (result != Success)
- return result;
-
- pScreen = pWin->drawable.pScreen;
- for (i = 0, pVisual = pScreen->visuals;
- i < pScreen->numVisuals;
- i++, pVisual++)
- {
- if (pVisual->vid != stuff->visual)
- continue;
- return CreateColormap(mid, pScreen, pVisual, &pmap,
- (int)stuff->alloc, client->index);
- }
- client->errorValue = stuff->visual;
- return BadMatch;
-}
-
-int
-ProcFreeColormap(ClientPtr client)
-{
- ColormapPtr pmap;
- int rc;
- REQUEST(xResourceReq);
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupResourceByType((pointer *)&pmap, stuff->id, RT_COLORMAP, client,
- DixDestroyAccess);
- if (rc == Success)
- {
- /* Freeing a default colormap is a no-op */
- if (!(pmap->flags & IsDefault))
- FreeResource(stuff->id, RT_NONE);
- return Success;
- }
- else
- {
- client->errorValue = stuff->id;
- return rc;
- }
-}
-
-
-int
-ProcCopyColormapAndFree(ClientPtr client)
-{
- Colormap mid;
- ColormapPtr pSrcMap;
- REQUEST(xCopyColormapAndFreeReq);
- int rc;
-
- REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
- mid = stuff->mid;
- LEGAL_NEW_RESOURCE(mid, client);
- rc = dixLookupResourceByType((pointer *)&pSrcMap, stuff->srcCmap, RT_COLORMAP,
- client, DixReadAccess|DixRemoveAccess);
- if (rc == Success)
- return CopyColormapAndFree(mid, pSrcMap, client->index);
- client->errorValue = stuff->srcCmap;
- return rc;
-}
-
-int
-ProcInstallColormap(ClientPtr client)
-{
- ColormapPtr pcmp;
- int rc;
- REQUEST(xResourceReq);
- REQUEST_SIZE_MATCH(xResourceReq);
-
- rc = dixLookupResourceByType((pointer *)&pcmp, stuff->id, RT_COLORMAP, client,
- DixInstallAccess);
- if (rc != Success)
- goto out;
-
- rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess);
- if (rc != Success) {
- if (rc == BadValue)
- rc = BadColor;
- goto out;
- }
-
- (*(pcmp->pScreen->InstallColormap)) (pcmp);
- return Success;
-
-out:
- client->errorValue = stuff->id;
- return rc;
-}
-
-int
-ProcUninstallColormap(ClientPtr client)
-{
- ColormapPtr pcmp;
- int rc;
- REQUEST(xResourceReq);
- REQUEST_SIZE_MATCH(xResourceReq);
-
- rc = dixLookupResourceByType((pointer *)&pcmp, stuff->id, RT_COLORMAP, client,
- DixUninstallAccess);
- if (rc != Success)
- goto out;
-
- rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess);
- if (rc != Success) {
- if (rc == BadValue)
- rc = BadColor;
- goto out;
- }
-
- if(pcmp->mid != pcmp->pScreen->defColormap)
- (*(pcmp->pScreen->UninstallColormap)) (pcmp);
- return Success;
-
-out:
- client->errorValue = stuff->id;
- return rc;
-}
-
-int
-ProcListInstalledColormaps(ClientPtr client)
-{
- xListInstalledColormapsReply *preply;
- int nummaps, rc;
- WindowPtr pWin;
- REQUEST(xResourceReq);
- REQUEST_SIZE_MATCH(xResourceReq);
-
- rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- rc = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen,
- DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- preply = malloc(sizeof(xListInstalledColormapsReply) +
- pWin->drawable.pScreen->maxInstalledCmaps *
- sizeof(Colormap));
- if(!preply)
- return BadAlloc;
-
- preply->type = X_Reply;
- preply->sequenceNumber = client->sequence;
- nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps)
- (pWin->drawable.pScreen, (Colormap *)&preply[1]);
- preply->nColormaps = nummaps;
- preply->length = nummaps;
- WriteReplyToClient(client, sizeof (xListInstalledColormapsReply), preply);
- client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
- WriteSwappedDataToClient(client, nummaps * sizeof(Colormap), &preply[1]);
- free(preply);
- return Success;
-}
-
-int
-ProcAllocColor (ClientPtr client)
-{
- ColormapPtr pmap;
- int rc;
- xAllocColorReply acr;
- REQUEST(xAllocColorReq);
-
- REQUEST_SIZE_MATCH(xAllocColorReq);
- rc = dixLookupResourceByType((pointer *)&pmap, stuff->cmap, RT_COLORMAP, client,
- DixAddAccess);
- if (rc == Success)
- {
- acr.type = X_Reply;
- acr.length = 0;
- acr.sequenceNumber = client->sequence;
- acr.red = stuff->red;
- acr.green = stuff->green;
- acr.blue = stuff->blue;
- acr.pixel = 0;
- if( (rc = AllocColor(pmap, &acr.red, &acr.green, &acr.blue,
- &acr.pixel, client->index)) )
- return rc;
-#ifdef PANORAMIX
- if (noPanoramiXExtension || !pmap->pScreen->myNum)
-#endif
- WriteReplyToClient(client, sizeof(xAllocColorReply), &acr);
- return Success;
-
- }
- else
- {
- client->errorValue = stuff->cmap;
- return rc;
- }
-}
-
-int
-ProcAllocNamedColor (ClientPtr client)
-{
- ColormapPtr pcmp;
- int rc;
- REQUEST(xAllocNamedColorReq);
-
- REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes);
- rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
- DixAddAccess);
- if (rc == Success)
- {
- xAllocNamedColorReply ancr;
-
- ancr.type = X_Reply;
- ancr.length = 0;
- ancr.sequenceNumber = client->sequence;
-
- if(OsLookupColor(pcmp->pScreen->myNum, (char *)&stuff[1], stuff->nbytes,
- &ancr.exactRed, &ancr.exactGreen, &ancr.exactBlue))
- {
- ancr.screenRed = ancr.exactRed;
- ancr.screenGreen = ancr.exactGreen;
- ancr.screenBlue = ancr.exactBlue;
- ancr.pixel = 0;
- if( (rc = AllocColor(pcmp,
- &ancr.screenRed, &ancr.screenGreen, &ancr.screenBlue,
- &ancr.pixel, client->index)) )
- return rc;
-#ifdef PANORAMIX
- if (noPanoramiXExtension || !pcmp->pScreen->myNum)
-#endif
- WriteReplyToClient(client, sizeof (xAllocNamedColorReply), &ancr);
- return Success;
- }
- else
- return BadName;
-
- }
- else
- {
- client->errorValue = stuff->cmap;
- return rc;
- }
-}
-
-int
-ProcAllocColorCells (ClientPtr client)
-{
- ColormapPtr pcmp;
- int rc;
- REQUEST(xAllocColorCellsReq);
-
- REQUEST_SIZE_MATCH(xAllocColorCellsReq);
- rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
- DixAddAccess);
- if (rc == Success)
- {
- xAllocColorCellsReply accr;
- int npixels, nmasks;
- long length;
- Pixel *ppixels, *pmasks;
-
- npixels = stuff->colors;
- if (!npixels)
- {
- client->errorValue = npixels;
- return BadValue;
- }
- if (stuff->contiguous != xTrue && stuff->contiguous != xFalse)
- {
- client->errorValue = stuff->contiguous;
- return BadValue;
- }
- nmasks = stuff->planes;
- length = ((long)npixels + (long)nmasks) * sizeof(Pixel);
- ppixels = malloc(length);
- if(!ppixels)
- return BadAlloc;
- pmasks = ppixels + npixels;
-
- if( (rc = AllocColorCells(client->index, pcmp, npixels, nmasks,
- (Bool)stuff->contiguous, ppixels, pmasks)) )
- {
- free(ppixels);
- return rc;
- }
-#ifdef PANORAMIX
- if (noPanoramiXExtension || !pcmp->pScreen->myNum)
-#endif
- {
- accr.type = X_Reply;
- accr.length = bytes_to_int32(length);
- accr.sequenceNumber = client->sequence;
- accr.nPixels = npixels;
- accr.nMasks = nmasks;
- WriteReplyToClient(client, sizeof (xAllocColorCellsReply), &accr);
- client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
- WriteSwappedDataToClient(client, length, ppixels);
- }
- free(ppixels);
- return Success;
- }
- else
- {
- client->errorValue = stuff->cmap;
- return rc;
- }
-}
-
-int
-ProcAllocColorPlanes(ClientPtr client)
-{
- ColormapPtr pcmp;
- int rc;
- REQUEST(xAllocColorPlanesReq);
-
- REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
- rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
- DixAddAccess);
- if (rc == Success)
- {
- xAllocColorPlanesReply acpr;
- int npixels;
- long length;
- Pixel *ppixels;
-
- npixels = stuff->colors;
- if (!npixels)
- {
- client->errorValue = npixels;
- return BadValue;
- }
- if (stuff->contiguous != xTrue && stuff->contiguous != xFalse)
- {
- client->errorValue = stuff->contiguous;
- return BadValue;
- }
- acpr.type = X_Reply;
- acpr.sequenceNumber = client->sequence;
- acpr.nPixels = npixels;
- length = (long)npixels * sizeof(Pixel);
- ppixels = malloc(length);
- if(!ppixels)
- return BadAlloc;
- if( (rc = AllocColorPlanes(client->index, pcmp, npixels,
- (int)stuff->red, (int)stuff->green, (int)stuff->blue,
- (Bool)stuff->contiguous, ppixels,
- &acpr.redMask, &acpr.greenMask, &acpr.blueMask)) )
- {
- free(ppixels);
- return rc;
- }
- acpr.length = bytes_to_int32(length);
-#ifdef PANORAMIX
- if (noPanoramiXExtension || !pcmp->pScreen->myNum)
-#endif
- {
- WriteReplyToClient(client, sizeof(xAllocColorPlanesReply), &acpr);
- client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
- WriteSwappedDataToClient(client, length, ppixels);
- }
- free(ppixels);
- return Success;
- }
- else
- {
- client->errorValue = stuff->cmap;
- return rc;
- }
-}
-
-int
-ProcFreeColors(ClientPtr client)
-{
- ColormapPtr pcmp;
- int rc;
- REQUEST(xFreeColorsReq);
-
- REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
- rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
- DixRemoveAccess);
- if (rc == Success)
- {
- int count;
-
- if(pcmp->flags & AllAllocated)
- return BadAccess;
- count = bytes_to_int32((client->req_len << 2) - sizeof(xFreeColorsReq));
- return FreeColors(pcmp, client->index, count,
- (Pixel *)&stuff[1], (Pixel)stuff->planeMask);
- }
- else
- {
- client->errorValue = stuff->cmap;
- return rc;
- }
-}
-
-int
-ProcStoreColors (ClientPtr client)
-{
- ColormapPtr pcmp;
- int rc;
- REQUEST(xStoreColorsReq);
-
- REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
- rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
- DixWriteAccess);
- if (rc == Success)
- {
- int count;
-
- count = (client->req_len << 2) - sizeof(xStoreColorsReq);
- if (count % sizeof(xColorItem))
- return BadLength;
- count /= sizeof(xColorItem);
- return StoreColors(pcmp, count, (xColorItem *)&stuff[1], client);
- }
- else
- {
- client->errorValue = stuff->cmap;
- return rc;
- }
-}
-
-int
-ProcStoreNamedColor (ClientPtr client)
-{
- ColormapPtr pcmp;
- int rc;
- REQUEST(xStoreNamedColorReq);
-
- REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes);
- rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
- DixWriteAccess);
- if (rc == Success)
- {
- xColorItem def;
-
- if(OsLookupColor(pcmp->pScreen->myNum, (char *)&stuff[1],
- stuff->nbytes, &def.red, &def.green, &def.blue))
- {
- def.flags = stuff->flags;
- def.pixel = stuff->pixel;
- return StoreColors(pcmp, 1, &def, client);
- }
- return BadName;
- }
- else
- {
- client->errorValue = stuff->cmap;
- return rc;
- }
-}
-
-int
-ProcQueryColors(ClientPtr client)
-{
- ColormapPtr pcmp;
- int rc;
- REQUEST(xQueryColorsReq);
-
- REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
- rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
- DixReadAccess);
- if (rc == Success)
- {
- int count;
- xrgb *prgbs;
- xQueryColorsReply qcr;
-
- count = bytes_to_int32((client->req_len << 2) - sizeof(xQueryColorsReq));
- prgbs = calloc(1, count * sizeof(xrgb));
- if(!prgbs && count)
- return BadAlloc;
- if( (rc = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs, client)) )
- {
- free(prgbs);
- return rc;
- }
- memset(&qcr, 0, sizeof(xQueryColorsReply));
- qcr.type = X_Reply;
- qcr.length = bytes_to_int32(count * sizeof(xrgb));
- qcr.sequenceNumber = client->sequence;
- qcr.nColors = count;
- WriteReplyToClient(client, sizeof(xQueryColorsReply), &qcr);
- if (count)
- {
- client->pSwapReplyFunc = (ReplySwapPtr) SQColorsExtend;
- WriteSwappedDataToClient(client, count * sizeof(xrgb), prgbs);
- }
- free(prgbs);
- return Success;
-
- }
- else
- {
- client->errorValue = stuff->cmap;
- return rc;
- }
-}
-
-int
-ProcLookupColor(ClientPtr client)
-{
- ColormapPtr pcmp;
- int rc;
- REQUEST(xLookupColorReq);
-
- REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes);
- rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
- DixReadAccess);
- if (rc == Success)
- {
- xLookupColorReply lcr;
-
- if(OsLookupColor(pcmp->pScreen->myNum, (char *)&stuff[1], stuff->nbytes,
- &lcr.exactRed, &lcr.exactGreen, &lcr.exactBlue))
- {
- lcr.type = X_Reply;
- lcr.length = 0;
- lcr.sequenceNumber = client->sequence;
- lcr.screenRed = lcr.exactRed;
- lcr.screenGreen = lcr.exactGreen;
- lcr.screenBlue = lcr.exactBlue;
- (*pcmp->pScreen->ResolveColor)(&lcr.screenRed,
- &lcr.screenGreen,
- &lcr.screenBlue,
- pcmp->pVisual);
- WriteReplyToClient(client, sizeof(xLookupColorReply), &lcr);
- return Success;
- }
- return BadName;
- }
- else
- {
- client->errorValue = stuff->cmap;
- return rc;
- }
-}
-
-int
-ProcCreateCursor (ClientPtr client)
-{
- CursorPtr pCursor;
- PixmapPtr src;
- PixmapPtr msk;
- unsigned char * srcbits;
- unsigned char * mskbits;
- unsigned short width, height;
- long n;
- CursorMetricRec cm;
- int rc;
-
- REQUEST(xCreateCursorReq);
-
- REQUEST_SIZE_MATCH(xCreateCursorReq);
- LEGAL_NEW_RESOURCE(stuff->cid, client);
-
- rc = dixLookupResourceByType((pointer *)&src, stuff->source, RT_PIXMAP, client,
- DixReadAccess);
- if (rc != Success) {
- client->errorValue = stuff->source;
- return rc;
- }
-
- rc = dixLookupResourceByType((pointer *)&msk, stuff->mask, RT_PIXMAP, client,
- DixReadAccess);
- if (rc != Success)
- {
- if (stuff->mask != None)
- {
- client->errorValue = stuff->mask;
- return rc;
- }
- }
- else if ( src->drawable.width != msk->drawable.width
- || src->drawable.height != msk->drawable.height
- || src->drawable.depth != 1
- || msk->drawable.depth != 1)
- return BadMatch;
-
- width = src->drawable.width;
- height = src->drawable.height;
-
- if ( stuff->x > width
- || stuff->y > height )
- return BadMatch;
-
- n = BitmapBytePad(width)*height;
- srcbits = calloc(1, n);
- if (!srcbits)
- return BadAlloc;
- mskbits = malloc(n);
- if (!mskbits)
- {
- free(srcbits);
- return BadAlloc;
- }
-
- (* src->drawable.pScreen->GetImage)( (DrawablePtr)src, 0, 0, width, height,
- XYPixmap, 1, (pointer)srcbits);
- if ( msk == (PixmapPtr)NULL)
- {
- unsigned char *bits = mskbits;
- while (--n >= 0)
- *bits++ = ~0;
- }
- else
- {
- /* zeroing the (pad) bits helps some ddx cursor handling */
- memset((char *)mskbits, 0, n);
- (* msk->drawable.pScreen->GetImage)( (DrawablePtr)msk, 0, 0, width,
- height, XYPixmap, 1, (pointer)mskbits);
- }
- cm.width = width;
- cm.height = height;
- cm.xhot = stuff->x;
- cm.yhot = stuff->y;
- rc = AllocARGBCursor(srcbits, mskbits, NULL, &cm,
- stuff->foreRed, stuff->foreGreen, stuff->foreBlue,
- stuff->backRed, stuff->backGreen, stuff->backBlue,
- &pCursor, client, stuff->cid);
-
- if (rc != Success)
- return rc;
- if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
- return BadAlloc;
-
- return Success;
-}
-
-int
-ProcCreateGlyphCursor (ClientPtr client)
-{
- CursorPtr pCursor;
- int res;
-
- REQUEST(xCreateGlyphCursorReq);
-
- REQUEST_SIZE_MATCH(xCreateGlyphCursorReq);
- LEGAL_NEW_RESOURCE(stuff->cid, client);
-
- res = AllocGlyphCursor(stuff->source, stuff->sourceChar,
- stuff->mask, stuff->maskChar,
- stuff->foreRed, stuff->foreGreen, stuff->foreBlue,
- stuff->backRed, stuff->backGreen, stuff->backBlue,
- &pCursor, client, stuff->cid);
- if (res != Success)
- return res;
- if (AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
- return Success;
- return BadAlloc;
-}
-
-
-int
-ProcFreeCursor (ClientPtr client)
-{
- CursorPtr pCursor;
- int rc;
- REQUEST(xResourceReq);
-
- REQUEST_SIZE_MATCH(xResourceReq);
- rc = dixLookupResourceByType((pointer *)&pCursor, stuff->id, RT_CURSOR, client,
- DixDestroyAccess);
- if (rc == Success)
- {
- FreeResource(stuff->id, RT_NONE);
- return Success;
- }
- else
- {
- client->errorValue = stuff->id;
- return rc;
- }
-}
-
-int
-ProcQueryBestSize (ClientPtr client)
-{
- xQueryBestSizeReply reply;
- DrawablePtr pDraw;
- ScreenPtr pScreen;
- int rc;
- REQUEST(xQueryBestSizeReq);
- REQUEST_SIZE_MATCH(xQueryBestSizeReq);
-
- if ((stuff->class != CursorShape) &&
- (stuff->class != TileShape) &&
- (stuff->class != StippleShape))
- {
- client->errorValue = stuff->class;
- return BadValue;
- }
-
- rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY,
- DixGetAttrAccess);
- if (rc != Success)
- return rc;
- if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW)
- return BadMatch;
- pScreen = pDraw->pScreen;
- rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess);
- if (rc != Success)
- return rc;
- (* pScreen->QueryBestSize)(stuff->class, &stuff->width,
- &stuff->height, pScreen);
- memset(&reply, 0, sizeof(xQueryBestSizeReply));
- reply.type = X_Reply;
- reply.length = 0;
- reply.sequenceNumber = client->sequence;
- reply.width = stuff->width;
- reply.height = stuff->height;
- WriteReplyToClient(client, sizeof(xQueryBestSizeReply), &reply);
- return Success;
-}
-
-
-int
-ProcSetScreenSaver (ClientPtr client)
-{
- int rc, i, blankingOption, exposureOption;
- REQUEST(xSetScreenSaverReq);
- REQUEST_SIZE_MATCH(xSetScreenSaverReq);
-
- for (i = 0; i < screenInfo.numScreens; i++) {
- rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i],
- DixSetAttrAccess);
- if (rc != Success)
- return rc;
- }
-
- blankingOption = stuff->preferBlank;
- if ((blankingOption != DontPreferBlanking) &&
- (blankingOption != PreferBlanking) &&
- (blankingOption != DefaultBlanking))
- {
- client->errorValue = blankingOption;
- return BadValue;
- }
- exposureOption = stuff->allowExpose;
- if ((exposureOption != DontAllowExposures) &&
- (exposureOption != AllowExposures) &&
- (exposureOption != DefaultExposures))
- {
- client->errorValue = exposureOption;
- return BadValue;
- }
- if (stuff->timeout < -1)
- {
- client->errorValue = stuff->timeout;
- return BadValue;
- }
- if (stuff->interval < -1)
- {
- client->errorValue = stuff->interval;
- return BadValue;
- }
-
- if (blankingOption == DefaultBlanking)
- ScreenSaverBlanking = defaultScreenSaverBlanking;
- else
- ScreenSaverBlanking = blankingOption;
- if (exposureOption == DefaultExposures)
- ScreenSaverAllowExposures = defaultScreenSaverAllowExposures;
- else
- ScreenSaverAllowExposures = exposureOption;
-
- if (stuff->timeout >= 0)
- ScreenSaverTime = stuff->timeout * MILLI_PER_SECOND;
- else
- ScreenSaverTime = defaultScreenSaverTime;
- if (stuff->interval >= 0)
- ScreenSaverInterval = stuff->interval * MILLI_PER_SECOND;
- else
- ScreenSaverInterval = defaultScreenSaverInterval;
-
- SetScreenSaverTimer();
- return Success;
-}
-
-int
-ProcGetScreenSaver(ClientPtr client)
-{
- xGetScreenSaverReply rep;
- int rc, i;
- REQUEST_SIZE_MATCH(xReq);
-
- for (i = 0; i < screenInfo.numScreens; i++) {
- rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i],
- DixGetAttrAccess);
- if (rc != Success)
- return rc;
- }
-
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.timeout = ScreenSaverTime / MILLI_PER_SECOND;
- rep.interval = ScreenSaverInterval / MILLI_PER_SECOND;
- rep.preferBlanking = ScreenSaverBlanking;
- rep.allowExposures = ScreenSaverAllowExposures;
- WriteReplyToClient(client, sizeof(xGetScreenSaverReply), &rep);
- return Success;
-}
-
-int
-ProcChangeHosts(ClientPtr client)
-{
- REQUEST(xChangeHostsReq);
-
- REQUEST_FIXED_SIZE(xChangeHostsReq, stuff->hostLength);
-
- if(stuff->mode == HostInsert)
- return AddHost(client, (int)stuff->hostFamily,
- stuff->hostLength, (pointer)&stuff[1]);
- if (stuff->mode == HostDelete)
- return RemoveHost(client, (int)stuff->hostFamily,
- stuff->hostLength, (pointer)&stuff[1]);
- client->errorValue = stuff->mode;
- return BadValue;
-}
-
-int
-ProcListHosts(ClientPtr client)
-{
- xListHostsReply reply;
- int len, nHosts, result;
- pointer pdata;
- /* REQUEST(xListHostsReq); */
-
- REQUEST_SIZE_MATCH(xListHostsReq);
-
- /* untrusted clients can't list hosts */
- result = XaceHook(XACE_SERVER_ACCESS, client, DixReadAccess);
- if (result != Success)
- return result;
-
- result = GetHosts(&pdata, &nHosts, &len, &reply.enabled);
- if (result != Success)
- return result;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.nHosts = nHosts;
- reply.length = bytes_to_int32(len);
- WriteReplyToClient(client, sizeof(xListHostsReply), &reply);
- if (nHosts)
- {
- client->pSwapReplyFunc = (ReplySwapPtr) SLHostsExtend;
- WriteSwappedDataToClient(client, len, pdata);
- }
- free(pdata);
- return Success;
-}
-
-int
-ProcChangeAccessControl(ClientPtr client)
-{
- REQUEST(xSetAccessControlReq);
-
- REQUEST_SIZE_MATCH(xSetAccessControlReq);
- if ((stuff->mode != EnableAccess) && (stuff->mode != DisableAccess))
- {
- client->errorValue = stuff->mode;
- return BadValue;
- }
- return ChangeAccessControl(client, stuff->mode == EnableAccess);
-}
-
-/*********************
- * CloseDownRetainedResources
- *
- * Find all clients that are gone and have terminated in RetainTemporary
- * and destroy their resources.
- *********************/
-
-static void
-CloseDownRetainedResources(void)
-{
- int i;
- ClientPtr client;
-
- for (i=1; i<currentMaxClients; i++)
- {
- client = clients[i];
- if (client && (client->closeDownMode == RetainTemporary)
- && (client->clientGone))
- CloseDownClient(client);
- }
-}
-
-int
-ProcKillClient(ClientPtr client)
-{
- REQUEST(xResourceReq);
- ClientPtr killclient;
- int rc;
-
- REQUEST_SIZE_MATCH(xResourceReq);
- if (stuff->id == AllTemporary)
- {
- CloseDownRetainedResources();
- return Success;
- }
-
- rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess);
- if (rc == Success) {
- CloseDownClient(killclient);
- /* if an LBX proxy gets killed, isItTimeToYield will be set */
- if (isItTimeToYield || (client == killclient))
- {
- /* force yield and return Success, so that Dispatch()
- * doesn't try to touch client
- */
- isItTimeToYield = TRUE;
- return Success;
- }
- return Success;
- }
- else
- return rc;
-}
-
-int
-ProcSetFontPath(ClientPtr client)
-{
- unsigned char *ptr;
- unsigned long nbytes, total;
- long nfonts;
- int n;
- REQUEST(xSetFontPathReq);
-
- REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
-
- nbytes = (client->req_len << 2) - sizeof(xSetFontPathReq);
- total = nbytes;
- ptr = (unsigned char *)&stuff[1];
- nfonts = stuff->nFonts;
- while (--nfonts >= 0)
- {
- if ((total == 0) || (total < (n = (*ptr + 1))))
- return BadLength;
- total -= n;
- ptr += n;
- }
- if (total >= 4)
- return BadLength;
- return SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1]);
-}
-
-int
-ProcGetFontPath(ClientPtr client)
-{
- xGetFontPathReply reply;
- int rc, stringLens, numpaths;
- unsigned char *bufferStart;
- /* REQUEST (xReq); */
-
- REQUEST_SIZE_MATCH(xReq);
- rc = GetFontPath(client, &numpaths, &stringLens, &bufferStart);
- if (rc != Success)
- return rc;
-
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.length = bytes_to_int32(stringLens + numpaths);
- reply.nPaths = numpaths;
-
- WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply);
- if (stringLens || numpaths)
- (void)WriteToClient(client, stringLens + numpaths, (char *)bufferStart);
- return Success;
-}
-
-int
-ProcChangeCloseDownMode(ClientPtr client)
-{
- int rc;
- REQUEST(xSetCloseDownModeReq);
- REQUEST_SIZE_MATCH(xSetCloseDownModeReq);
-
- rc = XaceHook(XACE_CLIENT_ACCESS, client, client, DixManageAccess);
- if (rc != Success)
- return rc;
-
- if ((stuff->mode == AllTemporary) ||
- (stuff->mode == RetainPermanent) ||
- (stuff->mode == RetainTemporary))
- {
- client->closeDownMode = stuff->mode;
- return Success;
- }
- else
- {
- client->errorValue = stuff->mode;
- return BadValue;
- }
-}
-
-int ProcForceScreenSaver(ClientPtr client)
-{
- int rc;
- REQUEST(xForceScreenSaverReq);
-
- REQUEST_SIZE_MATCH(xForceScreenSaverReq);
-
- if ((stuff->mode != ScreenSaverReset) &&
- (stuff->mode != ScreenSaverActive))
- {
- client->errorValue = stuff->mode;
- return BadValue;
- }
- rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, (int)stuff->mode);
- if (rc != Success)
- return rc;
- return Success;
-}
-
-int ProcNoOperation(ClientPtr client)
-{
- REQUEST_AT_LEAST_SIZE(xReq);
-
- /* noop -- don't do anything */
- return Success;
-}
-
-/**********************
- * CloseDownClient
- *
- * Client can either mark his resources destroy or retain. If retained and
- * then killed again, the client is really destroyed.
- *********************/
-
-char dispatchExceptionAtReset = DE_RESET;
-
-void
-CloseDownClient(ClientPtr client)
-{
- Bool really_close_down = client->clientGone ||
- client->closeDownMode == DestroyAll;
-
- if (!client->clientGone)
- {
- /* ungrab server if grabbing client dies */
- if (grabState != GrabNone && grabClient == client)
- {
- UngrabServer(client);
- }
- BITCLEAR(grabWaiters, client->index);
- DeleteClientFromAnySelections(client);
- ReleaseActiveGrabs(client);
- DeleteClientFontStuff(client);
- if (!really_close_down)
- {
- /* This frees resources that should never be retained
- * no matter what the close down mode is. Actually we
- * could do this unconditionally, but it's probably
- * better not to traverse all the client's resources
- * twice (once here, once a few lines down in
- * FreeClientResources) in the common case of
- * really_close_down == TRUE.
- */
- FreeClientNeverRetainResources(client);
- client->clientState = ClientStateRetained;
- if (ClientStateCallback)
- {
- NewClientInfoRec clientinfo;
-
- clientinfo.client = client;
- clientinfo.prefix = (xConnSetupPrefix *)NULL;
- clientinfo.setup = (xConnSetup *) NULL;
- CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
- }
- }
- client->clientGone = TRUE; /* so events aren't sent to client */
- if (ClientIsAsleep(client))
- ClientSignal (client);
- ProcessWorkQueueZombies();
- CloseDownConnection(client);
-
- /* If the client made it to the Running stage, nClients has
- * been incremented on its behalf, so we need to decrement it
- * now. If it hasn't gotten to Running, nClients has *not*
- * been incremented, so *don't* decrement it.
- */
- if (client->clientState != ClientStateInitial &&
- client->clientState != ClientStateAuthenticating )
- {
- --nClients;
- }
- }
-
- if (really_close_down)
- {
- if (client->clientState == ClientStateRunning && nClients == 0)
- dispatchException |= dispatchExceptionAtReset;
-
- client->clientState = ClientStateGone;
- if (ClientStateCallback)
- {
- NewClientInfoRec clientinfo;
-
- clientinfo.client = client;
- clientinfo.prefix = (xConnSetupPrefix *)NULL;
- clientinfo.setup = (xConnSetup *) NULL;
- CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
- }
- FreeClientResources(client);
- /* Disable client ID tracking. This must be done after
- * ClientStateCallback. */
- ReleaseClientIds(client);
-#ifdef XSERVER_DTRACE
- XSERVER_CLIENT_DISCONNECT(client->index);
-#endif
- if (client->index < nextFreeClientID)
- nextFreeClientID = client->index;
- clients[client->index] = NullClient;
- SmartLastClient = NullClient;
- dixFreeObjectWithPrivates(client, PRIVATE_CLIENT);
-
- while (!clients[currentMaxClients-1])
- currentMaxClients--;
- }
-}
-
-static void
-KillAllClients(void)
-{
- int i;
- for (i=1; i<currentMaxClients; i++)
- if (clients[i]) {
- /* Make sure Retained clients are released. */
- clients[i]->closeDownMode = DestroyAll;
- CloseDownClient(clients[i]);
- }
-}
-
-void InitClient(ClientPtr client, int i, pointer ospriv)
-{
- client->index = i;
- client->clientAsMask = ((Mask)i) << CLIENTOFFSET;
- client->closeDownMode = i ? DestroyAll : RetainPermanent;
- client->requestVector = InitialVector;
- client->osPrivate = ospriv;
- QueryMinMaxKeyCodes(&client->minKC,&client->maxKC);
- client->smart_start_tick = SmartScheduleTime;
- client->smart_stop_tick = SmartScheduleTime;
- client->smart_check_tick = SmartScheduleTime;
- client->clientIds = NULL;
-}
-
-/************************
- * int NextAvailableClient(ospriv)
- *
- * OS dependent portion can't assign client id's because of CloseDownModes.
- * Returns NULL if there are no free clients.
- *************************/
-
-ClientPtr NextAvailableClient(pointer ospriv)
-{
- int i;
- ClientPtr client;
- xReq data;
-
- i = nextFreeClientID;
- if (i == MAXCLIENTS)
- return (ClientPtr)NULL;
- clients[i] = client = dixAllocateObjectWithPrivates(ClientRec, PRIVATE_CLIENT);
- if (!client)
- return (ClientPtr)NULL;
- InitClient(client, i, ospriv);
- if (!InitClientResources(client))
- {
- dixFreeObjectWithPrivates(client, PRIVATE_CLIENT);
- return (ClientPtr)NULL;
- }
- data.reqType = 1;
- data.length = bytes_to_int32(sz_xReq + sz_xConnClientPrefix);
- if (!InsertFakeRequest(client, (char *)&data, sz_xReq))
- {
- FreeClientResources(client);
- dixFreeObjectWithPrivates(client, PRIVATE_CLIENT);
- return (ClientPtr)NULL;
- }
- if (i == currentMaxClients)
- currentMaxClients++;
- while ((nextFreeClientID < MAXCLIENTS) && clients[nextFreeClientID])
- nextFreeClientID++;
-
- /* Enable client ID tracking. This must be done before
- * ClientStateCallback. */
- ReserveClientIds(client);
-
- if (ClientStateCallback)
- {
- NewClientInfoRec clientinfo;
-
- clientinfo.client = client;
- clientinfo.prefix = (xConnSetupPrefix *)NULL;
- clientinfo.setup = (xConnSetup *) NULL;
- CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
- }
- return client;
-}
-
-int
-ProcInitialConnection(ClientPtr client)
-{
- REQUEST(xReq);
- xConnClientPrefix *prefix;
- int whichbyte = 1;
-
- prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
- if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B'))
- return client->noClientException = -1;
- if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) ||
- (!(*(char *) &whichbyte) && (prefix->byteOrder == 'l')))
- {
- client->swapped = TRUE;
- SwapConnClientPrefix(prefix);
- }
- stuff->reqType = 2;
- stuff->length += bytes_to_int32(prefix->nbytesAuthProto) +
- bytes_to_int32(prefix->nbytesAuthString);
- if (client->swapped)
- {
- swaps(&stuff->length, whichbyte);
- }
- ResetCurrentRequest(client);
- return Success;
-}
-
-static int
-SendConnSetup(ClientPtr client, char *reason)
-{
- xWindowRoot *root;
- int i;
- int numScreens;
- char* lConnectionInfo;
- xConnSetupPrefix* lconnSetupPrefix;
-
- if (reason)
- {
- xConnSetupPrefix csp;
-
- csp.success = xFalse;
- csp.lengthReason = strlen(reason);
- csp.length = bytes_to_int32(csp.lengthReason);
- csp.majorVersion = X_PROTOCOL;
- csp.minorVersion = X_PROTOCOL_REVISION;
- if (client->swapped)
- WriteSConnSetupPrefix(client, &csp);
- else
- (void)WriteToClient(client, sz_xConnSetupPrefix, (char *) &csp);
- (void)WriteToClient(client, (int)csp.lengthReason, reason);
- return client->noClientException = -1;
- }
-
- numScreens = screenInfo.numScreens;
- lConnectionInfo = ConnectionInfo;
- lconnSetupPrefix = &connSetupPrefix;
-
- /* We're about to start speaking X protocol back to the client by
- * sending the connection setup info. This means the authorization
- * step is complete, and we can count the client as an
- * authorized one.
- */
- nClients++;
-
- client->requestVector = client->swapped ? SwappedProcVector : ProcVector;
- client->sequence = 0;
- ((xConnSetup *)lConnectionInfo)->ridBase = client->clientAsMask;
- ((xConnSetup *)lConnectionInfo)->ridMask = RESOURCE_ID_MASK;
-#ifdef MATCH_CLIENT_ENDIAN
- ((xConnSetup *)lConnectionInfo)->imageByteOrder = ClientOrder (client);
- ((xConnSetup *)lConnectionInfo)->bitmapBitOrder = ClientOrder (client);
-#endif
- /* fill in the "currentInputMask" */
- root = (xWindowRoot *)(lConnectionInfo + connBlockScreenStart);
-#ifdef PANORAMIX
- if (noPanoramiXExtension)
- numScreens = screenInfo.numScreens;
- else
- numScreens = ((xConnSetup *)ConnectionInfo)->numRoots;
-#endif
-
- for (i=0; i<numScreens; i++)
- {
- unsigned int j;
- xDepth *pDepth;
- WindowPtr pRoot = screenInfo.screens[i]->root;
-
- root->currentInputMask = pRoot->eventMask | wOtherEventMasks(pRoot);
- pDepth = (xDepth *)(root + 1);
- for (j = 0; j < root->nDepths; j++)
- {
- pDepth = (xDepth *)(((char *)(pDepth + 1)) +
- pDepth->nVisuals * sizeof(xVisualType));
- }
- root = (xWindowRoot *)pDepth;
- }
-
- if (client->swapped)
- {
- WriteSConnSetupPrefix(client, lconnSetupPrefix);
- WriteSConnectionInfo(client,
- (unsigned long)(lconnSetupPrefix->length << 2),
- lConnectionInfo);
- }
- else
- {
- (void)WriteToClient(client, sizeof(xConnSetupPrefix),
- (char *) lconnSetupPrefix);
- (void)WriteToClient(client, (int)(lconnSetupPrefix->length << 2),
- lConnectionInfo);
- }
- client->clientState = ClientStateRunning;
- if (ClientStateCallback)
- {
- NewClientInfoRec clientinfo;
-
- clientinfo.client = client;
- clientinfo.prefix = lconnSetupPrefix;
- clientinfo.setup = (xConnSetup *)lConnectionInfo;
- CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
- }
- return Success;
-}
-
-int
-ProcEstablishConnection(ClientPtr client)
-{
- char *reason, *auth_proto, *auth_string;
- xConnClientPrefix *prefix;
- REQUEST(xReq);
-
- prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
- auth_proto = (char *)prefix + sz_xConnClientPrefix;
- auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto);
- if ((prefix->majorVersion != X_PROTOCOL) ||
- (prefix->minorVersion != X_PROTOCOL_REVISION))
- reason = "Protocol version mismatch";
- else
- reason = ClientAuthorized(client,
- (unsigned short)prefix->nbytesAuthProto,
- auth_proto,
- (unsigned short)prefix->nbytesAuthString,
- auth_string);
- /*
- * If Kerberos is being used for this client, the clientState
- * will be set to ClientStateAuthenticating at this point.
- * More messages need to be exchanged among the X server, Kerberos
- * server, and client to figure out if everyone is authorized.
- * So we don't want to send the connection setup info yet, since
- * the auth step isn't really done.
- */
- if (client->clientState == ClientStateCheckingSecurity)
- client->clientState = ClientStateCheckedSecurity;
- else if (client->clientState != ClientStateAuthenticating)
- return(SendConnSetup(client, reason));
- return Success;
-}
-
-void
-SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode,
- XID resId, int errorCode)
-{
- xError rep;
-
- memset(&rep, 0, sizeof(xError));
- rep.type = X_Error;
- rep.errorCode = errorCode;
- rep.majorCode = majorCode;
- rep.minorCode = minorCode;
- rep.resourceID = resId;
-
- WriteEventsToClient (client, 1, (xEvent *)&rep);
-}
-
-void
-MarkClientException(ClientPtr client)
-{
- client->noClientException = -1;
-}
-
-/*
- * This array encodes the answer to the question "what is the log base 2
- * of the number of pixels that fit in a scanline pad unit?"
- * Note that ~0 is an invalid entry (mostly for the benefit of the reader).
- */
-static int answer[6][4] = {
- /* pad pad pad pad*/
- /* 8 16 32 64 */
-
- { 3, 4, 5 , 6 }, /* 1 bit per pixel */
- { 1, 2, 3 , 4 }, /* 4 bits per pixel */
- { 0, 1, 2 , 3 }, /* 8 bits per pixel */
- { ~0, 0, 1 , 2 }, /* 16 bits per pixel */
- { ~0, ~0, 0 , 1 }, /* 24 bits per pixel */
- { ~0, ~0, 0 , 1 } /* 32 bits per pixel */
-};
-
-/*
- * This array gives the answer to the question "what is the first index for
- * the answer array above given the number of bits per pixel?"
- * Note that ~0 is an invalid entry (mostly for the benefit of the reader).
- */
-static int indexForBitsPerPixel[ 33 ] = {
- ~0, 0, ~0, ~0, /* 1 bit per pixel */
- 1, ~0, ~0, ~0, /* 4 bits per pixel */
- 2, ~0, ~0, ~0, /* 8 bits per pixel */
- ~0,~0, ~0, ~0,
- 3, ~0, ~0, ~0, /* 16 bits per pixel */
- ~0,~0, ~0, ~0,
- 4, ~0, ~0, ~0, /* 24 bits per pixel */
- ~0,~0, ~0, ~0,
- 5 /* 32 bits per pixel */
-};
-
-/*
- * This array gives the bytesperPixel value for cases where the number
- * of bits per pixel is a multiple of 8 but not a power of 2.
- */
-static int answerBytesPerPixel[ 33 ] = {
- ~0, 0, ~0, ~0, /* 1 bit per pixel */
- 0, ~0, ~0, ~0, /* 4 bits per pixel */
- 0, ~0, ~0, ~0, /* 8 bits per pixel */
- ~0,~0, ~0, ~0,
- 0, ~0, ~0, ~0, /* 16 bits per pixel */
- ~0,~0, ~0, ~0,
- 3, ~0, ~0, ~0, /* 24 bits per pixel */
- ~0,~0, ~0, ~0,
- 0 /* 32 bits per pixel */
-};
-
-/*
- * This array gives the answer to the question "what is the second index for
- * the answer array above given the number of bits per scanline pad unit?"
- * Note that ~0 is an invalid entry (mostly for the benefit of the reader).
- */
-static int indexForScanlinePad[ 65 ] = {
- ~0, ~0, ~0, ~0,
- ~0, ~0, ~0, ~0,
- 0, ~0, ~0, ~0, /* 8 bits per scanline pad unit */
- ~0, ~0, ~0, ~0,
- 1, ~0, ~0, ~0, /* 16 bits per scanline pad unit */
- ~0, ~0, ~0, ~0,
- ~0, ~0, ~0, ~0,
- ~0, ~0, ~0, ~0,
- 2, ~0, ~0, ~0, /* 32 bits per scanline pad unit */
- ~0, ~0, ~0, ~0,
- ~0, ~0, ~0, ~0,
- ~0, ~0, ~0, ~0,
- ~0, ~0, ~0, ~0,
- ~0, ~0, ~0, ~0,
- ~0, ~0, ~0, ~0,
- ~0, ~0, ~0, ~0,
- 3 /* 64 bits per scanline pad unit */
-};
-
-/*
- grow the array of screenRecs if necessary.
- call the device-supplied initialization procedure
-with its screen number, a pointer to its ScreenRec, argc, and argv.
- return the number of successfully installed screens.
-
-*/
-
-int
-AddScreen(
- Bool (* pfnInit)(
- int /*index*/,
- ScreenPtr /*pScreen*/,
- int /*argc*/,
- char ** /*argv*/
- ),
- int argc,
- char **argv)
-{
-
- int i;
- int scanlinepad, format, depth, bitsPerPixel, j, k;
- ScreenPtr pScreen;
-
- i = screenInfo.numScreens;
- if (i == MAXSCREENS)
- return -1;
-
- pScreen = (ScreenPtr) calloc(1, sizeof(ScreenRec));
- if (!pScreen)
- return -1;
-
- if (!dixAllocatePrivates(&pScreen->devPrivates, PRIVATE_SCREEN)) {
- free (pScreen);
- return -1;
- }
- pScreen->myNum = i;
- pScreen->totalPixmapSize = 0; /* computed in CreateScratchPixmapForScreen */
- pScreen->ClipNotify = 0; /* for R4 ddx compatibility */
- pScreen->CreateScreenResources = 0;
-
- /*
- * This loop gets run once for every Screen that gets added,
- * but thats ok. If the ddx layer initializes the formats
- * one at a time calling AddScreen() after each, then each
- * iteration will make it a little more accurate. Worst case
- * we do this loop N * numPixmapFormats where N is # of screens.
- * Anyway, this must be called after InitOutput and before the
- * screen init routine is called.
- */
- for (format=0; format<screenInfo.numPixmapFormats; format++)
- {
- depth = screenInfo.formats[format].depth;
- bitsPerPixel = screenInfo.formats[format].bitsPerPixel;
- scanlinepad = screenInfo.formats[format].scanlinePad;
- j = indexForBitsPerPixel[ bitsPerPixel ];
- k = indexForScanlinePad[ scanlinepad ];
- PixmapWidthPaddingInfo[ depth ].padPixelsLog2 = answer[j][k];
- PixmapWidthPaddingInfo[ depth ].padRoundUp =
- (scanlinepad/bitsPerPixel) - 1;
- j = indexForBitsPerPixel[ 8 ]; /* bits per byte */
- PixmapWidthPaddingInfo[ depth ].padBytesLog2 = answer[j][k];
- PixmapWidthPaddingInfo[ depth ].bitsPerPixel = bitsPerPixel;
- if (answerBytesPerPixel[bitsPerPixel])
- {
- PixmapWidthPaddingInfo[ depth ].notPower2 = 1;
- PixmapWidthPaddingInfo[ depth ].bytesPerPixel =
- answerBytesPerPixel[bitsPerPixel];
- }
- else
- {
- PixmapWidthPaddingInfo[ depth ].notPower2 = 0;
- }
- }
-
- /* This is where screen specific stuff gets initialized. Load the
- screen structure, call the hardware, whatever.
- This is also where the default colormap should be allocated and
- also pixel values for blackPixel, whitePixel, and the cursor
- Note that InitScreen is NOT allowed to modify argc, argv, or
- any of the strings pointed to by argv. They may be passed to
- multiple screens.
- */
- screenInfo.screens[i] = pScreen;
- screenInfo.numScreens++;
- if (!(*pfnInit)(i, pScreen, argc, argv))
- {
- dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
- free(pScreen);
- screenInfo.numScreens--;
- return -1;
- }
-
- dixRegisterPrivateKey(&cursorScreenDevPriv[i], PRIVATE_CURSOR, 0);
-
- return i;
-}
+/************************************************************
+
+Copyright 1987, 1989, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+/* The panoramix components contained the following notice */
+/*****************************************************************
+
+Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+
+******************************************************************/
+
+/* XSERVER_DTRACE additions:
+ * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#include <version-config.h>
+#endif
+
+#ifdef CreateWindow
+#undef CreateWindow
+#endif
+
+#ifdef PANORAMIX_DEBUG
+#include <stdio.h>
+int ProcInitialConnection();
+#endif
+
+#include "windowstr.h"
+#include <X11/fonts/fontstruct.h>
+#include "dixfontstr.h"
+#include "gcstruct.h"
+#include "selection.h"
+#include "colormapst.h"
+#include "cursorstr.h"
+#include "scrnintstr.h"
+#include "opaque.h"
+#include "input.h"
+#include "servermd.h"
+#include "extnsionst.h"
+#include "dixfont.h"
+#include "dispatch.h"
+#include "swaprep.h"
+#include "swapreq.h"
+#include "privates.h"
+#include "xace.h"
+#include "inputstr.h"
+#include "xkbsrv.h"
+#include "site.h"
+#include "client.h"
+
+#ifdef XSERVER_DTRACE
+#include "registry.h"
+#include <sys/types.h>
+typedef const char *string;
+#include "Xserver-dtrace.h"
+#endif
+
+#define mskcnt ((MAXCLIENTS + 31) / 32)
+#define BITMASK(i) (1U << ((i) & 31))
+#define MASKIDX(i) ((i) >> 5)
+#define MASKWORD(buf, i) buf[MASKIDX(i)]
+#define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i)
+#define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i)
+#define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i))
+
+xConnSetupPrefix connSetupPrefix;
+
+PaddingInfo PixmapWidthPaddingInfo[33];
+
+static ClientPtr grabClient;
+#define GrabNone 0
+#define GrabActive 1
+#define GrabKickout 2
+static int grabState = GrabNone;
+static long grabWaiters[mskcnt];
+CallbackListPtr ServerGrabCallback = NULL;
+HWEventQueuePtr checkForInput[2];
+int connBlockScreenStart;
+
+static void KillAllClients(void);
+
+static int nextFreeClientID; /* always MIN free client ID */
+
+static int nClients; /* number of authorized clients */
+
+CallbackListPtr ClientStateCallback;
+
+/* dispatchException & isItTimeToYield must be declared volatile since they
+ * are modified by signal handlers - otherwise optimizer may assume it doesn't
+ * need to actually check value in memory when used and may miss changes from
+ * signal handlers.
+ */
+volatile char dispatchException = 0;
+volatile char isItTimeToYield;
+
+#define SAME_SCREENS(a, b) (\
+ (a.pScreen == b.pScreen))
+
+void
+SetInputCheck(HWEventQueuePtr c0, HWEventQueuePtr c1)
+{
+ checkForInput[0] = c0;
+ checkForInput[1] = c1;
+}
+
+void
+UpdateCurrentTime(void)
+{
+ TimeStamp systime;
+
+ /* To avoid time running backwards, we must call GetTimeInMillis before
+ * calling ProcessInputEvents.
+ */
+ systime.months = currentTime.months;
+ systime.milliseconds = GetTimeInMillis();
+ if (systime.milliseconds < currentTime.milliseconds)
+ systime.months++;
+ if (*checkForInput[0] != *checkForInput[1])
+ ProcessInputEvents();
+ if (CompareTimeStamps(systime, currentTime) == LATER)
+ currentTime = systime;
+}
+
+/* Like UpdateCurrentTime, but can't call ProcessInputEvents */
+void
+UpdateCurrentTimeIf(void)
+{
+ TimeStamp systime;
+
+ systime.months = currentTime.months;
+ systime.milliseconds = GetTimeInMillis();
+ if (systime.milliseconds < currentTime.milliseconds)
+ systime.months++;
+ if (*checkForInput[0] == *checkForInput[1])
+ currentTime = systime;
+}
+
+
+#undef SMART_DEBUG
+
+#define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */
+#define SMART_SCHEDULE_MAX_SLICE 200 /* ms */
+
+Bool SmartScheduleDisable = FALSE;
+long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL;
+long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL;
+long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE;
+long SmartScheduleTime;
+int SmartScheduleLatencyLimited = 0;
+static ClientPtr SmartLastClient;
+static int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1];
+
+#ifdef SMART_DEBUG
+long SmartLastPrint;
+#endif
+
+void Dispatch(void);
+
+static int
+SmartScheduleClient (int *clientReady, int nready)
+{
+ ClientPtr pClient;
+ int i;
+ int client;
+ int bestPrio, best = 0;
+ int bestRobin, robin;
+ long now = SmartScheduleTime;
+ long idle;
+
+ bestPrio = -0x7fffffff;
+ bestRobin = 0;
+ idle = 2 * SmartScheduleSlice;
+ for (i = 0; i < nready; i++)
+ {
+ client = clientReady[i];
+ pClient = clients[client];
+ /* Praise clients which are idle */
+ if ((now - pClient->smart_check_tick) >= idle)
+ {
+ if (pClient->smart_priority < 0)
+ pClient->smart_priority++;
+ }
+ pClient->smart_check_tick = now;
+
+ /* check priority to select best client */
+ robin = (pClient->index - SmartLastIndex[pClient->smart_priority-SMART_MIN_PRIORITY]) & 0xff;
+ if (pClient->smart_priority > bestPrio ||
+ (pClient->smart_priority == bestPrio && robin > bestRobin))
+ {
+ bestPrio = pClient->smart_priority;
+ bestRobin = robin;
+ best = client;
+ }
+#ifdef SMART_DEBUG
+ if ((now - SmartLastPrint) >= 5000)
+ fprintf (stderr, " %2d: %3d", client, pClient->smart_priority);
+#endif
+ }
+#ifdef SMART_DEBUG
+ if ((now - SmartLastPrint) >= 5000)
+ {
+ fprintf (stderr, " use %2d\n", best);
+ SmartLastPrint = now;
+ }
+#endif
+ pClient = clients[best];
+ SmartLastIndex[bestPrio-SMART_MIN_PRIORITY] = pClient->index;
+ /*
+ * Set current client pointer
+ */
+ if (SmartLastClient != pClient)
+ {
+ pClient->smart_start_tick = now;
+ SmartLastClient = pClient;
+ }
+ /*
+ * Adjust slice
+ */
+ if (nready == 1 && SmartScheduleLatencyLimited == 0)
+ {
+ /*
+ * If it's been a long time since another client
+ * has run, bump the slice up to get maximal
+ * performance from a single client
+ */
+ if ((now - pClient->smart_start_tick) > 1000 &&
+ SmartScheduleSlice < SmartScheduleMaxSlice)
+ {
+ SmartScheduleSlice += SmartScheduleInterval;
+ }
+ }
+ else
+ {
+ SmartScheduleSlice = SmartScheduleInterval;
+ }
+ return best;
+}
+
+void
+EnableLimitedSchedulingLatency(void)
+{
+ ++SmartScheduleLatencyLimited;
+ SmartScheduleSlice = SmartScheduleInterval;
+}
+
+void
+DisableLimitedSchedulingLatency(void)
+{
+ --SmartScheduleLatencyLimited;
+
+ /* protect against bugs */
+ if (SmartScheduleLatencyLimited < 0)
+ SmartScheduleLatencyLimited = 0;
+}
+
+#define MAJOROP ((xReq *)client->requestBuffer)->reqType
+
+void
+Dispatch(void)
+{
+ int *clientReady; /* array of request ready clients */
+ int result;
+ ClientPtr client;
+ int nready;
+ HWEventQueuePtr* icheck = checkForInput;
+ long start_tick;
+
+ nextFreeClientID = 1;
+ nClients = 0;
+
+ clientReady = malloc(sizeof(int) * MaxClients);
+ if (!clientReady)
+ return;
+
+ SmartScheduleSlice = SmartScheduleInterval;
+ while (!dispatchException)
+ {
+ if (*icheck[0] != *icheck[1])
+ {
+ ProcessInputEvents();
+ FlushIfCriticalOutputPending();
+ }
+
+ nready = WaitForSomething(clientReady);
+
+ if (nready && !SmartScheduleDisable)
+ {
+ clientReady[0] = SmartScheduleClient (clientReady, nready);
+ nready = 1;
+ }
+ /*****************
+ * Handle events in round robin fashion, doing input between
+ * each round
+ *****************/
+
+ while (!dispatchException && (--nready >= 0))
+ {
+ client = clients[clientReady[nready]];
+ if (! client)
+ {
+ /* KillClient can cause this to happen */
+ continue;
+ }
+ /* GrabServer activation can cause this to be true */
+ if (grabState == GrabKickout)
+ {
+ grabState = GrabActive;
+ break;
+ }
+ isItTimeToYield = FALSE;
+
+ start_tick = SmartScheduleTime;
+ while (!isItTimeToYield)
+ {
+#ifdef XSERVER_DTRACE
+ CARD8 StartMajorOp;
+#endif
+ if (*icheck[0] != *icheck[1])
+ ProcessInputEvents();
+
+ FlushIfCriticalOutputPending();
+ if (!SmartScheduleDisable &&
+ (SmartScheduleTime - start_tick) >= SmartScheduleSlice)
+ {
+ /* Penalize clients which consume ticks */
+ if (client->smart_priority > SMART_MIN_PRIORITY)
+ client->smart_priority--;
+ break;
+ }
+ /* now, finally, deal with client requests */
+
+ result = ReadRequestFromClient(client);
+ if (result <= 0)
+ {
+ if (result < 0)
+ CloseDownClient(client);
+ break;
+ }
+
+ client->sequence++;
+#ifdef XSERVER_DTRACE
+ StartMajorOp=MAJOROP;
+ XSERVER_REQUEST_START(LookupMajorName(StartMajorOp), StartMajorOp,
+ ((xReq *)client->requestBuffer)->length,
+ client->index, client->requestBuffer);
+#endif
+ if (result > (maxBigRequestSize << 2))
+ result = BadLength;
+ else {
+ result = XaceHookDispatch(client, MAJOROP);
+ if (result == Success)
+ result = (* client->requestVector[MAJOROP])(client);
+ XaceHookAuditEnd(client, result);
+ }
+#ifdef XSERVER_DTRACE
+ if (result!=Success)
+ {
+ char Message[255];
+ sprintf(Message,"ERROR: %s (0x%x)",LookupMajorName(StartMajorOp),client->errorValue);
+ XSERVER_REQUEST_DONE(Message, MAJOROP,
+ client->sequence, client->index, result);
+ }
+ else
+ {
+ if (StartMajorOp!=MAJOROP)
+ {
+ char Message[255];
+ sprintf(Message,"Changed request: %s -> %s",LookupMajorName(StartMajorOp),LookupMajorName(MAJOROP));
+ XSERVER_REQUEST_DONE(Message, MAJOROP,
+ client->sequence, client->index, result);
+ }
+ else
+ {
+ XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP,
+ client->sequence, client->index, result);
+ }
+ }
+#endif
+
+ if (client->noClientException != Success)
+ {
+ CloseDownClient(client);
+ break;
+ }
+ else if (result != Success)
+ {
+ SendErrorToClient(client, MAJOROP,
+ MinorOpcodeOfRequest(client),
+ client->errorValue, result);
+ break;
+ }
+ }
+ FlushAllOutput();
+ client = clients[clientReady[nready]];
+ if (client)
+ client->smart_stop_tick = SmartScheduleTime;
+ }
+ dispatchException &= ~DE_PRIORITYCHANGE;
+ }
+#if defined(DDXBEFORERESET)
+ ddxBeforeReset ();
+#endif
+ KillAllClients();
+ free(clientReady);
+ dispatchException &= ~DE_RESET;
+ SmartScheduleLatencyLimited = 0;
+}
+
+#undef MAJOROP
+
+static int VendorRelease = VENDOR_RELEASE;
+static char *VendorString = VENDOR_NAME;
+
+static const int padlength[4] = {0, 3, 2, 1};
+
+void
+SetVendorRelease(int release)
+{
+ VendorRelease = release;
+}
+
+void
+SetVendorString(char *string)
+{
+ VendorString = string;
+}
+
+Bool
+CreateConnectionBlock(void)
+{
+ xConnSetup setup;
+ xWindowRoot root;
+ xDepth depth;
+ xVisualType visual;
+ xPixmapFormat format;
+ unsigned long vid;
+ int i, j, k,
+ lenofblock,
+ sizesofar = 0;
+ char *pBuf;
+
+
+ memset(&setup, 0, sizeof(xConnSetup));
+ /* Leave off the ridBase and ridMask, these must be sent with
+ connection */
+
+ setup.release = VendorRelease;
+ /*
+ * per-server image and bitmap parameters are defined in Xmd.h
+ */
+ setup.imageByteOrder = screenInfo.imageByteOrder;
+
+ setup.bitmapScanlineUnit = screenInfo.bitmapScanlineUnit;
+ setup.bitmapScanlinePad = screenInfo.bitmapScanlinePad;
+
+ setup.bitmapBitOrder = screenInfo.bitmapBitOrder;
+ setup.motionBufferSize = NumMotionEvents();
+ setup.numRoots = screenInfo.numScreens;
+ setup.nbytesVendor = strlen(VendorString);
+ setup.numFormats = screenInfo.numPixmapFormats;
+ setup.maxRequestSize = MAX_REQUEST_SIZE;
+ QueryMinMaxKeyCodes(&setup.minKeyCode, &setup.maxKeyCode);
+
+ lenofblock = sizeof(xConnSetup) +
+ pad_to_int32(setup.nbytesVendor) +
+ (setup.numFormats * sizeof(xPixmapFormat)) +
+ (setup.numRoots * sizeof(xWindowRoot));
+ ConnectionInfo = malloc(lenofblock);
+ if (!ConnectionInfo)
+ return FALSE;
+
+ memmove(ConnectionInfo, (char *)&setup, sizeof(xConnSetup));
+ sizesofar = sizeof(xConnSetup);
+ pBuf = ConnectionInfo + sizeof(xConnSetup);
+
+ memmove(pBuf, VendorString, (int)setup.nbytesVendor);
+ sizesofar += setup.nbytesVendor;
+ pBuf += setup.nbytesVendor;
+ i = padlength[setup.nbytesVendor & 3];
+ sizesofar += i;
+ while (--i >= 0)
+ *pBuf++ = 0;
+
+ memset(&format, 0, sizeof(xPixmapFormat));
+ for (i=0; i<screenInfo.numPixmapFormats; i++)
+ {
+ format.depth = screenInfo.formats[i].depth;
+ format.bitsPerPixel = screenInfo.formats[i].bitsPerPixel;
+ format.scanLinePad = screenInfo.formats[i].scanlinePad;
+ memmove(pBuf, (char *)&format, sizeof(xPixmapFormat));
+ pBuf += sizeof(xPixmapFormat);
+ sizesofar += sizeof(xPixmapFormat);
+ }
+
+ connBlockScreenStart = sizesofar;
+ memset(&depth, 0, sizeof(xDepth));
+ memset(&visual, 0, sizeof(xVisualType));
+ for (i=0; i<screenInfo.numScreens; i++)
+ {
+ ScreenPtr pScreen;
+ DepthPtr pDepth;
+ VisualPtr pVisual;
+
+ pScreen = screenInfo.screens[i];
+ root.windowId = pScreen->root->drawable.id;
+ root.defaultColormap = pScreen->defColormap;
+ root.whitePixel = pScreen->whitePixel;
+ root.blackPixel = pScreen->blackPixel;
+ root.currentInputMask = 0; /* filled in when sent */
+ root.pixWidth = pScreen->width;
+ root.pixHeight = pScreen->height;
+ root.mmWidth = pScreen->mmWidth;
+ root.mmHeight = pScreen->mmHeight;
+ root.minInstalledMaps = pScreen->minInstalledCmaps;
+ root.maxInstalledMaps = pScreen->maxInstalledCmaps;
+ root.rootVisualID = pScreen->rootVisual;
+ root.backingStore = pScreen->backingStoreSupport;
+ root.saveUnders = FALSE;
+ root.rootDepth = pScreen->rootDepth;
+ root.nDepths = pScreen->numDepths;
+ memmove(pBuf, (char *)&root, sizeof(xWindowRoot));
+ sizesofar += sizeof(xWindowRoot);
+ pBuf += sizeof(xWindowRoot);
+
+ pDepth = pScreen->allowedDepths;
+ for(j = 0; j < pScreen->numDepths; j++, pDepth++)
+ {
+ lenofblock += sizeof(xDepth) +
+ (pDepth->numVids * sizeof(xVisualType));
+ pBuf = (char *)realloc(ConnectionInfo, lenofblock);
+ if (!pBuf)
+ {
+ free(ConnectionInfo);
+ return FALSE;
+ }
+ ConnectionInfo = pBuf;
+ pBuf += sizesofar;
+ depth.depth = pDepth->depth;
+ depth.nVisuals = pDepth->numVids;
+ memmove(pBuf, (char *)&depth, sizeof(xDepth));
+ pBuf += sizeof(xDepth);
+ sizesofar += sizeof(xDepth);
+ for(k = 0; k < pDepth->numVids; k++)
+ {
+ vid = pDepth->vids[k];
+ for (pVisual = pScreen->visuals;
+ pVisual->vid != vid;
+ pVisual++)
+ ;
+ visual.visualID = vid;
+ visual.class = pVisual->class;
+ visual.bitsPerRGB = pVisual->bitsPerRGBValue;
+ visual.colormapEntries = pVisual->ColormapEntries;
+ visual.redMask = pVisual->redMask;
+ visual.greenMask = pVisual->greenMask;
+ visual.blueMask = pVisual->blueMask;
+ memmove(pBuf, (char *)&visual, sizeof(xVisualType));
+ pBuf += sizeof(xVisualType);
+ sizesofar += sizeof(xVisualType);
+ }
+ }
+ }
+ connSetupPrefix.success = xTrue;
+ connSetupPrefix.length = lenofblock/4;
+ connSetupPrefix.majorVersion = X_PROTOCOL;
+ connSetupPrefix.minorVersion = X_PROTOCOL_REVISION;
+ return TRUE;
+}
+
+
+int
+ProcBadRequest(ClientPtr client)
+{
+ return BadRequest;
+}
+
+int
+ProcCreateWindow(ClientPtr client)
+{
+ WindowPtr pParent, pWin;
+ REQUEST(xCreateWindowReq);
+ int len, rc;
+
+ REQUEST_AT_LEAST_SIZE(xCreateWindowReq);
+
+ LEGAL_NEW_RESOURCE(stuff->wid, client);
+ rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess);
+ if (rc != Success)
+ return rc;
+ len = client->req_len - bytes_to_int32(sizeof(xCreateWindowReq));
+ if (Ones(stuff->mask) != len)
+ return BadLength;
+ if (!stuff->width || !stuff->height)
+ {
+ client->errorValue = 0;
+ return BadValue;
+ }
+ pWin = CreateWindow(stuff->wid, pParent, stuff->x,
+ stuff->y, stuff->width, stuff->height,
+ stuff->borderWidth, stuff->class,
+ stuff->mask, (XID *) &stuff[1],
+ (int)stuff->depth,
+ client, stuff->visual, &rc);
+ if (pWin)
+ {
+ Mask mask = pWin->eventMask;
+
+ pWin->eventMask = 0; /* subterfuge in case AddResource fails */
+ if (!AddResource(stuff->wid, RT_WINDOW, (pointer)pWin))
+ return BadAlloc;
+ pWin->eventMask = mask;
+ }
+ return rc;
+}
+
+int
+ProcChangeWindowAttributes(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xChangeWindowAttributesReq);
+ int len, rc;
+ Mask access_mode = 0;
+
+ REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
+ access_mode |= (stuff->valueMask & CWEventMask) ? DixReceiveAccess : 0;
+ access_mode |= (stuff->valueMask & ~CWEventMask) ? DixSetAttrAccess : 0;
+ rc = dixLookupWindow(&pWin, stuff->window, client, access_mode);
+ if (rc != Success)
+ return rc;
+ len = client->req_len - bytes_to_int32(sizeof(xChangeWindowAttributesReq));
+ if (len != Ones(stuff->valueMask))
+ return BadLength;
+ return ChangeWindowAttributes(pWin,
+ stuff->valueMask,
+ (XID *) &stuff[1],
+ client);
+}
+
+int
+ProcGetWindowAttributes(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xResourceReq);
+ xGetWindowAttributesReply wa;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+ memset(&wa, 0, sizeof(xGetWindowAttributesReply));
+ GetWindowAttributes(pWin, client, &wa);
+ WriteReplyToClient(client, sizeof(xGetWindowAttributesReply), &wa);
+ return Success;
+}
+
+int
+ProcDestroyWindow(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xResourceReq);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess);
+ if (rc != Success)
+ return rc;
+ if (pWin->parent) {
+ rc = dixLookupWindow(&pWin, pWin->parent->drawable.id, client,
+ DixRemoveAccess);
+ if (rc != Success)
+ return rc;
+ FreeResource(stuff->id, RT_NONE);
+ }
+ return Success;
+}
+
+int
+ProcDestroySubwindows(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xResourceReq);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupWindow(&pWin, stuff->id, client, DixRemoveAccess);
+ if (rc != Success)
+ return rc;
+ DestroySubwindows(pWin, client);
+ return Success;
+}
+
+int
+ProcChangeSaveSet(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xChangeSaveSetReq);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xChangeSaveSetReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
+ if (rc != Success)
+ return rc;
+ if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id)))
+ return BadMatch;
+ if ((stuff->mode == SetModeInsert) || (stuff->mode == SetModeDelete))
+ return AlterSaveSetForClient(client, pWin, stuff->mode, FALSE, TRUE);
+ client->errorValue = stuff->mode;
+ return BadValue;
+}
+
+int
+ProcReparentWindow(ClientPtr client)
+{
+ WindowPtr pWin, pParent;
+ REQUEST(xReparentWindowReq);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xReparentWindowReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
+ if (rc != Success)
+ return rc;
+ rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess);
+ if (rc != Success)
+ return rc;
+ if (!SAME_SCREENS(pWin->drawable, pParent->drawable))
+ return BadMatch;
+ if ((pWin->backgroundState == ParentRelative) &&
+ (pParent->drawable.depth != pWin->drawable.depth))
+ return BadMatch;
+ if ((pWin->drawable.class != InputOnly) &&
+ (pParent->drawable.class == InputOnly))
+ return BadMatch;
+ return ReparentWindow(pWin, pParent,
+ (short)stuff->x, (short)stuff->y, client);
+}
+
+int
+ProcMapWindow(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xResourceReq);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupWindow(&pWin, stuff->id, client, DixShowAccess);
+ if (rc != Success)
+ return rc;
+ MapWindow(pWin, client);
+ /* update cache to say it is mapped */
+ return Success;
+}
+
+int
+ProcMapSubwindows(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xResourceReq);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
+ if (rc != Success)
+ return rc;
+ MapSubwindows(pWin, client);
+ /* update cache to say it is mapped */
+ return Success;
+}
+
+int
+ProcUnmapWindow(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xResourceReq);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupWindow(&pWin, stuff->id, client, DixHideAccess);
+ if (rc != Success)
+ return rc;
+ UnmapWindow(pWin, FALSE);
+ /* update cache to say it is mapped */
+ return Success;
+}
+
+int
+ProcUnmapSubwindows(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xResourceReq);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
+ if (rc != Success)
+ return rc;
+ UnmapSubwindows(pWin);
+ return Success;
+}
+
+int
+ProcConfigureWindow(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xConfigureWindowReq);
+ int len, rc;
+
+ REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client,
+ DixManageAccess|DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+ len = client->req_len - bytes_to_int32(sizeof(xConfigureWindowReq));
+ if (Ones((Mask)stuff->mask) != len)
+ return BadLength;
+ return ConfigureWindow(pWin, (Mask)stuff->mask, (XID *) &stuff[1], client);
+}
+
+int
+ProcCirculateWindow(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xCirculateWindowReq);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xCirculateWindowReq);
+ if ((stuff->direction != RaiseLowest) &&
+ (stuff->direction != LowerHighest))
+ {
+ client->errorValue = stuff->direction;
+ return BadValue;
+ }
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
+ if (rc != Success)
+ return rc;
+ CirculateWindow(pWin, (int)stuff->direction, client);
+ return Success;
+}
+
+static int
+GetGeometry(ClientPtr client, xGetGeometryReply *rep)
+{
+ DrawablePtr pDraw;
+ int rc;
+ REQUEST(xResourceReq);
+ REQUEST_SIZE_MATCH(xResourceReq);
+
+ rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ rep->type = X_Reply;
+ rep->length = 0;
+ rep->sequenceNumber = client->sequence;
+ rep->root = pDraw->pScreen->root->drawable.id;
+ rep->depth = pDraw->depth;
+ rep->width = pDraw->width;
+ rep->height = pDraw->height;
+
+ if (WindowDrawable(pDraw->type))
+ {
+ WindowPtr pWin = (WindowPtr)pDraw;
+ rep->x = pWin->origin.x - wBorderWidth (pWin);
+ rep->y = pWin->origin.y - wBorderWidth (pWin);
+ rep->borderWidth = pWin->borderWidth;
+ }
+ else /* DRAWABLE_PIXMAP */
+ {
+ rep->x = rep->y = rep->borderWidth = 0;
+ }
+
+ return Success;
+}
+
+
+int
+ProcGetGeometry(ClientPtr client)
+{
+ xGetGeometryReply rep;
+ int status;
+
+ memset(&rep, 0, sizeof(xGetGeometryReply));
+ if ((status = GetGeometry(client, &rep)) != Success)
+ return status;
+
+ WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep);
+ return Success;
+}
+
+#ifdef WIN32
+/* Do not return the clipboard window in ProcQueryTree, cause this may cause
+ the clipboard client being closed when connecting through xdmcp.
+*/
+extern Window g_iClipboardWindow;
+
+#endif
+
+int
+ProcQueryTree(ClientPtr client)
+{
+ xQueryTreeReply reply;
+ int rc, numChildren = 0;
+ WindowPtr pChild, pWin, pHead;
+ Window *childIDs = (Window *)NULL;
+ REQUEST(xResourceReq);
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
+ if (rc != Success)
+ return rc;
+ memset(&reply, 0, sizeof(xQueryTreeReply));
+ reply.type = X_Reply;
+ reply.root = pWin->drawable.pScreen->root->drawable.id;
+ reply.sequenceNumber = client->sequence;
+ if (pWin->parent)
+ reply.parent = pWin->parent->drawable.id;
+ else
+ reply.parent = (Window)None;
+ pHead = RealChildHead(pWin);
+ for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib)
+#ifdef WIN32
+ if (pChild->drawable.id!=g_iClipboardWindow)
+#endif
+ numChildren++;
+ if (numChildren)
+ {
+ int curChild = 0;
+
+ childIDs = malloc(numChildren * sizeof(Window));
+ if (!childIDs)
+ return BadAlloc;
+ for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib)
+#ifdef WIN32
+ if (pChild->drawable.id!=g_iClipboardWindow)
+#endif
+ childIDs[curChild++] = pChild->drawable.id;
+ }
+
+ reply.nChildren = numChildren;
+ reply.length = bytes_to_int32(numChildren * sizeof(Window));
+
+ WriteReplyToClient(client, sizeof(xQueryTreeReply), &reply);
+ if (numChildren)
+ {
+ client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
+ WriteSwappedDataToClient(client, numChildren * sizeof(Window), childIDs);
+ free(childIDs);
+ }
+
+ return Success;
+}
+
+int
+ProcInternAtom(ClientPtr client)
+{
+ Atom atom;
+ char *tchar;
+ REQUEST(xInternAtomReq);
+
+ REQUEST_FIXED_SIZE(xInternAtomReq, stuff->nbytes);
+ if ((stuff->onlyIfExists != xTrue) && (stuff->onlyIfExists != xFalse))
+ {
+ client->errorValue = stuff->onlyIfExists;
+ return BadValue;
+ }
+ tchar = (char *) &stuff[1];
+ atom = MakeAtom(tchar, stuff->nbytes, !stuff->onlyIfExists);
+ if (atom != BAD_RESOURCE)
+ {
+ xInternAtomReply reply;
+ memset(&reply, 0, sizeof(xInternAtomReply));
+ reply.type = X_Reply;
+ reply.length = 0;
+ reply.sequenceNumber = client->sequence;
+ reply.atom = atom;
+ WriteReplyToClient(client, sizeof(xInternAtomReply), &reply);
+ return Success;
+ }
+ else
+ return BadAlloc;
+}
+
+int
+ProcGetAtomName(ClientPtr client)
+{
+ const char *str;
+ xGetAtomNameReply reply;
+ int len;
+ REQUEST(xResourceReq);
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ if ( (str = NameForAtom(stuff->id)) )
+ {
+ len = strlen(str);
+ memset(&reply, 0, sizeof(xGetAtomNameReply));
+ reply.type = X_Reply;
+ reply.length = bytes_to_int32(len);
+ reply.sequenceNumber = client->sequence;
+ reply.nameLength = len;
+ WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply);
+ (void)WriteToClient(client, len, str);
+ return Success;
+ }
+ else
+ {
+ client->errorValue = stuff->id;
+ return BadAtom;
+ }
+}
+
+int
+ProcGrabServer(ClientPtr client)
+{
+ int rc;
+ REQUEST_SIZE_MATCH(xReq);
+ if (grabState != GrabNone && client != grabClient)
+ {
+ ResetCurrentRequest(client);
+ client->sequence--;
+ BITSET(grabWaiters, client->index);
+ IgnoreClient(client);
+ return Success;
+ }
+ rc = OnlyListenToOneClient(client);
+ if (rc != Success)
+ return rc;
+ grabState = GrabKickout;
+ grabClient = client;
+
+ if (ServerGrabCallback)
+ {
+ ServerGrabInfoRec grabinfo;
+ grabinfo.client = client;
+ grabinfo.grabstate = SERVER_GRABBED;
+ CallCallbacks(&ServerGrabCallback, (pointer)&grabinfo);
+ }
+
+ return Success;
+}
+
+static void
+UngrabServer(ClientPtr client)
+{
+ int i;
+
+ grabState = GrabNone;
+ ListenToAllClients();
+ for (i = mskcnt; --i >= 0 && !grabWaiters[i]; )
+ ;
+ if (i >= 0)
+ {
+ i <<= 5;
+ while (!GETBIT(grabWaiters, i))
+ i++;
+ BITCLEAR(grabWaiters, i);
+ AttendClient(clients[i]);
+ }
+
+ if (ServerGrabCallback)
+ {
+ ServerGrabInfoRec grabinfo;
+ grabinfo.client = client;
+ grabinfo.grabstate = SERVER_UNGRABBED;
+ CallCallbacks(&ServerGrabCallback, (pointer)&grabinfo);
+ }
+}
+
+int
+ProcUngrabServer(ClientPtr client)
+{
+ REQUEST_SIZE_MATCH(xReq);
+ UngrabServer(client);
+ return Success;
+}
+
+int
+ProcTranslateCoords(ClientPtr client)
+{
+ REQUEST(xTranslateCoordsReq);
+
+ WindowPtr pWin, pDst;
+ xTranslateCoordsReply rep;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xTranslateCoordsReq);
+ rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+ rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+ memset(&rep, 0, sizeof(xTranslateCoordsReply));
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ if (!SAME_SCREENS(pWin->drawable, pDst->drawable))
+ {
+ rep.sameScreen = xFalse;
+ rep.child = None;
+ rep.dstX = rep.dstY = 0;
+ }
+ else
+ {
+ INT16 x, y;
+ rep.sameScreen = xTrue;
+ rep.child = None;
+ /* computing absolute coordinates -- adjust to destination later */
+ x = pWin->drawable.x + stuff->srcX;
+ y = pWin->drawable.y + stuff->srcY;
+ pWin = pDst->firstChild;
+ while (pWin)
+ {
+ BoxRec box;
+ if ((pWin->mapped) &&
+ (x >= pWin->drawable.x - wBorderWidth (pWin)) &&
+ (x < pWin->drawable.x + (int)pWin->drawable.width +
+ wBorderWidth (pWin)) &&
+ (y >= pWin->drawable.y - wBorderWidth (pWin)) &&
+ (y < pWin->drawable.y + (int)pWin->drawable.height +
+ wBorderWidth (pWin))
+ /* When a window is shaped, a further check
+ * is made to see if the point is inside
+ * borderSize
+ */
+ && (!wBoundingShape(pWin) ||
+ RegionContainsPoint(&pWin->borderSize, x, y, &box))
+
+ && (!wInputShape(pWin) ||
+ RegionContainsPoint(wInputShape(pWin),
+ x - pWin->drawable.x,
+ y - pWin->drawable.y, &box))
+ )
+ {
+ rep.child = pWin->drawable.id;
+ pWin = (WindowPtr) NULL;
+ }
+ else
+ pWin = pWin->nextSib;
+ }
+ /* adjust to destination coordinates */
+ rep.dstX = x - pDst->drawable.x;
+ rep.dstY = y - pDst->drawable.y;
+ }
+ WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep);
+ return Success;
+}
+
+int
+ProcOpenFont(ClientPtr client)
+{
+ int err;
+ REQUEST(xOpenFontReq);
+
+ REQUEST_FIXED_SIZE(xOpenFontReq, stuff->nbytes);
+ client->errorValue = stuff->fid;
+ LEGAL_NEW_RESOURCE(stuff->fid, client);
+ err = OpenFont(client, stuff->fid, (Mask) 0,
+ stuff->nbytes, (char *)&stuff[1]);
+ if (err == Success)
+ {
+ return Success;
+ }
+ else
+ return err;
+}
+
+int
+ProcCloseFont(ClientPtr client)
+{
+ FontPtr pFont;
+ int rc;
+ REQUEST(xResourceReq);
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT,
+ client, DixDestroyAccess);
+ if (rc == Success)
+ {
+ FreeResource(stuff->id, RT_NONE);
+ return Success;
+ }
+ else
+ {
+ client->errorValue = stuff->id;
+ return rc;
+ }
+}
+
+int
+ProcQueryFont(ClientPtr client)
+{
+ xQueryFontReply *reply;
+ FontPtr pFont;
+ int rc;
+ REQUEST(xResourceReq);
+ REQUEST_SIZE_MATCH(xResourceReq);
+
+ rc = dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ {
+ xCharInfo *pmax = FONTINKMAX(pFont);
+ xCharInfo *pmin = FONTINKMIN(pFont);
+ int nprotoxcistructs;
+ int rlength;
+
+ nprotoxcistructs = (
+ pmax->rightSideBearing == pmin->rightSideBearing &&
+ pmax->leftSideBearing == pmin->leftSideBearing &&
+ pmax->descent == pmin->descent &&
+ pmax->ascent == pmin->ascent &&
+ pmax->characterWidth == pmin->characterWidth) ?
+ 0 : N2dChars(pFont);
+
+ rlength = sizeof(xQueryFontReply) +
+ FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) +
+ nprotoxcistructs * sizeof(xCharInfo);
+ reply = calloc(1, rlength);
+ if(!reply)
+ {
+ return BadAlloc;
+ }
+
+ reply->type = X_Reply;
+ reply->length = bytes_to_int32(rlength - sizeof(xGenericReply));
+ reply->sequenceNumber = client->sequence;
+ QueryFont( pFont, reply, nprotoxcistructs);
+
+ WriteReplyToClient(client, rlength, reply);
+ free(reply);
+ return Success;
+ }
+}
+
+int
+ProcQueryTextExtents(ClientPtr client)
+{
+ xQueryTextExtentsReply reply;
+ FontPtr pFont;
+ ExtentInfoRec info;
+ unsigned long length;
+ int rc;
+ REQUEST(xQueryTextExtentsReq);
+ REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq);
+
+ rc = dixLookupFontable(&pFont, stuff->fid, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ length = client->req_len - bytes_to_int32(sizeof(xQueryTextExtentsReq));
+ length = length << 1;
+ if (stuff->oddLength)
+ {
+ if (length == 0)
+ return BadLength;
+ length--;
+ }
+ if (!QueryTextExtents(pFont, length, (unsigned char *)&stuff[1], &info))
+ return BadAlloc;
+ reply.type = X_Reply;
+ reply.length = 0;
+ reply.sequenceNumber = client->sequence;
+ reply.drawDirection = info.drawDirection;
+ reply.fontAscent = info.fontAscent;
+ reply.fontDescent = info.fontDescent;
+ reply.overallAscent = info.overallAscent;
+ reply.overallDescent = info.overallDescent;
+ reply.overallWidth = info.overallWidth;
+ reply.overallLeft = info.overallLeft;
+ reply.overallRight = info.overallRight;
+ WriteReplyToClient(client, sizeof(xQueryTextExtentsReply), &reply);
+ return Success;
+}
+
+int
+ProcListFonts(ClientPtr client)
+{
+ REQUEST(xListFontsReq);
+
+ REQUEST_FIXED_SIZE(xListFontsReq, stuff->nbytes);
+
+ return ListFonts(client, (unsigned char *) &stuff[1], stuff->nbytes,
+ stuff->maxNames);
+}
+
+int
+ProcListFontsWithInfo(ClientPtr client)
+{
+ REQUEST(xListFontsWithInfoReq);
+
+ REQUEST_FIXED_SIZE(xListFontsWithInfoReq, stuff->nbytes);
+
+ return StartListFontsWithInfo(client, stuff->nbytes,
+ (unsigned char *) &stuff[1], stuff->maxNames);
+}
+
+/**
+ *
+ * \param value must conform to DeleteType
+ */
+int
+dixDestroyPixmap(pointer value, XID pid)
+{
+ PixmapPtr pPixmap = (PixmapPtr)value;
+ return (*pPixmap->drawable.pScreen->DestroyPixmap)(pPixmap);
+}
+
+int
+ProcCreatePixmap(ClientPtr client)
+{
+ PixmapPtr pMap;
+ DrawablePtr pDraw;
+ REQUEST(xCreatePixmapReq);
+ DepthPtr pDepth;
+ int i, rc;
+
+ REQUEST_SIZE_MATCH(xCreatePixmapReq);
+ client->errorValue = stuff->pid;
+ LEGAL_NEW_RESOURCE(stuff->pid, client);
+
+ rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY,
+ DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ if (!stuff->width || !stuff->height)
+ {
+ client->errorValue = 0;
+ return BadValue;
+ }
+ if (stuff->width > 32767 || stuff->height > 32767)
+ {
+ /* It is allowed to try and allocate a pixmap which is larger than
+ * 32767 in either dimension. However, all of the framebuffer code
+ * is buggy and does not reliably draw to such big pixmaps, basically
+ * because the Region data structure operates with signed shorts
+ * for the rectangles in it.
+ *
+ * Furthermore, several places in the X server computes the
+ * size in bytes of the pixmap and tries to store it in an
+ * integer. This integer can overflow and cause the allocated size
+ * to be much smaller.
+ *
+ * So, such big pixmaps are rejected here with a BadAlloc
+ */
+ return BadAlloc;
+ }
+ if (stuff->depth != 1)
+ {
+ pDepth = pDraw->pScreen->allowedDepths;
+ for (i=0; i<pDraw->pScreen->numDepths; i++, pDepth++)
+ if (pDepth->depth == stuff->depth)
+ goto CreatePmap;
+ client->errorValue = stuff->depth;
+ return BadValue;
+ }
+CreatePmap:
+ pMap = (PixmapPtr)(*pDraw->pScreen->CreatePixmap)
+ (pDraw->pScreen, stuff->width,
+ stuff->height, stuff->depth, 0);
+ if (pMap)
+ {
+ pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+ pMap->drawable.id = stuff->pid;
+ /* security creation/labeling check */
+ rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, RT_PIXMAP,
+ pMap, RT_NONE, NULL, DixCreateAccess);
+ if (rc != Success) {
+ (*pDraw->pScreen->DestroyPixmap)(pMap);
+ return rc;
+ }
+ if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap))
+ return Success;
+ (*pDraw->pScreen->DestroyPixmap)(pMap);
+ }
+ return BadAlloc;
+}
+
+int
+ProcFreePixmap(ClientPtr client)
+{
+ PixmapPtr pMap;
+ int rc;
+ REQUEST(xResourceReq);
+ REQUEST_SIZE_MATCH(xResourceReq);
+
+ rc = dixLookupResourceByType((pointer *)&pMap, stuff->id, RT_PIXMAP, client,
+ DixDestroyAccess);
+ if (rc == Success)
+ {
+ FreeResource(stuff->id, RT_NONE);
+ return Success;
+ }
+ else
+ {
+ client->errorValue = stuff->id;
+ return rc;
+ }
+}
+
+int
+ProcCreateGC(ClientPtr client)
+{
+ int error, rc;
+ GC *pGC;
+ DrawablePtr pDraw;
+ unsigned len;
+ REQUEST(xCreateGCReq);
+
+ REQUEST_AT_LEAST_SIZE(xCreateGCReq);
+ client->errorValue = stuff->gc;
+ LEGAL_NEW_RESOURCE(stuff->gc, client);
+ rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
+ DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ len = client->req_len - bytes_to_int32(sizeof(xCreateGCReq));
+ if (len != Ones(stuff->mask))
+ return BadLength;
+ pGC = (GC *)CreateGC(pDraw, stuff->mask, (XID *) &stuff[1], &error,
+ stuff->gc, client);
+ if (error != Success)
+ return error;
+ if (!AddResource(stuff->gc, RT_GC, (pointer)pGC))
+ return BadAlloc;
+ return Success;
+}
+
+int
+ProcChangeGC(ClientPtr client)
+{
+ GC *pGC;
+ int result;
+ unsigned len;
+ REQUEST(xChangeGCReq);
+ REQUEST_AT_LEAST_SIZE(xChangeGCReq);
+
+ result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess);
+ if (result != Success)
+ return result;
+
+ len = client->req_len - bytes_to_int32(sizeof(xChangeGCReq));
+ if (len != Ones(stuff->mask))
+ return BadLength;
+
+ return ChangeGCXIDs(client, pGC, stuff->mask, (CARD32 *) &stuff[1]);
+}
+
+int
+ProcCopyGC(ClientPtr client)
+{
+ GC *dstGC;
+ GC *pGC;
+ int result;
+ REQUEST(xCopyGCReq);
+ REQUEST_SIZE_MATCH(xCopyGCReq);
+
+ result = dixLookupGC(&pGC, stuff->srcGC, client, DixGetAttrAccess);
+ if (result != Success)
+ return result;
+ result = dixLookupGC(&dstGC, stuff->dstGC, client, DixSetAttrAccess);
+ if (result != Success)
+ return result;
+ if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth))
+ return BadMatch;
+ if (stuff->mask & ~GCAllBits)
+ {
+ client->errorValue = stuff->mask;
+ return BadValue;
+ }
+ return CopyGC(pGC, dstGC, stuff->mask);
+}
+
+int
+ProcSetDashes(ClientPtr client)
+{
+ GC *pGC;
+ int result;
+ REQUEST(xSetDashesReq);
+
+ REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes);
+ if (stuff->nDashes == 0)
+ {
+ client->errorValue = 0;
+ return BadValue;
+ }
+
+ result = dixLookupGC(&pGC,stuff->gc, client, DixSetAttrAccess);
+ if (result != Success)
+ return result;
+
+ /* If there's an error, either there's no sensible errorValue,
+ * or there was a dash segment of 0. */
+ client->errorValue = 0;
+ return SetDashes(pGC, stuff->dashOffset, stuff->nDashes,
+ (unsigned char *)&stuff[1]);
+}
+
+int
+ProcSetClipRectangles(ClientPtr client)
+{
+ int nr, result;
+ GC *pGC;
+ REQUEST(xSetClipRectanglesReq);
+
+ REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
+ if ((stuff->ordering != Unsorted) && (stuff->ordering != YSorted) &&
+ (stuff->ordering != YXSorted) && (stuff->ordering != YXBanded))
+ {
+ client->errorValue = stuff->ordering;
+ return BadValue;
+ }
+ result = dixLookupGC(&pGC,stuff->gc, client, DixSetAttrAccess);
+ if (result != Success)
+ return result;
+
+ nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq);
+ if (nr & 4)
+ return BadLength;
+ nr >>= 3;
+ return SetClipRects(pGC, stuff->xOrigin, stuff->yOrigin,
+ nr, (xRectangle *)&stuff[1], (int)stuff->ordering);
+}
+
+int
+ProcFreeGC(ClientPtr client)
+{
+ GC *pGC;
+ int rc;
+ REQUEST(xResourceReq);
+ REQUEST_SIZE_MATCH(xResourceReq);
+
+ rc = dixLookupGC(&pGC, stuff->id, client, DixDestroyAccess);
+ if (rc != Success)
+ return rc;
+
+ FreeResource(stuff->id, RT_NONE);
+ return Success;
+}
+
+int
+ProcClearToBackground(ClientPtr client)
+{
+ REQUEST(xClearAreaReq);
+ WindowPtr pWin;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xClearAreaReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
+ if (rc != Success)
+ return rc;
+ if (pWin->drawable.class == InputOnly)
+ {
+ client->errorValue = stuff->window;
+ return BadMatch;
+ }
+ if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse))
+ {
+ client->errorValue = stuff->exposures;
+ return BadValue;
+ }
+ (*pWin->drawable.pScreen->ClearToBackground)(pWin, stuff->x, stuff->y,
+ stuff->width, stuff->height,
+ (Bool)stuff->exposures);
+ return Success;
+}
+
+int
+ProcCopyArea(ClientPtr client)
+{
+ DrawablePtr pDst;
+ DrawablePtr pSrc;
+ GC *pGC;
+ REQUEST(xCopyAreaReq);
+ RegionPtr pRgn;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xCopyAreaReq);
+
+ VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess);
+ if (stuff->dstDrawable != stuff->srcDrawable)
+ {
+ rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0,
+ DixReadAccess);
+ if (rc != Success)
+ return rc;
+ if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth))
+ {
+ client->errorValue = stuff->dstDrawable;
+ return BadMatch;
+ }
+ }
+ else
+ pSrc = pDst;
+
+ pRgn = (*pGC->ops->CopyArea)(pSrc, pDst, pGC, stuff->srcX, stuff->srcY,
+ stuff->width, stuff->height,
+ stuff->dstX, stuff->dstY);
+ if (pGC->graphicsExposures)
+ {
+ (*pDst->pScreen->SendGraphicsExpose)
+ (client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
+ if (pRgn)
+ RegionDestroy(pRgn);
+ }
+
+ return Success;
+}
+
+int
+ProcCopyPlane(ClientPtr client)
+{
+ DrawablePtr psrcDraw, pdstDraw;
+ GC *pGC;
+ REQUEST(xCopyPlaneReq);
+ RegionPtr pRgn;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xCopyPlaneReq);
+
+ VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess);
+ if (stuff->dstDrawable != stuff->srcDrawable)
+ {
+ rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0,
+ DixReadAccess);
+ if (rc != Success)
+ return rc;
+
+ if (pdstDraw->pScreen != psrcDraw->pScreen)
+ {
+ client->errorValue = stuff->dstDrawable;
+ return BadMatch;
+ }
+ }
+ else
+ psrcDraw = pdstDraw;
+
+ /* Check to see if stuff->bitPlane has exactly ONE good bit set */
+ if(stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) ||
+ (stuff->bitPlane > (1L << (psrcDraw->depth - 1))))
+ {
+ client->errorValue = stuff->bitPlane;
+ return BadValue;
+ }
+
+ pRgn = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC, stuff->srcX, stuff->srcY,
+ stuff->width, stuff->height,
+ stuff->dstX, stuff->dstY, stuff->bitPlane);
+ if (pGC->graphicsExposures)
+ {
+ (*pdstDraw->pScreen->SendGraphicsExpose)
+ (client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
+ if (pRgn)
+ RegionDestroy(pRgn);
+ }
+ return Success;
+}
+
+int
+ProcPolyPoint(ClientPtr client)
+{
+ int npoint;
+ GC *pGC;
+ DrawablePtr pDraw;
+ REQUEST(xPolyPointReq);
+
+ REQUEST_AT_LEAST_SIZE(xPolyPointReq);
+ if ((stuff->coordMode != CoordModeOrigin) &&
+ (stuff->coordMode != CoordModePrevious))
+ {
+ client->errorValue = stuff->coordMode;
+ return BadValue;
+ }
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+ npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq));
+ if (npoint)
+ (*pGC->ops->PolyPoint)(pDraw, pGC, stuff->coordMode, npoint,
+ (xPoint *) &stuff[1]);
+ return Success;
+}
+
+int
+ProcPolyLine(ClientPtr client)
+{
+ int npoint;
+ GC *pGC;
+ DrawablePtr pDraw;
+ REQUEST(xPolyLineReq);
+
+ REQUEST_AT_LEAST_SIZE(xPolyLineReq);
+ if ((stuff->coordMode != CoordModeOrigin) &&
+ (stuff->coordMode != CoordModePrevious))
+ {
+ client->errorValue = stuff->coordMode;
+ return BadValue;
+ }
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+ npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq));
+ if (npoint > 1)
+ (*pGC->ops->Polylines)(pDraw, pGC, stuff->coordMode, npoint,
+ (DDXPointPtr) &stuff[1]);
+ return Success;
+}
+
+int
+ProcPolySegment(ClientPtr client)
+{
+ int nsegs;
+ GC *pGC;
+ DrawablePtr pDraw;
+ REQUEST(xPolySegmentReq);
+
+ REQUEST_AT_LEAST_SIZE(xPolySegmentReq);
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+ nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq);
+ if (nsegs & 4)
+ return BadLength;
+ nsegs >>= 3;
+ if (nsegs)
+ (*pGC->ops->PolySegment)(pDraw, pGC, nsegs, (xSegment *) &stuff[1]);
+ return Success;
+}
+
+int
+ProcPolyRectangle (ClientPtr client)
+{
+ int nrects;
+ GC *pGC;
+ DrawablePtr pDraw;
+ REQUEST(xPolyRectangleReq);
+
+ REQUEST_AT_LEAST_SIZE(xPolyRectangleReq);
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+ nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq);
+ if (nrects & 4)
+ return BadLength;
+ nrects >>= 3;
+ if (nrects)
+ (*pGC->ops->PolyRectangle)(pDraw, pGC,
+ nrects, (xRectangle *) &stuff[1]);
+ return Success;
+}
+
+int
+ProcPolyArc(ClientPtr client)
+{
+ int narcs;
+ GC *pGC;
+ DrawablePtr pDraw;
+ REQUEST(xPolyArcReq);
+
+ REQUEST_AT_LEAST_SIZE(xPolyArcReq);
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+ narcs = (client->req_len << 2) - sizeof(xPolyArcReq);
+ if (narcs % sizeof(xArc))
+ return BadLength;
+ narcs /= sizeof(xArc);
+ if (narcs)
+ (*pGC->ops->PolyArc)(pDraw, pGC, narcs, (xArc *) &stuff[1]);
+ return Success;
+}
+
+int
+ProcFillPoly(ClientPtr client)
+{
+ int things;
+ GC *pGC;
+ DrawablePtr pDraw;
+ REQUEST(xFillPolyReq);
+
+ REQUEST_AT_LEAST_SIZE(xFillPolyReq);
+ if ((stuff->shape != Complex) && (stuff->shape != Nonconvex) &&
+ (stuff->shape != Convex))
+ {
+ client->errorValue = stuff->shape;
+ return BadValue;
+ }
+ if ((stuff->coordMode != CoordModeOrigin) &&
+ (stuff->coordMode != CoordModePrevious))
+ {
+ client->errorValue = stuff->coordMode;
+ return BadValue;
+ }
+
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+ things = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq));
+ if (things)
+ (*pGC->ops->FillPolygon) (pDraw, pGC, stuff->shape,
+ stuff->coordMode, things,
+ (DDXPointPtr) &stuff[1]);
+ return Success;
+}
+
+int
+ProcPolyFillRectangle(ClientPtr client)
+{
+ int things;
+ GC *pGC;
+ DrawablePtr pDraw;
+ REQUEST(xPolyFillRectangleReq);
+
+ REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq);
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+ things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq);
+ if (things & 4)
+ return BadLength;
+ things >>= 3;
+
+ if (things)
+ (*pGC->ops->PolyFillRect) (pDraw, pGC, things,
+ (xRectangle *) &stuff[1]);
+ return Success;
+}
+
+int
+ProcPolyFillArc(ClientPtr client)
+{
+ int narcs;
+ GC *pGC;
+ DrawablePtr pDraw;
+ REQUEST(xPolyFillArcReq);
+
+ REQUEST_AT_LEAST_SIZE(xPolyFillArcReq);
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+ narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq);
+ if (narcs % sizeof(xArc))
+ return BadLength;
+ narcs /= sizeof(xArc);
+ if (narcs)
+ (*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]);
+ return Success;
+}
+
+#ifdef MATCH_CLIENT_ENDIAN
+
+int
+ServerOrder (void)
+{
+ int whichbyte = 1;
+
+ if (*((char *) &whichbyte))
+ return LSBFirst;
+ return MSBFirst;
+}
+
+#define ClientOrder(client) ((client)->swapped ? !ServerOrder() : ServerOrder())
+
+void
+ReformatImage (char *base, int nbytes, int bpp, int order)
+{
+ switch (bpp) {
+ case 1: /* yuck */
+ if (BITMAP_BIT_ORDER != order)
+ BitOrderInvert ((unsigned char *) base, nbytes);
+#if IMAGE_BYTE_ORDER != BITMAP_BIT_ORDER && BITMAP_SCANLINE_UNIT != 8
+ ReformatImage (base, nbytes, BITMAP_SCANLINE_UNIT, order);
+#endif
+ break;
+ case 4:
+ break; /* yuck */
+ case 8:
+ break;
+ case 16:
+ if (IMAGE_BYTE_ORDER != order)
+ TwoByteSwap ((unsigned char *) base, nbytes);
+ break;
+ case 32:
+ if (IMAGE_BYTE_ORDER != order)
+ FourByteSwap ((unsigned char *) base, nbytes);
+ break;
+ }
+}
+#else
+#define ReformatImage(b,n,bpp,o)
+#endif
+
+/* 64-bit server notes: the protocol restricts padding of images to
+ * 8-, 16-, or 32-bits. We would like to have 64-bits for the server
+ * to use internally. Removes need for internal alignment checking.
+ * All of the PutImage functions could be changed individually, but
+ * as currently written, they call other routines which require things
+ * to be 64-bit padded on scanlines, so we changed things here.
+ * If an image would be padded differently for 64- versus 32-, then
+ * copy each scanline to a 64-bit padded scanline.
+ * Also, we need to make sure that the image is aligned on a 64-bit
+ * boundary, even if the scanlines are padded to our satisfaction.
+ */
+int
+ProcPutImage(ClientPtr client)
+{
+ GC *pGC;
+ DrawablePtr pDraw;
+ long length; /* length of scanline server padded */
+ long lengthProto; /* length of scanline protocol padded */
+ char *tmpImage;
+ REQUEST(xPutImageReq);
+
+ REQUEST_AT_LEAST_SIZE(xPutImageReq);
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+ if (stuff->format == XYBitmap)
+ {
+ if ((stuff->depth != 1) ||
+ (stuff->leftPad >= (unsigned int)screenInfo.bitmapScanlinePad))
+ return BadMatch;
+ length = BitmapBytePad(stuff->width + stuff->leftPad);
+ }
+ else if (stuff->format == XYPixmap)
+ {
+ if ((pDraw->depth != stuff->depth) ||
+ (stuff->leftPad >= (unsigned int)screenInfo.bitmapScanlinePad))
+ return BadMatch;
+ length = BitmapBytePad(stuff->width + stuff->leftPad);
+ length *= stuff->depth;
+ }
+ else if (stuff->format == ZPixmap)
+ {
+ if ((pDraw->depth != stuff->depth) || (stuff->leftPad != 0))
+ return BadMatch;
+ length = PixmapBytePad(stuff->width, stuff->depth);
+ }
+ else
+ {
+ client->errorValue = stuff->format;
+ return BadValue;
+ }
+
+ tmpImage = (char *)&stuff[1];
+ lengthProto = length;
+
+ if ((bytes_to_int32(lengthProto * stuff->height) +
+ bytes_to_int32(sizeof(xPutImageReq))) != client->req_len)
+ return BadLength;
+
+ ReformatImage (tmpImage, lengthProto * stuff->height,
+ stuff->format == ZPixmap ? BitsPerPixel (stuff->depth) : 1,
+ ClientOrder(client));
+
+ (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, stuff->dstX, stuff->dstY,
+ stuff->width, stuff->height,
+ stuff->leftPad, stuff->format, tmpImage);
+
+ return Success;
+}
+
+static int
+DoGetImage(ClientPtr client, int format, Drawable drawable,
+ int x, int y, int width, int height,
+ Mask planemask, xGetImageReply **im_return)
+{
+ DrawablePtr pDraw, pBoundingDraw;
+ int nlines, linesPerBuf, rc;
+ int linesDone;
+ /* coordinates relative to the bounding drawable */
+ int relx, rely;
+ long widthBytesLine, length;
+ Mask plane = 0;
+ char *pBuf;
+ xGetImageReply xgi;
+ RegionPtr pVisibleRegion = NULL;
+
+ if ((format != XYPixmap) && (format != ZPixmap))
+ {
+ client->errorValue = format;
+ return BadValue;
+ }
+ rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixReadAccess);
+ if (rc != Success)
+ return rc;
+
+ memset(&xgi, 0, sizeof(xGetImageReply));
+
+ relx = x;
+ rely = y;
+
+ if(pDraw->type == DRAWABLE_WINDOW)
+ {
+ WindowPtr pWin = (WindowPtr)pDraw;
+
+ /* "If the drawable is a window, the window must be viewable ... or a
+ * BadMatch error results" */
+ if (!pWin->viewable)
+ return BadMatch;
+
+ relx += pDraw->x;
+ rely += pDraw->y;
+
+ if (pDraw->pScreen->GetWindowPixmap) {
+ PixmapPtr pPix = (*pDraw->pScreen->GetWindowPixmap) (pWin);
+
+ pBoundingDraw = &pPix->drawable;
+#ifdef COMPOSITE
+ relx -= pPix->screen_x;
+ rely -= pPix->screen_y;
+#endif
+ }
+ else
+ {
+ pBoundingDraw = (DrawablePtr)pDraw->pScreen->root;
+ }
+
+ xgi.visual = wVisual (pWin);
+ }
+ else
+ {
+ pBoundingDraw = pDraw;
+ xgi.visual = None;
+ }
+
+ /* "If the drawable is a pixmap, the given rectangle must be wholly
+ * contained within the pixmap, or a BadMatch error results. If the
+ * drawable is a window [...] it must be the case that if there were no
+ * inferiors or overlapping windows, the specified rectangle of the window
+ * would be fully visible on the screen and wholly contained within the
+ * outside edges of the window, or a BadMatch error results."
+ *
+ * We relax the window case slightly to mean that the rectangle must exist
+ * within the bounds of the window's backing pixmap. In particular, this
+ * means that a GetImage request may succeed or fail with BadMatch depending
+ * on whether any of its ancestor windows are redirected. */
+ if(relx < 0 || relx + width > (int)pBoundingDraw->width ||
+ rely < 0 || rely + height > (int)pBoundingDraw->height)
+ return BadMatch;
+
+ xgi.type = X_Reply;
+ xgi.sequenceNumber = client->sequence;
+ xgi.depth = pDraw->depth;
+ if(format == ZPixmap)
+ {
+ widthBytesLine = PixmapBytePad(width, pDraw->depth);
+ length = widthBytesLine * height;
+
+ }
+ else
+ {
+ widthBytesLine = BitmapBytePad(width);
+ plane = ((Mask)1) << (pDraw->depth - 1);
+ /* only planes asked for */
+ length = widthBytesLine * height *
+ Ones(planemask & (plane | (plane - 1)));
+
+ }
+
+ xgi.length = length;
+
+ if (im_return) {
+ pBuf = calloc(1, sz_xGetImageReply + length);
+ if (!pBuf)
+ return BadAlloc;
+ if (widthBytesLine == 0)
+ linesPerBuf = 0;
+ else
+ linesPerBuf = height;
+ *im_return = (xGetImageReply *)pBuf;
+ *(xGetImageReply *)pBuf = xgi;
+ pBuf += sz_xGetImageReply;
+ } else {
+ xgi.length = bytes_to_int32(xgi.length);
+ if (widthBytesLine == 0 || height == 0)
+ linesPerBuf = 0;
+ else if (widthBytesLine >= IMAGE_BUFSIZE)
+ linesPerBuf = 1;
+ else
+ {
+ linesPerBuf = IMAGE_BUFSIZE / widthBytesLine;
+ if (linesPerBuf > height)
+ linesPerBuf = height;
+ }
+ length = linesPerBuf * widthBytesLine;
+ if (linesPerBuf < height)
+ {
+ /* we have to make sure intermediate buffers don't need padding */
+ while ((linesPerBuf > 1) &&
+ (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD)-1)))
+ {
+ linesPerBuf--;
+ length -= widthBytesLine;
+ }
+ while (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD)-1))
+ {
+ linesPerBuf++;
+ length += widthBytesLine;
+ }
+ }
+ if(!(pBuf = calloc(1, length)))
+ return BadAlloc;
+ WriteReplyToClient(client, sizeof (xGetImageReply), &xgi);
+ }
+
+ if (pDraw->type == DRAWABLE_WINDOW)
+ {
+ pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
+ if (pVisibleRegion)
+ {
+ RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y);
+ }
+ }
+
+ if (linesPerBuf == 0)
+ {
+ /* nothing to do */
+ }
+ else if (format == ZPixmap)
+ {
+ linesDone = 0;
+ while (height - linesDone > 0)
+ {
+ nlines = min(linesPerBuf, height - linesDone);
+ (*pDraw->pScreen->GetImage) (pDraw,
+ x,
+ y + linesDone,
+ width,
+ nlines,
+ format,
+ planemask,
+ (pointer) pBuf);
+ if (pVisibleRegion)
+ XaceCensorImage(client, pVisibleRegion, widthBytesLine,
+ pDraw, x, y + linesDone, width,
+ nlines, format, pBuf);
+
+ /* Note that this is NOT a call to WriteSwappedDataToClient,
+ as we do NOT byte swap */
+ if (!im_return)
+ {
+ ReformatImage (pBuf, (int)(nlines * widthBytesLine),
+ BitsPerPixel (pDraw->depth),
+ ClientOrder(client));
+
+/* Don't split me, gcc pukes when you do */
+ (void)WriteToClient(client,
+ (int)(nlines * widthBytesLine),
+ pBuf);
+ }
+ linesDone += nlines;
+ }
+ }
+ else /* XYPixmap */
+ {
+ for (; plane; plane >>= 1)
+ {
+ if (planemask & plane)
+ {
+ linesDone = 0;
+ while (height - linesDone > 0)
+ {
+ nlines = min(linesPerBuf, height - linesDone);
+ (*pDraw->pScreen->GetImage) (pDraw,
+ x,
+ y + linesDone,
+ width,
+ nlines,
+ format,
+ plane,
+ (pointer)pBuf);
+ if (pVisibleRegion)
+ XaceCensorImage(client, pVisibleRegion,
+ widthBytesLine,
+ pDraw, x, y + linesDone, width,
+ nlines, format, pBuf);
+
+ /* Note: NOT a call to WriteSwappedDataToClient,
+ as we do NOT byte swap */
+ if (im_return) {
+ pBuf += nlines * widthBytesLine;
+ } else {
+ ReformatImage (pBuf,
+ (int)(nlines * widthBytesLine),
+ 1,
+ ClientOrder (client));
+
+/* Don't split me, gcc pukes when you do */
+ (void)WriteToClient(client,
+ (int)(nlines * widthBytesLine),
+ pBuf);
+ }
+ linesDone += nlines;
+ }
+ }
+ }
+ }
+ if (pVisibleRegion)
+ RegionDestroy(pVisibleRegion);
+ if (!im_return)
+ free(pBuf);
+ return Success;
+}
+
+int
+ProcGetImage(ClientPtr client)
+{
+ REQUEST(xGetImageReq);
+
+ REQUEST_SIZE_MATCH(xGetImageReq);
+
+ return DoGetImage(client, stuff->format, stuff->drawable,
+ stuff->x, stuff->y,
+ (int)stuff->width, (int)stuff->height,
+ stuff->planeMask, (xGetImageReply **)NULL);
+}
+
+int
+ProcPolyText(ClientPtr client)
+{
+ int err;
+ REQUEST(xPolyTextReq);
+ DrawablePtr pDraw;
+ GC *pGC;
+
+ REQUEST_AT_LEAST_SIZE(xPolyTextReq);
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+
+ err = PolyText(client,
+ pDraw,
+ pGC,
+ (unsigned char *)&stuff[1],
+ ((unsigned char *) stuff) + (client->req_len << 2),
+ stuff->x,
+ stuff->y,
+ stuff->reqType,
+ stuff->drawable);
+
+ if (err == Success)
+ {
+ return Success;
+ }
+ else
+ return err;
+}
+
+int
+ProcImageText8(ClientPtr client)
+{
+ int err;
+ DrawablePtr pDraw;
+ GC *pGC;
+
+ REQUEST(xImageTextReq);
+
+ REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars);
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+
+ err = ImageText(client,
+ pDraw,
+ pGC,
+ stuff->nChars,
+ (unsigned char *)&stuff[1],
+ stuff->x,
+ stuff->y,
+ stuff->reqType,
+ stuff->drawable);
+
+ if (err == Success)
+ {
+ return Success;
+ }
+ else
+ return err;
+}
+
+int
+ProcImageText16(ClientPtr client)
+{
+ int err;
+ DrawablePtr pDraw;
+ GC *pGC;
+
+ REQUEST(xImageTextReq);
+
+ REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1);
+ VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
+
+ err = ImageText(client,
+ pDraw,
+ pGC,
+ stuff->nChars,
+ (unsigned char *)&stuff[1],
+ stuff->x,
+ stuff->y,
+ stuff->reqType,
+ stuff->drawable);
+
+ if (err == Success)
+ {
+ return Success;
+ }
+ else
+ return err;
+}
+
+
+int
+ProcCreateColormap(ClientPtr client)
+{
+ VisualPtr pVisual;
+ ColormapPtr pmap;
+ Colormap mid;
+ WindowPtr pWin;
+ ScreenPtr pScreen;
+ REQUEST(xCreateColormapReq);
+ int i, result;
+
+ REQUEST_SIZE_MATCH(xCreateColormapReq);
+
+ if ((stuff->alloc != AllocNone) && (stuff->alloc != AllocAll))
+ {
+ client->errorValue = stuff->alloc;
+ return BadValue;
+ }
+ mid = stuff->mid;
+ LEGAL_NEW_RESOURCE(mid, client);
+ result = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (result != Success)
+ return result;
+
+ pScreen = pWin->drawable.pScreen;
+ for (i = 0, pVisual = pScreen->visuals;
+ i < pScreen->numVisuals;
+ i++, pVisual++)
+ {
+ if (pVisual->vid != stuff->visual)
+ continue;
+ return CreateColormap(mid, pScreen, pVisual, &pmap,
+ (int)stuff->alloc, client->index);
+ }
+ client->errorValue = stuff->visual;
+ return BadMatch;
+}
+
+int
+ProcFreeColormap(ClientPtr client)
+{
+ ColormapPtr pmap;
+ int rc;
+ REQUEST(xResourceReq);
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupResourceByType((pointer *)&pmap, stuff->id, RT_COLORMAP, client,
+ DixDestroyAccess);
+ if (rc == Success)
+ {
+ /* Freeing a default colormap is a no-op */
+ if (!(pmap->flags & IsDefault))
+ FreeResource(stuff->id, RT_NONE);
+ return Success;
+ }
+ else
+ {
+ client->errorValue = stuff->id;
+ return rc;
+ }
+}
+
+
+int
+ProcCopyColormapAndFree(ClientPtr client)
+{
+ Colormap mid;
+ ColormapPtr pSrcMap;
+ REQUEST(xCopyColormapAndFreeReq);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
+ mid = stuff->mid;
+ LEGAL_NEW_RESOURCE(mid, client);
+ rc = dixLookupResourceByType((pointer *)&pSrcMap, stuff->srcCmap, RT_COLORMAP,
+ client, DixReadAccess|DixRemoveAccess);
+ if (rc == Success)
+ return CopyColormapAndFree(mid, pSrcMap, client->index);
+ client->errorValue = stuff->srcCmap;
+ return rc;
+}
+
+int
+ProcInstallColormap(ClientPtr client)
+{
+ ColormapPtr pcmp;
+ int rc;
+ REQUEST(xResourceReq);
+ REQUEST_SIZE_MATCH(xResourceReq);
+
+ rc = dixLookupResourceByType((pointer *)&pcmp, stuff->id, RT_COLORMAP, client,
+ DixInstallAccess);
+ if (rc != Success)
+ goto out;
+
+ rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess);
+ if (rc != Success) {
+ if (rc == BadValue)
+ rc = BadColor;
+ goto out;
+ }
+
+ (*(pcmp->pScreen->InstallColormap)) (pcmp);
+ return Success;
+
+out:
+ client->errorValue = stuff->id;
+ return rc;
+}
+
+int
+ProcUninstallColormap(ClientPtr client)
+{
+ ColormapPtr pcmp;
+ int rc;
+ REQUEST(xResourceReq);
+ REQUEST_SIZE_MATCH(xResourceReq);
+
+ rc = dixLookupResourceByType((pointer *)&pcmp, stuff->id, RT_COLORMAP, client,
+ DixUninstallAccess);
+ if (rc != Success)
+ goto out;
+
+ rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess);
+ if (rc != Success) {
+ if (rc == BadValue)
+ rc = BadColor;
+ goto out;
+ }
+
+ if(pcmp->mid != pcmp->pScreen->defColormap)
+ (*(pcmp->pScreen->UninstallColormap)) (pcmp);
+ return Success;
+
+out:
+ client->errorValue = stuff->id;
+ return rc;
+}
+
+int
+ProcListInstalledColormaps(ClientPtr client)
+{
+ xListInstalledColormapsReply *preply;
+ int nummaps, rc;
+ WindowPtr pWin;
+ REQUEST(xResourceReq);
+ REQUEST_SIZE_MATCH(xResourceReq);
+
+ rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ rc = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen,
+ DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ preply = malloc(sizeof(xListInstalledColormapsReply) +
+ pWin->drawable.pScreen->maxInstalledCmaps *
+ sizeof(Colormap));
+ if(!preply)
+ return BadAlloc;
+
+ preply->type = X_Reply;
+ preply->sequenceNumber = client->sequence;
+ nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps)
+ (pWin->drawable.pScreen, (Colormap *)&preply[1]);
+ preply->nColormaps = nummaps;
+ preply->length = nummaps;
+ WriteReplyToClient(client, sizeof (xListInstalledColormapsReply), preply);
+ client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
+ WriteSwappedDataToClient(client, nummaps * sizeof(Colormap), &preply[1]);
+ free(preply);
+ return Success;
+}
+
+int
+ProcAllocColor (ClientPtr client)
+{
+ ColormapPtr pmap;
+ int rc;
+ xAllocColorReply acr;
+ REQUEST(xAllocColorReq);
+
+ REQUEST_SIZE_MATCH(xAllocColorReq);
+ rc = dixLookupResourceByType((pointer *)&pmap, stuff->cmap, RT_COLORMAP, client,
+ DixAddAccess);
+ if (rc == Success)
+ {
+ acr.type = X_Reply;
+ acr.length = 0;
+ acr.sequenceNumber = client->sequence;
+ acr.red = stuff->red;
+ acr.green = stuff->green;
+ acr.blue = stuff->blue;
+ acr.pixel = 0;
+ if( (rc = AllocColor(pmap, &acr.red, &acr.green, &acr.blue,
+ &acr.pixel, client->index)) )
+ return rc;
+#ifdef PANORAMIX
+ if (noPanoramiXExtension || !pmap->pScreen->myNum)
+#endif
+ WriteReplyToClient(client, sizeof(xAllocColorReply), &acr);
+ return Success;
+
+ }
+ else
+ {
+ client->errorValue = stuff->cmap;
+ return rc;
+ }
+}
+
+int
+ProcAllocNamedColor (ClientPtr client)
+{
+ ColormapPtr pcmp;
+ int rc;
+ REQUEST(xAllocNamedColorReq);
+
+ REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes);
+ rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
+ DixAddAccess);
+ if (rc == Success)
+ {
+ xAllocNamedColorReply ancr;
+
+ ancr.type = X_Reply;
+ ancr.length = 0;
+ ancr.sequenceNumber = client->sequence;
+
+ if(OsLookupColor(pcmp->pScreen->myNum, (char *)&stuff[1], stuff->nbytes,
+ &ancr.exactRed, &ancr.exactGreen, &ancr.exactBlue))
+ {
+ ancr.screenRed = ancr.exactRed;
+ ancr.screenGreen = ancr.exactGreen;
+ ancr.screenBlue = ancr.exactBlue;
+ ancr.pixel = 0;
+ if( (rc = AllocColor(pcmp,
+ &ancr.screenRed, &ancr.screenGreen, &ancr.screenBlue,
+ &ancr.pixel, client->index)) )
+ return rc;
+#ifdef PANORAMIX
+ if (noPanoramiXExtension || !pcmp->pScreen->myNum)
+#endif
+ WriteReplyToClient(client, sizeof (xAllocNamedColorReply), &ancr);
+ return Success;
+ }
+ else
+ return BadName;
+
+ }
+ else
+ {
+ client->errorValue = stuff->cmap;
+ return rc;
+ }
+}
+
+int
+ProcAllocColorCells (ClientPtr client)
+{
+ ColormapPtr pcmp;
+ int rc;
+ REQUEST(xAllocColorCellsReq);
+
+ REQUEST_SIZE_MATCH(xAllocColorCellsReq);
+ rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
+ DixAddAccess);
+ if (rc == Success)
+ {
+ xAllocColorCellsReply accr;
+ int npixels, nmasks;
+ long length;
+ Pixel *ppixels, *pmasks;
+
+ npixels = stuff->colors;
+ if (!npixels)
+ {
+ client->errorValue = npixels;
+ return BadValue;
+ }
+ if (stuff->contiguous != xTrue && stuff->contiguous != xFalse)
+ {
+ client->errorValue = stuff->contiguous;
+ return BadValue;
+ }
+ nmasks = stuff->planes;
+ length = ((long)npixels + (long)nmasks) * sizeof(Pixel);
+ ppixels = malloc(length);
+ if(!ppixels)
+ return BadAlloc;
+ pmasks = ppixels + npixels;
+
+ if( (rc = AllocColorCells(client->index, pcmp, npixels, nmasks,
+ (Bool)stuff->contiguous, ppixels, pmasks)) )
+ {
+ free(ppixels);
+ return rc;
+ }
+#ifdef PANORAMIX
+ if (noPanoramiXExtension || !pcmp->pScreen->myNum)
+#endif
+ {
+ accr.type = X_Reply;
+ accr.length = bytes_to_int32(length);
+ accr.sequenceNumber = client->sequence;
+ accr.nPixels = npixels;
+ accr.nMasks = nmasks;
+ WriteReplyToClient(client, sizeof (xAllocColorCellsReply), &accr);
+ client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
+ WriteSwappedDataToClient(client, length, ppixels);
+ }
+ free(ppixels);
+ return Success;
+ }
+ else
+ {
+ client->errorValue = stuff->cmap;
+ return rc;
+ }
+}
+
+int
+ProcAllocColorPlanes(ClientPtr client)
+{
+ ColormapPtr pcmp;
+ int rc;
+ REQUEST(xAllocColorPlanesReq);
+
+ REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
+ rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
+ DixAddAccess);
+ if (rc == Success)
+ {
+ xAllocColorPlanesReply acpr;
+ int npixels;
+ long length;
+ Pixel *ppixels;
+
+ npixels = stuff->colors;
+ if (!npixels)
+ {
+ client->errorValue = npixels;
+ return BadValue;
+ }
+ if (stuff->contiguous != xTrue && stuff->contiguous != xFalse)
+ {
+ client->errorValue = stuff->contiguous;
+ return BadValue;
+ }
+ acpr.type = X_Reply;
+ acpr.sequenceNumber = client->sequence;
+ acpr.nPixels = npixels;
+ length = (long)npixels * sizeof(Pixel);
+ ppixels = malloc(length);
+ if(!ppixels)
+ return BadAlloc;
+ if( (rc = AllocColorPlanes(client->index, pcmp, npixels,
+ (int)stuff->red, (int)stuff->green, (int)stuff->blue,
+ (Bool)stuff->contiguous, ppixels,
+ &acpr.redMask, &acpr.greenMask, &acpr.blueMask)) )
+ {
+ free(ppixels);
+ return rc;
+ }
+ acpr.length = bytes_to_int32(length);
+#ifdef PANORAMIX
+ if (noPanoramiXExtension || !pcmp->pScreen->myNum)
+#endif
+ {
+ WriteReplyToClient(client, sizeof(xAllocColorPlanesReply), &acpr);
+ client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
+ WriteSwappedDataToClient(client, length, ppixels);
+ }
+ free(ppixels);
+ return Success;
+ }
+ else
+ {
+ client->errorValue = stuff->cmap;
+ return rc;
+ }
+}
+
+int
+ProcFreeColors(ClientPtr client)
+{
+ ColormapPtr pcmp;
+ int rc;
+ REQUEST(xFreeColorsReq);
+
+ REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
+ rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
+ DixRemoveAccess);
+ if (rc == Success)
+ {
+ int count;
+
+ if(pcmp->flags & AllAllocated)
+ return BadAccess;
+ count = bytes_to_int32((client->req_len << 2) - sizeof(xFreeColorsReq));
+ return FreeColors(pcmp, client->index, count,
+ (Pixel *)&stuff[1], (Pixel)stuff->planeMask);
+ }
+ else
+ {
+ client->errorValue = stuff->cmap;
+ return rc;
+ }
+}
+
+int
+ProcStoreColors (ClientPtr client)
+{
+ ColormapPtr pcmp;
+ int rc;
+ REQUEST(xStoreColorsReq);
+
+ REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
+ rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
+ DixWriteAccess);
+ if (rc == Success)
+ {
+ int count;
+
+ count = (client->req_len << 2) - sizeof(xStoreColorsReq);
+ if (count % sizeof(xColorItem))
+ return BadLength;
+ count /= sizeof(xColorItem);
+ return StoreColors(pcmp, count, (xColorItem *)&stuff[1], client);
+ }
+ else
+ {
+ client->errorValue = stuff->cmap;
+ return rc;
+ }
+}
+
+int
+ProcStoreNamedColor (ClientPtr client)
+{
+ ColormapPtr pcmp;
+ int rc;
+ REQUEST(xStoreNamedColorReq);
+
+ REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes);
+ rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
+ DixWriteAccess);
+ if (rc == Success)
+ {
+ xColorItem def;
+
+ if(OsLookupColor(pcmp->pScreen->myNum, (char *)&stuff[1],
+ stuff->nbytes, &def.red, &def.green, &def.blue))
+ {
+ def.flags = stuff->flags;
+ def.pixel = stuff->pixel;
+ return StoreColors(pcmp, 1, &def, client);
+ }
+ return BadName;
+ }
+ else
+ {
+ client->errorValue = stuff->cmap;
+ return rc;
+ }
+}
+
+int
+ProcQueryColors(ClientPtr client)
+{
+ ColormapPtr pcmp;
+ int rc;
+ REQUEST(xQueryColorsReq);
+
+ REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
+ rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
+ DixReadAccess);
+ if (rc == Success)
+ {
+ int count;
+ xrgb *prgbs;
+ xQueryColorsReply qcr;
+
+ count = bytes_to_int32((client->req_len << 2) - sizeof(xQueryColorsReq));
+ prgbs = calloc(1, count * sizeof(xrgb));
+ if(!prgbs && count)
+ return BadAlloc;
+ if( (rc = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs, client)) )
+ {
+ free(prgbs);
+ return rc;
+ }
+ memset(&qcr, 0, sizeof(xQueryColorsReply));
+ qcr.type = X_Reply;
+ qcr.length = bytes_to_int32(count * sizeof(xrgb));
+ qcr.sequenceNumber = client->sequence;
+ qcr.nColors = count;
+ WriteReplyToClient(client, sizeof(xQueryColorsReply), &qcr);
+ if (count)
+ {
+ client->pSwapReplyFunc = (ReplySwapPtr) SQColorsExtend;
+ WriteSwappedDataToClient(client, count * sizeof(xrgb), prgbs);
+ }
+ free(prgbs);
+ return Success;
+
+ }
+ else
+ {
+ client->errorValue = stuff->cmap;
+ return rc;
+ }
+}
+
+int
+ProcLookupColor(ClientPtr client)
+{
+ ColormapPtr pcmp;
+ int rc;
+ REQUEST(xLookupColorReq);
+
+ REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes);
+ rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
+ DixReadAccess);
+ if (rc == Success)
+ {
+ xLookupColorReply lcr;
+
+ if(OsLookupColor(pcmp->pScreen->myNum, (char *)&stuff[1], stuff->nbytes,
+ &lcr.exactRed, &lcr.exactGreen, &lcr.exactBlue))
+ {
+ lcr.type = X_Reply;
+ lcr.length = 0;
+ lcr.sequenceNumber = client->sequence;
+ lcr.screenRed = lcr.exactRed;
+ lcr.screenGreen = lcr.exactGreen;
+ lcr.screenBlue = lcr.exactBlue;
+ (*pcmp->pScreen->ResolveColor)(&lcr.screenRed,
+ &lcr.screenGreen,
+ &lcr.screenBlue,
+ pcmp->pVisual);
+ WriteReplyToClient(client, sizeof(xLookupColorReply), &lcr);
+ return Success;
+ }
+ return BadName;
+ }
+ else
+ {
+ client->errorValue = stuff->cmap;
+ return rc;
+ }
+}
+
+int
+ProcCreateCursor (ClientPtr client)
+{
+ CursorPtr pCursor;
+ PixmapPtr src;
+ PixmapPtr msk;
+ unsigned char * srcbits;
+ unsigned char * mskbits;
+ unsigned short width, height;
+ long n;
+ CursorMetricRec cm;
+ int rc;
+
+ REQUEST(xCreateCursorReq);
+
+ REQUEST_SIZE_MATCH(xCreateCursorReq);
+ LEGAL_NEW_RESOURCE(stuff->cid, client);
+
+ rc = dixLookupResourceByType((pointer *)&src, stuff->source, RT_PIXMAP, client,
+ DixReadAccess);
+ if (rc != Success) {
+ client->errorValue = stuff->source;
+ return rc;
+ }
+
+ rc = dixLookupResourceByType((pointer *)&msk, stuff->mask, RT_PIXMAP, client,
+ DixReadAccess);
+ if (rc != Success)
+ {
+ if (stuff->mask != None)
+ {
+ client->errorValue = stuff->mask;
+ return rc;
+ }
+ }
+ else if ( src->drawable.width != msk->drawable.width
+ || src->drawable.height != msk->drawable.height
+ || src->drawable.depth != 1
+ || msk->drawable.depth != 1)
+ return BadMatch;
+
+ width = src->drawable.width;
+ height = src->drawable.height;
+
+ if ( stuff->x > width
+ || stuff->y > height )
+ return BadMatch;
+
+ n = BitmapBytePad(width)*height;
+ srcbits = calloc(1, n);
+ if (!srcbits)
+ return BadAlloc;
+ mskbits = malloc(n);
+ if (!mskbits)
+ {
+ free(srcbits);
+ return BadAlloc;
+ }
+
+ (* src->drawable.pScreen->GetImage)( (DrawablePtr)src, 0, 0, width, height,
+ XYPixmap, 1, (pointer)srcbits);
+ if ( msk == (PixmapPtr)NULL)
+ {
+ unsigned char *bits = mskbits;
+ while (--n >= 0)
+ *bits++ = ~0;
+ }
+ else
+ {
+ /* zeroing the (pad) bits helps some ddx cursor handling */
+ memset((char *)mskbits, 0, n);
+ (* msk->drawable.pScreen->GetImage)( (DrawablePtr)msk, 0, 0, width,
+ height, XYPixmap, 1, (pointer)mskbits);
+ }
+ cm.width = width;
+ cm.height = height;
+ cm.xhot = stuff->x;
+ cm.yhot = stuff->y;
+ rc = AllocARGBCursor(srcbits, mskbits, NULL, &cm,
+ stuff->foreRed, stuff->foreGreen, stuff->foreBlue,
+ stuff->backRed, stuff->backGreen, stuff->backBlue,
+ &pCursor, client, stuff->cid);
+
+ if (rc != Success)
+ return rc;
+ if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
+ return BadAlloc;
+
+ return Success;
+}
+
+int
+ProcCreateGlyphCursor (ClientPtr client)
+{
+ CursorPtr pCursor;
+ int res;
+
+ REQUEST(xCreateGlyphCursorReq);
+
+ REQUEST_SIZE_MATCH(xCreateGlyphCursorReq);
+ LEGAL_NEW_RESOURCE(stuff->cid, client);
+
+ res = AllocGlyphCursor(stuff->source, stuff->sourceChar,
+ stuff->mask, stuff->maskChar,
+ stuff->foreRed, stuff->foreGreen, stuff->foreBlue,
+ stuff->backRed, stuff->backGreen, stuff->backBlue,
+ &pCursor, client, stuff->cid);
+ if (res != Success)
+ return res;
+ if (AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
+ return Success;
+ return BadAlloc;
+}
+
+
+int
+ProcFreeCursor (ClientPtr client)
+{
+ CursorPtr pCursor;
+ int rc;
+ REQUEST(xResourceReq);
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ rc = dixLookupResourceByType((pointer *)&pCursor, stuff->id, RT_CURSOR, client,
+ DixDestroyAccess);
+ if (rc == Success)
+ {
+ FreeResource(stuff->id, RT_NONE);
+ return Success;
+ }
+ else
+ {
+ client->errorValue = stuff->id;
+ return rc;
+ }
+}
+
+int
+ProcQueryBestSize (ClientPtr client)
+{
+ xQueryBestSizeReply reply;
+ DrawablePtr pDraw;
+ ScreenPtr pScreen;
+ int rc;
+ REQUEST(xQueryBestSizeReq);
+ REQUEST_SIZE_MATCH(xQueryBestSizeReq);
+
+ if ((stuff->class != CursorShape) &&
+ (stuff->class != TileShape) &&
+ (stuff->class != StippleShape))
+ {
+ client->errorValue = stuff->class;
+ return BadValue;
+ }
+
+ rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY,
+ DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+ if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW)
+ return BadMatch;
+ pScreen = pDraw->pScreen;
+ rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+ (* pScreen->QueryBestSize)(stuff->class, &stuff->width,
+ &stuff->height, pScreen);
+ memset(&reply, 0, sizeof(xQueryBestSizeReply));
+ reply.type = X_Reply;
+ reply.length = 0;
+ reply.sequenceNumber = client->sequence;
+ reply.width = stuff->width;
+ reply.height = stuff->height;
+ WriteReplyToClient(client, sizeof(xQueryBestSizeReply), &reply);
+ return Success;
+}
+
+
+int
+ProcSetScreenSaver (ClientPtr client)
+{
+ int rc, i, blankingOption, exposureOption;
+ REQUEST(xSetScreenSaverReq);
+ REQUEST_SIZE_MATCH(xSetScreenSaverReq);
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i],
+ DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+ }
+
+ blankingOption = stuff->preferBlank;
+ if ((blankingOption != DontPreferBlanking) &&
+ (blankingOption != PreferBlanking) &&
+ (blankingOption != DefaultBlanking))
+ {
+ client->errorValue = blankingOption;
+ return BadValue;
+ }
+ exposureOption = stuff->allowExpose;
+ if ((exposureOption != DontAllowExposures) &&
+ (exposureOption != AllowExposures) &&
+ (exposureOption != DefaultExposures))
+ {
+ client->errorValue = exposureOption;
+ return BadValue;
+ }
+ if (stuff->timeout < -1)
+ {
+ client->errorValue = stuff->timeout;
+ return BadValue;
+ }
+ if (stuff->interval < -1)
+ {
+ client->errorValue = stuff->interval;
+ return BadValue;
+ }
+
+ if (blankingOption == DefaultBlanking)
+ ScreenSaverBlanking = defaultScreenSaverBlanking;
+ else
+ ScreenSaverBlanking = blankingOption;
+ if (exposureOption == DefaultExposures)
+ ScreenSaverAllowExposures = defaultScreenSaverAllowExposures;
+ else
+ ScreenSaverAllowExposures = exposureOption;
+
+ if (stuff->timeout >= 0)
+ ScreenSaverTime = stuff->timeout * MILLI_PER_SECOND;
+ else
+ ScreenSaverTime = defaultScreenSaverTime;
+ if (stuff->interval >= 0)
+ ScreenSaverInterval = stuff->interval * MILLI_PER_SECOND;
+ else
+ ScreenSaverInterval = defaultScreenSaverInterval;
+
+ SetScreenSaverTimer();
+ return Success;
+}
+
+int
+ProcGetScreenSaver(ClientPtr client)
+{
+ xGetScreenSaverReply rep;
+ int rc, i;
+ REQUEST_SIZE_MATCH(xReq);
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i],
+ DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+ }
+
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.timeout = ScreenSaverTime / MILLI_PER_SECOND;
+ rep.interval = ScreenSaverInterval / MILLI_PER_SECOND;
+ rep.preferBlanking = ScreenSaverBlanking;
+ rep.allowExposures = ScreenSaverAllowExposures;
+ WriteReplyToClient(client, sizeof(xGetScreenSaverReply), &rep);
+ return Success;
+}
+
+int
+ProcChangeHosts(ClientPtr client)
+{
+ REQUEST(xChangeHostsReq);
+
+ REQUEST_FIXED_SIZE(xChangeHostsReq, stuff->hostLength);
+
+ if(stuff->mode == HostInsert)
+ return AddHost(client, (int)stuff->hostFamily,
+ stuff->hostLength, (pointer)&stuff[1]);
+ if (stuff->mode == HostDelete)
+ return RemoveHost(client, (int)stuff->hostFamily,
+ stuff->hostLength, (pointer)&stuff[1]);
+ client->errorValue = stuff->mode;
+ return BadValue;
+}
+
+int
+ProcListHosts(ClientPtr client)
+{
+ xListHostsReply reply;
+ int len, nHosts, result;
+ pointer pdata;
+ /* REQUEST(xListHostsReq); */
+
+ REQUEST_SIZE_MATCH(xListHostsReq);
+
+ /* untrusted clients can't list hosts */
+ result = XaceHook(XACE_SERVER_ACCESS, client, DixReadAccess);
+ if (result != Success)
+ return result;
+
+ result = GetHosts(&pdata, &nHosts, &len, &reply.enabled);
+ if (result != Success)
+ return result;
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.nHosts = nHosts;
+ reply.length = bytes_to_int32(len);
+ WriteReplyToClient(client, sizeof(xListHostsReply), &reply);
+ if (nHosts)
+ {
+ client->pSwapReplyFunc = (ReplySwapPtr) SLHostsExtend;
+ WriteSwappedDataToClient(client, len, pdata);
+ }
+ free(pdata);
+ return Success;
+}
+
+int
+ProcChangeAccessControl(ClientPtr client)
+{
+ REQUEST(xSetAccessControlReq);
+
+ REQUEST_SIZE_MATCH(xSetAccessControlReq);
+ if ((stuff->mode != EnableAccess) && (stuff->mode != DisableAccess))
+ {
+ client->errorValue = stuff->mode;
+ return BadValue;
+ }
+ return ChangeAccessControl(client, stuff->mode == EnableAccess);
+}
+
+/*********************
+ * CloseDownRetainedResources
+ *
+ * Find all clients that are gone and have terminated in RetainTemporary
+ * and destroy their resources.
+ *********************/
+
+static void
+CloseDownRetainedResources(void)
+{
+ int i;
+ ClientPtr client;
+
+ for (i=1; i<currentMaxClients; i++)
+ {
+ client = clients[i];
+ if (client && (client->closeDownMode == RetainTemporary)
+ && (client->clientGone))
+ CloseDownClient(client);
+ }
+}
+
+int
+ProcKillClient(ClientPtr client)
+{
+ REQUEST(xResourceReq);
+ ClientPtr killclient;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ if (stuff->id == AllTemporary)
+ {
+ CloseDownRetainedResources();
+ return Success;
+ }
+
+ rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess);
+ if (rc == Success) {
+ CloseDownClient(killclient);
+ /* if an LBX proxy gets killed, isItTimeToYield will be set */
+ if (isItTimeToYield || (client == killclient))
+ {
+ /* force yield and return Success, so that Dispatch()
+ * doesn't try to touch client
+ */
+ isItTimeToYield = TRUE;
+ return Success;
+ }
+ return Success;
+ }
+ else
+ return rc;
+}
+
+int
+ProcSetFontPath(ClientPtr client)
+{
+ unsigned char *ptr;
+ unsigned long nbytes, total;
+ long nfonts;
+ int n;
+ REQUEST(xSetFontPathReq);
+
+ REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
+
+ nbytes = (client->req_len << 2) - sizeof(xSetFontPathReq);
+ total = nbytes;
+ ptr = (unsigned char *)&stuff[1];
+ nfonts = stuff->nFonts;
+ while (--nfonts >= 0)
+ {
+ if ((total == 0) || (total < (n = (*ptr + 1))))
+ return BadLength;
+ total -= n;
+ ptr += n;
+ }
+ if (total >= 4)
+ return BadLength;
+ return SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1]);
+}
+
+int
+ProcGetFontPath(ClientPtr client)
+{
+ xGetFontPathReply reply;
+ int rc, stringLens, numpaths;
+ unsigned char *bufferStart;
+ /* REQUEST (xReq); */
+
+ REQUEST_SIZE_MATCH(xReq);
+ rc = GetFontPath(client, &numpaths, &stringLens, &bufferStart);
+ if (rc != Success)
+ return rc;
+
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.length = bytes_to_int32(stringLens + numpaths);
+ reply.nPaths = numpaths;
+
+ WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply);
+ if (stringLens || numpaths)
+ (void)WriteToClient(client, stringLens + numpaths, (char *)bufferStart);
+ return Success;
+}
+
+int
+ProcChangeCloseDownMode(ClientPtr client)
+{
+ int rc;
+ REQUEST(xSetCloseDownModeReq);
+ REQUEST_SIZE_MATCH(xSetCloseDownModeReq);
+
+ rc = XaceHook(XACE_CLIENT_ACCESS, client, client, DixManageAccess);
+ if (rc != Success)
+ return rc;
+
+ if ((stuff->mode == AllTemporary) ||
+ (stuff->mode == RetainPermanent) ||
+ (stuff->mode == RetainTemporary))
+ {
+ client->closeDownMode = stuff->mode;
+ return Success;
+ }
+ else
+ {
+ client->errorValue = stuff->mode;
+ return BadValue;
+ }
+}
+
+int ProcForceScreenSaver(ClientPtr client)
+{
+ int rc;
+ REQUEST(xForceScreenSaverReq);
+
+ REQUEST_SIZE_MATCH(xForceScreenSaverReq);
+
+ if ((stuff->mode != ScreenSaverReset) &&
+ (stuff->mode != ScreenSaverActive))
+ {
+ client->errorValue = stuff->mode;
+ return BadValue;
+ }
+ rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, (int)stuff->mode);
+ if (rc != Success)
+ return rc;
+ return Success;
+}
+
+int ProcNoOperation(ClientPtr client)
+{
+ REQUEST_AT_LEAST_SIZE(xReq);
+
+ /* noop -- don't do anything */
+ return Success;
+}
+
+/**********************
+ * CloseDownClient
+ *
+ * Client can either mark his resources destroy or retain. If retained and
+ * then killed again, the client is really destroyed.
+ *********************/
+
+char dispatchExceptionAtReset = DE_RESET;
+
+void
+CloseDownClient(ClientPtr client)
+{
+ Bool really_close_down = client->clientGone ||
+ client->closeDownMode == DestroyAll;
+
+ if (!client->clientGone)
+ {
+ /* ungrab server if grabbing client dies */
+ if (grabState != GrabNone && grabClient == client)
+ {
+ UngrabServer(client);
+ }
+ BITCLEAR(grabWaiters, client->index);
+ DeleteClientFromAnySelections(client);
+ ReleaseActiveGrabs(client);
+ DeleteClientFontStuff(client);
+ if (!really_close_down)
+ {
+ /* This frees resources that should never be retained
+ * no matter what the close down mode is. Actually we
+ * could do this unconditionally, but it's probably
+ * better not to traverse all the client's resources
+ * twice (once here, once a few lines down in
+ * FreeClientResources) in the common case of
+ * really_close_down == TRUE.
+ */
+ FreeClientNeverRetainResources(client);
+ client->clientState = ClientStateRetained;
+ if (ClientStateCallback)
+ {
+ NewClientInfoRec clientinfo;
+
+ clientinfo.client = client;
+ clientinfo.prefix = (xConnSetupPrefix *)NULL;
+ clientinfo.setup = (xConnSetup *) NULL;
+ CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
+ }
+ }
+ client->clientGone = TRUE; /* so events aren't sent to client */
+ if (ClientIsAsleep(client))
+ ClientSignal (client);
+ ProcessWorkQueueZombies();
+ CloseDownConnection(client);
+
+ /* If the client made it to the Running stage, nClients has
+ * been incremented on its behalf, so we need to decrement it
+ * now. If it hasn't gotten to Running, nClients has *not*
+ * been incremented, so *don't* decrement it.
+ */
+ if (client->clientState != ClientStateInitial &&
+ client->clientState != ClientStateAuthenticating )
+ {
+ --nClients;
+ }
+ }
+
+ if (really_close_down)
+ {
+ if (client->clientState == ClientStateRunning && nClients == 0)
+ dispatchException |= dispatchExceptionAtReset;
+
+ client->clientState = ClientStateGone;
+ if (ClientStateCallback)
+ {
+ NewClientInfoRec clientinfo;
+
+ clientinfo.client = client;
+ clientinfo.prefix = (xConnSetupPrefix *)NULL;
+ clientinfo.setup = (xConnSetup *) NULL;
+ CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
+ }
+ FreeClientResources(client);
+ /* Disable client ID tracking. This must be done after
+ * ClientStateCallback. */
+ ReleaseClientIds(client);
+#ifdef XSERVER_DTRACE
+ XSERVER_CLIENT_DISCONNECT(client->index);
+#endif
+ if (client->index < nextFreeClientID)
+ nextFreeClientID = client->index;
+ clients[client->index] = NullClient;
+ SmartLastClient = NullClient;
+ dixFreeObjectWithPrivates(client, PRIVATE_CLIENT);
+
+ while (!clients[currentMaxClients-1])
+ currentMaxClients--;
+ }
+}
+
+static void
+KillAllClients(void)
+{
+ int i;
+ for (i=1; i<currentMaxClients; i++)
+ if (clients[i]) {
+ /* Make sure Retained clients are released. */
+ clients[i]->closeDownMode = DestroyAll;
+ CloseDownClient(clients[i]);
+ }
+}
+
+void InitClient(ClientPtr client, int i, pointer ospriv)
+{
+ client->index = i;
+ client->clientAsMask = ((Mask)i) << CLIENTOFFSET;
+ client->closeDownMode = i ? DestroyAll : RetainPermanent;
+ client->requestVector = InitialVector;
+ client->osPrivate = ospriv;
+ QueryMinMaxKeyCodes(&client->minKC,&client->maxKC);
+ client->smart_start_tick = SmartScheduleTime;
+ client->smart_stop_tick = SmartScheduleTime;
+ client->smart_check_tick = SmartScheduleTime;
+ client->clientIds = NULL;
+}
+
+/************************
+ * int NextAvailableClient(ospriv)
+ *
+ * OS dependent portion can't assign client id's because of CloseDownModes.
+ * Returns NULL if there are no free clients.
+ *************************/
+
+ClientPtr NextAvailableClient(pointer ospriv)
+{
+ int i;
+ ClientPtr client;
+ xReq data;
+
+ i = nextFreeClientID;
+ if (i == MAXCLIENTS)
+ return (ClientPtr)NULL;
+ clients[i] = client = dixAllocateObjectWithPrivates(ClientRec, PRIVATE_CLIENT);
+ if (!client)
+ return (ClientPtr)NULL;
+ InitClient(client, i, ospriv);
+ if (!InitClientResources(client))
+ {
+ dixFreeObjectWithPrivates(client, PRIVATE_CLIENT);
+ return (ClientPtr)NULL;
+ }
+ data.reqType = 1;
+ data.length = bytes_to_int32(sz_xReq + sz_xConnClientPrefix);
+ if (!InsertFakeRequest(client, (char *)&data, sz_xReq))
+ {
+ FreeClientResources(client);
+ dixFreeObjectWithPrivates(client, PRIVATE_CLIENT);
+ return (ClientPtr)NULL;
+ }
+ if (i == currentMaxClients)
+ currentMaxClients++;
+ while ((nextFreeClientID < MAXCLIENTS) && clients[nextFreeClientID])
+ nextFreeClientID++;
+
+ /* Enable client ID tracking. This must be done before
+ * ClientStateCallback. */
+ ReserveClientIds(client);
+
+ if (ClientStateCallback)
+ {
+ NewClientInfoRec clientinfo;
+
+ clientinfo.client = client;
+ clientinfo.prefix = (xConnSetupPrefix *)NULL;
+ clientinfo.setup = (xConnSetup *) NULL;
+ CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
+ }
+ return client;
+}
+
+int
+ProcInitialConnection(ClientPtr client)
+{
+ REQUEST(xReq);
+ xConnClientPrefix *prefix;
+ int whichbyte = 1;
+
+ prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
+ if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B'))
+ return client->noClientException = -1;
+ if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) ||
+ (!(*(char *) &whichbyte) && (prefix->byteOrder == 'l')))
+ {
+ client->swapped = TRUE;
+ SwapConnClientPrefix(prefix);
+ }
+ stuff->reqType = 2;
+ stuff->length += bytes_to_int32(prefix->nbytesAuthProto) +
+ bytes_to_int32(prefix->nbytesAuthString);
+ if (client->swapped)
+ {
+ swaps(&stuff->length, whichbyte);
+ }
+ ResetCurrentRequest(client);
+ return Success;
+}
+
+static int
+SendConnSetup(ClientPtr client, char *reason)
+{
+ xWindowRoot *root;
+ int i;
+ int numScreens;
+ char* lConnectionInfo;
+ xConnSetupPrefix* lconnSetupPrefix;
+
+ if (reason)
+ {
+ xConnSetupPrefix csp;
+
+ csp.success = xFalse;
+ csp.lengthReason = strlen(reason);
+ csp.length = bytes_to_int32(csp.lengthReason);
+ csp.majorVersion = X_PROTOCOL;
+ csp.minorVersion = X_PROTOCOL_REVISION;
+ if (client->swapped)
+ WriteSConnSetupPrefix(client, &csp);
+ else
+ (void)WriteToClient(client, sz_xConnSetupPrefix, (char *) &csp);
+ (void)WriteToClient(client, (int)csp.lengthReason, reason);
+ return client->noClientException = -1;
+ }
+
+ numScreens = screenInfo.numScreens;
+ lConnectionInfo = ConnectionInfo;
+ lconnSetupPrefix = &connSetupPrefix;
+
+ /* We're about to start speaking X protocol back to the client by
+ * sending the connection setup info. This means the authorization
+ * step is complete, and we can count the client as an
+ * authorized one.
+ */
+ nClients++;
+
+ client->requestVector = client->swapped ? SwappedProcVector : ProcVector;
+ client->sequence = 0;
+ ((xConnSetup *)lConnectionInfo)->ridBase = client->clientAsMask;
+ ((xConnSetup *)lConnectionInfo)->ridMask = RESOURCE_ID_MASK;
+#ifdef MATCH_CLIENT_ENDIAN
+ ((xConnSetup *)lConnectionInfo)->imageByteOrder = ClientOrder (client);
+ ((xConnSetup *)lConnectionInfo)->bitmapBitOrder = ClientOrder (client);
+#endif
+ /* fill in the "currentInputMask" */
+ root = (xWindowRoot *)(lConnectionInfo + connBlockScreenStart);
+#ifdef PANORAMIX
+ if (noPanoramiXExtension)
+ numScreens = screenInfo.numScreens;
+ else
+ numScreens = ((xConnSetup *)ConnectionInfo)->numRoots;
+#endif
+
+ for (i=0; i<numScreens; i++)
+ {
+ unsigned int j;
+ xDepth *pDepth;
+ WindowPtr pRoot = screenInfo.screens[i]->root;
+
+ root->currentInputMask = pRoot->eventMask | wOtherEventMasks(pRoot);
+ pDepth = (xDepth *)(root + 1);
+ for (j = 0; j < root->nDepths; j++)
+ {
+ pDepth = (xDepth *)(((char *)(pDepth + 1)) +
+ pDepth->nVisuals * sizeof(xVisualType));
+ }
+ root = (xWindowRoot *)pDepth;
+ }
+
+ if (client->swapped)
+ {
+ WriteSConnSetupPrefix(client, lconnSetupPrefix);
+ WriteSConnectionInfo(client,
+ (unsigned long)(lconnSetupPrefix->length << 2),
+ lConnectionInfo);
+ }
+ else
+ {
+ (void)WriteToClient(client, sizeof(xConnSetupPrefix),
+ (char *) lconnSetupPrefix);
+ (void)WriteToClient(client, (int)(lconnSetupPrefix->length << 2),
+ lConnectionInfo);
+ }
+ client->clientState = ClientStateRunning;
+ if (ClientStateCallback)
+ {
+ NewClientInfoRec clientinfo;
+
+ clientinfo.client = client;
+ clientinfo.prefix = lconnSetupPrefix;
+ clientinfo.setup = (xConnSetup *)lConnectionInfo;
+ CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
+ }
+ return Success;
+}
+
+int
+ProcEstablishConnection(ClientPtr client)
+{
+ char *reason, *auth_proto, *auth_string;
+ xConnClientPrefix *prefix;
+ REQUEST(xReq);
+
+ prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
+ auth_proto = (char *)prefix + sz_xConnClientPrefix;
+ auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto);
+ if ((prefix->majorVersion != X_PROTOCOL) ||
+ (prefix->minorVersion != X_PROTOCOL_REVISION))
+ reason = "Protocol version mismatch";
+ else
+ reason = ClientAuthorized(client,
+ (unsigned short)prefix->nbytesAuthProto,
+ auth_proto,
+ (unsigned short)prefix->nbytesAuthString,
+ auth_string);
+ /*
+ * If Kerberos is being used for this client, the clientState
+ * will be set to ClientStateAuthenticating at this point.
+ * More messages need to be exchanged among the X server, Kerberos
+ * server, and client to figure out if everyone is authorized.
+ * So we don't want to send the connection setup info yet, since
+ * the auth step isn't really done.
+ */
+ if (client->clientState == ClientStateCheckingSecurity)
+ client->clientState = ClientStateCheckedSecurity;
+ else if (client->clientState != ClientStateAuthenticating)
+ return(SendConnSetup(client, reason));
+ return Success;
+}
+
+void
+SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode,
+ XID resId, int errorCode)
+{
+ xError rep;
+
+ memset(&rep, 0, sizeof(xError));
+ rep.type = X_Error;
+ rep.errorCode = errorCode;
+ rep.majorCode = majorCode;
+ rep.minorCode = minorCode;
+ rep.resourceID = resId;
+
+ WriteEventsToClient (client, 1, (xEvent *)&rep);
+}
+
+void
+MarkClientException(ClientPtr client)
+{
+ client->noClientException = -1;
+}
+
+/*
+ * This array encodes the answer to the question "what is the log base 2
+ * of the number of pixels that fit in a scanline pad unit?"
+ * Note that ~0 is an invalid entry (mostly for the benefit of the reader).
+ */
+static int answer[6][4] = {
+ /* pad pad pad pad*/
+ /* 8 16 32 64 */
+
+ { 3, 4, 5 , 6 }, /* 1 bit per pixel */
+ { 1, 2, 3 , 4 }, /* 4 bits per pixel */
+ { 0, 1, 2 , 3 }, /* 8 bits per pixel */
+ { ~0, 0, 1 , 2 }, /* 16 bits per pixel */
+ { ~0, ~0, 0 , 1 }, /* 24 bits per pixel */
+ { ~0, ~0, 0 , 1 } /* 32 bits per pixel */
+};
+
+/*
+ * This array gives the answer to the question "what is the first index for
+ * the answer array above given the number of bits per pixel?"
+ * Note that ~0 is an invalid entry (mostly for the benefit of the reader).
+ */
+static int indexForBitsPerPixel[ 33 ] = {
+ ~0, 0, ~0, ~0, /* 1 bit per pixel */
+ 1, ~0, ~0, ~0, /* 4 bits per pixel */
+ 2, ~0, ~0, ~0, /* 8 bits per pixel */
+ ~0,~0, ~0, ~0,
+ 3, ~0, ~0, ~0, /* 16 bits per pixel */
+ ~0,~0, ~0, ~0,
+ 4, ~0, ~0, ~0, /* 24 bits per pixel */
+ ~0,~0, ~0, ~0,
+ 5 /* 32 bits per pixel */
+};
+
+/*
+ * This array gives the bytesperPixel value for cases where the number
+ * of bits per pixel is a multiple of 8 but not a power of 2.
+ */
+static int answerBytesPerPixel[ 33 ] = {
+ ~0, 0, ~0, ~0, /* 1 bit per pixel */
+ 0, ~0, ~0, ~0, /* 4 bits per pixel */
+ 0, ~0, ~0, ~0, /* 8 bits per pixel */
+ ~0,~0, ~0, ~0,
+ 0, ~0, ~0, ~0, /* 16 bits per pixel */
+ ~0,~0, ~0, ~0,
+ 3, ~0, ~0, ~0, /* 24 bits per pixel */
+ ~0,~0, ~0, ~0,
+ 0 /* 32 bits per pixel */
+};
+
+/*
+ * This array gives the answer to the question "what is the second index for
+ * the answer array above given the number of bits per scanline pad unit?"
+ * Note that ~0 is an invalid entry (mostly for the benefit of the reader).
+ */
+static int indexForScanlinePad[ 65 ] = {
+ ~0, ~0, ~0, ~0,
+ ~0, ~0, ~0, ~0,
+ 0, ~0, ~0, ~0, /* 8 bits per scanline pad unit */
+ ~0, ~0, ~0, ~0,
+ 1, ~0, ~0, ~0, /* 16 bits per scanline pad unit */
+ ~0, ~0, ~0, ~0,
+ ~0, ~0, ~0, ~0,
+ ~0, ~0, ~0, ~0,
+ 2, ~0, ~0, ~0, /* 32 bits per scanline pad unit */
+ ~0, ~0, ~0, ~0,
+ ~0, ~0, ~0, ~0,
+ ~0, ~0, ~0, ~0,
+ ~0, ~0, ~0, ~0,
+ ~0, ~0, ~0, ~0,
+ ~0, ~0, ~0, ~0,
+ ~0, ~0, ~0, ~0,
+ 3 /* 64 bits per scanline pad unit */
+};
+
+/*
+ grow the array of screenRecs if necessary.
+ call the device-supplied initialization procedure
+with its screen number, a pointer to its ScreenRec, argc, and argv.
+ return the number of successfully installed screens.
+
+*/
+
+int
+AddScreen(
+ Bool (* pfnInit)(
+ int /*index*/,
+ ScreenPtr /*pScreen*/,
+ int /*argc*/,
+ char ** /*argv*/
+ ),
+ int argc,
+ char **argv)
+{
+
+ int i;
+ int scanlinepad, format, depth, bitsPerPixel, j, k;
+ ScreenPtr pScreen;
+
+ i = screenInfo.numScreens;
+ if (i == MAXSCREENS)
+ return -1;
+
+ pScreen = (ScreenPtr) calloc(1, sizeof(ScreenRec));
+ if (!pScreen)
+ return -1;
+
+ if (!dixAllocatePrivates(&pScreen->devPrivates, PRIVATE_SCREEN)) {
+ free (pScreen);
+ return -1;
+ }
+ pScreen->myNum = i;
+ pScreen->totalPixmapSize = 0; /* computed in CreateScratchPixmapForScreen */
+ pScreen->ClipNotify = 0; /* for R4 ddx compatibility */
+ pScreen->CreateScreenResources = 0;
+
+ /*
+ * This loop gets run once for every Screen that gets added,
+ * but thats ok. If the ddx layer initializes the formats
+ * one at a time calling AddScreen() after each, then each
+ * iteration will make it a little more accurate. Worst case
+ * we do this loop N * numPixmapFormats where N is # of screens.
+ * Anyway, this must be called after InitOutput and before the
+ * screen init routine is called.
+ */
+ for (format=0; format<screenInfo.numPixmapFormats; format++)
+ {
+ depth = screenInfo.formats[format].depth;
+ bitsPerPixel = screenInfo.formats[format].bitsPerPixel;
+ scanlinepad = screenInfo.formats[format].scanlinePad;
+ j = indexForBitsPerPixel[ bitsPerPixel ];
+ k = indexForScanlinePad[ scanlinepad ];
+ PixmapWidthPaddingInfo[ depth ].padPixelsLog2 = answer[j][k];
+ PixmapWidthPaddingInfo[ depth ].padRoundUp =
+ (scanlinepad/bitsPerPixel) - 1;
+ j = indexForBitsPerPixel[ 8 ]; /* bits per byte */
+ PixmapWidthPaddingInfo[ depth ].padBytesLog2 = answer[j][k];
+ PixmapWidthPaddingInfo[ depth ].bitsPerPixel = bitsPerPixel;
+ if (answerBytesPerPixel[bitsPerPixel])
+ {
+ PixmapWidthPaddingInfo[ depth ].notPower2 = 1;
+ PixmapWidthPaddingInfo[ depth ].bytesPerPixel =
+ answerBytesPerPixel[bitsPerPixel];
+ }
+ else
+ {
+ PixmapWidthPaddingInfo[ depth ].notPower2 = 0;
+ }
+ }
+
+ /* This is where screen specific stuff gets initialized. Load the
+ screen structure, call the hardware, whatever.
+ This is also where the default colormap should be allocated and
+ also pixel values for blackPixel, whitePixel, and the cursor
+ Note that InitScreen is NOT allowed to modify argc, argv, or
+ any of the strings pointed to by argv. They may be passed to
+ multiple screens.
+ */
+ screenInfo.screens[i] = pScreen;
+ screenInfo.numScreens++;
+ if (!(*pfnInit)(i, pScreen, argc, argv))
+ {
+ dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
+ free(pScreen);
+ screenInfo.numScreens--;
+ return -1;
+ }
+
+ dixRegisterPrivateKey(&cursorScreenDevPriv[i], PRIVATE_CURSOR, 0);
+
+ return i;
+}
diff --git a/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c
index d8f15290b..fec32bb98 100644
--- a/xorg-server/dix/dixfonts.c
+++ b/xorg-server/dix/dixfonts.c
@@ -130,6 +130,7 @@ SetDefaultFont(char *defaultfontname)
int err;
FontPtr pf;
XID fid;
+ static FontPtr last_pf;
fid = FakeClientID(0);
err = OpenFont(serverClient, fid, FontLoadAll | FontOpenSync,
@@ -138,9 +139,10 @@ SetDefaultFont(char *defaultfontname)
return FALSE;
err = dixLookupResourceByType((pointer *)&pf, fid, RT_FONT, serverClient,
DixReadAccess);
- if (err != Success)
+ if (err == Success) last_pf = pf;
+ if (last_pf == (FontPtr) NULL)
return FALSE;
- defaultFont = pf;
+ defaultFont = last_pf;
return TRUE;
}
@@ -239,6 +241,8 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
*newname;
int newlen;
int aliascount = 20;
+ Bool fromDispatch = c->from_dispatch;
+ Bool finished = FALSE;
/*
* Decide at runtime what FontFormat to use.
*/
@@ -270,6 +274,8 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
BitmapFormatScanlineUnit8;
+ c->from_dispatch = FALSE;
+
if (client->clientGone)
{
if (c->current_fpe < c->num_fpes)
@@ -374,13 +380,16 @@ bail:
c->fontid, FontToXError(err));
}
ClientWakeup(c->client);
+ finished = TRUE;
xinerama_sleep:
- for (i = 0; i < c->num_fpes; i++) {
- FreeFPE(c->fpe_list[i]);
+ if (finished || fromDispatch) {
+ for (i = 0; i < c->num_fpes; i++) {
+ FreeFPE(c->fpe_list[i]);
+ }
+ free(c->fpe_list);
+ free(c->fontname);
+ free(c);
}
- free(c->fpe_list);
- free(c->fontname);
- free(c);
return TRUE;
}
@@ -461,6 +470,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
c->num_fpes = num_fpes;
c->fnamelen = lenfname;
c->flags = flags;
+ c->from_dispatch = TRUE;
c->non_cachable_font = cached;
(void) doOpenFont(client, c);
@@ -592,6 +602,10 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
char *bufptr;
char *bufferStart;
int aliascount = 0;
+ Bool fromDispatch = c->from_dispatch;
+ Bool finished = FALSE;
+
+ c->from_dispatch = FALSE;
if (client->clientGone)
{
@@ -822,13 +836,16 @@ finish:
bail:
ClientWakeup(client);
+ finished = TRUE;
xinerama_sleep:
- for (i = 0; i < c->num_fpes; i++)
- FreeFPE(c->fpe_list[i]);
- free(c->fpe_list);
- free(c->savedName);
- FreeFontNames(names);
- free(c);
+ if (finished || fromDispatch) {
+ for (i = 0; i < c->num_fpes; i++)
+ FreeFPE(c->fpe_list[i]);
+ free(c->fpe_list);
+ free(c->savedName);
+ FreeFontNames(names);
+ free(c);
+ }
free(resolved);
return TRUE;
}
@@ -880,6 +897,7 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length,
c->current.list_started = FALSE;
c->current.private = 0;
c->haveSaved = FALSE;
+ c->from_dispatch = TRUE;
c->savedName = 0;
doListFontsAndAliases(client, c);
return Success;
@@ -891,6 +909,8 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
FontPathElementPtr fpe;
int err = Successful;
char *name;
+ Bool fromDispatch = c->from_dispatch;
+ Bool finished = FALSE;
int namelen;
int numFonts;
FontInfoRec fontInfo,
@@ -902,6 +922,8 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
int aliascount = 0;
xListFontsWithInfoReply finalReply;
+ c->from_dispatch = FALSE;
+
if (client->clientGone)
{
if (c->current.current_fpe < c->num_fpes)
@@ -1095,13 +1117,16 @@ finish:
WriteSwappedDataToClient(client, length, &finalReply);
bail:
ClientWakeup(client);
+ finished = TRUE;
xinerama_sleep:
- for (i = 0; i < c->num_fpes; i++)
- FreeFPE(c->fpe_list[i]);
- free(c->reply);
- free(c->fpe_list);
- free(c->savedName);
- free(c);
+ if (finished || fromDispatch) {
+ for (i = 0; i < c->num_fpes; i++)
+ FreeFPE(c->fpe_list[i]);
+ free(c->reply);
+ free(c->fpe_list);
+ free(c->savedName);
+ free(c);
+ }
return TRUE;
}
@@ -1150,6 +1175,7 @@ StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern,
c->current.private = 0;
c->savedNumFonts = 0;
c->haveSaved = FALSE;
+ c->from_dispatch = TRUE;
c->savedName = 0;
doListFontsWithInfo(client, c);
return Success;
@@ -1159,7 +1185,7 @@ badAlloc:
#define TextEltHeader 2
#define FontShiftSize 5
-static ChangeGCVal clearGC[] = { { .ptr = NullPixmap } };
+static ChangeGCVal clearGC[] = { NullPixmap };
#define clearGCmask (GCClipMask)
int
@@ -1171,6 +1197,10 @@ doPolyText(ClientPtr client, PTclosurePtr c)
FontPathElementPtr fpe;
GC *origGC = NULL;
int itemSize = c->reqType == X_PolyText8 ? 1 : 2;
+ Bool fromDispatch = c->from_dispatch;
+ Bool finished = FALSE;
+
+ c->from_dispatch = FALSE;
if (client->clientGone)
{
@@ -1417,16 +1447,19 @@ bail:
if (ClientIsAsleep(client))
{
ClientWakeup(c->client);
+ finished = TRUE;
xinerama_sleep:
- ChangeGC(NullClient, c->pGC, clearGCmask, clearGC);
+ if (finished || fromDispatch) {
+ ChangeGC(NullClient, c->pGC, clearGCmask, clearGC);
- /* Unreference the font from the scratch GC */
- CloseFont(c->pGC->font, (Font)0);
- c->pGC->font = NullFont;
+ /* Unreference the font from the scratch GC */
+ CloseFont(c->pGC->font, (Font)0);
+ c->pGC->font = NullFont;
- FreeScratchGC(c->pGC);
- free(c->data);
- free(c);
+ FreeScratchGC(c->pGC);
+ free(c->data);
+ free(c);
+ }
}
return TRUE;
}
@@ -1462,6 +1495,10 @@ doImageText(ClientPtr client, ITclosurePtr c)
int err = Success, lgerr; /* err is in X error, not font error, space */
FontPathElementPtr fpe;
int itemSize = c->reqType == X_ImageText8 ? 1 : 2;
+ Bool fromDispatch = c->from_dispatch;
+ Bool finished = FALSE;
+
+ c->from_dispatch = FALSE;
if (client->clientGone)
{
@@ -1571,16 +1608,19 @@ bail:
if (ClientIsAsleep(client))
{
ClientWakeup(c->client);
+ finished = TRUE;
xinerama_sleep:
- ChangeGC(NullClient, c->pGC, clearGCmask, clearGC);
+ if (finished || fromDispatch) {
+ ChangeGC(NullClient, c->pGC, clearGCmask, clearGC);
- /* Unreference the font from the scratch GC */
- CloseFont(c->pGC->font, (Font)0);
- c->pGC->font = NullFont;
+ /* Unreference the font from the scratch GC */
+ CloseFont(c->pGC->font, (Font)0);
+ c->pGC->font = NullFont;
- FreeScratchGC(c->pGC);
- free(c->data);
- free(c);
+ FreeScratchGC(c->pGC);
+ free(c->data);
+ free(c);
+ }
}
return TRUE;
}
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index df62e839b..0eda63a51 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1,5852 +1,5858 @@
-/************************************************************
-
-Copyright 1987, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-********************************************************/
-
-/* The panoramix components contained the following notice */
-/*****************************************************************
-
-Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
-BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Digital Equipment Corporation
-shall not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from Digital
-Equipment Corporation.
-
-******************************************************************/
-
-/*
- * Copyright (c) 2003-2005, Oracle and/or its affiliates. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-/** @file events.c
- * This file handles event delivery and a big part of the server-side protocol
- * handling (the parts for input devices).
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h>
-#include "misc.h"
-#include "resource.h"
-#include <X11/Xproto.h>
-#include "windowstr.h"
-#include "inputstr.h"
-#include "scrnintstr.h"
-#include "cursorstr.h"
-
-#include "dixstruct.h"
-#ifdef PANORAMIX
-#include "panoramiX.h"
-#include "panoramiXsrv.h"
-#endif
-#include "globals.h"
-
-#include <X11/extensions/XKBproto.h>
-#include "xkbsrv.h"
-#include "xace.h"
-
-#ifdef XSERVER_DTRACE
-#include <sys/types.h>
-typedef const char *string;
-#include "Xserver-dtrace.h"
-#endif
-
-#include <X11/extensions/XIproto.h>
-#include <X11/extensions/XI2proto.h>
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XI2.h>
-#include "exglobals.h"
-#include "exevents.h"
-#include "exglobals.h"
-#include "extnsionst.h"
-
-#include "dixevents.h"
-#include "dixgrabs.h"
-#include "dispatch.h"
-
-#include <X11/extensions/ge.h>
-#include "geext.h"
-#include "geint.h"
-
-#include "eventstr.h"
-#include "enterleave.h"
-#include "eventconvert.h"
-
-/* Extension events type numbering starts at EXTENSION_EVENT_BASE. */
-#define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */
-#define StructureAndSubMask ( StructureNotifyMask | SubstructureNotifyMask )
-#define AllButtonsMask ( \
- Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask )
-#define MotionMask ( \
- PointerMotionMask | Button1MotionMask | \
- Button2MotionMask | Button3MotionMask | Button4MotionMask | \
- Button5MotionMask | ButtonMotionMask )
-#define PropagateMask ( \
- KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | \
- MotionMask )
-#define PointerGrabMask ( \
- ButtonPressMask | ButtonReleaseMask | \
- EnterWindowMask | LeaveWindowMask | \
- PointerMotionHintMask | KeymapStateMask | \
- MotionMask )
-#define AllModifiersMask ( \
- ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \
- Mod3Mask | Mod4Mask | Mod5Mask )
-#define LastEventMask OwnerGrabButtonMask
-#define AllEventMasks (LastEventMask|(LastEventMask-1))
-
-
-#define CORE_EVENT(event) \
- (!((event)->u.u.type & EXTENSION_EVENT_BASE) && \
- (event)->u.u.type != GenericEvent)
-#define XI2_EVENT(event) \
- (((event)->u.u.type == GenericEvent) && \
- ((xGenericEvent*)(event))->extension == IReqCode)
-
-/**
- * Used to indicate a implicit passive grab created by a ButtonPress event.
- * See DeliverEventsToWindow().
- */
-#define ImplicitGrabMask (1 << 7)
-
-#define WID(w) ((w) ? ((w)->drawable.id) : 0)
-
-#define XE_KBPTR (xE->u.keyButtonPointer)
-
-
-CallbackListPtr EventCallback;
-CallbackListPtr DeviceEventCallback;
-
-#define DNPMCOUNT 8
-
-Mask DontPropagateMasks[DNPMCOUNT];
-static int DontPropagateRefCnts[DNPMCOUNT];
-
-static void CheckVirtualMotion( DeviceIntPtr pDev, QdEventPtr qe, WindowPtr pWin);
-static void CheckPhysLimits(DeviceIntPtr pDev,
- CursorPtr cursor,
- Bool generateEvents,
- Bool confineToScreen,
- ScreenPtr pScreen);
-
-/** Key repeat hack. Do not use but in TryClientEvents */
-extern BOOL EventIsKeyRepeat(xEvent *event);
-
-/**
- * Main input device struct.
- * inputInfo.pointer
- * is the core pointer. Referred to as "virtual core pointer", "VCP",
- * "core pointer" or inputInfo.pointer. The VCP is the first master
- * pointer device and cannot be deleted.
- *
- * inputInfo.keyboard
- * is the core keyboard ("virtual core keyboard", "VCK", "core keyboard").
- * See inputInfo.pointer.
- *
- * inputInfo.devices
- * linked list containing all devices including VCP and VCK.
- *
- * inputInfo.off_devices
- * Devices that have not been initialized and are thus turned off.
- *
- * inputInfo.numDevices
- * Total number of devices.
- *
- * inputInfo.all_devices
- * Virtual device used for XIAllDevices passive grabs. This device is
- * not part of the inputInfo.devices list and mostly unset except for
- * the deviceid. It exists because passivegrabs need a valid device
- * reference.
- *
- * inputInfo.all_master_devices
- * Virtual device used for XIAllMasterDevices passive grabs. This device
- * is not part of the inputInfo.devices list and mostly unset except for
- * the deviceid. It exists because passivegrabs need a valid device
- * reference.
- */
-InputInfo inputInfo;
-
-EventSyncInfoRec syncEvents;
-
-/**
- * The root window the given device is currently on.
- */
-#define RootWindow(sprite) sprite->spriteTrace[0]
-
-static xEvent* swapEvent = NULL;
-static int swapEventLen = 0;
-
-void
-NotImplemented(xEvent *from, xEvent *to)
-{
- FatalError("Not implemented");
-}
-
-/**
- * Convert the given event type from an XI event to a core event.
- * @param[in] The XI 1.x event type.
- * @return The matching core event type or 0 if there is none.
- */
-int
-XItoCoreType(int xitype)
-{
- int coretype = 0;
- if (xitype == DeviceMotionNotify)
- coretype = MotionNotify;
- else if (xitype == DeviceButtonPress)
- coretype = ButtonPress;
- else if (xitype == DeviceButtonRelease)
- coretype = ButtonRelease;
- else if (xitype == DeviceKeyPress)
- coretype = KeyPress;
- else if (xitype == DeviceKeyRelease)
- coretype = KeyRelease;
-
- return coretype;
-}
-
-/**
- * @return true if the device owns a cursor, false if device shares a cursor
- * sprite with another device.
- */
-Bool
-DevHasCursor(DeviceIntPtr pDev)
-{
- return pDev->spriteInfo->spriteOwner;
-}
-
-/*
- * @return true if a device is a pointer, check is the same as used by XI to
- * fill the 'use' field.
- */
-Bool
-IsPointerDevice(DeviceIntPtr dev)
-{
- return (dev->type == MASTER_POINTER) ||
- (dev->valuator && dev->button) ||
- (dev->valuator && !dev->key);
-}
-
-/*
- * @return true if a device is a keyboard, check is the same as used by XI to
- * fill the 'use' field.
- *
- * Some pointer devices have keys as well (e.g. multimedia keys). Try to not
- * count them as keyboard devices.
- */
-Bool
-IsKeyboardDevice(DeviceIntPtr dev)
-{
- return (dev->type == MASTER_KEYBOARD) ||
- ((dev->key && dev->kbdfeed) && !IsPointerDevice(dev));
-}
-
-Bool
-IsMaster(DeviceIntPtr dev)
-{
- return dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD;
-}
-
-Bool
-IsFloating(DeviceIntPtr dev)
-{
- return GetMaster(dev, MASTER_KEYBOARD) == NULL;
-}
-
-
-/**
- * Max event opcode.
- */
-extern int lastEvent;
-
-extern int DeviceMotionNotify;
-
-#define CantBeFiltered NoEventMask
-/**
- * Event masks for each event type.
- *
- * One set of filters for each device, but only the first layer
- * is initialized. The rest is memcpy'd in InitEvents.
- *
- * Filters are used whether a given event may be delivered to a client,
- * usually in the form of if (window-event-mask & filter); then deliver event.
- *
- * One notable filter is for PointerMotion/DevicePointerMotion events. Each
- * time a button is pressed, the filter is modified to also contain the
- * matching ButtonXMotion mask.
- */
-static Mask filters[MAXDEVICES][128] = {
-{
- NoSuchEvent, /* 0 */
- NoSuchEvent, /* 1 */
- KeyPressMask, /* KeyPress */
- KeyReleaseMask, /* KeyRelease */
- ButtonPressMask, /* ButtonPress */
- ButtonReleaseMask, /* ButtonRelease */
- PointerMotionMask, /* MotionNotify (initial state) */
- EnterWindowMask, /* EnterNotify */
- LeaveWindowMask, /* LeaveNotify */
- FocusChangeMask, /* FocusIn */
- FocusChangeMask, /* FocusOut */
- KeymapStateMask, /* KeymapNotify */
- ExposureMask, /* Expose */
- CantBeFiltered, /* GraphicsExpose */
- CantBeFiltered, /* NoExpose */
- VisibilityChangeMask, /* VisibilityNotify */
- SubstructureNotifyMask, /* CreateNotify */
- StructureAndSubMask, /* DestroyNotify */
- StructureAndSubMask, /* UnmapNotify */
- StructureAndSubMask, /* MapNotify */
- SubstructureRedirectMask, /* MapRequest */
- StructureAndSubMask, /* ReparentNotify */
- StructureAndSubMask, /* ConfigureNotify */
- SubstructureRedirectMask, /* ConfigureRequest */
- StructureAndSubMask, /* GravityNotify */
- ResizeRedirectMask, /* ResizeRequest */
- StructureAndSubMask, /* CirculateNotify */
- SubstructureRedirectMask, /* CirculateRequest */
- PropertyChangeMask, /* PropertyNotify */
- CantBeFiltered, /* SelectionClear */
- CantBeFiltered, /* SelectionRequest */
- CantBeFiltered, /* SelectionNotify */
- ColormapChangeMask, /* ColormapNotify */
- CantBeFiltered, /* ClientMessage */
- CantBeFiltered /* MappingNotify */
-}};
-
-/**
- * For the given event, return the matching event filter. This filter may then
- * be AND'ed with the selected event mask.
- *
- * For XI2 events, the returned filter is simply the byte containing the event
- * mask we're interested in. E.g. for a mask of (1 << 13), this would be
- * byte[1].
- *
- * @param[in] dev The device the event belongs to, may be NULL.
- * @param[in] event The event to get the filter for. Only the type of the
- * event matters, or the extension + evtype for GenericEvents.
- * @return The filter mask for the given event.
- *
- * @see GetEventMask
- */
-Mask
-GetEventFilter(DeviceIntPtr dev, xEvent *event)
-{
- if (event->u.u.type != GenericEvent)
- return filters[dev ? dev->id : 0][event->u.u.type];
- else if (XI2_EVENT(event))
- return (1 << (((xXIDeviceEvent*)event)->evtype % 8));
- ErrorF("[dix] Unknown device type %d. No filter\n", event->u.u.type);
- return 0;
-}
-
-/**
- * Return the windows complete XI2 mask for the given XI2 event type.
- */
-Mask
-GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev)
-{
- OtherInputMasks *inputMasks = wOtherInputMasks(win);
- int filter;
- int evtype;
-
- if (!inputMasks || !XI2_EVENT(ev))
- return 0;
-
- evtype = ((xGenericEvent*)ev)->evtype;
- filter = GetEventFilter(dev, ev);
-
- return ((inputMasks->xi2mask[dev->id][evtype/8] & filter) ||
- inputMasks->xi2mask[XIAllDevices][evtype/8] ||
- (inputMasks->xi2mask[XIAllMasterDevices][evtype/8] && IsMaster(dev)));
-}
-
-Mask
-GetEventMask(DeviceIntPtr dev, xEvent *event, InputClients* other)
-{
- /* XI2 filters are only ever 8 bit, so let's return a 8 bit mask */
- if (XI2_EVENT(event))
- {
- int byte = ((xGenericEvent*)event)->evtype / 8;
- return (other->xi2mask[dev->id][byte] |
- other->xi2mask[XIAllDevices][byte] |
- (IsMaster(dev)? other->xi2mask[XIAllMasterDevices][byte] : 0));
- } else if (CORE_EVENT(event))
- return other->mask[XIAllDevices];
- else
- return other->mask[dev->id];
-}
-
-
-static CARD8 criticalEvents[32] =
-{
- 0x7c, 0x30, 0x40 /* key, button, expose, and configure events */
-};
-
-static void
-SyntheticMotion(DeviceIntPtr dev, int x, int y) {
- int screenno = 0;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension)
- screenno = dev->spriteInfo->sprite->screen->myNum;
-#endif
- PostSyntheticMotion(dev, x, y, screenno,
- (syncEvents.playingEvents) ? syncEvents.time.milliseconds : currentTime.milliseconds);
-
-}
-
-#ifdef PANORAMIX
-static void PostNewCursor(DeviceIntPtr pDev);
-
-static Bool
-pointOnScreen(ScreenPtr pScreen, int x, int y)
-{
- return x >= pScreen->x && x < pScreen->x + pScreen->width &&
- y >= pScreen->y && y < pScreen->y + pScreen->height;
-}
-
-static Bool
-XineramaSetCursorPosition(
- DeviceIntPtr pDev,
- int x,
- int y,
- Bool generateEvent
-){
- ScreenPtr pScreen;
- int i;
- SpritePtr pSprite = pDev->spriteInfo->sprite;
-
- /* x,y are in Screen 0 coordinates. We need to decide what Screen
- to send the message too and what the coordinates relative to
- that screen are. */
-
- pScreen = pSprite->screen;
- x += screenInfo.screens[0]->x;
- y += screenInfo.screens[0]->y;
-
- if(!pointOnScreen(pScreen, x, y))
- {
- FOR_NSCREENS(i)
- {
- if(i == pScreen->myNum)
- continue;
- if(pointOnScreen(screenInfo.screens[i], x, y))
- {
- pScreen = screenInfo.screens[i];
- break;
- }
- }
- }
-
- pSprite->screen = pScreen;
- pSprite->hotPhys.x = x - screenInfo.screens[0]->x;
- pSprite->hotPhys.y = y - screenInfo.screens[0]->y;
- x -= pScreen->x;
- y -= pScreen->y;
-
- return (*pScreen->SetCursorPosition)(pDev, pScreen, x, y, generateEvent);
-}
-
-
-static void
-XineramaConstrainCursor(DeviceIntPtr pDev)
-{
- SpritePtr pSprite = pDev->spriteInfo->sprite;
- ScreenPtr pScreen;
- BoxRec newBox;
-
- pScreen = pSprite->screen;
- newBox = pSprite->physLimits;
-
- /* Translate the constraining box to the screen
- the sprite is actually on */
- newBox.x1 += screenInfo.screens[0]->x - pScreen->x;
- newBox.x2 += screenInfo.screens[0]->x - pScreen->x;
- newBox.y1 += screenInfo.screens[0]->y - pScreen->y;
- newBox.y2 += screenInfo.screens[0]->y - pScreen->y;
-
- (* pScreen->ConstrainCursor)(pDev, pScreen, &newBox);
-}
-
-
-static Bool
-XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin)
-{
- SpritePtr pSprite = pDev->spriteInfo->sprite;
-
- if(pWin == screenInfo.screens[0]->root) {
- int i;
- for (i = 0; i < PanoramiXNumScreens; i++)
- pSprite->windows[i] = screenInfo.screens[i]->root;
- } else {
- PanoramiXRes *win;
- int rc, i;
-
- rc = dixLookupResourceByType((pointer *)&win, pWin->drawable.id,
- XRT_WINDOW, serverClient, DixReadAccess);
- if (rc != Success)
- return FALSE;
-
- for(i = 0; i < PanoramiXNumScreens; i++) {
- rc = dixLookupWindow(pSprite->windows + i, win->info[i].id,
- serverClient, DixReadAccess);
- if (rc != Success) /* window is being unmapped */
- return FALSE;
- }
- }
- return TRUE;
-}
-
-static void
-XineramaConfineCursorToWindow(DeviceIntPtr pDev,
- WindowPtr pWin,
- Bool generateEvents)
-{
- SpritePtr pSprite = pDev->spriteInfo->sprite;
-
- int x, y, off_x, off_y, i;
-
- if(!XineramaSetWindowPntrs(pDev, pWin))
- return;
-
- i = PanoramiXNumScreens - 1;
-
- RegionCopy(&pSprite->Reg1,
- &pSprite->windows[i]->borderSize);
- off_x = screenInfo.screens[i]->x;
- off_y = screenInfo.screens[i]->y;
-
- while(i--) {
- x = off_x - screenInfo.screens[i]->x;
- y = off_y - screenInfo.screens[i]->y;
-
- if(x || y)
- RegionTranslate(&pSprite->Reg1, x, y);
-
- RegionUnion(&pSprite->Reg1, &pSprite->Reg1,
- &pSprite->windows[i]->borderSize);
-
- off_x = screenInfo.screens[i]->x;
- off_y = screenInfo.screens[i]->y;
- }
-
- pSprite->hotLimits = *RegionExtents(&pSprite->Reg1);
-
- if(RegionNumRects(&pSprite->Reg1) > 1)
- pSprite->hotShape = &pSprite->Reg1;
- else
- pSprite->hotShape = NullRegion;
-
- pSprite->confined = FALSE;
- pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin;
-
- CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
-}
-
-#endif /* PANORAMIX */
-
-/**
- * Modifies the filter for the given protocol event type to the given masks.
- *
- * There's only two callers: UpdateDeviceState() and XI's SetMaskForExtEvent().
- * The latter initialises masks for the matching XI events, it's a once-off
- * setting.
- * UDS however changes the mask for MotionNotify and DeviceMotionNotify each
- * time a button is pressed to include the matching ButtonXMotion mask in the
- * filter.
- *
- * @param[in] deviceid The device to modify the filter for.
- * @param[in] mask The new filter mask.
- * @param[in] event Protocol event type.
- */
-void
-SetMaskForEvent(int deviceid, Mask mask, int event)
-{
- if (deviceid < 0 || deviceid >= MAXDEVICES)
- FatalError("SetMaskForEvent: bogus device id");
- filters[deviceid][event] = mask;
-}
-
-void
-SetCriticalEvent(int event)
-{
- if (event >= 128)
- FatalError("SetCriticalEvent: bogus event number");
- criticalEvents[event >> 3] |= 1 << (event & 7);
-}
-
-void
-ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py)
-{
- BoxRec box;
- int x = *px, y = *py;
- int incx = 1, incy = 1;
- SpritePtr pSprite;
-
- pSprite = pDev->spriteInfo->sprite;
- if (RegionContainsPoint(shape, x, y, &box))
- return;
- box = *RegionExtents(shape);
- /* this is rather crude */
- do {
- x += incx;
- if (x >= box.x2)
- {
- incx = -1;
- x = *px - 1;
- }
- else if (x < box.x1)
- {
- incx = 1;
- x = *px;
- y += incy;
- if (y >= box.y2)
- {
- incy = -1;
- y = *py - 1;
- }
- else if (y < box.y1)
- return; /* should never get here! */
- }
- } while (!RegionContainsPoint(shape, x, y, &box));
- *px = x;
- *py = y;
-}
-
-static void
-CheckPhysLimits(
- DeviceIntPtr pDev,
- CursorPtr cursor,
- Bool generateEvents,
- Bool confineToScreen, /* unused if PanoramiX on */
- ScreenPtr pScreen) /* unused if PanoramiX on */
-{
- HotSpot new;
- SpritePtr pSprite = pDev->spriteInfo->sprite;
-
- if (!cursor)
- return;
- new = pSprite->hotPhys;
-#ifdef PANORAMIX
- if (!noPanoramiXExtension)
- /* I don't care what the DDX has to say about it */
- pSprite->physLimits = pSprite->hotLimits;
- else
-#endif
- {
- if (pScreen)
- new.pScreen = pScreen;
- else
- pScreen = new.pScreen;
- (*pScreen->CursorLimits) (pDev, pScreen, cursor, &pSprite->hotLimits,
- &pSprite->physLimits);
- pSprite->confined = confineToScreen;
- (* pScreen->ConstrainCursor)(pDev, pScreen, &pSprite->physLimits);
- }
-
- /* constrain the pointer to those limits */
- if (new.x < pSprite->physLimits.x1)
- new.x = pSprite->physLimits.x1;
- else
- if (new.x >= pSprite->physLimits.x2)
- new.x = pSprite->physLimits.x2 - 1;
- if (new.y < pSprite->physLimits.y1)
- new.y = pSprite->physLimits.y1;
- else
- if (new.y >= pSprite->physLimits.y2)
- new.y = pSprite->physLimits.y2 - 1;
- if (pSprite->hotShape)
- ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y);
- if ((
-#ifdef PANORAMIX
- noPanoramiXExtension &&
-#endif
- (pScreen != pSprite->hotPhys.pScreen)) ||
- (new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y))
- {
-#ifdef PANORAMIX
- if (!noPanoramiXExtension)
- XineramaSetCursorPosition (pDev, new.x, new.y, generateEvents);
- else
-#endif
- {
- if (pScreen != pSprite->hotPhys.pScreen)
- pSprite->hotPhys = new;
- (*pScreen->SetCursorPosition)
- (pDev, pScreen, new.x, new.y, generateEvents);
- }
- if (!generateEvents)
- SyntheticMotion(pDev, new.x, new.y);
- }
-
-#ifdef PANORAMIX
- /* Tell DDX what the limits are */
- if (!noPanoramiXExtension)
- XineramaConstrainCursor(pDev);
-#endif
-}
-
-static void
-CheckVirtualMotion(
- DeviceIntPtr pDev,
- QdEventPtr qe,
- WindowPtr pWin)
-{
- SpritePtr pSprite = pDev->spriteInfo->sprite;
- RegionPtr reg = NULL;
- DeviceEvent *ev = NULL;
-
- if (qe)
- {
- ev = &qe->event->device_event;
- switch(ev->type)
- {
- case ET_Motion:
- case ET_ButtonPress:
- case ET_ButtonRelease:
- case ET_KeyPress:
- case ET_KeyRelease:
- case ET_ProximityIn:
- case ET_ProximityOut:
- pSprite->hot.pScreen = qe->pScreen;
- pSprite->hot.x = ev->root_x;
- pSprite->hot.y = ev->root_y;
- pWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab->confineTo : NullWindow;
- break;
- default:
- break;
- }
- }
- if (pWin)
- {
- BoxRec lims;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- int x, y, off_x, off_y, i;
-
- if(!XineramaSetWindowPntrs(pDev, pWin))
- return;
-
- i = PanoramiXNumScreens - 1;
-
- RegionCopy(&pSprite->Reg2,
- &pSprite->windows[i]->borderSize);
- off_x = screenInfo.screens[i]->x;
- off_y = screenInfo.screens[i]->y;
-
- while(i--) {
- x = off_x - screenInfo.screens[i]->x;
- y = off_y - screenInfo.screens[i]->y;
-
- if(x || y)
- RegionTranslate(&pSprite->Reg2, x, y);
-
- RegionUnion(&pSprite->Reg2, &pSprite->Reg2,
- &pSprite->windows[i]->borderSize);
-
- off_x = screenInfo.screens[i]->x;
- off_y = screenInfo.screens[i]->y;
- }
- } else
-#endif
- {
- if (pSprite->hot.pScreen != pWin->drawable.pScreen)
- {
- pSprite->hot.pScreen = pWin->drawable.pScreen;
- pSprite->hot.x = pSprite->hot.y = 0;
- }
- }
-
- lims = *RegionExtents(&pWin->borderSize);
- if (pSprite->hot.x < lims.x1)
- pSprite->hot.x = lims.x1;
- else if (pSprite->hot.x >= lims.x2)
- pSprite->hot.x = lims.x2 - 1;
- if (pSprite->hot.y < lims.y1)
- pSprite->hot.y = lims.y1;
- else if (pSprite->hot.y >= lims.y2)
- pSprite->hot.y = lims.y2 - 1;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension)
- {
- if (RegionNumRects(&pSprite->Reg2) > 1)
- reg = &pSprite->Reg2;
-
- } else
-#endif
- {
- if (wBoundingShape(pWin))
- reg = &pWin->borderSize;
- }
-
- if (reg)
- ConfineToShape(pDev, reg, &pSprite->hot.x, &pSprite->hot.y);
-
- if (qe && ev)
- {
- qe->pScreen = pSprite->hot.pScreen;
- ev->root_x = pSprite->hot.x;
- ev->root_y = pSprite->hot.y;
- }
- }
-#ifdef PANORAMIX
- if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */
-#endif
- RootWindow(pDev->spriteInfo->sprite) = pSprite->hot.pScreen->root;
-}
-
-static void
-ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
-{
- SpritePtr pSprite = pDev->spriteInfo->sprite;
-
- if (syncEvents.playingEvents)
- {
- CheckVirtualMotion(pDev, (QdEventPtr)NULL, pWin);
- SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y);
- }
- else
- {
-#ifdef PANORAMIX
- if(!noPanoramiXExtension) {
- XineramaConfineCursorToWindow(pDev, pWin, generateEvents);
- return;
- }
-#endif
- pSprite->hotLimits = *RegionExtents(&pWin->borderSize);
- pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize
- : NullRegion;
- CheckPhysLimits(pDev, pSprite->current, generateEvents,
- confineToScreen, pWin->drawable.pScreen);
- }
-}
-
-Bool
-PointerConfinedToScreen(DeviceIntPtr pDev)
-{
- return pDev->spriteInfo->sprite->confined;
-}
-
-/**
- * Update the sprite cursor to the given cursor.
- *
- * ChangeToCursor() will display the new cursor and free the old cursor (if
- * applicable). If the provided cursor is already the updated cursor, nothing
- * happens.
- */
-static void
-ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor)
-{
- SpritePtr pSprite = pDev->spriteInfo->sprite;
- ScreenPtr pScreen;
-
- if (cursor != pSprite->current)
- {
- if ((pSprite->current->bits->xhot != cursor->bits->xhot) ||
- (pSprite->current->bits->yhot != cursor->bits->yhot))
- CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined,
- (ScreenPtr)NULL);
-#ifdef PANORAMIX
- /* XXX: is this really necessary?? (whot) */
- if (!noPanoramiXExtension)
- pScreen = pSprite->screen;
- else
-#endif
- pScreen = pSprite->hotPhys.pScreen;
-
- (*pScreen->DisplayCursor)(pDev, pScreen, cursor);
- FreeCursor(pSprite->current, (Cursor)0);
- pSprite->current = cursor;
- pSprite->current->refcnt++;
- }
-}
-
-/**
- * @returns true if b is a descendent of a
- */
-Bool
-IsParent(WindowPtr a, WindowPtr b)
-{
- for (b = b->parent; b; b = b->parent)
- if (b == a) return TRUE;
- return FALSE;
-}
-
-/**
- * Update the cursor displayed on the screen.
- *
- * Called whenever a cursor may have changed shape or position.
- */
-static void
-PostNewCursor(DeviceIntPtr pDev)
-{
- WindowPtr win;
- GrabPtr grab = pDev->deviceGrab.grab;
- SpritePtr pSprite = pDev->spriteInfo->sprite;
- CursorPtr pCursor;
-
- if (syncEvents.playingEvents)
- return;
- if (grab)
- {
- if (grab->cursor)
- {
- ChangeToCursor(pDev, grab->cursor);
- return;
- }
- if (IsParent(grab->window, pSprite->win))
- win = pSprite->win;
- else
- win = grab->window;
- }
- else
- win = pSprite->win;
- for (; win; win = win->parent)
- {
- if (win->optional)
- {
- pCursor = WindowGetDeviceCursor(win, pDev);
- if (!pCursor && win->optional->cursor != NullCursor)
- pCursor = win->optional->cursor;
- if (pCursor)
- {
- ChangeToCursor(pDev, pCursor);
- return;
- }
- }
- }
-}
-
-
-/**
- * @param dev device which you want to know its current root window
- * @return root window where dev's sprite is located
- */
-WindowPtr
-GetCurrentRootWindow(DeviceIntPtr dev)
-{
- return RootWindow(dev->spriteInfo->sprite);
-}
-
-/**
- * @return window underneath the cursor sprite.
- */
-WindowPtr
-GetSpriteWindow(DeviceIntPtr pDev)
-{
- return pDev->spriteInfo->sprite->win;
-}
-
-/**
- * @return current sprite cursor.
- */
-CursorPtr
-GetSpriteCursor(DeviceIntPtr pDev)
-{
- return pDev->spriteInfo->sprite->current;
-}
-
-/**
- * Set x/y current sprite position in screen coordinates.
- */
-void
-GetSpritePosition(DeviceIntPtr pDev, int *px, int *py)
-{
- SpritePtr pSprite = pDev->spriteInfo->sprite;
- *px = pSprite->hotPhys.x;
- *py = pSprite->hotPhys.y;
-}
-
-#ifdef PANORAMIX
-int
-XineramaGetCursorScreen(DeviceIntPtr pDev)
-{
- if(!noPanoramiXExtension) {
- return pDev->spriteInfo->sprite->screen->myNum;
- } else {
- return 0;
- }
-}
-#endif /* PANORAMIX */
-
-#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
-
-static void
-MonthChangedOrBadTime(InternalEvent *ev)
-{
- /* If the ddx/OS is careless about not processing timestamped events from
- * different sources in sorted order, then it's possible for time to go
- * backwards when it should not. Here we ensure a decent time.
- */
- if ((currentTime.milliseconds - ev->any.time) > TIMESLOP)
- currentTime.months++;
- else
- ev->any.time = currentTime.milliseconds;
-}
-
-static void
-NoticeTime(InternalEvent *ev)
-{
- if (ev->any.time < currentTime.milliseconds)
- MonthChangedOrBadTime(ev);
- currentTime.milliseconds = ev->any.time;
- lastDeviceEventTime = currentTime;
-}
-
-void
-NoticeEventTime(InternalEvent *ev)
-{
- if (!syncEvents.playingEvents)
- NoticeTime(ev);
-}
-
-/**************************************************************************
- * The following procedures deal with synchronous events *
- **************************************************************************/
-
-/**
- * EnqueueEvent is a device's processInputProc if a device is frozen.
- * Instead of delivering the events to the client, the event is tacked onto a
- * linked list for later delivery.
- */
-void
-EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
-{
- QdEventPtr tail = *syncEvents.pendtail;
- QdEventPtr qe;
- SpritePtr pSprite = device->spriteInfo->sprite;
- int eventlen;
- DeviceEvent *event = &ev->device_event;
-
- NoticeTime((InternalEvent*)event);
-
- /* Fix for key repeating bug. */
- if (device->key != NULL && device->key->xkbInfo != NULL &&
- event->type == ET_KeyRelease)
- AccessXCancelRepeatKey(device->key->xkbInfo, event->detail.key);
-
- if (DeviceEventCallback)
- {
- DeviceEventInfoRec eventinfo;
-
- /* The RECORD spec says that the root window field of motion events
- * must be valid. At this point, it hasn't been filled in yet, so
- * we do it here. The long expression below is necessary to get
- * the current root window; the apparently reasonable alternative
- * GetCurrentRootWindow()->drawable.id doesn't give you the right
- * answer on the first motion event after a screen change because
- * the data that GetCurrentRootWindow relies on hasn't been
- * updated yet.
- */
- if (ev->any.type == ET_Motion)
- ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id;
-
- eventinfo.event = ev;
- eventinfo.device = device;
- CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo);
- }
-
- if (event->type == ET_Motion)
- {
-#ifdef PANORAMIX
- if(!noPanoramiXExtension) {
- event->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
- event->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
- }
-#endif
- pSprite->hotPhys.x = event->root_x;
- pSprite->hotPhys.y = event->root_y;
- /* do motion compression, but not if from different devices */
- if (tail &&
- (tail->event->any.type == ET_Motion) &&
- (tail->device == device) &&
- (tail->pScreen == pSprite->hotPhys.pScreen))
- {
- DeviceEvent *tailev = &tail->event->device_event;
- tailev->root_x = pSprite->hotPhys.x;
- tailev->root_y = pSprite->hotPhys.y;
- tailev->time = event->time;
- tail->months = currentTime.months;
- return;
- }
- }
-
- eventlen = event->length;
-
- qe = malloc(sizeof(QdEventRec) + eventlen);
- if (!qe)
- return;
- qe->next = (QdEventPtr)NULL;
- qe->device = device;
- qe->pScreen = pSprite->hotPhys.pScreen;
- qe->months = currentTime.months;
- qe->event = (InternalEvent *)(qe + 1);
- memcpy(qe->event, event, eventlen);
- if (tail)
- syncEvents.pendtail = &tail->next;
- *syncEvents.pendtail = qe;
-}
-
-/**
- * Run through the list of events queued up in syncEvents.
- * For each event do:
- * If the device for this event is not frozen anymore, take it and process it
- * as usually.
- * After that, check if there's any devices in the list that are not frozen.
- * If there is none, we're done. If there is at least one device that is not
- * frozen, then re-run from the beginning of the event queue.
- */
-static void
-PlayReleasedEvents(void)
-{
- QdEventPtr *prev, qe;
- DeviceIntPtr dev;
- DeviceIntPtr pDev;
-
- prev = &syncEvents.pending;
- while ( (qe = *prev) )
- {
- if (!qe->device->deviceGrab.sync.frozen)
- {
- *prev = qe->next;
- pDev = qe->device;
- if (*syncEvents.pendtail == *prev)
- syncEvents.pendtail = prev;
- if (qe->event->any.type == ET_Motion)
- CheckVirtualMotion(pDev, qe, NullWindow);
- syncEvents.time.months = qe->months;
- syncEvents.time.milliseconds = qe->event->any.time;
-#ifdef PANORAMIX
- /* Translate back to the sprite screen since processInputProc
- will translate from sprite screen to screen 0 upon reentry
- to the DIX layer */
- if(!noPanoramiXExtension) {
- DeviceEvent *ev = &qe->event->device_event;
- switch(ev->type)
- {
- case ET_Motion:
- case ET_ButtonPress:
- case ET_ButtonRelease:
- case ET_KeyPress:
- case ET_KeyRelease:
- case ET_ProximityIn:
- case ET_ProximityOut:
- ev->root_x += screenInfo.screens[0]->x -
- pDev->spriteInfo->sprite->screen->x;
- ev->root_y += screenInfo.screens[0]->y -
- pDev->spriteInfo->sprite->screen->y;
- break;
- default:
- break;
- }
-
- }
-#endif
- (*qe->device->public.processInputProc)(qe->event, qe->device);
- free(qe);
- for (dev = inputInfo.devices; dev && dev->deviceGrab.sync.frozen; dev = dev->next)
- ;
- if (!dev)
- break;
- /* Playing the event may have unfrozen another device. */
- /* So to play it safe, restart at the head of the queue */
- prev = &syncEvents.pending;
- }
- else
- prev = &qe->next;
- }
-}
-
-/**
- * Freeze or thaw the given devices. The device's processing proc is
- * switched to either the real processing proc (in case of thawing) or an
- * enqueuing processing proc (usually EnqueueEvent()).
- *
- * @param dev The device to freeze/thaw
- * @param frozen True to freeze or false to thaw.
- */
-static void
-FreezeThaw(DeviceIntPtr dev, Bool frozen)
-{
- dev->deviceGrab.sync.frozen = frozen;
- if (frozen)
- dev->public.processInputProc = dev->public.enqueueInputProc;
- else
- dev->public.processInputProc = dev->public.realInputProc;
-}
-
-/**
- * Unfreeze devices and replay all events to the respective clients.
- *
- * ComputeFreezes takes the first event in the device's frozen event queue. It
- * runs up the sprite tree (spriteTrace) and searches for the window to replay
- * the events from. If it is found, it checks for passive grabs one down from
- * the window or delivers the events.
- */
-static void
-ComputeFreezes(void)
-{
- DeviceIntPtr replayDev = syncEvents.replayDev;
- WindowPtr w;
- GrabPtr grab;
- DeviceIntPtr dev;
-
- for (dev = inputInfo.devices; dev; dev = dev->next)
- FreezeThaw(dev, dev->deviceGrab.sync.other ||
- (dev->deviceGrab.sync.state >= FROZEN));
- if (syncEvents.playingEvents || (!replayDev && !syncEvents.pending))
- return;
- syncEvents.playingEvents = TRUE;
- if (replayDev)
- {
- DeviceEvent* event = replayDev->deviceGrab.sync.event;
-
- syncEvents.replayDev = (DeviceIntPtr)NULL;
-
- w = XYToWindow(replayDev->spriteInfo->sprite,
- event->root_x, event->root_y);
- if (!CheckDeviceGrabs(replayDev, event, syncEvents.replayWin))
- {
- if (replayDev->focus && !IsPointerEvent((InternalEvent*)event))
- DeliverFocusedEvent(replayDev, (InternalEvent*)event, w);
- else
- DeliverDeviceEvents(w, (InternalEvent*)event, NullGrab,
- NullWindow, replayDev);
- }
- }
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (!dev->deviceGrab.sync.frozen)
- {
- PlayReleasedEvents();
- break;
- }
- }
- syncEvents.playingEvents = FALSE;
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (DevHasCursor(dev))
- {
- /* the following may have been skipped during replay,
- so do it now */
- if ((grab = dev->deviceGrab.grab) && grab->confineTo)
- {
- if (grab->confineTo->drawable.pScreen !=
- dev->spriteInfo->sprite->hotPhys.pScreen)
- dev->spriteInfo->sprite->hotPhys.x =
- dev->spriteInfo->sprite->hotPhys.y = 0;
- ConfineCursorToWindow(dev, grab->confineTo, TRUE, TRUE);
- }
- else
- ConfineCursorToWindow(dev,
- dev->spriteInfo->sprite->hotPhys.pScreen->root,
- TRUE, FALSE);
- PostNewCursor(dev);
- }
- }
-}
-
-#ifdef RANDR
-void
-ScreenRestructured (ScreenPtr pScreen)
-{
- GrabPtr grab;
- DeviceIntPtr pDev;
-
- for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
- {
- if (!DevHasCursor(pDev))
- continue;
-
- /* GrabDevice doesn't have a confineTo field, so we don't need to
- * worry about it. */
- if ((grab = pDev->deviceGrab.grab) && grab->confineTo)
- {
- if (grab->confineTo->drawable.pScreen
- != pDev->spriteInfo->sprite->hotPhys.pScreen)
- pDev->spriteInfo->sprite->hotPhys.x = pDev->spriteInfo->sprite->hotPhys.y = 0;
- ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE);
- }
- else
- ConfineCursorToWindow(pDev,
- pDev->spriteInfo->sprite->hotPhys.pScreen->root,
- TRUE, FALSE);
- }
-}
-#endif
-
-static void
-CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
-{
- GrabPtr grab = thisDev->deviceGrab.grab;
- DeviceIntPtr dev;
-
- if (thisMode == GrabModeSync)
- thisDev->deviceGrab.sync.state = FROZEN_NO_EVENT;
- else
- { /* free both if same client owns both */
- thisDev->deviceGrab.sync.state = THAWED;
- if (thisDev->deviceGrab.sync.other &&
- (CLIENT_BITS(thisDev->deviceGrab.sync.other->resource) ==
- CLIENT_BITS(grab->resource)))
- thisDev->deviceGrab.sync.other = NullGrab;
- }
-
- if (IsMaster(thisDev))
- {
- dev = GetPairedDevice(thisDev);
- if (otherMode == GrabModeSync)
- dev->deviceGrab.sync.other = grab;
- else
- { /* free both if same client owns both */
- if (dev->deviceGrab.sync.other &&
- (CLIENT_BITS(dev->deviceGrab.sync.other->resource) ==
- CLIENT_BITS(grab->resource)))
- dev->deviceGrab.sync.other = NullGrab;
- }
- }
- ComputeFreezes();
-}
-
-/**
- * Save the device's master device id. This needs to be done
- * if a client directly grabs a slave device that is attached to a master. For
- * the duration of the grab, the device is detached, ungrabbing re-attaches it
- * though.
- *
- * We store the ID of the master device only in case the master disappears
- * while the device has a grab.
- */
-static void
-DetachFromMaster(DeviceIntPtr dev)
-{
- if (!IsFloating(dev))
- return;
-
- dev->saved_master_id = GetMaster(dev, MASTER_ATTACHED)->id;
-
- AttachDevice(NULL, dev, NULL);
-}
-
-static void
-ReattachToOldMaster(DeviceIntPtr dev)
-{
- DeviceIntPtr master = NULL;
-
- if (IsMaster(dev))
- return;
-
- dixLookupDevice(&master, dev->saved_master_id, serverClient, DixUseAccess);
-
- if (master)
- {
- AttachDevice(serverClient, dev, master);
- dev->saved_master_id = 0;
- }
-}
-
-/**
- * Activate a pointer grab on the given device. A pointer grab will cause all
- * core pointer events of this device to be delivered to the grabbing client only.
- * No other device will send core events to the grab client while the grab is
- * on, but core events will be sent to other clients.
- * Can cause the cursor to change if a grab cursor is set.
- *
- * Note that parameter autoGrab may be (True & ImplicitGrabMask) if the grab
- * is an implicit grab caused by a ButtonPress event.
- *
- * @param mouse The device to grab.
- * @param grab The grab structure, needs to be setup.
- * @param autoGrab True if the grab was caused by a button down event and not
- * explicitely by a client.
- */
-void
-ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab,
- TimeStamp time, Bool autoGrab)
-{
- GrabInfoPtr grabinfo = &mouse->deviceGrab;
- WindowPtr oldWin = (grabinfo->grab) ?
- grabinfo->grab->window
- : mouse->spriteInfo->sprite->win;
- Bool isPassive = autoGrab & ~ImplicitGrabMask;
-
- /* slave devices need to float for the duration of the grab. */
- if (grab->grabtype == GRABTYPE_XI2 &&
- !(autoGrab & ImplicitGrabMask) && !IsMaster(mouse))
- DetachFromMaster(mouse);
-
- if (grab->confineTo)
- {
- if (grab->confineTo->drawable.pScreen
- != mouse->spriteInfo->sprite->hotPhys.pScreen)
- mouse->spriteInfo->sprite->hotPhys.x =
- mouse->spriteInfo->sprite->hotPhys.y = 0;
- ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE);
- }
- DoEnterLeaveEvents(mouse, mouse->id, oldWin, grab->window, NotifyGrab);
- mouse->valuator->motionHintWindow = NullWindow;
- if (syncEvents.playingEvents)
- grabinfo->grabTime = syncEvents.time;
- else
- grabinfo->grabTime = time;
- if (grab->cursor)
- grab->cursor->refcnt++;
- grabinfo->activeGrab = *grab;
- grabinfo->grab = &grabinfo->activeGrab;
- grabinfo->fromPassiveGrab = isPassive;
- grabinfo->implicitGrab = autoGrab & ImplicitGrabMask;
- PostNewCursor(mouse);
- CheckGrabForSyncs(mouse,(Bool)grab->pointerMode, (Bool)grab->keyboardMode);
-}
-
-/**
- * Delete grab on given device, update the sprite.
- *
- * Extension devices are set up for ActivateKeyboardGrab().
- */
-void
-DeactivatePointerGrab(DeviceIntPtr mouse)
-{
- GrabPtr grab = mouse->deviceGrab.grab;
- DeviceIntPtr dev;
- Bool wasImplicit = (mouse->deviceGrab.fromPassiveGrab &&
- mouse->deviceGrab.implicitGrab);
-
- mouse->valuator->motionHintWindow = NullWindow;
- mouse->deviceGrab.grab = NullGrab;
- mouse->deviceGrab.sync.state = NOT_GRABBED;
- mouse->deviceGrab.fromPassiveGrab = FALSE;
-
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (dev->deviceGrab.sync.other == grab)
- dev->deviceGrab.sync.other = NullGrab;
- }
- DoEnterLeaveEvents(mouse, mouse->id, grab->window,
- mouse->spriteInfo->sprite->win, NotifyUngrab);
- if (grab->confineTo)
- ConfineCursorToWindow(mouse, GetCurrentRootWindow(mouse), FALSE, FALSE);
- PostNewCursor(mouse);
- if (grab->cursor)
- FreeCursor(grab->cursor, (Cursor)0);
-
- if (!wasImplicit && grab->grabtype == GRABTYPE_XI2)
- ReattachToOldMaster(mouse);
-
- ComputeFreezes();
-}
-
-/**
- * Activate a keyboard grab on the given device.
- *
- * Extension devices have ActivateKeyboardGrab() set as their grabbing proc.
- */
-void
-ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
-{
- GrabInfoPtr grabinfo = &keybd->deviceGrab;
- WindowPtr oldWin;
-
- /* slave devices need to float for the duration of the grab. */
- if (grab->grabtype == GRABTYPE_XI2 &&
- !(passive & ImplicitGrabMask) &&
- !IsMaster(keybd))
- DetachFromMaster(keybd);
-
- if (grabinfo->grab)
- oldWin = grabinfo->grab->window;
- else if (keybd->focus)
- oldWin = keybd->focus->win;
- else
- oldWin = keybd->spriteInfo->sprite->win;
- if (oldWin == FollowKeyboardWin)
- oldWin = keybd->focus->win;
- if (keybd->valuator)
- keybd->valuator->motionHintWindow = NullWindow;
- DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab);
- if (syncEvents.playingEvents)
- grabinfo->grabTime = syncEvents.time;
- else
- grabinfo->grabTime = time;
- grabinfo->activeGrab = *grab;
- grabinfo->grab = &grabinfo->activeGrab;
- grabinfo->fromPassiveGrab = passive;
- grabinfo->implicitGrab = passive & ImplicitGrabMask;
- CheckGrabForSyncs(keybd, (Bool)grab->keyboardMode, (Bool)grab->pointerMode);
-}
-
-/**
- * Delete keyboard grab for the given device.
- */
-void
-DeactivateKeyboardGrab(DeviceIntPtr keybd)
-{
- GrabPtr grab = keybd->deviceGrab.grab;
- DeviceIntPtr dev;
- WindowPtr focusWin = keybd->focus ? keybd->focus->win
- : keybd->spriteInfo->sprite->win;
- Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab &&
- keybd->deviceGrab.implicitGrab);
-
- if (focusWin == FollowKeyboardWin)
- focusWin = inputInfo.keyboard->focus->win;
- if (keybd->valuator)
- keybd->valuator->motionHintWindow = NullWindow;
- keybd->deviceGrab.grab = NullGrab;
- keybd->deviceGrab.sync.state = NOT_GRABBED;
- keybd->deviceGrab.fromPassiveGrab = FALSE;
-
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (dev->deviceGrab.sync.other == grab)
- dev->deviceGrab.sync.other = NullGrab;
- }
- DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab);
-
- if (!wasImplicit && grab->grabtype == GRABTYPE_XI2)
- ReattachToOldMaster(keybd);
-
- ComputeFreezes();
-}
-
-void
-AllowSome(ClientPtr client,
- TimeStamp time,
- DeviceIntPtr thisDev,
- int newState)
-{
- Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced;
- TimeStamp grabTime;
- DeviceIntPtr dev;
- GrabInfoPtr devgrabinfo,
- grabinfo = &thisDev->deviceGrab;
-
- thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client);
- thisSynced = FALSE;
- otherGrabbed = FALSE;
- othersFrozen = FALSE;
- grabTime = grabinfo->grabTime;
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- devgrabinfo = &dev->deviceGrab;
-
- if (dev == thisDev)
- continue;
- if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client))
- {
- if (!(thisGrabbed || otherGrabbed) ||
- (CompareTimeStamps(devgrabinfo->grabTime, grabTime) == LATER))
- grabTime = devgrabinfo->grabTime;
- otherGrabbed = TRUE;
- if (grabinfo->sync.other == devgrabinfo->grab)
- thisSynced = TRUE;
- if (devgrabinfo->sync.state >= FROZEN)
- othersFrozen = TRUE;
- }
- }
- if (!((thisGrabbed && grabinfo->sync.state >= FROZEN) || thisSynced))
- return;
- if ((CompareTimeStamps(time, currentTime) == LATER) ||
- (CompareTimeStamps(time, grabTime) == EARLIER))
- return;
- switch (newState)
- {
- case THAWED: /* Async */
- if (thisGrabbed)
- grabinfo->sync.state = THAWED;
- if (thisSynced)
- grabinfo->sync.other = NullGrab;
- ComputeFreezes();
- break;
- case FREEZE_NEXT_EVENT: /* Sync */
- if (thisGrabbed)
- {
- grabinfo->sync.state = FREEZE_NEXT_EVENT;
- if (thisSynced)
- grabinfo->sync.other = NullGrab;
- ComputeFreezes();
- }
- break;
- case THAWED_BOTH: /* AsyncBoth */
- if (othersFrozen)
- {
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- devgrabinfo = &dev->deviceGrab;
- if (devgrabinfo->grab
- && SameClient(devgrabinfo->grab, client))
- devgrabinfo->sync.state = THAWED;
- if (devgrabinfo->sync.other &&
- SameClient(devgrabinfo->sync.other, client))
- devgrabinfo->sync.other = NullGrab;
- }
- ComputeFreezes();
- }
- break;
- case FREEZE_BOTH_NEXT_EVENT: /* SyncBoth */
- if (othersFrozen)
- {
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- devgrabinfo = &dev->deviceGrab;
- if (devgrabinfo->grab
- && SameClient(devgrabinfo->grab, client))
- devgrabinfo->sync.state = FREEZE_BOTH_NEXT_EVENT;
- if (devgrabinfo->sync.other
- && SameClient(devgrabinfo->sync.other, client))
- devgrabinfo->sync.other = NullGrab;
- }
- ComputeFreezes();
- }
- break;
- case NOT_GRABBED: /* Replay */
- if (thisGrabbed && grabinfo->sync.state == FROZEN_WITH_EVENT)
- {
- if (thisSynced)
- grabinfo->sync.other = NullGrab;
- syncEvents.replayDev = thisDev;
- syncEvents.replayWin = grabinfo->grab->window;
- (*grabinfo->DeactivateGrab)(thisDev);
- syncEvents.replayDev = (DeviceIntPtr)NULL;
- }
- break;
- case THAW_OTHERS: /* AsyncOthers */
- if (othersFrozen)
- {
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (dev == thisDev)
- continue;
- devgrabinfo = &dev->deviceGrab;
- if (devgrabinfo->grab
- && SameClient(devgrabinfo->grab, client))
- devgrabinfo->sync.state = THAWED;
- if (devgrabinfo->sync.other
- && SameClient(devgrabinfo->sync.other, client))
- devgrabinfo->sync.other = NullGrab;
- }
- ComputeFreezes();
- }
- break;
- }
-}
-
-/**
- * Server-side protocol handling for AllowEvents request.
- *
- * Release some events from a frozen device.
- */
-int
-ProcAllowEvents(ClientPtr client)
-{
- TimeStamp time;
- DeviceIntPtr mouse = NULL;
- DeviceIntPtr keybd = NULL;
- REQUEST(xAllowEventsReq);
-
- REQUEST_SIZE_MATCH(xAllowEventsReq);
- time = ClientTimeToServerTime(stuff->time);
-
- mouse = PickPointer(client);
- keybd = PickKeyboard(client);
-
- switch (stuff->mode)
- {
- case ReplayPointer:
- AllowSome(client, time, mouse, NOT_GRABBED);
- break;
- case SyncPointer:
- AllowSome(client, time, mouse, FREEZE_NEXT_EVENT);
- break;
- case AsyncPointer:
- AllowSome(client, time, mouse, THAWED);
- break;
- case ReplayKeyboard:
- AllowSome(client, time, keybd, NOT_GRABBED);
- break;
- case SyncKeyboard:
- AllowSome(client, time, keybd, FREEZE_NEXT_EVENT);
- break;
- case AsyncKeyboard:
- AllowSome(client, time, keybd, THAWED);
- break;
- case SyncBoth:
- AllowSome(client, time, keybd, FREEZE_BOTH_NEXT_EVENT);
- break;
- case AsyncBoth:
- AllowSome(client, time, keybd, THAWED_BOTH);
- break;
- default:
- client->errorValue = stuff->mode;
- return BadValue;
- }
- return Success;
-}
-
-/**
- * Deactivate grabs from any device that has been grabbed by the client.
- */
-void
-ReleaseActiveGrabs(ClientPtr client)
-{
- DeviceIntPtr dev;
- Bool done;
-
- /* XXX CloseDownClient should remove passive grabs before
- * releasing active grabs.
- */
- do {
- done = TRUE;
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client))
- {
- (*dev->deviceGrab.DeactivateGrab)(dev);
- done = FALSE;
- }
- }
- } while (!done);
-}
-
-/**************************************************************************
- * The following procedures deal with delivering events *
- **************************************************************************/
-
-/**
- * Deliver the given events to the given client.
- *
- * More than one event may be delivered at a time. This is the case with
- * DeviceMotionNotifies which may be followed by DeviceValuator events.
- *
- * TryClientEvents() is the last station before actually writing the events to
- * the socket. Anything that is not filtered here, will get delivered to the
- * client.
- * An event is only delivered if
- * - mask and filter match up.
- * - no other client has a grab on the device that caused the event.
- *
- *
- * @param client The target client to deliver to.
- * @param dev The device the event came from. May be NULL.
- * @param pEvents The events to be delivered.
- * @param count Number of elements in pEvents.
- * @param mask Event mask as set by the window.
- * @param filter Mask based on event type.
- * @param grab Possible grab on the device that caused the event.
- *
- * @return 1 if event was delivered, 0 if not or -1 if grab was not set by the
- * client.
- */
-int
-TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
- int count, Mask mask, Mask filter, GrabPtr grab)
-{
- int type;
-
-#ifdef DEBUG_EVENTS
- ErrorF("[dix] Event([%d, %d], mask=0x%lx), client=%d%s",
- pEvents->u.u.type, pEvents->u.u.detail, mask,
- client ? client->index : -1,
- (client && client->clientGone) ? " (gone)" : "");
-#endif
-
- if (!client || client == serverClient || client->clientGone) {
-#ifdef DEBUG_EVENTS
- ErrorF(" not delivered to fake/dead client\n");
-#endif
- return 0;
- }
-
- if (filter != CantBeFiltered && !(mask & filter))
- {
- #ifdef DEBUG_EVENTS
- ErrorF(" filtered\n");
- #endif
- return 0;
- }
-
- if (grab && !SameClient(grab, client))
- {
-#ifdef DEBUG_EVENTS
- ErrorF(" not delivered due to grab\n");
-#endif
- return -1; /* don't send, but notify caller */
- }
-
- type = pEvents->u.u.type;
- if (type == MotionNotify)
- {
- if (mask & PointerMotionHintMask)
- {
- if (WID(dev->valuator->motionHintWindow) ==
- pEvents->u.keyButtonPointer.event)
- {
-#ifdef DEBUG_EVENTS
- ErrorF("[dix] \n");
- ErrorF("[dix] motionHintWindow == keyButtonPointer.event\n");
-#endif
- return 1; /* don't send, but pretend we did */
- }
- pEvents->u.u.detail = NotifyHint;
- }
- else
- {
- pEvents->u.u.detail = NotifyNormal;
- }
- }
- else if (type == DeviceMotionNotify)
- {
- if (MaybeSendDeviceMotionNotifyHint((deviceKeyButtonPointer*)pEvents,
- mask) != 0)
- return 1;
- } else if (type == KeyPress)
- {
- if (EventIsKeyRepeat(pEvents))
- {
- if (!_XkbWantsDetectableAutoRepeat(client))
- {
- xEvent release = *pEvents;
- release.u.u.type = KeyRelease;
- WriteEventsToClient(client, 1, &release);
-#ifdef DEBUG_EVENTS
- ErrorF(" (plus fake core release for repeat)");
-#endif
- } else
- {
-#ifdef DEBUG_EVENTS
- ErrorF(" (detectable autorepeat for core)");
-#endif
- }
- }
-
- } else if (type == DeviceKeyPress)
- {
- if (EventIsKeyRepeat(pEvents))
- {
- if (!_XkbWantsDetectableAutoRepeat(client))
- {
- deviceKeyButtonPointer release = *(deviceKeyButtonPointer *)pEvents;
- release.type = DeviceKeyRelease;
-#ifdef DEBUG_EVENTS
- ErrorF(" (plus fake xi1 release for repeat)");
-#endif
- WriteEventsToClient(client, 1, (xEvent *) &release);
- }
- else {
-#ifdef DEBUG_EVENTS
- ErrorF(" (detectable autorepeat for core)");
-#endif
- }
- }
- }
-
- if (BitIsOn(criticalEvents, type))
- {
- if (client->smart_priority < SMART_MAX_PRIORITY)
- client->smart_priority++;
- SetCriticalOutputPending();
- }
-
- WriteEventsToClient(client, count, pEvents);
-#ifdef DEBUG_EVENTS
- ErrorF("[dix] delivered\n");
-#endif
- return 1;
-}
-
-/**
- * Deliver events to a window. At this point, we do not yet know if the event
- * actually needs to be delivered. May activate a grab if the event is a
- * button press.
- *
- * Core events are always delivered to the window owner. If the filter is
- * something other than CantBeFiltered, the event is also delivered to other
- * clients with the matching mask on the window.
- *
- * More than one event may be delivered at a time. This is the case with
- * DeviceMotionNotifies which may be followed by DeviceValuator events.
- *
- * @param pWin The window that would get the event.
- * @param pEvents The events to be delivered.
- * @param count Number of elements in pEvents.
- * @param filter Mask based on event type.
- * @param grab Possible grab on the device that caused the event.
- *
- * @return Number of events delivered to various clients.
- */
-int
-DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
- *pEvents, int count, Mask filter, GrabPtr grab)
-{
- int deliveries = 0, nondeliveries = 0;
- int attempt;
- InputClients *other;
- ClientPtr client = NullClient;
- Mask deliveryMask = 0; /* If a grab occurs due to a button press, then
- this mask is the mask of the grab. */
- int type = pEvents->u.u.type;
-
-
- /* Deliver to window owner */
- if ((filter == CantBeFiltered) || CORE_EVENT(pEvents))
- {
- /* if nobody ever wants to see this event, skip some work */
- if (filter != CantBeFiltered &&
- !((wOtherEventMasks(pWin)|pWin->eventMask) & filter))
- return 0;
-
- if (IsInterferingGrab(wClient(pWin), pDev, pEvents))
- return 0;
-
- if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count))
- /* do nothing */;
- else if ( (attempt = TryClientEvents(wClient(pWin), pDev, pEvents,
- count, pWin->eventMask,
- filter, grab)) )
- {
- if (attempt > 0)
- {
- deliveries++;
- client = wClient(pWin);
- deliveryMask = pWin->eventMask;
- } else
- nondeliveries--;
- }
- }
-
- /* CantBeFiltered means only window owner gets the event */
- if (filter != CantBeFiltered)
- {
- if (CORE_EVENT(pEvents))
- other = (InputClients *)wOtherClients(pWin);
- else if (XI2_EVENT(pEvents))
- {
- OtherInputMasks *inputMasks = wOtherInputMasks(pWin);
- /* Has any client selected for the event? */
- if (!GetWindowXI2Mask(pDev, pWin, pEvents))
- return 0;
- other = inputMasks->inputClients;
- } else {
- OtherInputMasks *inputMasks = wOtherInputMasks(pWin);
- /* Has any client selected for the event? */
- if (!inputMasks ||
- !(inputMasks->inputEvents[pDev->id] & filter))
- return 0;
-
- other = inputMasks->inputClients;
- }
-
- for (; other; other = other->next)
- {
- Mask mask;
- if (IsInterferingGrab(rClient(other), pDev, pEvents))
- continue;
-
- mask = GetEventMask(pDev, pEvents, other);
-
- if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin,
- pEvents, count))
- /* do nothing */;
- else if ( (attempt = TryClientEvents(rClient(other), pDev,
- pEvents, count,
- mask, filter, grab)) )
- {
- if (attempt > 0)
- {
- deliveries++;
- client = rClient(other);
- deliveryMask = mask;
- } else
- nondeliveries--;
- }
- }
- }
- /*
- * Note that since core events are delivered first, an implicit grab may
- * be activated on a core grab, stopping the XI events.
- */
- if ((type == DeviceButtonPress || type == ButtonPress ||
- ((XI2_EVENT(pEvents) && ((xGenericEvent*)pEvents)->evtype == XI_ButtonPress)))
- && deliveries
- && (!grab))
- {
- GrabRec tempGrab;
- OtherInputMasks *inputMasks;
-
- memset(&tempGrab, 0, sizeof(GrabRec));
- tempGrab.next = NULL;
- tempGrab.device = pDev;
- tempGrab.resource = client->clientAsMask;
- tempGrab.window = pWin;
- tempGrab.ownerEvents = (deliveryMask & OwnerGrabButtonMask) ? TRUE : FALSE;
- tempGrab.eventMask = deliveryMask;
- tempGrab.keyboardMode = GrabModeAsync;
- tempGrab.pointerMode = GrabModeAsync;
- tempGrab.confineTo = NullWindow;
- tempGrab.cursor = NullCursor;
- tempGrab.type = type;
- if (type == ButtonPress)
- tempGrab.grabtype = GRABTYPE_CORE;
- else if (type == DeviceButtonPress)
- tempGrab.grabtype = GRABTYPE_XI;
- else
- {
- tempGrab.type = ((xGenericEvent*)pEvents)->evtype;
- tempGrab.grabtype = GRABTYPE_XI2;
- }
-
- /* get the XI and XI2 device mask */
- inputMasks = wOtherInputMasks(pWin);
- tempGrab.deviceMask = (inputMasks) ? inputMasks->inputEvents[pDev->id]: 0;
-
- if (inputMasks)
- memcpy(tempGrab.xi2mask, inputMasks->xi2mask,
- sizeof(tempGrab.xi2mask));
-
- (*pDev->deviceGrab.ActivateGrab)(pDev, &tempGrab,
- currentTime, TRUE | ImplicitGrabMask);
- }
- else if ((type == MotionNotify) && deliveries)
- pDev->valuator->motionHintWindow = pWin;
- else
- {
- if ((type == DeviceMotionNotify || type == DeviceButtonPress) &&
- deliveries)
- CheckDeviceGrabAndHintWindow (pWin, type,
- (deviceKeyButtonPointer*) pEvents,
- grab, client, deliveryMask);
- }
- if (deliveries)
- return deliveries;
- return nondeliveries;
-}
-
-/* If the event goes to dontClient, don't send it and return 0. if
- send works, return 1 or if send didn't work, return 2.
- Only works for core events.
-*/
-
-#ifdef PANORAMIX
-static int
-XineramaTryClientEventsResult(
- ClientPtr client,
- GrabPtr grab,
- Mask mask,
- Mask filter
-){
- if ((client) && (client != serverClient) && (!client->clientGone) &&
- ((filter == CantBeFiltered) || (mask & filter)))
- {
- if (grab && !SameClient(grab, client)) return -1;
- else return 1;
- }
- return 0;
-}
-#endif
-
-/**
- * Try to deliver events to the interested parties.
- *
- * @param pWin The window that would get the event.
- * @param pEvents The events to be delivered.
- * @param count Number of elements in pEvents.
- * @param filter Mask based on event type.
- * @param dontClient Don't deliver to the dontClient.
- */
-int
-MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents,
- int count, Mask filter, ClientPtr dontClient)
-{
- OtherClients *other;
-
-
- if (pWin->eventMask & filter)
- {
- if (wClient(pWin) == dontClient)
- return 0;
-#ifdef PANORAMIX
- if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
- return XineramaTryClientEventsResult(
- wClient(pWin), NullGrab, pWin->eventMask, filter);
-#endif
- if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count))
- return 1; /* don't send, but pretend we did */
- return TryClientEvents(wClient(pWin), NULL, pEvents, count,
- pWin->eventMask, filter, NullGrab);
- }
- for (other = wOtherClients(pWin); other; other = other->next)
- {
- if (other->mask & filter)
- {
- if (SameClient(other, dontClient))
- return 0;
-#ifdef PANORAMIX
- if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
- return XineramaTryClientEventsResult(
- rClient(other), NullGrab, other->mask, filter);
-#endif
- if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, pEvents,
- count))
- return 1; /* don't send, but pretend we did */
- return TryClientEvents(rClient(other), NULL, pEvents, count,
- other->mask, filter, NullGrab);
- }
- }
- return 2;
-}
-
-static Window FindChildForEvent(SpritePtr pSprite, WindowPtr event)
-{
- WindowPtr w = pSprite->spriteTrace[pSprite->spriteTraceGood-1];
- Window child = None;
-
- /* If the search ends up past the root should the child field be
- set to none or should the value in the argument be passed
- through. It probably doesn't matter since everyone calls
- this function with child == None anyway. */
- while (w)
- {
- /* If the source window is same as event window, child should be
- none. Don't bother going all all the way back to the root. */
-
- if (w == event)
- {
- child = None;
- break;
- }
-
- if (w->parent == event)
- {
- child = w->drawable.id;
- break;
- }
- w = w->parent;
- }
- return child;
-}
-
-/**
- * Adjust event fields to comply with the window properties.
- *
- * @param xE Event to be modified in place
- * @param pWin The window to get the information from.
- * @param child Child window setting for event (if applicable)
- * @param calcChild If True, calculate the child window.
- */
-void
-FixUpEventFromWindow(
- SpritePtr pSprite,
- xEvent *xE,
- WindowPtr pWin,
- Window child,
- Bool calcChild)
-{
- if (calcChild)
- child = FindChildForEvent(pSprite, pWin);
-
- if (XI2_EVENT(xE))
- {
- xXIDeviceEvent* event = (xXIDeviceEvent*)xE;
-
- if (event->evtype == XI_RawKeyPress ||
- event->evtype == XI_RawKeyRelease ||
- event->evtype == XI_RawButtonPress ||
- event->evtype == XI_RawButtonRelease ||
- event->evtype == XI_RawMotion ||
- event->evtype == XI_DeviceChanged ||
- event->evtype == XI_HierarchyChanged ||
- event->evtype == XI_PropertyEvent)
- return;
-
- event->root = RootWindow(pSprite)->drawable.id;
- event->event = pWin->drawable.id;
- if (pSprite->hot.pScreen == pWin->drawable.pScreen)
- {
- event->event_x = event->root_x - FP1616(pWin->drawable.x, 0);
- event->event_y = event->root_y - FP1616(pWin->drawable.y, 0);
- event->child = child;
- } else
- {
- event->event_x = 0;
- event->event_y = 0;
- event->child = None;
- }
-
- if (event->evtype == XI_Enter || event->evtype == XI_Leave ||
- event->evtype == XI_FocusIn || event->evtype == XI_FocusOut)
- ((xXIEnterEvent*)event)->same_screen =
- (pSprite->hot.pScreen == pWin->drawable.pScreen);
-
- } else
- {
- XE_KBPTR.root = RootWindow(pSprite)->drawable.id;
- XE_KBPTR.event = pWin->drawable.id;
- if (pSprite->hot.pScreen == pWin->drawable.pScreen)
- {
- XE_KBPTR.sameScreen = xTrue;
- XE_KBPTR.child = child;
- XE_KBPTR.eventX =
- XE_KBPTR.rootX - pWin->drawable.x;
- XE_KBPTR.eventY =
- XE_KBPTR.rootY - pWin->drawable.y;
- }
- else
- {
- XE_KBPTR.sameScreen = xFalse;
- XE_KBPTR.child = None;
- XE_KBPTR.eventX = 0;
- XE_KBPTR.eventY = 0;
- }
- }
-}
-
-/**
- * Check if a given event is deliverable at all on a given window.
- *
- * This function only checks if any client wants it, not for a specific
- * client.
- *
- * @param[in] dev The device this event is being sent for.
- * @param[in] event The event that is to be sent.
- * @param[in] win The current event window.
- *
- * @return Bitmask of ::EVENT_XI2_MASK, ::EVENT_XI1_MASK, ::EVENT_CORE_MASK, and
- * ::EVENT_DONT_PROPAGATE_MASK.
- */
-int
-EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, WindowPtr win)
-{
- int rc = 0;
- int filter = 0;
- int type;
- OtherInputMasks *inputMasks = wOtherInputMasks(win);
- xEvent ev;
-
- /* XXX: this makes me gag */
- type = GetXI2Type(event);
- ev.u.u.type = GenericEvent; /* GetEventFilter only cares about type and evtype*/
- ((xGenericEvent*)&ev)->extension = IReqCode;
- ((xGenericEvent*)&ev)->evtype = type;
- filter = GetEventFilter(dev, &ev);
- if (type && inputMasks &&
- ((inputMasks->xi2mask[XIAllDevices][type/8] & filter) ||
- ((inputMasks->xi2mask[XIAllMasterDevices][type/8] & filter) && IsMaster(dev)) ||
- (inputMasks->xi2mask[dev->id][type/8] & filter)))
- rc |= EVENT_XI2_MASK;
-
- type = GetXIType(event);
- ev.u.u.type = type;
- filter = GetEventFilter(dev, &ev);
-
- /* Check for XI mask */
- if (type && inputMasks &&
- (inputMasks->deliverableEvents[dev->id] & filter) &&
- (inputMasks->inputEvents[dev->id] & filter))
- rc |= EVENT_XI1_MASK;
-
- /* Check for XI DontPropagate mask */
- if (type && inputMasks &&
- (inputMasks->dontPropagateMask[dev->id] & filter))
- rc |= EVENT_DONT_PROPAGATE_MASK;
-
- /* Check for core mask */
- type = GetCoreType(event);
- if (type && (win->deliverableEvents & filter) &&
- ((wOtherEventMasks(win) | win->eventMask) & filter))
- rc |= EVENT_CORE_MASK;
-
- /* Check for core DontPropagate mask */
- if (type && (filter & wDontPropagateMask(win)))
- rc |= EVENT_DONT_PROPAGATE_MASK;
-
- return rc;
-}
-
-/**
- * Deliver events caused by input devices.
- *
- * For events from a non-grabbed, non-focus device, DeliverDeviceEvents is
- * called directly from the processInputProc.
- * For grabbed devices, DeliverGrabbedEvent is called first, and _may_ call
- * DeliverDeviceEvents.
- * For focused events, DeliverFocusedEvent is called first, and _may_ call
- * DeliverDeviceEvents.
- *
- * @param pWin Window to deliver event to.
- * @param event The events to deliver, not yet in wire format.
- * @param grab Possible grab on a device.
- * @param stopAt Don't recurse up to the root window.
- * @param dev The device that is responsible for the event.
- *
- * @see DeliverGrabbedEvent
- * @see DeliverFocusedEvent
- */
-int
-DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab,
- WindowPtr stopAt, DeviceIntPtr dev)
-{
- SpritePtr pSprite = dev->spriteInfo->sprite;
- Window child = None;
- Mask filter;
- int deliveries = 0;
- xEvent *xE = NULL, *core = NULL;
- int rc, mask, count = 0;
-
- CHECKEVENT(event);
-
- while (pWin)
- {
- if ((mask = EventIsDeliverable(dev, event, pWin)))
- {
- /* XI2 events first */
- if (mask & EVENT_XI2_MASK)
- {
- xEvent *xi2 = NULL;
- rc = EventToXI2(event, &xi2);
- if (rc == Success)
- {
- /* XXX: XACE */
- filter = GetEventFilter(dev, xi2);
- FixUpEventFromWindow(pSprite, xi2, pWin, child, FALSE);
- deliveries = DeliverEventsToWindow(dev, pWin, xi2, 1,
- filter, grab);
- free(xi2);
- if (deliveries > 0)
- goto unwind;
- } else if (rc != BadMatch)
- ErrorF("[dix] %s: XI2 conversion failed in DDE (%d).\n",
- dev->name, rc);
- }
-
- /* XI events */
- if (mask & EVENT_XI1_MASK)
- {
- rc = EventToXI(event, &xE, &count);
- if (rc == Success) {
- if (XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, xE, count) == Success) {
- filter = GetEventFilter(dev, xE);
- FixUpEventFromWindow(pSprite, xE, pWin, child, FALSE);
- deliveries = DeliverEventsToWindow(dev, pWin, xE, count,
- filter, grab);
- if (deliveries > 0)
- goto unwind;
- }
- } else if (rc != BadMatch)
- ErrorF("[dix] %s: XI conversion failed in DDE (%d, %d). Skipping delivery.\n",
- dev->name, event->any.type, rc);
- }
-
- /* Core event */
- if ((mask & EVENT_CORE_MASK) && IsMaster(dev) && dev->coreEvents)
- {
- rc = EventToCore(event, &core, &count);
- if (rc == Success) {
- if (XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, core, count) == Success) {
- filter = GetEventFilter(dev, core);
- FixUpEventFromWindow(pSprite, core, pWin, child, FALSE);
- deliveries = DeliverEventsToWindow(dev, pWin, core,
- count, filter, grab);
- if (deliveries > 0)
- goto unwind;
- }
- } else if (rc != BadMatch)
- ErrorF("[dix] %s: Core conversion failed in DDE (%d, %d).\n",
- dev->name, event->any.type, rc);
- }
-
- if ((deliveries < 0) || (pWin == stopAt) ||
- (mask & EVENT_DONT_PROPAGATE_MASK))
- {
- deliveries = 0;
- goto unwind;
- }
- }
-
- child = pWin->drawable.id;
- pWin = pWin->parent;
- }
-
-unwind:
- free(core);
- free(xE);
- return deliveries;
-}
-
-/**
- * Deliver event to a window and it's immediate parent. Used for most window
- * events (CreateNotify, ConfigureNotify, etc.). Not useful for events that
- * propagate up the tree or extension events
- *
- * In case of a ReparentNotify event, the event will be delivered to the
- * otherParent as well.
- *
- * @param pWin Window to deliver events to.
- * @param xE Events to deliver.
- * @param count number of events in xE.
- * @param otherParent Used for ReparentNotify events.
- */
-int
-DeliverEvents(WindowPtr pWin, xEvent *xE, int count,
- WindowPtr otherParent)
-{
- DeviceIntRec dummy;
- int deliveries;
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
- return count;
-#endif
-
- if (!count)
- return 0;
-
- dummy.id = XIAllDevices;
-
- switch (xE->u.u.type)
- {
- case DestroyNotify:
- case UnmapNotify:
- case MapNotify:
- case MapRequest:
- case ReparentNotify:
- case ConfigureNotify:
- case ConfigureRequest:
- case GravityNotify:
- case CirculateNotify:
- case CirculateRequest:
- xE->u.destroyNotify.event = pWin->drawable.id;
- break;
- }
-
- switch (xE->u.u.type)
- {
- case DestroyNotify:
- case UnmapNotify:
- case MapNotify:
- case ReparentNotify:
- case ConfigureNotify:
- case GravityNotify:
- case CirculateNotify:
- break;
- default:
- {
- Mask filter;
- filter = GetEventFilter(&dummy, xE);
- return DeliverEventsToWindow(&dummy, pWin, xE, count, filter,
- NullGrab);
- }
- }
-
- deliveries = DeliverEventsToWindow(&dummy, pWin, xE, count,
- StructureNotifyMask, NullGrab);
- if (pWin->parent)
- {
- xE->u.destroyNotify.event = pWin->parent->drawable.id;
- deliveries += DeliverEventsToWindow(&dummy, pWin->parent, xE, count,
- SubstructureNotifyMask, NullGrab);
- if (xE->u.u.type == ReparentNotify)
- {
- xE->u.destroyNotify.event = otherParent->drawable.id;
- deliveries += DeliverEventsToWindow(&dummy,
- otherParent, xE, count, SubstructureNotifyMask,
- NullGrab);
- }
- }
- return deliveries;
-}
-
-
-static Bool
-PointInBorderSize(WindowPtr pWin, int x, int y)
-{
- BoxRec box;
-
- if(RegionContainsPoint(&pWin->borderSize, x, y, &box))
- return TRUE;
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension &&
- XineramaSetWindowPntrs(inputInfo.pointer, pWin)) {
- SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite;
- int i;
-
- for(i = 1; i < PanoramiXNumScreens; i++) {
- if(RegionContainsPoint(&pSprite->windows[i]->borderSize,
- x + screenInfo.screens[0]->x - screenInfo.screens[i]->x,
- y + screenInfo.screens[0]->y - screenInfo.screens[i]->y,
- &box))
- return TRUE;
- }
- }
-#endif
- return FALSE;
-}
-
-/**
- * Traversed from the root window to the window at the position x/y. While
- * traversing, it sets up the traversal history in the spriteTrace array.
- * After completing, the spriteTrace history is set in the following way:
- * spriteTrace[0] ... root window
- * spriteTrace[1] ... top level window that encloses x/y
- * ...
- * spriteTrace[spriteTraceGood - 1] ... window at x/y
- *
- * @returns the window at the given coordinates.
- */
-WindowPtr
-XYToWindow(SpritePtr pSprite, int x, int y)
-{
- WindowPtr pWin;
- BoxRec box;
-
- pSprite->spriteTraceGood = 1; /* root window still there */
- pWin = RootWindow(pSprite)->firstChild;
- while (pWin)
- {
- if ((pWin->mapped) &&
- (x >= pWin->drawable.x - wBorderWidth (pWin)) &&
- (x < pWin->drawable.x + (int)pWin->drawable.width +
- wBorderWidth(pWin)) &&
- (y >= pWin->drawable.y - wBorderWidth (pWin)) &&
- (y < pWin->drawable.y + (int)pWin->drawable.height +
- wBorderWidth (pWin))
- /* When a window is shaped, a further check
- * is made to see if the point is inside
- * borderSize
- */
- && (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
- && (!wInputShape(pWin) ||
- RegionContainsPoint(wInputShape(pWin),
- x - pWin->drawable.x,
- y - pWin->drawable.y, &box))
-#ifdef ROOTLESS
- /* In rootless mode windows may be offscreen, even when
- * they're in X's stack. (E.g. if the native window system
- * implements some form of virtual desktop system).
- */
- && !pWin->rootlessUnhittable
-#endif
- )
- {
- if (pSprite->spriteTraceGood >= pSprite->spriteTraceSize)
- {
- pSprite->spriteTraceSize += 10;
- pSprite->spriteTrace = realloc(pSprite->spriteTrace,
- pSprite->spriteTraceSize*sizeof(WindowPtr));
- }
- pSprite->spriteTrace[pSprite->spriteTraceGood++] = pWin;
- pWin = pWin->firstChild;
- }
- else
- pWin = pWin->nextSib;
- }
- return pSprite->spriteTrace[pSprite->spriteTraceGood-1];
-}
-
-/**
- * Ungrab a currently FocusIn grabbed device and grab the device on the
- * given window. If the win given is the NoneWin, the device is ungrabbed if
- * applicable and FALSE is returned.
- *
- * @returns TRUE if the device has been grabbed, or FALSE otherwise.
- */
-BOOL
-ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win)
-{
- BOOL rc = FALSE;
- DeviceEvent event;
-
- if (dev->deviceGrab.grab)
- {
- if (!dev->deviceGrab.fromPassiveGrab ||
- dev->deviceGrab.grab->type != XI_Enter ||
- dev->deviceGrab.grab->window == win ||
- IsParent(dev->deviceGrab.grab->window, win))
- return FALSE;
- DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab);
- (*dev->deviceGrab.DeactivateGrab)(dev);
- }
-
- if (win == NoneWin || win == PointerRootWin)
- return FALSE;
-
- memset(&event, 0, sizeof(DeviceEvent));
- event.header = ET_Internal;
- event.type = ET_FocusIn;
- event.length = sizeof(DeviceEvent);
- event.time = GetTimeInMillis();
- event.deviceid = dev->id;
- event.sourceid = dev->id;
- event.detail.button = 0;
- rc = (CheckPassiveGrabsOnWindow(win, dev, &event, FALSE, TRUE) != NULL);
- if (rc)
- DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab);
- return rc;
-}
-
-/**
- * Ungrab a currently Enter grabbed device and grab the device for the given
- * window.
- *
- * @returns TRUE if the device has been grabbed, or FALSE otherwise.
- */
-static BOOL
-ActivateEnterGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win)
-{
- BOOL rc = FALSE;
- DeviceEvent event;
-
- if (dev->deviceGrab.grab)
- {
- if (!dev->deviceGrab.fromPassiveGrab ||
- dev->deviceGrab.grab->type != XI_Enter ||
- dev->deviceGrab.grab->window == win ||
- IsParent(dev->deviceGrab.grab->window, win))
- return FALSE;
- DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab);
- (*dev->deviceGrab.DeactivateGrab)(dev);
- }
-
- memset(&event, 0, sizeof(DeviceEvent));
- event.header = ET_Internal;
- event.type = ET_Enter;
- event.length = sizeof(DeviceEvent);
- event.time = GetTimeInMillis();
- event.deviceid = dev->id;
- event.sourceid = dev->id;
- event.detail.button = 0;
- rc = (CheckPassiveGrabsOnWindow(win, dev, &event, FALSE, TRUE) != NULL);
- if (rc)
- DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveGrab);
- return rc;
-}
-
-/**
- * Update the sprite coordinates based on the event. Update the cursor
- * position, then update the event with the new coordinates that may have been
- * changed. If the window underneath the sprite has changed, change to new
- * cursor and send enter/leave events.
- *
- * CheckMotion() will not do anything and return FALSE if the event is not a
- * pointer event.
- *
- * @return TRUE if the sprite has moved or FALSE otherwise.
- */
-Bool
-CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
-{
- WindowPtr prevSpriteWin, newSpriteWin;
- SpritePtr pSprite = pDev->spriteInfo->sprite;
-
- CHECKEVENT(ev);
-
- prevSpriteWin = pSprite->win;
-
- if (ev && !syncEvents.playingEvents)
- {
- /* GetPointerEvents() guarantees that pointer events have the correct
- rootX/Y set already. */
- switch (ev->type)
- {
- case ET_ButtonPress:
- case ET_ButtonRelease:
- case ET_Motion:
- break;
- default:
- /* all other events return FALSE */
- return FALSE;
- }
-
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension)
- {
- /* Motion events entering DIX get translated to Screen 0
- coordinates. Replayed events have already been
- translated since they've entered DIX before */
- ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
- ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
- } else
-#endif
- {
- if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen)
- {
- pSprite->hot.pScreen = pSprite->hotPhys.pScreen;
- RootWindow(pDev->spriteInfo->sprite) =
- pSprite->hot.pScreen->root;
- }
- }
-
- pSprite->hot.x = ev->root_x;
- pSprite->hot.y = ev->root_y;
- if (pSprite->hot.x < pSprite->physLimits.x1)
- pSprite->hot.x = pSprite->physLimits.x1;
- else if (pSprite->hot.x >= pSprite->physLimits.x2)
- pSprite->hot.x = pSprite->physLimits.x2 - 1;
- if (pSprite->hot.y < pSprite->physLimits.y1)
- pSprite->hot.y = pSprite->physLimits.y1;
- else if (pSprite->hot.y >= pSprite->physLimits.y2)
- pSprite->hot.y = pSprite->physLimits.y2 - 1;
- if (pSprite->hotShape)
- ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y);
- pSprite->hotPhys = pSprite->hot;
-
- if ((pSprite->hotPhys.x != ev->root_x) ||
- (pSprite->hotPhys.y != ev->root_y))
- {
-#ifdef PANORAMIX
- if (!noPanoramiXExtension)
- {
- XineramaSetCursorPosition(
- pDev, pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE);
- } else
-#endif
- {
- (*pSprite->hotPhys.pScreen->SetCursorPosition)(
- pDev, pSprite->hotPhys.pScreen,
- pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE);
- }
- }
-
- ev->root_x = pSprite->hot.x;
- ev->root_y = pSprite->hot.y;
- }
-
- newSpriteWin = XYToWindow(pSprite, pSprite->hot.x, pSprite->hot.y);
-
- if (newSpriteWin != prevSpriteWin)
- {
- int sourceid;
- if (!ev) {
- UpdateCurrentTimeIf();
- sourceid = pDev->id; /* when from WindowsRestructured */
- } else
- sourceid = ev->sourceid;
-
- if (prevSpriteWin != NullWindow) {
- if (!ActivateEnterGrab(pDev, prevSpriteWin, newSpriteWin))
- DoEnterLeaveEvents(pDev, sourceid, prevSpriteWin,
- newSpriteWin, NotifyNormal);
- }
- /* set pSprite->win after ActivateEnterGrab, otherwise
- sprite window == grab_window and no enter/leave events are
- sent. */
- pSprite->win = newSpriteWin;
- PostNewCursor(pDev);
- return FALSE;
- }
- return TRUE;
-}
-
-/**
- * Windows have restructured, we need to update the sprite position and the
- * sprite's cursor.
- */
-void
-WindowsRestructured(void)
-{
- DeviceIntPtr pDev = inputInfo.devices;
- while(pDev)
- {
- if (IsMaster(pDev) || IsFloating(pDev))
- CheckMotion(NULL, pDev);
- pDev = pDev->next;
- }
-}
-
-#ifdef PANORAMIX
-/* This was added to support reconfiguration under Xdmx. The problem is
- * that if the 0th screen (i.e., screenInfo.screens[0]) is moved to an origin
- * other than 0,0, the information in the private sprite structure must
- * be updated accordingly, or XYToWindow (and other routines) will not
- * compute correctly. */
-void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
-{
- GrabPtr grab;
- DeviceIntPtr pDev;
- SpritePtr pSprite;
-
- if (noPanoramiXExtension) return;
-
- pDev = inputInfo.devices;
- while(pDev)
- {
- if (DevHasCursor(pDev))
- {
- pSprite = pDev->spriteInfo->sprite;
- pSprite->hot.x -= xoff;
- pSprite->hot.y -= yoff;
-
- pSprite->hotPhys.x -= xoff;
- pSprite->hotPhys.y -= yoff;
-
- pSprite->hotLimits.x1 -= xoff;
- pSprite->hotLimits.y1 -= yoff;
- pSprite->hotLimits.x2 -= xoff;
- pSprite->hotLimits.y2 -= yoff;
-
- if (RegionNotEmpty(&pSprite->Reg1))
- RegionTranslate(&pSprite->Reg1, xoff, yoff);
- if (RegionNotEmpty(&pSprite->Reg2))
- RegionTranslate(&pSprite->Reg2, xoff, yoff);
-
- /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */
- if ((grab = pDev->deviceGrab.grab) && grab->confineTo) {
- if (grab->confineTo->drawable.pScreen
- != pSprite->hotPhys.pScreen)
- pSprite->hotPhys.x = pSprite->hotPhys.y = 0;
- ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE);
- } else
- ConfineCursorToWindow(
- pDev,
- pSprite->hotPhys.pScreen->root,
- TRUE, FALSE);
-
- }
- pDev = pDev->next;
- }
-}
-#endif
-
-/**
- * Initialize a sprite for the given device and set it to some sane values. If
- * the device already has a sprite alloc'd, don't realloc but just reset to
- * default values.
- * If a window is supplied, the sprite will be initialized with the window's
- * cursor and positioned in the center of the window's screen. The root window
- * is a good choice to pass in here.
- *
- * It's a good idea to call it only for pointer devices, unless you have a
- * really talented keyboard.
- *
- * @param pDev The device to initialize.
- * @param pWin The window where to generate the sprite in.
- *
- */
-void
-InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin)
-{
- SpritePtr pSprite;
- ScreenPtr pScreen;
- CursorPtr pCursor;
-
- if (!pDev->spriteInfo->sprite)
- {
- DeviceIntPtr it;
-
- pDev->spriteInfo->sprite = (SpritePtr)calloc(1, sizeof(SpriteRec));
- if (!pDev->spriteInfo->sprite)
- FatalError("InitializeSprite: failed to allocate sprite struct");
-
- /* We may have paired another device with this device before our
- * device had a actual sprite. We need to check for this and reset the
- * sprite field for all paired devices.
- *
- * The VCK is always paired with the VCP before the VCP has a sprite.
- */
- for (it = inputInfo.devices; it; it = it->next)
- {
- if (it->spriteInfo->paired == pDev)
- it->spriteInfo->sprite = pDev->spriteInfo->sprite;
- }
- if (inputInfo.keyboard->spriteInfo->paired == pDev)
- inputInfo.keyboard->spriteInfo->sprite = pDev->spriteInfo->sprite;
- }
-
- pSprite = pDev->spriteInfo->sprite;
- pDev->spriteInfo->spriteOwner = TRUE;
-
- pScreen = (pWin) ? pWin->drawable.pScreen : (ScreenPtr)NULL;
- pSprite->hot.pScreen = pScreen;
- pSprite->hotPhys.pScreen = pScreen;
- if (pScreen)
- {
- pSprite->hotPhys.x = pScreen->width / 2;
- pSprite->hotPhys.y = pScreen->height / 2;
- pSprite->hotLimits.x2 = pScreen->width;
- pSprite->hotLimits.y2 = pScreen->height;
- }
-
- pSprite->hot = pSprite->hotPhys;
- pSprite->win = pWin;
-
- if (pWin)
- {
- pCursor = wCursor(pWin);
- pSprite->spriteTrace = (WindowPtr *)calloc(1, 32*sizeof(WindowPtr));
- if (!pSprite->spriteTrace)
- FatalError("Failed to allocate spriteTrace");
- pSprite->spriteTraceSize = 32;
-
- RootWindow(pDev->spriteInfo->sprite) = pWin;
- pSprite->spriteTraceGood = 1;
-
- pSprite->pEnqueueScreen = pScreen;
- pSprite->pDequeueScreen = pSprite->pEnqueueScreen;
-
- } else {
- pCursor = NullCursor;
- pSprite->spriteTrace = NULL;
- pSprite->spriteTraceSize = 0;
- pSprite->spriteTraceGood = 0;
- pSprite->pEnqueueScreen = screenInfo.screens[0];
- pSprite->pDequeueScreen = pSprite->pEnqueueScreen;
- }
- if (pCursor)
- pCursor->refcnt++;
- if (pSprite->current)
- FreeCursor(pSprite->current, None);
- pSprite->current = pCursor;
-
- if (pScreen)
- {
- (*pScreen->RealizeCursor) ( pDev, pScreen, pSprite->current);
- (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current,
- &pSprite->hotLimits, &pSprite->physLimits);
- pSprite->confined = FALSE;
-
- (*pScreen->ConstrainCursor) (pDev, pScreen,
- &pSprite->physLimits);
- (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x,
- pSprite->hot.y,
- FALSE);
- (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current);
- }
-#ifdef PANORAMIX
- if(!noPanoramiXExtension) {
- pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
- pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
- pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
- pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
- pSprite->physLimits = pSprite->hotLimits;
- pSprite->confineWin = NullWindow;
- pSprite->hotShape = NullRegion;
- pSprite->screen = pScreen;
- /* gotta UNINIT these someplace */
- RegionNull(&pSprite->Reg1);
- RegionNull(&pSprite->Reg2);
- }
-#endif
-}
-
-/**
- * Update the mouse sprite info when the server switches from a pScreen to another.
- * Otherwise, the pScreen of the mouse sprite is never updated when we switch
- * from a pScreen to another. Never updating the pScreen of the mouse sprite
- * implies that windows that are in pScreen whose pScreen->myNum >0 will never
- * get pointer events. This is because in CheckMotion(), sprite.hotPhys.pScreen
- * always points to the first pScreen it has been set by
- * DefineInitialRootWindow().
- *
- * Calling this function is useful for use cases where the server
- * has more than one pScreen.
- * This function is similar to DefineInitialRootWindow() but it does not
- * reset the mouse pointer position.
- * @param win must be the new pScreen we are switching to.
- */
-void
-UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen)
-{
- SpritePtr pSprite = NULL;
- WindowPtr win = NULL;
- CursorPtr pCursor;
- if (!pScreen)
- return ;
-
- if (!pDev->spriteInfo->sprite)
- return;
-
- pSprite = pDev->spriteInfo->sprite;
-
- win = pScreen->root;
-
- pSprite->hotPhys.pScreen = pScreen;
- pSprite->hot = pSprite->hotPhys;
- pSprite->hotLimits.x2 = pScreen->width;
- pSprite->hotLimits.y2 = pScreen->height;
- pSprite->win = win;
- pCursor = wCursor(win);
- if (pCursor)
- pCursor->refcnt++;
- if (pSprite->current)
- FreeCursor(pSprite->current, 0);
- pSprite->current = pCursor;
- pSprite->spriteTraceGood = 1;
- pSprite->spriteTrace[0] = win;
- (*pScreen->CursorLimits) (pDev,
- pScreen,
- pSprite->current,
- &pSprite->hotLimits,
- &pSprite->physLimits);
- pSprite->confined = FALSE;
- (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits);
- (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current);
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension) {
- pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
- pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
- pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
- pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
- pSprite->physLimits = pSprite->hotLimits;
- pSprite->screen = pScreen;
- }
-#endif
-}
-
-/*
- * This does not take any shortcuts, and even ignores its argument, since
- * it does not happen very often, and one has to walk up the tree since
- * this might be a newly instantiated cursor for an intermediate window
- * between the one the pointer is in and the one that the last cursor was
- * instantiated from.
- */
-void
-WindowHasNewCursor(WindowPtr pWin)
-{
- DeviceIntPtr pDev;
-
- for(pDev = inputInfo.devices; pDev; pDev = pDev->next)
- if (DevHasCursor(pDev))
- PostNewCursor(pDev);
-}
-
-void
-NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
-{
- SpritePtr pSprite = pDev->spriteInfo->sprite;
-
- pSprite->hotPhys.x = x;
- pSprite->hotPhys.y = y;
-#ifdef PANORAMIX
- if(!noPanoramiXExtension) {
- pSprite->hotPhys.x += newScreen->x - screenInfo.screens[0]->x;
- pSprite->hotPhys.y += newScreen->y - screenInfo.screens[0]->y;
- if (newScreen != pSprite->screen) {
- pSprite->screen = newScreen;
- /* Make sure we tell the DDX to update its copy of the screen */
- if(pSprite->confineWin)
- XineramaConfineCursorToWindow(pDev,
- pSprite->confineWin, TRUE);
- else
- XineramaConfineCursorToWindow(pDev, screenInfo.screens[0]->root, TRUE);
- /* if the pointer wasn't confined, the DDX won't get
- told of the pointer warp so we reposition it here */
- if(!syncEvents.playingEvents)
- (*pSprite->screen->SetCursorPosition)(
- pDev,
- pSprite->screen,
- pSprite->hotPhys.x + screenInfo.screens[0]->x -
- pSprite->screen->x,
- pSprite->hotPhys.y + screenInfo.screens[0]->y -
- pSprite->screen->y, FALSE);
- }
- } else
-#endif
- if (newScreen != pSprite->hotPhys.pScreen)
- ConfineCursorToWindow(pDev, newScreen->root, TRUE, FALSE);
-}
-
-#ifdef PANORAMIX
-
-static Bool
-XineramaPointInWindowIsVisible(
- WindowPtr pWin,
- int x,
- int y
-)
-{
- BoxRec box;
- int i, xoff, yoff;
-
- if (!pWin->realized) return FALSE;
-
- if (RegionContainsPoint(&pWin->borderClip, x, y, &box))
- return TRUE;
-
- if(!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) return FALSE;
-
- xoff = x + screenInfo.screens[0]->x;
- yoff = y + screenInfo.screens[0]->y;
-
- for(i = 1; i < PanoramiXNumScreens; i++) {
- pWin = inputInfo.pointer->spriteInfo->sprite->windows[i];
- x = xoff - screenInfo.screens[i]->x;
- y = yoff - screenInfo.screens[i]->y;
-
- if(RegionContainsPoint(&pWin->borderClip, x, y, &box)
- && (!wInputShape(pWin) ||
- RegionContainsPoint(wInputShape(pWin),
- x - pWin->drawable.x,
- y - pWin->drawable.y, &box)))
- return TRUE;
-
- }
-
- return FALSE;
-}
-
-static int
-XineramaWarpPointer(ClientPtr client)
-{
- WindowPtr dest = NULL;
- int x, y, rc;
- SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite;
-
- REQUEST(xWarpPointerReq);
-
-
- if (stuff->dstWid != None) {
- rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess);
- if (rc != Success)
- return rc;
- }
- x = pSprite->hotPhys.x;
- y = pSprite->hotPhys.y;
-
- if (stuff->srcWid != None)
- {
- int winX, winY;
- XID winID = stuff->srcWid;
- WindowPtr source;
-
- rc = dixLookupWindow(&source, winID, client, DixReadAccess);
- if (rc != Success)
- return rc;
-
- winX = source->drawable.x;
- winY = source->drawable.y;
- if(source == screenInfo.screens[0]->root) {
- winX -= screenInfo.screens[0]->x;
- winY -= screenInfo.screens[0]->y;
- }
- if (x < winX + stuff->srcX ||
- y < winY + stuff->srcY ||
- (stuff->srcWidth != 0 &&
- winX + stuff->srcX + (int)stuff->srcWidth < x) ||
- (stuff->srcHeight != 0 &&
- winY + stuff->srcY + (int)stuff->srcHeight < y) ||
- !XineramaPointInWindowIsVisible(source, x, y))
- return Success;
- }
- if (dest) {
- x = dest->drawable.x;
- y = dest->drawable.y;
- if(dest == screenInfo.screens[0]->root) {
- x -= screenInfo.screens[0]->x;
- y -= screenInfo.screens[0]->y;
- }
- }
-
- x += stuff->dstX;
- y += stuff->dstY;
-
- if (x < pSprite->physLimits.x1)
- x = pSprite->physLimits.x1;
- else if (x >= pSprite->physLimits.x2)
- x = pSprite->physLimits.x2 - 1;
- if (y < pSprite->physLimits.y1)
- y = pSprite->physLimits.y1;
- else if (y >= pSprite->physLimits.y2)
- y = pSprite->physLimits.y2 - 1;
- if (pSprite->hotShape)
- ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y);
-
- XineramaSetCursorPosition(PickPointer(client), x, y, TRUE);
-
- return Success;
-}
-
-#endif
-
-
-/**
- * Server-side protocol handling for WarpPointer request.
- * Warps the cursor position to the coordinates given in the request.
- */
-int
-ProcWarpPointer(ClientPtr client)
-{
- WindowPtr dest = NULL;
- int x, y, rc;
- ScreenPtr newScreen;
- DeviceIntPtr dev, tmp;
- SpritePtr pSprite;
-
- REQUEST(xWarpPointerReq);
- REQUEST_SIZE_MATCH(xWarpPointerReq);
-
- dev = PickPointer(client);
-
- for (tmp = inputInfo.devices; tmp; tmp = tmp->next) {
- if (GetMaster(tmp, MASTER_ATTACHED) == dev) {
- rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixWriteAccess);
- if (rc != Success)
- return rc;
- }
- }
-
- if (dev->lastSlave)
- dev = dev->lastSlave;
- pSprite = dev->spriteInfo->sprite;
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension)
- return XineramaWarpPointer(client);
-#endif
-
- if (stuff->dstWid != None) {
- rc = dixLookupWindow(&dest, stuff->dstWid, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
- }
- x = pSprite->hotPhys.x;
- y = pSprite->hotPhys.y;
-
- if (stuff->srcWid != None)
- {
- int winX, winY;
- XID winID = stuff->srcWid;
- WindowPtr source;
-
- rc = dixLookupWindow(&source, winID, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- winX = source->drawable.x;
- winY = source->drawable.y;
- if (source->drawable.pScreen != pSprite->hotPhys.pScreen ||
- x < winX + stuff->srcX ||
- y < winY + stuff->srcY ||
- (stuff->srcWidth != 0 &&
- winX + stuff->srcX + (int)stuff->srcWidth < x) ||
- (stuff->srcHeight != 0 &&
- winY + stuff->srcY + (int)stuff->srcHeight < y) ||
- !PointInWindowIsVisible(source, x, y))
- return Success;
- }
- if (dest)
- {
- x = dest->drawable.x;
- y = dest->drawable.y;
- newScreen = dest->drawable.pScreen;
- } else
- newScreen = pSprite->hotPhys.pScreen;
-
- x += stuff->dstX;
- y += stuff->dstY;
-
- if (x < 0)
- x = 0;
- else if (x >= newScreen->width)
- x = newScreen->width - 1;
- if (y < 0)
- y = 0;
- else if (y >= newScreen->height)
- y = newScreen->height - 1;
-
- if (newScreen == pSprite->hotPhys.pScreen)
- {
- if (x < pSprite->physLimits.x1)
- x = pSprite->physLimits.x1;
- else if (x >= pSprite->physLimits.x2)
- x = pSprite->physLimits.x2 - 1;
- if (y < pSprite->physLimits.y1)
- y = pSprite->physLimits.y1;
- else if (y >= pSprite->physLimits.y2)
- y = pSprite->physLimits.y2 - 1;
- if (pSprite->hotShape)
- ConfineToShape(dev, pSprite->hotShape, &x, &y);
- (*newScreen->SetCursorPosition)(dev, newScreen, x, y, TRUE);
- }
- else if (!PointerConfinedToScreen(dev))
- {
- NewCurrentScreen(dev, newScreen, x, y);
- }
- return Success;
-}
-
-static Bool
-BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin)
-{
- if(RegionNotEmpty(&pWin->borderSize))
- return TRUE;
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension && XineramaSetWindowPntrs(pDev, pWin)) {
- int i;
-
- for(i = 1; i < PanoramiXNumScreens; i++) {
- if(RegionNotEmpty(&pDev->spriteInfo->sprite->windows[i]->borderSize))
- return TRUE;
- }
- }
-#endif
- return FALSE;
-}
-
-/**
- * "CheckPassiveGrabsOnWindow" checks to see if the event passed in causes a
- * passive grab set on the window to be activated.
- * If activate is true and a passive grab is found, it will be activated,
- * and the event will be delivered to the client.
- *
- * @param pWin The window that may be subject to a passive grab.
- * @param device Device that caused the event.
- * @param event The current device event.
- * @param checkCore Check for core grabs too.
- * @param activate If a grab is found, activate it and deliver the event.
- */
-
-GrabPtr
-CheckPassiveGrabsOnWindow(
- WindowPtr pWin,
- DeviceIntPtr device,
- DeviceEvent *event,
- BOOL checkCore,
- BOOL activate)
-{
- SpritePtr pSprite = device->spriteInfo->sprite;
- GrabPtr grab = wPassiveGrabs(pWin);
- GrabRec tempGrab;
- GrabInfoPtr grabinfo;
-#define CORE_MATCH 0x1
-#define XI_MATCH 0x2
-#define XI2_MATCH 0x4
- int match = 0;
-
- if (!grab)
- return NULL;
- /* Fill out the grab details, but leave the type for later before
- * comparing */
- tempGrab.window = pWin;
- tempGrab.device = device;
- tempGrab.detail.exact = event->detail.key;
- tempGrab.detail.pMask = NULL;
- tempGrab.modifiersDetail.pMask = NULL;
- tempGrab.next = NULL;
- for (; grab; grab = grab->next)
- {
- DeviceIntPtr gdev;
- XkbSrvInfoPtr xkbi = NULL;
-
- gdev= grab->modifierDevice;
- if (grab->grabtype == GRABTYPE_CORE)
- {
- if (IsPointerDevice(device))
- gdev = GetPairedDevice(device);
- else
- gdev = device;
- } else if (grab->grabtype == GRABTYPE_XI2)
- {
- /* if the device is an attached slave device, gdev must be the
- * attached master keyboard. Since the slave may have been
- * reattached after the grab, the modifier device may not be the
- * same. */
- if (!IsMaster(grab->device) && !IsFloating(device))
- gdev = GetMaster(device, MASTER_KEYBOARD);
- }
-
-
- if (gdev && gdev->key)
- xkbi= gdev->key->xkbInfo;
- tempGrab.modifierDevice = grab->modifierDevice;
- tempGrab.modifiersDetail.exact = xkbi ? xkbi->state.grab_mods : 0;
-
- /* Check for XI2 and XI grabs first */
- tempGrab.type = GetXI2Type((InternalEvent*)event);
- tempGrab.grabtype = GRABTYPE_XI2;
- if (GrabMatchesSecond(&tempGrab, grab, FALSE))
- match = XI2_MATCH;
-
- tempGrab.detail.exact = event->detail.key;
- if (!match)
- {
- tempGrab.grabtype = GRABTYPE_XI;
- if ((tempGrab.type = GetXIType((InternalEvent*)event)) &&
- (GrabMatchesSecond(&tempGrab, grab, FALSE)))
- match = XI_MATCH;
- }
-
- /* Check for a core grab (ignore the device when comparing) */
- if (!match && checkCore)
- {
- tempGrab.grabtype = GRABTYPE_CORE;
- if ((tempGrab.type = GetCoreType((InternalEvent*)event)) &&
- (GrabMatchesSecond(&tempGrab, grab, TRUE)))
- match = CORE_MATCH;
- }
-
- if (match && (!grab->confineTo ||
- (grab->confineTo->realized &&
- BorderSizeNotEmpty(device, grab->confineTo))))
- {
- int rc, count = 0;
- xEvent *xE = NULL;
-
- event->corestate &= 0x1f00;
- event->corestate |= tempGrab.modifiersDetail.exact & (~0x1f00);
- grabinfo = &device->deviceGrab;
- /* In some cases a passive core grab may exist, but the client
- * already has a core grab on some other device. In this case we
- * must not get the grab, otherwise we may never ungrab the
- * device.
- */
-
- if (grab->grabtype == GRABTYPE_CORE)
- {
- DeviceIntPtr other;
- BOOL interfering = FALSE;
-
- /* A passive grab may have been created for a different device
- than it is assigned to at this point in time.
- Update the grab's device and modifier device to reflect the
- current state.
- Since XGrabDeviceButton requires to specify the
- modifierDevice explicitly, we don't override this choice.
- */
- if (tempGrab.type < GenericEvent)
- {
- grab->device = device;
- grab->modifierDevice = GetPairedDevice(device);
- }
-
- for (other = inputInfo.devices; other; other = other->next)
- {
- GrabPtr othergrab = other->deviceGrab.grab;
- if (othergrab && othergrab->grabtype == GRABTYPE_CORE &&
- SameClient(grab, rClient(othergrab)) &&
- ((IsPointerDevice(grab->device) &&
- IsPointerDevice(othergrab->device)) ||
- (IsKeyboardDevice(grab->device) &&
- IsKeyboardDevice(othergrab->device))))
- {
- interfering = TRUE;
- break;
- }
- }
- if (interfering)
- continue;
- }
-
- if (!activate)
- return grab;
-
- if (match & CORE_MATCH)
- {
- rc = EventToCore((InternalEvent*)event, &xE, &count);
- if (rc != Success)
- {
- if (rc != BadMatch)
- ErrorF("[dix] %s: core conversion failed in CPGFW "
- "(%d, %d).\n", device->name, event->type, rc);
- continue;
- }
- } else if (match & XI2_MATCH)
- {
- rc = EventToXI2((InternalEvent*)event, &xE);
- if (rc != Success)
- {
- if (rc != BadMatch)
- ErrorF("[dix] %s: XI2 conversion failed in CPGFW "
- "(%d, %d).\n", device->name, event->type, rc);
- continue;
- }
- count = 1;
- } else
- {
- rc = EventToXI((InternalEvent*)event, &xE, &count);
- if (rc != Success)
- {
- if (rc != BadMatch)
- ErrorF("[dix] %s: XI conversion failed in CPGFW "
- "(%d, %d).\n", device->name, event->type, rc);
- continue;
- }
- }
-
- (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
-
- if (xE)
- {
- FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE);
-
- /* XXX: XACE? */
- TryClientEvents(rClient(grab), device, xE, count,
- GetEventFilter(device, xE),
- GetEventFilter(device, xE), grab);
- }
-
- if (grabinfo->sync.state == FROZEN_NO_EVENT)
- {
- if (!grabinfo->sync.event)
- grabinfo->sync.event = calloc(1, sizeof(InternalEvent));
- *grabinfo->sync.event = *event;
- grabinfo->sync.state = FROZEN_WITH_EVENT;
- }
-
- free(xE);
- return grab;
- }
- }
- return NULL;
-#undef CORE_MATCH
-#undef XI_MATCH
-#undef XI2_MATCH
-}
-
-/**
- * CheckDeviceGrabs handles both keyboard and pointer events that may cause
- * a passive grab to be activated.
- *
- * If the event is a keyboard event, the ancestors of the focus window are
- * traced down and tried to see if they have any passive grabs to be
- * activated. If the focus window itself is reached and it's descendants
- * contain the pointer, the ancestors of the window that the pointer is in
- * are then traced down starting at the focus window, otherwise no grabs are
- * activated.
- * If the event is a pointer event, the ancestors of the window that the
- * pointer is in are traced down starting at the root until CheckPassiveGrabs
- * causes a passive grab to activate or all the windows are
- * tried. PRH
- *
- * If a grab is activated, the event has been sent to the client already!
- *
- * The event we pass in must always be an XI event. From this, we then emulate
- * the core event and then check for grabs.
- *
- * @param device The device that caused the event.
- * @param xE The event to handle (Device{Button|Key}Press).
- * @param count Number of events in list.
- * @return TRUE if a grab has been activated or false otherwise.
-*/
-
-Bool
-CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, WindowPtr ancestor)
-{
- int i;
- WindowPtr pWin = NULL;
- FocusClassPtr focus = IsPointerEvent((InternalEvent*)event) ? NULL : device->focus;
- BOOL sendCore = (IsMaster(device) && device->coreEvents);
- Bool ret = FALSE;
-
- if (event->type != ET_ButtonPress &&
- event->type != ET_KeyPress)
- return FALSE;
-
- if (event->type == ET_ButtonPress
- && (device->button->buttonsDown != 1))
- return FALSE;
-
- if (device->deviceGrab.grab)
- return FALSE;
-
- i = 0;
- if (ancestor)
- {
- while (i < device->spriteInfo->sprite->spriteTraceGood)
- if (device->spriteInfo->sprite->spriteTrace[i++] == ancestor)
- break;
- if (i == device->spriteInfo->sprite->spriteTraceGood)
- goto out;
- }
-
- if (focus)
- {
- for (; i < focus->traceGood; i++)
- {
- pWin = focus->trace[i];
- if (CheckPassiveGrabsOnWindow(pWin, device, event, sendCore, TRUE))
- {
- ret = TRUE;
- goto out;
- }
- }
-
- if ((focus->win == NoneWin) ||
- (i >= device->spriteInfo->sprite->spriteTraceGood) ||
- (pWin && pWin != device->spriteInfo->sprite->spriteTrace[i-1]))
- goto out;
- }
-
- for (; i < device->spriteInfo->sprite->spriteTraceGood; i++)
- {
- pWin = device->spriteInfo->sprite->spriteTrace[i];
- if (CheckPassiveGrabsOnWindow(pWin, device, event, sendCore, TRUE))
- {
- ret = TRUE;
- goto out;
- }
- }
-
-out:
- if (ret == TRUE && event->type == ET_KeyPress)
- device->deviceGrab.activatingKey = event->detail.key;
- return ret;
-}
-
-/**
- * Called for keyboard events to deliver event to whatever client owns the
- * focus.
- *
- * The event is delivered to the keyboard's focus window, the root window or
- * to the window owning the input focus.
- *
- * @param keybd The keyboard originating the event.
- * @param event The event, not yet in wire format.
- * @param window Window underneath the sprite.
- */
-void
-DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window)
-{
- DeviceIntPtr ptr;
- WindowPtr focus = keybd->focus->win;
- BOOL sendCore = (IsMaster(keybd) && keybd->coreEvents);
- xEvent *core = NULL, *xE = NULL, *xi2 = NULL;
- int count, rc;
- int deliveries = 0;
-
- if (focus == FollowKeyboardWin)
- focus = inputInfo.keyboard->focus->win;
- if (!focus)
- return;
- if (focus == PointerRootWin)
- {
- DeliverDeviceEvents(window, event, NullGrab, NullWindow, keybd);
- return;
- }
- if ((focus == window) || IsParent(focus, window))
- {
- if (DeliverDeviceEvents(window, event, NullGrab, focus, keybd))
- return;
- }
-
- /* just deliver it to the focus window */
- ptr = GetPairedDevice(keybd);
-
-
- rc = EventToXI2(event, &xi2);
- if (rc == Success)
- {
- /* XXX: XACE */
- int filter = GetEventFilter(keybd, xi2);
- FixUpEventFromWindow(ptr->spriteInfo->sprite, xi2, focus, None, FALSE);
- deliveries = DeliverEventsToWindow(keybd, focus, xi2, 1,
- filter, NullGrab);
- if (deliveries > 0)
- goto unwind;
- } else if (rc != BadMatch)
- ErrorF("[dix] %s: XI2 conversion failed in DFE (%d, %d). Skipping delivery.\n",
- keybd->name, event->any.type, rc);
-
- rc = EventToXI(event, &xE, &count);
- if (rc == Success &&
- XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, xE, count) == Success)
- {
- FixUpEventFromWindow(ptr->spriteInfo->sprite, xE, focus, None, FALSE);
- deliveries = DeliverEventsToWindow(keybd, focus, xE, count,
- GetEventFilter(keybd, xE),
- NullGrab);
-
- if (deliveries > 0)
- goto unwind;
- } else if (rc != BadMatch)
- ErrorF("[dix] %s: XI conversion failed in DFE (%d, %d). Skipping delivery.\n",
- keybd->name, event->any.type, rc);
-
- if (sendCore)
- {
- rc = EventToCore(event, &core, &count);
- if (rc == Success) {
- if (XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, core, count) == Success) {
- FixUpEventFromWindow(keybd->spriteInfo->sprite, core, focus,
- None, FALSE);
- deliveries = DeliverEventsToWindow(keybd, focus, core, count,
- GetEventFilter(keybd, core),
- NullGrab);
- }
- } else if (rc != BadMatch)
- ErrorF("[dix] %s: core conversion failed DFE (%d, %d). Skipping delivery.\n",
- keybd->name, event->any.type, rc);
- }
-
-unwind:
- free(core);
- free(xE);
- free(xi2);
- return;
-}
-
-/**
- * Deliver an event from a device that is currently grabbed. Uses
- * DeliverDeviceEvents() for further delivery if a ownerEvents is set on the
- * grab. If not, TryClientEvents() is used.
- *
- * @param deactivateGrab True if the device's grab should be deactivated.
- */
-void
-DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
- Bool deactivateGrab)
-{
- GrabPtr grab;
- GrabInfoPtr grabinfo;
- int deliveries = 0;
- DeviceIntPtr dev;
- SpritePtr pSprite = thisDev->spriteInfo->sprite;
- BOOL sendCore = FALSE;
- int rc, count = 0;
- xEvent *xi = NULL;
- xEvent *xi2 = NULL;
- xEvent *core = NULL;
-
- grabinfo = &thisDev->deviceGrab;
- grab = grabinfo->grab;
-
- if (grab->ownerEvents)
- {
- WindowPtr focus;
-
- /* Hack: Some pointer device have a focus class. So we need to check
- * for the type of event, to see if we really want to deliver it to
- * the focus window. For pointer events, the answer is no.
- */
- if (IsPointerEvent(event))
- focus = PointerRootWin;
- else if (thisDev->focus)
- {
- focus = thisDev->focus->win;
- if (focus == FollowKeyboardWin)
- focus = inputInfo.keyboard->focus->win;
- }
- else
- focus = PointerRootWin;
- if (focus == PointerRootWin)
- deliveries = DeliverDeviceEvents(pSprite->win, event, grab,
- NullWindow, thisDev);
- else if (focus && (focus == pSprite->win ||
- IsParent(focus, pSprite->win)))
- deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus,
- thisDev);
- else if (focus)
- deliveries = DeliverDeviceEvents(focus, event, grab, focus,
- thisDev);
- }
- if (!deliveries)
- {
- Mask mask;
-
- /* XXX: In theory, we could pass the internal events through to
- * everything and only convert just before hitting the wire. We can't
- * do that yet, so DGE is the last stop for internal events. From here
- * onwards, we deal with core/XI events.
- */
-
- mask = grab->eventMask;
-
- sendCore = (IsMaster(thisDev) && thisDev->coreEvents);
- /* try core event */
- if (sendCore && grab->grabtype == GRABTYPE_CORE)
- {
- rc = EventToCore(event, &core, &count);
- if (rc == Success)
- {
- FixUpEventFromWindow(pSprite, core, grab->window, None, TRUE);
- if (XaceHook(XACE_SEND_ACCESS, 0, thisDev,
- grab->window, core, count) ||
- XaceHook(XACE_RECEIVE_ACCESS, rClient(grab),
- grab->window, core, count))
- deliveries = 1; /* don't send, but pretend we did */
- else if (!IsInterferingGrab(rClient(grab), thisDev, core))
- {
- deliveries = TryClientEvents(rClient(grab), thisDev,
- core, count, mask,
- GetEventFilter(thisDev, core),
- grab);
- }
- } else if (rc != BadMatch)
- ErrorF("[dix] DeliverGrabbedEvent. Core conversion failed.\n");
- }
-
- if (!deliveries)
- {
- rc = EventToXI2(event, &xi2);
- if (rc == Success)
- {
- int evtype = ((xGenericEvent*)xi2)->evtype;
- mask = grab->xi2mask[XIAllDevices][evtype/8] |
- grab->xi2mask[XIAllMasterDevices][evtype/8] |
- grab->xi2mask[thisDev->id][evtype/8];
- /* try XI2 event */
- FixUpEventFromWindow(pSprite, xi2, grab->window, None, TRUE);
- /* XXX: XACE */
- deliveries = TryClientEvents(rClient(grab), thisDev, xi2, 1, mask,
- GetEventFilter(thisDev, xi2), grab);
- } else if (rc != BadMatch)
- ErrorF("[dix] %s: XI2 conversion failed in DGE (%d, %d). Skipping delivery.\n",
- thisDev->name, event->any.type, rc);
- }
-
- if (!deliveries)
- {
- rc = EventToXI(event, &xi, &count);
- if (rc == Success)
- {
- /* try XI event */
- if (grabinfo->fromPassiveGrab &&
- grabinfo->implicitGrab)
- mask = grab->deviceMask;
- else
- mask = grab->eventMask;
-
- FixUpEventFromWindow(pSprite, xi, grab->window, None, TRUE);
-
- if (XaceHook(XACE_SEND_ACCESS, 0, thisDev,
- grab->window, xi, count) ||
- XaceHook(XACE_RECEIVE_ACCESS, rClient(grab),
- grab->window, xi, count))
- deliveries = 1; /* don't send, but pretend we did */
- else
- {
- deliveries =
- TryClientEvents(rClient(grab), thisDev,
- xi, count,
- mask,
- GetEventFilter(thisDev, xi),
- grab);
- }
- } else if (rc != BadMatch)
- ErrorF("[dix] %s: XI conversion failed in DGE (%d, %d). Skipping delivery.\n",
- thisDev->name, event->any.type, rc);
- }
-
- if (deliveries && (event->any.type == ET_Motion))
- thisDev->valuator->motionHintWindow = grab->window;
- }
- if (deliveries && !deactivateGrab && event->any.type != ET_Motion)
- {
- switch (grabinfo->sync.state)
- {
- case FREEZE_BOTH_NEXT_EVENT:
- dev = GetPairedDevice(thisDev);
- if (dev)
- {
- FreezeThaw(dev, TRUE);
- if ((dev->deviceGrab.sync.state == FREEZE_BOTH_NEXT_EVENT) &&
- (CLIENT_BITS(grab->resource) ==
- CLIENT_BITS(dev->deviceGrab.grab->resource)))
- dev->deviceGrab.sync.state = FROZEN_NO_EVENT;
- else
- dev->deviceGrab.sync.other = grab;
- }
- /* fall through */
- case FREEZE_NEXT_EVENT:
- grabinfo->sync.state = FROZEN_WITH_EVENT;
- FreezeThaw(thisDev, TRUE);
- if (!grabinfo->sync.event)
- grabinfo->sync.event = calloc(1, sizeof(InternalEvent));
- *grabinfo->sync.event = event->device_event;
- break;
- }
- }
-
- free(core);
- free(xi);
- free(xi2);
-}
-
-/* This function is used to set the key pressed or key released state -
- this is only used when the pressing of keys does not cause
- the device's processInputProc to be called, as in for example Mouse Keys.
-*/
-void
-FixKeyState (DeviceEvent *event, DeviceIntPtr keybd)
-{
- int key = event->detail.key;
-
- if (event->type == ET_KeyPress) {
- DebugF("FixKeyState: Key %d %s\n",key,
- ((event->type == ET_KeyPress) ? "down" : "up"));
- }
-
- if (event->type == ET_KeyPress)
- set_key_down(keybd, key, KEY_PROCESSED);
- else if (event->type == ET_KeyRelease)
- set_key_up(keybd, key, KEY_PROCESSED);
- else
- FatalError("Impossible keyboard event");
-}
-
-#define AtMostOneClient \
- (SubstructureRedirectMask | ResizeRedirectMask | ButtonPressMask)
-#define ManagerMask \
- (SubstructureRedirectMask | ResizeRedirectMask)
-
-/**
- * Recalculate which events may be deliverable for the given window.
- * Recalculated mask is used for quicker determination which events may be
- * delivered to a window.
- *
- * The otherEventMasks on a WindowOptional is the combination of all event
- * masks set by all clients on the window.
- * deliverableEventMask is the combination of the eventMask and the
- * otherEventMask plus the events that may be propagated to the parent.
- *
- * Traverses to siblings and parents of the window.
- */
-void
-RecalculateDeliverableEvents(WindowPtr pWin)
-{
- OtherClients *others;
- WindowPtr pChild;
-
- pChild = pWin;
- while (1)
- {
- if (pChild->optional)
- {
- pChild->optional->otherEventMasks = 0;
- for (others = wOtherClients(pChild); others; others = others->next)
- {
- pChild->optional->otherEventMasks |= others->mask;
- }
- }
- pChild->deliverableEvents = pChild->eventMask|
- wOtherEventMasks(pChild);
- if (pChild->parent)
- pChild->deliverableEvents |=
- (pChild->parent->deliverableEvents &
- ~wDontPropagateMask(pChild) & PropagateMask);
- if (pChild->firstChild)
- {
- pChild = pChild->firstChild;
- continue;
- }
- while (!pChild->nextSib && (pChild != pWin))
- pChild = pChild->parent;
- if (pChild == pWin)
- break;
- pChild = pChild->nextSib;
- }
-}
-
-/**
- *
- * \param value must conform to DeleteType
- */
-int
-OtherClientGone(pointer value, XID id)
-{
- OtherClientsPtr other, prev;
- WindowPtr pWin = (WindowPtr)value;
-
- prev = 0;
- for (other = wOtherClients(pWin); other; other = other->next)
- {
- if (other->resource == id)
- {
- if (prev)
- prev->next = other->next;
- else
- {
- if (!(pWin->optional->otherClients = other->next))
- CheckWindowOptionalNeed (pWin);
- }
- free(other);
- RecalculateDeliverableEvents(pWin);
- return Success;
- }
- prev = other;
- }
- FatalError("client not on event list");
- /*NOTREACHED*/
- return -1; /* make compiler happy */
-}
-
-int
-EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask)
-{
- Mask check;
- OtherClients * others;
- DeviceIntPtr dev;
- int rc;
-
- if (mask & ~AllEventMasks)
- {
- client->errorValue = mask;
- return BadValue;
- }
- check = (mask & ManagerMask);
- if (check) {
- rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id,
- RT_WINDOW, pWin, RT_NONE, NULL, DixManageAccess);
- if (rc != Success)
- return rc;
- }
- check = (mask & AtMostOneClient);
- if (check & (pWin->eventMask|wOtherEventMasks(pWin)))
- { /* It is illegal for two different
- clients to select on any of the
- events for AtMostOneClient. However,
- it is OK, for some client to
- continue selecting on one of those
- events. */
- if ((wClient(pWin) != client) && (check & pWin->eventMask))
- return BadAccess;
- for (others = wOtherClients (pWin); others; others = others->next)
- {
- if (!SameClient(others, client) && (check & others->mask))
- return BadAccess;
- }
- }
- if (wClient (pWin) == client)
- {
- check = pWin->eventMask;
- pWin->eventMask = mask;
- }
- else
- {
- for (others = wOtherClients (pWin); others; others = others->next)
- {
- if (SameClient(others, client))
- {
- check = others->mask;
- if (mask == 0)
- {
- FreeResource(others->resource, RT_NONE);
- return Success;
- }
- else
- others->mask = mask;
- goto maskSet;
- }
- }
- check = 0;
- if (!pWin->optional && !MakeWindowOptional (pWin))
- return BadAlloc;
- others = malloc(sizeof(OtherClients));
- if (!others)
- return BadAlloc;
- others->mask = mask;
- others->resource = FakeClientID(client->index);
- others->next = pWin->optional->otherClients;
- pWin->optional->otherClients = others;
- if (!AddResource(others->resource, RT_OTHERCLIENT, (pointer)pWin))
- return BadAlloc;
- }
-maskSet:
- if ((mask & PointerMotionHintMask) && !(check & PointerMotionHintMask))
- {
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (dev->valuator && dev->valuator->motionHintWindow == pWin)
- dev->valuator->motionHintWindow = NullWindow;
- }
- }
- RecalculateDeliverableEvents(pWin);
- return Success;
-}
-
-int
-EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
- Mask mask, Bool *checkOptional)
-{
- int i, free;
-
- if (mask & ~PropagateMask)
- {
- client->errorValue = mask;
- return BadValue;
- }
- if (pWin->dontPropagate)
- DontPropagateRefCnts[pWin->dontPropagate]--;
- if (!mask)
- i = 0;
- else
- {
- for (i = DNPMCOUNT, free = 0; --i > 0; )
- {
- if (!DontPropagateRefCnts[i])
- free = i;
- else if (mask == DontPropagateMasks[i])
- break;
- }
- if (!i && free)
- {
- i = free;
- DontPropagateMasks[i] = mask;
- }
- }
- if (i || !mask)
- {
- pWin->dontPropagate = i;
- if (i)
- DontPropagateRefCnts[i]++;
- if (pWin->optional)
- {
- pWin->optional->dontPropagateMask = mask;
- *checkOptional = TRUE;
- }
- }
- else
- {
- if (!pWin->optional && !MakeWindowOptional (pWin))
- {
- if (pWin->dontPropagate)
- DontPropagateRefCnts[pWin->dontPropagate]++;
- return BadAlloc;
- }
- pWin->dontPropagate = 0;
- pWin->optional->dontPropagateMask = mask;
- }
- RecalculateDeliverableEvents(pWin);
- return Success;
-}
-
-/**
- * Assembles an EnterNotify or LeaveNotify and sends it event to the client.
- * Uses the paired keyboard to get some additional information.
- */
-void
-CoreEnterLeaveEvent(
- DeviceIntPtr mouse,
- int type,
- int mode,
- int detail,
- WindowPtr pWin,
- Window child)
-{
- xEvent event;
- WindowPtr focus;
- DeviceIntPtr keybd;
- GrabPtr grab = mouse->deviceGrab.grab;
- Mask mask;
-
- keybd = GetPairedDevice(mouse);
-
- if ((pWin == mouse->valuator->motionHintWindow) &&
- (detail != NotifyInferior))
- mouse->valuator->motionHintWindow = NullWindow;
- if (grab)
- {
- mask = (pWin == grab->window) ? grab->eventMask : 0;
- if (grab->ownerEvents)
- mask |= EventMaskForClient(pWin, rClient(grab));
- }
- else
- {
- mask = pWin->eventMask | wOtherEventMasks(pWin);
- }
-
- memset(&event, 0, sizeof(xEvent));
- event.u.u.type = type;
- event.u.u.detail = detail;
- event.u.enterLeave.time = currentTime.milliseconds;
- event.u.enterLeave.rootX = mouse->spriteInfo->sprite->hot.x;
- event.u.enterLeave.rootY = mouse->spriteInfo->sprite->hot.y;
- /* Counts on the same initial structure of crossing & button events! */
- FixUpEventFromWindow(mouse->spriteInfo->sprite, &event, pWin, None, FALSE);
- /* Enter/Leave events always set child */
- event.u.enterLeave.child = child;
- event.u.enterLeave.flags = event.u.keyButtonPointer.sameScreen ?
- ELFlagSameScreen : 0;
- event.u.enterLeave.state = mouse->button ? (mouse->button->state & 0x1f00) : 0;
- if (keybd)
- event.u.enterLeave.state |=
- XkbGrabStateFromRec(&keybd->key->xkbInfo->state);
- event.u.enterLeave.mode = mode;
- focus = (keybd) ? keybd->focus->win : None;
- if ((focus != NoneWin) &&
- ((pWin == focus) || (focus == PointerRootWin) ||
- IsParent(focus, pWin)))
- event.u.enterLeave.flags |= ELFlagFocus;
-
- if ((mask & GetEventFilter(mouse, &event)))
- {
- if (grab)
- TryClientEvents(rClient(grab), mouse, &event, 1, mask,
- GetEventFilter(mouse, &event), grab);
- else
- DeliverEventsToWindow(mouse, pWin, &event, 1,
- GetEventFilter(mouse, &event),
- NullGrab);
- }
-
- if ((type == EnterNotify) && (mask & KeymapStateMask))
- {
- xKeymapEvent ke;
- ClientPtr client = grab ? rClient(grab) : wClient(pWin);
- if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess))
- memset((char *)&ke.map[0], 0, 31);
- else
- memmove((char *)&ke.map[0], (char *)&keybd->key->down[1], 31);
-
- ke.type = KeymapNotify;
- if (grab)
- TryClientEvents(rClient(grab), keybd, (xEvent *)&ke, 1,
- mask, KeymapStateMask, grab);
- else
- DeliverEventsToWindow(mouse, pWin, (xEvent *)&ke, 1,
- KeymapStateMask, NullGrab);
- }
-}
-
-void
-DeviceEnterLeaveEvent(
- DeviceIntPtr mouse,
- int sourceid,
- int type,
- int mode,
- int detail,
- WindowPtr pWin,
- Window child)
-{
- GrabPtr grab = mouse->deviceGrab.grab;
- xXIEnterEvent *event;
- int filter;
- int btlen, len, i;
- DeviceIntPtr kbd;
-
- if ((mode == XINotifyPassiveGrab && type == XI_Leave) ||
- (mode == XINotifyPassiveUngrab && type == XI_Enter))
- return;
-
- btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0;
- btlen = bytes_to_int32(btlen);
- len = sizeof(xXIEnterEvent) + btlen * 4;
-
- event = calloc(1, len);
- event->type = GenericEvent;
- event->extension = IReqCode;
- event->evtype = type;
- event->length = (len - sizeof(xEvent))/4;
- event->buttons_len = btlen;
- event->detail = detail;
- event->time = currentTime.milliseconds;
- event->deviceid = mouse->id;
- event->sourceid = sourceid;
- event->mode = mode;
- event->root_x = FP1616(mouse->spriteInfo->sprite->hot.x, 0);
- event->root_y = FP1616(mouse->spriteInfo->sprite->hot.y, 0);
-
- for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
- if (BitIsOn(mouse->button->down, i))
- SetBit(&event[1], i);
-
- kbd = GetMaster(mouse, MASTER_KEYBOARD);
- if (kbd && kbd->key)
- {
- event->mods.base_mods = kbd->key->xkbInfo->state.base_mods;
- event->mods.latched_mods = kbd->key->xkbInfo->state.latched_mods;
- event->mods.locked_mods = kbd->key->xkbInfo->state.locked_mods;
-
- event->group.base_group = kbd->key->xkbInfo->state.base_group;
- event->group.latched_group = kbd->key->xkbInfo->state.latched_group;
- event->group.locked_group = kbd->key->xkbInfo->state.locked_group;
- }
-
- FixUpEventFromWindow(mouse->spriteInfo->sprite, (xEvent*)event, pWin,
- None, FALSE);
-
- filter = GetEventFilter(mouse, (xEvent*)event);
-
- if (grab)
- {
- Mask mask;
- mask = grab->xi2mask[XIAllDevices][type/8] |
- grab->xi2mask[XIAllMasterDevices][type/8] |
- grab->xi2mask[mouse->id][type/8];
- TryClientEvents(rClient(grab), mouse, (xEvent*)event, 1, mask,
- filter, grab);
- } else {
- if (!GetWindowXI2Mask(mouse, pWin, (xEvent*)event))
- goto out;
- DeliverEventsToWindow(mouse, pWin, (xEvent*)event, 1, filter,
- NullGrab);
- }
-
-out:
- free(event);
-}
-
-void
-CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin)
-{
- xEvent event;
-
- memset(&event, 0, sizeof(xEvent));
- event.u.focus.mode = mode;
- event.u.u.type = type;
- event.u.u.detail = detail;
- event.u.focus.window = pWin->drawable.id;
-
- DeliverEventsToWindow(dev, pWin, &event, 1,
- GetEventFilter(dev, &event), NullGrab);
- if ((type == FocusIn) &&
- ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask))
- {
- xKeymapEvent ke;
- ClientPtr client = wClient(pWin);
- if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess))
- memset((char *)&ke.map[0], 0, 31);
- else
- memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31);
-
- ke.type = KeymapNotify;
- DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1,
- KeymapStateMask, NullGrab);
- }
-}
-
-/**
- * Set the input focus to the given window. Subsequent keyboard events will be
- * delivered to the given window.
- *
- * Usually called from ProcSetInputFocus as result of a client request. If so,
- * the device is the inputInfo.keyboard.
- * If called from ProcXSetInputFocus as result of a client xinput request, the
- * device is set to the device specified by the client.
- *
- * @param client Client that requested input focus change.
- * @param dev Focus device.
- * @param focusID The window to obtain the focus. Can be PointerRoot or None.
- * @param revertTo Specifies where the focus reverts to when window becomes
- * unviewable.
- * @param ctime Specifies the time.
- * @param followOK True if pointer is allowed to follow the keyboard.
- */
-int
-SetInputFocus(
- ClientPtr client,
- DeviceIntPtr dev,
- Window focusID,
- CARD8 revertTo,
- Time ctime,
- Bool followOK)
-{
- FocusClassPtr focus;
- WindowPtr focusWin;
- int mode, rc;
- TimeStamp time;
- DeviceIntPtr keybd; /* used for FollowKeyboard or FollowKeyboardWin */
-
-
- UpdateCurrentTime();
- if ((revertTo != RevertToParent) &&
- (revertTo != RevertToPointerRoot) &&
- (revertTo != RevertToNone) &&
- ((revertTo != RevertToFollowKeyboard) || !followOK))
- {
- client->errorValue = revertTo;
- return BadValue;
- }
- time = ClientTimeToServerTime(ctime);
-
- if (IsKeyboardDevice(dev))
- keybd = dev;
- else
- keybd = GetPairedDevice(dev);
-
- if ((focusID == None) || (focusID == PointerRoot))
- focusWin = (WindowPtr)(long)focusID;
- else if ((focusID == FollowKeyboard) && followOK)
- {
- focusWin = keybd->focus->win;
- }
- else {
- rc = dixLookupWindow(&focusWin, focusID, client, DixSetAttrAccess);
- if (rc != Success)
- return rc;
- /* It is a match error to try to set the input focus to an
- unviewable window. */
- if(!focusWin->realized)
- return BadMatch;
- }
- rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetFocusAccess);
- if (rc != Success)
- return Success;
-
- focus = dev->focus;
- if ((CompareTimeStamps(time, currentTime) == LATER) ||
- (CompareTimeStamps(time, focus->time) == EARLIER))
- return Success;
- mode = (dev->deviceGrab.grab) ? NotifyWhileGrabbed : NotifyNormal;
- if (focus->win == FollowKeyboardWin)
- {
- if (!ActivateFocusInGrab(dev, keybd->focus->win, focusWin))
- DoFocusEvents(dev, keybd->focus->win, focusWin, mode);
- } else
- {
- if (!ActivateFocusInGrab(dev, focus->win, focusWin))
- DoFocusEvents(dev, focus->win, focusWin, mode);
- }
- focus->time = time;
- focus->revert = revertTo;
- if (focusID == FollowKeyboard)
- focus->win = FollowKeyboardWin;
- else
- focus->win = focusWin;
- if ((focusWin == NoneWin) || (focusWin == PointerRootWin))
- focus->traceGood = 0;
- else
- {
- int depth = 0;
- WindowPtr pWin;
-
- for (pWin = focusWin; pWin; pWin = pWin->parent) depth++;
- if (depth > focus->traceSize)
- {
- focus->traceSize = depth+1;
- focus->trace = realloc(focus->trace,
- focus->traceSize * sizeof(WindowPtr));
- }
- focus->traceGood = depth;
- for (pWin = focusWin, depth--; pWin; pWin = pWin->parent, depth--)
- focus->trace[depth] = pWin;
- }
- return Success;
-}
-
-/**
- * Server-side protocol handling for SetInputFocus request.
- *
- * Sets the input focus for the virtual core keyboard.
- */
-int
-ProcSetInputFocus(ClientPtr client)
-{
- DeviceIntPtr kbd = PickKeyboard(client);
- REQUEST(xSetInputFocusReq);
-
- REQUEST_SIZE_MATCH(xSetInputFocusReq);
-
- return SetInputFocus(client, kbd, stuff->focus,
- stuff->revertTo, stuff->time, FALSE);
-}
-
-/**
- * Server-side protocol handling for GetInputFocus request.
- *
- * Sends the current input focus for the client's keyboard back to the
- * client.
- */
-int
-ProcGetInputFocus(ClientPtr client)
-{
- DeviceIntPtr kbd = PickKeyboard(client);
- xGetInputFocusReply rep;
- FocusClassPtr focus = kbd->focus;
- int rc;
- /* REQUEST(xReq); */
- REQUEST_SIZE_MATCH(xReq);
-
- rc = XaceHook(XACE_DEVICE_ACCESS, client, kbd, DixGetFocusAccess);
- if (rc != Success)
- return rc;
-
- memset(&rep, 0, sizeof(xGetInputFocusReply));
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- if (focus->win == NoneWin)
- rep.focus = None;
- else if (focus->win == PointerRootWin)
- rep.focus = PointerRoot;
- else rep.focus = focus->win->drawable.id;
- rep.revertTo = focus->revert;
- WriteReplyToClient(client, sizeof(xGetInputFocusReply), &rep);
- return Success;
-}
-
-/**
- * Server-side protocol handling for GrabPointer request.
- *
- * Sets an active grab on the client's ClientPointer and returns success
- * status to client.
- */
-int
-ProcGrabPointer(ClientPtr client)
-{
- xGrabPointerReply rep;
- DeviceIntPtr device = PickPointer(client);
- GrabPtr grab;
- GrabMask mask;
- WindowPtr confineTo;
- CursorPtr oldCursor;
- REQUEST(xGrabPointerReq);
- TimeStamp time;
- int rc;
-
- REQUEST_SIZE_MATCH(xGrabPointerReq);
- UpdateCurrentTime();
-
- if (stuff->eventMask & ~PointerGrabMask)
- {
- client->errorValue = stuff->eventMask;
- return BadValue;
- }
-
- if (stuff->confineTo == None)
- confineTo = NullWindow;
- else
- {
- rc = dixLookupWindow(&confineTo, stuff->confineTo, client,
- DixSetAttrAccess);
- if (rc != Success)
- return rc;
- }
-
- memset(&rep, 0, sizeof(xGrabPointerReply));
- oldCursor = NullCursor;
- grab = device->deviceGrab.grab;
-
- if (grab)
- {
- if (grab->confineTo && !confineTo)
- ConfineCursorToWindow(device, GetCurrentRootWindow(device), FALSE,
- FALSE);
- oldCursor = grab->cursor;
- }
-
- mask.core = stuff->eventMask;
-
- rc = GrabDevice(client, device, stuff->pointerMode, stuff->keyboardMode,
- stuff->grabWindow, stuff->ownerEvents, stuff->time,
- &mask, GRABTYPE_CORE, stuff->cursor,
- stuff->confineTo, &rep.status);
- if (rc != Success)
- return rc;
-
- if (oldCursor && rep.status == GrabSuccess)
- FreeCursor (oldCursor, (Cursor)0);
-
- time = ClientTimeToServerTime(stuff->time);
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- WriteReplyToClient(client, sizeof(xGrabPointerReply), &rep);
- return Success;
-}
-
-/**
- * Server-side protocol handling for ChangeActivePointerGrab request.
- *
- * Changes properties of the grab hold by the client. If the client does not
- * hold an active grab on the device, nothing happens.
- */
-int
-ProcChangeActivePointerGrab(ClientPtr client)
-{
- DeviceIntPtr device;
- GrabPtr grab;
- CursorPtr newCursor, oldCursor;
- REQUEST(xChangeActivePointerGrabReq);
- TimeStamp time;
-
- REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq);
- if (stuff->eventMask & ~PointerGrabMask)
- {
- client->errorValue = stuff->eventMask;
- return BadValue;
- }
- if (stuff->cursor == None)
- newCursor = NullCursor;
- else
- {
- int rc = dixLookupResourceByType((pointer *)&newCursor, stuff->cursor,
- RT_CURSOR, client, DixUseAccess);
- if (rc != Success)
- {
- client->errorValue = stuff->cursor;
- return rc;
- }
- }
-
- device = PickPointer(client);
- grab = device->deviceGrab.grab;
-
- if (!grab)
- return Success;
- if (!SameClient(grab, client))
- return Success;
- time = ClientTimeToServerTime(stuff->time);
- if ((CompareTimeStamps(time, currentTime) == LATER) ||
- (CompareTimeStamps(time, device->deviceGrab.grabTime) == EARLIER))
- return Success;
- oldCursor = grab->cursor;
- grab->cursor = newCursor;
- if (newCursor)
- newCursor->refcnt++;
- PostNewCursor(device);
- if (oldCursor)
- FreeCursor(oldCursor, (Cursor)0);
- grab->eventMask = stuff->eventMask;
- return Success;
-}
-
-/**
- * Server-side protocol handling for UngrabPointer request.
- *
- * Deletes a pointer grab on a device the client has grabbed.
- */
-int
-ProcUngrabPointer(ClientPtr client)
-{
- DeviceIntPtr device = PickPointer(client);
- GrabPtr grab;
- TimeStamp time;
- REQUEST(xResourceReq);
-
- REQUEST_SIZE_MATCH(xResourceReq);
- UpdateCurrentTime();
- grab = device->deviceGrab.grab;
-
- time = ClientTimeToServerTime(stuff->id);
- if ((CompareTimeStamps(time, currentTime) != LATER) &&
- (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) &&
- (grab) && SameClient(grab, client))
- (*device->deviceGrab.DeactivateGrab)(device);
- return Success;
-}
-
-/**
- * Sets a grab on the given device.
- *
- * Called from ProcGrabKeyboard to work on the client's keyboard.
- * Called from ProcXGrabDevice to work on the device specified by the client.
- *
- * The parameters this_mode and other_mode represent the keyboard_mode and
- * pointer_mode parameters of XGrabKeyboard().
- * See man page for details on all the parameters
- *
- * @param client Client that owns the grab.
- * @param dev The device to grab.
- * @param this_mode GrabModeSync or GrabModeAsync
- * @param other_mode GrabModeSync or GrabModeAsync
- * @param status Return code to be returned to the caller.
- *
- * @returns Success or BadValue.
- */
-int
-GrabDevice(ClientPtr client, DeviceIntPtr dev,
- unsigned pointer_mode, unsigned keyboard_mode, Window grabWindow,
- unsigned ownerEvents, Time ctime, GrabMask *mask,
- int grabtype, Cursor curs, Window confineToWin, CARD8 *status)
-{
- WindowPtr pWin, confineTo;
- GrabPtr grab;
- TimeStamp time;
- Mask access_mode = DixGrabAccess;
- int rc;
- GrabInfoPtr grabInfo = &dev->deviceGrab;
- CursorPtr cursor;
-
- UpdateCurrentTime();
- if ((keyboard_mode != GrabModeSync) && (keyboard_mode != GrabModeAsync))
- {
- client->errorValue = keyboard_mode;
- return BadValue;
- }
- if ((pointer_mode != GrabModeSync) && (pointer_mode != GrabModeAsync))
- {
- client->errorValue = pointer_mode;
- return BadValue;
- }
- if ((ownerEvents != xFalse) && (ownerEvents != xTrue))
- {
- client->errorValue = ownerEvents;
- return BadValue;
- }
-
- rc = dixLookupWindow(&pWin, grabWindow, client, DixSetAttrAccess);
- if (rc != Success)
- return rc;
-
- if (confineToWin == None)
- confineTo = NullWindow;
- else
- {
- rc = dixLookupWindow(&confineTo, confineToWin, client,
- DixSetAttrAccess);
- if (rc != Success)
- return rc;
- }
-
- if (curs == None)
- cursor = NullCursor;
- else
- {
- rc = dixLookupResourceByType((pointer *)&cursor, curs, RT_CURSOR,
- client, DixUseAccess);
- if (rc != Success)
- {
- client->errorValue = curs;
- return rc;
- }
- access_mode |= DixForceAccess;
- }
-
- if (keyboard_mode == GrabModeSync || pointer_mode == GrabModeSync)
- access_mode |= DixFreezeAccess;
- rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode);
- if (rc != Success)
- return rc;
-
- time = ClientTimeToServerTime(ctime);
- grab = grabInfo->grab;
- if (grab && grab->grabtype != grabtype)
- *status = AlreadyGrabbed;
- if (grab && !SameClient(grab, client))
- *status = AlreadyGrabbed;
- else if ((!pWin->realized) ||
- (confineTo &&
- !(confineTo->realized
- && BorderSizeNotEmpty(dev, confineTo))))
- *status = GrabNotViewable;
- else if ((CompareTimeStamps(time, currentTime) == LATER) ||
- (CompareTimeStamps(time, grabInfo->grabTime) == EARLIER))
- *status = GrabInvalidTime;
- else if (grabInfo->sync.frozen &&
- grabInfo->sync.other && !SameClient(grabInfo->sync.other, client))
- *status = GrabFrozen;
- else
- {
- GrabRec tempGrab;
-
- /* Otherwise segfaults happen on grabbed MPX devices */
- memset(&tempGrab, 0, sizeof(GrabRec));
-
- tempGrab.next = NULL;
- tempGrab.window = pWin;
- tempGrab.resource = client->clientAsMask;
- tempGrab.ownerEvents = ownerEvents;
- tempGrab.keyboardMode = keyboard_mode;
- tempGrab.pointerMode = pointer_mode;
- if (grabtype == GRABTYPE_CORE)
- tempGrab.eventMask = mask->core;
- else if (grabtype == GRABTYPE_XI)
- tempGrab.eventMask = mask->xi;
- else
- memcpy(tempGrab.xi2mask, mask->xi2mask, sizeof(tempGrab.xi2mask));
- tempGrab.device = dev;
- tempGrab.cursor = cursor;
- tempGrab.confineTo = confineTo;
- tempGrab.grabtype = grabtype;
- (*grabInfo->ActivateGrab)(dev, &tempGrab, time, FALSE);
- *status = GrabSuccess;
- }
- return Success;
-}
-
-/**
- * Server-side protocol handling for GrabKeyboard request.
- *
- * Grabs the client's keyboard and returns success status to client.
- */
-int
-ProcGrabKeyboard(ClientPtr client)
-{
- xGrabKeyboardReply rep;
- REQUEST(xGrabKeyboardReq);
- int result;
- DeviceIntPtr keyboard = PickKeyboard(client);
- GrabMask mask;
-
- REQUEST_SIZE_MATCH(xGrabKeyboardReq);
-
- memset(&rep, 0, sizeof(xGrabKeyboardReply));
- mask.core = KeyPressMask | KeyReleaseMask;
-
- result = GrabDevice(client, keyboard, stuff->pointerMode,
- stuff->keyboardMode, stuff->grabWindow, stuff->ownerEvents,
- stuff->time, &mask, GRABTYPE_CORE, None, None,
- &rep.status);
-
- if (result != Success)
- return result;
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- WriteReplyToClient(client, sizeof(xGrabKeyboardReply), &rep);
- return Success;
-}
-
-/**
- * Server-side protocol handling for UngrabKeyboard request.
- *
- * Deletes a possible grab on the client's keyboard.
- */
-int
-ProcUngrabKeyboard(ClientPtr client)
-{
- DeviceIntPtr device = PickKeyboard(client);
- GrabPtr grab;
- TimeStamp time;
- REQUEST(xResourceReq);
-
- REQUEST_SIZE_MATCH(xResourceReq);
- UpdateCurrentTime();
-
- grab = device->deviceGrab.grab;
-
- time = ClientTimeToServerTime(stuff->id);
- if ((CompareTimeStamps(time, currentTime) != LATER) &&
- (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) &&
- (grab) && SameClient(grab, client) && grab->grabtype == GRABTYPE_CORE)
- (*device->deviceGrab.DeactivateGrab)(device);
- return Success;
-}
-
-/**
- * Server-side protocol handling for QueryPointer request.
- *
- * Returns the current state and position of the client's ClientPointer to the
- * client.
- */
-int
-ProcQueryPointer(ClientPtr client)
-{
- xQueryPointerReply rep;
- WindowPtr pWin, t;
- DeviceIntPtr mouse = PickPointer(client);
- DeviceIntPtr keyboard;
- SpritePtr pSprite;
- int rc;
- REQUEST(xResourceReq);
- REQUEST_SIZE_MATCH(xResourceReq);
-
- rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
- rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixReadAccess);
- if (rc != Success && rc != BadAccess)
- return rc;
-
- keyboard = GetPairedDevice(mouse);
-
- pSprite = mouse->spriteInfo->sprite;
- if (mouse->valuator->motionHintWindow)
- MaybeStopHint(mouse, client);
- memset(&rep, 0, sizeof(xQueryPointerReply));
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.mask = mouse->button ? (mouse->button->state) : 0;
- rep.mask |= XkbStateFieldFromRec(&keyboard->key->xkbInfo->state);
- rep.length = 0;
- rep.root = (GetCurrentRootWindow(mouse))->drawable.id;
- rep.rootX = pSprite->hot.x;
- rep.rootY = pSprite->hot.y;
- rep.child = None;
- if (pSprite->hot.pScreen == pWin->drawable.pScreen)
- {
- rep.sameScreen = xTrue;
- rep.winX = pSprite->hot.x - pWin->drawable.x;
- rep.winY = pSprite->hot.y - pWin->drawable.y;
- for (t = pSprite->win; t; t = t->parent)
- if (t->parent == pWin)
- {
- rep.child = t->drawable.id;
- break;
- }
- }
- else
- {
- rep.sameScreen = xFalse;
- rep.winX = 0;
- rep.winY = 0;
- }
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension) {
- rep.rootX += screenInfo.screens[0]->x;
- rep.rootY += screenInfo.screens[0]->y;
- if(stuff->id == rep.root) {
- rep.winX += screenInfo.screens[0]->x;
- rep.winY += screenInfo.screens[0]->y;
- }
- }
-#endif
-
- if (rc == BadAccess) {
- rep.mask = 0;
- rep.child = None;
- rep.rootX = 0;
- rep.rootY = 0;
- rep.winX = 0;
- rep.winY = 0;
- }
-
- WriteReplyToClient(client, sizeof(xQueryPointerReply), &rep);
-
- return Success;
-}
-
-/**
- * Initializes the device list and the DIX sprite to sane values. Allocates
- * trace memory used for quick window traversal.
- */
-void
-InitEvents(void)
-{
- int i;
-
- inputInfo.numDevices = 0;
- inputInfo.devices = (DeviceIntPtr)NULL;
- inputInfo.off_devices = (DeviceIntPtr)NULL;
- inputInfo.keyboard = (DeviceIntPtr)NULL;
- inputInfo.pointer = (DeviceIntPtr)NULL;
- /* The mask for pointer motion events may have changed in the last server
- * generation. See comment above definition of filters. */
- filters[0][PointerMotionMask] = MotionNotify;
- for (i = 1; i < MAXDEVICES; i++)
- {
- memcpy(&filters[i], filters[0], sizeof(filters[0]));
- }
-
- syncEvents.replayDev = (DeviceIntPtr)NULL;
- syncEvents.replayWin = NullWindow;
- while (syncEvents.pending)
- {
- QdEventPtr next = syncEvents.pending->next;
- free(syncEvents.pending);
- syncEvents.pending = next;
- }
- syncEvents.pendtail = &syncEvents.pending;
- syncEvents.playingEvents = FALSE;
- syncEvents.time.months = 0;
- syncEvents.time.milliseconds = 0; /* hardly matters */
- currentTime.months = 0;
- currentTime.milliseconds = GetTimeInMillis();
- lastDeviceEventTime = currentTime;
- for (i = 0; i < DNPMCOUNT; i++)
- {
- DontPropagateMasks[i] = 0;
- DontPropagateRefCnts[i] = 0;
- }
-
- InputEventListLen = GetMaximumEventsNum();
- InputEventList = InitEventList(InputEventListLen);
- if (!InputEventList)
- FatalError("[dix] Failed to allocate input event list.\n");
-}
-
-void
-CloseDownEvents(void)
-{
- FreeEventList(InputEventList, InputEventListLen);
- InputEventListLen = 0;
- InputEventList = NULL;
-}
-
-/**
- * Server-side protocol handling for SendEvent request.
- *
- * Locates the window to send the event to and forwards the event.
- */
-int
-ProcSendEvent(ClientPtr client)
-{
- WindowPtr pWin;
- WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
- DeviceIntPtr dev = PickPointer(client);
- DeviceIntPtr keybd = GetPairedDevice(dev);
- SpritePtr pSprite = dev->spriteInfo->sprite;
- REQUEST(xSendEventReq);
-
- REQUEST_SIZE_MATCH(xSendEventReq);
-
- /* The client's event type must be a core event type or one defined by an
- extension. */
-
- if ( ! ((stuff->event.u.u.type > X_Reply &&
- stuff->event.u.u.type < LASTEvent) ||
- (stuff->event.u.u.type >= EXTENSION_EVENT_BASE &&
- stuff->event.u.u.type < (unsigned)lastEvent)))
- {
- client->errorValue = stuff->event.u.u.type;
- return BadValue;
- }
- if (stuff->event.u.u.type == ClientMessage &&
- stuff->event.u.u.detail != 8 &&
- stuff->event.u.u.detail != 16 &&
- stuff->event.u.u.detail != 32)
- {
- client->errorValue = stuff->event.u.u.detail;
- return BadValue;
- }
- if (stuff->eventMask & ~AllEventMasks)
- {
- client->errorValue = stuff->eventMask;
- return BadValue;
- }
-
- if (stuff->destination == PointerWindow)
- pWin = pSprite->win;
- else if (stuff->destination == InputFocus)
- {
- WindowPtr inputFocus = (keybd) ? keybd->focus->win : NoneWin;
-
- if (inputFocus == NoneWin)
- return Success;
-
- /* If the input focus is PointerRootWin, send the event to where
- the pointer is if possible, then perhaps propogate up to root. */
- if (inputFocus == PointerRootWin)
- inputFocus = GetCurrentRootWindow(dev);
-
- if (IsParent(inputFocus, pSprite->win))
- {
- effectiveFocus = inputFocus;
- pWin = pSprite->win;
- }
- else
- effectiveFocus = pWin = inputFocus;
- }
- else
- dixLookupWindow(&pWin, stuff->destination, client, DixSendAccess);
-
- if (!pWin)
- return BadWindow;
- if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue))
- {
- client->errorValue = stuff->propagate;
- return BadValue;
- }
- stuff->event.u.u.type |= 0x80;
- if (stuff->propagate)
- {
- for (;pWin; pWin = pWin->parent)
- {
- if (XaceHook(XACE_SEND_ACCESS, client, NULL, pWin,
- &stuff->event, 1))
- return Success;
- if (DeliverEventsToWindow(dev, pWin,
- &stuff->event, 1, stuff->eventMask, NullGrab))
- return Success;
- if (pWin == effectiveFocus)
- return Success;
- stuff->eventMask &= ~wDontPropagateMask(pWin);
- if (!stuff->eventMask)
- break;
- }
- }
- else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, &stuff->event, 1))
- DeliverEventsToWindow(dev, pWin, &stuff->event,
- 1, stuff->eventMask, NullGrab);
- return Success;
-}
-
-/**
- * Server-side protocol handling for UngrabKey request.
- *
- * Deletes a passive grab for the given key. Works on the
- * client's keyboard.
- */
-int
-ProcUngrabKey(ClientPtr client)
-{
- REQUEST(xUngrabKeyReq);
- WindowPtr pWin;
- GrabRec tempGrab;
- DeviceIntPtr keybd = PickKeyboard(client);
- int rc;
-
- REQUEST_SIZE_MATCH(xUngrabKeyReq);
- rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) ||
- (stuff->key < keybd->key->xkbInfo->desc->min_key_code))
- && (stuff->key != AnyKey))
- {
- client->errorValue = stuff->key;
- return BadValue;
- }
- if ((stuff->modifiers != AnyModifier) &&
- (stuff->modifiers & ~AllModifiersMask))
- {
- client->errorValue = stuff->modifiers;
- return BadValue;
- }
- tempGrab.resource = client->clientAsMask;
- tempGrab.device = keybd;
- tempGrab.window = pWin;
- tempGrab.modifiersDetail.exact = stuff->modifiers;
- tempGrab.modifiersDetail.pMask = NULL;
- tempGrab.modifierDevice = GetPairedDevice(keybd);
- tempGrab.type = KeyPress;
- tempGrab.grabtype = GRABTYPE_CORE;
- tempGrab.detail.exact = stuff->key;
- tempGrab.detail.pMask = NULL;
- tempGrab.next = NULL;
-
- if (!DeletePassiveGrabFromList(&tempGrab))
- return BadAlloc;
- return Success;
-}
-
-/**
- * Server-side protocol handling for GrabKey request.
- *
- * Creates a grab for the client's keyboard and adds it to the list of passive
- * grabs.
- */
-int
-ProcGrabKey(ClientPtr client)
-{
- WindowPtr pWin;
- REQUEST(xGrabKeyReq);
- GrabPtr grab;
- DeviceIntPtr keybd = PickKeyboard(client);
- int rc;
- GrabParameters param;
- GrabMask mask;
-
- REQUEST_SIZE_MATCH(xGrabKeyReq);
-
- memset(&param, 0, sizeof(param));
- param.grabtype = GRABTYPE_CORE;
- param.ownerEvents = stuff->ownerEvents;
- param.this_device_mode = stuff->keyboardMode;
- param.other_devices_mode = stuff->pointerMode;
- param.modifiers = stuff->modifiers;
-
- rc = CheckGrabValues(client, &param);
- if (rc != Success)
- return rc;
-
- if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) ||
- (stuff->key < keybd->key->xkbInfo->desc->min_key_code))
- && (stuff->key != AnyKey))
- {
- client->errorValue = stuff->key;
- return BadValue;
- }
- rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess);
- if (rc != Success)
- return rc;
-
-
- mask.core = (KeyPressMask | KeyReleaseMask);
-
- grab = CreateGrab(client->index, keybd, keybd, pWin, GRABTYPE_CORE, &mask,
- &param, KeyPress, stuff->key, NullWindow, NullCursor);
- if (!grab)
- return BadAlloc;
- return AddPassiveGrabToList(client, grab);
-}
-
-
-/**
- * Server-side protocol handling for GrabButton request.
- *
- * Creates a grab for the client's ClientPointer and adds it as a passive grab
- * to the list.
- */
-int
-ProcGrabButton(ClientPtr client)
-{
- WindowPtr pWin, confineTo;
- REQUEST(xGrabButtonReq);
- CursorPtr cursor;
- GrabPtr grab;
- DeviceIntPtr ptr, modifierDevice;
- Mask access_mode = DixGrabAccess;
- GrabMask mask;
- GrabParameters param;
- int rc;
-
- REQUEST_SIZE_MATCH(xGrabButtonReq);
- if ((stuff->pointerMode != GrabModeSync) &&
- (stuff->pointerMode != GrabModeAsync))
- {
- client->errorValue = stuff->pointerMode;
- return BadValue;
- }
- if ((stuff->keyboardMode != GrabModeSync) &&
- (stuff->keyboardMode != GrabModeAsync))
- {
- client->errorValue = stuff->keyboardMode;
- return BadValue;
- }
- if ((stuff->modifiers != AnyModifier) &&
- (stuff->modifiers & ~AllModifiersMask))
- {
- client->errorValue = stuff->modifiers;
- return BadValue;
- }
- if ((stuff->ownerEvents != xFalse) && (stuff->ownerEvents != xTrue))
- {
- client->errorValue = stuff->ownerEvents;
- return BadValue;
- }
- if (stuff->eventMask & ~PointerGrabMask)
- {
- client->errorValue = stuff->eventMask;
- return BadValue;
- }
- rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess);
- if (rc != Success)
- return rc;
- if (stuff->confineTo == None)
- confineTo = NullWindow;
- else {
- rc = dixLookupWindow(&confineTo, stuff->confineTo, client,
- DixSetAttrAccess);
- if (rc != Success)
- return rc;
- }
- if (stuff->cursor == None)
- cursor = NullCursor;
- else
- {
- rc = dixLookupResourceByType((pointer *)&cursor, stuff->cursor, RT_CURSOR,
- client, DixUseAccess);
- if (rc != Success)
- {
- client->errorValue = stuff->cursor;
- return rc;
- }
- access_mode |= DixForceAccess;
- }
-
- ptr = PickPointer(client);
- modifierDevice = GetPairedDevice(ptr);
- if (stuff->pointerMode == GrabModeSync ||
- stuff->keyboardMode == GrabModeSync)
- access_mode |= DixFreezeAccess;
- rc = XaceHook(XACE_DEVICE_ACCESS, client, ptr, access_mode);
- if (rc != Success)
- return rc;
-
- memset(&param, 0, sizeof(param));
- param.grabtype = GRABTYPE_CORE;
- param.ownerEvents = stuff->ownerEvents;
- param.this_device_mode = stuff->keyboardMode;
- param.other_devices_mode = stuff->pointerMode;
- param.modifiers = stuff->modifiers;
-
- mask.core = stuff->eventMask;
-
- grab = CreateGrab(client->index, ptr, modifierDevice, pWin,
- GRABTYPE_CORE, &mask, &param, ButtonPress,
- stuff->button, confineTo, cursor);
- if (!grab)
- return BadAlloc;
- return AddPassiveGrabToList(client, grab);
-}
-
-/**
- * Server-side protocol handling for UngrabButton request.
- *
- * Deletes a passive grab on the client's ClientPointer from the list.
- */
-int
-ProcUngrabButton(ClientPtr client)
-{
- REQUEST(xUngrabButtonReq);
- WindowPtr pWin;
- GrabRec tempGrab;
- int rc;
- DeviceIntPtr ptr;
-
- REQUEST_SIZE_MATCH(xUngrabButtonReq);
- if ((stuff->modifiers != AnyModifier) &&
- (stuff->modifiers & ~AllModifiersMask))
- {
- client->errorValue = stuff->modifiers;
- return BadValue;
- }
- rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess);
- if (rc != Success)
- return rc;
-
- ptr = PickPointer(client);
-
- tempGrab.resource = client->clientAsMask;
- tempGrab.device = ptr;
- tempGrab.window = pWin;
- tempGrab.modifiersDetail.exact = stuff->modifiers;
- tempGrab.modifiersDetail.pMask = NULL;
- tempGrab.modifierDevice = GetPairedDevice(ptr);
- tempGrab.type = ButtonPress;
- tempGrab.detail.exact = stuff->button;
- tempGrab.grabtype = GRABTYPE_CORE;
- tempGrab.detail.pMask = NULL;
- tempGrab.next = NULL;
-
- if (!DeletePassiveGrabFromList(&tempGrab))
- return BadAlloc;
- return Success;
-}
-
-/**
- * Deactivate any grab that may be on the window, remove the focus.
- * Delete any XInput extension events from the window too. Does not change the
- * window mask. Use just before the window is deleted.
- *
- * If freeResources is set, passive grabs on the window are deleted.
- *
- * @param pWin The window to delete events from.
- * @param freeResources True if resources associated with the window should be
- * deleted.
- */
-void
-DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources)
-{
- WindowPtr parent;
- DeviceIntPtr mouse = inputInfo.pointer;
- DeviceIntPtr keybd = inputInfo.keyboard;
- FocusClassPtr focus;
- OtherClientsPtr oc;
- GrabPtr passive;
- GrabPtr grab;
-
-
- /* Deactivate any grabs performed on this window, before making any
- input focus changes. */
- grab = mouse->deviceGrab.grab;
- if (grab &&
- ((grab->window == pWin) || (grab->confineTo == pWin)))
- (*mouse->deviceGrab.DeactivateGrab)(mouse);
-
-
- /* Deactivating a keyboard grab should cause focus events. */
- grab = keybd->deviceGrab.grab;
- if (grab && (grab->window == pWin))
- (*keybd->deviceGrab.DeactivateGrab)(keybd);
-
- /* And now the real devices */
- for (mouse = inputInfo.devices; mouse; mouse = mouse->next)
- {
- grab = mouse->deviceGrab.grab;
- if (grab && ((grab->window == pWin) || (grab->confineTo == pWin)))
- (*mouse->deviceGrab.DeactivateGrab)(mouse);
- }
-
-
- for (keybd = inputInfo.devices; keybd; keybd = keybd->next)
- {
- if (IsKeyboardDevice(keybd))
- {
- focus = keybd->focus;
-
- /* If the focus window is a root window (ie. has no parent) then don't
- delete the focus from it. */
-
- if ((pWin == focus->win) && (pWin->parent != NullWindow))
- {
- int focusEventMode = NotifyNormal;
-
- /* If a grab is in progress, then alter the mode of focus events. */
-
- if (keybd->deviceGrab.grab)
- focusEventMode = NotifyWhileGrabbed;
-
- switch (focus->revert)
- {
- case RevertToNone:
- DoFocusEvents(keybd, pWin, NoneWin, focusEventMode);
- focus->win = NoneWin;
- focus->traceGood = 0;
- break;
- case RevertToParent:
- parent = pWin;
- do
- {
- parent = parent->parent;
- focus->traceGood--;
- } while (!parent->realized
- /* This would be a good protocol change -- windows being reparented
- during SaveSet processing would cause the focus to revert to the
- nearest enclosing window which will survive the death of the exiting
- client, instead of ending up reverting to a dying window and thence
- to None
- */
-#ifdef NOTDEF
- || wClient(parent)->clientGone
-#endif
- );
- if (!ActivateFocusInGrab(keybd, pWin, parent))
- DoFocusEvents(keybd, pWin, parent, focusEventMode);
- focus->win = parent;
- focus->revert = RevertToNone;
- break;
- case RevertToPointerRoot:
- if (!ActivateFocusInGrab(keybd, pWin, PointerRootWin))
- DoFocusEvents(keybd, pWin, PointerRootWin, focusEventMode);
- focus->win = PointerRootWin;
- focus->traceGood = 0;
- break;
- }
- }
- }
-
- if (IsPointerDevice(keybd))
- {
- if (keybd->valuator->motionHintWindow == pWin)
- keybd->valuator->motionHintWindow = NullWindow;
- }
- }
-
- if (freeResources)
- {
- if (pWin->dontPropagate)
- DontPropagateRefCnts[pWin->dontPropagate]--;
- while ( (oc = wOtherClients(pWin)) )
- FreeResource(oc->resource, RT_NONE);
- while ( (passive = wPassiveGrabs(pWin)) )
- FreeResource(passive->resource, RT_NONE);
- }
-
- DeleteWindowFromAnyExtEvents(pWin, freeResources);
-}
-
-/**
- * Call this whenever some window at or below pWin has changed geometry. If
- * there is a grab on the window, the cursor will be re-confined into the
- * window.
- */
-void
-CheckCursorConfinement(WindowPtr pWin)
-{
- GrabPtr grab;
- WindowPtr confineTo;
- DeviceIntPtr pDev;
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return;
-#endif
-
- for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
- {
- if (DevHasCursor(pDev))
- {
- grab = pDev->deviceGrab.grab;
- if (grab && (confineTo = grab->confineTo))
- {
- if (!BorderSizeNotEmpty(pDev, confineTo))
- (*pDev->deviceGrab.DeactivateGrab)(pDev);
- else if ((pWin == confineTo) || IsParent(pWin, confineTo))
- ConfineCursorToWindow(pDev, confineTo, TRUE, TRUE);
- }
- }
- }
-}
-
-Mask
-EventMaskForClient(WindowPtr pWin, ClientPtr client)
-{
- OtherClientsPtr other;
-
- if (wClient (pWin) == client)
- return pWin->eventMask;
- for (other = wOtherClients(pWin); other; other = other->next)
- {
- if (SameClient(other, client))
- return other->mask;
- }
- return 0;
-}
-
-/**
- * Server-side protocol handling for RecolorCursor request.
- */
-int
-ProcRecolorCursor(ClientPtr client)
-{
- CursorPtr pCursor;
- int rc, nscr;
- ScreenPtr pscr;
- Bool displayed;
- SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite;
- REQUEST(xRecolorCursorReq);
-
- REQUEST_SIZE_MATCH(xRecolorCursorReq);
- rc = dixLookupResourceByType((pointer *)&pCursor, stuff->cursor, RT_CURSOR,
- client, DixWriteAccess);
- if (rc != Success)
- {
- client->errorValue = stuff->cursor;
- return rc;
- }
-
- pCursor->foreRed = stuff->foreRed;
- pCursor->foreGreen = stuff->foreGreen;
- pCursor->foreBlue = stuff->foreBlue;
-
- pCursor->backRed = stuff->backRed;
- pCursor->backGreen = stuff->backGreen;
- pCursor->backBlue = stuff->backBlue;
-
- for (nscr = 0; nscr < screenInfo.numScreens; nscr++)
- {
- pscr = screenInfo.screens[nscr];
-#ifdef PANORAMIX
- if(!noPanoramiXExtension)
- displayed = (pscr == pSprite->screen);
- else
-#endif
- displayed = (pscr == pSprite->hotPhys.pScreen);
- ( *pscr->RecolorCursor)(PickPointer(client), pscr, pCursor,
- (pCursor == pSprite->current) && displayed);
- }
- return Success;
-}
-
-/**
- * Write the given events to a client, swapping the byte order if necessary.
- * To swap the byte ordering, a callback is called that has to be set up for
- * the given event type.
- *
- * In the case of DeviceMotionNotify trailed by DeviceValuators, the events
- * can be more than one. Usually it's just one event.
- *
- * Do not modify the event structure passed in. See comment below.
- *
- * @param pClient Client to send events to.
- * @param count Number of events.
- * @param events The event list.
- */
-void
-WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
-{
-#ifdef PANORAMIX
- xEvent eventCopy;
-#endif
- xEvent *eventTo, *eventFrom;
- int i,
- eventlength = sizeof(xEvent);
-
- if (!pClient || pClient == serverClient || pClient->clientGone)
- return;
-
- for (i = 0; i < count; i++)
- if ((events[i].u.u.type & 0x7f) != KeymapNotify)
- events[i].u.u.sequenceNumber = pClient->sequence;
-
- /* Let XKB rewrite the state, as it depends on client preferences. */
- XkbFilterEvents(pClient, count, events);
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension &&
- (screenInfo.screens[0]->x || screenInfo.screens[0]->y))
- {
- switch(events->u.u.type) {
- case MotionNotify:
- case ButtonPress:
- case ButtonRelease:
- case KeyPress:
- case KeyRelease:
- case EnterNotify:
- case LeaveNotify:
- /*
- When multiple clients want the same event DeliverEventsToWindow
- passes the same event structure multiple times so we can't
- modify the one passed to us
- */
- count = 1; /* should always be 1 */
- memcpy(&eventCopy, events, sizeof(xEvent));
- eventCopy.u.keyButtonPointer.rootX += screenInfo.screens[0]->x;
- eventCopy.u.keyButtonPointer.rootY += screenInfo.screens[0]->y;
- if(eventCopy.u.keyButtonPointer.event ==
- eventCopy.u.keyButtonPointer.root)
- {
- eventCopy.u.keyButtonPointer.eventX += screenInfo.screens[0]->x;
- eventCopy.u.keyButtonPointer.eventY += screenInfo.screens[0]->y;
- }
- events = &eventCopy;
- break;
- default: break;
- }
- }
-#endif
-
- if (EventCallback)
- {
- EventInfoRec eventinfo;
- eventinfo.client = pClient;
- eventinfo.events = events;
- eventinfo.count = count;
- CallCallbacks(&EventCallback, (pointer)&eventinfo);
- }
-#ifdef XSERVER_DTRACE
- if (XSERVER_SEND_EVENT_ENABLED()) {
- for (i = 0; i < count; i++)
- {
- XSERVER_SEND_EVENT(pClient->index, events[i].u.u.type, &events[i]);
- }
- }
-#endif
- /* Just a safety check to make sure we only have one GenericEvent, it just
- * makes things easier for me right now. (whot) */
- for (i = 1; i < count; i++)
- {
- if (events[i].u.u.type == GenericEvent)
- {
- ErrorF("[dix] TryClientEvents: Only one GenericEvent at a time.\n");
- return;
- }
- }
-
- if (events->u.u.type == GenericEvent)
- {
- eventlength += ((xGenericEvent*)events)->length * 4;
- }
-
- if(pClient->swapped)
- {
- if (eventlength > swapEventLen)
- {
- swapEventLen = eventlength;
- swapEvent = realloc(swapEvent, swapEventLen);
- if (!swapEvent)
- {
- FatalError("WriteEventsToClient: Out of memory.\n");
- return;
- }
- }
-
- for(i = 0; i < count; i++)
- {
- eventFrom = &events[i];
- eventTo = swapEvent;
-
- /* Remember to strip off the leading bit of type in case
- this event was sent with "SendEvent." */
- (*EventSwapVector[eventFrom->u.u.type & 0177])
- (eventFrom, eventTo);
-
- WriteToClient(pClient, eventlength, (char *)eventTo);
- }
- }
- else
- {
- /* only one GenericEvent, remember? that means either count is 1 and
- * eventlength is arbitrary or eventlength is 32 and count doesn't
- * matter. And we're all set. Woohoo. */
- WriteToClient(pClient, count * eventlength, (char *) events);
- }
-}
-
-/*
- * Set the client pointer for the given client.
- *
- * A client can have exactly one ClientPointer. Each time a
- * request/reply/event is processed and the choice of devices is ambiguous
- * (e.g. QueryPointer request), the server will pick the ClientPointer (see
- * PickPointer()).
- * If a keyboard is needed, the first keyboard paired with the CP is used.
- */
-int
-SetClientPointer(ClientPtr client, DeviceIntPtr device)
-{
- int rc = XaceHook(XACE_DEVICE_ACCESS, client, device, DixUseAccess);
- if (rc != Success)
- return rc;
-
- if (!IsMaster(device))
- {
- ErrorF("[dix] Need master device for ClientPointer. This is a bug.\n");
- return BadDevice;
- } else if (!device->spriteInfo->spriteOwner)
- {
- ErrorF("[dix] Device %d does not have a sprite. "
- "Cannot be ClientPointer\n", device->id);
- return BadDevice;
- }
- client->clientPtr = device;
- return Success;
-}
-
-/* PickPointer will pick an appropriate pointer for the given client.
- *
- * An "appropriate device" is (in order of priority):
- * 1) A device the given client has a core grab on.
- * 2) A device set as ClientPointer for the given client.
- * 3) The first master device.
- */
-DeviceIntPtr
-PickPointer(ClientPtr client)
-{
- DeviceIntPtr it = inputInfo.devices;
-
- /* First, check if the client currently has a grab on a device. Even
- * keyboards count. */
- for(it = inputInfo.devices; it; it = it->next)
- {
- GrabPtr grab = it->deviceGrab.grab;
- if (grab && grab->grabtype == GRABTYPE_CORE && SameClient(grab, client))
- {
- it = GetMaster(it, MASTER_POINTER);
- return it; /* Always return a core grabbed device */
- }
- }
-
- if (!client->clientPtr)
- {
- DeviceIntPtr it = inputInfo.devices;
- while (it)
- {
- if (IsMaster(it) && it->spriteInfo->spriteOwner)
- {
- client->clientPtr = it;
- break;
- }
- it = it->next;
- }
- }
- return client->clientPtr;
-}
-
-/* PickKeyboard will pick an appropriate keyboard for the given client by
- * searching the list of devices for the keyboard device that is paired with
- * the client's pointer.
- */
-DeviceIntPtr
-PickKeyboard(ClientPtr client)
-{
- DeviceIntPtr ptr = PickPointer(client);
- DeviceIntPtr kbd = GetMaster(ptr, MASTER_KEYBOARD);
-
- if (!kbd)
- {
- ErrorF("[dix] ClientPointer not paired with a keyboard. This "
- "is a bug.\n");
- }
-
- return kbd;
-}
-
-/* A client that has one or more core grabs does not get core events from
- * devices it does not have a grab on. Legacy applications behave bad
- * otherwise because they are not used to it and the events interfere.
- * Only applies for core events.
- *
- * Return true if a core event from the device would interfere and should not
- * be delivered.
- */
-Bool
-IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event)
-{
- DeviceIntPtr it = inputInfo.devices;
-
- switch(event->u.u.type)
- {
- case KeyPress:
- case KeyRelease:
- case ButtonPress:
- case ButtonRelease:
- case MotionNotify:
- case EnterNotify:
- case LeaveNotify:
- break;
- default:
- return FALSE;
- }
-
- if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client))
- return FALSE;
-
- while(it)
- {
- if (it != dev)
- {
- if (it->deviceGrab.grab && SameClient(it->deviceGrab.grab, client)
- && !it->deviceGrab.fromPassiveGrab)
- {
- if ((IsPointerDevice(it) && IsPointerDevice(dev)) ||
- (IsKeyboardDevice(it) && IsKeyboardDevice(dev)))
- return TRUE;
- }
- }
- it = it->next;
- }
-
- return FALSE;
-}
-
+/************************************************************
+
+Copyright 1987, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+/* The panoramix components contained the following notice */
+/*****************************************************************
+
+Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+
+******************************************************************/
+
+/*
+ * Copyright (c) 2003-2005, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file events.c
+ * This file handles event delivery and a big part of the server-side protocol
+ * handling (the parts for input devices).
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <X11/X.h>
+#include "misc.h"
+#include "resource.h"
+#include <X11/Xproto.h>
+#include "windowstr.h"
+#include "inputstr.h"
+#include "scrnintstr.h"
+#include "cursorstr.h"
+
+#include "dixstruct.h"
+#ifdef PANORAMIX
+#include "panoramiX.h"
+#include "panoramiXsrv.h"
+#endif
+#include "globals.h"
+
+#include <X11/extensions/XKBproto.h>
+#include "xkbsrv.h"
+#include "xace.h"
+
+#ifdef XSERVER_DTRACE
+#include <sys/types.h>
+typedef const char *string;
+#include "Xserver-dtrace.h"
+#endif
+
+#include <X11/extensions/XIproto.h>
+#include <X11/extensions/XI2proto.h>
+#include <X11/extensions/XI.h>
+#include <X11/extensions/XI2.h>
+#include "exglobals.h"
+#include "exevents.h"
+#include "exglobals.h"
+#include "extnsionst.h"
+
+#include "dixevents.h"
+#include "dixgrabs.h"
+#include "dispatch.h"
+
+#include <X11/extensions/ge.h>
+#include "geext.h"
+#include "geint.h"
+
+#include "eventstr.h"
+#include "enterleave.h"
+#include "eventconvert.h"
+
+/* Extension events type numbering starts at EXTENSION_EVENT_BASE. */
+#define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */
+#define StructureAndSubMask ( StructureNotifyMask | SubstructureNotifyMask )
+#define AllButtonsMask ( \
+ Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask )
+#define MotionMask ( \
+ PointerMotionMask | Button1MotionMask | \
+ Button2MotionMask | Button3MotionMask | Button4MotionMask | \
+ Button5MotionMask | ButtonMotionMask )
+#define PropagateMask ( \
+ KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | \
+ MotionMask )
+#define PointerGrabMask ( \
+ ButtonPressMask | ButtonReleaseMask | \
+ EnterWindowMask | LeaveWindowMask | \
+ PointerMotionHintMask | KeymapStateMask | \
+ MotionMask )
+#define AllModifiersMask ( \
+ ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \
+ Mod3Mask | Mod4Mask | Mod5Mask )
+#define LastEventMask OwnerGrabButtonMask
+#define AllEventMasks (LastEventMask|(LastEventMask-1))
+
+
+#define CORE_EVENT(event) \
+ (!((event)->u.u.type & EXTENSION_EVENT_BASE) && \
+ (event)->u.u.type != GenericEvent)
+#define XI2_EVENT(event) \
+ (((event)->u.u.type == GenericEvent) && \
+ ((xGenericEvent*)(event))->extension == IReqCode)
+
+/**
+ * Used to indicate a implicit passive grab created by a ButtonPress event.
+ * See DeliverEventsToWindow().
+ */
+#define ImplicitGrabMask (1 << 7)
+
+#define WID(w) ((w) ? ((w)->drawable.id) : 0)
+
+#define XE_KBPTR (xE->u.keyButtonPointer)
+
+
+CallbackListPtr EventCallback;
+CallbackListPtr DeviceEventCallback;
+
+#define DNPMCOUNT 8
+
+Mask DontPropagateMasks[DNPMCOUNT];
+static int DontPropagateRefCnts[DNPMCOUNT];
+
+static void CheckVirtualMotion( DeviceIntPtr pDev, QdEventPtr qe, WindowPtr pWin);
+static void CheckPhysLimits(DeviceIntPtr pDev,
+ CursorPtr cursor,
+ Bool generateEvents,
+ Bool confineToScreen,
+ ScreenPtr pScreen);
+
+/** Key repeat hack. Do not use but in TryClientEvents */
+extern BOOL EventIsKeyRepeat(xEvent *event);
+
+/**
+ * Main input device struct.
+ * inputInfo.pointer
+ * is the core pointer. Referred to as "virtual core pointer", "VCP",
+ * "core pointer" or inputInfo.pointer. The VCP is the first master
+ * pointer device and cannot be deleted.
+ *
+ * inputInfo.keyboard
+ * is the core keyboard ("virtual core keyboard", "VCK", "core keyboard").
+ * See inputInfo.pointer.
+ *
+ * inputInfo.devices
+ * linked list containing all devices including VCP and VCK.
+ *
+ * inputInfo.off_devices
+ * Devices that have not been initialized and are thus turned off.
+ *
+ * inputInfo.numDevices
+ * Total number of devices.
+ *
+ * inputInfo.all_devices
+ * Virtual device used for XIAllDevices passive grabs. This device is
+ * not part of the inputInfo.devices list and mostly unset except for
+ * the deviceid. It exists because passivegrabs need a valid device
+ * reference.
+ *
+ * inputInfo.all_master_devices
+ * Virtual device used for XIAllMasterDevices passive grabs. This device
+ * is not part of the inputInfo.devices list and mostly unset except for
+ * the deviceid. It exists because passivegrabs need a valid device
+ * reference.
+ */
+InputInfo inputInfo;
+
+EventSyncInfoRec syncEvents;
+
+/**
+ * The root window the given device is currently on.
+ */
+#define RootWindow(sprite) sprite->spriteTrace[0]
+
+static xEvent* swapEvent = NULL;
+static int swapEventLen = 0;
+
+void
+NotImplemented(xEvent *from, xEvent *to)
+{
+ FatalError("Not implemented");
+}
+
+/**
+ * Convert the given event type from an XI event to a core event.
+ * @param[in] The XI 1.x event type.
+ * @return The matching core event type or 0 if there is none.
+ */
+int
+XItoCoreType(int xitype)
+{
+ int coretype = 0;
+ if (xitype == DeviceMotionNotify)
+ coretype = MotionNotify;
+ else if (xitype == DeviceButtonPress)
+ coretype = ButtonPress;
+ else if (xitype == DeviceButtonRelease)
+ coretype = ButtonRelease;
+ else if (xitype == DeviceKeyPress)
+ coretype = KeyPress;
+ else if (xitype == DeviceKeyRelease)
+ coretype = KeyRelease;
+
+ return coretype;
+}
+
+/**
+ * @return true if the device owns a cursor, false if device shares a cursor
+ * sprite with another device.
+ */
+Bool
+DevHasCursor(DeviceIntPtr pDev)
+{
+ return pDev->spriteInfo->spriteOwner;
+}
+
+/*
+ * @return true if a device is a pointer, check is the same as used by XI to
+ * fill the 'use' field.
+ */
+Bool
+IsPointerDevice(DeviceIntPtr dev)
+{
+ return (dev->type == MASTER_POINTER) ||
+ (dev->valuator && dev->button) ||
+ (dev->valuator && !dev->key);
+}
+
+/*
+ * @return true if a device is a keyboard, check is the same as used by XI to
+ * fill the 'use' field.
+ *
+ * Some pointer devices have keys as well (e.g. multimedia keys). Try to not
+ * count them as keyboard devices.
+ */
+Bool
+IsKeyboardDevice(DeviceIntPtr dev)
+{
+ return (dev->type == MASTER_KEYBOARD) ||
+ ((dev->key && dev->kbdfeed) && !IsPointerDevice(dev));
+}
+
+Bool
+IsMaster(DeviceIntPtr dev)
+{
+ return dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD;
+}
+
+Bool
+IsFloating(DeviceIntPtr dev)
+{
+ return GetMaster(dev, MASTER_KEYBOARD) == NULL;
+}
+
+
+/**
+ * Max event opcode.
+ */
+extern int lastEvent;
+
+extern int DeviceMotionNotify;
+
+#define CantBeFiltered NoEventMask
+/**
+ * Event masks for each event type.
+ *
+ * One set of filters for each device, but only the first layer
+ * is initialized. The rest is memcpy'd in InitEvents.
+ *
+ * Filters are used whether a given event may be delivered to a client,
+ * usually in the form of if (window-event-mask & filter); then deliver event.
+ *
+ * One notable filter is for PointerMotion/DevicePointerMotion events. Each
+ * time a button is pressed, the filter is modified to also contain the
+ * matching ButtonXMotion mask.
+ */
+static Mask filters[MAXDEVICES][128] = {
+{
+ NoSuchEvent, /* 0 */
+ NoSuchEvent, /* 1 */
+ KeyPressMask, /* KeyPress */
+ KeyReleaseMask, /* KeyRelease */
+ ButtonPressMask, /* ButtonPress */
+ ButtonReleaseMask, /* ButtonRelease */
+ PointerMotionMask, /* MotionNotify (initial state) */
+ EnterWindowMask, /* EnterNotify */
+ LeaveWindowMask, /* LeaveNotify */
+ FocusChangeMask, /* FocusIn */
+ FocusChangeMask, /* FocusOut */
+ KeymapStateMask, /* KeymapNotify */
+ ExposureMask, /* Expose */
+ CantBeFiltered, /* GraphicsExpose */
+ CantBeFiltered, /* NoExpose */
+ VisibilityChangeMask, /* VisibilityNotify */
+ SubstructureNotifyMask, /* CreateNotify */
+ StructureAndSubMask, /* DestroyNotify */
+ StructureAndSubMask, /* UnmapNotify */
+ StructureAndSubMask, /* MapNotify */
+ SubstructureRedirectMask, /* MapRequest */
+ StructureAndSubMask, /* ReparentNotify */
+ StructureAndSubMask, /* ConfigureNotify */
+ SubstructureRedirectMask, /* ConfigureRequest */
+ StructureAndSubMask, /* GravityNotify */
+ ResizeRedirectMask, /* ResizeRequest */
+ StructureAndSubMask, /* CirculateNotify */
+ SubstructureRedirectMask, /* CirculateRequest */
+ PropertyChangeMask, /* PropertyNotify */
+ CantBeFiltered, /* SelectionClear */
+ CantBeFiltered, /* SelectionRequest */
+ CantBeFiltered, /* SelectionNotify */
+ ColormapChangeMask, /* ColormapNotify */
+ CantBeFiltered, /* ClientMessage */
+ CantBeFiltered /* MappingNotify */
+}};
+
+/**
+ * For the given event, return the matching event filter. This filter may then
+ * be AND'ed with the selected event mask.
+ *
+ * For XI2 events, the returned filter is simply the byte containing the event
+ * mask we're interested in. E.g. for a mask of (1 << 13), this would be
+ * byte[1].
+ *
+ * @param[in] dev The device the event belongs to, may be NULL.
+ * @param[in] event The event to get the filter for. Only the type of the
+ * event matters, or the extension + evtype for GenericEvents.
+ * @return The filter mask for the given event.
+ *
+ * @see GetEventMask
+ */
+Mask
+GetEventFilter(DeviceIntPtr dev, xEvent *event)
+{
+ if (event->u.u.type != GenericEvent)
+ return filters[dev ? dev->id : 0][event->u.u.type];
+ else if (XI2_EVENT(event))
+ return (1 << (((xXIDeviceEvent*)event)->evtype % 8));
+ ErrorF("[dix] Unknown device type %d. No filter\n", event->u.u.type);
+ return 0;
+}
+
+/**
+ * Return the windows complete XI2 mask for the given XI2 event type.
+ */
+Mask
+GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev)
+{
+ OtherInputMasks *inputMasks = wOtherInputMasks(win);
+ int filter;
+ int evtype;
+
+ if (!inputMasks || !XI2_EVENT(ev))
+ return 0;
+
+ evtype = ((xGenericEvent*)ev)->evtype;
+ filter = GetEventFilter(dev, ev);
+
+ return ((inputMasks->xi2mask[dev->id][evtype/8] & filter) ||
+ inputMasks->xi2mask[XIAllDevices][evtype/8] ||
+ (inputMasks->xi2mask[XIAllMasterDevices][evtype/8] && IsMaster(dev)));
+}
+
+Mask
+GetEventMask(DeviceIntPtr dev, xEvent *event, InputClients* other)
+{
+ /* XI2 filters are only ever 8 bit, so let's return a 8 bit mask */
+ if (XI2_EVENT(event))
+ {
+ int byte = ((xGenericEvent*)event)->evtype / 8;
+ return (other->xi2mask[dev->id][byte] |
+ other->xi2mask[XIAllDevices][byte] |
+ (IsMaster(dev)? other->xi2mask[XIAllMasterDevices][byte] : 0));
+ } else if (CORE_EVENT(event))
+ return other->mask[XIAllDevices];
+ else
+ return other->mask[dev->id];
+}
+
+
+static CARD8 criticalEvents[32] =
+{
+ 0x7c, 0x30, 0x40 /* key, button, expose, and configure events */
+};
+
+static void
+SyntheticMotion(DeviceIntPtr dev, int x, int y) {
+ int screenno = 0;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension)
+ screenno = dev->spriteInfo->sprite->screen->myNum;
+#endif
+ PostSyntheticMotion(dev, x, y, screenno,
+ (syncEvents.playingEvents) ? syncEvents.time.milliseconds : currentTime.milliseconds);
+
+}
+
+#ifdef PANORAMIX
+static void PostNewCursor(DeviceIntPtr pDev);
+
+static Bool
+pointOnScreen(ScreenPtr pScreen, int x, int y)
+{
+ return x >= pScreen->x && x < pScreen->x + pScreen->width &&
+ y >= pScreen->y && y < pScreen->y + pScreen->height;
+}
+
+static Bool
+XineramaSetCursorPosition(
+ DeviceIntPtr pDev,
+ int x,
+ int y,
+ Bool generateEvent
+){
+ ScreenPtr pScreen;
+ int i;
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+
+ /* x,y are in Screen 0 coordinates. We need to decide what Screen
+ to send the message too and what the coordinates relative to
+ that screen are. */
+
+ pScreen = pSprite->screen;
+ x += screenInfo.screens[0]->x;
+ y += screenInfo.screens[0]->y;
+
+ if(!pointOnScreen(pScreen, x, y))
+ {
+ FOR_NSCREENS(i)
+ {
+ if(i == pScreen->myNum)
+ continue;
+ if(pointOnScreen(screenInfo.screens[i], x, y))
+ {
+ pScreen = screenInfo.screens[i];
+ break;
+ }
+ }
+ }
+
+ pSprite->screen = pScreen;
+ pSprite->hotPhys.x = x - screenInfo.screens[0]->x;
+ pSprite->hotPhys.y = y - screenInfo.screens[0]->y;
+ x -= pScreen->x;
+ y -= pScreen->y;
+
+ return (*pScreen->SetCursorPosition)(pDev, pScreen, x, y, generateEvent);
+}
+
+
+static void
+XineramaConstrainCursor(DeviceIntPtr pDev)
+{
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+ ScreenPtr pScreen;
+ BoxRec newBox;
+
+ pScreen = pSprite->screen;
+ newBox = pSprite->physLimits;
+
+ /* Translate the constraining box to the screen
+ the sprite is actually on */
+ newBox.x1 += screenInfo.screens[0]->x - pScreen->x;
+ newBox.x2 += screenInfo.screens[0]->x - pScreen->x;
+ newBox.y1 += screenInfo.screens[0]->y - pScreen->y;
+ newBox.y2 += screenInfo.screens[0]->y - pScreen->y;
+
+ (* pScreen->ConstrainCursor)(pDev, pScreen, &newBox);
+}
+
+
+static Bool
+XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin)
+{
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+
+ if(pWin == screenInfo.screens[0]->root) {
+ int i;
+ for (i = 0; i < PanoramiXNumScreens; i++)
+ pSprite->windows[i] = screenInfo.screens[i]->root;
+ } else {
+ PanoramiXRes *win;
+ int rc, i;
+
+ rc = dixLookupResourceByType((pointer *)&win, pWin->drawable.id,
+ XRT_WINDOW, serverClient, DixReadAccess);
+ if (rc != Success)
+ return FALSE;
+
+ for(i = 0; i < PanoramiXNumScreens; i++) {
+ rc = dixLookupWindow(pSprite->windows + i, win->info[i].id,
+ serverClient, DixReadAccess);
+ if (rc != Success) /* window is being unmapped */
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+static void
+XineramaConfineCursorToWindow(DeviceIntPtr pDev,
+ WindowPtr pWin,
+ Bool generateEvents)
+{
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+
+ int x, y, off_x, off_y, i;
+
+ if(!XineramaSetWindowPntrs(pDev, pWin))
+ return;
+
+ i = PanoramiXNumScreens - 1;
+
+ RegionCopy(&pSprite->Reg1,
+ &pSprite->windows[i]->borderSize);
+ off_x = screenInfo.screens[i]->x;
+ off_y = screenInfo.screens[i]->y;
+
+ while(i--) {
+ x = off_x - screenInfo.screens[i]->x;
+ y = off_y - screenInfo.screens[i]->y;
+
+ if(x || y)
+ RegionTranslate(&pSprite->Reg1, x, y);
+
+ RegionUnion(&pSprite->Reg1, &pSprite->Reg1,
+ &pSprite->windows[i]->borderSize);
+
+ off_x = screenInfo.screens[i]->x;
+ off_y = screenInfo.screens[i]->y;
+ }
+
+ pSprite->hotLimits = *RegionExtents(&pSprite->Reg1);
+
+ if(RegionNumRects(&pSprite->Reg1) > 1)
+ pSprite->hotShape = &pSprite->Reg1;
+ else
+ pSprite->hotShape = NullRegion;
+
+ pSprite->confined = FALSE;
+ pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin;
+
+ CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
+}
+
+#endif /* PANORAMIX */
+
+/**
+ * Modifies the filter for the given protocol event type to the given masks.
+ *
+ * There's only two callers: UpdateDeviceState() and XI's SetMaskForExtEvent().
+ * The latter initialises masks for the matching XI events, it's a once-off
+ * setting.
+ * UDS however changes the mask for MotionNotify and DeviceMotionNotify each
+ * time a button is pressed to include the matching ButtonXMotion mask in the
+ * filter.
+ *
+ * @param[in] deviceid The device to modify the filter for.
+ * @param[in] mask The new filter mask.
+ * @param[in] event Protocol event type.
+ */
+void
+SetMaskForEvent(int deviceid, Mask mask, int event)
+{
+ if (deviceid < 0 || deviceid >= MAXDEVICES)
+ FatalError("SetMaskForEvent: bogus device id");
+ filters[deviceid][event] = mask;
+}
+
+void
+SetCriticalEvent(int event)
+{
+ if (event >= 128)
+ FatalError("SetCriticalEvent: bogus event number");
+ criticalEvents[event >> 3] |= 1 << (event & 7);
+}
+
+void
+ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py)
+{
+ BoxRec box;
+ int x = *px, y = *py;
+ int incx = 1, incy = 1;
+ SpritePtr pSprite;
+
+ pSprite = pDev->spriteInfo->sprite;
+ if (RegionContainsPoint(shape, x, y, &box))
+ return;
+ box = *RegionExtents(shape);
+ /* this is rather crude */
+ do {
+ x += incx;
+ if (x >= box.x2)
+ {
+ incx = -1;
+ x = *px - 1;
+ }
+ else if (x < box.x1)
+ {
+ incx = 1;
+ x = *px;
+ y += incy;
+ if (y >= box.y2)
+ {
+ incy = -1;
+ y = *py - 1;
+ }
+ else if (y < box.y1)
+ return; /* should never get here! */
+ }
+ } while (!RegionContainsPoint(shape, x, y, &box));
+ *px = x;
+ *py = y;
+}
+
+static void
+CheckPhysLimits(
+ DeviceIntPtr pDev,
+ CursorPtr cursor,
+ Bool generateEvents,
+ Bool confineToScreen, /* unused if PanoramiX on */
+ ScreenPtr pScreen) /* unused if PanoramiX on */
+{
+ HotSpot new;
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+
+ if (!cursor)
+ return;
+ new = pSprite->hotPhys;
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension)
+ /* I don't care what the DDX has to say about it */
+ pSprite->physLimits = pSprite->hotLimits;
+ else
+#endif
+ {
+ if (pScreen)
+ new.pScreen = pScreen;
+ else
+ pScreen = new.pScreen;
+ (*pScreen->CursorLimits) (pDev, pScreen, cursor, &pSprite->hotLimits,
+ &pSprite->physLimits);
+ pSprite->confined = confineToScreen;
+ (* pScreen->ConstrainCursor)(pDev, pScreen, &pSprite->physLimits);
+ }
+
+ /* constrain the pointer to those limits */
+ if (new.x < pSprite->physLimits.x1)
+ new.x = pSprite->physLimits.x1;
+ else
+ if (new.x >= pSprite->physLimits.x2)
+ new.x = pSprite->physLimits.x2 - 1;
+ if (new.y < pSprite->physLimits.y1)
+ new.y = pSprite->physLimits.y1;
+ else
+ if (new.y >= pSprite->physLimits.y2)
+ new.y = pSprite->physLimits.y2 - 1;
+ if (pSprite->hotShape)
+ ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y);
+ if ((
+#ifdef PANORAMIX
+ noPanoramiXExtension &&
+#endif
+ (pScreen != pSprite->hotPhys.pScreen)) ||
+ (new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y))
+ {
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension)
+ {
+ if (pScreen && ((new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)))
+ XineramaSetCursorPosition (pDev, new.x, new.y, generateEvents);
+ }
+ else
+#endif
+ {
+ if (pScreen != pSprite->hotPhys.pScreen)
+ pSprite->hotPhys = new;
+ (*pScreen->SetCursorPosition)
+ (pDev, pScreen, new.x, new.y, generateEvents);
+ }
+ if (!generateEvents)
+ SyntheticMotion(pDev, new.x, new.y);
+ }
+
+#ifdef PANORAMIX
+ /* Tell DDX what the limits are */
+ if (!noPanoramiXExtension)
+ XineramaConstrainCursor(pDev);
+#endif
+}
+
+static void
+CheckVirtualMotion(
+ DeviceIntPtr pDev,
+ QdEventPtr qe,
+ WindowPtr pWin)
+{
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+ RegionPtr reg = NULL;
+ DeviceEvent *ev = NULL;
+
+ if (qe)
+ {
+ ev = &qe->event->device_event;
+ switch(ev->type)
+ {
+ case ET_Motion:
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ case ET_KeyPress:
+ case ET_KeyRelease:
+ case ET_ProximityIn:
+ case ET_ProximityOut:
+ pSprite->hot.pScreen = qe->pScreen;
+ pSprite->hot.x = ev->root_x;
+ pSprite->hot.y = ev->root_y;
+ pWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab->confineTo : NullWindow;
+ break;
+ default:
+ break;
+ }
+ }
+ if (pWin)
+ {
+ BoxRec lims;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ int x, y, off_x, off_y, i;
+
+ if(!XineramaSetWindowPntrs(pDev, pWin))
+ return;
+
+ i = PanoramiXNumScreens - 1;
+
+ RegionCopy(&pSprite->Reg2,
+ &pSprite->windows[i]->borderSize);
+ off_x = screenInfo.screens[i]->x;
+ off_y = screenInfo.screens[i]->y;
+
+ while(i--) {
+ x = off_x - screenInfo.screens[i]->x;
+ y = off_y - screenInfo.screens[i]->y;
+
+ if(x || y)
+ RegionTranslate(&pSprite->Reg2, x, y);
+
+ RegionUnion(&pSprite->Reg2, &pSprite->Reg2,
+ &pSprite->windows[i]->borderSize);
+
+ off_x = screenInfo.screens[i]->x;
+ off_y = screenInfo.screens[i]->y;
+ }
+ } else
+#endif
+ {
+ if (pSprite->hot.pScreen != pWin->drawable.pScreen)
+ {
+ pSprite->hot.pScreen = pWin->drawable.pScreen;
+ pSprite->hot.x = pSprite->hot.y = 0;
+ }
+ }
+
+ lims = *RegionExtents(&pWin->borderSize);
+ if (pSprite->hot.x < lims.x1)
+ pSprite->hot.x = lims.x1;
+ else if (pSprite->hot.x >= lims.x2)
+ pSprite->hot.x = lims.x2 - 1;
+ if (pSprite->hot.y < lims.y1)
+ pSprite->hot.y = lims.y1;
+ else if (pSprite->hot.y >= lims.y2)
+ pSprite->hot.y = lims.y2 - 1;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension)
+ {
+ if (RegionNumRects(&pSprite->Reg2) > 1)
+ reg = &pSprite->Reg2;
+
+ } else
+#endif
+ {
+ if (wBoundingShape(pWin))
+ reg = &pWin->borderSize;
+ }
+
+ if (reg)
+ ConfineToShape(pDev, reg, &pSprite->hot.x, &pSprite->hot.y);
+
+ if (qe && ev)
+ {
+ qe->pScreen = pSprite->hot.pScreen;
+ ev->root_x = pSprite->hot.x;
+ ev->root_y = pSprite->hot.y;
+ }
+ }
+#ifdef PANORAMIX
+ if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */
+#endif
+ RootWindow(pDev->spriteInfo->sprite) = pSprite->hot.pScreen->root;
+}
+
+static void
+ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
+{
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+
+ if (syncEvents.playingEvents)
+ {
+ CheckVirtualMotion(pDev, (QdEventPtr)NULL, pWin);
+ SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y);
+ }
+ else
+ {
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension) {
+ XineramaConfineCursorToWindow(pDev, pWin, generateEvents);
+ return;
+ }
+#endif
+ pSprite->hotLimits = *RegionExtents(&pWin->borderSize);
+ pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize
+ : NullRegion;
+ CheckPhysLimits(pDev, pSprite->current, generateEvents,
+ confineToScreen, pWin->drawable.pScreen);
+ }
+}
+
+Bool
+PointerConfinedToScreen(DeviceIntPtr pDev)
+{
+ return pDev->spriteInfo->sprite->confined;
+}
+
+/**
+ * Update the sprite cursor to the given cursor.
+ *
+ * ChangeToCursor() will display the new cursor and free the old cursor (if
+ * applicable). If the provided cursor is already the updated cursor, nothing
+ * happens.
+ */
+static void
+ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor)
+{
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+ ScreenPtr pScreen;
+
+ if (cursor != pSprite->current)
+ {
+ if ((pSprite->current->bits->xhot != cursor->bits->xhot) ||
+ (pSprite->current->bits->yhot != cursor->bits->yhot))
+ CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined,
+ (ScreenPtr)NULL);
+#ifdef PANORAMIX
+ /* XXX: is this really necessary?? (whot) */
+ if (!noPanoramiXExtension)
+ pScreen = pSprite->screen;
+ else
+#endif
+ pScreen = pSprite->hotPhys.pScreen;
+
+ (*pScreen->DisplayCursor)(pDev, pScreen, cursor);
+ FreeCursor(pSprite->current, (Cursor)0);
+ pSprite->current = cursor;
+ pSprite->current->refcnt++;
+ }
+}
+
+/**
+ * @returns true if b is a descendent of a
+ */
+Bool
+IsParent(WindowPtr a, WindowPtr b)
+{
+ for (b = b->parent; b; b = b->parent)
+ if (b == a) return TRUE;
+ return FALSE;
+}
+
+/**
+ * Update the cursor displayed on the screen.
+ *
+ * Called whenever a cursor may have changed shape or position.
+ */
+static void
+PostNewCursor(DeviceIntPtr pDev)
+{
+ WindowPtr win;
+ GrabPtr grab = pDev->deviceGrab.grab;
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+ CursorPtr pCursor;
+
+ if (syncEvents.playingEvents)
+ return;
+ if (grab)
+ {
+ if (grab->cursor)
+ {
+ ChangeToCursor(pDev, grab->cursor);
+ return;
+ }
+ if (IsParent(grab->window, pSprite->win))
+ win = pSprite->win;
+ else
+ win = grab->window;
+ }
+ else
+ win = pSprite->win;
+ for (; win; win = win->parent)
+ {
+ if (win->optional)
+ {
+ pCursor = WindowGetDeviceCursor(win, pDev);
+ if (!pCursor && win->optional->cursor != NullCursor)
+ pCursor = win->optional->cursor;
+ if (pCursor)
+ {
+ ChangeToCursor(pDev, pCursor);
+ return;
+ }
+ }
+ }
+}
+
+
+/**
+ * @param dev device which you want to know its current root window
+ * @return root window where dev's sprite is located
+ */
+WindowPtr
+GetCurrentRootWindow(DeviceIntPtr dev)
+{
+ return RootWindow(dev->spriteInfo->sprite);
+}
+
+/**
+ * @return window underneath the cursor sprite.
+ */
+WindowPtr
+GetSpriteWindow(DeviceIntPtr pDev)
+{
+ return pDev->spriteInfo->sprite->win;
+}
+
+/**
+ * @return current sprite cursor.
+ */
+CursorPtr
+GetSpriteCursor(DeviceIntPtr pDev)
+{
+ return pDev->spriteInfo->sprite->current;
+}
+
+/**
+ * Set x/y current sprite position in screen coordinates.
+ */
+void
+GetSpritePosition(DeviceIntPtr pDev, int *px, int *py)
+{
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+ *px = pSprite->hotPhys.x;
+ *py = pSprite->hotPhys.y;
+}
+
+#ifdef PANORAMIX
+int
+XineramaGetCursorScreen(DeviceIntPtr pDev)
+{
+ if(!noPanoramiXExtension) {
+ return pDev->spriteInfo->sprite->screen->myNum;
+ } else {
+ return 0;
+ }
+}
+#endif /* PANORAMIX */
+
+#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
+
+static void
+MonthChangedOrBadTime(InternalEvent *ev)
+{
+ /* If the ddx/OS is careless about not processing timestamped events from
+ * different sources in sorted order, then it's possible for time to go
+ * backwards when it should not. Here we ensure a decent time.
+ */
+ if ((currentTime.milliseconds - ev->any.time) > TIMESLOP)
+ currentTime.months++;
+ else
+ ev->any.time = currentTime.milliseconds;
+}
+
+static void
+NoticeTime(InternalEvent *ev)
+{
+ if (ev->any.time < currentTime.milliseconds)
+ MonthChangedOrBadTime(ev);
+ currentTime.milliseconds = ev->any.time;
+ lastDeviceEventTime = currentTime;
+}
+
+void
+NoticeEventTime(InternalEvent *ev)
+{
+ if (!syncEvents.playingEvents)
+ NoticeTime(ev);
+}
+
+/**************************************************************************
+ * The following procedures deal with synchronous events *
+ **************************************************************************/
+
+/**
+ * EnqueueEvent is a device's processInputProc if a device is frozen.
+ * Instead of delivering the events to the client, the event is tacked onto a
+ * linked list for later delivery.
+ */
+void
+EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
+{
+ QdEventPtr tail = *syncEvents.pendtail;
+ QdEventPtr qe;
+ SpritePtr pSprite = device->spriteInfo->sprite;
+ int eventlen;
+ DeviceEvent *event = &ev->device_event;
+
+ NoticeTime((InternalEvent*)event);
+
+ /* Fix for key repeating bug. */
+ if (device->key != NULL && device->key->xkbInfo != NULL &&
+ event->type == ET_KeyRelease)
+ AccessXCancelRepeatKey(device->key->xkbInfo, event->detail.key);
+
+ if (DeviceEventCallback)
+ {
+ DeviceEventInfoRec eventinfo;
+
+ /* The RECORD spec says that the root window field of motion events
+ * must be valid. At this point, it hasn't been filled in yet, so
+ * we do it here. The long expression below is necessary to get
+ * the current root window; the apparently reasonable alternative
+ * GetCurrentRootWindow()->drawable.id doesn't give you the right
+ * answer on the first motion event after a screen change because
+ * the data that GetCurrentRootWindow relies on hasn't been
+ * updated yet.
+ */
+ if (ev->any.type == ET_Motion)
+ ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id;
+
+ eventinfo.event = ev;
+ eventinfo.device = device;
+ CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo);
+ }
+
+ if (event->type == ET_Motion)
+ {
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension) {
+ event->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
+ event->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
+ }
+#endif
+ pSprite->hotPhys.x = event->root_x;
+ pSprite->hotPhys.y = event->root_y;
+ /* do motion compression, but not if from different devices */
+ if (tail &&
+ (tail->event->any.type == ET_Motion) &&
+ (tail->device == device) &&
+ (tail->pScreen == pSprite->hotPhys.pScreen))
+ {
+ DeviceEvent *tailev = &tail->event->device_event;
+ tailev->root_x = pSprite->hotPhys.x;
+ tailev->root_y = pSprite->hotPhys.y;
+ tailev->time = event->time;
+ tail->months = currentTime.months;
+ return;
+ }
+ }
+
+ eventlen = event->length;
+
+ qe = malloc(sizeof(QdEventRec) + eventlen);
+ if (!qe)
+ return;
+ qe->next = (QdEventPtr)NULL;
+ qe->device = device;
+ qe->pScreen = pSprite->hotPhys.pScreen;
+ qe->months = currentTime.months;
+ qe->event = (InternalEvent *)(qe + 1);
+ memcpy(qe->event, event, eventlen);
+ if (tail)
+ syncEvents.pendtail = &tail->next;
+ *syncEvents.pendtail = qe;
+}
+
+/**
+ * Run through the list of events queued up in syncEvents.
+ * For each event do:
+ * If the device for this event is not frozen anymore, take it and process it
+ * as usually.
+ * After that, check if there's any devices in the list that are not frozen.
+ * If there is none, we're done. If there is at least one device that is not
+ * frozen, then re-run from the beginning of the event queue.
+ */
+static void
+PlayReleasedEvents(void)
+{
+ QdEventPtr *prev, qe;
+ DeviceIntPtr dev;
+ DeviceIntPtr pDev;
+
+ prev = &syncEvents.pending;
+ while ( (qe = *prev) )
+ {
+ if (!qe->device->deviceGrab.sync.frozen)
+ {
+ *prev = qe->next;
+ pDev = qe->device;
+ if (*syncEvents.pendtail == *prev)
+ syncEvents.pendtail = prev;
+ if (qe->event->any.type == ET_Motion)
+ CheckVirtualMotion(pDev, qe, NullWindow);
+ syncEvents.time.months = qe->months;
+ syncEvents.time.milliseconds = qe->event->any.time;
+#ifdef PANORAMIX
+ /* Translate back to the sprite screen since processInputProc
+ will translate from sprite screen to screen 0 upon reentry
+ to the DIX layer */
+ if(!noPanoramiXExtension) {
+ DeviceEvent *ev = &qe->event->device_event;
+ switch(ev->type)
+ {
+ case ET_Motion:
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ case ET_KeyPress:
+ case ET_KeyRelease:
+ case ET_ProximityIn:
+ case ET_ProximityOut:
+ ev->root_x += screenInfo.screens[0]->x -
+ pDev->spriteInfo->sprite->screen->x;
+ ev->root_y += screenInfo.screens[0]->y -
+ pDev->spriteInfo->sprite->screen->y;
+ break;
+ default:
+ break;
+ }
+
+ }
+#endif
+ (*qe->device->public.processInputProc)(qe->event, qe->device);
+ free(qe);
+ for (dev = inputInfo.devices; dev && dev->deviceGrab.sync.frozen; dev = dev->next)
+ ;
+ if (!dev)
+ break;
+ /* Playing the event may have unfrozen another device. */
+ /* So to play it safe, restart at the head of the queue */
+ prev = &syncEvents.pending;
+ }
+ else
+ prev = &qe->next;
+ }
+}
+
+/**
+ * Freeze or thaw the given devices. The device's processing proc is
+ * switched to either the real processing proc (in case of thawing) or an
+ * enqueuing processing proc (usually EnqueueEvent()).
+ *
+ * @param dev The device to freeze/thaw
+ * @param frozen True to freeze or false to thaw.
+ */
+static void
+FreezeThaw(DeviceIntPtr dev, Bool frozen)
+{
+ dev->deviceGrab.sync.frozen = frozen;
+ if (frozen)
+ dev->public.processInputProc = dev->public.enqueueInputProc;
+ else
+ dev->public.processInputProc = dev->public.realInputProc;
+}
+
+/**
+ * Unfreeze devices and replay all events to the respective clients.
+ *
+ * ComputeFreezes takes the first event in the device's frozen event queue. It
+ * runs up the sprite tree (spriteTrace) and searches for the window to replay
+ * the events from. If it is found, it checks for passive grabs one down from
+ * the window or delivers the events.
+ */
+static void
+ComputeFreezes(void)
+{
+ DeviceIntPtr replayDev = syncEvents.replayDev;
+ WindowPtr w;
+ GrabPtr grab;
+ DeviceIntPtr dev;
+
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ FreezeThaw(dev, dev->deviceGrab.sync.other ||
+ (dev->deviceGrab.sync.state >= FROZEN));
+ if (syncEvents.playingEvents || (!replayDev && !syncEvents.pending))
+ return;
+ syncEvents.playingEvents = TRUE;
+ if (replayDev)
+ {
+ DeviceEvent* event = replayDev->deviceGrab.sync.event;
+
+ syncEvents.replayDev = (DeviceIntPtr)NULL;
+
+ w = XYToWindow(replayDev->spriteInfo->sprite,
+ event->root_x, event->root_y);
+ if (!CheckDeviceGrabs(replayDev, event, syncEvents.replayWin))
+ {
+ if (replayDev->focus && !IsPointerEvent((InternalEvent*)event))
+ DeliverFocusedEvent(replayDev, (InternalEvent*)event, w);
+ else
+ DeliverDeviceEvents(w, (InternalEvent*)event, NullGrab,
+ NullWindow, replayDev);
+ }
+ }
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (!dev->deviceGrab.sync.frozen)
+ {
+ PlayReleasedEvents();
+ break;
+ }
+ }
+ syncEvents.playingEvents = FALSE;
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (DevHasCursor(dev))
+ {
+ /* the following may have been skipped during replay,
+ so do it now */
+ if ((grab = dev->deviceGrab.grab) && grab->confineTo)
+ {
+ if (grab->confineTo->drawable.pScreen !=
+ dev->spriteInfo->sprite->hotPhys.pScreen)
+ dev->spriteInfo->sprite->hotPhys.x =
+ dev->spriteInfo->sprite->hotPhys.y = 0;
+ ConfineCursorToWindow(dev, grab->confineTo, TRUE, TRUE);
+ }
+ else
+ ConfineCursorToWindow(dev,
+ dev->spriteInfo->sprite->hotPhys.pScreen->root,
+ TRUE, FALSE);
+ PostNewCursor(dev);
+ }
+ }
+}
+
+#ifdef RANDR
+void
+ScreenRestructured (ScreenPtr pScreen)
+{
+ GrabPtr grab;
+ DeviceIntPtr pDev;
+
+ for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
+ {
+ if (!DevHasCursor(pDev))
+ continue;
+
+ /* GrabDevice doesn't have a confineTo field, so we don't need to
+ * worry about it. */
+ if ((grab = pDev->deviceGrab.grab) && grab->confineTo)
+ {
+ if (grab->confineTo->drawable.pScreen
+ != pDev->spriteInfo->sprite->hotPhys.pScreen)
+ pDev->spriteInfo->sprite->hotPhys.x = pDev->spriteInfo->sprite->hotPhys.y = 0;
+ ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE);
+ }
+ else
+ ConfineCursorToWindow(pDev,
+ pDev->spriteInfo->sprite->hotPhys.pScreen->root,
+ TRUE, FALSE);
+ }
+}
+#endif
+
+static void
+CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
+{
+ GrabPtr grab = thisDev->deviceGrab.grab;
+ DeviceIntPtr dev;
+
+ if (thisMode == GrabModeSync)
+ thisDev->deviceGrab.sync.state = FROZEN_NO_EVENT;
+ else
+ { /* free both if same client owns both */
+ thisDev->deviceGrab.sync.state = THAWED;
+ if (thisDev->deviceGrab.sync.other &&
+ (CLIENT_BITS(thisDev->deviceGrab.sync.other->resource) ==
+ CLIENT_BITS(grab->resource)))
+ thisDev->deviceGrab.sync.other = NullGrab;
+ }
+
+ if (IsMaster(thisDev))
+ {
+ dev = GetPairedDevice(thisDev);
+ if (otherMode == GrabModeSync)
+ dev->deviceGrab.sync.other = grab;
+ else
+ { /* free both if same client owns both */
+ if (dev->deviceGrab.sync.other &&
+ (CLIENT_BITS(dev->deviceGrab.sync.other->resource) ==
+ CLIENT_BITS(grab->resource)))
+ dev->deviceGrab.sync.other = NullGrab;
+ }
+ }
+ ComputeFreezes();
+}
+
+/**
+ * Save the device's master device id. This needs to be done
+ * if a client directly grabs a slave device that is attached to a master. For
+ * the duration of the grab, the device is detached, ungrabbing re-attaches it
+ * though.
+ *
+ * We store the ID of the master device only in case the master disappears
+ * while the device has a grab.
+ */
+static void
+DetachFromMaster(DeviceIntPtr dev)
+{
+ if (!IsFloating(dev))
+ return;
+
+ dev->saved_master_id = GetMaster(dev, MASTER_ATTACHED)->id;
+
+ AttachDevice(NULL, dev, NULL);
+}
+
+static void
+ReattachToOldMaster(DeviceIntPtr dev)
+{
+ DeviceIntPtr master = NULL;
+
+ if (IsMaster(dev))
+ return;
+
+ dixLookupDevice(&master, dev->saved_master_id, serverClient, DixUseAccess);
+
+ if (master)
+ {
+ AttachDevice(serverClient, dev, master);
+ dev->saved_master_id = 0;
+ }
+}
+
+/**
+ * Activate a pointer grab on the given device. A pointer grab will cause all
+ * core pointer events of this device to be delivered to the grabbing client only.
+ * No other device will send core events to the grab client while the grab is
+ * on, but core events will be sent to other clients.
+ * Can cause the cursor to change if a grab cursor is set.
+ *
+ * Note that parameter autoGrab may be (True & ImplicitGrabMask) if the grab
+ * is an implicit grab caused by a ButtonPress event.
+ *
+ * @param mouse The device to grab.
+ * @param grab The grab structure, needs to be setup.
+ * @param autoGrab True if the grab was caused by a button down event and not
+ * explicitely by a client.
+ */
+void
+ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab,
+ TimeStamp time, Bool autoGrab)
+{
+ GrabInfoPtr grabinfo = &mouse->deviceGrab;
+ WindowPtr oldWin = (grabinfo->grab) ?
+ grabinfo->grab->window
+ : mouse->spriteInfo->sprite->win;
+ Bool isPassive = autoGrab & ~ImplicitGrabMask;
+
+ /* slave devices need to float for the duration of the grab. */
+ if (grab->grabtype == GRABTYPE_XI2 &&
+ !(autoGrab & ImplicitGrabMask) && !IsMaster(mouse))
+ DetachFromMaster(mouse);
+
+ if (grab->confineTo)
+ {
+ if (grab->confineTo->drawable.pScreen
+ != mouse->spriteInfo->sprite->hotPhys.pScreen)
+ mouse->spriteInfo->sprite->hotPhys.x =
+ mouse->spriteInfo->sprite->hotPhys.y = 0;
+ ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE);
+ }
+ DoEnterLeaveEvents(mouse, mouse->id, oldWin, grab->window, NotifyGrab);
+ mouse->valuator->motionHintWindow = NullWindow;
+ if (syncEvents.playingEvents)
+ grabinfo->grabTime = syncEvents.time;
+ else
+ grabinfo->grabTime = time;
+ if (grab->cursor)
+ grab->cursor->refcnt++;
+ grabinfo->activeGrab = *grab;
+ grabinfo->grab = &grabinfo->activeGrab;
+ grabinfo->fromPassiveGrab = isPassive;
+ grabinfo->implicitGrab = autoGrab & ImplicitGrabMask;
+ PostNewCursor(mouse);
+ CheckGrabForSyncs(mouse,(Bool)grab->pointerMode, (Bool)grab->keyboardMode);
+}
+
+/**
+ * Delete grab on given device, update the sprite.
+ *
+ * Extension devices are set up for ActivateKeyboardGrab().
+ */
+void
+DeactivatePointerGrab(DeviceIntPtr mouse)
+{
+ GrabPtr grab = mouse->deviceGrab.grab;
+ DeviceIntPtr dev;
+ Bool wasImplicit = (mouse->deviceGrab.fromPassiveGrab &&
+ mouse->deviceGrab.implicitGrab);
+
+ mouse->valuator->motionHintWindow = NullWindow;
+ mouse->deviceGrab.grab = NullGrab;
+ mouse->deviceGrab.sync.state = NOT_GRABBED;
+ mouse->deviceGrab.fromPassiveGrab = FALSE;
+
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (dev->deviceGrab.sync.other == grab)
+ dev->deviceGrab.sync.other = NullGrab;
+ }
+ DoEnterLeaveEvents(mouse, mouse->id, grab->window,
+ mouse->spriteInfo->sprite->win, NotifyUngrab);
+ if (grab->confineTo)
+ ConfineCursorToWindow(mouse, GetCurrentRootWindow(mouse), FALSE, FALSE);
+ PostNewCursor(mouse);
+ if (grab->cursor)
+ FreeCursor(grab->cursor, (Cursor)0);
+
+ if (!wasImplicit && grab->grabtype == GRABTYPE_XI2)
+ ReattachToOldMaster(mouse);
+
+ ComputeFreezes();
+}
+
+/**
+ * Activate a keyboard grab on the given device.
+ *
+ * Extension devices have ActivateKeyboardGrab() set as their grabbing proc.
+ */
+void
+ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
+{
+ GrabInfoPtr grabinfo = &keybd->deviceGrab;
+ WindowPtr oldWin;
+
+ /* slave devices need to float for the duration of the grab. */
+ if (grab->grabtype == GRABTYPE_XI2 &&
+ !(passive & ImplicitGrabMask) &&
+ !IsMaster(keybd))
+ DetachFromMaster(keybd);
+
+ if (grabinfo->grab)
+ oldWin = grabinfo->grab->window;
+ else if (keybd->focus)
+ oldWin = keybd->focus->win;
+ else
+ oldWin = keybd->spriteInfo->sprite->win;
+ if (oldWin == FollowKeyboardWin)
+ oldWin = keybd->focus->win;
+ if (keybd->valuator)
+ keybd->valuator->motionHintWindow = NullWindow;
+ DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab);
+ if (syncEvents.playingEvents)
+ grabinfo->grabTime = syncEvents.time;
+ else
+ grabinfo->grabTime = time;
+ grabinfo->activeGrab = *grab;
+ grabinfo->grab = &grabinfo->activeGrab;
+ grabinfo->fromPassiveGrab = passive;
+ grabinfo->implicitGrab = passive & ImplicitGrabMask;
+ CheckGrabForSyncs(keybd, (Bool)grab->keyboardMode, (Bool)grab->pointerMode);
+}
+
+/**
+ * Delete keyboard grab for the given device.
+ */
+void
+DeactivateKeyboardGrab(DeviceIntPtr keybd)
+{
+ GrabPtr grab = keybd->deviceGrab.grab;
+ DeviceIntPtr dev;
+ WindowPtr focusWin = keybd->focus ? keybd->focus->win
+ : keybd->spriteInfo->sprite->win;
+ Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab &&
+ keybd->deviceGrab.implicitGrab);
+
+ if (focusWin == FollowKeyboardWin)
+ focusWin = inputInfo.keyboard->focus->win;
+ if (keybd->valuator)
+ keybd->valuator->motionHintWindow = NullWindow;
+ keybd->deviceGrab.grab = NullGrab;
+ keybd->deviceGrab.sync.state = NOT_GRABBED;
+ keybd->deviceGrab.fromPassiveGrab = FALSE;
+
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (dev->deviceGrab.sync.other == grab)
+ dev->deviceGrab.sync.other = NullGrab;
+ }
+ DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab);
+
+ if (!wasImplicit && grab->grabtype == GRABTYPE_XI2)
+ ReattachToOldMaster(keybd);
+
+ ComputeFreezes();
+}
+
+void
+AllowSome(ClientPtr client,
+ TimeStamp time,
+ DeviceIntPtr thisDev,
+ int newState)
+{
+ Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced;
+ TimeStamp grabTime;
+ DeviceIntPtr dev;
+ GrabInfoPtr devgrabinfo,
+ grabinfo = &thisDev->deviceGrab;
+
+ thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client);
+ thisSynced = FALSE;
+ otherGrabbed = FALSE;
+ othersFrozen = FALSE;
+ grabTime = grabinfo->grabTime;
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ devgrabinfo = &dev->deviceGrab;
+
+ if (dev == thisDev)
+ continue;
+ if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client))
+ {
+ if (!(thisGrabbed || otherGrabbed) ||
+ (CompareTimeStamps(devgrabinfo->grabTime, grabTime) == LATER))
+ grabTime = devgrabinfo->grabTime;
+ otherGrabbed = TRUE;
+ if (grabinfo->sync.other == devgrabinfo->grab)
+ thisSynced = TRUE;
+ if (devgrabinfo->sync.state >= FROZEN)
+ othersFrozen = TRUE;
+ }
+ }
+ if (!((thisGrabbed && grabinfo->sync.state >= FROZEN) || thisSynced))
+ return;
+ if ((CompareTimeStamps(time, currentTime) == LATER) ||
+ (CompareTimeStamps(time, grabTime) == EARLIER))
+ return;
+ switch (newState)
+ {
+ case THAWED: /* Async */
+ if (thisGrabbed)
+ grabinfo->sync.state = THAWED;
+ if (thisSynced)
+ grabinfo->sync.other = NullGrab;
+ ComputeFreezes();
+ break;
+ case FREEZE_NEXT_EVENT: /* Sync */
+ if (thisGrabbed)
+ {
+ grabinfo->sync.state = FREEZE_NEXT_EVENT;
+ if (thisSynced)
+ grabinfo->sync.other = NullGrab;
+ ComputeFreezes();
+ }
+ break;
+ case THAWED_BOTH: /* AsyncBoth */
+ if (othersFrozen)
+ {
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ devgrabinfo = &dev->deviceGrab;
+ if (devgrabinfo->grab
+ && SameClient(devgrabinfo->grab, client))
+ devgrabinfo->sync.state = THAWED;
+ if (devgrabinfo->sync.other &&
+ SameClient(devgrabinfo->sync.other, client))
+ devgrabinfo->sync.other = NullGrab;
+ }
+ ComputeFreezes();
+ }
+ break;
+ case FREEZE_BOTH_NEXT_EVENT: /* SyncBoth */
+ if (othersFrozen)
+ {
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ devgrabinfo = &dev->deviceGrab;
+ if (devgrabinfo->grab
+ && SameClient(devgrabinfo->grab, client))
+ devgrabinfo->sync.state = FREEZE_BOTH_NEXT_EVENT;
+ if (devgrabinfo->sync.other
+ && SameClient(devgrabinfo->sync.other, client))
+ devgrabinfo->sync.other = NullGrab;
+ }
+ ComputeFreezes();
+ }
+ break;
+ case NOT_GRABBED: /* Replay */
+ if (thisGrabbed && grabinfo->sync.state == FROZEN_WITH_EVENT)
+ {
+ if (thisSynced)
+ grabinfo->sync.other = NullGrab;
+ syncEvents.replayDev = thisDev;
+ syncEvents.replayWin = grabinfo->grab->window;
+ (*grabinfo->DeactivateGrab)(thisDev);
+ syncEvents.replayDev = (DeviceIntPtr)NULL;
+ }
+ break;
+ case THAW_OTHERS: /* AsyncOthers */
+ if (othersFrozen)
+ {
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (dev == thisDev)
+ continue;
+ devgrabinfo = &dev->deviceGrab;
+ if (devgrabinfo->grab
+ && SameClient(devgrabinfo->grab, client))
+ devgrabinfo->sync.state = THAWED;
+ if (devgrabinfo->sync.other
+ && SameClient(devgrabinfo->sync.other, client))
+ devgrabinfo->sync.other = NullGrab;
+ }
+ ComputeFreezes();
+ }
+ break;
+ }
+}
+
+/**
+ * Server-side protocol handling for AllowEvents request.
+ *
+ * Release some events from a frozen device.
+ */
+int
+ProcAllowEvents(ClientPtr client)
+{
+ TimeStamp time;
+ DeviceIntPtr mouse = NULL;
+ DeviceIntPtr keybd = NULL;
+ REQUEST(xAllowEventsReq);
+
+ REQUEST_SIZE_MATCH(xAllowEventsReq);
+ time = ClientTimeToServerTime(stuff->time);
+
+ mouse = PickPointer(client);
+ keybd = PickKeyboard(client);
+
+ switch (stuff->mode)
+ {
+ case ReplayPointer:
+ AllowSome(client, time, mouse, NOT_GRABBED);
+ break;
+ case SyncPointer:
+ AllowSome(client, time, mouse, FREEZE_NEXT_EVENT);
+ break;
+ case AsyncPointer:
+ AllowSome(client, time, mouse, THAWED);
+ break;
+ case ReplayKeyboard:
+ AllowSome(client, time, keybd, NOT_GRABBED);
+ break;
+ case SyncKeyboard:
+ AllowSome(client, time, keybd, FREEZE_NEXT_EVENT);
+ break;
+ case AsyncKeyboard:
+ AllowSome(client, time, keybd, THAWED);
+ break;
+ case SyncBoth:
+ AllowSome(client, time, keybd, FREEZE_BOTH_NEXT_EVENT);
+ break;
+ case AsyncBoth:
+ AllowSome(client, time, keybd, THAWED_BOTH);
+ break;
+ default:
+ client->errorValue = stuff->mode;
+ return BadValue;
+ }
+ return Success;
+}
+
+/**
+ * Deactivate grabs from any device that has been grabbed by the client.
+ */
+void
+ReleaseActiveGrabs(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ Bool done;
+
+ /* XXX CloseDownClient should remove passive grabs before
+ * releasing active grabs.
+ */
+ do {
+ done = TRUE;
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client))
+ {
+ (*dev->deviceGrab.DeactivateGrab)(dev);
+ done = FALSE;
+ }
+ }
+ } while (!done);
+}
+
+/**************************************************************************
+ * The following procedures deal with delivering events *
+ **************************************************************************/
+
+/**
+ * Deliver the given events to the given client.
+ *
+ * More than one event may be delivered at a time. This is the case with
+ * DeviceMotionNotifies which may be followed by DeviceValuator events.
+ *
+ * TryClientEvents() is the last station before actually writing the events to
+ * the socket. Anything that is not filtered here, will get delivered to the
+ * client.
+ * An event is only delivered if
+ * - mask and filter match up.
+ * - no other client has a grab on the device that caused the event.
+ *
+ *
+ * @param client The target client to deliver to.
+ * @param dev The device the event came from. May be NULL.
+ * @param pEvents The events to be delivered.
+ * @param count Number of elements in pEvents.
+ * @param mask Event mask as set by the window.
+ * @param filter Mask based on event type.
+ * @param grab Possible grab on the device that caused the event.
+ *
+ * @return 1 if event was delivered, 0 if not or -1 if grab was not set by the
+ * client.
+ */
+int
+TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
+ int count, Mask mask, Mask filter, GrabPtr grab)
+{
+ int type;
+
+#ifdef DEBUG_EVENTS
+ ErrorF("[dix] Event([%d, %d], mask=0x%lx), client=%d%s",
+ pEvents->u.u.type, pEvents->u.u.detail, mask,
+ client ? client->index : -1,
+ (client && client->clientGone) ? " (gone)" : "");
+#endif
+
+ if (!client || client == serverClient || client->clientGone) {
+#ifdef DEBUG_EVENTS
+ ErrorF(" not delivered to fake/dead client\n");
+#endif
+ return 0;
+ }
+
+ if (filter != CantBeFiltered && !(mask & filter))
+ {
+ #ifdef DEBUG_EVENTS
+ ErrorF(" filtered\n");
+ #endif
+ return 0;
+ }
+
+ if (grab && !SameClient(grab, client))
+ {
+#ifdef DEBUG_EVENTS
+ ErrorF(" not delivered due to grab\n");
+#endif
+ return -1; /* don't send, but notify caller */
+ }
+
+ type = pEvents->u.u.type;
+ if (type == MotionNotify)
+ {
+ if (mask & PointerMotionHintMask)
+ {
+ if (WID(dev->valuator->motionHintWindow) ==
+ pEvents->u.keyButtonPointer.event)
+ {
+#ifdef DEBUG_EVENTS
+ ErrorF("[dix] \n");
+ ErrorF("[dix] motionHintWindow == keyButtonPointer.event\n");
+#endif
+ return 1; /* don't send, but pretend we did */
+ }
+ pEvents->u.u.detail = NotifyHint;
+ }
+ else
+ {
+ pEvents->u.u.detail = NotifyNormal;
+ }
+ }
+ else if (type == DeviceMotionNotify)
+ {
+ if (MaybeSendDeviceMotionNotifyHint((deviceKeyButtonPointer*)pEvents,
+ mask) != 0)
+ return 1;
+ } else if (type == KeyPress)
+ {
+ if (EventIsKeyRepeat(pEvents))
+ {
+ if (!_XkbWantsDetectableAutoRepeat(client))
+ {
+ xEvent release = *pEvents;
+ release.u.u.type = KeyRelease;
+ WriteEventsToClient(client, 1, &release);
+#ifdef DEBUG_EVENTS
+ ErrorF(" (plus fake core release for repeat)");
+#endif
+ } else
+ {
+#ifdef DEBUG_EVENTS
+ ErrorF(" (detectable autorepeat for core)");
+#endif
+ }
+ }
+
+ } else if (type == DeviceKeyPress)
+ {
+ if (EventIsKeyRepeat(pEvents))
+ {
+ if (!_XkbWantsDetectableAutoRepeat(client))
+ {
+ deviceKeyButtonPointer release = *(deviceKeyButtonPointer *)pEvents;
+ release.type = DeviceKeyRelease;
+#ifdef DEBUG_EVENTS
+ ErrorF(" (plus fake xi1 release for repeat)");
+#endif
+ WriteEventsToClient(client, 1, (xEvent *) &release);
+ }
+ else {
+#ifdef DEBUG_EVENTS
+ ErrorF(" (detectable autorepeat for core)");
+#endif
+ }
+ }
+ }
+
+ if (BitIsOn(criticalEvents, type))
+ {
+ if (client->smart_priority < SMART_MAX_PRIORITY)
+ client->smart_priority++;
+ SetCriticalOutputPending();
+ }
+
+ WriteEventsToClient(client, count, pEvents);
+#ifdef DEBUG_EVENTS
+ ErrorF("[dix] delivered\n");
+#endif
+ return 1;
+}
+
+/**
+ * Deliver events to a window. At this point, we do not yet know if the event
+ * actually needs to be delivered. May activate a grab if the event is a
+ * button press.
+ *
+ * Core events are always delivered to the window owner. If the filter is
+ * something other than CantBeFiltered, the event is also delivered to other
+ * clients with the matching mask on the window.
+ *
+ * More than one event may be delivered at a time. This is the case with
+ * DeviceMotionNotifies which may be followed by DeviceValuator events.
+ *
+ * @param pWin The window that would get the event.
+ * @param pEvents The events to be delivered.
+ * @param count Number of elements in pEvents.
+ * @param filter Mask based on event type.
+ * @param grab Possible grab on the device that caused the event.
+ *
+ * @return Number of events delivered to various clients.
+ */
+int
+DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
+ *pEvents, int count, Mask filter, GrabPtr grab)
+{
+ int deliveries = 0, nondeliveries = 0;
+ int attempt;
+ InputClients *other;
+ ClientPtr client = NullClient;
+ Mask deliveryMask = 0; /* If a grab occurs due to a button press, then
+ this mask is the mask of the grab. */
+ int type = pEvents->u.u.type;
+
+
+ /* Deliver to window owner */
+ if ((filter == CantBeFiltered) || CORE_EVENT(pEvents))
+ {
+ /* if nobody ever wants to see this event, skip some work */
+ if (filter != CantBeFiltered &&
+ !((wOtherEventMasks(pWin)|pWin->eventMask) & filter))
+ return 0;
+
+ if (IsInterferingGrab(wClient(pWin), pDev, pEvents))
+ return 0;
+
+ if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count))
+ /* do nothing */;
+ else if ( (attempt = TryClientEvents(wClient(pWin), pDev, pEvents,
+ count, pWin->eventMask,
+ filter, grab)) )
+ {
+ if (attempt > 0)
+ {
+ deliveries++;
+ client = wClient(pWin);
+ deliveryMask = pWin->eventMask;
+ } else
+ nondeliveries--;
+ }
+ }
+
+ /* CantBeFiltered means only window owner gets the event */
+ if (filter != CantBeFiltered)
+ {
+ if (CORE_EVENT(pEvents))
+ other = (InputClients *)wOtherClients(pWin);
+ else if (XI2_EVENT(pEvents))
+ {
+ OtherInputMasks *inputMasks = wOtherInputMasks(pWin);
+ /* Has any client selected for the event? */
+ if (!GetWindowXI2Mask(pDev, pWin, pEvents))
+ return 0;
+ other = inputMasks->inputClients;
+ } else {
+ OtherInputMasks *inputMasks = wOtherInputMasks(pWin);
+ /* Has any client selected for the event? */
+ if (!inputMasks ||
+ !(inputMasks->inputEvents[pDev->id] & filter))
+ return 0;
+
+ other = inputMasks->inputClients;
+ }
+
+ for (; other; other = other->next)
+ {
+ Mask mask;
+ if (IsInterferingGrab(rClient(other), pDev, pEvents))
+ continue;
+
+ mask = GetEventMask(pDev, pEvents, other);
+
+ if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin,
+ pEvents, count))
+ /* do nothing */;
+ else if ( (attempt = TryClientEvents(rClient(other), pDev,
+ pEvents, count,
+ mask, filter, grab)) )
+ {
+ if (attempt > 0)
+ {
+ deliveries++;
+ client = rClient(other);
+ deliveryMask = mask;
+ } else
+ nondeliveries--;
+ }
+ }
+ }
+ /*
+ * Note that since core events are delivered first, an implicit grab may
+ * be activated on a core grab, stopping the XI events.
+ */
+ if ((type == DeviceButtonPress || type == ButtonPress ||
+ ((XI2_EVENT(pEvents) && ((xGenericEvent*)pEvents)->evtype == XI_ButtonPress)))
+ && deliveries
+ && (!grab))
+ {
+ GrabRec tempGrab;
+ OtherInputMasks *inputMasks;
+
+ memset(&tempGrab, 0, sizeof(GrabRec));
+ tempGrab.next = NULL;
+ tempGrab.device = pDev;
+ tempGrab.resource = client->clientAsMask;
+ tempGrab.window = pWin;
+ tempGrab.ownerEvents = (deliveryMask & OwnerGrabButtonMask) ? TRUE : FALSE;
+ tempGrab.eventMask = deliveryMask;
+ tempGrab.keyboardMode = GrabModeAsync;
+ tempGrab.pointerMode = GrabModeAsync;
+ tempGrab.confineTo = NullWindow;
+ tempGrab.cursor = NullCursor;
+ tempGrab.type = type;
+ if (type == ButtonPress)
+ tempGrab.grabtype = GRABTYPE_CORE;
+ else if (type == DeviceButtonPress)
+ tempGrab.grabtype = GRABTYPE_XI;
+ else
+ {
+ tempGrab.type = ((xGenericEvent*)pEvents)->evtype;
+ tempGrab.grabtype = GRABTYPE_XI2;
+ }
+
+ /* get the XI and XI2 device mask */
+ inputMasks = wOtherInputMasks(pWin);
+ tempGrab.deviceMask = (inputMasks) ? inputMasks->inputEvents[pDev->id]: 0;
+
+ if (inputMasks)
+ memcpy(tempGrab.xi2mask, inputMasks->xi2mask,
+ sizeof(tempGrab.xi2mask));
+
+ (*pDev->deviceGrab.ActivateGrab)(pDev, &tempGrab,
+ currentTime, TRUE | ImplicitGrabMask);
+ }
+ else if ((type == MotionNotify) && deliveries)
+ pDev->valuator->motionHintWindow = pWin;
+ else
+ {
+ if ((type == DeviceMotionNotify || type == DeviceButtonPress) &&
+ deliveries)
+ CheckDeviceGrabAndHintWindow (pWin, type,
+ (deviceKeyButtonPointer*) pEvents,
+ grab, client, deliveryMask);
+ }
+ if (deliveries)
+ return deliveries;
+ return nondeliveries;
+}
+
+/* If the event goes to dontClient, don't send it and return 0. if
+ send works, return 1 or if send didn't work, return 2.
+ Only works for core events.
+*/
+
+#ifdef PANORAMIX
+static int
+XineramaTryClientEventsResult(
+ ClientPtr client,
+ GrabPtr grab,
+ Mask mask,
+ Mask filter
+){
+ if ((client) && (client != serverClient) && (!client->clientGone) &&
+ ((filter == CantBeFiltered) || (mask & filter)))
+ {
+ if (grab && !SameClient(grab, client)) return -1;
+ else return 1;
+ }
+ return 0;
+}
+#endif
+
+/**
+ * Try to deliver events to the interested parties.
+ *
+ * @param pWin The window that would get the event.
+ * @param pEvents The events to be delivered.
+ * @param count Number of elements in pEvents.
+ * @param filter Mask based on event type.
+ * @param dontClient Don't deliver to the dontClient.
+ */
+int
+MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents,
+ int count, Mask filter, ClientPtr dontClient)
+{
+ OtherClients *other;
+
+
+ if (pWin->eventMask & filter)
+ {
+ if (wClient(pWin) == dontClient)
+ return 0;
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
+ return XineramaTryClientEventsResult(
+ wClient(pWin), NullGrab, pWin->eventMask, filter);
+#endif
+ if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count))
+ return 1; /* don't send, but pretend we did */
+ return TryClientEvents(wClient(pWin), NULL, pEvents, count,
+ pWin->eventMask, filter, NullGrab);
+ }
+ for (other = wOtherClients(pWin); other; other = other->next)
+ {
+ if (other->mask & filter)
+ {
+ if (SameClient(other, dontClient))
+ return 0;
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
+ return XineramaTryClientEventsResult(
+ rClient(other), NullGrab, other->mask, filter);
+#endif
+ if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, pEvents,
+ count))
+ return 1; /* don't send, but pretend we did */
+ return TryClientEvents(rClient(other), NULL, pEvents, count,
+ other->mask, filter, NullGrab);
+ }
+ }
+ return 2;
+}
+
+static Window FindChildForEvent(SpritePtr pSprite, WindowPtr event)
+{
+ WindowPtr w = pSprite->spriteTrace[pSprite->spriteTraceGood-1];
+ Window child = None;
+
+ /* If the search ends up past the root should the child field be
+ set to none or should the value in the argument be passed
+ through. It probably doesn't matter since everyone calls
+ this function with child == None anyway. */
+ while (w)
+ {
+ /* If the source window is same as event window, child should be
+ none. Don't bother going all all the way back to the root. */
+
+ if (w == event)
+ {
+ child = None;
+ break;
+ }
+
+ if (w->parent == event)
+ {
+ child = w->drawable.id;
+ break;
+ }
+ w = w->parent;
+ }
+ return child;
+}
+
+/**
+ * Adjust event fields to comply with the window properties.
+ *
+ * @param xE Event to be modified in place
+ * @param pWin The window to get the information from.
+ * @param child Child window setting for event (if applicable)
+ * @param calcChild If True, calculate the child window.
+ */
+void
+FixUpEventFromWindow(
+ SpritePtr pSprite,
+ xEvent *xE,
+ WindowPtr pWin,
+ Window child,
+ Bool calcChild)
+{
+ if (calcChild)
+ child = FindChildForEvent(pSprite, pWin);
+
+ if (XI2_EVENT(xE))
+ {
+ xXIDeviceEvent* event = (xXIDeviceEvent*)xE;
+
+ if (event->evtype == XI_RawKeyPress ||
+ event->evtype == XI_RawKeyRelease ||
+ event->evtype == XI_RawButtonPress ||
+ event->evtype == XI_RawButtonRelease ||
+ event->evtype == XI_RawMotion ||
+ event->evtype == XI_DeviceChanged ||
+ event->evtype == XI_HierarchyChanged ||
+ event->evtype == XI_PropertyEvent)
+ return;
+
+ event->root = RootWindow(pSprite)->drawable.id;
+ event->event = pWin->drawable.id;
+ if (pSprite->hot.pScreen == pWin->drawable.pScreen)
+ {
+ event->event_x = event->root_x - FP1616(pWin->drawable.x, 0);
+ event->event_y = event->root_y - FP1616(pWin->drawable.y, 0);
+ event->child = child;
+ } else
+ {
+ event->event_x = 0;
+ event->event_y = 0;
+ event->child = None;
+ }
+
+ if (event->evtype == XI_Enter || event->evtype == XI_Leave ||
+ event->evtype == XI_FocusIn || event->evtype == XI_FocusOut)
+ ((xXIEnterEvent*)event)->same_screen =
+ (pSprite->hot.pScreen == pWin->drawable.pScreen);
+
+ } else
+ {
+ XE_KBPTR.root = RootWindow(pSprite)->drawable.id;
+ XE_KBPTR.event = pWin->drawable.id;
+ if (pSprite->hot.pScreen == pWin->drawable.pScreen)
+ {
+ XE_KBPTR.sameScreen = xTrue;
+ XE_KBPTR.child = child;
+ XE_KBPTR.eventX =
+ XE_KBPTR.rootX - pWin->drawable.x;
+ XE_KBPTR.eventY =
+ XE_KBPTR.rootY - pWin->drawable.y;
+ }
+ else
+ {
+ XE_KBPTR.sameScreen = xFalse;
+ XE_KBPTR.child = None;
+ XE_KBPTR.eventX = 0;
+ XE_KBPTR.eventY = 0;
+ }
+ }
+}
+
+/**
+ * Check if a given event is deliverable at all on a given window.
+ *
+ * This function only checks if any client wants it, not for a specific
+ * client.
+ *
+ * @param[in] dev The device this event is being sent for.
+ * @param[in] event The event that is to be sent.
+ * @param[in] win The current event window.
+ *
+ * @return Bitmask of ::EVENT_XI2_MASK, ::EVENT_XI1_MASK, ::EVENT_CORE_MASK, and
+ * ::EVENT_DONT_PROPAGATE_MASK.
+ */
+int
+EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, WindowPtr win)
+{
+ int rc = 0;
+ int filter = 0;
+ int type;
+ OtherInputMasks *inputMasks = wOtherInputMasks(win);
+ xEvent ev;
+
+ /* XXX: this makes me gag */
+ type = GetXI2Type(event);
+ ev.u.u.type = GenericEvent; /* GetEventFilter only cares about type and evtype*/
+ ((xGenericEvent*)&ev)->extension = IReqCode;
+ ((xGenericEvent*)&ev)->evtype = type;
+ filter = GetEventFilter(dev, &ev);
+ if (type && inputMasks &&
+ ((inputMasks->xi2mask[XIAllDevices][type/8] & filter) ||
+ ((inputMasks->xi2mask[XIAllMasterDevices][type/8] & filter) && IsMaster(dev)) ||
+ (inputMasks->xi2mask[dev->id][type/8] & filter)))
+ rc |= EVENT_XI2_MASK;
+
+ type = GetXIType(event);
+ ev.u.u.type = type;
+ filter = GetEventFilter(dev, &ev);
+
+ /* Check for XI mask */
+ if (type && inputMasks &&
+ (inputMasks->deliverableEvents[dev->id] & filter) &&
+ (inputMasks->inputEvents[dev->id] & filter))
+ rc |= EVENT_XI1_MASK;
+
+ /* Check for XI DontPropagate mask */
+ if (type && inputMasks &&
+ (inputMasks->dontPropagateMask[dev->id] & filter))
+ rc |= EVENT_DONT_PROPAGATE_MASK;
+
+ /* Check for core mask */
+ type = GetCoreType(event);
+ if (type && (win->deliverableEvents & filter) &&
+ ((wOtherEventMasks(win) | win->eventMask) & filter))
+ rc |= EVENT_CORE_MASK;
+
+ /* Check for core DontPropagate mask */
+ if (type && (filter & wDontPropagateMask(win)))
+ rc |= EVENT_DONT_PROPAGATE_MASK;
+
+ return rc;
+}
+
+/**
+ * Deliver events caused by input devices.
+ *
+ * For events from a non-grabbed, non-focus device, DeliverDeviceEvents is
+ * called directly from the processInputProc.
+ * For grabbed devices, DeliverGrabbedEvent is called first, and _may_ call
+ * DeliverDeviceEvents.
+ * For focused events, DeliverFocusedEvent is called first, and _may_ call
+ * DeliverDeviceEvents.
+ *
+ * @param pWin Window to deliver event to.
+ * @param event The events to deliver, not yet in wire format.
+ * @param grab Possible grab on a device.
+ * @param stopAt Don't recurse up to the root window.
+ * @param dev The device that is responsible for the event.
+ *
+ * @see DeliverGrabbedEvent
+ * @see DeliverFocusedEvent
+ */
+int
+DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab,
+ WindowPtr stopAt, DeviceIntPtr dev)
+{
+ SpritePtr pSprite = dev->spriteInfo->sprite;
+ Window child = None;
+ Mask filter;
+ int deliveries = 0;
+ xEvent *xE = NULL, *core = NULL;
+ int rc, mask, count = 0;
+
+ CHECKEVENT(event);
+
+ while (pWin)
+ {
+ if ((mask = EventIsDeliverable(dev, event, pWin)))
+ {
+ /* XI2 events first */
+ if (mask & EVENT_XI2_MASK)
+ {
+ xEvent *xi2 = NULL;
+ rc = EventToXI2(event, &xi2);
+ if (rc == Success)
+ {
+ /* XXX: XACE */
+ filter = GetEventFilter(dev, xi2);
+ FixUpEventFromWindow(pSprite, xi2, pWin, child, FALSE);
+ deliveries = DeliverEventsToWindow(dev, pWin, xi2, 1,
+ filter, grab);
+ free(xi2);
+ if (deliveries > 0)
+ goto unwind;
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: XI2 conversion failed in DDE (%d).\n",
+ dev->name, rc);
+ }
+
+ /* XI events */
+ if (mask & EVENT_XI1_MASK)
+ {
+ rc = EventToXI(event, &xE, &count);
+ if (rc == Success) {
+ if (XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, xE, count) == Success) {
+ filter = GetEventFilter(dev, xE);
+ FixUpEventFromWindow(pSprite, xE, pWin, child, FALSE);
+ deliveries = DeliverEventsToWindow(dev, pWin, xE, count,
+ filter, grab);
+ if (deliveries > 0)
+ goto unwind;
+ }
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: XI conversion failed in DDE (%d, %d). Skipping delivery.\n",
+ dev->name, event->any.type, rc);
+ }
+
+ /* Core event */
+ if ((mask & EVENT_CORE_MASK) && IsMaster(dev) && dev->coreEvents)
+ {
+ rc = EventToCore(event, &core, &count);
+ if (rc == Success) {
+ if (XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, core, count) == Success) {
+ filter = GetEventFilter(dev, core);
+ FixUpEventFromWindow(pSprite, core, pWin, child, FALSE);
+ deliveries = DeliverEventsToWindow(dev, pWin, core,
+ count, filter, grab);
+ if (deliveries > 0)
+ goto unwind;
+ }
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: Core conversion failed in DDE (%d, %d).\n",
+ dev->name, event->any.type, rc);
+ }
+
+ if ((deliveries < 0) || (pWin == stopAt) ||
+ (mask & EVENT_DONT_PROPAGATE_MASK))
+ {
+ deliveries = 0;
+ goto unwind;
+ }
+ }
+
+ child = pWin->drawable.id;
+ pWin = pWin->parent;
+ }
+
+unwind:
+ free(core);
+ free(xE);
+ return deliveries;
+}
+
+/**
+ * Deliver event to a window and it's immediate parent. Used for most window
+ * events (CreateNotify, ConfigureNotify, etc.). Not useful for events that
+ * propagate up the tree or extension events
+ *
+ * In case of a ReparentNotify event, the event will be delivered to the
+ * otherParent as well.
+ *
+ * @param pWin Window to deliver events to.
+ * @param xE Events to deliver.
+ * @param count number of events in xE.
+ * @param otherParent Used for ReparentNotify events.
+ */
+int
+DeliverEvents(WindowPtr pWin, xEvent *xE, int count,
+ WindowPtr otherParent)
+{
+ DeviceIntRec dummy;
+ int deliveries;
+
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
+ return count;
+#endif
+
+ if (!count)
+ return 0;
+
+ dummy.id = XIAllDevices;
+
+ switch (xE->u.u.type)
+ {
+ case DestroyNotify:
+ case UnmapNotify:
+ case MapNotify:
+ case MapRequest:
+ case ReparentNotify:
+ case ConfigureNotify:
+ case ConfigureRequest:
+ case GravityNotify:
+ case CirculateNotify:
+ case CirculateRequest:
+ xE->u.destroyNotify.event = pWin->drawable.id;
+ break;
+ }
+
+ switch (xE->u.u.type)
+ {
+ case DestroyNotify:
+ case UnmapNotify:
+ case MapNotify:
+ case ReparentNotify:
+ case ConfigureNotify:
+ case GravityNotify:
+ case CirculateNotify:
+ break;
+ default:
+ {
+ Mask filter;
+ filter = GetEventFilter(&dummy, xE);
+ return DeliverEventsToWindow(&dummy, pWin, xE, count, filter,
+ NullGrab);
+ }
+ }
+
+ deliveries = DeliverEventsToWindow(&dummy, pWin, xE, count,
+ StructureNotifyMask, NullGrab);
+ if (pWin->parent)
+ {
+ xE->u.destroyNotify.event = pWin->parent->drawable.id;
+ deliveries += DeliverEventsToWindow(&dummy, pWin->parent, xE, count,
+ SubstructureNotifyMask, NullGrab);
+ if (xE->u.u.type == ReparentNotify)
+ {
+ xE->u.destroyNotify.event = otherParent->drawable.id;
+ deliveries += DeliverEventsToWindow(&dummy,
+ otherParent, xE, count, SubstructureNotifyMask,
+ NullGrab);
+ }
+ }
+ return deliveries;
+}
+
+
+static Bool
+PointInBorderSize(WindowPtr pWin, int x, int y)
+{
+ BoxRec box;
+
+ if(RegionContainsPoint(&pWin->borderSize, x, y, &box))
+ return TRUE;
+
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension &&
+ XineramaSetWindowPntrs(inputInfo.pointer, pWin)) {
+ SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite;
+ int i;
+
+ for(i = 1; i < PanoramiXNumScreens; i++) {
+ if(RegionContainsPoint(&pSprite->windows[i]->borderSize,
+ x + screenInfo.screens[0]->x - screenInfo.screens[i]->x,
+ y + screenInfo.screens[0]->y - screenInfo.screens[i]->y,
+ &box))
+ return TRUE;
+ }
+ }
+#endif
+ return FALSE;
+}
+
+/**
+ * Traversed from the root window to the window at the position x/y. While
+ * traversing, it sets up the traversal history in the spriteTrace array.
+ * After completing, the spriteTrace history is set in the following way:
+ * spriteTrace[0] ... root window
+ * spriteTrace[1] ... top level window that encloses x/y
+ * ...
+ * spriteTrace[spriteTraceGood - 1] ... window at x/y
+ *
+ * @returns the window at the given coordinates.
+ */
+WindowPtr
+XYToWindow(SpritePtr pSprite, int x, int y)
+{
+ WindowPtr pWin;
+ BoxRec box;
+
+ pSprite->spriteTraceGood = 1; /* root window still there */
+ pWin = RootWindow(pSprite)->firstChild;
+ while (pWin)
+ {
+ if ((pWin->mapped) &&
+ (x >= pWin->drawable.x - wBorderWidth (pWin)) &&
+ (x < pWin->drawable.x + (int)pWin->drawable.width +
+ wBorderWidth(pWin)) &&
+ (y >= pWin->drawable.y - wBorderWidth (pWin)) &&
+ (y < pWin->drawable.y + (int)pWin->drawable.height +
+ wBorderWidth (pWin))
+ /* When a window is shaped, a further check
+ * is made to see if the point is inside
+ * borderSize
+ */
+ && (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
+ && (!wInputShape(pWin) ||
+ RegionContainsPoint(wInputShape(pWin),
+ x - pWin->drawable.x,
+ y - pWin->drawable.y, &box))
+#ifdef ROOTLESS
+ /* In rootless mode windows may be offscreen, even when
+ * they're in X's stack. (E.g. if the native window system
+ * implements some form of virtual desktop system).
+ */
+ && !pWin->rootlessUnhittable
+#endif
+ )
+ {
+ if (pSprite->spriteTraceGood >= pSprite->spriteTraceSize)
+ {
+ pSprite->spriteTraceSize += 10;
+ pSprite->spriteTrace = realloc(pSprite->spriteTrace,
+ pSprite->spriteTraceSize*sizeof(WindowPtr));
+ }
+ pSprite->spriteTrace[pSprite->spriteTraceGood++] = pWin;
+ pWin = pWin->firstChild;
+ }
+ else
+ pWin = pWin->nextSib;
+ }
+ return pSprite->spriteTrace[pSprite->spriteTraceGood-1];
+}
+
+/**
+ * Ungrab a currently FocusIn grabbed device and grab the device on the
+ * given window. If the win given is the NoneWin, the device is ungrabbed if
+ * applicable and FALSE is returned.
+ *
+ * @returns TRUE if the device has been grabbed, or FALSE otherwise.
+ */
+BOOL
+ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win)
+{
+ BOOL rc = FALSE;
+ DeviceEvent event;
+
+ if (dev->deviceGrab.grab)
+ {
+ if (!dev->deviceGrab.fromPassiveGrab ||
+ dev->deviceGrab.grab->type != XI_Enter ||
+ dev->deviceGrab.grab->window == win ||
+ IsParent(dev->deviceGrab.grab->window, win))
+ return FALSE;
+ DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab);
+ (*dev->deviceGrab.DeactivateGrab)(dev);
+ }
+
+ if (win == NoneWin || win == PointerRootWin)
+ return FALSE;
+
+ memset(&event, 0, sizeof(DeviceEvent));
+ event.header = ET_Internal;
+ event.type = ET_FocusIn;
+ event.length = sizeof(DeviceEvent);
+ event.time = GetTimeInMillis();
+ event.deviceid = dev->id;
+ event.sourceid = dev->id;
+ event.detail.button = 0;
+ rc = (CheckPassiveGrabsOnWindow(win, dev, &event, FALSE, TRUE) != NULL);
+ if (rc)
+ DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab);
+ return rc;
+}
+
+/**
+ * Ungrab a currently Enter grabbed device and grab the device for the given
+ * window.
+ *
+ * @returns TRUE if the device has been grabbed, or FALSE otherwise.
+ */
+static BOOL
+ActivateEnterGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win)
+{
+ BOOL rc = FALSE;
+ DeviceEvent event;
+
+ if (dev->deviceGrab.grab)
+ {
+ if (!dev->deviceGrab.fromPassiveGrab ||
+ dev->deviceGrab.grab->type != XI_Enter ||
+ dev->deviceGrab.grab->window == win ||
+ IsParent(dev->deviceGrab.grab->window, win))
+ return FALSE;
+ DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab);
+ (*dev->deviceGrab.DeactivateGrab)(dev);
+ }
+
+ memset(&event, 0, sizeof(DeviceEvent));
+ event.header = ET_Internal;
+ event.type = ET_Enter;
+ event.length = sizeof(DeviceEvent);
+ event.time = GetTimeInMillis();
+ event.deviceid = dev->id;
+ event.sourceid = dev->id;
+ event.detail.button = 0;
+ rc = (CheckPassiveGrabsOnWindow(win, dev, &event, FALSE, TRUE) != NULL);
+ if (rc)
+ DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveGrab);
+ return rc;
+}
+
+/**
+ * Update the sprite coordinates based on the event. Update the cursor
+ * position, then update the event with the new coordinates that may have been
+ * changed. If the window underneath the sprite has changed, change to new
+ * cursor and send enter/leave events.
+ *
+ * CheckMotion() will not do anything and return FALSE if the event is not a
+ * pointer event.
+ *
+ * @return TRUE if the sprite has moved or FALSE otherwise.
+ */
+Bool
+CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
+{
+ WindowPtr prevSpriteWin, newSpriteWin;
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+
+ CHECKEVENT(ev);
+
+ if (!pSprite)
+ return FALSE;
+
+ prevSpriteWin = pSprite->win;
+
+ if (ev && !syncEvents.playingEvents)
+ {
+ /* GetPointerEvents() guarantees that pointer events have the correct
+ rootX/Y set already. */
+ switch (ev->type)
+ {
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ case ET_Motion:
+ break;
+ default:
+ /* all other events return FALSE */
+ return FALSE;
+ }
+
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension)
+ {
+ /* Motion events entering DIX get translated to Screen 0
+ coordinates. Replayed events have already been
+ translated since they've entered DIX before */
+ ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
+ ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
+ } else
+#endif
+ {
+ if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen)
+ {
+ pSprite->hot.pScreen = pSprite->hotPhys.pScreen;
+ RootWindow(pDev->spriteInfo->sprite) =
+ pSprite->hot.pScreen->root;
+ }
+ }
+
+ pSprite->hot.x = ev->root_x;
+ pSprite->hot.y = ev->root_y;
+ if (pSprite->hot.x < pSprite->physLimits.x1)
+ pSprite->hot.x = pSprite->physLimits.x1;
+ else if (pSprite->hot.x >= pSprite->physLimits.x2)
+ pSprite->hot.x = pSprite->physLimits.x2 - 1;
+ if (pSprite->hot.y < pSprite->physLimits.y1)
+ pSprite->hot.y = pSprite->physLimits.y1;
+ else if (pSprite->hot.y >= pSprite->physLimits.y2)
+ pSprite->hot.y = pSprite->physLimits.y2 - 1;
+ if (pSprite->hotShape)
+ ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y);
+ pSprite->hotPhys = pSprite->hot;
+
+ if ((pSprite->hotPhys.x != ev->root_x) ||
+ (pSprite->hotPhys.y != ev->root_y))
+ {
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension)
+ {
+ XineramaSetCursorPosition(
+ pDev, pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE);
+ } else
+#endif
+ {
+ (*pSprite->hotPhys.pScreen->SetCursorPosition)(
+ pDev, pSprite->hotPhys.pScreen,
+ pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE);
+ }
+ }
+
+ ev->root_x = pSprite->hot.x;
+ ev->root_y = pSprite->hot.y;
+ }
+
+ newSpriteWin = XYToWindow(pSprite, pSprite->hot.x, pSprite->hot.y);
+
+ if (newSpriteWin != prevSpriteWin)
+ {
+ int sourceid;
+ if (!ev) {
+ UpdateCurrentTimeIf();
+ sourceid = pDev->id; /* when from WindowsRestructured */
+ } else
+ sourceid = ev->sourceid;
+
+ if (prevSpriteWin != NullWindow) {
+ if (!ActivateEnterGrab(pDev, prevSpriteWin, newSpriteWin))
+ DoEnterLeaveEvents(pDev, sourceid, prevSpriteWin,
+ newSpriteWin, NotifyNormal);
+ }
+ /* set pSprite->win after ActivateEnterGrab, otherwise
+ sprite window == grab_window and no enter/leave events are
+ sent. */
+ pSprite->win = newSpriteWin;
+ PostNewCursor(pDev);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/**
+ * Windows have restructured, we need to update the sprite position and the
+ * sprite's cursor.
+ */
+void
+WindowsRestructured(void)
+{
+ DeviceIntPtr pDev = inputInfo.devices;
+ while(pDev)
+ {
+ if (IsMaster(pDev) || IsFloating(pDev))
+ CheckMotion(NULL, pDev);
+ pDev = pDev->next;
+ }
+}
+
+#ifdef PANORAMIX
+/* This was added to support reconfiguration under Xdmx. The problem is
+ * that if the 0th screen (i.e., screenInfo.screens[0]) is moved to an origin
+ * other than 0,0, the information in the private sprite structure must
+ * be updated accordingly, or XYToWindow (and other routines) will not
+ * compute correctly. */
+void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
+{
+ GrabPtr grab;
+ DeviceIntPtr pDev;
+ SpritePtr pSprite;
+
+ if (noPanoramiXExtension) return;
+
+ pDev = inputInfo.devices;
+ while(pDev)
+ {
+ if (DevHasCursor(pDev))
+ {
+ pSprite = pDev->spriteInfo->sprite;
+ pSprite->hot.x -= xoff;
+ pSprite->hot.y -= yoff;
+
+ pSprite->hotPhys.x -= xoff;
+ pSprite->hotPhys.y -= yoff;
+
+ pSprite->hotLimits.x1 -= xoff;
+ pSprite->hotLimits.y1 -= yoff;
+ pSprite->hotLimits.x2 -= xoff;
+ pSprite->hotLimits.y2 -= yoff;
+
+ if (RegionNotEmpty(&pSprite->Reg1))
+ RegionTranslate(&pSprite->Reg1, xoff, yoff);
+ if (RegionNotEmpty(&pSprite->Reg2))
+ RegionTranslate(&pSprite->Reg2, xoff, yoff);
+
+ /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */
+ if ((grab = pDev->deviceGrab.grab) && grab->confineTo) {
+ if (grab->confineTo->drawable.pScreen
+ != pSprite->hotPhys.pScreen)
+ pSprite->hotPhys.x = pSprite->hotPhys.y = 0;
+ ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE);
+ } else
+ ConfineCursorToWindow(
+ pDev,
+ pSprite->hotPhys.pScreen->root,
+ TRUE, FALSE);
+
+ }
+ pDev = pDev->next;
+ }
+}
+#endif
+
+/**
+ * Initialize a sprite for the given device and set it to some sane values. If
+ * the device already has a sprite alloc'd, don't realloc but just reset to
+ * default values.
+ * If a window is supplied, the sprite will be initialized with the window's
+ * cursor and positioned in the center of the window's screen. The root window
+ * is a good choice to pass in here.
+ *
+ * It's a good idea to call it only for pointer devices, unless you have a
+ * really talented keyboard.
+ *
+ * @param pDev The device to initialize.
+ * @param pWin The window where to generate the sprite in.
+ *
+ */
+void
+InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin)
+{
+ SpritePtr pSprite;
+ ScreenPtr pScreen;
+ CursorPtr pCursor;
+
+ if (!pDev->spriteInfo->sprite)
+ {
+ DeviceIntPtr it;
+
+ pDev->spriteInfo->sprite = (SpritePtr)calloc(1, sizeof(SpriteRec));
+ if (!pDev->spriteInfo->sprite)
+ FatalError("InitializeSprite: failed to allocate sprite struct");
+
+ /* We may have paired another device with this device before our
+ * device had a actual sprite. We need to check for this and reset the
+ * sprite field for all paired devices.
+ *
+ * The VCK is always paired with the VCP before the VCP has a sprite.
+ */
+ for (it = inputInfo.devices; it; it = it->next)
+ {
+ if (it->spriteInfo->paired == pDev)
+ it->spriteInfo->sprite = pDev->spriteInfo->sprite;
+ }
+ if (inputInfo.keyboard->spriteInfo->paired == pDev)
+ inputInfo.keyboard->spriteInfo->sprite = pDev->spriteInfo->sprite;
+ }
+
+ pSprite = pDev->spriteInfo->sprite;
+ pDev->spriteInfo->spriteOwner = TRUE;
+
+ pScreen = (pWin) ? pWin->drawable.pScreen : (ScreenPtr)NULL;
+ pSprite->hot.pScreen = pScreen;
+ pSprite->hotPhys.pScreen = pScreen;
+ if (pScreen)
+ {
+ pSprite->hotPhys.x = pScreen->width / 2;
+ pSprite->hotPhys.y = pScreen->height / 2;
+ pSprite->hotLimits.x2 = pScreen->width;
+ pSprite->hotLimits.y2 = pScreen->height;
+ }
+
+ pSprite->hot = pSprite->hotPhys;
+ pSprite->win = pWin;
+
+ if (pWin)
+ {
+ pCursor = wCursor(pWin);
+ pSprite->spriteTrace = (WindowPtr *)calloc(1, 32*sizeof(WindowPtr));
+ if (!pSprite->spriteTrace)
+ FatalError("Failed to allocate spriteTrace");
+ pSprite->spriteTraceSize = 32;
+
+ RootWindow(pDev->spriteInfo->sprite) = pWin;
+ pSprite->spriteTraceGood = 1;
+
+ pSprite->pEnqueueScreen = pScreen;
+ pSprite->pDequeueScreen = pSprite->pEnqueueScreen;
+
+ } else {
+ pCursor = NullCursor;
+ pSprite->spriteTrace = NULL;
+ pSprite->spriteTraceSize = 0;
+ pSprite->spriteTraceGood = 0;
+ pSprite->pEnqueueScreen = screenInfo.screens[0];
+ pSprite->pDequeueScreen = pSprite->pEnqueueScreen;
+ }
+ if (pCursor)
+ pCursor->refcnt++;
+ if (pSprite->current)
+ FreeCursor(pSprite->current, None);
+ pSprite->current = pCursor;
+
+ if (pScreen)
+ {
+ (*pScreen->RealizeCursor) ( pDev, pScreen, pSprite->current);
+ (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current,
+ &pSprite->hotLimits, &pSprite->physLimits);
+ pSprite->confined = FALSE;
+
+ (*pScreen->ConstrainCursor) (pDev, pScreen,
+ &pSprite->physLimits);
+ (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x,
+ pSprite->hot.y,
+ FALSE);
+ (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current);
+ }
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension) {
+ pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
+ pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
+ pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
+ pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
+ pSprite->physLimits = pSprite->hotLimits;
+ pSprite->confineWin = NullWindow;
+ pSprite->hotShape = NullRegion;
+ pSprite->screen = pScreen;
+ /* gotta UNINIT these someplace */
+ RegionNull(&pSprite->Reg1);
+ RegionNull(&pSprite->Reg2);
+ }
+#endif
+}
+
+/**
+ * Update the mouse sprite info when the server switches from a pScreen to another.
+ * Otherwise, the pScreen of the mouse sprite is never updated when we switch
+ * from a pScreen to another. Never updating the pScreen of the mouse sprite
+ * implies that windows that are in pScreen whose pScreen->myNum >0 will never
+ * get pointer events. This is because in CheckMotion(), sprite.hotPhys.pScreen
+ * always points to the first pScreen it has been set by
+ * DefineInitialRootWindow().
+ *
+ * Calling this function is useful for use cases where the server
+ * has more than one pScreen.
+ * This function is similar to DefineInitialRootWindow() but it does not
+ * reset the mouse pointer position.
+ * @param win must be the new pScreen we are switching to.
+ */
+void
+UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+ SpritePtr pSprite = NULL;
+ WindowPtr win = NULL;
+ CursorPtr pCursor;
+ if (!pScreen)
+ return ;
+
+ if (!pDev->spriteInfo->sprite)
+ return;
+
+ pSprite = pDev->spriteInfo->sprite;
+
+ win = pScreen->root;
+
+ pSprite->hotPhys.pScreen = pScreen;
+ pSprite->hot = pSprite->hotPhys;
+ pSprite->hotLimits.x2 = pScreen->width;
+ pSprite->hotLimits.y2 = pScreen->height;
+ pSprite->win = win;
+ pCursor = wCursor(win);
+ if (pCursor)
+ pCursor->refcnt++;
+ if (pSprite->current)
+ FreeCursor(pSprite->current, 0);
+ pSprite->current = pCursor;
+ pSprite->spriteTraceGood = 1;
+ pSprite->spriteTrace[0] = win;
+ (*pScreen->CursorLimits) (pDev,
+ pScreen,
+ pSprite->current,
+ &pSprite->hotLimits,
+ &pSprite->physLimits);
+ pSprite->confined = FALSE;
+ (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits);
+ (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current);
+
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension) {
+ pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
+ pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
+ pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
+ pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
+ pSprite->physLimits = pSprite->hotLimits;
+ pSprite->screen = pScreen;
+ }
+#endif
+}
+
+/*
+ * This does not take any shortcuts, and even ignores its argument, since
+ * it does not happen very often, and one has to walk up the tree since
+ * this might be a newly instantiated cursor for an intermediate window
+ * between the one the pointer is in and the one that the last cursor was
+ * instantiated from.
+ */
+void
+WindowHasNewCursor(WindowPtr pWin)
+{
+ DeviceIntPtr pDev;
+
+ for(pDev = inputInfo.devices; pDev; pDev = pDev->next)
+ if (DevHasCursor(pDev))
+ PostNewCursor(pDev);
+}
+
+void
+NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
+{
+ SpritePtr pSprite = pDev->spriteInfo->sprite;
+
+ pSprite->hotPhys.x = x;
+ pSprite->hotPhys.y = y;
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension) {
+ pSprite->hotPhys.x += newScreen->x - screenInfo.screens[0]->x;
+ pSprite->hotPhys.y += newScreen->y - screenInfo.screens[0]->y;
+ if (newScreen != pSprite->screen) {
+ pSprite->screen = newScreen;
+ /* Make sure we tell the DDX to update its copy of the screen */
+ if(pSprite->confineWin)
+ XineramaConfineCursorToWindow(pDev,
+ pSprite->confineWin, TRUE);
+ else
+ XineramaConfineCursorToWindow(pDev, screenInfo.screens[0]->root, TRUE);
+ /* if the pointer wasn't confined, the DDX won't get
+ told of the pointer warp so we reposition it here */
+ if(!syncEvents.playingEvents)
+ (*pSprite->screen->SetCursorPosition)(
+ pDev,
+ pSprite->screen,
+ pSprite->hotPhys.x + screenInfo.screens[0]->x -
+ pSprite->screen->x,
+ pSprite->hotPhys.y + screenInfo.screens[0]->y -
+ pSprite->screen->y, FALSE);
+ }
+ } else
+#endif
+ if (newScreen != pSprite->hotPhys.pScreen)
+ ConfineCursorToWindow(pDev, newScreen->root, TRUE, FALSE);
+}
+
+#ifdef PANORAMIX
+
+static Bool
+XineramaPointInWindowIsVisible(
+ WindowPtr pWin,
+ int x,
+ int y
+)
+{
+ BoxRec box;
+ int i, xoff, yoff;
+
+ if (!pWin->realized) return FALSE;
+
+ if (RegionContainsPoint(&pWin->borderClip, x, y, &box))
+ return TRUE;
+
+ if(!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) return FALSE;
+
+ xoff = x + screenInfo.screens[0]->x;
+ yoff = y + screenInfo.screens[0]->y;
+
+ for(i = 1; i < PanoramiXNumScreens; i++) {
+ pWin = inputInfo.pointer->spriteInfo->sprite->windows[i];
+ x = xoff - screenInfo.screens[i]->x;
+ y = yoff - screenInfo.screens[i]->y;
+
+ if(RegionContainsPoint(&pWin->borderClip, x, y, &box)
+ && (!wInputShape(pWin) ||
+ RegionContainsPoint(wInputShape(pWin),
+ x - pWin->drawable.x,
+ y - pWin->drawable.y, &box)))
+ return TRUE;
+
+ }
+
+ return FALSE;
+}
+
+static int
+XineramaWarpPointer(ClientPtr client)
+{
+ WindowPtr dest = NULL;
+ int x, y, rc;
+ SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite;
+
+ REQUEST(xWarpPointerReq);
+
+
+ if (stuff->dstWid != None) {
+ rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+ }
+ x = pSprite->hotPhys.x;
+ y = pSprite->hotPhys.y;
+
+ if (stuff->srcWid != None)
+ {
+ int winX, winY;
+ XID winID = stuff->srcWid;
+ WindowPtr source;
+
+ rc = dixLookupWindow(&source, winID, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+
+ winX = source->drawable.x;
+ winY = source->drawable.y;
+ if(source == screenInfo.screens[0]->root) {
+ winX -= screenInfo.screens[0]->x;
+ winY -= screenInfo.screens[0]->y;
+ }
+ if (x < winX + stuff->srcX ||
+ y < winY + stuff->srcY ||
+ (stuff->srcWidth != 0 &&
+ winX + stuff->srcX + (int)stuff->srcWidth < x) ||
+ (stuff->srcHeight != 0 &&
+ winY + stuff->srcY + (int)stuff->srcHeight < y) ||
+ !XineramaPointInWindowIsVisible(source, x, y))
+ return Success;
+ }
+ if (dest) {
+ x = dest->drawable.x;
+ y = dest->drawable.y;
+ if(dest == screenInfo.screens[0]->root) {
+ x -= screenInfo.screens[0]->x;
+ y -= screenInfo.screens[0]->y;
+ }
+ }
+
+ x += stuff->dstX;
+ y += stuff->dstY;
+
+ if (x < pSprite->physLimits.x1)
+ x = pSprite->physLimits.x1;
+ else if (x >= pSprite->physLimits.x2)
+ x = pSprite->physLimits.x2 - 1;
+ if (y < pSprite->physLimits.y1)
+ y = pSprite->physLimits.y1;
+ else if (y >= pSprite->physLimits.y2)
+ y = pSprite->physLimits.y2 - 1;
+ if (pSprite->hotShape)
+ ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y);
+
+ XineramaSetCursorPosition(PickPointer(client), x, y, TRUE);
+
+ return Success;
+}
+
+#endif
+
+
+/**
+ * Server-side protocol handling for WarpPointer request.
+ * Warps the cursor position to the coordinates given in the request.
+ */
+int
+ProcWarpPointer(ClientPtr client)
+{
+ WindowPtr dest = NULL;
+ int x, y, rc;
+ ScreenPtr newScreen;
+ DeviceIntPtr dev, tmp;
+ SpritePtr pSprite;
+
+ REQUEST(xWarpPointerReq);
+ REQUEST_SIZE_MATCH(xWarpPointerReq);
+
+ dev = PickPointer(client);
+
+ for (tmp = inputInfo.devices; tmp; tmp = tmp->next) {
+ if (GetMaster(tmp, MASTER_ATTACHED) == dev) {
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixWriteAccess);
+ if (rc != Success)
+ return rc;
+ }
+ }
+
+ if (dev->lastSlave)
+ dev = dev->lastSlave;
+ pSprite = dev->spriteInfo->sprite;
+
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension)
+ return XineramaWarpPointer(client);
+#endif
+
+ if (stuff->dstWid != None) {
+ rc = dixLookupWindow(&dest, stuff->dstWid, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+ }
+ x = pSprite->hotPhys.x;
+ y = pSprite->hotPhys.y;
+
+ if (stuff->srcWid != None)
+ {
+ int winX, winY;
+ XID winID = stuff->srcWid;
+ WindowPtr source;
+
+ rc = dixLookupWindow(&source, winID, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ winX = source->drawable.x;
+ winY = source->drawable.y;
+ if (source->drawable.pScreen != pSprite->hotPhys.pScreen ||
+ x < winX + stuff->srcX ||
+ y < winY + stuff->srcY ||
+ (stuff->srcWidth != 0 &&
+ winX + stuff->srcX + (int)stuff->srcWidth < x) ||
+ (stuff->srcHeight != 0 &&
+ winY + stuff->srcY + (int)stuff->srcHeight < y) ||
+ !PointInWindowIsVisible(source, x, y))
+ return Success;
+ }
+ if (dest)
+ {
+ x = dest->drawable.x;
+ y = dest->drawable.y;
+ newScreen = dest->drawable.pScreen;
+ } else
+ newScreen = pSprite->hotPhys.pScreen;
+
+ x += stuff->dstX;
+ y += stuff->dstY;
+
+ if (x < 0)
+ x = 0;
+ else if (x >= newScreen->width)
+ x = newScreen->width - 1;
+ if (y < 0)
+ y = 0;
+ else if (y >= newScreen->height)
+ y = newScreen->height - 1;
+
+ if (newScreen == pSprite->hotPhys.pScreen)
+ {
+ if (x < pSprite->physLimits.x1)
+ x = pSprite->physLimits.x1;
+ else if (x >= pSprite->physLimits.x2)
+ x = pSprite->physLimits.x2 - 1;
+ if (y < pSprite->physLimits.y1)
+ y = pSprite->physLimits.y1;
+ else if (y >= pSprite->physLimits.y2)
+ y = pSprite->physLimits.y2 - 1;
+ if (pSprite->hotShape)
+ ConfineToShape(dev, pSprite->hotShape, &x, &y);
+ (*newScreen->SetCursorPosition)(dev, newScreen, x, y, TRUE);
+ }
+ else if (!PointerConfinedToScreen(dev))
+ {
+ NewCurrentScreen(dev, newScreen, x, y);
+ }
+ return Success;
+}
+
+static Bool
+BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin)
+{
+ if(RegionNotEmpty(&pWin->borderSize))
+ return TRUE;
+
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension && XineramaSetWindowPntrs(pDev, pWin)) {
+ int i;
+
+ for(i = 1; i < PanoramiXNumScreens; i++) {
+ if(RegionNotEmpty(&pDev->spriteInfo->sprite->windows[i]->borderSize))
+ return TRUE;
+ }
+ }
+#endif
+ return FALSE;
+}
+
+/**
+ * "CheckPassiveGrabsOnWindow" checks to see if the event passed in causes a
+ * passive grab set on the window to be activated.
+ * If activate is true and a passive grab is found, it will be activated,
+ * and the event will be delivered to the client.
+ *
+ * @param pWin The window that may be subject to a passive grab.
+ * @param device Device that caused the event.
+ * @param event The current device event.
+ * @param checkCore Check for core grabs too.
+ * @param activate If a grab is found, activate it and deliver the event.
+ */
+
+GrabPtr
+CheckPassiveGrabsOnWindow(
+ WindowPtr pWin,
+ DeviceIntPtr device,
+ DeviceEvent *event,
+ BOOL checkCore,
+ BOOL activate)
+{
+ SpritePtr pSprite = device->spriteInfo->sprite;
+ GrabPtr grab = wPassiveGrabs(pWin);
+ GrabRec tempGrab;
+ GrabInfoPtr grabinfo;
+#define CORE_MATCH 0x1
+#define XI_MATCH 0x2
+#define XI2_MATCH 0x4
+ int match = 0;
+
+ if (!grab)
+ return NULL;
+ /* Fill out the grab details, but leave the type for later before
+ * comparing */
+ tempGrab.window = pWin;
+ tempGrab.device = device;
+ tempGrab.detail.exact = event->detail.key;
+ tempGrab.detail.pMask = NULL;
+ tempGrab.modifiersDetail.pMask = NULL;
+ tempGrab.next = NULL;
+ for (; grab; grab = grab->next)
+ {
+ DeviceIntPtr gdev;
+ XkbSrvInfoPtr xkbi = NULL;
+
+ gdev= grab->modifierDevice;
+ if (grab->grabtype == GRABTYPE_CORE)
+ {
+ if (IsPointerDevice(device))
+ gdev = GetPairedDevice(device);
+ else
+ gdev = device;
+ } else if (grab->grabtype == GRABTYPE_XI2)
+ {
+ /* if the device is an attached slave device, gdev must be the
+ * attached master keyboard. Since the slave may have been
+ * reattached after the grab, the modifier device may not be the
+ * same. */
+ if (!IsMaster(grab->device) && !IsFloating(device))
+ gdev = GetMaster(device, MASTER_KEYBOARD);
+ }
+
+
+ if (gdev && gdev->key)
+ xkbi= gdev->key->xkbInfo;
+ tempGrab.modifierDevice = grab->modifierDevice;
+ tempGrab.modifiersDetail.exact = xkbi ? xkbi->state.grab_mods : 0;
+
+ /* Check for XI2 and XI grabs first */
+ tempGrab.type = GetXI2Type((InternalEvent*)event);
+ tempGrab.grabtype = GRABTYPE_XI2;
+ if (GrabMatchesSecond(&tempGrab, grab, FALSE))
+ match = XI2_MATCH;
+
+ tempGrab.detail.exact = event->detail.key;
+ if (!match)
+ {
+ tempGrab.grabtype = GRABTYPE_XI;
+ if ((tempGrab.type = GetXIType((InternalEvent*)event)) &&
+ (GrabMatchesSecond(&tempGrab, grab, FALSE)))
+ match = XI_MATCH;
+ }
+
+ /* Check for a core grab (ignore the device when comparing) */
+ if (!match && checkCore)
+ {
+ tempGrab.grabtype = GRABTYPE_CORE;
+ if ((tempGrab.type = GetCoreType((InternalEvent*)event)) &&
+ (GrabMatchesSecond(&tempGrab, grab, TRUE)))
+ match = CORE_MATCH;
+ }
+
+ if (match && (!grab->confineTo ||
+ (grab->confineTo->realized &&
+ BorderSizeNotEmpty(device, grab->confineTo))))
+ {
+ int rc, count = 0;
+ xEvent *xE = NULL;
+
+ event->corestate &= 0x1f00;
+ event->corestate |= tempGrab.modifiersDetail.exact & (~0x1f00);
+ grabinfo = &device->deviceGrab;
+ /* In some cases a passive core grab may exist, but the client
+ * already has a core grab on some other device. In this case we
+ * must not get the grab, otherwise we may never ungrab the
+ * device.
+ */
+
+ if (grab->grabtype == GRABTYPE_CORE)
+ {
+ DeviceIntPtr other;
+ BOOL interfering = FALSE;
+
+ /* A passive grab may have been created for a different device
+ than it is assigned to at this point in time.
+ Update the grab's device and modifier device to reflect the
+ current state.
+ Since XGrabDeviceButton requires to specify the
+ modifierDevice explicitly, we don't override this choice.
+ */
+ if (tempGrab.type < GenericEvent)
+ {
+ grab->device = device;
+ grab->modifierDevice = GetPairedDevice(device);
+ }
+
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ GrabPtr othergrab = other->deviceGrab.grab;
+ if (othergrab && othergrab->grabtype == GRABTYPE_CORE &&
+ SameClient(grab, rClient(othergrab)) &&
+ ((IsPointerDevice(grab->device) &&
+ IsPointerDevice(othergrab->device)) ||
+ (IsKeyboardDevice(grab->device) &&
+ IsKeyboardDevice(othergrab->device))))
+ {
+ interfering = TRUE;
+ break;
+ }
+ }
+ if (interfering)
+ continue;
+ }
+
+ if (!activate)
+ return grab;
+
+ if (match & CORE_MATCH)
+ {
+ rc = EventToCore((InternalEvent*)event, &xE, &count);
+ if (rc != Success)
+ {
+ if (rc != BadMatch)
+ ErrorF("[dix] %s: core conversion failed in CPGFW "
+ "(%d, %d).\n", device->name, event->type, rc);
+ continue;
+ }
+ } else if (match & XI2_MATCH)
+ {
+ rc = EventToXI2((InternalEvent*)event, &xE);
+ if (rc != Success)
+ {
+ if (rc != BadMatch)
+ ErrorF("[dix] %s: XI2 conversion failed in CPGFW "
+ "(%d, %d).\n", device->name, event->type, rc);
+ continue;
+ }
+ count = 1;
+ } else
+ {
+ rc = EventToXI((InternalEvent*)event, &xE, &count);
+ if (rc != Success)
+ {
+ if (rc != BadMatch)
+ ErrorF("[dix] %s: XI conversion failed in CPGFW "
+ "(%d, %d).\n", device->name, event->type, rc);
+ continue;
+ }
+ }
+
+ (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
+
+ if (xE)
+ {
+ FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE);
+
+ /* XXX: XACE? */
+ TryClientEvents(rClient(grab), device, xE, count,
+ GetEventFilter(device, xE),
+ GetEventFilter(device, xE), grab);
+ }
+
+ if (grabinfo->sync.state == FROZEN_NO_EVENT)
+ {
+ if (!grabinfo->sync.event)
+ grabinfo->sync.event = calloc(1, sizeof(InternalEvent));
+ *grabinfo->sync.event = *event;
+ grabinfo->sync.state = FROZEN_WITH_EVENT;
+ }
+
+ free(xE);
+ return grab;
+ }
+ }
+ return NULL;
+#undef CORE_MATCH
+#undef XI_MATCH
+#undef XI2_MATCH
+}
+
+/**
+ * CheckDeviceGrabs handles both keyboard and pointer events that may cause
+ * a passive grab to be activated.
+ *
+ * If the event is a keyboard event, the ancestors of the focus window are
+ * traced down and tried to see if they have any passive grabs to be
+ * activated. If the focus window itself is reached and it's descendants
+ * contain the pointer, the ancestors of the window that the pointer is in
+ * are then traced down starting at the focus window, otherwise no grabs are
+ * activated.
+ * If the event is a pointer event, the ancestors of the window that the
+ * pointer is in are traced down starting at the root until CheckPassiveGrabs
+ * causes a passive grab to activate or all the windows are
+ * tried. PRH
+ *
+ * If a grab is activated, the event has been sent to the client already!
+ *
+ * The event we pass in must always be an XI event. From this, we then emulate
+ * the core event and then check for grabs.
+ *
+ * @param device The device that caused the event.
+ * @param xE The event to handle (Device{Button|Key}Press).
+ * @param count Number of events in list.
+ * @return TRUE if a grab has been activated or false otherwise.
+*/
+
+Bool
+CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, WindowPtr ancestor)
+{
+ int i;
+ WindowPtr pWin = NULL;
+ FocusClassPtr focus = IsPointerEvent((InternalEvent*)event) ? NULL : device->focus;
+ BOOL sendCore = (IsMaster(device) && device->coreEvents);
+ Bool ret = FALSE;
+
+ if (event->type != ET_ButtonPress &&
+ event->type != ET_KeyPress)
+ return FALSE;
+
+ if (event->type == ET_ButtonPress
+ && (device->button->buttonsDown != 1))
+ return FALSE;
+
+ if (device->deviceGrab.grab)
+ return FALSE;
+
+ i = 0;
+ if (ancestor)
+ {
+ while (i < device->spriteInfo->sprite->spriteTraceGood)
+ if (device->spriteInfo->sprite->spriteTrace[i++] == ancestor)
+ break;
+ if (i == device->spriteInfo->sprite->spriteTraceGood)
+ goto out;
+ }
+
+ if (focus)
+ {
+ for (; i < focus->traceGood; i++)
+ {
+ pWin = focus->trace[i];
+ if (CheckPassiveGrabsOnWindow(pWin, device, event, sendCore, TRUE))
+ {
+ ret = TRUE;
+ goto out;
+ }
+ }
+
+ if ((focus->win == NoneWin) ||
+ (i >= device->spriteInfo->sprite->spriteTraceGood) ||
+ (pWin && pWin != device->spriteInfo->sprite->spriteTrace[i-1]))
+ goto out;
+ }
+
+ for (; i < device->spriteInfo->sprite->spriteTraceGood; i++)
+ {
+ pWin = device->spriteInfo->sprite->spriteTrace[i];
+ if (CheckPassiveGrabsOnWindow(pWin, device, event, sendCore, TRUE))
+ {
+ ret = TRUE;
+ goto out;
+ }
+ }
+
+out:
+ if (ret == TRUE && event->type == ET_KeyPress)
+ device->deviceGrab.activatingKey = event->detail.key;
+ return ret;
+}
+
+/**
+ * Called for keyboard events to deliver event to whatever client owns the
+ * focus.
+ *
+ * The event is delivered to the keyboard's focus window, the root window or
+ * to the window owning the input focus.
+ *
+ * @param keybd The keyboard originating the event.
+ * @param event The event, not yet in wire format.
+ * @param window Window underneath the sprite.
+ */
+void
+DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window)
+{
+ DeviceIntPtr ptr;
+ WindowPtr focus = keybd->focus->win;
+ BOOL sendCore = (IsMaster(keybd) && keybd->coreEvents);
+ xEvent *core = NULL, *xE = NULL, *xi2 = NULL;
+ int count, rc;
+ int deliveries = 0;
+
+ if (focus == FollowKeyboardWin)
+ focus = inputInfo.keyboard->focus->win;
+ if (!focus)
+ return;
+ if (focus == PointerRootWin)
+ {
+ DeliverDeviceEvents(window, event, NullGrab, NullWindow, keybd);
+ return;
+ }
+ if ((focus == window) || IsParent(focus, window))
+ {
+ if (DeliverDeviceEvents(window, event, NullGrab, focus, keybd))
+ return;
+ }
+
+ /* just deliver it to the focus window */
+ ptr = GetPairedDevice(keybd);
+
+
+ rc = EventToXI2(event, &xi2);
+ if (rc == Success)
+ {
+ /* XXX: XACE */
+ int filter = GetEventFilter(keybd, xi2);
+ FixUpEventFromWindow(ptr->spriteInfo->sprite, xi2, focus, None, FALSE);
+ deliveries = DeliverEventsToWindow(keybd, focus, xi2, 1,
+ filter, NullGrab);
+ if (deliveries > 0)
+ goto unwind;
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: XI2 conversion failed in DFE (%d, %d). Skipping delivery.\n",
+ keybd->name, event->any.type, rc);
+
+ rc = EventToXI(event, &xE, &count);
+ if (rc == Success &&
+ XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, xE, count) == Success)
+ {
+ FixUpEventFromWindow(ptr->spriteInfo->sprite, xE, focus, None, FALSE);
+ deliveries = DeliverEventsToWindow(keybd, focus, xE, count,
+ GetEventFilter(keybd, xE),
+ NullGrab);
+
+ if (deliveries > 0)
+ goto unwind;
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: XI conversion failed in DFE (%d, %d). Skipping delivery.\n",
+ keybd->name, event->any.type, rc);
+
+ if (sendCore)
+ {
+ rc = EventToCore(event, &core, &count);
+ if (rc == Success) {
+ if (XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, core, count) == Success) {
+ FixUpEventFromWindow(keybd->spriteInfo->sprite, core, focus,
+ None, FALSE);
+ deliveries = DeliverEventsToWindow(keybd, focus, core, count,
+ GetEventFilter(keybd, core),
+ NullGrab);
+ }
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: core conversion failed DFE (%d, %d). Skipping delivery.\n",
+ keybd->name, event->any.type, rc);
+ }
+
+unwind:
+ free(core);
+ free(xE);
+ free(xi2);
+ return;
+}
+
+/**
+ * Deliver an event from a device that is currently grabbed. Uses
+ * DeliverDeviceEvents() for further delivery if a ownerEvents is set on the
+ * grab. If not, TryClientEvents() is used.
+ *
+ * @param deactivateGrab True if the device's grab should be deactivated.
+ */
+void
+DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
+ Bool deactivateGrab)
+{
+ GrabPtr grab;
+ GrabInfoPtr grabinfo;
+ int deliveries = 0;
+ DeviceIntPtr dev;
+ SpritePtr pSprite = thisDev->spriteInfo->sprite;
+ BOOL sendCore = FALSE;
+ int rc, count = 0;
+ xEvent *xi = NULL;
+ xEvent *xi2 = NULL;
+ xEvent *core = NULL;
+
+ grabinfo = &thisDev->deviceGrab;
+ grab = grabinfo->grab;
+
+ if (grab->ownerEvents)
+ {
+ WindowPtr focus;
+
+ /* Hack: Some pointer device have a focus class. So we need to check
+ * for the type of event, to see if we really want to deliver it to
+ * the focus window. For pointer events, the answer is no.
+ */
+ if (IsPointerEvent(event))
+ focus = PointerRootWin;
+ else if (thisDev->focus)
+ {
+ focus = thisDev->focus->win;
+ if (focus == FollowKeyboardWin)
+ focus = inputInfo.keyboard->focus->win;
+ }
+ else
+ focus = PointerRootWin;
+ if (focus == PointerRootWin)
+ deliveries = DeliverDeviceEvents(pSprite->win, event, grab,
+ NullWindow, thisDev);
+ else if (focus && (focus == pSprite->win ||
+ IsParent(focus, pSprite->win)))
+ deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus,
+ thisDev);
+ else if (focus)
+ deliveries = DeliverDeviceEvents(focus, event, grab, focus,
+ thisDev);
+ }
+ if (!deliveries)
+ {
+ Mask mask;
+
+ /* XXX: In theory, we could pass the internal events through to
+ * everything and only convert just before hitting the wire. We can't
+ * do that yet, so DGE is the last stop for internal events. From here
+ * onwards, we deal with core/XI events.
+ */
+
+ mask = grab->eventMask;
+
+ sendCore = (IsMaster(thisDev) && thisDev->coreEvents);
+ /* try core event */
+ if (sendCore && grab->grabtype == GRABTYPE_CORE)
+ {
+ rc = EventToCore(event, &core, &count);
+ if (rc == Success)
+ {
+ FixUpEventFromWindow(pSprite, core, grab->window, None, TRUE);
+ if (XaceHook(XACE_SEND_ACCESS, 0, thisDev,
+ grab->window, core, count) ||
+ XaceHook(XACE_RECEIVE_ACCESS, rClient(grab),
+ grab->window, core, count))
+ deliveries = 1; /* don't send, but pretend we did */
+ else if (!IsInterferingGrab(rClient(grab), thisDev, core))
+ {
+ deliveries = TryClientEvents(rClient(grab), thisDev,
+ core, count, mask,
+ GetEventFilter(thisDev, core),
+ grab);
+ }
+ } else if (rc != BadMatch)
+ ErrorF("[dix] DeliverGrabbedEvent. Core conversion failed.\n");
+ }
+
+ if (!deliveries)
+ {
+ rc = EventToXI2(event, &xi2);
+ if (rc == Success)
+ {
+ int evtype = ((xGenericEvent*)xi2)->evtype;
+ mask = grab->xi2mask[XIAllDevices][evtype/8] |
+ grab->xi2mask[XIAllMasterDevices][evtype/8] |
+ grab->xi2mask[thisDev->id][evtype/8];
+ /* try XI2 event */
+ FixUpEventFromWindow(pSprite, xi2, grab->window, None, TRUE);
+ /* XXX: XACE */
+ deliveries = TryClientEvents(rClient(grab), thisDev, xi2, 1, mask,
+ GetEventFilter(thisDev, xi2), grab);
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: XI2 conversion failed in DGE (%d, %d). Skipping delivery.\n",
+ thisDev->name, event->any.type, rc);
+ }
+
+ if (!deliveries)
+ {
+ rc = EventToXI(event, &xi, &count);
+ if (rc == Success)
+ {
+ /* try XI event */
+ if (grabinfo->fromPassiveGrab &&
+ grabinfo->implicitGrab)
+ mask = grab->deviceMask;
+ else
+ mask = grab->eventMask;
+
+ FixUpEventFromWindow(pSprite, xi, grab->window, None, TRUE);
+
+ if (XaceHook(XACE_SEND_ACCESS, 0, thisDev,
+ grab->window, xi, count) ||
+ XaceHook(XACE_RECEIVE_ACCESS, rClient(grab),
+ grab->window, xi, count))
+ deliveries = 1; /* don't send, but pretend we did */
+ else
+ {
+ deliveries =
+ TryClientEvents(rClient(grab), thisDev,
+ xi, count,
+ mask,
+ GetEventFilter(thisDev, xi),
+ grab);
+ }
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: XI conversion failed in DGE (%d, %d). Skipping delivery.\n",
+ thisDev->name, event->any.type, rc);
+ }
+
+ if (deliveries && (event->any.type == ET_Motion))
+ thisDev->valuator->motionHintWindow = grab->window;
+ }
+ if (deliveries && !deactivateGrab && event->any.type != ET_Motion)
+ {
+ switch (grabinfo->sync.state)
+ {
+ case FREEZE_BOTH_NEXT_EVENT:
+ dev = GetPairedDevice(thisDev);
+ if (dev)
+ {
+ FreezeThaw(dev, TRUE);
+ if ((dev->deviceGrab.sync.state == FREEZE_BOTH_NEXT_EVENT) &&
+ (CLIENT_BITS(grab->resource) ==
+ CLIENT_BITS(dev->deviceGrab.grab->resource)))
+ dev->deviceGrab.sync.state = FROZEN_NO_EVENT;
+ else
+ dev->deviceGrab.sync.other = grab;
+ }
+ /* fall through */
+ case FREEZE_NEXT_EVENT:
+ grabinfo->sync.state = FROZEN_WITH_EVENT;
+ FreezeThaw(thisDev, TRUE);
+ if (!grabinfo->sync.event)
+ grabinfo->sync.event = calloc(1, sizeof(InternalEvent));
+ *grabinfo->sync.event = event->device_event;
+ break;
+ }
+ }
+
+ free(core);
+ free(xi);
+ free(xi2);
+}
+
+/* This function is used to set the key pressed or key released state -
+ this is only used when the pressing of keys does not cause
+ the device's processInputProc to be called, as in for example Mouse Keys.
+*/
+void
+FixKeyState (DeviceEvent *event, DeviceIntPtr keybd)
+{
+ int key = event->detail.key;
+
+ if (event->type == ET_KeyPress) {
+ DebugF("FixKeyState: Key %d %s\n",key,
+ ((event->type == ET_KeyPress) ? "down" : "up"));
+ }
+
+ if (event->type == ET_KeyPress)
+ set_key_down(keybd, key, KEY_PROCESSED);
+ else if (event->type == ET_KeyRelease)
+ set_key_up(keybd, key, KEY_PROCESSED);
+ else
+ FatalError("Impossible keyboard event");
+}
+
+#define AtMostOneClient \
+ (SubstructureRedirectMask | ResizeRedirectMask | ButtonPressMask)
+#define ManagerMask \
+ (SubstructureRedirectMask | ResizeRedirectMask)
+
+/**
+ * Recalculate which events may be deliverable for the given window.
+ * Recalculated mask is used for quicker determination which events may be
+ * delivered to a window.
+ *
+ * The otherEventMasks on a WindowOptional is the combination of all event
+ * masks set by all clients on the window.
+ * deliverableEventMask is the combination of the eventMask and the
+ * otherEventMask plus the events that may be propagated to the parent.
+ *
+ * Traverses to siblings and parents of the window.
+ */
+void
+RecalculateDeliverableEvents(WindowPtr pWin)
+{
+ OtherClients *others;
+ WindowPtr pChild;
+
+ pChild = pWin;
+ while (1)
+ {
+ if (pChild->optional)
+ {
+ pChild->optional->otherEventMasks = 0;
+ for (others = wOtherClients(pChild); others; others = others->next)
+ {
+ pChild->optional->otherEventMasks |= others->mask;
+ }
+ }
+ pChild->deliverableEvents = pChild->eventMask|
+ wOtherEventMasks(pChild);
+ if (pChild->parent)
+ pChild->deliverableEvents |=
+ (pChild->parent->deliverableEvents &
+ ~wDontPropagateMask(pChild) & PropagateMask);
+ if (pChild->firstChild)
+ {
+ pChild = pChild->firstChild;
+ continue;
+ }
+ while (!pChild->nextSib && (pChild != pWin))
+ pChild = pChild->parent;
+ if (pChild == pWin)
+ break;
+ pChild = pChild->nextSib;
+ }
+}
+
+/**
+ *
+ * \param value must conform to DeleteType
+ */
+int
+OtherClientGone(pointer value, XID id)
+{
+ OtherClientsPtr other, prev;
+ WindowPtr pWin = (WindowPtr)value;
+
+ prev = 0;
+ for (other = wOtherClients(pWin); other; other = other->next)
+ {
+ if (other->resource == id)
+ {
+ if (prev)
+ prev->next = other->next;
+ else
+ {
+ if (!(pWin->optional->otherClients = other->next))
+ CheckWindowOptionalNeed (pWin);
+ }
+ free(other);
+ RecalculateDeliverableEvents(pWin);
+ return Success;
+ }
+ prev = other;
+ }
+ FatalError("client not on event list");
+ /*NOTREACHED*/
+ return -1; /* make compiler happy */
+}
+
+int
+EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask)
+{
+ Mask check;
+ OtherClients * others;
+ DeviceIntPtr dev;
+ int rc;
+
+ if (mask & ~AllEventMasks)
+ {
+ client->errorValue = mask;
+ return BadValue;
+ }
+ check = (mask & ManagerMask);
+ if (check) {
+ rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id,
+ RT_WINDOW, pWin, RT_NONE, NULL, DixManageAccess);
+ if (rc != Success)
+ return rc;
+ }
+ check = (mask & AtMostOneClient);
+ if (check & (pWin->eventMask|wOtherEventMasks(pWin)))
+ { /* It is illegal for two different
+ clients to select on any of the
+ events for AtMostOneClient. However,
+ it is OK, for some client to
+ continue selecting on one of those
+ events. */
+ if ((wClient(pWin) != client) && (check & pWin->eventMask))
+ return BadAccess;
+ for (others = wOtherClients (pWin); others; others = others->next)
+ {
+ if (!SameClient(others, client) && (check & others->mask))
+ return BadAccess;
+ }
+ }
+ if (wClient (pWin) == client)
+ {
+ check = pWin->eventMask;
+ pWin->eventMask = mask;
+ }
+ else
+ {
+ for (others = wOtherClients (pWin); others; others = others->next)
+ {
+ if (SameClient(others, client))
+ {
+ check = others->mask;
+ if (mask == 0)
+ {
+ FreeResource(others->resource, RT_NONE);
+ return Success;
+ }
+ else
+ others->mask = mask;
+ goto maskSet;
+ }
+ }
+ check = 0;
+ if (!pWin->optional && !MakeWindowOptional (pWin))
+ return BadAlloc;
+ others = malloc(sizeof(OtherClients));
+ if (!others)
+ return BadAlloc;
+ others->mask = mask;
+ others->resource = FakeClientID(client->index);
+ others->next = pWin->optional->otherClients;
+ pWin->optional->otherClients = others;
+ if (!AddResource(others->resource, RT_OTHERCLIENT, (pointer)pWin))
+ return BadAlloc;
+ }
+maskSet:
+ if ((mask & PointerMotionHintMask) && !(check & PointerMotionHintMask))
+ {
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (dev->valuator && dev->valuator->motionHintWindow == pWin)
+ dev->valuator->motionHintWindow = NullWindow;
+ }
+ }
+ RecalculateDeliverableEvents(pWin);
+ return Success;
+}
+
+int
+EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
+ Mask mask, Bool *checkOptional)
+{
+ int i, free;
+
+ if (mask & ~PropagateMask)
+ {
+ client->errorValue = mask;
+ return BadValue;
+ }
+ if (pWin->dontPropagate)
+ DontPropagateRefCnts[pWin->dontPropagate]--;
+ if (!mask)
+ i = 0;
+ else
+ {
+ for (i = DNPMCOUNT, free = 0; --i > 0; )
+ {
+ if (!DontPropagateRefCnts[i])
+ free = i;
+ else if (mask == DontPropagateMasks[i])
+ break;
+ }
+ if (!i && free)
+ {
+ i = free;
+ DontPropagateMasks[i] = mask;
+ }
+ }
+ if (i || !mask)
+ {
+ pWin->dontPropagate = i;
+ if (i)
+ DontPropagateRefCnts[i]++;
+ if (pWin->optional)
+ {
+ pWin->optional->dontPropagateMask = mask;
+ *checkOptional = TRUE;
+ }
+ }
+ else
+ {
+ if (!pWin->optional && !MakeWindowOptional (pWin))
+ {
+ if (pWin->dontPropagate)
+ DontPropagateRefCnts[pWin->dontPropagate]++;
+ return BadAlloc;
+ }
+ pWin->dontPropagate = 0;
+ pWin->optional->dontPropagateMask = mask;
+ }
+ RecalculateDeliverableEvents(pWin);
+ return Success;
+}
+
+/**
+ * Assembles an EnterNotify or LeaveNotify and sends it event to the client.
+ * Uses the paired keyboard to get some additional information.
+ */
+void
+CoreEnterLeaveEvent(
+ DeviceIntPtr mouse,
+ int type,
+ int mode,
+ int detail,
+ WindowPtr pWin,
+ Window child)
+{
+ xEvent event;
+ WindowPtr focus;
+ DeviceIntPtr keybd;
+ GrabPtr grab = mouse->deviceGrab.grab;
+ Mask mask;
+
+ keybd = GetPairedDevice(mouse);
+
+ if ((pWin == mouse->valuator->motionHintWindow) &&
+ (detail != NotifyInferior))
+ mouse->valuator->motionHintWindow = NullWindow;
+ if (grab)
+ {
+ mask = (pWin == grab->window) ? grab->eventMask : 0;
+ if (grab->ownerEvents)
+ mask |= EventMaskForClient(pWin, rClient(grab));
+ }
+ else
+ {
+ mask = pWin->eventMask | wOtherEventMasks(pWin);
+ }
+
+ memset(&event, 0, sizeof(xEvent));
+ event.u.u.type = type;
+ event.u.u.detail = detail;
+ event.u.enterLeave.time = currentTime.milliseconds;
+ event.u.enterLeave.rootX = mouse->spriteInfo->sprite->hot.x;
+ event.u.enterLeave.rootY = mouse->spriteInfo->sprite->hot.y;
+ /* Counts on the same initial structure of crossing & button events! */
+ FixUpEventFromWindow(mouse->spriteInfo->sprite, &event, pWin, None, FALSE);
+ /* Enter/Leave events always set child */
+ event.u.enterLeave.child = child;
+ event.u.enterLeave.flags = event.u.keyButtonPointer.sameScreen ?
+ ELFlagSameScreen : 0;
+ event.u.enterLeave.state = mouse->button ? (mouse->button->state & 0x1f00) : 0;
+ if (keybd)
+ event.u.enterLeave.state |=
+ XkbGrabStateFromRec(&keybd->key->xkbInfo->state);
+ event.u.enterLeave.mode = mode;
+ focus = (keybd) ? keybd->focus->win : None;
+ if ((focus != NoneWin) &&
+ ((pWin == focus) || (focus == PointerRootWin) ||
+ IsParent(focus, pWin)))
+ event.u.enterLeave.flags |= ELFlagFocus;
+
+ if ((mask & GetEventFilter(mouse, &event)))
+ {
+ if (grab)
+ TryClientEvents(rClient(grab), mouse, &event, 1, mask,
+ GetEventFilter(mouse, &event), grab);
+ else
+ DeliverEventsToWindow(mouse, pWin, &event, 1,
+ GetEventFilter(mouse, &event),
+ NullGrab);
+ }
+
+ if ((type == EnterNotify) && (mask & KeymapStateMask))
+ {
+ xKeymapEvent ke;
+ ClientPtr client = grab ? rClient(grab) : wClient(pWin);
+ if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess))
+ memset((char *)&ke.map[0], 0, 31);
+ else
+ memmove((char *)&ke.map[0], (char *)&keybd->key->down[1], 31);
+
+ ke.type = KeymapNotify;
+ if (grab)
+ TryClientEvents(rClient(grab), keybd, (xEvent *)&ke, 1,
+ mask, KeymapStateMask, grab);
+ else
+ DeliverEventsToWindow(mouse, pWin, (xEvent *)&ke, 1,
+ KeymapStateMask, NullGrab);
+ }
+}
+
+void
+DeviceEnterLeaveEvent(
+ DeviceIntPtr mouse,
+ int sourceid,
+ int type,
+ int mode,
+ int detail,
+ WindowPtr pWin,
+ Window child)
+{
+ GrabPtr grab = mouse->deviceGrab.grab;
+ xXIEnterEvent *event;
+ int filter;
+ int btlen, len, i;
+ DeviceIntPtr kbd;
+
+ if ((mode == XINotifyPassiveGrab && type == XI_Leave) ||
+ (mode == XINotifyPassiveUngrab && type == XI_Enter))
+ return;
+
+ btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0;
+ btlen = bytes_to_int32(btlen);
+ len = sizeof(xXIEnterEvent) + btlen * 4;
+
+ event = calloc(1, len);
+ event->type = GenericEvent;
+ event->extension = IReqCode;
+ event->evtype = type;
+ event->length = (len - sizeof(xEvent))/4;
+ event->buttons_len = btlen;
+ event->detail = detail;
+ event->time = currentTime.milliseconds;
+ event->deviceid = mouse->id;
+ event->sourceid = sourceid;
+ event->mode = mode;
+ event->root_x = FP1616(mouse->spriteInfo->sprite->hot.x, 0);
+ event->root_y = FP1616(mouse->spriteInfo->sprite->hot.y, 0);
+
+ for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
+ if (BitIsOn(mouse->button->down, i))
+ SetBit(&event[1], i);
+
+ kbd = GetMaster(mouse, MASTER_KEYBOARD);
+ if (kbd && kbd->key)
+ {
+ event->mods.base_mods = kbd->key->xkbInfo->state.base_mods;
+ event->mods.latched_mods = kbd->key->xkbInfo->state.latched_mods;
+ event->mods.locked_mods = kbd->key->xkbInfo->state.locked_mods;
+
+ event->group.base_group = kbd->key->xkbInfo->state.base_group;
+ event->group.latched_group = kbd->key->xkbInfo->state.latched_group;
+ event->group.locked_group = kbd->key->xkbInfo->state.locked_group;
+ }
+
+ FixUpEventFromWindow(mouse->spriteInfo->sprite, (xEvent*)event, pWin,
+ None, FALSE);
+
+ filter = GetEventFilter(mouse, (xEvent*)event);
+
+ if (grab)
+ {
+ Mask mask;
+ mask = grab->xi2mask[XIAllDevices][type/8] |
+ grab->xi2mask[XIAllMasterDevices][type/8] |
+ grab->xi2mask[mouse->id][type/8];
+ TryClientEvents(rClient(grab), mouse, (xEvent*)event, 1, mask,
+ filter, grab);
+ } else {
+ if (!GetWindowXI2Mask(mouse, pWin, (xEvent*)event))
+ goto out;
+ DeliverEventsToWindow(mouse, pWin, (xEvent*)event, 1, filter,
+ NullGrab);
+ }
+
+out:
+ free(event);
+}
+
+void
+CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin)
+{
+ xEvent event;
+
+ memset(&event, 0, sizeof(xEvent));
+ event.u.focus.mode = mode;
+ event.u.u.type = type;
+ event.u.u.detail = detail;
+ event.u.focus.window = pWin->drawable.id;
+
+ DeliverEventsToWindow(dev, pWin, &event, 1,
+ GetEventFilter(dev, &event), NullGrab);
+ if ((type == FocusIn) &&
+ ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask))
+ {
+ xKeymapEvent ke;
+ ClientPtr client = wClient(pWin);
+ if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess))
+ memset((char *)&ke.map[0], 0, 31);
+ else
+ memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31);
+
+ ke.type = KeymapNotify;
+ DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1,
+ KeymapStateMask, NullGrab);
+ }
+}
+
+/**
+ * Set the input focus to the given window. Subsequent keyboard events will be
+ * delivered to the given window.
+ *
+ * Usually called from ProcSetInputFocus as result of a client request. If so,
+ * the device is the inputInfo.keyboard.
+ * If called from ProcXSetInputFocus as result of a client xinput request, the
+ * device is set to the device specified by the client.
+ *
+ * @param client Client that requested input focus change.
+ * @param dev Focus device.
+ * @param focusID The window to obtain the focus. Can be PointerRoot or None.
+ * @param revertTo Specifies where the focus reverts to when window becomes
+ * unviewable.
+ * @param ctime Specifies the time.
+ * @param followOK True if pointer is allowed to follow the keyboard.
+ */
+int
+SetInputFocus(
+ ClientPtr client,
+ DeviceIntPtr dev,
+ Window focusID,
+ CARD8 revertTo,
+ Time ctime,
+ Bool followOK)
+{
+ FocusClassPtr focus;
+ WindowPtr focusWin;
+ int mode, rc;
+ TimeStamp time;
+ DeviceIntPtr keybd; /* used for FollowKeyboard or FollowKeyboardWin */
+
+
+ UpdateCurrentTime();
+ if ((revertTo != RevertToParent) &&
+ (revertTo != RevertToPointerRoot) &&
+ (revertTo != RevertToNone) &&
+ ((revertTo != RevertToFollowKeyboard) || !followOK))
+ {
+ client->errorValue = revertTo;
+ return BadValue;
+ }
+ time = ClientTimeToServerTime(ctime);
+
+ if (IsKeyboardDevice(dev))
+ keybd = dev;
+ else
+ keybd = GetPairedDevice(dev);
+
+ if ((focusID == None) || (focusID == PointerRoot))
+ focusWin = (WindowPtr)(long)focusID;
+ else if ((focusID == FollowKeyboard) && followOK)
+ {
+ focusWin = keybd->focus->win;
+ }
+ else {
+ rc = dixLookupWindow(&focusWin, focusID, client, DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+ /* It is a match error to try to set the input focus to an
+ unviewable window. */
+ if(!focusWin->realized)
+ return BadMatch;
+ }
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetFocusAccess);
+ if (rc != Success)
+ return Success;
+
+ focus = dev->focus;
+ if ((CompareTimeStamps(time, currentTime) == LATER) ||
+ (CompareTimeStamps(time, focus->time) == EARLIER))
+ return Success;
+ mode = (dev->deviceGrab.grab) ? NotifyWhileGrabbed : NotifyNormal;
+ if (focus->win == FollowKeyboardWin)
+ {
+ if (!ActivateFocusInGrab(dev, keybd->focus->win, focusWin))
+ DoFocusEvents(dev, keybd->focus->win, focusWin, mode);
+ } else
+ {
+ if (!ActivateFocusInGrab(dev, focus->win, focusWin))
+ DoFocusEvents(dev, focus->win, focusWin, mode);
+ }
+ focus->time = time;
+ focus->revert = revertTo;
+ if (focusID == FollowKeyboard)
+ focus->win = FollowKeyboardWin;
+ else
+ focus->win = focusWin;
+ if ((focusWin == NoneWin) || (focusWin == PointerRootWin))
+ focus->traceGood = 0;
+ else
+ {
+ int depth = 0;
+ WindowPtr pWin;
+
+ for (pWin = focusWin; pWin; pWin = pWin->parent) depth++;
+ if (depth > focus->traceSize)
+ {
+ focus->traceSize = depth+1;
+ focus->trace = realloc(focus->trace,
+ focus->traceSize * sizeof(WindowPtr));
+ }
+ focus->traceGood = depth;
+ for (pWin = focusWin, depth--; pWin; pWin = pWin->parent, depth--)
+ focus->trace[depth] = pWin;
+ }
+ return Success;
+}
+
+/**
+ * Server-side protocol handling for SetInputFocus request.
+ *
+ * Sets the input focus for the virtual core keyboard.
+ */
+int
+ProcSetInputFocus(ClientPtr client)
+{
+ DeviceIntPtr kbd = PickKeyboard(client);
+ REQUEST(xSetInputFocusReq);
+
+ REQUEST_SIZE_MATCH(xSetInputFocusReq);
+
+ return SetInputFocus(client, kbd, stuff->focus,
+ stuff->revertTo, stuff->time, FALSE);
+}
+
+/**
+ * Server-side protocol handling for GetInputFocus request.
+ *
+ * Sends the current input focus for the client's keyboard back to the
+ * client.
+ */
+int
+ProcGetInputFocus(ClientPtr client)
+{
+ DeviceIntPtr kbd = PickKeyboard(client);
+ xGetInputFocusReply rep;
+ FocusClassPtr focus = kbd->focus;
+ int rc;
+ /* REQUEST(xReq); */
+ REQUEST_SIZE_MATCH(xReq);
+
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, kbd, DixGetFocusAccess);
+ if (rc != Success)
+ return rc;
+
+ memset(&rep, 0, sizeof(xGetInputFocusReply));
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ if (focus->win == NoneWin)
+ rep.focus = None;
+ else if (focus->win == PointerRootWin)
+ rep.focus = PointerRoot;
+ else rep.focus = focus->win->drawable.id;
+ rep.revertTo = focus->revert;
+ WriteReplyToClient(client, sizeof(xGetInputFocusReply), &rep);
+ return Success;
+}
+
+/**
+ * Server-side protocol handling for GrabPointer request.
+ *
+ * Sets an active grab on the client's ClientPointer and returns success
+ * status to client.
+ */
+int
+ProcGrabPointer(ClientPtr client)
+{
+ xGrabPointerReply rep;
+ DeviceIntPtr device = PickPointer(client);
+ GrabPtr grab;
+ GrabMask mask;
+ WindowPtr confineTo;
+ CursorPtr oldCursor;
+ REQUEST(xGrabPointerReq);
+ TimeStamp time;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xGrabPointerReq);
+ UpdateCurrentTime();
+
+ if (stuff->eventMask & ~PointerGrabMask)
+ {
+ client->errorValue = stuff->eventMask;
+ return BadValue;
+ }
+
+ if (stuff->confineTo == None)
+ confineTo = NullWindow;
+ else
+ {
+ rc = dixLookupWindow(&confineTo, stuff->confineTo, client,
+ DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+ }
+
+ memset(&rep, 0, sizeof(xGrabPointerReply));
+ oldCursor = NullCursor;
+ grab = device->deviceGrab.grab;
+
+ if (grab)
+ {
+ if (grab->confineTo && !confineTo)
+ ConfineCursorToWindow(device, GetCurrentRootWindow(device), FALSE,
+ FALSE);
+ oldCursor = grab->cursor;
+ }
+
+ mask.core = stuff->eventMask;
+
+ rc = GrabDevice(client, device, stuff->pointerMode, stuff->keyboardMode,
+ stuff->grabWindow, stuff->ownerEvents, stuff->time,
+ &mask, GRABTYPE_CORE, stuff->cursor,
+ stuff->confineTo, &rep.status);
+ if (rc != Success)
+ return rc;
+
+ if (oldCursor && rep.status == GrabSuccess)
+ FreeCursor (oldCursor, (Cursor)0);
+
+ time = ClientTimeToServerTime(stuff->time);
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ WriteReplyToClient(client, sizeof(xGrabPointerReply), &rep);
+ return Success;
+}
+
+/**
+ * Server-side protocol handling for ChangeActivePointerGrab request.
+ *
+ * Changes properties of the grab hold by the client. If the client does not
+ * hold an active grab on the device, nothing happens.
+ */
+int
+ProcChangeActivePointerGrab(ClientPtr client)
+{
+ DeviceIntPtr device;
+ GrabPtr grab;
+ CursorPtr newCursor, oldCursor;
+ REQUEST(xChangeActivePointerGrabReq);
+ TimeStamp time;
+
+ REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq);
+ if (stuff->eventMask & ~PointerGrabMask)
+ {
+ client->errorValue = stuff->eventMask;
+ return BadValue;
+ }
+ if (stuff->cursor == None)
+ newCursor = NullCursor;
+ else
+ {
+ int rc = dixLookupResourceByType((pointer *)&newCursor, stuff->cursor,
+ RT_CURSOR, client, DixUseAccess);
+ if (rc != Success)
+ {
+ client->errorValue = stuff->cursor;
+ return rc;
+ }
+ }
+
+ device = PickPointer(client);
+ grab = device->deviceGrab.grab;
+
+ if (!grab)
+ return Success;
+ if (!SameClient(grab, client))
+ return Success;
+ time = ClientTimeToServerTime(stuff->time);
+ if ((CompareTimeStamps(time, currentTime) == LATER) ||
+ (CompareTimeStamps(time, device->deviceGrab.grabTime) == EARLIER))
+ return Success;
+ oldCursor = grab->cursor;
+ grab->cursor = newCursor;
+ if (newCursor)
+ newCursor->refcnt++;
+ PostNewCursor(device);
+ if (oldCursor)
+ FreeCursor(oldCursor, (Cursor)0);
+ grab->eventMask = stuff->eventMask;
+ return Success;
+}
+
+/**
+ * Server-side protocol handling for UngrabPointer request.
+ *
+ * Deletes a pointer grab on a device the client has grabbed.
+ */
+int
+ProcUngrabPointer(ClientPtr client)
+{
+ DeviceIntPtr device = PickPointer(client);
+ GrabPtr grab;
+ TimeStamp time;
+ REQUEST(xResourceReq);
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ UpdateCurrentTime();
+ grab = device->deviceGrab.grab;
+
+ time = ClientTimeToServerTime(stuff->id);
+ if ((CompareTimeStamps(time, currentTime) != LATER) &&
+ (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) &&
+ (grab) && SameClient(grab, client))
+ (*device->deviceGrab.DeactivateGrab)(device);
+ return Success;
+}
+
+/**
+ * Sets a grab on the given device.
+ *
+ * Called from ProcGrabKeyboard to work on the client's keyboard.
+ * Called from ProcXGrabDevice to work on the device specified by the client.
+ *
+ * The parameters this_mode and other_mode represent the keyboard_mode and
+ * pointer_mode parameters of XGrabKeyboard().
+ * See man page for details on all the parameters
+ *
+ * @param client Client that owns the grab.
+ * @param dev The device to grab.
+ * @param this_mode GrabModeSync or GrabModeAsync
+ * @param other_mode GrabModeSync or GrabModeAsync
+ * @param status Return code to be returned to the caller.
+ *
+ * @returns Success or BadValue.
+ */
+int
+GrabDevice(ClientPtr client, DeviceIntPtr dev,
+ unsigned pointer_mode, unsigned keyboard_mode, Window grabWindow,
+ unsigned ownerEvents, Time ctime, GrabMask *mask,
+ int grabtype, Cursor curs, Window confineToWin, CARD8 *status)
+{
+ WindowPtr pWin, confineTo;
+ GrabPtr grab;
+ TimeStamp time;
+ Mask access_mode = DixGrabAccess;
+ int rc;
+ GrabInfoPtr grabInfo = &dev->deviceGrab;
+ CursorPtr cursor;
+
+ UpdateCurrentTime();
+ if ((keyboard_mode != GrabModeSync) && (keyboard_mode != GrabModeAsync))
+ {
+ client->errorValue = keyboard_mode;
+ return BadValue;
+ }
+ if ((pointer_mode != GrabModeSync) && (pointer_mode != GrabModeAsync))
+ {
+ client->errorValue = pointer_mode;
+ return BadValue;
+ }
+ if ((ownerEvents != xFalse) && (ownerEvents != xTrue))
+ {
+ client->errorValue = ownerEvents;
+ return BadValue;
+ }
+
+ rc = dixLookupWindow(&pWin, grabWindow, client, DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ if (confineToWin == None)
+ confineTo = NullWindow;
+ else
+ {
+ rc = dixLookupWindow(&confineTo, confineToWin, client,
+ DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+ }
+
+ if (curs == None)
+ cursor = NullCursor;
+ else
+ {
+ rc = dixLookupResourceByType((pointer *)&cursor, curs, RT_CURSOR,
+ client, DixUseAccess);
+ if (rc != Success)
+ {
+ client->errorValue = curs;
+ return rc;
+ }
+ access_mode |= DixForceAccess;
+ }
+
+ if (keyboard_mode == GrabModeSync || pointer_mode == GrabModeSync)
+ access_mode |= DixFreezeAccess;
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode);
+ if (rc != Success)
+ return rc;
+
+ time = ClientTimeToServerTime(ctime);
+ grab = grabInfo->grab;
+ if (grab && grab->grabtype != grabtype)
+ *status = AlreadyGrabbed;
+ if (grab && !SameClient(grab, client))
+ *status = AlreadyGrabbed;
+ else if ((!pWin->realized) ||
+ (confineTo &&
+ !(confineTo->realized
+ && BorderSizeNotEmpty(dev, confineTo))))
+ *status = GrabNotViewable;
+ else if ((CompareTimeStamps(time, currentTime) == LATER) ||
+ (CompareTimeStamps(time, grabInfo->grabTime) == EARLIER))
+ *status = GrabInvalidTime;
+ else if (grabInfo->sync.frozen &&
+ grabInfo->sync.other && !SameClient(grabInfo->sync.other, client))
+ *status = GrabFrozen;
+ else
+ {
+ GrabRec tempGrab;
+
+ /* Otherwise segfaults happen on grabbed MPX devices */
+ memset(&tempGrab, 0, sizeof(GrabRec));
+
+ tempGrab.next = NULL;
+ tempGrab.window = pWin;
+ tempGrab.resource = client->clientAsMask;
+ tempGrab.ownerEvents = ownerEvents;
+ tempGrab.keyboardMode = keyboard_mode;
+ tempGrab.pointerMode = pointer_mode;
+ if (grabtype == GRABTYPE_CORE)
+ tempGrab.eventMask = mask->core;
+ else if (grabtype == GRABTYPE_XI)
+ tempGrab.eventMask = mask->xi;
+ else
+ memcpy(tempGrab.xi2mask, mask->xi2mask, sizeof(tempGrab.xi2mask));
+ tempGrab.device = dev;
+ tempGrab.cursor = cursor;
+ tempGrab.confineTo = confineTo;
+ tempGrab.grabtype = grabtype;
+ (*grabInfo->ActivateGrab)(dev, &tempGrab, time, FALSE);
+ *status = GrabSuccess;
+ }
+ return Success;
+}
+
+/**
+ * Server-side protocol handling for GrabKeyboard request.
+ *
+ * Grabs the client's keyboard and returns success status to client.
+ */
+int
+ProcGrabKeyboard(ClientPtr client)
+{
+ xGrabKeyboardReply rep;
+ REQUEST(xGrabKeyboardReq);
+ int result;
+ DeviceIntPtr keyboard = PickKeyboard(client);
+ GrabMask mask;
+
+ REQUEST_SIZE_MATCH(xGrabKeyboardReq);
+
+ memset(&rep, 0, sizeof(xGrabKeyboardReply));
+ mask.core = KeyPressMask | KeyReleaseMask;
+
+ result = GrabDevice(client, keyboard, stuff->pointerMode,
+ stuff->keyboardMode, stuff->grabWindow, stuff->ownerEvents,
+ stuff->time, &mask, GRABTYPE_CORE, None, None,
+ &rep.status);
+
+ if (result != Success)
+ return result;
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ WriteReplyToClient(client, sizeof(xGrabKeyboardReply), &rep);
+ return Success;
+}
+
+/**
+ * Server-side protocol handling for UngrabKeyboard request.
+ *
+ * Deletes a possible grab on the client's keyboard.
+ */
+int
+ProcUngrabKeyboard(ClientPtr client)
+{
+ DeviceIntPtr device = PickKeyboard(client);
+ GrabPtr grab;
+ TimeStamp time;
+ REQUEST(xResourceReq);
+
+ REQUEST_SIZE_MATCH(xResourceReq);
+ UpdateCurrentTime();
+
+ grab = device->deviceGrab.grab;
+
+ time = ClientTimeToServerTime(stuff->id);
+ if ((CompareTimeStamps(time, currentTime) != LATER) &&
+ (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) &&
+ (grab) && SameClient(grab, client) && grab->grabtype == GRABTYPE_CORE)
+ (*device->deviceGrab.DeactivateGrab)(device);
+ return Success;
+}
+
+/**
+ * Server-side protocol handling for QueryPointer request.
+ *
+ * Returns the current state and position of the client's ClientPointer to the
+ * client.
+ */
+int
+ProcQueryPointer(ClientPtr client)
+{
+ xQueryPointerReply rep;
+ WindowPtr pWin, t;
+ DeviceIntPtr mouse = PickPointer(client);
+ DeviceIntPtr keyboard;
+ SpritePtr pSprite;
+ int rc;
+ REQUEST(xResourceReq);
+ REQUEST_SIZE_MATCH(xResourceReq);
+
+ rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixReadAccess);
+ if (rc != Success && rc != BadAccess)
+ return rc;
+
+ keyboard = GetPairedDevice(mouse);
+
+ pSprite = mouse->spriteInfo->sprite;
+ if (mouse->valuator->motionHintWindow)
+ MaybeStopHint(mouse, client);
+ memset(&rep, 0, sizeof(xQueryPointerReply));
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.mask = mouse->button ? (mouse->button->state) : 0;
+ rep.mask |= XkbStateFieldFromRec(&keyboard->key->xkbInfo->state);
+ rep.length = 0;
+ rep.root = (GetCurrentRootWindow(mouse))->drawable.id;
+ rep.rootX = pSprite->hot.x;
+ rep.rootY = pSprite->hot.y;
+ rep.child = None;
+ if (pSprite->hot.pScreen == pWin->drawable.pScreen)
+ {
+ rep.sameScreen = xTrue;
+ rep.winX = pSprite->hot.x - pWin->drawable.x;
+ rep.winY = pSprite->hot.y - pWin->drawable.y;
+ for (t = pSprite->win; t; t = t->parent)
+ if (t->parent == pWin)
+ {
+ rep.child = t->drawable.id;
+ break;
+ }
+ }
+ else
+ {
+ rep.sameScreen = xFalse;
+ rep.winX = 0;
+ rep.winY = 0;
+ }
+
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension) {
+ rep.rootX += screenInfo.screens[0]->x;
+ rep.rootY += screenInfo.screens[0]->y;
+ if(stuff->id == rep.root) {
+ rep.winX += screenInfo.screens[0]->x;
+ rep.winY += screenInfo.screens[0]->y;
+ }
+ }
+#endif
+
+ if (rc == BadAccess) {
+ rep.mask = 0;
+ rep.child = None;
+ rep.rootX = 0;
+ rep.rootY = 0;
+ rep.winX = 0;
+ rep.winY = 0;
+ }
+
+ WriteReplyToClient(client, sizeof(xQueryPointerReply), &rep);
+
+ return Success;
+}
+
+/**
+ * Initializes the device list and the DIX sprite to sane values. Allocates
+ * trace memory used for quick window traversal.
+ */
+void
+InitEvents(void)
+{
+ int i;
+
+ inputInfo.numDevices = 0;
+ inputInfo.devices = (DeviceIntPtr)NULL;
+ inputInfo.off_devices = (DeviceIntPtr)NULL;
+ inputInfo.keyboard = (DeviceIntPtr)NULL;
+ inputInfo.pointer = (DeviceIntPtr)NULL;
+ /* The mask for pointer motion events may have changed in the last server
+ * generation. See comment above definition of filters. */
+ filters[0][PointerMotionMask] = MotionNotify;
+ for (i = 1; i < MAXDEVICES; i++)
+ {
+ memcpy(&filters[i], filters[0], sizeof(filters[0]));
+ }
+
+ syncEvents.replayDev = (DeviceIntPtr)NULL;
+ syncEvents.replayWin = NullWindow;
+ while (syncEvents.pending)
+ {
+ QdEventPtr next = syncEvents.pending->next;
+ free(syncEvents.pending);
+ syncEvents.pending = next;
+ }
+ syncEvents.pendtail = &syncEvents.pending;
+ syncEvents.playingEvents = FALSE;
+ syncEvents.time.months = 0;
+ syncEvents.time.milliseconds = 0; /* hardly matters */
+ currentTime.months = 0;
+ currentTime.milliseconds = GetTimeInMillis();
+ lastDeviceEventTime = currentTime;
+ for (i = 0; i < DNPMCOUNT; i++)
+ {
+ DontPropagateMasks[i] = 0;
+ DontPropagateRefCnts[i] = 0;
+ }
+
+ InputEventListLen = GetMaximumEventsNum();
+ InputEventList = InitEventList(InputEventListLen);
+ if (!InputEventList)
+ FatalError("[dix] Failed to allocate input event list.\n");
+}
+
+void
+CloseDownEvents(void)
+{
+ FreeEventList(InputEventList, InputEventListLen);
+ InputEventListLen = 0;
+ InputEventList = NULL;
+}
+
+/**
+ * Server-side protocol handling for SendEvent request.
+ *
+ * Locates the window to send the event to and forwards the event.
+ */
+int
+ProcSendEvent(ClientPtr client)
+{
+ WindowPtr pWin;
+ WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
+ DeviceIntPtr dev = PickPointer(client);
+ DeviceIntPtr keybd = GetPairedDevice(dev);
+ SpritePtr pSprite = dev->spriteInfo->sprite;
+ REQUEST(xSendEventReq);
+
+ REQUEST_SIZE_MATCH(xSendEventReq);
+
+ /* The client's event type must be a core event type or one defined by an
+ extension. */
+
+ if ( ! ((stuff->event.u.u.type > X_Reply &&
+ stuff->event.u.u.type < LASTEvent) ||
+ (stuff->event.u.u.type >= EXTENSION_EVENT_BASE &&
+ stuff->event.u.u.type < (unsigned)lastEvent)))
+ {
+ client->errorValue = stuff->event.u.u.type;
+ return BadValue;
+ }
+ if (stuff->event.u.u.type == ClientMessage &&
+ stuff->event.u.u.detail != 8 &&
+ stuff->event.u.u.detail != 16 &&
+ stuff->event.u.u.detail != 32)
+ {
+ client->errorValue = stuff->event.u.u.detail;
+ return BadValue;
+ }
+ if (stuff->eventMask & ~AllEventMasks)
+ {
+ client->errorValue = stuff->eventMask;
+ return BadValue;
+ }
+
+ if (stuff->destination == PointerWindow)
+ pWin = pSprite->win;
+ else if (stuff->destination == InputFocus)
+ {
+ WindowPtr inputFocus = (keybd) ? keybd->focus->win : NoneWin;
+
+ if (inputFocus == NoneWin)
+ return Success;
+
+ /* If the input focus is PointerRootWin, send the event to where
+ the pointer is if possible, then perhaps propogate up to root. */
+ if (inputFocus == PointerRootWin)
+ inputFocus = GetCurrentRootWindow(dev);
+
+ if (IsParent(inputFocus, pSprite->win))
+ {
+ effectiveFocus = inputFocus;
+ pWin = pSprite->win;
+ }
+ else
+ effectiveFocus = pWin = inputFocus;
+ }
+ else
+ dixLookupWindow(&pWin, stuff->destination, client, DixSendAccess);
+
+ if (!pWin)
+ return BadWindow;
+ if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue))
+ {
+ client->errorValue = stuff->propagate;
+ return BadValue;
+ }
+ stuff->event.u.u.type |= 0x80;
+ if (stuff->propagate)
+ {
+ for (;pWin; pWin = pWin->parent)
+ {
+ if (XaceHook(XACE_SEND_ACCESS, client, NULL, pWin,
+ &stuff->event, 1))
+ return Success;
+ if (DeliverEventsToWindow(dev, pWin,
+ &stuff->event, 1, stuff->eventMask, NullGrab))
+ return Success;
+ if (pWin == effectiveFocus)
+ return Success;
+ stuff->eventMask &= ~wDontPropagateMask(pWin);
+ if (!stuff->eventMask)
+ break;
+ }
+ }
+ else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, &stuff->event, 1))
+ DeliverEventsToWindow(dev, pWin, &stuff->event,
+ 1, stuff->eventMask, NullGrab);
+ return Success;
+}
+
+/**
+ * Server-side protocol handling for UngrabKey request.
+ *
+ * Deletes a passive grab for the given key. Works on the
+ * client's keyboard.
+ */
+int
+ProcUngrabKey(ClientPtr client)
+{
+ REQUEST(xUngrabKeyReq);
+ WindowPtr pWin;
+ GrabRec tempGrab;
+ DeviceIntPtr keybd = PickKeyboard(client);
+ int rc;
+
+ REQUEST_SIZE_MATCH(xUngrabKeyReq);
+ rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) ||
+ (stuff->key < keybd->key->xkbInfo->desc->min_key_code))
+ && (stuff->key != AnyKey))
+ {
+ client->errorValue = stuff->key;
+ return BadValue;
+ }
+ if ((stuff->modifiers != AnyModifier) &&
+ (stuff->modifiers & ~AllModifiersMask))
+ {
+ client->errorValue = stuff->modifiers;
+ return BadValue;
+ }
+ tempGrab.resource = client->clientAsMask;
+ tempGrab.device = keybd;
+ tempGrab.window = pWin;
+ tempGrab.modifiersDetail.exact = stuff->modifiers;
+ tempGrab.modifiersDetail.pMask = NULL;
+ tempGrab.modifierDevice = GetPairedDevice(keybd);
+ tempGrab.type = KeyPress;
+ tempGrab.grabtype = GRABTYPE_CORE;
+ tempGrab.detail.exact = stuff->key;
+ tempGrab.detail.pMask = NULL;
+ tempGrab.next = NULL;
+
+ if (!DeletePassiveGrabFromList(&tempGrab))
+ return BadAlloc;
+ return Success;
+}
+
+/**
+ * Server-side protocol handling for GrabKey request.
+ *
+ * Creates a grab for the client's keyboard and adds it to the list of passive
+ * grabs.
+ */
+int
+ProcGrabKey(ClientPtr client)
+{
+ WindowPtr pWin;
+ REQUEST(xGrabKeyReq);
+ GrabPtr grab;
+ DeviceIntPtr keybd = PickKeyboard(client);
+ int rc;
+ GrabParameters param;
+ GrabMask mask;
+
+ REQUEST_SIZE_MATCH(xGrabKeyReq);
+
+ memset(&param, 0, sizeof(param));
+ param.grabtype = GRABTYPE_CORE;
+ param.ownerEvents = stuff->ownerEvents;
+ param.this_device_mode = stuff->keyboardMode;
+ param.other_devices_mode = stuff->pointerMode;
+ param.modifiers = stuff->modifiers;
+
+ rc = CheckGrabValues(client, &param);
+ if (rc != Success)
+ return rc;
+
+ if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) ||
+ (stuff->key < keybd->key->xkbInfo->desc->min_key_code))
+ && (stuff->key != AnyKey))
+ {
+ client->errorValue = stuff->key;
+ return BadValue;
+ }
+ rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+
+ mask.core = (KeyPressMask | KeyReleaseMask);
+
+ grab = CreateGrab(client->index, keybd, keybd, pWin, GRABTYPE_CORE, &mask,
+ &param, KeyPress, stuff->key, NullWindow, NullCursor);
+ if (!grab)
+ return BadAlloc;
+ return AddPassiveGrabToList(client, grab);
+}
+
+
+/**
+ * Server-side protocol handling for GrabButton request.
+ *
+ * Creates a grab for the client's ClientPointer and adds it as a passive grab
+ * to the list.
+ */
+int
+ProcGrabButton(ClientPtr client)
+{
+ WindowPtr pWin, confineTo;
+ REQUEST(xGrabButtonReq);
+ CursorPtr cursor;
+ GrabPtr grab;
+ DeviceIntPtr ptr, modifierDevice;
+ Mask access_mode = DixGrabAccess;
+ GrabMask mask;
+ GrabParameters param;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xGrabButtonReq);
+ if ((stuff->pointerMode != GrabModeSync) &&
+ (stuff->pointerMode != GrabModeAsync))
+ {
+ client->errorValue = stuff->pointerMode;
+ return BadValue;
+ }
+ if ((stuff->keyboardMode != GrabModeSync) &&
+ (stuff->keyboardMode != GrabModeAsync))
+ {
+ client->errorValue = stuff->keyboardMode;
+ return BadValue;
+ }
+ if ((stuff->modifiers != AnyModifier) &&
+ (stuff->modifiers & ~AllModifiersMask))
+ {
+ client->errorValue = stuff->modifiers;
+ return BadValue;
+ }
+ if ((stuff->ownerEvents != xFalse) && (stuff->ownerEvents != xTrue))
+ {
+ client->errorValue = stuff->ownerEvents;
+ return BadValue;
+ }
+ if (stuff->eventMask & ~PointerGrabMask)
+ {
+ client->errorValue = stuff->eventMask;
+ return BadValue;
+ }
+ rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+ if (stuff->confineTo == None)
+ confineTo = NullWindow;
+ else {
+ rc = dixLookupWindow(&confineTo, stuff->confineTo, client,
+ DixSetAttrAccess);
+ if (rc != Success)
+ return rc;
+ }
+ if (stuff->cursor == None)
+ cursor = NullCursor;
+ else
+ {
+ rc = dixLookupResourceByType((pointer *)&cursor, stuff->cursor, RT_CURSOR,
+ client, DixUseAccess);
+ if (rc != Success)
+ {
+ client->errorValue = stuff->cursor;
+ return rc;
+ }
+ access_mode |= DixForceAccess;
+ }
+
+ ptr = PickPointer(client);
+ modifierDevice = GetPairedDevice(ptr);
+ if (stuff->pointerMode == GrabModeSync ||
+ stuff->keyboardMode == GrabModeSync)
+ access_mode |= DixFreezeAccess;
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, ptr, access_mode);
+ if (rc != Success)
+ return rc;
+
+ memset(&param, 0, sizeof(param));
+ param.grabtype = GRABTYPE_CORE;
+ param.ownerEvents = stuff->ownerEvents;
+ param.this_device_mode = stuff->keyboardMode;
+ param.other_devices_mode = stuff->pointerMode;
+ param.modifiers = stuff->modifiers;
+
+ mask.core = stuff->eventMask;
+
+ grab = CreateGrab(client->index, ptr, modifierDevice, pWin,
+ GRABTYPE_CORE, &mask, &param, ButtonPress,
+ stuff->button, confineTo, cursor);
+ if (!grab)
+ return BadAlloc;
+ return AddPassiveGrabToList(client, grab);
+}
+
+/**
+ * Server-side protocol handling for UngrabButton request.
+ *
+ * Deletes a passive grab on the client's ClientPointer from the list.
+ */
+int
+ProcUngrabButton(ClientPtr client)
+{
+ REQUEST(xUngrabButtonReq);
+ WindowPtr pWin;
+ GrabRec tempGrab;
+ int rc;
+ DeviceIntPtr ptr;
+
+ REQUEST_SIZE_MATCH(xUngrabButtonReq);
+ if ((stuff->modifiers != AnyModifier) &&
+ (stuff->modifiers & ~AllModifiersMask))
+ {
+ client->errorValue = stuff->modifiers;
+ return BadValue;
+ }
+ rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+
+ ptr = PickPointer(client);
+
+ tempGrab.resource = client->clientAsMask;
+ tempGrab.device = ptr;
+ tempGrab.window = pWin;
+ tempGrab.modifiersDetail.exact = stuff->modifiers;
+ tempGrab.modifiersDetail.pMask = NULL;
+ tempGrab.modifierDevice = GetPairedDevice(ptr);
+ tempGrab.type = ButtonPress;
+ tempGrab.detail.exact = stuff->button;
+ tempGrab.grabtype = GRABTYPE_CORE;
+ tempGrab.detail.pMask = NULL;
+ tempGrab.next = NULL;
+
+ if (!DeletePassiveGrabFromList(&tempGrab))
+ return BadAlloc;
+ return Success;
+}
+
+/**
+ * Deactivate any grab that may be on the window, remove the focus.
+ * Delete any XInput extension events from the window too. Does not change the
+ * window mask. Use just before the window is deleted.
+ *
+ * If freeResources is set, passive grabs on the window are deleted.
+ *
+ * @param pWin The window to delete events from.
+ * @param freeResources True if resources associated with the window should be
+ * deleted.
+ */
+void
+DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources)
+{
+ WindowPtr parent;
+ DeviceIntPtr mouse = inputInfo.pointer;
+ DeviceIntPtr keybd = inputInfo.keyboard;
+ FocusClassPtr focus;
+ OtherClientsPtr oc;
+ GrabPtr passive;
+ GrabPtr grab;
+
+
+ /* Deactivate any grabs performed on this window, before making any
+ input focus changes. */
+ grab = mouse->deviceGrab.grab;
+ if (grab &&
+ ((grab->window == pWin) || (grab->confineTo == pWin)))
+ (*mouse->deviceGrab.DeactivateGrab)(mouse);
+
+
+ /* Deactivating a keyboard grab should cause focus events. */
+ grab = keybd->deviceGrab.grab;
+ if (grab && (grab->window == pWin))
+ (*keybd->deviceGrab.DeactivateGrab)(keybd);
+
+ /* And now the real devices */
+ for (mouse = inputInfo.devices; mouse; mouse = mouse->next)
+ {
+ grab = mouse->deviceGrab.grab;
+ if (grab && ((grab->window == pWin) || (grab->confineTo == pWin)))
+ (*mouse->deviceGrab.DeactivateGrab)(mouse);
+ }
+
+
+ for (keybd = inputInfo.devices; keybd; keybd = keybd->next)
+ {
+ if (IsKeyboardDevice(keybd))
+ {
+ focus = keybd->focus;
+
+ /* If the focus window is a root window (ie. has no parent) then don't
+ delete the focus from it. */
+
+ if ((pWin == focus->win) && (pWin->parent != NullWindow))
+ {
+ int focusEventMode = NotifyNormal;
+
+ /* If a grab is in progress, then alter the mode of focus events. */
+
+ if (keybd->deviceGrab.grab)
+ focusEventMode = NotifyWhileGrabbed;
+
+ switch (focus->revert)
+ {
+ case RevertToNone:
+ DoFocusEvents(keybd, pWin, NoneWin, focusEventMode);
+ focus->win = NoneWin;
+ focus->traceGood = 0;
+ break;
+ case RevertToParent:
+ parent = pWin;
+ do
+ {
+ parent = parent->parent;
+ focus->traceGood--;
+ } while (!parent->realized
+ /* This would be a good protocol change -- windows being reparented
+ during SaveSet processing would cause the focus to revert to the
+ nearest enclosing window which will survive the death of the exiting
+ client, instead of ending up reverting to a dying window and thence
+ to None
+ */
+#ifdef NOTDEF
+ || wClient(parent)->clientGone
+#endif
+ );
+ if (!ActivateFocusInGrab(keybd, pWin, parent))
+ DoFocusEvents(keybd, pWin, parent, focusEventMode);
+ focus->win = parent;
+ focus->revert = RevertToNone;
+ break;
+ case RevertToPointerRoot:
+ if (!ActivateFocusInGrab(keybd, pWin, PointerRootWin))
+ DoFocusEvents(keybd, pWin, PointerRootWin, focusEventMode);
+ focus->win = PointerRootWin;
+ focus->traceGood = 0;
+ break;
+ }
+ }
+ }
+
+ if (IsPointerDevice(keybd))
+ {
+ if (keybd->valuator->motionHintWindow == pWin)
+ keybd->valuator->motionHintWindow = NullWindow;
+ }
+ }
+
+ if (freeResources)
+ {
+ if (pWin->dontPropagate)
+ DontPropagateRefCnts[pWin->dontPropagate]--;
+ while ( (oc = wOtherClients(pWin)) )
+ FreeResource(oc->resource, RT_NONE);
+ while ( (passive = wPassiveGrabs(pWin)) )
+ FreeResource(passive->resource, RT_NONE);
+ }
+
+ DeleteWindowFromAnyExtEvents(pWin, freeResources);
+}
+
+/**
+ * Call this whenever some window at or below pWin has changed geometry. If
+ * there is a grab on the window, the cursor will be re-confined into the
+ * window.
+ */
+void
+CheckCursorConfinement(WindowPtr pWin)
+{
+ GrabPtr grab;
+ WindowPtr confineTo;
+ DeviceIntPtr pDev;
+
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return;
+#endif
+
+ for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
+ {
+ if (DevHasCursor(pDev))
+ {
+ grab = pDev->deviceGrab.grab;
+ if (grab && (confineTo = grab->confineTo))
+ {
+ if (!BorderSizeNotEmpty(pDev, confineTo))
+ (*pDev->deviceGrab.DeactivateGrab)(pDev);
+ else if ((pWin == confineTo) || IsParent(pWin, confineTo))
+ ConfineCursorToWindow(pDev, confineTo, TRUE, TRUE);
+ }
+ }
+ }
+}
+
+Mask
+EventMaskForClient(WindowPtr pWin, ClientPtr client)
+{
+ OtherClientsPtr other;
+
+ if (wClient (pWin) == client)
+ return pWin->eventMask;
+ for (other = wOtherClients(pWin); other; other = other->next)
+ {
+ if (SameClient(other, client))
+ return other->mask;
+ }
+ return 0;
+}
+
+/**
+ * Server-side protocol handling for RecolorCursor request.
+ */
+int
+ProcRecolorCursor(ClientPtr client)
+{
+ CursorPtr pCursor;
+ int rc, nscr;
+ ScreenPtr pscr;
+ Bool displayed;
+ SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite;
+ REQUEST(xRecolorCursorReq);
+
+ REQUEST_SIZE_MATCH(xRecolorCursorReq);
+ rc = dixLookupResourceByType((pointer *)&pCursor, stuff->cursor, RT_CURSOR,
+ client, DixWriteAccess);
+ if (rc != Success)
+ {
+ client->errorValue = stuff->cursor;
+ return rc;
+ }
+
+ pCursor->foreRed = stuff->foreRed;
+ pCursor->foreGreen = stuff->foreGreen;
+ pCursor->foreBlue = stuff->foreBlue;
+
+ pCursor->backRed = stuff->backRed;
+ pCursor->backGreen = stuff->backGreen;
+ pCursor->backBlue = stuff->backBlue;
+
+ for (nscr = 0; nscr < screenInfo.numScreens; nscr++)
+ {
+ pscr = screenInfo.screens[nscr];
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension)
+ displayed = (pscr == pSprite->screen);
+ else
+#endif
+ displayed = (pscr == pSprite->hotPhys.pScreen);
+ ( *pscr->RecolorCursor)(PickPointer(client), pscr, pCursor,
+ (pCursor == pSprite->current) && displayed);
+ }
+ return Success;
+}
+
+/**
+ * Write the given events to a client, swapping the byte order if necessary.
+ * To swap the byte ordering, a callback is called that has to be set up for
+ * the given event type.
+ *
+ * In the case of DeviceMotionNotify trailed by DeviceValuators, the events
+ * can be more than one. Usually it's just one event.
+ *
+ * Do not modify the event structure passed in. See comment below.
+ *
+ * @param pClient Client to send events to.
+ * @param count Number of events.
+ * @param events The event list.
+ */
+void
+WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
+{
+#ifdef PANORAMIX
+ xEvent eventCopy;
+#endif
+ xEvent *eventTo, *eventFrom;
+ int i,
+ eventlength = sizeof(xEvent);
+
+ if (!pClient || pClient == serverClient || pClient->clientGone)
+ return;
+
+ for (i = 0; i < count; i++)
+ if ((events[i].u.u.type & 0x7f) != KeymapNotify)
+ events[i].u.u.sequenceNumber = pClient->sequence;
+
+ /* Let XKB rewrite the state, as it depends on client preferences. */
+ XkbFilterEvents(pClient, count, events);
+
+#ifdef PANORAMIX
+ if(!noPanoramiXExtension &&
+ (screenInfo.screens[0]->x || screenInfo.screens[0]->y))
+ {
+ switch(events->u.u.type) {
+ case MotionNotify:
+ case ButtonPress:
+ case ButtonRelease:
+ case KeyPress:
+ case KeyRelease:
+ case EnterNotify:
+ case LeaveNotify:
+ /*
+ When multiple clients want the same event DeliverEventsToWindow
+ passes the same event structure multiple times so we can't
+ modify the one passed to us
+ */
+ count = 1; /* should always be 1 */
+ memcpy(&eventCopy, events, sizeof(xEvent));
+ eventCopy.u.keyButtonPointer.rootX += screenInfo.screens[0]->x;
+ eventCopy.u.keyButtonPointer.rootY += screenInfo.screens[0]->y;
+ if(eventCopy.u.keyButtonPointer.event ==
+ eventCopy.u.keyButtonPointer.root)
+ {
+ eventCopy.u.keyButtonPointer.eventX += screenInfo.screens[0]->x;
+ eventCopy.u.keyButtonPointer.eventY += screenInfo.screens[0]->y;
+ }
+ events = &eventCopy;
+ break;
+ default: break;
+ }
+ }
+#endif
+
+ if (EventCallback)
+ {
+ EventInfoRec eventinfo;
+ eventinfo.client = pClient;
+ eventinfo.events = events;
+ eventinfo.count = count;
+ CallCallbacks(&EventCallback, (pointer)&eventinfo);
+ }
+#ifdef XSERVER_DTRACE
+ if (XSERVER_SEND_EVENT_ENABLED()) {
+ for (i = 0; i < count; i++)
+ {
+ XSERVER_SEND_EVENT(pClient->index, events[i].u.u.type, &events[i]);
+ }
+ }
+#endif
+ /* Just a safety check to make sure we only have one GenericEvent, it just
+ * makes things easier for me right now. (whot) */
+ for (i = 1; i < count; i++)
+ {
+ if (events[i].u.u.type == GenericEvent)
+ {
+ ErrorF("[dix] TryClientEvents: Only one GenericEvent at a time.\n");
+ return;
+ }
+ }
+
+ if (events->u.u.type == GenericEvent)
+ {
+ eventlength += ((xGenericEvent*)events)->length * 4;
+ }
+
+ if(pClient->swapped)
+ {
+ if (eventlength > swapEventLen)
+ {
+ swapEventLen = eventlength;
+ swapEvent = realloc(swapEvent, swapEventLen);
+ if (!swapEvent)
+ {
+ FatalError("WriteEventsToClient: Out of memory.\n");
+ return;
+ }
+ }
+
+ for(i = 0; i < count; i++)
+ {
+ eventFrom = &events[i];
+ eventTo = swapEvent;
+
+ /* Remember to strip off the leading bit of type in case
+ this event was sent with "SendEvent." */
+ (*EventSwapVector[eventFrom->u.u.type & 0177])
+ (eventFrom, eventTo);
+
+ WriteToClient(pClient, eventlength, (char *)eventTo);
+ }
+ }
+ else
+ {
+ /* only one GenericEvent, remember? that means either count is 1 and
+ * eventlength is arbitrary or eventlength is 32 and count doesn't
+ * matter. And we're all set. Woohoo. */
+ WriteToClient(pClient, count * eventlength, (char *) events);
+ }
+}
+
+/*
+ * Set the client pointer for the given client.
+ *
+ * A client can have exactly one ClientPointer. Each time a
+ * request/reply/event is processed and the choice of devices is ambiguous
+ * (e.g. QueryPointer request), the server will pick the ClientPointer (see
+ * PickPointer()).
+ * If a keyboard is needed, the first keyboard paired with the CP is used.
+ */
+int
+SetClientPointer(ClientPtr client, DeviceIntPtr device)
+{
+ int rc = XaceHook(XACE_DEVICE_ACCESS, client, device, DixUseAccess);
+ if (rc != Success)
+ return rc;
+
+ if (!IsMaster(device))
+ {
+ ErrorF("[dix] Need master device for ClientPointer. This is a bug.\n");
+ return BadDevice;
+ } else if (!device->spriteInfo->spriteOwner)
+ {
+ ErrorF("[dix] Device %d does not have a sprite. "
+ "Cannot be ClientPointer\n", device->id);
+ return BadDevice;
+ }
+ client->clientPtr = device;
+ return Success;
+}
+
+/* PickPointer will pick an appropriate pointer for the given client.
+ *
+ * An "appropriate device" is (in order of priority):
+ * 1) A device the given client has a core grab on.
+ * 2) A device set as ClientPointer for the given client.
+ * 3) The first master device.
+ */
+DeviceIntPtr
+PickPointer(ClientPtr client)
+{
+ DeviceIntPtr it = inputInfo.devices;
+
+ /* First, check if the client currently has a grab on a device. Even
+ * keyboards count. */
+ for(it = inputInfo.devices; it; it = it->next)
+ {
+ GrabPtr grab = it->deviceGrab.grab;
+ if (grab && grab->grabtype == GRABTYPE_CORE && SameClient(grab, client))
+ {
+ it = GetMaster(it, MASTER_POINTER);
+ return it; /* Always return a core grabbed device */
+ }
+ }
+
+ if (!client->clientPtr)
+ {
+ DeviceIntPtr it = inputInfo.devices;
+ while (it)
+ {
+ if (IsMaster(it) && it->spriteInfo->spriteOwner)
+ {
+ client->clientPtr = it;
+ break;
+ }
+ it = it->next;
+ }
+ }
+ return client->clientPtr;
+}
+
+/* PickKeyboard will pick an appropriate keyboard for the given client by
+ * searching the list of devices for the keyboard device that is paired with
+ * the client's pointer.
+ */
+DeviceIntPtr
+PickKeyboard(ClientPtr client)
+{
+ DeviceIntPtr ptr = PickPointer(client);
+ DeviceIntPtr kbd = GetMaster(ptr, MASTER_KEYBOARD);
+
+ if (!kbd)
+ {
+ ErrorF("[dix] ClientPointer not paired with a keyboard. This "
+ "is a bug.\n");
+ }
+
+ return kbd;
+}
+
+/* A client that has one or more core grabs does not get core events from
+ * devices it does not have a grab on. Legacy applications behave bad
+ * otherwise because they are not used to it and the events interfere.
+ * Only applies for core events.
+ *
+ * Return true if a core event from the device would interfere and should not
+ * be delivered.
+ */
+Bool
+IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event)
+{
+ DeviceIntPtr it = inputInfo.devices;
+
+ switch(event->u.u.type)
+ {
+ case KeyPress:
+ case KeyRelease:
+ case ButtonPress:
+ case ButtonRelease:
+ case MotionNotify:
+ case EnterNotify:
+ case LeaveNotify:
+ break;
+ default:
+ return FALSE;
+ }
+
+ if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client))
+ return FALSE;
+
+ while(it)
+ {
+ if (it != dev)
+ {
+ if (it->deviceGrab.grab && SameClient(it->deviceGrab.grab, client)
+ && !it->deviceGrab.fromPassiveGrab)
+ {
+ if ((IsPointerDevice(it) && IsPointerDevice(dev)) ||
+ (IsKeyboardDevice(it) && IsKeyboardDevice(dev)))
+ return TRUE;
+ }
+ }
+ it = it->next;
+ }
+
+ return FALSE;
+}
+
diff --git a/xorg-server/dix/gc.c b/xorg-server/dix/gc.c
index e7bcc66f1..92d24dde4 100644
--- a/xorg-server/dix/gc.c
+++ b/xorg-server/dix/gc.c
@@ -321,10 +321,30 @@ ChangeGC(ClientPtr client, GC *pGC, BITS32 mask, ChangeGCValPtr pUnion)
break;
}
case GCClipXOrigin:
+ #ifndef _DEBUG
NEXTVAL(INT16, pGC->clipOrg.x);
+ #else
+ {
+ long Val;
+ NEXTVAL(long, Val);
+ if (abs(Val)>65535)
+ ErrorF("Value received for GCClipXOrigin is too large %x\n",Val);
+ pGC->clipOrg.x=(INT16)(Val&0xffff);
+ }
+ #endif
break;
case GCClipYOrigin:
+ #ifndef _DEBUG
NEXTVAL(INT16, pGC->clipOrg.y);
+ #else
+ {
+ long Val;
+ NEXTVAL(long, Val);
+ if (abs(Val)>65535)
+ ErrorF("Value received for GCClipYOrigin is too large %x\n",Val);
+ pGC->clipOrg.y=(INT16)(Val&0xffff);
+ }
+ #endif
break;
case GCClipMask:
NEXT_PTR(PixmapPtr, pPixmap);
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index 2361810a0..7f273fb2d 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -65,6 +65,21 @@
#include "extnsionst.h"
#include "listdev.h" /* for sizing up DeviceClassesChangedEvent */
+#ifdef _MSC_VER
+#include <math.h>
+
+float roundf(float f)
+{
+ return ((f<0.0f) ? ceil(f-.5) : floor (f+.5));
+}
+double roundd(double f)
+{
+ return ((f<0.0) ? ceil(f-.5) : floor (f+.5));
+}
+#define lroundf(val) ((int)roundf(val))
+#define lround(val) ((int)roundd(val))
+#endif
+
/* Number of motion history events to store. */
#define MOTION_HISTORY_SIZE 256
@@ -952,7 +967,7 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,
ValuatorMask mask;
/* refuse events from disabled devices */
- if (!pDev->enabled)
+ if (!pDev || !pDev->enabled)
return 0;
if (!events ||!pDev->key || !pDev->focus || !pDev->kbdfeed ||
diff --git a/xorg-server/dix/inpututils.c b/xorg-server/dix/inpututils.c
index 077ffce01..b61cf4831 100644
--- a/xorg-server/dix/inpututils.c
+++ b/xorg-server/dix/inpututils.c
@@ -1,558 +1,558 @@
-/*
- * Copyright © 2008 Daniel Stone
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Author: Daniel Stone <daniel@fooishbar.org>
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include "dix-config.h"
-#endif
-
-#include "exevents.h"
-#include "exglobals.h"
-#include "misc.h"
-#include "input.h"
-#include "inputstr.h"
-#include "xace.h"
-#include "xkbsrv.h"
-#include "xkbstr.h"
-#include "inpututils.h"
-
-/* Check if a button map change is okay with the device.
- * Returns -1 for BadValue, as it collides with MappingBusy. */
-static int
-check_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, CARD32 *errval_out,
- ClientPtr client)
-{
- int i, ret;
-
- if (!dev || !dev->button)
- {
- client->errorValue = (dev) ? dev->id : 0;
- return BadDevice;
- }
-
- ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess);
- if (ret != Success)
- {
- client->errorValue = dev->id;
- return ret;
- }
-
- for (i = 0; i < len; i++) {
- if (dev->button->map[i + 1] != map[i] && dev->button->down[i + 1])
- return MappingBusy;
- }
-
- return Success;
-}
-
-static void
-do_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client)
-{
- int i;
- xEvent core_mn;
- deviceMappingNotify xi_mn;
-
- /* The map in ButtonClassRec refers to button numbers, whereas the
- * protocol is zero-indexed. Sigh. */
- memcpy(&(dev->button->map[1]), map, len);
-
- core_mn.u.u.type = MappingNotify;
- core_mn.u.mappingNotify.request = MappingPointer;
-
- /* 0 is the server client. */
- for (i = 1; i < currentMaxClients; i++) {
- /* Don't send irrelevant events to naïve clients. */
- if (!clients[i] || clients[i]->clientState != ClientStateRunning)
- continue;
-
- if (!XIShouldNotify(clients[i], dev))
- continue;
-
- WriteEventsToClient(clients[i], 1, &core_mn);
- }
-
- xi_mn.type = DeviceMappingNotify;
- xi_mn.request = MappingPointer;
- xi_mn.deviceid = dev->id;
- xi_mn.time = GetTimeInMillis();
-
- SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) &xi_mn, 1);
-}
-
-/*
- * Does what it says on the box, both for core and Xi.
- *
- * Faithfully reports any errors encountered while trying to apply the map
- * to the requested device, faithfully ignores any errors encountered while
- * trying to apply the map to its master/slaves.
- */
-int
-ApplyPointerMapping(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client)
-{
- int ret;
-
- /* If we can't perform the change on the requested device, bail out. */
- ret = check_butmap_change(dev, map, len, &client->errorValue, client);
- if (ret != Success)
- return ret;
- do_butmap_change(dev, map, len, client);
-
- return Success;
-}
-
-/* Check if a modifier map change is okay with the device.
- * Returns -1 for BadValue, as it collides with MappingBusy; this particular
- * caveat can be removed with LegalModifier, as we have no other reason to
- * set MappingFailed. Sigh. */
-static int
-check_modmap_change(ClientPtr client, DeviceIntPtr dev, KeyCode *modmap)
-{
- int ret, i;
- XkbDescPtr xkb;
-
- ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess);
- if (ret != Success)
- return ret;
-
- if (!dev->key)
- return BadMatch;
- xkb = dev->key->xkbInfo->desc;
-
- for (i = 0; i < MAP_LENGTH; i++) {
- if (!modmap[i])
- continue;
-
- /* Check that all the new modifiers fall within the advertised
- * keycode range. */
- if (i < xkb->min_key_code || i > xkb->max_key_code) {
- client->errorValue = i;
- return -1;
- }
-
- /* Make sure the mapping is okay with the DDX. */
- if (!LegalModifier(i, dev)) {
- client->errorValue = i;
- return MappingFailed;
- }
-
- /* None of the new modifiers may be down while we change the
- * map. */
- if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) {
- client->errorValue = i;
- return MappingBusy;
- }
- }
-
- /* None of the old modifiers may be down while we change the map,
- * either. */
- for (i = xkb->min_key_code; i < xkb->max_key_code; i++) {
- if (!xkb->map->modmap[i])
- continue;
- if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) {
- client->errorValue = i;
- return MappingBusy;
- }
- }
-
- return Success;
-}
-
-static int
-check_modmap_change_slave(ClientPtr client, DeviceIntPtr master,
- DeviceIntPtr slave, CARD8 *modmap)
-{
- XkbDescPtr master_xkb, slave_xkb;
- int i, j;
-
- if (!slave->key || !master->key)
- return 0;
-
- master_xkb = master->key->xkbInfo->desc;
- slave_xkb = slave->key->xkbInfo->desc;
-
- /* Ignore devices with a clearly different keymap. */
- if (slave_xkb->min_key_code != master_xkb->min_key_code ||
- slave_xkb->max_key_code != master_xkb->max_key_code)
- return 0;
-
- for (i = 0; i < MAP_LENGTH; i++) {
- if (!modmap[i])
- continue;
-
- /* If we have different symbols for any modifier on an
- * extended keyboard, ignore the whole remap request. */
- for (j = 0;
- j < XkbKeyNumSyms(slave_xkb, i) &&
- j < XkbKeyNumSyms(master_xkb, i);
- j++)
- if (XkbKeySymsPtr(slave_xkb, i)[j] != XkbKeySymsPtr(master_xkb, i)[j])
- return 0;
- }
-
- if (check_modmap_change(client, slave, modmap) != Success)
- return 0;
-
- return 1;
-}
-
-/* Actually change the modifier map, and send notifications. Cannot fail. */
-static void
-do_modmap_change(ClientPtr client, DeviceIntPtr dev, CARD8 *modmap)
-{
- XkbApplyMappingChange(dev, NULL, 0, 0, modmap, serverClient);
-}
-
-/* Rebuild modmap (key -> mod) from map (mod -> key). */
-static int build_modmap_from_modkeymap(CARD8 *modmap, KeyCode *modkeymap,
- int max_keys_per_mod)
-{
- int i, len = max_keys_per_mod * 8;
-
- memset(modmap, 0, MAP_LENGTH);
-
- for (i = 0; i < len; i++) {
- if (!modkeymap[i])
- continue;
-
- if (modkeymap[i] >= MAP_LENGTH)
- return BadValue;
-
- if (modmap[modkeymap[i]])
- return BadValue;
-
- modmap[modkeymap[i]] = 1 << (i / max_keys_per_mod);
- }
-
- return Success;
-}
-
-int
-change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap,
- int max_keys_per_mod)
-{
- int ret;
- CARD8 modmap[MAP_LENGTH];
- DeviceIntPtr tmp;
-
- ret = build_modmap_from_modkeymap(modmap, modkeymap, max_keys_per_mod);
- if (ret != Success)
- return ret;
-
- /* If we can't perform the change on the requested device, bail out. */
- ret = check_modmap_change(client, dev, modmap);
- if (ret != Success)
- return ret;
- do_modmap_change(client, dev, modmap);
-
- /* Change any attached masters/slaves. */
- if (IsMaster(dev)) {
- for (tmp = inputInfo.devices; tmp; tmp = tmp->next) {
- if (!IsMaster(tmp) && GetMaster(tmp, MASTER_KEYBOARD) == dev)
- if (check_modmap_change_slave(client, dev, tmp, modmap))
- do_modmap_change(client, tmp, modmap);
- }
- }
- else if (!IsFloating(dev) && GetMaster(dev, MASTER_KEYBOARD)->lastSlave == dev) {
- /* If this fails, expect the results to be weird. */
- if (check_modmap_change(client, dev->master, modmap))
- do_modmap_change(client, dev->master, modmap);
- }
-
- return Success;
-}
-
-int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
- KeyCode **modkeymap_out, int *max_keys_per_mod_out)
-{
- CARD8 keys_per_mod[8];
- int max_keys_per_mod;
- KeyCode *modkeymap = NULL;
- int i, j, ret;
-
- ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess);
- if (ret != Success)
- return ret;
-
- if (!dev->key)
- return BadMatch;
-
- /* Count the number of keys per modifier to determine how wide we
- * should make the map. */
- max_keys_per_mod = 0;
- for (i = 0; i < 8; i++)
- keys_per_mod[i] = 0;
- for (i = 8; i < MAP_LENGTH; i++) {
- for (j = 0; j < 8; j++) {
- if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) {
- if (++keys_per_mod[j] > max_keys_per_mod)
- max_keys_per_mod = keys_per_mod[j];
- }
- }
- }
-
- if (max_keys_per_mod != 0) {
- modkeymap = calloc(max_keys_per_mod * 8, sizeof(KeyCode));
- if (!modkeymap)
- return BadAlloc;
-
- for (i = 0; i < 8; i++)
- keys_per_mod[i] = 0;
-
- for (i = 8; i < MAP_LENGTH; i++) {
- for (j = 0; j < 8; j++) {
- if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) {
- modkeymap[(j * max_keys_per_mod) + keys_per_mod[j]] = i;
- keys_per_mod[j]++;
- }
- }
- }
- }
-
- *max_keys_per_mod_out = max_keys_per_mod;
- *modkeymap_out = modkeymap;
-
- return Success;
-}
-
-/**
- * Duplicate the InputAttributes in the most obvious way.
- * No special memory handling is used to give drivers the maximum
- * flexibility with the data. Drivers should be able to call realloc on the
- * product string if needed and perform similar operations.
- */
-InputAttributes*
-DuplicateInputAttributes(InputAttributes *attrs)
-{
- InputAttributes *new_attr;
- int ntags = 0;
- char **tags, **new_tags;
-
- if (!attrs)
- return NULL;
-
- if (!(new_attr = calloc(1, sizeof(InputAttributes))))
- goto unwind;
-
- if (attrs->product && !(new_attr->product = strdup(attrs->product)))
- goto unwind;
- if (attrs->vendor && !(new_attr->vendor = strdup(attrs->vendor)))
- goto unwind;
- if (attrs->device && !(new_attr->device = strdup(attrs->device)))
- goto unwind;
- if (attrs->pnp_id && !(new_attr->pnp_id = strdup(attrs->pnp_id)))
- goto unwind;
- if (attrs->usb_id && !(new_attr->usb_id = strdup(attrs->usb_id)))
- goto unwind;
-
- new_attr->flags = attrs->flags;
-
- if ((tags = attrs->tags))
- {
- while(*tags++)
- ntags++;
-
- new_attr->tags = calloc(ntags + 1, sizeof(char*));
- if (!new_attr->tags)
- goto unwind;
-
- tags = attrs->tags;
- new_tags = new_attr->tags;
-
- while(*tags)
- {
- *new_tags = strdup(*tags);
- if (!*new_tags)
- goto unwind;
-
- tags++;
- new_tags++;
- }
- }
-
- return new_attr;
-
-unwind:
- FreeInputAttributes(new_attr);
- return NULL;
-}
-
-void
-FreeInputAttributes(InputAttributes *attrs)
-{
- char **tags;
-
- if (!attrs)
- return;
-
- free(attrs->product);
- free(attrs->vendor);
- free(attrs->device);
- free(attrs->pnp_id);
- free(attrs->usb_id);
-
- if ((tags = attrs->tags))
- while(*tags)
- free(*tags++);
-
- free(attrs->tags);
- free(attrs);
-}
-
-/**
- * Alloc a valuator mask large enough for num_valuators.
- */
-ValuatorMask*
-valuator_mask_new(int num_valuators)
-{
- /* alloc a fixed size mask for now and ignore num_valuators. in the
- * flying-car future, when we can dynamically alloc the masks and are
- * not constrained by signals, we can start using num_valuators */
- ValuatorMask *mask = calloc(1, sizeof(ValuatorMask));
- mask->last_bit = -1;
- return mask;
-}
-
-void
-valuator_mask_free(ValuatorMask **mask)
-{
- free(*mask);
- *mask = NULL;
-}
-
-
-/**
- * Sets a range of valuators between first_valuator and num_valuators with
- * the data in the valuators array. All other values are set to 0.
- */
-void
-valuator_mask_set_range(ValuatorMask *mask, int first_valuator, int num_valuators,
- const int* valuators)
-{
- int i;
-
- valuator_mask_zero(mask);
-
- for (i = first_valuator; i < min(first_valuator + num_valuators, MAX_VALUATORS); i++)
- valuator_mask_set(mask, i, valuators[i - first_valuator]);
-}
-
-/**
- * Reset mask to zero.
- */
-void
-valuator_mask_zero(ValuatorMask *mask)
-{
- memset(mask, 0, sizeof(*mask));
- mask->last_bit = -1;
-}
-
-/**
- * Returns the current size of the mask (i.e. the highest number of
- * valuators currently set + 1).
- */
-int
-valuator_mask_size(const ValuatorMask *mask)
-{
- return mask->last_bit + 1;
-}
-
-/**
- * Returns the number of valuators set in the given mask.
- */
-int
-valuator_mask_num_valuators(const ValuatorMask *mask)
-{
- return CountBits(mask->mask, min(mask->last_bit + 1, MAX_VALUATORS));
-}
-
-/**
- * Return true if the valuator is set in the mask, or false otherwise.
- */
-int
-valuator_mask_isset(const ValuatorMask *mask, int valuator)
-{
- return mask->last_bit >= valuator && BitIsOn(mask->mask, valuator);
-}
-
-/**
- * Set the valuator to the given data.
- */
-void
-valuator_mask_set(ValuatorMask *mask, int valuator, int data)
-{
- mask->last_bit = max(valuator, mask->last_bit);
- SetBit(mask->mask, valuator);
- mask->valuators[valuator] = data;
-}
-
-/**
- * Return the requested valuator value. If the mask bit is not set for the
- * given valuator, the returned value is undefined.
- */
-int
-valuator_mask_get(const ValuatorMask *mask, int valuator)
-{
- return mask->valuators[valuator];
-}
-
-/**
- * Remove the valuator from the mask.
- */
-void
-valuator_mask_unset(ValuatorMask *mask, int valuator)
-{
- if (mask->last_bit >= valuator) {
- int i, lastbit = -1;
-
- ClearBit(mask->mask, valuator);
- mask->valuators[valuator] = 0;
-
- for (i = 0; i <= mask->last_bit; i++)
- if (valuator_mask_isset(mask, i))
- lastbit = max(lastbit, i);
- mask->last_bit = lastbit;
- }
-}
-
-void
-valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src)
-{
- if (src)
- memcpy(dest, src, sizeof(*dest));
- else
- valuator_mask_zero(dest);
-}
-
-int
-CountBits(const uint8_t *mask, int len)
-{
- int i;
- int ret = 0;
-
- for (i = 0; i < len; i++)
- if (BitIsOn(mask, i))
- ret++;
-
- return ret;
-}
+/*
+ * Copyright © 2008 Daniel Stone
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include "dix-config.h"
+#endif
+
+#include "exevents.h"
+#include "exglobals.h"
+#include "misc.h"
+#include "input.h"
+#include "inputstr.h"
+#include "xace.h"
+#include "xkbsrv.h"
+#include "xkbstr.h"
+#include "inpututils.h"
+
+/* Check if a button map change is okay with the device.
+ * Returns -1 for BadValue, as it collides with MappingBusy. */
+static int
+check_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, CARD32 *errval_out,
+ ClientPtr client)
+{
+ int i, ret;
+
+ if (!dev || !dev->button)
+ {
+ client->errorValue = (dev) ? dev->id : 0;
+ return BadDevice;
+ }
+
+ ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess);
+ if (ret != Success)
+ {
+ client->errorValue = dev->id;
+ return ret;
+ }
+
+ for (i = 0; i < len; i++) {
+ if (dev->button->map[i + 1] != map[i] && dev->button->down[i + 1])
+ return MappingBusy;
+ }
+
+ return Success;
+}
+
+static void
+do_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client)
+{
+ int i;
+ xEvent core_mn;
+ deviceMappingNotify xi_mn;
+
+ /* The map in ButtonClassRec refers to button numbers, whereas the
+ * protocol is zero-indexed. Sigh. */
+ memcpy(&(dev->button->map[1]), map, len);
+
+ core_mn.u.u.type = MappingNotify;
+ core_mn.u.mappingNotify.request = MappingPointer;
+
+ /* 0 is the server client. */
+ for (i = 1; i < currentMaxClients; i++) {
+ /* Don't send irrelevant events to naïve clients. */
+ if (!clients[i] || clients[i]->clientState != ClientStateRunning)
+ continue;
+
+ if (!XIShouldNotify(clients[i], dev))
+ continue;
+
+ WriteEventsToClient(clients[i], 1, &core_mn);
+ }
+
+ xi_mn.type = DeviceMappingNotify;
+ xi_mn.request = MappingPointer;
+ xi_mn.deviceid = dev->id;
+ xi_mn.time = GetTimeInMillis();
+
+ SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) &xi_mn, 1);
+}
+
+/*
+ * Does what it says on the box, both for core and Xi.
+ *
+ * Faithfully reports any errors encountered while trying to apply the map
+ * to the requested device, faithfully ignores any errors encountered while
+ * trying to apply the map to its master/slaves.
+ */
+int
+ApplyPointerMapping(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client)
+{
+ int ret;
+
+ /* If we can't perform the change on the requested device, bail out. */
+ ret = check_butmap_change(dev, map, len, &client->errorValue, client);
+ if (ret != Success)
+ return ret;
+ do_butmap_change(dev, map, len, client);
+
+ return Success;
+}
+
+/* Check if a modifier map change is okay with the device.
+ * Returns -1 for BadValue, as it collides with MappingBusy; this particular
+ * caveat can be removed with LegalModifier, as we have no other reason to
+ * set MappingFailed. Sigh. */
+static int
+check_modmap_change(ClientPtr client, DeviceIntPtr dev, KeyCode *modmap)
+{
+ int ret, i;
+ XkbDescPtr xkb;
+
+ ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess);
+ if (ret != Success)
+ return ret;
+
+ if (!dev->key)
+ return BadMatch;
+ xkb = dev->key->xkbInfo->desc;
+
+ for (i = 0; i < MAP_LENGTH; i++) {
+ if (!modmap[i])
+ continue;
+
+ /* Check that all the new modifiers fall within the advertised
+ * keycode range. */
+ if (i < xkb->min_key_code || i > xkb->max_key_code) {
+ client->errorValue = i;
+ return -1;
+ }
+
+ /* Make sure the mapping is okay with the DDX. */
+ if (!LegalModifier(i, dev)) {
+ client->errorValue = i;
+ return MappingFailed;
+ }
+
+ /* None of the new modifiers may be down while we change the
+ * map. */
+ if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) {
+ client->errorValue = i;
+ return MappingBusy;
+ }
+ }
+
+ /* None of the old modifiers may be down while we change the map,
+ * either. */
+ for (i = xkb->min_key_code; i < xkb->max_key_code; i++) {
+ if (!xkb->map->modmap[i])
+ continue;
+ if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) {
+ client->errorValue = i;
+ return MappingBusy;
+ }
+ }
+
+ return Success;
+}
+
+static int
+check_modmap_change_slave(ClientPtr client, DeviceIntPtr master,
+ DeviceIntPtr slave, CARD8 *modmap)
+{
+ XkbDescPtr master_xkb, slave_xkb;
+ int i, j;
+
+ if (!slave->key || !master->key)
+ return 0;
+
+ master_xkb = master->key->xkbInfo->desc;
+ slave_xkb = slave->key->xkbInfo->desc;
+
+ /* Ignore devices with a clearly different keymap. */
+ if (slave_xkb->min_key_code != master_xkb->min_key_code ||
+ slave_xkb->max_key_code != master_xkb->max_key_code)
+ return 0;
+
+ for (i = 0; i < MAP_LENGTH; i++) {
+ if (!modmap[i])
+ continue;
+
+ /* If we have different symbols for any modifier on an
+ * extended keyboard, ignore the whole remap request. */
+ for (j = 0;
+ j < XkbKeyNumSyms(slave_xkb, i) &&
+ j < XkbKeyNumSyms(master_xkb, i);
+ j++)
+ if (XkbKeySymsPtr(slave_xkb, i)[j] != XkbKeySymsPtr(master_xkb, i)[j])
+ return 0;
+ }
+
+ if (check_modmap_change(client, slave, modmap) != Success)
+ return 0;
+
+ return 1;
+}
+
+/* Actually change the modifier map, and send notifications. Cannot fail. */
+static void
+do_modmap_change(ClientPtr client, DeviceIntPtr dev, CARD8 *modmap)
+{
+ XkbApplyMappingChange(dev, NULL, 0, 0, modmap, serverClient);
+}
+
+/* Rebuild modmap (key -> mod) from map (mod -> key). */
+static int build_modmap_from_modkeymap(CARD8 *modmap, KeyCode *modkeymap,
+ int max_keys_per_mod)
+{
+ int i, len = max_keys_per_mod * 8;
+
+ memset(modmap, 0, MAP_LENGTH);
+
+ for (i = 0; i < len; i++) {
+ if (!modkeymap[i])
+ continue;
+
+ if (modkeymap[i] >= MAP_LENGTH)
+ return BadValue;
+
+ //if (modmap[modkeymap[i]]) It looks like it needlessly gives errors back
+ // return BadValue;
+
+ modmap[modkeymap[i]] |= 1 << (i / max_keys_per_mod); // Now or it because of previous line removal
+ }
+
+ return Success;
+}
+
+int
+change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap,
+ int max_keys_per_mod)
+{
+ int ret;
+ CARD8 modmap[MAP_LENGTH];
+ DeviceIntPtr tmp;
+
+ ret = build_modmap_from_modkeymap(modmap, modkeymap, max_keys_per_mod);
+ if (ret != Success)
+ return ret;
+
+ /* If we can't perform the change on the requested device, bail out. */
+ ret = check_modmap_change(client, dev, modmap);
+ if (ret != Success)
+ return ret;
+ do_modmap_change(client, dev, modmap);
+
+ /* Change any attached masters/slaves. */
+ if (IsMaster(dev)) {
+ for (tmp = inputInfo.devices; tmp; tmp = tmp->next) {
+ if (!IsMaster(tmp) && GetMaster(tmp, MASTER_KEYBOARD) == dev)
+ if (check_modmap_change_slave(client, dev, tmp, modmap))
+ do_modmap_change(client, tmp, modmap);
+ }
+ }
+ else if (!IsFloating(dev) && GetMaster(dev, MASTER_KEYBOARD)->lastSlave == dev) {
+ /* If this fails, expect the results to be weird. */
+ if (check_modmap_change(client, dev->master, modmap))
+ do_modmap_change(client, dev->master, modmap);
+ }
+
+ return Success;
+}
+
+int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
+ KeyCode **modkeymap_out, int *max_keys_per_mod_out)
+{
+ CARD8 keys_per_mod[8];
+ int max_keys_per_mod;
+ KeyCode *modkeymap = NULL;
+ int i, j, ret;
+
+ ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess);
+ if (ret != Success)
+ return ret;
+
+ if (!dev->key)
+ return BadMatch;
+
+ /* Count the number of keys per modifier to determine how wide we
+ * should make the map. */
+ max_keys_per_mod = 0;
+ for (i = 0; i < 8; i++)
+ keys_per_mod[i] = 0;
+ for (i = 8; i < MAP_LENGTH; i++) {
+ for (j = 0; j < 8; j++) {
+ if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) {
+ if (++keys_per_mod[j] > max_keys_per_mod)
+ max_keys_per_mod = keys_per_mod[j];
+ }
+ }
+ }
+
+ if (max_keys_per_mod != 0) {
+ modkeymap = calloc(max_keys_per_mod * 8, sizeof(KeyCode));
+ if (!modkeymap)
+ return BadAlloc;
+
+ for (i = 0; i < 8; i++)
+ keys_per_mod[i] = 0;
+
+ for (i = 8; i < MAP_LENGTH; i++) {
+ for (j = 0; j < 8; j++) {
+ if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) {
+ modkeymap[(j * max_keys_per_mod) + keys_per_mod[j]] = i;
+ keys_per_mod[j]++;
+ }
+ }
+ }
+ }
+
+ *max_keys_per_mod_out = max_keys_per_mod;
+ *modkeymap_out = modkeymap;
+
+ return Success;
+}
+
+/**
+ * Duplicate the InputAttributes in the most obvious way.
+ * No special memory handling is used to give drivers the maximum
+ * flexibility with the data. Drivers should be able to call realloc on the
+ * product string if needed and perform similar operations.
+ */
+InputAttributes*
+DuplicateInputAttributes(InputAttributes *attrs)
+{
+ InputAttributes *new_attr;
+ int ntags = 0;
+ char **tags, **new_tags;
+
+ if (!attrs)
+ return NULL;
+
+ if (!(new_attr = calloc(1, sizeof(InputAttributes))))
+ goto unwind;
+
+ if (attrs->product && !(new_attr->product = strdup(attrs->product)))
+ goto unwind;
+ if (attrs->vendor && !(new_attr->vendor = strdup(attrs->vendor)))
+ goto unwind;
+ if (attrs->device && !(new_attr->device = strdup(attrs->device)))
+ goto unwind;
+ if (attrs->pnp_id && !(new_attr->pnp_id = strdup(attrs->pnp_id)))
+ goto unwind;
+ if (attrs->usb_id && !(new_attr->usb_id = strdup(attrs->usb_id)))
+ goto unwind;
+
+ new_attr->flags = attrs->flags;
+
+ if ((tags = attrs->tags))
+ {
+ while(*tags++)
+ ntags++;
+
+ new_attr->tags = calloc(ntags + 1, sizeof(char*));
+ if (!new_attr->tags)
+ goto unwind;
+
+ tags = attrs->tags;
+ new_tags = new_attr->tags;
+
+ while(*tags)
+ {
+ *new_tags = strdup(*tags);
+ if (!*new_tags)
+ goto unwind;
+
+ tags++;
+ new_tags++;
+ }
+ }
+
+ return new_attr;
+
+unwind:
+ FreeInputAttributes(new_attr);
+ return NULL;
+}
+
+void
+FreeInputAttributes(InputAttributes *attrs)
+{
+ char **tags;
+
+ if (!attrs)
+ return;
+
+ free(attrs->product);
+ free(attrs->vendor);
+ free(attrs->device);
+ free(attrs->pnp_id);
+ free(attrs->usb_id);
+
+ if ((tags = attrs->tags))
+ while(*tags)
+ free(*tags++);
+
+ free(attrs->tags);
+ free(attrs);
+}
+
+/**
+ * Alloc a valuator mask large enough for num_valuators.
+ */
+ValuatorMask*
+valuator_mask_new(int num_valuators)
+{
+ /* alloc a fixed size mask for now and ignore num_valuators. in the
+ * flying-car future, when we can dynamically alloc the masks and are
+ * not constrained by signals, we can start using num_valuators */
+ ValuatorMask *mask = calloc(1, sizeof(ValuatorMask));
+ mask->last_bit = -1;
+ return mask;
+}
+
+void
+valuator_mask_free(ValuatorMask **mask)
+{
+ free(*mask);
+ *mask = NULL;
+}
+
+
+/**
+ * Sets a range of valuators between first_valuator and num_valuators with
+ * the data in the valuators array. All other values are set to 0.
+ */
+void
+valuator_mask_set_range(ValuatorMask *mask, int first_valuator, int num_valuators,
+ const int* valuators)
+{
+ int i;
+
+ valuator_mask_zero(mask);
+
+ for (i = first_valuator; i < min(first_valuator + num_valuators, MAX_VALUATORS); i++)
+ valuator_mask_set(mask, i, valuators[i - first_valuator]);
+}
+
+/**
+ * Reset mask to zero.
+ */
+void
+valuator_mask_zero(ValuatorMask *mask)
+{
+ memset(mask, 0, sizeof(*mask));
+ mask->last_bit = -1;
+}
+
+/**
+ * Returns the current size of the mask (i.e. the highest number of
+ * valuators currently set + 1).
+ */
+int
+valuator_mask_size(const ValuatorMask *mask)
+{
+ return mask->last_bit + 1;
+}
+
+/**
+ * Returns the number of valuators set in the given mask.
+ */
+int
+valuator_mask_num_valuators(const ValuatorMask *mask)
+{
+ return CountBits(mask->mask, min(mask->last_bit + 1, MAX_VALUATORS));
+}
+
+/**
+ * Return true if the valuator is set in the mask, or false otherwise.
+ */
+int
+valuator_mask_isset(const ValuatorMask *mask, int valuator)
+{
+ return mask->last_bit >= valuator && BitIsOn(mask->mask, valuator);
+}
+
+/**
+ * Set the valuator to the given data.
+ */
+void
+valuator_mask_set(ValuatorMask *mask, int valuator, int data)
+{
+ mask->last_bit = max(valuator, mask->last_bit);
+ SetBit(mask->mask, valuator);
+ mask->valuators[valuator] = data;
+}
+
+/**
+ * Return the requested valuator value. If the mask bit is not set for the
+ * given valuator, the returned value is undefined.
+ */
+int
+valuator_mask_get(const ValuatorMask *mask, int valuator)
+{
+ return mask->valuators[valuator];
+}
+
+/**
+ * Remove the valuator from the mask.
+ */
+void
+valuator_mask_unset(ValuatorMask *mask, int valuator)
+{
+ if (mask->last_bit >= valuator) {
+ int i, lastbit = -1;
+
+ ClearBit(mask->mask, valuator);
+ mask->valuators[valuator] = 0;
+
+ for (i = 0; i <= mask->last_bit; i++)
+ if (valuator_mask_isset(mask, i))
+ lastbit = max(lastbit, i);
+ mask->last_bit = lastbit;
+ }
+}
+
+void
+valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src)
+{
+ if (src)
+ memcpy(dest, src, sizeof(*dest));
+ else
+ valuator_mask_zero(dest);
+}
+
+int
+CountBits(const uint8_t *mask, int len)
+{
+ int i;
+ int ret = 0;
+
+ for (i = 0; i < len; i++)
+ if (BitIsOn(mask, i))
+ ret++;
+
+ return ret;
+}
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c
index 31e2d48c4..0be753742 100644
--- a/xorg-server/dix/main.c
+++ b/xorg-server/dix/main.c
@@ -1,354 +1,403 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-/* The panoramix components contained the following notice */
-/*****************************************************************
-
-Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
-BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Digital Equipment Corporation
-shall not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from Digital
-Equipment Corporation.
-
-******************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#include <version-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xos.h> /* for unistd.h */
-#include <X11/Xproto.h>
-#include <pixman.h>
-#include "scrnintstr.h"
-#include "misc.h"
-#include "os.h"
-#include "windowstr.h"
-#include "resource.h"
-#include "dixstruct.h"
-#include "gcstruct.h"
-#include "extension.h"
-#include "colormap.h"
-#include "colormapst.h"
-#include "cursorstr.h"
-#include "selection.h"
-#include <X11/fonts/font.h>
-#include "opaque.h"
-#include "servermd.h"
-#include "hotplug.h"
-#include "site.h"
-#include "dixfont.h"
-#include "extnsionst.h"
-#include "privates.h"
-#include "registry.h"
-#include "client.h"
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#else
-#include "dixevents.h" /* InitEvents() */
-#endif
-
-#ifdef DPMSExtension
-#include <X11/extensions/dpmsconst.h>
-#include "dpmsproc.h"
-#endif
-
-extern void Dispatch(void);
-
-#ifdef XQUARTZ
-#include <pthread.h>
-
-BOOL serverInitComplete = FALSE;
-pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;
-
-int dix_main(int argc, char *argv[], char *envp[]);
-
-int dix_main(int argc, char *argv[], char *envp[])
-#else
-int main(int argc, char *argv[], char *envp[])
-#endif
-{
- int i;
- HWEventQueueType alwaysCheckForInput[2];
-
- display = "0";
-
- InitRegions();
-
- pixman_disable_out_of_bounds_workaround();
-
- CheckUserParameters(argc, argv, envp);
-
- CheckUserAuthorization();
-
- InitConnectionLimits();
-
- ProcessCommandLine(argc, argv);
-
- alwaysCheckForInput[0] = 0;
- alwaysCheckForInput[1] = 1;
- while(1)
- {
- serverGeneration++;
- ScreenSaverTime = defaultScreenSaverTime;
- ScreenSaverInterval = defaultScreenSaverInterval;
- ScreenSaverBlanking = defaultScreenSaverBlanking;
- ScreenSaverAllowExposures = defaultScreenSaverAllowExposures;
-#ifdef DPMSExtension
- DPMSStandbyTime = DPMSSuspendTime = DPMSOffTime = ScreenSaverTime;
- DPMSEnabled = TRUE;
- DPMSPowerLevel = 0;
-#endif
- InitBlockAndWakeupHandlers();
- /* Perform any operating system dependent initializations you'd like */
- OsInit();
- if(serverGeneration == 1)
- {
- CreateWellKnownSockets();
- for (i=1; i<MAXCLIENTS; i++)
- clients[i] = NullClient;
- serverClient = calloc(sizeof(ClientRec), 1);
- if (!serverClient)
- FatalError("couldn't create server client");
- InitClient(serverClient, 0, (pointer)NULL);
- }
- else
- ResetWellKnownSockets ();
- clients[0] = serverClient;
- currentMaxClients = 1;
-
- /* Initialize privates before first allocation */
- dixResetPrivates();
-
- /* Initialize server client devPrivates, to be reallocated as
- * more client privates are registered
- */
- if (!dixAllocatePrivates(&serverClient->devPrivates, PRIVATE_CLIENT))
- FatalError("failed to create server client privates");
-
- if (!InitClientResources(serverClient)) /* for root resources */
- FatalError("couldn't init server resources");
-
- SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]);
- screenInfo.numScreens = 0;
-
- InitAtoms();
- InitEvents();
- InitSelections();
- InitGlyphCaching();
- dixResetRegistry();
- ResetFontPrivateIndex();
- InitCallbackManager();
- InitOutput(&screenInfo, argc, argv);
-
- if (screenInfo.numScreens < 1)
- FatalError("no screens found");
- InitExtensions(argc, argv);
-
- for (i = 0; i < screenInfo.numScreens; i++)
- {
- ScreenPtr pScreen = screenInfo.screens[i];
- if (!CreateScratchPixmapsForScreen(i))
- FatalError("failed to create scratch pixmaps");
- if (pScreen->CreateScreenResources &&
- !(*pScreen->CreateScreenResources)(pScreen))
- FatalError("failed to create screen resources");
- if (!CreateGCperDepth(i))
- FatalError("failed to create scratch GCs");
- if (!CreateDefaultStipple(i))
- FatalError("failed to create default stipple");
- if (!CreateRootWindow(pScreen))
- FatalError("failed to create root window");
- }
-
- InitFonts();
- if (SetDefaultFontPath(defaultFontPath) != Success) {
- ErrorF("[dix] failed to set default font path '%s'", defaultFontPath);
- }
- if (!SetDefaultFont(defaultTextFont)) {
- FatalError("could not open default font '%s'", defaultTextFont);
- }
-
- if (!(rootCursor = CreateRootCursor(NULL, 0))) {
- FatalError("could not open default cursor font '%s'",
- defaultCursorFont);
- }
-
-#ifdef DPMSExtension
- /* check all screens, looking for DPMS Capabilities */
- DPMSCapableFlag = DPMSSupported();
- if (!DPMSCapableFlag)
- DPMSEnabled = FALSE;
-#endif
-
-#ifdef PANORAMIX
- /*
- * Consolidate window and colourmap information for each screen
- */
- if (!noPanoramiXExtension)
- PanoramiXConsolidate();
-#endif
-
- for (i = 0; i < screenInfo.numScreens; i++)
- InitRootWindow(screenInfo.screens[i]->root);
-
- InitCoreDevices();
- InitInput(argc, argv);
- InitAndStartDevices();
- ReserveClientIds(serverClient);
-
- dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- if (!PanoramiXCreateConnectionBlock()) {
- FatalError("could not create connection block info");
- }
- } else
-#endif
- {
- if (!CreateConnectionBlock()) {
- FatalError("could not create connection block info");
- }
- }
-
-#ifdef XQUARTZ
- /* Let the other threads know the server is done with its init */
- pthread_mutex_lock(&serverInitCompleteMutex);
- serverInitComplete = TRUE;
- pthread_cond_broadcast(&serverInitCompleteCond);
- pthread_mutex_unlock(&serverInitCompleteMutex);
-#endif
-
- NotifyParentProcess();
-
- Dispatch();
-
- UndisplayDevices();
-
- /* Now free up whatever must be freed */
- if (screenIsSaved == SCREEN_SAVER_ON)
- dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
- FreeScreenSaverTimer();
- CloseDownExtensions();
-
-#ifdef PANORAMIX
- {
- Bool remember_it = noPanoramiXExtension;
- noPanoramiXExtension = TRUE;
- FreeAllResources();
- noPanoramiXExtension = remember_it;
- }
-#else
- FreeAllResources();
-#endif
-
- CloseInput();
-
- for (i = 0; i < screenInfo.numScreens; i++)
- screenInfo.screens[i]->root = NullWindow;
- CloseDownDevices();
- CloseDownEvents();
-
- for (i = screenInfo.numScreens - 1; i >= 0; i--)
- {
- FreeScratchPixmapsForScreen(i);
- FreeGCperDepth(i);
- FreeDefaultStipple(i);
- (* screenInfo.screens[i]->CloseScreen)(i, screenInfo.screens[i]);
- dixFreePrivates(screenInfo.screens[i]->devPrivates, PRIVATE_SCREEN);
- free(screenInfo.screens[i]);
- screenInfo.numScreens = i;
- }
-
- ReleaseClientIds(serverClient);
- dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT);
- serverClient->devPrivates = NULL;
-
- FreeFonts();
-
- FreeAuditTimer();
-
- if (dispatchException & DE_TERMINATE)
- {
- CloseWellKnownConnections();
- }
-
- OsCleanup((dispatchException & DE_TERMINATE) != 0);
-
- if (dispatchException & DE_TERMINATE)
- {
- ddxGiveUp();
- break;
- }
-
- free(ConnectionInfo);
- ConnectionInfo = NULL;
- }
- return 0;
-}
-
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/* The panoramix components contained the following notice */
+/*****************************************************************
+
+Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+
+******************************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#include <version-config.h>
+#endif
+
+#include <X11/X.h>
+#include <X11/Xos.h> /* for unistd.h */
+#include <X11/Xproto.h>
+#include <pixman.h>
+#include "scrnintstr.h"
+#include "misc.h"
+#include "os.h"
+#include "windowstr.h"
+#include "resource.h"
+#include "dixstruct.h"
+#include "gcstruct.h"
+#include "extension.h"
+#include "colormap.h"
+#include "colormapst.h"
+#include "cursorstr.h"
+#include "selection.h"
+#include <X11/fonts/font.h>
+#include "opaque.h"
+#include "servermd.h"
+#include "hotplug.h"
+#include "site.h"
+#include "dixfont.h"
+#include "extnsionst.h"
+#include "privates.h"
+#include "registry.h"
+#include "client.h"
+#ifdef PANORAMIX
+#include "panoramiXsrv.h"
+#else
+#include "dixevents.h" /* InitEvents() */
+#endif
+
+#ifdef DPMSExtension
+#include <X11/extensions/dpmsconst.h>
+#include "dpmsproc.h"
+#endif
+
+#ifdef _DEBUG
+#include <crtdbg.h>
+#endif
+
+extern void Dispatch(void);
+
+#ifdef XQUARTZ
+#include <pthread.h>
+
+BOOL serverInitComplete = FALSE;
+pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;
+
+int dix_main(int argc, char *argv[], char *envp[]);
+
+int dix_main(int argc, char *argv[], char *envp[])
+#else
+int main(int argc, char *argv[], char *envp[])
+#endif
+{
+ int i;
+ HWEventQueueType alwaysCheckForInput[2];
+ #ifdef _DEBUG
+ //int TmpFlag=_CrtSetDbgFlag( _CRTDBG_REPORT_FLAG);
+
+ //TmpFlag|=_CRTDBG_ALLOC_MEM_DF;
+ //TmpFlag|=_CRTDBG_DELAY_FREE_MEM_DF;
+ //TmpFlag|=_CRTDBG_CHECK_ALWAYS_DF;
+ //TmpFlag|=_CRTDBG_CHECK_CRT_DF;
+ //TmpFlag|=_CRTDBG_LEAK_CHECK_DF;
+
+ //_CrtSetDbgFlag(TmpFlag);
+ #endif
+
+ ptw32_processInitialize();
+ display = "0";
+
+ #ifdef WIN32
+
+ if (InitWSA()<0)
+ {
+ printf("Error initialising WSA\n");
+ return -1;
+ }
+ /* In Win32 we have different threads call Xlib functions (depending
+ on the commandline options given).
+ XInitThreads has to be called before
+ any xlib function is called (aoccording to the man page) */
+ XInitThreads();
+ /* change the current directory to the directory where the vcxsrv.exe executable is installed.
+ This is needed because the font directories are relative to the current directory.
+ */
+ {
+ char ModuleFilename[MAX_PATH];
+ char *pSlash;
+ GetModuleFileName(NULL,ModuleFilename,sizeof(ModuleFilename));
+ pSlash=strrchr(ModuleFilename,'\\');
+ if (pSlash)
+ {
+ *pSlash='\0';
+ chdir(ModuleFilename);
+ }
+ }
+ #endif
+
+ InitRegions();
+
+ pixman_disable_out_of_bounds_workaround();
+
+ CheckUserParameters(argc, argv, envp);
+
+ CheckUserAuthorization();
+
+ InitConnectionLimits();
+
+ ProcessCommandLine(argc, argv);
+
+ alwaysCheckForInput[0] = 0;
+ alwaysCheckForInput[1] = 1;
+ while(1)
+ {
+ serverGeneration++;
+ ScreenSaverTime = defaultScreenSaverTime;
+ ScreenSaverInterval = defaultScreenSaverInterval;
+ ScreenSaverBlanking = defaultScreenSaverBlanking;
+ ScreenSaverAllowExposures = defaultScreenSaverAllowExposures;
+#ifdef DPMSExtension
+ DPMSStandbyTime = DPMSSuspendTime = DPMSOffTime = ScreenSaverTime;
+ DPMSEnabled = TRUE;
+ DPMSPowerLevel = 0;
+#endif
+ InitBlockAndWakeupHandlers();
+ /* Perform any operating system dependent initializations you'd like */
+ OsInit();
+ if(serverGeneration == 1)
+ {
+ CreateWellKnownSockets();
+ for (i=1; i<MAXCLIENTS; i++)
+ clients[i] = NullClient;
+ serverClient = calloc(sizeof(ClientRec), 1);
+ if (!serverClient)
+ FatalError("couldn't create server client");
+ InitClient(serverClient, 0, (pointer)NULL);
+ }
+ else
+ ResetWellKnownSockets ();
+ clients[0] = serverClient;
+ currentMaxClients = 1;
+
+ /* Initialize privates before first allocation */
+ dixResetPrivates();
+
+ /* Initialize server client devPrivates, to be reallocated as
+ * more client privates are registered
+ */
+ if (!dixAllocatePrivates(&serverClient->devPrivates, PRIVATE_CLIENT))
+ FatalError("failed to create server client privates");
+
+ if (!InitClientResources(serverClient)) /* for root resources */
+ FatalError("couldn't init server resources");
+
+ SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]);
+ screenInfo.numScreens = 0;
+
+ InitAtoms();
+ InitEvents();
+ InitSelections();
+ InitGlyphCaching();
+ dixResetRegistry();
+ ResetFontPrivateIndex();
+ InitCallbackManager();
+ InitOutput(&screenInfo, argc, argv);
+
+ if (screenInfo.numScreens < 1)
+ FatalError("no screens found");
+ InitExtensions(argc, argv);
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ {
+ ScreenPtr pScreen = screenInfo.screens[i];
+ if (!CreateScratchPixmapsForScreen(i))
+ FatalError("failed to create scratch pixmaps");
+ if (pScreen->CreateScreenResources &&
+ !(*pScreen->CreateScreenResources)(pScreen))
+ FatalError("failed to create screen resources");
+ if (!CreateGCperDepth(i))
+ FatalError("failed to create scratch GCs");
+ if (!CreateDefaultStipple(i))
+ FatalError("failed to create default stipple");
+ if (!CreateRootWindow(pScreen))
+ FatalError("failed to create root window");
+ }
+
+ InitFonts();
+ if (SetDefaultFontPath(defaultFontPath) != Success) {
+ ErrorF("[dix] failed to set default font path '%s'", defaultFontPath);
+ }
+ if (!SetDefaultFont(defaultTextFont)) {
+ FatalError("could not open default font '%s'", defaultTextFont);
+ }
+
+ if (!(rootCursor = CreateRootCursor(NULL, 0))) {
+ FatalError("could not open default cursor font '%s'",
+ defaultCursorFont);
+ }
+
+#ifdef DPMSExtension
+ /* check all screens, looking for DPMS Capabilities */
+ DPMSCapableFlag = DPMSSupported();
+ if (!DPMSCapableFlag)
+ DPMSEnabled = FALSE;
+#endif
+
+#ifdef PANORAMIX
+ /*
+ * Consolidate window and colourmap information for each screen
+ */
+ if (!noPanoramiXExtension)
+ PanoramiXConsolidate();
+#endif
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ InitRootWindow(screenInfo.screens[i]->root);
+
+ InitCoreDevices();
+ InitInput(argc, argv);
+ InitAndStartDevices();
+ ReserveClientIds(serverClient);
+
+ dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ if (!PanoramiXCreateConnectionBlock()) {
+ FatalError("could not create connection block info");
+ }
+ } else
+#endif
+ {
+ if (!CreateConnectionBlock()) {
+ FatalError("could not create connection block info");
+ }
+ }
+
+#ifdef XQUARTZ
+ /* Let the other threads know the server is done with its init */
+ pthread_mutex_lock(&serverInitCompleteMutex);
+ serverInitComplete = TRUE;
+ pthread_cond_broadcast(&serverInitCompleteCond);
+ pthread_mutex_unlock(&serverInitCompleteMutex);
+#endif
+
+ NotifyParentProcess();
+
+ #ifdef _MSC_VER
+ // initialise here because doing it in InitInput failes because keyboard device is not started yet then
+ winInitializeModeKeyStates ();
+ #endif
+
+ Dispatch();
+
+ UndisplayDevices();
+
+ /* Now free up whatever must be freed */
+ if (screenIsSaved == SCREEN_SAVER_ON)
+ dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
+ FreeScreenSaverTimer();
+ CloseDownExtensions();
+
+#ifdef PANORAMIX
+ {
+ Bool remember_it = noPanoramiXExtension;
+ noPanoramiXExtension = TRUE;
+ FreeAllResources();
+ noPanoramiXExtension = remember_it;
+ }
+#else
+ FreeAllResources();
+#endif
+
+ CloseInput();
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ screenInfo.screens[i]->root = NullWindow;
+ CloseDownDevices();
+ CloseDownEvents();
+
+ for (i = screenInfo.numScreens - 1; i >= 0; i--)
+ {
+ FreeScratchPixmapsForScreen(i);
+ FreeGCperDepth(i);
+ FreeDefaultStipple(i);
+ (* screenInfo.screens[i]->CloseScreen)(i, screenInfo.screens[i]);
+ dixFreePrivates(screenInfo.screens[i]->devPrivates, PRIVATE_SCREEN);
+ free(screenInfo.screens[i]);
+ screenInfo.numScreens = i;
+ }
+
+ ReleaseClientIds(serverClient);
+ dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT);
+ serverClient->devPrivates = NULL;
+
+ FreeFonts();
+
+ FreeAuditTimer();
+
+ if (dispatchException & DE_TERMINATE)
+ {
+ CloseWellKnownConnections();
+ }
+
+ OsCleanup((dispatchException & DE_TERMINATE) != 0);
+
+ if (dispatchException & DE_TERMINATE)
+ {
+ ddxGiveUp();
+ break;
+ }
+
+ free(ConnectionInfo);
+ ConnectionInfo = NULL;
+ }
+ return 0;
+}
+
diff --git a/xorg-server/dix/makefile b/xorg-server/dix/makefile
new file mode 100644
index 000000000..821c0dedd
--- /dev/null
+++ b/xorg-server/dix/makefile
@@ -0,0 +1,42 @@
+ifeq ($(DEBUG),1)
+DEFINES += FONTDEBUG XSERVER_DTRACE
+endif
+
+LIBRARY=libdix
+
+libdix_la_SOURCES = \
+ atom.c \
+ colormap.c \
+ cursor.c \
+ devices.c \
+ dispatch.c \
+ dispatch.h \
+ dixfonts.c \
+ dixutils.c \
+ enterleave.c \
+ enterleave.h \
+ events.c \
+ eventconvert.c \
+ extension.c \
+ ffs.c \
+ gc.c \
+ getevents.c \
+ globals.c \
+ glyphcurs.c \
+ grabs.c \
+ initatoms.c \
+ inpututils.c \
+ pixmap.c \
+ privates.c \
+ property.c \
+ ptrveloc.c \
+ region.c \
+ registry.c \
+ resource.c \
+ selection.c \
+ swaprep.c \
+ swapreq.c \
+ tables.c \
+ window.c
+
+CSRCS = $(filter %.c,$(libdix_la_SOURCES))
diff --git a/xorg-server/dix/privates.c b/xorg-server/dix/privates.c
index 583b9f1f5..d261f6895 100644
--- a/xorg-server/dix/privates.c
+++ b/xorg-server/dix/privates.c
@@ -71,19 +71,24 @@ static struct {
} keys[PRIVATE_LAST];
static const Bool xselinux_private[PRIVATE_LAST] = {
- [PRIVATE_SCREEN] = TRUE,
- [PRIVATE_CLIENT] = TRUE,
- [PRIVATE_WINDOW] = TRUE,
- [PRIVATE_PIXMAP] = TRUE,
- [PRIVATE_GC] = TRUE,
- [PRIVATE_CURSOR] = TRUE,
- [PRIVATE_COLORMAP] = TRUE,
- [PRIVATE_DEVICE] = TRUE,
- [PRIVATE_EXTENSION] = TRUE,
- [PRIVATE_SELECTION] = TRUE,
- [PRIVATE_PROPERTY] = TRUE,
- [PRIVATE_PICTURE] = TRUE,
- [PRIVATE_GLYPHSET] = TRUE,
+ /* PRIVATE_XSELINUX,*/ FALSE,
+ /* PRIVATE_SCREEN,*/ TRUE,
+ /* [PRIVATE_EXTENSION] =*/TRUE,
+ /* [PRIVATE_COLORMAP] =*/ TRUE,
+ /* [PRIVATE_DEVICE] =*/ TRUE,
+ /* [PRIVATE_CLIENT] = */ TRUE,
+ /* [PRIVATE_PROPERTY] =*/ TRUE,
+ /* [PRIVATE_SELECTION] =*/TRUE,
+ /* [PRIVATE_WINDOW] =*/ TRUE,
+ /* [PRIVATE_PIXMAP] =*/ TRUE,
+ /* [PRIVATE_GC] =*/ TRUE,
+ /* [PRIVATE_CURSOR] =*/ TRUE,
+ /* PRIVATE_CURSOR_BITS,*/ FALSE,
+ /* PRIVATE_DBE_WINDOW,*/ FALSE,
+ /* PRIVATE_DAMAGE,*/ FALSE,
+ /* PRIVATE_GLYPH,*/ FALSE,
+ /* [PRIVATE_GLYPHSET] =*/ TRUE,
+ /* [PRIVATE_PICTURE] =*/ TRUE
};
typedef Bool (*FixupFunc)(PrivatePtr *privates, int offset, unsigned bytes);
@@ -153,10 +158,24 @@ fixupDefaultColormaps(FixupFunc fixup, unsigned bytes)
}
static Bool (* const allocated_early[PRIVATE_LAST])(FixupFunc, unsigned) = {
- [PRIVATE_SCREEN] = fixupScreens,
- [PRIVATE_CLIENT] = fixupServerClient,
- [PRIVATE_EXTENSION] = fixupExtensions,
- [PRIVATE_COLORMAP] = fixupDefaultColormaps,
+ /*PRIVATE_XSELINUX,*/ NULL,
+ /*[PRIVATE_SCREEN] =*/ fixupScreens,
+ /*[PRIVATE_EXTENSION] =*/ fixupExtensions,
+ /*[PRIVATE_COLORMAP] =*/ fixupDefaultColormaps,
+ /*PRIVATE_DEVICE,*/ NULL,
+ /*[PRIVATE_CLIENT] =*/ fixupServerClient,
+ /*PRIVATE_PROPERTY,*/ NULL,
+ /*PRIVATE_SELECTION,*/ NULL,
+ /*PRIVATE_WINDOW,*/ NULL,
+ /*PRIVATE_PIXMAP,*/ NULL,
+ /*PRIVATE_GC,*/ NULL,
+ /*PRIVATE_CURSOR,*/ NULL,
+ /*PRIVATE_CURSOR_BITS,*/ NULL,
+ /*PRIVATE_DBE_WINDOW,*/ NULL,
+ /*PRIVATE_DAMAGE,*/ NULL,
+ /*PRIVATE_GLYPH,*/ NULL,
+ /*PRIVATE_GLYPHSET,*/ NULL,
+ /*PRIVATE_PICTURE,*/ NULL
};
/*
@@ -421,33 +440,33 @@ dixLookupPrivateOffset(RESTYPE type)
static const char *key_names[PRIVATE_LAST] = {
/* XSELinux uses the same private keys for numerous objects */
- [PRIVATE_XSELINUX] = "XSELINUX",
+ /*[PRIVATE_XSELINUX] =*/ "XSELINUX",
/* Otherwise, you get a private in just the requested structure
*/
/* These can have objects created before all of the keys are registered */
- [PRIVATE_SCREEN] = "SCREEN",
- [PRIVATE_EXTENSION] = "EXTENSION",
- [PRIVATE_COLORMAP] = "COLORMAP",
+ /*[PRIVATE_SCREEN] =*/ "SCREEN",
+ /*[PRIVATE_EXTENSION] =*/ "EXTENSION",
+ /*[PRIVATE_COLORMAP] =*/ "COLORMAP",
/* These cannot have any objects before all relevant keys are registered */
- [PRIVATE_DEVICE] = "DEVICE",
- [PRIVATE_CLIENT] = "CLIENT",
- [PRIVATE_PROPERTY] = "PROPERTY",
- [PRIVATE_SELECTION] = "SELECTION",
- [PRIVATE_WINDOW] = "WINDOW",
- [PRIVATE_PIXMAP] = "PIXMAP",
- [PRIVATE_GC] = "GC",
- [PRIVATE_CURSOR] = "CURSOR",
- [PRIVATE_CURSOR_BITS] = "CURSOR_BITS",
+ /*[PRIVATE_DEVICE] =*/ "DEVICE",
+ /*[PRIVATE_CLIENT] =*/ "CLIENT",
+ /*[PRIVATE_PROPERTY] =*/ "PROPERTY",
+ /*[PRIVATE_SELECTION] =*/ "SELECTION",
+ /*[PRIVATE_WINDOW] =*/ "WINDOW",
+ /*[PRIVATE_PIXMAP] =*/ "PIXMAP",
+ /*[PRIVATE_GC] =*/ "GC",
+ /*[PRIVATE_CURSOR] =*/ "CURSOR",
+ /*[PRIVATE_CURSOR_BITS] =*/ "CURSOR_BITS",
/* extension privates */
- [PRIVATE_DBE_WINDOW] = "DBE_WINDOW",
- [PRIVATE_DAMAGE] = "DAMAGE",
- [PRIVATE_GLYPH] = "GLYPH",
- [PRIVATE_GLYPHSET] = "GLYPHSET",
- [PRIVATE_PICTURE] = "PICTURE",
- [PRIVATE_SYNC_FENCE] = "SYNC_FENCE",
+ /*[PRIVATE_DBE_WINDOW] =*/ "DBE_WINDOW",
+ /*[PRIVATE_DAMAGE] =*/ "DAMAGE",
+ /*[PRIVATE_GLYPH] =*/ "GLYPH",
+ /*[PRIVATE_GLYPHSET] =*/ "GLYPHSET",
+ /*[PRIVATE_PICTURE] =*/ "PICTURE" ,
+ /*[PRIVATE_SYNC_FENCE] =*/ "SYNC_FENCE"
};
void
diff --git a/xorg-server/dix/ptrveloc.c b/xorg-server/dix/ptrveloc.c
index e95d804c2..2ffc984c3 100644
--- a/xorg-server/dix/ptrveloc.c
+++ b/xorg-server/dix/ptrveloc.c
@@ -26,6 +26,10 @@
#include <dix-config.h>
#endif
+#ifdef _MSC_VER
+#define _USE_MATH_DEFINES
+#endif
+
#include <math.h>
#include <ptrveloc.h>
#include <exevents.h>
@@ -60,6 +64,11 @@
*
****************************************************************************/
+#ifdef _MSC_VER
+#define inline __inline
+#define lrintf(val) ((int)val)
+#endif
+
/* fwds */
int
SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
diff --git a/xorg-server/dix/region.c b/xorg-server/dix/region.c
index 6820c1eac..e5f14c1f7 100644
--- a/xorg-server/dix/region.c
+++ b/xorg-server/dix/region.c
@@ -1,1425 +1,1425 @@
-/***********************************************************
-
-Copyright 1987, 1988, 1989, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987, 1988, 1989 by
-Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-/* The panoramix components contained the following notice */
-/*****************************************************************
-
-Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
-BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Digital Equipment Corporation
-shall not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from Digital
-Equipment Corporation.
-
-******************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "regionstr.h"
-#include <X11/Xprotostr.h>
-#include <X11/Xfuncproto.h>
-#include "gc.h"
-#include <pixman.h>
-
-#undef assert
-#ifdef REGION_DEBUG
-#define assert(expr) { \
- CARD32 *foo = NULL; \
- if (!(expr)) { \
- ErrorF("Assertion failed file %s, line %d: %s\n", \
- __FILE__, __LINE__, #expr); \
- *foo = 0xdeadbeef; /* to get a backtrace */ \
- } \
- }
-#else
-#define assert(expr)
-#endif
-
-#define good(reg) assert(RegionIsValid(reg))
-
-/*
- * The functions in this file implement the Region abstraction used extensively
- * throughout the X11 sample server. A Region is simply a set of disjoint
- * (non-overlapping) rectangles, plus an "extent" rectangle which is the
- * smallest single rectangle that contains all the non-overlapping rectangles.
- *
- * A Region is implemented as a "y-x-banded" array of rectangles. This array
- * imposes two degrees of order. First, all rectangles are sorted by top side
- * y coordinate first (y1), and then by left side x coordinate (x1).
- *
- * Furthermore, the rectangles are grouped into "bands". Each rectangle in a
- * band has the same top y coordinate (y1), and each has the same bottom y
- * coordinate (y2). Thus all rectangles in a band differ only in their left
- * and right side (x1 and x2). Bands are implicit in the array of rectangles:
- * there is no separate list of band start pointers.
- *
- * The y-x band representation does not minimize rectangles. In particular,
- * if a rectangle vertically crosses a band (the rectangle has scanlines in
- * the y1 to y2 area spanned by the band), then the rectangle may be broken
- * down into two or more smaller rectangles stacked one atop the other.
- *
- * ----------- -----------
- * | | | | band 0
- * | | -------- ----------- --------
- * | | | | in y-x banded | | | | band 1
- * | | | | form is | | | |
- * ----------- | | ----------- --------
- * | | | | band 2
- * -------- --------
- *
- * An added constraint on the rectangles is that they must cover as much
- * horizontal area as possible: no two rectangles within a band are allowed
- * to touch.
- *
- * Whenever possible, bands will be merged together to cover a greater vertical
- * distance (and thus reduce the number of rectangles). Two bands can be merged
- * only if the bottom of one touches the top of the other and they have
- * rectangles in the same places (of the same width, of course).
- *
- * Adam de Boor wrote most of the original region code. Joel McCormack
- * substantially modified or rewrote most of the core arithmetic routines,
- * and added RegionValidate in order to support several speed improvements
- * to miValidateTree. Bob Scheifler changed the representation to be more
- * compact when empty or a single rectangle, and did a bunch of gratuitous
- * reformatting.
- */
-
-/* true iff two Boxes overlap */
-#define EXTENTCHECK(r1,r2) \
- (!( ((r1)->x2 <= (r2)->x1) || \
- ((r1)->x1 >= (r2)->x2) || \
- ((r1)->y2 <= (r2)->y1) || \
- ((r1)->y1 >= (r2)->y2) ) )
-
-/* true iff (x,y) is in Box */
-#define INBOX(r,x,y) \
- ( ((r)->x2 > x) && \
- ((r)->x1 <= x) && \
- ((r)->y2 > y) && \
- ((r)->y1 <= y) )
-
-/* true iff Box r1 contains Box r2 */
-#define SUBSUMES(r1,r2) \
- ( ((r1)->x1 <= (r2)->x1) && \
- ((r1)->x2 >= (r2)->x2) && \
- ((r1)->y1 <= (r2)->y1) && \
- ((r1)->y2 >= (r2)->y2) )
-
-#define xallocData(n) malloc(RegionSizeof(n))
-#define xfreeData(reg) if ((reg)->data && (reg)->data->size) free((reg)->data)
-
-#define RECTALLOC_BAIL(pReg,n,bail) \
-if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \
- if (!RegionRectAlloc(pReg, n)) { goto bail; }
-
-#define RECTALLOC(pReg,n) \
-if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \
- if (!RegionRectAlloc(pReg, n)) { return FALSE; }
-
-#define ADDRECT(pNextRect,nx1,ny1,nx2,ny2) \
-{ \
- pNextRect->x1 = nx1; \
- pNextRect->y1 = ny1; \
- pNextRect->x2 = nx2; \
- pNextRect->y2 = ny2; \
- pNextRect++; \
-}
-
-#define NEWRECT(pReg,pNextRect,nx1,ny1,nx2,ny2) \
-{ \
- if (!(pReg)->data || ((pReg)->data->numRects == (pReg)->data->size))\
- { \
- if (!RegionRectAlloc(pReg, 1)) \
- return FALSE; \
- pNextRect = RegionTop(pReg); \
- } \
- ADDRECT(pNextRect,nx1,ny1,nx2,ny2); \
- pReg->data->numRects++; \
- assert(pReg->data->numRects<=pReg->data->size); \
-}
-
-
-#define DOWNSIZE(reg,numRects) \
-if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
-{ \
- RegDataPtr NewData; \
- NewData = (RegDataPtr)realloc((reg)->data, RegionSizeof(numRects)); \
- if (NewData) \
- { \
- NewData->size = (numRects); \
- (reg)->data = NewData; \
- } \
-}
-
-
-BoxRec RegionEmptyBox = {0, 0, 0, 0};
-RegDataRec RegionEmptyData = {0, 0};
-
-RegDataRec RegionBrokenData = {0, 0};
-static RegionRec RegionBrokenRegion = { { 0, 0, 0, 0 }, &RegionBrokenData };
-
-void
-InitRegions (void)
-{
- pixman_region_set_static_pointers (&RegionEmptyBox, &RegionEmptyData, &RegionBrokenData);
-}
-
-/*****************************************************************
- * RegionCreate(rect, size)
- * This routine does a simple malloc to make a structure of
- * REGION of "size" number of rectangles.
- *****************************************************************/
-
-RegionPtr
-RegionCreate(BoxPtr rect, int size)
-{
- RegionPtr pReg;
-
- pReg = (RegionPtr)malloc(sizeof(RegionRec));
- if (!pReg)
- return &RegionBrokenRegion;
-
- RegionInit (pReg, rect, size);
-
- return pReg;
-}
-
-void
-RegionDestroy(RegionPtr pReg)
-{
- pixman_region_fini (pReg);
- if (pReg != &RegionBrokenRegion)
- free(pReg);
-}
-
-void
-RegionPrint(RegionPtr rgn)
-{
- int num, size;
- int i;
- BoxPtr rects;
-
- num = RegionNumRects(rgn);
- size = RegionSize(rgn);
- rects = RegionRects(rgn);
- ErrorF("[mi] num: %d size: %d\n", num, size);
- ErrorF("[mi] extents: %d %d %d %d\n",
- rgn->extents.x1, rgn->extents.y1, rgn->extents.x2, rgn->extents.y2);
- for (i = 0; i < num; i++)
- ErrorF("[mi] %d %d %d %d \n",
- rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2);
- ErrorF("[mi] \n");
-}
-
-#ifdef DEBUG
-Bool
-RegionIsValid(RegionPtr reg)
-{
- int i, numRects;
-
- if ((reg->extents.x1 > reg->extents.x2) ||
- (reg->extents.y1 > reg->extents.y2))
- return FALSE;
- numRects = RegionNumRects(reg);
- if (!numRects)
- return ((reg->extents.x1 == reg->extents.x2) &&
- (reg->extents.y1 == reg->extents.y2) &&
- (reg->data->size || (reg->data == &RegionEmptyData)));
- else if (numRects == 1)
- return !reg->data;
- else
- {
- BoxPtr pboxP, pboxN;
- BoxRec box;
-
- pboxP = RegionRects(reg);
- box = *pboxP;
- box.y2 = pboxP[numRects-1].y2;
- pboxN = pboxP + 1;
- for (i = numRects; --i > 0; pboxP++, pboxN++)
- {
- if ((pboxN->x1 >= pboxN->x2) ||
- (pboxN->y1 >= pboxN->y2))
- return FALSE;
- if (pboxN->x1 < box.x1)
- box.x1 = pboxN->x1;
- if (pboxN->x2 > box.x2)
- box.x2 = pboxN->x2;
- if ((pboxN->y1 < pboxP->y1) ||
- ((pboxN->y1 == pboxP->y1) &&
- ((pboxN->x1 < pboxP->x2) || (pboxN->y2 != pboxP->y2))))
- return FALSE;
- }
- return ((box.x1 == reg->extents.x1) &&
- (box.x2 == reg->extents.x2) &&
- (box.y1 == reg->extents.y1) &&
- (box.y2 == reg->extents.y2));
- }
-}
-#endif /* DEBUG */
-
-Bool
-RegionBreak (RegionPtr pReg)
-{
- xfreeData (pReg);
- pReg->extents = RegionEmptyBox;
- pReg->data = &RegionBrokenData;
- return FALSE;
-}
-
-Bool
-RegionRectAlloc(RegionPtr pRgn, int n)
-{
- RegDataPtr data;
-
- if (!pRgn->data)
- {
- n++;
- pRgn->data = xallocData(n);
- if (!pRgn->data)
- return RegionBreak (pRgn);
- pRgn->data->numRects = 1;
- *RegionBoxptr(pRgn) = pRgn->extents;
- }
- else if (!pRgn->data->size)
- {
- pRgn->data = xallocData(n);
- if (!pRgn->data)
- return RegionBreak (pRgn);
- pRgn->data->numRects = 0;
- }
- else
- {
- if (n == 1)
- {
- n = pRgn->data->numRects;
- if (n > 500) /* XXX pick numbers out of a hat */
- n = 250;
- }
- n += pRgn->data->numRects;
- data = (RegDataPtr)realloc(pRgn->data, RegionSizeof(n));
- if (!data)
- return RegionBreak (pRgn);
- pRgn->data = data;
- }
- pRgn->data->size = n;
- return TRUE;
-}
-
-/*======================================================================
- * Generic Region Operator
- *====================================================================*/
-
-/*-
- *-----------------------------------------------------------------------
- * RegionCoalesce --
- * Attempt to merge the boxes in the current band with those in the
- * previous one. We are guaranteed that the current band extends to
- * the end of the rects array. Used only by RegionOp.
- *
- * Results:
- * The new index for the previous band.
- *
- * Side Effects:
- * If coalescing takes place:
- * - rectangles in the previous band will have their y2 fields
- * altered.
- * - pReg->data->numRects will be decreased.
- *
- *-----------------------------------------------------------------------
- */
-_X_INLINE static int
-RegionCoalesce (
- RegionPtr pReg, /* Region to coalesce */
- int prevStart, /* Index of start of previous band */
- int curStart) /* Index of start of current band */
-{
- BoxPtr pPrevBox; /* Current box in previous band */
- BoxPtr pCurBox; /* Current box in current band */
- int numRects; /* Number rectangles in both bands */
- int y2; /* Bottom of current band */
- /*
- * Figure out how many rectangles are in the band.
- */
- numRects = curStart - prevStart;
- assert(numRects == pReg->data->numRects - curStart);
-
- if (!numRects) return curStart;
-
- /*
- * The bands may only be coalesced if the bottom of the previous
- * matches the top scanline of the current.
- */
- pPrevBox = RegionBox(pReg, prevStart);
- pCurBox = RegionBox(pReg, curStart);
- if (pPrevBox->y2 != pCurBox->y1) return curStart;
-
- /*
- * Make sure the bands have boxes in the same places. This
- * assumes that boxes have been added in such a way that they
- * cover the most area possible. I.e. two boxes in a band must
- * have some horizontal space between them.
- */
- y2 = pCurBox->y2;
-
- do {
- if ((pPrevBox->x1 != pCurBox->x1) || (pPrevBox->x2 != pCurBox->x2)) {
- return curStart;
- }
- pPrevBox++;
- pCurBox++;
- numRects--;
- } while (numRects);
-
- /*
- * The bands may be merged, so set the bottom y of each box
- * in the previous band to the bottom y of the current band.
- */
- numRects = curStart - prevStart;
- pReg->data->numRects -= numRects;
- do {
- pPrevBox--;
- pPrevBox->y2 = y2;
- numRects--;
- } while (numRects);
- return prevStart;
-}
-
-
-/* Quicky macro to avoid trivial reject procedure calls to RegionCoalesce */
-
-#define Coalesce(newReg, prevBand, curBand) \
- if (curBand - prevBand == newReg->data->numRects - curBand) { \
- prevBand = RegionCoalesce(newReg, prevBand, curBand); \
- } else { \
- prevBand = curBand; \
- }
-
-/*-
- *-----------------------------------------------------------------------
- * RegionAppendNonO --
- * Handle a non-overlapping band for the union and subtract operations.
- * Just adds the (top/bottom-clipped) rectangles into the region.
- * Doesn't have to check for subsumption or anything.
- *
- * Results:
- * None.
- *
- * Side Effects:
- * pReg->data->numRects is incremented and the rectangles overwritten
- * with the rectangles we're passed.
- *
- *-----------------------------------------------------------------------
- */
-
-_X_INLINE static Bool
-RegionAppendNonO (
- RegionPtr pReg,
- BoxPtr r,
- BoxPtr rEnd,
- int y1,
- int y2)
-{
- BoxPtr pNextRect;
- int newRects;
-
- newRects = rEnd - r;
-
- assert(y1 < y2);
- assert(newRects != 0);
-
- /* Make sure we have enough space for all rectangles to be added */
- RECTALLOC(pReg, newRects);
- pNextRect = RegionTop(pReg);
- pReg->data->numRects += newRects;
- do {
- assert(r->x1 < r->x2);
- ADDRECT(pNextRect, r->x1, y1, r->x2, y2);
- r++;
- } while (r != rEnd);
-
- return TRUE;
-}
-
-#define FindBand(r, rBandEnd, rEnd, ry1) \
-{ \
- ry1 = r->y1; \
- rBandEnd = r+1; \
- while ((rBandEnd != rEnd) && (rBandEnd->y1 == ry1)) { \
- rBandEnd++; \
- } \
-}
-
-#define AppendRegions(newReg, r, rEnd) \
-{ \
- int newRects; \
- if ((newRects = rEnd - r)) { \
- RECTALLOC(newReg, newRects); \
- memmove((char *)RegionTop(newReg),(char *)r, \
- newRects * sizeof(BoxRec)); \
- newReg->data->numRects += newRects; \
- } \
-}
-
-/*-
- *-----------------------------------------------------------------------
- * RegionOp --
- * Apply an operation to two regions. Called by RegionUnion, RegionInverse,
- * RegionSubtract, RegionIntersect.... Both regions MUST have at least one
- * rectangle, and cannot be the same object.
- *
- * Results:
- * TRUE if successful.
- *
- * Side Effects:
- * The new region is overwritten.
- * pOverlap set to TRUE if overlapFunc ever returns TRUE.
- *
- * Notes:
- * The idea behind this function is to view the two regions as sets.
- * Together they cover a rectangle of area that this function divides
- * into horizontal bands where points are covered only by one region
- * or by both. For the first case, the nonOverlapFunc is called with
- * each the band and the band's upper and lower extents. For the
- * second, the overlapFunc is called to process the entire band. It
- * is responsible for clipping the rectangles in the band, though
- * this function provides the boundaries.
- * At the end of each band, the new region is coalesced, if possible,
- * to reduce the number of rectangles in the region.
- *
- *-----------------------------------------------------------------------
- */
-
-typedef Bool (*OverlapProcPtr)(
- RegionPtr pReg,
- BoxPtr r1,
- BoxPtr r1End,
- BoxPtr r2,
- BoxPtr r2End,
- short y1,
- short y2,
- Bool *pOverlap);
-
-static Bool
-RegionOp(
- RegionPtr newReg, /* Place to store result */
- RegionPtr reg1, /* First region in operation */
- RegionPtr reg2, /* 2d region in operation */
- OverlapProcPtr overlapFunc, /* Function to call for over-
- * lapping bands */
- Bool appendNon1, /* Append non-overlapping bands */
- /* in region 1 ? */
- Bool appendNon2, /* Append non-overlapping bands */
- /* in region 2 ? */
- Bool *pOverlap)
-{
- BoxPtr r1; /* Pointer into first region */
- BoxPtr r2; /* Pointer into 2d region */
- BoxPtr r1End; /* End of 1st region */
- BoxPtr r2End; /* End of 2d region */
- short ybot; /* Bottom of intersection */
- short ytop; /* Top of intersection */
- RegDataPtr oldData; /* Old data for newReg */
- int prevBand; /* Index of start of
- * previous band in newReg */
- int curBand; /* Index of start of current
- * band in newReg */
- BoxPtr r1BandEnd; /* End of current band in r1 */
- BoxPtr r2BandEnd; /* End of current band in r2 */
- short top; /* Top of non-overlapping band */
- short bot; /* Bottom of non-overlapping band*/
- int r1y1; /* Temps for r1->y1 and r2->y1 */
- int r2y1;
- int newSize;
- int numRects;
-
- /*
- * Break any region computed from a broken region
- */
- if (RegionNar (reg1) || RegionNar(reg2))
- return RegionBreak (newReg);
-
- /*
- * Initialization:
- * set r1, r2, r1End and r2End appropriately, save the rectangles
- * of the destination region until the end in case it's one of
- * the two source regions, then mark the "new" region empty, allocating
- * another array of rectangles for it to use.
- */
-
- r1 = RegionRects(reg1);
- newSize = RegionNumRects(reg1);
- r1End = r1 + newSize;
- numRects = RegionNumRects(reg2);
- r2 = RegionRects(reg2);
- r2End = r2 + numRects;
- assert(r1 != r1End);
- assert(r2 != r2End);
-
- oldData = NULL;
- if (((newReg == reg1) && (newSize > 1)) ||
- ((newReg == reg2) && (numRects > 1)))
- {
- oldData = newReg->data;
- newReg->data = &RegionEmptyData;
- }
- /* guess at new size */
- if (numRects > newSize)
- newSize = numRects;
- newSize <<= 1;
- if (!newReg->data)
- newReg->data = &RegionEmptyData;
- else if (newReg->data->size)
- newReg->data->numRects = 0;
- if (newSize > newReg->data->size)
- if (!RegionRectAlloc(newReg, newSize))
- return FALSE;
-
- /*
- * Initialize ybot.
- * In the upcoming loop, ybot and ytop serve different functions depending
- * on whether the band being handled is an overlapping or non-overlapping
- * band.
- * In the case of a non-overlapping band (only one of the regions
- * has points in the band), ybot is the bottom of the most recent
- * intersection and thus clips the top of the rectangles in that band.
- * ytop is the top of the next intersection between the two regions and
- * serves to clip the bottom of the rectangles in the current band.
- * For an overlapping band (where the two regions intersect), ytop clips
- * the top of the rectangles of both regions and ybot clips the bottoms.
- */
-
- ybot = min(r1->y1, r2->y1);
-
- /*
- * prevBand serves to mark the start of the previous band so rectangles
- * can be coalesced into larger rectangles. qv. RegionCoalesce, above.
- * In the beginning, there is no previous band, so prevBand == curBand
- * (curBand is set later on, of course, but the first band will always
- * start at index 0). prevBand and curBand must be indices because of
- * the possible expansion, and resultant moving, of the new region's
- * array of rectangles.
- */
- prevBand = 0;
-
- do {
- /*
- * This algorithm proceeds one source-band (as opposed to a
- * destination band, which is determined by where the two regions
- * intersect) at a time. r1BandEnd and r2BandEnd serve to mark the
- * rectangle after the last one in the current band for their
- * respective regions.
- */
- assert(r1 != r1End);
- assert(r2 != r2End);
-
- FindBand(r1, r1BandEnd, r1End, r1y1);
- FindBand(r2, r2BandEnd, r2End, r2y1);
-
- /*
- * First handle the band that doesn't intersect, if any.
- *
- * Note that attention is restricted to one band in the
- * non-intersecting region at once, so if a region has n
- * bands between the current position and the next place it overlaps
- * the other, this entire loop will be passed through n times.
- */
- if (r1y1 < r2y1) {
- if (appendNon1) {
- top = max(r1y1, ybot);
- bot = min(r1->y2, r2y1);
- if (top != bot) {
- curBand = newReg->data->numRects;
- RegionAppendNonO(newReg, r1, r1BandEnd, top, bot);
- Coalesce(newReg, prevBand, curBand);
- }
- }
- ytop = r2y1;
- } else if (r2y1 < r1y1) {
- if (appendNon2) {
- top = max(r2y1, ybot);
- bot = min(r2->y2, r1y1);
- if (top != bot) {
- curBand = newReg->data->numRects;
- RegionAppendNonO(newReg, r2, r2BandEnd, top, bot);
- Coalesce(newReg, prevBand, curBand);
- }
- }
- ytop = r1y1;
- } else {
- ytop = r1y1;
- }
-
- /*
- * Now see if we've hit an intersecting band. The two bands only
- * intersect if ybot > ytop
- */
- ybot = min(r1->y2, r2->y2);
- if (ybot > ytop) {
- curBand = newReg->data->numRects;
- (* overlapFunc)(newReg, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot,
- pOverlap);
- Coalesce(newReg, prevBand, curBand);
- }
-
- /*
- * If we've finished with a band (y2 == ybot) we skip forward
- * in the region to the next band.
- */
- if (r1->y2 == ybot) r1 = r1BandEnd;
- if (r2->y2 == ybot) r2 = r2BandEnd;
-
- } while (r1 != r1End && r2 != r2End);
-
- /*
- * Deal with whichever region (if any) still has rectangles left.
- *
- * We only need to worry about banding and coalescing for the very first
- * band left. After that, we can just group all remaining boxes,
- * regardless of how many bands, into one final append to the list.
- */
-
- if ((r1 != r1End) && appendNon1) {
- /* Do first nonOverlap1Func call, which may be able to coalesce */
- FindBand(r1, r1BandEnd, r1End, r1y1);
- curBand = newReg->data->numRects;
- RegionAppendNonO(newReg, r1, r1BandEnd, max(r1y1, ybot), r1->y2);
- Coalesce(newReg, prevBand, curBand);
- /* Just append the rest of the boxes */
- AppendRegions(newReg, r1BandEnd, r1End);
-
- } else if ((r2 != r2End) && appendNon2) {
- /* Do first nonOverlap2Func call, which may be able to coalesce */
- FindBand(r2, r2BandEnd, r2End, r2y1);
- curBand = newReg->data->numRects;
- RegionAppendNonO(newReg, r2, r2BandEnd, max(r2y1, ybot), r2->y2);
- Coalesce(newReg, prevBand, curBand);
- /* Append rest of boxes */
- AppendRegions(newReg, r2BandEnd, r2End);
- }
-
- free(oldData);
-
- if (!(numRects = newReg->data->numRects))
- {
- xfreeData(newReg);
- newReg->data = &RegionEmptyData;
- }
- else if (numRects == 1)
- {
- newReg->extents = *RegionBoxptr(newReg);
- xfreeData(newReg);
- newReg->data = NULL;
- }
- else
- {
- DOWNSIZE(newReg, numRects);
- }
-
- return TRUE;
-}
-
-/*-
- *-----------------------------------------------------------------------
- * RegionSetExtents --
- * Reset the extents of a region to what they should be. Called by
- * Subtract and Intersect as they can't figure it out along the
- * way or do so easily, as Union can.
- *
- * Results:
- * None.
- *
- * Side Effects:
- * The region's 'extents' structure is overwritten.
- *
- *-----------------------------------------------------------------------
- */
-static void
-RegionSetExtents (RegionPtr pReg)
-{
- BoxPtr pBox, pBoxEnd;
-
- if (!pReg->data)
- return;
- if (!pReg->data->size)
- {
- pReg->extents.x2 = pReg->extents.x1;
- pReg->extents.y2 = pReg->extents.y1;
- return;
- }
-
- pBox = RegionBoxptr(pReg);
- pBoxEnd = RegionEnd(pReg);
-
- /*
- * Since pBox is the first rectangle in the region, it must have the
- * smallest y1 and since pBoxEnd is the last rectangle in the region,
- * it must have the largest y2, because of banding. Initialize x1 and
- * x2 from pBox and pBoxEnd, resp., as good things to initialize them
- * to...
- */
- pReg->extents.x1 = pBox->x1;
- pReg->extents.y1 = pBox->y1;
- pReg->extents.x2 = pBoxEnd->x2;
- pReg->extents.y2 = pBoxEnd->y2;
-
- assert(pReg->extents.y1 < pReg->extents.y2);
- while (pBox <= pBoxEnd) {
- if (pBox->x1 < pReg->extents.x1)
- pReg->extents.x1 = pBox->x1;
- if (pBox->x2 > pReg->extents.x2)
- pReg->extents.x2 = pBox->x2;
- pBox++;
- };
-
- assert(pReg->extents.x1 < pReg->extents.x2);
-}
-
-/*======================================================================
- * Region Intersection
- *====================================================================*/
-/*-
- *-----------------------------------------------------------------------
- * RegionIntersectO --
- * Handle an overlapping band for RegionIntersect.
- *
- * Results:
- * TRUE if successful.
- *
- * Side Effects:
- * Rectangles may be added to the region.
- *
- *-----------------------------------------------------------------------
- */
-/*ARGSUSED*/
-
-#define MERGERECT(r) \
-{ \
- if (r->x1 <= x2) { \
- /* Merge with current rectangle */ \
- if (r->x1 < x2) *pOverlap = TRUE; \
- if (x2 < r->x2) x2 = r->x2; \
- } else { \
- /* Add current rectangle, start new one */ \
- NEWRECT(pReg, pNextRect, x1, y1, x2, y2); \
- x1 = r->x1; \
- x2 = r->x2; \
- } \
- r++; \
-}
-
-/*======================================================================
- * Region Union
- *====================================================================*/
-
-/*-
- *-----------------------------------------------------------------------
- * RegionUnionO --
- * Handle an overlapping band for the union operation. Picks the
- * left-most rectangle each time and merges it into the region.
- *
- * Results:
- * TRUE if successful.
- *
- * Side Effects:
- * pReg is overwritten.
- * pOverlap is set to TRUE if any boxes overlap.
- *
- *-----------------------------------------------------------------------
- */
-static Bool
-RegionUnionO (
- RegionPtr pReg,
- BoxPtr r1,
- BoxPtr r1End,
- BoxPtr r2,
- BoxPtr r2End,
- short y1,
- short y2,
- Bool *pOverlap)
-{
- BoxPtr pNextRect;
- int x1; /* left and right side of current union */
- int x2;
-
- assert (y1 < y2);
- assert(r1 != r1End && r2 != r2End);
-
- pNextRect = RegionTop(pReg);
-
- /* Start off current rectangle */
- if (r1->x1 < r2->x1)
- {
- x1 = r1->x1;
- x2 = r1->x2;
- r1++;
- }
- else
- {
- x1 = r2->x1;
- x2 = r2->x2;
- r2++;
- }
- while (r1 != r1End && r2 != r2End)
- {
- if (r1->x1 < r2->x1) MERGERECT(r1) else MERGERECT(r2);
- }
-
- /* Finish off whoever (if any) is left */
- if (r1 != r1End)
- {
- do
- {
- MERGERECT(r1);
- } while (r1 != r1End);
- }
- else if (r2 != r2End)
- {
- do
- {
- MERGERECT(r2);
- } while (r2 != r2End);
- }
-
- /* Add current rectangle */
- NEWRECT(pReg, pNextRect, x1, y1, x2, y2);
-
- return TRUE;
-}
-
-/*======================================================================
- * Batch Rectangle Union
- *====================================================================*/
-
-/*-
- *-----------------------------------------------------------------------
- * RegionAppend --
- *
- * "Append" the rgn rectangles onto the end of dstrgn, maintaining
- * knowledge of YX-banding when it's easy. Otherwise, dstrgn just
- * becomes a non-y-x-banded random collection of rectangles, and not
- * yet a true region. After a sequence of appends, the caller must
- * call RegionValidate to ensure that a valid region is constructed.
- *
- * Results:
- * TRUE if successful.
- *
- * Side Effects:
- * dstrgn is modified if rgn has rectangles.
- *
- */
-Bool
-RegionAppend(RegionPtr dstrgn, RegionPtr rgn)
-{
- int numRects, dnumRects, size;
- BoxPtr new, old;
- Bool prepend;
-
- if (RegionNar(rgn))
- return RegionBreak (dstrgn);
-
- if (!rgn->data && (dstrgn->data == &RegionEmptyData))
- {
- dstrgn->extents = rgn->extents;
- dstrgn->data = NULL;
- return TRUE;
- }
-
- numRects = RegionNumRects(rgn);
- if (!numRects)
- return TRUE;
- prepend = FALSE;
- size = numRects;
- dnumRects = RegionNumRects(dstrgn);
- if (!dnumRects && (size < 200))
- size = 200; /* XXX pick numbers out of a hat */
- RECTALLOC(dstrgn, size);
- old = RegionRects(rgn);
- if (!dnumRects)
- dstrgn->extents = rgn->extents;
- else if (dstrgn->extents.x2 > dstrgn->extents.x1)
- {
- BoxPtr first, last;
-
- first = old;
- last = RegionBoxptr(dstrgn) + (dnumRects - 1);
- if ((first->y1 > last->y2) ||
- ((first->y1 == last->y1) && (first->y2 == last->y2) &&
- (first->x1 > last->x2)))
- {
- if (rgn->extents.x1 < dstrgn->extents.x1)
- dstrgn->extents.x1 = rgn->extents.x1;
- if (rgn->extents.x2 > dstrgn->extents.x2)
- dstrgn->extents.x2 = rgn->extents.x2;
- dstrgn->extents.y2 = rgn->extents.y2;
- }
- else
- {
- first = RegionBoxptr(dstrgn);
- last = old + (numRects - 1);
- if ((first->y1 > last->y2) ||
- ((first->y1 == last->y1) && (first->y2 == last->y2) &&
- (first->x1 > last->x2)))
- {
- prepend = TRUE;
- if (rgn->extents.x1 < dstrgn->extents.x1)
- dstrgn->extents.x1 = rgn->extents.x1;
- if (rgn->extents.x2 > dstrgn->extents.x2)
- dstrgn->extents.x2 = rgn->extents.x2;
- dstrgn->extents.y1 = rgn->extents.y1;
- }
- else
- dstrgn->extents.x2 = dstrgn->extents.x1;
- }
- }
- if (prepend)
- {
- new = RegionBox(dstrgn, numRects);
- if (dnumRects == 1)
- *new = *RegionBoxptr(dstrgn);
- else
- memmove((char *)new,(char *)RegionBoxptr(dstrgn),
- dnumRects * sizeof(BoxRec));
- new = RegionBoxptr(dstrgn);
- }
- else
- new = RegionBoxptr(dstrgn) + dnumRects;
- if (numRects == 1)
- *new = *old;
- else
- memmove((char *)new, (char *)old, numRects * sizeof(BoxRec));
- dstrgn->data->numRects += numRects;
- return TRUE;
-}
-
-
-#define ExchangeRects(a, b) \
-{ \
- BoxRec t; \
- t = rects[a]; \
- rects[a] = rects[b]; \
- rects[b] = t; \
-}
-
-static void
-QuickSortRects(
- BoxRec rects[],
- int numRects)
-{
- int y1;
- int x1;
- int i, j;
- BoxPtr r;
-
- /* Always called with numRects > 1 */
-
- do
- {
- if (numRects == 2)
- {
- if (rects[0].y1 > rects[1].y1 ||
- (rects[0].y1 == rects[1].y1 && rects[0].x1 > rects[1].x1))
- ExchangeRects(0, 1);
- return;
- }
-
- /* Choose partition element, stick in location 0 */
- ExchangeRects(0, numRects >> 1);
- y1 = rects[0].y1;
- x1 = rects[0].x1;
-
- /* Partition array */
- i = 0;
- j = numRects;
- do
- {
- r = &(rects[i]);
- do
- {
- r++;
- i++;
- } while (i != numRects &&
- (r->y1 < y1 || (r->y1 == y1 && r->x1 < x1)));
- r = &(rects[j]);
- do
- {
- r--;
- j--;
- } while (y1 < r->y1 || (y1 == r->y1 && x1 < r->x1));
- if (i < j)
- ExchangeRects(i, j);
- } while (i < j);
-
- /* Move partition element back to middle */
- ExchangeRects(0, j);
-
- /* Recurse */
- if (numRects-j-1 > 1)
- QuickSortRects(&rects[j+1], numRects-j-1);
- numRects = j;
- } while (numRects > 1);
-}
-
-/*-
- *-----------------------------------------------------------------------
- * RegionValidate --
- *
- * Take a ``region'' which is a non-y-x-banded random collection of
- * rectangles, and compute a nice region which is the union of all the
- * rectangles.
- *
- * Results:
- * TRUE if successful.
- *
- * Side Effects:
- * The passed-in ``region'' may be modified.
- * pOverlap set to TRUE if any retangles overlapped, else FALSE;
- *
- * Strategy:
- * Step 1. Sort the rectangles into ascending order with primary key y1
- * and secondary key x1.
- *
- * Step 2. Split the rectangles into the minimum number of proper y-x
- * banded regions. This may require horizontally merging
- * rectangles, and vertically coalescing bands. With any luck,
- * this step in an identity tranformation (ala the Box widget),
- * or a coalescing into 1 box (ala Menus).
- *
- * Step 3. Merge the separate regions down to a single region by calling
- * Union. Maximize the work each Union call does by using
- * a binary merge.
- *
- *-----------------------------------------------------------------------
- */
-
-Bool
-RegionValidate(RegionPtr badreg, Bool *pOverlap)
-{
- /* Descriptor for regions under construction in Step 2. */
- typedef struct {
- RegionRec reg;
- int prevBand;
- int curBand;
- } RegionInfo;
-
- int numRects; /* Original numRects for badreg */
- RegionInfo *ri; /* Array of current regions */
- int numRI; /* Number of entries used in ri */
- int sizeRI; /* Number of entries available in ri */
- int i; /* Index into rects */
- int j; /* Index into ri */
- RegionInfo *rit; /* &ri[j] */
- RegionPtr reg; /* ri[j].reg */
- BoxPtr box; /* Current box in rects */
- BoxPtr riBox; /* Last box in ri[j].reg */
- RegionPtr hreg; /* ri[j_half].reg */
- Bool ret = TRUE;
-
- *pOverlap = FALSE;
- if (!badreg->data)
- {
- good(badreg);
- return TRUE;
- }
- numRects = badreg->data->numRects;
- if (!numRects)
- {
- if (RegionNar(badreg))
- return FALSE;
- good(badreg);
- return TRUE;
- }
- if (badreg->extents.x1 < badreg->extents.x2)
- {
- if ((numRects) == 1)
- {
- xfreeData(badreg);
- badreg->data = (RegDataPtr) NULL;
- }
- else
- {
- DOWNSIZE(badreg, numRects);
- }
- good(badreg);
- return TRUE;
- }
-
- /* Step 1: Sort the rects array into ascending (y1, x1) order */
- QuickSortRects(RegionBoxptr(badreg), numRects);
-
- /* Step 2: Scatter the sorted array into the minimum number of regions */
-
- /* Set up the first region to be the first rectangle in badreg */
- /* Note that step 2 code will never overflow the ri[0].reg rects array */
- ri = (RegionInfo *) malloc(4 * sizeof(RegionInfo));
- if (!ri)
- return RegionBreak (badreg);
- sizeRI = 4;
- numRI = 1;
- ri[0].prevBand = 0;
- ri[0].curBand = 0;
- ri[0].reg = *badreg;
- box = RegionBoxptr(&ri[0].reg);
- ri[0].reg.extents = *box;
- ri[0].reg.data->numRects = 1;
-
- /* Now scatter rectangles into the minimum set of valid regions. If the
- next rectangle to be added to a region would force an existing rectangle
- in the region to be split up in order to maintain y-x banding, just
- forget it. Try the next region. If it doesn't fit cleanly into any
- region, make a new one. */
-
- for (i = numRects; --i > 0;)
- {
- box++;
- /* Look for a region to append box to */
- for (j = numRI, rit = ri; --j >= 0; rit++)
- {
- reg = &rit->reg;
- riBox = RegionEnd(reg);
-
- if (box->y1 == riBox->y1 && box->y2 == riBox->y2)
- {
- /* box is in same band as riBox. Merge or append it */
- if (box->x1 <= riBox->x2)
- {
- /* Merge it with riBox */
- if (box->x1 < riBox->x2) *pOverlap = TRUE;
- if (box->x2 > riBox->x2) riBox->x2 = box->x2;
- }
- else
- {
- RECTALLOC_BAIL(reg, 1, bail);
- *RegionTop(reg) = *box;
- reg->data->numRects++;
- }
- goto NextRect; /* So sue me */
- }
- else if (box->y1 >= riBox->y2)
- {
- /* Put box into new band */
- if (reg->extents.x2 < riBox->x2) reg->extents.x2 = riBox->x2;
- if (reg->extents.x1 > box->x1) reg->extents.x1 = box->x1;
- Coalesce(reg, rit->prevBand, rit->curBand);
- rit->curBand = reg->data->numRects;
- RECTALLOC_BAIL(reg, 1, bail);
- *RegionTop(reg) = *box;
- reg->data->numRects++;
- goto NextRect;
- }
- /* Well, this region was inappropriate. Try the next one. */
- } /* for j */
-
- /* Uh-oh. No regions were appropriate. Create a new one. */
- if (sizeRI == numRI)
- {
- /* Oops, allocate space for new region information */
- sizeRI <<= 1;
- rit = (RegionInfo *) realloc(ri, sizeRI * sizeof(RegionInfo));
- if (!rit)
- goto bail;
- ri = rit;
- rit = &ri[numRI];
- }
- numRI++;
- rit->prevBand = 0;
- rit->curBand = 0;
- rit->reg.extents = *box;
- rit->reg.data = NULL;
- if (!RegionRectAlloc(&rit->reg, (i+numRI) / numRI)) /* MUST force allocation */
- goto bail;
-NextRect: ;
- } /* for i */
-
- /* Make a final pass over each region in order to Coalesce and set
- extents.x2 and extents.y2 */
-
- for (j = numRI, rit = ri; --j >= 0; rit++)
- {
- reg = &rit->reg;
- riBox = RegionEnd(reg);
- reg->extents.y2 = riBox->y2;
- if (reg->extents.x2 < riBox->x2) reg->extents.x2 = riBox->x2;
- Coalesce(reg, rit->prevBand, rit->curBand);
- if (reg->data->numRects == 1) /* keep unions happy below */
- {
- xfreeData(reg);
- reg->data = NULL;
- }
- }
-
- /* Step 3: Union all regions into a single region */
- while (numRI > 1)
- {
- int half = numRI/2;
- for (j = numRI & 1; j < (half + (numRI & 1)); j++)
- {
- reg = &ri[j].reg;
- hreg = &ri[j+half].reg;
- if (!RegionOp(reg, reg, hreg, RegionUnionO, TRUE, TRUE, pOverlap))
- ret = FALSE;
- if (hreg->extents.x1 < reg->extents.x1)
- reg->extents.x1 = hreg->extents.x1;
- if (hreg->extents.y1 < reg->extents.y1)
- reg->extents.y1 = hreg->extents.y1;
- if (hreg->extents.x2 > reg->extents.x2)
- reg->extents.x2 = hreg->extents.x2;
- if (hreg->extents.y2 > reg->extents.y2)
- reg->extents.y2 = hreg->extents.y2;
- xfreeData(hreg);
- }
- numRI -= half;
- }
- *badreg = ri[0].reg;
- free(ri);
- good(badreg);
- return ret;
-bail:
- for (i = 0; i < numRI; i++)
- xfreeData(&ri[i].reg);
- free(ri);
- return RegionBreak (badreg);
-}
-
-RegionPtr
-RegionFromRects(int nrects, xRectangle *prect, int ctype)
-{
-
- RegionPtr pRgn;
- RegDataPtr pData;
- BoxPtr pBox;
- int i;
- int x1, y1, x2, y2;
-
- pRgn = RegionCreate(NullBox, 0);
- if (RegionNar (pRgn))
- return pRgn;
- if (!nrects)
- return pRgn;
- if (nrects == 1)
- {
- x1 = prect->x;
- y1 = prect->y;
- if ((x2 = x1 + (int) prect->width) > MAXSHORT)
- x2 = MAXSHORT;
- if ((y2 = y1 + (int) prect->height) > MAXSHORT)
- y2 = MAXSHORT;
- if (x1 != x2 && y1 != y2)
- {
- pRgn->extents.x1 = x1;
- pRgn->extents.y1 = y1;
- pRgn->extents.x2 = x2;
- pRgn->extents.y2 = y2;
- pRgn->data = NULL;
- }
- return pRgn;
- }
- pData = xallocData(nrects);
- if (!pData)
- {
- RegionBreak (pRgn);
- return pRgn;
- }
- pBox = (BoxPtr) (pData + 1);
- for (i = nrects; --i >= 0; prect++)
- {
- x1 = prect->x;
- y1 = prect->y;
- if ((x2 = x1 + (int) prect->width) > MAXSHORT)
- x2 = MAXSHORT;
- if ((y2 = y1 + (int) prect->height) > MAXSHORT)
- y2 = MAXSHORT;
- if (x1 != x2 && y1 != y2)
- {
- pBox->x1 = x1;
- pBox->y1 = y1;
- pBox->x2 = x2;
- pBox->y2 = y2;
- pBox++;
- }
- }
- if (pBox != (BoxPtr) (pData + 1))
- {
- pData->size = nrects;
- pData->numRects = pBox - (BoxPtr) (pData + 1);
- pRgn->data = pData;
- if (ctype != CT_YXBANDED)
- {
- Bool overlap; /* result ignored */
- pRgn->extents.x1 = pRgn->extents.x2 = 0;
- RegionValidate(pRgn, &overlap);
- }
- else
- RegionSetExtents(pRgn);
- good(pRgn);
- }
- else
- {
- free(pData);
- }
- return pRgn;
-}
+/***********************************************************
+
+Copyright 1987, 1988, 1989, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987, 1988, 1989 by
+Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/* The panoramix components contained the following notice */
+/*****************************************************************
+
+Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+
+******************************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "regionstr.h"
+#include <X11/Xprotostr.h>
+#include <X11/Xfuncproto.h>
+#include "gc.h"
+#include <pixman.h>
+
+#undef assert
+#ifdef REGION_DEBUG
+#define assert(expr) { \
+ CARD32 *foo = NULL; \
+ if (!(expr)) { \
+ ErrorF("Assertion failed file %s, line %d: %s\n", \
+ __FILE__, __LINE__, #expr); \
+ *foo = 0xdeadbeef; /* to get a backtrace */ \
+ } \
+ }
+#else
+#define assert(expr)
+#endif
+
+#define good(reg) assert(RegionIsValid(reg))
+
+/*
+ * The functions in this file implement the Region abstraction used extensively
+ * throughout the X11 sample server. A Region is simply a set of disjoint
+ * (non-overlapping) rectangles, plus an "extent" rectangle which is the
+ * smallest single rectangle that contains all the non-overlapping rectangles.
+ *
+ * A Region is implemented as a "y-x-banded" array of rectangles. This array
+ * imposes two degrees of order. First, all rectangles are sorted by top side
+ * y coordinate first (y1), and then by left side x coordinate (x1).
+ *
+ * Furthermore, the rectangles are grouped into "bands". Each rectangle in a
+ * band has the same top y coordinate (y1), and each has the same bottom y
+ * coordinate (y2). Thus all rectangles in a band differ only in their left
+ * and right side (x1 and x2). Bands are implicit in the array of rectangles:
+ * there is no separate list of band start pointers.
+ *
+ * The y-x band representation does not minimize rectangles. In particular,
+ * if a rectangle vertically crosses a band (the rectangle has scanlines in
+ * the y1 to y2 area spanned by the band), then the rectangle may be broken
+ * down into two or more smaller rectangles stacked one atop the other.
+ *
+ * ----------- -----------
+ * | | | | band 0
+ * | | -------- ----------- --------
+ * | | | | in y-x banded | | | | band 1
+ * | | | | form is | | | |
+ * ----------- | | ----------- --------
+ * | | | | band 2
+ * -------- --------
+ *
+ * An added constraint on the rectangles is that they must cover as much
+ * horizontal area as possible: no two rectangles within a band are allowed
+ * to touch.
+ *
+ * Whenever possible, bands will be merged together to cover a greater vertical
+ * distance (and thus reduce the number of rectangles). Two bands can be merged
+ * only if the bottom of one touches the top of the other and they have
+ * rectangles in the same places (of the same width, of course).
+ *
+ * Adam de Boor wrote most of the original region code. Joel McCormack
+ * substantially modified or rewrote most of the core arithmetic routines,
+ * and added RegionValidate in order to support several speed improvements
+ * to miValidateTree. Bob Scheifler changed the representation to be more
+ * compact when empty or a single rectangle, and did a bunch of gratuitous
+ * reformatting.
+ */
+
+/* true iff two Boxes overlap */
+#define EXTENTCHECK(r1,r2) \
+ (!( ((r1)->x2 <= (r2)->x1) || \
+ ((r1)->x1 >= (r2)->x2) || \
+ ((r1)->y2 <= (r2)->y1) || \
+ ((r1)->y1 >= (r2)->y2) ) )
+
+/* true iff (x,y) is in Box */
+#define INBOX(r,x,y) \
+ ( ((r)->x2 > x) && \
+ ((r)->x1 <= x) && \
+ ((r)->y2 > y) && \
+ ((r)->y1 <= y) )
+
+/* true iff Box r1 contains Box r2 */
+#define SUBSUMES(r1,r2) \
+ ( ((r1)->x1 <= (r2)->x1) && \
+ ((r1)->x2 >= (r2)->x2) && \
+ ((r1)->y1 <= (r2)->y1) && \
+ ((r1)->y2 >= (r2)->y2) )
+
+#define xallocData(n) malloc(RegionSizeof(n))
+#define xfreeData(reg) if ((reg)->data && (reg)->data->size) free((reg)->data)
+
+#define RECTALLOC_BAIL(pReg,n,bail) \
+if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \
+ if (!RegionRectAlloc(pReg, n)) { goto bail; }
+
+#define RECTALLOC(pReg,n) \
+if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \
+ if (!RegionRectAlloc(pReg, n)) { return FALSE; }
+
+#define ADDRECT(pNextRect,nx1,ny1,nx2,ny2) \
+{ \
+ pNextRect->x1 = nx1; \
+ pNextRect->y1 = ny1; \
+ pNextRect->x2 = nx2; \
+ pNextRect->y2 = ny2; \
+ pNextRect++; \
+}
+
+#define NEWRECT(pReg,pNextRect,nx1,ny1,nx2,ny2) \
+{ \
+ if (!(pReg)->data || ((pReg)->data->numRects == (pReg)->data->size))\
+ { \
+ if (!RegionRectAlloc(pReg, 1)) \
+ return FALSE; \
+ pNextRect = RegionTop(pReg); \
+ } \
+ ADDRECT(pNextRect,nx1,ny1,nx2,ny2); \
+ pReg->data->numRects++; \
+ assert(pReg->data->numRects<=pReg->data->size); \
+}
+
+
+#define DOWNSIZE(reg,numRects) \
+if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
+{ \
+ RegDataPtr NewData; \
+ NewData = (RegDataPtr)realloc((reg)->data, RegionSizeof(numRects)); \
+ if (NewData) \
+ { \
+ NewData->size = (numRects); \
+ (reg)->data = NewData; \
+ } \
+}
+
+
+BoxRec RegionEmptyBox = {0, 0, 0, 0};
+RegDataRec RegionEmptyData = {0, 0};
+
+RegDataRec RegionBrokenData = {0, 0};
+static RegionRec RegionBrokenRegion = { { 0, 0, 0, 0 }, &RegionBrokenData };
+
+void
+InitRegions (void)
+{
+ pixman_region_set_static_pointers (&RegionEmptyBox, &RegionEmptyData, &RegionBrokenData);
+}
+
+/*****************************************************************
+ * RegionCreate(rect, size)
+ * This routine does a simple malloc to make a structure of
+ * REGION of "size" number of rectangles.
+ *****************************************************************/
+
+RegionPtr
+RegionCreate(BoxPtr rect, int size)
+{
+ RegionPtr pReg;
+
+ pReg = (RegionPtr)malloc(sizeof(RegionRec));
+ if (!pReg)
+ return &RegionBrokenRegion;
+
+ RegionInit (pReg, rect, size);
+
+ return pReg;
+}
+
+void
+RegionDestroy(RegionPtr pReg)
+{
+ pixman_region_fini (pReg);
+ if (pReg != &RegionBrokenRegion)
+ free(pReg);
+}
+
+void
+RegionPrint(RegionPtr rgn)
+{
+ int num, size;
+ int i;
+ BoxPtr rects;
+
+ num = RegionNumRects(rgn);
+ size = RegionSize(rgn);
+ rects = RegionRects(rgn);
+ ErrorF("[mi] num: %d size: %d\n", num, size);
+ ErrorF("[mi] extents: %d %d %d %d\n",
+ rgn->extents.x1, rgn->extents.y1, rgn->extents.x2, rgn->extents.y2);
+ for (i = 0; i < num; i++)
+ ErrorF("[mi] %d %d %d %d \n",
+ rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2);
+ ErrorF("[mi] \n");
+}
+
+#ifdef DEBUG
+Bool
+RegionIsValid(RegionPtr reg)
+{
+ int i, numRects;
+
+ if ((reg->extents.x1 > reg->extents.x2) ||
+ (reg->extents.y1 > reg->extents.y2))
+ return FALSE;
+ numRects = RegionNumRects(reg);
+ if (!numRects)
+ return ((reg->extents.x1 == reg->extents.x2) &&
+ (reg->extents.y1 == reg->extents.y2) &&
+ (reg->data->size || (reg->data == &RegionEmptyData)));
+ else if (numRects == 1)
+ return !reg->data;
+ else
+ {
+ BoxPtr pboxP, pboxN;
+ BoxRec box;
+
+ pboxP = RegionRects(reg);
+ box = *pboxP;
+ box.y2 = pboxP[numRects-1].y2;
+ pboxN = pboxP + 1;
+ for (i = numRects; --i > 0; pboxP++, pboxN++)
+ {
+ if ((pboxN->x1 >= pboxN->x2) ||
+ (pboxN->y1 >= pboxN->y2))
+ return FALSE;
+ if (pboxN->x1 < box.x1)
+ box.x1 = pboxN->x1;
+ if (pboxN->x2 > box.x2)
+ box.x2 = pboxN->x2;
+ if ((pboxN->y1 < pboxP->y1) ||
+ ((pboxN->y1 == pboxP->y1) &&
+ ((pboxN->x1 < pboxP->x2) || (pboxN->y2 != pboxP->y2))))
+ return FALSE;
+ }
+ return ((box.x1 == reg->extents.x1) &&
+ (box.x2 == reg->extents.x2) &&
+ (box.y1 == reg->extents.y1) &&
+ (box.y2 == reg->extents.y2));
+ }
+}
+#endif /* DEBUG */
+
+Bool
+RegionBreak (RegionPtr pReg)
+{
+ xfreeData (pReg);
+ pReg->extents = RegionEmptyBox;
+ pReg->data = &RegionBrokenData;
+ return FALSE;
+}
+
+Bool
+RegionRectAlloc(RegionPtr pRgn, int n)
+{
+ RegDataPtr data;
+
+ if (!pRgn->data)
+ {
+ n++;
+ pRgn->data = xallocData(n);
+ if (!pRgn->data)
+ return RegionBreak (pRgn);
+ pRgn->data->numRects = 1;
+ *RegionBoxptr(pRgn) = pRgn->extents;
+ }
+ else if (!pRgn->data->size)
+ {
+ pRgn->data = xallocData(n);
+ if (!pRgn->data)
+ return RegionBreak (pRgn);
+ pRgn->data->numRects = 0;
+ }
+ else
+ {
+ if (n == 1)
+ {
+ n = pRgn->data->numRects;
+ if (n > 500) /* XXX pick numbers out of a hat */
+ n = 250;
+ }
+ n += pRgn->data->numRects;
+ data = (RegDataPtr)realloc(pRgn->data, RegionSizeof(n));
+ if (!data)
+ return RegionBreak (pRgn);
+ pRgn->data = data;
+ }
+ pRgn->data->size = n;
+ return TRUE;
+}
+
+/*======================================================================
+ * Generic Region Operator
+ *====================================================================*/
+
+/*-
+ *-----------------------------------------------------------------------
+ * RegionCoalesce --
+ * Attempt to merge the boxes in the current band with those in the
+ * previous one. We are guaranteed that the current band extends to
+ * the end of the rects array. Used only by RegionOp.
+ *
+ * Results:
+ * The new index for the previous band.
+ *
+ * Side Effects:
+ * If coalescing takes place:
+ * - rectangles in the previous band will have their y2 fields
+ * altered.
+ * - pReg->data->numRects will be decreased.
+ *
+ *-----------------------------------------------------------------------
+ */
+_X_INLINE static int
+RegionCoalesce (
+ RegionPtr pReg, /* Region to coalesce */
+ int prevStart, /* Index of start of previous band */
+ int curStart) /* Index of start of current band */
+{
+ BoxPtr pPrevBox; /* Current box in previous band */
+ BoxPtr pCurBox; /* Current box in current band */
+ int numRects; /* Number rectangles in both bands */
+ int y2; /* Bottom of current band */
+ /*
+ * Figure out how many rectangles are in the band.
+ */
+ numRects = curStart - prevStart;
+ assert(numRects == pReg->data->numRects - curStart);
+
+ if (!numRects) return curStart;
+
+ /*
+ * The bands may only be coalesced if the bottom of the previous
+ * matches the top scanline of the current.
+ */
+ pPrevBox = RegionBox(pReg, prevStart);
+ pCurBox = RegionBox(pReg, curStart);
+ if (pPrevBox->y2 != pCurBox->y1) return curStart;
+
+ /*
+ * Make sure the bands have boxes in the same places. This
+ * assumes that boxes have been added in such a way that they
+ * cover the most area possible. I.e. two boxes in a band must
+ * have some horizontal space between them.
+ */
+ y2 = pCurBox->y2;
+
+ do {
+ if ((pPrevBox->x1 != pCurBox->x1) || (pPrevBox->x2 != pCurBox->x2)) {
+ return curStart;
+ }
+ pPrevBox++;
+ pCurBox++;
+ numRects--;
+ } while (numRects);
+
+ /*
+ * The bands may be merged, so set the bottom y of each box
+ * in the previous band to the bottom y of the current band.
+ */
+ numRects = curStart - prevStart;
+ pReg->data->numRects -= numRects;
+ do {
+ pPrevBox--;
+ pPrevBox->y2 = y2;
+ numRects--;
+ } while (numRects);
+ return prevStart;
+}
+
+
+/* Quicky macro to avoid trivial reject procedure calls to RegionCoalesce */
+
+#define Coalesce(newReg, prevBand, curBand) \
+ if (curBand - prevBand == newReg->data->numRects - curBand) { \
+ prevBand = RegionCoalesce(newReg, prevBand, curBand); \
+ } else { \
+ prevBand = curBand; \
+ }
+
+/*-
+ *-----------------------------------------------------------------------
+ * RegionAppendNonO --
+ * Handle a non-overlapping band for the union and subtract operations.
+ * Just adds the (top/bottom-clipped) rectangles into the region.
+ * Doesn't have to check for subsumption or anything.
+ *
+ * Results:
+ * None.
+ *
+ * Side Effects:
+ * pReg->data->numRects is incremented and the rectangles overwritten
+ * with the rectangles we're passed.
+ *
+ *-----------------------------------------------------------------------
+ */
+
+_X_INLINE static Bool
+RegionAppendNonO (
+ RegionPtr pReg,
+ BoxPtr r,
+ BoxPtr rEnd,
+ int y1,
+ int y2)
+{
+ BoxPtr pNextRect;
+ int newRects;
+
+ newRects = rEnd - r;
+
+ assert(y1 < y2);
+ assert(newRects != 0);
+
+ /* Make sure we have enough space for all rectangles to be added */
+ RECTALLOC(pReg, newRects);
+ pNextRect = RegionTop(pReg);
+ pReg->data->numRects += newRects;
+ do {
+ assert(r->x1 < r->x2);
+ ADDRECT(pNextRect, r->x1, y1, r->x2, y2);
+ r++;
+ } while (r != rEnd);
+
+ return TRUE;
+}
+
+#define FindBand(r, rBandEnd, rEnd, ry1) \
+{ \
+ ry1 = r->y1; \
+ rBandEnd = r+1; \
+ while ((rBandEnd != rEnd) && (rBandEnd->y1 == ry1)) { \
+ rBandEnd++; \
+ } \
+}
+
+#define AppendRegions(newReg, r, rEnd) \
+{ \
+ int newRects; \
+ if ((newRects = rEnd - r)) { \
+ RECTALLOC(newReg, newRects); \
+ memmove((char *)RegionTop(newReg),(char *)r, \
+ newRects * sizeof(BoxRec)); \
+ newReg->data->numRects += newRects; \
+ } \
+}
+
+/*-
+ *-----------------------------------------------------------------------
+ * RegionOp --
+ * Apply an operation to two regions. Called by RegionUnion, RegionInverse,
+ * RegionSubtract, RegionIntersect.... Both regions MUST have at least one
+ * rectangle, and cannot be the same object.
+ *
+ * Results:
+ * TRUE if successful.
+ *
+ * Side Effects:
+ * The new region is overwritten.
+ * pOverlap set to TRUE if overlapFunc ever returns TRUE.
+ *
+ * Notes:
+ * The idea behind this function is to view the two regions as sets.
+ * Together they cover a rectangle of area that this function divides
+ * into horizontal bands where points are covered only by one region
+ * or by both. For the first case, the nonOverlapFunc is called with
+ * each the band and the band's upper and lower extents. For the
+ * second, the overlapFunc is called to process the entire band. It
+ * is responsible for clipping the rectangles in the band, though
+ * this function provides the boundaries.
+ * At the end of each band, the new region is coalesced, if possible,
+ * to reduce the number of rectangles in the region.
+ *
+ *-----------------------------------------------------------------------
+ */
+
+typedef Bool (*OverlapProcPtr)(
+ RegionPtr pReg,
+ BoxPtr r1,
+ BoxPtr r1End,
+ BoxPtr r2,
+ BoxPtr r2End,
+ short y1,
+ short y2,
+ Bool *pOverlap);
+
+static Bool
+RegionOp(
+ RegionPtr newReg, /* Place to store result */
+ RegionPtr reg1, /* First region in operation */
+ RegionPtr reg2, /* 2d region in operation */
+ OverlapProcPtr overlapFunc, /* Function to call for over-
+ * lapping bands */
+ Bool appendNon1, /* Append non-overlapping bands */
+ /* in region 1 ? */
+ Bool appendNon2, /* Append non-overlapping bands */
+ /* in region 2 ? */
+ Bool *pOverlap)
+{
+ BoxPtr r1; /* Pointer into first region */
+ BoxPtr r2; /* Pointer into 2d region */
+ BoxPtr r1End; /* End of 1st region */
+ BoxPtr r2End; /* End of 2d region */
+ short ybot; /* Bottom of intersection */
+ short ytop; /* Top of intersection */
+ RegDataPtr oldData; /* Old data for newReg */
+ int prevBand; /* Index of start of
+ * previous band in newReg */
+ int curBand; /* Index of start of current
+ * band in newReg */
+ BoxPtr r1BandEnd; /* End of current band in r1 */
+ BoxPtr r2BandEnd; /* End of current band in r2 */
+ short top; /* Top of non-overlapping band */
+ short bot; /* Bottom of non-overlapping band*/
+ int r1y1; /* Temps for r1->y1 and r2->y1 */
+ int r2y1;
+ int newSize;
+ int numRects;
+
+ /*
+ * Break any region computed from a broken region
+ */
+ if (RegionNar (reg1) || RegionNar(reg2))
+ return RegionBreak (newReg);
+
+ /*
+ * Initialization:
+ * set r1, r2, r1End and r2End appropriately, save the rectangles
+ * of the destination region until the end in case it's one of
+ * the two source regions, then mark the "new" region empty, allocating
+ * another array of rectangles for it to use.
+ */
+
+ r1 = RegionRects(reg1);
+ newSize = RegionNumRects(reg1);
+ r1End = r1 + newSize;
+ numRects = RegionNumRects(reg2);
+ r2 = RegionRects(reg2);
+ r2End = r2 + numRects;
+ assert(r1 != r1End);
+ assert(r2 != r2End);
+
+ oldData = NULL;
+ if (((newReg == reg1) && (newSize > 1)) ||
+ ((newReg == reg2) && (numRects > 1)))
+ {
+ oldData = newReg->data;
+ newReg->data = &RegionEmptyData;
+ }
+ /* guess at new size */
+ if (numRects > newSize)
+ newSize = numRects;
+ newSize <<= 1;
+ if (!newReg->data)
+ newReg->data = &RegionEmptyData;
+ else if (newReg->data->size)
+ newReg->data->numRects = 0;
+ if (newSize > newReg->data->size)
+ if (!RegionRectAlloc(newReg, newSize))
+ return FALSE;
+
+ /*
+ * Initialize ybot.
+ * In the upcoming loop, ybot and ytop serve different functions depending
+ * on whether the band being handled is an overlapping or non-overlapping
+ * band.
+ * In the case of a non-overlapping band (only one of the regions
+ * has points in the band), ybot is the bottom of the most recent
+ * intersection and thus clips the top of the rectangles in that band.
+ * ytop is the top of the next intersection between the two regions and
+ * serves to clip the bottom of the rectangles in the current band.
+ * For an overlapping band (where the two regions intersect), ytop clips
+ * the top of the rectangles of both regions and ybot clips the bottoms.
+ */
+
+ ybot = min(r1->y1, r2->y1);
+
+ /*
+ * prevBand serves to mark the start of the previous band so rectangles
+ * can be coalesced into larger rectangles. qv. RegionCoalesce, above.
+ * In the beginning, there is no previous band, so prevBand == curBand
+ * (curBand is set later on, of course, but the first band will always
+ * start at index 0). prevBand and curBand must be indices because of
+ * the possible expansion, and resultant moving, of the new region's
+ * array of rectangles.
+ */
+ prevBand = 0;
+
+ do {
+ /*
+ * This algorithm proceeds one source-band (as opposed to a
+ * destination band, which is determined by where the two regions
+ * intersect) at a time. r1BandEnd and r2BandEnd serve to mark the
+ * rectangle after the last one in the current band for their
+ * respective regions.
+ */
+ assert(r1 != r1End);
+ assert(r2 != r2End);
+
+ FindBand(r1, r1BandEnd, r1End, r1y1);
+ FindBand(r2, r2BandEnd, r2End, r2y1);
+
+ /*
+ * First handle the band that doesn't intersect, if any.
+ *
+ * Note that attention is restricted to one band in the
+ * non-intersecting region at once, so if a region has n
+ * bands between the current position and the next place it overlaps
+ * the other, this entire loop will be passed through n times.
+ */
+ if (r1y1 < r2y1) {
+ if (appendNon1) {
+ top = max(r1y1, ybot);
+ bot = min(r1->y2, r2y1);
+ if (top != bot) {
+ curBand = newReg->data->numRects;
+ RegionAppendNonO(newReg, r1, r1BandEnd, top, bot);
+ Coalesce(newReg, prevBand, curBand);
+ }
+ }
+ ytop = r2y1;
+ } else if (r2y1 < r1y1) {
+ if (appendNon2) {
+ top = max(r2y1, ybot);
+ bot = min(r2->y2, r1y1);
+ if (top != bot) {
+ curBand = newReg->data->numRects;
+ RegionAppendNonO(newReg, r2, r2BandEnd, top, bot);
+ Coalesce(newReg, prevBand, curBand);
+ }
+ }
+ ytop = r1y1;
+ } else {
+ ytop = r1y1;
+ }
+
+ /*
+ * Now see if we've hit an intersecting band. The two bands only
+ * intersect if ybot > ytop
+ */
+ ybot = min(r1->y2, r2->y2);
+ if (ybot > ytop) {
+ curBand = newReg->data->numRects;
+ (* overlapFunc)(newReg, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot,
+ pOverlap);
+ Coalesce(newReg, prevBand, curBand);
+ }
+
+ /*
+ * If we've finished with a band (y2 == ybot) we skip forward
+ * in the region to the next band.
+ */
+ if (r1->y2 == ybot) r1 = r1BandEnd;
+ if (r2->y2 == ybot) r2 = r2BandEnd;
+
+ } while (r1 != r1End && r2 != r2End);
+
+ /*
+ * Deal with whichever region (if any) still has rectangles left.
+ *
+ * We only need to worry about banding and coalescing for the very first
+ * band left. After that, we can just group all remaining boxes,
+ * regardless of how many bands, into one final append to the list.
+ */
+
+ if ((r1 != r1End) && appendNon1) {
+ /* Do first nonOverlap1Func call, which may be able to coalesce */
+ FindBand(r1, r1BandEnd, r1End, r1y1);
+ curBand = newReg->data->numRects;
+ RegionAppendNonO(newReg, r1, r1BandEnd, max(r1y1, ybot), r1->y2);
+ Coalesce(newReg, prevBand, curBand);
+ /* Just append the rest of the boxes */
+ AppendRegions(newReg, r1BandEnd, r1End);
+
+ } else if ((r2 != r2End) && appendNon2) {
+ /* Do first nonOverlap2Func call, which may be able to coalesce */
+ FindBand(r2, r2BandEnd, r2End, r2y1);
+ curBand = newReg->data->numRects;
+ RegionAppendNonO(newReg, r2, r2BandEnd, max(r2y1, ybot), r2->y2);
+ Coalesce(newReg, prevBand, curBand);
+ /* Append rest of boxes */
+ AppendRegions(newReg, r2BandEnd, r2End);
+ }
+
+ free(oldData);
+
+ if (!(numRects = newReg->data->numRects))
+ {
+ xfreeData(newReg);
+ newReg->data = &RegionEmptyData;
+ }
+ else if (numRects == 1)
+ {
+ newReg->extents = *RegionBoxptr(newReg);
+ xfreeData(newReg);
+ newReg->data = NULL;
+ }
+ else
+ {
+ DOWNSIZE(newReg, numRects);
+ }
+
+ return TRUE;
+}
+
+/*-
+ *-----------------------------------------------------------------------
+ * RegionSetExtents --
+ * Reset the extents of a region to what they should be. Called by
+ * Subtract and Intersect as they can't figure it out along the
+ * way or do so easily, as Union can.
+ *
+ * Results:
+ * None.
+ *
+ * Side Effects:
+ * The region's 'extents' structure is overwritten.
+ *
+ *-----------------------------------------------------------------------
+ */
+static void
+RegionSetExtents (RegionPtr pReg)
+{
+ BoxPtr pBox, pBoxEnd;
+
+ if (!pReg->data)
+ return;
+ if (!pReg->data->size)
+ {
+ pReg->extents.x2 = pReg->extents.x1;
+ pReg->extents.y2 = pReg->extents.y1;
+ return;
+ }
+
+ pBox = RegionBoxptr(pReg);
+ pBoxEnd = RegionEnd(pReg);
+
+ /*
+ * Since pBox is the first rectangle in the region, it must have the
+ * smallest y1 and since pBoxEnd is the last rectangle in the region,
+ * it must have the largest y2, because of banding. Initialize x1 and
+ * x2 from pBox and pBoxEnd, resp., as good things to initialize them
+ * to...
+ */
+ pReg->extents.x1 = pBox->x1;
+ pReg->extents.y1 = pBox->y1;
+ pReg->extents.x2 = pBoxEnd->x2;
+ pReg->extents.y2 = pBoxEnd->y2;
+
+ assert(pReg->extents.y1 < pReg->extents.y2);
+ while (pBox <= pBoxEnd) {
+ if (pBox->x1 < pReg->extents.x1)
+ pReg->extents.x1 = pBox->x1;
+ if (pBox->x2 > pReg->extents.x2)
+ pReg->extents.x2 = pBox->x2;
+ pBox++;
+ };
+
+ assert(pReg->extents.x1 < pReg->extents.x2);
+}
+
+/*======================================================================
+ * Region Intersection
+ *====================================================================*/
+/*-
+ *-----------------------------------------------------------------------
+ * RegionIntersectO --
+ * Handle an overlapping band for RegionIntersect.
+ *
+ * Results:
+ * TRUE if successful.
+ *
+ * Side Effects:
+ * Rectangles may be added to the region.
+ *
+ *-----------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+
+#define MERGERECT(r) \
+{ \
+ if (r->x1 <= x2) { \
+ /* Merge with current rectangle */ \
+ if (r->x1 < x2) *pOverlap = TRUE; \
+ if (x2 < r->x2) x2 = r->x2; \
+ } else { \
+ /* Add current rectangle, start new one */ \
+ NEWRECT(pReg, pNextRect, x1, y1, x2, y2); \
+ x1 = r->x1; \
+ x2 = r->x2; \
+ } \
+ r++; \
+}
+
+/*======================================================================
+ * Region Union
+ *====================================================================*/
+
+/*-
+ *-----------------------------------------------------------------------
+ * RegionUnionO --
+ * Handle an overlapping band for the union operation. Picks the
+ * left-most rectangle each time and merges it into the region.
+ *
+ * Results:
+ * TRUE if successful.
+ *
+ * Side Effects:
+ * pReg is overwritten.
+ * pOverlap is set to TRUE if any boxes overlap.
+ *
+ *-----------------------------------------------------------------------
+ */
+static Bool
+RegionUnionO (
+ RegionPtr pReg,
+ BoxPtr r1,
+ BoxPtr r1End,
+ BoxPtr r2,
+ BoxPtr r2End,
+ short y1,
+ short y2,
+ Bool *pOverlap)
+{
+ BoxPtr pNextRect;
+ int x1; /* left and right side of current union */
+ int x2;
+
+ assert (y1 < y2);
+ assert(r1 != r1End && r2 != r2End);
+
+ pNextRect = RegionTop(pReg);
+
+ /* Start off current rectangle */
+ if (r1->x1 < r2->x1)
+ {
+ x1 = r1->x1;
+ x2 = r1->x2;
+ r1++;
+ }
+ else
+ {
+ x1 = r2->x1;
+ x2 = r2->x2;
+ r2++;
+ }
+ while (r1 != r1End && r2 != r2End)
+ {
+ if (r1->x1 < r2->x1) MERGERECT(r1) else MERGERECT(r2);
+ }
+
+ /* Finish off whoever (if any) is left */
+ if (r1 != r1End)
+ {
+ do
+ {
+ MERGERECT(r1);
+ } while (r1 != r1End);
+ }
+ else if (r2 != r2End)
+ {
+ do
+ {
+ MERGERECT(r2);
+ } while (r2 != r2End);
+ }
+
+ /* Add current rectangle */
+ NEWRECT(pReg, pNextRect, x1, y1, x2, y2);
+
+ return TRUE;
+}
+
+/*======================================================================
+ * Batch Rectangle Union
+ *====================================================================*/
+
+/*-
+ *-----------------------------------------------------------------------
+ * RegionAppend --
+ *
+ * "Append" the rgn rectangles onto the end of dstrgn, maintaining
+ * knowledge of YX-banding when it's easy. Otherwise, dstrgn just
+ * becomes a non-y-x-banded random collection of rectangles, and not
+ * yet a true region. After a sequence of appends, the caller must
+ * call RegionValidate to ensure that a valid region is constructed.
+ *
+ * Results:
+ * TRUE if successful.
+ *
+ * Side Effects:
+ * dstrgn is modified if rgn has rectangles.
+ *
+ */
+Bool
+RegionAppend(RegionPtr dstrgn, RegionPtr rgn)
+{
+ int numRects, dnumRects, size;
+ BoxPtr new, old;
+ Bool prepend;
+
+ if (RegionNar(rgn))
+ return RegionBreak (dstrgn);
+
+ if (!rgn->data && (dstrgn->data == &RegionEmptyData))
+ {
+ dstrgn->extents = rgn->extents;
+ dstrgn->data = NULL;
+ return TRUE;
+ }
+
+ numRects = RegionNumRects(rgn);
+ if (!numRects)
+ return TRUE;
+ prepend = FALSE;
+ size = numRects;
+ dnumRects = RegionNumRects(dstrgn);
+ if (!dnumRects && (size < 200))
+ size = 200; /* XXX pick numbers out of a hat */
+ RECTALLOC(dstrgn, size);
+ old = RegionRects(rgn);
+ if (!dnumRects)
+ dstrgn->extents = rgn->extents;
+ else if (dstrgn->extents.x2 > dstrgn->extents.x1)
+ {
+ BoxPtr first, last;
+
+ first = old;
+ last = RegionBoxptr(dstrgn) + (dnumRects - 1);
+ if ((first->y1 > last->y2) ||
+ ((first->y1 == last->y1) && (first->y2 == last->y2) &&
+ (first->x1 > last->x2)))
+ {
+ if (rgn->extents.x1 < dstrgn->extents.x1)
+ dstrgn->extents.x1 = rgn->extents.x1;
+ if (rgn->extents.x2 > dstrgn->extents.x2)
+ dstrgn->extents.x2 = rgn->extents.x2;
+ dstrgn->extents.y2 = rgn->extents.y2;
+ }
+ else
+ {
+ first = RegionBoxptr(dstrgn);
+ last = old + (numRects - 1);
+ if ((first->y1 > last->y2) ||
+ ((first->y1 == last->y1) && (first->y2 == last->y2) &&
+ (first->x1 > last->x2)))
+ {
+ prepend = TRUE;
+ if (rgn->extents.x1 < dstrgn->extents.x1)
+ dstrgn->extents.x1 = rgn->extents.x1;
+ if (rgn->extents.x2 > dstrgn->extents.x2)
+ dstrgn->extents.x2 = rgn->extents.x2;
+ dstrgn->extents.y1 = rgn->extents.y1;
+ }
+ else
+ dstrgn->extents.x2 = dstrgn->extents.x1;
+ }
+ }
+ if (prepend)
+ {
+ new = RegionBox(dstrgn, numRects);
+ if (dnumRects == 1)
+ *new = *RegionBoxptr(dstrgn);
+ else
+ memmove((char *)new,(char *)RegionBoxptr(dstrgn),
+ dnumRects * sizeof(BoxRec));
+ new = RegionBoxptr(dstrgn);
+ }
+ else
+ new = RegionBoxptr(dstrgn) + dnumRects;
+ if (numRects == 1)
+ *new = *old;
+ else
+ memmove((char *)new, (char *)old, numRects * sizeof(BoxRec));
+ dstrgn->data->numRects += numRects;
+ return TRUE;
+}
+
+
+#define ExchangeRects(a, b) \
+{ \
+ BoxRec t; \
+ t = rects[a]; \
+ rects[a] = rects[b]; \
+ rects[b] = t; \
+}
+
+static void
+QuickSortRects(
+ BoxRec rects[],
+ int numRects)
+{
+ int y1;
+ int x1;
+ int i, j;
+ BoxPtr r;
+
+ /* Always called with numRects > 1 */
+
+ do
+ {
+ if (numRects == 2)
+ {
+ if (rects[0].y1 > rects[1].y1 ||
+ (rects[0].y1 == rects[1].y1 && rects[0].x1 > rects[1].x1))
+ ExchangeRects(0, 1);
+ return;
+ }
+
+ /* Choose partition element, stick in location 0 */
+ ExchangeRects(0, numRects >> 1);
+ y1 = rects[0].y1;
+ x1 = rects[0].x1;
+
+ /* Partition array */
+ i = 0;
+ j = numRects;
+ do
+ {
+ r = &(rects[i]);
+ do
+ {
+ r++;
+ i++;
+ } while (i != numRects &&
+ (r->y1 < y1 || (r->y1 == y1 && r->x1 < x1)));
+ r = &(rects[j]);
+ do
+ {
+ r--;
+ j--;
+ } while (y1 < r->y1 || (y1 == r->y1 && x1 < r->x1));
+ if (i < j)
+ ExchangeRects(i, j);
+ } while (i < j);
+
+ /* Move partition element back to middle */
+ ExchangeRects(0, j);
+
+ /* Recurse */
+ if (numRects-j-1 > 1)
+ QuickSortRects(&rects[j+1], numRects-j-1);
+ numRects = j;
+ } while (numRects > 1);
+}
+
+/*-
+ *-----------------------------------------------------------------------
+ * RegionValidate --
+ *
+ * Take a ``region'' which is a non-y-x-banded random collection of
+ * rectangles, and compute a nice region which is the union of all the
+ * rectangles.
+ *
+ * Results:
+ * TRUE if successful.
+ *
+ * Side Effects:
+ * The passed-in ``region'' may be modified.
+ * pOverlap set to TRUE if any retangles overlapped, else FALSE;
+ *
+ * Strategy:
+ * Step 1. Sort the rectangles into ascending order with primary key y1
+ * and secondary key x1.
+ *
+ * Step 2. Split the rectangles into the minimum number of proper y-x
+ * banded regions. This may require horizontally merging
+ * rectangles, and vertically coalescing bands. With any luck,
+ * this step in an identity tranformation (ala the Box widget),
+ * or a coalescing into 1 box (ala Menus).
+ *
+ * Step 3. Merge the separate regions down to a single region by calling
+ * Union. Maximize the work each Union call does by using
+ * a binary merge.
+ *
+ *-----------------------------------------------------------------------
+ */
+
+Bool
+RegionValidate(RegionPtr badreg, Bool *pOverlap)
+{
+ /* Descriptor for regions under construction in Step 2. */
+ typedef struct {
+ RegionRec reg;
+ int prevBand;
+ int curBand;
+ } RegionInfo;
+
+ int numRects; /* Original numRects for badreg */
+ RegionInfo *ri; /* Array of current regions */
+ int numRI; /* Number of entries used in ri */
+ int sizeRI; /* Number of entries available in ri */
+ int i; /* Index into rects */
+ int j; /* Index into ri */
+ RegionInfo *rit; /* &ri[j] */
+ RegionPtr reg; /* ri[j].reg */
+ BoxPtr box; /* Current box in rects */
+ BoxPtr riBox; /* Last box in ri[j].reg */
+ RegionPtr hreg; /* ri[j_half].reg */
+ Bool ret = TRUE;
+
+ *pOverlap = FALSE;
+ if (!badreg->data)
+ {
+ good(badreg);
+ return TRUE;
+ }
+ numRects = badreg->data->numRects;
+ if (!numRects)
+ {
+ if (RegionNar(badreg))
+ return FALSE;
+ good(badreg);
+ return TRUE;
+ }
+ if (badreg->extents.x1 < badreg->extents.x2)
+ {
+ if ((numRects) == 1)
+ {
+ xfreeData(badreg);
+ badreg->data = (RegDataPtr) NULL;
+ }
+ else
+ {
+ DOWNSIZE(badreg, numRects);
+ }
+ good(badreg);
+ return TRUE;
+ }
+
+ /* Step 1: Sort the rects array into ascending (y1, x1) order */
+ QuickSortRects(RegionBoxptr(badreg), numRects);
+
+ /* Step 2: Scatter the sorted array into the minimum number of regions */
+
+ /* Set up the first region to be the first rectangle in badreg */
+ /* Note that step 2 code will never overflow the ri[0].reg rects array */
+ ri = (RegionInfo *) malloc(4 * sizeof(RegionInfo));
+ if (!ri)
+ return RegionBreak (badreg);
+ sizeRI = 4;
+ numRI = 1;
+ ri[0].prevBand = 0;
+ ri[0].curBand = 0;
+ ri[0].reg = *badreg;
+ box = RegionBoxptr(&ri[0].reg);
+ ri[0].reg.extents = *box;
+ ri[0].reg.data->numRects = 1;
+
+ /* Now scatter rectangles into the minimum set of valid regions. If the
+ next rectangle to be added to a region would force an existing rectangle
+ in the region to be split up in order to maintain y-x banding, just
+ forget it. Try the next region. If it doesn't fit cleanly into any
+ region, make a new one. */
+
+ for (i = numRects; --i > 0;)
+ {
+ box++;
+ /* Look for a region to append box to */
+ for (j = numRI, rit = ri; --j >= 0; rit++)
+ {
+ reg = &rit->reg;
+ riBox = RegionEnd(reg);
+
+ if (box->y1 == riBox->y1 && box->y2 == riBox->y2)
+ {
+ /* box is in same band as riBox. Merge or append it */
+ if (box->x1 <= riBox->x2)
+ {
+ /* Merge it with riBox */
+ if (box->x1 < riBox->x2) *pOverlap = TRUE;
+ if (box->x2 > riBox->x2) riBox->x2 = box->x2;
+ }
+ else
+ {
+ RECTALLOC_BAIL(reg, 1, bail);
+ *RegionTop(reg) = *box;
+ reg->data->numRects++;
+ }
+ goto NextRect; /* So sue me */
+ }
+ else if (box->y1 >= riBox->y2)
+ {
+ /* Put box into new band */
+ if (reg->extents.x2 < riBox->x2) reg->extents.x2 = riBox->x2;
+ if (reg->extents.x1 > box->x1) reg->extents.x1 = box->x1;
+ Coalesce(reg, rit->prevBand, rit->curBand);
+ rit->curBand = reg->data->numRects;
+ RECTALLOC_BAIL(reg, 1, bail);
+ *RegionTop(reg) = *box;
+ reg->data->numRects++;
+ goto NextRect;
+ }
+ /* Well, this region was inappropriate. Try the next one. */
+ } /* for j */
+
+ /* Uh-oh. No regions were appropriate. Create a new one. */
+ if (sizeRI == numRI)
+ {
+ /* Oops, allocate space for new region information */
+ sizeRI <<= 1;
+ rit = (RegionInfo *) realloc(ri, sizeRI * sizeof(RegionInfo));
+ if (!rit)
+ goto bail;
+ ri = rit;
+ rit = &ri[numRI];
+ }
+ numRI++;
+ rit->prevBand = 0;
+ rit->curBand = 0;
+ rit->reg.extents = *box;
+ rit->reg.data = NULL;
+ if (!RegionRectAlloc(&rit->reg, (i+numRI) / numRI)) /* MUST force allocation */
+ goto bail;
+NextRect: ;
+ } /* for i */
+
+ /* Make a final pass over each region in order to Coalesce and set
+ extents.x2 and extents.y2 */
+
+ for (j = numRI, rit = ri; --j >= 0; rit++)
+ {
+ reg = &rit->reg;
+ riBox = RegionEnd(reg);
+ reg->extents.y2 = riBox->y2;
+ if (reg->extents.x2 < riBox->x2) reg->extents.x2 = riBox->x2;
+ Coalesce(reg, rit->prevBand, rit->curBand);
+ if (reg->data->numRects == 1) /* keep unions happy below */
+ {
+ xfreeData(reg);
+ reg->data = NULL;
+ }
+ }
+
+ /* Step 3: Union all regions into a single region */
+ while (numRI > 1)
+ {
+ int half = numRI/2;
+ for (j = numRI & 1; j < (half + (numRI & 1)); j++)
+ {
+ reg = &ri[j].reg;
+ hreg = &ri[j+half].reg;
+ if (!RegionOp(reg, reg, hreg, RegionUnionO, TRUE, TRUE, pOverlap))
+ ret = FALSE;
+ if (hreg->extents.x1 < reg->extents.x1)
+ reg->extents.x1 = hreg->extents.x1;
+ if (hreg->extents.y1 < reg->extents.y1)
+ reg->extents.y1 = hreg->extents.y1;
+ if (hreg->extents.x2 > reg->extents.x2)
+ reg->extents.x2 = hreg->extents.x2;
+ if (hreg->extents.y2 > reg->extents.y2)
+ reg->extents.y2 = hreg->extents.y2;
+ xfreeData(hreg);
+ }
+ numRI -= half;
+ }
+ *badreg = ri[0].reg;
+ free(ri);
+ good(badreg);
+ return ret;
+bail:
+ for (i = 0; i < numRI; i++)
+ xfreeData(&ri[i].reg);
+ free(ri);
+ return RegionBreak (badreg);
+}
+
+RegionPtr
+RegionFromRects(int nrects, xRectangle *prect, int ctype)
+{
+
+ RegionPtr pRgn;
+ RegDataPtr pData;
+ BoxPtr pBox;
+ int i;
+ int x1, y1, x2, y2;
+
+ pRgn = RegionCreate(NullBox, 0);
+ if (RegionNar (pRgn))
+ return pRgn;
+ if (!nrects)
+ return pRgn;
+ if (nrects == 1)
+ {
+ x1 = prect->x;
+ y1 = prect->y;
+ if ((x2 = x1 + (int) prect->width) > MAXSHORT)
+ x2 = MAXSHORT;
+ if ((y2 = y1 + (int) prect->height) > MAXSHORT)
+ y2 = MAXSHORT;
+ if (x1 != x2 && y1 != y2)
+ {
+ pRgn->extents.x1 = x1;
+ pRgn->extents.y1 = y1;
+ pRgn->extents.x2 = x2;
+ pRgn->extents.y2 = y2;
+ pRgn->data = NULL;
+ }
+ return pRgn;
+ }
+ pData = xallocData(nrects);
+ if (!pData)
+ {
+ RegionBreak (pRgn);
+ return pRgn;
+ }
+ pBox = (BoxPtr) (pData + 1);
+ for (i = nrects; --i >= 0; prect++)
+ {
+ x1 = prect->x;
+ y1 = prect->y;
+ if ((x2 = x1 + (int) prect->width) > MAXSHORT)
+ x2 = MAXSHORT;
+ if ((y2 = y1 + (int) prect->height) > MAXSHORT)
+ y2 = MAXSHORT;
+ if (x1 != x2 && y1 != y2)
+ {
+ pBox->x1 = x1;
+ pBox->y1 = y1;
+ pBox->x2 = x2;
+ pBox->y2 = y2;
+ pBox++;
+ }
+ }
+ if (pBox != (BoxPtr) (pData + 1))
+ {
+ pData->size = nrects;
+ pData->numRects = pBox - (BoxPtr) (pData + 1);
+ pRgn->data = pData;
+ if (ctype != CT_YXBANDED)
+ {
+ Bool overlap; /* result ignored */
+ pRgn->extents.x1 = pRgn->extents.x2 = 0;
+ RegionValidate(pRgn, &overlap);
+ }
+ else
+ RegionSetExtents(pRgn);
+ good(pRgn);
+ }
+ else
+ {
+ free(pData);
+ }
+ return pRgn;
+}
diff --git a/xorg-server/dix/registry.c b/xorg-server/dix/registry.c
index 9a83ff74e..7221359b8 100644
--- a/xorg-server/dix/registry.c
+++ b/xorg-server/dix/registry.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <X11/X.h>
#include <X11/Xproto.h>
#include "resource.h"
diff --git a/xorg-server/dix/resource.c b/xorg-server/dix/resource.c
index 26d2c72aa..960aaab50 100644
--- a/xorg-server/dix/resource.c
+++ b/xorg-server/dix/resource.c
@@ -187,46 +187,47 @@ struct ResourceType {
};
static struct ResourceType *resourceTypes;
+
static const struct ResourceType predefTypes[] = {
- [RT_NONE & (RC_LASTPREDEF - 1)] = {
- .deleteFunc = (DeleteType)NoopDDA,
- .errorValue = BadValue,
+ /* [RT_NONE & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */(DeleteType)NoopDDA,
+ /*.errorValue = */BadValue,
},
- [RT_WINDOW & (RC_LASTPREDEF - 1)] = {
- .deleteFunc = DeleteWindow,
- .errorValue = BadWindow,
+ /* [RT_WINDOW & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */DeleteWindow,
+ /*.errorValue = */BadWindow,
},
- [RT_PIXMAP & (RC_LASTPREDEF - 1)] = {
- .deleteFunc = dixDestroyPixmap,
- .errorValue = BadPixmap,
+ /* [RT_PIXMAP & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */dixDestroyPixmap,
+ /*.errorValue = */BadPixmap,
},
- [RT_GC & (RC_LASTPREDEF - 1)] = {
- .deleteFunc = FreeGC,
- .errorValue = BadGC,
+ /* [RT_GC & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */FreeGC,
+ /*.errorValue = */BadGC,
},
- [RT_FONT & (RC_LASTPREDEF - 1)] = {
- .deleteFunc = CloseFont,
- .errorValue = BadFont,
+ /* [RT_FONT & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */CloseFont,
+ /*.errorValue = */BadFont,
},
- [RT_CURSOR & (RC_LASTPREDEF - 1)] = {
- .deleteFunc = FreeCursor,
- .errorValue = BadCursor,
+ /* [RT_CURSOR & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */FreeCursor,
+ /*.errorValue = */BadCursor,
},
- [RT_COLORMAP & (RC_LASTPREDEF - 1)] = {
- .deleteFunc = FreeColormap,
- .errorValue = BadColor,
+ /* [RT_COLORMAP & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */FreeColormap,
+ /*.errorValue = */BadColor,
},
- [RT_CMAPENTRY & (RC_LASTPREDEF - 1)] = {
- .deleteFunc = FreeClientPixels,
- .errorValue = BadColor,
+ /* [RT_CMAPENTRY & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */FreeClientPixels,
+ /*.errorValue = */BadColor,
},
- [RT_OTHERCLIENT & (RC_LASTPREDEF - 1)] = {
- .deleteFunc = OtherClientGone,
- .errorValue = BadValue,
+ /* [RT_OTHERCLIENT & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */OtherClientGone,
+ /*.errorValue = */BadValue,
},
- [RT_PASSIVEGRAB & (RC_LASTPREDEF - 1)] = {
- .deleteFunc = DeletePassiveGrab,
- .errorValue = BadValue,
+ /* [RT_PASSIVEGRAB & (RC_LASTPREDEF - 1)] = */ {
+ /*.deleteFunc = */DeletePassiveGrab,
+ /*.errorValue = */BadValue,
},
};
diff --git a/xorg-server/exa/exa.h b/xorg-server/exa/exa.h
index 6de63008e..b65118883 100644
--- a/xorg-server/exa/exa.h
+++ b/xorg-server/exa/exa.h
@@ -1,843 +1,843 @@
-/*
- *
- * Copyright (C) 2000 Keith Packard
- * 2004 Eric Anholt
- * 2005 Zack Rusin
- *
- * 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, and that the name of copyright holders not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Copyright holders make no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/** @file
- * This is the header containing the public API of EXA for exa drivers.
- */
-
-#ifndef EXA_H
-#define EXA_H
-
-#include "scrnintstr.h"
-#include "pixmapstr.h"
-#include "windowstr.h"
-#include "gcstruct.h"
-#include "picturestr.h"
-#include "fb.h"
-
-#define EXA_VERSION_MAJOR 2
-#define EXA_VERSION_MINOR 5
-#define EXA_VERSION_RELEASE 0
-
-typedef struct _ExaOffscreenArea ExaOffscreenArea;
-
-typedef void (*ExaOffscreenSaveProc) (ScreenPtr pScreen, ExaOffscreenArea *area);
-
-typedef enum _ExaOffscreenState {
- ExaOffscreenAvail,
- ExaOffscreenRemovable,
- ExaOffscreenLocked
-} ExaOffscreenState;
-
-struct _ExaOffscreenArea {
- int base_offset; /* allocation base */
- int offset; /* aligned offset */
- int size; /* total allocation size */
- unsigned last_use;
- pointer privData;
-
- ExaOffscreenSaveProc save;
-
- ExaOffscreenState state;
-
- ExaOffscreenArea *next;
-
- unsigned eviction_cost;
-
- ExaOffscreenArea *prev; /* Double-linked list for defragmentation */
- int align; /* required alignment */
-};
-
-/**
- * The ExaDriver structure is allocated through exaDriverAlloc(), and then
- * fllled in by drivers.
- */
-typedef struct _ExaDriver {
- /**
- * exa_major and exa_minor should be set by the driver to the version of
- * EXA which the driver was compiled for (or configures itself at runtime
- * to support). This allows EXA to extend the structure for new features
- * without breaking ABI for drivers compiled against older versions.
- */
- int exa_major, exa_minor;
-
- /**
- * memoryBase is the address of the beginning of framebuffer memory.
- * The visible screen should be within memoryBase to memoryBase +
- * memorySize.
- */
- CARD8 *memoryBase;
-
- /**
- * offScreenBase is the offset from memoryBase of the beginning of the area
- * to be managed by EXA's linear offscreen memory manager.
- *
- * In XFree86 DDX drivers, this is probably:
- * (pScrn->displayWidth * cpp * pScrn->virtualY)
- */
- unsigned long offScreenBase;
-
- /**
- * memorySize is the length (in bytes) of framebuffer memory beginning
- * from memoryBase.
- *
- * The offscreen memory manager will manage the area beginning at
- * (memoryBase + offScreenBase), with a length of (memorySize -
- * offScreenBase)
- *
- * In XFree86 DDX drivers, this is probably (pScrn->videoRam * 1024)
- */
- unsigned long memorySize;
-
- /**
- * pixmapOffsetAlign is the byte alignment necessary for pixmap offsets
- * within framebuffer.
- *
- * Hardware typically has a required alignment of offsets, which may or may
- * not be a power of two. EXA will ensure that pixmaps managed by the
- * offscreen memory manager meet this alignment requirement.
- */
- int pixmapOffsetAlign;
-
- /**
- * pixmapPitchAlign is the byte alignment necessary for pixmap pitches
- * within the framebuffer.
- *
- * Hardware typically has a required alignment of pitches for acceleration.
- * For 3D hardware, Composite acceleration often requires that source and
- * mask pixmaps (textures) have a power-of-two pitch, which can be demanded
- * using EXA_OFFSCREEN_ALIGN_POT. These pitch requirements only apply to
- * pixmaps managed by the offscreen memory manager. Thus, it is up to the
- * driver to ensure that the visible screen has an appropriate pitch for
- * acceleration.
- */
- int pixmapPitchAlign;
-
- /**
- * The flags field is bitfield of boolean values controlling EXA's behavior.
- *
- * The flags in clude EXA_OFFSCREEN_PIXMAPS, EXA_OFFSCREEN_ALIGN_POT, and
- * EXA_TWO_BITBLT_DIRECTIONS.
- */
- int flags;
-
- /** @{ */
- /**
- * maxX controls the X coordinate limitation for rendering from the card.
- * The driver should never receive a request for rendering beyond maxX
- * in the X direction from the origin of a pixmap.
- */
- int maxX;
-
- /**
- * maxY controls the Y coordinate limitation for rendering from the card.
- * The driver should never receive a request for rendering beyond maxY
- * in the Y direction from the origin of a pixmap.
- */
- int maxY;
- /** @} */
-
- /* private */
- ExaOffscreenArea *offScreenAreas;
- Bool needsSync;
- int lastMarker;
-
- /** @name Solid
- * @{
- */
- /**
- * PrepareSolid() sets up the driver for doing a solid fill.
- * @param pPixmap Destination pixmap
- * @param alu raster operation
- * @param planemask write mask for the fill
- * @param fg "foreground" color for the fill
- *
- * This call should set up the driver for doing a series of solid fills
- * through the Solid() call. The alu raster op is one of the GX*
- * graphics functions listed in X.h, and typically maps to a similar
- * single-byte "ROP" setting in all hardware. The planemask controls
- * which bits of the destination should be affected, and will only represent
- * the bits up to the depth of pPixmap. The fg is the pixel value of the
- * foreground color referred to in ROP descriptions.
- *
- * Note that many drivers will need to store some of the data in the driver
- * private record, for sending to the hardware with each drawing command.
- *
- * The PrepareSolid() call is required of all drivers, but it may fail for any
- * reason. Failure results in a fallback to software rendering.
- */
- Bool (*PrepareSolid) (PixmapPtr pPixmap,
- int alu,
- Pixel planemask,
- Pixel fg);
-
- /**
- * Solid() performs a solid fill set up in the last PrepareSolid() call.
- *
- * @param pPixmap destination pixmap
- * @param x1 left coordinate
- * @param y1 top coordinate
- * @param x2 right coordinate
- * @param y2 bottom coordinate
- *
- * Performs the fill set up by the last PrepareSolid() call, covering the
- * area from (x1,y1) to (x2,y2) in pPixmap. Note that the coordinates are
- * in the coordinate space of the destination pixmap, so the driver will
- * need to set up the hardware's offset and pitch for the destination
- * coordinates according to the pixmap's offset and pitch within
- * framebuffer. This likely means using exaGetPixmapOffset() and
- * exaGetPixmapPitch().
- *
- * This call is required if PrepareSolid() ever succeeds.
- */
- void (*Solid) (PixmapPtr pPixmap, int x1, int y1, int x2, int y2);
-
- /**
- * DoneSolid() finishes a set of solid fills.
- *
- * @param pPixmap destination pixmap.
- *
- * The DoneSolid() call is called at the end of a series of consecutive
- * Solid() calls following a successful PrepareSolid(). This allows drivers
- * to finish up emitting drawing commands that were buffered, or clean up
- * state from PrepareSolid().
- *
- * This call is required if PrepareSolid() ever succeeds.
- */
- void (*DoneSolid) (PixmapPtr pPixmap);
- /** @} */
-
- /** @name Copy
- * @{
- */
- /**
- * PrepareCopy() sets up the driver for doing a copy within video
- * memory.
- *
- * @param pSrcPixmap source pixmap
- * @param pDstPixmap destination pixmap
- * @param dx X copy direction
- * @param dy Y copy direction
- * @param alu raster operation
- * @param planemask write mask for the fill
- *
- * This call should set up the driver for doing a series of copies from the
- * the pSrcPixmap to the pDstPixmap. The dx flag will be positive if the
- * hardware should do the copy from the left to the right, and dy will be
- * positive if the copy should be done from the top to the bottom. This
- * is to deal with self-overlapping copies when pSrcPixmap == pDstPixmap.
- * If your hardware can only support blits that are (left to right, top to
- * bottom) or (right to left, bottom to top), then you should set
- * #EXA_TWO_BITBLT_DIRECTIONS, and EXA will break down Copy operations to
- * ones that meet those requirements. The alu raster op is one of the GX*
- * graphics functions listed in X.h, and typically maps to a similar
- * single-byte "ROP" setting in all hardware. The planemask controls which
- * bits of the destination should be affected, and will only represent the
- * bits up to the depth of pPixmap.
- *
- * Note that many drivers will need to store some of the data in the driver
- * private record, for sending to the hardware with each drawing command.
- *
- * The PrepareCopy() call is required of all drivers, but it may fail for any
- * reason. Failure results in a fallback to software rendering.
- */
- Bool (*PrepareCopy) (PixmapPtr pSrcPixmap,
- PixmapPtr pDstPixmap,
- int dx,
- int dy,
- int alu,
- Pixel planemask);
-
- /**
- * Copy() performs a copy set up in the last PrepareCopy call.
- *
- * @param pDstPixmap destination pixmap
- * @param srcX source X coordinate
- * @param srcY source Y coordinate
- * @param dstX destination X coordinate
- * @param dstY destination Y coordinate
- * @param width width of the rectangle to be copied
- * @param height height of the rectangle to be copied.
- *
- * Performs the copy set up by the last PrepareCopy() call, copying the
- * rectangle from (srcX, srcY) to (srcX + width, srcY + width) in the source
- * pixmap to the same-sized rectangle at (dstX, dstY) in the destination
- * pixmap. Those rectangles may overlap in memory, if
- * pSrcPixmap == pDstPixmap. Note that this call does not receive the
- * pSrcPixmap as an argument -- if it's needed in this function, it should
- * be stored in the driver private during PrepareCopy(). As with Solid(),
- * the coordinates are in the coordinate space of each pixmap, so the driver
- * will need to set up source and destination pitches and offsets from those
- * pixmaps, probably using exaGetPixmapOffset() and exaGetPixmapPitch().
- *
- * This call is required if PrepareCopy ever succeeds.
- */
- void (*Copy) (PixmapPtr pDstPixmap,
- int srcX,
- int srcY,
- int dstX,
- int dstY,
- int width,
- int height);
-
- /**
- * DoneCopy() finishes a set of copies.
- *
- * @param pPixmap destination pixmap.
- *
- * The DoneCopy() call is called at the end of a series of consecutive
- * Copy() calls following a successful PrepareCopy(). This allows drivers
- * to finish up emitting drawing commands that were buffered, or clean up
- * state from PrepareCopy().
- *
- * This call is required if PrepareCopy() ever succeeds.
- */
- void (*DoneCopy) (PixmapPtr pDstPixmap);
- /** @} */
-
- /** @name Composite
- * @{
- */
- /**
- * CheckComposite() checks to see if a composite operation could be
- * accelerated.
- *
- * @param op Render operation
- * @param pSrcPicture source Picture
- * @param pMaskPicture mask picture
- * @param pDstPicture destination Picture
- *
- * The CheckComposite() call checks if the driver could handle acceleration
- * of op with the given source, mask, and destination pictures. This allows
- * drivers to check source and destination formats, supported operations,
- * transformations, and component alpha state, and send operations it can't
- * support to software rendering early on. This avoids costly pixmap
- * migration to the wrong places when the driver can't accelerate
- * operations. Note that because migration hasn't happened, the driver
- * can't know during CheckComposite() what the offsets and pitches of the
- * pixmaps are going to be.
- *
- * See PrepareComposite() for more details on likely issues that drivers
- * will have in accelerating Composite operations.
- *
- * The CheckComposite() call is recommended if PrepareComposite() is
- * implemented, but is not required.
- */
- Bool (*CheckComposite) (int op,
- PicturePtr pSrcPicture,
- PicturePtr pMaskPicture,
- PicturePtr pDstPicture);
-
- /**
- * PrepareComposite() sets up the driver for doing a Composite operation
- * described in the Render extension protocol spec.
- *
- * @param op Render operation
- * @param pSrcPicture source Picture
- * @param pMaskPicture mask picture
- * @param pDstPicture destination Picture
- * @param pSrc source pixmap
- * @param pMask mask pixmap
- * @param pDst destination pixmap
- *
- * This call should set up the driver for doing a series of Composite
- * operations, as described in the Render protocol spec, with the given
- * pSrcPicture, pMaskPicture, and pDstPicture. The pSrc, pMask, and
- * pDst are the pixmaps containing the pixel data, and should be used for
- * setting the offset and pitch used for the coordinate spaces for each of
- * the Pictures.
- *
- * Notes on interpreting Picture structures:
- * - The Picture structures will always have a valid pDrawable.
- * - The Picture structures will never have alphaMap set.
- * - The mask Picture (and therefore pMask) may be NULL, in which case the
- * operation is simply src OP dst instead of src IN mask OP dst, and
- * mask coordinates should be ignored.
- * - pMarkPicture may have componentAlpha set, which greatly changes
- * the behavior of the Composite operation. componentAlpha has no effect
- * when set on pSrcPicture or pDstPicture.
- * - The source and mask Pictures may have a transformation set
- * (Picture->transform != NULL), which means that the source coordinates
- * should be transformed by that transformation, resulting in scaling,
- * rotation, etc. The PictureTransformPoint() call can transform
- * coordinates for you. Transforms have no effect on Pictures when used
- * as a destination.
- * - The source and mask pictures may have a filter set. PictFilterNearest
- * and PictFilterBilinear are defined in the Render protocol, but others
- * may be encountered, and must be handled correctly (usually by
- * PrepareComposite failing, and falling back to software). Filters have
- * no effect on Pictures when used as a destination.
- * - The source and mask Pictures may have repeating set, which must be
- * respected. Many chipsets will be unable to support repeating on
- * pixmaps that have a width or height that is not a power of two.
- *
- * If your hardware can't support source pictures (textures) with
- * non-power-of-two pitches, you should set #EXA_OFFSCREEN_ALIGN_POT.
- *
- * Note that many drivers will need to store some of the data in the driver
- * private record, for sending to the hardware with each drawing command.
- *
- * The PrepareComposite() call is not required. However, it is highly
- * recommended for performance of antialiased font rendering and performance
- * of cairo applications. Failure results in a fallback to software
- * rendering.
- */
- Bool (*PrepareComposite) (int op,
- PicturePtr pSrcPicture,
- PicturePtr pMaskPicture,
- PicturePtr pDstPicture,
- PixmapPtr pSrc,
- PixmapPtr pMask,
- PixmapPtr pDst);
-
- /**
- * Composite() performs a Composite operation set up in the last
- * PrepareComposite() call.
- *
- * @param pDstPixmap destination pixmap
- * @param srcX source X coordinate
- * @param srcY source Y coordinate
- * @param maskX source X coordinate
- * @param maskY source Y coordinate
- * @param dstX destination X coordinate
- * @param dstY destination Y coordinate
- * @param width destination rectangle width
- * @param height destination rectangle height
- *
- * Performs the Composite operation set up by the last PrepareComposite()
- * call, to the rectangle from (dstX, dstY) to (dstX + width, dstY + height)
- * in the destination Pixmap. Note that if a transformation was set on
- * the source or mask Pictures, the source rectangles may not be the same
- * size as the destination rectangles and filtering. Getting the coordinate
- * transformation right at the subpixel level can be tricky, and rendercheck
- * can test this for you.
- *
- * This call is required if PrepareComposite() ever succeeds.
- */
- void (*Composite) (PixmapPtr pDst,
- int srcX,
- int srcY,
- int maskX,
- int maskY,
- int dstX,
- int dstY,
- int width,
- int height);
-
- /**
- * DoneComposite() finishes a set of Composite operations.
- *
- * @param pPixmap destination pixmap.
- *
- * The DoneComposite() call is called at the end of a series of consecutive
- * Composite() calls following a successful PrepareComposite(). This allows
- * drivers to finish up emitting drawing commands that were buffered, or
- * clean up state from PrepareComposite().
- *
- * This call is required if PrepareComposite() ever succeeds.
- */
- void (*DoneComposite) (PixmapPtr pDst);
- /** @} */
-
- /**
- * UploadToScreen() loads a rectangle of data from src into pDst.
- *
- * @param pDst destination pixmap
- * @param x destination X coordinate.
- * @param y destination Y coordinate
- * @param width width of the rectangle to be copied
- * @param height height of the rectangle to be copied
- * @param src pointer to the beginning of the source data
- * @param src_pitch pitch (in bytes) of the lines of source data.
- *
- * UploadToScreen() copies data in system memory beginning at src (with
- * pitch src_pitch) into the destination pixmap from (x, y) to
- * (x + width, y + height). This is typically done with hostdata uploads,
- * where the CPU sets up a blit command on the hardware with instructions
- * that the blit data will be fed through some sort of aperture on the card.
- *
- * If UploadToScreen() is performed asynchronously, it is up to the driver
- * to call exaMarkSync(). This is in contrast to most other acceleration
- * calls in EXA.
- *
- * UploadToScreen() can aid in pixmap migration, but is most important for
- * the performance of exaGlyphs() (antialiased font drawing) by allowing
- * pipelining of data uploads, avoiding a sync of the card after each glyph.
- *
- * @return TRUE if the driver successfully uploaded the data. FALSE
- * indicates that EXA should fall back to doing the upload in software.
- *
- * UploadToScreen() is not required, but is recommended if Composite
- * acceleration is supported.
- */
- Bool (*UploadToScreen) (PixmapPtr pDst,
- int x,
- int y,
- int w,
- int h,
- char *src,
- int src_pitch);
-
- /**
- * UploadToScratch() is no longer used and will be removed next time the EXA
- * major version needs to be bumped.
- */
- Bool (*UploadToScratch) (PixmapPtr pSrc,
- PixmapPtr pDst);
-
- /**
- * DownloadFromScreen() loads a rectangle of data from pSrc into dst
- *
- * @param pSrc source pixmap
- * @param x source X coordinate.
- * @param y source Y coordinate
- * @param width width of the rectangle to be copied
- * @param height height of the rectangle to be copied
- * @param dst pointer to the beginning of the destination data
- * @param dst_pitch pitch (in bytes) of the lines of destination data.
- *
- * DownloadFromScreen() copies data from offscreen memory in pSrc from
- * (x, y) to (x + width, y + height), to system memory starting at
- * dst (with pitch dst_pitch). This would usually be done
- * using scatter-gather DMA, supported by a DRM call, or by blitting to AGP
- * and then synchronously reading from AGP. Because the implementation
- * might be synchronous, EXA leaves it up to the driver to call
- * exaMarkSync() if DownloadFromScreen() was asynchronous. This is in
- * contrast to most other acceleration calls in EXA.
- *
- * DownloadFromScreen() can aid in the largest bottleneck in pixmap
- * migration, which is the read from framebuffer when evicting pixmaps from
- * framebuffer memory. Thus, it is highly recommended, even though
- * implementations are typically complicated.
- *
- * @return TRUE if the driver successfully downloaded the data. FALSE
- * indicates that EXA should fall back to doing the download in software.
- *
- * DownloadFromScreen() is not required, but is highly recommended.
- */
- Bool (*DownloadFromScreen)(PixmapPtr pSrc,
- int x, int y,
- int w, int h,
- char *dst, int dst_pitch);
-
- /**
- * MarkSync() requests that the driver mark a synchronization point,
- * returning an driver-defined integer marker which could be requested for
- * synchronization to later in WaitMarker(). This might be used in the
- * future to avoid waiting for full hardware stalls before accessing pixmap
- * data with the CPU, but is not important in the current incarnation of
- * EXA.
- *
- * Note that drivers should call exaMarkSync() when they have done some
- * acceleration, rather than their own MarkSync() handler, as otherwise EXA
- * will be unaware of the driver's acceleration and not sync to it during
- * fallbacks.
- *
- * MarkSync() is optional.
- */
- int (*MarkSync) (ScreenPtr pScreen);
-
- /**
- * WaitMarker() waits for all rendering before the given marker to have
- * completed. If the driver does not implement MarkSync(), marker is
- * meaningless, and all rendering by the hardware should be completed before
- * WaitMarker() returns.
- *
- * Note that drivers should call exaWaitSync() to wait for all acceleration
- * to finish, as otherwise EXA will be unaware of the driver having
- * synchronized, resulting in excessive WaitMarker() calls.
- *
- * WaitMarker() is required of all drivers.
- */
- void (*WaitMarker) (ScreenPtr pScreen, int marker);
-
- /** @{ */
- /**
- * PrepareAccess() is called before CPU access to an offscreen pixmap.
- *
- * @param pPix the pixmap being accessed
- * @param index the index of the pixmap being accessed.
- *
- * PrepareAccess() will be called before CPU access to an offscreen pixmap.
- * This can be used to set up hardware surfaces for byteswapping or
- * untiling, or to adjust the pixmap's devPrivate.ptr for the purpose of
- * making CPU access use a different aperture.
- *
- * The index is one of #EXA_PREPARE_DEST, #EXA_PREPARE_SRC,
- * #EXA_PREPARE_MASK, #EXA_PREPARE_AUX_DEST, #EXA_PREPARE_AUX_SRC, or
- * #EXA_PREPARE_AUX_MASK. Since only up to #EXA_NUM_PREPARE_INDICES pixmaps
- * will have PrepareAccess() called on them per operation, drivers can have
- * a small, statically-allocated space to maintain state for PrepareAccess()
- * and FinishAccess() in. Note that PrepareAccess() is only called once per
- * pixmap and operation, regardless of whether the pixmap is used as a
- * destination and/or source, and the index may not reflect the usage.
- *
- * PrepareAccess() may fail. An example might be the case of hardware that
- * can set up 1 or 2 surfaces for CPU access, but not 3. If PrepareAccess()
- * fails, EXA will migrate the pixmap to system memory.
- * DownloadFromScreen() must be implemented and must not fail if a driver
- * wishes to fail in PrepareAccess(). PrepareAccess() must not fail when
- * pPix is the visible screen, because the visible screen can not be
- * migrated.
- *
- * @return TRUE if PrepareAccess() successfully prepared the pixmap for CPU
- * drawing.
- * @return FALSE if PrepareAccess() is unsuccessful and EXA should use
- * DownloadFromScreen() to migate the pixmap out.
- */
- Bool (*PrepareAccess)(PixmapPtr pPix, int index);
-
- /**
- * FinishAccess() is called after CPU access to an offscreen pixmap.
- *
- * @param pPix the pixmap being accessed
- * @param index the index of the pixmap being accessed.
- *
- * FinishAccess() will be called after finishing CPU access of an offscreen
- * pixmap set up by PrepareAccess(). Note that the FinishAccess() will not be
- * called if PrepareAccess() failed and the pixmap was migrated out.
- */
- void (*FinishAccess)(PixmapPtr pPix, int index);
-
- /**
- * PixmapIsOffscreen() is an optional driver replacement to
- * exaPixmapHasGpuCopy(). Set to NULL if you want the standard behaviour
- * of exaPixmapHasGpuCopy().
- *
- * @param pPix the pixmap
- * @return TRUE if the given drawable is in framebuffer memory.
- *
- * exaPixmapHasGpuCopy() is used to determine if a pixmap is in offscreen
- * memory, meaning that acceleration could probably be done to it, and that it
- * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it
- * with the CPU.
- *
- *
- */
- Bool (*PixmapIsOffscreen)(PixmapPtr pPix);
-
- /** @name PrepareAccess() and FinishAccess() indices
- * @{
- */
- /**
- * EXA_PREPARE_DEST is the index for a pixmap that may be drawn to or
- * read from.
- */
- #define EXA_PREPARE_DEST 0
- /**
- * EXA_PREPARE_SRC is the index for a pixmap that may be read from
- */
- #define EXA_PREPARE_SRC 1
- /**
- * EXA_PREPARE_SRC is the index for a second pixmap that may be read
- * from.
- */
- #define EXA_PREPARE_MASK 2
- /**
- * EXA_PREPARE_AUX* are additional indices for other purposes, e.g.
- * separate alpha maps with Composite operations.
- */
- #define EXA_PREPARE_AUX_DEST 3
- #define EXA_PREPARE_AUX_SRC 4
- #define EXA_PREPARE_AUX_MASK 5
- #define EXA_NUM_PREPARE_INDICES 6
- /** @} */
-
- /**
- * maxPitchPixels controls the pitch limitation for rendering from
- * the card.
- * The driver should never receive a request for rendering a pixmap
- * that has a pitch (in pixels) beyond maxPitchPixels.
- *
- * Setting this field is optional -- if your hardware doesn't have
- * a pitch limitation in pixels, don't set this. If neither this value
- * nor maxPitchBytes is set, then maxPitchPixels is set to maxX.
- * If set, it must not be smaller than maxX.
- *
- * @sa maxPitchBytes
- */
- int maxPitchPixels;
-
- /**
- * maxPitchBytes controls the pitch limitation for rendering from
- * the card.
- * The driver should never receive a request for rendering a pixmap
- * that has a pitch (in bytes) beyond maxPitchBytes.
- *
- * Setting this field is optional -- if your hardware doesn't have
- * a pitch limitation in bytes, don't set this.
- * If set, it must not be smaller than maxX * 4.
- * There's no default value for maxPitchBytes.
- *
- * @sa maxPitchPixels
- */
- int maxPitchBytes;
-
- /* Hooks to allow driver to its own pixmap memory management */
- void *(*CreatePixmap)(ScreenPtr pScreen, int size, int align);
- void (*DestroyPixmap)(ScreenPtr pScreen, void *driverPriv);
- /**
- * Returning a pixmap with non-NULL devPrivate.ptr implies a pixmap which is
- * not offscreen, which will never be accelerated and Prepare/FinishAccess won't
- * be called.
- */
- Bool (*ModifyPixmapHeader)(PixmapPtr pPixmap, int width, int height,
- int depth, int bitsPerPixel, int devKind,
- pointer pPixData);
-
- /* hooks for drivers with tiling support:
- * driver MUST fill out new_fb_pitch with valid pitch of pixmap
- */
- void *(*CreatePixmap2)(ScreenPtr pScreen, int width, int height,
- int depth, int class, int bitsPerPixel,
- int *new_fb_pitch);
- /** @} */
-} ExaDriverRec, *ExaDriverPtr;
-
-/** @name EXA driver flags
- * @{
- */
-/**
- * EXA_OFFSCREEN_PIXMAPS indicates to EXA that the driver can support
- * offscreen pixmaps.
- */
-#define EXA_OFFSCREEN_PIXMAPS (1 << 0)
-
-/**
- * EXA_OFFSCREEN_ALIGN_POT indicates to EXA that the driver needs pixmaps
- * to have a power-of-two pitch.
- */
-#define EXA_OFFSCREEN_ALIGN_POT (1 << 1)
-
-/**
- * EXA_TWO_BITBLT_DIRECTIONS indicates to EXA that the driver can only
- * support copies that are (left-to-right, top-to-bottom) or
- * (right-to-left, bottom-to-top).
- */
-#define EXA_TWO_BITBLT_DIRECTIONS (1 << 2)
-
-/**
- * EXA_HANDLES_PIXMAPS indicates to EXA that the driver can handle
- * all pixmap addressing and migration.
- */
-#define EXA_HANDLES_PIXMAPS (1 << 3)
-
-/**
- * EXA_SUPPORTS_PREPARE_AUX indicates to EXA that the driver can handle the
- * EXA_PREPARE_AUX* indices in the Prepare/FinishAccess hooks. If there are no
- * such hooks, this flag has no effect.
- */
-#define EXA_SUPPORTS_PREPARE_AUX (1 << 4)
-
-/**
- * EXA_SUPPORTS_OFFSCREEN_OVERLAPS indicates to EXA that the driver Copy hooks
- * can handle the source and destination occupying overlapping offscreen memory
- * areas. This allows the offscreen memory defragmentation code to defragment
- * areas where the defragmented position overlaps the fragmented position.
- *
- * Typically this is supported by traditional 2D engines but not by 3D engines.
- */
-#define EXA_SUPPORTS_OFFSCREEN_OVERLAPS (1 << 5)
-
-/**
- * EXA_MIXED_PIXMAPS will hide unacceleratable pixmaps from drivers and manage the
- * problem known software fallbacks like trapezoids. This only migrates pixmaps one way
- * into a driver pixmap and then pins it.
- */
-#define EXA_MIXED_PIXMAPS (1 << 6)
-
-/** @} */
-
-/* in exa.c */
-extern _X_EXPORT ExaDriverPtr
-exaDriverAlloc(void);
-
-extern _X_EXPORT Bool
-exaDriverInit(ScreenPtr pScreen,
- ExaDriverPtr pScreenInfo);
-
-extern _X_EXPORT void
-exaDriverFini(ScreenPtr pScreen);
-
-extern _X_EXPORT void
-exaMarkSync(ScreenPtr pScreen);
-extern _X_EXPORT void
-exaWaitSync(ScreenPtr pScreen);
-
-extern _X_EXPORT unsigned long
-exaGetPixmapOffset(PixmapPtr pPix);
-
-extern _X_EXPORT unsigned long
-exaGetPixmapPitch(PixmapPtr pPix);
-
-extern _X_EXPORT unsigned long
-exaGetPixmapSize(PixmapPtr pPix);
-
-extern _X_EXPORT void *
-exaGetPixmapDriverPrivate(PixmapPtr p);
-
-
-/* in exa_offscreen.c */
-extern _X_EXPORT ExaOffscreenArea *
-exaOffscreenAlloc(ScreenPtr pScreen, int size, int align,
- Bool locked,
- ExaOffscreenSaveProc save,
- pointer privData);
-
-extern _X_EXPORT ExaOffscreenArea *
-exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea *area);
-
-extern _X_EXPORT void
-ExaOffscreenMarkUsed (PixmapPtr pPixmap);
-
-extern _X_EXPORT void
-exaEnableDisableFBAccess (int index, Bool enable);
-
-extern _X_EXPORT Bool
-exaDrawableIsOffscreen (DrawablePtr pDrawable);
-
-/* in exa.c */
-extern _X_EXPORT void
-exaMoveInPixmap (PixmapPtr pPixmap);
-
-extern _X_EXPORT void
-exaMoveOutPixmap (PixmapPtr pPixmap);
-
-
-/* in exa_unaccel.c */
-extern _X_EXPORT CARD32
-exaGetPixmapFirstPixel (PixmapPtr pPixmap);
-
-
-/**
- * Returns TRUE if the given planemask covers all the significant bits in the
- * pixel values for pDrawable.
- */
-#define EXA_PM_IS_SOLID(_pDrawable, _pm) \
- (((_pm) & FbFullMask((_pDrawable)->depth)) == \
- FbFullMask((_pDrawable)->depth))
-
-#endif /* EXA_H */
+/*
+ *
+ * Copyright (C) 2000 Keith Packard
+ * 2004 Eric Anholt
+ * 2005 Zack Rusin
+ *
+ * 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, and that the name of copyright holders not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Copyright holders make no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+/** @file
+ * This is the header containing the public API of EXA for exa drivers.
+ */
+
+#ifndef EXA_H
+#define EXA_H
+
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "windowstr.h"
+#include "gcstruct.h"
+#include "picturestr.h"
+#include "fb.h"
+
+#define EXA_VERSION_MAJOR 2
+#define EXA_VERSION_MINOR 5
+#define EXA_VERSION_RELEASE 0
+
+typedef struct _ExaOffscreenArea ExaOffscreenArea;
+
+typedef void (*ExaOffscreenSaveProc) (ScreenPtr pScreen, ExaOffscreenArea *area);
+
+typedef enum _ExaOffscreenState {
+ ExaOffscreenAvail,
+ ExaOffscreenRemovable,
+ ExaOffscreenLocked
+} ExaOffscreenState;
+
+struct _ExaOffscreenArea {
+ int base_offset; /* allocation base */
+ int offset; /* aligned offset */
+ int size; /* total allocation size */
+ unsigned last_use;
+ pointer privData;
+
+ ExaOffscreenSaveProc save;
+
+ ExaOffscreenState state;
+
+ ExaOffscreenArea *next;
+
+ unsigned eviction_cost;
+
+ ExaOffscreenArea *prev; /* Double-linked list for defragmentation */
+ int align; /* required alignment */
+};
+
+/**
+ * The ExaDriver structure is allocated through exaDriverAlloc(), and then
+ * fllled in by drivers.
+ */
+typedef struct _ExaDriver {
+ /**
+ * exa_major and exa_minor should be set by the driver to the version of
+ * EXA which the driver was compiled for (or configures itself at runtime
+ * to support). This allows EXA to extend the structure for new features
+ * without breaking ABI for drivers compiled against older versions.
+ */
+ int exa_major, exa_minor;
+
+ /**
+ * memoryBase is the address of the beginning of framebuffer memory.
+ * The visible screen should be within memoryBase to memoryBase +
+ * memorySize.
+ */
+ CARD8 *memoryBase;
+
+ /**
+ * offScreenBase is the offset from memoryBase of the beginning of the area
+ * to be managed by EXA's linear offscreen memory manager.
+ *
+ * In XFree86 DDX drivers, this is probably:
+ * (pScrn->displayWidth * cpp * pScrn->virtualY)
+ */
+ unsigned long offScreenBase;
+
+ /**
+ * memorySize is the length (in bytes) of framebuffer memory beginning
+ * from memoryBase.
+ *
+ * The offscreen memory manager will manage the area beginning at
+ * (memoryBase + offScreenBase), with a length of (memorySize -
+ * offScreenBase)
+ *
+ * In XFree86 DDX drivers, this is probably (pScrn->videoRam * 1024)
+ */
+ unsigned long memorySize;
+
+ /**
+ * pixmapOffsetAlign is the byte alignment necessary for pixmap offsets
+ * within framebuffer.
+ *
+ * Hardware typically has a required alignment of offsets, which may or may
+ * not be a power of two. EXA will ensure that pixmaps managed by the
+ * offscreen memory manager meet this alignment requirement.
+ */
+ int pixmapOffsetAlign;
+
+ /**
+ * pixmapPitchAlign is the byte alignment necessary for pixmap pitches
+ * within the framebuffer.
+ *
+ * Hardware typically has a required alignment of pitches for acceleration.
+ * For 3D hardware, Composite acceleration often requires that source and
+ * mask pixmaps (textures) have a power-of-two pitch, which can be demanded
+ * using EXA_OFFSCREEN_ALIGN_POT. These pitch requirements only apply to
+ * pixmaps managed by the offscreen memory manager. Thus, it is up to the
+ * driver to ensure that the visible screen has an appropriate pitch for
+ * acceleration.
+ */
+ int pixmapPitchAlign;
+
+ /**
+ * The flags field is bitfield of boolean values controlling EXA's behavior.
+ *
+ * The flags in clude EXA_OFFSCREEN_PIXMAPS, EXA_OFFSCREEN_ALIGN_POT, and
+ * EXA_TWO_BITBLT_DIRECTIONS.
+ */
+ int flags;
+
+ /** @{ */
+ /**
+ * maxX controls the X coordinate limitation for rendering from the card.
+ * The driver should never receive a request for rendering beyond maxX
+ * in the X direction from the origin of a pixmap.
+ */
+ int maxX;
+
+ /**
+ * maxY controls the Y coordinate limitation for rendering from the card.
+ * The driver should never receive a request for rendering beyond maxY
+ * in the Y direction from the origin of a pixmap.
+ */
+ int maxY;
+ /** @} */
+
+ /* private */
+ ExaOffscreenArea *offScreenAreas;
+ Bool needsSync;
+ int lastMarker;
+
+ /** @name Solid
+ * @{
+ */
+ /**
+ * PrepareSolid() sets up the driver for doing a solid fill.
+ * @param pPixmap Destination pixmap
+ * @param alu raster operation
+ * @param planemask write mask for the fill
+ * @param fg "foreground" color for the fill
+ *
+ * This call should set up the driver for doing a series of solid fills
+ * through the Solid() call. The alu raster op is one of the GX*
+ * graphics functions listed in X.h, and typically maps to a similar
+ * single-byte "ROP" setting in all hardware. The planemask controls
+ * which bits of the destination should be affected, and will only represent
+ * the bits up to the depth of pPixmap. The fg is the pixel value of the
+ * foreground color referred to in ROP descriptions.
+ *
+ * Note that many drivers will need to store some of the data in the driver
+ * private record, for sending to the hardware with each drawing command.
+ *
+ * The PrepareSolid() call is required of all drivers, but it may fail for any
+ * reason. Failure results in a fallback to software rendering.
+ */
+ Bool (*PrepareSolid) (PixmapPtr pPixmap,
+ int alu,
+ Pixel planemask,
+ Pixel fg);
+
+ /**
+ * Solid() performs a solid fill set up in the last PrepareSolid() call.
+ *
+ * @param pPixmap destination pixmap
+ * @param x1 left coordinate
+ * @param y1 top coordinate
+ * @param x2 right coordinate
+ * @param y2 bottom coordinate
+ *
+ * Performs the fill set up by the last PrepareSolid() call, covering the
+ * area from (x1,y1) to (x2,y2) in pPixmap. Note that the coordinates are
+ * in the coordinate space of the destination pixmap, so the driver will
+ * need to set up the hardware's offset and pitch for the destination
+ * coordinates according to the pixmap's offset and pitch within
+ * framebuffer. This likely means using exaGetPixmapOffset() and
+ * exaGetPixmapPitch().
+ *
+ * This call is required if PrepareSolid() ever succeeds.
+ */
+ void (*Solid) (PixmapPtr pPixmap, int x1, int y1, int x2, int y2);
+
+ /**
+ * DoneSolid() finishes a set of solid fills.
+ *
+ * @param pPixmap destination pixmap.
+ *
+ * The DoneSolid() call is called at the end of a series of consecutive
+ * Solid() calls following a successful PrepareSolid(). This allows drivers
+ * to finish up emitting drawing commands that were buffered, or clean up
+ * state from PrepareSolid().
+ *
+ * This call is required if PrepareSolid() ever succeeds.
+ */
+ void (*DoneSolid) (PixmapPtr pPixmap);
+ /** @} */
+
+ /** @name Copy
+ * @{
+ */
+ /**
+ * PrepareCopy() sets up the driver for doing a copy within video
+ * memory.
+ *
+ * @param pSrcPixmap source pixmap
+ * @param pDstPixmap destination pixmap
+ * @param dx X copy direction
+ * @param dy Y copy direction
+ * @param alu raster operation
+ * @param planemask write mask for the fill
+ *
+ * This call should set up the driver for doing a series of copies from the
+ * the pSrcPixmap to the pDstPixmap. The dx flag will be positive if the
+ * hardware should do the copy from the left to the right, and dy will be
+ * positive if the copy should be done from the top to the bottom. This
+ * is to deal with self-overlapping copies when pSrcPixmap == pDstPixmap.
+ * If your hardware can only support blits that are (left to right, top to
+ * bottom) or (right to left, bottom to top), then you should set
+ * #EXA_TWO_BITBLT_DIRECTIONS, and EXA will break down Copy operations to
+ * ones that meet those requirements. The alu raster op is one of the GX*
+ * graphics functions listed in X.h, and typically maps to a similar
+ * single-byte "ROP" setting in all hardware. The planemask controls which
+ * bits of the destination should be affected, and will only represent the
+ * bits up to the depth of pPixmap.
+ *
+ * Note that many drivers will need to store some of the data in the driver
+ * private record, for sending to the hardware with each drawing command.
+ *
+ * The PrepareCopy() call is required of all drivers, but it may fail for any
+ * reason. Failure results in a fallback to software rendering.
+ */
+ Bool (*PrepareCopy) (PixmapPtr pSrcPixmap,
+ PixmapPtr pDstPixmap,
+ int dx,
+ int dy,
+ int alu,
+ Pixel planemask);
+
+ /**
+ * Copy() performs a copy set up in the last PrepareCopy call.
+ *
+ * @param pDstPixmap destination pixmap
+ * @param srcX source X coordinate
+ * @param srcY source Y coordinate
+ * @param dstX destination X coordinate
+ * @param dstY destination Y coordinate
+ * @param width width of the rectangle to be copied
+ * @param height height of the rectangle to be copied.
+ *
+ * Performs the copy set up by the last PrepareCopy() call, copying the
+ * rectangle from (srcX, srcY) to (srcX + width, srcY + width) in the source
+ * pixmap to the same-sized rectangle at (dstX, dstY) in the destination
+ * pixmap. Those rectangles may overlap in memory, if
+ * pSrcPixmap == pDstPixmap. Note that this call does not receive the
+ * pSrcPixmap as an argument -- if it's needed in this function, it should
+ * be stored in the driver private during PrepareCopy(). As with Solid(),
+ * the coordinates are in the coordinate space of each pixmap, so the driver
+ * will need to set up source and destination pitches and offsets from those
+ * pixmaps, probably using exaGetPixmapOffset() and exaGetPixmapPitch().
+ *
+ * This call is required if PrepareCopy ever succeeds.
+ */
+ void (*Copy) (PixmapPtr pDstPixmap,
+ int srcX,
+ int srcY,
+ int dstX,
+ int dstY,
+ int width,
+ int height);
+
+ /**
+ * DoneCopy() finishes a set of copies.
+ *
+ * @param pPixmap destination pixmap.
+ *
+ * The DoneCopy() call is called at the end of a series of consecutive
+ * Copy() calls following a successful PrepareCopy(). This allows drivers
+ * to finish up emitting drawing commands that were buffered, or clean up
+ * state from PrepareCopy().
+ *
+ * This call is required if PrepareCopy() ever succeeds.
+ */
+ void (*DoneCopy) (PixmapPtr pDstPixmap);
+ /** @} */
+
+ /** @name Composite
+ * @{
+ */
+ /**
+ * CheckComposite() checks to see if a composite operation could be
+ * accelerated.
+ *
+ * @param op Render operation
+ * @param pSrcPicture source Picture
+ * @param pMaskPicture mask picture
+ * @param pDstPicture destination Picture
+ *
+ * The CheckComposite() call checks if the driver could handle acceleration
+ * of op with the given source, mask, and destination pictures. This allows
+ * drivers to check source and destination formats, supported operations,
+ * transformations, and component alpha state, and send operations it can't
+ * support to software rendering early on. This avoids costly pixmap
+ * migration to the wrong places when the driver can't accelerate
+ * operations. Note that because migration hasn't happened, the driver
+ * can't know during CheckComposite() what the offsets and pitches of the
+ * pixmaps are going to be.
+ *
+ * See PrepareComposite() for more details on likely issues that drivers
+ * will have in accelerating Composite operations.
+ *
+ * The CheckComposite() call is recommended if PrepareComposite() is
+ * implemented, but is not required.
+ */
+ Bool (*CheckComposite) (int op,
+ PicturePtr pSrcPicture,
+ PicturePtr pMaskPicture,
+ PicturePtr pDstPicture);
+
+ /**
+ * PrepareComposite() sets up the driver for doing a Composite operation
+ * described in the Render extension protocol spec.
+ *
+ * @param op Render operation
+ * @param pSrcPicture source Picture
+ * @param pMaskPicture mask picture
+ * @param pDstPicture destination Picture
+ * @param pSrc source pixmap
+ * @param pMask mask pixmap
+ * @param pDst destination pixmap
+ *
+ * This call should set up the driver for doing a series of Composite
+ * operations, as described in the Render protocol spec, with the given
+ * pSrcPicture, pMaskPicture, and pDstPicture. The pSrc, pMask, and
+ * pDst are the pixmaps containing the pixel data, and should be used for
+ * setting the offset and pitch used for the coordinate spaces for each of
+ * the Pictures.
+ *
+ * Notes on interpreting Picture structures:
+ * - The Picture structures will always have a valid pDrawable.
+ * - The Picture structures will never have alphaMap set.
+ * - The mask Picture (and therefore pMask) may be NULL, in which case the
+ * operation is simply src OP dst instead of src IN mask OP dst, and
+ * mask coordinates should be ignored.
+ * - pMarkPicture may have componentAlpha set, which greatly changes
+ * the behavior of the Composite operation. componentAlpha has no effect
+ * when set on pSrcPicture or pDstPicture.
+ * - The source and mask Pictures may have a transformation set
+ * (Picture->transform != NULL), which means that the source coordinates
+ * should be transformed by that transformation, resulting in scaling,
+ * rotation, etc. The PictureTransformPoint() call can transform
+ * coordinates for you. Transforms have no effect on Pictures when used
+ * as a destination.
+ * - The source and mask pictures may have a filter set. PictFilterNearest
+ * and PictFilterBilinear are defined in the Render protocol, but others
+ * may be encountered, and must be handled correctly (usually by
+ * PrepareComposite failing, and falling back to software). Filters have
+ * no effect on Pictures when used as a destination.
+ * - The source and mask Pictures may have repeating set, which must be
+ * respected. Many chipsets will be unable to support repeating on
+ * pixmaps that have a width or height that is not a power of two.
+ *
+ * If your hardware can't support source pictures (textures) with
+ * non-power-of-two pitches, you should set #EXA_OFFSCREEN_ALIGN_POT.
+ *
+ * Note that many drivers will need to store some of the data in the driver
+ * private record, for sending to the hardware with each drawing command.
+ *
+ * The PrepareComposite() call is not required. However, it is highly
+ * recommended for performance of antialiased font rendering and performance
+ * of cairo applications. Failure results in a fallback to software
+ * rendering.
+ */
+ Bool (*PrepareComposite) (int op,
+ PicturePtr pSrcPicture,
+ PicturePtr pMaskPicture,
+ PicturePtr pDstPicture,
+ PixmapPtr pSrc,
+ PixmapPtr pMask,
+ PixmapPtr pDst);
+
+ /**
+ * Composite() performs a Composite operation set up in the last
+ * PrepareComposite() call.
+ *
+ * @param pDstPixmap destination pixmap
+ * @param srcX source X coordinate
+ * @param srcY source Y coordinate
+ * @param maskX source X coordinate
+ * @param maskY source Y coordinate
+ * @param dstX destination X coordinate
+ * @param dstY destination Y coordinate
+ * @param width destination rectangle width
+ * @param height destination rectangle height
+ *
+ * Performs the Composite operation set up by the last PrepareComposite()
+ * call, to the rectangle from (dstX, dstY) to (dstX + width, dstY + height)
+ * in the destination Pixmap. Note that if a transformation was set on
+ * the source or mask Pictures, the source rectangles may not be the same
+ * size as the destination rectangles and filtering. Getting the coordinate
+ * transformation right at the subpixel level can be tricky, and rendercheck
+ * can test this for you.
+ *
+ * This call is required if PrepareComposite() ever succeeds.
+ */
+ void (*Composite) (PixmapPtr pDst,
+ int srcX,
+ int srcY,
+ int maskX,
+ int maskY,
+ int dstX,
+ int dstY,
+ int width,
+ int height);
+
+ /**
+ * DoneComposite() finishes a set of Composite operations.
+ *
+ * @param pPixmap destination pixmap.
+ *
+ * The DoneComposite() call is called at the end of a series of consecutive
+ * Composite() calls following a successful PrepareComposite(). This allows
+ * drivers to finish up emitting drawing commands that were buffered, or
+ * clean up state from PrepareComposite().
+ *
+ * This call is required if PrepareComposite() ever succeeds.
+ */
+ void (*DoneComposite) (PixmapPtr pDst);
+ /** @} */
+
+ /**
+ * UploadToScreen() loads a rectangle of data from src into pDst.
+ *
+ * @param pDst destination pixmap
+ * @param x destination X coordinate.
+ * @param y destination Y coordinate
+ * @param width width of the rectangle to be copied
+ * @param height height of the rectangle to be copied
+ * @param src pointer to the beginning of the source data
+ * @param src_pitch pitch (in bytes) of the lines of source data.
+ *
+ * UploadToScreen() copies data in system memory beginning at src (with
+ * pitch src_pitch) into the destination pixmap from (x, y) to
+ * (x + width, y + height). This is typically done with hostdata uploads,
+ * where the CPU sets up a blit command on the hardware with instructions
+ * that the blit data will be fed through some sort of aperture on the card.
+ *
+ * If UploadToScreen() is performed asynchronously, it is up to the driver
+ * to call exaMarkSync(). This is in contrast to most other acceleration
+ * calls in EXA.
+ *
+ * UploadToScreen() can aid in pixmap migration, but is most important for
+ * the performance of exaGlyphs() (antialiased font drawing) by allowing
+ * pipelining of data uploads, avoiding a sync of the card after each glyph.
+ *
+ * @return TRUE if the driver successfully uploaded the data. FALSE
+ * indicates that EXA should fall back to doing the upload in software.
+ *
+ * UploadToScreen() is not required, but is recommended if Composite
+ * acceleration is supported.
+ */
+ Bool (*UploadToScreen) (PixmapPtr pDst,
+ int x,
+ int y,
+ int w,
+ int h,
+ char *src,
+ int src_pitch);
+
+ /**
+ * UploadToScratch() is no longer used and will be removed next time the EXA
+ * major version needs to be bumped.
+ */
+ Bool (*UploadToScratch) (PixmapPtr pSrc,
+ PixmapPtr pDst);
+
+ /**
+ * DownloadFromScreen() loads a rectangle of data from pSrc into dst
+ *
+ * @param pSrc source pixmap
+ * @param x source X coordinate.
+ * @param y source Y coordinate
+ * @param width width of the rectangle to be copied
+ * @param height height of the rectangle to be copied
+ * @param dst pointer to the beginning of the destination data
+ * @param dst_pitch pitch (in bytes) of the lines of destination data.
+ *
+ * DownloadFromScreen() copies data from offscreen memory in pSrc from
+ * (x, y) to (x + width, y + height), to system memory starting at
+ * dst (with pitch dst_pitch). This would usually be done
+ * using scatter-gather DMA, supported by a DRM call, or by blitting to AGP
+ * and then synchronously reading from AGP. Because the implementation
+ * might be synchronous, EXA leaves it up to the driver to call
+ * exaMarkSync() if DownloadFromScreen() was asynchronous. This is in
+ * contrast to most other acceleration calls in EXA.
+ *
+ * DownloadFromScreen() can aid in the largest bottleneck in pixmap
+ * migration, which is the read from framebuffer when evicting pixmaps from
+ * framebuffer memory. Thus, it is highly recommended, even though
+ * implementations are typically complicated.
+ *
+ * @return TRUE if the driver successfully downloaded the data. FALSE
+ * indicates that EXA should fall back to doing the download in software.
+ *
+ * DownloadFromScreen() is not required, but is highly recommended.
+ */
+ Bool (*DownloadFromScreen)(PixmapPtr pSrc,
+ int x, int y,
+ int w, int h,
+ char *dst, int dst_pitch);
+
+ /**
+ * MarkSync() requests that the driver mark a synchronization point,
+ * returning an driver-defined integer marker which could be requested for
+ * synchronization to later in WaitMarker(). This might be used in the
+ * future to avoid waiting for full hardware stalls before accessing pixmap
+ * data with the CPU, but is not important in the current incarnation of
+ * EXA.
+ *
+ * Note that drivers should call exaMarkSync() when they have done some
+ * acceleration, rather than their own MarkSync() handler, as otherwise EXA
+ * will be unaware of the driver's acceleration and not sync to it during
+ * fallbacks.
+ *
+ * MarkSync() is optional.
+ */
+ int (*MarkSync) (ScreenPtr pScreen);
+
+ /**
+ * WaitMarker() waits for all rendering before the given marker to have
+ * completed. If the driver does not implement MarkSync(), marker is
+ * meaningless, and all rendering by the hardware should be completed before
+ * WaitMarker() returns.
+ *
+ * Note that drivers should call exaWaitSync() to wait for all acceleration
+ * to finish, as otherwise EXA will be unaware of the driver having
+ * synchronized, resulting in excessive WaitMarker() calls.
+ *
+ * WaitMarker() is required of all drivers.
+ */
+ void (*WaitMarker) (ScreenPtr pScreen, int marker);
+
+ /** @{ */
+ /**
+ * PrepareAccess() is called before CPU access to an offscreen pixmap.
+ *
+ * @param pPix the pixmap being accessed
+ * @param index the index of the pixmap being accessed.
+ *
+ * PrepareAccess() will be called before CPU access to an offscreen pixmap.
+ * This can be used to set up hardware surfaces for byteswapping or
+ * untiling, or to adjust the pixmap's devPrivate.ptr for the purpose of
+ * making CPU access use a different aperture.
+ *
+ * The index is one of #EXA_PREPARE_DEST, #EXA_PREPARE_SRC,
+ * #EXA_PREPARE_MASK, #EXA_PREPARE_AUX_DEST, #EXA_PREPARE_AUX_SRC, or
+ * #EXA_PREPARE_AUX_MASK. Since only up to #EXA_NUM_PREPARE_INDICES pixmaps
+ * will have PrepareAccess() called on them per operation, drivers can have
+ * a small, statically-allocated space to maintain state for PrepareAccess()
+ * and FinishAccess() in. Note that PrepareAccess() is only called once per
+ * pixmap and operation, regardless of whether the pixmap is used as a
+ * destination and/or source, and the index may not reflect the usage.
+ *
+ * PrepareAccess() may fail. An example might be the case of hardware that
+ * can set up 1 or 2 surfaces for CPU access, but not 3. If PrepareAccess()
+ * fails, EXA will migrate the pixmap to system memory.
+ * DownloadFromScreen() must be implemented and must not fail if a driver
+ * wishes to fail in PrepareAccess(). PrepareAccess() must not fail when
+ * pPix is the visible screen, because the visible screen can not be
+ * migrated.
+ *
+ * @return TRUE if PrepareAccess() successfully prepared the pixmap for CPU
+ * drawing.
+ * @return FALSE if PrepareAccess() is unsuccessful and EXA should use
+ * DownloadFromScreen() to migate the pixmap out.
+ */
+ Bool (*PrepareAccess)(PixmapPtr pPix, int index);
+
+ /**
+ * FinishAccess() is called after CPU access to an offscreen pixmap.
+ *
+ * @param pPix the pixmap being accessed
+ * @param index the index of the pixmap being accessed.
+ *
+ * FinishAccess() will be called after finishing CPU access of an offscreen
+ * pixmap set up by PrepareAccess(). Note that the FinishAccess() will not be
+ * called if PrepareAccess() failed and the pixmap was migrated out.
+ */
+ void (*FinishAccess)(PixmapPtr pPix, int index);
+
+ /**
+ * PixmapIsOffscreen() is an optional driver replacement to
+ * exaPixmapHasGpuCopy(). Set to NULL if you want the standard behaviour
+ * of exaPixmapHasGpuCopy().
+ *
+ * @param pPix the pixmap
+ * @return TRUE if the given drawable is in framebuffer memory.
+ *
+ * exaPixmapHasGpuCopy() is used to determine if a pixmap is in offscreen
+ * memory, meaning that acceleration could probably be done to it, and that it
+ * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it
+ * with the CPU.
+ *
+ *
+ */
+ Bool (*PixmapIsOffscreen)(PixmapPtr pPix);
+
+ /** @name PrepareAccess() and FinishAccess() indices
+ * @{
+ */
+ /**
+ * EXA_PREPARE_DEST is the index for a pixmap that may be drawn to or
+ * read from.
+ */
+ #define EXA_PREPARE_DEST 0
+ /**
+ * EXA_PREPARE_SRC is the index for a pixmap that may be read from
+ */
+ #define EXA_PREPARE_SRC 1
+ /**
+ * EXA_PREPARE_SRC is the index for a second pixmap that may be read
+ * from.
+ */
+ #define EXA_PREPARE_MASK 2
+ /**
+ * EXA_PREPARE_AUX* are additional indices for other purposes, e.g.
+ * separate alpha maps with Composite operations.
+ */
+ #define EXA_PREPARE_AUX_DEST 3
+ #define EXA_PREPARE_AUX_SRC 4
+ #define EXA_PREPARE_AUX_MASK 5
+ #define EXA_NUM_PREPARE_INDICES 6
+ /** @} */
+
+ /**
+ * maxPitchPixels controls the pitch limitation for rendering from
+ * the card.
+ * The driver should never receive a request for rendering a pixmap
+ * that has a pitch (in pixels) beyond maxPitchPixels.
+ *
+ * Setting this field is optional -- if your hardware doesn't have
+ * a pitch limitation in pixels, don't set this. If neither this value
+ * nor maxPitchBytes is set, then maxPitchPixels is set to maxX.
+ * If set, it must not be smaller than maxX.
+ *
+ * @sa maxPitchBytes
+ */
+ int maxPitchPixels;
+
+ /**
+ * maxPitchBytes controls the pitch limitation for rendering from
+ * the card.
+ * The driver should never receive a request for rendering a pixmap
+ * that has a pitch (in bytes) beyond maxPitchBytes.
+ *
+ * Setting this field is optional -- if your hardware doesn't have
+ * a pitch limitation in bytes, don't set this.
+ * If set, it must not be smaller than maxX * 4.
+ * There's no default value for maxPitchBytes.
+ *
+ * @sa maxPitchPixels
+ */
+ int maxPitchBytes;
+
+ /* Hooks to allow driver to its own pixmap memory management */
+ void *(*CreatePixmap)(ScreenPtr pScreen, int size, int align);
+ void (*DestroyPixmap)(ScreenPtr pScreen, void *driverPriv);
+ /**
+ * Returning a pixmap with non-NULL devPrivate.ptr implies a pixmap which is
+ * not offscreen, which will never be accelerated and Prepare/FinishAccess won't
+ * be called.
+ */
+ Bool (*ModifyPixmapHeader)(PixmapPtr pPixmap, int width, int height,
+ int depth, int bitsPerPixel, int devKind,
+ pointer pPixData);
+
+ /* hooks for drivers with tiling support:
+ * driver MUST fill out new_fb_pitch with valid pitch of pixmap
+ */
+ void *(*CreatePixmap2)(ScreenPtr pScreen, int width, int height,
+ int depth, int class, int bitsPerPixel,
+ int *new_fb_pitch);
+ /** @} */
+} ExaDriverRec, *ExaDriverPtr;
+
+/** @name EXA driver flags
+ * @{
+ */
+/**
+ * EXA_OFFSCREEN_PIXMAPS indicates to EXA that the driver can support
+ * offscreen pixmaps.
+ */
+#define EXA_OFFSCREEN_PIXMAPS (1 << 0)
+
+/**
+ * EXA_OFFSCREEN_ALIGN_POT indicates to EXA that the driver needs pixmaps
+ * to have a power-of-two pitch.
+ */
+#define EXA_OFFSCREEN_ALIGN_POT (1 << 1)
+
+/**
+ * EXA_TWO_BITBLT_DIRECTIONS indicates to EXA that the driver can only
+ * support copies that are (left-to-right, top-to-bottom) or
+ * (right-to-left, bottom-to-top).
+ */
+#define EXA_TWO_BITBLT_DIRECTIONS (1 << 2)
+
+/**
+ * EXA_HANDLES_PIXMAPS indicates to EXA that the driver can handle
+ * all pixmap addressing and migration.
+ */
+#define EXA_HANDLES_PIXMAPS (1 << 3)
+
+/**
+ * EXA_SUPPORTS_PREPARE_AUX indicates to EXA that the driver can handle the
+ * EXA_PREPARE_AUX* indices in the Prepare/FinishAccess hooks. If there are no
+ * such hooks, this flag has no effect.
+ */
+#define EXA_SUPPORTS_PREPARE_AUX (1 << 4)
+
+/**
+ * EXA_SUPPORTS_OFFSCREEN_OVERLAPS indicates to EXA that the driver Copy hooks
+ * can handle the source and destination occupying overlapping offscreen memory
+ * areas. This allows the offscreen memory defragmentation code to defragment
+ * areas where the defragmented position overlaps the fragmented position.
+ *
+ * Typically this is supported by traditional 2D engines but not by 3D engines.
+ */
+#define EXA_SUPPORTS_OFFSCREEN_OVERLAPS (1 << 5)
+
+/**
+ * EXA_MIXED_PIXMAPS will hide unacceleratable pixmaps from drivers and manage the
+ * problem known software fallbacks like trapezoids. This only migrates pixmaps one way
+ * into a driver pixmap and then pins it.
+ */
+#define EXA_MIXED_PIXMAPS (1 << 6)
+
+/** @} */
+
+/* in exa.c */
+extern _X_EXPORT ExaDriverPtr
+exaDriverAlloc(void);
+
+extern _X_EXPORT Bool
+exaDriverInit(ScreenPtr pScreen,
+ ExaDriverPtr pScreenInfo);
+
+extern _X_EXPORT void
+exaDriverFini(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+exaMarkSync(ScreenPtr pScreen);
+extern _X_EXPORT void
+exaWaitSync(ScreenPtr pScreen);
+
+extern _X_EXPORT unsigned long
+exaGetPixmapOffset(PixmapPtr pPix);
+
+extern _X_EXPORT unsigned long
+exaGetPixmapPitch(PixmapPtr pPix);
+
+extern _X_EXPORT unsigned long
+exaGetPixmapSize(PixmapPtr pPix);
+
+extern _X_EXPORT void *
+exaGetPixmapDriverPrivate(PixmapPtr p);
+
+
+/* in exa_offscreen.c */
+extern _X_EXPORT ExaOffscreenArea *
+exaOffscreenAlloc(ScreenPtr pScreen, int size, int align,
+ Bool locked,
+ ExaOffscreenSaveProc save,
+ pointer privData);
+
+extern _X_EXPORT ExaOffscreenArea *
+exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea *area);
+
+extern _X_EXPORT void
+ExaOffscreenMarkUsed (PixmapPtr pPixmap);
+
+extern _X_EXPORT void
+exaEnableDisableFBAccess (int index, Bool enable);
+
+extern _X_EXPORT Bool
+exaDrawableIsOffscreen (DrawablePtr pDrawable);
+
+/* in exa.c */
+extern _X_EXPORT void
+exaMoveInPixmap (PixmapPtr pPixmap);
+
+extern _X_EXPORT void
+exaMoveOutPixmap (PixmapPtr pPixmap);
+
+
+/* in exa_unaccel.c */
+extern _X_EXPORT CARD32
+exaGetPixmapFirstPixel (PixmapPtr pPixmap);
+
+
+/**
+ * Returns TRUE if the given planemask covers all the significant bits in the
+ * pixel values for pDrawable.
+ */
+#define EXA_PM_IS_SOLID(_pDrawable, _pm) \
+ (((_pm) & FbFullMask((_pDrawable)->depth)) == \
+ FbFullMask((_pDrawable)->depth))
+
+#endif /* EXA_H */
diff --git a/xorg-server/exa/exa_accel.c b/xorg-server/exa/exa_accel.c
index 9192f7e74..b81d843f9 100644
--- a/xorg-server/exa/exa_accel.c
+++ b/xorg-server/exa/exa_accel.c
@@ -243,7 +243,7 @@ exaPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
bits);
}
-static Bool inline
+static Bool __inline
exaCopyNtoNTwoDir (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy)
{
diff --git a/xorg-server/exa/exa_classic.c b/xorg-server/exa/exa_classic.c
index 640b26a12..809b3f660 100644
--- a/xorg-server/exa/exa_classic.c
+++ b/xorg-server/exa/exa_classic.c
@@ -1,266 +1,266 @@
-/*
- * Copyright 2009 Maarten Maathuis
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <string.h>
-
-#include "exa_priv.h"
-#include "exa.h"
-
-/* This file holds the classic exa specific implementation. */
-
-static _X_INLINE void*
-ExaGetPixmapAddress(PixmapPtr p)
-{
- ExaPixmapPriv(p);
-
- if (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr)
- return pExaPixmap->fb_ptr;
- else
- return pExaPixmap->sys_ptr;
-}
-
-/**
- * exaCreatePixmap() creates a new pixmap.
- *
- * If width and height are 0, this won't be a full-fledged pixmap and it will
- * get ModifyPixmapHeader() called on it later. So, we mark it as pinned, because
- * ModifyPixmapHeader() would break migration. These types of pixmaps are used
- * for scratch pixmaps, or to represent the visible screen.
- */
-PixmapPtr
-exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
- unsigned class)
-{
- PixmapPtr pPixmap;
- ExaPixmapPrivPtr pExaPixmap;
- BoxRec box;
- int bpp;
- ExaScreenPriv(pScreen);
-
- if (w > 32767 || h > 32767)
- return NullPixmap;
-
- swap(pExaScr, pScreen, CreatePixmap);
- pPixmap = pScreen->CreatePixmap (pScreen, w, h, depth, class);
- swap(pExaScr, pScreen, CreatePixmap);
-
- if (!pPixmap)
- return NULL;
-
- pExaPixmap = ExaGetPixmapPriv(pPixmap);
- pExaPixmap->driverPriv = NULL;
-
- bpp = pPixmap->drawable.bitsPerPixel;
-
- pExaPixmap->driverPriv = NULL;
- /* Scratch pixmaps may have w/h equal to zero, and may not be
- * migrated.
- */
- if (!w || !h)
- pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
- else
- pExaPixmap->score = EXA_PIXMAP_SCORE_INIT;
-
- pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
- pExaPixmap->sys_pitch = pPixmap->devKind;
-
- pPixmap->devPrivate.ptr = NULL;
- pExaPixmap->use_gpu_copy = FALSE;
-
- pExaPixmap->fb_ptr = NULL;
- exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp);
- pExaPixmap->fb_size = pExaPixmap->fb_pitch * h;
-
- if (pExaPixmap->fb_pitch > 131071) {
- swap(pExaScr, pScreen, DestroyPixmap);
- pScreen->DestroyPixmap (pPixmap);
- swap(pExaScr, pScreen, DestroyPixmap);
- return NULL;
- }
-
- /* Set up damage tracking */
- pExaPixmap->pDamage = DamageCreate (NULL, NULL,
- DamageReportNone, TRUE,
- pScreen, pPixmap);
-
- if (pExaPixmap->pDamage == NULL) {
- swap(pExaScr, pScreen, DestroyPixmap);
- pScreen->DestroyPixmap (pPixmap);
- swap(pExaScr, pScreen, DestroyPixmap);
- return NULL;
- }
-
- DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage);
- /* This ensures that pending damage reflects the current operation. */
- /* This is used by exa to optimize migration. */
- DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE);
-
- pExaPixmap->area = NULL;
-
- /* We set the initial pixmap as completely valid for a simple reason.
- * Imagine a 1000x1000 pixmap, it has 1 million pixels, 250000 of which
- * could form single pixel rects as part of a region. Setting the complete region
- * as valid is a natural defragmentation of the region.
- */
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = w;
- box.y2 = h;
- RegionInit(&pExaPixmap->validSys, &box, 0);
- RegionInit(&pExaPixmap->validFB, &box, 0);
-
- exaSetAccelBlock(pExaScr, pExaPixmap,
- w, h, bpp);
-
- /* During a fallback we must prepare access. */
- if (pExaScr->fallback_counter)
- exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST);
-
- return pPixmap;
-}
-
-Bool
-exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth,
- int bitsPerPixel, int devKind, pointer pPixData)
-{
- ScreenPtr pScreen;
- ExaScreenPrivPtr pExaScr;
- ExaPixmapPrivPtr pExaPixmap;
- Bool ret;
-
- if (!pPixmap)
- return FALSE;
-
- pScreen = pPixmap->drawable.pScreen;
- pExaScr = ExaGetScreenPriv(pScreen);
- pExaPixmap = ExaGetPixmapPriv(pPixmap);
-
- if (pExaPixmap) {
- if (pPixData)
- pExaPixmap->sys_ptr = pPixData;
-
- if (devKind > 0)
- pExaPixmap->sys_pitch = devKind;
-
- /* Classic EXA:
- * - Framebuffer.
- * - Scratch pixmap with gpu memory.
- */
- if (pExaScr->info->memoryBase && pPixData) {
- if ((CARD8 *)pPixData >= pExaScr->info->memoryBase &&
- ((CARD8 *)pPixData - pExaScr->info->memoryBase) <
- pExaScr->info->memorySize) {
- pExaPixmap->fb_ptr = pPixData;
- pExaPixmap->fb_pitch = devKind;
- pExaPixmap->use_gpu_copy = TRUE;
- }
- }
-
- if (width > 0 && height > 0 && bitsPerPixel > 0) {
- exaSetFbPitch(pExaScr, pExaPixmap,
- width, height, bitsPerPixel);
-
- exaSetAccelBlock(pExaScr, pExaPixmap,
- width, height, bitsPerPixel);
- }
-
- /* Pixmaps subject to ModifyPixmapHeader will be pinned to system or
- * gpu memory, so there's no need to track damage.
- */
- if (pExaPixmap->pDamage) {
- DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
- DamageDestroy(pExaPixmap->pDamage);
- pExaPixmap->pDamage = NULL;
- }
- }
-
- swap(pExaScr, pScreen, ModifyPixmapHeader);
- ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth,
- bitsPerPixel, devKind, pPixData);
- swap(pExaScr, pScreen, ModifyPixmapHeader);
-
- /* Always NULL this, we don't want lingering pointers. */
- pPixmap->devPrivate.ptr = NULL;
-
- return ret;
-}
-
-Bool
-exaDestroyPixmap_classic (PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- ExaScreenPriv(pScreen);
- Bool ret;
-
- if (pPixmap->refcnt == 1)
- {
- ExaPixmapPriv (pPixmap);
-
- exaDestroyPixmap(pPixmap);
-
- if (pExaPixmap->area)
- {
- DBG_PIXMAP(("-- 0x%p (0x%x) (%dx%d)\n",
- (void*)pPixmap->drawable.id,
- ExaGetPixmapPriv(pPixmap)->area->offset,
- pPixmap->drawable.width,
- pPixmap->drawable.height));
- /* Free the offscreen area */
- exaOffscreenFree (pPixmap->drawable.pScreen, pExaPixmap->area);
- pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
- pPixmap->devKind = pExaPixmap->sys_pitch;
- }
- RegionUninit(&pExaPixmap->validSys);
- RegionUninit(&pExaPixmap->validFB);
- }
-
- swap(pExaScr, pScreen, DestroyPixmap);
- ret = pScreen->DestroyPixmap (pPixmap);
- swap(pExaScr, pScreen, DestroyPixmap);
-
- return ret;
-}
-
-Bool
-exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- ExaScreenPriv(pScreen);
- ExaPixmapPriv(pPixmap);
- Bool ret;
-
- if (pExaScr->info->PixmapIsOffscreen) {
- void* old_ptr = pPixmap->devPrivate.ptr;
- pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
- ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
- pPixmap->devPrivate.ptr = old_ptr;
- } else
- ret = (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr);
-
- return ret;
-}
+/*
+ * Copyright 2009 Maarten Maathuis
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <string.h>
+
+#include "exa_priv.h"
+#include "exa.h"
+
+/* This file holds the classic exa specific implementation. */
+
+static _X_INLINE void*
+ExaGetPixmapAddress(PixmapPtr p)
+{
+ ExaPixmapPriv(p);
+
+ if (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr)
+ return pExaPixmap->fb_ptr;
+ else
+ return pExaPixmap->sys_ptr;
+}
+
+/**
+ * exaCreatePixmap() creates a new pixmap.
+ *
+ * If width and height are 0, this won't be a full-fledged pixmap and it will
+ * get ModifyPixmapHeader() called on it later. So, we mark it as pinned, because
+ * ModifyPixmapHeader() would break migration. These types of pixmaps are used
+ * for scratch pixmaps, or to represent the visible screen.
+ */
+PixmapPtr
+exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
+ unsigned class)
+{
+ PixmapPtr pPixmap;
+ ExaPixmapPrivPtr pExaPixmap;
+ BoxRec box;
+ int bpp;
+ ExaScreenPriv(pScreen);
+
+ if (w > 32767 || h > 32767)
+ return NullPixmap;
+
+ swap(pExaScr, pScreen, CreatePixmap);
+ pPixmap = pScreen->CreatePixmap (pScreen, w, h, depth, class);
+ swap(pExaScr, pScreen, CreatePixmap);
+
+ if (!pPixmap)
+ return NULL;
+
+ pExaPixmap = ExaGetPixmapPriv(pPixmap);
+ pExaPixmap->driverPriv = NULL;
+
+ bpp = pPixmap->drawable.bitsPerPixel;
+
+ pExaPixmap->driverPriv = NULL;
+ /* Scratch pixmaps may have w/h equal to zero, and may not be
+ * migrated.
+ */
+ if (!w || !h)
+ pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
+ else
+ pExaPixmap->score = EXA_PIXMAP_SCORE_INIT;
+
+ pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
+ pExaPixmap->sys_pitch = pPixmap->devKind;
+
+ pPixmap->devPrivate.ptr = NULL;
+ pExaPixmap->use_gpu_copy = FALSE;
+
+ pExaPixmap->fb_ptr = NULL;
+ exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp);
+ pExaPixmap->fb_size = pExaPixmap->fb_pitch * h;
+
+ if (pExaPixmap->fb_pitch > 131071) {
+ swap(pExaScr, pScreen, DestroyPixmap);
+ pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+ return NULL;
+ }
+
+ /* Set up damage tracking */
+ pExaPixmap->pDamage = DamageCreate (NULL, NULL,
+ DamageReportNone, TRUE,
+ pScreen, pPixmap);
+
+ if (pExaPixmap->pDamage == NULL) {
+ swap(pExaScr, pScreen, DestroyPixmap);
+ pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+ return NULL;
+ }
+
+ DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage);
+ /* This ensures that pending damage reflects the current operation. */
+ /* This is used by exa to optimize migration. */
+ DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE);
+
+ pExaPixmap->area = NULL;
+
+ /* We set the initial pixmap as completely valid for a simple reason.
+ * Imagine a 1000x1000 pixmap, it has 1 million pixels, 250000 of which
+ * could form single pixel rects as part of a region. Setting the complete region
+ * as valid is a natural defragmentation of the region.
+ */
+ box.x1 = 0;
+ box.y1 = 0;
+ box.x2 = w;
+ box.y2 = h;
+ RegionInit(&pExaPixmap->validSys, &box, 0);
+ RegionInit(&pExaPixmap->validFB, &box, 0);
+
+ exaSetAccelBlock(pExaScr, pExaPixmap,
+ w, h, bpp);
+
+ /* During a fallback we must prepare access. */
+ if (pExaScr->fallback_counter)
+ exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST);
+
+ return pPixmap;
+}
+
+Bool
+exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth,
+ int bitsPerPixel, int devKind, pointer pPixData)
+{
+ ScreenPtr pScreen;
+ ExaScreenPrivPtr pExaScr;
+ ExaPixmapPrivPtr pExaPixmap;
+ Bool ret;
+
+ if (!pPixmap)
+ return FALSE;
+
+ pScreen = pPixmap->drawable.pScreen;
+ pExaScr = ExaGetScreenPriv(pScreen);
+ pExaPixmap = ExaGetPixmapPriv(pPixmap);
+
+ if (pExaPixmap) {
+ if (pPixData)
+ pExaPixmap->sys_ptr = pPixData;
+
+ if (devKind > 0)
+ pExaPixmap->sys_pitch = devKind;
+
+ /* Classic EXA:
+ * - Framebuffer.
+ * - Scratch pixmap with gpu memory.
+ */
+ if (pExaScr->info->memoryBase && pPixData) {
+ if ((CARD8 *)pPixData >= pExaScr->info->memoryBase &&
+ ((CARD8 *)pPixData - pExaScr->info->memoryBase) <
+ pExaScr->info->memorySize) {
+ pExaPixmap->fb_ptr = pPixData;
+ pExaPixmap->fb_pitch = devKind;
+ pExaPixmap->use_gpu_copy = TRUE;
+ }
+ }
+
+ if (width > 0 && height > 0 && bitsPerPixel > 0) {
+ exaSetFbPitch(pExaScr, pExaPixmap,
+ width, height, bitsPerPixel);
+
+ exaSetAccelBlock(pExaScr, pExaPixmap,
+ width, height, bitsPerPixel);
+ }
+
+ /* Pixmaps subject to ModifyPixmapHeader will be pinned to system or
+ * gpu memory, so there's no need to track damage.
+ */
+ if (pExaPixmap->pDamage) {
+ DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
+ DamageDestroy(pExaPixmap->pDamage);
+ pExaPixmap->pDamage = NULL;
+ }
+ }
+
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
+ ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth,
+ bitsPerPixel, devKind, pPixData);
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
+
+ /* Always NULL this, we don't want lingering pointers. */
+ pPixmap->devPrivate.ptr = NULL;
+
+ return ret;
+}
+
+Bool
+exaDestroyPixmap_classic (PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ExaScreenPriv(pScreen);
+ Bool ret;
+
+ if (pPixmap->refcnt == 1)
+ {
+ ExaPixmapPriv (pPixmap);
+
+ exaDestroyPixmap(pPixmap);
+
+ if (pExaPixmap->area)
+ {
+ DBG_PIXMAP(("-- 0x%p (0x%x) (%dx%d)\n",
+ (void*)pPixmap->drawable.id,
+ ExaGetPixmapPriv(pPixmap)->area->offset,
+ pPixmap->drawable.width,
+ pPixmap->drawable.height));
+ /* Free the offscreen area */
+ exaOffscreenFree (pPixmap->drawable.pScreen, pExaPixmap->area);
+ pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
+ pPixmap->devKind = pExaPixmap->sys_pitch;
+ }
+ RegionUninit(&pExaPixmap->validSys);
+ RegionUninit(&pExaPixmap->validFB);
+ }
+
+ swap(pExaScr, pScreen, DestroyPixmap);
+ ret = pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+
+ return ret;
+}
+
+Bool
+exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ExaScreenPriv(pScreen);
+ ExaPixmapPriv(pPixmap);
+ Bool ret;
+
+ if (pExaScr->info->PixmapIsOffscreen) {
+ void* old_ptr = pPixmap->devPrivate.ptr;
+ pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
+ ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
+ pPixmap->devPrivate.ptr = old_ptr;
+ } else
+ ret = (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr);
+
+ return ret;
+}
diff --git a/xorg-server/exa/exa_driver.c b/xorg-server/exa/exa_driver.c
index 4d2a1a5df..8893452a8 100644
--- a/xorg-server/exa/exa_driver.c
+++ b/xorg-server/exa/exa_driver.c
@@ -1,226 +1,226 @@
-/*
- * Copyright 2009 Maarten Maathuis
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <string.h>
-
-#include "exa_priv.h"
-#include "exa.h"
-
-/* This file holds the driver allocated pixmaps specific implementation. */
-
-static _X_INLINE void*
-ExaGetPixmapAddress(PixmapPtr p)
-{
- ExaPixmapPriv(p);
-
- return pExaPixmap->sys_ptr;
-}
-
-/**
- * exaCreatePixmap() creates a new pixmap.
- *
- * Pixmaps are always marked as pinned, because exa has no control over them.
- */
-PixmapPtr
-exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
- unsigned class)
-{
- PixmapPtr pPixmap;
- ExaPixmapPrivPtr pExaPixmap;
- int bpp;
- size_t paddedWidth, datasize;
- ExaScreenPriv(pScreen);
-
- if (w > 32767 || h > 32767)
- return NullPixmap;
-
- swap(pExaScr, pScreen, CreatePixmap);
- pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, class);
- swap(pExaScr, pScreen, CreatePixmap);
-
- if (!pPixmap)
- return NULL;
-
- pExaPixmap = ExaGetPixmapPriv(pPixmap);
- pExaPixmap->driverPriv = NULL;
-
- bpp = pPixmap->drawable.bitsPerPixel;
-
- /* Set this before driver hooks, to allow for driver pixmaps without gpu
- * memory to back it. These pixmaps have a valid pointer at all times.
- */
- pPixmap->devPrivate.ptr = NULL;
-
- if (pExaScr->info->CreatePixmap2) {
- int new_pitch = 0;
- pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, class, bpp, &new_pitch);
- paddedWidth = pExaPixmap->fb_pitch = new_pitch;
- }
- else {
- paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits);
- if (paddedWidth / 4 > 32767 || h > 32767)
- return NullPixmap;
-
- exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp);
-
- if (paddedWidth < pExaPixmap->fb_pitch)
- paddedWidth = pExaPixmap->fb_pitch;
- datasize = h * paddedWidth;
- pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0);
- }
-
- if (!pExaPixmap->driverPriv) {
- swap(pExaScr, pScreen, DestroyPixmap);
- pScreen->DestroyPixmap (pPixmap);
- swap(pExaScr, pScreen, DestroyPixmap);
- return NULL;
- }
-
- /* Allow ModifyPixmapHeader to set sys_ptr appropriately. */
- pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
- pExaPixmap->fb_ptr = NULL;
- pExaPixmap->pDamage = NULL;
- pExaPixmap->sys_ptr = NULL;
-
- (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
- paddedWidth, NULL);
-
- pExaPixmap->area = NULL;
-
- exaSetAccelBlock(pExaScr, pExaPixmap,
- w, h, bpp);
-
- pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
-
- /* During a fallback we must prepare access. */
- if (pExaScr->fallback_counter)
- exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST);
-
- return pPixmap;
-}
-
-Bool
-exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth,
- int bitsPerPixel, int devKind, pointer pPixData)
-{
- ScreenPtr pScreen;
- ExaScreenPrivPtr pExaScr;
- ExaPixmapPrivPtr pExaPixmap;
- Bool ret;
-
- if (!pPixmap)
- return FALSE;
-
- pScreen = pPixmap->drawable.pScreen;
- pExaScr = ExaGetScreenPriv(pScreen);
- pExaPixmap = ExaGetPixmapPriv(pPixmap);
-
- if (pExaPixmap) {
- if (pPixData)
- pExaPixmap->sys_ptr = pPixData;
-
- if (devKind > 0)
- pExaPixmap->sys_pitch = devKind;
-
- if (width > 0 && height > 0 && bitsPerPixel > 0) {
- exaSetFbPitch(pExaScr, pExaPixmap,
- width, height, bitsPerPixel);
-
- exaSetAccelBlock(pExaScr, pExaPixmap,
- width, height, bitsPerPixel);
- }
- }
-
- if (pExaScr->info->ModifyPixmapHeader) {
- ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth,
- bitsPerPixel, devKind, pPixData);
- /* For EXA_HANDLES_PIXMAPS, we set pPixData to NULL.
- * If pPixmap->devPrivate.ptr is non-NULL, then we've got a
- * !has_gpu_copy pixmap. We need to store the pointer,
- * because PrepareAccess won't be called.
- */
- if (!pPixData && pPixmap->devPrivate.ptr && pPixmap->devKind) {
- pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
- pExaPixmap->sys_pitch = pPixmap->devKind;
- }
- if (ret == TRUE)
- goto out;
- }
-
- swap(pExaScr, pScreen, ModifyPixmapHeader);
- ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth,
- bitsPerPixel, devKind, pPixData);
- swap(pExaScr, pScreen, ModifyPixmapHeader);
-
-out:
- /* Always NULL this, we don't want lingering pointers. */
- pPixmap->devPrivate.ptr = NULL;
-
- return ret;
-}
-
-Bool
-exaDestroyPixmap_driver (PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- ExaScreenPriv(pScreen);
- Bool ret;
-
- if (pPixmap->refcnt == 1)
- {
- ExaPixmapPriv (pPixmap);
-
- exaDestroyPixmap(pPixmap);
-
- if (pExaPixmap->driverPriv)
- pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv);
- pExaPixmap->driverPriv = NULL;
- }
-
- swap(pExaScr, pScreen, DestroyPixmap);
- ret = pScreen->DestroyPixmap (pPixmap);
- swap(pExaScr, pScreen, DestroyPixmap);
-
- return ret;
-}
-
-Bool
-exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- ExaScreenPriv(pScreen);
- pointer saved_ptr;
- Bool ret;
-
- saved_ptr = pPixmap->devPrivate.ptr;
- pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
- ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
- pPixmap->devPrivate.ptr = saved_ptr;
-
- return ret;
-}
+/*
+ * Copyright 2009 Maarten Maathuis
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <string.h>
+
+#include "exa_priv.h"
+#include "exa.h"
+
+/* This file holds the driver allocated pixmaps specific implementation. */
+
+static _X_INLINE void*
+ExaGetPixmapAddress(PixmapPtr p)
+{
+ ExaPixmapPriv(p);
+
+ return pExaPixmap->sys_ptr;
+}
+
+/**
+ * exaCreatePixmap() creates a new pixmap.
+ *
+ * Pixmaps are always marked as pinned, because exa has no control over them.
+ */
+PixmapPtr
+exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
+ unsigned class)
+{
+ PixmapPtr pPixmap;
+ ExaPixmapPrivPtr pExaPixmap;
+ int bpp;
+ size_t paddedWidth, datasize;
+ ExaScreenPriv(pScreen);
+
+ if (w > 32767 || h > 32767)
+ return NullPixmap;
+
+ swap(pExaScr, pScreen, CreatePixmap);
+ pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, class);
+ swap(pExaScr, pScreen, CreatePixmap);
+
+ if (!pPixmap)
+ return NULL;
+
+ pExaPixmap = ExaGetPixmapPriv(pPixmap);
+ pExaPixmap->driverPriv = NULL;
+
+ bpp = pPixmap->drawable.bitsPerPixel;
+
+ /* Set this before driver hooks, to allow for driver pixmaps without gpu
+ * memory to back it. These pixmaps have a valid pointer at all times.
+ */
+ pPixmap->devPrivate.ptr = NULL;
+
+ if (pExaScr->info->CreatePixmap2) {
+ int new_pitch = 0;
+ pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, class, bpp, &new_pitch);
+ paddedWidth = pExaPixmap->fb_pitch = new_pitch;
+ }
+ else {
+ paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits);
+ if (paddedWidth / 4 > 32767 || h > 32767)
+ return NullPixmap;
+
+ exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp);
+
+ if (paddedWidth < pExaPixmap->fb_pitch)
+ paddedWidth = pExaPixmap->fb_pitch;
+ datasize = h * paddedWidth;
+ pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0);
+ }
+
+ if (!pExaPixmap->driverPriv) {
+ swap(pExaScr, pScreen, DestroyPixmap);
+ pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+ return NULL;
+ }
+
+ /* Allow ModifyPixmapHeader to set sys_ptr appropriately. */
+ pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
+ pExaPixmap->fb_ptr = NULL;
+ pExaPixmap->pDamage = NULL;
+ pExaPixmap->sys_ptr = NULL;
+
+ (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
+ paddedWidth, NULL);
+
+ pExaPixmap->area = NULL;
+
+ exaSetAccelBlock(pExaScr, pExaPixmap,
+ w, h, bpp);
+
+ pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
+
+ /* During a fallback we must prepare access. */
+ if (pExaScr->fallback_counter)
+ exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST);
+
+ return pPixmap;
+}
+
+Bool
+exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth,
+ int bitsPerPixel, int devKind, pointer pPixData)
+{
+ ScreenPtr pScreen;
+ ExaScreenPrivPtr pExaScr;
+ ExaPixmapPrivPtr pExaPixmap;
+ Bool ret;
+
+ if (!pPixmap)
+ return FALSE;
+
+ pScreen = pPixmap->drawable.pScreen;
+ pExaScr = ExaGetScreenPriv(pScreen);
+ pExaPixmap = ExaGetPixmapPriv(pPixmap);
+
+ if (pExaPixmap) {
+ if (pPixData)
+ pExaPixmap->sys_ptr = pPixData;
+
+ if (devKind > 0)
+ pExaPixmap->sys_pitch = devKind;
+
+ if (width > 0 && height > 0 && bitsPerPixel > 0) {
+ exaSetFbPitch(pExaScr, pExaPixmap,
+ width, height, bitsPerPixel);
+
+ exaSetAccelBlock(pExaScr, pExaPixmap,
+ width, height, bitsPerPixel);
+ }
+ }
+
+ if (pExaScr->info->ModifyPixmapHeader) {
+ ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth,
+ bitsPerPixel, devKind, pPixData);
+ /* For EXA_HANDLES_PIXMAPS, we set pPixData to NULL.
+ * If pPixmap->devPrivate.ptr is non-NULL, then we've got a
+ * !has_gpu_copy pixmap. We need to store the pointer,
+ * because PrepareAccess won't be called.
+ */
+ if (!pPixData && pPixmap->devPrivate.ptr && pPixmap->devKind) {
+ pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
+ pExaPixmap->sys_pitch = pPixmap->devKind;
+ }
+ if (ret == TRUE)
+ goto out;
+ }
+
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
+ ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth,
+ bitsPerPixel, devKind, pPixData);
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
+
+out:
+ /* Always NULL this, we don't want lingering pointers. */
+ pPixmap->devPrivate.ptr = NULL;
+
+ return ret;
+}
+
+Bool
+exaDestroyPixmap_driver (PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ExaScreenPriv(pScreen);
+ Bool ret;
+
+ if (pPixmap->refcnt == 1)
+ {
+ ExaPixmapPriv (pPixmap);
+
+ exaDestroyPixmap(pPixmap);
+
+ if (pExaPixmap->driverPriv)
+ pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv);
+ pExaPixmap->driverPriv = NULL;
+ }
+
+ swap(pExaScr, pScreen, DestroyPixmap);
+ ret = pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+
+ return ret;
+}
+
+Bool
+exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ExaScreenPriv(pScreen);
+ pointer saved_ptr;
+ Bool ret;
+
+ saved_ptr = pPixmap->devPrivate.ptr;
+ pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
+ ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
+ pPixmap->devPrivate.ptr = saved_ptr;
+
+ return ret;
+}
diff --git a/xorg-server/exa/exa_migration_classic.c b/xorg-server/exa/exa_migration_classic.c
index 5ec2ac0b8..eb1081236 100644
--- a/xorg-server/exa/exa_migration_classic.c
+++ b/xorg-server/exa/exa_migration_classic.c
@@ -373,8 +373,8 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate)
void
exaMoveInPixmap_classic (PixmapPtr pPixmap)
{
- static ExaMigrationRec migrate = { .as_dst = FALSE, .as_src = TRUE,
- .pReg = NULL };
+ static ExaMigrationRec migrate = { FALSE, TRUE,
+ NULL, NULL };
migrate.pPix = pPixmap;
exaDoMoveInPixmap (&migrate);
@@ -414,8 +414,8 @@ exaDoMoveOutPixmap (ExaMigrationPtr migrate)
void
exaMoveOutPixmap_classic (PixmapPtr pPixmap)
{
- static ExaMigrationRec migrate = { .as_dst = FALSE, .as_src = TRUE,
- .pReg = NULL };
+ static ExaMigrationRec migrate = { FALSE, TRUE,
+ NULL, NULL };
migrate.pPix = pPixmap;
exaDoMoveOutPixmap (&migrate);
@@ -613,7 +613,7 @@ exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
for (i = 0; i < npixmaps; i++) {
if (!exaPixmapIsDirty (pixmaps[i].pPix) &&
!exaAssertNotDirty (pixmaps[i].pPix))
- ErrorF("%s: Pixmap %d dirty but not marked as such!\n", __func__, i);
+ ErrorF("%s: Pixmap %d dirty but not marked as such!\n", __FUNCTION__, i);
}
}
/* If anything is pinned in system memory, we won't be able to
diff --git a/xorg-server/exa/exa_migration_mixed.c b/xorg-server/exa/exa_migration_mixed.c
index a563357be..00227e3c4 100644
--- a/xorg-server/exa/exa_migration_mixed.c
+++ b/xorg-server/exa/exa_migration_mixed.c
@@ -1,261 +1,261 @@
-/*
- * Copyright 2009 Maarten Maathuis
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <string.h>
-
-#include "exa_priv.h"
-#include "exa.h"
-
-void
-exaCreateDriverPixmap_mixed(PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- ExaScreenPriv(pScreen);
- ExaPixmapPriv(pPixmap);
- int w = pPixmap->drawable.width, h = pPixmap->drawable.height;
- int depth = pPixmap->drawable.depth, bpp = pPixmap->drawable.bitsPerPixel;
- int class = pPixmap->drawable.class;
- int paddedWidth = pExaPixmap->sys_pitch;
-
- /* Already done. */
- if (pExaPixmap->driverPriv)
- return;
-
- if (exaPixmapIsPinned(pPixmap))
- return;
-
- /* Can't accel 1/4 bpp. */
- if (pExaPixmap->accel_blocked || bpp < 8)
- return;
-
- if (pExaScr->info->CreatePixmap2) {
- int new_pitch = 0;
- pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, class, bpp, &new_pitch);
- paddedWidth = pExaPixmap->fb_pitch = new_pitch;
- } else {
- if (paddedWidth < pExaPixmap->fb_pitch)
- paddedWidth = pExaPixmap->fb_pitch;
- pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, paddedWidth*h, 0);
- }
-
- if (!pExaPixmap->driverPriv)
- return;
-
- (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
- paddedWidth, NULL);
-}
-
-void
-exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
-{
- int i;
-
- /* If anything is pinned in system memory, we won't be able to
- * accelerate.
- */
- for (i = 0; i < npixmaps; i++) {
- if (exaPixmapIsPinned (pixmaps[i].pPix) &&
- !exaPixmapHasGpuCopy (pixmaps[i].pPix))
- {
- can_accel = FALSE;
- break;
- }
- }
-
- /* We can do nothing. */
- if (!can_accel)
- return;
-
- for (i = 0; i < npixmaps; i++) {
- PixmapPtr pPixmap = pixmaps[i].pPix;
- ExaPixmapPriv(pPixmap);
-
- if (!pExaPixmap->driverPriv)
- exaCreateDriverPixmap_mixed(pPixmap);
-
- if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
- ExaScreenPriv(pPixmap->drawable.pScreen);
-
- /* This pitch is needed for proper acceleration. For some reason
- * there are pixmaps without pDamage and a bad fb_pitch value.
- * So setting devKind when only exaPixmapHasGpuCopy() is true
- * causes corruption. Pixmaps without pDamage are not migrated
- * and should have a valid devKind at all times, so that's why this
- * isn't causing problems. Pixmaps have their gpu pitch set the
- * first time in the MPH call from exaCreateDriverPixmap_mixed().
- */
- pPixmap->devKind = pExaPixmap->fb_pitch;
- exaCopyDirtyToFb(pixmaps + i);
-
- if (pExaScr->deferred_mixed_pixmap == pPixmap &&
- !pixmaps[i].as_dst && !pixmaps[i].pReg)
- pExaScr->deferred_mixed_pixmap = NULL;
- }
-
- pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
- }
-}
-
-void
-exaMoveInPixmap_mixed(PixmapPtr pPixmap)
-{
- ExaMigrationRec pixmaps[1];
-
- pixmaps[0].as_dst = FALSE;
- pixmaps[0].as_src = TRUE;
- pixmaps[0].pPix = pPixmap;
- pixmaps[0].pReg = NULL;
-
- exaDoMigration(pixmaps, 1, TRUE);
-}
-
-void
-exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure)
-{
- PixmapPtr pPixmap = closure;
- ExaPixmapPriv(pPixmap);
-
- /* Move back results of software rendering on system memory copy of mixed driver
- * pixmap (see exaPrepareAccessReg_mixed).
- *
- * Defer moving the destination back into the driver pixmap, to try and save
- * overhead on multiple subsequent software fallbacks.
- */
- if (!pExaPixmap->use_gpu_copy && exaPixmapHasGpuCopy(pPixmap)) {
- ExaScreenPriv(pPixmap->drawable.pScreen);
-
- if (pExaScr->deferred_mixed_pixmap &&
- pExaScr->deferred_mixed_pixmap != pPixmap)
- exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
- pExaScr->deferred_mixed_pixmap = pPixmap;
- }
-}
-
-/* With mixed pixmaps, if we fail to get direct access to the driver pixmap, we
- * use the DownloadFromScreen hook to retrieve contents to a copy in system
- * memory, perform software rendering on that and move back the results with the
- * UploadToScreen hook (see exaDamageReport_mixed).
- */
-void
-exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
-{
- ExaPixmapPriv(pPixmap);
- Bool has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
- Bool success;
-
- success = ExaDoPrepareAccess(pPixmap, index);
-
- if (success && has_gpu_copy && pExaPixmap->pDamage) {
- /* You cannot do accelerated operations while a buffer is mapped. */
- exaFinishAccess(&pPixmap->drawable, index);
- /* Update the gpu view of both deferred destination pixmaps and of
- * source pixmaps that were migrated with a bounding region.
- */
- exaMoveInPixmap_mixed(pPixmap);
- success = ExaDoPrepareAccess(pPixmap, index);
-
- if (success) {
- /* We have a gpu pixmap that can be accessed, we don't need the cpu
- * copy anymore. Drivers that prefer DFS, should fail prepare
- * access.
- */
- DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
- DamageDestroy(pExaPixmap->pDamage);
- pExaPixmap->pDamage = NULL;
-
- free(pExaPixmap->sys_ptr);
- pExaPixmap->sys_ptr = NULL;
-
- return;
- }
- }
-
- if (!success) {
- ExaMigrationRec pixmaps[1];
-
- /* Do we need to allocate our system buffer? */
- if (!pExaPixmap->sys_ptr) {
- pExaPixmap->sys_ptr = malloc(pExaPixmap->sys_pitch *
- pPixmap->drawable.height);
- if (!pExaPixmap->sys_ptr)
- FatalError("EXA: malloc failed for size %d bytes\n",
- pExaPixmap->sys_pitch * pPixmap->drawable.height);
- }
-
- if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) {
- pixmaps[0].as_dst = TRUE;
- pixmaps[0].as_src = FALSE;
- } else {
- pixmaps[0].as_dst = FALSE;
- pixmaps[0].as_src = TRUE;
- }
- pixmaps[0].pPix = pPixmap;
- pixmaps[0].pReg = pReg;
-
- if (!pExaPixmap->pDamage &&
- (has_gpu_copy || !exaPixmapIsPinned(pPixmap))) {
- Bool as_dst = pixmaps[0].as_dst;
-
- /* Set up damage tracking */
- pExaPixmap->pDamage = DamageCreate(exaDamageReport_mixed, NULL,
- DamageReportNonEmpty, TRUE,
- pPixmap->drawable.pScreen,
- pPixmap);
-
- DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage);
- /* This ensures that pending damage reflects the current operation. */
- /* This is used by exa to optimize migration. */
- DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE);
-
- if (has_gpu_copy) {
- exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width,
- pPixmap->drawable.height);
-
- /* We don't know which region of the destination will be damaged,
- * have to assume all of it
- */
- if (as_dst) {
- pixmaps[0].as_dst = FALSE;
- pixmaps[0].as_src = TRUE;
- pixmaps[0].pReg = NULL;
- }
- exaCopyDirtyToSys(pixmaps);
- }
-
- if (as_dst)
- exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width,
- pPixmap->drawable.height);
- } else if (has_gpu_copy)
- exaCopyDirtyToSys(pixmaps);
-
- pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
- pPixmap->devKind = pExaPixmap->sys_pitch;
- pExaPixmap->use_gpu_copy = FALSE;
- }
-}
-
+/*
+ * Copyright 2009 Maarten Maathuis
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <string.h>
+
+#include "exa_priv.h"
+#include "exa.h"
+
+void
+exaCreateDriverPixmap_mixed(PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ExaScreenPriv(pScreen);
+ ExaPixmapPriv(pPixmap);
+ int w = pPixmap->drawable.width, h = pPixmap->drawable.height;
+ int depth = pPixmap->drawable.depth, bpp = pPixmap->drawable.bitsPerPixel;
+ int class = pPixmap->drawable.class;
+ int paddedWidth = pExaPixmap->sys_pitch;
+
+ /* Already done. */
+ if (pExaPixmap->driverPriv)
+ return;
+
+ if (exaPixmapIsPinned(pPixmap))
+ return;
+
+ /* Can't accel 1/4 bpp. */
+ if (pExaPixmap->accel_blocked || bpp < 8)
+ return;
+
+ if (pExaScr->info->CreatePixmap2) {
+ int new_pitch = 0;
+ pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, class, bpp, &new_pitch);
+ paddedWidth = pExaPixmap->fb_pitch = new_pitch;
+ } else {
+ if (paddedWidth < pExaPixmap->fb_pitch)
+ paddedWidth = pExaPixmap->fb_pitch;
+ pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, paddedWidth*h, 0);
+ }
+
+ if (!pExaPixmap->driverPriv)
+ return;
+
+ (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
+ paddedWidth, NULL);
+}
+
+void
+exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
+{
+ int i;
+
+ /* If anything is pinned in system memory, we won't be able to
+ * accelerate.
+ */
+ for (i = 0; i < npixmaps; i++) {
+ if (exaPixmapIsPinned (pixmaps[i].pPix) &&
+ !exaPixmapHasGpuCopy (pixmaps[i].pPix))
+ {
+ can_accel = FALSE;
+ break;
+ }
+ }
+
+ /* We can do nothing. */
+ if (!can_accel)
+ return;
+
+ for (i = 0; i < npixmaps; i++) {
+ PixmapPtr pPixmap = pixmaps[i].pPix;
+ ExaPixmapPriv(pPixmap);
+
+ if (!pExaPixmap->driverPriv)
+ exaCreateDriverPixmap_mixed(pPixmap);
+
+ if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
+ ExaScreenPriv(pPixmap->drawable.pScreen);
+
+ /* This pitch is needed for proper acceleration. For some reason
+ * there are pixmaps without pDamage and a bad fb_pitch value.
+ * So setting devKind when only exaPixmapHasGpuCopy() is true
+ * causes corruption. Pixmaps without pDamage are not migrated
+ * and should have a valid devKind at all times, so that's why this
+ * isn't causing problems. Pixmaps have their gpu pitch set the
+ * first time in the MPH call from exaCreateDriverPixmap_mixed().
+ */
+ pPixmap->devKind = pExaPixmap->fb_pitch;
+ exaCopyDirtyToFb(pixmaps + i);
+
+ if (pExaScr->deferred_mixed_pixmap == pPixmap &&
+ !pixmaps[i].as_dst && !pixmaps[i].pReg)
+ pExaScr->deferred_mixed_pixmap = NULL;
+ }
+
+ pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
+ }
+}
+
+void
+exaMoveInPixmap_mixed(PixmapPtr pPixmap)
+{
+ ExaMigrationRec pixmaps[1];
+
+ pixmaps[0].as_dst = FALSE;
+ pixmaps[0].as_src = TRUE;
+ pixmaps[0].pPix = pPixmap;
+ pixmaps[0].pReg = NULL;
+
+ exaDoMigration(pixmaps, 1, TRUE);
+}
+
+void
+exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure)
+{
+ PixmapPtr pPixmap = closure;
+ ExaPixmapPriv(pPixmap);
+
+ /* Move back results of software rendering on system memory copy of mixed driver
+ * pixmap (see exaPrepareAccessReg_mixed).
+ *
+ * Defer moving the destination back into the driver pixmap, to try and save
+ * overhead on multiple subsequent software fallbacks.
+ */
+ if (!pExaPixmap->use_gpu_copy && exaPixmapHasGpuCopy(pPixmap)) {
+ ExaScreenPriv(pPixmap->drawable.pScreen);
+
+ if (pExaScr->deferred_mixed_pixmap &&
+ pExaScr->deferred_mixed_pixmap != pPixmap)
+ exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
+ pExaScr->deferred_mixed_pixmap = pPixmap;
+ }
+}
+
+/* With mixed pixmaps, if we fail to get direct access to the driver pixmap, we
+ * use the DownloadFromScreen hook to retrieve contents to a copy in system
+ * memory, perform software rendering on that and move back the results with the
+ * UploadToScreen hook (see exaDamageReport_mixed).
+ */
+void
+exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
+{
+ ExaPixmapPriv(pPixmap);
+ Bool has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
+ Bool success;
+
+ success = ExaDoPrepareAccess(pPixmap, index);
+
+ if (success && has_gpu_copy && pExaPixmap->pDamage) {
+ /* You cannot do accelerated operations while a buffer is mapped. */
+ exaFinishAccess(&pPixmap->drawable, index);
+ /* Update the gpu view of both deferred destination pixmaps and of
+ * source pixmaps that were migrated with a bounding region.
+ */
+ exaMoveInPixmap_mixed(pPixmap);
+ success = ExaDoPrepareAccess(pPixmap, index);
+
+ if (success) {
+ /* We have a gpu pixmap that can be accessed, we don't need the cpu
+ * copy anymore. Drivers that prefer DFS, should fail prepare
+ * access.
+ */
+ DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
+ DamageDestroy(pExaPixmap->pDamage);
+ pExaPixmap->pDamage = NULL;
+
+ free(pExaPixmap->sys_ptr);
+ pExaPixmap->sys_ptr = NULL;
+
+ return;
+ }
+ }
+
+ if (!success) {
+ ExaMigrationRec pixmaps[1];
+
+ /* Do we need to allocate our system buffer? */
+ if (!pExaPixmap->sys_ptr) {
+ pExaPixmap->sys_ptr = malloc(pExaPixmap->sys_pitch *
+ pPixmap->drawable.height);
+ if (!pExaPixmap->sys_ptr)
+ FatalError("EXA: malloc failed for size %d bytes\n",
+ pExaPixmap->sys_pitch * pPixmap->drawable.height);
+ }
+
+ if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) {
+ pixmaps[0].as_dst = TRUE;
+ pixmaps[0].as_src = FALSE;
+ } else {
+ pixmaps[0].as_dst = FALSE;
+ pixmaps[0].as_src = TRUE;
+ }
+ pixmaps[0].pPix = pPixmap;
+ pixmaps[0].pReg = pReg;
+
+ if (!pExaPixmap->pDamage &&
+ (has_gpu_copy || !exaPixmapIsPinned(pPixmap))) {
+ Bool as_dst = pixmaps[0].as_dst;
+
+ /* Set up damage tracking */
+ pExaPixmap->pDamage = DamageCreate(exaDamageReport_mixed, NULL,
+ DamageReportNonEmpty, TRUE,
+ pPixmap->drawable.pScreen,
+ pPixmap);
+
+ DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage);
+ /* This ensures that pending damage reflects the current operation. */
+ /* This is used by exa to optimize migration. */
+ DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE);
+
+ if (has_gpu_copy) {
+ exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width,
+ pPixmap->drawable.height);
+
+ /* We don't know which region of the destination will be damaged,
+ * have to assume all of it
+ */
+ if (as_dst) {
+ pixmaps[0].as_dst = FALSE;
+ pixmaps[0].as_src = TRUE;
+ pixmaps[0].pReg = NULL;
+ }
+ exaCopyDirtyToSys(pixmaps);
+ }
+
+ if (as_dst)
+ exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width,
+ pPixmap->drawable.height);
+ } else if (has_gpu_copy)
+ exaCopyDirtyToSys(pixmaps);
+
+ pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
+ pPixmap->devKind = pExaPixmap->sys_pitch;
+ pExaPixmap->use_gpu_copy = FALSE;
+ }
+}
+
diff --git a/xorg-server/exa/exa_mixed.c b/xorg-server/exa/exa_mixed.c
index 24fce7645..38700e900 100644
--- a/xorg-server/exa/exa_mixed.c
+++ b/xorg-server/exa/exa_mixed.c
@@ -1,290 +1,290 @@
-/*
- * Copyright 2009 Maarten Maathuis
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <string.h>
-
-#include "exa_priv.h"
-#include "exa.h"
-
-/* This file holds the driver allocated pixmaps + better initial placement code.
- */
-
-static _X_INLINE void*
-ExaGetPixmapAddress(PixmapPtr p)
-{
- ExaPixmapPriv(p);
-
- return pExaPixmap->sys_ptr;
-}
-
-/**
- * exaCreatePixmap() creates a new pixmap.
- */
-PixmapPtr
-exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
- unsigned class)
-{
- PixmapPtr pPixmap;
- ExaPixmapPrivPtr pExaPixmap;
- int bpp;
- size_t paddedWidth;
- ExaScreenPriv(pScreen);
-
- if (w > 32767 || h > 32767)
- return NullPixmap;
-
- swap(pExaScr, pScreen, CreatePixmap);
- pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, class);
- swap(pExaScr, pScreen, CreatePixmap);
-
- if (!pPixmap)
- return NULL;
-
- pExaPixmap = ExaGetPixmapPriv(pPixmap);
- pExaPixmap->driverPriv = NULL;
-
- bpp = pPixmap->drawable.bitsPerPixel;
-
- paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits);
- if (paddedWidth / 4 > 32767 || h > 32767)
- return NullPixmap;
-
- /* We will allocate the system pixmap later if needed. */
- pPixmap->devPrivate.ptr = NULL;
- pExaPixmap->sys_ptr = NULL;
- pExaPixmap->sys_pitch = paddedWidth;
-
- pExaPixmap->area = NULL;
- pExaPixmap->fb_ptr = NULL;
- pExaPixmap->pDamage = NULL;
-
- exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp);
- exaSetAccelBlock(pExaScr, pExaPixmap,
- w, h, bpp);
-
- (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
- paddedWidth, NULL);
-
- /* A scratch pixmap will become a driver pixmap right away. */
- if (!w || !h) {
- exaCreateDriverPixmap_mixed(pPixmap);
- pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
- } else {
- pExaPixmap->use_gpu_copy = FALSE;
-
- if (w == 1 && h == 1) {
- pExaPixmap->sys_ptr = malloc(paddedWidth);
-
- /* Set up damage tracking */
- pExaPixmap->pDamage = DamageCreate(exaDamageReport_mixed, NULL,
- DamageReportNonEmpty, TRUE,
- pPixmap->drawable.pScreen,
- pPixmap);
-
- DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage);
- /* This ensures that pending damage reflects the current operation. */
- /* This is used by exa to optimize migration. */
- DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE);
- }
- }
-
- /* During a fallback we must prepare access. */
- if (pExaScr->fallback_counter)
- exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST);
-
- return pPixmap;
-}
-
-Bool
-exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
- int bitsPerPixel, int devKind, pointer pPixData)
-{
- ScreenPtr pScreen;
- ExaScreenPrivPtr pExaScr;
- ExaPixmapPrivPtr pExaPixmap;
- Bool ret, has_gpu_copy;
-
- if (!pPixmap)
- return FALSE;
-
- pScreen = pPixmap->drawable.pScreen;
- pExaScr = ExaGetScreenPriv(pScreen);
- pExaPixmap = ExaGetPixmapPriv(pPixmap);
-
- if (pPixData) {
- if (pExaPixmap->driverPriv) {
- if (pExaPixmap->pDamage) {
- DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
- DamageDestroy(pExaPixmap->pDamage);
- pExaPixmap->pDamage = NULL;
- }
-
- pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv);
- pExaPixmap->driverPriv = NULL;
- }
-
- pExaPixmap->use_gpu_copy = FALSE;
- pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
- }
-
- has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
-
- if (width <= 0)
- width = pPixmap->drawable.width;
-
- if (height <= 0)
- height = pPixmap->drawable.height;
-
- if (bitsPerPixel <= 0) {
- if (depth <= 0)
- bitsPerPixel = pPixmap->drawable.bitsPerPixel;
- else
- bitsPerPixel = BitsPerPixel(depth);
- }
-
- if (depth <= 0)
- depth = pPixmap->drawable.depth;
-
- if (width != pPixmap->drawable.width ||
- height != pPixmap->drawable.height ||
- depth != pPixmap->drawable.depth ||
- bitsPerPixel != pPixmap->drawable.bitsPerPixel) {
- if (pExaPixmap->driverPriv) {
- if (devKind > 0)
- pExaPixmap->fb_pitch = devKind;
- else
- exaSetFbPitch(pExaScr, pExaPixmap, width, height, bitsPerPixel);
-
- exaSetAccelBlock(pExaScr, pExaPixmap,
- width, height, bitsPerPixel);
- RegionEmpty(&pExaPixmap->validFB);
- }
-
- /* Need to re-create system copy if there's also a GPU copy */
- if (has_gpu_copy && pExaPixmap->sys_ptr) {
- free(pExaPixmap->sys_ptr);
- pExaPixmap->sys_ptr = NULL;
- pExaPixmap->sys_pitch = PixmapBytePad(width, depth);
- DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
- DamageDestroy(pExaPixmap->pDamage);
- pExaPixmap->pDamage = NULL;
- RegionEmpty(&pExaPixmap->validSys);
-
- if (pExaScr->deferred_mixed_pixmap == pPixmap)
- pExaScr->deferred_mixed_pixmap = NULL;
- }
- }
-
- if (has_gpu_copy) {
- pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
- pPixmap->devKind = pExaPixmap->fb_pitch;
- } else {
- pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
- pPixmap->devKind = pExaPixmap->sys_pitch;
- }
-
- /* Only pass driver pixmaps to the driver. */
- if (pExaScr->info->ModifyPixmapHeader && pExaPixmap->driverPriv) {
- ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth,
- bitsPerPixel, devKind, pPixData);
- if (ret == TRUE)
- goto out;
- }
-
- swap(pExaScr, pScreen, ModifyPixmapHeader);
- ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth,
- bitsPerPixel, devKind, pPixData);
- swap(pExaScr, pScreen, ModifyPixmapHeader);
-
-out:
- if (has_gpu_copy) {
- pExaPixmap->fb_ptr = pPixmap->devPrivate.ptr;
- pExaPixmap->fb_pitch = pPixmap->devKind;
- } else {
- pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
- pExaPixmap->sys_pitch = pPixmap->devKind;
- }
- /* Always NULL this, we don't want lingering pointers. */
- pPixmap->devPrivate.ptr = NULL;
-
- return ret;
-}
-
-Bool
-exaDestroyPixmap_mixed(PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- ExaScreenPriv(pScreen);
- Bool ret;
-
- if (pPixmap->refcnt == 1)
- {
- ExaPixmapPriv (pPixmap);
-
- exaDestroyPixmap(pPixmap);
-
- if (pExaScr->deferred_mixed_pixmap == pPixmap)
- pExaScr->deferred_mixed_pixmap = NULL;
-
- if (pExaPixmap->driverPriv)
- pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv);
- pExaPixmap->driverPriv = NULL;
-
- if (pExaPixmap->pDamage) {
- free(pExaPixmap->sys_ptr);
- pExaPixmap->sys_ptr = NULL;
- pExaPixmap->pDamage = NULL;
- }
- }
-
- swap(pExaScr, pScreen, DestroyPixmap);
- ret = pScreen->DestroyPixmap (pPixmap);
- swap(pExaScr, pScreen, DestroyPixmap);
-
- return ret;
-}
-
-Bool
-exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- ExaScreenPriv(pScreen);
- ExaPixmapPriv(pPixmap);
- pointer saved_ptr;
- Bool ret;
-
- if (!pExaPixmap->driverPriv)
- return FALSE;
-
- saved_ptr = pPixmap->devPrivate.ptr;
- pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
- ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
- pPixmap->devPrivate.ptr = saved_ptr;
-
- return ret;
-}
+/*
+ * Copyright 2009 Maarten Maathuis
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <string.h>
+
+#include "exa_priv.h"
+#include "exa.h"
+
+/* This file holds the driver allocated pixmaps + better initial placement code.
+ */
+
+static _X_INLINE void*
+ExaGetPixmapAddress(PixmapPtr p)
+{
+ ExaPixmapPriv(p);
+
+ return pExaPixmap->sys_ptr;
+}
+
+/**
+ * exaCreatePixmap() creates a new pixmap.
+ */
+PixmapPtr
+exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
+ unsigned class)
+{
+ PixmapPtr pPixmap;
+ ExaPixmapPrivPtr pExaPixmap;
+ int bpp;
+ size_t paddedWidth;
+ ExaScreenPriv(pScreen);
+
+ if (w > 32767 || h > 32767)
+ return NullPixmap;
+
+ swap(pExaScr, pScreen, CreatePixmap);
+ pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, class);
+ swap(pExaScr, pScreen, CreatePixmap);
+
+ if (!pPixmap)
+ return NULL;
+
+ pExaPixmap = ExaGetPixmapPriv(pPixmap);
+ pExaPixmap->driverPriv = NULL;
+
+ bpp = pPixmap->drawable.bitsPerPixel;
+
+ paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits);
+ if (paddedWidth / 4 > 32767 || h > 32767)
+ return NullPixmap;
+
+ /* We will allocate the system pixmap later if needed. */
+ pPixmap->devPrivate.ptr = NULL;
+ pExaPixmap->sys_ptr = NULL;
+ pExaPixmap->sys_pitch = paddedWidth;
+
+ pExaPixmap->area = NULL;
+ pExaPixmap->fb_ptr = NULL;
+ pExaPixmap->pDamage = NULL;
+
+ exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp);
+ exaSetAccelBlock(pExaScr, pExaPixmap,
+ w, h, bpp);
+
+ (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
+ paddedWidth, NULL);
+
+ /* A scratch pixmap will become a driver pixmap right away. */
+ if (!w || !h) {
+ exaCreateDriverPixmap_mixed(pPixmap);
+ pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
+ } else {
+ pExaPixmap->use_gpu_copy = FALSE;
+
+ if (w == 1 && h == 1) {
+ pExaPixmap->sys_ptr = malloc(paddedWidth);
+
+ /* Set up damage tracking */
+ pExaPixmap->pDamage = DamageCreate(exaDamageReport_mixed, NULL,
+ DamageReportNonEmpty, TRUE,
+ pPixmap->drawable.pScreen,
+ pPixmap);
+
+ DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage);
+ /* This ensures that pending damage reflects the current operation. */
+ /* This is used by exa to optimize migration. */
+ DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE);
+ }
+ }
+
+ /* During a fallback we must prepare access. */
+ if (pExaScr->fallback_counter)
+ exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST);
+
+ return pPixmap;
+}
+
+Bool
+exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
+ int bitsPerPixel, int devKind, pointer pPixData)
+{
+ ScreenPtr pScreen;
+ ExaScreenPrivPtr pExaScr;
+ ExaPixmapPrivPtr pExaPixmap;
+ Bool ret, has_gpu_copy;
+
+ if (!pPixmap)
+ return FALSE;
+
+ pScreen = pPixmap->drawable.pScreen;
+ pExaScr = ExaGetScreenPriv(pScreen);
+ pExaPixmap = ExaGetPixmapPriv(pPixmap);
+
+ if (pPixData) {
+ if (pExaPixmap->driverPriv) {
+ if (pExaPixmap->pDamage) {
+ DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
+ DamageDestroy(pExaPixmap->pDamage);
+ pExaPixmap->pDamage = NULL;
+ }
+
+ pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv);
+ pExaPixmap->driverPriv = NULL;
+ }
+
+ pExaPixmap->use_gpu_copy = FALSE;
+ pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
+ }
+
+ has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
+
+ if (width <= 0)
+ width = pPixmap->drawable.width;
+
+ if (height <= 0)
+ height = pPixmap->drawable.height;
+
+ if (bitsPerPixel <= 0) {
+ if (depth <= 0)
+ bitsPerPixel = pPixmap->drawable.bitsPerPixel;
+ else
+ bitsPerPixel = BitsPerPixel(depth);
+ }
+
+ if (depth <= 0)
+ depth = pPixmap->drawable.depth;
+
+ if (width != pPixmap->drawable.width ||
+ height != pPixmap->drawable.height ||
+ depth != pPixmap->drawable.depth ||
+ bitsPerPixel != pPixmap->drawable.bitsPerPixel) {
+ if (pExaPixmap->driverPriv) {
+ if (devKind > 0)
+ pExaPixmap->fb_pitch = devKind;
+ else
+ exaSetFbPitch(pExaScr, pExaPixmap, width, height, bitsPerPixel);
+
+ exaSetAccelBlock(pExaScr, pExaPixmap,
+ width, height, bitsPerPixel);
+ RegionEmpty(&pExaPixmap->validFB);
+ }
+
+ /* Need to re-create system copy if there's also a GPU copy */
+ if (has_gpu_copy && pExaPixmap->sys_ptr) {
+ free(pExaPixmap->sys_ptr);
+ pExaPixmap->sys_ptr = NULL;
+ pExaPixmap->sys_pitch = PixmapBytePad(width, depth);
+ DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
+ DamageDestroy(pExaPixmap->pDamage);
+ pExaPixmap->pDamage = NULL;
+ RegionEmpty(&pExaPixmap->validSys);
+
+ if (pExaScr->deferred_mixed_pixmap == pPixmap)
+ pExaScr->deferred_mixed_pixmap = NULL;
+ }
+ }
+
+ if (has_gpu_copy) {
+ pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
+ pPixmap->devKind = pExaPixmap->fb_pitch;
+ } else {
+ pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
+ pPixmap->devKind = pExaPixmap->sys_pitch;
+ }
+
+ /* Only pass driver pixmaps to the driver. */
+ if (pExaScr->info->ModifyPixmapHeader && pExaPixmap->driverPriv) {
+ ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth,
+ bitsPerPixel, devKind, pPixData);
+ if (ret == TRUE)
+ goto out;
+ }
+
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
+ ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth,
+ bitsPerPixel, devKind, pPixData);
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
+
+out:
+ if (has_gpu_copy) {
+ pExaPixmap->fb_ptr = pPixmap->devPrivate.ptr;
+ pExaPixmap->fb_pitch = pPixmap->devKind;
+ } else {
+ pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
+ pExaPixmap->sys_pitch = pPixmap->devKind;
+ }
+ /* Always NULL this, we don't want lingering pointers. */
+ pPixmap->devPrivate.ptr = NULL;
+
+ return ret;
+}
+
+Bool
+exaDestroyPixmap_mixed(PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ExaScreenPriv(pScreen);
+ Bool ret;
+
+ if (pPixmap->refcnt == 1)
+ {
+ ExaPixmapPriv (pPixmap);
+
+ exaDestroyPixmap(pPixmap);
+
+ if (pExaScr->deferred_mixed_pixmap == pPixmap)
+ pExaScr->deferred_mixed_pixmap = NULL;
+
+ if (pExaPixmap->driverPriv)
+ pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv);
+ pExaPixmap->driverPriv = NULL;
+
+ if (pExaPixmap->pDamage) {
+ free(pExaPixmap->sys_ptr);
+ pExaPixmap->sys_ptr = NULL;
+ pExaPixmap->pDamage = NULL;
+ }
+ }
+
+ swap(pExaScr, pScreen, DestroyPixmap);
+ ret = pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+
+ return ret;
+}
+
+Bool
+exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ExaScreenPriv(pScreen);
+ ExaPixmapPriv(pPixmap);
+ pointer saved_ptr;
+ Bool ret;
+
+ if (!pExaPixmap->driverPriv)
+ return FALSE;
+
+ saved_ptr = pPixmap->devPrivate.ptr;
+ pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
+ ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
+ pPixmap->devPrivate.ptr = saved_ptr;
+
+ return ret;
+}
diff --git a/xorg-server/exa/exa_priv.h b/xorg-server/exa/exa_priv.h
index 1f6dede94..546a3e6e8 100644
--- a/xorg-server/exa/exa_priv.h
+++ b/xorg-server/exa/exa_priv.h
@@ -1,725 +1,725 @@
-/*
- *
- * Copyright (C) 2000 Keith Packard, member of The XFree86 Project, Inc.
- * 2005 Zack Rusin, Trolltech
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#ifndef EXAPRIV_H
-#define EXAPRIV_H
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "exa.h"
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#ifdef MITSHM
-#include "shmint.h"
-#endif
-#include "scrnintstr.h"
-#include "pixmapstr.h"
-#include "windowstr.h"
-#include "servermd.h"
-#include "mibstore.h"
-#include "colormapst.h"
-#include "gcstruct.h"
-#include "input.h"
-#include "mipointer.h"
-#include "mi.h"
-#include "dix.h"
-#include "fb.h"
-#include "fboverlay.h"
-#include "fbpict.h"
-#include "glyphstr.h"
-#include "damage.h"
-
-#define DEBUG_TRACE_FALL 0
-#define DEBUG_MIGRATE 0
-#define DEBUG_PIXMAP 0
-#define DEBUG_OFFSCREEN 0
-#define DEBUG_GLYPH_CACHE 0
-
-#if DEBUG_TRACE_FALL
-#define EXA_FALLBACK(x) \
-do { \
- ErrorF("EXA fallback at %s: ", __FUNCTION__); \
- ErrorF x; \
-} while (0)
-
-char
-exaDrawableLocation(DrawablePtr pDrawable);
-#else
-#define EXA_FALLBACK(x)
-#endif
-
-#if DEBUG_PIXMAP
-#define DBG_PIXMAP(a) ErrorF a
-#else
-#define DBG_PIXMAP(a)
-#endif
-
-#ifndef EXA_MAX_FB
-#define EXA_MAX_FB FB_OVERLAY_MAX
-#endif
-
-#ifdef DEBUG
-#define EXA_FatalErrorDebug(x) FatalError x
-#define EXA_FatalErrorDebugWithRet(x, ret) FatalError x
-#else
-#define EXA_FatalErrorDebug(x) ErrorF x
-#define EXA_FatalErrorDebugWithRet(x, ret) \
-do { \
- ErrorF x; \
- return ret; \
-} while (0)
-#endif
-
-/**
- * This is the list of migration heuristics supported by EXA. See
- * exaDoMigration() for what their implementations do.
- */
-enum ExaMigrationHeuristic {
- ExaMigrationGreedy,
- ExaMigrationAlways,
- ExaMigrationSmart
-};
-
-typedef struct {
- unsigned char sha1[20];
-} ExaCachedGlyphRec, *ExaCachedGlyphPtr;
-
-typedef struct {
- /* The identity of the cache, statically configured at initialization */
- unsigned int format;
- int glyphWidth;
- int glyphHeight;
-
- int size; /* Size of cache; eventually this should be dynamically determined */
-
- /* Hash table mapping from glyph sha1 to position in the glyph; we use
- * open addressing with a hash table size determined based on size and large
- * enough so that we always have a good amount of free space, so we can
- * use linear probing. (Linear probing is preferrable to double hashing
- * here because it allows us to easily remove entries.)
- */
- int *hashEntries;
- int hashSize;
-
- ExaCachedGlyphPtr glyphs;
- int glyphCount; /* Current number of glyphs */
-
- PicturePtr picture; /* Where the glyphs of the cache are stored */
- int yOffset; /* y location within the picture where the cache starts */
- int columns; /* Number of columns the glyphs are layed out in */
- int evictionPosition; /* Next random position to evict a glyph */
-} ExaGlyphCacheRec, *ExaGlyphCachePtr;
-
-#define EXA_NUM_GLYPH_CACHES 4
-
-#define EXA_FALLBACK_COPYWINDOW (1 << 0)
-#define EXA_ACCEL_COPYWINDOW (1 << 1)
-
-typedef struct _ExaMigrationRec {
- Bool as_dst;
- Bool as_src;
- PixmapPtr pPix;
- RegionPtr pReg;
-} ExaMigrationRec, *ExaMigrationPtr;
-
-typedef void (*EnableDisableFBAccessProcPtr)(int, Bool);
-typedef struct {
- ExaDriverPtr info;
- ScreenBlockHandlerProcPtr SavedBlockHandler;
- ScreenWakeupHandlerProcPtr SavedWakeupHandler;
- CreateGCProcPtr SavedCreateGC;
- CloseScreenProcPtr SavedCloseScreen;
- GetImageProcPtr SavedGetImage;
- GetSpansProcPtr SavedGetSpans;
- CreatePixmapProcPtr SavedCreatePixmap;
- DestroyPixmapProcPtr SavedDestroyPixmap;
- CopyWindowProcPtr SavedCopyWindow;
- ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
- BitmapToRegionProcPtr SavedBitmapToRegion;
- CreateScreenResourcesProcPtr SavedCreateScreenResources;
- ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader;
- SourceValidateProcPtr SavedSourceValidate;
- CompositeProcPtr SavedComposite;
- TrianglesProcPtr SavedTriangles;
- GlyphsProcPtr SavedGlyphs;
- TrapezoidsProcPtr SavedTrapezoids;
- AddTrapsProcPtr SavedAddTraps;
- void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
- Bool (*pixmap_has_gpu_copy) (PixmapPtr pPixmap);
- void (*do_move_in_pixmap) (PixmapPtr pPixmap);
- void (*do_move_out_pixmap) (PixmapPtr pPixmap);
- void (*prepare_access_reg)(PixmapPtr pPixmap, int index, RegionPtr pReg);
-
- Bool swappedOut;
- enum ExaMigrationHeuristic migration;
- Bool checkDirtyCorrectness;
- unsigned disableFbCount;
- Bool optimize_migration;
- unsigned offScreenCounter;
- unsigned numOffscreenAvailable;
- CARD32 lastDefragment;
- CARD32 nextDefragment;
- PixmapPtr deferred_mixed_pixmap;
-
- /* Reference counting for accessed pixmaps */
- struct {
- PixmapPtr pixmap;
- int count;
- Bool retval;
- } access[EXA_NUM_PREPARE_INDICES];
-
- /* Holds information on fallbacks that cannot be relayed otherwise. */
- unsigned int fallback_flags;
- unsigned int fallback_counter;
-
- ExaGlyphCacheRec glyphCaches[EXA_NUM_GLYPH_CACHES];
-
- /**
- * Regions affected by fallback composite source / mask operations.
- */
-
- RegionRec srcReg;
- RegionRec maskReg;
- PixmapPtr srcPix;
-
-} ExaScreenPrivRec, *ExaScreenPrivPtr;
-
-/*
- * This is the only completely portable way to
- * compute this info.
- */
-#ifndef BitsPerPixel
-#define BitsPerPixel(d) (\
- PixmapWidthPaddingInfo[d].notPower2 ? \
- (PixmapWidthPaddingInfo[d].bytesPerPixel * 8) : \
- ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
- (PixmapWidthPaddingInfo[d].padRoundUp+1)))
-#endif
-
-extern DevPrivateKeyRec exaScreenPrivateKeyRec;
-#define exaScreenPrivateKey (&exaScreenPrivateKeyRec)
-extern DevPrivateKeyRec exaPixmapPrivateKeyRec;
-#define exaPixmapPrivateKey (&exaPixmapPrivateKeyRec)
-extern DevPrivateKeyRec exaGCPrivateKeyRec;
-#define exaGCPrivateKey (&exaGCPrivateKeyRec)
-
-#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixLookupPrivate(&(s)->devPrivates, exaScreenPrivateKey))
-#define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s)
-
-#define ExaGetGCPriv(gc) ((ExaGCPrivPtr)dixLookupPrivate(&(gc)->devPrivates, exaGCPrivateKey))
-#define ExaGCPriv(gc) ExaGCPrivPtr pExaGC = ExaGetGCPriv(gc)
-
-/*
- * Some macros to deal with function wrapping.
- */
-#define wrap(priv, real, mem, func) {\
- priv->Saved##mem = real->mem; \
- real->mem = func; \
-}
-
-#define unwrap(priv, real, mem) {\
- real->mem = priv->Saved##mem; \
-}
-
-#define swap(priv, real, mem) {\
- void *tmp = priv->Saved##mem; \
- priv->Saved##mem = real->mem; \
- real->mem = tmp; \
-}
-
-#define EXA_PRE_FALLBACK(_screen_) \
- ExaScreenPriv(_screen_); \
- pExaScr->fallback_counter++;
-
-#define EXA_POST_FALLBACK(_screen_) \
- pExaScr->fallback_counter--;
-
-#define EXA_PRE_FALLBACK_GC(_gc_) \
- ExaScreenPriv(_gc_->pScreen); \
- ExaGCPriv(_gc_); \
- pExaScr->fallback_counter++; \
- swap(pExaGC, _gc_, ops);
-
-#define EXA_POST_FALLBACK_GC(_gc_) \
- pExaScr->fallback_counter--; \
- swap(pExaGC, _gc_, ops);
-
-/** Align an offset to an arbitrary alignment */
-#define EXA_ALIGN(offset, align) (((offset) + (align) - 1) - \
- (((offset) + (align) - 1) % (align)))
-/** Align an offset to a power-of-two alignment */
-#define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1))
-
-#define EXA_PIXMAP_SCORE_MOVE_IN 10
-#define EXA_PIXMAP_SCORE_MAX 20
-#define EXA_PIXMAP_SCORE_MOVE_OUT -10
-#define EXA_PIXMAP_SCORE_MIN -20
-#define EXA_PIXMAP_SCORE_PINNED 1000
-#define EXA_PIXMAP_SCORE_INIT 1001
-
-#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)dixLookupPrivate(&(p)->devPrivates, exaPixmapPrivateKey))
-#define ExaSetPixmapPriv(p,a) dixSetPrivate(&(p)->devPrivates, exaPixmapPrivateKey, a)
-#define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p)
-
-#define EXA_RANGE_PITCH (1 << 0)
-#define EXA_RANGE_WIDTH (1 << 1)
-#define EXA_RANGE_HEIGHT (1 << 2)
-
-typedef struct {
- ExaOffscreenArea *area;
- int score; /**< score for the move-in vs move-out heuristic */
- Bool use_gpu_copy;
-
- CARD8 *sys_ptr; /**< pointer to pixmap data in system memory */
- int sys_pitch; /**< pitch of pixmap in system memory */
-
- CARD8 *fb_ptr; /**< pointer to pixmap data in framebuffer memory */
- int fb_pitch; /**< pitch of pixmap in framebuffer memory */
- unsigned int fb_size; /**< size of pixmap in framebuffer memory */
-
- /**
- * Holds information about whether this pixmap can be used for
- * acceleration (== 0) or not (> 0).
- *
- * Contains a OR'ed combination of the following values:
- * EXA_RANGE_PITCH - set if the pixmap's pitch is out of range
- * EXA_RANGE_WIDTH - set if the pixmap's width is out of range
- * EXA_RANGE_HEIGHT - set if the pixmap's height is out of range
- */
- unsigned int accel_blocked;
-
- /**
- * The damage record contains the areas of the pixmap's current location
- * (framebuffer or system) that have been damaged compared to the other
- * location.
- */
- DamagePtr pDamage;
- /**
- * The valid regions mark the valid bits (at least, as they're derived from
- * damage, which may be overreported) of a pixmap's system and FB copies.
- */
- RegionRec validSys, validFB;
- /**
- * Driver private storage per EXA pixmap
- */
- void *driverPriv;
-} ExaPixmapPrivRec, *ExaPixmapPrivPtr;
-
-typedef struct {
- /* GC values from the layer below. */
- GCOps *Savedops;
- GCFuncs *Savedfuncs;
-} ExaGCPrivRec, *ExaGCPrivPtr;
-
-typedef struct {
- PicturePtr pDst;
- INT16 xSrc;
- INT16 ySrc;
- INT16 xMask;
- INT16 yMask;
- INT16 xDst;
- INT16 yDst;
- INT16 width;
- INT16 height;
-} ExaCompositeRectRec, *ExaCompositeRectPtr;
-
-/**
- * exaDDXDriverInit must be implemented by the DDX using EXA, and is the place
- * to set EXA options or hook in screen functions to handle using EXA as the AA.
- */
-void exaDDXDriverInit (ScreenPtr pScreen);
-
-/* exa_unaccel.c */
-void
-exaPrepareAccessGC(GCPtr pGC);
-
-void
-exaFinishAccessGC(GCPtr pGC);
-
-void
-ExaCheckFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nspans,
- DDXPointPtr ppt, int *pwidth, int fSorted);
-
-void
-ExaCheckSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *psrc,
- DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
-
-void
-ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
- int x, int y, int w, int h, int leftPad, int format,
- char *bits);
-
-void
-ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
- BoxPtr pbox, int nbox, int dx, int dy, Bool reverse,
- Bool upsidedown, Pixel bitplane, void *closure);
-
-RegionPtr
-ExaCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
- int srcx, int srcy, int w, int h, int dstx, int dsty);
-
-RegionPtr
-ExaCheckCopyPlane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
- int srcx, int srcy, int w, int h, int dstx, int dsty,
- unsigned long bitPlane);
-
-void
-ExaCheckPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
- DDXPointPtr pptInit);
-
-void
-ExaCheckPolylines (DrawablePtr pDrawable, GCPtr pGC,
- int mode, int npt, DDXPointPtr ppt);
-
-void
-ExaCheckPolySegment (DrawablePtr pDrawable, GCPtr pGC,
- int nsegInit, xSegment *pSegInit);
-
-void
-ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC,
- int narcs, xArc *pArcs);
-
-void
-ExaCheckPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
- int nrect, xRectangle *prect);
-
-void
-ExaCheckImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, unsigned int nglyph,
- CharInfoPtr *ppci, pointer pglyphBase);
-
-void
-ExaCheckPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, unsigned int nglyph,
- CharInfoPtr *ppci, pointer pglyphBase);
-
-void
-ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap,
- DrawablePtr pDrawable,
- int w, int h, int x, int y);
-
-void
-ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
-
-void
-ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
- unsigned int format, unsigned long planeMask, char *d);
-
-void
-ExaCheckGetSpans (DrawablePtr pDrawable,
- int wMax,
- DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- char *pdstStart);
-
-void
-ExaCheckAddTraps (PicturePtr pPicture,
- INT16 x_off,
- INT16 y_off,
- int ntrap,
- xTrap *traps);
-
-/* exa_accel.c */
-
-static _X_INLINE Bool
-exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask,
- unsigned int fillStyle, unsigned char alu,
- unsigned int clientClipType)
-{
- return ((alu != GXcopy && alu != GXclear && alu != GXset &&
- alu != GXcopyInverted) || fillStyle == FillStippled ||
- clientClipType != CT_NONE || !EXA_PM_IS_SOLID(pDrawable, planemask));
-}
-
-void
-exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
-
-Bool
-exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
- DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu,
- unsigned int clientClipType);
-
-void
-exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
- unsigned int format, unsigned long planeMask, char *d);
-
-RegionPtr
-exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
- int srcx, int srcy, int width, int height, int dstx, int dsty);
-
-Bool
-exaHWCopyNtoN (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- BoxPtr pbox,
- int nbox,
- int dx,
- int dy,
- Bool reverse,
- Bool upsidedown);
-
-void
-exaCopyNtoN (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- BoxPtr pbox,
- int nbox,
- int dx,
- int dy,
- Bool reverse,
- Bool upsidedown,
- Pixel bitplane,
- void *closure);
-
-extern const GCOps exaOps;
-
-void
-ExaCheckComposite (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-ExaCheckGlyphs (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc,
- INT16 ySrc,
- int nlist,
- GlyphListPtr list,
- GlyphPtr *glyphs);
-
-/* exa_offscreen.c */
-void
-ExaOffscreenSwapOut (ScreenPtr pScreen);
-
-void
-ExaOffscreenSwapIn (ScreenPtr pScreen);
-
-ExaOffscreenArea*
-ExaOffscreenDefragment (ScreenPtr pScreen);
-
-Bool
-exaOffscreenInit(ScreenPtr pScreen);
-
-void
-ExaOffscreenFini (ScreenPtr pScreen);
-
-/* exa.c */
-Bool
-ExaDoPrepareAccess(PixmapPtr pPixmap, int index);
-
-void
-exaPrepareAccess(DrawablePtr pDrawable, int index);
-
-void
-exaFinishAccess(DrawablePtr pDrawable, int index);
-
-void
-exaDestroyPixmap(PixmapPtr pPixmap);
-
-void
-exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2);
-
-void
-exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
- int *xp, int *yp);
-
-Bool
-exaPixmapHasGpuCopy(PixmapPtr p);
-
-PixmapPtr
-exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp);
-
-PixmapPtr
-exaGetDrawablePixmap(DrawablePtr pDrawable);
-
-void
-exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
- int w, int h, int bpp);
-
-void
-exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
- int w, int h, int bpp);
-
-void
-exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
-
-Bool
-exaPixmapIsPinned (PixmapPtr pPix);
-
-extern const GCFuncs exaGCFuncs;
-
-/* exa_classic.c */
-PixmapPtr
-exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
- unsigned class);
-
-Bool
-exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth,
- int bitsPerPixel, int devKind, pointer pPixData);
-
-Bool
-exaDestroyPixmap_classic (PixmapPtr pPixmap);
-
-Bool
-exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap);
-
-/* exa_driver.c */
-PixmapPtr
-exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
- unsigned class);
-
-Bool
-exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth,
- int bitsPerPixel, int devKind, pointer pPixData);
-
-Bool
-exaDestroyPixmap_driver (PixmapPtr pPixmap);
-
-Bool
-exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap);
-
-/* exa_mixed.c */
-PixmapPtr
-exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
- unsigned class);
-
-Bool
-exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
- int bitsPerPixel, int devKind, pointer pPixData);
-
-Bool
-exaDestroyPixmap_mixed(PixmapPtr pPixmap);
-
-Bool
-exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap);
-
-/* exa_migration_mixed.c */
-void
-exaCreateDriverPixmap_mixed(PixmapPtr pPixmap);
-
-void
-exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
-
-void
-exaMoveInPixmap_mixed(PixmapPtr pPixmap);
-
-void
-exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure);
-
-void
-exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg);
-
-/* exa_render.c */
-Bool
-exaOpReadsDestination (CARD8 op);
-
-void
-exaComposite(CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-exaCompositeRects(CARD8 op,
- PicturePtr Src,
- PicturePtr pMask,
- PicturePtr pDst,
- int nrect,
- ExaCompositeRectPtr rects);
-
-void
-exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
- PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
- int ntrap, xTrapezoid *traps);
-
-void
-exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
- PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
- int ntri, xTriangle *tris);
-
-/* exa_glyph.c */
-void
-exaGlyphsInit(ScreenPtr pScreen);
-
-void
-exaGlyphsFini (ScreenPtr pScreen);
-
-void
-exaGlyphs (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc,
- INT16 ySrc,
- int nlist,
- GlyphListPtr list,
- GlyphPtr *glyphs);
-
-/* exa_migration_classic.c */
-void
-exaCopyDirtyToSys (ExaMigrationPtr migrate);
-
-void
-exaCopyDirtyToFb (ExaMigrationPtr migrate);
-
-void
-exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
-
-void
-exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area);
-
-void
-exaMoveOutPixmap_classic (PixmapPtr pPixmap);
-
-void
-exaMoveInPixmap_classic (PixmapPtr pPixmap);
-
-void
-exaPrepareAccessReg_classic(PixmapPtr pPixmap, int index, RegionPtr pReg);
-
-#endif /* EXAPRIV_H */
+/*
+ *
+ * Copyright (C) 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * 2005 Zack Rusin, Trolltech
+ *
+ * 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, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#ifndef EXAPRIV_H
+#define EXAPRIV_H
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "exa.h"
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#ifdef MITSHM
+#include "shmint.h"
+#endif
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "windowstr.h"
+#include "servermd.h"
+#include "mibstore.h"
+#include "colormapst.h"
+#include "gcstruct.h"
+#include "input.h"
+#include "mipointer.h"
+#include "mi.h"
+#include "dix.h"
+#include "fb.h"
+#include "fboverlay.h"
+#include "fbpict.h"
+#include "glyphstr.h"
+#include "damage.h"
+
+#define DEBUG_TRACE_FALL 0
+#define DEBUG_MIGRATE 0
+#define DEBUG_PIXMAP 0
+#define DEBUG_OFFSCREEN 0
+#define DEBUG_GLYPH_CACHE 0
+
+#if DEBUG_TRACE_FALL
+#define EXA_FALLBACK(x) \
+do { \
+ ErrorF("EXA fallback at %s: ", __FUNCTION__); \
+ ErrorF x; \
+} while (0)
+
+char
+exaDrawableLocation(DrawablePtr pDrawable);
+#else
+#define EXA_FALLBACK(x)
+#endif
+
+#if DEBUG_PIXMAP
+#define DBG_PIXMAP(a) ErrorF a
+#else
+#define DBG_PIXMAP(a)
+#endif
+
+#ifndef EXA_MAX_FB
+#define EXA_MAX_FB FB_OVERLAY_MAX
+#endif
+
+#ifdef DEBUG
+#define EXA_FatalErrorDebug(x) FatalError x
+#define EXA_FatalErrorDebugWithRet(x, ret) FatalError x
+#else
+#define EXA_FatalErrorDebug(x) ErrorF x
+#define EXA_FatalErrorDebugWithRet(x, ret) \
+do { \
+ ErrorF x; \
+ return ret; \
+} while (0)
+#endif
+
+/**
+ * This is the list of migration heuristics supported by EXA. See
+ * exaDoMigration() for what their implementations do.
+ */
+enum ExaMigrationHeuristic {
+ ExaMigrationGreedy,
+ ExaMigrationAlways,
+ ExaMigrationSmart
+};
+
+typedef struct {
+ unsigned char sha1[20];
+} ExaCachedGlyphRec, *ExaCachedGlyphPtr;
+
+typedef struct {
+ /* The identity of the cache, statically configured at initialization */
+ unsigned int format;
+ int glyphWidth;
+ int glyphHeight;
+
+ int size; /* Size of cache; eventually this should be dynamically determined */
+
+ /* Hash table mapping from glyph sha1 to position in the glyph; we use
+ * open addressing with a hash table size determined based on size and large
+ * enough so that we always have a good amount of free space, so we can
+ * use linear probing. (Linear probing is preferrable to double hashing
+ * here because it allows us to easily remove entries.)
+ */
+ int *hashEntries;
+ int hashSize;
+
+ ExaCachedGlyphPtr glyphs;
+ int glyphCount; /* Current number of glyphs */
+
+ PicturePtr picture; /* Where the glyphs of the cache are stored */
+ int yOffset; /* y location within the picture where the cache starts */
+ int columns; /* Number of columns the glyphs are layed out in */
+ int evictionPosition; /* Next random position to evict a glyph */
+} ExaGlyphCacheRec, *ExaGlyphCachePtr;
+
+#define EXA_NUM_GLYPH_CACHES 4
+
+#define EXA_FALLBACK_COPYWINDOW (1 << 0)
+#define EXA_ACCEL_COPYWINDOW (1 << 1)
+
+typedef struct _ExaMigrationRec {
+ Bool as_dst;
+ Bool as_src;
+ PixmapPtr pPix;
+ RegionPtr pReg;
+} ExaMigrationRec, *ExaMigrationPtr;
+
+typedef void (*EnableDisableFBAccessProcPtr)(int, Bool);
+typedef struct {
+ ExaDriverPtr info;
+ ScreenBlockHandlerProcPtr SavedBlockHandler;
+ ScreenWakeupHandlerProcPtr SavedWakeupHandler;
+ CreateGCProcPtr SavedCreateGC;
+ CloseScreenProcPtr SavedCloseScreen;
+ GetImageProcPtr SavedGetImage;
+ GetSpansProcPtr SavedGetSpans;
+ CreatePixmapProcPtr SavedCreatePixmap;
+ DestroyPixmapProcPtr SavedDestroyPixmap;
+ CopyWindowProcPtr SavedCopyWindow;
+ ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
+ BitmapToRegionProcPtr SavedBitmapToRegion;
+ CreateScreenResourcesProcPtr SavedCreateScreenResources;
+ ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader;
+ SourceValidateProcPtr SavedSourceValidate;
+ CompositeProcPtr SavedComposite;
+ TrianglesProcPtr SavedTriangles;
+ GlyphsProcPtr SavedGlyphs;
+ TrapezoidsProcPtr SavedTrapezoids;
+ AddTrapsProcPtr SavedAddTraps;
+ void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
+ Bool (*pixmap_has_gpu_copy) (PixmapPtr pPixmap);
+ void (*do_move_in_pixmap) (PixmapPtr pPixmap);
+ void (*do_move_out_pixmap) (PixmapPtr pPixmap);
+ void (*prepare_access_reg)(PixmapPtr pPixmap, int index, RegionPtr pReg);
+
+ Bool swappedOut;
+ enum ExaMigrationHeuristic migration;
+ Bool checkDirtyCorrectness;
+ unsigned disableFbCount;
+ Bool optimize_migration;
+ unsigned offScreenCounter;
+ unsigned numOffscreenAvailable;
+ CARD32 lastDefragment;
+ CARD32 nextDefragment;
+ PixmapPtr deferred_mixed_pixmap;
+
+ /* Reference counting for accessed pixmaps */
+ struct {
+ PixmapPtr pixmap;
+ int count;
+ Bool retval;
+ } access[EXA_NUM_PREPARE_INDICES];
+
+ /* Holds information on fallbacks that cannot be relayed otherwise. */
+ unsigned int fallback_flags;
+ unsigned int fallback_counter;
+
+ ExaGlyphCacheRec glyphCaches[EXA_NUM_GLYPH_CACHES];
+
+ /**
+ * Regions affected by fallback composite source / mask operations.
+ */
+
+ RegionRec srcReg;
+ RegionRec maskReg;
+ PixmapPtr srcPix;
+
+} ExaScreenPrivRec, *ExaScreenPrivPtr;
+
+/*
+ * This is the only completely portable way to
+ * compute this info.
+ */
+#ifndef BitsPerPixel
+#define BitsPerPixel(d) (\
+ PixmapWidthPaddingInfo[d].notPower2 ? \
+ (PixmapWidthPaddingInfo[d].bytesPerPixel * 8) : \
+ ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
+ (PixmapWidthPaddingInfo[d].padRoundUp+1)))
+#endif
+
+extern DevPrivateKeyRec exaScreenPrivateKeyRec;
+#define exaScreenPrivateKey (&exaScreenPrivateKeyRec)
+extern DevPrivateKeyRec exaPixmapPrivateKeyRec;
+#define exaPixmapPrivateKey (&exaPixmapPrivateKeyRec)
+extern DevPrivateKeyRec exaGCPrivateKeyRec;
+#define exaGCPrivateKey (&exaGCPrivateKeyRec)
+
+#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixLookupPrivate(&(s)->devPrivates, exaScreenPrivateKey))
+#define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s)
+
+#define ExaGetGCPriv(gc) ((ExaGCPrivPtr)dixLookupPrivate(&(gc)->devPrivates, exaGCPrivateKey))
+#define ExaGCPriv(gc) ExaGCPrivPtr pExaGC = ExaGetGCPriv(gc)
+
+/*
+ * Some macros to deal with function wrapping.
+ */
+#define wrap(priv, real, mem, func) {\
+ priv->Saved##mem = real->mem; \
+ real->mem = func; \
+}
+
+#define unwrap(priv, real, mem) {\
+ real->mem = priv->Saved##mem; \
+}
+
+#define swap(priv, real, mem) {\
+ void *tmp = priv->Saved##mem; \
+ priv->Saved##mem = real->mem; \
+ real->mem = tmp; \
+}
+
+#define EXA_PRE_FALLBACK(_screen_) \
+ ExaScreenPriv(_screen_); \
+ pExaScr->fallback_counter++;
+
+#define EXA_POST_FALLBACK(_screen_) \
+ pExaScr->fallback_counter--;
+
+#define EXA_PRE_FALLBACK_GC(_gc_) \
+ ExaScreenPriv(_gc_->pScreen); \
+ ExaGCPriv(_gc_); \
+ pExaScr->fallback_counter++; \
+ swap(pExaGC, _gc_, ops);
+
+#define EXA_POST_FALLBACK_GC(_gc_) \
+ pExaScr->fallback_counter--; \
+ swap(pExaGC, _gc_, ops);
+
+/** Align an offset to an arbitrary alignment */
+#define EXA_ALIGN(offset, align) (((offset) + (align) - 1) - \
+ (((offset) + (align) - 1) % (align)))
+/** Align an offset to a power-of-two alignment */
+#define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1))
+
+#define EXA_PIXMAP_SCORE_MOVE_IN 10
+#define EXA_PIXMAP_SCORE_MAX 20
+#define EXA_PIXMAP_SCORE_MOVE_OUT -10
+#define EXA_PIXMAP_SCORE_MIN -20
+#define EXA_PIXMAP_SCORE_PINNED 1000
+#define EXA_PIXMAP_SCORE_INIT 1001
+
+#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)dixLookupPrivate(&(p)->devPrivates, exaPixmapPrivateKey))
+#define ExaSetPixmapPriv(p,a) dixSetPrivate(&(p)->devPrivates, exaPixmapPrivateKey, a)
+#define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p)
+
+#define EXA_RANGE_PITCH (1 << 0)
+#define EXA_RANGE_WIDTH (1 << 1)
+#define EXA_RANGE_HEIGHT (1 << 2)
+
+typedef struct {
+ ExaOffscreenArea *area;
+ int score; /**< score for the move-in vs move-out heuristic */
+ Bool use_gpu_copy;
+
+ CARD8 *sys_ptr; /**< pointer to pixmap data in system memory */
+ int sys_pitch; /**< pitch of pixmap in system memory */
+
+ CARD8 *fb_ptr; /**< pointer to pixmap data in framebuffer memory */
+ int fb_pitch; /**< pitch of pixmap in framebuffer memory */
+ unsigned int fb_size; /**< size of pixmap in framebuffer memory */
+
+ /**
+ * Holds information about whether this pixmap can be used for
+ * acceleration (== 0) or not (> 0).
+ *
+ * Contains a OR'ed combination of the following values:
+ * EXA_RANGE_PITCH - set if the pixmap's pitch is out of range
+ * EXA_RANGE_WIDTH - set if the pixmap's width is out of range
+ * EXA_RANGE_HEIGHT - set if the pixmap's height is out of range
+ */
+ unsigned int accel_blocked;
+
+ /**
+ * The damage record contains the areas of the pixmap's current location
+ * (framebuffer or system) that have been damaged compared to the other
+ * location.
+ */
+ DamagePtr pDamage;
+ /**
+ * The valid regions mark the valid bits (at least, as they're derived from
+ * damage, which may be overreported) of a pixmap's system and FB copies.
+ */
+ RegionRec validSys, validFB;
+ /**
+ * Driver private storage per EXA pixmap
+ */
+ void *driverPriv;
+} ExaPixmapPrivRec, *ExaPixmapPrivPtr;
+
+typedef struct {
+ /* GC values from the layer below. */
+ GCOps *Savedops;
+ GCFuncs *Savedfuncs;
+} ExaGCPrivRec, *ExaGCPrivPtr;
+
+typedef struct {
+ PicturePtr pDst;
+ INT16 xSrc;
+ INT16 ySrc;
+ INT16 xMask;
+ INT16 yMask;
+ INT16 xDst;
+ INT16 yDst;
+ INT16 width;
+ INT16 height;
+} ExaCompositeRectRec, *ExaCompositeRectPtr;
+
+/**
+ * exaDDXDriverInit must be implemented by the DDX using EXA, and is the place
+ * to set EXA options or hook in screen functions to handle using EXA as the AA.
+ */
+void exaDDXDriverInit (ScreenPtr pScreen);
+
+/* exa_unaccel.c */
+void
+exaPrepareAccessGC(GCPtr pGC);
+
+void
+exaFinishAccessGC(GCPtr pGC);
+
+void
+ExaCheckFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nspans,
+ DDXPointPtr ppt, int *pwidth, int fSorted);
+
+void
+ExaCheckSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *psrc,
+ DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
+
+void
+ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
+ int x, int y, int w, int h, int leftPad, int format,
+ char *bits);
+
+void
+ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
+ BoxPtr pbox, int nbox, int dx, int dy, Bool reverse,
+ Bool upsidedown, Pixel bitplane, void *closure);
+
+RegionPtr
+ExaCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
+ int srcx, int srcy, int w, int h, int dstx, int dsty);
+
+RegionPtr
+ExaCheckCopyPlane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
+ int srcx, int srcy, int w, int h, int dstx, int dsty,
+ unsigned long bitPlane);
+
+void
+ExaCheckPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
+ DDXPointPtr pptInit);
+
+void
+ExaCheckPolylines (DrawablePtr pDrawable, GCPtr pGC,
+ int mode, int npt, DDXPointPtr ppt);
+
+void
+ExaCheckPolySegment (DrawablePtr pDrawable, GCPtr pGC,
+ int nsegInit, xSegment *pSegInit);
+
+void
+ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC,
+ int narcs, xArc *pArcs);
+
+void
+ExaCheckPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
+ int nrect, xRectangle *prect);
+
+void
+ExaCheckImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, unsigned int nglyph,
+ CharInfoPtr *ppci, pointer pglyphBase);
+
+void
+ExaCheckPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, unsigned int nglyph,
+ CharInfoPtr *ppci, pointer pglyphBase);
+
+void
+ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap,
+ DrawablePtr pDrawable,
+ int w, int h, int x, int y);
+
+void
+ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
+
+void
+ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
+ unsigned int format, unsigned long planeMask, char *d);
+
+void
+ExaCheckGetSpans (DrawablePtr pDrawable,
+ int wMax,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ char *pdstStart);
+
+void
+ExaCheckAddTraps (PicturePtr pPicture,
+ INT16 x_off,
+ INT16 y_off,
+ int ntrap,
+ xTrap *traps);
+
+/* exa_accel.c */
+
+static _X_INLINE Bool
+exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask,
+ unsigned int fillStyle, unsigned char alu,
+ unsigned int clientClipType)
+{
+ return ((alu != GXcopy && alu != GXclear && alu != GXset &&
+ alu != GXcopyInverted) || fillStyle == FillStippled ||
+ clientClipType != CT_NONE || !EXA_PM_IS_SOLID(pDrawable, planemask));
+}
+
+void
+exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
+
+Bool
+exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
+ DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu,
+ unsigned int clientClipType);
+
+void
+exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
+ unsigned int format, unsigned long planeMask, char *d);
+
+RegionPtr
+exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
+ int srcx, int srcy, int width, int height, int dstx, int dsty);
+
+Bool
+exaHWCopyNtoN (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse,
+ Bool upsidedown);
+
+void
+exaCopyNtoN (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse,
+ Bool upsidedown,
+ Pixel bitplane,
+ void *closure);
+
+extern const GCOps exaOps;
+
+void
+ExaCheckComposite (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xMask,
+ INT16 yMask,
+ INT16 xDst,
+ INT16 yDst,
+ CARD16 width,
+ CARD16 height);
+
+void
+ExaCheckGlyphs (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc,
+ int nlist,
+ GlyphListPtr list,
+ GlyphPtr *glyphs);
+
+/* exa_offscreen.c */
+void
+ExaOffscreenSwapOut (ScreenPtr pScreen);
+
+void
+ExaOffscreenSwapIn (ScreenPtr pScreen);
+
+ExaOffscreenArea*
+ExaOffscreenDefragment (ScreenPtr pScreen);
+
+Bool
+exaOffscreenInit(ScreenPtr pScreen);
+
+void
+ExaOffscreenFini (ScreenPtr pScreen);
+
+/* exa.c */
+Bool
+ExaDoPrepareAccess(PixmapPtr pPixmap, int index);
+
+void
+exaPrepareAccess(DrawablePtr pDrawable, int index);
+
+void
+exaFinishAccess(DrawablePtr pDrawable, int index);
+
+void
+exaDestroyPixmap(PixmapPtr pPixmap);
+
+void
+exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2);
+
+void
+exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
+ int *xp, int *yp);
+
+Bool
+exaPixmapHasGpuCopy(PixmapPtr p);
+
+PixmapPtr
+exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp);
+
+PixmapPtr
+exaGetDrawablePixmap(DrawablePtr pDrawable);
+
+void
+exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
+ int w, int h, int bpp);
+
+void
+exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
+ int w, int h, int bpp);
+
+void
+exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
+
+Bool
+exaPixmapIsPinned (PixmapPtr pPix);
+
+extern const GCFuncs exaGCFuncs;
+
+/* exa_classic.c */
+PixmapPtr
+exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
+ unsigned class);
+
+Bool
+exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth,
+ int bitsPerPixel, int devKind, pointer pPixData);
+
+Bool
+exaDestroyPixmap_classic (PixmapPtr pPixmap);
+
+Bool
+exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap);
+
+/* exa_driver.c */
+PixmapPtr
+exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
+ unsigned class);
+
+Bool
+exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth,
+ int bitsPerPixel, int devKind, pointer pPixData);
+
+Bool
+exaDestroyPixmap_driver (PixmapPtr pPixmap);
+
+Bool
+exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap);
+
+/* exa_mixed.c */
+PixmapPtr
+exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
+ unsigned class);
+
+Bool
+exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
+ int bitsPerPixel, int devKind, pointer pPixData);
+
+Bool
+exaDestroyPixmap_mixed(PixmapPtr pPixmap);
+
+Bool
+exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap);
+
+/* exa_migration_mixed.c */
+void
+exaCreateDriverPixmap_mixed(PixmapPtr pPixmap);
+
+void
+exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
+
+void
+exaMoveInPixmap_mixed(PixmapPtr pPixmap);
+
+void
+exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure);
+
+void
+exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg);
+
+/* exa_render.c */
+Bool
+exaOpReadsDestination (CARD8 op);
+
+void
+exaComposite(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xMask,
+ INT16 yMask,
+ INT16 xDst,
+ INT16 yDst,
+ CARD16 width,
+ CARD16 height);
+
+void
+exaCompositeRects(CARD8 op,
+ PicturePtr Src,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ int nrect,
+ ExaCompositeRectPtr rects);
+
+void
+exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
+ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
+ int ntrap, xTrapezoid *traps);
+
+void
+exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
+ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
+ int ntri, xTriangle *tris);
+
+/* exa_glyph.c */
+void
+exaGlyphsInit(ScreenPtr pScreen);
+
+void
+exaGlyphsFini (ScreenPtr pScreen);
+
+void
+exaGlyphs (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc,
+ int nlist,
+ GlyphListPtr list,
+ GlyphPtr *glyphs);
+
+/* exa_migration_classic.c */
+void
+exaCopyDirtyToSys (ExaMigrationPtr migrate);
+
+void
+exaCopyDirtyToFb (ExaMigrationPtr migrate);
+
+void
+exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
+
+void
+exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area);
+
+void
+exaMoveOutPixmap_classic (PixmapPtr pPixmap);
+
+void
+exaMoveInPixmap_classic (PixmapPtr pPixmap);
+
+void
+exaPrepareAccessReg_classic(PixmapPtr pPixmap, int index, RegionPtr pReg);
+
+#endif /* EXAPRIV_H */
diff --git a/xorg-server/exa/exa_unaccel.c b/xorg-server/exa/exa_unaccel.c
index 354733921..9c22fc5f1 100644
--- a/xorg-server/exa/exa_unaccel.c
+++ b/xorg-server/exa/exa_unaccel.c
@@ -759,7 +759,7 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap)
return pixel;
}
default:
- FatalError("%s called for invalid bpp %d\n", __func__,
+ FatalError("%s called for invalid bpp %d\n", __FUNCTION__,
pPixmap->drawable.bitsPerPixel);
}
}
diff --git a/xorg-server/exa/makefile b/xorg-server/exa/makefile
new file mode 100644
index 000000000..5ad11a1ed
--- /dev/null
+++ b/xorg-server/exa/makefile
@@ -0,0 +1,14 @@
+LIBRARY=libexa
+
+CSRCS = \
+ exa.c \
+ exa_classic.c \
+ exa_migration_classic.c \
+ exa_driver.c \
+ exa_mixed.c \
+ exa_migration_mixed.c \
+ exa_accel.c \
+ exa_glyphs.c \
+ exa_offscreen.c \
+ exa_render.c \
+ exa_unaccel.c
diff --git a/xorg-server/fb/fb.h b/xorg-server/fb/fb.h
index d90521907..a33cc40ce 100644
--- a/xorg-server/fb/fb.h
+++ b/xorg-server/fb/fb.h
@@ -1,2090 +1,2063 @@
-/*
- *
- * Copyright © 1998 Keith Packard
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-#ifndef _FB_H_
-#define _FB_H_
-
-#include <X11/X.h>
-#include <pixman.h>
-
-#include "scrnintstr.h"
-#include "pixmap.h"
-#include "pixmapstr.h"
-#include "region.h"
-#include "gcstruct.h"
-#include "colormap.h"
-#include "miscstruct.h"
-#include "servermd.h"
-#include "windowstr.h"
-#include "privates.h"
-#include "mi.h"
-#include "migc.h"
-#include "mibstore.h"
-#include "picturestr.h"
-
-#ifdef FB_ACCESS_WRAPPER
-
-#include "wfbrename.h"
-#define FBPREFIX(x) wfb##x
-#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
-#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
-
-#define MEMCPY_WRAPPED(dst, src, size) do { \
- size_t _i; \
- CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \
- for(_i = 0; _i < size; _i++) { \
- WRITE(_dst +_i, READ(_src + _i)); \
- } \
-} while(0)
-
-#define MEMSET_WRAPPED(dst, val, size) do { \
- size_t _i; \
- CARD8 *_dst = (CARD8*)(dst); \
- for(_i = 0; _i < size; _i++) { \
- WRITE(_dst +_i, (val)); \
- } \
-} while(0)
-
-#else
-
-#define FBPREFIX(x) fb##x
-#define WRITE(ptr, val) (*(ptr) = (val))
-#define READ(ptr) (*(ptr))
-#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size))
-#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size))
-
-#endif
-
-/*
- * This single define controls the basic size of data manipulated
- * by this software; it must be log2(sizeof (FbBits) * 8)
- */
-
-#ifndef FB_SHIFT
-#define FB_SHIFT LOG2_BITMAP_PAD
-#endif
-
-#if FB_SHIFT < LOG2_BITMAP_PAD
- error FB_SHIFT must be >= LOG2_BITMAP_PAD
-#endif
-
-#define FB_UNIT (1 << FB_SHIFT)
-#define FB_HALFUNIT (1 << (FB_SHIFT-1))
-#define FB_MASK (FB_UNIT - 1)
-#define FB_ALLONES ((FbBits) -1)
-
-#if GLYPHPADBYTES != 4
-#error "GLYPHPADBYTES must be 4"
-#endif
-/* whether to bother to include 24bpp support */
-#ifndef FBNO24BIT
-#define FB_24BIT
-#endif
-
-/*
- * Unless otherwise instructed, fb includes code to advertise 24bpp
- * windows with 32bpp image format for application compatibility
- */
-
-#ifdef FB_24BIT
-#ifndef FBNO24_32
-#define FB_24_32BIT
-#endif
-#endif
-
-#define FB_STIP_SHIFT LOG2_BITMAP_PAD
-#define FB_STIP_UNIT (1 << FB_STIP_SHIFT)
-#define FB_STIP_MASK (FB_STIP_UNIT - 1)
-#define FB_STIP_ALLONES ((FbStip) -1)
-
-#define FB_STIP_ODDSTRIDE(s) (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)
-#define FB_STIP_ODDPTR(p) ((((long) (p)) & (FB_MASK >> 3)) != 0)
-
-#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
-#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
-
-#define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
-
-#if FB_SHIFT == 6
-# ifdef WIN32
-typedef unsigned __int64 FbBits;
-# else
-# if defined(__alpha__) || defined(__alpha) || \
- defined(ia64) || defined(__ia64__) || \
- defined(__sparc64__) || defined(_LP64) || \
- defined(__s390x__) || \
- defined(amd64) || defined (__amd64__) || \
- defined (__powerpc64__)
-typedef unsigned long FbBits;
-# else
-typedef unsigned long long FbBits;
-# endif
-# endif
-#endif
-
-#if FB_SHIFT == 5
-typedef CARD32 FbBits;
-#endif
-
-#if FB_SHIFT == 4
-typedef CARD16 FbBits;
-#endif
-
-#if LOG2_BITMAP_PAD == FB_SHIFT
-typedef FbBits FbStip;
-#else
-# if LOG2_BITMAP_PAD == 5
-typedef CARD32 FbStip;
-# endif
-#endif
-
-typedef int FbStride;
-
-
-#ifdef FB_DEBUG
-extern _X_EXPORT void fbValidateDrawable(DrawablePtr d);
-extern _X_EXPORT void fbInitializeDrawable(DrawablePtr d);
-extern _X_EXPORT void fbSetBits (FbStip *bits, int stride, FbStip data);
-#define FB_HEAD_BITS (FbStip) (0xbaadf00d)
-#define FB_TAIL_BITS (FbStip) (0xbaddf0ad)
-#else
-#define fbValidateDrawable(d)
-#define fdInitializeDrawable(d)
-#endif
-
-#include "fbrop.h"
-
-#if BITMAP_BIT_ORDER == LSBFirst
-#define FbScrLeft(x,n) ((x) >> (n))
-#define FbScrRight(x,n) ((x) << (n))
-/* #define FbLeftBits(x,n) ((x) & ((((FbBits) 1) << (n)) - 1)) */
-#define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1))
-#define FbStipMoveLsb(x,s,n) (FbStipRight (x,(s)-(n)))
-#define FbPatternOffsetBits 0
-#else
-#define FbScrLeft(x,n) ((x) << (n))
-#define FbScrRight(x,n) ((x) >> (n))
-/* #define FbLeftBits(x,n) ((x) >> (FB_UNIT - (n))) */
-#define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n)))
-#define FbStipMoveLsb(x,s,n) (x)
-#define FbPatternOffsetBits (sizeof (FbBits) - 1)
-#endif
-
-#include "micoord.h"
-
-#define FbStipLeft(x,n) FbScrLeft(x,n)
-#define FbStipRight(x,n) FbScrRight(x,n)
-
-#define FbRotLeft(x,n) FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0)
-#define FbRotRight(x,n) FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0)
-
-#define FbRotStipLeft(x,n) FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0)
-#define FbRotStipRight(x,n) FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0)
-
-#define FbLeftMask(x) ( ((x) & FB_MASK) ? \
- FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0)
-#define FbRightMask(x) ( ((FB_UNIT - (x)) & FB_MASK) ? \
- FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0)
-
-#define FbLeftStipMask(x) ( ((x) & FB_STIP_MASK) ? \
- FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0)
-#define FbRightStipMask(x) ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \
- FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0)
-
-#define FbBitsMask(x,w) (FbScrRight(FB_ALLONES,(x) & FB_MASK) & \
- FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK))
-
-#define FbStipMask(x,w) (FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \
- FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK))
-
-
-#define FbMaskBits(x,w,l,n,r) { \
- n = (w); \
- r = FbRightMask((x)+n); \
- l = FbLeftMask(x); \
- if (l) { \
- n -= FB_UNIT - ((x) & FB_MASK); \
- if (n < 0) { \
- n = 0; \
- l &= r; \
- r = 0; \
- } \
- } \
- n >>= FB_SHIFT; \
-}
-
-#ifdef FBNOPIXADDR
-#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) FbMaskBits(x,w,l,n,r)
-#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
- *dst = FbDoMaskRRop(*dst,and,xor,l); \
-}
-#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
- *dst = FbDoMaskRRop(*dst,and,xor,r); \
-}
-#else
-
-#define FbByteMaskInvalid 0x10
-
-#define FbPatternOffset(o,t) ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1)))
-
-#define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o)))
-#define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3))
-#define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \
- FbSelectPart(xor,off,t)))
-#ifndef FbSelectPart
-#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
-#endif
-
-#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \
- n = (w); \
- lb = 0; \
- rb = 0; \
- r = FbRightMask((x)+n); \
- if (r) { \
- /* compute right byte length */ \
- if ((copy) && (((x) + n) & 7) == 0) { \
- rb = (((x) + n) & FB_MASK) >> 3; \
- } else { \
- rb = FbByteMaskInvalid; \
- } \
- } \
- l = FbLeftMask(x); \
- if (l) { \
- /* compute left byte length */ \
- if ((copy) && ((x) & 7) == 0) { \
- lb = ((x) & FB_MASK) >> 3; \
- } else { \
- lb = FbByteMaskInvalid; \
- } \
- /* subtract out the portion painted by leftMask */ \
- n -= FB_UNIT - ((x) & FB_MASK); \
- if (n < 0) { \
- if (lb != FbByteMaskInvalid) { \
- if (rb == FbByteMaskInvalid) { \
- lb = FbByteMaskInvalid; \
- } else if (rb) { \
- lb |= (rb - lb) << (FB_SHIFT - 3); \
- rb = 0; \
- } \
- } \
- n = 0; \
- l &= r; \
- r = 0; \
- }\
- } \
- n >>= FB_SHIFT; \
-}
-
-#if FB_SHIFT == 6
-#define FbDoLeftMaskByteRRop6Cases(dst,xor) \
- case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 6): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 5): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break; \
- case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 4): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break;
-
-#define FbDoRightMaskByteRRop6Cases(dst,xor) \
- case 4: \
- FbStorePart(dst,0,CARD32,xor); \
- break; \
- case 5: \
- FbStorePart(dst,0,CARD32,xor); \
- FbStorePart(dst,4,CARD8,xor); \
- break; \
- case 6: \
- FbStorePart(dst,0,CARD32,xor); \
- FbStorePart(dst,4,CARD16,xor); \
- break; \
- case 7: \
- FbStorePart(dst,0,CARD32,xor); \
- FbStorePart(dst,4,CARD16,xor); \
- FbStorePart(dst,6,CARD8,xor); \
- break;
-#else
-#define FbDoLeftMaskByteRRop6Cases(dst,xor)
-#define FbDoRightMaskByteRRop6Cases(dst,xor)
-#endif
-
-#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
- switch (lb) { \
- FbDoLeftMaskByteRRop6Cases(dst,xor) \
- case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case sizeof (FbBits) - 3: \
- FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
- case sizeof (FbBits) - 2: \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
- break; \
- case sizeof (FbBits) - 1: \
- FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
- break; \
- default: \
- WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \
- break; \
- } \
-}
-
-
-#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
- switch (rb) { \
- case 1: \
- FbStorePart(dst,0,CARD8,xor); \
- break; \
- case 2: \
- FbStorePart(dst,0,CARD16,xor); \
- break; \
- case 3: \
- FbStorePart(dst,0,CARD16,xor); \
- FbStorePart(dst,2,CARD8,xor); \
- break; \
- FbDoRightMaskByteRRop6Cases(dst,xor) \
- default: \
- WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
- } \
-}
-#endif
-
-#define FbMaskStip(x,w,l,n,r) { \
- n = (w); \
- r = FbRightStipMask((x)+n); \
- l = FbLeftStipMask(x); \
- if (l) { \
- n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \
- if (n < 0) { \
- n = 0; \
- l &= r; \
- r = 0; \
- } \
- } \
- n >>= FB_STIP_SHIFT; \
-}
-
-/*
- * These macros are used to transparently stipple
- * in copy mode; the expected usage is with 'n' constant
- * so all of the conditional parts collapse into a minimal
- * sequence of partial word writes
- *
- * 'n' is the bytemask of which bytes to store, 'a' is the address
- * of the FbBits base unit, 'o' is the offset within that unit
- *
- * The term "lane" comes from the hardware term "byte-lane" which
- */
-
-#define FbLaneCase1(n,a,o) \
- if ((n) == 0x01) { \
- WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), fgxor); \
- }
-
-#define FbLaneCase2(n,a,o) \
- if ((n) == 0x03) { \
- WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), fgxor); \
- } else { \
- FbLaneCase1((n)&1,a,o) \
- FbLaneCase1((n)>>1,a,(o)+1) \
- }
-
-#define FbLaneCase4(n,a,o) \
- if ((n) == 0x0f) { \
- WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), fgxor); \
- } else { \
- FbLaneCase2((n)&3,a,o) \
- FbLaneCase2((n)>>2,a,(o)+2) \
- }
-
-#define FbLaneCase8(n,a,o) \
- if ((n) == 0x0ff) { \
- *(FbBits *) ((a)+(o)) = fgxor; \
- } else { \
- FbLaneCase4((n)&15,a,o) \
- FbLaneCase4((n)>>4,a,(o)+4) \
- }
-
-#if FB_SHIFT == 6
-#define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0)
-#endif
-
-#if FB_SHIFT == 5
-#define FbLaneCase(n,a) FbLaneCase4(n,(CARD8 *) (a),0)
-#endif
-
-/* Rotate a filled pixel value to the specified alignement */
-#define FbRot24(p,b) (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
-#define FbRot24Stip(p,b) (FbStipRight(p,b) | FbStipLeft(p,24-(b)))
-
-/* step a filled pixel value to the next/previous FB_UNIT alignment */
-#define FbNext24Pix(p) (FbRot24(p,(24-FB_UNIT%24)))
-#define FbPrev24Pix(p) (FbRot24(p,FB_UNIT%24))
-#define FbNext24Stip(p) (FbRot24(p,(24-FB_STIP_UNIT%24)))
-#define FbPrev24Stip(p) (FbRot24(p,FB_STIP_UNIT%24))
-
-/* step a rotation value to the next/previous rotation value */
-#if FB_UNIT == 64
-#define FbNext24Rot(r) ((r) == 16 ? 0 : (r) + 8)
-#define FbPrev24Rot(r) ((r) == 0 ? 16 : (r) - 8)
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define FbFirst24Rot(x) (((x) + 8) % 24)
-#else
-#define FbFirst24Rot(x) ((x) % 24)
-#endif
-
-#endif
-
-#if FB_UNIT == 32
-#define FbNext24Rot(r) ((r) == 0 ? 16 : (r) - 8)
-#define FbPrev24Rot(r) ((r) == 16 ? 0 : (r) + 8)
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define FbFirst24Rot(x) (((x) + 16) % 24)
-#else
-#define FbFirst24Rot(x) ((x) % 24)
-#endif
-#endif
-
-#define FbNext24RotStip(r) ((r) == 0 ? 16 : (r) - 8)
-#define FbPrev24RotStip(r) ((r) == 16 ? 0 : (r) + 8)
-
-/* Whether 24-bit specific code is needed for this filled pixel value */
-#define FbCheck24Pix(p) ((p) == FbNext24Pix(p))
-
-/* Macros for dealing with dashing */
-
-#define FbDashDeclare \
- unsigned char *__dash, *__firstDash, *__lastDash
-
-#define FbDashInit(pGC,pPriv,dashOffset,dashlen,even) { \
- (even) = TRUE; \
- __firstDash = (pGC)->dash; \
- __lastDash = __firstDash + (pGC)->numInDashList; \
- (dashOffset) %= (pPriv)->dashLength; \
- \
- __dash = __firstDash; \
- while ((dashOffset) >= ((dashlen) = *__dash)) \
- { \
- (dashOffset) -= (dashlen); \
- (even) = 1-(even); \
- if (++__dash == __lastDash) \
- __dash = __firstDash; \
- } \
- (dashlen) -= (dashOffset); \
-}
-
-#define FbDashNext(dashlen) { \
- if (++__dash == __lastDash) \
- __dash = __firstDash; \
- (dashlen) = *__dash; \
-}
-
-/* as numInDashList is always even, this case can skip a test */
-
-#define FbDashNextEven(dashlen) { \
- (dashlen) = *++__dash; \
-}
-
-#define FbDashNextOdd(dashlen) FbDashNext(dashlen)
-
-#define FbDashStep(dashlen,even) { \
- if (!--(dashlen)) { \
- FbDashNext(dashlen); \
- (even) = 1-(even); \
- } \
-}
-
-extern _X_EXPORT DevPrivateKey
-fbGetGCPrivateKey (void);
-
-extern _X_EXPORT DevPrivateKey
-fbGetWinPrivateKey (void);
-
-extern _X_EXPORT const GCOps fbGCOps;
-extern _X_EXPORT const GCFuncs fbGCFuncs;
-
-#ifdef FB_24_32BIT
-#define FB_SCREEN_PRIVATE
-#endif
-
-/* Framebuffer access wrapper */
-typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size);
-typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size);
-typedef void (*SetupWrapProcPtr)(ReadMemoryProcPtr *pRead,
- WriteMemoryProcPtr *pWrite,
- DrawablePtr pDraw);
-typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw);
-
-#ifdef FB_ACCESS_WRAPPER
-
-#define fbPrepareAccess(pDraw) \
- fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \
- &wfbReadMemory, \
- &wfbWriteMemory, \
- (pDraw))
-#define fbFinishAccess(pDraw) \
- fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw)
-
-#else
-
-#define fbPrepareAccess(pPix)
-#define fbFinishAccess(pDraw)
-
-#endif
-
-
-#ifdef FB_SCREEN_PRIVATE
-extern _X_EXPORT DevPrivateKey
-fbGetScreenPrivateKey(void);
-
-/* private field of a screen */
-typedef struct {
- unsigned char win32bpp; /* window bpp for 32-bpp images */
- unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */
-#ifdef FB_ACCESS_WRAPPER
- SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */
- FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */
-#endif
-} FbScreenPrivRec, *FbScreenPrivPtr;
-
-#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
- dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey()))
-#endif
-
-/* private field of GC */
-typedef struct {
- FbBits and, xor; /* reduced rop values */
- FbBits bgand, bgxor; /* for stipples */
- FbBits fg, bg, pm; /* expanded and filled */
- unsigned int dashLength; /* total of all dash elements */
- unsigned char evenStipple; /* stipple is even */
- unsigned char bpp; /* current drawable bpp */
-} FbGCPrivRec, *FbGCPrivPtr;
-
-#define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\
- dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey()))
-
-#define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip)
-#define fbGetExpose(pGC) ((pGC)->fExpose)
-#define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip)
-#define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap)
-
-#define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate)
-#define fbGetWindowPixmap(pWin) ((PixmapPtr)\
- dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey()))
-
-#ifdef ROOTLESS
-#define __fbPixDrawableX(pPix) ((pPix)->drawable.x)
-#define __fbPixDrawableY(pPix) ((pPix)->drawable.y)
-#else
-#define __fbPixDrawableX(pPix) 0
-#define __fbPixDrawableY(pPix) 0
-#endif
-
-#ifdef COMPOSITE
-#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x)
-#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix) - (pPix)->screen_y)
-#else
-#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix))
-#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix))
-#endif
-#define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix))
-#define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix))
-
-#define fbGetDrawablePixmap(pDrawable, pixmap, xoff, yoff) { \
- if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
- (pixmap) = fbGetWindowPixmap(pDrawable); \
- (xoff) = __fbPixOffXWin(pixmap); \
- (yoff) = __fbPixOffYWin(pixmap); \
- } else { \
- (pixmap) = (PixmapPtr) (pDrawable); \
- (xoff) = __fbPixOffXPix(pixmap); \
- (yoff) = __fbPixOffYPix(pixmap); \
- } \
- fbPrepareAccess(pDrawable); \
-}
-
-#define fbGetPixmapBitsData(pixmap, pointer, stride, bpp) { \
- (pointer) = (FbBits *) (pixmap)->devPrivate.ptr; \
- (stride) = ((int) (pixmap)->devKind) / sizeof (FbBits); (void)(stride); \
- (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \
-}
-
-#define fbGetPixmapStipData(pixmap, pointer, stride, bpp) { \
- (pointer) = (FbStip *) (pixmap)->devPrivate.ptr; \
- (stride) = ((int) (pixmap)->devKind) / sizeof (FbStip); (void)(stride); \
- (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \
-}
-
-#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
- PixmapPtr _pPix; \
- fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
- fbGetPixmapBitsData(_pPix, pointer, stride, bpp); \
-}
-
-#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
- PixmapPtr _pPix; \
- fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
- fbGetPixmapStipData(_pPix, pointer, stride, bpp); \
-}
-
-/*
- * XFree86 empties the root BorderClip when the VT is inactive,
- * here's a macro which uses that to disable GetImage and GetSpans
- */
-
-#define fbWindowEnabled(pWin) \
- RegionNotEmpty(&(pWin)->drawable.pScreen->root->borderClip)
-
-#define fbDrawableEnabled(pDrawable) \
- ((pDrawable)->type == DRAWABLE_PIXMAP ? \
- TRUE : fbWindowEnabled((WindowPtr) pDrawable))
-
-#define FbPowerOfTwo(w) (((w) & ((w) - 1)) == 0)
-/*
- * Accelerated tiles are power of 2 width <= FB_UNIT
- */
-#define FbEvenTile(w) ((w) <= FB_UNIT && FbPowerOfTwo(w))
-/*
- * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
- * with dstBpp a power of 2 as well
- */
-#define FbEvenStip(w,bpp) ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
-
-/*
- * fb24_32.c
- */
-extern _X_EXPORT void
-fb24_32GetSpans(DrawablePtr pDrawable,
- int wMax,
- DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- char *pchardstStart);
-
-extern _X_EXPORT void
-fb24_32SetSpans (DrawablePtr pDrawable,
- GCPtr pGC,
- char *src,
- DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- int fSorted);
-
-extern _X_EXPORT void
-fb24_32PutZImage (DrawablePtr pDrawable,
- RegionPtr pClip,
- int alu,
- FbBits pm,
- int x,
- int y,
- int width,
- int height,
- CARD8 *src,
- FbStride srcStride);
-
-extern _X_EXPORT void
-fb24_32GetImage (DrawablePtr pDrawable,
- int x,
- int y,
- int w,
- int h,
- unsigned int format,
- unsigned long planeMask,
- char *d);
-
-extern _X_EXPORT void
-fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- BoxPtr pbox,
- int nbox,
- int dx,
- int dy,
- Bool reverse,
- Bool upsidedown,
- Pixel bitplane,
- void *closure);
-
-extern _X_EXPORT PixmapPtr
-fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel);
-
-extern _X_EXPORT Bool
-fb24_32CreateScreenResources(ScreenPtr pScreen);
-
-extern _X_EXPORT Bool
-fb24_32ModifyPixmapHeader (PixmapPtr pPixmap,
- int width,
- int height,
- int depth,
- int bitsPerPixel,
- int devKind,
- pointer pPixData);
-
-/*
- * fballpriv.c
- */
-extern _X_EXPORT Bool
-fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCIndex);
-
-/*
- * fbarc.c
- */
-
-extern _X_EXPORT void
-fbPolyArc (DrawablePtr pDrawable,
- GCPtr pGC,
- int narcs,
- xArc *parcs);
-
-/*
- * fbbits.c
- */
-
-extern _X_EXPORT void
-fbBresSolid8(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy,
- int axis,
- int x,
- int y,
- int e,
- int e1,
- int e3,
- int len);
-
-extern _X_EXPORT void
-fbBresDash8 (DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy,
- int axis,
- int x,
- int y,
- int e,
- int e1,
- int e3,
- int len);
-
-extern _X_EXPORT void
-fbDots8 (FbBits *dst,
- FbStride dstStride,
- int dstBpp,
- BoxPtr pBox,
- xPoint *pts,
- int npt,
- int xorg,
- int yorg,
- int xoff,
- int yoff,
- FbBits and,
- FbBits xor);
-
-extern _X_EXPORT void
-fbArc8 (FbBits *dst,
- FbStride dstStride,
- int dstBpp,
- xArc *arc,
- int dx,
- int dy,
- FbBits and,
- FbBits xor);
-
-extern _X_EXPORT void
-fbGlyph8 (FbBits *dstLine,
- FbStride dstStride,
- int dstBpp,
- FbStip *stipple,
- FbBits fg,
- int height,
- int shift);
-
-extern _X_EXPORT void
-fbPolyline8 (DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr ptsOrig);
-
-extern _X_EXPORT void
-fbPolySegment8 (DrawablePtr pDrawable,
- GCPtr pGC,
- int nseg,
- xSegment *pseg);
-
-extern _X_EXPORT void
-fbBresSolid16(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy,
- int axis,
- int x,
- int y,
- int e,
- int e1,
- int e3,
- int len);
-
-extern _X_EXPORT void
-fbBresDash16(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy,
- int axis,
- int x,
- int y,
- int e,
- int e1,
- int e3,
- int len);
-
-extern _X_EXPORT void
-fbDots16(FbBits *dst,
- FbStride dstStride,
- int dstBpp,
- BoxPtr pBox,
- xPoint *pts,
- int npt,
- int xorg,
- int yorg,
- int xoff,
- int yoff,
- FbBits and,
- FbBits xor);
-
-extern _X_EXPORT void
-fbArc16(FbBits *dst,
- FbStride dstStride,
- int dstBpp,
- xArc *arc,
- int dx,
- int dy,
- FbBits and,
- FbBits xor);
-
-extern _X_EXPORT void
-fbGlyph16(FbBits *dstLine,
- FbStride dstStride,
- int dstBpp,
- FbStip *stipple,
- FbBits fg,
- int height,
- int shift);
-
-extern _X_EXPORT void
-fbPolyline16 (DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr ptsOrig);
-
-extern _X_EXPORT void
-fbPolySegment16 (DrawablePtr pDrawable,
- GCPtr pGC,
- int nseg,
- xSegment *pseg);
-
-
-extern _X_EXPORT void
-fbBresSolid24(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy,
- int axis,
- int x,
- int y,
- int e,
- int e1,
- int e3,
- int len);
-
-extern _X_EXPORT void
-fbBresDash24(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy,
- int axis,
- int x,
- int y,
- int e,
- int e1,
- int e3,
- int len);
-
-extern _X_EXPORT void
-fbDots24(FbBits *dst,
- FbStride dstStride,
- int dstBpp,
- BoxPtr pBox,
- xPoint *pts,
- int npt,
- int xorg,
- int yorg,
- int xoff,
- int yoff,
- FbBits and,
- FbBits xor);
-
-extern _X_EXPORT void
-fbArc24(FbBits *dst,
- FbStride dstStride,
- int dstBpp,
- xArc *arc,
- int dx,
- int dy,
- FbBits and,
- FbBits xor);
-
-extern _X_EXPORT void
-fbGlyph24(FbBits *dstLine,
- FbStride dstStride,
- int dstBpp,
- FbStip *stipple,
- FbBits fg,
- int height,
- int shift);
-
-extern _X_EXPORT void
-fbPolyline24 (DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr ptsOrig);
-
-extern _X_EXPORT void
-fbPolySegment24 (DrawablePtr pDrawable,
- GCPtr pGC,
- int nseg,
- xSegment *pseg);
-
-
-extern _X_EXPORT void
-fbBresSolid32(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy,
- int axis,
- int x,
- int y,
- int e,
- int e1,
- int e3,
- int len);
-
-extern _X_EXPORT void
-fbBresDash32(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy,
- int axis,
- int x,
- int y,
- int e,
- int e1,
- int e3,
- int len);
-
-extern _X_EXPORT void
-fbDots32(FbBits *dst,
- FbStride dstStride,
- int dstBpp,
- BoxPtr pBox,
- xPoint *pts,
- int npt,
- int xorg,
- int yorg,
- int xoff,
- int yoff,
- FbBits and,
- FbBits xor);
-
-extern _X_EXPORT void
-fbArc32(FbBits *dst,
- FbStride dstStride,
- int dstBpp,
- xArc *arc,
- int dx,
- int dy,
- FbBits and,
- FbBits xor);
-
-extern _X_EXPORT void
-fbGlyph32(FbBits *dstLine,
- FbStride dstStride,
- int dstBpp,
- FbStip *stipple,
- FbBits fg,
- int height,
- int shift);
-extern _X_EXPORT void
-fbPolyline32 (DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr ptsOrig);
-
-extern _X_EXPORT void
-fbPolySegment32 (DrawablePtr pDrawable,
- GCPtr pGC,
- int nseg,
- xSegment *pseg);
-
-/*
- * fbblt.c
- */
-extern _X_EXPORT void
-fbBlt (FbBits *src,
- FbStride srcStride,
- int srcX,
-
- FbBits *dst,
- FbStride dstStride,
- int dstX,
-
- int width,
- int height,
-
- int alu,
- FbBits pm,
- int bpp,
-
- Bool reverse,
- Bool upsidedown);
-
-extern _X_EXPORT void
-fbBlt24 (FbBits *srcLine,
- FbStride srcStride,
- int srcX,
-
- FbBits *dstLine,
- FbStride dstStride,
- int dstX,
-
- int width,
- int height,
-
- int alu,
- FbBits pm,
-
- Bool reverse,
- Bool upsidedown);
-
-extern _X_EXPORT void
-fbBltStip (FbStip *src,
- FbStride srcStride, /* in FbStip units, not FbBits units */
- int srcX,
-
- FbStip *dst,
- FbStride dstStride, /* in FbStip units, not FbBits units */
- int dstX,
-
- int width,
- int height,
-
- int alu,
- FbBits pm,
- int bpp);
-
-/*
- * fbbltone.c
- */
-extern _X_EXPORT void
-fbBltOne (FbStip *src,
- FbStride srcStride,
- int srcX,
- FbBits *dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
-
- int width,
- int height,
-
- FbBits fgand,
- FbBits fbxor,
- FbBits bgand,
- FbBits bgxor);
-
-#ifdef FB_24BIT
-extern _X_EXPORT void
-fbBltOne24 (FbStip *src,
- FbStride srcStride, /* FbStip units per scanline */
- int srcX, /* bit position of source */
- FbBits *dst,
- FbStride dstStride, /* FbBits units per scanline */
- int dstX, /* bit position of dest */
- int dstBpp, /* bits per destination unit */
-
- int width, /* width in bits of destination */
- int height, /* height in scanlines */
-
- FbBits fgand, /* rrop values */
- FbBits fgxor,
- FbBits bgand,
- FbBits bgxor);
-#endif
-
-extern _X_EXPORT void
-fbBltPlane (FbBits *src,
- FbStride srcStride,
- int srcX,
- int srcBpp,
-
- FbStip *dst,
- FbStride dstStride,
- int dstX,
-
- int width,
- int height,
-
- FbStip fgand,
- FbStip fgxor,
- FbStip bgand,
- FbStip bgxor,
- Pixel planeMask);
-
-/*
- * fbcmap_mi.c
- */
-extern _X_EXPORT int
-fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps);
-
-extern _X_EXPORT void
-fbInstallColormap(ColormapPtr pmap);
-
-extern _X_EXPORT void
-fbUninstallColormap(ColormapPtr pmap);
-
-extern _X_EXPORT void
-fbResolveColor(unsigned short *pred,
- unsigned short *pgreen,
- unsigned short *pblue,
- VisualPtr pVisual);
-
-extern _X_EXPORT Bool
-fbInitializeColormap(ColormapPtr pmap);
-
-extern _X_EXPORT int
-fbExpandDirectColors (ColormapPtr pmap,
- int ndef,
- xColorItem *indefs,
- xColorItem *outdefs);
-
-extern _X_EXPORT Bool
-fbCreateDefColormap(ScreenPtr pScreen);
-
-extern _X_EXPORT void
-fbClearVisualTypes(void);
-
-extern _X_EXPORT Bool
-fbHasVisualTypes (int depth);
-
-extern _X_EXPORT Bool
-fbSetVisualTypes (int depth, int visuals, int bitsPerRGB);
-
-extern _X_EXPORT Bool
-fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB,
- Pixel redMask, Pixel greenMask, Pixel blueMask);
-
-extern _X_EXPORT Bool
-fbInitVisuals (VisualPtr *visualp,
- DepthPtr *depthp,
- int *nvisualp,
- int *ndepthp,
- int *rootDepthp,
- VisualID *defaultVisp,
- unsigned long sizes,
- int bitsPerRGB);
-
-/*
- * fbcopy.c
- */
-
-/* Compatibility definition, to be removed at next ABI change. */
-typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- BoxPtr pDstBox,
- int nbox,
- int dx,
- int dy,
- Bool reverse,
- Bool upsidedown,
- Pixel bitplane,
- void *closure);
-
-extern _X_EXPORT void
-fbCopyNtoN (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- BoxPtr pbox,
- int nbox,
- int dx,
- int dy,
- Bool reverse,
- Bool upsidedown,
- Pixel bitplane,
- void *closure);
-
-/* Compatibility wrapper, to be removed at next ABI change. */
-extern _X_EXPORT void
-fbCopyRegion (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- RegionPtr pDstRegion,
- int dx,
- int dy,
- fbCopyProc copyProc,
- Pixel bitPlane,
- void *closure);
-
-/* Compatibility wrapper, to be removed at next ABI change. */
-extern _X_EXPORT RegionPtr
-fbDoCopy (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- int xIn,
- int yIn,
- int widthSrc,
- int heightSrc,
- int xOut,
- int yOut,
- fbCopyProc copyProc,
- Pixel bitplane,
- void *closure);
-
-extern _X_EXPORT void
-fbCopy1toN (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- BoxPtr pbox,
- int nbox,
- int dx,
- int dy,
- Bool reverse,
- Bool upsidedown,
- Pixel bitplane,
- void *closure);
-
-extern _X_EXPORT void
-fbCopyNto1 (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- BoxPtr pbox,
- int nbox,
- int dx,
- int dy,
- Bool reverse,
- Bool upsidedown,
- Pixel bitplane,
- void *closure);
-
-extern _X_EXPORT RegionPtr
-fbCopyArea (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- int xIn,
- int yIn,
- int widthSrc,
- int heightSrc,
- int xOut,
- int yOut);
-
-extern _X_EXPORT RegionPtr
-fbCopyPlane (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- int xIn,
- int yIn,
- int widthSrc,
- int heightSrc,
- int xOut,
- int yOut,
- unsigned long bitplane);
-
-/*
- * fbfill.c
- */
-extern _X_EXPORT void
-fbFill (DrawablePtr pDrawable,
- GCPtr pGC,
- int x,
- int y,
- int width,
- int height);
-
-extern _X_EXPORT void
-fbSolidBoxClipped (DrawablePtr pDrawable,
- RegionPtr pClip,
- int xa,
- int ya,
- int xb,
- int yb,
- FbBits and,
- FbBits xor);
-
-/*
- * fbfillrect.c
- */
-extern _X_EXPORT void
-fbPolyFillRect(DrawablePtr pDrawable,
- GCPtr pGC,
- int nrectInit,
- xRectangle *prectInit);
-
-#define fbPolyFillArc miPolyFillArc
-
-#define fbFillPolygon miFillPolygon
-
-/*
- * fbfillsp.c
- */
-extern _X_EXPORT void
-fbFillSpans (DrawablePtr pDrawable,
- GCPtr pGC,
- int nInit,
- DDXPointPtr pptInit,
- int *pwidthInit,
- int fSorted);
-
-
-/*
- * fbgc.c
- */
-
-extern _X_EXPORT Bool
-fbCreateGC(GCPtr pGC);
-
-extern _X_EXPORT void
-fbPadPixmap (PixmapPtr pPixmap);
-
-extern _X_EXPORT void
-fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
-
-/*
- * fbgetsp.c
- */
-extern _X_EXPORT void
-fbGetSpans(DrawablePtr pDrawable,
- int wMax,
- DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- char *pchardstStart);
-
-/*
- * fbglyph.c
- */
-
-extern _X_EXPORT Bool
-fbGlyphIn (RegionPtr pRegion,
- int x,
- int y,
- int width,
- int height);
-
-extern _X_EXPORT void
-fbPolyGlyphBlt (DrawablePtr pDrawable,
- GCPtr pGC,
- int x,
- int y,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- pointer pglyphBase);
-
-extern _X_EXPORT void
-fbImageGlyphBlt (DrawablePtr pDrawable,
- GCPtr pGC,
- int x,
- int y,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- pointer pglyphBase);
-
-/*
- * fbimage.c
- */
-
-extern _X_EXPORT void
-fbPutImage (DrawablePtr pDrawable,
- GCPtr pGC,
- int depth,
- int x,
- int y,
- int w,
- int h,
- int leftPad,
- int format,
- char *pImage);
-
-extern _X_EXPORT void
-fbPutZImage (DrawablePtr pDrawable,
- RegionPtr pClip,
- int alu,
- FbBits pm,
- int x,
- int y,
- int width,
- int height,
- FbStip *src,
- FbStride srcStride);
-
-extern _X_EXPORT void
-fbPutXYImage (DrawablePtr pDrawable,
- RegionPtr pClip,
- FbBits fg,
- FbBits bg,
- FbBits pm,
- int alu,
- Bool opaque,
-
- int x,
- int y,
- int width,
- int height,
-
- FbStip *src,
- FbStride srcStride,
- int srcX);
-
-extern _X_EXPORT void
-fbGetImage (DrawablePtr pDrawable,
- int x,
- int y,
- int w,
- int h,
- unsigned int format,
- unsigned long planeMask,
- char *d);
-/*
- * fbline.c
- */
-
-extern _X_EXPORT void
-fbZeroLine (DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr ppt);
-
-extern _X_EXPORT void
-fbZeroSegment (DrawablePtr pDrawable,
- GCPtr pGC,
- int nseg,
- xSegment *pSegs);
-
-extern _X_EXPORT void
-fbPolyLine (DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr ppt);
-
-extern _X_EXPORT void
-fbFixCoordModePrevious (int npt,
- DDXPointPtr ppt);
-
-extern _X_EXPORT void
-fbPolySegment (DrawablePtr pDrawable,
- GCPtr pGC,
- int nseg,
- xSegment *pseg);
-
-#define fbPolyRectangle miPolyRectangle
-
-/*
- * fbpict.c
- */
-
-extern _X_EXPORT Bool
-fbPictureInit (ScreenPtr pScreen,
- PictFormatPtr formats,
- int nformats);
-
-/*
- * fbpixmap.c
- */
-
-extern _X_EXPORT PixmapPtr
-fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
- unsigned class);
-
-extern _X_EXPORT PixmapPtr
-fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
- unsigned class);
-
-extern _X_EXPORT Bool
-fbDestroyPixmap (PixmapPtr pPixmap);
-
-extern _X_EXPORT RegionPtr
-fbPixmapToRegion(PixmapPtr pPix);
-
-/*
- * fbpoint.c
- */
-
-extern _X_EXPORT void
-fbDots (FbBits *dstOrig,
- FbStride dstStride,
- int dstBpp,
- BoxPtr pBox,
- xPoint *pts,
- int npt,
- int xorg,
- int yorg,
- int xoff,
- int yoff,
- FbBits andOrig,
- FbBits xorOrig);
-
-extern _X_EXPORT void
-fbPolyPoint (DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- xPoint *pptInit);
-
-/*
- * fbpush.c
- */
-extern _X_EXPORT void
-fbPushPattern (DrawablePtr pDrawable,
- GCPtr pGC,
-
- FbStip *src,
- FbStride srcStride,
- int srcX,
-
- int x,
- int y,
-
- int width,
- int height);
-
-extern _X_EXPORT void
-fbPushFill (DrawablePtr pDrawable,
- GCPtr pGC,
-
- FbStip *src,
- FbStride srcStride,
- int srcX,
-
- int x,
- int y,
- int width,
- int height);
-
-extern _X_EXPORT void
-fbPushImage (DrawablePtr pDrawable,
- GCPtr pGC,
-
- FbStip *src,
- FbStride srcStride,
- int srcX,
-
- int x,
- int y,
- int width,
- int height);
-
-extern _X_EXPORT void
-fbPushPixels (GCPtr pGC,
- PixmapPtr pBitmap,
- DrawablePtr pDrawable,
- int dx,
- int dy,
- int xOrg,
- int yOrg);
-
-
-/*
- * fbscreen.c
- */
-
-extern _X_EXPORT Bool
-fbCloseScreen (int indx, ScreenPtr pScreen);
-
-extern _X_EXPORT Bool
-fbRealizeFont(ScreenPtr pScreen, FontPtr pFont);
-
-extern _X_EXPORT Bool
-fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
-
-extern _X_EXPORT void
-fbQueryBestSize (int class,
- unsigned short *width, unsigned short *height,
- ScreenPtr pScreen);
-
-extern _X_EXPORT PixmapPtr
-_fbGetWindowPixmap (WindowPtr pWindow);
-
-extern _X_EXPORT void
-_fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap);
-
-extern _X_EXPORT Bool
-fbSetupScreen(ScreenPtr pScreen,
- pointer pbits, /* pointer to screen bitmap */
- int xsize, /* in pixels */
- int ysize,
- int dpix, /* dots per inch */
- int dpiy,
- int width, /* pixel width of frame buffer */
- int bpp); /* bits per pixel of frame buffer */
-
-extern _X_EXPORT Bool
-wfbFinishScreenInit(ScreenPtr pScreen,
- pointer pbits,
- int xsize,
- int ysize,
- int dpix,
- int dpiy,
- int width,
- int bpp,
- SetupWrapProcPtr setupWrap,
- FinishWrapProcPtr finishWrap);
-
-extern _X_EXPORT Bool
-wfbScreenInit(ScreenPtr pScreen,
- pointer pbits,
- int xsize,
- int ysize,
- int dpix,
- int dpiy,
- int width,
- int bpp,
- SetupWrapProcPtr setupWrap,
- FinishWrapProcPtr finishWrap);
-
-extern _X_EXPORT Bool
-fbFinishScreenInit(ScreenPtr pScreen,
- pointer pbits,
- int xsize,
- int ysize,
- int dpix,
- int dpiy,
- int width,
- int bpp);
-
-extern _X_EXPORT Bool
-fbScreenInit(ScreenPtr pScreen,
- pointer pbits,
- int xsize,
- int ysize,
- int dpix,
- int dpiy,
- int width,
- int bpp);
-
-/*
- * fbseg.c
- */
-typedef void FbBres (DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy,
- int axis,
- int x,
- int y,
- int e,
- int e1,
- int e3,
- int len);
-
-extern _X_EXPORT FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash;
-/*
- * fbsetsp.c
- */
-
-extern _X_EXPORT void
-fbSetSpans (DrawablePtr pDrawable,
- GCPtr pGC,
- char *src,
- DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- int fSorted);
-
-extern _X_EXPORT FbBres *
-fbSelectBres (DrawablePtr pDrawable,
- GCPtr pGC);
-
-extern _X_EXPORT void
-fbBres (DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy,
- int axis,
- int x,
- int y,
- int e,
- int e1,
- int e3,
- int len);
-
-extern _X_EXPORT void
-fbSegment (DrawablePtr pDrawable,
- GCPtr pGC,
- int xa,
- int ya,
- int xb,
- int yb,
- Bool drawLast,
- int *dashOffset);
-
-
-/*
- * fbsolid.c
- */
-
-extern _X_EXPORT void
-fbSolid (FbBits *dst,
- FbStride dstStride,
- int dstX,
- int bpp,
-
- int width,
- int height,
-
- FbBits and,
- FbBits xor);
-
-#ifdef FB_24BIT
-extern _X_EXPORT void
-fbSolid24 (FbBits *dst,
- FbStride dstStride,
- int dstX,
-
- int width,
- int height,
-
- FbBits and,
- FbBits xor);
-#endif
-
-/*
- * fbstipple.c
- */
-
-extern _X_EXPORT void
-fbTransparentSpan (FbBits *dst,
- FbBits stip,
- FbBits fgxor,
- int n);
-
-extern _X_EXPORT void
-fbEvenStipple (FbBits *dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
-
- int width,
- int height,
-
- FbStip *stip,
- FbStride stipStride,
- int stipHeight,
-
- FbBits fgand,
- FbBits fgxor,
- FbBits bgand,
- FbBits bgxor,
-
- int xRot,
- int yRot);
-
-extern _X_EXPORT void
-fbOddStipple (FbBits *dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
-
- int width,
- int height,
-
- FbStip *stip,
- FbStride stipStride,
- int stipWidth,
- int stipHeight,
-
- FbBits fgand,
- FbBits fgxor,
- FbBits bgand,
- FbBits bgxor,
-
- int xRot,
- int yRot);
-
-extern _X_EXPORT void
-fbStipple (FbBits *dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
-
- int width,
- int height,
-
- FbStip *stip,
- FbStride stipStride,
- int stipWidth,
- int stipHeight,
- Bool even,
-
- FbBits fgand,
- FbBits fgxor,
- FbBits bgand,
- FbBits bgxor,
-
- int xRot,
- int yRot);
-
-/*
- * fbtile.c
- */
-
-extern _X_EXPORT void
-fbEvenTile (FbBits *dst,
- FbStride dstStride,
- int dstX,
-
- int width,
- int height,
-
- FbBits *tile,
- FbStride tileStride,
- int tileHeight,
-
- int alu,
- FbBits pm,
- int xRot,
- int yRot);
-
-extern _X_EXPORT void
-fbOddTile (FbBits *dst,
- FbStride dstStride,
- int dstX,
-
- int width,
- int height,
-
- FbBits *tile,
- FbStride tileStride,
- int tileWidth,
- int tileHeight,
-
- int alu,
- FbBits pm,
- int bpp,
-
- int xRot,
- int yRot);
-
-extern _X_EXPORT void
-fbTile (FbBits *dst,
- FbStride dstStride,
- int dstX,
-
- int width,
- int height,
-
- FbBits *tile,
- FbStride tileStride,
- int tileWidth,
- int tileHeight,
-
- int alu,
- FbBits pm,
- int bpp,
-
- int xRot,
- int yRot);
-
-/*
- * fbutil.c
- */
-extern _X_EXPORT FbBits
-fbReplicatePixel (Pixel p, int bpp);
-
-extern _X_EXPORT void
-fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp);
-
-#ifdef FB_ACCESS_WRAPPER
-extern _X_EXPORT ReadMemoryProcPtr wfbReadMemory;
-extern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory;
-#endif
-
-/*
- * fbwindow.c
- */
-
-extern _X_EXPORT Bool
-fbCreateWindow(WindowPtr pWin);
-
-extern _X_EXPORT Bool
-fbDestroyWindow(WindowPtr pWin);
-
-extern _X_EXPORT Bool
-fbMapWindow(WindowPtr pWindow);
-
-extern _X_EXPORT Bool
-fbPositionWindow(WindowPtr pWin, int x, int y);
-
-extern _X_EXPORT Bool
-fbUnmapWindow(WindowPtr pWindow);
-
-extern _X_EXPORT void
-fbCopyWindowProc (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- BoxPtr pbox,
- int nbox,
- int dx,
- int dy,
- Bool reverse,
- Bool upsidedown,
- Pixel bitplane,
- void *closure);
-
-extern _X_EXPORT void
-fbCopyWindow(WindowPtr pWin,
- DDXPointRec ptOldOrg,
- RegionPtr prgnSrc);
-
-extern _X_EXPORT Bool
-fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
-
-extern _X_EXPORT void
-fbFillRegionSolid (DrawablePtr pDrawable,
- RegionPtr pRegion,
- FbBits and,
- FbBits xor);
-
-extern _X_EXPORT pixman_image_t *
-image_from_pict (PicturePtr pict,
- Bool has_clip,
- int *xoff,
- int *yoff);
-
-extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *);
-
-#endif /* _FB_H_ */
-
+/*
+ *
+ * Copyright © 1998 Keith Packard
+ *
+ * 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, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+#ifndef _FB_H_
+#define _FB_H_
+
+#include <X11/X.h>
+#include <pixman.h>
+
+#include "scrnintstr.h"
+#include "pixmap.h"
+#include "pixmapstr.h"
+#include "region.h"
+#include "gcstruct.h"
+#include "colormap.h"
+#include "miscstruct.h"
+#include "servermd.h"
+#include "windowstr.h"
+#include "privates.h"
+#include "mi.h"
+#include "migc.h"
+#include "mibstore.h"
+#include "picturestr.h"
+
+#ifdef FB_ACCESS_WRAPPER
+
+#include "wfbrename.h"
+#define FBPREFIX(x) wfb##x
+#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
+#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
+
+#define MEMCPY_WRAPPED(dst, src, size) do { \
+ size_t _i; \
+ CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \
+ for(_i = 0; _i < size; _i++) { \
+ WRITE(_dst +_i, READ(_src + _i)); \
+ } \
+} while(0)
+
+#define MEMSET_WRAPPED(dst, val, size) do { \
+ size_t _i; \
+ CARD8 *_dst = (CARD8*)(dst); \
+ for(_i = 0; _i < size; _i++) { \
+ WRITE(_dst +_i, (val)); \
+ } \
+} while(0)
+
+#else
+
+#define FBPREFIX(x) fb##x
+#define WRITE(ptr, val) (*(ptr) = (val))
+#define READ(ptr) (*(ptr))
+#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size))
+#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size))
+
+#endif
+
+/*
+ * This single define controls the basic size of data manipulated
+ * by this software; it must be log2(sizeof (FbBits) * 8)
+ */
+
+#ifndef FB_SHIFT
+#define FB_SHIFT LOG2_BITMAP_PAD
+#endif
+
+#if FB_SHIFT < LOG2_BITMAP_PAD
+ error FB_SHIFT must be >= LOG2_BITMAP_PAD
+#endif
+
+#define FB_UNIT (1 << FB_SHIFT)
+#define FB_HALFUNIT (1 << (FB_SHIFT-1))
+#define FB_MASK (FB_UNIT - 1)
+#define FB_ALLONES ((FbBits) -1)
+
+#if GLYPHPADBYTES != 4
+#error "GLYPHPADBYTES must be 4"
+#endif
+/* whether to bother to include 24bpp support */
+#ifndef FBNO24BIT
+#define FB_24BIT
+#endif
+
+/*
+ * Unless otherwise instructed, fb includes code to advertise 24bpp
+ * windows with 32bpp image format for application compatibility
+ */
+
+#ifdef FB_24BIT
+#ifndef FBNO24_32
+#define FB_24_32BIT
+#endif
+#endif
+
+#define FB_STIP_SHIFT LOG2_BITMAP_PAD
+#define FB_STIP_UNIT (1 << FB_STIP_SHIFT)
+#define FB_STIP_MASK (FB_STIP_UNIT - 1)
+#define FB_STIP_ALLONES ((FbStip) -1)
+
+#define FB_STIP_ODDSTRIDE(s) (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)
+#define FB_STIP_ODDPTR(p) ((((long) (p)) & (FB_MASK >> 3)) != 0)
+
+#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
+#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
+
+#define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
+
+#if FB_SHIFT == 6
+# ifdef WIN32
+typedef unsigned __int64 FbBits;
+# else
+# if defined(__alpha__) || defined(__alpha) || \
+ defined(ia64) || defined(__ia64__) || \
+ defined(__sparc64__) || defined(_LP64) || \
+ defined(__s390x__) || \
+ defined(amd64) || defined (__amd64__) || \
+ defined (__powerpc64__)
+typedef unsigned long FbBits;
+# else
+typedef unsigned long long FbBits;
+# endif
+# endif
+#endif
+
+#if FB_SHIFT == 5
+typedef CARD32 FbBits;
+#endif
+
+#if FB_SHIFT == 4
+typedef CARD16 FbBits;
+#endif
+
+#if LOG2_BITMAP_PAD == FB_SHIFT
+typedef FbBits FbStip;
+#else
+# if LOG2_BITMAP_PAD == 5
+typedef CARD32 FbStip;
+# endif
+#endif
+
+typedef int FbStride;
+
+
+#ifdef FB_DEBUG
+extern _X_EXPORT void fbValidateDrawable(DrawablePtr d);
+extern _X_EXPORT void fbInitializeDrawable(DrawablePtr d);
+extern _X_EXPORT void fbSetBits (FbStip *bits, int stride, FbStip data);
+#define FB_HEAD_BITS (FbStip) (0xbaadf00d)
+#define FB_TAIL_BITS (FbStip) (0xbaddf0ad)
+#else
+#define fbValidateDrawable(d)
+#define fdInitializeDrawable(d)
+#endif
+
+#include "fbrop.h"
+
+#if BITMAP_BIT_ORDER == LSBFirst
+#define FbScrLeft(x,n) ((x) >> (n))
+#define FbScrRight(x,n) ((x) << (n))
+/* #define FbLeftBits(x,n) ((x) & ((((FbBits) 1) << (n)) - 1)) */
+#define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1))
+#define FbStipMoveLsb(x,s,n) (FbStipRight (x,(s)-(n)))
+#define FbPatternOffsetBits 0
+#else
+#define FbScrLeft(x,n) ((x) << (n))
+#define FbScrRight(x,n) ((x) >> (n))
+/* #define FbLeftBits(x,n) ((x) >> (FB_UNIT - (n))) */
+#define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n)))
+#define FbStipMoveLsb(x,s,n) (x)
+#define FbPatternOffsetBits (sizeof (FbBits) - 1)
+#endif
+
+#include "micoord.h"
+
+#define FbStipLeft(x,n) FbScrLeft(x,n)
+#define FbStipRight(x,n) FbScrRight(x,n)
+
+#define FbRotLeft(x,n) FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0)
+#define FbRotRight(x,n) FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0)
+
+#define FbRotStipLeft(x,n) FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0)
+#define FbRotStipRight(x,n) FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0)
+
+#define FbLeftMask(x) ( ((x) & FB_MASK) ? \
+ FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0)
+#define FbRightMask(x) ( ((FB_UNIT - (x)) & FB_MASK) ? \
+ FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0)
+
+#define FbLeftStipMask(x) ( ((x) & FB_STIP_MASK) ? \
+ FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0)
+#define FbRightStipMask(x) ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \
+ FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0)
+
+#define FbBitsMask(x,w) (FbScrRight(FB_ALLONES,(x) & FB_MASK) & \
+ FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK))
+
+#define FbStipMask(x,w) (FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \
+ FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK))
+
+
+#define FbMaskBits(x,w,l,n,r) { \
+ n = (w); \
+ r = FbRightMask((x)+n); \
+ l = FbLeftMask(x); \
+ if (l) { \
+ n -= FB_UNIT - ((x) & FB_MASK); \
+ if (n < 0) { \
+ n = 0; \
+ l &= r; \
+ r = 0; \
+ } \
+ } \
+ n >>= FB_SHIFT; \
+}
+
+#ifdef FBNOPIXADDR
+#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) FbMaskBits(x,w,l,n,r)
+#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
+ *dst = FbDoMaskRRop(*dst,and,xor,l); \
+}
+#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
+ *dst = FbDoMaskRRop(*dst,and,xor,r); \
+}
+#else
+
+#define FbByteMaskInvalid 0x10
+
+#define FbPatternOffset(o,t) ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1)))
+
+#define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o)))
+#define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3))
+#define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \
+ FbSelectPart(xor,off,t)))
+#ifndef FbSelectPart
+#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
+#endif
+
+#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \
+ n = (w); \
+ lb = 0; \
+ rb = 0; \
+ r = FbRightMask((x)+n); \
+ if (r) { \
+ /* compute right byte length */ \
+ if ((copy) && (((x) + n) & 7) == 0) { \
+ rb = (((x) + n) & FB_MASK) >> 3; \
+ } else { \
+ rb = FbByteMaskInvalid; \
+ } \
+ } \
+ l = FbLeftMask(x); \
+ if (l) { \
+ /* compute left byte length */ \
+ if ((copy) && ((x) & 7) == 0) { \
+ lb = ((x) & FB_MASK) >> 3; \
+ } else { \
+ lb = FbByteMaskInvalid; \
+ } \
+ /* subtract out the portion painted by leftMask */ \
+ n -= FB_UNIT - ((x) & FB_MASK); \
+ if (n < 0) { \
+ if (lb != FbByteMaskInvalid) { \
+ if (rb == FbByteMaskInvalid) { \
+ lb = FbByteMaskInvalid; \
+ } else if (rb) { \
+ lb |= (rb - lb) << (FB_SHIFT - 3); \
+ rb = 0; \
+ } \
+ } \
+ n = 0; \
+ l &= r; \
+ r = 0; \
+ }\
+ } \
+ n >>= FB_SHIFT; \
+}
+
+#if FB_SHIFT == 6
+#define FbDoLeftMaskByteRRop6Cases(dst,xor) \
+ case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 7): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+ break; \
+ case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 6): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+ break; \
+ case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 5): \
+ FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+ break; \
+ case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 4): \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+ break;
+
+#define FbDoRightMaskByteRRop6Cases(dst,xor) \
+ case 4: \
+ FbStorePart(dst,0,CARD32,xor); \
+ break; \
+ case 5: \
+ FbStorePart(dst,0,CARD32,xor); \
+ FbStorePart(dst,4,CARD8,xor); \
+ break; \
+ case 6: \
+ FbStorePart(dst,0,CARD32,xor); \
+ FbStorePart(dst,4,CARD16,xor); \
+ break; \
+ case 7: \
+ FbStorePart(dst,0,CARD32,xor); \
+ FbStorePart(dst,4,CARD16,xor); \
+ FbStorePart(dst,6,CARD8,xor); \
+ break;
+#else
+#define FbDoLeftMaskByteRRop6Cases(dst,xor)
+#define FbDoRightMaskByteRRop6Cases(dst,xor)
+#endif
+
+#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
+ switch (lb) { \
+ FbDoLeftMaskByteRRop6Cases(dst,xor) \
+ case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case sizeof (FbBits) - 3: \
+ FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
+ case sizeof (FbBits) - 2: \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
+ break; \
+ case sizeof (FbBits) - 1: \
+ FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
+ break; \
+ default: \
+ WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \
+ break; \
+ } \
+}
+
+
+#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
+ switch (rb) { \
+ case 1: \
+ FbStorePart(dst,0,CARD8,xor); \
+ break; \
+ case 2: \
+ FbStorePart(dst,0,CARD16,xor); \
+ break; \
+ case 3: \
+ FbStorePart(dst,0,CARD16,xor); \
+ FbStorePart(dst,2,CARD8,xor); \
+ break; \
+ FbDoRightMaskByteRRop6Cases(dst,xor) \
+ default: \
+ WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
+ } \
+}
+#endif
+
+#define FbMaskStip(x,w,l,n,r) { \
+ n = (w); \
+ r = FbRightStipMask((x)+n); \
+ l = FbLeftStipMask(x); \
+ if (l) { \
+ n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \
+ if (n < 0) { \
+ n = 0; \
+ l &= r; \
+ r = 0; \
+ } \
+ } \
+ n >>= FB_STIP_SHIFT; \
+}
+
+/*
+ * These macros are used to transparently stipple
+ * in copy mode; the expected usage is with 'n' constant
+ * so all of the conditional parts collapse into a minimal
+ * sequence of partial word writes
+ *
+ * 'n' is the bytemask of which bytes to store, 'a' is the address
+ * of the FbBits base unit, 'o' is the offset within that unit
+ *
+ * The term "lane" comes from the hardware term "byte-lane" which
+ */
+
+#define FbLaneCase1(n,a,o) \
+ if ((n) == 0x01) { \
+ WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), fgxor); \
+ }
+
+#define FbLaneCase2(n,a,o) \
+ if ((n) == 0x03) { \
+ WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), fgxor); \
+ } else { \
+ FbLaneCase1((n)&1,a,o) \
+ FbLaneCase1((n)>>1,a,(o)+1) \
+ }
+
+#define FbLaneCase4(n,a,o) \
+ if ((n) == 0x0f) { \
+ WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), fgxor); \
+ } else { \
+ FbLaneCase2((n)&3,a,o) \
+ FbLaneCase2((n)>>2,a,(o)+2) \
+ }
+
+#define FbLaneCase8(n,a,o) \
+ if ((n) == 0x0ff) { \
+ *(FbBits *) ((a)+(o)) = fgxor; \
+ } else { \
+ FbLaneCase4((n)&15,a,o) \
+ FbLaneCase4((n)>>4,a,(o)+4) \
+ }
+
+#if FB_SHIFT == 6
+#define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0)
+#endif
+
+#if FB_SHIFT == 5
+#define FbLaneCase(n,a) FbLaneCase4(n,(CARD8 *) (a),0)
+#endif
+
+/* Rotate a filled pixel value to the specified alignement */
+#define FbRot24(p,b) (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
+#define FbRot24Stip(p,b) (FbStipRight(p,b) | FbStipLeft(p,24-(b)))
+
+/* step a filled pixel value to the next/previous FB_UNIT alignment */
+#define FbNext24Pix(p) (FbRot24(p,(24-FB_UNIT%24)))
+#define FbPrev24Pix(p) (FbRot24(p,FB_UNIT%24))
+#define FbNext24Stip(p) (FbRot24(p,(24-FB_STIP_UNIT%24)))
+#define FbPrev24Stip(p) (FbRot24(p,FB_STIP_UNIT%24))
+
+/* step a rotation value to the next/previous rotation value */
+#if FB_UNIT == 64
+#define FbNext24Rot(r) ((r) == 16 ? 0 : (r) + 8)
+#define FbPrev24Rot(r) ((r) == 0 ? 16 : (r) - 8)
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+#define FbFirst24Rot(x) (((x) + 8) % 24)
+#else
+#define FbFirst24Rot(x) ((x) % 24)
+#endif
+
+#endif
+
+#if FB_UNIT == 32
+#define FbNext24Rot(r) ((r) == 0 ? 16 : (r) - 8)
+#define FbPrev24Rot(r) ((r) == 16 ? 0 : (r) + 8)
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+#define FbFirst24Rot(x) (((x) + 16) % 24)
+#else
+#define FbFirst24Rot(x) ((x) % 24)
+#endif
+#endif
+
+#define FbNext24RotStip(r) ((r) == 0 ? 16 : (r) - 8)
+#define FbPrev24RotStip(r) ((r) == 16 ? 0 : (r) + 8)
+
+/* Whether 24-bit specific code is needed for this filled pixel value */
+#define FbCheck24Pix(p) ((p) == FbNext24Pix(p))
+
+/* Macros for dealing with dashing */
+
+#define FbDashDeclare \
+ unsigned char *__dash, *__firstDash, *__lastDash
+
+#define FbDashInit(pGC,pPriv,dashOffset,dashlen,even) { \
+ (even) = TRUE; \
+ __firstDash = (pGC)->dash; \
+ __lastDash = __firstDash + (pGC)->numInDashList; \
+ (dashOffset) %= (pPriv)->dashLength; \
+ \
+ __dash = __firstDash; \
+ while ((dashOffset) >= ((dashlen) = *__dash)) \
+ { \
+ (dashOffset) -= (dashlen); \
+ (even) = 1-(even); \
+ if (++__dash == __lastDash) \
+ __dash = __firstDash; \
+ } \
+ (dashlen) -= (dashOffset); \
+}
+
+#define FbDashNext(dashlen) { \
+ if (++__dash == __lastDash) \
+ __dash = __firstDash; \
+ (dashlen) = *__dash; \
+}
+
+/* as numInDashList is always even, this case can skip a test */
+
+#define FbDashNextEven(dashlen) { \
+ (dashlen) = *++__dash; \
+}
+
+#define FbDashNextOdd(dashlen) FbDashNext(dashlen)
+
+#define FbDashStep(dashlen,even) { \
+ if (!--(dashlen)) { \
+ FbDashNext(dashlen); \
+ (even) = 1-(even); \
+ } \
+}
+
+extern _X_EXPORT DevPrivateKey
+fbGetGCPrivateKey (void);
+
+extern _X_EXPORT DevPrivateKey
+fbGetWinPrivateKey (void);
+
+extern _X_EXPORT const GCOps fbGCOps;
+extern _X_EXPORT const GCFuncs fbGCFuncs;
+
+#ifdef FB_24_32BIT
+#define FB_SCREEN_PRIVATE
+#endif
+
+/* Framebuffer access wrapper */
+typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size);
+typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size);
+typedef void (*SetupWrapProcPtr)(ReadMemoryProcPtr *pRead,
+ WriteMemoryProcPtr *pWrite,
+ DrawablePtr pDraw);
+typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw);
+
+#ifdef FB_ACCESS_WRAPPER
+
+#define fbPrepareAccess(pDraw) \
+ fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \
+ &wfbReadMemory, \
+ &wfbWriteMemory, \
+ (pDraw))
+#define fbFinishAccess(pDraw) \
+ fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw)
+
+#else
+
+#define fbPrepareAccess(pPix)
+#define fbFinishAccess(pDraw)
+
+#endif
+
+
+#ifdef FB_SCREEN_PRIVATE
+extern _X_EXPORT DevPrivateKey
+fbGetScreenPrivateKey(void);
+
+/* private field of a screen */
+typedef struct {
+ unsigned char win32bpp; /* window bpp for 32-bpp images */
+ unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */
+#ifdef FB_ACCESS_WRAPPER
+ SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */
+ FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */
+#endif
+} FbScreenPrivRec, *FbScreenPrivPtr;
+
+#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey()))
+#endif
+
+/* private field of GC */
+typedef struct {
+ FbBits and, xor; /* reduced rop values */
+ FbBits bgand, bgxor; /* for stipples */
+ FbBits fg, bg, pm; /* expanded and filled */
+ unsigned int dashLength; /* total of all dash elements */
+ unsigned char evenStipple; /* stipple is even */
+ unsigned char bpp; /* current drawable bpp */
+} FbGCPrivRec, *FbGCPrivPtr;
+
+#define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\
+ dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey()))
+
+#define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip)
+#define fbGetExpose(pGC) ((pGC)->fExpose)
+#define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip)
+#define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap)
+
+#define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate)
+#define fbGetWindowPixmap(pWin) ((PixmapPtr)\
+ dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey()))
+
+#ifdef ROOTLESS
+#define __fbPixDrawableX(pPix) ((pPix)->drawable.x)
+#define __fbPixDrawableY(pPix) ((pPix)->drawable.y)
+#else
+#define __fbPixDrawableX(pPix) 0
+#define __fbPixDrawableY(pPix) 0
+#endif
+
+#ifdef COMPOSITE
+#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x)
+#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix) - (pPix)->screen_y)
+#else
+#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix))
+#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix))
+#endif
+#define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix))
+#define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix))
+
+#define fbGetDrawablePixmap(pDrawable, pixmap, xoff, yoff) { \
+ if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
+ (pixmap) = fbGetWindowPixmap(pDrawable); \
+ (xoff) = __fbPixOffXWin(pixmap); \
+ (yoff) = __fbPixOffYWin(pixmap); \
+ } else { \
+ (pixmap) = (PixmapPtr) (pDrawable); \
+ (xoff) = __fbPixOffXPix(pixmap); \
+ (yoff) = __fbPixOffYPix(pixmap); \
+ } \
+ fbPrepareAccess(pDrawable); \
+}
+
+#define fbGetPixmapBitsData(pixmap, pointer, stride, bpp) { \
+ (pointer) = (FbBits *) (pixmap)->devPrivate.ptr; \
+ (stride) = ((int) (pixmap)->devKind) / sizeof (FbBits); (void)(stride); \
+ (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \
+}
+
+#define fbGetPixmapStipData(pixmap, pointer, stride, bpp) { \
+ (pointer) = (FbStip *) (pixmap)->devPrivate.ptr; \
+ (stride) = ((int) (pixmap)->devKind) / sizeof (FbStip); (void)(stride); \
+ (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \
+}
+
+#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
+ PixmapPtr _pPix; \
+ fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
+ fbGetPixmapBitsData(_pPix, pointer, stride, bpp); \
+}
+
+#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
+ PixmapPtr _pPix; \
+ fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
+ fbGetPixmapStipData(_pPix, pointer, stride, bpp); \
+}
+
+/*
+ * XFree86 empties the root BorderClip when the VT is inactive,
+ * here's a macro which uses that to disable GetImage and GetSpans
+ */
+
+#define fbWindowEnabled(pWin) \
+ RegionNotEmpty(&(pWin)->drawable.pScreen->root->borderClip)
+
+#define fbDrawableEnabled(pDrawable) \
+ ((pDrawable)->type == DRAWABLE_PIXMAP ? \
+ TRUE : fbWindowEnabled((WindowPtr) pDrawable))
+
+#define FbPowerOfTwo(w) (((w) & ((w) - 1)) == 0)
+/*
+ * Accelerated tiles are power of 2 width <= FB_UNIT
+ */
+#define FbEvenTile(w) ((w) <= FB_UNIT && FbPowerOfTwo(w))
+/*
+ * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
+ * with dstBpp a power of 2 as well
+ */
+#define FbEvenStip(w,bpp) ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
+
+/*
+ * fb24_32.c
+ */
+extern _X_EXPORT void
+fb24_32GetSpans(DrawablePtr pDrawable,
+ int wMax,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ char *pchardstStart);
+
+extern _X_EXPORT void
+fb24_32SetSpans (DrawablePtr pDrawable,
+ GCPtr pGC,
+ char *src,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ int fSorted);
+
+extern _X_EXPORT void
+fb24_32PutZImage (DrawablePtr pDrawable,
+ RegionPtr pClip,
+ int alu,
+ FbBits pm,
+ int x,
+ int y,
+ int width,
+ int height,
+ CARD8 *src,
+ FbStride srcStride);
+
+extern _X_EXPORT void
+fb24_32GetImage (DrawablePtr pDrawable,
+ int x,
+ int y,
+ int w,
+ int h,
+ unsigned int format,
+ unsigned long planeMask,
+ char *d);
+
+extern _X_EXPORT void
+fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse,
+ Bool upsidedown,
+ Pixel bitplane,
+ void *closure);
+
+extern _X_EXPORT PixmapPtr
+fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel);
+
+extern _X_EXPORT Bool
+fb24_32CreateScreenResources(ScreenPtr pScreen);
+
+extern _X_EXPORT Bool
+fb24_32ModifyPixmapHeader (PixmapPtr pPixmap,
+ int width,
+ int height,
+ int depth,
+ int bitsPerPixel,
+ int devKind,
+ pointer pPixData);
+
+/*
+ * fballpriv.c
+ */
+extern _X_EXPORT Bool
+fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCIndex);
+
+/*
+ * fbarc.c
+ */
+
+extern _X_EXPORT void
+fbPolyArc (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int narcs,
+ xArc *parcs);
+
+/*
+ * fbbits.c
+ */
+
+extern _X_EXPORT void
+fbBresSolid8(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis,
+ int x,
+ int y,
+ int e,
+ int e1,
+ int e3,
+ int len);
+
+extern _X_EXPORT void
+fbBresDash8 (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis,
+ int x,
+ int y,
+ int e,
+ int e1,
+ int e3,
+ int len);
+
+extern _X_EXPORT void
+fbDots8 (FbBits *dst,
+ FbStride dstStride,
+ int dstBpp,
+ BoxPtr pBox,
+ xPoint *pts,
+ int npt,
+ int xorg,
+ int yorg,
+ int xoff,
+ int yoff,
+ FbBits and,
+ FbBits xor);
+
+extern _X_EXPORT void
+fbArc8 (FbBits *dst,
+ FbStride dstStride,
+ int dstBpp,
+ xArc *arc,
+ int dx,
+ int dy,
+ FbBits and,
+ FbBits xor);
+
+extern _X_EXPORT void
+fbGlyph8 (FbBits *dstLine,
+ FbStride dstStride,
+ int dstBpp,
+ FbStip *stipple,
+ FbBits fg,
+ int height,
+ int shift);
+
+extern _X_EXPORT void
+fbPolyline8 (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr ptsOrig);
+
+extern _X_EXPORT void
+fbPolySegment8 (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pseg);
+
+extern _X_EXPORT void
+fbBresSolid16(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis,
+ int x,
+ int y,
+ int e,
+ int e1,
+ int e3,
+ int len);
+
+extern _X_EXPORT void
+fbBresDash16(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis,
+ int x,
+ int y,
+ int e,
+ int e1,
+ int e3,
+ int len);
+
+extern _X_EXPORT void
+fbDots16(FbBits *dst,
+ FbStride dstStride,
+ int dstBpp,
+ BoxPtr pBox,
+ xPoint *pts,
+ int npt,
+ int xorg,
+ int yorg,
+ int xoff,
+ int yoff,
+ FbBits and,
+ FbBits xor);
+
+extern _X_EXPORT void
+fbArc16(FbBits *dst,
+ FbStride dstStride,
+ int dstBpp,
+ xArc *arc,
+ int dx,
+ int dy,
+ FbBits and,
+ FbBits xor);
+
+extern _X_EXPORT void
+fbGlyph16(FbBits *dstLine,
+ FbStride dstStride,
+ int dstBpp,
+ FbStip *stipple,
+ FbBits fg,
+ int height,
+ int shift);
+
+extern _X_EXPORT void
+fbPolyline16 (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr ptsOrig);
+
+extern _X_EXPORT void
+fbPolySegment16 (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pseg);
+
+
+extern _X_EXPORT void
+fbBresSolid24(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis,
+ int x,
+ int y,
+ int e,
+ int e1,
+ int e3,
+ int len);
+
+extern _X_EXPORT void
+fbBresDash24(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis,
+ int x,
+ int y,
+ int e,
+ int e1,
+ int e3,
+ int len);
+
+extern _X_EXPORT void
+fbDots24(FbBits *dst,
+ FbStride dstStride,
+ int dstBpp,
+ BoxPtr pBox,
+ xPoint *pts,
+ int npt,
+ int xorg,
+ int yorg,
+ int xoff,
+ int yoff,
+ FbBits and,
+ FbBits xor);
+
+extern _X_EXPORT void
+fbArc24(FbBits *dst,
+ FbStride dstStride,
+ int dstBpp,
+ xArc *arc,
+ int dx,
+ int dy,
+ FbBits and,
+ FbBits xor);
+
+extern _X_EXPORT void
+fbGlyph24(FbBits *dstLine,
+ FbStride dstStride,
+ int dstBpp,
+ FbStip *stipple,
+ FbBits fg,
+ int height,
+ int shift);
+
+extern _X_EXPORT void
+fbPolyline24 (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr ptsOrig);
+
+extern _X_EXPORT void
+fbPolySegment24 (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pseg);
+
+
+extern _X_EXPORT void
+fbBresSolid32(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis,
+ int x,
+ int y,
+ int e,
+ int e1,
+ int e3,
+ int len);
+
+extern _X_EXPORT void
+fbBresDash32(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis,
+ int x,
+ int y,
+ int e,
+ int e1,
+ int e3,
+ int len);
+
+extern _X_EXPORT void
+fbDots32(FbBits *dst,
+ FbStride dstStride,
+ int dstBpp,
+ BoxPtr pBox,
+ xPoint *pts,
+ int npt,
+ int xorg,
+ int yorg,
+ int xoff,
+ int yoff,
+ FbBits and,
+ FbBits xor);
+
+extern _X_EXPORT void
+fbArc32(FbBits *dst,
+ FbStride dstStride,
+ int dstBpp,
+ xArc *arc,
+ int dx,
+ int dy,
+ FbBits and,
+ FbBits xor);
+
+extern _X_EXPORT void
+fbGlyph32(FbBits *dstLine,
+ FbStride dstStride,
+ int dstBpp,
+ FbStip *stipple,
+ FbBits fg,
+ int height,
+ int shift);
+extern _X_EXPORT void
+fbPolyline32 (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr ptsOrig);
+
+extern _X_EXPORT void
+fbPolySegment32 (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pseg);
+
+/*
+ * fbblt.c
+ */
+extern _X_EXPORT void
+fbBlt (FbBits *src,
+ FbStride srcStride,
+ int srcX,
+
+ FbBits *dst,
+ FbStride dstStride,
+ int dstX,
+
+ int width,
+ int height,
+
+ int alu,
+ FbBits pm,
+ int bpp,
+
+ Bool reverse,
+ Bool upsidedown);
+
+extern _X_EXPORT void
+fbBlt24 (FbBits *srcLine,
+ FbStride srcStride,
+ int srcX,
+
+ FbBits *dstLine,
+ FbStride dstStride,
+ int dstX,
+
+ int width,
+ int height,
+
+ int alu,
+ FbBits pm,
+
+ Bool reverse,
+ Bool upsidedown);
+
+extern _X_EXPORT void
+fbBltStip (FbStip *src,
+ FbStride srcStride, /* in FbStip units, not FbBits units */
+ int srcX,
+
+ FbStip *dst,
+ FbStride dstStride, /* in FbStip units, not FbBits units */
+ int dstX,
+
+ int width,
+ int height,
+
+ int alu,
+ FbBits pm,
+ int bpp);
+
+/*
+ * fbbltone.c
+ */
+extern _X_EXPORT void
+fbBltOne (FbStip *src,
+ FbStride srcStride,
+ int srcX,
+ FbBits *dst,
+ FbStride dstStride,
+ int dstX,
+ int dstBpp,
+
+ int width,
+ int height,
+
+ FbBits fgand,
+ FbBits fbxor,
+ FbBits bgand,
+ FbBits bgxor);
+
+#ifdef FB_24BIT
+extern _X_EXPORT void
+fbBltOne24 (FbStip *src,
+ FbStride srcStride, /* FbStip units per scanline */
+ int srcX, /* bit position of source */
+ FbBits *dst,
+ FbStride dstStride, /* FbBits units per scanline */
+ int dstX, /* bit position of dest */
+ int dstBpp, /* bits per destination unit */
+
+ int width, /* width in bits of destination */
+ int height, /* height in scanlines */
+
+ FbBits fgand, /* rrop values */
+ FbBits fgxor,
+ FbBits bgand,
+ FbBits bgxor);
+#endif
+
+extern _X_EXPORT void
+fbBltPlane (FbBits *src,
+ FbStride srcStride,
+ int srcX,
+ int srcBpp,
+
+ FbStip *dst,
+ FbStride dstStride,
+ int dstX,
+
+ int width,
+ int height,
+
+ FbStip fgand,
+ FbStip fgxor,
+ FbStip bgand,
+ FbStip bgxor,
+ Pixel planeMask);
+
+/*
+ * fbcmap_mi.c
+ */
+extern _X_EXPORT int
+fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps);
+
+extern _X_EXPORT void
+fbInstallColormap(ColormapPtr pmap);
+
+extern _X_EXPORT void
+fbUninstallColormap(ColormapPtr pmap);
+
+extern _X_EXPORT void
+fbResolveColor(unsigned short *pred,
+ unsigned short *pgreen,
+ unsigned short *pblue,
+ VisualPtr pVisual);
+
+extern _X_EXPORT Bool
+fbInitializeColormap(ColormapPtr pmap);
+
+extern _X_EXPORT int
+fbExpandDirectColors (ColormapPtr pmap,
+ int ndef,
+ xColorItem *indefs,
+ xColorItem *outdefs);
+
+extern _X_EXPORT Bool
+fbCreateDefColormap(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+fbClearVisualTypes(void);
+
+extern _X_EXPORT Bool
+fbHasVisualTypes (int depth);
+
+extern _X_EXPORT Bool
+fbSetVisualTypes (int depth, int visuals, int bitsPerRGB);
+
+extern _X_EXPORT Bool
+fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB,
+ Pixel redMask, Pixel greenMask, Pixel blueMask);
+
+extern _X_EXPORT Bool
+fbInitVisuals (VisualPtr *visualp,
+ DepthPtr *depthp,
+ int *nvisualp,
+ int *ndepthp,
+ int *rootDepthp,
+ VisualID *defaultVisp,
+ unsigned long sizes,
+ int bitsPerRGB);
+
+/*
+ * fbcopy.c
+ */
+
+/* Compatibility definition, to be removed at next ABI change. */
+typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pDstBox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse,
+ Bool upsidedown,
+ Pixel bitplane,
+ void *closure);
+
+extern _X_EXPORT void
+fbCopyNtoN (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse,
+ Bool upsidedown,
+ Pixel bitplane,
+ void *closure);
+
+extern _X_EXPORT void
+fbCopy1toN (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse,
+ Bool upsidedown,
+ Pixel bitplane,
+ void *closure);
+
+extern _X_EXPORT void
+fbCopyNto1 (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse,
+ Bool upsidedown,
+ Pixel bitplane,
+ void *closure);
+
+extern _X_EXPORT RegionPtr
+fbCopyArea (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ int xIn,
+ int yIn,
+ int widthSrc,
+ int heightSrc,
+ int xOut,
+ int yOut);
+
+extern _X_EXPORT RegionPtr
+fbCopyPlane (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ int xIn,
+ int yIn,
+ int widthSrc,
+ int heightSrc,
+ int xOut,
+ int yOut,
+ unsigned long bitplane);
+
+/*
+ * fbfill.c
+ */
+extern _X_EXPORT void
+fbFill (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ int width,
+ int height);
+
+extern _X_EXPORT void
+fbSolidBoxClipped (DrawablePtr pDrawable,
+ RegionPtr pClip,
+ int xa,
+ int ya,
+ int xb,
+ int yb,
+ FbBits and,
+ FbBits xor);
+
+/*
+ * fbfillrect.c
+ */
+extern _X_EXPORT void
+fbPolyFillRect(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nrectInit,
+ xRectangle *prectInit);
+
+#define fbPolyFillArc miPolyFillArc
+
+#define fbFillPolygon miFillPolygon
+
+/*
+ * fbfillsp.c
+ */
+extern _X_EXPORT void
+fbFillSpans (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nInit,
+ DDXPointPtr pptInit,
+ int *pwidthInit,
+ int fSorted);
+
+
+/*
+ * fbgc.c
+ */
+
+extern _X_EXPORT Bool
+fbCreateGC(GCPtr pGC);
+
+extern _X_EXPORT void
+fbPadPixmap (PixmapPtr pPixmap);
+
+extern _X_EXPORT void
+fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
+
+/*
+ * fbgetsp.c
+ */
+extern _X_EXPORT void
+fbGetSpans(DrawablePtr pDrawable,
+ int wMax,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ char *pchardstStart);
+
+/*
+ * fbglyph.c
+ */
+
+extern _X_EXPORT Bool
+fbGlyphIn (RegionPtr pRegion,
+ int x,
+ int y,
+ int width,
+ int height);
+
+extern _X_EXPORT void
+fbPolyGlyphBlt (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ pointer pglyphBase);
+
+extern _X_EXPORT void
+fbImageGlyphBlt (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ pointer pglyphBase);
+
+/*
+ * fbimage.c
+ */
+
+extern _X_EXPORT void
+fbPutImage (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int depth,
+ int x,
+ int y,
+ int w,
+ int h,
+ int leftPad,
+ int format,
+ char *pImage);
+
+extern _X_EXPORT void
+fbPutZImage (DrawablePtr pDrawable,
+ RegionPtr pClip,
+ int alu,
+ FbBits pm,
+ int x,
+ int y,
+ int width,
+ int height,
+ FbStip *src,
+ FbStride srcStride);
+
+extern _X_EXPORT void
+fbPutXYImage (DrawablePtr pDrawable,
+ RegionPtr pClip,
+ FbBits fg,
+ FbBits bg,
+ FbBits pm,
+ int alu,
+ Bool opaque,
+
+ int x,
+ int y,
+ int width,
+ int height,
+
+ FbStip *src,
+ FbStride srcStride,
+ int srcX);
+
+extern _X_EXPORT void
+fbGetImage (DrawablePtr pDrawable,
+ int x,
+ int y,
+ int w,
+ int h,
+ unsigned int format,
+ unsigned long planeMask,
+ char *d);
+/*
+ * fbline.c
+ */
+
+extern _X_EXPORT void
+fbZeroLine (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr ppt);
+
+extern _X_EXPORT void
+fbZeroSegment (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pSegs);
+
+extern _X_EXPORT void
+fbPolyLine (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr ppt);
+
+extern _X_EXPORT void
+fbFixCoordModePrevious (int npt,
+ DDXPointPtr ppt);
+
+extern _X_EXPORT void
+fbPolySegment (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pseg);
+
+#define fbPolyRectangle miPolyRectangle
+
+/*
+ * fbpict.c
+ */
+
+extern _X_EXPORT Bool
+fbPictureInit (ScreenPtr pScreen,
+ PictFormatPtr formats,
+ int nformats);
+
+/*
+ * fbpixmap.c
+ */
+
+extern _X_EXPORT PixmapPtr
+fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
+ unsigned class);
+
+extern _X_EXPORT PixmapPtr
+fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
+ unsigned class);
+
+extern _X_EXPORT Bool
+fbDestroyPixmap (PixmapPtr pPixmap);
+
+extern _X_EXPORT RegionPtr
+fbPixmapToRegion(PixmapPtr pPix);
+
+/*
+ * fbpoint.c
+ */
+
+extern _X_EXPORT void
+fbDots (FbBits *dstOrig,
+ FbStride dstStride,
+ int dstBpp,
+ BoxPtr pBox,
+ xPoint *pts,
+ int npt,
+ int xorg,
+ int yorg,
+ int xoff,
+ int yoff,
+ FbBits andOrig,
+ FbBits xorOrig);
+
+extern _X_EXPORT void
+fbPolyPoint (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ xPoint *pptInit);
+
+/*
+ * fbpush.c
+ */
+extern _X_EXPORT void
+fbPushPattern (DrawablePtr pDrawable,
+ GCPtr pGC,
+
+ FbStip *src,
+ FbStride srcStride,
+ int srcX,
+
+ int x,
+ int y,
+
+ int width,
+ int height);
+
+extern _X_EXPORT void
+fbPushFill (DrawablePtr pDrawable,
+ GCPtr pGC,
+
+ FbStip *src,
+ FbStride srcStride,
+ int srcX,
+
+ int x,
+ int y,
+ int width,
+ int height);
+
+extern _X_EXPORT void
+fbPushImage (DrawablePtr pDrawable,
+ GCPtr pGC,
+
+ FbStip *src,
+ FbStride srcStride,
+ int srcX,
+
+ int x,
+ int y,
+ int width,
+ int height);
+
+extern _X_EXPORT void
+fbPushPixels (GCPtr pGC,
+ PixmapPtr pBitmap,
+ DrawablePtr pDrawable,
+ int dx,
+ int dy,
+ int xOrg,
+ int yOrg);
+
+
+/*
+ * fbscreen.c
+ */
+
+extern _X_EXPORT Bool
+fbCloseScreen (int indx, ScreenPtr pScreen);
+
+extern _X_EXPORT Bool
+fbRealizeFont(ScreenPtr pScreen, FontPtr pFont);
+
+extern _X_EXPORT Bool
+fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
+
+extern _X_EXPORT void
+fbQueryBestSize (int class,
+ unsigned short *width, unsigned short *height,
+ ScreenPtr pScreen);
+
+extern _X_EXPORT PixmapPtr
+_fbGetWindowPixmap (WindowPtr pWindow);
+
+extern _X_EXPORT void
+_fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap);
+
+extern _X_EXPORT Bool
+fbSetupScreen(ScreenPtr pScreen,
+ pointer pbits, /* pointer to screen bitmap */
+ int xsize, /* in pixels */
+ int ysize,
+ int dpix, /* dots per inch */
+ int dpiy,
+ int width, /* pixel width of frame buffer */
+ int bpp); /* bits per pixel of frame buffer */
+
+extern _X_EXPORT Bool
+wfbFinishScreenInit(ScreenPtr pScreen,
+ pointer pbits,
+ int xsize,
+ int ysize,
+ int dpix,
+ int dpiy,
+ int width,
+ int bpp,
+ SetupWrapProcPtr setupWrap,
+ FinishWrapProcPtr finishWrap);
+
+extern _X_EXPORT Bool
+wfbScreenInit(ScreenPtr pScreen,
+ pointer pbits,
+ int xsize,
+ int ysize,
+ int dpix,
+ int dpiy,
+ int width,
+ int bpp,
+ SetupWrapProcPtr setupWrap,
+ FinishWrapProcPtr finishWrap);
+
+extern _X_EXPORT Bool
+fbFinishScreenInit(ScreenPtr pScreen,
+ pointer pbits,
+ int xsize,
+ int ysize,
+ int dpix,
+ int dpiy,
+ int width,
+ int bpp);
+
+extern _X_EXPORT Bool
+fbScreenInit(ScreenPtr pScreen,
+ pointer pbits,
+ int xsize,
+ int ysize,
+ int dpix,
+ int dpiy,
+ int width,
+ int bpp);
+
+/*
+ * fbseg.c
+ */
+typedef void FbBres (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis,
+ int x,
+ int y,
+ int e,
+ int e1,
+ int e3,
+ int len);
+
+extern _X_EXPORT FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash;
+/*
+ * fbsetsp.c
+ */
+
+extern _X_EXPORT void
+fbSetSpans (DrawablePtr pDrawable,
+ GCPtr pGC,
+ char *src,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ int fSorted);
+
+extern _X_EXPORT FbBres *
+fbSelectBres (DrawablePtr pDrawable,
+ GCPtr pGC);
+
+extern _X_EXPORT void
+fbBres (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis,
+ int x,
+ int y,
+ int e,
+ int e1,
+ int e3,
+ int len);
+
+extern _X_EXPORT void
+fbSegment (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int xa,
+ int ya,
+ int xb,
+ int yb,
+ Bool drawLast,
+ int *dashOffset);
+
+
+/*
+ * fbsolid.c
+ */
+
+extern _X_EXPORT void
+fbSolid (FbBits *dst,
+ FbStride dstStride,
+ int dstX,
+ int bpp,
+
+ int width,
+ int height,
+
+ FbBits and,
+ FbBits xor);
+
+#ifdef FB_24BIT
+extern _X_EXPORT void
+fbSolid24 (FbBits *dst,
+ FbStride dstStride,
+ int dstX,
+
+ int width,
+ int height,
+
+ FbBits and,
+ FbBits xor);
+#endif
+
+/*
+ * fbstipple.c
+ */
+
+extern _X_EXPORT void
+fbTransparentSpan (FbBits *dst,
+ FbBits stip,
+ FbBits fgxor,
+ int n);
+
+extern _X_EXPORT void
+fbEvenStipple (FbBits *dst,
+ FbStride dstStride,
+ int dstX,
+ int dstBpp,
+
+ int width,
+ int height,
+
+ FbStip *stip,
+ FbStride stipStride,
+ int stipHeight,
+
+ FbBits fgand,
+ FbBits fgxor,
+ FbBits bgand,
+ FbBits bgxor,
+
+ int xRot,
+ int yRot);
+
+extern _X_EXPORT void
+fbOddStipple (FbBits *dst,
+ FbStride dstStride,
+ int dstX,
+ int dstBpp,
+
+ int width,
+ int height,
+
+ FbStip *stip,
+ FbStride stipStride,
+ int stipWidth,
+ int stipHeight,
+
+ FbBits fgand,
+ FbBits fgxor,
+ FbBits bgand,
+ FbBits bgxor,
+
+ int xRot,
+ int yRot);
+
+extern _X_EXPORT void
+fbStipple (FbBits *dst,
+ FbStride dstStride,
+ int dstX,
+ int dstBpp,
+
+ int width,
+ int height,
+
+ FbStip *stip,
+ FbStride stipStride,
+ int stipWidth,
+ int stipHeight,
+ Bool even,
+
+ FbBits fgand,
+ FbBits fgxor,
+ FbBits bgand,
+ FbBits bgxor,
+
+ int xRot,
+ int yRot);
+
+/*
+ * fbtile.c
+ */
+
+extern _X_EXPORT void
+fbEvenTile (FbBits *dst,
+ FbStride dstStride,
+ int dstX,
+
+ int width,
+ int height,
+
+ FbBits *tile,
+ FbStride tileStride,
+ int tileHeight,
+
+ int alu,
+ FbBits pm,
+ int xRot,
+ int yRot);
+
+extern _X_EXPORT void
+fbOddTile (FbBits *dst,
+ FbStride dstStride,
+ int dstX,
+
+ int width,
+ int height,
+
+ FbBits *tile,
+ FbStride tileStride,
+ int tileWidth,
+ int tileHeight,
+
+ int alu,
+ FbBits pm,
+ int bpp,
+
+ int xRot,
+ int yRot);
+
+extern _X_EXPORT void
+fbTile (FbBits *dst,
+ FbStride dstStride,
+ int dstX,
+
+ int width,
+ int height,
+
+ FbBits *tile,
+ FbStride tileStride,
+ int tileWidth,
+ int tileHeight,
+
+ int alu,
+ FbBits pm,
+ int bpp,
+
+ int xRot,
+ int yRot);
+
+/*
+ * fbutil.c
+ */
+extern _X_EXPORT FbBits
+fbReplicatePixel (Pixel p, int bpp);
+
+extern _X_EXPORT void
+fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp);
+
+#ifdef FB_ACCESS_WRAPPER
+extern _X_EXPORT ReadMemoryProcPtr wfbReadMemory;
+extern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory;
+#endif
+
+/*
+ * fbwindow.c
+ */
+
+extern _X_EXPORT Bool
+fbCreateWindow(WindowPtr pWin);
+
+extern _X_EXPORT Bool
+fbDestroyWindow(WindowPtr pWin);
+
+extern _X_EXPORT Bool
+fbMapWindow(WindowPtr pWindow);
+
+extern _X_EXPORT Bool
+fbPositionWindow(WindowPtr pWin, int x, int y);
+
+extern _X_EXPORT Bool
+fbUnmapWindow(WindowPtr pWindow);
+
+extern _X_EXPORT void
+fbCopyWindowProc (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse,
+ Bool upsidedown,
+ Pixel bitplane,
+ void *closure);
+
+extern _X_EXPORT void
+fbCopyWindow(WindowPtr pWin,
+ DDXPointRec ptOldOrg,
+ RegionPtr prgnSrc);
+
+extern _X_EXPORT Bool
+fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
+
+extern _X_EXPORT void
+fbFillRegionSolid (DrawablePtr pDrawable,
+ RegionPtr pRegion,
+ FbBits and,
+ FbBits xor);
+
+extern _X_EXPORT pixman_image_t *
+image_from_pict (PicturePtr pict,
+ Bool has_clip,
+ int *xoff,
+ int *yoff);
+
+extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *);
+
+#endif /* _FB_H_ */
+
diff --git a/xorg-server/fb/fb24_32.c b/xorg-server/fb/fb24_32.c
index e24f394bc..b402a2357 100644
--- a/xorg-server/fb/fb24_32.c
+++ b/xorg-server/fb/fb24_32.c
@@ -1,635 +1,635 @@
-/*
- * Copyright © 2000 SuSE, Inc.
- *
- * 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, and that the name of SuSE not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. SuSE makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Keith Packard, SuSE, Inc.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <string.h>
-
-#include "fb.h"
-
-/* X apps don't like 24bpp images, this code exposes 32bpp images */
-
-/*
- * These two functions do a full CopyArea while reformatting
- * the data between 24 and 32bpp. They try to go a bit faster
- * by reading/writing aligned CARD32s where it's easy
- */
-
-#define Get8(a) ((CARD32) READ(a))
-
-#if BITMAP_BIT_ORDER == MSBFirst
-#define Get24(a) ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2))
-#define Put24(a,p) ((WRITE((a+0), (CARD8) ((p) >> 16))), \
- (WRITE((a+1), (CARD8) ((p) >> 8))), \
- (WRITE((a+2), (CARD8) (p))))
-#else
-#define Get24(a) (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16))
-#define Put24(a,p) ((WRITE((a+0), (CARD8) (p))), \
- (WRITE((a+1), (CARD8) ((p) >> 8))), \
- (WRITE((a+2), (CARD8) ((p) >> 16))))
-#endif
-
-typedef void (*fb24_32BltFunc) (CARD8 *srcLine,
- FbStride srcStride,
- int srcX,
-
- CARD8 *dstLine,
- FbStride dstStride,
- int dstX,
-
- int width,
- int height,
-
- int alu,
- FbBits pm);
-
-static void
-fb24_32BltDown (CARD8 *srcLine,
- FbStride srcStride,
- int srcX,
-
- CARD8 *dstLine,
- FbStride dstStride,
- int dstX,
-
- int width,
- int height,
-
- int alu,
- FbBits pm)
-{
- CARD32 *src;
- CARD8 *dst;
- int w;
- Bool destInvarient;
- CARD32 pixel, dpixel;
- FbDeclareMergeRop ();
-
- srcLine += srcX * 4;
- dstLine += dstX * 3;
-
- FbInitializeMergeRop(alu, (pm | ~(FbBits) 0xffffff));
- destInvarient = FbDestInvarientMergeRop();
-
- while (height--)
- {
- src = (CARD32 *) srcLine;
- dst = dstLine;
- srcLine += srcStride;
- dstLine += dstStride;
- w = width;
- if (destInvarient)
- {
- while (((long) dst & 3) && w)
- {
- w--;
- pixel = READ(src++);
- pixel = FbDoDestInvarientMergeRop(pixel);
- Put24 (dst, pixel);
- dst += 3;
- }
- /* Do four aligned pixels at a time */
- while (w >= 4)
- {
- CARD32 s0, s1;
- s0 = READ(src++);
- s0 = FbDoDestInvarientMergeRop(s0);
- s1 = READ(src++);
- s1 = FbDoDestInvarientMergeRop(s1);
-#if BITMAP_BIT_ORDER == LSBFirst
- WRITE((CARD32 *)dst, (s0 & 0xffffff) | (s1 << 24));
-#else
- WRITE((CARD32 *)dst, (s0 << 8) | ((s1 & 0xffffff) >> 16));
-#endif
- s0 = READ(src++);
- s0 = FbDoDestInvarientMergeRop(s0);
-#if BITMAP_BIT_ORDER == LSBFirst
- WRITE((CARD32 *)(dst+4), ((s1 & 0xffffff) >> 8) | (s0 << 16));
-#else
- WRITE((CARD32 *)(dst+4), (s1 << 16) | ((s0 & 0xffffff) >> 8));
-#endif
- s1 = READ(src++);
- s1 = FbDoDestInvarientMergeRop(s1);
-#if BITMAP_BIT_ORDER == LSBFirst
- WRITE((CARD32 *)(dst+8), ((s0 & 0xffffff) >> 16) | (s1 << 8));
-#else
- WRITE((CARD32 *)(dst+8), (s0 << 24) | (s1 & 0xffffff));
-#endif
- dst += 12;
- w -= 4;
- }
- while (w--)
- {
- pixel = READ(src++);
- pixel = FbDoDestInvarientMergeRop(pixel);
- Put24 (dst, pixel);
- dst += 3;
- }
- }
- else
- {
- while (w--)
- {
- pixel = READ(src++);
- dpixel = Get24 (dst);
- pixel = FbDoMergeRop(pixel, dpixel);
- Put24 (dst, pixel);
- dst += 3;
- }
- }
- }
-}
-
-static void
-fb24_32BltUp (CARD8 *srcLine,
- FbStride srcStride,
- int srcX,
-
- CARD8 *dstLine,
- FbStride dstStride,
- int dstX,
-
- int width,
- int height,
-
- int alu,
- FbBits pm)
-{
- CARD8 *src;
- CARD32 *dst;
- int w;
- Bool destInvarient;
- CARD32 pixel;
- FbDeclareMergeRop ();
-
- FbInitializeMergeRop(alu, (pm | (~(FbBits) 0xffffff)));
- destInvarient = FbDestInvarientMergeRop();
-
- srcLine += srcX * 3;
- dstLine += dstX * 4;
-
- while (height--)
- {
- w = width;
- src = srcLine;
- dst = (CARD32 *) dstLine;
- srcLine += srcStride;
- dstLine += dstStride;
- if (destInvarient)
- {
- while (((long) src & 3) && w)
- {
- w--;
- pixel = Get24(src);
- src += 3;
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
- }
- /* Do four aligned pixels at a time */
- while (w >= 4)
- {
- CARD32 s0, s1;
-
- s0 = READ((CARD32 *)src);
-#if BITMAP_BIT_ORDER == LSBFirst
- pixel = s0 & 0xffffff;
-#else
- pixel = s0 >> 8;
-#endif
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
- s1 = READ((CARD32 *)(src+4));
-#if BITMAP_BIT_ORDER == LSBFirst
- pixel = (s0 >> 24) | ((s1 << 8) & 0xffffff);
-#else
- pixel = ((s0 << 16) & 0xffffff) | (s1 >> 16);
-#endif
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
- s0 = READ((CARD32 *)(src+8));
-#if BITMAP_BIT_ORDER == LSBFirst
- pixel = (s1 >> 16) | ((s0 << 16) & 0xffffff);
-#else
- pixel = ((s1 << 8) & 0xffffff) | (s0 >> 24);
-#endif
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
-#if BITMAP_BIT_ORDER == LSBFirst
- pixel = s0 >> 8;
-#else
- pixel = s0 & 0xffffff;
-#endif
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
- src += 12;
- w -= 4;
- }
- while (w)
- {
- w--;
- pixel = Get24(src);
- src += 3;
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
- }
- }
- else
- {
- while (w--)
- {
- pixel = Get24(src);
- src += 3;
- WRITE(dst, FbDoMergeRop(pixel, READ(dst)));
- dst++;
- }
- }
- }
-}
-
-/*
- * Spans functions; probably unused.
- */
-void
-fb24_32GetSpans(DrawablePtr pDrawable,
- int wMax,
- DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- char *pchardstStart)
-{
- FbBits *srcBits;
- CARD8 *src;
- FbStride srcStride;
- int srcBpp;
- int srcXoff, srcYoff;
- CARD8 *dst;
-
- fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
- src = (CARD8 *) srcBits;
- srcStride *= sizeof (FbBits);
-
- while (nspans--)
- {
- dst = (CARD8 *) pchardstStart;
- fb24_32BltUp (src + (ppt->y + srcYoff) * srcStride, srcStride,
- ppt->x + srcXoff,
-
- dst,
- 1,
- 0,
-
- *pwidth,
- 1,
-
- GXcopy,
- FB_ALLONES);
-
- pchardstStart += PixmapBytePad(*pwidth, pDrawable->depth);
- ppt++;
- pwidth++;
- }
-
- fbFinishAccess (pDrawable);
-}
-
-void
-fb24_32SetSpans (DrawablePtr pDrawable,
- GCPtr pGC,
- char *src,
- DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- int fSorted)
-{
- FbGCPrivPtr pPriv = fbGetGCPrivate (pGC);
- RegionPtr pClip = fbGetCompositeClip(pGC);
- FbBits *dstBits;
- CARD8 *dst, *d, *s;
- FbStride dstStride;
- int dstBpp;
- int dstXoff, dstYoff;
- BoxPtr pbox;
- int n;
- int x1, x2;
-
- fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
- dst = (CARD8 *) dstBits;
- dstStride *= sizeof (FbBits);
- while (nspans--)
- {
- d = dst + (ppt->y + dstYoff) * dstStride;
- s = (CARD8 *) src;
- n = RegionNumRects(pClip);
- pbox = RegionRects (pClip);
- while (n--)
- {
- if (pbox->y1 > ppt->y)
- break;
- if (pbox->y2 > ppt->y)
- {
- x1 = ppt->x;
- x2 = x1 + *pwidth;
- if (pbox->x1 > x1)
- x1 = pbox->x1;
- if (pbox->x2 < x2)
- x2 = pbox->x2;
- if (x1 < x2)
- fb24_32BltDown (s,
- 0,
- (x1 - ppt->x),
- d,
- dstStride,
- x1 + dstXoff,
-
- (x2 - x1),
- 1,
- pGC->alu,
- pPriv->pm);
- }
- }
- src += PixmapBytePad (*pwidth, pDrawable->depth);
- ppt++;
- pwidth++;
- }
-
- fbFinishAccess (pDrawable);
-}
-
-/*
- * Clip and put 32bpp Z-format images to a 24bpp drawable
- */
-void
-fb24_32PutZImage (DrawablePtr pDrawable,
- RegionPtr pClip,
- int alu,
- FbBits pm,
- int x,
- int y,
- int width,
- int height,
- CARD8 *src,
- FbStride srcStride)
-{
- FbBits *dstBits;
- CARD8 *dst;
- FbStride dstStride;
- int dstBpp;
- int dstXoff, dstYoff;
- int nbox;
- BoxPtr pbox;
- int x1, y1, x2, y2;
-
- fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
- dstStride *= sizeof(FbBits);
- dst = (CARD8 *) dstBits;
-
- for (nbox = RegionNumRects (pClip),
- pbox = RegionRects(pClip);
- nbox--;
- pbox++)
- {
- x1 = x;
- y1 = y;
- x2 = x + width;
- y2 = y + height;
- if (x1 < pbox->x1)
- x1 = pbox->x1;
- if (y1 < pbox->y1)
- y1 = pbox->y1;
- if (x2 > pbox->x2)
- x2 = pbox->x2;
- if (y2 > pbox->y2)
- y2 = pbox->y2;
- if (x1 >= x2 || y1 >= y2)
- continue;
- fb24_32BltDown (src + (y1 - y) * srcStride,
- srcStride,
- (x1 - x),
-
- dst + (y1 + dstYoff) * dstStride,
- dstStride,
- x1 + dstXoff,
-
- (x2 - x1),
- (y2 - y1),
-
- alu,
- pm);
- }
-
- fbFinishAccess (pDrawable);
-}
-
-void
-fb24_32GetImage (DrawablePtr pDrawable,
- int x,
- int y,
- int w,
- int h,
- unsigned int format,
- unsigned long planeMask,
- char *d)
-{
- FbBits *srcBits;
- CARD8 *src;
- FbStride srcStride;
- int srcBpp;
- int srcXoff, srcYoff;
- FbStride dstStride;
- FbBits pm;
-
- fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
- src = (CARD8 *) srcBits;
- srcStride *= sizeof (FbBits);
-
- x += pDrawable->x;
- y += pDrawable->y;
-
- pm = fbReplicatePixel (planeMask, 32);
- dstStride = PixmapBytePad(w, pDrawable->depth);
- if (pm != FB_ALLONES)
- memset (d, 0, dstStride * h);
- fb24_32BltUp (src + (y + srcYoff) * srcStride, srcStride, x + srcXoff,
- (CARD8 *) d, dstStride, 0,
- w, h, GXcopy, pm);
-
- fbFinishAccess (pDrawable);
-}
-
-void
-fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- BoxPtr pbox,
- int nbox,
- int dx,
- int dy,
- Bool reverse,
- Bool upsidedown,
- Pixel bitplane,
- void *closure)
-{
- FbGCPrivPtr pPriv = fbGetGCPrivate(pGC);
- FbBits *srcBits;
- CARD8 *src;
- FbStride srcStride;
- int srcBpp;
- FbBits *dstBits;
- CARD8 *dst;
- FbStride dstStride;
- int dstBpp;
- fb24_32BltFunc blt;
- int srcXoff, srcYoff;
- int dstXoff, dstYoff;
-
- fbGetDrawable (pSrcDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
- src = (CARD8 *) srcBits;
- srcStride *= sizeof (FbBits);
- fbGetDrawable (pDstDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
- dst = (CARD8 *) dstBits;
- dstStride *= sizeof (FbBits);
- if (srcBpp == 24)
- blt = fb24_32BltUp;
- else
- blt = fb24_32BltDown;
-
- while (nbox--)
- {
- (*blt) (src + (pbox->y1 + dy + srcYoff) * srcStride,
- srcStride,
- (pbox->x1 + dx + srcXoff),
-
- dst + (pbox->y1 + dstYoff) * dstStride,
- dstStride,
- (pbox->x1 + dstXoff),
-
- (pbox->x2 - pbox->x1),
- (pbox->y2 - pbox->y1),
-
- pGC->alu,
- pPriv->pm);
- pbox++;
- }
-
- fbFinishAccess (pSrcDrawable);
- fbFinishAccess (pDstDrawable);
-}
-
-PixmapPtr
-fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
-{
- ScreenPtr pScreen = pOldTile->drawable.pScreen;
- PixmapPtr pNewTile;
- FbBits *old, *new;
- FbStride oldStride, newStride;
- int oldBpp, newBpp;
- fb24_32BltFunc blt;
- int oldXoff, oldYoff;
- int newXoff, newYoff;
-
- pNewTile = pScreen->CreatePixmap(pScreen, pOldTile->drawable.width,
- pOldTile->drawable.height,
- pOldTile->drawable.depth,
- pOldTile->drawable.class);
- if (!pNewTile)
- return 0;
- fbGetDrawable (&pOldTile->drawable,
- old, oldStride, oldBpp, oldXoff, oldYoff);
- fbGetDrawable (&pNewTile->drawable,
- new, newStride, newBpp, newXoff, newYoff);
- if (oldBpp == 24)
- blt = fb24_32BltUp;
- else
- blt = fb24_32BltDown;
-
- (*blt) ((CARD8 *) old,
- oldStride * sizeof (FbBits),
- 0,
-
- (CARD8 *) new,
- newStride * sizeof (FbBits),
- 0,
-
- pOldTile->drawable.width,
- pOldTile->drawable.height,
-
- GXcopy,
- FB_ALLONES);
-
- fbFinishAccess (&pOldTile->drawable);
- fbFinishAccess (&pNewTile->drawable);
-
- return pNewTile;
-}
-
-typedef struct {
- pointer pbits;
- int width;
-} miScreenInitParmsRec, *miScreenInitParmsPtr;
-
-Bool
-fb24_32CreateScreenResources(ScreenPtr pScreen)
-{
- miScreenInitParmsPtr pScrInitParms;
- int pitch;
- Bool retval;
-
- /* get the pitch before mi destroys it */
- pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate;
- pitch = BitmapBytePad(pScrInitParms->width * 24);
-
- if((retval = miCreateScreenResources(pScreen))) {
- /* fix the screen pixmap */
- PixmapPtr pPix = (PixmapPtr)pScreen->devPrivate;
- pPix->drawable.bitsPerPixel = 24;
- pPix->devKind = pitch;
- }
-
- return retval;
-}
-
-Bool
-fb24_32ModifyPixmapHeader (PixmapPtr pPixmap,
- int width,
- int height,
- int depth,
- int bitsPerPixel,
- int devKind,
- pointer pPixData)
-{
- int bpp, w;
-
- if (!pPixmap)
- return FALSE;
- bpp = bitsPerPixel;
- if (bpp <= 0)
- bpp = pPixmap->drawable.bitsPerPixel;
- if (bpp == 24)
- {
- if (devKind < 0)
- {
- w = width;
- if (w <= 0)
- w = pPixmap->drawable.width;
- devKind = BitmapBytePad(w * 24);
- }
- }
- return miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel,
- devKind, pPixData);
-}
+/*
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * 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, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <string.h>
+
+#include "fb.h"
+
+/* X apps don't like 24bpp images, this code exposes 32bpp images */
+
+/*
+ * These two functions do a full CopyArea while reformatting
+ * the data between 24 and 32bpp. They try to go a bit faster
+ * by reading/writing aligned CARD32s where it's easy
+ */
+
+#define Get8(a) ((CARD32) READ(a))
+
+#if BITMAP_BIT_ORDER == MSBFirst
+#define Get24(a) ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2))
+#define Put24(a,p) ((WRITE((a+0), (CARD8) ((p) >> 16))), \
+ (WRITE((a+1), (CARD8) ((p) >> 8))), \
+ (WRITE((a+2), (CARD8) (p))))
+#else
+#define Get24(a) (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16))
+#define Put24(a,p) ((WRITE((a+0), (CARD8) (p))), \
+ (WRITE((a+1), (CARD8) ((p) >> 8))), \
+ (WRITE((a+2), (CARD8) ((p) >> 16))))
+#endif
+
+typedef void (*fb24_32BltFunc) (CARD8 *srcLine,
+ FbStride srcStride,
+ int srcX,
+
+ CARD8 *dstLine,
+ FbStride dstStride,
+ int dstX,
+
+ int width,
+ int height,
+
+ int alu,
+ FbBits pm);
+
+static void
+fb24_32BltDown (CARD8 *srcLine,
+ FbStride srcStride,
+ int srcX,
+
+ CARD8 *dstLine,
+ FbStride dstStride,
+ int dstX,
+
+ int width,
+ int height,
+
+ int alu,
+ FbBits pm)
+{
+ CARD32 *src;
+ CARD8 *dst;
+ int w;
+ Bool destInvarient;
+ CARD32 pixel, dpixel;
+ FbDeclareMergeRop ();
+
+ srcLine += srcX * 4;
+ dstLine += dstX * 3;
+
+ FbInitializeMergeRop(alu, (pm | ~(FbBits) 0xffffff));
+ destInvarient = FbDestInvarientMergeRop();
+
+ while (height--)
+ {
+ src = (CARD32 *) srcLine;
+ dst = dstLine;
+ srcLine += srcStride;
+ dstLine += dstStride;
+ w = width;
+ if (destInvarient)
+ {
+ while (((long) dst & 3) && w)
+ {
+ w--;
+ pixel = READ(src++);
+ pixel = FbDoDestInvarientMergeRop(pixel);
+ Put24 (dst, pixel);
+ dst += 3;
+ }
+ /* Do four aligned pixels at a time */
+ while (w >= 4)
+ {
+ CARD32 s0, s1;
+ s0 = READ(src++);
+ s0 = FbDoDestInvarientMergeRop(s0);
+ s1 = READ(src++);
+ s1 = FbDoDestInvarientMergeRop(s1);
+#if BITMAP_BIT_ORDER == LSBFirst
+ WRITE((CARD32 *)dst, (s0 & 0xffffff) | (s1 << 24));
+#else
+ WRITE((CARD32 *)dst, (s0 << 8) | ((s1 & 0xffffff) >> 16));
+#endif
+ s0 = READ(src++);
+ s0 = FbDoDestInvarientMergeRop(s0);
+#if BITMAP_BIT_ORDER == LSBFirst
+ WRITE((CARD32 *)(dst+4), ((s1 & 0xffffff) >> 8) | (s0 << 16));
+#else
+ WRITE((CARD32 *)(dst+4), (s1 << 16) | ((s0 & 0xffffff) >> 8));
+#endif
+ s1 = READ(src++);
+ s1 = FbDoDestInvarientMergeRop(s1);
+#if BITMAP_BIT_ORDER == LSBFirst
+ WRITE((CARD32 *)(dst+8), ((s0 & 0xffffff) >> 16) | (s1 << 8));
+#else
+ WRITE((CARD32 *)(dst+8), (s0 << 24) | (s1 & 0xffffff));
+#endif
+ dst += 12;
+ w -= 4;
+ }
+ while (w--)
+ {
+ pixel = READ(src++);
+ pixel = FbDoDestInvarientMergeRop(pixel);
+ Put24 (dst, pixel);
+ dst += 3;
+ }
+ }
+ else
+ {
+ while (w--)
+ {
+ pixel = READ(src++);
+ dpixel = Get24 (dst);
+ pixel = FbDoMergeRop(pixel, dpixel);
+ Put24 (dst, pixel);
+ dst += 3;
+ }
+ }
+ }
+}
+
+static void
+fb24_32BltUp (CARD8 *srcLine,
+ FbStride srcStride,
+ int srcX,
+
+ CARD8 *dstLine,
+ FbStride dstStride,
+ int dstX,
+
+ int width,
+ int height,
+
+ int alu,
+ FbBits pm)
+{
+ CARD8 *src;
+ CARD32 *dst;
+ int w;
+ Bool destInvarient;
+ CARD32 pixel;
+ FbDeclareMergeRop ();
+
+ FbInitializeMergeRop(alu, (pm | (~(FbBits) 0xffffff)));
+ destInvarient = FbDestInvarientMergeRop();
+
+ srcLine += srcX * 3;
+ dstLine += dstX * 4;
+
+ while (height--)
+ {
+ w = width;
+ src = srcLine;
+ dst = (CARD32 *) dstLine;
+ srcLine += srcStride;
+ dstLine += dstStride;
+ if (destInvarient)
+ {
+ while (((long) src & 3) && w)
+ {
+ w--;
+ pixel = Get24(src);
+ src += 3;
+ WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
+ }
+ /* Do four aligned pixels at a time */
+ while (w >= 4)
+ {
+ CARD32 s0, s1;
+
+ s0 = READ((CARD32 *)src);
+#if BITMAP_BIT_ORDER == LSBFirst
+ pixel = s0 & 0xffffff;
+#else
+ pixel = s0 >> 8;
+#endif
+ WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
+ s1 = READ((CARD32 *)(src+4));
+#if BITMAP_BIT_ORDER == LSBFirst
+ pixel = (s0 >> 24) | ((s1 << 8) & 0xffffff);
+#else
+ pixel = ((s0 << 16) & 0xffffff) | (s1 >> 16);
+#endif
+ WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
+ s0 = READ((CARD32 *)(src+8));
+#if BITMAP_BIT_ORDER == LSBFirst
+ pixel = (s1 >> 16) | ((s0 << 16) & 0xffffff);
+#else
+ pixel = ((s1 << 8) & 0xffffff) | (s0 >> 24);
+#endif
+ WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
+#if BITMAP_BIT_ORDER == LSBFirst
+ pixel = s0 >> 8;
+#else
+ pixel = s0 & 0xffffff;
+#endif
+ WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
+ src += 12;
+ w -= 4;
+ }
+ while (w)
+ {
+ w--;
+ pixel = Get24(src);
+ src += 3;
+ WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
+ }
+ }
+ else
+ {
+ while (w--)
+ {
+ pixel = Get24(src);
+ src += 3;
+ WRITE(dst, FbDoMergeRop(pixel, READ(dst)));
+ dst++;
+ }
+ }
+ }
+}
+
+/*
+ * Spans functions; probably unused.
+ */
+void
+fb24_32GetSpans(DrawablePtr pDrawable,
+ int wMax,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ char *pchardstStart)
+{
+ FbBits *srcBits;
+ CARD8 *src;
+ FbStride srcStride;
+ int srcBpp;
+ int srcXoff, srcYoff;
+ CARD8 *dst;
+
+ fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
+ src = (CARD8 *) srcBits;
+ srcStride *= sizeof (FbBits);
+
+ while (nspans--)
+ {
+ dst = (CARD8 *) pchardstStart;
+ fb24_32BltUp (src + (ppt->y + srcYoff) * srcStride, srcStride,
+ ppt->x + srcXoff,
+
+ dst,
+ 1,
+ 0,
+
+ *pwidth,
+ 1,
+
+ GXcopy,
+ FB_ALLONES);
+
+ pchardstStart += PixmapBytePad(*pwidth, pDrawable->depth);
+ ppt++;
+ pwidth++;
+ }
+
+ fbFinishAccess (pDrawable);
+}
+
+void
+fb24_32SetSpans (DrawablePtr pDrawable,
+ GCPtr pGC,
+ char *src,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ int fSorted)
+{
+ FbGCPrivPtr pPriv = fbGetGCPrivate (pGC);
+ RegionPtr pClip = fbGetCompositeClip(pGC);
+ FbBits *dstBits;
+ CARD8 *dst, *d, *s;
+ FbStride dstStride;
+ int dstBpp;
+ int dstXoff, dstYoff;
+ BoxPtr pbox;
+ int n;
+ int x1, x2;
+
+ fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
+ dst = (CARD8 *) dstBits;
+ dstStride *= sizeof (FbBits);
+ while (nspans--)
+ {
+ d = dst + (ppt->y + dstYoff) * dstStride;
+ s = (CARD8 *) src;
+ n = RegionNumRects(pClip);
+ pbox = RegionRects (pClip);
+ while (n--)
+ {
+ if (pbox->y1 > ppt->y)
+ break;
+ if (pbox->y2 > ppt->y)
+ {
+ x1 = ppt->x;
+ x2 = x1 + *pwidth;
+ if (pbox->x1 > x1)
+ x1 = pbox->x1;
+ if (pbox->x2 < x2)
+ x2 = pbox->x2;
+ if (x1 < x2)
+ fb24_32BltDown (s,
+ 0,
+ (x1 - ppt->x),
+ d,
+ dstStride,
+ x1 + dstXoff,
+
+ (x2 - x1),
+ 1,
+ pGC->alu,
+ pPriv->pm);
+ }
+ }
+ src += PixmapBytePad (*pwidth, pDrawable->depth);
+ ppt++;
+ pwidth++;
+ }
+
+ fbFinishAccess (pDrawable);
+}
+
+/*
+ * Clip and put 32bpp Z-format images to a 24bpp drawable
+ */
+void
+fb24_32PutZImage (DrawablePtr pDrawable,
+ RegionPtr pClip,
+ int alu,
+ FbBits pm,
+ int x,
+ int y,
+ int width,
+ int height,
+ CARD8 *src,
+ FbStride srcStride)
+{
+ FbBits *dstBits;
+ CARD8 *dst;
+ FbStride dstStride;
+ int dstBpp;
+ int dstXoff, dstYoff;
+ int nbox;
+ BoxPtr pbox;
+ int x1, y1, x2, y2;
+
+ fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
+ dstStride *= sizeof(FbBits);
+ dst = (CARD8 *) dstBits;
+
+ for (nbox = RegionNumRects (pClip),
+ pbox = RegionRects(pClip);
+ nbox--;
+ pbox++)
+ {
+ x1 = x;
+ y1 = y;
+ x2 = x + width;
+ y2 = y + height;
+ if (x1 < pbox->x1)
+ x1 = pbox->x1;
+ if (y1 < pbox->y1)
+ y1 = pbox->y1;
+ if (x2 > pbox->x2)
+ x2 = pbox->x2;
+ if (y2 > pbox->y2)
+ y2 = pbox->y2;
+ if (x1 >= x2 || y1 >= y2)
+ continue;
+ fb24_32BltDown (src + (y1 - y) * srcStride,
+ srcStride,
+ (x1 - x),
+
+ dst + (y1 + dstYoff) * dstStride,
+ dstStride,
+ x1 + dstXoff,
+
+ (x2 - x1),
+ (y2 - y1),
+
+ alu,
+ pm);
+ }
+
+ fbFinishAccess (pDrawable);
+}
+
+void
+fb24_32GetImage (DrawablePtr pDrawable,
+ int x,
+ int y,
+ int w,
+ int h,
+ unsigned int format,
+ unsigned long planeMask,
+ char *d)
+{
+ FbBits *srcBits;
+ CARD8 *src;
+ FbStride srcStride;
+ int srcBpp;
+ int srcXoff, srcYoff;
+ FbStride dstStride;
+ FbBits pm;
+
+ fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
+ src = (CARD8 *) srcBits;
+ srcStride *= sizeof (FbBits);
+
+ x += pDrawable->x;
+ y += pDrawable->y;
+
+ pm = fbReplicatePixel (planeMask, 32);
+ dstStride = PixmapBytePad(w, pDrawable->depth);
+ if (pm != FB_ALLONES)
+ memset (d, 0, dstStride * h);
+ fb24_32BltUp (src + (y + srcYoff) * srcStride, srcStride, x + srcXoff,
+ (CARD8 *) d, dstStride, 0,
+ w, h, GXcopy, pm);
+
+ fbFinishAccess (pDrawable);
+}
+
+void
+fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse,
+ Bool upsidedown,
+ Pixel bitplane,
+ void *closure)
+{
+ FbGCPrivPtr pPriv = fbGetGCPrivate(pGC);
+ FbBits *srcBits;
+ CARD8 *src;
+ FbStride srcStride;
+ int srcBpp;
+ FbBits *dstBits;
+ CARD8 *dst;
+ FbStride dstStride;
+ int dstBpp;
+ fb24_32BltFunc blt;
+ int srcXoff, srcYoff;
+ int dstXoff, dstYoff;
+
+ fbGetDrawable (pSrcDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
+ src = (CARD8 *) srcBits;
+ srcStride *= sizeof (FbBits);
+ fbGetDrawable (pDstDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
+ dst = (CARD8 *) dstBits;
+ dstStride *= sizeof (FbBits);
+ if (srcBpp == 24)
+ blt = fb24_32BltUp;
+ else
+ blt = fb24_32BltDown;
+
+ while (nbox--)
+ {
+ (*blt) (src + (pbox->y1 + dy + srcYoff) * srcStride,
+ srcStride,
+ (pbox->x1 + dx + srcXoff),
+
+ dst + (pbox->y1 + dstYoff) * dstStride,
+ dstStride,
+ (pbox->x1 + dstXoff),
+
+ (pbox->x2 - pbox->x1),
+ (pbox->y2 - pbox->y1),
+
+ pGC->alu,
+ pPriv->pm);
+ pbox++;
+ }
+
+ fbFinishAccess (pSrcDrawable);
+ fbFinishAccess (pDstDrawable);
+}
+
+PixmapPtr
+fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
+{
+ ScreenPtr pScreen = pOldTile->drawable.pScreen;
+ PixmapPtr pNewTile;
+ FbBits *old, *new;
+ FbStride oldStride, newStride;
+ int oldBpp, newBpp;
+ fb24_32BltFunc blt;
+ int oldXoff, oldYoff;
+ int newXoff, newYoff;
+
+ pNewTile = pScreen->CreatePixmap(pScreen, pOldTile->drawable.width,
+ pOldTile->drawable.height,
+ pOldTile->drawable.depth,
+ pOldTile->drawable.class);
+ if (!pNewTile)
+ return 0;
+ fbGetDrawable (&pOldTile->drawable,
+ old, oldStride, oldBpp, oldXoff, oldYoff);
+ fbGetDrawable (&pNewTile->drawable,
+ new, newStride, newBpp, newXoff, newYoff);
+ if (oldBpp == 24)
+ blt = fb24_32BltUp;
+ else
+ blt = fb24_32BltDown;
+
+ (*blt) ((CARD8 *) old,
+ oldStride * sizeof (FbBits),
+ 0,
+
+ (CARD8 *) new,
+ newStride * sizeof (FbBits),
+ 0,
+
+ pOldTile->drawable.width,
+ pOldTile->drawable.height,
+
+ GXcopy,
+ FB_ALLONES);
+
+ fbFinishAccess (&pOldTile->drawable);
+ fbFinishAccess (&pNewTile->drawable);
+
+ return pNewTile;
+}
+
+typedef struct {
+ pointer pbits;
+ int width;
+} miScreenInitParmsRec, *miScreenInitParmsPtr;
+
+Bool
+fb24_32CreateScreenResources(ScreenPtr pScreen)
+{
+ miScreenInitParmsPtr pScrInitParms;
+ int pitch;
+ Bool retval;
+
+ /* get the pitch before mi destroys it */
+ pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate;
+ pitch = BitmapBytePad(pScrInitParms->width * 24);
+
+ if((retval = miCreateScreenResources(pScreen))) {
+ /* fix the screen pixmap */
+ PixmapPtr pPix = (PixmapPtr)pScreen->devPrivate;
+ pPix->drawable.bitsPerPixel = 24;
+ pPix->devKind = pitch;
+ }
+
+ return retval;
+}
+
+Bool
+fb24_32ModifyPixmapHeader (PixmapPtr pPixmap,
+ int width,
+ int height,
+ int depth,
+ int bitsPerPixel,
+ int devKind,
+ pointer pPixData)
+{
+ int bpp, w;
+
+ if (!pPixmap)
+ return FALSE;
+ bpp = bitsPerPixel;
+ if (bpp <= 0)
+ bpp = pPixmap->drawable.bitsPerPixel;
+ if (bpp == 24)
+ {
+ if (devKind < 0)
+ {
+ w = width;
+ if (w <= 0)
+ w = pPixmap->drawable.width;
+ devKind = BitmapBytePad(w * 24);
+ }
+ }
+ return miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel,
+ devKind, pPixData);
+}
diff --git a/xorg-server/fb/fbcopy.c b/xorg-server/fb/fbcopy.c
index 30cbf7b25..84f157ea5 100644
--- a/xorg-server/fb/fbcopy.c
+++ b/xorg-server/fb/fbcopy.c
@@ -28,39 +28,6 @@
#include "fb.h"
-/* Compatibility wrapper, to be removed at next ABI change. */
-void
-fbCopyRegion (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- RegionPtr pDstRegion,
- int dx,
- int dy,
- fbCopyProc copyProc,
- Pixel bitPlane,
- void *closure)
-{
- miCopyRegion(pSrcDrawable, pDstDrawable, pGC, pDstRegion, dx, dy, copyProc, bitPlane, closure);
-}
-
-/* Compatibility wrapper, to be removed at next ABI change. */
-RegionPtr
-fbDoCopy (DrawablePtr pSrcDrawable,
- DrawablePtr pDstDrawable,
- GCPtr pGC,
- int xIn,
- int yIn,
- int widthSrc,
- int heightSrc,
- int xOut,
- int yOut,
- fbCopyProc copyProc,
- Pixel bitPlane,
- void *closure)
-{
- return miDoCopy(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, copyProc, bitPlane, closure);
-}
-
void
fbCopyNtoN (DrawablePtr pSrcDrawable,
DrawablePtr pDstDrawable,
diff --git a/xorg-server/fb/fbpict.h b/xorg-server/fb/fbpict.h
index b880ebbe1..859dd7ac1 100644
--- a/xorg-server/fb/fbpict.h
+++ b/xorg-server/fb/fbpict.h
@@ -1,88 +1,88 @@
-/*
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _FBPICT_H_
-#define _FBPICT_H_
-
-/* fbpict.c */
-extern _X_EXPORT void
-fbComposite (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-/* fbtrap.c */
-
-extern _X_EXPORT void
-fbAddTraps (PicturePtr pPicture,
- INT16 xOff,
- INT16 yOff,
- int ntrap,
- xTrap *traps);
-
-extern _X_EXPORT void
-fbRasterizeTrapezoid (PicturePtr alpha,
- xTrapezoid *trap,
- int x_off,
- int y_off);
-
-extern _X_EXPORT void
-fbAddTriangles (PicturePtr pPicture,
- INT16 xOff,
- INT16 yOff,
- int ntri,
- xTriangle *tris);
-
-extern _X_EXPORT void
-fbTrapezoids (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc,
- INT16 ySrc,
- int ntrap,
- xTrapezoid *traps);
-
-extern _X_EXPORT void
-fbTriangles (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc,
- INT16 ySrc,
- int ntris,
- xTriangle *tris);
-
-#endif /* _FBPICT_H_ */
+/*
+ *
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ *
+ * 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, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _FBPICT_H_
+#define _FBPICT_H_
+
+/* fbpict.c */
+extern _X_EXPORT void
+fbComposite (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xMask,
+ INT16 yMask,
+ INT16 xDst,
+ INT16 yDst,
+ CARD16 width,
+ CARD16 height);
+
+/* fbtrap.c */
+
+extern _X_EXPORT void
+fbAddTraps (PicturePtr pPicture,
+ INT16 xOff,
+ INT16 yOff,
+ int ntrap,
+ xTrap *traps);
+
+extern _X_EXPORT void
+fbRasterizeTrapezoid (PicturePtr alpha,
+ xTrapezoid *trap,
+ int x_off,
+ int y_off);
+
+extern _X_EXPORT void
+fbAddTriangles (PicturePtr pPicture,
+ INT16 xOff,
+ INT16 yOff,
+ int ntri,
+ xTriangle *tris);
+
+extern _X_EXPORT void
+fbTrapezoids (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc,
+ int ntrap,
+ xTrapezoid *traps);
+
+extern _X_EXPORT void
+fbTriangles (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc,
+ int ntris,
+ xTriangle *tris);
+
+#endif /* _FBPICT_H_ */
diff --git a/xorg-server/fb/fbpixmap.c b/xorg-server/fb/fbpixmap.c
index 232de82a9..e73a2f02d 100644
--- a/xorg-server/fb/fbpixmap.c
+++ b/xorg-server/fb/fbpixmap.c
@@ -1,390 +1,381 @@
-/*
- * Copyright © 1998 Keith Packard
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdlib.h>
-
-#include "fb.h"
-
-PixmapPtr
-fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
- unsigned class)
-{
- PixmapPtr pPixmap;
- size_t datasize;
- size_t paddedWidth;
- int adjust;
- int base;
-
- paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits);
- if (paddedWidth / 4 > 32767 || height > 32767)
- return NullPixmap;
- datasize = height * paddedWidth;
- base = pScreen->totalPixmapSize;
- adjust = 0;
- if (base & 7)
- adjust = 8 - (base & 7);
- datasize += adjust;
-#ifdef FB_DEBUG
- datasize += 2 * paddedWidth;
-#endif
- pPixmap = AllocatePixmap(pScreen, datasize);
- if (!pPixmap)
- return NullPixmap;
- pPixmap->drawable.type = DRAWABLE_PIXMAP;
- pPixmap->drawable.class = class;
- pPixmap->drawable.pScreen = pScreen;
- pPixmap->drawable.depth = depth;
- pPixmap->drawable.bitsPerPixel = bpp;
- pPixmap->drawable.id = 0;
- pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
- pPixmap->drawable.x = 0;
- pPixmap->drawable.y = 0;
- pPixmap->drawable.width = width;
- pPixmap->drawable.height = height;
- pPixmap->devKind = paddedWidth;
- pPixmap->refcnt = 1;
- pPixmap->devPrivate.ptr = (pointer) ((char *)pPixmap + base + adjust);
-
-#ifdef FB_DEBUG
- pPixmap->devPrivate.ptr = (void *) ((char *) pPixmap->devPrivate.ptr + paddedWidth);
- fbInitializeDrawable (&pPixmap->drawable);
-#endif
-
-#ifdef COMPOSITE
- pPixmap->screen_x = 0;
- pPixmap->screen_y = 0;
-#endif
-
- return pPixmap;
-}
-
-PixmapPtr
-fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
- unsigned class)
-{
- int bpp;
- bpp = BitsPerPixel (depth);
-#ifdef FB_SCREEN_PRIVATE
- if (bpp == 32 && depth <= 24)
- bpp = fbGetScreenPrivate(pScreen)->pix32bpp;
-#endif
- return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, class);
-}
-
-Bool
-fbDestroyPixmap (PixmapPtr pPixmap)
-{
- if(--pPixmap->refcnt)
- return TRUE;
- FreePixmap(pPixmap);
- return TRUE;
-}
-
-#define ADDRECT(reg,r,fr,rx1,ry1,rx2,ry2) \
-if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \
- (!((reg)->data->numRects && \
- ((r-1)->y1 == (ry1)) && \
- ((r-1)->y2 == (ry2)) && \
- ((r-1)->x1 <= (rx1)) && \
- ((r-1)->x2 >= (rx2))))) \
-{ \
- if ((reg)->data->numRects == (reg)->data->size) \
- { \
- RegionRectAlloc(reg, 1); \
- fr = RegionBoxptr(reg); \
- r = fr + (reg)->data->numRects; \
- } \
- r->x1 = (rx1); \
- r->y1 = (ry1); \
- r->x2 = (rx2); \
- r->y2 = (ry2); \
- (reg)->data->numRects++; \
- if(r->x1 < (reg)->extents.x1) \
- (reg)->extents.x1 = r->x1; \
- if(r->x2 > (reg)->extents.x2) \
- (reg)->extents.x2 = r->x2; \
- r++; \
-}
-
-/* Convert bitmap clip mask into clipping region.
- * First, goes through each line and makes boxes by noting the transitions
- * from 0 to 1 and 1 to 0.
- * Then it coalesces the current line with the previous if they have boxes
- * at the same X coordinates.
- */
-RegionPtr
-fbPixmapToRegion(PixmapPtr pPix)
-{
- register RegionPtr pReg;
- FbBits *pw, w;
- register int ib;
- int width, h, base, rx1 = 0, crects;
- FbBits *pwLineEnd;
- int irectPrevStart, irectLineStart;
- register BoxPtr prectO, prectN;
- BoxPtr FirstRect, rects, prectLineStart;
- Bool fInBox, fSame;
- register FbBits mask0 = FB_ALLONES & ~FbScrRight(FB_ALLONES, 1);
- FbBits *pwLine;
- int nWidth;
-
- pReg = RegionCreate(NULL, 1);
- if(!pReg)
- return NullRegion;
- FirstRect = RegionBoxptr(pReg);
- rects = FirstRect;
-
- fbPrepareAccess(&pPix->drawable);
-
- pwLine = (FbBits *) pPix->devPrivate.ptr;
- nWidth = pPix->devKind >> (FB_SHIFT-3);
-
- width = pPix->drawable.width;
- pReg->extents.x1 = width - 1;
- pReg->extents.x2 = 0;
- irectPrevStart = -1;
- for(h = 0; h < pPix->drawable.height; h++)
- {
- pw = pwLine;
- pwLine += nWidth;
- irectLineStart = rects - FirstRect;
- /* If the Screen left most bit of the word is set, we're starting in
- * a box */
- if(READ(pw) & mask0)
- {
- fInBox = TRUE;
- rx1 = 0;
- }
- else
- fInBox = FALSE;
- /* Process all words which are fully in the pixmap */
- pwLineEnd = pw + (width >> FB_SHIFT);
- for (base = 0; pw < pwLineEnd; base += FB_UNIT)
- {
- w = READ(pw++);
- if (fInBox)
- {
- if (!~w)
- continue;
- }
- else
- {
- if (!w)
- continue;
- }
- for(ib = 0; ib < FB_UNIT; ib++)
- {
- /* If the Screen left most bit of the word is set, we're
- * starting a box */
- if(w & mask0)
- {
- if(!fInBox)
- {
- rx1 = base + ib;
- /* start new box */
- fInBox = TRUE;
- }
- }
- else
- {
- if(fInBox)
- {
- /* end box */
- ADDRECT(pReg, rects, FirstRect,
- rx1, h, base + ib, h + 1);
- fInBox = FALSE;
- }
- }
- /* Shift the word VISUALLY left one. */
- w = FbScrLeft(w, 1);
- }
- }
- if(width & FB_MASK)
- {
- /* Process final partial word on line */
- w = READ(pw++);
- for(ib = 0; ib < (width & FB_MASK); ib++)
- {
- /* If the Screen left most bit of the word is set, we're
- * starting a box */
- if(w & mask0)
- {
- if(!fInBox)
- {
- rx1 = base + ib;
- /* start new box */
- fInBox = TRUE;
- }
- }
- else
- {
- if(fInBox)
- {
- /* end box */
- ADDRECT(pReg, rects, FirstRect,
- rx1, h, base + ib, h + 1);
- fInBox = FALSE;
- }
- }
- /* Shift the word VISUALLY left one. */
- w = FbScrLeft(w, 1);
- }
- }
- /* If scanline ended with last bit set, end the box */
- if(fInBox)
- {
- ADDRECT(pReg, rects, FirstRect,
- rx1, h, base + (width & FB_MASK), h + 1);
- }
- /* if all rectangles on this line have the same x-coords as
- * those on the previous line, then add 1 to all the previous y2s and
- * throw away all the rectangles from this line
- */
- fSame = FALSE;
- if(irectPrevStart != -1)
- {
- crects = irectLineStart - irectPrevStart;
- if(crects == ((rects - FirstRect) - irectLineStart))
- {
- prectO = FirstRect + irectPrevStart;
- prectN = prectLineStart = FirstRect + irectLineStart;
- fSame = TRUE;
- while(prectO < prectLineStart)
- {
- if((prectO->x1 != prectN->x1) || (prectO->x2 != prectN->x2))
- {
- fSame = FALSE;
- break;
- }
- prectO++;
- prectN++;
- }
- if (fSame)
- {
- prectO = FirstRect + irectPrevStart;
- while(prectO < prectLineStart)
- {
- prectO->y2 += 1;
- prectO++;
- }
- rects -= crects;
- pReg->data->numRects -= crects;
- }
- }
- }
- if(!fSame)
- irectPrevStart = irectLineStart;
- }
- if (!pReg->data->numRects)
- pReg->extents.x1 = pReg->extents.x2 = 0;
- else
- {
- pReg->extents.y1 = RegionBoxptr(pReg)->y1;
- pReg->extents.y2 = RegionEnd(pReg)->y2;
- if (pReg->data->numRects == 1)
- {
- free(pReg->data);
- pReg->data = (RegDataPtr)NULL;
- }
- }
-
- fbFinishAccess(&pPix->drawable);
-#ifdef DEBUG
- if (!RegionIsValid(pReg))
- FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__);
-#endif
- return pReg;
-}
-
-#ifdef FB_DEBUG
-
-#ifndef WIN32
-#include <stdio.h>
-#else
-#include <dbg.h>
-#endif
-
-static Bool
-fbValidateBits (FbStip *bits, int stride, FbStip data)
-{
- while (stride--)
- {
- if (*bits != data)
- {
-#ifdef WIN32
- NCD_DEBUG ((DEBUG_FAILURE, "fdValidateBits failed at 0x%x (is 0x%x want 0x%x)",
- bits, *bits, data));
-#else
- fprintf (stderr, "fbValidateBits failed\n");
-#endif
- return FALSE;
- }
- bits++;
- }
-}
-
-void
-fbValidateDrawable (DrawablePtr pDrawable)
-{
- FbStip *bits, *first, *last;
- int stride, bpp;
- int xoff, yoff;
- int height;
- Bool failed;
-
- if (pDrawable->type != DRAWABLE_PIXMAP)
- pDrawable = (DrawablePtr) fbGetWindowPixmap(pDrawable);
- fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff);
- first = bits - stride;
- last = bits + stride * pDrawable->height;
- if (!fbValidateBits (first, stride, FB_HEAD_BITS) ||
- !fbValidateBits (last, stride, FB_TAIL_BITS))
- fbInitializeDrawable(pDrawable);
- fbFinishAccess (pDrawable);
-}
-
-void
-fbSetBits (FbStip *bits, int stride, FbStip data)
-{
- while (stride--)
- *bits++ = data;
-}
-
-void
-fbInitializeDrawable (DrawablePtr pDrawable)
-{
- FbStip *bits, *first, *last;
- int stride, bpp;
- int xoff, yoff;
-
- fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff);
- first = bits - stride;
- last = bits + stride * pDrawable->height;
- fbSetBits (first, stride, FB_HEAD_BITS);
- fbSetBits (last, stride, FB_TAIL_BITS);
- fbFinishAccess (pDrawable);
-}
-#endif /* FB_DEBUG */
+/*
+ * Copyright © 1998 Keith Packard
+ *
+ * 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, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdlib.h>
+
+#include "fb.h"
+
+PixmapPtr
+fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
+ unsigned class)
+{
+ PixmapPtr pPixmap;
+ size_t datasize;
+ size_t paddedWidth;
+ int adjust;
+ int base;
+
+ paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits);
+ if (paddedWidth / 4 > 32767 || height > 32767)
+ return NullPixmap;
+ datasize = height * paddedWidth;
+ base = pScreen->totalPixmapSize;
+ adjust = 0;
+ if (base & 7)
+ adjust = 8 - (base & 7);
+ datasize += adjust;
+#ifdef FB_DEBUG
+ datasize += 2 * paddedWidth;
+#endif
+ pPixmap = AllocatePixmap(pScreen, datasize);
+ if (!pPixmap)
+ return NullPixmap;
+ pPixmap->drawable.type = DRAWABLE_PIXMAP;
+ pPixmap->drawable.class = class;
+ pPixmap->drawable.pScreen = pScreen;
+ pPixmap->drawable.depth = depth;
+ pPixmap->drawable.bitsPerPixel = bpp;
+ pPixmap->drawable.id = 0;
+ pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+ pPixmap->drawable.x = 0;
+ pPixmap->drawable.y = 0;
+ pPixmap->drawable.width = width;
+ pPixmap->drawable.height = height;
+ pPixmap->devKind = paddedWidth;
+ pPixmap->refcnt = 1;
+ pPixmap->devPrivate.ptr = (pointer) ((char *)pPixmap + base + adjust);
+
+#ifdef FB_DEBUG
+ pPixmap->devPrivate.ptr = (void *) ((char *) pPixmap->devPrivate.ptr + paddedWidth);
+ fbInitializeDrawable (&pPixmap->drawable);
+#endif
+
+#ifdef COMPOSITE
+ pPixmap->screen_x = 0;
+ pPixmap->screen_y = 0;
+#endif
+
+ return pPixmap;
+}
+
+PixmapPtr
+fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
+ unsigned class)
+{
+ int bpp;
+ bpp = BitsPerPixel (depth);
+#ifdef FB_SCREEN_PRIVATE
+ if (bpp == 32 && depth <= 24)
+ bpp = fbGetScreenPrivate(pScreen)->pix32bpp;
+#endif
+ return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, class);
+}
+
+Bool
+fbDestroyPixmap (PixmapPtr pPixmap)
+{
+ if(--pPixmap->refcnt)
+ return TRUE;
+ FreePixmap(pPixmap);
+ return TRUE;
+}
+
+#define ADDRECT(reg,r,fr,rx1,ry1,rx2,ry2) \
+if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \
+ (!((reg)->data->numRects && \
+ ((r-1)->y1 == (ry1)) && \
+ ((r-1)->y2 == (ry2)) && \
+ ((r-1)->x1 <= (rx1)) && \
+ ((r-1)->x2 >= (rx2))))) \
+{ \
+ if ((reg)->data->numRects == (reg)->data->size) \
+ { \
+ RegionRectAlloc(reg, 1); \
+ fr = RegionBoxptr(reg); \
+ r = fr + (reg)->data->numRects; \
+ } \
+ r->x1 = (rx1); \
+ r->y1 = (ry1); \
+ r->x2 = (rx2); \
+ r->y2 = (ry2); \
+ (reg)->data->numRects++; \
+ if(r->x1 < (reg)->extents.x1) \
+ (reg)->extents.x1 = r->x1; \
+ if(r->x2 > (reg)->extents.x2) \
+ (reg)->extents.x2 = r->x2; \
+ r++; \
+}
+
+/* Convert bitmap clip mask into clipping region.
+ * First, goes through each line and makes boxes by noting the transitions
+ * from 0 to 1 and 1 to 0.
+ * Then it coalesces the current line with the previous if they have boxes
+ * at the same X coordinates.
+ */
+RegionPtr
+fbPixmapToRegion(PixmapPtr pPix)
+{
+ register RegionPtr pReg;
+ FbBits *pw, w;
+ register int ib;
+ int width, h, base, rx1 = 0, crects;
+ FbBits *pwLineEnd;
+ int irectPrevStart, irectLineStart;
+ register BoxPtr prectO, prectN;
+ BoxPtr FirstRect, rects, prectLineStart;
+ Bool fInBox, fSame;
+ register FbBits mask0 = FB_ALLONES & ~FbScrRight(FB_ALLONES, 1);
+ FbBits *pwLine;
+ int nWidth;
+
+ pReg = RegionCreate(NULL, 1);
+ if(!pReg)
+ return NullRegion;
+ FirstRect = RegionBoxptr(pReg);
+ rects = FirstRect;
+
+ fbPrepareAccess(&pPix->drawable);
+
+ pwLine = (FbBits *) pPix->devPrivate.ptr;
+ nWidth = pPix->devKind >> (FB_SHIFT-3);
+
+ width = pPix->drawable.width;
+ pReg->extents.x1 = width - 1;
+ pReg->extents.x2 = 0;
+ irectPrevStart = -1;
+ for(h = 0; h < pPix->drawable.height; h++)
+ {
+ pw = pwLine;
+ pwLine += nWidth;
+ irectLineStart = rects - FirstRect;
+ /* If the Screen left most bit of the word is set, we're starting in
+ * a box */
+ if(READ(pw) & mask0)
+ {
+ fInBox = TRUE;
+ rx1 = 0;
+ }
+ else
+ fInBox = FALSE;
+ /* Process all words which are fully in the pixmap */
+ pwLineEnd = pw + (width >> FB_SHIFT);
+ for (base = 0; pw < pwLineEnd; base += FB_UNIT)
+ {
+ w = READ(pw++);
+ if (fInBox)
+ {
+ if (!~w)
+ continue;
+ }
+ else
+ {
+ if (!w)
+ continue;
+ }
+ for(ib = 0; ib < FB_UNIT; ib++)
+ {
+ /* If the Screen left most bit of the word is set, we're
+ * starting a box */
+ if(w & mask0)
+ {
+ if(!fInBox)
+ {
+ rx1 = base + ib;
+ /* start new box */
+ fInBox = TRUE;
+ }
+ }
+ else
+ {
+ if(fInBox)
+ {
+ /* end box */
+ ADDRECT(pReg, rects, FirstRect,
+ rx1, h, base + ib, h + 1);
+ fInBox = FALSE;
+ }
+ }
+ /* Shift the word VISUALLY left one. */
+ w = FbScrLeft(w, 1);
+ }
+ }
+ if(width & FB_MASK)
+ {
+ /* Process final partial word on line */
+ w = READ(pw++);
+ for(ib = 0; ib < (width & FB_MASK); ib++)
+ {
+ /* If the Screen left most bit of the word is set, we're
+ * starting a box */
+ if(w & mask0)
+ {
+ if(!fInBox)
+ {
+ rx1 = base + ib;
+ /* start new box */
+ fInBox = TRUE;
+ }
+ }
+ else
+ {
+ if(fInBox)
+ {
+ /* end box */
+ ADDRECT(pReg, rects, FirstRect,
+ rx1, h, base + ib, h + 1);
+ fInBox = FALSE;
+ }
+ }
+ /* Shift the word VISUALLY left one. */
+ w = FbScrLeft(w, 1);
+ }
+ }
+ /* If scanline ended with last bit set, end the box */
+ if(fInBox)
+ {
+ ADDRECT(pReg, rects, FirstRect,
+ rx1, h, base + (width & FB_MASK), h + 1);
+ }
+ /* if all rectangles on this line have the same x-coords as
+ * those on the previous line, then add 1 to all the previous y2s and
+ * throw away all the rectangles from this line
+ */
+ fSame = FALSE;
+ if(irectPrevStart != -1)
+ {
+ crects = irectLineStart - irectPrevStart;
+ if(crects == ((rects - FirstRect) - irectLineStart))
+ {
+ prectO = FirstRect + irectPrevStart;
+ prectN = prectLineStart = FirstRect + irectLineStart;
+ fSame = TRUE;
+ while(prectO < prectLineStart)
+ {
+ if((prectO->x1 != prectN->x1) || (prectO->x2 != prectN->x2))
+ {
+ fSame = FALSE;
+ break;
+ }
+ prectO++;
+ prectN++;
+ }
+ if (fSame)
+ {
+ prectO = FirstRect + irectPrevStart;
+ while(prectO < prectLineStart)
+ {
+ prectO->y2 += 1;
+ prectO++;
+ }
+ rects -= crects;
+ pReg->data->numRects -= crects;
+ }
+ }
+ }
+ if(!fSame)
+ irectPrevStart = irectLineStart;
+ }
+ if (!pReg->data->numRects)
+ pReg->extents.x1 = pReg->extents.x2 = 0;
+ else
+ {
+ pReg->extents.y1 = RegionBoxptr(pReg)->y1;
+ pReg->extents.y2 = RegionEnd(pReg)->y2;
+ if (pReg->data->numRects == 1)
+ {
+ free(pReg->data);
+ pReg->data = (RegDataPtr)NULL;
+ }
+ }
+
+ fbFinishAccess(&pPix->drawable);
+#ifdef DEBUG
+ if (!RegionIsValid(pReg))
+ FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__);
+#endif
+ return pReg;
+}
+
+#ifdef FB_DEBUG
+
+#include <stdio.h>
+
+static Bool
+fbValidateBits (FbStip *bits, int stride, FbStip data)
+{
+ while (stride--)
+ {
+ if (*bits != data)
+ {
+ fprintf (stderr, "fbValidateBits failed at 0x%x (is 0x%x want 0x%x)\n",bits, *bits, data);
+ return FALSE;
+ }
+ bits++;
+ }
+}
+
+void
+fbValidateDrawable (DrawablePtr pDrawable)
+{
+ FbStip *bits, *first, *last;
+ int stride, bpp;
+ int xoff, yoff;
+ int height;
+ Bool failed;
+
+ if (pDrawable->type != DRAWABLE_PIXMAP)
+ pDrawable = (DrawablePtr) fbGetWindowPixmap(pDrawable);
+ fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff);
+ first = bits - stride;
+ last = bits + stride * pDrawable->height;
+ if (!fbValidateBits (first, stride, FB_HEAD_BITS) ||
+ !fbValidateBits (last, stride, FB_TAIL_BITS))
+ fbInitializeDrawable(pDrawable);
+ fbFinishAccess (pDrawable);
+}
+
+void
+fbSetBits (FbStip *bits, int stride, FbStip data)
+{
+ while (stride--)
+ *bits++ = data;
+}
+
+void
+fbInitializeDrawable (DrawablePtr pDrawable)
+{
+ FbStip *bits, *first, *last;
+ int stride, bpp;
+ int xoff, yoff;
+
+ fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff);
+ first = bits - stride;
+ last = bits + stride * pDrawable->height;
+ fbSetBits (first, stride, FB_HEAD_BITS);
+ fbSetBits (last, stride, FB_TAIL_BITS);
+ fbFinishAccess (pDrawable);
+}
+#endif /* FB_DEBUG */
diff --git a/xorg-server/fb/fbtrap.c b/xorg-server/fb/fbtrap.c
index 2554fccbf..2f23d8564 100644
--- a/xorg-server/fb/fbtrap.c
+++ b/xorg-server/fb/fbtrap.c
@@ -1,210 +1,210 @@
-/*
- * Copyright © 2004 Keith Packard
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "fb.h"
-
-#include "picturestr.h"
-#include "mipict.h"
-#include "fbpict.h"
-
-void
-fbAddTraps (PicturePtr pPicture,
- INT16 x_off,
- INT16 y_off,
- int ntrap,
- xTrap *traps)
-{
- int image_xoff, image_yoff;
- pixman_image_t *image = image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
-
- if (!image)
- return;
-
- pixman_add_traps (image, x_off, y_off, ntrap, (pixman_trap_t *)traps);
-
- free_pixman_pict (pPicture, image);
-}
-
-void
-fbRasterizeTrapezoid (PicturePtr pPicture,
- xTrapezoid *trap,
- int x_off,
- int y_off)
-{
- int mask_xoff, mask_yoff;
- pixman_image_t *image = image_from_pict (pPicture, FALSE, &mask_xoff, &mask_yoff);
-
- if (!image)
- return;
-
- pixman_rasterize_trapezoid (image, (pixman_trapezoid_t *)trap, x_off, y_off);
-
- free_pixman_pict (pPicture, image);
-}
-
-void
-fbAddTriangles (PicturePtr pPicture,
- INT16 x_off,
- INT16 y_off,
- int ntri,
- xTriangle *tris)
-{
- int image_xoff, image_yoff;
- pixman_image_t *image =
- image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
-
- if (!image)
- return;
-
- pixman_add_triangles (image, x_off, y_off, ntri, (pixman_triangle_t *)tris);
-
- free_pixman_pict (pPicture, image);
-}
-
-typedef void (* CompositeShapesFunc) (pixman_op_t op,
- pixman_image_t *src,
- pixman_image_t *dst,
- pixman_format_code_t mask_format,
- int x_src, int y_src,
- int x_dst, int y_dst,
- int n_shapes, const uint8_t *shapes);
-
-static void
-fbShapes (CompositeShapesFunc composite,
- pixman_op_t op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xDst,
- int16_t yDst,
- int nshapes,
- int shape_size,
- const uint8_t * shapes)
-{
- pixman_image_t *src, *dst;
- int src_xoff, src_yoff;
- int dst_xoff, dst_yoff;
-
- src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
- dst = image_from_pict (pDst, TRUE, &dst_xoff, &dst_yoff);
-
- if (src && dst)
- {
- pixman_format_code_t format;
-
- if (!maskFormat)
- {
- int i;
-
- if (pDst->polyEdge == PolyEdgeSharp)
- format = PIXMAN_a1;
- else
- format = PIXMAN_a8;
-
- for (i = 0; i < nshapes; ++i)
- {
- composite (op, src, dst, format,
- xSrc + src_xoff,
- ySrc + src_yoff,
- xDst + dst_xoff,
- yDst + dst_yoff,
- 1, shapes + i * shape_size);
- }
- }
- else
- {
- switch (PICT_FORMAT_A (maskFormat->format))
- {
- case 1:
- format = PIXMAN_a1;
- break;
-
- case 4:
- format = PIXMAN_a4;
- break;
-
- default:
- case 8:
- format = PIXMAN_a8;
- break;
- }
-
- composite (op, src, dst, format,
- xSrc + src_xoff,
- ySrc + src_yoff,
- xDst + dst_xoff,
- yDst + dst_yoff,
- nshapes, shapes);
- }
- }
-
- free_pixman_pict (pSrc, src);
- free_pixman_pict (pDst, dst);
-}
-
-void
-fbTrapezoids (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc,
- INT16 ySrc,
- int ntrap,
- xTrapezoid *traps)
-{
- int xDst, yDst;
-
- xDst = traps[0].left.p1.x >> 16;
- yDst = traps[0].left.p1.y >> 16;
-
- fbShapes ((CompositeShapesFunc)pixman_composite_trapezoids,
- op, pSrc, pDst, maskFormat,
- xSrc, ySrc, xDst, yDst,
- ntrap, sizeof (xTrapezoid), (const uint8_t *)traps);
-}
-
-void
-fbTriangles (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc,
- INT16 ySrc,
- int ntris,
- xTriangle *tris)
-{
- int xDst, yDst;
-
- xDst = tris[0].p1.x >> 16;
- yDst = tris[0].p1.y >> 16;
-
- fbShapes ((CompositeShapesFunc)pixman_composite_triangles,
- op, pSrc, pDst, maskFormat,
- xSrc, ySrc, xDst, yDst,
- ntris, sizeof (xTriangle), (const uint8_t *)tris);
-}
+/*
+ * Copyright © 2004 Keith Packard
+ *
+ * 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, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "fb.h"
+
+#include "picturestr.h"
+#include "mipict.h"
+#include "fbpict.h"
+
+void
+fbAddTraps (PicturePtr pPicture,
+ INT16 x_off,
+ INT16 y_off,
+ int ntrap,
+ xTrap *traps)
+{
+ int image_xoff, image_yoff;
+ pixman_image_t *image = image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
+
+ if (!image)
+ return;
+
+ pixman_add_traps (image, x_off, y_off, ntrap, (pixman_trap_t *)traps);
+
+ free_pixman_pict (pPicture, image);
+}
+
+void
+fbRasterizeTrapezoid (PicturePtr pPicture,
+ xTrapezoid *trap,
+ int x_off,
+ int y_off)
+{
+ int mask_xoff, mask_yoff;
+ pixman_image_t *image = image_from_pict (pPicture, FALSE, &mask_xoff, &mask_yoff);
+
+ if (!image)
+ return;
+
+ pixman_rasterize_trapezoid (image, (pixman_trapezoid_t *)trap, x_off, y_off);
+
+ free_pixman_pict (pPicture, image);
+}
+
+void
+fbAddTriangles (PicturePtr pPicture,
+ INT16 x_off,
+ INT16 y_off,
+ int ntri,
+ xTriangle *tris)
+{
+ int image_xoff, image_yoff;
+ pixman_image_t *image =
+ image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
+
+ if (!image)
+ return;
+
+ pixman_add_triangles (image, x_off, y_off, ntri, (pixman_triangle_t *)tris);
+
+ free_pixman_pict (pPicture, image);
+}
+
+typedef void (* CompositeShapesFunc) (pixman_op_t op,
+ pixman_image_t *src,
+ pixman_image_t *dst,
+ pixman_format_code_t mask_format,
+ int x_src, int y_src,
+ int x_dst, int y_dst,
+ int n_shapes, const uint8_t *shapes);
+
+static void
+fbShapes (CompositeShapesFunc composite,
+ pixman_op_t op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xDst,
+ int16_t yDst,
+ int nshapes,
+ int shape_size,
+ const uint8_t * shapes)
+{
+ pixman_image_t *src, *dst;
+ int src_xoff, src_yoff;
+ int dst_xoff, dst_yoff;
+
+ src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
+ dst = image_from_pict (pDst, TRUE, &dst_xoff, &dst_yoff);
+
+ if (src && dst)
+ {
+ pixman_format_code_t format;
+
+ if (!maskFormat)
+ {
+ int i;
+
+ if (pDst->polyEdge == PolyEdgeSharp)
+ format = PIXMAN_a1;
+ else
+ format = PIXMAN_a8;
+
+ for (i = 0; i < nshapes; ++i)
+ {
+ composite (op, src, dst, format,
+ xSrc + src_xoff,
+ ySrc + src_yoff,
+ xDst + dst_xoff,
+ yDst + dst_yoff,
+ 1, shapes + i * shape_size);
+ }
+ }
+ else
+ {
+ switch (PICT_FORMAT_A (maskFormat->format))
+ {
+ case 1:
+ format = PIXMAN_a1;
+ break;
+
+ case 4:
+ format = PIXMAN_a4;
+ break;
+
+ default:
+ case 8:
+ format = PIXMAN_a8;
+ break;
+ }
+
+ composite (op, src, dst, format,
+ xSrc + src_xoff,
+ ySrc + src_yoff,
+ xDst + dst_xoff,
+ yDst + dst_yoff,
+ nshapes, shapes);
+ }
+ }
+
+ free_pixman_pict (pSrc, src);
+ free_pixman_pict (pDst, dst);
+}
+
+void
+fbTrapezoids (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc,
+ int ntrap,
+ xTrapezoid *traps)
+{
+ int xDst, yDst;
+
+ xDst = traps[0].left.p1.x >> 16;
+ yDst = traps[0].left.p1.y >> 16;
+
+ fbShapes ((CompositeShapesFunc)pixman_composite_trapezoids,
+ op, pSrc, pDst, maskFormat,
+ xSrc, ySrc, xDst, yDst,
+ ntrap, sizeof (xTrapezoid), (const uint8_t *)traps);
+}
+
+void
+fbTriangles (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc,
+ int ntris,
+ xTriangle *tris)
+{
+ int xDst, yDst;
+
+ xDst = tris[0].p1.x >> 16;
+ yDst = tris[0].p1.y >> 16;
+
+ fbShapes ((CompositeShapesFunc)pixman_composite_triangles,
+ op, pSrc, pDst, maskFormat,
+ xSrc, ySrc, xDst, yDst,
+ ntris, sizeof (xTriangle), (const uint8_t *)tris);
+}
diff --git a/xorg-server/fb/makefile b/xorg-server/fb/makefile
new file mode 100644
index 000000000..717c07332
--- /dev/null
+++ b/xorg-server/fb/makefile
@@ -0,0 +1,37 @@
+
+LIBRARY=libfb
+
+CCFLAGS:=$(CCFLAGS:-RTCc=)
+
+
+CSRCS = \
+ fb24_32.c \
+ fballpriv.c \
+ fbarc.c \
+ fbbits.c \
+ fbblt.c \
+ fbbltone.c \
+ fbcopy.c \
+ fbfill.c \
+ fbfillrect.c \
+ fbfillsp.c \
+ fbgc.c \
+ fbgetsp.c \
+ fbglyph.c \
+ fbimage.c \
+ fbline.c \
+ fboverlay.c \
+ fbpict.c \
+ fbpixmap.c \
+ fbpoint.c \
+ fbpush.c \
+ fbscreen.c \
+ fbseg.c \
+ fbsetsp.c \
+ fbsolid.c \
+ fbstipple.c \
+ fbtile.c \
+ fbtrap.c \
+ fbutil.c \
+ fbwindow.c \
+ fbcmap_mi.c
diff --git a/xorg-server/fb/wfbrename.h b/xorg-server/fb/wfbrename.h
index d9aba7fb6..5dee3bc4a 100644
--- a/xorg-server/fb/wfbrename.h
+++ b/xorg-server/fb/wfbrename.h
@@ -44,7 +44,6 @@
#define fbCopyNto1 wfbCopyNto1
#define fbCopyNtoN wfbCopyNtoN
#define fbCopyPlane wfbCopyPlane
-#define fbCopyRegion wfbCopyRegion
#define fbCopyWindow wfbCopyWindow
#define fbCopyWindowProc wfbCopyWindowProc
#define fbCreateDefColormap wfbCreateDefColormap
@@ -54,7 +53,6 @@
#define fbCreateWindow wfbCreateWindow
#define fbDestroyPixmap wfbDestroyPixmap
#define fbDestroyWindow wfbDestroyWindow
-#define fbDoCopy wfbDoCopy
#define fbDots wfbDots
#define fbDots16 wfbDots16
#define fbDots24 wfbDots24
diff --git a/xorg-server/fonts.src/100dpi/makefile b/xorg-server/fonts.src/100dpi/makefile
new file mode 100644
index 000000000..7112c3275
--- /dev/null
+++ b/xorg-server/fonts.src/100dpi/makefile
@@ -0,0 +1,357 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+INC_BDF_RULES=1
+
+UTIL_DIR = ..\font-util
+
+load_makefile $(UTIL_DIR)\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+UCS2ANY = $(UTIL_DIR)\$(OBJDIR)\ucs2any.exe
+
+ # The following rule is to avoid parallel build problems
+.PHONY: buildtoolsfirst
+buildtoolsfirst: $(BDFTOPCF) $(UCS2ANY)
+
+all: buildtoolsfirst
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\100dpi
+
+BDF2UCS_FONT_FILES = \
+ lutBS08 \
+ lutBS10 \
+ lutBS12 \
+ lutBS14 \
+ lutBS18 \
+ lutBS19 \
+ lutBS24 \
+ lutRS08 \
+ lutRS10 \
+ lutRS12 \
+ lutRS14 \
+ lutRS18 \
+ lutRS19 \
+ lutRS24 \
+ lubB08 \
+ lubB10 \
+ lubB12 \
+ lubB14 \
+ lubB18 \
+ lubB19 \
+ lubB24 \
+ lubBI08 \
+ lubBI10 \
+ lubBI12 \
+ lubBI14 \
+ lubBI18 \
+ lubBI19 \
+ lubBI24 \
+ lubI08 \
+ lubI10 \
+ lubI12 \
+ lubI14 \
+ lubI18 \
+ lubI19 \
+ lubI24 \
+ luBIS08 \
+ luBIS10 \
+ luBIS12 \
+ luBIS14 \
+ luBIS18 \
+ luBIS19 \
+ luBIS24 \
+ lubR08 \
+ lubR10 \
+ lubR12 \
+ lubR14 \
+ lubR18 \
+ lubR19 \
+ lubR24 \
+ luBS08 \
+ luBS10 \
+ luBS12 \
+ luBS14 \
+ luBS18 \
+ luBS19 \
+ luBS24 \
+ luIS08 \
+ luIS10 \
+ luIS12 \
+ luIS14 \
+ luIS18 \
+ luIS19 \
+ luIS24 \
+ luRS08 \
+ luRS10 \
+ luRS12 \
+ luRS14 \
+ luRS18 \
+ luRS19 \
+ luRS24 \
+ UTB___10 \
+ UTB___12 \
+ UTB___14 \
+ UTB___18 \
+ UTB___24 \
+ UTBI__10 \
+ UTBI__12 \
+ UTBI__14 \
+ UTBI__18 \
+ UTBI__24 \
+ UTI___10 \
+ UTI___12 \
+ UTI___14 \
+ UTI___18 \
+ UTI___24 \
+ UTRG__10 \
+ UTRG__12 \
+ UTRG__14 \
+ UTRG__18 \
+ UTRG__24 \
+ courB08 \
+ courB10 \
+ courB12 \
+ courB14 \
+ courB18 \
+ courB24 \
+ courBO08 \
+ courBO10 \
+ courBO12 \
+ courBO14 \
+ courBO18 \
+ courBO24 \
+ courO08 \
+ courO10 \
+ courO12 \
+ courO14 \
+ courO18 \
+ courO24 \
+ courR08 \
+ courR10 \
+ courR12 \
+ courR14 \
+ courR18 \
+ courR24 \
+ helvB08 \
+ helvB10 \
+ helvB12 \
+ helvB14 \
+ helvB18 \
+ helvB24 \
+ helvBO08 \
+ helvBO10 \
+ helvBO12 \
+ helvBO14 \
+ helvBO18 \
+ helvBO24 \
+ helvO08 \
+ helvO10 \
+ helvO12 \
+ helvO14 \
+ helvO18 \
+ helvO24 \
+ helvR08 \
+ helvR10 \
+ helvR12 \
+ helvR14 \
+ helvR18 \
+ helvR24 \
+ ncenB08 \
+ ncenB10 \
+ ncenB12 \
+ ncenB14 \
+ ncenB18 \
+ ncenB24 \
+ ncenBI08 \
+ ncenBI10 \
+ ncenBI12 \
+ ncenBI14 \
+ ncenBI18 \
+ ncenBI24 \
+ ncenI08 \
+ ncenI10 \
+ ncenI12 \
+ ncenI14 \
+ ncenI18 \
+ ncenI24 \
+ ncenR08 \
+ ncenR10 \
+ ncenR12 \
+ ncenR14 \
+ ncenR18 \
+ ncenR24 \
+ timB08 \
+ timB10 \
+ timB12 \
+ timB14 \
+ timB18 \
+ timB24 \
+ timBI08 \
+ timBI10 \
+ timBI12 \
+ timBI14 \
+ timBI18 \
+ timBI24 \
+ timI08 \
+ timI10 \
+ timI12 \
+ timI14 \
+ timI18 \
+ timI24 \
+ timR08 \
+ timR10 \
+ timR12 \
+ timR14 \
+ timR18 \
+ timR24
+EXTRA_FONT_FILES = \
+ symb08 \
+ symb10 \
+ symb12 \
+ symb14 \
+ symb18 \
+ symb24 \
+ charB08 \
+ charB10 \
+ charB12 \
+ charB14 \
+ charB18 \
+ charB24 \
+ charBI08 \
+ charBI10 \
+ charBI12 \
+ charBI14 \
+ charBI18 \
+ charBI24 \
+ charI08 \
+ charI10 \
+ charI12 \
+ charI14 \
+ charI18 \
+ charI24 \
+ charR08 \
+ charR10 \
+ charR12 \
+ charR14 \
+ charR18 \
+ charR24 \
+ tech14 \
+ techB14 \
+ term14 \
+ termB14
+FONT_FILES = $(BDF2UCS_FONT_FILES) $(EXTRA_FONT_FILES)
+
+BDF_FILES = $(FONT_FILES:%=%.bdf)
+PCF_FILES = $(FONT_FILES:%=$(DESTDIR)\%.pcf.gz)
+
+ISO8859_1_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-1.pcf.gz)
+
+ISO8859_2_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-2.pcf.gz)
+
+ISO8859_3_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-3.pcf.gz)
+
+ISO8859_4_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-4.pcf.gz)
+
+ISO8859_9_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-9.pcf.gz)
+
+ISO8859_10_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-10.pcf.gz)
+
+ISO8859_13_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-13.pcf.gz)
+
+ISO8859_14_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-14.pcf.gz)
+
+ISO8859_15_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-15.pcf.gz)
+
+$(DESTDIR)\%-ISO8859-1.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-1.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-1 ISO8859-1
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-1.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-1.bdf)
+
+$(DESTDIR)\%-ISO8859-2.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-2.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-2 ISO8859-2
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-2.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-2.bdf)
+
+$(DESTDIR)\%-ISO8859-3.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-3.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-3 ISO8859-3
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-3.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-3.bdf)
+
+$(DESTDIR)\%-ISO8859-4.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-4.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-4 ISO8859-4
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-4.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-4.bdf)
+
+$(DESTDIR)\%-ISO8859-9.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-9.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-9 ISO8859-9
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-9.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-9.bdf)
+
+$(DESTDIR)\%-ISO8859-10.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-10.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-10 ISO8859-10
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-10.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-10.bdf)
+
+$(DESTDIR)\%-ISO8859-13.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-13.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-13 ISO8859-13
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-13.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-13.bdf)
+
+$(DESTDIR)\%-ISO8859-14.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-14.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-14 ISO8859-14
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-14.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-14.bdf)
+
+$(DESTDIR)\%-ISO8859-15.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-15.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-15 ISO8859-15
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-15.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-15.bdf)
+
+font_DATA = \
+ $(PCF_FILES) \
+ $(ISO8859_1_PCF_FILES) \
+ $(ISO8859_2_PCF_FILES) \
+ $(ISO8859_3_PCF_FILES) \
+ $(ISO8859_4_PCF_FILES) \
+ $(ISO8859_9_PCF_FILES) \
+ $(ISO8859_10_PCF_FILES) \
+ $(ISO8859_13_PCF_FILES) \
+ $(ISO8859_14_PCF_FILES) \
+ $(ISO8859_15_PCF_FILES)
+
+all: $(DESTDIR) $(DESTDIR)\fonts.dir $(DESTDIR)\fonts.alias
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
+
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+$(DESTDIR)\fonts.scale: $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) .
+
+$(DESTDIR)\fonts.dir: $(DESTDIR)\fonts.scale $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) -b -s -l .
+
+$(DESTDIR)\fonts.alias: fonts.alias
+ copy $< $@
+
diff --git a/xorg-server/fonts.src/75dpi/makefile b/xorg-server/fonts.src/75dpi/makefile
new file mode 100644
index 000000000..2467889d9
--- /dev/null
+++ b/xorg-server/fonts.src/75dpi/makefile
@@ -0,0 +1,357 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+INC_BDF_RULES=1
+
+UTIL_DIR = ..\font-util
+
+load_makefile $(UTIL_DIR)\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+UCS2ANY = $(UTIL_DIR)\$(OBJDIR)\ucs2any.exe
+
+ # The following rule is to avoid parallel build problems
+.PHONY: buildtoolsfirst
+buildtoolsfirst: $(BDFTOPCF) $(UCS2ANY)
+
+all: buildtoolsfirst
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\75dpi
+
+BDF2UCS_FONT_FILES = \
+ lutBS08 \
+ lutBS10 \
+ lutBS12 \
+ lutBS14 \
+ lutBS18 \
+ lutBS19 \
+ lutBS24 \
+ lutRS08 \
+ lutRS10 \
+ lutRS12 \
+ lutRS14 \
+ lutRS18 \
+ lutRS19 \
+ lutRS24 \
+ UTB___10 \
+ UTB___12 \
+ UTB___14 \
+ UTB___18 \
+ UTB___24 \
+ UTBI__10 \
+ UTBI__12 \
+ UTBI__14 \
+ UTBI__18 \
+ UTBI__24 \
+ UTI___10 \
+ UTI___12 \
+ UTI___14 \
+ UTI___18 \
+ UTI___24 \
+ UTRG__10 \
+ UTRG__12 \
+ UTRG__14 \
+ UTRG__18 \
+ UTRG__24 \
+ courB08 \
+ courB10 \
+ courB12 \
+ courB14 \
+ courB18 \
+ courB24 \
+ courBO08 \
+ courBO10 \
+ courBO12 \
+ courBO14 \
+ courBO18 \
+ courBO24 \
+ courO08 \
+ courO10 \
+ courO12 \
+ courO14 \
+ courO18 \
+ courO24 \
+ courR08 \
+ courR10 \
+ courR12 \
+ courR14 \
+ courR18 \
+ courR24 \
+ helvB08 \
+ helvB10 \
+ helvB12 \
+ helvB14 \
+ helvB18 \
+ helvB24 \
+ helvBO08 \
+ helvBO10 \
+ helvBO12 \
+ helvBO14 \
+ helvBO18 \
+ helvBO24 \
+ helvO08 \
+ helvO10 \
+ helvO12 \
+ helvO14 \
+ helvO18 \
+ helvO24 \
+ helvR08 \
+ helvR10 \
+ helvR12 \
+ helvR14 \
+ helvR18 \
+ helvR24 \
+ ncenB08 \
+ ncenB10 \
+ ncenB12 \
+ ncenB14 \
+ ncenB18 \
+ ncenB24 \
+ ncenBI08 \
+ ncenBI10 \
+ ncenBI12 \
+ ncenBI14 \
+ ncenBI18 \
+ ncenBI24 \
+ ncenI08 \
+ ncenI10 \
+ ncenI12 \
+ ncenI14 \
+ ncenI18 \
+ ncenI24 \
+ ncenR08 \
+ ncenR10 \
+ ncenR12 \
+ ncenR14 \
+ ncenR18 \
+ ncenR24 \
+ timB08 \
+ timB10 \
+ timB12 \
+ timB14 \
+ timB18 \
+ timB24 \
+ timBI08 \
+ timBI10 \
+ timBI12 \
+ timBI14 \
+ timBI18 \
+ timBI24 \
+ timI08 \
+ timI10 \
+ timI12 \
+ timI14 \
+ timI18 \
+ timI24 \
+ timR08 \
+ timR10 \
+ timR12 \
+ timR14 \
+ timR18 \
+ timR24 \
+ lubB08 \
+ lubB10 \
+ lubB12 \
+ lubB14 \
+ lubB18 \
+ lubB19 \
+ lubB24 \
+ lubBI08 \
+ lubBI10 \
+ lubBI12 \
+ lubBI14 \
+ lubBI18 \
+ lubBI19 \
+ lubBI24 \
+ lubI08 \
+ lubI10 \
+ lubI12 \
+ lubI14 \
+ lubI18 \
+ lubI19 \
+ lubI24 \
+ luBIS08 \
+ luBIS10 \
+ luBIS12 \
+ luBIS14 \
+ luBIS18 \
+ luBIS19 \
+ luBIS24 \
+ lubR08 \
+ lubR10 \
+ lubR12 \
+ lubR14 \
+ lubR18 \
+ lubR19 \
+ lubR24 \
+ luBS08 \
+ luBS10 \
+ luBS12 \
+ luBS14 \
+ luBS18 \
+ luBS19 \
+ luBS24 \
+ luIS08 \
+ luIS10 \
+ luIS12 \
+ luIS14 \
+ luIS18 \
+ luIS19 \
+ luIS24 \
+ luRS08 \
+ luRS10 \
+ luRS12 \
+ luRS14 \
+ luRS18 \
+ luRS19 \
+ luRS24
+EXTRA_FONT_FILES = \
+ charB08 \
+ charB10 \
+ charB12 \
+ charB14 \
+ charB18 \
+ charB24 \
+ charBI08 \
+ charBI10 \
+ charBI12 \
+ charBI14 \
+ charBI18 \
+ charBI24 \
+ charI08 \
+ charI10 \
+ charI12 \
+ charI14 \
+ charI18 \
+ charI24 \
+ charR08 \
+ charR10 \
+ charR12 \
+ charR14 \
+ charR18 \
+ charR24 \
+ tech14 \
+ techB14 \
+ term14 \
+ termB14 \
+ symb08 \
+ symb10 \
+ symb12 \
+ symb14 \
+ symb18 \
+ symb24
+FONT_FILES = $(BDF2UCS_FONT_FILES) $(EXTRA_FONT_FILES)
+
+BDF_FILES = $(FONT_FILES:%=%.bdf)
+PCF_FILES = $(FONT_FILES:%=$(DESTDIR)\%.pcf.gz)
+
+ISO8859_1_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-1.pcf.gz)
+
+ISO8859_2_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-2.pcf.gz)
+
+ISO8859_3_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-3.pcf.gz)
+
+ISO8859_4_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-4.pcf.gz)
+
+ISO8859_9_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-9.pcf.gz)
+
+ISO8859_10_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-10.pcf.gz)
+
+ISO8859_13_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-13.pcf.gz)
+
+ISO8859_14_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-14.pcf.gz)
+
+ISO8859_15_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-15.pcf.gz)
+
+$(DESTDIR)\%-ISO8859-1.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-1.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-1 ISO8859-1
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-1.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-1.bdf)
+
+$(DESTDIR)\%-ISO8859-2.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-2.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-2 ISO8859-2
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-2.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-2.bdf)
+
+$(DESTDIR)\%-ISO8859-3.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-3.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-3 ISO8859-3
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-3.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-3.bdf)
+
+$(DESTDIR)\%-ISO8859-4.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-4.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-4 ISO8859-4
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-4.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-4.bdf)
+
+$(DESTDIR)\%-ISO8859-9.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-9.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-9 ISO8859-9
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-9.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-9.bdf)
+
+$(DESTDIR)\%-ISO8859-10.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-10.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-10 ISO8859-10
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-10.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-10.bdf)
+
+$(DESTDIR)\%-ISO8859-13.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-13.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-13 ISO8859-13
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-13.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-13.bdf)
+
+$(DESTDIR)\%-ISO8859-14.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-14.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-14 ISO8859-14
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-14.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-14.bdf)
+
+$(DESTDIR)\%-ISO8859-15.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-15.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-15 ISO8859-15
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-15.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-15.bdf)
+
+font_DATA = \
+ $(PCF_FILES) \
+ $(ISO8859_1_PCF_FILES) \
+ $(ISO8859_2_PCF_FILES) \
+ $(ISO8859_3_PCF_FILES) \
+ $(ISO8859_4_PCF_FILES) \
+ $(ISO8859_9_PCF_FILES) \
+ $(ISO8859_10_PCF_FILES) \
+ $(ISO8859_13_PCF_FILES) \
+ $(ISO8859_14_PCF_FILES) \
+ $(ISO8859_15_PCF_FILES)
+
+all: $(DESTDIR) $(DESTDIR)\fonts.dir $(DESTDIR)\fonts.alias
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
+
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+$(DESTDIR)\fonts.scale: $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) .
+
+$(DESTDIR)\fonts.dir: $(DESTDIR)\fonts.scale $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) -b -s -l .
+
+$(DESTDIR)\fonts.alias: fonts.alias
+ copy $< $@
+
diff --git a/xorg-server/fonts.src/OTF/makefile b/xorg-server/fonts.src/OTF/makefile
new file mode 100644
index 000000000..7187a55c7
--- /dev/null
+++ b/xorg-server/fonts.src/OTF/makefile
@@ -0,0 +1,53 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+INC_BDF_RULES=1
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\OTF
+
+FONT_FILES = \
+ SyrCOMAdiabene.otf \
+ SyrCOMAntioch.otf \
+ SyrCOMBatnanBold.otf \
+ SyrCOMBatnan.otf \
+ SyrCOMCtesiphon.otf \
+ SyrCOMEdessa.otf \
+ SyrCOMJerusalemBold.otf \
+ SyrCOMJerusalemItalic.otf \
+ SyrCOMJerusalem.otf \
+ SyrCOMJerusalemOutline.otf \
+ SyrCOMKharput.otf \
+ SyrCOMMalankara.otf \
+ SyrCOMMardinBold.otf \
+ SyrCOMMardin.otf \
+ SyrCOMMidyat.otf \
+ SyrCOMNisibin.otf \
+ SyrCOMNisibinOutline.otf \
+ SyrCOMQenNeshrin.otf \
+ SyrCOMTalada.otf \
+ SyrCOMTurAbdin.otf \
+ SyrCOMUrhoyBold.otf \
+ SyrCOMUrhoy.otf \
+ GohaTibebZemen.otf
+
+fontdir = .
+font_DATA = $(FONT_FILES:%=$(DESTDIR)\%)
+
+all: $(DESTDIR) $(DESTDIR)\fonts.dir
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
+
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+$(DESTDIR)\fonts.scale: $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) .
+
+$(DESTDIR)\fonts.dir: $(DESTDIR)\fonts.scale $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) -b -s -l .
+# $(FCCACHE) $(DESTDIR)
+
+$(DESTDIR)\%.otf: %.otf
+ copy $< $@
diff --git a/xorg-server/fonts.src/Speedo/makefile b/xorg-server/fonts.src/Speedo/makefile
new file mode 100644
index 000000000..e1cf21315
--- /dev/null
+++ b/xorg-server/fonts.src/Speedo/makefile
@@ -0,0 +1,39 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+INC_BDF_RULES=1
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\Speedo
+
+FONT_FILES = \
+ font0419.spd \
+ font0582.spd \
+ font0583.spd \
+ font0611.spd \
+ font0648.spd \
+ font0649.spd \
+ font0709.spd \
+ font0710.spd \
+ fonts.scale
+
+fontdir = .
+font_DATA = $(FONT_FILES:%=$(DESTDIR)\%)
+
+$(DESTDIR)\fonts.dir: $(DESTDIR)\fonts.scale
+
+all: $(DESTDIR) $(DESTDIR)\fonts.dir
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
+
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+$(DESTDIR)\fonts.dir: $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) -b -s -l .
+
+$(DESTDIR)\%.spd: %.spd
+ copy $< $@
+
+$(DESTDIR)\%.scale: %.scale
+ copy $< $@
diff --git a/xorg-server/fonts.src/TTF/makefile b/xorg-server/fonts.src/TTF/makefile
new file mode 100644
index 000000000..c5518f230
--- /dev/null
+++ b/xorg-server/fonts.src/TTF/makefile
@@ -0,0 +1,54 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+INC_BDF_RULES=1
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\TTF
+
+
+FONT_FILES = \
+ luximbi.ttf \
+ luximb.ttf \
+ luximri.ttf \
+ luximr.ttf \
+ luxirbi.ttf \
+ luxirb.ttf \
+ luxirri.ttf \
+ luxirr.ttf \
+ luxisbi.ttf \
+ luxisb.ttf \
+ luxisri.ttf \
+ luxisr.ttf \
+ Vera.ttf \
+ VeraBd.ttf \
+ VeraBI.ttf \
+ VeraIt.ttf \
+ VeraMoBd.ttf \
+ VeraMoBI.ttf \
+ VeraMoIt.ttf \
+ VeraMono.ttf \
+ VeraSe.ttf \
+ VeraSeBd.ttf \
+ GohaTibebZemen.ttf
+
+fontdir = .
+font_DATA = $(FONT_FILES:%=$(DESTDIR)\%)
+
+all: $(DESTDIR) $(DESTDIR)\fonts.dir
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
+
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+$(DESTDIR)\fonts.scale: $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) .
+
+$(DESTDIR)\fonts.dir: $(DESTDIR)\fonts.scale $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) -b -s -l .
+# $(FCCACHE) $(DESTDIR)
+
+$(DESTDIR)\%.ttf: %.ttf
+ copy $< $@
diff --git a/xorg-server/fonts.src/Type1/makefile b/xorg-server/fonts.src/Type1/makefile
new file mode 100644
index 000000000..1c5935cfd
--- /dev/null
+++ b/xorg-server/fonts.src/Type1/makefile
@@ -0,0 +1,93 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+INC_BDF_RULES=1
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\Type1
+
+FONT_FILES = \
+ cursor.pfa \
+ UTB_____.afm \
+ UTBI____.afm \
+ UTBI____.pfa \
+ UTB_____.pfa \
+ UTI_____.afm \
+ UTI_____.pfa \
+ UTRG____.afm \
+ UTRG____.pfa \
+ cour.afm \
+ courb.afm \
+ courbi.afm \
+ courbi.pfa \
+ courb.pfa \
+ couri.afm \
+ couri.pfa \
+ cour.pfa \
+ l047013t.afm \
+ l047013t.pfa \
+ l047016t.afm \
+ l047016t.pfa \
+ l047033t.afm \
+ l047033t.pfa \
+ l047036t.afm \
+ l047036t.pfa \
+ l048013t.afm \
+ l048013t.pfa \
+ l048016t.afm \
+ l048016t.pfa \
+ l048033t.afm \
+ l048033t.pfa \
+ l048036t.afm \
+ l048036t.pfa \
+ l049013t.afm \
+ l049013t.pfa \
+ l049016t.afm \
+ l049016t.pfa \
+ l049033t.afm \
+ l049033t.pfa \
+ l049036t.afm \
+ l049036t.pfa \
+ c0419bt_.afm \
+ c0419bt_.pfb \
+ c0582bt_.afm \
+ c0582bt_.pfb \
+ c0583bt_.afm \
+ c0583bt_.pfb \
+ c0611bt_.afm \
+ c0611bt_.pfb \
+ c0632bt_.afm \
+ c0632bt_.pfb \
+ c0633bt_.afm \
+ c0633bt_.pfb \
+ c0648bt_.afm \
+ c0648bt_.pfb \
+ c0649bt_.afm \
+ c0649bt_.pfb
+
+fontdir = .
+font_DATA = $(FONT_FILES:%=$(DESTDIR)\%)
+
+all: $(DESTDIR) $(DESTDIR)\fonts.dir
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
+
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+$(DESTDIR)\fonts.scale: $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) .
+
+$(DESTDIR)\fonts.dir: $(DESTDIR)\fonts.scale $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) -b -s -l .
+# $(FCCACHE) $(DESTDIR)
+
+$(DESTDIR)\%.afm: %.afm
+ copy $< $@
+
+$(DESTDIR)\%.pfb: %.pfb
+ copy $< $@
+
+$(DESTDIR)\%.pfa: %.pfa
+ copy $< $@
diff --git a/xorg-server/fonts.src/cyrillic/makefile b/xorg-server/fonts.src/cyrillic/makefile
new file mode 100644
index 000000000..f544bba4b
--- /dev/null
+++ b/xorg-server/fonts.src/cyrillic/makefile
@@ -0,0 +1,114 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+INC_BDF_RULES=1
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\cyrillic
+
+FONT_FILES = \
+ proof9x16 \
+ koi12x24b \
+ koi12x24 \
+ koi5x8 \
+ koi6x13b \
+ koi6x13 \
+ koi6x9 \
+ koi7x14b \
+ koi7x14 \
+ koi8x13 \
+ koi8x16b \
+ koi8x16 \
+ koi9x15b \
+ koi9x15 \
+ koi9x18b \
+ koi9x18 \
+ screen8x16b \
+ screen8x16 \
+ crox1cb \
+ crox1c \
+ crox1cbo \
+ crox1co \
+ crox1hb \
+ crox1h \
+ crox1hbo \
+ crox1ho \
+ crox1tb \
+ crox1t \
+ crox1tbo \
+ crox1to \
+ crox2cb \
+ crox2c \
+ crox2cbo \
+ crox2co \
+ crox2hb \
+ crox2h \
+ crox2hbo \
+ crox2ho \
+ crox2tb \
+ crox2t \
+ crox2tbo \
+ crox2to \
+ crox3cb \
+ crox3c \
+ crox3cbo \
+ crox3co \
+ crox3hb \
+ crox3h \
+ crox3hbo \
+ crox3ho \
+ crox3tb \
+ crox3t \
+ crox3tbo \
+ crox3to \
+ crox4hb \
+ crox4h \
+ crox4hbo \
+ crox4ho \
+ crox4tb \
+ crox4t \
+ crox4tbo \
+ crox4to \
+ crox5hb \
+ crox5h \
+ crox5hbo \
+ crox5ho \
+ crox5tb \
+ crox5t \
+ crox5tbo \
+ crox5to \
+ crox6hb \
+ crox6h \
+ crox6hbo \
+ crox6ho \
+ crox6tb \
+ crox6t \
+ crox6tbo \
+ crox6to \
+ koi10x16b \
+ koi10x20 \
+ koi6x10 \
+ koinil2
+
+BDF_FILES = $(FONT_FILES:%=%.bdf)
+PCF_FILES = $(FONT_FILES:%=$(DESTDIR)\%.pcf.gz)
+
+font_DATA = $(PCF_FILES)
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
+
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+all: $(DESTDIR) $(MKFONTSCALE) $(DESTDIR)\fonts.dir $(DESTDIR)\fonts.alias
+
+$(DESTDIR)\fonts.scale: $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) .
+
+$(DESTDIR)\fonts.dir: $(DESTDIR)\fonts.scale $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) -b -s -l .
+
+
+$(DESTDIR)\fonts.alias: fonts.alias
+ copy $< $@
diff --git a/xorg-server/fonts.src/encodings/large/makefile b/xorg-server/fonts.src/encodings/large/makefile
new file mode 100644
index 000000000..0f168d046
--- /dev/null
+++ b/xorg-server/fonts.src/encodings/large/makefile
@@ -0,0 +1,40 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+INC_BDF_RULES=1
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\encodings\large
+
+ENCODING_FILES = \
+ big5.eten-0.enc \
+ big5hkscs-0.enc \
+ cns11643-1.enc \
+ cns11643-2.enc \
+ cns11643-3.enc \
+ gb18030-0.enc \
+ gb18030.2000-0.enc \
+ gb18030.2000-1.enc \
+ gb2312.1980-0.enc \
+ gbk-0.enc \
+ jisx0201.1976-0.enc \
+ jisx0208.1990-0.enc \
+ jisx0212.1990-0.enc \
+ ksc5601.1987-0.enc \
+ ksc5601.1992-3.enc \
+ sun.unicode.india-0.enc
+
+COMPRESSED = $(ENCODING_FILES:%=$(DESTDIR)\%.gz)
+
+DATA_FILES = $(COMPRESSED)
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
+
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+all: $(DESTDIR)\encodings.dir
+
+$(DESTDIR)\encodings.dir: $(DATA_FILES) $(MKFONTSCALE)
+ cd "$(DESTDIR)" & $(MKFONTSCALE) -b -s -l -n -r -p .\large -e . .
+
+
diff --git a/xorg-server/fonts.src/encodings/makefile b/xorg-server/fonts.src/encodings/makefile
new file mode 100644
index 000000000..548d56ce5
--- /dev/null
+++ b/xorg-server/fonts.src/encodings/makefile
@@ -0,0 +1,63 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+load_makefile large\makefile MAKESERVER=0 DEBUG=0
+
+INC_BDF_RULES=1
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\encodings
+
+ENCODING_FILES = \
+ adobe-dingbats.enc \
+ adobe-standard.enc \
+ adobe-symbol.enc \
+ armscii-8.enc \
+ ascii-0.enc \
+ dec-special.enc \
+ ibm-cp437.enc \
+ ibm-cp850.enc \
+ ibm-cp852.enc \
+ ibm-cp866.enc \
+ iso8859-11.enc \
+ iso8859-13.enc \
+ iso8859-16.enc \
+ iso8859-6.16.enc \
+ iso8859-6.8x.enc \
+ microsoft-cp1250.enc \
+ microsoft-cp1251.enc \
+ microsoft-cp1252.enc \
+ microsoft-cp1253.enc \
+ microsoft-cp1254.enc \
+ microsoft-cp1255.enc \
+ microsoft-cp1256.enc \
+ microsoft-cp1257.enc \
+ microsoft-cp1258.enc \
+ microsoft-win3.1.enc \
+ mulearabic-0.enc \
+ mulearabic-1.enc \
+ mulearabic-2.enc \
+ mulelao-1.enc \
+ suneu-greek.enc \
+ tcvn-0.enc \
+ tis620-2.enc \
+ viscii1.1-1.enc
+
+COMPRESSED = $(ENCODING_FILES:%=$(DESTDIR)\%.gz)
+
+DATA_FILES = $(COMPRESSED)
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
+
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+$(DESTDIR)\encodings.dir: $(DATA_FILES) $(DESTDIR)\large\encodings.dir $(MKFONTSCALE)
+ cd "$(DESTDIR)" & $(MKFONTSCALE) -b -s -l -n -r -p . -e . -e large .
+
+all: $(DESTDIR)\encodings.dir
+
+.PHONY: cleanthis
+cleanthis:
+ del -e $(DESTDIR)
+
+clean: cleanthis
+
diff --git a/xorg-server/fonts.src/font-util/makefile b/xorg-server/fonts.src/font-util/makefile
new file mode 100644
index 000000000..13e196a03
--- /dev/null
+++ b/xorg-server/fonts.src/font-util/makefile
@@ -0,0 +1,5 @@
+TTYAPP = ucs2any
+
+CSRCS = ucs2any.c
+
+DEFINES += NEED_BASENAME
diff --git a/xorg-server/fonts.src/makefile b/xorg-server/fonts.src/makefile
new file mode 100644
index 000000000..47c583893
--- /dev/null
+++ b/xorg-server/fonts.src/makefile
@@ -0,0 +1 @@
+SUBDIRS=font-util 75dpi 100dpi cyrillic encodings misc OTF Speedo TTF Type1 terminus-font
diff --git a/xorg-server/fonts.src/misc/makefile b/xorg-server/fonts.src/misc/makefile
new file mode 100644
index 000000000..95d736477
--- /dev/null
+++ b/xorg-server/fonts.src/misc/makefile
@@ -0,0 +1,345 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+INC_BDF_RULES=1
+
+UTIL_DIR = ..\font-util
+
+load_makefile $(UTIL_DIR)\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+UCS2ANY = $(UTIL_DIR)\$(OBJDIR)\ucs2any.exe
+
+ # The following rule is to avoid parallel build problems
+.PHONY: buildtoolsfirst
+buildtoolsfirst: $(BDFTOPCF) $(UCS2ANY)
+
+all: buildtoolsfirst
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\misc
+
+BDF2UCS_FONT_FILES = \
+ clR6x12 \
+ 4x6 \
+ 5x7 \
+ 5x8 \
+ 6x9 \
+ 6x10 \
+ 6x12 \
+ 6x13 \
+ 6x13B \
+ 6x13O \
+ 7x13 \
+ 7x13B \
+ 7x13O \
+ 7x14 \
+ 7x14B \
+ 8x13 \
+ 8x13B \
+ 8x13O \
+ 9x15 \
+ 9x15B \
+ 9x18 \
+ 9x18B \
+ 10x20
+BDF2UCS_8_FONT_FILES = \
+ clR6x12 \
+ 4x6 \
+ 5x7 \
+ 5x8 \
+ 6x9 \
+ 6x10 \
+ 6x12 \
+ 6x13 \
+ 6x13B \
+ 7x13 \
+ 7x13B \
+ 7x14 \
+ 7x14B \
+ 8x13 \
+ 8x13B \
+ 9x15 \
+ 9x15B \
+ 9x18 \
+ 9x18B \
+ 10x20
+BDF2UCS_11_FONT_FILES = \
+ 6x13 \
+ 7x13 \
+ 7x13B \
+ 7x13O \
+ 7x14 \
+ 7x14B \
+ 9x15 \
+ 9x15B \
+ 9x18 \
+ 10x20
+BDF2UCS_KOI8_FONT_FILES = \
+ clR6x12 \
+ 4x6 \
+ 5x7 \
+ 5x8 \
+ 6x9 \
+ 6x10 \
+ 6x12 \
+ 6x13 \
+ 7x13 \
+ 7x14 \
+ 8x13 \
+ 9x15 \
+ 9x18 \
+ 10x20
+BDF2UCS_JISX0201_FONT_FILES = \
+ 7x14
+EXTRA_FONT_FILES = \
+ 12x13ja \
+ 18x18ja \
+ 18x18ko \
+ k14 \
+ nil2 \
+ micro \
+ jiskan16 \
+ jiskan24 \
+ gb16fs \
+ gb16st \
+ gb24st \
+ deccurs \
+ decsess \
+ arabic24 \
+ cursor \
+ hanglg16 \
+ hanglm16 \
+ hanglm24 \
+ cu12 \
+ cu-alt12 \
+ cu-arabic12 \
+ cuarabic12 \
+ cu-devnag12 \
+ cudevnag12 \
+ cu-lig12 \
+ cu-pua12 \
+ clB6x10 \
+ clB6x12 \
+ clB8x10 \
+ clB8x12 \
+ clB8x13 \
+ clB8x14 \
+ clB8x16 \
+ clB8x8 \
+ clB9x15 \
+ clI6x12 \
+ clI8x8 \
+ clR4x6 \
+ clR5x10 \
+ clR5x6 \
+ clR5x8 \
+ clR6x10 \
+ clR6x13 \
+ clR6x6 \
+ clR6x8 \
+ clR7x10 \
+ clR7x12 \
+ clR7x14 \
+ clR7x8 \
+ clR8x10 \
+ clR8x12 \
+ clR8x13 \
+ clR8x14 \
+ clR8x16 \
+ clR8x8 \
+ clR9x15 \
+ 12x24 \
+ 12x24rk \
+ 8x16 \
+ 8x16rk \
+ olcursor \
+ olgl10 \
+ olgl12 \
+ olgl14 \
+ olgl19
+
+FONT_FILES = $(BDF2UCS_FONT_FILES) $(EXTRA_FONT_FILES)
+
+BDF_FILES = $(FONT_FILES:%=%.bdf)
+PCF_FILES = $(FONT_FILES:%=$(DESTDIR)\%.pcf.gz)
+
+ISO8859_1_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-1.pcf.gz)
+
+ISO8859_2_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-2.pcf.gz)
+
+ISO8859_3_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-3.pcf.gz)
+
+ISO8859_4_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-4.pcf.gz)
+
+ISO8859_5_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-5.pcf.gz)
+
+ISO8859_7_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-7.pcf.gz)
+
+ISO8859_8_PCF_FILES = $(BDF2UCS_8_FONT_FILES:%=$(DESTDIR)\%-ISO8859-8.pcf.gz)
+
+ISO8859_9_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-9.pcf.gz)
+
+ISO8859_10_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-10.pcf.gz)
+
+ISO8859_11_PCF_FILES = $(BDF2UCS_11_FONT_FILES:%=$(DESTDIR)\%-ISO8859-11.pcf.gz)
+
+ISO8859_13_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-13.pcf.gz)
+
+ISO8859_14_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-14.pcf.gz)
+
+ISO8859_15_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-15.pcf.gz)
+
+ISO8859_16_PCF_FILES = $(BDF2UCS_FONT_FILES:%=$(DESTDIR)\%-ISO8859-16.pcf.gz)
+
+KOI8_R_PCF_FILES = $(BDF2UCS_KOI8_FONT_FILES:%=$(DESTDIR)\%-KOI8-R.pcf.gz)
+
+JISX0201_PCF_FILES = $(BDF2UCS_JISX0201_FONT_FILES:%=$(DESTDIR)\%-JISX0201.1976-0.pcf.gz)
+
+$(DESTDIR)\%-ISO8859-1.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-1.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-1 ISO8859-1
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-1.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-1.bdf)
+
+$(DESTDIR)\%-ISO8859-2.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-2.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-2 ISO8859-2
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-2.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-2.bdf)
+
+$(DESTDIR)\%-ISO8859-3.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-3.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-3 ISO8859-3
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-3.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-3.bdf)
+
+$(DESTDIR)\%-ISO8859-4.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-4.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-4 ISO8859-4
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-4.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-4.bdf)
+
+$(DESTDIR)\%-ISO8859-5.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-5.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-5 ISO8859-5
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-5.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-5.bdf)
+
+$(DESTDIR)\%-ISO8859-7.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-7.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-7 ISO8859-7
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-7.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-7.bdf)
+
+$(DESTDIR)\%-ISO8859-8.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-8.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-8 ISO8859-8
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-8.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-8.bdf)
+
+$(DESTDIR)\%-ISO8859-9.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-9.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-9 ISO8859-9
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-9.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-9.bdf)
+
+$(DESTDIR)\%-ISO8859-10.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-10.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-10 ISO8859-10
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-10.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-10.bdf)
+
+$(DESTDIR)\%-ISO8859-11.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-11.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-11 ISO8859-11
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-11.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-11.bdf)
+
+$(DESTDIR)\%-ISO8859-13.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-13.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-13 ISO8859-13
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-13.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-13.bdf)
+
+$(DESTDIR)\%-ISO8859-14.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-14.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-14 ISO8859-14
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-14.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-14.bdf)
+
+$(DESTDIR)\%-ISO8859-15.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-15.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-15 ISO8859-15
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-15.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-15.bdf)
+
+$(DESTDIR)\%-ISO8859-16.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-ISO8859-16.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-ISO8859-16 ISO8859-16
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-ISO8859-16.bdf) | gzip > $@
+ @del $(<:%.bdf=%-ISO8859-16.bdf)
+
+$(DESTDIR)\%-KOI8-R.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-KOI8-R.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-KOI8-R KOI8-R
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-KOI8-R.bdf) | gzip > $@
+ @del $(<:%.bdf=%-KOI8-R.bdf)
+
+$(DESTDIR)\%-JISX0201.1976-0.pcf.gz: %.bdf
+ @del -e $(<:%.bdf=%-JISX0201.1976-0.bdf)
+ $(UCS2ANY) $< $(UTIL_DIR)\map-JISX0201.1976-0 JISX0201.1976-0
+ @del -e $@
+ $(BDFTOPCF) -t $(<:%.bdf=%-JISX0201.1976-0.bdf) | gzip > $@
+ @del $(<:%.bdf=%-JISX0201.1976-0.bdf)
+
+font_DATA = \
+ $(PCF_FILES) \
+ $(ISO8859_1_PCF_FILES) \
+ $(ISO8859_2_PCF_FILES) \
+ $(ISO8859_3_PCF_FILES) \
+ $(ISO8859_4_PCF_FILES) \
+ $(ISO8859_5_PCF_FILES) \
+ $(ISO8859_7_PCF_FILES) \
+ $(ISO8859_8_PCF_FILES) \
+ $(ISO8859_9_PCF_FILES) \
+ $(ISO8859_10_PCF_FILES) \
+ $(ISO8859_11_PCF_FILES) \
+ $(ISO8859_13_PCF_FILES) \
+ $(ISO8859_14_PCF_FILES) \
+ $(ISO8859_15_PCF_FILES) \
+ $(ISO8859_16_PCF_FILES) \
+ $(KOI8_R_PCF_FILES) \
+ $(JISX0201_PCF_FILES)
+
+all: $(DESTDIR) $(DESTDIR)\fonts.dir $(DESTDIR)\fonts.alias
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
+
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+$(DESTDIR)\fonts.scale: $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) .
+
+$(DESTDIR)\fonts.dir: $(DESTDIR)\fonts.scale $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) -b -s -l .
+
+$(DESTDIR)\fonts.alias: fonts.alias
+ copy $< $@
+
diff --git a/xorg-server/fonts.src/terminus-font/Makefile b/xorg-server/fonts.src/terminus-font/Makefile
index 727e99277..c8cb4f0fc 100644
--- a/xorg-server/fonts.src/terminus-font/Makefile
+++ b/xorg-server/fonts.src/terminus-font/Makefile
@@ -1,11 +1,18 @@
-PERL = perl
-AWK = awk
-UCS2VGA = $(PERL) ./ucstoany.pl +f
-UNI2TXT = $(AWK) '{ printf("0x%02X\tU+%s\n", FNR-1, $$1) }'
-BDF2PSF = $(PERL) ./bdftopsf.pl +u
-BDF2RAW = $(PERL) ./bdftopsf.pl -h
-UCS2X11 = $(PERL) ./ucstoany.pl
-BDF2PCF = bdftopcf
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+UCS2ANY = perl ucstoany.pl
+
+INC_BDF_RULES=1
+
+ # The following rule is to avoid parallel build problems
+.PHONY: buildtoolsfirst
+buildtoolsfirst: $(BDFTOPCF)
+
+all: buildtoolsfirst
+
+DESTDIR=$(MHMAKECONF)\xorg-server\fonts\terminus-font
R_88591 = ISO8859 1
R_88592 = ISO8859 2
@@ -25,37 +32,6 @@ R_PT254 = Paratype PT254
R_XOS42 = XOS4 2
R_10646 = ISO10646 1
-PSF_12N = ter-112n.psf ter-212n.psf ter-712n.psf ter-912n.psf ter-c12n.psf ter-d12n.psf ter-g12n.psf ter-i12n.psf ter-k12n.psf ter-m12n.psf ter-p12n.psf ter-u12n.psf ter-v12n.psf
-PSF_14N = ter-114n.psf ter-214n.psf ter-714n.psf ter-914n.psf ter-c14n.psf ter-d14n.psf ter-g14n.psf ter-i14n.psf ter-k14n.psf ter-m14n.psf ter-p14n.psf ter-u14n.psf ter-v14n.psf
-PSF_14B = ter-114b.psf ter-214b.psf ter-714b.psf ter-914b.psf ter-c14b.psf ter-d14b.psf ter-g14b.psf ter-i14b.psf ter-k14b.psf ter-m14b.psf ter-p14b.psf ter-u14b.psf ter-v14b.psf
-PSF_14F = ter-114f.psf ter-214f.psf ter-714f.psf ter-914f.psf ter-c14f.psf ter-d14f.psf ter-g14f.psf ter-i14f.psf ter-k14f.psf ter-m14f.psf ter-p14f.psf ter-u14f.psf ter-v14f.psf
-PSF_16N = ter-116n.psf ter-216n.psf ter-716n.psf ter-916n.psf ter-c16n.psf ter-d16n.psf ter-g16n.psf ter-i16n.psf ter-k16n.psf ter-m16n.psf ter-p16n.psf ter-u16n.psf ter-v16n.psf
-PSF_16B = ter-116b.psf ter-216b.psf ter-716b.psf ter-916b.psf ter-c16b.psf ter-d16b.psf ter-g16b.psf ter-i16b.psf ter-k16b.psf ter-m16b.psf ter-p16b.psf ter-u16b.psf ter-v16b.psf
-PSF_16F = ter-116f.psf ter-216f.psf ter-716f.psf ter-916f.psf ter-c16f.psf ter-d16f.psf ter-g16f.psf ter-i16f.psf ter-k16f.psf ter-m16f.psf ter-p16f.psf ter-u16f.psf ter-v16f.psf
-PSF_20N = ter-120n.psf ter-220n.psf ter-720n.psf ter-920n.psf ter-c20n.psf ter-d20n.psf ter-g20n.psf ter-i20n.psf ter-k20n.psf ter-m20n.psf ter-p20n.psf ter-u20n.psf ter-v20n.psf
-PSF_20B = ter-120b.psf ter-220b.psf ter-720b.psf ter-920b.psf ter-c20b.psf ter-d20b.psf ter-g20b.psf ter-i20b.psf ter-k20b.psf ter-m20b.psf ter-p20b.psf ter-u20b.psf ter-v20b.psf
-PSF_22N = ter-122n.psf ter-222n.psf ter-722n.psf ter-922n.psf ter-c22n.psf ter-d22n.psf ter-g22n.psf ter-i22n.psf ter-k22n.psf ter-m22n.psf ter-p22n.psf ter-u22n.psf ter-v22n.psf
-PSF_22B = ter-122b.psf ter-222b.psf ter-722b.psf ter-922b.psf ter-c22b.psf ter-d22b.psf ter-g22b.psf ter-i22b.psf ter-k22b.psf ter-m22b.psf ter-p22b.psf ter-u22b.psf ter-v22b.psf
-PSF_24N = ter-124n.psf ter-224n.psf ter-724n.psf ter-924n.psf ter-c24n.psf ter-d24n.psf ter-g24n.psf ter-i24n.psf ter-k24n.psf ter-m24n.psf ter-p24n.psf ter-u24n.psf ter-v24n.psf
-PSF_24B = ter-124b.psf ter-224b.psf ter-724b.psf ter-924b.psf ter-c24b.psf ter-d24b.psf ter-g24b.psf ter-i24b.psf ter-k24b.psf ter-m24b.psf ter-p24b.psf ter-u24b.psf ter-v24b.psf
-PSF_28N = ter-128n.psf ter-228n.psf ter-728n.psf ter-928n.psf ter-c28n.psf ter-d28n.psf ter-g28n.psf ter-i28n.psf ter-k28n.psf ter-m28n.psf ter-p28n.psf ter-u28n.psf ter-v28n.psf
-PSF_28B = ter-128b.psf ter-228b.psf ter-728b.psf ter-928b.psf ter-c28b.psf ter-d28b.psf ter-g28b.psf ter-i28b.psf ter-k28b.psf ter-m28b.psf ter-p28b.psf ter-u28b.psf ter-v28b.psf
-PSF_32N = ter-132n.psf ter-232n.psf ter-732n.psf ter-932n.psf ter-c32n.psf ter-d32n.psf ter-g32n.psf ter-i32n.psf ter-k32n.psf ter-m32n.psf ter-p32n.psf ter-u32n.psf ter-v32n.psf
-PSF_32B = ter-132b.psf ter-232b.psf ter-732b.psf ter-932b.psf ter-c32b.psf ter-d32b.psf ter-g32b.psf ter-i32b.psf ter-k32b.psf ter-m32b.psf ter-p32b.psf ter-u32b.psf ter-v32b.psf
-PSF = $(PSF_12N) $(PSF_14N) $(PSF_14B) $(PSF_14F) $(PSF_16N) $(PSF_16B) $(PSF_16F) $(PSF_20N) $(PSF_20B) $(PSF_22N) $(PSF_22B) $(PSF_24N) $(PSF_24B) $(PSF_28N) $(PSF_28B) $(PSF_32N) $(PSF_32B)
-
-TXT_WIN = cp1252.txt cp1250.txt cp1253.txt cp1254.txt cp1251.txt cp1257.txt pt154.txt
-TXT_MIX = 8859-16.txt cp437.txt koi8-r.txt koi8-u.txt mik.txt pt254.txt
-TXT = $(TXT_WIN) $(TXT_MIX)
-
-RAW_14N = ter-114n.raw ter-214n.raw ter-514n.raw ter-714n.raw ter-914n.raw ter-c14n.raw ter-d14n.raw ter-f14n.raw ter-g14n.raw ter-i14n.raw ter-k14n.raw ter-p14n.raw ter-u14n.raw
-RAW_14B = ter-114b.raw ter-214b.raw ter-514b.raw ter-714b.raw ter-914b.raw ter-c14b.raw ter-d14b.raw ter-f14b.raw ter-g14b.raw ter-i14b.raw ter-k14b.raw ter-p14b.raw ter-u14b.raw
-RAW_14F = ter-114f.raw ter-214f.raw ter-514f.raw ter-714f.raw ter-914f.raw ter-c14f.raw ter-d14f.raw ter-f14f.raw ter-g14f.raw ter-i14f.raw ter-k14f.raw ter-p14f.raw ter-u14f.raw
-RAW_16N = ter-116n.raw ter-216n.raw ter-516n.raw ter-716n.raw ter-916n.raw ter-c16n.raw ter-d16n.raw ter-f16n.raw ter-g16n.raw ter-i16n.raw ter-k16n.raw ter-p16n.raw ter-u16n.raw
-RAW_16B = ter-116b.raw ter-216b.raw ter-516b.raw ter-716b.raw ter-916b.raw ter-c16b.raw ter-d16b.raw ter-f16b.raw ter-g16b.raw ter-i16b.raw ter-k16b.raw ter-p16b.raw ter-u16b.raw
-RAW_16F = ter-116f.raw ter-216f.raw ter-516f.raw ter-716f.raw ter-916f.raw ter-c16f.raw ter-d16f.raw ter-f16f.raw ter-g16f.raw ter-i16f.raw ter-k16f.raw ter-p16f.raw ter-u16f.raw
-RAW = $(RAW_14N) $(RAW_14B) $(RAW_14F) $(RAW_16N) $(RAW_16B) $(RAW_16F)
-
PCF_12N = ter-112n.pcf ter-212n.pcf ter-512n.pcf ter-712n.pcf ter-912n.pcf ter-c12n.pcf ter-d12n.pcf ter-f12n.pcf ter-g12n.pcf ter-k12n.pcf ter-p12n.pcf ter-u12n.pcf ter-x12n.pcf
PCF_12B = ter-112b.pcf ter-212b.pcf ter-512b.pcf ter-712b.pcf ter-912b.pcf ter-c12b.pcf ter-d12b.pcf ter-f12b.pcf ter-g12b.pcf ter-k12b.pcf ter-p12b.pcf ter-u12b.pcf ter-x12b.pcf
PCF_14N = ter-114n.pcf ter-214n.pcf ter-514n.pcf ter-714n.pcf ter-914n.pcf ter-c14n.pcf ter-d14n.pcf ter-f14n.pcf ter-g14n.pcf ter-k14n.pcf ter-p14n.pcf ter-u14n.pcf ter-x14n.pcf
@@ -75,1099 +51,6 @@ PCF_32B = ter-132b.pcf ter-232b.pcf ter-532b.pcf ter-732b.pcf ter-932b.pcf ter-c
PCF = $(PCF_12N) $(PCF_12B) $(PCF_14N) $(PCF_14B) $(PCF_16N) $(PCF_16B) $(PCF_20N) $(PCF_20B) $(PCF_22N) $(PCF_22B) $(PCF_24N) $(PCF_24B) $(PCF_28N) $(PCF_28B) $(PCF_32N) $(PCF_32B)
PCF_N12 = $(PCF_12N) $(PCF_14N) $(PCF_14B) $(PCF_16N) $(PCF_16B) $(PCF_20N) $(PCF_20B) $(PCF_22N) $(PCF_22B) $(PCF_24N) $(PCF_24B) $(PCF_28N) $(PCF_28B) $(PCF_32N) $(PCF_32B)
-EEE = ter-x12n.pcf ter-x12b.pcf ter-x14n.pcf ter-x14b.pcf ter-x16n.pcf ter-x16b.pcf ter-x20n.pcf ter-x20b.pcf ter-x22n.pcf ter-x22b.pcf
-EEE_N12 = ter-x12n.pcf ter-x14n.pcf ter-x14b.pcf ter-x16n.pcf ter-x16b.pcf ter-x20n.pcf ter-x20b.pcf ter-x22n.pcf ter-x22b.pcf
-
-all: $(PSF) $(PCF)
-psf: $(PSF)
-txt: $(TXT)
-raw: $(RAW)
-pcf: $(PCF)
-n12: $(PCF_N12)
-eee: $(EEE)
-e12: $(EEE_N12)
-
-DESTDIR =
-prefix = /usr/local
-psfdir = $(prefix)/share/consolefonts
-x11dir = $(prefix)/share/fonts/terminus
-
-install: $(PSF) $(PCF)
- mkdir -p $(DESTDIR)$(psfdir)
- for i in $(PSF) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done
- mkdir -p $(DESTDIR)$(x11dir)
- for i in $(PCF) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done
-
-uninstall:
- for i in $(PSF) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done
- for i in $(PCF) ; do rm -f $(DESTDIR)$(x11dir)/$$i.gz ; done
-
-fontdir:
- mkfontscale $(DESTDIR)$(x11dir)
- mkfontdir $(DESTDIR)$(x11dir)
- fc-cache $(DESTDIR)$(x11dir)
-
-V_88591 = uni/vgagr.uni uni/ascii-h.uni uni/win-1252.uni
-V_88592 = uni/vgagr.uni uni/ascii-h.uni uni/vga-1250.uni uni/8859-2.uni
-V_88597 = uni/vgagr.uni uni/ascii-h.uni uni/vga-1253.uni uni/8859-7.uni
-V_88599 = uni/vgagr.uni uni/ascii-h.uni uni/win-1254.uni
-V_W1251 = uni/vgagr.uni uni/ascii-h.uni uni/vga-1251.uni uni/win-1251.uni
-V_8859D = uni/vgagr.uni uni/ascii-h.uni uni/vga-1257.uni uni/8859-13.uni
-V_8859G = uni/vgagr.uni uni/ascii-h.uni uni/nls-1250.uni uni/8859-16.uni
-V_PCIBM = uni/cntrl.uni uni/ascii-h.uni uni/ibm-437.uni
-V_KOI8R = uni/cntrl.uni uni/ascii-h.uni uni/koibm8-r.uni
-F_KOI8R = uni/cntrl.uni uni/ascii-h.uni uni/koi8-r.uni
-V_KOI8U = uni/cntrl.uni uni/ascii-h.uni uni/koibm8-u.uni
-F_KOI8U = uni/cntrl.uni uni/ascii-h.uni uni/koi8-u.uni
-V_BGMIK = uni/cntrl.uni uni/ascii-h.uni uni/bg-mik.uni
-V_PT154 = uni/vgagr.uni uni/ascii-h.uni uni/pt-154.uni
-V_XOS42 = uni/xos4-2.uni
-
-D_88591 = dup/vgagr.dup dup/ascii-h.dup
-D_88592 = dup/vgagr.dup dup/ascii-h.dup
-D_88597 = dup/vgagr.dup dup/ascii-h.dup
-D_88599 = dup/vgagr.dup dup/ascii-h.dup
-D_W1251 = dup/vgagr.dup dup/ascii-h.dup
-D_8859D = dup/vgagr.dup dup/ascii-h.dup
-D_8859G = dup/vgagr.dup dup/ascii-h.dup
-D_PCIBM = dup/cntrl.dup dup/ascii-h.dup dup/ibm-437.dup
-D_KOI8R = dup/cntrl.dup dup/ascii-h.dup dup/koi8.dup
-D_KOI8U = dup/cntrl.dup dup/ascii-h.dup dup/koi8.dup
-D_BGMIK = dup/cntrl.dup dup/ascii-h.dup dup/ibm-437.dup
-D_PT154 = dup/vgagr.dup dup/ascii-h.dup
-D_XOS42 = dup/vgagr.dup dup/xos4-2.dup
-
-ter-112n.psf: ter-u12n.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u12n.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-212n.psf: ter-u12n.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u12n.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-712n.psf: ter-u12n.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u12n.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-912n.psf: ter-u12n.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u12n.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-c12n.psf: ter-u12n.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u12n.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-d12n.psf: ter-u12n.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u12n.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g12n.psf: ter-u12n.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u12n.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-i12n.psf: ter-u12n.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u12n.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-k12n.psf: ter-u12n.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u12n.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-m12n.psf: ter-u12n.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u12n.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-p12n.psf: ter-u12n.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u12n.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-u12n.psf: ter-u12n.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u12n.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-v12n.psf: ter-u12n.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u12n.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-114n.psf: ter-u14n.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u14n.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-114b.psf: ter-u14v.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u14v.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-114f.psf: ter-u14b.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u14b.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-214n.psf: ter-u14n.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u14n.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-214b.psf: ter-u14v.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u14v.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-214f.psf: ter-u14b.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u14b.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-714n.psf: ter-u14n.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u14n.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-714b.psf: ter-u14v.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u14v.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-714f.psf: ter-u14b.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u14b.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-914n.psf: ter-u14n.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u14n.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-914b.psf: ter-u14v.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u14v.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-914f.psf: ter-u14b.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u14b.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-c14n.psf: ter-u14n.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u14n.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-c14b.psf: ter-u14v.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u14v.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-c14f.psf: ter-u14b.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u14b.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-d14n.psf: ter-u14n.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u14n.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-d14b.psf: ter-u14v.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u14v.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-d14f.psf: ter-u14b.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u14b.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g14n.psf: ter-u14n.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u14n.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g14b.psf: ter-u14v.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u14v.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g14f.psf: ter-u14b.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u14b.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-i14n.psf: ter-u14n.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u14n.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-i14b.psf: ter-u14v.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u14v.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-i14f.psf: ter-u14b.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u14b.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-k14n.psf: ter-u14n.bdf $(V_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u14n.bdf $(R_KOI8R) $(V_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-k14b.psf: ter-u14v.bdf $(V_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u14v.bdf $(R_KOI8R) $(V_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-k14f.psf: ter-u14b.bdf $(V_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u14b.bdf $(R_KOI8R) $(V_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-m14n.psf: ter-u14n.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u14n.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-m14b.psf: ter-u14v.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u14v.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-m14f.psf: ter-u14b.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u14b.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-p14n.psf: ter-u14n.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u14n.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-p14b.psf: ter-u14v.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u14v.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-p14f.psf: ter-u14b.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u14b.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-u14n.psf: ter-u14n.bdf $(V_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u14n.bdf $(R_KOI8U) $(V_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-u14b.psf: ter-u14v.bdf $(V_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u14v.bdf $(R_KOI8U) $(V_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-u14f.psf: ter-u14b.bdf $(V_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u14b.bdf $(R_KOI8U) $(V_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-v14n.psf: ter-u14n.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u14n.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-v14b.psf: ter-u14v.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u14v.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-v14f.psf: ter-u14b.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u14b.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-116n.psf: ter-u16n.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u16n.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-116b.psf: ter-u16v.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u16v.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-116f.psf: ter-u16b.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u16b.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-216n.psf: ter-u16n.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u16n.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-216b.psf: ter-u16v.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u16v.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-216f.psf: ter-u16b.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u16b.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-716n.psf: ter-u16n.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u16n.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-716b.psf: ter-u16v.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u16v.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-716f.psf: ter-u16b.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u16b.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-916n.psf: ter-u16n.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u16n.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-916b.psf: ter-u16v.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u16v.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-916f.psf: ter-u16b.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u16b.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-c16n.psf: ter-u16n.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u16n.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-c16b.psf: ter-u16v.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u16v.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-c16f.psf: ter-u16b.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u16b.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-d16n.psf: ter-u16n.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u16n.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-d16b.psf: ter-u16v.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u16v.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-d16f.psf: ter-u16b.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u16b.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g16n.psf: ter-u16n.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u16n.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g16b.psf: ter-u16v.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u16v.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g16f.psf: ter-u16b.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u16b.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-i16n.psf: ter-u16n.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u16n.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-i16b.psf: ter-u16v.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u16v.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-i16f.psf: ter-u16b.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u16b.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-k16n.psf: ter-u16n.bdf $(V_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u16n.bdf $(R_KOI8R) $(V_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-k16b.psf: ter-u16v.bdf $(V_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u16v.bdf $(R_KOI8R) $(V_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-k16f.psf: ter-u16b.bdf $(V_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u16b.bdf $(R_KOI8R) $(V_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-m16n.psf: ter-u16n.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u16n.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-m16b.psf: ter-u16v.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u16v.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-m16f.psf: ter-u16b.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u16b.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-p16n.psf: ter-u16n.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u16n.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-p16b.psf: ter-u16v.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u16v.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-p16f.psf: ter-u16b.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u16b.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-u16n.psf: ter-u16n.bdf $(V_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u16n.bdf $(R_KOI8U) $(V_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-u16b.psf: ter-u16v.bdf $(V_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u16v.bdf $(R_KOI8U) $(V_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-u16f.psf: ter-u16b.bdf $(V_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u16b.bdf $(R_KOI8U) $(V_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-v16n.psf: ter-u16n.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u16n.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-v16b.psf: ter-u16v.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u16v.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-v16f.psf: ter-u16b.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u16b.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-120n.psf: ter-u20n.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u20n.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-120b.psf: ter-u20b.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u20b.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-220n.psf: ter-u20n.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u20n.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-220b.psf: ter-u20b.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u20b.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-720n.psf: ter-u20n.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u20n.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-720b.psf: ter-u20b.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u20b.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-920n.psf: ter-u20n.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u20n.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-920b.psf: ter-u20b.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u20b.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-c20n.psf: ter-u20n.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u20n.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-c20b.psf: ter-u20b.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u20b.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-d20n.psf: ter-u20n.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u20n.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-d20b.psf: ter-u20b.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u20b.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g20n.psf: ter-u20n.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u20n.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g20b.psf: ter-u20b.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u20b.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-i20n.psf: ter-u20n.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u20n.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-i20b.psf: ter-u20b.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u20b.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-k20n.psf: ter-u20n.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u20n.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-k20b.psf: ter-u20b.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u20b.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-m20n.psf: ter-u20n.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u20n.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-m20b.psf: ter-u20b.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u20b.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-p20n.psf: ter-u20n.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u20n.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-p20b.psf: ter-u20b.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u20b.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-u20n.psf: ter-u20n.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u20n.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-u20b.psf: ter-u20b.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u20b.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-v20n.psf: ter-u20n.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u20n.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-v20b.psf: ter-u20b.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u20b.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-122n.psf: ter-u22n.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u22n.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-122b.psf: ter-u22b.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u22b.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-222n.psf: ter-u22n.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u22n.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-222b.psf: ter-u22b.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u22b.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-722n.psf: ter-u22n.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u22n.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-722b.psf: ter-u22b.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u22b.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-922n.psf: ter-u22n.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u22n.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-922b.psf: ter-u22b.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u22b.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-c22n.psf: ter-u22n.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u22n.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-c22b.psf: ter-u22b.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u22b.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-d22n.psf: ter-u22n.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u22n.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-d22b.psf: ter-u22b.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u22b.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g22n.psf: ter-u22n.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u22n.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g22b.psf: ter-u22b.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u22b.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-i22n.psf: ter-u22n.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u22n.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-i22b.psf: ter-u22b.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u22b.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-k22n.psf: ter-u22n.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u22n.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-k22b.psf: ter-u22b.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u22b.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-m22n.psf: ter-u22n.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u22n.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-m22b.psf: ter-u22b.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u22b.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-p22n.psf: ter-u22n.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u22n.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-p22b.psf: ter-u22b.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u22b.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-u22n.psf: ter-u22n.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u22n.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-u22b.psf: ter-u22b.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u22b.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-v22n.psf: ter-u22n.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u22n.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-v22b.psf: ter-u22b.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u22b.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-124n.psf: ter-u24n.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u24n.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-124b.psf: ter-u24b.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u24b.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-224n.psf: ter-u24n.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u24n.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-224b.psf: ter-u24b.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u24b.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-724n.psf: ter-u24n.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u24n.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-724b.psf: ter-u24b.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u24b.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-924n.psf: ter-u24n.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u24n.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-924b.psf: ter-u24b.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u24b.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-c24n.psf: ter-u24n.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u24n.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-c24b.psf: ter-u24b.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u24b.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-d24n.psf: ter-u24n.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u24n.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-d24b.psf: ter-u24b.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u24b.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g24n.psf: ter-u24n.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u24n.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g24b.psf: ter-u24b.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u24b.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-i24n.psf: ter-u24n.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u24n.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-i24b.psf: ter-u24b.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u24b.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-k24n.psf: ter-u24n.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u24n.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-k24b.psf: ter-u24b.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u24b.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-m24n.psf: ter-u24n.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u24n.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-m24b.psf: ter-u24b.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u24b.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-p24n.psf: ter-u24n.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u24n.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-p24b.psf: ter-u24b.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u24b.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-u24n.psf: ter-u24n.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u24n.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-u24b.psf: ter-u24b.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u24b.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-v24n.psf: ter-u24n.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u24n.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-v24b.psf: ter-u24b.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u24b.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-128n.psf: ter-u28n.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u28n.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-128b.psf: ter-u28b.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u28b.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-228n.psf: ter-u28n.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u28n.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-228b.psf: ter-u28b.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u28b.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-728n.psf: ter-u28n.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u28n.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-728b.psf: ter-u28b.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u28b.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-928n.psf: ter-u28n.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u28n.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-928b.psf: ter-u28b.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u28b.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-c28n.psf: ter-u28n.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u28n.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-c28b.psf: ter-u28b.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u28b.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-d28n.psf: ter-u28n.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u28n.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-d28b.psf: ter-u28b.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u28b.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g28n.psf: ter-u28n.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u28n.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g28b.psf: ter-u28b.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u28b.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-i28n.psf: ter-u28n.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u28n.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-i28b.psf: ter-u28b.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u28b.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-k28n.psf: ter-u28n.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u28n.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-k28b.psf: ter-u28b.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u28b.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-m28n.psf: ter-u28n.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u28n.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-m28b.psf: ter-u28b.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u28b.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-p28n.psf: ter-u28n.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u28n.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-p28b.psf: ter-u28b.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u28b.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-u28n.psf: ter-u28n.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u28n.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-u28b.psf: ter-u28b.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u28b.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-v28n.psf: ter-u28n.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u28n.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-v28b.psf: ter-u28b.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u28b.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-132n.psf: ter-u32n.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u32n.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-132b.psf: ter-u32b.bdf $(V_88591) $(D_88591)
- $(UCS2VGA) ter-u32b.bdf $(R_88591) $(V_88591) | $(BDF2PSF) -o $@ - $(D_88591)
-
-ter-232n.psf: ter-u32n.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u32n.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-232b.psf: ter-u32b.bdf $(V_88592) $(D_88592)
- $(UCS2VGA) ter-u32b.bdf $(R_88592) $(V_88592) | $(BDF2PSF) -o $@ - $(D_88592)
-
-ter-732n.psf: ter-u32n.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u32n.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-732b.psf: ter-u32b.bdf $(V_88597) $(D_88597)
- $(UCS2VGA) ter-u32b.bdf $(R_88597) $(V_88597) | $(BDF2PSF) -o $@ - $(D_88597)
-
-ter-932n.psf: ter-u32n.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u32n.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-932b.psf: ter-u32b.bdf $(V_88599) $(D_88599)
- $(UCS2VGA) ter-u32b.bdf $(R_88599) $(V_88599) | $(BDF2PSF) -o $@ - $(D_88599)
-
-ter-c32n.psf: ter-u32n.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u32n.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-c32b.psf: ter-u32b.bdf $(V_W1251) $(D_W1251)
- $(UCS2VGA) ter-u32b.bdf $(R_W1251) $(V_W1251) | $(BDF2PSF) -o $@ - $(D_W1251)
-
-ter-d32n.psf: ter-u32n.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u32n.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-d32b.psf: ter-u32b.bdf $(V_8859D) $(D_8859D)
- $(UCS2VGA) ter-u32b.bdf $(R_8859D) $(V_8859D) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g32n.psf: ter-u32n.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u32n.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-g32b.psf: ter-u32b.bdf $(V_8859G) $(D_8859G)
- $(UCS2VGA) ter-u32b.bdf $(R_8859G) $(V_8859G) | $(BDF2PSF) -o $@ - $(D_8859G)
-
-ter-i32n.psf: ter-u32n.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u32n.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-i32b.psf: ter-u32b.bdf $(V_PCIBM) $(D_PCIBM)
- $(UCS2VGA) ter-u32b.bdf $(R_PCIBM) $(V_PCIBM) | $(BDF2PSF) -o $@ - $(D_PCIBM)
-
-ter-k32n.psf: ter-u32n.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u32n.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-k32b.psf: ter-u32b.bdf $(F_KOI8R) $(D_KOI8R)
- $(UCS2VGA) ter-u32b.bdf $(R_KOI8R) $(F_KOI8R) | $(BDF2PSF) -o $@ - $(D_KOI8R)
-
-ter-m32n.psf: ter-u32n.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u32n.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-m32b.psf: ter-u32b.bdf $(V_BGMIK) $(D_BGMIK)
- $(UCS2VGA) ter-u32b.bdf $(R_BGMIK) $(V_BGMIK) | $(BDF2PSF) -o $@ - $(D_BGMIK)
-
-ter-p32n.psf: ter-u32n.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u32n.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-p32b.psf: ter-u32b.bdf $(V_PT154) $(D_PT154)
- $(UCS2VGA) ter-u32b.bdf $(R_PT154) $(V_PT154) | $(BDF2PSF) -o $@ - $(D_PT154)
-
-ter-u32n.psf: ter-u32n.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u32n.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-u32b.psf: ter-u32b.bdf $(F_KOI8U) $(D_KOI8U)
- $(UCS2VGA) ter-u32b.bdf $(R_KOI8U) $(F_KOI8U) | $(BDF2PSF) -o $@ - $(D_KOI8U)
-
-ter-v32n.psf: ter-u32n.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u32n.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-ter-v32b.psf: ter-u32b.bdf $(V_XOS42) $(D_XOS42)
- $(UCS2VGA) ter-u32b.bdf $(R_XOS42) $(V_XOS42) | $(BDF2PSF) -o $@ - $(D_XOS42)
-
-install-psf: $(PSF)
- mkdir -p $(DESTDIR)$(psfdir)
- for i in $(PSF) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done
-
-uninstall-psf:
- for i in $(PSF) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done
-
-T_W1252 = uni/cntrl.uni uni/ascii-h.uni uni/win-1252.uni
-T_W1250 = uni/cntrl.uni uni/ascii-h.uni uni/win-1250.uni
-T_W1253 = uni/cntrl.uni uni/ascii-h.uni uni/win-1253.uni
-T_W1254 = uni/cntrl.uni uni/ascii-h.uni uni/win-1254.uni
-T_W1251 = uni/cntrl.uni uni/ascii-h.uni uni/x11-1251.uni uni/win-1251.uni
-T_W1257 = uni/cntrl.uni uni/ascii-h.uni uni/x11-1257.uni uni/win-1257.uni
-T_8859G = uni/cntrl.uni uni/ascii-h.uni uni/empty.uni uni/8859-16.uni
-T_PCIBM = uni/cntrl.uni uni/ascii-h.uni uni/ibm-437.uni
-T_KOI8R = uni/cntrl.uni uni/ascii-h.uni uni/koi8-r.uni
-T_KOI8U = uni/cntrl.uni uni/ascii-h.uni uni/koi8-u.uni
-T_BGMIK = uni/cntrl.uni uni/ascii-h.uni uni/bg-mik.uni
-T_PT154 = uni/cntrl.uni uni/ascii-h.uni uni/pt-154.uni
-T_PT254 = uni/cntrl.uni uni/ascii-h.uni uni/pt-254.uni
-
-cp1252.txt: $(T_W1252)
- cat $(T_W1252) | $(UNI2TXT) > $@
-
-cp1250.txt: $(T_W1250)
- cat $(T_W1250) | $(UNI2TXT) > $@
-
-cp1253.txt: $(T_W1253)
- cat $(T_W1253) | $(UNI2TXT) > $@
-
-cp1254.txt: $(T_W1254)
- cat $(T_W1254) | $(UNI2TXT) > $@
-
-cp1251.txt: $(T_W1251)
- cat $(T_W1251) | $(UNI2TXT) > $@
-
-cp1257.txt: $(T_W1257)
- cat $(T_W1257) | $(UNI2TXT) > $@
-
-8859-16.txt: $(T_8859G)
- cat $(T_8859G) | $(UNI2TXT) > $@
-
-cp437.txt: $(T_PCIBM)
- cat $(T_PCIBM) | $(UNI2TXT) > $@
-
-koi8-r.txt: $(T_KOI8R)
- cat $(T_KOI8R) | $(UNI2TXT) > $@
-
-koi8-u.txt: $(T_KOI8U)
- cat $(T_KOI8U) | $(UNI2TXT) > $@
-
-mik.txt: $(T_BGMIK)
- cat $(T_BGMIK) | $(UNI2TXT) > $@
-
-pt154.txt: $(T_PT154)
- cat $(T_PT154) | $(UNI2TXT) > $@
-
-pt254.txt: $(T_PT254)
- cat $(T_PT254) | $(UNI2TXT) > $@
-
-TESTDIR =
-acmdir = $(prefix)/share/consoletrans
-
-install-acm: $(TXT)
- mkdir -p $(DESTDIR)$(acmdir)
- for i in $(TXT) ; do \
- a=`echo $$i | sed -e "s/\.txt$$/.acm.gz/"` ; \
- if test ! -f $(TESTDIR)$(acmdir)/$$a ; then \
- tail -n 128 $$i | grep -v FFFF | gzip > $(DESTDIR)$(acmdir)/$$a ; \
- fi ; \
- done
-
-unidir = $(prefix)/share/kbd/consoletrans
-
-install-uni: $(TXT)
- mkdir -p $(DESTDIR)$(unidir)
- for i in $(TXT) ; do \
- u=`echo $$i | sed -e "s/\.txt$$/_to_uni.trans/"` ; \
- if test ! -f $(TESTDIR)$(unidir)/$$u ; then \
- sed -e "s/FFFF/FFFD/" $$i > $(DESTDIR)$(unidir)/$$u ; \
- fi ; \
- done
-
-ref = $(psfdir)/README.terminus
-
-install-ref: README
- sed -e"/^2\.4/,/^2\.5/p" -n README | grep -v "^2\." > $(DESTDIR)$(ref)
-
-uninstall-ref:
- rm -f $(DESTDIR)$(ref)
-
-B_88591 = uni/cntrl.uni uni/ascii-h.uni uni/win-1252.uni
-B_88592 = uni/cntrl.uni uni/ascii-h.uni uni/empty.uni uni/8859-2.uni
-B_88595 = uni/cntrl.uni uni/ascii-h.uni uni/empty.uni uni/8859-5.uni
-B_88597 = uni/cntrl.uni uni/ascii-h.uni uni/empty.uni uni/8859-7.uni
-B_88599 = uni/cntrl.uni uni/ascii-h.uni uni/win-1254.uni
-B_W1251 = uni/cntrl.uni uni/ascii-h.uni uni/x11-1251.uni uni/win-1251.uni
-B_8859D = uni/cntrl.uni uni/ascii-h.uni uni/x11-1257.uni uni/8859-13.uni
-B_8859F = uni/cntrl.uni uni/ascii-h.uni uni/empty.uni uni/8859-15.uni
-B_8859G = uni/cntrl.uni uni/ascii-h.uni uni/empty.uni uni/8859-16.uni
-B_PCIBM = uni/cntrl.uni uni/ascii-h.uni uni/ibm-437.uni
-B_KOI8R = uni/cntrl.uni uni/ascii-h.uni uni/koi8-r.uni
-B_KOI8U = uni/cntrl.uni uni/ascii-h.uni uni/koi8-u.uni
-B_PT154 = uni/cntrl.uni uni/ascii-h.uni uni/pt-154.uni
-
-ter-114n.raw: ter-u14n.bdf $(B_88591)
- $(UCS2VGA) ter-u14n.bdf $(R_88591) $(B_88591) | $(BDF2RAW) -o $@
-
-ter-114b.raw: ter-u14v.bdf $(B_88591)
- $(UCS2VGA) ter-u14v.bdf $(R_88591) $(B_88591) | $(BDF2RAW) -o $@
-
-ter-114f.raw: ter-u14b.bdf $(B_88591)
- $(UCS2VGA) ter-u14b.bdf $(R_88591) $(B_88591) | $(BDF2RAW) -o $@
-
-ter-214n.raw: ter-u14n.bdf $(B_88592)
- $(UCS2VGA) ter-u14n.bdf $(R_88592) $(B_88592) | $(BDF2RAW) -o $@
-
-ter-214b.raw: ter-u14v.bdf $(B_88592)
- $(UCS2VGA) ter-u14v.bdf $(R_88592) $(B_88592) | $(BDF2RAW) -o $@
-
-ter-214f.raw: ter-u14b.bdf $(B_88592)
- $(UCS2VGA) ter-u14b.bdf $(R_88592) $(B_88592) | $(BDF2RAW) -o $@
-
-ter-514n.raw: ter-u14n.bdf $(B_88595)
- $(UCS2VGA) ter-u14n.bdf $(R_88595) $(B_88595) | $(BDF2RAW) -o $@
-
-ter-514b.raw: ter-u14v.bdf $(B_88595)
- $(UCS2VGA) ter-u14v.bdf $(R_88595) $(B_88595) | $(BDF2RAW) -o $@
-
-ter-514f.raw: ter-u14b.bdf $(B_88595)
- $(UCS2VGA) ter-u14b.bdf $(R_88595) $(B_88595) | $(BDF2RAW) -o $@
-
-ter-714n.raw: ter-u14n.bdf $(B_88597)
- $(UCS2VGA) ter-u14n.bdf $(R_88597) $(B_88597) | $(BDF2RAW) -o $@
-
-ter-714b.raw: ter-u14v.bdf $(B_88597)
- $(UCS2VGA) ter-u14v.bdf $(R_88597) $(B_88597) | $(BDF2RAW) -o $@
-
-ter-714f.raw: ter-u14b.bdf $(B_88597)
- $(UCS2VGA) ter-u14b.bdf $(R_88597) $(B_88597) | $(BDF2RAW) -o $@
-
-ter-914n.raw: ter-u14n.bdf $(B_88599)
- $(UCS2VGA) ter-u14n.bdf $(R_88599) $(B_88599) | $(BDF2RAW) -o $@
-
-ter-914b.raw: ter-u14v.bdf $(B_88599)
- $(UCS2VGA) ter-u14v.bdf $(R_88599) $(B_88599) | $(BDF2RAW) -o $@
-
-ter-914f.raw: ter-u14b.bdf $(B_88599)
- $(UCS2VGA) ter-u14b.bdf $(R_88599) $(B_88599) | $(BDF2RAW) -o $@
-
-ter-c14n.raw: ter-u14n.bdf $(B_W1251)
- $(UCS2VGA) ter-u14n.bdf $(R_W1251) $(B_W1251) | $(BDF2RAW) -o $@
-
-ter-c14b.raw: ter-u14v.bdf $(B_W1251)
- $(UCS2VGA) ter-u14v.bdf $(R_W1251) $(B_W1251) | $(BDF2RAW) -o $@
-
-ter-c14f.raw: ter-u14b.bdf $(B_W1251)
- $(UCS2VGA) ter-u14b.bdf $(R_W1251) $(B_W1251) | $(BDF2RAW) -o $@
-
-ter-d14n.raw: ter-u14n.bdf $(B_8859D)
- $(UCS2VGA) ter-u14n.bdf $(R_8859D) $(B_8859D) | $(BDF2RAW) -o $@
-
-ter-d14b.raw: ter-u14v.bdf $(B_8859D)
- $(UCS2VGA) ter-u14v.bdf $(R_8859D) $(B_8859D) | $(BDF2RAW) -o $@
-
-ter-d14f.raw: ter-u14b.bdf $(B_8859D)
- $(UCS2VGA) ter-u14b.bdf $(R_8859D) $(B_8859D) | $(BDF2RAW) -o $@
-
-ter-f14n.raw: ter-u14n.bdf $(B_8859F)
- $(UCS2VGA) ter-u14n.bdf $(R_8859F) $(B_8859F) | $(BDF2RAW) -o $@
-
-ter-f14b.raw: ter-u14v.bdf $(B_8859F)
- $(UCS2VGA) ter-u14v.bdf $(R_8859F) $(B_8859F) | $(BDF2RAW) -o $@
-
-ter-f14f.raw: ter-u14b.bdf $(B_8859F)
- $(UCS2VGA) ter-u14b.bdf $(R_8859F) $(B_8859F) | $(BDF2RAW) -o $@
-
-ter-g14n.raw: ter-u14n.bdf $(B_8859G)
- $(UCS2VGA) ter-u14n.bdf $(R_8859G) $(B_8859G) | $(BDF2RAW) -o $@
-
-ter-g14b.raw: ter-u14v.bdf $(B_8859G)
- $(UCS2VGA) ter-u14v.bdf $(R_8859G) $(B_8859G) | $(BDF2RAW) -o $@
-
-ter-g14f.raw: ter-u14b.bdf $(B_8859G)
- $(UCS2VGA) ter-u14b.bdf $(R_8859G) $(B_8859G) | $(BDF2RAW) -o $@
-
-ter-i14n.raw: ter-u14n.bdf $(B_PCIBM)
- $(UCS2VGA) ter-u14n.bdf $(R_PCIBM) $(B_PCIBM) | $(BDF2RAW) -o $@
-
-ter-i14b.raw: ter-u14v.bdf $(B_PCIBM)
- $(UCS2VGA) ter-u14v.bdf $(R_PCIBM) $(B_PCIBM) | $(BDF2RAW) -o $@
-
-ter-i14f.raw: ter-u14b.bdf $(B_PCIBM)
- $(UCS2VGA) ter-u14b.bdf $(R_PCIBM) $(B_PCIBM) | $(BDF2RAW) -o $@
-
-ter-k14n.raw: ter-u14n.bdf $(B_KOI8R)
- $(UCS2VGA) ter-u14n.bdf $(R_KOI8R) $(B_KOI8R) | $(BDF2RAW) -o $@
-
-ter-k14b.raw: ter-u14v.bdf $(B_KOI8R)
- $(UCS2VGA) ter-u14v.bdf $(R_KOI8R) $(B_KOI8R) | $(BDF2RAW) -o $@
-
-ter-k14f.raw: ter-u14b.bdf $(B_KOI8R)
- $(UCS2VGA) ter-u14b.bdf $(R_KOI8R) $(B_KOI8R) | $(BDF2RAW) -o $@
-
-ter-p14n.raw: ter-u14n.bdf $(B_PT154)
- $(UCS2VGA) ter-u14n.bdf $(R_PT154) $(B_PT154) | $(BDF2RAW) -o $@
-
-ter-p14b.raw: ter-u14v.bdf $(B_PT154)
- $(UCS2VGA) ter-u14v.bdf $(R_PT154) $(B_PT154) | $(BDF2RAW) -o $@
-
-ter-p14f.raw: ter-u14b.bdf $(B_PT154)
- $(UCS2VGA) ter-u14b.bdf $(R_PT154) $(B_PT154) | $(BDF2RAW) -o $@
-
-ter-u14n.raw: ter-u14n.bdf $(B_KOI8U)
- $(UCS2VGA) ter-u14n.bdf $(R_KOI8U) $(B_KOI8U) | $(BDF2RAW) -o $@
-
-ter-u14b.raw: ter-u14v.bdf $(B_KOI8U)
- $(UCS2VGA) ter-u14v.bdf $(R_KOI8U) $(B_KOI8U) | $(BDF2RAW) -o $@
-
-ter-u14f.raw: ter-u14b.bdf $(B_KOI8U)
- $(UCS2VGA) ter-u14b.bdf $(R_KOI8U) $(B_KOI8U) | $(BDF2RAW) -o $@
-
-ter-116n.raw: ter-u16n.bdf $(B_88591)
- $(UCS2VGA) ter-u16n.bdf $(R_88591) $(B_88591) | $(BDF2RAW) -o $@
-
-ter-116b.raw: ter-u16v.bdf $(B_88591)
- $(UCS2VGA) ter-u16v.bdf $(R_88591) $(B_88591) | $(BDF2RAW) -o $@
-
-ter-116f.raw: ter-u16b.bdf $(B_88591)
- $(UCS2VGA) ter-u16b.bdf $(R_88591) $(B_88591) | $(BDF2RAW) -o $@
-
-ter-216n.raw: ter-u16n.bdf $(B_88592)
- $(UCS2VGA) ter-u16n.bdf $(R_88592) $(B_88592) | $(BDF2RAW) -o $@
-
-ter-216b.raw: ter-u16v.bdf $(B_88592)
- $(UCS2VGA) ter-u16v.bdf $(R_88592) $(B_88592) | $(BDF2RAW) -o $@
-
-ter-216f.raw: ter-u16b.bdf $(B_88592)
- $(UCS2VGA) ter-u16b.bdf $(R_88592) $(B_88592) | $(BDF2RAW) -o $@
-
-ter-516n.raw: ter-u16n.bdf $(B_88595)
- $(UCS2VGA) ter-u16n.bdf $(R_88595) $(B_88595) | $(BDF2RAW) -o $@
-
-ter-516b.raw: ter-u16v.bdf $(B_88595)
- $(UCS2VGA) ter-u16v.bdf $(R_88595) $(B_88595) | $(BDF2RAW) -o $@
-
-ter-516f.raw: ter-u16b.bdf $(B_88595)
- $(UCS2VGA) ter-u16b.bdf $(R_88595) $(B_88595) | $(BDF2RAW) -o $@
-
-ter-716n.raw: ter-u16n.bdf $(B_88597)
- $(UCS2VGA) ter-u16n.bdf $(R_88597) $(B_88597) | $(BDF2RAW) -o $@
-
-ter-716b.raw: ter-u16v.bdf $(B_88597)
- $(UCS2VGA) ter-u16v.bdf $(R_88597) $(B_88597) | $(BDF2RAW) -o $@
-
-ter-716f.raw: ter-u16b.bdf $(B_88597)
- $(UCS2VGA) ter-u16b.bdf $(R_88597) $(B_88597) | $(BDF2RAW) -o $@
-
-ter-916n.raw: ter-u16n.bdf $(B_88599)
- $(UCS2VGA) ter-u16n.bdf $(R_88599) $(B_88599) | $(BDF2RAW) -o $@
-
-ter-916b.raw: ter-u16v.bdf $(B_88599)
- $(UCS2VGA) ter-u16v.bdf $(R_88599) $(B_88599) | $(BDF2RAW) -o $@
-
-ter-916f.raw: ter-u16b.bdf $(B_88599)
- $(UCS2VGA) ter-u16b.bdf $(R_88599) $(B_88599) | $(BDF2RAW) -o $@
-
-ter-c16n.raw: ter-u16n.bdf $(B_W1251)
- $(UCS2VGA) ter-u16n.bdf $(R_W1251) $(B_W1251) | $(BDF2RAW) -o $@
-
-ter-c16b.raw: ter-u16v.bdf $(B_W1251)
- $(UCS2VGA) ter-u16v.bdf $(R_W1251) $(B_W1251) | $(BDF2RAW) -o $@
-
-ter-c16f.raw: ter-u16b.bdf $(B_W1251)
- $(UCS2VGA) ter-u16b.bdf $(R_W1251) $(B_W1251) | $(BDF2RAW) -o $@
-
-ter-d16n.raw: ter-u16n.bdf $(B_8859D)
- $(UCS2VGA) ter-u16n.bdf $(R_8859D) $(B_8859D) | $(BDF2RAW) -o $@
-
-ter-d16b.raw: ter-u16v.bdf $(B_8859D)
- $(UCS2VGA) ter-u16v.bdf $(R_8859D) $(B_8859D) | $(BDF2RAW) -o $@
-
-ter-d16f.raw: ter-u16b.bdf $(B_8859D)
- $(UCS2VGA) ter-u16b.bdf $(R_8859D) $(B_8859D) | $(BDF2RAW) -o $@
-
-ter-f16n.raw: ter-u16n.bdf $(B_8859F)
- $(UCS2VGA) ter-u16n.bdf $(R_8859F) $(B_8859F) | $(BDF2RAW) -o $@
-
-ter-f16b.raw: ter-u16v.bdf $(B_8859F)
- $(UCS2VGA) ter-u16v.bdf $(R_8859F) $(B_8859F) | $(BDF2RAW) -o $@
-
-ter-f16f.raw: ter-u16b.bdf $(B_8859F)
- $(UCS2VGA) ter-u16b.bdf $(R_8859F) $(B_8859F) | $(BDF2RAW) -o $@
-
-ter-g16n.raw: ter-u16n.bdf $(B_8859G)
- $(UCS2VGA) ter-u16n.bdf $(R_8859G) $(B_8859G) | $(BDF2RAW) -o $@
-
-ter-g16b.raw: ter-u16v.bdf $(B_8859G)
- $(UCS2VGA) ter-u16v.bdf $(R_8859G) $(B_8859G) | $(BDF2RAW) -o $@
-
-ter-g16f.raw: ter-u16b.bdf $(B_8859G)
- $(UCS2VGA) ter-u16b.bdf $(R_8859G) $(B_8859G) | $(BDF2RAW) -o $@
-
-ter-i16n.raw: ter-u16n.bdf $(B_PCIBM)
- $(UCS2VGA) ter-u16n.bdf $(R_PCIBM) $(B_PCIBM) | $(BDF2RAW) -o $@
-
-ter-i16b.raw: ter-u16v.bdf $(B_PCIBM)
- $(UCS2VGA) ter-u16v.bdf $(R_PCIBM) $(B_PCIBM) | $(BDF2RAW) -o $@
-
-ter-i16f.raw: ter-u16b.bdf $(B_PCIBM)
- $(UCS2VGA) ter-u16b.bdf $(R_PCIBM) $(B_PCIBM) | $(BDF2RAW) -o $@
-
-ter-k16n.raw: ter-u16n.bdf $(B_KOI8R)
- $(UCS2VGA) ter-u16n.bdf $(R_KOI8R) $(B_KOI8R) | $(BDF2RAW) -o $@
-
-ter-k16b.raw: ter-u16v.bdf $(B_KOI8R)
- $(UCS2VGA) ter-u16v.bdf $(R_KOI8R) $(B_KOI8R) | $(BDF2RAW) -o $@
-
-ter-k16f.raw: ter-u16b.bdf $(B_KOI8R)
- $(UCS2VGA) ter-u16b.bdf $(R_KOI8R) $(B_KOI8R) | $(BDF2RAW) -o $@
-
-ter-p16n.raw: ter-u16n.bdf $(B_PT154)
- $(UCS2VGA) ter-u16n.bdf $(R_PT154) $(B_PT154) | $(BDF2RAW) -o $@
-
-ter-p16b.raw: ter-u16v.bdf $(B_PT154)
- $(UCS2VGA) ter-u16v.bdf $(R_PT154) $(B_PT154) | $(BDF2RAW) -o $@
-
-ter-p16f.raw: ter-u16b.bdf $(B_PT154)
- $(UCS2VGA) ter-u16b.bdf $(R_PT154) $(B_PT154) | $(BDF2RAW) -o $@
-
-ter-u16n.raw: ter-u16n.bdf $(B_KOI8U)
- $(UCS2VGA) ter-u16n.bdf $(R_KOI8U) $(B_KOI8U) | $(BDF2RAW) -o $@
-
-ter-u16b.raw: ter-u16v.bdf $(B_KOI8U)
- $(UCS2VGA) ter-u16v.bdf $(R_KOI8U) $(B_KOI8U) | $(BDF2RAW) -o $@
-
-ter-u16f.raw: ter-u16b.bdf $(B_KOI8U)
- $(UCS2VGA) ter-u16b.bdf $(R_KOI8U) $(B_KOI8U) | $(BDF2RAW) -o $@
-
-rawdir = $(prefix)/share/misc/pcvtfonts
-
-RAW_14 = $(RAW_14N) $(RAW_14B) $(RAW_14F)
-RAW_16 = $(RAW_16N) $(RAW_16B) $(RAW_16F)
-
-point14 = echo $$i | sed -e "s/14//" -e "s/raw$$/814/"
-point16 = echo $$i | sed -e "s/16//" -e "s/raw$$/816/"
-
-install.raw: $(RAW)
- mkdir -p $(DESTDIR)$(rawdir)
- for i in $(RAW_14) ; do cp -f $$i $(DESTDIR)$(rawdir)/`$(point14)` ; done
- for i in $(RAW_16) ; do cp -f $$i $(DESTDIR)$(rawdir)/`$(point16)` ; done
-
-uninstall.raw:
- for i in $(RAW_14) ; do rm -f $(DESTDIR)$(rawdir)/`$(point14)` ; done
- for i in $(RAW_16) ; do rm -f $(DESTDIR)$(rawdir)/`$(point16)` ; done
-
-minus14 = echo $$i | sed -e "s/14//" -e "s/\.raw$$/-8x14/"
-minus16 = echo $$i | sed -e "s/16//" -e "s/\.raw$$/-8x16/"
-
-install-raw: $(RAW)
- mkdir -p $(DESTDIR)$(rawdir)
- for i in $(RAW_14) ; do cp -f $$i $(DESTDIR)$(rawdir)/`$(minus14)` ; done
- for i in $(RAW_16) ; do cp -f $$i $(DESTDIR)$(rawdir)/`$(minus16)` ; done
-
-uninstall-raw:
- for i in $(RAW_14) ; do rm -f $(DESTDIR)$(rawdir)/`$(minus14)` ; done
- for i in $(RAW_16) ; do rm -f $(DESTDIR)$(rawdir)/`$(minus16)` ; done
-
X_88591 = uni/x11gr.uni uni/ascii-h.uni uni/win-1252.uni
X_88592 = uni/x11gr.uni uni/ascii-h.uni uni/empty.uni uni/8859-2.uni
X_88595 = uni/x11gr.uni uni/ascii-h.uni uni/empty.uni uni/8859-5.uni
@@ -1182,643 +65,1067 @@ X_KOI8U = uni/x11gr.uni uni/ascii-h.uni uni/koi8-u.uni
X_PT154 = uni/x11gr.uni uni/ascii-h.uni uni/pt-154.uni
X_10646 = uni/x11gr.uni uni/10646-1.uni
-ter-112n.pcf: ter-u12n.bdf $(X_88591)
- $(UCS2X11) ter-u12n.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-112b.pcf: ter-u12b.bdf $(X_88591)
- $(UCS2X11) ter-u12b.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-212n.pcf: ter-u12n.bdf $(X_88592)
- $(UCS2X11) ter-u12n.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-212b.pcf: ter-u12b.bdf $(X_88592)
- $(UCS2X11) ter-u12b.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-512n.pcf: ter-u12n.bdf $(X_88595)
- $(UCS2X11) ter-u12n.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-512b.pcf: ter-u12b.bdf $(X_88595)
- $(UCS2X11) ter-u12b.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-712n.pcf: ter-u12n.bdf $(X_88597)
- $(UCS2X11) ter-u12n.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-712b.pcf: ter-u12b.bdf $(X_88597)
- $(UCS2X11) ter-u12b.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-912n.pcf: ter-u12n.bdf $(X_88599)
- $(UCS2X11) ter-u12n.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-912b.pcf: ter-u12b.bdf $(X_88599)
- $(UCS2X11) ter-u12b.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-c12n.pcf: ter-u12n.bdf $(X_W1251)
- $(UCS2X11) ter-u12n.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-c12b.pcf: ter-u12b.bdf $(X_W1251)
- $(UCS2X11) ter-u12b.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-d12n.pcf: ter-u12n.bdf $(X_8859D)
- $(UCS2X11) ter-u12n.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-d12b.pcf: ter-u12b.bdf $(X_8859D)
- $(UCS2X11) ter-u12b.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-f12n.pcf: ter-u12n.bdf $(X_8859F)
- $(UCS2X11) ter-u12n.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-f12b.pcf: ter-u12b.bdf $(X_8859F)
- $(UCS2X11) ter-u12b.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-g12n.pcf: ter-u12n.bdf $(X_8859G)
- $(UCS2X11) ter-u12n.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-g12b.pcf: ter-u12b.bdf $(X_8859G)
- $(UCS2X11) ter-u12b.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-k12n.pcf: ter-u12n.bdf $(X_KOI8R)
- $(UCS2X11) ter-u12n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-k12b.pcf: ter-u12b.bdf $(X_KOI8R)
- $(UCS2X11) ter-u12b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-p12n.pcf: ter-u12n.bdf $(X_PT154)
- $(UCS2X11) ter-u12n.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-p12b.pcf: ter-u12b.bdf $(X_PT154)
- $(UCS2X11) ter-u12b.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-u12n.pcf: ter-u12n.bdf $(X_KOI8U)
- $(UCS2X11) ter-u12n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-u12b.pcf: ter-u12b.bdf $(X_KOI8U)
- $(UCS2X11) ter-u12b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-x12n.pcf: ter-u12n.bdf $(X_10646)
- $(UCS2X11) ter-u12n.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-x12b.pcf: ter-u12b.bdf $(X_10646)
- $(UCS2X11) ter-u12b.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-114n.pcf: ter-u14n.bdf $(X_88591)
- $(UCS2X11) ter-u14n.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-114b.pcf: ter-u14b.bdf $(X_88591)
- $(UCS2X11) ter-u14b.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-214n.pcf: ter-u14n.bdf $(X_88592)
- $(UCS2X11) ter-u14n.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-214b.pcf: ter-u14b.bdf $(X_88592)
- $(UCS2X11) ter-u14b.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-514n.pcf: ter-u14n.bdf $(X_88595)
- $(UCS2X11) ter-u14n.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-514b.pcf: ter-u14b.bdf $(X_88595)
- $(UCS2X11) ter-u14b.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-714n.pcf: ter-u14n.bdf $(X_88597)
- $(UCS2X11) ter-u14n.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-714b.pcf: ter-u14b.bdf $(X_88597)
- $(UCS2X11) ter-u14b.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-914n.pcf: ter-u14n.bdf $(X_88599)
- $(UCS2X11) ter-u14n.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-914b.pcf: ter-u14b.bdf $(X_88599)
- $(UCS2X11) ter-u14b.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-c14n.pcf: ter-u14n.bdf $(X_W1251)
- $(UCS2X11) ter-u14n.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-c14b.pcf: ter-u14b.bdf $(X_W1251)
- $(UCS2X11) ter-u14b.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-d14n.pcf: ter-u14n.bdf $(X_8859D)
- $(UCS2X11) ter-u14n.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-d14b.pcf: ter-u14b.bdf $(X_8859D)
- $(UCS2X11) ter-u14b.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-f14n.pcf: ter-u14n.bdf $(X_8859F)
- $(UCS2X11) ter-u14n.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-f14b.pcf: ter-u14b.bdf $(X_8859F)
- $(UCS2X11) ter-u14b.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-g14n.pcf: ter-u14n.bdf $(X_8859G)
- $(UCS2X11) ter-u14n.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-g14b.pcf: ter-u14b.bdf $(X_8859G)
- $(UCS2X11) ter-u14b.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-k14n.pcf: ter-u14n.bdf $(X_KOI8R)
- $(UCS2X11) ter-u14n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-k14b.pcf: ter-u14b.bdf $(X_KOI8R)
- $(UCS2X11) ter-u14b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-p14n.pcf: ter-u14n.bdf $(X_PT154)
- $(UCS2X11) ter-u14n.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-p14b.pcf: ter-u14b.bdf $(X_PT154)
- $(UCS2X11) ter-u14b.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-u14n.pcf: ter-u14n.bdf $(X_KOI8U)
- $(UCS2X11) ter-u14n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-u14b.pcf: ter-u14b.bdf $(X_KOI8U)
- $(UCS2X11) ter-u14b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-x14n.pcf: ter-u14n.bdf $(X_10646)
- $(UCS2X11) ter-u14n.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-x14b.pcf: ter-u14b.bdf $(X_10646)
- $(UCS2X11) ter-u14b.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-116n.pcf: ter-u16n.bdf $(X_88591)
- $(UCS2X11) ter-u16n.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-116b.pcf: ter-u16b.bdf $(X_88591)
- $(UCS2X11) ter-u16b.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-216n.pcf: ter-u16n.bdf $(X_88592)
- $(UCS2X11) ter-u16n.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-216b.pcf: ter-u16b.bdf $(X_88592)
- $(UCS2X11) ter-u16b.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-516n.pcf: ter-u16n.bdf $(X_88595)
- $(UCS2X11) ter-u16n.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-516b.pcf: ter-u16b.bdf $(X_88595)
- $(UCS2X11) ter-u16b.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-716n.pcf: ter-u16n.bdf $(X_88597)
- $(UCS2X11) ter-u16n.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-716b.pcf: ter-u16b.bdf $(X_88597)
- $(UCS2X11) ter-u16b.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-916n.pcf: ter-u16n.bdf $(X_88599)
- $(UCS2X11) ter-u16n.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-916b.pcf: ter-u16b.bdf $(X_88599)
- $(UCS2X11) ter-u16b.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-c16n.pcf: ter-u16n.bdf $(X_W1251)
- $(UCS2X11) ter-u16n.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-c16b.pcf: ter-u16b.bdf $(X_W1251)
- $(UCS2X11) ter-u16b.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-d16n.pcf: ter-u16n.bdf $(X_8859D)
- $(UCS2X11) ter-u16n.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-d16b.pcf: ter-u16b.bdf $(X_8859D)
- $(UCS2X11) ter-u16b.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-f16n.pcf: ter-u16n.bdf $(X_8859F)
- $(UCS2X11) ter-u16n.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-f16b.pcf: ter-u16b.bdf $(X_8859F)
- $(UCS2X11) ter-u16b.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-g16n.pcf: ter-u16n.bdf $(X_8859G)
- $(UCS2X11) ter-u16n.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-g16b.pcf: ter-u16b.bdf $(X_8859G)
- $(UCS2X11) ter-u16b.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-k16n.pcf: ter-u16n.bdf $(X_KOI8R)
- $(UCS2X11) ter-u16n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-k16b.pcf: ter-u16b.bdf $(X_KOI8R)
- $(UCS2X11) ter-u16b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-p16n.pcf: ter-u16n.bdf $(X_PT154)
- $(UCS2X11) ter-u16n.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-p16b.pcf: ter-u16b.bdf $(X_PT154)
- $(UCS2X11) ter-u16b.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-u16n.pcf: ter-u16n.bdf $(X_KOI8U)
- $(UCS2X11) ter-u16n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-u16b.pcf: ter-u16b.bdf $(X_KOI8U)
- $(UCS2X11) ter-u16b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-x16n.pcf: ter-u16n.bdf $(X_10646)
- $(UCS2X11) ter-u16n.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-x16b.pcf: ter-u16b.bdf $(X_10646)
- $(UCS2X11) ter-u16b.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-120n.pcf: ter-u20n.bdf $(X_88591)
- $(UCS2X11) ter-u20n.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-120b.pcf: ter-u20b.bdf $(X_88591)
- $(UCS2X11) ter-u20b.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-220n.pcf: ter-u20n.bdf $(X_88592)
- $(UCS2X11) ter-u20n.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-220b.pcf: ter-u20b.bdf $(X_88592)
- $(UCS2X11) ter-u20b.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-520n.pcf: ter-u20n.bdf $(X_88595)
- $(UCS2X11) ter-u20n.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-520b.pcf: ter-u20b.bdf $(X_88595)
- $(UCS2X11) ter-u20b.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-720n.pcf: ter-u20n.bdf $(X_88597)
- $(UCS2X11) ter-u20n.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-720b.pcf: ter-u20b.bdf $(X_88597)
- $(UCS2X11) ter-u20b.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-920n.pcf: ter-u20n.bdf $(X_88599)
- $(UCS2X11) ter-u20n.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-920b.pcf: ter-u20b.bdf $(X_88599)
- $(UCS2X11) ter-u20b.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-c20n.pcf: ter-u20n.bdf $(X_W1251)
- $(UCS2X11) ter-u20n.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-c20b.pcf: ter-u20b.bdf $(X_W1251)
- $(UCS2X11) ter-u20b.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-d20n.pcf: ter-u20n.bdf $(X_8859D)
- $(UCS2X11) ter-u20n.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-d20b.pcf: ter-u20b.bdf $(X_8859D)
- $(UCS2X11) ter-u20b.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-f20n.pcf: ter-u20n.bdf $(X_8859F)
- $(UCS2X11) ter-u20n.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-f20b.pcf: ter-u20b.bdf $(X_8859F)
- $(UCS2X11) ter-u20b.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-g20n.pcf: ter-u20n.bdf $(X_8859G)
- $(UCS2X11) ter-u20n.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-g20b.pcf: ter-u20b.bdf $(X_8859G)
- $(UCS2X11) ter-u20b.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-k20n.pcf: ter-u20n.bdf $(X_KOI8R)
- $(UCS2X11) ter-u20n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-k20b.pcf: ter-u20b.bdf $(X_KOI8R)
- $(UCS2X11) ter-u20b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-p20n.pcf: ter-u20n.bdf $(X_PT154)
- $(UCS2X11) ter-u20n.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-p20b.pcf: ter-u20b.bdf $(X_PT154)
- $(UCS2X11) ter-u20b.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-u20n.pcf: ter-u20n.bdf $(X_KOI8U)
- $(UCS2X11) ter-u20n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-u20b.pcf: ter-u20b.bdf $(X_KOI8U)
- $(UCS2X11) ter-u20b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-x20n.pcf: ter-u20n.bdf $(X_10646)
- $(UCS2X11) ter-u20n.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-x20b.pcf: ter-u20b.bdf $(X_10646)
- $(UCS2X11) ter-u20b.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-122n.pcf: ter-u22n.bdf $(X_88591)
- $(UCS2X11) ter-u22n.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-122b.pcf: ter-u22b.bdf $(X_88591)
- $(UCS2X11) ter-u22b.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-222n.pcf: ter-u22n.bdf $(X_88592)
- $(UCS2X11) ter-u22n.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-222b.pcf: ter-u22b.bdf $(X_88592)
- $(UCS2X11) ter-u22b.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-522n.pcf: ter-u22n.bdf $(X_88595)
- $(UCS2X11) ter-u22n.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-522b.pcf: ter-u22b.bdf $(X_88595)
- $(UCS2X11) ter-u22b.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-722n.pcf: ter-u22n.bdf $(X_88597)
- $(UCS2X11) ter-u22n.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-722b.pcf: ter-u22b.bdf $(X_88597)
- $(UCS2X11) ter-u22b.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-922n.pcf: ter-u22n.bdf $(X_88599)
- $(UCS2X11) ter-u22n.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-922b.pcf: ter-u22b.bdf $(X_88599)
- $(UCS2X11) ter-u22b.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-c22n.pcf: ter-u22n.bdf $(X_W1251)
- $(UCS2X11) ter-u22n.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-c22b.pcf: ter-u22b.bdf $(X_W1251)
- $(UCS2X11) ter-u22b.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-d22n.pcf: ter-u22n.bdf $(X_8859D)
- $(UCS2X11) ter-u22n.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-d22b.pcf: ter-u22b.bdf $(X_8859D)
- $(UCS2X11) ter-u22b.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-f22n.pcf: ter-u22n.bdf $(X_8859F)
- $(UCS2X11) ter-u22n.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-f22b.pcf: ter-u22b.bdf $(X_8859F)
- $(UCS2X11) ter-u22b.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-g22n.pcf: ter-u22n.bdf $(X_8859G)
- $(UCS2X11) ter-u22n.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-g22b.pcf: ter-u22b.bdf $(X_8859G)
- $(UCS2X11) ter-u22b.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-k22n.pcf: ter-u22n.bdf $(X_KOI8R)
- $(UCS2X11) ter-u22n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-k22b.pcf: ter-u22b.bdf $(X_KOI8R)
- $(UCS2X11) ter-u22b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-p22n.pcf: ter-u22n.bdf $(X_PT154)
- $(UCS2X11) ter-u22n.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-p22b.pcf: ter-u22b.bdf $(X_PT154)
- $(UCS2X11) ter-u22b.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-u22n.pcf: ter-u22n.bdf $(X_KOI8U)
- $(UCS2X11) ter-u22n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-u22b.pcf: ter-u22b.bdf $(X_KOI8U)
- $(UCS2X11) ter-u22b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-x22n.pcf: ter-u22n.bdf $(X_10646)
- $(UCS2X11) ter-u22n.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-x22b.pcf: ter-u22b.bdf $(X_10646)
- $(UCS2X11) ter-u22b.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-124n.pcf: ter-u24n.bdf $(X_88591)
- $(UCS2X11) ter-u24n.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-124b.pcf: ter-u24b.bdf $(X_88591)
- $(UCS2X11) ter-u24b.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-224n.pcf: ter-u24n.bdf $(X_88592)
- $(UCS2X11) ter-u24n.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-224b.pcf: ter-u24b.bdf $(X_88592)
- $(UCS2X11) ter-u24b.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-524n.pcf: ter-u24n.bdf $(X_88595)
- $(UCS2X11) ter-u24n.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-524b.pcf: ter-u24b.bdf $(X_88595)
- $(UCS2X11) ter-u24b.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-724n.pcf: ter-u24n.bdf $(X_88597)
- $(UCS2X11) ter-u24n.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-724b.pcf: ter-u24b.bdf $(X_88597)
- $(UCS2X11) ter-u24b.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-924n.pcf: ter-u24n.bdf $(X_88599)
- $(UCS2X11) ter-u24n.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-924b.pcf: ter-u24b.bdf $(X_88599)
- $(UCS2X11) ter-u24b.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-c24n.pcf: ter-u24n.bdf $(X_W1251)
- $(UCS2X11) ter-u24n.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-c24b.pcf: ter-u24b.bdf $(X_W1251)
- $(UCS2X11) ter-u24b.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-d24n.pcf: ter-u24n.bdf $(X_8859D)
- $(UCS2X11) ter-u24n.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-d24b.pcf: ter-u24b.bdf $(X_8859D)
- $(UCS2X11) ter-u24b.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-f24n.pcf: ter-u24n.bdf $(X_8859F)
- $(UCS2X11) ter-u24n.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-f24b.pcf: ter-u24b.bdf $(X_8859F)
- $(UCS2X11) ter-u24b.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-g24n.pcf: ter-u24n.bdf $(X_8859G)
- $(UCS2X11) ter-u24n.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-g24b.pcf: ter-u24b.bdf $(X_8859G)
- $(UCS2X11) ter-u24b.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-k24n.pcf: ter-u24n.bdf $(X_KOI8R)
- $(UCS2X11) ter-u24n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-k24b.pcf: ter-u24b.bdf $(X_KOI8R)
- $(UCS2X11) ter-u24b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-p24n.pcf: ter-u24n.bdf $(X_PT154)
- $(UCS2X11) ter-u24n.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-p24b.pcf: ter-u24b.bdf $(X_PT154)
- $(UCS2X11) ter-u24b.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-u24n.pcf: ter-u24n.bdf $(X_KOI8U)
- $(UCS2X11) ter-u24n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-u24b.pcf: ter-u24b.bdf $(X_KOI8U)
- $(UCS2X11) ter-u24b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-x24n.pcf: ter-u24n.bdf $(X_10646)
- $(UCS2X11) ter-u24n.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-x24b.pcf: ter-u24b.bdf $(X_10646)
- $(UCS2X11) ter-u24b.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-128n.pcf: ter-u28n.bdf $(X_88591)
- $(UCS2X11) ter-u28n.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-128b.pcf: ter-u28b.bdf $(X_88591)
- $(UCS2X11) ter-u28b.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-228n.pcf: ter-u28n.bdf $(X_88592)
- $(UCS2X11) ter-u28n.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-228b.pcf: ter-u28b.bdf $(X_88592)
- $(UCS2X11) ter-u28b.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-528n.pcf: ter-u28n.bdf $(X_88595)
- $(UCS2X11) ter-u28n.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-528b.pcf: ter-u28b.bdf $(X_88595)
- $(UCS2X11) ter-u28b.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-728n.pcf: ter-u28n.bdf $(X_88597)
- $(UCS2X11) ter-u28n.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-728b.pcf: ter-u28b.bdf $(X_88597)
- $(UCS2X11) ter-u28b.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-928n.pcf: ter-u28n.bdf $(X_88599)
- $(UCS2X11) ter-u28n.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-928b.pcf: ter-u28b.bdf $(X_88599)
- $(UCS2X11) ter-u28b.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-c28n.pcf: ter-u28n.bdf $(X_W1251)
- $(UCS2X11) ter-u28n.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-c28b.pcf: ter-u28b.bdf $(X_W1251)
- $(UCS2X11) ter-u28b.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-d28n.pcf: ter-u28n.bdf $(X_8859D)
- $(UCS2X11) ter-u28n.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-d28b.pcf: ter-u28b.bdf $(X_8859D)
- $(UCS2X11) ter-u28b.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-f28n.pcf: ter-u28n.bdf $(X_8859F)
- $(UCS2X11) ter-u28n.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-f28b.pcf: ter-u28b.bdf $(X_8859F)
- $(UCS2X11) ter-u28b.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-g28n.pcf: ter-u28n.bdf $(X_8859G)
- $(UCS2X11) ter-u28n.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-g28b.pcf: ter-u28b.bdf $(X_8859G)
- $(UCS2X11) ter-u28b.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-k28n.pcf: ter-u28n.bdf $(X_KOI8R)
- $(UCS2X11) ter-u28n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-k28b.pcf: ter-u28b.bdf $(X_KOI8R)
- $(UCS2X11) ter-u28b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-p28n.pcf: ter-u28n.bdf $(X_PT154)
- $(UCS2X11) ter-u28n.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-p28b.pcf: ter-u28b.bdf $(X_PT154)
- $(UCS2X11) ter-u28b.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-u28n.pcf: ter-u28n.bdf $(X_KOI8U)
- $(UCS2X11) ter-u28n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-u28b.pcf: ter-u28b.bdf $(X_KOI8U)
- $(UCS2X11) ter-u28b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-x28n.pcf: ter-u28n.bdf $(X_10646)
- $(UCS2X11) ter-u28n.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-x28b.pcf: ter-u28b.bdf $(X_10646)
- $(UCS2X11) ter-u28b.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-
-ter-132n.pcf: ter-u32n.bdf $(X_88591)
- $(UCS2X11) ter-u32n.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-132b.pcf: ter-u32b.bdf $(X_88591)
- $(UCS2X11) ter-u32b.bdf $(R_88591) $(X_88591) | $(BDF2PCF) -o $@
-
-ter-232n.pcf: ter-u32n.bdf $(X_88592)
- $(UCS2X11) ter-u32n.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-232b.pcf: ter-u32b.bdf $(X_88592)
- $(UCS2X11) ter-u32b.bdf $(R_88592) $(X_88592) | $(BDF2PCF) -o $@
-
-ter-532n.pcf: ter-u32n.bdf $(X_88595)
- $(UCS2X11) ter-u32n.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-532b.pcf: ter-u32b.bdf $(X_88595)
- $(UCS2X11) ter-u32b.bdf $(R_88595) $(X_88595) | $(BDF2PCF) -o $@
-
-ter-732n.pcf: ter-u32n.bdf $(X_88597)
- $(UCS2X11) ter-u32n.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-732b.pcf: ter-u32b.bdf $(X_88597)
- $(UCS2X11) ter-u32b.bdf $(R_88597) $(X_88597) | $(BDF2PCF) -o $@
-
-ter-932n.pcf: ter-u32n.bdf $(X_88599)
- $(UCS2X11) ter-u32n.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-932b.pcf: ter-u32b.bdf $(X_88599)
- $(UCS2X11) ter-u32b.bdf $(R_88599) $(X_88599) | $(BDF2PCF) -o $@
-
-ter-c32n.pcf: ter-u32n.bdf $(X_W1251)
- $(UCS2X11) ter-u32n.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-c32b.pcf: ter-u32b.bdf $(X_W1251)
- $(UCS2X11) ter-u32b.bdf $(R_W1251) $(X_W1251) | $(BDF2PCF) -o $@
-
-ter-d32n.pcf: ter-u32n.bdf $(X_8859D)
- $(UCS2X11) ter-u32n.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-d32b.pcf: ter-u32b.bdf $(X_8859D)
- $(UCS2X11) ter-u32b.bdf $(R_8859D) $(X_8859D) | $(BDF2PCF) -o $@
-
-ter-f32n.pcf: ter-u32n.bdf $(X_8859F)
- $(UCS2X11) ter-u32n.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-f32b.pcf: ter-u32b.bdf $(X_8859F)
- $(UCS2X11) ter-u32b.bdf $(R_8859F) $(X_8859F) | $(BDF2PCF) -o $@
-
-ter-g32n.pcf: ter-u32n.bdf $(X_8859G)
- $(UCS2X11) ter-u32n.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-g32b.pcf: ter-u32b.bdf $(X_8859G)
- $(UCS2X11) ter-u32b.bdf $(R_8859G) $(X_8859G) | $(BDF2PCF) -o $@
-
-ter-k32n.pcf: ter-u32n.bdf $(X_KOI8R)
- $(UCS2X11) ter-u32n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-k32b.pcf: ter-u32b.bdf $(X_KOI8R)
- $(UCS2X11) ter-u32b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDF2PCF) -o $@
-
-ter-p32n.pcf: ter-u32n.bdf $(X_PT154)
- $(UCS2X11) ter-u32n.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-p32b.pcf: ter-u32b.bdf $(X_PT154)
- $(UCS2X11) ter-u32b.bdf $(R_PT154) $(X_PT154) | $(BDF2PCF) -o $@
-
-ter-u32n.pcf: ter-u32n.bdf $(X_KOI8U)
- $(UCS2X11) ter-u32n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-u32b.pcf: ter-u32b.bdf $(X_KOI8U)
- $(UCS2X11) ter-u32b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDF2PCF) -o $@
-
-ter-x32n.pcf: ter-u32n.bdf $(X_10646)
- $(UCS2X11) ter-u32n.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
+BASETARGETNAME=$(notdir $(@:%.gz=%))
+
+$(DESTDIR)\ter-112n.pcf.gz: ter-u12n.bdf $(X_88591)
+ $(UCS2ANY) ter-u12n.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-112b.pcf.gz: ter-u12b.bdf $(X_88591)
+ $(UCS2ANY) ter-u12b.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-212n.pcf.gz: ter-u12n.bdf $(X_88592)
+ $(UCS2ANY) ter-u12n.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-212b.pcf.gz: ter-u12b.bdf $(X_88592)
+ $(UCS2ANY) ter-u12b.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-512n.pcf.gz: ter-u12n.bdf $(X_88595)
+ $(UCS2ANY) ter-u12n.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-512b.pcf.gz: ter-u12b.bdf $(X_88595)
+ $(UCS2ANY) ter-u12b.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-712n.pcf.gz: ter-u12n.bdf $(X_88597)
+ $(UCS2ANY) ter-u12n.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-712b.pcf.gz: ter-u12b.bdf $(X_88597)
+ $(UCS2ANY) ter-u12b.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-912n.pcf.gz: ter-u12n.bdf $(X_88599)
+ $(UCS2ANY) ter-u12n.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-912b.pcf.gz: ter-u12b.bdf $(X_88599)
+ $(UCS2ANY) ter-u12b.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c12n.pcf.gz: ter-u12n.bdf $(X_W1251)
+ $(UCS2ANY) ter-u12n.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c12b.pcf.gz: ter-u12b.bdf $(X_W1251)
+ $(UCS2ANY) ter-u12b.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d12n.pcf.gz: ter-u12n.bdf $(X_8859D)
+ $(UCS2ANY) ter-u12n.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d12b.pcf.gz: ter-u12b.bdf $(X_8859D)
+ $(UCS2ANY) ter-u12b.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f12n.pcf.gz: ter-u12n.bdf $(X_8859F)
+ $(UCS2ANY) ter-u12n.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f12b.pcf.gz: ter-u12b.bdf $(X_8859F)
+ $(UCS2ANY) ter-u12b.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g12n.pcf.gz: ter-u12n.bdf $(X_8859G)
+ $(UCS2ANY) ter-u12n.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g12b.pcf.gz: ter-u12b.bdf $(X_8859G)
+ $(UCS2ANY) ter-u12b.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k12n.pcf.gz: ter-u12n.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u12n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k12b.pcf.gz: ter-u12b.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u12b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p12n.pcf.gz: ter-u12n.bdf $(X_PT154)
+ $(UCS2ANY) ter-u12n.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p12b.pcf.gz: ter-u12b.bdf $(X_PT154)
+ $(UCS2ANY) ter-u12b.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u12n.pcf.gz: ter-u12n.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u12n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u12b.pcf.gz: ter-u12b.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u12b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x12n.pcf.gz: ter-u12n.bdf $(X_10646)
+ $(UCS2ANY) ter-u12n.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x12b.pcf.gz: ter-u12b.bdf $(X_10646)
+ $(UCS2ANY) ter-u12b.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-114n.pcf.gz: ter-u14n.bdf $(X_88591)
+ $(UCS2ANY) ter-u14n.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-114b.pcf.gz: ter-u14b.bdf $(X_88591)
+ $(UCS2ANY) ter-u14b.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-214n.pcf.gz: ter-u14n.bdf $(X_88592)
+ $(UCS2ANY) ter-u14n.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-214b.pcf.gz: ter-u14b.bdf $(X_88592)
+ $(UCS2ANY) ter-u14b.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-514n.pcf.gz: ter-u14n.bdf $(X_88595)
+ $(UCS2ANY) ter-u14n.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-514b.pcf.gz: ter-u14b.bdf $(X_88595)
+ $(UCS2ANY) ter-u14b.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-714n.pcf.gz: ter-u14n.bdf $(X_88597)
+ $(UCS2ANY) ter-u14n.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-714b.pcf.gz: ter-u14b.bdf $(X_88597)
+ $(UCS2ANY) ter-u14b.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-914n.pcf.gz: ter-u14n.bdf $(X_88599)
+ $(UCS2ANY) ter-u14n.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-914b.pcf.gz: ter-u14b.bdf $(X_88599)
+ $(UCS2ANY) ter-u14b.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c14n.pcf.gz: ter-u14n.bdf $(X_W1251)
+ $(UCS2ANY) ter-u14n.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c14b.pcf.gz: ter-u14b.bdf $(X_W1251)
+ $(UCS2ANY) ter-u14b.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d14n.pcf.gz: ter-u14n.bdf $(X_8859D)
+ $(UCS2ANY) ter-u14n.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d14b.pcf.gz: ter-u14b.bdf $(X_8859D)
+ $(UCS2ANY) ter-u14b.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f14n.pcf.gz: ter-u14n.bdf $(X_8859F)
+ $(UCS2ANY) ter-u14n.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f14b.pcf.gz: ter-u14b.bdf $(X_8859F)
+ $(UCS2ANY) ter-u14b.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g14n.pcf.gz: ter-u14n.bdf $(X_8859G)
+ $(UCS2ANY) ter-u14n.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g14b.pcf.gz: ter-u14b.bdf $(X_8859G)
+ $(UCS2ANY) ter-u14b.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k14n.pcf.gz: ter-u14n.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u14n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k14b.pcf.gz: ter-u14b.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u14b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p14n.pcf.gz: ter-u14n.bdf $(X_PT154)
+ $(UCS2ANY) ter-u14n.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p14b.pcf.gz: ter-u14b.bdf $(X_PT154)
+ $(UCS2ANY) ter-u14b.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u14n.pcf.gz: ter-u14n.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u14n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u14b.pcf.gz: ter-u14b.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u14b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x14n.pcf.gz: ter-u14n.bdf $(X_10646)
+ $(UCS2ANY) ter-u14n.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x14b.pcf.gz: ter-u14b.bdf $(X_10646)
+ $(UCS2ANY) ter-u14b.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-116n.pcf.gz: ter-u16n.bdf $(X_88591)
+ $(UCS2ANY) ter-u16n.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-116b.pcf.gz: ter-u16b.bdf $(X_88591)
+ $(UCS2ANY) ter-u16b.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-216n.pcf.gz: ter-u16n.bdf $(X_88592)
+ $(UCS2ANY) ter-u16n.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-216b.pcf.gz: ter-u16b.bdf $(X_88592)
+ $(UCS2ANY) ter-u16b.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-516n.pcf.gz: ter-u16n.bdf $(X_88595)
+ $(UCS2ANY) ter-u16n.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-516b.pcf.gz: ter-u16b.bdf $(X_88595)
+ $(UCS2ANY) ter-u16b.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-716n.pcf.gz: ter-u16n.bdf $(X_88597)
+ $(UCS2ANY) ter-u16n.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-716b.pcf.gz: ter-u16b.bdf $(X_88597)
+ $(UCS2ANY) ter-u16b.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-916n.pcf.gz: ter-u16n.bdf $(X_88599)
+ $(UCS2ANY) ter-u16n.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-916b.pcf.gz: ter-u16b.bdf $(X_88599)
+ $(UCS2ANY) ter-u16b.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c16n.pcf.gz: ter-u16n.bdf $(X_W1251)
+ $(UCS2ANY) ter-u16n.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c16b.pcf.gz: ter-u16b.bdf $(X_W1251)
+ $(UCS2ANY) ter-u16b.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d16n.pcf.gz: ter-u16n.bdf $(X_8859D)
+ $(UCS2ANY) ter-u16n.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d16b.pcf.gz: ter-u16b.bdf $(X_8859D)
+ $(UCS2ANY) ter-u16b.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f16n.pcf.gz: ter-u16n.bdf $(X_8859F)
+ $(UCS2ANY) ter-u16n.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f16b.pcf.gz: ter-u16b.bdf $(X_8859F)
+ $(UCS2ANY) ter-u16b.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g16n.pcf.gz: ter-u16n.bdf $(X_8859G)
+ $(UCS2ANY) ter-u16n.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g16b.pcf.gz: ter-u16b.bdf $(X_8859G)
+ $(UCS2ANY) ter-u16b.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k16n.pcf.gz: ter-u16n.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u16n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k16b.pcf.gz: ter-u16b.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u16b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p16n.pcf.gz: ter-u16n.bdf $(X_PT154)
+ $(UCS2ANY) ter-u16n.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p16b.pcf.gz: ter-u16b.bdf $(X_PT154)
+ $(UCS2ANY) ter-u16b.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u16n.pcf.gz: ter-u16n.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u16n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u16b.pcf.gz: ter-u16b.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u16b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x16n.pcf.gz: ter-u16n.bdf $(X_10646)
+ $(UCS2ANY) ter-u16n.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x16b.pcf.gz: ter-u16b.bdf $(X_10646)
+ $(UCS2ANY) ter-u16b.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-120n.pcf.gz: ter-u20n.bdf $(X_88591)
+ $(UCS2ANY) ter-u20n.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-120b.pcf.gz: ter-u20b.bdf $(X_88591)
+ $(UCS2ANY) ter-u20b.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-220n.pcf.gz: ter-u20n.bdf $(X_88592)
+ $(UCS2ANY) ter-u20n.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-220b.pcf.gz: ter-u20b.bdf $(X_88592)
+ $(UCS2ANY) ter-u20b.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-520n.pcf.gz: ter-u20n.bdf $(X_88595)
+ $(UCS2ANY) ter-u20n.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-520b.pcf.gz: ter-u20b.bdf $(X_88595)
+ $(UCS2ANY) ter-u20b.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-720n.pcf.gz: ter-u20n.bdf $(X_88597)
+ $(UCS2ANY) ter-u20n.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-720b.pcf.gz: ter-u20b.bdf $(X_88597)
+ $(UCS2ANY) ter-u20b.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-920n.pcf.gz: ter-u20n.bdf $(X_88599)
+ $(UCS2ANY) ter-u20n.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-920b.pcf.gz: ter-u20b.bdf $(X_88599)
+ $(UCS2ANY) ter-u20b.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c20n.pcf.gz: ter-u20n.bdf $(X_W1251)
+ $(UCS2ANY) ter-u20n.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c20b.pcf.gz: ter-u20b.bdf $(X_W1251)
+ $(UCS2ANY) ter-u20b.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d20n.pcf.gz: ter-u20n.bdf $(X_8859D)
+ $(UCS2ANY) ter-u20n.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d20b.pcf.gz: ter-u20b.bdf $(X_8859D)
+ $(UCS2ANY) ter-u20b.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f20n.pcf.gz: ter-u20n.bdf $(X_8859F)
+ $(UCS2ANY) ter-u20n.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f20b.pcf.gz: ter-u20b.bdf $(X_8859F)
+ $(UCS2ANY) ter-u20b.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g20n.pcf.gz: ter-u20n.bdf $(X_8859G)
+ $(UCS2ANY) ter-u20n.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g20b.pcf.gz: ter-u20b.bdf $(X_8859G)
+ $(UCS2ANY) ter-u20b.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k20n.pcf.gz: ter-u20n.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u20n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k20b.pcf.gz: ter-u20b.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u20b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p20n.pcf.gz: ter-u20n.bdf $(X_PT154)
+ $(UCS2ANY) ter-u20n.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p20b.pcf.gz: ter-u20b.bdf $(X_PT154)
+ $(UCS2ANY) ter-u20b.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u20n.pcf.gz: ter-u20n.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u20n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u20b.pcf.gz: ter-u20b.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u20b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x20n.pcf.gz: ter-u20n.bdf $(X_10646)
+ $(UCS2ANY) ter-u20n.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x20b.pcf.gz: ter-u20b.bdf $(X_10646)
+ $(UCS2ANY) ter-u20b.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-122n.pcf.gz: ter-u22n.bdf $(X_88591)
+ $(UCS2ANY) ter-u22n.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-122b.pcf.gz: ter-u22b.bdf $(X_88591)
+ $(UCS2ANY) ter-u22b.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-222n.pcf.gz: ter-u22n.bdf $(X_88592)
+ $(UCS2ANY) ter-u22n.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-222b.pcf.gz: ter-u22b.bdf $(X_88592)
+ $(UCS2ANY) ter-u22b.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-522n.pcf.gz: ter-u22n.bdf $(X_88595)
+ $(UCS2ANY) ter-u22n.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-522b.pcf.gz: ter-u22b.bdf $(X_88595)
+ $(UCS2ANY) ter-u22b.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-722n.pcf.gz: ter-u22n.bdf $(X_88597)
+ $(UCS2ANY) ter-u22n.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-722b.pcf.gz: ter-u22b.bdf $(X_88597)
+ $(UCS2ANY) ter-u22b.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-922n.pcf.gz: ter-u22n.bdf $(X_88599)
+ $(UCS2ANY) ter-u22n.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-922b.pcf.gz: ter-u22b.bdf $(X_88599)
+ $(UCS2ANY) ter-u22b.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c22n.pcf.gz: ter-u22n.bdf $(X_W1251)
+ $(UCS2ANY) ter-u22n.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c22b.pcf.gz: ter-u22b.bdf $(X_W1251)
+ $(UCS2ANY) ter-u22b.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d22n.pcf.gz: ter-u22n.bdf $(X_8859D)
+ $(UCS2ANY) ter-u22n.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d22b.pcf.gz: ter-u22b.bdf $(X_8859D)
+ $(UCS2ANY) ter-u22b.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f22n.pcf.gz: ter-u22n.bdf $(X_8859F)
+ $(UCS2ANY) ter-u22n.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f22b.pcf.gz: ter-u22b.bdf $(X_8859F)
+ $(UCS2ANY) ter-u22b.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g22n.pcf.gz: ter-u22n.bdf $(X_8859G)
+ $(UCS2ANY) ter-u22n.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g22b.pcf.gz: ter-u22b.bdf $(X_8859G)
+ $(UCS2ANY) ter-u22b.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k22n.pcf.gz: ter-u22n.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u22n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k22b.pcf.gz: ter-u22b.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u22b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p22n.pcf.gz: ter-u22n.bdf $(X_PT154)
+ $(UCS2ANY) ter-u22n.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p22b.pcf.gz: ter-u22b.bdf $(X_PT154)
+ $(UCS2ANY) ter-u22b.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u22n.pcf.gz: ter-u22n.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u22n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u22b.pcf.gz: ter-u22b.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u22b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x22n.pcf.gz: ter-u22n.bdf $(X_10646)
+ $(UCS2ANY) ter-u22n.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x22b.pcf.gz: ter-u22b.bdf $(X_10646)
+ $(UCS2ANY) ter-u22b.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-124n.pcf.gz: ter-u24n.bdf $(X_88591)
+ $(UCS2ANY) ter-u24n.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-124b.pcf.gz: ter-u24b.bdf $(X_88591)
+ $(UCS2ANY) ter-u24b.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-224n.pcf.gz: ter-u24n.bdf $(X_88592)
+ $(UCS2ANY) ter-u24n.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-224b.pcf.gz: ter-u24b.bdf $(X_88592)
+ $(UCS2ANY) ter-u24b.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-524n.pcf.gz: ter-u24n.bdf $(X_88595)
+ $(UCS2ANY) ter-u24n.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-524b.pcf.gz: ter-u24b.bdf $(X_88595)
+ $(UCS2ANY) ter-u24b.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-724n.pcf.gz: ter-u24n.bdf $(X_88597)
+ $(UCS2ANY) ter-u24n.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-724b.pcf.gz: ter-u24b.bdf $(X_88597)
+ $(UCS2ANY) ter-u24b.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-924n.pcf.gz: ter-u24n.bdf $(X_88599)
+ $(UCS2ANY) ter-u24n.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-924b.pcf.gz: ter-u24b.bdf $(X_88599)
+ $(UCS2ANY) ter-u24b.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c24n.pcf.gz: ter-u24n.bdf $(X_W1251)
+ $(UCS2ANY) ter-u24n.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c24b.pcf.gz: ter-u24b.bdf $(X_W1251)
+ $(UCS2ANY) ter-u24b.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d24n.pcf.gz: ter-u24n.bdf $(X_8859D)
+ $(UCS2ANY) ter-u24n.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d24b.pcf.gz: ter-u24b.bdf $(X_8859D)
+ $(UCS2ANY) ter-u24b.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f24n.pcf.gz: ter-u24n.bdf $(X_8859F)
+ $(UCS2ANY) ter-u24n.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f24b.pcf.gz: ter-u24b.bdf $(X_8859F)
+ $(UCS2ANY) ter-u24b.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g24n.pcf.gz: ter-u24n.bdf $(X_8859G)
+ $(UCS2ANY) ter-u24n.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g24b.pcf.gz: ter-u24b.bdf $(X_8859G)
+ $(UCS2ANY) ter-u24b.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k24n.pcf.gz: ter-u24n.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u24n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k24b.pcf.gz: ter-u24b.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u24b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p24n.pcf.gz: ter-u24n.bdf $(X_PT154)
+ $(UCS2ANY) ter-u24n.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p24b.pcf.gz: ter-u24b.bdf $(X_PT154)
+ $(UCS2ANY) ter-u24b.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u24n.pcf.gz: ter-u24n.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u24n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u24b.pcf.gz: ter-u24b.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u24b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x24n.pcf.gz: ter-u24n.bdf $(X_10646)
+ $(UCS2ANY) ter-u24n.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x24b.pcf.gz: ter-u24b.bdf $(X_10646)
+ $(UCS2ANY) ter-u24b.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-128n.pcf.gz: ter-u28n.bdf $(X_88591)
+ $(UCS2ANY) ter-u28n.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-128b.pcf.gz: ter-u28b.bdf $(X_88591)
+ $(UCS2ANY) ter-u28b.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-228n.pcf.gz: ter-u28n.bdf $(X_88592)
+ $(UCS2ANY) ter-u28n.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-228b.pcf.gz: ter-u28b.bdf $(X_88592)
+ $(UCS2ANY) ter-u28b.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-528n.pcf.gz: ter-u28n.bdf $(X_88595)
+ $(UCS2ANY) ter-u28n.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-528b.pcf.gz: ter-u28b.bdf $(X_88595)
+ $(UCS2ANY) ter-u28b.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-728n.pcf.gz: ter-u28n.bdf $(X_88597)
+ $(UCS2ANY) ter-u28n.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-728b.pcf.gz: ter-u28b.bdf $(X_88597)
+ $(UCS2ANY) ter-u28b.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-928n.pcf.gz: ter-u28n.bdf $(X_88599)
+ $(UCS2ANY) ter-u28n.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-928b.pcf.gz: ter-u28b.bdf $(X_88599)
+ $(UCS2ANY) ter-u28b.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c28n.pcf.gz: ter-u28n.bdf $(X_W1251)
+ $(UCS2ANY) ter-u28n.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c28b.pcf.gz: ter-u28b.bdf $(X_W1251)
+ $(UCS2ANY) ter-u28b.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d28n.pcf.gz: ter-u28n.bdf $(X_8859D)
+ $(UCS2ANY) ter-u28n.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d28b.pcf.gz: ter-u28b.bdf $(X_8859D)
+ $(UCS2ANY) ter-u28b.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f28n.pcf.gz: ter-u28n.bdf $(X_8859F)
+ $(UCS2ANY) ter-u28n.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f28b.pcf.gz: ter-u28b.bdf $(X_8859F)
+ $(UCS2ANY) ter-u28b.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g28n.pcf.gz: ter-u28n.bdf $(X_8859G)
+ $(UCS2ANY) ter-u28n.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g28b.pcf.gz: ter-u28b.bdf $(X_8859G)
+ $(UCS2ANY) ter-u28b.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k28n.pcf.gz: ter-u28n.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u28n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k28b.pcf.gz: ter-u28b.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u28b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p28n.pcf.gz: ter-u28n.bdf $(X_PT154)
+ $(UCS2ANY) ter-u28n.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p28b.pcf.gz: ter-u28b.bdf $(X_PT154)
+ $(UCS2ANY) ter-u28b.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u28n.pcf.gz: ter-u28n.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u28n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u28b.pcf.gz: ter-u28b.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u28b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x28n.pcf.gz: ter-u28n.bdf $(X_10646)
+ $(UCS2ANY) ter-u28n.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x28b.pcf.gz: ter-u28b.bdf $(X_10646)
+ $(UCS2ANY) ter-u28b.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-132n.pcf.gz: ter-u32n.bdf $(X_88591)
+ $(UCS2ANY) ter-u32n.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-132b.pcf.gz: ter-u32b.bdf $(X_88591)
+ $(UCS2ANY) ter-u32b.bdf $(R_88591) $(X_88591) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-232n.pcf.gz: ter-u32n.bdf $(X_88592)
+ $(UCS2ANY) ter-u32n.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-232b.pcf.gz: ter-u32b.bdf $(X_88592)
+ $(UCS2ANY) ter-u32b.bdf $(R_88592) $(X_88592) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-532n.pcf.gz: ter-u32n.bdf $(X_88595)
+ $(UCS2ANY) ter-u32n.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-532b.pcf.gz: ter-u32b.bdf $(X_88595)
+ $(UCS2ANY) ter-u32b.bdf $(R_88595) $(X_88595) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-732n.pcf.gz: ter-u32n.bdf $(X_88597)
+ $(UCS2ANY) ter-u32n.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-732b.pcf.gz: ter-u32b.bdf $(X_88597)
+ $(UCS2ANY) ter-u32b.bdf $(R_88597) $(X_88597) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-932n.pcf.gz: ter-u32n.bdf $(X_88599)
+ $(UCS2ANY) ter-u32n.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-932b.pcf.gz: ter-u32b.bdf $(X_88599)
+ $(UCS2ANY) ter-u32b.bdf $(R_88599) $(X_88599) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c32n.pcf.gz: ter-u32n.bdf $(X_W1251)
+ $(UCS2ANY) ter-u32n.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-c32b.pcf.gz: ter-u32b.bdf $(X_W1251)
+ $(UCS2ANY) ter-u32b.bdf $(R_W1251) $(X_W1251) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d32n.pcf.gz: ter-u32n.bdf $(X_8859D)
+ $(UCS2ANY) ter-u32n.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-d32b.pcf.gz: ter-u32b.bdf $(X_8859D)
+ $(UCS2ANY) ter-u32b.bdf $(R_8859D) $(X_8859D) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f32n.pcf.gz: ter-u32n.bdf $(X_8859F)
+ $(UCS2ANY) ter-u32n.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-f32b.pcf.gz: ter-u32b.bdf $(X_8859F)
+ $(UCS2ANY) ter-u32b.bdf $(R_8859F) $(X_8859F) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g32n.pcf.gz: ter-u32n.bdf $(X_8859G)
+ $(UCS2ANY) ter-u32n.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-g32b.pcf.gz: ter-u32b.bdf $(X_8859G)
+ $(UCS2ANY) ter-u32b.bdf $(R_8859G) $(X_8859G) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k32n.pcf.gz: ter-u32n.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u32n.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-k32b.pcf.gz: ter-u32b.bdf $(X_KOI8R)
+ $(UCS2ANY) ter-u32b.bdf $(R_KOI8R) $(X_KOI8R) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p32n.pcf.gz: ter-u32n.bdf $(X_PT154)
+ $(UCS2ANY) ter-u32n.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-p32b.pcf.gz: ter-u32b.bdf $(X_PT154)
+ $(UCS2ANY) ter-u32b.bdf $(R_PT154) $(X_PT154) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u32n.pcf.gz: ter-u32n.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u32n.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-u32b.pcf.gz: ter-u32b.bdf $(X_KOI8U)
+ $(UCS2ANY) ter-u32b.bdf $(R_KOI8U) $(X_KOI8U) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x32n.pcf.gz: ter-u32n.bdf $(X_10646)
+ $(UCS2ANY) ter-u32n.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
+
+$(DESTDIR)\ter-x32b.pcf.gz: ter-u32b.bdf $(X_10646)
+ $(UCS2ANY) ter-u32b.bdf $(R_10646) $(X_10646) | $(BDFTOPCF) -t -o $(BASETARGETNAME)
+ gzip -c $(BASETARGETNAME) > $@
+ del $(BASETARGETNAME)
-ter-x32b.pcf: ter-u32b.bdf $(X_10646)
- $(UCS2X11) ter-u32b.bdf $(R_10646) $(X_10646) | $(BDF2PCF) -o $@
-install-pcf: $(PCF)
- mkdir -p $(DESTDIR)$(x11dir)
- for i in $(PCF) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done
+font_DATA = $(PCF:%=$(DESTDIR)\%.gz) $(PCF_N12:%=$(DESTDIR)\%.gz)
+
+destdir: $(DESTDIR)
+
+all: $(DESTDIR) $(DESTDIR)\fonts.dir $(DESTDIR)\fonts.alias
+
+MKFONTSCALE=$(MHMAKECONF)\mkfontscale\$(OBJDIR)\mkfontscale.exe
-uninstall-pcf:
- for i in $(PCF) ; do rm -f $(DESTDIR)$(x11dir)/$$i.gz ; done
+load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+$(DESTDIR)\fonts.scale: $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) .
-install-n12: $(PCF_N12)
- mkdir -p $(DESTDIR)$(x11dir)
- for i in $(PCF_N12) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done
+$(DESTDIR)\fonts.dir: $(DESTDIR)\fonts.scale $(font_DATA) $(MKFONTSCALE)
+ del -e $@
+ cd $(DESTDIR) & $(MKFONTSCALE) -b -s -l .
-uninstall-n12:
- for i in $(PCF_N12) ; do rm -f $(DESTDIR)$(x11dir)/$$i.gz ; done
+$(DESTDIR)\fonts.alias: xfonts-terminus.alias
+ copy $< $@
-clean:
- rm -f *.psf *.txt *.raw *.pcf
diff --git a/xorg-server/fonts.src/terminus-font/xfonts-terminus.alias b/xorg-server/fonts.src/terminus-font/xfonts-terminus.alias
new file mode 100644
index 000000000..0147b94b3
--- /dev/null
+++ b/xorg-server/fonts.src/terminus-font/xfonts-terminus.alias
@@ -0,0 +1,212 @@
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! Run the command `update-fonts-alias misc' if you edit this file. !!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!
+terminus-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
+terminus-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1
+terminus-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
+terminus-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1
+terminus-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1
+terminus-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1
+terminus-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso10646-1
+terminus-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1
+terminus-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso10646-1
+terminus-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso10646-1
+terminus-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1
+terminus-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso10646-1
+terminus-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-iso10646-1
+terminus-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso10646-1
+terminus-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso10646-1
+terminus-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso10646-1
+terminus-cp1251-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-microsoft-cp1251
+terminus-cp1251-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-microsoft-cp1251
+terminus-cp1251-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-microsoft-cp1251
+terminus-cp1251-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-microsoft-cp1251
+terminus-cp1251-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-microsoft-cp1251
+terminus-cp1251-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-microsoft-cp1251
+terminus-cp1251-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-microsoft-cp1251
+terminus-cp1251-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-microsoft-cp1251
+terminus-cp1251-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-microsoft-cp1251
+terminus-cp1251-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-microsoft-cp1251
+terminus-cp1251-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-microsoft-cp1251
+terminus-cp1251-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-microsoft-cp1251
+terminus-cp1251-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-microsoft-cp1251
+terminus-cp1251-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-microsoft-cp1251
+terminus-cp1251-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-microsoft-cp1251
+terminus-cp1251-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-microsoft-cp1251
+terminus-pt154-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-paratype-pt154
+terminus-pt154-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-paratype-pt154
+terminus-pt154-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-paratype-pt154
+terminus-pt154-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-paratype-pt154
+terminus-pt154-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-paratype-pt154
+terminus-pt154-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-paratype-pt154
+terminus-pt154-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-paratype-pt154
+terminus-pt154-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-paratype-pt154
+terminus-pt154-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-paratype-pt154
+terminus-pt154-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-paratype-pt154
+terminus-pt154-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-paratype-pt154
+terminus-pt154-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-paratype-pt154
+terminus-pt154-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-paratype-pt154
+terminus-pt154-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-paratype-pt154
+terminus-pt154-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-paratype-pt154
+terminus-pt154-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-paratype-pt154
+terminus-koi8-r-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-koi8-r
+terminus-koi8-r-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-koi8-r
+terminus-koi8-r-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-koi8-r
+terminus-koi8-r-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-koi8-r
+terminus-koi8-r-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-koi8-r
+terminus-koi8-r-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-koi8-r
+terminus-koi8-r-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-koi8-r
+terminus-koi8-r-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-koi8-r
+terminus-koi8-r-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-koi8-r
+terminus-koi8-r-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-koi8-r
+terminus-koi8-r-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-koi8-r
+terminus-koi8-r-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-koi8-r
+terminus-koi8-r-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-koi8-r
+terminus-koi8-r-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-koi8-r
+terminus-koi8-r-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-koi8-r
+terminus-koi8-r-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-koi8-r
+terminus-koi8-u-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-koi8-u
+terminus-koi8-u-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-koi8-u
+terminus-koi8-u-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-koi8-u
+terminus-koi8-u-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-koi8-u
+terminus-koi8-u-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-koi8-u
+terminus-koi8-u-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-koi8-u
+terminus-koi8-u-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-koi8-u
+terminus-koi8-u-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-koi8-u
+terminus-koi8-u-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-koi8-u
+terminus-koi8-u-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-koi8-u
+terminus-koi8-u-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-koi8-u
+terminus-koi8-u-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-koi8-u
+terminus-koi8-u-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-koi8-u
+terminus-koi8-u-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-koi8-u
+terminus-koi8-u-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-koi8-u
+terminus-koi8-u-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-koi8-u
+terminus-iso8859-1-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-1
+terminus-iso8859-1-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-1
+terminus-iso8859-1-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-1
+terminus-iso8859-1-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-1
+terminus-iso8859-1-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso8859-1
+terminus-iso8859-1-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso8859-1
+terminus-iso8859-1-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso8859-1
+terminus-iso8859-1-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso8859-1
+terminus-iso8859-1-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-1
+terminus-iso8859-1-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-1
+terminus-iso8859-1-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso8859-1
+terminus-iso8859-1-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso8859-1
+terminus-iso8859-1-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-iso8859-1
+terminus-iso8859-1-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso8859-1
+terminus-iso8859-1-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso8859-1
+terminus-iso8859-1-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso8859-1
+terminus-iso8859-2-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-2
+terminus-iso8859-2-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-2
+terminus-iso8859-2-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-2
+terminus-iso8859-2-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-2
+terminus-iso8859-2-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso8859-2
+terminus-iso8859-2-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso8859-2
+terminus-iso8859-2-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso8859-2
+terminus-iso8859-2-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso8859-2
+terminus-iso8859-2-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-2
+terminus-iso8859-2-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-2
+terminus-iso8859-2-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso8859-2
+terminus-iso8859-2-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso8859-2
+terminus-iso8859-2-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-iso8859-2
+terminus-iso8859-2-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso8859-2
+terminus-iso8859-2-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso8859-2
+terminus-iso8859-2-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso8859-2
+terminus-iso8859-5-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-5
+terminus-iso8859-5-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-5
+terminus-iso8859-5-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-5
+terminus-iso8859-5-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-5
+terminus-iso8859-5-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso8859-5
+terminus-iso8859-5-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso8859-5
+terminus-iso8859-5-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso8859-5
+terminus-iso8859-5-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso8859-5
+terminus-iso8859-5-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-5
+terminus-iso8859-5-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-5
+terminus-iso8859-5-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso8859-5
+terminus-iso8859-5-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso8859-5
+terminus-iso8859-5-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-iso8859-5
+terminus-iso8859-5-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso8859-5
+terminus-iso8859-5-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso8859-5
+terminus-iso8859-5-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso8859-5
+terminus-iso8859-7-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-7
+terminus-iso8859-7-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-7
+terminus-iso8859-7-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-7
+terminus-iso8859-7-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-7
+terminus-iso8859-7-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso8859-7
+terminus-iso8859-7-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso8859-7
+terminus-iso8859-7-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso8859-7
+terminus-iso8859-7-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso8859-7
+terminus-iso8859-7-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-7
+terminus-iso8859-7-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-7
+terminus-iso8859-7-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso8859-7
+terminus-iso8859-7-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso8859-7
+terminus-iso8859-7-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-iso8859-7
+terminus-iso8859-7-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso8859-7
+terminus-iso8859-7-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso8859-7
+terminus-iso8859-7-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso8859-7
+terminus-iso8859-9-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-9
+terminus-iso8859-9-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-9
+terminus-iso8859-9-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-9
+terminus-iso8859-9-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-9
+terminus-iso8859-9-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso8859-9
+terminus-iso8859-9-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso8859-9
+terminus-iso8859-9-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso8859-9
+terminus-iso8859-9-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso8859-9
+terminus-iso8859-9-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-9
+terminus-iso8859-9-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-9
+terminus-iso8859-9-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso8859-9
+terminus-iso8859-9-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso8859-9
+terminus-iso8859-9-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-iso8859-9
+terminus-iso8859-9-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso8859-9
+terminus-iso8859-9-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso8859-9
+terminus-iso8859-9-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso8859-9
+terminus-iso8859-13-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-13
+terminus-iso8859-13-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-13
+terminus-iso8859-13-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-13
+terminus-iso8859-13-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-13
+terminus-iso8859-13-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso8859-13
+terminus-iso8859-13-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso8859-13
+terminus-iso8859-13-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso8859-13
+terminus-iso8859-13-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso8859-13
+terminus-iso8859-13-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-13
+terminus-iso8859-13-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-13
+terminus-iso8859-13-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso8859-13
+terminus-iso8859-13-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso8859-13
+terminus-iso8859-13-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-iso8859-13
+terminus-iso8859-13-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso8859-13
+terminus-iso8859-13-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso8859-13
+terminus-iso8859-13-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso8859-13
+terminus-iso8859-15-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-15
+terminus-iso8859-15-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-15
+terminus-iso8859-15-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-15
+terminus-iso8859-15-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-15
+terminus-iso8859-15-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso8859-15
+terminus-iso8859-15-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso8859-15
+terminus-iso8859-15-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso8859-15
+terminus-iso8859-15-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso8859-15
+terminus-iso8859-15-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-15
+terminus-iso8859-15-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-15
+terminus-iso8859-15-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso8859-15
+terminus-iso8859-15-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso8859-15
+terminus-iso8859-15-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-iso8859-15
+terminus-iso8859-15-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso8859-15
+terminus-iso8859-15-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso8859-15
+terminus-iso8859-15-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso8859-15
+terminus-iso8859-16-12 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-16
+terminus-iso8859-16-14 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-16
+terminus-iso8859-16-16 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-16
+terminus-iso8859-16-20 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-16
+terminus-iso8859-16-22 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso8859-16
+terminus-iso8859-16-24 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso8859-16
+terminus-iso8859-16-28 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso8859-16
+terminus-iso8859-16-32 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso8859-16
+terminus-iso8859-16-bold-12 -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-16
+terminus-iso8859-16-bold-14 -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-16
+terminus-iso8859-16-bold-16 -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso8859-16
+terminus-iso8859-16-bold-20 -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso8859-16
+terminus-iso8859-16-bold-22 -xos4-terminus-bold-r-normal--22-220-72-72-c-110-iso8859-16
+terminus-iso8859-16-bold-24 -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso8859-16
+terminus-iso8859-16-bold-28 -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso8859-16
+terminus-iso8859-16-bold-32 -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso8859-16
diff --git a/xorg-server/glx/dispatch.h b/xorg-server/glx/dispatch.h
index f019aa6aa..03c7ebcdf 100644
--- a/xorg-server/glx/dispatch.h
+++ b/xorg-server/glx/dispatch.h
@@ -25,13 +25,13 @@
* SOFTWARE.
*/
-#if !defined( _DISPATCH_H_ )
-# define _DISPATCH_H_
+#if !defined( _GLAPI_DISPATCH_H_ )
+# define _GLAPI_DISPATCH_H_
#include "glapitable.h"
/**
- * \file dispatch.h
+ * \file glapidispatch.h
* Macros for handling GL dispatch tables.
*
* For each known GL function, there are 3 macros in this file. The first
@@ -57,2323 +57,908 @@
} \
} while(0)
-#define CALL_NewList(disp, parameters) (*((disp)->NewList)) parameters
-#define GET_NewList(disp) ((disp)->NewList)
-#define SET_NewList(disp, fn) ((disp)->NewList = fn)
-#define CALL_EndList(disp, parameters) (*((disp)->EndList)) parameters
-#define GET_EndList(disp) ((disp)->EndList)
-#define SET_EndList(disp, fn) ((disp)->EndList = fn)
-#define CALL_CallList(disp, parameters) (*((disp)->CallList)) parameters
-#define GET_CallList(disp) ((disp)->CallList)
-#define SET_CallList(disp, fn) ((disp)->CallList = fn)
-#define CALL_CallLists(disp, parameters) (*((disp)->CallLists)) parameters
-#define GET_CallLists(disp) ((disp)->CallLists)
-#define SET_CallLists(disp, fn) ((disp)->CallLists = fn)
-#define CALL_DeleteLists(disp, parameters) (*((disp)->DeleteLists)) parameters
-#define GET_DeleteLists(disp) ((disp)->DeleteLists)
-#define SET_DeleteLists(disp, fn) ((disp)->DeleteLists = fn)
-#define CALL_GenLists(disp, parameters) (*((disp)->GenLists)) parameters
-#define GET_GenLists(disp) ((disp)->GenLists)
-#define SET_GenLists(disp, fn) ((disp)->GenLists = fn)
-#define CALL_ListBase(disp, parameters) (*((disp)->ListBase)) parameters
-#define GET_ListBase(disp) ((disp)->ListBase)
-#define SET_ListBase(disp, fn) ((disp)->ListBase = fn)
-#define CALL_Begin(disp, parameters) (*((disp)->Begin)) parameters
-#define GET_Begin(disp) ((disp)->Begin)
-#define SET_Begin(disp, fn) ((disp)->Begin = fn)
-#define CALL_Bitmap(disp, parameters) (*((disp)->Bitmap)) parameters
-#define GET_Bitmap(disp) ((disp)->Bitmap)
-#define SET_Bitmap(disp, fn) ((disp)->Bitmap = fn)
-#define CALL_Color3b(disp, parameters) (*((disp)->Color3b)) parameters
-#define GET_Color3b(disp) ((disp)->Color3b)
-#define SET_Color3b(disp, fn) ((disp)->Color3b = fn)
-#define CALL_Color3bv(disp, parameters) (*((disp)->Color3bv)) parameters
-#define GET_Color3bv(disp) ((disp)->Color3bv)
-#define SET_Color3bv(disp, fn) ((disp)->Color3bv = fn)
-#define CALL_Color3d(disp, parameters) (*((disp)->Color3d)) parameters
-#define GET_Color3d(disp) ((disp)->Color3d)
-#define SET_Color3d(disp, fn) ((disp)->Color3d = fn)
-#define CALL_Color3dv(disp, parameters) (*((disp)->Color3dv)) parameters
-#define GET_Color3dv(disp) ((disp)->Color3dv)
-#define SET_Color3dv(disp, fn) ((disp)->Color3dv = fn)
-#define CALL_Color3f(disp, parameters) (*((disp)->Color3f)) parameters
-#define GET_Color3f(disp) ((disp)->Color3f)
-#define SET_Color3f(disp, fn) ((disp)->Color3f = fn)
-#define CALL_Color3fv(disp, parameters) (*((disp)->Color3fv)) parameters
-#define GET_Color3fv(disp) ((disp)->Color3fv)
-#define SET_Color3fv(disp, fn) ((disp)->Color3fv = fn)
-#define CALL_Color3i(disp, parameters) (*((disp)->Color3i)) parameters
-#define GET_Color3i(disp) ((disp)->Color3i)
-#define SET_Color3i(disp, fn) ((disp)->Color3i = fn)
-#define CALL_Color3iv(disp, parameters) (*((disp)->Color3iv)) parameters
-#define GET_Color3iv(disp) ((disp)->Color3iv)
-#define SET_Color3iv(disp, fn) ((disp)->Color3iv = fn)
-#define CALL_Color3s(disp, parameters) (*((disp)->Color3s)) parameters
-#define GET_Color3s(disp) ((disp)->Color3s)
-#define SET_Color3s(disp, fn) ((disp)->Color3s = fn)
-#define CALL_Color3sv(disp, parameters) (*((disp)->Color3sv)) parameters
-#define GET_Color3sv(disp) ((disp)->Color3sv)
-#define SET_Color3sv(disp, fn) ((disp)->Color3sv = fn)
-#define CALL_Color3ub(disp, parameters) (*((disp)->Color3ub)) parameters
-#define GET_Color3ub(disp) ((disp)->Color3ub)
-#define SET_Color3ub(disp, fn) ((disp)->Color3ub = fn)
-#define CALL_Color3ubv(disp, parameters) (*((disp)->Color3ubv)) parameters
-#define GET_Color3ubv(disp) ((disp)->Color3ubv)
-#define SET_Color3ubv(disp, fn) ((disp)->Color3ubv = fn)
-#define CALL_Color3ui(disp, parameters) (*((disp)->Color3ui)) parameters
-#define GET_Color3ui(disp) ((disp)->Color3ui)
-#define SET_Color3ui(disp, fn) ((disp)->Color3ui = fn)
-#define CALL_Color3uiv(disp, parameters) (*((disp)->Color3uiv)) parameters
-#define GET_Color3uiv(disp) ((disp)->Color3uiv)
-#define SET_Color3uiv(disp, fn) ((disp)->Color3uiv = fn)
-#define CALL_Color3us(disp, parameters) (*((disp)->Color3us)) parameters
-#define GET_Color3us(disp) ((disp)->Color3us)
-#define SET_Color3us(disp, fn) ((disp)->Color3us = fn)
-#define CALL_Color3usv(disp, parameters) (*((disp)->Color3usv)) parameters
-#define GET_Color3usv(disp) ((disp)->Color3usv)
-#define SET_Color3usv(disp, fn) ((disp)->Color3usv = fn)
-#define CALL_Color4b(disp, parameters) (*((disp)->Color4b)) parameters
-#define GET_Color4b(disp) ((disp)->Color4b)
-#define SET_Color4b(disp, fn) ((disp)->Color4b = fn)
-#define CALL_Color4bv(disp, parameters) (*((disp)->Color4bv)) parameters
-#define GET_Color4bv(disp) ((disp)->Color4bv)
-#define SET_Color4bv(disp, fn) ((disp)->Color4bv = fn)
-#define CALL_Color4d(disp, parameters) (*((disp)->Color4d)) parameters
-#define GET_Color4d(disp) ((disp)->Color4d)
-#define SET_Color4d(disp, fn) ((disp)->Color4d = fn)
-#define CALL_Color4dv(disp, parameters) (*((disp)->Color4dv)) parameters
-#define GET_Color4dv(disp) ((disp)->Color4dv)
-#define SET_Color4dv(disp, fn) ((disp)->Color4dv = fn)
-#define CALL_Color4f(disp, parameters) (*((disp)->Color4f)) parameters
-#define GET_Color4f(disp) ((disp)->Color4f)
-#define SET_Color4f(disp, fn) ((disp)->Color4f = fn)
-#define CALL_Color4fv(disp, parameters) (*((disp)->Color4fv)) parameters
-#define GET_Color4fv(disp) ((disp)->Color4fv)
-#define SET_Color4fv(disp, fn) ((disp)->Color4fv = fn)
-#define CALL_Color4i(disp, parameters) (*((disp)->Color4i)) parameters
-#define GET_Color4i(disp) ((disp)->Color4i)
-#define SET_Color4i(disp, fn) ((disp)->Color4i = fn)
-#define CALL_Color4iv(disp, parameters) (*((disp)->Color4iv)) parameters
-#define GET_Color4iv(disp) ((disp)->Color4iv)
-#define SET_Color4iv(disp, fn) ((disp)->Color4iv = fn)
-#define CALL_Color4s(disp, parameters) (*((disp)->Color4s)) parameters
-#define GET_Color4s(disp) ((disp)->Color4s)
-#define SET_Color4s(disp, fn) ((disp)->Color4s = fn)
-#define CALL_Color4sv(disp, parameters) (*((disp)->Color4sv)) parameters
-#define GET_Color4sv(disp) ((disp)->Color4sv)
-#define SET_Color4sv(disp, fn) ((disp)->Color4sv = fn)
-#define CALL_Color4ub(disp, parameters) (*((disp)->Color4ub)) parameters
-#define GET_Color4ub(disp) ((disp)->Color4ub)
-#define SET_Color4ub(disp, fn) ((disp)->Color4ub = fn)
-#define CALL_Color4ubv(disp, parameters) (*((disp)->Color4ubv)) parameters
-#define GET_Color4ubv(disp) ((disp)->Color4ubv)
-#define SET_Color4ubv(disp, fn) ((disp)->Color4ubv = fn)
-#define CALL_Color4ui(disp, parameters) (*((disp)->Color4ui)) parameters
-#define GET_Color4ui(disp) ((disp)->Color4ui)
-#define SET_Color4ui(disp, fn) ((disp)->Color4ui = fn)
-#define CALL_Color4uiv(disp, parameters) (*((disp)->Color4uiv)) parameters
-#define GET_Color4uiv(disp) ((disp)->Color4uiv)
-#define SET_Color4uiv(disp, fn) ((disp)->Color4uiv = fn)
-#define CALL_Color4us(disp, parameters) (*((disp)->Color4us)) parameters
-#define GET_Color4us(disp) ((disp)->Color4us)
-#define SET_Color4us(disp, fn) ((disp)->Color4us = fn)
-#define CALL_Color4usv(disp, parameters) (*((disp)->Color4usv)) parameters
-#define GET_Color4usv(disp) ((disp)->Color4usv)
-#define SET_Color4usv(disp, fn) ((disp)->Color4usv = fn)
-#define CALL_EdgeFlag(disp, parameters) (*((disp)->EdgeFlag)) parameters
-#define GET_EdgeFlag(disp) ((disp)->EdgeFlag)
-#define SET_EdgeFlag(disp, fn) ((disp)->EdgeFlag = fn)
-#define CALL_EdgeFlagv(disp, parameters) (*((disp)->EdgeFlagv)) parameters
-#define GET_EdgeFlagv(disp) ((disp)->EdgeFlagv)
-#define SET_EdgeFlagv(disp, fn) ((disp)->EdgeFlagv = fn)
-#define CALL_End(disp, parameters) (*((disp)->End)) parameters
-#define GET_End(disp) ((disp)->End)
-#define SET_End(disp, fn) ((disp)->End = fn)
-#define CALL_Indexd(disp, parameters) (*((disp)->Indexd)) parameters
-#define GET_Indexd(disp) ((disp)->Indexd)
-#define SET_Indexd(disp, fn) ((disp)->Indexd = fn)
-#define CALL_Indexdv(disp, parameters) (*((disp)->Indexdv)) parameters
-#define GET_Indexdv(disp) ((disp)->Indexdv)
-#define SET_Indexdv(disp, fn) ((disp)->Indexdv = fn)
-#define CALL_Indexf(disp, parameters) (*((disp)->Indexf)) parameters
-#define GET_Indexf(disp) ((disp)->Indexf)
-#define SET_Indexf(disp, fn) ((disp)->Indexf = fn)
-#define CALL_Indexfv(disp, parameters) (*((disp)->Indexfv)) parameters
-#define GET_Indexfv(disp) ((disp)->Indexfv)
-#define SET_Indexfv(disp, fn) ((disp)->Indexfv = fn)
-#define CALL_Indexi(disp, parameters) (*((disp)->Indexi)) parameters
-#define GET_Indexi(disp) ((disp)->Indexi)
-#define SET_Indexi(disp, fn) ((disp)->Indexi = fn)
-#define CALL_Indexiv(disp, parameters) (*((disp)->Indexiv)) parameters
-#define GET_Indexiv(disp) ((disp)->Indexiv)
-#define SET_Indexiv(disp, fn) ((disp)->Indexiv = fn)
-#define CALL_Indexs(disp, parameters) (*((disp)->Indexs)) parameters
-#define GET_Indexs(disp) ((disp)->Indexs)
-#define SET_Indexs(disp, fn) ((disp)->Indexs = fn)
-#define CALL_Indexsv(disp, parameters) (*((disp)->Indexsv)) parameters
-#define GET_Indexsv(disp) ((disp)->Indexsv)
-#define SET_Indexsv(disp, fn) ((disp)->Indexsv = fn)
-#define CALL_Normal3b(disp, parameters) (*((disp)->Normal3b)) parameters
-#define GET_Normal3b(disp) ((disp)->Normal3b)
-#define SET_Normal3b(disp, fn) ((disp)->Normal3b = fn)
-#define CALL_Normal3bv(disp, parameters) (*((disp)->Normal3bv)) parameters
-#define GET_Normal3bv(disp) ((disp)->Normal3bv)
-#define SET_Normal3bv(disp, fn) ((disp)->Normal3bv = fn)
-#define CALL_Normal3d(disp, parameters) (*((disp)->Normal3d)) parameters
-#define GET_Normal3d(disp) ((disp)->Normal3d)
-#define SET_Normal3d(disp, fn) ((disp)->Normal3d = fn)
-#define CALL_Normal3dv(disp, parameters) (*((disp)->Normal3dv)) parameters
-#define GET_Normal3dv(disp) ((disp)->Normal3dv)
-#define SET_Normal3dv(disp, fn) ((disp)->Normal3dv = fn)
-#define CALL_Normal3f(disp, parameters) (*((disp)->Normal3f)) parameters
-#define GET_Normal3f(disp) ((disp)->Normal3f)
-#define SET_Normal3f(disp, fn) ((disp)->Normal3f = fn)
-#define CALL_Normal3fv(disp, parameters) (*((disp)->Normal3fv)) parameters
-#define GET_Normal3fv(disp) ((disp)->Normal3fv)
-#define SET_Normal3fv(disp, fn) ((disp)->Normal3fv = fn)
-#define CALL_Normal3i(disp, parameters) (*((disp)->Normal3i)) parameters
-#define GET_Normal3i(disp) ((disp)->Normal3i)
-#define SET_Normal3i(disp, fn) ((disp)->Normal3i = fn)
-#define CALL_Normal3iv(disp, parameters) (*((disp)->Normal3iv)) parameters
-#define GET_Normal3iv(disp) ((disp)->Normal3iv)
-#define SET_Normal3iv(disp, fn) ((disp)->Normal3iv = fn)
-#define CALL_Normal3s(disp, parameters) (*((disp)->Normal3s)) parameters
-#define GET_Normal3s(disp) ((disp)->Normal3s)
-#define SET_Normal3s(disp, fn) ((disp)->Normal3s = fn)
-#define CALL_Normal3sv(disp, parameters) (*((disp)->Normal3sv)) parameters
-#define GET_Normal3sv(disp) ((disp)->Normal3sv)
-#define SET_Normal3sv(disp, fn) ((disp)->Normal3sv = fn)
-#define CALL_RasterPos2d(disp, parameters) (*((disp)->RasterPos2d)) parameters
-#define GET_RasterPos2d(disp) ((disp)->RasterPos2d)
-#define SET_RasterPos2d(disp, fn) ((disp)->RasterPos2d = fn)
-#define CALL_RasterPos2dv(disp, parameters) (*((disp)->RasterPos2dv)) parameters
-#define GET_RasterPos2dv(disp) ((disp)->RasterPos2dv)
-#define SET_RasterPos2dv(disp, fn) ((disp)->RasterPos2dv = fn)
-#define CALL_RasterPos2f(disp, parameters) (*((disp)->RasterPos2f)) parameters
-#define GET_RasterPos2f(disp) ((disp)->RasterPos2f)
-#define SET_RasterPos2f(disp, fn) ((disp)->RasterPos2f = fn)
-#define CALL_RasterPos2fv(disp, parameters) (*((disp)->RasterPos2fv)) parameters
-#define GET_RasterPos2fv(disp) ((disp)->RasterPos2fv)
-#define SET_RasterPos2fv(disp, fn) ((disp)->RasterPos2fv = fn)
-#define CALL_RasterPos2i(disp, parameters) (*((disp)->RasterPos2i)) parameters
-#define GET_RasterPos2i(disp) ((disp)->RasterPos2i)
-#define SET_RasterPos2i(disp, fn) ((disp)->RasterPos2i = fn)
-#define CALL_RasterPos2iv(disp, parameters) (*((disp)->RasterPos2iv)) parameters
-#define GET_RasterPos2iv(disp) ((disp)->RasterPos2iv)
-#define SET_RasterPos2iv(disp, fn) ((disp)->RasterPos2iv = fn)
-#define CALL_RasterPos2s(disp, parameters) (*((disp)->RasterPos2s)) parameters
-#define GET_RasterPos2s(disp) ((disp)->RasterPos2s)
-#define SET_RasterPos2s(disp, fn) ((disp)->RasterPos2s = fn)
-#define CALL_RasterPos2sv(disp, parameters) (*((disp)->RasterPos2sv)) parameters
-#define GET_RasterPos2sv(disp) ((disp)->RasterPos2sv)
-#define SET_RasterPos2sv(disp, fn) ((disp)->RasterPos2sv = fn)
-#define CALL_RasterPos3d(disp, parameters) (*((disp)->RasterPos3d)) parameters
-#define GET_RasterPos3d(disp) ((disp)->RasterPos3d)
-#define SET_RasterPos3d(disp, fn) ((disp)->RasterPos3d = fn)
-#define CALL_RasterPos3dv(disp, parameters) (*((disp)->RasterPos3dv)) parameters
-#define GET_RasterPos3dv(disp) ((disp)->RasterPos3dv)
-#define SET_RasterPos3dv(disp, fn) ((disp)->RasterPos3dv = fn)
-#define CALL_RasterPos3f(disp, parameters) (*((disp)->RasterPos3f)) parameters
-#define GET_RasterPos3f(disp) ((disp)->RasterPos3f)
-#define SET_RasterPos3f(disp, fn) ((disp)->RasterPos3f = fn)
-#define CALL_RasterPos3fv(disp, parameters) (*((disp)->RasterPos3fv)) parameters
-#define GET_RasterPos3fv(disp) ((disp)->RasterPos3fv)
-#define SET_RasterPos3fv(disp, fn) ((disp)->RasterPos3fv = fn)
-#define CALL_RasterPos3i(disp, parameters) (*((disp)->RasterPos3i)) parameters
-#define GET_RasterPos3i(disp) ((disp)->RasterPos3i)
-#define SET_RasterPos3i(disp, fn) ((disp)->RasterPos3i = fn)
-#define CALL_RasterPos3iv(disp, parameters) (*((disp)->RasterPos3iv)) parameters
-#define GET_RasterPos3iv(disp) ((disp)->RasterPos3iv)
-#define SET_RasterPos3iv(disp, fn) ((disp)->RasterPos3iv = fn)
-#define CALL_RasterPos3s(disp, parameters) (*((disp)->RasterPos3s)) parameters
-#define GET_RasterPos3s(disp) ((disp)->RasterPos3s)
-#define SET_RasterPos3s(disp, fn) ((disp)->RasterPos3s = fn)
-#define CALL_RasterPos3sv(disp, parameters) (*((disp)->RasterPos3sv)) parameters
-#define GET_RasterPos3sv(disp) ((disp)->RasterPos3sv)
-#define SET_RasterPos3sv(disp, fn) ((disp)->RasterPos3sv = fn)
-#define CALL_RasterPos4d(disp, parameters) (*((disp)->RasterPos4d)) parameters
-#define GET_RasterPos4d(disp) ((disp)->RasterPos4d)
-#define SET_RasterPos4d(disp, fn) ((disp)->RasterPos4d = fn)
-#define CALL_RasterPos4dv(disp, parameters) (*((disp)->RasterPos4dv)) parameters
-#define GET_RasterPos4dv(disp) ((disp)->RasterPos4dv)
-#define SET_RasterPos4dv(disp, fn) ((disp)->RasterPos4dv = fn)
-#define CALL_RasterPos4f(disp, parameters) (*((disp)->RasterPos4f)) parameters
-#define GET_RasterPos4f(disp) ((disp)->RasterPos4f)
-#define SET_RasterPos4f(disp, fn) ((disp)->RasterPos4f = fn)
-#define CALL_RasterPos4fv(disp, parameters) (*((disp)->RasterPos4fv)) parameters
-#define GET_RasterPos4fv(disp) ((disp)->RasterPos4fv)
-#define SET_RasterPos4fv(disp, fn) ((disp)->RasterPos4fv = fn)
-#define CALL_RasterPos4i(disp, parameters) (*((disp)->RasterPos4i)) parameters
-#define GET_RasterPos4i(disp) ((disp)->RasterPos4i)
-#define SET_RasterPos4i(disp, fn) ((disp)->RasterPos4i = fn)
-#define CALL_RasterPos4iv(disp, parameters) (*((disp)->RasterPos4iv)) parameters
-#define GET_RasterPos4iv(disp) ((disp)->RasterPos4iv)
-#define SET_RasterPos4iv(disp, fn) ((disp)->RasterPos4iv = fn)
-#define CALL_RasterPos4s(disp, parameters) (*((disp)->RasterPos4s)) parameters
-#define GET_RasterPos4s(disp) ((disp)->RasterPos4s)
-#define SET_RasterPos4s(disp, fn) ((disp)->RasterPos4s = fn)
-#define CALL_RasterPos4sv(disp, parameters) (*((disp)->RasterPos4sv)) parameters
-#define GET_RasterPos4sv(disp) ((disp)->RasterPos4sv)
-#define SET_RasterPos4sv(disp, fn) ((disp)->RasterPos4sv = fn)
-#define CALL_Rectd(disp, parameters) (*((disp)->Rectd)) parameters
-#define GET_Rectd(disp) ((disp)->Rectd)
-#define SET_Rectd(disp, fn) ((disp)->Rectd = fn)
-#define CALL_Rectdv(disp, parameters) (*((disp)->Rectdv)) parameters
-#define GET_Rectdv(disp) ((disp)->Rectdv)
-#define SET_Rectdv(disp, fn) ((disp)->Rectdv = fn)
-#define CALL_Rectf(disp, parameters) (*((disp)->Rectf)) parameters
-#define GET_Rectf(disp) ((disp)->Rectf)
-#define SET_Rectf(disp, fn) ((disp)->Rectf = fn)
-#define CALL_Rectfv(disp, parameters) (*((disp)->Rectfv)) parameters
-#define GET_Rectfv(disp) ((disp)->Rectfv)
-#define SET_Rectfv(disp, fn) ((disp)->Rectfv = fn)
-#define CALL_Recti(disp, parameters) (*((disp)->Recti)) parameters
-#define GET_Recti(disp) ((disp)->Recti)
-#define SET_Recti(disp, fn) ((disp)->Recti = fn)
-#define CALL_Rectiv(disp, parameters) (*((disp)->Rectiv)) parameters
-#define GET_Rectiv(disp) ((disp)->Rectiv)
-#define SET_Rectiv(disp, fn) ((disp)->Rectiv = fn)
-#define CALL_Rects(disp, parameters) (*((disp)->Rects)) parameters
-#define GET_Rects(disp) ((disp)->Rects)
-#define SET_Rects(disp, fn) ((disp)->Rects = fn)
-#define CALL_Rectsv(disp, parameters) (*((disp)->Rectsv)) parameters
-#define GET_Rectsv(disp) ((disp)->Rectsv)
-#define SET_Rectsv(disp, fn) ((disp)->Rectsv = fn)
-#define CALL_TexCoord1d(disp, parameters) (*((disp)->TexCoord1d)) parameters
-#define GET_TexCoord1d(disp) ((disp)->TexCoord1d)
-#define SET_TexCoord1d(disp, fn) ((disp)->TexCoord1d = fn)
-#define CALL_TexCoord1dv(disp, parameters) (*((disp)->TexCoord1dv)) parameters
-#define GET_TexCoord1dv(disp) ((disp)->TexCoord1dv)
-#define SET_TexCoord1dv(disp, fn) ((disp)->TexCoord1dv = fn)
-#define CALL_TexCoord1f(disp, parameters) (*((disp)->TexCoord1f)) parameters
-#define GET_TexCoord1f(disp) ((disp)->TexCoord1f)
-#define SET_TexCoord1f(disp, fn) ((disp)->TexCoord1f = fn)
-#define CALL_TexCoord1fv(disp, parameters) (*((disp)->TexCoord1fv)) parameters
-#define GET_TexCoord1fv(disp) ((disp)->TexCoord1fv)
-#define SET_TexCoord1fv(disp, fn) ((disp)->TexCoord1fv = fn)
-#define CALL_TexCoord1i(disp, parameters) (*((disp)->TexCoord1i)) parameters
-#define GET_TexCoord1i(disp) ((disp)->TexCoord1i)
-#define SET_TexCoord1i(disp, fn) ((disp)->TexCoord1i = fn)
-#define CALL_TexCoord1iv(disp, parameters) (*((disp)->TexCoord1iv)) parameters
-#define GET_TexCoord1iv(disp) ((disp)->TexCoord1iv)
-#define SET_TexCoord1iv(disp, fn) ((disp)->TexCoord1iv = fn)
-#define CALL_TexCoord1s(disp, parameters) (*((disp)->TexCoord1s)) parameters
-#define GET_TexCoord1s(disp) ((disp)->TexCoord1s)
-#define SET_TexCoord1s(disp, fn) ((disp)->TexCoord1s = fn)
-#define CALL_TexCoord1sv(disp, parameters) (*((disp)->TexCoord1sv)) parameters
-#define GET_TexCoord1sv(disp) ((disp)->TexCoord1sv)
-#define SET_TexCoord1sv(disp, fn) ((disp)->TexCoord1sv = fn)
-#define CALL_TexCoord2d(disp, parameters) (*((disp)->TexCoord2d)) parameters
-#define GET_TexCoord2d(disp) ((disp)->TexCoord2d)
-#define SET_TexCoord2d(disp, fn) ((disp)->TexCoord2d = fn)
-#define CALL_TexCoord2dv(disp, parameters) (*((disp)->TexCoord2dv)) parameters
-#define GET_TexCoord2dv(disp) ((disp)->TexCoord2dv)
-#define SET_TexCoord2dv(disp, fn) ((disp)->TexCoord2dv = fn)
-#define CALL_TexCoord2f(disp, parameters) (*((disp)->TexCoord2f)) parameters
-#define GET_TexCoord2f(disp) ((disp)->TexCoord2f)
-#define SET_TexCoord2f(disp, fn) ((disp)->TexCoord2f = fn)
-#define CALL_TexCoord2fv(disp, parameters) (*((disp)->TexCoord2fv)) parameters
-#define GET_TexCoord2fv(disp) ((disp)->TexCoord2fv)
-#define SET_TexCoord2fv(disp, fn) ((disp)->TexCoord2fv = fn)
-#define CALL_TexCoord2i(disp, parameters) (*((disp)->TexCoord2i)) parameters
-#define GET_TexCoord2i(disp) ((disp)->TexCoord2i)
-#define SET_TexCoord2i(disp, fn) ((disp)->TexCoord2i = fn)
-#define CALL_TexCoord2iv(disp, parameters) (*((disp)->TexCoord2iv)) parameters
-#define GET_TexCoord2iv(disp) ((disp)->TexCoord2iv)
-#define SET_TexCoord2iv(disp, fn) ((disp)->TexCoord2iv = fn)
-#define CALL_TexCoord2s(disp, parameters) (*((disp)->TexCoord2s)) parameters
-#define GET_TexCoord2s(disp) ((disp)->TexCoord2s)
-#define SET_TexCoord2s(disp, fn) ((disp)->TexCoord2s = fn)
-#define CALL_TexCoord2sv(disp, parameters) (*((disp)->TexCoord2sv)) parameters
-#define GET_TexCoord2sv(disp) ((disp)->TexCoord2sv)
-#define SET_TexCoord2sv(disp, fn) ((disp)->TexCoord2sv = fn)
-#define CALL_TexCoord3d(disp, parameters) (*((disp)->TexCoord3d)) parameters
-#define GET_TexCoord3d(disp) ((disp)->TexCoord3d)
-#define SET_TexCoord3d(disp, fn) ((disp)->TexCoord3d = fn)
-#define CALL_TexCoord3dv(disp, parameters) (*((disp)->TexCoord3dv)) parameters
-#define GET_TexCoord3dv(disp) ((disp)->TexCoord3dv)
-#define SET_TexCoord3dv(disp, fn) ((disp)->TexCoord3dv = fn)
-#define CALL_TexCoord3f(disp, parameters) (*((disp)->TexCoord3f)) parameters
-#define GET_TexCoord3f(disp) ((disp)->TexCoord3f)
-#define SET_TexCoord3f(disp, fn) ((disp)->TexCoord3f = fn)
-#define CALL_TexCoord3fv(disp, parameters) (*((disp)->TexCoord3fv)) parameters
-#define GET_TexCoord3fv(disp) ((disp)->TexCoord3fv)
-#define SET_TexCoord3fv(disp, fn) ((disp)->TexCoord3fv = fn)
-#define CALL_TexCoord3i(disp, parameters) (*((disp)->TexCoord3i)) parameters
-#define GET_TexCoord3i(disp) ((disp)->TexCoord3i)
-#define SET_TexCoord3i(disp, fn) ((disp)->TexCoord3i = fn)
-#define CALL_TexCoord3iv(disp, parameters) (*((disp)->TexCoord3iv)) parameters
-#define GET_TexCoord3iv(disp) ((disp)->TexCoord3iv)
-#define SET_TexCoord3iv(disp, fn) ((disp)->TexCoord3iv = fn)
-#define CALL_TexCoord3s(disp, parameters) (*((disp)->TexCoord3s)) parameters
-#define GET_TexCoord3s(disp) ((disp)->TexCoord3s)
-#define SET_TexCoord3s(disp, fn) ((disp)->TexCoord3s = fn)
-#define CALL_TexCoord3sv(disp, parameters) (*((disp)->TexCoord3sv)) parameters
-#define GET_TexCoord3sv(disp) ((disp)->TexCoord3sv)
-#define SET_TexCoord3sv(disp, fn) ((disp)->TexCoord3sv = fn)
-#define CALL_TexCoord4d(disp, parameters) (*((disp)->TexCoord4d)) parameters
-#define GET_TexCoord4d(disp) ((disp)->TexCoord4d)
-#define SET_TexCoord4d(disp, fn) ((disp)->TexCoord4d = fn)
-#define CALL_TexCoord4dv(disp, parameters) (*((disp)->TexCoord4dv)) parameters
-#define GET_TexCoord4dv(disp) ((disp)->TexCoord4dv)
-#define SET_TexCoord4dv(disp, fn) ((disp)->TexCoord4dv = fn)
-#define CALL_TexCoord4f(disp, parameters) (*((disp)->TexCoord4f)) parameters
-#define GET_TexCoord4f(disp) ((disp)->TexCoord4f)
-#define SET_TexCoord4f(disp, fn) ((disp)->TexCoord4f = fn)
-#define CALL_TexCoord4fv(disp, parameters) (*((disp)->TexCoord4fv)) parameters
-#define GET_TexCoord4fv(disp) ((disp)->TexCoord4fv)
-#define SET_TexCoord4fv(disp, fn) ((disp)->TexCoord4fv = fn)
-#define CALL_TexCoord4i(disp, parameters) (*((disp)->TexCoord4i)) parameters
-#define GET_TexCoord4i(disp) ((disp)->TexCoord4i)
-#define SET_TexCoord4i(disp, fn) ((disp)->TexCoord4i = fn)
-#define CALL_TexCoord4iv(disp, parameters) (*((disp)->TexCoord4iv)) parameters
-#define GET_TexCoord4iv(disp) ((disp)->TexCoord4iv)
-#define SET_TexCoord4iv(disp, fn) ((disp)->TexCoord4iv = fn)
-#define CALL_TexCoord4s(disp, parameters) (*((disp)->TexCoord4s)) parameters
-#define GET_TexCoord4s(disp) ((disp)->TexCoord4s)
-#define SET_TexCoord4s(disp, fn) ((disp)->TexCoord4s = fn)
-#define CALL_TexCoord4sv(disp, parameters) (*((disp)->TexCoord4sv)) parameters
-#define GET_TexCoord4sv(disp) ((disp)->TexCoord4sv)
-#define SET_TexCoord4sv(disp, fn) ((disp)->TexCoord4sv = fn)
-#define CALL_Vertex2d(disp, parameters) (*((disp)->Vertex2d)) parameters
-#define GET_Vertex2d(disp) ((disp)->Vertex2d)
-#define SET_Vertex2d(disp, fn) ((disp)->Vertex2d = fn)
-#define CALL_Vertex2dv(disp, parameters) (*((disp)->Vertex2dv)) parameters
-#define GET_Vertex2dv(disp) ((disp)->Vertex2dv)
-#define SET_Vertex2dv(disp, fn) ((disp)->Vertex2dv = fn)
-#define CALL_Vertex2f(disp, parameters) (*((disp)->Vertex2f)) parameters
-#define GET_Vertex2f(disp) ((disp)->Vertex2f)
-#define SET_Vertex2f(disp, fn) ((disp)->Vertex2f = fn)
-#define CALL_Vertex2fv(disp, parameters) (*((disp)->Vertex2fv)) parameters
-#define GET_Vertex2fv(disp) ((disp)->Vertex2fv)
-#define SET_Vertex2fv(disp, fn) ((disp)->Vertex2fv = fn)
-#define CALL_Vertex2i(disp, parameters) (*((disp)->Vertex2i)) parameters
-#define GET_Vertex2i(disp) ((disp)->Vertex2i)
-#define SET_Vertex2i(disp, fn) ((disp)->Vertex2i = fn)
-#define CALL_Vertex2iv(disp, parameters) (*((disp)->Vertex2iv)) parameters
-#define GET_Vertex2iv(disp) ((disp)->Vertex2iv)
-#define SET_Vertex2iv(disp, fn) ((disp)->Vertex2iv = fn)
-#define CALL_Vertex2s(disp, parameters) (*((disp)->Vertex2s)) parameters
-#define GET_Vertex2s(disp) ((disp)->Vertex2s)
-#define SET_Vertex2s(disp, fn) ((disp)->Vertex2s = fn)
-#define CALL_Vertex2sv(disp, parameters) (*((disp)->Vertex2sv)) parameters
-#define GET_Vertex2sv(disp) ((disp)->Vertex2sv)
-#define SET_Vertex2sv(disp, fn) ((disp)->Vertex2sv = fn)
-#define CALL_Vertex3d(disp, parameters) (*((disp)->Vertex3d)) parameters
-#define GET_Vertex3d(disp) ((disp)->Vertex3d)
-#define SET_Vertex3d(disp, fn) ((disp)->Vertex3d = fn)
-#define CALL_Vertex3dv(disp, parameters) (*((disp)->Vertex3dv)) parameters
-#define GET_Vertex3dv(disp) ((disp)->Vertex3dv)
-#define SET_Vertex3dv(disp, fn) ((disp)->Vertex3dv = fn)
-#define CALL_Vertex3f(disp, parameters) (*((disp)->Vertex3f)) parameters
-#define GET_Vertex3f(disp) ((disp)->Vertex3f)
-#define SET_Vertex3f(disp, fn) ((disp)->Vertex3f = fn)
-#define CALL_Vertex3fv(disp, parameters) (*((disp)->Vertex3fv)) parameters
-#define GET_Vertex3fv(disp) ((disp)->Vertex3fv)
-#define SET_Vertex3fv(disp, fn) ((disp)->Vertex3fv = fn)
-#define CALL_Vertex3i(disp, parameters) (*((disp)->Vertex3i)) parameters
-#define GET_Vertex3i(disp) ((disp)->Vertex3i)
-#define SET_Vertex3i(disp, fn) ((disp)->Vertex3i = fn)
-#define CALL_Vertex3iv(disp, parameters) (*((disp)->Vertex3iv)) parameters
-#define GET_Vertex3iv(disp) ((disp)->Vertex3iv)
-#define SET_Vertex3iv(disp, fn) ((disp)->Vertex3iv = fn)
-#define CALL_Vertex3s(disp, parameters) (*((disp)->Vertex3s)) parameters
-#define GET_Vertex3s(disp) ((disp)->Vertex3s)
-#define SET_Vertex3s(disp, fn) ((disp)->Vertex3s = fn)
-#define CALL_Vertex3sv(disp, parameters) (*((disp)->Vertex3sv)) parameters
-#define GET_Vertex3sv(disp) ((disp)->Vertex3sv)
-#define SET_Vertex3sv(disp, fn) ((disp)->Vertex3sv = fn)
-#define CALL_Vertex4d(disp, parameters) (*((disp)->Vertex4d)) parameters
-#define GET_Vertex4d(disp) ((disp)->Vertex4d)
-#define SET_Vertex4d(disp, fn) ((disp)->Vertex4d = fn)
-#define CALL_Vertex4dv(disp, parameters) (*((disp)->Vertex4dv)) parameters
-#define GET_Vertex4dv(disp) ((disp)->Vertex4dv)
-#define SET_Vertex4dv(disp, fn) ((disp)->Vertex4dv = fn)
-#define CALL_Vertex4f(disp, parameters) (*((disp)->Vertex4f)) parameters
-#define GET_Vertex4f(disp) ((disp)->Vertex4f)
-#define SET_Vertex4f(disp, fn) ((disp)->Vertex4f = fn)
-#define CALL_Vertex4fv(disp, parameters) (*((disp)->Vertex4fv)) parameters
-#define GET_Vertex4fv(disp) ((disp)->Vertex4fv)
-#define SET_Vertex4fv(disp, fn) ((disp)->Vertex4fv = fn)
-#define CALL_Vertex4i(disp, parameters) (*((disp)->Vertex4i)) parameters
-#define GET_Vertex4i(disp) ((disp)->Vertex4i)
-#define SET_Vertex4i(disp, fn) ((disp)->Vertex4i = fn)
-#define CALL_Vertex4iv(disp, parameters) (*((disp)->Vertex4iv)) parameters
-#define GET_Vertex4iv(disp) ((disp)->Vertex4iv)
-#define SET_Vertex4iv(disp, fn) ((disp)->Vertex4iv = fn)
-#define CALL_Vertex4s(disp, parameters) (*((disp)->Vertex4s)) parameters
-#define GET_Vertex4s(disp) ((disp)->Vertex4s)
-#define SET_Vertex4s(disp, fn) ((disp)->Vertex4s = fn)
-#define CALL_Vertex4sv(disp, parameters) (*((disp)->Vertex4sv)) parameters
-#define GET_Vertex4sv(disp) ((disp)->Vertex4sv)
-#define SET_Vertex4sv(disp, fn) ((disp)->Vertex4sv = fn)
-#define CALL_ClipPlane(disp, parameters) (*((disp)->ClipPlane)) parameters
-#define GET_ClipPlane(disp) ((disp)->ClipPlane)
-#define SET_ClipPlane(disp, fn) ((disp)->ClipPlane = fn)
-#define CALL_ColorMaterial(disp, parameters) (*((disp)->ColorMaterial)) parameters
-#define GET_ColorMaterial(disp) ((disp)->ColorMaterial)
-#define SET_ColorMaterial(disp, fn) ((disp)->ColorMaterial = fn)
-#define CALL_CullFace(disp, parameters) (*((disp)->CullFace)) parameters
-#define GET_CullFace(disp) ((disp)->CullFace)
-#define SET_CullFace(disp, fn) ((disp)->CullFace = fn)
-#define CALL_Fogf(disp, parameters) (*((disp)->Fogf)) parameters
-#define GET_Fogf(disp) ((disp)->Fogf)
-#define SET_Fogf(disp, fn) ((disp)->Fogf = fn)
-#define CALL_Fogfv(disp, parameters) (*((disp)->Fogfv)) parameters
-#define GET_Fogfv(disp) ((disp)->Fogfv)
-#define SET_Fogfv(disp, fn) ((disp)->Fogfv = fn)
-#define CALL_Fogi(disp, parameters) (*((disp)->Fogi)) parameters
-#define GET_Fogi(disp) ((disp)->Fogi)
-#define SET_Fogi(disp, fn) ((disp)->Fogi = fn)
-#define CALL_Fogiv(disp, parameters) (*((disp)->Fogiv)) parameters
-#define GET_Fogiv(disp) ((disp)->Fogiv)
-#define SET_Fogiv(disp, fn) ((disp)->Fogiv = fn)
-#define CALL_FrontFace(disp, parameters) (*((disp)->FrontFace)) parameters
-#define GET_FrontFace(disp) ((disp)->FrontFace)
-#define SET_FrontFace(disp, fn) ((disp)->FrontFace = fn)
-#define CALL_Hint(disp, parameters) (*((disp)->Hint)) parameters
-#define GET_Hint(disp) ((disp)->Hint)
-#define SET_Hint(disp, fn) ((disp)->Hint = fn)
-#define CALL_Lightf(disp, parameters) (*((disp)->Lightf)) parameters
-#define GET_Lightf(disp) ((disp)->Lightf)
-#define SET_Lightf(disp, fn) ((disp)->Lightf = fn)
-#define CALL_Lightfv(disp, parameters) (*((disp)->Lightfv)) parameters
-#define GET_Lightfv(disp) ((disp)->Lightfv)
-#define SET_Lightfv(disp, fn) ((disp)->Lightfv = fn)
-#define CALL_Lighti(disp, parameters) (*((disp)->Lighti)) parameters
-#define GET_Lighti(disp) ((disp)->Lighti)
-#define SET_Lighti(disp, fn) ((disp)->Lighti = fn)
-#define CALL_Lightiv(disp, parameters) (*((disp)->Lightiv)) parameters
-#define GET_Lightiv(disp) ((disp)->Lightiv)
-#define SET_Lightiv(disp, fn) ((disp)->Lightiv = fn)
-#define CALL_LightModelf(disp, parameters) (*((disp)->LightModelf)) parameters
-#define GET_LightModelf(disp) ((disp)->LightModelf)
-#define SET_LightModelf(disp, fn) ((disp)->LightModelf = fn)
-#define CALL_LightModelfv(disp, parameters) (*((disp)->LightModelfv)) parameters
-#define GET_LightModelfv(disp) ((disp)->LightModelfv)
-#define SET_LightModelfv(disp, fn) ((disp)->LightModelfv = fn)
-#define CALL_LightModeli(disp, parameters) (*((disp)->LightModeli)) parameters
-#define GET_LightModeli(disp) ((disp)->LightModeli)
-#define SET_LightModeli(disp, fn) ((disp)->LightModeli = fn)
-#define CALL_LightModeliv(disp, parameters) (*((disp)->LightModeliv)) parameters
-#define GET_LightModeliv(disp) ((disp)->LightModeliv)
-#define SET_LightModeliv(disp, fn) ((disp)->LightModeliv = fn)
-#define CALL_LineStipple(disp, parameters) (*((disp)->LineStipple)) parameters
-#define GET_LineStipple(disp) ((disp)->LineStipple)
-#define SET_LineStipple(disp, fn) ((disp)->LineStipple = fn)
-#define CALL_LineWidth(disp, parameters) (*((disp)->LineWidth)) parameters
-#define GET_LineWidth(disp) ((disp)->LineWidth)
-#define SET_LineWidth(disp, fn) ((disp)->LineWidth = fn)
-#define CALL_Materialf(disp, parameters) (*((disp)->Materialf)) parameters
-#define GET_Materialf(disp) ((disp)->Materialf)
-#define SET_Materialf(disp, fn) ((disp)->Materialf = fn)
-#define CALL_Materialfv(disp, parameters) (*((disp)->Materialfv)) parameters
-#define GET_Materialfv(disp) ((disp)->Materialfv)
-#define SET_Materialfv(disp, fn) ((disp)->Materialfv = fn)
-#define CALL_Materiali(disp, parameters) (*((disp)->Materiali)) parameters
-#define GET_Materiali(disp) ((disp)->Materiali)
-#define SET_Materiali(disp, fn) ((disp)->Materiali = fn)
-#define CALL_Materialiv(disp, parameters) (*((disp)->Materialiv)) parameters
-#define GET_Materialiv(disp) ((disp)->Materialiv)
-#define SET_Materialiv(disp, fn) ((disp)->Materialiv = fn)
-#define CALL_PointSize(disp, parameters) (*((disp)->PointSize)) parameters
-#define GET_PointSize(disp) ((disp)->PointSize)
-#define SET_PointSize(disp, fn) ((disp)->PointSize = fn)
-#define CALL_PolygonMode(disp, parameters) (*((disp)->PolygonMode)) parameters
-#define GET_PolygonMode(disp) ((disp)->PolygonMode)
-#define SET_PolygonMode(disp, fn) ((disp)->PolygonMode = fn)
-#define CALL_PolygonStipple(disp, parameters) (*((disp)->PolygonStipple)) parameters
-#define GET_PolygonStipple(disp) ((disp)->PolygonStipple)
-#define SET_PolygonStipple(disp, fn) ((disp)->PolygonStipple = fn)
-#define CALL_Scissor(disp, parameters) (*((disp)->Scissor)) parameters
-#define GET_Scissor(disp) ((disp)->Scissor)
-#define SET_Scissor(disp, fn) ((disp)->Scissor = fn)
-#define CALL_ShadeModel(disp, parameters) (*((disp)->ShadeModel)) parameters
-#define GET_ShadeModel(disp) ((disp)->ShadeModel)
-#define SET_ShadeModel(disp, fn) ((disp)->ShadeModel = fn)
-#define CALL_TexParameterf(disp, parameters) (*((disp)->TexParameterf)) parameters
-#define GET_TexParameterf(disp) ((disp)->TexParameterf)
-#define SET_TexParameterf(disp, fn) ((disp)->TexParameterf = fn)
-#define CALL_TexParameterfv(disp, parameters) (*((disp)->TexParameterfv)) parameters
-#define GET_TexParameterfv(disp) ((disp)->TexParameterfv)
-#define SET_TexParameterfv(disp, fn) ((disp)->TexParameterfv = fn)
-#define CALL_TexParameteri(disp, parameters) (*((disp)->TexParameteri)) parameters
-#define GET_TexParameteri(disp) ((disp)->TexParameteri)
-#define SET_TexParameteri(disp, fn) ((disp)->TexParameteri = fn)
-#define CALL_TexParameteriv(disp, parameters) (*((disp)->TexParameteriv)) parameters
-#define GET_TexParameteriv(disp) ((disp)->TexParameteriv)
-#define SET_TexParameteriv(disp, fn) ((disp)->TexParameteriv = fn)
-#define CALL_TexImage1D(disp, parameters) (*((disp)->TexImage1D)) parameters
-#define GET_TexImage1D(disp) ((disp)->TexImage1D)
-#define SET_TexImage1D(disp, fn) ((disp)->TexImage1D = fn)
-#define CALL_TexImage2D(disp, parameters) (*((disp)->TexImage2D)) parameters
-#define GET_TexImage2D(disp) ((disp)->TexImage2D)
-#define SET_TexImage2D(disp, fn) ((disp)->TexImage2D = fn)
-#define CALL_TexEnvf(disp, parameters) (*((disp)->TexEnvf)) parameters
-#define GET_TexEnvf(disp) ((disp)->TexEnvf)
-#define SET_TexEnvf(disp, fn) ((disp)->TexEnvf = fn)
-#define CALL_TexEnvfv(disp, parameters) (*((disp)->TexEnvfv)) parameters
-#define GET_TexEnvfv(disp) ((disp)->TexEnvfv)
-#define SET_TexEnvfv(disp, fn) ((disp)->TexEnvfv = fn)
-#define CALL_TexEnvi(disp, parameters) (*((disp)->TexEnvi)) parameters
-#define GET_TexEnvi(disp) ((disp)->TexEnvi)
-#define SET_TexEnvi(disp, fn) ((disp)->TexEnvi = fn)
-#define CALL_TexEnviv(disp, parameters) (*((disp)->TexEnviv)) parameters
-#define GET_TexEnviv(disp) ((disp)->TexEnviv)
-#define SET_TexEnviv(disp, fn) ((disp)->TexEnviv = fn)
-#define CALL_TexGend(disp, parameters) (*((disp)->TexGend)) parameters
-#define GET_TexGend(disp) ((disp)->TexGend)
-#define SET_TexGend(disp, fn) ((disp)->TexGend = fn)
-#define CALL_TexGendv(disp, parameters) (*((disp)->TexGendv)) parameters
-#define GET_TexGendv(disp) ((disp)->TexGendv)
-#define SET_TexGendv(disp, fn) ((disp)->TexGendv = fn)
-#define CALL_TexGenf(disp, parameters) (*((disp)->TexGenf)) parameters
-#define GET_TexGenf(disp) ((disp)->TexGenf)
-#define SET_TexGenf(disp, fn) ((disp)->TexGenf = fn)
-#define CALL_TexGenfv(disp, parameters) (*((disp)->TexGenfv)) parameters
-#define GET_TexGenfv(disp) ((disp)->TexGenfv)
-#define SET_TexGenfv(disp, fn) ((disp)->TexGenfv = fn)
-#define CALL_TexGeni(disp, parameters) (*((disp)->TexGeni)) parameters
-#define GET_TexGeni(disp) ((disp)->TexGeni)
-#define SET_TexGeni(disp, fn) ((disp)->TexGeni = fn)
-#define CALL_TexGeniv(disp, parameters) (*((disp)->TexGeniv)) parameters
-#define GET_TexGeniv(disp) ((disp)->TexGeniv)
-#define SET_TexGeniv(disp, fn) ((disp)->TexGeniv = fn)
-#define CALL_FeedbackBuffer(disp, parameters) (*((disp)->FeedbackBuffer)) parameters
-#define GET_FeedbackBuffer(disp) ((disp)->FeedbackBuffer)
-#define SET_FeedbackBuffer(disp, fn) ((disp)->FeedbackBuffer = fn)
-#define CALL_SelectBuffer(disp, parameters) (*((disp)->SelectBuffer)) parameters
-#define GET_SelectBuffer(disp) ((disp)->SelectBuffer)
-#define SET_SelectBuffer(disp, fn) ((disp)->SelectBuffer = fn)
-#define CALL_RenderMode(disp, parameters) (*((disp)->RenderMode)) parameters
-#define GET_RenderMode(disp) ((disp)->RenderMode)
-#define SET_RenderMode(disp, fn) ((disp)->RenderMode = fn)
-#define CALL_InitNames(disp, parameters) (*((disp)->InitNames)) parameters
-#define GET_InitNames(disp) ((disp)->InitNames)
-#define SET_InitNames(disp, fn) ((disp)->InitNames = fn)
-#define CALL_LoadName(disp, parameters) (*((disp)->LoadName)) parameters
-#define GET_LoadName(disp) ((disp)->LoadName)
-#define SET_LoadName(disp, fn) ((disp)->LoadName = fn)
-#define CALL_PassThrough(disp, parameters) (*((disp)->PassThrough)) parameters
-#define GET_PassThrough(disp) ((disp)->PassThrough)
-#define SET_PassThrough(disp, fn) ((disp)->PassThrough = fn)
-#define CALL_PopName(disp, parameters) (*((disp)->PopName)) parameters
-#define GET_PopName(disp) ((disp)->PopName)
-#define SET_PopName(disp, fn) ((disp)->PopName = fn)
-#define CALL_PushName(disp, parameters) (*((disp)->PushName)) parameters
-#define GET_PushName(disp) ((disp)->PushName)
-#define SET_PushName(disp, fn) ((disp)->PushName = fn)
-#define CALL_DrawBuffer(disp, parameters) (*((disp)->DrawBuffer)) parameters
-#define GET_DrawBuffer(disp) ((disp)->DrawBuffer)
-#define SET_DrawBuffer(disp, fn) ((disp)->DrawBuffer = fn)
-#define CALL_Clear(disp, parameters) (*((disp)->Clear)) parameters
-#define GET_Clear(disp) ((disp)->Clear)
-#define SET_Clear(disp, fn) ((disp)->Clear = fn)
-#define CALL_ClearAccum(disp, parameters) (*((disp)->ClearAccum)) parameters
-#define GET_ClearAccum(disp) ((disp)->ClearAccum)
-#define SET_ClearAccum(disp, fn) ((disp)->ClearAccum = fn)
-#define CALL_ClearIndex(disp, parameters) (*((disp)->ClearIndex)) parameters
-#define GET_ClearIndex(disp) ((disp)->ClearIndex)
-#define SET_ClearIndex(disp, fn) ((disp)->ClearIndex = fn)
-#define CALL_ClearColor(disp, parameters) (*((disp)->ClearColor)) parameters
-#define GET_ClearColor(disp) ((disp)->ClearColor)
-#define SET_ClearColor(disp, fn) ((disp)->ClearColor = fn)
-#define CALL_ClearStencil(disp, parameters) (*((disp)->ClearStencil)) parameters
-#define GET_ClearStencil(disp) ((disp)->ClearStencil)
-#define SET_ClearStencil(disp, fn) ((disp)->ClearStencil = fn)
-#define CALL_ClearDepth(disp, parameters) (*((disp)->ClearDepth)) parameters
-#define GET_ClearDepth(disp) ((disp)->ClearDepth)
-#define SET_ClearDepth(disp, fn) ((disp)->ClearDepth = fn)
-#define CALL_StencilMask(disp, parameters) (*((disp)->StencilMask)) parameters
-#define GET_StencilMask(disp) ((disp)->StencilMask)
-#define SET_StencilMask(disp, fn) ((disp)->StencilMask = fn)
-#define CALL_ColorMask(disp, parameters) (*((disp)->ColorMask)) parameters
-#define GET_ColorMask(disp) ((disp)->ColorMask)
-#define SET_ColorMask(disp, fn) ((disp)->ColorMask = fn)
-#define CALL_DepthMask(disp, parameters) (*((disp)->DepthMask)) parameters
-#define GET_DepthMask(disp) ((disp)->DepthMask)
-#define SET_DepthMask(disp, fn) ((disp)->DepthMask = fn)
-#define CALL_IndexMask(disp, parameters) (*((disp)->IndexMask)) parameters
-#define GET_IndexMask(disp) ((disp)->IndexMask)
-#define SET_IndexMask(disp, fn) ((disp)->IndexMask = fn)
-#define CALL_Accum(disp, parameters) (*((disp)->Accum)) parameters
-#define GET_Accum(disp) ((disp)->Accum)
-#define SET_Accum(disp, fn) ((disp)->Accum = fn)
-#define CALL_Disable(disp, parameters) (*((disp)->Disable)) parameters
-#define GET_Disable(disp) ((disp)->Disable)
-#define SET_Disable(disp, fn) ((disp)->Disable = fn)
-#define CALL_Enable(disp, parameters) (*((disp)->Enable)) parameters
-#define GET_Enable(disp) ((disp)->Enable)
-#define SET_Enable(disp, fn) ((disp)->Enable = fn)
-#define CALL_Finish(disp, parameters) (*((disp)->Finish)) parameters
-#define GET_Finish(disp) ((disp)->Finish)
-#define SET_Finish(disp, fn) ((disp)->Finish = fn)
-#define CALL_Flush(disp, parameters) (*((disp)->Flush)) parameters
-#define GET_Flush(disp) ((disp)->Flush)
-#define SET_Flush(disp, fn) ((disp)->Flush = fn)
-#define CALL_PopAttrib(disp, parameters) (*((disp)->PopAttrib)) parameters
-#define GET_PopAttrib(disp) ((disp)->PopAttrib)
-#define SET_PopAttrib(disp, fn) ((disp)->PopAttrib = fn)
-#define CALL_PushAttrib(disp, parameters) (*((disp)->PushAttrib)) parameters
-#define GET_PushAttrib(disp) ((disp)->PushAttrib)
-#define SET_PushAttrib(disp, fn) ((disp)->PushAttrib = fn)
-#define CALL_Map1d(disp, parameters) (*((disp)->Map1d)) parameters
-#define GET_Map1d(disp) ((disp)->Map1d)
-#define SET_Map1d(disp, fn) ((disp)->Map1d = fn)
-#define CALL_Map1f(disp, parameters) (*((disp)->Map1f)) parameters
-#define GET_Map1f(disp) ((disp)->Map1f)
-#define SET_Map1f(disp, fn) ((disp)->Map1f = fn)
-#define CALL_Map2d(disp, parameters) (*((disp)->Map2d)) parameters
-#define GET_Map2d(disp) ((disp)->Map2d)
-#define SET_Map2d(disp, fn) ((disp)->Map2d = fn)
-#define CALL_Map2f(disp, parameters) (*((disp)->Map2f)) parameters
-#define GET_Map2f(disp) ((disp)->Map2f)
-#define SET_Map2f(disp, fn) ((disp)->Map2f = fn)
-#define CALL_MapGrid1d(disp, parameters) (*((disp)->MapGrid1d)) parameters
-#define GET_MapGrid1d(disp) ((disp)->MapGrid1d)
-#define SET_MapGrid1d(disp, fn) ((disp)->MapGrid1d = fn)
-#define CALL_MapGrid1f(disp, parameters) (*((disp)->MapGrid1f)) parameters
-#define GET_MapGrid1f(disp) ((disp)->MapGrid1f)
-#define SET_MapGrid1f(disp, fn) ((disp)->MapGrid1f = fn)
-#define CALL_MapGrid2d(disp, parameters) (*((disp)->MapGrid2d)) parameters
-#define GET_MapGrid2d(disp) ((disp)->MapGrid2d)
-#define SET_MapGrid2d(disp, fn) ((disp)->MapGrid2d = fn)
-#define CALL_MapGrid2f(disp, parameters) (*((disp)->MapGrid2f)) parameters
-#define GET_MapGrid2f(disp) ((disp)->MapGrid2f)
-#define SET_MapGrid2f(disp, fn) ((disp)->MapGrid2f = fn)
-#define CALL_EvalCoord1d(disp, parameters) (*((disp)->EvalCoord1d)) parameters
-#define GET_EvalCoord1d(disp) ((disp)->EvalCoord1d)
-#define SET_EvalCoord1d(disp, fn) ((disp)->EvalCoord1d = fn)
-#define CALL_EvalCoord1dv(disp, parameters) (*((disp)->EvalCoord1dv)) parameters
-#define GET_EvalCoord1dv(disp) ((disp)->EvalCoord1dv)
-#define SET_EvalCoord1dv(disp, fn) ((disp)->EvalCoord1dv = fn)
-#define CALL_EvalCoord1f(disp, parameters) (*((disp)->EvalCoord1f)) parameters
-#define GET_EvalCoord1f(disp) ((disp)->EvalCoord1f)
-#define SET_EvalCoord1f(disp, fn) ((disp)->EvalCoord1f = fn)
-#define CALL_EvalCoord1fv(disp, parameters) (*((disp)->EvalCoord1fv)) parameters
-#define GET_EvalCoord1fv(disp) ((disp)->EvalCoord1fv)
-#define SET_EvalCoord1fv(disp, fn) ((disp)->EvalCoord1fv = fn)
-#define CALL_EvalCoord2d(disp, parameters) (*((disp)->EvalCoord2d)) parameters
-#define GET_EvalCoord2d(disp) ((disp)->EvalCoord2d)
-#define SET_EvalCoord2d(disp, fn) ((disp)->EvalCoord2d = fn)
-#define CALL_EvalCoord2dv(disp, parameters) (*((disp)->EvalCoord2dv)) parameters
-#define GET_EvalCoord2dv(disp) ((disp)->EvalCoord2dv)
-#define SET_EvalCoord2dv(disp, fn) ((disp)->EvalCoord2dv = fn)
-#define CALL_EvalCoord2f(disp, parameters) (*((disp)->EvalCoord2f)) parameters
-#define GET_EvalCoord2f(disp) ((disp)->EvalCoord2f)
-#define SET_EvalCoord2f(disp, fn) ((disp)->EvalCoord2f = fn)
-#define CALL_EvalCoord2fv(disp, parameters) (*((disp)->EvalCoord2fv)) parameters
-#define GET_EvalCoord2fv(disp) ((disp)->EvalCoord2fv)
-#define SET_EvalCoord2fv(disp, fn) ((disp)->EvalCoord2fv = fn)
-#define CALL_EvalMesh1(disp, parameters) (*((disp)->EvalMesh1)) parameters
-#define GET_EvalMesh1(disp) ((disp)->EvalMesh1)
-#define SET_EvalMesh1(disp, fn) ((disp)->EvalMesh1 = fn)
-#define CALL_EvalPoint1(disp, parameters) (*((disp)->EvalPoint1)) parameters
-#define GET_EvalPoint1(disp) ((disp)->EvalPoint1)
-#define SET_EvalPoint1(disp, fn) ((disp)->EvalPoint1 = fn)
-#define CALL_EvalMesh2(disp, parameters) (*((disp)->EvalMesh2)) parameters
-#define GET_EvalMesh2(disp) ((disp)->EvalMesh2)
-#define SET_EvalMesh2(disp, fn) ((disp)->EvalMesh2 = fn)
-#define CALL_EvalPoint2(disp, parameters) (*((disp)->EvalPoint2)) parameters
-#define GET_EvalPoint2(disp) ((disp)->EvalPoint2)
-#define SET_EvalPoint2(disp, fn) ((disp)->EvalPoint2 = fn)
-#define CALL_AlphaFunc(disp, parameters) (*((disp)->AlphaFunc)) parameters
-#define GET_AlphaFunc(disp) ((disp)->AlphaFunc)
-#define SET_AlphaFunc(disp, fn) ((disp)->AlphaFunc = fn)
-#define CALL_BlendFunc(disp, parameters) (*((disp)->BlendFunc)) parameters
-#define GET_BlendFunc(disp) ((disp)->BlendFunc)
-#define SET_BlendFunc(disp, fn) ((disp)->BlendFunc = fn)
-#define CALL_LogicOp(disp, parameters) (*((disp)->LogicOp)) parameters
-#define GET_LogicOp(disp) ((disp)->LogicOp)
-#define SET_LogicOp(disp, fn) ((disp)->LogicOp = fn)
-#define CALL_StencilFunc(disp, parameters) (*((disp)->StencilFunc)) parameters
-#define GET_StencilFunc(disp) ((disp)->StencilFunc)
-#define SET_StencilFunc(disp, fn) ((disp)->StencilFunc = fn)
-#define CALL_StencilOp(disp, parameters) (*((disp)->StencilOp)) parameters
-#define GET_StencilOp(disp) ((disp)->StencilOp)
-#define SET_StencilOp(disp, fn) ((disp)->StencilOp = fn)
-#define CALL_DepthFunc(disp, parameters) (*((disp)->DepthFunc)) parameters
-#define GET_DepthFunc(disp) ((disp)->DepthFunc)
-#define SET_DepthFunc(disp, fn) ((disp)->DepthFunc = fn)
-#define CALL_PixelZoom(disp, parameters) (*((disp)->PixelZoom)) parameters
-#define GET_PixelZoom(disp) ((disp)->PixelZoom)
-#define SET_PixelZoom(disp, fn) ((disp)->PixelZoom = fn)
-#define CALL_PixelTransferf(disp, parameters) (*((disp)->PixelTransferf)) parameters
-#define GET_PixelTransferf(disp) ((disp)->PixelTransferf)
-#define SET_PixelTransferf(disp, fn) ((disp)->PixelTransferf = fn)
-#define CALL_PixelTransferi(disp, parameters) (*((disp)->PixelTransferi)) parameters
-#define GET_PixelTransferi(disp) ((disp)->PixelTransferi)
-#define SET_PixelTransferi(disp, fn) ((disp)->PixelTransferi = fn)
-#define CALL_PixelStoref(disp, parameters) (*((disp)->PixelStoref)) parameters
-#define GET_PixelStoref(disp) ((disp)->PixelStoref)
-#define SET_PixelStoref(disp, fn) ((disp)->PixelStoref = fn)
-#define CALL_PixelStorei(disp, parameters) (*((disp)->PixelStorei)) parameters
-#define GET_PixelStorei(disp) ((disp)->PixelStorei)
-#define SET_PixelStorei(disp, fn) ((disp)->PixelStorei = fn)
-#define CALL_PixelMapfv(disp, parameters) (*((disp)->PixelMapfv)) parameters
-#define GET_PixelMapfv(disp) ((disp)->PixelMapfv)
-#define SET_PixelMapfv(disp, fn) ((disp)->PixelMapfv = fn)
-#define CALL_PixelMapuiv(disp, parameters) (*((disp)->PixelMapuiv)) parameters
-#define GET_PixelMapuiv(disp) ((disp)->PixelMapuiv)
-#define SET_PixelMapuiv(disp, fn) ((disp)->PixelMapuiv = fn)
-#define CALL_PixelMapusv(disp, parameters) (*((disp)->PixelMapusv)) parameters
-#define GET_PixelMapusv(disp) ((disp)->PixelMapusv)
-#define SET_PixelMapusv(disp, fn) ((disp)->PixelMapusv = fn)
-#define CALL_ReadBuffer(disp, parameters) (*((disp)->ReadBuffer)) parameters
-#define GET_ReadBuffer(disp) ((disp)->ReadBuffer)
-#define SET_ReadBuffer(disp, fn) ((disp)->ReadBuffer = fn)
-#define CALL_CopyPixels(disp, parameters) (*((disp)->CopyPixels)) parameters
-#define GET_CopyPixels(disp) ((disp)->CopyPixels)
-#define SET_CopyPixels(disp, fn) ((disp)->CopyPixels = fn)
-#define CALL_ReadPixels(disp, parameters) (*((disp)->ReadPixels)) parameters
-#define GET_ReadPixels(disp) ((disp)->ReadPixels)
-#define SET_ReadPixels(disp, fn) ((disp)->ReadPixels = fn)
-#define CALL_DrawPixels(disp, parameters) (*((disp)->DrawPixels)) parameters
-#define GET_DrawPixels(disp) ((disp)->DrawPixels)
-#define SET_DrawPixels(disp, fn) ((disp)->DrawPixels = fn)
-#define CALL_GetBooleanv(disp, parameters) (*((disp)->GetBooleanv)) parameters
-#define GET_GetBooleanv(disp) ((disp)->GetBooleanv)
-#define SET_GetBooleanv(disp, fn) ((disp)->GetBooleanv = fn)
-#define CALL_GetClipPlane(disp, parameters) (*((disp)->GetClipPlane)) parameters
-#define GET_GetClipPlane(disp) ((disp)->GetClipPlane)
-#define SET_GetClipPlane(disp, fn) ((disp)->GetClipPlane = fn)
-#define CALL_GetDoublev(disp, parameters) (*((disp)->GetDoublev)) parameters
-#define GET_GetDoublev(disp) ((disp)->GetDoublev)
-#define SET_GetDoublev(disp, fn) ((disp)->GetDoublev = fn)
-#define CALL_GetError(disp, parameters) (*((disp)->GetError)) parameters
-#define GET_GetError(disp) ((disp)->GetError)
-#define SET_GetError(disp, fn) ((disp)->GetError = fn)
-#define CALL_GetFloatv(disp, parameters) (*((disp)->GetFloatv)) parameters
-#define GET_GetFloatv(disp) ((disp)->GetFloatv)
-#define SET_GetFloatv(disp, fn) ((disp)->GetFloatv = fn)
-#define CALL_GetIntegerv(disp, parameters) (*((disp)->GetIntegerv)) parameters
-#define GET_GetIntegerv(disp) ((disp)->GetIntegerv)
-#define SET_GetIntegerv(disp, fn) ((disp)->GetIntegerv = fn)
-#define CALL_GetLightfv(disp, parameters) (*((disp)->GetLightfv)) parameters
-#define GET_GetLightfv(disp) ((disp)->GetLightfv)
-#define SET_GetLightfv(disp, fn) ((disp)->GetLightfv = fn)
-#define CALL_GetLightiv(disp, parameters) (*((disp)->GetLightiv)) parameters
-#define GET_GetLightiv(disp) ((disp)->GetLightiv)
-#define SET_GetLightiv(disp, fn) ((disp)->GetLightiv = fn)
-#define CALL_GetMapdv(disp, parameters) (*((disp)->GetMapdv)) parameters
-#define GET_GetMapdv(disp) ((disp)->GetMapdv)
-#define SET_GetMapdv(disp, fn) ((disp)->GetMapdv = fn)
-#define CALL_GetMapfv(disp, parameters) (*((disp)->GetMapfv)) parameters
-#define GET_GetMapfv(disp) ((disp)->GetMapfv)
-#define SET_GetMapfv(disp, fn) ((disp)->GetMapfv = fn)
-#define CALL_GetMapiv(disp, parameters) (*((disp)->GetMapiv)) parameters
-#define GET_GetMapiv(disp) ((disp)->GetMapiv)
-#define SET_GetMapiv(disp, fn) ((disp)->GetMapiv = fn)
-#define CALL_GetMaterialfv(disp, parameters) (*((disp)->GetMaterialfv)) parameters
-#define GET_GetMaterialfv(disp) ((disp)->GetMaterialfv)
-#define SET_GetMaterialfv(disp, fn) ((disp)->GetMaterialfv = fn)
-#define CALL_GetMaterialiv(disp, parameters) (*((disp)->GetMaterialiv)) parameters
-#define GET_GetMaterialiv(disp) ((disp)->GetMaterialiv)
-#define SET_GetMaterialiv(disp, fn) ((disp)->GetMaterialiv = fn)
-#define CALL_GetPixelMapfv(disp, parameters) (*((disp)->GetPixelMapfv)) parameters
-#define GET_GetPixelMapfv(disp) ((disp)->GetPixelMapfv)
-#define SET_GetPixelMapfv(disp, fn) ((disp)->GetPixelMapfv = fn)
-#define CALL_GetPixelMapuiv(disp, parameters) (*((disp)->GetPixelMapuiv)) parameters
-#define GET_GetPixelMapuiv(disp) ((disp)->GetPixelMapuiv)
-#define SET_GetPixelMapuiv(disp, fn) ((disp)->GetPixelMapuiv = fn)
-#define CALL_GetPixelMapusv(disp, parameters) (*((disp)->GetPixelMapusv)) parameters
-#define GET_GetPixelMapusv(disp) ((disp)->GetPixelMapusv)
-#define SET_GetPixelMapusv(disp, fn) ((disp)->GetPixelMapusv = fn)
-#define CALL_GetPolygonStipple(disp, parameters) (*((disp)->GetPolygonStipple)) parameters
-#define GET_GetPolygonStipple(disp) ((disp)->GetPolygonStipple)
-#define SET_GetPolygonStipple(disp, fn) ((disp)->GetPolygonStipple = fn)
-#define CALL_GetString(disp, parameters) (*((disp)->GetString)) parameters
-#define GET_GetString(disp) ((disp)->GetString)
-#define SET_GetString(disp, fn) ((disp)->GetString = fn)
-#define CALL_GetTexEnvfv(disp, parameters) (*((disp)->GetTexEnvfv)) parameters
-#define GET_GetTexEnvfv(disp) ((disp)->GetTexEnvfv)
-#define SET_GetTexEnvfv(disp, fn) ((disp)->GetTexEnvfv = fn)
-#define CALL_GetTexEnviv(disp, parameters) (*((disp)->GetTexEnviv)) parameters
-#define GET_GetTexEnviv(disp) ((disp)->GetTexEnviv)
-#define SET_GetTexEnviv(disp, fn) ((disp)->GetTexEnviv = fn)
-#define CALL_GetTexGendv(disp, parameters) (*((disp)->GetTexGendv)) parameters
-#define GET_GetTexGendv(disp) ((disp)->GetTexGendv)
-#define SET_GetTexGendv(disp, fn) ((disp)->GetTexGendv = fn)
-#define CALL_GetTexGenfv(disp, parameters) (*((disp)->GetTexGenfv)) parameters
-#define GET_GetTexGenfv(disp) ((disp)->GetTexGenfv)
-#define SET_GetTexGenfv(disp, fn) ((disp)->GetTexGenfv = fn)
-#define CALL_GetTexGeniv(disp, parameters) (*((disp)->GetTexGeniv)) parameters
-#define GET_GetTexGeniv(disp) ((disp)->GetTexGeniv)
-#define SET_GetTexGeniv(disp, fn) ((disp)->GetTexGeniv = fn)
-#define CALL_GetTexImage(disp, parameters) (*((disp)->GetTexImage)) parameters
-#define GET_GetTexImage(disp) ((disp)->GetTexImage)
-#define SET_GetTexImage(disp, fn) ((disp)->GetTexImage = fn)
-#define CALL_GetTexParameterfv(disp, parameters) (*((disp)->GetTexParameterfv)) parameters
-#define GET_GetTexParameterfv(disp) ((disp)->GetTexParameterfv)
-#define SET_GetTexParameterfv(disp, fn) ((disp)->GetTexParameterfv = fn)
-#define CALL_GetTexParameteriv(disp, parameters) (*((disp)->GetTexParameteriv)) parameters
-#define GET_GetTexParameteriv(disp) ((disp)->GetTexParameteriv)
-#define SET_GetTexParameteriv(disp, fn) ((disp)->GetTexParameteriv = fn)
-#define CALL_GetTexLevelParameterfv(disp, parameters) (*((disp)->GetTexLevelParameterfv)) parameters
-#define GET_GetTexLevelParameterfv(disp) ((disp)->GetTexLevelParameterfv)
-#define SET_GetTexLevelParameterfv(disp, fn) ((disp)->GetTexLevelParameterfv = fn)
-#define CALL_GetTexLevelParameteriv(disp, parameters) (*((disp)->GetTexLevelParameteriv)) parameters
-#define GET_GetTexLevelParameteriv(disp) ((disp)->GetTexLevelParameteriv)
-#define SET_GetTexLevelParameteriv(disp, fn) ((disp)->GetTexLevelParameteriv = fn)
-#define CALL_IsEnabled(disp, parameters) (*((disp)->IsEnabled)) parameters
-#define GET_IsEnabled(disp) ((disp)->IsEnabled)
-#define SET_IsEnabled(disp, fn) ((disp)->IsEnabled = fn)
-#define CALL_IsList(disp, parameters) (*((disp)->IsList)) parameters
-#define GET_IsList(disp) ((disp)->IsList)
-#define SET_IsList(disp, fn) ((disp)->IsList = fn)
-#define CALL_DepthRange(disp, parameters) (*((disp)->DepthRange)) parameters
-#define GET_DepthRange(disp) ((disp)->DepthRange)
-#define SET_DepthRange(disp, fn) ((disp)->DepthRange = fn)
-#define CALL_Frustum(disp, parameters) (*((disp)->Frustum)) parameters
-#define GET_Frustum(disp) ((disp)->Frustum)
-#define SET_Frustum(disp, fn) ((disp)->Frustum = fn)
-#define CALL_LoadIdentity(disp, parameters) (*((disp)->LoadIdentity)) parameters
-#define GET_LoadIdentity(disp) ((disp)->LoadIdentity)
-#define SET_LoadIdentity(disp, fn) ((disp)->LoadIdentity = fn)
-#define CALL_LoadMatrixf(disp, parameters) (*((disp)->LoadMatrixf)) parameters
-#define GET_LoadMatrixf(disp) ((disp)->LoadMatrixf)
-#define SET_LoadMatrixf(disp, fn) ((disp)->LoadMatrixf = fn)
-#define CALL_LoadMatrixd(disp, parameters) (*((disp)->LoadMatrixd)) parameters
-#define GET_LoadMatrixd(disp) ((disp)->LoadMatrixd)
-#define SET_LoadMatrixd(disp, fn) ((disp)->LoadMatrixd = fn)
-#define CALL_MatrixMode(disp, parameters) (*((disp)->MatrixMode)) parameters
-#define GET_MatrixMode(disp) ((disp)->MatrixMode)
-#define SET_MatrixMode(disp, fn) ((disp)->MatrixMode = fn)
-#define CALL_MultMatrixf(disp, parameters) (*((disp)->MultMatrixf)) parameters
-#define GET_MultMatrixf(disp) ((disp)->MultMatrixf)
-#define SET_MultMatrixf(disp, fn) ((disp)->MultMatrixf = fn)
-#define CALL_MultMatrixd(disp, parameters) (*((disp)->MultMatrixd)) parameters
-#define GET_MultMatrixd(disp) ((disp)->MultMatrixd)
-#define SET_MultMatrixd(disp, fn) ((disp)->MultMatrixd = fn)
-#define CALL_Ortho(disp, parameters) (*((disp)->Ortho)) parameters
-#define GET_Ortho(disp) ((disp)->Ortho)
-#define SET_Ortho(disp, fn) ((disp)->Ortho = fn)
-#define CALL_PopMatrix(disp, parameters) (*((disp)->PopMatrix)) parameters
-#define GET_PopMatrix(disp) ((disp)->PopMatrix)
-#define SET_PopMatrix(disp, fn) ((disp)->PopMatrix = fn)
-#define CALL_PushMatrix(disp, parameters) (*((disp)->PushMatrix)) parameters
-#define GET_PushMatrix(disp) ((disp)->PushMatrix)
-#define SET_PushMatrix(disp, fn) ((disp)->PushMatrix = fn)
-#define CALL_Rotated(disp, parameters) (*((disp)->Rotated)) parameters
-#define GET_Rotated(disp) ((disp)->Rotated)
-#define SET_Rotated(disp, fn) ((disp)->Rotated = fn)
-#define CALL_Rotatef(disp, parameters) (*((disp)->Rotatef)) parameters
-#define GET_Rotatef(disp) ((disp)->Rotatef)
-#define SET_Rotatef(disp, fn) ((disp)->Rotatef = fn)
-#define CALL_Scaled(disp, parameters) (*((disp)->Scaled)) parameters
-#define GET_Scaled(disp) ((disp)->Scaled)
-#define SET_Scaled(disp, fn) ((disp)->Scaled = fn)
-#define CALL_Scalef(disp, parameters) (*((disp)->Scalef)) parameters
-#define GET_Scalef(disp) ((disp)->Scalef)
-#define SET_Scalef(disp, fn) ((disp)->Scalef = fn)
-#define CALL_Translated(disp, parameters) (*((disp)->Translated)) parameters
-#define GET_Translated(disp) ((disp)->Translated)
-#define SET_Translated(disp, fn) ((disp)->Translated = fn)
-#define CALL_Translatef(disp, parameters) (*((disp)->Translatef)) parameters
-#define GET_Translatef(disp) ((disp)->Translatef)
-#define SET_Translatef(disp, fn) ((disp)->Translatef = fn)
-#define CALL_Viewport(disp, parameters) (*((disp)->Viewport)) parameters
-#define GET_Viewport(disp) ((disp)->Viewport)
-#define SET_Viewport(disp, fn) ((disp)->Viewport = fn)
-#define CALL_ArrayElement(disp, parameters) (*((disp)->ArrayElement)) parameters
-#define GET_ArrayElement(disp) ((disp)->ArrayElement)
-#define SET_ArrayElement(disp, fn) ((disp)->ArrayElement = fn)
-#define CALL_BindTexture(disp, parameters) (*((disp)->BindTexture)) parameters
-#define GET_BindTexture(disp) ((disp)->BindTexture)
-#define SET_BindTexture(disp, fn) ((disp)->BindTexture = fn)
-#define CALL_ColorPointer(disp, parameters) (*((disp)->ColorPointer)) parameters
-#define GET_ColorPointer(disp) ((disp)->ColorPointer)
-#define SET_ColorPointer(disp, fn) ((disp)->ColorPointer = fn)
-#define CALL_DisableClientState(disp, parameters) (*((disp)->DisableClientState)) parameters
-#define GET_DisableClientState(disp) ((disp)->DisableClientState)
-#define SET_DisableClientState(disp, fn) ((disp)->DisableClientState = fn)
-#define CALL_DrawArrays(disp, parameters) (*((disp)->DrawArrays)) parameters
-#define GET_DrawArrays(disp) ((disp)->DrawArrays)
-#define SET_DrawArrays(disp, fn) ((disp)->DrawArrays = fn)
-#define CALL_DrawElements(disp, parameters) (*((disp)->DrawElements)) parameters
-#define GET_DrawElements(disp) ((disp)->DrawElements)
-#define SET_DrawElements(disp, fn) ((disp)->DrawElements = fn)
-#define CALL_EdgeFlagPointer(disp, parameters) (*((disp)->EdgeFlagPointer)) parameters
-#define GET_EdgeFlagPointer(disp) ((disp)->EdgeFlagPointer)
-#define SET_EdgeFlagPointer(disp, fn) ((disp)->EdgeFlagPointer = fn)
-#define CALL_EnableClientState(disp, parameters) (*((disp)->EnableClientState)) parameters
-#define GET_EnableClientState(disp) ((disp)->EnableClientState)
-#define SET_EnableClientState(disp, fn) ((disp)->EnableClientState = fn)
-#define CALL_IndexPointer(disp, parameters) (*((disp)->IndexPointer)) parameters
-#define GET_IndexPointer(disp) ((disp)->IndexPointer)
-#define SET_IndexPointer(disp, fn) ((disp)->IndexPointer = fn)
-#define CALL_Indexub(disp, parameters) (*((disp)->Indexub)) parameters
-#define GET_Indexub(disp) ((disp)->Indexub)
-#define SET_Indexub(disp, fn) ((disp)->Indexub = fn)
-#define CALL_Indexubv(disp, parameters) (*((disp)->Indexubv)) parameters
-#define GET_Indexubv(disp) ((disp)->Indexubv)
-#define SET_Indexubv(disp, fn) ((disp)->Indexubv = fn)
-#define CALL_InterleavedArrays(disp, parameters) (*((disp)->InterleavedArrays)) parameters
-#define GET_InterleavedArrays(disp) ((disp)->InterleavedArrays)
-#define SET_InterleavedArrays(disp, fn) ((disp)->InterleavedArrays = fn)
-#define CALL_NormalPointer(disp, parameters) (*((disp)->NormalPointer)) parameters
-#define GET_NormalPointer(disp) ((disp)->NormalPointer)
-#define SET_NormalPointer(disp, fn) ((disp)->NormalPointer = fn)
-#define CALL_PolygonOffset(disp, parameters) (*((disp)->PolygonOffset)) parameters
-#define GET_PolygonOffset(disp) ((disp)->PolygonOffset)
-#define SET_PolygonOffset(disp, fn) ((disp)->PolygonOffset = fn)
-#define CALL_TexCoordPointer(disp, parameters) (*((disp)->TexCoordPointer)) parameters
-#define GET_TexCoordPointer(disp) ((disp)->TexCoordPointer)
-#define SET_TexCoordPointer(disp, fn) ((disp)->TexCoordPointer = fn)
-#define CALL_VertexPointer(disp, parameters) (*((disp)->VertexPointer)) parameters
-#define GET_VertexPointer(disp) ((disp)->VertexPointer)
-#define SET_VertexPointer(disp, fn) ((disp)->VertexPointer = fn)
-#define CALL_AreTexturesResident(disp, parameters) (*((disp)->AreTexturesResident)) parameters
-#define GET_AreTexturesResident(disp) ((disp)->AreTexturesResident)
-#define SET_AreTexturesResident(disp, fn) ((disp)->AreTexturesResident = fn)
-#define CALL_CopyTexImage1D(disp, parameters) (*((disp)->CopyTexImage1D)) parameters
-#define GET_CopyTexImage1D(disp) ((disp)->CopyTexImage1D)
-#define SET_CopyTexImage1D(disp, fn) ((disp)->CopyTexImage1D = fn)
-#define CALL_CopyTexImage2D(disp, parameters) (*((disp)->CopyTexImage2D)) parameters
-#define GET_CopyTexImage2D(disp) ((disp)->CopyTexImage2D)
-#define SET_CopyTexImage2D(disp, fn) ((disp)->CopyTexImage2D = fn)
-#define CALL_CopyTexSubImage1D(disp, parameters) (*((disp)->CopyTexSubImage1D)) parameters
-#define GET_CopyTexSubImage1D(disp) ((disp)->CopyTexSubImage1D)
-#define SET_CopyTexSubImage1D(disp, fn) ((disp)->CopyTexSubImage1D = fn)
-#define CALL_CopyTexSubImage2D(disp, parameters) (*((disp)->CopyTexSubImage2D)) parameters
-#define GET_CopyTexSubImage2D(disp) ((disp)->CopyTexSubImage2D)
-#define SET_CopyTexSubImage2D(disp, fn) ((disp)->CopyTexSubImage2D = fn)
-#define CALL_DeleteTextures(disp, parameters) (*((disp)->DeleteTextures)) parameters
-#define GET_DeleteTextures(disp) ((disp)->DeleteTextures)
-#define SET_DeleteTextures(disp, fn) ((disp)->DeleteTextures = fn)
-#define CALL_GenTextures(disp, parameters) (*((disp)->GenTextures)) parameters
-#define GET_GenTextures(disp) ((disp)->GenTextures)
-#define SET_GenTextures(disp, fn) ((disp)->GenTextures = fn)
-#define CALL_GetPointerv(disp, parameters) (*((disp)->GetPointerv)) parameters
-#define GET_GetPointerv(disp) ((disp)->GetPointerv)
-#define SET_GetPointerv(disp, fn) ((disp)->GetPointerv = fn)
-#define CALL_IsTexture(disp, parameters) (*((disp)->IsTexture)) parameters
-#define GET_IsTexture(disp) ((disp)->IsTexture)
-#define SET_IsTexture(disp, fn) ((disp)->IsTexture = fn)
-#define CALL_PrioritizeTextures(disp, parameters) (*((disp)->PrioritizeTextures)) parameters
-#define GET_PrioritizeTextures(disp) ((disp)->PrioritizeTextures)
-#define SET_PrioritizeTextures(disp, fn) ((disp)->PrioritizeTextures = fn)
-#define CALL_TexSubImage1D(disp, parameters) (*((disp)->TexSubImage1D)) parameters
-#define GET_TexSubImage1D(disp) ((disp)->TexSubImage1D)
-#define SET_TexSubImage1D(disp, fn) ((disp)->TexSubImage1D = fn)
-#define CALL_TexSubImage2D(disp, parameters) (*((disp)->TexSubImage2D)) parameters
-#define GET_TexSubImage2D(disp) ((disp)->TexSubImage2D)
-#define SET_TexSubImage2D(disp, fn) ((disp)->TexSubImage2D = fn)
-#define CALL_PopClientAttrib(disp, parameters) (*((disp)->PopClientAttrib)) parameters
-#define GET_PopClientAttrib(disp) ((disp)->PopClientAttrib)
-#define SET_PopClientAttrib(disp, fn) ((disp)->PopClientAttrib = fn)
-#define CALL_PushClientAttrib(disp, parameters) (*((disp)->PushClientAttrib)) parameters
-#define GET_PushClientAttrib(disp) ((disp)->PushClientAttrib)
-#define SET_PushClientAttrib(disp, fn) ((disp)->PushClientAttrib = fn)
-#define CALL_BlendColor(disp, parameters) (*((disp)->BlendColor)) parameters
-#define GET_BlendColor(disp) ((disp)->BlendColor)
-#define SET_BlendColor(disp, fn) ((disp)->BlendColor = fn)
-#define CALL_BlendEquation(disp, parameters) (*((disp)->BlendEquation)) parameters
-#define GET_BlendEquation(disp) ((disp)->BlendEquation)
-#define SET_BlendEquation(disp, fn) ((disp)->BlendEquation = fn)
-#define CALL_DrawRangeElements(disp, parameters) (*((disp)->DrawRangeElements)) parameters
-#define GET_DrawRangeElements(disp) ((disp)->DrawRangeElements)
-#define SET_DrawRangeElements(disp, fn) ((disp)->DrawRangeElements = fn)
-#define CALL_ColorTable(disp, parameters) (*((disp)->ColorTable)) parameters
-#define GET_ColorTable(disp) ((disp)->ColorTable)
-#define SET_ColorTable(disp, fn) ((disp)->ColorTable = fn)
-#define CALL_ColorTableParameterfv(disp, parameters) (*((disp)->ColorTableParameterfv)) parameters
-#define GET_ColorTableParameterfv(disp) ((disp)->ColorTableParameterfv)
-#define SET_ColorTableParameterfv(disp, fn) ((disp)->ColorTableParameterfv = fn)
-#define CALL_ColorTableParameteriv(disp, parameters) (*((disp)->ColorTableParameteriv)) parameters
-#define GET_ColorTableParameteriv(disp) ((disp)->ColorTableParameteriv)
-#define SET_ColorTableParameteriv(disp, fn) ((disp)->ColorTableParameteriv = fn)
-#define CALL_CopyColorTable(disp, parameters) (*((disp)->CopyColorTable)) parameters
-#define GET_CopyColorTable(disp) ((disp)->CopyColorTable)
-#define SET_CopyColorTable(disp, fn) ((disp)->CopyColorTable = fn)
-#define CALL_GetColorTable(disp, parameters) (*((disp)->GetColorTable)) parameters
-#define GET_GetColorTable(disp) ((disp)->GetColorTable)
-#define SET_GetColorTable(disp, fn) ((disp)->GetColorTable = fn)
-#define CALL_GetColorTableParameterfv(disp, parameters) (*((disp)->GetColorTableParameterfv)) parameters
-#define GET_GetColorTableParameterfv(disp) ((disp)->GetColorTableParameterfv)
-#define SET_GetColorTableParameterfv(disp, fn) ((disp)->GetColorTableParameterfv = fn)
-#define CALL_GetColorTableParameteriv(disp, parameters) (*((disp)->GetColorTableParameteriv)) parameters
-#define GET_GetColorTableParameteriv(disp) ((disp)->GetColorTableParameteriv)
-#define SET_GetColorTableParameteriv(disp, fn) ((disp)->GetColorTableParameteriv = fn)
-#define CALL_ColorSubTable(disp, parameters) (*((disp)->ColorSubTable)) parameters
-#define GET_ColorSubTable(disp) ((disp)->ColorSubTable)
-#define SET_ColorSubTable(disp, fn) ((disp)->ColorSubTable = fn)
-#define CALL_CopyColorSubTable(disp, parameters) (*((disp)->CopyColorSubTable)) parameters
-#define GET_CopyColorSubTable(disp) ((disp)->CopyColorSubTable)
-#define SET_CopyColorSubTable(disp, fn) ((disp)->CopyColorSubTable = fn)
-#define CALL_ConvolutionFilter1D(disp, parameters) (*((disp)->ConvolutionFilter1D)) parameters
-#define GET_ConvolutionFilter1D(disp) ((disp)->ConvolutionFilter1D)
-#define SET_ConvolutionFilter1D(disp, fn) ((disp)->ConvolutionFilter1D = fn)
-#define CALL_ConvolutionFilter2D(disp, parameters) (*((disp)->ConvolutionFilter2D)) parameters
-#define GET_ConvolutionFilter2D(disp) ((disp)->ConvolutionFilter2D)
-#define SET_ConvolutionFilter2D(disp, fn) ((disp)->ConvolutionFilter2D = fn)
-#define CALL_ConvolutionParameterf(disp, parameters) (*((disp)->ConvolutionParameterf)) parameters
-#define GET_ConvolutionParameterf(disp) ((disp)->ConvolutionParameterf)
-#define SET_ConvolutionParameterf(disp, fn) ((disp)->ConvolutionParameterf = fn)
-#define CALL_ConvolutionParameterfv(disp, parameters) (*((disp)->ConvolutionParameterfv)) parameters
-#define GET_ConvolutionParameterfv(disp) ((disp)->ConvolutionParameterfv)
-#define SET_ConvolutionParameterfv(disp, fn) ((disp)->ConvolutionParameterfv = fn)
-#define CALL_ConvolutionParameteri(disp, parameters) (*((disp)->ConvolutionParameteri)) parameters
-#define GET_ConvolutionParameteri(disp) ((disp)->ConvolutionParameteri)
-#define SET_ConvolutionParameteri(disp, fn) ((disp)->ConvolutionParameteri = fn)
-#define CALL_ConvolutionParameteriv(disp, parameters) (*((disp)->ConvolutionParameteriv)) parameters
-#define GET_ConvolutionParameteriv(disp) ((disp)->ConvolutionParameteriv)
-#define SET_ConvolutionParameteriv(disp, fn) ((disp)->ConvolutionParameteriv = fn)
-#define CALL_CopyConvolutionFilter1D(disp, parameters) (*((disp)->CopyConvolutionFilter1D)) parameters
-#define GET_CopyConvolutionFilter1D(disp) ((disp)->CopyConvolutionFilter1D)
-#define SET_CopyConvolutionFilter1D(disp, fn) ((disp)->CopyConvolutionFilter1D = fn)
-#define CALL_CopyConvolutionFilter2D(disp, parameters) (*((disp)->CopyConvolutionFilter2D)) parameters
-#define GET_CopyConvolutionFilter2D(disp) ((disp)->CopyConvolutionFilter2D)
-#define SET_CopyConvolutionFilter2D(disp, fn) ((disp)->CopyConvolutionFilter2D = fn)
-#define CALL_GetConvolutionFilter(disp, parameters) (*((disp)->GetConvolutionFilter)) parameters
-#define GET_GetConvolutionFilter(disp) ((disp)->GetConvolutionFilter)
-#define SET_GetConvolutionFilter(disp, fn) ((disp)->GetConvolutionFilter = fn)
-#define CALL_GetConvolutionParameterfv(disp, parameters) (*((disp)->GetConvolutionParameterfv)) parameters
-#define GET_GetConvolutionParameterfv(disp) ((disp)->GetConvolutionParameterfv)
-#define SET_GetConvolutionParameterfv(disp, fn) ((disp)->GetConvolutionParameterfv = fn)
-#define CALL_GetConvolutionParameteriv(disp, parameters) (*((disp)->GetConvolutionParameteriv)) parameters
-#define GET_GetConvolutionParameteriv(disp) ((disp)->GetConvolutionParameteriv)
-#define SET_GetConvolutionParameteriv(disp, fn) ((disp)->GetConvolutionParameteriv = fn)
-#define CALL_GetSeparableFilter(disp, parameters) (*((disp)->GetSeparableFilter)) parameters
-#define GET_GetSeparableFilter(disp) ((disp)->GetSeparableFilter)
-#define SET_GetSeparableFilter(disp, fn) ((disp)->GetSeparableFilter = fn)
-#define CALL_SeparableFilter2D(disp, parameters) (*((disp)->SeparableFilter2D)) parameters
-#define GET_SeparableFilter2D(disp) ((disp)->SeparableFilter2D)
-#define SET_SeparableFilter2D(disp, fn) ((disp)->SeparableFilter2D = fn)
-#define CALL_GetHistogram(disp, parameters) (*((disp)->GetHistogram)) parameters
-#define GET_GetHistogram(disp) ((disp)->GetHistogram)
-#define SET_GetHistogram(disp, fn) ((disp)->GetHistogram = fn)
-#define CALL_GetHistogramParameterfv(disp, parameters) (*((disp)->GetHistogramParameterfv)) parameters
-#define GET_GetHistogramParameterfv(disp) ((disp)->GetHistogramParameterfv)
-#define SET_GetHistogramParameterfv(disp, fn) ((disp)->GetHistogramParameterfv = fn)
-#define CALL_GetHistogramParameteriv(disp, parameters) (*((disp)->GetHistogramParameteriv)) parameters
-#define GET_GetHistogramParameteriv(disp) ((disp)->GetHistogramParameteriv)
-#define SET_GetHistogramParameteriv(disp, fn) ((disp)->GetHistogramParameteriv = fn)
-#define CALL_GetMinmax(disp, parameters) (*((disp)->GetMinmax)) parameters
-#define GET_GetMinmax(disp) ((disp)->GetMinmax)
-#define SET_GetMinmax(disp, fn) ((disp)->GetMinmax = fn)
-#define CALL_GetMinmaxParameterfv(disp, parameters) (*((disp)->GetMinmaxParameterfv)) parameters
-#define GET_GetMinmaxParameterfv(disp) ((disp)->GetMinmaxParameterfv)
-#define SET_GetMinmaxParameterfv(disp, fn) ((disp)->GetMinmaxParameterfv = fn)
-#define CALL_GetMinmaxParameteriv(disp, parameters) (*((disp)->GetMinmaxParameteriv)) parameters
-#define GET_GetMinmaxParameteriv(disp) ((disp)->GetMinmaxParameteriv)
-#define SET_GetMinmaxParameteriv(disp, fn) ((disp)->GetMinmaxParameteriv = fn)
-#define CALL_Histogram(disp, parameters) (*((disp)->Histogram)) parameters
-#define GET_Histogram(disp) ((disp)->Histogram)
-#define SET_Histogram(disp, fn) ((disp)->Histogram = fn)
-#define CALL_Minmax(disp, parameters) (*((disp)->Minmax)) parameters
-#define GET_Minmax(disp) ((disp)->Minmax)
-#define SET_Minmax(disp, fn) ((disp)->Minmax = fn)
-#define CALL_ResetHistogram(disp, parameters) (*((disp)->ResetHistogram)) parameters
-#define GET_ResetHistogram(disp) ((disp)->ResetHistogram)
-#define SET_ResetHistogram(disp, fn) ((disp)->ResetHistogram = fn)
-#define CALL_ResetMinmax(disp, parameters) (*((disp)->ResetMinmax)) parameters
-#define GET_ResetMinmax(disp) ((disp)->ResetMinmax)
-#define SET_ResetMinmax(disp, fn) ((disp)->ResetMinmax = fn)
-#define CALL_TexImage3D(disp, parameters) (*((disp)->TexImage3D)) parameters
-#define GET_TexImage3D(disp) ((disp)->TexImage3D)
-#define SET_TexImage3D(disp, fn) ((disp)->TexImage3D = fn)
-#define CALL_TexSubImage3D(disp, parameters) (*((disp)->TexSubImage3D)) parameters
-#define GET_TexSubImage3D(disp) ((disp)->TexSubImage3D)
-#define SET_TexSubImage3D(disp, fn) ((disp)->TexSubImage3D = fn)
-#define CALL_CopyTexSubImage3D(disp, parameters) (*((disp)->CopyTexSubImage3D)) parameters
-#define GET_CopyTexSubImage3D(disp) ((disp)->CopyTexSubImage3D)
-#define SET_CopyTexSubImage3D(disp, fn) ((disp)->CopyTexSubImage3D = fn)
-#define CALL_ActiveTextureARB(disp, parameters) (*((disp)->ActiveTextureARB)) parameters
-#define GET_ActiveTextureARB(disp) ((disp)->ActiveTextureARB)
-#define SET_ActiveTextureARB(disp, fn) ((disp)->ActiveTextureARB = fn)
-#define CALL_ClientActiveTextureARB(disp, parameters) (*((disp)->ClientActiveTextureARB)) parameters
-#define GET_ClientActiveTextureARB(disp) ((disp)->ClientActiveTextureARB)
-#define SET_ClientActiveTextureARB(disp, fn) ((disp)->ClientActiveTextureARB = fn)
-#define CALL_MultiTexCoord1dARB(disp, parameters) (*((disp)->MultiTexCoord1dARB)) parameters
-#define GET_MultiTexCoord1dARB(disp) ((disp)->MultiTexCoord1dARB)
-#define SET_MultiTexCoord1dARB(disp, fn) ((disp)->MultiTexCoord1dARB = fn)
-#define CALL_MultiTexCoord1dvARB(disp, parameters) (*((disp)->MultiTexCoord1dvARB)) parameters
-#define GET_MultiTexCoord1dvARB(disp) ((disp)->MultiTexCoord1dvARB)
-#define SET_MultiTexCoord1dvARB(disp, fn) ((disp)->MultiTexCoord1dvARB = fn)
-#define CALL_MultiTexCoord1fARB(disp, parameters) (*((disp)->MultiTexCoord1fARB)) parameters
-#define GET_MultiTexCoord1fARB(disp) ((disp)->MultiTexCoord1fARB)
-#define SET_MultiTexCoord1fARB(disp, fn) ((disp)->MultiTexCoord1fARB = fn)
-#define CALL_MultiTexCoord1fvARB(disp, parameters) (*((disp)->MultiTexCoord1fvARB)) parameters
-#define GET_MultiTexCoord1fvARB(disp) ((disp)->MultiTexCoord1fvARB)
-#define SET_MultiTexCoord1fvARB(disp, fn) ((disp)->MultiTexCoord1fvARB = fn)
-#define CALL_MultiTexCoord1iARB(disp, parameters) (*((disp)->MultiTexCoord1iARB)) parameters
-#define GET_MultiTexCoord1iARB(disp) ((disp)->MultiTexCoord1iARB)
-#define SET_MultiTexCoord1iARB(disp, fn) ((disp)->MultiTexCoord1iARB = fn)
-#define CALL_MultiTexCoord1ivARB(disp, parameters) (*((disp)->MultiTexCoord1ivARB)) parameters
-#define GET_MultiTexCoord1ivARB(disp) ((disp)->MultiTexCoord1ivARB)
-#define SET_MultiTexCoord1ivARB(disp, fn) ((disp)->MultiTexCoord1ivARB = fn)
-#define CALL_MultiTexCoord1sARB(disp, parameters) (*((disp)->MultiTexCoord1sARB)) parameters
-#define GET_MultiTexCoord1sARB(disp) ((disp)->MultiTexCoord1sARB)
-#define SET_MultiTexCoord1sARB(disp, fn) ((disp)->MultiTexCoord1sARB = fn)
-#define CALL_MultiTexCoord1svARB(disp, parameters) (*((disp)->MultiTexCoord1svARB)) parameters
-#define GET_MultiTexCoord1svARB(disp) ((disp)->MultiTexCoord1svARB)
-#define SET_MultiTexCoord1svARB(disp, fn) ((disp)->MultiTexCoord1svARB = fn)
-#define CALL_MultiTexCoord2dARB(disp, parameters) (*((disp)->MultiTexCoord2dARB)) parameters
-#define GET_MultiTexCoord2dARB(disp) ((disp)->MultiTexCoord2dARB)
-#define SET_MultiTexCoord2dARB(disp, fn) ((disp)->MultiTexCoord2dARB = fn)
-#define CALL_MultiTexCoord2dvARB(disp, parameters) (*((disp)->MultiTexCoord2dvARB)) parameters
-#define GET_MultiTexCoord2dvARB(disp) ((disp)->MultiTexCoord2dvARB)
-#define SET_MultiTexCoord2dvARB(disp, fn) ((disp)->MultiTexCoord2dvARB = fn)
-#define CALL_MultiTexCoord2fARB(disp, parameters) (*((disp)->MultiTexCoord2fARB)) parameters
-#define GET_MultiTexCoord2fARB(disp) ((disp)->MultiTexCoord2fARB)
-#define SET_MultiTexCoord2fARB(disp, fn) ((disp)->MultiTexCoord2fARB = fn)
-#define CALL_MultiTexCoord2fvARB(disp, parameters) (*((disp)->MultiTexCoord2fvARB)) parameters
-#define GET_MultiTexCoord2fvARB(disp) ((disp)->MultiTexCoord2fvARB)
-#define SET_MultiTexCoord2fvARB(disp, fn) ((disp)->MultiTexCoord2fvARB = fn)
-#define CALL_MultiTexCoord2iARB(disp, parameters) (*((disp)->MultiTexCoord2iARB)) parameters
-#define GET_MultiTexCoord2iARB(disp) ((disp)->MultiTexCoord2iARB)
-#define SET_MultiTexCoord2iARB(disp, fn) ((disp)->MultiTexCoord2iARB = fn)
-#define CALL_MultiTexCoord2ivARB(disp, parameters) (*((disp)->MultiTexCoord2ivARB)) parameters
-#define GET_MultiTexCoord2ivARB(disp) ((disp)->MultiTexCoord2ivARB)
-#define SET_MultiTexCoord2ivARB(disp, fn) ((disp)->MultiTexCoord2ivARB = fn)
-#define CALL_MultiTexCoord2sARB(disp, parameters) (*((disp)->MultiTexCoord2sARB)) parameters
-#define GET_MultiTexCoord2sARB(disp) ((disp)->MultiTexCoord2sARB)
-#define SET_MultiTexCoord2sARB(disp, fn) ((disp)->MultiTexCoord2sARB = fn)
-#define CALL_MultiTexCoord2svARB(disp, parameters) (*((disp)->MultiTexCoord2svARB)) parameters
-#define GET_MultiTexCoord2svARB(disp) ((disp)->MultiTexCoord2svARB)
-#define SET_MultiTexCoord2svARB(disp, fn) ((disp)->MultiTexCoord2svARB = fn)
-#define CALL_MultiTexCoord3dARB(disp, parameters) (*((disp)->MultiTexCoord3dARB)) parameters
-#define GET_MultiTexCoord3dARB(disp) ((disp)->MultiTexCoord3dARB)
-#define SET_MultiTexCoord3dARB(disp, fn) ((disp)->MultiTexCoord3dARB = fn)
-#define CALL_MultiTexCoord3dvARB(disp, parameters) (*((disp)->MultiTexCoord3dvARB)) parameters
-#define GET_MultiTexCoord3dvARB(disp) ((disp)->MultiTexCoord3dvARB)
-#define SET_MultiTexCoord3dvARB(disp, fn) ((disp)->MultiTexCoord3dvARB = fn)
-#define CALL_MultiTexCoord3fARB(disp, parameters) (*((disp)->MultiTexCoord3fARB)) parameters
-#define GET_MultiTexCoord3fARB(disp) ((disp)->MultiTexCoord3fARB)
-#define SET_MultiTexCoord3fARB(disp, fn) ((disp)->MultiTexCoord3fARB = fn)
-#define CALL_MultiTexCoord3fvARB(disp, parameters) (*((disp)->MultiTexCoord3fvARB)) parameters
-#define GET_MultiTexCoord3fvARB(disp) ((disp)->MultiTexCoord3fvARB)
-#define SET_MultiTexCoord3fvARB(disp, fn) ((disp)->MultiTexCoord3fvARB = fn)
-#define CALL_MultiTexCoord3iARB(disp, parameters) (*((disp)->MultiTexCoord3iARB)) parameters
-#define GET_MultiTexCoord3iARB(disp) ((disp)->MultiTexCoord3iARB)
-#define SET_MultiTexCoord3iARB(disp, fn) ((disp)->MultiTexCoord3iARB = fn)
-#define CALL_MultiTexCoord3ivARB(disp, parameters) (*((disp)->MultiTexCoord3ivARB)) parameters
-#define GET_MultiTexCoord3ivARB(disp) ((disp)->MultiTexCoord3ivARB)
-#define SET_MultiTexCoord3ivARB(disp, fn) ((disp)->MultiTexCoord3ivARB = fn)
-#define CALL_MultiTexCoord3sARB(disp, parameters) (*((disp)->MultiTexCoord3sARB)) parameters
-#define GET_MultiTexCoord3sARB(disp) ((disp)->MultiTexCoord3sARB)
-#define SET_MultiTexCoord3sARB(disp, fn) ((disp)->MultiTexCoord3sARB = fn)
-#define CALL_MultiTexCoord3svARB(disp, parameters) (*((disp)->MultiTexCoord3svARB)) parameters
-#define GET_MultiTexCoord3svARB(disp) ((disp)->MultiTexCoord3svARB)
-#define SET_MultiTexCoord3svARB(disp, fn) ((disp)->MultiTexCoord3svARB = fn)
-#define CALL_MultiTexCoord4dARB(disp, parameters) (*((disp)->MultiTexCoord4dARB)) parameters
-#define GET_MultiTexCoord4dARB(disp) ((disp)->MultiTexCoord4dARB)
-#define SET_MultiTexCoord4dARB(disp, fn) ((disp)->MultiTexCoord4dARB = fn)
-#define CALL_MultiTexCoord4dvARB(disp, parameters) (*((disp)->MultiTexCoord4dvARB)) parameters
-#define GET_MultiTexCoord4dvARB(disp) ((disp)->MultiTexCoord4dvARB)
-#define SET_MultiTexCoord4dvARB(disp, fn) ((disp)->MultiTexCoord4dvARB = fn)
-#define CALL_MultiTexCoord4fARB(disp, parameters) (*((disp)->MultiTexCoord4fARB)) parameters
-#define GET_MultiTexCoord4fARB(disp) ((disp)->MultiTexCoord4fARB)
-#define SET_MultiTexCoord4fARB(disp, fn) ((disp)->MultiTexCoord4fARB = fn)
-#define CALL_MultiTexCoord4fvARB(disp, parameters) (*((disp)->MultiTexCoord4fvARB)) parameters
-#define GET_MultiTexCoord4fvARB(disp) ((disp)->MultiTexCoord4fvARB)
-#define SET_MultiTexCoord4fvARB(disp, fn) ((disp)->MultiTexCoord4fvARB = fn)
-#define CALL_MultiTexCoord4iARB(disp, parameters) (*((disp)->MultiTexCoord4iARB)) parameters
-#define GET_MultiTexCoord4iARB(disp) ((disp)->MultiTexCoord4iARB)
-#define SET_MultiTexCoord4iARB(disp, fn) ((disp)->MultiTexCoord4iARB = fn)
-#define CALL_MultiTexCoord4ivARB(disp, parameters) (*((disp)->MultiTexCoord4ivARB)) parameters
-#define GET_MultiTexCoord4ivARB(disp) ((disp)->MultiTexCoord4ivARB)
-#define SET_MultiTexCoord4ivARB(disp, fn) ((disp)->MultiTexCoord4ivARB = fn)
-#define CALL_MultiTexCoord4sARB(disp, parameters) (*((disp)->MultiTexCoord4sARB)) parameters
-#define GET_MultiTexCoord4sARB(disp) ((disp)->MultiTexCoord4sARB)
-#define SET_MultiTexCoord4sARB(disp, fn) ((disp)->MultiTexCoord4sARB = fn)
-#define CALL_MultiTexCoord4svARB(disp, parameters) (*((disp)->MultiTexCoord4svARB)) parameters
-#define GET_MultiTexCoord4svARB(disp) ((disp)->MultiTexCoord4svARB)
-#define SET_MultiTexCoord4svARB(disp, fn) ((disp)->MultiTexCoord4svARB = fn)
+/* total number of offsets below */
+#define _gloffset_COUNT 892
-#if !defined(IN_DRI_DRIVER)
+#define _gloffset_NewList 0
+#define _gloffset_EndList 1
+#define _gloffset_CallList 2
+#define _gloffset_CallLists 3
+#define _gloffset_DeleteLists 4
+#define _gloffset_GenLists 5
+#define _gloffset_ListBase 6
+#define _gloffset_Begin 7
+#define _gloffset_Bitmap 8
+#define _gloffset_Color3b 9
+#define _gloffset_Color3bv 10
+#define _gloffset_Color3d 11
+#define _gloffset_Color3dv 12
+#define _gloffset_Color3f 13
+#define _gloffset_Color3fv 14
+#define _gloffset_Color3i 15
+#define _gloffset_Color3iv 16
+#define _gloffset_Color3s 17
+#define _gloffset_Color3sv 18
+#define _gloffset_Color3ub 19
+#define _gloffset_Color3ubv 20
+#define _gloffset_Color3ui 21
+#define _gloffset_Color3uiv 22
+#define _gloffset_Color3us 23
+#define _gloffset_Color3usv 24
+#define _gloffset_Color4b 25
+#define _gloffset_Color4bv 26
+#define _gloffset_Color4d 27
+#define _gloffset_Color4dv 28
+#define _gloffset_Color4f 29
+#define _gloffset_Color4fv 30
+#define _gloffset_Color4i 31
+#define _gloffset_Color4iv 32
+#define _gloffset_Color4s 33
+#define _gloffset_Color4sv 34
+#define _gloffset_Color4ub 35
+#define _gloffset_Color4ubv 36
+#define _gloffset_Color4ui 37
+#define _gloffset_Color4uiv 38
+#define _gloffset_Color4us 39
+#define _gloffset_Color4usv 40
+#define _gloffset_EdgeFlag 41
+#define _gloffset_EdgeFlagv 42
+#define _gloffset_End 43
+#define _gloffset_Indexd 44
+#define _gloffset_Indexdv 45
+#define _gloffset_Indexf 46
+#define _gloffset_Indexfv 47
+#define _gloffset_Indexi 48
+#define _gloffset_Indexiv 49
+#define _gloffset_Indexs 50
+#define _gloffset_Indexsv 51
+#define _gloffset_Normal3b 52
+#define _gloffset_Normal3bv 53
+#define _gloffset_Normal3d 54
+#define _gloffset_Normal3dv 55
+#define _gloffset_Normal3f 56
+#define _gloffset_Normal3fv 57
+#define _gloffset_Normal3i 58
+#define _gloffset_Normal3iv 59
+#define _gloffset_Normal3s 60
+#define _gloffset_Normal3sv 61
+#define _gloffset_RasterPos2d 62
+#define _gloffset_RasterPos2dv 63
+#define _gloffset_RasterPos2f 64
+#define _gloffset_RasterPos2fv 65
+#define _gloffset_RasterPos2i 66
+#define _gloffset_RasterPos2iv 67
+#define _gloffset_RasterPos2s 68
+#define _gloffset_RasterPos2sv 69
+#define _gloffset_RasterPos3d 70
+#define _gloffset_RasterPos3dv 71
+#define _gloffset_RasterPos3f 72
+#define _gloffset_RasterPos3fv 73
+#define _gloffset_RasterPos3i 74
+#define _gloffset_RasterPos3iv 75
+#define _gloffset_RasterPos3s 76
+#define _gloffset_RasterPos3sv 77
+#define _gloffset_RasterPos4d 78
+#define _gloffset_RasterPos4dv 79
+#define _gloffset_RasterPos4f 80
+#define _gloffset_RasterPos4fv 81
+#define _gloffset_RasterPos4i 82
+#define _gloffset_RasterPos4iv 83
+#define _gloffset_RasterPos4s 84
+#define _gloffset_RasterPos4sv 85
+#define _gloffset_Rectd 86
+#define _gloffset_Rectdv 87
+#define _gloffset_Rectf 88
+#define _gloffset_Rectfv 89
+#define _gloffset_Recti 90
+#define _gloffset_Rectiv 91
+#define _gloffset_Rects 92
+#define _gloffset_Rectsv 93
+#define _gloffset_TexCoord1d 94
+#define _gloffset_TexCoord1dv 95
+#define _gloffset_TexCoord1f 96
+#define _gloffset_TexCoord1fv 97
+#define _gloffset_TexCoord1i 98
+#define _gloffset_TexCoord1iv 99
+#define _gloffset_TexCoord1s 100
+#define _gloffset_TexCoord1sv 101
+#define _gloffset_TexCoord2d 102
+#define _gloffset_TexCoord2dv 103
+#define _gloffset_TexCoord2f 104
+#define _gloffset_TexCoord2fv 105
+#define _gloffset_TexCoord2i 106
+#define _gloffset_TexCoord2iv 107
+#define _gloffset_TexCoord2s 108
+#define _gloffset_TexCoord2sv 109
+#define _gloffset_TexCoord3d 110
+#define _gloffset_TexCoord3dv 111
+#define _gloffset_TexCoord3f 112
+#define _gloffset_TexCoord3fv 113
+#define _gloffset_TexCoord3i 114
+#define _gloffset_TexCoord3iv 115
+#define _gloffset_TexCoord3s 116
+#define _gloffset_TexCoord3sv 117
+#define _gloffset_TexCoord4d 118
+#define _gloffset_TexCoord4dv 119
+#define _gloffset_TexCoord4f 120
+#define _gloffset_TexCoord4fv 121
+#define _gloffset_TexCoord4i 122
+#define _gloffset_TexCoord4iv 123
+#define _gloffset_TexCoord4s 124
+#define _gloffset_TexCoord4sv 125
+#define _gloffset_Vertex2d 126
+#define _gloffset_Vertex2dv 127
+#define _gloffset_Vertex2f 128
+#define _gloffset_Vertex2fv 129
+#define _gloffset_Vertex2i 130
+#define _gloffset_Vertex2iv 131
+#define _gloffset_Vertex2s 132
+#define _gloffset_Vertex2sv 133
+#define _gloffset_Vertex3d 134
+#define _gloffset_Vertex3dv 135
+#define _gloffset_Vertex3f 136
+#define _gloffset_Vertex3fv 137
+#define _gloffset_Vertex3i 138
+#define _gloffset_Vertex3iv 139
+#define _gloffset_Vertex3s 140
+#define _gloffset_Vertex3sv 141
+#define _gloffset_Vertex4d 142
+#define _gloffset_Vertex4dv 143
+#define _gloffset_Vertex4f 144
+#define _gloffset_Vertex4fv 145
+#define _gloffset_Vertex4i 146
+#define _gloffset_Vertex4iv 147
+#define _gloffset_Vertex4s 148
+#define _gloffset_Vertex4sv 149
+#define _gloffset_ClipPlane 150
+#define _gloffset_ColorMaterial 151
+#define _gloffset_CullFace 152
+#define _gloffset_Fogf 153
+#define _gloffset_Fogfv 154
+#define _gloffset_Fogi 155
+#define _gloffset_Fogiv 156
+#define _gloffset_FrontFace 157
+#define _gloffset_Hint 158
+#define _gloffset_Lightf 159
+#define _gloffset_Lightfv 160
+#define _gloffset_Lighti 161
+#define _gloffset_Lightiv 162
+#define _gloffset_LightModelf 163
+#define _gloffset_LightModelfv 164
+#define _gloffset_LightModeli 165
+#define _gloffset_LightModeliv 166
+#define _gloffset_LineStipple 167
+#define _gloffset_LineWidth 168
+#define _gloffset_Materialf 169
+#define _gloffset_Materialfv 170
+#define _gloffset_Materiali 171
+#define _gloffset_Materialiv 172
+#define _gloffset_PointSize 173
+#define _gloffset_PolygonMode 174
+#define _gloffset_PolygonStipple 175
+#define _gloffset_Scissor 176
+#define _gloffset_ShadeModel 177
+#define _gloffset_TexParameterf 178
+#define _gloffset_TexParameterfv 179
+#define _gloffset_TexParameteri 180
+#define _gloffset_TexParameteriv 181
+#define _gloffset_TexImage1D 182
+#define _gloffset_TexImage2D 183
+#define _gloffset_TexEnvf 184
+#define _gloffset_TexEnvfv 185
+#define _gloffset_TexEnvi 186
+#define _gloffset_TexEnviv 187
+#define _gloffset_TexGend 188
+#define _gloffset_TexGendv 189
+#define _gloffset_TexGenf 190
+#define _gloffset_TexGenfv 191
+#define _gloffset_TexGeni 192
+#define _gloffset_TexGeniv 193
+#define _gloffset_FeedbackBuffer 194
+#define _gloffset_SelectBuffer 195
+#define _gloffset_RenderMode 196
+#define _gloffset_InitNames 197
+#define _gloffset_LoadName 198
+#define _gloffset_PassThrough 199
+#define _gloffset_PopName 200
+#define _gloffset_PushName 201
+#define _gloffset_DrawBuffer 202
+#define _gloffset_Clear 203
+#define _gloffset_ClearAccum 204
+#define _gloffset_ClearIndex 205
+#define _gloffset_ClearColor 206
+#define _gloffset_ClearStencil 207
+#define _gloffset_ClearDepth 208
+#define _gloffset_StencilMask 209
+#define _gloffset_ColorMask 210
+#define _gloffset_DepthMask 211
+#define _gloffset_IndexMask 212
+#define _gloffset_Accum 213
+#define _gloffset_Disable 214
+#define _gloffset_Enable 215
+#define _gloffset_Finish 216
+#define _gloffset_Flush 217
+#define _gloffset_PopAttrib 218
+#define _gloffset_PushAttrib 219
+#define _gloffset_Map1d 220
+#define _gloffset_Map1f 221
+#define _gloffset_Map2d 222
+#define _gloffset_Map2f 223
+#define _gloffset_MapGrid1d 224
+#define _gloffset_MapGrid1f 225
+#define _gloffset_MapGrid2d 226
+#define _gloffset_MapGrid2f 227
+#define _gloffset_EvalCoord1d 228
+#define _gloffset_EvalCoord1dv 229
+#define _gloffset_EvalCoord1f 230
+#define _gloffset_EvalCoord1fv 231
+#define _gloffset_EvalCoord2d 232
+#define _gloffset_EvalCoord2dv 233
+#define _gloffset_EvalCoord2f 234
+#define _gloffset_EvalCoord2fv 235
+#define _gloffset_EvalMesh1 236
+#define _gloffset_EvalPoint1 237
+#define _gloffset_EvalMesh2 238
+#define _gloffset_EvalPoint2 239
+#define _gloffset_AlphaFunc 240
+#define _gloffset_BlendFunc 241
+#define _gloffset_LogicOp 242
+#define _gloffset_StencilFunc 243
+#define _gloffset_StencilOp 244
+#define _gloffset_DepthFunc 245
+#define _gloffset_PixelZoom 246
+#define _gloffset_PixelTransferf 247
+#define _gloffset_PixelTransferi 248
+#define _gloffset_PixelStoref 249
+#define _gloffset_PixelStorei 250
+#define _gloffset_PixelMapfv 251
+#define _gloffset_PixelMapuiv 252
+#define _gloffset_PixelMapusv 253
+#define _gloffset_ReadBuffer 254
+#define _gloffset_CopyPixels 255
+#define _gloffset_ReadPixels 256
+#define _gloffset_DrawPixels 257
+#define _gloffset_GetBooleanv 258
+#define _gloffset_GetClipPlane 259
+#define _gloffset_GetDoublev 260
+#define _gloffset_GetError 261
+#define _gloffset_GetFloatv 262
+#define _gloffset_GetIntegerv 263
+#define _gloffset_GetLightfv 264
+#define _gloffset_GetLightiv 265
+#define _gloffset_GetMapdv 266
+#define _gloffset_GetMapfv 267
+#define _gloffset_GetMapiv 268
+#define _gloffset_GetMaterialfv 269
+#define _gloffset_GetMaterialiv 270
+#define _gloffset_GetPixelMapfv 271
+#define _gloffset_GetPixelMapuiv 272
+#define _gloffset_GetPixelMapusv 273
+#define _gloffset_GetPolygonStipple 274
+#define _gloffset_GetString 275
+#define _gloffset_GetTexEnvfv 276
+#define _gloffset_GetTexEnviv 277
+#define _gloffset_GetTexGendv 278
+#define _gloffset_GetTexGenfv 279
+#define _gloffset_GetTexGeniv 280
+#define _gloffset_GetTexImage 281
+#define _gloffset_GetTexParameterfv 282
+#define _gloffset_GetTexParameteriv 283
+#define _gloffset_GetTexLevelParameterfv 284
+#define _gloffset_GetTexLevelParameteriv 285
+#define _gloffset_IsEnabled 286
+#define _gloffset_IsList 287
+#define _gloffset_DepthRange 288
+#define _gloffset_Frustum 289
+#define _gloffset_LoadIdentity 290
+#define _gloffset_LoadMatrixf 291
+#define _gloffset_LoadMatrixd 292
+#define _gloffset_MatrixMode 293
+#define _gloffset_MultMatrixf 294
+#define _gloffset_MultMatrixd 295
+#define _gloffset_Ortho 296
+#define _gloffset_PopMatrix 297
+#define _gloffset_PushMatrix 298
+#define _gloffset_Rotated 299
+#define _gloffset_Rotatef 300
+#define _gloffset_Scaled 301
+#define _gloffset_Scalef 302
+#define _gloffset_Translated 303
+#define _gloffset_Translatef 304
+#define _gloffset_Viewport 305
+#define _gloffset_ArrayElement 306
+#define _gloffset_BindTexture 307
+#define _gloffset_ColorPointer 308
+#define _gloffset_DisableClientState 309
+#define _gloffset_DrawArrays 310
+#define _gloffset_DrawElements 311
+#define _gloffset_EdgeFlagPointer 312
+#define _gloffset_EnableClientState 313
+#define _gloffset_IndexPointer 314
+#define _gloffset_Indexub 315
+#define _gloffset_Indexubv 316
+#define _gloffset_InterleavedArrays 317
+#define _gloffset_NormalPointer 318
+#define _gloffset_PolygonOffset 319
+#define _gloffset_TexCoordPointer 320
+#define _gloffset_VertexPointer 321
+#define _gloffset_AreTexturesResident 322
+#define _gloffset_CopyTexImage1D 323
+#define _gloffset_CopyTexImage2D 324
+#define _gloffset_CopyTexSubImage1D 325
+#define _gloffset_CopyTexSubImage2D 326
+#define _gloffset_DeleteTextures 327
+#define _gloffset_GenTextures 328
+#define _gloffset_GetPointerv 329
+#define _gloffset_IsTexture 330
+#define _gloffset_PrioritizeTextures 331
+#define _gloffset_TexSubImage1D 332
+#define _gloffset_TexSubImage2D 333
+#define _gloffset_PopClientAttrib 334
+#define _gloffset_PushClientAttrib 335
+#define _gloffset_BlendColor 336
+#define _gloffset_BlendEquation 337
+#define _gloffset_DrawRangeElements 338
+#define _gloffset_ColorTable 339
+#define _gloffset_ColorTableParameterfv 340
+#define _gloffset_ColorTableParameteriv 341
+#define _gloffset_CopyColorTable 342
+#define _gloffset_GetColorTable 343
+#define _gloffset_GetColorTableParameterfv 344
+#define _gloffset_GetColorTableParameteriv 345
+#define _gloffset_ColorSubTable 346
+#define _gloffset_CopyColorSubTable 347
+#define _gloffset_ConvolutionFilter1D 348
+#define _gloffset_ConvolutionFilter2D 349
+#define _gloffset_ConvolutionParameterf 350
+#define _gloffset_ConvolutionParameterfv 351
+#define _gloffset_ConvolutionParameteri 352
+#define _gloffset_ConvolutionParameteriv 353
+#define _gloffset_CopyConvolutionFilter1D 354
+#define _gloffset_CopyConvolutionFilter2D 355
+#define _gloffset_GetConvolutionFilter 356
+#define _gloffset_GetConvolutionParameterfv 357
+#define _gloffset_GetConvolutionParameteriv 358
+#define _gloffset_GetSeparableFilter 359
+#define _gloffset_SeparableFilter2D 360
+#define _gloffset_GetHistogram 361
+#define _gloffset_GetHistogramParameterfv 362
+#define _gloffset_GetHistogramParameteriv 363
+#define _gloffset_GetMinmax 364
+#define _gloffset_GetMinmaxParameterfv 365
+#define _gloffset_GetMinmaxParameteriv 366
+#define _gloffset_Histogram 367
+#define _gloffset_Minmax 368
+#define _gloffset_ResetHistogram 369
+#define _gloffset_ResetMinmax 370
+#define _gloffset_TexImage3D 371
+#define _gloffset_TexSubImage3D 372
+#define _gloffset_CopyTexSubImage3D 373
+#define _gloffset_ActiveTextureARB 374
+#define _gloffset_ClientActiveTextureARB 375
+#define _gloffset_MultiTexCoord1dARB 376
+#define _gloffset_MultiTexCoord1dvARB 377
+#define _gloffset_MultiTexCoord1fARB 378
+#define _gloffset_MultiTexCoord1fvARB 379
+#define _gloffset_MultiTexCoord1iARB 380
+#define _gloffset_MultiTexCoord1ivARB 381
+#define _gloffset_MultiTexCoord1sARB 382
+#define _gloffset_MultiTexCoord1svARB 383
+#define _gloffset_MultiTexCoord2dARB 384
+#define _gloffset_MultiTexCoord2dvARB 385
+#define _gloffset_MultiTexCoord2fARB 386
+#define _gloffset_MultiTexCoord2fvARB 387
+#define _gloffset_MultiTexCoord2iARB 388
+#define _gloffset_MultiTexCoord2ivARB 389
+#define _gloffset_MultiTexCoord2sARB 390
+#define _gloffset_MultiTexCoord2svARB 391
+#define _gloffset_MultiTexCoord3dARB 392
+#define _gloffset_MultiTexCoord3dvARB 393
+#define _gloffset_MultiTexCoord3fARB 394
+#define _gloffset_MultiTexCoord3fvARB 395
+#define _gloffset_MultiTexCoord3iARB 396
+#define _gloffset_MultiTexCoord3ivARB 397
+#define _gloffset_MultiTexCoord3sARB 398
+#define _gloffset_MultiTexCoord3svARB 399
+#define _gloffset_MultiTexCoord4dARB 400
+#define _gloffset_MultiTexCoord4dvARB 401
+#define _gloffset_MultiTexCoord4fARB 402
+#define _gloffset_MultiTexCoord4fvARB 403
+#define _gloffset_MultiTexCoord4iARB 404
+#define _gloffset_MultiTexCoord4ivARB 405
+#define _gloffset_MultiTexCoord4sARB 406
+#define _gloffset_MultiTexCoord4svARB 407
-#define CALL_AttachShader(disp, parameters) (*((disp)->AttachShader)) parameters
-#define GET_AttachShader(disp) ((disp)->AttachShader)
-#define SET_AttachShader(disp, fn) ((disp)->AttachShader = fn)
-#define CALL_CreateProgram(disp, parameters) (*((disp)->CreateProgram)) parameters
-#define GET_CreateProgram(disp) ((disp)->CreateProgram)
-#define SET_CreateProgram(disp, fn) ((disp)->CreateProgram = fn)
-#define CALL_CreateShader(disp, parameters) (*((disp)->CreateShader)) parameters
-#define GET_CreateShader(disp) ((disp)->CreateShader)
-#define SET_CreateShader(disp, fn) ((disp)->CreateShader = fn)
-#define CALL_DeleteProgram(disp, parameters) (*((disp)->DeleteProgram)) parameters
-#define GET_DeleteProgram(disp) ((disp)->DeleteProgram)
-#define SET_DeleteProgram(disp, fn) ((disp)->DeleteProgram = fn)
-#define CALL_DeleteShader(disp, parameters) (*((disp)->DeleteShader)) parameters
-#define GET_DeleteShader(disp) ((disp)->DeleteShader)
-#define SET_DeleteShader(disp, fn) ((disp)->DeleteShader = fn)
-#define CALL_DetachShader(disp, parameters) (*((disp)->DetachShader)) parameters
-#define GET_DetachShader(disp) ((disp)->DetachShader)
-#define SET_DetachShader(disp, fn) ((disp)->DetachShader = fn)
-#define CALL_GetAttachedShaders(disp, parameters) (*((disp)->GetAttachedShaders)) parameters
-#define GET_GetAttachedShaders(disp) ((disp)->GetAttachedShaders)
-#define SET_GetAttachedShaders(disp, fn) ((disp)->GetAttachedShaders = fn)
-#define CALL_GetProgramInfoLog(disp, parameters) (*((disp)->GetProgramInfoLog)) parameters
-#define GET_GetProgramInfoLog(disp) ((disp)->GetProgramInfoLog)
-#define SET_GetProgramInfoLog(disp, fn) ((disp)->GetProgramInfoLog = fn)
-#define CALL_GetProgramiv(disp, parameters) (*((disp)->GetProgramiv)) parameters
-#define GET_GetProgramiv(disp) ((disp)->GetProgramiv)
-#define SET_GetProgramiv(disp, fn) ((disp)->GetProgramiv = fn)
-#define CALL_GetShaderInfoLog(disp, parameters) (*((disp)->GetShaderInfoLog)) parameters
-#define GET_GetShaderInfoLog(disp) ((disp)->GetShaderInfoLog)
-#define SET_GetShaderInfoLog(disp, fn) ((disp)->GetShaderInfoLog = fn)
-#define CALL_GetShaderiv(disp, parameters) (*((disp)->GetShaderiv)) parameters
-#define GET_GetShaderiv(disp) ((disp)->GetShaderiv)
-#define SET_GetShaderiv(disp, fn) ((disp)->GetShaderiv = fn)
-#define CALL_IsProgram(disp, parameters) (*((disp)->IsProgram)) parameters
-#define GET_IsProgram(disp) ((disp)->IsProgram)
-#define SET_IsProgram(disp, fn) ((disp)->IsProgram = fn)
-#define CALL_IsShader(disp, parameters) (*((disp)->IsShader)) parameters
-#define GET_IsShader(disp) ((disp)->IsShader)
-#define SET_IsShader(disp, fn) ((disp)->IsShader = fn)
-#define CALL_StencilFuncSeparate(disp, parameters) (*((disp)->StencilFuncSeparate)) parameters
-#define GET_StencilFuncSeparate(disp) ((disp)->StencilFuncSeparate)
-#define SET_StencilFuncSeparate(disp, fn) ((disp)->StencilFuncSeparate = fn)
-#define CALL_StencilMaskSeparate(disp, parameters) (*((disp)->StencilMaskSeparate)) parameters
-#define GET_StencilMaskSeparate(disp) ((disp)->StencilMaskSeparate)
-#define SET_StencilMaskSeparate(disp, fn) ((disp)->StencilMaskSeparate = fn)
-#define CALL_StencilOpSeparate(disp, parameters) (*((disp)->StencilOpSeparate)) parameters
-#define GET_StencilOpSeparate(disp) ((disp)->StencilOpSeparate)
-#define SET_StencilOpSeparate(disp, fn) ((disp)->StencilOpSeparate = fn)
-#define CALL_UniformMatrix2x3fv(disp, parameters) (*((disp)->UniformMatrix2x3fv)) parameters
-#define GET_UniformMatrix2x3fv(disp) ((disp)->UniformMatrix2x3fv)
-#define SET_UniformMatrix2x3fv(disp, fn) ((disp)->UniformMatrix2x3fv = fn)
-#define CALL_UniformMatrix2x4fv(disp, parameters) (*((disp)->UniformMatrix2x4fv)) parameters
-#define GET_UniformMatrix2x4fv(disp) ((disp)->UniformMatrix2x4fv)
-#define SET_UniformMatrix2x4fv(disp, fn) ((disp)->UniformMatrix2x4fv = fn)
-#define CALL_UniformMatrix3x2fv(disp, parameters) (*((disp)->UniformMatrix3x2fv)) parameters
-#define GET_UniformMatrix3x2fv(disp) ((disp)->UniformMatrix3x2fv)
-#define SET_UniformMatrix3x2fv(disp, fn) ((disp)->UniformMatrix3x2fv = fn)
-#define CALL_UniformMatrix3x4fv(disp, parameters) (*((disp)->UniformMatrix3x4fv)) parameters
-#define GET_UniformMatrix3x4fv(disp) ((disp)->UniformMatrix3x4fv)
-#define SET_UniformMatrix3x4fv(disp, fn) ((disp)->UniformMatrix3x4fv = fn)
-#define CALL_UniformMatrix4x2fv(disp, parameters) (*((disp)->UniformMatrix4x2fv)) parameters
-#define GET_UniformMatrix4x2fv(disp) ((disp)->UniformMatrix4x2fv)
-#define SET_UniformMatrix4x2fv(disp, fn) ((disp)->UniformMatrix4x2fv = fn)
-#define CALL_UniformMatrix4x3fv(disp, parameters) (*((disp)->UniformMatrix4x3fv)) parameters
-#define GET_UniformMatrix4x3fv(disp) ((disp)->UniformMatrix4x3fv)
-#define SET_UniformMatrix4x3fv(disp, fn) ((disp)->UniformMatrix4x3fv = fn)
-#define CALL_LoadTransposeMatrixdARB(disp, parameters) (*((disp)->LoadTransposeMatrixdARB)) parameters
-#define GET_LoadTransposeMatrixdARB(disp) ((disp)->LoadTransposeMatrixdARB)
-#define SET_LoadTransposeMatrixdARB(disp, fn) ((disp)->LoadTransposeMatrixdARB = fn)
-#define CALL_LoadTransposeMatrixfARB(disp, parameters) (*((disp)->LoadTransposeMatrixfARB)) parameters
-#define GET_LoadTransposeMatrixfARB(disp) ((disp)->LoadTransposeMatrixfARB)
-#define SET_LoadTransposeMatrixfARB(disp, fn) ((disp)->LoadTransposeMatrixfARB = fn)
-#define CALL_MultTransposeMatrixdARB(disp, parameters) (*((disp)->MultTransposeMatrixdARB)) parameters
-#define GET_MultTransposeMatrixdARB(disp) ((disp)->MultTransposeMatrixdARB)
-#define SET_MultTransposeMatrixdARB(disp, fn) ((disp)->MultTransposeMatrixdARB = fn)
-#define CALL_MultTransposeMatrixfARB(disp, parameters) (*((disp)->MultTransposeMatrixfARB)) parameters
-#define GET_MultTransposeMatrixfARB(disp) ((disp)->MultTransposeMatrixfARB)
-#define SET_MultTransposeMatrixfARB(disp, fn) ((disp)->MultTransposeMatrixfARB = fn)
-#define CALL_SampleCoverageARB(disp, parameters) (*((disp)->SampleCoverageARB)) parameters
-#define GET_SampleCoverageARB(disp) ((disp)->SampleCoverageARB)
-#define SET_SampleCoverageARB(disp, fn) ((disp)->SampleCoverageARB = fn)
-#define CALL_CompressedTexImage1DARB(disp, parameters) (*((disp)->CompressedTexImage1DARB)) parameters
-#define GET_CompressedTexImage1DARB(disp) ((disp)->CompressedTexImage1DARB)
-#define SET_CompressedTexImage1DARB(disp, fn) ((disp)->CompressedTexImage1DARB = fn)
-#define CALL_CompressedTexImage2DARB(disp, parameters) (*((disp)->CompressedTexImage2DARB)) parameters
-#define GET_CompressedTexImage2DARB(disp) ((disp)->CompressedTexImage2DARB)
-#define SET_CompressedTexImage2DARB(disp, fn) ((disp)->CompressedTexImage2DARB = fn)
-#define CALL_CompressedTexImage3DARB(disp, parameters) (*((disp)->CompressedTexImage3DARB)) parameters
-#define GET_CompressedTexImage3DARB(disp) ((disp)->CompressedTexImage3DARB)
-#define SET_CompressedTexImage3DARB(disp, fn) ((disp)->CompressedTexImage3DARB = fn)
-#define CALL_CompressedTexSubImage1DARB(disp, parameters) (*((disp)->CompressedTexSubImage1DARB)) parameters
-#define GET_CompressedTexSubImage1DARB(disp) ((disp)->CompressedTexSubImage1DARB)
-#define SET_CompressedTexSubImage1DARB(disp, fn) ((disp)->CompressedTexSubImage1DARB = fn)
-#define CALL_CompressedTexSubImage2DARB(disp, parameters) (*((disp)->CompressedTexSubImage2DARB)) parameters
-#define GET_CompressedTexSubImage2DARB(disp) ((disp)->CompressedTexSubImage2DARB)
-#define SET_CompressedTexSubImage2DARB(disp, fn) ((disp)->CompressedTexSubImage2DARB = fn)
-#define CALL_CompressedTexSubImage3DARB(disp, parameters) (*((disp)->CompressedTexSubImage3DARB)) parameters
-#define GET_CompressedTexSubImage3DARB(disp) ((disp)->CompressedTexSubImage3DARB)
-#define SET_CompressedTexSubImage3DARB(disp, fn) ((disp)->CompressedTexSubImage3DARB = fn)
-#define CALL_GetCompressedTexImageARB(disp, parameters) (*((disp)->GetCompressedTexImageARB)) parameters
-#define GET_GetCompressedTexImageARB(disp) ((disp)->GetCompressedTexImageARB)
-#define SET_GetCompressedTexImageARB(disp, fn) ((disp)->GetCompressedTexImageARB = fn)
-#define CALL_DisableVertexAttribArrayARB(disp, parameters) (*((disp)->DisableVertexAttribArrayARB)) parameters
-#define GET_DisableVertexAttribArrayARB(disp) ((disp)->DisableVertexAttribArrayARB)
-#define SET_DisableVertexAttribArrayARB(disp, fn) ((disp)->DisableVertexAttribArrayARB = fn)
-#define CALL_EnableVertexAttribArrayARB(disp, parameters) (*((disp)->EnableVertexAttribArrayARB)) parameters
-#define GET_EnableVertexAttribArrayARB(disp) ((disp)->EnableVertexAttribArrayARB)
-#define SET_EnableVertexAttribArrayARB(disp, fn) ((disp)->EnableVertexAttribArrayARB = fn)
-#define CALL_GetProgramEnvParameterdvARB(disp, parameters) (*((disp)->GetProgramEnvParameterdvARB)) parameters
-#define GET_GetProgramEnvParameterdvARB(disp) ((disp)->GetProgramEnvParameterdvARB)
-#define SET_GetProgramEnvParameterdvARB(disp, fn) ((disp)->GetProgramEnvParameterdvARB = fn)
-#define CALL_GetProgramEnvParameterfvARB(disp, parameters) (*((disp)->GetProgramEnvParameterfvARB)) parameters
-#define GET_GetProgramEnvParameterfvARB(disp) ((disp)->GetProgramEnvParameterfvARB)
-#define SET_GetProgramEnvParameterfvARB(disp, fn) ((disp)->GetProgramEnvParameterfvARB = fn)
-#define CALL_GetProgramLocalParameterdvARB(disp, parameters) (*((disp)->GetProgramLocalParameterdvARB)) parameters
-#define GET_GetProgramLocalParameterdvARB(disp) ((disp)->GetProgramLocalParameterdvARB)
-#define SET_GetProgramLocalParameterdvARB(disp, fn) ((disp)->GetProgramLocalParameterdvARB = fn)
-#define CALL_GetProgramLocalParameterfvARB(disp, parameters) (*((disp)->GetProgramLocalParameterfvARB)) parameters
-#define GET_GetProgramLocalParameterfvARB(disp) ((disp)->GetProgramLocalParameterfvARB)
-#define SET_GetProgramLocalParameterfvARB(disp, fn) ((disp)->GetProgramLocalParameterfvARB = fn)
-#define CALL_GetProgramStringARB(disp, parameters) (*((disp)->GetProgramStringARB)) parameters
-#define GET_GetProgramStringARB(disp) ((disp)->GetProgramStringARB)
-#define SET_GetProgramStringARB(disp, fn) ((disp)->GetProgramStringARB = fn)
-#define CALL_GetProgramivARB(disp, parameters) (*((disp)->GetProgramivARB)) parameters
-#define GET_GetProgramivARB(disp) ((disp)->GetProgramivARB)
-#define SET_GetProgramivARB(disp, fn) ((disp)->GetProgramivARB = fn)
-#define CALL_GetVertexAttribdvARB(disp, parameters) (*((disp)->GetVertexAttribdvARB)) parameters
-#define GET_GetVertexAttribdvARB(disp) ((disp)->GetVertexAttribdvARB)
-#define SET_GetVertexAttribdvARB(disp, fn) ((disp)->GetVertexAttribdvARB = fn)
-#define CALL_GetVertexAttribfvARB(disp, parameters) (*((disp)->GetVertexAttribfvARB)) parameters
-#define GET_GetVertexAttribfvARB(disp) ((disp)->GetVertexAttribfvARB)
-#define SET_GetVertexAttribfvARB(disp, fn) ((disp)->GetVertexAttribfvARB = fn)
-#define CALL_GetVertexAttribivARB(disp, parameters) (*((disp)->GetVertexAttribivARB)) parameters
-#define GET_GetVertexAttribivARB(disp) ((disp)->GetVertexAttribivARB)
-#define SET_GetVertexAttribivARB(disp, fn) ((disp)->GetVertexAttribivARB = fn)
-#define CALL_ProgramEnvParameter4dARB(disp, parameters) (*((disp)->ProgramEnvParameter4dARB)) parameters
-#define GET_ProgramEnvParameter4dARB(disp) ((disp)->ProgramEnvParameter4dARB)
-#define SET_ProgramEnvParameter4dARB(disp, fn) ((disp)->ProgramEnvParameter4dARB = fn)
-#define CALL_ProgramEnvParameter4dvARB(disp, parameters) (*((disp)->ProgramEnvParameter4dvARB)) parameters
-#define GET_ProgramEnvParameter4dvARB(disp) ((disp)->ProgramEnvParameter4dvARB)
-#define SET_ProgramEnvParameter4dvARB(disp, fn) ((disp)->ProgramEnvParameter4dvARB = fn)
-#define CALL_ProgramEnvParameter4fARB(disp, parameters) (*((disp)->ProgramEnvParameter4fARB)) parameters
-#define GET_ProgramEnvParameter4fARB(disp) ((disp)->ProgramEnvParameter4fARB)
-#define SET_ProgramEnvParameter4fARB(disp, fn) ((disp)->ProgramEnvParameter4fARB = fn)
-#define CALL_ProgramEnvParameter4fvARB(disp, parameters) (*((disp)->ProgramEnvParameter4fvARB)) parameters
-#define GET_ProgramEnvParameter4fvARB(disp) ((disp)->ProgramEnvParameter4fvARB)
-#define SET_ProgramEnvParameter4fvARB(disp, fn) ((disp)->ProgramEnvParameter4fvARB = fn)
-#define CALL_ProgramLocalParameter4dARB(disp, parameters) (*((disp)->ProgramLocalParameter4dARB)) parameters
-#define GET_ProgramLocalParameter4dARB(disp) ((disp)->ProgramLocalParameter4dARB)
-#define SET_ProgramLocalParameter4dARB(disp, fn) ((disp)->ProgramLocalParameter4dARB = fn)
-#define CALL_ProgramLocalParameter4dvARB(disp, parameters) (*((disp)->ProgramLocalParameter4dvARB)) parameters
-#define GET_ProgramLocalParameter4dvARB(disp) ((disp)->ProgramLocalParameter4dvARB)
-#define SET_ProgramLocalParameter4dvARB(disp, fn) ((disp)->ProgramLocalParameter4dvARB = fn)
-#define CALL_ProgramLocalParameter4fARB(disp, parameters) (*((disp)->ProgramLocalParameter4fARB)) parameters
-#define GET_ProgramLocalParameter4fARB(disp) ((disp)->ProgramLocalParameter4fARB)
-#define SET_ProgramLocalParameter4fARB(disp, fn) ((disp)->ProgramLocalParameter4fARB = fn)
-#define CALL_ProgramLocalParameter4fvARB(disp, parameters) (*((disp)->ProgramLocalParameter4fvARB)) parameters
-#define GET_ProgramLocalParameter4fvARB(disp) ((disp)->ProgramLocalParameter4fvARB)
-#define SET_ProgramLocalParameter4fvARB(disp, fn) ((disp)->ProgramLocalParameter4fvARB = fn)
-#define CALL_ProgramStringARB(disp, parameters) (*((disp)->ProgramStringARB)) parameters
-#define GET_ProgramStringARB(disp) ((disp)->ProgramStringARB)
-#define SET_ProgramStringARB(disp, fn) ((disp)->ProgramStringARB = fn)
-#define CALL_VertexAttrib1dARB(disp, parameters) (*((disp)->VertexAttrib1dARB)) parameters
-#define GET_VertexAttrib1dARB(disp) ((disp)->VertexAttrib1dARB)
-#define SET_VertexAttrib1dARB(disp, fn) ((disp)->VertexAttrib1dARB = fn)
-#define CALL_VertexAttrib1dvARB(disp, parameters) (*((disp)->VertexAttrib1dvARB)) parameters
-#define GET_VertexAttrib1dvARB(disp) ((disp)->VertexAttrib1dvARB)
-#define SET_VertexAttrib1dvARB(disp, fn) ((disp)->VertexAttrib1dvARB = fn)
-#define CALL_VertexAttrib1fARB(disp, parameters) (*((disp)->VertexAttrib1fARB)) parameters
-#define GET_VertexAttrib1fARB(disp) ((disp)->VertexAttrib1fARB)
-#define SET_VertexAttrib1fARB(disp, fn) ((disp)->VertexAttrib1fARB = fn)
-#define CALL_VertexAttrib1fvARB(disp, parameters) (*((disp)->VertexAttrib1fvARB)) parameters
-#define GET_VertexAttrib1fvARB(disp) ((disp)->VertexAttrib1fvARB)
-#define SET_VertexAttrib1fvARB(disp, fn) ((disp)->VertexAttrib1fvARB = fn)
-#define CALL_VertexAttrib1sARB(disp, parameters) (*((disp)->VertexAttrib1sARB)) parameters
-#define GET_VertexAttrib1sARB(disp) ((disp)->VertexAttrib1sARB)
-#define SET_VertexAttrib1sARB(disp, fn) ((disp)->VertexAttrib1sARB = fn)
-#define CALL_VertexAttrib1svARB(disp, parameters) (*((disp)->VertexAttrib1svARB)) parameters
-#define GET_VertexAttrib1svARB(disp) ((disp)->VertexAttrib1svARB)
-#define SET_VertexAttrib1svARB(disp, fn) ((disp)->VertexAttrib1svARB = fn)
-#define CALL_VertexAttrib2dARB(disp, parameters) (*((disp)->VertexAttrib2dARB)) parameters
-#define GET_VertexAttrib2dARB(disp) ((disp)->VertexAttrib2dARB)
-#define SET_VertexAttrib2dARB(disp, fn) ((disp)->VertexAttrib2dARB = fn)
-#define CALL_VertexAttrib2dvARB(disp, parameters) (*((disp)->VertexAttrib2dvARB)) parameters
-#define GET_VertexAttrib2dvARB(disp) ((disp)->VertexAttrib2dvARB)
-#define SET_VertexAttrib2dvARB(disp, fn) ((disp)->VertexAttrib2dvARB = fn)
-#define CALL_VertexAttrib2fARB(disp, parameters) (*((disp)->VertexAttrib2fARB)) parameters
-#define GET_VertexAttrib2fARB(disp) ((disp)->VertexAttrib2fARB)
-#define SET_VertexAttrib2fARB(disp, fn) ((disp)->VertexAttrib2fARB = fn)
-#define CALL_VertexAttrib2fvARB(disp, parameters) (*((disp)->VertexAttrib2fvARB)) parameters
-#define GET_VertexAttrib2fvARB(disp) ((disp)->VertexAttrib2fvARB)
-#define SET_VertexAttrib2fvARB(disp, fn) ((disp)->VertexAttrib2fvARB = fn)
-#define CALL_VertexAttrib2sARB(disp, parameters) (*((disp)->VertexAttrib2sARB)) parameters
-#define GET_VertexAttrib2sARB(disp) ((disp)->VertexAttrib2sARB)
-#define SET_VertexAttrib2sARB(disp, fn) ((disp)->VertexAttrib2sARB = fn)
-#define CALL_VertexAttrib2svARB(disp, parameters) (*((disp)->VertexAttrib2svARB)) parameters
-#define GET_VertexAttrib2svARB(disp) ((disp)->VertexAttrib2svARB)
-#define SET_VertexAttrib2svARB(disp, fn) ((disp)->VertexAttrib2svARB = fn)
-#define CALL_VertexAttrib3dARB(disp, parameters) (*((disp)->VertexAttrib3dARB)) parameters
-#define GET_VertexAttrib3dARB(disp) ((disp)->VertexAttrib3dARB)
-#define SET_VertexAttrib3dARB(disp, fn) ((disp)->VertexAttrib3dARB = fn)
-#define CALL_VertexAttrib3dvARB(disp, parameters) (*((disp)->VertexAttrib3dvARB)) parameters
-#define GET_VertexAttrib3dvARB(disp) ((disp)->VertexAttrib3dvARB)
-#define SET_VertexAttrib3dvARB(disp, fn) ((disp)->VertexAttrib3dvARB = fn)
-#define CALL_VertexAttrib3fARB(disp, parameters) (*((disp)->VertexAttrib3fARB)) parameters
-#define GET_VertexAttrib3fARB(disp) ((disp)->VertexAttrib3fARB)
-#define SET_VertexAttrib3fARB(disp, fn) ((disp)->VertexAttrib3fARB = fn)
-#define CALL_VertexAttrib3fvARB(disp, parameters) (*((disp)->VertexAttrib3fvARB)) parameters
-#define GET_VertexAttrib3fvARB(disp) ((disp)->VertexAttrib3fvARB)
-#define SET_VertexAttrib3fvARB(disp, fn) ((disp)->VertexAttrib3fvARB = fn)
-#define CALL_VertexAttrib3sARB(disp, parameters) (*((disp)->VertexAttrib3sARB)) parameters
-#define GET_VertexAttrib3sARB(disp) ((disp)->VertexAttrib3sARB)
-#define SET_VertexAttrib3sARB(disp, fn) ((disp)->VertexAttrib3sARB = fn)
-#define CALL_VertexAttrib3svARB(disp, parameters) (*((disp)->VertexAttrib3svARB)) parameters
-#define GET_VertexAttrib3svARB(disp) ((disp)->VertexAttrib3svARB)
-#define SET_VertexAttrib3svARB(disp, fn) ((disp)->VertexAttrib3svARB = fn)
-#define CALL_VertexAttrib4NbvARB(disp, parameters) (*((disp)->VertexAttrib4NbvARB)) parameters
-#define GET_VertexAttrib4NbvARB(disp) ((disp)->VertexAttrib4NbvARB)
-#define SET_VertexAttrib4NbvARB(disp, fn) ((disp)->VertexAttrib4NbvARB = fn)
-#define CALL_VertexAttrib4NivARB(disp, parameters) (*((disp)->VertexAttrib4NivARB)) parameters
-#define GET_VertexAttrib4NivARB(disp) ((disp)->VertexAttrib4NivARB)
-#define SET_VertexAttrib4NivARB(disp, fn) ((disp)->VertexAttrib4NivARB = fn)
-#define CALL_VertexAttrib4NsvARB(disp, parameters) (*((disp)->VertexAttrib4NsvARB)) parameters
-#define GET_VertexAttrib4NsvARB(disp) ((disp)->VertexAttrib4NsvARB)
-#define SET_VertexAttrib4NsvARB(disp, fn) ((disp)->VertexAttrib4NsvARB = fn)
-#define CALL_VertexAttrib4NubARB(disp, parameters) (*((disp)->VertexAttrib4NubARB)) parameters
-#define GET_VertexAttrib4NubARB(disp) ((disp)->VertexAttrib4NubARB)
-#define SET_VertexAttrib4NubARB(disp, fn) ((disp)->VertexAttrib4NubARB = fn)
-#define CALL_VertexAttrib4NubvARB(disp, parameters) (*((disp)->VertexAttrib4NubvARB)) parameters
-#define GET_VertexAttrib4NubvARB(disp) ((disp)->VertexAttrib4NubvARB)
-#define SET_VertexAttrib4NubvARB(disp, fn) ((disp)->VertexAttrib4NubvARB = fn)
-#define CALL_VertexAttrib4NuivARB(disp, parameters) (*((disp)->VertexAttrib4NuivARB)) parameters
-#define GET_VertexAttrib4NuivARB(disp) ((disp)->VertexAttrib4NuivARB)
-#define SET_VertexAttrib4NuivARB(disp, fn) ((disp)->VertexAttrib4NuivARB = fn)
-#define CALL_VertexAttrib4NusvARB(disp, parameters) (*((disp)->VertexAttrib4NusvARB)) parameters
-#define GET_VertexAttrib4NusvARB(disp) ((disp)->VertexAttrib4NusvARB)
-#define SET_VertexAttrib4NusvARB(disp, fn) ((disp)->VertexAttrib4NusvARB = fn)
-#define CALL_VertexAttrib4bvARB(disp, parameters) (*((disp)->VertexAttrib4bvARB)) parameters
-#define GET_VertexAttrib4bvARB(disp) ((disp)->VertexAttrib4bvARB)
-#define SET_VertexAttrib4bvARB(disp, fn) ((disp)->VertexAttrib4bvARB = fn)
-#define CALL_VertexAttrib4dARB(disp, parameters) (*((disp)->VertexAttrib4dARB)) parameters
-#define GET_VertexAttrib4dARB(disp) ((disp)->VertexAttrib4dARB)
-#define SET_VertexAttrib4dARB(disp, fn) ((disp)->VertexAttrib4dARB = fn)
-#define CALL_VertexAttrib4dvARB(disp, parameters) (*((disp)->VertexAttrib4dvARB)) parameters
-#define GET_VertexAttrib4dvARB(disp) ((disp)->VertexAttrib4dvARB)
-#define SET_VertexAttrib4dvARB(disp, fn) ((disp)->VertexAttrib4dvARB = fn)
-#define CALL_VertexAttrib4fARB(disp, parameters) (*((disp)->VertexAttrib4fARB)) parameters
-#define GET_VertexAttrib4fARB(disp) ((disp)->VertexAttrib4fARB)
-#define SET_VertexAttrib4fARB(disp, fn) ((disp)->VertexAttrib4fARB = fn)
-#define CALL_VertexAttrib4fvARB(disp, parameters) (*((disp)->VertexAttrib4fvARB)) parameters
-#define GET_VertexAttrib4fvARB(disp) ((disp)->VertexAttrib4fvARB)
-#define SET_VertexAttrib4fvARB(disp, fn) ((disp)->VertexAttrib4fvARB = fn)
-#define CALL_VertexAttrib4ivARB(disp, parameters) (*((disp)->VertexAttrib4ivARB)) parameters
-#define GET_VertexAttrib4ivARB(disp) ((disp)->VertexAttrib4ivARB)
-#define SET_VertexAttrib4ivARB(disp, fn) ((disp)->VertexAttrib4ivARB = fn)
-#define CALL_VertexAttrib4sARB(disp, parameters) (*((disp)->VertexAttrib4sARB)) parameters
-#define GET_VertexAttrib4sARB(disp) ((disp)->VertexAttrib4sARB)
-#define SET_VertexAttrib4sARB(disp, fn) ((disp)->VertexAttrib4sARB = fn)
-#define CALL_VertexAttrib4svARB(disp, parameters) (*((disp)->VertexAttrib4svARB)) parameters
-#define GET_VertexAttrib4svARB(disp) ((disp)->VertexAttrib4svARB)
-#define SET_VertexAttrib4svARB(disp, fn) ((disp)->VertexAttrib4svARB = fn)
-#define CALL_VertexAttrib4ubvARB(disp, parameters) (*((disp)->VertexAttrib4ubvARB)) parameters
-#define GET_VertexAttrib4ubvARB(disp) ((disp)->VertexAttrib4ubvARB)
-#define SET_VertexAttrib4ubvARB(disp, fn) ((disp)->VertexAttrib4ubvARB = fn)
-#define CALL_VertexAttrib4uivARB(disp, parameters) (*((disp)->VertexAttrib4uivARB)) parameters
-#define GET_VertexAttrib4uivARB(disp) ((disp)->VertexAttrib4uivARB)
-#define SET_VertexAttrib4uivARB(disp, fn) ((disp)->VertexAttrib4uivARB = fn)
-#define CALL_VertexAttrib4usvARB(disp, parameters) (*((disp)->VertexAttrib4usvARB)) parameters
-#define GET_VertexAttrib4usvARB(disp) ((disp)->VertexAttrib4usvARB)
-#define SET_VertexAttrib4usvARB(disp, fn) ((disp)->VertexAttrib4usvARB = fn)
-#define CALL_VertexAttribPointerARB(disp, parameters) (*((disp)->VertexAttribPointerARB)) parameters
-#define GET_VertexAttribPointerARB(disp) ((disp)->VertexAttribPointerARB)
-#define SET_VertexAttribPointerARB(disp, fn) ((disp)->VertexAttribPointerARB = fn)
-#define CALL_BindBufferARB(disp, parameters) (*((disp)->BindBufferARB)) parameters
-#define GET_BindBufferARB(disp) ((disp)->BindBufferARB)
-#define SET_BindBufferARB(disp, fn) ((disp)->BindBufferARB = fn)
-#define CALL_BufferDataARB(disp, parameters) (*((disp)->BufferDataARB)) parameters
-#define GET_BufferDataARB(disp) ((disp)->BufferDataARB)
-#define SET_BufferDataARB(disp, fn) ((disp)->BufferDataARB = fn)
-#define CALL_BufferSubDataARB(disp, parameters) (*((disp)->BufferSubDataARB)) parameters
-#define GET_BufferSubDataARB(disp) ((disp)->BufferSubDataARB)
-#define SET_BufferSubDataARB(disp, fn) ((disp)->BufferSubDataARB = fn)
-#define CALL_DeleteBuffersARB(disp, parameters) (*((disp)->DeleteBuffersARB)) parameters
-#define GET_DeleteBuffersARB(disp) ((disp)->DeleteBuffersARB)
-#define SET_DeleteBuffersARB(disp, fn) ((disp)->DeleteBuffersARB = fn)
-#define CALL_GenBuffersARB(disp, parameters) (*((disp)->GenBuffersARB)) parameters
-#define GET_GenBuffersARB(disp) ((disp)->GenBuffersARB)
-#define SET_GenBuffersARB(disp, fn) ((disp)->GenBuffersARB = fn)
-#define CALL_GetBufferParameterivARB(disp, parameters) (*((disp)->GetBufferParameterivARB)) parameters
-#define GET_GetBufferParameterivARB(disp) ((disp)->GetBufferParameterivARB)
-#define SET_GetBufferParameterivARB(disp, fn) ((disp)->GetBufferParameterivARB = fn)
-#define CALL_GetBufferPointervARB(disp, parameters) (*((disp)->GetBufferPointervARB)) parameters
-#define GET_GetBufferPointervARB(disp) ((disp)->GetBufferPointervARB)
-#define SET_GetBufferPointervARB(disp, fn) ((disp)->GetBufferPointervARB = fn)
-#define CALL_GetBufferSubDataARB(disp, parameters) (*((disp)->GetBufferSubDataARB)) parameters
-#define GET_GetBufferSubDataARB(disp) ((disp)->GetBufferSubDataARB)
-#define SET_GetBufferSubDataARB(disp, fn) ((disp)->GetBufferSubDataARB = fn)
-#define CALL_IsBufferARB(disp, parameters) (*((disp)->IsBufferARB)) parameters
-#define GET_IsBufferARB(disp) ((disp)->IsBufferARB)
-#define SET_IsBufferARB(disp, fn) ((disp)->IsBufferARB = fn)
-#define CALL_MapBufferARB(disp, parameters) (*((disp)->MapBufferARB)) parameters
-#define GET_MapBufferARB(disp) ((disp)->MapBufferARB)
-#define SET_MapBufferARB(disp, fn) ((disp)->MapBufferARB = fn)
-#define CALL_UnmapBufferARB(disp, parameters) (*((disp)->UnmapBufferARB)) parameters
-#define GET_UnmapBufferARB(disp) ((disp)->UnmapBufferARB)
-#define SET_UnmapBufferARB(disp, fn) ((disp)->UnmapBufferARB = fn)
-#define CALL_BeginQueryARB(disp, parameters) (*((disp)->BeginQueryARB)) parameters
-#define GET_BeginQueryARB(disp) ((disp)->BeginQueryARB)
-#define SET_BeginQueryARB(disp, fn) ((disp)->BeginQueryARB = fn)
-#define CALL_DeleteQueriesARB(disp, parameters) (*((disp)->DeleteQueriesARB)) parameters
-#define GET_DeleteQueriesARB(disp) ((disp)->DeleteQueriesARB)
-#define SET_DeleteQueriesARB(disp, fn) ((disp)->DeleteQueriesARB = fn)
-#define CALL_EndQueryARB(disp, parameters) (*((disp)->EndQueryARB)) parameters
-#define GET_EndQueryARB(disp) ((disp)->EndQueryARB)
-#define SET_EndQueryARB(disp, fn) ((disp)->EndQueryARB = fn)
-#define CALL_GenQueriesARB(disp, parameters) (*((disp)->GenQueriesARB)) parameters
-#define GET_GenQueriesARB(disp) ((disp)->GenQueriesARB)
-#define SET_GenQueriesARB(disp, fn) ((disp)->GenQueriesARB = fn)
-#define CALL_GetQueryObjectivARB(disp, parameters) (*((disp)->GetQueryObjectivARB)) parameters
-#define GET_GetQueryObjectivARB(disp) ((disp)->GetQueryObjectivARB)
-#define SET_GetQueryObjectivARB(disp, fn) ((disp)->GetQueryObjectivARB = fn)
-#define CALL_GetQueryObjectuivARB(disp, parameters) (*((disp)->GetQueryObjectuivARB)) parameters
-#define GET_GetQueryObjectuivARB(disp) ((disp)->GetQueryObjectuivARB)
-#define SET_GetQueryObjectuivARB(disp, fn) ((disp)->GetQueryObjectuivARB = fn)
-#define CALL_GetQueryivARB(disp, parameters) (*((disp)->GetQueryivARB)) parameters
-#define GET_GetQueryivARB(disp) ((disp)->GetQueryivARB)
-#define SET_GetQueryivARB(disp, fn) ((disp)->GetQueryivARB = fn)
-#define CALL_IsQueryARB(disp, parameters) (*((disp)->IsQueryARB)) parameters
-#define GET_IsQueryARB(disp) ((disp)->IsQueryARB)
-#define SET_IsQueryARB(disp, fn) ((disp)->IsQueryARB = fn)
-#define CALL_AttachObjectARB(disp, parameters) (*((disp)->AttachObjectARB)) parameters
-#define GET_AttachObjectARB(disp) ((disp)->AttachObjectARB)
-#define SET_AttachObjectARB(disp, fn) ((disp)->AttachObjectARB = fn)
-#define CALL_CompileShaderARB(disp, parameters) (*((disp)->CompileShaderARB)) parameters
-#define GET_CompileShaderARB(disp) ((disp)->CompileShaderARB)
-#define SET_CompileShaderARB(disp, fn) ((disp)->CompileShaderARB = fn)
-#define CALL_CreateProgramObjectARB(disp, parameters) (*((disp)->CreateProgramObjectARB)) parameters
-#define GET_CreateProgramObjectARB(disp) ((disp)->CreateProgramObjectARB)
-#define SET_CreateProgramObjectARB(disp, fn) ((disp)->CreateProgramObjectARB = fn)
-#define CALL_CreateShaderObjectARB(disp, parameters) (*((disp)->CreateShaderObjectARB)) parameters
-#define GET_CreateShaderObjectARB(disp) ((disp)->CreateShaderObjectARB)
-#define SET_CreateShaderObjectARB(disp, fn) ((disp)->CreateShaderObjectARB = fn)
-#define CALL_DeleteObjectARB(disp, parameters) (*((disp)->DeleteObjectARB)) parameters
-#define GET_DeleteObjectARB(disp) ((disp)->DeleteObjectARB)
-#define SET_DeleteObjectARB(disp, fn) ((disp)->DeleteObjectARB = fn)
-#define CALL_DetachObjectARB(disp, parameters) (*((disp)->DetachObjectARB)) parameters
-#define GET_DetachObjectARB(disp) ((disp)->DetachObjectARB)
-#define SET_DetachObjectARB(disp, fn) ((disp)->DetachObjectARB = fn)
-#define CALL_GetActiveUniformARB(disp, parameters) (*((disp)->GetActiveUniformARB)) parameters
-#define GET_GetActiveUniformARB(disp) ((disp)->GetActiveUniformARB)
-#define SET_GetActiveUniformARB(disp, fn) ((disp)->GetActiveUniformARB = fn)
-#define CALL_GetAttachedObjectsARB(disp, parameters) (*((disp)->GetAttachedObjectsARB)) parameters
-#define GET_GetAttachedObjectsARB(disp) ((disp)->GetAttachedObjectsARB)
-#define SET_GetAttachedObjectsARB(disp, fn) ((disp)->GetAttachedObjectsARB = fn)
-#define CALL_GetHandleARB(disp, parameters) (*((disp)->GetHandleARB)) parameters
-#define GET_GetHandleARB(disp) ((disp)->GetHandleARB)
-#define SET_GetHandleARB(disp, fn) ((disp)->GetHandleARB = fn)
-#define CALL_GetInfoLogARB(disp, parameters) (*((disp)->GetInfoLogARB)) parameters
-#define GET_GetInfoLogARB(disp) ((disp)->GetInfoLogARB)
-#define SET_GetInfoLogARB(disp, fn) ((disp)->GetInfoLogARB = fn)
-#define CALL_GetObjectParameterfvARB(disp, parameters) (*((disp)->GetObjectParameterfvARB)) parameters
-#define GET_GetObjectParameterfvARB(disp) ((disp)->GetObjectParameterfvARB)
-#define SET_GetObjectParameterfvARB(disp, fn) ((disp)->GetObjectParameterfvARB = fn)
-#define CALL_GetObjectParameterivARB(disp, parameters) (*((disp)->GetObjectParameterivARB)) parameters
-#define GET_GetObjectParameterivARB(disp) ((disp)->GetObjectParameterivARB)
-#define SET_GetObjectParameterivARB(disp, fn) ((disp)->GetObjectParameterivARB = fn)
-#define CALL_GetShaderSourceARB(disp, parameters) (*((disp)->GetShaderSourceARB)) parameters
-#define GET_GetShaderSourceARB(disp) ((disp)->GetShaderSourceARB)
-#define SET_GetShaderSourceARB(disp, fn) ((disp)->GetShaderSourceARB = fn)
-#define CALL_GetUniformLocationARB(disp, parameters) (*((disp)->GetUniformLocationARB)) parameters
-#define GET_GetUniformLocationARB(disp) ((disp)->GetUniformLocationARB)
-#define SET_GetUniformLocationARB(disp, fn) ((disp)->GetUniformLocationARB = fn)
-#define CALL_GetUniformfvARB(disp, parameters) (*((disp)->GetUniformfvARB)) parameters
-#define GET_GetUniformfvARB(disp) ((disp)->GetUniformfvARB)
-#define SET_GetUniformfvARB(disp, fn) ((disp)->GetUniformfvARB = fn)
-#define CALL_GetUniformivARB(disp, parameters) (*((disp)->GetUniformivARB)) parameters
-#define GET_GetUniformivARB(disp) ((disp)->GetUniformivARB)
-#define SET_GetUniformivARB(disp, fn) ((disp)->GetUniformivARB = fn)
-#define CALL_LinkProgramARB(disp, parameters) (*((disp)->LinkProgramARB)) parameters
-#define GET_LinkProgramARB(disp) ((disp)->LinkProgramARB)
-#define SET_LinkProgramARB(disp, fn) ((disp)->LinkProgramARB = fn)
-#define CALL_ShaderSourceARB(disp, parameters) (*((disp)->ShaderSourceARB)) parameters
-#define GET_ShaderSourceARB(disp) ((disp)->ShaderSourceARB)
-#define SET_ShaderSourceARB(disp, fn) ((disp)->ShaderSourceARB = fn)
-#define CALL_Uniform1fARB(disp, parameters) (*((disp)->Uniform1fARB)) parameters
-#define GET_Uniform1fARB(disp) ((disp)->Uniform1fARB)
-#define SET_Uniform1fARB(disp, fn) ((disp)->Uniform1fARB = fn)
-#define CALL_Uniform1fvARB(disp, parameters) (*((disp)->Uniform1fvARB)) parameters
-#define GET_Uniform1fvARB(disp) ((disp)->Uniform1fvARB)
-#define SET_Uniform1fvARB(disp, fn) ((disp)->Uniform1fvARB = fn)
-#define CALL_Uniform1iARB(disp, parameters) (*((disp)->Uniform1iARB)) parameters
-#define GET_Uniform1iARB(disp) ((disp)->Uniform1iARB)
-#define SET_Uniform1iARB(disp, fn) ((disp)->Uniform1iARB = fn)
-#define CALL_Uniform1ivARB(disp, parameters) (*((disp)->Uniform1ivARB)) parameters
-#define GET_Uniform1ivARB(disp) ((disp)->Uniform1ivARB)
-#define SET_Uniform1ivARB(disp, fn) ((disp)->Uniform1ivARB = fn)
-#define CALL_Uniform2fARB(disp, parameters) (*((disp)->Uniform2fARB)) parameters
-#define GET_Uniform2fARB(disp) ((disp)->Uniform2fARB)
-#define SET_Uniform2fARB(disp, fn) ((disp)->Uniform2fARB = fn)
-#define CALL_Uniform2fvARB(disp, parameters) (*((disp)->Uniform2fvARB)) parameters
-#define GET_Uniform2fvARB(disp) ((disp)->Uniform2fvARB)
-#define SET_Uniform2fvARB(disp, fn) ((disp)->Uniform2fvARB = fn)
-#define CALL_Uniform2iARB(disp, parameters) (*((disp)->Uniform2iARB)) parameters
-#define GET_Uniform2iARB(disp) ((disp)->Uniform2iARB)
-#define SET_Uniform2iARB(disp, fn) ((disp)->Uniform2iARB = fn)
-#define CALL_Uniform2ivARB(disp, parameters) (*((disp)->Uniform2ivARB)) parameters
-#define GET_Uniform2ivARB(disp) ((disp)->Uniform2ivARB)
-#define SET_Uniform2ivARB(disp, fn) ((disp)->Uniform2ivARB = fn)
-#define CALL_Uniform3fARB(disp, parameters) (*((disp)->Uniform3fARB)) parameters
-#define GET_Uniform3fARB(disp) ((disp)->Uniform3fARB)
-#define SET_Uniform3fARB(disp, fn) ((disp)->Uniform3fARB = fn)
-#define CALL_Uniform3fvARB(disp, parameters) (*((disp)->Uniform3fvARB)) parameters
-#define GET_Uniform3fvARB(disp) ((disp)->Uniform3fvARB)
-#define SET_Uniform3fvARB(disp, fn) ((disp)->Uniform3fvARB = fn)
-#define CALL_Uniform3iARB(disp, parameters) (*((disp)->Uniform3iARB)) parameters
-#define GET_Uniform3iARB(disp) ((disp)->Uniform3iARB)
-#define SET_Uniform3iARB(disp, fn) ((disp)->Uniform3iARB = fn)
-#define CALL_Uniform3ivARB(disp, parameters) (*((disp)->Uniform3ivARB)) parameters
-#define GET_Uniform3ivARB(disp) ((disp)->Uniform3ivARB)
-#define SET_Uniform3ivARB(disp, fn) ((disp)->Uniform3ivARB = fn)
-#define CALL_Uniform4fARB(disp, parameters) (*((disp)->Uniform4fARB)) parameters
-#define GET_Uniform4fARB(disp) ((disp)->Uniform4fARB)
-#define SET_Uniform4fARB(disp, fn) ((disp)->Uniform4fARB = fn)
-#define CALL_Uniform4fvARB(disp, parameters) (*((disp)->Uniform4fvARB)) parameters
-#define GET_Uniform4fvARB(disp) ((disp)->Uniform4fvARB)
-#define SET_Uniform4fvARB(disp, fn) ((disp)->Uniform4fvARB = fn)
-#define CALL_Uniform4iARB(disp, parameters) (*((disp)->Uniform4iARB)) parameters
-#define GET_Uniform4iARB(disp) ((disp)->Uniform4iARB)
-#define SET_Uniform4iARB(disp, fn) ((disp)->Uniform4iARB = fn)
-#define CALL_Uniform4ivARB(disp, parameters) (*((disp)->Uniform4ivARB)) parameters
-#define GET_Uniform4ivARB(disp) ((disp)->Uniform4ivARB)
-#define SET_Uniform4ivARB(disp, fn) ((disp)->Uniform4ivARB = fn)
-#define CALL_UniformMatrix2fvARB(disp, parameters) (*((disp)->UniformMatrix2fvARB)) parameters
-#define GET_UniformMatrix2fvARB(disp) ((disp)->UniformMatrix2fvARB)
-#define SET_UniformMatrix2fvARB(disp, fn) ((disp)->UniformMatrix2fvARB = fn)
-#define CALL_UniformMatrix3fvARB(disp, parameters) (*((disp)->UniformMatrix3fvARB)) parameters
-#define GET_UniformMatrix3fvARB(disp) ((disp)->UniformMatrix3fvARB)
-#define SET_UniformMatrix3fvARB(disp, fn) ((disp)->UniformMatrix3fvARB = fn)
-#define CALL_UniformMatrix4fvARB(disp, parameters) (*((disp)->UniformMatrix4fvARB)) parameters
-#define GET_UniformMatrix4fvARB(disp) ((disp)->UniformMatrix4fvARB)
-#define SET_UniformMatrix4fvARB(disp, fn) ((disp)->UniformMatrix4fvARB = fn)
-#define CALL_UseProgramObjectARB(disp, parameters) (*((disp)->UseProgramObjectARB)) parameters
-#define GET_UseProgramObjectARB(disp) ((disp)->UseProgramObjectARB)
-#define SET_UseProgramObjectARB(disp, fn) ((disp)->UseProgramObjectARB = fn)
-#define CALL_ValidateProgramARB(disp, parameters) (*((disp)->ValidateProgramARB)) parameters
-#define GET_ValidateProgramARB(disp) ((disp)->ValidateProgramARB)
-#define SET_ValidateProgramARB(disp, fn) ((disp)->ValidateProgramARB = fn)
-#define CALL_BindAttribLocationARB(disp, parameters) (*((disp)->BindAttribLocationARB)) parameters
-#define GET_BindAttribLocationARB(disp) ((disp)->BindAttribLocationARB)
-#define SET_BindAttribLocationARB(disp, fn) ((disp)->BindAttribLocationARB = fn)
-#define CALL_GetActiveAttribARB(disp, parameters) (*((disp)->GetActiveAttribARB)) parameters
-#define GET_GetActiveAttribARB(disp) ((disp)->GetActiveAttribARB)
-#define SET_GetActiveAttribARB(disp, fn) ((disp)->GetActiveAttribARB = fn)
-#define CALL_GetAttribLocationARB(disp, parameters) (*((disp)->GetAttribLocationARB)) parameters
-#define GET_GetAttribLocationARB(disp) ((disp)->GetAttribLocationARB)
-#define SET_GetAttribLocationARB(disp, fn) ((disp)->GetAttribLocationARB = fn)
-#define CALL_DrawBuffersARB(disp, parameters) (*((disp)->DrawBuffersARB)) parameters
-#define GET_DrawBuffersARB(disp) ((disp)->DrawBuffersARB)
-#define SET_DrawBuffersARB(disp, fn) ((disp)->DrawBuffersARB = fn)
-#define CALL_PolygonOffsetEXT(disp, parameters) (*((disp)->PolygonOffsetEXT)) parameters
-#define GET_PolygonOffsetEXT(disp) ((disp)->PolygonOffsetEXT)
-#define SET_PolygonOffsetEXT(disp, fn) ((disp)->PolygonOffsetEXT = fn)
-#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) (*((disp)->GetPixelTexGenParameterfvSGIS)) parameters
-#define GET_GetPixelTexGenParameterfvSGIS(disp) ((disp)->GetPixelTexGenParameterfvSGIS)
-#define SET_GetPixelTexGenParameterfvSGIS(disp, fn) ((disp)->GetPixelTexGenParameterfvSGIS = fn)
-#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) (*((disp)->GetPixelTexGenParameterivSGIS)) parameters
-#define GET_GetPixelTexGenParameterivSGIS(disp) ((disp)->GetPixelTexGenParameterivSGIS)
-#define SET_GetPixelTexGenParameterivSGIS(disp, fn) ((disp)->GetPixelTexGenParameterivSGIS = fn)
-#define CALL_PixelTexGenParameterfSGIS(disp, parameters) (*((disp)->PixelTexGenParameterfSGIS)) parameters
-#define GET_PixelTexGenParameterfSGIS(disp) ((disp)->PixelTexGenParameterfSGIS)
-#define SET_PixelTexGenParameterfSGIS(disp, fn) ((disp)->PixelTexGenParameterfSGIS = fn)
-#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) (*((disp)->PixelTexGenParameterfvSGIS)) parameters
-#define GET_PixelTexGenParameterfvSGIS(disp) ((disp)->PixelTexGenParameterfvSGIS)
-#define SET_PixelTexGenParameterfvSGIS(disp, fn) ((disp)->PixelTexGenParameterfvSGIS = fn)
-#define CALL_PixelTexGenParameteriSGIS(disp, parameters) (*((disp)->PixelTexGenParameteriSGIS)) parameters
-#define GET_PixelTexGenParameteriSGIS(disp) ((disp)->PixelTexGenParameteriSGIS)
-#define SET_PixelTexGenParameteriSGIS(disp, fn) ((disp)->PixelTexGenParameteriSGIS = fn)
-#define CALL_PixelTexGenParameterivSGIS(disp, parameters) (*((disp)->PixelTexGenParameterivSGIS)) parameters
-#define GET_PixelTexGenParameterivSGIS(disp) ((disp)->PixelTexGenParameterivSGIS)
-#define SET_PixelTexGenParameterivSGIS(disp, fn) ((disp)->PixelTexGenParameterivSGIS = fn)
-#define CALL_SampleMaskSGIS(disp, parameters) (*((disp)->SampleMaskSGIS)) parameters
-#define GET_SampleMaskSGIS(disp) ((disp)->SampleMaskSGIS)
-#define SET_SampleMaskSGIS(disp, fn) ((disp)->SampleMaskSGIS = fn)
-#define CALL_SamplePatternSGIS(disp, parameters) (*((disp)->SamplePatternSGIS)) parameters
-#define GET_SamplePatternSGIS(disp) ((disp)->SamplePatternSGIS)
-#define SET_SamplePatternSGIS(disp, fn) ((disp)->SamplePatternSGIS = fn)
-#define CALL_ColorPointerEXT(disp, parameters) (*((disp)->ColorPointerEXT)) parameters
-#define GET_ColorPointerEXT(disp) ((disp)->ColorPointerEXT)
-#define SET_ColorPointerEXT(disp, fn) ((disp)->ColorPointerEXT = fn)
-#define CALL_EdgeFlagPointerEXT(disp, parameters) (*((disp)->EdgeFlagPointerEXT)) parameters
-#define GET_EdgeFlagPointerEXT(disp) ((disp)->EdgeFlagPointerEXT)
-#define SET_EdgeFlagPointerEXT(disp, fn) ((disp)->EdgeFlagPointerEXT = fn)
-#define CALL_IndexPointerEXT(disp, parameters) (*((disp)->IndexPointerEXT)) parameters
-#define GET_IndexPointerEXT(disp) ((disp)->IndexPointerEXT)
-#define SET_IndexPointerEXT(disp, fn) ((disp)->IndexPointerEXT = fn)
-#define CALL_NormalPointerEXT(disp, parameters) (*((disp)->NormalPointerEXT)) parameters
-#define GET_NormalPointerEXT(disp) ((disp)->NormalPointerEXT)
-#define SET_NormalPointerEXT(disp, fn) ((disp)->NormalPointerEXT = fn)
-#define CALL_TexCoordPointerEXT(disp, parameters) (*((disp)->TexCoordPointerEXT)) parameters
-#define GET_TexCoordPointerEXT(disp) ((disp)->TexCoordPointerEXT)
-#define SET_TexCoordPointerEXT(disp, fn) ((disp)->TexCoordPointerEXT = fn)
-#define CALL_VertexPointerEXT(disp, parameters) (*((disp)->VertexPointerEXT)) parameters
-#define GET_VertexPointerEXT(disp) ((disp)->VertexPointerEXT)
-#define SET_VertexPointerEXT(disp, fn) ((disp)->VertexPointerEXT = fn)
-#define CALL_PointParameterfEXT(disp, parameters) (*((disp)->PointParameterfEXT)) parameters
-#define GET_PointParameterfEXT(disp) ((disp)->PointParameterfEXT)
-#define SET_PointParameterfEXT(disp, fn) ((disp)->PointParameterfEXT = fn)
-#define CALL_PointParameterfvEXT(disp, parameters) (*((disp)->PointParameterfvEXT)) parameters
-#define GET_PointParameterfvEXT(disp) ((disp)->PointParameterfvEXT)
-#define SET_PointParameterfvEXT(disp, fn) ((disp)->PointParameterfvEXT = fn)
-#define CALL_LockArraysEXT(disp, parameters) (*((disp)->LockArraysEXT)) parameters
-#define GET_LockArraysEXT(disp) ((disp)->LockArraysEXT)
-#define SET_LockArraysEXT(disp, fn) ((disp)->LockArraysEXT = fn)
-#define CALL_UnlockArraysEXT(disp, parameters) (*((disp)->UnlockArraysEXT)) parameters
-#define GET_UnlockArraysEXT(disp) ((disp)->UnlockArraysEXT)
-#define SET_UnlockArraysEXT(disp, fn) ((disp)->UnlockArraysEXT = fn)
-#define CALL_CullParameterdvEXT(disp, parameters) (*((disp)->CullParameterdvEXT)) parameters
-#define GET_CullParameterdvEXT(disp) ((disp)->CullParameterdvEXT)
-#define SET_CullParameterdvEXT(disp, fn) ((disp)->CullParameterdvEXT = fn)
-#define CALL_CullParameterfvEXT(disp, parameters) (*((disp)->CullParameterfvEXT)) parameters
-#define GET_CullParameterfvEXT(disp) ((disp)->CullParameterfvEXT)
-#define SET_CullParameterfvEXT(disp, fn) ((disp)->CullParameterfvEXT = fn)
-#define CALL_SecondaryColor3bEXT(disp, parameters) (*((disp)->SecondaryColor3bEXT)) parameters
-#define GET_SecondaryColor3bEXT(disp) ((disp)->SecondaryColor3bEXT)
-#define SET_SecondaryColor3bEXT(disp, fn) ((disp)->SecondaryColor3bEXT = fn)
-#define CALL_SecondaryColor3bvEXT(disp, parameters) (*((disp)->SecondaryColor3bvEXT)) parameters
-#define GET_SecondaryColor3bvEXT(disp) ((disp)->SecondaryColor3bvEXT)
-#define SET_SecondaryColor3bvEXT(disp, fn) ((disp)->SecondaryColor3bvEXT = fn)
-#define CALL_SecondaryColor3dEXT(disp, parameters) (*((disp)->SecondaryColor3dEXT)) parameters
-#define GET_SecondaryColor3dEXT(disp) ((disp)->SecondaryColor3dEXT)
-#define SET_SecondaryColor3dEXT(disp, fn) ((disp)->SecondaryColor3dEXT = fn)
-#define CALL_SecondaryColor3dvEXT(disp, parameters) (*((disp)->SecondaryColor3dvEXT)) parameters
-#define GET_SecondaryColor3dvEXT(disp) ((disp)->SecondaryColor3dvEXT)
-#define SET_SecondaryColor3dvEXT(disp, fn) ((disp)->SecondaryColor3dvEXT = fn)
-#define CALL_SecondaryColor3fEXT(disp, parameters) (*((disp)->SecondaryColor3fEXT)) parameters
-#define GET_SecondaryColor3fEXT(disp) ((disp)->SecondaryColor3fEXT)
-#define SET_SecondaryColor3fEXT(disp, fn) ((disp)->SecondaryColor3fEXT = fn)
-#define CALL_SecondaryColor3fvEXT(disp, parameters) (*((disp)->SecondaryColor3fvEXT)) parameters
-#define GET_SecondaryColor3fvEXT(disp) ((disp)->SecondaryColor3fvEXT)
-#define SET_SecondaryColor3fvEXT(disp, fn) ((disp)->SecondaryColor3fvEXT = fn)
-#define CALL_SecondaryColor3iEXT(disp, parameters) (*((disp)->SecondaryColor3iEXT)) parameters
-#define GET_SecondaryColor3iEXT(disp) ((disp)->SecondaryColor3iEXT)
-#define SET_SecondaryColor3iEXT(disp, fn) ((disp)->SecondaryColor3iEXT = fn)
-#define CALL_SecondaryColor3ivEXT(disp, parameters) (*((disp)->SecondaryColor3ivEXT)) parameters
-#define GET_SecondaryColor3ivEXT(disp) ((disp)->SecondaryColor3ivEXT)
-#define SET_SecondaryColor3ivEXT(disp, fn) ((disp)->SecondaryColor3ivEXT = fn)
-#define CALL_SecondaryColor3sEXT(disp, parameters) (*((disp)->SecondaryColor3sEXT)) parameters
-#define GET_SecondaryColor3sEXT(disp) ((disp)->SecondaryColor3sEXT)
-#define SET_SecondaryColor3sEXT(disp, fn) ((disp)->SecondaryColor3sEXT = fn)
-#define CALL_SecondaryColor3svEXT(disp, parameters) (*((disp)->SecondaryColor3svEXT)) parameters
-#define GET_SecondaryColor3svEXT(disp) ((disp)->SecondaryColor3svEXT)
-#define SET_SecondaryColor3svEXT(disp, fn) ((disp)->SecondaryColor3svEXT = fn)
-#define CALL_SecondaryColor3ubEXT(disp, parameters) (*((disp)->SecondaryColor3ubEXT)) parameters
-#define GET_SecondaryColor3ubEXT(disp) ((disp)->SecondaryColor3ubEXT)
-#define SET_SecondaryColor3ubEXT(disp, fn) ((disp)->SecondaryColor3ubEXT = fn)
-#define CALL_SecondaryColor3ubvEXT(disp, parameters) (*((disp)->SecondaryColor3ubvEXT)) parameters
-#define GET_SecondaryColor3ubvEXT(disp) ((disp)->SecondaryColor3ubvEXT)
-#define SET_SecondaryColor3ubvEXT(disp, fn) ((disp)->SecondaryColor3ubvEXT = fn)
-#define CALL_SecondaryColor3uiEXT(disp, parameters) (*((disp)->SecondaryColor3uiEXT)) parameters
-#define GET_SecondaryColor3uiEXT(disp) ((disp)->SecondaryColor3uiEXT)
-#define SET_SecondaryColor3uiEXT(disp, fn) ((disp)->SecondaryColor3uiEXT = fn)
-#define CALL_SecondaryColor3uivEXT(disp, parameters) (*((disp)->SecondaryColor3uivEXT)) parameters
-#define GET_SecondaryColor3uivEXT(disp) ((disp)->SecondaryColor3uivEXT)
-#define SET_SecondaryColor3uivEXT(disp, fn) ((disp)->SecondaryColor3uivEXT = fn)
-#define CALL_SecondaryColor3usEXT(disp, parameters) (*((disp)->SecondaryColor3usEXT)) parameters
-#define GET_SecondaryColor3usEXT(disp) ((disp)->SecondaryColor3usEXT)
-#define SET_SecondaryColor3usEXT(disp, fn) ((disp)->SecondaryColor3usEXT = fn)
-#define CALL_SecondaryColor3usvEXT(disp, parameters) (*((disp)->SecondaryColor3usvEXT)) parameters
-#define GET_SecondaryColor3usvEXT(disp) ((disp)->SecondaryColor3usvEXT)
-#define SET_SecondaryColor3usvEXT(disp, fn) ((disp)->SecondaryColor3usvEXT = fn)
-#define CALL_SecondaryColorPointerEXT(disp, parameters) (*((disp)->SecondaryColorPointerEXT)) parameters
-#define GET_SecondaryColorPointerEXT(disp) ((disp)->SecondaryColorPointerEXT)
-#define SET_SecondaryColorPointerEXT(disp, fn) ((disp)->SecondaryColorPointerEXT = fn)
-#define CALL_MultiDrawArraysEXT(disp, parameters) (*((disp)->MultiDrawArraysEXT)) parameters
-#define GET_MultiDrawArraysEXT(disp) ((disp)->MultiDrawArraysEXT)
-#define SET_MultiDrawArraysEXT(disp, fn) ((disp)->MultiDrawArraysEXT = fn)
-#define CALL_MultiDrawElementsEXT(disp, parameters) (*((disp)->MultiDrawElementsEXT)) parameters
-#define GET_MultiDrawElementsEXT(disp) ((disp)->MultiDrawElementsEXT)
-#define SET_MultiDrawElementsEXT(disp, fn) ((disp)->MultiDrawElementsEXT = fn)
-#define CALL_FogCoordPointerEXT(disp, parameters) (*((disp)->FogCoordPointerEXT)) parameters
-#define GET_FogCoordPointerEXT(disp) ((disp)->FogCoordPointerEXT)
-#define SET_FogCoordPointerEXT(disp, fn) ((disp)->FogCoordPointerEXT = fn)
-#define CALL_FogCoorddEXT(disp, parameters) (*((disp)->FogCoorddEXT)) parameters
-#define GET_FogCoorddEXT(disp) ((disp)->FogCoorddEXT)
-#define SET_FogCoorddEXT(disp, fn) ((disp)->FogCoorddEXT = fn)
-#define CALL_FogCoorddvEXT(disp, parameters) (*((disp)->FogCoorddvEXT)) parameters
-#define GET_FogCoorddvEXT(disp) ((disp)->FogCoorddvEXT)
-#define SET_FogCoorddvEXT(disp, fn) ((disp)->FogCoorddvEXT = fn)
-#define CALL_FogCoordfEXT(disp, parameters) (*((disp)->FogCoordfEXT)) parameters
-#define GET_FogCoordfEXT(disp) ((disp)->FogCoordfEXT)
-#define SET_FogCoordfEXT(disp, fn) ((disp)->FogCoordfEXT = fn)
-#define CALL_FogCoordfvEXT(disp, parameters) (*((disp)->FogCoordfvEXT)) parameters
-#define GET_FogCoordfvEXT(disp) ((disp)->FogCoordfvEXT)
-#define SET_FogCoordfvEXT(disp, fn) ((disp)->FogCoordfvEXT = fn)
-#define CALL_PixelTexGenSGIX(disp, parameters) (*((disp)->PixelTexGenSGIX)) parameters
-#define GET_PixelTexGenSGIX(disp) ((disp)->PixelTexGenSGIX)
-#define SET_PixelTexGenSGIX(disp, fn) ((disp)->PixelTexGenSGIX = fn)
-#define CALL_BlendFuncSeparateEXT(disp, parameters) (*((disp)->BlendFuncSeparateEXT)) parameters
-#define GET_BlendFuncSeparateEXT(disp) ((disp)->BlendFuncSeparateEXT)
-#define SET_BlendFuncSeparateEXT(disp, fn) ((disp)->BlendFuncSeparateEXT = fn)
-#define CALL_FlushVertexArrayRangeNV(disp, parameters) (*((disp)->FlushVertexArrayRangeNV)) parameters
-#define GET_FlushVertexArrayRangeNV(disp) ((disp)->FlushVertexArrayRangeNV)
-#define SET_FlushVertexArrayRangeNV(disp, fn) ((disp)->FlushVertexArrayRangeNV = fn)
-#define CALL_VertexArrayRangeNV(disp, parameters) (*((disp)->VertexArrayRangeNV)) parameters
-#define GET_VertexArrayRangeNV(disp) ((disp)->VertexArrayRangeNV)
-#define SET_VertexArrayRangeNV(disp, fn) ((disp)->VertexArrayRangeNV = fn)
-#define CALL_CombinerInputNV(disp, parameters) (*((disp)->CombinerInputNV)) parameters
-#define GET_CombinerInputNV(disp) ((disp)->CombinerInputNV)
-#define SET_CombinerInputNV(disp, fn) ((disp)->CombinerInputNV = fn)
-#define CALL_CombinerOutputNV(disp, parameters) (*((disp)->CombinerOutputNV)) parameters
-#define GET_CombinerOutputNV(disp) ((disp)->CombinerOutputNV)
-#define SET_CombinerOutputNV(disp, fn) ((disp)->CombinerOutputNV = fn)
-#define CALL_CombinerParameterfNV(disp, parameters) (*((disp)->CombinerParameterfNV)) parameters
-#define GET_CombinerParameterfNV(disp) ((disp)->CombinerParameterfNV)
-#define SET_CombinerParameterfNV(disp, fn) ((disp)->CombinerParameterfNV = fn)
-#define CALL_CombinerParameterfvNV(disp, parameters) (*((disp)->CombinerParameterfvNV)) parameters
-#define GET_CombinerParameterfvNV(disp) ((disp)->CombinerParameterfvNV)
-#define SET_CombinerParameterfvNV(disp, fn) ((disp)->CombinerParameterfvNV = fn)
-#define CALL_CombinerParameteriNV(disp, parameters) (*((disp)->CombinerParameteriNV)) parameters
-#define GET_CombinerParameteriNV(disp) ((disp)->CombinerParameteriNV)
-#define SET_CombinerParameteriNV(disp, fn) ((disp)->CombinerParameteriNV = fn)
-#define CALL_CombinerParameterivNV(disp, parameters) (*((disp)->CombinerParameterivNV)) parameters
-#define GET_CombinerParameterivNV(disp) ((disp)->CombinerParameterivNV)
-#define SET_CombinerParameterivNV(disp, fn) ((disp)->CombinerParameterivNV = fn)
-#define CALL_FinalCombinerInputNV(disp, parameters) (*((disp)->FinalCombinerInputNV)) parameters
-#define GET_FinalCombinerInputNV(disp) ((disp)->FinalCombinerInputNV)
-#define SET_FinalCombinerInputNV(disp, fn) ((disp)->FinalCombinerInputNV = fn)
-#define CALL_GetCombinerInputParameterfvNV(disp, parameters) (*((disp)->GetCombinerInputParameterfvNV)) parameters
-#define GET_GetCombinerInputParameterfvNV(disp) ((disp)->GetCombinerInputParameterfvNV)
-#define SET_GetCombinerInputParameterfvNV(disp, fn) ((disp)->GetCombinerInputParameterfvNV = fn)
-#define CALL_GetCombinerInputParameterivNV(disp, parameters) (*((disp)->GetCombinerInputParameterivNV)) parameters
-#define GET_GetCombinerInputParameterivNV(disp) ((disp)->GetCombinerInputParameterivNV)
-#define SET_GetCombinerInputParameterivNV(disp, fn) ((disp)->GetCombinerInputParameterivNV = fn)
-#define CALL_GetCombinerOutputParameterfvNV(disp, parameters) (*((disp)->GetCombinerOutputParameterfvNV)) parameters
-#define GET_GetCombinerOutputParameterfvNV(disp) ((disp)->GetCombinerOutputParameterfvNV)
-#define SET_GetCombinerOutputParameterfvNV(disp, fn) ((disp)->GetCombinerOutputParameterfvNV = fn)
-#define CALL_GetCombinerOutputParameterivNV(disp, parameters) (*((disp)->GetCombinerOutputParameterivNV)) parameters
-#define GET_GetCombinerOutputParameterivNV(disp) ((disp)->GetCombinerOutputParameterivNV)
-#define SET_GetCombinerOutputParameterivNV(disp, fn) ((disp)->GetCombinerOutputParameterivNV = fn)
-#define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) (*((disp)->GetFinalCombinerInputParameterfvNV)) parameters
-#define GET_GetFinalCombinerInputParameterfvNV(disp) ((disp)->GetFinalCombinerInputParameterfvNV)
-#define SET_GetFinalCombinerInputParameterfvNV(disp, fn) ((disp)->GetFinalCombinerInputParameterfvNV = fn)
-#define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) (*((disp)->GetFinalCombinerInputParameterivNV)) parameters
-#define GET_GetFinalCombinerInputParameterivNV(disp) ((disp)->GetFinalCombinerInputParameterivNV)
-#define SET_GetFinalCombinerInputParameterivNV(disp, fn) ((disp)->GetFinalCombinerInputParameterivNV = fn)
-#define CALL_ResizeBuffersMESA(disp, parameters) (*((disp)->ResizeBuffersMESA)) parameters
-#define GET_ResizeBuffersMESA(disp) ((disp)->ResizeBuffersMESA)
-#define SET_ResizeBuffersMESA(disp, fn) ((disp)->ResizeBuffersMESA = fn)
-#define CALL_WindowPos2dMESA(disp, parameters) (*((disp)->WindowPos2dMESA)) parameters
-#define GET_WindowPos2dMESA(disp) ((disp)->WindowPos2dMESA)
-#define SET_WindowPos2dMESA(disp, fn) ((disp)->WindowPos2dMESA = fn)
-#define CALL_WindowPos2dvMESA(disp, parameters) (*((disp)->WindowPos2dvMESA)) parameters
-#define GET_WindowPos2dvMESA(disp) ((disp)->WindowPos2dvMESA)
-#define SET_WindowPos2dvMESA(disp, fn) ((disp)->WindowPos2dvMESA = fn)
-#define CALL_WindowPos2fMESA(disp, parameters) (*((disp)->WindowPos2fMESA)) parameters
-#define GET_WindowPos2fMESA(disp) ((disp)->WindowPos2fMESA)
-#define SET_WindowPos2fMESA(disp, fn) ((disp)->WindowPos2fMESA = fn)
-#define CALL_WindowPos2fvMESA(disp, parameters) (*((disp)->WindowPos2fvMESA)) parameters
-#define GET_WindowPos2fvMESA(disp) ((disp)->WindowPos2fvMESA)
-#define SET_WindowPos2fvMESA(disp, fn) ((disp)->WindowPos2fvMESA = fn)
-#define CALL_WindowPos2iMESA(disp, parameters) (*((disp)->WindowPos2iMESA)) parameters
-#define GET_WindowPos2iMESA(disp) ((disp)->WindowPos2iMESA)
-#define SET_WindowPos2iMESA(disp, fn) ((disp)->WindowPos2iMESA = fn)
-#define CALL_WindowPos2ivMESA(disp, parameters) (*((disp)->WindowPos2ivMESA)) parameters
-#define GET_WindowPos2ivMESA(disp) ((disp)->WindowPos2ivMESA)
-#define SET_WindowPos2ivMESA(disp, fn) ((disp)->WindowPos2ivMESA = fn)
-#define CALL_WindowPos2sMESA(disp, parameters) (*((disp)->WindowPos2sMESA)) parameters
-#define GET_WindowPos2sMESA(disp) ((disp)->WindowPos2sMESA)
-#define SET_WindowPos2sMESA(disp, fn) ((disp)->WindowPos2sMESA = fn)
-#define CALL_WindowPos2svMESA(disp, parameters) (*((disp)->WindowPos2svMESA)) parameters
-#define GET_WindowPos2svMESA(disp) ((disp)->WindowPos2svMESA)
-#define SET_WindowPos2svMESA(disp, fn) ((disp)->WindowPos2svMESA = fn)
-#define CALL_WindowPos3dMESA(disp, parameters) (*((disp)->WindowPos3dMESA)) parameters
-#define GET_WindowPos3dMESA(disp) ((disp)->WindowPos3dMESA)
-#define SET_WindowPos3dMESA(disp, fn) ((disp)->WindowPos3dMESA = fn)
-#define CALL_WindowPos3dvMESA(disp, parameters) (*((disp)->WindowPos3dvMESA)) parameters
-#define GET_WindowPos3dvMESA(disp) ((disp)->WindowPos3dvMESA)
-#define SET_WindowPos3dvMESA(disp, fn) ((disp)->WindowPos3dvMESA = fn)
-#define CALL_WindowPos3fMESA(disp, parameters) (*((disp)->WindowPos3fMESA)) parameters
-#define GET_WindowPos3fMESA(disp) ((disp)->WindowPos3fMESA)
-#define SET_WindowPos3fMESA(disp, fn) ((disp)->WindowPos3fMESA = fn)
-#define CALL_WindowPos3fvMESA(disp, parameters) (*((disp)->WindowPos3fvMESA)) parameters
-#define GET_WindowPos3fvMESA(disp) ((disp)->WindowPos3fvMESA)
-#define SET_WindowPos3fvMESA(disp, fn) ((disp)->WindowPos3fvMESA = fn)
-#define CALL_WindowPos3iMESA(disp, parameters) (*((disp)->WindowPos3iMESA)) parameters
-#define GET_WindowPos3iMESA(disp) ((disp)->WindowPos3iMESA)
-#define SET_WindowPos3iMESA(disp, fn) ((disp)->WindowPos3iMESA = fn)
-#define CALL_WindowPos3ivMESA(disp, parameters) (*((disp)->WindowPos3ivMESA)) parameters
-#define GET_WindowPos3ivMESA(disp) ((disp)->WindowPos3ivMESA)
-#define SET_WindowPos3ivMESA(disp, fn) ((disp)->WindowPos3ivMESA = fn)
-#define CALL_WindowPos3sMESA(disp, parameters) (*((disp)->WindowPos3sMESA)) parameters
-#define GET_WindowPos3sMESA(disp) ((disp)->WindowPos3sMESA)
-#define SET_WindowPos3sMESA(disp, fn) ((disp)->WindowPos3sMESA = fn)
-#define CALL_WindowPos3svMESA(disp, parameters) (*((disp)->WindowPos3svMESA)) parameters
-#define GET_WindowPos3svMESA(disp) ((disp)->WindowPos3svMESA)
-#define SET_WindowPos3svMESA(disp, fn) ((disp)->WindowPos3svMESA = fn)
-#define CALL_WindowPos4dMESA(disp, parameters) (*((disp)->WindowPos4dMESA)) parameters
-#define GET_WindowPos4dMESA(disp) ((disp)->WindowPos4dMESA)
-#define SET_WindowPos4dMESA(disp, fn) ((disp)->WindowPos4dMESA = fn)
-#define CALL_WindowPos4dvMESA(disp, parameters) (*((disp)->WindowPos4dvMESA)) parameters
-#define GET_WindowPos4dvMESA(disp) ((disp)->WindowPos4dvMESA)
-#define SET_WindowPos4dvMESA(disp, fn) ((disp)->WindowPos4dvMESA = fn)
-#define CALL_WindowPos4fMESA(disp, parameters) (*((disp)->WindowPos4fMESA)) parameters
-#define GET_WindowPos4fMESA(disp) ((disp)->WindowPos4fMESA)
-#define SET_WindowPos4fMESA(disp, fn) ((disp)->WindowPos4fMESA = fn)
-#define CALL_WindowPos4fvMESA(disp, parameters) (*((disp)->WindowPos4fvMESA)) parameters
-#define GET_WindowPos4fvMESA(disp) ((disp)->WindowPos4fvMESA)
-#define SET_WindowPos4fvMESA(disp, fn) ((disp)->WindowPos4fvMESA = fn)
-#define CALL_WindowPos4iMESA(disp, parameters) (*((disp)->WindowPos4iMESA)) parameters
-#define GET_WindowPos4iMESA(disp) ((disp)->WindowPos4iMESA)
-#define SET_WindowPos4iMESA(disp, fn) ((disp)->WindowPos4iMESA = fn)
-#define CALL_WindowPos4ivMESA(disp, parameters) (*((disp)->WindowPos4ivMESA)) parameters
-#define GET_WindowPos4ivMESA(disp) ((disp)->WindowPos4ivMESA)
-#define SET_WindowPos4ivMESA(disp, fn) ((disp)->WindowPos4ivMESA = fn)
-#define CALL_WindowPos4sMESA(disp, parameters) (*((disp)->WindowPos4sMESA)) parameters
-#define GET_WindowPos4sMESA(disp) ((disp)->WindowPos4sMESA)
-#define SET_WindowPos4sMESA(disp, fn) ((disp)->WindowPos4sMESA = fn)
-#define CALL_WindowPos4svMESA(disp, parameters) (*((disp)->WindowPos4svMESA)) parameters
-#define GET_WindowPos4svMESA(disp) ((disp)->WindowPos4svMESA)
-#define SET_WindowPos4svMESA(disp, fn) ((disp)->WindowPos4svMESA = fn)
-#define CALL_MultiModeDrawArraysIBM(disp, parameters) (*((disp)->MultiModeDrawArraysIBM)) parameters
-#define GET_MultiModeDrawArraysIBM(disp) ((disp)->MultiModeDrawArraysIBM)
-#define SET_MultiModeDrawArraysIBM(disp, fn) ((disp)->MultiModeDrawArraysIBM = fn)
-#define CALL_MultiModeDrawElementsIBM(disp, parameters) (*((disp)->MultiModeDrawElementsIBM)) parameters
-#define GET_MultiModeDrawElementsIBM(disp) ((disp)->MultiModeDrawElementsIBM)
-#define SET_MultiModeDrawElementsIBM(disp, fn) ((disp)->MultiModeDrawElementsIBM = fn)
-#define CALL_DeleteFencesNV(disp, parameters) (*((disp)->DeleteFencesNV)) parameters
-#define GET_DeleteFencesNV(disp) ((disp)->DeleteFencesNV)
-#define SET_DeleteFencesNV(disp, fn) ((disp)->DeleteFencesNV = fn)
-#define CALL_FinishFenceNV(disp, parameters) (*((disp)->FinishFenceNV)) parameters
-#define GET_FinishFenceNV(disp) ((disp)->FinishFenceNV)
-#define SET_FinishFenceNV(disp, fn) ((disp)->FinishFenceNV = fn)
-#define CALL_GenFencesNV(disp, parameters) (*((disp)->GenFencesNV)) parameters
-#define GET_GenFencesNV(disp) ((disp)->GenFencesNV)
-#define SET_GenFencesNV(disp, fn) ((disp)->GenFencesNV = fn)
-#define CALL_GetFenceivNV(disp, parameters) (*((disp)->GetFenceivNV)) parameters
-#define GET_GetFenceivNV(disp) ((disp)->GetFenceivNV)
-#define SET_GetFenceivNV(disp, fn) ((disp)->GetFenceivNV = fn)
-#define CALL_IsFenceNV(disp, parameters) (*((disp)->IsFenceNV)) parameters
-#define GET_IsFenceNV(disp) ((disp)->IsFenceNV)
-#define SET_IsFenceNV(disp, fn) ((disp)->IsFenceNV = fn)
-#define CALL_SetFenceNV(disp, parameters) (*((disp)->SetFenceNV)) parameters
-#define GET_SetFenceNV(disp) ((disp)->SetFenceNV)
-#define SET_SetFenceNV(disp, fn) ((disp)->SetFenceNV = fn)
-#define CALL_TestFenceNV(disp, parameters) (*((disp)->TestFenceNV)) parameters
-#define GET_TestFenceNV(disp) ((disp)->TestFenceNV)
-#define SET_TestFenceNV(disp, fn) ((disp)->TestFenceNV = fn)
-#define CALL_AreProgramsResidentNV(disp, parameters) (*((disp)->AreProgramsResidentNV)) parameters
-#define GET_AreProgramsResidentNV(disp) ((disp)->AreProgramsResidentNV)
-#define SET_AreProgramsResidentNV(disp, fn) ((disp)->AreProgramsResidentNV = fn)
-#define CALL_BindProgramNV(disp, parameters) (*((disp)->BindProgramNV)) parameters
-#define GET_BindProgramNV(disp) ((disp)->BindProgramNV)
-#define SET_BindProgramNV(disp, fn) ((disp)->BindProgramNV = fn)
-#define CALL_DeleteProgramsNV(disp, parameters) (*((disp)->DeleteProgramsNV)) parameters
-#define GET_DeleteProgramsNV(disp) ((disp)->DeleteProgramsNV)
-#define SET_DeleteProgramsNV(disp, fn) ((disp)->DeleteProgramsNV = fn)
-#define CALL_ExecuteProgramNV(disp, parameters) (*((disp)->ExecuteProgramNV)) parameters
-#define GET_ExecuteProgramNV(disp) ((disp)->ExecuteProgramNV)
-#define SET_ExecuteProgramNV(disp, fn) ((disp)->ExecuteProgramNV = fn)
-#define CALL_GenProgramsNV(disp, parameters) (*((disp)->GenProgramsNV)) parameters
-#define GET_GenProgramsNV(disp) ((disp)->GenProgramsNV)
-#define SET_GenProgramsNV(disp, fn) ((disp)->GenProgramsNV = fn)
-#define CALL_GetProgramParameterdvNV(disp, parameters) (*((disp)->GetProgramParameterdvNV)) parameters
-#define GET_GetProgramParameterdvNV(disp) ((disp)->GetProgramParameterdvNV)
-#define SET_GetProgramParameterdvNV(disp, fn) ((disp)->GetProgramParameterdvNV = fn)
-#define CALL_GetProgramParameterfvNV(disp, parameters) (*((disp)->GetProgramParameterfvNV)) parameters
-#define GET_GetProgramParameterfvNV(disp) ((disp)->GetProgramParameterfvNV)
-#define SET_GetProgramParameterfvNV(disp, fn) ((disp)->GetProgramParameterfvNV = fn)
-#define CALL_GetProgramStringNV(disp, parameters) (*((disp)->GetProgramStringNV)) parameters
-#define GET_GetProgramStringNV(disp) ((disp)->GetProgramStringNV)
-#define SET_GetProgramStringNV(disp, fn) ((disp)->GetProgramStringNV = fn)
-#define CALL_GetProgramivNV(disp, parameters) (*((disp)->GetProgramivNV)) parameters
-#define GET_GetProgramivNV(disp) ((disp)->GetProgramivNV)
-#define SET_GetProgramivNV(disp, fn) ((disp)->GetProgramivNV = fn)
-#define CALL_GetTrackMatrixivNV(disp, parameters) (*((disp)->GetTrackMatrixivNV)) parameters
-#define GET_GetTrackMatrixivNV(disp) ((disp)->GetTrackMatrixivNV)
-#define SET_GetTrackMatrixivNV(disp, fn) ((disp)->GetTrackMatrixivNV = fn)
-#define CALL_GetVertexAttribPointervNV(disp, parameters) (*((disp)->GetVertexAttribPointervNV)) parameters
-#define GET_GetVertexAttribPointervNV(disp) ((disp)->GetVertexAttribPointervNV)
-#define SET_GetVertexAttribPointervNV(disp, fn) ((disp)->GetVertexAttribPointervNV = fn)
-#define CALL_GetVertexAttribdvNV(disp, parameters) (*((disp)->GetVertexAttribdvNV)) parameters
-#define GET_GetVertexAttribdvNV(disp) ((disp)->GetVertexAttribdvNV)
-#define SET_GetVertexAttribdvNV(disp, fn) ((disp)->GetVertexAttribdvNV = fn)
-#define CALL_GetVertexAttribfvNV(disp, parameters) (*((disp)->GetVertexAttribfvNV)) parameters
-#define GET_GetVertexAttribfvNV(disp) ((disp)->GetVertexAttribfvNV)
-#define SET_GetVertexAttribfvNV(disp, fn) ((disp)->GetVertexAttribfvNV = fn)
-#define CALL_GetVertexAttribivNV(disp, parameters) (*((disp)->GetVertexAttribivNV)) parameters
-#define GET_GetVertexAttribivNV(disp) ((disp)->GetVertexAttribivNV)
-#define SET_GetVertexAttribivNV(disp, fn) ((disp)->GetVertexAttribivNV = fn)
-#define CALL_IsProgramNV(disp, parameters) (*((disp)->IsProgramNV)) parameters
-#define GET_IsProgramNV(disp) ((disp)->IsProgramNV)
-#define SET_IsProgramNV(disp, fn) ((disp)->IsProgramNV = fn)
-#define CALL_LoadProgramNV(disp, parameters) (*((disp)->LoadProgramNV)) parameters
-#define GET_LoadProgramNV(disp) ((disp)->LoadProgramNV)
-#define SET_LoadProgramNV(disp, fn) ((disp)->LoadProgramNV = fn)
-#define CALL_ProgramParameters4dvNV(disp, parameters) (*((disp)->ProgramParameters4dvNV)) parameters
-#define GET_ProgramParameters4dvNV(disp) ((disp)->ProgramParameters4dvNV)
-#define SET_ProgramParameters4dvNV(disp, fn) ((disp)->ProgramParameters4dvNV = fn)
-#define CALL_ProgramParameters4fvNV(disp, parameters) (*((disp)->ProgramParameters4fvNV)) parameters
-#define GET_ProgramParameters4fvNV(disp) ((disp)->ProgramParameters4fvNV)
-#define SET_ProgramParameters4fvNV(disp, fn) ((disp)->ProgramParameters4fvNV = fn)
-#define CALL_RequestResidentProgramsNV(disp, parameters) (*((disp)->RequestResidentProgramsNV)) parameters
-#define GET_RequestResidentProgramsNV(disp) ((disp)->RequestResidentProgramsNV)
-#define SET_RequestResidentProgramsNV(disp, fn) ((disp)->RequestResidentProgramsNV = fn)
-#define CALL_TrackMatrixNV(disp, parameters) (*((disp)->TrackMatrixNV)) parameters
-#define GET_TrackMatrixNV(disp) ((disp)->TrackMatrixNV)
-#define SET_TrackMatrixNV(disp, fn) ((disp)->TrackMatrixNV = fn)
-#define CALL_VertexAttrib1dNV(disp, parameters) (*((disp)->VertexAttrib1dNV)) parameters
-#define GET_VertexAttrib1dNV(disp) ((disp)->VertexAttrib1dNV)
-#define SET_VertexAttrib1dNV(disp, fn) ((disp)->VertexAttrib1dNV = fn)
-#define CALL_VertexAttrib1dvNV(disp, parameters) (*((disp)->VertexAttrib1dvNV)) parameters
-#define GET_VertexAttrib1dvNV(disp) ((disp)->VertexAttrib1dvNV)
-#define SET_VertexAttrib1dvNV(disp, fn) ((disp)->VertexAttrib1dvNV = fn)
-#define CALL_VertexAttrib1fNV(disp, parameters) (*((disp)->VertexAttrib1fNV)) parameters
-#define GET_VertexAttrib1fNV(disp) ((disp)->VertexAttrib1fNV)
-#define SET_VertexAttrib1fNV(disp, fn) ((disp)->VertexAttrib1fNV = fn)
-#define CALL_VertexAttrib1fvNV(disp, parameters) (*((disp)->VertexAttrib1fvNV)) parameters
-#define GET_VertexAttrib1fvNV(disp) ((disp)->VertexAttrib1fvNV)
-#define SET_VertexAttrib1fvNV(disp, fn) ((disp)->VertexAttrib1fvNV = fn)
-#define CALL_VertexAttrib1sNV(disp, parameters) (*((disp)->VertexAttrib1sNV)) parameters
-#define GET_VertexAttrib1sNV(disp) ((disp)->VertexAttrib1sNV)
-#define SET_VertexAttrib1sNV(disp, fn) ((disp)->VertexAttrib1sNV = fn)
-#define CALL_VertexAttrib1svNV(disp, parameters) (*((disp)->VertexAttrib1svNV)) parameters
-#define GET_VertexAttrib1svNV(disp) ((disp)->VertexAttrib1svNV)
-#define SET_VertexAttrib1svNV(disp, fn) ((disp)->VertexAttrib1svNV = fn)
-#define CALL_VertexAttrib2dNV(disp, parameters) (*((disp)->VertexAttrib2dNV)) parameters
-#define GET_VertexAttrib2dNV(disp) ((disp)->VertexAttrib2dNV)
-#define SET_VertexAttrib2dNV(disp, fn) ((disp)->VertexAttrib2dNV = fn)
-#define CALL_VertexAttrib2dvNV(disp, parameters) (*((disp)->VertexAttrib2dvNV)) parameters
-#define GET_VertexAttrib2dvNV(disp) ((disp)->VertexAttrib2dvNV)
-#define SET_VertexAttrib2dvNV(disp, fn) ((disp)->VertexAttrib2dvNV = fn)
-#define CALL_VertexAttrib2fNV(disp, parameters) (*((disp)->VertexAttrib2fNV)) parameters
-#define GET_VertexAttrib2fNV(disp) ((disp)->VertexAttrib2fNV)
-#define SET_VertexAttrib2fNV(disp, fn) ((disp)->VertexAttrib2fNV = fn)
-#define CALL_VertexAttrib2fvNV(disp, parameters) (*((disp)->VertexAttrib2fvNV)) parameters
-#define GET_VertexAttrib2fvNV(disp) ((disp)->VertexAttrib2fvNV)
-#define SET_VertexAttrib2fvNV(disp, fn) ((disp)->VertexAttrib2fvNV = fn)
-#define CALL_VertexAttrib2sNV(disp, parameters) (*((disp)->VertexAttrib2sNV)) parameters
-#define GET_VertexAttrib2sNV(disp) ((disp)->VertexAttrib2sNV)
-#define SET_VertexAttrib2sNV(disp, fn) ((disp)->VertexAttrib2sNV = fn)
-#define CALL_VertexAttrib2svNV(disp, parameters) (*((disp)->VertexAttrib2svNV)) parameters
-#define GET_VertexAttrib2svNV(disp) ((disp)->VertexAttrib2svNV)
-#define SET_VertexAttrib2svNV(disp, fn) ((disp)->VertexAttrib2svNV = fn)
-#define CALL_VertexAttrib3dNV(disp, parameters) (*((disp)->VertexAttrib3dNV)) parameters
-#define GET_VertexAttrib3dNV(disp) ((disp)->VertexAttrib3dNV)
-#define SET_VertexAttrib3dNV(disp, fn) ((disp)->VertexAttrib3dNV = fn)
-#define CALL_VertexAttrib3dvNV(disp, parameters) (*((disp)->VertexAttrib3dvNV)) parameters
-#define GET_VertexAttrib3dvNV(disp) ((disp)->VertexAttrib3dvNV)
-#define SET_VertexAttrib3dvNV(disp, fn) ((disp)->VertexAttrib3dvNV = fn)
-#define CALL_VertexAttrib3fNV(disp, parameters) (*((disp)->VertexAttrib3fNV)) parameters
-#define GET_VertexAttrib3fNV(disp) ((disp)->VertexAttrib3fNV)
-#define SET_VertexAttrib3fNV(disp, fn) ((disp)->VertexAttrib3fNV = fn)
-#define CALL_VertexAttrib3fvNV(disp, parameters) (*((disp)->VertexAttrib3fvNV)) parameters
-#define GET_VertexAttrib3fvNV(disp) ((disp)->VertexAttrib3fvNV)
-#define SET_VertexAttrib3fvNV(disp, fn) ((disp)->VertexAttrib3fvNV = fn)
-#define CALL_VertexAttrib3sNV(disp, parameters) (*((disp)->VertexAttrib3sNV)) parameters
-#define GET_VertexAttrib3sNV(disp) ((disp)->VertexAttrib3sNV)
-#define SET_VertexAttrib3sNV(disp, fn) ((disp)->VertexAttrib3sNV = fn)
-#define CALL_VertexAttrib3svNV(disp, parameters) (*((disp)->VertexAttrib3svNV)) parameters
-#define GET_VertexAttrib3svNV(disp) ((disp)->VertexAttrib3svNV)
-#define SET_VertexAttrib3svNV(disp, fn) ((disp)->VertexAttrib3svNV = fn)
-#define CALL_VertexAttrib4dNV(disp, parameters) (*((disp)->VertexAttrib4dNV)) parameters
-#define GET_VertexAttrib4dNV(disp) ((disp)->VertexAttrib4dNV)
-#define SET_VertexAttrib4dNV(disp, fn) ((disp)->VertexAttrib4dNV = fn)
-#define CALL_VertexAttrib4dvNV(disp, parameters) (*((disp)->VertexAttrib4dvNV)) parameters
-#define GET_VertexAttrib4dvNV(disp) ((disp)->VertexAttrib4dvNV)
-#define SET_VertexAttrib4dvNV(disp, fn) ((disp)->VertexAttrib4dvNV = fn)
-#define CALL_VertexAttrib4fNV(disp, parameters) (*((disp)->VertexAttrib4fNV)) parameters
-#define GET_VertexAttrib4fNV(disp) ((disp)->VertexAttrib4fNV)
-#define SET_VertexAttrib4fNV(disp, fn) ((disp)->VertexAttrib4fNV = fn)
-#define CALL_VertexAttrib4fvNV(disp, parameters) (*((disp)->VertexAttrib4fvNV)) parameters
-#define GET_VertexAttrib4fvNV(disp) ((disp)->VertexAttrib4fvNV)
-#define SET_VertexAttrib4fvNV(disp, fn) ((disp)->VertexAttrib4fvNV = fn)
-#define CALL_VertexAttrib4sNV(disp, parameters) (*((disp)->VertexAttrib4sNV)) parameters
-#define GET_VertexAttrib4sNV(disp) ((disp)->VertexAttrib4sNV)
-#define SET_VertexAttrib4sNV(disp, fn) ((disp)->VertexAttrib4sNV = fn)
-#define CALL_VertexAttrib4svNV(disp, parameters) (*((disp)->VertexAttrib4svNV)) parameters
-#define GET_VertexAttrib4svNV(disp) ((disp)->VertexAttrib4svNV)
-#define SET_VertexAttrib4svNV(disp, fn) ((disp)->VertexAttrib4svNV = fn)
-#define CALL_VertexAttrib4ubNV(disp, parameters) (*((disp)->VertexAttrib4ubNV)) parameters
-#define GET_VertexAttrib4ubNV(disp) ((disp)->VertexAttrib4ubNV)
-#define SET_VertexAttrib4ubNV(disp, fn) ((disp)->VertexAttrib4ubNV = fn)
-#define CALL_VertexAttrib4ubvNV(disp, parameters) (*((disp)->VertexAttrib4ubvNV)) parameters
-#define GET_VertexAttrib4ubvNV(disp) ((disp)->VertexAttrib4ubvNV)
-#define SET_VertexAttrib4ubvNV(disp, fn) ((disp)->VertexAttrib4ubvNV = fn)
-#define CALL_VertexAttribPointerNV(disp, parameters) (*((disp)->VertexAttribPointerNV)) parameters
-#define GET_VertexAttribPointerNV(disp) ((disp)->VertexAttribPointerNV)
-#define SET_VertexAttribPointerNV(disp, fn) ((disp)->VertexAttribPointerNV = fn)
-#define CALL_VertexAttribs1dvNV(disp, parameters) (*((disp)->VertexAttribs1dvNV)) parameters
-#define GET_VertexAttribs1dvNV(disp) ((disp)->VertexAttribs1dvNV)
-#define SET_VertexAttribs1dvNV(disp, fn) ((disp)->VertexAttribs1dvNV = fn)
-#define CALL_VertexAttribs1fvNV(disp, parameters) (*((disp)->VertexAttribs1fvNV)) parameters
-#define GET_VertexAttribs1fvNV(disp) ((disp)->VertexAttribs1fvNV)
-#define SET_VertexAttribs1fvNV(disp, fn) ((disp)->VertexAttribs1fvNV = fn)
-#define CALL_VertexAttribs1svNV(disp, parameters) (*((disp)->VertexAttribs1svNV)) parameters
-#define GET_VertexAttribs1svNV(disp) ((disp)->VertexAttribs1svNV)
-#define SET_VertexAttribs1svNV(disp, fn) ((disp)->VertexAttribs1svNV = fn)
-#define CALL_VertexAttribs2dvNV(disp, parameters) (*((disp)->VertexAttribs2dvNV)) parameters
-#define GET_VertexAttribs2dvNV(disp) ((disp)->VertexAttribs2dvNV)
-#define SET_VertexAttribs2dvNV(disp, fn) ((disp)->VertexAttribs2dvNV = fn)
-#define CALL_VertexAttribs2fvNV(disp, parameters) (*((disp)->VertexAttribs2fvNV)) parameters
-#define GET_VertexAttribs2fvNV(disp) ((disp)->VertexAttribs2fvNV)
-#define SET_VertexAttribs2fvNV(disp, fn) ((disp)->VertexAttribs2fvNV = fn)
-#define CALL_VertexAttribs2svNV(disp, parameters) (*((disp)->VertexAttribs2svNV)) parameters
-#define GET_VertexAttribs2svNV(disp) ((disp)->VertexAttribs2svNV)
-#define SET_VertexAttribs2svNV(disp, fn) ((disp)->VertexAttribs2svNV = fn)
-#define CALL_VertexAttribs3dvNV(disp, parameters) (*((disp)->VertexAttribs3dvNV)) parameters
-#define GET_VertexAttribs3dvNV(disp) ((disp)->VertexAttribs3dvNV)
-#define SET_VertexAttribs3dvNV(disp, fn) ((disp)->VertexAttribs3dvNV = fn)
-#define CALL_VertexAttribs3fvNV(disp, parameters) (*((disp)->VertexAttribs3fvNV)) parameters
-#define GET_VertexAttribs3fvNV(disp) ((disp)->VertexAttribs3fvNV)
-#define SET_VertexAttribs3fvNV(disp, fn) ((disp)->VertexAttribs3fvNV = fn)
-#define CALL_VertexAttribs3svNV(disp, parameters) (*((disp)->VertexAttribs3svNV)) parameters
-#define GET_VertexAttribs3svNV(disp) ((disp)->VertexAttribs3svNV)
-#define SET_VertexAttribs3svNV(disp, fn) ((disp)->VertexAttribs3svNV = fn)
-#define CALL_VertexAttribs4dvNV(disp, parameters) (*((disp)->VertexAttribs4dvNV)) parameters
-#define GET_VertexAttribs4dvNV(disp) ((disp)->VertexAttribs4dvNV)
-#define SET_VertexAttribs4dvNV(disp, fn) ((disp)->VertexAttribs4dvNV = fn)
-#define CALL_VertexAttribs4fvNV(disp, parameters) (*((disp)->VertexAttribs4fvNV)) parameters
-#define GET_VertexAttribs4fvNV(disp) ((disp)->VertexAttribs4fvNV)
-#define SET_VertexAttribs4fvNV(disp, fn) ((disp)->VertexAttribs4fvNV = fn)
-#define CALL_VertexAttribs4svNV(disp, parameters) (*((disp)->VertexAttribs4svNV)) parameters
-#define GET_VertexAttribs4svNV(disp) ((disp)->VertexAttribs4svNV)
-#define SET_VertexAttribs4svNV(disp, fn) ((disp)->VertexAttribs4svNV = fn)
-#define CALL_VertexAttribs4ubvNV(disp, parameters) (*((disp)->VertexAttribs4ubvNV)) parameters
-#define GET_VertexAttribs4ubvNV(disp) ((disp)->VertexAttribs4ubvNV)
-#define SET_VertexAttribs4ubvNV(disp, fn) ((disp)->VertexAttribs4ubvNV = fn)
-#define CALL_AlphaFragmentOp1ATI(disp, parameters) (*((disp)->AlphaFragmentOp1ATI)) parameters
-#define GET_AlphaFragmentOp1ATI(disp) ((disp)->AlphaFragmentOp1ATI)
-#define SET_AlphaFragmentOp1ATI(disp, fn) ((disp)->AlphaFragmentOp1ATI = fn)
-#define CALL_AlphaFragmentOp2ATI(disp, parameters) (*((disp)->AlphaFragmentOp2ATI)) parameters
-#define GET_AlphaFragmentOp2ATI(disp) ((disp)->AlphaFragmentOp2ATI)
-#define SET_AlphaFragmentOp2ATI(disp, fn) ((disp)->AlphaFragmentOp2ATI = fn)
-#define CALL_AlphaFragmentOp3ATI(disp, parameters) (*((disp)->AlphaFragmentOp3ATI)) parameters
-#define GET_AlphaFragmentOp3ATI(disp) ((disp)->AlphaFragmentOp3ATI)
-#define SET_AlphaFragmentOp3ATI(disp, fn) ((disp)->AlphaFragmentOp3ATI = fn)
-#define CALL_BeginFragmentShaderATI(disp, parameters) (*((disp)->BeginFragmentShaderATI)) parameters
-#define GET_BeginFragmentShaderATI(disp) ((disp)->BeginFragmentShaderATI)
-#define SET_BeginFragmentShaderATI(disp, fn) ((disp)->BeginFragmentShaderATI = fn)
-#define CALL_BindFragmentShaderATI(disp, parameters) (*((disp)->BindFragmentShaderATI)) parameters
-#define GET_BindFragmentShaderATI(disp) ((disp)->BindFragmentShaderATI)
-#define SET_BindFragmentShaderATI(disp, fn) ((disp)->BindFragmentShaderATI = fn)
-#define CALL_ColorFragmentOp1ATI(disp, parameters) (*((disp)->ColorFragmentOp1ATI)) parameters
-#define GET_ColorFragmentOp1ATI(disp) ((disp)->ColorFragmentOp1ATI)
-#define SET_ColorFragmentOp1ATI(disp, fn) ((disp)->ColorFragmentOp1ATI = fn)
-#define CALL_ColorFragmentOp2ATI(disp, parameters) (*((disp)->ColorFragmentOp2ATI)) parameters
-#define GET_ColorFragmentOp2ATI(disp) ((disp)->ColorFragmentOp2ATI)
-#define SET_ColorFragmentOp2ATI(disp, fn) ((disp)->ColorFragmentOp2ATI = fn)
-#define CALL_ColorFragmentOp3ATI(disp, parameters) (*((disp)->ColorFragmentOp3ATI)) parameters
-#define GET_ColorFragmentOp3ATI(disp) ((disp)->ColorFragmentOp3ATI)
-#define SET_ColorFragmentOp3ATI(disp, fn) ((disp)->ColorFragmentOp3ATI = fn)
-#define CALL_DeleteFragmentShaderATI(disp, parameters) (*((disp)->DeleteFragmentShaderATI)) parameters
-#define GET_DeleteFragmentShaderATI(disp) ((disp)->DeleteFragmentShaderATI)
-#define SET_DeleteFragmentShaderATI(disp, fn) ((disp)->DeleteFragmentShaderATI = fn)
-#define CALL_EndFragmentShaderATI(disp, parameters) (*((disp)->EndFragmentShaderATI)) parameters
-#define GET_EndFragmentShaderATI(disp) ((disp)->EndFragmentShaderATI)
-#define SET_EndFragmentShaderATI(disp, fn) ((disp)->EndFragmentShaderATI = fn)
-#define CALL_GenFragmentShadersATI(disp, parameters) (*((disp)->GenFragmentShadersATI)) parameters
-#define GET_GenFragmentShadersATI(disp) ((disp)->GenFragmentShadersATI)
-#define SET_GenFragmentShadersATI(disp, fn) ((disp)->GenFragmentShadersATI = fn)
-#define CALL_PassTexCoordATI(disp, parameters) (*((disp)->PassTexCoordATI)) parameters
-#define GET_PassTexCoordATI(disp) ((disp)->PassTexCoordATI)
-#define SET_PassTexCoordATI(disp, fn) ((disp)->PassTexCoordATI = fn)
-#define CALL_SampleMapATI(disp, parameters) (*((disp)->SampleMapATI)) parameters
-#define GET_SampleMapATI(disp) ((disp)->SampleMapATI)
-#define SET_SampleMapATI(disp, fn) ((disp)->SampleMapATI = fn)
-#define CALL_SetFragmentShaderConstantATI(disp, parameters) (*((disp)->SetFragmentShaderConstantATI)) parameters
-#define GET_SetFragmentShaderConstantATI(disp) ((disp)->SetFragmentShaderConstantATI)
-#define SET_SetFragmentShaderConstantATI(disp, fn) ((disp)->SetFragmentShaderConstantATI = fn)
-#define CALL_PointParameteriNV(disp, parameters) (*((disp)->PointParameteriNV)) parameters
-#define GET_PointParameteriNV(disp) ((disp)->PointParameteriNV)
-#define SET_PointParameteriNV(disp, fn) ((disp)->PointParameteriNV = fn)
-#define CALL_PointParameterivNV(disp, parameters) (*((disp)->PointParameterivNV)) parameters
-#define GET_PointParameterivNV(disp) ((disp)->PointParameterivNV)
-#define SET_PointParameterivNV(disp, fn) ((disp)->PointParameterivNV = fn)
-#define CALL_ActiveStencilFaceEXT(disp, parameters) (*((disp)->ActiveStencilFaceEXT)) parameters
-#define GET_ActiveStencilFaceEXT(disp) ((disp)->ActiveStencilFaceEXT)
-#define SET_ActiveStencilFaceEXT(disp, fn) ((disp)->ActiveStencilFaceEXT = fn)
-#define CALL_BindVertexArrayAPPLE(disp, parameters) (*((disp)->BindVertexArrayAPPLE)) parameters
-#define GET_BindVertexArrayAPPLE(disp) ((disp)->BindVertexArrayAPPLE)
-#define SET_BindVertexArrayAPPLE(disp, fn) ((disp)->BindVertexArrayAPPLE = fn)
-#define CALL_DeleteVertexArraysAPPLE(disp, parameters) (*((disp)->DeleteVertexArraysAPPLE)) parameters
-#define GET_DeleteVertexArraysAPPLE(disp) ((disp)->DeleteVertexArraysAPPLE)
-#define SET_DeleteVertexArraysAPPLE(disp, fn) ((disp)->DeleteVertexArraysAPPLE = fn)
-#define CALL_GenVertexArraysAPPLE(disp, parameters) (*((disp)->GenVertexArraysAPPLE)) parameters
-#define GET_GenVertexArraysAPPLE(disp) ((disp)->GenVertexArraysAPPLE)
-#define SET_GenVertexArraysAPPLE(disp, fn) ((disp)->GenVertexArraysAPPLE = fn)
-#define CALL_IsVertexArrayAPPLE(disp, parameters) (*((disp)->IsVertexArrayAPPLE)) parameters
-#define GET_IsVertexArrayAPPLE(disp) ((disp)->IsVertexArrayAPPLE)
-#define SET_IsVertexArrayAPPLE(disp, fn) ((disp)->IsVertexArrayAPPLE = fn)
-#define CALL_GetProgramNamedParameterdvNV(disp, parameters) (*((disp)->GetProgramNamedParameterdvNV)) parameters
-#define GET_GetProgramNamedParameterdvNV(disp) ((disp)->GetProgramNamedParameterdvNV)
-#define SET_GetProgramNamedParameterdvNV(disp, fn) ((disp)->GetProgramNamedParameterdvNV = fn)
-#define CALL_GetProgramNamedParameterfvNV(disp, parameters) (*((disp)->GetProgramNamedParameterfvNV)) parameters
-#define GET_GetProgramNamedParameterfvNV(disp) ((disp)->GetProgramNamedParameterfvNV)
-#define SET_GetProgramNamedParameterfvNV(disp, fn) ((disp)->GetProgramNamedParameterfvNV = fn)
-#define CALL_ProgramNamedParameter4dNV(disp, parameters) (*((disp)->ProgramNamedParameter4dNV)) parameters
-#define GET_ProgramNamedParameter4dNV(disp) ((disp)->ProgramNamedParameter4dNV)
-#define SET_ProgramNamedParameter4dNV(disp, fn) ((disp)->ProgramNamedParameter4dNV = fn)
-#define CALL_ProgramNamedParameter4dvNV(disp, parameters) (*((disp)->ProgramNamedParameter4dvNV)) parameters
-#define GET_ProgramNamedParameter4dvNV(disp) ((disp)->ProgramNamedParameter4dvNV)
-#define SET_ProgramNamedParameter4dvNV(disp, fn) ((disp)->ProgramNamedParameter4dvNV = fn)
-#define CALL_ProgramNamedParameter4fNV(disp, parameters) (*((disp)->ProgramNamedParameter4fNV)) parameters
-#define GET_ProgramNamedParameter4fNV(disp) ((disp)->ProgramNamedParameter4fNV)
-#define SET_ProgramNamedParameter4fNV(disp, fn) ((disp)->ProgramNamedParameter4fNV = fn)
-#define CALL_ProgramNamedParameter4fvNV(disp, parameters) (*((disp)->ProgramNamedParameter4fvNV)) parameters
-#define GET_ProgramNamedParameter4fvNV(disp) ((disp)->ProgramNamedParameter4fvNV)
-#define SET_ProgramNamedParameter4fvNV(disp, fn) ((disp)->ProgramNamedParameter4fvNV = fn)
-#define CALL_DepthBoundsEXT(disp, parameters) (*((disp)->DepthBoundsEXT)) parameters
-#define GET_DepthBoundsEXT(disp) ((disp)->DepthBoundsEXT)
-#define SET_DepthBoundsEXT(disp, fn) ((disp)->DepthBoundsEXT = fn)
-#define CALL_BlendEquationSeparateEXT(disp, parameters) (*((disp)->BlendEquationSeparateEXT)) parameters
-#define GET_BlendEquationSeparateEXT(disp) ((disp)->BlendEquationSeparateEXT)
-#define SET_BlendEquationSeparateEXT(disp, fn) ((disp)->BlendEquationSeparateEXT = fn)
-#define CALL_BindFramebufferEXT(disp, parameters) (*((disp)->BindFramebufferEXT)) parameters
-#define GET_BindFramebufferEXT(disp) ((disp)->BindFramebufferEXT)
-#define SET_BindFramebufferEXT(disp, fn) ((disp)->BindFramebufferEXT = fn)
-#define CALL_BindRenderbufferEXT(disp, parameters) (*((disp)->BindRenderbufferEXT)) parameters
-#define GET_BindRenderbufferEXT(disp) ((disp)->BindRenderbufferEXT)
-#define SET_BindRenderbufferEXT(disp, fn) ((disp)->BindRenderbufferEXT = fn)
-#define CALL_CheckFramebufferStatusEXT(disp, parameters) (*((disp)->CheckFramebufferStatusEXT)) parameters
-#define GET_CheckFramebufferStatusEXT(disp) ((disp)->CheckFramebufferStatusEXT)
-#define SET_CheckFramebufferStatusEXT(disp, fn) ((disp)->CheckFramebufferStatusEXT = fn)
-#define CALL_DeleteFramebuffersEXT(disp, parameters) (*((disp)->DeleteFramebuffersEXT)) parameters
-#define GET_DeleteFramebuffersEXT(disp) ((disp)->DeleteFramebuffersEXT)
-#define SET_DeleteFramebuffersEXT(disp, fn) ((disp)->DeleteFramebuffersEXT = fn)
-#define CALL_DeleteRenderbuffersEXT(disp, parameters) (*((disp)->DeleteRenderbuffersEXT)) parameters
-#define GET_DeleteRenderbuffersEXT(disp) ((disp)->DeleteRenderbuffersEXT)
-#define SET_DeleteRenderbuffersEXT(disp, fn) ((disp)->DeleteRenderbuffersEXT = fn)
-#define CALL_FramebufferRenderbufferEXT(disp, parameters) (*((disp)->FramebufferRenderbufferEXT)) parameters
-#define GET_FramebufferRenderbufferEXT(disp) ((disp)->FramebufferRenderbufferEXT)
-#define SET_FramebufferRenderbufferEXT(disp, fn) ((disp)->FramebufferRenderbufferEXT = fn)
-#define CALL_FramebufferTexture1DEXT(disp, parameters) (*((disp)->FramebufferTexture1DEXT)) parameters
-#define GET_FramebufferTexture1DEXT(disp) ((disp)->FramebufferTexture1DEXT)
-#define SET_FramebufferTexture1DEXT(disp, fn) ((disp)->FramebufferTexture1DEXT = fn)
-#define CALL_FramebufferTexture2DEXT(disp, parameters) (*((disp)->FramebufferTexture2DEXT)) parameters
-#define GET_FramebufferTexture2DEXT(disp) ((disp)->FramebufferTexture2DEXT)
-#define SET_FramebufferTexture2DEXT(disp, fn) ((disp)->FramebufferTexture2DEXT = fn)
-#define CALL_FramebufferTexture3DEXT(disp, parameters) (*((disp)->FramebufferTexture3DEXT)) parameters
-#define GET_FramebufferTexture3DEXT(disp) ((disp)->FramebufferTexture3DEXT)
-#define SET_FramebufferTexture3DEXT(disp, fn) ((disp)->FramebufferTexture3DEXT = fn)
-#define CALL_GenFramebuffersEXT(disp, parameters) (*((disp)->GenFramebuffersEXT)) parameters
-#define GET_GenFramebuffersEXT(disp) ((disp)->GenFramebuffersEXT)
-#define SET_GenFramebuffersEXT(disp, fn) ((disp)->GenFramebuffersEXT = fn)
-#define CALL_GenRenderbuffersEXT(disp, parameters) (*((disp)->GenRenderbuffersEXT)) parameters
-#define GET_GenRenderbuffersEXT(disp) ((disp)->GenRenderbuffersEXT)
-#define SET_GenRenderbuffersEXT(disp, fn) ((disp)->GenRenderbuffersEXT = fn)
-#define CALL_GenerateMipmapEXT(disp, parameters) (*((disp)->GenerateMipmapEXT)) parameters
-#define GET_GenerateMipmapEXT(disp) ((disp)->GenerateMipmapEXT)
-#define SET_GenerateMipmapEXT(disp, fn) ((disp)->GenerateMipmapEXT = fn)
-#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) (*((disp)->GetFramebufferAttachmentParameterivEXT)) parameters
-#define GET_GetFramebufferAttachmentParameterivEXT(disp) ((disp)->GetFramebufferAttachmentParameterivEXT)
-#define SET_GetFramebufferAttachmentParameterivEXT(disp, fn) ((disp)->GetFramebufferAttachmentParameterivEXT = fn)
-#define CALL_GetRenderbufferParameterivEXT(disp, parameters) (*((disp)->GetRenderbufferParameterivEXT)) parameters
-#define GET_GetRenderbufferParameterivEXT(disp) ((disp)->GetRenderbufferParameterivEXT)
-#define SET_GetRenderbufferParameterivEXT(disp, fn) ((disp)->GetRenderbufferParameterivEXT = fn)
-#define CALL_IsFramebufferEXT(disp, parameters) (*((disp)->IsFramebufferEXT)) parameters
-#define GET_IsFramebufferEXT(disp) ((disp)->IsFramebufferEXT)
-#define SET_IsFramebufferEXT(disp, fn) ((disp)->IsFramebufferEXT = fn)
-#define CALL_IsRenderbufferEXT(disp, parameters) (*((disp)->IsRenderbufferEXT)) parameters
-#define GET_IsRenderbufferEXT(disp) ((disp)->IsRenderbufferEXT)
-#define SET_IsRenderbufferEXT(disp, fn) ((disp)->IsRenderbufferEXT = fn)
-#define CALL_RenderbufferStorageEXT(disp, parameters) (*((disp)->RenderbufferStorageEXT)) parameters
-#define GET_RenderbufferStorageEXT(disp) ((disp)->RenderbufferStorageEXT)
-#define SET_RenderbufferStorageEXT(disp, fn) ((disp)->RenderbufferStorageEXT = fn)
-#define CALL_BlitFramebufferEXT(disp, parameters) (*((disp)->BlitFramebufferEXT)) parameters
-#define GET_BlitFramebufferEXT(disp) ((disp)->BlitFramebufferEXT)
-#define SET_BlitFramebufferEXT(disp, fn) ((disp)->BlitFramebufferEXT = fn)
-#define CALL_FramebufferTextureLayerEXT(disp, parameters) (*((disp)->FramebufferTextureLayerEXT)) parameters
-#define GET_FramebufferTextureLayerEXT(disp) ((disp)->FramebufferTextureLayerEXT)
-#define SET_FramebufferTextureLayerEXT(disp, fn) ((disp)->FramebufferTextureLayerEXT = fn)
-#define CALL_StencilFuncSeparateATI(disp, parameters) (*((disp)->StencilFuncSeparateATI)) parameters
-#define GET_StencilFuncSeparateATI(disp) ((disp)->StencilFuncSeparateATI)
-#define SET_StencilFuncSeparateATI(disp, fn) ((disp)->StencilFuncSeparateATI = fn)
-#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) (*((disp)->ProgramEnvParameters4fvEXT)) parameters
-#define GET_ProgramEnvParameters4fvEXT(disp) ((disp)->ProgramEnvParameters4fvEXT)
-#define SET_ProgramEnvParameters4fvEXT(disp, fn) ((disp)->ProgramEnvParameters4fvEXT = fn)
-#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) (*((disp)->ProgramLocalParameters4fvEXT)) parameters
-#define GET_ProgramLocalParameters4fvEXT(disp) ((disp)->ProgramLocalParameters4fvEXT)
-#define SET_ProgramLocalParameters4fvEXT(disp, fn) ((disp)->ProgramLocalParameters4fvEXT = fn)
-#define CALL_GetQueryObjecti64vEXT(disp, parameters) (*((disp)->GetQueryObjecti64vEXT)) parameters
-#define GET_GetQueryObjecti64vEXT(disp) ((disp)->GetQueryObjecti64vEXT)
-#define SET_GetQueryObjecti64vEXT(disp, fn) ((disp)->GetQueryObjecti64vEXT = fn)
-#define CALL_GetQueryObjectui64vEXT(disp, parameters) (*((disp)->GetQueryObjectui64vEXT)) parameters
-#define GET_GetQueryObjectui64vEXT(disp) ((disp)->GetQueryObjectui64vEXT)
-#define SET_GetQueryObjectui64vEXT(disp, fn) ((disp)->GetQueryObjectui64vEXT = fn)
+#if !defined(_GLAPI_USE_REMAP_TABLE)
-#else
+#define _gloffset_AttachShader 408
+#define _gloffset_CreateProgram 409
+#define _gloffset_CreateShader 410
+#define _gloffset_DeleteProgram 411
+#define _gloffset_DeleteShader 412
+#define _gloffset_DetachShader 413
+#define _gloffset_GetAttachedShaders 414
+#define _gloffset_GetProgramInfoLog 415
+#define _gloffset_GetProgramiv 416
+#define _gloffset_GetShaderInfoLog 417
+#define _gloffset_GetShaderiv 418
+#define _gloffset_IsProgram 419
+#define _gloffset_IsShader 420
+#define _gloffset_StencilFuncSeparate 421
+#define _gloffset_StencilMaskSeparate 422
+#define _gloffset_StencilOpSeparate 423
+#define _gloffset_UniformMatrix2x3fv 424
+#define _gloffset_UniformMatrix2x4fv 425
+#define _gloffset_UniformMatrix3x2fv 426
+#define _gloffset_UniformMatrix3x4fv 427
+#define _gloffset_UniformMatrix4x2fv 428
+#define _gloffset_UniformMatrix4x3fv 429
+#define _gloffset_ClampColor 430
+#define _gloffset_ClearBufferfi 431
+#define _gloffset_ClearBufferfv 432
+#define _gloffset_ClearBufferiv 433
+#define _gloffset_ClearBufferuiv 434
+#define _gloffset_GetStringi 435
+#define _gloffset_TexBuffer 436
+#define _gloffset_FramebufferTexture 437
+#define _gloffset_GetBufferParameteri64v 438
+#define _gloffset_GetInteger64i_v 439
+#define _gloffset_VertexAttribDivisor 440
+#define _gloffset_LoadTransposeMatrixdARB 441
+#define _gloffset_LoadTransposeMatrixfARB 442
+#define _gloffset_MultTransposeMatrixdARB 443
+#define _gloffset_MultTransposeMatrixfARB 444
+#define _gloffset_SampleCoverageARB 445
+#define _gloffset_CompressedTexImage1DARB 446
+#define _gloffset_CompressedTexImage2DARB 447
+#define _gloffset_CompressedTexImage3DARB 448
+#define _gloffset_CompressedTexSubImage1DARB 449
+#define _gloffset_CompressedTexSubImage2DARB 450
+#define _gloffset_CompressedTexSubImage3DARB 451
+#define _gloffset_GetCompressedTexImageARB 452
+#define _gloffset_DisableVertexAttribArrayARB 453
+#define _gloffset_EnableVertexAttribArrayARB 454
+#define _gloffset_GetProgramEnvParameterdvARB 455
+#define _gloffset_GetProgramEnvParameterfvARB 456
+#define _gloffset_GetProgramLocalParameterdvARB 457
+#define _gloffset_GetProgramLocalParameterfvARB 458
+#define _gloffset_GetProgramStringARB 459
+#define _gloffset_GetProgramivARB 460
+#define _gloffset_GetVertexAttribdvARB 461
+#define _gloffset_GetVertexAttribfvARB 462
+#define _gloffset_GetVertexAttribivARB 463
+#define _gloffset_ProgramEnvParameter4dARB 464
+#define _gloffset_ProgramEnvParameter4dvARB 465
+#define _gloffset_ProgramEnvParameter4fARB 466
+#define _gloffset_ProgramEnvParameter4fvARB 467
+#define _gloffset_ProgramLocalParameter4dARB 468
+#define _gloffset_ProgramLocalParameter4dvARB 469
+#define _gloffset_ProgramLocalParameter4fARB 470
+#define _gloffset_ProgramLocalParameter4fvARB 471
+#define _gloffset_ProgramStringARB 472
+#define _gloffset_VertexAttrib1dARB 473
+#define _gloffset_VertexAttrib1dvARB 474
+#define _gloffset_VertexAttrib1fARB 475
+#define _gloffset_VertexAttrib1fvARB 476
+#define _gloffset_VertexAttrib1sARB 477
+#define _gloffset_VertexAttrib1svARB 478
+#define _gloffset_VertexAttrib2dARB 479
+#define _gloffset_VertexAttrib2dvARB 480
+#define _gloffset_VertexAttrib2fARB 481
+#define _gloffset_VertexAttrib2fvARB 482
+#define _gloffset_VertexAttrib2sARB 483
+#define _gloffset_VertexAttrib2svARB 484
+#define _gloffset_VertexAttrib3dARB 485
+#define _gloffset_VertexAttrib3dvARB 486
+#define _gloffset_VertexAttrib3fARB 487
+#define _gloffset_VertexAttrib3fvARB 488
+#define _gloffset_VertexAttrib3sARB 489
+#define _gloffset_VertexAttrib3svARB 490
+#define _gloffset_VertexAttrib4NbvARB 491
+#define _gloffset_VertexAttrib4NivARB 492
+#define _gloffset_VertexAttrib4NsvARB 493
+#define _gloffset_VertexAttrib4NubARB 494
+#define _gloffset_VertexAttrib4NubvARB 495
+#define _gloffset_VertexAttrib4NuivARB 496
+#define _gloffset_VertexAttrib4NusvARB 497
+#define _gloffset_VertexAttrib4bvARB 498
+#define _gloffset_VertexAttrib4dARB 499
+#define _gloffset_VertexAttrib4dvARB 500
+#define _gloffset_VertexAttrib4fARB 501
+#define _gloffset_VertexAttrib4fvARB 502
+#define _gloffset_VertexAttrib4ivARB 503
+#define _gloffset_VertexAttrib4sARB 504
+#define _gloffset_VertexAttrib4svARB 505
+#define _gloffset_VertexAttrib4ubvARB 506
+#define _gloffset_VertexAttrib4uivARB 507
+#define _gloffset_VertexAttrib4usvARB 508
+#define _gloffset_VertexAttribPointerARB 509
+#define _gloffset_BindBufferARB 510
+#define _gloffset_BufferDataARB 511
+#define _gloffset_BufferSubDataARB 512
+#define _gloffset_DeleteBuffersARB 513
+#define _gloffset_GenBuffersARB 514
+#define _gloffset_GetBufferParameterivARB 515
+#define _gloffset_GetBufferPointervARB 516
+#define _gloffset_GetBufferSubDataARB 517
+#define _gloffset_IsBufferARB 518
+#define _gloffset_MapBufferARB 519
+#define _gloffset_UnmapBufferARB 520
+#define _gloffset_BeginQueryARB 521
+#define _gloffset_DeleteQueriesARB 522
+#define _gloffset_EndQueryARB 523
+#define _gloffset_GenQueriesARB 524
+#define _gloffset_GetQueryObjectivARB 525
+#define _gloffset_GetQueryObjectuivARB 526
+#define _gloffset_GetQueryivARB 527
+#define _gloffset_IsQueryARB 528
+#define _gloffset_AttachObjectARB 529
+#define _gloffset_CompileShaderARB 530
+#define _gloffset_CreateProgramObjectARB 531
+#define _gloffset_CreateShaderObjectARB 532
+#define _gloffset_DeleteObjectARB 533
+#define _gloffset_DetachObjectARB 534
+#define _gloffset_GetActiveUniformARB 535
+#define _gloffset_GetAttachedObjectsARB 536
+#define _gloffset_GetHandleARB 537
+#define _gloffset_GetInfoLogARB 538
+#define _gloffset_GetObjectParameterfvARB 539
+#define _gloffset_GetObjectParameterivARB 540
+#define _gloffset_GetShaderSourceARB 541
+#define _gloffset_GetUniformLocationARB 542
+#define _gloffset_GetUniformfvARB 543
+#define _gloffset_GetUniformivARB 544
+#define _gloffset_LinkProgramARB 545
+#define _gloffset_ShaderSourceARB 546
+#define _gloffset_Uniform1fARB 547
+#define _gloffset_Uniform1fvARB 548
+#define _gloffset_Uniform1iARB 549
+#define _gloffset_Uniform1ivARB 550
+#define _gloffset_Uniform2fARB 551
+#define _gloffset_Uniform2fvARB 552
+#define _gloffset_Uniform2iARB 553
+#define _gloffset_Uniform2ivARB 554
+#define _gloffset_Uniform3fARB 555
+#define _gloffset_Uniform3fvARB 556
+#define _gloffset_Uniform3iARB 557
+#define _gloffset_Uniform3ivARB 558
+#define _gloffset_Uniform4fARB 559
+#define _gloffset_Uniform4fvARB 560
+#define _gloffset_Uniform4iARB 561
+#define _gloffset_Uniform4ivARB 562
+#define _gloffset_UniformMatrix2fvARB 563
+#define _gloffset_UniformMatrix3fvARB 564
+#define _gloffset_UniformMatrix4fvARB 565
+#define _gloffset_UseProgramObjectARB 566
+#define _gloffset_ValidateProgramARB 567
+#define _gloffset_BindAttribLocationARB 568
+#define _gloffset_GetActiveAttribARB 569
+#define _gloffset_GetAttribLocationARB 570
+#define _gloffset_DrawBuffersARB 571
+#define _gloffset_DrawArraysInstancedARB 572
+#define _gloffset_DrawElementsInstancedARB 573
+#define _gloffset_RenderbufferStorageMultisample 574
+#define _gloffset_FramebufferTextureARB 575
+#define _gloffset_FramebufferTextureFaceARB 576
+#define _gloffset_ProgramParameteriARB 577
+#define _gloffset_VertexAttribDivisorARB 578
+#define _gloffset_FlushMappedBufferRange 579
+#define _gloffset_MapBufferRange 580
+#define _gloffset_BindVertexArray 581
+#define _gloffset_GenVertexArrays 582
+#define _gloffset_CopyBufferSubData 583
+#define _gloffset_ClientWaitSync 584
+#define _gloffset_DeleteSync 585
+#define _gloffset_FenceSync 586
+#define _gloffset_GetInteger64v 587
+#define _gloffset_GetSynciv 588
+#define _gloffset_IsSync 589
+#define _gloffset_WaitSync 590
+#define _gloffset_DrawElementsBaseVertex 591
+#define _gloffset_DrawRangeElementsBaseVertex 592
+#define _gloffset_MultiDrawElementsBaseVertex 593
+#define _gloffset_BlendEquationSeparateiARB 594
+#define _gloffset_BlendEquationiARB 595
+#define _gloffset_BlendFuncSeparateiARB 596
+#define _gloffset_BlendFunciARB 597
+#define _gloffset_BindTransformFeedback 598
+#define _gloffset_DeleteTransformFeedbacks 599
+#define _gloffset_DrawTransformFeedback 600
+#define _gloffset_GenTransformFeedbacks 601
+#define _gloffset_IsTransformFeedback 602
+#define _gloffset_PauseTransformFeedback 603
+#define _gloffset_ResumeTransformFeedback 604
+#define _gloffset_ClearDepthf 605
+#define _gloffset_DepthRangef 606
+#define _gloffset_GetShaderPrecisionFormat 607
+#define _gloffset_ReleaseShaderCompiler 608
+#define _gloffset_ShaderBinary 609
+#define _gloffset_PolygonOffsetEXT 610
+#define _gloffset_GetPixelTexGenParameterfvSGIS 611
+#define _gloffset_GetPixelTexGenParameterivSGIS 612
+#define _gloffset_PixelTexGenParameterfSGIS 613
+#define _gloffset_PixelTexGenParameterfvSGIS 614
+#define _gloffset_PixelTexGenParameteriSGIS 615
+#define _gloffset_PixelTexGenParameterivSGIS 616
+#define _gloffset_SampleMaskSGIS 617
+#define _gloffset_SamplePatternSGIS 618
+#define _gloffset_ColorPointerEXT 619
+#define _gloffset_EdgeFlagPointerEXT 620
+#define _gloffset_IndexPointerEXT 621
+#define _gloffset_NormalPointerEXT 622
+#define _gloffset_TexCoordPointerEXT 623
+#define _gloffset_VertexPointerEXT 624
+#define _gloffset_PointParameterfEXT 625
+#define _gloffset_PointParameterfvEXT 626
+#define _gloffset_LockArraysEXT 627
+#define _gloffset_UnlockArraysEXT 628
+#define _gloffset_SecondaryColor3bEXT 629
+#define _gloffset_SecondaryColor3bvEXT 630
+#define _gloffset_SecondaryColor3dEXT 631
+#define _gloffset_SecondaryColor3dvEXT 632
+#define _gloffset_SecondaryColor3fEXT 633
+#define _gloffset_SecondaryColor3fvEXT 634
+#define _gloffset_SecondaryColor3iEXT 635
+#define _gloffset_SecondaryColor3ivEXT 636
+#define _gloffset_SecondaryColor3sEXT 637
+#define _gloffset_SecondaryColor3svEXT 638
+#define _gloffset_SecondaryColor3ubEXT 639
+#define _gloffset_SecondaryColor3ubvEXT 640
+#define _gloffset_SecondaryColor3uiEXT 641
+#define _gloffset_SecondaryColor3uivEXT 642
+#define _gloffset_SecondaryColor3usEXT 643
+#define _gloffset_SecondaryColor3usvEXT 644
+#define _gloffset_SecondaryColorPointerEXT 645
+#define _gloffset_MultiDrawArraysEXT 646
+#define _gloffset_MultiDrawElementsEXT 647
+#define _gloffset_FogCoordPointerEXT 648
+#define _gloffset_FogCoorddEXT 649
+#define _gloffset_FogCoorddvEXT 650
+#define _gloffset_FogCoordfEXT 651
+#define _gloffset_FogCoordfvEXT 652
+#define _gloffset_PixelTexGenSGIX 653
+#define _gloffset_BlendFuncSeparateEXT 654
+#define _gloffset_FlushVertexArrayRangeNV 655
+#define _gloffset_VertexArrayRangeNV 656
+#define _gloffset_CombinerInputNV 657
+#define _gloffset_CombinerOutputNV 658
+#define _gloffset_CombinerParameterfNV 659
+#define _gloffset_CombinerParameterfvNV 660
+#define _gloffset_CombinerParameteriNV 661
+#define _gloffset_CombinerParameterivNV 662
+#define _gloffset_FinalCombinerInputNV 663
+#define _gloffset_GetCombinerInputParameterfvNV 664
+#define _gloffset_GetCombinerInputParameterivNV 665
+#define _gloffset_GetCombinerOutputParameterfvNV 666
+#define _gloffset_GetCombinerOutputParameterivNV 667
+#define _gloffset_GetFinalCombinerInputParameterfvNV 668
+#define _gloffset_GetFinalCombinerInputParameterivNV 669
+#define _gloffset_ResizeBuffersMESA 670
+#define _gloffset_WindowPos2dMESA 671
+#define _gloffset_WindowPos2dvMESA 672
+#define _gloffset_WindowPos2fMESA 673
+#define _gloffset_WindowPos2fvMESA 674
+#define _gloffset_WindowPos2iMESA 675
+#define _gloffset_WindowPos2ivMESA 676
+#define _gloffset_WindowPos2sMESA 677
+#define _gloffset_WindowPos2svMESA 678
+#define _gloffset_WindowPos3dMESA 679
+#define _gloffset_WindowPos3dvMESA 680
+#define _gloffset_WindowPos3fMESA 681
+#define _gloffset_WindowPos3fvMESA 682
+#define _gloffset_WindowPos3iMESA 683
+#define _gloffset_WindowPos3ivMESA 684
+#define _gloffset_WindowPos3sMESA 685
+#define _gloffset_WindowPos3svMESA 686
+#define _gloffset_WindowPos4dMESA 687
+#define _gloffset_WindowPos4dvMESA 688
+#define _gloffset_WindowPos4fMESA 689
+#define _gloffset_WindowPos4fvMESA 690
+#define _gloffset_WindowPos4iMESA 691
+#define _gloffset_WindowPos4ivMESA 692
+#define _gloffset_WindowPos4sMESA 693
+#define _gloffset_WindowPos4svMESA 694
+#define _gloffset_MultiModeDrawArraysIBM 695
+#define _gloffset_MultiModeDrawElementsIBM 696
+#define _gloffset_DeleteFencesNV 697
+#define _gloffset_FinishFenceNV 698
+#define _gloffset_GenFencesNV 699
+#define _gloffset_GetFenceivNV 700
+#define _gloffset_IsFenceNV 701
+#define _gloffset_SetFenceNV 702
+#define _gloffset_TestFenceNV 703
+#define _gloffset_AreProgramsResidentNV 704
+#define _gloffset_BindProgramNV 705
+#define _gloffset_DeleteProgramsNV 706
+#define _gloffset_ExecuteProgramNV 707
+#define _gloffset_GenProgramsNV 708
+#define _gloffset_GetProgramParameterdvNV 709
+#define _gloffset_GetProgramParameterfvNV 710
+#define _gloffset_GetProgramStringNV 711
+#define _gloffset_GetProgramivNV 712
+#define _gloffset_GetTrackMatrixivNV 713
+#define _gloffset_GetVertexAttribPointervNV 714
+#define _gloffset_GetVertexAttribdvNV 715
+#define _gloffset_GetVertexAttribfvNV 716
+#define _gloffset_GetVertexAttribivNV 717
+#define _gloffset_IsProgramNV 718
+#define _gloffset_LoadProgramNV 719
+#define _gloffset_ProgramParameters4dvNV 720
+#define _gloffset_ProgramParameters4fvNV 721
+#define _gloffset_RequestResidentProgramsNV 722
+#define _gloffset_TrackMatrixNV 723
+#define _gloffset_VertexAttrib1dNV 724
+#define _gloffset_VertexAttrib1dvNV 725
+#define _gloffset_VertexAttrib1fNV 726
+#define _gloffset_VertexAttrib1fvNV 727
+#define _gloffset_VertexAttrib1sNV 728
+#define _gloffset_VertexAttrib1svNV 729
+#define _gloffset_VertexAttrib2dNV 730
+#define _gloffset_VertexAttrib2dvNV 731
+#define _gloffset_VertexAttrib2fNV 732
+#define _gloffset_VertexAttrib2fvNV 733
+#define _gloffset_VertexAttrib2sNV 734
+#define _gloffset_VertexAttrib2svNV 735
+#define _gloffset_VertexAttrib3dNV 736
+#define _gloffset_VertexAttrib3dvNV 737
+#define _gloffset_VertexAttrib3fNV 738
+#define _gloffset_VertexAttrib3fvNV 739
+#define _gloffset_VertexAttrib3sNV 740
+#define _gloffset_VertexAttrib3svNV 741
+#define _gloffset_VertexAttrib4dNV 742
+#define _gloffset_VertexAttrib4dvNV 743
+#define _gloffset_VertexAttrib4fNV 744
+#define _gloffset_VertexAttrib4fvNV 745
+#define _gloffset_VertexAttrib4sNV 746
+#define _gloffset_VertexAttrib4svNV 747
+#define _gloffset_VertexAttrib4ubNV 748
+#define _gloffset_VertexAttrib4ubvNV 749
+#define _gloffset_VertexAttribPointerNV 750
+#define _gloffset_VertexAttribs1dvNV 751
+#define _gloffset_VertexAttribs1fvNV 752
+#define _gloffset_VertexAttribs1svNV 753
+#define _gloffset_VertexAttribs2dvNV 754
+#define _gloffset_VertexAttribs2fvNV 755
+#define _gloffset_VertexAttribs2svNV 756
+#define _gloffset_VertexAttribs3dvNV 757
+#define _gloffset_VertexAttribs3fvNV 758
+#define _gloffset_VertexAttribs3svNV 759
+#define _gloffset_VertexAttribs4dvNV 760
+#define _gloffset_VertexAttribs4fvNV 761
+#define _gloffset_VertexAttribs4svNV 762
+#define _gloffset_VertexAttribs4ubvNV 763
+#define _gloffset_GetTexBumpParameterfvATI 764
+#define _gloffset_GetTexBumpParameterivATI 765
+#define _gloffset_TexBumpParameterfvATI 766
+#define _gloffset_TexBumpParameterivATI 767
+#define _gloffset_AlphaFragmentOp1ATI 768
+#define _gloffset_AlphaFragmentOp2ATI 769
+#define _gloffset_AlphaFragmentOp3ATI 770
+#define _gloffset_BeginFragmentShaderATI 771
+#define _gloffset_BindFragmentShaderATI 772
+#define _gloffset_ColorFragmentOp1ATI 773
+#define _gloffset_ColorFragmentOp2ATI 774
+#define _gloffset_ColorFragmentOp3ATI 775
+#define _gloffset_DeleteFragmentShaderATI 776
+#define _gloffset_EndFragmentShaderATI 777
+#define _gloffset_GenFragmentShadersATI 778
+#define _gloffset_PassTexCoordATI 779
+#define _gloffset_SampleMapATI 780
+#define _gloffset_SetFragmentShaderConstantATI 781
+#define _gloffset_PointParameteriNV 782
+#define _gloffset_PointParameterivNV 783
+#define _gloffset_ActiveStencilFaceEXT 784
+#define _gloffset_BindVertexArrayAPPLE 785
+#define _gloffset_DeleteVertexArraysAPPLE 786
+#define _gloffset_GenVertexArraysAPPLE 787
+#define _gloffset_IsVertexArrayAPPLE 788
+#define _gloffset_GetProgramNamedParameterdvNV 789
+#define _gloffset_GetProgramNamedParameterfvNV 790
+#define _gloffset_ProgramNamedParameter4dNV 791
+#define _gloffset_ProgramNamedParameter4dvNV 792
+#define _gloffset_ProgramNamedParameter4fNV 793
+#define _gloffset_ProgramNamedParameter4fvNV 794
+#define _gloffset_PrimitiveRestartIndexNV 795
+#define _gloffset_PrimitiveRestartNV 796
+#define _gloffset_DepthBoundsEXT 797
+#define _gloffset_BlendEquationSeparateEXT 798
+#define _gloffset_BindFramebufferEXT 799
+#define _gloffset_BindRenderbufferEXT 800
+#define _gloffset_CheckFramebufferStatusEXT 801
+#define _gloffset_DeleteFramebuffersEXT 802
+#define _gloffset_DeleteRenderbuffersEXT 803
+#define _gloffset_FramebufferRenderbufferEXT 804
+#define _gloffset_FramebufferTexture1DEXT 805
+#define _gloffset_FramebufferTexture2DEXT 806
+#define _gloffset_FramebufferTexture3DEXT 807
+#define _gloffset_GenFramebuffersEXT 808
+#define _gloffset_GenRenderbuffersEXT 809
+#define _gloffset_GenerateMipmapEXT 810
+#define _gloffset_GetFramebufferAttachmentParameterivEXT 811
+#define _gloffset_GetRenderbufferParameterivEXT 812
+#define _gloffset_IsFramebufferEXT 813
+#define _gloffset_IsRenderbufferEXT 814
+#define _gloffset_RenderbufferStorageEXT 815
+#define _gloffset_BlitFramebufferEXT 816
+#define _gloffset_BufferParameteriAPPLE 817
+#define _gloffset_FlushMappedBufferRangeAPPLE 818
+#define _gloffset_BindFragDataLocationEXT 819
+#define _gloffset_GetFragDataLocationEXT 820
+#define _gloffset_GetUniformuivEXT 821
+#define _gloffset_GetVertexAttribIivEXT 822
+#define _gloffset_GetVertexAttribIuivEXT 823
+#define _gloffset_Uniform1uiEXT 824
+#define _gloffset_Uniform1uivEXT 825
+#define _gloffset_Uniform2uiEXT 826
+#define _gloffset_Uniform2uivEXT 827
+#define _gloffset_Uniform3uiEXT 828
+#define _gloffset_Uniform3uivEXT 829
+#define _gloffset_Uniform4uiEXT 830
+#define _gloffset_Uniform4uivEXT 831
+#define _gloffset_VertexAttribI1iEXT 832
+#define _gloffset_VertexAttribI1ivEXT 833
+#define _gloffset_VertexAttribI1uiEXT 834
+#define _gloffset_VertexAttribI1uivEXT 835
+#define _gloffset_VertexAttribI2iEXT 836
+#define _gloffset_VertexAttribI2ivEXT 837
+#define _gloffset_VertexAttribI2uiEXT 838
+#define _gloffset_VertexAttribI2uivEXT 839
+#define _gloffset_VertexAttribI3iEXT 840
+#define _gloffset_VertexAttribI3ivEXT 841
+#define _gloffset_VertexAttribI3uiEXT 842
+#define _gloffset_VertexAttribI3uivEXT 843
+#define _gloffset_VertexAttribI4bvEXT 844
+#define _gloffset_VertexAttribI4iEXT 845
+#define _gloffset_VertexAttribI4ivEXT 846
+#define _gloffset_VertexAttribI4svEXT 847
+#define _gloffset_VertexAttribI4ubvEXT 848
+#define _gloffset_VertexAttribI4uiEXT 849
+#define _gloffset_VertexAttribI4uivEXT 850
+#define _gloffset_VertexAttribI4usvEXT 851
+#define _gloffset_VertexAttribIPointerEXT 852
+#define _gloffset_FramebufferTextureLayerEXT 853
+#define _gloffset_ColorMaskIndexedEXT 854
+#define _gloffset_DisableIndexedEXT 855
+#define _gloffset_EnableIndexedEXT 856
+#define _gloffset_GetBooleanIndexedvEXT 857
+#define _gloffset_GetIntegerIndexedvEXT 858
+#define _gloffset_IsEnabledIndexedEXT 859
+#define _gloffset_ClearColorIiEXT 860
+#define _gloffset_ClearColorIuiEXT 861
+#define _gloffset_GetTexParameterIivEXT 862
+#define _gloffset_GetTexParameterIuivEXT 863
+#define _gloffset_TexParameterIivEXT 864
+#define _gloffset_TexParameterIuivEXT 865
+#define _gloffset_BeginConditionalRenderNV 866
+#define _gloffset_EndConditionalRenderNV 867
+#define _gloffset_BeginTransformFeedbackEXT 868
+#define _gloffset_BindBufferBaseEXT 869
+#define _gloffset_BindBufferOffsetEXT 870
+#define _gloffset_BindBufferRangeEXT 871
+#define _gloffset_EndTransformFeedbackEXT 872
+#define _gloffset_GetTransformFeedbackVaryingEXT 873
+#define _gloffset_TransformFeedbackVaryingsEXT 874
+#define _gloffset_ProvokingVertexEXT 875
+#define _gloffset_GetTexParameterPointervAPPLE 876
+#define _gloffset_TextureRangeAPPLE 877
+#define _gloffset_GetObjectParameterivAPPLE 878
+#define _gloffset_ObjectPurgeableAPPLE 879
+#define _gloffset_ObjectUnpurgeableAPPLE 880
+#define _gloffset_ActiveProgramEXT 881
+#define _gloffset_CreateShaderProgramEXT 882
+#define _gloffset_UseShaderProgramEXT 883
+#define _gloffset_TextureBarrierNV 884
+#define _gloffset_StencilFuncSeparateATI 885
+#define _gloffset_ProgramEnvParameters4fvEXT 886
+#define _gloffset_ProgramLocalParameters4fvEXT 887
+#define _gloffset_GetQueryObjecti64vEXT 888
+#define _gloffset_GetQueryObjectui64vEXT 889
+#define _gloffset_EGLImageTargetRenderbufferStorageOES 890
+#define _gloffset_EGLImageTargetTexture2DOES 891
-#define driDispatchRemapTable_size 362
+#else /* !_GLAPI_USE_REMAP_TABLE */
+
+#define driDispatchRemapTable_size 484
extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define AttachShader_remap_index 0
@@ -2398,1434 +983,3631 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define UniformMatrix3x4fv_remap_index 19
#define UniformMatrix4x2fv_remap_index 20
#define UniformMatrix4x3fv_remap_index 21
-#define LoadTransposeMatrixdARB_remap_index 22
-#define LoadTransposeMatrixfARB_remap_index 23
-#define MultTransposeMatrixdARB_remap_index 24
-#define MultTransposeMatrixfARB_remap_index 25
-#define SampleCoverageARB_remap_index 26
-#define CompressedTexImage1DARB_remap_index 27
-#define CompressedTexImage2DARB_remap_index 28
-#define CompressedTexImage3DARB_remap_index 29
-#define CompressedTexSubImage1DARB_remap_index 30
-#define CompressedTexSubImage2DARB_remap_index 31
-#define CompressedTexSubImage3DARB_remap_index 32
-#define GetCompressedTexImageARB_remap_index 33
-#define DisableVertexAttribArrayARB_remap_index 34
-#define EnableVertexAttribArrayARB_remap_index 35
-#define GetProgramEnvParameterdvARB_remap_index 36
-#define GetProgramEnvParameterfvARB_remap_index 37
-#define GetProgramLocalParameterdvARB_remap_index 38
-#define GetProgramLocalParameterfvARB_remap_index 39
-#define GetProgramStringARB_remap_index 40
-#define GetProgramivARB_remap_index 41
-#define GetVertexAttribdvARB_remap_index 42
-#define GetVertexAttribfvARB_remap_index 43
-#define GetVertexAttribivARB_remap_index 44
-#define ProgramEnvParameter4dARB_remap_index 45
-#define ProgramEnvParameter4dvARB_remap_index 46
-#define ProgramEnvParameter4fARB_remap_index 47
-#define ProgramEnvParameter4fvARB_remap_index 48
-#define ProgramLocalParameter4dARB_remap_index 49
-#define ProgramLocalParameter4dvARB_remap_index 50
-#define ProgramLocalParameter4fARB_remap_index 51
-#define ProgramLocalParameter4fvARB_remap_index 52
-#define ProgramStringARB_remap_index 53
-#define VertexAttrib1dARB_remap_index 54
-#define VertexAttrib1dvARB_remap_index 55
-#define VertexAttrib1fARB_remap_index 56
-#define VertexAttrib1fvARB_remap_index 57
-#define VertexAttrib1sARB_remap_index 58
-#define VertexAttrib1svARB_remap_index 59
-#define VertexAttrib2dARB_remap_index 60
-#define VertexAttrib2dvARB_remap_index 61
-#define VertexAttrib2fARB_remap_index 62
-#define VertexAttrib2fvARB_remap_index 63
-#define VertexAttrib2sARB_remap_index 64
-#define VertexAttrib2svARB_remap_index 65
-#define VertexAttrib3dARB_remap_index 66
-#define VertexAttrib3dvARB_remap_index 67
-#define VertexAttrib3fARB_remap_index 68
-#define VertexAttrib3fvARB_remap_index 69
-#define VertexAttrib3sARB_remap_index 70
-#define VertexAttrib3svARB_remap_index 71
-#define VertexAttrib4NbvARB_remap_index 72
-#define VertexAttrib4NivARB_remap_index 73
-#define VertexAttrib4NsvARB_remap_index 74
-#define VertexAttrib4NubARB_remap_index 75
-#define VertexAttrib4NubvARB_remap_index 76
-#define VertexAttrib4NuivARB_remap_index 77
-#define VertexAttrib4NusvARB_remap_index 78
-#define VertexAttrib4bvARB_remap_index 79
-#define VertexAttrib4dARB_remap_index 80
-#define VertexAttrib4dvARB_remap_index 81
-#define VertexAttrib4fARB_remap_index 82
-#define VertexAttrib4fvARB_remap_index 83
-#define VertexAttrib4ivARB_remap_index 84
-#define VertexAttrib4sARB_remap_index 85
-#define VertexAttrib4svARB_remap_index 86
-#define VertexAttrib4ubvARB_remap_index 87
-#define VertexAttrib4uivARB_remap_index 88
-#define VertexAttrib4usvARB_remap_index 89
-#define VertexAttribPointerARB_remap_index 90
-#define BindBufferARB_remap_index 91
-#define BufferDataARB_remap_index 92
-#define BufferSubDataARB_remap_index 93
-#define DeleteBuffersARB_remap_index 94
-#define GenBuffersARB_remap_index 95
-#define GetBufferParameterivARB_remap_index 96
-#define GetBufferPointervARB_remap_index 97
-#define GetBufferSubDataARB_remap_index 98
-#define IsBufferARB_remap_index 99
-#define MapBufferARB_remap_index 100
-#define UnmapBufferARB_remap_index 101
-#define BeginQueryARB_remap_index 102
-#define DeleteQueriesARB_remap_index 103
-#define EndQueryARB_remap_index 104
-#define GenQueriesARB_remap_index 105
-#define GetQueryObjectivARB_remap_index 106
-#define GetQueryObjectuivARB_remap_index 107
-#define GetQueryivARB_remap_index 108
-#define IsQueryARB_remap_index 109
-#define AttachObjectARB_remap_index 110
-#define CompileShaderARB_remap_index 111
-#define CreateProgramObjectARB_remap_index 112
-#define CreateShaderObjectARB_remap_index 113
-#define DeleteObjectARB_remap_index 114
-#define DetachObjectARB_remap_index 115
-#define GetActiveUniformARB_remap_index 116
-#define GetAttachedObjectsARB_remap_index 117
-#define GetHandleARB_remap_index 118
-#define GetInfoLogARB_remap_index 119
-#define GetObjectParameterfvARB_remap_index 120
-#define GetObjectParameterivARB_remap_index 121
-#define GetShaderSourceARB_remap_index 122
-#define GetUniformLocationARB_remap_index 123
-#define GetUniformfvARB_remap_index 124
-#define GetUniformivARB_remap_index 125
-#define LinkProgramARB_remap_index 126
-#define ShaderSourceARB_remap_index 127
-#define Uniform1fARB_remap_index 128
-#define Uniform1fvARB_remap_index 129
-#define Uniform1iARB_remap_index 130
-#define Uniform1ivARB_remap_index 131
-#define Uniform2fARB_remap_index 132
-#define Uniform2fvARB_remap_index 133
-#define Uniform2iARB_remap_index 134
-#define Uniform2ivARB_remap_index 135
-#define Uniform3fARB_remap_index 136
-#define Uniform3fvARB_remap_index 137
-#define Uniform3iARB_remap_index 138
-#define Uniform3ivARB_remap_index 139
-#define Uniform4fARB_remap_index 140
-#define Uniform4fvARB_remap_index 141
-#define Uniform4iARB_remap_index 142
-#define Uniform4ivARB_remap_index 143
-#define UniformMatrix2fvARB_remap_index 144
-#define UniformMatrix3fvARB_remap_index 145
-#define UniformMatrix4fvARB_remap_index 146
-#define UseProgramObjectARB_remap_index 147
-#define ValidateProgramARB_remap_index 148
-#define BindAttribLocationARB_remap_index 149
-#define GetActiveAttribARB_remap_index 150
-#define GetAttribLocationARB_remap_index 151
-#define DrawBuffersARB_remap_index 152
-#define PolygonOffsetEXT_remap_index 153
-#define GetPixelTexGenParameterfvSGIS_remap_index 154
-#define GetPixelTexGenParameterivSGIS_remap_index 155
-#define PixelTexGenParameterfSGIS_remap_index 156
-#define PixelTexGenParameterfvSGIS_remap_index 157
-#define PixelTexGenParameteriSGIS_remap_index 158
-#define PixelTexGenParameterivSGIS_remap_index 159
-#define SampleMaskSGIS_remap_index 160
-#define SamplePatternSGIS_remap_index 161
-#define ColorPointerEXT_remap_index 162
-#define EdgeFlagPointerEXT_remap_index 163
-#define IndexPointerEXT_remap_index 164
-#define NormalPointerEXT_remap_index 165
-#define TexCoordPointerEXT_remap_index 166
-#define VertexPointerEXT_remap_index 167
-#define PointParameterfEXT_remap_index 168
-#define PointParameterfvEXT_remap_index 169
-#define LockArraysEXT_remap_index 170
-#define UnlockArraysEXT_remap_index 171
-#define CullParameterdvEXT_remap_index 172
-#define CullParameterfvEXT_remap_index 173
-#define SecondaryColor3bEXT_remap_index 174
-#define SecondaryColor3bvEXT_remap_index 175
-#define SecondaryColor3dEXT_remap_index 176
-#define SecondaryColor3dvEXT_remap_index 177
-#define SecondaryColor3fEXT_remap_index 178
-#define SecondaryColor3fvEXT_remap_index 179
-#define SecondaryColor3iEXT_remap_index 180
-#define SecondaryColor3ivEXT_remap_index 181
-#define SecondaryColor3sEXT_remap_index 182
-#define SecondaryColor3svEXT_remap_index 183
-#define SecondaryColor3ubEXT_remap_index 184
-#define SecondaryColor3ubvEXT_remap_index 185
-#define SecondaryColor3uiEXT_remap_index 186
-#define SecondaryColor3uivEXT_remap_index 187
-#define SecondaryColor3usEXT_remap_index 188
-#define SecondaryColor3usvEXT_remap_index 189
-#define SecondaryColorPointerEXT_remap_index 190
-#define MultiDrawArraysEXT_remap_index 191
-#define MultiDrawElementsEXT_remap_index 192
-#define FogCoordPointerEXT_remap_index 193
-#define FogCoorddEXT_remap_index 194
-#define FogCoorddvEXT_remap_index 195
-#define FogCoordfEXT_remap_index 196
-#define FogCoordfvEXT_remap_index 197
-#define PixelTexGenSGIX_remap_index 198
-#define BlendFuncSeparateEXT_remap_index 199
-#define FlushVertexArrayRangeNV_remap_index 200
-#define VertexArrayRangeNV_remap_index 201
-#define CombinerInputNV_remap_index 202
-#define CombinerOutputNV_remap_index 203
-#define CombinerParameterfNV_remap_index 204
-#define CombinerParameterfvNV_remap_index 205
-#define CombinerParameteriNV_remap_index 206
-#define CombinerParameterivNV_remap_index 207
-#define FinalCombinerInputNV_remap_index 208
-#define GetCombinerInputParameterfvNV_remap_index 209
-#define GetCombinerInputParameterivNV_remap_index 210
-#define GetCombinerOutputParameterfvNV_remap_index 211
-#define GetCombinerOutputParameterivNV_remap_index 212
-#define GetFinalCombinerInputParameterfvNV_remap_index 213
-#define GetFinalCombinerInputParameterivNV_remap_index 214
-#define ResizeBuffersMESA_remap_index 215
-#define WindowPos2dMESA_remap_index 216
-#define WindowPos2dvMESA_remap_index 217
-#define WindowPos2fMESA_remap_index 218
-#define WindowPos2fvMESA_remap_index 219
-#define WindowPos2iMESA_remap_index 220
-#define WindowPos2ivMESA_remap_index 221
-#define WindowPos2sMESA_remap_index 222
-#define WindowPos2svMESA_remap_index 223
-#define WindowPos3dMESA_remap_index 224
-#define WindowPos3dvMESA_remap_index 225
-#define WindowPos3fMESA_remap_index 226
-#define WindowPos3fvMESA_remap_index 227
-#define WindowPos3iMESA_remap_index 228
-#define WindowPos3ivMESA_remap_index 229
-#define WindowPos3sMESA_remap_index 230
-#define WindowPos3svMESA_remap_index 231
-#define WindowPos4dMESA_remap_index 232
-#define WindowPos4dvMESA_remap_index 233
-#define WindowPos4fMESA_remap_index 234
-#define WindowPos4fvMESA_remap_index 235
-#define WindowPos4iMESA_remap_index 236
-#define WindowPos4ivMESA_remap_index 237
-#define WindowPos4sMESA_remap_index 238
-#define WindowPos4svMESA_remap_index 239
-#define MultiModeDrawArraysIBM_remap_index 240
-#define MultiModeDrawElementsIBM_remap_index 241
-#define DeleteFencesNV_remap_index 242
-#define FinishFenceNV_remap_index 243
-#define GenFencesNV_remap_index 244
-#define GetFenceivNV_remap_index 245
-#define IsFenceNV_remap_index 246
-#define SetFenceNV_remap_index 247
-#define TestFenceNV_remap_index 248
-#define AreProgramsResidentNV_remap_index 249
-#define BindProgramNV_remap_index 250
-#define DeleteProgramsNV_remap_index 251
-#define ExecuteProgramNV_remap_index 252
-#define GenProgramsNV_remap_index 253
-#define GetProgramParameterdvNV_remap_index 254
-#define GetProgramParameterfvNV_remap_index 255
-#define GetProgramStringNV_remap_index 256
-#define GetProgramivNV_remap_index 257
-#define GetTrackMatrixivNV_remap_index 258
-#define GetVertexAttribPointervNV_remap_index 259
-#define GetVertexAttribdvNV_remap_index 260
-#define GetVertexAttribfvNV_remap_index 261
-#define GetVertexAttribivNV_remap_index 262
-#define IsProgramNV_remap_index 263
-#define LoadProgramNV_remap_index 264
-#define ProgramParameters4dvNV_remap_index 265
-#define ProgramParameters4fvNV_remap_index 266
-#define RequestResidentProgramsNV_remap_index 267
-#define TrackMatrixNV_remap_index 268
-#define VertexAttrib1dNV_remap_index 269
-#define VertexAttrib1dvNV_remap_index 270
-#define VertexAttrib1fNV_remap_index 271
-#define VertexAttrib1fvNV_remap_index 272
-#define VertexAttrib1sNV_remap_index 273
-#define VertexAttrib1svNV_remap_index 274
-#define VertexAttrib2dNV_remap_index 275
-#define VertexAttrib2dvNV_remap_index 276
-#define VertexAttrib2fNV_remap_index 277
-#define VertexAttrib2fvNV_remap_index 278
-#define VertexAttrib2sNV_remap_index 279
-#define VertexAttrib2svNV_remap_index 280
-#define VertexAttrib3dNV_remap_index 281
-#define VertexAttrib3dvNV_remap_index 282
-#define VertexAttrib3fNV_remap_index 283
-#define VertexAttrib3fvNV_remap_index 284
-#define VertexAttrib3sNV_remap_index 285
-#define VertexAttrib3svNV_remap_index 286
-#define VertexAttrib4dNV_remap_index 287
-#define VertexAttrib4dvNV_remap_index 288
-#define VertexAttrib4fNV_remap_index 289
-#define VertexAttrib4fvNV_remap_index 290
-#define VertexAttrib4sNV_remap_index 291
-#define VertexAttrib4svNV_remap_index 292
-#define VertexAttrib4ubNV_remap_index 293
-#define VertexAttrib4ubvNV_remap_index 294
-#define VertexAttribPointerNV_remap_index 295
-#define VertexAttribs1dvNV_remap_index 296
-#define VertexAttribs1fvNV_remap_index 297
-#define VertexAttribs1svNV_remap_index 298
-#define VertexAttribs2dvNV_remap_index 299
-#define VertexAttribs2fvNV_remap_index 300
-#define VertexAttribs2svNV_remap_index 301
-#define VertexAttribs3dvNV_remap_index 302
-#define VertexAttribs3fvNV_remap_index 303
-#define VertexAttribs3svNV_remap_index 304
-#define VertexAttribs4dvNV_remap_index 305
-#define VertexAttribs4fvNV_remap_index 306
-#define VertexAttribs4svNV_remap_index 307
-#define VertexAttribs4ubvNV_remap_index 308
-#define AlphaFragmentOp1ATI_remap_index 309
-#define AlphaFragmentOp2ATI_remap_index 310
-#define AlphaFragmentOp3ATI_remap_index 311
-#define BeginFragmentShaderATI_remap_index 312
-#define BindFragmentShaderATI_remap_index 313
-#define ColorFragmentOp1ATI_remap_index 314
-#define ColorFragmentOp2ATI_remap_index 315
-#define ColorFragmentOp3ATI_remap_index 316
-#define DeleteFragmentShaderATI_remap_index 317
-#define EndFragmentShaderATI_remap_index 318
-#define GenFragmentShadersATI_remap_index 319
-#define PassTexCoordATI_remap_index 320
-#define SampleMapATI_remap_index 321
-#define SetFragmentShaderConstantATI_remap_index 322
-#define PointParameteriNV_remap_index 323
-#define PointParameterivNV_remap_index 324
-#define ActiveStencilFaceEXT_remap_index 325
-#define BindVertexArrayAPPLE_remap_index 326
-#define DeleteVertexArraysAPPLE_remap_index 327
-#define GenVertexArraysAPPLE_remap_index 328
-#define IsVertexArrayAPPLE_remap_index 329
-#define GetProgramNamedParameterdvNV_remap_index 330
-#define GetProgramNamedParameterfvNV_remap_index 331
-#define ProgramNamedParameter4dNV_remap_index 332
-#define ProgramNamedParameter4dvNV_remap_index 333
-#define ProgramNamedParameter4fNV_remap_index 334
-#define ProgramNamedParameter4fvNV_remap_index 335
-#define DepthBoundsEXT_remap_index 336
-#define BlendEquationSeparateEXT_remap_index 337
-#define BindFramebufferEXT_remap_index 338
-#define BindRenderbufferEXT_remap_index 339
-#define CheckFramebufferStatusEXT_remap_index 340
-#define DeleteFramebuffersEXT_remap_index 341
-#define DeleteRenderbuffersEXT_remap_index 342
-#define FramebufferRenderbufferEXT_remap_index 343
-#define FramebufferTexture1DEXT_remap_index 344
-#define FramebufferTexture2DEXT_remap_index 345
-#define FramebufferTexture3DEXT_remap_index 346
-#define GenFramebuffersEXT_remap_index 347
-#define GenRenderbuffersEXT_remap_index 348
-#define GenerateMipmapEXT_remap_index 349
-#define GetFramebufferAttachmentParameterivEXT_remap_index 350
-#define GetRenderbufferParameterivEXT_remap_index 351
-#define IsFramebufferEXT_remap_index 352
-#define IsRenderbufferEXT_remap_index 353
-#define RenderbufferStorageEXT_remap_index 354
-#define BlitFramebufferEXT_remap_index 355
-#define FramebufferTextureLayerEXT_remap_index 356
-#define StencilFuncSeparateATI_remap_index 357
-#define ProgramEnvParameters4fvEXT_remap_index 358
-#define ProgramLocalParameters4fvEXT_remap_index 359
-#define GetQueryObjecti64vEXT_remap_index 360
-#define GetQueryObjectui64vEXT_remap_index 361
+#define ClampColor_remap_index 22
+#define ClearBufferfi_remap_index 23
+#define ClearBufferfv_remap_index 24
+#define ClearBufferiv_remap_index 25
+#define ClearBufferuiv_remap_index 26
+#define GetStringi_remap_index 27
+#define TexBuffer_remap_index 28
+#define FramebufferTexture_remap_index 29
+#define GetBufferParameteri64v_remap_index 30
+#define GetInteger64i_v_remap_index 31
+#define VertexAttribDivisor_remap_index 32
+#define LoadTransposeMatrixdARB_remap_index 33
+#define LoadTransposeMatrixfARB_remap_index 34
+#define MultTransposeMatrixdARB_remap_index 35
+#define MultTransposeMatrixfARB_remap_index 36
+#define SampleCoverageARB_remap_index 37
+#define CompressedTexImage1DARB_remap_index 38
+#define CompressedTexImage2DARB_remap_index 39
+#define CompressedTexImage3DARB_remap_index 40
+#define CompressedTexSubImage1DARB_remap_index 41
+#define CompressedTexSubImage2DARB_remap_index 42
+#define CompressedTexSubImage3DARB_remap_index 43
+#define GetCompressedTexImageARB_remap_index 44
+#define DisableVertexAttribArrayARB_remap_index 45
+#define EnableVertexAttribArrayARB_remap_index 46
+#define GetProgramEnvParameterdvARB_remap_index 47
+#define GetProgramEnvParameterfvARB_remap_index 48
+#define GetProgramLocalParameterdvARB_remap_index 49
+#define GetProgramLocalParameterfvARB_remap_index 50
+#define GetProgramStringARB_remap_index 51
+#define GetProgramivARB_remap_index 52
+#define GetVertexAttribdvARB_remap_index 53
+#define GetVertexAttribfvARB_remap_index 54
+#define GetVertexAttribivARB_remap_index 55
+#define ProgramEnvParameter4dARB_remap_index 56
+#define ProgramEnvParameter4dvARB_remap_index 57
+#define ProgramEnvParameter4fARB_remap_index 58
+#define ProgramEnvParameter4fvARB_remap_index 59
+#define ProgramLocalParameter4dARB_remap_index 60
+#define ProgramLocalParameter4dvARB_remap_index 61
+#define ProgramLocalParameter4fARB_remap_index 62
+#define ProgramLocalParameter4fvARB_remap_index 63
+#define ProgramStringARB_remap_index 64
+#define VertexAttrib1dARB_remap_index 65
+#define VertexAttrib1dvARB_remap_index 66
+#define VertexAttrib1fARB_remap_index 67
+#define VertexAttrib1fvARB_remap_index 68
+#define VertexAttrib1sARB_remap_index 69
+#define VertexAttrib1svARB_remap_index 70
+#define VertexAttrib2dARB_remap_index 71
+#define VertexAttrib2dvARB_remap_index 72
+#define VertexAttrib2fARB_remap_index 73
+#define VertexAttrib2fvARB_remap_index 74
+#define VertexAttrib2sARB_remap_index 75
+#define VertexAttrib2svARB_remap_index 76
+#define VertexAttrib3dARB_remap_index 77
+#define VertexAttrib3dvARB_remap_index 78
+#define VertexAttrib3fARB_remap_index 79
+#define VertexAttrib3fvARB_remap_index 80
+#define VertexAttrib3sARB_remap_index 81
+#define VertexAttrib3svARB_remap_index 82
+#define VertexAttrib4NbvARB_remap_index 83
+#define VertexAttrib4NivARB_remap_index 84
+#define VertexAttrib4NsvARB_remap_index 85
+#define VertexAttrib4NubARB_remap_index 86
+#define VertexAttrib4NubvARB_remap_index 87
+#define VertexAttrib4NuivARB_remap_index 88
+#define VertexAttrib4NusvARB_remap_index 89
+#define VertexAttrib4bvARB_remap_index 90
+#define VertexAttrib4dARB_remap_index 91
+#define VertexAttrib4dvARB_remap_index 92
+#define VertexAttrib4fARB_remap_index 93
+#define VertexAttrib4fvARB_remap_index 94
+#define VertexAttrib4ivARB_remap_index 95
+#define VertexAttrib4sARB_remap_index 96
+#define VertexAttrib4svARB_remap_index 97
+#define VertexAttrib4ubvARB_remap_index 98
+#define VertexAttrib4uivARB_remap_index 99
+#define VertexAttrib4usvARB_remap_index 100
+#define VertexAttribPointerARB_remap_index 101
+#define BindBufferARB_remap_index 102
+#define BufferDataARB_remap_index 103
+#define BufferSubDataARB_remap_index 104
+#define DeleteBuffersARB_remap_index 105
+#define GenBuffersARB_remap_index 106
+#define GetBufferParameterivARB_remap_index 107
+#define GetBufferPointervARB_remap_index 108
+#define GetBufferSubDataARB_remap_index 109
+#define IsBufferARB_remap_index 110
+#define MapBufferARB_remap_index 111
+#define UnmapBufferARB_remap_index 112
+#define BeginQueryARB_remap_index 113
+#define DeleteQueriesARB_remap_index 114
+#define EndQueryARB_remap_index 115
+#define GenQueriesARB_remap_index 116
+#define GetQueryObjectivARB_remap_index 117
+#define GetQueryObjectuivARB_remap_index 118
+#define GetQueryivARB_remap_index 119
+#define IsQueryARB_remap_index 120
+#define AttachObjectARB_remap_index 121
+#define CompileShaderARB_remap_index 122
+#define CreateProgramObjectARB_remap_index 123
+#define CreateShaderObjectARB_remap_index 124
+#define DeleteObjectARB_remap_index 125
+#define DetachObjectARB_remap_index 126
+#define GetActiveUniformARB_remap_index 127
+#define GetAttachedObjectsARB_remap_index 128
+#define GetHandleARB_remap_index 129
+#define GetInfoLogARB_remap_index 130
+#define GetObjectParameterfvARB_remap_index 131
+#define GetObjectParameterivARB_remap_index 132
+#define GetShaderSourceARB_remap_index 133
+#define GetUniformLocationARB_remap_index 134
+#define GetUniformfvARB_remap_index 135
+#define GetUniformivARB_remap_index 136
+#define LinkProgramARB_remap_index 137
+#define ShaderSourceARB_remap_index 138
+#define Uniform1fARB_remap_index 139
+#define Uniform1fvARB_remap_index 140
+#define Uniform1iARB_remap_index 141
+#define Uniform1ivARB_remap_index 142
+#define Uniform2fARB_remap_index 143
+#define Uniform2fvARB_remap_index 144
+#define Uniform2iARB_remap_index 145
+#define Uniform2ivARB_remap_index 146
+#define Uniform3fARB_remap_index 147
+#define Uniform3fvARB_remap_index 148
+#define Uniform3iARB_remap_index 149
+#define Uniform3ivARB_remap_index 150
+#define Uniform4fARB_remap_index 151
+#define Uniform4fvARB_remap_index 152
+#define Uniform4iARB_remap_index 153
+#define Uniform4ivARB_remap_index 154
+#define UniformMatrix2fvARB_remap_index 155
+#define UniformMatrix3fvARB_remap_index 156
+#define UniformMatrix4fvARB_remap_index 157
+#define UseProgramObjectARB_remap_index 158
+#define ValidateProgramARB_remap_index 159
+#define BindAttribLocationARB_remap_index 160
+#define GetActiveAttribARB_remap_index 161
+#define GetAttribLocationARB_remap_index 162
+#define DrawBuffersARB_remap_index 163
+#define DrawArraysInstancedARB_remap_index 164
+#define DrawElementsInstancedARB_remap_index 165
+#define RenderbufferStorageMultisample_remap_index 166
+#define FramebufferTextureARB_remap_index 167
+#define FramebufferTextureFaceARB_remap_index 168
+#define ProgramParameteriARB_remap_index 169
+#define VertexAttribDivisorARB_remap_index 170
+#define FlushMappedBufferRange_remap_index 171
+#define MapBufferRange_remap_index 172
+#define BindVertexArray_remap_index 173
+#define GenVertexArrays_remap_index 174
+#define CopyBufferSubData_remap_index 175
+#define ClientWaitSync_remap_index 176
+#define DeleteSync_remap_index 177
+#define FenceSync_remap_index 178
+#define GetInteger64v_remap_index 179
+#define GetSynciv_remap_index 180
+#define IsSync_remap_index 181
+#define WaitSync_remap_index 182
+#define DrawElementsBaseVertex_remap_index 183
+#define DrawRangeElementsBaseVertex_remap_index 184
+#define MultiDrawElementsBaseVertex_remap_index 185
+#define BlendEquationSeparateiARB_remap_index 186
+#define BlendEquationiARB_remap_index 187
+#define BlendFuncSeparateiARB_remap_index 188
+#define BlendFunciARB_remap_index 189
+#define BindTransformFeedback_remap_index 190
+#define DeleteTransformFeedbacks_remap_index 191
+#define DrawTransformFeedback_remap_index 192
+#define GenTransformFeedbacks_remap_index 193
+#define IsTransformFeedback_remap_index 194
+#define PauseTransformFeedback_remap_index 195
+#define ResumeTransformFeedback_remap_index 196
+#define ClearDepthf_remap_index 197
+#define DepthRangef_remap_index 198
+#define GetShaderPrecisionFormat_remap_index 199
+#define ReleaseShaderCompiler_remap_index 200
+#define ShaderBinary_remap_index 201
+#define PolygonOffsetEXT_remap_index 202
+#define GetPixelTexGenParameterfvSGIS_remap_index 203
+#define GetPixelTexGenParameterivSGIS_remap_index 204
+#define PixelTexGenParameterfSGIS_remap_index 205
+#define PixelTexGenParameterfvSGIS_remap_index 206
+#define PixelTexGenParameteriSGIS_remap_index 207
+#define PixelTexGenParameterivSGIS_remap_index 208
+#define SampleMaskSGIS_remap_index 209
+#define SamplePatternSGIS_remap_index 210
+#define ColorPointerEXT_remap_index 211
+#define EdgeFlagPointerEXT_remap_index 212
+#define IndexPointerEXT_remap_index 213
+#define NormalPointerEXT_remap_index 214
+#define TexCoordPointerEXT_remap_index 215
+#define VertexPointerEXT_remap_index 216
+#define PointParameterfEXT_remap_index 217
+#define PointParameterfvEXT_remap_index 218
+#define LockArraysEXT_remap_index 219
+#define UnlockArraysEXT_remap_index 220
+#define SecondaryColor3bEXT_remap_index 221
+#define SecondaryColor3bvEXT_remap_index 222
+#define SecondaryColor3dEXT_remap_index 223
+#define SecondaryColor3dvEXT_remap_index 224
+#define SecondaryColor3fEXT_remap_index 225
+#define SecondaryColor3fvEXT_remap_index 226
+#define SecondaryColor3iEXT_remap_index 227
+#define SecondaryColor3ivEXT_remap_index 228
+#define SecondaryColor3sEXT_remap_index 229
+#define SecondaryColor3svEXT_remap_index 230
+#define SecondaryColor3ubEXT_remap_index 231
+#define SecondaryColor3ubvEXT_remap_index 232
+#define SecondaryColor3uiEXT_remap_index 233
+#define SecondaryColor3uivEXT_remap_index 234
+#define SecondaryColor3usEXT_remap_index 235
+#define SecondaryColor3usvEXT_remap_index 236
+#define SecondaryColorPointerEXT_remap_index 237
+#define MultiDrawArraysEXT_remap_index 238
+#define MultiDrawElementsEXT_remap_index 239
+#define FogCoordPointerEXT_remap_index 240
+#define FogCoorddEXT_remap_index 241
+#define FogCoorddvEXT_remap_index 242
+#define FogCoordfEXT_remap_index 243
+#define FogCoordfvEXT_remap_index 244
+#define PixelTexGenSGIX_remap_index 245
+#define BlendFuncSeparateEXT_remap_index 246
+#define FlushVertexArrayRangeNV_remap_index 247
+#define VertexArrayRangeNV_remap_index 248
+#define CombinerInputNV_remap_index 249
+#define CombinerOutputNV_remap_index 250
+#define CombinerParameterfNV_remap_index 251
+#define CombinerParameterfvNV_remap_index 252
+#define CombinerParameteriNV_remap_index 253
+#define CombinerParameterivNV_remap_index 254
+#define FinalCombinerInputNV_remap_index 255
+#define GetCombinerInputParameterfvNV_remap_index 256
+#define GetCombinerInputParameterivNV_remap_index 257
+#define GetCombinerOutputParameterfvNV_remap_index 258
+#define GetCombinerOutputParameterivNV_remap_index 259
+#define GetFinalCombinerInputParameterfvNV_remap_index 260
+#define GetFinalCombinerInputParameterivNV_remap_index 261
+#define ResizeBuffersMESA_remap_index 262
+#define WindowPos2dMESA_remap_index 263
+#define WindowPos2dvMESA_remap_index 264
+#define WindowPos2fMESA_remap_index 265
+#define WindowPos2fvMESA_remap_index 266
+#define WindowPos2iMESA_remap_index 267
+#define WindowPos2ivMESA_remap_index 268
+#define WindowPos2sMESA_remap_index 269
+#define WindowPos2svMESA_remap_index 270
+#define WindowPos3dMESA_remap_index 271
+#define WindowPos3dvMESA_remap_index 272
+#define WindowPos3fMESA_remap_index 273
+#define WindowPos3fvMESA_remap_index 274
+#define WindowPos3iMESA_remap_index 275
+#define WindowPos3ivMESA_remap_index 276
+#define WindowPos3sMESA_remap_index 277
+#define WindowPos3svMESA_remap_index 278
+#define WindowPos4dMESA_remap_index 279
+#define WindowPos4dvMESA_remap_index 280
+#define WindowPos4fMESA_remap_index 281
+#define WindowPos4fvMESA_remap_index 282
+#define WindowPos4iMESA_remap_index 283
+#define WindowPos4ivMESA_remap_index 284
+#define WindowPos4sMESA_remap_index 285
+#define WindowPos4svMESA_remap_index 286
+#define MultiModeDrawArraysIBM_remap_index 287
+#define MultiModeDrawElementsIBM_remap_index 288
+#define DeleteFencesNV_remap_index 289
+#define FinishFenceNV_remap_index 290
+#define GenFencesNV_remap_index 291
+#define GetFenceivNV_remap_index 292
+#define IsFenceNV_remap_index 293
+#define SetFenceNV_remap_index 294
+#define TestFenceNV_remap_index 295
+#define AreProgramsResidentNV_remap_index 296
+#define BindProgramNV_remap_index 297
+#define DeleteProgramsNV_remap_index 298
+#define ExecuteProgramNV_remap_index 299
+#define GenProgramsNV_remap_index 300
+#define GetProgramParameterdvNV_remap_index 301
+#define GetProgramParameterfvNV_remap_index 302
+#define GetProgramStringNV_remap_index 303
+#define GetProgramivNV_remap_index 304
+#define GetTrackMatrixivNV_remap_index 305
+#define GetVertexAttribPointervNV_remap_index 306
+#define GetVertexAttribdvNV_remap_index 307
+#define GetVertexAttribfvNV_remap_index 308
+#define GetVertexAttribivNV_remap_index 309
+#define IsProgramNV_remap_index 310
+#define LoadProgramNV_remap_index 311
+#define ProgramParameters4dvNV_remap_index 312
+#define ProgramParameters4fvNV_remap_index 313
+#define RequestResidentProgramsNV_remap_index 314
+#define TrackMatrixNV_remap_index 315
+#define VertexAttrib1dNV_remap_index 316
+#define VertexAttrib1dvNV_remap_index 317
+#define VertexAttrib1fNV_remap_index 318
+#define VertexAttrib1fvNV_remap_index 319
+#define VertexAttrib1sNV_remap_index 320
+#define VertexAttrib1svNV_remap_index 321
+#define VertexAttrib2dNV_remap_index 322
+#define VertexAttrib2dvNV_remap_index 323
+#define VertexAttrib2fNV_remap_index 324
+#define VertexAttrib2fvNV_remap_index 325
+#define VertexAttrib2sNV_remap_index 326
+#define VertexAttrib2svNV_remap_index 327
+#define VertexAttrib3dNV_remap_index 328
+#define VertexAttrib3dvNV_remap_index 329
+#define VertexAttrib3fNV_remap_index 330
+#define VertexAttrib3fvNV_remap_index 331
+#define VertexAttrib3sNV_remap_index 332
+#define VertexAttrib3svNV_remap_index 333
+#define VertexAttrib4dNV_remap_index 334
+#define VertexAttrib4dvNV_remap_index 335
+#define VertexAttrib4fNV_remap_index 336
+#define VertexAttrib4fvNV_remap_index 337
+#define VertexAttrib4sNV_remap_index 338
+#define VertexAttrib4svNV_remap_index 339
+#define VertexAttrib4ubNV_remap_index 340
+#define VertexAttrib4ubvNV_remap_index 341
+#define VertexAttribPointerNV_remap_index 342
+#define VertexAttribs1dvNV_remap_index 343
+#define VertexAttribs1fvNV_remap_index 344
+#define VertexAttribs1svNV_remap_index 345
+#define VertexAttribs2dvNV_remap_index 346
+#define VertexAttribs2fvNV_remap_index 347
+#define VertexAttribs2svNV_remap_index 348
+#define VertexAttribs3dvNV_remap_index 349
+#define VertexAttribs3fvNV_remap_index 350
+#define VertexAttribs3svNV_remap_index 351
+#define VertexAttribs4dvNV_remap_index 352
+#define VertexAttribs4fvNV_remap_index 353
+#define VertexAttribs4svNV_remap_index 354
+#define VertexAttribs4ubvNV_remap_index 355
+#define GetTexBumpParameterfvATI_remap_index 356
+#define GetTexBumpParameterivATI_remap_index 357
+#define TexBumpParameterfvATI_remap_index 358
+#define TexBumpParameterivATI_remap_index 359
+#define AlphaFragmentOp1ATI_remap_index 360
+#define AlphaFragmentOp2ATI_remap_index 361
+#define AlphaFragmentOp3ATI_remap_index 362
+#define BeginFragmentShaderATI_remap_index 363
+#define BindFragmentShaderATI_remap_index 364
+#define ColorFragmentOp1ATI_remap_index 365
+#define ColorFragmentOp2ATI_remap_index 366
+#define ColorFragmentOp3ATI_remap_index 367
+#define DeleteFragmentShaderATI_remap_index 368
+#define EndFragmentShaderATI_remap_index 369
+#define GenFragmentShadersATI_remap_index 370
+#define PassTexCoordATI_remap_index 371
+#define SampleMapATI_remap_index 372
+#define SetFragmentShaderConstantATI_remap_index 373
+#define PointParameteriNV_remap_index 374
+#define PointParameterivNV_remap_index 375
+#define ActiveStencilFaceEXT_remap_index 376
+#define BindVertexArrayAPPLE_remap_index 377
+#define DeleteVertexArraysAPPLE_remap_index 378
+#define GenVertexArraysAPPLE_remap_index 379
+#define IsVertexArrayAPPLE_remap_index 380
+#define GetProgramNamedParameterdvNV_remap_index 381
+#define GetProgramNamedParameterfvNV_remap_index 382
+#define ProgramNamedParameter4dNV_remap_index 383
+#define ProgramNamedParameter4dvNV_remap_index 384
+#define ProgramNamedParameter4fNV_remap_index 385
+#define ProgramNamedParameter4fvNV_remap_index 386
+#define PrimitiveRestartIndexNV_remap_index 387
+#define PrimitiveRestartNV_remap_index 388
+#define DepthBoundsEXT_remap_index 389
+#define BlendEquationSeparateEXT_remap_index 390
+#define BindFramebufferEXT_remap_index 391
+#define BindRenderbufferEXT_remap_index 392
+#define CheckFramebufferStatusEXT_remap_index 393
+#define DeleteFramebuffersEXT_remap_index 394
+#define DeleteRenderbuffersEXT_remap_index 395
+#define FramebufferRenderbufferEXT_remap_index 396
+#define FramebufferTexture1DEXT_remap_index 397
+#define FramebufferTexture2DEXT_remap_index 398
+#define FramebufferTexture3DEXT_remap_index 399
+#define GenFramebuffersEXT_remap_index 400
+#define GenRenderbuffersEXT_remap_index 401
+#define GenerateMipmapEXT_remap_index 402
+#define GetFramebufferAttachmentParameterivEXT_remap_index 403
+#define GetRenderbufferParameterivEXT_remap_index 404
+#define IsFramebufferEXT_remap_index 405
+#define IsRenderbufferEXT_remap_index 406
+#define RenderbufferStorageEXT_remap_index 407
+#define BlitFramebufferEXT_remap_index 408
+#define BufferParameteriAPPLE_remap_index 409
+#define FlushMappedBufferRangeAPPLE_remap_index 410
+#define BindFragDataLocationEXT_remap_index 411
+#define GetFragDataLocationEXT_remap_index 412
+#define GetUniformuivEXT_remap_index 413
+#define GetVertexAttribIivEXT_remap_index 414
+#define GetVertexAttribIuivEXT_remap_index 415
+#define Uniform1uiEXT_remap_index 416
+#define Uniform1uivEXT_remap_index 417
+#define Uniform2uiEXT_remap_index 418
+#define Uniform2uivEXT_remap_index 419
+#define Uniform3uiEXT_remap_index 420
+#define Uniform3uivEXT_remap_index 421
+#define Uniform4uiEXT_remap_index 422
+#define Uniform4uivEXT_remap_index 423
+#define VertexAttribI1iEXT_remap_index 424
+#define VertexAttribI1ivEXT_remap_index 425
+#define VertexAttribI1uiEXT_remap_index 426
+#define VertexAttribI1uivEXT_remap_index 427
+#define VertexAttribI2iEXT_remap_index 428
+#define VertexAttribI2ivEXT_remap_index 429
+#define VertexAttribI2uiEXT_remap_index 430
+#define VertexAttribI2uivEXT_remap_index 431
+#define VertexAttribI3iEXT_remap_index 432
+#define VertexAttribI3ivEXT_remap_index 433
+#define VertexAttribI3uiEXT_remap_index 434
+#define VertexAttribI3uivEXT_remap_index 435
+#define VertexAttribI4bvEXT_remap_index 436
+#define VertexAttribI4iEXT_remap_index 437
+#define VertexAttribI4ivEXT_remap_index 438
+#define VertexAttribI4svEXT_remap_index 439
+#define VertexAttribI4ubvEXT_remap_index 440
+#define VertexAttribI4uiEXT_remap_index 441
+#define VertexAttribI4uivEXT_remap_index 442
+#define VertexAttribI4usvEXT_remap_index 443
+#define VertexAttribIPointerEXT_remap_index 444
+#define FramebufferTextureLayerEXT_remap_index 445
+#define ColorMaskIndexedEXT_remap_index 446
+#define DisableIndexedEXT_remap_index 447
+#define EnableIndexedEXT_remap_index 448
+#define GetBooleanIndexedvEXT_remap_index 449
+#define GetIntegerIndexedvEXT_remap_index 450
+#define IsEnabledIndexedEXT_remap_index 451
+#define ClearColorIiEXT_remap_index 452
+#define ClearColorIuiEXT_remap_index 453
+#define GetTexParameterIivEXT_remap_index 454
+#define GetTexParameterIuivEXT_remap_index 455
+#define TexParameterIivEXT_remap_index 456
+#define TexParameterIuivEXT_remap_index 457
+#define BeginConditionalRenderNV_remap_index 458
+#define EndConditionalRenderNV_remap_index 459
+#define BeginTransformFeedbackEXT_remap_index 460
+#define BindBufferBaseEXT_remap_index 461
+#define BindBufferOffsetEXT_remap_index 462
+#define BindBufferRangeEXT_remap_index 463
+#define EndTransformFeedbackEXT_remap_index 464
+#define GetTransformFeedbackVaryingEXT_remap_index 465
+#define TransformFeedbackVaryingsEXT_remap_index 466
+#define ProvokingVertexEXT_remap_index 467
+#define GetTexParameterPointervAPPLE_remap_index 468
+#define TextureRangeAPPLE_remap_index 469
+#define GetObjectParameterivAPPLE_remap_index 470
+#define ObjectPurgeableAPPLE_remap_index 471
+#define ObjectUnpurgeableAPPLE_remap_index 472
+#define ActiveProgramEXT_remap_index 473
+#define CreateShaderProgramEXT_remap_index 474
+#define UseShaderProgramEXT_remap_index 475
+#define TextureBarrierNV_remap_index 476
+#define StencilFuncSeparateATI_remap_index 477
+#define ProgramEnvParameters4fvEXT_remap_index 478
+#define ProgramLocalParameters4fvEXT_remap_index 479
+#define GetQueryObjecti64vEXT_remap_index 480
+#define GetQueryObjectui64vEXT_remap_index 481
+#define EGLImageTargetRenderbufferStorageOES_remap_index 482
+#define EGLImageTargetTexture2DOES_remap_index 483
+
+#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index]
+#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index]
+#define _gloffset_CreateShader driDispatchRemapTable[CreateShader_remap_index]
+#define _gloffset_DeleteProgram driDispatchRemapTable[DeleteProgram_remap_index]
+#define _gloffset_DeleteShader driDispatchRemapTable[DeleteShader_remap_index]
+#define _gloffset_DetachShader driDispatchRemapTable[DetachShader_remap_index]
+#define _gloffset_GetAttachedShaders driDispatchRemapTable[GetAttachedShaders_remap_index]
+#define _gloffset_GetProgramInfoLog driDispatchRemapTable[GetProgramInfoLog_remap_index]
+#define _gloffset_GetProgramiv driDispatchRemapTable[GetProgramiv_remap_index]
+#define _gloffset_GetShaderInfoLog driDispatchRemapTable[GetShaderInfoLog_remap_index]
+#define _gloffset_GetShaderiv driDispatchRemapTable[GetShaderiv_remap_index]
+#define _gloffset_IsProgram driDispatchRemapTable[IsProgram_remap_index]
+#define _gloffset_IsShader driDispatchRemapTable[IsShader_remap_index]
+#define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index]
+#define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index]
+#define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index]
+#define _gloffset_UniformMatrix2x3fv driDispatchRemapTable[UniformMatrix2x3fv_remap_index]
+#define _gloffset_UniformMatrix2x4fv driDispatchRemapTable[UniformMatrix2x4fv_remap_index]
+#define _gloffset_UniformMatrix3x2fv driDispatchRemapTable[UniformMatrix3x2fv_remap_index]
+#define _gloffset_UniformMatrix3x4fv driDispatchRemapTable[UniformMatrix3x4fv_remap_index]
+#define _gloffset_UniformMatrix4x2fv driDispatchRemapTable[UniformMatrix4x2fv_remap_index]
+#define _gloffset_UniformMatrix4x3fv driDispatchRemapTable[UniformMatrix4x3fv_remap_index]
+#define _gloffset_ClampColor driDispatchRemapTable[ClampColor_remap_index]
+#define _gloffset_ClearBufferfi driDispatchRemapTable[ClearBufferfi_remap_index]
+#define _gloffset_ClearBufferfv driDispatchRemapTable[ClearBufferfv_remap_index]
+#define _gloffset_ClearBufferiv driDispatchRemapTable[ClearBufferiv_remap_index]
+#define _gloffset_ClearBufferuiv driDispatchRemapTable[ClearBufferuiv_remap_index]
+#define _gloffset_GetStringi driDispatchRemapTable[GetStringi_remap_index]
+#define _gloffset_TexBuffer driDispatchRemapTable[TexBuffer_remap_index]
+#define _gloffset_FramebufferTexture driDispatchRemapTable[FramebufferTexture_remap_index]
+#define _gloffset_GetBufferParameteri64v driDispatchRemapTable[GetBufferParameteri64v_remap_index]
+#define _gloffset_GetInteger64i_v driDispatchRemapTable[GetInteger64i_v_remap_index]
+#define _gloffset_VertexAttribDivisor driDispatchRemapTable[VertexAttribDivisor_remap_index]
+#define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index]
+#define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index]
+#define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index]
+#define _gloffset_MultTransposeMatrixfARB driDispatchRemapTable[MultTransposeMatrixfARB_remap_index]
+#define _gloffset_SampleCoverageARB driDispatchRemapTable[SampleCoverageARB_remap_index]
+#define _gloffset_CompressedTexImage1DARB driDispatchRemapTable[CompressedTexImage1DARB_remap_index]
+#define _gloffset_CompressedTexImage2DARB driDispatchRemapTable[CompressedTexImage2DARB_remap_index]
+#define _gloffset_CompressedTexImage3DARB driDispatchRemapTable[CompressedTexImage3DARB_remap_index]
+#define _gloffset_CompressedTexSubImage1DARB driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index]
+#define _gloffset_CompressedTexSubImage2DARB driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index]
+#define _gloffset_CompressedTexSubImage3DARB driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index]
+#define _gloffset_GetCompressedTexImageARB driDispatchRemapTable[GetCompressedTexImageARB_remap_index]
+#define _gloffset_DisableVertexAttribArrayARB driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index]
+#define _gloffset_EnableVertexAttribArrayARB driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index]
+#define _gloffset_GetProgramEnvParameterdvARB driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index]
+#define _gloffset_GetProgramEnvParameterfvARB driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index]
+#define _gloffset_GetProgramLocalParameterdvARB driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index]
+#define _gloffset_GetProgramLocalParameterfvARB driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index]
+#define _gloffset_GetProgramStringARB driDispatchRemapTable[GetProgramStringARB_remap_index]
+#define _gloffset_GetProgramivARB driDispatchRemapTable[GetProgramivARB_remap_index]
+#define _gloffset_GetVertexAttribdvARB driDispatchRemapTable[GetVertexAttribdvARB_remap_index]
+#define _gloffset_GetVertexAttribfvARB driDispatchRemapTable[GetVertexAttribfvARB_remap_index]
+#define _gloffset_GetVertexAttribivARB driDispatchRemapTable[GetVertexAttribivARB_remap_index]
+#define _gloffset_ProgramEnvParameter4dARB driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index]
+#define _gloffset_ProgramEnvParameter4dvARB driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index]
+#define _gloffset_ProgramEnvParameter4fARB driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index]
+#define _gloffset_ProgramEnvParameter4fvARB driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index]
+#define _gloffset_ProgramLocalParameter4dARB driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index]
+#define _gloffset_ProgramLocalParameter4dvARB driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index]
+#define _gloffset_ProgramLocalParameter4fARB driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index]
+#define _gloffset_ProgramLocalParameter4fvARB driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index]
+#define _gloffset_ProgramStringARB driDispatchRemapTable[ProgramStringARB_remap_index]
+#define _gloffset_VertexAttrib1dARB driDispatchRemapTable[VertexAttrib1dARB_remap_index]
+#define _gloffset_VertexAttrib1dvARB driDispatchRemapTable[VertexAttrib1dvARB_remap_index]
+#define _gloffset_VertexAttrib1fARB driDispatchRemapTable[VertexAttrib1fARB_remap_index]
+#define _gloffset_VertexAttrib1fvARB driDispatchRemapTable[VertexAttrib1fvARB_remap_index]
+#define _gloffset_VertexAttrib1sARB driDispatchRemapTable[VertexAttrib1sARB_remap_index]
+#define _gloffset_VertexAttrib1svARB driDispatchRemapTable[VertexAttrib1svARB_remap_index]
+#define _gloffset_VertexAttrib2dARB driDispatchRemapTable[VertexAttrib2dARB_remap_index]
+#define _gloffset_VertexAttrib2dvARB driDispatchRemapTable[VertexAttrib2dvARB_remap_index]
+#define _gloffset_VertexAttrib2fARB driDispatchRemapTable[VertexAttrib2fARB_remap_index]
+#define _gloffset_VertexAttrib2fvARB driDispatchRemapTable[VertexAttrib2fvARB_remap_index]
+#define _gloffset_VertexAttrib2sARB driDispatchRemapTable[VertexAttrib2sARB_remap_index]
+#define _gloffset_VertexAttrib2svARB driDispatchRemapTable[VertexAttrib2svARB_remap_index]
+#define _gloffset_VertexAttrib3dARB driDispatchRemapTable[VertexAttrib3dARB_remap_index]
+#define _gloffset_VertexAttrib3dvARB driDispatchRemapTable[VertexAttrib3dvARB_remap_index]
+#define _gloffset_VertexAttrib3fARB driDispatchRemapTable[VertexAttrib3fARB_remap_index]
+#define _gloffset_VertexAttrib3fvARB driDispatchRemapTable[VertexAttrib3fvARB_remap_index]
+#define _gloffset_VertexAttrib3sARB driDispatchRemapTable[VertexAttrib3sARB_remap_index]
+#define _gloffset_VertexAttrib3svARB driDispatchRemapTable[VertexAttrib3svARB_remap_index]
+#define _gloffset_VertexAttrib4NbvARB driDispatchRemapTable[VertexAttrib4NbvARB_remap_index]
+#define _gloffset_VertexAttrib4NivARB driDispatchRemapTable[VertexAttrib4NivARB_remap_index]
+#define _gloffset_VertexAttrib4NsvARB driDispatchRemapTable[VertexAttrib4NsvARB_remap_index]
+#define _gloffset_VertexAttrib4NubARB driDispatchRemapTable[VertexAttrib4NubARB_remap_index]
+#define _gloffset_VertexAttrib4NubvARB driDispatchRemapTable[VertexAttrib4NubvARB_remap_index]
+#define _gloffset_VertexAttrib4NuivARB driDispatchRemapTable[VertexAttrib4NuivARB_remap_index]
+#define _gloffset_VertexAttrib4NusvARB driDispatchRemapTable[VertexAttrib4NusvARB_remap_index]
+#define _gloffset_VertexAttrib4bvARB driDispatchRemapTable[VertexAttrib4bvARB_remap_index]
+#define _gloffset_VertexAttrib4dARB driDispatchRemapTable[VertexAttrib4dARB_remap_index]
+#define _gloffset_VertexAttrib4dvARB driDispatchRemapTable[VertexAttrib4dvARB_remap_index]
+#define _gloffset_VertexAttrib4fARB driDispatchRemapTable[VertexAttrib4fARB_remap_index]
+#define _gloffset_VertexAttrib4fvARB driDispatchRemapTable[VertexAttrib4fvARB_remap_index]
+#define _gloffset_VertexAttrib4ivARB driDispatchRemapTable[VertexAttrib4ivARB_remap_index]
+#define _gloffset_VertexAttrib4sARB driDispatchRemapTable[VertexAttrib4sARB_remap_index]
+#define _gloffset_VertexAttrib4svARB driDispatchRemapTable[VertexAttrib4svARB_remap_index]
+#define _gloffset_VertexAttrib4ubvARB driDispatchRemapTable[VertexAttrib4ubvARB_remap_index]
+#define _gloffset_VertexAttrib4uivARB driDispatchRemapTable[VertexAttrib4uivARB_remap_index]
+#define _gloffset_VertexAttrib4usvARB driDispatchRemapTable[VertexAttrib4usvARB_remap_index]
+#define _gloffset_VertexAttribPointerARB driDispatchRemapTable[VertexAttribPointerARB_remap_index]
+#define _gloffset_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index]
+#define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index]
+#define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index]
+#define _gloffset_DeleteBuffersARB driDispatchRemapTable[DeleteBuffersARB_remap_index]
+#define _gloffset_GenBuffersARB driDispatchRemapTable[GenBuffersARB_remap_index]
+#define _gloffset_GetBufferParameterivARB driDispatchRemapTable[GetBufferParameterivARB_remap_index]
+#define _gloffset_GetBufferPointervARB driDispatchRemapTable[GetBufferPointervARB_remap_index]
+#define _gloffset_GetBufferSubDataARB driDispatchRemapTable[GetBufferSubDataARB_remap_index]
+#define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index]
+#define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index]
+#define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_remap_index]
+#define _gloffset_BeginQueryARB driDispatchRemapTable[BeginQueryARB_remap_index]
+#define _gloffset_DeleteQueriesARB driDispatchRemapTable[DeleteQueriesARB_remap_index]
+#define _gloffset_EndQueryARB driDispatchRemapTable[EndQueryARB_remap_index]
+#define _gloffset_GenQueriesARB driDispatchRemapTable[GenQueriesARB_remap_index]
+#define _gloffset_GetQueryObjectivARB driDispatchRemapTable[GetQueryObjectivARB_remap_index]
+#define _gloffset_GetQueryObjectuivARB driDispatchRemapTable[GetQueryObjectuivARB_remap_index]
+#define _gloffset_GetQueryivARB driDispatchRemapTable[GetQueryivARB_remap_index]
+#define _gloffset_IsQueryARB driDispatchRemapTable[IsQueryARB_remap_index]
+#define _gloffset_AttachObjectARB driDispatchRemapTable[AttachObjectARB_remap_index]
+#define _gloffset_CompileShaderARB driDispatchRemapTable[CompileShaderARB_remap_index]
+#define _gloffset_CreateProgramObjectARB driDispatchRemapTable[CreateProgramObjectARB_remap_index]
+#define _gloffset_CreateShaderObjectARB driDispatchRemapTable[CreateShaderObjectARB_remap_index]
+#define _gloffset_DeleteObjectARB driDispatchRemapTable[DeleteObjectARB_remap_index]
+#define _gloffset_DetachObjectARB driDispatchRemapTable[DetachObjectARB_remap_index]
+#define _gloffset_GetActiveUniformARB driDispatchRemapTable[GetActiveUniformARB_remap_index]
+#define _gloffset_GetAttachedObjectsARB driDispatchRemapTable[GetAttachedObjectsARB_remap_index]
+#define _gloffset_GetHandleARB driDispatchRemapTable[GetHandleARB_remap_index]
+#define _gloffset_GetInfoLogARB driDispatchRemapTable[GetInfoLogARB_remap_index]
+#define _gloffset_GetObjectParameterfvARB driDispatchRemapTable[GetObjectParameterfvARB_remap_index]
+#define _gloffset_GetObjectParameterivARB driDispatchRemapTable[GetObjectParameterivARB_remap_index]
+#define _gloffset_GetShaderSourceARB driDispatchRemapTable[GetShaderSourceARB_remap_index]
+#define _gloffset_GetUniformLocationARB driDispatchRemapTable[GetUniformLocationARB_remap_index]
+#define _gloffset_GetUniformfvARB driDispatchRemapTable[GetUniformfvARB_remap_index]
+#define _gloffset_GetUniformivARB driDispatchRemapTable[GetUniformivARB_remap_index]
+#define _gloffset_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index]
+#define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index]
+#define _gloffset_Uniform1fARB driDispatchRemapTable[Uniform1fARB_remap_index]
+#define _gloffset_Uniform1fvARB driDispatchRemapTable[Uniform1fvARB_remap_index]
+#define _gloffset_Uniform1iARB driDispatchRemapTable[Uniform1iARB_remap_index]
+#define _gloffset_Uniform1ivARB driDispatchRemapTable[Uniform1ivARB_remap_index]
+#define _gloffset_Uniform2fARB driDispatchRemapTable[Uniform2fARB_remap_index]
+#define _gloffset_Uniform2fvARB driDispatchRemapTable[Uniform2fvARB_remap_index]
+#define _gloffset_Uniform2iARB driDispatchRemapTable[Uniform2iARB_remap_index]
+#define _gloffset_Uniform2ivARB driDispatchRemapTable[Uniform2ivARB_remap_index]
+#define _gloffset_Uniform3fARB driDispatchRemapTable[Uniform3fARB_remap_index]
+#define _gloffset_Uniform3fvARB driDispatchRemapTable[Uniform3fvARB_remap_index]
+#define _gloffset_Uniform3iARB driDispatchRemapTable[Uniform3iARB_remap_index]
+#define _gloffset_Uniform3ivARB driDispatchRemapTable[Uniform3ivARB_remap_index]
+#define _gloffset_Uniform4fARB driDispatchRemapTable[Uniform4fARB_remap_index]
+#define _gloffset_Uniform4fvARB driDispatchRemapTable[Uniform4fvARB_remap_index]
+#define _gloffset_Uniform4iARB driDispatchRemapTable[Uniform4iARB_remap_index]
+#define _gloffset_Uniform4ivARB driDispatchRemapTable[Uniform4ivARB_remap_index]
+#define _gloffset_UniformMatrix2fvARB driDispatchRemapTable[UniformMatrix2fvARB_remap_index]
+#define _gloffset_UniformMatrix3fvARB driDispatchRemapTable[UniformMatrix3fvARB_remap_index]
+#define _gloffset_UniformMatrix4fvARB driDispatchRemapTable[UniformMatrix4fvARB_remap_index]
+#define _gloffset_UseProgramObjectARB driDispatchRemapTable[UseProgramObjectARB_remap_index]
+#define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index]
+#define _gloffset_BindAttribLocationARB driDispatchRemapTable[BindAttribLocationARB_remap_index]
+#define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index]
+#define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index]
+#define _gloffset_DrawBuffersARB driDispatchRemapTable[DrawBuffersARB_remap_index]
+#define _gloffset_DrawArraysInstancedARB driDispatchRemapTable[DrawArraysInstancedARB_remap_index]
+#define _gloffset_DrawElementsInstancedARB driDispatchRemapTable[DrawElementsInstancedARB_remap_index]
+#define _gloffset_RenderbufferStorageMultisample driDispatchRemapTable[RenderbufferStorageMultisample_remap_index]
+#define _gloffset_FramebufferTextureARB driDispatchRemapTable[FramebufferTextureARB_remap_index]
+#define _gloffset_FramebufferTextureFaceARB driDispatchRemapTable[FramebufferTextureFaceARB_remap_index]
+#define _gloffset_ProgramParameteriARB driDispatchRemapTable[ProgramParameteriARB_remap_index]
+#define _gloffset_VertexAttribDivisorARB driDispatchRemapTable[VertexAttribDivisorARB_remap_index]
+#define _gloffset_FlushMappedBufferRange driDispatchRemapTable[FlushMappedBufferRange_remap_index]
+#define _gloffset_MapBufferRange driDispatchRemapTable[MapBufferRange_remap_index]
+#define _gloffset_BindVertexArray driDispatchRemapTable[BindVertexArray_remap_index]
+#define _gloffset_GenVertexArrays driDispatchRemapTable[GenVertexArrays_remap_index]
+#define _gloffset_CopyBufferSubData driDispatchRemapTable[CopyBufferSubData_remap_index]
+#define _gloffset_ClientWaitSync driDispatchRemapTable[ClientWaitSync_remap_index]
+#define _gloffset_DeleteSync driDispatchRemapTable[DeleteSync_remap_index]
+#define _gloffset_FenceSync driDispatchRemapTable[FenceSync_remap_index]
+#define _gloffset_GetInteger64v driDispatchRemapTable[GetInteger64v_remap_index]
+#define _gloffset_GetSynciv driDispatchRemapTable[GetSynciv_remap_index]
+#define _gloffset_IsSync driDispatchRemapTable[IsSync_remap_index]
+#define _gloffset_WaitSync driDispatchRemapTable[WaitSync_remap_index]
+#define _gloffset_DrawElementsBaseVertex driDispatchRemapTable[DrawElementsBaseVertex_remap_index]
+#define _gloffset_DrawRangeElementsBaseVertex driDispatchRemapTable[DrawRangeElementsBaseVertex_remap_index]
+#define _gloffset_MultiDrawElementsBaseVertex driDispatchRemapTable[MultiDrawElementsBaseVertex_remap_index]
+#define _gloffset_BlendEquationSeparateiARB driDispatchRemapTable[BlendEquationSeparateiARB_remap_index]
+#define _gloffset_BlendEquationiARB driDispatchRemapTable[BlendEquationiARB_remap_index]
+#define _gloffset_BlendFuncSeparateiARB driDispatchRemapTable[BlendFuncSeparateiARB_remap_index]
+#define _gloffset_BlendFunciARB driDispatchRemapTable[BlendFunciARB_remap_index]
+#define _gloffset_BindTransformFeedback driDispatchRemapTable[BindTransformFeedback_remap_index]
+#define _gloffset_DeleteTransformFeedbacks driDispatchRemapTable[DeleteTransformFeedbacks_remap_index]
+#define _gloffset_DrawTransformFeedback driDispatchRemapTable[DrawTransformFeedback_remap_index]
+#define _gloffset_GenTransformFeedbacks driDispatchRemapTable[GenTransformFeedbacks_remap_index]
+#define _gloffset_IsTransformFeedback driDispatchRemapTable[IsTransformFeedback_remap_index]
+#define _gloffset_PauseTransformFeedback driDispatchRemapTable[PauseTransformFeedback_remap_index]
+#define _gloffset_ResumeTransformFeedback driDispatchRemapTable[ResumeTransformFeedback_remap_index]
+#define _gloffset_ClearDepthf driDispatchRemapTable[ClearDepthf_remap_index]
+#define _gloffset_DepthRangef driDispatchRemapTable[DepthRangef_remap_index]
+#define _gloffset_GetShaderPrecisionFormat driDispatchRemapTable[GetShaderPrecisionFormat_remap_index]
+#define _gloffset_ReleaseShaderCompiler driDispatchRemapTable[ReleaseShaderCompiler_remap_index]
+#define _gloffset_ShaderBinary driDispatchRemapTable[ShaderBinary_remap_index]
+#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index]
+#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index]
+#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index]
+#define _gloffset_PixelTexGenParameterfSGIS driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index]
+#define _gloffset_PixelTexGenParameterfvSGIS driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index]
+#define _gloffset_PixelTexGenParameteriSGIS driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index]
+#define _gloffset_PixelTexGenParameterivSGIS driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index]
+#define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index]
+#define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index]
+#define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index]
+#define _gloffset_EdgeFlagPointerEXT driDispatchRemapTable[EdgeFlagPointerEXT_remap_index]
+#define _gloffset_IndexPointerEXT driDispatchRemapTable[IndexPointerEXT_remap_index]
+#define _gloffset_NormalPointerEXT driDispatchRemapTable[NormalPointerEXT_remap_index]
+#define _gloffset_TexCoordPointerEXT driDispatchRemapTable[TexCoordPointerEXT_remap_index]
+#define _gloffset_VertexPointerEXT driDispatchRemapTable[VertexPointerEXT_remap_index]
+#define _gloffset_PointParameterfEXT driDispatchRemapTable[PointParameterfEXT_remap_index]
+#define _gloffset_PointParameterfvEXT driDispatchRemapTable[PointParameterfvEXT_remap_index]
+#define _gloffset_LockArraysEXT driDispatchRemapTable[LockArraysEXT_remap_index]
+#define _gloffset_UnlockArraysEXT driDispatchRemapTable[UnlockArraysEXT_remap_index]
+#define _gloffset_SecondaryColor3bEXT driDispatchRemapTable[SecondaryColor3bEXT_remap_index]
+#define _gloffset_SecondaryColor3bvEXT driDispatchRemapTable[SecondaryColor3bvEXT_remap_index]
+#define _gloffset_SecondaryColor3dEXT driDispatchRemapTable[SecondaryColor3dEXT_remap_index]
+#define _gloffset_SecondaryColor3dvEXT driDispatchRemapTable[SecondaryColor3dvEXT_remap_index]
+#define _gloffset_SecondaryColor3fEXT driDispatchRemapTable[SecondaryColor3fEXT_remap_index]
+#define _gloffset_SecondaryColor3fvEXT driDispatchRemapTable[SecondaryColor3fvEXT_remap_index]
+#define _gloffset_SecondaryColor3iEXT driDispatchRemapTable[SecondaryColor3iEXT_remap_index]
+#define _gloffset_SecondaryColor3ivEXT driDispatchRemapTable[SecondaryColor3ivEXT_remap_index]
+#define _gloffset_SecondaryColor3sEXT driDispatchRemapTable[SecondaryColor3sEXT_remap_index]
+#define _gloffset_SecondaryColor3svEXT driDispatchRemapTable[SecondaryColor3svEXT_remap_index]
+#define _gloffset_SecondaryColor3ubEXT driDispatchRemapTable[SecondaryColor3ubEXT_remap_index]
+#define _gloffset_SecondaryColor3ubvEXT driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index]
+#define _gloffset_SecondaryColor3uiEXT driDispatchRemapTable[SecondaryColor3uiEXT_remap_index]
+#define _gloffset_SecondaryColor3uivEXT driDispatchRemapTable[SecondaryColor3uivEXT_remap_index]
+#define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index]
+#define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index]
+#define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index]
+#define _gloffset_MultiDrawArraysEXT driDispatchRemapTable[MultiDrawArraysEXT_remap_index]
+#define _gloffset_MultiDrawElementsEXT driDispatchRemapTable[MultiDrawElementsEXT_remap_index]
+#define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index]
+#define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index]
+#define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index]
+#define _gloffset_FogCoordfEXT driDispatchRemapTable[FogCoordfEXT_remap_index]
+#define _gloffset_FogCoordfvEXT driDispatchRemapTable[FogCoordfvEXT_remap_index]
+#define _gloffset_PixelTexGenSGIX driDispatchRemapTable[PixelTexGenSGIX_remap_index]
+#define _gloffset_BlendFuncSeparateEXT driDispatchRemapTable[BlendFuncSeparateEXT_remap_index]
+#define _gloffset_FlushVertexArrayRangeNV driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index]
+#define _gloffset_VertexArrayRangeNV driDispatchRemapTable[VertexArrayRangeNV_remap_index]
+#define _gloffset_CombinerInputNV driDispatchRemapTable[CombinerInputNV_remap_index]
+#define _gloffset_CombinerOutputNV driDispatchRemapTable[CombinerOutputNV_remap_index]
+#define _gloffset_CombinerParameterfNV driDispatchRemapTable[CombinerParameterfNV_remap_index]
+#define _gloffset_CombinerParameterfvNV driDispatchRemapTable[CombinerParameterfvNV_remap_index]
+#define _gloffset_CombinerParameteriNV driDispatchRemapTable[CombinerParameteriNV_remap_index]
+#define _gloffset_CombinerParameterivNV driDispatchRemapTable[CombinerParameterivNV_remap_index]
+#define _gloffset_FinalCombinerInputNV driDispatchRemapTable[FinalCombinerInputNV_remap_index]
+#define _gloffset_GetCombinerInputParameterfvNV driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index]
+#define _gloffset_GetCombinerInputParameterivNV driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index]
+#define _gloffset_GetCombinerOutputParameterfvNV driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index]
+#define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index]
+#define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index]
+#define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index]
+#define _gloffset_ResizeBuffersMESA driDispatchRemapTable[ResizeBuffersMESA_remap_index]
+#define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index]
+#define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index]
+#define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index]
+#define _gloffset_WindowPos2fvMESA driDispatchRemapTable[WindowPos2fvMESA_remap_index]
+#define _gloffset_WindowPos2iMESA driDispatchRemapTable[WindowPos2iMESA_remap_index]
+#define _gloffset_WindowPos2ivMESA driDispatchRemapTable[WindowPos2ivMESA_remap_index]
+#define _gloffset_WindowPos2sMESA driDispatchRemapTable[WindowPos2sMESA_remap_index]
+#define _gloffset_WindowPos2svMESA driDispatchRemapTable[WindowPos2svMESA_remap_index]
+#define _gloffset_WindowPos3dMESA driDispatchRemapTable[WindowPos3dMESA_remap_index]
+#define _gloffset_WindowPos3dvMESA driDispatchRemapTable[WindowPos3dvMESA_remap_index]
+#define _gloffset_WindowPos3fMESA driDispatchRemapTable[WindowPos3fMESA_remap_index]
+#define _gloffset_WindowPos3fvMESA driDispatchRemapTable[WindowPos3fvMESA_remap_index]
+#define _gloffset_WindowPos3iMESA driDispatchRemapTable[WindowPos3iMESA_remap_index]
+#define _gloffset_WindowPos3ivMESA driDispatchRemapTable[WindowPos3ivMESA_remap_index]
+#define _gloffset_WindowPos3sMESA driDispatchRemapTable[WindowPos3sMESA_remap_index]
+#define _gloffset_WindowPos3svMESA driDispatchRemapTable[WindowPos3svMESA_remap_index]
+#define _gloffset_WindowPos4dMESA driDispatchRemapTable[WindowPos4dMESA_remap_index]
+#define _gloffset_WindowPos4dvMESA driDispatchRemapTable[WindowPos4dvMESA_remap_index]
+#define _gloffset_WindowPos4fMESA driDispatchRemapTable[WindowPos4fMESA_remap_index]
+#define _gloffset_WindowPos4fvMESA driDispatchRemapTable[WindowPos4fvMESA_remap_index]
+#define _gloffset_WindowPos4iMESA driDispatchRemapTable[WindowPos4iMESA_remap_index]
+#define _gloffset_WindowPos4ivMESA driDispatchRemapTable[WindowPos4ivMESA_remap_index]
+#define _gloffset_WindowPos4sMESA driDispatchRemapTable[WindowPos4sMESA_remap_index]
+#define _gloffset_WindowPos4svMESA driDispatchRemapTable[WindowPos4svMESA_remap_index]
+#define _gloffset_MultiModeDrawArraysIBM driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index]
+#define _gloffset_MultiModeDrawElementsIBM driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index]
+#define _gloffset_DeleteFencesNV driDispatchRemapTable[DeleteFencesNV_remap_index]
+#define _gloffset_FinishFenceNV driDispatchRemapTable[FinishFenceNV_remap_index]
+#define _gloffset_GenFencesNV driDispatchRemapTable[GenFencesNV_remap_index]
+#define _gloffset_GetFenceivNV driDispatchRemapTable[GetFenceivNV_remap_index]
+#define _gloffset_IsFenceNV driDispatchRemapTable[IsFenceNV_remap_index]
+#define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index]
+#define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index]
+#define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index]
+#define _gloffset_BindProgramNV driDispatchRemapTable[BindProgramNV_remap_index]
+#define _gloffset_DeleteProgramsNV driDispatchRemapTable[DeleteProgramsNV_remap_index]
+#define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index]
+#define _gloffset_GenProgramsNV driDispatchRemapTable[GenProgramsNV_remap_index]
+#define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index]
+#define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index]
+#define _gloffset_GetProgramStringNV driDispatchRemapTable[GetProgramStringNV_remap_index]
+#define _gloffset_GetProgramivNV driDispatchRemapTable[GetProgramivNV_remap_index]
+#define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index]
+#define _gloffset_GetVertexAttribPointervNV driDispatchRemapTable[GetVertexAttribPointervNV_remap_index]
+#define _gloffset_GetVertexAttribdvNV driDispatchRemapTable[GetVertexAttribdvNV_remap_index]
+#define _gloffset_GetVertexAttribfvNV driDispatchRemapTable[GetVertexAttribfvNV_remap_index]
+#define _gloffset_GetVertexAttribivNV driDispatchRemapTable[GetVertexAttribivNV_remap_index]
+#define _gloffset_IsProgramNV driDispatchRemapTable[IsProgramNV_remap_index]
+#define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index]
+#define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index]
+#define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index]
+#define _gloffset_RequestResidentProgramsNV driDispatchRemapTable[RequestResidentProgramsNV_remap_index]
+#define _gloffset_TrackMatrixNV driDispatchRemapTable[TrackMatrixNV_remap_index]
+#define _gloffset_VertexAttrib1dNV driDispatchRemapTable[VertexAttrib1dNV_remap_index]
+#define _gloffset_VertexAttrib1dvNV driDispatchRemapTable[VertexAttrib1dvNV_remap_index]
+#define _gloffset_VertexAttrib1fNV driDispatchRemapTable[VertexAttrib1fNV_remap_index]
+#define _gloffset_VertexAttrib1fvNV driDispatchRemapTable[VertexAttrib1fvNV_remap_index]
+#define _gloffset_VertexAttrib1sNV driDispatchRemapTable[VertexAttrib1sNV_remap_index]
+#define _gloffset_VertexAttrib1svNV driDispatchRemapTable[VertexAttrib1svNV_remap_index]
+#define _gloffset_VertexAttrib2dNV driDispatchRemapTable[VertexAttrib2dNV_remap_index]
+#define _gloffset_VertexAttrib2dvNV driDispatchRemapTable[VertexAttrib2dvNV_remap_index]
+#define _gloffset_VertexAttrib2fNV driDispatchRemapTable[VertexAttrib2fNV_remap_index]
+#define _gloffset_VertexAttrib2fvNV driDispatchRemapTable[VertexAttrib2fvNV_remap_index]
+#define _gloffset_VertexAttrib2sNV driDispatchRemapTable[VertexAttrib2sNV_remap_index]
+#define _gloffset_VertexAttrib2svNV driDispatchRemapTable[VertexAttrib2svNV_remap_index]
+#define _gloffset_VertexAttrib3dNV driDispatchRemapTable[VertexAttrib3dNV_remap_index]
+#define _gloffset_VertexAttrib3dvNV driDispatchRemapTable[VertexAttrib3dvNV_remap_index]
+#define _gloffset_VertexAttrib3fNV driDispatchRemapTable[VertexAttrib3fNV_remap_index]
+#define _gloffset_VertexAttrib3fvNV driDispatchRemapTable[VertexAttrib3fvNV_remap_index]
+#define _gloffset_VertexAttrib3sNV driDispatchRemapTable[VertexAttrib3sNV_remap_index]
+#define _gloffset_VertexAttrib3svNV driDispatchRemapTable[VertexAttrib3svNV_remap_index]
+#define _gloffset_VertexAttrib4dNV driDispatchRemapTable[VertexAttrib4dNV_remap_index]
+#define _gloffset_VertexAttrib4dvNV driDispatchRemapTable[VertexAttrib4dvNV_remap_index]
+#define _gloffset_VertexAttrib4fNV driDispatchRemapTable[VertexAttrib4fNV_remap_index]
+#define _gloffset_VertexAttrib4fvNV driDispatchRemapTable[VertexAttrib4fvNV_remap_index]
+#define _gloffset_VertexAttrib4sNV driDispatchRemapTable[VertexAttrib4sNV_remap_index]
+#define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index]
+#define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index]
+#define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index]
+#define _gloffset_VertexAttribPointerNV driDispatchRemapTable[VertexAttribPointerNV_remap_index]
+#define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index]
+#define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index]
+#define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index]
+#define _gloffset_VertexAttribs2dvNV driDispatchRemapTable[VertexAttribs2dvNV_remap_index]
+#define _gloffset_VertexAttribs2fvNV driDispatchRemapTable[VertexAttribs2fvNV_remap_index]
+#define _gloffset_VertexAttribs2svNV driDispatchRemapTable[VertexAttribs2svNV_remap_index]
+#define _gloffset_VertexAttribs3dvNV driDispatchRemapTable[VertexAttribs3dvNV_remap_index]
+#define _gloffset_VertexAttribs3fvNV driDispatchRemapTable[VertexAttribs3fvNV_remap_index]
+#define _gloffset_VertexAttribs3svNV driDispatchRemapTable[VertexAttribs3svNV_remap_index]
+#define _gloffset_VertexAttribs4dvNV driDispatchRemapTable[VertexAttribs4dvNV_remap_index]
+#define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index]
+#define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index]
+#define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index]
+#define _gloffset_GetTexBumpParameterfvATI driDispatchRemapTable[GetTexBumpParameterfvATI_remap_index]
+#define _gloffset_GetTexBumpParameterivATI driDispatchRemapTable[GetTexBumpParameterivATI_remap_index]
+#define _gloffset_TexBumpParameterfvATI driDispatchRemapTable[TexBumpParameterfvATI_remap_index]
+#define _gloffset_TexBumpParameterivATI driDispatchRemapTable[TexBumpParameterivATI_remap_index]
+#define _gloffset_AlphaFragmentOp1ATI driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index]
+#define _gloffset_AlphaFragmentOp2ATI driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index]
+#define _gloffset_AlphaFragmentOp3ATI driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index]
+#define _gloffset_BeginFragmentShaderATI driDispatchRemapTable[BeginFragmentShaderATI_remap_index]
+#define _gloffset_BindFragmentShaderATI driDispatchRemapTable[BindFragmentShaderATI_remap_index]
+#define _gloffset_ColorFragmentOp1ATI driDispatchRemapTable[ColorFragmentOp1ATI_remap_index]
+#define _gloffset_ColorFragmentOp2ATI driDispatchRemapTable[ColorFragmentOp2ATI_remap_index]
+#define _gloffset_ColorFragmentOp3ATI driDispatchRemapTable[ColorFragmentOp3ATI_remap_index]
+#define _gloffset_DeleteFragmentShaderATI driDispatchRemapTable[DeleteFragmentShaderATI_remap_index]
+#define _gloffset_EndFragmentShaderATI driDispatchRemapTable[EndFragmentShaderATI_remap_index]
+#define _gloffset_GenFragmentShadersATI driDispatchRemapTable[GenFragmentShadersATI_remap_index]
+#define _gloffset_PassTexCoordATI driDispatchRemapTable[PassTexCoordATI_remap_index]
+#define _gloffset_SampleMapATI driDispatchRemapTable[SampleMapATI_remap_index]
+#define _gloffset_SetFragmentShaderConstantATI driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index]
+#define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index]
+#define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index]
+#define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index]
+#define _gloffset_BindVertexArrayAPPLE driDispatchRemapTable[BindVertexArrayAPPLE_remap_index]
+#define _gloffset_DeleteVertexArraysAPPLE driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index]
+#define _gloffset_GenVertexArraysAPPLE driDispatchRemapTable[GenVertexArraysAPPLE_remap_index]
+#define _gloffset_IsVertexArrayAPPLE driDispatchRemapTable[IsVertexArrayAPPLE_remap_index]
+#define _gloffset_GetProgramNamedParameterdvNV driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index]
+#define _gloffset_GetProgramNamedParameterfvNV driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index]
+#define _gloffset_ProgramNamedParameter4dNV driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index]
+#define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index]
+#define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index]
+#define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index]
+#define _gloffset_PrimitiveRestartIndexNV driDispatchRemapTable[PrimitiveRestartIndexNV_remap_index]
+#define _gloffset_PrimitiveRestartNV driDispatchRemapTable[PrimitiveRestartNV_remap_index]
+#define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index]
+#define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_remap_index]
+#define _gloffset_BindFramebufferEXT driDispatchRemapTable[BindFramebufferEXT_remap_index]
+#define _gloffset_BindRenderbufferEXT driDispatchRemapTable[BindRenderbufferEXT_remap_index]
+#define _gloffset_CheckFramebufferStatusEXT driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index]
+#define _gloffset_DeleteFramebuffersEXT driDispatchRemapTable[DeleteFramebuffersEXT_remap_index]
+#define _gloffset_DeleteRenderbuffersEXT driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index]
+#define _gloffset_FramebufferRenderbufferEXT driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index]
+#define _gloffset_FramebufferTexture1DEXT driDispatchRemapTable[FramebufferTexture1DEXT_remap_index]
+#define _gloffset_FramebufferTexture2DEXT driDispatchRemapTable[FramebufferTexture2DEXT_remap_index]
+#define _gloffset_FramebufferTexture3DEXT driDispatchRemapTable[FramebufferTexture3DEXT_remap_index]
+#define _gloffset_GenFramebuffersEXT driDispatchRemapTable[GenFramebuffersEXT_remap_index]
+#define _gloffset_GenRenderbuffersEXT driDispatchRemapTable[GenRenderbuffersEXT_remap_index]
+#define _gloffset_GenerateMipmapEXT driDispatchRemapTable[GenerateMipmapEXT_remap_index]
+#define _gloffset_GetFramebufferAttachmentParameterivEXT driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index]
+#define _gloffset_GetRenderbufferParameterivEXT driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index]
+#define _gloffset_IsFramebufferEXT driDispatchRemapTable[IsFramebufferEXT_remap_index]
+#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index]
+#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index]
+#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index]
+#define _gloffset_BufferParameteriAPPLE driDispatchRemapTable[BufferParameteriAPPLE_remap_index]
+#define _gloffset_FlushMappedBufferRangeAPPLE driDispatchRemapTable[FlushMappedBufferRangeAPPLE_remap_index]
+#define _gloffset_BindFragDataLocationEXT driDispatchRemapTable[BindFragDataLocationEXT_remap_index]
+#define _gloffset_GetFragDataLocationEXT driDispatchRemapTable[GetFragDataLocationEXT_remap_index]
+#define _gloffset_GetUniformuivEXT driDispatchRemapTable[GetUniformuivEXT_remap_index]
+#define _gloffset_GetVertexAttribIivEXT driDispatchRemapTable[GetVertexAttribIivEXT_remap_index]
+#define _gloffset_GetVertexAttribIuivEXT driDispatchRemapTable[GetVertexAttribIuivEXT_remap_index]
+#define _gloffset_Uniform1uiEXT driDispatchRemapTable[Uniform1uiEXT_remap_index]
+#define _gloffset_Uniform1uivEXT driDispatchRemapTable[Uniform1uivEXT_remap_index]
+#define _gloffset_Uniform2uiEXT driDispatchRemapTable[Uniform2uiEXT_remap_index]
+#define _gloffset_Uniform2uivEXT driDispatchRemapTable[Uniform2uivEXT_remap_index]
+#define _gloffset_Uniform3uiEXT driDispatchRemapTable[Uniform3uiEXT_remap_index]
+#define _gloffset_Uniform3uivEXT driDispatchRemapTable[Uniform3uivEXT_remap_index]
+#define _gloffset_Uniform4uiEXT driDispatchRemapTable[Uniform4uiEXT_remap_index]
+#define _gloffset_Uniform4uivEXT driDispatchRemapTable[Uniform4uivEXT_remap_index]
+#define _gloffset_VertexAttribI1iEXT driDispatchRemapTable[VertexAttribI1iEXT_remap_index]
+#define _gloffset_VertexAttribI1ivEXT driDispatchRemapTable[VertexAttribI1ivEXT_remap_index]
+#define _gloffset_VertexAttribI1uiEXT driDispatchRemapTable[VertexAttribI1uiEXT_remap_index]
+#define _gloffset_VertexAttribI1uivEXT driDispatchRemapTable[VertexAttribI1uivEXT_remap_index]
+#define _gloffset_VertexAttribI2iEXT driDispatchRemapTable[VertexAttribI2iEXT_remap_index]
+#define _gloffset_VertexAttribI2ivEXT driDispatchRemapTable[VertexAttribI2ivEXT_remap_index]
+#define _gloffset_VertexAttribI2uiEXT driDispatchRemapTable[VertexAttribI2uiEXT_remap_index]
+#define _gloffset_VertexAttribI2uivEXT driDispatchRemapTable[VertexAttribI2uivEXT_remap_index]
+#define _gloffset_VertexAttribI3iEXT driDispatchRemapTable[VertexAttribI3iEXT_remap_index]
+#define _gloffset_VertexAttribI3ivEXT driDispatchRemapTable[VertexAttribI3ivEXT_remap_index]
+#define _gloffset_VertexAttribI3uiEXT driDispatchRemapTable[VertexAttribI3uiEXT_remap_index]
+#define _gloffset_VertexAttribI3uivEXT driDispatchRemapTable[VertexAttribI3uivEXT_remap_index]
+#define _gloffset_VertexAttribI4bvEXT driDispatchRemapTable[VertexAttribI4bvEXT_remap_index]
+#define _gloffset_VertexAttribI4iEXT driDispatchRemapTable[VertexAttribI4iEXT_remap_index]
+#define _gloffset_VertexAttribI4ivEXT driDispatchRemapTable[VertexAttribI4ivEXT_remap_index]
+#define _gloffset_VertexAttribI4svEXT driDispatchRemapTable[VertexAttribI4svEXT_remap_index]
+#define _gloffset_VertexAttribI4ubvEXT driDispatchRemapTable[VertexAttribI4ubvEXT_remap_index]
+#define _gloffset_VertexAttribI4uiEXT driDispatchRemapTable[VertexAttribI4uiEXT_remap_index]
+#define _gloffset_VertexAttribI4uivEXT driDispatchRemapTable[VertexAttribI4uivEXT_remap_index]
+#define _gloffset_VertexAttribI4usvEXT driDispatchRemapTable[VertexAttribI4usvEXT_remap_index]
+#define _gloffset_VertexAttribIPointerEXT driDispatchRemapTable[VertexAttribIPointerEXT_remap_index]
+#define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index]
+#define _gloffset_ColorMaskIndexedEXT driDispatchRemapTable[ColorMaskIndexedEXT_remap_index]
+#define _gloffset_DisableIndexedEXT driDispatchRemapTable[DisableIndexedEXT_remap_index]
+#define _gloffset_EnableIndexedEXT driDispatchRemapTable[EnableIndexedEXT_remap_index]
+#define _gloffset_GetBooleanIndexedvEXT driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index]
+#define _gloffset_GetIntegerIndexedvEXT driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index]
+#define _gloffset_IsEnabledIndexedEXT driDispatchRemapTable[IsEnabledIndexedEXT_remap_index]
+#define _gloffset_ClearColorIiEXT driDispatchRemapTable[ClearColorIiEXT_remap_index]
+#define _gloffset_ClearColorIuiEXT driDispatchRemapTable[ClearColorIuiEXT_remap_index]
+#define _gloffset_GetTexParameterIivEXT driDispatchRemapTable[GetTexParameterIivEXT_remap_index]
+#define _gloffset_GetTexParameterIuivEXT driDispatchRemapTable[GetTexParameterIuivEXT_remap_index]
+#define _gloffset_TexParameterIivEXT driDispatchRemapTable[TexParameterIivEXT_remap_index]
+#define _gloffset_TexParameterIuivEXT driDispatchRemapTable[TexParameterIuivEXT_remap_index]
+#define _gloffset_BeginConditionalRenderNV driDispatchRemapTable[BeginConditionalRenderNV_remap_index]
+#define _gloffset_EndConditionalRenderNV driDispatchRemapTable[EndConditionalRenderNV_remap_index]
+#define _gloffset_BeginTransformFeedbackEXT driDispatchRemapTable[BeginTransformFeedbackEXT_remap_index]
+#define _gloffset_BindBufferBaseEXT driDispatchRemapTable[BindBufferBaseEXT_remap_index]
+#define _gloffset_BindBufferOffsetEXT driDispatchRemapTable[BindBufferOffsetEXT_remap_index]
+#define _gloffset_BindBufferRangeEXT driDispatchRemapTable[BindBufferRangeEXT_remap_index]
+#define _gloffset_EndTransformFeedbackEXT driDispatchRemapTable[EndTransformFeedbackEXT_remap_index]
+#define _gloffset_GetTransformFeedbackVaryingEXT driDispatchRemapTable[GetTransformFeedbackVaryingEXT_remap_index]
+#define _gloffset_TransformFeedbackVaryingsEXT driDispatchRemapTable[TransformFeedbackVaryingsEXT_remap_index]
+#define _gloffset_ProvokingVertexEXT driDispatchRemapTable[ProvokingVertexEXT_remap_index]
+#define _gloffset_GetTexParameterPointervAPPLE driDispatchRemapTable[GetTexParameterPointervAPPLE_remap_index]
+#define _gloffset_TextureRangeAPPLE driDispatchRemapTable[TextureRangeAPPLE_remap_index]
+#define _gloffset_GetObjectParameterivAPPLE driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index]
+#define _gloffset_ObjectPurgeableAPPLE driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index]
+#define _gloffset_ObjectUnpurgeableAPPLE driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index]
+#define _gloffset_ActiveProgramEXT driDispatchRemapTable[ActiveProgramEXT_remap_index]
+#define _gloffset_CreateShaderProgramEXT driDispatchRemapTable[CreateShaderProgramEXT_remap_index]
+#define _gloffset_UseShaderProgramEXT driDispatchRemapTable[UseShaderProgramEXT_remap_index]
+#define _gloffset_TextureBarrierNV driDispatchRemapTable[TextureBarrierNV_remap_index]
+#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index]
+#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index]
+#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index]
+#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index]
+#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index]
+#define _gloffset_EGLImageTargetRenderbufferStorageOES driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index]
+#define _gloffset_EGLImageTargetTexture2DOES driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index]
-#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[AttachShader_remap_index], parameters)
-#define GET_AttachShader(disp) GET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index])
-#define SET_AttachShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index], fn)
-#define CALL_CreateProgram(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(void)), driDispatchRemapTable[CreateProgram_remap_index], parameters)
-#define GET_CreateProgram(disp) GET_by_offset(disp, driDispatchRemapTable[CreateProgram_remap_index])
-#define SET_CreateProgram(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CreateProgram_remap_index], fn)
-#define CALL_CreateShader(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[CreateShader_remap_index], parameters)
-#define GET_CreateShader(disp) GET_by_offset(disp, driDispatchRemapTable[CreateShader_remap_index])
-#define SET_CreateShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CreateShader_remap_index], fn)
-#define CALL_DeleteProgram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[DeleteProgram_remap_index], parameters)
-#define GET_DeleteProgram(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteProgram_remap_index])
-#define SET_DeleteProgram(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteProgram_remap_index], fn)
-#define CALL_DeleteShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[DeleteShader_remap_index], parameters)
-#define GET_DeleteShader(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteShader_remap_index])
-#define SET_DeleteShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteShader_remap_index], fn)
-#define CALL_DetachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[DetachShader_remap_index], parameters)
-#define GET_DetachShader(disp) GET_by_offset(disp, driDispatchRemapTable[DetachShader_remap_index])
-#define SET_DetachShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DetachShader_remap_index], fn)
-#define CALL_GetAttachedShaders(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLuint *)), driDispatchRemapTable[GetAttachedShaders_remap_index], parameters)
-#define GET_GetAttachedShaders(disp) GET_by_offset(disp, driDispatchRemapTable[GetAttachedShaders_remap_index])
-#define SET_GetAttachedShaders(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetAttachedShaders_remap_index], fn)
-#define CALL_GetProgramInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), driDispatchRemapTable[GetProgramInfoLog_remap_index], parameters)
-#define GET_GetProgramInfoLog(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramInfoLog_remap_index])
-#define SET_GetProgramInfoLog(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramInfoLog_remap_index], fn)
-#define CALL_GetProgramiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetProgramiv_remap_index], parameters)
-#define GET_GetProgramiv(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramiv_remap_index])
-#define SET_GetProgramiv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramiv_remap_index], fn)
-#define CALL_GetShaderInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), driDispatchRemapTable[GetShaderInfoLog_remap_index], parameters)
-#define GET_GetShaderInfoLog(disp) GET_by_offset(disp, driDispatchRemapTable[GetShaderInfoLog_remap_index])
-#define SET_GetShaderInfoLog(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetShaderInfoLog_remap_index], fn)
-#define CALL_GetShaderiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetShaderiv_remap_index], parameters)
-#define GET_GetShaderiv(disp) GET_by_offset(disp, driDispatchRemapTable[GetShaderiv_remap_index])
-#define SET_GetShaderiv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetShaderiv_remap_index], fn)
-#define CALL_IsProgram(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsProgram_remap_index], parameters)
-#define GET_IsProgram(disp) GET_by_offset(disp, driDispatchRemapTable[IsProgram_remap_index])
-#define SET_IsProgram(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsProgram_remap_index], fn)
-#define CALL_IsShader(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsShader_remap_index], parameters)
-#define GET_IsShader(disp) GET_by_offset(disp, driDispatchRemapTable[IsShader_remap_index])
-#define SET_IsShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsShader_remap_index], fn)
-#define CALL_StencilFuncSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), driDispatchRemapTable[StencilFuncSeparate_remap_index], parameters)
-#define GET_StencilFuncSeparate(disp) GET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparate_remap_index])
-#define SET_StencilFuncSeparate(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparate_remap_index], fn)
-#define CALL_StencilMaskSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[StencilMaskSeparate_remap_index], parameters)
-#define GET_StencilMaskSeparate(disp) GET_by_offset(disp, driDispatchRemapTable[StencilMaskSeparate_remap_index])
-#define SET_StencilMaskSeparate(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilMaskSeparate_remap_index], fn)
-#define CALL_StencilOpSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), driDispatchRemapTable[StencilOpSeparate_remap_index], parameters)
-#define GET_StencilOpSeparate(disp) GET_by_offset(disp, driDispatchRemapTable[StencilOpSeparate_remap_index])
-#define SET_StencilOpSeparate(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilOpSeparate_remap_index], fn)
-#define CALL_UniformMatrix2x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix2x3fv_remap_index], parameters)
-#define GET_UniformMatrix2x3fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x3fv_remap_index])
-#define SET_UniformMatrix2x3fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x3fv_remap_index], fn)
-#define CALL_UniformMatrix2x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix2x4fv_remap_index], parameters)
-#define GET_UniformMatrix2x4fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x4fv_remap_index])
-#define SET_UniformMatrix2x4fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x4fv_remap_index], fn)
-#define CALL_UniformMatrix3x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix3x2fv_remap_index], parameters)
-#define GET_UniformMatrix3x2fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x2fv_remap_index])
-#define SET_UniformMatrix3x2fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x2fv_remap_index], fn)
-#define CALL_UniformMatrix3x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix3x4fv_remap_index], parameters)
-#define GET_UniformMatrix3x4fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x4fv_remap_index])
-#define SET_UniformMatrix3x4fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x4fv_remap_index], fn)
-#define CALL_UniformMatrix4x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix4x2fv_remap_index], parameters)
-#define GET_UniformMatrix4x2fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x2fv_remap_index])
-#define SET_UniformMatrix4x2fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x2fv_remap_index], fn)
-#define CALL_UniformMatrix4x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix4x3fv_remap_index], parameters)
-#define GET_UniformMatrix4x3fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x3fv_remap_index])
-#define SET_UniformMatrix4x3fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x3fv_remap_index], fn)
-#define CALL_LoadTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index], parameters)
-#define GET_LoadTransposeMatrixdARB(disp) GET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index])
-#define SET_LoadTransposeMatrixdARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index], fn)
-#define CALL_LoadTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index], parameters)
-#define GET_LoadTransposeMatrixfARB(disp) GET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index])
-#define SET_LoadTransposeMatrixfARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index], fn)
-#define CALL_MultTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[MultTransposeMatrixdARB_remap_index], parameters)
-#define GET_MultTransposeMatrixdARB(disp) GET_by_offset(disp, driDispatchRemapTable[MultTransposeMatrixdARB_remap_index])
-#define SET_MultTransposeMatrixdARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultTransposeMatrixdARB_remap_index], fn)
-#define CALL_MultTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[MultTransposeMatrixfARB_remap_index], parameters)
-#define GET_MultTransposeMatrixfARB(disp) GET_by_offset(disp, driDispatchRemapTable[MultTransposeMatrixfARB_remap_index])
-#define SET_MultTransposeMatrixfARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultTransposeMatrixfARB_remap_index], fn)
-#define CALL_SampleCoverageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), driDispatchRemapTable[SampleCoverageARB_remap_index], parameters)
-#define GET_SampleCoverageARB(disp) GET_by_offset(disp, driDispatchRemapTable[SampleCoverageARB_remap_index])
-#define SET_SampleCoverageARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SampleCoverageARB_remap_index], fn)
-#define CALL_CompressedTexImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexImage1DARB_remap_index], parameters)
-#define GET_CompressedTexImage1DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexImage1DARB_remap_index])
-#define SET_CompressedTexImage1DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexImage1DARB_remap_index], fn)
-#define CALL_CompressedTexImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexImage2DARB_remap_index], parameters)
-#define GET_CompressedTexImage2DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexImage2DARB_remap_index])
-#define SET_CompressedTexImage2DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexImage2DARB_remap_index], fn)
-#define CALL_CompressedTexImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexImage3DARB_remap_index], parameters)
-#define GET_CompressedTexImage3DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexImage3DARB_remap_index])
-#define SET_CompressedTexImage3DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexImage3DARB_remap_index], fn)
-#define CALL_CompressedTexSubImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index], parameters)
-#define GET_CompressedTexSubImage1DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index])
-#define SET_CompressedTexSubImage1DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index], fn)
-#define CALL_CompressedTexSubImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index], parameters)
-#define GET_CompressedTexSubImage2DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index])
-#define SET_CompressedTexSubImage2DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index], fn)
-#define CALL_CompressedTexSubImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index], parameters)
-#define GET_CompressedTexSubImage3DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index])
-#define SET_CompressedTexSubImage3DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index], fn)
-#define CALL_GetCompressedTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLvoid *)), driDispatchRemapTable[GetCompressedTexImageARB_remap_index], parameters)
-#define GET_GetCompressedTexImageARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetCompressedTexImageARB_remap_index])
-#define SET_GetCompressedTexImageARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetCompressedTexImageARB_remap_index], fn)
-#define CALL_DisableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index], parameters)
-#define GET_DisableVertexAttribArrayARB(disp) GET_by_offset(disp, driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index])
-#define SET_DisableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index], fn)
-#define CALL_EnableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index], parameters)
-#define GET_EnableVertexAttribArrayARB(disp) GET_by_offset(disp, driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index])
-#define SET_EnableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index], fn)
-#define CALL_GetProgramEnvParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index], parameters)
-#define GET_GetProgramEnvParameterdvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index])
-#define SET_GetProgramEnvParameterdvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index], fn)
-#define CALL_GetProgramEnvParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index], parameters)
-#define GET_GetProgramEnvParameterfvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index])
-#define SET_GetProgramEnvParameterfvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index], fn)
-#define CALL_GetProgramLocalParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index], parameters)
-#define GET_GetProgramLocalParameterdvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index])
-#define SET_GetProgramLocalParameterdvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index], fn)
-#define CALL_GetProgramLocalParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index], parameters)
-#define GET_GetProgramLocalParameterfvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index])
-#define SET_GetProgramLocalParameterfvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index], fn)
-#define CALL_GetProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid *)), driDispatchRemapTable[GetProgramStringARB_remap_index], parameters)
-#define GET_GetProgramStringARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramStringARB_remap_index])
-#define SET_GetProgramStringARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramStringARB_remap_index], fn)
-#define CALL_GetProgramivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), driDispatchRemapTable[GetProgramivARB_remap_index], parameters)
-#define GET_GetProgramivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramivARB_remap_index])
-#define SET_GetProgramivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramivARB_remap_index], fn)
-#define CALL_GetVertexAttribdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), driDispatchRemapTable[GetVertexAttribdvARB_remap_index], parameters)
-#define GET_GetVertexAttribdvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribdvARB_remap_index])
-#define SET_GetVertexAttribdvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribdvARB_remap_index], fn)
-#define CALL_GetVertexAttribfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), driDispatchRemapTable[GetVertexAttribfvARB_remap_index], parameters)
-#define GET_GetVertexAttribfvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribfvARB_remap_index])
-#define SET_GetVertexAttribfvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribfvARB_remap_index], fn)
-#define CALL_GetVertexAttribivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetVertexAttribivARB_remap_index], parameters)
-#define GET_GetVertexAttribivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribivARB_remap_index])
-#define SET_GetVertexAttribivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribivARB_remap_index], fn)
-#define CALL_ProgramEnvParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index], parameters)
-#define GET_ProgramEnvParameter4dARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index])
-#define SET_ProgramEnvParameter4dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index], fn)
-#define CALL_ProgramEnvParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index], parameters)
-#define GET_ProgramEnvParameter4dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index])
-#define SET_ProgramEnvParameter4dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index], fn)
-#define CALL_ProgramEnvParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index], parameters)
-#define GET_ProgramEnvParameter4fARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index])
-#define SET_ProgramEnvParameter4fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index], fn)
-#define CALL_ProgramEnvParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index], parameters)
-#define GET_ProgramEnvParameter4fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index])
-#define SET_ProgramEnvParameter4fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index], fn)
-#define CALL_ProgramLocalParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index], parameters)
-#define GET_ProgramLocalParameter4dARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index])
-#define SET_ProgramLocalParameter4dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index], fn)
-#define CALL_ProgramLocalParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index], parameters)
-#define GET_ProgramLocalParameter4dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index])
-#define SET_ProgramLocalParameter4dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index], fn)
-#define CALL_ProgramLocalParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index], parameters)
-#define GET_ProgramLocalParameter4fARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index])
-#define SET_ProgramLocalParameter4fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index], fn)
-#define CALL_ProgramLocalParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index], parameters)
-#define GET_ProgramLocalParameter4fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index])
-#define SET_ProgramLocalParameter4fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index], fn)
-#define CALL_ProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[ProgramStringARB_remap_index], parameters)
-#define GET_ProgramStringARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramStringARB_remap_index])
-#define SET_ProgramStringARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramStringARB_remap_index], fn)
-#define CALL_VertexAttrib1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), driDispatchRemapTable[VertexAttrib1dARB_remap_index], parameters)
-#define GET_VertexAttrib1dARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dARB_remap_index])
-#define SET_VertexAttrib1dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dARB_remap_index], fn)
-#define CALL_VertexAttrib1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib1dvARB_remap_index], parameters)
-#define GET_VertexAttrib1dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dvARB_remap_index])
-#define SET_VertexAttrib1dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dvARB_remap_index], fn)
-#define CALL_VertexAttrib1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), driDispatchRemapTable[VertexAttrib1fARB_remap_index], parameters)
-#define GET_VertexAttrib1fARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fARB_remap_index])
-#define SET_VertexAttrib1fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fARB_remap_index], fn)
-#define CALL_VertexAttrib1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib1fvARB_remap_index], parameters)
-#define GET_VertexAttrib1fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fvARB_remap_index])
-#define SET_VertexAttrib1fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fvARB_remap_index], fn)
-#define CALL_VertexAttrib1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), driDispatchRemapTable[VertexAttrib1sARB_remap_index], parameters)
-#define GET_VertexAttrib1sARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1sARB_remap_index])
-#define SET_VertexAttrib1sARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1sARB_remap_index], fn)
-#define CALL_VertexAttrib1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib1svARB_remap_index], parameters)
-#define GET_VertexAttrib1svARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1svARB_remap_index])
-#define SET_VertexAttrib1svARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1svARB_remap_index], fn)
-#define CALL_VertexAttrib2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib2dARB_remap_index], parameters)
-#define GET_VertexAttrib2dARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dARB_remap_index])
-#define SET_VertexAttrib2dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dARB_remap_index], fn)
-#define CALL_VertexAttrib2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib2dvARB_remap_index], parameters)
-#define GET_VertexAttrib2dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dvARB_remap_index])
-#define SET_VertexAttrib2dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dvARB_remap_index], fn)
-#define CALL_VertexAttrib2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib2fARB_remap_index], parameters)
-#define GET_VertexAttrib2fARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fARB_remap_index])
-#define SET_VertexAttrib2fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fARB_remap_index], fn)
-#define CALL_VertexAttrib2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib2fvARB_remap_index], parameters)
-#define GET_VertexAttrib2fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fvARB_remap_index])
-#define SET_VertexAttrib2fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fvARB_remap_index], fn)
-#define CALL_VertexAttrib2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib2sARB_remap_index], parameters)
-#define GET_VertexAttrib2sARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2sARB_remap_index])
-#define SET_VertexAttrib2sARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2sARB_remap_index], fn)
-#define CALL_VertexAttrib2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib2svARB_remap_index], parameters)
-#define GET_VertexAttrib2svARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2svARB_remap_index])
-#define SET_VertexAttrib2svARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2svARB_remap_index], fn)
-#define CALL_VertexAttrib3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib3dARB_remap_index], parameters)
-#define GET_VertexAttrib3dARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dARB_remap_index])
-#define SET_VertexAttrib3dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dARB_remap_index], fn)
-#define CALL_VertexAttrib3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib3dvARB_remap_index], parameters)
-#define GET_VertexAttrib3dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dvARB_remap_index])
-#define SET_VertexAttrib3dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dvARB_remap_index], fn)
-#define CALL_VertexAttrib3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib3fARB_remap_index], parameters)
-#define GET_VertexAttrib3fARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fARB_remap_index])
-#define SET_VertexAttrib3fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fARB_remap_index], fn)
-#define CALL_VertexAttrib3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib3fvARB_remap_index], parameters)
-#define GET_VertexAttrib3fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fvARB_remap_index])
-#define SET_VertexAttrib3fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fvARB_remap_index], fn)
-#define CALL_VertexAttrib3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib3sARB_remap_index], parameters)
-#define GET_VertexAttrib3sARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3sARB_remap_index])
-#define SET_VertexAttrib3sARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3sARB_remap_index], fn)
-#define CALL_VertexAttrib3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib3svARB_remap_index], parameters)
-#define GET_VertexAttrib3svARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3svARB_remap_index])
-#define SET_VertexAttrib3svARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3svARB_remap_index], fn)
-#define CALL_VertexAttrib4NbvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), driDispatchRemapTable[VertexAttrib4NbvARB_remap_index], parameters)
-#define GET_VertexAttrib4NbvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NbvARB_remap_index])
-#define SET_VertexAttrib4NbvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NbvARB_remap_index], fn)
-#define CALL_VertexAttrib4NivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), driDispatchRemapTable[VertexAttrib4NivARB_remap_index], parameters)
-#define GET_VertexAttrib4NivARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NivARB_remap_index])
-#define SET_VertexAttrib4NivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NivARB_remap_index], fn)
-#define CALL_VertexAttrib4NsvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib4NsvARB_remap_index], parameters)
-#define GET_VertexAttrib4NsvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NsvARB_remap_index])
-#define SET_VertexAttrib4NsvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NsvARB_remap_index], fn)
-#define CALL_VertexAttrib4NubARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), driDispatchRemapTable[VertexAttrib4NubARB_remap_index], parameters)
-#define GET_VertexAttrib4NubARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NubARB_remap_index])
-#define SET_VertexAttrib4NubARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NubARB_remap_index], fn)
-#define CALL_VertexAttrib4NubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), driDispatchRemapTable[VertexAttrib4NubvARB_remap_index], parameters)
-#define GET_VertexAttrib4NubvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NubvARB_remap_index])
-#define SET_VertexAttrib4NubvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NubvARB_remap_index], fn)
-#define CALL_VertexAttrib4NuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), driDispatchRemapTable[VertexAttrib4NuivARB_remap_index], parameters)
-#define GET_VertexAttrib4NuivARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NuivARB_remap_index])
-#define SET_VertexAttrib4NuivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NuivARB_remap_index], fn)
-#define CALL_VertexAttrib4NusvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), driDispatchRemapTable[VertexAttrib4NusvARB_remap_index], parameters)
-#define GET_VertexAttrib4NusvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NusvARB_remap_index])
-#define SET_VertexAttrib4NusvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NusvARB_remap_index], fn)
-#define CALL_VertexAttrib4bvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), driDispatchRemapTable[VertexAttrib4bvARB_remap_index], parameters)
-#define GET_VertexAttrib4bvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4bvARB_remap_index])
-#define SET_VertexAttrib4bvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4bvARB_remap_index], fn)
-#define CALL_VertexAttrib4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib4dARB_remap_index], parameters)
-#define GET_VertexAttrib4dARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dARB_remap_index])
-#define SET_VertexAttrib4dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dARB_remap_index], fn)
-#define CALL_VertexAttrib4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib4dvARB_remap_index], parameters)
-#define GET_VertexAttrib4dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dvARB_remap_index])
-#define SET_VertexAttrib4dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dvARB_remap_index], fn)
-#define CALL_VertexAttrib4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib4fARB_remap_index], parameters)
-#define GET_VertexAttrib4fARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fARB_remap_index])
-#define SET_VertexAttrib4fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fARB_remap_index], fn)
-#define CALL_VertexAttrib4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib4fvARB_remap_index], parameters)
-#define GET_VertexAttrib4fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fvARB_remap_index])
-#define SET_VertexAttrib4fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fvARB_remap_index], fn)
-#define CALL_VertexAttrib4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), driDispatchRemapTable[VertexAttrib4ivARB_remap_index], parameters)
-#define GET_VertexAttrib4ivARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ivARB_remap_index])
-#define SET_VertexAttrib4ivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ivARB_remap_index], fn)
-#define CALL_VertexAttrib4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib4sARB_remap_index], parameters)
-#define GET_VertexAttrib4sARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4sARB_remap_index])
-#define SET_VertexAttrib4sARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4sARB_remap_index], fn)
-#define CALL_VertexAttrib4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib4svARB_remap_index], parameters)
-#define GET_VertexAttrib4svARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4svARB_remap_index])
-#define SET_VertexAttrib4svARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4svARB_remap_index], fn)
-#define CALL_VertexAttrib4ubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), driDispatchRemapTable[VertexAttrib4ubvARB_remap_index], parameters)
-#define GET_VertexAttrib4ubvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubvARB_remap_index])
-#define SET_VertexAttrib4ubvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubvARB_remap_index], fn)
-#define CALL_VertexAttrib4uivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), driDispatchRemapTable[VertexAttrib4uivARB_remap_index], parameters)
-#define GET_VertexAttrib4uivARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4uivARB_remap_index])
-#define SET_VertexAttrib4uivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4uivARB_remap_index], fn)
-#define CALL_VertexAttrib4usvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), driDispatchRemapTable[VertexAttrib4usvARB_remap_index], parameters)
-#define GET_VertexAttrib4usvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4usvARB_remap_index])
-#define SET_VertexAttrib4usvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4usvARB_remap_index], fn)
-#define CALL_VertexAttribPointerARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)), driDispatchRemapTable[VertexAttribPointerARB_remap_index], parameters)
-#define GET_VertexAttribPointerARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribPointerARB_remap_index])
-#define SET_VertexAttribPointerARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribPointerARB_remap_index], fn)
-#define CALL_BindBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[BindBufferARB_remap_index], parameters)
-#define GET_BindBufferARB(disp) GET_by_offset(disp, driDispatchRemapTable[BindBufferARB_remap_index])
-#define SET_BindBufferARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindBufferARB_remap_index], fn)
-#define CALL_BufferDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)), driDispatchRemapTable[BufferDataARB_remap_index], parameters)
-#define GET_BufferDataARB(disp) GET_by_offset(disp, driDispatchRemapTable[BufferDataARB_remap_index])
-#define SET_BufferDataARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BufferDataARB_remap_index], fn)
-#define CALL_BufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)), driDispatchRemapTable[BufferSubDataARB_remap_index], parameters)
-#define GET_BufferSubDataARB(disp) GET_by_offset(disp, driDispatchRemapTable[BufferSubDataARB_remap_index])
-#define SET_BufferSubDataARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BufferSubDataARB_remap_index], fn)
-#define CALL_DeleteBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteBuffersARB_remap_index], parameters)
-#define GET_DeleteBuffersARB(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteBuffersARB_remap_index])
-#define SET_DeleteBuffersARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteBuffersARB_remap_index], fn)
-#define CALL_GenBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenBuffersARB_remap_index], parameters)
-#define GET_GenBuffersARB(disp) GET_by_offset(disp, driDispatchRemapTable[GenBuffersARB_remap_index])
-#define SET_GenBuffersARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenBuffersARB_remap_index], fn)
-#define CALL_GetBufferParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), driDispatchRemapTable[GetBufferParameterivARB_remap_index], parameters)
-#define GET_GetBufferParameterivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetBufferParameterivARB_remap_index])
-#define SET_GetBufferParameterivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetBufferParameterivARB_remap_index], fn)
-#define CALL_GetBufferPointervARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), driDispatchRemapTable[GetBufferPointervARB_remap_index], parameters)
-#define GET_GetBufferPointervARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetBufferPointervARB_remap_index])
-#define SET_GetBufferPointervARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetBufferPointervARB_remap_index], fn)
-#define CALL_GetBufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)), driDispatchRemapTable[GetBufferSubDataARB_remap_index], parameters)
-#define GET_GetBufferSubDataARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetBufferSubDataARB_remap_index])
-#define SET_GetBufferSubDataARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetBufferSubDataARB_remap_index], fn)
-#define CALL_IsBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsBufferARB_remap_index], parameters)
-#define GET_IsBufferARB(disp) GET_by_offset(disp, driDispatchRemapTable[IsBufferARB_remap_index])
-#define SET_IsBufferARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsBufferARB_remap_index], fn)
-#define CALL_MapBufferARB(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLenum)), driDispatchRemapTable[MapBufferARB_remap_index], parameters)
-#define GET_MapBufferARB(disp) GET_by_offset(disp, driDispatchRemapTable[MapBufferARB_remap_index])
-#define SET_MapBufferARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MapBufferARB_remap_index], fn)
-#define CALL_UnmapBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[UnmapBufferARB_remap_index], parameters)
-#define GET_UnmapBufferARB(disp) GET_by_offset(disp, driDispatchRemapTable[UnmapBufferARB_remap_index])
-#define SET_UnmapBufferARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UnmapBufferARB_remap_index], fn)
-#define CALL_BeginQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[BeginQueryARB_remap_index], parameters)
-#define GET_BeginQueryARB(disp) GET_by_offset(disp, driDispatchRemapTable[BeginQueryARB_remap_index])
-#define SET_BeginQueryARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BeginQueryARB_remap_index], fn)
-#define CALL_DeleteQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteQueriesARB_remap_index], parameters)
-#define GET_DeleteQueriesARB(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteQueriesARB_remap_index])
-#define SET_DeleteQueriesARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteQueriesARB_remap_index], fn)
-#define CALL_EndQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[EndQueryARB_remap_index], parameters)
-#define GET_EndQueryARB(disp) GET_by_offset(disp, driDispatchRemapTable[EndQueryARB_remap_index])
-#define SET_EndQueryARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EndQueryARB_remap_index], fn)
-#define CALL_GenQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenQueriesARB_remap_index], parameters)
-#define GET_GenQueriesARB(disp) GET_by_offset(disp, driDispatchRemapTable[GenQueriesARB_remap_index])
-#define SET_GenQueriesARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenQueriesARB_remap_index], fn)
-#define CALL_GetQueryObjectivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetQueryObjectivARB_remap_index], parameters)
-#define GET_GetQueryObjectivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjectivARB_remap_index])
-#define SET_GetQueryObjectivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjectivARB_remap_index], fn)
-#define CALL_GetQueryObjectuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), driDispatchRemapTable[GetQueryObjectuivARB_remap_index], parameters)
-#define GET_GetQueryObjectuivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjectuivARB_remap_index])
-#define SET_GetQueryObjectuivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjectuivARB_remap_index], fn)
-#define CALL_GetQueryivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), driDispatchRemapTable[GetQueryivARB_remap_index], parameters)
-#define GET_GetQueryivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryivARB_remap_index])
-#define SET_GetQueryivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryivARB_remap_index], fn)
-#define CALL_IsQueryARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsQueryARB_remap_index], parameters)
-#define GET_IsQueryARB(disp) GET_by_offset(disp, driDispatchRemapTable[IsQueryARB_remap_index])
-#define SET_IsQueryARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsQueryARB_remap_index], fn)
-#define CALL_AttachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), driDispatchRemapTable[AttachObjectARB_remap_index], parameters)
-#define GET_AttachObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[AttachObjectARB_remap_index])
-#define SET_AttachObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AttachObjectARB_remap_index], fn)
-#define CALL_CompileShaderARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), driDispatchRemapTable[CompileShaderARB_remap_index], parameters)
-#define GET_CompileShaderARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompileShaderARB_remap_index])
-#define SET_CompileShaderARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompileShaderARB_remap_index], fn)
-#define CALL_CreateProgramObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(void)), driDispatchRemapTable[CreateProgramObjectARB_remap_index], parameters)
-#define GET_CreateProgramObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[CreateProgramObjectARB_remap_index])
-#define SET_CreateProgramObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CreateProgramObjectARB_remap_index], fn)
-#define CALL_CreateShaderObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[CreateShaderObjectARB_remap_index], parameters)
-#define GET_CreateShaderObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[CreateShaderObjectARB_remap_index])
-#define SET_CreateShaderObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CreateShaderObjectARB_remap_index], fn)
-#define CALL_DeleteObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), driDispatchRemapTable[DeleteObjectARB_remap_index], parameters)
-#define GET_DeleteObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteObjectARB_remap_index])
-#define SET_DeleteObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteObjectARB_remap_index], fn)
-#define CALL_DetachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), driDispatchRemapTable[DetachObjectARB_remap_index], parameters)
-#define GET_DetachObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[DetachObjectARB_remap_index])
-#define SET_DetachObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DetachObjectARB_remap_index], fn)
-#define CALL_GetActiveUniformARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), driDispatchRemapTable[GetActiveUniformARB_remap_index], parameters)
-#define GET_GetActiveUniformARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetActiveUniformARB_remap_index])
-#define SET_GetActiveUniformARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetActiveUniformARB_remap_index], fn)
-#define CALL_GetAttachedObjectsARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)), driDispatchRemapTable[GetAttachedObjectsARB_remap_index], parameters)
-#define GET_GetAttachedObjectsARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetAttachedObjectsARB_remap_index])
-#define SET_GetAttachedObjectsARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetAttachedObjectsARB_remap_index], fn)
-#define CALL_GetHandleARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[GetHandleARB_remap_index], parameters)
-#define GET_GetHandleARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetHandleARB_remap_index])
-#define SET_GetHandleARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetHandleARB_remap_index], fn)
-#define CALL_GetInfoLogARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), driDispatchRemapTable[GetInfoLogARB_remap_index], parameters)
-#define GET_GetInfoLogARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetInfoLogARB_remap_index])
-#define SET_GetInfoLogARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetInfoLogARB_remap_index], fn)
-#define CALL_GetObjectParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLfloat *)), driDispatchRemapTable[GetObjectParameterfvARB_remap_index], parameters)
-#define GET_GetObjectParameterfvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetObjectParameterfvARB_remap_index])
-#define SET_GetObjectParameterfvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetObjectParameterfvARB_remap_index], fn)
-#define CALL_GetObjectParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLint *)), driDispatchRemapTable[GetObjectParameterivARB_remap_index], parameters)
-#define GET_GetObjectParameterivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetObjectParameterivARB_remap_index])
-#define SET_GetObjectParameterivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetObjectParameterivARB_remap_index], fn)
-#define CALL_GetShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), driDispatchRemapTable[GetShaderSourceARB_remap_index], parameters)
-#define GET_GetShaderSourceARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetShaderSourceARB_remap_index])
-#define SET_GetShaderSourceARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetShaderSourceARB_remap_index], fn)
-#define CALL_GetUniformLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), driDispatchRemapTable[GetUniformLocationARB_remap_index], parameters)
-#define GET_GetUniformLocationARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetUniformLocationARB_remap_index])
-#define SET_GetUniformLocationARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetUniformLocationARB_remap_index], fn)
-#define CALL_GetUniformfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLfloat *)), driDispatchRemapTable[GetUniformfvARB_remap_index], parameters)
-#define GET_GetUniformfvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetUniformfvARB_remap_index])
-#define SET_GetUniformfvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetUniformfvARB_remap_index], fn)
-#define CALL_GetUniformivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLint *)), driDispatchRemapTable[GetUniformivARB_remap_index], parameters)
-#define GET_GetUniformivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetUniformivARB_remap_index])
-#define SET_GetUniformivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetUniformivARB_remap_index], fn)
-#define CALL_LinkProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), driDispatchRemapTable[LinkProgramARB_remap_index], parameters)
-#define GET_LinkProgramARB(disp) GET_by_offset(disp, driDispatchRemapTable[LinkProgramARB_remap_index])
-#define SET_LinkProgramARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LinkProgramARB_remap_index], fn)
-#define CALL_ShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)), driDispatchRemapTable[ShaderSourceARB_remap_index], parameters)
-#define GET_ShaderSourceARB(disp) GET_by_offset(disp, driDispatchRemapTable[ShaderSourceARB_remap_index])
-#define SET_ShaderSourceARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ShaderSourceARB_remap_index], fn)
-#define CALL_Uniform1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat)), driDispatchRemapTable[Uniform1fARB_remap_index], parameters)
-#define GET_Uniform1fARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform1fARB_remap_index])
-#define SET_Uniform1fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform1fARB_remap_index], fn)
-#define CALL_Uniform1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), driDispatchRemapTable[Uniform1fvARB_remap_index], parameters)
-#define GET_Uniform1fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform1fvARB_remap_index])
-#define SET_Uniform1fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform1fvARB_remap_index], fn)
-#define CALL_Uniform1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), driDispatchRemapTable[Uniform1iARB_remap_index], parameters)
-#define GET_Uniform1iARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform1iARB_remap_index])
-#define SET_Uniform1iARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform1iARB_remap_index], fn)
-#define CALL_Uniform1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), driDispatchRemapTable[Uniform1ivARB_remap_index], parameters)
-#define GET_Uniform1ivARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform1ivARB_remap_index])
-#define SET_Uniform1ivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform1ivARB_remap_index], fn)
-#define CALL_Uniform2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), driDispatchRemapTable[Uniform2fARB_remap_index], parameters)
-#define GET_Uniform2fARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform2fARB_remap_index])
-#define SET_Uniform2fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform2fARB_remap_index], fn)
-#define CALL_Uniform2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), driDispatchRemapTable[Uniform2fvARB_remap_index], parameters)
-#define GET_Uniform2fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform2fvARB_remap_index])
-#define SET_Uniform2fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform2fvARB_remap_index], fn)
-#define CALL_Uniform2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), driDispatchRemapTable[Uniform2iARB_remap_index], parameters)
-#define GET_Uniform2iARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform2iARB_remap_index])
-#define SET_Uniform2iARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform2iARB_remap_index], fn)
-#define CALL_Uniform2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), driDispatchRemapTable[Uniform2ivARB_remap_index], parameters)
-#define GET_Uniform2ivARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform2ivARB_remap_index])
-#define SET_Uniform2ivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform2ivARB_remap_index], fn)
-#define CALL_Uniform3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[Uniform3fARB_remap_index], parameters)
-#define GET_Uniform3fARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform3fARB_remap_index])
-#define SET_Uniform3fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform3fARB_remap_index], fn)
-#define CALL_Uniform3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), driDispatchRemapTable[Uniform3fvARB_remap_index], parameters)
-#define GET_Uniform3fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform3fvARB_remap_index])
-#define SET_Uniform3fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform3fvARB_remap_index], fn)
-#define CALL_Uniform3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), driDispatchRemapTable[Uniform3iARB_remap_index], parameters)
-#define GET_Uniform3iARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform3iARB_remap_index])
-#define SET_Uniform3iARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform3iARB_remap_index], fn)
-#define CALL_Uniform3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), driDispatchRemapTable[Uniform3ivARB_remap_index], parameters)
-#define GET_Uniform3ivARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform3ivARB_remap_index])
-#define SET_Uniform3ivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform3ivARB_remap_index], fn)
-#define CALL_Uniform4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[Uniform4fARB_remap_index], parameters)
-#define GET_Uniform4fARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform4fARB_remap_index])
-#define SET_Uniform4fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform4fARB_remap_index], fn)
-#define CALL_Uniform4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), driDispatchRemapTable[Uniform4fvARB_remap_index], parameters)
-#define GET_Uniform4fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform4fvARB_remap_index])
-#define SET_Uniform4fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform4fvARB_remap_index], fn)
-#define CALL_Uniform4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint)), driDispatchRemapTable[Uniform4iARB_remap_index], parameters)
-#define GET_Uniform4iARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform4iARB_remap_index])
-#define SET_Uniform4iARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform4iARB_remap_index], fn)
-#define CALL_Uniform4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), driDispatchRemapTable[Uniform4ivARB_remap_index], parameters)
-#define GET_Uniform4ivARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform4ivARB_remap_index])
-#define SET_Uniform4ivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform4ivARB_remap_index], fn)
-#define CALL_UniformMatrix2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix2fvARB_remap_index], parameters)
-#define GET_UniformMatrix2fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix2fvARB_remap_index])
-#define SET_UniformMatrix2fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix2fvARB_remap_index], fn)
-#define CALL_UniformMatrix3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix3fvARB_remap_index], parameters)
-#define GET_UniformMatrix3fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix3fvARB_remap_index])
-#define SET_UniformMatrix3fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix3fvARB_remap_index], fn)
-#define CALL_UniformMatrix4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix4fvARB_remap_index], parameters)
-#define GET_UniformMatrix4fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix4fvARB_remap_index])
-#define SET_UniformMatrix4fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix4fvARB_remap_index], fn)
-#define CALL_UseProgramObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), driDispatchRemapTable[UseProgramObjectARB_remap_index], parameters)
-#define GET_UseProgramObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[UseProgramObjectARB_remap_index])
-#define SET_UseProgramObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UseProgramObjectARB_remap_index], fn)
-#define CALL_ValidateProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), driDispatchRemapTable[ValidateProgramARB_remap_index], parameters)
-#define GET_ValidateProgramARB(disp) GET_by_offset(disp, driDispatchRemapTable[ValidateProgramARB_remap_index])
-#define SET_ValidateProgramARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ValidateProgramARB_remap_index], fn)
-#define CALL_BindAttribLocationARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, const GLcharARB *)), driDispatchRemapTable[BindAttribLocationARB_remap_index], parameters)
-#define GET_BindAttribLocationARB(disp) GET_by_offset(disp, driDispatchRemapTable[BindAttribLocationARB_remap_index])
-#define SET_BindAttribLocationARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindAttribLocationARB_remap_index], fn)
-#define CALL_GetActiveAttribARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), driDispatchRemapTable[GetActiveAttribARB_remap_index], parameters)
-#define GET_GetActiveAttribARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetActiveAttribARB_remap_index])
-#define SET_GetActiveAttribARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetActiveAttribARB_remap_index], fn)
-#define CALL_GetAttribLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), driDispatchRemapTable[GetAttribLocationARB_remap_index], parameters)
-#define GET_GetAttribLocationARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetAttribLocationARB_remap_index])
-#define SET_GetAttribLocationARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetAttribLocationARB_remap_index], fn)
-#define CALL_DrawBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLenum *)), driDispatchRemapTable[DrawBuffersARB_remap_index], parameters)
-#define GET_DrawBuffersARB(disp) GET_by_offset(disp, driDispatchRemapTable[DrawBuffersARB_remap_index])
-#define SET_DrawBuffersARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DrawBuffersARB_remap_index], fn)
-#define CALL_PolygonOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), driDispatchRemapTable[PolygonOffsetEXT_remap_index], parameters)
-#define GET_PolygonOffsetEXT(disp) GET_by_offset(disp, driDispatchRemapTable[PolygonOffsetEXT_remap_index])
-#define SET_PolygonOffsetEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PolygonOffsetEXT_remap_index], fn)
-#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index], parameters)
-#define GET_GetPixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index])
-#define SET_GetPixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index], fn)
-#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index], parameters)
-#define GET_GetPixelTexGenParameterivSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index])
-#define SET_GetPixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index], fn)
-#define CALL_PixelTexGenParameterfSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index], parameters)
-#define GET_PixelTexGenParameterfSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index])
-#define SET_PixelTexGenParameterfSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index], fn)
-#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index], parameters)
-#define GET_PixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index])
-#define SET_PixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index], fn)
-#define CALL_PixelTexGenParameteriSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index], parameters)
-#define GET_PixelTexGenParameteriSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index])
-#define SET_PixelTexGenParameteriSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index], fn)
-#define CALL_PixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index], parameters)
-#define GET_PixelTexGenParameterivSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index])
-#define SET_PixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index], fn)
-#define CALL_SampleMaskSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), driDispatchRemapTable[SampleMaskSGIS_remap_index], parameters)
-#define GET_SampleMaskSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[SampleMaskSGIS_remap_index])
-#define SET_SampleMaskSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SampleMaskSGIS_remap_index], fn)
-#define CALL_SamplePatternSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[SamplePatternSGIS_remap_index], parameters)
-#define GET_SamplePatternSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[SamplePatternSGIS_remap_index])
-#define SET_SamplePatternSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SamplePatternSGIS_remap_index], fn)
-#define CALL_ColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), driDispatchRemapTable[ColorPointerEXT_remap_index], parameters)
-#define GET_ColorPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ColorPointerEXT_remap_index])
-#define SET_ColorPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ColorPointerEXT_remap_index], fn)
-#define CALL_EdgeFlagPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, const GLboolean *)), driDispatchRemapTable[EdgeFlagPointerEXT_remap_index], parameters)
-#define GET_EdgeFlagPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[EdgeFlagPointerEXT_remap_index])
-#define SET_EdgeFlagPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EdgeFlagPointerEXT_remap_index], fn)
-#define CALL_IndexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), driDispatchRemapTable[IndexPointerEXT_remap_index], parameters)
-#define GET_IndexPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[IndexPointerEXT_remap_index])
-#define SET_IndexPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IndexPointerEXT_remap_index], fn)
-#define CALL_NormalPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), driDispatchRemapTable[NormalPointerEXT_remap_index], parameters)
-#define GET_NormalPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[NormalPointerEXT_remap_index])
-#define SET_NormalPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[NormalPointerEXT_remap_index], fn)
-#define CALL_TexCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), driDispatchRemapTable[TexCoordPointerEXT_remap_index], parameters)
-#define GET_TexCoordPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[TexCoordPointerEXT_remap_index])
-#define SET_TexCoordPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TexCoordPointerEXT_remap_index], fn)
-#define CALL_VertexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), driDispatchRemapTable[VertexPointerEXT_remap_index], parameters)
-#define GET_VertexPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[VertexPointerEXT_remap_index])
-#define SET_VertexPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexPointerEXT_remap_index], fn)
-#define CALL_PointParameterfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), driDispatchRemapTable[PointParameterfEXT_remap_index], parameters)
-#define GET_PointParameterfEXT(disp) GET_by_offset(disp, driDispatchRemapTable[PointParameterfEXT_remap_index])
-#define SET_PointParameterfEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PointParameterfEXT_remap_index], fn)
-#define CALL_PointParameterfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), driDispatchRemapTable[PointParameterfvEXT_remap_index], parameters)
-#define GET_PointParameterfvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[PointParameterfvEXT_remap_index])
-#define SET_PointParameterfvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PointParameterfvEXT_remap_index], fn)
-#define CALL_LockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei)), driDispatchRemapTable[LockArraysEXT_remap_index], parameters)
-#define GET_LockArraysEXT(disp) GET_by_offset(disp, driDispatchRemapTable[LockArraysEXT_remap_index])
-#define SET_LockArraysEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LockArraysEXT_remap_index], fn)
-#define CALL_UnlockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[UnlockArraysEXT_remap_index], parameters)
-#define GET_UnlockArraysEXT(disp) GET_by_offset(disp, driDispatchRemapTable[UnlockArraysEXT_remap_index])
-#define SET_UnlockArraysEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UnlockArraysEXT_remap_index], fn)
-#define CALL_CullParameterdvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), driDispatchRemapTable[CullParameterdvEXT_remap_index], parameters)
-#define GET_CullParameterdvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[CullParameterdvEXT_remap_index])
-#define SET_CullParameterdvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CullParameterdvEXT_remap_index], fn)
-#define CALL_CullParameterfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), driDispatchRemapTable[CullParameterfvEXT_remap_index], parameters)
-#define GET_CullParameterfvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[CullParameterfvEXT_remap_index])
-#define SET_CullParameterfvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CullParameterfvEXT_remap_index], fn)
-#define CALL_SecondaryColor3bEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), driDispatchRemapTable[SecondaryColor3bEXT_remap_index], parameters)
-#define GET_SecondaryColor3bEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3bEXT_remap_index])
-#define SET_SecondaryColor3bEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3bEXT_remap_index], fn)
-#define CALL_SecondaryColor3bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), driDispatchRemapTable[SecondaryColor3bvEXT_remap_index], parameters)
-#define GET_SecondaryColor3bvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3bvEXT_remap_index])
-#define SET_SecondaryColor3bvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3bvEXT_remap_index], fn)
-#define CALL_SecondaryColor3dEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[SecondaryColor3dEXT_remap_index], parameters)
-#define GET_SecondaryColor3dEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3dEXT_remap_index])
-#define SET_SecondaryColor3dEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3dEXT_remap_index], fn)
-#define CALL_SecondaryColor3dvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[SecondaryColor3dvEXT_remap_index], parameters)
-#define GET_SecondaryColor3dvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3dvEXT_remap_index])
-#define SET_SecondaryColor3dvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3dvEXT_remap_index], fn)
-#define CALL_SecondaryColor3fEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[SecondaryColor3fEXT_remap_index], parameters)
-#define GET_SecondaryColor3fEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3fEXT_remap_index])
-#define SET_SecondaryColor3fEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3fEXT_remap_index], fn)
-#define CALL_SecondaryColor3fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[SecondaryColor3fvEXT_remap_index], parameters)
-#define GET_SecondaryColor3fvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3fvEXT_remap_index])
-#define SET_SecondaryColor3fvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3fvEXT_remap_index], fn)
-#define CALL_SecondaryColor3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), driDispatchRemapTable[SecondaryColor3iEXT_remap_index], parameters)
-#define GET_SecondaryColor3iEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3iEXT_remap_index])
-#define SET_SecondaryColor3iEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3iEXT_remap_index], fn)
-#define CALL_SecondaryColor3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), driDispatchRemapTable[SecondaryColor3ivEXT_remap_index], parameters)
-#define GET_SecondaryColor3ivEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ivEXT_remap_index])
-#define SET_SecondaryColor3ivEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ivEXT_remap_index], fn)
-#define CALL_SecondaryColor3sEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), driDispatchRemapTable[SecondaryColor3sEXT_remap_index], parameters)
-#define GET_SecondaryColor3sEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3sEXT_remap_index])
-#define SET_SecondaryColor3sEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3sEXT_remap_index], fn)
-#define CALL_SecondaryColor3svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), driDispatchRemapTable[SecondaryColor3svEXT_remap_index], parameters)
-#define GET_SecondaryColor3svEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3svEXT_remap_index])
-#define SET_SecondaryColor3svEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3svEXT_remap_index], fn)
-#define CALL_SecondaryColor3ubEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), driDispatchRemapTable[SecondaryColor3ubEXT_remap_index], parameters)
-#define GET_SecondaryColor3ubEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ubEXT_remap_index])
-#define SET_SecondaryColor3ubEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ubEXT_remap_index], fn)
-#define CALL_SecondaryColor3ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index], parameters)
-#define GET_SecondaryColor3ubvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index])
-#define SET_SecondaryColor3ubvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index], fn)
-#define CALL_SecondaryColor3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), driDispatchRemapTable[SecondaryColor3uiEXT_remap_index], parameters)
-#define GET_SecondaryColor3uiEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3uiEXT_remap_index])
-#define SET_SecondaryColor3uiEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3uiEXT_remap_index], fn)
-#define CALL_SecondaryColor3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), driDispatchRemapTable[SecondaryColor3uivEXT_remap_index], parameters)
-#define GET_SecondaryColor3uivEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3uivEXT_remap_index])
-#define SET_SecondaryColor3uivEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3uivEXT_remap_index], fn)
-#define CALL_SecondaryColor3usEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), driDispatchRemapTable[SecondaryColor3usEXT_remap_index], parameters)
-#define GET_SecondaryColor3usEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3usEXT_remap_index])
-#define SET_SecondaryColor3usEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3usEXT_remap_index], fn)
-#define CALL_SecondaryColor3usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), driDispatchRemapTable[SecondaryColor3usvEXT_remap_index], parameters)
-#define GET_SecondaryColor3usvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3usvEXT_remap_index])
-#define SET_SecondaryColor3usvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3usvEXT_remap_index], fn)
-#define CALL_SecondaryColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[SecondaryColorPointerEXT_remap_index], parameters)
-#define GET_SecondaryColorPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColorPointerEXT_remap_index])
-#define SET_SecondaryColorPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColorPointerEXT_remap_index], fn)
-#define CALL_MultiDrawArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *, GLsizei *, GLsizei)), driDispatchRemapTable[MultiDrawArraysEXT_remap_index], parameters)
-#define GET_MultiDrawArraysEXT(disp) GET_by_offset(disp, driDispatchRemapTable[MultiDrawArraysEXT_remap_index])
-#define SET_MultiDrawArraysEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultiDrawArraysEXT_remap_index], fn)
-#define CALL_MultiDrawElementsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)), driDispatchRemapTable[MultiDrawElementsEXT_remap_index], parameters)
-#define GET_MultiDrawElementsEXT(disp) GET_by_offset(disp, driDispatchRemapTable[MultiDrawElementsEXT_remap_index])
-#define SET_MultiDrawElementsEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultiDrawElementsEXT_remap_index], fn)
-#define CALL_FogCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[FogCoordPointerEXT_remap_index], parameters)
-#define GET_FogCoordPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FogCoordPointerEXT_remap_index])
-#define SET_FogCoordPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FogCoordPointerEXT_remap_index], fn)
-#define CALL_FogCoorddEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), driDispatchRemapTable[FogCoorddEXT_remap_index], parameters)
-#define GET_FogCoorddEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FogCoorddEXT_remap_index])
-#define SET_FogCoorddEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FogCoorddEXT_remap_index], fn)
-#define CALL_FogCoorddvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[FogCoorddvEXT_remap_index], parameters)
-#define GET_FogCoorddvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FogCoorddvEXT_remap_index])
-#define SET_FogCoorddvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FogCoorddvEXT_remap_index], fn)
-#define CALL_FogCoordfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), driDispatchRemapTable[FogCoordfEXT_remap_index], parameters)
-#define GET_FogCoordfEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FogCoordfEXT_remap_index])
-#define SET_FogCoordfEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FogCoordfEXT_remap_index], fn)
-#define CALL_FogCoordfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[FogCoordfvEXT_remap_index], parameters)
-#define GET_FogCoordfvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FogCoordfvEXT_remap_index])
-#define SET_FogCoordfvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FogCoordfvEXT_remap_index], fn)
-#define CALL_PixelTexGenSGIX(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[PixelTexGenSGIX_remap_index], parameters)
-#define GET_PixelTexGenSGIX(disp) GET_by_offset(disp, driDispatchRemapTable[PixelTexGenSGIX_remap_index])
-#define SET_PixelTexGenSGIX(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PixelTexGenSGIX_remap_index], fn)
-#define CALL_BlendFuncSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), driDispatchRemapTable[BlendFuncSeparateEXT_remap_index], parameters)
-#define GET_BlendFuncSeparateEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BlendFuncSeparateEXT_remap_index])
-#define SET_BlendFuncSeparateEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BlendFuncSeparateEXT_remap_index], fn)
-#define CALL_FlushVertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index], parameters)
-#define GET_FlushVertexArrayRangeNV(disp) GET_by_offset(disp, driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index])
-#define SET_FlushVertexArrayRangeNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index], fn)
-#define CALL_VertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), driDispatchRemapTable[VertexArrayRangeNV_remap_index], parameters)
-#define GET_VertexArrayRangeNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexArrayRangeNV_remap_index])
-#define SET_VertexArrayRangeNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexArrayRangeNV_remap_index], fn)
-#define CALL_CombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)), driDispatchRemapTable[CombinerInputNV_remap_index], parameters)
-#define GET_CombinerInputNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerInputNV_remap_index])
-#define SET_CombinerInputNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerInputNV_remap_index], fn)
-#define CALL_CombinerOutputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)), driDispatchRemapTable[CombinerOutputNV_remap_index], parameters)
-#define GET_CombinerOutputNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerOutputNV_remap_index])
-#define SET_CombinerOutputNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerOutputNV_remap_index], fn)
-#define CALL_CombinerParameterfNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), driDispatchRemapTable[CombinerParameterfNV_remap_index], parameters)
-#define GET_CombinerParameterfNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerParameterfNV_remap_index])
-#define SET_CombinerParameterfNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerParameterfNV_remap_index], fn)
-#define CALL_CombinerParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), driDispatchRemapTable[CombinerParameterfvNV_remap_index], parameters)
-#define GET_CombinerParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerParameterfvNV_remap_index])
-#define SET_CombinerParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerParameterfvNV_remap_index], fn)
-#define CALL_CombinerParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), driDispatchRemapTable[CombinerParameteriNV_remap_index], parameters)
-#define GET_CombinerParameteriNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerParameteriNV_remap_index])
-#define SET_CombinerParameteriNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerParameteriNV_remap_index], fn)
-#define CALL_CombinerParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), driDispatchRemapTable[CombinerParameterivNV_remap_index], parameters)
-#define GET_CombinerParameterivNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerParameterivNV_remap_index])
-#define SET_CombinerParameterivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerParameterivNV_remap_index], fn)
-#define CALL_FinalCombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), driDispatchRemapTable[FinalCombinerInputNV_remap_index], parameters)
-#define GET_FinalCombinerInputNV(disp) GET_by_offset(disp, driDispatchRemapTable[FinalCombinerInputNV_remap_index])
-#define SET_FinalCombinerInputNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FinalCombinerInputNV_remap_index], fn)
-#define CALL_GetCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLfloat *)), driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index], parameters)
-#define GET_GetCombinerInputParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index])
-#define SET_GetCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index], fn)
-#define CALL_GetCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLint *)), driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index], parameters)
-#define GET_GetCombinerInputParameterivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index])
-#define SET_GetCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index], fn)
-#define CALL_GetCombinerOutputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLfloat *)), driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index], parameters)
-#define GET_GetCombinerOutputParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index])
-#define SET_GetCombinerOutputParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index], fn)
-#define CALL_GetCombinerOutputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index], parameters)
-#define GET_GetCombinerOutputParameterivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index])
-#define SET_GetCombinerOutputParameterivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index], fn)
-#define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index], parameters)
-#define GET_GetFinalCombinerInputParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index])
-#define SET_GetFinalCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index], fn)
-#define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index], parameters)
-#define GET_GetFinalCombinerInputParameterivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index])
-#define SET_GetFinalCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index], fn)
-#define CALL_ResizeBuffersMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[ResizeBuffersMESA_remap_index], parameters)
-#define GET_ResizeBuffersMESA(disp) GET_by_offset(disp, driDispatchRemapTable[ResizeBuffersMESA_remap_index])
-#define SET_ResizeBuffersMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ResizeBuffersMESA_remap_index], fn)
-#define CALL_WindowPos2dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), driDispatchRemapTable[WindowPos2dMESA_remap_index], parameters)
-#define GET_WindowPos2dMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2dMESA_remap_index])
-#define SET_WindowPos2dMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2dMESA_remap_index], fn)
-#define CALL_WindowPos2dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[WindowPos2dvMESA_remap_index], parameters)
-#define GET_WindowPos2dvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2dvMESA_remap_index])
-#define SET_WindowPos2dvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2dvMESA_remap_index], fn)
-#define CALL_WindowPos2fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), driDispatchRemapTable[WindowPos2fMESA_remap_index], parameters)
-#define GET_WindowPos2fMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2fMESA_remap_index])
-#define SET_WindowPos2fMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2fMESA_remap_index], fn)
-#define CALL_WindowPos2fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[WindowPos2fvMESA_remap_index], parameters)
-#define GET_WindowPos2fvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2fvMESA_remap_index])
-#define SET_WindowPos2fvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2fvMESA_remap_index], fn)
-#define CALL_WindowPos2iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), driDispatchRemapTable[WindowPos2iMESA_remap_index], parameters)
-#define GET_WindowPos2iMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2iMESA_remap_index])
-#define SET_WindowPos2iMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2iMESA_remap_index], fn)
-#define CALL_WindowPos2ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), driDispatchRemapTable[WindowPos2ivMESA_remap_index], parameters)
-#define GET_WindowPos2ivMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2ivMESA_remap_index])
-#define SET_WindowPos2ivMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2ivMESA_remap_index], fn)
-#define CALL_WindowPos2sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), driDispatchRemapTable[WindowPos2sMESA_remap_index], parameters)
-#define GET_WindowPos2sMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2sMESA_remap_index])
-#define SET_WindowPos2sMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2sMESA_remap_index], fn)
-#define CALL_WindowPos2svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), driDispatchRemapTable[WindowPos2svMESA_remap_index], parameters)
-#define GET_WindowPos2svMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2svMESA_remap_index])
-#define SET_WindowPos2svMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2svMESA_remap_index], fn)
-#define CALL_WindowPos3dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[WindowPos3dMESA_remap_index], parameters)
-#define GET_WindowPos3dMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3dMESA_remap_index])
-#define SET_WindowPos3dMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3dMESA_remap_index], fn)
-#define CALL_WindowPos3dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[WindowPos3dvMESA_remap_index], parameters)
-#define GET_WindowPos3dvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3dvMESA_remap_index])
-#define SET_WindowPos3dvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3dvMESA_remap_index], fn)
-#define CALL_WindowPos3fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[WindowPos3fMESA_remap_index], parameters)
-#define GET_WindowPos3fMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3fMESA_remap_index])
-#define SET_WindowPos3fMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3fMESA_remap_index], fn)
-#define CALL_WindowPos3fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[WindowPos3fvMESA_remap_index], parameters)
-#define GET_WindowPos3fvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3fvMESA_remap_index])
-#define SET_WindowPos3fvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3fvMESA_remap_index], fn)
-#define CALL_WindowPos3iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), driDispatchRemapTable[WindowPos3iMESA_remap_index], parameters)
-#define GET_WindowPos3iMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3iMESA_remap_index])
-#define SET_WindowPos3iMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3iMESA_remap_index], fn)
-#define CALL_WindowPos3ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), driDispatchRemapTable[WindowPos3ivMESA_remap_index], parameters)
-#define GET_WindowPos3ivMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3ivMESA_remap_index])
-#define SET_WindowPos3ivMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3ivMESA_remap_index], fn)
-#define CALL_WindowPos3sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), driDispatchRemapTable[WindowPos3sMESA_remap_index], parameters)
-#define GET_WindowPos3sMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3sMESA_remap_index])
-#define SET_WindowPos3sMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3sMESA_remap_index], fn)
-#define CALL_WindowPos3svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), driDispatchRemapTable[WindowPos3svMESA_remap_index], parameters)
-#define GET_WindowPos3svMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3svMESA_remap_index])
-#define SET_WindowPos3svMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3svMESA_remap_index], fn)
-#define CALL_WindowPos4dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[WindowPos4dMESA_remap_index], parameters)
-#define GET_WindowPos4dMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4dMESA_remap_index])
-#define SET_WindowPos4dMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4dMESA_remap_index], fn)
-#define CALL_WindowPos4dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[WindowPos4dvMESA_remap_index], parameters)
-#define GET_WindowPos4dvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4dvMESA_remap_index])
-#define SET_WindowPos4dvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4dvMESA_remap_index], fn)
-#define CALL_WindowPos4fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[WindowPos4fMESA_remap_index], parameters)
-#define GET_WindowPos4fMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4fMESA_remap_index])
-#define SET_WindowPos4fMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4fMESA_remap_index], fn)
-#define CALL_WindowPos4fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[WindowPos4fvMESA_remap_index], parameters)
-#define GET_WindowPos4fvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4fvMESA_remap_index])
-#define SET_WindowPos4fvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4fvMESA_remap_index], fn)
-#define CALL_WindowPos4iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), driDispatchRemapTable[WindowPos4iMESA_remap_index], parameters)
-#define GET_WindowPos4iMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4iMESA_remap_index])
-#define SET_WindowPos4iMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4iMESA_remap_index], fn)
-#define CALL_WindowPos4ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), driDispatchRemapTable[WindowPos4ivMESA_remap_index], parameters)
-#define GET_WindowPos4ivMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4ivMESA_remap_index])
-#define SET_WindowPos4ivMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4ivMESA_remap_index], fn)
-#define CALL_WindowPos4sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), driDispatchRemapTable[WindowPos4sMESA_remap_index], parameters)
-#define GET_WindowPos4sMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4sMESA_remap_index])
-#define SET_WindowPos4sMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4sMESA_remap_index], fn)
-#define CALL_WindowPos4svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), driDispatchRemapTable[WindowPos4svMESA_remap_index], parameters)
-#define GET_WindowPos4svMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4svMESA_remap_index])
-#define SET_WindowPos4svMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4svMESA_remap_index], fn)
-#define CALL_MultiModeDrawArraysIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint)), driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index], parameters)
-#define GET_MultiModeDrawArraysIBM(disp) GET_by_offset(disp, driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index])
-#define SET_MultiModeDrawArraysIBM(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index], fn)
-#define CALL_MultiModeDrawElementsIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint)), driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index], parameters)
-#define GET_MultiModeDrawElementsIBM(disp) GET_by_offset(disp, driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index])
-#define SET_MultiModeDrawElementsIBM(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index], fn)
-#define CALL_DeleteFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteFencesNV_remap_index], parameters)
-#define GET_DeleteFencesNV(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteFencesNV_remap_index])
-#define SET_DeleteFencesNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteFencesNV_remap_index], fn)
-#define CALL_FinishFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[FinishFenceNV_remap_index], parameters)
-#define GET_FinishFenceNV(disp) GET_by_offset(disp, driDispatchRemapTable[FinishFenceNV_remap_index])
-#define SET_FinishFenceNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FinishFenceNV_remap_index], fn)
-#define CALL_GenFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenFencesNV_remap_index], parameters)
-#define GET_GenFencesNV(disp) GET_by_offset(disp, driDispatchRemapTable[GenFencesNV_remap_index])
-#define SET_GenFencesNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenFencesNV_remap_index], fn)
-#define CALL_GetFenceivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetFenceivNV_remap_index], parameters)
-#define GET_GetFenceivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetFenceivNV_remap_index])
-#define SET_GetFenceivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetFenceivNV_remap_index], fn)
-#define CALL_IsFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsFenceNV_remap_index], parameters)
-#define GET_IsFenceNV(disp) GET_by_offset(disp, driDispatchRemapTable[IsFenceNV_remap_index])
-#define SET_IsFenceNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsFenceNV_remap_index], fn)
-#define CALL_SetFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), driDispatchRemapTable[SetFenceNV_remap_index], parameters)
-#define GET_SetFenceNV(disp) GET_by_offset(disp, driDispatchRemapTable[SetFenceNV_remap_index])
-#define SET_SetFenceNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SetFenceNV_remap_index], fn)
-#define CALL_TestFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[TestFenceNV_remap_index], parameters)
-#define GET_TestFenceNV(disp) GET_by_offset(disp, driDispatchRemapTable[TestFenceNV_remap_index])
-#define SET_TestFenceNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TestFenceNV_remap_index], fn)
-#define CALL_AreProgramsResidentNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), driDispatchRemapTable[AreProgramsResidentNV_remap_index], parameters)
-#define GET_AreProgramsResidentNV(disp) GET_by_offset(disp, driDispatchRemapTable[AreProgramsResidentNV_remap_index])
-#define SET_AreProgramsResidentNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AreProgramsResidentNV_remap_index], fn)
-#define CALL_BindProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[BindProgramNV_remap_index], parameters)
-#define GET_BindProgramNV(disp) GET_by_offset(disp, driDispatchRemapTable[BindProgramNV_remap_index])
-#define SET_BindProgramNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindProgramNV_remap_index], fn)
-#define CALL_DeleteProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteProgramsNV_remap_index], parameters)
-#define GET_DeleteProgramsNV(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteProgramsNV_remap_index])
-#define SET_DeleteProgramsNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteProgramsNV_remap_index], fn)
-#define CALL_ExecuteProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), driDispatchRemapTable[ExecuteProgramNV_remap_index], parameters)
-#define GET_ExecuteProgramNV(disp) GET_by_offset(disp, driDispatchRemapTable[ExecuteProgramNV_remap_index])
-#define SET_ExecuteProgramNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ExecuteProgramNV_remap_index], fn)
-#define CALL_GenProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenProgramsNV_remap_index], parameters)
-#define GET_GenProgramsNV(disp) GET_by_offset(disp, driDispatchRemapTable[GenProgramsNV_remap_index])
-#define SET_GenProgramsNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenProgramsNV_remap_index], fn)
-#define CALL_GetProgramParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLdouble *)), driDispatchRemapTable[GetProgramParameterdvNV_remap_index], parameters)
-#define GET_GetProgramParameterdvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramParameterdvNV_remap_index])
-#define SET_GetProgramParameterdvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramParameterdvNV_remap_index], fn)
-#define CALL_GetProgramParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLfloat *)), driDispatchRemapTable[GetProgramParameterfvNV_remap_index], parameters)
-#define GET_GetProgramParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramParameterfvNV_remap_index])
-#define SET_GetProgramParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramParameterfvNV_remap_index], fn)
-#define CALL_GetProgramStringNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), driDispatchRemapTable[GetProgramStringNV_remap_index], parameters)
-#define GET_GetProgramStringNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramStringNV_remap_index])
-#define SET_GetProgramStringNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramStringNV_remap_index], fn)
-#define CALL_GetProgramivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetProgramivNV_remap_index], parameters)
-#define GET_GetProgramivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramivNV_remap_index])
-#define SET_GetProgramivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramivNV_remap_index], fn)
-#define CALL_GetTrackMatrixivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), driDispatchRemapTable[GetTrackMatrixivNV_remap_index], parameters)
-#define GET_GetTrackMatrixivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetTrackMatrixivNV_remap_index])
-#define SET_GetTrackMatrixivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetTrackMatrixivNV_remap_index], fn)
-#define CALL_GetVertexAttribPointervNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLvoid **)), driDispatchRemapTable[GetVertexAttribPointervNV_remap_index], parameters)
-#define GET_GetVertexAttribPointervNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribPointervNV_remap_index])
-#define SET_GetVertexAttribPointervNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribPointervNV_remap_index], fn)
-#define CALL_GetVertexAttribdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), driDispatchRemapTable[GetVertexAttribdvNV_remap_index], parameters)
-#define GET_GetVertexAttribdvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribdvNV_remap_index])
-#define SET_GetVertexAttribdvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribdvNV_remap_index], fn)
-#define CALL_GetVertexAttribfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), driDispatchRemapTable[GetVertexAttribfvNV_remap_index], parameters)
-#define GET_GetVertexAttribfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribfvNV_remap_index])
-#define SET_GetVertexAttribfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribfvNV_remap_index], fn)
-#define CALL_GetVertexAttribivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetVertexAttribivNV_remap_index], parameters)
-#define GET_GetVertexAttribivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribivNV_remap_index])
-#define SET_GetVertexAttribivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribivNV_remap_index], fn)
-#define CALL_IsProgramNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsProgramNV_remap_index], parameters)
-#define GET_IsProgramNV(disp) GET_by_offset(disp, driDispatchRemapTable[IsProgramNV_remap_index])
-#define SET_IsProgramNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsProgramNV_remap_index], fn)
-#define CALL_LoadProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLubyte *)), driDispatchRemapTable[LoadProgramNV_remap_index], parameters)
-#define GET_LoadProgramNV(disp) GET_by_offset(disp, driDispatchRemapTable[LoadProgramNV_remap_index])
-#define SET_LoadProgramNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LoadProgramNV_remap_index], fn)
-#define CALL_ProgramParameters4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, const GLdouble *)), driDispatchRemapTable[ProgramParameters4dvNV_remap_index], parameters)
-#define GET_ProgramParameters4dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramParameters4dvNV_remap_index])
-#define SET_ProgramParameters4dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramParameters4dvNV_remap_index], fn)
-#define CALL_ProgramParameters4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, const GLfloat *)), driDispatchRemapTable[ProgramParameters4fvNV_remap_index], parameters)
-#define GET_ProgramParameters4fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramParameters4fvNV_remap_index])
-#define SET_ProgramParameters4fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramParameters4fvNV_remap_index], fn)
-#define CALL_RequestResidentProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[RequestResidentProgramsNV_remap_index], parameters)
-#define GET_RequestResidentProgramsNV(disp) GET_by_offset(disp, driDispatchRemapTable[RequestResidentProgramsNV_remap_index])
-#define SET_RequestResidentProgramsNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[RequestResidentProgramsNV_remap_index], fn)
-#define CALL_TrackMatrixNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLenum)), driDispatchRemapTable[TrackMatrixNV_remap_index], parameters)
-#define GET_TrackMatrixNV(disp) GET_by_offset(disp, driDispatchRemapTable[TrackMatrixNV_remap_index])
-#define SET_TrackMatrixNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TrackMatrixNV_remap_index], fn)
-#define CALL_VertexAttrib1dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), driDispatchRemapTable[VertexAttrib1dNV_remap_index], parameters)
-#define GET_VertexAttrib1dNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dNV_remap_index])
-#define SET_VertexAttrib1dNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dNV_remap_index], fn)
-#define CALL_VertexAttrib1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib1dvNV_remap_index], parameters)
-#define GET_VertexAttrib1dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dvNV_remap_index])
-#define SET_VertexAttrib1dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dvNV_remap_index], fn)
-#define CALL_VertexAttrib1fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), driDispatchRemapTable[VertexAttrib1fNV_remap_index], parameters)
-#define GET_VertexAttrib1fNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fNV_remap_index])
-#define SET_VertexAttrib1fNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fNV_remap_index], fn)
-#define CALL_VertexAttrib1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib1fvNV_remap_index], parameters)
-#define GET_VertexAttrib1fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fvNV_remap_index])
-#define SET_VertexAttrib1fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fvNV_remap_index], fn)
-#define CALL_VertexAttrib1sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), driDispatchRemapTable[VertexAttrib1sNV_remap_index], parameters)
-#define GET_VertexAttrib1sNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1sNV_remap_index])
-#define SET_VertexAttrib1sNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1sNV_remap_index], fn)
-#define CALL_VertexAttrib1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib1svNV_remap_index], parameters)
-#define GET_VertexAttrib1svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1svNV_remap_index])
-#define SET_VertexAttrib1svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1svNV_remap_index], fn)
-#define CALL_VertexAttrib2dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib2dNV_remap_index], parameters)
-#define GET_VertexAttrib2dNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dNV_remap_index])
-#define SET_VertexAttrib2dNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dNV_remap_index], fn)
-#define CALL_VertexAttrib2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib2dvNV_remap_index], parameters)
-#define GET_VertexAttrib2dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dvNV_remap_index])
-#define SET_VertexAttrib2dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dvNV_remap_index], fn)
-#define CALL_VertexAttrib2fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib2fNV_remap_index], parameters)
-#define GET_VertexAttrib2fNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fNV_remap_index])
-#define SET_VertexAttrib2fNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fNV_remap_index], fn)
-#define CALL_VertexAttrib2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib2fvNV_remap_index], parameters)
-#define GET_VertexAttrib2fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fvNV_remap_index])
-#define SET_VertexAttrib2fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fvNV_remap_index], fn)
-#define CALL_VertexAttrib2sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib2sNV_remap_index], parameters)
-#define GET_VertexAttrib2sNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2sNV_remap_index])
-#define SET_VertexAttrib2sNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2sNV_remap_index], fn)
-#define CALL_VertexAttrib2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib2svNV_remap_index], parameters)
-#define GET_VertexAttrib2svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2svNV_remap_index])
-#define SET_VertexAttrib2svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2svNV_remap_index], fn)
-#define CALL_VertexAttrib3dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib3dNV_remap_index], parameters)
-#define GET_VertexAttrib3dNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dNV_remap_index])
-#define SET_VertexAttrib3dNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dNV_remap_index], fn)
-#define CALL_VertexAttrib3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib3dvNV_remap_index], parameters)
-#define GET_VertexAttrib3dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dvNV_remap_index])
-#define SET_VertexAttrib3dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dvNV_remap_index], fn)
-#define CALL_VertexAttrib3fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib3fNV_remap_index], parameters)
-#define GET_VertexAttrib3fNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fNV_remap_index])
-#define SET_VertexAttrib3fNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fNV_remap_index], fn)
-#define CALL_VertexAttrib3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib3fvNV_remap_index], parameters)
-#define GET_VertexAttrib3fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fvNV_remap_index])
-#define SET_VertexAttrib3fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fvNV_remap_index], fn)
-#define CALL_VertexAttrib3sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib3sNV_remap_index], parameters)
-#define GET_VertexAttrib3sNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3sNV_remap_index])
-#define SET_VertexAttrib3sNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3sNV_remap_index], fn)
-#define CALL_VertexAttrib3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib3svNV_remap_index], parameters)
-#define GET_VertexAttrib3svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3svNV_remap_index])
-#define SET_VertexAttrib3svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3svNV_remap_index], fn)
-#define CALL_VertexAttrib4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib4dNV_remap_index], parameters)
-#define GET_VertexAttrib4dNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dNV_remap_index])
-#define SET_VertexAttrib4dNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dNV_remap_index], fn)
-#define CALL_VertexAttrib4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib4dvNV_remap_index], parameters)
-#define GET_VertexAttrib4dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dvNV_remap_index])
-#define SET_VertexAttrib4dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dvNV_remap_index], fn)
-#define CALL_VertexAttrib4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib4fNV_remap_index], parameters)
-#define GET_VertexAttrib4fNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fNV_remap_index])
-#define SET_VertexAttrib4fNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fNV_remap_index], fn)
-#define CALL_VertexAttrib4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib4fvNV_remap_index], parameters)
-#define GET_VertexAttrib4fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fvNV_remap_index])
-#define SET_VertexAttrib4fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fvNV_remap_index], fn)
-#define CALL_VertexAttrib4sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib4sNV_remap_index], parameters)
-#define GET_VertexAttrib4sNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4sNV_remap_index])
-#define SET_VertexAttrib4sNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4sNV_remap_index], fn)
-#define CALL_VertexAttrib4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib4svNV_remap_index], parameters)
-#define GET_VertexAttrib4svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4svNV_remap_index])
-#define SET_VertexAttrib4svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4svNV_remap_index], fn)
-#define CALL_VertexAttrib4ubNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), driDispatchRemapTable[VertexAttrib4ubNV_remap_index], parameters)
-#define GET_VertexAttrib4ubNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubNV_remap_index])
-#define SET_VertexAttrib4ubNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubNV_remap_index], fn)
-#define CALL_VertexAttrib4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), driDispatchRemapTable[VertexAttrib4ubvNV_remap_index], parameters)
-#define GET_VertexAttrib4ubvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubvNV_remap_index])
-#define SET_VertexAttrib4ubvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubvNV_remap_index], fn)
-#define CALL_VertexAttribPointerNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[VertexAttribPointerNV_remap_index], parameters)
-#define GET_VertexAttribPointerNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribPointerNV_remap_index])
-#define SET_VertexAttribPointerNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribPointerNV_remap_index], fn)
-#define CALL_VertexAttribs1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), driDispatchRemapTable[VertexAttribs1dvNV_remap_index], parameters)
-#define GET_VertexAttribs1dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs1dvNV_remap_index])
-#define SET_VertexAttribs1dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs1dvNV_remap_index], fn)
-#define CALL_VertexAttribs1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[VertexAttribs1fvNV_remap_index], parameters)
-#define GET_VertexAttribs1fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs1fvNV_remap_index])
-#define SET_VertexAttribs1fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs1fvNV_remap_index], fn)
-#define CALL_VertexAttribs1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), driDispatchRemapTable[VertexAttribs1svNV_remap_index], parameters)
-#define GET_VertexAttribs1svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs1svNV_remap_index])
-#define SET_VertexAttribs1svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs1svNV_remap_index], fn)
-#define CALL_VertexAttribs2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), driDispatchRemapTable[VertexAttribs2dvNV_remap_index], parameters)
-#define GET_VertexAttribs2dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs2dvNV_remap_index])
-#define SET_VertexAttribs2dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs2dvNV_remap_index], fn)
-#define CALL_VertexAttribs2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[VertexAttribs2fvNV_remap_index], parameters)
-#define GET_VertexAttribs2fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs2fvNV_remap_index])
-#define SET_VertexAttribs2fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs2fvNV_remap_index], fn)
-#define CALL_VertexAttribs2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), driDispatchRemapTable[VertexAttribs2svNV_remap_index], parameters)
-#define GET_VertexAttribs2svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs2svNV_remap_index])
-#define SET_VertexAttribs2svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs2svNV_remap_index], fn)
-#define CALL_VertexAttribs3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), driDispatchRemapTable[VertexAttribs3dvNV_remap_index], parameters)
-#define GET_VertexAttribs3dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs3dvNV_remap_index])
-#define SET_VertexAttribs3dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs3dvNV_remap_index], fn)
-#define CALL_VertexAttribs3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[VertexAttribs3fvNV_remap_index], parameters)
-#define GET_VertexAttribs3fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs3fvNV_remap_index])
-#define SET_VertexAttribs3fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs3fvNV_remap_index], fn)
-#define CALL_VertexAttribs3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), driDispatchRemapTable[VertexAttribs3svNV_remap_index], parameters)
-#define GET_VertexAttribs3svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs3svNV_remap_index])
-#define SET_VertexAttribs3svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs3svNV_remap_index], fn)
-#define CALL_VertexAttribs4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), driDispatchRemapTable[VertexAttribs4dvNV_remap_index], parameters)
-#define GET_VertexAttribs4dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs4dvNV_remap_index])
-#define SET_VertexAttribs4dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs4dvNV_remap_index], fn)
-#define CALL_VertexAttribs4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[VertexAttribs4fvNV_remap_index], parameters)
-#define GET_VertexAttribs4fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs4fvNV_remap_index])
-#define SET_VertexAttribs4fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs4fvNV_remap_index], fn)
-#define CALL_VertexAttribs4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), driDispatchRemapTable[VertexAttribs4svNV_remap_index], parameters)
-#define GET_VertexAttribs4svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs4svNV_remap_index])
-#define SET_VertexAttribs4svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs4svNV_remap_index], fn)
-#define CALL_VertexAttribs4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *)), driDispatchRemapTable[VertexAttribs4ubvNV_remap_index], parameters)
-#define GET_VertexAttribs4ubvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs4ubvNV_remap_index])
-#define SET_VertexAttribs4ubvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs4ubvNV_remap_index], fn)
-#define CALL_AlphaFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index], parameters)
-#define GET_AlphaFragmentOp1ATI(disp) GET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index])
-#define SET_AlphaFragmentOp1ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index], fn)
-#define CALL_AlphaFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index], parameters)
-#define GET_AlphaFragmentOp2ATI(disp) GET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index])
-#define SET_AlphaFragmentOp2ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index], fn)
-#define CALL_AlphaFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index], parameters)
-#define GET_AlphaFragmentOp3ATI(disp) GET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index])
-#define SET_AlphaFragmentOp3ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index], fn)
-#define CALL_BeginFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[BeginFragmentShaderATI_remap_index], parameters)
-#define GET_BeginFragmentShaderATI(disp) GET_by_offset(disp, driDispatchRemapTable[BeginFragmentShaderATI_remap_index])
-#define SET_BeginFragmentShaderATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BeginFragmentShaderATI_remap_index], fn)
-#define CALL_BindFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[BindFragmentShaderATI_remap_index], parameters)
-#define GET_BindFragmentShaderATI(disp) GET_by_offset(disp, driDispatchRemapTable[BindFragmentShaderATI_remap_index])
-#define SET_BindFragmentShaderATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindFragmentShaderATI_remap_index], fn)
-#define CALL_ColorFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[ColorFragmentOp1ATI_remap_index], parameters)
-#define GET_ColorFragmentOp1ATI(disp) GET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp1ATI_remap_index])
-#define SET_ColorFragmentOp1ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp1ATI_remap_index], fn)
-#define CALL_ColorFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[ColorFragmentOp2ATI_remap_index], parameters)
-#define GET_ColorFragmentOp2ATI(disp) GET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp2ATI_remap_index])
-#define SET_ColorFragmentOp2ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp2ATI_remap_index], fn)
-#define CALL_ColorFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[ColorFragmentOp3ATI_remap_index], parameters)
-#define GET_ColorFragmentOp3ATI(disp) GET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp3ATI_remap_index])
-#define SET_ColorFragmentOp3ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp3ATI_remap_index], fn)
-#define CALL_DeleteFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[DeleteFragmentShaderATI_remap_index], parameters)
-#define GET_DeleteFragmentShaderATI(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteFragmentShaderATI_remap_index])
-#define SET_DeleteFragmentShaderATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteFragmentShaderATI_remap_index], fn)
-#define CALL_EndFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[EndFragmentShaderATI_remap_index], parameters)
-#define GET_EndFragmentShaderATI(disp) GET_by_offset(disp, driDispatchRemapTable[EndFragmentShaderATI_remap_index])
-#define SET_EndFragmentShaderATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EndFragmentShaderATI_remap_index], fn)
-#define CALL_GenFragmentShadersATI(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[GenFragmentShadersATI_remap_index], parameters)
-#define GET_GenFragmentShadersATI(disp) GET_by_offset(disp, driDispatchRemapTable[GenFragmentShadersATI_remap_index])
-#define SET_GenFragmentShadersATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenFragmentShadersATI_remap_index], fn)
-#define CALL_PassTexCoordATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), driDispatchRemapTable[PassTexCoordATI_remap_index], parameters)
-#define GET_PassTexCoordATI(disp) GET_by_offset(disp, driDispatchRemapTable[PassTexCoordATI_remap_index])
-#define SET_PassTexCoordATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PassTexCoordATI_remap_index], fn)
-#define CALL_SampleMapATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), driDispatchRemapTable[SampleMapATI_remap_index], parameters)
-#define GET_SampleMapATI(disp) GET_by_offset(disp, driDispatchRemapTable[SampleMapATI_remap_index])
-#define SET_SampleMapATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SampleMapATI_remap_index], fn)
-#define CALL_SetFragmentShaderConstantATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index], parameters)
-#define GET_SetFragmentShaderConstantATI(disp) GET_by_offset(disp, driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index])
-#define SET_SetFragmentShaderConstantATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index], fn)
-#define CALL_PointParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), driDispatchRemapTable[PointParameteriNV_remap_index], parameters)
-#define GET_PointParameteriNV(disp) GET_by_offset(disp, driDispatchRemapTable[PointParameteriNV_remap_index])
-#define SET_PointParameteriNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PointParameteriNV_remap_index], fn)
-#define CALL_PointParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), driDispatchRemapTable[PointParameterivNV_remap_index], parameters)
-#define GET_PointParameterivNV(disp) GET_by_offset(disp, driDispatchRemapTable[PointParameterivNV_remap_index])
-#define SET_PointParameterivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PointParameterivNV_remap_index], fn)
-#define CALL_ActiveStencilFaceEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[ActiveStencilFaceEXT_remap_index], parameters)
-#define GET_ActiveStencilFaceEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ActiveStencilFaceEXT_remap_index])
-#define SET_ActiveStencilFaceEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ActiveStencilFaceEXT_remap_index], fn)
-#define CALL_BindVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[BindVertexArrayAPPLE_remap_index], parameters)
-#define GET_BindVertexArrayAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[BindVertexArrayAPPLE_remap_index])
-#define SET_BindVertexArrayAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindVertexArrayAPPLE_remap_index], fn)
-#define CALL_DeleteVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index], parameters)
-#define GET_DeleteVertexArraysAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index])
-#define SET_DeleteVertexArraysAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index], fn)
-#define CALL_GenVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenVertexArraysAPPLE_remap_index], parameters)
-#define GET_GenVertexArraysAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[GenVertexArraysAPPLE_remap_index])
-#define SET_GenVertexArraysAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenVertexArraysAPPLE_remap_index], fn)
-#define CALL_IsVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsVertexArrayAPPLE_remap_index], parameters)
-#define GET_IsVertexArrayAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[IsVertexArrayAPPLE_remap_index])
-#define SET_IsVertexArrayAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsVertexArrayAPPLE_remap_index], fn)
-#define CALL_GetProgramNamedParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble *)), driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index], parameters)
-#define GET_GetProgramNamedParameterdvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index])
-#define SET_GetProgramNamedParameterdvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index], fn)
-#define CALL_GetProgramNamedParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat *)), driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index], parameters)
-#define GET_GetProgramNamedParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index])
-#define SET_GetProgramNamedParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index], fn)
-#define CALL_ProgramNamedParameter4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index], parameters)
-#define GET_ProgramNamedParameter4dNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index])
-#define SET_ProgramNamedParameter4dNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index], fn)
-#define CALL_ProgramNamedParameter4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLdouble *)), driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index], parameters)
-#define GET_ProgramNamedParameter4dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index])
-#define SET_ProgramNamedParameter4dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index], fn)
-#define CALL_ProgramNamedParameter4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index], parameters)
-#define GET_ProgramNamedParameter4fNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index])
-#define SET_ProgramNamedParameter4fNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index], fn)
-#define CALL_ProgramNamedParameter4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLfloat *)), driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index], parameters)
-#define GET_ProgramNamedParameter4fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index])
-#define SET_ProgramNamedParameter4fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index], fn)
-#define CALL_DepthBoundsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), driDispatchRemapTable[DepthBoundsEXT_remap_index], parameters)
-#define GET_DepthBoundsEXT(disp) GET_by_offset(disp, driDispatchRemapTable[DepthBoundsEXT_remap_index])
-#define SET_DepthBoundsEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DepthBoundsEXT_remap_index], fn)
-#define CALL_BlendEquationSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), driDispatchRemapTable[BlendEquationSeparateEXT_remap_index], parameters)
-#define GET_BlendEquationSeparateEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BlendEquationSeparateEXT_remap_index])
-#define SET_BlendEquationSeparateEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BlendEquationSeparateEXT_remap_index], fn)
-#define CALL_BindFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[BindFramebufferEXT_remap_index], parameters)
-#define GET_BindFramebufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BindFramebufferEXT_remap_index])
-#define SET_BindFramebufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindFramebufferEXT_remap_index], fn)
-#define CALL_BindRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[BindRenderbufferEXT_remap_index], parameters)
-#define GET_BindRenderbufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BindRenderbufferEXT_remap_index])
-#define SET_BindRenderbufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindRenderbufferEXT_remap_index], fn)
-#define CALL_CheckFramebufferStatusEXT(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index], parameters)
-#define GET_CheckFramebufferStatusEXT(disp) GET_by_offset(disp, driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index])
-#define SET_CheckFramebufferStatusEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index], fn)
-#define CALL_DeleteFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteFramebuffersEXT_remap_index], parameters)
-#define GET_DeleteFramebuffersEXT(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteFramebuffersEXT_remap_index])
-#define SET_DeleteFramebuffersEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteFramebuffersEXT_remap_index], fn)
-#define CALL_DeleteRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index], parameters)
-#define GET_DeleteRenderbuffersEXT(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index])
-#define SET_DeleteRenderbuffersEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index], fn)
-#define CALL_FramebufferRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint)), driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index], parameters)
-#define GET_FramebufferRenderbufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index])
-#define SET_FramebufferRenderbufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index], fn)
-#define CALL_FramebufferTexture1DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), driDispatchRemapTable[FramebufferTexture1DEXT_remap_index], parameters)
-#define GET_FramebufferTexture1DEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferTexture1DEXT_remap_index])
-#define SET_FramebufferTexture1DEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferTexture1DEXT_remap_index], fn)
-#define CALL_FramebufferTexture2DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), driDispatchRemapTable[FramebufferTexture2DEXT_remap_index], parameters)
-#define GET_FramebufferTexture2DEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferTexture2DEXT_remap_index])
-#define SET_FramebufferTexture2DEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferTexture2DEXT_remap_index], fn)
-#define CALL_FramebufferTexture3DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)), driDispatchRemapTable[FramebufferTexture3DEXT_remap_index], parameters)
-#define GET_FramebufferTexture3DEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferTexture3DEXT_remap_index])
-#define SET_FramebufferTexture3DEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferTexture3DEXT_remap_index], fn)
-#define CALL_GenFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenFramebuffersEXT_remap_index], parameters)
-#define GET_GenFramebuffersEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GenFramebuffersEXT_remap_index])
-#define SET_GenFramebuffersEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenFramebuffersEXT_remap_index], fn)
-#define CALL_GenRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenRenderbuffersEXT_remap_index], parameters)
-#define GET_GenRenderbuffersEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GenRenderbuffersEXT_remap_index])
-#define SET_GenRenderbuffersEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenRenderbuffersEXT_remap_index], fn)
-#define CALL_GenerateMipmapEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[GenerateMipmapEXT_remap_index], parameters)
-#define GET_GenerateMipmapEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GenerateMipmapEXT_remap_index])
-#define SET_GenerateMipmapEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenerateMipmapEXT_remap_index], fn)
-#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index], parameters)
-#define GET_GetFramebufferAttachmentParameterivEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index])
-#define SET_GetFramebufferAttachmentParameterivEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index], fn)
-#define CALL_GetRenderbufferParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index], parameters)
-#define GET_GetRenderbufferParameterivEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index])
-#define SET_GetRenderbufferParameterivEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index], fn)
-#define CALL_IsFramebufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsFramebufferEXT_remap_index], parameters)
-#define GET_IsFramebufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[IsFramebufferEXT_remap_index])
-#define SET_IsFramebufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsFramebufferEXT_remap_index], fn)
-#define CALL_IsRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsRenderbufferEXT_remap_index], parameters)
-#define GET_IsRenderbufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[IsRenderbufferEXT_remap_index])
-#define SET_IsRenderbufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsRenderbufferEXT_remap_index], fn)
-#define CALL_RenderbufferStorageEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei)), driDispatchRemapTable[RenderbufferStorageEXT_remap_index], parameters)
-#define GET_RenderbufferStorageEXT(disp) GET_by_offset(disp, driDispatchRemapTable[RenderbufferStorageEXT_remap_index])
-#define SET_RenderbufferStorageEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[RenderbufferStorageEXT_remap_index], fn)
-#define CALL_BlitFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)), driDispatchRemapTable[BlitFramebufferEXT_remap_index], parameters)
-#define GET_BlitFramebufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BlitFramebufferEXT_remap_index])
-#define SET_BlitFramebufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BlitFramebufferEXT_remap_index], fn)
-#define CALL_FramebufferTextureLayerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLint)), driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index], parameters)
-#define GET_FramebufferTextureLayerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index])
-#define SET_FramebufferTextureLayerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index], fn)
-#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), driDispatchRemapTable[StencilFuncSeparateATI_remap_index], parameters)
-#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index])
-#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index], fn)
-#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index], parameters)
-#define GET_ProgramEnvParameters4fvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index])
-#define SET_ProgramEnvParameters4fvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index], fn)
-#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index], parameters)
-#define GET_ProgramLocalParameters4fvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index])
-#define SET_ProgramLocalParameters4fvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index], fn)
-#define CALL_GetQueryObjecti64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint64EXT *)), driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index], parameters)
-#define GET_GetQueryObjecti64vEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index])
-#define SET_GetQueryObjecti64vEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index], fn)
-#define CALL_GetQueryObjectui64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint64EXT *)), driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index], parameters)
-#define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index])
-#define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index], fn)
+#endif /* _GLAPI_USE_REMAP_TABLE */
-#endif /* !defined(IN_DRI_DRIVER) */
+#define CALL_NewList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_NewList, parameters)
+#define GET_NewList(disp) GET_by_offset(disp, _gloffset_NewList)
+#define SET_NewList(disp, fn) SET_by_offset(disp, _gloffset_NewList, fn)
+#define CALL_EndList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndList, parameters)
+#define GET_EndList(disp) GET_by_offset(disp, _gloffset_EndList)
+#define SET_EndList(disp, fn) SET_by_offset(disp, _gloffset_EndList, fn)
+#define CALL_CallList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_CallList, parameters)
+#define GET_CallList(disp) GET_by_offset(disp, _gloffset_CallList)
+#define SET_CallList(disp, fn) SET_by_offset(disp, _gloffset_CallList, fn)
+#define CALL_CallLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, const GLvoid *)), _gloffset_CallLists, parameters)
+#define GET_CallLists(disp) GET_by_offset(disp, _gloffset_CallLists)
+#define SET_CallLists(disp, fn) SET_by_offset(disp, _gloffset_CallLists, fn)
+#define CALL_DeleteLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei)), _gloffset_DeleteLists, parameters)
+#define GET_DeleteLists(disp) GET_by_offset(disp, _gloffset_DeleteLists)
+#define SET_DeleteLists(disp, fn) SET_by_offset(disp, _gloffset_DeleteLists, fn)
+#define CALL_GenLists(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLsizei)), _gloffset_GenLists, parameters)
+#define GET_GenLists(disp) GET_by_offset(disp, _gloffset_GenLists)
+#define SET_GenLists(disp, fn) SET_by_offset(disp, _gloffset_GenLists, fn)
+#define CALL_ListBase(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ListBase, parameters)
+#define GET_ListBase(disp) GET_by_offset(disp, _gloffset_ListBase)
+#define SET_ListBase(disp, fn) SET_by_offset(disp, _gloffset_ListBase, fn)
+#define CALL_Begin(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Begin, parameters)
+#define GET_Begin(disp) GET_by_offset(disp, _gloffset_Begin)
+#define SET_Begin(disp, fn) SET_by_offset(disp, _gloffset_Begin, fn)
+#define CALL_Bitmap(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *)), _gloffset_Bitmap, parameters)
+#define GET_Bitmap(disp) GET_by_offset(disp, _gloffset_Bitmap)
+#define SET_Bitmap(disp, fn) SET_by_offset(disp, _gloffset_Bitmap, fn)
+#define CALL_Color3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Color3b, parameters)
+#define GET_Color3b(disp) GET_by_offset(disp, _gloffset_Color3b)
+#define SET_Color3b(disp, fn) SET_by_offset(disp, _gloffset_Color3b, fn)
+#define CALL_Color3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color3bv, parameters)
+#define GET_Color3bv(disp) GET_by_offset(disp, _gloffset_Color3bv)
+#define SET_Color3bv(disp, fn) SET_by_offset(disp, _gloffset_Color3bv, fn)
+#define CALL_Color3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Color3d, parameters)
+#define GET_Color3d(disp) GET_by_offset(disp, _gloffset_Color3d)
+#define SET_Color3d(disp, fn) SET_by_offset(disp, _gloffset_Color3d, fn)
+#define CALL_Color3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color3dv, parameters)
+#define GET_Color3dv(disp) GET_by_offset(disp, _gloffset_Color3dv)
+#define SET_Color3dv(disp, fn) SET_by_offset(disp, _gloffset_Color3dv, fn)
+#define CALL_Color3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Color3f, parameters)
+#define GET_Color3f(disp) GET_by_offset(disp, _gloffset_Color3f)
+#define SET_Color3f(disp, fn) SET_by_offset(disp, _gloffset_Color3f, fn)
+#define CALL_Color3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color3fv, parameters)
+#define GET_Color3fv(disp) GET_by_offset(disp, _gloffset_Color3fv)
+#define SET_Color3fv(disp, fn) SET_by_offset(disp, _gloffset_Color3fv, fn)
+#define CALL_Color3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Color3i, parameters)
+#define GET_Color3i(disp) GET_by_offset(disp, _gloffset_Color3i)
+#define SET_Color3i(disp, fn) SET_by_offset(disp, _gloffset_Color3i, fn)
+#define CALL_Color3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color3iv, parameters)
+#define GET_Color3iv(disp) GET_by_offset(disp, _gloffset_Color3iv)
+#define SET_Color3iv(disp, fn) SET_by_offset(disp, _gloffset_Color3iv, fn)
+#define CALL_Color3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Color3s, parameters)
+#define GET_Color3s(disp) GET_by_offset(disp, _gloffset_Color3s)
+#define SET_Color3s(disp, fn) SET_by_offset(disp, _gloffset_Color3s, fn)
+#define CALL_Color3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color3sv, parameters)
+#define GET_Color3sv(disp) GET_by_offset(disp, _gloffset_Color3sv)
+#define SET_Color3sv(disp, fn) SET_by_offset(disp, _gloffset_Color3sv, fn)
+#define CALL_Color3ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_Color3ub, parameters)
+#define GET_Color3ub(disp) GET_by_offset(disp, _gloffset_Color3ub)
+#define SET_Color3ub(disp, fn) SET_by_offset(disp, _gloffset_Color3ub, fn)
+#define CALL_Color3ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color3ubv, parameters)
+#define GET_Color3ubv(disp) GET_by_offset(disp, _gloffset_Color3ubv)
+#define SET_Color3ubv(disp, fn) SET_by_offset(disp, _gloffset_Color3ubv, fn)
+#define CALL_Color3ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_Color3ui, parameters)
+#define GET_Color3ui(disp) GET_by_offset(disp, _gloffset_Color3ui)
+#define SET_Color3ui(disp, fn) SET_by_offset(disp, _gloffset_Color3ui, fn)
+#define CALL_Color3uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color3uiv, parameters)
+#define GET_Color3uiv(disp) GET_by_offset(disp, _gloffset_Color3uiv)
+#define SET_Color3uiv(disp, fn) SET_by_offset(disp, _gloffset_Color3uiv, fn)
+#define CALL_Color3us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_Color3us, parameters)
+#define GET_Color3us(disp) GET_by_offset(disp, _gloffset_Color3us)
+#define SET_Color3us(disp, fn) SET_by_offset(disp, _gloffset_Color3us, fn)
+#define CALL_Color3usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color3usv, parameters)
+#define GET_Color3usv(disp) GET_by_offset(disp, _gloffset_Color3usv)
+#define SET_Color3usv(disp, fn) SET_by_offset(disp, _gloffset_Color3usv, fn)
+#define CALL_Color4b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte, GLbyte)), _gloffset_Color4b, parameters)
+#define GET_Color4b(disp) GET_by_offset(disp, _gloffset_Color4b)
+#define SET_Color4b(disp, fn) SET_by_offset(disp, _gloffset_Color4b, fn)
+#define CALL_Color4bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color4bv, parameters)
+#define GET_Color4bv(disp) GET_by_offset(disp, _gloffset_Color4bv)
+#define SET_Color4bv(disp, fn) SET_by_offset(disp, _gloffset_Color4bv, fn)
+#define CALL_Color4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Color4d, parameters)
+#define GET_Color4d(disp) GET_by_offset(disp, _gloffset_Color4d)
+#define SET_Color4d(disp, fn) SET_by_offset(disp, _gloffset_Color4d, fn)
+#define CALL_Color4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color4dv, parameters)
+#define GET_Color4dv(disp) GET_by_offset(disp, _gloffset_Color4dv)
+#define SET_Color4dv(disp, fn) SET_by_offset(disp, _gloffset_Color4dv, fn)
+#define CALL_Color4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Color4f, parameters)
+#define GET_Color4f(disp) GET_by_offset(disp, _gloffset_Color4f)
+#define SET_Color4f(disp, fn) SET_by_offset(disp, _gloffset_Color4f, fn)
+#define CALL_Color4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color4fv, parameters)
+#define GET_Color4fv(disp) GET_by_offset(disp, _gloffset_Color4fv)
+#define SET_Color4fv(disp, fn) SET_by_offset(disp, _gloffset_Color4fv, fn)
+#define CALL_Color4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Color4i, parameters)
+#define GET_Color4i(disp) GET_by_offset(disp, _gloffset_Color4i)
+#define SET_Color4i(disp, fn) SET_by_offset(disp, _gloffset_Color4i, fn)
+#define CALL_Color4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color4iv, parameters)
+#define GET_Color4iv(disp) GET_by_offset(disp, _gloffset_Color4iv)
+#define SET_Color4iv(disp, fn) SET_by_offset(disp, _gloffset_Color4iv, fn)
+#define CALL_Color4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Color4s, parameters)
+#define GET_Color4s(disp) GET_by_offset(disp, _gloffset_Color4s)
+#define SET_Color4s(disp, fn) SET_by_offset(disp, _gloffset_Color4s, fn)
+#define CALL_Color4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color4sv, parameters)
+#define GET_Color4sv(disp) GET_by_offset(disp, _gloffset_Color4sv)
+#define SET_Color4sv(disp, fn) SET_by_offset(disp, _gloffset_Color4sv, fn)
+#define CALL_Color4ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_Color4ub, parameters)
+#define GET_Color4ub(disp) GET_by_offset(disp, _gloffset_Color4ub)
+#define SET_Color4ub(disp, fn) SET_by_offset(disp, _gloffset_Color4ub, fn)
+#define CALL_Color4ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color4ubv, parameters)
+#define GET_Color4ubv(disp) GET_by_offset(disp, _gloffset_Color4ubv)
+#define SET_Color4ubv(disp, fn) SET_by_offset(disp, _gloffset_Color4ubv, fn)
+#define CALL_Color4ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_Color4ui, parameters)
+#define GET_Color4ui(disp) GET_by_offset(disp, _gloffset_Color4ui)
+#define SET_Color4ui(disp, fn) SET_by_offset(disp, _gloffset_Color4ui, fn)
+#define CALL_Color4uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color4uiv, parameters)
+#define GET_Color4uiv(disp) GET_by_offset(disp, _gloffset_Color4uiv)
+#define SET_Color4uiv(disp, fn) SET_by_offset(disp, _gloffset_Color4uiv, fn)
+#define CALL_Color4us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort, GLushort)), _gloffset_Color4us, parameters)
+#define GET_Color4us(disp) GET_by_offset(disp, _gloffset_Color4us)
+#define SET_Color4us(disp, fn) SET_by_offset(disp, _gloffset_Color4us, fn)
+#define CALL_Color4usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color4usv, parameters)
+#define GET_Color4usv(disp) GET_by_offset(disp, _gloffset_Color4usv)
+#define SET_Color4usv(disp, fn) SET_by_offset(disp, _gloffset_Color4usv, fn)
+#define CALL_EdgeFlag(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_EdgeFlag, parameters)
+#define GET_EdgeFlag(disp) GET_by_offset(disp, _gloffset_EdgeFlag)
+#define SET_EdgeFlag(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlag, fn)
+#define CALL_EdgeFlagv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLboolean *)), _gloffset_EdgeFlagv, parameters)
+#define GET_EdgeFlagv(disp) GET_by_offset(disp, _gloffset_EdgeFlagv)
+#define SET_EdgeFlagv(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagv, fn)
+#define CALL_End(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_End, parameters)
+#define GET_End(disp) GET_by_offset(disp, _gloffset_End)
+#define SET_End(disp, fn) SET_by_offset(disp, _gloffset_End, fn)
+#define CALL_Indexd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_Indexd, parameters)
+#define GET_Indexd(disp) GET_by_offset(disp, _gloffset_Indexd)
+#define SET_Indexd(disp, fn) SET_by_offset(disp, _gloffset_Indexd, fn)
+#define CALL_Indexdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Indexdv, parameters)
+#define GET_Indexdv(disp) GET_by_offset(disp, _gloffset_Indexdv)
+#define SET_Indexdv(disp, fn) SET_by_offset(disp, _gloffset_Indexdv, fn)
+#define CALL_Indexf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_Indexf, parameters)
+#define GET_Indexf(disp) GET_by_offset(disp, _gloffset_Indexf)
+#define SET_Indexf(disp, fn) SET_by_offset(disp, _gloffset_Indexf, fn)
+#define CALL_Indexfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Indexfv, parameters)
+#define GET_Indexfv(disp) GET_by_offset(disp, _gloffset_Indexfv)
+#define SET_Indexfv(disp, fn) SET_by_offset(disp, _gloffset_Indexfv, fn)
+#define CALL_Indexi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_Indexi, parameters)
+#define GET_Indexi(disp) GET_by_offset(disp, _gloffset_Indexi)
+#define SET_Indexi(disp, fn) SET_by_offset(disp, _gloffset_Indexi, fn)
+#define CALL_Indexiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Indexiv, parameters)
+#define GET_Indexiv(disp) GET_by_offset(disp, _gloffset_Indexiv)
+#define SET_Indexiv(disp, fn) SET_by_offset(disp, _gloffset_Indexiv, fn)
+#define CALL_Indexs(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_Indexs, parameters)
+#define GET_Indexs(disp) GET_by_offset(disp, _gloffset_Indexs)
+#define SET_Indexs(disp, fn) SET_by_offset(disp, _gloffset_Indexs, fn)
+#define CALL_Indexsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Indexsv, parameters)
+#define GET_Indexsv(disp) GET_by_offset(disp, _gloffset_Indexsv)
+#define SET_Indexsv(disp, fn) SET_by_offset(disp, _gloffset_Indexsv, fn)
+#define CALL_Normal3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Normal3b, parameters)
+#define GET_Normal3b(disp) GET_by_offset(disp, _gloffset_Normal3b)
+#define SET_Normal3b(disp, fn) SET_by_offset(disp, _gloffset_Normal3b, fn)
+#define CALL_Normal3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Normal3bv, parameters)
+#define GET_Normal3bv(disp) GET_by_offset(disp, _gloffset_Normal3bv)
+#define SET_Normal3bv(disp, fn) SET_by_offset(disp, _gloffset_Normal3bv, fn)
+#define CALL_Normal3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Normal3d, parameters)
+#define GET_Normal3d(disp) GET_by_offset(disp, _gloffset_Normal3d)
+#define SET_Normal3d(disp, fn) SET_by_offset(disp, _gloffset_Normal3d, fn)
+#define CALL_Normal3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Normal3dv, parameters)
+#define GET_Normal3dv(disp) GET_by_offset(disp, _gloffset_Normal3dv)
+#define SET_Normal3dv(disp, fn) SET_by_offset(disp, _gloffset_Normal3dv, fn)
+#define CALL_Normal3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Normal3f, parameters)
+#define GET_Normal3f(disp) GET_by_offset(disp, _gloffset_Normal3f)
+#define SET_Normal3f(disp, fn) SET_by_offset(disp, _gloffset_Normal3f, fn)
+#define CALL_Normal3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Normal3fv, parameters)
+#define GET_Normal3fv(disp) GET_by_offset(disp, _gloffset_Normal3fv)
+#define SET_Normal3fv(disp, fn) SET_by_offset(disp, _gloffset_Normal3fv, fn)
+#define CALL_Normal3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Normal3i, parameters)
+#define GET_Normal3i(disp) GET_by_offset(disp, _gloffset_Normal3i)
+#define SET_Normal3i(disp, fn) SET_by_offset(disp, _gloffset_Normal3i, fn)
+#define CALL_Normal3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Normal3iv, parameters)
+#define GET_Normal3iv(disp) GET_by_offset(disp, _gloffset_Normal3iv)
+#define SET_Normal3iv(disp, fn) SET_by_offset(disp, _gloffset_Normal3iv, fn)
+#define CALL_Normal3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Normal3s, parameters)
+#define GET_Normal3s(disp) GET_by_offset(disp, _gloffset_Normal3s)
+#define SET_Normal3s(disp, fn) SET_by_offset(disp, _gloffset_Normal3s, fn)
+#define CALL_Normal3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Normal3sv, parameters)
+#define GET_Normal3sv(disp) GET_by_offset(disp, _gloffset_Normal3sv)
+#define SET_Normal3sv(disp, fn) SET_by_offset(disp, _gloffset_Normal3sv, fn)
+#define CALL_RasterPos2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_RasterPos2d, parameters)
+#define GET_RasterPos2d(disp) GET_by_offset(disp, _gloffset_RasterPos2d)
+#define SET_RasterPos2d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2d, fn)
+#define CALL_RasterPos2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos2dv, parameters)
+#define GET_RasterPos2dv(disp) GET_by_offset(disp, _gloffset_RasterPos2dv)
+#define SET_RasterPos2dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2dv, fn)
+#define CALL_RasterPos2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_RasterPos2f, parameters)
+#define GET_RasterPos2f(disp) GET_by_offset(disp, _gloffset_RasterPos2f)
+#define SET_RasterPos2f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2f, fn)
+#define CALL_RasterPos2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos2fv, parameters)
+#define GET_RasterPos2fv(disp) GET_by_offset(disp, _gloffset_RasterPos2fv)
+#define SET_RasterPos2fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2fv, fn)
+#define CALL_RasterPos2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_RasterPos2i, parameters)
+#define GET_RasterPos2i(disp) GET_by_offset(disp, _gloffset_RasterPos2i)
+#define SET_RasterPos2i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2i, fn)
+#define CALL_RasterPos2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos2iv, parameters)
+#define GET_RasterPos2iv(disp) GET_by_offset(disp, _gloffset_RasterPos2iv)
+#define SET_RasterPos2iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2iv, fn)
+#define CALL_RasterPos2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_RasterPos2s, parameters)
+#define GET_RasterPos2s(disp) GET_by_offset(disp, _gloffset_RasterPos2s)
+#define SET_RasterPos2s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2s, fn)
+#define CALL_RasterPos2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos2sv, parameters)
+#define GET_RasterPos2sv(disp) GET_by_offset(disp, _gloffset_RasterPos2sv)
+#define SET_RasterPos2sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2sv, fn)
+#define CALL_RasterPos3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos3d, parameters)
+#define GET_RasterPos3d(disp) GET_by_offset(disp, _gloffset_RasterPos3d)
+#define SET_RasterPos3d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3d, fn)
+#define CALL_RasterPos3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos3dv, parameters)
+#define GET_RasterPos3dv(disp) GET_by_offset(disp, _gloffset_RasterPos3dv)
+#define SET_RasterPos3dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3dv, fn)
+#define CALL_RasterPos3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos3f, parameters)
+#define GET_RasterPos3f(disp) GET_by_offset(disp, _gloffset_RasterPos3f)
+#define SET_RasterPos3f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3f, fn)
+#define CALL_RasterPos3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos3fv, parameters)
+#define GET_RasterPos3fv(disp) GET_by_offset(disp, _gloffset_RasterPos3fv)
+#define SET_RasterPos3fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3fv, fn)
+#define CALL_RasterPos3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_RasterPos3i, parameters)
+#define GET_RasterPos3i(disp) GET_by_offset(disp, _gloffset_RasterPos3i)
+#define SET_RasterPos3i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3i, fn)
+#define CALL_RasterPos3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos3iv, parameters)
+#define GET_RasterPos3iv(disp) GET_by_offset(disp, _gloffset_RasterPos3iv)
+#define SET_RasterPos3iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3iv, fn)
+#define CALL_RasterPos3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_RasterPos3s, parameters)
+#define GET_RasterPos3s(disp) GET_by_offset(disp, _gloffset_RasterPos3s)
+#define SET_RasterPos3s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3s, fn)
+#define CALL_RasterPos3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos3sv, parameters)
+#define GET_RasterPos3sv(disp) GET_by_offset(disp, _gloffset_RasterPos3sv)
+#define SET_RasterPos3sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3sv, fn)
+#define CALL_RasterPos4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos4d, parameters)
+#define GET_RasterPos4d(disp) GET_by_offset(disp, _gloffset_RasterPos4d)
+#define SET_RasterPos4d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4d, fn)
+#define CALL_RasterPos4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos4dv, parameters)
+#define GET_RasterPos4dv(disp) GET_by_offset(disp, _gloffset_RasterPos4dv)
+#define SET_RasterPos4dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4dv, fn)
+#define CALL_RasterPos4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos4f, parameters)
+#define GET_RasterPos4f(disp) GET_by_offset(disp, _gloffset_RasterPos4f)
+#define SET_RasterPos4f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4f, fn)
+#define CALL_RasterPos4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos4fv, parameters)
+#define GET_RasterPos4fv(disp) GET_by_offset(disp, _gloffset_RasterPos4fv)
+#define SET_RasterPos4fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4fv, fn)
+#define CALL_RasterPos4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_RasterPos4i, parameters)
+#define GET_RasterPos4i(disp) GET_by_offset(disp, _gloffset_RasterPos4i)
+#define SET_RasterPos4i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4i, fn)
+#define CALL_RasterPos4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos4iv, parameters)
+#define GET_RasterPos4iv(disp) GET_by_offset(disp, _gloffset_RasterPos4iv)
+#define SET_RasterPos4iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4iv, fn)
+#define CALL_RasterPos4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_RasterPos4s, parameters)
+#define GET_RasterPos4s(disp) GET_by_offset(disp, _gloffset_RasterPos4s)
+#define SET_RasterPos4s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4s, fn)
+#define CALL_RasterPos4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos4sv, parameters)
+#define GET_RasterPos4sv(disp) GET_by_offset(disp, _gloffset_RasterPos4sv)
+#define SET_RasterPos4sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4sv, fn)
+#define CALL_Rectd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rectd, parameters)
+#define GET_Rectd(disp) GET_by_offset(disp, _gloffset_Rectd)
+#define SET_Rectd(disp, fn) SET_by_offset(disp, _gloffset_Rectd, fn)
+#define CALL_Rectdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *, const GLdouble *)), _gloffset_Rectdv, parameters)
+#define GET_Rectdv(disp) GET_by_offset(disp, _gloffset_Rectdv)
+#define SET_Rectdv(disp, fn) SET_by_offset(disp, _gloffset_Rectdv, fn)
+#define CALL_Rectf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rectf, parameters)
+#define GET_Rectf(disp) GET_by_offset(disp, _gloffset_Rectf)
+#define SET_Rectf(disp, fn) SET_by_offset(disp, _gloffset_Rectf, fn)
+#define CALL_Rectfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *, const GLfloat *)), _gloffset_Rectfv, parameters)
+#define GET_Rectfv(disp) GET_by_offset(disp, _gloffset_Rectfv)
+#define SET_Rectfv(disp, fn) SET_by_offset(disp, _gloffset_Rectfv, fn)
+#define CALL_Recti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Recti, parameters)
+#define GET_Recti(disp) GET_by_offset(disp, _gloffset_Recti)
+#define SET_Recti(disp, fn) SET_by_offset(disp, _gloffset_Recti, fn)
+#define CALL_Rectiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *, const GLint *)), _gloffset_Rectiv, parameters)
+#define GET_Rectiv(disp) GET_by_offset(disp, _gloffset_Rectiv)
+#define SET_Rectiv(disp, fn) SET_by_offset(disp, _gloffset_Rectiv, fn)
+#define CALL_Rects(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Rects, parameters)
+#define GET_Rects(disp) GET_by_offset(disp, _gloffset_Rects)
+#define SET_Rects(disp, fn) SET_by_offset(disp, _gloffset_Rects, fn)
+#define CALL_Rectsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *, const GLshort *)), _gloffset_Rectsv, parameters)
+#define GET_Rectsv(disp) GET_by_offset(disp, _gloffset_Rectsv)
+#define SET_Rectsv(disp, fn) SET_by_offset(disp, _gloffset_Rectsv, fn)
+#define CALL_TexCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_TexCoord1d, parameters)
+#define GET_TexCoord1d(disp) GET_by_offset(disp, _gloffset_TexCoord1d)
+#define SET_TexCoord1d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1d, fn)
+#define CALL_TexCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord1dv, parameters)
+#define GET_TexCoord1dv(disp) GET_by_offset(disp, _gloffset_TexCoord1dv)
+#define SET_TexCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1dv, fn)
+#define CALL_TexCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_TexCoord1f, parameters)
+#define GET_TexCoord1f(disp) GET_by_offset(disp, _gloffset_TexCoord1f)
+#define SET_TexCoord1f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1f, fn)
+#define CALL_TexCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord1fv, parameters)
+#define GET_TexCoord1fv(disp) GET_by_offset(disp, _gloffset_TexCoord1fv)
+#define SET_TexCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1fv, fn)
+#define CALL_TexCoord1i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_TexCoord1i, parameters)
+#define GET_TexCoord1i(disp) GET_by_offset(disp, _gloffset_TexCoord1i)
+#define SET_TexCoord1i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1i, fn)
+#define CALL_TexCoord1iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord1iv, parameters)
+#define GET_TexCoord1iv(disp) GET_by_offset(disp, _gloffset_TexCoord1iv)
+#define SET_TexCoord1iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1iv, fn)
+#define CALL_TexCoord1s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_TexCoord1s, parameters)
+#define GET_TexCoord1s(disp) GET_by_offset(disp, _gloffset_TexCoord1s)
+#define SET_TexCoord1s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1s, fn)
+#define CALL_TexCoord1sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord1sv, parameters)
+#define GET_TexCoord1sv(disp) GET_by_offset(disp, _gloffset_TexCoord1sv)
+#define SET_TexCoord1sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1sv, fn)
+#define CALL_TexCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_TexCoord2d, parameters)
+#define GET_TexCoord2d(disp) GET_by_offset(disp, _gloffset_TexCoord2d)
+#define SET_TexCoord2d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2d, fn)
+#define CALL_TexCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord2dv, parameters)
+#define GET_TexCoord2dv(disp) GET_by_offset(disp, _gloffset_TexCoord2dv)
+#define SET_TexCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2dv, fn)
+#define CALL_TexCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_TexCoord2f, parameters)
+#define GET_TexCoord2f(disp) GET_by_offset(disp, _gloffset_TexCoord2f)
+#define SET_TexCoord2f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2f, fn)
+#define CALL_TexCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord2fv, parameters)
+#define GET_TexCoord2fv(disp) GET_by_offset(disp, _gloffset_TexCoord2fv)
+#define SET_TexCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2fv, fn)
+#define CALL_TexCoord2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_TexCoord2i, parameters)
+#define GET_TexCoord2i(disp) GET_by_offset(disp, _gloffset_TexCoord2i)
+#define SET_TexCoord2i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2i, fn)
+#define CALL_TexCoord2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord2iv, parameters)
+#define GET_TexCoord2iv(disp) GET_by_offset(disp, _gloffset_TexCoord2iv)
+#define SET_TexCoord2iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2iv, fn)
+#define CALL_TexCoord2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_TexCoord2s, parameters)
+#define GET_TexCoord2s(disp) GET_by_offset(disp, _gloffset_TexCoord2s)
+#define SET_TexCoord2s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2s, fn)
+#define CALL_TexCoord2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord2sv, parameters)
+#define GET_TexCoord2sv(disp) GET_by_offset(disp, _gloffset_TexCoord2sv)
+#define SET_TexCoord2sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2sv, fn)
+#define CALL_TexCoord3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord3d, parameters)
+#define GET_TexCoord3d(disp) GET_by_offset(disp, _gloffset_TexCoord3d)
+#define SET_TexCoord3d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3d, fn)
+#define CALL_TexCoord3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord3dv, parameters)
+#define GET_TexCoord3dv(disp) GET_by_offset(disp, _gloffset_TexCoord3dv)
+#define SET_TexCoord3dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3dv, fn)
+#define CALL_TexCoord3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord3f, parameters)
+#define GET_TexCoord3f(disp) GET_by_offset(disp, _gloffset_TexCoord3f)
+#define SET_TexCoord3f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3f, fn)
+#define CALL_TexCoord3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord3fv, parameters)
+#define GET_TexCoord3fv(disp) GET_by_offset(disp, _gloffset_TexCoord3fv)
+#define SET_TexCoord3fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3fv, fn)
+#define CALL_TexCoord3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_TexCoord3i, parameters)
+#define GET_TexCoord3i(disp) GET_by_offset(disp, _gloffset_TexCoord3i)
+#define SET_TexCoord3i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3i, fn)
+#define CALL_TexCoord3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord3iv, parameters)
+#define GET_TexCoord3iv(disp) GET_by_offset(disp, _gloffset_TexCoord3iv)
+#define SET_TexCoord3iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3iv, fn)
+#define CALL_TexCoord3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_TexCoord3s, parameters)
+#define GET_TexCoord3s(disp) GET_by_offset(disp, _gloffset_TexCoord3s)
+#define SET_TexCoord3s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3s, fn)
+#define CALL_TexCoord3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord3sv, parameters)
+#define GET_TexCoord3sv(disp) GET_by_offset(disp, _gloffset_TexCoord3sv)
+#define SET_TexCoord3sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3sv, fn)
+#define CALL_TexCoord4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord4d, parameters)
+#define GET_TexCoord4d(disp) GET_by_offset(disp, _gloffset_TexCoord4d)
+#define SET_TexCoord4d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4d, fn)
+#define CALL_TexCoord4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord4dv, parameters)
+#define GET_TexCoord4dv(disp) GET_by_offset(disp, _gloffset_TexCoord4dv)
+#define SET_TexCoord4dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4dv, fn)
+#define CALL_TexCoord4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord4f, parameters)
+#define GET_TexCoord4f(disp) GET_by_offset(disp, _gloffset_TexCoord4f)
+#define SET_TexCoord4f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4f, fn)
+#define CALL_TexCoord4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord4fv, parameters)
+#define GET_TexCoord4fv(disp) GET_by_offset(disp, _gloffset_TexCoord4fv)
+#define SET_TexCoord4fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4fv, fn)
+#define CALL_TexCoord4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_TexCoord4i, parameters)
+#define GET_TexCoord4i(disp) GET_by_offset(disp, _gloffset_TexCoord4i)
+#define SET_TexCoord4i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4i, fn)
+#define CALL_TexCoord4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord4iv, parameters)
+#define GET_TexCoord4iv(disp) GET_by_offset(disp, _gloffset_TexCoord4iv)
+#define SET_TexCoord4iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4iv, fn)
+#define CALL_TexCoord4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_TexCoord4s, parameters)
+#define GET_TexCoord4s(disp) GET_by_offset(disp, _gloffset_TexCoord4s)
+#define SET_TexCoord4s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4s, fn)
+#define CALL_TexCoord4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord4sv, parameters)
+#define GET_TexCoord4sv(disp) GET_by_offset(disp, _gloffset_TexCoord4sv)
+#define SET_TexCoord4sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4sv, fn)
+#define CALL_Vertex2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_Vertex2d, parameters)
+#define GET_Vertex2d(disp) GET_by_offset(disp, _gloffset_Vertex2d)
+#define SET_Vertex2d(disp, fn) SET_by_offset(disp, _gloffset_Vertex2d, fn)
+#define CALL_Vertex2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex2dv, parameters)
+#define GET_Vertex2dv(disp) GET_by_offset(disp, _gloffset_Vertex2dv)
+#define SET_Vertex2dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2dv, fn)
+#define CALL_Vertex2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_Vertex2f, parameters)
+#define GET_Vertex2f(disp) GET_by_offset(disp, _gloffset_Vertex2f)
+#define SET_Vertex2f(disp, fn) SET_by_offset(disp, _gloffset_Vertex2f, fn)
+#define CALL_Vertex2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex2fv, parameters)
+#define GET_Vertex2fv(disp) GET_by_offset(disp, _gloffset_Vertex2fv)
+#define SET_Vertex2fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2fv, fn)
+#define CALL_Vertex2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Vertex2i, parameters)
+#define GET_Vertex2i(disp) GET_by_offset(disp, _gloffset_Vertex2i)
+#define SET_Vertex2i(disp, fn) SET_by_offset(disp, _gloffset_Vertex2i, fn)
+#define CALL_Vertex2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex2iv, parameters)
+#define GET_Vertex2iv(disp) GET_by_offset(disp, _gloffset_Vertex2iv)
+#define SET_Vertex2iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2iv, fn)
+#define CALL_Vertex2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_Vertex2s, parameters)
+#define GET_Vertex2s(disp) GET_by_offset(disp, _gloffset_Vertex2s)
+#define SET_Vertex2s(disp, fn) SET_by_offset(disp, _gloffset_Vertex2s, fn)
+#define CALL_Vertex2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex2sv, parameters)
+#define GET_Vertex2sv(disp) GET_by_offset(disp, _gloffset_Vertex2sv)
+#define SET_Vertex2sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2sv, fn)
+#define CALL_Vertex3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Vertex3d, parameters)
+#define GET_Vertex3d(disp) GET_by_offset(disp, _gloffset_Vertex3d)
+#define SET_Vertex3d(disp, fn) SET_by_offset(disp, _gloffset_Vertex3d, fn)
+#define CALL_Vertex3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex3dv, parameters)
+#define GET_Vertex3dv(disp) GET_by_offset(disp, _gloffset_Vertex3dv)
+#define SET_Vertex3dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3dv, fn)
+#define CALL_Vertex3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Vertex3f, parameters)
+#define GET_Vertex3f(disp) GET_by_offset(disp, _gloffset_Vertex3f)
+#define SET_Vertex3f(disp, fn) SET_by_offset(disp, _gloffset_Vertex3f, fn)
+#define CALL_Vertex3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex3fv, parameters)
+#define GET_Vertex3fv(disp) GET_by_offset(disp, _gloffset_Vertex3fv)
+#define SET_Vertex3fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3fv, fn)
+#define CALL_Vertex3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Vertex3i, parameters)
+#define GET_Vertex3i(disp) GET_by_offset(disp, _gloffset_Vertex3i)
+#define SET_Vertex3i(disp, fn) SET_by_offset(disp, _gloffset_Vertex3i, fn)
+#define CALL_Vertex3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex3iv, parameters)
+#define GET_Vertex3iv(disp) GET_by_offset(disp, _gloffset_Vertex3iv)
+#define SET_Vertex3iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3iv, fn)
+#define CALL_Vertex3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Vertex3s, parameters)
+#define GET_Vertex3s(disp) GET_by_offset(disp, _gloffset_Vertex3s)
+#define SET_Vertex3s(disp, fn) SET_by_offset(disp, _gloffset_Vertex3s, fn)
+#define CALL_Vertex3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex3sv, parameters)
+#define GET_Vertex3sv(disp) GET_by_offset(disp, _gloffset_Vertex3sv)
+#define SET_Vertex3sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3sv, fn)
+#define CALL_Vertex4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Vertex4d, parameters)
+#define GET_Vertex4d(disp) GET_by_offset(disp, _gloffset_Vertex4d)
+#define SET_Vertex4d(disp, fn) SET_by_offset(disp, _gloffset_Vertex4d, fn)
+#define CALL_Vertex4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex4dv, parameters)
+#define GET_Vertex4dv(disp) GET_by_offset(disp, _gloffset_Vertex4dv)
+#define SET_Vertex4dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4dv, fn)
+#define CALL_Vertex4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Vertex4f, parameters)
+#define GET_Vertex4f(disp) GET_by_offset(disp, _gloffset_Vertex4f)
+#define SET_Vertex4f(disp, fn) SET_by_offset(disp, _gloffset_Vertex4f, fn)
+#define CALL_Vertex4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex4fv, parameters)
+#define GET_Vertex4fv(disp) GET_by_offset(disp, _gloffset_Vertex4fv)
+#define SET_Vertex4fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4fv, fn)
+#define CALL_Vertex4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Vertex4i, parameters)
+#define GET_Vertex4i(disp) GET_by_offset(disp, _gloffset_Vertex4i)
+#define SET_Vertex4i(disp, fn) SET_by_offset(disp, _gloffset_Vertex4i, fn)
+#define CALL_Vertex4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex4iv, parameters)
+#define GET_Vertex4iv(disp) GET_by_offset(disp, _gloffset_Vertex4iv)
+#define SET_Vertex4iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4iv, fn)
+#define CALL_Vertex4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Vertex4s, parameters)
+#define GET_Vertex4s(disp) GET_by_offset(disp, _gloffset_Vertex4s)
+#define SET_Vertex4s(disp, fn) SET_by_offset(disp, _gloffset_Vertex4s, fn)
+#define CALL_Vertex4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex4sv, parameters)
+#define GET_Vertex4sv(disp) GET_by_offset(disp, _gloffset_Vertex4sv)
+#define SET_Vertex4sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4sv, fn)
+#define CALL_ClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_ClipPlane, parameters)
+#define GET_ClipPlane(disp) GET_by_offset(disp, _gloffset_ClipPlane)
+#define SET_ClipPlane(disp, fn) SET_by_offset(disp, _gloffset_ClipPlane, fn)
+#define CALL_ColorMaterial(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ColorMaterial, parameters)
+#define GET_ColorMaterial(disp) GET_by_offset(disp, _gloffset_ColorMaterial)
+#define SET_ColorMaterial(disp, fn) SET_by_offset(disp, _gloffset_ColorMaterial, fn)
+#define CALL_CullFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_CullFace, parameters)
+#define GET_CullFace(disp) GET_by_offset(disp, _gloffset_CullFace)
+#define SET_CullFace(disp, fn) SET_by_offset(disp, _gloffset_CullFace, fn)
+#define CALL_Fogf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Fogf, parameters)
+#define GET_Fogf(disp) GET_by_offset(disp, _gloffset_Fogf)
+#define SET_Fogf(disp, fn) SET_by_offset(disp, _gloffset_Fogf, fn)
+#define CALL_Fogfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_Fogfv, parameters)
+#define GET_Fogfv(disp) GET_by_offset(disp, _gloffset_Fogfv)
+#define SET_Fogfv(disp, fn) SET_by_offset(disp, _gloffset_Fogfv, fn)
+#define CALL_Fogi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_Fogi, parameters)
+#define GET_Fogi(disp) GET_by_offset(disp, _gloffset_Fogi)
+#define SET_Fogi(disp, fn) SET_by_offset(disp, _gloffset_Fogi, fn)
+#define CALL_Fogiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_Fogiv, parameters)
+#define GET_Fogiv(disp) GET_by_offset(disp, _gloffset_Fogiv)
+#define SET_Fogiv(disp, fn) SET_by_offset(disp, _gloffset_Fogiv, fn)
+#define CALL_FrontFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_FrontFace, parameters)
+#define GET_FrontFace(disp) GET_by_offset(disp, _gloffset_FrontFace)
+#define SET_FrontFace(disp, fn) SET_by_offset(disp, _gloffset_FrontFace, fn)
+#define CALL_Hint(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_Hint, parameters)
+#define GET_Hint(disp) GET_by_offset(disp, _gloffset_Hint)
+#define SET_Hint(disp, fn) SET_by_offset(disp, _gloffset_Hint, fn)
+#define CALL_Lightf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Lightf, parameters)
+#define GET_Lightf(disp) GET_by_offset(disp, _gloffset_Lightf)
+#define SET_Lightf(disp, fn) SET_by_offset(disp, _gloffset_Lightf, fn)
+#define CALL_Lightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Lightfv, parameters)
+#define GET_Lightfv(disp) GET_by_offset(disp, _gloffset_Lightfv)
+#define SET_Lightfv(disp, fn) SET_by_offset(disp, _gloffset_Lightfv, fn)
+#define CALL_Lighti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Lighti, parameters)
+#define GET_Lighti(disp) GET_by_offset(disp, _gloffset_Lighti)
+#define SET_Lighti(disp, fn) SET_by_offset(disp, _gloffset_Lighti, fn)
+#define CALL_Lightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Lightiv, parameters)
+#define GET_Lightiv(disp) GET_by_offset(disp, _gloffset_Lightiv)
+#define SET_Lightiv(disp, fn) SET_by_offset(disp, _gloffset_Lightiv, fn)
+#define CALL_LightModelf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_LightModelf, parameters)
+#define GET_LightModelf(disp) GET_by_offset(disp, _gloffset_LightModelf)
+#define SET_LightModelf(disp, fn) SET_by_offset(disp, _gloffset_LightModelf, fn)
+#define CALL_LightModelfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_LightModelfv, parameters)
+#define GET_LightModelfv(disp) GET_by_offset(disp, _gloffset_LightModelfv)
+#define SET_LightModelfv(disp, fn) SET_by_offset(disp, _gloffset_LightModelfv, fn)
+#define CALL_LightModeli(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_LightModeli, parameters)
+#define GET_LightModeli(disp) GET_by_offset(disp, _gloffset_LightModeli)
+#define SET_LightModeli(disp, fn) SET_by_offset(disp, _gloffset_LightModeli, fn)
+#define CALL_LightModeliv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_LightModeliv, parameters)
+#define GET_LightModeliv(disp) GET_by_offset(disp, _gloffset_LightModeliv)
+#define SET_LightModeliv(disp, fn) SET_by_offset(disp, _gloffset_LightModeliv, fn)
+#define CALL_LineStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLushort)), _gloffset_LineStipple, parameters)
+#define GET_LineStipple(disp) GET_by_offset(disp, _gloffset_LineStipple)
+#define SET_LineStipple(disp, fn) SET_by_offset(disp, _gloffset_LineStipple, fn)
+#define CALL_LineWidth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_LineWidth, parameters)
+#define GET_LineWidth(disp) GET_by_offset(disp, _gloffset_LineWidth)
+#define SET_LineWidth(disp, fn) SET_by_offset(disp, _gloffset_LineWidth, fn)
+#define CALL_Materialf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Materialf, parameters)
+#define GET_Materialf(disp) GET_by_offset(disp, _gloffset_Materialf)
+#define SET_Materialf(disp, fn) SET_by_offset(disp, _gloffset_Materialf, fn)
+#define CALL_Materialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Materialfv, parameters)
+#define GET_Materialfv(disp) GET_by_offset(disp, _gloffset_Materialfv)
+#define SET_Materialfv(disp, fn) SET_by_offset(disp, _gloffset_Materialfv, fn)
+#define CALL_Materiali(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Materiali, parameters)
+#define GET_Materiali(disp) GET_by_offset(disp, _gloffset_Materiali)
+#define SET_Materiali(disp, fn) SET_by_offset(disp, _gloffset_Materiali, fn)
+#define CALL_Materialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Materialiv, parameters)
+#define GET_Materialiv(disp) GET_by_offset(disp, _gloffset_Materialiv)
+#define SET_Materialiv(disp, fn) SET_by_offset(disp, _gloffset_Materialiv, fn)
+#define CALL_PointSize(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PointSize, parameters)
+#define GET_PointSize(disp) GET_by_offset(disp, _gloffset_PointSize)
+#define SET_PointSize(disp, fn) SET_by_offset(disp, _gloffset_PointSize, fn)
+#define CALL_PolygonMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_PolygonMode, parameters)
+#define GET_PolygonMode(disp) GET_by_offset(disp, _gloffset_PolygonMode)
+#define SET_PolygonMode(disp, fn) SET_by_offset(disp, _gloffset_PolygonMode, fn)
+#define CALL_PolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_PolygonStipple, parameters)
+#define GET_PolygonStipple(disp) GET_by_offset(disp, _gloffset_PolygonStipple)
+#define SET_PolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_PolygonStipple, fn)
+#define CALL_Scissor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Scissor, parameters)
+#define GET_Scissor(disp) GET_by_offset(disp, _gloffset_Scissor)
+#define SET_Scissor(disp, fn) SET_by_offset(disp, _gloffset_Scissor, fn)
+#define CALL_ShadeModel(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ShadeModel, parameters)
+#define GET_ShadeModel(disp) GET_by_offset(disp, _gloffset_ShadeModel)
+#define SET_ShadeModel(disp, fn) SET_by_offset(disp, _gloffset_ShadeModel, fn)
+#define CALL_TexParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexParameterf, parameters)
+#define GET_TexParameterf(disp) GET_by_offset(disp, _gloffset_TexParameterf)
+#define SET_TexParameterf(disp, fn) SET_by_offset(disp, _gloffset_TexParameterf, fn)
+#define CALL_TexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexParameterfv, parameters)
+#define GET_TexParameterfv(disp) GET_by_offset(disp, _gloffset_TexParameterfv)
+#define SET_TexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_TexParameterfv, fn)
+#define CALL_TexParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexParameteri, parameters)
+#define GET_TexParameteri(disp) GET_by_offset(disp, _gloffset_TexParameteri)
+#define SET_TexParameteri(disp, fn) SET_by_offset(disp, _gloffset_TexParameteri, fn)
+#define CALL_TexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameteriv, parameters)
+#define GET_TexParameteriv(disp) GET_by_offset(disp, _gloffset_TexParameteriv)
+#define SET_TexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_TexParameteriv, fn)
+#define CALL_TexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage1D, parameters)
+#define GET_TexImage1D(disp) GET_by_offset(disp, _gloffset_TexImage1D)
+#define SET_TexImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexImage1D, fn)
+#define CALL_TexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage2D, parameters)
+#define GET_TexImage2D(disp) GET_by_offset(disp, _gloffset_TexImage2D)
+#define SET_TexImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexImage2D, fn)
+#define CALL_TexEnvf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexEnvf, parameters)
+#define GET_TexEnvf(disp) GET_by_offset(disp, _gloffset_TexEnvf)
+#define SET_TexEnvf(disp, fn) SET_by_offset(disp, _gloffset_TexEnvf, fn)
+#define CALL_TexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexEnvfv, parameters)
+#define GET_TexEnvfv(disp) GET_by_offset(disp, _gloffset_TexEnvfv)
+#define SET_TexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_TexEnvfv, fn)
+#define CALL_TexEnvi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexEnvi, parameters)
+#define GET_TexEnvi(disp) GET_by_offset(disp, _gloffset_TexEnvi)
+#define SET_TexEnvi(disp, fn) SET_by_offset(disp, _gloffset_TexEnvi, fn)
+#define CALL_TexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexEnviv, parameters)
+#define GET_TexEnviv(disp) GET_by_offset(disp, _gloffset_TexEnviv)
+#define SET_TexEnviv(disp, fn) SET_by_offset(disp, _gloffset_TexEnviv, fn)
+#define CALL_TexGend(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble)), _gloffset_TexGend, parameters)
+#define GET_TexGend(disp) GET_by_offset(disp, _gloffset_TexGend)
+#define SET_TexGend(disp, fn) SET_by_offset(disp, _gloffset_TexGend, fn)
+#define CALL_TexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLdouble *)), _gloffset_TexGendv, parameters)
+#define GET_TexGendv(disp) GET_by_offset(disp, _gloffset_TexGendv)
+#define SET_TexGendv(disp, fn) SET_by_offset(disp, _gloffset_TexGendv, fn)
+#define CALL_TexGenf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexGenf, parameters)
+#define GET_TexGenf(disp) GET_by_offset(disp, _gloffset_TexGenf)
+#define SET_TexGenf(disp, fn) SET_by_offset(disp, _gloffset_TexGenf, fn)
+#define CALL_TexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexGenfv, parameters)
+#define GET_TexGenfv(disp) GET_by_offset(disp, _gloffset_TexGenfv)
+#define SET_TexGenfv(disp, fn) SET_by_offset(disp, _gloffset_TexGenfv, fn)
+#define CALL_TexGeni(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexGeni, parameters)
+#define GET_TexGeni(disp) GET_by_offset(disp, _gloffset_TexGeni)
+#define SET_TexGeni(disp, fn) SET_by_offset(disp, _gloffset_TexGeni, fn)
+#define CALL_TexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexGeniv, parameters)
+#define GET_TexGeniv(disp) GET_by_offset(disp, _gloffset_TexGeniv)
+#define SET_TexGeniv(disp, fn) SET_by_offset(disp, _gloffset_TexGeniv, fn)
+#define CALL_FeedbackBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, GLfloat *)), _gloffset_FeedbackBuffer, parameters)
+#define GET_FeedbackBuffer(disp) GET_by_offset(disp, _gloffset_FeedbackBuffer)
+#define SET_FeedbackBuffer(disp, fn) SET_by_offset(disp, _gloffset_FeedbackBuffer, fn)
+#define CALL_SelectBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_SelectBuffer, parameters)
+#define GET_SelectBuffer(disp) GET_by_offset(disp, _gloffset_SelectBuffer)
+#define SET_SelectBuffer(disp, fn) SET_by_offset(disp, _gloffset_SelectBuffer, fn)
+#define CALL_RenderMode(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLenum)), _gloffset_RenderMode, parameters)
+#define GET_RenderMode(disp) GET_by_offset(disp, _gloffset_RenderMode)
+#define SET_RenderMode(disp, fn) SET_by_offset(disp, _gloffset_RenderMode, fn)
+#define CALL_InitNames(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_InitNames, parameters)
+#define GET_InitNames(disp) GET_by_offset(disp, _gloffset_InitNames)
+#define SET_InitNames(disp, fn) SET_by_offset(disp, _gloffset_InitNames, fn)
+#define CALL_LoadName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_LoadName, parameters)
+#define GET_LoadName(disp) GET_by_offset(disp, _gloffset_LoadName)
+#define SET_LoadName(disp, fn) SET_by_offset(disp, _gloffset_LoadName, fn)
+#define CALL_PassThrough(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PassThrough, parameters)
+#define GET_PassThrough(disp) GET_by_offset(disp, _gloffset_PassThrough)
+#define SET_PassThrough(disp, fn) SET_by_offset(disp, _gloffset_PassThrough, fn)
+#define CALL_PopName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopName, parameters)
+#define GET_PopName(disp) GET_by_offset(disp, _gloffset_PopName)
+#define SET_PopName(disp, fn) SET_by_offset(disp, _gloffset_PopName, fn)
+#define CALL_PushName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PushName, parameters)
+#define GET_PushName(disp) GET_by_offset(disp, _gloffset_PushName)
+#define SET_PushName(disp, fn) SET_by_offset(disp, _gloffset_PushName, fn)
+#define CALL_DrawBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DrawBuffer, parameters)
+#define GET_DrawBuffer(disp) GET_by_offset(disp, _gloffset_DrawBuffer)
+#define SET_DrawBuffer(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffer, fn)
+#define CALL_Clear(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_Clear, parameters)
+#define GET_Clear(disp) GET_by_offset(disp, _gloffset_Clear)
+#define SET_Clear(disp, fn) SET_by_offset(disp, _gloffset_Clear, fn)
+#define CALL_ClearAccum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ClearAccum, parameters)
+#define GET_ClearAccum(disp) GET_by_offset(disp, _gloffset_ClearAccum)
+#define SET_ClearAccum(disp, fn) SET_by_offset(disp, _gloffset_ClearAccum, fn)
+#define CALL_ClearIndex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_ClearIndex, parameters)
+#define GET_ClearIndex(disp) GET_by_offset(disp, _gloffset_ClearIndex)
+#define SET_ClearIndex(disp, fn) SET_by_offset(disp, _gloffset_ClearIndex, fn)
+#define CALL_ClearColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_ClearColor, parameters)
+#define GET_ClearColor(disp) GET_by_offset(disp, _gloffset_ClearColor)
+#define SET_ClearColor(disp, fn) SET_by_offset(disp, _gloffset_ClearColor, fn)
+#define CALL_ClearStencil(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ClearStencil, parameters)
+#define GET_ClearStencil(disp) GET_by_offset(disp, _gloffset_ClearStencil)
+#define SET_ClearStencil(disp, fn) SET_by_offset(disp, _gloffset_ClearStencil, fn)
+#define CALL_ClearDepth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd)), _gloffset_ClearDepth, parameters)
+#define GET_ClearDepth(disp) GET_by_offset(disp, _gloffset_ClearDepth)
+#define SET_ClearDepth(disp, fn) SET_by_offset(disp, _gloffset_ClearDepth, fn)
+#define CALL_StencilMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_StencilMask, parameters)
+#define GET_StencilMask(disp) GET_by_offset(disp, _gloffset_StencilMask)
+#define SET_StencilMask(disp, fn) SET_by_offset(disp, _gloffset_StencilMask, fn)
+#define CALL_ColorMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMask, parameters)
+#define GET_ColorMask(disp) GET_by_offset(disp, _gloffset_ColorMask)
+#define SET_ColorMask(disp, fn) SET_by_offset(disp, _gloffset_ColorMask, fn)
+#define CALL_DepthMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_DepthMask, parameters)
+#define GET_DepthMask(disp) GET_by_offset(disp, _gloffset_DepthMask)
+#define SET_DepthMask(disp, fn) SET_by_offset(disp, _gloffset_DepthMask, fn)
+#define CALL_IndexMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_IndexMask, parameters)
+#define GET_IndexMask(disp) GET_by_offset(disp, _gloffset_IndexMask)
+#define SET_IndexMask(disp, fn) SET_by_offset(disp, _gloffset_IndexMask, fn)
+#define CALL_Accum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Accum, parameters)
+#define GET_Accum(disp) GET_by_offset(disp, _gloffset_Accum)
+#define SET_Accum(disp, fn) SET_by_offset(disp, _gloffset_Accum, fn)
+#define CALL_Disable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Disable, parameters)
+#define GET_Disable(disp) GET_by_offset(disp, _gloffset_Disable)
+#define SET_Disable(disp, fn) SET_by_offset(disp, _gloffset_Disable, fn)
+#define CALL_Enable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Enable, parameters)
+#define GET_Enable(disp) GET_by_offset(disp, _gloffset_Enable)
+#define SET_Enable(disp, fn) SET_by_offset(disp, _gloffset_Enable, fn)
+#define CALL_Finish(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Finish, parameters)
+#define GET_Finish(disp) GET_by_offset(disp, _gloffset_Finish)
+#define SET_Finish(disp, fn) SET_by_offset(disp, _gloffset_Finish, fn)
+#define CALL_Flush(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Flush, parameters)
+#define GET_Flush(disp) GET_by_offset(disp, _gloffset_Flush)
+#define SET_Flush(disp, fn) SET_by_offset(disp, _gloffset_Flush, fn)
+#define CALL_PopAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopAttrib, parameters)
+#define GET_PopAttrib(disp) GET_by_offset(disp, _gloffset_PopAttrib)
+#define SET_PopAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopAttrib, fn)
+#define CALL_PushAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushAttrib, parameters)
+#define GET_PushAttrib(disp) GET_by_offset(disp, _gloffset_PushAttrib)
+#define SET_PushAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushAttrib, fn)
+#define CALL_Map1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map1d, parameters)
+#define GET_Map1d(disp) GET_by_offset(disp, _gloffset_Map1d)
+#define SET_Map1d(disp, fn) SET_by_offset(disp, _gloffset_Map1d, fn)
+#define CALL_Map1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map1f, parameters)
+#define GET_Map1f(disp) GET_by_offset(disp, _gloffset_Map1f)
+#define SET_Map1f(disp, fn) SET_by_offset(disp, _gloffset_Map1f, fn)
+#define CALL_Map2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map2d, parameters)
+#define GET_Map2d(disp) GET_by_offset(disp, _gloffset_Map2d)
+#define SET_Map2d(disp, fn) SET_by_offset(disp, _gloffset_Map2d, fn)
+#define CALL_Map2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map2f, parameters)
+#define GET_Map2f(disp) GET_by_offset(disp, _gloffset_Map2f)
+#define SET_Map2f(disp, fn) SET_by_offset(disp, _gloffset_Map2f, fn)
+#define CALL_MapGrid1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble)), _gloffset_MapGrid1d, parameters)
+#define GET_MapGrid1d(disp) GET_by_offset(disp, _gloffset_MapGrid1d)
+#define SET_MapGrid1d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1d, fn)
+#define CALL_MapGrid1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_MapGrid1f, parameters)
+#define GET_MapGrid1f(disp) GET_by_offset(disp, _gloffset_MapGrid1f)
+#define SET_MapGrid1f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1f, fn)
+#define CALL_MapGrid2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble)), _gloffset_MapGrid2d, parameters)
+#define GET_MapGrid2d(disp) GET_by_offset(disp, _gloffset_MapGrid2d)
+#define SET_MapGrid2d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2d, fn)
+#define CALL_MapGrid2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat)), _gloffset_MapGrid2f, parameters)
+#define GET_MapGrid2f(disp) GET_by_offset(disp, _gloffset_MapGrid2f)
+#define SET_MapGrid2f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2f, fn)
+#define CALL_EvalCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_EvalCoord1d, parameters)
+#define GET_EvalCoord1d(disp) GET_by_offset(disp, _gloffset_EvalCoord1d)
+#define SET_EvalCoord1d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1d, fn)
+#define CALL_EvalCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord1dv, parameters)
+#define GET_EvalCoord1dv(disp) GET_by_offset(disp, _gloffset_EvalCoord1dv)
+#define SET_EvalCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1dv, fn)
+#define CALL_EvalCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_EvalCoord1f, parameters)
+#define GET_EvalCoord1f(disp) GET_by_offset(disp, _gloffset_EvalCoord1f)
+#define SET_EvalCoord1f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1f, fn)
+#define CALL_EvalCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord1fv, parameters)
+#define GET_EvalCoord1fv(disp) GET_by_offset(disp, _gloffset_EvalCoord1fv)
+#define SET_EvalCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1fv, fn)
+#define CALL_EvalCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_EvalCoord2d, parameters)
+#define GET_EvalCoord2d(disp) GET_by_offset(disp, _gloffset_EvalCoord2d)
+#define SET_EvalCoord2d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2d, fn)
+#define CALL_EvalCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord2dv, parameters)
+#define GET_EvalCoord2dv(disp) GET_by_offset(disp, _gloffset_EvalCoord2dv)
+#define SET_EvalCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2dv, fn)
+#define CALL_EvalCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_EvalCoord2f, parameters)
+#define GET_EvalCoord2f(disp) GET_by_offset(disp, _gloffset_EvalCoord2f)
+#define SET_EvalCoord2f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2f, fn)
+#define CALL_EvalCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord2fv, parameters)
+#define GET_EvalCoord2fv(disp) GET_by_offset(disp, _gloffset_EvalCoord2fv)
+#define SET_EvalCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2fv, fn)
+#define CALL_EvalMesh1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_EvalMesh1, parameters)
+#define GET_EvalMesh1(disp) GET_by_offset(disp, _gloffset_EvalMesh1)
+#define SET_EvalMesh1(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh1, fn)
+#define CALL_EvalPoint1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_EvalPoint1, parameters)
+#define GET_EvalPoint1(disp) GET_by_offset(disp, _gloffset_EvalPoint1)
+#define SET_EvalPoint1(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint1, fn)
+#define CALL_EvalMesh2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_EvalMesh2, parameters)
+#define GET_EvalMesh2(disp) GET_by_offset(disp, _gloffset_EvalMesh2)
+#define SET_EvalMesh2(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh2, fn)
+#define CALL_EvalPoint2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_EvalPoint2, parameters)
+#define GET_EvalPoint2(disp) GET_by_offset(disp, _gloffset_EvalPoint2)
+#define SET_EvalPoint2(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint2, fn)
+#define CALL_AlphaFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLclampf)), _gloffset_AlphaFunc, parameters)
+#define GET_AlphaFunc(disp) GET_by_offset(disp, _gloffset_AlphaFunc)
+#define SET_AlphaFunc(disp, fn) SET_by_offset(disp, _gloffset_AlphaFunc, fn)
+#define CALL_BlendFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendFunc, parameters)
+#define GET_BlendFunc(disp) GET_by_offset(disp, _gloffset_BlendFunc)
+#define SET_BlendFunc(disp, fn) SET_by_offset(disp, _gloffset_BlendFunc, fn)
+#define CALL_LogicOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_LogicOp, parameters)
+#define GET_LogicOp(disp) GET_by_offset(disp, _gloffset_LogicOp)
+#define SET_LogicOp(disp, fn) SET_by_offset(disp, _gloffset_LogicOp, fn)
+#define CALL_StencilFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLuint)), _gloffset_StencilFunc, parameters)
+#define GET_StencilFunc(disp) GET_by_offset(disp, _gloffset_StencilFunc)
+#define SET_StencilFunc(disp, fn) SET_by_offset(disp, _gloffset_StencilFunc, fn)
+#define CALL_StencilOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum)), _gloffset_StencilOp, parameters)
+#define GET_StencilOp(disp) GET_by_offset(disp, _gloffset_StencilOp)
+#define SET_StencilOp(disp, fn) SET_by_offset(disp, _gloffset_StencilOp, fn)
+#define CALL_DepthFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DepthFunc, parameters)
+#define GET_DepthFunc(disp) GET_by_offset(disp, _gloffset_DepthFunc)
+#define SET_DepthFunc(disp, fn) SET_by_offset(disp, _gloffset_DepthFunc, fn)
+#define CALL_PixelZoom(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PixelZoom, parameters)
+#define GET_PixelZoom(disp) GET_by_offset(disp, _gloffset_PixelZoom)
+#define SET_PixelZoom(disp, fn) SET_by_offset(disp, _gloffset_PixelZoom, fn)
+#define CALL_PixelTransferf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTransferf, parameters)
+#define GET_PixelTransferf(disp) GET_by_offset(disp, _gloffset_PixelTransferf)
+#define SET_PixelTransferf(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferf, fn)
+#define CALL_PixelTransferi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTransferi, parameters)
+#define GET_PixelTransferi(disp) GET_by_offset(disp, _gloffset_PixelTransferi)
+#define SET_PixelTransferi(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferi, fn)
+#define CALL_PixelStoref(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelStoref, parameters)
+#define GET_PixelStoref(disp) GET_by_offset(disp, _gloffset_PixelStoref)
+#define SET_PixelStoref(disp, fn) SET_by_offset(disp, _gloffset_PixelStoref, fn)
+#define CALL_PixelStorei(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelStorei, parameters)
+#define GET_PixelStorei(disp) GET_by_offset(disp, _gloffset_PixelStorei)
+#define SET_PixelStorei(disp, fn) SET_by_offset(disp, _gloffset_PixelStorei, fn)
+#define CALL_PixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLfloat *)), _gloffset_PixelMapfv, parameters)
+#define GET_PixelMapfv(disp) GET_by_offset(disp, _gloffset_PixelMapfv)
+#define SET_PixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapfv, fn)
+#define CALL_PixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLuint *)), _gloffset_PixelMapuiv, parameters)
+#define GET_PixelMapuiv(disp) GET_by_offset(disp, _gloffset_PixelMapuiv)
+#define SET_PixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapuiv, fn)
+#define CALL_PixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLushort *)), _gloffset_PixelMapusv, parameters)
+#define GET_PixelMapusv(disp) GET_by_offset(disp, _gloffset_PixelMapusv)
+#define SET_PixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapusv, fn)
+#define CALL_ReadBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ReadBuffer, parameters)
+#define GET_ReadBuffer(disp) GET_by_offset(disp, _gloffset_ReadBuffer)
+#define SET_ReadBuffer(disp, fn) SET_by_offset(disp, _gloffset_ReadBuffer, fn)
+#define CALL_CopyPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum)), _gloffset_CopyPixels, parameters)
+#define GET_CopyPixels(disp) GET_by_offset(disp, _gloffset_CopyPixels)
+#define SET_CopyPixels(disp, fn) SET_by_offset(disp, _gloffset_CopyPixels, fn)
+#define CALL_ReadPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)), _gloffset_ReadPixels, parameters)
+#define GET_ReadPixels(disp) GET_by_offset(disp, _gloffset_ReadPixels)
+#define SET_ReadPixels(disp, fn) SET_by_offset(disp, _gloffset_ReadPixels, fn)
+#define CALL_DrawPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_DrawPixels, parameters)
+#define GET_DrawPixels(disp) GET_by_offset(disp, _gloffset_DrawPixels)
+#define SET_DrawPixels(disp, fn) SET_by_offset(disp, _gloffset_DrawPixels, fn)
+#define CALL_GetBooleanv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean *)), _gloffset_GetBooleanv, parameters)
+#define GET_GetBooleanv(disp) GET_by_offset(disp, _gloffset_GetBooleanv)
+#define SET_GetBooleanv(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanv, fn)
+#define CALL_GetClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetClipPlane, parameters)
+#define GET_GetClipPlane(disp) GET_by_offset(disp, _gloffset_GetClipPlane)
+#define SET_GetClipPlane(disp, fn) SET_by_offset(disp, _gloffset_GetClipPlane, fn)
+#define CALL_GetDoublev(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetDoublev, parameters)
+#define GET_GetDoublev(disp) GET_by_offset(disp, _gloffset_GetDoublev)
+#define SET_GetDoublev(disp, fn) SET_by_offset(disp, _gloffset_GetDoublev, fn)
+#define CALL_GetError(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(void)), _gloffset_GetError, parameters)
+#define GET_GetError(disp) GET_by_offset(disp, _gloffset_GetError)
+#define SET_GetError(disp, fn) SET_by_offset(disp, _gloffset_GetError, fn)
+#define CALL_GetFloatv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetFloatv, parameters)
+#define GET_GetFloatv(disp) GET_by_offset(disp, _gloffset_GetFloatv)
+#define SET_GetFloatv(disp, fn) SET_by_offset(disp, _gloffset_GetFloatv, fn)
+#define CALL_GetIntegerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetIntegerv, parameters)
+#define GET_GetIntegerv(disp) GET_by_offset(disp, _gloffset_GetIntegerv)
+#define SET_GetIntegerv(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerv, fn)
+#define CALL_GetLightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetLightfv, parameters)
+#define GET_GetLightfv(disp) GET_by_offset(disp, _gloffset_GetLightfv)
+#define SET_GetLightfv(disp, fn) SET_by_offset(disp, _gloffset_GetLightfv, fn)
+#define CALL_GetLightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetLightiv, parameters)
+#define GET_GetLightiv(disp) GET_by_offset(disp, _gloffset_GetLightiv)
+#define SET_GetLightiv(disp, fn) SET_by_offset(disp, _gloffset_GetLightiv, fn)
+#define CALL_GetMapdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetMapdv, parameters)
+#define GET_GetMapdv(disp) GET_by_offset(disp, _gloffset_GetMapdv)
+#define SET_GetMapdv(disp, fn) SET_by_offset(disp, _gloffset_GetMapdv, fn)
+#define CALL_GetMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMapfv, parameters)
+#define GET_GetMapfv(disp) GET_by_offset(disp, _gloffset_GetMapfv)
+#define SET_GetMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetMapfv, fn)
+#define CALL_GetMapiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMapiv, parameters)
+#define GET_GetMapiv(disp) GET_by_offset(disp, _gloffset_GetMapiv)
+#define SET_GetMapiv(disp, fn) SET_by_offset(disp, _gloffset_GetMapiv, fn)
+#define CALL_GetMaterialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMaterialfv, parameters)
+#define GET_GetMaterialfv(disp) GET_by_offset(disp, _gloffset_GetMaterialfv)
+#define SET_GetMaterialfv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialfv, fn)
+#define CALL_GetMaterialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMaterialiv, parameters)
+#define GET_GetMaterialiv(disp) GET_by_offset(disp, _gloffset_GetMaterialiv)
+#define SET_GetMaterialiv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialiv, fn)
+#define CALL_GetPixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelMapfv, parameters)
+#define GET_GetPixelMapfv(disp) GET_by_offset(disp, _gloffset_GetPixelMapfv)
+#define SET_GetPixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapfv, fn)
+#define CALL_GetPixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint *)), _gloffset_GetPixelMapuiv, parameters)
+#define GET_GetPixelMapuiv(disp) GET_by_offset(disp, _gloffset_GetPixelMapuiv)
+#define SET_GetPixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapuiv, fn)
+#define CALL_GetPixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLushort *)), _gloffset_GetPixelMapusv, parameters)
+#define GET_GetPixelMapusv(disp) GET_by_offset(disp, _gloffset_GetPixelMapusv)
+#define SET_GetPixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapusv, fn)
+#define CALL_GetPolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte *)), _gloffset_GetPolygonStipple, parameters)
+#define GET_GetPolygonStipple(disp) GET_by_offset(disp, _gloffset_GetPolygonStipple)
+#define SET_GetPolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_GetPolygonStipple, fn)
+#define CALL_GetString(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum)), _gloffset_GetString, parameters)
+#define GET_GetString(disp) GET_by_offset(disp, _gloffset_GetString)
+#define SET_GetString(disp, fn) SET_by_offset(disp, _gloffset_GetString, fn)
+#define CALL_GetTexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexEnvfv, parameters)
+#define GET_GetTexEnvfv(disp) GET_by_offset(disp, _gloffset_GetTexEnvfv)
+#define SET_GetTexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnvfv, fn)
+#define CALL_GetTexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexEnviv, parameters)
+#define GET_GetTexEnviv(disp) GET_by_offset(disp, _gloffset_GetTexEnviv)
+#define SET_GetTexEnviv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnviv, fn)
+#define CALL_GetTexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetTexGendv, parameters)
+#define GET_GetTexGendv(disp) GET_by_offset(disp, _gloffset_GetTexGendv)
+#define SET_GetTexGendv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGendv, fn)
+#define CALL_GetTexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexGenfv, parameters)
+#define GET_GetTexGenfv(disp) GET_by_offset(disp, _gloffset_GetTexGenfv)
+#define SET_GetTexGenfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGenfv, fn)
+#define CALL_GetTexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexGeniv, parameters)
+#define GET_GetTexGeniv(disp) GET_by_offset(disp, _gloffset_GetTexGeniv)
+#define SET_GetTexGeniv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGeniv, fn)
+#define CALL_GetTexImage(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLenum, GLvoid *)), _gloffset_GetTexImage, parameters)
+#define GET_GetTexImage(disp) GET_by_offset(disp, _gloffset_GetTexImage)
+#define SET_GetTexImage(disp, fn) SET_by_offset(disp, _gloffset_GetTexImage, fn)
+#define CALL_GetTexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexParameterfv, parameters)
+#define GET_GetTexParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexParameterfv)
+#define SET_GetTexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterfv, fn)
+#define CALL_GetTexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameteriv, parameters)
+#define GET_GetTexParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexParameteriv)
+#define SET_GetTexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameteriv, fn)
+#define CALL_GetTexLevelParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLfloat *)), _gloffset_GetTexLevelParameterfv, parameters)
+#define GET_GetTexLevelParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameterfv)
+#define SET_GetTexLevelParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameterfv, fn)
+#define CALL_GetTexLevelParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint *)), _gloffset_GetTexLevelParameteriv, parameters)
+#define GET_GetTexLevelParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameteriv)
+#define SET_GetTexLevelParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameteriv, fn)
+#define CALL_IsEnabled(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_IsEnabled, parameters)
+#define GET_IsEnabled(disp) GET_by_offset(disp, _gloffset_IsEnabled)
+#define SET_IsEnabled(disp, fn) SET_by_offset(disp, _gloffset_IsEnabled, fn)
+#define CALL_IsList(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsList, parameters)
+#define GET_IsList(disp) GET_by_offset(disp, _gloffset_IsList)
+#define SET_IsList(disp, fn) SET_by_offset(disp, _gloffset_IsList, fn)
+#define CALL_DepthRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthRange, parameters)
+#define GET_DepthRange(disp) GET_by_offset(disp, _gloffset_DepthRange)
+#define SET_DepthRange(disp, fn) SET_by_offset(disp, _gloffset_DepthRange, fn)
+#define CALL_Frustum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Frustum, parameters)
+#define GET_Frustum(disp) GET_by_offset(disp, _gloffset_Frustum)
+#define SET_Frustum(disp, fn) SET_by_offset(disp, _gloffset_Frustum, fn)
+#define CALL_LoadIdentity(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_LoadIdentity, parameters)
+#define GET_LoadIdentity(disp) GET_by_offset(disp, _gloffset_LoadIdentity)
+#define SET_LoadIdentity(disp, fn) SET_by_offset(disp, _gloffset_LoadIdentity, fn)
+#define CALL_LoadMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadMatrixf, parameters)
+#define GET_LoadMatrixf(disp) GET_by_offset(disp, _gloffset_LoadMatrixf)
+#define SET_LoadMatrixf(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixf, fn)
+#define CALL_LoadMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadMatrixd, parameters)
+#define GET_LoadMatrixd(disp) GET_by_offset(disp, _gloffset_LoadMatrixd)
+#define SET_LoadMatrixd(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixd, fn)
+#define CALL_MatrixMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_MatrixMode, parameters)
+#define GET_MatrixMode(disp) GET_by_offset(disp, _gloffset_MatrixMode)
+#define SET_MatrixMode(disp, fn) SET_by_offset(disp, _gloffset_MatrixMode, fn)
+#define CALL_MultMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultMatrixf, parameters)
+#define GET_MultMatrixf(disp) GET_by_offset(disp, _gloffset_MultMatrixf)
+#define SET_MultMatrixf(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixf, fn)
+#define CALL_MultMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultMatrixd, parameters)
+#define GET_MultMatrixd(disp) GET_by_offset(disp, _gloffset_MultMatrixd)
+#define SET_MultMatrixd(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixd, fn)
+#define CALL_Ortho(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Ortho, parameters)
+#define GET_Ortho(disp) GET_by_offset(disp, _gloffset_Ortho)
+#define SET_Ortho(disp, fn) SET_by_offset(disp, _gloffset_Ortho, fn)
+#define CALL_PopMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopMatrix, parameters)
+#define GET_PopMatrix(disp) GET_by_offset(disp, _gloffset_PopMatrix)
+#define SET_PopMatrix(disp, fn) SET_by_offset(disp, _gloffset_PopMatrix, fn)
+#define CALL_PushMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PushMatrix, parameters)
+#define GET_PushMatrix(disp) GET_by_offset(disp, _gloffset_PushMatrix)
+#define SET_PushMatrix(disp, fn) SET_by_offset(disp, _gloffset_PushMatrix, fn)
+#define CALL_Rotated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rotated, parameters)
+#define GET_Rotated(disp) GET_by_offset(disp, _gloffset_Rotated)
+#define SET_Rotated(disp, fn) SET_by_offset(disp, _gloffset_Rotated, fn)
+#define CALL_Rotatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rotatef, parameters)
+#define GET_Rotatef(disp) GET_by_offset(disp, _gloffset_Rotatef)
+#define SET_Rotatef(disp, fn) SET_by_offset(disp, _gloffset_Rotatef, fn)
+#define CALL_Scaled(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Scaled, parameters)
+#define GET_Scaled(disp) GET_by_offset(disp, _gloffset_Scaled)
+#define SET_Scaled(disp, fn) SET_by_offset(disp, _gloffset_Scaled, fn)
+#define CALL_Scalef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Scalef, parameters)
+#define GET_Scalef(disp) GET_by_offset(disp, _gloffset_Scalef)
+#define SET_Scalef(disp, fn) SET_by_offset(disp, _gloffset_Scalef, fn)
+#define CALL_Translated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Translated, parameters)
+#define GET_Translated(disp) GET_by_offset(disp, _gloffset_Translated)
+#define SET_Translated(disp, fn) SET_by_offset(disp, _gloffset_Translated, fn)
+#define CALL_Translatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Translatef, parameters)
+#define GET_Translatef(disp) GET_by_offset(disp, _gloffset_Translatef)
+#define SET_Translatef(disp, fn) SET_by_offset(disp, _gloffset_Translatef, fn)
+#define CALL_Viewport(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Viewport, parameters)
+#define GET_Viewport(disp) GET_by_offset(disp, _gloffset_Viewport)
+#define SET_Viewport(disp, fn) SET_by_offset(disp, _gloffset_Viewport, fn)
+#define CALL_ArrayElement(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ArrayElement, parameters)
+#define GET_ArrayElement(disp) GET_by_offset(disp, _gloffset_ArrayElement)
+#define SET_ArrayElement(disp, fn) SET_by_offset(disp, _gloffset_ArrayElement, fn)
+#define CALL_BindTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTexture, parameters)
+#define GET_BindTexture(disp) GET_by_offset(disp, _gloffset_BindTexture)
+#define SET_BindTexture(disp, fn) SET_by_offset(disp, _gloffset_BindTexture, fn)
+#define CALL_ColorPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_ColorPointer, parameters)
+#define GET_ColorPointer(disp) GET_by_offset(disp, _gloffset_ColorPointer)
+#define SET_ColorPointer(disp, fn) SET_by_offset(disp, _gloffset_ColorPointer, fn)
+#define CALL_DisableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DisableClientState, parameters)
+#define GET_DisableClientState(disp) GET_by_offset(disp, _gloffset_DisableClientState)
+#define SET_DisableClientState(disp, fn) SET_by_offset(disp, _gloffset_DisableClientState, fn)
+#define CALL_DrawArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei)), _gloffset_DrawArrays, parameters)
+#define GET_DrawArrays(disp) GET_by_offset(disp, _gloffset_DrawArrays)
+#define SET_DrawArrays(disp, fn) SET_by_offset(disp, _gloffset_DrawArrays, fn)
+#define CALL_DrawElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawElements, parameters)
+#define GET_DrawElements(disp) GET_by_offset(disp, _gloffset_DrawElements)
+#define SET_DrawElements(disp, fn) SET_by_offset(disp, _gloffset_DrawElements, fn)
+#define CALL_EdgeFlagPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_EdgeFlagPointer, parameters)
+#define GET_EdgeFlagPointer(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointer)
+#define SET_EdgeFlagPointer(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointer, fn)
+#define CALL_EnableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EnableClientState, parameters)
+#define GET_EnableClientState(disp) GET_by_offset(disp, _gloffset_EnableClientState)
+#define SET_EnableClientState(disp, fn) SET_by_offset(disp, _gloffset_EnableClientState, fn)
+#define CALL_IndexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_IndexPointer, parameters)
+#define GET_IndexPointer(disp) GET_by_offset(disp, _gloffset_IndexPointer)
+#define SET_IndexPointer(disp, fn) SET_by_offset(disp, _gloffset_IndexPointer, fn)
+#define CALL_Indexub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte)), _gloffset_Indexub, parameters)
+#define GET_Indexub(disp) GET_by_offset(disp, _gloffset_Indexub)
+#define SET_Indexub(disp, fn) SET_by_offset(disp, _gloffset_Indexub, fn)
+#define CALL_Indexubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Indexubv, parameters)
+#define GET_Indexubv(disp) GET_by_offset(disp, _gloffset_Indexubv)
+#define SET_Indexubv(disp, fn) SET_by_offset(disp, _gloffset_Indexubv, fn)
+#define CALL_InterleavedArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_InterleavedArrays, parameters)
+#define GET_InterleavedArrays(disp) GET_by_offset(disp, _gloffset_InterleavedArrays)
+#define SET_InterleavedArrays(disp, fn) SET_by_offset(disp, _gloffset_InterleavedArrays, fn)
+#define CALL_NormalPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_NormalPointer, parameters)
+#define GET_NormalPointer(disp) GET_by_offset(disp, _gloffset_NormalPointer)
+#define SET_NormalPointer(disp, fn) SET_by_offset(disp, _gloffset_NormalPointer, fn)
+#define CALL_PolygonOffset(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffset, parameters)
+#define GET_PolygonOffset(disp) GET_by_offset(disp, _gloffset_PolygonOffset)
+#define SET_PolygonOffset(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffset, fn)
+#define CALL_TexCoordPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_TexCoordPointer, parameters)
+#define GET_TexCoordPointer(disp) GET_by_offset(disp, _gloffset_TexCoordPointer)
+#define SET_TexCoordPointer(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointer, fn)
+#define CALL_VertexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexPointer, parameters)
+#define GET_VertexPointer(disp) GET_by_offset(disp, _gloffset_VertexPointer)
+#define SET_VertexPointer(disp, fn) SET_by_offset(disp, _gloffset_VertexPointer, fn)
+#define CALL_AreTexturesResident(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreTexturesResident, parameters)
+#define GET_AreTexturesResident(disp) GET_by_offset(disp, _gloffset_AreTexturesResident)
+#define SET_AreTexturesResident(disp, fn) SET_by_offset(disp, _gloffset_AreTexturesResident, fn)
+#define CALL_CopyTexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)), _gloffset_CopyTexImage1D, parameters)
+#define GET_CopyTexImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexImage1D)
+#define SET_CopyTexImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage1D, fn)
+#define CALL_CopyTexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)), _gloffset_CopyTexImage2D, parameters)
+#define GET_CopyTexImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexImage2D)
+#define SET_CopyTexImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage2D, fn)
+#define CALL_CopyTexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei)), _gloffset_CopyTexSubImage1D, parameters)
+#define GET_CopyTexSubImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage1D)
+#define SET_CopyTexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage1D, fn)
+#define CALL_CopyTexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage2D, parameters)
+#define GET_CopyTexSubImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage2D)
+#define SET_CopyTexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage2D, fn)
+#define CALL_DeleteTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTextures, parameters)
+#define GET_DeleteTextures(disp) GET_by_offset(disp, _gloffset_DeleteTextures)
+#define SET_DeleteTextures(disp, fn) SET_by_offset(disp, _gloffset_DeleteTextures, fn)
+#define CALL_GenTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTextures, parameters)
+#define GET_GenTextures(disp) GET_by_offset(disp, _gloffset_GenTextures)
+#define SET_GenTextures(disp, fn) SET_by_offset(disp, _gloffset_GenTextures, fn)
+#define CALL_GetPointerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid **)), _gloffset_GetPointerv, parameters)
+#define GET_GetPointerv(disp) GET_by_offset(disp, _gloffset_GetPointerv)
+#define SET_GetPointerv(disp, fn) SET_by_offset(disp, _gloffset_GetPointerv, fn)
+#define CALL_IsTexture(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTexture, parameters)
+#define GET_IsTexture(disp) GET_by_offset(disp, _gloffset_IsTexture)
+#define SET_IsTexture(disp, fn) SET_by_offset(disp, _gloffset_IsTexture, fn)
+#define CALL_PrioritizeTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, const GLclampf *)), _gloffset_PrioritizeTextures, parameters)
+#define GET_PrioritizeTextures(disp) GET_by_offset(disp, _gloffset_PrioritizeTextures)
+#define SET_PrioritizeTextures(disp, fn) SET_by_offset(disp, _gloffset_PrioritizeTextures, fn)
+#define CALL_TexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage1D, parameters)
+#define GET_TexSubImage1D(disp) GET_by_offset(disp, _gloffset_TexSubImage1D)
+#define SET_TexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage1D, fn)
+#define CALL_TexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage2D, parameters)
+#define GET_TexSubImage2D(disp) GET_by_offset(disp, _gloffset_TexSubImage2D)
+#define SET_TexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage2D, fn)
+#define CALL_PopClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopClientAttrib, parameters)
+#define GET_PopClientAttrib(disp) GET_by_offset(disp, _gloffset_PopClientAttrib)
+#define SET_PopClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopClientAttrib, fn)
+#define CALL_PushClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushClientAttrib, parameters)
+#define GET_PushClientAttrib(disp) GET_by_offset(disp, _gloffset_PushClientAttrib)
+#define SET_PushClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushClientAttrib, fn)
+#define CALL_BlendColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_BlendColor, parameters)
+#define GET_BlendColor(disp) GET_by_offset(disp, _gloffset_BlendColor)
+#define SET_BlendColor(disp, fn) SET_by_offset(disp, _gloffset_BlendColor, fn)
+#define CALL_BlendEquation(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BlendEquation, parameters)
+#define GET_BlendEquation(disp) GET_by_offset(disp, _gloffset_BlendEquation)
+#define SET_BlendEquation(disp, fn) SET_by_offset(disp, _gloffset_BlendEquation, fn)
+#define CALL_DrawRangeElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawRangeElements, parameters)
+#define GET_DrawRangeElements(disp) GET_by_offset(disp, _gloffset_DrawRangeElements)
+#define SET_DrawRangeElements(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElements, fn)
+#define CALL_ColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorTable, parameters)
+#define GET_ColorTable(disp) GET_by_offset(disp, _gloffset_ColorTable)
+#define SET_ColorTable(disp, fn) SET_by_offset(disp, _gloffset_ColorTable, fn)
+#define CALL_ColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ColorTableParameterfv, parameters)
+#define GET_ColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_ColorTableParameterfv)
+#define SET_ColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameterfv, fn)
+#define CALL_ColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ColorTableParameteriv, parameters)
+#define GET_ColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_ColorTableParameteriv)
+#define SET_ColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameteriv, fn)
+#define CALL_CopyColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyColorTable, parameters)
+#define GET_CopyColorTable(disp) GET_by_offset(disp, _gloffset_CopyColorTable)
+#define SET_CopyColorTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorTable, fn)
+#define CALL_GetColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetColorTable, parameters)
+#define GET_GetColorTable(disp) GET_by_offset(disp, _gloffset_GetColorTable)
+#define SET_GetColorTable(disp, fn) SET_by_offset(disp, _gloffset_GetColorTable, fn)
+#define CALL_GetColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetColorTableParameterfv, parameters)
+#define GET_GetColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameterfv)
+#define SET_GetColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameterfv, fn)
+#define CALL_GetColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetColorTableParameteriv, parameters)
+#define GET_GetColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameteriv)
+#define SET_GetColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameteriv, fn)
+#define CALL_ColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorSubTable, parameters)
+#define GET_ColorSubTable(disp) GET_by_offset(disp, _gloffset_ColorSubTable)
+#define SET_ColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_ColorSubTable, fn)
+#define CALL_CopyColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLint, GLint, GLsizei)), _gloffset_CopyColorSubTable, parameters)
+#define GET_CopyColorSubTable(disp) GET_by_offset(disp, _gloffset_CopyColorSubTable)
+#define SET_CopyColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorSubTable, fn)
+#define CALL_ConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter1D, parameters)
+#define GET_ConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter1D)
+#define SET_ConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter1D, fn)
+#define CALL_ConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter2D, parameters)
+#define GET_ConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter2D)
+#define SET_ConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter2D, fn)
+#define CALL_ConvolutionParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_ConvolutionParameterf, parameters)
+#define GET_ConvolutionParameterf(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterf)
+#define SET_ConvolutionParameterf(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterf, fn)
+#define CALL_ConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ConvolutionParameterfv, parameters)
+#define GET_ConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterfv)
+#define SET_ConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterfv, fn)
+#define CALL_ConvolutionParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_ConvolutionParameteri, parameters)
+#define GET_ConvolutionParameteri(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteri)
+#define SET_ConvolutionParameteri(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteri, fn)
+#define CALL_ConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ConvolutionParameteriv, parameters)
+#define GET_ConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteriv)
+#define SET_ConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteriv, fn)
+#define CALL_CopyConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyConvolutionFilter1D, parameters)
+#define GET_CopyConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter1D)
+#define SET_CopyConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter1D, fn)
+#define CALL_CopyConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyConvolutionFilter2D, parameters)
+#define GET_CopyConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter2D)
+#define SET_CopyConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter2D, fn)
+#define CALL_GetConvolutionFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetConvolutionFilter, parameters)
+#define GET_GetConvolutionFilter(disp) GET_by_offset(disp, _gloffset_GetConvolutionFilter)
+#define SET_GetConvolutionFilter(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionFilter, fn)
+#define CALL_GetConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetConvolutionParameterfv, parameters)
+#define GET_GetConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameterfv)
+#define SET_GetConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameterfv, fn)
+#define CALL_GetConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetConvolutionParameteriv, parameters)
+#define GET_GetConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameteriv)
+#define SET_GetConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameteriv, fn)
+#define CALL_GetSeparableFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)), _gloffset_GetSeparableFilter, parameters)
+#define GET_GetSeparableFilter(disp) GET_by_offset(disp, _gloffset_GetSeparableFilter)
+#define SET_GetSeparableFilter(disp, fn) SET_by_offset(disp, _gloffset_GetSeparableFilter, fn)
+#define CALL_SeparableFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)), _gloffset_SeparableFilter2D, parameters)
+#define GET_SeparableFilter2D(disp) GET_by_offset(disp, _gloffset_SeparableFilter2D)
+#define SET_SeparableFilter2D(disp, fn) SET_by_offset(disp, _gloffset_SeparableFilter2D, fn)
+#define CALL_GetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetHistogram, parameters)
+#define GET_GetHistogram(disp) GET_by_offset(disp, _gloffset_GetHistogram)
+#define SET_GetHistogram(disp, fn) SET_by_offset(disp, _gloffset_GetHistogram, fn)
+#define CALL_GetHistogramParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetHistogramParameterfv, parameters)
+#define GET_GetHistogramParameterfv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameterfv)
+#define SET_GetHistogramParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameterfv, fn)
+#define CALL_GetHistogramParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetHistogramParameteriv, parameters)
+#define GET_GetHistogramParameteriv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameteriv)
+#define SET_GetHistogramParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameteriv, fn)
+#define CALL_GetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetMinmax, parameters)
+#define GET_GetMinmax(disp) GET_by_offset(disp, _gloffset_GetMinmax)
+#define SET_GetMinmax(disp, fn) SET_by_offset(disp, _gloffset_GetMinmax, fn)
+#define CALL_GetMinmaxParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMinmaxParameterfv, parameters)
+#define GET_GetMinmaxParameterfv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameterfv)
+#define SET_GetMinmaxParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameterfv, fn)
+#define CALL_GetMinmaxParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMinmaxParameteriv, parameters)
+#define GET_GetMinmaxParameteriv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameteriv)
+#define SET_GetMinmaxParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameteriv, fn)
+#define CALL_Histogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLboolean)), _gloffset_Histogram, parameters)
+#define GET_Histogram(disp) GET_by_offset(disp, _gloffset_Histogram)
+#define SET_Histogram(disp, fn) SET_by_offset(disp, _gloffset_Histogram, fn)
+#define CALL_Minmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLboolean)), _gloffset_Minmax, parameters)
+#define GET_Minmax(disp) GET_by_offset(disp, _gloffset_Minmax)
+#define SET_Minmax(disp, fn) SET_by_offset(disp, _gloffset_Minmax, fn)
+#define CALL_ResetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetHistogram, parameters)
+#define GET_ResetHistogram(disp) GET_by_offset(disp, _gloffset_ResetHistogram)
+#define SET_ResetHistogram(disp, fn) SET_by_offset(disp, _gloffset_ResetHistogram, fn)
+#define CALL_ResetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetMinmax, parameters)
+#define GET_ResetMinmax(disp) GET_by_offset(disp, _gloffset_ResetMinmax)
+#define SET_ResetMinmax(disp, fn) SET_by_offset(disp, _gloffset_ResetMinmax, fn)
+#define CALL_TexImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage3D, parameters)
+#define GET_TexImage3D(disp) GET_by_offset(disp, _gloffset_TexImage3D)
+#define SET_TexImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexImage3D, fn)
+#define CALL_TexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage3D, parameters)
+#define GET_TexSubImage3D(disp) GET_by_offset(disp, _gloffset_TexSubImage3D)
+#define SET_TexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage3D, fn)
+#define CALL_CopyTexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage3D, parameters)
+#define GET_CopyTexSubImage3D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage3D)
+#define SET_CopyTexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage3D, fn)
+#define CALL_ActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveTextureARB, parameters)
+#define GET_ActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ActiveTextureARB)
+#define SET_ActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ActiveTextureARB, fn)
+#define CALL_ClientActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ClientActiveTextureARB, parameters)
+#define GET_ClientActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ClientActiveTextureARB)
+#define SET_ClientActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ClientActiveTextureARB, fn)
+#define CALL_MultiTexCoord1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble)), _gloffset_MultiTexCoord1dARB, parameters)
+#define GET_MultiTexCoord1dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dARB)
+#define SET_MultiTexCoord1dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dARB, fn)
+#define CALL_MultiTexCoord1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord1dvARB, parameters)
+#define GET_MultiTexCoord1dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dvARB)
+#define SET_MultiTexCoord1dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dvARB, fn)
+#define CALL_MultiTexCoord1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_MultiTexCoord1fARB, parameters)
+#define GET_MultiTexCoord1fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fARB)
+#define SET_MultiTexCoord1fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fARB, fn)
+#define CALL_MultiTexCoord1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord1fvARB, parameters)
+#define GET_MultiTexCoord1fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fvARB)
+#define SET_MultiTexCoord1fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fvARB, fn)
+#define CALL_MultiTexCoord1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_MultiTexCoord1iARB, parameters)
+#define GET_MultiTexCoord1iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1iARB)
+#define SET_MultiTexCoord1iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1iARB, fn)
+#define CALL_MultiTexCoord1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord1ivARB, parameters)
+#define GET_MultiTexCoord1ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1ivARB)
+#define SET_MultiTexCoord1ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1ivARB, fn)
+#define CALL_MultiTexCoord1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort)), _gloffset_MultiTexCoord1sARB, parameters)
+#define GET_MultiTexCoord1sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1sARB)
+#define SET_MultiTexCoord1sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1sARB, fn)
+#define CALL_MultiTexCoord1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord1svARB, parameters)
+#define GET_MultiTexCoord1svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1svARB)
+#define SET_MultiTexCoord1svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1svARB, fn)
+#define CALL_MultiTexCoord2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble)), _gloffset_MultiTexCoord2dARB, parameters)
+#define GET_MultiTexCoord2dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dARB)
+#define SET_MultiTexCoord2dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dARB, fn)
+#define CALL_MultiTexCoord2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord2dvARB, parameters)
+#define GET_MultiTexCoord2dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dvARB)
+#define SET_MultiTexCoord2dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dvARB, fn)
+#define CALL_MultiTexCoord2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat)), _gloffset_MultiTexCoord2fARB, parameters)
+#define GET_MultiTexCoord2fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fARB)
+#define SET_MultiTexCoord2fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fARB, fn)
+#define CALL_MultiTexCoord2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord2fvARB, parameters)
+#define GET_MultiTexCoord2fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fvARB)
+#define SET_MultiTexCoord2fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fvARB, fn)
+#define CALL_MultiTexCoord2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_MultiTexCoord2iARB, parameters)
+#define GET_MultiTexCoord2iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2iARB)
+#define SET_MultiTexCoord2iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2iARB, fn)
+#define CALL_MultiTexCoord2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord2ivARB, parameters)
+#define GET_MultiTexCoord2ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2ivARB)
+#define SET_MultiTexCoord2ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2ivARB, fn)
+#define CALL_MultiTexCoord2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort)), _gloffset_MultiTexCoord2sARB, parameters)
+#define GET_MultiTexCoord2sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2sARB)
+#define SET_MultiTexCoord2sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2sARB, fn)
+#define CALL_MultiTexCoord2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord2svARB, parameters)
+#define GET_MultiTexCoord2svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2svARB)
+#define SET_MultiTexCoord2svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2svARB, fn)
+#define CALL_MultiTexCoord3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord3dARB, parameters)
+#define GET_MultiTexCoord3dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dARB)
+#define SET_MultiTexCoord3dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dARB, fn)
+#define CALL_MultiTexCoord3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord3dvARB, parameters)
+#define GET_MultiTexCoord3dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dvARB)
+#define SET_MultiTexCoord3dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dvARB, fn)
+#define CALL_MultiTexCoord3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord3fARB, parameters)
+#define GET_MultiTexCoord3fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fARB)
+#define SET_MultiTexCoord3fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fARB, fn)
+#define CALL_MultiTexCoord3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord3fvARB, parameters)
+#define GET_MultiTexCoord3fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fvARB)
+#define SET_MultiTexCoord3fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fvARB, fn)
+#define CALL_MultiTexCoord3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint)), _gloffset_MultiTexCoord3iARB, parameters)
+#define GET_MultiTexCoord3iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3iARB)
+#define SET_MultiTexCoord3iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3iARB, fn)
+#define CALL_MultiTexCoord3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord3ivARB, parameters)
+#define GET_MultiTexCoord3ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3ivARB)
+#define SET_MultiTexCoord3ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3ivARB, fn)
+#define CALL_MultiTexCoord3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord3sARB, parameters)
+#define GET_MultiTexCoord3sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3sARB)
+#define SET_MultiTexCoord3sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3sARB, fn)
+#define CALL_MultiTexCoord3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord3svARB, parameters)
+#define GET_MultiTexCoord3svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3svARB)
+#define SET_MultiTexCoord3svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3svARB, fn)
+#define CALL_MultiTexCoord4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord4dARB, parameters)
+#define GET_MultiTexCoord4dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dARB)
+#define SET_MultiTexCoord4dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dARB, fn)
+#define CALL_MultiTexCoord4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord4dvARB, parameters)
+#define GET_MultiTexCoord4dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dvARB)
+#define SET_MultiTexCoord4dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dvARB, fn)
+#define CALL_MultiTexCoord4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord4fARB, parameters)
+#define GET_MultiTexCoord4fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fARB)
+#define SET_MultiTexCoord4fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fARB, fn)
+#define CALL_MultiTexCoord4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord4fvARB, parameters)
+#define GET_MultiTexCoord4fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fvARB)
+#define SET_MultiTexCoord4fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fvARB, fn)
+#define CALL_MultiTexCoord4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_MultiTexCoord4iARB, parameters)
+#define GET_MultiTexCoord4iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4iARB)
+#define SET_MultiTexCoord4iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4iARB, fn)
+#define CALL_MultiTexCoord4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord4ivARB, parameters)
+#define GET_MultiTexCoord4ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4ivARB)
+#define SET_MultiTexCoord4ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4ivARB, fn)
+#define CALL_MultiTexCoord4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord4sARB, parameters)
+#define GET_MultiTexCoord4sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4sARB)
+#define SET_MultiTexCoord4sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4sARB, fn)
+#define CALL_MultiTexCoord4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord4svARB, parameters)
+#define GET_MultiTexCoord4svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4svARB)
+#define SET_MultiTexCoord4svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4svARB, fn)
+#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_AttachShader, parameters)
+#define GET_AttachShader(disp) GET_by_offset(disp, _gloffset_AttachShader)
+#define SET_AttachShader(disp, fn) SET_by_offset(disp, _gloffset_AttachShader, fn)
+#define CALL_CreateProgram(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(void)), _gloffset_CreateProgram, parameters)
+#define GET_CreateProgram(disp) GET_by_offset(disp, _gloffset_CreateProgram)
+#define SET_CreateProgram(disp, fn) SET_by_offset(disp, _gloffset_CreateProgram, fn)
+#define CALL_CreateShader(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum)), _gloffset_CreateShader, parameters)
+#define GET_CreateShader(disp) GET_by_offset(disp, _gloffset_CreateShader)
+#define SET_CreateShader(disp, fn) SET_by_offset(disp, _gloffset_CreateShader, fn)
+#define CALL_DeleteProgram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteProgram, parameters)
+#define GET_DeleteProgram(disp) GET_by_offset(disp, _gloffset_DeleteProgram)
+#define SET_DeleteProgram(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgram, fn)
+#define CALL_DeleteShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteShader, parameters)
+#define GET_DeleteShader(disp) GET_by_offset(disp, _gloffset_DeleteShader)
+#define SET_DeleteShader(disp, fn) SET_by_offset(disp, _gloffset_DeleteShader, fn)
+#define CALL_DetachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_DetachShader, parameters)
+#define GET_DetachShader(disp) GET_by_offset(disp, _gloffset_DetachShader)
+#define SET_DetachShader(disp, fn) SET_by_offset(disp, _gloffset_DetachShader, fn)
+#define CALL_GetAttachedShaders(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLuint *)), _gloffset_GetAttachedShaders, parameters)
+#define GET_GetAttachedShaders(disp) GET_by_offset(disp, _gloffset_GetAttachedShaders)
+#define SET_GetAttachedShaders(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedShaders, fn)
+#define CALL_GetProgramInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetProgramInfoLog, parameters)
+#define GET_GetProgramInfoLog(disp) GET_by_offset(disp, _gloffset_GetProgramInfoLog)
+#define SET_GetProgramInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetProgramInfoLog, fn)
+#define CALL_GetProgramiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramiv, parameters)
+#define GET_GetProgramiv(disp) GET_by_offset(disp, _gloffset_GetProgramiv)
+#define SET_GetProgramiv(disp, fn) SET_by_offset(disp, _gloffset_GetProgramiv, fn)
+#define CALL_GetShaderInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetShaderInfoLog, parameters)
+#define GET_GetShaderInfoLog(disp) GET_by_offset(disp, _gloffset_GetShaderInfoLog)
+#define SET_GetShaderInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetShaderInfoLog, fn)
+#define CALL_GetShaderiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetShaderiv, parameters)
+#define GET_GetShaderiv(disp) GET_by_offset(disp, _gloffset_GetShaderiv)
+#define SET_GetShaderiv(disp, fn) SET_by_offset(disp, _gloffset_GetShaderiv, fn)
+#define CALL_IsProgram(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgram, parameters)
+#define GET_IsProgram(disp) GET_by_offset(disp, _gloffset_IsProgram)
+#define SET_IsProgram(disp, fn) SET_by_offset(disp, _gloffset_IsProgram, fn)
+#define CALL_IsShader(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsShader, parameters)
+#define GET_IsShader(disp) GET_by_offset(disp, _gloffset_IsShader)
+#define SET_IsShader(disp, fn) SET_by_offset(disp, _gloffset_IsShader, fn)
+#define CALL_StencilFuncSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparate, parameters)
+#define GET_StencilFuncSeparate(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparate)
+#define SET_StencilFuncSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparate, fn)
+#define CALL_StencilMaskSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_StencilMaskSeparate, parameters)
+#define GET_StencilMaskSeparate(disp) GET_by_offset(disp, _gloffset_StencilMaskSeparate)
+#define SET_StencilMaskSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilMaskSeparate, fn)
+#define CALL_StencilOpSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_StencilOpSeparate, parameters)
+#define GET_StencilOpSeparate(disp) GET_by_offset(disp, _gloffset_StencilOpSeparate)
+#define SET_StencilOpSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilOpSeparate, fn)
+#define CALL_UniformMatrix2x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x3fv, parameters)
+#define GET_UniformMatrix2x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x3fv)
+#define SET_UniformMatrix2x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x3fv, fn)
+#define CALL_UniformMatrix2x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x4fv, parameters)
+#define GET_UniformMatrix2x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x4fv)
+#define SET_UniformMatrix2x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x4fv, fn)
+#define CALL_UniformMatrix3x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x2fv, parameters)
+#define GET_UniformMatrix3x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x2fv)
+#define SET_UniformMatrix3x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x2fv, fn)
+#define CALL_UniformMatrix3x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x4fv, parameters)
+#define GET_UniformMatrix3x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x4fv)
+#define SET_UniformMatrix3x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x4fv, fn)
+#define CALL_UniformMatrix4x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x2fv, parameters)
+#define GET_UniformMatrix4x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x2fv)
+#define SET_UniformMatrix4x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x2fv, fn)
+#define CALL_UniformMatrix4x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x3fv, parameters)
+#define GET_UniformMatrix4x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x3fv)
+#define SET_UniformMatrix4x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x3fv, fn)
+#define CALL_ClampColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColor, parameters)
+#define GET_ClampColor(disp) GET_by_offset(disp, _gloffset_ClampColor)
+#define SET_ClampColor(disp, fn) SET_by_offset(disp, _gloffset_ClampColor, fn)
+#define CALL_ClearBufferfi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLfloat, const GLint)), _gloffset_ClearBufferfi, parameters)
+#define GET_ClearBufferfi(disp) GET_by_offset(disp, _gloffset_ClearBufferfi)
+#define SET_ClearBufferfi(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfi, fn)
+#define CALL_ClearBufferfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLfloat *)), _gloffset_ClearBufferfv, parameters)
+#define GET_ClearBufferfv(disp) GET_by_offset(disp, _gloffset_ClearBufferfv)
+#define SET_ClearBufferfv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfv, fn)
+#define CALL_ClearBufferiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLint *)), _gloffset_ClearBufferiv, parameters)
+#define GET_ClearBufferiv(disp) GET_by_offset(disp, _gloffset_ClearBufferiv)
+#define SET_ClearBufferiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferiv, fn)
+#define CALL_ClearBufferuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLuint *)), _gloffset_ClearBufferuiv, parameters)
+#define GET_ClearBufferuiv(disp) GET_by_offset(disp, _gloffset_ClearBufferuiv)
+#define SET_ClearBufferuiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferuiv, fn)
+#define CALL_GetStringi(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_GetStringi, parameters)
+#define GET_GetStringi(disp) GET_by_offset(disp, _gloffset_GetStringi)
+#define SET_GetStringi(disp, fn) SET_by_offset(disp, _gloffset_GetStringi, fn)
+#define CALL_TexBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint)), _gloffset_TexBuffer, parameters)
+#define GET_TexBuffer(disp) GET_by_offset(disp, _gloffset_TexBuffer)
+#define SET_TexBuffer(disp, fn) SET_by_offset(disp, _gloffset_TexBuffer, fn)
+#define CALL_FramebufferTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture, parameters)
+#define GET_FramebufferTexture(disp) GET_by_offset(disp, _gloffset_FramebufferTexture)
+#define SET_FramebufferTexture(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture, fn)
+#define CALL_GetBufferParameteri64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint64 *)), _gloffset_GetBufferParameteri64v, parameters)
+#define GET_GetBufferParameteri64v(disp) GET_by_offset(disp, _gloffset_GetBufferParameteri64v)
+#define SET_GetBufferParameteri64v(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameteri64v, fn)
+#define CALL_GetInteger64i_v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint64 *)), _gloffset_GetInteger64i_v, parameters)
+#define GET_GetInteger64i_v(disp) GET_by_offset(disp, _gloffset_GetInteger64i_v)
+#define SET_GetInteger64i_v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64i_v, fn)
+#define CALL_VertexAttribDivisor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisor, parameters)
+#define GET_VertexAttribDivisor(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisor)
+#define SET_VertexAttribDivisor(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisor, fn)
+#define CALL_LoadTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadTransposeMatrixdARB, parameters)
+#define GET_LoadTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB)
+#define SET_LoadTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB, fn)
+#define CALL_LoadTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadTransposeMatrixfARB, parameters)
+#define GET_LoadTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB)
+#define SET_LoadTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB, fn)
+#define CALL_MultTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultTransposeMatrixdARB, parameters)
+#define GET_MultTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixdARB)
+#define SET_MultTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixdARB, fn)
+#define CALL_MultTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultTransposeMatrixfARB, parameters)
+#define GET_MultTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixfARB)
+#define SET_MultTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixfARB, fn)
+#define CALL_SampleCoverageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleCoverageARB, parameters)
+#define GET_SampleCoverageARB(disp) GET_by_offset(disp, _gloffset_SampleCoverageARB)
+#define SET_SampleCoverageARB(disp, fn) SET_by_offset(disp, _gloffset_SampleCoverageARB, fn)
+#define CALL_CompressedTexImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage1DARB, parameters)
+#define GET_CompressedTexImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage1DARB)
+#define SET_CompressedTexImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage1DARB, fn)
+#define CALL_CompressedTexImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage2DARB, parameters)
+#define GET_CompressedTexImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage2DARB)
+#define SET_CompressedTexImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage2DARB, fn)
+#define CALL_CompressedTexImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage3DARB, parameters)
+#define GET_CompressedTexImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage3DARB)
+#define SET_CompressedTexImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage3DARB, fn)
+#define CALL_CompressedTexSubImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage1DARB, parameters)
+#define GET_CompressedTexSubImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB)
+#define SET_CompressedTexSubImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB, fn)
+#define CALL_CompressedTexSubImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage2DARB, parameters)
+#define GET_CompressedTexSubImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB)
+#define SET_CompressedTexSubImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB, fn)
+#define CALL_CompressedTexSubImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage3DARB, parameters)
+#define GET_CompressedTexSubImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB)
+#define SET_CompressedTexSubImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB, fn)
+#define CALL_GetCompressedTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLvoid *)), _gloffset_GetCompressedTexImageARB, parameters)
+#define GET_GetCompressedTexImageARB(disp) GET_by_offset(disp, _gloffset_GetCompressedTexImageARB)
+#define SET_GetCompressedTexImageARB(disp, fn) SET_by_offset(disp, _gloffset_GetCompressedTexImageARB, fn)
+#define CALL_DisableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DisableVertexAttribArrayARB, parameters)
+#define GET_DisableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB)
+#define SET_DisableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB, fn)
+#define CALL_EnableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_EnableVertexAttribArrayARB, parameters)
+#define GET_EnableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB)
+#define SET_EnableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB, fn)
+#define CALL_GetProgramEnvParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramEnvParameterdvARB, parameters)
+#define GET_GetProgramEnvParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB)
+#define SET_GetProgramEnvParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB, fn)
+#define CALL_GetProgramEnvParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramEnvParameterfvARB, parameters)
+#define GET_GetProgramEnvParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB)
+#define SET_GetProgramEnvParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB, fn)
+#define CALL_GetProgramLocalParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramLocalParameterdvARB, parameters)
+#define GET_GetProgramLocalParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB)
+#define SET_GetProgramLocalParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB, fn)
+#define CALL_GetProgramLocalParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramLocalParameterfvARB, parameters)
+#define GET_GetProgramLocalParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB)
+#define SET_GetProgramLocalParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB, fn)
+#define CALL_GetProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid *)), _gloffset_GetProgramStringARB, parameters)
+#define GET_GetProgramStringARB(disp) GET_by_offset(disp, _gloffset_GetProgramStringARB)
+#define SET_GetProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringARB, fn)
+#define CALL_GetProgramivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetProgramivARB, parameters)
+#define GET_GetProgramivARB(disp) GET_by_offset(disp, _gloffset_GetProgramivARB)
+#define SET_GetProgramivARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivARB, fn)
+#define CALL_GetVertexAttribdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvARB, parameters)
+#define GET_GetVertexAttribdvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvARB)
+#define SET_GetVertexAttribdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvARB, fn)
+#define CALL_GetVertexAttribfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvARB, parameters)
+#define GET_GetVertexAttribfvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvARB)
+#define SET_GetVertexAttribfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvARB, fn)
+#define CALL_GetVertexAttribivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivARB, parameters)
+#define GET_GetVertexAttribivARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivARB)
+#define SET_GetVertexAttribivARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivARB, fn)
+#define CALL_ProgramEnvParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramEnvParameter4dARB, parameters)
+#define GET_ProgramEnvParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB)
+#define SET_ProgramEnvParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB, fn)
+#define CALL_ProgramEnvParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramEnvParameter4dvARB, parameters)
+#define GET_ProgramEnvParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB)
+#define SET_ProgramEnvParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB, fn)
+#define CALL_ProgramEnvParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramEnvParameter4fARB, parameters)
+#define GET_ProgramEnvParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB)
+#define SET_ProgramEnvParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB, fn)
+#define CALL_ProgramEnvParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramEnvParameter4fvARB, parameters)
+#define GET_ProgramEnvParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB)
+#define SET_ProgramEnvParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB, fn)
+#define CALL_ProgramLocalParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramLocalParameter4dARB, parameters)
+#define GET_ProgramLocalParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB)
+#define SET_ProgramLocalParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB, fn)
+#define CALL_ProgramLocalParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramLocalParameter4dvARB, parameters)
+#define GET_ProgramLocalParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB)
+#define SET_ProgramLocalParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB, fn)
+#define CALL_ProgramLocalParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramLocalParameter4fARB, parameters)
+#define GET_ProgramLocalParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB)
+#define SET_ProgramLocalParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB, fn)
+#define CALL_ProgramLocalParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramLocalParameter4fvARB, parameters)
+#define GET_ProgramLocalParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB)
+#define SET_ProgramLocalParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB, fn)
+#define CALL_ProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, const GLvoid *)), _gloffset_ProgramStringARB, parameters)
+#define GET_ProgramStringARB(disp) GET_by_offset(disp, _gloffset_ProgramStringARB)
+#define SET_ProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramStringARB, fn)
+#define CALL_VertexAttrib1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dARB, parameters)
+#define GET_VertexAttrib1dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dARB)
+#define SET_VertexAttrib1dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dARB, fn)
+#define CALL_VertexAttrib1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvARB, parameters)
+#define GET_VertexAttrib1dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvARB)
+#define SET_VertexAttrib1dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvARB, fn)
+#define CALL_VertexAttrib1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fARB, parameters)
+#define GET_VertexAttrib1fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fARB)
+#define SET_VertexAttrib1fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fARB, fn)
+#define CALL_VertexAttrib1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvARB, parameters)
+#define GET_VertexAttrib1fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvARB)
+#define SET_VertexAttrib1fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvARB, fn)
+#define CALL_VertexAttrib1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sARB, parameters)
+#define GET_VertexAttrib1sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sARB)
+#define SET_VertexAttrib1sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sARB, fn)
+#define CALL_VertexAttrib1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svARB, parameters)
+#define GET_VertexAttrib1svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svARB)
+#define SET_VertexAttrib1svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svARB, fn)
+#define CALL_VertexAttrib2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dARB, parameters)
+#define GET_VertexAttrib2dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dARB)
+#define SET_VertexAttrib2dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dARB, fn)
+#define CALL_VertexAttrib2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvARB, parameters)
+#define GET_VertexAttrib2dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvARB)
+#define SET_VertexAttrib2dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvARB, fn)
+#define CALL_VertexAttrib2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fARB, parameters)
+#define GET_VertexAttrib2fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fARB)
+#define SET_VertexAttrib2fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fARB, fn)
+#define CALL_VertexAttrib2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvARB, parameters)
+#define GET_VertexAttrib2fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvARB)
+#define SET_VertexAttrib2fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvARB, fn)
+#define CALL_VertexAttrib2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sARB, parameters)
+#define GET_VertexAttrib2sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sARB)
+#define SET_VertexAttrib2sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sARB, fn)
+#define CALL_VertexAttrib2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svARB, parameters)
+#define GET_VertexAttrib2svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svARB)
+#define SET_VertexAttrib2svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svARB, fn)
+#define CALL_VertexAttrib3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dARB, parameters)
+#define GET_VertexAttrib3dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dARB)
+#define SET_VertexAttrib3dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dARB, fn)
+#define CALL_VertexAttrib3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvARB, parameters)
+#define GET_VertexAttrib3dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvARB)
+#define SET_VertexAttrib3dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvARB, fn)
+#define CALL_VertexAttrib3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fARB, parameters)
+#define GET_VertexAttrib3fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fARB)
+#define SET_VertexAttrib3fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fARB, fn)
+#define CALL_VertexAttrib3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvARB, parameters)
+#define GET_VertexAttrib3fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvARB)
+#define SET_VertexAttrib3fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvARB, fn)
+#define CALL_VertexAttrib3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sARB, parameters)
+#define GET_VertexAttrib3sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sARB)
+#define SET_VertexAttrib3sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sARB, fn)
+#define CALL_VertexAttrib3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svARB, parameters)
+#define GET_VertexAttrib3svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svARB)
+#define SET_VertexAttrib3svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svARB, fn)
+#define CALL_VertexAttrib4NbvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4NbvARB, parameters)
+#define GET_VertexAttrib4NbvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NbvARB)
+#define SET_VertexAttrib4NbvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NbvARB, fn)
+#define CALL_VertexAttrib4NivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4NivARB, parameters)
+#define GET_VertexAttrib4NivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NivARB)
+#define SET_VertexAttrib4NivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NivARB, fn)
+#define CALL_VertexAttrib4NsvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4NsvARB, parameters)
+#define GET_VertexAttrib4NsvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NsvARB)
+#define SET_VertexAttrib4NsvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NsvARB, fn)
+#define CALL_VertexAttrib4NubARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4NubARB, parameters)
+#define GET_VertexAttrib4NubARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubARB)
+#define SET_VertexAttrib4NubARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubARB, fn)
+#define CALL_VertexAttrib4NubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4NubvARB, parameters)
+#define GET_VertexAttrib4NubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubvARB)
+#define SET_VertexAttrib4NubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubvARB, fn)
+#define CALL_VertexAttrib4NuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4NuivARB, parameters)
+#define GET_VertexAttrib4NuivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NuivARB)
+#define SET_VertexAttrib4NuivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NuivARB, fn)
+#define CALL_VertexAttrib4NusvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4NusvARB, parameters)
+#define GET_VertexAttrib4NusvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NusvARB)
+#define SET_VertexAttrib4NusvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NusvARB, fn)
+#define CALL_VertexAttrib4bvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4bvARB, parameters)
+#define GET_VertexAttrib4bvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4bvARB)
+#define SET_VertexAttrib4bvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4bvARB, fn)
+#define CALL_VertexAttrib4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dARB, parameters)
+#define GET_VertexAttrib4dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dARB)
+#define SET_VertexAttrib4dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dARB, fn)
+#define CALL_VertexAttrib4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvARB, parameters)
+#define GET_VertexAttrib4dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvARB)
+#define SET_VertexAttrib4dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvARB, fn)
+#define CALL_VertexAttrib4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fARB, parameters)
+#define GET_VertexAttrib4fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fARB)
+#define SET_VertexAttrib4fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fARB, fn)
+#define CALL_VertexAttrib4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvARB, parameters)
+#define GET_VertexAttrib4fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvARB)
+#define SET_VertexAttrib4fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvARB, fn)
+#define CALL_VertexAttrib4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4ivARB, parameters)
+#define GET_VertexAttrib4ivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ivARB)
+#define SET_VertexAttrib4ivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ivARB, fn)
+#define CALL_VertexAttrib4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sARB, parameters)
+#define GET_VertexAttrib4sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sARB)
+#define SET_VertexAttrib4sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sARB, fn)
+#define CALL_VertexAttrib4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svARB, parameters)
+#define GET_VertexAttrib4svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svARB)
+#define SET_VertexAttrib4svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svARB, fn)
+#define CALL_VertexAttrib4ubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvARB, parameters)
+#define GET_VertexAttrib4ubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvARB)
+#define SET_VertexAttrib4ubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvARB, fn)
+#define CALL_VertexAttrib4uivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4uivARB, parameters)
+#define GET_VertexAttrib4uivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4uivARB)
+#define SET_VertexAttrib4uivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4uivARB, fn)
+#define CALL_VertexAttrib4usvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4usvARB, parameters)
+#define GET_VertexAttrib4usvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4usvARB)
+#define SET_VertexAttrib4usvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4usvARB, fn)
+#define CALL_VertexAttribPointerARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerARB, parameters)
+#define GET_VertexAttribPointerARB(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerARB)
+#define SET_VertexAttribPointerARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerARB, fn)
+#define CALL_BindBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindBufferARB, parameters)
+#define GET_BindBufferARB(disp) GET_by_offset(disp, _gloffset_BindBufferARB)
+#define SET_BindBufferARB(disp, fn) SET_by_offset(disp, _gloffset_BindBufferARB, fn)
+#define CALL_BufferDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)), _gloffset_BufferDataARB, parameters)
+#define GET_BufferDataARB(disp) GET_by_offset(disp, _gloffset_BufferDataARB)
+#define SET_BufferDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferDataARB, fn)
+#define CALL_BufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)), _gloffset_BufferSubDataARB, parameters)
+#define GET_BufferSubDataARB(disp) GET_by_offset(disp, _gloffset_BufferSubDataARB)
+#define SET_BufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferSubDataARB, fn)
+#define CALL_DeleteBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteBuffersARB, parameters)
+#define GET_DeleteBuffersARB(disp) GET_by_offset(disp, _gloffset_DeleteBuffersARB)
+#define SET_DeleteBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteBuffersARB, fn)
+#define CALL_GenBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenBuffersARB, parameters)
+#define GET_GenBuffersARB(disp) GET_by_offset(disp, _gloffset_GenBuffersARB)
+#define SET_GenBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_GenBuffersARB, fn)
+#define CALL_GetBufferParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetBufferParameterivARB, parameters)
+#define GET_GetBufferParameterivARB(disp) GET_by_offset(disp, _gloffset_GetBufferParameterivARB)
+#define SET_GetBufferParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameterivARB, fn)
+#define CALL_GetBufferPointervARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetBufferPointervARB, parameters)
+#define GET_GetBufferPointervARB(disp) GET_by_offset(disp, _gloffset_GetBufferPointervARB)
+#define SET_GetBufferPointervARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferPointervARB, fn)
+#define CALL_GetBufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)), _gloffset_GetBufferSubDataARB, parameters)
+#define GET_GetBufferSubDataARB(disp) GET_by_offset(disp, _gloffset_GetBufferSubDataARB)
+#define SET_GetBufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferSubDataARB, fn)
+#define CALL_IsBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsBufferARB, parameters)
+#define GET_IsBufferARB(disp) GET_by_offset(disp, _gloffset_IsBufferARB)
+#define SET_IsBufferARB(disp, fn) SET_by_offset(disp, _gloffset_IsBufferARB, fn)
+#define CALL_MapBufferARB(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_MapBufferARB, parameters)
+#define GET_MapBufferARB(disp) GET_by_offset(disp, _gloffset_MapBufferARB)
+#define SET_MapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_MapBufferARB, fn)
+#define CALL_UnmapBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_UnmapBufferARB, parameters)
+#define GET_UnmapBufferARB(disp) GET_by_offset(disp, _gloffset_UnmapBufferARB)
+#define SET_UnmapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_UnmapBufferARB, fn)
+#define CALL_BeginQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BeginQueryARB, parameters)
+#define GET_BeginQueryARB(disp) GET_by_offset(disp, _gloffset_BeginQueryARB)
+#define SET_BeginQueryARB(disp, fn) SET_by_offset(disp, _gloffset_BeginQueryARB, fn)
+#define CALL_DeleteQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteQueriesARB, parameters)
+#define GET_DeleteQueriesARB(disp) GET_by_offset(disp, _gloffset_DeleteQueriesARB)
+#define SET_DeleteQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteQueriesARB, fn)
+#define CALL_EndQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EndQueryARB, parameters)
+#define GET_EndQueryARB(disp) GET_by_offset(disp, _gloffset_EndQueryARB)
+#define SET_EndQueryARB(disp, fn) SET_by_offset(disp, _gloffset_EndQueryARB, fn)
+#define CALL_GenQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenQueriesARB, parameters)
+#define GET_GenQueriesARB(disp) GET_by_offset(disp, _gloffset_GenQueriesARB)
+#define SET_GenQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_GenQueriesARB, fn)
+#define CALL_GetQueryObjectivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetQueryObjectivARB, parameters)
+#define GET_GetQueryObjectivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectivARB)
+#define SET_GetQueryObjectivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectivARB, fn)
+#define CALL_GetQueryObjectuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetQueryObjectuivARB, parameters)
+#define GET_GetQueryObjectuivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectuivARB)
+#define SET_GetQueryObjectuivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectuivARB, fn)
+#define CALL_GetQueryivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetQueryivARB, parameters)
+#define GET_GetQueryivARB(disp) GET_by_offset(disp, _gloffset_GetQueryivARB)
+#define SET_GetQueryivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryivARB, fn)
+#define CALL_IsQueryARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsQueryARB, parameters)
+#define GET_IsQueryARB(disp) GET_by_offset(disp, _gloffset_IsQueryARB)
+#define SET_IsQueryARB(disp, fn) SET_by_offset(disp, _gloffset_IsQueryARB, fn)
+#define CALL_AttachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_AttachObjectARB, parameters)
+#define GET_AttachObjectARB(disp) GET_by_offset(disp, _gloffset_AttachObjectARB)
+#define SET_AttachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_AttachObjectARB, fn)
+#define CALL_CompileShaderARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_CompileShaderARB, parameters)
+#define GET_CompileShaderARB(disp) GET_by_offset(disp, _gloffset_CompileShaderARB)
+#define SET_CompileShaderARB(disp, fn) SET_by_offset(disp, _gloffset_CompileShaderARB, fn)
+#define CALL_CreateProgramObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(void)), _gloffset_CreateProgramObjectARB, parameters)
+#define GET_CreateProgramObjectARB(disp) GET_by_offset(disp, _gloffset_CreateProgramObjectARB)
+#define SET_CreateProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateProgramObjectARB, fn)
+#define CALL_CreateShaderObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_CreateShaderObjectARB, parameters)
+#define GET_CreateShaderObjectARB(disp) GET_by_offset(disp, _gloffset_CreateShaderObjectARB)
+#define SET_CreateShaderObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderObjectARB, fn)
+#define CALL_DeleteObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_DeleteObjectARB, parameters)
+#define GET_DeleteObjectARB(disp) GET_by_offset(disp, _gloffset_DeleteObjectARB)
+#define SET_DeleteObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteObjectARB, fn)
+#define CALL_DetachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_DetachObjectARB, parameters)
+#define GET_DetachObjectARB(disp) GET_by_offset(disp, _gloffset_DetachObjectARB)
+#define SET_DetachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DetachObjectARB, fn)
+#define CALL_GetActiveUniformARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveUniformARB, parameters)
+#define GET_GetActiveUniformARB(disp) GET_by_offset(disp, _gloffset_GetActiveUniformARB)
+#define SET_GetActiveUniformARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveUniformARB, fn)
+#define CALL_GetAttachedObjectsARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)), _gloffset_GetAttachedObjectsARB, parameters)
+#define GET_GetAttachedObjectsARB(disp) GET_by_offset(disp, _gloffset_GetAttachedObjectsARB)
+#define SET_GetAttachedObjectsARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedObjectsARB, fn)
+#define CALL_GetHandleARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_GetHandleARB, parameters)
+#define GET_GetHandleARB(disp) GET_by_offset(disp, _gloffset_GetHandleARB)
+#define SET_GetHandleARB(disp, fn) SET_by_offset(disp, _gloffset_GetHandleARB, fn)
+#define CALL_GetInfoLogARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetInfoLogARB, parameters)
+#define GET_GetInfoLogARB(disp) GET_by_offset(disp, _gloffset_GetInfoLogARB)
+#define SET_GetInfoLogARB(disp, fn) SET_by_offset(disp, _gloffset_GetInfoLogARB, fn)
+#define CALL_GetObjectParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLfloat *)), _gloffset_GetObjectParameterfvARB, parameters)
+#define GET_GetObjectParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterfvARB)
+#define SET_GetObjectParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterfvARB, fn)
+#define CALL_GetObjectParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLint *)), _gloffset_GetObjectParameterivARB, parameters)
+#define GET_GetObjectParameterivARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivARB)
+#define SET_GetObjectParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivARB, fn)
+#define CALL_GetShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetShaderSourceARB, parameters)
+#define GET_GetShaderSourceARB(disp) GET_by_offset(disp, _gloffset_GetShaderSourceARB)
+#define SET_GetShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_GetShaderSourceARB, fn)
+#define CALL_GetUniformLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetUniformLocationARB, parameters)
+#define GET_GetUniformLocationARB(disp) GET_by_offset(disp, _gloffset_GetUniformLocationARB)
+#define SET_GetUniformLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformLocationARB, fn)
+#define CALL_GetUniformfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLfloat *)), _gloffset_GetUniformfvARB, parameters)
+#define GET_GetUniformfvARB(disp) GET_by_offset(disp, _gloffset_GetUniformfvARB)
+#define SET_GetUniformfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformfvARB, fn)
+#define CALL_GetUniformivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLint *)), _gloffset_GetUniformivARB, parameters)
+#define GET_GetUniformivARB(disp) GET_by_offset(disp, _gloffset_GetUniformivARB)
+#define SET_GetUniformivARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformivARB, fn)
+#define CALL_LinkProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_LinkProgramARB, parameters)
+#define GET_LinkProgramARB(disp) GET_by_offset(disp, _gloffset_LinkProgramARB)
+#define SET_LinkProgramARB(disp, fn) SET_by_offset(disp, _gloffset_LinkProgramARB, fn)
+#define CALL_ShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)), _gloffset_ShaderSourceARB, parameters)
+#define GET_ShaderSourceARB(disp) GET_by_offset(disp, _gloffset_ShaderSourceARB)
+#define SET_ShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_ShaderSourceARB, fn)
+#define CALL_Uniform1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat)), _gloffset_Uniform1fARB, parameters)
+#define GET_Uniform1fARB(disp) GET_by_offset(disp, _gloffset_Uniform1fARB)
+#define SET_Uniform1fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fARB, fn)
+#define CALL_Uniform1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform1fvARB, parameters)
+#define GET_Uniform1fvARB(disp) GET_by_offset(disp, _gloffset_Uniform1fvARB)
+#define SET_Uniform1fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fvARB, fn)
+#define CALL_Uniform1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Uniform1iARB, parameters)
+#define GET_Uniform1iARB(disp) GET_by_offset(disp, _gloffset_Uniform1iARB)
+#define SET_Uniform1iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1iARB, fn)
+#define CALL_Uniform1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform1ivARB, parameters)
+#define GET_Uniform1ivARB(disp) GET_by_offset(disp, _gloffset_Uniform1ivARB)
+#define SET_Uniform1ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1ivARB, fn)
+#define CALL_Uniform2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_Uniform2fARB, parameters)
+#define GET_Uniform2fARB(disp) GET_by_offset(disp, _gloffset_Uniform2fARB)
+#define SET_Uniform2fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fARB, fn)
+#define CALL_Uniform2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform2fvARB, parameters)
+#define GET_Uniform2fvARB(disp) GET_by_offset(disp, _gloffset_Uniform2fvARB)
+#define SET_Uniform2fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fvARB, fn)
+#define CALL_Uniform2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Uniform2iARB, parameters)
+#define GET_Uniform2iARB(disp) GET_by_offset(disp, _gloffset_Uniform2iARB)
+#define SET_Uniform2iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2iARB, fn)
+#define CALL_Uniform2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform2ivARB, parameters)
+#define GET_Uniform2ivARB(disp) GET_by_offset(disp, _gloffset_Uniform2ivARB)
+#define SET_Uniform2ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2ivARB, fn)
+#define CALL_Uniform3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform3fARB, parameters)
+#define GET_Uniform3fARB(disp) GET_by_offset(disp, _gloffset_Uniform3fARB)
+#define SET_Uniform3fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fARB, fn)
+#define CALL_Uniform3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform3fvARB, parameters)
+#define GET_Uniform3fvARB(disp) GET_by_offset(disp, _gloffset_Uniform3fvARB)
+#define SET_Uniform3fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fvARB, fn)
+#define CALL_Uniform3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Uniform3iARB, parameters)
+#define GET_Uniform3iARB(disp) GET_by_offset(disp, _gloffset_Uniform3iARB)
+#define SET_Uniform3iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3iARB, fn)
+#define CALL_Uniform3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform3ivARB, parameters)
+#define GET_Uniform3ivARB(disp) GET_by_offset(disp, _gloffset_Uniform3ivARB)
+#define SET_Uniform3ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3ivARB, fn)
+#define CALL_Uniform4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform4fARB, parameters)
+#define GET_Uniform4fARB(disp) GET_by_offset(disp, _gloffset_Uniform4fARB)
+#define SET_Uniform4fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fARB, fn)
+#define CALL_Uniform4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform4fvARB, parameters)
+#define GET_Uniform4fvARB(disp) GET_by_offset(disp, _gloffset_Uniform4fvARB)
+#define SET_Uniform4fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fvARB, fn)
+#define CALL_Uniform4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint)), _gloffset_Uniform4iARB, parameters)
+#define GET_Uniform4iARB(disp) GET_by_offset(disp, _gloffset_Uniform4iARB)
+#define SET_Uniform4iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4iARB, fn)
+#define CALL_Uniform4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform4ivARB, parameters)
+#define GET_Uniform4ivARB(disp) GET_by_offset(disp, _gloffset_Uniform4ivARB)
+#define SET_Uniform4ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4ivARB, fn)
+#define CALL_UniformMatrix2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2fvARB, parameters)
+#define GET_UniformMatrix2fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix2fvARB)
+#define SET_UniformMatrix2fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2fvARB, fn)
+#define CALL_UniformMatrix3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3fvARB, parameters)
+#define GET_UniformMatrix3fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix3fvARB)
+#define SET_UniformMatrix3fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3fvARB, fn)
+#define CALL_UniformMatrix4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4fvARB, parameters)
+#define GET_UniformMatrix4fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix4fvARB)
+#define SET_UniformMatrix4fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4fvARB, fn)
+#define CALL_UseProgramObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_UseProgramObjectARB, parameters)
+#define GET_UseProgramObjectARB(disp) GET_by_offset(disp, _gloffset_UseProgramObjectARB)
+#define SET_UseProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_UseProgramObjectARB, fn)
+#define CALL_ValidateProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_ValidateProgramARB, parameters)
+#define GET_ValidateProgramARB(disp) GET_by_offset(disp, _gloffset_ValidateProgramARB)
+#define SET_ValidateProgramARB(disp, fn) SET_by_offset(disp, _gloffset_ValidateProgramARB, fn)
+#define CALL_BindAttribLocationARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, const GLcharARB *)), _gloffset_BindAttribLocationARB, parameters)
+#define GET_BindAttribLocationARB(disp) GET_by_offset(disp, _gloffset_BindAttribLocationARB)
+#define SET_BindAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_BindAttribLocationARB, fn)
+#define CALL_GetActiveAttribARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveAttribARB, parameters)
+#define GET_GetActiveAttribARB(disp) GET_by_offset(disp, _gloffset_GetActiveAttribARB)
+#define SET_GetActiveAttribARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveAttribARB, fn)
+#define CALL_GetAttribLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetAttribLocationARB, parameters)
+#define GET_GetAttribLocationARB(disp) GET_by_offset(disp, _gloffset_GetAttribLocationARB)
+#define SET_GetAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttribLocationARB, fn)
+#define CALL_DrawBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLenum *)), _gloffset_DrawBuffersARB, parameters)
+#define GET_DrawBuffersARB(disp) GET_by_offset(disp, _gloffset_DrawBuffersARB)
+#define SET_DrawBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffersARB, fn)
+#define CALL_DrawArraysInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei, GLsizei)), _gloffset_DrawArraysInstancedARB, parameters)
+#define GET_DrawArraysInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawArraysInstancedARB)
+#define SET_DrawArraysInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawArraysInstancedARB, fn)
+#define CALL_DrawElementsInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)), _gloffset_DrawElementsInstancedARB, parameters)
+#define GET_DrawElementsInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawElementsInstancedARB)
+#define SET_DrawElementsInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsInstancedARB, fn)
+#define CALL_RenderbufferStorageMultisample(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageMultisample, parameters)
+#define GET_RenderbufferStorageMultisample(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageMultisample)
+#define SET_RenderbufferStorageMultisample(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageMultisample, fn)
+#define CALL_FramebufferTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTextureARB, parameters)
+#define GET_FramebufferTextureARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureARB)
+#define SET_FramebufferTextureARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureARB, fn)
+#define CALL_FramebufferTextureFaceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLenum)), _gloffset_FramebufferTextureFaceARB, parameters)
+#define GET_FramebufferTextureFaceARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureFaceARB)
+#define SET_FramebufferTextureFaceARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureFaceARB, fn)
+#define CALL_ProgramParameteriARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint)), _gloffset_ProgramParameteriARB, parameters)
+#define GET_ProgramParameteriARB(disp) GET_by_offset(disp, _gloffset_ProgramParameteriARB)
+#define SET_ProgramParameteriARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameteriARB, fn)
+#define CALL_VertexAttribDivisorARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisorARB, parameters)
+#define GET_VertexAttribDivisorARB(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisorARB)
+#define SET_VertexAttribDivisorARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisorARB, fn)
+#define CALL_FlushMappedBufferRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRange, parameters)
+#define GET_FlushMappedBufferRange(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRange)
+#define SET_FlushMappedBufferRange(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRange, fn)
+#define CALL_MapBufferRange(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr, GLbitfield)), _gloffset_MapBufferRange, parameters)
+#define GET_MapBufferRange(disp) GET_by_offset(disp, _gloffset_MapBufferRange)
+#define SET_MapBufferRange(disp, fn) SET_by_offset(disp, _gloffset_MapBufferRange, fn)
+#define CALL_BindVertexArray(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArray, parameters)
+#define GET_BindVertexArray(disp) GET_by_offset(disp, _gloffset_BindVertexArray)
+#define SET_BindVertexArray(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArray, fn)
+#define CALL_GenVertexArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArrays, parameters)
+#define GET_GenVertexArrays(disp) GET_by_offset(disp, _gloffset_GenVertexArrays)
+#define SET_GenVertexArrays(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArrays, fn)
+#define CALL_CopyBufferSubData(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr)), _gloffset_CopyBufferSubData, parameters)
+#define GET_CopyBufferSubData(disp) GET_by_offset(disp, _gloffset_CopyBufferSubData)
+#define SET_CopyBufferSubData(disp, fn) SET_by_offset(disp, _gloffset_CopyBufferSubData, fn)
+#define CALL_ClientWaitSync(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_ClientWaitSync, parameters)
+#define GET_ClientWaitSync(disp) GET_by_offset(disp, _gloffset_ClientWaitSync)
+#define SET_ClientWaitSync(disp, fn) SET_by_offset(disp, _gloffset_ClientWaitSync, fn)
+#define CALL_DeleteSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync)), _gloffset_DeleteSync, parameters)
+#define GET_DeleteSync(disp) GET_by_offset(disp, _gloffset_DeleteSync)
+#define SET_DeleteSync(disp, fn) SET_by_offset(disp, _gloffset_DeleteSync, fn)
+#define CALL_FenceSync(disp, parameters) CALL_by_offset(disp, (GLsync (GLAPIENTRYP)(GLenum, GLbitfield)), _gloffset_FenceSync, parameters)
+#define GET_FenceSync(disp) GET_by_offset(disp, _gloffset_FenceSync)
+#define SET_FenceSync(disp, fn) SET_by_offset(disp, _gloffset_FenceSync, fn)
+#define CALL_GetInteger64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint64 *)), _gloffset_GetInteger64v, parameters)
+#define GET_GetInteger64v(disp) GET_by_offset(disp, _gloffset_GetInteger64v)
+#define SET_GetInteger64v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64v, fn)
+#define CALL_GetSynciv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLenum, GLsizei, GLsizei *, GLint *)), _gloffset_GetSynciv, parameters)
+#define GET_GetSynciv(disp) GET_by_offset(disp, _gloffset_GetSynciv)
+#define SET_GetSynciv(disp, fn) SET_by_offset(disp, _gloffset_GetSynciv, fn)
+#define CALL_IsSync(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsync)), _gloffset_IsSync, parameters)
+#define GET_IsSync(disp) GET_by_offset(disp, _gloffset_IsSync)
+#define SET_IsSync(disp, fn) SET_by_offset(disp, _gloffset_IsSync, fn)
+#define CALL_WaitSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_WaitSync, parameters)
+#define GET_WaitSync(disp) GET_by_offset(disp, _gloffset_WaitSync)
+#define SET_WaitSync(disp, fn) SET_by_offset(disp, _gloffset_WaitSync, fn)
+#define CALL_DrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawElementsBaseVertex, parameters)
+#define GET_DrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawElementsBaseVertex)
+#define SET_DrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsBaseVertex, fn)
+#define CALL_DrawRangeElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawRangeElementsBaseVertex, parameters)
+#define GET_DrawRangeElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex)
+#define SET_DrawRangeElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex, fn)
+#define CALL_MultiDrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)), _gloffset_MultiDrawElementsBaseVertex, parameters)
+#define GET_MultiDrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex)
+#define SET_MultiDrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn)
+#define CALL_BlendEquationSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendEquationSeparateiARB, parameters)
+#define GET_BlendEquationSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateiARB)
+#define SET_BlendEquationSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateiARB, fn)
+#define CALL_BlendEquationiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BlendEquationiARB, parameters)
+#define GET_BlendEquationiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationiARB)
+#define SET_BlendEquationiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationiARB, fn)
+#define CALL_BlendFuncSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateiARB, parameters)
+#define GET_BlendFuncSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateiARB)
+#define SET_BlendFuncSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateiARB, fn)
+#define CALL_BlendFunciARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendFunciARB, parameters)
+#define GET_BlendFunciARB(disp) GET_by_offset(disp, _gloffset_BlendFunciARB)
+#define SET_BlendFunciARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFunciARB, fn)
+#define CALL_BindTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTransformFeedback, parameters)
+#define GET_BindTransformFeedback(disp) GET_by_offset(disp, _gloffset_BindTransformFeedback)
+#define SET_BindTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_BindTransformFeedback, fn)
+#define CALL_DeleteTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTransformFeedbacks, parameters)
+#define GET_DeleteTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_DeleteTransformFeedbacks)
+#define SET_DeleteTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_DeleteTransformFeedbacks, fn)
+#define CALL_DrawTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DrawTransformFeedback, parameters)
+#define GET_DrawTransformFeedback(disp) GET_by_offset(disp, _gloffset_DrawTransformFeedback)
+#define SET_DrawTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_DrawTransformFeedback, fn)
+#define CALL_GenTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTransformFeedbacks, parameters)
+#define GET_GenTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_GenTransformFeedbacks)
+#define SET_GenTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_GenTransformFeedbacks, fn)
+#define CALL_IsTransformFeedback(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTransformFeedback, parameters)
+#define GET_IsTransformFeedback(disp) GET_by_offset(disp, _gloffset_IsTransformFeedback)
+#define SET_IsTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_IsTransformFeedback, fn)
+#define CALL_PauseTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PauseTransformFeedback, parameters)
+#define GET_PauseTransformFeedback(disp) GET_by_offset(disp, _gloffset_PauseTransformFeedback)
+#define SET_PauseTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_PauseTransformFeedback, fn)
+#define CALL_ResumeTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResumeTransformFeedback, parameters)
+#define GET_ResumeTransformFeedback(disp) GET_by_offset(disp, _gloffset_ResumeTransformFeedback)
+#define SET_ResumeTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_ResumeTransformFeedback, fn)
+#define CALL_ClearDepthf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf)), _gloffset_ClearDepthf, parameters)
+#define GET_ClearDepthf(disp) GET_by_offset(disp, _gloffset_ClearDepthf)
+#define SET_ClearDepthf(disp, fn) SET_by_offset(disp, _gloffset_ClearDepthf, fn)
+#define CALL_DepthRangef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf)), _gloffset_DepthRangef, parameters)
+#define GET_DepthRangef(disp) GET_by_offset(disp, _gloffset_DepthRangef)
+#define SET_DepthRangef(disp, fn) SET_by_offset(disp, _gloffset_DepthRangef, fn)
+#define CALL_GetShaderPrecisionFormat(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *, GLint *)), _gloffset_GetShaderPrecisionFormat, parameters)
+#define GET_GetShaderPrecisionFormat(disp) GET_by_offset(disp, _gloffset_GetShaderPrecisionFormat)
+#define SET_GetShaderPrecisionFormat(disp, fn) SET_by_offset(disp, _gloffset_GetShaderPrecisionFormat, fn)
+#define CALL_ReleaseShaderCompiler(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ReleaseShaderCompiler, parameters)
+#define GET_ReleaseShaderCompiler(disp) GET_by_offset(disp, _gloffset_ReleaseShaderCompiler)
+#define SET_ReleaseShaderCompiler(disp, fn) SET_by_offset(disp, _gloffset_ReleaseShaderCompiler, fn)
+#define CALL_ShaderBinary(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei)), _gloffset_ShaderBinary, parameters)
+#define GET_ShaderBinary(disp) GET_by_offset(disp, _gloffset_ShaderBinary)
+#define SET_ShaderBinary(disp, fn) SET_by_offset(disp, _gloffset_ShaderBinary, fn)
+#define CALL_PolygonOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffsetEXT, parameters)
+#define GET_PolygonOffsetEXT(disp) GET_by_offset(disp, _gloffset_PolygonOffsetEXT)
+#define SET_PolygonOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffsetEXT, fn)
+#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelTexGenParameterfvSGIS, parameters)
+#define GET_GetPixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS)
+#define SET_GetPixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS, fn)
+#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetPixelTexGenParameterivSGIS, parameters)
+#define GET_GetPixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS)
+#define SET_GetPixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS, fn)
+#define CALL_PixelTexGenParameterfSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTexGenParameterfSGIS, parameters)
+#define GET_PixelTexGenParameterfSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS)
+#define SET_PixelTexGenParameterfSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS, fn)
+#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PixelTexGenParameterfvSGIS, parameters)
+#define GET_PixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS)
+#define SET_PixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS, fn)
+#define CALL_PixelTexGenParameteriSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTexGenParameteriSGIS, parameters)
+#define GET_PixelTexGenParameteriSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS)
+#define SET_PixelTexGenParameteriSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS, fn)
+#define CALL_PixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PixelTexGenParameterivSGIS, parameters)
+#define GET_PixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS)
+#define SET_PixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS, fn)
+#define CALL_SampleMaskSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleMaskSGIS, parameters)
+#define GET_SampleMaskSGIS(disp) GET_by_offset(disp, _gloffset_SampleMaskSGIS)
+#define SET_SampleMaskSGIS(disp, fn) SET_by_offset(disp, _gloffset_SampleMaskSGIS, fn)
+#define CALL_SamplePatternSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_SamplePatternSGIS, parameters)
+#define GET_SamplePatternSGIS(disp) GET_by_offset(disp, _gloffset_SamplePatternSGIS)
+#define SET_SamplePatternSGIS(disp, fn) SET_by_offset(disp, _gloffset_SamplePatternSGIS, fn)
+#define CALL_ColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_ColorPointerEXT, parameters)
+#define GET_ColorPointerEXT(disp) GET_by_offset(disp, _gloffset_ColorPointerEXT)
+#define SET_ColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorPointerEXT, fn)
+#define CALL_EdgeFlagPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, const GLboolean *)), _gloffset_EdgeFlagPointerEXT, parameters)
+#define GET_EdgeFlagPointerEXT(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointerEXT)
+#define SET_EdgeFlagPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointerEXT, fn)
+#define CALL_IndexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_IndexPointerEXT, parameters)
+#define GET_IndexPointerEXT(disp) GET_by_offset(disp, _gloffset_IndexPointerEXT)
+#define SET_IndexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_IndexPointerEXT, fn)
+#define CALL_NormalPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_NormalPointerEXT, parameters)
+#define GET_NormalPointerEXT(disp) GET_by_offset(disp, _gloffset_NormalPointerEXT)
+#define SET_NormalPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_NormalPointerEXT, fn)
+#define CALL_TexCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_TexCoordPointerEXT, parameters)
+#define GET_TexCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_TexCoordPointerEXT)
+#define SET_TexCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointerEXT, fn)
+#define CALL_VertexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_VertexPointerEXT, parameters)
+#define GET_VertexPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexPointerEXT)
+#define SET_VertexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexPointerEXT, fn)
+#define CALL_PointParameterfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PointParameterfEXT, parameters)
+#define GET_PointParameterfEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfEXT)
+#define SET_PointParameterfEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfEXT, fn)
+#define CALL_PointParameterfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PointParameterfvEXT, parameters)
+#define GET_PointParameterfvEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfvEXT)
+#define SET_PointParameterfvEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfvEXT, fn)
+#define CALL_LockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei)), _gloffset_LockArraysEXT, parameters)
+#define GET_LockArraysEXT(disp) GET_by_offset(disp, _gloffset_LockArraysEXT)
+#define SET_LockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_LockArraysEXT, fn)
+#define CALL_UnlockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_UnlockArraysEXT, parameters)
+#define GET_UnlockArraysEXT(disp) GET_by_offset(disp, _gloffset_UnlockArraysEXT)
+#define SET_UnlockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_UnlockArraysEXT, fn)
+#define CALL_SecondaryColor3bEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_SecondaryColor3bEXT, parameters)
+#define GET_SecondaryColor3bEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bEXT)
+#define SET_SecondaryColor3bEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bEXT, fn)
+#define CALL_SecondaryColor3bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_SecondaryColor3bvEXT, parameters)
+#define GET_SecondaryColor3bvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bvEXT)
+#define SET_SecondaryColor3bvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bvEXT, fn)
+#define CALL_SecondaryColor3dEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_SecondaryColor3dEXT, parameters)
+#define GET_SecondaryColor3dEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dEXT)
+#define SET_SecondaryColor3dEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dEXT, fn)
+#define CALL_SecondaryColor3dvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_SecondaryColor3dvEXT, parameters)
+#define GET_SecondaryColor3dvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dvEXT)
+#define SET_SecondaryColor3dvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dvEXT, fn)
+#define CALL_SecondaryColor3fEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_SecondaryColor3fEXT, parameters)
+#define GET_SecondaryColor3fEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fEXT)
+#define SET_SecondaryColor3fEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fEXT, fn)
+#define CALL_SecondaryColor3fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_SecondaryColor3fvEXT, parameters)
+#define GET_SecondaryColor3fvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fvEXT)
+#define SET_SecondaryColor3fvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fvEXT, fn)
+#define CALL_SecondaryColor3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_SecondaryColor3iEXT, parameters)
+#define GET_SecondaryColor3iEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3iEXT)
+#define SET_SecondaryColor3iEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3iEXT, fn)
+#define CALL_SecondaryColor3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_SecondaryColor3ivEXT, parameters)
+#define GET_SecondaryColor3ivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ivEXT)
+#define SET_SecondaryColor3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ivEXT, fn)
+#define CALL_SecondaryColor3sEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_SecondaryColor3sEXT, parameters)
+#define GET_SecondaryColor3sEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3sEXT)
+#define SET_SecondaryColor3sEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3sEXT, fn)
+#define CALL_SecondaryColor3svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_SecondaryColor3svEXT, parameters)
+#define GET_SecondaryColor3svEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3svEXT)
+#define SET_SecondaryColor3svEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3svEXT, fn)
+#define CALL_SecondaryColor3ubEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_SecondaryColor3ubEXT, parameters)
+#define GET_SecondaryColor3ubEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubEXT)
+#define SET_SecondaryColor3ubEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubEXT, fn)
+#define CALL_SecondaryColor3ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_SecondaryColor3ubvEXT, parameters)
+#define GET_SecondaryColor3ubvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT)
+#define SET_SecondaryColor3ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT, fn)
+#define CALL_SecondaryColor3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_SecondaryColor3uiEXT, parameters)
+#define GET_SecondaryColor3uiEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uiEXT)
+#define SET_SecondaryColor3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uiEXT, fn)
+#define CALL_SecondaryColor3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_SecondaryColor3uivEXT, parameters)
+#define GET_SecondaryColor3uivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uivEXT)
+#define SET_SecondaryColor3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uivEXT, fn)
+#define CALL_SecondaryColor3usEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_SecondaryColor3usEXT, parameters)
+#define GET_SecondaryColor3usEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usEXT)
+#define SET_SecondaryColor3usEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usEXT, fn)
+#define CALL_SecondaryColor3usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_SecondaryColor3usvEXT, parameters)
+#define GET_SecondaryColor3usvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usvEXT)
+#define SET_SecondaryColor3usvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usvEXT, fn)
+#define CALL_SecondaryColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_SecondaryColorPointerEXT, parameters)
+#define GET_SecondaryColorPointerEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColorPointerEXT)
+#define SET_SecondaryColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColorPointerEXT, fn)
+#define CALL_MultiDrawArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *, const GLsizei *, GLsizei)), _gloffset_MultiDrawArraysEXT, parameters)
+#define GET_MultiDrawArraysEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawArraysEXT)
+#define SET_MultiDrawArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn)
+#define CALL_MultiDrawElementsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)), _gloffset_MultiDrawElementsEXT, parameters)
+#define GET_MultiDrawElementsEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsEXT)
+#define SET_MultiDrawElementsEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn)
+#define CALL_FogCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_FogCoordPointerEXT, parameters)
+#define GET_FogCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_FogCoordPointerEXT)
+#define SET_FogCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordPointerEXT, fn)
+#define CALL_FogCoorddEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_FogCoorddEXT, parameters)
+#define GET_FogCoorddEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddEXT)
+#define SET_FogCoorddEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddEXT, fn)
+#define CALL_FogCoorddvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_FogCoorddvEXT, parameters)
+#define GET_FogCoorddvEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddvEXT)
+#define SET_FogCoorddvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddvEXT, fn)
+#define CALL_FogCoordfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_FogCoordfEXT, parameters)
+#define GET_FogCoordfEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfEXT)
+#define SET_FogCoordfEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfEXT, fn)
+#define CALL_FogCoordfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_FogCoordfvEXT, parameters)
+#define GET_FogCoordfvEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfvEXT)
+#define SET_FogCoordfvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfvEXT, fn)
+#define CALL_PixelTexGenSGIX(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_PixelTexGenSGIX, parameters)
+#define GET_PixelTexGenSGIX(disp) GET_by_offset(disp, _gloffset_PixelTexGenSGIX)
+#define SET_PixelTexGenSGIX(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenSGIX, fn)
+#define CALL_BlendFuncSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateEXT, parameters)
+#define GET_BlendFuncSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateEXT)
+#define SET_BlendFuncSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateEXT, fn)
+#define CALL_FlushVertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_FlushVertexArrayRangeNV, parameters)
+#define GET_FlushVertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV)
+#define SET_FlushVertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV, fn)
+#define CALL_VertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_VertexArrayRangeNV, parameters)
+#define GET_VertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_VertexArrayRangeNV)
+#define SET_VertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_VertexArrayRangeNV, fn)
+#define CALL_CombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)), _gloffset_CombinerInputNV, parameters)
+#define GET_CombinerInputNV(disp) GET_by_offset(disp, _gloffset_CombinerInputNV)
+#define SET_CombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerInputNV, fn)
+#define CALL_CombinerOutputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)), _gloffset_CombinerOutputNV, parameters)
+#define GET_CombinerOutputNV(disp) GET_by_offset(disp, _gloffset_CombinerOutputNV)
+#define SET_CombinerOutputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerOutputNV, fn)
+#define CALL_CombinerParameterfNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_CombinerParameterfNV, parameters)
+#define GET_CombinerParameterfNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfNV)
+#define SET_CombinerParameterfNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfNV, fn)
+#define CALL_CombinerParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_CombinerParameterfvNV, parameters)
+#define GET_CombinerParameterfvNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfvNV)
+#define SET_CombinerParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfvNV, fn)
+#define CALL_CombinerParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_CombinerParameteriNV, parameters)
+#define GET_CombinerParameteriNV(disp) GET_by_offset(disp, _gloffset_CombinerParameteriNV)
+#define SET_CombinerParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameteriNV, fn)
+#define CALL_CombinerParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_CombinerParameterivNV, parameters)
+#define GET_CombinerParameterivNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterivNV)
+#define SET_CombinerParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterivNV, fn)
+#define CALL_FinalCombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_FinalCombinerInputNV, parameters)
+#define GET_FinalCombinerInputNV(disp) GET_by_offset(disp, _gloffset_FinalCombinerInputNV)
+#define SET_FinalCombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_FinalCombinerInputNV, fn)
+#define CALL_GetCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerInputParameterfvNV, parameters)
+#define GET_GetCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV)
+#define SET_GetCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV, fn)
+#define CALL_GetCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerInputParameterivNV, parameters)
+#define GET_GetCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV)
+#define SET_GetCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV, fn)
+#define CALL_GetCombinerOutputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerOutputParameterfvNV, parameters)
+#define GET_GetCombinerOutputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV)
+#define SET_GetCombinerOutputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV, fn)
+#define CALL_GetCombinerOutputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerOutputParameterivNV, parameters)
+#define GET_GetCombinerOutputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV)
+#define SET_GetCombinerOutputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV, fn)
+#define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetFinalCombinerInputParameterfvNV, parameters)
+#define GET_GetFinalCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV)
+#define SET_GetFinalCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV, fn)
+#define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetFinalCombinerInputParameterivNV, parameters)
+#define GET_GetFinalCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV)
+#define SET_GetFinalCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV, fn)
+#define CALL_ResizeBuffersMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResizeBuffersMESA, parameters)
+#define GET_ResizeBuffersMESA(disp) GET_by_offset(disp, _gloffset_ResizeBuffersMESA)
+#define SET_ResizeBuffersMESA(disp, fn) SET_by_offset(disp, _gloffset_ResizeBuffersMESA, fn)
+#define CALL_WindowPos2dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_WindowPos2dMESA, parameters)
+#define GET_WindowPos2dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dMESA)
+#define SET_WindowPos2dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dMESA, fn)
+#define CALL_WindowPos2dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos2dvMESA, parameters)
+#define GET_WindowPos2dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dvMESA)
+#define SET_WindowPos2dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dvMESA, fn)
+#define CALL_WindowPos2fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_WindowPos2fMESA, parameters)
+#define GET_WindowPos2fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fMESA)
+#define SET_WindowPos2fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fMESA, fn)
+#define CALL_WindowPos2fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos2fvMESA, parameters)
+#define GET_WindowPos2fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fvMESA)
+#define SET_WindowPos2fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fvMESA, fn)
+#define CALL_WindowPos2iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_WindowPos2iMESA, parameters)
+#define GET_WindowPos2iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2iMESA)
+#define SET_WindowPos2iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2iMESA, fn)
+#define CALL_WindowPos2ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos2ivMESA, parameters)
+#define GET_WindowPos2ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2ivMESA)
+#define SET_WindowPos2ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2ivMESA, fn)
+#define CALL_WindowPos2sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_WindowPos2sMESA, parameters)
+#define GET_WindowPos2sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2sMESA)
+#define SET_WindowPos2sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2sMESA, fn)
+#define CALL_WindowPos2svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos2svMESA, parameters)
+#define GET_WindowPos2svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2svMESA)
+#define SET_WindowPos2svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2svMESA, fn)
+#define CALL_WindowPos3dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos3dMESA, parameters)
+#define GET_WindowPos3dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dMESA)
+#define SET_WindowPos3dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dMESA, fn)
+#define CALL_WindowPos3dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos3dvMESA, parameters)
+#define GET_WindowPos3dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dvMESA)
+#define SET_WindowPos3dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dvMESA, fn)
+#define CALL_WindowPos3fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos3fMESA, parameters)
+#define GET_WindowPos3fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fMESA)
+#define SET_WindowPos3fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fMESA, fn)
+#define CALL_WindowPos3fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos3fvMESA, parameters)
+#define GET_WindowPos3fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fvMESA)
+#define SET_WindowPos3fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fvMESA, fn)
+#define CALL_WindowPos3iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_WindowPos3iMESA, parameters)
+#define GET_WindowPos3iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3iMESA)
+#define SET_WindowPos3iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3iMESA, fn)
+#define CALL_WindowPos3ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos3ivMESA, parameters)
+#define GET_WindowPos3ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3ivMESA)
+#define SET_WindowPos3ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3ivMESA, fn)
+#define CALL_WindowPos3sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_WindowPos3sMESA, parameters)
+#define GET_WindowPos3sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3sMESA)
+#define SET_WindowPos3sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3sMESA, fn)
+#define CALL_WindowPos3svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos3svMESA, parameters)
+#define GET_WindowPos3svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3svMESA)
+#define SET_WindowPos3svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3svMESA, fn)
+#define CALL_WindowPos4dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos4dMESA, parameters)
+#define GET_WindowPos4dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dMESA)
+#define SET_WindowPos4dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dMESA, fn)
+#define CALL_WindowPos4dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos4dvMESA, parameters)
+#define GET_WindowPos4dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dvMESA)
+#define SET_WindowPos4dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dvMESA, fn)
+#define CALL_WindowPos4fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos4fMESA, parameters)
+#define GET_WindowPos4fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fMESA)
+#define SET_WindowPos4fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fMESA, fn)
+#define CALL_WindowPos4fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos4fvMESA, parameters)
+#define GET_WindowPos4fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fvMESA)
+#define SET_WindowPos4fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fvMESA, fn)
+#define CALL_WindowPos4iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_WindowPos4iMESA, parameters)
+#define GET_WindowPos4iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4iMESA)
+#define SET_WindowPos4iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4iMESA, fn)
+#define CALL_WindowPos4ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos4ivMESA, parameters)
+#define GET_WindowPos4ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4ivMESA)
+#define SET_WindowPos4ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4ivMESA, fn)
+#define CALL_WindowPos4sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_WindowPos4sMESA, parameters)
+#define GET_WindowPos4sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4sMESA)
+#define SET_WindowPos4sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4sMESA, fn)
+#define CALL_WindowPos4svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos4svMESA, parameters)
+#define GET_WindowPos4svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4svMESA)
+#define SET_WindowPos4svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4svMESA, fn)
+#define CALL_MultiModeDrawArraysIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint)), _gloffset_MultiModeDrawArraysIBM, parameters)
+#define GET_MultiModeDrawArraysIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM)
+#define SET_MultiModeDrawArraysIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM, fn)
+#define CALL_MultiModeDrawElementsIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint)), _gloffset_MultiModeDrawElementsIBM, parameters)
+#define GET_MultiModeDrawElementsIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM)
+#define SET_MultiModeDrawElementsIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM, fn)
+#define CALL_DeleteFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFencesNV, parameters)
+#define GET_DeleteFencesNV(disp) GET_by_offset(disp, _gloffset_DeleteFencesNV)
+#define SET_DeleteFencesNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteFencesNV, fn)
+#define CALL_FinishFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_FinishFenceNV, parameters)
+#define GET_FinishFenceNV(disp) GET_by_offset(disp, _gloffset_FinishFenceNV)
+#define SET_FinishFenceNV(disp, fn) SET_by_offset(disp, _gloffset_FinishFenceNV, fn)
+#define CALL_GenFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFencesNV, parameters)
+#define GET_GenFencesNV(disp) GET_by_offset(disp, _gloffset_GenFencesNV)
+#define SET_GenFencesNV(disp, fn) SET_by_offset(disp, _gloffset_GenFencesNV, fn)
+#define CALL_GetFenceivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetFenceivNV, parameters)
+#define GET_GetFenceivNV(disp) GET_by_offset(disp, _gloffset_GetFenceivNV)
+#define SET_GetFenceivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFenceivNV, fn)
+#define CALL_IsFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFenceNV, parameters)
+#define GET_IsFenceNV(disp) GET_by_offset(disp, _gloffset_IsFenceNV)
+#define SET_IsFenceNV(disp, fn) SET_by_offset(disp, _gloffset_IsFenceNV, fn)
+#define CALL_SetFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_SetFenceNV, parameters)
+#define GET_SetFenceNV(disp) GET_by_offset(disp, _gloffset_SetFenceNV)
+#define SET_SetFenceNV(disp, fn) SET_by_offset(disp, _gloffset_SetFenceNV, fn)
+#define CALL_TestFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_TestFenceNV, parameters)
+#define GET_TestFenceNV(disp) GET_by_offset(disp, _gloffset_TestFenceNV)
+#define SET_TestFenceNV(disp, fn) SET_by_offset(disp, _gloffset_TestFenceNV, fn)
+#define CALL_AreProgramsResidentNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreProgramsResidentNV, parameters)
+#define GET_AreProgramsResidentNV(disp) GET_by_offset(disp, _gloffset_AreProgramsResidentNV)
+#define SET_AreProgramsResidentNV(disp, fn) SET_by_offset(disp, _gloffset_AreProgramsResidentNV, fn)
+#define CALL_BindProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindProgramNV, parameters)
+#define GET_BindProgramNV(disp) GET_by_offset(disp, _gloffset_BindProgramNV)
+#define SET_BindProgramNV(disp, fn) SET_by_offset(disp, _gloffset_BindProgramNV, fn)
+#define CALL_DeleteProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteProgramsNV, parameters)
+#define GET_DeleteProgramsNV(disp) GET_by_offset(disp, _gloffset_DeleteProgramsNV)
+#define SET_DeleteProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgramsNV, fn)
+#define CALL_ExecuteProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ExecuteProgramNV, parameters)
+#define GET_ExecuteProgramNV(disp) GET_by_offset(disp, _gloffset_ExecuteProgramNV)
+#define SET_ExecuteProgramNV(disp, fn) SET_by_offset(disp, _gloffset_ExecuteProgramNV, fn)
+#define CALL_GenProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenProgramsNV, parameters)
+#define GET_GenProgramsNV(disp) GET_by_offset(disp, _gloffset_GenProgramsNV)
+#define SET_GenProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_GenProgramsNV, fn)
+#define CALL_GetProgramParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLdouble *)), _gloffset_GetProgramParameterdvNV, parameters)
+#define GET_GetProgramParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterdvNV)
+#define SET_GetProgramParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterdvNV, fn)
+#define CALL_GetProgramParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLfloat *)), _gloffset_GetProgramParameterfvNV, parameters)
+#define GET_GetProgramParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterfvNV)
+#define SET_GetProgramParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterfvNV, fn)
+#define CALL_GetProgramStringNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), _gloffset_GetProgramStringNV, parameters)
+#define GET_GetProgramStringNV(disp) GET_by_offset(disp, _gloffset_GetProgramStringNV)
+#define SET_GetProgramStringNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringNV, fn)
+#define CALL_GetProgramivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramivNV, parameters)
+#define GET_GetProgramivNV(disp) GET_by_offset(disp, _gloffset_GetProgramivNV)
+#define SET_GetProgramivNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivNV, fn)
+#define CALL_GetTrackMatrixivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetTrackMatrixivNV, parameters)
+#define GET_GetTrackMatrixivNV(disp) GET_by_offset(disp, _gloffset_GetTrackMatrixivNV)
+#define SET_GetTrackMatrixivNV(disp, fn) SET_by_offset(disp, _gloffset_GetTrackMatrixivNV, fn)
+#define CALL_GetVertexAttribPointervNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLvoid **)), _gloffset_GetVertexAttribPointervNV, parameters)
+#define GET_GetVertexAttribPointervNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribPointervNV)
+#define SET_GetVertexAttribPointervNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribPointervNV, fn)
+#define CALL_GetVertexAttribdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvNV, parameters)
+#define GET_GetVertexAttribdvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvNV)
+#define SET_GetVertexAttribdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvNV, fn)
+#define CALL_GetVertexAttribfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvNV, parameters)
+#define GET_GetVertexAttribfvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvNV)
+#define SET_GetVertexAttribfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvNV, fn)
+#define CALL_GetVertexAttribivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivNV, parameters)
+#define GET_GetVertexAttribivNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivNV)
+#define SET_GetVertexAttribivNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivNV, fn)
+#define CALL_IsProgramNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgramNV, parameters)
+#define GET_IsProgramNV(disp) GET_by_offset(disp, _gloffset_IsProgramNV)
+#define SET_IsProgramNV(disp, fn) SET_by_offset(disp, _gloffset_IsProgramNV, fn)
+#define CALL_LoadProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLubyte *)), _gloffset_LoadProgramNV, parameters)
+#define GET_LoadProgramNV(disp) GET_by_offset(disp, _gloffset_LoadProgramNV)
+#define SET_LoadProgramNV(disp, fn) SET_by_offset(disp, _gloffset_LoadProgramNV, fn)
+#define CALL_ProgramParameters4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLdouble *)), _gloffset_ProgramParameters4dvNV, parameters)
+#define GET_ProgramParameters4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4dvNV)
+#define SET_ProgramParameters4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4dvNV, fn)
+#define CALL_ProgramParameters4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramParameters4fvNV, parameters)
+#define GET_ProgramParameters4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4fvNV)
+#define SET_ProgramParameters4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4fvNV, fn)
+#define CALL_RequestResidentProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_RequestResidentProgramsNV, parameters)
+#define GET_RequestResidentProgramsNV(disp) GET_by_offset(disp, _gloffset_RequestResidentProgramsNV)
+#define SET_RequestResidentProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_RequestResidentProgramsNV, fn)
+#define CALL_TrackMatrixNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLenum)), _gloffset_TrackMatrixNV, parameters)
+#define GET_TrackMatrixNV(disp) GET_by_offset(disp, _gloffset_TrackMatrixNV)
+#define SET_TrackMatrixNV(disp, fn) SET_by_offset(disp, _gloffset_TrackMatrixNV, fn)
+#define CALL_VertexAttrib1dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dNV, parameters)
+#define GET_VertexAttrib1dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dNV)
+#define SET_VertexAttrib1dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dNV, fn)
+#define CALL_VertexAttrib1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvNV, parameters)
+#define GET_VertexAttrib1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvNV)
+#define SET_VertexAttrib1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvNV, fn)
+#define CALL_VertexAttrib1fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fNV, parameters)
+#define GET_VertexAttrib1fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fNV)
+#define SET_VertexAttrib1fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fNV, fn)
+#define CALL_VertexAttrib1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvNV, parameters)
+#define GET_VertexAttrib1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvNV)
+#define SET_VertexAttrib1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvNV, fn)
+#define CALL_VertexAttrib1sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sNV, parameters)
+#define GET_VertexAttrib1sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sNV)
+#define SET_VertexAttrib1sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sNV, fn)
+#define CALL_VertexAttrib1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svNV, parameters)
+#define GET_VertexAttrib1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svNV)
+#define SET_VertexAttrib1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svNV, fn)
+#define CALL_VertexAttrib2dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dNV, parameters)
+#define GET_VertexAttrib2dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dNV)
+#define SET_VertexAttrib2dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dNV, fn)
+#define CALL_VertexAttrib2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvNV, parameters)
+#define GET_VertexAttrib2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvNV)
+#define SET_VertexAttrib2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvNV, fn)
+#define CALL_VertexAttrib2fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fNV, parameters)
+#define GET_VertexAttrib2fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fNV)
+#define SET_VertexAttrib2fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fNV, fn)
+#define CALL_VertexAttrib2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvNV, parameters)
+#define GET_VertexAttrib2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvNV)
+#define SET_VertexAttrib2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvNV, fn)
+#define CALL_VertexAttrib2sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sNV, parameters)
+#define GET_VertexAttrib2sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sNV)
+#define SET_VertexAttrib2sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sNV, fn)
+#define CALL_VertexAttrib2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svNV, parameters)
+#define GET_VertexAttrib2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svNV)
+#define SET_VertexAttrib2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svNV, fn)
+#define CALL_VertexAttrib3dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dNV, parameters)
+#define GET_VertexAttrib3dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dNV)
+#define SET_VertexAttrib3dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dNV, fn)
+#define CALL_VertexAttrib3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvNV, parameters)
+#define GET_VertexAttrib3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvNV)
+#define SET_VertexAttrib3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvNV, fn)
+#define CALL_VertexAttrib3fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fNV, parameters)
+#define GET_VertexAttrib3fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fNV)
+#define SET_VertexAttrib3fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fNV, fn)
+#define CALL_VertexAttrib3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvNV, parameters)
+#define GET_VertexAttrib3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvNV)
+#define SET_VertexAttrib3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvNV, fn)
+#define CALL_VertexAttrib3sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sNV, parameters)
+#define GET_VertexAttrib3sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sNV)
+#define SET_VertexAttrib3sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sNV, fn)
+#define CALL_VertexAttrib3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svNV, parameters)
+#define GET_VertexAttrib3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svNV)
+#define SET_VertexAttrib3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svNV, fn)
+#define CALL_VertexAttrib4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dNV, parameters)
+#define GET_VertexAttrib4dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dNV)
+#define SET_VertexAttrib4dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dNV, fn)
+#define CALL_VertexAttrib4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvNV, parameters)
+#define GET_VertexAttrib4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvNV)
+#define SET_VertexAttrib4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvNV, fn)
+#define CALL_VertexAttrib4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fNV, parameters)
+#define GET_VertexAttrib4fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fNV)
+#define SET_VertexAttrib4fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fNV, fn)
+#define CALL_VertexAttrib4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvNV, parameters)
+#define GET_VertexAttrib4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvNV)
+#define SET_VertexAttrib4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvNV, fn)
+#define CALL_VertexAttrib4sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sNV, parameters)
+#define GET_VertexAttrib4sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sNV)
+#define SET_VertexAttrib4sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sNV, fn)
+#define CALL_VertexAttrib4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svNV, parameters)
+#define GET_VertexAttrib4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svNV)
+#define SET_VertexAttrib4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svNV, fn)
+#define CALL_VertexAttrib4ubNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4ubNV, parameters)
+#define GET_VertexAttrib4ubNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubNV)
+#define SET_VertexAttrib4ubNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubNV, fn)
+#define CALL_VertexAttrib4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvNV, parameters)
+#define GET_VertexAttrib4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvNV)
+#define SET_VertexAttrib4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvNV, fn)
+#define CALL_VertexAttribPointerNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerNV, parameters)
+#define GET_VertexAttribPointerNV(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerNV)
+#define SET_VertexAttribPointerNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerNV, fn)
+#define CALL_VertexAttribs1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs1dvNV, parameters)
+#define GET_VertexAttribs1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1dvNV)
+#define SET_VertexAttribs1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1dvNV, fn)
+#define CALL_VertexAttribs1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs1fvNV, parameters)
+#define GET_VertexAttribs1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1fvNV)
+#define SET_VertexAttribs1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1fvNV, fn)
+#define CALL_VertexAttribs1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs1svNV, parameters)
+#define GET_VertexAttribs1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1svNV)
+#define SET_VertexAttribs1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1svNV, fn)
+#define CALL_VertexAttribs2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs2dvNV, parameters)
+#define GET_VertexAttribs2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2dvNV)
+#define SET_VertexAttribs2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2dvNV, fn)
+#define CALL_VertexAttribs2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs2fvNV, parameters)
+#define GET_VertexAttribs2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2fvNV)
+#define SET_VertexAttribs2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2fvNV, fn)
+#define CALL_VertexAttribs2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs2svNV, parameters)
+#define GET_VertexAttribs2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2svNV)
+#define SET_VertexAttribs2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2svNV, fn)
+#define CALL_VertexAttribs3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs3dvNV, parameters)
+#define GET_VertexAttribs3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3dvNV)
+#define SET_VertexAttribs3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3dvNV, fn)
+#define CALL_VertexAttribs3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs3fvNV, parameters)
+#define GET_VertexAttribs3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3fvNV)
+#define SET_VertexAttribs3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3fvNV, fn)
+#define CALL_VertexAttribs3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs3svNV, parameters)
+#define GET_VertexAttribs3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3svNV)
+#define SET_VertexAttribs3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3svNV, fn)
+#define CALL_VertexAttribs4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs4dvNV, parameters)
+#define GET_VertexAttribs4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4dvNV)
+#define SET_VertexAttribs4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4dvNV, fn)
+#define CALL_VertexAttribs4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs4fvNV, parameters)
+#define GET_VertexAttribs4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4fvNV)
+#define SET_VertexAttribs4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4fvNV, fn)
+#define CALL_VertexAttribs4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs4svNV, parameters)
+#define GET_VertexAttribs4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4svNV)
+#define SET_VertexAttribs4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4svNV, fn)
+#define CALL_VertexAttribs4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *)), _gloffset_VertexAttribs4ubvNV, parameters)
+#define GET_VertexAttribs4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4ubvNV)
+#define SET_VertexAttribs4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4ubvNV, fn)
+#define CALL_GetTexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetTexBumpParameterfvATI, parameters)
+#define GET_GetTexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI)
+#define SET_GetTexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI, fn)
+#define CALL_GetTexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetTexBumpParameterivATI, parameters)
+#define GET_GetTexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterivATI)
+#define SET_GetTexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterivATI, fn)
+#define CALL_TexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_TexBumpParameterfvATI, parameters)
+#define GET_TexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterfvATI)
+#define SET_TexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterfvATI, fn)
+#define CALL_TexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_TexBumpParameterivATI, parameters)
+#define GET_TexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterivATI)
+#define SET_TexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterivATI, fn)
+#define CALL_AlphaFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp1ATI, parameters)
+#define GET_AlphaFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI)
+#define SET_AlphaFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI, fn)
+#define CALL_AlphaFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp2ATI, parameters)
+#define GET_AlphaFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI)
+#define SET_AlphaFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI, fn)
+#define CALL_AlphaFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp3ATI, parameters)
+#define GET_AlphaFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI)
+#define SET_AlphaFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI, fn)
+#define CALL_BeginFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_BeginFragmentShaderATI, parameters)
+#define GET_BeginFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BeginFragmentShaderATI)
+#define SET_BeginFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BeginFragmentShaderATI, fn)
+#define CALL_BindFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindFragmentShaderATI, parameters)
+#define GET_BindFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BindFragmentShaderATI)
+#define SET_BindFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BindFragmentShaderATI, fn)
+#define CALL_ColorFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp1ATI, parameters)
+#define GET_ColorFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp1ATI)
+#define SET_ColorFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp1ATI, fn)
+#define CALL_ColorFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp2ATI, parameters)
+#define GET_ColorFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp2ATI)
+#define SET_ColorFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp2ATI, fn)
+#define CALL_ColorFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp3ATI, parameters)
+#define GET_ColorFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp3ATI)
+#define SET_ColorFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp3ATI, fn)
+#define CALL_DeleteFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteFragmentShaderATI, parameters)
+#define GET_DeleteFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_DeleteFragmentShaderATI)
+#define SET_DeleteFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_DeleteFragmentShaderATI, fn)
+#define CALL_EndFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndFragmentShaderATI, parameters)
+#define GET_EndFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_EndFragmentShaderATI)
+#define SET_EndFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_EndFragmentShaderATI, fn)
+#define CALL_GenFragmentShadersATI(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLuint)), _gloffset_GenFragmentShadersATI, parameters)
+#define GET_GenFragmentShadersATI(disp) GET_by_offset(disp, _gloffset_GenFragmentShadersATI)
+#define SET_GenFragmentShadersATI(disp, fn) SET_by_offset(disp, _gloffset_GenFragmentShadersATI, fn)
+#define CALL_PassTexCoordATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_PassTexCoordATI, parameters)
+#define GET_PassTexCoordATI(disp) GET_by_offset(disp, _gloffset_PassTexCoordATI)
+#define SET_PassTexCoordATI(disp, fn) SET_by_offset(disp, _gloffset_PassTexCoordATI, fn)
+#define CALL_SampleMapATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_SampleMapATI, parameters)
+#define GET_SampleMapATI(disp) GET_by_offset(disp, _gloffset_SampleMapATI)
+#define SET_SampleMapATI(disp, fn) SET_by_offset(disp, _gloffset_SampleMapATI, fn)
+#define CALL_SetFragmentShaderConstantATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_SetFragmentShaderConstantATI, parameters)
+#define GET_SetFragmentShaderConstantATI(disp) GET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI)
+#define SET_SetFragmentShaderConstantATI(disp, fn) SET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI, fn)
+#define CALL_PointParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PointParameteriNV, parameters)
+#define GET_PointParameteriNV(disp) GET_by_offset(disp, _gloffset_PointParameteriNV)
+#define SET_PointParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameteriNV, fn)
+#define CALL_PointParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PointParameterivNV, parameters)
+#define GET_PointParameterivNV(disp) GET_by_offset(disp, _gloffset_PointParameterivNV)
+#define SET_PointParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameterivNV, fn)
+#define CALL_ActiveStencilFaceEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveStencilFaceEXT, parameters)
+#define GET_ActiveStencilFaceEXT(disp) GET_by_offset(disp, _gloffset_ActiveStencilFaceEXT)
+#define SET_ActiveStencilFaceEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveStencilFaceEXT, fn)
+#define CALL_BindVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArrayAPPLE, parameters)
+#define GET_BindVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_BindVertexArrayAPPLE)
+#define SET_BindVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArrayAPPLE, fn)
+#define CALL_DeleteVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteVertexArraysAPPLE, parameters)
+#define GET_DeleteVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE)
+#define SET_DeleteVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE, fn)
+#define CALL_GenVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArraysAPPLE, parameters)
+#define GET_GenVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_GenVertexArraysAPPLE)
+#define SET_GenVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArraysAPPLE, fn)
+#define CALL_IsVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsVertexArrayAPPLE, parameters)
+#define GET_IsVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_IsVertexArrayAPPLE)
+#define SET_IsVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_IsVertexArrayAPPLE, fn)
+#define CALL_GetProgramNamedParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble *)), _gloffset_GetProgramNamedParameterdvNV, parameters)
+#define GET_GetProgramNamedParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV)
+#define SET_GetProgramNamedParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV, fn)
+#define CALL_GetProgramNamedParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat *)), _gloffset_GetProgramNamedParameterfvNV, parameters)
+#define GET_GetProgramNamedParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV)
+#define SET_GetProgramNamedParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV, fn)
+#define CALL_ProgramNamedParameter4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramNamedParameter4dNV, parameters)
+#define GET_ProgramNamedParameter4dNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV)
+#define SET_ProgramNamedParameter4dNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV, fn)
+#define CALL_ProgramNamedParameter4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLdouble *)), _gloffset_ProgramNamedParameter4dvNV, parameters)
+#define GET_ProgramNamedParameter4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV)
+#define SET_ProgramNamedParameter4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV, fn)
+#define CALL_ProgramNamedParameter4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramNamedParameter4fNV, parameters)
+#define GET_ProgramNamedParameter4fNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV)
+#define SET_ProgramNamedParameter4fNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV, fn)
+#define CALL_ProgramNamedParameter4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLfloat *)), _gloffset_ProgramNamedParameter4fvNV, parameters)
+#define GET_ProgramNamedParameter4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV)
+#define SET_ProgramNamedParameter4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV, fn)
+#define CALL_PrimitiveRestartIndexNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PrimitiveRestartIndexNV, parameters)
+#define GET_PrimitiveRestartIndexNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV)
+#define SET_PrimitiveRestartIndexNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV, fn)
+#define CALL_PrimitiveRestartNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PrimitiveRestartNV, parameters)
+#define GET_PrimitiveRestartNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartNV)
+#define SET_PrimitiveRestartNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartNV, fn)
+#define CALL_DepthBoundsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthBoundsEXT, parameters)
+#define GET_DepthBoundsEXT(disp) GET_by_offset(disp, _gloffset_DepthBoundsEXT)
+#define SET_DepthBoundsEXT(disp, fn) SET_by_offset(disp, _gloffset_DepthBoundsEXT, fn)
+#define CALL_BlendEquationSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendEquationSeparateEXT, parameters)
+#define GET_BlendEquationSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateEXT)
+#define SET_BlendEquationSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateEXT, fn)
+#define CALL_BindFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindFramebufferEXT, parameters)
+#define GET_BindFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BindFramebufferEXT)
+#define SET_BindFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFramebufferEXT, fn)
+#define CALL_BindRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindRenderbufferEXT, parameters)
+#define GET_BindRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_BindRenderbufferEXT)
+#define SET_BindRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindRenderbufferEXT, fn)
+#define CALL_CheckFramebufferStatusEXT(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum)), _gloffset_CheckFramebufferStatusEXT, parameters)
+#define GET_CheckFramebufferStatusEXT(disp) GET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT)
+#define SET_CheckFramebufferStatusEXT(disp, fn) SET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT, fn)
+#define CALL_DeleteFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFramebuffersEXT, parameters)
+#define GET_DeleteFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteFramebuffersEXT)
+#define SET_DeleteFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteFramebuffersEXT, fn)
+#define CALL_DeleteRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteRenderbuffersEXT, parameters)
+#define GET_DeleteRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT)
+#define SET_DeleteRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT, fn)
+#define CALL_FramebufferRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint)), _gloffset_FramebufferRenderbufferEXT, parameters)
+#define GET_FramebufferRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT)
+#define SET_FramebufferRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT, fn)
+#define CALL_FramebufferTexture1DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture1DEXT, parameters)
+#define GET_FramebufferTexture1DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture1DEXT)
+#define SET_FramebufferTexture1DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture1DEXT, fn)
+#define CALL_FramebufferTexture2DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture2DEXT, parameters)
+#define GET_FramebufferTexture2DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture2DEXT)
+#define SET_FramebufferTexture2DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture2DEXT, fn)
+#define CALL_FramebufferTexture3DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTexture3DEXT, parameters)
+#define GET_FramebufferTexture3DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture3DEXT)
+#define SET_FramebufferTexture3DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture3DEXT, fn)
+#define CALL_GenFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFramebuffersEXT, parameters)
+#define GET_GenFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_GenFramebuffersEXT)
+#define SET_GenFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenFramebuffersEXT, fn)
+#define CALL_GenRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenRenderbuffersEXT, parameters)
+#define GET_GenRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_GenRenderbuffersEXT)
+#define SET_GenRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenRenderbuffersEXT, fn)
+#define CALL_GenerateMipmapEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_GenerateMipmapEXT, parameters)
+#define GET_GenerateMipmapEXT(disp) GET_by_offset(disp, _gloffset_GenerateMipmapEXT)
+#define SET_GenerateMipmapEXT(disp, fn) SET_by_offset(disp, _gloffset_GenerateMipmapEXT, fn)
+#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetFramebufferAttachmentParameterivEXT, parameters)
+#define GET_GetFramebufferAttachmentParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT)
+#define SET_GetFramebufferAttachmentParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT, fn)
+#define CALL_GetRenderbufferParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetRenderbufferParameterivEXT, parameters)
+#define GET_GetRenderbufferParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT)
+#define SET_GetRenderbufferParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT, fn)
+#define CALL_IsFramebufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFramebufferEXT, parameters)
+#define GET_IsFramebufferEXT(disp) GET_by_offset(disp, _gloffset_IsFramebufferEXT)
+#define SET_IsFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsFramebufferEXT, fn)
+#define CALL_IsRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsRenderbufferEXT, parameters)
+#define GET_IsRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_IsRenderbufferEXT)
+#define SET_IsRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsRenderbufferEXT, fn)
+#define CALL_RenderbufferStorageEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageEXT, parameters)
+#define GET_RenderbufferStorageEXT(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageEXT)
+#define SET_RenderbufferStorageEXT(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageEXT, fn)
+#define CALL_BlitFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)), _gloffset_BlitFramebufferEXT, parameters)
+#define GET_BlitFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BlitFramebufferEXT)
+#define SET_BlitFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BlitFramebufferEXT, fn)
+#define CALL_BufferParameteriAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_BufferParameteriAPPLE, parameters)
+#define GET_BufferParameteriAPPLE(disp) GET_by_offset(disp, _gloffset_BufferParameteriAPPLE)
+#define SET_BufferParameteriAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BufferParameteriAPPLE, fn)
+#define CALL_FlushMappedBufferRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRangeAPPLE, parameters)
+#define GET_FlushMappedBufferRangeAPPLE(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE)
+#define SET_FlushMappedBufferRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE, fn)
+#define CALL_BindFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, const GLchar *)), _gloffset_BindFragDataLocationEXT, parameters)
+#define GET_BindFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_BindFragDataLocationEXT)
+#define SET_BindFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFragDataLocationEXT, fn)
+#define CALL_GetFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLuint, const GLchar *)), _gloffset_GetFragDataLocationEXT, parameters)
+#define GET_GetFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_GetFragDataLocationEXT)
+#define SET_GetFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFragDataLocationEXT, fn)
+#define CALL_GetUniformuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLuint *)), _gloffset_GetUniformuivEXT, parameters)
+#define GET_GetUniformuivEXT(disp) GET_by_offset(disp, _gloffset_GetUniformuivEXT)
+#define SET_GetUniformuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetUniformuivEXT, fn)
+#define CALL_GetVertexAttribIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribIivEXT, parameters)
+#define GET_GetVertexAttribIivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIivEXT)
+#define SET_GetVertexAttribIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIivEXT, fn)
+#define CALL_GetVertexAttribIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetVertexAttribIuivEXT, parameters)
+#define GET_GetVertexAttribIuivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT)
+#define SET_GetVertexAttribIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT, fn)
+#define CALL_Uniform1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint)), _gloffset_Uniform1uiEXT, parameters)
+#define GET_Uniform1uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uiEXT)
+#define SET_Uniform1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uiEXT, fn)
+#define CALL_Uniform1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform1uivEXT, parameters)
+#define GET_Uniform1uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uivEXT)
+#define SET_Uniform1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uivEXT, fn)
+#define CALL_Uniform2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint)), _gloffset_Uniform2uiEXT, parameters)
+#define GET_Uniform2uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uiEXT)
+#define SET_Uniform2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uiEXT, fn)
+#define CALL_Uniform2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform2uivEXT, parameters)
+#define GET_Uniform2uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uivEXT)
+#define SET_Uniform2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uivEXT, fn)
+#define CALL_Uniform3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint)), _gloffset_Uniform3uiEXT, parameters)
+#define GET_Uniform3uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uiEXT)
+#define SET_Uniform3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uiEXT, fn)
+#define CALL_Uniform3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform3uivEXT, parameters)
+#define GET_Uniform3uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uivEXT)
+#define SET_Uniform3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uivEXT, fn)
+#define CALL_Uniform4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint, GLuint)), _gloffset_Uniform4uiEXT, parameters)
+#define GET_Uniform4uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uiEXT)
+#define SET_Uniform4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uiEXT, fn)
+#define CALL_Uniform4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform4uivEXT, parameters)
+#define GET_Uniform4uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uivEXT)
+#define SET_Uniform4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uivEXT, fn)
+#define CALL_VertexAttribI1iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint)), _gloffset_VertexAttribI1iEXT, parameters)
+#define GET_VertexAttribI1iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1iEXT)
+#define SET_VertexAttribI1iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1iEXT, fn)
+#define CALL_VertexAttribI1ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI1ivEXT, parameters)
+#define GET_VertexAttribI1ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1ivEXT)
+#define SET_VertexAttribI1ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1ivEXT, fn)
+#define CALL_VertexAttribI1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribI1uiEXT, parameters)
+#define GET_VertexAttribI1uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uiEXT)
+#define SET_VertexAttribI1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uiEXT, fn)
+#define CALL_VertexAttribI1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI1uivEXT, parameters)
+#define GET_VertexAttribI1uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uivEXT)
+#define SET_VertexAttribI1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uivEXT, fn)
+#define CALL_VertexAttribI2iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint)), _gloffset_VertexAttribI2iEXT, parameters)
+#define GET_VertexAttribI2iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2iEXT)
+#define SET_VertexAttribI2iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2iEXT, fn)
+#define CALL_VertexAttribI2ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI2ivEXT, parameters)
+#define GET_VertexAttribI2ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2ivEXT)
+#define SET_VertexAttribI2ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2ivEXT, fn)
+#define CALL_VertexAttribI2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_VertexAttribI2uiEXT, parameters)
+#define GET_VertexAttribI2uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uiEXT)
+#define SET_VertexAttribI2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uiEXT, fn)
+#define CALL_VertexAttribI2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI2uivEXT, parameters)
+#define GET_VertexAttribI2uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uivEXT)
+#define SET_VertexAttribI2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uivEXT, fn)
+#define CALL_VertexAttribI3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint)), _gloffset_VertexAttribI3iEXT, parameters)
+#define GET_VertexAttribI3iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3iEXT)
+#define SET_VertexAttribI3iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3iEXT, fn)
+#define CALL_VertexAttribI3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI3ivEXT, parameters)
+#define GET_VertexAttribI3ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3ivEXT)
+#define SET_VertexAttribI3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3ivEXT, fn)
+#define CALL_VertexAttribI3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI3uiEXT, parameters)
+#define GET_VertexAttribI3uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uiEXT)
+#define SET_VertexAttribI3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uiEXT, fn)
+#define CALL_VertexAttribI3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI3uivEXT, parameters)
+#define GET_VertexAttribI3uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uivEXT)
+#define SET_VertexAttribI3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uivEXT, fn)
+#define CALL_VertexAttribI4bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttribI4bvEXT, parameters)
+#define GET_VertexAttribI4bvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4bvEXT)
+#define SET_VertexAttribI4bvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4bvEXT, fn)
+#define CALL_VertexAttribI4iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint, GLint)), _gloffset_VertexAttribI4iEXT, parameters)
+#define GET_VertexAttribI4iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4iEXT)
+#define SET_VertexAttribI4iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4iEXT, fn)
+#define CALL_VertexAttribI4ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI4ivEXT, parameters)
+#define GET_VertexAttribI4ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ivEXT)
+#define SET_VertexAttribI4ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ivEXT, fn)
+#define CALL_VertexAttribI4svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttribI4svEXT, parameters)
+#define GET_VertexAttribI4svEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4svEXT)
+#define SET_VertexAttribI4svEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4svEXT, fn)
+#define CALL_VertexAttribI4ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttribI4ubvEXT, parameters)
+#define GET_VertexAttribI4ubvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT)
+#define SET_VertexAttribI4ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT, fn)
+#define CALL_VertexAttribI4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI4uiEXT, parameters)
+#define GET_VertexAttribI4uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uiEXT)
+#define SET_VertexAttribI4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uiEXT, fn)
+#define CALL_VertexAttribI4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI4uivEXT, parameters)
+#define GET_VertexAttribI4uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uivEXT)
+#define SET_VertexAttribI4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uivEXT, fn)
+#define CALL_VertexAttribI4usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttribI4usvEXT, parameters)
+#define GET_VertexAttribI4usvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4usvEXT)
+#define SET_VertexAttribI4usvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4usvEXT, fn)
+#define CALL_VertexAttribIPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribIPointerEXT, parameters)
+#define GET_VertexAttribIPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribIPointerEXT)
+#define SET_VertexAttribIPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribIPointerEXT, fn)
+#define CALL_FramebufferTextureLayerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTextureLayerEXT, parameters)
+#define GET_FramebufferTextureLayerEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT)
+#define SET_FramebufferTextureLayerEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT, fn)
+#define CALL_ColorMaskIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMaskIndexedEXT, parameters)
+#define GET_ColorMaskIndexedEXT(disp) GET_by_offset(disp, _gloffset_ColorMaskIndexedEXT)
+#define SET_ColorMaskIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorMaskIndexedEXT, fn)
+#define CALL_DisableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DisableIndexedEXT, parameters)
+#define GET_DisableIndexedEXT(disp) GET_by_offset(disp, _gloffset_DisableIndexedEXT)
+#define SET_DisableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_DisableIndexedEXT, fn)
+#define CALL_EnableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_EnableIndexedEXT, parameters)
+#define GET_EnableIndexedEXT(disp) GET_by_offset(disp, _gloffset_EnableIndexedEXT)
+#define SET_EnableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_EnableIndexedEXT, fn)
+#define CALL_GetBooleanIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLboolean *)), _gloffset_GetBooleanIndexedvEXT, parameters)
+#define GET_GetBooleanIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT)
+#define SET_GetBooleanIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT, fn)
+#define CALL_GetIntegerIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint *)), _gloffset_GetIntegerIndexedvEXT, parameters)
+#define GET_GetIntegerIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT)
+#define SET_GetIntegerIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT, fn)
+#define CALL_IsEnabledIndexedEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_IsEnabledIndexedEXT, parameters)
+#define GET_IsEnabledIndexedEXT(disp) GET_by_offset(disp, _gloffset_IsEnabledIndexedEXT)
+#define SET_IsEnabledIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_IsEnabledIndexedEXT, fn)
+#define CALL_ClearColorIiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_ClearColorIiEXT, parameters)
+#define GET_ClearColorIiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIiEXT)
+#define SET_ClearColorIiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIiEXT, fn)
+#define CALL_ClearColorIuiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_ClearColorIuiEXT, parameters)
+#define GET_ClearColorIuiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIuiEXT)
+#define SET_ClearColorIuiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIuiEXT, fn)
+#define CALL_GetTexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameterIivEXT, parameters)
+#define GET_GetTexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIivEXT)
+#define SET_GetTexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIivEXT, fn)
+#define CALL_GetTexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint *)), _gloffset_GetTexParameterIuivEXT, parameters)
+#define GET_GetTexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIuivEXT)
+#define SET_GetTexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIuivEXT, fn)
+#define CALL_TexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameterIivEXT, parameters)
+#define GET_TexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIivEXT)
+#define SET_TexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIivEXT, fn)
+#define CALL_TexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLuint *)), _gloffset_TexParameterIuivEXT, parameters)
+#define GET_TexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIuivEXT)
+#define SET_TexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIuivEXT, fn)
+#define CALL_BeginConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BeginConditionalRenderNV, parameters)
+#define GET_BeginConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_BeginConditionalRenderNV)
+#define SET_BeginConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_BeginConditionalRenderNV, fn)
+#define CALL_EndConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndConditionalRenderNV, parameters)
+#define GET_EndConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_EndConditionalRenderNV)
+#define SET_EndConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_EndConditionalRenderNV, fn)
+#define CALL_BeginTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BeginTransformFeedbackEXT, parameters)
+#define GET_BeginTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT)
+#define SET_BeginTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT, fn)
+#define CALL_BindBufferBaseEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint)), _gloffset_BindBufferBaseEXT, parameters)
+#define GET_BindBufferBaseEXT(disp) GET_by_offset(disp, _gloffset_BindBufferBaseEXT)
+#define SET_BindBufferBaseEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferBaseEXT, fn)
+#define CALL_BindBufferOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr)), _gloffset_BindBufferOffsetEXT, parameters)
+#define GET_BindBufferOffsetEXT(disp) GET_by_offset(disp, _gloffset_BindBufferOffsetEXT)
+#define SET_BindBufferOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferOffsetEXT, fn)
+#define CALL_BindBufferRangeEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)), _gloffset_BindBufferRangeEXT, parameters)
+#define GET_BindBufferRangeEXT(disp) GET_by_offset(disp, _gloffset_BindBufferRangeEXT)
+#define SET_BindBufferRangeEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferRangeEXT, fn)
+#define CALL_EndTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndTransformFeedbackEXT, parameters)
+#define GET_EndTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_EndTransformFeedbackEXT)
+#define SET_EndTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_EndTransformFeedbackEXT, fn)
+#define CALL_GetTransformFeedbackVaryingEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)), _gloffset_GetTransformFeedbackVaryingEXT, parameters)
+#define GET_GetTransformFeedbackVaryingEXT(disp) GET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT)
+#define SET_GetTransformFeedbackVaryingEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT, fn)
+#define CALL_TransformFeedbackVaryingsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const char **, GLenum)), _gloffset_TransformFeedbackVaryingsEXT, parameters)
+#define GET_TransformFeedbackVaryingsEXT(disp) GET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT)
+#define SET_TransformFeedbackVaryingsEXT(disp, fn) SET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT, fn)
+#define CALL_ProvokingVertexEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ProvokingVertexEXT, parameters)
+#define GET_ProvokingVertexEXT(disp) GET_by_offset(disp, _gloffset_ProvokingVertexEXT)
+#define SET_ProvokingVertexEXT(disp, fn) SET_by_offset(disp, _gloffset_ProvokingVertexEXT, fn)
+#define CALL_GetTexParameterPointervAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetTexParameterPointervAPPLE, parameters)
+#define GET_GetTexParameterPointervAPPLE(disp) GET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE)
+#define SET_GetTexParameterPointervAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE, fn)
+#define CALL_TextureRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLvoid *)), _gloffset_TextureRangeAPPLE, parameters)
+#define GET_TextureRangeAPPLE(disp) GET_by_offset(disp, _gloffset_TextureRangeAPPLE)
+#define SET_TextureRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_TextureRangeAPPLE, fn)
+#define CALL_GetObjectParameterivAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetObjectParameterivAPPLE, parameters)
+#define GET_GetObjectParameterivAPPLE(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE)
+#define SET_GetObjectParameterivAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE, fn)
+#define CALL_ObjectPurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectPurgeableAPPLE, parameters)
+#define GET_ObjectPurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE)
+#define SET_ObjectPurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE, fn)
+#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectUnpurgeableAPPLE, parameters)
+#define GET_ObjectUnpurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE)
+#define SET_ObjectUnpurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE, fn)
+#define CALL_ActiveProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ActiveProgramEXT, parameters)
+#define GET_ActiveProgramEXT(disp) GET_by_offset(disp, _gloffset_ActiveProgramEXT)
+#define SET_ActiveProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveProgramEXT, fn)
+#define CALL_CreateShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum, const GLchar *)), _gloffset_CreateShaderProgramEXT, parameters)
+#define GET_CreateShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_CreateShaderProgramEXT)
+#define SET_CreateShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderProgramEXT, fn)
+#define CALL_UseShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_UseShaderProgramEXT, parameters)
+#define GET_UseShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_UseShaderProgramEXT)
+#define SET_UseShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_UseShaderProgramEXT, fn)
+#define CALL_TextureBarrierNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_TextureBarrierNV, parameters)
+#define GET_TextureBarrierNV(disp) GET_by_offset(disp, _gloffset_TextureBarrierNV)
+#define SET_TextureBarrierNV(disp, fn) SET_by_offset(disp, _gloffset_TextureBarrierNV, fn)
+#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparateATI, parameters)
+#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparateATI)
+#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparateATI, fn)
+#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramEnvParameters4fvEXT, parameters)
+#define GET_ProgramEnvParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT)
+#define SET_ProgramEnvParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT, fn)
+#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramLocalParameters4fvEXT, parameters)
+#define GET_ProgramLocalParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT)
+#define SET_ProgramLocalParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT, fn)
+#define CALL_GetQueryObjecti64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint64EXT *)), _gloffset_GetQueryObjecti64vEXT, parameters)
+#define GET_GetQueryObjecti64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT)
+#define SET_GetQueryObjecti64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT, fn)
+#define CALL_GetQueryObjectui64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint64EXT *)), _gloffset_GetQueryObjectui64vEXT, parameters)
+#define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT)
+#define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT, fn)
+#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetRenderbufferStorageOES, parameters)
+#define GET_EGLImageTargetRenderbufferStorageOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES)
+#define SET_EGLImageTargetRenderbufferStorageOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn)
+#define CALL_EGLImageTargetTexture2DOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetTexture2DOES, parameters)
+#define GET_EGLImageTargetTexture2DOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES)
+#define SET_EGLImageTargetTexture2DOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn)
-#endif /* !defined( _DISPATCH_H_ ) */
+#endif /* !defined( _GLAPI_DISPATCH_H_ ) */
diff --git a/xorg-server/glx/glapi.c b/xorg-server/glx/glapi.c
index 209ae50c0..7c75d2d5a 100644
--- a/xorg-server/glx/glapi.c
+++ b/xorg-server/glx/glapi.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 7.1
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -54,7 +54,11 @@
#include <dix-config.h>
#include <X11/Xfuncproto.h>
+#ifdef _MSC_VER
+#define PUBLIC _declspec(dllexport)
+#else
#define PUBLIC _X_EXPORT
+#endif
#else
@@ -67,15 +71,19 @@
#ifdef DEBUG
#include <assert.h>
#endif
+#include <unistd.h>
#include "glapi.h"
-#include "glapioffsets.h"
+#include "GL/gl.h"
+#include "GL/glext.h"
#include "glapitable.h"
+#define FIRST_DYNAMIC_OFFSET (sizeof(struct _glapi_table) / sizeof(void *))
+
/***** BEGIN NO-OP DISPATCH *****/
static GLboolean WarnFlag = GL_FALSE;
-static _glapi_warning_func warning_func;
+static _glapi_proc warning_func;
#if defined(PTHREADS) || defined(GLX_USE_TLS)
static void init_glapi_relocs(void);
@@ -83,74 +91,81 @@ static void init_glapi_relocs(void);
static _glapi_proc generate_entrypoint(GLuint functionOffset);
static void fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset);
+static void init_glapi_relocs_once( void );
-/*
- * Enable/disable printing of warning messages.
- */
-PUBLIC void
-_glapi_noop_enable_warnings(GLboolean enable)
+void _GLAPI_EXPORT
+_glapi_noop_enable_warnings(unsigned char enable)
{
- WarnFlag = enable;
}
-/*
- * Register a callback function for reporting errors.
- */
-PUBLIC void
-_glapi_set_warning_func( _glapi_warning_func func )
+void _GLAPI_EXPORT
+_glapi_set_warning_func(_glapi_proc func)
{
- warning_func = func;
}
-static GLboolean
-warn(void)
+#ifdef DEBUG
+
+/**
+ * Called by each of the no-op GL entrypoints.
+ */
+static int
+Warn(const char *func)
{
- if ((WarnFlag || getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG"))
- && warning_func) {
- return GL_TRUE;
- }
- else {
- return GL_FALSE;
+#if !defined(_WIN32_WCE)
+ if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
+ fprintf(stderr, "GL User Error: gl%s called without a rendering context\n",
+ func);
}
+#endif
+ return 0;
}
-#if defined(__GNUC__) && (__GNUC__ > 2)
-#define possibly_unused __attribute((unused))
-#else
-#define possibly_unused
-#endif
+/**
+ * This is called if the user somehow calls an unassigned GL dispatch function.
+ */
+static GLint
+NoOpUnused(void)
+{
+ return Warn(" function");
+}
+
+/*
+ * Defines for the glapitemp.h functions.
+ */
#define KEYWORD1 static
#define KEYWORD1_ALT static
-#define KEYWORD2 GLAPIENTRY possibly_unused
+#define KEYWORD2 GLAPIENTRY
#define NAME(func) NoOp##func
+#define DISPATCH(func, args, msg) Warn(#func);
+#define RETURN_DISPATCH(func, args, msg) Warn(#func); return 0
-#define F NULL
-
-#define DISPATCH(func, args, msg) \
- if (warn()) { \
- warning_func(NULL, "GL User Error: called without context: %s", #func); \
- }
-
-#define RETURN_DISPATCH(func, args, msg) \
- if (warn()) { \
- warning_func(NULL, "GL User Error: called without context: %s", #func); \
- } \
- return 0
-
-#define DISPATCH_TABLE_NAME __glapi_noop_table
-#define UNUSED_TABLE_NAME __unused_noop_functions
+/*
+ * Defines for the table of no-op entry points.
+ */
#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
-static GLint NoOpUnused(void)
+#else
+
+static int
+NoOpGeneric(void)
{
- if (warn()) {
- warning_func(NULL, "GL User Error: calling extension function without a current context\n");
+#if !defined(_WIN32_WCE)
+ if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
+ fprintf(stderr, "GL User Error: calling GL function without a rendering context\n");
}
+#endif
return 0;
}
+#define TABLE_ENTRY(name) (_glapi_proc) NoOpGeneric
+
+#endif
+
+#define DISPATCH_TABLE_NAME __glapi_noop_table
+#define UNUSED_TABLE_NAME __unused_noop_functions
+
#include "glapitemp.h"
/***** END NO-OP DISPATCH *****/
@@ -175,6 +190,12 @@ static GLint NoOpUnused(void)
* static dispatch functions access these variables via \c _glapi_get_dispatch
* and \c _glapi_get_context.
*
+ * There is a race condition in setting \c _glapi_Dispatch to \c NULL. It is
+ * possible for the original thread to be setting it at the same instant a new
+ * thread, perhaps running on a different processor, is clearing it. Because
+ * of that, \c ThreadSafe, which can only ever be changed to \c GL_TRUE, is
+ * used to determine whether or not the application is multithreaded.
+ *
* In the TLS case, the variables \c _glapi_Dispatch and \c _glapi_Context are
* hardcoded to \c NULL. Instead the TLS variables \c _glapi_tls_Dispatch and
* \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and
@@ -192,6 +213,7 @@ PUBLIC __thread void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL;
+
PUBLIC const void *_glapi_Context = NULL;
#else
@@ -199,60 +221,80 @@ PUBLIC const void *_glapi_Context = NULL;
#if defined(THREADS)
_glthread_TSD _gl_DispatchTSD; /**< Per-thread dispatch pointer */
-static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
-#if defined(WIN32_THREADS)
-void FreeTSD(_glthread_TSD *p);
-void FreeAllTSD(void)
-{
- FreeTSD(&_gl_DispatchTSD);
- FreeTSD(&ContextTSD);
-}
-#endif /* defined(WIN32_THREADS) */
+static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
#endif /* defined(THREADS) */
-PUBLIC struct _glapi_table *_glapi_Dispatch =
- (struct _glapi_table *) __glapi_noop_table;
+PUBLIC struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table;
+
PUBLIC void *_glapi_Context = NULL;
#endif /* defined(GLX_USE_TLS) */
/*@}*/
-/**
- * strdup() is actually not a standard ANSI C or POSIX routine.
- * Irix will not define it if ANSI mode is in effect.
- */
-static char *
-str_dup(const char *str)
+
+#if defined(THREADS) && !defined(GLX_USE_TLS)
+
+void
+_glapi_init_multithread(void)
{
- char *copy;
- copy = (char*) malloc(strlen(str) + 1);
- if (!copy)
- return NULL;
- strcpy(copy, str);
- return copy;
+ _glthread_InitTSD(&_gl_DispatchTSD);
+ _glthread_InitTSD(&ContextTSD);
}
+void
+_glapi_destroy_multithread(void)
+{
+#ifdef WIN32_THREADS
+ _glthread_DestroyTSD(&_gl_DispatchTSD);
+ _glthread_DestroyTSD(&ContextTSD);
+#endif
+}
-/*
+/**
+ * Mutex for multithread check.
+ */
+#ifdef WIN32_THREADS
+/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */
+#define CHECK_MULTITHREAD_LOCK()
+#define CHECK_MULTITHREAD_UNLOCK()
+#else
+_glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex);
+#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex)
+#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex)
+#endif
+/**
* xserver's gl is not multithreaded, we promise.
*/
PUBLIC void
_glapi_check_multithread(void)
{
}
+#else
+
+void
+_glapi_init_multithread(void) { }
+
+void
+_glapi_destroy_multithread(void) { }
+
+PUBLIC void
+_glapi_check_multithread(void) { }
+
+#endif
+
+
/**
* Set the current context pointer for this thread.
* The context pointer is an opaque type which should be cast to
* void from the real context pointer type.
*/
-PUBLIC void
+void
_glapi_set_context(void *context)
{
- (void) __unused_noop_functions; /* silence a warning */
#if defined(GLX_USE_TLS)
_glapi_tls_Context = context;
#elif defined(THREADS)
@@ -270,7 +312,7 @@ _glapi_set_context(void *context)
* The context pointer is an opaque type which should be cast from
* void to the real context pointer type.
*/
-PUBLIC void *
+void *
_glapi_get_context(void)
{
#if defined(GLX_USE_TLS)
@@ -287,27 +329,21 @@ _glapi_get_context(void)
* If the dispatch parameter is NULL we'll plug in the no-op dispatch
* table (__glapi_noop_table).
*/
-PUBLIC void
+void
_glapi_set_dispatch(struct _glapi_table *dispatch)
{
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
- static pthread_once_t once_control = PTHREAD_ONCE_INIT;
- pthread_once( & once_control, init_glapi_relocs );
-#endif
+ init_glapi_relocs_once();
- if (!dispatch) {
+ if (dispatch == NULL) {
/* use the no-op functions */
dispatch = (struct _glapi_table *) __glapi_noop_table;
}
#if defined(GLX_USE_TLS)
_glapi_tls_Dispatch = dispatch;
-#elif defined(THREADS)
- _glthread_SetTSD(&_gl_DispatchTSD, (void *) dispatch);
- _glapi_Dispatch = dispatch;
-#else /*THREADS*/
+#else
_glapi_Dispatch = dispatch;
-#endif /*THREADS*/
+#endif
}
@@ -315,16 +351,14 @@ _glapi_set_dispatch(struct _glapi_table *dispatch)
/**
* Return pointer to current dispatch table for calling thread.
*/
-PUBLIC struct _glapi_table *
+struct _glapi_table *
_glapi_get_dispatch(void)
{
- struct _glapi_table * api;
#if defined(GLX_USE_TLS)
- api = _glapi_tls_Dispatch;
+ return _glapi_tls_Dispatch;
#else
- api = _glapi_Dispatch;
+ return _glapi_Dispatch;
#endif
- return api;
}
@@ -334,16 +368,22 @@ _glapi_get_dispatch(void)
*** functionality.
***/
-#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 16
-#elif defined(USE_X86_ASM)
-# if defined(THREADS) && !defined(GLX_USE_TLS)
+#if defined(USE_X86_ASM)
+# if defined(GLX_USE_TLS)
+# define DISPATCH_FUNCTION_SIZE 16
+# elif defined(THREADS)
# define DISPATCH_FUNCTION_SIZE 32
# else
# define DISPATCH_FUNCTION_SIZE 16
# endif
#endif
+#if defined(USE_X64_64_ASM)
+# if defined(GLX_USE_TLS)
+# define DISPATCH_FUNCTION_SIZE 16
+# endif
+#endif
+
#if !defined(DISPATCH_FUNCTION_SIZE) && !defined(XFree86Server) && !defined(XGLServer)
# define NEED_FUNCTION_POINTER
#endif
@@ -357,12 +397,18 @@ _glapi_get_dispatch(void)
* and return the corresponding glprocs_table_t entry.
*/
static const glprocs_table_t *
-find_entry( const char * n )
+get_static_proc( const char * n )
{
GLuint i;
for (i = 0; static_functions[i].Name_offset >= 0; i++) {
const char *testName = gl_string_table + static_functions[i].Name_offset;
- if (strcmp(testName, n) == 0) {
+#ifdef MANGLE
+ /* skip the prefix on the name */
+ if (strcmp(testName, n + 1) == 0)
+#else
+ if (strcmp(testName, n) == 0)
+#endif
+ {
return &static_functions[i];
}
}
@@ -377,72 +423,28 @@ find_entry( const char * n )
static GLint
get_static_proc_offset(const char *funcName)
{
- const glprocs_table_t * const f = find_entry( funcName );
- if (f) {
- return f->Offset;
+ const glprocs_table_t * const f = get_static_proc( funcName );
+ if (f == NULL) {
+ return -1;
}
- return -1;
-}
-
-
-#if !defined(XFree86Server) && !defined(XGLServer)
-#ifdef USE_X86_ASM
-
-#if defined( GLX_USE_TLS )
-extern GLubyte gl_dispatch_functions_start[];
-extern GLubyte gl_dispatch_functions_end[];
-#else
-extern const GLubyte gl_dispatch_functions_start[];
-#endif
-
-#endif /* USE_X86_ASM */
-
-/**
- * Return dispatch function address for the named static (built-in) function.
- * Return NULL if function not found.
- */
-static _glapi_proc
-get_static_proc_address(const char *funcName)
-{
- const glprocs_table_t * const f = find_entry( funcName );
- if (f) {
-#if defined(DISPATCH_FUNCTION_SIZE) && defined(GLX_INDIRECT_RENDERING)
- return (f->Address == NULL)
- ? (_glapi_proc) (gl_dispatch_functions_start
- + (DISPATCH_FUNCTION_SIZE * f->Offset))
- : f->Address;
-#elif defined(DISPATCH_FUNCTION_SIZE)
- return (_glapi_proc) (gl_dispatch_functions_start
- + (DISPATCH_FUNCTION_SIZE * f->Offset));
-#else
- return f->Address;
-#endif
- }
- else {
- return NULL;
- }
+ return f->Offset;
}
-#endif /* !defined(XFree86Server) && !defined(XGLServer) */
/**********************************************************************
* Extension function management.
*/
-/*
+/**
* Number of extension functions which we can dynamically add at runtime.
+ *
+ * Number of extension functions is also subject to the size of backing exec
+ * mem we allocate. For the common case of dispatch stubs with size 16 bytes,
+ * the two limits will be hit simultaneously. For larger dispatch function
+ * sizes, MAX_EXTENSION_FUNCS is effectively reduced.
*/
-#define MAX_EXTENSION_FUNCS 300
-
-
-/*
- * The dispatch table size (number of entries) is the size of the
- * _glapi_table struct plus the number of dynamic entries we can add.
- * The extra slots can be filled in by DRI drivers that register new extension
- * functions.
- */
-#define DISPATCH_TABLE_SIZE (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS)
+#define MAX_EXTENSION_FUNCS 256
/**
@@ -493,26 +495,183 @@ struct _glapi_function {
static struct _glapi_function ExtEntryTable[MAX_EXTENSION_FUNCS];
static GLuint NumExtEntryPoints = 0;
-#ifdef USE_SPARC_ASM
-extern void __glapi_sparc_icache_flush(unsigned int *);
+
+static struct _glapi_function *
+get_extension_proc(const char *funcName)
+{
+ GLuint i;
+ for (i = 0; i < NumExtEntryPoints; i++) {
+ if (strcmp(ExtEntryTable[i].name, funcName) == 0) {
+ return & ExtEntryTable[i];
+ }
+ }
+ return NULL;
+}
+
+
+static GLint
+get_extension_proc_offset(const char *funcName)
+{
+ const struct _glapi_function * const f = get_extension_proc( funcName );
+ if (f == NULL) {
+ return -1;
+ }
+
+ return f->dispatch_offset;
+}
+
+
+static _glapi_proc
+get_extension_proc_address(const char *funcName)
+{
+ const struct _glapi_function * const f = get_extension_proc( funcName );
+ if (f == NULL) {
+ return NULL;
+ }
+
+ return f->dispatch_stub;
+}
+
+
+static const char *
+get_extension_proc_name(GLuint offset)
+{
+ GLuint i;
+ for (i = 0; i < NumExtEntryPoints; i++) {
+ if (ExtEntryTable[i].dispatch_offset == offset) {
+ return ExtEntryTable[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+/**
+ * strdup() is actually not a standard ANSI C or POSIX routine.
+ * Irix will not define it if ANSI mode is in effect.
+ */
+static char *
+str_dup(const char *str)
+{
+ char *copy;
+ copy = (char*) malloc(strlen(str) + 1);
+ if (!copy)
+ return NULL;
+ strcpy(copy, str);
+ return copy;
+}
+
+
+/**
+ * Generate new entrypoint
+ *
+ * Use a temporary dispatch offset of ~0 (i.e. -1). Later, when the driver
+ * calls \c _glapi_add_dispatch we'll put in the proper offset. If that
+ * never happens, and the user calls this function, he'll segfault. That's
+ * what you get when you try calling a GL function that doesn't really exist.
+ *
+ * \param funcName Name of the function to create an entry-point for.
+ *
+ * \sa _glapi_add_entrypoint
+ */
+
+static struct _glapi_function *
+add_function_name( const char * funcName )
+{
+ struct _glapi_function * entry = NULL;
+ _glapi_proc entrypoint = NULL;
+ char * name_dup = NULL;
+
+ if (NumExtEntryPoints >= MAX_EXTENSION_FUNCS)
+ return NULL;
+
+ if (funcName == NULL)
+ return NULL;
+
+ name_dup = str_dup(funcName);
+ if (name_dup == NULL)
+ return NULL;
+
+ entrypoint = generate_entrypoint(~0);
+
+ if (entrypoint == NULL) {
+ free(name_dup);
+ return NULL;
+ }
+
+ entry = & ExtEntryTable[NumExtEntryPoints];
+ NumExtEntryPoints++;
+
+ entry->name = name_dup;
+ entry->parameter_signature = NULL;
+ entry->dispatch_offset = ~0;
+ entry->dispatch_stub = entrypoint;
+
+ return entry;
+}
+
+
+static struct _glapi_function *
+set_entry_info( struct _glapi_function * entry, const char * signature, unsigned offset )
+{
+ char * sig_dup = NULL;
+
+ if (signature == NULL)
+ return NULL;
+
+ sig_dup = str_dup(signature);
+ if (sig_dup == NULL)
+ return NULL;
+
+ fill_in_entrypoint_offset(entry->dispatch_stub, offset);
+
+ entry->parameter_signature = sig_dup;
+ entry->dispatch_offset = offset;
+
+ return entry;
+}
+
+#if defined(USE_X86_ASM)
+
+/**
+ * Perform platform-specific GL API entry-point fixups.
+ */
+static void
+init_glapi_relocs( void )
+{
+#if defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT)
+ extern unsigned long _x86_get_dispatch(void);
+ char run_time_patch[] = {
+ 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */
+ };
+ GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */
+ const GLubyte * const get_disp = (const GLubyte *) run_time_patch;
+ GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start;
+
+ *offset = _x86_get_dispatch();
+ while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) {
+ (void) memcpy( curr_func, get_disp, sizeof(run_time_patch));
+ curr_func += DISPATCH_FUNCTION_SIZE;
+ }
#endif
+}
+
/**
* Generate a dispatch function (entrypoint) which jumps through
* the given slot number (offset) in the current dispatch table.
* We need assembly language in order to accomplish this.
*/
-static _glapi_proc
-generate_entrypoint(GLuint functionOffset)
+_glapi_proc
+generate_entrypoint(unsigned int functionOffset)
{
-#if defined(USE_X86_ASM)
/* 32 is chosen as something of a magic offset. For x86, the dispatch
* at offset 32 is the first one where the offset in the
* "jmp OFFSET*4(%eax)" can't be encoded in a single byte.
*/
const GLubyte * const template_func = gl_dispatch_functions_start
+ (DISPATCH_FUNCTION_SIZE * 32);
- GLubyte * const code = (GLubyte *) malloc(DISPATCH_FUNCTION_SIZE);
+ GLubyte * const code = (GLubyte *) u_execmem_alloc(DISPATCH_FUNCTION_SIZE);
if ( code != NULL ) {
@@ -521,59 +680,6 @@ generate_entrypoint(GLuint functionOffset)
}
return (_glapi_proc) code;
-#elif defined(USE_SPARC_ASM)
-
-#ifdef __arch64__
- static const unsigned int insn_template[] = {
- 0x05000000, /* sethi %uhi(_glapi_Dispatch), %g2 */
- 0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */
- 0x8410a000, /* or %g2, %ulo(_glapi_Dispatch), %g2 */
- 0x82106000, /* or %g1, %lo(_glapi_Dispatch), %g1 */
- 0x8528b020, /* sllx %g2, 32, %g2 */
- 0xc2584002, /* ldx [%g1 + %g2], %g1 */
- 0x05000000, /* sethi %hi(8 * glapioffset), %g2 */
- 0x8410a000, /* or %g2, %lo(8 * glapioffset), %g2 */
- 0xc6584002, /* ldx [%g1 + %g2], %g3 */
- 0x81c0c000, /* jmpl %g3, %g0 */
- 0x01000000 /* nop */
- };
-#else
- static const unsigned int insn_template[] = {
- 0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */
- 0xc2006000, /* ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
- 0xc6006000, /* ld [%g1 + %lo(4*glapioffset)], %g3 */
- 0x81c0c000, /* jmpl %g3, %g0 */
- 0x01000000 /* nop */
- };
-#endif /* __arch64__ */
- unsigned int *code = (unsigned int *) malloc(sizeof(insn_template));
- unsigned long glapi_addr = (unsigned long) &_glapi_Dispatch;
- if (code) {
- memcpy(code, insn_template, sizeof(insn_template));
-
-#ifdef __arch64__
- code[0] |= (glapi_addr >> (32 + 10));
- code[1] |= ((glapi_addr & 0xffffffff) >> 10);
- __glapi_sparc_icache_flush(&code[0]);
- code[2] |= ((glapi_addr >> 32) & ((1 << 10) - 1));
- code[3] |= (glapi_addr & ((1 << 10) - 1));
- __glapi_sparc_icache_flush(&code[2]);
- code[6] |= ((functionOffset * 8) >> 10);
- code[7] |= ((functionOffset * 8) & ((1 << 10) - 1));
- __glapi_sparc_icache_flush(&code[6]);
-#else
- code[0] |= (glapi_addr >> 10);
- code[1] |= (glapi_addr & ((1 << 10) - 1));
- __glapi_sparc_icache_flush(&code[0]);
- code[2] |= (functionOffset * 4);
- __glapi_sparc_icache_flush(&code[2]);
-#endif /* __arch64__ */
- }
- return (_glapi_proc) code;
-#else
- (void) functionOffset;
- return NULL;
-#endif /* USE_*_ASM */
}
@@ -581,83 +687,235 @@ generate_entrypoint(GLuint functionOffset)
* This function inserts a new dispatch offset into the assembly language
* stub that was generated with the preceeding function.
*/
-static void
-fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
+void
+fill_in_entrypoint_offset(_glapi_proc entrypoint, unsigned int offset)
{
-#if defined(USE_X86_ASM)
GLubyte * const code = (GLubyte *) entrypoint;
-#if DISPATCH_FUNCTION_SIZE == 32
+#if defined(GLX_USE_TLS)
+ *((unsigned int *)(code + 8)) = 4 * offset;
+#elif defined(THREADS)
*((unsigned int *)(code + 11)) = 4 * offset;
*((unsigned int *)(code + 22)) = 4 * offset;
-#elif DISPATCH_FUNCTION_SIZE == 16 && defined( GLX_USE_TLS )
- *((unsigned int *)(code + 8)) = 4 * offset;
-#elif DISPATCH_FUNCTION_SIZE == 16
- *((unsigned int *)(code + 7)) = 4 * offset;
#else
-# error Invalid DISPATCH_FUNCTION_SIZE!
+ *((unsigned int *)(code + 7)) = 4 * offset;
#endif
+}
+
#elif defined(USE_SPARC_ASM)
- /* XXX this hasn't been tested! */
- unsigned int *code = (unsigned int *) entrypoint;
+extern void __glapi_sparc_icache_flush(unsigned int *);
+
+static void
+init_glapi_relocs( void )
+{
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
+ static const unsigned int template[] = {
+#ifdef GLX_USE_TLS
+ 0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */
+ 0x8730e00a, /* srl %g3, 10, %g3 */
+ 0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */
+#ifdef __arch64__
+ 0xc259c002, /* ldx [%g7 + %g2], %g1 */
+ 0xc2584003, /* ldx [%g1 + %g3], %g1 */
+#else
+ 0xc201c002, /* ld [%g7 + %g2], %g1 */
+ 0xc2004003, /* ld [%g1 + %g3], %g1 */
+#endif
+ 0x81c04000, /* jmp %g1 */
+ 0x01000000, /* nop */
+#else
+#ifdef __arch64__
+ 0x03000000, /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */
+ 0x05000000, /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */
+ 0x82106000, /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */
+ 0x8730e00a, /* 64-bit 0x0c --> srl %g3, 10, %g3 */
+ 0x83287020, /* 64-bit 0x10 --> sllx %g1, 32, %g1 */
+ 0x82004002, /* 64-bit 0x14 --> add %g1, %g2, %g1 */
+ 0xc2586000, /* 64-bit 0x18 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */
+#else
+ 0x03000000, /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */
+ 0x8730e00a, /* 32-bit 0x04 --> srl %g3, 10, %g3 */
+ 0xc2006000, /* 32-bit 0x08 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
+#endif
+ 0x80a06000, /* --> cmp %g1, 0 */
+ 0x02800005, /* --> be +4*5 */
+ 0x01000000, /* --> nop */
+#ifdef __arch64__
+ 0xc2584003, /* 64-bit --> ldx [%g1 + %g3], %g1 */
+#else
+ 0xc2004003, /* 32-bit --> ld [%g1 + %g3], %g1 */
+#endif
+ 0x81c04000, /* --> jmp %g1 */
+ 0x01000000, /* --> nop */
#ifdef __arch64__
- code[6] = 0x05000000; /* sethi %hi(8 * glapioffset), %g2 */
- code[7] = 0x8410a000; /* or %g2, %lo(8 * glapioffset), %g2 */
- code[6] |= ((offset * 8) >> 10);
- code[7] |= ((offset * 8) & ((1 << 10) - 1));
- __glapi_sparc_icache_flush(&code[6]);
-#else /* __arch64__ */
- code[2] = 0xc6006000; /* ld [%g1 + %lo(4*glapioffset)], %g3 */
- code[2] |= (offset * 4);
- __glapi_sparc_icache_flush(&code[2]);
-#endif /* __arch64__ */
+ 0x9de3bf80, /* 64-bit --> save %sp, -128, %sp */
+#else
+ 0x9de3bfc0, /* 32-bit --> save %sp, -64, %sp */
+#endif
+ 0xa0100003, /* --> mov %g3, %l0 */
+ 0x40000000, /* --> call _glapi_get_dispatch */
+ 0x01000000, /* --> nop */
+ 0x82100008, /* --> mov %o0, %g1 */
+ 0x86100010, /* --> mov %l0, %g3 */
+ 0x10bffff7, /* --> ba -4*9 */
+ 0x81e80000, /* --> restore */
+#endif
+ };
+#ifdef GLX_USE_TLS
+ extern unsigned int __glapi_sparc_tls_stub;
+ extern unsigned long __glapi_sparc_get_dispatch(void);
+ unsigned int *code = &__glapi_sparc_tls_stub;
+ unsigned long dispatch = __glapi_sparc_get_dispatch();
+#else
+ extern unsigned int __glapi_sparc_pthread_stub;
+ unsigned int *code = &__glapi_sparc_pthread_stub;
+ unsigned long dispatch = (unsigned long) &_glapi_Dispatch;
+ unsigned long call_dest = (unsigned long ) &_glapi_get_dispatch;
+ int idx;
+#endif
+#ifdef GLX_USE_TLS
+ code[0] = template[0] | (dispatch >> 10);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | (dispatch & 0x3ff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ code[4] = template[4];
+ code[5] = template[5];
+ __glapi_sparc_icache_flush(&code[4]);
+ code[6] = template[6];
+ __glapi_sparc_icache_flush(&code[6]);
+#else
+#if defined(__arch64__)
+ code[0] = template[0] | (dispatch >> (32 + 10));
+ code[1] = template[1] | ((dispatch & 0xffffffff) >> 10);
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | ((dispatch >> 32) & 0x3ff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ code[4] = template[4];
+ code[5] = template[5];
+ __glapi_sparc_icache_flush(&code[4]);
+ code[6] = template[6] | (dispatch & 0x3ff);
+ idx = 7;
#else
+ code[0] = template[0] | (dispatch >> 10);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | (dispatch & 0x3ff);
+ idx = 3;
+#endif
+ code[idx + 0] = template[idx + 0];
+ __glapi_sparc_icache_flush(&code[idx - 1]);
+ code[idx + 1] = template[idx + 1];
+ code[idx + 2] = template[idx + 2];
+ __glapi_sparc_icache_flush(&code[idx + 1]);
+ code[idx + 3] = template[idx + 3];
+ code[idx + 4] = template[idx + 4];
+ __glapi_sparc_icache_flush(&code[idx + 3]);
+ code[idx + 5] = template[idx + 5];
+ code[idx + 6] = template[idx + 6];
+ __glapi_sparc_icache_flush(&code[idx + 5]);
+ code[idx + 7] = template[idx + 7];
+ code[idx + 8] = template[idx + 8] |
+ (((call_dest - ((unsigned long) &code[idx + 8]))
+ >> 2) & 0x3fffffff);
+ __glapi_sparc_icache_flush(&code[idx + 7]);
+ code[idx + 9] = template[idx + 9];
+ code[idx + 10] = template[idx + 10];
+ __glapi_sparc_icache_flush(&code[idx + 9]);
+ code[idx + 11] = template[idx + 11];
+ code[idx + 12] = template[idx + 12];
+ __glapi_sparc_icache_flush(&code[idx + 11]);
+ code[idx + 13] = template[idx + 13];
+ __glapi_sparc_icache_flush(&code[idx + 13]);
+#endif
+#endif
+}
- /* an unimplemented architecture */
- (void) entrypoint;
- (void) offset;
-#endif /* USE_*_ASM */
+_glapi_proc
+generate_entrypoint(GLuint functionOffset)
+{
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
+ static const unsigned int template[] = {
+ 0x07000000, /* sethi %hi(0), %g3 */
+ 0x8210000f, /* mov %o7, %g1 */
+ 0x40000000, /* call */
+ 0x9e100001, /* mov %g1, %o7 */
+ };
+#ifdef GLX_USE_TLS
+ extern unsigned int __glapi_sparc_tls_stub;
+ unsigned long call_dest = (unsigned long ) &__glapi_sparc_tls_stub;
+#else
+ extern unsigned int __glapi_sparc_pthread_stub;
+ unsigned long call_dest = (unsigned long ) &__glapi_sparc_pthread_stub;
+#endif
+ unsigned int *code = (unsigned int *) u_execmem_alloc(sizeof(template));
+ if (code) {
+ code[0] = template[0] | (functionOffset & 0x3fffff);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] |
+ (((call_dest - ((unsigned long) &code[2]))
+ >> 2) & 0x3fffffff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ }
+ return (_glapi_proc) code;
+#endif
}
-/**
- * Generate new entrypoint
- *
- * Use a temporary dispatch offset of ~0 (i.e. -1). Later, when the driver
- * calls \c _glapi_add_dispatch we'll put in the proper offset. If that
- * never happens, and the user calls this function, he'll segfault. That's
- * what you get when you try calling a GL function that doesn't really exist.
- *
- * \param funcName Name of the function to create an entry-point for.
- *
- * \sa _glapi_add_entrypoint
- */
+void
+fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
+{
+ unsigned int *code = (unsigned int *) entrypoint;
-static struct _glapi_function *
-add_function_name( const char * funcName )
+ code[0] &= ~0x3fffff;
+ code[0] |= (offset * sizeof(void *)) & 0x3fffff;
+ __glapi_sparc_icache_flush(&code[0]);
+}
+
+
+#else /* USE_*_ASM */
+
+static void
+init_glapi_relocs( void )
{
- struct _glapi_function * entry = NULL;
-
- if (NumExtEntryPoints < MAX_EXTENSION_FUNCS) {
- _glapi_proc entrypoint = generate_entrypoint(~0);
- if (entrypoint != NULL) {
- entry = & ExtEntryTable[NumExtEntryPoints];
-
- ExtEntryTable[NumExtEntryPoints].name = str_dup(funcName);
- ExtEntryTable[NumExtEntryPoints].parameter_signature = NULL;
- ExtEntryTable[NumExtEntryPoints].dispatch_offset = ~0;
- ExtEntryTable[NumExtEntryPoints].dispatch_stub = entrypoint;
- NumExtEntryPoints++;
- }
- }
+}
- return entry;
+
+_glapi_proc
+generate_entrypoint(GLuint functionOffset)
+{
+ (void) functionOffset;
+ return NULL;
+}
+
+
+void
+fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
+{
+ /* an unimplemented architecture */
+ (void) entrypoint;
+ (void) offset;
}
+#endif /* USE_*_ASM */
+
+
+void
+init_glapi_relocs_once( void )
+{
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
+ static pthread_once_t once_control = PTHREAD_ONCE_INIT;
+ pthread_once( & once_control, init_glapi_relocs );
+#endif
+}
/**
* Fill-in the dispatch stub for the named function.
@@ -680,7 +938,7 @@ add_function_name( const char * funcName )
* \returns
* The offset in the dispatch table of the named function. A pointer to the
* driver's implementation of the named function should be stored at
- * \c dispatch_table[\c offset].
+ * \c dispatch_table[\c offset]. Return -1 if error/problem.
*
* \sa glXGetProcAddress
*
@@ -706,171 +964,130 @@ add_function_name( const char * funcName )
* the parameter signature of a static function.
*/
-PUBLIC int
+PUBLIC
+int
_glapi_add_dispatch( const char * const * function_names,
const char * parameter_signature )
{
- static int next_dynamic_offset = _gloffset_FIRST_DYNAMIC;
+ static int next_dynamic_offset = FIRST_DYNAMIC_OFFSET;
const char * const real_sig = (parameter_signature != NULL)
? parameter_signature : "";
struct _glapi_function * entry[8];
GLboolean is_static[8];
unsigned i;
- unsigned j;
int offset = ~0;
- int new_offset;
+ init_glapi_relocs_once();
(void) memset( is_static, 0, sizeof( is_static ) );
(void) memset( entry, 0, sizeof( entry ) );
+ /* Find the _single_ dispatch offset for all function names that already
+ * exist (and have a dispatch offset).
+ */
+
for ( i = 0 ; function_names[i] != NULL ; i++ ) {
- /* Do some trivial validation on the name of the function.
- */
-
- if (!function_names[i] || function_names[i][0] != 'g' || function_names[i][1] != 'l')
- return GL_FALSE;
-
- /* Determine if the named function already exists. If the function does
- * exist, it must have the same parameter signature as the function
- * being added.
- */
-
- new_offset = get_static_proc_offset(function_names[i]);
- if (new_offset >= 0) {
+ const char * funcName = function_names[i];
+ int static_offset;
+ int extension_offset;
+
+ if (funcName[0] != 'g' || funcName[1] != 'l')
+ return -1;
+
+ /* search built-in functions */
+ static_offset = get_static_proc_offset(funcName);
+
+ if (static_offset >= 0) {
+
+ is_static[i] = GL_TRUE;
+
/* FIXME: Make sure the parameter signatures match! How do we get
* FIXME: the parameter signature for static functions?
*/
- if ( (offset != ~0) && (new_offset != offset) ) {
+ if ( (offset != ~0) && (static_offset != offset) ) {
return -1;
}
- is_static[i] = GL_TRUE;
- offset = new_offset;
+ offset = static_offset;
+
+ continue;
}
-
-
- for ( j = 0 ; j < NumExtEntryPoints ; j++ ) {
- if (strcmp(ExtEntryTable[j].name, function_names[i]) == 0) {
- /* The offset may be ~0 if the function name was added by
- * glXGetProcAddress but never filled in by the driver.
- */
-
- if (ExtEntryTable[j].dispatch_offset != ~0) {
- if (strcmp(real_sig, ExtEntryTable[j].parameter_signature)
- != 0) {
- return -1;
- }
-
- if ( (offset != ~0) && (ExtEntryTable[j].dispatch_offset != offset) ) {
- return -1;
- }
-
- offset = ExtEntryTable[j].dispatch_offset;
- }
-
- entry[i] = & ExtEntryTable[j];
- break;
+
+ /* search added extension functions */
+ entry[i] = get_extension_proc(funcName);
+
+ if (entry[i] != NULL) {
+ extension_offset = entry[i]->dispatch_offset;
+
+ /* The offset may be ~0 if the function name was added by
+ * glXGetProcAddress but never filled in by the driver.
+ */
+
+ if (extension_offset == ~0) {
+ continue;
+ }
+
+ if (strcmp(real_sig, entry[i]->parameter_signature) != 0) {
+ return -1;
+ }
+
+ if ( (offset != ~0) && (extension_offset != offset) ) {
+ return -1;
}
+
+ offset = extension_offset;
}
}
+ /* If all function names are either new (or with no dispatch offset),
+ * allocate a new dispatch offset.
+ */
+
if (offset == ~0) {
offset = next_dynamic_offset;
next_dynamic_offset++;
}
+ /* Fill in the dispatch offset for the new function names (and those with
+ * no dispatch offset).
+ */
+
for ( i = 0 ; function_names[i] != NULL ; i++ ) {
- if (! is_static[i] ) {
+ if (is_static[i]) {
+ continue;
+ }
+
+ /* generate entrypoints for new function names */
+ if (entry[i] == NULL) {
+ entry[i] = add_function_name( function_names[i] );
if (entry[i] == NULL) {
- entry[i] = add_function_name( function_names[i] );
- if (entry[i] == NULL) {
- /* FIXME: Possible memory leak here.
- */
- return -1;
- }
+ /* FIXME: Possible memory leak here. */
+ return -1;
}
-
- entry[i]->parameter_signature = str_dup(real_sig);
- fill_in_entrypoint_offset(entry[i]->dispatch_stub, offset);
- entry[i]->dispatch_offset = offset;
}
- }
-
- return offset;
-}
-
-/**
- * Return pointer to the named function. If the function name isn't found
- * in the name of static functions, try generating a new API entrypoint on
- * the fly with assembly language.
- */
-_glapi_proc
-_glapi_get_proc_address(const char *funcName)
-{
- struct _glapi_function * entry;
- GLuint i;
-
-#ifdef MANGLE
- if (funcName[0] != 'm' || funcName[1] != 'g' || funcName[2] != 'l')
- return NULL;
-#else
- if (funcName[0] != 'g' || funcName[1] != 'l')
- return NULL;
-#endif
- /* search extension functions first */
- for (i = 0; i < NumExtEntryPoints; i++) {
- if (strcmp(ExtEntryTable[i].name, funcName) == 0) {
- return ExtEntryTable[i].dispatch_stub;
+ if (entry[i]->dispatch_offset == ~0) {
+ set_entry_info( entry[i], real_sig, offset );
}
}
-#if !defined( XFree86Server ) && !defined( XGLServer )
- /* search static functions */
- {
- const _glapi_proc func = get_static_proc_address(funcName);
- if (func)
- return func;
- }
-#endif /* !defined( XFree86Server ) */
-
- entry = add_function_name(funcName);
- return (entry == NULL) ? NULL : entry->dispatch_stub;
+ return offset;
}
/**
* Return size of dispatch table struct as number of functions (or
* slots).
*/
-PUBLIC GLuint
+GLuint
_glapi_get_dispatch_table_size(void)
{
- return DISPATCH_TABLE_SIZE;
+ /*
+ * The dispatch table size (number of entries) is the size of the
+ * _glapi_table struct plus the number of dynamic entries we can add.
+ * The extra slots can be filled in by DRI drivers that register new
+ * extension functions.
+ */
+ return FIRST_DYNAMIC_OFFSET + MAX_EXTENSION_FUNCS;
}
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
-/**
- * Perform platform-specific GL API entry-point fixups.
- */
-static void
-init_glapi_relocs( void )
-{
-#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT)
- extern unsigned long _x86_get_dispatch(void);
- char run_time_patch[] = {
- 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */
- };
- GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */
- const GLubyte * const get_disp = (const GLubyte *) run_time_patch;
- GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start;
-
- *offset = _x86_get_dispatch();
- while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) {
- (void) memcpy( curr_func, get_disp, sizeof(run_time_patch));
- curr_func += DISPATCH_FUNCTION_SIZE;
- }
-#endif
-}
-#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */
diff --git a/xorg-server/glx/glapi.h b/xorg-server/glx/glapi.h
index 80b53aa92..a99317ad0 100644
--- a/xorg-server/glx/glapi.h
+++ b/xorg-server/glx/glapi.h
@@ -1,149 +1,180 @@
-/*
- * Mesa 3-D graphics library
- * Version: 7.1
- *
- * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/**
- * \mainpage Mesa GL API Module
- *
- * \section GLAPIIntroduction Introduction
- *
- * The Mesa GL API module is responsible for dispatching all the
- * gl*() functions. All GL functions are dispatched by jumping through
- * the current dispatch table (basically a struct full of function
- * pointers.)
- *
- * A per-thread current dispatch table and per-thread current context
- * pointer are managed by this module too.
- *
- * This module is intended to be non-Mesa-specific so it can be used
- * with the X/DRI libGL also.
- */
-
-
-#ifndef _GLAPI_H
-#define _GLAPI_H
-
-#define GL_GLEXT_PROTOTYPES
-
-#include "GL/gl.h"
-#include "GL/glext.h"
-#include "glthread.h"
-
-
-struct _glapi_table;
-
-typedef void (*_glapi_proc)(void); /* generic function pointer */
-
-typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
-
-
-#if defined(USE_MGL_NAMESPACE)
-#define _glapi_set_dispatch _mglapi_set_dispatch
-#define _glapi_get_dispatch _mglapi_get_dispatch
-#define _glapi_set_context _mglapi_set_context
-#define _glapi_get_context _mglapi_get_context
-#define _glapi_Context _mglapi_Context
-#define _glapi_Dispatch _mglapi_Dispatch
-#endif
-
-
-/*
- * Number of extension functions which we can dynamically add at runtime.
- */
-#define MAX_EXTENSION_FUNCS 300
-
-
-/**
- ** Define the GET_CURRENT_CONTEXT() macro.
- ** \param C local variable which will hold the current context.
- **/
-#if defined (GLX_USE_TLS)
-
-const extern void *_glapi_Context;
-const extern struct _glapi_table *_glapi_Dispatch;
-
-extern __thread void * _glapi_tls_Context
- __attribute__((tls_model("initial-exec")));
-
-# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context
-
-#else
-
-extern void *_glapi_Context;
-extern struct _glapi_table *_glapi_Dispatch;
-
-# ifdef THREADS
-# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())
-# else
-# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context
-# endif
-
-#endif /* defined (GLX_USE_TLS) */
-
-
-/**
- ** GL API public functions
- **/
-
-extern void
-_glapi_noop_enable_warnings(GLboolean enable);
-
-extern void
-_glapi_set_warning_func(_glapi_warning_func func);
-
-extern void
-_glapi_check_multithread(void);
-
-extern void
-_glapi_set_context(void *context);
-
-extern void *
-_glapi_get_context(void);
-
-extern void
-_glapi_set_dispatch(struct _glapi_table *dispatch);
-
-extern struct _glapi_table *
-_glapi_get_dispatch(void);
-
-extern int
-_glapi_begin_dispatch_override(struct _glapi_table *override);
-
-extern void
-_glapi_end_dispatch_override(int layer);
-
-struct _glapi_table *
-_glapi_get_override_dispatch(int layer);
-
-extern GLuint
-_glapi_get_dispatch_table_size(void);
-
-extern int
-_glapi_add_dispatch( const char * const * function_names,
- const char * parameter_signature );
-
-extern _glapi_proc
-_glapi_get_proc_address(const char *funcName);
-
-#endif
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * \mainpage Mesa GL API Module
+ *
+ * \section GLAPIIntroduction Introduction
+ *
+ * The Mesa GL API module is responsible for dispatching all the
+ * gl*() functions. All GL functions are dispatched by jumping through
+ * the current dispatch table (basically a struct full of function
+ * pointers.)
+ *
+ * A per-thread current dispatch table and per-thread current context
+ * pointer are managed by this module too.
+ *
+ * This module is intended to be non-Mesa-specific so it can be used
+ * with the X/DRI libGL also.
+ */
+#ifndef _GLAPI_H
+#define _GLAPI_H
+
+#ifdef _GLAPI_NO_EXPORTS
+# define _GLAPI_EXPORT
+#else /* _GLAPI_NO_EXPORTS */
+# ifdef _WIN32
+# ifdef _GLAPI_DLL_EXPORTS
+# define _GLAPI_EXPORT __declspec(dllexport)
+# else
+# define _GLAPI_EXPORT __declspec(dllimport)
+# endif
+# elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# define _GLAPI_EXPORT __attribute__((visibility("default")))
+# else
+# define _GLAPI_EXPORT
+# endif
+#endif /* _GLAPI_NO_EXPORTS */
+
+
+/* Is this needed? It is incomplete anyway. */
+#ifdef USE_MGL_NAMESPACE
+#define _glapi_set_dispatch _mglapi_set_dispatch
+#define _glapi_get_dispatch _mglapi_get_dispatch
+#define _glapi_set_context _mglapi_set_context
+#define _glapi_get_context _mglapi_get_context
+#define _glapi_Dispatch _mglapi_Dispatch
+#define _glapi_Context _mglapi_Context
+#endif
+
+#include "glthread.h"
+
+typedef void (*_glapi_proc)(void);
+struct _glapi_table;
+
+
+#if defined (GLX_USE_TLS)
+
+_GLAPI_EXPORT extern __thread struct _glapi_table * _glapi_tls_Dispatch
+ __attribute__((tls_model("initial-exec")));
+
+_GLAPI_EXPORT extern __thread void * _glapi_tls_Context
+ __attribute__((tls_model("initial-exec")));
+
+_GLAPI_EXPORT extern const struct _glapi_table *_glapi_Dispatch;
+_GLAPI_EXPORT extern const void *_glapi_Context;
+
+# define GET_DISPATCH() _glapi_tls_Dispatch
+# define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) _glapi_tls_Context
+
+#else
+
+#ifdef INSERVER
+#define SERVEXTERN _declspec(dllimport)
+#else
+#define SERVEXTERN _declspec(dllexport)
+#endif
+
+SERVEXTERN struct _glapi_table *_glapi_Dispatch;
+SERVEXTERN void *_glapi_Context;
+
+# ifdef THREADS
+
+# define GET_DISPATCH() \
+ (likely(_glapi_Dispatch) ? _glapi_Dispatch : _glapi_get_dispatch())
+
+# define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) \
+ (likely(_glapi_Context) ? _glapi_Context : _glapi_get_context())
+
+# else
+
+# define GET_DISPATCH() _glapi_Dispatch
+# define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) _glapi_Context
+
+# endif
+
+#endif /* defined (GLX_USE_TLS) */
+
+
+void
+_glapi_destroy_multithread(void);
+
+
+SERVEXTERN void
+_glapi_check_multithread(void);
+
+
+SERVEXTERN void
+_glapi_set_context(void *context);
+
+
+SERVEXTERN void *
+_glapi_get_context(void);
+
+
+SERVEXTERN void
+_glapi_set_dispatch(struct _glapi_table *dispatch);
+
+
+SERVEXTERN struct _glapi_table *
+_glapi_get_dispatch(void);
+
+
+SERVEXTERN unsigned int
+_glapi_get_dispatch_table_size(void);
+
+
+SERVEXTERN int
+_glapi_add_dispatch( const char * const * function_names,
+ const char * parameter_signature );
+
+_GLAPI_EXPORT int
+_glapi_get_proc_offset(const char *funcName);
+
+
+_GLAPI_EXPORT _glapi_proc
+_glapi_get_proc_address(const char *funcName);
+
+
+_GLAPI_EXPORT const char *
+_glapi_get_proc_name(unsigned int offset);
+
+
+_GLAPI_EXPORT unsigned long
+_glthread_GetID(void);
+
+
+/*
+ * These stubs are kept so that the old DRI drivers still load.
+ */
+SERVEXTERN void
+_glapi_noop_enable_warnings(unsigned char enable);
+
+
+_GLAPI_EXPORT void
+_glapi_set_warning_func(_glapi_proc func);
+
+
+#endif /* _GLAPI_H */
diff --git a/xorg-server/glx/glapioffsets.h b/xorg-server/glx/glapioffsets.h
deleted file mode 100644
index 43c265924..000000000
--- a/xorg-server/glx/glapioffsets.h
+++ /dev/null
@@ -1,1174 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_offsets.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sub license,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#if !defined( _GLAPI_OFFSETS_H_ )
-# define _GLAPI_OFFSETS_H_
-
-#define _gloffset_NewList 0
-#define _gloffset_EndList 1
-#define _gloffset_CallList 2
-#define _gloffset_CallLists 3
-#define _gloffset_DeleteLists 4
-#define _gloffset_GenLists 5
-#define _gloffset_ListBase 6
-#define _gloffset_Begin 7
-#define _gloffset_Bitmap 8
-#define _gloffset_Color3b 9
-#define _gloffset_Color3bv 10
-#define _gloffset_Color3d 11
-#define _gloffset_Color3dv 12
-#define _gloffset_Color3f 13
-#define _gloffset_Color3fv 14
-#define _gloffset_Color3i 15
-#define _gloffset_Color3iv 16
-#define _gloffset_Color3s 17
-#define _gloffset_Color3sv 18
-#define _gloffset_Color3ub 19
-#define _gloffset_Color3ubv 20
-#define _gloffset_Color3ui 21
-#define _gloffset_Color3uiv 22
-#define _gloffset_Color3us 23
-#define _gloffset_Color3usv 24
-#define _gloffset_Color4b 25
-#define _gloffset_Color4bv 26
-#define _gloffset_Color4d 27
-#define _gloffset_Color4dv 28
-#define _gloffset_Color4f 29
-#define _gloffset_Color4fv 30
-#define _gloffset_Color4i 31
-#define _gloffset_Color4iv 32
-#define _gloffset_Color4s 33
-#define _gloffset_Color4sv 34
-#define _gloffset_Color4ub 35
-#define _gloffset_Color4ubv 36
-#define _gloffset_Color4ui 37
-#define _gloffset_Color4uiv 38
-#define _gloffset_Color4us 39
-#define _gloffset_Color4usv 40
-#define _gloffset_EdgeFlag 41
-#define _gloffset_EdgeFlagv 42
-#define _gloffset_End 43
-#define _gloffset_Indexd 44
-#define _gloffset_Indexdv 45
-#define _gloffset_Indexf 46
-#define _gloffset_Indexfv 47
-#define _gloffset_Indexi 48
-#define _gloffset_Indexiv 49
-#define _gloffset_Indexs 50
-#define _gloffset_Indexsv 51
-#define _gloffset_Normal3b 52
-#define _gloffset_Normal3bv 53
-#define _gloffset_Normal3d 54
-#define _gloffset_Normal3dv 55
-#define _gloffset_Normal3f 56
-#define _gloffset_Normal3fv 57
-#define _gloffset_Normal3i 58
-#define _gloffset_Normal3iv 59
-#define _gloffset_Normal3s 60
-#define _gloffset_Normal3sv 61
-#define _gloffset_RasterPos2d 62
-#define _gloffset_RasterPos2dv 63
-#define _gloffset_RasterPos2f 64
-#define _gloffset_RasterPos2fv 65
-#define _gloffset_RasterPos2i 66
-#define _gloffset_RasterPos2iv 67
-#define _gloffset_RasterPos2s 68
-#define _gloffset_RasterPos2sv 69
-#define _gloffset_RasterPos3d 70
-#define _gloffset_RasterPos3dv 71
-#define _gloffset_RasterPos3f 72
-#define _gloffset_RasterPos3fv 73
-#define _gloffset_RasterPos3i 74
-#define _gloffset_RasterPos3iv 75
-#define _gloffset_RasterPos3s 76
-#define _gloffset_RasterPos3sv 77
-#define _gloffset_RasterPos4d 78
-#define _gloffset_RasterPos4dv 79
-#define _gloffset_RasterPos4f 80
-#define _gloffset_RasterPos4fv 81
-#define _gloffset_RasterPos4i 82
-#define _gloffset_RasterPos4iv 83
-#define _gloffset_RasterPos4s 84
-#define _gloffset_RasterPos4sv 85
-#define _gloffset_Rectd 86
-#define _gloffset_Rectdv 87
-#define _gloffset_Rectf 88
-#define _gloffset_Rectfv 89
-#define _gloffset_Recti 90
-#define _gloffset_Rectiv 91
-#define _gloffset_Rects 92
-#define _gloffset_Rectsv 93
-#define _gloffset_TexCoord1d 94
-#define _gloffset_TexCoord1dv 95
-#define _gloffset_TexCoord1f 96
-#define _gloffset_TexCoord1fv 97
-#define _gloffset_TexCoord1i 98
-#define _gloffset_TexCoord1iv 99
-#define _gloffset_TexCoord1s 100
-#define _gloffset_TexCoord1sv 101
-#define _gloffset_TexCoord2d 102
-#define _gloffset_TexCoord2dv 103
-#define _gloffset_TexCoord2f 104
-#define _gloffset_TexCoord2fv 105
-#define _gloffset_TexCoord2i 106
-#define _gloffset_TexCoord2iv 107
-#define _gloffset_TexCoord2s 108
-#define _gloffset_TexCoord2sv 109
-#define _gloffset_TexCoord3d 110
-#define _gloffset_TexCoord3dv 111
-#define _gloffset_TexCoord3f 112
-#define _gloffset_TexCoord3fv 113
-#define _gloffset_TexCoord3i 114
-#define _gloffset_TexCoord3iv 115
-#define _gloffset_TexCoord3s 116
-#define _gloffset_TexCoord3sv 117
-#define _gloffset_TexCoord4d 118
-#define _gloffset_TexCoord4dv 119
-#define _gloffset_TexCoord4f 120
-#define _gloffset_TexCoord4fv 121
-#define _gloffset_TexCoord4i 122
-#define _gloffset_TexCoord4iv 123
-#define _gloffset_TexCoord4s 124
-#define _gloffset_TexCoord4sv 125
-#define _gloffset_Vertex2d 126
-#define _gloffset_Vertex2dv 127
-#define _gloffset_Vertex2f 128
-#define _gloffset_Vertex2fv 129
-#define _gloffset_Vertex2i 130
-#define _gloffset_Vertex2iv 131
-#define _gloffset_Vertex2s 132
-#define _gloffset_Vertex2sv 133
-#define _gloffset_Vertex3d 134
-#define _gloffset_Vertex3dv 135
-#define _gloffset_Vertex3f 136
-#define _gloffset_Vertex3fv 137
-#define _gloffset_Vertex3i 138
-#define _gloffset_Vertex3iv 139
-#define _gloffset_Vertex3s 140
-#define _gloffset_Vertex3sv 141
-#define _gloffset_Vertex4d 142
-#define _gloffset_Vertex4dv 143
-#define _gloffset_Vertex4f 144
-#define _gloffset_Vertex4fv 145
-#define _gloffset_Vertex4i 146
-#define _gloffset_Vertex4iv 147
-#define _gloffset_Vertex4s 148
-#define _gloffset_Vertex4sv 149
-#define _gloffset_ClipPlane 150
-#define _gloffset_ColorMaterial 151
-#define _gloffset_CullFace 152
-#define _gloffset_Fogf 153
-#define _gloffset_Fogfv 154
-#define _gloffset_Fogi 155
-#define _gloffset_Fogiv 156
-#define _gloffset_FrontFace 157
-#define _gloffset_Hint 158
-#define _gloffset_Lightf 159
-#define _gloffset_Lightfv 160
-#define _gloffset_Lighti 161
-#define _gloffset_Lightiv 162
-#define _gloffset_LightModelf 163
-#define _gloffset_LightModelfv 164
-#define _gloffset_LightModeli 165
-#define _gloffset_LightModeliv 166
-#define _gloffset_LineStipple 167
-#define _gloffset_LineWidth 168
-#define _gloffset_Materialf 169
-#define _gloffset_Materialfv 170
-#define _gloffset_Materiali 171
-#define _gloffset_Materialiv 172
-#define _gloffset_PointSize 173
-#define _gloffset_PolygonMode 174
-#define _gloffset_PolygonStipple 175
-#define _gloffset_Scissor 176
-#define _gloffset_ShadeModel 177
-#define _gloffset_TexParameterf 178
-#define _gloffset_TexParameterfv 179
-#define _gloffset_TexParameteri 180
-#define _gloffset_TexParameteriv 181
-#define _gloffset_TexImage1D 182
-#define _gloffset_TexImage2D 183
-#define _gloffset_TexEnvf 184
-#define _gloffset_TexEnvfv 185
-#define _gloffset_TexEnvi 186
-#define _gloffset_TexEnviv 187
-#define _gloffset_TexGend 188
-#define _gloffset_TexGendv 189
-#define _gloffset_TexGenf 190
-#define _gloffset_TexGenfv 191
-#define _gloffset_TexGeni 192
-#define _gloffset_TexGeniv 193
-#define _gloffset_FeedbackBuffer 194
-#define _gloffset_SelectBuffer 195
-#define _gloffset_RenderMode 196
-#define _gloffset_InitNames 197
-#define _gloffset_LoadName 198
-#define _gloffset_PassThrough 199
-#define _gloffset_PopName 200
-#define _gloffset_PushName 201
-#define _gloffset_DrawBuffer 202
-#define _gloffset_Clear 203
-#define _gloffset_ClearAccum 204
-#define _gloffset_ClearIndex 205
-#define _gloffset_ClearColor 206
-#define _gloffset_ClearStencil 207
-#define _gloffset_ClearDepth 208
-#define _gloffset_StencilMask 209
-#define _gloffset_ColorMask 210
-#define _gloffset_DepthMask 211
-#define _gloffset_IndexMask 212
-#define _gloffset_Accum 213
-#define _gloffset_Disable 214
-#define _gloffset_Enable 215
-#define _gloffset_Finish 216
-#define _gloffset_Flush 217
-#define _gloffset_PopAttrib 218
-#define _gloffset_PushAttrib 219
-#define _gloffset_Map1d 220
-#define _gloffset_Map1f 221
-#define _gloffset_Map2d 222
-#define _gloffset_Map2f 223
-#define _gloffset_MapGrid1d 224
-#define _gloffset_MapGrid1f 225
-#define _gloffset_MapGrid2d 226
-#define _gloffset_MapGrid2f 227
-#define _gloffset_EvalCoord1d 228
-#define _gloffset_EvalCoord1dv 229
-#define _gloffset_EvalCoord1f 230
-#define _gloffset_EvalCoord1fv 231
-#define _gloffset_EvalCoord2d 232
-#define _gloffset_EvalCoord2dv 233
-#define _gloffset_EvalCoord2f 234
-#define _gloffset_EvalCoord2fv 235
-#define _gloffset_EvalMesh1 236
-#define _gloffset_EvalPoint1 237
-#define _gloffset_EvalMesh2 238
-#define _gloffset_EvalPoint2 239
-#define _gloffset_AlphaFunc 240
-#define _gloffset_BlendFunc 241
-#define _gloffset_LogicOp 242
-#define _gloffset_StencilFunc 243
-#define _gloffset_StencilOp 244
-#define _gloffset_DepthFunc 245
-#define _gloffset_PixelZoom 246
-#define _gloffset_PixelTransferf 247
-#define _gloffset_PixelTransferi 248
-#define _gloffset_PixelStoref 249
-#define _gloffset_PixelStorei 250
-#define _gloffset_PixelMapfv 251
-#define _gloffset_PixelMapuiv 252
-#define _gloffset_PixelMapusv 253
-#define _gloffset_ReadBuffer 254
-#define _gloffset_CopyPixels 255
-#define _gloffset_ReadPixels 256
-#define _gloffset_DrawPixels 257
-#define _gloffset_GetBooleanv 258
-#define _gloffset_GetClipPlane 259
-#define _gloffset_GetDoublev 260
-#define _gloffset_GetError 261
-#define _gloffset_GetFloatv 262
-#define _gloffset_GetIntegerv 263
-#define _gloffset_GetLightfv 264
-#define _gloffset_GetLightiv 265
-#define _gloffset_GetMapdv 266
-#define _gloffset_GetMapfv 267
-#define _gloffset_GetMapiv 268
-#define _gloffset_GetMaterialfv 269
-#define _gloffset_GetMaterialiv 270
-#define _gloffset_GetPixelMapfv 271
-#define _gloffset_GetPixelMapuiv 272
-#define _gloffset_GetPixelMapusv 273
-#define _gloffset_GetPolygonStipple 274
-#define _gloffset_GetString 275
-#define _gloffset_GetTexEnvfv 276
-#define _gloffset_GetTexEnviv 277
-#define _gloffset_GetTexGendv 278
-#define _gloffset_GetTexGenfv 279
-#define _gloffset_GetTexGeniv 280
-#define _gloffset_GetTexImage 281
-#define _gloffset_GetTexParameterfv 282
-#define _gloffset_GetTexParameteriv 283
-#define _gloffset_GetTexLevelParameterfv 284
-#define _gloffset_GetTexLevelParameteriv 285
-#define _gloffset_IsEnabled 286
-#define _gloffset_IsList 287
-#define _gloffset_DepthRange 288
-#define _gloffset_Frustum 289
-#define _gloffset_LoadIdentity 290
-#define _gloffset_LoadMatrixf 291
-#define _gloffset_LoadMatrixd 292
-#define _gloffset_MatrixMode 293
-#define _gloffset_MultMatrixf 294
-#define _gloffset_MultMatrixd 295
-#define _gloffset_Ortho 296
-#define _gloffset_PopMatrix 297
-#define _gloffset_PushMatrix 298
-#define _gloffset_Rotated 299
-#define _gloffset_Rotatef 300
-#define _gloffset_Scaled 301
-#define _gloffset_Scalef 302
-#define _gloffset_Translated 303
-#define _gloffset_Translatef 304
-#define _gloffset_Viewport 305
-#define _gloffset_ArrayElement 306
-#define _gloffset_BindTexture 307
-#define _gloffset_ColorPointer 308
-#define _gloffset_DisableClientState 309
-#define _gloffset_DrawArrays 310
-#define _gloffset_DrawElements 311
-#define _gloffset_EdgeFlagPointer 312
-#define _gloffset_EnableClientState 313
-#define _gloffset_IndexPointer 314
-#define _gloffset_Indexub 315
-#define _gloffset_Indexubv 316
-#define _gloffset_InterleavedArrays 317
-#define _gloffset_NormalPointer 318
-#define _gloffset_PolygonOffset 319
-#define _gloffset_TexCoordPointer 320
-#define _gloffset_VertexPointer 321
-#define _gloffset_AreTexturesResident 322
-#define _gloffset_CopyTexImage1D 323
-#define _gloffset_CopyTexImage2D 324
-#define _gloffset_CopyTexSubImage1D 325
-#define _gloffset_CopyTexSubImage2D 326
-#define _gloffset_DeleteTextures 327
-#define _gloffset_GenTextures 328
-#define _gloffset_GetPointerv 329
-#define _gloffset_IsTexture 330
-#define _gloffset_PrioritizeTextures 331
-#define _gloffset_TexSubImage1D 332
-#define _gloffset_TexSubImage2D 333
-#define _gloffset_PopClientAttrib 334
-#define _gloffset_PushClientAttrib 335
-#define _gloffset_BlendColor 336
-#define _gloffset_BlendEquation 337
-#define _gloffset_DrawRangeElements 338
-#define _gloffset_ColorTable 339
-#define _gloffset_ColorTableParameterfv 340
-#define _gloffset_ColorTableParameteriv 341
-#define _gloffset_CopyColorTable 342
-#define _gloffset_GetColorTable 343
-#define _gloffset_GetColorTableParameterfv 344
-#define _gloffset_GetColorTableParameteriv 345
-#define _gloffset_ColorSubTable 346
-#define _gloffset_CopyColorSubTable 347
-#define _gloffset_ConvolutionFilter1D 348
-#define _gloffset_ConvolutionFilter2D 349
-#define _gloffset_ConvolutionParameterf 350
-#define _gloffset_ConvolutionParameterfv 351
-#define _gloffset_ConvolutionParameteri 352
-#define _gloffset_ConvolutionParameteriv 353
-#define _gloffset_CopyConvolutionFilter1D 354
-#define _gloffset_CopyConvolutionFilter2D 355
-#define _gloffset_GetConvolutionFilter 356
-#define _gloffset_GetConvolutionParameterfv 357
-#define _gloffset_GetConvolutionParameteriv 358
-#define _gloffset_GetSeparableFilter 359
-#define _gloffset_SeparableFilter2D 360
-#define _gloffset_GetHistogram 361
-#define _gloffset_GetHistogramParameterfv 362
-#define _gloffset_GetHistogramParameteriv 363
-#define _gloffset_GetMinmax 364
-#define _gloffset_GetMinmaxParameterfv 365
-#define _gloffset_GetMinmaxParameteriv 366
-#define _gloffset_Histogram 367
-#define _gloffset_Minmax 368
-#define _gloffset_ResetHistogram 369
-#define _gloffset_ResetMinmax 370
-#define _gloffset_TexImage3D 371
-#define _gloffset_TexSubImage3D 372
-#define _gloffset_CopyTexSubImage3D 373
-#define _gloffset_ActiveTextureARB 374
-#define _gloffset_ClientActiveTextureARB 375
-#define _gloffset_MultiTexCoord1dARB 376
-#define _gloffset_MultiTexCoord1dvARB 377
-#define _gloffset_MultiTexCoord1fARB 378
-#define _gloffset_MultiTexCoord1fvARB 379
-#define _gloffset_MultiTexCoord1iARB 380
-#define _gloffset_MultiTexCoord1ivARB 381
-#define _gloffset_MultiTexCoord1sARB 382
-#define _gloffset_MultiTexCoord1svARB 383
-#define _gloffset_MultiTexCoord2dARB 384
-#define _gloffset_MultiTexCoord2dvARB 385
-#define _gloffset_MultiTexCoord2fARB 386
-#define _gloffset_MultiTexCoord2fvARB 387
-#define _gloffset_MultiTexCoord2iARB 388
-#define _gloffset_MultiTexCoord2ivARB 389
-#define _gloffset_MultiTexCoord2sARB 390
-#define _gloffset_MultiTexCoord2svARB 391
-#define _gloffset_MultiTexCoord3dARB 392
-#define _gloffset_MultiTexCoord3dvARB 393
-#define _gloffset_MultiTexCoord3fARB 394
-#define _gloffset_MultiTexCoord3fvARB 395
-#define _gloffset_MultiTexCoord3iARB 396
-#define _gloffset_MultiTexCoord3ivARB 397
-#define _gloffset_MultiTexCoord3sARB 398
-#define _gloffset_MultiTexCoord3svARB 399
-#define _gloffset_MultiTexCoord4dARB 400
-#define _gloffset_MultiTexCoord4dvARB 401
-#define _gloffset_MultiTexCoord4fARB 402
-#define _gloffset_MultiTexCoord4fvARB 403
-#define _gloffset_MultiTexCoord4iARB 404
-#define _gloffset_MultiTexCoord4ivARB 405
-#define _gloffset_MultiTexCoord4sARB 406
-#define _gloffset_MultiTexCoord4svARB 407
-
-#if !defined(IN_DRI_DRIVER)
-
-#define _gloffset_AttachShader 408
-#define _gloffset_CreateProgram 409
-#define _gloffset_CreateShader 410
-#define _gloffset_DeleteProgram 411
-#define _gloffset_DeleteShader 412
-#define _gloffset_DetachShader 413
-#define _gloffset_GetAttachedShaders 414
-#define _gloffset_GetProgramInfoLog 415
-#define _gloffset_GetProgramiv 416
-#define _gloffset_GetShaderInfoLog 417
-#define _gloffset_GetShaderiv 418
-#define _gloffset_IsProgram 419
-#define _gloffset_IsShader 420
-#define _gloffset_StencilFuncSeparate 421
-#define _gloffset_StencilMaskSeparate 422
-#define _gloffset_StencilOpSeparate 423
-#define _gloffset_UniformMatrix2x3fv 424
-#define _gloffset_UniformMatrix2x4fv 425
-#define _gloffset_UniformMatrix3x2fv 426
-#define _gloffset_UniformMatrix3x4fv 427
-#define _gloffset_UniformMatrix4x2fv 428
-#define _gloffset_UniformMatrix4x3fv 429
-#define _gloffset_LoadTransposeMatrixdARB 430
-#define _gloffset_LoadTransposeMatrixfARB 431
-#define _gloffset_MultTransposeMatrixdARB 432
-#define _gloffset_MultTransposeMatrixfARB 433
-#define _gloffset_SampleCoverageARB 434
-#define _gloffset_CompressedTexImage1DARB 435
-#define _gloffset_CompressedTexImage2DARB 436
-#define _gloffset_CompressedTexImage3DARB 437
-#define _gloffset_CompressedTexSubImage1DARB 438
-#define _gloffset_CompressedTexSubImage2DARB 439
-#define _gloffset_CompressedTexSubImage3DARB 440
-#define _gloffset_GetCompressedTexImageARB 441
-#define _gloffset_DisableVertexAttribArrayARB 442
-#define _gloffset_EnableVertexAttribArrayARB 443
-#define _gloffset_GetProgramEnvParameterdvARB 444
-#define _gloffset_GetProgramEnvParameterfvARB 445
-#define _gloffset_GetProgramLocalParameterdvARB 446
-#define _gloffset_GetProgramLocalParameterfvARB 447
-#define _gloffset_GetProgramStringARB 448
-#define _gloffset_GetProgramivARB 449
-#define _gloffset_GetVertexAttribdvARB 450
-#define _gloffset_GetVertexAttribfvARB 451
-#define _gloffset_GetVertexAttribivARB 452
-#define _gloffset_ProgramEnvParameter4dARB 453
-#define _gloffset_ProgramEnvParameter4dvARB 454
-#define _gloffset_ProgramEnvParameter4fARB 455
-#define _gloffset_ProgramEnvParameter4fvARB 456
-#define _gloffset_ProgramLocalParameter4dARB 457
-#define _gloffset_ProgramLocalParameter4dvARB 458
-#define _gloffset_ProgramLocalParameter4fARB 459
-#define _gloffset_ProgramLocalParameter4fvARB 460
-#define _gloffset_ProgramStringARB 461
-#define _gloffset_VertexAttrib1dARB 462
-#define _gloffset_VertexAttrib1dvARB 463
-#define _gloffset_VertexAttrib1fARB 464
-#define _gloffset_VertexAttrib1fvARB 465
-#define _gloffset_VertexAttrib1sARB 466
-#define _gloffset_VertexAttrib1svARB 467
-#define _gloffset_VertexAttrib2dARB 468
-#define _gloffset_VertexAttrib2dvARB 469
-#define _gloffset_VertexAttrib2fARB 470
-#define _gloffset_VertexAttrib2fvARB 471
-#define _gloffset_VertexAttrib2sARB 472
-#define _gloffset_VertexAttrib2svARB 473
-#define _gloffset_VertexAttrib3dARB 474
-#define _gloffset_VertexAttrib3dvARB 475
-#define _gloffset_VertexAttrib3fARB 476
-#define _gloffset_VertexAttrib3fvARB 477
-#define _gloffset_VertexAttrib3sARB 478
-#define _gloffset_VertexAttrib3svARB 479
-#define _gloffset_VertexAttrib4NbvARB 480
-#define _gloffset_VertexAttrib4NivARB 481
-#define _gloffset_VertexAttrib4NsvARB 482
-#define _gloffset_VertexAttrib4NubARB 483
-#define _gloffset_VertexAttrib4NubvARB 484
-#define _gloffset_VertexAttrib4NuivARB 485
-#define _gloffset_VertexAttrib4NusvARB 486
-#define _gloffset_VertexAttrib4bvARB 487
-#define _gloffset_VertexAttrib4dARB 488
-#define _gloffset_VertexAttrib4dvARB 489
-#define _gloffset_VertexAttrib4fARB 490
-#define _gloffset_VertexAttrib4fvARB 491
-#define _gloffset_VertexAttrib4ivARB 492
-#define _gloffset_VertexAttrib4sARB 493
-#define _gloffset_VertexAttrib4svARB 494
-#define _gloffset_VertexAttrib4ubvARB 495
-#define _gloffset_VertexAttrib4uivARB 496
-#define _gloffset_VertexAttrib4usvARB 497
-#define _gloffset_VertexAttribPointerARB 498
-#define _gloffset_BindBufferARB 499
-#define _gloffset_BufferDataARB 500
-#define _gloffset_BufferSubDataARB 501
-#define _gloffset_DeleteBuffersARB 502
-#define _gloffset_GenBuffersARB 503
-#define _gloffset_GetBufferParameterivARB 504
-#define _gloffset_GetBufferPointervARB 505
-#define _gloffset_GetBufferSubDataARB 506
-#define _gloffset_IsBufferARB 507
-#define _gloffset_MapBufferARB 508
-#define _gloffset_UnmapBufferARB 509
-#define _gloffset_BeginQueryARB 510
-#define _gloffset_DeleteQueriesARB 511
-#define _gloffset_EndQueryARB 512
-#define _gloffset_GenQueriesARB 513
-#define _gloffset_GetQueryObjectivARB 514
-#define _gloffset_GetQueryObjectuivARB 515
-#define _gloffset_GetQueryivARB 516
-#define _gloffset_IsQueryARB 517
-#define _gloffset_AttachObjectARB 518
-#define _gloffset_CompileShaderARB 519
-#define _gloffset_CreateProgramObjectARB 520
-#define _gloffset_CreateShaderObjectARB 521
-#define _gloffset_DeleteObjectARB 522
-#define _gloffset_DetachObjectARB 523
-#define _gloffset_GetActiveUniformARB 524
-#define _gloffset_GetAttachedObjectsARB 525
-#define _gloffset_GetHandleARB 526
-#define _gloffset_GetInfoLogARB 527
-#define _gloffset_GetObjectParameterfvARB 528
-#define _gloffset_GetObjectParameterivARB 529
-#define _gloffset_GetShaderSourceARB 530
-#define _gloffset_GetUniformLocationARB 531
-#define _gloffset_GetUniformfvARB 532
-#define _gloffset_GetUniformivARB 533
-#define _gloffset_LinkProgramARB 534
-#define _gloffset_ShaderSourceARB 535
-#define _gloffset_Uniform1fARB 536
-#define _gloffset_Uniform1fvARB 537
-#define _gloffset_Uniform1iARB 538
-#define _gloffset_Uniform1ivARB 539
-#define _gloffset_Uniform2fARB 540
-#define _gloffset_Uniform2fvARB 541
-#define _gloffset_Uniform2iARB 542
-#define _gloffset_Uniform2ivARB 543
-#define _gloffset_Uniform3fARB 544
-#define _gloffset_Uniform3fvARB 545
-#define _gloffset_Uniform3iARB 546
-#define _gloffset_Uniform3ivARB 547
-#define _gloffset_Uniform4fARB 548
-#define _gloffset_Uniform4fvARB 549
-#define _gloffset_Uniform4iARB 550
-#define _gloffset_Uniform4ivARB 551
-#define _gloffset_UniformMatrix2fvARB 552
-#define _gloffset_UniformMatrix3fvARB 553
-#define _gloffset_UniformMatrix4fvARB 554
-#define _gloffset_UseProgramObjectARB 555
-#define _gloffset_ValidateProgramARB 556
-#define _gloffset_BindAttribLocationARB 557
-#define _gloffset_GetActiveAttribARB 558
-#define _gloffset_GetAttribLocationARB 559
-#define _gloffset_DrawBuffersARB 560
-#define _gloffset_PolygonOffsetEXT 561
-#define _gloffset_GetPixelTexGenParameterfvSGIS 562
-#define _gloffset_GetPixelTexGenParameterivSGIS 563
-#define _gloffset_PixelTexGenParameterfSGIS 564
-#define _gloffset_PixelTexGenParameterfvSGIS 565
-#define _gloffset_PixelTexGenParameteriSGIS 566
-#define _gloffset_PixelTexGenParameterivSGIS 567
-#define _gloffset_SampleMaskSGIS 568
-#define _gloffset_SamplePatternSGIS 569
-#define _gloffset_ColorPointerEXT 570
-#define _gloffset_EdgeFlagPointerEXT 571
-#define _gloffset_IndexPointerEXT 572
-#define _gloffset_NormalPointerEXT 573
-#define _gloffset_TexCoordPointerEXT 574
-#define _gloffset_VertexPointerEXT 575
-#define _gloffset_PointParameterfEXT 576
-#define _gloffset_PointParameterfvEXT 577
-#define _gloffset_LockArraysEXT 578
-#define _gloffset_UnlockArraysEXT 579
-#define _gloffset_CullParameterdvEXT 580
-#define _gloffset_CullParameterfvEXT 581
-#define _gloffset_SecondaryColor3bEXT 582
-#define _gloffset_SecondaryColor3bvEXT 583
-#define _gloffset_SecondaryColor3dEXT 584
-#define _gloffset_SecondaryColor3dvEXT 585
-#define _gloffset_SecondaryColor3fEXT 586
-#define _gloffset_SecondaryColor3fvEXT 587
-#define _gloffset_SecondaryColor3iEXT 588
-#define _gloffset_SecondaryColor3ivEXT 589
-#define _gloffset_SecondaryColor3sEXT 590
-#define _gloffset_SecondaryColor3svEXT 591
-#define _gloffset_SecondaryColor3ubEXT 592
-#define _gloffset_SecondaryColor3ubvEXT 593
-#define _gloffset_SecondaryColor3uiEXT 594
-#define _gloffset_SecondaryColor3uivEXT 595
-#define _gloffset_SecondaryColor3usEXT 596
-#define _gloffset_SecondaryColor3usvEXT 597
-#define _gloffset_SecondaryColorPointerEXT 598
-#define _gloffset_MultiDrawArraysEXT 599
-#define _gloffset_MultiDrawElementsEXT 600
-#define _gloffset_FogCoordPointerEXT 601
-#define _gloffset_FogCoorddEXT 602
-#define _gloffset_FogCoorddvEXT 603
-#define _gloffset_FogCoordfEXT 604
-#define _gloffset_FogCoordfvEXT 605
-#define _gloffset_PixelTexGenSGIX 606
-#define _gloffset_BlendFuncSeparateEXT 607
-#define _gloffset_FlushVertexArrayRangeNV 608
-#define _gloffset_VertexArrayRangeNV 609
-#define _gloffset_CombinerInputNV 610
-#define _gloffset_CombinerOutputNV 611
-#define _gloffset_CombinerParameterfNV 612
-#define _gloffset_CombinerParameterfvNV 613
-#define _gloffset_CombinerParameteriNV 614
-#define _gloffset_CombinerParameterivNV 615
-#define _gloffset_FinalCombinerInputNV 616
-#define _gloffset_GetCombinerInputParameterfvNV 617
-#define _gloffset_GetCombinerInputParameterivNV 618
-#define _gloffset_GetCombinerOutputParameterfvNV 619
-#define _gloffset_GetCombinerOutputParameterivNV 620
-#define _gloffset_GetFinalCombinerInputParameterfvNV 621
-#define _gloffset_GetFinalCombinerInputParameterivNV 622
-#define _gloffset_ResizeBuffersMESA 623
-#define _gloffset_WindowPos2dMESA 624
-#define _gloffset_WindowPos2dvMESA 625
-#define _gloffset_WindowPos2fMESA 626
-#define _gloffset_WindowPos2fvMESA 627
-#define _gloffset_WindowPos2iMESA 628
-#define _gloffset_WindowPos2ivMESA 629
-#define _gloffset_WindowPos2sMESA 630
-#define _gloffset_WindowPos2svMESA 631
-#define _gloffset_WindowPos3dMESA 632
-#define _gloffset_WindowPos3dvMESA 633
-#define _gloffset_WindowPos3fMESA 634
-#define _gloffset_WindowPos3fvMESA 635
-#define _gloffset_WindowPos3iMESA 636
-#define _gloffset_WindowPos3ivMESA 637
-#define _gloffset_WindowPos3sMESA 638
-#define _gloffset_WindowPos3svMESA 639
-#define _gloffset_WindowPos4dMESA 640
-#define _gloffset_WindowPos4dvMESA 641
-#define _gloffset_WindowPos4fMESA 642
-#define _gloffset_WindowPos4fvMESA 643
-#define _gloffset_WindowPos4iMESA 644
-#define _gloffset_WindowPos4ivMESA 645
-#define _gloffset_WindowPos4sMESA 646
-#define _gloffset_WindowPos4svMESA 647
-#define _gloffset_MultiModeDrawArraysIBM 648
-#define _gloffset_MultiModeDrawElementsIBM 649
-#define _gloffset_DeleteFencesNV 650
-#define _gloffset_FinishFenceNV 651
-#define _gloffset_GenFencesNV 652
-#define _gloffset_GetFenceivNV 653
-#define _gloffset_IsFenceNV 654
-#define _gloffset_SetFenceNV 655
-#define _gloffset_TestFenceNV 656
-#define _gloffset_AreProgramsResidentNV 657
-#define _gloffset_BindProgramNV 658
-#define _gloffset_DeleteProgramsNV 659
-#define _gloffset_ExecuteProgramNV 660
-#define _gloffset_GenProgramsNV 661
-#define _gloffset_GetProgramParameterdvNV 662
-#define _gloffset_GetProgramParameterfvNV 663
-#define _gloffset_GetProgramStringNV 664
-#define _gloffset_GetProgramivNV 665
-#define _gloffset_GetTrackMatrixivNV 666
-#define _gloffset_GetVertexAttribPointervNV 667
-#define _gloffset_GetVertexAttribdvNV 668
-#define _gloffset_GetVertexAttribfvNV 669
-#define _gloffset_GetVertexAttribivNV 670
-#define _gloffset_IsProgramNV 671
-#define _gloffset_LoadProgramNV 672
-#define _gloffset_ProgramParameters4dvNV 673
-#define _gloffset_ProgramParameters4fvNV 674
-#define _gloffset_RequestResidentProgramsNV 675
-#define _gloffset_TrackMatrixNV 676
-#define _gloffset_VertexAttrib1dNV 677
-#define _gloffset_VertexAttrib1dvNV 678
-#define _gloffset_VertexAttrib1fNV 679
-#define _gloffset_VertexAttrib1fvNV 680
-#define _gloffset_VertexAttrib1sNV 681
-#define _gloffset_VertexAttrib1svNV 682
-#define _gloffset_VertexAttrib2dNV 683
-#define _gloffset_VertexAttrib2dvNV 684
-#define _gloffset_VertexAttrib2fNV 685
-#define _gloffset_VertexAttrib2fvNV 686
-#define _gloffset_VertexAttrib2sNV 687
-#define _gloffset_VertexAttrib2svNV 688
-#define _gloffset_VertexAttrib3dNV 689
-#define _gloffset_VertexAttrib3dvNV 690
-#define _gloffset_VertexAttrib3fNV 691
-#define _gloffset_VertexAttrib3fvNV 692
-#define _gloffset_VertexAttrib3sNV 693
-#define _gloffset_VertexAttrib3svNV 694
-#define _gloffset_VertexAttrib4dNV 695
-#define _gloffset_VertexAttrib4dvNV 696
-#define _gloffset_VertexAttrib4fNV 697
-#define _gloffset_VertexAttrib4fvNV 698
-#define _gloffset_VertexAttrib4sNV 699
-#define _gloffset_VertexAttrib4svNV 700
-#define _gloffset_VertexAttrib4ubNV 701
-#define _gloffset_VertexAttrib4ubvNV 702
-#define _gloffset_VertexAttribPointerNV 703
-#define _gloffset_VertexAttribs1dvNV 704
-#define _gloffset_VertexAttribs1fvNV 705
-#define _gloffset_VertexAttribs1svNV 706
-#define _gloffset_VertexAttribs2dvNV 707
-#define _gloffset_VertexAttribs2fvNV 708
-#define _gloffset_VertexAttribs2svNV 709
-#define _gloffset_VertexAttribs3dvNV 710
-#define _gloffset_VertexAttribs3fvNV 711
-#define _gloffset_VertexAttribs3svNV 712
-#define _gloffset_VertexAttribs4dvNV 713
-#define _gloffset_VertexAttribs4fvNV 714
-#define _gloffset_VertexAttribs4svNV 715
-#define _gloffset_VertexAttribs4ubvNV 716
-#define _gloffset_AlphaFragmentOp1ATI 717
-#define _gloffset_AlphaFragmentOp2ATI 718
-#define _gloffset_AlphaFragmentOp3ATI 719
-#define _gloffset_BeginFragmentShaderATI 720
-#define _gloffset_BindFragmentShaderATI 721
-#define _gloffset_ColorFragmentOp1ATI 722
-#define _gloffset_ColorFragmentOp2ATI 723
-#define _gloffset_ColorFragmentOp3ATI 724
-#define _gloffset_DeleteFragmentShaderATI 725
-#define _gloffset_EndFragmentShaderATI 726
-#define _gloffset_GenFragmentShadersATI 727
-#define _gloffset_PassTexCoordATI 728
-#define _gloffset_SampleMapATI 729
-#define _gloffset_SetFragmentShaderConstantATI 730
-#define _gloffset_PointParameteriNV 731
-#define _gloffset_PointParameterivNV 732
-#define _gloffset_ActiveStencilFaceEXT 733
-#define _gloffset_BindVertexArrayAPPLE 734
-#define _gloffset_DeleteVertexArraysAPPLE 735
-#define _gloffset_GenVertexArraysAPPLE 736
-#define _gloffset_IsVertexArrayAPPLE 737
-#define _gloffset_GetProgramNamedParameterdvNV 738
-#define _gloffset_GetProgramNamedParameterfvNV 739
-#define _gloffset_ProgramNamedParameter4dNV 740
-#define _gloffset_ProgramNamedParameter4dvNV 741
-#define _gloffset_ProgramNamedParameter4fNV 742
-#define _gloffset_ProgramNamedParameter4fvNV 743
-#define _gloffset_DepthBoundsEXT 744
-#define _gloffset_BlendEquationSeparateEXT 745
-#define _gloffset_BindFramebufferEXT 746
-#define _gloffset_BindRenderbufferEXT 747
-#define _gloffset_CheckFramebufferStatusEXT 748
-#define _gloffset_DeleteFramebuffersEXT 749
-#define _gloffset_DeleteRenderbuffersEXT 750
-#define _gloffset_FramebufferRenderbufferEXT 751
-#define _gloffset_FramebufferTexture1DEXT 752
-#define _gloffset_FramebufferTexture2DEXT 753
-#define _gloffset_FramebufferTexture3DEXT 754
-#define _gloffset_GenFramebuffersEXT 755
-#define _gloffset_GenRenderbuffersEXT 756
-#define _gloffset_GenerateMipmapEXT 757
-#define _gloffset_GetFramebufferAttachmentParameterivEXT 758
-#define _gloffset_GetRenderbufferParameterivEXT 759
-#define _gloffset_IsFramebufferEXT 760
-#define _gloffset_IsRenderbufferEXT 761
-#define _gloffset_RenderbufferStorageEXT 762
-#define _gloffset_BlitFramebufferEXT 763
-#define _gloffset_FramebufferTextureLayerEXT 764
-#define _gloffset_StencilFuncSeparateATI 765
-#define _gloffset_ProgramEnvParameters4fvEXT 766
-#define _gloffset_ProgramLocalParameters4fvEXT 767
-#define _gloffset_GetQueryObjecti64vEXT 768
-#define _gloffset_GetQueryObjectui64vEXT 769
-#define _gloffset_FIRST_DYNAMIC 770
-
-#else
-
-#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index]
-#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index]
-#define _gloffset_CreateShader driDispatchRemapTable[CreateShader_remap_index]
-#define _gloffset_DeleteProgram driDispatchRemapTable[DeleteProgram_remap_index]
-#define _gloffset_DeleteShader driDispatchRemapTable[DeleteShader_remap_index]
-#define _gloffset_DetachShader driDispatchRemapTable[DetachShader_remap_index]
-#define _gloffset_GetAttachedShaders driDispatchRemapTable[GetAttachedShaders_remap_index]
-#define _gloffset_GetProgramInfoLog driDispatchRemapTable[GetProgramInfoLog_remap_index]
-#define _gloffset_GetProgramiv driDispatchRemapTable[GetProgramiv_remap_index]
-#define _gloffset_GetShaderInfoLog driDispatchRemapTable[GetShaderInfoLog_remap_index]
-#define _gloffset_GetShaderiv driDispatchRemapTable[GetShaderiv_remap_index]
-#define _gloffset_IsProgram driDispatchRemapTable[IsProgram_remap_index]
-#define _gloffset_IsShader driDispatchRemapTable[IsShader_remap_index]
-#define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index]
-#define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index]
-#define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index]
-#define _gloffset_UniformMatrix2x3fv driDispatchRemapTable[UniformMatrix2x3fv_remap_index]
-#define _gloffset_UniformMatrix2x4fv driDispatchRemapTable[UniformMatrix2x4fv_remap_index]
-#define _gloffset_UniformMatrix3x2fv driDispatchRemapTable[UniformMatrix3x2fv_remap_index]
-#define _gloffset_UniformMatrix3x4fv driDispatchRemapTable[UniformMatrix3x4fv_remap_index]
-#define _gloffset_UniformMatrix4x2fv driDispatchRemapTable[UniformMatrix4x2fv_remap_index]
-#define _gloffset_UniformMatrix4x3fv driDispatchRemapTable[UniformMatrix4x3fv_remap_index]
-#define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index]
-#define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index]
-#define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index]
-#define _gloffset_MultTransposeMatrixfARB driDispatchRemapTable[MultTransposeMatrixfARB_remap_index]
-#define _gloffset_SampleCoverageARB driDispatchRemapTable[SampleCoverageARB_remap_index]
-#define _gloffset_CompressedTexImage1DARB driDispatchRemapTable[CompressedTexImage1DARB_remap_index]
-#define _gloffset_CompressedTexImage2DARB driDispatchRemapTable[CompressedTexImage2DARB_remap_index]
-#define _gloffset_CompressedTexImage3DARB driDispatchRemapTable[CompressedTexImage3DARB_remap_index]
-#define _gloffset_CompressedTexSubImage1DARB driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index]
-#define _gloffset_CompressedTexSubImage2DARB driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index]
-#define _gloffset_CompressedTexSubImage3DARB driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index]
-#define _gloffset_GetCompressedTexImageARB driDispatchRemapTable[GetCompressedTexImageARB_remap_index]
-#define _gloffset_DisableVertexAttribArrayARB driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index]
-#define _gloffset_EnableVertexAttribArrayARB driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index]
-#define _gloffset_GetProgramEnvParameterdvARB driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index]
-#define _gloffset_GetProgramEnvParameterfvARB driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index]
-#define _gloffset_GetProgramLocalParameterdvARB driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index]
-#define _gloffset_GetProgramLocalParameterfvARB driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index]
-#define _gloffset_GetProgramStringARB driDispatchRemapTable[GetProgramStringARB_remap_index]
-#define _gloffset_GetProgramivARB driDispatchRemapTable[GetProgramivARB_remap_index]
-#define _gloffset_GetVertexAttribdvARB driDispatchRemapTable[GetVertexAttribdvARB_remap_index]
-#define _gloffset_GetVertexAttribfvARB driDispatchRemapTable[GetVertexAttribfvARB_remap_index]
-#define _gloffset_GetVertexAttribivARB driDispatchRemapTable[GetVertexAttribivARB_remap_index]
-#define _gloffset_ProgramEnvParameter4dARB driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index]
-#define _gloffset_ProgramEnvParameter4dvARB driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index]
-#define _gloffset_ProgramEnvParameter4fARB driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index]
-#define _gloffset_ProgramEnvParameter4fvARB driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index]
-#define _gloffset_ProgramLocalParameter4dARB driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index]
-#define _gloffset_ProgramLocalParameter4dvARB driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index]
-#define _gloffset_ProgramLocalParameter4fARB driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index]
-#define _gloffset_ProgramLocalParameter4fvARB driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index]
-#define _gloffset_ProgramStringARB driDispatchRemapTable[ProgramStringARB_remap_index]
-#define _gloffset_VertexAttrib1dARB driDispatchRemapTable[VertexAttrib1dARB_remap_index]
-#define _gloffset_VertexAttrib1dvARB driDispatchRemapTable[VertexAttrib1dvARB_remap_index]
-#define _gloffset_VertexAttrib1fARB driDispatchRemapTable[VertexAttrib1fARB_remap_index]
-#define _gloffset_VertexAttrib1fvARB driDispatchRemapTable[VertexAttrib1fvARB_remap_index]
-#define _gloffset_VertexAttrib1sARB driDispatchRemapTable[VertexAttrib1sARB_remap_index]
-#define _gloffset_VertexAttrib1svARB driDispatchRemapTable[VertexAttrib1svARB_remap_index]
-#define _gloffset_VertexAttrib2dARB driDispatchRemapTable[VertexAttrib2dARB_remap_index]
-#define _gloffset_VertexAttrib2dvARB driDispatchRemapTable[VertexAttrib2dvARB_remap_index]
-#define _gloffset_VertexAttrib2fARB driDispatchRemapTable[VertexAttrib2fARB_remap_index]
-#define _gloffset_VertexAttrib2fvARB driDispatchRemapTable[VertexAttrib2fvARB_remap_index]
-#define _gloffset_VertexAttrib2sARB driDispatchRemapTable[VertexAttrib2sARB_remap_index]
-#define _gloffset_VertexAttrib2svARB driDispatchRemapTable[VertexAttrib2svARB_remap_index]
-#define _gloffset_VertexAttrib3dARB driDispatchRemapTable[VertexAttrib3dARB_remap_index]
-#define _gloffset_VertexAttrib3dvARB driDispatchRemapTable[VertexAttrib3dvARB_remap_index]
-#define _gloffset_VertexAttrib3fARB driDispatchRemapTable[VertexAttrib3fARB_remap_index]
-#define _gloffset_VertexAttrib3fvARB driDispatchRemapTable[VertexAttrib3fvARB_remap_index]
-#define _gloffset_VertexAttrib3sARB driDispatchRemapTable[VertexAttrib3sARB_remap_index]
-#define _gloffset_VertexAttrib3svARB driDispatchRemapTable[VertexAttrib3svARB_remap_index]
-#define _gloffset_VertexAttrib4NbvARB driDispatchRemapTable[VertexAttrib4NbvARB_remap_index]
-#define _gloffset_VertexAttrib4NivARB driDispatchRemapTable[VertexAttrib4NivARB_remap_index]
-#define _gloffset_VertexAttrib4NsvARB driDispatchRemapTable[VertexAttrib4NsvARB_remap_index]
-#define _gloffset_VertexAttrib4NubARB driDispatchRemapTable[VertexAttrib4NubARB_remap_index]
-#define _gloffset_VertexAttrib4NubvARB driDispatchRemapTable[VertexAttrib4NubvARB_remap_index]
-#define _gloffset_VertexAttrib4NuivARB driDispatchRemapTable[VertexAttrib4NuivARB_remap_index]
-#define _gloffset_VertexAttrib4NusvARB driDispatchRemapTable[VertexAttrib4NusvARB_remap_index]
-#define _gloffset_VertexAttrib4bvARB driDispatchRemapTable[VertexAttrib4bvARB_remap_index]
-#define _gloffset_VertexAttrib4dARB driDispatchRemapTable[VertexAttrib4dARB_remap_index]
-#define _gloffset_VertexAttrib4dvARB driDispatchRemapTable[VertexAttrib4dvARB_remap_index]
-#define _gloffset_VertexAttrib4fARB driDispatchRemapTable[VertexAttrib4fARB_remap_index]
-#define _gloffset_VertexAttrib4fvARB driDispatchRemapTable[VertexAttrib4fvARB_remap_index]
-#define _gloffset_VertexAttrib4ivARB driDispatchRemapTable[VertexAttrib4ivARB_remap_index]
-#define _gloffset_VertexAttrib4sARB driDispatchRemapTable[VertexAttrib4sARB_remap_index]
-#define _gloffset_VertexAttrib4svARB driDispatchRemapTable[VertexAttrib4svARB_remap_index]
-#define _gloffset_VertexAttrib4ubvARB driDispatchRemapTable[VertexAttrib4ubvARB_remap_index]
-#define _gloffset_VertexAttrib4uivARB driDispatchRemapTable[VertexAttrib4uivARB_remap_index]
-#define _gloffset_VertexAttrib4usvARB driDispatchRemapTable[VertexAttrib4usvARB_remap_index]
-#define _gloffset_VertexAttribPointerARB driDispatchRemapTable[VertexAttribPointerARB_remap_index]
-#define _gloffset_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index]
-#define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index]
-#define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index]
-#define _gloffset_DeleteBuffersARB driDispatchRemapTable[DeleteBuffersARB_remap_index]
-#define _gloffset_GenBuffersARB driDispatchRemapTable[GenBuffersARB_remap_index]
-#define _gloffset_GetBufferParameterivARB driDispatchRemapTable[GetBufferParameterivARB_remap_index]
-#define _gloffset_GetBufferPointervARB driDispatchRemapTable[GetBufferPointervARB_remap_index]
-#define _gloffset_GetBufferSubDataARB driDispatchRemapTable[GetBufferSubDataARB_remap_index]
-#define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index]
-#define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index]
-#define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_remap_index]
-#define _gloffset_BeginQueryARB driDispatchRemapTable[BeginQueryARB_remap_index]
-#define _gloffset_DeleteQueriesARB driDispatchRemapTable[DeleteQueriesARB_remap_index]
-#define _gloffset_EndQueryARB driDispatchRemapTable[EndQueryARB_remap_index]
-#define _gloffset_GenQueriesARB driDispatchRemapTable[GenQueriesARB_remap_index]
-#define _gloffset_GetQueryObjectivARB driDispatchRemapTable[GetQueryObjectivARB_remap_index]
-#define _gloffset_GetQueryObjectuivARB driDispatchRemapTable[GetQueryObjectuivARB_remap_index]
-#define _gloffset_GetQueryivARB driDispatchRemapTable[GetQueryivARB_remap_index]
-#define _gloffset_IsQueryARB driDispatchRemapTable[IsQueryARB_remap_index]
-#define _gloffset_AttachObjectARB driDispatchRemapTable[AttachObjectARB_remap_index]
-#define _gloffset_CompileShaderARB driDispatchRemapTable[CompileShaderARB_remap_index]
-#define _gloffset_CreateProgramObjectARB driDispatchRemapTable[CreateProgramObjectARB_remap_index]
-#define _gloffset_CreateShaderObjectARB driDispatchRemapTable[CreateShaderObjectARB_remap_index]
-#define _gloffset_DeleteObjectARB driDispatchRemapTable[DeleteObjectARB_remap_index]
-#define _gloffset_DetachObjectARB driDispatchRemapTable[DetachObjectARB_remap_index]
-#define _gloffset_GetActiveUniformARB driDispatchRemapTable[GetActiveUniformARB_remap_index]
-#define _gloffset_GetAttachedObjectsARB driDispatchRemapTable[GetAttachedObjectsARB_remap_index]
-#define _gloffset_GetHandleARB driDispatchRemapTable[GetHandleARB_remap_index]
-#define _gloffset_GetInfoLogARB driDispatchRemapTable[GetInfoLogARB_remap_index]
-#define _gloffset_GetObjectParameterfvARB driDispatchRemapTable[GetObjectParameterfvARB_remap_index]
-#define _gloffset_GetObjectParameterivARB driDispatchRemapTable[GetObjectParameterivARB_remap_index]
-#define _gloffset_GetShaderSourceARB driDispatchRemapTable[GetShaderSourceARB_remap_index]
-#define _gloffset_GetUniformLocationARB driDispatchRemapTable[GetUniformLocationARB_remap_index]
-#define _gloffset_GetUniformfvARB driDispatchRemapTable[GetUniformfvARB_remap_index]
-#define _gloffset_GetUniformivARB driDispatchRemapTable[GetUniformivARB_remap_index]
-#define _gloffset_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index]
-#define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index]
-#define _gloffset_Uniform1fARB driDispatchRemapTable[Uniform1fARB_remap_index]
-#define _gloffset_Uniform1fvARB driDispatchRemapTable[Uniform1fvARB_remap_index]
-#define _gloffset_Uniform1iARB driDispatchRemapTable[Uniform1iARB_remap_index]
-#define _gloffset_Uniform1ivARB driDispatchRemapTable[Uniform1ivARB_remap_index]
-#define _gloffset_Uniform2fARB driDispatchRemapTable[Uniform2fARB_remap_index]
-#define _gloffset_Uniform2fvARB driDispatchRemapTable[Uniform2fvARB_remap_index]
-#define _gloffset_Uniform2iARB driDispatchRemapTable[Uniform2iARB_remap_index]
-#define _gloffset_Uniform2ivARB driDispatchRemapTable[Uniform2ivARB_remap_index]
-#define _gloffset_Uniform3fARB driDispatchRemapTable[Uniform3fARB_remap_index]
-#define _gloffset_Uniform3fvARB driDispatchRemapTable[Uniform3fvARB_remap_index]
-#define _gloffset_Uniform3iARB driDispatchRemapTable[Uniform3iARB_remap_index]
-#define _gloffset_Uniform3ivARB driDispatchRemapTable[Uniform3ivARB_remap_index]
-#define _gloffset_Uniform4fARB driDispatchRemapTable[Uniform4fARB_remap_index]
-#define _gloffset_Uniform4fvARB driDispatchRemapTable[Uniform4fvARB_remap_index]
-#define _gloffset_Uniform4iARB driDispatchRemapTable[Uniform4iARB_remap_index]
-#define _gloffset_Uniform4ivARB driDispatchRemapTable[Uniform4ivARB_remap_index]
-#define _gloffset_UniformMatrix2fvARB driDispatchRemapTable[UniformMatrix2fvARB_remap_index]
-#define _gloffset_UniformMatrix3fvARB driDispatchRemapTable[UniformMatrix3fvARB_remap_index]
-#define _gloffset_UniformMatrix4fvARB driDispatchRemapTable[UniformMatrix4fvARB_remap_index]
-#define _gloffset_UseProgramObjectARB driDispatchRemapTable[UseProgramObjectARB_remap_index]
-#define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index]
-#define _gloffset_BindAttribLocationARB driDispatchRemapTable[BindAttribLocationARB_remap_index]
-#define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index]
-#define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index]
-#define _gloffset_DrawBuffersARB driDispatchRemapTable[DrawBuffersARB_remap_index]
-#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index]
-#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index]
-#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index]
-#define _gloffset_PixelTexGenParameterfSGIS driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index]
-#define _gloffset_PixelTexGenParameterfvSGIS driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index]
-#define _gloffset_PixelTexGenParameteriSGIS driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index]
-#define _gloffset_PixelTexGenParameterivSGIS driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index]
-#define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index]
-#define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index]
-#define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index]
-#define _gloffset_EdgeFlagPointerEXT driDispatchRemapTable[EdgeFlagPointerEXT_remap_index]
-#define _gloffset_IndexPointerEXT driDispatchRemapTable[IndexPointerEXT_remap_index]
-#define _gloffset_NormalPointerEXT driDispatchRemapTable[NormalPointerEXT_remap_index]
-#define _gloffset_TexCoordPointerEXT driDispatchRemapTable[TexCoordPointerEXT_remap_index]
-#define _gloffset_VertexPointerEXT driDispatchRemapTable[VertexPointerEXT_remap_index]
-#define _gloffset_PointParameterfEXT driDispatchRemapTable[PointParameterfEXT_remap_index]
-#define _gloffset_PointParameterfvEXT driDispatchRemapTable[PointParameterfvEXT_remap_index]
-#define _gloffset_LockArraysEXT driDispatchRemapTable[LockArraysEXT_remap_index]
-#define _gloffset_UnlockArraysEXT driDispatchRemapTable[UnlockArraysEXT_remap_index]
-#define _gloffset_CullParameterdvEXT driDispatchRemapTable[CullParameterdvEXT_remap_index]
-#define _gloffset_CullParameterfvEXT driDispatchRemapTable[CullParameterfvEXT_remap_index]
-#define _gloffset_SecondaryColor3bEXT driDispatchRemapTable[SecondaryColor3bEXT_remap_index]
-#define _gloffset_SecondaryColor3bvEXT driDispatchRemapTable[SecondaryColor3bvEXT_remap_index]
-#define _gloffset_SecondaryColor3dEXT driDispatchRemapTable[SecondaryColor3dEXT_remap_index]
-#define _gloffset_SecondaryColor3dvEXT driDispatchRemapTable[SecondaryColor3dvEXT_remap_index]
-#define _gloffset_SecondaryColor3fEXT driDispatchRemapTable[SecondaryColor3fEXT_remap_index]
-#define _gloffset_SecondaryColor3fvEXT driDispatchRemapTable[SecondaryColor3fvEXT_remap_index]
-#define _gloffset_SecondaryColor3iEXT driDispatchRemapTable[SecondaryColor3iEXT_remap_index]
-#define _gloffset_SecondaryColor3ivEXT driDispatchRemapTable[SecondaryColor3ivEXT_remap_index]
-#define _gloffset_SecondaryColor3sEXT driDispatchRemapTable[SecondaryColor3sEXT_remap_index]
-#define _gloffset_SecondaryColor3svEXT driDispatchRemapTable[SecondaryColor3svEXT_remap_index]
-#define _gloffset_SecondaryColor3ubEXT driDispatchRemapTable[SecondaryColor3ubEXT_remap_index]
-#define _gloffset_SecondaryColor3ubvEXT driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index]
-#define _gloffset_SecondaryColor3uiEXT driDispatchRemapTable[SecondaryColor3uiEXT_remap_index]
-#define _gloffset_SecondaryColor3uivEXT driDispatchRemapTable[SecondaryColor3uivEXT_remap_index]
-#define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index]
-#define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index]
-#define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index]
-#define _gloffset_MultiDrawArraysEXT driDispatchRemapTable[MultiDrawArraysEXT_remap_index]
-#define _gloffset_MultiDrawElementsEXT driDispatchRemapTable[MultiDrawElementsEXT_remap_index]
-#define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index]
-#define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index]
-#define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index]
-#define _gloffset_FogCoordfEXT driDispatchRemapTable[FogCoordfEXT_remap_index]
-#define _gloffset_FogCoordfvEXT driDispatchRemapTable[FogCoordfvEXT_remap_index]
-#define _gloffset_PixelTexGenSGIX driDispatchRemapTable[PixelTexGenSGIX_remap_index]
-#define _gloffset_BlendFuncSeparateEXT driDispatchRemapTable[BlendFuncSeparateEXT_remap_index]
-#define _gloffset_FlushVertexArrayRangeNV driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index]
-#define _gloffset_VertexArrayRangeNV driDispatchRemapTable[VertexArrayRangeNV_remap_index]
-#define _gloffset_CombinerInputNV driDispatchRemapTable[CombinerInputNV_remap_index]
-#define _gloffset_CombinerOutputNV driDispatchRemapTable[CombinerOutputNV_remap_index]
-#define _gloffset_CombinerParameterfNV driDispatchRemapTable[CombinerParameterfNV_remap_index]
-#define _gloffset_CombinerParameterfvNV driDispatchRemapTable[CombinerParameterfvNV_remap_index]
-#define _gloffset_CombinerParameteriNV driDispatchRemapTable[CombinerParameteriNV_remap_index]
-#define _gloffset_CombinerParameterivNV driDispatchRemapTable[CombinerParameterivNV_remap_index]
-#define _gloffset_FinalCombinerInputNV driDispatchRemapTable[FinalCombinerInputNV_remap_index]
-#define _gloffset_GetCombinerInputParameterfvNV driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index]
-#define _gloffset_GetCombinerInputParameterivNV driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index]
-#define _gloffset_GetCombinerOutputParameterfvNV driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index]
-#define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index]
-#define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index]
-#define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index]
-#define _gloffset_ResizeBuffersMESA driDispatchRemapTable[ResizeBuffersMESA_remap_index]
-#define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index]
-#define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index]
-#define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index]
-#define _gloffset_WindowPos2fvMESA driDispatchRemapTable[WindowPos2fvMESA_remap_index]
-#define _gloffset_WindowPos2iMESA driDispatchRemapTable[WindowPos2iMESA_remap_index]
-#define _gloffset_WindowPos2ivMESA driDispatchRemapTable[WindowPos2ivMESA_remap_index]
-#define _gloffset_WindowPos2sMESA driDispatchRemapTable[WindowPos2sMESA_remap_index]
-#define _gloffset_WindowPos2svMESA driDispatchRemapTable[WindowPos2svMESA_remap_index]
-#define _gloffset_WindowPos3dMESA driDispatchRemapTable[WindowPos3dMESA_remap_index]
-#define _gloffset_WindowPos3dvMESA driDispatchRemapTable[WindowPos3dvMESA_remap_index]
-#define _gloffset_WindowPos3fMESA driDispatchRemapTable[WindowPos3fMESA_remap_index]
-#define _gloffset_WindowPos3fvMESA driDispatchRemapTable[WindowPos3fvMESA_remap_index]
-#define _gloffset_WindowPos3iMESA driDispatchRemapTable[WindowPos3iMESA_remap_index]
-#define _gloffset_WindowPos3ivMESA driDispatchRemapTable[WindowPos3ivMESA_remap_index]
-#define _gloffset_WindowPos3sMESA driDispatchRemapTable[WindowPos3sMESA_remap_index]
-#define _gloffset_WindowPos3svMESA driDispatchRemapTable[WindowPos3svMESA_remap_index]
-#define _gloffset_WindowPos4dMESA driDispatchRemapTable[WindowPos4dMESA_remap_index]
-#define _gloffset_WindowPos4dvMESA driDispatchRemapTable[WindowPos4dvMESA_remap_index]
-#define _gloffset_WindowPos4fMESA driDispatchRemapTable[WindowPos4fMESA_remap_index]
-#define _gloffset_WindowPos4fvMESA driDispatchRemapTable[WindowPos4fvMESA_remap_index]
-#define _gloffset_WindowPos4iMESA driDispatchRemapTable[WindowPos4iMESA_remap_index]
-#define _gloffset_WindowPos4ivMESA driDispatchRemapTable[WindowPos4ivMESA_remap_index]
-#define _gloffset_WindowPos4sMESA driDispatchRemapTable[WindowPos4sMESA_remap_index]
-#define _gloffset_WindowPos4svMESA driDispatchRemapTable[WindowPos4svMESA_remap_index]
-#define _gloffset_MultiModeDrawArraysIBM driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index]
-#define _gloffset_MultiModeDrawElementsIBM driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index]
-#define _gloffset_DeleteFencesNV driDispatchRemapTable[DeleteFencesNV_remap_index]
-#define _gloffset_FinishFenceNV driDispatchRemapTable[FinishFenceNV_remap_index]
-#define _gloffset_GenFencesNV driDispatchRemapTable[GenFencesNV_remap_index]
-#define _gloffset_GetFenceivNV driDispatchRemapTable[GetFenceivNV_remap_index]
-#define _gloffset_IsFenceNV driDispatchRemapTable[IsFenceNV_remap_index]
-#define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index]
-#define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index]
-#define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index]
-#define _gloffset_BindProgramNV driDispatchRemapTable[BindProgramNV_remap_index]
-#define _gloffset_DeleteProgramsNV driDispatchRemapTable[DeleteProgramsNV_remap_index]
-#define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index]
-#define _gloffset_GenProgramsNV driDispatchRemapTable[GenProgramsNV_remap_index]
-#define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index]
-#define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index]
-#define _gloffset_GetProgramStringNV driDispatchRemapTable[GetProgramStringNV_remap_index]
-#define _gloffset_GetProgramivNV driDispatchRemapTable[GetProgramivNV_remap_index]
-#define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index]
-#define _gloffset_GetVertexAttribPointervNV driDispatchRemapTable[GetVertexAttribPointervNV_remap_index]
-#define _gloffset_GetVertexAttribdvNV driDispatchRemapTable[GetVertexAttribdvNV_remap_index]
-#define _gloffset_GetVertexAttribfvNV driDispatchRemapTable[GetVertexAttribfvNV_remap_index]
-#define _gloffset_GetVertexAttribivNV driDispatchRemapTable[GetVertexAttribivNV_remap_index]
-#define _gloffset_IsProgramNV driDispatchRemapTable[IsProgramNV_remap_index]
-#define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index]
-#define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index]
-#define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index]
-#define _gloffset_RequestResidentProgramsNV driDispatchRemapTable[RequestResidentProgramsNV_remap_index]
-#define _gloffset_TrackMatrixNV driDispatchRemapTable[TrackMatrixNV_remap_index]
-#define _gloffset_VertexAttrib1dNV driDispatchRemapTable[VertexAttrib1dNV_remap_index]
-#define _gloffset_VertexAttrib1dvNV driDispatchRemapTable[VertexAttrib1dvNV_remap_index]
-#define _gloffset_VertexAttrib1fNV driDispatchRemapTable[VertexAttrib1fNV_remap_index]
-#define _gloffset_VertexAttrib1fvNV driDispatchRemapTable[VertexAttrib1fvNV_remap_index]
-#define _gloffset_VertexAttrib1sNV driDispatchRemapTable[VertexAttrib1sNV_remap_index]
-#define _gloffset_VertexAttrib1svNV driDispatchRemapTable[VertexAttrib1svNV_remap_index]
-#define _gloffset_VertexAttrib2dNV driDispatchRemapTable[VertexAttrib2dNV_remap_index]
-#define _gloffset_VertexAttrib2dvNV driDispatchRemapTable[VertexAttrib2dvNV_remap_index]
-#define _gloffset_VertexAttrib2fNV driDispatchRemapTable[VertexAttrib2fNV_remap_index]
-#define _gloffset_VertexAttrib2fvNV driDispatchRemapTable[VertexAttrib2fvNV_remap_index]
-#define _gloffset_VertexAttrib2sNV driDispatchRemapTable[VertexAttrib2sNV_remap_index]
-#define _gloffset_VertexAttrib2svNV driDispatchRemapTable[VertexAttrib2svNV_remap_index]
-#define _gloffset_VertexAttrib3dNV driDispatchRemapTable[VertexAttrib3dNV_remap_index]
-#define _gloffset_VertexAttrib3dvNV driDispatchRemapTable[VertexAttrib3dvNV_remap_index]
-#define _gloffset_VertexAttrib3fNV driDispatchRemapTable[VertexAttrib3fNV_remap_index]
-#define _gloffset_VertexAttrib3fvNV driDispatchRemapTable[VertexAttrib3fvNV_remap_index]
-#define _gloffset_VertexAttrib3sNV driDispatchRemapTable[VertexAttrib3sNV_remap_index]
-#define _gloffset_VertexAttrib3svNV driDispatchRemapTable[VertexAttrib3svNV_remap_index]
-#define _gloffset_VertexAttrib4dNV driDispatchRemapTable[VertexAttrib4dNV_remap_index]
-#define _gloffset_VertexAttrib4dvNV driDispatchRemapTable[VertexAttrib4dvNV_remap_index]
-#define _gloffset_VertexAttrib4fNV driDispatchRemapTable[VertexAttrib4fNV_remap_index]
-#define _gloffset_VertexAttrib4fvNV driDispatchRemapTable[VertexAttrib4fvNV_remap_index]
-#define _gloffset_VertexAttrib4sNV driDispatchRemapTable[VertexAttrib4sNV_remap_index]
-#define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index]
-#define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index]
-#define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index]
-#define _gloffset_VertexAttribPointerNV driDispatchRemapTable[VertexAttribPointerNV_remap_index]
-#define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index]
-#define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index]
-#define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index]
-#define _gloffset_VertexAttribs2dvNV driDispatchRemapTable[VertexAttribs2dvNV_remap_index]
-#define _gloffset_VertexAttribs2fvNV driDispatchRemapTable[VertexAttribs2fvNV_remap_index]
-#define _gloffset_VertexAttribs2svNV driDispatchRemapTable[VertexAttribs2svNV_remap_index]
-#define _gloffset_VertexAttribs3dvNV driDispatchRemapTable[VertexAttribs3dvNV_remap_index]
-#define _gloffset_VertexAttribs3fvNV driDispatchRemapTable[VertexAttribs3fvNV_remap_index]
-#define _gloffset_VertexAttribs3svNV driDispatchRemapTable[VertexAttribs3svNV_remap_index]
-#define _gloffset_VertexAttribs4dvNV driDispatchRemapTable[VertexAttribs4dvNV_remap_index]
-#define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index]
-#define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index]
-#define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index]
-#define _gloffset_AlphaFragmentOp1ATI driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index]
-#define _gloffset_AlphaFragmentOp2ATI driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index]
-#define _gloffset_AlphaFragmentOp3ATI driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index]
-#define _gloffset_BeginFragmentShaderATI driDispatchRemapTable[BeginFragmentShaderATI_remap_index]
-#define _gloffset_BindFragmentShaderATI driDispatchRemapTable[BindFragmentShaderATI_remap_index]
-#define _gloffset_ColorFragmentOp1ATI driDispatchRemapTable[ColorFragmentOp1ATI_remap_index]
-#define _gloffset_ColorFragmentOp2ATI driDispatchRemapTable[ColorFragmentOp2ATI_remap_index]
-#define _gloffset_ColorFragmentOp3ATI driDispatchRemapTable[ColorFragmentOp3ATI_remap_index]
-#define _gloffset_DeleteFragmentShaderATI driDispatchRemapTable[DeleteFragmentShaderATI_remap_index]
-#define _gloffset_EndFragmentShaderATI driDispatchRemapTable[EndFragmentShaderATI_remap_index]
-#define _gloffset_GenFragmentShadersATI driDispatchRemapTable[GenFragmentShadersATI_remap_index]
-#define _gloffset_PassTexCoordATI driDispatchRemapTable[PassTexCoordATI_remap_index]
-#define _gloffset_SampleMapATI driDispatchRemapTable[SampleMapATI_remap_index]
-#define _gloffset_SetFragmentShaderConstantATI driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index]
-#define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index]
-#define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index]
-#define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index]
-#define _gloffset_BindVertexArrayAPPLE driDispatchRemapTable[BindVertexArrayAPPLE_remap_index]
-#define _gloffset_DeleteVertexArraysAPPLE driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index]
-#define _gloffset_GenVertexArraysAPPLE driDispatchRemapTable[GenVertexArraysAPPLE_remap_index]
-#define _gloffset_IsVertexArrayAPPLE driDispatchRemapTable[IsVertexArrayAPPLE_remap_index]
-#define _gloffset_GetProgramNamedParameterdvNV driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index]
-#define _gloffset_GetProgramNamedParameterfvNV driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index]
-#define _gloffset_ProgramNamedParameter4dNV driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index]
-#define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index]
-#define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index]
-#define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index]
-#define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index]
-#define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_remap_index]
-#define _gloffset_BindFramebufferEXT driDispatchRemapTable[BindFramebufferEXT_remap_index]
-#define _gloffset_BindRenderbufferEXT driDispatchRemapTable[BindRenderbufferEXT_remap_index]
-#define _gloffset_CheckFramebufferStatusEXT driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index]
-#define _gloffset_DeleteFramebuffersEXT driDispatchRemapTable[DeleteFramebuffersEXT_remap_index]
-#define _gloffset_DeleteRenderbuffersEXT driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index]
-#define _gloffset_FramebufferRenderbufferEXT driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index]
-#define _gloffset_FramebufferTexture1DEXT driDispatchRemapTable[FramebufferTexture1DEXT_remap_index]
-#define _gloffset_FramebufferTexture2DEXT driDispatchRemapTable[FramebufferTexture2DEXT_remap_index]
-#define _gloffset_FramebufferTexture3DEXT driDispatchRemapTable[FramebufferTexture3DEXT_remap_index]
-#define _gloffset_GenFramebuffersEXT driDispatchRemapTable[GenFramebuffersEXT_remap_index]
-#define _gloffset_GenRenderbuffersEXT driDispatchRemapTable[GenRenderbuffersEXT_remap_index]
-#define _gloffset_GenerateMipmapEXT driDispatchRemapTable[GenerateMipmapEXT_remap_index]
-#define _gloffset_GetFramebufferAttachmentParameterivEXT driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index]
-#define _gloffset_GetRenderbufferParameterivEXT driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index]
-#define _gloffset_IsFramebufferEXT driDispatchRemapTable[IsFramebufferEXT_remap_index]
-#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index]
-#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index]
-#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index]
-#define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index]
-#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index]
-#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index]
-#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index]
-#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index]
-#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index]
-
-#endif /* !defined(IN_DRI_DRIVER) */
-
-#endif /* !defined( _GLAPI_OFFSETS_H_ ) */
diff --git a/xorg-server/glx/glapitable.h b/xorg-server/glx/glapitable.h
index 5d9d40a8a..9b419ba77 100644
--- a/xorg-server/glx/glapitable.h
+++ b/xorg-server/glx/glapitable.h
@@ -1,815 +1,937 @@
-/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sub license,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#if !defined( _GLAPI_TABLE_H_ )
-# define _GLAPI_TABLE_H_
-
-#ifndef GLAPIENTRYP
-# ifndef GLAPIENTRY
-# define GLAPIENTRY
-# endif
-
-# define GLAPIENTRYP GLAPIENTRY *
-#endif
-
-
-struct _glapi_table
-{
- void (GLAPIENTRYP NewList)(GLuint list, GLenum mode); /* 0 */
- void (GLAPIENTRYP EndList)(void); /* 1 */
- void (GLAPIENTRYP CallList)(GLuint list); /* 2 */
- void (GLAPIENTRYP CallLists)(GLsizei n, GLenum type, const GLvoid * lists); /* 3 */
- void (GLAPIENTRYP DeleteLists)(GLuint list, GLsizei range); /* 4 */
- GLuint (GLAPIENTRYP GenLists)(GLsizei range); /* 5 */
- void (GLAPIENTRYP ListBase)(GLuint base); /* 6 */
- void (GLAPIENTRYP Begin)(GLenum mode); /* 7 */
- void (GLAPIENTRYP Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); /* 8 */
- void (GLAPIENTRYP Color3b)(GLbyte red, GLbyte green, GLbyte blue); /* 9 */
- void (GLAPIENTRYP Color3bv)(const GLbyte * v); /* 10 */
- void (GLAPIENTRYP Color3d)(GLdouble red, GLdouble green, GLdouble blue); /* 11 */
- void (GLAPIENTRYP Color3dv)(const GLdouble * v); /* 12 */
- void (GLAPIENTRYP Color3f)(GLfloat red, GLfloat green, GLfloat blue); /* 13 */
- void (GLAPIENTRYP Color3fv)(const GLfloat * v); /* 14 */
- void (GLAPIENTRYP Color3i)(GLint red, GLint green, GLint blue); /* 15 */
- void (GLAPIENTRYP Color3iv)(const GLint * v); /* 16 */
- void (GLAPIENTRYP Color3s)(GLshort red, GLshort green, GLshort blue); /* 17 */
- void (GLAPIENTRYP Color3sv)(const GLshort * v); /* 18 */
- void (GLAPIENTRYP Color3ub)(GLubyte red, GLubyte green, GLubyte blue); /* 19 */
- void (GLAPIENTRYP Color3ubv)(const GLubyte * v); /* 20 */
- void (GLAPIENTRYP Color3ui)(GLuint red, GLuint green, GLuint blue); /* 21 */
- void (GLAPIENTRYP Color3uiv)(const GLuint * v); /* 22 */
- void (GLAPIENTRYP Color3us)(GLushort red, GLushort green, GLushort blue); /* 23 */
- void (GLAPIENTRYP Color3usv)(const GLushort * v); /* 24 */
- void (GLAPIENTRYP Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); /* 25 */
- void (GLAPIENTRYP Color4bv)(const GLbyte * v); /* 26 */
- void (GLAPIENTRYP Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); /* 27 */
- void (GLAPIENTRYP Color4dv)(const GLdouble * v); /* 28 */
- void (GLAPIENTRYP Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 29 */
- void (GLAPIENTRYP Color4fv)(const GLfloat * v); /* 30 */
- void (GLAPIENTRYP Color4i)(GLint red, GLint green, GLint blue, GLint alpha); /* 31 */
- void (GLAPIENTRYP Color4iv)(const GLint * v); /* 32 */
- void (GLAPIENTRYP Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha); /* 33 */
- void (GLAPIENTRYP Color4sv)(const GLshort * v); /* 34 */
- void (GLAPIENTRYP Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); /* 35 */
- void (GLAPIENTRYP Color4ubv)(const GLubyte * v); /* 36 */
- void (GLAPIENTRYP Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha); /* 37 */
- void (GLAPIENTRYP Color4uiv)(const GLuint * v); /* 38 */
- void (GLAPIENTRYP Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha); /* 39 */
- void (GLAPIENTRYP Color4usv)(const GLushort * v); /* 40 */
- void (GLAPIENTRYP EdgeFlag)(GLboolean flag); /* 41 */
- void (GLAPIENTRYP EdgeFlagv)(const GLboolean * flag); /* 42 */
- void (GLAPIENTRYP End)(void); /* 43 */
- void (GLAPIENTRYP Indexd)(GLdouble c); /* 44 */
- void (GLAPIENTRYP Indexdv)(const GLdouble * c); /* 45 */
- void (GLAPIENTRYP Indexf)(GLfloat c); /* 46 */
- void (GLAPIENTRYP Indexfv)(const GLfloat * c); /* 47 */
- void (GLAPIENTRYP Indexi)(GLint c); /* 48 */
- void (GLAPIENTRYP Indexiv)(const GLint * c); /* 49 */
- void (GLAPIENTRYP Indexs)(GLshort c); /* 50 */
- void (GLAPIENTRYP Indexsv)(const GLshort * c); /* 51 */
- void (GLAPIENTRYP Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz); /* 52 */
- void (GLAPIENTRYP Normal3bv)(const GLbyte * v); /* 53 */
- void (GLAPIENTRYP Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz); /* 54 */
- void (GLAPIENTRYP Normal3dv)(const GLdouble * v); /* 55 */
- void (GLAPIENTRYP Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz); /* 56 */
- void (GLAPIENTRYP Normal3fv)(const GLfloat * v); /* 57 */
- void (GLAPIENTRYP Normal3i)(GLint nx, GLint ny, GLint nz); /* 58 */
- void (GLAPIENTRYP Normal3iv)(const GLint * v); /* 59 */
- void (GLAPIENTRYP Normal3s)(GLshort nx, GLshort ny, GLshort nz); /* 60 */
- void (GLAPIENTRYP Normal3sv)(const GLshort * v); /* 61 */
- void (GLAPIENTRYP RasterPos2d)(GLdouble x, GLdouble y); /* 62 */
- void (GLAPIENTRYP RasterPos2dv)(const GLdouble * v); /* 63 */
- void (GLAPIENTRYP RasterPos2f)(GLfloat x, GLfloat y); /* 64 */
- void (GLAPIENTRYP RasterPos2fv)(const GLfloat * v); /* 65 */
- void (GLAPIENTRYP RasterPos2i)(GLint x, GLint y); /* 66 */
- void (GLAPIENTRYP RasterPos2iv)(const GLint * v); /* 67 */
- void (GLAPIENTRYP RasterPos2s)(GLshort x, GLshort y); /* 68 */
- void (GLAPIENTRYP RasterPos2sv)(const GLshort * v); /* 69 */
- void (GLAPIENTRYP RasterPos3d)(GLdouble x, GLdouble y, GLdouble z); /* 70 */
- void (GLAPIENTRYP RasterPos3dv)(const GLdouble * v); /* 71 */
- void (GLAPIENTRYP RasterPos3f)(GLfloat x, GLfloat y, GLfloat z); /* 72 */
- void (GLAPIENTRYP RasterPos3fv)(const GLfloat * v); /* 73 */
- void (GLAPIENTRYP RasterPos3i)(GLint x, GLint y, GLint z); /* 74 */
- void (GLAPIENTRYP RasterPos3iv)(const GLint * v); /* 75 */
- void (GLAPIENTRYP RasterPos3s)(GLshort x, GLshort y, GLshort z); /* 76 */
- void (GLAPIENTRYP RasterPos3sv)(const GLshort * v); /* 77 */
- void (GLAPIENTRYP RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 78 */
- void (GLAPIENTRYP RasterPos4dv)(const GLdouble * v); /* 79 */
- void (GLAPIENTRYP RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 80 */
- void (GLAPIENTRYP RasterPos4fv)(const GLfloat * v); /* 81 */
- void (GLAPIENTRYP RasterPos4i)(GLint x, GLint y, GLint z, GLint w); /* 82 */
- void (GLAPIENTRYP RasterPos4iv)(const GLint * v); /* 83 */
- void (GLAPIENTRYP RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 84 */
- void (GLAPIENTRYP RasterPos4sv)(const GLshort * v); /* 85 */
- void (GLAPIENTRYP Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); /* 86 */
- void (GLAPIENTRYP Rectdv)(const GLdouble * v1, const GLdouble * v2); /* 87 */
- void (GLAPIENTRYP Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); /* 88 */
- void (GLAPIENTRYP Rectfv)(const GLfloat * v1, const GLfloat * v2); /* 89 */
- void (GLAPIENTRYP Recti)(GLint x1, GLint y1, GLint x2, GLint y2); /* 90 */
- void (GLAPIENTRYP Rectiv)(const GLint * v1, const GLint * v2); /* 91 */
- void (GLAPIENTRYP Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2); /* 92 */
- void (GLAPIENTRYP Rectsv)(const GLshort * v1, const GLshort * v2); /* 93 */
- void (GLAPIENTRYP TexCoord1d)(GLdouble s); /* 94 */
- void (GLAPIENTRYP TexCoord1dv)(const GLdouble * v); /* 95 */
- void (GLAPIENTRYP TexCoord1f)(GLfloat s); /* 96 */
- void (GLAPIENTRYP TexCoord1fv)(const GLfloat * v); /* 97 */
- void (GLAPIENTRYP TexCoord1i)(GLint s); /* 98 */
- void (GLAPIENTRYP TexCoord1iv)(const GLint * v); /* 99 */
- void (GLAPIENTRYP TexCoord1s)(GLshort s); /* 100 */
- void (GLAPIENTRYP TexCoord1sv)(const GLshort * v); /* 101 */
- void (GLAPIENTRYP TexCoord2d)(GLdouble s, GLdouble t); /* 102 */
- void (GLAPIENTRYP TexCoord2dv)(const GLdouble * v); /* 103 */
- void (GLAPIENTRYP TexCoord2f)(GLfloat s, GLfloat t); /* 104 */
- void (GLAPIENTRYP TexCoord2fv)(const GLfloat * v); /* 105 */
- void (GLAPIENTRYP TexCoord2i)(GLint s, GLint t); /* 106 */
- void (GLAPIENTRYP TexCoord2iv)(const GLint * v); /* 107 */
- void (GLAPIENTRYP TexCoord2s)(GLshort s, GLshort t); /* 108 */
- void (GLAPIENTRYP TexCoord2sv)(const GLshort * v); /* 109 */
- void (GLAPIENTRYP TexCoord3d)(GLdouble s, GLdouble t, GLdouble r); /* 110 */
- void (GLAPIENTRYP TexCoord3dv)(const GLdouble * v); /* 111 */
- void (GLAPIENTRYP TexCoord3f)(GLfloat s, GLfloat t, GLfloat r); /* 112 */
- void (GLAPIENTRYP TexCoord3fv)(const GLfloat * v); /* 113 */
- void (GLAPIENTRYP TexCoord3i)(GLint s, GLint t, GLint r); /* 114 */
- void (GLAPIENTRYP TexCoord3iv)(const GLint * v); /* 115 */
- void (GLAPIENTRYP TexCoord3s)(GLshort s, GLshort t, GLshort r); /* 116 */
- void (GLAPIENTRYP TexCoord3sv)(const GLshort * v); /* 117 */
- void (GLAPIENTRYP TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 118 */
- void (GLAPIENTRYP TexCoord4dv)(const GLdouble * v); /* 119 */
- void (GLAPIENTRYP TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 120 */
- void (GLAPIENTRYP TexCoord4fv)(const GLfloat * v); /* 121 */
- void (GLAPIENTRYP TexCoord4i)(GLint s, GLint t, GLint r, GLint q); /* 122 */
- void (GLAPIENTRYP TexCoord4iv)(const GLint * v); /* 123 */
- void (GLAPIENTRYP TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q); /* 124 */
- void (GLAPIENTRYP TexCoord4sv)(const GLshort * v); /* 125 */
- void (GLAPIENTRYP Vertex2d)(GLdouble x, GLdouble y); /* 126 */
- void (GLAPIENTRYP Vertex2dv)(const GLdouble * v); /* 127 */
- void (GLAPIENTRYP Vertex2f)(GLfloat x, GLfloat y); /* 128 */
- void (GLAPIENTRYP Vertex2fv)(const GLfloat * v); /* 129 */
- void (GLAPIENTRYP Vertex2i)(GLint x, GLint y); /* 130 */
- void (GLAPIENTRYP Vertex2iv)(const GLint * v); /* 131 */
- void (GLAPIENTRYP Vertex2s)(GLshort x, GLshort y); /* 132 */
- void (GLAPIENTRYP Vertex2sv)(const GLshort * v); /* 133 */
- void (GLAPIENTRYP Vertex3d)(GLdouble x, GLdouble y, GLdouble z); /* 134 */
- void (GLAPIENTRYP Vertex3dv)(const GLdouble * v); /* 135 */
- void (GLAPIENTRYP Vertex3f)(GLfloat x, GLfloat y, GLfloat z); /* 136 */
- void (GLAPIENTRYP Vertex3fv)(const GLfloat * v); /* 137 */
- void (GLAPIENTRYP Vertex3i)(GLint x, GLint y, GLint z); /* 138 */
- void (GLAPIENTRYP Vertex3iv)(const GLint * v); /* 139 */
- void (GLAPIENTRYP Vertex3s)(GLshort x, GLshort y, GLshort z); /* 140 */
- void (GLAPIENTRYP Vertex3sv)(const GLshort * v); /* 141 */
- void (GLAPIENTRYP Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 142 */
- void (GLAPIENTRYP Vertex4dv)(const GLdouble * v); /* 143 */
- void (GLAPIENTRYP Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 144 */
- void (GLAPIENTRYP Vertex4fv)(const GLfloat * v); /* 145 */
- void (GLAPIENTRYP Vertex4i)(GLint x, GLint y, GLint z, GLint w); /* 146 */
- void (GLAPIENTRYP Vertex4iv)(const GLint * v); /* 147 */
- void (GLAPIENTRYP Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 148 */
- void (GLAPIENTRYP Vertex4sv)(const GLshort * v); /* 149 */
- void (GLAPIENTRYP ClipPlane)(GLenum plane, const GLdouble * equation); /* 150 */
- void (GLAPIENTRYP ColorMaterial)(GLenum face, GLenum mode); /* 151 */
- void (GLAPIENTRYP CullFace)(GLenum mode); /* 152 */
- void (GLAPIENTRYP Fogf)(GLenum pname, GLfloat param); /* 153 */
- void (GLAPIENTRYP Fogfv)(GLenum pname, const GLfloat * params); /* 154 */
- void (GLAPIENTRYP Fogi)(GLenum pname, GLint param); /* 155 */
- void (GLAPIENTRYP Fogiv)(GLenum pname, const GLint * params); /* 156 */
- void (GLAPIENTRYP FrontFace)(GLenum mode); /* 157 */
- void (GLAPIENTRYP Hint)(GLenum target, GLenum mode); /* 158 */
- void (GLAPIENTRYP Lightf)(GLenum light, GLenum pname, GLfloat param); /* 159 */
- void (GLAPIENTRYP Lightfv)(GLenum light, GLenum pname, const GLfloat * params); /* 160 */
- void (GLAPIENTRYP Lighti)(GLenum light, GLenum pname, GLint param); /* 161 */
- void (GLAPIENTRYP Lightiv)(GLenum light, GLenum pname, const GLint * params); /* 162 */
- void (GLAPIENTRYP LightModelf)(GLenum pname, GLfloat param); /* 163 */
- void (GLAPIENTRYP LightModelfv)(GLenum pname, const GLfloat * params); /* 164 */
- void (GLAPIENTRYP LightModeli)(GLenum pname, GLint param); /* 165 */
- void (GLAPIENTRYP LightModeliv)(GLenum pname, const GLint * params); /* 166 */
- void (GLAPIENTRYP LineStipple)(GLint factor, GLushort pattern); /* 167 */
- void (GLAPIENTRYP LineWidth)(GLfloat width); /* 168 */
- void (GLAPIENTRYP Materialf)(GLenum face, GLenum pname, GLfloat param); /* 169 */
- void (GLAPIENTRYP Materialfv)(GLenum face, GLenum pname, const GLfloat * params); /* 170 */
- void (GLAPIENTRYP Materiali)(GLenum face, GLenum pname, GLint param); /* 171 */
- void (GLAPIENTRYP Materialiv)(GLenum face, GLenum pname, const GLint * params); /* 172 */
- void (GLAPIENTRYP PointSize)(GLfloat size); /* 173 */
- void (GLAPIENTRYP PolygonMode)(GLenum face, GLenum mode); /* 174 */
- void (GLAPIENTRYP PolygonStipple)(const GLubyte * mask); /* 175 */
- void (GLAPIENTRYP Scissor)(GLint x, GLint y, GLsizei width, GLsizei height); /* 176 */
- void (GLAPIENTRYP ShadeModel)(GLenum mode); /* 177 */
- void (GLAPIENTRYP TexParameterf)(GLenum target, GLenum pname, GLfloat param); /* 178 */
- void (GLAPIENTRYP TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 179 */
- void (GLAPIENTRYP TexParameteri)(GLenum target, GLenum pname, GLint param); /* 180 */
- void (GLAPIENTRYP TexParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 181 */
- void (GLAPIENTRYP TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 182 */
- void (GLAPIENTRYP TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 183 */
- void (GLAPIENTRYP TexEnvf)(GLenum target, GLenum pname, GLfloat param); /* 184 */
- void (GLAPIENTRYP TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params); /* 185 */
- void (GLAPIENTRYP TexEnvi)(GLenum target, GLenum pname, GLint param); /* 186 */
- void (GLAPIENTRYP TexEnviv)(GLenum target, GLenum pname, const GLint * params); /* 187 */
- void (GLAPIENTRYP TexGend)(GLenum coord, GLenum pname, GLdouble param); /* 188 */
- void (GLAPIENTRYP TexGendv)(GLenum coord, GLenum pname, const GLdouble * params); /* 189 */
- void (GLAPIENTRYP TexGenf)(GLenum coord, GLenum pname, GLfloat param); /* 190 */
- void (GLAPIENTRYP TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params); /* 191 */
- void (GLAPIENTRYP TexGeni)(GLenum coord, GLenum pname, GLint param); /* 192 */
- void (GLAPIENTRYP TexGeniv)(GLenum coord, GLenum pname, const GLint * params); /* 193 */
- void (GLAPIENTRYP FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer); /* 194 */
- void (GLAPIENTRYP SelectBuffer)(GLsizei size, GLuint * buffer); /* 195 */
- GLint (GLAPIENTRYP RenderMode)(GLenum mode); /* 196 */
- void (GLAPIENTRYP InitNames)(void); /* 197 */
- void (GLAPIENTRYP LoadName)(GLuint name); /* 198 */
- void (GLAPIENTRYP PassThrough)(GLfloat token); /* 199 */
- void (GLAPIENTRYP PopName)(void); /* 200 */
- void (GLAPIENTRYP PushName)(GLuint name); /* 201 */
- void (GLAPIENTRYP DrawBuffer)(GLenum mode); /* 202 */
- void (GLAPIENTRYP Clear)(GLbitfield mask); /* 203 */
- void (GLAPIENTRYP ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 204 */
- void (GLAPIENTRYP ClearIndex)(GLfloat c); /* 205 */
- void (GLAPIENTRYP ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 206 */
- void (GLAPIENTRYP ClearStencil)(GLint s); /* 207 */
- void (GLAPIENTRYP ClearDepth)(GLclampd depth); /* 208 */
- void (GLAPIENTRYP StencilMask)(GLuint mask); /* 209 */
- void (GLAPIENTRYP ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); /* 210 */
- void (GLAPIENTRYP DepthMask)(GLboolean flag); /* 211 */
- void (GLAPIENTRYP IndexMask)(GLuint mask); /* 212 */
- void (GLAPIENTRYP Accum)(GLenum op, GLfloat value); /* 213 */
- void (GLAPIENTRYP Disable)(GLenum cap); /* 214 */
- void (GLAPIENTRYP Enable)(GLenum cap); /* 215 */
- void (GLAPIENTRYP Finish)(void); /* 216 */
- void (GLAPIENTRYP Flush)(void); /* 217 */
- void (GLAPIENTRYP PopAttrib)(void); /* 218 */
- void (GLAPIENTRYP PushAttrib)(GLbitfield mask); /* 219 */
- void (GLAPIENTRYP Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); /* 220 */
- void (GLAPIENTRYP Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); /* 221 */
- void (GLAPIENTRYP Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); /* 222 */
- void (GLAPIENTRYP Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); /* 223 */
- void (GLAPIENTRYP MapGrid1d)(GLint un, GLdouble u1, GLdouble u2); /* 224 */
- void (GLAPIENTRYP MapGrid1f)(GLint un, GLfloat u1, GLfloat u2); /* 225 */
- void (GLAPIENTRYP MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); /* 226 */
- void (GLAPIENTRYP MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); /* 227 */
- void (GLAPIENTRYP EvalCoord1d)(GLdouble u); /* 228 */
- void (GLAPIENTRYP EvalCoord1dv)(const GLdouble * u); /* 229 */
- void (GLAPIENTRYP EvalCoord1f)(GLfloat u); /* 230 */
- void (GLAPIENTRYP EvalCoord1fv)(const GLfloat * u); /* 231 */
- void (GLAPIENTRYP EvalCoord2d)(GLdouble u, GLdouble v); /* 232 */
- void (GLAPIENTRYP EvalCoord2dv)(const GLdouble * u); /* 233 */
- void (GLAPIENTRYP EvalCoord2f)(GLfloat u, GLfloat v); /* 234 */
- void (GLAPIENTRYP EvalCoord2fv)(const GLfloat * u); /* 235 */
- void (GLAPIENTRYP EvalMesh1)(GLenum mode, GLint i1, GLint i2); /* 236 */
- void (GLAPIENTRYP EvalPoint1)(GLint i); /* 237 */
- void (GLAPIENTRYP EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); /* 238 */
- void (GLAPIENTRYP EvalPoint2)(GLint i, GLint j); /* 239 */
- void (GLAPIENTRYP AlphaFunc)(GLenum func, GLclampf ref); /* 240 */
- void (GLAPIENTRYP BlendFunc)(GLenum sfactor, GLenum dfactor); /* 241 */
- void (GLAPIENTRYP LogicOp)(GLenum opcode); /* 242 */
- void (GLAPIENTRYP StencilFunc)(GLenum func, GLint ref, GLuint mask); /* 243 */
- void (GLAPIENTRYP StencilOp)(GLenum fail, GLenum zfail, GLenum zpass); /* 244 */
- void (GLAPIENTRYP DepthFunc)(GLenum func); /* 245 */
- void (GLAPIENTRYP PixelZoom)(GLfloat xfactor, GLfloat yfactor); /* 246 */
- void (GLAPIENTRYP PixelTransferf)(GLenum pname, GLfloat param); /* 247 */
- void (GLAPIENTRYP PixelTransferi)(GLenum pname, GLint param); /* 248 */
- void (GLAPIENTRYP PixelStoref)(GLenum pname, GLfloat param); /* 249 */
- void (GLAPIENTRYP PixelStorei)(GLenum pname, GLint param); /* 250 */
- void (GLAPIENTRYP PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat * values); /* 251 */
- void (GLAPIENTRYP PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint * values); /* 252 */
- void (GLAPIENTRYP PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort * values); /* 253 */
- void (GLAPIENTRYP ReadBuffer)(GLenum mode); /* 254 */
- void (GLAPIENTRYP CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); /* 255 */
- void (GLAPIENTRYP ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); /* 256 */
- void (GLAPIENTRYP DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 257 */
- void (GLAPIENTRYP GetBooleanv)(GLenum pname, GLboolean * params); /* 258 */
- void (GLAPIENTRYP GetClipPlane)(GLenum plane, GLdouble * equation); /* 259 */
- void (GLAPIENTRYP GetDoublev)(GLenum pname, GLdouble * params); /* 260 */
- GLenum (GLAPIENTRYP GetError)(void); /* 261 */
- void (GLAPIENTRYP GetFloatv)(GLenum pname, GLfloat * params); /* 262 */
- void (GLAPIENTRYP GetIntegerv)(GLenum pname, GLint * params); /* 263 */
- void (GLAPIENTRYP GetLightfv)(GLenum light, GLenum pname, GLfloat * params); /* 264 */
- void (GLAPIENTRYP GetLightiv)(GLenum light, GLenum pname, GLint * params); /* 265 */
- void (GLAPIENTRYP GetMapdv)(GLenum target, GLenum query, GLdouble * v); /* 266 */
- void (GLAPIENTRYP GetMapfv)(GLenum target, GLenum query, GLfloat * v); /* 267 */
- void (GLAPIENTRYP GetMapiv)(GLenum target, GLenum query, GLint * v); /* 268 */
- void (GLAPIENTRYP GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params); /* 269 */
- void (GLAPIENTRYP GetMaterialiv)(GLenum face, GLenum pname, GLint * params); /* 270 */
- void (GLAPIENTRYP GetPixelMapfv)(GLenum map, GLfloat * values); /* 271 */
- void (GLAPIENTRYP GetPixelMapuiv)(GLenum map, GLuint * values); /* 272 */
- void (GLAPIENTRYP GetPixelMapusv)(GLenum map, GLushort * values); /* 273 */
- void (GLAPIENTRYP GetPolygonStipple)(GLubyte * mask); /* 274 */
- const GLubyte * (GLAPIENTRYP GetString)(GLenum name); /* 275 */
- void (GLAPIENTRYP GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params); /* 276 */
- void (GLAPIENTRYP GetTexEnviv)(GLenum target, GLenum pname, GLint * params); /* 277 */
- void (GLAPIENTRYP GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params); /* 278 */
- void (GLAPIENTRYP GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params); /* 279 */
- void (GLAPIENTRYP GetTexGeniv)(GLenum coord, GLenum pname, GLint * params); /* 280 */
- void (GLAPIENTRYP GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); /* 281 */
- void (GLAPIENTRYP GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 282 */
- void (GLAPIENTRYP GetTexParameteriv)(GLenum target, GLenum pname, GLint * params); /* 283 */
- void (GLAPIENTRYP GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params); /* 284 */
- void (GLAPIENTRYP GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params); /* 285 */
- GLboolean (GLAPIENTRYP IsEnabled)(GLenum cap); /* 286 */
- GLboolean (GLAPIENTRYP IsList)(GLuint list); /* 287 */
- void (GLAPIENTRYP DepthRange)(GLclampd zNear, GLclampd zFar); /* 288 */
- void (GLAPIENTRYP Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 289 */
- void (GLAPIENTRYP LoadIdentity)(void); /* 290 */
- void (GLAPIENTRYP LoadMatrixf)(const GLfloat * m); /* 291 */
- void (GLAPIENTRYP LoadMatrixd)(const GLdouble * m); /* 292 */
- void (GLAPIENTRYP MatrixMode)(GLenum mode); /* 293 */
- void (GLAPIENTRYP MultMatrixf)(const GLfloat * m); /* 294 */
- void (GLAPIENTRYP MultMatrixd)(const GLdouble * m); /* 295 */
- void (GLAPIENTRYP Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 296 */
- void (GLAPIENTRYP PopMatrix)(void); /* 297 */
- void (GLAPIENTRYP PushMatrix)(void); /* 298 */
- void (GLAPIENTRYP Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); /* 299 */
- void (GLAPIENTRYP Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); /* 300 */
- void (GLAPIENTRYP Scaled)(GLdouble x, GLdouble y, GLdouble z); /* 301 */
- void (GLAPIENTRYP Scalef)(GLfloat x, GLfloat y, GLfloat z); /* 302 */
- void (GLAPIENTRYP Translated)(GLdouble x, GLdouble y, GLdouble z); /* 303 */
- void (GLAPIENTRYP Translatef)(GLfloat x, GLfloat y, GLfloat z); /* 304 */
- void (GLAPIENTRYP Viewport)(GLint x, GLint y, GLsizei width, GLsizei height); /* 305 */
- void (GLAPIENTRYP ArrayElement)(GLint i); /* 306 */
- void (GLAPIENTRYP BindTexture)(GLenum target, GLuint texture); /* 307 */
- void (GLAPIENTRYP ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 308 */
- void (GLAPIENTRYP DisableClientState)(GLenum array); /* 309 */
- void (GLAPIENTRYP DrawArrays)(GLenum mode, GLint first, GLsizei count); /* 310 */
- void (GLAPIENTRYP DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); /* 311 */
- void (GLAPIENTRYP EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer); /* 312 */
- void (GLAPIENTRYP EnableClientState)(GLenum array); /* 313 */
- void (GLAPIENTRYP IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 314 */
- void (GLAPIENTRYP Indexub)(GLubyte c); /* 315 */
- void (GLAPIENTRYP Indexubv)(const GLubyte * c); /* 316 */
- void (GLAPIENTRYP InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer); /* 317 */
- void (GLAPIENTRYP NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 318 */
- void (GLAPIENTRYP PolygonOffset)(GLfloat factor, GLfloat units); /* 319 */
- void (GLAPIENTRYP TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 320 */
- void (GLAPIENTRYP VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 321 */
- GLboolean (GLAPIENTRYP AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences); /* 322 */
- void (GLAPIENTRYP CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); /* 323 */
- void (GLAPIENTRYP CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); /* 324 */
- void (GLAPIENTRYP CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); /* 325 */
- void (GLAPIENTRYP CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 326 */
- void (GLAPIENTRYP DeleteTextures)(GLsizei n, const GLuint * textures); /* 327 */
- void (GLAPIENTRYP GenTextures)(GLsizei n, GLuint * textures); /* 328 */
- void (GLAPIENTRYP GetPointerv)(GLenum pname, GLvoid ** params); /* 329 */
- GLboolean (GLAPIENTRYP IsTexture)(GLuint texture); /* 330 */
- void (GLAPIENTRYP PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities); /* 331 */
- void (GLAPIENTRYP TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); /* 332 */
- void (GLAPIENTRYP TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 333 */
- void (GLAPIENTRYP PopClientAttrib)(void); /* 334 */
- void (GLAPIENTRYP PushClientAttrib)(GLbitfield mask); /* 335 */
- void (GLAPIENTRYP BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 336 */
- void (GLAPIENTRYP BlendEquation)(GLenum mode); /* 337 */
- void (GLAPIENTRYP DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); /* 338 */
- void (GLAPIENTRYP ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); /* 339 */
- void (GLAPIENTRYP ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 340 */
- void (GLAPIENTRYP ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 341 */
- void (GLAPIENTRYP CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 342 */
- void (GLAPIENTRYP GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table); /* 343 */
- void (GLAPIENTRYP GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 344 */
- void (GLAPIENTRYP GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params); /* 345 */
- void (GLAPIENTRYP ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); /* 346 */
- void (GLAPIENTRYP CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); /* 347 */
- void (GLAPIENTRYP ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); /* 348 */
- void (GLAPIENTRYP ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); /* 349 */
- void (GLAPIENTRYP ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params); /* 350 */
- void (GLAPIENTRYP ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 351 */
- void (GLAPIENTRYP ConvolutionParameteri)(GLenum target, GLenum pname, GLint params); /* 352 */
- void (GLAPIENTRYP ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 353 */
- void (GLAPIENTRYP CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 354 */
- void (GLAPIENTRYP CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); /* 355 */
- void (GLAPIENTRYP GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image); /* 356 */
- void (GLAPIENTRYP GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 357 */
- void (GLAPIENTRYP GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params); /* 358 */
- void (GLAPIENTRYP GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); /* 359 */
- void (GLAPIENTRYP SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); /* 360 */
- void (GLAPIENTRYP GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 361 */
- void (GLAPIENTRYP GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 362 */
- void (GLAPIENTRYP GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params); /* 363 */
- void (GLAPIENTRYP GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 364 */
- void (GLAPIENTRYP GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 365 */
- void (GLAPIENTRYP GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params); /* 366 */
- void (GLAPIENTRYP Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); /* 367 */
- void (GLAPIENTRYP Minmax)(GLenum target, GLenum internalformat, GLboolean sink); /* 368 */
- void (GLAPIENTRYP ResetHistogram)(GLenum target); /* 369 */
- void (GLAPIENTRYP ResetMinmax)(GLenum target); /* 370 */
- void (GLAPIENTRYP TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 371 */
- void (GLAPIENTRYP TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); /* 372 */
- void (GLAPIENTRYP CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 373 */
- void (GLAPIENTRYP ActiveTextureARB)(GLenum texture); /* 374 */
- void (GLAPIENTRYP ClientActiveTextureARB)(GLenum texture); /* 375 */
- void (GLAPIENTRYP MultiTexCoord1dARB)(GLenum target, GLdouble s); /* 376 */
- void (GLAPIENTRYP MultiTexCoord1dvARB)(GLenum target, const GLdouble * v); /* 377 */
- void (GLAPIENTRYP MultiTexCoord1fARB)(GLenum target, GLfloat s); /* 378 */
- void (GLAPIENTRYP MultiTexCoord1fvARB)(GLenum target, const GLfloat * v); /* 379 */
- void (GLAPIENTRYP MultiTexCoord1iARB)(GLenum target, GLint s); /* 380 */
- void (GLAPIENTRYP MultiTexCoord1ivARB)(GLenum target, const GLint * v); /* 381 */
- void (GLAPIENTRYP MultiTexCoord1sARB)(GLenum target, GLshort s); /* 382 */
- void (GLAPIENTRYP MultiTexCoord1svARB)(GLenum target, const GLshort * v); /* 383 */
- void (GLAPIENTRYP MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t); /* 384 */
- void (GLAPIENTRYP MultiTexCoord2dvARB)(GLenum target, const GLdouble * v); /* 385 */
- void (GLAPIENTRYP MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t); /* 386 */
- void (GLAPIENTRYP MultiTexCoord2fvARB)(GLenum target, const GLfloat * v); /* 387 */
- void (GLAPIENTRYP MultiTexCoord2iARB)(GLenum target, GLint s, GLint t); /* 388 */
- void (GLAPIENTRYP MultiTexCoord2ivARB)(GLenum target, const GLint * v); /* 389 */
- void (GLAPIENTRYP MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t); /* 390 */
- void (GLAPIENTRYP MultiTexCoord2svARB)(GLenum target, const GLshort * v); /* 391 */
- void (GLAPIENTRYP MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r); /* 392 */
- void (GLAPIENTRYP MultiTexCoord3dvARB)(GLenum target, const GLdouble * v); /* 393 */
- void (GLAPIENTRYP MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r); /* 394 */
- void (GLAPIENTRYP MultiTexCoord3fvARB)(GLenum target, const GLfloat * v); /* 395 */
- void (GLAPIENTRYP MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r); /* 396 */
- void (GLAPIENTRYP MultiTexCoord3ivARB)(GLenum target, const GLint * v); /* 397 */
- void (GLAPIENTRYP MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r); /* 398 */
- void (GLAPIENTRYP MultiTexCoord3svARB)(GLenum target, const GLshort * v); /* 399 */
- void (GLAPIENTRYP MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 400 */
- void (GLAPIENTRYP MultiTexCoord4dvARB)(GLenum target, const GLdouble * v); /* 401 */
- void (GLAPIENTRYP MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 402 */
- void (GLAPIENTRYP MultiTexCoord4fvARB)(GLenum target, const GLfloat * v); /* 403 */
- void (GLAPIENTRYP MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q); /* 404 */
- void (GLAPIENTRYP MultiTexCoord4ivARB)(GLenum target, const GLint * v); /* 405 */
- void (GLAPIENTRYP MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); /* 406 */
- void (GLAPIENTRYP MultiTexCoord4svARB)(GLenum target, const GLshort * v); /* 407 */
- void (GLAPIENTRYP AttachShader)(GLuint program, GLuint shader); /* 408 */
- GLuint (GLAPIENTRYP CreateProgram)(void); /* 409 */
- GLuint (GLAPIENTRYP CreateShader)(GLenum type); /* 410 */
- void (GLAPIENTRYP DeleteProgram)(GLuint program); /* 411 */
- void (GLAPIENTRYP DeleteShader)(GLuint program); /* 412 */
- void (GLAPIENTRYP DetachShader)(GLuint program, GLuint shader); /* 413 */
- void (GLAPIENTRYP GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj); /* 414 */
- void (GLAPIENTRYP GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 415 */
- void (GLAPIENTRYP GetProgramiv)(GLuint program, GLenum pname, GLint * params); /* 416 */
- void (GLAPIENTRYP GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 417 */
- void (GLAPIENTRYP GetShaderiv)(GLuint shader, GLenum pname, GLint * params); /* 418 */
- GLboolean (GLAPIENTRYP IsProgram)(GLuint program); /* 419 */
- GLboolean (GLAPIENTRYP IsShader)(GLuint shader); /* 420 */
- void (GLAPIENTRYP StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); /* 421 */
- void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 422 */
- void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass); /* 423 */
- void (GLAPIENTRYP UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 424 */
- void (GLAPIENTRYP UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 425 */
- void (GLAPIENTRYP UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 426 */
- void (GLAPIENTRYP UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 427 */
- void (GLAPIENTRYP UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 428 */
- void (GLAPIENTRYP UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 429 */
- void (GLAPIENTRYP LoadTransposeMatrixdARB)(const GLdouble * m); /* 430 */
- void (GLAPIENTRYP LoadTransposeMatrixfARB)(const GLfloat * m); /* 431 */
- void (GLAPIENTRYP MultTransposeMatrixdARB)(const GLdouble * m); /* 432 */
- void (GLAPIENTRYP MultTransposeMatrixfARB)(const GLfloat * m); /* 433 */
- void (GLAPIENTRYP SampleCoverageARB)(GLclampf value, GLboolean invert); /* 434 */
- void (GLAPIENTRYP CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 435 */
- void (GLAPIENTRYP CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 436 */
- void (GLAPIENTRYP CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 437 */
- void (GLAPIENTRYP CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 438 */
- void (GLAPIENTRYP CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 439 */
- void (GLAPIENTRYP CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 440 */
- void (GLAPIENTRYP GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); /* 441 */
- void (GLAPIENTRYP DisableVertexAttribArrayARB)(GLuint index); /* 442 */
- void (GLAPIENTRYP EnableVertexAttribArrayARB)(GLuint index); /* 443 */
- void (GLAPIENTRYP GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 444 */
- void (GLAPIENTRYP GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 445 */
- void (GLAPIENTRYP GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 446 */
- void (GLAPIENTRYP GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 447 */
- void (GLAPIENTRYP GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string); /* 448 */
- void (GLAPIENTRYP GetProgramivARB)(GLenum target, GLenum pname, GLint * params); /* 449 */
- void (GLAPIENTRYP GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params); /* 450 */
- void (GLAPIENTRYP GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params); /* 451 */
- void (GLAPIENTRYP GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params); /* 452 */
- void (GLAPIENTRYP ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 453 */
- void (GLAPIENTRYP ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 454 */
- void (GLAPIENTRYP ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 455 */
- void (GLAPIENTRYP ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 456 */
- void (GLAPIENTRYP ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 457 */
- void (GLAPIENTRYP ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 458 */
- void (GLAPIENTRYP ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 459 */
- void (GLAPIENTRYP ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 460 */
- void (GLAPIENTRYP ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string); /* 461 */
- void (GLAPIENTRYP VertexAttrib1dARB)(GLuint index, GLdouble x); /* 462 */
- void (GLAPIENTRYP VertexAttrib1dvARB)(GLuint index, const GLdouble * v); /* 463 */
- void (GLAPIENTRYP VertexAttrib1fARB)(GLuint index, GLfloat x); /* 464 */
- void (GLAPIENTRYP VertexAttrib1fvARB)(GLuint index, const GLfloat * v); /* 465 */
- void (GLAPIENTRYP VertexAttrib1sARB)(GLuint index, GLshort x); /* 466 */
- void (GLAPIENTRYP VertexAttrib1svARB)(GLuint index, const GLshort * v); /* 467 */
- void (GLAPIENTRYP VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y); /* 468 */
- void (GLAPIENTRYP VertexAttrib2dvARB)(GLuint index, const GLdouble * v); /* 469 */
- void (GLAPIENTRYP VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y); /* 470 */
- void (GLAPIENTRYP VertexAttrib2fvARB)(GLuint index, const GLfloat * v); /* 471 */
- void (GLAPIENTRYP VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y); /* 472 */
- void (GLAPIENTRYP VertexAttrib2svARB)(GLuint index, const GLshort * v); /* 473 */
- void (GLAPIENTRYP VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 474 */
- void (GLAPIENTRYP VertexAttrib3dvARB)(GLuint index, const GLdouble * v); /* 475 */
- void (GLAPIENTRYP VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 476 */
- void (GLAPIENTRYP VertexAttrib3fvARB)(GLuint index, const GLfloat * v); /* 477 */
- void (GLAPIENTRYP VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z); /* 478 */
- void (GLAPIENTRYP VertexAttrib3svARB)(GLuint index, const GLshort * v); /* 479 */
- void (GLAPIENTRYP VertexAttrib4NbvARB)(GLuint index, const GLbyte * v); /* 480 */
- void (GLAPIENTRYP VertexAttrib4NivARB)(GLuint index, const GLint * v); /* 481 */
- void (GLAPIENTRYP VertexAttrib4NsvARB)(GLuint index, const GLshort * v); /* 482 */
- void (GLAPIENTRYP VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 483 */
- void (GLAPIENTRYP VertexAttrib4NubvARB)(GLuint index, const GLubyte * v); /* 484 */
- void (GLAPIENTRYP VertexAttrib4NuivARB)(GLuint index, const GLuint * v); /* 485 */
- void (GLAPIENTRYP VertexAttrib4NusvARB)(GLuint index, const GLushort * v); /* 486 */
- void (GLAPIENTRYP VertexAttrib4bvARB)(GLuint index, const GLbyte * v); /* 487 */
- void (GLAPIENTRYP VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 488 */
- void (GLAPIENTRYP VertexAttrib4dvARB)(GLuint index, const GLdouble * v); /* 489 */
- void (GLAPIENTRYP VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 490 */
- void (GLAPIENTRYP VertexAttrib4fvARB)(GLuint index, const GLfloat * v); /* 491 */
- void (GLAPIENTRYP VertexAttrib4ivARB)(GLuint index, const GLint * v); /* 492 */
- void (GLAPIENTRYP VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 493 */
- void (GLAPIENTRYP VertexAttrib4svARB)(GLuint index, const GLshort * v); /* 494 */
- void (GLAPIENTRYP VertexAttrib4ubvARB)(GLuint index, const GLubyte * v); /* 495 */
- void (GLAPIENTRYP VertexAttrib4uivARB)(GLuint index, const GLuint * v); /* 496 */
- void (GLAPIENTRYP VertexAttrib4usvARB)(GLuint index, const GLushort * v); /* 497 */
- void (GLAPIENTRYP VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); /* 498 */
- void (GLAPIENTRYP BindBufferARB)(GLenum target, GLuint buffer); /* 499 */
- void (GLAPIENTRYP BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); /* 500 */
- void (GLAPIENTRYP BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); /* 501 */
- void (GLAPIENTRYP DeleteBuffersARB)(GLsizei n, const GLuint * buffer); /* 502 */
- void (GLAPIENTRYP GenBuffersARB)(GLsizei n, GLuint * buffer); /* 503 */
- void (GLAPIENTRYP GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params); /* 504 */
- void (GLAPIENTRYP GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 505 */
- void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); /* 506 */
- GLboolean (GLAPIENTRYP IsBufferARB)(GLuint buffer); /* 507 */
- GLvoid * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 508 */
- GLboolean (GLAPIENTRYP UnmapBufferARB)(GLenum target); /* 509 */
- void (GLAPIENTRYP BeginQueryARB)(GLenum target, GLuint id); /* 510 */
- void (GLAPIENTRYP DeleteQueriesARB)(GLsizei n, const GLuint * ids); /* 511 */
- void (GLAPIENTRYP EndQueryARB)(GLenum target); /* 512 */
- void (GLAPIENTRYP GenQueriesARB)(GLsizei n, GLuint * ids); /* 513 */
- void (GLAPIENTRYP GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 514 */
- void (GLAPIENTRYP GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 515 */
- void (GLAPIENTRYP GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 516 */
- GLboolean (GLAPIENTRYP IsQueryARB)(GLuint id); /* 517 */
- void (GLAPIENTRYP AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj); /* 518 */
- void (GLAPIENTRYP CompileShaderARB)(GLhandleARB shader); /* 519 */
- GLhandleARB (GLAPIENTRYP CreateProgramObjectARB)(void); /* 520 */
- GLhandleARB (GLAPIENTRYP CreateShaderObjectARB)(GLenum shaderType); /* 521 */
- void (GLAPIENTRYP DeleteObjectARB)(GLhandleARB obj); /* 522 */
- void (GLAPIENTRYP DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj); /* 523 */
- void (GLAPIENTRYP GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 524 */
- void (GLAPIENTRYP GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog); /* 525 */
- GLhandleARB (GLAPIENTRYP GetHandleARB)(GLenum pname); /* 526 */
- void (GLAPIENTRYP GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); /* 527 */
- void (GLAPIENTRYP GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params); /* 528 */
- void (GLAPIENTRYP GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params); /* 529 */
- void (GLAPIENTRYP GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei * length, GLcharARB * source); /* 530 */
- GLint (GLAPIENTRYP GetUniformLocationARB)(GLhandleARB program, const GLcharARB * name); /* 531 */
- void (GLAPIENTRYP GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat * params); /* 532 */
- void (GLAPIENTRYP GetUniformivARB)(GLhandleARB program, GLint location, GLint * params); /* 533 */
- void (GLAPIENTRYP LinkProgramARB)(GLhandleARB program); /* 534 */
- void (GLAPIENTRYP ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint * length); /* 535 */
- void (GLAPIENTRYP Uniform1fARB)(GLint location, GLfloat v0); /* 536 */
- void (GLAPIENTRYP Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 537 */
- void (GLAPIENTRYP Uniform1iARB)(GLint location, GLint v0); /* 538 */
- void (GLAPIENTRYP Uniform1ivARB)(GLint location, GLsizei count, const GLint * value); /* 539 */
- void (GLAPIENTRYP Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1); /* 540 */
- void (GLAPIENTRYP Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 541 */
- void (GLAPIENTRYP Uniform2iARB)(GLint location, GLint v0, GLint v1); /* 542 */
- void (GLAPIENTRYP Uniform2ivARB)(GLint location, GLsizei count, const GLint * value); /* 543 */
- void (GLAPIENTRYP Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); /* 544 */
- void (GLAPIENTRYP Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 545 */
- void (GLAPIENTRYP Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2); /* 546 */
- void (GLAPIENTRYP Uniform3ivARB)(GLint location, GLsizei count, const GLint * value); /* 547 */
- void (GLAPIENTRYP Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); /* 548 */
- void (GLAPIENTRYP Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 549 */
- void (GLAPIENTRYP Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); /* 550 */
- void (GLAPIENTRYP Uniform4ivARB)(GLint location, GLsizei count, const GLint * value); /* 551 */
- void (GLAPIENTRYP UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 552 */
- void (GLAPIENTRYP UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 553 */
- void (GLAPIENTRYP UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 554 */
- void (GLAPIENTRYP UseProgramObjectARB)(GLhandleARB program); /* 555 */
- void (GLAPIENTRYP ValidateProgramARB)(GLhandleARB program); /* 556 */
- void (GLAPIENTRYP BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB * name); /* 557 */
- void (GLAPIENTRYP GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 558 */
- GLint (GLAPIENTRYP GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name); /* 559 */
- void (GLAPIENTRYP DrawBuffersARB)(GLsizei n, const GLenum * bufs); /* 560 */
- void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 561 */
- void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 562 */
- void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 563 */
- void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 564 */
- void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 565 */
- void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 566 */
- void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 567 */
- void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 568 */
- void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 569 */
- void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 570 */
- void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 571 */
- void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 572 */
- void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 573 */
- void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 574 */
- void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 575 */
- void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 576 */
- void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 577 */
- void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 578 */
- void (GLAPIENTRYP UnlockArraysEXT)(void); /* 579 */
- void (GLAPIENTRYP CullParameterdvEXT)(GLenum pname, GLdouble * params); /* 580 */
- void (GLAPIENTRYP CullParameterfvEXT)(GLenum pname, GLfloat * params); /* 581 */
- void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 582 */
- void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 583 */
- void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 584 */
- void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 585 */
- void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 586 */
- void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 587 */
- void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 588 */
- void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 589 */
- void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 590 */
- void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 591 */
- void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 592 */
- void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 593 */
- void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 594 */
- void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 595 */
- void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 596 */
- void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 597 */
- void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 598 */
- void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 599 */
- void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 600 */
- void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 601 */
- void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 602 */
- void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 603 */
- void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 604 */
- void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 605 */
- void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 606 */
- void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 607 */
- void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 608 */
- void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 609 */
- void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 610 */
- void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 611 */
- void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 612 */
- void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 613 */
- void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 614 */
- void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 615 */
- void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 616 */
- void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 617 */
- void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 618 */
- void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 619 */
- void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 620 */
- void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 621 */
- void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 622 */
- void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 623 */
- void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 624 */
- void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 625 */
- void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 626 */
- void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 627 */
- void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 628 */
- void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 629 */
- void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 630 */
- void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 631 */
- void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 632 */
- void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 633 */
- void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 634 */
- void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 635 */
- void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 636 */
- void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 637 */
- void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 638 */
- void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 639 */
- void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 640 */
- void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 641 */
- void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 642 */
- void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 643 */
- void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 644 */
- void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 645 */
- void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 646 */
- void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 647 */
- void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 648 */
- void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 649 */
- void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 650 */
- void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 651 */
- void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 652 */
- void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 653 */
- GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 654 */
- void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 655 */
- GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 656 */
- GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 657 */
- void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 658 */
- void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 659 */
- void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 660 */
- void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 661 */
- void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 662 */
- void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 663 */
- void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 664 */
- void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 665 */
- void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 666 */
- void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); /* 667 */
- void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 668 */
- void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 669 */
- void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 670 */
- GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 671 */
- void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 672 */
- void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); /* 673 */
- void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); /* 674 */
- void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 675 */
- void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 676 */
- void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 677 */
- void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 678 */
- void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 679 */
- void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 680 */
- void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 681 */
- void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 682 */
- void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 683 */
- void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 684 */
- void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 685 */
- void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 686 */
- void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 687 */
- void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 688 */
- void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 689 */
- void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 690 */
- void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 691 */
- void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 692 */
- void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 693 */
- void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 694 */
- void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 695 */
- void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 696 */
- void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 697 */
- void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 698 */
- void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 699 */
- void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 700 */
- void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 701 */
- void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 702 */
- void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 703 */
- void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 704 */
- void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 705 */
- void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 706 */
- void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 707 */
- void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 708 */
- void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 709 */
- void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 710 */
- void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 711 */
- void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 712 */
- void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 713 */
- void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 714 */
- void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 715 */
- void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 716 */
- void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 717 */
- void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 718 */
- void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 719 */
- void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 720 */
- void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 721 */
- void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 722 */
- void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 723 */
- void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 724 */
- void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 725 */
- void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 726 */
- GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 727 */
- void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 728 */
- void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 729 */
- void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 730 */
- void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 731 */
- void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 732 */
- void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 733 */
- void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 734 */
- void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 735 */
- void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 736 */
- GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 737 */
- void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 738 */
- void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 739 */
- void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 740 */
- void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 741 */
- void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 742 */
- void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 743 */
- void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 744 */
- void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 745 */
- void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 746 */
- void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 747 */
- GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 748 */
- void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 749 */
- void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 750 */
- void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 751 */
- void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 752 */
- void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 753 */
- void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 754 */
- void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 755 */
- void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 756 */
- void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 757 */
- void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 758 */
- void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 759 */
- GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 760 */
- GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 761 */
- void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 762 */
- void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 763 */
- void (GLAPIENTRYP FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); /* 764 */
- void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 765 */
- void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 766 */
- void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 767 */
- void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 768 */
- void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 769 */
-};
-
-#endif /* !defined( _GLAPI_TABLE_H_ ) */
+/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */
+
+/*
+ * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
+ * (C) Copyright IBM Corporation 2004
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL, IBM,
+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#if !defined( _GLAPI_TABLE_H_ )
+# define _GLAPI_TABLE_H_
+
+#ifndef GLAPIENTRYP
+# ifndef GLAPIENTRY
+# define GLAPIENTRY
+# endif
+
+# define GLAPIENTRYP GLAPIENTRY *
+#endif
+
+
+struct _glapi_table
+{
+ void (GLAPIENTRYP NewList)(GLuint list, GLenum mode); /* 0 */
+ void (GLAPIENTRYP EndList)(void); /* 1 */
+ void (GLAPIENTRYP CallList)(GLuint list); /* 2 */
+ void (GLAPIENTRYP CallLists)(GLsizei n, GLenum type, const GLvoid * lists); /* 3 */
+ void (GLAPIENTRYP DeleteLists)(GLuint list, GLsizei range); /* 4 */
+ GLuint (GLAPIENTRYP GenLists)(GLsizei range); /* 5 */
+ void (GLAPIENTRYP ListBase)(GLuint base); /* 6 */
+ void (GLAPIENTRYP Begin)(GLenum mode); /* 7 */
+ void (GLAPIENTRYP Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); /* 8 */
+ void (GLAPIENTRYP Color3b)(GLbyte red, GLbyte green, GLbyte blue); /* 9 */
+ void (GLAPIENTRYP Color3bv)(const GLbyte * v); /* 10 */
+ void (GLAPIENTRYP Color3d)(GLdouble red, GLdouble green, GLdouble blue); /* 11 */
+ void (GLAPIENTRYP Color3dv)(const GLdouble * v); /* 12 */
+ void (GLAPIENTRYP Color3f)(GLfloat red, GLfloat green, GLfloat blue); /* 13 */
+ void (GLAPIENTRYP Color3fv)(const GLfloat * v); /* 14 */
+ void (GLAPIENTRYP Color3i)(GLint red, GLint green, GLint blue); /* 15 */
+ void (GLAPIENTRYP Color3iv)(const GLint * v); /* 16 */
+ void (GLAPIENTRYP Color3s)(GLshort red, GLshort green, GLshort blue); /* 17 */
+ void (GLAPIENTRYP Color3sv)(const GLshort * v); /* 18 */
+ void (GLAPIENTRYP Color3ub)(GLubyte red, GLubyte green, GLubyte blue); /* 19 */
+ void (GLAPIENTRYP Color3ubv)(const GLubyte * v); /* 20 */
+ void (GLAPIENTRYP Color3ui)(GLuint red, GLuint green, GLuint blue); /* 21 */
+ void (GLAPIENTRYP Color3uiv)(const GLuint * v); /* 22 */
+ void (GLAPIENTRYP Color3us)(GLushort red, GLushort green, GLushort blue); /* 23 */
+ void (GLAPIENTRYP Color3usv)(const GLushort * v); /* 24 */
+ void (GLAPIENTRYP Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); /* 25 */
+ void (GLAPIENTRYP Color4bv)(const GLbyte * v); /* 26 */
+ void (GLAPIENTRYP Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); /* 27 */
+ void (GLAPIENTRYP Color4dv)(const GLdouble * v); /* 28 */
+ void (GLAPIENTRYP Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 29 */
+ void (GLAPIENTRYP Color4fv)(const GLfloat * v); /* 30 */
+ void (GLAPIENTRYP Color4i)(GLint red, GLint green, GLint blue, GLint alpha); /* 31 */
+ void (GLAPIENTRYP Color4iv)(const GLint * v); /* 32 */
+ void (GLAPIENTRYP Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha); /* 33 */
+ void (GLAPIENTRYP Color4sv)(const GLshort * v); /* 34 */
+ void (GLAPIENTRYP Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); /* 35 */
+ void (GLAPIENTRYP Color4ubv)(const GLubyte * v); /* 36 */
+ void (GLAPIENTRYP Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha); /* 37 */
+ void (GLAPIENTRYP Color4uiv)(const GLuint * v); /* 38 */
+ void (GLAPIENTRYP Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha); /* 39 */
+ void (GLAPIENTRYP Color4usv)(const GLushort * v); /* 40 */
+ void (GLAPIENTRYP EdgeFlag)(GLboolean flag); /* 41 */
+ void (GLAPIENTRYP EdgeFlagv)(const GLboolean * flag); /* 42 */
+ void (GLAPIENTRYP End)(void); /* 43 */
+ void (GLAPIENTRYP Indexd)(GLdouble c); /* 44 */
+ void (GLAPIENTRYP Indexdv)(const GLdouble * c); /* 45 */
+ void (GLAPIENTRYP Indexf)(GLfloat c); /* 46 */
+ void (GLAPIENTRYP Indexfv)(const GLfloat * c); /* 47 */
+ void (GLAPIENTRYP Indexi)(GLint c); /* 48 */
+ void (GLAPIENTRYP Indexiv)(const GLint * c); /* 49 */
+ void (GLAPIENTRYP Indexs)(GLshort c); /* 50 */
+ void (GLAPIENTRYP Indexsv)(const GLshort * c); /* 51 */
+ void (GLAPIENTRYP Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz); /* 52 */
+ void (GLAPIENTRYP Normal3bv)(const GLbyte * v); /* 53 */
+ void (GLAPIENTRYP Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz); /* 54 */
+ void (GLAPIENTRYP Normal3dv)(const GLdouble * v); /* 55 */
+ void (GLAPIENTRYP Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz); /* 56 */
+ void (GLAPIENTRYP Normal3fv)(const GLfloat * v); /* 57 */
+ void (GLAPIENTRYP Normal3i)(GLint nx, GLint ny, GLint nz); /* 58 */
+ void (GLAPIENTRYP Normal3iv)(const GLint * v); /* 59 */
+ void (GLAPIENTRYP Normal3s)(GLshort nx, GLshort ny, GLshort nz); /* 60 */
+ void (GLAPIENTRYP Normal3sv)(const GLshort * v); /* 61 */
+ void (GLAPIENTRYP RasterPos2d)(GLdouble x, GLdouble y); /* 62 */
+ void (GLAPIENTRYP RasterPos2dv)(const GLdouble * v); /* 63 */
+ void (GLAPIENTRYP RasterPos2f)(GLfloat x, GLfloat y); /* 64 */
+ void (GLAPIENTRYP RasterPos2fv)(const GLfloat * v); /* 65 */
+ void (GLAPIENTRYP RasterPos2i)(GLint x, GLint y); /* 66 */
+ void (GLAPIENTRYP RasterPos2iv)(const GLint * v); /* 67 */
+ void (GLAPIENTRYP RasterPos2s)(GLshort x, GLshort y); /* 68 */
+ void (GLAPIENTRYP RasterPos2sv)(const GLshort * v); /* 69 */
+ void (GLAPIENTRYP RasterPos3d)(GLdouble x, GLdouble y, GLdouble z); /* 70 */
+ void (GLAPIENTRYP RasterPos3dv)(const GLdouble * v); /* 71 */
+ void (GLAPIENTRYP RasterPos3f)(GLfloat x, GLfloat y, GLfloat z); /* 72 */
+ void (GLAPIENTRYP RasterPos3fv)(const GLfloat * v); /* 73 */
+ void (GLAPIENTRYP RasterPos3i)(GLint x, GLint y, GLint z); /* 74 */
+ void (GLAPIENTRYP RasterPos3iv)(const GLint * v); /* 75 */
+ void (GLAPIENTRYP RasterPos3s)(GLshort x, GLshort y, GLshort z); /* 76 */
+ void (GLAPIENTRYP RasterPos3sv)(const GLshort * v); /* 77 */
+ void (GLAPIENTRYP RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 78 */
+ void (GLAPIENTRYP RasterPos4dv)(const GLdouble * v); /* 79 */
+ void (GLAPIENTRYP RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 80 */
+ void (GLAPIENTRYP RasterPos4fv)(const GLfloat * v); /* 81 */
+ void (GLAPIENTRYP RasterPos4i)(GLint x, GLint y, GLint z, GLint w); /* 82 */
+ void (GLAPIENTRYP RasterPos4iv)(const GLint * v); /* 83 */
+ void (GLAPIENTRYP RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 84 */
+ void (GLAPIENTRYP RasterPos4sv)(const GLshort * v); /* 85 */
+ void (GLAPIENTRYP Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); /* 86 */
+ void (GLAPIENTRYP Rectdv)(const GLdouble * v1, const GLdouble * v2); /* 87 */
+ void (GLAPIENTRYP Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); /* 88 */
+ void (GLAPIENTRYP Rectfv)(const GLfloat * v1, const GLfloat * v2); /* 89 */
+ void (GLAPIENTRYP Recti)(GLint x1, GLint y1, GLint x2, GLint y2); /* 90 */
+ void (GLAPIENTRYP Rectiv)(const GLint * v1, const GLint * v2); /* 91 */
+ void (GLAPIENTRYP Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2); /* 92 */
+ void (GLAPIENTRYP Rectsv)(const GLshort * v1, const GLshort * v2); /* 93 */
+ void (GLAPIENTRYP TexCoord1d)(GLdouble s); /* 94 */
+ void (GLAPIENTRYP TexCoord1dv)(const GLdouble * v); /* 95 */
+ void (GLAPIENTRYP TexCoord1f)(GLfloat s); /* 96 */
+ void (GLAPIENTRYP TexCoord1fv)(const GLfloat * v); /* 97 */
+ void (GLAPIENTRYP TexCoord1i)(GLint s); /* 98 */
+ void (GLAPIENTRYP TexCoord1iv)(const GLint * v); /* 99 */
+ void (GLAPIENTRYP TexCoord1s)(GLshort s); /* 100 */
+ void (GLAPIENTRYP TexCoord1sv)(const GLshort * v); /* 101 */
+ void (GLAPIENTRYP TexCoord2d)(GLdouble s, GLdouble t); /* 102 */
+ void (GLAPIENTRYP TexCoord2dv)(const GLdouble * v); /* 103 */
+ void (GLAPIENTRYP TexCoord2f)(GLfloat s, GLfloat t); /* 104 */
+ void (GLAPIENTRYP TexCoord2fv)(const GLfloat * v); /* 105 */
+ void (GLAPIENTRYP TexCoord2i)(GLint s, GLint t); /* 106 */
+ void (GLAPIENTRYP TexCoord2iv)(const GLint * v); /* 107 */
+ void (GLAPIENTRYP TexCoord2s)(GLshort s, GLshort t); /* 108 */
+ void (GLAPIENTRYP TexCoord2sv)(const GLshort * v); /* 109 */
+ void (GLAPIENTRYP TexCoord3d)(GLdouble s, GLdouble t, GLdouble r); /* 110 */
+ void (GLAPIENTRYP TexCoord3dv)(const GLdouble * v); /* 111 */
+ void (GLAPIENTRYP TexCoord3f)(GLfloat s, GLfloat t, GLfloat r); /* 112 */
+ void (GLAPIENTRYP TexCoord3fv)(const GLfloat * v); /* 113 */
+ void (GLAPIENTRYP TexCoord3i)(GLint s, GLint t, GLint r); /* 114 */
+ void (GLAPIENTRYP TexCoord3iv)(const GLint * v); /* 115 */
+ void (GLAPIENTRYP TexCoord3s)(GLshort s, GLshort t, GLshort r); /* 116 */
+ void (GLAPIENTRYP TexCoord3sv)(const GLshort * v); /* 117 */
+ void (GLAPIENTRYP TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 118 */
+ void (GLAPIENTRYP TexCoord4dv)(const GLdouble * v); /* 119 */
+ void (GLAPIENTRYP TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 120 */
+ void (GLAPIENTRYP TexCoord4fv)(const GLfloat * v); /* 121 */
+ void (GLAPIENTRYP TexCoord4i)(GLint s, GLint t, GLint r, GLint q); /* 122 */
+ void (GLAPIENTRYP TexCoord4iv)(const GLint * v); /* 123 */
+ void (GLAPIENTRYP TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q); /* 124 */
+ void (GLAPIENTRYP TexCoord4sv)(const GLshort * v); /* 125 */
+ void (GLAPIENTRYP Vertex2d)(GLdouble x, GLdouble y); /* 126 */
+ void (GLAPIENTRYP Vertex2dv)(const GLdouble * v); /* 127 */
+ void (GLAPIENTRYP Vertex2f)(GLfloat x, GLfloat y); /* 128 */
+ void (GLAPIENTRYP Vertex2fv)(const GLfloat * v); /* 129 */
+ void (GLAPIENTRYP Vertex2i)(GLint x, GLint y); /* 130 */
+ void (GLAPIENTRYP Vertex2iv)(const GLint * v); /* 131 */
+ void (GLAPIENTRYP Vertex2s)(GLshort x, GLshort y); /* 132 */
+ void (GLAPIENTRYP Vertex2sv)(const GLshort * v); /* 133 */
+ void (GLAPIENTRYP Vertex3d)(GLdouble x, GLdouble y, GLdouble z); /* 134 */
+ void (GLAPIENTRYP Vertex3dv)(const GLdouble * v); /* 135 */
+ void (GLAPIENTRYP Vertex3f)(GLfloat x, GLfloat y, GLfloat z); /* 136 */
+ void (GLAPIENTRYP Vertex3fv)(const GLfloat * v); /* 137 */
+ void (GLAPIENTRYP Vertex3i)(GLint x, GLint y, GLint z); /* 138 */
+ void (GLAPIENTRYP Vertex3iv)(const GLint * v); /* 139 */
+ void (GLAPIENTRYP Vertex3s)(GLshort x, GLshort y, GLshort z); /* 140 */
+ void (GLAPIENTRYP Vertex3sv)(const GLshort * v); /* 141 */
+ void (GLAPIENTRYP Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 142 */
+ void (GLAPIENTRYP Vertex4dv)(const GLdouble * v); /* 143 */
+ void (GLAPIENTRYP Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 144 */
+ void (GLAPIENTRYP Vertex4fv)(const GLfloat * v); /* 145 */
+ void (GLAPIENTRYP Vertex4i)(GLint x, GLint y, GLint z, GLint w); /* 146 */
+ void (GLAPIENTRYP Vertex4iv)(const GLint * v); /* 147 */
+ void (GLAPIENTRYP Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 148 */
+ void (GLAPIENTRYP Vertex4sv)(const GLshort * v); /* 149 */
+ void (GLAPIENTRYP ClipPlane)(GLenum plane, const GLdouble * equation); /* 150 */
+ void (GLAPIENTRYP ColorMaterial)(GLenum face, GLenum mode); /* 151 */
+ void (GLAPIENTRYP CullFace)(GLenum mode); /* 152 */
+ void (GLAPIENTRYP Fogf)(GLenum pname, GLfloat param); /* 153 */
+ void (GLAPIENTRYP Fogfv)(GLenum pname, const GLfloat * params); /* 154 */
+ void (GLAPIENTRYP Fogi)(GLenum pname, GLint param); /* 155 */
+ void (GLAPIENTRYP Fogiv)(GLenum pname, const GLint * params); /* 156 */
+ void (GLAPIENTRYP FrontFace)(GLenum mode); /* 157 */
+ void (GLAPIENTRYP Hint)(GLenum target, GLenum mode); /* 158 */
+ void (GLAPIENTRYP Lightf)(GLenum light, GLenum pname, GLfloat param); /* 159 */
+ void (GLAPIENTRYP Lightfv)(GLenum light, GLenum pname, const GLfloat * params); /* 160 */
+ void (GLAPIENTRYP Lighti)(GLenum light, GLenum pname, GLint param); /* 161 */
+ void (GLAPIENTRYP Lightiv)(GLenum light, GLenum pname, const GLint * params); /* 162 */
+ void (GLAPIENTRYP LightModelf)(GLenum pname, GLfloat param); /* 163 */
+ void (GLAPIENTRYP LightModelfv)(GLenum pname, const GLfloat * params); /* 164 */
+ void (GLAPIENTRYP LightModeli)(GLenum pname, GLint param); /* 165 */
+ void (GLAPIENTRYP LightModeliv)(GLenum pname, const GLint * params); /* 166 */
+ void (GLAPIENTRYP LineStipple)(GLint factor, GLushort pattern); /* 167 */
+ void (GLAPIENTRYP LineWidth)(GLfloat width); /* 168 */
+ void (GLAPIENTRYP Materialf)(GLenum face, GLenum pname, GLfloat param); /* 169 */
+ void (GLAPIENTRYP Materialfv)(GLenum face, GLenum pname, const GLfloat * params); /* 170 */
+ void (GLAPIENTRYP Materiali)(GLenum face, GLenum pname, GLint param); /* 171 */
+ void (GLAPIENTRYP Materialiv)(GLenum face, GLenum pname, const GLint * params); /* 172 */
+ void (GLAPIENTRYP PointSize)(GLfloat size); /* 173 */
+ void (GLAPIENTRYP PolygonMode)(GLenum face, GLenum mode); /* 174 */
+ void (GLAPIENTRYP PolygonStipple)(const GLubyte * mask); /* 175 */
+ void (GLAPIENTRYP Scissor)(GLint x, GLint y, GLsizei width, GLsizei height); /* 176 */
+ void (GLAPIENTRYP ShadeModel)(GLenum mode); /* 177 */
+ void (GLAPIENTRYP TexParameterf)(GLenum target, GLenum pname, GLfloat param); /* 178 */
+ void (GLAPIENTRYP TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 179 */
+ void (GLAPIENTRYP TexParameteri)(GLenum target, GLenum pname, GLint param); /* 180 */
+ void (GLAPIENTRYP TexParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 181 */
+ void (GLAPIENTRYP TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 182 */
+ void (GLAPIENTRYP TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 183 */
+ void (GLAPIENTRYP TexEnvf)(GLenum target, GLenum pname, GLfloat param); /* 184 */
+ void (GLAPIENTRYP TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params); /* 185 */
+ void (GLAPIENTRYP TexEnvi)(GLenum target, GLenum pname, GLint param); /* 186 */
+ void (GLAPIENTRYP TexEnviv)(GLenum target, GLenum pname, const GLint * params); /* 187 */
+ void (GLAPIENTRYP TexGend)(GLenum coord, GLenum pname, GLdouble param); /* 188 */
+ void (GLAPIENTRYP TexGendv)(GLenum coord, GLenum pname, const GLdouble * params); /* 189 */
+ void (GLAPIENTRYP TexGenf)(GLenum coord, GLenum pname, GLfloat param); /* 190 */
+ void (GLAPIENTRYP TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params); /* 191 */
+ void (GLAPIENTRYP TexGeni)(GLenum coord, GLenum pname, GLint param); /* 192 */
+ void (GLAPIENTRYP TexGeniv)(GLenum coord, GLenum pname, const GLint * params); /* 193 */
+ void (GLAPIENTRYP FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer); /* 194 */
+ void (GLAPIENTRYP SelectBuffer)(GLsizei size, GLuint * buffer); /* 195 */
+ GLint (GLAPIENTRYP RenderMode)(GLenum mode); /* 196 */
+ void (GLAPIENTRYP InitNames)(void); /* 197 */
+ void (GLAPIENTRYP LoadName)(GLuint name); /* 198 */
+ void (GLAPIENTRYP PassThrough)(GLfloat token); /* 199 */
+ void (GLAPIENTRYP PopName)(void); /* 200 */
+ void (GLAPIENTRYP PushName)(GLuint name); /* 201 */
+ void (GLAPIENTRYP DrawBuffer)(GLenum mode); /* 202 */
+ void (GLAPIENTRYP Clear)(GLbitfield mask); /* 203 */
+ void (GLAPIENTRYP ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 204 */
+ void (GLAPIENTRYP ClearIndex)(GLfloat c); /* 205 */
+ void (GLAPIENTRYP ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 206 */
+ void (GLAPIENTRYP ClearStencil)(GLint s); /* 207 */
+ void (GLAPIENTRYP ClearDepth)(GLclampd depth); /* 208 */
+ void (GLAPIENTRYP StencilMask)(GLuint mask); /* 209 */
+ void (GLAPIENTRYP ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); /* 210 */
+ void (GLAPIENTRYP DepthMask)(GLboolean flag); /* 211 */
+ void (GLAPIENTRYP IndexMask)(GLuint mask); /* 212 */
+ void (GLAPIENTRYP Accum)(GLenum op, GLfloat value); /* 213 */
+ void (GLAPIENTRYP Disable)(GLenum cap); /* 214 */
+ void (GLAPIENTRYP Enable)(GLenum cap); /* 215 */
+ void (GLAPIENTRYP Finish)(void); /* 216 */
+ void (GLAPIENTRYP Flush)(void); /* 217 */
+ void (GLAPIENTRYP PopAttrib)(void); /* 218 */
+ void (GLAPIENTRYP PushAttrib)(GLbitfield mask); /* 219 */
+ void (GLAPIENTRYP Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); /* 220 */
+ void (GLAPIENTRYP Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); /* 221 */
+ void (GLAPIENTRYP Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); /* 222 */
+ void (GLAPIENTRYP Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); /* 223 */
+ void (GLAPIENTRYP MapGrid1d)(GLint un, GLdouble u1, GLdouble u2); /* 224 */
+ void (GLAPIENTRYP MapGrid1f)(GLint un, GLfloat u1, GLfloat u2); /* 225 */
+ void (GLAPIENTRYP MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); /* 226 */
+ void (GLAPIENTRYP MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); /* 227 */
+ void (GLAPIENTRYP EvalCoord1d)(GLdouble u); /* 228 */
+ void (GLAPIENTRYP EvalCoord1dv)(const GLdouble * u); /* 229 */
+ void (GLAPIENTRYP EvalCoord1f)(GLfloat u); /* 230 */
+ void (GLAPIENTRYP EvalCoord1fv)(const GLfloat * u); /* 231 */
+ void (GLAPIENTRYP EvalCoord2d)(GLdouble u, GLdouble v); /* 232 */
+ void (GLAPIENTRYP EvalCoord2dv)(const GLdouble * u); /* 233 */
+ void (GLAPIENTRYP EvalCoord2f)(GLfloat u, GLfloat v); /* 234 */
+ void (GLAPIENTRYP EvalCoord2fv)(const GLfloat * u); /* 235 */
+ void (GLAPIENTRYP EvalMesh1)(GLenum mode, GLint i1, GLint i2); /* 236 */
+ void (GLAPIENTRYP EvalPoint1)(GLint i); /* 237 */
+ void (GLAPIENTRYP EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); /* 238 */
+ void (GLAPIENTRYP EvalPoint2)(GLint i, GLint j); /* 239 */
+ void (GLAPIENTRYP AlphaFunc)(GLenum func, GLclampf ref); /* 240 */
+ void (GLAPIENTRYP BlendFunc)(GLenum sfactor, GLenum dfactor); /* 241 */
+ void (GLAPIENTRYP LogicOp)(GLenum opcode); /* 242 */
+ void (GLAPIENTRYP StencilFunc)(GLenum func, GLint ref, GLuint mask); /* 243 */
+ void (GLAPIENTRYP StencilOp)(GLenum fail, GLenum zfail, GLenum zpass); /* 244 */
+ void (GLAPIENTRYP DepthFunc)(GLenum func); /* 245 */
+ void (GLAPIENTRYP PixelZoom)(GLfloat xfactor, GLfloat yfactor); /* 246 */
+ void (GLAPIENTRYP PixelTransferf)(GLenum pname, GLfloat param); /* 247 */
+ void (GLAPIENTRYP PixelTransferi)(GLenum pname, GLint param); /* 248 */
+ void (GLAPIENTRYP PixelStoref)(GLenum pname, GLfloat param); /* 249 */
+ void (GLAPIENTRYP PixelStorei)(GLenum pname, GLint param); /* 250 */
+ void (GLAPIENTRYP PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat * values); /* 251 */
+ void (GLAPIENTRYP PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint * values); /* 252 */
+ void (GLAPIENTRYP PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort * values); /* 253 */
+ void (GLAPIENTRYP ReadBuffer)(GLenum mode); /* 254 */
+ void (GLAPIENTRYP CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); /* 255 */
+ void (GLAPIENTRYP ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); /* 256 */
+ void (GLAPIENTRYP DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 257 */
+ void (GLAPIENTRYP GetBooleanv)(GLenum pname, GLboolean * params); /* 258 */
+ void (GLAPIENTRYP GetClipPlane)(GLenum plane, GLdouble * equation); /* 259 */
+ void (GLAPIENTRYP GetDoublev)(GLenum pname, GLdouble * params); /* 260 */
+ GLenum (GLAPIENTRYP GetError)(void); /* 261 */
+ void (GLAPIENTRYP GetFloatv)(GLenum pname, GLfloat * params); /* 262 */
+ void (GLAPIENTRYP GetIntegerv)(GLenum pname, GLint * params); /* 263 */
+ void (GLAPIENTRYP GetLightfv)(GLenum light, GLenum pname, GLfloat * params); /* 264 */
+ void (GLAPIENTRYP GetLightiv)(GLenum light, GLenum pname, GLint * params); /* 265 */
+ void (GLAPIENTRYP GetMapdv)(GLenum target, GLenum query, GLdouble * v); /* 266 */
+ void (GLAPIENTRYP GetMapfv)(GLenum target, GLenum query, GLfloat * v); /* 267 */
+ void (GLAPIENTRYP GetMapiv)(GLenum target, GLenum query, GLint * v); /* 268 */
+ void (GLAPIENTRYP GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params); /* 269 */
+ void (GLAPIENTRYP GetMaterialiv)(GLenum face, GLenum pname, GLint * params); /* 270 */
+ void (GLAPIENTRYP GetPixelMapfv)(GLenum map, GLfloat * values); /* 271 */
+ void (GLAPIENTRYP GetPixelMapuiv)(GLenum map, GLuint * values); /* 272 */
+ void (GLAPIENTRYP GetPixelMapusv)(GLenum map, GLushort * values); /* 273 */
+ void (GLAPIENTRYP GetPolygonStipple)(GLubyte * mask); /* 274 */
+ const GLubyte * (GLAPIENTRYP GetString)(GLenum name); /* 275 */
+ void (GLAPIENTRYP GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params); /* 276 */
+ void (GLAPIENTRYP GetTexEnviv)(GLenum target, GLenum pname, GLint * params); /* 277 */
+ void (GLAPIENTRYP GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params); /* 278 */
+ void (GLAPIENTRYP GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params); /* 279 */
+ void (GLAPIENTRYP GetTexGeniv)(GLenum coord, GLenum pname, GLint * params); /* 280 */
+ void (GLAPIENTRYP GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); /* 281 */
+ void (GLAPIENTRYP GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 282 */
+ void (GLAPIENTRYP GetTexParameteriv)(GLenum target, GLenum pname, GLint * params); /* 283 */
+ void (GLAPIENTRYP GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params); /* 284 */
+ void (GLAPIENTRYP GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params); /* 285 */
+ GLboolean (GLAPIENTRYP IsEnabled)(GLenum cap); /* 286 */
+ GLboolean (GLAPIENTRYP IsList)(GLuint list); /* 287 */
+ void (GLAPIENTRYP DepthRange)(GLclampd zNear, GLclampd zFar); /* 288 */
+ void (GLAPIENTRYP Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 289 */
+ void (GLAPIENTRYP LoadIdentity)(void); /* 290 */
+ void (GLAPIENTRYP LoadMatrixf)(const GLfloat * m); /* 291 */
+ void (GLAPIENTRYP LoadMatrixd)(const GLdouble * m); /* 292 */
+ void (GLAPIENTRYP MatrixMode)(GLenum mode); /* 293 */
+ void (GLAPIENTRYP MultMatrixf)(const GLfloat * m); /* 294 */
+ void (GLAPIENTRYP MultMatrixd)(const GLdouble * m); /* 295 */
+ void (GLAPIENTRYP Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 296 */
+ void (GLAPIENTRYP PopMatrix)(void); /* 297 */
+ void (GLAPIENTRYP PushMatrix)(void); /* 298 */
+ void (GLAPIENTRYP Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); /* 299 */
+ void (GLAPIENTRYP Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); /* 300 */
+ void (GLAPIENTRYP Scaled)(GLdouble x, GLdouble y, GLdouble z); /* 301 */
+ void (GLAPIENTRYP Scalef)(GLfloat x, GLfloat y, GLfloat z); /* 302 */
+ void (GLAPIENTRYP Translated)(GLdouble x, GLdouble y, GLdouble z); /* 303 */
+ void (GLAPIENTRYP Translatef)(GLfloat x, GLfloat y, GLfloat z); /* 304 */
+ void (GLAPIENTRYP Viewport)(GLint x, GLint y, GLsizei width, GLsizei height); /* 305 */
+ void (GLAPIENTRYP ArrayElement)(GLint i); /* 306 */
+ void (GLAPIENTRYP BindTexture)(GLenum target, GLuint texture); /* 307 */
+ void (GLAPIENTRYP ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 308 */
+ void (GLAPIENTRYP DisableClientState)(GLenum array); /* 309 */
+ void (GLAPIENTRYP DrawArrays)(GLenum mode, GLint first, GLsizei count); /* 310 */
+ void (GLAPIENTRYP DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); /* 311 */
+ void (GLAPIENTRYP EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer); /* 312 */
+ void (GLAPIENTRYP EnableClientState)(GLenum array); /* 313 */
+ void (GLAPIENTRYP IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 314 */
+ void (GLAPIENTRYP Indexub)(GLubyte c); /* 315 */
+ void (GLAPIENTRYP Indexubv)(const GLubyte * c); /* 316 */
+ void (GLAPIENTRYP InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer); /* 317 */
+ void (GLAPIENTRYP NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 318 */
+ void (GLAPIENTRYP PolygonOffset)(GLfloat factor, GLfloat units); /* 319 */
+ void (GLAPIENTRYP TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 320 */
+ void (GLAPIENTRYP VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 321 */
+ GLboolean (GLAPIENTRYP AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences); /* 322 */
+ void (GLAPIENTRYP CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); /* 323 */
+ void (GLAPIENTRYP CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); /* 324 */
+ void (GLAPIENTRYP CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); /* 325 */
+ void (GLAPIENTRYP CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 326 */
+ void (GLAPIENTRYP DeleteTextures)(GLsizei n, const GLuint * textures); /* 327 */
+ void (GLAPIENTRYP GenTextures)(GLsizei n, GLuint * textures); /* 328 */
+ void (GLAPIENTRYP GetPointerv)(GLenum pname, GLvoid ** params); /* 329 */
+ GLboolean (GLAPIENTRYP IsTexture)(GLuint texture); /* 330 */
+ void (GLAPIENTRYP PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities); /* 331 */
+ void (GLAPIENTRYP TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); /* 332 */
+ void (GLAPIENTRYP TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 333 */
+ void (GLAPIENTRYP PopClientAttrib)(void); /* 334 */
+ void (GLAPIENTRYP PushClientAttrib)(GLbitfield mask); /* 335 */
+ void (GLAPIENTRYP BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 336 */
+ void (GLAPIENTRYP BlendEquation)(GLenum mode); /* 337 */
+ void (GLAPIENTRYP DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); /* 338 */
+ void (GLAPIENTRYP ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); /* 339 */
+ void (GLAPIENTRYP ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 340 */
+ void (GLAPIENTRYP ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 341 */
+ void (GLAPIENTRYP CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 342 */
+ void (GLAPIENTRYP GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table); /* 343 */
+ void (GLAPIENTRYP GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 344 */
+ void (GLAPIENTRYP GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params); /* 345 */
+ void (GLAPIENTRYP ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); /* 346 */
+ void (GLAPIENTRYP CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); /* 347 */
+ void (GLAPIENTRYP ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); /* 348 */
+ void (GLAPIENTRYP ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); /* 349 */
+ void (GLAPIENTRYP ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params); /* 350 */
+ void (GLAPIENTRYP ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 351 */
+ void (GLAPIENTRYP ConvolutionParameteri)(GLenum target, GLenum pname, GLint params); /* 352 */
+ void (GLAPIENTRYP ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 353 */
+ void (GLAPIENTRYP CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 354 */
+ void (GLAPIENTRYP CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); /* 355 */
+ void (GLAPIENTRYP GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image); /* 356 */
+ void (GLAPIENTRYP GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 357 */
+ void (GLAPIENTRYP GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params); /* 358 */
+ void (GLAPIENTRYP GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); /* 359 */
+ void (GLAPIENTRYP SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); /* 360 */
+ void (GLAPIENTRYP GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 361 */
+ void (GLAPIENTRYP GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 362 */
+ void (GLAPIENTRYP GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params); /* 363 */
+ void (GLAPIENTRYP GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 364 */
+ void (GLAPIENTRYP GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 365 */
+ void (GLAPIENTRYP GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params); /* 366 */
+ void (GLAPIENTRYP Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); /* 367 */
+ void (GLAPIENTRYP Minmax)(GLenum target, GLenum internalformat, GLboolean sink); /* 368 */
+ void (GLAPIENTRYP ResetHistogram)(GLenum target); /* 369 */
+ void (GLAPIENTRYP ResetMinmax)(GLenum target); /* 370 */
+ void (GLAPIENTRYP TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 371 */
+ void (GLAPIENTRYP TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); /* 372 */
+ void (GLAPIENTRYP CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 373 */
+ void (GLAPIENTRYP ActiveTextureARB)(GLenum texture); /* 374 */
+ void (GLAPIENTRYP ClientActiveTextureARB)(GLenum texture); /* 375 */
+ void (GLAPIENTRYP MultiTexCoord1dARB)(GLenum target, GLdouble s); /* 376 */
+ void (GLAPIENTRYP MultiTexCoord1dvARB)(GLenum target, const GLdouble * v); /* 377 */
+ void (GLAPIENTRYP MultiTexCoord1fARB)(GLenum target, GLfloat s); /* 378 */
+ void (GLAPIENTRYP MultiTexCoord1fvARB)(GLenum target, const GLfloat * v); /* 379 */
+ void (GLAPIENTRYP MultiTexCoord1iARB)(GLenum target, GLint s); /* 380 */
+ void (GLAPIENTRYP MultiTexCoord1ivARB)(GLenum target, const GLint * v); /* 381 */
+ void (GLAPIENTRYP MultiTexCoord1sARB)(GLenum target, GLshort s); /* 382 */
+ void (GLAPIENTRYP MultiTexCoord1svARB)(GLenum target, const GLshort * v); /* 383 */
+ void (GLAPIENTRYP MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t); /* 384 */
+ void (GLAPIENTRYP MultiTexCoord2dvARB)(GLenum target, const GLdouble * v); /* 385 */
+ void (GLAPIENTRYP MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t); /* 386 */
+ void (GLAPIENTRYP MultiTexCoord2fvARB)(GLenum target, const GLfloat * v); /* 387 */
+ void (GLAPIENTRYP MultiTexCoord2iARB)(GLenum target, GLint s, GLint t); /* 388 */
+ void (GLAPIENTRYP MultiTexCoord2ivARB)(GLenum target, const GLint * v); /* 389 */
+ void (GLAPIENTRYP MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t); /* 390 */
+ void (GLAPIENTRYP MultiTexCoord2svARB)(GLenum target, const GLshort * v); /* 391 */
+ void (GLAPIENTRYP MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r); /* 392 */
+ void (GLAPIENTRYP MultiTexCoord3dvARB)(GLenum target, const GLdouble * v); /* 393 */
+ void (GLAPIENTRYP MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r); /* 394 */
+ void (GLAPIENTRYP MultiTexCoord3fvARB)(GLenum target, const GLfloat * v); /* 395 */
+ void (GLAPIENTRYP MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r); /* 396 */
+ void (GLAPIENTRYP MultiTexCoord3ivARB)(GLenum target, const GLint * v); /* 397 */
+ void (GLAPIENTRYP MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r); /* 398 */
+ void (GLAPIENTRYP MultiTexCoord3svARB)(GLenum target, const GLshort * v); /* 399 */
+ void (GLAPIENTRYP MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 400 */
+ void (GLAPIENTRYP MultiTexCoord4dvARB)(GLenum target, const GLdouble * v); /* 401 */
+ void (GLAPIENTRYP MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 402 */
+ void (GLAPIENTRYP MultiTexCoord4fvARB)(GLenum target, const GLfloat * v); /* 403 */
+ void (GLAPIENTRYP MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q); /* 404 */
+ void (GLAPIENTRYP MultiTexCoord4ivARB)(GLenum target, const GLint * v); /* 405 */
+ void (GLAPIENTRYP MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); /* 406 */
+ void (GLAPIENTRYP MultiTexCoord4svARB)(GLenum target, const GLshort * v); /* 407 */
+ void (GLAPIENTRYP AttachShader)(GLuint program, GLuint shader); /* 408 */
+ GLuint (GLAPIENTRYP CreateProgram)(void); /* 409 */
+ GLuint (GLAPIENTRYP CreateShader)(GLenum type); /* 410 */
+ void (GLAPIENTRYP DeleteProgram)(GLuint program); /* 411 */
+ void (GLAPIENTRYP DeleteShader)(GLuint program); /* 412 */
+ void (GLAPIENTRYP DetachShader)(GLuint program, GLuint shader); /* 413 */
+ void (GLAPIENTRYP GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj); /* 414 */
+ void (GLAPIENTRYP GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 415 */
+ void (GLAPIENTRYP GetProgramiv)(GLuint program, GLenum pname, GLint * params); /* 416 */
+ void (GLAPIENTRYP GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 417 */
+ void (GLAPIENTRYP GetShaderiv)(GLuint shader, GLenum pname, GLint * params); /* 418 */
+ GLboolean (GLAPIENTRYP IsProgram)(GLuint program); /* 419 */
+ GLboolean (GLAPIENTRYP IsShader)(GLuint shader); /* 420 */
+ void (GLAPIENTRYP StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); /* 421 */
+ void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 422 */
+ void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass); /* 423 */
+ void (GLAPIENTRYP UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 424 */
+ void (GLAPIENTRYP UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 425 */
+ void (GLAPIENTRYP UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 426 */
+ void (GLAPIENTRYP UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 427 */
+ void (GLAPIENTRYP UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 428 */
+ void (GLAPIENTRYP UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 429 */
+ void (GLAPIENTRYP ClampColor)(GLenum target, GLenum clamp); /* 430 */
+ void (GLAPIENTRYP ClearBufferfi)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil); /* 431 */
+ void (GLAPIENTRYP ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat * value); /* 432 */
+ void (GLAPIENTRYP ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint * value); /* 433 */
+ void (GLAPIENTRYP ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint * value); /* 434 */
+ const GLubyte * (GLAPIENTRYP GetStringi)(GLenum name, GLuint index); /* 435 */
+ void (GLAPIENTRYP TexBuffer)(GLenum target, GLenum internalFormat, GLuint buffer); /* 436 */
+ void (GLAPIENTRYP FramebufferTexture)(GLenum target, GLenum attachment, GLuint texture, GLint level); /* 437 */
+ void (GLAPIENTRYP GetBufferParameteri64v)(GLenum target, GLenum pname, GLint64 * params); /* 438 */
+ void (GLAPIENTRYP GetInteger64i_v)(GLenum cap, GLuint index, GLint64 * data); /* 439 */
+ void (GLAPIENTRYP VertexAttribDivisor)(GLuint index, GLuint divisor); /* 440 */
+ void (GLAPIENTRYP LoadTransposeMatrixdARB)(const GLdouble * m); /* 441 */
+ void (GLAPIENTRYP LoadTransposeMatrixfARB)(const GLfloat * m); /* 442 */
+ void (GLAPIENTRYP MultTransposeMatrixdARB)(const GLdouble * m); /* 443 */
+ void (GLAPIENTRYP MultTransposeMatrixfARB)(const GLfloat * m); /* 444 */
+ void (GLAPIENTRYP SampleCoverageARB)(GLclampf value, GLboolean invert); /* 445 */
+ void (GLAPIENTRYP CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 446 */
+ void (GLAPIENTRYP CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 447 */
+ void (GLAPIENTRYP CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 448 */
+ void (GLAPIENTRYP CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 449 */
+ void (GLAPIENTRYP CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 450 */
+ void (GLAPIENTRYP CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 451 */
+ void (GLAPIENTRYP GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); /* 452 */
+ void (GLAPIENTRYP DisableVertexAttribArrayARB)(GLuint index); /* 453 */
+ void (GLAPIENTRYP EnableVertexAttribArrayARB)(GLuint index); /* 454 */
+ void (GLAPIENTRYP GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 455 */
+ void (GLAPIENTRYP GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 456 */
+ void (GLAPIENTRYP GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 457 */
+ void (GLAPIENTRYP GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 458 */
+ void (GLAPIENTRYP GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string); /* 459 */
+ void (GLAPIENTRYP GetProgramivARB)(GLenum target, GLenum pname, GLint * params); /* 460 */
+ void (GLAPIENTRYP GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params); /* 461 */
+ void (GLAPIENTRYP GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params); /* 462 */
+ void (GLAPIENTRYP GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params); /* 463 */
+ void (GLAPIENTRYP ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 464 */
+ void (GLAPIENTRYP ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 465 */
+ void (GLAPIENTRYP ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 466 */
+ void (GLAPIENTRYP ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 467 */
+ void (GLAPIENTRYP ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 468 */
+ void (GLAPIENTRYP ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 469 */
+ void (GLAPIENTRYP ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 470 */
+ void (GLAPIENTRYP ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 471 */
+ void (GLAPIENTRYP ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string); /* 472 */
+ void (GLAPIENTRYP VertexAttrib1dARB)(GLuint index, GLdouble x); /* 473 */
+ void (GLAPIENTRYP VertexAttrib1dvARB)(GLuint index, const GLdouble * v); /* 474 */
+ void (GLAPIENTRYP VertexAttrib1fARB)(GLuint index, GLfloat x); /* 475 */
+ void (GLAPIENTRYP VertexAttrib1fvARB)(GLuint index, const GLfloat * v); /* 476 */
+ void (GLAPIENTRYP VertexAttrib1sARB)(GLuint index, GLshort x); /* 477 */
+ void (GLAPIENTRYP VertexAttrib1svARB)(GLuint index, const GLshort * v); /* 478 */
+ void (GLAPIENTRYP VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y); /* 479 */
+ void (GLAPIENTRYP VertexAttrib2dvARB)(GLuint index, const GLdouble * v); /* 480 */
+ void (GLAPIENTRYP VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y); /* 481 */
+ void (GLAPIENTRYP VertexAttrib2fvARB)(GLuint index, const GLfloat * v); /* 482 */
+ void (GLAPIENTRYP VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y); /* 483 */
+ void (GLAPIENTRYP VertexAttrib2svARB)(GLuint index, const GLshort * v); /* 484 */
+ void (GLAPIENTRYP VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 485 */
+ void (GLAPIENTRYP VertexAttrib3dvARB)(GLuint index, const GLdouble * v); /* 486 */
+ void (GLAPIENTRYP VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 487 */
+ void (GLAPIENTRYP VertexAttrib3fvARB)(GLuint index, const GLfloat * v); /* 488 */
+ void (GLAPIENTRYP VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z); /* 489 */
+ void (GLAPIENTRYP VertexAttrib3svARB)(GLuint index, const GLshort * v); /* 490 */
+ void (GLAPIENTRYP VertexAttrib4NbvARB)(GLuint index, const GLbyte * v); /* 491 */
+ void (GLAPIENTRYP VertexAttrib4NivARB)(GLuint index, const GLint * v); /* 492 */
+ void (GLAPIENTRYP VertexAttrib4NsvARB)(GLuint index, const GLshort * v); /* 493 */
+ void (GLAPIENTRYP VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 494 */
+ void (GLAPIENTRYP VertexAttrib4NubvARB)(GLuint index, const GLubyte * v); /* 495 */
+ void (GLAPIENTRYP VertexAttrib4NuivARB)(GLuint index, const GLuint * v); /* 496 */
+ void (GLAPIENTRYP VertexAttrib4NusvARB)(GLuint index, const GLushort * v); /* 497 */
+ void (GLAPIENTRYP VertexAttrib4bvARB)(GLuint index, const GLbyte * v); /* 498 */
+ void (GLAPIENTRYP VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 499 */
+ void (GLAPIENTRYP VertexAttrib4dvARB)(GLuint index, const GLdouble * v); /* 500 */
+ void (GLAPIENTRYP VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 501 */
+ void (GLAPIENTRYP VertexAttrib4fvARB)(GLuint index, const GLfloat * v); /* 502 */
+ void (GLAPIENTRYP VertexAttrib4ivARB)(GLuint index, const GLint * v); /* 503 */
+ void (GLAPIENTRYP VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 504 */
+ void (GLAPIENTRYP VertexAttrib4svARB)(GLuint index, const GLshort * v); /* 505 */
+ void (GLAPIENTRYP VertexAttrib4ubvARB)(GLuint index, const GLubyte * v); /* 506 */
+ void (GLAPIENTRYP VertexAttrib4uivARB)(GLuint index, const GLuint * v); /* 507 */
+ void (GLAPIENTRYP VertexAttrib4usvARB)(GLuint index, const GLushort * v); /* 508 */
+ void (GLAPIENTRYP VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); /* 509 */
+ void (GLAPIENTRYP BindBufferARB)(GLenum target, GLuint buffer); /* 510 */
+ void (GLAPIENTRYP BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); /* 511 */
+ void (GLAPIENTRYP BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); /* 512 */
+ void (GLAPIENTRYP DeleteBuffersARB)(GLsizei n, const GLuint * buffer); /* 513 */
+ void (GLAPIENTRYP GenBuffersARB)(GLsizei n, GLuint * buffer); /* 514 */
+ void (GLAPIENTRYP GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params); /* 515 */
+ void (GLAPIENTRYP GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 516 */
+ void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); /* 517 */
+ GLboolean (GLAPIENTRYP IsBufferARB)(GLuint buffer); /* 518 */
+ GLvoid * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 519 */
+ GLboolean (GLAPIENTRYP UnmapBufferARB)(GLenum target); /* 520 */
+ void (GLAPIENTRYP BeginQueryARB)(GLenum target, GLuint id); /* 521 */
+ void (GLAPIENTRYP DeleteQueriesARB)(GLsizei n, const GLuint * ids); /* 522 */
+ void (GLAPIENTRYP EndQueryARB)(GLenum target); /* 523 */
+ void (GLAPIENTRYP GenQueriesARB)(GLsizei n, GLuint * ids); /* 524 */
+ void (GLAPIENTRYP GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 525 */
+ void (GLAPIENTRYP GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 526 */
+ void (GLAPIENTRYP GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 527 */
+ GLboolean (GLAPIENTRYP IsQueryARB)(GLuint id); /* 528 */
+ void (GLAPIENTRYP AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj); /* 529 */
+ void (GLAPIENTRYP CompileShaderARB)(GLhandleARB shader); /* 530 */
+ GLhandleARB (GLAPIENTRYP CreateProgramObjectARB)(void); /* 531 */
+ GLhandleARB (GLAPIENTRYP CreateShaderObjectARB)(GLenum shaderType); /* 532 */
+ void (GLAPIENTRYP DeleteObjectARB)(GLhandleARB obj); /* 533 */
+ void (GLAPIENTRYP DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj); /* 534 */
+ void (GLAPIENTRYP GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 535 */
+ void (GLAPIENTRYP GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog); /* 536 */
+ GLhandleARB (GLAPIENTRYP GetHandleARB)(GLenum pname); /* 537 */
+ void (GLAPIENTRYP GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); /* 538 */
+ void (GLAPIENTRYP GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params); /* 539 */
+ void (GLAPIENTRYP GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params); /* 540 */
+ void (GLAPIENTRYP GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei * length, GLcharARB * source); /* 541 */
+ GLint (GLAPIENTRYP GetUniformLocationARB)(GLhandleARB program, const GLcharARB * name); /* 542 */
+ void (GLAPIENTRYP GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat * params); /* 543 */
+ void (GLAPIENTRYP GetUniformivARB)(GLhandleARB program, GLint location, GLint * params); /* 544 */
+ void (GLAPIENTRYP LinkProgramARB)(GLhandleARB program); /* 545 */
+ void (GLAPIENTRYP ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint * length); /* 546 */
+ void (GLAPIENTRYP Uniform1fARB)(GLint location, GLfloat v0); /* 547 */
+ void (GLAPIENTRYP Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 548 */
+ void (GLAPIENTRYP Uniform1iARB)(GLint location, GLint v0); /* 549 */
+ void (GLAPIENTRYP Uniform1ivARB)(GLint location, GLsizei count, const GLint * value); /* 550 */
+ void (GLAPIENTRYP Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1); /* 551 */
+ void (GLAPIENTRYP Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 552 */
+ void (GLAPIENTRYP Uniform2iARB)(GLint location, GLint v0, GLint v1); /* 553 */
+ void (GLAPIENTRYP Uniform2ivARB)(GLint location, GLsizei count, const GLint * value); /* 554 */
+ void (GLAPIENTRYP Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); /* 555 */
+ void (GLAPIENTRYP Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 556 */
+ void (GLAPIENTRYP Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2); /* 557 */
+ void (GLAPIENTRYP Uniform3ivARB)(GLint location, GLsizei count, const GLint * value); /* 558 */
+ void (GLAPIENTRYP Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); /* 559 */
+ void (GLAPIENTRYP Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 560 */
+ void (GLAPIENTRYP Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); /* 561 */
+ void (GLAPIENTRYP Uniform4ivARB)(GLint location, GLsizei count, const GLint * value); /* 562 */
+ void (GLAPIENTRYP UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 563 */
+ void (GLAPIENTRYP UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 564 */
+ void (GLAPIENTRYP UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 565 */
+ void (GLAPIENTRYP UseProgramObjectARB)(GLhandleARB program); /* 566 */
+ void (GLAPIENTRYP ValidateProgramARB)(GLhandleARB program); /* 567 */
+ void (GLAPIENTRYP BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB * name); /* 568 */
+ void (GLAPIENTRYP GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 569 */
+ GLint (GLAPIENTRYP GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name); /* 570 */
+ void (GLAPIENTRYP DrawBuffersARB)(GLsizei n, const GLenum * bufs); /* 571 */
+ void (GLAPIENTRYP DrawArraysInstancedARB)(GLenum mode, GLint first, GLsizei count, GLsizei primcount); /* 572 */
+ void (GLAPIENTRYP DrawElementsInstancedARB)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount); /* 573 */
+ void (GLAPIENTRYP RenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); /* 574 */
+ void (GLAPIENTRYP FramebufferTextureARB)(GLenum target, GLenum attachment, GLuint texture, GLint level); /* 575 */
+ void (GLAPIENTRYP FramebufferTextureFaceARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); /* 576 */
+ void (GLAPIENTRYP ProgramParameteriARB)(GLuint program, GLenum pname, GLint value); /* 577 */
+ void (GLAPIENTRYP VertexAttribDivisorARB)(GLuint index, GLuint divisor); /* 578 */
+ void (GLAPIENTRYP FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length); /* 579 */
+ GLvoid * (GLAPIENTRYP MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); /* 580 */
+ void (GLAPIENTRYP BindVertexArray)(GLuint array); /* 581 */
+ void (GLAPIENTRYP GenVertexArrays)(GLsizei n, GLuint * arrays); /* 582 */
+ void (GLAPIENTRYP CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); /* 583 */
+ GLenum (GLAPIENTRYP ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout); /* 584 */
+ void (GLAPIENTRYP DeleteSync)(GLsync sync); /* 585 */
+ GLsync (GLAPIENTRYP FenceSync)(GLenum condition, GLbitfield flags); /* 586 */
+ void (GLAPIENTRYP GetInteger64v)(GLenum pname, GLint64 * params); /* 587 */
+ void (GLAPIENTRYP GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values); /* 588 */
+ GLboolean (GLAPIENTRYP IsSync)(GLsync sync); /* 589 */
+ void (GLAPIENTRYP WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout); /* 590 */
+ void (GLAPIENTRYP DrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex); /* 591 */
+ void (GLAPIENTRYP DrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex); /* 592 */
+ void (GLAPIENTRYP MultiDrawElementsBaseVertex)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount, const GLint * basevertex); /* 593 */
+ void (GLAPIENTRYP BlendEquationSeparateiARB)(GLuint buf, GLenum modeRGB, GLenum modeA); /* 594 */
+ void (GLAPIENTRYP BlendEquationiARB)(GLuint buf, GLenum mode); /* 595 */
+ void (GLAPIENTRYP BlendFuncSeparateiARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA); /* 596 */
+ void (GLAPIENTRYP BlendFunciARB)(GLuint buf, GLenum src, GLenum dst); /* 597 */
+ void (GLAPIENTRYP BindTransformFeedback)(GLenum target, GLuint id); /* 598 */
+ void (GLAPIENTRYP DeleteTransformFeedbacks)(GLsizei n, const GLuint * ids); /* 599 */
+ void (GLAPIENTRYP DrawTransformFeedback)(GLenum mode, GLuint id); /* 600 */
+ void (GLAPIENTRYP GenTransformFeedbacks)(GLsizei n, GLuint * ids); /* 601 */
+ GLboolean (GLAPIENTRYP IsTransformFeedback)(GLuint id); /* 602 */
+ void (GLAPIENTRYP PauseTransformFeedback)(void); /* 603 */
+ void (GLAPIENTRYP ResumeTransformFeedback)(void); /* 604 */
+ void (GLAPIENTRYP ClearDepthf)(GLclampf depth); /* 605 */
+ void (GLAPIENTRYP DepthRangef)(GLclampf zNear, GLclampf zFar); /* 606 */
+ void (GLAPIENTRYP GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision); /* 607 */
+ void (GLAPIENTRYP ReleaseShaderCompiler)(void); /* 608 */
+ void (GLAPIENTRYP ShaderBinary)(GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length); /* 609 */
+ void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 610 */
+ void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 611 */
+ void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 612 */
+ void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 613 */
+ void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 614 */
+ void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 615 */
+ void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 616 */
+ void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 617 */
+ void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 618 */
+ void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 619 */
+ void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 620 */
+ void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 621 */
+ void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 622 */
+ void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 623 */
+ void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 624 */
+ void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 625 */
+ void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 626 */
+ void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 627 */
+ void (GLAPIENTRYP UnlockArraysEXT)(void); /* 628 */
+ void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 629 */
+ void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 630 */
+ void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 631 */
+ void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 632 */
+ void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 633 */
+ void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 634 */
+ void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 635 */
+ void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 636 */
+ void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 637 */
+ void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 638 */
+ void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 639 */
+ void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 640 */
+ void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 641 */
+ void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 642 */
+ void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 643 */
+ void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 644 */
+ void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 645 */
+ void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount); /* 646 */
+ void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 647 */
+ void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 648 */
+ void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 649 */
+ void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 650 */
+ void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 651 */
+ void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 652 */
+ void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 653 */
+ void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 654 */
+ void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 655 */
+ void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 656 */
+ void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 657 */
+ void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 658 */
+ void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 659 */
+ void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 660 */
+ void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 661 */
+ void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 662 */
+ void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 663 */
+ void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 664 */
+ void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 665 */
+ void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 666 */
+ void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 667 */
+ void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 668 */
+ void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 669 */
+ void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 670 */
+ void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 671 */
+ void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 672 */
+ void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 673 */
+ void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 674 */
+ void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 675 */
+ void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 676 */
+ void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 677 */
+ void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 678 */
+ void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 679 */
+ void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 680 */
+ void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 681 */
+ void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 682 */
+ void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 683 */
+ void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 684 */
+ void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 685 */
+ void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 686 */
+ void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 687 */
+ void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 688 */
+ void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 689 */
+ void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 690 */
+ void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 691 */
+ void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 692 */
+ void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 693 */
+ void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 694 */
+ void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 695 */
+ void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 696 */
+ void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 697 */
+ void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 698 */
+ void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 699 */
+ void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 700 */
+ GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 701 */
+ void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 702 */
+ GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 703 */
+ GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 704 */
+ void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 705 */
+ void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 706 */
+ void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 707 */
+ void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 708 */
+ void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 709 */
+ void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 710 */
+ void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 711 */
+ void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 712 */
+ void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 713 */
+ void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); /* 714 */
+ void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 715 */
+ void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 716 */
+ void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 717 */
+ GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 718 */
+ void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 719 */
+ void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLsizei num, const GLdouble * params); /* 720 */
+ void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLsizei num, const GLfloat * params); /* 721 */
+ void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 722 */
+ void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 723 */
+ void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 724 */
+ void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 725 */
+ void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 726 */
+ void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 727 */
+ void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 728 */
+ void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 729 */
+ void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 730 */
+ void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 731 */
+ void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 732 */
+ void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 733 */
+ void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 734 */
+ void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 735 */
+ void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 736 */
+ void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 737 */
+ void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 738 */
+ void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 739 */
+ void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 740 */
+ void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 741 */
+ void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 742 */
+ void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 743 */
+ void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 744 */
+ void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 745 */
+ void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 746 */
+ void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 747 */
+ void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 748 */
+ void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 749 */
+ void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 750 */
+ void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 751 */
+ void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 752 */
+ void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 753 */
+ void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 754 */
+ void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 755 */
+ void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 756 */
+ void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 757 */
+ void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 758 */
+ void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 759 */
+ void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 760 */
+ void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 761 */
+ void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 762 */
+ void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 763 */
+ void (GLAPIENTRYP GetTexBumpParameterfvATI)(GLenum pname, GLfloat * param); /* 764 */
+ void (GLAPIENTRYP GetTexBumpParameterivATI)(GLenum pname, GLint * param); /* 765 */
+ void (GLAPIENTRYP TexBumpParameterfvATI)(GLenum pname, const GLfloat * param); /* 766 */
+ void (GLAPIENTRYP TexBumpParameterivATI)(GLenum pname, const GLint * param); /* 767 */
+ void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 768 */
+ void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 769 */
+ void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 770 */
+ void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 771 */
+ void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 772 */
+ void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 773 */
+ void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 774 */
+ void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 775 */
+ void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 776 */
+ void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 777 */
+ GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 778 */
+ void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 779 */
+ void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 780 */
+ void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 781 */
+ void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 782 */
+ void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 783 */
+ void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 784 */
+ void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 785 */
+ void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 786 */
+ void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 787 */
+ GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 788 */
+ void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 789 */
+ void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 790 */
+ void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 791 */
+ void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 792 */
+ void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 793 */
+ void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 794 */
+ void (GLAPIENTRYP PrimitiveRestartIndexNV)(GLuint index); /* 795 */
+ void (GLAPIENTRYP PrimitiveRestartNV)(void); /* 796 */
+ void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 797 */
+ void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 798 */
+ void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 799 */
+ void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 800 */
+ GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 801 */
+ void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 802 */
+ void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 803 */
+ void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 804 */
+ void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 805 */
+ void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 806 */
+ void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 807 */
+ void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 808 */
+ void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 809 */
+ void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 810 */
+ void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 811 */
+ void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 812 */
+ GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 813 */
+ GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 814 */
+ void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 815 */
+ void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 816 */
+ void (GLAPIENTRYP BufferParameteriAPPLE)(GLenum target, GLenum pname, GLint param); /* 817 */
+ void (GLAPIENTRYP FlushMappedBufferRangeAPPLE)(GLenum target, GLintptr offset, GLsizeiptr size); /* 818 */
+ void (GLAPIENTRYP BindFragDataLocationEXT)(GLuint program, GLuint colorNumber, const GLchar * name); /* 819 */
+ GLint (GLAPIENTRYP GetFragDataLocationEXT)(GLuint program, const GLchar * name); /* 820 */
+ void (GLAPIENTRYP GetUniformuivEXT)(GLuint program, GLint location, GLuint * params); /* 821 */
+ void (GLAPIENTRYP GetVertexAttribIivEXT)(GLuint index, GLenum pname, GLint * params); /* 822 */
+ void (GLAPIENTRYP GetVertexAttribIuivEXT)(GLuint index, GLenum pname, GLuint * params); /* 823 */
+ void (GLAPIENTRYP Uniform1uiEXT)(GLint location, GLuint x); /* 824 */
+ void (GLAPIENTRYP Uniform1uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 825 */
+ void (GLAPIENTRYP Uniform2uiEXT)(GLint location, GLuint x, GLuint y); /* 826 */
+ void (GLAPIENTRYP Uniform2uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 827 */
+ void (GLAPIENTRYP Uniform3uiEXT)(GLint location, GLuint x, GLuint y, GLuint z); /* 828 */
+ void (GLAPIENTRYP Uniform3uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 829 */
+ void (GLAPIENTRYP Uniform4uiEXT)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w); /* 830 */
+ void (GLAPIENTRYP Uniform4uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 831 */
+ void (GLAPIENTRYP VertexAttribI1iEXT)(GLuint index, GLint x); /* 832 */
+ void (GLAPIENTRYP VertexAttribI1ivEXT)(GLuint index, const GLint * v); /* 833 */
+ void (GLAPIENTRYP VertexAttribI1uiEXT)(GLuint index, GLuint x); /* 834 */
+ void (GLAPIENTRYP VertexAttribI1uivEXT)(GLuint index, const GLuint * v); /* 835 */
+ void (GLAPIENTRYP VertexAttribI2iEXT)(GLuint index, GLint x, GLint y); /* 836 */
+ void (GLAPIENTRYP VertexAttribI2ivEXT)(GLuint index, const GLint * v); /* 837 */
+ void (GLAPIENTRYP VertexAttribI2uiEXT)(GLuint index, GLuint x, GLuint y); /* 838 */
+ void (GLAPIENTRYP VertexAttribI2uivEXT)(GLuint index, const GLuint * v); /* 839 */
+ void (GLAPIENTRYP VertexAttribI3iEXT)(GLuint index, GLint x, GLint y, GLint z); /* 840 */
+ void (GLAPIENTRYP VertexAttribI3ivEXT)(GLuint index, const GLint * v); /* 841 */
+ void (GLAPIENTRYP VertexAttribI3uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z); /* 842 */
+ void (GLAPIENTRYP VertexAttribI3uivEXT)(GLuint index, const GLuint * v); /* 843 */
+ void (GLAPIENTRYP VertexAttribI4bvEXT)(GLuint index, const GLbyte * v); /* 844 */
+ void (GLAPIENTRYP VertexAttribI4iEXT)(GLuint index, GLint x, GLint y, GLint z, GLint w); /* 845 */
+ void (GLAPIENTRYP VertexAttribI4ivEXT)(GLuint index, const GLint * v); /* 846 */
+ void (GLAPIENTRYP VertexAttribI4svEXT)(GLuint index, const GLshort * v); /* 847 */
+ void (GLAPIENTRYP VertexAttribI4ubvEXT)(GLuint index, const GLubyte * v); /* 848 */
+ void (GLAPIENTRYP VertexAttribI4uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); /* 849 */
+ void (GLAPIENTRYP VertexAttribI4uivEXT)(GLuint index, const GLuint * v); /* 850 */
+ void (GLAPIENTRYP VertexAttribI4usvEXT)(GLuint index, const GLushort * v); /* 851 */
+ void (GLAPIENTRYP VertexAttribIPointerEXT)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 852 */
+ void (GLAPIENTRYP FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); /* 853 */
+ void (GLAPIENTRYP ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); /* 854 */
+ void (GLAPIENTRYP DisableIndexedEXT)(GLenum target, GLuint index); /* 855 */
+ void (GLAPIENTRYP EnableIndexedEXT)(GLenum target, GLuint index); /* 856 */
+ void (GLAPIENTRYP GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean * data); /* 857 */
+ void (GLAPIENTRYP GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint * data); /* 858 */
+ GLboolean (GLAPIENTRYP IsEnabledIndexedEXT)(GLenum target, GLuint index); /* 859 */
+ void (GLAPIENTRYP ClearColorIiEXT)(GLint r, GLint g, GLint b, GLint a); /* 860 */
+ void (GLAPIENTRYP ClearColorIuiEXT)(GLuint r, GLuint g, GLuint b, GLuint a); /* 861 */
+ void (GLAPIENTRYP GetTexParameterIivEXT)(GLenum target, GLenum pname, GLint * params); /* 862 */
+ void (GLAPIENTRYP GetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint * params); /* 863 */
+ void (GLAPIENTRYP TexParameterIivEXT)(GLenum target, GLenum pname, const GLint * params); /* 864 */
+ void (GLAPIENTRYP TexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint * params); /* 865 */
+ void (GLAPIENTRYP BeginConditionalRenderNV)(GLuint query, GLenum mode); /* 866 */
+ void (GLAPIENTRYP EndConditionalRenderNV)(void); /* 867 */
+ void (GLAPIENTRYP BeginTransformFeedbackEXT)(GLenum mode); /* 868 */
+ void (GLAPIENTRYP BindBufferBaseEXT)(GLenum target, GLuint index, GLuint buffer); /* 869 */
+ void (GLAPIENTRYP BindBufferOffsetEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset); /* 870 */
+ void (GLAPIENTRYP BindBufferRangeEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); /* 871 */
+ void (GLAPIENTRYP EndTransformFeedbackEXT)(void); /* 872 */
+ void (GLAPIENTRYP GetTransformFeedbackVaryingEXT)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); /* 873 */
+ void (GLAPIENTRYP TransformFeedbackVaryingsEXT)(GLuint program, GLsizei count, const char ** varyings, GLenum bufferMode); /* 874 */
+ void (GLAPIENTRYP ProvokingVertexEXT)(GLenum mode); /* 875 */
+ void (GLAPIENTRYP GetTexParameterPointervAPPLE)(GLenum target, GLenum pname, GLvoid ** params); /* 876 */
+ void (GLAPIENTRYP TextureRangeAPPLE)(GLenum target, GLsizei length, GLvoid * pointer); /* 877 */
+ void (GLAPIENTRYP GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value); /* 878 */
+ GLenum (GLAPIENTRYP ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 879 */
+ GLenum (GLAPIENTRYP ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 880 */
+ void (GLAPIENTRYP ActiveProgramEXT)(GLuint program); /* 881 */
+ GLuint (GLAPIENTRYP CreateShaderProgramEXT)(GLenum type, const GLchar * string); /* 882 */
+ void (GLAPIENTRYP UseShaderProgramEXT)(GLenum type, GLuint program); /* 883 */
+ void (GLAPIENTRYP TextureBarrierNV)(void); /* 884 */
+ void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 885 */
+ void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 886 */
+ void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 887 */
+ void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 888 */
+ void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 889 */
+ void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 890 */
+ void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 891 */
+};
+
+#endif /* !defined( _GLAPI_TABLE_H_ ) */
diff --git a/xorg-server/glx/glapitemp.h b/xorg-server/glx/glapitemp.h
index a98401c6d..4101a63d3 100644
--- a/xorg-server/glx/glapitemp.h
+++ b/xorg-server/glx/glapitemp.h
@@ -27,7 +27,7 @@
*/
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define HIDDEN __attribute__((visibility("hidden")))
# else
# define HIDDEN
@@ -80,6 +80,8 @@
#endif
+#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
+
KEYWORD1 void KEYWORD2 NAME(NewList)(GLuint list, GLenum mode)
{
DISPATCH(NewList, (list, mode), (F, "glNewList(%d, 0x%x);\n", list, mode));
@@ -1710,13 +1712,6 @@ KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResident)(GLsizei n, const GLuint *
RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResident(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences)
-{
- RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
{
DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border));
@@ -1762,25 +1757,11 @@ KEYWORD1 void KEYWORD2 NAME(DeleteTextures)(GLsizei n, const GLuint * textures)
DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTextures(%d, %p);\n", n, (const void *) textures));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures)
-{
- DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GenTextures)(GLsizei n, GLuint * textures)
{
DISPATCH(GenTextures, (n, textures), (F, "glGenTextures(%d, %p);\n", n, (const void *) textures));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures)
-{
- DISPATCH(GenTextures, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetPointerv)(GLenum pname, GLvoid ** params)
{
DISPATCH(GetPointerv, (pname, params), (F, "glGetPointerv(0x%x, %p);\n", pname, (const void *) params));
@@ -1796,13 +1777,6 @@ KEYWORD1 GLboolean KEYWORD2 NAME(IsTexture)(GLuint texture)
RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTexture(%d);\n", texture));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture)
-{
- RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTextureEXT(%d);\n", texture));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities)
{
DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTextures(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities));
@@ -1878,6 +1852,11 @@ KEYWORD1 void KEYWORD2 NAME(ColorTable)(GLenum target, GLenum internalformat, GL
DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTable(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table));
}
+KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
+{
+ DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table));
+}
+
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
@@ -1885,11 +1864,6 @@ KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum intern
DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableSGI(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table));
}
-KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
-{
- DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table));
-}
-
KEYWORD1 void KEYWORD2 NAME(ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params)
{
DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
@@ -1931,64 +1905,16 @@ KEYWORD1 void KEYWORD2 NAME(GetColorTable)(GLenum target, GLenum format, GLenum
DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTable(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table)
-{
- DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * table)
-{
- DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params)
{
DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params)
{
DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data)
{
DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTable(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data));
@@ -2114,57 +2040,21 @@ KEYWORD1 void KEYWORD2 NAME(GetConvolutionFilter)(GLenum target, GLenum format,
DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilter(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image)
-{
- DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params)
{
DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params)
{
DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span)
{
DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilter(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span)
-{
- DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column)
{
DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column));
@@ -2182,85 +2072,31 @@ KEYWORD1 void KEYWORD2 NAME(GetHistogram)(GLenum target, GLboolean reset, GLenum
DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogram(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
-{
- DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params)
{
DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params)
{
DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
{
DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmax(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
-{
- DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params)
{
DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params)
{
DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
{
DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogram(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink));
@@ -2796,6 +2632,61 @@ KEYWORD1 void KEYWORD2 NAME(UniformMatrix4x3fv)(GLint location, GLsizei count, G
DISPATCH(UniformMatrix4x3fv, (location, count, transpose, value), (F, "glUniformMatrix4x3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value));
}
+KEYWORD1 void KEYWORD2 NAME(ClampColor)(GLenum target, GLenum clamp)
+{
+ DISPATCH(ClampColor, (target, clamp), (F, "glClampColor(0x%x, 0x%x);\n", target, clamp));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ClearBufferfi)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil)
+{
+ DISPATCH(ClearBufferfi, (buffer, drawbuffer, depth, stencil), (F, "glClearBufferfi(0x%x, %d, %f, %d);\n", buffer, drawbuffer, depth, stencil));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat * value)
+{
+ DISPATCH(ClearBufferfv, (buffer, drawbuffer, value), (F, "glClearBufferfv(0x%x, %d, %p);\n", buffer, drawbuffer, (const void *) value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint * value)
+{
+ DISPATCH(ClearBufferiv, (buffer, drawbuffer, value), (F, "glClearBufferiv(0x%x, %d, %p);\n", buffer, drawbuffer, (const void *) value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint * value)
+{
+ DISPATCH(ClearBufferuiv, (buffer, drawbuffer, value), (F, "glClearBufferuiv(0x%x, %d, %p);\n", buffer, drawbuffer, (const void *) value));
+}
+
+KEYWORD1 const GLubyte * KEYWORD2 NAME(GetStringi)(GLenum name, GLuint index)
+{
+ RETURN_DISPATCH(GetStringi, (name, index), (F, "glGetStringi(0x%x, %d);\n", name, index));
+}
+
+KEYWORD1 void KEYWORD2 NAME(TexBuffer)(GLenum target, GLenum internalFormat, GLuint buffer)
+{
+ DISPATCH(TexBuffer, (target, internalFormat, buffer), (F, "glTexBuffer(0x%x, 0x%x, %d);\n", target, internalFormat, buffer));
+}
+
+KEYWORD1 void KEYWORD2 NAME(FramebufferTexture)(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ DISPATCH(FramebufferTexture, (target, attachment, texture, level), (F, "glFramebufferTexture(0x%x, 0x%x, %d, %d);\n", target, attachment, texture, level));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetBufferParameteri64v)(GLenum target, GLenum pname, GLint64 * params)
+{
+ DISPATCH(GetBufferParameteri64v, (target, pname, params), (F, "glGetBufferParameteri64v(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetInteger64i_v)(GLenum cap, GLuint index, GLint64 * data)
+{
+ DISPATCH(GetInteger64i_v, (cap, index, data), (F, "glGetInteger64i_v(0x%x, %d, %p);\n", cap, index, (const void *) data));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribDivisor)(GLuint index, GLuint divisor)
+{
+ DISPATCH(VertexAttribDivisor, (index, divisor), (F, "glVertexAttribDivisor(%d, %d);\n", index, divisor));
+}
+
KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixd)(const GLdouble * m)
{
DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixd(%p);\n", (const void *) m));
@@ -4006,63 +3897,278 @@ KEYWORD1 void KEYWORD2 NAME(DrawBuffersATI)(GLsizei n, const GLenum * bufs)
DISPATCH(DrawBuffersARB, (n, bufs), (F, "glDrawBuffersATI(%d, %p);\n", n, (const void *) bufs));
}
+KEYWORD1 void KEYWORD2 NAME(DrawArraysInstancedARB)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+{
+ DISPATCH(DrawArraysInstancedARB, (mode, first, count, primcount), (F, "glDrawArraysInstancedARB(0x%x, %d, %d, %d);\n", mode, first, count, primcount));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DrawArraysInstancedEXT)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+{
+ DISPATCH(DrawArraysInstancedARB, (mode, first, count, primcount), (F, "glDrawArraysInstancedEXT(0x%x, %d, %d, %d);\n", mode, first, count, primcount));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+{
+ DISPATCH(DrawArraysInstancedARB, (mode, first, count, primcount), (F, "glDrawArraysInstanced(0x%x, %d, %d, %d);\n", mode, first, count, primcount));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DrawElementsInstancedARB)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount)
+{
+ DISPATCH(DrawElementsInstancedARB, (mode, count, type, indices, primcount), (F, "glDrawElementsInstancedARB(0x%x, %d, 0x%x, %p, %d);\n", mode, count, type, (const void *) indices, primcount));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DrawElementsInstancedEXT)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount)
+{
+ DISPATCH(DrawElementsInstancedARB, (mode, count, type, indices, primcount), (F, "glDrawElementsInstancedEXT(0x%x, %d, 0x%x, %p, %d);\n", mode, count, type, (const void *) indices, primcount));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount)
+{
+ DISPATCH(DrawElementsInstancedARB, (mode, count, type, indices, primcount), (F, "glDrawElementsInstanced(0x%x, %d, 0x%x, %p, %d);\n", mode, count, type, (const void *) indices, primcount));
+}
+
+KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ DISPATCH(RenderbufferStorageMultisample, (target, samples, internalformat, width, height), (F, "glRenderbufferStorageMultisample(0x%x, %d, 0x%x, %d, %d);\n", target, samples, internalformat, width, height));
+}
+
+KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ DISPATCH(RenderbufferStorageMultisample, (target, samples, internalformat, width, height), (F, "glRenderbufferStorageMultisampleEXT(0x%x, %d, 0x%x, %d, %d);\n", target, samples, internalformat, width, height));
+}
+
+KEYWORD1 void KEYWORD2 NAME(FramebufferTextureARB)(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ DISPATCH(FramebufferTextureARB, (target, attachment, texture, level), (F, "glFramebufferTextureARB(0x%x, 0x%x, %d, %d);\n", target, attachment, texture, level));
+}
+
+KEYWORD1 void KEYWORD2 NAME(FramebufferTextureFaceARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face)
+{
+ DISPATCH(FramebufferTextureFaceARB, (target, attachment, texture, level, face), (F, "glFramebufferTextureFaceARB(0x%x, 0x%x, %d, %d, 0x%x);\n", target, attachment, texture, level, face));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ProgramParameteriARB)(GLuint program, GLenum pname, GLint value)
+{
+ DISPATCH(ProgramParameteriARB, (program, pname, value), (F, "glProgramParameteriARB(%d, 0x%x, %d);\n", program, pname, value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribDivisorARB)(GLuint index, GLuint divisor)
+{
+ DISPATCH(VertexAttribDivisorARB, (index, divisor), (F, "glVertexAttribDivisorARB(%d, %d);\n", index, divisor));
+}
+
+KEYWORD1 void KEYWORD2 NAME(FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length)
+{
+ DISPATCH(FlushMappedBufferRange, (target, offset, length), (F, "glFlushMappedBufferRange(0x%x, %d, %d);\n", target, offset, length));
+}
+
+KEYWORD1 GLvoid * KEYWORD2 NAME(MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+{
+ RETURN_DISPATCH(MapBufferRange, (target, offset, length, access), (F, "glMapBufferRange(0x%x, %d, %d, %d);\n", target, offset, length, access));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BindVertexArray)(GLuint array)
+{
+ DISPATCH(BindVertexArray, (array), (F, "glBindVertexArray(%d);\n", array));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GenVertexArrays)(GLsizei n, GLuint * arrays)
+{
+ DISPATCH(GenVertexArrays, (n, arrays), (F, "glGenVertexArrays(%d, %p);\n", n, (const void *) arrays));
+}
+
+KEYWORD1 void KEYWORD2 NAME(CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+{
+ DISPATCH(CopyBufferSubData, (readTarget, writeTarget, readOffset, writeOffset, size), (F, "glCopyBufferSubData(0x%x, 0x%x, %d, %d, %d);\n", readTarget, writeTarget, readOffset, writeOffset, size));
+}
+
+KEYWORD1 GLenum KEYWORD2 NAME(ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ RETURN_DISPATCH(ClientWaitSync, (sync, flags, timeout), (F, "glClientWaitSync(%d, %d, %d);\n", sync, flags, timeout));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DeleteSync)(GLsync sync)
+{
+ DISPATCH(DeleteSync, (sync), (F, "glDeleteSync(%d);\n", sync));
+}
+
+KEYWORD1 GLsync KEYWORD2 NAME(FenceSync)(GLenum condition, GLbitfield flags)
+{
+ RETURN_DISPATCH(FenceSync, (condition, flags), (F, "glFenceSync(0x%x, %d);\n", condition, flags));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetInteger64v)(GLenum pname, GLint64 * params)
+{
+ DISPATCH(GetInteger64v, (pname, params), (F, "glGetInteger64v(0x%x, %p);\n", pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values)
+{
+ DISPATCH(GetSynciv, (sync, pname, bufSize, length, values), (F, "glGetSynciv(%d, 0x%x, %d, %p, %p);\n", sync, pname, bufSize, (const void *) length, (const void *) values));
+}
+
+KEYWORD1 GLboolean KEYWORD2 NAME(IsSync)(GLsync sync)
+{
+ RETURN_DISPATCH(IsSync, (sync), (F, "glIsSync(%d);\n", sync));
+}
+
+KEYWORD1 void KEYWORD2 NAME(WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ DISPATCH(WaitSync, (sync, flags, timeout), (F, "glWaitSync(%d, %d, %d);\n", sync, flags, timeout));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex)
+{
+ DISPATCH(DrawElementsBaseVertex, (mode, count, type, indices, basevertex), (F, "glDrawElementsBaseVertex(0x%x, %d, 0x%x, %p, %d);\n", mode, count, type, (const void *) indices, basevertex));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex)
+{
+ DISPATCH(DrawRangeElementsBaseVertex, (mode, start, end, count, type, indices, basevertex), (F, "glDrawRangeElementsBaseVertex(0x%x, %d, %d, %d, 0x%x, %p, %d);\n", mode, start, end, count, type, (const void *) indices, basevertex));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsBaseVertex)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount, const GLint * basevertex)
+{
+ DISPATCH(MultiDrawElementsBaseVertex, (mode, count, type, indices, primcount, basevertex), (F, "glMultiDrawElementsBaseVertex(0x%x, %p, 0x%x, %p, %d, %p);\n", mode, (const void *) count, type, (const void *) indices, primcount, (const void *) basevertex));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparateiARB)(GLuint buf, GLenum modeRGB, GLenum modeA)
+{
+ DISPATCH(BlendEquationSeparateiARB, (buf, modeRGB, modeA), (F, "glBlendEquationSeparateiARB(%d, 0x%x, 0x%x);\n", buf, modeRGB, modeA));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BlendEquationiARB)(GLuint buf, GLenum mode)
+{
+ DISPATCH(BlendEquationiARB, (buf, mode), (F, "glBlendEquationiARB(%d, 0x%x);\n", buf, mode));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateiARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA)
+{
+ DISPATCH(BlendFuncSeparateiARB, (buf, srcRGB, dstRGB, srcA, dstA), (F, "glBlendFuncSeparateiARB(%d, 0x%x, 0x%x, 0x%x, 0x%x);\n", buf, srcRGB, dstRGB, srcA, dstA));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BlendFunciARB)(GLuint buf, GLenum src, GLenum dst)
+{
+ DISPATCH(BlendFunciARB, (buf, src, dst), (F, "glBlendFunciARB(%d, 0x%x, 0x%x);\n", buf, src, dst));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BindTransformFeedback)(GLenum target, GLuint id)
+{
+ DISPATCH(BindTransformFeedback, (target, id), (F, "glBindTransformFeedback(0x%x, %d);\n", target, id));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DeleteTransformFeedbacks)(GLsizei n, const GLuint * ids)
+{
+ DISPATCH(DeleteTransformFeedbacks, (n, ids), (F, "glDeleteTransformFeedbacks(%d, %p);\n", n, (const void *) ids));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DrawTransformFeedback)(GLenum mode, GLuint id)
+{
+ DISPATCH(DrawTransformFeedback, (mode, id), (F, "glDrawTransformFeedback(0x%x, %d);\n", mode, id));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GenTransformFeedbacks)(GLsizei n, GLuint * ids)
+{
+ DISPATCH(GenTransformFeedbacks, (n, ids), (F, "glGenTransformFeedbacks(%d, %p);\n", n, (const void *) ids));
+}
+
+KEYWORD1 GLboolean KEYWORD2 NAME(IsTransformFeedback)(GLuint id)
+{
+ RETURN_DISPATCH(IsTransformFeedback, (id), (F, "glIsTransformFeedback(%d);\n", id));
+}
+
+KEYWORD1 void KEYWORD2 NAME(PauseTransformFeedback)(void)
+{
+ DISPATCH(PauseTransformFeedback, (), (F, "glPauseTransformFeedback();\n"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ResumeTransformFeedback)(void)
+{
+ DISPATCH(ResumeTransformFeedback, (), (F, "glResumeTransformFeedback();\n"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ClearDepthf)(GLclampf depth)
+{
+ DISPATCH(ClearDepthf, (depth), (F, "glClearDepthf(%f);\n", depth));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DepthRangef)(GLclampf zNear, GLclampf zFar)
+{
+ DISPATCH(DepthRangef, (zNear, zFar), (F, "glDepthRangef(%f, %f);\n", zNear, zFar));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision)
+{
+ DISPATCH(GetShaderPrecisionFormat, (shadertype, precisiontype, range, precision), (F, "glGetShaderPrecisionFormat(0x%x, 0x%x, %p, %p);\n", shadertype, precisiontype, (const void *) range, (const void *) precision));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ReleaseShaderCompiler)(void)
+{
+ DISPATCH(ReleaseShaderCompiler, (), (F, "glReleaseShaderCompiler();\n"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ShaderBinary)(GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length)
+{
+ DISPATCH(ShaderBinary, (n, shaders, binaryformat, binary, length), (F, "glShaderBinary(%d, %p, 0x%x, %p, %d);\n", n, (const void *) shaders, binaryformat, (const void *) binary, length));
+}
+
KEYWORD1 void KEYWORD2 NAME(PolygonOffsetEXT)(GLfloat factor, GLfloat bias)
{
DISPATCH(PolygonOffsetEXT, (factor, bias), (F, "glPolygonOffsetEXT(%f, %f);\n", factor, bias));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLenum pname, GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_611)(GLenum pname, GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLenum pname, GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_611)(GLenum pname, GLfloat * params)
{
DISPATCH(GetPixelTexGenParameterfvSGIS, (pname, params), (F, "glGetPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pname, GLint * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_612)(GLenum pname, GLint * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pname, GLint * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_612)(GLenum pname, GLint * params)
{
DISPATCH(GetPixelTexGenParameterivSGIS, (pname, params), (F, "glGetPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_564)(GLenum pname, GLfloat param);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_613)(GLenum pname, GLfloat param);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_564)(GLenum pname, GLfloat param)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_613)(GLenum pname, GLfloat param)
{
DISPATCH(PixelTexGenParameterfSGIS, (pname, param), (F, "glPixelTexGenParameterfSGIS(0x%x, %f);\n", pname, param));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_565)(GLenum pname, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_614)(GLenum pname, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_565)(GLenum pname, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_614)(GLenum pname, const GLfloat * params)
{
DISPATCH(PixelTexGenParameterfvSGIS, (pname, params), (F, "glPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_566)(GLenum pname, GLint param);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_615)(GLenum pname, GLint param);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_566)(GLenum pname, GLint param)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_615)(GLenum pname, GLint param)
{
DISPATCH(PixelTexGenParameteriSGIS, (pname, param), (F, "glPixelTexGenParameteriSGIS(0x%x, %d);\n", pname, param));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_567)(GLenum pname, const GLint * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_616)(GLenum pname, const GLint * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_567)(GLenum pname, const GLint * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_616)(GLenum pname, const GLint * params)
{
DISPATCH(PixelTexGenParameterivSGIS, (pname, params), (F, "glPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_568)(GLclampf value, GLboolean invert);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_617)(GLclampf value, GLboolean invert);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_568)(GLclampf value, GLboolean invert)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_617)(GLclampf value, GLboolean invert)
{
DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskSGIS(%f, %d);\n", value, invert));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_569)(GLenum pattern);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_618)(GLenum pattern);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_569)(GLenum pattern)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_618)(GLenum pattern)
{
DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternSGIS(0x%x);\n", pattern));
}
@@ -4112,9 +4218,9 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterfEXT)(GLenum pname, GLfloat param)
DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfEXT(0x%x, %f);\n", pname, param));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_576)(GLenum pname, GLfloat param);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_625)(GLenum pname, GLfloat param);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_576)(GLenum pname, GLfloat param)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_625)(GLenum pname, GLfloat param)
{
DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfSGIS(0x%x, %f);\n", pname, param));
}
@@ -4134,9 +4240,9 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterfvEXT)(GLenum pname, const GLfloat * p
DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvEXT(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_577)(GLenum pname, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_626)(GLenum pname, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_577)(GLenum pname, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_626)(GLenum pname, const GLfloat * params)
{
DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
}
@@ -4151,20 +4257,6 @@ KEYWORD1 void KEYWORD2 NAME(UnlockArraysEXT)(void)
DISPATCH(UnlockArraysEXT, (), (F, "glUnlockArraysEXT();\n"));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_580)(GLenum pname, GLdouble * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_580)(GLenum pname, GLdouble * params)
-{
- DISPATCH(CullParameterdvEXT, (pname, params), (F, "glCullParameterdvEXT(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_581)(GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_581)(GLenum pname, GLfloat * params)
-{
- DISPATCH(CullParameterfvEXT, (pname, params), (F, "glCullParameterfvEXT(0x%x, %p);\n", pname, (const void *) params));
-}
-
KEYWORD1 void KEYWORD2 NAME(SecondaryColor3b)(GLbyte red, GLbyte green, GLbyte blue)
{
DISPATCH(SecondaryColor3bEXT, (red, green, blue), (F, "glSecondaryColor3b(%d, %d, %d);\n", red, green, blue));
@@ -4335,12 +4427,12 @@ KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointerEXT)(GLint size, GLenum type, G
DISPATCH(SecondaryColorPointerEXT, (size, type, stride, pointer), (F, "glSecondaryColorPointerEXT(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
}
-KEYWORD1 void KEYWORD2 NAME(MultiDrawArrays)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount)
+KEYWORD1 void KEYWORD2 NAME(MultiDrawArrays)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount)
{
DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArrays(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount));
}
-KEYWORD1 void KEYWORD2 NAME(MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount)
+KEYWORD1 void KEYWORD2 NAME(MultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount)
{
DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArraysEXT(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount));
}
@@ -4405,9 +4497,9 @@ KEYWORD1 void KEYWORD2 NAME(FogCoordfvEXT)(const GLfloat * coord)
DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfvEXT(%p);\n", (const void *) coord));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_606)(GLenum mode);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_653)(GLenum mode);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_606)(GLenum mode)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_653)(GLenum mode)
{
DISPATCH(PixelTexGenSGIX, (mode), (F, "glPixelTexGenSGIX(0x%x);\n", mode));
}
@@ -4422,9 +4514,9 @@ KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfac
DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateEXT(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_607)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_654)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_607)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_654)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
{
DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateINGR(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha));
}
@@ -4789,65 +4881,65 @@ KEYWORD1 void KEYWORD2 NAME(WindowPos4svMESA)(const GLshort * v)
DISPATCH(WindowPos4svMESA, (v), (F, "glWindowPos4svMESA(%p);\n", (const void *) v));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_648)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_695)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_648)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_695)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride)
{
DISPATCH(MultiModeDrawArraysIBM, (mode, first, count, primcount, modestride), (F, "glMultiModeDrawArraysIBM(%p, %p, %p, %d, %d);\n", (const void *) mode, (const void *) first, (const void *) count, primcount, modestride));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_649)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_696)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_649)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_696)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride)
{
DISPATCH(MultiModeDrawElementsIBM, (mode, count, type, indices, primcount, modestride), (F, "glMultiModeDrawElementsIBM(%p, %p, 0x%x, %p, %d, %d);\n", (const void *) mode, (const void *) count, type, (const void *) indices, primcount, modestride));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_650)(GLsizei n, const GLuint * fences);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_697)(GLsizei n, const GLuint * fences);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_650)(GLsizei n, const GLuint * fences)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_697)(GLsizei n, const GLuint * fences)
{
DISPATCH(DeleteFencesNV, (n, fences), (F, "glDeleteFencesNV(%d, %p);\n", n, (const void *) fences));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_651)(GLuint fence);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_698)(GLuint fence);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_651)(GLuint fence)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_698)(GLuint fence)
{
DISPATCH(FinishFenceNV, (fence), (F, "glFinishFenceNV(%d);\n", fence));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_652)(GLsizei n, GLuint * fences);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_699)(GLsizei n, GLuint * fences);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_652)(GLsizei n, GLuint * fences)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_699)(GLsizei n, GLuint * fences)
{
DISPATCH(GenFencesNV, (n, fences), (F, "glGenFencesNV(%d, %p);\n", n, (const void *) fences));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_653)(GLuint fence, GLenum pname, GLint * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_700)(GLuint fence, GLenum pname, GLint * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_653)(GLuint fence, GLenum pname, GLint * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_700)(GLuint fence, GLenum pname, GLint * params)
{
DISPATCH(GetFenceivNV, (fence, pname, params), (F, "glGetFenceivNV(%d, 0x%x, %p);\n", fence, pname, (const void *) params));
}
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_654)(GLuint fence);
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_701)(GLuint fence);
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_654)(GLuint fence)
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_701)(GLuint fence)
{
RETURN_DISPATCH(IsFenceNV, (fence), (F, "glIsFenceNV(%d);\n", fence));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_655)(GLuint fence, GLenum condition);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_702)(GLuint fence, GLenum condition);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_655)(GLuint fence, GLenum condition)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_702)(GLuint fence, GLenum condition)
{
DISPATCH(SetFenceNV, (fence, condition), (F, "glSetFenceNV(%d, 0x%x);\n", fence, condition));
}
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_656)(GLuint fence);
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_703)(GLuint fence);
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_656)(GLuint fence)
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_703)(GLuint fence)
{
RETURN_DISPATCH(TestFenceNV, (fence), (F, "glTestFenceNV(%d);\n", fence));
}
@@ -4962,12 +5054,12 @@ KEYWORD1 void KEYWORD2 NAME(LoadProgramNV)(GLenum target, GLuint id, GLsizei len
DISPATCH(LoadProgramNV, (target, id, len, program), (F, "glLoadProgramNV(0x%x, %d, %d, %p);\n", target, id, len, (const void *) program));
}
-KEYWORD1 void KEYWORD2 NAME(ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params)
+KEYWORD1 void KEYWORD2 NAME(ProgramParameters4dvNV)(GLenum target, GLuint index, GLsizei num, const GLdouble * params)
{
DISPATCH(ProgramParameters4dvNV, (target, index, num, params), (F, "glProgramParameters4dvNV(0x%x, %d, %d, %p);\n", target, index, num, (const void *) params));
}
-KEYWORD1 void KEYWORD2 NAME(ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params)
+KEYWORD1 void KEYWORD2 NAME(ProgramParameters4fvNV)(GLenum target, GLuint index, GLsizei num, const GLfloat * params)
{
DISPATCH(ProgramParameters4fvNV, (target, index, num, params), (F, "glProgramParameters4fvNV(0x%x, %d, %d, %p);\n", target, index, num, (const void *) params));
}
@@ -5182,6 +5274,26 @@ KEYWORD1 void KEYWORD2 NAME(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const
DISPATCH(VertexAttribs4ubvNV, (index, n, v), (F, "glVertexAttribs4ubvNV(%d, %d, %p);\n", index, n, (const void *) v));
}
+KEYWORD1 void KEYWORD2 NAME(GetTexBumpParameterfvATI)(GLenum pname, GLfloat * param)
+{
+ DISPATCH(GetTexBumpParameterfvATI, (pname, param), (F, "glGetTexBumpParameterfvATI(0x%x, %p);\n", pname, (const void *) param));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetTexBumpParameterivATI)(GLenum pname, GLint * param)
+{
+ DISPATCH(GetTexBumpParameterivATI, (pname, param), (F, "glGetTexBumpParameterivATI(0x%x, %p);\n", pname, (const void *) param));
+}
+
+KEYWORD1 void KEYWORD2 NAME(TexBumpParameterfvATI)(GLenum pname, const GLfloat * param)
+{
+ DISPATCH(TexBumpParameterfvATI, (pname, param), (F, "glTexBumpParameterfvATI(0x%x, %p);\n", pname, (const void *) param));
+}
+
+KEYWORD1 void KEYWORD2 NAME(TexBumpParameterivATI)(GLenum pname, const GLint * param)
+{
+ DISPATCH(TexBumpParameterivATI, (pname, param), (F, "glTexBumpParameterivATI(0x%x, %p);\n", pname, (const void *) param));
+}
+
KEYWORD1 void KEYWORD2 NAME(AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
{
DISPATCH(AlphaFragmentOp1ATI, (op, dst, dstMod, arg1, arg1Rep, arg1Mod), (F, "glAlphaFragmentOp1ATI(0x%x, %d, %d, %d, %d, %d);\n", op, dst, dstMod, arg1, arg1Rep, arg1Mod));
@@ -5272,37 +5384,47 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterivNV)(GLenum pname, const GLint * para
DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameterivNV(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_733)(GLenum face);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_784)(GLenum face);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_733)(GLenum face)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_784)(GLenum face)
{
DISPATCH(ActiveStencilFaceEXT, (face), (F, "glActiveStencilFaceEXT(0x%x);\n", face));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_734)(GLuint array);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_785)(GLuint array);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_734)(GLuint array)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_785)(GLuint array)
{
DISPATCH(BindVertexArrayAPPLE, (array), (F, "glBindVertexArrayAPPLE(%d);\n", array));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_735)(GLsizei n, const GLuint * arrays);
+KEYWORD1 void KEYWORD2 NAME(DeleteVertexArrays)(GLsizei n, const GLuint * arrays)
+{
+ DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArrays(%d, %p);\n", n, (const void *) arrays));
+}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_735)(GLsizei n, const GLuint * arrays)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_786)(GLsizei n, const GLuint * arrays);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_786)(GLsizei n, const GLuint * arrays)
{
DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_736)(GLsizei n, GLuint * arrays);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_787)(GLsizei n, GLuint * arrays);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_736)(GLsizei n, GLuint * arrays)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_787)(GLsizei n, GLuint * arrays)
{
DISPATCH(GenVertexArraysAPPLE, (n, arrays), (F, "glGenVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays));
}
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_737)(GLuint array);
+KEYWORD1 GLboolean KEYWORD2 NAME(IsVertexArray)(GLuint array)
+{
+ RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArray(%d);\n", array));
+}
+
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_788)(GLuint array);
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_737)(GLuint array)
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_788)(GLuint array)
{
RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArrayAPPLE(%d);\n", array));
}
@@ -5337,9 +5459,24 @@ KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len,
DISPATCH(ProgramNamedParameter4fvNV, (id, len, name, v), (F, "glProgramNamedParameter4fvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) v));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_744)(GLclampd zmin, GLclampd zmax);
+KEYWORD1 void KEYWORD2 NAME(PrimitiveRestartIndexNV)(GLuint index)
+{
+ DISPATCH(PrimitiveRestartIndexNV, (index), (F, "glPrimitiveRestartIndexNV(%d);\n", index));
+}
+
+KEYWORD1 void KEYWORD2 NAME(PrimitiveRestartIndex)(GLuint index)
+{
+ DISPATCH(PrimitiveRestartIndexNV, (index), (F, "glPrimitiveRestartIndex(%d);\n", index));
+}
+
+KEYWORD1 void KEYWORD2 NAME(PrimitiveRestartNV)(void)
+{
+ DISPATCH(PrimitiveRestartNV, (), (F, "glPrimitiveRestartNV();\n"));
+}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_744)(GLclampd zmin, GLclampd zmax)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_797)(GLclampd zmin, GLclampd zmax);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_797)(GLclampd zmin, GLclampd zmax)
{
DISPATCH(DepthBoundsEXT, (zmin, zmax), (F, "glDepthBoundsEXT(%f, %f);\n", zmin, zmax));
}
@@ -5349,145 +5486,993 @@ KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA)
DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparate(0x%x, 0x%x);\n", modeRGB, modeA));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_745)(GLenum modeRGB, GLenum modeA);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_798)(GLenum modeRGB, GLenum modeA);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_745)(GLenum modeRGB, GLenum modeA)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_798)(GLenum modeRGB, GLenum modeA)
{
DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparateEXT(0x%x, 0x%x);\n", modeRGB, modeA));
}
+KEYWORD1 void KEYWORD2 NAME(BindFramebuffer)(GLenum target, GLuint framebuffer)
+{
+ DISPATCH(BindFramebufferEXT, (target, framebuffer), (F, "glBindFramebuffer(0x%x, %d);\n", target, framebuffer));
+}
+
KEYWORD1 void KEYWORD2 NAME(BindFramebufferEXT)(GLenum target, GLuint framebuffer)
{
DISPATCH(BindFramebufferEXT, (target, framebuffer), (F, "glBindFramebufferEXT(0x%x, %d);\n", target, framebuffer));
}
+KEYWORD1 void KEYWORD2 NAME(BindRenderbuffer)(GLenum target, GLuint renderbuffer)
+{
+ DISPATCH(BindRenderbufferEXT, (target, renderbuffer), (F, "glBindRenderbuffer(0x%x, %d);\n", target, renderbuffer));
+}
+
KEYWORD1 void KEYWORD2 NAME(BindRenderbufferEXT)(GLenum target, GLuint renderbuffer)
{
DISPATCH(BindRenderbufferEXT, (target, renderbuffer), (F, "glBindRenderbufferEXT(0x%x, %d);\n", target, renderbuffer));
}
+KEYWORD1 GLenum KEYWORD2 NAME(CheckFramebufferStatus)(GLenum target)
+{
+ RETURN_DISPATCH(CheckFramebufferStatusEXT, (target), (F, "glCheckFramebufferStatus(0x%x);\n", target));
+}
+
KEYWORD1 GLenum KEYWORD2 NAME(CheckFramebufferStatusEXT)(GLenum target)
{
RETURN_DISPATCH(CheckFramebufferStatusEXT, (target), (F, "glCheckFramebufferStatusEXT(0x%x);\n", target));
}
+KEYWORD1 void KEYWORD2 NAME(DeleteFramebuffers)(GLsizei n, const GLuint * framebuffers)
+{
+ DISPATCH(DeleteFramebuffersEXT, (n, framebuffers), (F, "glDeleteFramebuffers(%d, %p);\n", n, (const void *) framebuffers));
+}
+
KEYWORD1 void KEYWORD2 NAME(DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers)
{
DISPATCH(DeleteFramebuffersEXT, (n, framebuffers), (F, "glDeleteFramebuffersEXT(%d, %p);\n", n, (const void *) framebuffers));
}
+KEYWORD1 void KEYWORD2 NAME(DeleteRenderbuffers)(GLsizei n, const GLuint * renderbuffers)
+{
+ DISPATCH(DeleteRenderbuffersEXT, (n, renderbuffers), (F, "glDeleteRenderbuffers(%d, %p);\n", n, (const void *) renderbuffers));
+}
+
KEYWORD1 void KEYWORD2 NAME(DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers)
{
DISPATCH(DeleteRenderbuffersEXT, (n, renderbuffers), (F, "glDeleteRenderbuffersEXT(%d, %p);\n", n, (const void *) renderbuffers));
}
+KEYWORD1 void KEYWORD2 NAME(FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ DISPATCH(FramebufferRenderbufferEXT, (target, attachment, renderbuffertarget, renderbuffer), (F, "glFramebufferRenderbuffer(0x%x, 0x%x, 0x%x, %d);\n", target, attachment, renderbuffertarget, renderbuffer));
+}
+
KEYWORD1 void KEYWORD2 NAME(FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
{
DISPATCH(FramebufferRenderbufferEXT, (target, attachment, renderbuffertarget, renderbuffer), (F, "glFramebufferRenderbufferEXT(0x%x, 0x%x, 0x%x, %d);\n", target, attachment, renderbuffertarget, renderbuffer));
}
+KEYWORD1 void KEYWORD2 NAME(FramebufferTexture1D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ DISPATCH(FramebufferTexture1DEXT, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture1D(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level));
+}
+
KEYWORD1 void KEYWORD2 NAME(FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
{
DISPATCH(FramebufferTexture1DEXT, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture1DEXT(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level));
}
+KEYWORD1 void KEYWORD2 NAME(FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ DISPATCH(FramebufferTexture2DEXT, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture2D(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level));
+}
+
KEYWORD1 void KEYWORD2 NAME(FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
{
DISPATCH(FramebufferTexture2DEXT, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture2DEXT(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level));
}
+KEYWORD1 void KEYWORD2 NAME(FramebufferTexture3D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+ DISPATCH(FramebufferTexture3DEXT, (target, attachment, textarget, texture, level, zoffset), (F, "glFramebufferTexture3D(0x%x, 0x%x, 0x%x, %d, %d, %d);\n", target, attachment, textarget, texture, level, zoffset));
+}
+
KEYWORD1 void KEYWORD2 NAME(FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
{
DISPATCH(FramebufferTexture3DEXT, (target, attachment, textarget, texture, level, zoffset), (F, "glFramebufferTexture3DEXT(0x%x, 0x%x, 0x%x, %d, %d, %d);\n", target, attachment, textarget, texture, level, zoffset));
}
+KEYWORD1 void KEYWORD2 NAME(GenFramebuffers)(GLsizei n, GLuint * framebuffers)
+{
+ DISPATCH(GenFramebuffersEXT, (n, framebuffers), (F, "glGenFramebuffers(%d, %p);\n", n, (const void *) framebuffers));
+}
+
KEYWORD1 void KEYWORD2 NAME(GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers)
{
DISPATCH(GenFramebuffersEXT, (n, framebuffers), (F, "glGenFramebuffersEXT(%d, %p);\n", n, (const void *) framebuffers));
}
+KEYWORD1 void KEYWORD2 NAME(GenRenderbuffers)(GLsizei n, GLuint * renderbuffers)
+{
+ DISPATCH(GenRenderbuffersEXT, (n, renderbuffers), (F, "glGenRenderbuffers(%d, %p);\n", n, (const void *) renderbuffers));
+}
+
KEYWORD1 void KEYWORD2 NAME(GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers)
{
DISPATCH(GenRenderbuffersEXT, (n, renderbuffers), (F, "glGenRenderbuffersEXT(%d, %p);\n", n, (const void *) renderbuffers));
}
+KEYWORD1 void KEYWORD2 NAME(GenerateMipmap)(GLenum target)
+{
+ DISPATCH(GenerateMipmapEXT, (target), (F, "glGenerateMipmap(0x%x);\n", target));
+}
+
KEYWORD1 void KEYWORD2 NAME(GenerateMipmapEXT)(GLenum target)
{
DISPATCH(GenerateMipmapEXT, (target), (F, "glGenerateMipmapEXT(0x%x);\n", target));
}
+KEYWORD1 void KEYWORD2 NAME(GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint * params)
+{
+ DISPATCH(GetFramebufferAttachmentParameterivEXT, (target, attachment, pname, params), (F, "glGetFramebufferAttachmentParameteriv(0x%x, 0x%x, 0x%x, %p);\n", target, attachment, pname, (const void *) params));
+}
+
KEYWORD1 void KEYWORD2 NAME(GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params)
{
DISPATCH(GetFramebufferAttachmentParameterivEXT, (target, attachment, pname, params), (F, "glGetFramebufferAttachmentParameterivEXT(0x%x, 0x%x, 0x%x, %p);\n", target, attachment, pname, (const void *) params));
}
+KEYWORD1 void KEYWORD2 NAME(GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetRenderbufferParameterivEXT, (target, pname, params), (F, "glGetRenderbufferParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
KEYWORD1 void KEYWORD2 NAME(GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params)
{
DISPATCH(GetRenderbufferParameterivEXT, (target, pname, params), (F, "glGetRenderbufferParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
+KEYWORD1 GLboolean KEYWORD2 NAME(IsFramebuffer)(GLuint framebuffer)
+{
+ RETURN_DISPATCH(IsFramebufferEXT, (framebuffer), (F, "glIsFramebuffer(%d);\n", framebuffer));
+}
+
KEYWORD1 GLboolean KEYWORD2 NAME(IsFramebufferEXT)(GLuint framebuffer)
{
RETURN_DISPATCH(IsFramebufferEXT, (framebuffer), (F, "glIsFramebufferEXT(%d);\n", framebuffer));
}
+KEYWORD1 GLboolean KEYWORD2 NAME(IsRenderbuffer)(GLuint renderbuffer)
+{
+ RETURN_DISPATCH(IsRenderbufferEXT, (renderbuffer), (F, "glIsRenderbuffer(%d);\n", renderbuffer));
+}
+
KEYWORD1 GLboolean KEYWORD2 NAME(IsRenderbufferEXT)(GLuint renderbuffer)
{
RETURN_DISPATCH(IsRenderbufferEXT, (renderbuffer), (F, "glIsRenderbufferEXT(%d);\n", renderbuffer));
}
+KEYWORD1 void KEYWORD2 NAME(RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ DISPATCH(RenderbufferStorageEXT, (target, internalformat, width, height), (F, "glRenderbufferStorage(0x%x, 0x%x, %d, %d);\n", target, internalformat, width, height));
+}
+
KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
{
DISPATCH(RenderbufferStorageEXT, (target, internalformat, width, height), (F, "glRenderbufferStorageEXT(0x%x, 0x%x, %d, %d);\n", target, internalformat, width, height));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_763)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+KEYWORD1 void KEYWORD2 NAME(BlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+ DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_816)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_763)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_816)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
{
DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebufferEXT(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter));
}
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_817)(GLenum target, GLenum pname, GLint param);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_817)(GLenum target, GLenum pname, GLint param)
+{
+ DISPATCH(BufferParameteriAPPLE, (target, pname, param), (F, "glBufferParameteriAPPLE(0x%x, 0x%x, %d);\n", target, pname, param));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_818)(GLenum target, GLintptr offset, GLsizeiptr size);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_818)(GLenum target, GLintptr offset, GLsizeiptr size)
+{
+ DISPATCH(FlushMappedBufferRangeAPPLE, (target, offset, size), (F, "glFlushMappedBufferRangeAPPLE(0x%x, %d, %d);\n", target, offset, size));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BindFragDataLocationEXT)(GLuint program, GLuint colorNumber, const GLchar * name)
+{
+ DISPATCH(BindFragDataLocationEXT, (program, colorNumber, name), (F, "glBindFragDataLocationEXT(%d, %d, %p);\n", program, colorNumber, (const void *) name));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BindFragDataLocation)(GLuint program, GLuint colorNumber, const GLchar * name)
+{
+ DISPATCH(BindFragDataLocationEXT, (program, colorNumber, name), (F, "glBindFragDataLocation(%d, %d, %p);\n", program, colorNumber, (const void *) name));
+}
+
+KEYWORD1 GLint KEYWORD2 NAME(GetFragDataLocationEXT)(GLuint program, const GLchar * name)
+{
+ RETURN_DISPATCH(GetFragDataLocationEXT, (program, name), (F, "glGetFragDataLocationEXT(%d, %p);\n", program, (const void *) name));
+}
+
+KEYWORD1 GLint KEYWORD2 NAME(GetFragDataLocation)(GLuint program, const GLchar * name)
+{
+ RETURN_DISPATCH(GetFragDataLocationEXT, (program, name), (F, "glGetFragDataLocation(%d, %p);\n", program, (const void *) name));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetUniformuivEXT)(GLuint program, GLint location, GLuint * params)
+{
+ DISPATCH(GetUniformuivEXT, (program, location, params), (F, "glGetUniformuivEXT(%d, %d, %p);\n", program, location, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetUniformuiv)(GLuint program, GLint location, GLuint * params)
+{
+ DISPATCH(GetUniformuivEXT, (program, location, params), (F, "glGetUniformuiv(%d, %d, %p);\n", program, location, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetVertexAttribIivEXT)(GLuint index, GLenum pname, GLint * params)
+{
+ DISPATCH(GetVertexAttribIivEXT, (index, pname, params), (F, "glGetVertexAttribIivEXT(%d, 0x%x, %p);\n", index, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetVertexAttribIiv)(GLuint index, GLenum pname, GLint * params)
+{
+ DISPATCH(GetVertexAttribIivEXT, (index, pname, params), (F, "glGetVertexAttribIiv(%d, 0x%x, %p);\n", index, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetVertexAttribIuivEXT)(GLuint index, GLenum pname, GLuint * params)
+{
+ DISPATCH(GetVertexAttribIuivEXT, (index, pname, params), (F, "glGetVertexAttribIuivEXT(%d, 0x%x, %p);\n", index, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint * params)
+{
+ DISPATCH(GetVertexAttribIuivEXT, (index, pname, params), (F, "glGetVertexAttribIuiv(%d, 0x%x, %p);\n", index, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform1uiEXT)(GLint location, GLuint x)
+{
+ DISPATCH(Uniform1uiEXT, (location, x), (F, "glUniform1uiEXT(%d, %d);\n", location, x));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform1ui)(GLint location, GLuint x)
+{
+ DISPATCH(Uniform1uiEXT, (location, x), (F, "glUniform1ui(%d, %d);\n", location, x));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform1uivEXT)(GLint location, GLsizei count, const GLuint * value)
+{
+ DISPATCH(Uniform1uivEXT, (location, count, value), (F, "glUniform1uivEXT(%d, %d, %p);\n", location, count, (const void *) value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform1uiv)(GLint location, GLsizei count, const GLuint * value)
+{
+ DISPATCH(Uniform1uivEXT, (location, count, value), (F, "glUniform1uiv(%d, %d, %p);\n", location, count, (const void *) value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform2uiEXT)(GLint location, GLuint x, GLuint y)
+{
+ DISPATCH(Uniform2uiEXT, (location, x, y), (F, "glUniform2uiEXT(%d, %d, %d);\n", location, x, y));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform2ui)(GLint location, GLuint x, GLuint y)
+{
+ DISPATCH(Uniform2uiEXT, (location, x, y), (F, "glUniform2ui(%d, %d, %d);\n", location, x, y));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform2uivEXT)(GLint location, GLsizei count, const GLuint * value)
+{
+ DISPATCH(Uniform2uivEXT, (location, count, value), (F, "glUniform2uivEXT(%d, %d, %p);\n", location, count, (const void *) value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform2uiv)(GLint location, GLsizei count, const GLuint * value)
+{
+ DISPATCH(Uniform2uivEXT, (location, count, value), (F, "glUniform2uiv(%d, %d, %p);\n", location, count, (const void *) value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform3uiEXT)(GLint location, GLuint x, GLuint y, GLuint z)
+{
+ DISPATCH(Uniform3uiEXT, (location, x, y, z), (F, "glUniform3uiEXT(%d, %d, %d, %d);\n", location, x, y, z));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform3ui)(GLint location, GLuint x, GLuint y, GLuint z)
+{
+ DISPATCH(Uniform3uiEXT, (location, x, y, z), (F, "glUniform3ui(%d, %d, %d, %d);\n", location, x, y, z));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform3uivEXT)(GLint location, GLsizei count, const GLuint * value)
+{
+ DISPATCH(Uniform3uivEXT, (location, count, value), (F, "glUniform3uivEXT(%d, %d, %p);\n", location, count, (const void *) value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform3uiv)(GLint location, GLsizei count, const GLuint * value)
+{
+ DISPATCH(Uniform3uivEXT, (location, count, value), (F, "glUniform3uiv(%d, %d, %p);\n", location, count, (const void *) value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform4uiEXT)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ DISPATCH(Uniform4uiEXT, (location, x, y, z, w), (F, "glUniform4uiEXT(%d, %d, %d, %d, %d);\n", location, x, y, z, w));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform4ui)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ DISPATCH(Uniform4uiEXT, (location, x, y, z, w), (F, "glUniform4ui(%d, %d, %d, %d, %d);\n", location, x, y, z, w));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform4uivEXT)(GLint location, GLsizei count, const GLuint * value)
+{
+ DISPATCH(Uniform4uivEXT, (location, count, value), (F, "glUniform4uivEXT(%d, %d, %p);\n", location, count, (const void *) value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Uniform4uiv)(GLint location, GLsizei count, const GLuint * value)
+{
+ DISPATCH(Uniform4uivEXT, (location, count, value), (F, "glUniform4uiv(%d, %d, %p);\n", location, count, (const void *) value));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI1iEXT)(GLuint index, GLint x)
+{
+ DISPATCH(VertexAttribI1iEXT, (index, x), (F, "glVertexAttribI1iEXT(%d, %d);\n", index, x));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI1i)(GLuint index, GLint x)
+{
+ DISPATCH(VertexAttribI1iEXT, (index, x), (F, "glVertexAttribI1i(%d, %d);\n", index, x));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI1ivEXT)(GLuint index, const GLint * v)
+{
+ DISPATCH(VertexAttribI1ivEXT, (index, v), (F, "glVertexAttribI1ivEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI1iv)(GLuint index, const GLint * v)
+{
+ DISPATCH(VertexAttribI1ivEXT, (index, v), (F, "glVertexAttribI1iv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI1uiEXT)(GLuint index, GLuint x)
+{
+ DISPATCH(VertexAttribI1uiEXT, (index, x), (F, "glVertexAttribI1uiEXT(%d, %d);\n", index, x));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI1ui)(GLuint index, GLuint x)
+{
+ DISPATCH(VertexAttribI1uiEXT, (index, x), (F, "glVertexAttribI1ui(%d, %d);\n", index, x));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI1uivEXT)(GLuint index, const GLuint * v)
+{
+ DISPATCH(VertexAttribI1uivEXT, (index, v), (F, "glVertexAttribI1uivEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI1uiv)(GLuint index, const GLuint * v)
+{
+ DISPATCH(VertexAttribI1uivEXT, (index, v), (F, "glVertexAttribI1uiv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI2iEXT)(GLuint index, GLint x, GLint y)
+{
+ DISPATCH(VertexAttribI2iEXT, (index, x, y), (F, "glVertexAttribI2iEXT(%d, %d, %d);\n", index, x, y));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI2i)(GLuint index, GLint x, GLint y)
+{
+ DISPATCH(VertexAttribI2iEXT, (index, x, y), (F, "glVertexAttribI2i(%d, %d, %d);\n", index, x, y));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI2ivEXT)(GLuint index, const GLint * v)
+{
+ DISPATCH(VertexAttribI2ivEXT, (index, v), (F, "glVertexAttribI2ivEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI2iv)(GLuint index, const GLint * v)
+{
+ DISPATCH(VertexAttribI2ivEXT, (index, v), (F, "glVertexAttribI2iv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI2uiEXT)(GLuint index, GLuint x, GLuint y)
+{
+ DISPATCH(VertexAttribI2uiEXT, (index, x, y), (F, "glVertexAttribI2uiEXT(%d, %d, %d);\n", index, x, y));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI2ui)(GLuint index, GLuint x, GLuint y)
+{
+ DISPATCH(VertexAttribI2uiEXT, (index, x, y), (F, "glVertexAttribI2ui(%d, %d, %d);\n", index, x, y));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI2uivEXT)(GLuint index, const GLuint * v)
+{
+ DISPATCH(VertexAttribI2uivEXT, (index, v), (F, "glVertexAttribI2uivEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI2uiv)(GLuint index, const GLuint * v)
+{
+ DISPATCH(VertexAttribI2uivEXT, (index, v), (F, "glVertexAttribI2uiv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI3iEXT)(GLuint index, GLint x, GLint y, GLint z)
+{
+ DISPATCH(VertexAttribI3iEXT, (index, x, y, z), (F, "glVertexAttribI3iEXT(%d, %d, %d, %d);\n", index, x, y, z));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z)
+{
+ DISPATCH(VertexAttribI3iEXT, (index, x, y, z), (F, "glVertexAttribI3i(%d, %d, %d, %d);\n", index, x, y, z));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI3ivEXT)(GLuint index, const GLint * v)
+{
+ DISPATCH(VertexAttribI3ivEXT, (index, v), (F, "glVertexAttribI3ivEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI3iv)(GLuint index, const GLint * v)
+{
+ DISPATCH(VertexAttribI3ivEXT, (index, v), (F, "glVertexAttribI3iv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI3uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ DISPATCH(VertexAttribI3uiEXT, (index, x, y, z), (F, "glVertexAttribI3uiEXT(%d, %d, %d, %d);\n", index, x, y, z));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ DISPATCH(VertexAttribI3uiEXT, (index, x, y, z), (F, "glVertexAttribI3ui(%d, %d, %d, %d);\n", index, x, y, z));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI3uivEXT)(GLuint index, const GLuint * v)
+{
+ DISPATCH(VertexAttribI3uivEXT, (index, v), (F, "glVertexAttribI3uivEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI3uiv)(GLuint index, const GLuint * v)
+{
+ DISPATCH(VertexAttribI3uivEXT, (index, v), (F, "glVertexAttribI3uiv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4bvEXT)(GLuint index, const GLbyte * v)
+{
+ DISPATCH(VertexAttribI4bvEXT, (index, v), (F, "glVertexAttribI4bvEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4bv)(GLuint index, const GLbyte * v)
+{
+ DISPATCH(VertexAttribI4bvEXT, (index, v), (F, "glVertexAttribI4bv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4iEXT)(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ DISPATCH(VertexAttribI4iEXT, (index, x, y, z, w), (F, "glVertexAttribI4iEXT(%d, %d, %d, %d, %d);\n", index, x, y, z, w));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ DISPATCH(VertexAttribI4iEXT, (index, x, y, z, w), (F, "glVertexAttribI4i(%d, %d, %d, %d, %d);\n", index, x, y, z, w));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4ivEXT)(GLuint index, const GLint * v)
+{
+ DISPATCH(VertexAttribI4ivEXT, (index, v), (F, "glVertexAttribI4ivEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4iv)(GLuint index, const GLint * v)
+{
+ DISPATCH(VertexAttribI4ivEXT, (index, v), (F, "glVertexAttribI4iv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4svEXT)(GLuint index, const GLshort * v)
+{
+ DISPATCH(VertexAttribI4svEXT, (index, v), (F, "glVertexAttribI4svEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4sv)(GLuint index, const GLshort * v)
+{
+ DISPATCH(VertexAttribI4svEXT, (index, v), (F, "glVertexAttribI4sv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4ubvEXT)(GLuint index, const GLubyte * v)
+{
+ DISPATCH(VertexAttribI4ubvEXT, (index, v), (F, "glVertexAttribI4ubvEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4ubv)(GLuint index, const GLubyte * v)
+{
+ DISPATCH(VertexAttribI4ubvEXT, (index, v), (F, "glVertexAttribI4ubv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ DISPATCH(VertexAttribI4uiEXT, (index, x, y, z, w), (F, "glVertexAttribI4uiEXT(%d, %d, %d, %d, %d);\n", index, x, y, z, w));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ DISPATCH(VertexAttribI4uiEXT, (index, x, y, z, w), (F, "glVertexAttribI4ui(%d, %d, %d, %d, %d);\n", index, x, y, z, w));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4uivEXT)(GLuint index, const GLuint * v)
+{
+ DISPATCH(VertexAttribI4uivEXT, (index, v), (F, "glVertexAttribI4uivEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4uiv)(GLuint index, const GLuint * v)
+{
+ DISPATCH(VertexAttribI4uivEXT, (index, v), (F, "glVertexAttribI4uiv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4usvEXT)(GLuint index, const GLushort * v)
+{
+ DISPATCH(VertexAttribI4usvEXT, (index, v), (F, "glVertexAttribI4usvEXT(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribI4usv)(GLuint index, const GLushort * v)
+{
+ DISPATCH(VertexAttribI4usvEXT, (index, v), (F, "glVertexAttribI4usv(%d, %p);\n", index, (const void *) v));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribIPointerEXT)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
+{
+ DISPATCH(VertexAttribIPointerEXT, (index, size, type, stride, pointer), (F, "glVertexAttribIPointerEXT(%d, %d, 0x%x, %d, %p);\n", index, size, type, stride, (const void *) pointer));
+}
+
+KEYWORD1 void KEYWORD2 NAME(VertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
+{
+ DISPATCH(VertexAttribIPointerEXT, (index, size, type, stride, pointer), (F, "glVertexAttribIPointer(%d, %d, 0x%x, %d, %p);\n", index, size, type, stride, (const void *) pointer));
+}
+
+KEYWORD1 void KEYWORD2 NAME(FramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ DISPATCH(FramebufferTextureLayerEXT, (target, attachment, texture, level, layer), (F, "glFramebufferTextureLayer(0x%x, 0x%x, %d, %d, %d);\n", target, attachment, texture, level, layer));
+}
+
KEYWORD1 void KEYWORD2 NAME(FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
{
DISPATCH(FramebufferTextureLayerEXT, (target, attachment, texture, level, layer), (F, "glFramebufferTextureLayerEXT(0x%x, 0x%x, %d, %d, %d);\n", target, attachment, texture, level, layer));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_765)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+KEYWORD1 void KEYWORD2 NAME(ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ DISPATCH(ColorMaskIndexedEXT, (buf, r, g, b, a), (F, "glColorMaskIndexedEXT(%d, %d, %d, %d, %d);\n", buf, r, g, b, a));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ColorMaski)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ DISPATCH(ColorMaskIndexedEXT, (buf, r, g, b, a), (F, "glColorMaski(%d, %d, %d, %d, %d);\n", buf, r, g, b, a));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DisableIndexedEXT)(GLenum target, GLuint index)
+{
+ DISPATCH(DisableIndexedEXT, (target, index), (F, "glDisableIndexedEXT(0x%x, %d);\n", target, index));
+}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_765)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
+KEYWORD1 void KEYWORD2 NAME(Disablei)(GLenum target, GLuint index)
+{
+ DISPATCH(DisableIndexedEXT, (target, index), (F, "glDisablei(0x%x, %d);\n", target, index));
+}
+
+KEYWORD1 void KEYWORD2 NAME(EnableIndexedEXT)(GLenum target, GLuint index)
+{
+ DISPATCH(EnableIndexedEXT, (target, index), (F, "glEnableIndexedEXT(0x%x, %d);\n", target, index));
+}
+
+KEYWORD1 void KEYWORD2 NAME(Enablei)(GLenum target, GLuint index)
+{
+ DISPATCH(EnableIndexedEXT, (target, index), (F, "glEnablei(0x%x, %d);\n", target, index));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean * data)
+{
+ DISPATCH(GetBooleanIndexedvEXT, (value, index, data), (F, "glGetBooleanIndexedvEXT(0x%x, %d, %p);\n", value, index, (const void *) data));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetBooleani_v)(GLenum value, GLuint index, GLboolean * data)
+{
+ DISPATCH(GetBooleanIndexedvEXT, (value, index, data), (F, "glGetBooleani_v(0x%x, %d, %p);\n", value, index, (const void *) data));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint * data)
+{
+ DISPATCH(GetIntegerIndexedvEXT, (value, index, data), (F, "glGetIntegerIndexedvEXT(0x%x, %d, %p);\n", value, index, (const void *) data));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetIntegeri_v)(GLenum value, GLuint index, GLint * data)
+{
+ DISPATCH(GetIntegerIndexedvEXT, (value, index, data), (F, "glGetIntegeri_v(0x%x, %d, %p);\n", value, index, (const void *) data));
+}
+
+KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabledIndexedEXT)(GLenum target, GLuint index)
+{
+ RETURN_DISPATCH(IsEnabledIndexedEXT, (target, index), (F, "glIsEnabledIndexedEXT(0x%x, %d);\n", target, index));
+}
+
+KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabledi)(GLenum target, GLuint index)
+{
+ RETURN_DISPATCH(IsEnabledIndexedEXT, (target, index), (F, "glIsEnabledi(0x%x, %d);\n", target, index));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ClearColorIiEXT)(GLint r, GLint g, GLint b, GLint a)
+{
+ DISPATCH(ClearColorIiEXT, (r, g, b, a), (F, "glClearColorIiEXT(%d, %d, %d, %d);\n", r, g, b, a));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ClearColorIuiEXT)(GLuint r, GLuint g, GLuint b, GLuint a)
+{
+ DISPATCH(ClearColorIuiEXT, (r, g, b, a), (F, "glClearColorIuiEXT(%d, %d, %d, %d);\n", r, g, b, a));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetTexParameterIivEXT)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetTexParameterIivEXT, (target, pname, params), (F, "glGetTexParameterIivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetTexParameterIiv)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetTexParameterIivEXT, (target, pname, params), (F, "glGetTexParameterIiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint * params)
+{
+ DISPATCH(GetTexParameterIuivEXT, (target, pname, params), (F, "glGetTexParameterIuivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetTexParameterIuiv)(GLenum target, GLenum pname, GLuint * params)
+{
+ DISPATCH(GetTexParameterIuivEXT, (target, pname, params), (F, "glGetTexParameterIuiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(TexParameterIivEXT)(GLenum target, GLenum pname, const GLint * params)
+{
+ DISPATCH(TexParameterIivEXT, (target, pname, params), (F, "glTexParameterIivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(TexParameterIiv)(GLenum target, GLenum pname, const GLint * params)
+{
+ DISPATCH(TexParameterIivEXT, (target, pname, params), (F, "glTexParameterIiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(TexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint * params)
+{
+ DISPATCH(TexParameterIuivEXT, (target, pname, params), (F, "glTexParameterIuivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(TexParameterIuiv)(GLenum target, GLenum pname, const GLuint * params)
+{
+ DISPATCH(TexParameterIuivEXT, (target, pname, params), (F, "glTexParameterIuiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BeginConditionalRenderNV)(GLuint query, GLenum mode)
+{
+ DISPATCH(BeginConditionalRenderNV, (query, mode), (F, "glBeginConditionalRenderNV(%d, 0x%x);\n", query, mode));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BeginConditionalRender)(GLuint query, GLenum mode)
+{
+ DISPATCH(BeginConditionalRenderNV, (query, mode), (F, "glBeginConditionalRender(%d, 0x%x);\n", query, mode));
+}
+
+KEYWORD1 void KEYWORD2 NAME(EndConditionalRenderNV)(void)
+{
+ DISPATCH(EndConditionalRenderNV, (), (F, "glEndConditionalRenderNV();\n"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(EndConditionalRender)(void)
+{
+ DISPATCH(EndConditionalRenderNV, (), (F, "glEndConditionalRender();\n"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BeginTransformFeedbackEXT)(GLenum mode)
+{
+ DISPATCH(BeginTransformFeedbackEXT, (mode), (F, "glBeginTransformFeedbackEXT(0x%x);\n", mode));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BeginTransformFeedback)(GLenum mode)
+{
+ DISPATCH(BeginTransformFeedbackEXT, (mode), (F, "glBeginTransformFeedback(0x%x);\n", mode));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BindBufferBaseEXT)(GLenum target, GLuint index, GLuint buffer)
+{
+ DISPATCH(BindBufferBaseEXT, (target, index, buffer), (F, "glBindBufferBaseEXT(0x%x, %d, %d);\n", target, index, buffer));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BindBufferBase)(GLenum target, GLuint index, GLuint buffer)
+{
+ DISPATCH(BindBufferBaseEXT, (target, index, buffer), (F, "glBindBufferBase(0x%x, %d, %d);\n", target, index, buffer));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BindBufferOffsetEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset)
+{
+ DISPATCH(BindBufferOffsetEXT, (target, index, buffer, offset), (F, "glBindBufferOffsetEXT(0x%x, %d, %d, %d);\n", target, index, buffer, offset));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BindBufferRangeEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ DISPATCH(BindBufferRangeEXT, (target, index, buffer, offset, size), (F, "glBindBufferRangeEXT(0x%x, %d, %d, %d, %d);\n", target, index, buffer, offset, size));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ DISPATCH(BindBufferRangeEXT, (target, index, buffer, offset, size), (F, "glBindBufferRange(0x%x, %d, %d, %d, %d);\n", target, index, buffer, offset, size));
+}
+
+KEYWORD1 void KEYWORD2 NAME(EndTransformFeedbackEXT)(void)
+{
+ DISPATCH(EndTransformFeedbackEXT, (), (F, "glEndTransformFeedbackEXT();\n"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(EndTransformFeedback)(void)
+{
+ DISPATCH(EndTransformFeedbackEXT, (), (F, "glEndTransformFeedback();\n"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetTransformFeedbackVaryingEXT)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name)
+{
+ DISPATCH(GetTransformFeedbackVaryingEXT, (program, index, bufSize, length, size, type, name), (F, "glGetTransformFeedbackVaryingEXT(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name)
+{
+ DISPATCH(GetTransformFeedbackVaryingEXT, (program, index, bufSize, length, size, type, name), (F, "glGetTransformFeedbackVarying(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name));
+}
+
+KEYWORD1 void KEYWORD2 NAME(TransformFeedbackVaryingsEXT)(GLuint program, GLsizei count, const char ** varyings, GLenum bufferMode)
+{
+ DISPATCH(TransformFeedbackVaryingsEXT, (program, count, varyings, bufferMode), (F, "glTransformFeedbackVaryingsEXT(%d, %d, %p, 0x%x);\n", program, count, (const void *) varyings, bufferMode));
+}
+
+KEYWORD1 void KEYWORD2 NAME(TransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* * varyings, GLenum bufferMode)
+{
+ DISPATCH(TransformFeedbackVaryingsEXT, (program, count, varyings, bufferMode), (F, "glTransformFeedbackVaryings(%d, %d, %p, 0x%x);\n", program, count, (const void *) varyings, bufferMode));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ProvokingVertexEXT)(GLenum mode)
+{
+ DISPATCH(ProvokingVertexEXT, (mode), (F, "glProvokingVertexEXT(0x%x);\n", mode));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ProvokingVertex)(GLenum mode)
+{
+ DISPATCH(ProvokingVertexEXT, (mode), (F, "glProvokingVertex(0x%x);\n", mode));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_876)(GLenum target, GLenum pname, GLvoid ** params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_876)(GLenum target, GLenum pname, GLvoid ** params)
+{
+ DISPATCH(GetTexParameterPointervAPPLE, (target, pname, params), (F, "glGetTexParameterPointervAPPLE(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_877)(GLenum target, GLsizei length, GLvoid * pointer);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_877)(GLenum target, GLsizei length, GLvoid * pointer)
+{
+ DISPATCH(TextureRangeAPPLE, (target, length, pointer), (F, "glTextureRangeAPPLE(0x%x, %d, %p);\n", target, length, (const void *) pointer));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value)
+{
+ DISPATCH(GetObjectParameterivAPPLE, (objectType, name, pname, value), (F, "glGetObjectParameterivAPPLE(0x%x, %d, 0x%x, %p);\n", objectType, name, pname, (const void *) value));
+}
+
+KEYWORD1 GLenum KEYWORD2 NAME(ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option)
+{
+ RETURN_DISPATCH(ObjectPurgeableAPPLE, (objectType, name, option), (F, "glObjectPurgeableAPPLE(0x%x, %d, 0x%x);\n", objectType, name, option));
+}
+
+KEYWORD1 GLenum KEYWORD2 NAME(ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option)
+{
+ RETURN_DISPATCH(ObjectUnpurgeableAPPLE, (objectType, name, option), (F, "glObjectUnpurgeableAPPLE(0x%x, %d, 0x%x);\n", objectType, name, option));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ActiveProgramEXT)(GLuint program)
+{
+ DISPATCH(ActiveProgramEXT, (program), (F, "glActiveProgramEXT(%d);\n", program));
+}
+
+KEYWORD1 GLuint KEYWORD2 NAME(CreateShaderProgramEXT)(GLenum type, const GLchar * string)
+{
+ RETURN_DISPATCH(CreateShaderProgramEXT, (type, string), (F, "glCreateShaderProgramEXT(0x%x, %p);\n", type, (const void *) string));
+}
+
+KEYWORD1 void KEYWORD2 NAME(UseShaderProgramEXT)(GLenum type, GLuint program)
+{
+ DISPATCH(UseShaderProgramEXT, (type, program), (F, "glUseShaderProgramEXT(0x%x, %d);\n", type, program));
+}
+
+KEYWORD1 void KEYWORD2 NAME(TextureBarrierNV)(void)
+{
+ DISPATCH(TextureBarrierNV, (), (F, "glTextureBarrierNV();\n"));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_885)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_885)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
{
DISPATCH(StencilFuncSeparateATI, (frontfunc, backfunc, ref, mask), (F, "glStencilFuncSeparateATI(0x%x, 0x%x, %d, %d);\n", frontfunc, backfunc, ref, mask));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_766)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_886)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_766)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_886)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
{
DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_767)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_887)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_767)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_887)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
{
DISPATCH(ProgramLocalParameters4fvEXT, (target, index, count, params), (F, "glProgramLocalParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_768)(GLuint id, GLenum pname, GLint64EXT * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_888)(GLuint id, GLenum pname, GLint64EXT * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_768)(GLuint id, GLenum pname, GLint64EXT * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_888)(GLuint id, GLenum pname, GLint64EXT * params)
{
DISPATCH(GetQueryObjecti64vEXT, (id, pname, params), (F, "glGetQueryObjecti64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_769)(GLuint id, GLenum pname, GLuint64EXT * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_889)(GLuint id, GLenum pname, GLuint64EXT * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_769)(GLuint id, GLenum pname, GLuint64EXT * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_889)(GLuint id, GLenum pname, GLuint64EXT * params)
{
DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
+KEYWORD1 void KEYWORD2 NAME(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset)
+{
+ DISPATCH(EGLImageTargetRenderbufferStorageOES, (target, writeOffset), (F, "glEGLImageTargetRenderbufferStorageOES(0x%x, %p);\n", target, (const void *) writeOffset));
+}
+
+KEYWORD1 void KEYWORD2 NAME(EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset)
+{
+ DISPATCH(EGLImageTargetTexture2DOES, (target, writeOffset), (F, "glEGLImageTargetTexture2DOES(0x%x, %p);\n", target, (const void *) writeOffset));
+}
+
+
+#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */
+
+/* these entry points might require different protocols */
+#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS
+
+KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences)
+{
+ RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures)
+{
+ DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures)
+{
+ DISPATCH(GenTextures, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures));
+}
+
+KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture)
+{
+ RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTextureEXT(%d);\n", texture));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * table)
+{
+ DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table)
+{
+ DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
+{
+ DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params)
+{
+ DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image)
+{
+ DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params)
+{
+ DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span)
+{
+ DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
+{
+ DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params)
+{
+ DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
+{
+ DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params)
+{
+ DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+
+#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */
+
#endif /* defined( NAME ) */
@@ -5501,7 +6486,11 @@ KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_769)(GLuint id, GLenum pname, GLu
#error TABLE_ENTRY must be defined
#endif
-static _glapi_proc DISPATCH_TABLE_NAME[] = {
+#ifdef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
+#error _GLAPI_SKIP_NORMAL_ENTRY_POINTS must not be defined
+#endif
+
+_glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(NewList),
TABLE_ENTRY(EndList),
TABLE_ENTRY(CallList),
@@ -5932,6 +6921,17 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(UniformMatrix3x4fv),
TABLE_ENTRY(UniformMatrix4x2fv),
TABLE_ENTRY(UniformMatrix4x3fv),
+ TABLE_ENTRY(ClampColor),
+ TABLE_ENTRY(ClearBufferfi),
+ TABLE_ENTRY(ClearBufferfv),
+ TABLE_ENTRY(ClearBufferiv),
+ TABLE_ENTRY(ClearBufferuiv),
+ TABLE_ENTRY(GetStringi),
+ TABLE_ENTRY(TexBuffer),
+ TABLE_ENTRY(FramebufferTexture),
+ TABLE_ENTRY(GetBufferParameteri64v),
+ TABLE_ENTRY(GetInteger64i_v),
+ TABLE_ENTRY(VertexAttribDivisor),
TABLE_ENTRY(LoadTransposeMatrixdARB),
TABLE_ENTRY(LoadTransposeMatrixfARB),
TABLE_ENTRY(MultTransposeMatrixdARB),
@@ -6063,15 +7063,53 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(GetActiveAttribARB),
TABLE_ENTRY(GetAttribLocationARB),
TABLE_ENTRY(DrawBuffersARB),
+ TABLE_ENTRY(DrawArraysInstancedARB),
+ TABLE_ENTRY(DrawElementsInstancedARB),
+ TABLE_ENTRY(RenderbufferStorageMultisample),
+ TABLE_ENTRY(FramebufferTextureARB),
+ TABLE_ENTRY(FramebufferTextureFaceARB),
+ TABLE_ENTRY(ProgramParameteriARB),
+ TABLE_ENTRY(VertexAttribDivisorARB),
+ TABLE_ENTRY(FlushMappedBufferRange),
+ TABLE_ENTRY(MapBufferRange),
+ TABLE_ENTRY(BindVertexArray),
+ TABLE_ENTRY(GenVertexArrays),
+ TABLE_ENTRY(CopyBufferSubData),
+ TABLE_ENTRY(ClientWaitSync),
+ TABLE_ENTRY(DeleteSync),
+ TABLE_ENTRY(FenceSync),
+ TABLE_ENTRY(GetInteger64v),
+ TABLE_ENTRY(GetSynciv),
+ TABLE_ENTRY(IsSync),
+ TABLE_ENTRY(WaitSync),
+ TABLE_ENTRY(DrawElementsBaseVertex),
+ TABLE_ENTRY(DrawRangeElementsBaseVertex),
+ TABLE_ENTRY(MultiDrawElementsBaseVertex),
+ TABLE_ENTRY(BlendEquationSeparateiARB),
+ TABLE_ENTRY(BlendEquationiARB),
+ TABLE_ENTRY(BlendFuncSeparateiARB),
+ TABLE_ENTRY(BlendFunciARB),
+ TABLE_ENTRY(BindTransformFeedback),
+ TABLE_ENTRY(DeleteTransformFeedbacks),
+ TABLE_ENTRY(DrawTransformFeedback),
+ TABLE_ENTRY(GenTransformFeedbacks),
+ TABLE_ENTRY(IsTransformFeedback),
+ TABLE_ENTRY(PauseTransformFeedback),
+ TABLE_ENTRY(ResumeTransformFeedback),
+ TABLE_ENTRY(ClearDepthf),
+ TABLE_ENTRY(DepthRangef),
+ TABLE_ENTRY(GetShaderPrecisionFormat),
+ TABLE_ENTRY(ReleaseShaderCompiler),
+ TABLE_ENTRY(ShaderBinary),
TABLE_ENTRY(PolygonOffsetEXT),
- TABLE_ENTRY(_dispatch_stub_562),
- TABLE_ENTRY(_dispatch_stub_563),
- TABLE_ENTRY(_dispatch_stub_564),
- TABLE_ENTRY(_dispatch_stub_565),
- TABLE_ENTRY(_dispatch_stub_566),
- TABLE_ENTRY(_dispatch_stub_567),
- TABLE_ENTRY(_dispatch_stub_568),
- TABLE_ENTRY(_dispatch_stub_569),
+ TABLE_ENTRY(_dispatch_stub_611),
+ TABLE_ENTRY(_dispatch_stub_612),
+ TABLE_ENTRY(_dispatch_stub_613),
+ TABLE_ENTRY(_dispatch_stub_614),
+ TABLE_ENTRY(_dispatch_stub_615),
+ TABLE_ENTRY(_dispatch_stub_616),
+ TABLE_ENTRY(_dispatch_stub_617),
+ TABLE_ENTRY(_dispatch_stub_618),
TABLE_ENTRY(ColorPointerEXT),
TABLE_ENTRY(EdgeFlagPointerEXT),
TABLE_ENTRY(IndexPointerEXT),
@@ -6082,8 +7120,6 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(PointParameterfvEXT),
TABLE_ENTRY(LockArraysEXT),
TABLE_ENTRY(UnlockArraysEXT),
- TABLE_ENTRY(_dispatch_stub_580),
- TABLE_ENTRY(_dispatch_stub_581),
TABLE_ENTRY(SecondaryColor3bEXT),
TABLE_ENTRY(SecondaryColor3bvEXT),
TABLE_ENTRY(SecondaryColor3dEXT),
@@ -6108,7 +7144,7 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(FogCoorddvEXT),
TABLE_ENTRY(FogCoordfEXT),
TABLE_ENTRY(FogCoordfvEXT),
- TABLE_ENTRY(_dispatch_stub_606),
+ TABLE_ENTRY(_dispatch_stub_653),
TABLE_ENTRY(BlendFuncSeparateEXT),
TABLE_ENTRY(FlushVertexArrayRangeNV),
TABLE_ENTRY(VertexArrayRangeNV),
@@ -6150,15 +7186,15 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(WindowPos4ivMESA),
TABLE_ENTRY(WindowPos4sMESA),
TABLE_ENTRY(WindowPos4svMESA),
- TABLE_ENTRY(_dispatch_stub_648),
- TABLE_ENTRY(_dispatch_stub_649),
- TABLE_ENTRY(_dispatch_stub_650),
- TABLE_ENTRY(_dispatch_stub_651),
- TABLE_ENTRY(_dispatch_stub_652),
- TABLE_ENTRY(_dispatch_stub_653),
- TABLE_ENTRY(_dispatch_stub_654),
- TABLE_ENTRY(_dispatch_stub_655),
- TABLE_ENTRY(_dispatch_stub_656),
+ TABLE_ENTRY(_dispatch_stub_695),
+ TABLE_ENTRY(_dispatch_stub_696),
+ TABLE_ENTRY(_dispatch_stub_697),
+ TABLE_ENTRY(_dispatch_stub_698),
+ TABLE_ENTRY(_dispatch_stub_699),
+ TABLE_ENTRY(_dispatch_stub_700),
+ TABLE_ENTRY(_dispatch_stub_701),
+ TABLE_ENTRY(_dispatch_stub_702),
+ TABLE_ENTRY(_dispatch_stub_703),
TABLE_ENTRY(AreProgramsResidentNV),
TABLE_ENTRY(BindProgramNV),
TABLE_ENTRY(DeleteProgramsNV),
@@ -6219,6 +7255,10 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(VertexAttribs4fvNV),
TABLE_ENTRY(VertexAttribs4svNV),
TABLE_ENTRY(VertexAttribs4ubvNV),
+ TABLE_ENTRY(GetTexBumpParameterfvATI),
+ TABLE_ENTRY(GetTexBumpParameterivATI),
+ TABLE_ENTRY(TexBumpParameterfvATI),
+ TABLE_ENTRY(TexBumpParameterivATI),
TABLE_ENTRY(AlphaFragmentOp1ATI),
TABLE_ENTRY(AlphaFragmentOp2ATI),
TABLE_ENTRY(AlphaFragmentOp3ATI),
@@ -6235,19 +7275,21 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(SetFragmentShaderConstantATI),
TABLE_ENTRY(PointParameteriNV),
TABLE_ENTRY(PointParameterivNV),
- TABLE_ENTRY(_dispatch_stub_733),
- TABLE_ENTRY(_dispatch_stub_734),
- TABLE_ENTRY(_dispatch_stub_735),
- TABLE_ENTRY(_dispatch_stub_736),
- TABLE_ENTRY(_dispatch_stub_737),
+ TABLE_ENTRY(_dispatch_stub_784),
+ TABLE_ENTRY(_dispatch_stub_785),
+ TABLE_ENTRY(_dispatch_stub_786),
+ TABLE_ENTRY(_dispatch_stub_787),
+ TABLE_ENTRY(_dispatch_stub_788),
TABLE_ENTRY(GetProgramNamedParameterdvNV),
TABLE_ENTRY(GetProgramNamedParameterfvNV),
TABLE_ENTRY(ProgramNamedParameter4dNV),
TABLE_ENTRY(ProgramNamedParameter4dvNV),
TABLE_ENTRY(ProgramNamedParameter4fNV),
TABLE_ENTRY(ProgramNamedParameter4fvNV),
- TABLE_ENTRY(_dispatch_stub_744),
- TABLE_ENTRY(_dispatch_stub_745),
+ TABLE_ENTRY(PrimitiveRestartIndexNV),
+ TABLE_ENTRY(PrimitiveRestartNV),
+ TABLE_ENTRY(_dispatch_stub_797),
+ TABLE_ENTRY(_dispatch_stub_798),
TABLE_ENTRY(BindFramebufferEXT),
TABLE_ENTRY(BindRenderbufferEXT),
TABLE_ENTRY(CheckFramebufferStatusEXT),
@@ -6265,13 +7307,82 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(IsFramebufferEXT),
TABLE_ENTRY(IsRenderbufferEXT),
TABLE_ENTRY(RenderbufferStorageEXT),
- TABLE_ENTRY(_dispatch_stub_763),
+ TABLE_ENTRY(_dispatch_stub_816),
+ TABLE_ENTRY(_dispatch_stub_817),
+ TABLE_ENTRY(_dispatch_stub_818),
+ TABLE_ENTRY(BindFragDataLocationEXT),
+ TABLE_ENTRY(GetFragDataLocationEXT),
+ TABLE_ENTRY(GetUniformuivEXT),
+ TABLE_ENTRY(GetVertexAttribIivEXT),
+ TABLE_ENTRY(GetVertexAttribIuivEXT),
+ TABLE_ENTRY(Uniform1uiEXT),
+ TABLE_ENTRY(Uniform1uivEXT),
+ TABLE_ENTRY(Uniform2uiEXT),
+ TABLE_ENTRY(Uniform2uivEXT),
+ TABLE_ENTRY(Uniform3uiEXT),
+ TABLE_ENTRY(Uniform3uivEXT),
+ TABLE_ENTRY(Uniform4uiEXT),
+ TABLE_ENTRY(Uniform4uivEXT),
+ TABLE_ENTRY(VertexAttribI1iEXT),
+ TABLE_ENTRY(VertexAttribI1ivEXT),
+ TABLE_ENTRY(VertexAttribI1uiEXT),
+ TABLE_ENTRY(VertexAttribI1uivEXT),
+ TABLE_ENTRY(VertexAttribI2iEXT),
+ TABLE_ENTRY(VertexAttribI2ivEXT),
+ TABLE_ENTRY(VertexAttribI2uiEXT),
+ TABLE_ENTRY(VertexAttribI2uivEXT),
+ TABLE_ENTRY(VertexAttribI3iEXT),
+ TABLE_ENTRY(VertexAttribI3ivEXT),
+ TABLE_ENTRY(VertexAttribI3uiEXT),
+ TABLE_ENTRY(VertexAttribI3uivEXT),
+ TABLE_ENTRY(VertexAttribI4bvEXT),
+ TABLE_ENTRY(VertexAttribI4iEXT),
+ TABLE_ENTRY(VertexAttribI4ivEXT),
+ TABLE_ENTRY(VertexAttribI4svEXT),
+ TABLE_ENTRY(VertexAttribI4ubvEXT),
+ TABLE_ENTRY(VertexAttribI4uiEXT),
+ TABLE_ENTRY(VertexAttribI4uivEXT),
+ TABLE_ENTRY(VertexAttribI4usvEXT),
+ TABLE_ENTRY(VertexAttribIPointerEXT),
TABLE_ENTRY(FramebufferTextureLayerEXT),
- TABLE_ENTRY(_dispatch_stub_765),
- TABLE_ENTRY(_dispatch_stub_766),
- TABLE_ENTRY(_dispatch_stub_767),
- TABLE_ENTRY(_dispatch_stub_768),
- TABLE_ENTRY(_dispatch_stub_769),
+ TABLE_ENTRY(ColorMaskIndexedEXT),
+ TABLE_ENTRY(DisableIndexedEXT),
+ TABLE_ENTRY(EnableIndexedEXT),
+ TABLE_ENTRY(GetBooleanIndexedvEXT),
+ TABLE_ENTRY(GetIntegerIndexedvEXT),
+ TABLE_ENTRY(IsEnabledIndexedEXT),
+ TABLE_ENTRY(ClearColorIiEXT),
+ TABLE_ENTRY(ClearColorIuiEXT),
+ TABLE_ENTRY(GetTexParameterIivEXT),
+ TABLE_ENTRY(GetTexParameterIuivEXT),
+ TABLE_ENTRY(TexParameterIivEXT),
+ TABLE_ENTRY(TexParameterIuivEXT),
+ TABLE_ENTRY(BeginConditionalRenderNV),
+ TABLE_ENTRY(EndConditionalRenderNV),
+ TABLE_ENTRY(BeginTransformFeedbackEXT),
+ TABLE_ENTRY(BindBufferBaseEXT),
+ TABLE_ENTRY(BindBufferOffsetEXT),
+ TABLE_ENTRY(BindBufferRangeEXT),
+ TABLE_ENTRY(EndTransformFeedbackEXT),
+ TABLE_ENTRY(GetTransformFeedbackVaryingEXT),
+ TABLE_ENTRY(TransformFeedbackVaryingsEXT),
+ TABLE_ENTRY(ProvokingVertexEXT),
+ TABLE_ENTRY(_dispatch_stub_876),
+ TABLE_ENTRY(_dispatch_stub_877),
+ TABLE_ENTRY(GetObjectParameterivAPPLE),
+ TABLE_ENTRY(ObjectPurgeableAPPLE),
+ TABLE_ENTRY(ObjectUnpurgeableAPPLE),
+ TABLE_ENTRY(ActiveProgramEXT),
+ TABLE_ENTRY(CreateShaderProgramEXT),
+ TABLE_ENTRY(UseShaderProgramEXT),
+ TABLE_ENTRY(TextureBarrierNV),
+ TABLE_ENTRY(_dispatch_stub_885),
+ TABLE_ENTRY(_dispatch_stub_886),
+ TABLE_ENTRY(_dispatch_stub_887),
+ TABLE_ENTRY(_dispatch_stub_888),
+ TABLE_ENTRY(_dispatch_stub_889),
+ TABLE_ENTRY(EGLImageTargetRenderbufferStorageOES),
+ TABLE_ENTRY(EGLImageTargetTexture2DOES),
/* A whole bunch of no-op functions. These might be called
* when someone tries to call a dynamically-registered
* extension function without a current rendering context.
@@ -6384,27 +7495,16 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
* We list the functions which are not otherwise used.
*/
#ifdef UNUSED_TABLE_NAME
-static _glapi_proc UNUSED_TABLE_NAME[] = {
+_glapi_proc UNUSED_TABLE_NAME[] = {
+#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
TABLE_ENTRY(ArrayElementEXT),
TABLE_ENTRY(BindTextureEXT),
TABLE_ENTRY(DrawArraysEXT),
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(AreTexturesResidentEXT),
-#endif
TABLE_ENTRY(CopyTexImage1DEXT),
TABLE_ENTRY(CopyTexImage2DEXT),
TABLE_ENTRY(CopyTexSubImage1DEXT),
TABLE_ENTRY(CopyTexSubImage2DEXT),
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(DeleteTexturesEXT),
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(GenTexturesEXT),
-#endif
TABLE_ENTRY(GetPointervEXT),
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(IsTextureEXT),
-#endif
TABLE_ENTRY(PrioritizeTexturesEXT),
TABLE_ENTRY(TexSubImage1DEXT),
TABLE_ENTRY(TexSubImage2DEXT),
@@ -6412,15 +7512,25 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(BlendEquationEXT),
TABLE_ENTRY(DrawRangeElementsEXT),
TABLE_ENTRY(ColorTableEXT),
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(GetColorTableEXT),
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(GetColorTableParameterfvEXT),
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(GetColorTableParameterivEXT),
-#endif
+ TABLE_ENTRY(_dispatch_stub_339),
+ TABLE_ENTRY(_dispatch_stub_340),
+ TABLE_ENTRY(_dispatch_stub_341),
+ TABLE_ENTRY(_dispatch_stub_342),
+ TABLE_ENTRY(_dispatch_stub_346),
+ TABLE_ENTRY(_dispatch_stub_347),
+ TABLE_ENTRY(_dispatch_stub_348),
+ TABLE_ENTRY(_dispatch_stub_349),
+ TABLE_ENTRY(_dispatch_stub_350),
+ TABLE_ENTRY(_dispatch_stub_351),
+ TABLE_ENTRY(_dispatch_stub_352),
+ TABLE_ENTRY(_dispatch_stub_353),
+ TABLE_ENTRY(_dispatch_stub_354),
+ TABLE_ENTRY(_dispatch_stub_355),
+ TABLE_ENTRY(_dispatch_stub_360),
+ TABLE_ENTRY(_dispatch_stub_367),
+ TABLE_ENTRY(_dispatch_stub_368),
+ TABLE_ENTRY(_dispatch_stub_369),
+ TABLE_ENTRY(_dispatch_stub_370),
TABLE_ENTRY(TexImage3DEXT),
TABLE_ENTRY(TexSubImage3DEXT),
TABLE_ENTRY(CopyTexSubImage3DEXT),
@@ -6458,6 +7568,7 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(MultiTexCoord4iv),
TABLE_ENTRY(MultiTexCoord4s),
TABLE_ENTRY(MultiTexCoord4sv),
+ TABLE_ENTRY(_dispatch_stub_423),
TABLE_ENTRY(LoadTransposeMatrixd),
TABLE_ENTRY(LoadTransposeMatrixf),
TABLE_ENTRY(MultTransposeMatrixd),
@@ -6569,10 +7680,17 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(GetAttribLocation),
TABLE_ENTRY(DrawBuffers),
TABLE_ENTRY(DrawBuffersATI),
+ TABLE_ENTRY(DrawArraysInstancedEXT),
+ TABLE_ENTRY(DrawArraysInstanced),
+ TABLE_ENTRY(DrawElementsInstancedEXT),
+ TABLE_ENTRY(DrawElementsInstanced),
+ TABLE_ENTRY(RenderbufferStorageMultisampleEXT),
TABLE_ENTRY(PointParameterf),
TABLE_ENTRY(PointParameterfARB),
+ TABLE_ENTRY(_dispatch_stub_625),
TABLE_ENTRY(PointParameterfv),
TABLE_ENTRY(PointParameterfvARB),
+ TABLE_ENTRY(_dispatch_stub_626),
TABLE_ENTRY(SecondaryColor3b),
TABLE_ENTRY(SecondaryColor3bv),
TABLE_ENTRY(SecondaryColor3d),
@@ -6598,6 +7716,7 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(FogCoordf),
TABLE_ENTRY(FogCoordfv),
TABLE_ENTRY(BlendFuncSeparate),
+ TABLE_ENTRY(_dispatch_stub_654),
TABLE_ENTRY(WindowPos2d),
TABLE_ENTRY(WindowPos2dARB),
TABLE_ENTRY(WindowPos2dv),
@@ -6638,7 +7757,105 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(IsProgramARB),
TABLE_ENTRY(PointParameteri),
TABLE_ENTRY(PointParameteriv),
+ TABLE_ENTRY(DeleteVertexArrays),
+ TABLE_ENTRY(IsVertexArray),
+ TABLE_ENTRY(PrimitiveRestartIndex),
TABLE_ENTRY(BlendEquationSeparate),
+ TABLE_ENTRY(BindFramebuffer),
+ TABLE_ENTRY(BindRenderbuffer),
+ TABLE_ENTRY(CheckFramebufferStatus),
+ TABLE_ENTRY(DeleteFramebuffers),
+ TABLE_ENTRY(DeleteRenderbuffers),
+ TABLE_ENTRY(FramebufferRenderbuffer),
+ TABLE_ENTRY(FramebufferTexture1D),
+ TABLE_ENTRY(FramebufferTexture2D),
+ TABLE_ENTRY(FramebufferTexture3D),
+ TABLE_ENTRY(GenFramebuffers),
+ TABLE_ENTRY(GenRenderbuffers),
+ TABLE_ENTRY(GenerateMipmap),
+ TABLE_ENTRY(GetFramebufferAttachmentParameteriv),
+ TABLE_ENTRY(GetRenderbufferParameteriv),
+ TABLE_ENTRY(IsFramebuffer),
+ TABLE_ENTRY(IsRenderbuffer),
+ TABLE_ENTRY(RenderbufferStorage),
+ TABLE_ENTRY(BlitFramebuffer),
+ TABLE_ENTRY(BindFragDataLocation),
+ TABLE_ENTRY(GetFragDataLocation),
+ TABLE_ENTRY(GetUniformuiv),
+ TABLE_ENTRY(GetVertexAttribIiv),
+ TABLE_ENTRY(GetVertexAttribIuiv),
+ TABLE_ENTRY(Uniform1ui),
+ TABLE_ENTRY(Uniform1uiv),
+ TABLE_ENTRY(Uniform2ui),
+ TABLE_ENTRY(Uniform2uiv),
+ TABLE_ENTRY(Uniform3ui),
+ TABLE_ENTRY(Uniform3uiv),
+ TABLE_ENTRY(Uniform4ui),
+ TABLE_ENTRY(Uniform4uiv),
+ TABLE_ENTRY(VertexAttribI1i),
+ TABLE_ENTRY(VertexAttribI1iv),
+ TABLE_ENTRY(VertexAttribI1ui),
+ TABLE_ENTRY(VertexAttribI1uiv),
+ TABLE_ENTRY(VertexAttribI2i),
+ TABLE_ENTRY(VertexAttribI2iv),
+ TABLE_ENTRY(VertexAttribI2ui),
+ TABLE_ENTRY(VertexAttribI2uiv),
+ TABLE_ENTRY(VertexAttribI3i),
+ TABLE_ENTRY(VertexAttribI3iv),
+ TABLE_ENTRY(VertexAttribI3ui),
+ TABLE_ENTRY(VertexAttribI3uiv),
+ TABLE_ENTRY(VertexAttribI4bv),
+ TABLE_ENTRY(VertexAttribI4i),
+ TABLE_ENTRY(VertexAttribI4iv),
+ TABLE_ENTRY(VertexAttribI4sv),
+ TABLE_ENTRY(VertexAttribI4ubv),
+ TABLE_ENTRY(VertexAttribI4ui),
+ TABLE_ENTRY(VertexAttribI4uiv),
+ TABLE_ENTRY(VertexAttribI4usv),
+ TABLE_ENTRY(VertexAttribIPointer),
+ TABLE_ENTRY(FramebufferTextureLayer),
+ TABLE_ENTRY(ColorMaski),
+ TABLE_ENTRY(Disablei),
+ TABLE_ENTRY(Enablei),
+ TABLE_ENTRY(GetBooleani_v),
+ TABLE_ENTRY(GetIntegeri_v),
+ TABLE_ENTRY(IsEnabledi),
+ TABLE_ENTRY(GetTexParameterIiv),
+ TABLE_ENTRY(GetTexParameterIuiv),
+ TABLE_ENTRY(TexParameterIiv),
+ TABLE_ENTRY(TexParameterIuiv),
+ TABLE_ENTRY(BeginConditionalRender),
+ TABLE_ENTRY(EndConditionalRender),
+ TABLE_ENTRY(BeginTransformFeedback),
+ TABLE_ENTRY(BindBufferBase),
+ TABLE_ENTRY(BindBufferRange),
+ TABLE_ENTRY(EndTransformFeedback),
+ TABLE_ENTRY(GetTransformFeedbackVarying),
+ TABLE_ENTRY(TransformFeedbackVaryings),
+ TABLE_ENTRY(ProvokingVertex),
+#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */
+#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS
+ TABLE_ENTRY(AreTexturesResidentEXT),
+ TABLE_ENTRY(DeleteTexturesEXT),
+ TABLE_ENTRY(GenTexturesEXT),
+ TABLE_ENTRY(IsTextureEXT),
+ TABLE_ENTRY(GetColorTableEXT),
+ TABLE_ENTRY(_dispatch_stub_343),
+ TABLE_ENTRY(GetColorTableParameterfvEXT),
+ TABLE_ENTRY(_dispatch_stub_344),
+ TABLE_ENTRY(GetColorTableParameterivEXT),
+ TABLE_ENTRY(_dispatch_stub_345),
+ TABLE_ENTRY(_dispatch_stub_356),
+ TABLE_ENTRY(_dispatch_stub_357),
+ TABLE_ENTRY(_dispatch_stub_358),
+ TABLE_ENTRY(_dispatch_stub_359),
+ TABLE_ENTRY(_dispatch_stub_361),
+ TABLE_ENTRY(_dispatch_stub_362),
+ TABLE_ENTRY(_dispatch_stub_363),
+ TABLE_ENTRY(_dispatch_stub_364),
+ TABLE_ENTRY(_dispatch_stub_365),
+ TABLE_ENTRY(_dispatch_stub_366),
+#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */
};
#endif /*UNUSED_TABLE_NAME*/
diff --git a/xorg-server/glx/glheader.h b/xorg-server/glx/glheader.h
new file mode 100644
index 000000000..1c0ee2c9e
--- /dev/null
+++ b/xorg-server/glx/glheader.h
@@ -0,0 +1,24 @@
+#ifndef __GLHEADER_H__
+#define __GLHEADER_H__
+
+#define STDC_HEADERS 1
+
+#include <X11/Xwinsock.h>
+#include <X11/Xwindows.h>
+#include <assert.h>
+#define strcasecmp _stricmp
+
+#undef MINSHORT
+#undef MAXSHORT
+
+#define MINSHORT -32768
+#define MAXSHORT 32767
+
+#define PUBLIC
+
+#define GL_GLEXT_PROTOTYPES
+
+#define DRI_DRIVER_PATH "/usr/lib/dri"
+
+#endif
+
diff --git a/xorg-server/glx/glprocs.h b/xorg-server/glx/glprocs.h
index 5a99d505e..46c0696e0 100644
--- a/xorg-server/glx/glprocs.h
+++ b/xorg-server/glx/glprocs.h
@@ -1,2260 +1,2667 @@
-/* DO NOT EDIT - This file generated automatically by gl_procs.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004, 2006
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sub license,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-
-/* This file is only included by glapi.c and is used for
- * the GetProcAddress() function
- */
-
-typedef struct {
- GLint Name_offset;
-#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)
- _glapi_proc Address;
-#endif
- GLuint Offset;
-} glprocs_table_t;
-
-#if !defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , o }
-#elif defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f1 , o }
-#elif defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f2 , o }
-#elif !defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f3 , o }
-#endif
-
-
-
-static const char gl_string_table[] =
- "glNewList\0"
- "glEndList\0"
- "glCallList\0"
- "glCallLists\0"
- "glDeleteLists\0"
- "glGenLists\0"
- "glListBase\0"
- "glBegin\0"
- "glBitmap\0"
- "glColor3b\0"
- "glColor3bv\0"
- "glColor3d\0"
- "glColor3dv\0"
- "glColor3f\0"
- "glColor3fv\0"
- "glColor3i\0"
- "glColor3iv\0"
- "glColor3s\0"
- "glColor3sv\0"
- "glColor3ub\0"
- "glColor3ubv\0"
- "glColor3ui\0"
- "glColor3uiv\0"
- "glColor3us\0"
- "glColor3usv\0"
- "glColor4b\0"
- "glColor4bv\0"
- "glColor4d\0"
- "glColor4dv\0"
- "glColor4f\0"
- "glColor4fv\0"
- "glColor4i\0"
- "glColor4iv\0"
- "glColor4s\0"
- "glColor4sv\0"
- "glColor4ub\0"
- "glColor4ubv\0"
- "glColor4ui\0"
- "glColor4uiv\0"
- "glColor4us\0"
- "glColor4usv\0"
- "glEdgeFlag\0"
- "glEdgeFlagv\0"
- "glEnd\0"
- "glIndexd\0"
- "glIndexdv\0"
- "glIndexf\0"
- "glIndexfv\0"
- "glIndexi\0"
- "glIndexiv\0"
- "glIndexs\0"
- "glIndexsv\0"
- "glNormal3b\0"
- "glNormal3bv\0"
- "glNormal3d\0"
- "glNormal3dv\0"
- "glNormal3f\0"
- "glNormal3fv\0"
- "glNormal3i\0"
- "glNormal3iv\0"
- "glNormal3s\0"
- "glNormal3sv\0"
- "glRasterPos2d\0"
- "glRasterPos2dv\0"
- "glRasterPos2f\0"
- "glRasterPos2fv\0"
- "glRasterPos2i\0"
- "glRasterPos2iv\0"
- "glRasterPos2s\0"
- "glRasterPos2sv\0"
- "glRasterPos3d\0"
- "glRasterPos3dv\0"
- "glRasterPos3f\0"
- "glRasterPos3fv\0"
- "glRasterPos3i\0"
- "glRasterPos3iv\0"
- "glRasterPos3s\0"
- "glRasterPos3sv\0"
- "glRasterPos4d\0"
- "glRasterPos4dv\0"
- "glRasterPos4f\0"
- "glRasterPos4fv\0"
- "glRasterPos4i\0"
- "glRasterPos4iv\0"
- "glRasterPos4s\0"
- "glRasterPos4sv\0"
- "glRectd\0"
- "glRectdv\0"
- "glRectf\0"
- "glRectfv\0"
- "glRecti\0"
- "glRectiv\0"
- "glRects\0"
- "glRectsv\0"
- "glTexCoord1d\0"
- "glTexCoord1dv\0"
- "glTexCoord1f\0"
- "glTexCoord1fv\0"
- "glTexCoord1i\0"
- "glTexCoord1iv\0"
- "glTexCoord1s\0"
- "glTexCoord1sv\0"
- "glTexCoord2d\0"
- "glTexCoord2dv\0"
- "glTexCoord2f\0"
- "glTexCoord2fv\0"
- "glTexCoord2i\0"
- "glTexCoord2iv\0"
- "glTexCoord2s\0"
- "glTexCoord2sv\0"
- "glTexCoord3d\0"
- "glTexCoord3dv\0"
- "glTexCoord3f\0"
- "glTexCoord3fv\0"
- "glTexCoord3i\0"
- "glTexCoord3iv\0"
- "glTexCoord3s\0"
- "glTexCoord3sv\0"
- "glTexCoord4d\0"
- "glTexCoord4dv\0"
- "glTexCoord4f\0"
- "glTexCoord4fv\0"
- "glTexCoord4i\0"
- "glTexCoord4iv\0"
- "glTexCoord4s\0"
- "glTexCoord4sv\0"
- "glVertex2d\0"
- "glVertex2dv\0"
- "glVertex2f\0"
- "glVertex2fv\0"
- "glVertex2i\0"
- "glVertex2iv\0"
- "glVertex2s\0"
- "glVertex2sv\0"
- "glVertex3d\0"
- "glVertex3dv\0"
- "glVertex3f\0"
- "glVertex3fv\0"
- "glVertex3i\0"
- "glVertex3iv\0"
- "glVertex3s\0"
- "glVertex3sv\0"
- "glVertex4d\0"
- "glVertex4dv\0"
- "glVertex4f\0"
- "glVertex4fv\0"
- "glVertex4i\0"
- "glVertex4iv\0"
- "glVertex4s\0"
- "glVertex4sv\0"
- "glClipPlane\0"
- "glColorMaterial\0"
- "glCullFace\0"
- "glFogf\0"
- "glFogfv\0"
- "glFogi\0"
- "glFogiv\0"
- "glFrontFace\0"
- "glHint\0"
- "glLightf\0"
- "glLightfv\0"
- "glLighti\0"
- "glLightiv\0"
- "glLightModelf\0"
- "glLightModelfv\0"
- "glLightModeli\0"
- "glLightModeliv\0"
- "glLineStipple\0"
- "glLineWidth\0"
- "glMaterialf\0"
- "glMaterialfv\0"
- "glMateriali\0"
- "glMaterialiv\0"
- "glPointSize\0"
- "glPolygonMode\0"
- "glPolygonStipple\0"
- "glScissor\0"
- "glShadeModel\0"
- "glTexParameterf\0"
- "glTexParameterfv\0"
- "glTexParameteri\0"
- "glTexParameteriv\0"
- "glTexImage1D\0"
- "glTexImage2D\0"
- "glTexEnvf\0"
- "glTexEnvfv\0"
- "glTexEnvi\0"
- "glTexEnviv\0"
- "glTexGend\0"
- "glTexGendv\0"
- "glTexGenf\0"
- "glTexGenfv\0"
- "glTexGeni\0"
- "glTexGeniv\0"
- "glFeedbackBuffer\0"
- "glSelectBuffer\0"
- "glRenderMode\0"
- "glInitNames\0"
- "glLoadName\0"
- "glPassThrough\0"
- "glPopName\0"
- "glPushName\0"
- "glDrawBuffer\0"
- "glClear\0"
- "glClearAccum\0"
- "glClearIndex\0"
- "glClearColor\0"
- "glClearStencil\0"
- "glClearDepth\0"
- "glStencilMask\0"
- "glColorMask\0"
- "glDepthMask\0"
- "glIndexMask\0"
- "glAccum\0"
- "glDisable\0"
- "glEnable\0"
- "glFinish\0"
- "glFlush\0"
- "glPopAttrib\0"
- "glPushAttrib\0"
- "glMap1d\0"
- "glMap1f\0"
- "glMap2d\0"
- "glMap2f\0"
- "glMapGrid1d\0"
- "glMapGrid1f\0"
- "glMapGrid2d\0"
- "glMapGrid2f\0"
- "glEvalCoord1d\0"
- "glEvalCoord1dv\0"
- "glEvalCoord1f\0"
- "glEvalCoord1fv\0"
- "glEvalCoord2d\0"
- "glEvalCoord2dv\0"
- "glEvalCoord2f\0"
- "glEvalCoord2fv\0"
- "glEvalMesh1\0"
- "glEvalPoint1\0"
- "glEvalMesh2\0"
- "glEvalPoint2\0"
- "glAlphaFunc\0"
- "glBlendFunc\0"
- "glLogicOp\0"
- "glStencilFunc\0"
- "glStencilOp\0"
- "glDepthFunc\0"
- "glPixelZoom\0"
- "glPixelTransferf\0"
- "glPixelTransferi\0"
- "glPixelStoref\0"
- "glPixelStorei\0"
- "glPixelMapfv\0"
- "glPixelMapuiv\0"
- "glPixelMapusv\0"
- "glReadBuffer\0"
- "glCopyPixels\0"
- "glReadPixels\0"
- "glDrawPixels\0"
- "glGetBooleanv\0"
- "glGetClipPlane\0"
- "glGetDoublev\0"
- "glGetError\0"
- "glGetFloatv\0"
- "glGetIntegerv\0"
- "glGetLightfv\0"
- "glGetLightiv\0"
- "glGetMapdv\0"
- "glGetMapfv\0"
- "glGetMapiv\0"
- "glGetMaterialfv\0"
- "glGetMaterialiv\0"
- "glGetPixelMapfv\0"
- "glGetPixelMapuiv\0"
- "glGetPixelMapusv\0"
- "glGetPolygonStipple\0"
- "glGetString\0"
- "glGetTexEnvfv\0"
- "glGetTexEnviv\0"
- "glGetTexGendv\0"
- "glGetTexGenfv\0"
- "glGetTexGeniv\0"
- "glGetTexImage\0"
- "glGetTexParameterfv\0"
- "glGetTexParameteriv\0"
- "glGetTexLevelParameterfv\0"
- "glGetTexLevelParameteriv\0"
- "glIsEnabled\0"
- "glIsList\0"
- "glDepthRange\0"
- "glFrustum\0"
- "glLoadIdentity\0"
- "glLoadMatrixf\0"
- "glLoadMatrixd\0"
- "glMatrixMode\0"
- "glMultMatrixf\0"
- "glMultMatrixd\0"
- "glOrtho\0"
- "glPopMatrix\0"
- "glPushMatrix\0"
- "glRotated\0"
- "glRotatef\0"
- "glScaled\0"
- "glScalef\0"
- "glTranslated\0"
- "glTranslatef\0"
- "glViewport\0"
- "glArrayElement\0"
- "glBindTexture\0"
- "glColorPointer\0"
- "glDisableClientState\0"
- "glDrawArrays\0"
- "glDrawElements\0"
- "glEdgeFlagPointer\0"
- "glEnableClientState\0"
- "glIndexPointer\0"
- "glIndexub\0"
- "glIndexubv\0"
- "glInterleavedArrays\0"
- "glNormalPointer\0"
- "glPolygonOffset\0"
- "glTexCoordPointer\0"
- "glVertexPointer\0"
- "glAreTexturesResident\0"
- "glCopyTexImage1D\0"
- "glCopyTexImage2D\0"
- "glCopyTexSubImage1D\0"
- "glCopyTexSubImage2D\0"
- "glDeleteTextures\0"
- "glGenTextures\0"
- "glGetPointerv\0"
- "glIsTexture\0"
- "glPrioritizeTextures\0"
- "glTexSubImage1D\0"
- "glTexSubImage2D\0"
- "glPopClientAttrib\0"
- "glPushClientAttrib\0"
- "glBlendColor\0"
- "glBlendEquation\0"
- "glDrawRangeElements\0"
- "glColorTable\0"
- "glColorTableParameterfv\0"
- "glColorTableParameteriv\0"
- "glCopyColorTable\0"
- "glGetColorTable\0"
- "glGetColorTableParameterfv\0"
- "glGetColorTableParameteriv\0"
- "glColorSubTable\0"
- "glCopyColorSubTable\0"
- "glConvolutionFilter1D\0"
- "glConvolutionFilter2D\0"
- "glConvolutionParameterf\0"
- "glConvolutionParameterfv\0"
- "glConvolutionParameteri\0"
- "glConvolutionParameteriv\0"
- "glCopyConvolutionFilter1D\0"
- "glCopyConvolutionFilter2D\0"
- "glGetConvolutionFilter\0"
- "glGetConvolutionParameterfv\0"
- "glGetConvolutionParameteriv\0"
- "glGetSeparableFilter\0"
- "glSeparableFilter2D\0"
- "glGetHistogram\0"
- "glGetHistogramParameterfv\0"
- "glGetHistogramParameteriv\0"
- "glGetMinmax\0"
- "glGetMinmaxParameterfv\0"
- "glGetMinmaxParameteriv\0"
- "glHistogram\0"
- "glMinmax\0"
- "glResetHistogram\0"
- "glResetMinmax\0"
- "glTexImage3D\0"
- "glTexSubImage3D\0"
- "glCopyTexSubImage3D\0"
- "glActiveTextureARB\0"
- "glClientActiveTextureARB\0"
- "glMultiTexCoord1dARB\0"
- "glMultiTexCoord1dvARB\0"
- "glMultiTexCoord1fARB\0"
- "glMultiTexCoord1fvARB\0"
- "glMultiTexCoord1iARB\0"
- "glMultiTexCoord1ivARB\0"
- "glMultiTexCoord1sARB\0"
- "glMultiTexCoord1svARB\0"
- "glMultiTexCoord2dARB\0"
- "glMultiTexCoord2dvARB\0"
- "glMultiTexCoord2fARB\0"
- "glMultiTexCoord2fvARB\0"
- "glMultiTexCoord2iARB\0"
- "glMultiTexCoord2ivARB\0"
- "glMultiTexCoord2sARB\0"
- "glMultiTexCoord2svARB\0"
- "glMultiTexCoord3dARB\0"
- "glMultiTexCoord3dvARB\0"
- "glMultiTexCoord3fARB\0"
- "glMultiTexCoord3fvARB\0"
- "glMultiTexCoord3iARB\0"
- "glMultiTexCoord3ivARB\0"
- "glMultiTexCoord3sARB\0"
- "glMultiTexCoord3svARB\0"
- "glMultiTexCoord4dARB\0"
- "glMultiTexCoord4dvARB\0"
- "glMultiTexCoord4fARB\0"
- "glMultiTexCoord4fvARB\0"
- "glMultiTexCoord4iARB\0"
- "glMultiTexCoord4ivARB\0"
- "glMultiTexCoord4sARB\0"
- "glMultiTexCoord4svARB\0"
- "glAttachShader\0"
- "glCreateProgram\0"
- "glCreateShader\0"
- "glDeleteProgram\0"
- "glDeleteShader\0"
- "glDetachShader\0"
- "glGetAttachedShaders\0"
- "glGetProgramInfoLog\0"
- "glGetProgramiv\0"
- "glGetShaderInfoLog\0"
- "glGetShaderiv\0"
- "glIsProgram\0"
- "glIsShader\0"
- "glStencilFuncSeparate\0"
- "glStencilMaskSeparate\0"
- "glStencilOpSeparate\0"
- "glUniformMatrix2x3fv\0"
- "glUniformMatrix2x4fv\0"
- "glUniformMatrix3x2fv\0"
- "glUniformMatrix3x4fv\0"
- "glUniformMatrix4x2fv\0"
- "glUniformMatrix4x3fv\0"
- "glLoadTransposeMatrixdARB\0"
- "glLoadTransposeMatrixfARB\0"
- "glMultTransposeMatrixdARB\0"
- "glMultTransposeMatrixfARB\0"
- "glSampleCoverageARB\0"
- "glCompressedTexImage1DARB\0"
- "glCompressedTexImage2DARB\0"
- "glCompressedTexImage3DARB\0"
- "glCompressedTexSubImage1DARB\0"
- "glCompressedTexSubImage2DARB\0"
- "glCompressedTexSubImage3DARB\0"
- "glGetCompressedTexImageARB\0"
- "glDisableVertexAttribArrayARB\0"
- "glEnableVertexAttribArrayARB\0"
- "glGetProgramEnvParameterdvARB\0"
- "glGetProgramEnvParameterfvARB\0"
- "glGetProgramLocalParameterdvARB\0"
- "glGetProgramLocalParameterfvARB\0"
- "glGetProgramStringARB\0"
- "glGetProgramivARB\0"
- "glGetVertexAttribdvARB\0"
- "glGetVertexAttribfvARB\0"
- "glGetVertexAttribivARB\0"
- "glProgramEnvParameter4dARB\0"
- "glProgramEnvParameter4dvARB\0"
- "glProgramEnvParameter4fARB\0"
- "glProgramEnvParameter4fvARB\0"
- "glProgramLocalParameter4dARB\0"
- "glProgramLocalParameter4dvARB\0"
- "glProgramLocalParameter4fARB\0"
- "glProgramLocalParameter4fvARB\0"
- "glProgramStringARB\0"
- "glVertexAttrib1dARB\0"
- "glVertexAttrib1dvARB\0"
- "glVertexAttrib1fARB\0"
- "glVertexAttrib1fvARB\0"
- "glVertexAttrib1sARB\0"
- "glVertexAttrib1svARB\0"
- "glVertexAttrib2dARB\0"
- "glVertexAttrib2dvARB\0"
- "glVertexAttrib2fARB\0"
- "glVertexAttrib2fvARB\0"
- "glVertexAttrib2sARB\0"
- "glVertexAttrib2svARB\0"
- "glVertexAttrib3dARB\0"
- "glVertexAttrib3dvARB\0"
- "glVertexAttrib3fARB\0"
- "glVertexAttrib3fvARB\0"
- "glVertexAttrib3sARB\0"
- "glVertexAttrib3svARB\0"
- "glVertexAttrib4NbvARB\0"
- "glVertexAttrib4NivARB\0"
- "glVertexAttrib4NsvARB\0"
- "glVertexAttrib4NubARB\0"
- "glVertexAttrib4NubvARB\0"
- "glVertexAttrib4NuivARB\0"
- "glVertexAttrib4NusvARB\0"
- "glVertexAttrib4bvARB\0"
- "glVertexAttrib4dARB\0"
- "glVertexAttrib4dvARB\0"
- "glVertexAttrib4fARB\0"
- "glVertexAttrib4fvARB\0"
- "glVertexAttrib4ivARB\0"
- "glVertexAttrib4sARB\0"
- "glVertexAttrib4svARB\0"
- "glVertexAttrib4ubvARB\0"
- "glVertexAttrib4uivARB\0"
- "glVertexAttrib4usvARB\0"
- "glVertexAttribPointerARB\0"
- "glBindBufferARB\0"
- "glBufferDataARB\0"
- "glBufferSubDataARB\0"
- "glDeleteBuffersARB\0"
- "glGenBuffersARB\0"
- "glGetBufferParameterivARB\0"
- "glGetBufferPointervARB\0"
- "glGetBufferSubDataARB\0"
- "glIsBufferARB\0"
- "glMapBufferARB\0"
- "glUnmapBufferARB\0"
- "glBeginQueryARB\0"
- "glDeleteQueriesARB\0"
- "glEndQueryARB\0"
- "glGenQueriesARB\0"
- "glGetQueryObjectivARB\0"
- "glGetQueryObjectuivARB\0"
- "glGetQueryivARB\0"
- "glIsQueryARB\0"
- "glAttachObjectARB\0"
- "glCompileShaderARB\0"
- "glCreateProgramObjectARB\0"
- "glCreateShaderObjectARB\0"
- "glDeleteObjectARB\0"
- "glDetachObjectARB\0"
- "glGetActiveUniformARB\0"
- "glGetAttachedObjectsARB\0"
- "glGetHandleARB\0"
- "glGetInfoLogARB\0"
- "glGetObjectParameterfvARB\0"
- "glGetObjectParameterivARB\0"
- "glGetShaderSourceARB\0"
- "glGetUniformLocationARB\0"
- "glGetUniformfvARB\0"
- "glGetUniformivARB\0"
- "glLinkProgramARB\0"
- "glShaderSourceARB\0"
- "glUniform1fARB\0"
- "glUniform1fvARB\0"
- "glUniform1iARB\0"
- "glUniform1ivARB\0"
- "glUniform2fARB\0"
- "glUniform2fvARB\0"
- "glUniform2iARB\0"
- "glUniform2ivARB\0"
- "glUniform3fARB\0"
- "glUniform3fvARB\0"
- "glUniform3iARB\0"
- "glUniform3ivARB\0"
- "glUniform4fARB\0"
- "glUniform4fvARB\0"
- "glUniform4iARB\0"
- "glUniform4ivARB\0"
- "glUniformMatrix2fvARB\0"
- "glUniformMatrix3fvARB\0"
- "glUniformMatrix4fvARB\0"
- "glUseProgramObjectARB\0"
- "glValidateProgramARB\0"
- "glBindAttribLocationARB\0"
- "glGetActiveAttribARB\0"
- "glGetAttribLocationARB\0"
- "glDrawBuffersARB\0"
- "glPolygonOffsetEXT\0"
- "glGetPixelTexGenParameterfvSGIS\0"
- "glGetPixelTexGenParameterivSGIS\0"
- "glPixelTexGenParameterfSGIS\0"
- "glPixelTexGenParameterfvSGIS\0"
- "glPixelTexGenParameteriSGIS\0"
- "glPixelTexGenParameterivSGIS\0"
- "glSampleMaskSGIS\0"
- "glSamplePatternSGIS\0"
- "glColorPointerEXT\0"
- "glEdgeFlagPointerEXT\0"
- "glIndexPointerEXT\0"
- "glNormalPointerEXT\0"
- "glTexCoordPointerEXT\0"
- "glVertexPointerEXT\0"
- "glPointParameterfEXT\0"
- "glPointParameterfvEXT\0"
- "glLockArraysEXT\0"
- "glUnlockArraysEXT\0"
- "glCullParameterdvEXT\0"
- "glCullParameterfvEXT\0"
- "glSecondaryColor3bEXT\0"
- "glSecondaryColor3bvEXT\0"
- "glSecondaryColor3dEXT\0"
- "glSecondaryColor3dvEXT\0"
- "glSecondaryColor3fEXT\0"
- "glSecondaryColor3fvEXT\0"
- "glSecondaryColor3iEXT\0"
- "glSecondaryColor3ivEXT\0"
- "glSecondaryColor3sEXT\0"
- "glSecondaryColor3svEXT\0"
- "glSecondaryColor3ubEXT\0"
- "glSecondaryColor3ubvEXT\0"
- "glSecondaryColor3uiEXT\0"
- "glSecondaryColor3uivEXT\0"
- "glSecondaryColor3usEXT\0"
- "glSecondaryColor3usvEXT\0"
- "glSecondaryColorPointerEXT\0"
- "glMultiDrawArraysEXT\0"
- "glMultiDrawElementsEXT\0"
- "glFogCoordPointerEXT\0"
- "glFogCoorddEXT\0"
- "glFogCoorddvEXT\0"
- "glFogCoordfEXT\0"
- "glFogCoordfvEXT\0"
- "glPixelTexGenSGIX\0"
- "glBlendFuncSeparateEXT\0"
- "glFlushVertexArrayRangeNV\0"
- "glVertexArrayRangeNV\0"
- "glCombinerInputNV\0"
- "glCombinerOutputNV\0"
- "glCombinerParameterfNV\0"
- "glCombinerParameterfvNV\0"
- "glCombinerParameteriNV\0"
- "glCombinerParameterivNV\0"
- "glFinalCombinerInputNV\0"
- "glGetCombinerInputParameterfvNV\0"
- "glGetCombinerInputParameterivNV\0"
- "glGetCombinerOutputParameterfvNV\0"
- "glGetCombinerOutputParameterivNV\0"
- "glGetFinalCombinerInputParameterfvNV\0"
- "glGetFinalCombinerInputParameterivNV\0"
- "glResizeBuffersMESA\0"
- "glWindowPos2dMESA\0"
- "glWindowPos2dvMESA\0"
- "glWindowPos2fMESA\0"
- "glWindowPos2fvMESA\0"
- "glWindowPos2iMESA\0"
- "glWindowPos2ivMESA\0"
- "glWindowPos2sMESA\0"
- "glWindowPos2svMESA\0"
- "glWindowPos3dMESA\0"
- "glWindowPos3dvMESA\0"
- "glWindowPos3fMESA\0"
- "glWindowPos3fvMESA\0"
- "glWindowPos3iMESA\0"
- "glWindowPos3ivMESA\0"
- "glWindowPos3sMESA\0"
- "glWindowPos3svMESA\0"
- "glWindowPos4dMESA\0"
- "glWindowPos4dvMESA\0"
- "glWindowPos4fMESA\0"
- "glWindowPos4fvMESA\0"
- "glWindowPos4iMESA\0"
- "glWindowPos4ivMESA\0"
- "glWindowPos4sMESA\0"
- "glWindowPos4svMESA\0"
- "glMultiModeDrawArraysIBM\0"
- "glMultiModeDrawElementsIBM\0"
- "glDeleteFencesNV\0"
- "glFinishFenceNV\0"
- "glGenFencesNV\0"
- "glGetFenceivNV\0"
- "glIsFenceNV\0"
- "glSetFenceNV\0"
- "glTestFenceNV\0"
- "glAreProgramsResidentNV\0"
- "glBindProgramNV\0"
- "glDeleteProgramsNV\0"
- "glExecuteProgramNV\0"
- "glGenProgramsNV\0"
- "glGetProgramParameterdvNV\0"
- "glGetProgramParameterfvNV\0"
- "glGetProgramStringNV\0"
- "glGetProgramivNV\0"
- "glGetTrackMatrixivNV\0"
- "glGetVertexAttribPointervNV\0"
- "glGetVertexAttribdvNV\0"
- "glGetVertexAttribfvNV\0"
- "glGetVertexAttribivNV\0"
- "glIsProgramNV\0"
- "glLoadProgramNV\0"
- "glProgramParameters4dvNV\0"
- "glProgramParameters4fvNV\0"
- "glRequestResidentProgramsNV\0"
- "glTrackMatrixNV\0"
- "glVertexAttrib1dNV\0"
- "glVertexAttrib1dvNV\0"
- "glVertexAttrib1fNV\0"
- "glVertexAttrib1fvNV\0"
- "glVertexAttrib1sNV\0"
- "glVertexAttrib1svNV\0"
- "glVertexAttrib2dNV\0"
- "glVertexAttrib2dvNV\0"
- "glVertexAttrib2fNV\0"
- "glVertexAttrib2fvNV\0"
- "glVertexAttrib2sNV\0"
- "glVertexAttrib2svNV\0"
- "glVertexAttrib3dNV\0"
- "glVertexAttrib3dvNV\0"
- "glVertexAttrib3fNV\0"
- "glVertexAttrib3fvNV\0"
- "glVertexAttrib3sNV\0"
- "glVertexAttrib3svNV\0"
- "glVertexAttrib4dNV\0"
- "glVertexAttrib4dvNV\0"
- "glVertexAttrib4fNV\0"
- "glVertexAttrib4fvNV\0"
- "glVertexAttrib4sNV\0"
- "glVertexAttrib4svNV\0"
- "glVertexAttrib4ubNV\0"
- "glVertexAttrib4ubvNV\0"
- "glVertexAttribPointerNV\0"
- "glVertexAttribs1dvNV\0"
- "glVertexAttribs1fvNV\0"
- "glVertexAttribs1svNV\0"
- "glVertexAttribs2dvNV\0"
- "glVertexAttribs2fvNV\0"
- "glVertexAttribs2svNV\0"
- "glVertexAttribs3dvNV\0"
- "glVertexAttribs3fvNV\0"
- "glVertexAttribs3svNV\0"
- "glVertexAttribs4dvNV\0"
- "glVertexAttribs4fvNV\0"
- "glVertexAttribs4svNV\0"
- "glVertexAttribs4ubvNV\0"
- "glAlphaFragmentOp1ATI\0"
- "glAlphaFragmentOp2ATI\0"
- "glAlphaFragmentOp3ATI\0"
- "glBeginFragmentShaderATI\0"
- "glBindFragmentShaderATI\0"
- "glColorFragmentOp1ATI\0"
- "glColorFragmentOp2ATI\0"
- "glColorFragmentOp3ATI\0"
- "glDeleteFragmentShaderATI\0"
- "glEndFragmentShaderATI\0"
- "glGenFragmentShadersATI\0"
- "glPassTexCoordATI\0"
- "glSampleMapATI\0"
- "glSetFragmentShaderConstantATI\0"
- "glPointParameteriNV\0"
- "glPointParameterivNV\0"
- "glActiveStencilFaceEXT\0"
- "glBindVertexArrayAPPLE\0"
- "glDeleteVertexArraysAPPLE\0"
- "glGenVertexArraysAPPLE\0"
- "glIsVertexArrayAPPLE\0"
- "glGetProgramNamedParameterdvNV\0"
- "glGetProgramNamedParameterfvNV\0"
- "glProgramNamedParameter4dNV\0"
- "glProgramNamedParameter4dvNV\0"
- "glProgramNamedParameter4fNV\0"
- "glProgramNamedParameter4fvNV\0"
- "glDepthBoundsEXT\0"
- "glBlendEquationSeparateEXT\0"
- "glBindFramebufferEXT\0"
- "glBindRenderbufferEXT\0"
- "glCheckFramebufferStatusEXT\0"
- "glDeleteFramebuffersEXT\0"
- "glDeleteRenderbuffersEXT\0"
- "glFramebufferRenderbufferEXT\0"
- "glFramebufferTexture1DEXT\0"
- "glFramebufferTexture2DEXT\0"
- "glFramebufferTexture3DEXT\0"
- "glGenFramebuffersEXT\0"
- "glGenRenderbuffersEXT\0"
- "glGenerateMipmapEXT\0"
- "glGetFramebufferAttachmentParameterivEXT\0"
- "glGetRenderbufferParameterivEXT\0"
- "glIsFramebufferEXT\0"
- "glIsRenderbufferEXT\0"
- "glRenderbufferStorageEXT\0"
- "glBlitFramebufferEXT\0"
- "glFramebufferTextureLayerEXT\0"
- "glStencilFuncSeparateATI\0"
- "glProgramEnvParameters4fvEXT\0"
- "glProgramLocalParameters4fvEXT\0"
- "glGetQueryObjecti64vEXT\0"
- "glGetQueryObjectui64vEXT\0"
- "glArrayElementEXT\0"
- "glBindTextureEXT\0"
- "glDrawArraysEXT\0"
- "glAreTexturesResidentEXT\0"
- "glCopyTexImage1DEXT\0"
- "glCopyTexImage2DEXT\0"
- "glCopyTexSubImage1DEXT\0"
- "glCopyTexSubImage2DEXT\0"
- "glDeleteTexturesEXT\0"
- "glGenTexturesEXT\0"
- "glGetPointervEXT\0"
- "glIsTextureEXT\0"
- "glPrioritizeTexturesEXT\0"
- "glTexSubImage1DEXT\0"
- "glTexSubImage2DEXT\0"
- "glBlendColorEXT\0"
- "glBlendEquationEXT\0"
- "glDrawRangeElementsEXT\0"
- "glColorTableSGI\0"
- "glColorTableEXT\0"
- "glColorTableParameterfvSGI\0"
- "glColorTableParameterivSGI\0"
- "glCopyColorTableSGI\0"
- "glGetColorTableSGI\0"
- "glGetColorTableEXT\0"
- "glGetColorTableParameterfvSGI\0"
- "glGetColorTableParameterfvEXT\0"
- "glGetColorTableParameterivSGI\0"
- "glGetColorTableParameterivEXT\0"
- "glColorSubTableEXT\0"
- "glCopyColorSubTableEXT\0"
- "glConvolutionFilter1DEXT\0"
- "glConvolutionFilter2DEXT\0"
- "glConvolutionParameterfEXT\0"
- "glConvolutionParameterfvEXT\0"
- "glConvolutionParameteriEXT\0"
- "glConvolutionParameterivEXT\0"
- "glCopyConvolutionFilter1DEXT\0"
- "glCopyConvolutionFilter2DEXT\0"
- "glGetConvolutionFilterEXT\0"
- "glGetConvolutionParameterfvEXT\0"
- "glGetConvolutionParameterivEXT\0"
- "glGetSeparableFilterEXT\0"
- "glSeparableFilter2DEXT\0"
- "glGetHistogramEXT\0"
- "glGetHistogramParameterfvEXT\0"
- "glGetHistogramParameterivEXT\0"
- "glGetMinmaxEXT\0"
- "glGetMinmaxParameterfvEXT\0"
- "glGetMinmaxParameterivEXT\0"
- "glHistogramEXT\0"
- "glMinmaxEXT\0"
- "glResetHistogramEXT\0"
- "glResetMinmaxEXT\0"
- "glTexImage3DEXT\0"
- "glTexSubImage3DEXT\0"
- "glCopyTexSubImage3DEXT\0"
- "glActiveTexture\0"
- "glClientActiveTexture\0"
- "glMultiTexCoord1d\0"
- "glMultiTexCoord1dv\0"
- "glMultiTexCoord1f\0"
- "glMultiTexCoord1fv\0"
- "glMultiTexCoord1i\0"
- "glMultiTexCoord1iv\0"
- "glMultiTexCoord1s\0"
- "glMultiTexCoord1sv\0"
- "glMultiTexCoord2d\0"
- "glMultiTexCoord2dv\0"
- "glMultiTexCoord2f\0"
- "glMultiTexCoord2fv\0"
- "glMultiTexCoord2i\0"
- "glMultiTexCoord2iv\0"
- "glMultiTexCoord2s\0"
- "glMultiTexCoord2sv\0"
- "glMultiTexCoord3d\0"
- "glMultiTexCoord3dv\0"
- "glMultiTexCoord3f\0"
- "glMultiTexCoord3fv\0"
- "glMultiTexCoord3i\0"
- "glMultiTexCoord3iv\0"
- "glMultiTexCoord3s\0"
- "glMultiTexCoord3sv\0"
- "glMultiTexCoord4d\0"
- "glMultiTexCoord4dv\0"
- "glMultiTexCoord4f\0"
- "glMultiTexCoord4fv\0"
- "glMultiTexCoord4i\0"
- "glMultiTexCoord4iv\0"
- "glMultiTexCoord4s\0"
- "glMultiTexCoord4sv\0"
- "glStencilOpSeparateATI\0"
- "glLoadTransposeMatrixd\0"
- "glLoadTransposeMatrixf\0"
- "glMultTransposeMatrixd\0"
- "glMultTransposeMatrixf\0"
- "glSampleCoverage\0"
- "glCompressedTexImage1D\0"
- "glCompressedTexImage2D\0"
- "glCompressedTexImage3D\0"
- "glCompressedTexSubImage1D\0"
- "glCompressedTexSubImage2D\0"
- "glCompressedTexSubImage3D\0"
- "glGetCompressedTexImage\0"
- "glDisableVertexAttribArray\0"
- "glEnableVertexAttribArray\0"
- "glGetVertexAttribdv\0"
- "glGetVertexAttribfv\0"
- "glGetVertexAttribiv\0"
- "glProgramParameter4dNV\0"
- "glProgramParameter4dvNV\0"
- "glProgramParameter4fNV\0"
- "glProgramParameter4fvNV\0"
- "glVertexAttrib1d\0"
- "glVertexAttrib1dv\0"
- "glVertexAttrib1f\0"
- "glVertexAttrib1fv\0"
- "glVertexAttrib1s\0"
- "glVertexAttrib1sv\0"
- "glVertexAttrib2d\0"
- "glVertexAttrib2dv\0"
- "glVertexAttrib2f\0"
- "glVertexAttrib2fv\0"
- "glVertexAttrib2s\0"
- "glVertexAttrib2sv\0"
- "glVertexAttrib3d\0"
- "glVertexAttrib3dv\0"
- "glVertexAttrib3f\0"
- "glVertexAttrib3fv\0"
- "glVertexAttrib3s\0"
- "glVertexAttrib3sv\0"
- "glVertexAttrib4Nbv\0"
- "glVertexAttrib4Niv\0"
- "glVertexAttrib4Nsv\0"
- "glVertexAttrib4Nub\0"
- "glVertexAttrib4Nubv\0"
- "glVertexAttrib4Nuiv\0"
- "glVertexAttrib4Nusv\0"
- "glVertexAttrib4bv\0"
- "glVertexAttrib4d\0"
- "glVertexAttrib4dv\0"
- "glVertexAttrib4f\0"
- "glVertexAttrib4fv\0"
- "glVertexAttrib4iv\0"
- "glVertexAttrib4s\0"
- "glVertexAttrib4sv\0"
- "glVertexAttrib4ubv\0"
- "glVertexAttrib4uiv\0"
- "glVertexAttrib4usv\0"
- "glVertexAttribPointer\0"
- "glBindBuffer\0"
- "glBufferData\0"
- "glBufferSubData\0"
- "glDeleteBuffers\0"
- "glGenBuffers\0"
- "glGetBufferParameteriv\0"
- "glGetBufferPointerv\0"
- "glGetBufferSubData\0"
- "glIsBuffer\0"
- "glMapBuffer\0"
- "glUnmapBuffer\0"
- "glBeginQuery\0"
- "glDeleteQueries\0"
- "glEndQuery\0"
- "glGenQueries\0"
- "glGetQueryObjectiv\0"
- "glGetQueryObjectuiv\0"
- "glGetQueryiv\0"
- "glIsQuery\0"
- "glCompileShader\0"
- "glGetActiveUniform\0"
- "glGetShaderSource\0"
- "glGetUniformLocation\0"
- "glGetUniformfv\0"
- "glGetUniformiv\0"
- "glLinkProgram\0"
- "glShaderSource\0"
- "glUniform1f\0"
- "glUniform1fv\0"
- "glUniform1i\0"
- "glUniform1iv\0"
- "glUniform2f\0"
- "glUniform2fv\0"
- "glUniform2i\0"
- "glUniform2iv\0"
- "glUniform3f\0"
- "glUniform3fv\0"
- "glUniform3i\0"
- "glUniform3iv\0"
- "glUniform4f\0"
- "glUniform4fv\0"
- "glUniform4i\0"
- "glUniform4iv\0"
- "glUniformMatrix2fv\0"
- "glUniformMatrix3fv\0"
- "glUniformMatrix4fv\0"
- "glUseProgram\0"
- "glValidateProgram\0"
- "glBindAttribLocation\0"
- "glGetActiveAttrib\0"
- "glGetAttribLocation\0"
- "glDrawBuffers\0"
- "glDrawBuffersATI\0"
- "glSampleMaskEXT\0"
- "glSamplePatternEXT\0"
- "glPointParameterf\0"
- "glPointParameterfARB\0"
- "glPointParameterfSGIS\0"
- "glPointParameterfv\0"
- "glPointParameterfvARB\0"
- "glPointParameterfvSGIS\0"
- "glSecondaryColor3b\0"
- "glSecondaryColor3bv\0"
- "glSecondaryColor3d\0"
- "glSecondaryColor3dv\0"
- "glSecondaryColor3f\0"
- "glSecondaryColor3fv\0"
- "glSecondaryColor3i\0"
- "glSecondaryColor3iv\0"
- "glSecondaryColor3s\0"
- "glSecondaryColor3sv\0"
- "glSecondaryColor3ub\0"
- "glSecondaryColor3ubv\0"
- "glSecondaryColor3ui\0"
- "glSecondaryColor3uiv\0"
- "glSecondaryColor3us\0"
- "glSecondaryColor3usv\0"
- "glSecondaryColorPointer\0"
- "glMultiDrawArrays\0"
- "glMultiDrawElements\0"
- "glFogCoordPointer\0"
- "glFogCoordd\0"
- "glFogCoorddv\0"
- "glFogCoordf\0"
- "glFogCoordfv\0"
- "glBlendFuncSeparate\0"
- "glBlendFuncSeparateINGR\0"
- "glWindowPos2d\0"
- "glWindowPos2dARB\0"
- "glWindowPos2dv\0"
- "glWindowPos2dvARB\0"
- "glWindowPos2f\0"
- "glWindowPos2fARB\0"
- "glWindowPos2fv\0"
- "glWindowPos2fvARB\0"
- "glWindowPos2i\0"
- "glWindowPos2iARB\0"
- "glWindowPos2iv\0"
- "glWindowPos2ivARB\0"
- "glWindowPos2s\0"
- "glWindowPos2sARB\0"
- "glWindowPos2sv\0"
- "glWindowPos2svARB\0"
- "glWindowPos3d\0"
- "glWindowPos3dARB\0"
- "glWindowPos3dv\0"
- "glWindowPos3dvARB\0"
- "glWindowPos3f\0"
- "glWindowPos3fARB\0"
- "glWindowPos3fv\0"
- "glWindowPos3fvARB\0"
- "glWindowPos3i\0"
- "glWindowPos3iARB\0"
- "glWindowPos3iv\0"
- "glWindowPos3ivARB\0"
- "glWindowPos3s\0"
- "glWindowPos3sARB\0"
- "glWindowPos3sv\0"
- "glWindowPos3svARB\0"
- "glBindProgramARB\0"
- "glDeleteProgramsARB\0"
- "glGenProgramsARB\0"
- "glGetVertexAttribPointerv\0"
- "glGetVertexAttribPointervARB\0"
- "glIsProgramARB\0"
- "glPointParameteri\0"
- "glPointParameteriv\0"
- "glBlendEquationSeparate\0"
- "glBlendEquationSeparateATI\0"
- ;
-
-
-#ifdef USE_MGL_NAMESPACE
-#define gl_dispatch_stub_343 mgl_dispatch_stub_343
-#define gl_dispatch_stub_344 mgl_dispatch_stub_344
-#define gl_dispatch_stub_345 mgl_dispatch_stub_345
-#define gl_dispatch_stub_356 mgl_dispatch_stub_356
-#define gl_dispatch_stub_357 mgl_dispatch_stub_357
-#define gl_dispatch_stub_358 mgl_dispatch_stub_358
-#define gl_dispatch_stub_359 mgl_dispatch_stub_359
-#define gl_dispatch_stub_361 mgl_dispatch_stub_361
-#define gl_dispatch_stub_362 mgl_dispatch_stub_362
-#define gl_dispatch_stub_363 mgl_dispatch_stub_363
-#define gl_dispatch_stub_364 mgl_dispatch_stub_364
-#define gl_dispatch_stub_365 mgl_dispatch_stub_365
-#define gl_dispatch_stub_366 mgl_dispatch_stub_366
-#define gl_dispatch_stub_562 mgl_dispatch_stub_562
-#define gl_dispatch_stub_563 mgl_dispatch_stub_563
-#define gl_dispatch_stub_564 mgl_dispatch_stub_564
-#define gl_dispatch_stub_565 mgl_dispatch_stub_565
-#define gl_dispatch_stub_566 mgl_dispatch_stub_566
-#define gl_dispatch_stub_567 mgl_dispatch_stub_567
-#define gl_dispatch_stub_568 mgl_dispatch_stub_568
-#define gl_dispatch_stub_569 mgl_dispatch_stub_569
-#define gl_dispatch_stub_580 mgl_dispatch_stub_580
-#define gl_dispatch_stub_581 mgl_dispatch_stub_581
-#define gl_dispatch_stub_606 mgl_dispatch_stub_606
-#define gl_dispatch_stub_648 mgl_dispatch_stub_648
-#define gl_dispatch_stub_649 mgl_dispatch_stub_649
-#define gl_dispatch_stub_650 mgl_dispatch_stub_650
-#define gl_dispatch_stub_651 mgl_dispatch_stub_651
-#define gl_dispatch_stub_652 mgl_dispatch_stub_652
-#define gl_dispatch_stub_653 mgl_dispatch_stub_653
-#define gl_dispatch_stub_654 mgl_dispatch_stub_654
-#define gl_dispatch_stub_655 mgl_dispatch_stub_655
-#define gl_dispatch_stub_656 mgl_dispatch_stub_656
-#define gl_dispatch_stub_733 mgl_dispatch_stub_733
-#define gl_dispatch_stub_734 mgl_dispatch_stub_734
-#define gl_dispatch_stub_735 mgl_dispatch_stub_735
-#define gl_dispatch_stub_736 mgl_dispatch_stub_736
-#define gl_dispatch_stub_737 mgl_dispatch_stub_737
-#define gl_dispatch_stub_744 mgl_dispatch_stub_744
-#define gl_dispatch_stub_745 mgl_dispatch_stub_745
-#define gl_dispatch_stub_763 mgl_dispatch_stub_763
-#define gl_dispatch_stub_765 mgl_dispatch_stub_765
-#define gl_dispatch_stub_766 mgl_dispatch_stub_766
-#define gl_dispatch_stub_767 mgl_dispatch_stub_767
-#define gl_dispatch_stub_768 mgl_dispatch_stub_768
-#define gl_dispatch_stub_769 mgl_dispatch_stub_769
-#endif /* USE_MGL_NAMESPACE */
-
-
-/* FIXME: Having these (incorrect) prototypes here is ugly. */
-#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)
-extern void gl_dispatch_stub_343(void);
-extern void gl_dispatch_stub_344(void);
-extern void gl_dispatch_stub_345(void);
-extern void gl_dispatch_stub_356(void);
-extern void gl_dispatch_stub_357(void);
-extern void gl_dispatch_stub_358(void);
-extern void gl_dispatch_stub_359(void);
-extern void gl_dispatch_stub_361(void);
-extern void gl_dispatch_stub_362(void);
-extern void gl_dispatch_stub_363(void);
-extern void gl_dispatch_stub_364(void);
-extern void gl_dispatch_stub_365(void);
-extern void gl_dispatch_stub_366(void);
-extern void gl_dispatch_stub_562(void);
-extern void gl_dispatch_stub_563(void);
-extern void gl_dispatch_stub_564(void);
-extern void gl_dispatch_stub_565(void);
-extern void gl_dispatch_stub_566(void);
-extern void gl_dispatch_stub_567(void);
-extern void gl_dispatch_stub_568(void);
-extern void gl_dispatch_stub_569(void);
-extern void gl_dispatch_stub_580(void);
-extern void gl_dispatch_stub_581(void);
-extern void gl_dispatch_stub_606(void);
-extern void gl_dispatch_stub_648(void);
-extern void gl_dispatch_stub_649(void);
-extern void gl_dispatch_stub_650(void);
-extern void gl_dispatch_stub_651(void);
-extern void gl_dispatch_stub_652(void);
-extern void gl_dispatch_stub_653(void);
-extern void gl_dispatch_stub_654(void);
-extern void gl_dispatch_stub_655(void);
-extern void gl_dispatch_stub_656(void);
-extern void gl_dispatch_stub_733(void);
-extern void gl_dispatch_stub_734(void);
-extern void gl_dispatch_stub_735(void);
-extern void gl_dispatch_stub_736(void);
-extern void gl_dispatch_stub_737(void);
-extern void gl_dispatch_stub_744(void);
-extern void gl_dispatch_stub_745(void);
-extern void gl_dispatch_stub_763(void);
-extern void gl_dispatch_stub_765(void);
-extern void gl_dispatch_stub_766(void);
-extern void gl_dispatch_stub_767(void);
-extern void gl_dispatch_stub_768(void);
-extern void gl_dispatch_stub_769(void);
-#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */
-
-static const glprocs_table_t static_functions[] = {
- NAME_FUNC_OFFSET( 0, glNewList, glNewList, NULL, _gloffset_NewList),
- NAME_FUNC_OFFSET( 10, glEndList, glEndList, NULL, _gloffset_EndList),
- NAME_FUNC_OFFSET( 20, glCallList, glCallList, NULL, _gloffset_CallList),
- NAME_FUNC_OFFSET( 31, glCallLists, glCallLists, NULL, _gloffset_CallLists),
- NAME_FUNC_OFFSET( 43, glDeleteLists, glDeleteLists, NULL, _gloffset_DeleteLists),
- NAME_FUNC_OFFSET( 57, glGenLists, glGenLists, NULL, _gloffset_GenLists),
- NAME_FUNC_OFFSET( 68, glListBase, glListBase, NULL, _gloffset_ListBase),
- NAME_FUNC_OFFSET( 79, glBegin, glBegin, NULL, _gloffset_Begin),
- NAME_FUNC_OFFSET( 87, glBitmap, glBitmap, NULL, _gloffset_Bitmap),
- NAME_FUNC_OFFSET( 96, glColor3b, glColor3b, NULL, _gloffset_Color3b),
- NAME_FUNC_OFFSET( 106, glColor3bv, glColor3bv, NULL, _gloffset_Color3bv),
- NAME_FUNC_OFFSET( 117, glColor3d, glColor3d, NULL, _gloffset_Color3d),
- NAME_FUNC_OFFSET( 127, glColor3dv, glColor3dv, NULL, _gloffset_Color3dv),
- NAME_FUNC_OFFSET( 138, glColor3f, glColor3f, NULL, _gloffset_Color3f),
- NAME_FUNC_OFFSET( 148, glColor3fv, glColor3fv, NULL, _gloffset_Color3fv),
- NAME_FUNC_OFFSET( 159, glColor3i, glColor3i, NULL, _gloffset_Color3i),
- NAME_FUNC_OFFSET( 169, glColor3iv, glColor3iv, NULL, _gloffset_Color3iv),
- NAME_FUNC_OFFSET( 180, glColor3s, glColor3s, NULL, _gloffset_Color3s),
- NAME_FUNC_OFFSET( 190, glColor3sv, glColor3sv, NULL, _gloffset_Color3sv),
- NAME_FUNC_OFFSET( 201, glColor3ub, glColor3ub, NULL, _gloffset_Color3ub),
- NAME_FUNC_OFFSET( 212, glColor3ubv, glColor3ubv, NULL, _gloffset_Color3ubv),
- NAME_FUNC_OFFSET( 224, glColor3ui, glColor3ui, NULL, _gloffset_Color3ui),
- NAME_FUNC_OFFSET( 235, glColor3uiv, glColor3uiv, NULL, _gloffset_Color3uiv),
- NAME_FUNC_OFFSET( 247, glColor3us, glColor3us, NULL, _gloffset_Color3us),
- NAME_FUNC_OFFSET( 258, glColor3usv, glColor3usv, NULL, _gloffset_Color3usv),
- NAME_FUNC_OFFSET( 270, glColor4b, glColor4b, NULL, _gloffset_Color4b),
- NAME_FUNC_OFFSET( 280, glColor4bv, glColor4bv, NULL, _gloffset_Color4bv),
- NAME_FUNC_OFFSET( 291, glColor4d, glColor4d, NULL, _gloffset_Color4d),
- NAME_FUNC_OFFSET( 301, glColor4dv, glColor4dv, NULL, _gloffset_Color4dv),
- NAME_FUNC_OFFSET( 312, glColor4f, glColor4f, NULL, _gloffset_Color4f),
- NAME_FUNC_OFFSET( 322, glColor4fv, glColor4fv, NULL, _gloffset_Color4fv),
- NAME_FUNC_OFFSET( 333, glColor4i, glColor4i, NULL, _gloffset_Color4i),
- NAME_FUNC_OFFSET( 343, glColor4iv, glColor4iv, NULL, _gloffset_Color4iv),
- NAME_FUNC_OFFSET( 354, glColor4s, glColor4s, NULL, _gloffset_Color4s),
- NAME_FUNC_OFFSET( 364, glColor4sv, glColor4sv, NULL, _gloffset_Color4sv),
- NAME_FUNC_OFFSET( 375, glColor4ub, glColor4ub, NULL, _gloffset_Color4ub),
- NAME_FUNC_OFFSET( 386, glColor4ubv, glColor4ubv, NULL, _gloffset_Color4ubv),
- NAME_FUNC_OFFSET( 398, glColor4ui, glColor4ui, NULL, _gloffset_Color4ui),
- NAME_FUNC_OFFSET( 409, glColor4uiv, glColor4uiv, NULL, _gloffset_Color4uiv),
- NAME_FUNC_OFFSET( 421, glColor4us, glColor4us, NULL, _gloffset_Color4us),
- NAME_FUNC_OFFSET( 432, glColor4usv, glColor4usv, NULL, _gloffset_Color4usv),
- NAME_FUNC_OFFSET( 444, glEdgeFlag, glEdgeFlag, NULL, _gloffset_EdgeFlag),
- NAME_FUNC_OFFSET( 455, glEdgeFlagv, glEdgeFlagv, NULL, _gloffset_EdgeFlagv),
- NAME_FUNC_OFFSET( 467, glEnd, glEnd, NULL, _gloffset_End),
- NAME_FUNC_OFFSET( 473, glIndexd, glIndexd, NULL, _gloffset_Indexd),
- NAME_FUNC_OFFSET( 482, glIndexdv, glIndexdv, NULL, _gloffset_Indexdv),
- NAME_FUNC_OFFSET( 492, glIndexf, glIndexf, NULL, _gloffset_Indexf),
- NAME_FUNC_OFFSET( 501, glIndexfv, glIndexfv, NULL, _gloffset_Indexfv),
- NAME_FUNC_OFFSET( 511, glIndexi, glIndexi, NULL, _gloffset_Indexi),
- NAME_FUNC_OFFSET( 520, glIndexiv, glIndexiv, NULL, _gloffset_Indexiv),
- NAME_FUNC_OFFSET( 530, glIndexs, glIndexs, NULL, _gloffset_Indexs),
- NAME_FUNC_OFFSET( 539, glIndexsv, glIndexsv, NULL, _gloffset_Indexsv),
- NAME_FUNC_OFFSET( 549, glNormal3b, glNormal3b, NULL, _gloffset_Normal3b),
- NAME_FUNC_OFFSET( 560, glNormal3bv, glNormal3bv, NULL, _gloffset_Normal3bv),
- NAME_FUNC_OFFSET( 572, glNormal3d, glNormal3d, NULL, _gloffset_Normal3d),
- NAME_FUNC_OFFSET( 583, glNormal3dv, glNormal3dv, NULL, _gloffset_Normal3dv),
- NAME_FUNC_OFFSET( 595, glNormal3f, glNormal3f, NULL, _gloffset_Normal3f),
- NAME_FUNC_OFFSET( 606, glNormal3fv, glNormal3fv, NULL, _gloffset_Normal3fv),
- NAME_FUNC_OFFSET( 618, glNormal3i, glNormal3i, NULL, _gloffset_Normal3i),
- NAME_FUNC_OFFSET( 629, glNormal3iv, glNormal3iv, NULL, _gloffset_Normal3iv),
- NAME_FUNC_OFFSET( 641, glNormal3s, glNormal3s, NULL, _gloffset_Normal3s),
- NAME_FUNC_OFFSET( 652, glNormal3sv, glNormal3sv, NULL, _gloffset_Normal3sv),
- NAME_FUNC_OFFSET( 664, glRasterPos2d, glRasterPos2d, NULL, _gloffset_RasterPos2d),
- NAME_FUNC_OFFSET( 678, glRasterPos2dv, glRasterPos2dv, NULL, _gloffset_RasterPos2dv),
- NAME_FUNC_OFFSET( 693, glRasterPos2f, glRasterPos2f, NULL, _gloffset_RasterPos2f),
- NAME_FUNC_OFFSET( 707, glRasterPos2fv, glRasterPos2fv, NULL, _gloffset_RasterPos2fv),
- NAME_FUNC_OFFSET( 722, glRasterPos2i, glRasterPos2i, NULL, _gloffset_RasterPos2i),
- NAME_FUNC_OFFSET( 736, glRasterPos2iv, glRasterPos2iv, NULL, _gloffset_RasterPos2iv),
- NAME_FUNC_OFFSET( 751, glRasterPos2s, glRasterPos2s, NULL, _gloffset_RasterPos2s),
- NAME_FUNC_OFFSET( 765, glRasterPos2sv, glRasterPos2sv, NULL, _gloffset_RasterPos2sv),
- NAME_FUNC_OFFSET( 780, glRasterPos3d, glRasterPos3d, NULL, _gloffset_RasterPos3d),
- NAME_FUNC_OFFSET( 794, glRasterPos3dv, glRasterPos3dv, NULL, _gloffset_RasterPos3dv),
- NAME_FUNC_OFFSET( 809, glRasterPos3f, glRasterPos3f, NULL, _gloffset_RasterPos3f),
- NAME_FUNC_OFFSET( 823, glRasterPos3fv, glRasterPos3fv, NULL, _gloffset_RasterPos3fv),
- NAME_FUNC_OFFSET( 838, glRasterPos3i, glRasterPos3i, NULL, _gloffset_RasterPos3i),
- NAME_FUNC_OFFSET( 852, glRasterPos3iv, glRasterPos3iv, NULL, _gloffset_RasterPos3iv),
- NAME_FUNC_OFFSET( 867, glRasterPos3s, glRasterPos3s, NULL, _gloffset_RasterPos3s),
- NAME_FUNC_OFFSET( 881, glRasterPos3sv, glRasterPos3sv, NULL, _gloffset_RasterPos3sv),
- NAME_FUNC_OFFSET( 896, glRasterPos4d, glRasterPos4d, NULL, _gloffset_RasterPos4d),
- NAME_FUNC_OFFSET( 910, glRasterPos4dv, glRasterPos4dv, NULL, _gloffset_RasterPos4dv),
- NAME_FUNC_OFFSET( 925, glRasterPos4f, glRasterPos4f, NULL, _gloffset_RasterPos4f),
- NAME_FUNC_OFFSET( 939, glRasterPos4fv, glRasterPos4fv, NULL, _gloffset_RasterPos4fv),
- NAME_FUNC_OFFSET( 954, glRasterPos4i, glRasterPos4i, NULL, _gloffset_RasterPos4i),
- NAME_FUNC_OFFSET( 968, glRasterPos4iv, glRasterPos4iv, NULL, _gloffset_RasterPos4iv),
- NAME_FUNC_OFFSET( 983, glRasterPos4s, glRasterPos4s, NULL, _gloffset_RasterPos4s),
- NAME_FUNC_OFFSET( 997, glRasterPos4sv, glRasterPos4sv, NULL, _gloffset_RasterPos4sv),
- NAME_FUNC_OFFSET( 1012, glRectd, glRectd, NULL, _gloffset_Rectd),
- NAME_FUNC_OFFSET( 1020, glRectdv, glRectdv, NULL, _gloffset_Rectdv),
- NAME_FUNC_OFFSET( 1029, glRectf, glRectf, NULL, _gloffset_Rectf),
- NAME_FUNC_OFFSET( 1037, glRectfv, glRectfv, NULL, _gloffset_Rectfv),
- NAME_FUNC_OFFSET( 1046, glRecti, glRecti, NULL, _gloffset_Recti),
- NAME_FUNC_OFFSET( 1054, glRectiv, glRectiv, NULL, _gloffset_Rectiv),
- NAME_FUNC_OFFSET( 1063, glRects, glRects, NULL, _gloffset_Rects),
- NAME_FUNC_OFFSET( 1071, glRectsv, glRectsv, NULL, _gloffset_Rectsv),
- NAME_FUNC_OFFSET( 1080, glTexCoord1d, glTexCoord1d, NULL, _gloffset_TexCoord1d),
- NAME_FUNC_OFFSET( 1093, glTexCoord1dv, glTexCoord1dv, NULL, _gloffset_TexCoord1dv),
- NAME_FUNC_OFFSET( 1107, glTexCoord1f, glTexCoord1f, NULL, _gloffset_TexCoord1f),
- NAME_FUNC_OFFSET( 1120, glTexCoord1fv, glTexCoord1fv, NULL, _gloffset_TexCoord1fv),
- NAME_FUNC_OFFSET( 1134, glTexCoord1i, glTexCoord1i, NULL, _gloffset_TexCoord1i),
- NAME_FUNC_OFFSET( 1147, glTexCoord1iv, glTexCoord1iv, NULL, _gloffset_TexCoord1iv),
- NAME_FUNC_OFFSET( 1161, glTexCoord1s, glTexCoord1s, NULL, _gloffset_TexCoord1s),
- NAME_FUNC_OFFSET( 1174, glTexCoord1sv, glTexCoord1sv, NULL, _gloffset_TexCoord1sv),
- NAME_FUNC_OFFSET( 1188, glTexCoord2d, glTexCoord2d, NULL, _gloffset_TexCoord2d),
- NAME_FUNC_OFFSET( 1201, glTexCoord2dv, glTexCoord2dv, NULL, _gloffset_TexCoord2dv),
- NAME_FUNC_OFFSET( 1215, glTexCoord2f, glTexCoord2f, NULL, _gloffset_TexCoord2f),
- NAME_FUNC_OFFSET( 1228, glTexCoord2fv, glTexCoord2fv, NULL, _gloffset_TexCoord2fv),
- NAME_FUNC_OFFSET( 1242, glTexCoord2i, glTexCoord2i, NULL, _gloffset_TexCoord2i),
- NAME_FUNC_OFFSET( 1255, glTexCoord2iv, glTexCoord2iv, NULL, _gloffset_TexCoord2iv),
- NAME_FUNC_OFFSET( 1269, glTexCoord2s, glTexCoord2s, NULL, _gloffset_TexCoord2s),
- NAME_FUNC_OFFSET( 1282, glTexCoord2sv, glTexCoord2sv, NULL, _gloffset_TexCoord2sv),
- NAME_FUNC_OFFSET( 1296, glTexCoord3d, glTexCoord3d, NULL, _gloffset_TexCoord3d),
- NAME_FUNC_OFFSET( 1309, glTexCoord3dv, glTexCoord3dv, NULL, _gloffset_TexCoord3dv),
- NAME_FUNC_OFFSET( 1323, glTexCoord3f, glTexCoord3f, NULL, _gloffset_TexCoord3f),
- NAME_FUNC_OFFSET( 1336, glTexCoord3fv, glTexCoord3fv, NULL, _gloffset_TexCoord3fv),
- NAME_FUNC_OFFSET( 1350, glTexCoord3i, glTexCoord3i, NULL, _gloffset_TexCoord3i),
- NAME_FUNC_OFFSET( 1363, glTexCoord3iv, glTexCoord3iv, NULL, _gloffset_TexCoord3iv),
- NAME_FUNC_OFFSET( 1377, glTexCoord3s, glTexCoord3s, NULL, _gloffset_TexCoord3s),
- NAME_FUNC_OFFSET( 1390, glTexCoord3sv, glTexCoord3sv, NULL, _gloffset_TexCoord3sv),
- NAME_FUNC_OFFSET( 1404, glTexCoord4d, glTexCoord4d, NULL, _gloffset_TexCoord4d),
- NAME_FUNC_OFFSET( 1417, glTexCoord4dv, glTexCoord4dv, NULL, _gloffset_TexCoord4dv),
- NAME_FUNC_OFFSET( 1431, glTexCoord4f, glTexCoord4f, NULL, _gloffset_TexCoord4f),
- NAME_FUNC_OFFSET( 1444, glTexCoord4fv, glTexCoord4fv, NULL, _gloffset_TexCoord4fv),
- NAME_FUNC_OFFSET( 1458, glTexCoord4i, glTexCoord4i, NULL, _gloffset_TexCoord4i),
- NAME_FUNC_OFFSET( 1471, glTexCoord4iv, glTexCoord4iv, NULL, _gloffset_TexCoord4iv),
- NAME_FUNC_OFFSET( 1485, glTexCoord4s, glTexCoord4s, NULL, _gloffset_TexCoord4s),
- NAME_FUNC_OFFSET( 1498, glTexCoord4sv, glTexCoord4sv, NULL, _gloffset_TexCoord4sv),
- NAME_FUNC_OFFSET( 1512, glVertex2d, glVertex2d, NULL, _gloffset_Vertex2d),
- NAME_FUNC_OFFSET( 1523, glVertex2dv, glVertex2dv, NULL, _gloffset_Vertex2dv),
- NAME_FUNC_OFFSET( 1535, glVertex2f, glVertex2f, NULL, _gloffset_Vertex2f),
- NAME_FUNC_OFFSET( 1546, glVertex2fv, glVertex2fv, NULL, _gloffset_Vertex2fv),
- NAME_FUNC_OFFSET( 1558, glVertex2i, glVertex2i, NULL, _gloffset_Vertex2i),
- NAME_FUNC_OFFSET( 1569, glVertex2iv, glVertex2iv, NULL, _gloffset_Vertex2iv),
- NAME_FUNC_OFFSET( 1581, glVertex2s, glVertex2s, NULL, _gloffset_Vertex2s),
- NAME_FUNC_OFFSET( 1592, glVertex2sv, glVertex2sv, NULL, _gloffset_Vertex2sv),
- NAME_FUNC_OFFSET( 1604, glVertex3d, glVertex3d, NULL, _gloffset_Vertex3d),
- NAME_FUNC_OFFSET( 1615, glVertex3dv, glVertex3dv, NULL, _gloffset_Vertex3dv),
- NAME_FUNC_OFFSET( 1627, glVertex3f, glVertex3f, NULL, _gloffset_Vertex3f),
- NAME_FUNC_OFFSET( 1638, glVertex3fv, glVertex3fv, NULL, _gloffset_Vertex3fv),
- NAME_FUNC_OFFSET( 1650, glVertex3i, glVertex3i, NULL, _gloffset_Vertex3i),
- NAME_FUNC_OFFSET( 1661, glVertex3iv, glVertex3iv, NULL, _gloffset_Vertex3iv),
- NAME_FUNC_OFFSET( 1673, glVertex3s, glVertex3s, NULL, _gloffset_Vertex3s),
- NAME_FUNC_OFFSET( 1684, glVertex3sv, glVertex3sv, NULL, _gloffset_Vertex3sv),
- NAME_FUNC_OFFSET( 1696, glVertex4d, glVertex4d, NULL, _gloffset_Vertex4d),
- NAME_FUNC_OFFSET( 1707, glVertex4dv, glVertex4dv, NULL, _gloffset_Vertex4dv),
- NAME_FUNC_OFFSET( 1719, glVertex4f, glVertex4f, NULL, _gloffset_Vertex4f),
- NAME_FUNC_OFFSET( 1730, glVertex4fv, glVertex4fv, NULL, _gloffset_Vertex4fv),
- NAME_FUNC_OFFSET( 1742, glVertex4i, glVertex4i, NULL, _gloffset_Vertex4i),
- NAME_FUNC_OFFSET( 1753, glVertex4iv, glVertex4iv, NULL, _gloffset_Vertex4iv),
- NAME_FUNC_OFFSET( 1765, glVertex4s, glVertex4s, NULL, _gloffset_Vertex4s),
- NAME_FUNC_OFFSET( 1776, glVertex4sv, glVertex4sv, NULL, _gloffset_Vertex4sv),
- NAME_FUNC_OFFSET( 1788, glClipPlane, glClipPlane, NULL, _gloffset_ClipPlane),
- NAME_FUNC_OFFSET( 1800, glColorMaterial, glColorMaterial, NULL, _gloffset_ColorMaterial),
- NAME_FUNC_OFFSET( 1816, glCullFace, glCullFace, NULL, _gloffset_CullFace),
- NAME_FUNC_OFFSET( 1827, glFogf, glFogf, NULL, _gloffset_Fogf),
- NAME_FUNC_OFFSET( 1834, glFogfv, glFogfv, NULL, _gloffset_Fogfv),
- NAME_FUNC_OFFSET( 1842, glFogi, glFogi, NULL, _gloffset_Fogi),
- NAME_FUNC_OFFSET( 1849, glFogiv, glFogiv, NULL, _gloffset_Fogiv),
- NAME_FUNC_OFFSET( 1857, glFrontFace, glFrontFace, NULL, _gloffset_FrontFace),
- NAME_FUNC_OFFSET( 1869, glHint, glHint, NULL, _gloffset_Hint),
- NAME_FUNC_OFFSET( 1876, glLightf, glLightf, NULL, _gloffset_Lightf),
- NAME_FUNC_OFFSET( 1885, glLightfv, glLightfv, NULL, _gloffset_Lightfv),
- NAME_FUNC_OFFSET( 1895, glLighti, glLighti, NULL, _gloffset_Lighti),
- NAME_FUNC_OFFSET( 1904, glLightiv, glLightiv, NULL, _gloffset_Lightiv),
- NAME_FUNC_OFFSET( 1914, glLightModelf, glLightModelf, NULL, _gloffset_LightModelf),
- NAME_FUNC_OFFSET( 1928, glLightModelfv, glLightModelfv, NULL, _gloffset_LightModelfv),
- NAME_FUNC_OFFSET( 1943, glLightModeli, glLightModeli, NULL, _gloffset_LightModeli),
- NAME_FUNC_OFFSET( 1957, glLightModeliv, glLightModeliv, NULL, _gloffset_LightModeliv),
- NAME_FUNC_OFFSET( 1972, glLineStipple, glLineStipple, NULL, _gloffset_LineStipple),
- NAME_FUNC_OFFSET( 1986, glLineWidth, glLineWidth, NULL, _gloffset_LineWidth),
- NAME_FUNC_OFFSET( 1998, glMaterialf, glMaterialf, NULL, _gloffset_Materialf),
- NAME_FUNC_OFFSET( 2010, glMaterialfv, glMaterialfv, NULL, _gloffset_Materialfv),
- NAME_FUNC_OFFSET( 2023, glMateriali, glMateriali, NULL, _gloffset_Materiali),
- NAME_FUNC_OFFSET( 2035, glMaterialiv, glMaterialiv, NULL, _gloffset_Materialiv),
- NAME_FUNC_OFFSET( 2048, glPointSize, glPointSize, NULL, _gloffset_PointSize),
- NAME_FUNC_OFFSET( 2060, glPolygonMode, glPolygonMode, NULL, _gloffset_PolygonMode),
- NAME_FUNC_OFFSET( 2074, glPolygonStipple, glPolygonStipple, NULL, _gloffset_PolygonStipple),
- NAME_FUNC_OFFSET( 2091, glScissor, glScissor, NULL, _gloffset_Scissor),
- NAME_FUNC_OFFSET( 2101, glShadeModel, glShadeModel, NULL, _gloffset_ShadeModel),
- NAME_FUNC_OFFSET( 2114, glTexParameterf, glTexParameterf, NULL, _gloffset_TexParameterf),
- NAME_FUNC_OFFSET( 2130, glTexParameterfv, glTexParameterfv, NULL, _gloffset_TexParameterfv),
- NAME_FUNC_OFFSET( 2147, glTexParameteri, glTexParameteri, NULL, _gloffset_TexParameteri),
- NAME_FUNC_OFFSET( 2163, glTexParameteriv, glTexParameteriv, NULL, _gloffset_TexParameteriv),
- NAME_FUNC_OFFSET( 2180, glTexImage1D, glTexImage1D, NULL, _gloffset_TexImage1D),
- NAME_FUNC_OFFSET( 2193, glTexImage2D, glTexImage2D, NULL, _gloffset_TexImage2D),
- NAME_FUNC_OFFSET( 2206, glTexEnvf, glTexEnvf, NULL, _gloffset_TexEnvf),
- NAME_FUNC_OFFSET( 2216, glTexEnvfv, glTexEnvfv, NULL, _gloffset_TexEnvfv),
- NAME_FUNC_OFFSET( 2227, glTexEnvi, glTexEnvi, NULL, _gloffset_TexEnvi),
- NAME_FUNC_OFFSET( 2237, glTexEnviv, glTexEnviv, NULL, _gloffset_TexEnviv),
- NAME_FUNC_OFFSET( 2248, glTexGend, glTexGend, NULL, _gloffset_TexGend),
- NAME_FUNC_OFFSET( 2258, glTexGendv, glTexGendv, NULL, _gloffset_TexGendv),
- NAME_FUNC_OFFSET( 2269, glTexGenf, glTexGenf, NULL, _gloffset_TexGenf),
- NAME_FUNC_OFFSET( 2279, glTexGenfv, glTexGenfv, NULL, _gloffset_TexGenfv),
- NAME_FUNC_OFFSET( 2290, glTexGeni, glTexGeni, NULL, _gloffset_TexGeni),
- NAME_FUNC_OFFSET( 2300, glTexGeniv, glTexGeniv, NULL, _gloffset_TexGeniv),
- NAME_FUNC_OFFSET( 2311, glFeedbackBuffer, glFeedbackBuffer, NULL, _gloffset_FeedbackBuffer),
- NAME_FUNC_OFFSET( 2328, glSelectBuffer, glSelectBuffer, NULL, _gloffset_SelectBuffer),
- NAME_FUNC_OFFSET( 2343, glRenderMode, glRenderMode, NULL, _gloffset_RenderMode),
- NAME_FUNC_OFFSET( 2356, glInitNames, glInitNames, NULL, _gloffset_InitNames),
- NAME_FUNC_OFFSET( 2368, glLoadName, glLoadName, NULL, _gloffset_LoadName),
- NAME_FUNC_OFFSET( 2379, glPassThrough, glPassThrough, NULL, _gloffset_PassThrough),
- NAME_FUNC_OFFSET( 2393, glPopName, glPopName, NULL, _gloffset_PopName),
- NAME_FUNC_OFFSET( 2403, glPushName, glPushName, NULL, _gloffset_PushName),
- NAME_FUNC_OFFSET( 2414, glDrawBuffer, glDrawBuffer, NULL, _gloffset_DrawBuffer),
- NAME_FUNC_OFFSET( 2427, glClear, glClear, NULL, _gloffset_Clear),
- NAME_FUNC_OFFSET( 2435, glClearAccum, glClearAccum, NULL, _gloffset_ClearAccum),
- NAME_FUNC_OFFSET( 2448, glClearIndex, glClearIndex, NULL, _gloffset_ClearIndex),
- NAME_FUNC_OFFSET( 2461, glClearColor, glClearColor, NULL, _gloffset_ClearColor),
- NAME_FUNC_OFFSET( 2474, glClearStencil, glClearStencil, NULL, _gloffset_ClearStencil),
- NAME_FUNC_OFFSET( 2489, glClearDepth, glClearDepth, NULL, _gloffset_ClearDepth),
- NAME_FUNC_OFFSET( 2502, glStencilMask, glStencilMask, NULL, _gloffset_StencilMask),
- NAME_FUNC_OFFSET( 2516, glColorMask, glColorMask, NULL, _gloffset_ColorMask),
- NAME_FUNC_OFFSET( 2528, glDepthMask, glDepthMask, NULL, _gloffset_DepthMask),
- NAME_FUNC_OFFSET( 2540, glIndexMask, glIndexMask, NULL, _gloffset_IndexMask),
- NAME_FUNC_OFFSET( 2552, glAccum, glAccum, NULL, _gloffset_Accum),
- NAME_FUNC_OFFSET( 2560, glDisable, glDisable, NULL, _gloffset_Disable),
- NAME_FUNC_OFFSET( 2570, glEnable, glEnable, NULL, _gloffset_Enable),
- NAME_FUNC_OFFSET( 2579, glFinish, glFinish, NULL, _gloffset_Finish),
- NAME_FUNC_OFFSET( 2588, glFlush, glFlush, NULL, _gloffset_Flush),
- NAME_FUNC_OFFSET( 2596, glPopAttrib, glPopAttrib, NULL, _gloffset_PopAttrib),
- NAME_FUNC_OFFSET( 2608, glPushAttrib, glPushAttrib, NULL, _gloffset_PushAttrib),
- NAME_FUNC_OFFSET( 2621, glMap1d, glMap1d, NULL, _gloffset_Map1d),
- NAME_FUNC_OFFSET( 2629, glMap1f, glMap1f, NULL, _gloffset_Map1f),
- NAME_FUNC_OFFSET( 2637, glMap2d, glMap2d, NULL, _gloffset_Map2d),
- NAME_FUNC_OFFSET( 2645, glMap2f, glMap2f, NULL, _gloffset_Map2f),
- NAME_FUNC_OFFSET( 2653, glMapGrid1d, glMapGrid1d, NULL, _gloffset_MapGrid1d),
- NAME_FUNC_OFFSET( 2665, glMapGrid1f, glMapGrid1f, NULL, _gloffset_MapGrid1f),
- NAME_FUNC_OFFSET( 2677, glMapGrid2d, glMapGrid2d, NULL, _gloffset_MapGrid2d),
- NAME_FUNC_OFFSET( 2689, glMapGrid2f, glMapGrid2f, NULL, _gloffset_MapGrid2f),
- NAME_FUNC_OFFSET( 2701, glEvalCoord1d, glEvalCoord1d, NULL, _gloffset_EvalCoord1d),
- NAME_FUNC_OFFSET( 2715, glEvalCoord1dv, glEvalCoord1dv, NULL, _gloffset_EvalCoord1dv),
- NAME_FUNC_OFFSET( 2730, glEvalCoord1f, glEvalCoord1f, NULL, _gloffset_EvalCoord1f),
- NAME_FUNC_OFFSET( 2744, glEvalCoord1fv, glEvalCoord1fv, NULL, _gloffset_EvalCoord1fv),
- NAME_FUNC_OFFSET( 2759, glEvalCoord2d, glEvalCoord2d, NULL, _gloffset_EvalCoord2d),
- NAME_FUNC_OFFSET( 2773, glEvalCoord2dv, glEvalCoord2dv, NULL, _gloffset_EvalCoord2dv),
- NAME_FUNC_OFFSET( 2788, glEvalCoord2f, glEvalCoord2f, NULL, _gloffset_EvalCoord2f),
- NAME_FUNC_OFFSET( 2802, glEvalCoord2fv, glEvalCoord2fv, NULL, _gloffset_EvalCoord2fv),
- NAME_FUNC_OFFSET( 2817, glEvalMesh1, glEvalMesh1, NULL, _gloffset_EvalMesh1),
- NAME_FUNC_OFFSET( 2829, glEvalPoint1, glEvalPoint1, NULL, _gloffset_EvalPoint1),
- NAME_FUNC_OFFSET( 2842, glEvalMesh2, glEvalMesh2, NULL, _gloffset_EvalMesh2),
- NAME_FUNC_OFFSET( 2854, glEvalPoint2, glEvalPoint2, NULL, _gloffset_EvalPoint2),
- NAME_FUNC_OFFSET( 2867, glAlphaFunc, glAlphaFunc, NULL, _gloffset_AlphaFunc),
- NAME_FUNC_OFFSET( 2879, glBlendFunc, glBlendFunc, NULL, _gloffset_BlendFunc),
- NAME_FUNC_OFFSET( 2891, glLogicOp, glLogicOp, NULL, _gloffset_LogicOp),
- NAME_FUNC_OFFSET( 2901, glStencilFunc, glStencilFunc, NULL, _gloffset_StencilFunc),
- NAME_FUNC_OFFSET( 2915, glStencilOp, glStencilOp, NULL, _gloffset_StencilOp),
- NAME_FUNC_OFFSET( 2927, glDepthFunc, glDepthFunc, NULL, _gloffset_DepthFunc),
- NAME_FUNC_OFFSET( 2939, glPixelZoom, glPixelZoom, NULL, _gloffset_PixelZoom),
- NAME_FUNC_OFFSET( 2951, glPixelTransferf, glPixelTransferf, NULL, _gloffset_PixelTransferf),
- NAME_FUNC_OFFSET( 2968, glPixelTransferi, glPixelTransferi, NULL, _gloffset_PixelTransferi),
- NAME_FUNC_OFFSET( 2985, glPixelStoref, glPixelStoref, NULL, _gloffset_PixelStoref),
- NAME_FUNC_OFFSET( 2999, glPixelStorei, glPixelStorei, NULL, _gloffset_PixelStorei),
- NAME_FUNC_OFFSET( 3013, glPixelMapfv, glPixelMapfv, NULL, _gloffset_PixelMapfv),
- NAME_FUNC_OFFSET( 3026, glPixelMapuiv, glPixelMapuiv, NULL, _gloffset_PixelMapuiv),
- NAME_FUNC_OFFSET( 3040, glPixelMapusv, glPixelMapusv, NULL, _gloffset_PixelMapusv),
- NAME_FUNC_OFFSET( 3054, glReadBuffer, glReadBuffer, NULL, _gloffset_ReadBuffer),
- NAME_FUNC_OFFSET( 3067, glCopyPixels, glCopyPixels, NULL, _gloffset_CopyPixels),
- NAME_FUNC_OFFSET( 3080, glReadPixels, glReadPixels, NULL, _gloffset_ReadPixels),
- NAME_FUNC_OFFSET( 3093, glDrawPixels, glDrawPixels, NULL, _gloffset_DrawPixels),
- NAME_FUNC_OFFSET( 3106, glGetBooleanv, glGetBooleanv, NULL, _gloffset_GetBooleanv),
- NAME_FUNC_OFFSET( 3120, glGetClipPlane, glGetClipPlane, NULL, _gloffset_GetClipPlane),
- NAME_FUNC_OFFSET( 3135, glGetDoublev, glGetDoublev, NULL, _gloffset_GetDoublev),
- NAME_FUNC_OFFSET( 3148, glGetError, glGetError, NULL, _gloffset_GetError),
- NAME_FUNC_OFFSET( 3159, glGetFloatv, glGetFloatv, NULL, _gloffset_GetFloatv),
- NAME_FUNC_OFFSET( 3171, glGetIntegerv, glGetIntegerv, NULL, _gloffset_GetIntegerv),
- NAME_FUNC_OFFSET( 3185, glGetLightfv, glGetLightfv, NULL, _gloffset_GetLightfv),
- NAME_FUNC_OFFSET( 3198, glGetLightiv, glGetLightiv, NULL, _gloffset_GetLightiv),
- NAME_FUNC_OFFSET( 3211, glGetMapdv, glGetMapdv, NULL, _gloffset_GetMapdv),
- NAME_FUNC_OFFSET( 3222, glGetMapfv, glGetMapfv, NULL, _gloffset_GetMapfv),
- NAME_FUNC_OFFSET( 3233, glGetMapiv, glGetMapiv, NULL, _gloffset_GetMapiv),
- NAME_FUNC_OFFSET( 3244, glGetMaterialfv, glGetMaterialfv, NULL, _gloffset_GetMaterialfv),
- NAME_FUNC_OFFSET( 3260, glGetMaterialiv, glGetMaterialiv, NULL, _gloffset_GetMaterialiv),
- NAME_FUNC_OFFSET( 3276, glGetPixelMapfv, glGetPixelMapfv, NULL, _gloffset_GetPixelMapfv),
- NAME_FUNC_OFFSET( 3292, glGetPixelMapuiv, glGetPixelMapuiv, NULL, _gloffset_GetPixelMapuiv),
- NAME_FUNC_OFFSET( 3309, glGetPixelMapusv, glGetPixelMapusv, NULL, _gloffset_GetPixelMapusv),
- NAME_FUNC_OFFSET( 3326, glGetPolygonStipple, glGetPolygonStipple, NULL, _gloffset_GetPolygonStipple),
- NAME_FUNC_OFFSET( 3346, glGetString, glGetString, NULL, _gloffset_GetString),
- NAME_FUNC_OFFSET( 3358, glGetTexEnvfv, glGetTexEnvfv, NULL, _gloffset_GetTexEnvfv),
- NAME_FUNC_OFFSET( 3372, glGetTexEnviv, glGetTexEnviv, NULL, _gloffset_GetTexEnviv),
- NAME_FUNC_OFFSET( 3386, glGetTexGendv, glGetTexGendv, NULL, _gloffset_GetTexGendv),
- NAME_FUNC_OFFSET( 3400, glGetTexGenfv, glGetTexGenfv, NULL, _gloffset_GetTexGenfv),
- NAME_FUNC_OFFSET( 3414, glGetTexGeniv, glGetTexGeniv, NULL, _gloffset_GetTexGeniv),
- NAME_FUNC_OFFSET( 3428, glGetTexImage, glGetTexImage, NULL, _gloffset_GetTexImage),
- NAME_FUNC_OFFSET( 3442, glGetTexParameterfv, glGetTexParameterfv, NULL, _gloffset_GetTexParameterfv),
- NAME_FUNC_OFFSET( 3462, glGetTexParameteriv, glGetTexParameteriv, NULL, _gloffset_GetTexParameteriv),
- NAME_FUNC_OFFSET( 3482, glGetTexLevelParameterfv, glGetTexLevelParameterfv, NULL, _gloffset_GetTexLevelParameterfv),
- NAME_FUNC_OFFSET( 3507, glGetTexLevelParameteriv, glGetTexLevelParameteriv, NULL, _gloffset_GetTexLevelParameteriv),
- NAME_FUNC_OFFSET( 3532, glIsEnabled, glIsEnabled, NULL, _gloffset_IsEnabled),
- NAME_FUNC_OFFSET( 3544, glIsList, glIsList, NULL, _gloffset_IsList),
- NAME_FUNC_OFFSET( 3553, glDepthRange, glDepthRange, NULL, _gloffset_DepthRange),
- NAME_FUNC_OFFSET( 3566, glFrustum, glFrustum, NULL, _gloffset_Frustum),
- NAME_FUNC_OFFSET( 3576, glLoadIdentity, glLoadIdentity, NULL, _gloffset_LoadIdentity),
- NAME_FUNC_OFFSET( 3591, glLoadMatrixf, glLoadMatrixf, NULL, _gloffset_LoadMatrixf),
- NAME_FUNC_OFFSET( 3605, glLoadMatrixd, glLoadMatrixd, NULL, _gloffset_LoadMatrixd),
- NAME_FUNC_OFFSET( 3619, glMatrixMode, glMatrixMode, NULL, _gloffset_MatrixMode),
- NAME_FUNC_OFFSET( 3632, glMultMatrixf, glMultMatrixf, NULL, _gloffset_MultMatrixf),
- NAME_FUNC_OFFSET( 3646, glMultMatrixd, glMultMatrixd, NULL, _gloffset_MultMatrixd),
- NAME_FUNC_OFFSET( 3660, glOrtho, glOrtho, NULL, _gloffset_Ortho),
- NAME_FUNC_OFFSET( 3668, glPopMatrix, glPopMatrix, NULL, _gloffset_PopMatrix),
- NAME_FUNC_OFFSET( 3680, glPushMatrix, glPushMatrix, NULL, _gloffset_PushMatrix),
- NAME_FUNC_OFFSET( 3693, glRotated, glRotated, NULL, _gloffset_Rotated),
- NAME_FUNC_OFFSET( 3703, glRotatef, glRotatef, NULL, _gloffset_Rotatef),
- NAME_FUNC_OFFSET( 3713, glScaled, glScaled, NULL, _gloffset_Scaled),
- NAME_FUNC_OFFSET( 3722, glScalef, glScalef, NULL, _gloffset_Scalef),
- NAME_FUNC_OFFSET( 3731, glTranslated, glTranslated, NULL, _gloffset_Translated),
- NAME_FUNC_OFFSET( 3744, glTranslatef, glTranslatef, NULL, _gloffset_Translatef),
- NAME_FUNC_OFFSET( 3757, glViewport, glViewport, NULL, _gloffset_Viewport),
- NAME_FUNC_OFFSET( 3768, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement),
- NAME_FUNC_OFFSET( 3783, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture),
- NAME_FUNC_OFFSET( 3797, glColorPointer, glColorPointer, NULL, _gloffset_ColorPointer),
- NAME_FUNC_OFFSET( 3812, glDisableClientState, glDisableClientState, NULL, _gloffset_DisableClientState),
- NAME_FUNC_OFFSET( 3833, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays),
- NAME_FUNC_OFFSET( 3846, glDrawElements, glDrawElements, NULL, _gloffset_DrawElements),
- NAME_FUNC_OFFSET( 3861, glEdgeFlagPointer, glEdgeFlagPointer, NULL, _gloffset_EdgeFlagPointer),
- NAME_FUNC_OFFSET( 3879, glEnableClientState, glEnableClientState, NULL, _gloffset_EnableClientState),
- NAME_FUNC_OFFSET( 3899, glIndexPointer, glIndexPointer, NULL, _gloffset_IndexPointer),
- NAME_FUNC_OFFSET( 3914, glIndexub, glIndexub, NULL, _gloffset_Indexub),
- NAME_FUNC_OFFSET( 3924, glIndexubv, glIndexubv, NULL, _gloffset_Indexubv),
- NAME_FUNC_OFFSET( 3935, glInterleavedArrays, glInterleavedArrays, NULL, _gloffset_InterleavedArrays),
- NAME_FUNC_OFFSET( 3955, glNormalPointer, glNormalPointer, NULL, _gloffset_NormalPointer),
- NAME_FUNC_OFFSET( 3971, glPolygonOffset, glPolygonOffset, NULL, _gloffset_PolygonOffset),
- NAME_FUNC_OFFSET( 3987, glTexCoordPointer, glTexCoordPointer, NULL, _gloffset_TexCoordPointer),
- NAME_FUNC_OFFSET( 4005, glVertexPointer, glVertexPointer, NULL, _gloffset_VertexPointer),
- NAME_FUNC_OFFSET( 4021, glAreTexturesResident, glAreTexturesResident, NULL, _gloffset_AreTexturesResident),
- NAME_FUNC_OFFSET( 4043, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D),
- NAME_FUNC_OFFSET( 4060, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D),
- NAME_FUNC_OFFSET( 4077, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D),
- NAME_FUNC_OFFSET( 4097, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D),
- NAME_FUNC_OFFSET( 4117, glDeleteTextures, glDeleteTextures, NULL, _gloffset_DeleteTextures),
- NAME_FUNC_OFFSET( 4134, glGenTextures, glGenTextures, NULL, _gloffset_GenTextures),
- NAME_FUNC_OFFSET( 4148, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv),
- NAME_FUNC_OFFSET( 4162, glIsTexture, glIsTexture, NULL, _gloffset_IsTexture),
- NAME_FUNC_OFFSET( 4174, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures),
- NAME_FUNC_OFFSET( 4195, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D),
- NAME_FUNC_OFFSET( 4211, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D),
- NAME_FUNC_OFFSET( 4227, glPopClientAttrib, glPopClientAttrib, NULL, _gloffset_PopClientAttrib),
- NAME_FUNC_OFFSET( 4245, glPushClientAttrib, glPushClientAttrib, NULL, _gloffset_PushClientAttrib),
- NAME_FUNC_OFFSET( 4264, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor),
- NAME_FUNC_OFFSET( 4277, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation),
- NAME_FUNC_OFFSET( 4293, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements),
- NAME_FUNC_OFFSET( 4313, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
- NAME_FUNC_OFFSET( 4326, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv),
- NAME_FUNC_OFFSET( 4350, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv),
- NAME_FUNC_OFFSET( 4374, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable),
- NAME_FUNC_OFFSET( 4391, glGetColorTable, glGetColorTable, NULL, _gloffset_GetColorTable),
- NAME_FUNC_OFFSET( 4407, glGetColorTableParameterfv, glGetColorTableParameterfv, NULL, _gloffset_GetColorTableParameterfv),
- NAME_FUNC_OFFSET( 4434, glGetColorTableParameteriv, glGetColorTableParameteriv, NULL, _gloffset_GetColorTableParameteriv),
- NAME_FUNC_OFFSET( 4461, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable),
- NAME_FUNC_OFFSET( 4477, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable),
- NAME_FUNC_OFFSET( 4497, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D),
- NAME_FUNC_OFFSET( 4519, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D),
- NAME_FUNC_OFFSET( 4541, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf),
- NAME_FUNC_OFFSET( 4565, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv),
- NAME_FUNC_OFFSET( 4590, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri),
- NAME_FUNC_OFFSET( 4614, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv),
- NAME_FUNC_OFFSET( 4639, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D),
- NAME_FUNC_OFFSET( 4665, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D),
- NAME_FUNC_OFFSET( 4691, glGetConvolutionFilter, glGetConvolutionFilter, NULL, _gloffset_GetConvolutionFilter),
- NAME_FUNC_OFFSET( 4714, glGetConvolutionParameterfv, glGetConvolutionParameterfv, NULL, _gloffset_GetConvolutionParameterfv),
- NAME_FUNC_OFFSET( 4742, glGetConvolutionParameteriv, glGetConvolutionParameteriv, NULL, _gloffset_GetConvolutionParameteriv),
- NAME_FUNC_OFFSET( 4770, glGetSeparableFilter, glGetSeparableFilter, NULL, _gloffset_GetSeparableFilter),
- NAME_FUNC_OFFSET( 4791, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D),
- NAME_FUNC_OFFSET( 4811, glGetHistogram, glGetHistogram, NULL, _gloffset_GetHistogram),
- NAME_FUNC_OFFSET( 4826, glGetHistogramParameterfv, glGetHistogramParameterfv, NULL, _gloffset_GetHistogramParameterfv),
- NAME_FUNC_OFFSET( 4852, glGetHistogramParameteriv, glGetHistogramParameteriv, NULL, _gloffset_GetHistogramParameteriv),
- NAME_FUNC_OFFSET( 4878, glGetMinmax, glGetMinmax, NULL, _gloffset_GetMinmax),
- NAME_FUNC_OFFSET( 4890, glGetMinmaxParameterfv, glGetMinmaxParameterfv, NULL, _gloffset_GetMinmaxParameterfv),
- NAME_FUNC_OFFSET( 4913, glGetMinmaxParameteriv, glGetMinmaxParameteriv, NULL, _gloffset_GetMinmaxParameteriv),
- NAME_FUNC_OFFSET( 4936, glHistogram, glHistogram, NULL, _gloffset_Histogram),
- NAME_FUNC_OFFSET( 4948, glMinmax, glMinmax, NULL, _gloffset_Minmax),
- NAME_FUNC_OFFSET( 4957, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram),
- NAME_FUNC_OFFSET( 4974, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax),
- NAME_FUNC_OFFSET( 4988, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D),
- NAME_FUNC_OFFSET( 5001, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D),
- NAME_FUNC_OFFSET( 5017, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D),
- NAME_FUNC_OFFSET( 5037, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB),
- NAME_FUNC_OFFSET( 5056, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB),
- NAME_FUNC_OFFSET( 5081, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB),
- NAME_FUNC_OFFSET( 5102, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB),
- NAME_FUNC_OFFSET( 5124, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB),
- NAME_FUNC_OFFSET( 5145, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB),
- NAME_FUNC_OFFSET( 5167, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB),
- NAME_FUNC_OFFSET( 5188, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB),
- NAME_FUNC_OFFSET( 5210, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB),
- NAME_FUNC_OFFSET( 5231, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB),
- NAME_FUNC_OFFSET( 5253, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB),
- NAME_FUNC_OFFSET( 5274, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB),
- NAME_FUNC_OFFSET( 5296, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB),
- NAME_FUNC_OFFSET( 5317, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB),
- NAME_FUNC_OFFSET( 5339, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB),
- NAME_FUNC_OFFSET( 5360, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB),
- NAME_FUNC_OFFSET( 5382, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB),
- NAME_FUNC_OFFSET( 5403, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB),
- NAME_FUNC_OFFSET( 5425, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB),
- NAME_FUNC_OFFSET( 5446, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB),
- NAME_FUNC_OFFSET( 5468, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB),
- NAME_FUNC_OFFSET( 5489, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB),
- NAME_FUNC_OFFSET( 5511, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB),
- NAME_FUNC_OFFSET( 5532, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB),
- NAME_FUNC_OFFSET( 5554, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB),
- NAME_FUNC_OFFSET( 5575, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB),
- NAME_FUNC_OFFSET( 5597, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB),
- NAME_FUNC_OFFSET( 5618, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB),
- NAME_FUNC_OFFSET( 5640, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB),
- NAME_FUNC_OFFSET( 5661, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB),
- NAME_FUNC_OFFSET( 5683, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB),
- NAME_FUNC_OFFSET( 5704, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB),
- NAME_FUNC_OFFSET( 5726, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB),
- NAME_FUNC_OFFSET( 5747, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB),
- NAME_FUNC_OFFSET( 5769, glAttachShader, glAttachShader, NULL, _gloffset_AttachShader),
- NAME_FUNC_OFFSET( 5784, glCreateProgram, glCreateProgram, NULL, _gloffset_CreateProgram),
- NAME_FUNC_OFFSET( 5800, glCreateShader, glCreateShader, NULL, _gloffset_CreateShader),
- NAME_FUNC_OFFSET( 5815, glDeleteProgram, glDeleteProgram, NULL, _gloffset_DeleteProgram),
- NAME_FUNC_OFFSET( 5831, glDeleteShader, glDeleteShader, NULL, _gloffset_DeleteShader),
- NAME_FUNC_OFFSET( 5846, glDetachShader, glDetachShader, NULL, _gloffset_DetachShader),
- NAME_FUNC_OFFSET( 5861, glGetAttachedShaders, glGetAttachedShaders, NULL, _gloffset_GetAttachedShaders),
- NAME_FUNC_OFFSET( 5882, glGetProgramInfoLog, glGetProgramInfoLog, NULL, _gloffset_GetProgramInfoLog),
- NAME_FUNC_OFFSET( 5902, glGetProgramiv, glGetProgramiv, NULL, _gloffset_GetProgramiv),
- NAME_FUNC_OFFSET( 5917, glGetShaderInfoLog, glGetShaderInfoLog, NULL, _gloffset_GetShaderInfoLog),
- NAME_FUNC_OFFSET( 5936, glGetShaderiv, glGetShaderiv, NULL, _gloffset_GetShaderiv),
- NAME_FUNC_OFFSET( 5950, glIsProgram, glIsProgram, NULL, _gloffset_IsProgram),
- NAME_FUNC_OFFSET( 5962, glIsShader, glIsShader, NULL, _gloffset_IsShader),
- NAME_FUNC_OFFSET( 5973, glStencilFuncSeparate, glStencilFuncSeparate, NULL, _gloffset_StencilFuncSeparate),
- NAME_FUNC_OFFSET( 5995, glStencilMaskSeparate, glStencilMaskSeparate, NULL, _gloffset_StencilMaskSeparate),
- NAME_FUNC_OFFSET( 6017, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate),
- NAME_FUNC_OFFSET( 6037, glUniformMatrix2x3fv, glUniformMatrix2x3fv, NULL, _gloffset_UniformMatrix2x3fv),
- NAME_FUNC_OFFSET( 6058, glUniformMatrix2x4fv, glUniformMatrix2x4fv, NULL, _gloffset_UniformMatrix2x4fv),
- NAME_FUNC_OFFSET( 6079, glUniformMatrix3x2fv, glUniformMatrix3x2fv, NULL, _gloffset_UniformMatrix3x2fv),
- NAME_FUNC_OFFSET( 6100, glUniformMatrix3x4fv, glUniformMatrix3x4fv, NULL, _gloffset_UniformMatrix3x4fv),
- NAME_FUNC_OFFSET( 6121, glUniformMatrix4x2fv, glUniformMatrix4x2fv, NULL, _gloffset_UniformMatrix4x2fv),
- NAME_FUNC_OFFSET( 6142, glUniformMatrix4x3fv, glUniformMatrix4x3fv, NULL, _gloffset_UniformMatrix4x3fv),
- NAME_FUNC_OFFSET( 6163, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB),
- NAME_FUNC_OFFSET( 6189, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB),
- NAME_FUNC_OFFSET( 6215, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB),
- NAME_FUNC_OFFSET( 6241, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB),
- NAME_FUNC_OFFSET( 6267, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB),
- NAME_FUNC_OFFSET( 6287, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB),
- NAME_FUNC_OFFSET( 6313, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB),
- NAME_FUNC_OFFSET( 6339, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB),
- NAME_FUNC_OFFSET( 6365, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB),
- NAME_FUNC_OFFSET( 6394, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB),
- NAME_FUNC_OFFSET( 6423, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB),
- NAME_FUNC_OFFSET( 6452, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB),
- NAME_FUNC_OFFSET( 6479, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB),
- NAME_FUNC_OFFSET( 6509, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB),
- NAME_FUNC_OFFSET( 6538, glGetProgramEnvParameterdvARB, glGetProgramEnvParameterdvARB, NULL, _gloffset_GetProgramEnvParameterdvARB),
- NAME_FUNC_OFFSET( 6568, glGetProgramEnvParameterfvARB, glGetProgramEnvParameterfvARB, NULL, _gloffset_GetProgramEnvParameterfvARB),
- NAME_FUNC_OFFSET( 6598, glGetProgramLocalParameterdvARB, glGetProgramLocalParameterdvARB, NULL, _gloffset_GetProgramLocalParameterdvARB),
- NAME_FUNC_OFFSET( 6630, glGetProgramLocalParameterfvARB, glGetProgramLocalParameterfvARB, NULL, _gloffset_GetProgramLocalParameterfvARB),
- NAME_FUNC_OFFSET( 6662, glGetProgramStringARB, glGetProgramStringARB, NULL, _gloffset_GetProgramStringARB),
- NAME_FUNC_OFFSET( 6684, glGetProgramivARB, glGetProgramivARB, NULL, _gloffset_GetProgramivARB),
- NAME_FUNC_OFFSET( 6702, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB),
- NAME_FUNC_OFFSET( 6725, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB),
- NAME_FUNC_OFFSET( 6748, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB),
- NAME_FUNC_OFFSET( 6771, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB),
- NAME_FUNC_OFFSET( 6798, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB),
- NAME_FUNC_OFFSET( 6826, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB),
- NAME_FUNC_OFFSET( 6853, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB),
- NAME_FUNC_OFFSET( 6881, glProgramLocalParameter4dARB, glProgramLocalParameter4dARB, NULL, _gloffset_ProgramLocalParameter4dARB),
- NAME_FUNC_OFFSET( 6910, glProgramLocalParameter4dvARB, glProgramLocalParameter4dvARB, NULL, _gloffset_ProgramLocalParameter4dvARB),
- NAME_FUNC_OFFSET( 6940, glProgramLocalParameter4fARB, glProgramLocalParameter4fARB, NULL, _gloffset_ProgramLocalParameter4fARB),
- NAME_FUNC_OFFSET( 6969, glProgramLocalParameter4fvARB, glProgramLocalParameter4fvARB, NULL, _gloffset_ProgramLocalParameter4fvARB),
- NAME_FUNC_OFFSET( 6999, glProgramStringARB, glProgramStringARB, NULL, _gloffset_ProgramStringARB),
- NAME_FUNC_OFFSET( 7018, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB),
- NAME_FUNC_OFFSET( 7038, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB),
- NAME_FUNC_OFFSET( 7059, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB),
- NAME_FUNC_OFFSET( 7079, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB),
- NAME_FUNC_OFFSET( 7100, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB),
- NAME_FUNC_OFFSET( 7120, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB),
- NAME_FUNC_OFFSET( 7141, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB),
- NAME_FUNC_OFFSET( 7161, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB),
- NAME_FUNC_OFFSET( 7182, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB),
- NAME_FUNC_OFFSET( 7202, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB),
- NAME_FUNC_OFFSET( 7223, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB),
- NAME_FUNC_OFFSET( 7243, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB),
- NAME_FUNC_OFFSET( 7264, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB),
- NAME_FUNC_OFFSET( 7284, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB),
- NAME_FUNC_OFFSET( 7305, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB),
- NAME_FUNC_OFFSET( 7325, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB),
- NAME_FUNC_OFFSET( 7346, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB),
- NAME_FUNC_OFFSET( 7366, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB),
- NAME_FUNC_OFFSET( 7387, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB),
- NAME_FUNC_OFFSET( 7409, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB),
- NAME_FUNC_OFFSET( 7431, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB),
- NAME_FUNC_OFFSET( 7453, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB),
- NAME_FUNC_OFFSET( 7475, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
- NAME_FUNC_OFFSET( 7498, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
- NAME_FUNC_OFFSET( 7521, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
- NAME_FUNC_OFFSET( 7544, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
- NAME_FUNC_OFFSET( 7565, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
- NAME_FUNC_OFFSET( 7585, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
- NAME_FUNC_OFFSET( 7606, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
- NAME_FUNC_OFFSET( 7626, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
- NAME_FUNC_OFFSET( 7647, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
- NAME_FUNC_OFFSET( 7668, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
- NAME_FUNC_OFFSET( 7688, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
- NAME_FUNC_OFFSET( 7709, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
- NAME_FUNC_OFFSET( 7731, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
- NAME_FUNC_OFFSET( 7753, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
- NAME_FUNC_OFFSET( 7775, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
- NAME_FUNC_OFFSET( 7800, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
- NAME_FUNC_OFFSET( 7816, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
- NAME_FUNC_OFFSET( 7832, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
- NAME_FUNC_OFFSET( 7851, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
- NAME_FUNC_OFFSET( 7870, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
- NAME_FUNC_OFFSET( 7886, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
- NAME_FUNC_OFFSET( 7912, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
- NAME_FUNC_OFFSET( 7935, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
- NAME_FUNC_OFFSET( 7957, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
- NAME_FUNC_OFFSET( 7971, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
- NAME_FUNC_OFFSET( 7986, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
- NAME_FUNC_OFFSET( 8003, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
- NAME_FUNC_OFFSET( 8019, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
- NAME_FUNC_OFFSET( 8038, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
- NAME_FUNC_OFFSET( 8052, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
- NAME_FUNC_OFFSET( 8068, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
- NAME_FUNC_OFFSET( 8090, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
- NAME_FUNC_OFFSET( 8113, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
- NAME_FUNC_OFFSET( 8129, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
- NAME_FUNC_OFFSET( 8142, glAttachObjectARB, glAttachObjectARB, NULL, _gloffset_AttachObjectARB),
- NAME_FUNC_OFFSET( 8160, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
- NAME_FUNC_OFFSET( 8179, glCreateProgramObjectARB, glCreateProgramObjectARB, NULL, _gloffset_CreateProgramObjectARB),
- NAME_FUNC_OFFSET( 8204, glCreateShaderObjectARB, glCreateShaderObjectARB, NULL, _gloffset_CreateShaderObjectARB),
- NAME_FUNC_OFFSET( 8228, glDeleteObjectARB, glDeleteObjectARB, NULL, _gloffset_DeleteObjectARB),
- NAME_FUNC_OFFSET( 8246, glDetachObjectARB, glDetachObjectARB, NULL, _gloffset_DetachObjectARB),
- NAME_FUNC_OFFSET( 8264, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
- NAME_FUNC_OFFSET( 8286, glGetAttachedObjectsARB, glGetAttachedObjectsARB, NULL, _gloffset_GetAttachedObjectsARB),
- NAME_FUNC_OFFSET( 8310, glGetHandleARB, glGetHandleARB, NULL, _gloffset_GetHandleARB),
- NAME_FUNC_OFFSET( 8325, glGetInfoLogARB, glGetInfoLogARB, NULL, _gloffset_GetInfoLogARB),
- NAME_FUNC_OFFSET( 8341, glGetObjectParameterfvARB, glGetObjectParameterfvARB, NULL, _gloffset_GetObjectParameterfvARB),
- NAME_FUNC_OFFSET( 8367, glGetObjectParameterivARB, glGetObjectParameterivARB, NULL, _gloffset_GetObjectParameterivARB),
- NAME_FUNC_OFFSET( 8393, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
- NAME_FUNC_OFFSET( 8414, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
- NAME_FUNC_OFFSET( 8438, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
- NAME_FUNC_OFFSET( 8456, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
- NAME_FUNC_OFFSET( 8474, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
- NAME_FUNC_OFFSET( 8491, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
- NAME_FUNC_OFFSET( 8509, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
- NAME_FUNC_OFFSET( 8524, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
- NAME_FUNC_OFFSET( 8540, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
- NAME_FUNC_OFFSET( 8555, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
- NAME_FUNC_OFFSET( 8571, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
- NAME_FUNC_OFFSET( 8586, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
- NAME_FUNC_OFFSET( 8602, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
- NAME_FUNC_OFFSET( 8617, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
- NAME_FUNC_OFFSET( 8633, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
- NAME_FUNC_OFFSET( 8648, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
- NAME_FUNC_OFFSET( 8664, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
- NAME_FUNC_OFFSET( 8679, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
- NAME_FUNC_OFFSET( 8695, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
- NAME_FUNC_OFFSET( 8710, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
- NAME_FUNC_OFFSET( 8726, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
- NAME_FUNC_OFFSET( 8741, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
- NAME_FUNC_OFFSET( 8757, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
- NAME_FUNC_OFFSET( 8779, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
- NAME_FUNC_OFFSET( 8801, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
- NAME_FUNC_OFFSET( 8823, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
- NAME_FUNC_OFFSET( 8845, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
- NAME_FUNC_OFFSET( 8866, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
- NAME_FUNC_OFFSET( 8890, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
- NAME_FUNC_OFFSET( 8911, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
- NAME_FUNC_OFFSET( 8934, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
- NAME_FUNC_OFFSET( 8951, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, _gloffset_PolygonOffsetEXT),
- NAME_FUNC_OFFSET( 8970, gl_dispatch_stub_562, gl_dispatch_stub_562, NULL, _gloffset_GetPixelTexGenParameterfvSGIS),
- NAME_FUNC_OFFSET( 9002, gl_dispatch_stub_563, gl_dispatch_stub_563, NULL, _gloffset_GetPixelTexGenParameterivSGIS),
- NAME_FUNC_OFFSET( 9034, gl_dispatch_stub_564, gl_dispatch_stub_564, NULL, _gloffset_PixelTexGenParameterfSGIS),
- NAME_FUNC_OFFSET( 9062, gl_dispatch_stub_565, gl_dispatch_stub_565, NULL, _gloffset_PixelTexGenParameterfvSGIS),
- NAME_FUNC_OFFSET( 9091, gl_dispatch_stub_566, gl_dispatch_stub_566, NULL, _gloffset_PixelTexGenParameteriSGIS),
- NAME_FUNC_OFFSET( 9119, gl_dispatch_stub_567, gl_dispatch_stub_567, NULL, _gloffset_PixelTexGenParameterivSGIS),
- NAME_FUNC_OFFSET( 9148, gl_dispatch_stub_568, gl_dispatch_stub_568, NULL, _gloffset_SampleMaskSGIS),
- NAME_FUNC_OFFSET( 9165, gl_dispatch_stub_569, gl_dispatch_stub_569, NULL, _gloffset_SamplePatternSGIS),
- NAME_FUNC_OFFSET( 9185, glColorPointerEXT, glColorPointerEXT, NULL, _gloffset_ColorPointerEXT),
- NAME_FUNC_OFFSET( 9203, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, _gloffset_EdgeFlagPointerEXT),
- NAME_FUNC_OFFSET( 9224, glIndexPointerEXT, glIndexPointerEXT, NULL, _gloffset_IndexPointerEXT),
- NAME_FUNC_OFFSET( 9242, glNormalPointerEXT, glNormalPointerEXT, NULL, _gloffset_NormalPointerEXT),
- NAME_FUNC_OFFSET( 9261, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, _gloffset_TexCoordPointerEXT),
- NAME_FUNC_OFFSET( 9282, glVertexPointerEXT, glVertexPointerEXT, NULL, _gloffset_VertexPointerEXT),
- NAME_FUNC_OFFSET( 9301, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET( 9322, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET( 9344, glLockArraysEXT, glLockArraysEXT, NULL, _gloffset_LockArraysEXT),
- NAME_FUNC_OFFSET( 9360, glUnlockArraysEXT, glUnlockArraysEXT, NULL, _gloffset_UnlockArraysEXT),
- NAME_FUNC_OFFSET( 9378, gl_dispatch_stub_580, gl_dispatch_stub_580, NULL, _gloffset_CullParameterdvEXT),
- NAME_FUNC_OFFSET( 9399, gl_dispatch_stub_581, gl_dispatch_stub_581, NULL, _gloffset_CullParameterfvEXT),
- NAME_FUNC_OFFSET( 9420, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
- NAME_FUNC_OFFSET( 9442, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
- NAME_FUNC_OFFSET( 9465, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
- NAME_FUNC_OFFSET( 9487, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
- NAME_FUNC_OFFSET( 9510, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
- NAME_FUNC_OFFSET( 9532, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
- NAME_FUNC_OFFSET( 9555, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
- NAME_FUNC_OFFSET( 9577, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
- NAME_FUNC_OFFSET( 9600, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
- NAME_FUNC_OFFSET( 9622, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
- NAME_FUNC_OFFSET( 9645, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
- NAME_FUNC_OFFSET( 9668, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
- NAME_FUNC_OFFSET( 9692, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
- NAME_FUNC_OFFSET( 9715, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
- NAME_FUNC_OFFSET( 9739, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
- NAME_FUNC_OFFSET( 9762, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
- NAME_FUNC_OFFSET( 9786, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
- NAME_FUNC_OFFSET( 9813, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
- NAME_FUNC_OFFSET( 9834, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
- NAME_FUNC_OFFSET( 9857, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
- NAME_FUNC_OFFSET( 9878, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
- NAME_FUNC_OFFSET( 9893, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
- NAME_FUNC_OFFSET( 9909, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
- NAME_FUNC_OFFSET( 9924, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
- NAME_FUNC_OFFSET( 9940, gl_dispatch_stub_606, gl_dispatch_stub_606, NULL, _gloffset_PixelTexGenSGIX),
- NAME_FUNC_OFFSET( 9958, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET( 9981, glFlushVertexArrayRangeNV, glFlushVertexArrayRangeNV, NULL, _gloffset_FlushVertexArrayRangeNV),
- NAME_FUNC_OFFSET(10007, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, _gloffset_VertexArrayRangeNV),
- NAME_FUNC_OFFSET(10028, glCombinerInputNV, glCombinerInputNV, NULL, _gloffset_CombinerInputNV),
- NAME_FUNC_OFFSET(10046, glCombinerOutputNV, glCombinerOutputNV, NULL, _gloffset_CombinerOutputNV),
- NAME_FUNC_OFFSET(10065, glCombinerParameterfNV, glCombinerParameterfNV, NULL, _gloffset_CombinerParameterfNV),
- NAME_FUNC_OFFSET(10088, glCombinerParameterfvNV, glCombinerParameterfvNV, NULL, _gloffset_CombinerParameterfvNV),
- NAME_FUNC_OFFSET(10112, glCombinerParameteriNV, glCombinerParameteriNV, NULL, _gloffset_CombinerParameteriNV),
- NAME_FUNC_OFFSET(10135, glCombinerParameterivNV, glCombinerParameterivNV, NULL, _gloffset_CombinerParameterivNV),
- NAME_FUNC_OFFSET(10159, glFinalCombinerInputNV, glFinalCombinerInputNV, NULL, _gloffset_FinalCombinerInputNV),
- NAME_FUNC_OFFSET(10182, glGetCombinerInputParameterfvNV, glGetCombinerInputParameterfvNV, NULL, _gloffset_GetCombinerInputParameterfvNV),
- NAME_FUNC_OFFSET(10214, glGetCombinerInputParameterivNV, glGetCombinerInputParameterivNV, NULL, _gloffset_GetCombinerInputParameterivNV),
- NAME_FUNC_OFFSET(10246, glGetCombinerOutputParameterfvNV, glGetCombinerOutputParameterfvNV, NULL, _gloffset_GetCombinerOutputParameterfvNV),
- NAME_FUNC_OFFSET(10279, glGetCombinerOutputParameterivNV, glGetCombinerOutputParameterivNV, NULL, _gloffset_GetCombinerOutputParameterivNV),
- NAME_FUNC_OFFSET(10312, glGetFinalCombinerInputParameterfvNV, glGetFinalCombinerInputParameterfvNV, NULL, _gloffset_GetFinalCombinerInputParameterfvNV),
- NAME_FUNC_OFFSET(10349, glGetFinalCombinerInputParameterivNV, glGetFinalCombinerInputParameterivNV, NULL, _gloffset_GetFinalCombinerInputParameterivNV),
- NAME_FUNC_OFFSET(10386, glResizeBuffersMESA, glResizeBuffersMESA, NULL, _gloffset_ResizeBuffersMESA),
- NAME_FUNC_OFFSET(10406, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(10424, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(10443, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(10461, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(10480, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(10498, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(10517, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(10535, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(10554, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(10572, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(10591, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(10609, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(10628, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(10646, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(10665, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(10683, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(10702, glWindowPos4dMESA, glWindowPos4dMESA, NULL, _gloffset_WindowPos4dMESA),
- NAME_FUNC_OFFSET(10720, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, _gloffset_WindowPos4dvMESA),
- NAME_FUNC_OFFSET(10739, glWindowPos4fMESA, glWindowPos4fMESA, NULL, _gloffset_WindowPos4fMESA),
- NAME_FUNC_OFFSET(10757, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, _gloffset_WindowPos4fvMESA),
- NAME_FUNC_OFFSET(10776, glWindowPos4iMESA, glWindowPos4iMESA, NULL, _gloffset_WindowPos4iMESA),
- NAME_FUNC_OFFSET(10794, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, _gloffset_WindowPos4ivMESA),
- NAME_FUNC_OFFSET(10813, glWindowPos4sMESA, glWindowPos4sMESA, NULL, _gloffset_WindowPos4sMESA),
- NAME_FUNC_OFFSET(10831, glWindowPos4svMESA, glWindowPos4svMESA, NULL, _gloffset_WindowPos4svMESA),
- NAME_FUNC_OFFSET(10850, gl_dispatch_stub_648, gl_dispatch_stub_648, NULL, _gloffset_MultiModeDrawArraysIBM),
- NAME_FUNC_OFFSET(10875, gl_dispatch_stub_649, gl_dispatch_stub_649, NULL, _gloffset_MultiModeDrawElementsIBM),
- NAME_FUNC_OFFSET(10902, gl_dispatch_stub_650, gl_dispatch_stub_650, NULL, _gloffset_DeleteFencesNV),
- NAME_FUNC_OFFSET(10919, gl_dispatch_stub_651, gl_dispatch_stub_651, NULL, _gloffset_FinishFenceNV),
- NAME_FUNC_OFFSET(10935, gl_dispatch_stub_652, gl_dispatch_stub_652, NULL, _gloffset_GenFencesNV),
- NAME_FUNC_OFFSET(10949, gl_dispatch_stub_653, gl_dispatch_stub_653, NULL, _gloffset_GetFenceivNV),
- NAME_FUNC_OFFSET(10964, gl_dispatch_stub_654, gl_dispatch_stub_654, NULL, _gloffset_IsFenceNV),
- NAME_FUNC_OFFSET(10976, gl_dispatch_stub_655, gl_dispatch_stub_655, NULL, _gloffset_SetFenceNV),
- NAME_FUNC_OFFSET(10989, gl_dispatch_stub_656, gl_dispatch_stub_656, NULL, _gloffset_TestFenceNV),
- NAME_FUNC_OFFSET(11003, glAreProgramsResidentNV, glAreProgramsResidentNV, NULL, _gloffset_AreProgramsResidentNV),
- NAME_FUNC_OFFSET(11027, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
- NAME_FUNC_OFFSET(11043, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
- NAME_FUNC_OFFSET(11062, glExecuteProgramNV, glExecuteProgramNV, NULL, _gloffset_ExecuteProgramNV),
- NAME_FUNC_OFFSET(11081, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
- NAME_FUNC_OFFSET(11097, glGetProgramParameterdvNV, glGetProgramParameterdvNV, NULL, _gloffset_GetProgramParameterdvNV),
- NAME_FUNC_OFFSET(11123, glGetProgramParameterfvNV, glGetProgramParameterfvNV, NULL, _gloffset_GetProgramParameterfvNV),
- NAME_FUNC_OFFSET(11149, glGetProgramStringNV, glGetProgramStringNV, NULL, _gloffset_GetProgramStringNV),
- NAME_FUNC_OFFSET(11170, glGetProgramivNV, glGetProgramivNV, NULL, _gloffset_GetProgramivNV),
- NAME_FUNC_OFFSET(11187, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, _gloffset_GetTrackMatrixivNV),
- NAME_FUNC_OFFSET(11208, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(11236, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, _gloffset_GetVertexAttribdvNV),
- NAME_FUNC_OFFSET(11258, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, _gloffset_GetVertexAttribfvNV),
- NAME_FUNC_OFFSET(11280, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, _gloffset_GetVertexAttribivNV),
- NAME_FUNC_OFFSET(11302, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
- NAME_FUNC_OFFSET(11316, glLoadProgramNV, glLoadProgramNV, NULL, _gloffset_LoadProgramNV),
- NAME_FUNC_OFFSET(11332, glProgramParameters4dvNV, glProgramParameters4dvNV, NULL, _gloffset_ProgramParameters4dvNV),
- NAME_FUNC_OFFSET(11357, glProgramParameters4fvNV, glProgramParameters4fvNV, NULL, _gloffset_ProgramParameters4fvNV),
- NAME_FUNC_OFFSET(11382, glRequestResidentProgramsNV, glRequestResidentProgramsNV, NULL, _gloffset_RequestResidentProgramsNV),
- NAME_FUNC_OFFSET(11410, glTrackMatrixNV, glTrackMatrixNV, NULL, _gloffset_TrackMatrixNV),
- NAME_FUNC_OFFSET(11426, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, _gloffset_VertexAttrib1dNV),
- NAME_FUNC_OFFSET(11445, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, _gloffset_VertexAttrib1dvNV),
- NAME_FUNC_OFFSET(11465, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, _gloffset_VertexAttrib1fNV),
- NAME_FUNC_OFFSET(11484, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, _gloffset_VertexAttrib1fvNV),
- NAME_FUNC_OFFSET(11504, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, _gloffset_VertexAttrib1sNV),
- NAME_FUNC_OFFSET(11523, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, _gloffset_VertexAttrib1svNV),
- NAME_FUNC_OFFSET(11543, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, _gloffset_VertexAttrib2dNV),
- NAME_FUNC_OFFSET(11562, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, _gloffset_VertexAttrib2dvNV),
- NAME_FUNC_OFFSET(11582, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, _gloffset_VertexAttrib2fNV),
- NAME_FUNC_OFFSET(11601, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, _gloffset_VertexAttrib2fvNV),
- NAME_FUNC_OFFSET(11621, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, _gloffset_VertexAttrib2sNV),
- NAME_FUNC_OFFSET(11640, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, _gloffset_VertexAttrib2svNV),
- NAME_FUNC_OFFSET(11660, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, _gloffset_VertexAttrib3dNV),
- NAME_FUNC_OFFSET(11679, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, _gloffset_VertexAttrib3dvNV),
- NAME_FUNC_OFFSET(11699, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, _gloffset_VertexAttrib3fNV),
- NAME_FUNC_OFFSET(11718, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, _gloffset_VertexAttrib3fvNV),
- NAME_FUNC_OFFSET(11738, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, _gloffset_VertexAttrib3sNV),
- NAME_FUNC_OFFSET(11757, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, _gloffset_VertexAttrib3svNV),
- NAME_FUNC_OFFSET(11777, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, _gloffset_VertexAttrib4dNV),
- NAME_FUNC_OFFSET(11796, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, _gloffset_VertexAttrib4dvNV),
- NAME_FUNC_OFFSET(11816, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, _gloffset_VertexAttrib4fNV),
- NAME_FUNC_OFFSET(11835, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, _gloffset_VertexAttrib4fvNV),
- NAME_FUNC_OFFSET(11855, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, _gloffset_VertexAttrib4sNV),
- NAME_FUNC_OFFSET(11874, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, _gloffset_VertexAttrib4svNV),
- NAME_FUNC_OFFSET(11894, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, _gloffset_VertexAttrib4ubNV),
- NAME_FUNC_OFFSET(11914, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, _gloffset_VertexAttrib4ubvNV),
- NAME_FUNC_OFFSET(11935, glVertexAttribPointerNV, glVertexAttribPointerNV, NULL, _gloffset_VertexAttribPointerNV),
- NAME_FUNC_OFFSET(11959, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, _gloffset_VertexAttribs1dvNV),
- NAME_FUNC_OFFSET(11980, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, _gloffset_VertexAttribs1fvNV),
- NAME_FUNC_OFFSET(12001, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, _gloffset_VertexAttribs1svNV),
- NAME_FUNC_OFFSET(12022, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, _gloffset_VertexAttribs2dvNV),
- NAME_FUNC_OFFSET(12043, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, _gloffset_VertexAttribs2fvNV),
- NAME_FUNC_OFFSET(12064, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, _gloffset_VertexAttribs2svNV),
- NAME_FUNC_OFFSET(12085, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, _gloffset_VertexAttribs3dvNV),
- NAME_FUNC_OFFSET(12106, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, _gloffset_VertexAttribs3fvNV),
- NAME_FUNC_OFFSET(12127, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, _gloffset_VertexAttribs3svNV),
- NAME_FUNC_OFFSET(12148, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, _gloffset_VertexAttribs4dvNV),
- NAME_FUNC_OFFSET(12169, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, _gloffset_VertexAttribs4fvNV),
- NAME_FUNC_OFFSET(12190, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, _gloffset_VertexAttribs4svNV),
- NAME_FUNC_OFFSET(12211, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, _gloffset_VertexAttribs4ubvNV),
- NAME_FUNC_OFFSET(12233, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, _gloffset_AlphaFragmentOp1ATI),
- NAME_FUNC_OFFSET(12255, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, _gloffset_AlphaFragmentOp2ATI),
- NAME_FUNC_OFFSET(12277, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, _gloffset_AlphaFragmentOp3ATI),
- NAME_FUNC_OFFSET(12299, glBeginFragmentShaderATI, glBeginFragmentShaderATI, NULL, _gloffset_BeginFragmentShaderATI),
- NAME_FUNC_OFFSET(12324, glBindFragmentShaderATI, glBindFragmentShaderATI, NULL, _gloffset_BindFragmentShaderATI),
- NAME_FUNC_OFFSET(12348, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, _gloffset_ColorFragmentOp1ATI),
- NAME_FUNC_OFFSET(12370, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, _gloffset_ColorFragmentOp2ATI),
- NAME_FUNC_OFFSET(12392, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, _gloffset_ColorFragmentOp3ATI),
- NAME_FUNC_OFFSET(12414, glDeleteFragmentShaderATI, glDeleteFragmentShaderATI, NULL, _gloffset_DeleteFragmentShaderATI),
- NAME_FUNC_OFFSET(12440, glEndFragmentShaderATI, glEndFragmentShaderATI, NULL, _gloffset_EndFragmentShaderATI),
- NAME_FUNC_OFFSET(12463, glGenFragmentShadersATI, glGenFragmentShadersATI, NULL, _gloffset_GenFragmentShadersATI),
- NAME_FUNC_OFFSET(12487, glPassTexCoordATI, glPassTexCoordATI, NULL, _gloffset_PassTexCoordATI),
- NAME_FUNC_OFFSET(12505, glSampleMapATI, glSampleMapATI, NULL, _gloffset_SampleMapATI),
- NAME_FUNC_OFFSET(12520, glSetFragmentShaderConstantATI, glSetFragmentShaderConstantATI, NULL, _gloffset_SetFragmentShaderConstantATI),
- NAME_FUNC_OFFSET(12551, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
- NAME_FUNC_OFFSET(12571, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
- NAME_FUNC_OFFSET(12592, gl_dispatch_stub_733, gl_dispatch_stub_733, NULL, _gloffset_ActiveStencilFaceEXT),
- NAME_FUNC_OFFSET(12615, gl_dispatch_stub_734, gl_dispatch_stub_734, NULL, _gloffset_BindVertexArrayAPPLE),
- NAME_FUNC_OFFSET(12638, gl_dispatch_stub_735, gl_dispatch_stub_735, NULL, _gloffset_DeleteVertexArraysAPPLE),
- NAME_FUNC_OFFSET(12664, gl_dispatch_stub_736, gl_dispatch_stub_736, NULL, _gloffset_GenVertexArraysAPPLE),
- NAME_FUNC_OFFSET(12687, gl_dispatch_stub_737, gl_dispatch_stub_737, NULL, _gloffset_IsVertexArrayAPPLE),
- NAME_FUNC_OFFSET(12708, glGetProgramNamedParameterdvNV, glGetProgramNamedParameterdvNV, NULL, _gloffset_GetProgramNamedParameterdvNV),
- NAME_FUNC_OFFSET(12739, glGetProgramNamedParameterfvNV, glGetProgramNamedParameterfvNV, NULL, _gloffset_GetProgramNamedParameterfvNV),
- NAME_FUNC_OFFSET(12770, glProgramNamedParameter4dNV, glProgramNamedParameter4dNV, NULL, _gloffset_ProgramNamedParameter4dNV),
- NAME_FUNC_OFFSET(12798, glProgramNamedParameter4dvNV, glProgramNamedParameter4dvNV, NULL, _gloffset_ProgramNamedParameter4dvNV),
- NAME_FUNC_OFFSET(12827, glProgramNamedParameter4fNV, glProgramNamedParameter4fNV, NULL, _gloffset_ProgramNamedParameter4fNV),
- NAME_FUNC_OFFSET(12855, glProgramNamedParameter4fvNV, glProgramNamedParameter4fvNV, NULL, _gloffset_ProgramNamedParameter4fvNV),
- NAME_FUNC_OFFSET(12884, gl_dispatch_stub_744, gl_dispatch_stub_744, NULL, _gloffset_DepthBoundsEXT),
- NAME_FUNC_OFFSET(12901, gl_dispatch_stub_745, gl_dispatch_stub_745, NULL, _gloffset_BlendEquationSeparateEXT),
- NAME_FUNC_OFFSET(12928, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT),
- NAME_FUNC_OFFSET(12949, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT),
- NAME_FUNC_OFFSET(12971, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT),
- NAME_FUNC_OFFSET(12999, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT),
- NAME_FUNC_OFFSET(13023, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT),
- NAME_FUNC_OFFSET(13048, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT),
- NAME_FUNC_OFFSET(13077, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT),
- NAME_FUNC_OFFSET(13103, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT),
- NAME_FUNC_OFFSET(13129, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT),
- NAME_FUNC_OFFSET(13155, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT),
- NAME_FUNC_OFFSET(13176, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT),
- NAME_FUNC_OFFSET(13198, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT),
- NAME_FUNC_OFFSET(13218, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT),
- NAME_FUNC_OFFSET(13259, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT),
- NAME_FUNC_OFFSET(13291, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT),
- NAME_FUNC_OFFSET(13310, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT),
- NAME_FUNC_OFFSET(13330, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT),
- NAME_FUNC_OFFSET(13355, gl_dispatch_stub_763, gl_dispatch_stub_763, NULL, _gloffset_BlitFramebufferEXT),
- NAME_FUNC_OFFSET(13376, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT),
- NAME_FUNC_OFFSET(13405, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_StencilFuncSeparateATI),
- NAME_FUNC_OFFSET(13430, gl_dispatch_stub_766, gl_dispatch_stub_766, NULL, _gloffset_ProgramEnvParameters4fvEXT),
- NAME_FUNC_OFFSET(13459, gl_dispatch_stub_767, gl_dispatch_stub_767, NULL, _gloffset_ProgramLocalParameters4fvEXT),
- NAME_FUNC_OFFSET(13490, gl_dispatch_stub_768, gl_dispatch_stub_768, NULL, _gloffset_GetQueryObjecti64vEXT),
- NAME_FUNC_OFFSET(13514, gl_dispatch_stub_769, gl_dispatch_stub_769, NULL, _gloffset_GetQueryObjectui64vEXT),
- NAME_FUNC_OFFSET(13539, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement),
- NAME_FUNC_OFFSET(13557, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture),
- NAME_FUNC_OFFSET(13574, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays),
- NAME_FUNC_OFFSET(13590, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident),
- NAME_FUNC_OFFSET(13615, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D),
- NAME_FUNC_OFFSET(13635, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D),
- NAME_FUNC_OFFSET(13655, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D),
- NAME_FUNC_OFFSET(13678, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D),
- NAME_FUNC_OFFSET(13701, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures),
- NAME_FUNC_OFFSET(13721, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures),
- NAME_FUNC_OFFSET(13738, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv),
- NAME_FUNC_OFFSET(13755, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture),
- NAME_FUNC_OFFSET(13770, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures),
- NAME_FUNC_OFFSET(13794, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D),
- NAME_FUNC_OFFSET(13813, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D),
- NAME_FUNC_OFFSET(13832, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor),
- NAME_FUNC_OFFSET(13848, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation),
- NAME_FUNC_OFFSET(13867, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements),
- NAME_FUNC_OFFSET(13890, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
- NAME_FUNC_OFFSET(13906, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
- NAME_FUNC_OFFSET(13922, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv),
- NAME_FUNC_OFFSET(13949, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv),
- NAME_FUNC_OFFSET(13976, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable),
- NAME_FUNC_OFFSET(13996, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
- NAME_FUNC_OFFSET(14015, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
- NAME_FUNC_OFFSET(14034, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
- NAME_FUNC_OFFSET(14064, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
- NAME_FUNC_OFFSET(14094, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
- NAME_FUNC_OFFSET(14124, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
- NAME_FUNC_OFFSET(14154, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable),
- NAME_FUNC_OFFSET(14173, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable),
- NAME_FUNC_OFFSET(14196, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D),
- NAME_FUNC_OFFSET(14221, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D),
- NAME_FUNC_OFFSET(14246, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf),
- NAME_FUNC_OFFSET(14273, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv),
- NAME_FUNC_OFFSET(14301, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri),
- NAME_FUNC_OFFSET(14328, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv),
- NAME_FUNC_OFFSET(14356, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D),
- NAME_FUNC_OFFSET(14385, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D),
- NAME_FUNC_OFFSET(14414, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter),
- NAME_FUNC_OFFSET(14440, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv),
- NAME_FUNC_OFFSET(14471, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv),
- NAME_FUNC_OFFSET(14502, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter),
- NAME_FUNC_OFFSET(14526, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D),
- NAME_FUNC_OFFSET(14549, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram),
- NAME_FUNC_OFFSET(14567, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv),
- NAME_FUNC_OFFSET(14596, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv),
- NAME_FUNC_OFFSET(14625, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax),
- NAME_FUNC_OFFSET(14640, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv),
- NAME_FUNC_OFFSET(14666, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv),
- NAME_FUNC_OFFSET(14692, glHistogram, glHistogram, NULL, _gloffset_Histogram),
- NAME_FUNC_OFFSET(14707, glMinmax, glMinmax, NULL, _gloffset_Minmax),
- NAME_FUNC_OFFSET(14719, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram),
- NAME_FUNC_OFFSET(14739, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax),
- NAME_FUNC_OFFSET(14756, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D),
- NAME_FUNC_OFFSET(14772, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D),
- NAME_FUNC_OFFSET(14791, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D),
- NAME_FUNC_OFFSET(14814, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB),
- NAME_FUNC_OFFSET(14830, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB),
- NAME_FUNC_OFFSET(14852, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB),
- NAME_FUNC_OFFSET(14870, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB),
- NAME_FUNC_OFFSET(14889, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB),
- NAME_FUNC_OFFSET(14907, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB),
- NAME_FUNC_OFFSET(14926, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB),
- NAME_FUNC_OFFSET(14944, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB),
- NAME_FUNC_OFFSET(14963, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB),
- NAME_FUNC_OFFSET(14981, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB),
- NAME_FUNC_OFFSET(15000, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB),
- NAME_FUNC_OFFSET(15018, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB),
- NAME_FUNC_OFFSET(15037, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB),
- NAME_FUNC_OFFSET(15055, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB),
- NAME_FUNC_OFFSET(15074, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB),
- NAME_FUNC_OFFSET(15092, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB),
- NAME_FUNC_OFFSET(15111, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB),
- NAME_FUNC_OFFSET(15129, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB),
- NAME_FUNC_OFFSET(15148, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB),
- NAME_FUNC_OFFSET(15166, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB),
- NAME_FUNC_OFFSET(15185, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB),
- NAME_FUNC_OFFSET(15203, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB),
- NAME_FUNC_OFFSET(15222, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB),
- NAME_FUNC_OFFSET(15240, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB),
- NAME_FUNC_OFFSET(15259, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB),
- NAME_FUNC_OFFSET(15277, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB),
- NAME_FUNC_OFFSET(15296, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB),
- NAME_FUNC_OFFSET(15314, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB),
- NAME_FUNC_OFFSET(15333, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB),
- NAME_FUNC_OFFSET(15351, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB),
- NAME_FUNC_OFFSET(15370, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB),
- NAME_FUNC_OFFSET(15388, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB),
- NAME_FUNC_OFFSET(15407, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB),
- NAME_FUNC_OFFSET(15425, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB),
- NAME_FUNC_OFFSET(15444, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate),
- NAME_FUNC_OFFSET(15467, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB),
- NAME_FUNC_OFFSET(15490, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB),
- NAME_FUNC_OFFSET(15513, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB),
- NAME_FUNC_OFFSET(15536, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB),
- NAME_FUNC_OFFSET(15559, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB),
- NAME_FUNC_OFFSET(15576, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB),
- NAME_FUNC_OFFSET(15599, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB),
- NAME_FUNC_OFFSET(15622, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB),
- NAME_FUNC_OFFSET(15645, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB),
- NAME_FUNC_OFFSET(15671, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB),
- NAME_FUNC_OFFSET(15697, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB),
- NAME_FUNC_OFFSET(15723, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB),
- NAME_FUNC_OFFSET(15747, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB),
- NAME_FUNC_OFFSET(15774, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB),
- NAME_FUNC_OFFSET(15800, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB),
- NAME_FUNC_OFFSET(15820, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB),
- NAME_FUNC_OFFSET(15840, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB),
- NAME_FUNC_OFFSET(15860, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB),
- NAME_FUNC_OFFSET(15883, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB),
- NAME_FUNC_OFFSET(15907, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB),
- NAME_FUNC_OFFSET(15930, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB),
- NAME_FUNC_OFFSET(15954, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB),
- NAME_FUNC_OFFSET(15971, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB),
- NAME_FUNC_OFFSET(15989, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB),
- NAME_FUNC_OFFSET(16006, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB),
- NAME_FUNC_OFFSET(16024, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB),
- NAME_FUNC_OFFSET(16041, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB),
- NAME_FUNC_OFFSET(16059, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB),
- NAME_FUNC_OFFSET(16076, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB),
- NAME_FUNC_OFFSET(16094, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB),
- NAME_FUNC_OFFSET(16111, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB),
- NAME_FUNC_OFFSET(16129, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB),
- NAME_FUNC_OFFSET(16146, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB),
- NAME_FUNC_OFFSET(16164, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB),
- NAME_FUNC_OFFSET(16181, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB),
- NAME_FUNC_OFFSET(16199, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB),
- NAME_FUNC_OFFSET(16216, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB),
- NAME_FUNC_OFFSET(16234, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB),
- NAME_FUNC_OFFSET(16251, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB),
- NAME_FUNC_OFFSET(16269, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB),
- NAME_FUNC_OFFSET(16288, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB),
- NAME_FUNC_OFFSET(16307, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB),
- NAME_FUNC_OFFSET(16326, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB),
- NAME_FUNC_OFFSET(16345, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
- NAME_FUNC_OFFSET(16365, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
- NAME_FUNC_OFFSET(16385, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
- NAME_FUNC_OFFSET(16405, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
- NAME_FUNC_OFFSET(16423, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
- NAME_FUNC_OFFSET(16440, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
- NAME_FUNC_OFFSET(16458, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
- NAME_FUNC_OFFSET(16475, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
- NAME_FUNC_OFFSET(16493, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
- NAME_FUNC_OFFSET(16511, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
- NAME_FUNC_OFFSET(16528, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
- NAME_FUNC_OFFSET(16546, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
- NAME_FUNC_OFFSET(16565, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
- NAME_FUNC_OFFSET(16584, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
- NAME_FUNC_OFFSET(16603, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
- NAME_FUNC_OFFSET(16625, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
- NAME_FUNC_OFFSET(16638, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
- NAME_FUNC_OFFSET(16651, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
- NAME_FUNC_OFFSET(16667, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
- NAME_FUNC_OFFSET(16683, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
- NAME_FUNC_OFFSET(16696, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
- NAME_FUNC_OFFSET(16719, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
- NAME_FUNC_OFFSET(16739, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
- NAME_FUNC_OFFSET(16758, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
- NAME_FUNC_OFFSET(16769, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
- NAME_FUNC_OFFSET(16781, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
- NAME_FUNC_OFFSET(16795, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
- NAME_FUNC_OFFSET(16808, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
- NAME_FUNC_OFFSET(16824, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
- NAME_FUNC_OFFSET(16835, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
- NAME_FUNC_OFFSET(16848, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
- NAME_FUNC_OFFSET(16867, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
- NAME_FUNC_OFFSET(16887, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
- NAME_FUNC_OFFSET(16900, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
- NAME_FUNC_OFFSET(16910, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
- NAME_FUNC_OFFSET(16926, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
- NAME_FUNC_OFFSET(16945, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
- NAME_FUNC_OFFSET(16963, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
- NAME_FUNC_OFFSET(16984, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
- NAME_FUNC_OFFSET(16999, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
- NAME_FUNC_OFFSET(17014, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
- NAME_FUNC_OFFSET(17028, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
- NAME_FUNC_OFFSET(17043, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
- NAME_FUNC_OFFSET(17055, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
- NAME_FUNC_OFFSET(17068, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
- NAME_FUNC_OFFSET(17080, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
- NAME_FUNC_OFFSET(17093, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
- NAME_FUNC_OFFSET(17105, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
- NAME_FUNC_OFFSET(17118, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
- NAME_FUNC_OFFSET(17130, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
- NAME_FUNC_OFFSET(17143, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
- NAME_FUNC_OFFSET(17155, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
- NAME_FUNC_OFFSET(17168, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
- NAME_FUNC_OFFSET(17180, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
- NAME_FUNC_OFFSET(17193, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
- NAME_FUNC_OFFSET(17205, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
- NAME_FUNC_OFFSET(17218, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
- NAME_FUNC_OFFSET(17230, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
- NAME_FUNC_OFFSET(17243, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
- NAME_FUNC_OFFSET(17262, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
- NAME_FUNC_OFFSET(17281, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
- NAME_FUNC_OFFSET(17300, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
- NAME_FUNC_OFFSET(17313, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
- NAME_FUNC_OFFSET(17331, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
- NAME_FUNC_OFFSET(17352, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
- NAME_FUNC_OFFSET(17370, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
- NAME_FUNC_OFFSET(17390, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
- NAME_FUNC_OFFSET(17404, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
- NAME_FUNC_OFFSET(17421, gl_dispatch_stub_568, gl_dispatch_stub_568, NULL, _gloffset_SampleMaskSGIS),
- NAME_FUNC_OFFSET(17437, gl_dispatch_stub_569, gl_dispatch_stub_569, NULL, _gloffset_SamplePatternSGIS),
- NAME_FUNC_OFFSET(17456, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(17474, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(17495, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(17517, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(17536, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(17558, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(17581, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
- NAME_FUNC_OFFSET(17600, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
- NAME_FUNC_OFFSET(17620, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
- NAME_FUNC_OFFSET(17639, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
- NAME_FUNC_OFFSET(17659, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
- NAME_FUNC_OFFSET(17678, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
- NAME_FUNC_OFFSET(17698, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
- NAME_FUNC_OFFSET(17717, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
- NAME_FUNC_OFFSET(17737, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
- NAME_FUNC_OFFSET(17756, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
- NAME_FUNC_OFFSET(17776, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
- NAME_FUNC_OFFSET(17796, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
- NAME_FUNC_OFFSET(17817, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
- NAME_FUNC_OFFSET(17837, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
- NAME_FUNC_OFFSET(17858, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
- NAME_FUNC_OFFSET(17878, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
- NAME_FUNC_OFFSET(17899, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
- NAME_FUNC_OFFSET(17923, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
- NAME_FUNC_OFFSET(17941, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
- NAME_FUNC_OFFSET(17961, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
- NAME_FUNC_OFFSET(17979, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
- NAME_FUNC_OFFSET(17991, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
- NAME_FUNC_OFFSET(18004, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
- NAME_FUNC_OFFSET(18016, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
- NAME_FUNC_OFFSET(18029, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET(18049, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET(18073, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(18087, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(18104, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(18119, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(18137, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(18151, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(18168, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(18183, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(18201, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(18215, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(18232, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(18247, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(18265, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(18279, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(18296, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(18311, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(18329, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(18343, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(18360, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(18375, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(18393, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(18407, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(18424, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(18439, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(18457, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(18471, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(18488, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(18503, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(18521, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(18535, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(18552, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(18567, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(18585, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
- NAME_FUNC_OFFSET(18602, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
- NAME_FUNC_OFFSET(18622, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
- NAME_FUNC_OFFSET(18639, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(18665, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(18694, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
- NAME_FUNC_OFFSET(18709, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
- NAME_FUNC_OFFSET(18727, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
- NAME_FUNC_OFFSET(18746, gl_dispatch_stub_745, gl_dispatch_stub_745, NULL, _gloffset_BlendEquationSeparateEXT),
- NAME_FUNC_OFFSET(18770, gl_dispatch_stub_745, gl_dispatch_stub_745, NULL, _gloffset_BlendEquationSeparateEXT),
- NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
-};
-
-#undef NAME_FUNC_OFFSET
+/* DO NOT EDIT - This file generated automatically by gl_procs.py (from Mesa) script */
+
+/*
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * (C) Copyright IBM Corporation 2004, 2006
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL, IBM,
+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+
+/* This file is only included by glapi.c and is used for
+ * the GetProcAddress() function
+ */
+
+typedef struct {
+ GLint Name_offset;
+#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)
+ _glapi_proc Address;
+#endif
+ GLuint Offset;
+} glprocs_table_t;
+
+#if !defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING)
+# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , o }
+#elif defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING)
+# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f1 , o }
+#elif defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING)
+# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f2 , o }
+#elif !defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING)
+# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f3 , o }
+#endif
+
+
+
+static const char gl_string_table[] =
+ "glNewList\0"
+ "glEndList\0"
+ "glCallList\0"
+ "glCallLists\0"
+ "glDeleteLists\0"
+ "glGenLists\0"
+ "glListBase\0"
+ "glBegin\0"
+ "glBitmap\0"
+ "glColor3b\0"
+ "glColor3bv\0"
+ "glColor3d\0"
+ "glColor3dv\0"
+ "glColor3f\0"
+ "glColor3fv\0"
+ "glColor3i\0"
+ "glColor3iv\0"
+ "glColor3s\0"
+ "glColor3sv\0"
+ "glColor3ub\0"
+ "glColor3ubv\0"
+ "glColor3ui\0"
+ "glColor3uiv\0"
+ "glColor3us\0"
+ "glColor3usv\0"
+ "glColor4b\0"
+ "glColor4bv\0"
+ "glColor4d\0"
+ "glColor4dv\0"
+ "glColor4f\0"
+ "glColor4fv\0"
+ "glColor4i\0"
+ "glColor4iv\0"
+ "glColor4s\0"
+ "glColor4sv\0"
+ "glColor4ub\0"
+ "glColor4ubv\0"
+ "glColor4ui\0"
+ "glColor4uiv\0"
+ "glColor4us\0"
+ "glColor4usv\0"
+ "glEdgeFlag\0"
+ "glEdgeFlagv\0"
+ "glEnd\0"
+ "glIndexd\0"
+ "glIndexdv\0"
+ "glIndexf\0"
+ "glIndexfv\0"
+ "glIndexi\0"
+ "glIndexiv\0"
+ "glIndexs\0"
+ "glIndexsv\0"
+ "glNormal3b\0"
+ "glNormal3bv\0"
+ "glNormal3d\0"
+ "glNormal3dv\0"
+ "glNormal3f\0"
+ "glNormal3fv\0"
+ "glNormal3i\0"
+ "glNormal3iv\0"
+ "glNormal3s\0"
+ "glNormal3sv\0"
+ "glRasterPos2d\0"
+ "glRasterPos2dv\0"
+ "glRasterPos2f\0"
+ "glRasterPos2fv\0"
+ "glRasterPos2i\0"
+ "glRasterPos2iv\0"
+ "glRasterPos2s\0"
+ "glRasterPos2sv\0"
+ "glRasterPos3d\0"
+ "glRasterPos3dv\0"
+ "glRasterPos3f\0"
+ "glRasterPos3fv\0"
+ "glRasterPos3i\0"
+ "glRasterPos3iv\0"
+ "glRasterPos3s\0"
+ "glRasterPos3sv\0"
+ "glRasterPos4d\0"
+ "glRasterPos4dv\0"
+ "glRasterPos4f\0"
+ "glRasterPos4fv\0"
+ "glRasterPos4i\0"
+ "glRasterPos4iv\0"
+ "glRasterPos4s\0"
+ "glRasterPos4sv\0"
+ "glRectd\0"
+ "glRectdv\0"
+ "glRectf\0"
+ "glRectfv\0"
+ "glRecti\0"
+ "glRectiv\0"
+ "glRects\0"
+ "glRectsv\0"
+ "glTexCoord1d\0"
+ "glTexCoord1dv\0"
+ "glTexCoord1f\0"
+ "glTexCoord1fv\0"
+ "glTexCoord1i\0"
+ "glTexCoord1iv\0"
+ "glTexCoord1s\0"
+ "glTexCoord1sv\0"
+ "glTexCoord2d\0"
+ "glTexCoord2dv\0"
+ "glTexCoord2f\0"
+ "glTexCoord2fv\0"
+ "glTexCoord2i\0"
+ "glTexCoord2iv\0"
+ "glTexCoord2s\0"
+ "glTexCoord2sv\0"
+ "glTexCoord3d\0"
+ "glTexCoord3dv\0"
+ "glTexCoord3f\0"
+ "glTexCoord3fv\0"
+ "glTexCoord3i\0"
+ "glTexCoord3iv\0"
+ "glTexCoord3s\0"
+ "glTexCoord3sv\0"
+ "glTexCoord4d\0"
+ "glTexCoord4dv\0"
+ "glTexCoord4f\0"
+ "glTexCoord4fv\0"
+ "glTexCoord4i\0"
+ "glTexCoord4iv\0"
+ "glTexCoord4s\0"
+ "glTexCoord4sv\0"
+ "glVertex2d\0"
+ "glVertex2dv\0"
+ "glVertex2f\0"
+ "glVertex2fv\0"
+ "glVertex2i\0"
+ "glVertex2iv\0"
+ "glVertex2s\0"
+ "glVertex2sv\0"
+ "glVertex3d\0"
+ "glVertex3dv\0"
+ "glVertex3f\0"
+ "glVertex3fv\0"
+ "glVertex3i\0"
+ "glVertex3iv\0"
+ "glVertex3s\0"
+ "glVertex3sv\0"
+ "glVertex4d\0"
+ "glVertex4dv\0"
+ "glVertex4f\0"
+ "glVertex4fv\0"
+ "glVertex4i\0"
+ "glVertex4iv\0"
+ "glVertex4s\0"
+ "glVertex4sv\0"
+ "glClipPlane\0"
+ "glColorMaterial\0"
+ "glCullFace\0"
+ "glFogf\0"
+ "glFogfv\0"
+ "glFogi\0"
+ "glFogiv\0"
+ "glFrontFace\0"
+ "glHint\0"
+ "glLightf\0"
+ "glLightfv\0"
+ "glLighti\0"
+ "glLightiv\0"
+ "glLightModelf\0"
+ "glLightModelfv\0"
+ "glLightModeli\0"
+ "glLightModeliv\0"
+ "glLineStipple\0"
+ "glLineWidth\0"
+ "glMaterialf\0"
+ "glMaterialfv\0"
+ "glMateriali\0"
+ "glMaterialiv\0"
+ "glPointSize\0"
+ "glPolygonMode\0"
+ "glPolygonStipple\0"
+ "glScissor\0"
+ "glShadeModel\0"
+ "glTexParameterf\0"
+ "glTexParameterfv\0"
+ "glTexParameteri\0"
+ "glTexParameteriv\0"
+ "glTexImage1D\0"
+ "glTexImage2D\0"
+ "glTexEnvf\0"
+ "glTexEnvfv\0"
+ "glTexEnvi\0"
+ "glTexEnviv\0"
+ "glTexGend\0"
+ "glTexGendv\0"
+ "glTexGenf\0"
+ "glTexGenfv\0"
+ "glTexGeni\0"
+ "glTexGeniv\0"
+ "glFeedbackBuffer\0"
+ "glSelectBuffer\0"
+ "glRenderMode\0"
+ "glInitNames\0"
+ "glLoadName\0"
+ "glPassThrough\0"
+ "glPopName\0"
+ "glPushName\0"
+ "glDrawBuffer\0"
+ "glClear\0"
+ "glClearAccum\0"
+ "glClearIndex\0"
+ "glClearColor\0"
+ "glClearStencil\0"
+ "glClearDepth\0"
+ "glStencilMask\0"
+ "glColorMask\0"
+ "glDepthMask\0"
+ "glIndexMask\0"
+ "glAccum\0"
+ "glDisable\0"
+ "glEnable\0"
+ "glFinish\0"
+ "glFlush\0"
+ "glPopAttrib\0"
+ "glPushAttrib\0"
+ "glMap1d\0"
+ "glMap1f\0"
+ "glMap2d\0"
+ "glMap2f\0"
+ "glMapGrid1d\0"
+ "glMapGrid1f\0"
+ "glMapGrid2d\0"
+ "glMapGrid2f\0"
+ "glEvalCoord1d\0"
+ "glEvalCoord1dv\0"
+ "glEvalCoord1f\0"
+ "glEvalCoord1fv\0"
+ "glEvalCoord2d\0"
+ "glEvalCoord2dv\0"
+ "glEvalCoord2f\0"
+ "glEvalCoord2fv\0"
+ "glEvalMesh1\0"
+ "glEvalPoint1\0"
+ "glEvalMesh2\0"
+ "glEvalPoint2\0"
+ "glAlphaFunc\0"
+ "glBlendFunc\0"
+ "glLogicOp\0"
+ "glStencilFunc\0"
+ "glStencilOp\0"
+ "glDepthFunc\0"
+ "glPixelZoom\0"
+ "glPixelTransferf\0"
+ "glPixelTransferi\0"
+ "glPixelStoref\0"
+ "glPixelStorei\0"
+ "glPixelMapfv\0"
+ "glPixelMapuiv\0"
+ "glPixelMapusv\0"
+ "glReadBuffer\0"
+ "glCopyPixels\0"
+ "glReadPixels\0"
+ "glDrawPixels\0"
+ "glGetBooleanv\0"
+ "glGetClipPlane\0"
+ "glGetDoublev\0"
+ "glGetError\0"
+ "glGetFloatv\0"
+ "glGetIntegerv\0"
+ "glGetLightfv\0"
+ "glGetLightiv\0"
+ "glGetMapdv\0"
+ "glGetMapfv\0"
+ "glGetMapiv\0"
+ "glGetMaterialfv\0"
+ "glGetMaterialiv\0"
+ "glGetPixelMapfv\0"
+ "glGetPixelMapuiv\0"
+ "glGetPixelMapusv\0"
+ "glGetPolygonStipple\0"
+ "glGetString\0"
+ "glGetTexEnvfv\0"
+ "glGetTexEnviv\0"
+ "glGetTexGendv\0"
+ "glGetTexGenfv\0"
+ "glGetTexGeniv\0"
+ "glGetTexImage\0"
+ "glGetTexParameterfv\0"
+ "glGetTexParameteriv\0"
+ "glGetTexLevelParameterfv\0"
+ "glGetTexLevelParameteriv\0"
+ "glIsEnabled\0"
+ "glIsList\0"
+ "glDepthRange\0"
+ "glFrustum\0"
+ "glLoadIdentity\0"
+ "glLoadMatrixf\0"
+ "glLoadMatrixd\0"
+ "glMatrixMode\0"
+ "glMultMatrixf\0"
+ "glMultMatrixd\0"
+ "glOrtho\0"
+ "glPopMatrix\0"
+ "glPushMatrix\0"
+ "glRotated\0"
+ "glRotatef\0"
+ "glScaled\0"
+ "glScalef\0"
+ "glTranslated\0"
+ "glTranslatef\0"
+ "glViewport\0"
+ "glArrayElement\0"
+ "glBindTexture\0"
+ "glColorPointer\0"
+ "glDisableClientState\0"
+ "glDrawArrays\0"
+ "glDrawElements\0"
+ "glEdgeFlagPointer\0"
+ "glEnableClientState\0"
+ "glIndexPointer\0"
+ "glIndexub\0"
+ "glIndexubv\0"
+ "glInterleavedArrays\0"
+ "glNormalPointer\0"
+ "glPolygonOffset\0"
+ "glTexCoordPointer\0"
+ "glVertexPointer\0"
+ "glAreTexturesResident\0"
+ "glCopyTexImage1D\0"
+ "glCopyTexImage2D\0"
+ "glCopyTexSubImage1D\0"
+ "glCopyTexSubImage2D\0"
+ "glDeleteTextures\0"
+ "glGenTextures\0"
+ "glGetPointerv\0"
+ "glIsTexture\0"
+ "glPrioritizeTextures\0"
+ "glTexSubImage1D\0"
+ "glTexSubImage2D\0"
+ "glPopClientAttrib\0"
+ "glPushClientAttrib\0"
+ "glBlendColor\0"
+ "glBlendEquation\0"
+ "glDrawRangeElements\0"
+ "glColorTable\0"
+ "glColorTableParameterfv\0"
+ "glColorTableParameteriv\0"
+ "glCopyColorTable\0"
+ "glGetColorTable\0"
+ "glGetColorTableParameterfv\0"
+ "glGetColorTableParameteriv\0"
+ "glColorSubTable\0"
+ "glCopyColorSubTable\0"
+ "glConvolutionFilter1D\0"
+ "glConvolutionFilter2D\0"
+ "glConvolutionParameterf\0"
+ "glConvolutionParameterfv\0"
+ "glConvolutionParameteri\0"
+ "glConvolutionParameteriv\0"
+ "glCopyConvolutionFilter1D\0"
+ "glCopyConvolutionFilter2D\0"
+ "glGetConvolutionFilter\0"
+ "glGetConvolutionParameterfv\0"
+ "glGetConvolutionParameteriv\0"
+ "glGetSeparableFilter\0"
+ "glSeparableFilter2D\0"
+ "glGetHistogram\0"
+ "glGetHistogramParameterfv\0"
+ "glGetHistogramParameteriv\0"
+ "glGetMinmax\0"
+ "glGetMinmaxParameterfv\0"
+ "glGetMinmaxParameteriv\0"
+ "glHistogram\0"
+ "glMinmax\0"
+ "glResetHistogram\0"
+ "glResetMinmax\0"
+ "glTexImage3D\0"
+ "glTexSubImage3D\0"
+ "glCopyTexSubImage3D\0"
+ "glActiveTextureARB\0"
+ "glClientActiveTextureARB\0"
+ "glMultiTexCoord1dARB\0"
+ "glMultiTexCoord1dvARB\0"
+ "glMultiTexCoord1fARB\0"
+ "glMultiTexCoord1fvARB\0"
+ "glMultiTexCoord1iARB\0"
+ "glMultiTexCoord1ivARB\0"
+ "glMultiTexCoord1sARB\0"
+ "glMultiTexCoord1svARB\0"
+ "glMultiTexCoord2dARB\0"
+ "glMultiTexCoord2dvARB\0"
+ "glMultiTexCoord2fARB\0"
+ "glMultiTexCoord2fvARB\0"
+ "glMultiTexCoord2iARB\0"
+ "glMultiTexCoord2ivARB\0"
+ "glMultiTexCoord2sARB\0"
+ "glMultiTexCoord2svARB\0"
+ "glMultiTexCoord3dARB\0"
+ "glMultiTexCoord3dvARB\0"
+ "glMultiTexCoord3fARB\0"
+ "glMultiTexCoord3fvARB\0"
+ "glMultiTexCoord3iARB\0"
+ "glMultiTexCoord3ivARB\0"
+ "glMultiTexCoord3sARB\0"
+ "glMultiTexCoord3svARB\0"
+ "glMultiTexCoord4dARB\0"
+ "glMultiTexCoord4dvARB\0"
+ "glMultiTexCoord4fARB\0"
+ "glMultiTexCoord4fvARB\0"
+ "glMultiTexCoord4iARB\0"
+ "glMultiTexCoord4ivARB\0"
+ "glMultiTexCoord4sARB\0"
+ "glMultiTexCoord4svARB\0"
+ "glAttachShader\0"
+ "glCreateProgram\0"
+ "glCreateShader\0"
+ "glDeleteProgram\0"
+ "glDeleteShader\0"
+ "glDetachShader\0"
+ "glGetAttachedShaders\0"
+ "glGetProgramInfoLog\0"
+ "glGetProgramiv\0"
+ "glGetShaderInfoLog\0"
+ "glGetShaderiv\0"
+ "glIsProgram\0"
+ "glIsShader\0"
+ "glStencilFuncSeparate\0"
+ "glStencilMaskSeparate\0"
+ "glStencilOpSeparate\0"
+ "glUniformMatrix2x3fv\0"
+ "glUniformMatrix2x4fv\0"
+ "glUniformMatrix3x2fv\0"
+ "glUniformMatrix3x4fv\0"
+ "glUniformMatrix4x2fv\0"
+ "glUniformMatrix4x3fv\0"
+ "glClampColor\0"
+ "glClearBufferfi\0"
+ "glClearBufferfv\0"
+ "glClearBufferiv\0"
+ "glClearBufferuiv\0"
+ "glGetStringi\0"
+ "glTexBuffer\0"
+ "glFramebufferTexture\0"
+ "glGetBufferParameteri64v\0"
+ "glGetInteger64i_v\0"
+ "glVertexAttribDivisor\0"
+ "glLoadTransposeMatrixdARB\0"
+ "glLoadTransposeMatrixfARB\0"
+ "glMultTransposeMatrixdARB\0"
+ "glMultTransposeMatrixfARB\0"
+ "glSampleCoverageARB\0"
+ "glCompressedTexImage1DARB\0"
+ "glCompressedTexImage2DARB\0"
+ "glCompressedTexImage3DARB\0"
+ "glCompressedTexSubImage1DARB\0"
+ "glCompressedTexSubImage2DARB\0"
+ "glCompressedTexSubImage3DARB\0"
+ "glGetCompressedTexImageARB\0"
+ "glDisableVertexAttribArrayARB\0"
+ "glEnableVertexAttribArrayARB\0"
+ "glGetProgramEnvParameterdvARB\0"
+ "glGetProgramEnvParameterfvARB\0"
+ "glGetProgramLocalParameterdvARB\0"
+ "glGetProgramLocalParameterfvARB\0"
+ "glGetProgramStringARB\0"
+ "glGetProgramivARB\0"
+ "glGetVertexAttribdvARB\0"
+ "glGetVertexAttribfvARB\0"
+ "glGetVertexAttribivARB\0"
+ "glProgramEnvParameter4dARB\0"
+ "glProgramEnvParameter4dvARB\0"
+ "glProgramEnvParameter4fARB\0"
+ "glProgramEnvParameter4fvARB\0"
+ "glProgramLocalParameter4dARB\0"
+ "glProgramLocalParameter4dvARB\0"
+ "glProgramLocalParameter4fARB\0"
+ "glProgramLocalParameter4fvARB\0"
+ "glProgramStringARB\0"
+ "glVertexAttrib1dARB\0"
+ "glVertexAttrib1dvARB\0"
+ "glVertexAttrib1fARB\0"
+ "glVertexAttrib1fvARB\0"
+ "glVertexAttrib1sARB\0"
+ "glVertexAttrib1svARB\0"
+ "glVertexAttrib2dARB\0"
+ "glVertexAttrib2dvARB\0"
+ "glVertexAttrib2fARB\0"
+ "glVertexAttrib2fvARB\0"
+ "glVertexAttrib2sARB\0"
+ "glVertexAttrib2svARB\0"
+ "glVertexAttrib3dARB\0"
+ "glVertexAttrib3dvARB\0"
+ "glVertexAttrib3fARB\0"
+ "glVertexAttrib3fvARB\0"
+ "glVertexAttrib3sARB\0"
+ "glVertexAttrib3svARB\0"
+ "glVertexAttrib4NbvARB\0"
+ "glVertexAttrib4NivARB\0"
+ "glVertexAttrib4NsvARB\0"
+ "glVertexAttrib4NubARB\0"
+ "glVertexAttrib4NubvARB\0"
+ "glVertexAttrib4NuivARB\0"
+ "glVertexAttrib4NusvARB\0"
+ "glVertexAttrib4bvARB\0"
+ "glVertexAttrib4dARB\0"
+ "glVertexAttrib4dvARB\0"
+ "glVertexAttrib4fARB\0"
+ "glVertexAttrib4fvARB\0"
+ "glVertexAttrib4ivARB\0"
+ "glVertexAttrib4sARB\0"
+ "glVertexAttrib4svARB\0"
+ "glVertexAttrib4ubvARB\0"
+ "glVertexAttrib4uivARB\0"
+ "glVertexAttrib4usvARB\0"
+ "glVertexAttribPointerARB\0"
+ "glBindBufferARB\0"
+ "glBufferDataARB\0"
+ "glBufferSubDataARB\0"
+ "glDeleteBuffersARB\0"
+ "glGenBuffersARB\0"
+ "glGetBufferParameterivARB\0"
+ "glGetBufferPointervARB\0"
+ "glGetBufferSubDataARB\0"
+ "glIsBufferARB\0"
+ "glMapBufferARB\0"
+ "glUnmapBufferARB\0"
+ "glBeginQueryARB\0"
+ "glDeleteQueriesARB\0"
+ "glEndQueryARB\0"
+ "glGenQueriesARB\0"
+ "glGetQueryObjectivARB\0"
+ "glGetQueryObjectuivARB\0"
+ "glGetQueryivARB\0"
+ "glIsQueryARB\0"
+ "glAttachObjectARB\0"
+ "glCompileShaderARB\0"
+ "glCreateProgramObjectARB\0"
+ "glCreateShaderObjectARB\0"
+ "glDeleteObjectARB\0"
+ "glDetachObjectARB\0"
+ "glGetActiveUniformARB\0"
+ "glGetAttachedObjectsARB\0"
+ "glGetHandleARB\0"
+ "glGetInfoLogARB\0"
+ "glGetObjectParameterfvARB\0"
+ "glGetObjectParameterivARB\0"
+ "glGetShaderSourceARB\0"
+ "glGetUniformLocationARB\0"
+ "glGetUniformfvARB\0"
+ "glGetUniformivARB\0"
+ "glLinkProgramARB\0"
+ "glShaderSourceARB\0"
+ "glUniform1fARB\0"
+ "glUniform1fvARB\0"
+ "glUniform1iARB\0"
+ "glUniform1ivARB\0"
+ "glUniform2fARB\0"
+ "glUniform2fvARB\0"
+ "glUniform2iARB\0"
+ "glUniform2ivARB\0"
+ "glUniform3fARB\0"
+ "glUniform3fvARB\0"
+ "glUniform3iARB\0"
+ "glUniform3ivARB\0"
+ "glUniform4fARB\0"
+ "glUniform4fvARB\0"
+ "glUniform4iARB\0"
+ "glUniform4ivARB\0"
+ "glUniformMatrix2fvARB\0"
+ "glUniformMatrix3fvARB\0"
+ "glUniformMatrix4fvARB\0"
+ "glUseProgramObjectARB\0"
+ "glValidateProgramARB\0"
+ "glBindAttribLocationARB\0"
+ "glGetActiveAttribARB\0"
+ "glGetAttribLocationARB\0"
+ "glDrawBuffersARB\0"
+ "glDrawArraysInstancedARB\0"
+ "glDrawElementsInstancedARB\0"
+ "glRenderbufferStorageMultisample\0"
+ "glFramebufferTextureARB\0"
+ "glFramebufferTextureFaceARB\0"
+ "glProgramParameteriARB\0"
+ "glVertexAttribDivisorARB\0"
+ "glFlushMappedBufferRange\0"
+ "glMapBufferRange\0"
+ "glBindVertexArray\0"
+ "glGenVertexArrays\0"
+ "glCopyBufferSubData\0"
+ "glClientWaitSync\0"
+ "glDeleteSync\0"
+ "glFenceSync\0"
+ "glGetInteger64v\0"
+ "glGetSynciv\0"
+ "glIsSync\0"
+ "glWaitSync\0"
+ "glDrawElementsBaseVertex\0"
+ "glDrawRangeElementsBaseVertex\0"
+ "glMultiDrawElementsBaseVertex\0"
+ "glBlendEquationSeparateiARB\0"
+ "glBlendEquationiARB\0"
+ "glBlendFuncSeparateiARB\0"
+ "glBlendFunciARB\0"
+ "glBindTransformFeedback\0"
+ "glDeleteTransformFeedbacks\0"
+ "glDrawTransformFeedback\0"
+ "glGenTransformFeedbacks\0"
+ "glIsTransformFeedback\0"
+ "glPauseTransformFeedback\0"
+ "glResumeTransformFeedback\0"
+ "glClearDepthf\0"
+ "glDepthRangef\0"
+ "glGetShaderPrecisionFormat\0"
+ "glReleaseShaderCompiler\0"
+ "glShaderBinary\0"
+ "glPolygonOffsetEXT\0"
+ "glGetPixelTexGenParameterfvSGIS\0"
+ "glGetPixelTexGenParameterivSGIS\0"
+ "glPixelTexGenParameterfSGIS\0"
+ "glPixelTexGenParameterfvSGIS\0"
+ "glPixelTexGenParameteriSGIS\0"
+ "glPixelTexGenParameterivSGIS\0"
+ "glSampleMaskSGIS\0"
+ "glSamplePatternSGIS\0"
+ "glColorPointerEXT\0"
+ "glEdgeFlagPointerEXT\0"
+ "glIndexPointerEXT\0"
+ "glNormalPointerEXT\0"
+ "glTexCoordPointerEXT\0"
+ "glVertexPointerEXT\0"
+ "glPointParameterfEXT\0"
+ "glPointParameterfvEXT\0"
+ "glLockArraysEXT\0"
+ "glUnlockArraysEXT\0"
+ "glSecondaryColor3bEXT\0"
+ "glSecondaryColor3bvEXT\0"
+ "glSecondaryColor3dEXT\0"
+ "glSecondaryColor3dvEXT\0"
+ "glSecondaryColor3fEXT\0"
+ "glSecondaryColor3fvEXT\0"
+ "glSecondaryColor3iEXT\0"
+ "glSecondaryColor3ivEXT\0"
+ "glSecondaryColor3sEXT\0"
+ "glSecondaryColor3svEXT\0"
+ "glSecondaryColor3ubEXT\0"
+ "glSecondaryColor3ubvEXT\0"
+ "glSecondaryColor3uiEXT\0"
+ "glSecondaryColor3uivEXT\0"
+ "glSecondaryColor3usEXT\0"
+ "glSecondaryColor3usvEXT\0"
+ "glSecondaryColorPointerEXT\0"
+ "glMultiDrawArraysEXT\0"
+ "glMultiDrawElementsEXT\0"
+ "glFogCoordPointerEXT\0"
+ "glFogCoorddEXT\0"
+ "glFogCoorddvEXT\0"
+ "glFogCoordfEXT\0"
+ "glFogCoordfvEXT\0"
+ "glPixelTexGenSGIX\0"
+ "glBlendFuncSeparateEXT\0"
+ "glFlushVertexArrayRangeNV\0"
+ "glVertexArrayRangeNV\0"
+ "glCombinerInputNV\0"
+ "glCombinerOutputNV\0"
+ "glCombinerParameterfNV\0"
+ "glCombinerParameterfvNV\0"
+ "glCombinerParameteriNV\0"
+ "glCombinerParameterivNV\0"
+ "glFinalCombinerInputNV\0"
+ "glGetCombinerInputParameterfvNV\0"
+ "glGetCombinerInputParameterivNV\0"
+ "glGetCombinerOutputParameterfvNV\0"
+ "glGetCombinerOutputParameterivNV\0"
+ "glGetFinalCombinerInputParameterfvNV\0"
+ "glGetFinalCombinerInputParameterivNV\0"
+ "glResizeBuffersMESA\0"
+ "glWindowPos2dMESA\0"
+ "glWindowPos2dvMESA\0"
+ "glWindowPos2fMESA\0"
+ "glWindowPos2fvMESA\0"
+ "glWindowPos2iMESA\0"
+ "glWindowPos2ivMESA\0"
+ "glWindowPos2sMESA\0"
+ "glWindowPos2svMESA\0"
+ "glWindowPos3dMESA\0"
+ "glWindowPos3dvMESA\0"
+ "glWindowPos3fMESA\0"
+ "glWindowPos3fvMESA\0"
+ "glWindowPos3iMESA\0"
+ "glWindowPos3ivMESA\0"
+ "glWindowPos3sMESA\0"
+ "glWindowPos3svMESA\0"
+ "glWindowPos4dMESA\0"
+ "glWindowPos4dvMESA\0"
+ "glWindowPos4fMESA\0"
+ "glWindowPos4fvMESA\0"
+ "glWindowPos4iMESA\0"
+ "glWindowPos4ivMESA\0"
+ "glWindowPos4sMESA\0"
+ "glWindowPos4svMESA\0"
+ "glMultiModeDrawArraysIBM\0"
+ "glMultiModeDrawElementsIBM\0"
+ "glDeleteFencesNV\0"
+ "glFinishFenceNV\0"
+ "glGenFencesNV\0"
+ "glGetFenceivNV\0"
+ "glIsFenceNV\0"
+ "glSetFenceNV\0"
+ "glTestFenceNV\0"
+ "glAreProgramsResidentNV\0"
+ "glBindProgramNV\0"
+ "glDeleteProgramsNV\0"
+ "glExecuteProgramNV\0"
+ "glGenProgramsNV\0"
+ "glGetProgramParameterdvNV\0"
+ "glGetProgramParameterfvNV\0"
+ "glGetProgramStringNV\0"
+ "glGetProgramivNV\0"
+ "glGetTrackMatrixivNV\0"
+ "glGetVertexAttribPointervNV\0"
+ "glGetVertexAttribdvNV\0"
+ "glGetVertexAttribfvNV\0"
+ "glGetVertexAttribivNV\0"
+ "glIsProgramNV\0"
+ "glLoadProgramNV\0"
+ "glProgramParameters4dvNV\0"
+ "glProgramParameters4fvNV\0"
+ "glRequestResidentProgramsNV\0"
+ "glTrackMatrixNV\0"
+ "glVertexAttrib1dNV\0"
+ "glVertexAttrib1dvNV\0"
+ "glVertexAttrib1fNV\0"
+ "glVertexAttrib1fvNV\0"
+ "glVertexAttrib1sNV\0"
+ "glVertexAttrib1svNV\0"
+ "glVertexAttrib2dNV\0"
+ "glVertexAttrib2dvNV\0"
+ "glVertexAttrib2fNV\0"
+ "glVertexAttrib2fvNV\0"
+ "glVertexAttrib2sNV\0"
+ "glVertexAttrib2svNV\0"
+ "glVertexAttrib3dNV\0"
+ "glVertexAttrib3dvNV\0"
+ "glVertexAttrib3fNV\0"
+ "glVertexAttrib3fvNV\0"
+ "glVertexAttrib3sNV\0"
+ "glVertexAttrib3svNV\0"
+ "glVertexAttrib4dNV\0"
+ "glVertexAttrib4dvNV\0"
+ "glVertexAttrib4fNV\0"
+ "glVertexAttrib4fvNV\0"
+ "glVertexAttrib4sNV\0"
+ "glVertexAttrib4svNV\0"
+ "glVertexAttrib4ubNV\0"
+ "glVertexAttrib4ubvNV\0"
+ "glVertexAttribPointerNV\0"
+ "glVertexAttribs1dvNV\0"
+ "glVertexAttribs1fvNV\0"
+ "glVertexAttribs1svNV\0"
+ "glVertexAttribs2dvNV\0"
+ "glVertexAttribs2fvNV\0"
+ "glVertexAttribs2svNV\0"
+ "glVertexAttribs3dvNV\0"
+ "glVertexAttribs3fvNV\0"
+ "glVertexAttribs3svNV\0"
+ "glVertexAttribs4dvNV\0"
+ "glVertexAttribs4fvNV\0"
+ "glVertexAttribs4svNV\0"
+ "glVertexAttribs4ubvNV\0"
+ "glGetTexBumpParameterfvATI\0"
+ "glGetTexBumpParameterivATI\0"
+ "glTexBumpParameterfvATI\0"
+ "glTexBumpParameterivATI\0"
+ "glAlphaFragmentOp1ATI\0"
+ "glAlphaFragmentOp2ATI\0"
+ "glAlphaFragmentOp3ATI\0"
+ "glBeginFragmentShaderATI\0"
+ "glBindFragmentShaderATI\0"
+ "glColorFragmentOp1ATI\0"
+ "glColorFragmentOp2ATI\0"
+ "glColorFragmentOp3ATI\0"
+ "glDeleteFragmentShaderATI\0"
+ "glEndFragmentShaderATI\0"
+ "glGenFragmentShadersATI\0"
+ "glPassTexCoordATI\0"
+ "glSampleMapATI\0"
+ "glSetFragmentShaderConstantATI\0"
+ "glPointParameteriNV\0"
+ "glPointParameterivNV\0"
+ "glActiveStencilFaceEXT\0"
+ "glBindVertexArrayAPPLE\0"
+ "glDeleteVertexArraysAPPLE\0"
+ "glGenVertexArraysAPPLE\0"
+ "glIsVertexArrayAPPLE\0"
+ "glGetProgramNamedParameterdvNV\0"
+ "glGetProgramNamedParameterfvNV\0"
+ "glProgramNamedParameter4dNV\0"
+ "glProgramNamedParameter4dvNV\0"
+ "glProgramNamedParameter4fNV\0"
+ "glProgramNamedParameter4fvNV\0"
+ "glPrimitiveRestartIndexNV\0"
+ "glPrimitiveRestartNV\0"
+ "glDepthBoundsEXT\0"
+ "glBlendEquationSeparateEXT\0"
+ "glBindFramebufferEXT\0"
+ "glBindRenderbufferEXT\0"
+ "glCheckFramebufferStatusEXT\0"
+ "glDeleteFramebuffersEXT\0"
+ "glDeleteRenderbuffersEXT\0"
+ "glFramebufferRenderbufferEXT\0"
+ "glFramebufferTexture1DEXT\0"
+ "glFramebufferTexture2DEXT\0"
+ "glFramebufferTexture3DEXT\0"
+ "glGenFramebuffersEXT\0"
+ "glGenRenderbuffersEXT\0"
+ "glGenerateMipmapEXT\0"
+ "glGetFramebufferAttachmentParameterivEXT\0"
+ "glGetRenderbufferParameterivEXT\0"
+ "glIsFramebufferEXT\0"
+ "glIsRenderbufferEXT\0"
+ "glRenderbufferStorageEXT\0"
+ "glBlitFramebufferEXT\0"
+ "glBufferParameteriAPPLE\0"
+ "glFlushMappedBufferRangeAPPLE\0"
+ "glBindFragDataLocationEXT\0"
+ "glGetFragDataLocationEXT\0"
+ "glGetUniformuivEXT\0"
+ "glGetVertexAttribIivEXT\0"
+ "glGetVertexAttribIuivEXT\0"
+ "glUniform1uiEXT\0"
+ "glUniform1uivEXT\0"
+ "glUniform2uiEXT\0"
+ "glUniform2uivEXT\0"
+ "glUniform3uiEXT\0"
+ "glUniform3uivEXT\0"
+ "glUniform4uiEXT\0"
+ "glUniform4uivEXT\0"
+ "glVertexAttribI1iEXT\0"
+ "glVertexAttribI1ivEXT\0"
+ "glVertexAttribI1uiEXT\0"
+ "glVertexAttribI1uivEXT\0"
+ "glVertexAttribI2iEXT\0"
+ "glVertexAttribI2ivEXT\0"
+ "glVertexAttribI2uiEXT\0"
+ "glVertexAttribI2uivEXT\0"
+ "glVertexAttribI3iEXT\0"
+ "glVertexAttribI3ivEXT\0"
+ "glVertexAttribI3uiEXT\0"
+ "glVertexAttribI3uivEXT\0"
+ "glVertexAttribI4bvEXT\0"
+ "glVertexAttribI4iEXT\0"
+ "glVertexAttribI4ivEXT\0"
+ "glVertexAttribI4svEXT\0"
+ "glVertexAttribI4ubvEXT\0"
+ "glVertexAttribI4uiEXT\0"
+ "glVertexAttribI4uivEXT\0"
+ "glVertexAttribI4usvEXT\0"
+ "glVertexAttribIPointerEXT\0"
+ "glFramebufferTextureLayerEXT\0"
+ "glColorMaskIndexedEXT\0"
+ "glDisableIndexedEXT\0"
+ "glEnableIndexedEXT\0"
+ "glGetBooleanIndexedvEXT\0"
+ "glGetIntegerIndexedvEXT\0"
+ "glIsEnabledIndexedEXT\0"
+ "glClearColorIiEXT\0"
+ "glClearColorIuiEXT\0"
+ "glGetTexParameterIivEXT\0"
+ "glGetTexParameterIuivEXT\0"
+ "glTexParameterIivEXT\0"
+ "glTexParameterIuivEXT\0"
+ "glBeginConditionalRenderNV\0"
+ "glEndConditionalRenderNV\0"
+ "glBeginTransformFeedbackEXT\0"
+ "glBindBufferBaseEXT\0"
+ "glBindBufferOffsetEXT\0"
+ "glBindBufferRangeEXT\0"
+ "glEndTransformFeedbackEXT\0"
+ "glGetTransformFeedbackVaryingEXT\0"
+ "glTransformFeedbackVaryingsEXT\0"
+ "glProvokingVertexEXT\0"
+ "glGetTexParameterPointervAPPLE\0"
+ "glTextureRangeAPPLE\0"
+ "glGetObjectParameterivAPPLE\0"
+ "glObjectPurgeableAPPLE\0"
+ "glObjectUnpurgeableAPPLE\0"
+ "glActiveProgramEXT\0"
+ "glCreateShaderProgramEXT\0"
+ "glUseShaderProgramEXT\0"
+ "glTextureBarrierNV\0"
+ "glStencilFuncSeparateATI\0"
+ "glProgramEnvParameters4fvEXT\0"
+ "glProgramLocalParameters4fvEXT\0"
+ "glGetQueryObjecti64vEXT\0"
+ "glGetQueryObjectui64vEXT\0"
+ "glEGLImageTargetRenderbufferStorageOES\0"
+ "glEGLImageTargetTexture2DOES\0"
+ "glArrayElementEXT\0"
+ "glBindTextureEXT\0"
+ "glDrawArraysEXT\0"
+ "glAreTexturesResidentEXT\0"
+ "glCopyTexImage1DEXT\0"
+ "glCopyTexImage2DEXT\0"
+ "glCopyTexSubImage1DEXT\0"
+ "glCopyTexSubImage2DEXT\0"
+ "glDeleteTexturesEXT\0"
+ "glGenTexturesEXT\0"
+ "glGetPointervEXT\0"
+ "glIsTextureEXT\0"
+ "glPrioritizeTexturesEXT\0"
+ "glTexSubImage1DEXT\0"
+ "glTexSubImage2DEXT\0"
+ "glBlendColorEXT\0"
+ "glBlendEquationEXT\0"
+ "glDrawRangeElementsEXT\0"
+ "glColorTableSGI\0"
+ "glColorTableEXT\0"
+ "glColorTableParameterfvSGI\0"
+ "glColorTableParameterivSGI\0"
+ "glCopyColorTableSGI\0"
+ "glGetColorTableSGI\0"
+ "glGetColorTableEXT\0"
+ "glGetColorTableParameterfvSGI\0"
+ "glGetColorTableParameterfvEXT\0"
+ "glGetColorTableParameterivSGI\0"
+ "glGetColorTableParameterivEXT\0"
+ "glColorSubTableEXT\0"
+ "glCopyColorSubTableEXT\0"
+ "glConvolutionFilter1DEXT\0"
+ "glConvolutionFilter2DEXT\0"
+ "glConvolutionParameterfEXT\0"
+ "glConvolutionParameterfvEXT\0"
+ "glConvolutionParameteriEXT\0"
+ "glConvolutionParameterivEXT\0"
+ "glCopyConvolutionFilter1DEXT\0"
+ "glCopyConvolutionFilter2DEXT\0"
+ "glGetConvolutionFilterEXT\0"
+ "glGetConvolutionParameterfvEXT\0"
+ "glGetConvolutionParameterivEXT\0"
+ "glGetSeparableFilterEXT\0"
+ "glSeparableFilter2DEXT\0"
+ "glGetHistogramEXT\0"
+ "glGetHistogramParameterfvEXT\0"
+ "glGetHistogramParameterivEXT\0"
+ "glGetMinmaxEXT\0"
+ "glGetMinmaxParameterfvEXT\0"
+ "glGetMinmaxParameterivEXT\0"
+ "glHistogramEXT\0"
+ "glMinmaxEXT\0"
+ "glResetHistogramEXT\0"
+ "glResetMinmaxEXT\0"
+ "glTexImage3DEXT\0"
+ "glTexSubImage3DEXT\0"
+ "glCopyTexSubImage3DEXT\0"
+ "glActiveTexture\0"
+ "glClientActiveTexture\0"
+ "glMultiTexCoord1d\0"
+ "glMultiTexCoord1dv\0"
+ "glMultiTexCoord1f\0"
+ "glMultiTexCoord1fv\0"
+ "glMultiTexCoord1i\0"
+ "glMultiTexCoord1iv\0"
+ "glMultiTexCoord1s\0"
+ "glMultiTexCoord1sv\0"
+ "glMultiTexCoord2d\0"
+ "glMultiTexCoord2dv\0"
+ "glMultiTexCoord2f\0"
+ "glMultiTexCoord2fv\0"
+ "glMultiTexCoord2i\0"
+ "glMultiTexCoord2iv\0"
+ "glMultiTexCoord2s\0"
+ "glMultiTexCoord2sv\0"
+ "glMultiTexCoord3d\0"
+ "glMultiTexCoord3dv\0"
+ "glMultiTexCoord3f\0"
+ "glMultiTexCoord3fv\0"
+ "glMultiTexCoord3i\0"
+ "glMultiTexCoord3iv\0"
+ "glMultiTexCoord3s\0"
+ "glMultiTexCoord3sv\0"
+ "glMultiTexCoord4d\0"
+ "glMultiTexCoord4dv\0"
+ "glMultiTexCoord4f\0"
+ "glMultiTexCoord4fv\0"
+ "glMultiTexCoord4i\0"
+ "glMultiTexCoord4iv\0"
+ "glMultiTexCoord4s\0"
+ "glMultiTexCoord4sv\0"
+ "glStencilOpSeparateATI\0"
+ "glLoadTransposeMatrixd\0"
+ "glLoadTransposeMatrixf\0"
+ "glMultTransposeMatrixd\0"
+ "glMultTransposeMatrixf\0"
+ "glSampleCoverage\0"
+ "glCompressedTexImage1D\0"
+ "glCompressedTexImage2D\0"
+ "glCompressedTexImage3D\0"
+ "glCompressedTexSubImage1D\0"
+ "glCompressedTexSubImage2D\0"
+ "glCompressedTexSubImage3D\0"
+ "glGetCompressedTexImage\0"
+ "glDisableVertexAttribArray\0"
+ "glEnableVertexAttribArray\0"
+ "glGetVertexAttribdv\0"
+ "glGetVertexAttribfv\0"
+ "glGetVertexAttribiv\0"
+ "glProgramParameter4dNV\0"
+ "glProgramParameter4dvNV\0"
+ "glProgramParameter4fNV\0"
+ "glProgramParameter4fvNV\0"
+ "glVertexAttrib1d\0"
+ "glVertexAttrib1dv\0"
+ "glVertexAttrib1f\0"
+ "glVertexAttrib1fv\0"
+ "glVertexAttrib1s\0"
+ "glVertexAttrib1sv\0"
+ "glVertexAttrib2d\0"
+ "glVertexAttrib2dv\0"
+ "glVertexAttrib2f\0"
+ "glVertexAttrib2fv\0"
+ "glVertexAttrib2s\0"
+ "glVertexAttrib2sv\0"
+ "glVertexAttrib3d\0"
+ "glVertexAttrib3dv\0"
+ "glVertexAttrib3f\0"
+ "glVertexAttrib3fv\0"
+ "glVertexAttrib3s\0"
+ "glVertexAttrib3sv\0"
+ "glVertexAttrib4Nbv\0"
+ "glVertexAttrib4Niv\0"
+ "glVertexAttrib4Nsv\0"
+ "glVertexAttrib4Nub\0"
+ "glVertexAttrib4Nubv\0"
+ "glVertexAttrib4Nuiv\0"
+ "glVertexAttrib4Nusv\0"
+ "glVertexAttrib4bv\0"
+ "glVertexAttrib4d\0"
+ "glVertexAttrib4dv\0"
+ "glVertexAttrib4f\0"
+ "glVertexAttrib4fv\0"
+ "glVertexAttrib4iv\0"
+ "glVertexAttrib4s\0"
+ "glVertexAttrib4sv\0"
+ "glVertexAttrib4ubv\0"
+ "glVertexAttrib4uiv\0"
+ "glVertexAttrib4usv\0"
+ "glVertexAttribPointer\0"
+ "glBindBuffer\0"
+ "glBufferData\0"
+ "glBufferSubData\0"
+ "glDeleteBuffers\0"
+ "glGenBuffers\0"
+ "glGetBufferParameteriv\0"
+ "glGetBufferPointerv\0"
+ "glGetBufferSubData\0"
+ "glIsBuffer\0"
+ "glMapBuffer\0"
+ "glUnmapBuffer\0"
+ "glBeginQuery\0"
+ "glDeleteQueries\0"
+ "glEndQuery\0"
+ "glGenQueries\0"
+ "glGetQueryObjectiv\0"
+ "glGetQueryObjectuiv\0"
+ "glGetQueryiv\0"
+ "glIsQuery\0"
+ "glCompileShader\0"
+ "glGetActiveUniform\0"
+ "glGetShaderSource\0"
+ "glGetUniformLocation\0"
+ "glGetUniformfv\0"
+ "glGetUniformiv\0"
+ "glLinkProgram\0"
+ "glShaderSource\0"
+ "glUniform1f\0"
+ "glUniform1fv\0"
+ "glUniform1i\0"
+ "glUniform1iv\0"
+ "glUniform2f\0"
+ "glUniform2fv\0"
+ "glUniform2i\0"
+ "glUniform2iv\0"
+ "glUniform3f\0"
+ "glUniform3fv\0"
+ "glUniform3i\0"
+ "glUniform3iv\0"
+ "glUniform4f\0"
+ "glUniform4fv\0"
+ "glUniform4i\0"
+ "glUniform4iv\0"
+ "glUniformMatrix2fv\0"
+ "glUniformMatrix3fv\0"
+ "glUniformMatrix4fv\0"
+ "glUseProgram\0"
+ "glValidateProgram\0"
+ "glBindAttribLocation\0"
+ "glGetActiveAttrib\0"
+ "glGetAttribLocation\0"
+ "glDrawBuffers\0"
+ "glDrawBuffersATI\0"
+ "glDrawArraysInstancedEXT\0"
+ "glDrawArraysInstanced\0"
+ "glDrawElementsInstancedEXT\0"
+ "glDrawElementsInstanced\0"
+ "glRenderbufferStorageMultisampleEXT\0"
+ "glSampleMaskEXT\0"
+ "glSamplePatternEXT\0"
+ "glPointParameterf\0"
+ "glPointParameterfARB\0"
+ "glPointParameterfSGIS\0"
+ "glPointParameterfv\0"
+ "glPointParameterfvARB\0"
+ "glPointParameterfvSGIS\0"
+ "glSecondaryColor3b\0"
+ "glSecondaryColor3bv\0"
+ "glSecondaryColor3d\0"
+ "glSecondaryColor3dv\0"
+ "glSecondaryColor3f\0"
+ "glSecondaryColor3fv\0"
+ "glSecondaryColor3i\0"
+ "glSecondaryColor3iv\0"
+ "glSecondaryColor3s\0"
+ "glSecondaryColor3sv\0"
+ "glSecondaryColor3ub\0"
+ "glSecondaryColor3ubv\0"
+ "glSecondaryColor3ui\0"
+ "glSecondaryColor3uiv\0"
+ "glSecondaryColor3us\0"
+ "glSecondaryColor3usv\0"
+ "glSecondaryColorPointer\0"
+ "glMultiDrawArrays\0"
+ "glMultiDrawElements\0"
+ "glFogCoordPointer\0"
+ "glFogCoordd\0"
+ "glFogCoorddv\0"
+ "glFogCoordf\0"
+ "glFogCoordfv\0"
+ "glBlendFuncSeparate\0"
+ "glBlendFuncSeparateINGR\0"
+ "glWindowPos2d\0"
+ "glWindowPos2dARB\0"
+ "glWindowPos2dv\0"
+ "glWindowPos2dvARB\0"
+ "glWindowPos2f\0"
+ "glWindowPos2fARB\0"
+ "glWindowPos2fv\0"
+ "glWindowPos2fvARB\0"
+ "glWindowPos2i\0"
+ "glWindowPos2iARB\0"
+ "glWindowPos2iv\0"
+ "glWindowPos2ivARB\0"
+ "glWindowPos2s\0"
+ "glWindowPos2sARB\0"
+ "glWindowPos2sv\0"
+ "glWindowPos2svARB\0"
+ "glWindowPos3d\0"
+ "glWindowPos3dARB\0"
+ "glWindowPos3dv\0"
+ "glWindowPos3dvARB\0"
+ "glWindowPos3f\0"
+ "glWindowPos3fARB\0"
+ "glWindowPos3fv\0"
+ "glWindowPos3fvARB\0"
+ "glWindowPos3i\0"
+ "glWindowPos3iARB\0"
+ "glWindowPos3iv\0"
+ "glWindowPos3ivARB\0"
+ "glWindowPos3s\0"
+ "glWindowPos3sARB\0"
+ "glWindowPos3sv\0"
+ "glWindowPos3svARB\0"
+ "glBindProgramARB\0"
+ "glDeleteProgramsARB\0"
+ "glGenProgramsARB\0"
+ "glGetVertexAttribPointerv\0"
+ "glGetVertexAttribPointervARB\0"
+ "glIsProgramARB\0"
+ "glPointParameteri\0"
+ "glPointParameteriv\0"
+ "glDeleteVertexArrays\0"
+ "glIsVertexArray\0"
+ "glPrimitiveRestartIndex\0"
+ "glBlendEquationSeparate\0"
+ "glBlendEquationSeparateATI\0"
+ "glBindFramebuffer\0"
+ "glBindRenderbuffer\0"
+ "glCheckFramebufferStatus\0"
+ "glDeleteFramebuffers\0"
+ "glDeleteRenderbuffers\0"
+ "glFramebufferRenderbuffer\0"
+ "glFramebufferTexture1D\0"
+ "glFramebufferTexture2D\0"
+ "glFramebufferTexture3D\0"
+ "glGenFramebuffers\0"
+ "glGenRenderbuffers\0"
+ "glGenerateMipmap\0"
+ "glGetFramebufferAttachmentParameteriv\0"
+ "glGetRenderbufferParameteriv\0"
+ "glIsFramebuffer\0"
+ "glIsRenderbuffer\0"
+ "glRenderbufferStorage\0"
+ "glBlitFramebuffer\0"
+ "glBindFragDataLocation\0"
+ "glGetFragDataLocation\0"
+ "glGetUniformuiv\0"
+ "glGetVertexAttribIiv\0"
+ "glGetVertexAttribIuiv\0"
+ "glUniform1ui\0"
+ "glUniform1uiv\0"
+ "glUniform2ui\0"
+ "glUniform2uiv\0"
+ "glUniform3ui\0"
+ "glUniform3uiv\0"
+ "glUniform4ui\0"
+ "glUniform4uiv\0"
+ "glVertexAttribI1i\0"
+ "glVertexAttribI1iv\0"
+ "glVertexAttribI1ui\0"
+ "glVertexAttribI1uiv\0"
+ "glVertexAttribI2i\0"
+ "glVertexAttribI2iv\0"
+ "glVertexAttribI2ui\0"
+ "glVertexAttribI2uiv\0"
+ "glVertexAttribI3i\0"
+ "glVertexAttribI3iv\0"
+ "glVertexAttribI3ui\0"
+ "glVertexAttribI3uiv\0"
+ "glVertexAttribI4bv\0"
+ "glVertexAttribI4i\0"
+ "glVertexAttribI4iv\0"
+ "glVertexAttribI4sv\0"
+ "glVertexAttribI4ubv\0"
+ "glVertexAttribI4ui\0"
+ "glVertexAttribI4uiv\0"
+ "glVertexAttribI4usv\0"
+ "glVertexAttribIPointer\0"
+ "glFramebufferTextureLayer\0"
+ "glColorMaski\0"
+ "glDisablei\0"
+ "glEnablei\0"
+ "glGetBooleani_v\0"
+ "glGetIntegeri_v\0"
+ "glIsEnabledi\0"
+ "glGetTexParameterIiv\0"
+ "glGetTexParameterIuiv\0"
+ "glTexParameterIiv\0"
+ "glTexParameterIuiv\0"
+ "glBeginConditionalRender\0"
+ "glEndConditionalRender\0"
+ "glBeginTransformFeedback\0"
+ "glBindBufferBase\0"
+ "glBindBufferRange\0"
+ "glEndTransformFeedback\0"
+ "glGetTransformFeedbackVarying\0"
+ "glTransformFeedbackVaryings\0"
+ "glProvokingVertex\0"
+ ;
+
+
+#ifdef USE_MGL_NAMESPACE
+#define gl_dispatch_stub_343 mgl_dispatch_stub_343
+#define gl_dispatch_stub_344 mgl_dispatch_stub_344
+#define gl_dispatch_stub_345 mgl_dispatch_stub_345
+#define gl_dispatch_stub_356 mgl_dispatch_stub_356
+#define gl_dispatch_stub_357 mgl_dispatch_stub_357
+#define gl_dispatch_stub_358 mgl_dispatch_stub_358
+#define gl_dispatch_stub_359 mgl_dispatch_stub_359
+#define gl_dispatch_stub_361 mgl_dispatch_stub_361
+#define gl_dispatch_stub_362 mgl_dispatch_stub_362
+#define gl_dispatch_stub_363 mgl_dispatch_stub_363
+#define gl_dispatch_stub_364 mgl_dispatch_stub_364
+#define gl_dispatch_stub_365 mgl_dispatch_stub_365
+#define gl_dispatch_stub_366 mgl_dispatch_stub_366
+#define gl_dispatch_stub_611 mgl_dispatch_stub_611
+#define gl_dispatch_stub_612 mgl_dispatch_stub_612
+#define gl_dispatch_stub_613 mgl_dispatch_stub_613
+#define gl_dispatch_stub_614 mgl_dispatch_stub_614
+#define gl_dispatch_stub_615 mgl_dispatch_stub_615
+#define gl_dispatch_stub_616 mgl_dispatch_stub_616
+#define gl_dispatch_stub_617 mgl_dispatch_stub_617
+#define gl_dispatch_stub_618 mgl_dispatch_stub_618
+#define gl_dispatch_stub_653 mgl_dispatch_stub_653
+#define gl_dispatch_stub_695 mgl_dispatch_stub_695
+#define gl_dispatch_stub_696 mgl_dispatch_stub_696
+#define gl_dispatch_stub_697 mgl_dispatch_stub_697
+#define gl_dispatch_stub_698 mgl_dispatch_stub_698
+#define gl_dispatch_stub_699 mgl_dispatch_stub_699
+#define gl_dispatch_stub_700 mgl_dispatch_stub_700
+#define gl_dispatch_stub_701 mgl_dispatch_stub_701
+#define gl_dispatch_stub_702 mgl_dispatch_stub_702
+#define gl_dispatch_stub_703 mgl_dispatch_stub_703
+#define gl_dispatch_stub_784 mgl_dispatch_stub_784
+#define gl_dispatch_stub_785 mgl_dispatch_stub_785
+#define gl_dispatch_stub_786 mgl_dispatch_stub_786
+#define gl_dispatch_stub_787 mgl_dispatch_stub_787
+#define gl_dispatch_stub_788 mgl_dispatch_stub_788
+#define gl_dispatch_stub_797 mgl_dispatch_stub_797
+#define gl_dispatch_stub_798 mgl_dispatch_stub_798
+#define gl_dispatch_stub_816 mgl_dispatch_stub_816
+#define gl_dispatch_stub_817 mgl_dispatch_stub_817
+#define gl_dispatch_stub_818 mgl_dispatch_stub_818
+#define gl_dispatch_stub_876 mgl_dispatch_stub_876
+#define gl_dispatch_stub_877 mgl_dispatch_stub_877
+#define gl_dispatch_stub_885 mgl_dispatch_stub_885
+#define gl_dispatch_stub_886 mgl_dispatch_stub_886
+#define gl_dispatch_stub_887 mgl_dispatch_stub_887
+#define gl_dispatch_stub_888 mgl_dispatch_stub_888
+#define gl_dispatch_stub_889 mgl_dispatch_stub_889
+#endif /* USE_MGL_NAMESPACE */
+
+
+#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)
+void GLAPIENTRY gl_dispatch_stub_343(GLenum target, GLenum format, GLenum type, GLvoid * table);
+void GLAPIENTRY gl_dispatch_stub_344(GLenum target, GLenum pname, GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_345(GLenum target, GLenum pname, GLint * params);
+void GLAPIENTRY gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid * image);
+void GLAPIENTRY gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params);
+void GLAPIENTRY gl_dispatch_stub_359(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span);
+void GLAPIENTRY gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
+void GLAPIENTRY gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params);
+void GLAPIENTRY gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
+void GLAPIENTRY gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params);
+void GLAPIENTRY gl_dispatch_stub_611(GLenum pname, GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_612(GLenum pname, GLint * params);
+void GLAPIENTRY gl_dispatch_stub_613(GLenum pname, GLfloat param);
+void GLAPIENTRY gl_dispatch_stub_614(GLenum pname, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_615(GLenum pname, GLint param);
+void GLAPIENTRY gl_dispatch_stub_616(GLenum pname, const GLint * params);
+void GLAPIENTRY gl_dispatch_stub_617(GLclampf value, GLboolean invert);
+void GLAPIENTRY gl_dispatch_stub_618(GLenum pattern);
+void GLAPIENTRY gl_dispatch_stub_653(GLenum mode);
+void GLAPIENTRY gl_dispatch_stub_695(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride);
+void GLAPIENTRY gl_dispatch_stub_696(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride);
+void GLAPIENTRY gl_dispatch_stub_697(GLsizei n, const GLuint * fences);
+void GLAPIENTRY gl_dispatch_stub_698(GLuint fence);
+void GLAPIENTRY gl_dispatch_stub_699(GLsizei n, GLuint * fences);
+void GLAPIENTRY gl_dispatch_stub_700(GLuint fence, GLenum pname, GLint * params);
+GLboolean GLAPIENTRY gl_dispatch_stub_701(GLuint fence);
+void GLAPIENTRY gl_dispatch_stub_702(GLuint fence, GLenum condition);
+GLboolean GLAPIENTRY gl_dispatch_stub_703(GLuint fence);
+void GLAPIENTRY gl_dispatch_stub_784(GLenum face);
+void GLAPIENTRY gl_dispatch_stub_785(GLuint array);
+void GLAPIENTRY gl_dispatch_stub_786(GLsizei n, const GLuint * arrays);
+void GLAPIENTRY gl_dispatch_stub_787(GLsizei n, GLuint * arrays);
+GLboolean GLAPIENTRY gl_dispatch_stub_788(GLuint array);
+void GLAPIENTRY gl_dispatch_stub_797(GLclampd zmin, GLclampd zmax);
+void GLAPIENTRY gl_dispatch_stub_798(GLenum modeRGB, GLenum modeA);
+void GLAPIENTRY gl_dispatch_stub_816(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+void GLAPIENTRY gl_dispatch_stub_817(GLenum target, GLenum pname, GLint param);
+void GLAPIENTRY gl_dispatch_stub_818(GLenum target, GLintptr offset, GLsizeiptr size);
+void GLAPIENTRY gl_dispatch_stub_876(GLenum target, GLenum pname, GLvoid ** params);
+void GLAPIENTRY gl_dispatch_stub_877(GLenum target, GLsizei length, GLvoid * pointer);
+void GLAPIENTRY gl_dispatch_stub_885(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+void GLAPIENTRY gl_dispatch_stub_886(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_887(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_888(GLuint id, GLenum pname, GLint64EXT * params);
+void GLAPIENTRY gl_dispatch_stub_889(GLuint id, GLenum pname, GLuint64EXT * params);
+#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */
+
+static const glprocs_table_t static_functions[] = {
+ NAME_FUNC_OFFSET( 0, glNewList, glNewList, NULL, 0),
+ NAME_FUNC_OFFSET( 10, glEndList, glEndList, NULL, 1),
+ NAME_FUNC_OFFSET( 20, glCallList, glCallList, NULL, 2),
+ NAME_FUNC_OFFSET( 31, glCallLists, glCallLists, NULL, 3),
+ NAME_FUNC_OFFSET( 43, glDeleteLists, glDeleteLists, NULL, 4),
+ NAME_FUNC_OFFSET( 57, glGenLists, glGenLists, NULL, 5),
+ NAME_FUNC_OFFSET( 68, glListBase, glListBase, NULL, 6),
+ NAME_FUNC_OFFSET( 79, glBegin, glBegin, NULL, 7),
+ NAME_FUNC_OFFSET( 87, glBitmap, glBitmap, NULL, 8),
+ NAME_FUNC_OFFSET( 96, glColor3b, glColor3b, NULL, 9),
+ NAME_FUNC_OFFSET( 106, glColor3bv, glColor3bv, NULL, 10),
+ NAME_FUNC_OFFSET( 117, glColor3d, glColor3d, NULL, 11),
+ NAME_FUNC_OFFSET( 127, glColor3dv, glColor3dv, NULL, 12),
+ NAME_FUNC_OFFSET( 138, glColor3f, glColor3f, NULL, 13),
+ NAME_FUNC_OFFSET( 148, glColor3fv, glColor3fv, NULL, 14),
+ NAME_FUNC_OFFSET( 159, glColor3i, glColor3i, NULL, 15),
+ NAME_FUNC_OFFSET( 169, glColor3iv, glColor3iv, NULL, 16),
+ NAME_FUNC_OFFSET( 180, glColor3s, glColor3s, NULL, 17),
+ NAME_FUNC_OFFSET( 190, glColor3sv, glColor3sv, NULL, 18),
+ NAME_FUNC_OFFSET( 201, glColor3ub, glColor3ub, NULL, 19),
+ NAME_FUNC_OFFSET( 212, glColor3ubv, glColor3ubv, NULL, 20),
+ NAME_FUNC_OFFSET( 224, glColor3ui, glColor3ui, NULL, 21),
+ NAME_FUNC_OFFSET( 235, glColor3uiv, glColor3uiv, NULL, 22),
+ NAME_FUNC_OFFSET( 247, glColor3us, glColor3us, NULL, 23),
+ NAME_FUNC_OFFSET( 258, glColor3usv, glColor3usv, NULL, 24),
+ NAME_FUNC_OFFSET( 270, glColor4b, glColor4b, NULL, 25),
+ NAME_FUNC_OFFSET( 280, glColor4bv, glColor4bv, NULL, 26),
+ NAME_FUNC_OFFSET( 291, glColor4d, glColor4d, NULL, 27),
+ NAME_FUNC_OFFSET( 301, glColor4dv, glColor4dv, NULL, 28),
+ NAME_FUNC_OFFSET( 312, glColor4f, glColor4f, NULL, 29),
+ NAME_FUNC_OFFSET( 322, glColor4fv, glColor4fv, NULL, 30),
+ NAME_FUNC_OFFSET( 333, glColor4i, glColor4i, NULL, 31),
+ NAME_FUNC_OFFSET( 343, glColor4iv, glColor4iv, NULL, 32),
+ NAME_FUNC_OFFSET( 354, glColor4s, glColor4s, NULL, 33),
+ NAME_FUNC_OFFSET( 364, glColor4sv, glColor4sv, NULL, 34),
+ NAME_FUNC_OFFSET( 375, glColor4ub, glColor4ub, NULL, 35),
+ NAME_FUNC_OFFSET( 386, glColor4ubv, glColor4ubv, NULL, 36),
+ NAME_FUNC_OFFSET( 398, glColor4ui, glColor4ui, NULL, 37),
+ NAME_FUNC_OFFSET( 409, glColor4uiv, glColor4uiv, NULL, 38),
+ NAME_FUNC_OFFSET( 421, glColor4us, glColor4us, NULL, 39),
+ NAME_FUNC_OFFSET( 432, glColor4usv, glColor4usv, NULL, 40),
+ NAME_FUNC_OFFSET( 444, glEdgeFlag, glEdgeFlag, NULL, 41),
+ NAME_FUNC_OFFSET( 455, glEdgeFlagv, glEdgeFlagv, NULL, 42),
+ NAME_FUNC_OFFSET( 467, glEnd, glEnd, NULL, 43),
+ NAME_FUNC_OFFSET( 473, glIndexd, glIndexd, NULL, 44),
+ NAME_FUNC_OFFSET( 482, glIndexdv, glIndexdv, NULL, 45),
+ NAME_FUNC_OFFSET( 492, glIndexf, glIndexf, NULL, 46),
+ NAME_FUNC_OFFSET( 501, glIndexfv, glIndexfv, NULL, 47),
+ NAME_FUNC_OFFSET( 511, glIndexi, glIndexi, NULL, 48),
+ NAME_FUNC_OFFSET( 520, glIndexiv, glIndexiv, NULL, 49),
+ NAME_FUNC_OFFSET( 530, glIndexs, glIndexs, NULL, 50),
+ NAME_FUNC_OFFSET( 539, glIndexsv, glIndexsv, NULL, 51),
+ NAME_FUNC_OFFSET( 549, glNormal3b, glNormal3b, NULL, 52),
+ NAME_FUNC_OFFSET( 560, glNormal3bv, glNormal3bv, NULL, 53),
+ NAME_FUNC_OFFSET( 572, glNormal3d, glNormal3d, NULL, 54),
+ NAME_FUNC_OFFSET( 583, glNormal3dv, glNormal3dv, NULL, 55),
+ NAME_FUNC_OFFSET( 595, glNormal3f, glNormal3f, NULL, 56),
+ NAME_FUNC_OFFSET( 606, glNormal3fv, glNormal3fv, NULL, 57),
+ NAME_FUNC_OFFSET( 618, glNormal3i, glNormal3i, NULL, 58),
+ NAME_FUNC_OFFSET( 629, glNormal3iv, glNormal3iv, NULL, 59),
+ NAME_FUNC_OFFSET( 641, glNormal3s, glNormal3s, NULL, 60),
+ NAME_FUNC_OFFSET( 652, glNormal3sv, glNormal3sv, NULL, 61),
+ NAME_FUNC_OFFSET( 664, glRasterPos2d, glRasterPos2d, NULL, 62),
+ NAME_FUNC_OFFSET( 678, glRasterPos2dv, glRasterPos2dv, NULL, 63),
+ NAME_FUNC_OFFSET( 693, glRasterPos2f, glRasterPos2f, NULL, 64),
+ NAME_FUNC_OFFSET( 707, glRasterPos2fv, glRasterPos2fv, NULL, 65),
+ NAME_FUNC_OFFSET( 722, glRasterPos2i, glRasterPos2i, NULL, 66),
+ NAME_FUNC_OFFSET( 736, glRasterPos2iv, glRasterPos2iv, NULL, 67),
+ NAME_FUNC_OFFSET( 751, glRasterPos2s, glRasterPos2s, NULL, 68),
+ NAME_FUNC_OFFSET( 765, glRasterPos2sv, glRasterPos2sv, NULL, 69),
+ NAME_FUNC_OFFSET( 780, glRasterPos3d, glRasterPos3d, NULL, 70),
+ NAME_FUNC_OFFSET( 794, glRasterPos3dv, glRasterPos3dv, NULL, 71),
+ NAME_FUNC_OFFSET( 809, glRasterPos3f, glRasterPos3f, NULL, 72),
+ NAME_FUNC_OFFSET( 823, glRasterPos3fv, glRasterPos3fv, NULL, 73),
+ NAME_FUNC_OFFSET( 838, glRasterPos3i, glRasterPos3i, NULL, 74),
+ NAME_FUNC_OFFSET( 852, glRasterPos3iv, glRasterPos3iv, NULL, 75),
+ NAME_FUNC_OFFSET( 867, glRasterPos3s, glRasterPos3s, NULL, 76),
+ NAME_FUNC_OFFSET( 881, glRasterPos3sv, glRasterPos3sv, NULL, 77),
+ NAME_FUNC_OFFSET( 896, glRasterPos4d, glRasterPos4d, NULL, 78),
+ NAME_FUNC_OFFSET( 910, glRasterPos4dv, glRasterPos4dv, NULL, 79),
+ NAME_FUNC_OFFSET( 925, glRasterPos4f, glRasterPos4f, NULL, 80),
+ NAME_FUNC_OFFSET( 939, glRasterPos4fv, glRasterPos4fv, NULL, 81),
+ NAME_FUNC_OFFSET( 954, glRasterPos4i, glRasterPos4i, NULL, 82),
+ NAME_FUNC_OFFSET( 968, glRasterPos4iv, glRasterPos4iv, NULL, 83),
+ NAME_FUNC_OFFSET( 983, glRasterPos4s, glRasterPos4s, NULL, 84),
+ NAME_FUNC_OFFSET( 997, glRasterPos4sv, glRasterPos4sv, NULL, 85),
+ NAME_FUNC_OFFSET( 1012, glRectd, glRectd, NULL, 86),
+ NAME_FUNC_OFFSET( 1020, glRectdv, glRectdv, NULL, 87),
+ NAME_FUNC_OFFSET( 1029, glRectf, glRectf, NULL, 88),
+ NAME_FUNC_OFFSET( 1037, glRectfv, glRectfv, NULL, 89),
+ NAME_FUNC_OFFSET( 1046, glRecti, glRecti, NULL, 90),
+ NAME_FUNC_OFFSET( 1054, glRectiv, glRectiv, NULL, 91),
+ NAME_FUNC_OFFSET( 1063, glRects, glRects, NULL, 92),
+ NAME_FUNC_OFFSET( 1071, glRectsv, glRectsv, NULL, 93),
+ NAME_FUNC_OFFSET( 1080, glTexCoord1d, glTexCoord1d, NULL, 94),
+ NAME_FUNC_OFFSET( 1093, glTexCoord1dv, glTexCoord1dv, NULL, 95),
+ NAME_FUNC_OFFSET( 1107, glTexCoord1f, glTexCoord1f, NULL, 96),
+ NAME_FUNC_OFFSET( 1120, glTexCoord1fv, glTexCoord1fv, NULL, 97),
+ NAME_FUNC_OFFSET( 1134, glTexCoord1i, glTexCoord1i, NULL, 98),
+ NAME_FUNC_OFFSET( 1147, glTexCoord1iv, glTexCoord1iv, NULL, 99),
+ NAME_FUNC_OFFSET( 1161, glTexCoord1s, glTexCoord1s, NULL, 100),
+ NAME_FUNC_OFFSET( 1174, glTexCoord1sv, glTexCoord1sv, NULL, 101),
+ NAME_FUNC_OFFSET( 1188, glTexCoord2d, glTexCoord2d, NULL, 102),
+ NAME_FUNC_OFFSET( 1201, glTexCoord2dv, glTexCoord2dv, NULL, 103),
+ NAME_FUNC_OFFSET( 1215, glTexCoord2f, glTexCoord2f, NULL, 104),
+ NAME_FUNC_OFFSET( 1228, glTexCoord2fv, glTexCoord2fv, NULL, 105),
+ NAME_FUNC_OFFSET( 1242, glTexCoord2i, glTexCoord2i, NULL, 106),
+ NAME_FUNC_OFFSET( 1255, glTexCoord2iv, glTexCoord2iv, NULL, 107),
+ NAME_FUNC_OFFSET( 1269, glTexCoord2s, glTexCoord2s, NULL, 108),
+ NAME_FUNC_OFFSET( 1282, glTexCoord2sv, glTexCoord2sv, NULL, 109),
+ NAME_FUNC_OFFSET( 1296, glTexCoord3d, glTexCoord3d, NULL, 110),
+ NAME_FUNC_OFFSET( 1309, glTexCoord3dv, glTexCoord3dv, NULL, 111),
+ NAME_FUNC_OFFSET( 1323, glTexCoord3f, glTexCoord3f, NULL, 112),
+ NAME_FUNC_OFFSET( 1336, glTexCoord3fv, glTexCoord3fv, NULL, 113),
+ NAME_FUNC_OFFSET( 1350, glTexCoord3i, glTexCoord3i, NULL, 114),
+ NAME_FUNC_OFFSET( 1363, glTexCoord3iv, glTexCoord3iv, NULL, 115),
+ NAME_FUNC_OFFSET( 1377, glTexCoord3s, glTexCoord3s, NULL, 116),
+ NAME_FUNC_OFFSET( 1390, glTexCoord3sv, glTexCoord3sv, NULL, 117),
+ NAME_FUNC_OFFSET( 1404, glTexCoord4d, glTexCoord4d, NULL, 118),
+ NAME_FUNC_OFFSET( 1417, glTexCoord4dv, glTexCoord4dv, NULL, 119),
+ NAME_FUNC_OFFSET( 1431, glTexCoord4f, glTexCoord4f, NULL, 120),
+ NAME_FUNC_OFFSET( 1444, glTexCoord4fv, glTexCoord4fv, NULL, 121),
+ NAME_FUNC_OFFSET( 1458, glTexCoord4i, glTexCoord4i, NULL, 122),
+ NAME_FUNC_OFFSET( 1471, glTexCoord4iv, glTexCoord4iv, NULL, 123),
+ NAME_FUNC_OFFSET( 1485, glTexCoord4s, glTexCoord4s, NULL, 124),
+ NAME_FUNC_OFFSET( 1498, glTexCoord4sv, glTexCoord4sv, NULL, 125),
+ NAME_FUNC_OFFSET( 1512, glVertex2d, glVertex2d, NULL, 126),
+ NAME_FUNC_OFFSET( 1523, glVertex2dv, glVertex2dv, NULL, 127),
+ NAME_FUNC_OFFSET( 1535, glVertex2f, glVertex2f, NULL, 128),
+ NAME_FUNC_OFFSET( 1546, glVertex2fv, glVertex2fv, NULL, 129),
+ NAME_FUNC_OFFSET( 1558, glVertex2i, glVertex2i, NULL, 130),
+ NAME_FUNC_OFFSET( 1569, glVertex2iv, glVertex2iv, NULL, 131),
+ NAME_FUNC_OFFSET( 1581, glVertex2s, glVertex2s, NULL, 132),
+ NAME_FUNC_OFFSET( 1592, glVertex2sv, glVertex2sv, NULL, 133),
+ NAME_FUNC_OFFSET( 1604, glVertex3d, glVertex3d, NULL, 134),
+ NAME_FUNC_OFFSET( 1615, glVertex3dv, glVertex3dv, NULL, 135),
+ NAME_FUNC_OFFSET( 1627, glVertex3f, glVertex3f, NULL, 136),
+ NAME_FUNC_OFFSET( 1638, glVertex3fv, glVertex3fv, NULL, 137),
+ NAME_FUNC_OFFSET( 1650, glVertex3i, glVertex3i, NULL, 138),
+ NAME_FUNC_OFFSET( 1661, glVertex3iv, glVertex3iv, NULL, 139),
+ NAME_FUNC_OFFSET( 1673, glVertex3s, glVertex3s, NULL, 140),
+ NAME_FUNC_OFFSET( 1684, glVertex3sv, glVertex3sv, NULL, 141),
+ NAME_FUNC_OFFSET( 1696, glVertex4d, glVertex4d, NULL, 142),
+ NAME_FUNC_OFFSET( 1707, glVertex4dv, glVertex4dv, NULL, 143),
+ NAME_FUNC_OFFSET( 1719, glVertex4f, glVertex4f, NULL, 144),
+ NAME_FUNC_OFFSET( 1730, glVertex4fv, glVertex4fv, NULL, 145),
+ NAME_FUNC_OFFSET( 1742, glVertex4i, glVertex4i, NULL, 146),
+ NAME_FUNC_OFFSET( 1753, glVertex4iv, glVertex4iv, NULL, 147),
+ NAME_FUNC_OFFSET( 1765, glVertex4s, glVertex4s, NULL, 148),
+ NAME_FUNC_OFFSET( 1776, glVertex4sv, glVertex4sv, NULL, 149),
+ NAME_FUNC_OFFSET( 1788, glClipPlane, glClipPlane, NULL, 150),
+ NAME_FUNC_OFFSET( 1800, glColorMaterial, glColorMaterial, NULL, 151),
+ NAME_FUNC_OFFSET( 1816, glCullFace, glCullFace, NULL, 152),
+ NAME_FUNC_OFFSET( 1827, glFogf, glFogf, NULL, 153),
+ NAME_FUNC_OFFSET( 1834, glFogfv, glFogfv, NULL, 154),
+ NAME_FUNC_OFFSET( 1842, glFogi, glFogi, NULL, 155),
+ NAME_FUNC_OFFSET( 1849, glFogiv, glFogiv, NULL, 156),
+ NAME_FUNC_OFFSET( 1857, glFrontFace, glFrontFace, NULL, 157),
+ NAME_FUNC_OFFSET( 1869, glHint, glHint, NULL, 158),
+ NAME_FUNC_OFFSET( 1876, glLightf, glLightf, NULL, 159),
+ NAME_FUNC_OFFSET( 1885, glLightfv, glLightfv, NULL, 160),
+ NAME_FUNC_OFFSET( 1895, glLighti, glLighti, NULL, 161),
+ NAME_FUNC_OFFSET( 1904, glLightiv, glLightiv, NULL, 162),
+ NAME_FUNC_OFFSET( 1914, glLightModelf, glLightModelf, NULL, 163),
+ NAME_FUNC_OFFSET( 1928, glLightModelfv, glLightModelfv, NULL, 164),
+ NAME_FUNC_OFFSET( 1943, glLightModeli, glLightModeli, NULL, 165),
+ NAME_FUNC_OFFSET( 1957, glLightModeliv, glLightModeliv, NULL, 166),
+ NAME_FUNC_OFFSET( 1972, glLineStipple, glLineStipple, NULL, 167),
+ NAME_FUNC_OFFSET( 1986, glLineWidth, glLineWidth, NULL, 168),
+ NAME_FUNC_OFFSET( 1998, glMaterialf, glMaterialf, NULL, 169),
+ NAME_FUNC_OFFSET( 2010, glMaterialfv, glMaterialfv, NULL, 170),
+ NAME_FUNC_OFFSET( 2023, glMateriali, glMateriali, NULL, 171),
+ NAME_FUNC_OFFSET( 2035, glMaterialiv, glMaterialiv, NULL, 172),
+ NAME_FUNC_OFFSET( 2048, glPointSize, glPointSize, NULL, 173),
+ NAME_FUNC_OFFSET( 2060, glPolygonMode, glPolygonMode, NULL, 174),
+ NAME_FUNC_OFFSET( 2074, glPolygonStipple, glPolygonStipple, NULL, 175),
+ NAME_FUNC_OFFSET( 2091, glScissor, glScissor, NULL, 176),
+ NAME_FUNC_OFFSET( 2101, glShadeModel, glShadeModel, NULL, 177),
+ NAME_FUNC_OFFSET( 2114, glTexParameterf, glTexParameterf, NULL, 178),
+ NAME_FUNC_OFFSET( 2130, glTexParameterfv, glTexParameterfv, NULL, 179),
+ NAME_FUNC_OFFSET( 2147, glTexParameteri, glTexParameteri, NULL, 180),
+ NAME_FUNC_OFFSET( 2163, glTexParameteriv, glTexParameteriv, NULL, 181),
+ NAME_FUNC_OFFSET( 2180, glTexImage1D, glTexImage1D, NULL, 182),
+ NAME_FUNC_OFFSET( 2193, glTexImage2D, glTexImage2D, NULL, 183),
+ NAME_FUNC_OFFSET( 2206, glTexEnvf, glTexEnvf, NULL, 184),
+ NAME_FUNC_OFFSET( 2216, glTexEnvfv, glTexEnvfv, NULL, 185),
+ NAME_FUNC_OFFSET( 2227, glTexEnvi, glTexEnvi, NULL, 186),
+ NAME_FUNC_OFFSET( 2237, glTexEnviv, glTexEnviv, NULL, 187),
+ NAME_FUNC_OFFSET( 2248, glTexGend, glTexGend, NULL, 188),
+ NAME_FUNC_OFFSET( 2258, glTexGendv, glTexGendv, NULL, 189),
+ NAME_FUNC_OFFSET( 2269, glTexGenf, glTexGenf, NULL, 190),
+ NAME_FUNC_OFFSET( 2279, glTexGenfv, glTexGenfv, NULL, 191),
+ NAME_FUNC_OFFSET( 2290, glTexGeni, glTexGeni, NULL, 192),
+ NAME_FUNC_OFFSET( 2300, glTexGeniv, glTexGeniv, NULL, 193),
+ NAME_FUNC_OFFSET( 2311, glFeedbackBuffer, glFeedbackBuffer, NULL, 194),
+ NAME_FUNC_OFFSET( 2328, glSelectBuffer, glSelectBuffer, NULL, 195),
+ NAME_FUNC_OFFSET( 2343, glRenderMode, glRenderMode, NULL, 196),
+ NAME_FUNC_OFFSET( 2356, glInitNames, glInitNames, NULL, 197),
+ NAME_FUNC_OFFSET( 2368, glLoadName, glLoadName, NULL, 198),
+ NAME_FUNC_OFFSET( 2379, glPassThrough, glPassThrough, NULL, 199),
+ NAME_FUNC_OFFSET( 2393, glPopName, glPopName, NULL, 200),
+ NAME_FUNC_OFFSET( 2403, glPushName, glPushName, NULL, 201),
+ NAME_FUNC_OFFSET( 2414, glDrawBuffer, glDrawBuffer, NULL, 202),
+ NAME_FUNC_OFFSET( 2427, glClear, glClear, NULL, 203),
+ NAME_FUNC_OFFSET( 2435, glClearAccum, glClearAccum, NULL, 204),
+ NAME_FUNC_OFFSET( 2448, glClearIndex, glClearIndex, NULL, 205),
+ NAME_FUNC_OFFSET( 2461, glClearColor, glClearColor, NULL, 206),
+ NAME_FUNC_OFFSET( 2474, glClearStencil, glClearStencil, NULL, 207),
+ NAME_FUNC_OFFSET( 2489, glClearDepth, glClearDepth, NULL, 208),
+ NAME_FUNC_OFFSET( 2502, glStencilMask, glStencilMask, NULL, 209),
+ NAME_FUNC_OFFSET( 2516, glColorMask, glColorMask, NULL, 210),
+ NAME_FUNC_OFFSET( 2528, glDepthMask, glDepthMask, NULL, 211),
+ NAME_FUNC_OFFSET( 2540, glIndexMask, glIndexMask, NULL, 212),
+ NAME_FUNC_OFFSET( 2552, glAccum, glAccum, NULL, 213),
+ NAME_FUNC_OFFSET( 2560, glDisable, glDisable, NULL, 214),
+ NAME_FUNC_OFFSET( 2570, glEnable, glEnable, NULL, 215),
+ NAME_FUNC_OFFSET( 2579, glFinish, glFinish, NULL, 216),
+ NAME_FUNC_OFFSET( 2588, glFlush, glFlush, NULL, 217),
+ NAME_FUNC_OFFSET( 2596, glPopAttrib, glPopAttrib, NULL, 218),
+ NAME_FUNC_OFFSET( 2608, glPushAttrib, glPushAttrib, NULL, 219),
+ NAME_FUNC_OFFSET( 2621, glMap1d, glMap1d, NULL, 220),
+ NAME_FUNC_OFFSET( 2629, glMap1f, glMap1f, NULL, 221),
+ NAME_FUNC_OFFSET( 2637, glMap2d, glMap2d, NULL, 222),
+ NAME_FUNC_OFFSET( 2645, glMap2f, glMap2f, NULL, 223),
+ NAME_FUNC_OFFSET( 2653, glMapGrid1d, glMapGrid1d, NULL, 224),
+ NAME_FUNC_OFFSET( 2665, glMapGrid1f, glMapGrid1f, NULL, 225),
+ NAME_FUNC_OFFSET( 2677, glMapGrid2d, glMapGrid2d, NULL, 226),
+ NAME_FUNC_OFFSET( 2689, glMapGrid2f, glMapGrid2f, NULL, 227),
+ NAME_FUNC_OFFSET( 2701, glEvalCoord1d, glEvalCoord1d, NULL, 228),
+ NAME_FUNC_OFFSET( 2715, glEvalCoord1dv, glEvalCoord1dv, NULL, 229),
+ NAME_FUNC_OFFSET( 2730, glEvalCoord1f, glEvalCoord1f, NULL, 230),
+ NAME_FUNC_OFFSET( 2744, glEvalCoord1fv, glEvalCoord1fv, NULL, 231),
+ NAME_FUNC_OFFSET( 2759, glEvalCoord2d, glEvalCoord2d, NULL, 232),
+ NAME_FUNC_OFFSET( 2773, glEvalCoord2dv, glEvalCoord2dv, NULL, 233),
+ NAME_FUNC_OFFSET( 2788, glEvalCoord2f, glEvalCoord2f, NULL, 234),
+ NAME_FUNC_OFFSET( 2802, glEvalCoord2fv, glEvalCoord2fv, NULL, 235),
+ NAME_FUNC_OFFSET( 2817, glEvalMesh1, glEvalMesh1, NULL, 236),
+ NAME_FUNC_OFFSET( 2829, glEvalPoint1, glEvalPoint1, NULL, 237),
+ NAME_FUNC_OFFSET( 2842, glEvalMesh2, glEvalMesh2, NULL, 238),
+ NAME_FUNC_OFFSET( 2854, glEvalPoint2, glEvalPoint2, NULL, 239),
+ NAME_FUNC_OFFSET( 2867, glAlphaFunc, glAlphaFunc, NULL, 240),
+ NAME_FUNC_OFFSET( 2879, glBlendFunc, glBlendFunc, NULL, 241),
+ NAME_FUNC_OFFSET( 2891, glLogicOp, glLogicOp, NULL, 242),
+ NAME_FUNC_OFFSET( 2901, glStencilFunc, glStencilFunc, NULL, 243),
+ NAME_FUNC_OFFSET( 2915, glStencilOp, glStencilOp, NULL, 244),
+ NAME_FUNC_OFFSET( 2927, glDepthFunc, glDepthFunc, NULL, 245),
+ NAME_FUNC_OFFSET( 2939, glPixelZoom, glPixelZoom, NULL, 246),
+ NAME_FUNC_OFFSET( 2951, glPixelTransferf, glPixelTransferf, NULL, 247),
+ NAME_FUNC_OFFSET( 2968, glPixelTransferi, glPixelTransferi, NULL, 248),
+ NAME_FUNC_OFFSET( 2985, glPixelStoref, glPixelStoref, NULL, 249),
+ NAME_FUNC_OFFSET( 2999, glPixelStorei, glPixelStorei, NULL, 250),
+ NAME_FUNC_OFFSET( 3013, glPixelMapfv, glPixelMapfv, NULL, 251),
+ NAME_FUNC_OFFSET( 3026, glPixelMapuiv, glPixelMapuiv, NULL, 252),
+ NAME_FUNC_OFFSET( 3040, glPixelMapusv, glPixelMapusv, NULL, 253),
+ NAME_FUNC_OFFSET( 3054, glReadBuffer, glReadBuffer, NULL, 254),
+ NAME_FUNC_OFFSET( 3067, glCopyPixels, glCopyPixels, NULL, 255),
+ NAME_FUNC_OFFSET( 3080, glReadPixels, glReadPixels, NULL, 256),
+ NAME_FUNC_OFFSET( 3093, glDrawPixels, glDrawPixels, NULL, 257),
+ NAME_FUNC_OFFSET( 3106, glGetBooleanv, glGetBooleanv, NULL, 258),
+ NAME_FUNC_OFFSET( 3120, glGetClipPlane, glGetClipPlane, NULL, 259),
+ NAME_FUNC_OFFSET( 3135, glGetDoublev, glGetDoublev, NULL, 260),
+ NAME_FUNC_OFFSET( 3148, glGetError, glGetError, NULL, 261),
+ NAME_FUNC_OFFSET( 3159, glGetFloatv, glGetFloatv, NULL, 262),
+ NAME_FUNC_OFFSET( 3171, glGetIntegerv, glGetIntegerv, NULL, 263),
+ NAME_FUNC_OFFSET( 3185, glGetLightfv, glGetLightfv, NULL, 264),
+ NAME_FUNC_OFFSET( 3198, glGetLightiv, glGetLightiv, NULL, 265),
+ NAME_FUNC_OFFSET( 3211, glGetMapdv, glGetMapdv, NULL, 266),
+ NAME_FUNC_OFFSET( 3222, glGetMapfv, glGetMapfv, NULL, 267),
+ NAME_FUNC_OFFSET( 3233, glGetMapiv, glGetMapiv, NULL, 268),
+ NAME_FUNC_OFFSET( 3244, glGetMaterialfv, glGetMaterialfv, NULL, 269),
+ NAME_FUNC_OFFSET( 3260, glGetMaterialiv, glGetMaterialiv, NULL, 270),
+ NAME_FUNC_OFFSET( 3276, glGetPixelMapfv, glGetPixelMapfv, NULL, 271),
+ NAME_FUNC_OFFSET( 3292, glGetPixelMapuiv, glGetPixelMapuiv, NULL, 272),
+ NAME_FUNC_OFFSET( 3309, glGetPixelMapusv, glGetPixelMapusv, NULL, 273),
+ NAME_FUNC_OFFSET( 3326, glGetPolygonStipple, glGetPolygonStipple, NULL, 274),
+ NAME_FUNC_OFFSET( 3346, glGetString, glGetString, NULL, 275),
+ NAME_FUNC_OFFSET( 3358, glGetTexEnvfv, glGetTexEnvfv, NULL, 276),
+ NAME_FUNC_OFFSET( 3372, glGetTexEnviv, glGetTexEnviv, NULL, 277),
+ NAME_FUNC_OFFSET( 3386, glGetTexGendv, glGetTexGendv, NULL, 278),
+ NAME_FUNC_OFFSET( 3400, glGetTexGenfv, glGetTexGenfv, NULL, 279),
+ NAME_FUNC_OFFSET( 3414, glGetTexGeniv, glGetTexGeniv, NULL, 280),
+ NAME_FUNC_OFFSET( 3428, glGetTexImage, glGetTexImage, NULL, 281),
+ NAME_FUNC_OFFSET( 3442, glGetTexParameterfv, glGetTexParameterfv, NULL, 282),
+ NAME_FUNC_OFFSET( 3462, glGetTexParameteriv, glGetTexParameteriv, NULL, 283),
+ NAME_FUNC_OFFSET( 3482, glGetTexLevelParameterfv, glGetTexLevelParameterfv, NULL, 284),
+ NAME_FUNC_OFFSET( 3507, glGetTexLevelParameteriv, glGetTexLevelParameteriv, NULL, 285),
+ NAME_FUNC_OFFSET( 3532, glIsEnabled, glIsEnabled, NULL, 286),
+ NAME_FUNC_OFFSET( 3544, glIsList, glIsList, NULL, 287),
+ NAME_FUNC_OFFSET( 3553, glDepthRange, glDepthRange, NULL, 288),
+ NAME_FUNC_OFFSET( 3566, glFrustum, glFrustum, NULL, 289),
+ NAME_FUNC_OFFSET( 3576, glLoadIdentity, glLoadIdentity, NULL, 290),
+ NAME_FUNC_OFFSET( 3591, glLoadMatrixf, glLoadMatrixf, NULL, 291),
+ NAME_FUNC_OFFSET( 3605, glLoadMatrixd, glLoadMatrixd, NULL, 292),
+ NAME_FUNC_OFFSET( 3619, glMatrixMode, glMatrixMode, NULL, 293),
+ NAME_FUNC_OFFSET( 3632, glMultMatrixf, glMultMatrixf, NULL, 294),
+ NAME_FUNC_OFFSET( 3646, glMultMatrixd, glMultMatrixd, NULL, 295),
+ NAME_FUNC_OFFSET( 3660, glOrtho, glOrtho, NULL, 296),
+ NAME_FUNC_OFFSET( 3668, glPopMatrix, glPopMatrix, NULL, 297),
+ NAME_FUNC_OFFSET( 3680, glPushMatrix, glPushMatrix, NULL, 298),
+ NAME_FUNC_OFFSET( 3693, glRotated, glRotated, NULL, 299),
+ NAME_FUNC_OFFSET( 3703, glRotatef, glRotatef, NULL, 300),
+ NAME_FUNC_OFFSET( 3713, glScaled, glScaled, NULL, 301),
+ NAME_FUNC_OFFSET( 3722, glScalef, glScalef, NULL, 302),
+ NAME_FUNC_OFFSET( 3731, glTranslated, glTranslated, NULL, 303),
+ NAME_FUNC_OFFSET( 3744, glTranslatef, glTranslatef, NULL, 304),
+ NAME_FUNC_OFFSET( 3757, glViewport, glViewport, NULL, 305),
+ NAME_FUNC_OFFSET( 3768, glArrayElement, glArrayElement, NULL, 306),
+ NAME_FUNC_OFFSET( 3783, glBindTexture, glBindTexture, NULL, 307),
+ NAME_FUNC_OFFSET( 3797, glColorPointer, glColorPointer, NULL, 308),
+ NAME_FUNC_OFFSET( 3812, glDisableClientState, glDisableClientState, NULL, 309),
+ NAME_FUNC_OFFSET( 3833, glDrawArrays, glDrawArrays, NULL, 310),
+ NAME_FUNC_OFFSET( 3846, glDrawElements, glDrawElements, NULL, 311),
+ NAME_FUNC_OFFSET( 3861, glEdgeFlagPointer, glEdgeFlagPointer, NULL, 312),
+ NAME_FUNC_OFFSET( 3879, glEnableClientState, glEnableClientState, NULL, 313),
+ NAME_FUNC_OFFSET( 3899, glIndexPointer, glIndexPointer, NULL, 314),
+ NAME_FUNC_OFFSET( 3914, glIndexub, glIndexub, NULL, 315),
+ NAME_FUNC_OFFSET( 3924, glIndexubv, glIndexubv, NULL, 316),
+ NAME_FUNC_OFFSET( 3935, glInterleavedArrays, glInterleavedArrays, NULL, 317),
+ NAME_FUNC_OFFSET( 3955, glNormalPointer, glNormalPointer, NULL, 318),
+ NAME_FUNC_OFFSET( 3971, glPolygonOffset, glPolygonOffset, NULL, 319),
+ NAME_FUNC_OFFSET( 3987, glTexCoordPointer, glTexCoordPointer, NULL, 320),
+ NAME_FUNC_OFFSET( 4005, glVertexPointer, glVertexPointer, NULL, 321),
+ NAME_FUNC_OFFSET( 4021, glAreTexturesResident, glAreTexturesResident, NULL, 322),
+ NAME_FUNC_OFFSET( 4043, glCopyTexImage1D, glCopyTexImage1D, NULL, 323),
+ NAME_FUNC_OFFSET( 4060, glCopyTexImage2D, glCopyTexImage2D, NULL, 324),
+ NAME_FUNC_OFFSET( 4077, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, 325),
+ NAME_FUNC_OFFSET( 4097, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, 326),
+ NAME_FUNC_OFFSET( 4117, glDeleteTextures, glDeleteTextures, NULL, 327),
+ NAME_FUNC_OFFSET( 4134, glGenTextures, glGenTextures, NULL, 328),
+ NAME_FUNC_OFFSET( 4148, glGetPointerv, glGetPointerv, NULL, 329),
+ NAME_FUNC_OFFSET( 4162, glIsTexture, glIsTexture, NULL, 330),
+ NAME_FUNC_OFFSET( 4174, glPrioritizeTextures, glPrioritizeTextures, NULL, 331),
+ NAME_FUNC_OFFSET( 4195, glTexSubImage1D, glTexSubImage1D, NULL, 332),
+ NAME_FUNC_OFFSET( 4211, glTexSubImage2D, glTexSubImage2D, NULL, 333),
+ NAME_FUNC_OFFSET( 4227, glPopClientAttrib, glPopClientAttrib, NULL, 334),
+ NAME_FUNC_OFFSET( 4245, glPushClientAttrib, glPushClientAttrib, NULL, 335),
+ NAME_FUNC_OFFSET( 4264, glBlendColor, glBlendColor, NULL, 336),
+ NAME_FUNC_OFFSET( 4277, glBlendEquation, glBlendEquation, NULL, 337),
+ NAME_FUNC_OFFSET( 4293, glDrawRangeElements, glDrawRangeElements, NULL, 338),
+ NAME_FUNC_OFFSET( 4313, glColorTable, glColorTable, NULL, 339),
+ NAME_FUNC_OFFSET( 4326, glColorTableParameterfv, glColorTableParameterfv, NULL, 340),
+ NAME_FUNC_OFFSET( 4350, glColorTableParameteriv, glColorTableParameteriv, NULL, 341),
+ NAME_FUNC_OFFSET( 4374, glCopyColorTable, glCopyColorTable, NULL, 342),
+ NAME_FUNC_OFFSET( 4391, glGetColorTable, glGetColorTable, NULL, 343),
+ NAME_FUNC_OFFSET( 4407, glGetColorTableParameterfv, glGetColorTableParameterfv, NULL, 344),
+ NAME_FUNC_OFFSET( 4434, glGetColorTableParameteriv, glGetColorTableParameteriv, NULL, 345),
+ NAME_FUNC_OFFSET( 4461, glColorSubTable, glColorSubTable, NULL, 346),
+ NAME_FUNC_OFFSET( 4477, glCopyColorSubTable, glCopyColorSubTable, NULL, 347),
+ NAME_FUNC_OFFSET( 4497, glConvolutionFilter1D, glConvolutionFilter1D, NULL, 348),
+ NAME_FUNC_OFFSET( 4519, glConvolutionFilter2D, glConvolutionFilter2D, NULL, 349),
+ NAME_FUNC_OFFSET( 4541, glConvolutionParameterf, glConvolutionParameterf, NULL, 350),
+ NAME_FUNC_OFFSET( 4565, glConvolutionParameterfv, glConvolutionParameterfv, NULL, 351),
+ NAME_FUNC_OFFSET( 4590, glConvolutionParameteri, glConvolutionParameteri, NULL, 352),
+ NAME_FUNC_OFFSET( 4614, glConvolutionParameteriv, glConvolutionParameteriv, NULL, 353),
+ NAME_FUNC_OFFSET( 4639, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, 354),
+ NAME_FUNC_OFFSET( 4665, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, 355),
+ NAME_FUNC_OFFSET( 4691, glGetConvolutionFilter, glGetConvolutionFilter, NULL, 356),
+ NAME_FUNC_OFFSET( 4714, glGetConvolutionParameterfv, glGetConvolutionParameterfv, NULL, 357),
+ NAME_FUNC_OFFSET( 4742, glGetConvolutionParameteriv, glGetConvolutionParameteriv, NULL, 358),
+ NAME_FUNC_OFFSET( 4770, glGetSeparableFilter, glGetSeparableFilter, NULL, 359),
+ NAME_FUNC_OFFSET( 4791, glSeparableFilter2D, glSeparableFilter2D, NULL, 360),
+ NAME_FUNC_OFFSET( 4811, glGetHistogram, glGetHistogram, NULL, 361),
+ NAME_FUNC_OFFSET( 4826, glGetHistogramParameterfv, glGetHistogramParameterfv, NULL, 362),
+ NAME_FUNC_OFFSET( 4852, glGetHistogramParameteriv, glGetHistogramParameteriv, NULL, 363),
+ NAME_FUNC_OFFSET( 4878, glGetMinmax, glGetMinmax, NULL, 364),
+ NAME_FUNC_OFFSET( 4890, glGetMinmaxParameterfv, glGetMinmaxParameterfv, NULL, 365),
+ NAME_FUNC_OFFSET( 4913, glGetMinmaxParameteriv, glGetMinmaxParameteriv, NULL, 366),
+ NAME_FUNC_OFFSET( 4936, glHistogram, glHistogram, NULL, 367),
+ NAME_FUNC_OFFSET( 4948, glMinmax, glMinmax, NULL, 368),
+ NAME_FUNC_OFFSET( 4957, glResetHistogram, glResetHistogram, NULL, 369),
+ NAME_FUNC_OFFSET( 4974, glResetMinmax, glResetMinmax, NULL, 370),
+ NAME_FUNC_OFFSET( 4988, glTexImage3D, glTexImage3D, NULL, 371),
+ NAME_FUNC_OFFSET( 5001, glTexSubImage3D, glTexSubImage3D, NULL, 372),
+ NAME_FUNC_OFFSET( 5017, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, 373),
+ NAME_FUNC_OFFSET( 5037, glActiveTextureARB, glActiveTextureARB, NULL, 374),
+ NAME_FUNC_OFFSET( 5056, glClientActiveTextureARB, glClientActiveTextureARB, NULL, 375),
+ NAME_FUNC_OFFSET( 5081, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, 376),
+ NAME_FUNC_OFFSET( 5102, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, 377),
+ NAME_FUNC_OFFSET( 5124, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, 378),
+ NAME_FUNC_OFFSET( 5145, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, 379),
+ NAME_FUNC_OFFSET( 5167, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, 380),
+ NAME_FUNC_OFFSET( 5188, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, 381),
+ NAME_FUNC_OFFSET( 5210, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, 382),
+ NAME_FUNC_OFFSET( 5231, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, 383),
+ NAME_FUNC_OFFSET( 5253, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, 384),
+ NAME_FUNC_OFFSET( 5274, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, 385),
+ NAME_FUNC_OFFSET( 5296, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, 386),
+ NAME_FUNC_OFFSET( 5317, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, 387),
+ NAME_FUNC_OFFSET( 5339, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, 388),
+ NAME_FUNC_OFFSET( 5360, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, 389),
+ NAME_FUNC_OFFSET( 5382, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, 390),
+ NAME_FUNC_OFFSET( 5403, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, 391),
+ NAME_FUNC_OFFSET( 5425, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, 392),
+ NAME_FUNC_OFFSET( 5446, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, 393),
+ NAME_FUNC_OFFSET( 5468, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, 394),
+ NAME_FUNC_OFFSET( 5489, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, 395),
+ NAME_FUNC_OFFSET( 5511, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, 396),
+ NAME_FUNC_OFFSET( 5532, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, 397),
+ NAME_FUNC_OFFSET( 5554, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, 398),
+ NAME_FUNC_OFFSET( 5575, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, 399),
+ NAME_FUNC_OFFSET( 5597, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, 400),
+ NAME_FUNC_OFFSET( 5618, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, 401),
+ NAME_FUNC_OFFSET( 5640, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, 402),
+ NAME_FUNC_OFFSET( 5661, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, 403),
+ NAME_FUNC_OFFSET( 5683, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, 404),
+ NAME_FUNC_OFFSET( 5704, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, 405),
+ NAME_FUNC_OFFSET( 5726, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, 406),
+ NAME_FUNC_OFFSET( 5747, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, 407),
+ NAME_FUNC_OFFSET( 5769, glAttachShader, glAttachShader, NULL, 408),
+ NAME_FUNC_OFFSET( 5784, glCreateProgram, glCreateProgram, NULL, 409),
+ NAME_FUNC_OFFSET( 5800, glCreateShader, glCreateShader, NULL, 410),
+ NAME_FUNC_OFFSET( 5815, glDeleteProgram, glDeleteProgram, NULL, 411),
+ NAME_FUNC_OFFSET( 5831, glDeleteShader, glDeleteShader, NULL, 412),
+ NAME_FUNC_OFFSET( 5846, glDetachShader, glDetachShader, NULL, 413),
+ NAME_FUNC_OFFSET( 5861, glGetAttachedShaders, glGetAttachedShaders, NULL, 414),
+ NAME_FUNC_OFFSET( 5882, glGetProgramInfoLog, glGetProgramInfoLog, NULL, 415),
+ NAME_FUNC_OFFSET( 5902, glGetProgramiv, glGetProgramiv, NULL, 416),
+ NAME_FUNC_OFFSET( 5917, glGetShaderInfoLog, glGetShaderInfoLog, NULL, 417),
+ NAME_FUNC_OFFSET( 5936, glGetShaderiv, glGetShaderiv, NULL, 418),
+ NAME_FUNC_OFFSET( 5950, glIsProgram, glIsProgram, NULL, 419),
+ NAME_FUNC_OFFSET( 5962, glIsShader, glIsShader, NULL, 420),
+ NAME_FUNC_OFFSET( 5973, glStencilFuncSeparate, glStencilFuncSeparate, NULL, 421),
+ NAME_FUNC_OFFSET( 5995, glStencilMaskSeparate, glStencilMaskSeparate, NULL, 422),
+ NAME_FUNC_OFFSET( 6017, glStencilOpSeparate, glStencilOpSeparate, NULL, 423),
+ NAME_FUNC_OFFSET( 6037, glUniformMatrix2x3fv, glUniformMatrix2x3fv, NULL, 424),
+ NAME_FUNC_OFFSET( 6058, glUniformMatrix2x4fv, glUniformMatrix2x4fv, NULL, 425),
+ NAME_FUNC_OFFSET( 6079, glUniformMatrix3x2fv, glUniformMatrix3x2fv, NULL, 426),
+ NAME_FUNC_OFFSET( 6100, glUniformMatrix3x4fv, glUniformMatrix3x4fv, NULL, 427),
+ NAME_FUNC_OFFSET( 6121, glUniformMatrix4x2fv, glUniformMatrix4x2fv, NULL, 428),
+ NAME_FUNC_OFFSET( 6142, glUniformMatrix4x3fv, glUniformMatrix4x3fv, NULL, 429),
+ NAME_FUNC_OFFSET( 6163, glClampColor, glClampColor, NULL, 430),
+ NAME_FUNC_OFFSET( 6176, glClearBufferfi, glClearBufferfi, NULL, 431),
+ NAME_FUNC_OFFSET( 6192, glClearBufferfv, glClearBufferfv, NULL, 432),
+ NAME_FUNC_OFFSET( 6208, glClearBufferiv, glClearBufferiv, NULL, 433),
+ NAME_FUNC_OFFSET( 6224, glClearBufferuiv, glClearBufferuiv, NULL, 434),
+ NAME_FUNC_OFFSET( 6241, glGetStringi, glGetStringi, NULL, 435),
+ NAME_FUNC_OFFSET( 6254, glTexBuffer, glTexBuffer, NULL, 436),
+ NAME_FUNC_OFFSET( 6266, glFramebufferTexture, glFramebufferTexture, NULL, 437),
+ NAME_FUNC_OFFSET( 6287, glGetBufferParameteri64v, glGetBufferParameteri64v, NULL, 438),
+ NAME_FUNC_OFFSET( 6312, glGetInteger64i_v, glGetInteger64i_v, NULL, 439),
+ NAME_FUNC_OFFSET( 6330, glVertexAttribDivisor, glVertexAttribDivisor, NULL, 440),
+ NAME_FUNC_OFFSET( 6352, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, 441),
+ NAME_FUNC_OFFSET( 6378, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, 442),
+ NAME_FUNC_OFFSET( 6404, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, 443),
+ NAME_FUNC_OFFSET( 6430, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, 444),
+ NAME_FUNC_OFFSET( 6456, glSampleCoverageARB, glSampleCoverageARB, NULL, 445),
+ NAME_FUNC_OFFSET( 6476, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, 446),
+ NAME_FUNC_OFFSET( 6502, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, 447),
+ NAME_FUNC_OFFSET( 6528, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, 448),
+ NAME_FUNC_OFFSET( 6554, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, 449),
+ NAME_FUNC_OFFSET( 6583, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, 450),
+ NAME_FUNC_OFFSET( 6612, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, 451),
+ NAME_FUNC_OFFSET( 6641, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, 452),
+ NAME_FUNC_OFFSET( 6668, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, 453),
+ NAME_FUNC_OFFSET( 6698, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, 454),
+ NAME_FUNC_OFFSET( 6727, glGetProgramEnvParameterdvARB, glGetProgramEnvParameterdvARB, NULL, 455),
+ NAME_FUNC_OFFSET( 6757, glGetProgramEnvParameterfvARB, glGetProgramEnvParameterfvARB, NULL, 456),
+ NAME_FUNC_OFFSET( 6787, glGetProgramLocalParameterdvARB, glGetProgramLocalParameterdvARB, NULL, 457),
+ NAME_FUNC_OFFSET( 6819, glGetProgramLocalParameterfvARB, glGetProgramLocalParameterfvARB, NULL, 458),
+ NAME_FUNC_OFFSET( 6851, glGetProgramStringARB, glGetProgramStringARB, NULL, 459),
+ NAME_FUNC_OFFSET( 6873, glGetProgramivARB, glGetProgramivARB, NULL, 460),
+ NAME_FUNC_OFFSET( 6891, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, 461),
+ NAME_FUNC_OFFSET( 6914, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, 462),
+ NAME_FUNC_OFFSET( 6937, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, 463),
+ NAME_FUNC_OFFSET( 6960, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, 464),
+ NAME_FUNC_OFFSET( 6987, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, 465),
+ NAME_FUNC_OFFSET( 7015, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, 466),
+ NAME_FUNC_OFFSET( 7042, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, 467),
+ NAME_FUNC_OFFSET( 7070, glProgramLocalParameter4dARB, glProgramLocalParameter4dARB, NULL, 468),
+ NAME_FUNC_OFFSET( 7099, glProgramLocalParameter4dvARB, glProgramLocalParameter4dvARB, NULL, 469),
+ NAME_FUNC_OFFSET( 7129, glProgramLocalParameter4fARB, glProgramLocalParameter4fARB, NULL, 470),
+ NAME_FUNC_OFFSET( 7158, glProgramLocalParameter4fvARB, glProgramLocalParameter4fvARB, NULL, 471),
+ NAME_FUNC_OFFSET( 7188, glProgramStringARB, glProgramStringARB, NULL, 472),
+ NAME_FUNC_OFFSET( 7207, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, 473),
+ NAME_FUNC_OFFSET( 7227, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, 474),
+ NAME_FUNC_OFFSET( 7248, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, 475),
+ NAME_FUNC_OFFSET( 7268, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, 476),
+ NAME_FUNC_OFFSET( 7289, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, 477),
+ NAME_FUNC_OFFSET( 7309, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, 478),
+ NAME_FUNC_OFFSET( 7330, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, 479),
+ NAME_FUNC_OFFSET( 7350, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, 480),
+ NAME_FUNC_OFFSET( 7371, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, 481),
+ NAME_FUNC_OFFSET( 7391, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, 482),
+ NAME_FUNC_OFFSET( 7412, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, 483),
+ NAME_FUNC_OFFSET( 7432, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, 484),
+ NAME_FUNC_OFFSET( 7453, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, 485),
+ NAME_FUNC_OFFSET( 7473, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, 486),
+ NAME_FUNC_OFFSET( 7494, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, 487),
+ NAME_FUNC_OFFSET( 7514, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, 488),
+ NAME_FUNC_OFFSET( 7535, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, 489),
+ NAME_FUNC_OFFSET( 7555, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, 490),
+ NAME_FUNC_OFFSET( 7576, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, 491),
+ NAME_FUNC_OFFSET( 7598, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, 492),
+ NAME_FUNC_OFFSET( 7620, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, 493),
+ NAME_FUNC_OFFSET( 7642, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, 494),
+ NAME_FUNC_OFFSET( 7664, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, 495),
+ NAME_FUNC_OFFSET( 7687, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, 496),
+ NAME_FUNC_OFFSET( 7710, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, 497),
+ NAME_FUNC_OFFSET( 7733, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, 498),
+ NAME_FUNC_OFFSET( 7754, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, 499),
+ NAME_FUNC_OFFSET( 7774, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, 500),
+ NAME_FUNC_OFFSET( 7795, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, 501),
+ NAME_FUNC_OFFSET( 7815, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, 502),
+ NAME_FUNC_OFFSET( 7836, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, 503),
+ NAME_FUNC_OFFSET( 7857, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, 504),
+ NAME_FUNC_OFFSET( 7877, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, 505),
+ NAME_FUNC_OFFSET( 7898, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, 506),
+ NAME_FUNC_OFFSET( 7920, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, 507),
+ NAME_FUNC_OFFSET( 7942, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, 508),
+ NAME_FUNC_OFFSET( 7964, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, 509),
+ NAME_FUNC_OFFSET( 7989, glBindBufferARB, glBindBufferARB, NULL, 510),
+ NAME_FUNC_OFFSET( 8005, glBufferDataARB, glBufferDataARB, NULL, 511),
+ NAME_FUNC_OFFSET( 8021, glBufferSubDataARB, glBufferSubDataARB, NULL, 512),
+ NAME_FUNC_OFFSET( 8040, glDeleteBuffersARB, glDeleteBuffersARB, NULL, 513),
+ NAME_FUNC_OFFSET( 8059, glGenBuffersARB, glGenBuffersARB, NULL, 514),
+ NAME_FUNC_OFFSET( 8075, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, 515),
+ NAME_FUNC_OFFSET( 8101, glGetBufferPointervARB, glGetBufferPointervARB, NULL, 516),
+ NAME_FUNC_OFFSET( 8124, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, 517),
+ NAME_FUNC_OFFSET( 8146, glIsBufferARB, glIsBufferARB, NULL, 518),
+ NAME_FUNC_OFFSET( 8160, glMapBufferARB, glMapBufferARB, NULL, 519),
+ NAME_FUNC_OFFSET( 8175, glUnmapBufferARB, glUnmapBufferARB, NULL, 520),
+ NAME_FUNC_OFFSET( 8192, glBeginQueryARB, glBeginQueryARB, NULL, 521),
+ NAME_FUNC_OFFSET( 8208, glDeleteQueriesARB, glDeleteQueriesARB, NULL, 522),
+ NAME_FUNC_OFFSET( 8227, glEndQueryARB, glEndQueryARB, NULL, 523),
+ NAME_FUNC_OFFSET( 8241, glGenQueriesARB, glGenQueriesARB, NULL, 524),
+ NAME_FUNC_OFFSET( 8257, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, 525),
+ NAME_FUNC_OFFSET( 8279, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, 526),
+ NAME_FUNC_OFFSET( 8302, glGetQueryivARB, glGetQueryivARB, NULL, 527),
+ NAME_FUNC_OFFSET( 8318, glIsQueryARB, glIsQueryARB, NULL, 528),
+ NAME_FUNC_OFFSET( 8331, glAttachObjectARB, glAttachObjectARB, NULL, 529),
+ NAME_FUNC_OFFSET( 8349, glCompileShaderARB, glCompileShaderARB, NULL, 530),
+ NAME_FUNC_OFFSET( 8368, glCreateProgramObjectARB, glCreateProgramObjectARB, NULL, 531),
+ NAME_FUNC_OFFSET( 8393, glCreateShaderObjectARB, glCreateShaderObjectARB, NULL, 532),
+ NAME_FUNC_OFFSET( 8417, glDeleteObjectARB, glDeleteObjectARB, NULL, 533),
+ NAME_FUNC_OFFSET( 8435, glDetachObjectARB, glDetachObjectARB, NULL, 534),
+ NAME_FUNC_OFFSET( 8453, glGetActiveUniformARB, glGetActiveUniformARB, NULL, 535),
+ NAME_FUNC_OFFSET( 8475, glGetAttachedObjectsARB, glGetAttachedObjectsARB, NULL, 536),
+ NAME_FUNC_OFFSET( 8499, glGetHandleARB, glGetHandleARB, NULL, 537),
+ NAME_FUNC_OFFSET( 8514, glGetInfoLogARB, glGetInfoLogARB, NULL, 538),
+ NAME_FUNC_OFFSET( 8530, glGetObjectParameterfvARB, glGetObjectParameterfvARB, NULL, 539),
+ NAME_FUNC_OFFSET( 8556, glGetObjectParameterivARB, glGetObjectParameterivARB, NULL, 540),
+ NAME_FUNC_OFFSET( 8582, glGetShaderSourceARB, glGetShaderSourceARB, NULL, 541),
+ NAME_FUNC_OFFSET( 8603, glGetUniformLocationARB, glGetUniformLocationARB, NULL, 542),
+ NAME_FUNC_OFFSET( 8627, glGetUniformfvARB, glGetUniformfvARB, NULL, 543),
+ NAME_FUNC_OFFSET( 8645, glGetUniformivARB, glGetUniformivARB, NULL, 544),
+ NAME_FUNC_OFFSET( 8663, glLinkProgramARB, glLinkProgramARB, NULL, 545),
+ NAME_FUNC_OFFSET( 8680, glShaderSourceARB, glShaderSourceARB, NULL, 546),
+ NAME_FUNC_OFFSET( 8698, glUniform1fARB, glUniform1fARB, NULL, 547),
+ NAME_FUNC_OFFSET( 8713, glUniform1fvARB, glUniform1fvARB, NULL, 548),
+ NAME_FUNC_OFFSET( 8729, glUniform1iARB, glUniform1iARB, NULL, 549),
+ NAME_FUNC_OFFSET( 8744, glUniform1ivARB, glUniform1ivARB, NULL, 550),
+ NAME_FUNC_OFFSET( 8760, glUniform2fARB, glUniform2fARB, NULL, 551),
+ NAME_FUNC_OFFSET( 8775, glUniform2fvARB, glUniform2fvARB, NULL, 552),
+ NAME_FUNC_OFFSET( 8791, glUniform2iARB, glUniform2iARB, NULL, 553),
+ NAME_FUNC_OFFSET( 8806, glUniform2ivARB, glUniform2ivARB, NULL, 554),
+ NAME_FUNC_OFFSET( 8822, glUniform3fARB, glUniform3fARB, NULL, 555),
+ NAME_FUNC_OFFSET( 8837, glUniform3fvARB, glUniform3fvARB, NULL, 556),
+ NAME_FUNC_OFFSET( 8853, glUniform3iARB, glUniform3iARB, NULL, 557),
+ NAME_FUNC_OFFSET( 8868, glUniform3ivARB, glUniform3ivARB, NULL, 558),
+ NAME_FUNC_OFFSET( 8884, glUniform4fARB, glUniform4fARB, NULL, 559),
+ NAME_FUNC_OFFSET( 8899, glUniform4fvARB, glUniform4fvARB, NULL, 560),
+ NAME_FUNC_OFFSET( 8915, glUniform4iARB, glUniform4iARB, NULL, 561),
+ NAME_FUNC_OFFSET( 8930, glUniform4ivARB, glUniform4ivARB, NULL, 562),
+ NAME_FUNC_OFFSET( 8946, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, 563),
+ NAME_FUNC_OFFSET( 8968, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, 564),
+ NAME_FUNC_OFFSET( 8990, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, 565),
+ NAME_FUNC_OFFSET( 9012, glUseProgramObjectARB, glUseProgramObjectARB, NULL, 566),
+ NAME_FUNC_OFFSET( 9034, glValidateProgramARB, glValidateProgramARB, NULL, 567),
+ NAME_FUNC_OFFSET( 9055, glBindAttribLocationARB, glBindAttribLocationARB, NULL, 568),
+ NAME_FUNC_OFFSET( 9079, glGetActiveAttribARB, glGetActiveAttribARB, NULL, 569),
+ NAME_FUNC_OFFSET( 9100, glGetAttribLocationARB, glGetAttribLocationARB, NULL, 570),
+ NAME_FUNC_OFFSET( 9123, glDrawBuffersARB, glDrawBuffersARB, NULL, 571),
+ NAME_FUNC_OFFSET( 9140, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 572),
+ NAME_FUNC_OFFSET( 9165, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 573),
+ NAME_FUNC_OFFSET( 9192, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, 574),
+ NAME_FUNC_OFFSET( 9225, glFramebufferTextureARB, glFramebufferTextureARB, NULL, 575),
+ NAME_FUNC_OFFSET( 9249, glFramebufferTextureFaceARB, glFramebufferTextureFaceARB, NULL, 576),
+ NAME_FUNC_OFFSET( 9277, glProgramParameteriARB, glProgramParameteriARB, NULL, 577),
+ NAME_FUNC_OFFSET( 9300, glVertexAttribDivisorARB, glVertexAttribDivisorARB, NULL, 578),
+ NAME_FUNC_OFFSET( 9325, glFlushMappedBufferRange, glFlushMappedBufferRange, NULL, 579),
+ NAME_FUNC_OFFSET( 9350, glMapBufferRange, glMapBufferRange, NULL, 580),
+ NAME_FUNC_OFFSET( 9367, glBindVertexArray, glBindVertexArray, NULL, 581),
+ NAME_FUNC_OFFSET( 9385, glGenVertexArrays, glGenVertexArrays, NULL, 582),
+ NAME_FUNC_OFFSET( 9403, glCopyBufferSubData, glCopyBufferSubData, NULL, 583),
+ NAME_FUNC_OFFSET( 9423, glClientWaitSync, glClientWaitSync, NULL, 584),
+ NAME_FUNC_OFFSET( 9440, glDeleteSync, glDeleteSync, NULL, 585),
+ NAME_FUNC_OFFSET( 9453, glFenceSync, glFenceSync, NULL, 586),
+ NAME_FUNC_OFFSET( 9465, glGetInteger64v, glGetInteger64v, NULL, 587),
+ NAME_FUNC_OFFSET( 9481, glGetSynciv, glGetSynciv, NULL, 588),
+ NAME_FUNC_OFFSET( 9493, glIsSync, glIsSync, NULL, 589),
+ NAME_FUNC_OFFSET( 9502, glWaitSync, glWaitSync, NULL, 590),
+ NAME_FUNC_OFFSET( 9513, glDrawElementsBaseVertex, glDrawElementsBaseVertex, NULL, 591),
+ NAME_FUNC_OFFSET( 9538, glDrawRangeElementsBaseVertex, glDrawRangeElementsBaseVertex, NULL, 592),
+ NAME_FUNC_OFFSET( 9568, glMultiDrawElementsBaseVertex, glMultiDrawElementsBaseVertex, NULL, 593),
+ NAME_FUNC_OFFSET( 9598, glBlendEquationSeparateiARB, glBlendEquationSeparateiARB, NULL, 594),
+ NAME_FUNC_OFFSET( 9626, glBlendEquationiARB, glBlendEquationiARB, NULL, 595),
+ NAME_FUNC_OFFSET( 9646, glBlendFuncSeparateiARB, glBlendFuncSeparateiARB, NULL, 596),
+ NAME_FUNC_OFFSET( 9670, glBlendFunciARB, glBlendFunciARB, NULL, 597),
+ NAME_FUNC_OFFSET( 9686, glBindTransformFeedback, glBindTransformFeedback, NULL, 598),
+ NAME_FUNC_OFFSET( 9710, glDeleteTransformFeedbacks, glDeleteTransformFeedbacks, NULL, 599),
+ NAME_FUNC_OFFSET( 9737, glDrawTransformFeedback, glDrawTransformFeedback, NULL, 600),
+ NAME_FUNC_OFFSET( 9761, glGenTransformFeedbacks, glGenTransformFeedbacks, NULL, 601),
+ NAME_FUNC_OFFSET( 9785, glIsTransformFeedback, glIsTransformFeedback, NULL, 602),
+ NAME_FUNC_OFFSET( 9807, glPauseTransformFeedback, glPauseTransformFeedback, NULL, 603),
+ NAME_FUNC_OFFSET( 9832, glResumeTransformFeedback, glResumeTransformFeedback, NULL, 604),
+ NAME_FUNC_OFFSET( 9858, glClearDepthf, glClearDepthf, NULL, 605),
+ NAME_FUNC_OFFSET( 9872, glDepthRangef, glDepthRangef, NULL, 606),
+ NAME_FUNC_OFFSET( 9886, glGetShaderPrecisionFormat, glGetShaderPrecisionFormat, NULL, 607),
+ NAME_FUNC_OFFSET( 9913, glReleaseShaderCompiler, glReleaseShaderCompiler, NULL, 608),
+ NAME_FUNC_OFFSET( 9937, glShaderBinary, glShaderBinary, NULL, 609),
+ NAME_FUNC_OFFSET( 9952, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, 610),
+ NAME_FUNC_OFFSET( 9971, gl_dispatch_stub_611, gl_dispatch_stub_611, NULL, 611),
+ NAME_FUNC_OFFSET(10003, gl_dispatch_stub_612, gl_dispatch_stub_612, NULL, 612),
+ NAME_FUNC_OFFSET(10035, gl_dispatch_stub_613, gl_dispatch_stub_613, NULL, 613),
+ NAME_FUNC_OFFSET(10063, gl_dispatch_stub_614, gl_dispatch_stub_614, NULL, 614),
+ NAME_FUNC_OFFSET(10092, gl_dispatch_stub_615, gl_dispatch_stub_615, NULL, 615),
+ NAME_FUNC_OFFSET(10120, gl_dispatch_stub_616, gl_dispatch_stub_616, NULL, 616),
+ NAME_FUNC_OFFSET(10149, gl_dispatch_stub_617, gl_dispatch_stub_617, NULL, 617),
+ NAME_FUNC_OFFSET(10166, gl_dispatch_stub_618, gl_dispatch_stub_618, NULL, 618),
+ NAME_FUNC_OFFSET(10186, glColorPointerEXT, glColorPointerEXT, NULL, 619),
+ NAME_FUNC_OFFSET(10204, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, 620),
+ NAME_FUNC_OFFSET(10225, glIndexPointerEXT, glIndexPointerEXT, NULL, 621),
+ NAME_FUNC_OFFSET(10243, glNormalPointerEXT, glNormalPointerEXT, NULL, 622),
+ NAME_FUNC_OFFSET(10262, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, 623),
+ NAME_FUNC_OFFSET(10283, glVertexPointerEXT, glVertexPointerEXT, NULL, 624),
+ NAME_FUNC_OFFSET(10302, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
+ NAME_FUNC_OFFSET(10323, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 626),
+ NAME_FUNC_OFFSET(10345, glLockArraysEXT, glLockArraysEXT, NULL, 627),
+ NAME_FUNC_OFFSET(10361, glUnlockArraysEXT, glUnlockArraysEXT, NULL, 628),
+ NAME_FUNC_OFFSET(10379, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, 629),
+ NAME_FUNC_OFFSET(10401, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, 630),
+ NAME_FUNC_OFFSET(10424, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, 631),
+ NAME_FUNC_OFFSET(10446, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, 632),
+ NAME_FUNC_OFFSET(10469, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, 633),
+ NAME_FUNC_OFFSET(10491, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, 634),
+ NAME_FUNC_OFFSET(10514, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, 635),
+ NAME_FUNC_OFFSET(10536, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, 636),
+ NAME_FUNC_OFFSET(10559, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, 637),
+ NAME_FUNC_OFFSET(10581, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, 638),
+ NAME_FUNC_OFFSET(10604, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, 639),
+ NAME_FUNC_OFFSET(10627, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, 640),
+ NAME_FUNC_OFFSET(10651, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, 641),
+ NAME_FUNC_OFFSET(10674, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, 642),
+ NAME_FUNC_OFFSET(10698, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, 643),
+ NAME_FUNC_OFFSET(10721, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, 644),
+ NAME_FUNC_OFFSET(10745, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, 645),
+ NAME_FUNC_OFFSET(10772, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 646),
+ NAME_FUNC_OFFSET(10793, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 647),
+ NAME_FUNC_OFFSET(10816, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, 648),
+ NAME_FUNC_OFFSET(10837, glFogCoorddEXT, glFogCoorddEXT, NULL, 649),
+ NAME_FUNC_OFFSET(10852, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 650),
+ NAME_FUNC_OFFSET(10868, glFogCoordfEXT, glFogCoordfEXT, NULL, 651),
+ NAME_FUNC_OFFSET(10883, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 652),
+ NAME_FUNC_OFFSET(10899, gl_dispatch_stub_653, gl_dispatch_stub_653, NULL, 653),
+ NAME_FUNC_OFFSET(10917, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 654),
+ NAME_FUNC_OFFSET(10940, glFlushVertexArrayRangeNV, glFlushVertexArrayRangeNV, NULL, 655),
+ NAME_FUNC_OFFSET(10966, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, 656),
+ NAME_FUNC_OFFSET(10987, glCombinerInputNV, glCombinerInputNV, NULL, 657),
+ NAME_FUNC_OFFSET(11005, glCombinerOutputNV, glCombinerOutputNV, NULL, 658),
+ NAME_FUNC_OFFSET(11024, glCombinerParameterfNV, glCombinerParameterfNV, NULL, 659),
+ NAME_FUNC_OFFSET(11047, glCombinerParameterfvNV, glCombinerParameterfvNV, NULL, 660),
+ NAME_FUNC_OFFSET(11071, glCombinerParameteriNV, glCombinerParameteriNV, NULL, 661),
+ NAME_FUNC_OFFSET(11094, glCombinerParameterivNV, glCombinerParameterivNV, NULL, 662),
+ NAME_FUNC_OFFSET(11118, glFinalCombinerInputNV, glFinalCombinerInputNV, NULL, 663),
+ NAME_FUNC_OFFSET(11141, glGetCombinerInputParameterfvNV, glGetCombinerInputParameterfvNV, NULL, 664),
+ NAME_FUNC_OFFSET(11173, glGetCombinerInputParameterivNV, glGetCombinerInputParameterivNV, NULL, 665),
+ NAME_FUNC_OFFSET(11205, glGetCombinerOutputParameterfvNV, glGetCombinerOutputParameterfvNV, NULL, 666),
+ NAME_FUNC_OFFSET(11238, glGetCombinerOutputParameterivNV, glGetCombinerOutputParameterivNV, NULL, 667),
+ NAME_FUNC_OFFSET(11271, glGetFinalCombinerInputParameterfvNV, glGetFinalCombinerInputParameterfvNV, NULL, 668),
+ NAME_FUNC_OFFSET(11308, glGetFinalCombinerInputParameterivNV, glGetFinalCombinerInputParameterivNV, NULL, 669),
+ NAME_FUNC_OFFSET(11345, glResizeBuffersMESA, glResizeBuffersMESA, NULL, 670),
+ NAME_FUNC_OFFSET(11365, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 671),
+ NAME_FUNC_OFFSET(11383, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 672),
+ NAME_FUNC_OFFSET(11402, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 673),
+ NAME_FUNC_OFFSET(11420, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 674),
+ NAME_FUNC_OFFSET(11439, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 675),
+ NAME_FUNC_OFFSET(11457, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 676),
+ NAME_FUNC_OFFSET(11476, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 677),
+ NAME_FUNC_OFFSET(11494, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 678),
+ NAME_FUNC_OFFSET(11513, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 679),
+ NAME_FUNC_OFFSET(11531, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 680),
+ NAME_FUNC_OFFSET(11550, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 681),
+ NAME_FUNC_OFFSET(11568, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 682),
+ NAME_FUNC_OFFSET(11587, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 683),
+ NAME_FUNC_OFFSET(11605, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 684),
+ NAME_FUNC_OFFSET(11624, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 685),
+ NAME_FUNC_OFFSET(11642, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 686),
+ NAME_FUNC_OFFSET(11661, glWindowPos4dMESA, glWindowPos4dMESA, NULL, 687),
+ NAME_FUNC_OFFSET(11679, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, 688),
+ NAME_FUNC_OFFSET(11698, glWindowPos4fMESA, glWindowPos4fMESA, NULL, 689),
+ NAME_FUNC_OFFSET(11716, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, 690),
+ NAME_FUNC_OFFSET(11735, glWindowPos4iMESA, glWindowPos4iMESA, NULL, 691),
+ NAME_FUNC_OFFSET(11753, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, 692),
+ NAME_FUNC_OFFSET(11772, glWindowPos4sMESA, glWindowPos4sMESA, NULL, 693),
+ NAME_FUNC_OFFSET(11790, glWindowPos4svMESA, glWindowPos4svMESA, NULL, 694),
+ NAME_FUNC_OFFSET(11809, gl_dispatch_stub_695, gl_dispatch_stub_695, NULL, 695),
+ NAME_FUNC_OFFSET(11834, gl_dispatch_stub_696, gl_dispatch_stub_696, NULL, 696),
+ NAME_FUNC_OFFSET(11861, gl_dispatch_stub_697, gl_dispatch_stub_697, NULL, 697),
+ NAME_FUNC_OFFSET(11878, gl_dispatch_stub_698, gl_dispatch_stub_698, NULL, 698),
+ NAME_FUNC_OFFSET(11894, gl_dispatch_stub_699, gl_dispatch_stub_699, NULL, 699),
+ NAME_FUNC_OFFSET(11908, gl_dispatch_stub_700, gl_dispatch_stub_700, NULL, 700),
+ NAME_FUNC_OFFSET(11923, gl_dispatch_stub_701, gl_dispatch_stub_701, NULL, 701),
+ NAME_FUNC_OFFSET(11935, gl_dispatch_stub_702, gl_dispatch_stub_702, NULL, 702),
+ NAME_FUNC_OFFSET(11948, gl_dispatch_stub_703, gl_dispatch_stub_703, NULL, 703),
+ NAME_FUNC_OFFSET(11962, glAreProgramsResidentNV, glAreProgramsResidentNV, NULL, 704),
+ NAME_FUNC_OFFSET(11986, glBindProgramNV, glBindProgramNV, NULL, 705),
+ NAME_FUNC_OFFSET(12002, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 706),
+ NAME_FUNC_OFFSET(12021, glExecuteProgramNV, glExecuteProgramNV, NULL, 707),
+ NAME_FUNC_OFFSET(12040, glGenProgramsNV, glGenProgramsNV, NULL, 708),
+ NAME_FUNC_OFFSET(12056, glGetProgramParameterdvNV, glGetProgramParameterdvNV, NULL, 709),
+ NAME_FUNC_OFFSET(12082, glGetProgramParameterfvNV, glGetProgramParameterfvNV, NULL, 710),
+ NAME_FUNC_OFFSET(12108, glGetProgramStringNV, glGetProgramStringNV, NULL, 711),
+ NAME_FUNC_OFFSET(12129, glGetProgramivNV, glGetProgramivNV, NULL, 712),
+ NAME_FUNC_OFFSET(12146, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, 713),
+ NAME_FUNC_OFFSET(12167, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 714),
+ NAME_FUNC_OFFSET(12195, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, 715),
+ NAME_FUNC_OFFSET(12217, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, 716),
+ NAME_FUNC_OFFSET(12239, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, 717),
+ NAME_FUNC_OFFSET(12261, glIsProgramNV, glIsProgramNV, NULL, 718),
+ NAME_FUNC_OFFSET(12275, glLoadProgramNV, glLoadProgramNV, NULL, 719),
+ NAME_FUNC_OFFSET(12291, glProgramParameters4dvNV, glProgramParameters4dvNV, NULL, 720),
+ NAME_FUNC_OFFSET(12316, glProgramParameters4fvNV, glProgramParameters4fvNV, NULL, 721),
+ NAME_FUNC_OFFSET(12341, glRequestResidentProgramsNV, glRequestResidentProgramsNV, NULL, 722),
+ NAME_FUNC_OFFSET(12369, glTrackMatrixNV, glTrackMatrixNV, NULL, 723),
+ NAME_FUNC_OFFSET(12385, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, 724),
+ NAME_FUNC_OFFSET(12404, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, 725),
+ NAME_FUNC_OFFSET(12424, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, 726),
+ NAME_FUNC_OFFSET(12443, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, 727),
+ NAME_FUNC_OFFSET(12463, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, 728),
+ NAME_FUNC_OFFSET(12482, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, 729),
+ NAME_FUNC_OFFSET(12502, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, 730),
+ NAME_FUNC_OFFSET(12521, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, 731),
+ NAME_FUNC_OFFSET(12541, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, 732),
+ NAME_FUNC_OFFSET(12560, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, 733),
+ NAME_FUNC_OFFSET(12580, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, 734),
+ NAME_FUNC_OFFSET(12599, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, 735),
+ NAME_FUNC_OFFSET(12619, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, 736),
+ NAME_FUNC_OFFSET(12638, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, 737),
+ NAME_FUNC_OFFSET(12658, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, 738),
+ NAME_FUNC_OFFSET(12677, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, 739),
+ NAME_FUNC_OFFSET(12697, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, 740),
+ NAME_FUNC_OFFSET(12716, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, 741),
+ NAME_FUNC_OFFSET(12736, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, 742),
+ NAME_FUNC_OFFSET(12755, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, 743),
+ NAME_FUNC_OFFSET(12775, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, 744),
+ NAME_FUNC_OFFSET(12794, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, 745),
+ NAME_FUNC_OFFSET(12814, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, 746),
+ NAME_FUNC_OFFSET(12833, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, 747),
+ NAME_FUNC_OFFSET(12853, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, 748),
+ NAME_FUNC_OFFSET(12873, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, 749),
+ NAME_FUNC_OFFSET(12894, glVertexAttribPointerNV, glVertexAttribPointerNV, NULL, 750),
+ NAME_FUNC_OFFSET(12918, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, 751),
+ NAME_FUNC_OFFSET(12939, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, 752),
+ NAME_FUNC_OFFSET(12960, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, 753),
+ NAME_FUNC_OFFSET(12981, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, 754),
+ NAME_FUNC_OFFSET(13002, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, 755),
+ NAME_FUNC_OFFSET(13023, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, 756),
+ NAME_FUNC_OFFSET(13044, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, 757),
+ NAME_FUNC_OFFSET(13065, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, 758),
+ NAME_FUNC_OFFSET(13086, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, 759),
+ NAME_FUNC_OFFSET(13107, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, 760),
+ NAME_FUNC_OFFSET(13128, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, 761),
+ NAME_FUNC_OFFSET(13149, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, 762),
+ NAME_FUNC_OFFSET(13170, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, 763),
+ NAME_FUNC_OFFSET(13192, glGetTexBumpParameterfvATI, glGetTexBumpParameterfvATI, NULL, 764),
+ NAME_FUNC_OFFSET(13219, glGetTexBumpParameterivATI, glGetTexBumpParameterivATI, NULL, 765),
+ NAME_FUNC_OFFSET(13246, glTexBumpParameterfvATI, glTexBumpParameterfvATI, NULL, 766),
+ NAME_FUNC_OFFSET(13270, glTexBumpParameterivATI, glTexBumpParameterivATI, NULL, 767),
+ NAME_FUNC_OFFSET(13294, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, 768),
+ NAME_FUNC_OFFSET(13316, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, 769),
+ NAME_FUNC_OFFSET(13338, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, 770),
+ NAME_FUNC_OFFSET(13360, glBeginFragmentShaderATI, glBeginFragmentShaderATI, NULL, 771),
+ NAME_FUNC_OFFSET(13385, glBindFragmentShaderATI, glBindFragmentShaderATI, NULL, 772),
+ NAME_FUNC_OFFSET(13409, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, 773),
+ NAME_FUNC_OFFSET(13431, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, 774),
+ NAME_FUNC_OFFSET(13453, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, 775),
+ NAME_FUNC_OFFSET(13475, glDeleteFragmentShaderATI, glDeleteFragmentShaderATI, NULL, 776),
+ NAME_FUNC_OFFSET(13501, glEndFragmentShaderATI, glEndFragmentShaderATI, NULL, 777),
+ NAME_FUNC_OFFSET(13524, glGenFragmentShadersATI, glGenFragmentShadersATI, NULL, 778),
+ NAME_FUNC_OFFSET(13548, glPassTexCoordATI, glPassTexCoordATI, NULL, 779),
+ NAME_FUNC_OFFSET(13566, glSampleMapATI, glSampleMapATI, NULL, 780),
+ NAME_FUNC_OFFSET(13581, glSetFragmentShaderConstantATI, glSetFragmentShaderConstantATI, NULL, 781),
+ NAME_FUNC_OFFSET(13612, glPointParameteriNV, glPointParameteriNV, NULL, 782),
+ NAME_FUNC_OFFSET(13632, glPointParameterivNV, glPointParameterivNV, NULL, 783),
+ NAME_FUNC_OFFSET(13653, gl_dispatch_stub_784, gl_dispatch_stub_784, NULL, 784),
+ NAME_FUNC_OFFSET(13676, gl_dispatch_stub_785, gl_dispatch_stub_785, NULL, 785),
+ NAME_FUNC_OFFSET(13699, gl_dispatch_stub_786, gl_dispatch_stub_786, NULL, 786),
+ NAME_FUNC_OFFSET(13725, gl_dispatch_stub_787, gl_dispatch_stub_787, NULL, 787),
+ NAME_FUNC_OFFSET(13748, gl_dispatch_stub_788, gl_dispatch_stub_788, NULL, 788),
+ NAME_FUNC_OFFSET(13769, glGetProgramNamedParameterdvNV, glGetProgramNamedParameterdvNV, NULL, 789),
+ NAME_FUNC_OFFSET(13800, glGetProgramNamedParameterfvNV, glGetProgramNamedParameterfvNV, NULL, 790),
+ NAME_FUNC_OFFSET(13831, glProgramNamedParameter4dNV, glProgramNamedParameter4dNV, NULL, 791),
+ NAME_FUNC_OFFSET(13859, glProgramNamedParameter4dvNV, glProgramNamedParameter4dvNV, NULL, 792),
+ NAME_FUNC_OFFSET(13888, glProgramNamedParameter4fNV, glProgramNamedParameter4fNV, NULL, 793),
+ NAME_FUNC_OFFSET(13916, glProgramNamedParameter4fvNV, glProgramNamedParameter4fvNV, NULL, 794),
+ NAME_FUNC_OFFSET(13945, glPrimitiveRestartIndexNV, glPrimitiveRestartIndexNV, NULL, 795),
+ NAME_FUNC_OFFSET(13971, glPrimitiveRestartNV, glPrimitiveRestartNV, NULL, 796),
+ NAME_FUNC_OFFSET(13992, gl_dispatch_stub_797, gl_dispatch_stub_797, NULL, 797),
+ NAME_FUNC_OFFSET(14009, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, 798),
+ NAME_FUNC_OFFSET(14036, glBindFramebufferEXT, glBindFramebufferEXT, NULL, 799),
+ NAME_FUNC_OFFSET(14057, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, 800),
+ NAME_FUNC_OFFSET(14079, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, 801),
+ NAME_FUNC_OFFSET(14107, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, 802),
+ NAME_FUNC_OFFSET(14131, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, 803),
+ NAME_FUNC_OFFSET(14156, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, 804),
+ NAME_FUNC_OFFSET(14185, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, 805),
+ NAME_FUNC_OFFSET(14211, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, 806),
+ NAME_FUNC_OFFSET(14237, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, 807),
+ NAME_FUNC_OFFSET(14263, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, 808),
+ NAME_FUNC_OFFSET(14284, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, 809),
+ NAME_FUNC_OFFSET(14306, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, 810),
+ NAME_FUNC_OFFSET(14326, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, 811),
+ NAME_FUNC_OFFSET(14367, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, 812),
+ NAME_FUNC_OFFSET(14399, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 813),
+ NAME_FUNC_OFFSET(14418, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, 814),
+ NAME_FUNC_OFFSET(14438, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, 815),
+ NAME_FUNC_OFFSET(14463, gl_dispatch_stub_816, gl_dispatch_stub_816, NULL, 816),
+ NAME_FUNC_OFFSET(14484, gl_dispatch_stub_817, gl_dispatch_stub_817, NULL, 817),
+ NAME_FUNC_OFFSET(14508, gl_dispatch_stub_818, gl_dispatch_stub_818, NULL, 818),
+ NAME_FUNC_OFFSET(14538, glBindFragDataLocationEXT, glBindFragDataLocationEXT, NULL, 819),
+ NAME_FUNC_OFFSET(14564, glGetFragDataLocationEXT, glGetFragDataLocationEXT, NULL, 820),
+ NAME_FUNC_OFFSET(14589, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 821),
+ NAME_FUNC_OFFSET(14608, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, NULL, 822),
+ NAME_FUNC_OFFSET(14632, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, NULL, 823),
+ NAME_FUNC_OFFSET(14657, glUniform1uiEXT, glUniform1uiEXT, NULL, 824),
+ NAME_FUNC_OFFSET(14673, glUniform1uivEXT, glUniform1uivEXT, NULL, 825),
+ NAME_FUNC_OFFSET(14690, glUniform2uiEXT, glUniform2uiEXT, NULL, 826),
+ NAME_FUNC_OFFSET(14706, glUniform2uivEXT, glUniform2uivEXT, NULL, 827),
+ NAME_FUNC_OFFSET(14723, glUniform3uiEXT, glUniform3uiEXT, NULL, 828),
+ NAME_FUNC_OFFSET(14739, glUniform3uivEXT, glUniform3uivEXT, NULL, 829),
+ NAME_FUNC_OFFSET(14756, glUniform4uiEXT, glUniform4uiEXT, NULL, 830),
+ NAME_FUNC_OFFSET(14772, glUniform4uivEXT, glUniform4uivEXT, NULL, 831),
+ NAME_FUNC_OFFSET(14789, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, 832),
+ NAME_FUNC_OFFSET(14810, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, 833),
+ NAME_FUNC_OFFSET(14832, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, 834),
+ NAME_FUNC_OFFSET(14854, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, NULL, 835),
+ NAME_FUNC_OFFSET(14877, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, 836),
+ NAME_FUNC_OFFSET(14898, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, 837),
+ NAME_FUNC_OFFSET(14920, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, 838),
+ NAME_FUNC_OFFSET(14942, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, NULL, 839),
+ NAME_FUNC_OFFSET(14965, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, 840),
+ NAME_FUNC_OFFSET(14986, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, 841),
+ NAME_FUNC_OFFSET(15008, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, 842),
+ NAME_FUNC_OFFSET(15030, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, NULL, 843),
+ NAME_FUNC_OFFSET(15053, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, 844),
+ NAME_FUNC_OFFSET(15075, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, 845),
+ NAME_FUNC_OFFSET(15096, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, 846),
+ NAME_FUNC_OFFSET(15118, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, 847),
+ NAME_FUNC_OFFSET(15140, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, NULL, 848),
+ NAME_FUNC_OFFSET(15163, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, 849),
+ NAME_FUNC_OFFSET(15185, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, NULL, 850),
+ NAME_FUNC_OFFSET(15208, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, NULL, 851),
+ NAME_FUNC_OFFSET(15231, glVertexAttribIPointerEXT, glVertexAttribIPointerEXT, NULL, 852),
+ NAME_FUNC_OFFSET(15257, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, 853),
+ NAME_FUNC_OFFSET(15286, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, 854),
+ NAME_FUNC_OFFSET(15308, glDisableIndexedEXT, glDisableIndexedEXT, NULL, 855),
+ NAME_FUNC_OFFSET(15328, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 856),
+ NAME_FUNC_OFFSET(15347, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, 857),
+ NAME_FUNC_OFFSET(15371, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, 858),
+ NAME_FUNC_OFFSET(15395, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, 859),
+ NAME_FUNC_OFFSET(15417, glClearColorIiEXT, glClearColorIiEXT, NULL, 860),
+ NAME_FUNC_OFFSET(15435, glClearColorIuiEXT, glClearColorIuiEXT, NULL, 861),
+ NAME_FUNC_OFFSET(15454, glGetTexParameterIivEXT, glGetTexParameterIivEXT, NULL, 862),
+ NAME_FUNC_OFFSET(15478, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, NULL, 863),
+ NAME_FUNC_OFFSET(15503, glTexParameterIivEXT, glTexParameterIivEXT, NULL, 864),
+ NAME_FUNC_OFFSET(15524, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, 865),
+ NAME_FUNC_OFFSET(15546, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, 866),
+ NAME_FUNC_OFFSET(15573, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, 867),
+ NAME_FUNC_OFFSET(15598, glBeginTransformFeedbackEXT, glBeginTransformFeedbackEXT, NULL, 868),
+ NAME_FUNC_OFFSET(15626, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, 869),
+ NAME_FUNC_OFFSET(15646, glBindBufferOffsetEXT, glBindBufferOffsetEXT, NULL, 870),
+ NAME_FUNC_OFFSET(15668, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, 871),
+ NAME_FUNC_OFFSET(15689, glEndTransformFeedbackEXT, glEndTransformFeedbackEXT, NULL, 872),
+ NAME_FUNC_OFFSET(15715, glGetTransformFeedbackVaryingEXT, glGetTransformFeedbackVaryingEXT, NULL, 873),
+ NAME_FUNC_OFFSET(15748, glTransformFeedbackVaryingsEXT, glTransformFeedbackVaryingsEXT, NULL, 874),
+ NAME_FUNC_OFFSET(15779, glProvokingVertexEXT, glProvokingVertexEXT, NULL, 875),
+ NAME_FUNC_OFFSET(15800, gl_dispatch_stub_876, gl_dispatch_stub_876, NULL, 876),
+ NAME_FUNC_OFFSET(15831, gl_dispatch_stub_877, gl_dispatch_stub_877, NULL, 877),
+ NAME_FUNC_OFFSET(15851, glGetObjectParameterivAPPLE, glGetObjectParameterivAPPLE, NULL, 878),
+ NAME_FUNC_OFFSET(15879, glObjectPurgeableAPPLE, glObjectPurgeableAPPLE, NULL, 879),
+ NAME_FUNC_OFFSET(15902, glObjectUnpurgeableAPPLE, glObjectUnpurgeableAPPLE, NULL, 880),
+ NAME_FUNC_OFFSET(15927, glActiveProgramEXT, glActiveProgramEXT, NULL, 881),
+ NAME_FUNC_OFFSET(15946, glCreateShaderProgramEXT, glCreateShaderProgramEXT, NULL, 882),
+ NAME_FUNC_OFFSET(15971, glUseShaderProgramEXT, glUseShaderProgramEXT, NULL, 883),
+ NAME_FUNC_OFFSET(15993, glTextureBarrierNV, glTextureBarrierNV, NULL, 884),
+ NAME_FUNC_OFFSET(16012, gl_dispatch_stub_885, gl_dispatch_stub_885, NULL, 885),
+ NAME_FUNC_OFFSET(16037, gl_dispatch_stub_886, gl_dispatch_stub_886, NULL, 886),
+ NAME_FUNC_OFFSET(16066, gl_dispatch_stub_887, gl_dispatch_stub_887, NULL, 887),
+ NAME_FUNC_OFFSET(16097, gl_dispatch_stub_888, gl_dispatch_stub_888, NULL, 888),
+ NAME_FUNC_OFFSET(16121, gl_dispatch_stub_889, gl_dispatch_stub_889, NULL, 889),
+ NAME_FUNC_OFFSET(16146, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, 890),
+ NAME_FUNC_OFFSET(16185, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, 891),
+ NAME_FUNC_OFFSET(16214, glArrayElement, glArrayElement, NULL, 306),
+ NAME_FUNC_OFFSET(16232, glBindTexture, glBindTexture, NULL, 307),
+ NAME_FUNC_OFFSET(16249, glDrawArrays, glDrawArrays, NULL, 310),
+ NAME_FUNC_OFFSET(16265, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, 322),
+ NAME_FUNC_OFFSET(16290, glCopyTexImage1D, glCopyTexImage1D, NULL, 323),
+ NAME_FUNC_OFFSET(16310, glCopyTexImage2D, glCopyTexImage2D, NULL, 324),
+ NAME_FUNC_OFFSET(16330, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, 325),
+ NAME_FUNC_OFFSET(16353, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, 326),
+ NAME_FUNC_OFFSET(16376, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, 327),
+ NAME_FUNC_OFFSET(16396, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, 328),
+ NAME_FUNC_OFFSET(16413, glGetPointerv, glGetPointerv, NULL, 329),
+ NAME_FUNC_OFFSET(16430, glIsTexture, glIsTextureEXT, glIsTextureEXT, 330),
+ NAME_FUNC_OFFSET(16445, glPrioritizeTextures, glPrioritizeTextures, NULL, 331),
+ NAME_FUNC_OFFSET(16469, glTexSubImage1D, glTexSubImage1D, NULL, 332),
+ NAME_FUNC_OFFSET(16488, glTexSubImage2D, glTexSubImage2D, NULL, 333),
+ NAME_FUNC_OFFSET(16507, glBlendColor, glBlendColor, NULL, 336),
+ NAME_FUNC_OFFSET(16523, glBlendEquation, glBlendEquation, NULL, 337),
+ NAME_FUNC_OFFSET(16542, glDrawRangeElements, glDrawRangeElements, NULL, 338),
+ NAME_FUNC_OFFSET(16565, glColorTable, glColorTable, NULL, 339),
+ NAME_FUNC_OFFSET(16581, glColorTable, glColorTable, NULL, 339),
+ NAME_FUNC_OFFSET(16597, glColorTableParameterfv, glColorTableParameterfv, NULL, 340),
+ NAME_FUNC_OFFSET(16624, glColorTableParameteriv, glColorTableParameteriv, NULL, 341),
+ NAME_FUNC_OFFSET(16651, glCopyColorTable, glCopyColorTable, NULL, 342),
+ NAME_FUNC_OFFSET(16671, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, 343),
+ NAME_FUNC_OFFSET(16690, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, 343),
+ NAME_FUNC_OFFSET(16709, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, 344),
+ NAME_FUNC_OFFSET(16739, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, 344),
+ NAME_FUNC_OFFSET(16769, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, 345),
+ NAME_FUNC_OFFSET(16799, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, 345),
+ NAME_FUNC_OFFSET(16829, glColorSubTable, glColorSubTable, NULL, 346),
+ NAME_FUNC_OFFSET(16848, glCopyColorSubTable, glCopyColorSubTable, NULL, 347),
+ NAME_FUNC_OFFSET(16871, glConvolutionFilter1D, glConvolutionFilter1D, NULL, 348),
+ NAME_FUNC_OFFSET(16896, glConvolutionFilter2D, glConvolutionFilter2D, NULL, 349),
+ NAME_FUNC_OFFSET(16921, glConvolutionParameterf, glConvolutionParameterf, NULL, 350),
+ NAME_FUNC_OFFSET(16948, glConvolutionParameterfv, glConvolutionParameterfv, NULL, 351),
+ NAME_FUNC_OFFSET(16976, glConvolutionParameteri, glConvolutionParameteri, NULL, 352),
+ NAME_FUNC_OFFSET(17003, glConvolutionParameteriv, glConvolutionParameteriv, NULL, 353),
+ NAME_FUNC_OFFSET(17031, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, 354),
+ NAME_FUNC_OFFSET(17060, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, 355),
+ NAME_FUNC_OFFSET(17089, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, 356),
+ NAME_FUNC_OFFSET(17115, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, 357),
+ NAME_FUNC_OFFSET(17146, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, 358),
+ NAME_FUNC_OFFSET(17177, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, 359),
+ NAME_FUNC_OFFSET(17201, glSeparableFilter2D, glSeparableFilter2D, NULL, 360),
+ NAME_FUNC_OFFSET(17224, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, 361),
+ NAME_FUNC_OFFSET(17242, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, 362),
+ NAME_FUNC_OFFSET(17271, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, 363),
+ NAME_FUNC_OFFSET(17300, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, 364),
+ NAME_FUNC_OFFSET(17315, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, 365),
+ NAME_FUNC_OFFSET(17341, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, 366),
+ NAME_FUNC_OFFSET(17367, glHistogram, glHistogram, NULL, 367),
+ NAME_FUNC_OFFSET(17382, glMinmax, glMinmax, NULL, 368),
+ NAME_FUNC_OFFSET(17394, glResetHistogram, glResetHistogram, NULL, 369),
+ NAME_FUNC_OFFSET(17414, glResetMinmax, glResetMinmax, NULL, 370),
+ NAME_FUNC_OFFSET(17431, glTexImage3D, glTexImage3D, NULL, 371),
+ NAME_FUNC_OFFSET(17447, glTexSubImage3D, glTexSubImage3D, NULL, 372),
+ NAME_FUNC_OFFSET(17466, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, 373),
+ NAME_FUNC_OFFSET(17489, glActiveTextureARB, glActiveTextureARB, NULL, 374),
+ NAME_FUNC_OFFSET(17505, glClientActiveTextureARB, glClientActiveTextureARB, NULL, 375),
+ NAME_FUNC_OFFSET(17527, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, 376),
+ NAME_FUNC_OFFSET(17545, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, 377),
+ NAME_FUNC_OFFSET(17564, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, 378),
+ NAME_FUNC_OFFSET(17582, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, 379),
+ NAME_FUNC_OFFSET(17601, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, 380),
+ NAME_FUNC_OFFSET(17619, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, 381),
+ NAME_FUNC_OFFSET(17638, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, 382),
+ NAME_FUNC_OFFSET(17656, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, 383),
+ NAME_FUNC_OFFSET(17675, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, 384),
+ NAME_FUNC_OFFSET(17693, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, 385),
+ NAME_FUNC_OFFSET(17712, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, 386),
+ NAME_FUNC_OFFSET(17730, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, 387),
+ NAME_FUNC_OFFSET(17749, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, 388),
+ NAME_FUNC_OFFSET(17767, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, 389),
+ NAME_FUNC_OFFSET(17786, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, 390),
+ NAME_FUNC_OFFSET(17804, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, 391),
+ NAME_FUNC_OFFSET(17823, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, 392),
+ NAME_FUNC_OFFSET(17841, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, 393),
+ NAME_FUNC_OFFSET(17860, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, 394),
+ NAME_FUNC_OFFSET(17878, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, 395),
+ NAME_FUNC_OFFSET(17897, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, 396),
+ NAME_FUNC_OFFSET(17915, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, 397),
+ NAME_FUNC_OFFSET(17934, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, 398),
+ NAME_FUNC_OFFSET(17952, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, 399),
+ NAME_FUNC_OFFSET(17971, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, 400),
+ NAME_FUNC_OFFSET(17989, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, 401),
+ NAME_FUNC_OFFSET(18008, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, 402),
+ NAME_FUNC_OFFSET(18026, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, 403),
+ NAME_FUNC_OFFSET(18045, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, 404),
+ NAME_FUNC_OFFSET(18063, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, 405),
+ NAME_FUNC_OFFSET(18082, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, 406),
+ NAME_FUNC_OFFSET(18100, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, 407),
+ NAME_FUNC_OFFSET(18119, glStencilOpSeparate, glStencilOpSeparate, NULL, 423),
+ NAME_FUNC_OFFSET(18142, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, 441),
+ NAME_FUNC_OFFSET(18165, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, 442),
+ NAME_FUNC_OFFSET(18188, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, 443),
+ NAME_FUNC_OFFSET(18211, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, 444),
+ NAME_FUNC_OFFSET(18234, glSampleCoverageARB, glSampleCoverageARB, NULL, 445),
+ NAME_FUNC_OFFSET(18251, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, 446),
+ NAME_FUNC_OFFSET(18274, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, 447),
+ NAME_FUNC_OFFSET(18297, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, 448),
+ NAME_FUNC_OFFSET(18320, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, 449),
+ NAME_FUNC_OFFSET(18346, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, 450),
+ NAME_FUNC_OFFSET(18372, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, 451),
+ NAME_FUNC_OFFSET(18398, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, 452),
+ NAME_FUNC_OFFSET(18422, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, 453),
+ NAME_FUNC_OFFSET(18449, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, 454),
+ NAME_FUNC_OFFSET(18475, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, 461),
+ NAME_FUNC_OFFSET(18495, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, 462),
+ NAME_FUNC_OFFSET(18515, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, 463),
+ NAME_FUNC_OFFSET(18535, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, 464),
+ NAME_FUNC_OFFSET(18558, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, 465),
+ NAME_FUNC_OFFSET(18582, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, 466),
+ NAME_FUNC_OFFSET(18605, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, 467),
+ NAME_FUNC_OFFSET(18629, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, 473),
+ NAME_FUNC_OFFSET(18646, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, 474),
+ NAME_FUNC_OFFSET(18664, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, 475),
+ NAME_FUNC_OFFSET(18681, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, 476),
+ NAME_FUNC_OFFSET(18699, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, 477),
+ NAME_FUNC_OFFSET(18716, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, 478),
+ NAME_FUNC_OFFSET(18734, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, 479),
+ NAME_FUNC_OFFSET(18751, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, 480),
+ NAME_FUNC_OFFSET(18769, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, 481),
+ NAME_FUNC_OFFSET(18786, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, 482),
+ NAME_FUNC_OFFSET(18804, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, 483),
+ NAME_FUNC_OFFSET(18821, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, 484),
+ NAME_FUNC_OFFSET(18839, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, 485),
+ NAME_FUNC_OFFSET(18856, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, 486),
+ NAME_FUNC_OFFSET(18874, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, 487),
+ NAME_FUNC_OFFSET(18891, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, 488),
+ NAME_FUNC_OFFSET(18909, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, 489),
+ NAME_FUNC_OFFSET(18926, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, 490),
+ NAME_FUNC_OFFSET(18944, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, 491),
+ NAME_FUNC_OFFSET(18963, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, 492),
+ NAME_FUNC_OFFSET(18982, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, 493),
+ NAME_FUNC_OFFSET(19001, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, 494),
+ NAME_FUNC_OFFSET(19020, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, 495),
+ NAME_FUNC_OFFSET(19040, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, 496),
+ NAME_FUNC_OFFSET(19060, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, 497),
+ NAME_FUNC_OFFSET(19080, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, 498),
+ NAME_FUNC_OFFSET(19098, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, 499),
+ NAME_FUNC_OFFSET(19115, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, 500),
+ NAME_FUNC_OFFSET(19133, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, 501),
+ NAME_FUNC_OFFSET(19150, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, 502),
+ NAME_FUNC_OFFSET(19168, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, 503),
+ NAME_FUNC_OFFSET(19186, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, 504),
+ NAME_FUNC_OFFSET(19203, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, 505),
+ NAME_FUNC_OFFSET(19221, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, 506),
+ NAME_FUNC_OFFSET(19240, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, 507),
+ NAME_FUNC_OFFSET(19259, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, 508),
+ NAME_FUNC_OFFSET(19278, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, 509),
+ NAME_FUNC_OFFSET(19300, glBindBufferARB, glBindBufferARB, NULL, 510),
+ NAME_FUNC_OFFSET(19313, glBufferDataARB, glBufferDataARB, NULL, 511),
+ NAME_FUNC_OFFSET(19326, glBufferSubDataARB, glBufferSubDataARB, NULL, 512),
+ NAME_FUNC_OFFSET(19342, glDeleteBuffersARB, glDeleteBuffersARB, NULL, 513),
+ NAME_FUNC_OFFSET(19358, glGenBuffersARB, glGenBuffersARB, NULL, 514),
+ NAME_FUNC_OFFSET(19371, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, 515),
+ NAME_FUNC_OFFSET(19394, glGetBufferPointervARB, glGetBufferPointervARB, NULL, 516),
+ NAME_FUNC_OFFSET(19414, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, 517),
+ NAME_FUNC_OFFSET(19433, glIsBufferARB, glIsBufferARB, NULL, 518),
+ NAME_FUNC_OFFSET(19444, glMapBufferARB, glMapBufferARB, NULL, 519),
+ NAME_FUNC_OFFSET(19456, glUnmapBufferARB, glUnmapBufferARB, NULL, 520),
+ NAME_FUNC_OFFSET(19470, glBeginQueryARB, glBeginQueryARB, NULL, 521),
+ NAME_FUNC_OFFSET(19483, glDeleteQueriesARB, glDeleteQueriesARB, NULL, 522),
+ NAME_FUNC_OFFSET(19499, glEndQueryARB, glEndQueryARB, NULL, 523),
+ NAME_FUNC_OFFSET(19510, glGenQueriesARB, glGenQueriesARB, NULL, 524),
+ NAME_FUNC_OFFSET(19523, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, 525),
+ NAME_FUNC_OFFSET(19542, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, 526),
+ NAME_FUNC_OFFSET(19562, glGetQueryivARB, glGetQueryivARB, NULL, 527),
+ NAME_FUNC_OFFSET(19575, glIsQueryARB, glIsQueryARB, NULL, 528),
+ NAME_FUNC_OFFSET(19585, glCompileShaderARB, glCompileShaderARB, NULL, 530),
+ NAME_FUNC_OFFSET(19601, glGetActiveUniformARB, glGetActiveUniformARB, NULL, 535),
+ NAME_FUNC_OFFSET(19620, glGetShaderSourceARB, glGetShaderSourceARB, NULL, 541),
+ NAME_FUNC_OFFSET(19638, glGetUniformLocationARB, glGetUniformLocationARB, NULL, 542),
+ NAME_FUNC_OFFSET(19659, glGetUniformfvARB, glGetUniformfvARB, NULL, 543),
+ NAME_FUNC_OFFSET(19674, glGetUniformivARB, glGetUniformivARB, NULL, 544),
+ NAME_FUNC_OFFSET(19689, glLinkProgramARB, glLinkProgramARB, NULL, 545),
+ NAME_FUNC_OFFSET(19703, glShaderSourceARB, glShaderSourceARB, NULL, 546),
+ NAME_FUNC_OFFSET(19718, glUniform1fARB, glUniform1fARB, NULL, 547),
+ NAME_FUNC_OFFSET(19730, glUniform1fvARB, glUniform1fvARB, NULL, 548),
+ NAME_FUNC_OFFSET(19743, glUniform1iARB, glUniform1iARB, NULL, 549),
+ NAME_FUNC_OFFSET(19755, glUniform1ivARB, glUniform1ivARB, NULL, 550),
+ NAME_FUNC_OFFSET(19768, glUniform2fARB, glUniform2fARB, NULL, 551),
+ NAME_FUNC_OFFSET(19780, glUniform2fvARB, glUniform2fvARB, NULL, 552),
+ NAME_FUNC_OFFSET(19793, glUniform2iARB, glUniform2iARB, NULL, 553),
+ NAME_FUNC_OFFSET(19805, glUniform2ivARB, glUniform2ivARB, NULL, 554),
+ NAME_FUNC_OFFSET(19818, glUniform3fARB, glUniform3fARB, NULL, 555),
+ NAME_FUNC_OFFSET(19830, glUniform3fvARB, glUniform3fvARB, NULL, 556),
+ NAME_FUNC_OFFSET(19843, glUniform3iARB, glUniform3iARB, NULL, 557),
+ NAME_FUNC_OFFSET(19855, glUniform3ivARB, glUniform3ivARB, NULL, 558),
+ NAME_FUNC_OFFSET(19868, glUniform4fARB, glUniform4fARB, NULL, 559),
+ NAME_FUNC_OFFSET(19880, glUniform4fvARB, glUniform4fvARB, NULL, 560),
+ NAME_FUNC_OFFSET(19893, glUniform4iARB, glUniform4iARB, NULL, 561),
+ NAME_FUNC_OFFSET(19905, glUniform4ivARB, glUniform4ivARB, NULL, 562),
+ NAME_FUNC_OFFSET(19918, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, 563),
+ NAME_FUNC_OFFSET(19937, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, 564),
+ NAME_FUNC_OFFSET(19956, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, 565),
+ NAME_FUNC_OFFSET(19975, glUseProgramObjectARB, glUseProgramObjectARB, NULL, 566),
+ NAME_FUNC_OFFSET(19988, glValidateProgramARB, glValidateProgramARB, NULL, 567),
+ NAME_FUNC_OFFSET(20006, glBindAttribLocationARB, glBindAttribLocationARB, NULL, 568),
+ NAME_FUNC_OFFSET(20027, glGetActiveAttribARB, glGetActiveAttribARB, NULL, 569),
+ NAME_FUNC_OFFSET(20045, glGetAttribLocationARB, glGetAttribLocationARB, NULL, 570),
+ NAME_FUNC_OFFSET(20065, glDrawBuffersARB, glDrawBuffersARB, NULL, 571),
+ NAME_FUNC_OFFSET(20079, glDrawBuffersARB, glDrawBuffersARB, NULL, 571),
+ NAME_FUNC_OFFSET(20096, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 572),
+ NAME_FUNC_OFFSET(20121, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 572),
+ NAME_FUNC_OFFSET(20143, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 573),
+ NAME_FUNC_OFFSET(20170, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 573),
+ NAME_FUNC_OFFSET(20194, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, 574),
+ NAME_FUNC_OFFSET(20230, gl_dispatch_stub_617, gl_dispatch_stub_617, NULL, 617),
+ NAME_FUNC_OFFSET(20246, gl_dispatch_stub_618, gl_dispatch_stub_618, NULL, 618),
+ NAME_FUNC_OFFSET(20265, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
+ NAME_FUNC_OFFSET(20283, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
+ NAME_FUNC_OFFSET(20304, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
+ NAME_FUNC_OFFSET(20326, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 626),
+ NAME_FUNC_OFFSET(20345, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 626),
+ NAME_FUNC_OFFSET(20367, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 626),
+ NAME_FUNC_OFFSET(20390, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, 629),
+ NAME_FUNC_OFFSET(20409, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, 630),
+ NAME_FUNC_OFFSET(20429, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, 631),
+ NAME_FUNC_OFFSET(20448, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, 632),
+ NAME_FUNC_OFFSET(20468, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, 633),
+ NAME_FUNC_OFFSET(20487, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, 634),
+ NAME_FUNC_OFFSET(20507, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, 635),
+ NAME_FUNC_OFFSET(20526, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, 636),
+ NAME_FUNC_OFFSET(20546, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, 637),
+ NAME_FUNC_OFFSET(20565, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, 638),
+ NAME_FUNC_OFFSET(20585, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, 639),
+ NAME_FUNC_OFFSET(20605, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, 640),
+ NAME_FUNC_OFFSET(20626, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, 641),
+ NAME_FUNC_OFFSET(20646, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, 642),
+ NAME_FUNC_OFFSET(20667, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, 643),
+ NAME_FUNC_OFFSET(20687, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, 644),
+ NAME_FUNC_OFFSET(20708, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, 645),
+ NAME_FUNC_OFFSET(20732, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 646),
+ NAME_FUNC_OFFSET(20750, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 647),
+ NAME_FUNC_OFFSET(20770, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, 648),
+ NAME_FUNC_OFFSET(20788, glFogCoorddEXT, glFogCoorddEXT, NULL, 649),
+ NAME_FUNC_OFFSET(20800, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 650),
+ NAME_FUNC_OFFSET(20813, glFogCoordfEXT, glFogCoordfEXT, NULL, 651),
+ NAME_FUNC_OFFSET(20825, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 652),
+ NAME_FUNC_OFFSET(20838, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 654),
+ NAME_FUNC_OFFSET(20858, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 654),
+ NAME_FUNC_OFFSET(20882, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 671),
+ NAME_FUNC_OFFSET(20896, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 671),
+ NAME_FUNC_OFFSET(20913, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 672),
+ NAME_FUNC_OFFSET(20928, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 672),
+ NAME_FUNC_OFFSET(20946, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 673),
+ NAME_FUNC_OFFSET(20960, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 673),
+ NAME_FUNC_OFFSET(20977, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 674),
+ NAME_FUNC_OFFSET(20992, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 674),
+ NAME_FUNC_OFFSET(21010, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 675),
+ NAME_FUNC_OFFSET(21024, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 675),
+ NAME_FUNC_OFFSET(21041, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 676),
+ NAME_FUNC_OFFSET(21056, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 676),
+ NAME_FUNC_OFFSET(21074, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 677),
+ NAME_FUNC_OFFSET(21088, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 677),
+ NAME_FUNC_OFFSET(21105, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 678),
+ NAME_FUNC_OFFSET(21120, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 678),
+ NAME_FUNC_OFFSET(21138, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 679),
+ NAME_FUNC_OFFSET(21152, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 679),
+ NAME_FUNC_OFFSET(21169, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 680),
+ NAME_FUNC_OFFSET(21184, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 680),
+ NAME_FUNC_OFFSET(21202, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 681),
+ NAME_FUNC_OFFSET(21216, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 681),
+ NAME_FUNC_OFFSET(21233, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 682),
+ NAME_FUNC_OFFSET(21248, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 682),
+ NAME_FUNC_OFFSET(21266, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 683),
+ NAME_FUNC_OFFSET(21280, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 683),
+ NAME_FUNC_OFFSET(21297, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 684),
+ NAME_FUNC_OFFSET(21312, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 684),
+ NAME_FUNC_OFFSET(21330, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 685),
+ NAME_FUNC_OFFSET(21344, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 685),
+ NAME_FUNC_OFFSET(21361, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 686),
+ NAME_FUNC_OFFSET(21376, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 686),
+ NAME_FUNC_OFFSET(21394, glBindProgramNV, glBindProgramNV, NULL, 705),
+ NAME_FUNC_OFFSET(21411, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 706),
+ NAME_FUNC_OFFSET(21431, glGenProgramsNV, glGenProgramsNV, NULL, 708),
+ NAME_FUNC_OFFSET(21448, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 714),
+ NAME_FUNC_OFFSET(21474, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 714),
+ NAME_FUNC_OFFSET(21503, glIsProgramNV, glIsProgramNV, NULL, 718),
+ NAME_FUNC_OFFSET(21518, glPointParameteriNV, glPointParameteriNV, NULL, 782),
+ NAME_FUNC_OFFSET(21536, glPointParameterivNV, glPointParameterivNV, NULL, 783),
+ NAME_FUNC_OFFSET(21555, gl_dispatch_stub_786, gl_dispatch_stub_786, NULL, 786),
+ NAME_FUNC_OFFSET(21576, gl_dispatch_stub_788, gl_dispatch_stub_788, NULL, 788),
+ NAME_FUNC_OFFSET(21592, glPrimitiveRestartIndexNV, glPrimitiveRestartIndexNV, NULL, 795),
+ NAME_FUNC_OFFSET(21616, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, 798),
+ NAME_FUNC_OFFSET(21640, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, 798),
+ NAME_FUNC_OFFSET(21667, glBindFramebufferEXT, glBindFramebufferEXT, NULL, 799),
+ NAME_FUNC_OFFSET(21685, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, 800),
+ NAME_FUNC_OFFSET(21704, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, 801),
+ NAME_FUNC_OFFSET(21729, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, 802),
+ NAME_FUNC_OFFSET(21750, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, 803),
+ NAME_FUNC_OFFSET(21772, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, 804),
+ NAME_FUNC_OFFSET(21798, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, 805),
+ NAME_FUNC_OFFSET(21821, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, 806),
+ NAME_FUNC_OFFSET(21844, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, 807),
+ NAME_FUNC_OFFSET(21867, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, 808),
+ NAME_FUNC_OFFSET(21885, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, 809),
+ NAME_FUNC_OFFSET(21904, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, 810),
+ NAME_FUNC_OFFSET(21921, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, 811),
+ NAME_FUNC_OFFSET(21959, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, 812),
+ NAME_FUNC_OFFSET(21988, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 813),
+ NAME_FUNC_OFFSET(22004, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, 814),
+ NAME_FUNC_OFFSET(22021, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, 815),
+ NAME_FUNC_OFFSET(22043, gl_dispatch_stub_816, gl_dispatch_stub_816, NULL, 816),
+ NAME_FUNC_OFFSET(22061, glBindFragDataLocationEXT, glBindFragDataLocationEXT, NULL, 819),
+ NAME_FUNC_OFFSET(22084, glGetFragDataLocationEXT, glGetFragDataLocationEXT, NULL, 820),
+ NAME_FUNC_OFFSET(22106, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 821),
+ NAME_FUNC_OFFSET(22122, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, NULL, 822),
+ NAME_FUNC_OFFSET(22143, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, NULL, 823),
+ NAME_FUNC_OFFSET(22165, glUniform1uiEXT, glUniform1uiEXT, NULL, 824),
+ NAME_FUNC_OFFSET(22178, glUniform1uivEXT, glUniform1uivEXT, NULL, 825),
+ NAME_FUNC_OFFSET(22192, glUniform2uiEXT, glUniform2uiEXT, NULL, 826),
+ NAME_FUNC_OFFSET(22205, glUniform2uivEXT, glUniform2uivEXT, NULL, 827),
+ NAME_FUNC_OFFSET(22219, glUniform3uiEXT, glUniform3uiEXT, NULL, 828),
+ NAME_FUNC_OFFSET(22232, glUniform3uivEXT, glUniform3uivEXT, NULL, 829),
+ NAME_FUNC_OFFSET(22246, glUniform4uiEXT, glUniform4uiEXT, NULL, 830),
+ NAME_FUNC_OFFSET(22259, glUniform4uivEXT, glUniform4uivEXT, NULL, 831),
+ NAME_FUNC_OFFSET(22273, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, 832),
+ NAME_FUNC_OFFSET(22291, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, 833),
+ NAME_FUNC_OFFSET(22310, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, 834),
+ NAME_FUNC_OFFSET(22329, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, NULL, 835),
+ NAME_FUNC_OFFSET(22349, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, 836),
+ NAME_FUNC_OFFSET(22367, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, 837),
+ NAME_FUNC_OFFSET(22386, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, 838),
+ NAME_FUNC_OFFSET(22405, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, NULL, 839),
+ NAME_FUNC_OFFSET(22425, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, 840),
+ NAME_FUNC_OFFSET(22443, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, 841),
+ NAME_FUNC_OFFSET(22462, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, 842),
+ NAME_FUNC_OFFSET(22481, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, NULL, 843),
+ NAME_FUNC_OFFSET(22501, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, 844),
+ NAME_FUNC_OFFSET(22520, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, 845),
+ NAME_FUNC_OFFSET(22538, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, 846),
+ NAME_FUNC_OFFSET(22557, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, 847),
+ NAME_FUNC_OFFSET(22576, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, NULL, 848),
+ NAME_FUNC_OFFSET(22596, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, 849),
+ NAME_FUNC_OFFSET(22615, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, NULL, 850),
+ NAME_FUNC_OFFSET(22635, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, NULL, 851),
+ NAME_FUNC_OFFSET(22655, glVertexAttribIPointerEXT, glVertexAttribIPointerEXT, NULL, 852),
+ NAME_FUNC_OFFSET(22678, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, 853),
+ NAME_FUNC_OFFSET(22704, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, 854),
+ NAME_FUNC_OFFSET(22717, glDisableIndexedEXT, glDisableIndexedEXT, NULL, 855),
+ NAME_FUNC_OFFSET(22728, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 856),
+ NAME_FUNC_OFFSET(22738, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, 857),
+ NAME_FUNC_OFFSET(22754, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, 858),
+ NAME_FUNC_OFFSET(22770, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, 859),
+ NAME_FUNC_OFFSET(22783, glGetTexParameterIivEXT, glGetTexParameterIivEXT, NULL, 862),
+ NAME_FUNC_OFFSET(22804, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, NULL, 863),
+ NAME_FUNC_OFFSET(22826, glTexParameterIivEXT, glTexParameterIivEXT, NULL, 864),
+ NAME_FUNC_OFFSET(22844, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, 865),
+ NAME_FUNC_OFFSET(22863, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, 866),
+ NAME_FUNC_OFFSET(22888, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, 867),
+ NAME_FUNC_OFFSET(22911, glBeginTransformFeedbackEXT, glBeginTransformFeedbackEXT, NULL, 868),
+ NAME_FUNC_OFFSET(22936, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, 869),
+ NAME_FUNC_OFFSET(22953, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, 871),
+ NAME_FUNC_OFFSET(22971, glEndTransformFeedbackEXT, glEndTransformFeedbackEXT, NULL, 872),
+ NAME_FUNC_OFFSET(22994, glGetTransformFeedbackVaryingEXT, glGetTransformFeedbackVaryingEXT, NULL, 873),
+ NAME_FUNC_OFFSET(23024, glTransformFeedbackVaryingsEXT, glTransformFeedbackVaryingsEXT, NULL, 874),
+ NAME_FUNC_OFFSET(23052, glProvokingVertexEXT, glProvokingVertexEXT, NULL, 875),
+ NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
+};
+
+#undef NAME_FUNC_OFFSET
diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c
index d57dff5e0..dfe345c7f 100644
--- a/xorg-server/glx/glxcmds.c
+++ b/xorg-server/glx/glxcmds.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <string.h>
@@ -132,7 +136,7 @@ validGlxFBConfigForWindow(ClientPtr client, __GLXconfig *config,
static int
validGlxContext(ClientPtr client, XID id, int access_mode,
- __GLXcontext **context, int *err)
+ struct glx_context **context, int *err)
{
*err = dixLookupResourceByType((pointer *) context, id,
__glXContextRes, client, access_mode);
@@ -187,24 +191,24 @@ validGlxDrawable(ClientPtr client, XID id, int type, int access_mode,
}
void
-__glXContextDestroy(__GLXcontext *context)
+__glXContextDestroy(struct glx_context *context)
{
__glXFlushContextCache();
}
-static void __glXdirectContextDestroy(__GLXcontext *context)
+static void __glXdirectContextDestroy(struct glx_context *context)
{
__glXContextDestroy(context);
free(context);
}
-static __GLXcontext *__glXdirectContextCreate(__GLXscreen *screen,
+static struct glx_context *__glXdirectContextCreate(__GLXscreen *screen,
__GLXconfig *modes,
- __GLXcontext *shareContext)
+ struct glx_context *shareContext)
{
- __GLXcontext *context;
+ struct glx_context *context;
- context = calloc(1, sizeof (__GLXcontext));
+ context = calloc(1, sizeof (struct glx_context));
if (context == NULL)
return NULL;
@@ -213,6 +217,12 @@ static __GLXcontext *__glXdirectContextCreate(__GLXscreen *screen,
return context;
}
+void FlushContext(struct glx_context *cx)
+{
+ CALL_Flush( GET_DISPATCH(), () );
+ __GLX_NOTE_FLUSHED_CMDS(cx);
+}
+
/**
* Create a GL context with the given properties. This routine is used
* to implement \c glXCreateContext, \c glXCreateNewContext, and
@@ -227,7 +237,7 @@ DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
__GLXscreen *pGlxScreen, GLboolean isDirect)
{
ClientPtr client = cl->client;
- __GLXcontext *glxc, *shareglxc;
+ struct glx_context *glxc, *shareglxc;
int err;
LEGAL_NEW_RESOURCE(gcId, client);
@@ -373,7 +383,7 @@ int __glXDisp_DestroyContext(__GLXclientState *cl, GLbyte *pc)
{
ClientPtr client = cl->client;
xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
- __GLXcontext *glxc;
+ struct glx_context *glxc;
int err;
REQUEST_SIZE_MATCH(xGLXDestroyContextReq);
@@ -397,11 +407,11 @@ int __glXDisp_DestroyContext(__GLXclientState *cl, GLbyte *pc)
/*
** Add a current context, and return the tag that will be used to refer to it.
*/
-static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc)
+static int AddCurrentContext(__GLXclientState *cl, struct glx_context *glxc)
{
int i;
int num = cl->numCurrentContexts;
- __GLXcontext **table = cl->currentContexts;
+ struct glx_context **table = cl->currentContexts;
if (!glxc) return -1;
@@ -418,10 +428,10 @@ static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc)
** Didn't find a free slot, so we'll have to grow the table.
*/
if (!num) {
- table = (__GLXcontext **) malloc(sizeof(__GLXcontext *));
+ table = (struct glx_context **) malloc(sizeof(struct glx_context *));
} else {
- table = (__GLXcontext **) realloc(table,
- (num+1)*sizeof(__GLXcontext *));
+ table = (struct glx_context **) realloc(table,
+ (num+1)*sizeof(struct glx_context *));
}
table[num] = glxc;
cl->currentContexts = table;
@@ -432,10 +442,10 @@ static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc)
/*
** Given a tag, change the current context for the corresponding entry.
*/
-static void ChangeCurrentContext(__GLXclientState *cl, __GLXcontext *glxc,
+static void ChangeCurrentContext(__GLXclientState *cl, struct glx_context *glxc,
GLXContextTag tag)
{
- __GLXcontext **table = cl->currentContexts;
+ struct glx_context **table = cl->currentContexts;
table[tag-1] = glxc;
}
@@ -444,7 +454,7 @@ static void ChangeCurrentContext(__GLXclientState *cl, __GLXcontext *glxc,
** context's entry in the table as the context tag. A tag must be greater
** than 0.
*/
-__GLXcontext *__glXLookupContextByTag(__GLXclientState *cl, GLXContextTag tag)
+struct glx_context *__glXLookupContextByTag(__GLXclientState *cl, GLXContextTag tag)
{
int num = cl->numCurrentContexts;
@@ -457,7 +467,7 @@ __GLXcontext *__glXLookupContextByTag(__GLXclientState *cl, GLXContextTag tag)
/*****************************************************************************/
-static void StopUsingContext(__GLXcontext *glxc)
+static void StopUsingContext(struct glx_context *glxc)
{
if (glxc) {
if (glxc == __glXLastContext) {
@@ -471,7 +481,7 @@ static void StopUsingContext(__GLXcontext *glxc)
}
}
-static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc)
+static void StartUsingContext(__GLXclientState *cl, struct glx_context *glxc)
{
glxc->isCurrent = GL_TRUE;
__glXLastContext = glxc;
@@ -484,7 +494,7 @@ static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc)
* sure it's an X window and create a GLX drawable one the fly.
*/
static __GLXdrawable *
-__glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
+__glXGetDrawable(struct glx_context *glxc, GLXDrawable drawId, ClientPtr client,
int *error)
{
DrawablePtr pDraw;
@@ -521,7 +531,7 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
return NULL;
}
- if (pDraw->pScreen != glxc->pGlxScreen->pScreen) {
+ if (!glxc || pDraw->pScreen != glxc->pGlxScreen->pScreen) {
client->errorValue = pDraw->pScreen->myNum;
*error = BadMatch;
return NULL;
@@ -557,7 +567,7 @@ DoMakeCurrent(__GLXclientState *cl,
{
ClientPtr client = cl->client;
xGLXMakeCurrentReply reply;
- __GLXcontext *glxc, *prevglxc;
+ struct glx_context *glxc, *prevglxc;
__GLXdrawable *drawPriv = NULL;
__GLXdrawable *readPriv = NULL;
int error;
@@ -733,7 +743,7 @@ int __glXDisp_IsDirect(__GLXclientState *cl, GLbyte *pc)
ClientPtr client = cl->client;
xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
xGLXIsDirectReply reply;
- __GLXcontext *glxc;
+ struct glx_context *glxc;
int err;
REQUEST_SIZE_MATCH(xGLXIsDirectReq);
@@ -793,7 +803,7 @@ int __glXDisp_WaitGL(__GLXclientState *cl, GLbyte *pc)
ClientPtr client = cl->client;
xGLXWaitGLReq *req = (xGLXWaitGLReq *)pc;
GLXContextTag tag;
- __GLXcontext *glxc = NULL;
+ struct glx_context *glxc = NULL;
int error;
REQUEST_SIZE_MATCH(xGLXWaitGLReq);
@@ -821,7 +831,7 @@ int __glXDisp_WaitX(__GLXclientState *cl, GLbyte *pc)
ClientPtr client = cl->client;
xGLXWaitXReq *req = (xGLXWaitXReq *)pc;
GLXContextTag tag;
- __GLXcontext *glxc = NULL;
+ struct glx_context *glxc = NULL;
int error;
REQUEST_SIZE_MATCH(xGLXWaitXReq);
@@ -850,7 +860,7 @@ int __glXDisp_CopyContext(__GLXclientState *cl, GLbyte *pc)
GLXContextID dest;
GLXContextTag tag;
unsigned long mask;
- __GLXcontext *src, *dst;
+ struct glx_context *src, *dst;
int error;
REQUEST_SIZE_MATCH(xGLXCopyContextReq);
@@ -883,7 +893,7 @@ int __glXDisp_CopyContext(__GLXclientState *cl, GLbyte *pc)
}
if (tag) {
- __GLXcontext *tagcx = __glXLookupContextByTag(cl, tag);
+ struct glx_context *tagcx = __glXLookupContextByTag(cl, tag);
if (!tagcx) {
return __glXError(GLXBadContextTag);
@@ -1592,7 +1602,7 @@ int __glXDisp_SwapBuffers(__GLXclientState *cl, GLbyte *pc)
xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
GLXContextTag tag;
XID drawId;
- __GLXcontext *glxc = NULL;
+ struct glx_context *glxc = NULL;
__GLXdrawable *pGlxDraw;
int error;
@@ -1638,7 +1648,7 @@ static int
DoQueryContext(__GLXclientState *cl, GLXContextID gcId)
{
ClientPtr client = cl->client;
- __GLXcontext *ctx;
+ struct glx_context *ctx;
xGLXQueryContextInfoEXTReply reply;
int nProps;
int *sendBuf, *pSendBuf;
@@ -1702,7 +1712,7 @@ int __glXDisp_BindTexImageEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
ClientPtr client = cl->client;
- __GLXcontext *context;
+ struct glx_context *context;
__GLXdrawable *pGlxDraw;
GLXDrawable drawId;
int buffer;
@@ -1747,7 +1757,7 @@ int __glXDisp_ReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc)
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
ClientPtr client = cl->client;
__GLXdrawable *pGlxDraw;
- __GLXcontext *context;
+ struct glx_context *context;
GLXDrawable drawId;
int buffer;
int error;
@@ -1779,7 +1789,7 @@ int __glXDisp_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
GLXContextTag tag = req->contextTag;
- __GLXcontext *glxc = NULL;
+ struct glx_context *glxc = NULL;
__GLXdrawable *pGlxDraw;
ClientPtr client = cl->client;
GLXDrawable drawId;
@@ -1917,7 +1927,7 @@ int __glXDisp_Render(__GLXclientState *cl, GLbyte *pc)
int commandsDone;
CARD16 opcode;
__GLXrenderHeader *hdr;
- __GLXcontext *glxc;
+ struct glx_context *glxc;
__GLX_DECLARE_SWAP_VARIABLES;
REQUEST_AT_LEAST_SIZE(xGLXRenderReq);
@@ -2016,7 +2026,7 @@ int __glXDisp_RenderLarge(__GLXclientState *cl, GLbyte *pc)
ClientPtr client= cl->client;
size_t dataBytes;
__GLXrenderLargeHeader *hdr;
- __GLXcontext *glxc;
+ struct glx_context *glxc;
int error;
CARD16 opcode;
__GLX_DECLARE_SWAP_VARIABLES;
diff --git a/xorg-server/glx/glxcmdsswap.c b/xorg-server/glx/glxcmdsswap.c
index a7689ed46..4725cb788 100644
--- a/xorg-server/glx/glxcmdsswap.c
+++ b/xorg-server/glx/glxcmdsswap.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <string.h>
@@ -40,6 +44,7 @@
#include <pixmapstr.h>
#include <windowstr.h>
#include "glxext.h"
+#include "GL/gl.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
diff --git a/xorg-server/glx/glxcontext.h b/xorg-server/glx/glxcontext.h
index 79bc083a8..da0fc18fb 100644
--- a/xorg-server/glx/glxcontext.h
+++ b/xorg-server/glx/glxcontext.h
@@ -37,25 +37,25 @@
typedef struct __GLXtextureFromPixmap __GLXtextureFromPixmap;
struct __GLXtextureFromPixmap {
- int (*bindTexImage) (__GLXcontext *baseContext,
+ int (*bindTexImage) (struct glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap);
- int (*releaseTexImage) (__GLXcontext *baseContext,
+ int (*releaseTexImage) (struct glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap);
};
-struct __GLXcontext {
- void (*destroy) (__GLXcontext *context);
- int (*makeCurrent) (__GLXcontext *context);
- int (*loseCurrent) (__GLXcontext *context);
- int (*copy) (__GLXcontext *dst,
- __GLXcontext *src,
+struct glx_context {
+ void (*destroy) (struct glx_context *context);
+ int (*makeCurrent) (struct glx_context *context);
+ int (*loseCurrent) (struct glx_context *context);
+ int (*copy) (struct glx_context *dst,
+ struct glx_context *src,
unsigned long mask);
- int (*forceCurrent) (__GLXcontext *context);
+ int (*forceCurrent) (struct glx_context *context);
- Bool (*wait) (__GLXcontext *context,
+ Bool (*wait) (struct glx_context *context,
__GLXclientState *cl,
int *error);
@@ -64,8 +64,8 @@ struct __GLXcontext {
/*
** list of context structs
*/
- __GLXcontext *last;
- __GLXcontext *next;
+ struct glx_context *last;
+ struct glx_context *next;
/*
** config struct for this context
@@ -128,6 +128,6 @@ struct __GLXcontext {
__GLXdrawable *readPriv;
};
-void __glXContextDestroy(__GLXcontext *context);
+void __glXContextDestroy(struct glx_context *context);
#endif /* !__GLX_context_h__ */
diff --git a/xorg-server/glx/glxdri.c b/xorg-server/glx/glxdri.c
index b394cdedc..2c0406d70 100644
--- a/xorg-server/glx/glxdri.c
+++ b/xorg-server/glx/glxdri.c
@@ -29,10 +29,13 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
+#ifndef _MSC_VER
#include <sys/time.h>
#include <dlfcn.h>
#include <drm.h>
+#endif
+
#include <GL/gl.h>
#include <GL/internal/dri_interface.h>
#include <GL/glxtokens.h>
@@ -91,7 +94,7 @@ struct __GLXDRIscreen {
};
struct __GLXDRIcontext {
- __GLXcontext base;
+ struct glx_context base;
__DRIcontext *driContext;
XID hwContextID;
};
@@ -284,7 +287,7 @@ __glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
}
static void
-__glXDRIcontextDestroy(__GLXcontext *baseContext)
+__glXDRIcontextDestroy(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
@@ -302,7 +305,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
+__glXDRIcontextMakeCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
@@ -315,7 +318,7 @@ __glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
+__glXDRIcontextLoseCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
@@ -324,7 +327,7 @@ __glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
+__glXDRIcontextCopy(struct glx_context *baseDst, struct glx_context *baseSrc,
unsigned long mask)
{
__GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst;
@@ -336,7 +339,7 @@ __glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
}
static int
-__glXDRIcontextForceCurrent(__GLXcontext *baseContext)
+__glXDRIcontextForceCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
@@ -394,7 +397,7 @@ testTexOffset(__GLXDRIscreen * const screen, PixmapPtr pPixmap)
*/
static int
-__glXDRIbindTexImage(__GLXcontext *baseContext,
+__glXDRIbindTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *glxPixmap)
{
@@ -577,7 +580,7 @@ nooverride:
}
static int
-__glXDRIreleaseTexImage(__GLXcontext *baseContext,
+__glXDRIreleaseTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap)
{
@@ -609,10 +612,10 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
free(screen);
}
-static __GLXcontext *
+static struct glx_context *
__glXDRIscreenCreateContext(__GLXscreen *baseScreen,
__GLXconfig *glxConfig,
- __GLXcontext *baseShareContext)
+ struct glx_context *baseShareContext)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
__GLXDRIcontext *context, *shareContext;
diff --git a/xorg-server/glx/glxdri2.c b/xorg-server/glx/glxdri2.c
index 9d4aeab23..10e8acd40 100644
--- a/xorg-server/glx/glxdri2.c
+++ b/xorg-server/glx/glxdri2.c
@@ -78,7 +78,7 @@ struct __GLXDRIscreen {
};
struct __GLXDRIcontext {
- __GLXcontext base;
+ struct glx_context base;
__DRIcontext *driContext;
};
@@ -239,7 +239,7 @@ __glXDRIdrawableSwapInterval(__GLXdrawable *drawable, int interval)
}
static void
-__glXDRIcontextDestroy(__GLXcontext *baseContext)
+__glXDRIcontextDestroy(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
@@ -250,7 +250,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
+__glXDRIcontextMakeCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
@@ -263,7 +263,7 @@ __glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
+__glXDRIcontextLoseCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
@@ -272,7 +272,7 @@ __glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
+__glXDRIcontextCopy(struct glx_context *baseDst, struct glx_context *baseSrc,
unsigned long mask)
{
__GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst;
@@ -284,7 +284,7 @@ __glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
}
static int
-__glXDRIcontextForceCurrent(__GLXcontext *baseContext)
+__glXDRIcontextForceCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
@@ -297,7 +297,7 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext)
}
static Bool
-__glXDRIcontextWait(__GLXcontext *baseContext,
+__glXDRIcontextWait(struct glx_context *baseContext,
__GLXclientState *cl, int *error)
{
if (DRI2WaitSwap(cl->client, baseContext->drawPriv->pDraw)) {
@@ -311,7 +311,7 @@ __glXDRIcontextWait(__GLXcontext *baseContext,
#ifdef __DRI_TEX_BUFFER
static int
-__glXDRIbindTexImage(__GLXcontext *baseContext,
+__glXDRIbindTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *glxPixmap)
{
@@ -340,7 +340,7 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
}
static int
-__glXDRIreleaseTexImage(__GLXcontext *baseContext,
+__glXDRIreleaseTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap)
{
@@ -351,7 +351,7 @@ __glXDRIreleaseTexImage(__GLXcontext *baseContext,
#else
static int
-__glXDRIbindTexImage(__GLXcontext *baseContext,
+__glXDRIbindTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *glxPixmap)
{
@@ -359,7 +359,7 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
}
static int
-__glXDRIreleaseTexImage(__GLXcontext *baseContext,
+__glXDRIreleaseTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap)
{
@@ -387,10 +387,10 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
free(screen);
}
-static __GLXcontext *
+static struct glx_context *
__glXDRIscreenCreateContext(__GLXscreen *baseScreen,
__GLXconfig *glxConfig,
- __GLXcontext *baseShareContext)
+ struct glx_context *baseShareContext)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
__GLXDRIcontext *context, *shareContext;
diff --git a/xorg-server/glx/glxdricommon.c b/xorg-server/glx/glxdricommon.c
index 2fcda8fb8..a51d6621a 100644
--- a/xorg-server/glx/glxdricommon.c
+++ b/xorg-server/glx/glxdricommon.c
@@ -25,6 +25,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <stdint.h>
@@ -40,6 +44,10 @@
#include "glxscreens.h"
#include "glxdricommon.h"
+#ifdef _MSC_VER
+#define dlerror() "Getting loadlibrary error string not implemented"
+#endif
+
static int
getUST(int64_t *ust)
{
@@ -48,12 +56,16 @@ getUST(int64_t *ust)
if (ust == NULL)
return -EFAULT;
+#ifdef _MSC_VER
+ __asm int 3;
+#else
if (gettimeofday(&tv, NULL) == 0) {
ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec;
return 0;
} else {
return -errno;
}
+ #endif
}
const __DRIsystemTimeExtension systemTimeExtension = {
@@ -218,17 +230,33 @@ glxProbeDriver(const char *driverName,
char filename[PATH_MAX];
const __DRIextension **extensions;
+#ifdef _MSC_VER
+#ifdef _DEBUG
+#define DLLNAME "%s%s_dri_dbg.dll"
+#else
+#define DLLNAME "%s%s_dri.dll"
+#endif
+ snprintf(filename, sizeof filename, DLLNAME,
+ dri_driver_path, driverName);
+
+ driver = LoadLibrary(filename);
+#else
snprintf(filename, sizeof filename, "%s/%s_dri.so",
dri_driver_path, driverName);
driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
+#endif
if (driver == NULL) {
LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
filename, dlerror());
goto cleanup_failure;
}
+#ifdef _MSC_VER
+ extensions = (const __DRIextension **)GetProcAddress(driver, __DRI_DRIVER_EXTENSIONS);
+#else
extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
+#endif
if (extensions == NULL) {
LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
driverName, dlerror());
@@ -257,7 +285,11 @@ glxProbeDriver(const char *driverName,
cleanup_failure:
if (driver)
- dlclose(driver);
+#ifdef _MSC_VER
+ FreeLibrary(driver);
+#else
+ dlclose(driver);
+#endif
*coreExt = *renderExt = NULL;
return NULL;
}
diff --git a/xorg-server/glx/glxdriswrast.c b/xorg-server/glx/glxdriswrast.c
index fb2316a62..59a202b16 100644
--- a/xorg-server/glx/glxdriswrast.c
+++ b/xorg-server/glx/glxdriswrast.c
@@ -26,6 +26,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <stdint.h>
@@ -54,13 +58,6 @@
#include "dispatch.h"
#include "extension_string.h"
-/* RTLD_LOCAL is not defined on Cygwin */
-#ifdef __CYGWIN__
-#ifndef RTLD_LOCAL
-#define RTLD_LOCAL 0
-#endif
-#endif
-
typedef struct __GLXDRIscreen __GLXDRIscreen;
typedef struct __GLXDRIcontext __GLXDRIcontext;
typedef struct __GLXDRIdrawable __GLXDRIdrawable;
@@ -77,7 +74,7 @@ struct __GLXDRIscreen {
};
struct __GLXDRIcontext {
- __GLXcontext base;
+ struct glx_context base;
__DRIcontext *driContext;
};
@@ -130,7 +127,7 @@ __glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
}
static void
-__glXDRIcontextDestroy(__GLXcontext *baseContext)
+__glXDRIcontextDestroy(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
@@ -141,7 +138,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
+__glXDRIcontextMakeCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
@@ -154,7 +151,7 @@ __glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
+__glXDRIcontextLoseCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
@@ -163,7 +160,7 @@ __glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
}
static int
-__glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
+__glXDRIcontextCopy(struct glx_context *baseDst, struct glx_context *baseSrc,
unsigned long mask)
{
__GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst;
@@ -175,7 +172,7 @@ __glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
}
static int
-__glXDRIcontextForceCurrent(__GLXcontext *baseContext)
+__glXDRIcontextForceCurrent(struct glx_context *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
__GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
@@ -190,7 +187,7 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext)
#ifdef __DRI_TEX_BUFFER
static int
-__glXDRIbindTexImage(__GLXcontext *baseContext,
+__glXDRIbindTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *glxPixmap)
{
@@ -217,7 +214,7 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
}
static int
-__glXDRIreleaseTexImage(__GLXcontext *baseContext,
+__glXDRIreleaseTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap)
{
@@ -228,7 +225,7 @@ __glXDRIreleaseTexImage(__GLXcontext *baseContext,
#else
static int
-__glXDRIbindTexImage(__GLXcontext *baseContext,
+__glXDRIbindTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *glxPixmap)
{
@@ -236,7 +233,7 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
}
static int
-__glXDRIreleaseTexImage(__GLXcontext *baseContext,
+__glXDRIreleaseTexImage(struct glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap)
{
@@ -257,17 +254,21 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
(*screen->core->destroyScreen)(screen->driScreen);
+#ifdef _MSC_VER
+ FreeLibrary(screen->driver);
+#else
dlclose(screen->driver);
+#endif
__glXScreenDestroy(baseScreen);
free(screen);
}
-static __GLXcontext *
+static struct glx_context *
__glXDRIscreenCreateContext(__GLXscreen *baseScreen,
__GLXconfig *glxConfig,
- __GLXcontext *baseShareContext)
+ struct glx_context *baseShareContext)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
__GLXDRIcontext *context, *shareContext;
@@ -492,7 +493,11 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
handle_error:
if (screen->driver)
+#ifdef _MSC_VER
+ FreeLibrary(screen->driver);
+#else
dlclose(screen->driver);
+#endif
free(screen);
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index 7d816b481..89c1030f7 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <string.h>
@@ -45,12 +49,14 @@
#include "indirect_table.h"
#include "indirect_util.h"
+extern void FlushContext(struct glx_context *cx);
+
/*
** The last context used by the server. It is the context that is current
** from the server's perspective.
*/
-__GLXcontext *__glXLastContext;
-__GLXcontext *__glXContextList;
+struct glx_context *__glXLastContext;
+struct glx_context *__glXContextList;
/*
** X resources.
@@ -101,7 +107,7 @@ void __glXResetLargeCommandStatus(__GLXclientState *cl)
** flag that the ID is no longer valid, and (maybe) free the context.
** use.
*/
-static int ContextGone(__GLXcontext* cx, XID id)
+static int ContextGone(struct glx_context* cx, XID id)
{
cx->idExists = GL_FALSE;
if (!cx->isCurrent) {
@@ -111,8 +117,8 @@ static int ContextGone(__GLXcontext* cx, XID id)
return True;
}
-static __GLXcontext *glxPendingDestroyContexts;
-static __GLXcontext *glxAllContexts;
+static struct glx_context *glxPendingDestroyContexts;
+static struct glx_context *glxAllContexts;
static int glxServerLeaveCount;
static int glxBlockClients;
@@ -122,7 +128,7 @@ static int glxBlockClients;
*/
static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
{
- __GLXcontext *c, *next;
+ struct glx_context *c, *next;
/* If this drawable was created using glx 1.3 drawable
* constructors, we added it as a glx drawable resource under both
@@ -140,12 +146,14 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
int i;
+ FlushContext(c);
+
(*c->loseCurrent)(c);
c->isCurrent = GL_FALSE;
if (c == __glXLastContext)
__glXFlushContextCache();
-
- for (i = 1; i < currentMaxClients; i++) {
+ if (!c->idExists) {
+ for (i = 1; i < currentMaxClients; i++) {
if (clients[i]) {
__GLXclientState *cl = glxGetClient(clients[i]);
@@ -158,6 +166,7 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
}
}
}
+ }
}
}
if (c->drawPriv == glxPriv)
@@ -173,15 +182,15 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
return True;
}
-void __glXAddToContextList(__GLXcontext *cx)
+void __glXAddToContextList(struct glx_context *cx)
{
cx->next = glxAllContexts;
glxAllContexts = cx;
}
-static void __glXRemoveFromContextList(__GLXcontext *cx)
+static void __glXRemoveFromContextList(struct glx_context *cx)
{
- __GLXcontext *c, *prev;
+ struct glx_context *c, *prev;
if (cx == glxAllContexts)
glxAllContexts = cx->next;
@@ -198,7 +207,7 @@ static void __glXRemoveFromContextList(__GLXcontext *cx)
/*
** Free a context.
*/
-GLboolean __glXFreeContext(__GLXcontext *cx)
+GLboolean __glXFreeContext(struct glx_context *cx)
{
if (cx->idExists || cx->isCurrent) return GL_FALSE;
@@ -283,7 +292,7 @@ glxClientCallback (CallbackListPtr *list,
NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
ClientPtr pClient = clientinfo->client;
__GLXclientState *cl = glxGetClient(pClient);
- __GLXcontext *cx;
+ struct glx_context *cx;
int i;
switch (pClient->clientState) {
@@ -411,18 +420,18 @@ void __glXFlushContextCache(void)
** Make a context the current one for the GL (in this implementation, there
** is only one instance of the GL, and we use it to serve all GL clients by
** switching it between different contexts). While we are at it, look up
-** a context by its tag and return its (__GLXcontext *).
+** a context by its tag and return its (struct glx_context *).
*/
-__GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
+struct glx_context *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
int *error)
{
- __GLXcontext *cx;
+ struct glx_context *cx;
/*
** See if the context tag is legal; it is managed by the extension,
** so if it's invalid, we have an implementation error.
*/
- cx = (__GLXcontext *) __glXLookupContextByTag(cl, tag);
+ cx = (struct glx_context *) __glXLookupContextByTag(cl, tag);
if (!cx) {
cl->client->errorValue = tag;
*error = __glXError(GLXBadContextTag);
@@ -478,7 +487,7 @@ void glxSuspendClients(void)
void glxResumeClients(void)
{
- __GLXcontext *cx, *next;
+ struct glx_context *cx, *next;
int i;
glxBlockClients = FALSE;
diff --git a/xorg-server/glx/glxext.h b/xorg-server/glx/glxext.h
index 7008c4763..f244f80e3 100644
--- a/xorg-server/glx/glxext.h
+++ b/xorg-server/glx/glxext.h
@@ -35,10 +35,10 @@
* Silicon Graphics, Inc.
*/
-extern GLboolean __glXFreeContext(__GLXcontext *glxc);
+extern GLboolean __glXFreeContext(struct glx_context *glxc);
extern void __glXFlushContextCache(void);
-extern void __glXAddToContextList(__GLXcontext *cx);
+extern void __glXAddToContextList(struct glx_context *cx);
extern void __glXErrorCallBack(GLenum code);
extern void __glXClearErrorOccured(void);
extern GLboolean __glXErrorOccured(void);
diff --git a/xorg-server/glx/glxscreens.c b/xorg-server/glx/glxscreens.c
index 060dfaccd..ce513dda7 100644
--- a/xorg-server/glx/glxscreens.c
+++ b/xorg-server/glx/glxscreens.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <GL/glxtokens.h>
@@ -398,6 +402,10 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
if (i == pScreen->numVisuals)
continue;
+ /* Make sure the FBconfig supports window drawables */
+ if (!(config->drawableType & GLX_WINDOW_BIT))
+ continue;
+
/* Create a new X visual for our FBconfig. */
visual = AddScreenVisuals(pScreen, 1, depth);
if (visual == NULL)
diff --git a/xorg-server/glx/glxscreens.h b/xorg-server/glx/glxscreens.h
index 0fb0fd17d..e39034243 100644
--- a/xorg-server/glx/glxscreens.h
+++ b/xorg-server/glx/glxscreens.h
@@ -115,9 +115,9 @@ typedef struct __GLXscreen __GLXscreen;
struct __GLXscreen {
void (*destroy) (__GLXscreen *screen);
- __GLXcontext *(*createContext) (__GLXscreen *screen,
+ struct glx_context *(*createContext) (__GLXscreen *screen,
__GLXconfig *modes,
- __GLXcontext *shareContext);
+ struct glx_context *shareContext);
__GLXdrawable *(*createDrawable)(ClientPtr client,
__GLXscreen *context,
@@ -142,7 +142,6 @@ struct __GLXscreen {
char *GLextensions;
char *GLXvendor;
- char *GLXversion;
char *GLXextensions;
/**
diff --git a/xorg-server/glx/glxserver.h b/xorg-server/glx/glxserver.h
index 1daf97758..b9d3933e5 100644
--- a/xorg-server/glx/glxserver.h
+++ b/xorg-server/glx/glxserver.h
@@ -1,254 +1,255 @@
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _GLX_server_h_
-#define _GLX_server_h_
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/Xmd.h>
-#include <misc.h>
-#include <dixstruct.h>
-#include <pixmapstr.h>
-#include <gcstruct.h>
-#include <extnsionst.h>
-#include <resource.h>
-#include <scrnintstr.h>
-
-/*
-** The X header misc.h defines these math functions.
-*/
-#undef abs
-#undef fabs
-
-#define GL_GLEXT_PROTOTYPES /* we want prototypes */
-#include <GL/gl.h>
-#include <GL/glxproto.h>
-
-/*
-** GLX resources.
-*/
-typedef XID GLXContextID;
-typedef XID GLXPixmap;
-typedef XID GLXDrawable;
-
-typedef struct __GLXclientStateRec __GLXclientState;
-typedef struct __GLXdrawable __GLXdrawable;
-typedef struct __GLXcontext __GLXcontext;
-
-#include "glxscreens.h"
-#include "glxdrawable.h"
-#include "glxcontext.h"
-
-#ifndef True
-#define True 1
-#endif
-#ifndef False
-#define False 0
-#endif
-
-extern __GLXscreen *glxGetScreen(ScreenPtr pScreen);
-extern __GLXclientState *glxGetClient(ClientPtr pClient);
-
-/************************************************************************/
-
-void GlxExtensionInit(void);
-
-void GlxSetVisualConfigs(int nconfigs,
- void *configs, void **privates);
-
-void __glXScreenInitVisuals(__GLXscreen *screen);
-
-/*
-** The last context used (from the server's persective) is cached.
-*/
-extern __GLXcontext *__glXLastContext;
-extern __GLXcontext *__glXForceCurrent(__GLXclientState*, GLXContextTag, int*);
-
-extern ClientPtr __pGlxClient;
-
-int __glXError(int error);
-
-/*
-** Macros to set, unset, and retrieve the flag that says whether a context
-** has unflushed commands.
-*/
-#define __GLX_NOTE_UNFLUSHED_CMDS(glxc) glxc->hasUnflushedCommands = GL_TRUE
-#define __GLX_NOTE_FLUSHED_CMDS(glxc) glxc->hasUnflushedCommands = GL_FALSE
-#define __GLX_HAS_UNFLUSHED_CMDS(glxc) (glxc->hasUnflushedCommands)
-
-/************************************************************************/
-
-typedef struct __GLXprovider __GLXprovider;
-struct __GLXprovider {
- __GLXscreen *(*screenProbe)(ScreenPtr pScreen);
- const char *name;
- __GLXprovider *next;
-};
-
-void GlxPushProvider(__GLXprovider *provider);
-
-enum {
- GLX_MINIMAL_VISUALS,
- GLX_TYPICAL_VISUALS,
- GLX_ALL_VISUALS
-};
-
-void __glXsetEnterLeaveServerFuncs(void (*enter)(GLboolean),
- void (*leave)(GLboolean));
-void __glXenterServer(GLboolean rendering);
-void __glXleaveServer(GLboolean rendering);
-
-void glxSuspendClients(void);
-void glxResumeClients(void);
-
-/*
-** State kept per client.
-*/
-struct __GLXclientStateRec {
- /*
- ** Whether this structure is currently being used to support a client.
- */
- Bool inUse;
-
- /*
- ** Buffer for returned data.
- */
- GLbyte *returnBuf;
- GLint returnBufSize;
-
- /*
- ** Keep track of large rendering commands, which span multiple requests.
- */
- GLint largeCmdBytesSoFar; /* bytes received so far */
- GLint largeCmdBytesTotal; /* total bytes expected */
- GLint largeCmdRequestsSoFar; /* requests received so far */
- GLint largeCmdRequestsTotal; /* total requests expected */
- GLbyte *largeCmdBuf;
- GLint largeCmdBufSize;
-
- /*
- ** Keep a list of all the contexts that are current for this client's
- ** threads.
- */
- __GLXcontext **currentContexts;
- GLint numCurrentContexts;
-
- /* Back pointer to X client record */
- ClientPtr client;
-
- int GLClientmajorVersion;
- int GLClientminorVersion;
- char *GLClientextensions;
-};
-
-/************************************************************************/
-
-/*
-** Dispatch tables.
-*/
-typedef void (*__GLXdispatchRenderProcPtr)(GLbyte *);
-typedef int (*__GLXdispatchSingleProcPtr)(__GLXclientState *, GLbyte *);
-typedef int (*__GLXdispatchVendorPrivProcPtr)(__GLXclientState *, GLbyte *);
-
-/*
- * Dispatch for GLX commands.
- */
-typedef int (*__GLXprocPtr)(__GLXclientState *, char *pc);
-
-/*
- * Tables for computing the size of each rendering command.
- */
-typedef int (*gl_proto_size_func)(const GLbyte *, Bool);
-
-typedef struct {
- int bytes;
- gl_proto_size_func varsize;
-} __GLXrenderSizeData;
-
-/************************************************************************/
-
-/*
-** X resources.
-*/
-extern RESTYPE __glXContextRes;
-extern RESTYPE __glXClientRes;
-extern RESTYPE __glXPixmapRes;
-extern RESTYPE __glXDrawableRes;
-
-/************************************************************************/
-
-/*
-** Prototypes.
-*/
-
-extern char *__glXcombine_strings(const char *, const char *);
-
-/*
-** Routines for sending swapped replies.
-*/
-
-extern void __glXSwapMakeCurrentReply(ClientPtr client,
- xGLXMakeCurrentReply *reply);
-extern void __glXSwapIsDirectReply(ClientPtr client,
- xGLXIsDirectReply *reply);
-extern void __glXSwapQueryVersionReply(ClientPtr client,
- xGLXQueryVersionReply *reply);
-extern void __glXSwapQueryContextInfoEXTReply(ClientPtr client,
- xGLXQueryContextInfoEXTReply *reply,
- int *buf);
-extern void __glXSwapGetDrawableAttributesReply(ClientPtr client,
- xGLXGetDrawableAttributesReply *reply, CARD32 *buf);
-extern void glxSwapQueryExtensionsStringReply(ClientPtr client,
- xGLXQueryExtensionsStringReply *reply, char *buf);
-extern void glxSwapQueryServerStringReply(ClientPtr client,
- xGLXQueryServerStringReply *reply, char *buf);
-
-
-/*
- * Routines for computing the size of variably-sized rendering commands.
- */
-
-extern int __glXTypeSize(GLenum enm);
-extern int __glXImageSize(GLenum format, GLenum type,
- GLenum target, GLsizei w, GLsizei h, GLsizei d,
- GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows,
- GLint alignment);
-
-extern unsigned glxMajorVersion;
-extern unsigned glxMinorVersion;
-
-extern int __glXEventBase;
-
-#endif /* !__GLX_server_h__ */
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _GLX_server_h_
+#define _GLX_server_h_
+
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/Xmd.h>
+#include <misc.h>
+#include <dixstruct.h>
+#include <pixmapstr.h>
+#include <gcstruct.h>
+#include <extnsionst.h>
+#include <resource.h>
+#include <scrnintstr.h>
+
+/*
+** The X header misc.h defines these math functions.
+*/
+#undef abs
+#undef fabs
+
+#define GL_GLEXT_PROTOTYPES /* we want prototypes */
+#include <GL/gl.h>
+#include <GL/glext.h>
+#include <GL/glxproto.h>
+
+/*
+** GLX resources.
+*/
+typedef XID GLXContextID;
+typedef XID GLXPixmap;
+typedef XID GLXDrawable;
+
+typedef struct __GLXclientStateRec __GLXclientState;
+typedef struct __GLXdrawable __GLXdrawable;
+typedef struct glx_context glx_context;
+
+#include "glxscreens.h"
+#include "glxdrawable.h"
+#include "glxcontext.h"
+
+#ifndef True
+#define True 1
+#endif
+#ifndef False
+#define False 0
+#endif
+
+extern __GLXscreen *glxGetScreen(ScreenPtr pScreen);
+extern __GLXclientState *glxGetClient(ClientPtr pClient);
+
+/************************************************************************/
+
+void GlxExtensionInit(void);
+
+void GlxSetVisualConfigs(int nconfigs,
+ void *configs, void **privates);
+
+void __glXScreenInitVisuals(__GLXscreen *screen);
+
+/*
+** The last context used (from the server's persective) is cached.
+*/
+extern struct glx_context *__glXLastContext;
+extern struct glx_context *__glXForceCurrent(__GLXclientState*, GLXContextTag, int*);
+
+extern ClientPtr __pGlxClient;
+
+int __glXError(int error);
+
+/*
+** Macros to set, unset, and retrieve the flag that says whether a context
+** has unflushed commands.
+*/
+#define __GLX_NOTE_UNFLUSHED_CMDS(glxc) glxc->hasUnflushedCommands = GL_TRUE
+#define __GLX_NOTE_FLUSHED_CMDS(glxc) glxc->hasUnflushedCommands = GL_FALSE
+#define __GLX_HAS_UNFLUSHED_CMDS(glxc) (glxc->hasUnflushedCommands)
+
+/************************************************************************/
+
+typedef struct __GLXprovider __GLXprovider;
+struct __GLXprovider {
+ __GLXscreen *(*screenProbe)(ScreenPtr pScreen);
+ const char *name;
+ __GLXprovider *next;
+};
+
+void GlxPushProvider(__GLXprovider *provider);
+
+enum {
+ GLX_MINIMAL_VISUALS,
+ GLX_TYPICAL_VISUALS,
+ GLX_ALL_VISUALS
+};
+
+void __glXsetEnterLeaveServerFuncs(void (*enter)(GLboolean),
+ void (*leave)(GLboolean));
+void __glXenterServer(GLboolean rendering);
+void __glXleaveServer(GLboolean rendering);
+
+void glxSuspendClients(void);
+void glxResumeClients(void);
+
+/*
+** State kept per client.
+*/
+struct __GLXclientStateRec {
+ /*
+ ** Whether this structure is currently being used to support a client.
+ */
+ Bool inUse;
+
+ /*
+ ** Buffer for returned data.
+ */
+ GLbyte *returnBuf;
+ GLint returnBufSize;
+
+ /*
+ ** Keep track of large rendering commands, which span multiple requests.
+ */
+ GLint largeCmdBytesSoFar; /* bytes received so far */
+ GLint largeCmdBytesTotal; /* total bytes expected */
+ GLint largeCmdRequestsSoFar; /* requests received so far */
+ GLint largeCmdRequestsTotal; /* total requests expected */
+ GLbyte *largeCmdBuf;
+ GLint largeCmdBufSize;
+
+ /*
+ ** Keep a list of all the contexts that are current for this client's
+ ** threads.
+ */
+ struct glx_context **currentContexts;
+ GLint numCurrentContexts;
+
+ /* Back pointer to X client record */
+ ClientPtr client;
+
+ int GLClientmajorVersion;
+ int GLClientminorVersion;
+ char *GLClientextensions;
+};
+
+/************************************************************************/
+
+/*
+** Dispatch tables.
+*/
+typedef void (*__GLXdispatchRenderProcPtr)(GLbyte *);
+typedef int (*__GLXdispatchSingleProcPtr)(__GLXclientState *, GLbyte *);
+typedef int (*__GLXdispatchVendorPrivProcPtr)(__GLXclientState *, GLbyte *);
+
+/*
+ * Dispatch for GLX commands.
+ */
+typedef int (*__GLXprocPtr)(__GLXclientState *, char *pc);
+
+/*
+ * Tables for computing the size of each rendering command.
+ */
+typedef int (*gl_proto_size_func)(const GLbyte *, Bool);
+
+typedef struct {
+ int bytes;
+ gl_proto_size_func varsize;
+} __GLXrenderSizeData;
+
+/************************************************************************/
+
+/*
+** X resources.
+*/
+extern RESTYPE __glXContextRes;
+extern RESTYPE __glXClientRes;
+extern RESTYPE __glXPixmapRes;
+extern RESTYPE __glXDrawableRes;
+
+/************************************************************************/
+
+/*
+** Prototypes.
+*/
+
+extern char *__glXcombine_strings(const char *, const char *);
+
+/*
+** Routines for sending swapped replies.
+*/
+
+extern void __glXSwapMakeCurrentReply(ClientPtr client,
+ xGLXMakeCurrentReply *reply);
+extern void __glXSwapIsDirectReply(ClientPtr client,
+ xGLXIsDirectReply *reply);
+extern void __glXSwapQueryVersionReply(ClientPtr client,
+ xGLXQueryVersionReply *reply);
+extern void __glXSwapQueryContextInfoEXTReply(ClientPtr client,
+ xGLXQueryContextInfoEXTReply *reply,
+ int *buf);
+extern void __glXSwapGetDrawableAttributesReply(ClientPtr client,
+ xGLXGetDrawableAttributesReply *reply, CARD32 *buf);
+extern void glxSwapQueryExtensionsStringReply(ClientPtr client,
+ xGLXQueryExtensionsStringReply *reply, char *buf);
+extern void glxSwapQueryServerStringReply(ClientPtr client,
+ xGLXQueryServerStringReply *reply, char *buf);
+
+
+/*
+ * Routines for computing the size of variably-sized rendering commands.
+ */
+
+extern int __glXTypeSize(GLenum enm);
+extern int __glXImageSize(GLenum format, GLenum type,
+ GLenum target, GLsizei w, GLsizei h, GLsizei d,
+ GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows,
+ GLint alignment);
+
+extern unsigned glxMajorVersion;
+extern unsigned glxMinorVersion;
+
+extern int __glXEventBase;
+
+#endif /* !__GLX_server_h__ */
diff --git a/xorg-server/glx/glxutil.h b/xorg-server/glx/glxutil.h
index d1a715b4b..5f699a6d8 100644
--- a/xorg-server/glx/glxutil.h
+++ b/xorg-server/glx/glxutil.h
@@ -42,7 +42,7 @@ extern GLboolean __glXDrawableInit(__GLXdrawable *drawable,
extern void __glXDrawableRelease(__GLXdrawable *drawable);
/* context helper routines */
-extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag);
+extern struct glx_context *__glXLookupContextByTag(__GLXclientState*, GLXContextTag);
/* init helper routines */
extern void *__glXglDDXScreenInfo(void);
diff --git a/xorg-server/glx/indirect_dispatch.c b/xorg-server/glx/indirect_dispatch.c
index ecd2bc8de..20d32b105 100644
--- a/xorg-server/glx/indirect_dispatch.c
+++ b/xorg-server/glx/indirect_dispatch.c
@@ -24,6 +24,13 @@
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
+#endif
#include <X11/Xmd.h>
#include <GL/gl.h>
@@ -56,7 +63,7 @@ int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -74,7 +81,7 @@ int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -109,7 +116,7 @@ int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -127,7 +134,7 @@ int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1659,7 +1666,7 @@ int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1677,7 +1684,7 @@ int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1767,7 +1774,7 @@ int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1795,7 +1802,7 @@ int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1815,7 +1822,7 @@ int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1843,7 +1850,7 @@ int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1860,7 +1867,7 @@ int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1888,7 +1895,7 @@ int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1916,7 +1923,7 @@ int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1945,7 +1952,7 @@ int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1974,7 +1981,7 @@ int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2004,7 +2011,7 @@ int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2034,7 +2041,7 @@ int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2064,7 +2071,7 @@ int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2093,7 +2100,7 @@ int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2122,7 +2129,7 @@ int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2150,7 +2157,7 @@ int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2178,7 +2185,7 @@ int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2206,7 +2213,7 @@ int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2235,7 +2242,7 @@ int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2264,7 +2271,7 @@ int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2293,7 +2300,7 @@ int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2322,7 +2329,7 @@ int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2351,7 +2358,7 @@ int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2380,7 +2387,7 @@ int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2409,7 +2416,7 @@ int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2439,7 +2446,7 @@ int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2469,7 +2476,7 @@ int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2488,7 +2495,7 @@ int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2734,7 +2741,7 @@ int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2759,7 +2766,7 @@ int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -2837,7 +2844,7 @@ int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2857,7 +2864,7 @@ int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -2877,7 +2884,7 @@ int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2900,7 +2907,7 @@ int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -2923,7 +2930,7 @@ int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2942,7 +2949,7 @@ int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3098,7 +3105,7 @@ int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3127,7 +3134,7 @@ int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3156,7 +3163,7 @@ int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3185,7 +3192,7 @@ int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3361,7 +3368,7 @@ int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3390,7 +3397,7 @@ int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3419,7 +3426,7 @@ int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3448,7 +3455,7 @@ int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3477,7 +3484,7 @@ int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3506,7 +3513,7 @@ int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3535,7 +3542,7 @@ int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3564,7 +3571,7 @@ int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3593,7 +3600,7 @@ int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3622,7 +3629,7 @@ int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3651,7 +3658,7 @@ int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3680,7 +3687,7 @@ int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4085,7 +4092,7 @@ int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4106,7 +4113,7 @@ int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4127,7 +4134,7 @@ int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4148,7 +4155,7 @@ int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4169,7 +4176,7 @@ int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4198,7 +4205,7 @@ int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4227,7 +4234,7 @@ int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4256,7 +4263,7 @@ int __glXDisp_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4567,7 +4574,7 @@ int __glXDisp_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4594,7 +4601,7 @@ int __glXDisp_GenQueriesARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4617,7 +4624,7 @@ int __glXDisp_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4646,7 +4653,7 @@ int __glXDisp_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4675,7 +4682,7 @@ int __glXDisp_GetQueryivARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4704,7 +4711,7 @@ int __glXDisp_IsQueryARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4729,6 +4736,17 @@ void __glXDisp_DrawBuffersARB(GLbyte * pc)
) );
}
+void __glXDisp_RenderbufferStorageMultisample(GLbyte * pc)
+{
+ CALL_RenderbufferStorageMultisample( GET_DISPATCH(), (
+ *(GLenum *)(pc + 0),
+ *(GLsizei *)(pc + 4),
+ *(GLenum *)(pc + 8),
+ *(GLsizei *)(pc + 12),
+ *(GLsizei *)(pc + 16)
+ ) );
+}
+
void __glXDisp_SampleMaskSGIS(GLbyte * pc)
{
CALL_SampleMaskSGIS( GET_DISPATCH(), (
@@ -4870,7 +4888,7 @@ int __glXDisp_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4903,7 +4921,7 @@ int __glXDisp_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4932,7 +4950,7 @@ int __glXDisp_GenProgramsNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4955,7 +4973,7 @@ int __glXDisp_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4977,7 +4995,7 @@ int __glXDisp_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4999,7 +5017,7 @@ int __glXDisp_GetProgramivNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5028,7 +5046,7 @@ int __glXDisp_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5050,7 +5068,7 @@ int __glXDisp_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5079,7 +5097,7 @@ int __glXDisp_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5108,7 +5126,7 @@ int __glXDisp_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5137,7 +5155,7 @@ int __glXDisp_IsProgramNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5166,7 +5184,7 @@ void __glXDisp_LoadProgramNV(GLbyte * pc)
void __glXDisp_ProgramParameters4dvNV(GLbyte * pc)
{
- const GLuint num = *(GLuint *)(pc + 8);
+ const GLsizei num = *(GLsizei *)(pc + 8);
#ifdef __GLX_ALIGN64
const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4;
@@ -5186,7 +5204,7 @@ void __glXDisp_ProgramParameters4dvNV(GLbyte * pc)
void __glXDisp_ProgramParameters4fvNV(GLbyte * pc)
{
- const GLuint num = *(GLuint *)(pc + 8);
+ const GLsizei num = *(GLsizei *)(pc + 8);
CALL_ProgramParameters4fvNV( GET_DISPATCH(), (
*(GLenum *)(pc + 0),
@@ -5555,7 +5573,7 @@ int __glXDisp_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5579,7 +5597,7 @@ int __glXDisp_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5659,7 +5677,7 @@ int __glXDisp_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5742,7 +5760,7 @@ int __glXDisp_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5765,7 +5783,7 @@ int __glXDisp_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5795,7 +5813,7 @@ int __glXDisp_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyt
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5817,7 +5835,7 @@ int __glXDisp_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5838,7 +5856,7 @@ int __glXDisp_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5857,7 +5875,7 @@ int __glXDisp_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5882,3 +5900,30 @@ void __glXDisp_RenderbufferStorageEXT(GLbyte * pc)
) );
}
+void __glXDisp_BlitFramebufferEXT(GLbyte * pc)
+{
+ CALL_BlitFramebufferEXT( GET_DISPATCH(), (
+ *(GLint *)(pc + 0),
+ *(GLint *)(pc + 4),
+ *(GLint *)(pc + 8),
+ *(GLint *)(pc + 12),
+ *(GLint *)(pc + 16),
+ *(GLint *)(pc + 20),
+ *(GLint *)(pc + 24),
+ *(GLint *)(pc + 28),
+ *(GLbitfield *)(pc + 32),
+ *(GLenum *)(pc + 36)
+ ) );
+}
+
+void __glXDisp_FramebufferTextureLayerEXT(GLbyte * pc)
+{
+ CALL_FramebufferTextureLayerEXT( GET_DISPATCH(), (
+ *(GLenum *)(pc + 0),
+ *(GLenum *)(pc + 4),
+ *(GLuint *)(pc + 8),
+ *(GLint *)(pc + 12),
+ *(GLint *)(pc + 16)
+ ) );
+}
+
diff --git a/xorg-server/glx/indirect_dispatch.h b/xorg-server/glx/indirect_dispatch.h
index 47490ea3e..12e09cd97 100644
--- a/xorg-server/glx/indirect_dispatch.h
+++ b/xorg-server/glx/indirect_dispatch.h
@@ -28,7 +28,7 @@
#if !defined( _INDIRECT_DISPATCH_H_ )
# define _INDIRECT_DISPATCH_H_
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define HIDDEN __attribute__((visibility("hidden")))
# else
# define HIDDEN
@@ -59,6 +59,8 @@ extern HIDDEN void __glXDisp_TexCoord4sv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord4sv(GLbyte * pc);
extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc);
+extern HIDDEN void __glXDisp_BlitFramebufferEXT(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_BlitFramebufferEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc);
extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
@@ -109,6 +111,8 @@ extern HIDDEN void __glXDisp_Vertex3dv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Vertex3dv(GLbyte * pc);
extern HIDDEN void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc);
+extern HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_LightModeliv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LightModeliv(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib1svARB(GLbyte * pc);
@@ -119,8 +123,8 @@ extern HIDDEN void __glXDisp_Normal3bv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc);
extern HIDDEN int __glXDisp_VendorPrivate(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_VendorPrivate(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc);
@@ -135,6 +139,8 @@ extern HIDDEN void __glXDisp_Normal3iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc);
extern HIDDEN void __glXDisp_PassThrough(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PassThrough(GLbyte * pc);
+extern HIDDEN void __glXDisp_FramebufferTextureLayerEXT(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_FramebufferTextureLayerEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_Viewport(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Viewport(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc);
@@ -191,8 +197,6 @@ extern HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, GLbyte *)
extern HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_Scaled(GLbyte * pc);
@@ -221,8 +225,8 @@ extern HIDDEN void __glXDisp_DrawPixels(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc);
extern HIDDEN void __glXDisp_MultiTexCoord2svARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc);
+extern HIDDEN void __glXDisp_MultiTexCoord3svARB(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc);
extern HIDDEN void __glXDisp_GenerateMipmapEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc);
extern HIDDEN int __glXDisp_GenLists(struct __GLXclientStateRec *, GLbyte *);
@@ -297,6 +301,8 @@ extern HIDDEN void __glXDisp_ConvolutionParameterfv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc);
extern HIDDEN int __glXDisp_GetTexGendv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetTexGendv(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDisp_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDispSwap_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_LoadProgramNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LoadProgramNV(GLbyte * pc);
extern HIDDEN int __glXDisp_EndList(struct __GLXclientStateRec *, GLbyte *);
@@ -333,16 +339,14 @@ extern HIDDEN void __glXDisp_End(GLbyte * pc);
extern HIDDEN void __glXDispSwap_End(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttribs2dvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc);
+extern HIDDEN int __glXDisp_CreateContextAttribsARB(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDispSwap_CreateContextAttribsARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc);
extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc);
extern HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc);
-extern HIDDEN void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_TexGenfv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4bvARB(GLbyte * pc);
@@ -361,6 +365,8 @@ extern HIDDEN void __glXDisp_TexCoord3dv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord3dv(GLbyte * pc);
extern HIDDEN void __glXDisp_Indexdv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Indexdv(GLbyte * pc);
+extern HIDDEN void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_PushName(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PushName(GLbyte * pc);
extern HIDDEN void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc);
@@ -383,8 +389,8 @@ extern HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *
extern HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_StencilOp(GLbyte * pc);
extern HIDDEN void __glXDispSwap_StencilOp(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord3svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc);
+extern HIDDEN void __glXDisp_Ortho(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_Ortho(GLbyte * pc);
extern HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc);
extern HIDDEN int __glXDisp_QueryServerString(struct __GLXclientStateRec *, GLbyte *);
@@ -403,6 +409,8 @@ extern HIDDEN int __glXDisp_DeleteLists(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_DeleteLists(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_LogicOp(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc);
+extern HIDDEN void __glXDisp_RenderbufferStorageMultisample(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_RenderbufferStorageMultisample(GLbyte * pc);
extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc);
extern HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *);
@@ -421,8 +429,6 @@ extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc);
extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc);
extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc);
@@ -433,8 +439,8 @@ extern HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc);
extern HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc);
+extern HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_DepthFunc(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc);
extern HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc);
@@ -519,8 +525,6 @@ extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc);
extern HIDDEN int __glXDisp_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc);
extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc);
@@ -557,6 +561,8 @@ extern HIDDEN void __glXDisp_VertexAttrib4NivARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc);
extern HIDDEN void __glXDisp_Materialiv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Materialiv(GLbyte * pc);
+extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc);
extern HIDDEN void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc);
@@ -577,12 +583,8 @@ extern HIDDEN void __glXDisp_TexGend(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexGend(GLbyte * pc);
extern HIDDEN int __glXDisp_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_VertexAttrib2svNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc);
extern HIDDEN int __glXDisp_DestroyWindow(struct __GLXclientStateRec *, GLbyte *);
@@ -603,6 +605,8 @@ extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDisp_SetClientInfo2ARB(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDispSwap_SetClientInfo2ARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *);
@@ -661,8 +665,6 @@ extern HIDDEN void __glXDisp_Lightf(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Lightf(GLbyte * pc);
extern HIDDEN void __glXDisp_MatrixMode(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MatrixMode(GLbyte * pc);
-extern HIDDEN void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc);
extern HIDDEN int __glXDisp_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Lighti(GLbyte * pc);
@@ -771,8 +773,8 @@ extern HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ReadBuffer(GLbyte * pc);
extern HIDDEN void __glXDisp_ConvolutionParameteri(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ConvolutionParameteri(GLbyte * pc);
-extern HIDDEN void __glXDisp_Ortho(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Ortho(GLbyte * pc);
+extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc);
extern HIDDEN void __glXDisp_ListBase(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ListBase(GLbyte * pc);
extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc);
@@ -797,6 +799,8 @@ extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc);
+extern HIDDEN int __glXDisp_SetClientInfoARB(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDispSwap_SetClientInfoARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc);
@@ -805,6 +809,8 @@ extern HIDDEN int __glXDisp_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyt
extern HIDDEN int __glXDispSwap_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_EvalMesh1(GLbyte * pc);
extern HIDDEN void __glXDispSwap_EvalMesh1(GLbyte * pc);
+extern HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_Vertex2iv(GLbyte * pc);
@@ -955,6 +961,8 @@ extern HIDDEN int __glXDisp_QueryContext(struct __GLXclientStateRec *, GLbyte *)
extern HIDDEN int __glXDispSwap_QueryContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_SecondaryColor3svEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc);
+extern HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_IndexMask(GLbyte * pc);
extern HIDDEN void __glXDispSwap_IndexMask(GLbyte * pc);
extern HIDDEN void __glXDisp_BindProgramNV(GLbyte * pc);
@@ -989,6 +997,8 @@ extern HIDDEN int __glXDisp_AreProgramsResidentNV(struct __GLXclientStateRec *,
extern HIDDEN int __glXDispSwap_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_CopyColorSubTable(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CopyColorSubTable(GLbyte * pc);
+extern HIDDEN void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc);
+extern HIDDEN void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib3dvNV(GLbyte * pc);
@@ -1037,6 +1047,8 @@ extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc);
extern HIDDEN void __glXDisp_Vertex3fv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Vertex3fv(GLbyte * pc);
+extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
+extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_VertexAttrib4dvNV(GLbyte * pc);
diff --git a/xorg-server/glx/indirect_dispatch_swap.c b/xorg-server/glx/indirect_dispatch_swap.c
index 3221c809d..c606a5e5e 100644
--- a/xorg-server/glx/indirect_dispatch_swap.c
+++ b/xorg-server/glx/indirect_dispatch_swap.c
@@ -24,6 +24,13 @@
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
+#endif
#include <X11/Xmd.h>
#include <GL/gl.h>
@@ -76,6 +83,14 @@ bswap_ENUM( const void * src )
return x.ret;
}
+static GLsync
+bswap_CARD64( const void * src )
+{
+ union { uint64_t dst; GLsync ret; } x;
+ x.dst = bswap_64( *(uint64_t *) src );
+ return x.ret;
+}
+
static GLdouble
bswap_FLOAT64( const void * src )
{
@@ -135,7 +150,7 @@ int __glXDispSwap_NewList(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -153,7 +168,7 @@ int __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -206,7 +221,7 @@ int __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -224,7 +239,7 @@ int __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -255,7 +270,7 @@ void __glXDispSwap_Begin(GLbyte * pc)
void __glXDispSwap_Bitmap(GLbyte * pc)
{
- const GLubyte * const bitmap = (const GLubyte *) (pc + 44);
+ const GLubyte * const bitmap = (const GLubyte *) ((pc + 44));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
@@ -1132,7 +1147,7 @@ void __glXDispSwap_PolygonMode(GLbyte * pc)
void __glXDispSwap_PolygonStipple(GLbyte * pc)
{
- const GLubyte * const mask = (const GLubyte *) (pc + 20);
+ const GLubyte * const mask = (const GLubyte *) ((pc + 20));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
@@ -1211,7 +1226,7 @@ void __glXDispSwap_TexParameteriv(GLbyte * pc)
void __glXDispSwap_TexImage1D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 52);
+ const GLvoid * const pixels = (const GLvoid *) ((pc + 52));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
@@ -1235,7 +1250,7 @@ void __glXDispSwap_TexImage1D(GLbyte * pc)
void __glXDispSwap_TexImage2D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 52);
+ const GLvoid * const pixels = (const GLvoid *) ((pc + 52));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
@@ -1756,7 +1771,7 @@ int __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1774,7 +1789,7 @@ int __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1841,7 +1856,7 @@ void __glXDispSwap_CopyPixels(GLbyte * pc)
void __glXDispSwap_DrawPixels(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 36);
+ const GLvoid * const pixels = (const GLvoid *) ((pc + 36));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
@@ -1864,7 +1879,7 @@ int __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1892,7 +1907,7 @@ int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1913,7 +1928,7 @@ int __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1942,7 +1957,7 @@ int __glXDispSwap_GetError(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1959,7 +1974,7 @@ int __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -1988,7 +2003,7 @@ int __glXDispSwap_GetIntegerv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2017,7 +2032,7 @@ int __glXDispSwap_GetLightfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2047,7 +2062,7 @@ int __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2077,7 +2092,7 @@ int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2108,7 +2123,7 @@ int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2139,7 +2154,7 @@ int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2170,7 +2185,7 @@ int __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2200,7 +2215,7 @@ int __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2230,7 +2245,7 @@ int __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2259,7 +2274,7 @@ int __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2288,7 +2303,7 @@ int __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2317,7 +2332,7 @@ int __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2347,7 +2362,7 @@ int __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2377,7 +2392,7 @@ int __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2407,7 +2422,7 @@ int __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2437,7 +2452,7 @@ int __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2467,7 +2482,7 @@ int __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2497,7 +2512,7 @@ int __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2527,7 +2542,7 @@ int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2558,7 +2573,7 @@ int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2589,7 +2604,7 @@ int __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2608,7 +2623,7 @@ int __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2854,7 +2869,7 @@ int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2879,7 +2894,7 @@ int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -2957,7 +2972,7 @@ int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -2977,7 +2992,7 @@ int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -2997,7 +3012,7 @@ int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3021,7 +3036,7 @@ int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3045,7 +3060,7 @@ int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3064,7 +3079,7 @@ int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3092,7 +3107,7 @@ void __glXDispSwap_PrioritizeTextures(GLbyte * pc)
void __glXDispSwap_TexSubImage1D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 56);
+ const GLvoid * const pixels = (const GLvoid *) ((pc + 56));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
@@ -3115,7 +3130,7 @@ void __glXDispSwap_TexSubImage1D(GLbyte * pc)
void __glXDispSwap_TexSubImage2D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 56);
+ const GLvoid * const pixels = (const GLvoid *) ((pc + 56));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
@@ -3157,7 +3172,7 @@ void __glXDispSwap_BlendEquation(GLbyte * pc)
void __glXDispSwap_ColorTable(GLbyte * pc)
{
- const GLvoid * const table = (const GLvoid *) (pc + 40);
+ const GLvoid * const table = (const GLvoid *) ((pc + 40));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
@@ -3220,7 +3235,7 @@ int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3250,7 +3265,7 @@ int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3280,7 +3295,7 @@ int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3310,7 +3325,7 @@ int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3338,7 +3353,7 @@ int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
void __glXDispSwap_ColorSubTable(GLbyte * pc)
{
- const GLvoid * const data = (const GLvoid *) (pc + 40);
+ const GLvoid * const data = (const GLvoid *) ((pc + 40));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
@@ -3371,7 +3386,7 @@ void __glXDispSwap_CopyColorSubTable(GLbyte * pc)
void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc)
{
- const GLvoid * const image = (const GLvoid *) (pc + 44);
+ const GLvoid * const image = (const GLvoid *) ((pc + 44));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
@@ -3393,7 +3408,7 @@ void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc)
void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc)
{
- const GLvoid * const image = (const GLvoid *) (pc + 44);
+ const GLvoid * const image = (const GLvoid *) ((pc + 44));
__GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
@@ -3487,7 +3502,7 @@ int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3517,7 +3532,7 @@ int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3547,7 +3562,7 @@ int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3577,7 +3592,7 @@ int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3607,7 +3622,7 @@ int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3637,7 +3652,7 @@ int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3667,7 +3682,7 @@ int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3697,7 +3712,7 @@ int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3727,7 +3742,7 @@ int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3757,7 +3772,7 @@ int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3787,7 +3802,7 @@ int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -3817,7 +3832,7 @@ int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -3907,7 +3922,7 @@ void __glXDispSwap_TexImage3D(GLbyte * pc)
void __glXDispSwap_TexSubImage3D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 88);
+ const GLvoid * const pixels = (const GLvoid *) ((pc + 88));
__GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
@@ -4223,7 +4238,7 @@ int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4245,7 +4260,7 @@ int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4267,7 +4282,7 @@ int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4289,7 +4304,7 @@ int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4311,7 +4326,7 @@ int __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4341,7 +4356,7 @@ int __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4371,7 +4386,7 @@ int __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4401,7 +4416,7 @@ int __glXDispSwap_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -4713,7 +4728,7 @@ int __glXDispSwap_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4740,7 +4755,7 @@ int __glXDispSwap_GenQueriesARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4764,7 +4779,7 @@ int __glXDispSwap_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4794,7 +4809,7 @@ int __glXDispSwap_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4824,7 +4839,7 @@ int __glXDispSwap_GetQueryivARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4854,7 +4869,7 @@ int __glXDispSwap_IsQueryARB(__GLXclientState *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
@@ -4879,6 +4894,17 @@ void __glXDispSwap_DrawBuffersARB(GLbyte * pc)
) );
}
+void __glXDispSwap_RenderbufferStorageMultisample(GLbyte * pc)
+{
+ CALL_RenderbufferStorageMultisample( GET_DISPATCH(), (
+ (GLenum )bswap_ENUM ( pc + 0 ),
+ (GLsizei )bswap_CARD32 ( pc + 4 ),
+ (GLenum )bswap_ENUM ( pc + 8 ),
+ (GLsizei )bswap_CARD32 ( pc + 12 ),
+ (GLsizei )bswap_CARD32 ( pc + 16 )
+ ) );
+}
+
void __glXDispSwap_SampleMaskSGIS(GLbyte * pc)
{
CALL_SampleMaskSGIS( GET_DISPATCH(), (
@@ -5020,7 +5046,7 @@ int __glXDispSwap_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5053,7 +5079,7 @@ int __glXDispSwap_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5082,7 +5108,7 @@ int __glXDispSwap_GenProgramsNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5106,7 +5132,7 @@ int __glXDispSwap_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5129,7 +5155,7 @@ int __glXDispSwap_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5152,7 +5178,7 @@ int __glXDispSwap_GetProgramivNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5182,7 +5208,7 @@ int __glXDispSwap_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5205,7 +5231,7 @@ int __glXDispSwap_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5235,7 +5261,7 @@ int __glXDispSwap_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5265,7 +5291,7 @@ int __glXDispSwap_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5295,7 +5321,7 @@ int __glXDispSwap_IsProgramNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5324,7 +5350,7 @@ void __glXDispSwap_LoadProgramNV(GLbyte * pc)
void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc)
{
- const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 );
+ const GLsizei num = (GLsizei )bswap_CARD32 ( pc + 8 );
#ifdef __GLX_ALIGN64
const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4;
@@ -5344,7 +5370,7 @@ void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc)
void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc)
{
- const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 );
+ const GLsizei num = (GLsizei )bswap_CARD32 ( pc + 8 );
CALL_ProgramParameters4fvNV( GET_DISPATCH(), (
(GLenum )bswap_ENUM ( pc + 0 ),
@@ -5713,7 +5739,7 @@ int __glXDispSwap_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5738,7 +5764,7 @@ int __glXDispSwap_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5819,7 +5845,7 @@ int __glXDispSwap_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5902,7 +5928,7 @@ int __glXDispSwap_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5926,7 +5952,7 @@ int __glXDispSwap_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5957,7 +5983,7 @@ int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, G
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -5980,7 +6006,7 @@ int __glXDispSwap_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -6002,7 +6028,7 @@ int __glXDispSwap_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -6021,7 +6047,7 @@ int __glXDispSwap_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
if ( cx != NULL ) {
@@ -6046,3 +6072,30 @@ void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc)
) );
}
+void __glXDispSwap_BlitFramebufferEXT(GLbyte * pc)
+{
+ CALL_BlitFramebufferEXT( GET_DISPATCH(), (
+ (GLint )bswap_CARD32 ( pc + 0 ),
+ (GLint )bswap_CARD32 ( pc + 4 ),
+ (GLint )bswap_CARD32 ( pc + 8 ),
+ (GLint )bswap_CARD32 ( pc + 12 ),
+ (GLint )bswap_CARD32 ( pc + 16 ),
+ (GLint )bswap_CARD32 ( pc + 20 ),
+ (GLint )bswap_CARD32 ( pc + 24 ),
+ (GLint )bswap_CARD32 ( pc + 28 ),
+ (GLbitfield)bswap_CARD32 ( pc + 32 ),
+ (GLenum )bswap_ENUM ( pc + 36 )
+ ) );
+}
+
+void __glXDispSwap_FramebufferTextureLayerEXT(GLbyte * pc)
+{
+ CALL_FramebufferTextureLayerEXT( GET_DISPATCH(), (
+ (GLenum )bswap_ENUM ( pc + 0 ),
+ (GLenum )bswap_ENUM ( pc + 4 ),
+ (GLuint )bswap_CARD32 ( pc + 8 ),
+ (GLint )bswap_CARD32 ( pc + 12 ),
+ (GLint )bswap_CARD32 ( pc + 16 )
+ ) );
+}
+
diff --git a/xorg-server/glx/indirect_program.c b/xorg-server/glx/indirect_program.c
index 237da2908..14cf51fe3 100644
--- a/xorg-server/glx/indirect_program.c
+++ b/xorg-server/glx/indirect_program.c
@@ -31,6 +31,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include "glxserver.h"
@@ -44,7 +48,6 @@
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
-#include "glapioffsets.h"
static int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc,
unsigned get_programiv_offset, unsigned get_program_string_offset,
@@ -67,7 +70,7 @@ int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc,
xGLXVendorPrivateWithReplyReq * const req =
(xGLXVendorPrivateWithReplyReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, & error);
+ struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, & error);
ClientPtr client = cl->client;
diff --git a/xorg-server/glx/indirect_reqsize.c b/xorg-server/glx/indirect_reqsize.c
index 35bb9370f..6dc063705 100644
--- a/xorg-server/glx/indirect_reqsize.c
+++ b/xorg-server/glx/indirect_reqsize.c
@@ -25,6 +25,13 @@
* SOFTWARE.
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
+#endif
#include <GL/gl.h>
#include "glxserver.h"
@@ -39,21 +46,21 @@
#endif
#ifdef HAVE_ALIAS
# define ALIAS2(from,to) \
- int __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
+ GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
__attribute__ ((alias( # to )));
# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
#else
# define ALIAS(from,to) \
- int __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
+ GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
{ return __glX ## to ## ReqSize( pc, swap ); }
#endif
int
-__glXCallListsReqSize(const GLbyte *pc, Bool swap)
+__glXCallListsReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei n = *(GLsizei *) (pc + 0);
- GLenum type = *(GLenum *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 0);
+GLenum type = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -66,15 +73,15 @@ __glXCallListsReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXBitmapReqSize(const GLbyte *pc, Bool swap)
+__glXBitmapReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLsizei width = *(GLsizei *) (pc + 20);
- GLsizei height = *(GLsizei *) (pc + 24);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLsizei width = *(GLsizei *)(pc + 20);
+GLsizei height = *(GLsizei *)(pc + 24);
if (swap) {
row_length = bswap_32(row_length);
@@ -90,9 +97,9 @@ __glXBitmapReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXFogfvReqSize(const GLbyte *pc, Bool swap)
+__glXFogfvReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 0);
+GLenum pname = * (GLenum *)(pc + 0);
GLsizei compsize;
if (swap) {
@@ -104,9 +111,9 @@ __glXFogfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXLightfvReqSize(const GLbyte *pc, Bool swap)
+__glXLightfvReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -118,9 +125,9 @@ __glXLightfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXLightModelfvReqSize(const GLbyte *pc, Bool swap)
+__glXLightModelfvReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 0);
+GLenum pname = * (GLenum *)(pc + 0);
GLsizei compsize;
if (swap) {
@@ -132,9 +139,9 @@ __glXLightModelfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXMaterialfvReqSize(const GLbyte *pc, Bool swap)
+__glXMaterialfvReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -146,13 +153,13 @@ __glXMaterialfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap)
+__glXPolygonStippleReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
if (swap) {
row_length = bswap_32(row_length);
@@ -166,9 +173,9 @@ __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap)
+__glXTexParameterfvReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -180,17 +187,17 @@ __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexImage1DReqSize(const GLbyte *pc, Bool swap)
+__glXTexImage1DReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 32);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 32);
+GLenum format = * (GLenum *)(pc + 44);
+GLenum type = * (GLenum *)(pc + 48);
if (swap) {
row_length = bswap_32(row_length);
@@ -208,18 +215,18 @@ __glXTexImage1DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexImage2DReqSize(const GLbyte *pc, Bool swap)
+__glXTexImage2DReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 32);
- GLsizei height = *(GLsizei *) (pc + 36);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 32);
+GLsizei height = *(GLsizei *)(pc + 36);
+GLenum format = * (GLenum *)(pc + 44);
+GLenum type = * (GLenum *)(pc + 48);
if (swap) {
row_length = bswap_32(row_length);
@@ -238,9 +245,9 @@ __glXTexImage2DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap)
+__glXTexEnvfvReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -252,9 +259,9 @@ __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexGendvReqSize(const GLbyte *pc, Bool swap)
+__glXTexGendvReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -266,9 +273,9 @@ __glXTexGendvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexGenfvReqSize(const GLbyte *pc, Bool swap)
+__glXTexGenfvReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -280,9 +287,9 @@ __glXTexGenfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap)
+__glXPixelMapfvReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei mapsize = *(GLsizei *) (pc + 4);
+GLsizei mapsize = *(GLsizei *)(pc + 4);
if (swap) {
mapsize = bswap_32(mapsize);
@@ -292,9 +299,9 @@ __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap)
+__glXPixelMapusvReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei mapsize = *(GLsizei *) (pc + 4);
+GLsizei mapsize = *(GLsizei *)(pc + 4);
if (swap) {
mapsize = bswap_32(mapsize);
@@ -304,17 +311,17 @@ __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap)
+__glXDrawPixelsReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLsizei width = *(GLsizei *) (pc + 20);
- GLsizei height = *(GLsizei *) (pc + 24);
- GLenum format = *(GLenum *) (pc + 28);
- GLenum type = *(GLenum *) (pc + 32);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLsizei width = *(GLsizei *)(pc + 20);
+GLsizei height = *(GLsizei *)(pc + 24);
+GLenum format = * (GLenum *)(pc + 28);
+GLenum type = * (GLenum *)(pc + 32);
if (swap) {
row_length = bswap_32(row_length);
@@ -332,9 +339,9 @@ __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap)
+__glXPrioritizeTexturesReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei n = *(GLsizei *) (pc + 0);
+GLsizei n = *(GLsizei *)(pc + 0);
if (swap) {
n = bswap_32(n);
@@ -344,17 +351,17 @@ __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap)
+__glXTexSubImage1DReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 36);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 36);
+GLenum format = * (GLenum *)(pc + 44);
+GLenum type = * (GLenum *)(pc + 48);
if (swap) {
row_length = bswap_32(row_length);
@@ -372,18 +379,18 @@ __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap)
+__glXTexSubImage2DReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 36);
- GLsizei height = *(GLsizei *) (pc + 40);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 36);
+GLsizei height = *(GLsizei *)(pc + 40);
+GLenum format = * (GLenum *)(pc + 44);
+GLenum type = * (GLenum *)(pc + 48);
if (swap) {
row_length = bswap_32(row_length);
@@ -402,17 +409,17 @@ __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXColorTableReqSize(const GLbyte *pc, Bool swap)
+__glXColorTableReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 28);
- GLenum format = *(GLenum *) (pc + 32);
- GLenum type = *(GLenum *) (pc + 36);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 28);
+GLenum format = * (GLenum *)(pc + 32);
+GLenum type = * (GLenum *)(pc + 36);
if (swap) {
row_length = bswap_32(row_length);
@@ -430,9 +437,9 @@ __glXColorTableReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap)
+__glXColorTableParameterfvReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -444,17 +451,17 @@ __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXColorSubTableReqSize(const GLbyte *pc, Bool swap)
+__glXColorSubTableReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei count = *(GLsizei *) (pc + 28);
- GLenum format = *(GLenum *) (pc + 32);
- GLenum type = *(GLenum *) (pc + 36);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei count = *(GLsizei *)(pc + 28);
+GLenum format = * (GLenum *)(pc + 32);
+GLenum type = * (GLenum *)(pc + 36);
if (swap) {
row_length = bswap_32(row_length);
@@ -472,17 +479,17 @@ __glXColorSubTableReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap)
+__glXConvolutionFilter1DReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 28);
- GLenum format = *(GLenum *) (pc + 36);
- GLenum type = *(GLenum *) (pc + 40);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 28);
+GLenum format = * (GLenum *)(pc + 36);
+GLenum type = * (GLenum *)(pc + 40);
if (swap) {
row_length = bswap_32(row_length);
@@ -500,18 +507,18 @@ __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap)
+__glXConvolutionFilter2DReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 28);
- GLsizei height = *(GLsizei *) (pc + 32);
- GLenum format = *(GLenum *) (pc + 36);
- GLenum type = *(GLenum *) (pc + 40);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 28);
+GLsizei height = *(GLsizei *)(pc + 32);
+GLenum format = * (GLenum *)(pc + 36);
+GLenum type = * (GLenum *)(pc + 40);
if (swap) {
row_length = bswap_32(row_length);
@@ -530,9 +537,9 @@ __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap)
+__glXConvolutionParameterfvReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -544,19 +551,19 @@ __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexImage3DReqSize(const GLbyte *pc, Bool swap)
+__glXTexImage3DReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = *(GLint *) (pc + 8);
- GLint skip_rows = *(GLint *) (pc + 16);
- GLint skip_images = *(GLint *) (pc + 20);
- GLint alignment = *(GLint *) (pc + 32);
- GLenum target = *(GLenum *) (pc + 36);
- GLsizei width = *(GLsizei *) (pc + 48);
- GLsizei height = *(GLsizei *) (pc + 52);
- GLsizei depth = *(GLsizei *) (pc + 56);
- GLenum format = *(GLenum *) (pc + 68);
- GLenum type = *(GLenum *) (pc + 72);
+ GLint row_length = * (GLint *)(pc + 4);
+ GLint image_height = * (GLint *)(pc + 8);
+ GLint skip_rows = * (GLint *)(pc + 16);
+ GLint skip_images = * (GLint *)(pc + 20);
+ GLint alignment = * (GLint *)(pc + 32);
+GLenum target = * (GLenum *)(pc + 36);
+GLsizei width = *(GLsizei *)(pc + 48);
+GLsizei height = *(GLsizei *)(pc + 52);
+GLsizei depth = *(GLsizei *)(pc + 56);
+GLenum format = * (GLenum *)(pc + 68);
+GLenum type = * (GLenum *)(pc + 72);
if (swap) {
row_length = bswap_32(row_length);
@@ -572,8 +579,8 @@ __glXTexImage3DReqSize(const GLbyte *pc, Bool swap)
type = bswap_32(type);
}
- if (*(CARD32 *) (pc + 76))
- return 0;
+ if (*(CARD32 *) (pc + 76))
+ return 0;
return __glXImageSize(format, type, target, width, height, depth,
image_height, row_length, skip_images,
@@ -581,19 +588,19 @@ __glXTexImage3DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap)
+__glXTexSubImage3DReqSize( const GLbyte * pc, Bool swap )
{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = *(GLint *) (pc + 8);
- GLint skip_rows = *(GLint *) (pc + 16);
- GLint skip_images = *(GLint *) (pc + 20);
- GLint alignment = *(GLint *) (pc + 32);
- GLenum target = *(GLenum *) (pc + 36);
- GLsizei width = *(GLsizei *) (pc + 60);
- GLsizei height = *(GLsizei *) (pc + 64);
- GLsizei depth = *(GLsizei *) (pc + 68);
- GLenum format = *(GLenum *) (pc + 76);
- GLenum type = *(GLenum *) (pc + 80);
+ GLint row_length = * (GLint *)(pc + 4);
+ GLint image_height = * (GLint *)(pc + 8);
+ GLint skip_rows = * (GLint *)(pc + 16);
+ GLint skip_images = * (GLint *)(pc + 20);
+ GLint alignment = * (GLint *)(pc + 32);
+GLenum target = * (GLenum *)(pc + 36);
+GLsizei width = *(GLsizei *)(pc + 60);
+GLsizei height = *(GLsizei *)(pc + 64);
+GLsizei depth = *(GLsizei *)(pc + 68);
+GLenum format = * (GLenum *)(pc + 76);
+GLenum type = * (GLenum *)(pc + 80);
if (swap) {
row_length = bswap_32(row_length);
@@ -615,9 +622,9 @@ __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap)
+__glXCompressedTexImage1DARBReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei imageSize = *(GLsizei *) (pc + 20);
+GLsizei imageSize = *(GLsizei *)(pc + 20);
if (swap) {
imageSize = bswap_32(imageSize);
@@ -627,9 +634,9 @@ __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap)
+__glXCompressedTexImage2DARBReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei imageSize = *(GLsizei *) (pc + 24);
+GLsizei imageSize = *(GLsizei *)(pc + 24);
if (swap) {
imageSize = bswap_32(imageSize);
@@ -639,9 +646,9 @@ __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap)
+__glXCompressedTexImage3DARBReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei imageSize = *(GLsizei *) (pc + 28);
+GLsizei imageSize = *(GLsizei *)(pc + 28);
if (swap) {
imageSize = bswap_32(imageSize);
@@ -651,9 +658,9 @@ __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap)
+__glXCompressedTexSubImage3DARBReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei imageSize = *(GLsizei *) (pc + 36);
+GLsizei imageSize = *(GLsizei *)(pc + 36);
if (swap) {
imageSize = bswap_32(imageSize);
@@ -663,9 +670,9 @@ __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap)
+__glXProgramStringARBReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei len = *(GLsizei *) (pc + 8);
+GLsizei len = *(GLsizei *)(pc + 8);
if (swap) {
len = bswap_32(len);
@@ -675,9 +682,9 @@ __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap)
+__glXDrawBuffersARBReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei n = *(GLsizei *) (pc + 0);
+GLsizei n = *(GLsizei *)(pc + 0);
if (swap) {
n = bswap_32(n);
@@ -687,9 +694,9 @@ __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap)
+__glXPointParameterfvEXTReqSize( const GLbyte * pc, Bool swap )
{
- GLenum pname = *(GLenum *) (pc + 0);
+GLenum pname = * (GLenum *)(pc + 0);
GLsizei compsize;
if (swap) {
@@ -701,9 +708,9 @@ __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap)
+__glXProgramParameters4dvNVReqSize( const GLbyte * pc, Bool swap )
{
- GLuint num = *(GLuint *) (pc + 8);
+GLsizei num = *(GLsizei *)(pc + 8);
if (swap) {
num = bswap_32(num);
@@ -713,9 +720,9 @@ __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap)
+__glXProgramParameters4fvNVReqSize( const GLbyte * pc, Bool swap )
{
- GLuint num = *(GLuint *) (pc + 8);
+GLsizei num = *(GLsizei *)(pc + 8);
if (swap) {
num = bswap_32(num);
@@ -725,9 +732,9 @@ __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs1dvNVReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
@@ -737,9 +744,9 @@ __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs2dvNVReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
@@ -749,9 +756,9 @@ __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs3dvNVReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
@@ -761,9 +768,9 @@ __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs3fvNVReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
@@ -773,9 +780,9 @@ __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs3svNVReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
@@ -785,9 +792,9 @@ __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs4dvNVReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
@@ -797,9 +804,9 @@ __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap)
+__glXProgramNamedParameter4fvNVReqSize( const GLbyte * pc, Bool swap )
{
- GLsizei len = *(GLsizei *) (pc + 4);
+GLsizei len = *(GLsizei *)(pc + 4);
if (swap) {
len = bswap_32(len);
@@ -808,28 +815,28 @@ __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap)
return __GLX_PAD(len);
}
-ALIAS(Fogiv, Fogfv)
- ALIAS(Lightiv, Lightfv)
- ALIAS(LightModeliv, LightModelfv)
- ALIAS(Materialiv, Materialfv)
- ALIAS(TexParameteriv, TexParameterfv)
- ALIAS(TexEnviv, TexEnvfv)
- ALIAS(TexGeniv, TexGenfv)
- ALIAS(PixelMapuiv, PixelMapfv)
- ALIAS(ColorTableParameteriv, ColorTableParameterfv)
- ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
- ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB)
- ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB)
- ALIAS(LoadProgramNV, ProgramStringARB)
- ALIAS(RequestResidentProgramsNV, DrawBuffersARB)
- ALIAS(VertexAttribs1fvNV, PixelMapfv)
- ALIAS(VertexAttribs1svNV, PixelMapusv)
- ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV)
- ALIAS(VertexAttribs2svNV, PixelMapfv)
- ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV)
- ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV)
- ALIAS(VertexAttribs4ubvNV, PixelMapfv)
- ALIAS(PointParameterivNV, PointParameterfvEXT)
- ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB)
- ALIAS(DeleteFramebuffersEXT, DrawBuffersARB)
- ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB)
+ALIAS( Fogiv, Fogfv )
+ALIAS( Lightiv, Lightfv )
+ALIAS( LightModeliv, LightModelfv )
+ALIAS( Materialiv, Materialfv )
+ALIAS( TexParameteriv, TexParameterfv )
+ALIAS( TexEnviv, TexEnvfv )
+ALIAS( TexGeniv, TexGenfv )
+ALIAS( PixelMapuiv, PixelMapfv )
+ALIAS( ColorTableParameteriv, ColorTableParameterfv )
+ALIAS( ConvolutionParameteriv, ConvolutionParameterfv )
+ALIAS( CompressedTexSubImage1DARB, CompressedTexImage1DARB )
+ALIAS( CompressedTexSubImage2DARB, CompressedTexImage3DARB )
+ALIAS( LoadProgramNV, ProgramStringARB )
+ALIAS( RequestResidentProgramsNV, DrawBuffersARB )
+ALIAS( VertexAttribs1fvNV, PixelMapfv )
+ALIAS( VertexAttribs1svNV, PixelMapusv )
+ALIAS( VertexAttribs2fvNV, VertexAttribs1dvNV )
+ALIAS( VertexAttribs2svNV, PixelMapfv )
+ALIAS( VertexAttribs4fvNV, VertexAttribs2dvNV )
+ALIAS( VertexAttribs4svNV, VertexAttribs1dvNV )
+ALIAS( VertexAttribs4ubvNV, PixelMapfv )
+ALIAS( PointParameterivNV, PointParameterfvEXT )
+ALIAS( ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB )
+ALIAS( DeleteFramebuffersEXT, DrawBuffersARB )
+ALIAS( DeleteRenderbuffersEXT, DrawBuffersARB )
diff --git a/xorg-server/glx/indirect_reqsize.h b/xorg-server/glx/indirect_reqsize.h
index 812705c05..c0e6dc863 100644
--- a/xorg-server/glx/indirect_reqsize.h
+++ b/xorg-server/glx/indirect_reqsize.h
@@ -28,13 +28,13 @@
#if !defined( _INDIRECT_REQSIZE_H_ )
# define _INDIRECT_REQSIZE_H_
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define HIDDEN __attribute__((visibility("hidden")))
# else
# define HIDDEN
# endif
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PURE __attribute__((pure))
# else
# define PURE
diff --git a/xorg-server/glx/indirect_size.h b/xorg-server/glx/indirect_size.h
index 0eb5ef63e..a1b1b3fd0 100644
--- a/xorg-server/glx/indirect_size.h
+++ b/xorg-server/glx/indirect_size.h
@@ -36,7 +36,7 @@
* \author Ian Romanick <idr@us.ibm.com>
*/
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PURE __attribute__((pure))
# else
# define PURE
@@ -48,38 +48,12 @@
# define FASTCALL
# endif
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define INTERNAL __attribute__((visibility("internal")))
# else
# define INTERNAL
# endif
-extern INTERNAL PURE FASTCALL GLint __glCallLists_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glFogfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glFogiv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glLightfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glLightiv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glLightModelfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glLightModeliv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glMaterialfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glMaterialiv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glTexParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glTexParameteriv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glTexEnvfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glTexEnviv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glTexGendv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glTexGenfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glTexGeniv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glMap1d_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glMap1f_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glMap2d_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glMap2f_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glColorTableParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glColorTableParameteriv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glConvolutionParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glConvolutionParameteriv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glPointParameterfvEXT_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glPointParameterivNV_size(GLenum);
# undef PURE
# undef FASTCALL
diff --git a/xorg-server/glx/indirect_size_get.c b/xorg-server/glx/indirect_size_get.c
index 5a2dbed29..ef6cc53ea 100644
--- a/xorg-server/glx/indirect_size_get.c
+++ b/xorg-server/glx/indirect_size_get.c
@@ -25,6 +25,13 @@
* SOFTWARE.
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
+#endif
#include <GL/gl.h>
#include "indirect_size_get.h"
@@ -32,7 +39,7 @@
#include "indirect_util.h"
#include "indirect_size.h"
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PURE __attribute__((pure))
# else
# define PURE
@@ -44,14 +51,14 @@
# define FASTCALL
# endif
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define INTERNAL __attribute__((visibility("internal")))
# else
# define INTERNAL
# endif
-#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
+#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL)
# undef HAVE_ALIAS
#endif
#ifdef HAVE_ALIAS
@@ -67,1156 +74,1153 @@
INTERNAL PURE FASTCALL GLint
-__glCallLists_size(GLenum e)
+__glCallLists_size( GLenum e )
{
- switch (e) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- return 1;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- case GL_2_BYTES:
- return 2;
- case GL_3_BYTES:
- return 3;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- case GL_4_BYTES:
- return 4;
- default:
- return 0;
+ switch( e ) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ return 1;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ case GL_2_BYTES:
+ case GL_HALF_FLOAT:
+ return 2;
+ case GL_3_BYTES:
+ return 3;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ case GL_4_BYTES:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glFogfv_size(GLenum e)
+__glFogfv_size( GLenum e )
{
- switch (e) {
- case GL_FOG_INDEX:
- case GL_FOG_DENSITY:
- case GL_FOG_START:
- case GL_FOG_END:
- case GL_FOG_MODE:
- case GL_FOG_OFFSET_VALUE_SGIX:
- case GL_FOG_DISTANCE_MODE_NV:
- return 1;
- case GL_FOG_COLOR:
- return 4;
- default:
- return 0;
+ switch( e ) {
+ case GL_FOG_INDEX:
+ case GL_FOG_DENSITY:
+ case GL_FOG_START:
+ case GL_FOG_END:
+ case GL_FOG_MODE:
+ case GL_FOG_OFFSET_VALUE_SGIX:
+ case GL_FOG_DISTANCE_MODE_NV:
+ return 1;
+ case GL_FOG_COLOR:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glLightfv_size(GLenum e)
+__glLightfv_size( GLenum e )
{
- switch (e) {
- case GL_SPOT_EXPONENT:
- case GL_SPOT_CUTOFF:
- case GL_CONSTANT_ATTENUATION:
- case GL_LINEAR_ATTENUATION:
- case GL_QUADRATIC_ATTENUATION:
- return 1;
- case GL_SPOT_DIRECTION:
- return 3;
- case GL_AMBIENT:
- case GL_DIFFUSE:
- case GL_SPECULAR:
- case GL_POSITION:
- return 4;
- default:
- return 0;
+ switch( e ) {
+ case GL_SPOT_EXPONENT:
+ case GL_SPOT_CUTOFF:
+ case GL_CONSTANT_ATTENUATION:
+ case GL_LINEAR_ATTENUATION:
+ case GL_QUADRATIC_ATTENUATION:
+ return 1;
+ case GL_SPOT_DIRECTION:
+ return 3;
+ case GL_AMBIENT:
+ case GL_DIFFUSE:
+ case GL_SPECULAR:
+ case GL_POSITION:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glLightModelfv_size(GLenum e)
+__glLightModelfv_size( GLenum e )
{
- switch (e) {
- case GL_LIGHT_MODEL_LOCAL_VIEWER:
- case GL_LIGHT_MODEL_TWO_SIDE:
- case GL_LIGHT_MODEL_COLOR_CONTROL:
+ switch( e ) {
+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
+ case GL_LIGHT_MODEL_TWO_SIDE:
+ case GL_LIGHT_MODEL_COLOR_CONTROL:
/* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/
- return 1;
- case GL_LIGHT_MODEL_AMBIENT:
- return 4;
- default:
- return 0;
+ return 1;
+ case GL_LIGHT_MODEL_AMBIENT:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glMaterialfv_size(GLenum e)
+__glMaterialfv_size( GLenum e )
{
- switch (e) {
- case GL_SHININESS:
- return 1;
- case GL_COLOR_INDEXES:
- return 3;
- case GL_AMBIENT:
- case GL_DIFFUSE:
- case GL_SPECULAR:
- case GL_EMISSION:
- case GL_AMBIENT_AND_DIFFUSE:
- return 4;
- default:
- return 0;
+ switch( e ) {
+ case GL_SHININESS:
+ return 1;
+ case GL_COLOR_INDEXES:
+ return 3;
+ case GL_AMBIENT:
+ case GL_DIFFUSE:
+ case GL_SPECULAR:
+ case GL_EMISSION:
+ case GL_AMBIENT_AND_DIFFUSE:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glTexParameterfv_size(GLenum e)
+__glTexParameterfv_size( GLenum e )
{
- switch (e) {
- case GL_TEXTURE_MAG_FILTER:
- case GL_TEXTURE_MIN_FILTER:
- case GL_TEXTURE_WRAP_S:
- case GL_TEXTURE_WRAP_T:
- case GL_TEXTURE_PRIORITY:
- case GL_TEXTURE_WRAP_R:
- case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
+ switch( e ) {
+ case GL_TEXTURE_MAG_FILTER:
+ case GL_TEXTURE_MIN_FILTER:
+ case GL_TEXTURE_WRAP_S:
+ case GL_TEXTURE_WRAP_T:
+ case GL_TEXTURE_PRIORITY:
+ case GL_TEXTURE_WRAP_R:
+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
/* case GL_SHADOW_AMBIENT_SGIX:*/
- case GL_TEXTURE_MIN_LOD:
- case GL_TEXTURE_MAX_LOD:
- case GL_TEXTURE_BASE_LEVEL:
- case GL_TEXTURE_MAX_LEVEL:
- case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
- case GL_TEXTURE_LOD_BIAS_S_SGIX:
- case GL_TEXTURE_LOD_BIAS_T_SGIX:
- case GL_TEXTURE_LOD_BIAS_R_SGIX:
- case GL_GENERATE_MIPMAP:
+ case GL_TEXTURE_MIN_LOD:
+ case GL_TEXTURE_MAX_LOD:
+ case GL_TEXTURE_BASE_LEVEL:
+ case GL_TEXTURE_MAX_LEVEL:
+ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
+ case GL_GENERATE_MIPMAP:
/* case GL_GENERATE_MIPMAP_SGIS:*/
- case GL_TEXTURE_COMPARE_SGIX:
- case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
- case GL_TEXTURE_MAX_CLAMP_S_SGIX:
- case GL_TEXTURE_MAX_CLAMP_T_SGIX:
- case GL_TEXTURE_MAX_CLAMP_R_SGIX:
- case GL_TEXTURE_MAX_ANISOTROPY_EXT:
- case GL_TEXTURE_LOD_BIAS:
+ case GL_TEXTURE_COMPARE_SGIX:
+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
+ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
+ case GL_TEXTURE_LOD_BIAS:
/* case GL_TEXTURE_LOD_BIAS_EXT:*/
- case GL_DEPTH_TEXTURE_MODE:
+ case GL_TEXTURE_STORAGE_HINT_APPLE:
+ case GL_STORAGE_PRIVATE_APPLE:
+ case GL_STORAGE_CACHED_APPLE:
+ case GL_STORAGE_SHARED_APPLE:
+ case GL_DEPTH_TEXTURE_MODE:
/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
- case GL_TEXTURE_COMPARE_MODE:
+ case GL_TEXTURE_COMPARE_MODE:
/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
- case GL_TEXTURE_COMPARE_FUNC:
+ case GL_TEXTURE_COMPARE_FUNC:
/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
- case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
- return 1;
- case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
- case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
- return 2;
- case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
- return 3;
- case GL_TEXTURE_BORDER_COLOR:
- case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
- case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
- return 4;
- default:
- return 0;
+ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
+ return 1;
+ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
+ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
+ return 2;
+ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
+ return 3;
+ case GL_TEXTURE_BORDER_COLOR:
+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glTexEnvfv_size(GLenum e)
+__glTexEnvfv_size( GLenum e )
{
- switch (e) {
- case GL_ALPHA_SCALE:
- case GL_TEXTURE_ENV_MODE:
- case GL_TEXTURE_LOD_BIAS:
- case GL_COMBINE_RGB:
- case GL_COMBINE_ALPHA:
- case GL_RGB_SCALE:
- case GL_SOURCE0_RGB:
- case GL_SOURCE1_RGB:
- case GL_SOURCE2_RGB:
- case GL_SOURCE3_RGB_NV:
- case GL_SOURCE0_ALPHA:
- case GL_SOURCE1_ALPHA:
- case GL_SOURCE2_ALPHA:
- case GL_SOURCE3_ALPHA_NV:
- case GL_OPERAND0_RGB:
- case GL_OPERAND1_RGB:
- case GL_OPERAND2_RGB:
- case GL_OPERAND3_RGB_NV:
- case GL_OPERAND0_ALPHA:
- case GL_OPERAND1_ALPHA:
- case GL_OPERAND2_ALPHA:
- case GL_OPERAND3_ALPHA_NV:
- case GL_COORD_REPLACE_ARB:
+ switch( e ) {
+ case GL_ALPHA_SCALE:
+ case GL_TEXTURE_ENV_MODE:
+ case GL_TEXTURE_LOD_BIAS:
+ case GL_COMBINE_RGB:
+ case GL_COMBINE_ALPHA:
+ case GL_RGB_SCALE:
+ case GL_SOURCE0_RGB:
+ case GL_SOURCE1_RGB:
+ case GL_SOURCE2_RGB:
+ case GL_SOURCE3_RGB_NV:
+ case GL_SOURCE0_ALPHA:
+ case GL_SOURCE1_ALPHA:
+ case GL_SOURCE2_ALPHA:
+ case GL_SOURCE3_ALPHA_NV:
+ case GL_OPERAND0_RGB:
+ case GL_OPERAND1_RGB:
+ case GL_OPERAND2_RGB:
+ case GL_OPERAND3_RGB_NV:
+ case GL_OPERAND0_ALPHA:
+ case GL_OPERAND1_ALPHA:
+ case GL_OPERAND2_ALPHA:
+ case GL_OPERAND3_ALPHA_NV:
+ case GL_BUMP_TARGET_ATI:
+ case GL_COORD_REPLACE_ARB:
/* case GL_COORD_REPLACE_NV:*/
- return 1;
- case GL_TEXTURE_ENV_COLOR:
- return 4;
- default:
- return 0;
+ return 1;
+ case GL_TEXTURE_ENV_COLOR:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glTexGendv_size(GLenum e)
+__glTexGendv_size( GLenum e )
{
- switch (e) {
- case GL_TEXTURE_GEN_MODE:
- return 1;
- case GL_OBJECT_PLANE:
- case GL_EYE_PLANE:
- return 4;
- default:
- return 0;
+ switch( e ) {
+ case GL_TEXTURE_GEN_MODE:
+ return 1;
+ case GL_OBJECT_PLANE:
+ case GL_EYE_PLANE:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glMap1d_size(GLenum e)
+__glMap1d_size( GLenum e )
{
- switch (e) {
- case GL_MAP1_INDEX:
- case GL_MAP1_TEXTURE_COORD_1:
- return 1;
- case GL_MAP1_TEXTURE_COORD_2:
- return 2;
- case GL_MAP1_NORMAL:
- case GL_MAP1_TEXTURE_COORD_3:
- case GL_MAP1_VERTEX_3:
- return 3;
- case GL_MAP1_COLOR_4:
- case GL_MAP1_TEXTURE_COORD_4:
- case GL_MAP1_VERTEX_4:
- return 4;
- default:
- return 0;
+ switch( e ) {
+ case GL_MAP1_INDEX:
+ case GL_MAP1_TEXTURE_COORD_1:
+ return 1;
+ case GL_MAP1_TEXTURE_COORD_2:
+ return 2;
+ case GL_MAP1_NORMAL:
+ case GL_MAP1_TEXTURE_COORD_3:
+ case GL_MAP1_VERTEX_3:
+ return 3;
+ case GL_MAP1_COLOR_4:
+ case GL_MAP1_TEXTURE_COORD_4:
+ case GL_MAP1_VERTEX_4:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glMap2d_size(GLenum e)
+__glMap2d_size( GLenum e )
{
- switch (e) {
- case GL_MAP2_INDEX:
- case GL_MAP2_TEXTURE_COORD_1:
- return 1;
- case GL_MAP2_TEXTURE_COORD_2:
- return 2;
- case GL_MAP2_NORMAL:
- case GL_MAP2_TEXTURE_COORD_3:
- case GL_MAP2_VERTEX_3:
- return 3;
- case GL_MAP2_COLOR_4:
- case GL_MAP2_TEXTURE_COORD_4:
- case GL_MAP2_VERTEX_4:
- return 4;
- default:
- return 0;
+ switch( e ) {
+ case GL_MAP2_INDEX:
+ case GL_MAP2_TEXTURE_COORD_1:
+ return 1;
+ case GL_MAP2_TEXTURE_COORD_2:
+ return 2;
+ case GL_MAP2_NORMAL:
+ case GL_MAP2_TEXTURE_COORD_3:
+ case GL_MAP2_VERTEX_3:
+ return 3;
+ case GL_MAP2_COLOR_4:
+ case GL_MAP2_TEXTURE_COORD_4:
+ case GL_MAP2_VERTEX_4:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetBooleanv_size(GLenum e)
+__glGetBooleanv_size( GLenum e )
{
- switch (e) {
- case GL_CURRENT_INDEX:
- case GL_CURRENT_RASTER_INDEX:
- case GL_CURRENT_RASTER_POSITION_VALID:
- case GL_CURRENT_RASTER_DISTANCE:
- case GL_POINT_SMOOTH:
- case GL_POINT_SIZE:
- case GL_SMOOTH_POINT_SIZE_GRANULARITY:
- case GL_LINE_SMOOTH:
- case GL_LINE_WIDTH:
- case GL_LINE_WIDTH_GRANULARITY:
- case GL_LINE_STIPPLE:
- case GL_LINE_STIPPLE_PATTERN:
- case GL_LINE_STIPPLE_REPEAT:
- case GL_LIST_MODE:
- case GL_MAX_LIST_NESTING:
- case GL_LIST_BASE:
- case GL_LIST_INDEX:
- case GL_POLYGON_SMOOTH:
- case GL_POLYGON_STIPPLE:
- case GL_EDGE_FLAG:
- case GL_CULL_FACE:
- case GL_CULL_FACE_MODE:
- case GL_FRONT_FACE:
- case GL_LIGHTING:
- case GL_LIGHT_MODEL_LOCAL_VIEWER:
- case GL_LIGHT_MODEL_TWO_SIDE:
- case GL_SHADE_MODEL:
- case GL_COLOR_MATERIAL_FACE:
- case GL_COLOR_MATERIAL_PARAMETER:
- case GL_COLOR_MATERIAL:
- case GL_FOG:
- case GL_FOG_INDEX:
- case GL_FOG_DENSITY:
- case GL_FOG_START:
- case GL_FOG_END:
- case GL_FOG_MODE:
- case GL_DEPTH_TEST:
- case GL_DEPTH_WRITEMASK:
- case GL_DEPTH_CLEAR_VALUE:
- case GL_DEPTH_FUNC:
- case GL_STENCIL_TEST:
- case GL_STENCIL_CLEAR_VALUE:
- case GL_STENCIL_FUNC:
- case GL_STENCIL_VALUE_MASK:
- case GL_STENCIL_FAIL:
- case GL_STENCIL_PASS_DEPTH_FAIL:
- case GL_STENCIL_PASS_DEPTH_PASS:
- case GL_STENCIL_REF:
- case GL_STENCIL_WRITEMASK:
- case GL_MATRIX_MODE:
- case GL_NORMALIZE:
- case GL_MODELVIEW_STACK_DEPTH:
- case GL_PROJECTION_STACK_DEPTH:
- case GL_TEXTURE_STACK_DEPTH:
- case GL_ATTRIB_STACK_DEPTH:
- case GL_CLIENT_ATTRIB_STACK_DEPTH:
- case GL_ALPHA_TEST:
- case GL_ALPHA_TEST_FUNC:
- case GL_ALPHA_TEST_REF:
- case GL_DITHER:
- case GL_BLEND_DST:
- case GL_BLEND_SRC:
- case GL_BLEND:
- case GL_LOGIC_OP_MODE:
- case GL_LOGIC_OP:
- case GL_AUX_BUFFERS:
- case GL_DRAW_BUFFER:
- case GL_READ_BUFFER:
- case GL_SCISSOR_TEST:
- case GL_INDEX_CLEAR_VALUE:
- case GL_INDEX_WRITEMASK:
- case GL_INDEX_MODE:
- case GL_RGBA_MODE:
- case GL_DOUBLEBUFFER:
- case GL_STEREO:
- case GL_RENDER_MODE:
- case GL_PERSPECTIVE_CORRECTION_HINT:
- case GL_POINT_SMOOTH_HINT:
- case GL_LINE_SMOOTH_HINT:
- case GL_POLYGON_SMOOTH_HINT:
- case GL_FOG_HINT:
- case GL_TEXTURE_GEN_S:
- case GL_TEXTURE_GEN_T:
- case GL_TEXTURE_GEN_R:
- case GL_TEXTURE_GEN_Q:
- case GL_PIXEL_MAP_I_TO_I:
- case GL_PIXEL_MAP_I_TO_I_SIZE:
- case GL_PIXEL_MAP_S_TO_S_SIZE:
- case GL_PIXEL_MAP_I_TO_R_SIZE:
- case GL_PIXEL_MAP_I_TO_G_SIZE:
- case GL_PIXEL_MAP_I_TO_B_SIZE:
- case GL_PIXEL_MAP_I_TO_A_SIZE:
- case GL_PIXEL_MAP_R_TO_R_SIZE:
- case GL_PIXEL_MAP_G_TO_G_SIZE:
- case GL_PIXEL_MAP_B_TO_B_SIZE:
- case GL_PIXEL_MAP_A_TO_A_SIZE:
- case GL_UNPACK_SWAP_BYTES:
- case GL_UNPACK_LSB_FIRST:
- case GL_UNPACK_ROW_LENGTH:
- case GL_UNPACK_SKIP_ROWS:
- case GL_UNPACK_SKIP_PIXELS:
- case GL_UNPACK_ALIGNMENT:
- case GL_PACK_SWAP_BYTES:
- case GL_PACK_LSB_FIRST:
- case GL_PACK_ROW_LENGTH:
- case GL_PACK_SKIP_ROWS:
- case GL_PACK_SKIP_PIXELS:
- case GL_PACK_ALIGNMENT:
- case GL_MAP_COLOR:
- case GL_MAP_STENCIL:
- case GL_INDEX_SHIFT:
- case GL_INDEX_OFFSET:
- case GL_RED_SCALE:
- case GL_RED_BIAS:
- case GL_ZOOM_X:
- case GL_ZOOM_Y:
- case GL_GREEN_SCALE:
- case GL_GREEN_BIAS:
- case GL_BLUE_SCALE:
- case GL_BLUE_BIAS:
- case GL_ALPHA_SCALE:
- case GL_ALPHA_BIAS:
- case GL_DEPTH_SCALE:
- case GL_DEPTH_BIAS:
- case GL_MAX_EVAL_ORDER:
- case GL_MAX_LIGHTS:
- case GL_MAX_CLIP_PLANES:
- case GL_MAX_TEXTURE_SIZE:
- case GL_MAX_PIXEL_MAP_TABLE:
- case GL_MAX_ATTRIB_STACK_DEPTH:
- case GL_MAX_MODELVIEW_STACK_DEPTH:
- case GL_MAX_NAME_STACK_DEPTH:
- case GL_MAX_PROJECTION_STACK_DEPTH:
- case GL_MAX_TEXTURE_STACK_DEPTH:
- case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
- case GL_SUBPIXEL_BITS:
- case GL_INDEX_BITS:
- case GL_RED_BITS:
- case GL_GREEN_BITS:
- case GL_BLUE_BITS:
- case GL_ALPHA_BITS:
- case GL_DEPTH_BITS:
- case GL_STENCIL_BITS:
- case GL_ACCUM_RED_BITS:
- case GL_ACCUM_GREEN_BITS:
- case GL_ACCUM_BLUE_BITS:
- case GL_ACCUM_ALPHA_BITS:
- case GL_NAME_STACK_DEPTH:
- case GL_AUTO_NORMAL:
- case GL_MAP1_COLOR_4:
- case GL_MAP1_INDEX:
- case GL_MAP1_NORMAL:
- case GL_MAP1_TEXTURE_COORD_1:
- case GL_MAP1_TEXTURE_COORD_2:
- case GL_MAP1_TEXTURE_COORD_3:
- case GL_MAP1_TEXTURE_COORD_4:
- case GL_MAP1_VERTEX_3:
- case GL_MAP1_VERTEX_4:
- case GL_MAP2_COLOR_4:
- case GL_MAP2_INDEX:
- case GL_MAP2_NORMAL:
- case GL_MAP2_TEXTURE_COORD_1:
- case GL_MAP2_TEXTURE_COORD_2:
- case GL_MAP2_TEXTURE_COORD_3:
- case GL_MAP2_TEXTURE_COORD_4:
- case GL_MAP2_VERTEX_3:
- case GL_MAP2_VERTEX_4:
- case GL_MAP1_GRID_SEGMENTS:
- case GL_TEXTURE_1D:
- case GL_TEXTURE_2D:
- case GL_POLYGON_OFFSET_UNITS:
- case GL_CLIP_PLANE0:
- case GL_CLIP_PLANE1:
- case GL_CLIP_PLANE2:
- case GL_CLIP_PLANE3:
- case GL_CLIP_PLANE4:
- case GL_CLIP_PLANE5:
- case GL_LIGHT0:
- case GL_LIGHT1:
- case GL_LIGHT2:
- case GL_LIGHT3:
- case GL_LIGHT4:
- case GL_LIGHT5:
- case GL_LIGHT6:
- case GL_LIGHT7:
- case GL_BLEND_EQUATION:
+ switch( e ) {
+ case GL_CURRENT_INDEX:
+ case GL_CURRENT_RASTER_INDEX:
+ case GL_CURRENT_RASTER_POSITION_VALID:
+ case GL_CURRENT_RASTER_DISTANCE:
+ case GL_POINT_SMOOTH:
+ case GL_POINT_SIZE:
+ case GL_SMOOTH_POINT_SIZE_GRANULARITY:
+ case GL_LINE_SMOOTH:
+ case GL_LINE_WIDTH:
+ case GL_LINE_WIDTH_GRANULARITY:
+ case GL_LINE_STIPPLE:
+ case GL_LINE_STIPPLE_PATTERN:
+ case GL_LINE_STIPPLE_REPEAT:
+ case GL_LIST_MODE:
+ case GL_MAX_LIST_NESTING:
+ case GL_LIST_BASE:
+ case GL_LIST_INDEX:
+ case GL_POLYGON_SMOOTH:
+ case GL_POLYGON_STIPPLE:
+ case GL_EDGE_FLAG:
+ case GL_CULL_FACE:
+ case GL_CULL_FACE_MODE:
+ case GL_FRONT_FACE:
+ case GL_LIGHTING:
+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
+ case GL_LIGHT_MODEL_TWO_SIDE:
+ case GL_SHADE_MODEL:
+ case GL_COLOR_MATERIAL_FACE:
+ case GL_COLOR_MATERIAL_PARAMETER:
+ case GL_COLOR_MATERIAL:
+ case GL_FOG:
+ case GL_FOG_INDEX:
+ case GL_FOG_DENSITY:
+ case GL_FOG_START:
+ case GL_FOG_END:
+ case GL_FOG_MODE:
+ case GL_DEPTH_TEST:
+ case GL_DEPTH_WRITEMASK:
+ case GL_DEPTH_CLEAR_VALUE:
+ case GL_DEPTH_FUNC:
+ case GL_STENCIL_TEST:
+ case GL_STENCIL_CLEAR_VALUE:
+ case GL_STENCIL_FUNC:
+ case GL_STENCIL_VALUE_MASK:
+ case GL_STENCIL_FAIL:
+ case GL_STENCIL_PASS_DEPTH_FAIL:
+ case GL_STENCIL_PASS_DEPTH_PASS:
+ case GL_STENCIL_REF:
+ case GL_STENCIL_WRITEMASK:
+ case GL_MATRIX_MODE:
+ case GL_NORMALIZE:
+ case GL_MODELVIEW_STACK_DEPTH:
+ case GL_PROJECTION_STACK_DEPTH:
+ case GL_TEXTURE_STACK_DEPTH:
+ case GL_ATTRIB_STACK_DEPTH:
+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
+ case GL_ALPHA_TEST:
+ case GL_ALPHA_TEST_FUNC:
+ case GL_ALPHA_TEST_REF:
+ case GL_DITHER:
+ case GL_BLEND_DST:
+ case GL_BLEND_SRC:
+ case GL_BLEND:
+ case GL_LOGIC_OP_MODE:
+ case GL_LOGIC_OP:
+ case GL_AUX_BUFFERS:
+ case GL_DRAW_BUFFER:
+ case GL_READ_BUFFER:
+ case GL_SCISSOR_TEST:
+ case GL_INDEX_CLEAR_VALUE:
+ case GL_INDEX_WRITEMASK:
+ case GL_INDEX_MODE:
+ case GL_RGBA_MODE:
+ case GL_DOUBLEBUFFER:
+ case GL_STEREO:
+ case GL_RENDER_MODE:
+ case GL_PERSPECTIVE_CORRECTION_HINT:
+ case GL_POINT_SMOOTH_HINT:
+ case GL_LINE_SMOOTH_HINT:
+ case GL_POLYGON_SMOOTH_HINT:
+ case GL_FOG_HINT:
+ case GL_TEXTURE_GEN_S:
+ case GL_TEXTURE_GEN_T:
+ case GL_TEXTURE_GEN_R:
+ case GL_TEXTURE_GEN_Q:
+ case GL_PIXEL_MAP_I_TO_I:
+ case GL_PIXEL_MAP_I_TO_I_SIZE:
+ case GL_PIXEL_MAP_S_TO_S_SIZE:
+ case GL_PIXEL_MAP_I_TO_R_SIZE:
+ case GL_PIXEL_MAP_I_TO_G_SIZE:
+ case GL_PIXEL_MAP_I_TO_B_SIZE:
+ case GL_PIXEL_MAP_I_TO_A_SIZE:
+ case GL_PIXEL_MAP_R_TO_R_SIZE:
+ case GL_PIXEL_MAP_G_TO_G_SIZE:
+ case GL_PIXEL_MAP_B_TO_B_SIZE:
+ case GL_PIXEL_MAP_A_TO_A_SIZE:
+ case GL_UNPACK_SWAP_BYTES:
+ case GL_UNPACK_LSB_FIRST:
+ case GL_UNPACK_ROW_LENGTH:
+ case GL_UNPACK_SKIP_ROWS:
+ case GL_UNPACK_SKIP_PIXELS:
+ case GL_UNPACK_ALIGNMENT:
+ case GL_PACK_SWAP_BYTES:
+ case GL_PACK_LSB_FIRST:
+ case GL_PACK_ROW_LENGTH:
+ case GL_PACK_SKIP_ROWS:
+ case GL_PACK_SKIP_PIXELS:
+ case GL_PACK_ALIGNMENT:
+ case GL_MAP_COLOR:
+ case GL_MAP_STENCIL:
+ case GL_INDEX_SHIFT:
+ case GL_INDEX_OFFSET:
+ case GL_RED_SCALE:
+ case GL_RED_BIAS:
+ case GL_ZOOM_X:
+ case GL_ZOOM_Y:
+ case GL_GREEN_SCALE:
+ case GL_GREEN_BIAS:
+ case GL_BLUE_SCALE:
+ case GL_BLUE_BIAS:
+ case GL_ALPHA_SCALE:
+ case GL_ALPHA_BIAS:
+ case GL_DEPTH_SCALE:
+ case GL_DEPTH_BIAS:
+ case GL_MAX_EVAL_ORDER:
+ case GL_MAX_LIGHTS:
+ case GL_MAX_CLIP_PLANES:
+ case GL_MAX_TEXTURE_SIZE:
+ case GL_MAX_PIXEL_MAP_TABLE:
+ case GL_MAX_ATTRIB_STACK_DEPTH:
+ case GL_MAX_MODELVIEW_STACK_DEPTH:
+ case GL_MAX_NAME_STACK_DEPTH:
+ case GL_MAX_PROJECTION_STACK_DEPTH:
+ case GL_MAX_TEXTURE_STACK_DEPTH:
+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
+ case GL_SUBPIXEL_BITS:
+ case GL_INDEX_BITS:
+ case GL_RED_BITS:
+ case GL_GREEN_BITS:
+ case GL_BLUE_BITS:
+ case GL_ALPHA_BITS:
+ case GL_DEPTH_BITS:
+ case GL_STENCIL_BITS:
+ case GL_ACCUM_RED_BITS:
+ case GL_ACCUM_GREEN_BITS:
+ case GL_ACCUM_BLUE_BITS:
+ case GL_ACCUM_ALPHA_BITS:
+ case GL_NAME_STACK_DEPTH:
+ case GL_AUTO_NORMAL:
+ case GL_MAP1_COLOR_4:
+ case GL_MAP1_INDEX:
+ case GL_MAP1_NORMAL:
+ case GL_MAP1_TEXTURE_COORD_1:
+ case GL_MAP1_TEXTURE_COORD_2:
+ case GL_MAP1_TEXTURE_COORD_3:
+ case GL_MAP1_TEXTURE_COORD_4:
+ case GL_MAP1_VERTEX_3:
+ case GL_MAP1_VERTEX_4:
+ case GL_MAP2_COLOR_4:
+ case GL_MAP2_INDEX:
+ case GL_MAP2_NORMAL:
+ case GL_MAP2_TEXTURE_COORD_1:
+ case GL_MAP2_TEXTURE_COORD_2:
+ case GL_MAP2_TEXTURE_COORD_3:
+ case GL_MAP2_TEXTURE_COORD_4:
+ case GL_MAP2_VERTEX_3:
+ case GL_MAP2_VERTEX_4:
+ case GL_MAP1_GRID_SEGMENTS:
+ case GL_TEXTURE_1D:
+ case GL_TEXTURE_2D:
+ case GL_POLYGON_OFFSET_UNITS:
+ case GL_CLIP_PLANE0:
+ case GL_CLIP_PLANE1:
+ case GL_CLIP_PLANE2:
+ case GL_CLIP_PLANE3:
+ case GL_CLIP_PLANE4:
+ case GL_CLIP_PLANE5:
+ case GL_LIGHT0:
+ case GL_LIGHT1:
+ case GL_LIGHT2:
+ case GL_LIGHT3:
+ case GL_LIGHT4:
+ case GL_LIGHT5:
+ case GL_LIGHT6:
+ case GL_LIGHT7:
+ case GL_BLEND_EQUATION:
/* case GL_BLEND_EQUATION_EXT:*/
- case GL_CONVOLUTION_1D:
- case GL_CONVOLUTION_2D:
- case GL_SEPARABLE_2D:
- case GL_MAX_CONVOLUTION_WIDTH:
+ case GL_CONVOLUTION_1D:
+ case GL_CONVOLUTION_2D:
+ case GL_SEPARABLE_2D:
+ case GL_MAX_CONVOLUTION_WIDTH:
/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/
- case GL_MAX_CONVOLUTION_HEIGHT:
+ case GL_MAX_CONVOLUTION_HEIGHT:
/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/
- case GL_POST_CONVOLUTION_RED_SCALE:
+ case GL_POST_CONVOLUTION_RED_SCALE:
/* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/
- case GL_POST_CONVOLUTION_GREEN_SCALE:
+ case GL_POST_CONVOLUTION_GREEN_SCALE:
/* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/
- case GL_POST_CONVOLUTION_BLUE_SCALE:
+ case GL_POST_CONVOLUTION_BLUE_SCALE:
/* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/
- case GL_POST_CONVOLUTION_ALPHA_SCALE:
+ case GL_POST_CONVOLUTION_ALPHA_SCALE:
/* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/
- case GL_POST_CONVOLUTION_RED_BIAS:
+ case GL_POST_CONVOLUTION_RED_BIAS:
/* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/
- case GL_POST_CONVOLUTION_GREEN_BIAS:
+ case GL_POST_CONVOLUTION_GREEN_BIAS:
/* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/
- case GL_POST_CONVOLUTION_BLUE_BIAS:
+ case GL_POST_CONVOLUTION_BLUE_BIAS:
/* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/
- case GL_POST_CONVOLUTION_ALPHA_BIAS:
+ case GL_POST_CONVOLUTION_ALPHA_BIAS:
/* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/
- case GL_HISTOGRAM:
- case GL_MINMAX:
- case GL_POLYGON_OFFSET_FACTOR:
- case GL_RESCALE_NORMAL:
+ case GL_HISTOGRAM:
+ case GL_MINMAX:
+ case GL_POLYGON_OFFSET_FACTOR:
+ case GL_RESCALE_NORMAL:
/* case GL_RESCALE_NORMAL_EXT:*/
- case GL_TEXTURE_BINDING_1D:
- case GL_TEXTURE_BINDING_2D:
- case GL_TEXTURE_BINDING_3D:
- case GL_PACK_SKIP_IMAGES:
- case GL_PACK_IMAGE_HEIGHT:
- case GL_UNPACK_SKIP_IMAGES:
- case GL_UNPACK_IMAGE_HEIGHT:
- case GL_TEXTURE_3D:
- case GL_MAX_3D_TEXTURE_SIZE:
- case GL_VERTEX_ARRAY:
- case GL_NORMAL_ARRAY:
- case GL_COLOR_ARRAY:
- case GL_INDEX_ARRAY:
- case GL_TEXTURE_COORD_ARRAY:
- case GL_EDGE_FLAG_ARRAY:
- case GL_VERTEX_ARRAY_SIZE:
- case GL_VERTEX_ARRAY_TYPE:
- case GL_VERTEX_ARRAY_STRIDE:
- case GL_NORMAL_ARRAY_TYPE:
- case GL_NORMAL_ARRAY_STRIDE:
- case GL_COLOR_ARRAY_SIZE:
- case GL_COLOR_ARRAY_TYPE:
- case GL_COLOR_ARRAY_STRIDE:
- case GL_INDEX_ARRAY_TYPE:
- case GL_INDEX_ARRAY_STRIDE:
- case GL_TEXTURE_COORD_ARRAY_SIZE:
- case GL_TEXTURE_COORD_ARRAY_TYPE:
- case GL_TEXTURE_COORD_ARRAY_STRIDE:
- case GL_EDGE_FLAG_ARRAY_STRIDE:
- case GL_MULTISAMPLE:
+ case GL_TEXTURE_BINDING_1D:
+ case GL_TEXTURE_BINDING_2D:
+ case GL_TEXTURE_BINDING_3D:
+ case GL_PACK_SKIP_IMAGES:
+ case GL_PACK_IMAGE_HEIGHT:
+ case GL_UNPACK_SKIP_IMAGES:
+ case GL_UNPACK_IMAGE_HEIGHT:
+ case GL_TEXTURE_3D:
+ case GL_MAX_3D_TEXTURE_SIZE:
+ case GL_VERTEX_ARRAY:
+ case GL_NORMAL_ARRAY:
+ case GL_COLOR_ARRAY:
+ case GL_INDEX_ARRAY:
+ case GL_TEXTURE_COORD_ARRAY:
+ case GL_EDGE_FLAG_ARRAY:
+ case GL_VERTEX_ARRAY_SIZE:
+ case GL_VERTEX_ARRAY_TYPE:
+ case GL_VERTEX_ARRAY_STRIDE:
+ case GL_NORMAL_ARRAY_TYPE:
+ case GL_NORMAL_ARRAY_STRIDE:
+ case GL_COLOR_ARRAY_SIZE:
+ case GL_COLOR_ARRAY_TYPE:
+ case GL_COLOR_ARRAY_STRIDE:
+ case GL_INDEX_ARRAY_TYPE:
+ case GL_INDEX_ARRAY_STRIDE:
+ case GL_TEXTURE_COORD_ARRAY_SIZE:
+ case GL_TEXTURE_COORD_ARRAY_TYPE:
+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
+ case GL_EDGE_FLAG_ARRAY_STRIDE:
+ case GL_MULTISAMPLE:
/* case GL_MULTISAMPLE_ARB:*/
- case GL_SAMPLE_ALPHA_TO_COVERAGE:
+ case GL_SAMPLE_ALPHA_TO_COVERAGE:
/* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/
- case GL_SAMPLE_ALPHA_TO_ONE:
+ case GL_SAMPLE_ALPHA_TO_ONE:
/* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/
- case GL_SAMPLE_COVERAGE:
+ case GL_SAMPLE_COVERAGE:
/* case GL_SAMPLE_COVERAGE_ARB:*/
- case GL_SAMPLE_BUFFERS:
+ case GL_SAMPLE_BUFFERS:
/* case GL_SAMPLE_BUFFERS_ARB:*/
- case GL_SAMPLES:
+ case GL_SAMPLES:
/* case GL_SAMPLES_ARB:*/
- case GL_SAMPLE_COVERAGE_VALUE:
+ case GL_SAMPLE_COVERAGE_VALUE:
/* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/
- case GL_SAMPLE_COVERAGE_INVERT:
+ case GL_SAMPLE_COVERAGE_INVERT:
/* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/
- case GL_COLOR_MATRIX_STACK_DEPTH:
- case GL_MAX_COLOR_MATRIX_STACK_DEPTH:
- case GL_POST_COLOR_MATRIX_RED_SCALE:
- case GL_POST_COLOR_MATRIX_GREEN_SCALE:
- case GL_POST_COLOR_MATRIX_BLUE_SCALE:
- case GL_POST_COLOR_MATRIX_ALPHA_SCALE:
- case GL_POST_COLOR_MATRIX_RED_BIAS:
- case GL_POST_COLOR_MATRIX_GREEN_BIAS:
- case GL_POST_COLOR_MATRIX_BLUE_BIAS:
- case GL_POST_COLOR_MATRIX_ALPHA_BIAS:
- case GL_BLEND_DST_RGB:
- case GL_BLEND_SRC_RGB:
- case GL_BLEND_DST_ALPHA:
- case GL_BLEND_SRC_ALPHA:
- case GL_COLOR_TABLE:
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- case GL_MAX_ELEMENTS_VERTICES:
- case GL_MAX_ELEMENTS_INDICES:
- case GL_CLIP_VOLUME_CLIPPING_HINT_EXT:
- case GL_POINT_SIZE_MIN:
- case GL_POINT_SIZE_MAX:
- case GL_POINT_FADE_THRESHOLD_SIZE:
- case GL_OCCLUSION_TEST_HP:
- case GL_OCCLUSION_TEST_RESULT_HP:
- case GL_LIGHT_MODEL_COLOR_CONTROL:
- case GL_CURRENT_FOG_COORD:
- case GL_FOG_COORDINATE_ARRAY_TYPE:
- case GL_FOG_COORDINATE_ARRAY_STRIDE:
- case GL_FOG_COORD_ARRAY:
- case GL_COLOR_SUM_ARB:
- case GL_SECONDARY_COLOR_ARRAY_SIZE:
- case GL_SECONDARY_COLOR_ARRAY_TYPE:
- case GL_SECONDARY_COLOR_ARRAY_STRIDE:
- case GL_SECONDARY_COLOR_ARRAY:
- case GL_ACTIVE_TEXTURE:
+ case GL_COLOR_MATRIX_STACK_DEPTH:
+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH:
+ case GL_POST_COLOR_MATRIX_RED_SCALE:
+ case GL_POST_COLOR_MATRIX_GREEN_SCALE:
+ case GL_POST_COLOR_MATRIX_BLUE_SCALE:
+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE:
+ case GL_POST_COLOR_MATRIX_RED_BIAS:
+ case GL_POST_COLOR_MATRIX_GREEN_BIAS:
+ case GL_POST_COLOR_MATRIX_BLUE_BIAS:
+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS:
+ case GL_BLEND_DST_RGB:
+ case GL_BLEND_SRC_RGB:
+ case GL_BLEND_DST_ALPHA:
+ case GL_BLEND_SRC_ALPHA:
+ case GL_COLOR_TABLE:
+ case GL_POST_CONVOLUTION_COLOR_TABLE:
+ case GL_POST_COLOR_MATRIX_COLOR_TABLE:
+ case GL_MAX_ELEMENTS_VERTICES:
+ case GL_MAX_ELEMENTS_INDICES:
+ case GL_CLIP_VOLUME_CLIPPING_HINT_EXT:
+ case GL_POINT_SIZE_MIN:
+ case GL_POINT_SIZE_MAX:
+ case GL_POINT_FADE_THRESHOLD_SIZE:
+ case GL_OCCLUSION_TEST_HP:
+ case GL_OCCLUSION_TEST_RESULT_HP:
+ case GL_LIGHT_MODEL_COLOR_CONTROL:
+ case GL_CURRENT_FOG_COORD:
+ case GL_FOG_COORDINATE_ARRAY_TYPE:
+ case GL_FOG_COORDINATE_ARRAY_STRIDE:
+ case GL_FOG_COORD_ARRAY:
+ case GL_COLOR_SUM_ARB:
+ case GL_SECONDARY_COLOR_ARRAY_SIZE:
+ case GL_SECONDARY_COLOR_ARRAY_TYPE:
+ case GL_SECONDARY_COLOR_ARRAY_STRIDE:
+ case GL_SECONDARY_COLOR_ARRAY:
+ case GL_ACTIVE_TEXTURE:
/* case GL_ACTIVE_TEXTURE_ARB:*/
- case GL_CLIENT_ACTIVE_TEXTURE:
+ case GL_CLIENT_ACTIVE_TEXTURE:
/* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/
- case GL_MAX_TEXTURE_UNITS:
+ case GL_MAX_TEXTURE_UNITS:
/* case GL_MAX_TEXTURE_UNITS_ARB:*/
- case GL_MAX_RENDERBUFFER_SIZE_EXT:
- case GL_TEXTURE_COMPRESSION_HINT:
+ case GL_MAX_RENDERBUFFER_SIZE:
+/* case GL_MAX_RENDERBUFFER_SIZE_EXT:*/
+ case GL_TEXTURE_COMPRESSION_HINT:
/* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/
- case GL_TEXTURE_RECTANGLE_ARB:
+ case GL_TEXTURE_RECTANGLE_ARB:
/* case GL_TEXTURE_RECTANGLE_NV:*/
- case GL_TEXTURE_BINDING_RECTANGLE_ARB:
+ case GL_TEXTURE_BINDING_RECTANGLE_ARB:
/* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/
- case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB:
+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB:
/* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/
- case GL_MAX_TEXTURE_LOD_BIAS:
- case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
- case GL_MAX_SHININESS_NV:
- case GL_MAX_SPOT_EXPONENT_NV:
- case GL_TEXTURE_CUBE_MAP:
+ case GL_MAX_TEXTURE_LOD_BIAS:
+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
+ case GL_MAX_SHININESS_NV:
+ case GL_MAX_SPOT_EXPONENT_NV:
+ case GL_TEXTURE_CUBE_MAP:
/* case GL_TEXTURE_CUBE_MAP_ARB:*/
- case GL_TEXTURE_BINDING_CUBE_MAP:
+ case GL_TEXTURE_BINDING_CUBE_MAP:
/* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/
- case GL_MAX_CUBE_MAP_TEXTURE_SIZE:
+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE:
/* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/
- case GL_MULTISAMPLE_FILTER_HINT_NV:
- case GL_FOG_DISTANCE_MODE_NV:
- case GL_VERTEX_PROGRAM_ARB:
- case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
- case GL_MAX_PROGRAM_MATRICES_ARB:
- case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
- case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
- case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
- case GL_PROGRAM_ERROR_POSITION_ARB:
- case GL_DEPTH_CLAMP_NV:
- case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
+ case GL_MULTISAMPLE_FILTER_HINT_NV:
+ case GL_FOG_DISTANCE_MODE_NV:
+ case GL_VERTEX_PROGRAM_ARB:
+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
+ case GL_MAX_PROGRAM_MATRICES_ARB:
+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
+ case GL_PROGRAM_ERROR_POSITION_ARB:
+ case GL_DEPTH_CLAMP:
+/* case GL_DEPTH_CLAMP_NV:*/
+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
/* case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:*/
- case GL_MAX_VERTEX_UNITS_ARB:
- case GL_ACTIVE_VERTEX_UNITS_ARB:
- case GL_WEIGHT_SUM_UNITY_ARB:
- case GL_VERTEX_BLEND_ARB:
- case GL_CURRENT_WEIGHT_ARB:
- case GL_WEIGHT_ARRAY_TYPE_ARB:
- case GL_WEIGHT_ARRAY_STRIDE_ARB:
- case GL_WEIGHT_ARRAY_SIZE_ARB:
- case GL_WEIGHT_ARRAY_ARB:
- case GL_PACK_INVERT_MESA:
- case GL_STENCIL_BACK_FUNC_ATI:
- case GL_STENCIL_BACK_FAIL_ATI:
- case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI:
- case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI:
- case GL_FRAGMENT_PROGRAM_ARB:
- case GL_MAX_DRAW_BUFFERS_ARB:
+ case GL_MAX_VERTEX_UNITS_ARB:
+ case GL_ACTIVE_VERTEX_UNITS_ARB:
+ case GL_WEIGHT_SUM_UNITY_ARB:
+ case GL_VERTEX_BLEND_ARB:
+ case GL_CURRENT_WEIGHT_ARB:
+ case GL_WEIGHT_ARRAY_TYPE_ARB:
+ case GL_WEIGHT_ARRAY_STRIDE_ARB:
+ case GL_WEIGHT_ARRAY_SIZE_ARB:
+ case GL_WEIGHT_ARRAY_ARB:
+ case GL_PACK_INVERT_MESA:
+ case GL_STENCIL_BACK_FUNC_ATI:
+ case GL_STENCIL_BACK_FAIL_ATI:
+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI:
+ case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI:
+ case GL_FRAGMENT_PROGRAM_ARB:
+ case GL_MAX_DRAW_BUFFERS_ARB:
/* case GL_MAX_DRAW_BUFFERS_ATI:*/
- case GL_DRAW_BUFFER0_ARB:
+ case GL_DRAW_BUFFER0_ARB:
/* case GL_DRAW_BUFFER0_ATI:*/
- case GL_DRAW_BUFFER1_ARB:
+ case GL_DRAW_BUFFER1_ARB:
/* case GL_DRAW_BUFFER1_ATI:*/
- case GL_DRAW_BUFFER2_ARB:
+ case GL_DRAW_BUFFER2_ARB:
/* case GL_DRAW_BUFFER2_ATI:*/
- case GL_DRAW_BUFFER3_ARB:
+ case GL_DRAW_BUFFER3_ARB:
/* case GL_DRAW_BUFFER3_ATI:*/
- case GL_DRAW_BUFFER4_ARB:
+ case GL_DRAW_BUFFER4_ARB:
/* case GL_DRAW_BUFFER4_ATI:*/
- case GL_DRAW_BUFFER5_ARB:
+ case GL_DRAW_BUFFER5_ARB:
/* case GL_DRAW_BUFFER5_ATI:*/
- case GL_DRAW_BUFFER6_ARB:
+ case GL_DRAW_BUFFER6_ARB:
/* case GL_DRAW_BUFFER6_ATI:*/
- case GL_DRAW_BUFFER7_ARB:
+ case GL_DRAW_BUFFER7_ARB:
/* case GL_DRAW_BUFFER7_ATI:*/
- case GL_DRAW_BUFFER8_ARB:
+ case GL_DRAW_BUFFER8_ARB:
/* case GL_DRAW_BUFFER8_ATI:*/
- case GL_DRAW_BUFFER9_ARB:
+ case GL_DRAW_BUFFER9_ARB:
/* case GL_DRAW_BUFFER9_ATI:*/
- case GL_DRAW_BUFFER10_ARB:
+ case GL_DRAW_BUFFER10_ARB:
/* case GL_DRAW_BUFFER10_ATI:*/
- case GL_DRAW_BUFFER11_ARB:
+ case GL_DRAW_BUFFER11_ARB:
/* case GL_DRAW_BUFFER11_ATI:*/
- case GL_DRAW_BUFFER12_ARB:
+ case GL_DRAW_BUFFER12_ARB:
/* case GL_DRAW_BUFFER12_ATI:*/
- case GL_DRAW_BUFFER13_ARB:
+ case GL_DRAW_BUFFER13_ARB:
/* case GL_DRAW_BUFFER13_ATI:*/
- case GL_DRAW_BUFFER14_ARB:
+ case GL_DRAW_BUFFER14_ARB:
/* case GL_DRAW_BUFFER14_ATI:*/
- case GL_DRAW_BUFFER15_ARB:
+ case GL_DRAW_BUFFER15_ARB:
/* case GL_DRAW_BUFFER15_ATI:*/
- case GL_BLEND_EQUATION_ALPHA_EXT:
- case GL_MATRIX_PALETTE_ARB:
- case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB:
- case GL_MAX_PALETTE_MATRICES_ARB:
- case GL_CURRENT_PALETTE_MATRIX_ARB:
- case GL_MATRIX_INDEX_ARRAY_ARB:
- case GL_CURRENT_MATRIX_INDEX_ARB:
- case GL_MATRIX_INDEX_ARRAY_SIZE_ARB:
- case GL_MATRIX_INDEX_ARRAY_TYPE_ARB:
- case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB:
- case GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT:
- case GL_POINT_SPRITE_ARB:
+ case GL_BLEND_EQUATION_ALPHA_EXT:
+ case GL_MATRIX_PALETTE_ARB:
+ case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB:
+ case GL_MAX_PALETTE_MATRICES_ARB:
+ case GL_CURRENT_PALETTE_MATRIX_ARB:
+ case GL_MATRIX_INDEX_ARRAY_ARB:
+ case GL_CURRENT_MATRIX_INDEX_ARB:
+ case GL_MATRIX_INDEX_ARRAY_SIZE_ARB:
+ case GL_MATRIX_INDEX_ARRAY_TYPE_ARB:
+ case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB:
+ case GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT:
+ case GL_POINT_SPRITE_ARB:
/* case GL_POINT_SPRITE_NV:*/
- case GL_POINT_SPRITE_R_MODE_NV:
- case GL_MAX_VERTEX_ATTRIBS_ARB:
- case GL_MAX_TEXTURE_COORDS_ARB:
- case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
- case GL_DEPTH_BOUNDS_TEST_EXT:
- case GL_ARRAY_BUFFER_BINDING_ARB:
- case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
- case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
- case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
- case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
- case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
- case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
- case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
- case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
- case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
- case GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB:
- case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
- case GL_STENCIL_TEST_TWO_SIDE_EXT:
- case GL_ACTIVE_STENCIL_FACE_EXT:
- case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
- case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
- case GL_DRAW_FRAMEBUFFER_BINDING_EXT:
- case GL_RENDERBUFFER_BINDING_EXT:
- case GL_READ_FRAMEBUFFER_BINDING_EXT:
- case GL_MAX_COLOR_ATTACHMENTS_EXT:
- case GL_RASTER_POSITION_UNCLIPPED_IBM:
- return 1;
- case GL_SMOOTH_POINT_SIZE_RANGE:
- case GL_LINE_WIDTH_RANGE:
- case GL_POLYGON_MODE:
- case GL_DEPTH_RANGE:
- case GL_MAX_VIEWPORT_DIMS:
- case GL_MAP1_GRID_DOMAIN:
- case GL_MAP2_GRID_SEGMENTS:
- case GL_ALIASED_POINT_SIZE_RANGE:
- case GL_ALIASED_LINE_WIDTH_RANGE:
- case GL_DEPTH_BOUNDS_EXT:
- return 2;
- case GL_CURRENT_NORMAL:
- case GL_POINT_DISTANCE_ATTENUATION:
- return 3;
- case GL_CURRENT_COLOR:
- case GL_CURRENT_TEXTURE_COORDS:
- case GL_CURRENT_RASTER_COLOR:
- case GL_CURRENT_RASTER_TEXTURE_COORDS:
- case GL_CURRENT_RASTER_POSITION:
- case GL_LIGHT_MODEL_AMBIENT:
- case GL_FOG_COLOR:
- case GL_ACCUM_CLEAR_VALUE:
- case GL_VIEWPORT:
- case GL_SCISSOR_BOX:
- case GL_COLOR_CLEAR_VALUE:
- case GL_COLOR_WRITEMASK:
- case GL_MAP2_GRID_DOMAIN:
- case GL_BLEND_COLOR:
+ case GL_POINT_SPRITE_R_MODE_NV:
+ case GL_MAX_VERTEX_ATTRIBS_ARB:
+ case GL_MAX_TEXTURE_COORDS_ARB:
+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
+ case GL_DEPTH_BOUNDS_TEST_EXT:
+ case GL_ARRAY_BUFFER_BINDING_ARB:
+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
+ case GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB:
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
+ case GL_ACTIVE_STENCIL_FACE_EXT:
+ case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
+ case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
+ case GL_FRAMEBUFFER_BINDING:
+/* case GL_DRAW_FRAMEBUFFER_BINDING_EXT:*/
+ case GL_RENDERBUFFER_BINDING:
+/* case GL_RENDERBUFFER_BINDING_EXT:*/
+ case GL_READ_FRAMEBUFFER_BINDING:
+/* case GL_READ_FRAMEBUFFER_BINDING_EXT:*/
+ case GL_MAX_COLOR_ATTACHMENTS:
+/* case GL_MAX_COLOR_ATTACHMENTS_EXT:*/
+ case GL_MAX_SAMPLES:
+/* case GL_MAX_SAMPLES_EXT:*/
+ case GL_MAX_SERVER_WAIT_TIMEOUT:
+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
+ return 1;
+ case GL_SMOOTH_POINT_SIZE_RANGE:
+ case GL_LINE_WIDTH_RANGE:
+ case GL_POLYGON_MODE:
+ case GL_DEPTH_RANGE:
+ case GL_MAX_VIEWPORT_DIMS:
+ case GL_MAP1_GRID_DOMAIN:
+ case GL_MAP2_GRID_SEGMENTS:
+ case GL_ALIASED_POINT_SIZE_RANGE:
+ case GL_ALIASED_LINE_WIDTH_RANGE:
+ case GL_DEPTH_BOUNDS_EXT:
+ return 2;
+ case GL_CURRENT_NORMAL:
+ case GL_POINT_DISTANCE_ATTENUATION:
+ return 3;
+ case GL_CURRENT_COLOR:
+ case GL_CURRENT_TEXTURE_COORDS:
+ case GL_CURRENT_RASTER_COLOR:
+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
+ case GL_CURRENT_RASTER_POSITION:
+ case GL_LIGHT_MODEL_AMBIENT:
+ case GL_FOG_COLOR:
+ case GL_ACCUM_CLEAR_VALUE:
+ case GL_VIEWPORT:
+ case GL_SCISSOR_BOX:
+ case GL_COLOR_CLEAR_VALUE:
+ case GL_COLOR_WRITEMASK:
+ case GL_MAP2_GRID_DOMAIN:
+ case GL_BLEND_COLOR:
/* case GL_BLEND_COLOR_EXT:*/
- case GL_CURRENT_SECONDARY_COLOR:
- return 4;
- case GL_MODELVIEW_MATRIX:
- case GL_PROJECTION_MATRIX:
- case GL_TEXTURE_MATRIX:
- case GL_MODELVIEW0_ARB:
- case GL_COLOR_MATRIX:
- case GL_MODELVIEW1_ARB:
- case GL_CURRENT_MATRIX_ARB:
- case GL_MODELVIEW2_ARB:
- case GL_MODELVIEW3_ARB:
- case GL_MODELVIEW4_ARB:
- case GL_MODELVIEW5_ARB:
- case GL_MODELVIEW6_ARB:
- case GL_MODELVIEW7_ARB:
- case GL_MODELVIEW8_ARB:
- case GL_MODELVIEW9_ARB:
- case GL_MODELVIEW10_ARB:
- case GL_MODELVIEW11_ARB:
- case GL_MODELVIEW12_ARB:
- case GL_MODELVIEW13_ARB:
- case GL_MODELVIEW14_ARB:
- case GL_MODELVIEW15_ARB:
- case GL_MODELVIEW16_ARB:
- case GL_MODELVIEW17_ARB:
- case GL_MODELVIEW18_ARB:
- case GL_MODELVIEW19_ARB:
- case GL_MODELVIEW20_ARB:
- case GL_MODELVIEW21_ARB:
- case GL_MODELVIEW22_ARB:
- case GL_MODELVIEW23_ARB:
- case GL_MODELVIEW24_ARB:
- case GL_MODELVIEW25_ARB:
- case GL_MODELVIEW26_ARB:
- case GL_MODELVIEW27_ARB:
- case GL_MODELVIEW28_ARB:
- case GL_MODELVIEW29_ARB:
- case GL_MODELVIEW30_ARB:
- case GL_MODELVIEW31_ARB:
- case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
- return 16;
- case GL_FOG_COORDINATE_SOURCE:
- case GL_COMPRESSED_TEXTURE_FORMATS:
- return __glGetBooleanv_variable_size(e);
- default:
- return 0;
+ case GL_CURRENT_SECONDARY_COLOR:
+ return 4;
+ case GL_MODELVIEW_MATRIX:
+ case GL_PROJECTION_MATRIX:
+ case GL_TEXTURE_MATRIX:
+ case GL_MODELVIEW0_ARB:
+ case GL_COLOR_MATRIX:
+ case GL_MODELVIEW1_ARB:
+ case GL_CURRENT_MATRIX_ARB:
+ case GL_MODELVIEW2_ARB:
+ case GL_MODELVIEW3_ARB:
+ case GL_MODELVIEW4_ARB:
+ case GL_MODELVIEW5_ARB:
+ case GL_MODELVIEW6_ARB:
+ case GL_MODELVIEW7_ARB:
+ case GL_MODELVIEW8_ARB:
+ case GL_MODELVIEW9_ARB:
+ case GL_MODELVIEW10_ARB:
+ case GL_MODELVIEW11_ARB:
+ case GL_MODELVIEW12_ARB:
+ case GL_MODELVIEW13_ARB:
+ case GL_MODELVIEW14_ARB:
+ case GL_MODELVIEW15_ARB:
+ case GL_MODELVIEW16_ARB:
+ case GL_MODELVIEW17_ARB:
+ case GL_MODELVIEW18_ARB:
+ case GL_MODELVIEW19_ARB:
+ case GL_MODELVIEW20_ARB:
+ case GL_MODELVIEW21_ARB:
+ case GL_MODELVIEW22_ARB:
+ case GL_MODELVIEW23_ARB:
+ case GL_MODELVIEW24_ARB:
+ case GL_MODELVIEW25_ARB:
+ case GL_MODELVIEW26_ARB:
+ case GL_MODELVIEW27_ARB:
+ case GL_MODELVIEW28_ARB:
+ case GL_MODELVIEW29_ARB:
+ case GL_MODELVIEW30_ARB:
+ case GL_MODELVIEW31_ARB:
+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
+ return 16;
+ case GL_FOG_COORDINATE_SOURCE:
+ case GL_COMPRESSED_TEXTURE_FORMATS:
+ case GL_MIN_PROGRAM_TEXEL_OFFSET:
+ case GL_MAX_PROGRAM_TEXEL_OFFSET:
+ case GL_RGBA_INTEGER_MODE_EXT:
+ return __glGetBooleanv_variable_size( e );
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetTexParameterfv_size(GLenum e)
+__glGetTexParameterfv_size( GLenum e )
{
- switch (e) {
- case GL_TEXTURE_MAG_FILTER:
- case GL_TEXTURE_MIN_FILTER:
- case GL_TEXTURE_WRAP_S:
- case GL_TEXTURE_WRAP_T:
- case GL_TEXTURE_PRIORITY:
- case GL_TEXTURE_RESIDENT:
- case GL_TEXTURE_WRAP_R:
- case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
+ switch( e ) {
+ case GL_TEXTURE_MAG_FILTER:
+ case GL_TEXTURE_MIN_FILTER:
+ case GL_TEXTURE_WRAP_S:
+ case GL_TEXTURE_WRAP_T:
+ case GL_TEXTURE_PRIORITY:
+ case GL_TEXTURE_RESIDENT:
+ case GL_TEXTURE_WRAP_R:
+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
/* case GL_SHADOW_AMBIENT_SGIX:*/
- case GL_TEXTURE_MIN_LOD:
- case GL_TEXTURE_MAX_LOD:
- case GL_TEXTURE_BASE_LEVEL:
- case GL_TEXTURE_MAX_LEVEL:
- case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
- case GL_TEXTURE_LOD_BIAS_S_SGIX:
- case GL_TEXTURE_LOD_BIAS_T_SGIX:
- case GL_TEXTURE_LOD_BIAS_R_SGIX:
- case GL_GENERATE_MIPMAP:
+ case GL_TEXTURE_MIN_LOD:
+ case GL_TEXTURE_MAX_LOD:
+ case GL_TEXTURE_BASE_LEVEL:
+ case GL_TEXTURE_MAX_LEVEL:
+ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
+ case GL_GENERATE_MIPMAP:
/* case GL_GENERATE_MIPMAP_SGIS:*/
- case GL_TEXTURE_COMPARE_SGIX:
- case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
- case GL_TEXTURE_MAX_CLAMP_S_SGIX:
- case GL_TEXTURE_MAX_CLAMP_T_SGIX:
- case GL_TEXTURE_MAX_CLAMP_R_SGIX:
- case GL_TEXTURE_MAX_ANISOTROPY_EXT:
- case GL_TEXTURE_LOD_BIAS:
+ case GL_TEXTURE_COMPARE_SGIX:
+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
+ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
+ case GL_TEXTURE_LOD_BIAS:
/* case GL_TEXTURE_LOD_BIAS_EXT:*/
- case GL_DEPTH_TEXTURE_MODE:
+ case GL_TEXTURE_RANGE_LENGTH_APPLE:
+ case GL_TEXTURE_STORAGE_HINT_APPLE:
+ case GL_DEPTH_TEXTURE_MODE:
/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
- case GL_TEXTURE_COMPARE_MODE:
+ case GL_TEXTURE_COMPARE_MODE:
/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
- case GL_TEXTURE_COMPARE_FUNC:
+ case GL_TEXTURE_COMPARE_FUNC:
/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
- case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
- return 1;
- case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
- case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
- return 2;
- case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
- return 3;
- case GL_TEXTURE_BORDER_COLOR:
- case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
- case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
- return 4;
- default:
- return 0;
+ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
+ return 1;
+ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
+ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
+ return 2;
+ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
+ return 3;
+ case GL_TEXTURE_BORDER_COLOR:
+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetTexLevelParameterfv_size(GLenum e)
+__glGetTexLevelParameterfv_size( GLenum e )
{
- switch (e) {
- case GL_TEXTURE_WIDTH:
- case GL_TEXTURE_HEIGHT:
- case GL_TEXTURE_COMPONENTS:
- case GL_TEXTURE_BORDER:
- case GL_TEXTURE_RED_SIZE:
+ switch( e ) {
+ case GL_TEXTURE_WIDTH:
+ case GL_TEXTURE_HEIGHT:
+ case GL_TEXTURE_COMPONENTS:
+ case GL_TEXTURE_BORDER:
+ case GL_TEXTURE_RED_SIZE:
/* case GL_TEXTURE_RED_SIZE_EXT:*/
- case GL_TEXTURE_GREEN_SIZE:
+ case GL_TEXTURE_GREEN_SIZE:
/* case GL_TEXTURE_GREEN_SIZE_EXT:*/
- case GL_TEXTURE_BLUE_SIZE:
+ case GL_TEXTURE_BLUE_SIZE:
/* case GL_TEXTURE_BLUE_SIZE_EXT:*/
- case GL_TEXTURE_ALPHA_SIZE:
+ case GL_TEXTURE_ALPHA_SIZE:
/* case GL_TEXTURE_ALPHA_SIZE_EXT:*/
- case GL_TEXTURE_LUMINANCE_SIZE:
+ case GL_TEXTURE_LUMINANCE_SIZE:
/* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/
- case GL_TEXTURE_INTENSITY_SIZE:
+ case GL_TEXTURE_INTENSITY_SIZE:
/* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/
- case GL_TEXTURE_DEPTH:
- case GL_TEXTURE_INDEX_SIZE_EXT:
- case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
+ case GL_TEXTURE_DEPTH:
+ case GL_TEXTURE_INDEX_SIZE_EXT:
+ case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
/* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/
- case GL_TEXTURE_COMPRESSED:
+ case GL_TEXTURE_COMPRESSED:
/* case GL_TEXTURE_COMPRESSED_ARB:*/
- case GL_TEXTURE_DEPTH_SIZE:
+ case GL_TEXTURE_DEPTH_SIZE:
/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/
- return 1;
- default:
- return 0;
+ case GL_TEXTURE_STENCIL_SIZE:
+/* case GL_TEXTURE_STENCIL_SIZE_EXT:*/
+ return 1;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glColorTableParameterfv_size(GLenum e)
+__glColorTableParameterfv_size( GLenum e )
{
- switch (e) {
- case GL_COLOR_TABLE_SCALE:
- case GL_COLOR_TABLE_BIAS:
- return 4;
- default:
- return 0;
+ switch( e ) {
+ case GL_COLOR_TABLE_SCALE:
+ case GL_COLOR_TABLE_BIAS:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetColorTableParameterfv_size(GLenum e)
+__glGetColorTableParameterfv_size( GLenum e )
{
- switch (e) {
- case GL_COLOR_TABLE_FORMAT:
+ switch( e ) {
+ case GL_COLOR_TABLE_FORMAT:
/* case GL_COLOR_TABLE_FORMAT_EXT:*/
- case GL_COLOR_TABLE_WIDTH:
+ case GL_COLOR_TABLE_WIDTH:
/* case GL_COLOR_TABLE_WIDTH_EXT:*/
- case GL_COLOR_TABLE_RED_SIZE:
+ case GL_COLOR_TABLE_RED_SIZE:
/* case GL_COLOR_TABLE_RED_SIZE_EXT:*/
- case GL_COLOR_TABLE_GREEN_SIZE:
+ case GL_COLOR_TABLE_GREEN_SIZE:
/* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/
- case GL_COLOR_TABLE_BLUE_SIZE:
+ case GL_COLOR_TABLE_BLUE_SIZE:
/* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/
- case GL_COLOR_TABLE_ALPHA_SIZE:
+ case GL_COLOR_TABLE_ALPHA_SIZE:
/* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/
- case GL_COLOR_TABLE_LUMINANCE_SIZE:
+ case GL_COLOR_TABLE_LUMINANCE_SIZE:
/* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/
- case GL_COLOR_TABLE_INTENSITY_SIZE:
+ case GL_COLOR_TABLE_INTENSITY_SIZE:
/* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/
- return 1;
- case GL_COLOR_TABLE_SCALE:
- case GL_COLOR_TABLE_BIAS:
- return 4;
- default:
- return 0;
+ return 1;
+ case GL_COLOR_TABLE_SCALE:
+ case GL_COLOR_TABLE_BIAS:
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glConvolutionParameterfv_size(GLenum e)
+__glConvolutionParameterfv_size( GLenum e )
{
- switch (e) {
- case GL_CONVOLUTION_BORDER_MODE:
+ switch( e ) {
+ case GL_CONVOLUTION_BORDER_MODE:
/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/
- return 1;
- case GL_CONVOLUTION_FILTER_SCALE:
+ return 1;
+ case GL_CONVOLUTION_FILTER_SCALE:
/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/
- case GL_CONVOLUTION_FILTER_BIAS:
+ case GL_CONVOLUTION_FILTER_BIAS:
/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/
- case GL_CONVOLUTION_BORDER_COLOR:
+ case GL_CONVOLUTION_BORDER_COLOR:
/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
- return 4;
- default:
- return 0;
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetConvolutionParameterfv_size(GLenum e)
+__glGetConvolutionParameterfv_size( GLenum e )
{
- switch (e) {
- case GL_CONVOLUTION_BORDER_MODE:
+ switch( e ) {
+ case GL_CONVOLUTION_BORDER_MODE:
/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/
- case GL_CONVOLUTION_FORMAT:
+ case GL_CONVOLUTION_FORMAT:
/* case GL_CONVOLUTION_FORMAT_EXT:*/
- case GL_CONVOLUTION_WIDTH:
+ case GL_CONVOLUTION_WIDTH:
/* case GL_CONVOLUTION_WIDTH_EXT:*/
- case GL_CONVOLUTION_HEIGHT:
+ case GL_CONVOLUTION_HEIGHT:
/* case GL_CONVOLUTION_HEIGHT_EXT:*/
- case GL_MAX_CONVOLUTION_WIDTH:
+ case GL_MAX_CONVOLUTION_WIDTH:
/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/
- case GL_MAX_CONVOLUTION_HEIGHT:
+ case GL_MAX_CONVOLUTION_HEIGHT:
/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/
- return 1;
- case GL_CONVOLUTION_FILTER_SCALE:
+ return 1;
+ case GL_CONVOLUTION_FILTER_SCALE:
/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/
- case GL_CONVOLUTION_FILTER_BIAS:
+ case GL_CONVOLUTION_FILTER_BIAS:
/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/
- case GL_CONVOLUTION_BORDER_COLOR:
+ case GL_CONVOLUTION_BORDER_COLOR:
/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
- return 4;
- default:
- return 0;
+ return 4;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetHistogramParameterfv_size(GLenum e)
+__glGetHistogramParameterfv_size( GLenum e )
{
- switch (e) {
- case GL_HISTOGRAM_WIDTH:
- case GL_HISTOGRAM_FORMAT:
- case GL_HISTOGRAM_RED_SIZE:
- case GL_HISTOGRAM_GREEN_SIZE:
- case GL_HISTOGRAM_BLUE_SIZE:
- case GL_HISTOGRAM_ALPHA_SIZE:
- case GL_HISTOGRAM_LUMINANCE_SIZE:
- case GL_HISTOGRAM_SINK:
- return 1;
- default:
- return 0;
+ switch( e ) {
+ case GL_HISTOGRAM_WIDTH:
+ case GL_HISTOGRAM_FORMAT:
+ case GL_HISTOGRAM_RED_SIZE:
+ case GL_HISTOGRAM_GREEN_SIZE:
+ case GL_HISTOGRAM_BLUE_SIZE:
+ case GL_HISTOGRAM_ALPHA_SIZE:
+ case GL_HISTOGRAM_LUMINANCE_SIZE:
+ case GL_HISTOGRAM_SINK:
+ return 1;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetMinmaxParameterfv_size(GLenum e)
+__glGetMinmaxParameterfv_size( GLenum e )
{
- switch (e) {
- case GL_MINMAX_FORMAT:
- case GL_MINMAX_SINK:
- return 1;
- default:
- return 0;
+ switch( e ) {
+ case GL_MINMAX_FORMAT:
+ case GL_MINMAX_SINK:
+ return 1;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetProgramivARB_size(GLenum e)
+__glGetProgramivARB_size( GLenum e )
{
- switch (e) {
- case GL_PROGRAM_LENGTH_ARB:
- case GL_PROGRAM_BINDING_ARB:
- case GL_PROGRAM_ALU_INSTRUCTIONS_ARB:
- case GL_PROGRAM_TEX_INSTRUCTIONS_ARB:
- case GL_PROGRAM_TEX_INDIRECTIONS_ARB:
- case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB:
- case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB:
- case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB:
- case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB:
- case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB:
- case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB:
- case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB:
- case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB:
- case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB:
- case GL_PROGRAM_FORMAT_ARB:
- case GL_PROGRAM_INSTRUCTIONS_ARB:
- case GL_MAX_PROGRAM_INSTRUCTIONS_ARB:
- case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB:
- case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB:
- case GL_PROGRAM_TEMPORARIES_ARB:
- case GL_MAX_PROGRAM_TEMPORARIES_ARB:
- case GL_PROGRAM_NATIVE_TEMPORARIES_ARB:
- case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB:
- case GL_PROGRAM_PARAMETERS_ARB:
- case GL_MAX_PROGRAM_PARAMETERS_ARB:
- case GL_PROGRAM_NATIVE_PARAMETERS_ARB:
- case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB:
- case GL_PROGRAM_ATTRIBS_ARB:
- case GL_MAX_PROGRAM_ATTRIBS_ARB:
- case GL_PROGRAM_NATIVE_ATTRIBS_ARB:
- case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB:
- case GL_PROGRAM_ADDRESS_REGISTERS_ARB:
- case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB:
- case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB:
- case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB:
- case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB:
- case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB:
- case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB:
- case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV:
- case GL_MAX_PROGRAM_CALL_DEPTH_NV:
- case GL_MAX_PROGRAM_IF_DEPTH_NV:
- case GL_MAX_PROGRAM_LOOP_DEPTH_NV:
- case GL_MAX_PROGRAM_LOOP_COUNT_NV:
- return 1;
- default:
- return 0;
+ switch( e ) {
+ case GL_PROGRAM_LENGTH_ARB:
+ case GL_PROGRAM_BINDING_ARB:
+ case GL_PROGRAM_ALU_INSTRUCTIONS_ARB:
+ case GL_PROGRAM_TEX_INSTRUCTIONS_ARB:
+ case GL_PROGRAM_TEX_INDIRECTIONS_ARB:
+ case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB:
+ case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB:
+ case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB:
+ case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB:
+ case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB:
+ case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB:
+ case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB:
+ case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB:
+ case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB:
+ case GL_PROGRAM_FORMAT_ARB:
+ case GL_PROGRAM_INSTRUCTIONS_ARB:
+ case GL_MAX_PROGRAM_INSTRUCTIONS_ARB:
+ case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB:
+ case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB:
+ case GL_PROGRAM_TEMPORARIES_ARB:
+ case GL_MAX_PROGRAM_TEMPORARIES_ARB:
+ case GL_PROGRAM_NATIVE_TEMPORARIES_ARB:
+ case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB:
+ case GL_PROGRAM_PARAMETERS_ARB:
+ case GL_MAX_PROGRAM_PARAMETERS_ARB:
+ case GL_PROGRAM_NATIVE_PARAMETERS_ARB:
+ case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB:
+ case GL_PROGRAM_ATTRIBS_ARB:
+ case GL_MAX_PROGRAM_ATTRIBS_ARB:
+ case GL_PROGRAM_NATIVE_ATTRIBS_ARB:
+ case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB:
+ case GL_PROGRAM_ADDRESS_REGISTERS_ARB:
+ case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB:
+ case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB:
+ case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB:
+ case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB:
+ case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB:
+ case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB:
+ case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV:
+ case GL_MAX_PROGRAM_CALL_DEPTH_NV:
+ case GL_MAX_PROGRAM_IF_DEPTH_NV:
+ case GL_MAX_PROGRAM_LOOP_DEPTH_NV:
+ case GL_MAX_PROGRAM_LOOP_COUNT_NV:
+ return 1;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetVertexAttribdvARB_size(GLenum e)
+__glGetVertexAttribdvARB_size( GLenum e )
{
- switch (e) {
- case GL_VERTEX_PROGRAM_ARB:
- case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB:
- case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB:
- case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB:
- case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB:
- case GL_CURRENT_VERTEX_ATTRIB_ARB:
- case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
- return 1;
- default:
- return 0;
+ switch( e ) {
+ case GL_VERTEX_PROGRAM_ARB:
+ case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB:
+ case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB:
+ case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB:
+ case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB:
+ case GL_CURRENT_VERTEX_ATTRIB_ARB:
+ case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
+ return 1;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetQueryObjectivARB_size(GLenum e)
+__glGetQueryObjectivARB_size( GLenum e )
{
- switch (e) {
- case GL_QUERY_RESULT_ARB:
- case GL_QUERY_RESULT_AVAILABLE_ARB:
- return 1;
- default:
- return 0;
+ switch( e ) {
+ case GL_QUERY_RESULT_ARB:
+ case GL_QUERY_RESULT_AVAILABLE_ARB:
+ return 1;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetQueryivARB_size(GLenum e)
+__glGetQueryivARB_size( GLenum e )
{
- switch (e) {
- case GL_QUERY_COUNTER_BITS_ARB:
- case GL_CURRENT_QUERY_ARB:
- return 1;
- default:
- return 0;
+ switch( e ) {
+ case GL_QUERY_COUNTER_BITS_ARB:
+ case GL_CURRENT_QUERY_ARB:
+ return 1;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glPointParameterfvEXT_size(GLenum e)
+__glPointParameterfvEXT_size( GLenum e )
{
- switch (e) {
- case GL_POINT_SIZE_MIN:
+ switch( e ) {
+ case GL_POINT_SIZE_MIN:
/* case GL_POINT_SIZE_MIN_ARB:*/
/* case GL_POINT_SIZE_MIN_SGIS:*/
- case GL_POINT_SIZE_MAX:
+ case GL_POINT_SIZE_MAX:
/* case GL_POINT_SIZE_MAX_ARB:*/
/* case GL_POINT_SIZE_MAX_SGIS:*/
- case GL_POINT_FADE_THRESHOLD_SIZE:
+ case GL_POINT_FADE_THRESHOLD_SIZE:
/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/
/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/
- case GL_POINT_SPRITE_R_MODE_NV:
- case GL_POINT_SPRITE_COORD_ORIGIN:
- return 1;
- case GL_POINT_DISTANCE_ATTENUATION:
+ case GL_POINT_SPRITE_R_MODE_NV:
+ case GL_POINT_SPRITE_COORD_ORIGIN:
+ return 1;
+ case GL_POINT_DISTANCE_ATTENUATION:
/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/
/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/
- return 3;
- default:
- return 0;
+ return 3;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetProgramivNV_size(GLenum e)
+__glGetProgramivNV_size( GLenum e )
{
- switch (e) {
- case GL_PROGRAM_LENGTH_NV:
- case GL_PROGRAM_TARGET_NV:
- case GL_PROGRAM_RESIDENT_NV:
- return 1;
- default:
- return 0;
+ switch( e ) {
+ case GL_PROGRAM_LENGTH_NV:
+ case GL_PROGRAM_TARGET_NV:
+ case GL_PROGRAM_RESIDENT_NV:
+ return 1;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetVertexAttribdvNV_size(GLenum e)
+__glGetVertexAttribdvNV_size( GLenum e )
{
- switch (e) {
- case GL_ATTRIB_ARRAY_SIZE_NV:
- case GL_ATTRIB_ARRAY_STRIDE_NV:
- case GL_ATTRIB_ARRAY_TYPE_NV:
- case GL_CURRENT_ATTRIB_NV:
- return 1;
- default:
- return 0;
+ switch( e ) {
+ case GL_ATTRIB_ARRAY_SIZE_NV:
+ case GL_ATTRIB_ARRAY_STRIDE_NV:
+ case GL_ATTRIB_ARRAY_TYPE_NV:
+ case GL_CURRENT_ATTRIB_NV:
+ return 1;
+ default: return 0;
}
}
INTERNAL PURE FASTCALL GLint
-__glGetFramebufferAttachmentParameterivEXT_size(GLenum e)
+__glGetFramebufferAttachmentParameterivEXT_size( GLenum e )
{
- switch (e) {
- case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
- case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:
- case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT:
- case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:
- case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
- return 1;
- default:
- return 0;
+ switch( e ) {
+ case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
+ return 1;
+ default: return 0;
}
}
-ALIAS(Fogiv, Fogfv)
- ALIAS(Lightiv, Lightfv)
- ALIAS(LightModeliv, LightModelfv)
- ALIAS(Materialiv, Materialfv)
- ALIAS(TexParameteriv, TexParameterfv)
- ALIAS(TexEnviv, TexEnvfv)
- ALIAS(TexGenfv, TexGendv)
- ALIAS(TexGeniv, TexGendv)
- ALIAS(Map1f, Map1d)
- ALIAS(Map2f, Map2d)
- ALIAS(GetDoublev, GetBooleanv)
- ALIAS(GetFloatv, GetBooleanv)
- ALIAS(GetIntegerv, GetBooleanv)
- ALIAS(GetLightfv, Lightfv)
- ALIAS(GetLightiv, Lightfv)
- ALIAS(GetMaterialfv, Materialfv)
- ALIAS(GetMaterialiv, Materialfv)
- ALIAS(GetTexEnvfv, TexEnvfv)
- ALIAS(GetTexEnviv, TexEnvfv)
- ALIAS(GetTexGendv, TexGendv)
- ALIAS(GetTexGenfv, TexGendv)
- ALIAS(GetTexGeniv, TexGendv)
- ALIAS(GetTexParameteriv, GetTexParameterfv)
- ALIAS(GetTexLevelParameteriv, GetTexLevelParameterfv)
- ALIAS(ColorTableParameteriv, ColorTableParameterfv)
- ALIAS(GetColorTableParameteriv, GetColorTableParameterfv)
- ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
- ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv)
- ALIAS(GetHistogramParameteriv, GetHistogramParameterfv)
- ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv)
- ALIAS(GetVertexAttribfvARB, GetVertexAttribdvARB)
- ALIAS(GetVertexAttribivARB, GetVertexAttribdvARB)
- ALIAS(GetQueryObjectuivARB, GetQueryObjectivARB)
- ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV)
- ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV)
- ALIAS(PointParameterivNV, PointParameterfvEXT)
+ALIAS( Fogiv, Fogfv )
+ALIAS( Lightiv, Lightfv )
+ALIAS( LightModeliv, LightModelfv )
+ALIAS( Materialiv, Materialfv )
+ALIAS( TexParameteriv, TexParameterfv )
+ALIAS( TexEnviv, TexEnvfv )
+ALIAS( TexGenfv, TexGendv )
+ALIAS( TexGeniv, TexGendv )
+ALIAS( Map1f, Map1d )
+ALIAS( Map2f, Map2d )
+ALIAS( GetDoublev, GetBooleanv )
+ALIAS( GetFloatv, GetBooleanv )
+ALIAS( GetIntegerv, GetBooleanv )
+ALIAS( GetLightfv, Lightfv )
+ALIAS( GetLightiv, Lightfv )
+ALIAS( GetMaterialfv, Materialfv )
+ALIAS( GetMaterialiv, Materialfv )
+ALIAS( GetTexEnvfv, TexEnvfv )
+ALIAS( GetTexEnviv, TexEnvfv )
+ALIAS( GetTexGendv, TexGendv )
+ALIAS( GetTexGenfv, TexGendv )
+ALIAS( GetTexGeniv, TexGendv )
+ALIAS( GetTexParameteriv, GetTexParameterfv )
+ALIAS( GetTexLevelParameteriv, GetTexLevelParameterfv )
+ALIAS( ColorTableParameteriv, ColorTableParameterfv )
+ALIAS( GetColorTableParameteriv, GetColorTableParameterfv )
+ALIAS( ConvolutionParameteriv, ConvolutionParameterfv )
+ALIAS( GetConvolutionParameteriv, GetConvolutionParameterfv )
+ALIAS( GetHistogramParameteriv, GetHistogramParameterfv )
+ALIAS( GetMinmaxParameteriv, GetMinmaxParameterfv )
+ALIAS( GetVertexAttribfvARB, GetVertexAttribdvARB )
+ALIAS( GetVertexAttribivARB, GetVertexAttribdvARB )
+ALIAS( GetQueryObjectuivARB, GetQueryObjectivARB )
+ALIAS( GetVertexAttribfvNV, GetVertexAttribdvNV )
+ALIAS( GetVertexAttribivNV, GetVertexAttribdvNV )
+ALIAS( PointParameterivNV, PointParameterfvEXT )
+
# undef PURE
# undef FASTCALL
# undef INTERNAL
diff --git a/xorg-server/glx/indirect_size_get.h b/xorg-server/glx/indirect_size_get.h
index 7f24a64fa..b8aeedae2 100644
--- a/xorg-server/glx/indirect_size_get.h
+++ b/xorg-server/glx/indirect_size_get.h
@@ -36,7 +36,7 @@
* \author Ian Romanick <idr@us.ibm.com>
*/
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PURE __attribute__((pure))
# else
# define PURE
@@ -48,12 +48,32 @@
# define FASTCALL
# endif
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define INTERNAL __attribute__((visibility("internal")))
# else
# define INTERNAL
# endif
+extern INTERNAL PURE FASTCALL GLint __glCallLists_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glFogfv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glFogiv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glLightfv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glLightiv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glLightModelfv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glLightModeliv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glMaterialfv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glMaterialiv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glTexParameterfv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glTexParameteriv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glTexEnvfv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glTexEnviv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glTexGendv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glTexGenfv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glTexGeniv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glMap1d_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glMap1f_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glMap2d_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glMap2f_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum);
@@ -71,12 +91,14 @@ extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glColorTableParameterfv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glColorTableParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint
-__glGetConvolutionParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint
-__glGetConvolutionParameteriv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glConvolutionParameterfv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glConvolutionParameteriv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameterfv_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum);
@@ -88,12 +110,13 @@ extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glPointParameterfvEXT_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint
-__glGetFramebufferAttachmentParameterivEXT_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glPointParameterivNV_size(GLenum);
+extern INTERNAL PURE FASTCALL GLint __glGetFramebufferAttachmentParameterivEXT_size(GLenum);
# undef PURE
# undef FASTCALL
diff --git a/xorg-server/glx/indirect_table.c b/xorg-server/glx/indirect_table.c
index 3249f6e84..d4262f09f 100644
--- a/xorg-server/glx/indirect_table.c
+++ b/xorg-server/glx/indirect_table.c
@@ -25,6 +25,10 @@
* SOFTWARE.
*/
+#ifndef HAVE_DIX_CONFIG_H
+#include "glheader.h"
+#endif
+
#include <inttypes.h>
#include "glxserver.h"
#include "glxext.h"
@@ -198,7 +202,7 @@ const struct __glXDispatchInfo Single_dispatch_info = {
/*****************************************************************/
/* tree depth = 8 */
-static const int_fast16_t Render_dispatch_tree[95] = {
+static const int_fast16_t Render_dispatch_tree[92] = {
/* [0] -> opcode range [0, 8192], node depth 1 */
2,
5,
@@ -308,37 +312,32 @@ static const int_fast16_t Render_dispatch_tree[95] = {
86,
EMPTY_LEAF,
89,
- 92,
+ LEAF(360),
EMPTY_LEAF,
/* [80] -> opcode range [4128, 4144], node depth 6 */
1,
- LEAF(360),
+ LEAF(376),
EMPTY_LEAF,
/* [83] -> opcode range [4256, 4272], node depth 6 */
1,
EMPTY_LEAF,
- LEAF(368),
+ LEAF(384),
/* [86] -> opcode range [4272, 4288], node depth 6 */
1,
- LEAF(376),
+ LEAF(392),
EMPTY_LEAF,
/* [89] -> opcode range [4304, 4320], node depth 6 */
1,
EMPTY_LEAF,
- LEAF(384),
-
- /* [92] -> opcode range [4320, 4336], node depth 6 */
- 1,
- LEAF(392),
- EMPTY_LEAF,
+ LEAF(400),
};
-static const void *Render_function_table[400][2] = {
+static const void *Render_function_table[408][2] = {
/* [ 0] = 0 */ {NULL, NULL},
/* [ 1] = 1 */ {__glXDisp_CallList, __glXDispSwap_CallList},
/* [ 2] = 2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists},
@@ -576,7 +575,7 @@ static const void *Render_function_table[400][2] = {
/* [ 234] = 234 */ {NULL, NULL},
/* [ 235] = 235 */ {NULL, NULL},
/* [ 236] = 236 */ {NULL, NULL},
- /* [ 237] = 237 */ {NULL, NULL},
+ /* [ 237] = 237 */ {__glXDisp_FramebufferTextureLayerEXT, __glXDispSwap_FramebufferTextureLayerEXT},
/* [ 238] = 238 */ {NULL, NULL},
/* [ 239] = 239 */ {NULL, NULL},
/* [ 240] = 2048 */ {__glXDisp_SampleMaskSGIS, __glXDispSwap_SampleMaskSGIS},
@@ -699,49 +698,57 @@ static const void *Render_function_table[400][2] = {
/* [ 357] = 4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB},
/* [ 358] = 4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB},
/* [ 359] = 4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB},
- /* [ 360] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT},
- /* [ 361] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT},
- /* [ 362] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT},
- /* [ 363] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT},
- /* [ 364] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT},
- /* [ 365] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT},
- /* [ 366] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT},
- /* [ 367] = 4135 */ {NULL, NULL},
- /* [ 368] = 4264 */ {NULL, NULL},
- /* [ 369] = 4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV},
- /* [ 370] = 4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV},
- /* [ 371] = 4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV},
- /* [ 372] = 4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV},
- /* [ 373] = 4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV},
- /* [ 374] = 4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV},
- /* [ 375] = 4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV},
- /* [ 376] = 4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV},
- /* [ 377] = 4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV},
- /* [ 378] = 4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV},
- /* [ 379] = 4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV},
- /* [ 380] = 4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV},
- /* [ 381] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV},
- /* [ 382] = 4278 */ {NULL, NULL},
- /* [ 383] = 4279 */ {NULL, NULL},
- /* [ 384] = 4312 */ {NULL, NULL},
- /* [ 385] = 4313 */ {NULL, NULL},
- /* [ 386] = 4314 */ {NULL, NULL},
- /* [ 387] = 4315 */ {NULL, NULL},
- /* [ 388] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT},
- /* [ 389] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT},
- /* [ 390] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT},
- /* [ 391] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT},
- /* [ 392] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT},
- /* [ 393] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT},
- /* [ 394] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT},
- /* [ 395] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT},
- /* [ 396] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT},
- /* [ 397] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT},
- /* [ 398] = 4326 */ {NULL, NULL},
- /* [ 399] = 4327 */ {NULL, NULL},
+ /* [ 360] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT},
+ /* [ 361] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT},
+ /* [ 362] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT},
+ /* [ 363] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT},
+ /* [ 364] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT},
+ /* [ 365] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT},
+ /* [ 366] = 4326 */ {NULL, NULL},
+ /* [ 367] = 4327 */ {NULL, NULL},
+ /* [ 368] = 4328 */ {NULL, NULL},
+ /* [ 369] = 4329 */ {NULL, NULL},
+ /* [ 370] = 4330 */ {__glXDisp_BlitFramebufferEXT, __glXDispSwap_BlitFramebufferEXT},
+ /* [ 371] = 4331 */ {__glXDisp_RenderbufferStorageMultisample, __glXDispSwap_RenderbufferStorageMultisample},
+ /* [ 372] = 4332 */ {NULL, NULL},
+ /* [ 373] = 4333 */ {NULL, NULL},
+ /* [ 374] = 4334 */ {NULL, NULL},
+ /* [ 375] = 4335 */ {NULL, NULL},
+ /* [ 376] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT},
+ /* [ 377] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT},
+ /* [ 378] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT},
+ /* [ 379] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT},
+ /* [ 380] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT},
+ /* [ 381] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT},
+ /* [ 382] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT},
+ /* [ 383] = 4135 */ {NULL, NULL},
+ /* [ 384] = 4264 */ {NULL, NULL},
+ /* [ 385] = 4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV},
+ /* [ 386] = 4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV},
+ /* [ 387] = 4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV},
+ /* [ 388] = 4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV},
+ /* [ 389] = 4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV},
+ /* [ 390] = 4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV},
+ /* [ 391] = 4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV},
+ /* [ 392] = 4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV},
+ /* [ 393] = 4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV},
+ /* [ 394] = 4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV},
+ /* [ 395] = 4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV},
+ /* [ 396] = 4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV},
+ /* [ 397] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV},
+ /* [ 398] = 4278 */ {NULL, NULL},
+ /* [ 399] = 4279 */ {NULL, NULL},
+ /* [ 400] = 4312 */ {NULL, NULL},
+ /* [ 401] = 4313 */ {NULL, NULL},
+ /* [ 402] = 4314 */ {NULL, NULL},
+ /* [ 403] = 4315 */ {NULL, NULL},
+ /* [ 404] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT},
+ /* [ 405] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT},
+ /* [ 406] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT},
+ /* [ 407] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT},
};
-static const int_fast16_t Render_size_table[400][2] = {
+static const int_fast16_t Render_size_table[408][2] = {
/* [ 0] = 0 */ { 0, ~0},
/* [ 1] = 1 */ { 8, ~0},
/* [ 2] = 2 */ { 12, 0},
@@ -979,7 +986,7 @@ static const int_fast16_t Render_size_table[400][2] = {
/* [234] = 234 */ { 0, ~0},
/* [235] = 235 */ { 0, ~0},
/* [236] = 236 */ { 0, ~0},
- /* [237] = 237 */ { 0, ~0},
+ /* [237] = 237 */ { 24, ~0},
/* [238] = 238 */ { 0, ~0},
/* [239] = 239 */ { 0, ~0},
/* [240] = 2048 */ { 12, ~0},
@@ -1102,46 +1109,54 @@ static const int_fast16_t Render_size_table[400][2] = {
/* [357] = 4237 */ { 24, ~0},
/* [358] = 4238 */ { 16, ~0},
/* [359] = 4239 */ { 24, ~0},
- /* [360] = 4128 */ { 16, ~0},
- /* [361] = 4129 */ { 16, ~0},
- /* [362] = 4130 */ { 28, ~0},
- /* [363] = 4131 */ { 8, ~0},
- /* [364] = 4132 */ { 12, ~0},
- /* [365] = 4133 */ { 16, ~0},
- /* [366] = 4134 */ { 20, ~0},
- /* [367] = 4135 */ { 0, ~0},
- /* [368] = 4264 */ { 0, ~0},
- /* [369] = 4265 */ { 12, ~0},
- /* [370] = 4266 */ { 12, ~0},
- /* [371] = 4267 */ { 16, ~0},
- /* [372] = 4268 */ { 16, ~0},
- /* [373] = 4269 */ { 12, ~0},
- /* [374] = 4270 */ { 16, ~0},
- /* [375] = 4271 */ { 20, ~0},
- /* [376] = 4272 */ { 24, ~0},
- /* [377] = 4273 */ { 16, ~0},
- /* [378] = 4274 */ { 24, ~0},
- /* [379] = 4275 */ { 32, ~0},
- /* [380] = 4276 */ { 40, ~0},
- /* [381] = 4277 */ { 12, ~0},
- /* [382] = 4278 */ { 0, ~0},
- /* [383] = 4279 */ { 0, ~0},
- /* [384] = 4312 */ { 0, ~0},
- /* [385] = 4313 */ { 0, ~0},
- /* [386] = 4314 */ { 0, ~0},
- /* [387] = 4315 */ { 0, ~0},
- /* [388] = 4316 */ { 12, ~0},
- /* [389] = 4317 */ { 8, 72},
- /* [390] = 4318 */ { 20, ~0},
- /* [391] = 4319 */ { 12, ~0},
- /* [392] = 4320 */ { 8, 73},
- /* [393] = 4321 */ { 24, ~0},
- /* [394] = 4322 */ { 24, ~0},
- /* [395] = 4323 */ { 28, ~0},
- /* [396] = 4324 */ { 20, ~0},
- /* [397] = 4325 */ { 8, ~0},
- /* [398] = 4326 */ { 0, ~0},
- /* [399] = 4327 */ { 0, ~0},
+ /* [360] = 4320 */ { 8, 72},
+ /* [361] = 4321 */ { 24, ~0},
+ /* [362] = 4322 */ { 24, ~0},
+ /* [363] = 4323 */ { 28, ~0},
+ /* [364] = 4324 */ { 20, ~0},
+ /* [365] = 4325 */ { 8, ~0},
+ /* [366] = 4326 */ { 0, ~0},
+ /* [367] = 4327 */ { 0, ~0},
+ /* [368] = 4328 */ { 0, ~0},
+ /* [369] = 4329 */ { 0, ~0},
+ /* [370] = 4330 */ { 44, ~0},
+ /* [371] = 4331 */ { 24, ~0},
+ /* [372] = 4332 */ { 0, ~0},
+ /* [373] = 4333 */ { 0, ~0},
+ /* [374] = 4334 */ { 0, ~0},
+ /* [375] = 4335 */ { 0, ~0},
+ /* [376] = 4128 */ { 16, ~0},
+ /* [377] = 4129 */ { 16, ~0},
+ /* [378] = 4130 */ { 28, ~0},
+ /* [379] = 4131 */ { 8, ~0},
+ /* [380] = 4132 */ { 12, ~0},
+ /* [381] = 4133 */ { 16, ~0},
+ /* [382] = 4134 */ { 20, ~0},
+ /* [383] = 4135 */ { 0, ~0},
+ /* [384] = 4264 */ { 0, ~0},
+ /* [385] = 4265 */ { 12, ~0},
+ /* [386] = 4266 */ { 12, ~0},
+ /* [387] = 4267 */ { 16, ~0},
+ /* [388] = 4268 */ { 16, ~0},
+ /* [389] = 4269 */ { 12, ~0},
+ /* [390] = 4270 */ { 16, ~0},
+ /* [391] = 4271 */ { 20, ~0},
+ /* [392] = 4272 */ { 24, ~0},
+ /* [393] = 4273 */ { 16, ~0},
+ /* [394] = 4274 */ { 24, ~0},
+ /* [395] = 4275 */ { 32, ~0},
+ /* [396] = 4276 */ { 40, ~0},
+ /* [397] = 4277 */ { 12, ~0},
+ /* [398] = 4278 */ { 0, ~0},
+ /* [399] = 4279 */ { 0, ~0},
+ /* [400] = 4312 */ { 0, ~0},
+ /* [401] = 4313 */ { 0, ~0},
+ /* [402] = 4314 */ { 0, ~0},
+ /* [403] = 4315 */ { 0, ~0},
+ /* [404] = 4316 */ { 12, ~0},
+ /* [405] = 4317 */ { 8, 73},
+ /* [406] = 4318 */ { 20, ~0},
+ /* [407] = 4319 */ { 12, ~0},
};
static const gl_proto_size_func Render_size_func_table[74] = {
@@ -1217,8 +1232,8 @@ static const gl_proto_size_func Render_size_func_table[74] = {
__glXProgramNamedParameter4fvNVReqSize,
__glXProgramNamedParameter4dvNVReqSize,
__glXPointParameterivNVReqSize,
- __glXDeleteRenderbuffersEXTReqSize,
__glXDeleteFramebuffersEXTReqSize,
+ __glXDeleteRenderbuffersEXTReqSize,
};
const struct __glXDispatchInfo Render_dispatch_info = {
@@ -1509,7 +1524,7 @@ static const void *VendorPriv_function_table[104][2] = {
/* [ 27] = 1299 */ {__glXDisp_GetProgramStringNV, __glXDispSwap_GetProgramStringNV},
/* [ 28] = 1300 */ {__glXDisp_GetTrackMatrixivNV, __glXDispSwap_GetTrackMatrixivNV},
/* [ 29] = 1301 */ {__glXDisp_GetVertexAttribdvARB, __glXDispSwap_GetVertexAttribdvARB},
- /* [ 30] = 1302 */ {__glXDisp_GetVertexAttribfvNV, __glXDispSwap_GetVertexAttribfvNV},
+ /* [ 30] = 1302 */ {__glXDisp_GetVertexAttribfvARB, __glXDispSwap_GetVertexAttribfvARB},
/* [ 31] = 1303 */ {__glXDisp_GetVertexAttribivNV, __glXDispSwap_GetVertexAttribivNV},
/* [ 32] = 1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV},
/* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB},
diff --git a/xorg-server/glx/indirect_texture_compression.c b/xorg-server/glx/indirect_texture_compression.c
index 5f44d7b1a..7a0101078 100644
--- a/xorg-server/glx/indirect_texture_compression.c
+++ b/xorg-server/glx/indirect_texture_compression.c
@@ -25,6 +25,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include "glxserver.h"
@@ -34,6 +38,7 @@
#include "unpack.h"
#include "indirect_size_get.h"
#include "indirect_dispatch.h"
+#include "GL/gl.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
@@ -43,7 +48,7 @@ int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte *p
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent( cl, req->contextTag, & error );
+ struct glx_context * const cx = __glXForceCurrent( cl, req->contextTag, & error );
ClientPtr client = cl->client;
@@ -83,7 +88,7 @@ int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyt
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent( cl, bswap_32( req->contextTag ), & error );
+ struct glx_context * const cx = __glXForceCurrent( cl, bswap_32( req->contextTag ), & error );
ClientPtr client = cl->client;
diff --git a/xorg-server/glx/indirect_util.c b/xorg-server/glx/indirect_util.c
index d00523249..f71fe6dd2 100644
--- a/xorg-server/glx/indirect_util.c
+++ b/xorg-server/glx/indirect_util.c
@@ -25,6 +25,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <string.h>
diff --git a/xorg-server/glx/makefile b/xorg-server/glx/makefile
new file mode 100644
index 000000000..e51d6826d
--- /dev/null
+++ b/xorg-server/glx/makefile
@@ -0,0 +1,46 @@
+LIBRARY=libglx
+
+DEFINES += GLAPIENTRY=__stdcall _GLAPI_NO_EXPORTS
+
+
+glapi_sources = \
+ indirect_dispatch.c \
+ indirect_dispatch_swap.c \
+ indirect_reqsize.c \
+ indirect_size_get.c \
+ indirect_table.c \
+ glapi.c \
+ glthread.c \
+
+libglxdri_la_SOURCES = \
+ extension_string.c \
+
+
+CSRCS = \
+ $(indirect_sources) \
+ $(glapi_sources) \
+ $(libglxdri_la_SOURCES) \
+ indirect_util.c \
+ indirect_program.c \
+ indirect_texture_compression.c \
+ glxcmds.c \
+ glxcmdsswap.c \
+ glxext.c \
+ glxdriswrast.c \
+ glxdricommon.c \
+ glxscreens.c \
+ render2.c \
+ render2swap.c \
+ renderpix.c \
+ renderpixswap.c \
+ rensize.c \
+ single2.c \
+ single2swap.c \
+ singlepix.c \
+ singlepixswap.c \
+ singlesize.c \
+ swap_interval.c \
+ xfont.c
+
+INCLUDES := $(MHMAKECONF)\mesalib\include $(INCLUDES)
+
diff --git a/xorg-server/glx/render2.c b/xorg-server/glx/render2.c
index eb7c30ba0..32cee4160 100644
--- a/xorg-server/glx/render2.c
+++ b/xorg-server/glx/render2.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <glxserver.h>
diff --git a/xorg-server/glx/render2swap.c b/xorg-server/glx/render2swap.c
index 17354c4f8..59cb93a6a 100644
--- a/xorg-server/glx/render2swap.c
+++ b/xorg-server/glx/render2swap.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include "glxserver.h"
diff --git a/xorg-server/glx/renderpix.c b/xorg-server/glx/renderpix.c
index 056e62c87..3e5612036 100644
--- a/xorg-server/glx/renderpix.c
+++ b/xorg-server/glx/renderpix.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include "glxserver.h"
diff --git a/xorg-server/glx/renderpixswap.c b/xorg-server/glx/renderpixswap.c
index 9cd57410e..a73ed1e3c 100644
--- a/xorg-server/glx/renderpixswap.c
+++ b/xorg-server/glx/renderpixswap.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include "glxserver.h"
diff --git a/xorg-server/glx/rensize.c b/xorg-server/glx/rensize.c
index 8a58e08d7..8ee9dd9dc 100644
--- a/xorg-server/glx/rensize.c
+++ b/xorg-server/glx/rensize.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <GL/gl.h>
@@ -214,12 +218,14 @@ int __glXImageSize( GLenum format, GLenum type, GLenum target,
case GL_INTENSITY:
elementsPerGroup = 1;
break;
+ case GL_RG:
case GL_422_EXT:
case GL_422_REV_EXT:
case GL_422_AVERAGE_EXT:
case GL_422_REV_AVERAGE_EXT:
case GL_DEPTH_STENCIL_NV:
case GL_DEPTH_STENCIL_MESA:
+ case GL_YCBCR_422_APPLE:
case GL_YCBCR_MESA:
case GL_LUMINANCE_ALPHA:
elementsPerGroup = 2;
diff --git a/xorg-server/glx/single2.c b/xorg-server/glx/single2.c
index beaebcd29..4db7c889d 100644
--- a/xorg-server/glx/single2.c
+++ b/xorg-server/glx/single2.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <string.h>
@@ -50,7 +54,7 @@ int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
{
GLsizei size;
GLenum type;
- __GLXcontext *cx;
+ struct glx_context *cx;
int error;
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
@@ -78,7 +82,7 @@ int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_SelectBuffer(__GLXclientState *cl, GLbyte *pc)
{
- __GLXcontext *cx;
+ struct glx_context *cx;
GLsizei size;
int error;
@@ -108,7 +112,7 @@ int __glXDisp_RenderMode(__GLXclientState *cl, GLbyte *pc)
{
ClientPtr client;
xGLXRenderModeReply reply;
- __GLXcontext *cx;
+ struct glx_context *cx;
GLint nitems=0, retBytes=0, retval, newModeCheck;
GLubyte *retBuffer = NULL;
GLenum newMode;
@@ -204,7 +208,7 @@ int __glXDisp_RenderMode(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_Flush(__GLXclientState *cl, GLbyte *pc)
{
- __GLXcontext *cx;
+ struct glx_context *cx;
int error;
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
@@ -219,7 +223,7 @@ int __glXDisp_Flush(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_Finish(__GLXclientState *cl, GLbyte *pc)
{
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client;
int error;
@@ -307,7 +311,7 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string)
int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
{
ClientPtr client;
- __GLXcontext *cx;
+ struct glx_context *cx;
GLenum name;
const char *string;
__GLX_DECLARE_SWAP_VARIABLES;
diff --git a/xorg-server/glx/single2swap.c b/xorg-server/glx/single2swap.c
index 62f3a5eac..f47e0aaff 100644
--- a/xorg-server/glx/single2swap.c
+++ b/xorg-server/glx/single2swap.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include "glxserver.h"
@@ -47,7 +51,7 @@ int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
GLsizei size;
GLenum type;
__GLX_DECLARE_SWAP_VARIABLES;
- __GLXcontext *cx;
+ struct glx_context *cx;
int error;
__GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag);
@@ -78,7 +82,7 @@ int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_SelectBuffer(__GLXclientState *cl, GLbyte *pc)
{
- __GLXcontext *cx;
+ struct glx_context *cx;
GLsizei size;
__GLX_DECLARE_SWAP_VARIABLES;
int error;
@@ -110,7 +114,7 @@ int __glXDispSwap_SelectBuffer(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_RenderMode(__GLXclientState *cl, GLbyte *pc)
{
ClientPtr client;
- __GLXcontext *cx;
+ struct glx_context *cx;
xGLXRenderModeReply reply;
GLint nitems=0, retBytes=0, retval, newModeCheck;
GLubyte *retBuffer = NULL;
@@ -218,7 +222,7 @@ int __glXDispSwap_RenderMode(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_Flush(__GLXclientState *cl, GLbyte *pc)
{
- __GLXcontext *cx;
+ struct glx_context *cx;
int error;
__GLX_DECLARE_SWAP_VARIABLES;
@@ -235,7 +239,7 @@ int __glXDispSwap_Flush(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_Finish(__GLXclientState *cl, GLbyte *pc)
{
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client;
int error;
__GLX_DECLARE_SWAP_VARIABLES;
diff --git a/xorg-server/glx/singlepix.c b/xorg-server/glx/singlepix.c
index a0a6a7918..98dc7c2e8 100644
--- a/xorg-server/glx/singlepix.c
+++ b/xorg-server/glx/singlepix.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include "glxserver.h"
@@ -49,7 +53,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
GLenum format, type;
GLboolean swapBytes, lsbFirst;
GLint compsize;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
char *answer, answerBuffer[200];
@@ -100,7 +104,7 @@ int __glXDisp_GetTexImage(__GLXclientState *cl, GLbyte *pc)
GLint level, compsize;
GLenum format, type, target;
GLboolean swapBytes;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
char *answer, answerBuffer[200];
@@ -158,7 +162,7 @@ int __glXDisp_GetTexImage(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc)
{
GLboolean lsbFirst;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
GLubyte answerBuffer[200];
@@ -194,7 +198,7 @@ static int GetSeparableFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag ta
GLint compsize, compsize2;
GLenum format, type, target;
GLboolean swapBytes;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
char *answer, answerBuffer[200];
@@ -273,7 +277,7 @@ static int GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc,
GLint compsize;
GLenum format, type, target;
GLboolean swapBytes;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
char *answer, answerBuffer[200];
@@ -347,7 +351,7 @@ static int GetHistogram(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
GLint compsize;
GLenum format, type, target;
GLboolean swapBytes, reset;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
char *answer, answerBuffer[200];
@@ -410,7 +414,7 @@ static int GetMinmax(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
GLint compsize;
GLenum format, type, target;
GLboolean swapBytes, reset;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
char *answer, answerBuffer[200];
@@ -465,7 +469,7 @@ static int GetColorTable(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
GLint compsize;
GLenum format, type, target;
GLboolean swapBytes;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
char *answer, answerBuffer[200];
diff --git a/xorg-server/glx/singlepixswap.c b/xorg-server/glx/singlepixswap.c
index a7febc9a6..b6b2a07b0 100644
--- a/xorg-server/glx/singlepixswap.c
+++ b/xorg-server/glx/singlepixswap.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include "glxserver.h"
@@ -50,7 +54,7 @@ int __glXDispSwap_ReadPixels(__GLXclientState *cl, GLbyte *pc)
GLboolean swapBytes, lsbFirst;
GLint compsize;
__GLX_DECLARE_SWAP_VARIABLES;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
char *answer, answerBuffer[200];
@@ -112,7 +116,7 @@ int __glXDispSwap_GetTexImage(__GLXclientState *cl, GLbyte *pc)
GLenum format, type, target;
GLboolean swapBytes;
__GLX_DECLARE_SWAP_VARIABLES;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
char *answer, answerBuffer[200];
@@ -181,7 +185,7 @@ int __glXDispSwap_GetTexImage(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc)
{
GLboolean lsbFirst;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
GLubyte answerBuffer[200];
@@ -219,7 +223,7 @@ static int GetSeparableFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag ta
GLint compsize, compsize2;
GLenum format, type, target;
GLboolean swapBytes;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
__GLX_DECLARE_SWAP_VARIABLES;
@@ -304,7 +308,7 @@ static int GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag
GLint compsize;
GLenum format, type, target;
GLboolean swapBytes;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
__GLX_DECLARE_SWAP_VARIABLES;
@@ -383,7 +387,7 @@ static int GetHistogram(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
GLint compsize;
GLenum format, type, target;
GLboolean swapBytes, reset;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
__GLX_DECLARE_SWAP_VARIABLES;
@@ -451,7 +455,7 @@ static int GetMinmax(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
GLint compsize;
GLenum format, type, target;
GLboolean swapBytes, reset;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
__GLX_DECLARE_SWAP_VARIABLES;
@@ -511,7 +515,7 @@ static int GetColorTable(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
GLint compsize;
GLenum format, type, target;
GLboolean swapBytes;
- __GLXcontext *cx;
+ struct glx_context *cx;
ClientPtr client = cl->client;
int error;
__GLX_DECLARE_SWAP_VARIABLES;
diff --git a/xorg-server/glx/singlesize.c b/xorg-server/glx/singlesize.c
index d338886b4..85fa9871c 100644
--- a/xorg-server/glx/singlesize.c
+++ b/xorg-server/glx/singlesize.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include <GL/gl.h>
diff --git a/xorg-server/glx/swap_interval.c b/xorg-server/glx/swap_interval.c
index 0bae3247e..f55af319b 100644
--- a/xorg-server/glx/swap_interval.c
+++ b/xorg-server/glx/swap_interval.c
@@ -24,6 +24,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include "glxserver.h"
@@ -37,7 +41,6 @@
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
-#include "glapioffsets.h"
#include "glxbyteorder.h"
static int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap);
@@ -47,7 +50,7 @@ int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap)
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
ClientPtr client = cl->client;
const GLXContextTag tag = req->contextTag;
- __GLXcontext *cx;
+ struct glx_context *cx;
GLint interval;
diff --git a/xorg-server/glx/xfont.c b/xorg-server/glx/xfont.c
index 84a301f9b..393c2a2a0 100644
--- a/xorg-server/glx/xfont.c
+++ b/xorg-server/glx/xfont.c
@@ -30,6 +30,10 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
#endif
#include "glxserver.h"
@@ -151,7 +155,7 @@ int __glXDisp_UseXFont(__GLXclientState *cl, GLbyte *pc)
xGLXUseXFontReq *req;
FontPtr pFont;
GLuint currentListIndex;
- __GLXcontext *cx;
+ struct glx_context *cx;
int error;
REQUEST_SIZE_MATCH(xGLXUseXFontReq);
diff --git a/xorg-server/hw/dmx/dmxinit.c b/xorg-server/hw/dmx/dmxinit.c
index e0e5d1228..5dce93028 100644
--- a/xorg-server/hw/dmx/dmxinit.c
+++ b/xorg-server/hw/dmx/dmxinit.c
@@ -834,6 +834,7 @@ void AbortDDX(void)
}
#ifdef DDXBEFORERESET
+/* This function is called in Xserver/dix/dispatch.c */
void ddxBeforeReset(void)
{
}
diff --git a/xorg-server/hw/dmx/dmxpixmap.c b/xorg-server/hw/dmx/dmxpixmap.c
index a16736419..9a098777d 100644
--- a/xorg-server/hw/dmx/dmxpixmap.c
+++ b/xorg-server/hw/dmx/dmxpixmap.c
@@ -1,250 +1,250 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Provides pixmap support. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxsync.h"
-#include "dmxpixmap.h"
-
-#include "pixmapstr.h"
-#include "servermd.h"
-#include "privates.h"
-
-/** Initialize a private area in \a pScreen for pixmap information. */
-Bool dmxInitPixmap(ScreenPtr pScreen)
-{
- if (!dixRegisterPrivateKey(&dmxPixPrivateKeyRec, PRIVATE_PIXMAP, sizeof(dmxPixPrivRec)))
- return FALSE;
-
- return TRUE;
-}
-
-/** Create a pixmap on the back-end server. */
-void dmxBECreatePixmap(PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
- dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
-
- /* Make sure we haven't already created this pixmap. This can
- * happen when the pixmap is used elsewhere (e.g., as a background
- * or border for a window) and the refcnt > 1.
- */
- if (pPixPriv->pixmap)
- return;
-
- if (pPixmap->drawable.width && pPixmap->drawable.height) {
- pPixPriv->pixmap = XCreatePixmap(dmxScreen->beDisplay,
- dmxScreen->scrnWin,
- pPixmap->drawable.width,
- pPixmap->drawable.height,
- pPixmap->drawable.depth);
- dmxSync(dmxScreen, FALSE);
- }
-}
-
-/** Create a pixmap for \a pScreen with the specified \a width, \a
- * height, and \a depth. */
-PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
- unsigned class)
-{
- DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
- PixmapPtr pPixmap;
- int bpp;
- dmxPixPrivPtr pPixPriv;
-
-#if 0
- DMX_UNWRAP(CreatePixmap, dmxScreen, pScreen);
- if (pScreen->CreatePixmap)
- ret = pScreen->CreatePixmap(pPixmap);
-#endif
-
- /* Create pixmap on back-end server */
- if (depth == 24) bpp = 32;
- else bpp = depth;
-
- pPixmap = AllocatePixmap(pScreen, 0);
- if (!pPixmap)
- return NullPixmap;
-
- pPixmap->drawable.type = DRAWABLE_PIXMAP;
- pPixmap->drawable.class = class;
- pPixmap->drawable.pScreen = pScreen;
- pPixmap->drawable.depth = depth;
- pPixmap->drawable.bitsPerPixel = bpp;
- pPixmap->drawable.id = 0;
- pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
- pPixmap->drawable.x = 0;
- pPixmap->drawable.y = 0;
- pPixmap->drawable.width = width;
- pPixmap->drawable.height = height;
- pPixmap->devKind = PixmapBytePad(width, bpp);
- pPixmap->refcnt = 1;
-
- pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
- pPixPriv->pixmap = (Pixmap)0;
- pPixPriv->detachedImage = NULL;
-
- /* Create the pixmap on the back-end server */
- if (dmxScreen->beDisplay) {
- dmxBECreatePixmap(pPixmap);
- }
-
-#if 0
- DMX_WRAP(CreatePixmap, dmxCreatePixmap, dmxScreen, pScreen);
-#endif
-
- return pPixmap;
-}
-
-/** Destroy the pixmap on the back-end server. */
-Bool dmxBEFreePixmap(PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
- dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
-
- if (pPixPriv->pixmap) {
- XFreePixmap(dmxScreen->beDisplay, pPixPriv->pixmap);
- pPixPriv->pixmap = (Pixmap)0;
- return TRUE;
- }
-
- return FALSE;
-}
-
-/** Destroy the pixmap pointed to by \a pPixmap. */
-Bool dmxDestroyPixmap(PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
- Bool ret = TRUE;
-
-#if 0
- DMX_UNWRAP(DestroyPixmap, dmxScreen, pScreen);
-#endif
-
- if (--pPixmap->refcnt)
- return TRUE;
-
- /* Destroy pixmap on back-end server */
- if (dmxScreen->beDisplay) {
- if (dmxBEFreePixmap(pPixmap)) {
- /* Also make sure that we destroy any detached image */
- dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
- if (pPixPriv->detachedImage)
- XDestroyImage(pPixPriv->detachedImage);
- dmxSync(dmxScreen, FALSE);
- }
- }
- FreePixmap(pPixmap);
-
-#if 0
- if (pScreen->DestroyPixmap)
- ret = pScreen->DestroyPixmap(pPixmap);
- DMX_WRAP(DestroyPixmap, dmxDestroyPixmap, dmxScreen, pScreen);
-#endif
-
- return ret;
-}
-
-/** Create and return a region based on the pixmap pointed to by \a
- * pPixmap. */
-RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap)
-{
- DMXScreenInfo *dmxScreen = &dmxScreens[pPixmap->drawable.pScreen->myNum];
- dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
- XImage *ximage;
- RegionPtr pReg, pTmpReg;
- int x, y;
- unsigned long previousPixel, currentPixel;
- BoxRec Box;
- Bool overlap;
-
- if (!dmxScreen->beDisplay) {
- pReg = RegionCreate(NullBox, 1);
- return pReg;
- }
-
- ximage = XGetImage(dmxScreen->beDisplay, pPixPriv->pixmap, 0, 0,
- pPixmap->drawable.width, pPixmap->drawable.height,
- 1, XYPixmap);
-
- pReg = RegionCreate(NullBox, 1);
- pTmpReg = RegionCreate(NullBox, 1);
- if(!pReg || !pTmpReg) {
- XDestroyImage(ximage);
- return NullRegion;
- }
-
- for (y = 0; y < pPixmap->drawable.height; y++) {
- Box.y1 = y;
- Box.y2 = y + 1;
- previousPixel = 0L;
- for (x = 0; x < pPixmap->drawable.width; x++) {
- currentPixel = XGetPixel(ximage, x, y);
- if (previousPixel != currentPixel) {
- if (previousPixel == 0L) {
- /* left edge */
- Box.x1 = x;
- } else if (currentPixel == 0L) {
- /* right edge */
- Box.x2 = x;
- RegionReset(pTmpReg, &Box);
- RegionAppend(pReg, pTmpReg);
- }
- previousPixel = currentPixel;
- }
- }
- if (previousPixel != 0L) {
- /* right edge because of the end of pixmap */
- Box.x2 = pPixmap->drawable.width;
- RegionReset(pTmpReg, &Box);
- RegionAppend(pReg, pTmpReg);
- }
- }
-
- RegionDestroy(pTmpReg);
- XDestroyImage(ximage);
-
- RegionValidate(pReg, &overlap);
-
- dmxSync(dmxScreen, FALSE);
- return pReg;
-}
+/*
+ * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Kevin E. Martin <kem@redhat.com>
+ *
+ */
+
+/** \file
+ * Provides pixmap support. */
+
+#ifdef HAVE_DMX_CONFIG_H
+#include <dmx-config.h>
+#endif
+
+#include "dmx.h"
+#include "dmxsync.h"
+#include "dmxpixmap.h"
+
+#include "pixmapstr.h"
+#include "servermd.h"
+#include "privates.h"
+
+/** Initialize a private area in \a pScreen for pixmap information. */
+Bool dmxInitPixmap(ScreenPtr pScreen)
+{
+ if (!dixRegisterPrivateKey(&dmxPixPrivateKeyRec, PRIVATE_PIXMAP, sizeof(dmxPixPrivRec)))
+ return FALSE;
+
+ return TRUE;
+}
+
+/** Create a pixmap on the back-end server. */
+void dmxBECreatePixmap(PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
+ dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
+
+ /* Make sure we haven't already created this pixmap. This can
+ * happen when the pixmap is used elsewhere (e.g., as a background
+ * or border for a window) and the refcnt > 1.
+ */
+ if (pPixPriv->pixmap)
+ return;
+
+ if (pPixmap->drawable.width && pPixmap->drawable.height) {
+ pPixPriv->pixmap = XCreatePixmap(dmxScreen->beDisplay,
+ dmxScreen->scrnWin,
+ pPixmap->drawable.width,
+ pPixmap->drawable.height,
+ pPixmap->drawable.depth);
+ dmxSync(dmxScreen, FALSE);
+ }
+}
+
+/** Create a pixmap for \a pScreen with the specified \a width, \a
+ * height, and \a depth. */
+PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
+ unsigned class)
+{
+ DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
+ PixmapPtr pPixmap;
+ int bpp;
+ dmxPixPrivPtr pPixPriv;
+
+#if 0
+ DMX_UNWRAP(CreatePixmap, dmxScreen, pScreen);
+ if (pScreen->CreatePixmap)
+ ret = pScreen->CreatePixmap(pPixmap);
+#endif
+
+ /* Create pixmap on back-end server */
+ if (depth == 24) bpp = 32;
+ else bpp = depth;
+
+ pPixmap = AllocatePixmap(pScreen, 0);
+ if (!pPixmap)
+ return NullPixmap;
+
+ pPixmap->drawable.type = DRAWABLE_PIXMAP;
+ pPixmap->drawable.class = class;
+ pPixmap->drawable.pScreen = pScreen;
+ pPixmap->drawable.depth = depth;
+ pPixmap->drawable.bitsPerPixel = bpp;
+ pPixmap->drawable.id = 0;
+ pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+ pPixmap->drawable.x = 0;
+ pPixmap->drawable.y = 0;
+ pPixmap->drawable.width = width;
+ pPixmap->drawable.height = height;
+ pPixmap->devKind = PixmapBytePad(width, bpp);
+ pPixmap->refcnt = 1;
+
+ pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
+ pPixPriv->pixmap = (Pixmap)0;
+ pPixPriv->detachedImage = NULL;
+
+ /* Create the pixmap on the back-end server */
+ if (dmxScreen->beDisplay) {
+ dmxBECreatePixmap(pPixmap);
+ }
+
+#if 0
+ DMX_WRAP(CreatePixmap, dmxCreatePixmap, dmxScreen, pScreen);
+#endif
+
+ return pPixmap;
+}
+
+/** Destroy the pixmap on the back-end server. */
+Bool dmxBEFreePixmap(PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
+ dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
+
+ if (pPixPriv->pixmap) {
+ XFreePixmap(dmxScreen->beDisplay, pPixPriv->pixmap);
+ pPixPriv->pixmap = (Pixmap)0;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/** Destroy the pixmap pointed to by \a pPixmap. */
+Bool dmxDestroyPixmap(PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
+ Bool ret = TRUE;
+
+#if 0
+ DMX_UNWRAP(DestroyPixmap, dmxScreen, pScreen);
+#endif
+
+ if (--pPixmap->refcnt)
+ return TRUE;
+
+ /* Destroy pixmap on back-end server */
+ if (dmxScreen->beDisplay) {
+ if (dmxBEFreePixmap(pPixmap)) {
+ /* Also make sure that we destroy any detached image */
+ dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
+ if (pPixPriv->detachedImage)
+ XDestroyImage(pPixPriv->detachedImage);
+ dmxSync(dmxScreen, FALSE);
+ }
+ }
+ FreePixmap(pPixmap);
+
+#if 0
+ if (pScreen->DestroyPixmap)
+ ret = pScreen->DestroyPixmap(pPixmap);
+ DMX_WRAP(DestroyPixmap, dmxDestroyPixmap, dmxScreen, pScreen);
+#endif
+
+ return ret;
+}
+
+/** Create and return a region based on the pixmap pointed to by \a
+ * pPixmap. */
+RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap)
+{
+ DMXScreenInfo *dmxScreen = &dmxScreens[pPixmap->drawable.pScreen->myNum];
+ dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
+ XImage *ximage;
+ RegionPtr pReg, pTmpReg;
+ int x, y;
+ unsigned long previousPixel, currentPixel;
+ BoxRec Box;
+ Bool overlap;
+
+ if (!dmxScreen->beDisplay) {
+ pReg = RegionCreate(NullBox, 1);
+ return pReg;
+ }
+
+ ximage = XGetImage(dmxScreen->beDisplay, pPixPriv->pixmap, 0, 0,
+ pPixmap->drawable.width, pPixmap->drawable.height,
+ 1, XYPixmap);
+
+ pReg = RegionCreate(NullBox, 1);
+ pTmpReg = RegionCreate(NullBox, 1);
+ if(!pReg || !pTmpReg) {
+ XDestroyImage(ximage);
+ return NullRegion;
+ }
+
+ for (y = 0; y < pPixmap->drawable.height; y++) {
+ Box.y1 = y;
+ Box.y2 = y + 1;
+ previousPixel = 0L;
+ for (x = 0; x < pPixmap->drawable.width; x++) {
+ currentPixel = XGetPixel(ximage, x, y);
+ if (previousPixel != currentPixel) {
+ if (previousPixel == 0L) {
+ /* left edge */
+ Box.x1 = x;
+ } else if (currentPixel == 0L) {
+ /* right edge */
+ Box.x2 = x;
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
+ }
+ previousPixel = currentPixel;
+ }
+ }
+ if (previousPixel != 0L) {
+ /* right edge because of the end of pixmap */
+ Box.x2 = pPixmap->drawable.width;
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
+ }
+ }
+
+ RegionDestroy(pTmpReg);
+ XDestroyImage(ximage);
+
+ RegionValidate(pReg, &overlap);
+
+ dmxSync(dmxScreen, FALSE);
+ return pReg;
+}
diff --git a/xorg-server/hw/dmx/dmxpixmap.h b/xorg-server/hw/dmx/dmxpixmap.h
index 4b4a8b275..70aa5075c 100644
--- a/xorg-server/hw/dmx/dmxpixmap.h
+++ b/xorg-server/hw/dmx/dmxpixmap.h
@@ -1,64 +1,64 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for pixmap support. \see dmxpixmap.c */
-
-#ifndef DMXPIXMAP_H
-#define DMXPIXMAP_H
-
-#include "pixmapstr.h"
-
-/** Pixmap private area. */
-typedef struct _dmxPixPriv {
- Pixmap pixmap;
- XImage *detachedImage;
-} dmxPixPrivRec, *dmxPixPrivPtr;
-
-
-extern Bool dmxInitPixmap(ScreenPtr pScreen);
-
-extern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen,
- int width, int height, int depth,
- unsigned class);
-extern Bool dmxDestroyPixmap(PixmapPtr pPixmap);
-extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap);
-
-extern void dmxBECreatePixmap(PixmapPtr pPixmap);
-extern Bool dmxBEFreePixmap(PixmapPtr pPixmap);
-
-/** Get pixmap private pointer. */
-#define DMX_GET_PIXMAP_PRIV(_pPix) \
- (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey)
-
-#endif /* DMXPIXMAP_H */
+/*
+ * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Kevin E. Martin <kem@redhat.com>
+ *
+ */
+
+/** \file
+ * Interface for pixmap support. \see dmxpixmap.c */
+
+#ifndef DMXPIXMAP_H
+#define DMXPIXMAP_H
+
+#include "pixmapstr.h"
+
+/** Pixmap private area. */
+typedef struct _dmxPixPriv {
+ Pixmap pixmap;
+ XImage *detachedImage;
+} dmxPixPrivRec, *dmxPixPrivPtr;
+
+
+extern Bool dmxInitPixmap(ScreenPtr pScreen);
+
+extern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen,
+ int width, int height, int depth,
+ unsigned class);
+extern Bool dmxDestroyPixmap(PixmapPtr pPixmap);
+extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap);
+
+extern void dmxBECreatePixmap(PixmapPtr pPixmap);
+extern Bool dmxBEFreePixmap(PixmapPtr pPixmap);
+
+/** Get pixmap private pointer. */
+#define DMX_GET_PIXMAP_PRIV(_pPix) \
+ (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey)
+
+#endif /* DMXPIXMAP_H */
diff --git a/xorg-server/hw/dmx/glxProxy/glxcmds.c b/xorg-server/hw/dmx/glxProxy/glxcmds.c
index f79264ea9..eb589f428 100644
--- a/xorg-server/hw/dmx/glxProxy/glxcmds.c
+++ b/xorg-server/hw/dmx/glxProxy/glxcmds.c
@@ -1,3645 +1,3645 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxwindow.h"
-#include "dmxpixmap.h"
-#include "dmxfont.h"
-#include "dmxsync.h"
-
-#include "glxserver.h"
-#include <GL/glxtokens.h>
-#include "g_disptab.h"
-#include <pixmapstr.h>
-#include <windowstr.h>
-#include "glxutil.h"
-#include "glxext.h"
-#include "unpack.h"
-
-#include "GL/glxproto.h"
-#include "glxvendor.h"
-#include "glxvisuals.h"
-#include "glxswap.h"
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-extern __GLXFBConfig **__glXFBConfigs;
-extern int __glXNumFBConfigs;
-
-extern __GLXFBConfig *glxLookupFBConfig( GLXFBConfigID id );
-extern __GLXFBConfig *glxLookupFBConfigByVID( VisualID vid );
-extern __GLXFBConfig *glxLookupBackEndFBConfig( GLXFBConfigID id, int screen );
-extern int glxIsExtensionSupported( char *ext );
-extern int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc);
-
-#define BE_TO_CLIENT_ERROR(x) \
- ( (x) >= __glXerrorBase ? \
- (x) - dmxScreen->glxErrorBase + __glXerrorBase \
- : (x) )
-
-Display *GetBackEndDisplay( __GLXclientState *cl, int s )
-{
- if (! cl->be_displays[s] ) {
- cl->be_displays[s] = XOpenDisplay( DisplayString(dmxScreens[s].beDisplay) );
- }
- return cl->be_displays[s];
-}
-
-/*
-** Create a GL context with the given properties.
-*/
-static int CreateContext(__GLXclientState *cl,
- GLXContextID gcId,
- VisualID vid, GLXFBConfigID fbconfigId,
- int screen,
- GLXContextID shareList,
- int isDirect )
-{
- ClientPtr client = cl->client;
- xGLXCreateContextReq *be_req;
- xGLXCreateNewContextReq *be_new_req;
- VisualPtr pVisual;
- ScreenPtr pScreen;
- __GLXcontext *glxc, *shareglxc;
- __GLXvisualConfig *pGlxVisual;
- __GLXscreenInfo *pGlxScreen;
- VisualID visual = vid;
- GLint i;
- int from_screen = screen;
- int to_screen = screen;
- DMXScreenInfo *dmxScreen;
- VisualID be_vid = 0;
- GLXFBConfigID be_fbconfigId = 0;
- int num_be_screens;
- Display *dpy;
-
- /*
- ** Check if screen exists.
- */
- if (screen >= screenInfo.numScreens) {
- client->errorValue = screen;
- return BadValue;
- }
-
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- /*
- ** Find the display list space that we want to share.
- **
- */
- if (shareList == None) {
- shareglxc = NULL;
- } else {
- dixLookupResourceByType((pointer*) &shareglxc, shareList,
- __glXContextRes, NullClient, DixUnknownAccess);
- if (!shareglxc) {
- client->errorValue = shareList;
- return __glXBadContext;
- }
- }
-
- /*
- ** Allocate memory for the new context
- */
- glxc = calloc(1, sizeof(__GLXcontext));
- if (!glxc) {
- return BadAlloc;
- }
-
- pScreen = screenInfo.screens[screen];
- pGlxScreen = &__glXActiveScreens[screen];
-
- if (fbconfigId != None) {
- glxc->pFBConfig = glxLookupFBConfig( fbconfigId );
- if (!glxc->pFBConfig) {
- client->errorValue = fbconfigId;
- free( glxc );
- return BadValue;
- }
- visual = glxc->pFBConfig->associatedVisualId;
- }
- else {
- glxc->pFBConfig = NULL;
- }
-
- if (visual != None) {
- /*
- ** Check if the visual ID is valid for this screen.
- */
- pVisual = pScreen->visuals;
- for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
- if (pVisual->vid == visual) {
- break;
- }
- }
- if (i == pScreen->numVisuals) {
- client->errorValue = visual;
- free( glxc );
- return BadValue;
- }
-
- pGlxVisual = pGlxScreen->pGlxVisual;
- for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
- if (pGlxVisual->vid == visual) {
- break;
- }
- }
- if (i == pGlxScreen->numVisuals) {
- /*
- ** Visual not support on this screen by this OpenGL implementation.
- */
- client->errorValue = visual;
- free( glxc );
- return BadValue;
- }
-
- if ( glxc->pFBConfig == NULL ) {
- glxc->pFBConfig = glxLookupFBConfigByVID( visual );
-
- if ( glxc->pFBConfig == NULL ) {
- /*
- * visual does not have an FBConfig ???
- client->errorValue = visual;
- free( glxc );
- return BadValue;
- */
- }
- }
- }
- else {
- pVisual = NULL;
- pGlxVisual = NULL;
- }
-
- glxc->pScreen = pScreen;
- glxc->pGlxScreen = pGlxScreen;
- glxc->pVisual = pVisual;
- glxc->pGlxVisual = pGlxVisual;
-
- /*
- * allocate memory for back-end servers info
- */
- num_be_screens = to_screen - from_screen + 1;
- glxc->real_ids = (XID *)malloc(sizeof(XID) * num_be_screens);
- if (!glxc->real_ids) {
- return BadAlloc;
- }
- glxc->real_vids = (XID *)malloc(sizeof(XID) * num_be_screens);
- if (!glxc->real_vids) {
- return BadAlloc;
- }
-
- for (screen = from_screen; screen <= to_screen; screen++) {
- int sent = 0;
- pScreen = screenInfo.screens[screen];
- pGlxScreen = &__glXActiveScreens[screen];
- dmxScreen = &dmxScreens[screen];
-
- if (glxc->pFBConfig) {
- __GLXFBConfig *beFBConfig = glxLookupBackEndFBConfig( glxc->pFBConfig->id,
- screen );
- be_fbconfigId = beFBConfig->id;
- }
-
- if (pGlxVisual) {
-
- be_vid = glxMatchGLXVisualInConfigList( pGlxVisual,
- dmxScreen->glxVisuals,
- dmxScreen->numGlxVisuals );
-
- if (!be_vid) {
- /* visual is not supported on the back-end server */
- free( glxc->real_ids );
- free( glxc->real_vids );
- free( glxc );
- return BadValue;
- }
- }
-
- glxc->real_ids[screen-from_screen] = XAllocID(GetBackEndDisplay(cl,screen));
-
- /* send the create context request to the back-end server */
- dpy = GetBackEndDisplay(cl,screen);
- if (glxc->pFBConfig) {
- /*Since for a certain visual both RGB and COLOR INDEX
- *can be on then the only parmeter to choose the renderType
- * should be the class of the colormap since all 4 first
- * classes does not support RGB mode only COLOR INDEX ,
- * and so TrueColor and DirectColor does not support COLOR INDEX*/
- int renderType = glxc->pFBConfig->renderType;
- if ( pVisual ) {
- switch ( pVisual->class ){
- case PseudoColor:
- case StaticColor:
- case GrayScale:
- case StaticGray:
- renderType = GLX_COLOR_INDEX_TYPE;
- break;
- case TrueColor:
- case DirectColor:
- default:
- renderType = GLX_RGBA_TYPE;
- break;
- }
- }
- if ( __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- LockDisplay(dpy);
- GetReq(GLXCreateNewContext,be_new_req);
- be_new_req->reqType = dmxScreen->glxMajorOpcode;
- be_new_req->glxCode = X_GLXCreateNewContext;
- be_new_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
- be_new_req->fbconfig = (unsigned int)be_fbconfigId;
- be_new_req->screen = DefaultScreen(dpy);
- be_new_req->renderType = renderType;
-
- be_new_req->shareList = (shareglxc ? shareglxc->real_ids[screen-from_screen] : 0);
- be_new_req->isDirect = 0;
- UnlockDisplay(dpy);
- glxc->real_vids[screen-from_screen] = be_fbconfigId;
- sent = 1;
- }
- else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
-
- xGLXCreateContextWithConfigSGIXReq *ext_req;
- xGLXVendorPrivateReq *vpreq;
- LockDisplay(dpy);
- GetReqExtra(GLXVendorPrivate,
- sz_xGLXCreateContextWithConfigSGIXReq - sz_xGLXVendorPrivateReq,
- vpreq);
- ext_req = (xGLXCreateContextWithConfigSGIXReq *)vpreq;
- ext_req->reqType = dmxScreen->glxMajorOpcode;
- ext_req->glxCode = X_GLXVendorPrivate;
- ext_req->vendorCode = X_GLXvop_CreateContextWithConfigSGIX;
- ext_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
- ext_req->fbconfig = (unsigned int)be_fbconfigId;
- ext_req->screen = DefaultScreen(dpy);
- ext_req->renderType = renderType;
- ext_req->shareList = (shareglxc ? shareglxc->real_ids[screen-from_screen] : 0);
- ext_req->isDirect = 0;
- UnlockDisplay(dpy);
- glxc->real_vids[screen-from_screen] = be_fbconfigId;
- sent = 1;
- }
- }
-
- if (!sent) {
- LockDisplay(dpy);
- GetReq(GLXCreateContext,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXCreateContext;
- be_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
- be_req->visual = (unsigned int)be_vid;
- be_req->screen = DefaultScreen(dpy);
- be_req->shareList = (shareglxc ? shareglxc->real_ids[screen-from_screen] : 0);
- be_req->isDirect = 0;
- UnlockDisplay(dpy);
- glxc->real_vids[screen-from_screen] = be_vid;
- }
- SyncHandle();
-
- }
-
- /*
- ** Register this context as a resource.
- */
- if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) {
- free( glxc->real_ids );
- free( glxc->real_vids );
- free( glxc );
- client->errorValue = gcId;
- return BadAlloc;
- }
-
- /*
- ** Finally, now that everything is working, setup the rest of the
- ** context.
- */
- glxc->id = gcId;
- glxc->share_id = shareList;
- glxc->idExists = GL_TRUE;
- glxc->isCurrent = GL_FALSE;
-
- return Success;
-}
-
-int __glXCreateContext(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
-
- return( CreateContext(cl, req->context,req->visual, None,
- req->screen, req->shareList, req->isDirect) );
-
-}
-
-int __glXCreateNewContext(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
-
- return( CreateContext(cl, req->context,None, req->fbconfig,
- req->screen, req->shareList, req->isDirect) );
-
-}
-
-int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXCreateContextWithConfigSGIXReq *req = (xGLXCreateContextWithConfigSGIXReq *) pc;
-
- return( CreateContext(cl, req->context, None, req->fbconfig,
- req->screen, req->shareList, req->isDirect) );
-
-}
-
-int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXQueryMaxSwapBarriersSGIXReq *req =
- (xGLXQueryMaxSwapBarriersSGIXReq *)pc;
- xGLXQueryMaxSwapBarriersSGIXReply reply;
-
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.length = 0;
- reply.max = QueryMaxSwapBarriersSGIX(req->screen);
-
- if (client->swapped) {
- __glXSwapQueryMaxSwapBarriersSGIXReply(client, &reply);
- } else {
- WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply,
- (char *)&reply);
- }
-
- return Success;
-}
-
-int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *)pc;
- DrawablePtr pDraw;
- __GLXpixmap *pGlxPixmap = NULL;
- __glXWindow *pGlxWindow = NULL;
- int rc;
-
- rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixGetAttrAccess);
- if (rc != Success) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, req->drawable,
- __glXPixmapRes, NullClient, DixUnknownAccess);
- if (pGlxPixmap) pDraw = pGlxPixmap->pDraw;
- }
-
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, req->drawable,
- __glXWindowRes, NullClient, DixUnknownAccess);
- if (pGlxWindow) pDraw = pGlxWindow->pDraw;
- }
-
- if (!pDraw) {
- client->errorValue = req->drawable;
- return __glXBadDrawable;
- }
-
- return BindSwapBarrierSGIX(pDraw, req->barrier);
-}
-
-int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXJoinSwapGroupSGIXReq *req = (xGLXJoinSwapGroupSGIXReq *)pc;
- DrawablePtr pDraw, pMember = NULL;
- __GLXpixmap *pGlxPixmap = NULL;
- __glXWindow *pGlxWindow = NULL;
- int rc;
-
- rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixManageAccess);
- if (rc != Success) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, req->drawable,
- __glXPixmapRes, NullClient, DixUnknownAccess);
- if (pGlxPixmap) pDraw = pGlxPixmap->pDraw;
- }
-
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, req->drawable,
- __glXWindowRes, NullClient, DixUnknownAccess);
- if (pGlxWindow) pDraw = pGlxWindow->pDraw;
- }
-
- if (!pDraw) {
- client->errorValue = req->drawable;
- return __glXBadDrawable;
- }
-
- if (req->member != None) {
- rc = dixLookupDrawable(&pMember, req->member, client, 0,
- DixGetAttrAccess);
- if (rc != Success) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, req->member,
- __glXPixmapRes, NullClient,
- DixUnknownAccess);
- if (pGlxPixmap) pMember = pGlxPixmap->pDraw;
- }
-
- if (!pMember && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, req->member,
- __glXWindowRes, NullClient,
- DixUnknownAccess);
- if (pGlxWindow) pMember = pGlxWindow->pDraw;
- }
-
- if (!pMember) {
- client->errorValue = req->member;
- return __glXBadDrawable;
- }
- }
-
- return JoinSwapGroupSGIX(pDraw, pMember);
-}
-
-
-/*
-** Destroy a GL context as an X resource.
-*/
-int __glXDestroyContext(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
- xGLXDestroyContextReq *be_req;
- GLXContextID gcId = req->context;
- __GLXcontext *glxc;
- int from_screen = 0;
- int to_screen = 0;
- int s;
-
- dixLookupResourceByType((pointer*) &glxc, gcId, __glXContextRes,
- NullClient, DixUnknownAccess);
- if (glxc) {
- /*
- ** Just free the resource; don't actually destroy the context,
- ** because it might be in use. The
- ** destroy method will be called by the resource destruction routine
- ** if necessary.
- */
- FreeResourceByType(gcId, __glXContextRes, FALSE);
-
- from_screen = to_screen = glxc->pScreen->myNum;
-
- } else {
- client->errorValue = gcId;
- return __glXBadContext;
- }
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- /*
- * send DestroyContext request to all back-end servers
- */
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReq(GLXDestroyContext,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXDestroyContext;
- be_req->context = glxc->real_ids[s-from_screen];
- UnlockDisplay(dpy);
- SyncHandle();
- }
-
- return Success;
-}
-
-/*****************************************************************************/
-
-/*
-** For each client, the server keeps a table of all the contexts that are
-** current for that client (each thread of a client may have its own current
-** context). These routines add, change, and lookup contexts in the table.
-*/
-
-/*
-** Add a current context, and return the tag that will be used to refer to it.
-*/
-static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc, DrawablePtr pDraw)
-{
- int i;
- int num = cl->numCurrentContexts;
- __GLXcontext **table = cl->currentContexts;
-
- if (!glxc) return -1;
-
- /*
- ** Try to find an empty slot and use it.
- */
- for (i=0; i < num; i++) {
- if (!table[i]) {
- table[i] = glxc;
- return i+1;
- }
- }
- /*
- ** Didn't find a free slot, so we'll have to grow the table.
- */
- if (!num) {
- table = (__GLXcontext **) malloc(sizeof(__GLXcontext *));
- cl->currentDrawables = (DrawablePtr *) malloc(sizeof(DrawablePtr));
- cl->be_currentCTag = (GLXContextTag *) malloc(screenInfo.numScreens *sizeof(GLXContextTag));
- } else {
- table = (__GLXcontext **) realloc(table,
- (num+1)*sizeof(__GLXcontext *));
- cl->currentDrawables = (DrawablePtr *) realloc(
- cl->currentDrawables ,
- (num+1)*sizeof(DrawablePtr));
- cl->be_currentCTag = (GLXContextTag *) realloc(cl->be_currentCTag,
- (num+1)*screenInfo.numScreens*sizeof(GLXContextTag));
- }
- table[num] = glxc;
- cl->currentDrawables[num] = pDraw;
- cl->currentContexts = table;
- cl->numCurrentContexts++;
-
- memset(cl->be_currentCTag + num*screenInfo.numScreens, 0,
- screenInfo.numScreens * sizeof(GLXContextTag));
-
- return num+1;
-}
-
-/*
-** Given a tag, change the current context for the corresponding entry.
-*/
-static void ChangeCurrentContext(__GLXclientState *cl, __GLXcontext *glxc,
- GLXContextTag tag)
-{
- __GLXcontext **table = cl->currentContexts;
- table[tag-1] = glxc;
-}
-
-/*
-** Given a tag, and back-end screen number, retrives the current back-end
-** tag.
-*/
-int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s)
-{
- if (tag >0) {
- return( cl->be_currentCTag[ (tag-1)*screenInfo.numScreens + s ] );
- }
- else {
- return 0;
- }
-}
-
-/*
-** Given a tag, and back-end screen number, sets the current back-end
-** tag.
-*/
-static void SetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s, GLXContextTag be_tag)
-{
- if (tag >0) {
- cl->be_currentCTag[ (tag-1)*screenInfo.numScreens + s ] = be_tag;
- }
-}
-
-/*
-** For this implementation we have chosen to simply use the index of the
-** context's entry in the table as the context tag. A tag must be greater
-** than 0.
-*/
-__GLXcontext *__glXLookupContextByTag(__GLXclientState *cl, GLXContextTag tag)
-{
- int num = cl->numCurrentContexts;
-
- if (tag < 1 || tag > num) {
- return 0;
- } else {
- return cl->currentContexts[tag-1];
- }
-}
-
-DrawablePtr __glXLookupDrawableByTag(__GLXclientState *cl, GLXContextTag tag)
-{
- int num = cl->numCurrentContexts;
-
- if (tag < 1 || tag > num) {
- return 0;
- } else {
- return cl->currentDrawables[tag-1];
- }
-}
-
-/*****************************************************************************/
-
-static void StopUsingContext(__GLXcontext *glxc)
-{
- if (glxc) {
- if (glxc == __glXLastContext) {
- /* Tell server GL library */
- __glXLastContext = 0;
- }
- glxc->isCurrent = GL_FALSE;
- if (!glxc->idExists) {
- __glXFreeContext(glxc);
- }
- }
-}
-
-static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc)
-{
- glxc->isCurrent = GL_TRUE;
-}
-
-/*****************************************************************************/
-/*
-** Make an OpenGL context and drawable current.
-*/
-static int MakeCurrent(__GLXclientState *cl,
- GLXDrawable drawable,
- GLXDrawable readdrawable,
- GLXContextID context,
- GLXContextTag oldContextTag)
-{
- ClientPtr client = cl->client;
- DrawablePtr pDraw = NULL;
- DrawablePtr pReadDraw = NULL;
- xGLXMakeCurrentReadSGIReply new_reply;
- xGLXMakeCurrentReq *be_req;
- xGLXMakeCurrentReply be_reply;
- xGLXMakeContextCurrentReq *be_new_req;
- xGLXMakeContextCurrentReply be_new_reply;
- GLXDrawable drawId = drawable;
- GLXDrawable readId = readdrawable;
- GLXContextID contextId = context;
- __GLXpixmap *pGlxPixmap = 0;
- __GLXpixmap *pReadGlxPixmap = 0;
- __GLXcontext *glxc, *prevglxc;
- GLXContextTag tag = oldContextTag;
- WindowPtr pWin = NULL;
- WindowPtr pReadWin = NULL;
- __glXWindow *pGlxWindow = NULL;
- __glXWindow *pGlxReadWindow = NULL;
- __glXPbuffer *pGlxPbuffer = NULL;
- __glXPbuffer *pGlxReadPbuffer = NULL;
-#ifdef PANORAMIX
- PanoramiXRes *pXinDraw = NULL;
- PanoramiXRes *pXinReadDraw = NULL;
-#endif
- int from_screen = 0;
- int to_screen = 0;
- int s, rc;
-
- /*
- ** If one is None and the other isn't, it's a bad match.
- */
- if ((drawId == None && contextId != None) ||
- (drawId != None && contextId == None)) {
- return BadMatch;
- }
-
- /*
- ** Lookup old context. If we have one, it must be in a usable state.
- */
- if (tag != 0) {
- prevglxc = __glXLookupContextByTag(cl, tag);
- if (!prevglxc) {
- /*
- ** Tag for previous context is invalid.
- */
- return __glXBadContextTag;
- }
- } else {
- prevglxc = 0;
- }
-
- /*
- ** Lookup new context. It must not be current for someone else.
- */
- if (contextId != None) {
- dixLookupResourceByType((pointer*) &glxc, contextId, __glXContextRes,
- NullClient, DixUnknownAccess);
- if (!glxc) {
- client->errorValue = contextId;
- return __glXBadContext;
- }
- if ((glxc != prevglxc) && glxc->isCurrent) {
- /* Context is current to somebody else */
- return BadAccess;
- }
- } else {
- /* Switching to no context. Ignore new drawable. */
- glxc = 0;
- }
-
- if (drawId != None) {
- rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
- if (rc == Success) {
- if (pDraw->type == DRAWABLE_WINDOW) {
- /*
- ** Drawable is an X Window.
- */
- VisualID vid;
- pWin = (WindowPtr)pDraw;
- vid = wVisual(pWin);
-
- new_reply.writeVid = (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
- new_reply.writeType = GLX_WINDOW_TYPE;
-
- /*
- ** Check if window and context are similar.
- */
- if ((vid != glxc->pVisual->vid) ||
- (pWin->drawable.pScreen != glxc->pScreen)) {
- client->errorValue = drawId;
- return BadMatch;
- }
-
- from_screen = to_screen = pWin->drawable.pScreen->myNum;
-
- } else {
- /*
- ** An X Pixmap is not allowed as a parameter (a GLX Pixmap
- ** is, but it must first be created with glxCreateGLXPixmap).
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
- }
-
- if (!pDraw) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, drawId,
- __glXPixmapRes, NullClient,
- DixUnknownAccess);
- if (pGlxPixmap) {
- /*
- ** Check if pixmap and context are similar.
- */
- if (pGlxPixmap->pScreen != glxc->pScreen ||
- pGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
- client->errorValue = drawId;
- return BadMatch;
- }
- pDraw = pGlxPixmap->pDraw;
-
- new_reply.writeVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
- pGlxPixmap->pGlxVisual->vid);
-
- new_reply.writeType = GLX_PIXMAP_TYPE;
-
- from_screen = to_screen = pGlxPixmap->pScreen->myNum;
-
- }
- }
-
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, drawId,
- __glXWindowRes, NullClient,
- DixUnknownAccess);
- if (pGlxWindow) {
- /*
- ** Drawable is a GLXWindow.
- **
- ** Check if GLX window and context are similar.
- */
- if (pGlxWindow->pScreen != glxc->pScreen ||
- pGlxWindow->pGlxFBConfig != glxc->pFBConfig) {
- client->errorValue = drawId;
- return BadMatch;
- }
-
- pDraw = pGlxWindow->pDraw;
- new_reply.writeVid = pGlxWindow->pGlxFBConfig->id;
- new_reply.writeType = GLX_GLXWINDOW_TYPE;
- }
-
- }
-
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxPbuffer, drawId,
- __glXPbufferRes, NullClient,
- DixUnknownAccess);
- if (pGlxPbuffer) {
- if (pGlxPbuffer->pScreen != glxc->pScreen ||
- pGlxPbuffer->pFBConfig != glxc->pFBConfig) {
- client->errorValue = drawId;
- return BadMatch;
- }
-
- pDraw = (DrawablePtr)pGlxPbuffer;
- new_reply.writeVid = pGlxPbuffer->pFBConfig->id;
- new_reply.writeType = GLX_PBUFFER_TYPE;
- }
- }
-
- if (!pDraw) {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- } else {
- pDraw = 0;
- }
-
- if (readId != None && readId != drawId ) {
- rc = dixLookupDrawable(&pReadDraw, readId, client, 0, DixReadAccess);
- if (rc == Success) {
- if (pReadDraw->type == DRAWABLE_WINDOW) {
- /*
- ** Drawable is an X Window.
- */
- VisualID vid;
- pReadWin = (WindowPtr)pDraw;
- vid = wVisual(pReadWin);
-
- new_reply.readVid = (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
- new_reply.readType = GLX_WINDOW_TYPE;
-
- /*
- ** Check if window and context are similar.
- */
- if ((vid != glxc->pVisual->vid) ||
- (pReadWin->drawable.pScreen != glxc->pScreen)) {
- client->errorValue = readId;
- return BadMatch;
- }
-
- } else {
-
- /*
- ** An X Pixmap is not allowed as a parameter (a GLX Pixmap
- ** is, but it must first be created with glxCreateGLXPixmap).
- */
- client->errorValue = readId;
- return __glXBadDrawable;
- }
- }
-
- if (!pReadDraw) {
- dixLookupResourceByType((pointer*) &pReadGlxPixmap, readId,
- __glXPixmapRes, NullClient,
- DixUnknownAccess);
- if (pReadGlxPixmap) {
- /*
- ** Check if pixmap and context are similar.
- */
- if (pReadGlxPixmap->pScreen != glxc->pScreen ||
- pReadGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
- client->errorValue = readId;
- return BadMatch;
- }
- pReadDraw = pReadGlxPixmap->pDraw;
-
- new_reply.readVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
- pReadGlxPixmap->pGlxVisual->vid );
- new_reply.readType = GLX_PIXMAP_TYPE;
-
- }
- }
-
- if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxReadWindow, readId,
- __glXWindowRes, NullClient,
- DixUnknownAccess);
- if (pGlxReadWindow) {
- /*
- ** Drawable is a GLXWindow.
- **
- ** Check if GLX window and context are similar.
- */
- if (pGlxReadWindow->pScreen != glxc->pScreen ||
- pGlxReadWindow->pGlxFBConfig != glxc->pFBConfig) {
- client->errorValue = readId;
- return BadMatch;
- }
-
- pReadDraw = pGlxReadWindow->pDraw;
- new_reply.readVid = pGlxReadWindow->pGlxFBConfig->id;
- new_reply.readType = GLX_GLXWINDOW_TYPE;
- }
- }
-
- if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxReadPbuffer, readId,
- __glXPbufferRes, NullClient,
- DixUnknownAccess);
- if (pGlxReadPbuffer) {
- if (pGlxReadPbuffer->pScreen != glxc->pScreen ||
- pGlxReadPbuffer->pFBConfig != glxc->pFBConfig) {
- client->errorValue = drawId;
- return BadMatch;
- }
-
- pReadDraw = (DrawablePtr)pGlxReadPbuffer;
- new_reply.readVid = pGlxReadPbuffer->pFBConfig->id;
- new_reply.readType = GLX_PBUFFER_TYPE;
- }
- }
-
- if (!pReadDraw) {
- /*
- ** Drawable is neither a Window nor a GLXPixmap.
- */
- client->errorValue = readId;
- return __glXBadDrawable;
- }
-
- } else {
- pReadDraw = pDraw;
- pReadGlxPixmap = pGlxPixmap;
- pReadWin = pWin;
- new_reply.readVid = new_reply.writeVid;
- new_reply.readType = new_reply.writeType;
- }
-
- if (prevglxc) {
-
- if (prevglxc->pGlxPixmap) {
- /*
- ** The previous drawable was a glx pixmap, release it.
- */
- prevglxc->pGlxPixmap->refcnt--;
- __glXFreeGLXPixmap( prevglxc->pGlxPixmap );
- prevglxc->pGlxPixmap = 0;
- }
-
- if (prevglxc->pGlxReadPixmap) {
- /*
- ** The previous drawable was a glx pixmap, release it.
- */
- prevglxc->pGlxReadPixmap->refcnt--;
- __glXFreeGLXPixmap( prevglxc->pGlxReadPixmap );
- prevglxc->pGlxReadPixmap = 0;
- }
-
- if (prevglxc->pGlxWindow) {
- /*
- ** The previous drawable was a glx window, release it.
- */
- prevglxc->pGlxWindow->refcnt--;
- __glXFreeGLXWindow( prevglxc->pGlxWindow );
- prevglxc->pGlxWindow = 0;
- }
-
- if (prevglxc->pGlxReadWindow) {
- /*
- ** The previous drawable was a glx window, release it.
- */
- prevglxc->pGlxReadWindow->refcnt--;
- __glXFreeGLXWindow( prevglxc->pGlxReadWindow );
- prevglxc->pGlxReadWindow = 0;
- }
-
- if (prevglxc->pGlxPbuffer) {
- /*
- ** The previous drawable was a glx Pbuffer, release it.
- */
- prevglxc->pGlxPbuffer->refcnt--;
- __glXFreeGLXPbuffer( prevglxc->pGlxPbuffer );
- prevglxc->pGlxPbuffer = 0;
- }
-
- if (prevglxc->pGlxReadPbuffer) {
- /*
- ** The previous drawable was a glx Pbuffer, release it.
- */
- prevglxc->pGlxReadPbuffer->refcnt--;
- __glXFreeGLXPbuffer( prevglxc->pGlxReadPbuffer );
- prevglxc->pGlxReadPbuffer = 0;
- }
-
- ChangeCurrentContext(cl, glxc, tag);
- ChangeCurrentContext(cl, glxc, tag);
- StopUsingContext(prevglxc);
- } else {
- tag = AddCurrentContext(cl, glxc, pDraw);
- }
- if (glxc) {
-
- glxc->pGlxPixmap = pGlxPixmap;
- glxc->pGlxReadPixmap = pReadGlxPixmap;
- glxc->pGlxWindow = pGlxWindow;
- glxc->pGlxReadWindow = pGlxReadWindow;
- glxc->pGlxPbuffer = pGlxPbuffer;
- glxc->pGlxReadPbuffer = pGlxReadPbuffer;
-
- if (pGlxPixmap) {
- pGlxPixmap->refcnt++;
- }
-
- if (pReadGlxPixmap) {
- pReadGlxPixmap->refcnt++;
- }
-
- if (pGlxWindow) {
- pGlxWindow->refcnt++;
- }
-
- if (pGlxReadWindow) {
- pGlxReadWindow->refcnt++;
- }
-
- if (pGlxPbuffer) {
- pGlxPbuffer->refcnt++;
- }
-
- if (pGlxReadPbuffer) {
- pGlxReadPbuffer->refcnt++;
- }
-
- StartUsingContext(cl, glxc);
- new_reply.contextTag = tag;
- } else {
- new_reply.contextTag = 0;
- }
- new_reply.length = 0;
- new_reply.type = X_Reply;
- new_reply.sequenceNumber = client->sequence;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
-
- if (pDraw && new_reply.writeType != GLX_PBUFFER_TYPE) {
- dixLookupResourceByClass((pointer*) &pXinDraw,
- pDraw->id, XRC_DRAWABLE,
- client, DixReadAccess);
- }
-
- if (pReadDraw && pReadDraw != pDraw &&
- new_reply.readType != GLX_PBUFFER_TYPE) {
- dixLookupResourceByClass((pointer*) &pXinReadDraw,
- pReadDraw->id, XRC_DRAWABLE,
- client, DixReadAccess);
- }
- else {
- pXinReadDraw = pXinDraw;
- }
- }
-#endif
-
-
- /* send the MakeCurrent request to all required
- * back-end servers.
- */
- for (s = from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
- unsigned int be_draw = None;
- unsigned int be_read_draw = None;
-
- if (pGlxPixmap) {
- be_draw = pGlxPixmap->be_xids[s];
- }
- else if (pGlxPbuffer) {
- be_draw = pGlxPbuffer->be_xids[s];
- }
-#ifdef PANORAMIX
- else if (pXinDraw) {
- dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess);
- }
-#endif
- else if (pGlxWindow) {
- pWin = (WindowPtr)pGlxWindow->pDraw;
- }
-
- if (pWin && be_draw == None) {
- be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- if (!be_draw) {
- /* it might be that the window did not created yet on the */
- /* back-end server (lazy window creation option), force */
- /* creation of the window */
- dmxCreateAndRealizeWindow( pWin, TRUE );
- be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- }
- }
-
- /*
- * Before sending the MakeCurrent request - sync the
- * X11 connection to the back-end servers to make sure
- * that drawable is already created
- */
- dmxSync( dmxScreen, 1 );
-
- if (drawId == readId) {
- LockDisplay(dpy);
- GetReq(GLXMakeCurrent, be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXMakeCurrent;
- be_req->drawable = be_draw;
- be_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
- be_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
- if (!_XReply(dpy, (xReply *) &be_reply, 0, False)) {
-
- /* The make current failed */
- UnlockDisplay(dpy);
- SyncHandle();
- return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- SetCurrentBackEndTag( cl, tag, s, be_reply.contextTag );
- }
- else {
-
- if (pReadGlxPixmap) {
- be_read_draw = pReadGlxPixmap->be_xids[s];
- }
- else if (pGlxReadPbuffer) {
- be_read_draw = pGlxReadPbuffer->be_xids[s];
- }
-#ifdef PANORAMIX
- else if (pXinReadDraw) {
- dixLookupWindow(&pReadWin, pXinReadDraw->info[s].id, client,
- DixReadAccess);
- }
-#endif
- else if (pGlxReadWindow) {
- pReadWin = (WindowPtr)pGlxReadWindow->pDraw;
- }
-
- if (pReadWin && be_read_draw == None) {
- be_read_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pReadWin))->window;
- if (!be_read_draw) {
- /* it might be that the window did not created yet on the */
- /* back-end server (lazy window creation option), force */
- /* creation of the window */
- dmxCreateAndRealizeWindow( pReadWin, TRUE );
- be_read_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pReadWin))->window;
- dmxSync( dmxScreen, 1 );
- }
- }
-
- if ( __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- LockDisplay(dpy);
- GetReq(GLXMakeContextCurrent, be_new_req);
- be_new_req->reqType = dmxScreen->glxMajorOpcode;
- be_new_req->glxCode = X_GLXMakeContextCurrent;
- be_new_req->drawable = be_draw;
- be_new_req->readdrawable = be_read_draw;
- be_new_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
- be_new_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
- if (!_XReply(dpy, (xReply *) &be_new_reply, 0, False)) {
-
- /* The make current failed */
- UnlockDisplay(dpy);
- SyncHandle();
- return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- SetCurrentBackEndTag( cl, tag, s, be_new_reply.contextTag );
- }
- else if (glxIsExtensionSupported("GLX_SGI_make_current_read")) {
- xGLXMakeCurrentReadSGIReq *ext_req;
- xGLXVendorPrivateWithReplyReq *vpreq;
- xGLXMakeCurrentReadSGIReply ext_reply;
-
- LockDisplay(dpy);
- GetReqExtra(GLXVendorPrivateWithReply,
- sz_xGLXMakeCurrentReadSGIReq - sz_xGLXVendorPrivateWithReplyReq,
- vpreq);
- ext_req = (xGLXMakeCurrentReadSGIReq *)vpreq;
- ext_req->reqType = dmxScreen->glxMajorOpcode;
- ext_req->glxCode = X_GLXVendorPrivateWithReply;
- ext_req->vendorCode = X_GLXvop_MakeCurrentReadSGI;
- ext_req->drawable = be_draw;
- ext_req->readable = be_read_draw;
- ext_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
- ext_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
- if (!_XReply(dpy, (xReply *) &ext_reply, 0, False)) {
-
- /* The make current failed */
- UnlockDisplay(dpy);
- SyncHandle();
- return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- SetCurrentBackEndTag( cl, tag, s, ext_reply.contextTag );
-
- }
- else {
- return BadMatch;
- }
- }
-
- XFlush( dpy );
- }
-
- if (client->swapped) {
- __glXSwapMakeCurrentReply(client, &new_reply);
- } else {
- WriteToClient(client, sz_xGLXMakeContextCurrentReply, (char *)&new_reply);
- }
-
- return Success;
-}
-
-int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
-
- return( MakeCurrent(cl, req->drawable, req->drawable,
- req->context, req->oldContextTag ) );
-}
-
-int __glXMakeContextCurrent(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
-
- return( MakeCurrent(cl, req->drawable, req->readdrawable,
- req->context, req->oldContextTag ) );
-}
-
-int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc;
-
- return( MakeCurrent(cl, req->drawable, req->readable,
- req->context, req->oldContextTag ) );
-}
-
-int __glXIsDirect(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
- xGLXIsDirectReply reply;
- __GLXcontext *glxc;
-
- /*
- ** Find the GL context.
- */
- dixLookupResourceByType((pointer*) &glxc, req->context, __glXContextRes,
- NullClient, DixUnknownAccess);
- if (!glxc) {
- client->errorValue = req->context;
- return __glXBadContext;
- }
-
- reply.isDirect = 0;
- reply.length = 0;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
-
- if (client->swapped) {
- __glXSwapIsDirectReply(client, &reply);
- } else {
- WriteToClient(client, sz_xGLXIsDirectReply, (char *)&reply);
- }
-
- return Success;
-}
-
-int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
-/* xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; */
- xGLXQueryVersionReply reply;
-
- /*
- ** Server should take into consideration the version numbers sent by the
- ** client if it wants to work with older clients; however, in this
- ** implementation the server just returns its version number.
- */
- reply.majorVersion = __glXVersionMajor;
- reply.minorVersion = __glXVersionMinor;
- reply.length = 0;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
-
- if (client->swapped) {
- __glXSwapQueryVersionReply(client, &reply);
- } else {
- WriteToClient(client, sz_xGLXQueryVersionReply, (char *)&reply);
- }
- return Success;
-}
-
-int __glXWaitGL(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXWaitGLReq *req = (xGLXWaitGLReq *)pc;
- xGLXWaitGLReq *be_req = (xGLXWaitGLReq *)pc;
- int from_screen = 0;
- int to_screen = 0;
- int s;
- __GLXcontext *glxc = NULL;
-
- if (req->contextTag != 0) {
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (glxc) {
- from_screen = to_screen = glxc->pScreen->myNum;
- }
- }
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReq(GLXWaitGL,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXWaitGL;
- be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
- UnlockDisplay(dpy);
- SyncHandle();
-
- XSync(dpy, False);
- }
-
- return Success;
-}
-
-int __glXWaitX(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXWaitXReq *req = (xGLXWaitXReq *)pc;
- xGLXWaitXReq *be_req;
- int from_screen = 0;
- int to_screen = 0;
- int s;
- __GLXcontext *glxc = NULL;
-
- if (req->contextTag != 0) {
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (glxc) {
- from_screen = to_screen = glxc->pScreen->myNum;
- }
- }
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- dmxSync( dmxScreen, 1 );
-
- LockDisplay(dpy);
- GetReq(GLXWaitX,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXWaitX;
- be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
- UnlockDisplay(dpy);
- SyncHandle();
-
- XFlush( dpy );
- }
-
- return Success;
-}
-
-int __glXCopyContext(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXCopyContextReq *be_req;
- xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc;
- GLXContextID source = req->source;
- GLXContextID dest = req->dest;
- GLXContextTag tag = req->contextTag;
- unsigned long mask = req->mask;
- __GLXcontext *src, *dst;
- int s;
- int from_screen = 0;
- int to_screen = 0;
-
- /*
- ** Check that each context exists.
- */
- dixLookupResourceByType((pointer*) &src, source, __glXContextRes,
- NullClient, DixUnknownAccess);
- if (!src) {
- client->errorValue = source;
- return __glXBadContext;
- }
- dixLookupResourceByType((pointer*) &dst, dest, __glXContextRes,
- NullClient, DixUnknownAccess);
- if (!dst) {
- client->errorValue = dest;
- return __glXBadContext;
- }
-
- /*
- ** They must be in the same address space, and same screen.
- */
- if (src->pGlxScreen != dst->pGlxScreen) {
- client->errorValue = source;
- return BadMatch;
- }
-
- /*
- ** The destination context must not be current for any client.
- */
- if (dst->isCurrent) {
- client->errorValue = dest;
- return BadAccess;
- }
-
- if (tag) {
- __GLXcontext *tagcx = __glXLookupContextByTag(cl, tag);
-
- if (!tagcx) {
- return __glXBadContextTag;
- }
- if (tagcx != src) {
- /*
- ** This would be caused by a faulty implementation of the client
- ** library.
- */
- return BadMatch;
- }
- }
-
- from_screen = to_screen = src->pScreen->myNum;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReq(GLXCopyContext,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXCopyContext;
- be_req->source = (unsigned int)src->real_ids[s-from_screen];
- be_req->dest = (unsigned int)dst->real_ids[s-from_screen];
- be_req->mask = mask;
- be_req->contextTag = (tag ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
- UnlockDisplay(dpy);
- SyncHandle();
- }
-
- return Success;
-}
-
-int __glXGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc;
- xGLXGetVisualConfigsReply reply;
- __GLXscreenInfo *pGlxScreen;
- __GLXvisualConfig *pGlxVisual;
- CARD32 buf[__GLX_TOTAL_CONFIG];
- unsigned int screen;
- int i, p;
-
- screen = req->screen;
- if (screen >= screenInfo.numScreens) {
- /* The client library must send a valid screen number. */
- client->errorValue = screen;
- return BadValue;
- }
- pGlxScreen = &__glXActiveScreens[screen];
-
- reply.numVisuals = pGlxScreen->numGLXVisuals;
- reply.numProps = __GLX_TOTAL_CONFIG;
- reply.length = (pGlxScreen->numGLXVisuals * __GLX_SIZE_CARD32 *
- __GLX_TOTAL_CONFIG) >> 2;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
-
- WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *)&reply);
-
- for (i=0; i < pGlxScreen->numVisuals; i++) {
- pGlxVisual = &pGlxScreen->pGlxVisual[i];
- if (!pGlxScreen->isGLXvis[i] || pGlxVisual->vid == 0) {
- /* not a usable visual */
- continue;
- }
- p = 0;
- buf[p++] = pGlxVisual->vid;
- buf[p++] = pGlxVisual->class;
- buf[p++] = pGlxVisual->rgba;
-
- buf[p++] = pGlxVisual->redSize;
- buf[p++] = pGlxVisual->greenSize;
- buf[p++] = pGlxVisual->blueSize;
- buf[p++] = pGlxVisual->alphaSize;
- buf[p++] = pGlxVisual->accumRedSize;
- buf[p++] = pGlxVisual->accumGreenSize;
- buf[p++] = pGlxVisual->accumBlueSize;
- buf[p++] = pGlxVisual->accumAlphaSize;
-
- buf[p++] = pGlxVisual->doubleBuffer;
- buf[p++] = pGlxVisual->stereo;
-
- buf[p++] = pGlxVisual->bufferSize;
- buf[p++] = pGlxVisual->depthSize;
- buf[p++] = pGlxVisual->stencilSize;
- buf[p++] = pGlxVisual->auxBuffers;
- buf[p++] = pGlxVisual->level;
- /*
- ** Add token/value pairs for extensions.
- */
- buf[p++] = GLX_VISUAL_CAVEAT_EXT;
- buf[p++] = pGlxVisual->visualRating;
- buf[p++] = GLX_TRANSPARENT_TYPE_EXT;
- buf[p++] = pGlxVisual->transparentPixel;
- buf[p++] = GLX_TRANSPARENT_RED_VALUE_EXT;
- buf[p++] = pGlxVisual->transparentRed;
- buf[p++] = GLX_TRANSPARENT_GREEN_VALUE_EXT;
- buf[p++] = pGlxVisual->transparentGreen;
- buf[p++] = GLX_TRANSPARENT_BLUE_VALUE_EXT;
- buf[p++] = pGlxVisual->transparentBlue;
- buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE_EXT;
- buf[p++] = pGlxVisual->transparentAlpha;
- buf[p++] = GLX_TRANSPARENT_INDEX_VALUE_EXT;
- buf[p++] = pGlxVisual->transparentIndex;
- buf[p++] = GLX_SAMPLES_SGIS;
- buf[p++] = pGlxVisual->multiSampleSize;
- buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
- buf[p++] = pGlxVisual->nMultiSampleBuffers;
- buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
- buf[p++] = pGlxVisual->visualSelectGroup;
-
- WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG,
- (char *)buf);
- }
- return Success;
-}
-
-/*
-** Create a GLX Pixmap from an X Pixmap.
-*/
-static int CreateGLXPixmap(__GLXclientState *cl,
- VisualID visual, GLXFBConfigID fbconfigId,
- int screenNum, XID pixmapId, XID glxpixmapId )
-{
- ClientPtr client = cl->client;
- xGLXCreateGLXPixmapReq *be_req;
- xGLXCreatePixmapReq *be_new_req;
- DrawablePtr pDraw;
- ScreenPtr pScreen;
- VisualPtr pVisual;
- __GLXpixmap *pGlxPixmap;
- __GLXscreenInfo *pGlxScreen;
- __GLXvisualConfig *pGlxVisual;
- __GLXFBConfig *pFBConfig;
- int i, s, rc;
- int from_screen, to_screen;
-#ifdef PANORAMIX
- PanoramiXRes *pXinDraw = NULL;
-#endif
-
- rc = dixLookupDrawable(&pDraw, pixmapId, client, M_DRAWABLE_PIXMAP,
- DixAddAccess);
- if (rc != Success)
- return rc;
-
- /*
- ** Check if screen of visual matches screen of pixmap.
- */
- pScreen = pDraw->pScreen;
- if (screenNum != pScreen->myNum) {
- return BadMatch;
- }
-
- if (fbconfigId == 0 && visual == 0) {
- return BadValue;
- }
-
- if (fbconfigId != None) {
- pFBConfig = glxLookupFBConfig( fbconfigId );
- if (!pFBConfig) {
- client->errorValue = fbconfigId;
- return BadValue;
- }
- visual = pFBConfig->associatedVisualId;
- }
- else {
- pFBConfig = NULL;
- }
-
- if (visual != None) {
- /*
- ** Find the VisualRec for this visual.
- */
- pVisual = pScreen->visuals;
- for (i=0; i < pScreen->numVisuals; i++, pVisual++) {
- if (pVisual->vid == visual) {
- break;
- }
- }
- if (i == pScreen->numVisuals) {
- client->errorValue = visual;
- return BadValue;
- }
- /*
- ** Check if depth of visual matches depth of pixmap.
- */
- if (pVisual->nplanes != pDraw->depth) {
- client->errorValue = visual;
- return BadMatch;
- }
-
- /*
- ** Get configuration of the visual.
- */
- pGlxScreen = &__glXActiveScreens[screenNum];
- pGlxVisual = pGlxScreen->pGlxVisual;
- for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
- if (pGlxVisual->vid == visual) {
- break;
- }
- }
- if (i == pGlxScreen->numVisuals) {
- /*
- ** Visual not support on this screen by this OpenGL implementation.
- */
- client->errorValue = visual;
- return BadValue;
- }
-
-
- /* find the FBConfig for that visual (if any) */
- if ( pFBConfig == NULL ) {
- pFBConfig = glxLookupFBConfigByVID( visual );
-
- if ( pFBConfig == NULL ) {
- /*
- * visual does not have an FBConfig ???
- client->errorValue = visual;
- return BadValue;
- */
- }
- }
- }
- else {
- pVisual = NULL;
- pGlxVisual = NULL;
- pGlxScreen = &__glXActiveScreens[pDraw->pScreen->myNum];
- }
-
- pGlxPixmap = (__GLXpixmap *) malloc(sizeof(__GLXpixmap));
- if (!pGlxPixmap) {
- return BadAlloc;
- }
- pGlxPixmap->be_xids = (XID *) malloc(sizeof(XID) * screenInfo.numScreens);
- if (!pGlxPixmap->be_xids) {
- free( pGlxPixmap );
- return BadAlloc;
- }
-
- pGlxPixmap->pDraw = pDraw;
- pGlxPixmap->pGlxScreen = pGlxScreen;
- pGlxPixmap->pGlxVisual = pGlxVisual;
- pGlxPixmap->pFBConfig = pFBConfig;
- pGlxPixmap->pScreen = pScreen;
- pGlxPixmap->idExists = True;
- pGlxPixmap->refcnt = 0;
-
- /*
- ** Bump the ref count on the X pixmap so it won't disappear.
- */
- ((PixmapPtr) pDraw)->refcnt++;
-
- /*
- * send the request to the back-end server(s)
- */
- from_screen = to_screen = screenNum;
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
-
- dixLookupResourceByClass((pointer*) &pXinDraw,
- pDraw->id, XRC_DRAWABLE,
- client, DixReadAccess);
- }
-#endif
-
- for (s=from_screen; s<=to_screen; s++) {
-
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
- Pixmap be_pixmap;
- DrawablePtr pRealDraw = pDraw;
-
-#ifdef PANORAMIX
- if (pXinDraw) {
- dixLookupDrawable(&pRealDraw, pXinDraw->info[s].id, client, 0,
- DixAddAccess);
- }
-#endif
-
- be_pixmap = (DMX_GET_PIXMAP_PRIV((PixmapPtr)pRealDraw))->pixmap;
-
- /* make sure pixmap already created on back-end */
- dmxSync( dmxScreen, 1 );
-
- if ( pFBConfig && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- __GLXFBConfig *be_FBConfig = glxLookupBackEndFBConfig( pFBConfig->id, s );
-
- LockDisplay(dpy);
- pGlxPixmap->be_xids[s] = XAllocID(dpy);
- GetReq(GLXCreatePixmap,be_new_req);
- be_new_req->reqType = dmxScreen->glxMajorOpcode;
- be_new_req->glxCode = X_GLXCreatePixmap;
- be_new_req->screen = DefaultScreen(dpy);
- be_new_req->fbconfig = be_FBConfig->id;
- be_new_req->pixmap = (unsigned int)be_pixmap;
- be_new_req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
- be_new_req->numAttribs = 0;
- UnlockDisplay(dpy);
- SyncHandle();
- }
- else if (pFBConfig && glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
- __GLXFBConfig *be_FBConfig = glxLookupBackEndFBConfig( pFBConfig->id, s );
- xGLXCreateGLXPixmapWithConfigSGIXReq *ext_req;
- xGLXVendorPrivateReq *vpreq;
-
- LockDisplay(dpy);
- pGlxPixmap->be_xids[s] = XAllocID(dpy);
- GetReqExtra(GLXVendorPrivate,
- sz_xGLXCreateGLXPixmapWithConfigSGIXReq-sz_xGLXVendorPrivateReq,
- vpreq);
- ext_req = (xGLXCreateGLXPixmapWithConfigSGIXReq *)vpreq;
- ext_req->reqType = dmxScreen->glxMajorOpcode;
- ext_req->glxCode = X_GLXVendorPrivate;
- ext_req->vendorCode = X_GLXvop_CreateGLXPixmapWithConfigSGIX;
- ext_req->screen = DefaultScreen(dpy);
- ext_req->fbconfig = be_FBConfig->id;
- ext_req->pixmap = (unsigned int)be_pixmap;
- ext_req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
- UnlockDisplay(dpy);
- SyncHandle();
- }
- else if (pGlxVisual) {
- LockDisplay(dpy);
- pGlxPixmap->be_xids[s] = XAllocID(dpy);
- GetReq(GLXCreateGLXPixmap,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXCreateGLXPixmap;
- be_req->screen = DefaultScreen(dpy);
- be_req->visual = (unsigned int)glxMatchGLXVisualInConfigList(
- pGlxVisual,
- dmxScreen->glxVisuals,
- dmxScreen->numGlxVisuals );
- be_req->pixmap = (unsigned int)be_pixmap;
- be_req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
- UnlockDisplay(dpy);
- SyncHandle();
- }
- else {
- client->errorValue = ( visual ? visual : fbconfigId );
- free( pGlxPixmap );
- return BadValue;
- }
-
- XFlush( dpy );
- }
-
- if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) {
- free( pGlxPixmap );
- return BadAlloc;
- }
-
- return Success;
-}
-
-int __glXCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
-
- return( CreateGLXPixmap(cl, req->visual, None,
- req->screen, req->pixmap, req->glxpixmap) );
-}
-
-int __glXCreatePixmap(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc;
-
- return( CreateGLXPixmap(cl, None, req->fbconfig,
- req->screen, req->pixmap, req->glxpixmap) );
-}
-
-int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
- XID glxpixmap = req->glxpixmap;
- __GLXpixmap *pGlxPixmap;
- int s;
- int from_screen, to_screen;
-
- /*
- ** Check if it's a valid GLX pixmap.
- */
- dixLookupResourceByType((pointer*) &pGlxPixmap, glxpixmap,
- __glXPixmapRes, NullClient, DixUnknownAccess);
- if (!pGlxPixmap) {
- client->errorValue = glxpixmap;
- return __glXBadPixmap;
- }
- FreeResource(glxpixmap, FALSE);
-
- /*
- * destroy the pixmap on the back-end server(s).
- */
- from_screen = to_screen = pGlxPixmap->pDraw->pScreen->myNum;
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- /* make sure pixmap exist in back-end */
- dmxSync( dmxScreen, 1 );
-
- LockDisplay(dpy);
- GetReq(GLXDestroyGLXPixmap,req);
- req->reqType = dmxScreen->glxMajorOpcode;
- req->glxCode = X_GLXDestroyGLXPixmap;
- req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
- UnlockDisplay(dpy);
- SyncHandle();
- }
-
-
- return Success;
-}
-
-/*****************************************************************************/
-
-/*
-** NOTE: There is no portable implementation for swap buffers as of
-** this time that is of value. Consequently, this code must be
-** implemented by somebody other than SGI.
-*/
-int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag)
-{
- ClientPtr client = cl->client;
- DrawablePtr pDraw;
- xGLXSwapBuffersReq *be_req;
- WindowPtr pWin = NULL;
- __GLXpixmap *pGlxPixmap = NULL;
- __GLXcontext *glxc = NULL;
-#ifdef PANORAMIX
- PanoramiXRes *pXinDraw = NULL;
-#endif
- __glXWindow *pGlxWindow = NULL;
- int from_screen = 0;
- int to_screen = 0;
- int s, rc;
-
- /*
- ** Check that the GLX drawable is valid.
- */
- rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
- if (rc == Success) {
- from_screen = to_screen = pDraw->pScreen->myNum;
-
- if (pDraw->type == DRAWABLE_WINDOW) {
- /*
- ** Drawable is an X window.
- */
- pWin = (WindowPtr)pDraw;
- } else {
- /*
- ** Drawable is an X pixmap, which is not allowed.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
- }
-
- if (!pDraw) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, drawId,
- __glXPixmapRes, NullClient, DixUnknownAccess);
- if (pGlxPixmap) {
- /*
- ** Drawable is a GLX pixmap.
- */
- pDraw = pGlxPixmap->pDraw;
- from_screen = to_screen = pGlxPixmap->pScreen->myNum;
- }
- }
-
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, drawId,
- __glXWindowRes, NullClient, DixUnknownAccess);
- if (pGlxWindow) {
- /*
- ** Drawable is a GLXWindow.
- */
- pDraw = pGlxWindow->pDraw;
- from_screen = to_screen = pGlxWindow->pScreen->myNum;
- }
- }
-
- if (!pDraw) {
- /*
- ** Drawable is neither a X window nor a GLX pixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- if (tag) {
- glxc = __glXLookupContextByTag(cl, tag);
- if (!glxc) {
- return __glXBadContextTag;
- }
- }
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- dixLookupResourceByClass((pointer*) &pXinDraw,
- pDraw->id, XRC_DRAWABLE,
- client, DixReadAccess);
- }
-#endif
-
- /* If requested, send a glFinish to all back-end servers before swapping. */
- if (dmxGLXFinishSwap) {
- for (s=from_screen; s<=to_screen; s++) {
- Display *dpy = GetBackEndDisplay(cl,s);
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- xGLXSingleReq *finishReq;
- xGLXSingleReply reply;
-
-#define X_GLXSingle 0 /* needed by GetReq below */
-
- LockDisplay(dpy);
- GetReq(GLXSingle,finishReq);
- finishReq->reqType = dmxScreen->glxMajorOpcode;
- finishReq->glxCode = X_GLsop_Finish;
- finishReq->contextTag = (tag ? GetCurrentBackEndTag(cl,tag,s) : 0);
- (void) _XReply(dpy, (xReply*) &reply, 0, False);
- UnlockDisplay(dpy);
- SyncHandle();
- }
- }
-
- /* If requested, send an XSync to all back-end servers before swapping. */
- if (dmxGLXSyncSwap) {
- for (s=from_screen; s<=to_screen; s++)
- XSync(GetBackEndDisplay(cl,s), False);
- }
-
-
- /* send the SwapBuffers request to all back-end servers */
-
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
- unsigned int be_draw = 0;
-
- if (pGlxPixmap) {
- be_draw = (unsigned int)pGlxPixmap->be_xids[s];
- }
-#ifdef PANORAMIX
- else if (pXinDraw) {
- dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess);
- }
-#endif
- else if (pGlxWindow) {
- pWin = (WindowPtr)pGlxWindow->pDraw;
- }
-
- if (pWin && !be_draw) {
- be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- if (!be_draw) {
- /* it might be that the window did not created yet on the */
- /* back-end server (lazy window creation option), force */
- /* creation of the window */
- dmxCreateAndRealizeWindow( pWin, TRUE );
- be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- }
- }
-
- dmxSync( dmxScreen, 1 );
-
- LockDisplay(dpy);
- GetReq(GLXSwapBuffers,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXSwapBuffers;
- be_req->drawable = be_draw;
- be_req->contextTag = ( tag ? GetCurrentBackEndTag(cl,tag,s) : 0 );
- UnlockDisplay(dpy);
- SyncHandle();
- XFlush(dpy);
- }
-
- return Success;
-}
-
-int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- DrawablePtr pDraw;
- xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
- GLXContextTag tag = req->contextTag;
- XID drawId = req->drawable;
- __GLXpixmap *pGlxPixmap = NULL;
- __GLXcontext *glxc = NULL;
- __glXWindow *pGlxWindow = NULL;
- int rc;
-
- /*
- ** Check that the GLX drawable is valid.
- */
- rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
- if (rc == Success) {
- if (pDraw->type != DRAWABLE_WINDOW) {
- /*
- ** Drawable is an X pixmap, which is not allowed.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
- }
-
- if (!pDraw) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, drawId,
- __glXPixmapRes, NullClient, DixUnknownAccess);
- if (pGlxPixmap) {
- /*
- ** Drawable is a GLX pixmap.
- */
- pDraw = pGlxPixmap->pDraw;
- }
- }
-
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, drawId,
- __glXWindowRes, NullClient, DixUnknownAccess);
- if (pGlxWindow) {
- /*
- ** Drawable is a GLXWindow.
- */
- pDraw = pGlxWindow->pDraw;
- }
- }
-
- if (!pDraw) {
- /*
- ** Drawable is neither a X window nor a GLX pixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- if (tag) {
- glxc = __glXLookupContextByTag(cl, tag);
- if (!glxc) {
- return __glXBadContextTag;
- }
- }
-
- if (pDraw &&
- pDraw->type == DRAWABLE_WINDOW &&
- DMX_GET_WINDOW_PRIV((WindowPtr)pDraw)->swapGroup) {
- return SGSwapBuffers(cl, drawId, tag, pDraw);
- }
-
- return __glXDoSwapBuffers(cl, drawId, tag);
-}
-
-
-/************************************************************************/
-
-/*
-** Render and Renderlarge are not in the GLX API. They are used by the GLX
-** client library to send batches of GL rendering commands.
-*/
-
-/*
-** Execute all the drawing commands in a request.
-*/
-int __glXRender(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXRenderReq *req;
- xGLXRenderReq *be_req;
- int size;
- __GLXcontext *glxc;
- int from_screen = 0;
- int to_screen = 0;
- int s;
-
- /*
- ** NOTE: much of this code also appears in the byteswapping version of this
- ** routine, __glXSwapRender(). Any changes made here should also be
- ** duplicated there.
- */
-
- req = (xGLXRenderReq *) pc;
-
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (!glxc) {
- return 0;
- }
- from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- pc += sz_xGLXRenderReq;
- size = (req->length << 2) - sz_xGLXRenderReq;
-
- /*
- * just forward the request to back-end server(s)
- */
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReq(GLXRender,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXRender;
- be_req->length = req->length;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- _XSend(dpy, (const char *)pc, size);
- UnlockDisplay(dpy);
- SyncHandle();
- }
-
- return Success;
-}
-
-/*
-** Execute a large rendering request (one that spans multiple X requests).
-*/
-int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXRenderLargeReq *req;
- xGLXRenderLargeReq *be_req;
- __GLXcontext *glxc;
- int from_screen = 0;
- int to_screen = 0;
- int s;
-
- /*
- ** NOTE: much of this code also appears in the byteswapping version of this
- ** routine, __glXSwapRenderLarge(). Any changes made here should also be
- ** duplicated there.
- */
-
- req = (xGLXRenderLargeReq *) pc;
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (!glxc) {
- return 0;
- }
- from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- pc += sz_xGLXRenderLargeReq;
-
- /*
- * just forward the request to back-end server(s)
- */
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- GetReq(GLXRenderLarge,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXRenderLarge;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- be_req->length = req->length;
- be_req->requestNumber = req->requestNumber;
- be_req->requestTotal = req->requestTotal;
- be_req->dataBytes = req->dataBytes;
- Data(dpy, (const char *)pc, req->dataBytes);
- UnlockDisplay(dpy);
- SyncHandle();
-
- }
-
- return Success;
-}
-
-
-/************************************************************************/
-
-int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq *req;
-
- req = (xGLXVendorPrivateReq *) pc;
-
- switch( req->vendorCode ) {
-
- case X_GLvop_DeleteTexturesEXT:
- return __glXVForwardSingleReq( cl, pc );
- break;
-
- case X_GLXvop_SwapIntervalSGI:
- if (glxIsExtensionSupported("SGI_swap_control")) {
- return __glXVForwardSingleReq( cl, pc );
- }
- else {
- return Success;
- }
- break;
-
-#if 0 /* glx 1.3 */
- case X_GLXvop_CreateGLXVideoSourceSGIX:
- break;
- case X_GLXvop_DestroyGLXVideoSourceSGIX:
- break;
- case X_GLXvop_CreateGLXPixmapWithConfigSGIX:
- break;
- case X_GLXvop_DestroyGLXPbufferSGIX:
- break;
- case X_GLXvop_ChangeDrawableAttributesSGIX:
- break;
-#endif
-
- case X_GLXvop_BindSwapBarrierSGIX:
- return __glXBindSwapBarrierSGIX( cl, pc );
- break;
-
- case X_GLXvop_JoinSwapGroupSGIX:
- return __glXJoinSwapGroupSGIX( cl, pc );
- break;
-
- case X_GLXvop_CreateContextWithConfigSGIX:
- return __glXCreateContextWithConfigSGIX( cl, pc );
- break;
-
- default:
- /*
- ** unsupported private request
- */
- cl->client->errorValue = req->vendorCode;
- return __glXUnsupportedPrivateRequest;
- }
-
- cl->client->errorValue = req->vendorCode;
- return __glXUnsupportedPrivateRequest;
-
-}
-
-int __glXVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateWithReplyReq *req;
-
- req = (xGLXVendorPrivateWithReplyReq *) pc;
-
- switch( req->vendorCode ) {
-
- case X_GLvop_GetConvolutionFilterEXT:
- case X_GLvop_GetConvolutionParameterfvEXT:
- case X_GLvop_GetConvolutionParameterivEXT:
- case X_GLvop_GetSeparableFilterEXT:
- case X_GLvop_GetHistogramEXT:
- case X_GLvop_GetHistogramParameterivEXT:
- case X_GLvop_GetMinmaxEXT:
- case X_GLvop_GetMinmaxParameterfvEXT:
- case X_GLvop_GetMinmaxParameterivEXT:
- case X_GLvop_AreTexturesResidentEXT:
- case X_GLvop_IsTextureEXT:
- return( __glXVForwardPipe0WithReply(cl, pc) );
- break;
-
- case X_GLvop_GenTexturesEXT:
- return( __glXVForwardAllWithReply(cl, pc) );
- break;
-
-
-#if 0 /* glx1.3 */
- case X_GLvop_GetDetailTexFuncSGIS:
- case X_GLvop_GetSharpenTexFuncSGIS:
- case X_GLvop_GetColorTableSGI:
- case X_GLvop_GetColorTableParameterfvSGI:
- case X_GLvop_GetColorTableParameterivSGI:
- case X_GLvop_GetTexFilterFuncSGIS:
- case X_GLvop_GetInstrumentsSGIX:
- case X_GLvop_InstrumentsBufferSGIX:
- case X_GLvop_PollInstrumentsSGIX:
- case X_GLvop_FlushRasterSGIX:
- case X_GLXvop_CreateGLXPbufferSGIX:
- case X_GLXvop_GetDrawableAttributesSGIX:
- case X_GLXvop_QueryHyperpipeNetworkSGIX:
- case X_GLXvop_QueryHyperpipeConfigSGIX:
- case X_GLXvop_HyperpipeConfigSGIX:
- case X_GLXvop_DestroyHyperpipeConfigSGIX:
-#endif
- case X_GLXvop_QueryMaxSwapBarriersSGIX:
- return( __glXQueryMaxSwapBarriersSGIX(cl, pc) );
- break;
-
- case X_GLXvop_GetFBConfigsSGIX:
- return( __glXGetFBConfigsSGIX(cl, pc) );
- break;
-
- case X_GLXvop_MakeCurrentReadSGI:
- return( __glXMakeCurrentReadSGI(cl, pc) );
- break;
-
- case X_GLXvop_QueryContextInfoEXT:
- return( __glXQueryContextInfoEXT(cl,pc) );
- break;
-
- default:
- /*
- ** unsupported private request
- */
- cl->client->errorValue = req->vendorCode;
- return __glXUnsupportedPrivateRequest;
- }
-
-}
-
-int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc;
- xGLXQueryExtensionsStringReply reply;
- GLint screen;
- size_t length;
- int len, numbytes;
- char *be_buf;
-
-#ifdef FWD_QUERY_REQ
- xGLXQueryExtensionsStringReq *be_req;
- xGLXQueryExtensionsStringReply be_reply;
- DMXScreenInfo *dmxScreen;
- Display *dpy;
- int slop;
-#endif
-
- screen = req->screen;
-
- /*
- ** Check if screen exists.
- */
- if ((screen < 0) || (screen >= screenInfo.numScreens)) {
- client->errorValue = screen;
- return BadValue;
- }
-
-#ifdef FWD_QUERY_REQ
- dmxScreen = &dmxScreens[screen];
-
- /* Send the glXQueryServerString request */
- dpy = GetBackEndDisplay(cl,screen);
- LockDisplay(dpy);
- GetReq(GLXQueryExtensionsString,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXQueryServerString;
- be_req->screen = DefaultScreen(dpy);
- _XReply(dpy, (xReply*) &be_reply, 0, False);
- len = (int)be_reply.length;
- numbytes = (int)be_reply.n;
- slop = numbytes * __GLX_SIZE_INT8 & 3;
- be_buf = (char *)malloc(numbytes);
- if (!be_buf) {
- /* Throw data on the floor */
- _XEatData(dpy, len);
- } else {
- _XRead(dpy, (char *)be_buf, numbytes);
- if (slop) _XEatData(dpy,4-slop);
- }
- UnlockDisplay(dpy);
- SyncHandle();
-
-#else
-
- be_buf = __glXGetServerString(GLX_EXTENSIONS);
- numbytes = strlen(be_buf) + 1;
- len = __GLX_PAD(numbytes) >> 2;
-
-#endif
-
- length = len;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.length = len;
- reply.n = numbytes;
-
- if (client->swapped) {
- glxSwapQueryExtensionsStringReply(client, &reply, be_buf);
- } else {
- WriteToClient(client, sz_xGLXQueryExtensionsStringReply,(char *)&reply);
- WriteToClient(client, (int)(length << 2), (char *)be_buf);
- }
-
- return Success;
-}
-
-int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc;
- xGLXQueryServerStringReply reply;
- int name;
- GLint screen;
- size_t length;
- int len, numbytes;
- char *be_buf;
-#ifdef FWD_QUERY_REQ
- xGLXQueryServerStringReq *be_req;
- xGLXQueryServerStringReply be_reply;
- DMXScreenInfo *dmxScreen;
- Display *dpy;
- int slop;
-#endif
-
- name = req->name;
- screen = req->screen;
- /*
- ** Check if screen exists.
- */
- if ((screen < 0) || (screen >= screenInfo.numScreens)) {
- client->errorValue = screen;
- return BadValue;
- }
-
-#ifdef FWD_QUERY_REQ
- dmxScreen = &dmxScreens[screen];
-
- /* Send the glXQueryServerString request */
- dpy = GetBackEndDisplay(cl,screen);
- LockDisplay(dpy);
- GetReq(GLXQueryServerString,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXQueryServerString;
- be_req->screen = DefaultScreen(dpy);
- be_req->name = name;
- _XReply(dpy, (xReply*) &be_reply, 0, False);
- len = (int)be_reply.length;
- numbytes = (int)be_reply.n;
- slop = numbytes * __GLX_SIZE_INT8 & 3;
- be_buf = (char *)malloc(numbytes);
- if (!be_buf) {
- /* Throw data on the floor */
- _XEatData(dpy, len);
- } else {
- _XRead(dpy, (char *)be_buf, numbytes);
- if (slop) _XEatData(dpy,4-slop);
- }
- UnlockDisplay(dpy);
- SyncHandle();
-
-#else
- be_buf = __glXGetServerString(name);
- numbytes = strlen(be_buf) + 1;
- len = __GLX_PAD(numbytes) >> 2;
-#endif
-
- length = len;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.length = length;
- reply.n = numbytes;
-
- if (client->swapped) {
- glxSwapQueryServerStringReply(client, &reply, be_buf);
- } else {
- WriteToClient(client, sz_xGLXQueryServerStringReply, (char *)&reply);
- WriteToClient(client, (int)(length << 2), be_buf);
- }
-
- return Success;
-}
-
-int __glXClientInfo(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc;
- xGLXClientInfoReq *be_req;
- const char *buf;
- int from_screen = 0;
- int to_screen = 0;
- int s;
-
- cl->GLClientmajorVersion = req->major;
- cl->GLClientminorVersion = req->minor;
- free(cl->GLClientextensions);
- buf = (const char *)(req+1);
- cl->GLClientextensions = strdup(buf);
-
- to_screen = screenInfo.numScreens - 1;
-
- for (s=from_screen; s<=to_screen; s++)
- {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReq(GLXClientInfo,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXClientInfo;
- be_req->major = req->major;
- be_req->minor = req->minor;
- be_req->length = req->length;
- be_req->numbytes = req->numbytes;
- Data(dpy, buf, req->numbytes);
-
- UnlockDisplay(dpy);
- SyncHandle();
- }
-
- return Success;
-}
-
-int __glXUseXFont(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXUseXFontReq *req;
- xGLXUseXFontReq *be_req;
- FontPtr pFont;
- __GLXcontext *glxc = NULL;
- int from_screen = 0;
- int to_screen = 0;
- int s;
- dmxFontPrivPtr pFontPriv;
- DMXScreenInfo *dmxScreen;
- Display *dpy;
-
- req = (xGLXUseXFontReq *) pc;
-
- if (req->contextTag != 0) {
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (glxc) {
- from_screen = to_screen = glxc->pScreen->myNum;
- }
- }
-
- /*
- ** Font can actually be either the ID of a font or the ID of a GC
- ** containing a font.
- */
- dixLookupResourceByType((pointer*) &pFont, req->font, RT_FONT,
- NullClient, DixUnknownAccess);
- if (!pFont) {
- GC *pGC;
- dixLookupResourceByType((pointer*) &pGC, req->font,
- RT_GC, NullClient,
- DixUnknownAccess);
- if (!pGC) {
- client->errorValue = req->font;
- return BadFont;
- }
- pFont = pGC->font;
- }
-
- pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex);
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
-
- for (s=from_screen; s<=to_screen; s++) {
- dmxScreen = &dmxScreens[s];
- dpy = GetBackEndDisplay(cl,s);
-
- dmxSync( dmxScreen, 1 );
-
- LockDisplay(dpy);
- GetReq(GLXUseXFont,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXUseXFont;
- be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
- be_req->font = pFontPriv->font[s]->fid;
- be_req->first = req->first;
- be_req->count = req->count;
- be_req->listBase = req->listBase;
- UnlockDisplay(dpy);
- SyncHandle();
-
- XSync( dpy, False );
- }
-
- return Success;
-}
-
-/*
- * start GLX 1.3 here
- */
-
-int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
- xGLXGetFBConfigsReply reply;
- __GLXFBConfig *pFBConfig;
- CARD32 buf[2 * __GLX_TOTAL_FBCONFIG_PROPS];
- int numAttribs = __GLX_TOTAL_FBCONFIG_PROPS;
- unsigned int screen = req->screen;
- int numFBConfigs, i, p;
- __GLXscreenInfo *pGlxScreen;
-
- if (screen >= screenInfo.numScreens) {
- /* The client library must send a valid screen number. */
- client->errorValue = screen;
- return BadValue;
- }
-
- pGlxScreen = &__glXActiveScreens[screen];
- numFBConfigs = __glXNumFBConfigs;
-
- reply.numFBConfigs = numFBConfigs;
- reply.numAttribs = numAttribs;
- reply.length = (numFBConfigs * 2 * numAttribs * __GLX_SIZE_CARD32) >> 2;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
-
- if (client->swapped) {
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_SHORT(&reply.sequenceNumber);
- __GLX_SWAP_INT(&reply.length);
- __GLX_SWAP_INT(&reply.numFBConfigs);
- __GLX_SWAP_INT(&reply.numAttribs);
- }
- WriteToClient(client, sz_xGLXGetFBConfigsReply, (char *)&reply);
-
- for (i=0; i < numFBConfigs; i++) {
- int associatedVisualId = 0;
- int drawableTypeIndex;
- pFBConfig = __glXFBConfigs[ i * (screenInfo.numScreens+1) ];
-
- p = 0;
- /* core attributes */
- buf[p++] = GLX_FBCONFIG_ID;
- buf[p++] = pFBConfig->id;
- buf[p++] = GLX_BUFFER_SIZE;
- buf[p++] = pFBConfig->indexBits;
- buf[p++] = GLX_LEVEL;
- buf[p++] = pFBConfig->level;
- buf[p++] = GLX_DOUBLEBUFFER;
- buf[p++] = pFBConfig->doubleBufferMode;
- buf[p++] = GLX_STEREO;
- buf[p++] = pFBConfig->stereoMode;
- buf[p++] = GLX_AUX_BUFFERS;
- buf[p++] = pFBConfig->maxAuxBuffers;
- buf[p++] = GLX_RED_SIZE;
- buf[p++] = pFBConfig->redBits;
- buf[p++] = GLX_GREEN_SIZE;
- buf[p++] = pFBConfig->greenBits;
- buf[p++] = GLX_BLUE_SIZE;
- buf[p++] = pFBConfig->blueBits;
- buf[p++] = GLX_ALPHA_SIZE;
- buf[p++] = pFBConfig->alphaBits;
- buf[p++] = GLX_DEPTH_SIZE;
- buf[p++] = pFBConfig->depthBits;
- buf[p++] = GLX_STENCIL_SIZE;
- buf[p++] = pFBConfig->stencilBits;
- buf[p++] = GLX_ACCUM_RED_SIZE;
- buf[p++] = pFBConfig->accumRedBits;
- buf[p++] = GLX_ACCUM_GREEN_SIZE;
- buf[p++] = pFBConfig->accumGreenBits;
- buf[p++] = GLX_ACCUM_BLUE_SIZE;
- buf[p++] = pFBConfig->accumBlueBits;
- buf[p++] = GLX_ACCUM_ALPHA_SIZE;
- buf[p++] = pFBConfig->accumAlphaBits;
- buf[p++] = GLX_RENDER_TYPE;
- buf[p++] = pFBConfig->renderType;
- buf[p++] = GLX_DRAWABLE_TYPE;
- drawableTypeIndex = p;
- buf[p++] = pFBConfig->drawableType;
- buf[p++] = GLX_X_VISUAL_TYPE;
- buf[p++] = pFBConfig->visualType;
- buf[p++] = GLX_CONFIG_CAVEAT;
- buf[p++] = pFBConfig->visualCaveat;
- buf[p++] = GLX_TRANSPARENT_TYPE;
- buf[p++] = pFBConfig->transparentType;
- buf[p++] = GLX_TRANSPARENT_RED_VALUE;
- buf[p++] = pFBConfig->transparentRed;
- buf[p++] = GLX_TRANSPARENT_GREEN_VALUE;
- buf[p++] = pFBConfig->transparentGreen;
- buf[p++] = GLX_TRANSPARENT_BLUE_VALUE;
- buf[p++] = pFBConfig->transparentBlue;
- buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE;
- buf[p++] = pFBConfig->transparentAlpha;
- buf[p++] = GLX_TRANSPARENT_INDEX_VALUE;
- buf[p++] = pFBConfig->transparentIndex;
- buf[p++] = GLX_MAX_PBUFFER_WIDTH;
- buf[p++] = pFBConfig->maxPbufferWidth;
- buf[p++] = GLX_MAX_PBUFFER_HEIGHT;
- buf[p++] = pFBConfig->maxPbufferHeight;
- buf[p++] = GLX_MAX_PBUFFER_PIXELS;
- buf[p++] = pFBConfig->maxPbufferPixels;
-
- /*
- * find the visual of the back-end server and match a visual
- * on the proxy.
- * do only once - if a visual is not yet associated.
- */
- if (pFBConfig->associatedVisualId == (unsigned int)-1) {
- DMXScreenInfo *dmxScreen = &dmxScreens[screen];
- __GLXFBConfig *be_pFBConfig = __glXFBConfigs[ i * (screenInfo.numScreens+1)+screen+1 ];
- __GLXvisualConfig *pGlxVisual = NULL;
- int v;
- int found = 0;
- for (v=0; v<dmxScreen->numGlxVisuals; v++) {
- if (dmxScreen->glxVisuals[v].vid == be_pFBConfig->associatedVisualId) {
- pGlxVisual = &dmxScreen->glxVisuals[v];
- break;
- }
- }
-
- if (pGlxVisual) {
- for (v=0; v<pGlxScreen->numVisuals; v++) {
- if (glxVisualsMatch(&pGlxScreen->pGlxVisual[v], pGlxVisual)) {
- associatedVisualId = pGlxScreen->pGlxVisual[v].vid;
- found = 1;
- break;
- }
- }
- }
-
- if (!found) {
- associatedVisualId = 0;
- pFBConfig->drawableType &= ~(GLX_WINDOW_BIT);
- buf[drawableTypeIndex] = pFBConfig->drawableType;
- }
-#ifdef PANORAMIX
- else if (!noPanoramiXExtension) {
- /* convert the associated visualId to the panoramix one */
- pFBConfig->associatedVisualId =
- PanoramiXTranslateVisualID(screen, v);
- }
-#endif
- }
- else {
- associatedVisualId = pFBConfig->associatedVisualId;
- }
-
- buf[p++] = GLX_VISUAL_ID;
- buf[p++] = associatedVisualId;
-
- /* SGIS_multisample attributes */
- buf[p++] = GLX_SAMPLES_SGIS;
- buf[p++] = pFBConfig->multiSampleSize;
- buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
- buf[p++] = pFBConfig->nMultiSampleBuffers;
-
- /* SGIX_pbuffer specific attributes */
- buf[p++] = GLX_OPTIMAL_PBUFFER_WIDTH_SGIX;
- buf[p++] = pFBConfig->optimalPbufferWidth;
- buf[p++] = GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX;
- buf[p++] = pFBConfig->optimalPbufferHeight;
-
- buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
- buf[p++] = pFBConfig->visualSelectGroup;
-
- if (client->swapped) {
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY((int *)buf, 2*numAttribs);
- }
- WriteToClient(client, 2*numAttribs * __GLX_SIZE_CARD32, (char *)buf);
- }
- return Success;
-}
-
-int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *)pc;
- xGLXGetFBConfigsReq new_req;
-
- new_req.reqType = req->reqType;
- new_req.glxCode = req->glxCode;
- new_req.length = req->length;
- new_req.screen = req->screen;
-
- return( __glXGetFBConfigs( cl, (GLbyte *)&new_req ) );
-}
-
-
-int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc;
- int screen = req->screen;
- GLXFBConfigID fbconfigId = req->fbconfig;
- XID windowId = req->window;
- XID glxwindowId = req->glxwindow;
- DrawablePtr pDraw;
- ScreenPtr pScreen;
- __glXWindow *pGlxWindow;
- __GLXFBConfig *pGlxFBConfig = NULL;
- VisualPtr pVisual;
- VisualID visId;
- int i, rc;
- pointer val;
-
- /*
- ** Check if windowId is valid
- */
- rc = dixLookupDrawable(&pDraw, windowId, client, M_DRAWABLE_WINDOW,
- DixAddAccess);
- if (rc != Success)
- return rc;
-
- /*
- ** Check if screen of window matches screen of fbconfig.
- */
- pScreen = pDraw->pScreen;
- if (screen != pScreen->myNum) {
- return BadMatch;
- }
-
- /*
- ** Find the FBConfigRec for this fbconfigid.
- */
- if (!(pGlxFBConfig = glxLookupFBConfig(fbconfigId))) {
- client->errorValue = fbconfigId;
- return __glXBadFBConfig;
- }
- visId = pGlxFBConfig->associatedVisualId;
-
- /*
- ** Check if the fbconfig supports rendering to windows
- */
- if( !(pGlxFBConfig->drawableType & GLX_WINDOW_BIT) ) {
- return BadMatch;
- }
-
- if (visId != None) {
- /*
- ** Check if the visual ID is valid for this screen.
- */
- pVisual = pScreen->visuals;
- for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
- if (pVisual->vid == visId) {
- break;
- }
- }
- if (i == pScreen->numVisuals) {
- client->errorValue = visId;
- return BadValue;
- }
-
- /*
- ** Check if color buffer depth of fbconfig matches depth
- ** of window.
- */
- if (pVisual->nplanes != pDraw->depth) {
- return BadMatch;
- }
- } else
- /*
- ** The window was created with no visual that corresponds
- ** to fbconfig
- */
- return BadMatch;
-
- /*
- ** Check if there is already a fbconfig associated with this window
- */
- if (Success == dixLookupResourceByType(&val,
- glxwindowId, __glXWindowRes,
- NullClient, DixUnknownAccess)) {
- client->errorValue = glxwindowId;
- return BadAlloc;
- }
-
- pGlxWindow = (__glXWindow *) malloc(sizeof(__glXWindow));
- if (!pGlxWindow) {
- return BadAlloc;
- }
-
- /*
- ** Register this GLX window as a resource
- */
- if (!(AddResource(glxwindowId, __glXWindowRes, pGlxWindow))) {
- return BadAlloc;
- }
-
- pGlxWindow->pDraw = pDraw;
- pGlxWindow->type = GLX_GLXWINDOW_TYPE;
- pGlxWindow->idExists = True;
- pGlxWindow->refcnt = 0;
- pGlxWindow->pGlxFBConfig = pGlxFBConfig;
- pGlxWindow->pScreen = pScreen;
-
- return Success;
-}
-
-int __glXDestroyWindow(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
- XID glxwindow = req->glxwindow;
- pointer val;
-
- /*
- ** Check if it's a valid GLX window.
- */
- if (Success != dixLookupResourceByType(&val,
- glxwindow, __glXWindowRes,
- NullClient, DixUnknownAccess)) {
- client->errorValue = glxwindow;
- return __glXBadDrawable;
- }
- /*
- ** The glx window destructor will check whether it's current before
- ** freeing anything.
- */
- FreeResource(glxwindow, RT_NONE);
-
- return Success;
-}
-
-int __glXQueryContext(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- __GLXcontext *ctx;
- xGLXQueryContextReq *req;
- xGLXQueryContextReply reply;
- int nProps;
- int *sendBuf, *pSendBuf;
- int nReplyBytes;
-
- req = (xGLXQueryContextReq *)pc;
- dixLookupResourceByType((pointer*) &ctx, req->context, __glXContextRes,
- NullClient, DixUnknownAccess);
- if (!ctx) {
- client->errorValue = req->context;
- return __glXBadContext;
- }
-
- nProps = 3;
-
- reply.length = nProps << 1;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.n = nProps;
-
- nReplyBytes = reply.length << 2;
- sendBuf = (int *)malloc(nReplyBytes);
- pSendBuf = sendBuf;
- *pSendBuf++ = GLX_FBCONFIG_ID;
- *pSendBuf++ = (int)(ctx->pFBConfig->id);
- *pSendBuf++ = GLX_RENDER_TYPE;
- *pSendBuf++ = (int)(ctx->pFBConfig->renderType);
- *pSendBuf++ = GLX_SCREEN;
- *pSendBuf++ = (int)(ctx->pScreen->myNum);
-
- if (client->swapped) {
- __glXSwapQueryContextReply(client, &reply, sendBuf);
- } else {
- WriteToClient(client, sz_xGLXQueryContextReply, (char *)&reply);
- WriteToClient(client, nReplyBytes, (char *)sendBuf);
- }
- free((char *)sendBuf);
-
- return Success;
-}
-
-int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- __GLXcontext *ctx;
- xGLXQueryContextInfoEXTReq *req;
- xGLXQueryContextInfoEXTReply reply;
- int nProps;
- int *sendBuf, *pSendBuf;
- int nReplyBytes;
-
- req = (xGLXQueryContextInfoEXTReq *)pc;
- dixLookupResourceByType((pointer*) &ctx,
- req->context, __glXContextRes,
- client, DixReadAccess);
-
- if (!ctx) {
- client->errorValue = req->context;
- return __glXBadContext;
- }
-
- nProps = 4;
-
- reply.length = nProps << 1;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.n = nProps;
-
- nReplyBytes = reply.length << 2;
- sendBuf = (int *)malloc(nReplyBytes);
- pSendBuf = sendBuf;
- *pSendBuf++ = GLX_SHARE_CONTEXT_EXT;
- *pSendBuf++ = (int)(ctx->share_id);
- *pSendBuf++ = GLX_VISUAL_ID_EXT;
- *pSendBuf++ = (int)(ctx->pVisual ? ctx->pVisual->vid : 0);
- *pSendBuf++ = GLX_SCREEN_EXT;
- *pSendBuf++ = (int)(ctx->pScreen->myNum);
- *pSendBuf++ = GLX_FBCONFIG_ID;
- *pSendBuf++ = (int)(ctx->pFBConfig ? ctx->pFBConfig->id : 0);
-
- if (client->swapped) {
- __glXSwapQueryContextInfoEXTReply(client, &reply, sendBuf);
- } else {
- WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)&reply);
- WriteToClient(client, nReplyBytes, (char *)sendBuf);
- }
- free((char *)sendBuf);
-
- return Success;
-}
-
-int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *)pc;
- xGLXCreatePbufferReq *be_req;
- int screen = req->screen;
- GLXFBConfigID fbconfigId = req->fbconfig;
- GLXPbuffer pbuffer = req->pbuffer;
- __glXPbuffer *pGlxPbuffer;
- int numAttribs = req->numAttribs;
- int *attr;
- ScreenPtr pScreen;
- __GLXFBConfig *pGlxFBConfig;
- __GLXFBConfig *be_pGlxFBConfig;
- XID be_xid;
- Display *dpy;
- DMXScreenInfo *dmxScreen;
- int s;
- int from_screen, to_screen;
-
- /*
- ** Look up screen and FBConfig.
- */
- if (screen >= screenInfo.numScreens) {
- /* The client library must send a valid screen number. */
- client->errorValue = screen;
- return BadValue;
- }
- pScreen = screenInfo.screens[screen];
-
- /*
- ** Find the FBConfigRec for this fbconfigid.
- */
- if (!(pGlxFBConfig = glxLookupFBConfig(fbconfigId))) {
- client->errorValue = fbconfigId;
- return __glXBadFBConfig;
- }
-
- /*
- ** Create the GLX part of the Pbuffer.
- */
- pGlxPbuffer = (__glXPbuffer *) malloc(sizeof(__glXPbuffer));
- if (!pGlxPbuffer) {
- return BadAlloc;
- }
-
- pGlxPbuffer->be_xids = (XID *) malloc( sizeof(XID) * screenInfo.numScreens );
- if (!pGlxPbuffer->be_xids) {
- free(pGlxPbuffer);
- return BadAlloc;
- }
-
- /*
- * Allocate an XID on the back-end server(s) and send him the request
- */
- from_screen = to_screen = screen;
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- for (s=from_screen; s<=to_screen; s++) {
- dpy = GetBackEndDisplay(cl,s);
- be_xid = XAllocID(dpy);
- dmxScreen = &dmxScreens[s];
- be_pGlxFBConfig = glxLookupBackEndFBConfig( pGlxFBConfig->id, s );
-
- attr = (int *)( req+1 );
-
- LockDisplay(dpy);
- GetReqExtra(GLXCreatePbuffer, 2 * numAttribs * __GLX_SIZE_CARD32, be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXCreatePbuffer;
- be_req->screen = be_pGlxFBConfig->screen;
- be_req->fbconfig = be_pGlxFBConfig->id;
- be_req->pbuffer = be_xid;
- be_req->numAttribs = numAttribs;
-
- /* Send attributes */
- if ( attr != NULL ) {
- CARD32 *pc = (CARD32 *)(be_req + 1);
-
- while (numAttribs-- > 0) {
- *pc++ = *attr++; /* token */
- *pc++ = *attr++; /* value */
- }
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- pGlxPbuffer->be_xids[s] = be_xid;
- }
-
-
- pGlxPbuffer->idExists = True;
- pGlxPbuffer->refcnt = 0;
- pGlxPbuffer->pFBConfig = pGlxFBConfig;
- pGlxPbuffer->pScreen = pScreen;
-
- /*
- ** Register the resource.
- */
- if (!(AddResource(pbuffer, __glXPbufferRes, pGlxPbuffer))) {
- return BadAlloc;
- }
-
- return Success;
-
-}
-
-int __glXDestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
-{
- ClientPtr client = cl->client;
- xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
- xGLXDestroyPbufferReq *be_req;
- GLXPbuffer pbuffer = req->pbuffer;
- Display *dpy;
- int screen;
- DMXScreenInfo *dmxScreen;
- __glXPbuffer *pGlxPbuffer;
- int s;
- int from_screen, to_screen;
-
- /*
- ** Check if it's a valid Pbuffer
- */
- dixLookupResourceByType((pointer*) &pGlxPbuffer, pbuffer,
- __glXPbufferRes, NullClient, DixUnknownAccess);
- if (!pGlxPbuffer) {
- client->errorValue = pbuffer;
- return __glXBadPbuffer;
- }
-
- screen = pGlxPbuffer->pScreen->myNum;
-
- from_screen = to_screen = screen;
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- for (s=from_screen; s<=to_screen; s++) {
- dpy = GetBackEndDisplay(cl,s);
- dmxScreen = &dmxScreens[s];
-
- /* send the destroy request to the back-end server */
- LockDisplay(dpy);
- GetReq(GLXDestroyPbuffer, be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXDestroyPbuffer;
- be_req->pbuffer = pGlxPbuffer->be_xids[s];
- UnlockDisplay(dpy);
- SyncHandle();
- }
-
- FreeResource(pbuffer, RT_NONE);
-
- return Success;
-}
-
-int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc;
- xGLXGetDrawableAttributesReq *be_req;
- xGLXGetDrawableAttributesReply reply;
- ClientPtr client = cl->client;
- GLXDrawable drawId = req->drawable;
- GLXDrawable be_drawable = 0;
- DrawablePtr pDraw = NULL;
- Display *dpy;
- int screen, rc;
- DMXScreenInfo *dmxScreen;
- CARD32 *attribs = NULL;
- int attribs_size = 0;
-#ifdef PANORAMIX
- PanoramiXRes *pXinDraw = NULL;
-#endif
-
- if (drawId != None) {
- rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess);
- if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
- WindowPtr pWin = (WindowPtr)pDraw;
- be_drawable = 0;
- screen = pWin->drawable.pScreen->myNum;
- } else {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- if (!pDraw) {
- __GLXpixmap *pGlxPixmap;
- dixLookupResourceByType((pointer*) &pGlxPixmap,
- drawId, __glXPixmapRes,
- NullClient, DixUnknownAccess);
- if (pGlxPixmap) {
- pDraw = pGlxPixmap->pDraw;
- screen = pGlxPixmap->pScreen->myNum;
- be_drawable = pGlxPixmap->be_xids[screen];
- }
- }
-
- if (!pDraw) {
- __glXWindow *pGlxWindow;
- dixLookupResourceByType((pointer*) &pGlxWindow,
- drawId, __glXWindowRes,
- NullClient, DixUnknownAccess);
- if (pGlxWindow) {
- pDraw = pGlxWindow->pDraw;
- screen = pGlxWindow->pScreen->myNum;
- be_drawable = 0;
- }
- }
-
- if (!pDraw) {
- __glXPbuffer *pGlxPbuffer;
- dixLookupResourceByType((pointer*) &pGlxPbuffer,
- drawId, __glXPbufferRes,
- NullClient, DixUnknownAccess);
- if (pGlxPbuffer) {
- pDraw = (DrawablePtr)pGlxPbuffer;
- screen = pGlxPbuffer->pScreen->myNum;
- be_drawable = pGlxPbuffer->be_xids[screen];
- }
- }
- }
-
- if (!pDraw) {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- /* if the drawable is a window or GLXWindow -
- * we need to find the base id on the back-end server
- */
- if (!be_drawable) {
- WindowPtr pWin = (WindowPtr)pDraw;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- if (Success != dixLookupResourceByClass((pointer*) &pXinDraw,
- pDraw->id, XRC_DRAWABLE,
- client, DixReadAccess)) {
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- dixLookupWindow(&pWin, pXinDraw->info[screen].id, client,
- DixReadAccess);
- }
-#endif
-
- if (pWin) {
- be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- if (!be_drawable) {
- /* it might be that the window did not created yet on the */
- /* back-end server (lazy window creation option), force */
- /* creation of the window */
- dmxCreateAndRealizeWindow( pWin, TRUE );
- be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- }
- }
- else {
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
- }
-
-
- /* send the request to the back-end server */
- dpy = GetBackEndDisplay(cl,screen);
- dmxScreen = &dmxScreens[screen];
-
- /* make sure drawable exists on back-end */
- dmxSync( dmxScreen, 1 );
-
- LockDisplay(dpy);
- GetReq(GLXGetDrawableAttributes, be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXGetDrawableAttributes;
- be_req->drawable = be_drawable;
- be_req->length = req->length;
- if (!_XReply(dpy, (xReply *) &reply, 0, False)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
- }
-
- if (reply.numAttribs) {
- attribs_size = 2 * reply.numAttribs * __GLX_SIZE_CARD32;
- attribs = (CARD32 *) malloc(attribs_size);
- if (attribs == NULL) {
- UnlockDisplay(dpy);
- SyncHandle();
- return BadAlloc;
- }
-
- _XRead(dpy, (char *) attribs, attribs_size);
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
-
- /* send the reply back to the client */
- reply.sequenceNumber = client->sequence;
- if (client->swapped) {
- __glXSwapGetDrawableAttributesReply(client, &reply, (int *)attribs);
- }
- else {
- WriteToClient(client, sz_xGLXGetDrawableAttributesReply, (char *)&reply);
- WriteToClient(client, attribs_size, (char *)attribs);
- }
-
- free(attribs);
-
- return Success;
-}
-
-int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXChangeDrawableAttributesReq *req = (xGLXChangeDrawableAttributesReq *)pc;
- xGLXChangeDrawableAttributesReq *be_req;
- ClientPtr client = cl->client;
- GLXDrawable drawId = req->drawable;
- GLXDrawable be_drawable = 0;
- DrawablePtr pDraw = NULL;
- Display *dpy;
- int screen, rc;
- DMXScreenInfo *dmxScreen;
-
- if (drawId != None) {
- rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
- if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
- be_drawable = 0;
- screen = pDraw->pScreen->myNum;
- } else {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- if (!pDraw) {
- __GLXpixmap *pGlxPixmap;
- dixLookupResourceByType((pointer*) &pGlxPixmap,
- drawId, __glXPixmapRes,
- NullClient, DixUnknownAccess);
- if (pGlxPixmap) {
- pDraw = pGlxPixmap->pDraw;
- screen = pGlxPixmap->pScreen->myNum;
- be_drawable = pGlxPixmap->be_xids[screen];
- }
- }
-
- if (!pDraw) {
- __glXWindow *pGlxWindow;
- dixLookupResourceByType((pointer*) &pGlxWindow,
- drawId, __glXWindowRes,
- NullClient, DixUnknownAccess);
- if (pGlxWindow) {
- pDraw = pGlxWindow->pDraw;
- screen = pGlxWindow->pScreen->myNum;
- be_drawable = 0;
- }
- }
-
- if (!pDraw) {
- __glXPbuffer *pGlxPbuffer;
- dixLookupResourceByType((pointer*) &pGlxPbuffer,
- drawId, __glXPbufferRes,
- NullClient, DixUnknownAccess);
- if (pGlxPbuffer) {
- pDraw = (DrawablePtr)pGlxPbuffer;
- screen = pGlxPbuffer->pScreen->myNum;
- be_drawable = pGlxPbuffer->be_xids[screen];
- }
- }
- }
-
- if (!pDraw) {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- /* if the drawable is a window or GLXWindow -
- * we need to find the base id on the back-end server
- */
- if (!be_drawable) {
- WindowPtr pWin = (WindowPtr)pDraw;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- PanoramiXRes *pXinDraw;
- if (Success != dixLookupResourceByClass((pointer*) &pXinDraw,
- pDraw->id, XRC_DRAWABLE,
- client, DixReadAccess)) {
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- dixLookupWindow(&pWin, pXinDraw->info[screen].id, client,
- DixReadAccess);
- }
-#endif
-
- if (pWin) {
- be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- if (!be_drawable) {
- /* it might be that the window did not created yet on the */
- /* back-end server (lazy window creation option), force */
- /* creation of the window */
- dmxCreateAndRealizeWindow( pWin, TRUE );
- be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- }
- }
- else {
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
- }
-
-
- /* send the request to the back-end server */
- dpy = GetBackEndDisplay(cl,screen);
- dmxScreen = &dmxScreens[screen];
-
- /* make sure drawable exists on back-end */
- dmxSync( dmxScreen, 1 );
-
- LockDisplay(dpy);
- GetReqExtra(GLXChangeDrawableAttributes,
- 2 * req->numAttribs * __GLX_SIZE_CARD32, be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXChangeDrawableAttributes;
- be_req->drawable = be_drawable;
- be_req->numAttribs = req->numAttribs;
- be_req->length = req->length;
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- return Success;
-}
-
-int __glXSendLargeCommand(__GLXclientState *cl, GLXContextTag contextTag)
-{
- ClientPtr client = cl->client;
- xGLXRenderLargeReq *req;
- GLint maxSize, amount;
- GLint totalRequests, requestNumber;
- GLint dataLen;
- GLbyte *data;
- __GLXcontext *glxc;
- int s;
- int from_screen, to_screen;
-
- maxSize = cl->largeCmdMaxReqDataSize - (GLint)sizeof(xGLXRenderLargeReq);
- dataLen = cl->largeCmdBytesTotal;
- totalRequests = (dataLen / maxSize);
- if (dataLen % maxSize) totalRequests++;
-
- glxc = __glXLookupContextByTag(cl, contextTag);
- if (!glxc) {
- client->errorValue = contextTag;
- return __glXBadContext;
- }
- from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- /*
- ** Send enough requests until the whole array is sent.
- */
- requestNumber = 1;
- data = cl->largeCmdBuf;
- while (dataLen > 0) {
- amount = dataLen;
- if (amount > maxSize) {
- amount = maxSize;
- }
-
- for (s=from_screen; s<=to_screen; s++) {
-
- Display *dpy = GetBackEndDisplay(cl,s);
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
-
- LockDisplay(dpy);
- GetReq(GLXRenderLarge,req);
- req->reqType = dmxScreen->glxMajorOpcode;
- req->glxCode = X_GLXRenderLarge;
- req->contextTag = GetCurrentBackEndTag(cl,contextTag,s);
- req->length += (amount + 3) >> 2;
- req->requestNumber = requestNumber++;
- req->requestTotal = totalRequests;
- req->dataBytes = amount;
- Data(dpy, ((const char*)data), amount);
- dataLen -= amount;
- data = ((GLbyte *) data) + amount;
- UnlockDisplay(dpy);
- SyncHandle();
- }
- }
-
- return Success;
-}
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#ifdef HAVE_DMX_CONFIG_H
+#include <dmx-config.h>
+#endif
+
+#include "dmx.h"
+#include "dmxwindow.h"
+#include "dmxpixmap.h"
+#include "dmxfont.h"
+#include "dmxsync.h"
+
+#include "glxserver.h"
+#include <GL/glxtokens.h>
+#include "g_disptab.h"
+#include <pixmapstr.h>
+#include <windowstr.h>
+#include "glxutil.h"
+#include "glxext.h"
+#include "unpack.h"
+
+#include "GL/glxproto.h"
+#include "glxvendor.h"
+#include "glxvisuals.h"
+#include "glxswap.h"
+
+#ifdef PANORAMIX
+#include "panoramiXsrv.h"
+#endif
+
+extern __GLXFBConfig **__glXFBConfigs;
+extern int __glXNumFBConfigs;
+
+extern __GLXFBConfig *glxLookupFBConfig( GLXFBConfigID id );
+extern __GLXFBConfig *glxLookupFBConfigByVID( VisualID vid );
+extern __GLXFBConfig *glxLookupBackEndFBConfig( GLXFBConfigID id, int screen );
+extern int glxIsExtensionSupported( char *ext );
+extern int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc);
+
+#define BE_TO_CLIENT_ERROR(x) \
+ ( (x) >= __glXerrorBase ? \
+ (x) - dmxScreen->glxErrorBase + __glXerrorBase \
+ : (x) )
+
+Display *GetBackEndDisplay( __GLXclientState *cl, int s )
+{
+ if (! cl->be_displays[s] ) {
+ cl->be_displays[s] = XOpenDisplay( DisplayString(dmxScreens[s].beDisplay) );
+ }
+ return cl->be_displays[s];
+}
+
+/*
+** Create a GL context with the given properties.
+*/
+static int CreateContext(__GLXclientState *cl,
+ GLXContextID gcId,
+ VisualID vid, GLXFBConfigID fbconfigId,
+ int screen,
+ GLXContextID shareList,
+ int isDirect )
+{
+ ClientPtr client = cl->client;
+ xGLXCreateContextReq *be_req;
+ xGLXCreateNewContextReq *be_new_req;
+ VisualPtr pVisual;
+ ScreenPtr pScreen;
+ __GLXcontext *glxc, *shareglxc;
+ __GLXvisualConfig *pGlxVisual;
+ __GLXscreenInfo *pGlxScreen;
+ VisualID visual = vid;
+ GLint i;
+ int from_screen = screen;
+ int to_screen = screen;
+ DMXScreenInfo *dmxScreen;
+ VisualID be_vid = 0;
+ GLXFBConfigID be_fbconfigId = 0;
+ int num_be_screens;
+ Display *dpy;
+
+ /*
+ ** Check if screen exists.
+ */
+ if (screen >= screenInfo.numScreens) {
+ client->errorValue = screen;
+ return BadValue;
+ }
+
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ /*
+ ** Find the display list space that we want to share.
+ **
+ */
+ if (shareList == None) {
+ shareglxc = NULL;
+ } else {
+ dixLookupResourceByType((pointer*) &shareglxc, shareList,
+ __glXContextRes, NullClient, DixUnknownAccess);
+ if (!shareglxc) {
+ client->errorValue = shareList;
+ return __glXBadContext;
+ }
+ }
+
+ /*
+ ** Allocate memory for the new context
+ */
+ glxc = calloc(1, sizeof(__GLXcontext));
+ if (!glxc) {
+ return BadAlloc;
+ }
+
+ pScreen = screenInfo.screens[screen];
+ pGlxScreen = &__glXActiveScreens[screen];
+
+ if (fbconfigId != None) {
+ glxc->pFBConfig = glxLookupFBConfig( fbconfigId );
+ if (!glxc->pFBConfig) {
+ client->errorValue = fbconfigId;
+ free( glxc );
+ return BadValue;
+ }
+ visual = glxc->pFBConfig->associatedVisualId;
+ }
+ else {
+ glxc->pFBConfig = NULL;
+ }
+
+ if (visual != None) {
+ /*
+ ** Check if the visual ID is valid for this screen.
+ */
+ pVisual = pScreen->visuals;
+ for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
+ if (pVisual->vid == visual) {
+ break;
+ }
+ }
+ if (i == pScreen->numVisuals) {
+ client->errorValue = visual;
+ free( glxc );
+ return BadValue;
+ }
+
+ pGlxVisual = pGlxScreen->pGlxVisual;
+ for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
+ if (pGlxVisual->vid == visual) {
+ break;
+ }
+ }
+ if (i == pGlxScreen->numVisuals) {
+ /*
+ ** Visual not support on this screen by this OpenGL implementation.
+ */
+ client->errorValue = visual;
+ free( glxc );
+ return BadValue;
+ }
+
+ if ( glxc->pFBConfig == NULL ) {
+ glxc->pFBConfig = glxLookupFBConfigByVID( visual );
+
+ if ( glxc->pFBConfig == NULL ) {
+ /*
+ * visual does not have an FBConfig ???
+ client->errorValue = visual;
+ free( glxc );
+ return BadValue;
+ */
+ }
+ }
+ }
+ else {
+ pVisual = NULL;
+ pGlxVisual = NULL;
+ }
+
+ glxc->pScreen = pScreen;
+ glxc->pGlxScreen = pGlxScreen;
+ glxc->pVisual = pVisual;
+ glxc->pGlxVisual = pGlxVisual;
+
+ /*
+ * allocate memory for back-end servers info
+ */
+ num_be_screens = to_screen - from_screen + 1;
+ glxc->real_ids = (XID *)malloc(sizeof(XID) * num_be_screens);
+ if (!glxc->real_ids) {
+ return BadAlloc;
+ }
+ glxc->real_vids = (XID *)malloc(sizeof(XID) * num_be_screens);
+ if (!glxc->real_vids) {
+ return BadAlloc;
+ }
+
+ for (screen = from_screen; screen <= to_screen; screen++) {
+ int sent = 0;
+ pScreen = screenInfo.screens[screen];
+ pGlxScreen = &__glXActiveScreens[screen];
+ dmxScreen = &dmxScreens[screen];
+
+ if (glxc->pFBConfig) {
+ __GLXFBConfig *beFBConfig = glxLookupBackEndFBConfig( glxc->pFBConfig->id,
+ screen );
+ be_fbconfigId = beFBConfig->id;
+ }
+
+ if (pGlxVisual) {
+
+ be_vid = glxMatchGLXVisualInConfigList( pGlxVisual,
+ dmxScreen->glxVisuals,
+ dmxScreen->numGlxVisuals );
+
+ if (!be_vid) {
+ /* visual is not supported on the back-end server */
+ free( glxc->real_ids );
+ free( glxc->real_vids );
+ free( glxc );
+ return BadValue;
+ }
+ }
+
+ glxc->real_ids[screen-from_screen] = XAllocID(GetBackEndDisplay(cl,screen));
+
+ /* send the create context request to the back-end server */
+ dpy = GetBackEndDisplay(cl,screen);
+ if (glxc->pFBConfig) {
+ /*Since for a certain visual both RGB and COLOR INDEX
+ *can be on then the only parmeter to choose the renderType
+ * should be the class of the colormap since all 4 first
+ * classes does not support RGB mode only COLOR INDEX ,
+ * and so TrueColor and DirectColor does not support COLOR INDEX*/
+ int renderType = glxc->pFBConfig->renderType;
+ if ( pVisual ) {
+ switch ( pVisual->class ){
+ case PseudoColor:
+ case StaticColor:
+ case GrayScale:
+ case StaticGray:
+ renderType = GLX_COLOR_INDEX_TYPE;
+ break;
+ case TrueColor:
+ case DirectColor:
+ default:
+ renderType = GLX_RGBA_TYPE;
+ break;
+ }
+ }
+ if ( __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ LockDisplay(dpy);
+ GetReq(GLXCreateNewContext,be_new_req);
+ be_new_req->reqType = dmxScreen->glxMajorOpcode;
+ be_new_req->glxCode = X_GLXCreateNewContext;
+ be_new_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
+ be_new_req->fbconfig = (unsigned int)be_fbconfigId;
+ be_new_req->screen = DefaultScreen(dpy);
+ be_new_req->renderType = renderType;
+
+ be_new_req->shareList = (shareglxc ? shareglxc->real_ids[screen-from_screen] : 0);
+ be_new_req->isDirect = 0;
+ UnlockDisplay(dpy);
+ glxc->real_vids[screen-from_screen] = be_fbconfigId;
+ sent = 1;
+ }
+ else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
+
+ xGLXCreateContextWithConfigSGIXReq *ext_req;
+ xGLXVendorPrivateReq *vpreq;
+ LockDisplay(dpy);
+ GetReqExtra(GLXVendorPrivate,
+ sz_xGLXCreateContextWithConfigSGIXReq - sz_xGLXVendorPrivateReq,
+ vpreq);
+ ext_req = (xGLXCreateContextWithConfigSGIXReq *)vpreq;
+ ext_req->reqType = dmxScreen->glxMajorOpcode;
+ ext_req->glxCode = X_GLXVendorPrivate;
+ ext_req->vendorCode = X_GLXvop_CreateContextWithConfigSGIX;
+ ext_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
+ ext_req->fbconfig = (unsigned int)be_fbconfigId;
+ ext_req->screen = DefaultScreen(dpy);
+ ext_req->renderType = renderType;
+ ext_req->shareList = (shareglxc ? shareglxc->real_ids[screen-from_screen] : 0);
+ ext_req->isDirect = 0;
+ UnlockDisplay(dpy);
+ glxc->real_vids[screen-from_screen] = be_fbconfigId;
+ sent = 1;
+ }
+ }
+
+ if (!sent) {
+ LockDisplay(dpy);
+ GetReq(GLXCreateContext,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXCreateContext;
+ be_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
+ be_req->visual = (unsigned int)be_vid;
+ be_req->screen = DefaultScreen(dpy);
+ be_req->shareList = (shareglxc ? shareglxc->real_ids[screen-from_screen] : 0);
+ be_req->isDirect = 0;
+ UnlockDisplay(dpy);
+ glxc->real_vids[screen-from_screen] = be_vid;
+ }
+ SyncHandle();
+
+ }
+
+ /*
+ ** Register this context as a resource.
+ */
+ if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) {
+ free( glxc->real_ids );
+ free( glxc->real_vids );
+ free( glxc );
+ client->errorValue = gcId;
+ return BadAlloc;
+ }
+
+ /*
+ ** Finally, now that everything is working, setup the rest of the
+ ** context.
+ */
+ glxc->id = gcId;
+ glxc->share_id = shareList;
+ glxc->idExists = GL_TRUE;
+ glxc->isCurrent = GL_FALSE;
+
+ return Success;
+}
+
+int __glXCreateContext(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
+
+ return( CreateContext(cl, req->context,req->visual, None,
+ req->screen, req->shareList, req->isDirect) );
+
+}
+
+int __glXCreateNewContext(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
+
+ return( CreateContext(cl, req->context,None, req->fbconfig,
+ req->screen, req->shareList, req->isDirect) );
+
+}
+
+int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXCreateContextWithConfigSGIXReq *req = (xGLXCreateContextWithConfigSGIXReq *) pc;
+
+ return( CreateContext(cl, req->context, None, req->fbconfig,
+ req->screen, req->shareList, req->isDirect) );
+
+}
+
+int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXQueryMaxSwapBarriersSGIXReq *req =
+ (xGLXQueryMaxSwapBarriersSGIXReq *)pc;
+ xGLXQueryMaxSwapBarriersSGIXReply reply;
+
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.length = 0;
+ reply.max = QueryMaxSwapBarriersSGIX(req->screen);
+
+ if (client->swapped) {
+ __glXSwapQueryMaxSwapBarriersSGIXReply(client, &reply);
+ } else {
+ WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply,
+ (char *)&reply);
+ }
+
+ return Success;
+}
+
+int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *)pc;
+ DrawablePtr pDraw;
+ __GLXpixmap *pGlxPixmap = NULL;
+ __glXWindow *pGlxWindow = NULL;
+ int rc;
+
+ rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixGetAttrAccess);
+ if (rc != Success) {
+ dixLookupResourceByType((pointer*) &pGlxPixmap, req->drawable,
+ __glXPixmapRes, NullClient, DixUnknownAccess);
+ if (pGlxPixmap) pDraw = pGlxPixmap->pDraw;
+ }
+
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ dixLookupResourceByType((pointer*) &pGlxWindow, req->drawable,
+ __glXWindowRes, NullClient, DixUnknownAccess);
+ if (pGlxWindow) pDraw = pGlxWindow->pDraw;
+ }
+
+ if (!pDraw) {
+ client->errorValue = req->drawable;
+ return __glXBadDrawable;
+ }
+
+ return BindSwapBarrierSGIX(pDraw, req->barrier);
+}
+
+int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXJoinSwapGroupSGIXReq *req = (xGLXJoinSwapGroupSGIXReq *)pc;
+ DrawablePtr pDraw, pMember = NULL;
+ __GLXpixmap *pGlxPixmap = NULL;
+ __glXWindow *pGlxWindow = NULL;
+ int rc;
+
+ rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixManageAccess);
+ if (rc != Success) {
+ dixLookupResourceByType((pointer*) &pGlxPixmap, req->drawable,
+ __glXPixmapRes, NullClient, DixUnknownAccess);
+ if (pGlxPixmap) pDraw = pGlxPixmap->pDraw;
+ }
+
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ dixLookupResourceByType((pointer*) &pGlxWindow, req->drawable,
+ __glXWindowRes, NullClient, DixUnknownAccess);
+ if (pGlxWindow) pDraw = pGlxWindow->pDraw;
+ }
+
+ if (!pDraw) {
+ client->errorValue = req->drawable;
+ return __glXBadDrawable;
+ }
+
+ if (req->member != None) {
+ rc = dixLookupDrawable(&pMember, req->member, client, 0,
+ DixGetAttrAccess);
+ if (rc != Success) {
+ dixLookupResourceByType((pointer*) &pGlxPixmap, req->member,
+ __glXPixmapRes, NullClient,
+ DixUnknownAccess);
+ if (pGlxPixmap) pMember = pGlxPixmap->pDraw;
+ }
+
+ if (!pMember && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ dixLookupResourceByType((pointer*) &pGlxWindow, req->member,
+ __glXWindowRes, NullClient,
+ DixUnknownAccess);
+ if (pGlxWindow) pMember = pGlxWindow->pDraw;
+ }
+
+ if (!pMember) {
+ client->errorValue = req->member;
+ return __glXBadDrawable;
+ }
+ }
+
+ return JoinSwapGroupSGIX(pDraw, pMember);
+}
+
+
+/*
+** Destroy a GL context as an X resource.
+*/
+int __glXDestroyContext(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
+ xGLXDestroyContextReq *be_req;
+ GLXContextID gcId = req->context;
+ __GLXcontext *glxc;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
+
+ dixLookupResourceByType((pointer*) &glxc, gcId, __glXContextRes,
+ NullClient, DixUnknownAccess);
+ if (glxc) {
+ /*
+ ** Just free the resource; don't actually destroy the context,
+ ** because it might be in use. The
+ ** destroy method will be called by the resource destruction routine
+ ** if necessary.
+ */
+ FreeResourceByType(gcId, __glXContextRes, FALSE);
+
+ from_screen = to_screen = glxc->pScreen->myNum;
+
+ } else {
+ client->errorValue = gcId;
+ return __glXBadContext;
+ }
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ /*
+ * send DestroyContext request to all back-end servers
+ */
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+
+ LockDisplay(dpy);
+ GetReq(GLXDestroyContext,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXDestroyContext;
+ be_req->context = glxc->real_ids[s-from_screen];
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+
+ return Success;
+}
+
+/*****************************************************************************/
+
+/*
+** For each client, the server keeps a table of all the contexts that are
+** current for that client (each thread of a client may have its own current
+** context). These routines add, change, and lookup contexts in the table.
+*/
+
+/*
+** Add a current context, and return the tag that will be used to refer to it.
+*/
+static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc, DrawablePtr pDraw)
+{
+ int i;
+ int num = cl->numCurrentContexts;
+ __GLXcontext **table = cl->currentContexts;
+
+ if (!glxc) return -1;
+
+ /*
+ ** Try to find an empty slot and use it.
+ */
+ for (i=0; i < num; i++) {
+ if (!table[i]) {
+ table[i] = glxc;
+ return i+1;
+ }
+ }
+ /*
+ ** Didn't find a free slot, so we'll have to grow the table.
+ */
+ if (!num) {
+ table = (__GLXcontext **) malloc(sizeof(__GLXcontext *));
+ cl->currentDrawables = (DrawablePtr *) malloc(sizeof(DrawablePtr));
+ cl->be_currentCTag = (GLXContextTag *) malloc(screenInfo.numScreens *sizeof(GLXContextTag));
+ } else {
+ table = (__GLXcontext **) realloc(table,
+ (num+1)*sizeof(__GLXcontext *));
+ cl->currentDrawables = (DrawablePtr *) realloc(
+ cl->currentDrawables ,
+ (num+1)*sizeof(DrawablePtr));
+ cl->be_currentCTag = (GLXContextTag *) realloc(cl->be_currentCTag,
+ (num+1)*screenInfo.numScreens*sizeof(GLXContextTag));
+ }
+ table[num] = glxc;
+ cl->currentDrawables[num] = pDraw;
+ cl->currentContexts = table;
+ cl->numCurrentContexts++;
+
+ memset(cl->be_currentCTag + num*screenInfo.numScreens, 0,
+ screenInfo.numScreens * sizeof(GLXContextTag));
+
+ return num+1;
+}
+
+/*
+** Given a tag, change the current context for the corresponding entry.
+*/
+static void ChangeCurrentContext(__GLXclientState *cl, __GLXcontext *glxc,
+ GLXContextTag tag)
+{
+ __GLXcontext **table = cl->currentContexts;
+ table[tag-1] = glxc;
+}
+
+/*
+** Given a tag, and back-end screen number, retrives the current back-end
+** tag.
+*/
+int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s)
+{
+ if (tag >0) {
+ return( cl->be_currentCTag[ (tag-1)*screenInfo.numScreens + s ] );
+ }
+ else {
+ return 0;
+ }
+}
+
+/*
+** Given a tag, and back-end screen number, sets the current back-end
+** tag.
+*/
+static void SetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s, GLXContextTag be_tag)
+{
+ if (tag >0) {
+ cl->be_currentCTag[ (tag-1)*screenInfo.numScreens + s ] = be_tag;
+ }
+}
+
+/*
+** For this implementation we have chosen to simply use the index of the
+** context's entry in the table as the context tag. A tag must be greater
+** than 0.
+*/
+__GLXcontext *__glXLookupContextByTag(__GLXclientState *cl, GLXContextTag tag)
+{
+ int num = cl->numCurrentContexts;
+
+ if (tag < 1 || tag > num) {
+ return 0;
+ } else {
+ return cl->currentContexts[tag-1];
+ }
+}
+
+DrawablePtr __glXLookupDrawableByTag(__GLXclientState *cl, GLXContextTag tag)
+{
+ int num = cl->numCurrentContexts;
+
+ if (tag < 1 || tag > num) {
+ return 0;
+ } else {
+ return cl->currentDrawables[tag-1];
+ }
+}
+
+/*****************************************************************************/
+
+static void StopUsingContext(__GLXcontext *glxc)
+{
+ if (glxc) {
+ if (glxc == __glXLastContext) {
+ /* Tell server GL library */
+ __glXLastContext = 0;
+ }
+ glxc->isCurrent = GL_FALSE;
+ if (!glxc->idExists) {
+ __glXFreeContext(glxc);
+ }
+ }
+}
+
+static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc)
+{
+ glxc->isCurrent = GL_TRUE;
+}
+
+/*****************************************************************************/
+/*
+** Make an OpenGL context and drawable current.
+*/
+static int MakeCurrent(__GLXclientState *cl,
+ GLXDrawable drawable,
+ GLXDrawable readdrawable,
+ GLXContextID context,
+ GLXContextTag oldContextTag)
+{
+ ClientPtr client = cl->client;
+ DrawablePtr pDraw = NULL;
+ DrawablePtr pReadDraw = NULL;
+ xGLXMakeCurrentReadSGIReply new_reply;
+ xGLXMakeCurrentReq *be_req;
+ xGLXMakeCurrentReply be_reply;
+ xGLXMakeContextCurrentReq *be_new_req;
+ xGLXMakeContextCurrentReply be_new_reply;
+ GLXDrawable drawId = drawable;
+ GLXDrawable readId = readdrawable;
+ GLXContextID contextId = context;
+ __GLXpixmap *pGlxPixmap = 0;
+ __GLXpixmap *pReadGlxPixmap = 0;
+ __GLXcontext *glxc, *prevglxc;
+ GLXContextTag tag = oldContextTag;
+ WindowPtr pWin = NULL;
+ WindowPtr pReadWin = NULL;
+ __glXWindow *pGlxWindow = NULL;
+ __glXWindow *pGlxReadWindow = NULL;
+ __glXPbuffer *pGlxPbuffer = NULL;
+ __glXPbuffer *pGlxReadPbuffer = NULL;
+#ifdef PANORAMIX
+ PanoramiXRes *pXinDraw = NULL;
+ PanoramiXRes *pXinReadDraw = NULL;
+#endif
+ int from_screen = 0;
+ int to_screen = 0;
+ int s, rc;
+
+ /*
+ ** If one is None and the other isn't, it's a bad match.
+ */
+ if ((drawId == None && contextId != None) ||
+ (drawId != None && contextId == None)) {
+ return BadMatch;
+ }
+
+ /*
+ ** Lookup old context. If we have one, it must be in a usable state.
+ */
+ if (tag != 0) {
+ prevglxc = __glXLookupContextByTag(cl, tag);
+ if (!prevglxc) {
+ /*
+ ** Tag for previous context is invalid.
+ */
+ return __glXBadContextTag;
+ }
+ } else {
+ prevglxc = 0;
+ }
+
+ /*
+ ** Lookup new context. It must not be current for someone else.
+ */
+ if (contextId != None) {
+ dixLookupResourceByType((pointer*) &glxc, contextId, __glXContextRes,
+ NullClient, DixUnknownAccess);
+ if (!glxc) {
+ client->errorValue = contextId;
+ return __glXBadContext;
+ }
+ if ((glxc != prevglxc) && glxc->isCurrent) {
+ /* Context is current to somebody else */
+ return BadAccess;
+ }
+ } else {
+ /* Switching to no context. Ignore new drawable. */
+ glxc = 0;
+ }
+
+ if (drawId != None) {
+ rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
+ if (rc == Success) {
+ if (pDraw->type == DRAWABLE_WINDOW) {
+ /*
+ ** Drawable is an X Window.
+ */
+ VisualID vid;
+ pWin = (WindowPtr)pDraw;
+ vid = wVisual(pWin);
+
+ new_reply.writeVid = (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
+ new_reply.writeType = GLX_WINDOW_TYPE;
+
+ /*
+ ** Check if window and context are similar.
+ */
+ if ((vid != glxc->pVisual->vid) ||
+ (pWin->drawable.pScreen != glxc->pScreen)) {
+ client->errorValue = drawId;
+ return BadMatch;
+ }
+
+ from_screen = to_screen = pWin->drawable.pScreen->myNum;
+
+ } else {
+ /*
+ ** An X Pixmap is not allowed as a parameter (a GLX Pixmap
+ ** is, but it must first be created with glxCreateGLXPixmap).
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
+
+ if (!pDraw) {
+ dixLookupResourceByType((pointer*) &pGlxPixmap, drawId,
+ __glXPixmapRes, NullClient,
+ DixUnknownAccess);
+ if (pGlxPixmap) {
+ /*
+ ** Check if pixmap and context are similar.
+ */
+ if (pGlxPixmap->pScreen != glxc->pScreen ||
+ pGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
+ client->errorValue = drawId;
+ return BadMatch;
+ }
+ pDraw = pGlxPixmap->pDraw;
+
+ new_reply.writeVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
+ pGlxPixmap->pGlxVisual->vid);
+
+ new_reply.writeType = GLX_PIXMAP_TYPE;
+
+ from_screen = to_screen = pGlxPixmap->pScreen->myNum;
+
+ }
+ }
+
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ dixLookupResourceByType((pointer*) &pGlxWindow, drawId,
+ __glXWindowRes, NullClient,
+ DixUnknownAccess);
+ if (pGlxWindow) {
+ /*
+ ** Drawable is a GLXWindow.
+ **
+ ** Check if GLX window and context are similar.
+ */
+ if (pGlxWindow->pScreen != glxc->pScreen ||
+ pGlxWindow->pGlxFBConfig != glxc->pFBConfig) {
+ client->errorValue = drawId;
+ return BadMatch;
+ }
+
+ pDraw = pGlxWindow->pDraw;
+ new_reply.writeVid = pGlxWindow->pGlxFBConfig->id;
+ new_reply.writeType = GLX_GLXWINDOW_TYPE;
+ }
+
+ }
+
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ dixLookupResourceByType((pointer*) &pGlxPbuffer, drawId,
+ __glXPbufferRes, NullClient,
+ DixUnknownAccess);
+ if (pGlxPbuffer) {
+ if (pGlxPbuffer->pScreen != glxc->pScreen ||
+ pGlxPbuffer->pFBConfig != glxc->pFBConfig) {
+ client->errorValue = drawId;
+ return BadMatch;
+ }
+
+ pDraw = (DrawablePtr)pGlxPbuffer;
+ new_reply.writeVid = pGlxPbuffer->pFBConfig->id;
+ new_reply.writeType = GLX_PBUFFER_TYPE;
+ }
+ }
+
+ if (!pDraw) {
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ } else {
+ pDraw = 0;
+ }
+
+ if (readId != None && readId != drawId ) {
+ rc = dixLookupDrawable(&pReadDraw, readId, client, 0, DixReadAccess);
+ if (rc == Success) {
+ if (pReadDraw->type == DRAWABLE_WINDOW) {
+ /*
+ ** Drawable is an X Window.
+ */
+ VisualID vid;
+ pReadWin = (WindowPtr)pDraw;
+ vid = wVisual(pReadWin);
+
+ new_reply.readVid = (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
+ new_reply.readType = GLX_WINDOW_TYPE;
+
+ /*
+ ** Check if window and context are similar.
+ */
+ if ((vid != glxc->pVisual->vid) ||
+ (pReadWin->drawable.pScreen != glxc->pScreen)) {
+ client->errorValue = readId;
+ return BadMatch;
+ }
+
+ } else {
+
+ /*
+ ** An X Pixmap is not allowed as a parameter (a GLX Pixmap
+ ** is, but it must first be created with glxCreateGLXPixmap).
+ */
+ client->errorValue = readId;
+ return __glXBadDrawable;
+ }
+ }
+
+ if (!pReadDraw) {
+ dixLookupResourceByType((pointer*) &pReadGlxPixmap, readId,
+ __glXPixmapRes, NullClient,
+ DixUnknownAccess);
+ if (pReadGlxPixmap) {
+ /*
+ ** Check if pixmap and context are similar.
+ */
+ if (pReadGlxPixmap->pScreen != glxc->pScreen ||
+ pReadGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
+ client->errorValue = readId;
+ return BadMatch;
+ }
+ pReadDraw = pReadGlxPixmap->pDraw;
+
+ new_reply.readVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
+ pReadGlxPixmap->pGlxVisual->vid );
+ new_reply.readType = GLX_PIXMAP_TYPE;
+
+ }
+ }
+
+ if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ dixLookupResourceByType((pointer*) &pGlxReadWindow, readId,
+ __glXWindowRes, NullClient,
+ DixUnknownAccess);
+ if (pGlxReadWindow) {
+ /*
+ ** Drawable is a GLXWindow.
+ **
+ ** Check if GLX window and context are similar.
+ */
+ if (pGlxReadWindow->pScreen != glxc->pScreen ||
+ pGlxReadWindow->pGlxFBConfig != glxc->pFBConfig) {
+ client->errorValue = readId;
+ return BadMatch;
+ }
+
+ pReadDraw = pGlxReadWindow->pDraw;
+ new_reply.readVid = pGlxReadWindow->pGlxFBConfig->id;
+ new_reply.readType = GLX_GLXWINDOW_TYPE;
+ }
+ }
+
+ if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ dixLookupResourceByType((pointer*) &pGlxReadPbuffer, readId,
+ __glXPbufferRes, NullClient,
+ DixUnknownAccess);
+ if (pGlxReadPbuffer) {
+ if (pGlxReadPbuffer->pScreen != glxc->pScreen ||
+ pGlxReadPbuffer->pFBConfig != glxc->pFBConfig) {
+ client->errorValue = drawId;
+ return BadMatch;
+ }
+
+ pReadDraw = (DrawablePtr)pGlxReadPbuffer;
+ new_reply.readVid = pGlxReadPbuffer->pFBConfig->id;
+ new_reply.readType = GLX_PBUFFER_TYPE;
+ }
+ }
+
+ if (!pReadDraw) {
+ /*
+ ** Drawable is neither a Window nor a GLXPixmap.
+ */
+ client->errorValue = readId;
+ return __glXBadDrawable;
+ }
+
+ } else {
+ pReadDraw = pDraw;
+ pReadGlxPixmap = pGlxPixmap;
+ pReadWin = pWin;
+ new_reply.readVid = new_reply.writeVid;
+ new_reply.readType = new_reply.writeType;
+ }
+
+ if (prevglxc) {
+
+ if (prevglxc->pGlxPixmap) {
+ /*
+ ** The previous drawable was a glx pixmap, release it.
+ */
+ prevglxc->pGlxPixmap->refcnt--;
+ __glXFreeGLXPixmap( prevglxc->pGlxPixmap );
+ prevglxc->pGlxPixmap = 0;
+ }
+
+ if (prevglxc->pGlxReadPixmap) {
+ /*
+ ** The previous drawable was a glx pixmap, release it.
+ */
+ prevglxc->pGlxReadPixmap->refcnt--;
+ __glXFreeGLXPixmap( prevglxc->pGlxReadPixmap );
+ prevglxc->pGlxReadPixmap = 0;
+ }
+
+ if (prevglxc->pGlxWindow) {
+ /*
+ ** The previous drawable was a glx window, release it.
+ */
+ prevglxc->pGlxWindow->refcnt--;
+ __glXFreeGLXWindow( prevglxc->pGlxWindow );
+ prevglxc->pGlxWindow = 0;
+ }
+
+ if (prevglxc->pGlxReadWindow) {
+ /*
+ ** The previous drawable was a glx window, release it.
+ */
+ prevglxc->pGlxReadWindow->refcnt--;
+ __glXFreeGLXWindow( prevglxc->pGlxReadWindow );
+ prevglxc->pGlxReadWindow = 0;
+ }
+
+ if (prevglxc->pGlxPbuffer) {
+ /*
+ ** The previous drawable was a glx Pbuffer, release it.
+ */
+ prevglxc->pGlxPbuffer->refcnt--;
+ __glXFreeGLXPbuffer( prevglxc->pGlxPbuffer );
+ prevglxc->pGlxPbuffer = 0;
+ }
+
+ if (prevglxc->pGlxReadPbuffer) {
+ /*
+ ** The previous drawable was a glx Pbuffer, release it.
+ */
+ prevglxc->pGlxReadPbuffer->refcnt--;
+ __glXFreeGLXPbuffer( prevglxc->pGlxReadPbuffer );
+ prevglxc->pGlxReadPbuffer = 0;
+ }
+
+ ChangeCurrentContext(cl, glxc, tag);
+ ChangeCurrentContext(cl, glxc, tag);
+ StopUsingContext(prevglxc);
+ } else {
+ tag = AddCurrentContext(cl, glxc, pDraw);
+ }
+ if (glxc) {
+
+ glxc->pGlxPixmap = pGlxPixmap;
+ glxc->pGlxReadPixmap = pReadGlxPixmap;
+ glxc->pGlxWindow = pGlxWindow;
+ glxc->pGlxReadWindow = pGlxReadWindow;
+ glxc->pGlxPbuffer = pGlxPbuffer;
+ glxc->pGlxReadPbuffer = pGlxReadPbuffer;
+
+ if (pGlxPixmap) {
+ pGlxPixmap->refcnt++;
+ }
+
+ if (pReadGlxPixmap) {
+ pReadGlxPixmap->refcnt++;
+ }
+
+ if (pGlxWindow) {
+ pGlxWindow->refcnt++;
+ }
+
+ if (pGlxReadWindow) {
+ pGlxReadWindow->refcnt++;
+ }
+
+ if (pGlxPbuffer) {
+ pGlxPbuffer->refcnt++;
+ }
+
+ if (pGlxReadPbuffer) {
+ pGlxReadPbuffer->refcnt++;
+ }
+
+ StartUsingContext(cl, glxc);
+ new_reply.contextTag = tag;
+ } else {
+ new_reply.contextTag = 0;
+ }
+ new_reply.length = 0;
+ new_reply.type = X_Reply;
+ new_reply.sequenceNumber = client->sequence;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+
+ if (pDraw && new_reply.writeType != GLX_PBUFFER_TYPE) {
+ dixLookupResourceByClass((pointer*) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
+ }
+
+ if (pReadDraw && pReadDraw != pDraw &&
+ new_reply.readType != GLX_PBUFFER_TYPE) {
+ dixLookupResourceByClass((pointer*) &pXinReadDraw,
+ pReadDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
+ }
+ else {
+ pXinReadDraw = pXinDraw;
+ }
+ }
+#endif
+
+
+ /* send the MakeCurrent request to all required
+ * back-end servers.
+ */
+ for (s = from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+ unsigned int be_draw = None;
+ unsigned int be_read_draw = None;
+
+ if (pGlxPixmap) {
+ be_draw = pGlxPixmap->be_xids[s];
+ }
+ else if (pGlxPbuffer) {
+ be_draw = pGlxPbuffer->be_xids[s];
+ }
+#ifdef PANORAMIX
+ else if (pXinDraw) {
+ dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess);
+ }
+#endif
+ else if (pGlxWindow) {
+ pWin = (WindowPtr)pGlxWindow->pDraw;
+ }
+
+ if (pWin && be_draw == None) {
+ be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
+ if (!be_draw) {
+ /* it might be that the window did not created yet on the */
+ /* back-end server (lazy window creation option), force */
+ /* creation of the window */
+ dmxCreateAndRealizeWindow( pWin, TRUE );
+ be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
+ }
+ }
+
+ /*
+ * Before sending the MakeCurrent request - sync the
+ * X11 connection to the back-end servers to make sure
+ * that drawable is already created
+ */
+ dmxSync( dmxScreen, 1 );
+
+ if (drawId == readId) {
+ LockDisplay(dpy);
+ GetReq(GLXMakeCurrent, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXMakeCurrent;
+ be_req->drawable = be_draw;
+ be_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
+ be_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
+ if (!_XReply(dpy, (xReply *) &be_reply, 0, False)) {
+
+ /* The make current failed */
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ SetCurrentBackEndTag( cl, tag, s, be_reply.contextTag );
+ }
+ else {
+
+ if (pReadGlxPixmap) {
+ be_read_draw = pReadGlxPixmap->be_xids[s];
+ }
+ else if (pGlxReadPbuffer) {
+ be_read_draw = pGlxReadPbuffer->be_xids[s];
+ }
+#ifdef PANORAMIX
+ else if (pXinReadDraw) {
+ dixLookupWindow(&pReadWin, pXinReadDraw->info[s].id, client,
+ DixReadAccess);
+ }
+#endif
+ else if (pGlxReadWindow) {
+ pReadWin = (WindowPtr)pGlxReadWindow->pDraw;
+ }
+
+ if (pReadWin && be_read_draw == None) {
+ be_read_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pReadWin))->window;
+ if (!be_read_draw) {
+ /* it might be that the window did not created yet on the */
+ /* back-end server (lazy window creation option), force */
+ /* creation of the window */
+ dmxCreateAndRealizeWindow( pReadWin, TRUE );
+ be_read_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pReadWin))->window;
+ dmxSync( dmxScreen, 1 );
+ }
+ }
+
+ if ( __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ LockDisplay(dpy);
+ GetReq(GLXMakeContextCurrent, be_new_req);
+ be_new_req->reqType = dmxScreen->glxMajorOpcode;
+ be_new_req->glxCode = X_GLXMakeContextCurrent;
+ be_new_req->drawable = be_draw;
+ be_new_req->readdrawable = be_read_draw;
+ be_new_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
+ be_new_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
+ if (!_XReply(dpy, (xReply *) &be_new_reply, 0, False)) {
+
+ /* The make current failed */
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ SetCurrentBackEndTag( cl, tag, s, be_new_reply.contextTag );
+ }
+ else if (glxIsExtensionSupported("GLX_SGI_make_current_read")) {
+ xGLXMakeCurrentReadSGIReq *ext_req;
+ xGLXVendorPrivateWithReplyReq *vpreq;
+ xGLXMakeCurrentReadSGIReply ext_reply;
+
+ LockDisplay(dpy);
+ GetReqExtra(GLXVendorPrivateWithReply,
+ sz_xGLXMakeCurrentReadSGIReq - sz_xGLXVendorPrivateWithReplyReq,
+ vpreq);
+ ext_req = (xGLXMakeCurrentReadSGIReq *)vpreq;
+ ext_req->reqType = dmxScreen->glxMajorOpcode;
+ ext_req->glxCode = X_GLXVendorPrivateWithReply;
+ ext_req->vendorCode = X_GLXvop_MakeCurrentReadSGI;
+ ext_req->drawable = be_draw;
+ ext_req->readable = be_read_draw;
+ ext_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
+ ext_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
+ if (!_XReply(dpy, (xReply *) &ext_reply, 0, False)) {
+
+ /* The make current failed */
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ SetCurrentBackEndTag( cl, tag, s, ext_reply.contextTag );
+
+ }
+ else {
+ return BadMatch;
+ }
+ }
+
+ XFlush( dpy );
+ }
+
+ if (client->swapped) {
+ __glXSwapMakeCurrentReply(client, &new_reply);
+ } else {
+ WriteToClient(client, sz_xGLXMakeContextCurrentReply, (char *)&new_reply);
+ }
+
+ return Success;
+}
+
+int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
+
+ return( MakeCurrent(cl, req->drawable, req->drawable,
+ req->context, req->oldContextTag ) );
+}
+
+int __glXMakeContextCurrent(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
+
+ return( MakeCurrent(cl, req->drawable, req->readdrawable,
+ req->context, req->oldContextTag ) );
+}
+
+int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc;
+
+ return( MakeCurrent(cl, req->drawable, req->readable,
+ req->context, req->oldContextTag ) );
+}
+
+int __glXIsDirect(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
+ xGLXIsDirectReply reply;
+ __GLXcontext *glxc;
+
+ /*
+ ** Find the GL context.
+ */
+ dixLookupResourceByType((pointer*) &glxc, req->context, __glXContextRes,
+ NullClient, DixUnknownAccess);
+ if (!glxc) {
+ client->errorValue = req->context;
+ return __glXBadContext;
+ }
+
+ reply.isDirect = 0;
+ reply.length = 0;
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+
+ if (client->swapped) {
+ __glXSwapIsDirectReply(client, &reply);
+ } else {
+ WriteToClient(client, sz_xGLXIsDirectReply, (char *)&reply);
+ }
+
+ return Success;
+}
+
+int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+/* xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; */
+ xGLXQueryVersionReply reply;
+
+ /*
+ ** Server should take into consideration the version numbers sent by the
+ ** client if it wants to work with older clients; however, in this
+ ** implementation the server just returns its version number.
+ */
+ reply.majorVersion = __glXVersionMajor;
+ reply.minorVersion = __glXVersionMinor;
+ reply.length = 0;
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+
+ if (client->swapped) {
+ __glXSwapQueryVersionReply(client, &reply);
+ } else {
+ WriteToClient(client, sz_xGLXQueryVersionReply, (char *)&reply);
+ }
+ return Success;
+}
+
+int __glXWaitGL(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXWaitGLReq *req = (xGLXWaitGLReq *)pc;
+ xGLXWaitGLReq *be_req = (xGLXWaitGLReq *)pc;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
+ __GLXcontext *glxc = NULL;
+
+ if (req->contextTag != 0) {
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (glxc) {
+ from_screen = to_screen = glxc->pScreen->myNum;
+ }
+ }
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+
+ LockDisplay(dpy);
+ GetReq(GLXWaitGL,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXWaitGL;
+ be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ XSync(dpy, False);
+ }
+
+ return Success;
+}
+
+int __glXWaitX(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXWaitXReq *req = (xGLXWaitXReq *)pc;
+ xGLXWaitXReq *be_req;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
+ __GLXcontext *glxc = NULL;
+
+ if (req->contextTag != 0) {
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (glxc) {
+ from_screen = to_screen = glxc->pScreen->myNum;
+ }
+ }
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+
+ dmxSync( dmxScreen, 1 );
+
+ LockDisplay(dpy);
+ GetReq(GLXWaitX,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXWaitX;
+ be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ XFlush( dpy );
+ }
+
+ return Success;
+}
+
+int __glXCopyContext(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXCopyContextReq *be_req;
+ xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc;
+ GLXContextID source = req->source;
+ GLXContextID dest = req->dest;
+ GLXContextTag tag = req->contextTag;
+ unsigned long mask = req->mask;
+ __GLXcontext *src, *dst;
+ int s;
+ int from_screen = 0;
+ int to_screen = 0;
+
+ /*
+ ** Check that each context exists.
+ */
+ dixLookupResourceByType((pointer*) &src, source, __glXContextRes,
+ NullClient, DixUnknownAccess);
+ if (!src) {
+ client->errorValue = source;
+ return __glXBadContext;
+ }
+ dixLookupResourceByType((pointer*) &dst, dest, __glXContextRes,
+ NullClient, DixUnknownAccess);
+ if (!dst) {
+ client->errorValue = dest;
+ return __glXBadContext;
+ }
+
+ /*
+ ** They must be in the same address space, and same screen.
+ */
+ if (src->pGlxScreen != dst->pGlxScreen) {
+ client->errorValue = source;
+ return BadMatch;
+ }
+
+ /*
+ ** The destination context must not be current for any client.
+ */
+ if (dst->isCurrent) {
+ client->errorValue = dest;
+ return BadAccess;
+ }
+
+ if (tag) {
+ __GLXcontext *tagcx = __glXLookupContextByTag(cl, tag);
+
+ if (!tagcx) {
+ return __glXBadContextTag;
+ }
+ if (tagcx != src) {
+ /*
+ ** This would be caused by a faulty implementation of the client
+ ** library.
+ */
+ return BadMatch;
+ }
+ }
+
+ from_screen = to_screen = src->pScreen->myNum;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+
+ LockDisplay(dpy);
+ GetReq(GLXCopyContext,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXCopyContext;
+ be_req->source = (unsigned int)src->real_ids[s-from_screen];
+ be_req->dest = (unsigned int)dst->real_ids[s-from_screen];
+ be_req->mask = mask;
+ be_req->contextTag = (tag ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+
+ return Success;
+}
+
+int __glXGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc;
+ xGLXGetVisualConfigsReply reply;
+ __GLXscreenInfo *pGlxScreen;
+ __GLXvisualConfig *pGlxVisual;
+ CARD32 buf[__GLX_TOTAL_CONFIG];
+ unsigned int screen;
+ int i, p;
+
+ screen = req->screen;
+ if (screen >= screenInfo.numScreens) {
+ /* The client library must send a valid screen number. */
+ client->errorValue = screen;
+ return BadValue;
+ }
+ pGlxScreen = &__glXActiveScreens[screen];
+
+ reply.numVisuals = pGlxScreen->numGLXVisuals;
+ reply.numProps = __GLX_TOTAL_CONFIG;
+ reply.length = (pGlxScreen->numGLXVisuals * __GLX_SIZE_CARD32 *
+ __GLX_TOTAL_CONFIG) >> 2;
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+
+ WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *)&reply);
+
+ for (i=0; i < pGlxScreen->numVisuals; i++) {
+ pGlxVisual = &pGlxScreen->pGlxVisual[i];
+ if (!pGlxScreen->isGLXvis[i] || pGlxVisual->vid == 0) {
+ /* not a usable visual */
+ continue;
+ }
+ p = 0;
+ buf[p++] = pGlxVisual->vid;
+ buf[p++] = pGlxVisual->class;
+ buf[p++] = pGlxVisual->rgba;
+
+ buf[p++] = pGlxVisual->redSize;
+ buf[p++] = pGlxVisual->greenSize;
+ buf[p++] = pGlxVisual->blueSize;
+ buf[p++] = pGlxVisual->alphaSize;
+ buf[p++] = pGlxVisual->accumRedSize;
+ buf[p++] = pGlxVisual->accumGreenSize;
+ buf[p++] = pGlxVisual->accumBlueSize;
+ buf[p++] = pGlxVisual->accumAlphaSize;
+
+ buf[p++] = pGlxVisual->doubleBuffer;
+ buf[p++] = pGlxVisual->stereo;
+
+ buf[p++] = pGlxVisual->bufferSize;
+ buf[p++] = pGlxVisual->depthSize;
+ buf[p++] = pGlxVisual->stencilSize;
+ buf[p++] = pGlxVisual->auxBuffers;
+ buf[p++] = pGlxVisual->level;
+ /*
+ ** Add token/value pairs for extensions.
+ */
+ buf[p++] = GLX_VISUAL_CAVEAT_EXT;
+ buf[p++] = pGlxVisual->visualRating;
+ buf[p++] = GLX_TRANSPARENT_TYPE_EXT;
+ buf[p++] = pGlxVisual->transparentPixel;
+ buf[p++] = GLX_TRANSPARENT_RED_VALUE_EXT;
+ buf[p++] = pGlxVisual->transparentRed;
+ buf[p++] = GLX_TRANSPARENT_GREEN_VALUE_EXT;
+ buf[p++] = pGlxVisual->transparentGreen;
+ buf[p++] = GLX_TRANSPARENT_BLUE_VALUE_EXT;
+ buf[p++] = pGlxVisual->transparentBlue;
+ buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE_EXT;
+ buf[p++] = pGlxVisual->transparentAlpha;
+ buf[p++] = GLX_TRANSPARENT_INDEX_VALUE_EXT;
+ buf[p++] = pGlxVisual->transparentIndex;
+ buf[p++] = GLX_SAMPLES_SGIS;
+ buf[p++] = pGlxVisual->multiSampleSize;
+ buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
+ buf[p++] = pGlxVisual->nMultiSampleBuffers;
+ buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
+ buf[p++] = pGlxVisual->visualSelectGroup;
+
+ WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG,
+ (char *)buf);
+ }
+ return Success;
+}
+
+/*
+** Create a GLX Pixmap from an X Pixmap.
+*/
+static int CreateGLXPixmap(__GLXclientState *cl,
+ VisualID visual, GLXFBConfigID fbconfigId,
+ int screenNum, XID pixmapId, XID glxpixmapId )
+{
+ ClientPtr client = cl->client;
+ xGLXCreateGLXPixmapReq *be_req;
+ xGLXCreatePixmapReq *be_new_req;
+ DrawablePtr pDraw;
+ ScreenPtr pScreen;
+ VisualPtr pVisual;
+ __GLXpixmap *pGlxPixmap;
+ __GLXscreenInfo *pGlxScreen;
+ __GLXvisualConfig *pGlxVisual;
+ __GLXFBConfig *pFBConfig;
+ int i, s, rc;
+ int from_screen, to_screen;
+#ifdef PANORAMIX
+ PanoramiXRes *pXinDraw = NULL;
+#endif
+
+ rc = dixLookupDrawable(&pDraw, pixmapId, client, M_DRAWABLE_PIXMAP,
+ DixAddAccess);
+ if (rc != Success)
+ return rc;
+
+ /*
+ ** Check if screen of visual matches screen of pixmap.
+ */
+ pScreen = pDraw->pScreen;
+ if (screenNum != pScreen->myNum) {
+ return BadMatch;
+ }
+
+ if (fbconfigId == 0 && visual == 0) {
+ return BadValue;
+ }
+
+ if (fbconfigId != None) {
+ pFBConfig = glxLookupFBConfig( fbconfigId );
+ if (!pFBConfig) {
+ client->errorValue = fbconfigId;
+ return BadValue;
+ }
+ visual = pFBConfig->associatedVisualId;
+ }
+ else {
+ pFBConfig = NULL;
+ }
+
+ if (visual != None) {
+ /*
+ ** Find the VisualRec for this visual.
+ */
+ pVisual = pScreen->visuals;
+ for (i=0; i < pScreen->numVisuals; i++, pVisual++) {
+ if (pVisual->vid == visual) {
+ break;
+ }
+ }
+ if (i == pScreen->numVisuals) {
+ client->errorValue = visual;
+ return BadValue;
+ }
+ /*
+ ** Check if depth of visual matches depth of pixmap.
+ */
+ if (pVisual->nplanes != pDraw->depth) {
+ client->errorValue = visual;
+ return BadMatch;
+ }
+
+ /*
+ ** Get configuration of the visual.
+ */
+ pGlxScreen = &__glXActiveScreens[screenNum];
+ pGlxVisual = pGlxScreen->pGlxVisual;
+ for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
+ if (pGlxVisual->vid == visual) {
+ break;
+ }
+ }
+ if (i == pGlxScreen->numVisuals) {
+ /*
+ ** Visual not support on this screen by this OpenGL implementation.
+ */
+ client->errorValue = visual;
+ return BadValue;
+ }
+
+
+ /* find the FBConfig for that visual (if any) */
+ if ( pFBConfig == NULL ) {
+ pFBConfig = glxLookupFBConfigByVID( visual );
+
+ if ( pFBConfig == NULL ) {
+ /*
+ * visual does not have an FBConfig ???
+ client->errorValue = visual;
+ return BadValue;
+ */
+ }
+ }
+ }
+ else {
+ pVisual = NULL;
+ pGlxVisual = NULL;
+ pGlxScreen = &__glXActiveScreens[pDraw->pScreen->myNum];
+ }
+
+ pGlxPixmap = (__GLXpixmap *) malloc(sizeof(__GLXpixmap));
+ if (!pGlxPixmap) {
+ return BadAlloc;
+ }
+ pGlxPixmap->be_xids = (XID *) malloc(sizeof(XID) * screenInfo.numScreens);
+ if (!pGlxPixmap->be_xids) {
+ free( pGlxPixmap );
+ return BadAlloc;
+ }
+
+ pGlxPixmap->pDraw = pDraw;
+ pGlxPixmap->pGlxScreen = pGlxScreen;
+ pGlxPixmap->pGlxVisual = pGlxVisual;
+ pGlxPixmap->pFBConfig = pFBConfig;
+ pGlxPixmap->pScreen = pScreen;
+ pGlxPixmap->idExists = True;
+ pGlxPixmap->refcnt = 0;
+
+ /*
+ ** Bump the ref count on the X pixmap so it won't disappear.
+ */
+ ((PixmapPtr) pDraw)->refcnt++;
+
+ /*
+ * send the request to the back-end server(s)
+ */
+ from_screen = to_screen = screenNum;
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+
+ dixLookupResourceByClass((pointer*) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
+ }
+#endif
+
+ for (s=from_screen; s<=to_screen; s++) {
+
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+ Pixmap be_pixmap;
+ DrawablePtr pRealDraw = pDraw;
+
+#ifdef PANORAMIX
+ if (pXinDraw) {
+ dixLookupDrawable(&pRealDraw, pXinDraw->info[s].id, client, 0,
+ DixAddAccess);
+ }
+#endif
+
+ be_pixmap = (DMX_GET_PIXMAP_PRIV((PixmapPtr)pRealDraw))->pixmap;
+
+ /* make sure pixmap already created on back-end */
+ dmxSync( dmxScreen, 1 );
+
+ if ( pFBConfig && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ __GLXFBConfig *be_FBConfig = glxLookupBackEndFBConfig( pFBConfig->id, s );
+
+ LockDisplay(dpy);
+ pGlxPixmap->be_xids[s] = XAllocID(dpy);
+ GetReq(GLXCreatePixmap,be_new_req);
+ be_new_req->reqType = dmxScreen->glxMajorOpcode;
+ be_new_req->glxCode = X_GLXCreatePixmap;
+ be_new_req->screen = DefaultScreen(dpy);
+ be_new_req->fbconfig = be_FBConfig->id;
+ be_new_req->pixmap = (unsigned int)be_pixmap;
+ be_new_req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
+ be_new_req->numAttribs = 0;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ else if (pFBConfig && glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
+ __GLXFBConfig *be_FBConfig = glxLookupBackEndFBConfig( pFBConfig->id, s );
+ xGLXCreateGLXPixmapWithConfigSGIXReq *ext_req;
+ xGLXVendorPrivateReq *vpreq;
+
+ LockDisplay(dpy);
+ pGlxPixmap->be_xids[s] = XAllocID(dpy);
+ GetReqExtra(GLXVendorPrivate,
+ sz_xGLXCreateGLXPixmapWithConfigSGIXReq-sz_xGLXVendorPrivateReq,
+ vpreq);
+ ext_req = (xGLXCreateGLXPixmapWithConfigSGIXReq *)vpreq;
+ ext_req->reqType = dmxScreen->glxMajorOpcode;
+ ext_req->glxCode = X_GLXVendorPrivate;
+ ext_req->vendorCode = X_GLXvop_CreateGLXPixmapWithConfigSGIX;
+ ext_req->screen = DefaultScreen(dpy);
+ ext_req->fbconfig = be_FBConfig->id;
+ ext_req->pixmap = (unsigned int)be_pixmap;
+ ext_req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ else if (pGlxVisual) {
+ LockDisplay(dpy);
+ pGlxPixmap->be_xids[s] = XAllocID(dpy);
+ GetReq(GLXCreateGLXPixmap,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXCreateGLXPixmap;
+ be_req->screen = DefaultScreen(dpy);
+ be_req->visual = (unsigned int)glxMatchGLXVisualInConfigList(
+ pGlxVisual,
+ dmxScreen->glxVisuals,
+ dmxScreen->numGlxVisuals );
+ be_req->pixmap = (unsigned int)be_pixmap;
+ be_req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ else {
+ client->errorValue = ( visual ? visual : fbconfigId );
+ free( pGlxPixmap );
+ return BadValue;
+ }
+
+ XFlush( dpy );
+ }
+
+ if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) {
+ free( pGlxPixmap );
+ return BadAlloc;
+ }
+
+ return Success;
+}
+
+int __glXCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
+
+ return( CreateGLXPixmap(cl, req->visual, None,
+ req->screen, req->pixmap, req->glxpixmap) );
+}
+
+int __glXCreatePixmap(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc;
+
+ return( CreateGLXPixmap(cl, None, req->fbconfig,
+ req->screen, req->pixmap, req->glxpixmap) );
+}
+
+int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
+ XID glxpixmap = req->glxpixmap;
+ __GLXpixmap *pGlxPixmap;
+ int s;
+ int from_screen, to_screen;
+
+ /*
+ ** Check if it's a valid GLX pixmap.
+ */
+ dixLookupResourceByType((pointer*) &pGlxPixmap, glxpixmap,
+ __glXPixmapRes, NullClient, DixUnknownAccess);
+ if (!pGlxPixmap) {
+ client->errorValue = glxpixmap;
+ return __glXBadPixmap;
+ }
+ FreeResource(glxpixmap, FALSE);
+
+ /*
+ * destroy the pixmap on the back-end server(s).
+ */
+ from_screen = to_screen = pGlxPixmap->pDraw->pScreen->myNum;
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+
+ /* make sure pixmap exist in back-end */
+ dmxSync( dmxScreen, 1 );
+
+ LockDisplay(dpy);
+ GetReq(GLXDestroyGLXPixmap,req);
+ req->reqType = dmxScreen->glxMajorOpcode;
+ req->glxCode = X_GLXDestroyGLXPixmap;
+ req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+
+
+ return Success;
+}
+
+/*****************************************************************************/
+
+/*
+** NOTE: There is no portable implementation for swap buffers as of
+** this time that is of value. Consequently, this code must be
+** implemented by somebody other than SGI.
+*/
+int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag)
+{
+ ClientPtr client = cl->client;
+ DrawablePtr pDraw;
+ xGLXSwapBuffersReq *be_req;
+ WindowPtr pWin = NULL;
+ __GLXpixmap *pGlxPixmap = NULL;
+ __GLXcontext *glxc = NULL;
+#ifdef PANORAMIX
+ PanoramiXRes *pXinDraw = NULL;
+#endif
+ __glXWindow *pGlxWindow = NULL;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s, rc;
+
+ /*
+ ** Check that the GLX drawable is valid.
+ */
+ rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
+ if (rc == Success) {
+ from_screen = to_screen = pDraw->pScreen->myNum;
+
+ if (pDraw->type == DRAWABLE_WINDOW) {
+ /*
+ ** Drawable is an X window.
+ */
+ pWin = (WindowPtr)pDraw;
+ } else {
+ /*
+ ** Drawable is an X pixmap, which is not allowed.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
+
+ if (!pDraw) {
+ dixLookupResourceByType((pointer*) &pGlxPixmap, drawId,
+ __glXPixmapRes, NullClient, DixUnknownAccess);
+ if (pGlxPixmap) {
+ /*
+ ** Drawable is a GLX pixmap.
+ */
+ pDraw = pGlxPixmap->pDraw;
+ from_screen = to_screen = pGlxPixmap->pScreen->myNum;
+ }
+ }
+
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ dixLookupResourceByType((pointer*) &pGlxWindow, drawId,
+ __glXWindowRes, NullClient, DixUnknownAccess);
+ if (pGlxWindow) {
+ /*
+ ** Drawable is a GLXWindow.
+ */
+ pDraw = pGlxWindow->pDraw;
+ from_screen = to_screen = pGlxWindow->pScreen->myNum;
+ }
+ }
+
+ if (!pDraw) {
+ /*
+ ** Drawable is neither a X window nor a GLX pixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ if (tag) {
+ glxc = __glXLookupContextByTag(cl, tag);
+ if (!glxc) {
+ return __glXBadContextTag;
+ }
+ }
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ dixLookupResourceByClass((pointer*) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
+ }
+#endif
+
+ /* If requested, send a glFinish to all back-end servers before swapping. */
+ if (dmxGLXFinishSwap) {
+ for (s=from_screen; s<=to_screen; s++) {
+ Display *dpy = GetBackEndDisplay(cl,s);
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ xGLXSingleReq *finishReq;
+ xGLXSingleReply reply;
+
+#define X_GLXSingle 0 /* needed by GetReq below */
+
+ LockDisplay(dpy);
+ GetReq(GLXSingle,finishReq);
+ finishReq->reqType = dmxScreen->glxMajorOpcode;
+ finishReq->glxCode = X_GLsop_Finish;
+ finishReq->contextTag = (tag ? GetCurrentBackEndTag(cl,tag,s) : 0);
+ (void) _XReply(dpy, (xReply*) &reply, 0, False);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ }
+
+ /* If requested, send an XSync to all back-end servers before swapping. */
+ if (dmxGLXSyncSwap) {
+ for (s=from_screen; s<=to_screen; s++)
+ XSync(GetBackEndDisplay(cl,s), False);
+ }
+
+
+ /* send the SwapBuffers request to all back-end servers */
+
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+ unsigned int be_draw = 0;
+
+ if (pGlxPixmap) {
+ be_draw = (unsigned int)pGlxPixmap->be_xids[s];
+ }
+#ifdef PANORAMIX
+ else if (pXinDraw) {
+ dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess);
+ }
+#endif
+ else if (pGlxWindow) {
+ pWin = (WindowPtr)pGlxWindow->pDraw;
+ }
+
+ if (pWin && !be_draw) {
+ be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
+ if (!be_draw) {
+ /* it might be that the window did not created yet on the */
+ /* back-end server (lazy window creation option), force */
+ /* creation of the window */
+ dmxCreateAndRealizeWindow( pWin, TRUE );
+ be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
+ }
+ }
+
+ dmxSync( dmxScreen, 1 );
+
+ LockDisplay(dpy);
+ GetReq(GLXSwapBuffers,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXSwapBuffers;
+ be_req->drawable = be_draw;
+ be_req->contextTag = ( tag ? GetCurrentBackEndTag(cl,tag,s) : 0 );
+ UnlockDisplay(dpy);
+ SyncHandle();
+ XFlush(dpy);
+ }
+
+ return Success;
+}
+
+int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ DrawablePtr pDraw;
+ xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
+ GLXContextTag tag = req->contextTag;
+ XID drawId = req->drawable;
+ __GLXpixmap *pGlxPixmap = NULL;
+ __GLXcontext *glxc = NULL;
+ __glXWindow *pGlxWindow = NULL;
+ int rc;
+
+ /*
+ ** Check that the GLX drawable is valid.
+ */
+ rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
+ if (rc == Success) {
+ if (pDraw->type != DRAWABLE_WINDOW) {
+ /*
+ ** Drawable is an X pixmap, which is not allowed.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
+
+ if (!pDraw) {
+ dixLookupResourceByType((pointer*) &pGlxPixmap, drawId,
+ __glXPixmapRes, NullClient, DixUnknownAccess);
+ if (pGlxPixmap) {
+ /*
+ ** Drawable is a GLX pixmap.
+ */
+ pDraw = pGlxPixmap->pDraw;
+ }
+ }
+
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
+ dixLookupResourceByType((pointer*) &pGlxWindow, drawId,
+ __glXWindowRes, NullClient, DixUnknownAccess);
+ if (pGlxWindow) {
+ /*
+ ** Drawable is a GLXWindow.
+ */
+ pDraw = pGlxWindow->pDraw;
+ }
+ }
+
+ if (!pDraw) {
+ /*
+ ** Drawable is neither a X window nor a GLX pixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ if (tag) {
+ glxc = __glXLookupContextByTag(cl, tag);
+ if (!glxc) {
+ return __glXBadContextTag;
+ }
+ }
+
+ if (pDraw &&
+ pDraw->type == DRAWABLE_WINDOW &&
+ DMX_GET_WINDOW_PRIV((WindowPtr)pDraw)->swapGroup) {
+ return SGSwapBuffers(cl, drawId, tag, pDraw);
+ }
+
+ return __glXDoSwapBuffers(cl, drawId, tag);
+}
+
+
+/************************************************************************/
+
+/*
+** Render and Renderlarge are not in the GLX API. They are used by the GLX
+** client library to send batches of GL rendering commands.
+*/
+
+/*
+** Execute all the drawing commands in a request.
+*/
+int __glXRender(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXRenderReq *req;
+ xGLXRenderReq *be_req;
+ int size;
+ __GLXcontext *glxc;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
+
+ /*
+ ** NOTE: much of this code also appears in the byteswapping version of this
+ ** routine, __glXSwapRender(). Any changes made here should also be
+ ** duplicated there.
+ */
+
+ req = (xGLXRenderReq *) pc;
+
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (!glxc) {
+ return 0;
+ }
+ from_screen = to_screen = glxc->pScreen->myNum;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ pc += sz_xGLXRenderReq;
+ size = (req->length << 2) - sz_xGLXRenderReq;
+
+ /*
+ * just forward the request to back-end server(s)
+ */
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+
+ LockDisplay(dpy);
+ GetReq(GLXRender,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXRender;
+ be_req->length = req->length;
+ be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
+ _XSend(dpy, (const char *)pc, size);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+
+ return Success;
+}
+
+/*
+** Execute a large rendering request (one that spans multiple X requests).
+*/
+int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXRenderLargeReq *req;
+ xGLXRenderLargeReq *be_req;
+ __GLXcontext *glxc;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
+
+ /*
+ ** NOTE: much of this code also appears in the byteswapping version of this
+ ** routine, __glXSwapRenderLarge(). Any changes made here should also be
+ ** duplicated there.
+ */
+
+ req = (xGLXRenderLargeReq *) pc;
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (!glxc) {
+ return 0;
+ }
+ from_screen = to_screen = glxc->pScreen->myNum;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ pc += sz_xGLXRenderLargeReq;
+
+ /*
+ * just forward the request to back-end server(s)
+ */
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+
+ GetReq(GLXRenderLarge,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXRenderLarge;
+ be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
+ be_req->length = req->length;
+ be_req->requestNumber = req->requestNumber;
+ be_req->requestTotal = req->requestTotal;
+ be_req->dataBytes = req->dataBytes;
+ Data(dpy, (const char *)pc, req->dataBytes);
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ }
+
+ return Success;
+}
+
+
+/************************************************************************/
+
+int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXVendorPrivateReq *req;
+
+ req = (xGLXVendorPrivateReq *) pc;
+
+ switch( req->vendorCode ) {
+
+ case X_GLvop_DeleteTexturesEXT:
+ return __glXVForwardSingleReq( cl, pc );
+ break;
+
+ case X_GLXvop_SwapIntervalSGI:
+ if (glxIsExtensionSupported("SGI_swap_control")) {
+ return __glXVForwardSingleReq( cl, pc );
+ }
+ else {
+ return Success;
+ }
+ break;
+
+#if 0 /* glx 1.3 */
+ case X_GLXvop_CreateGLXVideoSourceSGIX:
+ break;
+ case X_GLXvop_DestroyGLXVideoSourceSGIX:
+ break;
+ case X_GLXvop_CreateGLXPixmapWithConfigSGIX:
+ break;
+ case X_GLXvop_DestroyGLXPbufferSGIX:
+ break;
+ case X_GLXvop_ChangeDrawableAttributesSGIX:
+ break;
+#endif
+
+ case X_GLXvop_BindSwapBarrierSGIX:
+ return __glXBindSwapBarrierSGIX( cl, pc );
+ break;
+
+ case X_GLXvop_JoinSwapGroupSGIX:
+ return __glXJoinSwapGroupSGIX( cl, pc );
+ break;
+
+ case X_GLXvop_CreateContextWithConfigSGIX:
+ return __glXCreateContextWithConfigSGIX( cl, pc );
+ break;
+
+ default:
+ /*
+ ** unsupported private request
+ */
+ cl->client->errorValue = req->vendorCode;
+ return __glXUnsupportedPrivateRequest;
+ }
+
+ cl->client->errorValue = req->vendorCode;
+ return __glXUnsupportedPrivateRequest;
+
+}
+
+int __glXVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXVendorPrivateWithReplyReq *req;
+
+ req = (xGLXVendorPrivateWithReplyReq *) pc;
+
+ switch( req->vendorCode ) {
+
+ case X_GLvop_GetConvolutionFilterEXT:
+ case X_GLvop_GetConvolutionParameterfvEXT:
+ case X_GLvop_GetConvolutionParameterivEXT:
+ case X_GLvop_GetSeparableFilterEXT:
+ case X_GLvop_GetHistogramEXT:
+ case X_GLvop_GetHistogramParameterivEXT:
+ case X_GLvop_GetMinmaxEXT:
+ case X_GLvop_GetMinmaxParameterfvEXT:
+ case X_GLvop_GetMinmaxParameterivEXT:
+ case X_GLvop_AreTexturesResidentEXT:
+ case X_GLvop_IsTextureEXT:
+ return( __glXVForwardPipe0WithReply(cl, pc) );
+ break;
+
+ case X_GLvop_GenTexturesEXT:
+ return( __glXVForwardAllWithReply(cl, pc) );
+ break;
+
+
+#if 0 /* glx1.3 */
+ case X_GLvop_GetDetailTexFuncSGIS:
+ case X_GLvop_GetSharpenTexFuncSGIS:
+ case X_GLvop_GetColorTableSGI:
+ case X_GLvop_GetColorTableParameterfvSGI:
+ case X_GLvop_GetColorTableParameterivSGI:
+ case X_GLvop_GetTexFilterFuncSGIS:
+ case X_GLvop_GetInstrumentsSGIX:
+ case X_GLvop_InstrumentsBufferSGIX:
+ case X_GLvop_PollInstrumentsSGIX:
+ case X_GLvop_FlushRasterSGIX:
+ case X_GLXvop_CreateGLXPbufferSGIX:
+ case X_GLXvop_GetDrawableAttributesSGIX:
+ case X_GLXvop_QueryHyperpipeNetworkSGIX:
+ case X_GLXvop_QueryHyperpipeConfigSGIX:
+ case X_GLXvop_HyperpipeConfigSGIX:
+ case X_GLXvop_DestroyHyperpipeConfigSGIX:
+#endif
+ case X_GLXvop_QueryMaxSwapBarriersSGIX:
+ return( __glXQueryMaxSwapBarriersSGIX(cl, pc) );
+ break;
+
+ case X_GLXvop_GetFBConfigsSGIX:
+ return( __glXGetFBConfigsSGIX(cl, pc) );
+ break;
+
+ case X_GLXvop_MakeCurrentReadSGI:
+ return( __glXMakeCurrentReadSGI(cl, pc) );
+ break;
+
+ case X_GLXvop_QueryContextInfoEXT:
+ return( __glXQueryContextInfoEXT(cl,pc) );
+ break;
+
+ default:
+ /*
+ ** unsupported private request
+ */
+ cl->client->errorValue = req->vendorCode;
+ return __glXUnsupportedPrivateRequest;
+ }
+
+}
+
+int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc;
+ xGLXQueryExtensionsStringReply reply;
+ GLint screen;
+ size_t length;
+ int len, numbytes;
+ char *be_buf;
+
+#ifdef FWD_QUERY_REQ
+ xGLXQueryExtensionsStringReq *be_req;
+ xGLXQueryExtensionsStringReply be_reply;
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
+ int slop;
+#endif
+
+ screen = req->screen;
+
+ /*
+ ** Check if screen exists.
+ */
+ if ((screen < 0) || (screen >= screenInfo.numScreens)) {
+ client->errorValue = screen;
+ return BadValue;
+ }
+
+#ifdef FWD_QUERY_REQ
+ dmxScreen = &dmxScreens[screen];
+
+ /* Send the glXQueryServerString request */
+ dpy = GetBackEndDisplay(cl,screen);
+ LockDisplay(dpy);
+ GetReq(GLXQueryExtensionsString,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXQueryServerString;
+ be_req->screen = DefaultScreen(dpy);
+ _XReply(dpy, (xReply*) &be_reply, 0, False);
+ len = (int)be_reply.length;
+ numbytes = (int)be_reply.n;
+ slop = numbytes * __GLX_SIZE_INT8 & 3;
+ be_buf = (char *)malloc(numbytes);
+ if (!be_buf) {
+ /* Throw data on the floor */
+ _XEatData(dpy, len);
+ } else {
+ _XRead(dpy, (char *)be_buf, numbytes);
+ if (slop) _XEatData(dpy,4-slop);
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+#else
+
+ be_buf = __glXGetServerString(GLX_EXTENSIONS);
+ numbytes = strlen(be_buf) + 1;
+ len = __GLX_PAD(numbytes) >> 2;
+
+#endif
+
+ length = len;
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.length = len;
+ reply.n = numbytes;
+
+ if (client->swapped) {
+ glxSwapQueryExtensionsStringReply(client, &reply, be_buf);
+ } else {
+ WriteToClient(client, sz_xGLXQueryExtensionsStringReply,(char *)&reply);
+ WriteToClient(client, (int)(length << 2), (char *)be_buf);
+ }
+
+ return Success;
+}
+
+int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc;
+ xGLXQueryServerStringReply reply;
+ int name;
+ GLint screen;
+ size_t length;
+ int len, numbytes;
+ char *be_buf;
+#ifdef FWD_QUERY_REQ
+ xGLXQueryServerStringReq *be_req;
+ xGLXQueryServerStringReply be_reply;
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
+ int slop;
+#endif
+
+ name = req->name;
+ screen = req->screen;
+ /*
+ ** Check if screen exists.
+ */
+ if ((screen < 0) || (screen >= screenInfo.numScreens)) {
+ client->errorValue = screen;
+ return BadValue;
+ }
+
+#ifdef FWD_QUERY_REQ
+ dmxScreen = &dmxScreens[screen];
+
+ /* Send the glXQueryServerString request */
+ dpy = GetBackEndDisplay(cl,screen);
+ LockDisplay(dpy);
+ GetReq(GLXQueryServerString,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXQueryServerString;
+ be_req->screen = DefaultScreen(dpy);
+ be_req->name = name;
+ _XReply(dpy, (xReply*) &be_reply, 0, False);
+ len = (int)be_reply.length;
+ numbytes = (int)be_reply.n;
+ slop = numbytes * __GLX_SIZE_INT8 & 3;
+ be_buf = (char *)malloc(numbytes);
+ if (!be_buf) {
+ /* Throw data on the floor */
+ _XEatData(dpy, len);
+ } else {
+ _XRead(dpy, (char *)be_buf, numbytes);
+ if (slop) _XEatData(dpy,4-slop);
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+#else
+ be_buf = __glXGetServerString(name);
+ numbytes = strlen(be_buf) + 1;
+ len = __GLX_PAD(numbytes) >> 2;
+#endif
+
+ length = len;
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.length = length;
+ reply.n = numbytes;
+
+ if (client->swapped) {
+ glxSwapQueryServerStringReply(client, &reply, be_buf);
+ } else {
+ WriteToClient(client, sz_xGLXQueryServerStringReply, (char *)&reply);
+ WriteToClient(client, (int)(length << 2), be_buf);
+ }
+
+ return Success;
+}
+
+int __glXClientInfo(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc;
+ xGLXClientInfoReq *be_req;
+ const char *buf;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
+
+ cl->GLClientmajorVersion = req->major;
+ cl->GLClientminorVersion = req->minor;
+ free(cl->GLClientextensions);
+ buf = (const char *)(req+1);
+ cl->GLClientextensions = strdup(buf);
+
+ to_screen = screenInfo.numScreens - 1;
+
+ for (s=from_screen; s<=to_screen; s++)
+ {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+
+ LockDisplay(dpy);
+ GetReq(GLXClientInfo,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXClientInfo;
+ be_req->major = req->major;
+ be_req->minor = req->minor;
+ be_req->length = req->length;
+ be_req->numbytes = req->numbytes;
+ Data(dpy, buf, req->numbytes);
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+
+ return Success;
+}
+
+int __glXUseXFont(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXUseXFontReq *req;
+ xGLXUseXFontReq *be_req;
+ FontPtr pFont;
+ __GLXcontext *glxc = NULL;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
+ dmxFontPrivPtr pFontPriv;
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
+
+ req = (xGLXUseXFontReq *) pc;
+
+ if (req->contextTag != 0) {
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (glxc) {
+ from_screen = to_screen = glxc->pScreen->myNum;
+ }
+ }
+
+ /*
+ ** Font can actually be either the ID of a font or the ID of a GC
+ ** containing a font.
+ */
+ dixLookupResourceByType((pointer*) &pFont, req->font, RT_FONT,
+ NullClient, DixUnknownAccess);
+ if (!pFont) {
+ GC *pGC;
+ dixLookupResourceByType((pointer*) &pGC, req->font,
+ RT_GC, NullClient,
+ DixUnknownAccess);
+ if (!pGC) {
+ client->errorValue = req->font;
+ return BadFont;
+ }
+ pFont = pGC->font;
+ }
+
+ pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex);
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+
+ for (s=from_screen; s<=to_screen; s++) {
+ dmxScreen = &dmxScreens[s];
+ dpy = GetBackEndDisplay(cl,s);
+
+ dmxSync( dmxScreen, 1 );
+
+ LockDisplay(dpy);
+ GetReq(GLXUseXFont,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXUseXFont;
+ be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
+ be_req->font = pFontPriv->font[s]->fid;
+ be_req->first = req->first;
+ be_req->count = req->count;
+ be_req->listBase = req->listBase;
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ XSync( dpy, False );
+ }
+
+ return Success;
+}
+
+/*
+ * start GLX 1.3 here
+ */
+
+int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
+ xGLXGetFBConfigsReply reply;
+ __GLXFBConfig *pFBConfig;
+ CARD32 buf[2 * __GLX_TOTAL_FBCONFIG_PROPS];
+ int numAttribs = __GLX_TOTAL_FBCONFIG_PROPS;
+ unsigned int screen = req->screen;
+ int numFBConfigs, i, p;
+ __GLXscreenInfo *pGlxScreen;
+
+ if (screen >= screenInfo.numScreens) {
+ /* The client library must send a valid screen number. */
+ client->errorValue = screen;
+ return BadValue;
+ }
+
+ pGlxScreen = &__glXActiveScreens[screen];
+ numFBConfigs = __glXNumFBConfigs;
+
+ reply.numFBConfigs = numFBConfigs;
+ reply.numAttribs = numAttribs;
+ reply.length = (numFBConfigs * 2 * numAttribs * __GLX_SIZE_CARD32) >> 2;
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+
+ if (client->swapped) {
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_SWAP_SHORT(&reply.sequenceNumber);
+ __GLX_SWAP_INT(&reply.length);
+ __GLX_SWAP_INT(&reply.numFBConfigs);
+ __GLX_SWAP_INT(&reply.numAttribs);
+ }
+ WriteToClient(client, sz_xGLXGetFBConfigsReply, (char *)&reply);
+
+ for (i=0; i < numFBConfigs; i++) {
+ int associatedVisualId = 0;
+ int drawableTypeIndex;
+ pFBConfig = __glXFBConfigs[ i * (screenInfo.numScreens+1) ];
+
+ p = 0;
+ /* core attributes */
+ buf[p++] = GLX_FBCONFIG_ID;
+ buf[p++] = pFBConfig->id;
+ buf[p++] = GLX_BUFFER_SIZE;
+ buf[p++] = pFBConfig->indexBits;
+ buf[p++] = GLX_LEVEL;
+ buf[p++] = pFBConfig->level;
+ buf[p++] = GLX_DOUBLEBUFFER;
+ buf[p++] = pFBConfig->doubleBufferMode;
+ buf[p++] = GLX_STEREO;
+ buf[p++] = pFBConfig->stereoMode;
+ buf[p++] = GLX_AUX_BUFFERS;
+ buf[p++] = pFBConfig->maxAuxBuffers;
+ buf[p++] = GLX_RED_SIZE;
+ buf[p++] = pFBConfig->redBits;
+ buf[p++] = GLX_GREEN_SIZE;
+ buf[p++] = pFBConfig->greenBits;
+ buf[p++] = GLX_BLUE_SIZE;
+ buf[p++] = pFBConfig->blueBits;
+ buf[p++] = GLX_ALPHA_SIZE;
+ buf[p++] = pFBConfig->alphaBits;
+ buf[p++] = GLX_DEPTH_SIZE;
+ buf[p++] = pFBConfig->depthBits;
+ buf[p++] = GLX_STENCIL_SIZE;
+ buf[p++] = pFBConfig->stencilBits;
+ buf[p++] = GLX_ACCUM_RED_SIZE;
+ buf[p++] = pFBConfig->accumRedBits;
+ buf[p++] = GLX_ACCUM_GREEN_SIZE;
+ buf[p++] = pFBConfig->accumGreenBits;
+ buf[p++] = GLX_ACCUM_BLUE_SIZE;
+ buf[p++] = pFBConfig->accumBlueBits;
+ buf[p++] = GLX_ACCUM_ALPHA_SIZE;
+ buf[p++] = pFBConfig->accumAlphaBits;
+ buf[p++] = GLX_RENDER_TYPE;
+ buf[p++] = pFBConfig->renderType;
+ buf[p++] = GLX_DRAWABLE_TYPE;
+ drawableTypeIndex = p;
+ buf[p++] = pFBConfig->drawableType;
+ buf[p++] = GLX_X_VISUAL_TYPE;
+ buf[p++] = pFBConfig->visualType;
+ buf[p++] = GLX_CONFIG_CAVEAT;
+ buf[p++] = pFBConfig->visualCaveat;
+ buf[p++] = GLX_TRANSPARENT_TYPE;
+ buf[p++] = pFBConfig->transparentType;
+ buf[p++] = GLX_TRANSPARENT_RED_VALUE;
+ buf[p++] = pFBConfig->transparentRed;
+ buf[p++] = GLX_TRANSPARENT_GREEN_VALUE;
+ buf[p++] = pFBConfig->transparentGreen;
+ buf[p++] = GLX_TRANSPARENT_BLUE_VALUE;
+ buf[p++] = pFBConfig->transparentBlue;
+ buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE;
+ buf[p++] = pFBConfig->transparentAlpha;
+ buf[p++] = GLX_TRANSPARENT_INDEX_VALUE;
+ buf[p++] = pFBConfig->transparentIndex;
+ buf[p++] = GLX_MAX_PBUFFER_WIDTH;
+ buf[p++] = pFBConfig->maxPbufferWidth;
+ buf[p++] = GLX_MAX_PBUFFER_HEIGHT;
+ buf[p++] = pFBConfig->maxPbufferHeight;
+ buf[p++] = GLX_MAX_PBUFFER_PIXELS;
+ buf[p++] = pFBConfig->maxPbufferPixels;
+
+ /*
+ * find the visual of the back-end server and match a visual
+ * on the proxy.
+ * do only once - if a visual is not yet associated.
+ */
+ if (pFBConfig->associatedVisualId == (unsigned int)-1) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[screen];
+ __GLXFBConfig *be_pFBConfig = __glXFBConfigs[ i * (screenInfo.numScreens+1)+screen+1 ];
+ __GLXvisualConfig *pGlxVisual = NULL;
+ int v;
+ int found = 0;
+ for (v=0; v<dmxScreen->numGlxVisuals; v++) {
+ if (dmxScreen->glxVisuals[v].vid == be_pFBConfig->associatedVisualId) {
+ pGlxVisual = &dmxScreen->glxVisuals[v];
+ break;
+ }
+ }
+
+ if (pGlxVisual) {
+ for (v=0; v<pGlxScreen->numVisuals; v++) {
+ if (glxVisualsMatch(&pGlxScreen->pGlxVisual[v], pGlxVisual)) {
+ associatedVisualId = pGlxScreen->pGlxVisual[v].vid;
+ found = 1;
+ break;
+ }
+ }
+ }
+
+ if (!found) {
+ associatedVisualId = 0;
+ pFBConfig->drawableType &= ~(GLX_WINDOW_BIT);
+ buf[drawableTypeIndex] = pFBConfig->drawableType;
+ }
+#ifdef PANORAMIX
+ else if (!noPanoramiXExtension) {
+ /* convert the associated visualId to the panoramix one */
+ pFBConfig->associatedVisualId =
+ PanoramiXTranslateVisualID(screen, v);
+ }
+#endif
+ }
+ else {
+ associatedVisualId = pFBConfig->associatedVisualId;
+ }
+
+ buf[p++] = GLX_VISUAL_ID;
+ buf[p++] = associatedVisualId;
+
+ /* SGIS_multisample attributes */
+ buf[p++] = GLX_SAMPLES_SGIS;
+ buf[p++] = pFBConfig->multiSampleSize;
+ buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
+ buf[p++] = pFBConfig->nMultiSampleBuffers;
+
+ /* SGIX_pbuffer specific attributes */
+ buf[p++] = GLX_OPTIMAL_PBUFFER_WIDTH_SGIX;
+ buf[p++] = pFBConfig->optimalPbufferWidth;
+ buf[p++] = GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX;
+ buf[p++] = pFBConfig->optimalPbufferHeight;
+
+ buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
+ buf[p++] = pFBConfig->visualSelectGroup;
+
+ if (client->swapped) {
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_SWAP_INT_ARRAY((int *)buf, 2*numAttribs);
+ }
+ WriteToClient(client, 2*numAttribs * __GLX_SIZE_CARD32, (char *)buf);
+ }
+ return Success;
+}
+
+int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *)pc;
+ xGLXGetFBConfigsReq new_req;
+
+ new_req.reqType = req->reqType;
+ new_req.glxCode = req->glxCode;
+ new_req.length = req->length;
+ new_req.screen = req->screen;
+
+ return( __glXGetFBConfigs( cl, (GLbyte *)&new_req ) );
+}
+
+
+int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc;
+ int screen = req->screen;
+ GLXFBConfigID fbconfigId = req->fbconfig;
+ XID windowId = req->window;
+ XID glxwindowId = req->glxwindow;
+ DrawablePtr pDraw;
+ ScreenPtr pScreen;
+ __glXWindow *pGlxWindow;
+ __GLXFBConfig *pGlxFBConfig = NULL;
+ VisualPtr pVisual;
+ VisualID visId;
+ int i, rc;
+ pointer val;
+
+ /*
+ ** Check if windowId is valid
+ */
+ rc = dixLookupDrawable(&pDraw, windowId, client, M_DRAWABLE_WINDOW,
+ DixAddAccess);
+ if (rc != Success)
+ return rc;
+
+ /*
+ ** Check if screen of window matches screen of fbconfig.
+ */
+ pScreen = pDraw->pScreen;
+ if (screen != pScreen->myNum) {
+ return BadMatch;
+ }
+
+ /*
+ ** Find the FBConfigRec for this fbconfigid.
+ */
+ if (!(pGlxFBConfig = glxLookupFBConfig(fbconfigId))) {
+ client->errorValue = fbconfigId;
+ return __glXBadFBConfig;
+ }
+ visId = pGlxFBConfig->associatedVisualId;
+
+ /*
+ ** Check if the fbconfig supports rendering to windows
+ */
+ if( !(pGlxFBConfig->drawableType & GLX_WINDOW_BIT) ) {
+ return BadMatch;
+ }
+
+ if (visId != None) {
+ /*
+ ** Check if the visual ID is valid for this screen.
+ */
+ pVisual = pScreen->visuals;
+ for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
+ if (pVisual->vid == visId) {
+ break;
+ }
+ }
+ if (i == pScreen->numVisuals) {
+ client->errorValue = visId;
+ return BadValue;
+ }
+
+ /*
+ ** Check if color buffer depth of fbconfig matches depth
+ ** of window.
+ */
+ if (pVisual->nplanes != pDraw->depth) {
+ return BadMatch;
+ }
+ } else
+ /*
+ ** The window was created with no visual that corresponds
+ ** to fbconfig
+ */
+ return BadMatch;
+
+ /*
+ ** Check if there is already a fbconfig associated with this window
+ */
+ if (Success == dixLookupResourceByType(&val,
+ glxwindowId, __glXWindowRes,
+ NullClient, DixUnknownAccess)) {
+ client->errorValue = glxwindowId;
+ return BadAlloc;
+ }
+
+ pGlxWindow = (__glXWindow *) malloc(sizeof(__glXWindow));
+ if (!pGlxWindow) {
+ return BadAlloc;
+ }
+
+ /*
+ ** Register this GLX window as a resource
+ */
+ if (!(AddResource(glxwindowId, __glXWindowRes, pGlxWindow))) {
+ return BadAlloc;
+ }
+
+ pGlxWindow->pDraw = pDraw;
+ pGlxWindow->type = GLX_GLXWINDOW_TYPE;
+ pGlxWindow->idExists = True;
+ pGlxWindow->refcnt = 0;
+ pGlxWindow->pGlxFBConfig = pGlxFBConfig;
+ pGlxWindow->pScreen = pScreen;
+
+ return Success;
+}
+
+int __glXDestroyWindow(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
+ XID glxwindow = req->glxwindow;
+ pointer val;
+
+ /*
+ ** Check if it's a valid GLX window.
+ */
+ if (Success != dixLookupResourceByType(&val,
+ glxwindow, __glXWindowRes,
+ NullClient, DixUnknownAccess)) {
+ client->errorValue = glxwindow;
+ return __glXBadDrawable;
+ }
+ /*
+ ** The glx window destructor will check whether it's current before
+ ** freeing anything.
+ */
+ FreeResource(glxwindow, RT_NONE);
+
+ return Success;
+}
+
+int __glXQueryContext(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ __GLXcontext *ctx;
+ xGLXQueryContextReq *req;
+ xGLXQueryContextReply reply;
+ int nProps;
+ int *sendBuf, *pSendBuf;
+ int nReplyBytes;
+
+ req = (xGLXQueryContextReq *)pc;
+ dixLookupResourceByType((pointer*) &ctx, req->context, __glXContextRes,
+ NullClient, DixUnknownAccess);
+ if (!ctx) {
+ client->errorValue = req->context;
+ return __glXBadContext;
+ }
+
+ nProps = 3;
+
+ reply.length = nProps << 1;
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.n = nProps;
+
+ nReplyBytes = reply.length << 2;
+ sendBuf = (int *)malloc(nReplyBytes);
+ pSendBuf = sendBuf;
+ *pSendBuf++ = GLX_FBCONFIG_ID;
+ *pSendBuf++ = (int)(ctx->pFBConfig->id);
+ *pSendBuf++ = GLX_RENDER_TYPE;
+ *pSendBuf++ = (int)(ctx->pFBConfig->renderType);
+ *pSendBuf++ = GLX_SCREEN;
+ *pSendBuf++ = (int)(ctx->pScreen->myNum);
+
+ if (client->swapped) {
+ __glXSwapQueryContextReply(client, &reply, sendBuf);
+ } else {
+ WriteToClient(client, sz_xGLXQueryContextReply, (char *)&reply);
+ WriteToClient(client, nReplyBytes, (char *)sendBuf);
+ }
+ free((char *)sendBuf);
+
+ return Success;
+}
+
+int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ __GLXcontext *ctx;
+ xGLXQueryContextInfoEXTReq *req;
+ xGLXQueryContextInfoEXTReply reply;
+ int nProps;
+ int *sendBuf, *pSendBuf;
+ int nReplyBytes;
+
+ req = (xGLXQueryContextInfoEXTReq *)pc;
+ dixLookupResourceByType((pointer*) &ctx,
+ req->context, __glXContextRes,
+ client, DixReadAccess);
+
+ if (!ctx) {
+ client->errorValue = req->context;
+ return __glXBadContext;
+ }
+
+ nProps = 4;
+
+ reply.length = nProps << 1;
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.n = nProps;
+
+ nReplyBytes = reply.length << 2;
+ sendBuf = (int *)malloc(nReplyBytes);
+ pSendBuf = sendBuf;
+ *pSendBuf++ = GLX_SHARE_CONTEXT_EXT;
+ *pSendBuf++ = (int)(ctx->share_id);
+ *pSendBuf++ = GLX_VISUAL_ID_EXT;
+ *pSendBuf++ = (int)(ctx->pVisual ? ctx->pVisual->vid : 0);
+ *pSendBuf++ = GLX_SCREEN_EXT;
+ *pSendBuf++ = (int)(ctx->pScreen->myNum);
+ *pSendBuf++ = GLX_FBCONFIG_ID;
+ *pSendBuf++ = (int)(ctx->pFBConfig ? ctx->pFBConfig->id : 0);
+
+ if (client->swapped) {
+ __glXSwapQueryContextInfoEXTReply(client, &reply, sendBuf);
+ } else {
+ WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)&reply);
+ WriteToClient(client, nReplyBytes, (char *)sendBuf);
+ }
+ free((char *)sendBuf);
+
+ return Success;
+}
+
+int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *)pc;
+ xGLXCreatePbufferReq *be_req;
+ int screen = req->screen;
+ GLXFBConfigID fbconfigId = req->fbconfig;
+ GLXPbuffer pbuffer = req->pbuffer;
+ __glXPbuffer *pGlxPbuffer;
+ int numAttribs = req->numAttribs;
+ int *attr;
+ ScreenPtr pScreen;
+ __GLXFBConfig *pGlxFBConfig;
+ __GLXFBConfig *be_pGlxFBConfig;
+ XID be_xid;
+ Display *dpy;
+ DMXScreenInfo *dmxScreen;
+ int s;
+ int from_screen, to_screen;
+
+ /*
+ ** Look up screen and FBConfig.
+ */
+ if (screen >= screenInfo.numScreens) {
+ /* The client library must send a valid screen number. */
+ client->errorValue = screen;
+ return BadValue;
+ }
+ pScreen = screenInfo.screens[screen];
+
+ /*
+ ** Find the FBConfigRec for this fbconfigid.
+ */
+ if (!(pGlxFBConfig = glxLookupFBConfig(fbconfigId))) {
+ client->errorValue = fbconfigId;
+ return __glXBadFBConfig;
+ }
+
+ /*
+ ** Create the GLX part of the Pbuffer.
+ */
+ pGlxPbuffer = (__glXPbuffer *) malloc(sizeof(__glXPbuffer));
+ if (!pGlxPbuffer) {
+ return BadAlloc;
+ }
+
+ pGlxPbuffer->be_xids = (XID *) malloc( sizeof(XID) * screenInfo.numScreens );
+ if (!pGlxPbuffer->be_xids) {
+ free(pGlxPbuffer);
+ return BadAlloc;
+ }
+
+ /*
+ * Allocate an XID on the back-end server(s) and send him the request
+ */
+ from_screen = to_screen = screen;
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ for (s=from_screen; s<=to_screen; s++) {
+ dpy = GetBackEndDisplay(cl,s);
+ be_xid = XAllocID(dpy);
+ dmxScreen = &dmxScreens[s];
+ be_pGlxFBConfig = glxLookupBackEndFBConfig( pGlxFBConfig->id, s );
+
+ attr = (int *)( req+1 );
+
+ LockDisplay(dpy);
+ GetReqExtra(GLXCreatePbuffer, 2 * numAttribs * __GLX_SIZE_CARD32, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXCreatePbuffer;
+ be_req->screen = be_pGlxFBConfig->screen;
+ be_req->fbconfig = be_pGlxFBConfig->id;
+ be_req->pbuffer = be_xid;
+ be_req->numAttribs = numAttribs;
+
+ /* Send attributes */
+ if ( attr != NULL ) {
+ CARD32 *pc = (CARD32 *)(be_req + 1);
+
+ while (numAttribs-- > 0) {
+ *pc++ = *attr++; /* token */
+ *pc++ = *attr++; /* value */
+ }
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ pGlxPbuffer->be_xids[s] = be_xid;
+ }
+
+
+ pGlxPbuffer->idExists = True;
+ pGlxPbuffer->refcnt = 0;
+ pGlxPbuffer->pFBConfig = pGlxFBConfig;
+ pGlxPbuffer->pScreen = pScreen;
+
+ /*
+ ** Register the resource.
+ */
+ if (!(AddResource(pbuffer, __glXPbufferRes, pGlxPbuffer))) {
+ return BadAlloc;
+ }
+
+ return Success;
+
+}
+
+int __glXDestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
+{
+ ClientPtr client = cl->client;
+ xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
+ xGLXDestroyPbufferReq *be_req;
+ GLXPbuffer pbuffer = req->pbuffer;
+ Display *dpy;
+ int screen;
+ DMXScreenInfo *dmxScreen;
+ __glXPbuffer *pGlxPbuffer;
+ int s;
+ int from_screen, to_screen;
+
+ /*
+ ** Check if it's a valid Pbuffer
+ */
+ dixLookupResourceByType((pointer*) &pGlxPbuffer, pbuffer,
+ __glXPbufferRes, NullClient, DixUnknownAccess);
+ if (!pGlxPbuffer) {
+ client->errorValue = pbuffer;
+ return __glXBadPbuffer;
+ }
+
+ screen = pGlxPbuffer->pScreen->myNum;
+
+ from_screen = to_screen = screen;
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ for (s=from_screen; s<=to_screen; s++) {
+ dpy = GetBackEndDisplay(cl,s);
+ dmxScreen = &dmxScreens[s];
+
+ /* send the destroy request to the back-end server */
+ LockDisplay(dpy);
+ GetReq(GLXDestroyPbuffer, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXDestroyPbuffer;
+ be_req->pbuffer = pGlxPbuffer->be_xids[s];
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+
+ FreeResource(pbuffer, RT_NONE);
+
+ return Success;
+}
+
+int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc;
+ xGLXGetDrawableAttributesReq *be_req;
+ xGLXGetDrawableAttributesReply reply;
+ ClientPtr client = cl->client;
+ GLXDrawable drawId = req->drawable;
+ GLXDrawable be_drawable = 0;
+ DrawablePtr pDraw = NULL;
+ Display *dpy;
+ int screen, rc;
+ DMXScreenInfo *dmxScreen;
+ CARD32 *attribs = NULL;
+ int attribs_size = 0;
+#ifdef PANORAMIX
+ PanoramiXRes *pXinDraw = NULL;
+#endif
+
+ if (drawId != None) {
+ rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess);
+ if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
+ WindowPtr pWin = (WindowPtr)pDraw;
+ be_drawable = 0;
+ screen = pWin->drawable.pScreen->myNum;
+ } else {
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ if (!pDraw) {
+ __GLXpixmap *pGlxPixmap;
+ dixLookupResourceByType((pointer*) &pGlxPixmap,
+ drawId, __glXPixmapRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxPixmap) {
+ pDraw = pGlxPixmap->pDraw;
+ screen = pGlxPixmap->pScreen->myNum;
+ be_drawable = pGlxPixmap->be_xids[screen];
+ }
+ }
+
+ if (!pDraw) {
+ __glXWindow *pGlxWindow;
+ dixLookupResourceByType((pointer*) &pGlxWindow,
+ drawId, __glXWindowRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxWindow) {
+ pDraw = pGlxWindow->pDraw;
+ screen = pGlxWindow->pScreen->myNum;
+ be_drawable = 0;
+ }
+ }
+
+ if (!pDraw) {
+ __glXPbuffer *pGlxPbuffer;
+ dixLookupResourceByType((pointer*) &pGlxPbuffer,
+ drawId, __glXPbufferRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxPbuffer) {
+ pDraw = (DrawablePtr)pGlxPbuffer;
+ screen = pGlxPbuffer->pScreen->myNum;
+ be_drawable = pGlxPbuffer->be_xids[screen];
+ }
+ }
+ }
+
+ if (!pDraw) {
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ /* if the drawable is a window or GLXWindow -
+ * we need to find the base id on the back-end server
+ */
+ if (!be_drawable) {
+ WindowPtr pWin = (WindowPtr)pDraw;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ if (Success != dixLookupResourceByClass((pointer*) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess)) {
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ dixLookupWindow(&pWin, pXinDraw->info[screen].id, client,
+ DixReadAccess);
+ }
+#endif
+
+ if (pWin) {
+ be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
+ if (!be_drawable) {
+ /* it might be that the window did not created yet on the */
+ /* back-end server (lazy window creation option), force */
+ /* creation of the window */
+ dmxCreateAndRealizeWindow( pWin, TRUE );
+ be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
+ }
+ }
+ else {
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
+
+
+ /* send the request to the back-end server */
+ dpy = GetBackEndDisplay(cl,screen);
+ dmxScreen = &dmxScreens[screen];
+
+ /* make sure drawable exists on back-end */
+ dmxSync( dmxScreen, 1 );
+
+ LockDisplay(dpy);
+ GetReq(GLXGetDrawableAttributes, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXGetDrawableAttributes;
+ be_req->drawable = be_drawable;
+ be_req->length = req->length;
+ if (!_XReply(dpy, (xReply *) &reply, 0, False)) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
+ }
+
+ if (reply.numAttribs) {
+ attribs_size = 2 * reply.numAttribs * __GLX_SIZE_CARD32;
+ attribs = (CARD32 *) malloc(attribs_size);
+ if (attribs == NULL) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return BadAlloc;
+ }
+
+ _XRead(dpy, (char *) attribs, attribs_size);
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+
+ /* send the reply back to the client */
+ reply.sequenceNumber = client->sequence;
+ if (client->swapped) {
+ __glXSwapGetDrawableAttributesReply(client, &reply, (int *)attribs);
+ }
+ else {
+ WriteToClient(client, sz_xGLXGetDrawableAttributesReply, (char *)&reply);
+ WriteToClient(client, attribs_size, (char *)attribs);
+ }
+
+ free(attribs);
+
+ return Success;
+}
+
+int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXChangeDrawableAttributesReq *req = (xGLXChangeDrawableAttributesReq *)pc;
+ xGLXChangeDrawableAttributesReq *be_req;
+ ClientPtr client = cl->client;
+ GLXDrawable drawId = req->drawable;
+ GLXDrawable be_drawable = 0;
+ DrawablePtr pDraw = NULL;
+ Display *dpy;
+ int screen, rc;
+ DMXScreenInfo *dmxScreen;
+
+ if (drawId != None) {
+ rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
+ if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
+ be_drawable = 0;
+ screen = pDraw->pScreen->myNum;
+ } else {
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ if (!pDraw) {
+ __GLXpixmap *pGlxPixmap;
+ dixLookupResourceByType((pointer*) &pGlxPixmap,
+ drawId, __glXPixmapRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxPixmap) {
+ pDraw = pGlxPixmap->pDraw;
+ screen = pGlxPixmap->pScreen->myNum;
+ be_drawable = pGlxPixmap->be_xids[screen];
+ }
+ }
+
+ if (!pDraw) {
+ __glXWindow *pGlxWindow;
+ dixLookupResourceByType((pointer*) &pGlxWindow,
+ drawId, __glXWindowRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxWindow) {
+ pDraw = pGlxWindow->pDraw;
+ screen = pGlxWindow->pScreen->myNum;
+ be_drawable = 0;
+ }
+ }
+
+ if (!pDraw) {
+ __glXPbuffer *pGlxPbuffer;
+ dixLookupResourceByType((pointer*) &pGlxPbuffer,
+ drawId, __glXPbufferRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxPbuffer) {
+ pDraw = (DrawablePtr)pGlxPbuffer;
+ screen = pGlxPbuffer->pScreen->myNum;
+ be_drawable = pGlxPbuffer->be_xids[screen];
+ }
+ }
+ }
+
+ if (!pDraw) {
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ /* if the drawable is a window or GLXWindow -
+ * we need to find the base id on the back-end server
+ */
+ if (!be_drawable) {
+ WindowPtr pWin = (WindowPtr)pDraw;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ PanoramiXRes *pXinDraw;
+ if (Success != dixLookupResourceByClass((pointer*) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess)) {
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ dixLookupWindow(&pWin, pXinDraw->info[screen].id, client,
+ DixReadAccess);
+ }
+#endif
+
+ if (pWin) {
+ be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
+ if (!be_drawable) {
+ /* it might be that the window did not created yet on the */
+ /* back-end server (lazy window creation option), force */
+ /* creation of the window */
+ dmxCreateAndRealizeWindow( pWin, TRUE );
+ be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
+ }
+ }
+ else {
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
+
+
+ /* send the request to the back-end server */
+ dpy = GetBackEndDisplay(cl,screen);
+ dmxScreen = &dmxScreens[screen];
+
+ /* make sure drawable exists on back-end */
+ dmxSync( dmxScreen, 1 );
+
+ LockDisplay(dpy);
+ GetReqExtra(GLXChangeDrawableAttributes,
+ 2 * req->numAttribs * __GLX_SIZE_CARD32, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXChangeDrawableAttributes;
+ be_req->drawable = be_drawable;
+ be_req->numAttribs = req->numAttribs;
+ be_req->length = req->length;
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ return Success;
+}
+
+int __glXSendLargeCommand(__GLXclientState *cl, GLXContextTag contextTag)
+{
+ ClientPtr client = cl->client;
+ xGLXRenderLargeReq *req;
+ GLint maxSize, amount;
+ GLint totalRequests, requestNumber;
+ GLint dataLen;
+ GLbyte *data;
+ __GLXcontext *glxc;
+ int s;
+ int from_screen, to_screen;
+
+ maxSize = cl->largeCmdMaxReqDataSize - (GLint)sizeof(xGLXRenderLargeReq);
+ dataLen = cl->largeCmdBytesTotal;
+ totalRequests = (dataLen / maxSize);
+ if (dataLen % maxSize) totalRequests++;
+
+ glxc = __glXLookupContextByTag(cl, contextTag);
+ if (!glxc) {
+ client->errorValue = contextTag;
+ return __glXBadContext;
+ }
+ from_screen = to_screen = glxc->pScreen->myNum;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ /*
+ ** Send enough requests until the whole array is sent.
+ */
+ requestNumber = 1;
+ data = cl->largeCmdBuf;
+ while (dataLen > 0) {
+ amount = dataLen;
+ if (amount > maxSize) {
+ amount = maxSize;
+ }
+
+ for (s=from_screen; s<=to_screen; s++) {
+
+ Display *dpy = GetBackEndDisplay(cl,s);
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+
+ LockDisplay(dpy);
+ GetReq(GLXRenderLarge,req);
+ req->reqType = dmxScreen->glxMajorOpcode;
+ req->glxCode = X_GLXRenderLarge;
+ req->contextTag = GetCurrentBackEndTag(cl,contextTag,s);
+ req->length += (amount + 3) >> 2;
+ req->requestNumber = requestNumber++;
+ req->requestTotal = totalRequests;
+ req->dataBytes = amount;
+ Data(dpy, ((const char*)data), amount);
+ dataLen -= amount;
+ data = ((GLbyte *) data) + amount;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ }
+
+ return Success;
+}
diff --git a/xorg-server/hw/dmx/glxProxy/glxsingle.c b/xorg-server/hw/dmx/glxProxy/glxsingle.c
index 33cc612a7..834c7b8d9 100644
--- a/xorg-server/hw/dmx/glxProxy/glxsingle.c
+++ b/xorg-server/hw/dmx/glxProxy/glxsingle.c
@@ -1,1016 +1,1016 @@
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxwindow.h"
-#include "dmxpixmap.h"
-#include "dmxfont.h"
-#include "dmxcb.h"
-
-#include "glxserver.h"
-#include "glxext.h"
-#include "g_disptab.h"
-/* #include "g_disptab_EXT.h" */
-#include "unpack.h"
-#include "glxutil.h"
-
-#include "GL/glxproto.h"
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-/*
- * GetReqSingle - this is the equivalent of GetReq macro
- * from Xlibint.h but it does not set the reqType field (the opcode).
- * this is because the GL single opcodes has different naming convension
- * the other X opcodes (ie. X_GLsop_GetFloatv).
- */
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
-#define GetReqSingle(name, req) \
- WORD64ALIGN\
- if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
- _XFlush(dpy);\
- req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
- req->length = (SIZEOF(x##name##Req))>>2;\
- dpy->bufptr += SIZEOF(x##name##Req);\
- dpy->request++
-
-#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
-#define GetReqSingle(name, req) \
- WORD64ALIGN\
- if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
- _XFlush(dpy);\
- req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
- req->length = (SIZEOF(x/**/name/**/Req))>>2;\
- dpy->bufptr += SIZEOF(x/**/name/**/Req);\
- dpy->request++
-#endif
-
-#define X_GLXSingle 0 /* needed by GetReqExtra */
-
-extern Display *GetBackEndDisplay( __GLXclientState *cl, int s );
-extern int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s);
-
-static int swap_vec_element_size = 0;
-
-static void SendSwappedReply( ClientPtr client,
- xGLXSingleReply *reply,
- char *buf,
- int buf_size )
-{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_SHORT(&reply->sequenceNumber);
- __GLX_SWAP_INT(&reply->length);
- __GLX_SWAP_INT(&reply->retval);
- __GLX_SWAP_INT(&reply->size);
-
- if ( (buf_size == 0) && (swap_vec_element_size > 0) ) {
- /*
- * the reply has single component - need to swap pad3
- */
- if (swap_vec_element_size == 2) {
- __GLX_SWAP_SHORT(&reply->pad3);
- }
- else if (swap_vec_element_size == 4) {
- __GLX_SWAP_INT(&reply->pad3);
- __GLX_SWAP_INT(&reply->pad4); /* some requests use also pad4
- * i.e GetConvolutionFilter
- */
- }
- else if (swap_vec_element_size == 8) {
- __GLX_SWAP_DOUBLE(&reply->pad3);
- }
- }
- else if ( (buf_size > 0) && (swap_vec_element_size > 0) ) {
- /*
- * the reply has vector of elements which needs to be swapped
- */
- int vsize = buf_size / swap_vec_element_size;
- char *p = buf;
- int i;
-
- for (i=0; i<vsize; i++) {
- if (swap_vec_element_size == 2) {
- __GLX_SWAP_SHORT(p);
- }
- else if (swap_vec_element_size == 4) {
- __GLX_SWAP_INT(p);
- }
- else if (swap_vec_element_size == 8) {
- __GLX_SWAP_DOUBLE(p);
- }
-
- p += swap_vec_element_size;
- }
-
- /*
- * swap pad words as well - for case that some single reply uses
- * them as well
- */
- __GLX_SWAP_INT(&reply->pad3);
- __GLX_SWAP_INT(&reply->pad4);
- __GLX_SWAP_INT(&reply->pad5);
- __GLX_SWAP_INT(&reply->pad6);
-
- }
-
- WriteToClient(client, sizeof(xGLXSingleReply),(char *)reply);
- if (buf_size > 0)
- WriteToClient(client, buf_size, (char *)buf);
-
-}
-
-int __glXForwardSingleReq( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- xGLXSingleReq *be_req;
- __GLXcontext *glxc;
- int from_screen = 0;
- int to_screen = 0;
- int buf_size;
- int s;
-
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (!glxc) {
- return 0;
- }
- from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- pc += sz_xGLXSingleReq;
- buf_size = (req->length << 2) - sz_xGLXSingleReq;
-
- /*
- * just forward the request to back-end server(s)
- */
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReqSingle(GLXSingle,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = req->glxCode;
- be_req->length = req->length;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
- UnlockDisplay(dpy);
- SyncHandle();
-
- if (req->glxCode == X_GLsop_Flush) {
- XFlush(dpy);
- }
-
- }
-
- return Success;
-}
-
-int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
-{
- ClientPtr client = cl->client;
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- xGLXSingleReq *be_req;
- xGLXSingleReply reply;
- xGLXSingleReply be_reply;
- __GLXcontext *glxc;
- int buf_size;
- char *be_buf = NULL;
- int be_buf_size;
- DMXScreenInfo *dmxScreen;
- Display *dpy;
-
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (!glxc) {
- return __glXBadContext;
- }
-
- pc += sz_xGLXSingleReq;
- buf_size = (req->length << 2) - sz_xGLXSingleReq;
-
- dmxScreen = &dmxScreens[glxc->pScreen->myNum];
- dpy = GetBackEndDisplay(cl, glxc->pScreen->myNum);
-
- /*
- * send the request to the first back-end server
- */
- LockDisplay(dpy);
- GetReqSingle(GLXSingle,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = req->glxCode;
- be_req->length = req->length;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,glxc->pScreen->myNum);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
-
- /*
- * get the reply from the back-end server
- */
- _XReply(dpy, (xReply*) &be_reply, 0, False);
- be_buf_size = be_reply.length << 2;
- if (be_buf_size > 0) {
- be_buf = (char *)malloc( be_buf_size );
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
- }
- else {
- /* Throw data on the floor */
- _XEatData(dpy, be_buf_size);
- return BadAlloc;
- }
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- /*
- * send the reply to the client
- */
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.length = be_reply.length;
- reply.retval = be_reply.retval;
- reply.size = be_reply.size;
- reply.pad3 = be_reply.pad3;
- reply.pad4 = be_reply.pad4;
-
- if (client->swapped) {
- SendSwappedReply( client, &reply, be_buf, be_buf_size );
- }
- else {
- WriteToClient(client, sizeof(xGLXSingleReply),(char *)&reply);
- if (be_buf_size > 0)
- WriteToClient(client, be_buf_size, (char *)be_buf);
- }
-
- if (be_buf_size > 0) free(be_buf);
-
- return Success;
-}
-
-int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
-{
- ClientPtr client = cl->client;
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- xGLXSingleReq *be_req;
- xGLXSingleReply reply;
- xGLXSingleReply be_reply;
- __GLXcontext *glxc;
- int buf_size;
- char *be_buf = NULL;
- int be_buf_size = 0;
- int from_screen = 0;
- int to_screen = 0;
- int s;
-
- DMXScreenInfo *dmxScreen;
- Display *dpy;
-
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (!glxc) {
- return 0;
- }
- from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- pc += sz_xGLXSingleReq;
- buf_size = (req->length << 2) - sz_xGLXSingleReq;
-
- /*
- * send the request to the first back-end server(s)
- */
- for (s=to_screen; s>=from_screen; s--) {
- dmxScreen = &dmxScreens[s];
- dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReqSingle(GLXSingle,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = req->glxCode;
- be_req->length = req->length;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
-
- /*
- * get the reply from the back-end server
- */
- _XReply(dpy, (xReply*) &be_reply, 0, False);
- be_buf_size = be_reply.length << 2;
- if (be_buf_size > 0) {
- be_buf = (char *)malloc( be_buf_size );
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
- }
- else {
- /* Throw data on the floor */
- _XEatData(dpy, be_buf_size);
- return BadAlloc;
- }
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- if (s > from_screen && be_buf_size > 0) {
- free(be_buf);
- }
- }
-
- /*
- * send the reply to the client
- */
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.length = be_reply.length;
- reply.retval = be_reply.retval;
- reply.size = be_reply.size;
- reply.pad3 = be_reply.pad3;
- reply.pad4 = be_reply.pad4;
-
- if (client->swapped) {
- SendSwappedReply( client, &reply, be_buf, be_buf_size );
- }
- else {
- WriteToClient(client, sizeof(xGLXSingleReply),(char *)&reply);
- if (be_buf_size > 0)
- WriteToClient(client, be_buf_size, (char *)be_buf);
- }
-
- if (be_buf_size > 0) free(be_buf);
-
- return Success;
-}
-
-int __glXForwardSingleReqSwap( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 0;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXForwardSingleReq( cl, pc ) );
-}
-
-int __glXForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 0;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXForwardPipe0WithReply( cl, pc ) );
-}
-
-int __glXForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 2;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
-
- return( __glXForwardPipe0WithReply( cl, pc ) );
-}
-
-int __glXForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 4;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
-
- return( __glXForwardPipe0WithReply( cl, pc ) );
-}
-
-int __glXForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 8;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
-
- return( __glXForwardPipe0WithReply( cl, pc ) );
-}
-
-int __glXForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 0;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
-
- return( __glXForwardAllWithReply( cl, pc ) );
-}
-
-int __glXForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 2;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
-
- return( __glXForwardAllWithReply( cl, pc ) );
-}
-
-int __glXForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 4;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
-
- return( __glXForwardAllWithReply( cl, pc ) );
-}
-
-int __glXForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 8;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
-
- return( __glXForwardAllWithReply( cl, pc ) );
-}
-
-static GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h,
- int *elementbits_return, int *rowbytes_return )
-{
- GLint elements, esize;
- GLint rowsize, padding;
-
- if (w < 0 || h < 0) {
- return -1;
- }
- switch (format) {
- case GL_COLOR_INDEX:
- case GL_STENCIL_INDEX:
- case GL_DEPTH_COMPONENT:
- elements = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- case GL_BGR:
- elements = 3;
- break;
- case GL_RGBA:
- case GL_BGRA:
- case GL_ABGR_EXT:
- elements = 4;
- break;
- default:
- return -1;
- }
- /*
- ** According to the GLX protocol, each row must be padded to a multiple of
- ** 4 bytes. 4 bytes also happens to be the default alignment in the pixel
- ** store modes of the GL.
- */
- switch (type) {
- case GL_BITMAP:
- if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) {
- rowsize = ((w * elements)+7)/8;
- padding = rowsize % 4;
- if (padding) {
- rowsize += 4 - padding;
- }
- if (elementbits_return) *elementbits_return = elements;
- if (rowbytes_return) *rowbytes_return = rowsize;
- return rowsize * h;
- } else {
- return -1;
- }
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- esize = 4;
- elements = 1;
- break;
- default:
- return -1;
- }
- rowsize = w * elements * esize;
- padding = rowsize % 4;
- if (padding) {
- rowsize += 4 - padding;
- }
-
- if (elementbits_return) *elementbits_return = esize*elements*8;
- if (rowbytes_return) *rowbytes_return = rowsize;
-
- return rowsize * h;
-}
-
-static int intersectRect( int x1, int x2, int y1, int y2,
- int X1, int X2, int Y1, int Y2,
- int *ix1, int *ix2, int *iy1, int *iy2 )
-{
- int right = (x2 < X2 ? x2 : X2);
- int bottom = (y2 < Y2 ? y2 : Y2);
- int left = (x1 > X1 ? x1 : X1);
- int top = (y1 > Y1 ? y1 : Y1);
- int width = right - left + 1;
- int height = bottom - top + 1;
-
- if ( (width <= 0) || (height <= 0) ) {
- *ix1 = *ix2 = *iy1 = *iy2 = 0;
- return 0;
- }
- else {
- *ix1 = left;
- *ix2 = right;
- *iy1 = top;
- *iy2 = bottom;
- return width * height;
- }
-
-}
-
-int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- xGLXSingleReq *be_req;
- xGLXReadPixelsReply reply;
- xGLXReadPixelsReply be_reply;
- GLbyte *be_pc;
- GLint x,y;
- GLsizei width, height;
- GLenum format, type;
- GLboolean swapBytes, lsbFirst;
- ClientPtr client = cl->client;
- DrawablePtr pDraw;
- __GLXcontext *glxc;
- int from_screen = 0;
- int to_screen = 0;
- char *buf;
- int buf_size;
- int s;
- int win_x1, win_x2;
- int win_y1, win_y2;
- int ebits, rowsize;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- if (client->swapped) {
- __GLX_SWAP_INT(&req->contextTag);
- }
-
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (!glxc) {
- return 0;
- }
- from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- pc += sz_xGLXSingleReq;
- x = *(GLint *)(pc + 0);
- y = *(GLint *)(pc + 4);
- width = *(GLsizei *)(pc + 8);
- height = *(GLsizei *)(pc + 12);
- format = *(GLenum *)(pc + 16);
- type = *(GLenum *)(pc + 20);
- swapBytes = *(GLboolean *)(pc + 24);
- lsbFirst = *(GLboolean *)(pc + 25);
-
- if (client->swapped) {
- __GLX_SWAP_INT(&x);
- __GLX_SWAP_INT(&y);
- __GLX_SWAP_INT(&width);
- __GLX_SWAP_INT(&height);
- __GLX_SWAP_INT(&format);
- __GLX_SWAP_INT(&type);
- swapBytes = !swapBytes;
- }
-
- buf_size = __glReadPixels_size(format,type,width,height, &ebits, &rowsize);
- if (buf_size > 0) {
- buf = (char *) malloc( buf_size );
- if ( !buf ) {
- return BadAlloc;
- }
- }
- else {
- buf_size = 0;
- buf = NULL;
- }
-
- if (buf_size > 0) {
- /*
- * Get the current drawable this context is bound to
- */
- pDraw = __glXLookupDrawableByTag( cl, req->contextTag );
- win_x1 = pDraw->x + x;
- win_x2 = win_x1 + width - 1;
- win_y1 = (dmxGlobalHeight - pDraw->y - pDraw->height) + y;
- win_y2 = win_y1 + height - 1;
- if (pDraw->type != DRAWABLE_WINDOW) {
- from_screen = to_screen = 0;
- }
-
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
- int scr_x1 = dmxScreen->rootXOrigin;
- int scr_x2 = dmxScreen->rootXOrigin + dmxScreen->scrnWidth - 1;
- int scr_y1 = dmxScreen->rootYOrigin;
- int scr_y2 = dmxScreen->rootYOrigin + dmxScreen->scrnHeight - 1;
- int wx1, wx2, wy1, wy2;
- int sx, sy, sw, sh;
- int npixels;
-
- /*
- * find the window portion that is on the current screen
- */
- if (pDraw->type == DRAWABLE_WINDOW) {
- npixels = intersectRect( scr_x1, scr_x2, scr_y1, scr_y2,
- win_x1, win_x2, win_y1, win_y2,
- &wx1, &wx2, &wy1, &wy2 );
- }
- else {
- wx1 = win_x1;
- wx2 = win_x2;
- wy1 = win_y1;
- wy2 = win_y2;
- npixels = (wx2-wx1+1) * (wy2-wy1+1);
- }
-
- if (npixels > 0) {
-
- /* send the request to the back-end server */
- LockDisplay(dpy);
- GetReqExtra(GLXSingle,__GLX_PAD(26),be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLsop_ReadPixels;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- be_pc = ((GLbyte *)(be_req) + sz_xGLXSingleReq);
-
- sx = wx1 - pDraw->x;
- sy = wy1 - (dmxGlobalHeight - pDraw->y - pDraw->height);
- sw = (wx2-wx1+1);
- sh = (wy2-wy1+1);
-
- *(GLint *)(be_pc + 0) = sx; /* x */
- *(GLint *)(be_pc + 4) = sy; /* y */
- *(GLsizei *)(be_pc + 8) = sw; /* width */
- *(GLsizei *)(be_pc + 12) = sh; /* height */
- *(GLenum *)(be_pc + 16) = format;
- *(GLenum *)(be_pc + 20) = type;
- *(GLboolean *)(be_pc + 24) = swapBytes;
- *(GLboolean *)(be_pc + 25) = lsbFirst;
-
- _XReply(dpy, (xReply*) &be_reply, 0, False);
-
- if (be_reply.length > 0) {
- char *be_buf;
- int be_buf_size = be_reply.length << 2;
-
- be_buf = (char *) malloc( be_buf_size );
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
-
- /* copy pixels data to the right location of the */
- /* reply buffer */
- if ( type != GL_BITMAP ) {
- int pbytes = ebits / 8;
- char *dst = buf + (sy-y)*rowsize + (sx-x)*pbytes;
- char *src = be_buf;
- int pad = (pbytes * sw) % 4;
- int r;
-
- for (r=0; r<sh; r++) {
- memcpy( dst, src, pbytes*sw );
- dst += rowsize;
- src += (pbytes*sw + (pad ? 4-pad : 0) );
- }
- }
- else {
- /* this is a GL_BITMAP pixel type, should copy bits */
- int r;
- int src_rowsize = bits_to_bytes(sw * ebits);
- int src_pad = src_rowsize % 4;
- if ( src_pad ) {
- src_rowsize += (4 - src_pad);
- }
-
- for (r=0; r<sh; r++) {
- unsigned char dst_mask = 0x80 >> (sx % 8);
- unsigned char src_mask = 0x80;
- char *dst = buf + (sy-y+r)*rowsize + (sx-x)/8;
- char *src = be_buf + r*src_rowsize;
- int b;
-
- for (b=0; b<sw*ebits; b++) {
- if ( *src & src_mask ) {
- *dst |= dst_mask;
- }
- else {
- *dst &= ~dst_mask;
- }
-
- if (dst_mask > 1) dst_mask >>= 1;
- else {
- dst_mask = 0x80;
- dst++;
- }
-
- if (src_mask > 1) src_mask >>= 1;
- else {
- src_mask = 0x80;
- src++;
- }
- }
- }
-
- }
-
- free( be_buf );
- }
- else {
- /* Throw data on the floor */
- _XEatData(dpy, be_buf_size);
- free( buf );
- return BadAlloc;
- }
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- } /* of npixels > 0 */
-
- } /* of for loop */
-
- } /* of if buf_size > 0 */
-
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.length = buf_size >> 2;
-
- if (client->swapped) {
- __GLX_SWAP_SHORT(&reply.sequenceNumber);
- __GLX_SWAP_INT(&reply.length);
- }
-
- WriteToClient(client, sizeof(xGLXReadPixelsReply),(char *)&reply);
- if (buf_size > 0) {
- WriteToClient(client, buf_size, (char *)buf);
- free( buf );
- }
-
- return Success;
-}
-
-int __glXDispSwap_GetTexImage(__GLXclientState *cl, GLbyte *pc)
-{
- __GLX_DECLARE_SWAP_VARIABLES;
- GLbyte *lpc = pc;
-
- lpc += sz_xGLXSingleReq;
- __GLX_SWAP_INT(lpc+0);
- __GLX_SWAP_INT(lpc+4);
- __GLX_SWAP_INT(lpc+8);
- __GLX_SWAP_INT(lpc+12);
-
- /* reverse swapBytes */
- *(GLboolean *)(lpc + 16) = ! *(GLboolean *)(lpc + 16);
-
- return( __glXForwardPipe0WithReplySwap( cl, pc ) );
-}
-
-int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
-{
- __GLX_DECLARE_SWAP_VARIABLES;
- GLbyte *lpc = pc;
-
- lpc += sz_xGLXSingleReq;
- __GLX_SWAP_INT(lpc+0);
- __GLX_SWAP_INT(lpc+4);
- __GLX_SWAP_INT(lpc+8);
-
- /* reverse swapBytes */
- *(GLboolean *)(lpc + 12) = ! *(GLboolean *)(lpc + 12);
-
- return( __glXForwardPipe0WithReplySwap( cl, pc ) );
-}
-
-
+/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#ifdef HAVE_DMX_CONFIG_H
+#include <dmx-config.h>
+#endif
+
+#include "dmx.h"
+#include "dmxwindow.h"
+#include "dmxpixmap.h"
+#include "dmxfont.h"
+#include "dmxcb.h"
+
+#include "glxserver.h"
+#include "glxext.h"
+#include "g_disptab.h"
+/* #include "g_disptab_EXT.h" */
+#include "unpack.h"
+#include "glxutil.h"
+
+#include "GL/glxproto.h"
+
+#ifdef PANORAMIX
+#include "panoramiXsrv.h"
+#endif
+
+/*
+ * GetReqSingle - this is the equivalent of GetReq macro
+ * from Xlibint.h but it does not set the reqType field (the opcode).
+ * this is because the GL single opcodes has different naming convension
+ * the other X opcodes (ie. X_GLsop_GetFloatv).
+ */
+#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
+#define GetReqSingle(name, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
+ req->length = (SIZEOF(x##name##Req))>>2;\
+ dpy->bufptr += SIZEOF(x##name##Req);\
+ dpy->request++
+
+#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
+#define GetReqSingle(name, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
+ req->length = (SIZEOF(x/**/name/**/Req))>>2;\
+ dpy->bufptr += SIZEOF(x/**/name/**/Req);\
+ dpy->request++
+#endif
+
+#define X_GLXSingle 0 /* needed by GetReqExtra */
+
+extern Display *GetBackEndDisplay( __GLXclientState *cl, int s );
+extern int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s);
+
+static int swap_vec_element_size = 0;
+
+static void SendSwappedReply( ClientPtr client,
+ xGLXSingleReply *reply,
+ char *buf,
+ int buf_size )
+{
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_SWAP_SHORT(&reply->sequenceNumber);
+ __GLX_SWAP_INT(&reply->length);
+ __GLX_SWAP_INT(&reply->retval);
+ __GLX_SWAP_INT(&reply->size);
+
+ if ( (buf_size == 0) && (swap_vec_element_size > 0) ) {
+ /*
+ * the reply has single component - need to swap pad3
+ */
+ if (swap_vec_element_size == 2) {
+ __GLX_SWAP_SHORT(&reply->pad3);
+ }
+ else if (swap_vec_element_size == 4) {
+ __GLX_SWAP_INT(&reply->pad3);
+ __GLX_SWAP_INT(&reply->pad4); /* some requests use also pad4
+ * i.e GetConvolutionFilter
+ */
+ }
+ else if (swap_vec_element_size == 8) {
+ __GLX_SWAP_DOUBLE(&reply->pad3);
+ }
+ }
+ else if ( (buf_size > 0) && (swap_vec_element_size > 0) ) {
+ /*
+ * the reply has vector of elements which needs to be swapped
+ */
+ int vsize = buf_size / swap_vec_element_size;
+ char *p = buf;
+ int i;
+
+ for (i=0; i<vsize; i++) {
+ if (swap_vec_element_size == 2) {
+ __GLX_SWAP_SHORT(p);
+ }
+ else if (swap_vec_element_size == 4) {
+ __GLX_SWAP_INT(p);
+ }
+ else if (swap_vec_element_size == 8) {
+ __GLX_SWAP_DOUBLE(p);
+ }
+
+ p += swap_vec_element_size;
+ }
+
+ /*
+ * swap pad words as well - for case that some single reply uses
+ * them as well
+ */
+ __GLX_SWAP_INT(&reply->pad3);
+ __GLX_SWAP_INT(&reply->pad4);
+ __GLX_SWAP_INT(&reply->pad5);
+ __GLX_SWAP_INT(&reply->pad6);
+
+ }
+
+ WriteToClient(client, sizeof(xGLXSingleReply),(char *)reply);
+ if (buf_size > 0)
+ WriteToClient(client, buf_size, (char *)buf);
+
+}
+
+int __glXForwardSingleReq( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ xGLXSingleReq *be_req;
+ __GLXcontext *glxc;
+ int from_screen = 0;
+ int to_screen = 0;
+ int buf_size;
+ int s;
+
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (!glxc) {
+ return 0;
+ }
+ from_screen = to_screen = glxc->pScreen->myNum;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ pc += sz_xGLXSingleReq;
+ buf_size = (req->length << 2) - sz_xGLXSingleReq;
+
+ /*
+ * just forward the request to back-end server(s)
+ */
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+
+ LockDisplay(dpy);
+ GetReqSingle(GLXSingle,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = req->glxCode;
+ be_req->length = req->length;
+ be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *)pc, buf_size);
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ if (req->glxCode == X_GLsop_Flush) {
+ XFlush(dpy);
+ }
+
+ }
+
+ return Success;
+}
+
+int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
+{
+ ClientPtr client = cl->client;
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ xGLXSingleReq *be_req;
+ xGLXSingleReply reply;
+ xGLXSingleReply be_reply;
+ __GLXcontext *glxc;
+ int buf_size;
+ char *be_buf = NULL;
+ int be_buf_size;
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
+
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (!glxc) {
+ return __glXBadContext;
+ }
+
+ pc += sz_xGLXSingleReq;
+ buf_size = (req->length << 2) - sz_xGLXSingleReq;
+
+ dmxScreen = &dmxScreens[glxc->pScreen->myNum];
+ dpy = GetBackEndDisplay(cl, glxc->pScreen->myNum);
+
+ /*
+ * send the request to the first back-end server
+ */
+ LockDisplay(dpy);
+ GetReqSingle(GLXSingle,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = req->glxCode;
+ be_req->length = req->length;
+ be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,glxc->pScreen->myNum);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *)pc, buf_size);
+
+ /*
+ * get the reply from the back-end server
+ */
+ _XReply(dpy, (xReply*) &be_reply, 0, False);
+ be_buf_size = be_reply.length << 2;
+ if (be_buf_size > 0) {
+ be_buf = (char *)malloc( be_buf_size );
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatData(dpy, be_buf_size);
+ return BadAlloc;
+ }
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ /*
+ * send the reply to the client
+ */
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.length = be_reply.length;
+ reply.retval = be_reply.retval;
+ reply.size = be_reply.size;
+ reply.pad3 = be_reply.pad3;
+ reply.pad4 = be_reply.pad4;
+
+ if (client->swapped) {
+ SendSwappedReply( client, &reply, be_buf, be_buf_size );
+ }
+ else {
+ WriteToClient(client, sizeof(xGLXSingleReply),(char *)&reply);
+ if (be_buf_size > 0)
+ WriteToClient(client, be_buf_size, (char *)be_buf);
+ }
+
+ if (be_buf_size > 0) free(be_buf);
+
+ return Success;
+}
+
+int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
+{
+ ClientPtr client = cl->client;
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ xGLXSingleReq *be_req;
+ xGLXSingleReply reply;
+ xGLXSingleReply be_reply;
+ __GLXcontext *glxc;
+ int buf_size;
+ char *be_buf = NULL;
+ int be_buf_size = 0;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
+
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
+
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (!glxc) {
+ return 0;
+ }
+ from_screen = to_screen = glxc->pScreen->myNum;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ pc += sz_xGLXSingleReq;
+ buf_size = (req->length << 2) - sz_xGLXSingleReq;
+
+ /*
+ * send the request to the first back-end server(s)
+ */
+ for (s=to_screen; s>=from_screen; s--) {
+ dmxScreen = &dmxScreens[s];
+ dpy = GetBackEndDisplay(cl,s);
+
+ LockDisplay(dpy);
+ GetReqSingle(GLXSingle,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = req->glxCode;
+ be_req->length = req->length;
+ be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *)pc, buf_size);
+
+ /*
+ * get the reply from the back-end server
+ */
+ _XReply(dpy, (xReply*) &be_reply, 0, False);
+ be_buf_size = be_reply.length << 2;
+ if (be_buf_size > 0) {
+ be_buf = (char *)malloc( be_buf_size );
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatData(dpy, be_buf_size);
+ return BadAlloc;
+ }
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ if (s > from_screen && be_buf_size > 0) {
+ free(be_buf);
+ }
+ }
+
+ /*
+ * send the reply to the client
+ */
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.length = be_reply.length;
+ reply.retval = be_reply.retval;
+ reply.size = be_reply.size;
+ reply.pad3 = be_reply.pad3;
+ reply.pad4 = be_reply.pad4;
+
+ if (client->swapped) {
+ SendSwappedReply( client, &reply, be_buf, be_buf_size );
+ }
+ else {
+ WriteToClient(client, sizeof(xGLXSingleReply),(char *)&reply);
+ if (be_buf_size > 0)
+ WriteToClient(client, be_buf_size, (char *)be_buf);
+ }
+
+ if (be_buf_size > 0) free(be_buf);
+
+ return Success;
+}
+
+int __glXForwardSingleReqSwap( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 0;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXSingleReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+ return( __glXForwardSingleReq( cl, pc ) );
+}
+
+int __glXForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 0;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXSingleReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+ return( __glXForwardPipe0WithReply( cl, pc ) );
+}
+
+int __glXForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 2;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXSingleReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+
+ return( __glXForwardPipe0WithReply( cl, pc ) );
+}
+
+int __glXForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 4;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXSingleReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+
+ return( __glXForwardPipe0WithReply( cl, pc ) );
+}
+
+int __glXForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 8;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXSingleReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+
+ return( __glXForwardPipe0WithReply( cl, pc ) );
+}
+
+int __glXForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 0;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXSingleReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+
+ return( __glXForwardAllWithReply( cl, pc ) );
+}
+
+int __glXForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 2;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXSingleReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+
+ return( __glXForwardAllWithReply( cl, pc ) );
+}
+
+int __glXForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 4;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXSingleReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+
+ return( __glXForwardAllWithReply( cl, pc ) );
+}
+
+int __glXForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 8;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXSingleReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+
+ return( __glXForwardAllWithReply( cl, pc ) );
+}
+
+static GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h,
+ int *elementbits_return, int *rowbytes_return )
+{
+ GLint elements, esize;
+ GLint rowsize, padding;
+
+ if (w < 0 || h < 0) {
+ return -1;
+ }
+ switch (format) {
+ case GL_COLOR_INDEX:
+ case GL_STENCIL_INDEX:
+ case GL_DEPTH_COMPONENT:
+ elements = 1;
+ break;
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ elements = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ elements = 2;
+ break;
+ case GL_RGB:
+ case GL_BGR:
+ elements = 3;
+ break;
+ case GL_RGBA:
+ case GL_BGRA:
+ case GL_ABGR_EXT:
+ elements = 4;
+ break;
+ default:
+ return -1;
+ }
+ /*
+ ** According to the GLX protocol, each row must be padded to a multiple of
+ ** 4 bytes. 4 bytes also happens to be the default alignment in the pixel
+ ** store modes of the GL.
+ */
+ switch (type) {
+ case GL_BITMAP:
+ if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) {
+ rowsize = ((w * elements)+7)/8;
+ padding = rowsize % 4;
+ if (padding) {
+ rowsize += 4 - padding;
+ }
+ if (elementbits_return) *elementbits_return = elements;
+ if (rowbytes_return) *rowbytes_return = rowsize;
+ return rowsize * h;
+ } else {
+ return -1;
+ }
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ esize = 1;
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ esize = 1;
+ elements = 1;
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ esize = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ esize = 2;
+ elements = 1;
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ esize = 4;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ esize = 4;
+ elements = 1;
+ break;
+ default:
+ return -1;
+ }
+ rowsize = w * elements * esize;
+ padding = rowsize % 4;
+ if (padding) {
+ rowsize += 4 - padding;
+ }
+
+ if (elementbits_return) *elementbits_return = esize*elements*8;
+ if (rowbytes_return) *rowbytes_return = rowsize;
+
+ return rowsize * h;
+}
+
+static int intersectRect( int x1, int x2, int y1, int y2,
+ int X1, int X2, int Y1, int Y2,
+ int *ix1, int *ix2, int *iy1, int *iy2 )
+{
+ int right = (x2 < X2 ? x2 : X2);
+ int bottom = (y2 < Y2 ? y2 : Y2);
+ int left = (x1 > X1 ? x1 : X1);
+ int top = (y1 > Y1 ? y1 : Y1);
+ int width = right - left + 1;
+ int height = bottom - top + 1;
+
+ if ( (width <= 0) || (height <= 0) ) {
+ *ix1 = *ix2 = *iy1 = *iy2 = 0;
+ return 0;
+ }
+ else {
+ *ix1 = left;
+ *ix2 = right;
+ *iy1 = top;
+ *iy2 = bottom;
+ return width * height;
+ }
+
+}
+
+int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ xGLXSingleReq *be_req;
+ xGLXReadPixelsReply reply;
+ xGLXReadPixelsReply be_reply;
+ GLbyte *be_pc;
+ GLint x,y;
+ GLsizei width, height;
+ GLenum format, type;
+ GLboolean swapBytes, lsbFirst;
+ ClientPtr client = cl->client;
+ DrawablePtr pDraw;
+ __GLXcontext *glxc;
+ int from_screen = 0;
+ int to_screen = 0;
+ char *buf;
+ int buf_size;
+ int s;
+ int win_x1, win_x2;
+ int win_y1, win_y2;
+ int ebits, rowsize;
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ if (client->swapped) {
+ __GLX_SWAP_INT(&req->contextTag);
+ }
+
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (!glxc) {
+ return 0;
+ }
+ from_screen = to_screen = glxc->pScreen->myNum;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ pc += sz_xGLXSingleReq;
+ x = *(GLint *)(pc + 0);
+ y = *(GLint *)(pc + 4);
+ width = *(GLsizei *)(pc + 8);
+ height = *(GLsizei *)(pc + 12);
+ format = *(GLenum *)(pc + 16);
+ type = *(GLenum *)(pc + 20);
+ swapBytes = *(GLboolean *)(pc + 24);
+ lsbFirst = *(GLboolean *)(pc + 25);
+
+ if (client->swapped) {
+ __GLX_SWAP_INT(&x);
+ __GLX_SWAP_INT(&y);
+ __GLX_SWAP_INT(&width);
+ __GLX_SWAP_INT(&height);
+ __GLX_SWAP_INT(&format);
+ __GLX_SWAP_INT(&type);
+ swapBytes = !swapBytes;
+ }
+
+ buf_size = __glReadPixels_size(format,type,width,height, &ebits, &rowsize);
+ if (buf_size > 0) {
+ buf = (char *) malloc( buf_size );
+ if ( !buf ) {
+ return BadAlloc;
+ }
+ }
+ else {
+ buf_size = 0;
+ buf = NULL;
+ }
+
+ if (buf_size > 0) {
+ /*
+ * Get the current drawable this context is bound to
+ */
+ pDraw = __glXLookupDrawableByTag( cl, req->contextTag );
+ win_x1 = pDraw->x + x;
+ win_x2 = win_x1 + width - 1;
+ win_y1 = (dmxGlobalHeight - pDraw->y - pDraw->height) + y;
+ win_y2 = win_y1 + height - 1;
+ if (pDraw->type != DRAWABLE_WINDOW) {
+ from_screen = to_screen = 0;
+ }
+
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+ int scr_x1 = dmxScreen->rootXOrigin;
+ int scr_x2 = dmxScreen->rootXOrigin + dmxScreen->scrnWidth - 1;
+ int scr_y1 = dmxScreen->rootYOrigin;
+ int scr_y2 = dmxScreen->rootYOrigin + dmxScreen->scrnHeight - 1;
+ int wx1, wx2, wy1, wy2;
+ int sx, sy, sw, sh;
+ int npixels;
+
+ /*
+ * find the window portion that is on the current screen
+ */
+ if (pDraw->type == DRAWABLE_WINDOW) {
+ npixels = intersectRect( scr_x1, scr_x2, scr_y1, scr_y2,
+ win_x1, win_x2, win_y1, win_y2,
+ &wx1, &wx2, &wy1, &wy2 );
+ }
+ else {
+ wx1 = win_x1;
+ wx2 = win_x2;
+ wy1 = win_y1;
+ wy2 = win_y2;
+ npixels = (wx2-wx1+1) * (wy2-wy1+1);
+ }
+
+ if (npixels > 0) {
+
+ /* send the request to the back-end server */
+ LockDisplay(dpy);
+ GetReqExtra(GLXSingle,__GLX_PAD(26),be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLsop_ReadPixels;
+ be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
+ be_pc = ((GLbyte *)(be_req) + sz_xGLXSingleReq);
+
+ sx = wx1 - pDraw->x;
+ sy = wy1 - (dmxGlobalHeight - pDraw->y - pDraw->height);
+ sw = (wx2-wx1+1);
+ sh = (wy2-wy1+1);
+
+ *(GLint *)(be_pc + 0) = sx; /* x */
+ *(GLint *)(be_pc + 4) = sy; /* y */
+ *(GLsizei *)(be_pc + 8) = sw; /* width */
+ *(GLsizei *)(be_pc + 12) = sh; /* height */
+ *(GLenum *)(be_pc + 16) = format;
+ *(GLenum *)(be_pc + 20) = type;
+ *(GLboolean *)(be_pc + 24) = swapBytes;
+ *(GLboolean *)(be_pc + 25) = lsbFirst;
+
+ _XReply(dpy, (xReply*) &be_reply, 0, False);
+
+ if (be_reply.length > 0) {
+ char *be_buf;
+ int be_buf_size = be_reply.length << 2;
+
+ be_buf = (char *) malloc( be_buf_size );
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+
+ /* copy pixels data to the right location of the */
+ /* reply buffer */
+ if ( type != GL_BITMAP ) {
+ int pbytes = ebits / 8;
+ char *dst = buf + (sy-y)*rowsize + (sx-x)*pbytes;
+ char *src = be_buf;
+ int pad = (pbytes * sw) % 4;
+ int r;
+
+ for (r=0; r<sh; r++) {
+ memcpy( dst, src, pbytes*sw );
+ dst += rowsize;
+ src += (pbytes*sw + (pad ? 4-pad : 0) );
+ }
+ }
+ else {
+ /* this is a GL_BITMAP pixel type, should copy bits */
+ int r;
+ int src_rowsize = bits_to_bytes(sw * ebits);
+ int src_pad = src_rowsize % 4;
+ if ( src_pad ) {
+ src_rowsize += (4 - src_pad);
+ }
+
+ for (r=0; r<sh; r++) {
+ unsigned char dst_mask = 0x80 >> (sx % 8);
+ unsigned char src_mask = 0x80;
+ char *dst = buf + (sy-y+r)*rowsize + (sx-x)/8;
+ char *src = be_buf + r*src_rowsize;
+ int b;
+
+ for (b=0; b<sw*ebits; b++) {
+ if ( *src & src_mask ) {
+ *dst |= dst_mask;
+ }
+ else {
+ *dst &= ~dst_mask;
+ }
+
+ if (dst_mask > 1) dst_mask >>= 1;
+ else {
+ dst_mask = 0x80;
+ dst++;
+ }
+
+ if (src_mask > 1) src_mask >>= 1;
+ else {
+ src_mask = 0x80;
+ src++;
+ }
+ }
+ }
+
+ }
+
+ free( be_buf );
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatData(dpy, be_buf_size);
+ free( buf );
+ return BadAlloc;
+ }
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ } /* of npixels > 0 */
+
+ } /* of for loop */
+
+ } /* of if buf_size > 0 */
+
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.length = buf_size >> 2;
+
+ if (client->swapped) {
+ __GLX_SWAP_SHORT(&reply.sequenceNumber);
+ __GLX_SWAP_INT(&reply.length);
+ }
+
+ WriteToClient(client, sizeof(xGLXReadPixelsReply),(char *)&reply);
+ if (buf_size > 0) {
+ WriteToClient(client, buf_size, (char *)buf);
+ free( buf );
+ }
+
+ return Success;
+}
+
+int __glXDispSwap_GetTexImage(__GLXclientState *cl, GLbyte *pc)
+{
+ __GLX_DECLARE_SWAP_VARIABLES;
+ GLbyte *lpc = pc;
+
+ lpc += sz_xGLXSingleReq;
+ __GLX_SWAP_INT(lpc+0);
+ __GLX_SWAP_INT(lpc+4);
+ __GLX_SWAP_INT(lpc+8);
+ __GLX_SWAP_INT(lpc+12);
+
+ /* reverse swapBytes */
+ *(GLboolean *)(lpc + 16) = ! *(GLboolean *)(lpc + 16);
+
+ return( __glXForwardPipe0WithReplySwap( cl, pc ) );
+}
+
+int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
+{
+ __GLX_DECLARE_SWAP_VARIABLES;
+ GLbyte *lpc = pc;
+
+ lpc += sz_xGLXSingleReq;
+ __GLX_SWAP_INT(lpc+0);
+ __GLX_SWAP_INT(lpc+4);
+ __GLX_SWAP_INT(lpc+8);
+
+ /* reverse swapBytes */
+ *(GLboolean *)(lpc + 12) = ! *(GLboolean *)(lpc + 12);
+
+ return( __glXForwardPipe0WithReplySwap( cl, pc ) );
+}
+
+
diff --git a/xorg-server/hw/dmx/glxProxy/glxvendor.c b/xorg-server/hw/dmx/glxProxy/glxvendor.c
index 0b6ba4134..9dbc46daa 100644
--- a/xorg-server/hw/dmx/glxProxy/glxvendor.c
+++ b/xorg-server/hw/dmx/glxProxy/glxvendor.c
@@ -1,585 +1,585 @@
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxwindow.h"
-#include "dmxpixmap.h"
-#include "dmxfont.h"
-
-#include "glxserver.h"
-#include "glxext.h"
-#include "g_disptab.h"
-/* #include "g_disptab_EXT.h" */
-#include "unpack.h"
-#include "glxutil.h"
-
-#include "GL/glxproto.h"
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-/*
- * GetReqVendorPrivate - this is the equivalent of GetReq macro
- * from Xlibint.h but it does not set the reqType field (the opcode).
- * this is because the GL single opcodes has different naming convension
- * the other X opcodes (ie. X_GLsop_GetFloatv).
- */
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
-#define GetReqVendorPrivate(name, req) \
- WORD64ALIGN\
- if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
- _XFlush(dpy);\
- req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
- req->length = (SIZEOF(x##name##Req))>>2;\
- dpy->bufptr += SIZEOF(x##name##Req);\
- dpy->request++
-
-#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
-#define GetReqVendorPrivate(name, req) \
- WORD64ALIGN\
- if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
- _XFlush(dpy);\
- req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
- req->length = (SIZEOF(x/**/name/**/Req))>>2;\
- dpy->bufptr += SIZEOF(x/**/name/**/Req);\
- dpy->request++
-#endif
-
-extern Display *GetBackEndDisplay( __GLXclientState *cl, int s );
-extern int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s);
-
-static int swap_vec_element_size = 0;
-
-static void SendSwappedReply( ClientPtr client,
- xGLXVendorPrivReply *reply,
- char *buf,
- int buf_size )
-{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_SHORT(&reply->sequenceNumber);
- __GLX_SWAP_INT(&reply->length);
- __GLX_SWAP_INT(&reply->retval);
- __GLX_SWAP_INT(&reply->size);
-
- if ( (buf_size == 0) && (swap_vec_element_size > 0) ) {
- /*
- * the reply has single component - need to swap pad3
- */
- if (swap_vec_element_size == 2) {
- __GLX_SWAP_SHORT(&reply->pad3);
- }
- else if (swap_vec_element_size == 4) {
- __GLX_SWAP_INT(&reply->pad3);
- __GLX_SWAP_INT(&reply->pad4);
- }
- else if (swap_vec_element_size == 8) {
- __GLX_SWAP_DOUBLE(&reply->pad3);
- }
- }
- else if ( (buf_size > 0) && (swap_vec_element_size > 0) ) {
- /*
- * the reply has vector of elements which needs to be swapped
- */
- int vsize = buf_size / swap_vec_element_size;
- char *p = buf;
- int i;
-
- for (i=0; i<vsize; i++) {
- if (swap_vec_element_size == 2) {
- __GLX_SWAP_SHORT(p);
- }
- else if (swap_vec_element_size == 4) {
- __GLX_SWAP_INT(p);
- }
- else if (swap_vec_element_size == 8) {
- __GLX_SWAP_DOUBLE(p);
- }
-
- p += swap_vec_element_size;
- }
-
- __GLX_SWAP_INT(&reply->pad3);
- __GLX_SWAP_INT(&reply->pad4);
- __GLX_SWAP_INT(&reply->pad5);
- __GLX_SWAP_INT(&reply->pad6);
-
- }
-
- WriteToClient(client, sizeof(xGLXVendorPrivReply),(char *)reply);
- if (buf_size > 0)
- WriteToClient(client, buf_size, (char *)buf);
-
-}
-
-int __glXVForwardSingleReq( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- xGLXVendorPrivateReq *be_req;
- __GLXcontext *glxc;
- int from_screen = 0;
- int to_screen = 0;
- int buf_size;
- int s;
-
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (!glxc) {
- return 0;
- }
- from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- pc += sz_xGLXVendorPrivateReq;
- buf_size = (req->length << 2) - sz_xGLXVendorPrivateReq;
-
- /*
- * just forward the request to back-end server(s)
- */
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReqVendorPrivate(GLXVendorPrivate,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = req->glxCode;
- be_req->length = req->length;
- be_req->vendorCode = req->vendorCode;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
- UnlockDisplay(dpy);
- SyncHandle();
- }
-
- return Success;
-}
-
-int __glXVForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
-{
- ClientPtr client = cl->client;
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- xGLXVendorPrivateReq *be_req;
- xGLXVendorPrivReply reply;
- xGLXVendorPrivReply be_reply;
- __GLXcontext *glxc;
- int buf_size;
- char *be_buf = NULL;
- int be_buf_size;
- DMXScreenInfo *dmxScreen;
- Display *dpy;
-
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (!glxc) {
- return __glXBadContext;
- }
-
- pc += sz_xGLXVendorPrivateReq;
- buf_size = (req->length << 2) - sz_xGLXVendorPrivateReq;
-
- dmxScreen = &dmxScreens[glxc->pScreen->myNum];
- dpy = GetBackEndDisplay(cl, glxc->pScreen->myNum);
-
- /*
- * send the request to the first back-end server
- */
- LockDisplay(dpy);
- GetReqVendorPrivate(GLXVendorPrivate,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = req->glxCode;
- be_req->length = req->length;
- be_req->vendorCode = req->vendorCode;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag, glxc->pScreen->myNum);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
-
- /*
- * get the reply from the back-end server
- */
- _XReply(dpy, (xReply*) &be_reply, 0, False);
- be_buf_size = be_reply.length << 2;
- if (be_buf_size > 0) {
- be_buf = (char *)malloc( be_buf_size );
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
- }
- else {
- /* Throw data on the floor */
- _XEatData(dpy, be_buf_size);
- return BadAlloc;
- }
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- /*
- * send the reply to the client
- */
- memcpy( &reply, &be_reply, sz_xGLXVendorPrivReply );
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
-
- if (client->swapped) {
- SendSwappedReply( client, &reply, be_buf, be_buf_size );
- }
- else {
- WriteToClient(client, sizeof(xGLXVendorPrivReply),(char *)&reply);
- if (be_buf_size > 0)
- WriteToClient(client, be_buf_size, (char *)be_buf);
- }
-
- if (be_buf_size > 0) free(be_buf);
-
- return Success;
-}
-
-int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
-{
- ClientPtr client = cl->client;
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- xGLXVendorPrivateReq *be_req;
- xGLXVendorPrivReply reply;
- xGLXVendorPrivReply be_reply;
- __GLXcontext *glxc;
- int buf_size;
- char *be_buf = NULL;
- int be_buf_size = 0;
- int from_screen = 0;
- int to_screen = 0;
- int s;
-
- DMXScreenInfo *dmxScreen;
- Display *dpy;
-
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (!glxc) {
- return 0;
- }
- from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- }
-#endif
-
- pc += sz_xGLXVendorPrivateReq;
- buf_size = (req->length << 2) - sz_xGLXVendorPrivateReq;
-
- /*
- * send the request to the first back-end server(s)
- */
- for (s=to_screen; s>=from_screen; s--) {
- dmxScreen = &dmxScreens[s];
- dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReqVendorPrivate(GLXVendorPrivate,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = req->glxCode;
- be_req->length = req->length;
- be_req->vendorCode = req->vendorCode;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
-
- /*
- * get the reply from the back-end server
- */
- _XReply(dpy, (xReply*) &be_reply, 0, False);
- be_buf_size = be_reply.length << 2;
- if (be_buf_size > 0) {
- be_buf = (char *)malloc( be_buf_size );
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
- }
- else {
- /* Throw data on the floor */
- _XEatData(dpy, be_buf_size);
- return BadAlloc;
- }
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- if (s > from_screen && be_buf_size > 0) {
- free(be_buf);
- }
- }
-
- /*
- * send the reply to the client
- */
- memcpy( &reply, &be_reply, sz_xGLXVendorPrivReply );
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
-
- if (client->swapped) {
- SendSwappedReply( client, &reply, be_buf, be_buf_size );
- }
- else {
- WriteToClient(client, sizeof(xGLXVendorPrivReply),(char *)&reply);
- if (be_buf_size > 0)
- WriteToClient(client, be_buf_size, (char *)be_buf);
- }
-
- if (be_buf_size > 0) free(be_buf);
-
- return Success;
-}
-
-int __glXVForwardSingleReqSwap( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 0;
-
- return( __glXVForwardSingleReq( cl, pc ) );
-}
-
-int __glXVForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 0;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardPipe0WithReply( cl, pc ) );
-}
-
-int __glXVForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 2;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardPipe0WithReply( cl, pc ) );
-}
-
-int __glXVForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 4;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardPipe0WithReply( cl, pc ) );
-}
-
-int __glXVForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 8;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardPipe0WithReply( cl, pc ) );
-}
-
-int __glXVForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 0;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardAllWithReply( cl, pc ) );
-}
-
-int __glXVForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 2;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardAllWithReply( cl, pc ) );
-}
-
-int __glXVForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 4;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardAllWithReply( cl, pc ) );
-}
-
-int __glXVForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
-{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 8;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardAllWithReply( cl, pc ) );
-}
-
+/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#ifdef HAVE_DMX_CONFIG_H
+#include <dmx-config.h>
+#endif
+
+#include "dmx.h"
+#include "dmxwindow.h"
+#include "dmxpixmap.h"
+#include "dmxfont.h"
+
+#include "glxserver.h"
+#include "glxext.h"
+#include "g_disptab.h"
+/* #include "g_disptab_EXT.h" */
+#include "unpack.h"
+#include "glxutil.h"
+
+#include "GL/glxproto.h"
+
+#ifdef PANORAMIX
+#include "panoramiXsrv.h"
+#endif
+
+/*
+ * GetReqVendorPrivate - this is the equivalent of GetReq macro
+ * from Xlibint.h but it does not set the reqType field (the opcode).
+ * this is because the GL single opcodes has different naming convension
+ * the other X opcodes (ie. X_GLsop_GetFloatv).
+ */
+#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
+#define GetReqVendorPrivate(name, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
+ req->length = (SIZEOF(x##name##Req))>>2;\
+ dpy->bufptr += SIZEOF(x##name##Req);\
+ dpy->request++
+
+#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
+#define GetReqVendorPrivate(name, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
+ req->length = (SIZEOF(x/**/name/**/Req))>>2;\
+ dpy->bufptr += SIZEOF(x/**/name/**/Req);\
+ dpy->request++
+#endif
+
+extern Display *GetBackEndDisplay( __GLXclientState *cl, int s );
+extern int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s);
+
+static int swap_vec_element_size = 0;
+
+static void SendSwappedReply( ClientPtr client,
+ xGLXVendorPrivReply *reply,
+ char *buf,
+ int buf_size )
+{
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_SWAP_SHORT(&reply->sequenceNumber);
+ __GLX_SWAP_INT(&reply->length);
+ __GLX_SWAP_INT(&reply->retval);
+ __GLX_SWAP_INT(&reply->size);
+
+ if ( (buf_size == 0) && (swap_vec_element_size > 0) ) {
+ /*
+ * the reply has single component - need to swap pad3
+ */
+ if (swap_vec_element_size == 2) {
+ __GLX_SWAP_SHORT(&reply->pad3);
+ }
+ else if (swap_vec_element_size == 4) {
+ __GLX_SWAP_INT(&reply->pad3);
+ __GLX_SWAP_INT(&reply->pad4);
+ }
+ else if (swap_vec_element_size == 8) {
+ __GLX_SWAP_DOUBLE(&reply->pad3);
+ }
+ }
+ else if ( (buf_size > 0) && (swap_vec_element_size > 0) ) {
+ /*
+ * the reply has vector of elements which needs to be swapped
+ */
+ int vsize = buf_size / swap_vec_element_size;
+ char *p = buf;
+ int i;
+
+ for (i=0; i<vsize; i++) {
+ if (swap_vec_element_size == 2) {
+ __GLX_SWAP_SHORT(p);
+ }
+ else if (swap_vec_element_size == 4) {
+ __GLX_SWAP_INT(p);
+ }
+ else if (swap_vec_element_size == 8) {
+ __GLX_SWAP_DOUBLE(p);
+ }
+
+ p += swap_vec_element_size;
+ }
+
+ __GLX_SWAP_INT(&reply->pad3);
+ __GLX_SWAP_INT(&reply->pad4);
+ __GLX_SWAP_INT(&reply->pad5);
+ __GLX_SWAP_INT(&reply->pad6);
+
+ }
+
+ WriteToClient(client, sizeof(xGLXVendorPrivReply),(char *)reply);
+ if (buf_size > 0)
+ WriteToClient(client, buf_size, (char *)buf);
+
+}
+
+int __glXVForwardSingleReq( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ xGLXVendorPrivateReq *be_req;
+ __GLXcontext *glxc;
+ int from_screen = 0;
+ int to_screen = 0;
+ int buf_size;
+ int s;
+
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (!glxc) {
+ return 0;
+ }
+ from_screen = to_screen = glxc->pScreen->myNum;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ pc += sz_xGLXVendorPrivateReq;
+ buf_size = (req->length << 2) - sz_xGLXVendorPrivateReq;
+
+ /*
+ * just forward the request to back-end server(s)
+ */
+ for (s=from_screen; s<=to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl,s);
+
+ LockDisplay(dpy);
+ GetReqVendorPrivate(GLXVendorPrivate,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = req->glxCode;
+ be_req->length = req->length;
+ be_req->vendorCode = req->vendorCode;
+ be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *)pc, buf_size);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+
+ return Success;
+}
+
+int __glXVForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
+{
+ ClientPtr client = cl->client;
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ xGLXVendorPrivateReq *be_req;
+ xGLXVendorPrivReply reply;
+ xGLXVendorPrivReply be_reply;
+ __GLXcontext *glxc;
+ int buf_size;
+ char *be_buf = NULL;
+ int be_buf_size;
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
+
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (!glxc) {
+ return __glXBadContext;
+ }
+
+ pc += sz_xGLXVendorPrivateReq;
+ buf_size = (req->length << 2) - sz_xGLXVendorPrivateReq;
+
+ dmxScreen = &dmxScreens[glxc->pScreen->myNum];
+ dpy = GetBackEndDisplay(cl, glxc->pScreen->myNum);
+
+ /*
+ * send the request to the first back-end server
+ */
+ LockDisplay(dpy);
+ GetReqVendorPrivate(GLXVendorPrivate,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = req->glxCode;
+ be_req->length = req->length;
+ be_req->vendorCode = req->vendorCode;
+ be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag, glxc->pScreen->myNum);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *)pc, buf_size);
+
+ /*
+ * get the reply from the back-end server
+ */
+ _XReply(dpy, (xReply*) &be_reply, 0, False);
+ be_buf_size = be_reply.length << 2;
+ if (be_buf_size > 0) {
+ be_buf = (char *)malloc( be_buf_size );
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatData(dpy, be_buf_size);
+ return BadAlloc;
+ }
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ /*
+ * send the reply to the client
+ */
+ memcpy( &reply, &be_reply, sz_xGLXVendorPrivReply );
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+
+ if (client->swapped) {
+ SendSwappedReply( client, &reply, be_buf, be_buf_size );
+ }
+ else {
+ WriteToClient(client, sizeof(xGLXVendorPrivReply),(char *)&reply);
+ if (be_buf_size > 0)
+ WriteToClient(client, be_buf_size, (char *)be_buf);
+ }
+
+ if (be_buf_size > 0) free(be_buf);
+
+ return Success;
+}
+
+int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
+{
+ ClientPtr client = cl->client;
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ xGLXVendorPrivateReq *be_req;
+ xGLXVendorPrivReply reply;
+ xGLXVendorPrivReply be_reply;
+ __GLXcontext *glxc;
+ int buf_size;
+ char *be_buf = NULL;
+ int be_buf_size = 0;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
+
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
+
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (!glxc) {
+ return 0;
+ }
+ from_screen = to_screen = glxc->pScreen->myNum;
+
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension) {
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ }
+#endif
+
+ pc += sz_xGLXVendorPrivateReq;
+ buf_size = (req->length << 2) - sz_xGLXVendorPrivateReq;
+
+ /*
+ * send the request to the first back-end server(s)
+ */
+ for (s=to_screen; s>=from_screen; s--) {
+ dmxScreen = &dmxScreens[s];
+ dpy = GetBackEndDisplay(cl,s);
+
+ LockDisplay(dpy);
+ GetReqVendorPrivate(GLXVendorPrivate,be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = req->glxCode;
+ be_req->length = req->length;
+ be_req->vendorCode = req->vendorCode;
+ be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *)pc, buf_size);
+
+ /*
+ * get the reply from the back-end server
+ */
+ _XReply(dpy, (xReply*) &be_reply, 0, False);
+ be_buf_size = be_reply.length << 2;
+ if (be_buf_size > 0) {
+ be_buf = (char *)malloc( be_buf_size );
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatData(dpy, be_buf_size);
+ return BadAlloc;
+ }
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ if (s > from_screen && be_buf_size > 0) {
+ free(be_buf);
+ }
+ }
+
+ /*
+ * send the reply to the client
+ */
+ memcpy( &reply, &be_reply, sz_xGLXVendorPrivReply );
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+
+ if (client->swapped) {
+ SendSwappedReply( client, &reply, be_buf, be_buf_size );
+ }
+ else {
+ WriteToClient(client, sizeof(xGLXVendorPrivReply),(char *)&reply);
+ if (be_buf_size > 0)
+ WriteToClient(client, be_buf_size, (char *)be_buf);
+ }
+
+ if (be_buf_size > 0) free(be_buf);
+
+ return Success;
+}
+
+int __glXVForwardSingleReqSwap( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 0;
+
+ return( __glXVForwardSingleReq( cl, pc ) );
+}
+
+int __glXVForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 0;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXVendorPrivateReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+ return( __glXVForwardPipe0WithReply( cl, pc ) );
+}
+
+int __glXVForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 2;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXVendorPrivateReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+ return( __glXVForwardPipe0WithReply( cl, pc ) );
+}
+
+int __glXVForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 4;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXVendorPrivateReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+ return( __glXVForwardPipe0WithReply( cl, pc ) );
+}
+
+int __glXVForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 8;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXVendorPrivateReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+ return( __glXVForwardPipe0WithReply( cl, pc ) );
+}
+
+int __glXVForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 0;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXVendorPrivateReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+ return( __glXVForwardAllWithReply( cl, pc ) );
+}
+
+int __glXVForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 2;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXVendorPrivateReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+ return( __glXVForwardAllWithReply( cl, pc ) );
+}
+
+int __glXVForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 4;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXVendorPrivateReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+ return( __glXVForwardAllWithReply( cl, pc ) );
+}
+
+int __glXVForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 8;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq/4) {
+ int *data = (int *)(req+1);
+ int count = req->length - sz_xGLXVendorPrivateReq/4;
+ __GLX_SWAP_INT_ARRAY(data, count );
+ }
+
+ return( __glXVForwardAllWithReply( cl, pc ) );
+}
+
diff --git a/xorg-server/hw/dmx/glxProxy/render2swap.c b/xorg-server/hw/dmx/glxProxy/render2swap.c
index 81bb501ea..70ed5e802 100644
--- a/xorg-server/hw/dmx/glxProxy/render2swap.c
+++ b/xorg-server/hw/dmx/glxProxy/render2swap.c
@@ -1,286 +1,286 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxserver.h"
-#include "unpack.h"
-#include "g_disptab.h"
-
-GLint __glEvalComputeK(GLenum target)
-{
- switch (target) {
- case GL_MAP1_VERTEX_4:
- case GL_MAP1_COLOR_4:
- case GL_MAP1_TEXTURE_COORD_4:
- case GL_MAP2_VERTEX_4:
- case GL_MAP2_COLOR_4:
- case GL_MAP2_TEXTURE_COORD_4:
- return 4;
- case GL_MAP1_VERTEX_3:
- case GL_MAP1_TEXTURE_COORD_3:
- case GL_MAP1_NORMAL:
- case GL_MAP2_VERTEX_3:
- case GL_MAP2_TEXTURE_COORD_3:
- case GL_MAP2_NORMAL:
- return 3;
- case GL_MAP1_TEXTURE_COORD_2:
- case GL_MAP2_TEXTURE_COORD_2:
- return 2;
- case GL_MAP1_TEXTURE_COORD_1:
- case GL_MAP2_TEXTURE_COORD_1:
- case GL_MAP1_INDEX:
- case GL_MAP2_INDEX:
- return 1;
- default:
- return 0;
- }
-}
-
-void __glXDispSwap_Map1f(GLbyte *pc)
-{
- GLint order, k;
- GLfloat u1, u2, *points;
- GLenum target;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_FLOAT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
-
- target = *(GLenum *)(pc + 0);
- order = *(GLint *)(pc + 12);
- u1 = *(GLfloat *)(pc + 4);
- u2 = *(GLfloat *)(pc + 8);
- points = (GLfloat *)(pc + 16);
- k = __glEvalComputeK(target);
-
- if (order <= 0 || k < 0) {
- /* Erroneous command. */
- compsize = 0;
- } else {
- compsize = order * k;
- }
- __GLX_SWAP_FLOAT_ARRAY(points, compsize);
-
-}
-
-void __glXDispSwap_Map2f(GLbyte *pc)
-{
- GLint uorder, vorder, ustride, vstride, k;
- GLfloat u1, u2, v1, v2, *points;
- GLenum target;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 24);
- __GLX_SWAP_FLOAT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
- __GLX_SWAP_FLOAT(pc + 16);
- __GLX_SWAP_FLOAT(pc + 20);
-
- target = *(GLenum *)(pc + 0);
- uorder = *(GLint *)(pc + 12);
- vorder = *(GLint *)(pc + 24);
- u1 = *(GLfloat *)(pc + 4);
- u2 = *(GLfloat *)(pc + 8);
- v1 = *(GLfloat *)(pc + 16);
- v2 = *(GLfloat *)(pc + 20);
- points = (GLfloat *)(pc + 28);
-
- k = __glEvalComputeK(target);
- ustride = vorder * k;
- vstride = k;
-
- if (vorder <= 0 || uorder <= 0 || k < 0) {
- /* Erroneous command. */
- compsize = 0;
- } else {
- compsize = uorder * vorder * k;
- }
- __GLX_SWAP_FLOAT_ARRAY(points, compsize);
-
-}
-
-void __glXDispSwap_Map1d(GLbyte *pc)
-{
- GLint order, k, compsize;
- GLenum target;
- GLdouble u1, u2, *points;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_DOUBLE(pc + 0);
- __GLX_SWAP_DOUBLE(pc + 8);
- __GLX_SWAP_INT(pc + 16);
- __GLX_SWAP_INT(pc + 20);
-
- target = *(GLenum*) (pc + 16);
- order = *(GLint*) (pc + 20);
- k = __glEvalComputeK(target);
- if (order <= 0 || k < 0) {
- /* Erroneous command. */
- compsize = 0;
- } else {
- compsize = order * k;
- }
- __GLX_GET_DOUBLE(u1,pc);
- __GLX_GET_DOUBLE(u2,pc+8);
- __GLX_SWAP_DOUBLE_ARRAY(pc+24, compsize);
- pc += 24;
-
-#ifdef __GLX_ALIGN64
- if (((unsigned long)pc) & 7) {
- /*
- ** Copy the doubles up 4 bytes, trashing the command but aligning
- ** the data in the process
- */
- __GLX_MEM_COPY(pc-4, pc, compsize*8);
- points = (GLdouble*) (pc - 4);
- } else {
- points = (GLdouble*) pc;
- }
-#else
- points = (GLdouble*) pc;
-#endif
-}
-
-void __glXDispSwap_Map2d(GLbyte *pc)
-{
- GLdouble u1, u2, v1, v2, *points;
- GLint uorder, vorder, ustride, vstride, k, compsize;
- GLenum target;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_DOUBLE(pc + 0);
- __GLX_SWAP_DOUBLE(pc + 8);
- __GLX_SWAP_DOUBLE(pc + 16);
- __GLX_SWAP_DOUBLE(pc + 24);
- __GLX_SWAP_INT(pc + 32);
- __GLX_SWAP_INT(pc + 36);
- __GLX_SWAP_INT(pc + 40);
-
- target = *(GLenum *)(pc + 32);
- uorder = *(GLint *)(pc + 36);
- vorder = *(GLint *)(pc + 40);
- k = __glEvalComputeK(target);
- if (vorder <= 0 || uorder <= 0 || k < 0) {
- /* Erroneous command. */
- compsize = 0;
- } else {
- compsize = uorder * vorder * k;
- }
- __GLX_GET_DOUBLE(u1,pc);
- __GLX_GET_DOUBLE(u2,pc+8);
- __GLX_GET_DOUBLE(v1,pc+16);
- __GLX_GET_DOUBLE(v2,pc+24);
- __GLX_SWAP_DOUBLE_ARRAY(pc+44, compsize);
- pc += 44;
- ustride = vorder * k;
- vstride = k;
-
-#ifdef __GLX_ALIGN64
- if (((unsigned long)pc) & 7) {
- /*
- ** Copy the doubles up 4 bytes, trashing the command but aligning
- ** the data in the process
- */
- __GLX_MEM_COPY(pc-4, pc, compsize*8);
- points = (GLdouble*) (pc - 4);
- } else {
- points = (GLdouble*) pc;
- }
-#else
- points = (GLdouble*) pc;
-#endif
-}
-
-void __glXDispSwap_CallLists(GLbyte *pc)
-{
- GLenum type;
- GLsizei n;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 0);
- type = *(GLenum *)(pc + 4);
- n = *(GLsizei *)(pc + 0);
-
- switch (type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- case GL_2_BYTES:
- case GL_3_BYTES:
- case GL_4_BYTES:
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- __GLX_SWAP_SHORT_ARRAY(pc+8, n);
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- __GLX_SWAP_INT_ARRAY(pc+8, n);
- break;
- case GL_FLOAT:
- __GLX_SWAP_FLOAT_ARRAY(pc+8, n);
- break;
- }
-
-}
-
-void __glXDispSwap_DrawArrays(GLbyte *pc)
-{
- __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *)pc;
- __GLXdispatchDrawArraysComponentHeader *compHeader;
- int i;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT(&hdr->numVertexes);
- __GLX_SWAP_INT(&hdr->numComponents);
- __GLX_SWAP_INT(&hdr->primType);
-
- pc += sizeof(__GLXdispatchDrawArraysHeader);
- compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc;
-
- /* compute stride (same for all component arrays) */
- for (i=0; i<hdr->numComponents; i++) {
- __GLX_SWAP_INT(&compHeader[i].datatype);
- __GLX_SWAP_INT(&compHeader[i].numVals);
- __GLX_SWAP_INT(&compHeader[i].component);
-
- }
-
-}
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#include "glxserver.h"
+#include "unpack.h"
+#include "g_disptab.h"
+
+GLint __glEvalComputeK(GLenum target)
+{
+ switch (target) {
+ case GL_MAP1_VERTEX_4:
+ case GL_MAP1_COLOR_4:
+ case GL_MAP1_TEXTURE_COORD_4:
+ case GL_MAP2_VERTEX_4:
+ case GL_MAP2_COLOR_4:
+ case GL_MAP2_TEXTURE_COORD_4:
+ return 4;
+ case GL_MAP1_VERTEX_3:
+ case GL_MAP1_TEXTURE_COORD_3:
+ case GL_MAP1_NORMAL:
+ case GL_MAP2_VERTEX_3:
+ case GL_MAP2_TEXTURE_COORD_3:
+ case GL_MAP2_NORMAL:
+ return 3;
+ case GL_MAP1_TEXTURE_COORD_2:
+ case GL_MAP2_TEXTURE_COORD_2:
+ return 2;
+ case GL_MAP1_TEXTURE_COORD_1:
+ case GL_MAP2_TEXTURE_COORD_1:
+ case GL_MAP1_INDEX:
+ case GL_MAP2_INDEX:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+void __glXDispSwap_Map1f(GLbyte *pc)
+{
+ GLint order, k;
+ GLfloat u1, u2, *points;
+ GLenum target;
+ GLint compsize;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
+
+ target = *(GLenum *)(pc + 0);
+ order = *(GLint *)(pc + 12);
+ u1 = *(GLfloat *)(pc + 4);
+ u2 = *(GLfloat *)(pc + 8);
+ points = (GLfloat *)(pc + 16);
+ k = __glEvalComputeK(target);
+
+ if (order <= 0 || k < 0) {
+ /* Erroneous command. */
+ compsize = 0;
+ } else {
+ compsize = order * k;
+ }
+ __GLX_SWAP_FLOAT_ARRAY(points, compsize);
+
+}
+
+void __glXDispSwap_Map2f(GLbyte *pc)
+{
+ GLint uorder, vorder, ustride, vstride, k;
+ GLfloat u1, u2, v1, v2, *points;
+ GLenum target;
+ GLint compsize;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 24);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_FLOAT(pc + 16);
+ __GLX_SWAP_FLOAT(pc + 20);
+
+ target = *(GLenum *)(pc + 0);
+ uorder = *(GLint *)(pc + 12);
+ vorder = *(GLint *)(pc + 24);
+ u1 = *(GLfloat *)(pc + 4);
+ u2 = *(GLfloat *)(pc + 8);
+ v1 = *(GLfloat *)(pc + 16);
+ v2 = *(GLfloat *)(pc + 20);
+ points = (GLfloat *)(pc + 28);
+
+ k = __glEvalComputeK(target);
+ ustride = vorder * k;
+ vstride = k;
+
+ if (vorder <= 0 || uorder <= 0 || k < 0) {
+ /* Erroneous command. */
+ compsize = 0;
+ } else {
+ compsize = uorder * vorder * k;
+ }
+ __GLX_SWAP_FLOAT_ARRAY(points, compsize);
+
+}
+
+void __glXDispSwap_Map1d(GLbyte *pc)
+{
+ GLint order, k, compsize;
+ GLenum target;
+ GLdouble u1, u2, *points;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 8);
+ __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 20);
+
+ target = *(GLenum*) (pc + 16);
+ order = *(GLint*) (pc + 20);
+ k = __glEvalComputeK(target);
+ if (order <= 0 || k < 0) {
+ /* Erroneous command. */
+ compsize = 0;
+ } else {
+ compsize = order * k;
+ }
+ __GLX_GET_DOUBLE(u1,pc);
+ __GLX_GET_DOUBLE(u2,pc+8);
+ __GLX_SWAP_DOUBLE_ARRAY(pc+24, compsize);
+ pc += 24;
+
+#ifdef __GLX_ALIGN64
+ if (((unsigned long)pc) & 7) {
+ /*
+ ** Copy the doubles up 4 bytes, trashing the command but aligning
+ ** the data in the process
+ */
+ __GLX_MEM_COPY(pc-4, pc, compsize*8);
+ points = (GLdouble*) (pc - 4);
+ } else {
+ points = (GLdouble*) pc;
+ }
+#else
+ points = (GLdouble*) pc;
+#endif
+}
+
+void __glXDispSwap_Map2d(GLbyte *pc)
+{
+ GLdouble u1, u2, v1, v2, *points;
+ GLint uorder, vorder, ustride, vstride, k, compsize;
+ GLenum target;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 8);
+ __GLX_SWAP_DOUBLE(pc + 16);
+ __GLX_SWAP_DOUBLE(pc + 24);
+ __GLX_SWAP_INT(pc + 32);
+ __GLX_SWAP_INT(pc + 36);
+ __GLX_SWAP_INT(pc + 40);
+
+ target = *(GLenum *)(pc + 32);
+ uorder = *(GLint *)(pc + 36);
+ vorder = *(GLint *)(pc + 40);
+ k = __glEvalComputeK(target);
+ if (vorder <= 0 || uorder <= 0 || k < 0) {
+ /* Erroneous command. */
+ compsize = 0;
+ } else {
+ compsize = uorder * vorder * k;
+ }
+ __GLX_GET_DOUBLE(u1,pc);
+ __GLX_GET_DOUBLE(u2,pc+8);
+ __GLX_GET_DOUBLE(v1,pc+16);
+ __GLX_GET_DOUBLE(v2,pc+24);
+ __GLX_SWAP_DOUBLE_ARRAY(pc+44, compsize);
+ pc += 44;
+ ustride = vorder * k;
+ vstride = k;
+
+#ifdef __GLX_ALIGN64
+ if (((unsigned long)pc) & 7) {
+ /*
+ ** Copy the doubles up 4 bytes, trashing the command but aligning
+ ** the data in the process
+ */
+ __GLX_MEM_COPY(pc-4, pc, compsize*8);
+ points = (GLdouble*) (pc - 4);
+ } else {
+ points = (GLdouble*) pc;
+ }
+#else
+ points = (GLdouble*) pc;
+#endif
+}
+
+void __glXDispSwap_CallLists(GLbyte *pc)
+{
+ GLenum type;
+ GLsizei n;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ type = *(GLenum *)(pc + 4);
+ n = *(GLsizei *)(pc + 0);
+
+ switch (type) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ case GL_2_BYTES:
+ case GL_3_BYTES:
+ case GL_4_BYTES:
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ __GLX_SWAP_SHORT_ARRAY(pc+8, n);
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ __GLX_SWAP_INT_ARRAY(pc+8, n);
+ break;
+ case GL_FLOAT:
+ __GLX_SWAP_FLOAT_ARRAY(pc+8, n);
+ break;
+ }
+
+}
+
+void __glXDispSwap_DrawArrays(GLbyte *pc)
+{
+ __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *)pc;
+ __GLXdispatchDrawArraysComponentHeader *compHeader;
+ int i;
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT(&hdr->numVertexes);
+ __GLX_SWAP_INT(&hdr->numComponents);
+ __GLX_SWAP_INT(&hdr->primType);
+
+ pc += sizeof(__GLXdispatchDrawArraysHeader);
+ compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc;
+
+ /* compute stride (same for all component arrays) */
+ for (i=0; i<hdr->numComponents; i++) {
+ __GLX_SWAP_INT(&compHeader[i].datatype);
+ __GLX_SWAP_INT(&compHeader[i].numVals);
+ __GLX_SWAP_INT(&compHeader[i].component);
+
+ }
+
+}
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index 5dfde07f6..4519398a9 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -63,8 +63,11 @@ Bool EphyrWantGrayScale = 0;
Bool
ephyrInitialize (KdCardInfo *card, EphyrPriv *priv)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
OsSignal(SIGUSR1, hostx_handle_signal);
-
+#endif
priv->base = 0;
priv->bytes_per_line = 0;
return TRUE;
@@ -798,21 +801,29 @@ ephyrUpdateModifierState(unsigned int state)
static void
ephyrBlockSigio (void)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
sigset_t set;
sigemptyset (&set);
sigaddset (&set, SIGIO);
sigprocmask (SIG_BLOCK, &set, 0);
+#endif
}
static void
ephyrUnblockSigio (void)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
sigset_t set;
sigemptyset (&set);
sigaddset (&set, SIGIO);
sigprocmask (SIG_UNBLOCK, &set, 0);
+#endif
}
static Bool
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.h b/xorg-server/hw/kdrive/ephyr/ephyr.h
index 41a82bf9d..e4ce84dee 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.h
@@ -1,203 +1,207 @@
-/*
- * Xephyr - A kdrive X server thats runs in a host X window.
- * Authored by Matthew Allum <mallum@o-hand.com>
- *
- * Copyright 2004 Nokia
- *
- * 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, and that the name of Nokia not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Nokia makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _EPHYR_H_
-#define _EPHYR_H_
-#include <stdio.h>
-#include <unistd.h>
-#include <signal.h>
-#include <libgen.h>
-
-#include "os.h" /* for OsSignal() */
-#include "kdrive.h"
-#include "hostx.h"
-#include "exa.h"
-
-#ifdef RANDR
-#include "randrstr.h"
-#endif
-
-#include "damage.h"
-
-typedef struct _ephyrPriv {
- CARD8 *base;
- int bytes_per_line;
-} EphyrPriv;
-
-typedef struct _ephyrFakexaPriv {
- ExaDriverPtr exa;
- Bool is_synced;
-
- /* The following are arguments and other information from Prepare* calls
- * which are stored for use in the inner calls.
- */
- int op;
- PicturePtr pSrcPicture, pMaskPicture, pDstPicture;
- void *saved_ptrs[3];
- PixmapPtr pDst, pSrc, pMask;
- GCPtr pGC;
-} EphyrFakexaPriv;
-
-typedef struct _ephyrScrPriv {
- Rotation randr;
- Bool shadow;
- DamagePtr pDamage;
- EphyrFakexaPriv *fakexa;
-} EphyrScrPriv;
-
-extern KdCardFuncs ephyrFuncs;
-extern KdKeyboardInfo *ephyrKbd;
-extern KdPointerInfo *ephyrMouse;
-
-extern miPointerScreenFuncRec ephyrPointerScreenFuncs;
-
-Bool
-ephyrInitialize (KdCardInfo *card, EphyrPriv *priv);
-
-Bool
-ephyrCardInit (KdCardInfo *card);
-
-Bool
-ephyrScreenInit (KdScreenInfo *screen);
-
-Bool
-ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv);
-
-Bool
-ephyrInitScreen (ScreenPtr pScreen);
-
-Bool
-ephyrFinishInitScreen (ScreenPtr pScreen);
-
-Bool
-ephyrCreateResources (ScreenPtr pScreen);
-
-void
-ephyrPreserve (KdCardInfo *card);
-
-Bool
-ephyrEnable (ScreenPtr pScreen);
-
-Bool
-ephyrDPMS (ScreenPtr pScreen, int mode);
-
-void
-ephyrDisable (ScreenPtr pScreen);
-
-void
-ephyrRestore (KdCardInfo *card);
-
-void
-ephyrScreenFini (KdScreenInfo *screen);
-
-void
-ephyrCardFini (KdCardInfo *card);
-
-void
-ephyrGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
-
-void
-ephyrPutColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
-
-Bool
-ephyrMapFramebuffer (KdScreenInfo *screen);
-
-void *
-ephyrWindowLinear (ScreenPtr pScreen,
- CARD32 row,
- CARD32 offset,
- int mode,
- CARD32 *size,
- void *closure);
-
-void
-ephyrSetScreenSizes (ScreenPtr pScreen);
-
-Bool
-ephyrUnmapFramebuffer (KdScreenInfo *screen);
-
-void
-ephyrUnsetInternalDamage (ScreenPtr pScreen);
-
-Bool
-ephyrSetInternalDamage (ScreenPtr pScreen);
-
-Bool
-ephyrCreateColormap (ColormapPtr pmap);
-
-void
-ephyrPoll(void);
-
-#ifdef RANDR
-Bool
-ephyrRandRGetInfo (ScreenPtr pScreen, Rotation *rotations);
-
-Bool
-ephyrRandRSetConfig (ScreenPtr pScreen,
- Rotation randr,
- int rate,
- RRScreenSizePtr pSize);
-Bool
-ephyrRandRInit (ScreenPtr pScreen);
-
-void
-ephyrShadowUpdate (ScreenPtr pScreen, shadowBufPtr pBuf);
-
-#endif
-
-void
-ephyrUpdateModifierState(unsigned int state);
-
-extern KdPointerDriver EphyrMouseDriver;
-
-extern KdKeyboardDriver EphyrKeyboardDriver;
-
-extern KdOsFuncs EphyrOsFuncs;
-
-extern Bool ephyrCursorInit(ScreenPtr pScreen);
-
-extern void ephyrCursorEnable(ScreenPtr pScreen);
-
-extern int ephyrBufferHeight(KdScreenInfo *screen);
-
-/* ephyr_draw.c */
-
-Bool
-ephyrDrawInit(ScreenPtr pScreen);
-
-void
-ephyrDrawEnable(ScreenPtr pScreen);
-
-void
-ephyrDrawDisable(ScreenPtr pScreen);
-
-void
-ephyrDrawFini(ScreenPtr pScreen);
-
-/*ephyvideo.c*/
-
-Bool ephyrInitVideo(ScreenPtr pScreen) ;
-
-#endif
+/*
+ * Xephyr - A kdrive X server thats runs in a host X window.
+ * Authored by Matthew Allum <mallum@o-hand.com>
+ *
+ * Copyright 2004 Nokia
+ *
+ * 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, and that the name of Nokia not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Nokia makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _EPHYR_H_
+#define _EPHYR_H_
+#include <stdio.h>
+#ifndef _MSC_VER
+#include <unistd.h>
+#include <libgen.h>
+#endif
+#include <signal.h>
+
+#include "os.h" /* for OsSignal() */
+#include "kdrive.h"
+#include "hostx.h"
+#include "exa.h"
+
+#ifdef RANDR
+#include "randrstr.h"
+#endif
+
+#include "damage.h"
+
+typedef struct _ephyrPriv {
+ CARD8 *base;
+ int bytes_per_line;
+} EphyrPriv;
+
+typedef struct _ephyrFakexaPriv {
+ ExaDriverPtr exa;
+ Bool is_synced;
+
+ /* The following are arguments and other information from Prepare* calls
+ * which are stored for use in the inner calls.
+ */
+ int op;
+ PicturePtr pSrcPicture, pMaskPicture, pDstPicture;
+ void *saved_ptrs[3];
+ PixmapPtr pDst, pSrc, pMask;
+ GCPtr pGC;
+} EphyrFakexaPriv;
+
+typedef struct _ephyrScrPriv {
+ Rotation randr;
+ Bool shadow;
+ DamagePtr pDamage;
+ EphyrFakexaPriv *fakexa;
+} EphyrScrPriv;
+
+extern KdCardFuncs ephyrFuncs;
+extern KdKeyboardInfo *ephyrKbd;
+extern KdPointerInfo *ephyrMouse;
+
+extern miPointerScreenFuncRec ephyrPointerScreenFuncs;
+
+Bool
+ephyrInitialize (KdCardInfo *card, EphyrPriv *priv);
+
+Bool
+ephyrCardInit (KdCardInfo *card);
+
+Bool
+ephyrScreenInit (KdScreenInfo *screen);
+
+Bool
+ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv);
+
+Bool
+ephyrInitScreen (ScreenPtr pScreen);
+
+Bool
+ephyrFinishInitScreen (ScreenPtr pScreen);
+
+Bool
+ephyrCreateResources (ScreenPtr pScreen);
+
+void
+ephyrPreserve (KdCardInfo *card);
+
+Bool
+ephyrEnable (ScreenPtr pScreen);
+
+Bool
+ephyrDPMS (ScreenPtr pScreen, int mode);
+
+void
+ephyrDisable (ScreenPtr pScreen);
+
+void
+ephyrRestore (KdCardInfo *card);
+
+void
+ephyrScreenFini (KdScreenInfo *screen);
+
+void
+ephyrCardFini (KdCardInfo *card);
+
+void
+ephyrGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
+
+void
+ephyrPutColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
+
+Bool
+ephyrMapFramebuffer (KdScreenInfo *screen);
+
+void *
+ephyrWindowLinear (ScreenPtr pScreen,
+ CARD32 row,
+ CARD32 offset,
+ int mode,
+ CARD32 *size,
+ void *closure);
+
+void
+ephyrSetScreenSizes (ScreenPtr pScreen);
+
+Bool
+ephyrUnmapFramebuffer (KdScreenInfo *screen);
+
+void
+ephyrUnsetInternalDamage (ScreenPtr pScreen);
+
+Bool
+ephyrSetInternalDamage (ScreenPtr pScreen);
+
+Bool
+ephyrCreateColormap (ColormapPtr pmap);
+
+void
+ephyrPoll(void);
+
+#ifdef RANDR
+Bool
+ephyrRandRGetInfo (ScreenPtr pScreen, Rotation *rotations);
+
+Bool
+ephyrRandRSetConfig (ScreenPtr pScreen,
+ Rotation randr,
+ int rate,
+ RRScreenSizePtr pSize);
+Bool
+ephyrRandRInit (ScreenPtr pScreen);
+
+void
+ephyrShadowUpdate (ScreenPtr pScreen, shadowBufPtr pBuf);
+
+#endif
+
+void
+ephyrUpdateModifierState(unsigned int state);
+
+extern KdPointerDriver EphyrMouseDriver;
+
+extern KdKeyboardDriver EphyrKeyboardDriver;
+
+extern KdOsFuncs EphyrOsFuncs;
+
+extern Bool ephyrCursorInit(ScreenPtr pScreen);
+
+extern void ephyrCursorEnable(ScreenPtr pScreen);
+
+extern int ephyrBufferHeight(KdScreenInfo *screen);
+
+extern int ephyrBufferHeight(KdScreenInfo *screen);
+
+/* ephyr_draw.c */
+
+Bool
+ephyrDrawInit(ScreenPtr pScreen);
+
+void
+ephyrDrawEnable(ScreenPtr pScreen);
+
+void
+ephyrDrawDisable(ScreenPtr pScreen);
+
+void
+ephyrDrawFini(ScreenPtr pScreen);
+
+/*ephyvideo.c*/
+
+Bool ephyrInitVideo(ScreenPtr pScreen) ;
+
+#endif
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
index 27cab3b63..b90b92bac 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
@@ -1,415 +1,427 @@
-/*
- * Xephyr - A kdrive X server thats runs in a host X window.
- * Authored by Matthew Allum <mallum@o-hand.com>
- *
- * Copyright 2004 Nokia
- *
- * 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, and that the name of Nokia not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Nokia makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <kdrive-config.h>
-#endif
-#include "ephyr.h"
-#include "ephyrlog.h"
-
-extern Window EphyrPreExistingHostWin;
-extern Bool EphyrWantGrayScale;
-extern Bool kdHasPointer;
-extern Bool kdHasKbd;
-
-#ifdef GLXEXT
-extern Bool ephyrNoDRI;
-extern Bool noGlxVisualInit;
-#endif
-extern Bool ephyrNoXV;
-
-#ifdef KDRIVE_EVDEV
-extern KdPointerDriver LinuxEvdevMouseDriver;
-extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
-#endif
-
-void processScreenArg (char *screen_size, char *parent_id) ;
-
-void
-InitCard (char *name)
-{
- EPHYR_DBG("mark");
- KdCardInfoAdd (&ephyrFuncs, 0);
-}
-
-void
-InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
-{
- KdInitOutput (pScreenInfo, argc, argv);
-}
-
-void
-InitInput (int argc, char **argv)
-{
- KdKeyboardInfo *ki;
- KdPointerInfo *pi;
-
- KdAddKeyboardDriver(&EphyrKeyboardDriver);
-#ifdef KDRIVE_EVDEV
- KdAddKeyboardDriver(&LinuxEvdevKeyboardDriver);
-#endif
- KdAddPointerDriver(&EphyrMouseDriver);
-#ifdef KDRIVE_EVDEV
- KdAddPointerDriver(&LinuxEvdevMouseDriver);
-#endif
-
- if (!kdHasKbd) {
- ki = KdNewKeyboard();
- if (!ki)
- FatalError("Couldn't create Xephyr keyboard\n");
- ki->driver = &EphyrKeyboardDriver;
- KdAddKeyboard(ki);
- }
-
- if (!kdHasPointer) {
- pi = KdNewPointer();
- if (!pi)
- FatalError("Couldn't create Xephyr pointer\n");
- pi->driver = &EphyrMouseDriver;
- KdAddPointer(pi);
- }
-
- KdInitInput();
-}
-
-void
-CloseInput (void)
-{
-}
-
-#ifdef DDXBEFORERESET
-void
-ddxBeforeReset (void)
-{
-}
-#endif
-
-void
-ddxUseMsg (void)
-{
- KdUseMsg();
-
- ErrorF("\nXephyr Option Usage:\n");
- ErrorF("-parent <XID> Use existing window as Xephyr root win\n");
- ErrorF("-host-cursor Re-use exisiting X host server cursor\n");
- ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n");
- ErrorF("-grayscale Simulate 8bit grayscale\n");
- ErrorF("-fakexa Simulate acceleration using software rendering\n");
- ErrorF("-verbosity <level> Set log verbosity level\n");
-#ifdef GLXEXT
- ErrorF("-nodri do not use DRI\n");
-#endif
- ErrorF("-noxv do not use XV\n");
- ErrorF("-name [name] define the name in the WM_CLASS property\n");
- ErrorF("-title [title] set the window title in the WM_NAME property\n");
- ErrorF("\n");
-
- exit(1);
-}
-
-void
-processScreenArg (char *screen_size, char *parent_id)
-{
- KdCardInfo *card;
-
- InitCard (0); /*Put each screen on a separate card*/
- card = KdCardInfoLast ();
-
- if (card)
- {
- KdScreenInfo *screen;
- unsigned long p_id = 0;
-
- screen = KdScreenInfoAdd (card);
- KdParseScreen (screen, screen_size);
-
- if (parent_id)
- {
- p_id = strtol (parent_id, NULL, 0);
- }
- EPHYR_DBG ("screen number:%d\n", screen->mynum) ;
- hostx_add_screen (screen, p_id, screen->mynum);
- }
- else
- {
- ErrorF("No matching card found!\n");
- }
-}
-
-int
-ddxProcessArgument (int argc, char **argv, int i)
-{
- static char* parent = NULL;
- EPHYR_DBG("mark argv[%d]='%s'", i, argv[i] );
-
- if (i == 1)
- {
- hostx_use_resname(basename(argv[0]), 0);
- }
-
- if (!strcmp (argv[i], "-parent"))
- {
- if(i+1 < argc)
- {
- int j;
- /* If parent is specified and a screen argument follows, don't do
- * anything, let the -screen handling init the rest */
- for (j = i; j < argc; j++)
- {
- if (!strcmp(argv[j], "-screen"))
- {
- parent = argv[i + 1];
- return 2;
- }
- }
-
- processScreenArg ("100x100", argv[i+1]);
- return 2;
- }
-
- UseMsg();
- exit(1);
- }
- else if (!strcmp (argv[i], "-screen"))
- {
- if ((i+1) < argc)
- {
- processScreenArg (argv[i+1], parent);
- parent = NULL;
- return 2;
- }
-
- UseMsg();
- exit(1);
- }
- else if (!strcmp (argv[i], "-host-cursor"))
- {
- hostx_use_host_cursor();
- return 1;
- }
- else if (!strcmp (argv[i], "-fullscreen"))
- {
- hostx_use_fullscreen();
- return 1;
- }
- else if (!strcmp (argv[i], "-grayscale"))
- {
- EphyrWantGrayScale = 1;
- return 1;
- }
- else if (!strcmp (argv[i], "-fakexa"))
- {
- ephyrFuncs.initAccel = ephyrDrawInit;
- ephyrFuncs.enableAccel = ephyrDrawEnable;
- ephyrFuncs.disableAccel = ephyrDrawDisable;
- ephyrFuncs.finiAccel = ephyrDrawFini;
- return 1;
- }
- else if (!strcmp (argv[i], "-verbosity"))
- {
- if(i+1 < argc && argv[i+1][0] != '-')
- {
- int verbosity=atoi (argv[i+1]) ;
- LogSetParameter (XLOG_VERBOSITY, verbosity) ;
- EPHYR_LOG ("set verbosiry to %d\n", verbosity) ;
- return 2 ;
- }
- else
- {
- UseMsg() ;
- exit(1) ;
- }
- }
-#ifdef GLXEXT
- else if (!strcmp (argv[i], "-nodri"))
- {
- noGlxVisualInit = FALSE ;
- ephyrNoDRI = TRUE ;
- EPHYR_LOG ("no direct rendering enabled\n") ;
- return 1 ;
- }
-#endif
- else if (!strcmp (argv[i], "-noxv"))
- {
- ephyrNoXV = TRUE ;
- EPHYR_LOG ("no XVideo enabled\n") ;
- return 1 ;
- }
- else if (!strcmp (argv[i], "-name"))
- {
- if (i+1 < argc && argv[i+1][0] != '-')
- {
- hostx_use_resname(argv[i+1], 1);
- return 2;
- }
- else
- {
- UseMsg();
- return 0;
- }
- }
- else if (!strcmp (argv[i], "-title"))
- {
- if (i+1 < argc && argv[i+1][0] != '-')
- {
- hostx_set_title(argv[i+1]);
- return 2;
- }
- else
- {
- UseMsg();
- return 0;
- }
- }
- else if (argv[i][0] == ':')
- {
- hostx_set_display_name(argv[i]);
- }
- /* Xnest compatibility */
- else if (!strcmp(argv[i], "-display"))
- {
- hostx_set_display_name(argv[i+1]);
- return 2;
- }
- else if (!strcmp(argv[i], "-sync") ||
- !strcmp(argv[i], "-full") ||
- !strcmp(argv[i], "-sss") ||
- !strcmp(argv[i], "-install"))
- {
- return 1;
- }
- else if (!strcmp(argv[i], "-bw") ||
- !strcmp(argv[i], "-class") ||
- !strcmp(argv[i], "-geometry") ||
- !strcmp(argv[i], "-scrns"))
- {
- return 2;
- }
- /* end Xnest compat */
-
- return KdProcessArgument (argc, argv, i);
-}
-
-void
-OsVendorInit (void)
-{
- EPHYR_DBG("mark");
-
- if (hostx_want_host_cursor())
- {
- ephyrFuncs.initCursor = &ephyrCursorInit;
- ephyrFuncs.enableCursor = &ephyrCursorEnable;
- }
-
- KdOsInit (&EphyrOsFuncs);
-}
-
-/* 'Fake' cursor stuff, could be improved */
-
-static Bool
-ephyrRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
-{
- return TRUE;
-}
-
-static Bool
-ephyrUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
-{
- return TRUE;
-}
-
-static void
-ephyrSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
-{
- ;
-}
-
-static void
-ephyrMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
-{
- ;
-}
-
-static Bool
-ephyrDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
-{
- return TRUE;
-}
-
-miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
- ephyrRealizeCursor,
- ephyrUnrealizeCursor,
- ephyrSetCursor,
- ephyrMoveCursor,
- ephyrDeviceCursorInitialize,
- NULL
-};
-
-
-Bool
-ephyrCursorInit(ScreenPtr pScreen)
-{
- miPointerInitialize(pScreen,
- &EphyrPointerSpriteFuncs,
- &ephyrPointerScreenFuncs,
- FALSE);
-
- return TRUE;
-}
-
-void
-ephyrCursorEnable(ScreenPtr pScreen)
-{
- ;
-}
-
-KdCardFuncs ephyrFuncs = {
- ephyrCardInit, /* cardinit */
- ephyrScreenInit, /* scrinit */
- ephyrInitScreen, /* initScreen */
- ephyrFinishInitScreen, /* finishInitScreen */
- ephyrCreateResources, /* createRes */
- ephyrPreserve, /* preserve */
- ephyrEnable, /* enable */
- ephyrDPMS, /* dpms */
- ephyrDisable, /* disable */
- ephyrRestore, /* restore */
- ephyrScreenFini, /* scrfini */
- ephyrCardFini, /* cardfini */
-
- 0, /* initCursor */
- 0, /* enableCursor */
- 0, /* disableCursor */
- 0, /* finiCursor */
- 0, /* recolorCursor */
-
- 0, /* initAccel */
- 0, /* enableAccel */
- 0, /* disableAccel */
- 0, /* finiAccel */
-
- ephyrGetColors,/* getColors */
- ephyrPutColors, /* putColors */
-};
+/*
+ * Xephyr - A kdrive X server thats runs in a host X window.
+ * Authored by Matthew Allum <mallum@o-hand.com>
+ *
+ * Copyright 2004 Nokia
+ *
+ * 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, and that the name of Nokia not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Nokia makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <kdrive-config.h>
+#endif
+#include "ephyr.h"
+#include "ephyrlog.h"
+
+extern Window EphyrPreExistingHostWin;
+extern Bool EphyrWantGrayScale;
+extern Bool kdHasPointer;
+extern Bool kdHasKbd;
+
+#ifdef GLXEXT
+extern Bool ephyrNoDRI;
+extern Bool noGlxVisualInit;
+#endif
+extern Bool ephyrNoXV;
+
+#ifdef KDRIVE_EVDEV
+extern KdPointerDriver LinuxEvdevMouseDriver;
+extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
+#endif
+
+void processScreenArg (char *screen_size, char *parent_id) ;
+
+void
+InitCard (char *name)
+{
+ EPHYR_DBG("mark");
+ KdCardInfoAdd (&ephyrFuncs, 0);
+}
+
+#ifndef _MSC_VER
+void
+InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
+{
+ KdInitOutput (pScreenInfo, argc, argv);
+}
+
+void
+InitInput (int argc, char **argv)
+{
+ KdKeyboardInfo *ki;
+ KdPointerInfo *pi;
+
+ KdAddKeyboardDriver(&EphyrKeyboardDriver);
+#ifdef KDRIVE_EVDEV
+ KdAddKeyboardDriver(&LinuxEvdevKeyboardDriver);
+#endif
+ KdAddPointerDriver(&EphyrMouseDriver);
+#ifdef KDRIVE_EVDEV
+ KdAddPointerDriver(&LinuxEvdevMouseDriver);
+#endif
+
+ if (!kdHasKbd) {
+ ki = KdNewKeyboard();
+ if (!ki)
+ FatalError("Couldn't create Xephyr keyboard\n");
+ ki->driver = &EphyrKeyboardDriver;
+ KdAddKeyboard(ki);
+ }
+
+ if (!kdHasPointer) {
+ pi = KdNewPointer();
+ if (!pi)
+ FatalError("Couldn't create Xephyr pointer\n");
+ pi->driver = &EphyrMouseDriver;
+ KdAddPointer(pi);
+ }
+
+ KdInitInput();
+}
+
+void
+CloseInput (void)
+{
+}
+
+#ifdef DDXBEFORERESET
+void
+ddxBeforeReset (void)
+{
+}
+#endif
+
+void
+ddxUseMsg (void)
+{
+ KdUseMsg();
+
+ ErrorF("\nXephyr Option Usage:\n");
+ ErrorF("-parent <XID> Use existing window as Xephyr root win\n");
+ ErrorF("-host-cursor Re-use exisiting X host server cursor\n");
+ ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n");
+ ErrorF("-grayscale Simulate 8bit grayscale\n");
+ ErrorF("-fakexa Simulate acceleration using software rendering\n");
+ ErrorF("-verbosity <level> Set log verbosity level\n");
+#ifdef GLXEXT
+ ErrorF("-nodri do not use DRI\n");
+#endif
+ ErrorF("-noxv do not use XV\n");
+ ErrorF("-name [name] define the name in the WM_CLASS property\n");
+ ErrorF("-title [title] set the window title in the WM_NAME property\n");
+ ErrorF("\n");
+
+ exit(1);
+}
+#endif
+
+void
+processScreenArg (char *screen_size, char *parent_id)
+{
+ KdCardInfo *card;
+
+ InitCard (0); /*Put each screen on a separate card*/
+ card = KdCardInfoLast ();
+
+ if (card)
+ {
+ KdScreenInfo *screen;
+ unsigned long p_id = 0;
+
+ screen = KdScreenInfoAdd (card);
+ KdParseScreen (screen, screen_size);
+
+ if (parent_id)
+ {
+ p_id = strtol (parent_id, NULL, 0);
+ }
+ EPHYR_DBG ("screen number:%d\n", screen->mynum) ;
+ hostx_add_screen (screen, p_id, screen->mynum);
+ }
+ else
+ {
+ ErrorF("No matching card found!\n");
+ }
+}
+
+#ifndef _MSC_VER
+int
+ddxProcessArgument (int argc, char **argv, int i)
+{
+ static char* parent = NULL;
+ EPHYR_DBG("mark argv[%d]='%s'", i, argv[i] );
+
+ if (i == 1)
+ {
+ hostx_use_resname(basename(argv[0]), 0);
+ }
+
+ if (!strcmp (argv[i], "-parent"))
+ {
+ if(i+1 < argc)
+ {
+ int j;
+ /* If parent is specified and a screen argument follows, don't do
+ * anything, let the -screen handling init the rest */
+ for (j = i; j < argc; j++)
+ {
+ if (!strcmp(argv[j], "-screen"))
+ {
+ parent = argv[i + 1];
+ return 2;
+ }
+ }
+
+ processScreenArg ("100x100", argv[i+1]);
+ return 2;
+ }
+
+ UseMsg();
+ exit(1);
+ }
+ else if (!strcmp (argv[i], "-screen"))
+ {
+ if ((i+1) < argc)
+ {
+ processScreenArg (argv[i+1], parent);
+ parent = NULL;
+ return 2;
+ }
+
+ UseMsg();
+ exit(1);
+ }
+ else if (!strcmp (argv[i], "-host-cursor"))
+ {
+ hostx_use_host_cursor();
+ return 1;
+ }
+ else if (!strcmp (argv[i], "-fullscreen"))
+ {
+ hostx_use_fullscreen();
+ return 1;
+ }
+ else if (!strcmp (argv[i], "-grayscale"))
+ {
+ EphyrWantGrayScale = 1;
+ return 1;
+ }
+ else if (!strcmp (argv[i], "-fakexa"))
+ {
+ ephyrFuncs.initAccel = ephyrDrawInit;
+ ephyrFuncs.enableAccel = ephyrDrawEnable;
+ ephyrFuncs.disableAccel = ephyrDrawDisable;
+ ephyrFuncs.finiAccel = ephyrDrawFini;
+ return 1;
+ }
+ else if (!strcmp (argv[i], "-verbosity"))
+ {
+ if(i+1 < argc && argv[i+1][0] != '-')
+ {
+ int verbosity=atoi (argv[i+1]) ;
+ LogSetParameter (XLOG_VERBOSITY, verbosity) ;
+ EPHYR_LOG ("set verbosiry to %d\n", verbosity) ;
+ return 2 ;
+ }
+ else
+ {
+ UseMsg() ;
+ exit(1) ;
+ }
+ }
+#ifdef GLXEXT
+ else if (!strcmp (argv[i], "-nodri"))
+ {
+ noGlxVisualInit = FALSE ;
+ ephyrNoDRI = TRUE ;
+ EPHYR_LOG ("no direct rendering enabled\n") ;
+ return 1 ;
+ }
+#endif
+ else if (!strcmp (argv[i], "-noxv"))
+ {
+ ephyrNoXV = TRUE ;
+ EPHYR_LOG ("no XVideo enabled\n") ;
+ return 1 ;
+ }
+ else if (!strcmp (argv[i], "-name"))
+ {
+ if (i+1 < argc && argv[i+1][0] != '-')
+ {
+ hostx_use_resname(argv[i+1], 1);
+ return 2;
+ }
+ else
+ {
+ UseMsg();
+ return 0;
+ }
+ }
+ else if (!strcmp (argv[i], "-title"))
+ {
+ if (i+1 < argc && argv[i+1][0] != '-')
+ {
+ hostx_set_title(argv[i+1]);
+ return 2;
+ }
+ else
+ {
+ UseMsg();
+ return 0;
+ }
+ }
+ else if (argv[i][0] == ':')
+ {
+ hostx_set_display_name(argv[i]);
+ }
+ /* Xnest compatibility */
+ else if (!strcmp(argv[i], "-display"))
+ {
+ hostx_set_display_name(argv[i+1]);
+ return 2;
+ }
+ else if (!strcmp(argv[i], "-sync") ||
+ !strcmp(argv[i], "-full") ||
+ !strcmp(argv[i], "-sss") ||
+ !strcmp(argv[i], "-install"))
+ {
+ return 1;
+ }
+ else if (!strcmp(argv[i], "-bw") ||
+ !strcmp(argv[i], "-class") ||
+ !strcmp(argv[i], "-geometry") ||
+ !strcmp(argv[i], "-scrns"))
+ {
+ return 2;
+ }
+ /* end Xnest compat */
+
+ return KdProcessArgument (argc, argv, i);
+}
+
+void
+OsVendorInit (void)
+{
+ EPHYR_DBG("mark");
+
+ if (hostx_want_host_cursor())
+ {
+ ephyrFuncs.initCursor = &ephyrCursorInit;
+ ephyrFuncs.enableCursor = &ephyrCursorEnable;
+ }
+
+ KdOsInit (&EphyrOsFuncs);
+}
+
+#ifdef DDXOSFATALERROR
+void
+OsVendorFatalError(void)
+{
+}
+#endif
+
+#endif
+
+/* 'Fake' cursor stuff, could be improved */
+
+static Bool
+ephyrRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
+{
+ return TRUE;
+}
+
+static Bool
+ephyrUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
+{
+ return TRUE;
+}
+
+static void
+ephyrSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
+{
+ ;
+}
+
+static void
+ephyrMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
+{
+ ;
+}
+
+static Bool
+ephyrDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+ return TRUE;
+}
+
+miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
+ ephyrRealizeCursor,
+ ephyrUnrealizeCursor,
+ ephyrSetCursor,
+ ephyrMoveCursor,
+ ephyrDeviceCursorInitialize,
+ NULL
+};
+
+
+Bool
+ephyrCursorInit(ScreenPtr pScreen)
+{
+ miPointerInitialize(pScreen,
+ &EphyrPointerSpriteFuncs,
+ &ephyrPointerScreenFuncs,
+ FALSE);
+
+ return TRUE;
+}
+
+void
+ephyrCursorEnable(ScreenPtr pScreen)
+{
+ ;
+}
+
+KdCardFuncs ephyrFuncs = {
+ ephyrCardInit, /* cardinit */
+ ephyrScreenInit, /* scrinit */
+ ephyrInitScreen, /* initScreen */
+ ephyrFinishInitScreen, /* finishInitScreen */
+ ephyrCreateResources, /* createRes */
+ ephyrPreserve, /* preserve */
+ ephyrEnable, /* enable */
+ ephyrDPMS, /* dpms */
+ ephyrDisable, /* disable */
+ ephyrRestore, /* restore */
+ ephyrScreenFini, /* scrfini */
+ ephyrCardFini, /* cardfini */
+
+ 0, /* initCursor */
+ 0, /* enableCursor */
+ 0, /* disableCursor */
+ 0, /* finiCursor */
+ 0, /* recolorCursor */
+
+ 0, /* initAccel */
+ 0, /* enableAccel */
+ 0, /* disableAccel */
+ 0, /* finiAccel */
+
+ ephyrGetColors,/* getColors */
+ ephyrPutColors, /* putColors */
+};
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrlog.h b/xorg-server/hw/kdrive/ephyr/ephyrlog.h
index a07a0a097..ba52a3bce 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrlog.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyrlog.h
@@ -43,14 +43,14 @@
#ifndef EPHYR_LOG
#define EPHYR_LOG(...) \
LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, "in %s:%d:%s: ",\
- __FILE__, __LINE__, __func__) ; \
+ __FILE__, __LINE__, __FUNCTION__) ; \
LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, __VA_ARGS__)
#endif /*nomadik_log*/
#ifndef EPHYR_LOG_ERROR
#define EPHYR_LOG_ERROR(...) \
LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, "Error:in %s:%d:%s: ",\
- __FILE__, __LINE__, __func__) ; \
+ __FILE__, __LINE__, __FUNCTION__) ; \
LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, __VA_ARGS__)
#endif /*EPHYR_LOG_ERROR*/
diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c
index 648368124..320541f82 100644
--- a/xorg-server/hw/kdrive/ephyr/hostx.c
+++ b/xorg-server/hw/kdrive/ephyr/hostx.c
@@ -47,9 +47,11 @@
#include <string.h> /* for memset */
#include <time.h>
+#ifndef _MSC_VER
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/time.h>
+#endif
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -208,7 +210,11 @@ hostx_add_screen (EphyrScreenInfo screen,
void
hostx_set_display_name (char *name)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
HostX.server_dpy_name = strdup (name);
+#endif
}
void
@@ -475,6 +481,9 @@ hostx_init (void)
}
/* Try to get share memory ximages for a little bit more speed */
+#ifdef _MSC_VER
+ __asm int 3;
+#else
if (!XShmQueryExtension(HostX.dpy) || getenv("XEPHYR_NO_SHM"))
{
fprintf(stderr, "\nXephyr unable to use SHM XImages\n");
@@ -505,6 +514,7 @@ hostx_init (void)
shmdt(shminfo.shmaddr);
shmctl(shminfo.shmid, IPC_RMID, 0);
}
+#endif
XFlush(HostX.dpy);
@@ -647,7 +657,7 @@ hostx_screen_init (EphyrScreenInfo screen,
struct EphyrHostScreen *host_screen = host_screen_from_screen_info (screen);
if (!host_screen)
{
- fprintf (stderr, "%s: Error in accessing hostx data\n", __func__ );
+ fprintf (stderr, "%s: Error in accessing hostx data\n", __FUNCTION__ );
exit(1);
}
@@ -662,10 +672,14 @@ hostx_screen_init (EphyrScreenInfo screen,
if (HostX.have_shm)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
XShmDetach(HostX.dpy, &host_screen->shminfo);
XDestroyImage (host_screen->ximg);
shmdt(host_screen->shminfo.shmaddr);
shmctl(host_screen->shminfo.shmid, IPC_RMID, 0);
+#endif
}
else
{
@@ -678,6 +692,9 @@ hostx_screen_init (EphyrScreenInfo screen,
if (HostX.have_shm)
{
+#ifdef _MSC_VER
+__asm int 3;
+#else
host_screen->ximg = XShmCreateImage (HostX.dpy, HostX.visual, HostX.depth,
ZPixmap, NULL, &host_screen->shminfo,
width, buffer_height );
@@ -703,6 +720,7 @@ hostx_screen_init (EphyrScreenInfo screen,
XShmAttach(HostX.dpy, &host_screen->shminfo);
shm_success = True;
}
+#endif
}
if (!shm_success)
@@ -831,9 +849,13 @@ hostx_paint_rect (EphyrScreenInfo screen,
if (HostX.have_shm)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
XShmPutImage (HostX.dpy, host_screen->win,
HostX.gc, host_screen->ximg,
sx, sy, dx, dy, width, height, False);
+#endif
}
else
{
@@ -849,6 +871,9 @@ hostx_paint_debug_rect (struct EphyrHostScreen *host_screen,
int x, int y,
int width, int height)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
struct timespec tspec;
tspec.tv_sec = HostX.damage_debug_msec / (1000000);
@@ -864,6 +889,7 @@ hostx_paint_debug_rect (struct EphyrHostScreen *host_screen,
/* nanosleep seems to work better than usleep for me... */
nanosleep(&tspec, NULL);
+#endif
}
void
@@ -1283,8 +1309,12 @@ hostx_set_window_bounding_rectangles (int a_window,
rects[i].width, rects[i].height) ;
}
/*this aways returns 1*/
+#ifdef _MSC_VER
+ __asm int 3;
+#else
XShapeCombineRectangles (dpy, a_window, ShapeBounding, 0, 0,
rects, a_num_rects, ShapeSet, YXBanded) ;
+#endif
is_ok = TRUE ;
free(rects);
@@ -1318,8 +1348,12 @@ hostx_set_window_clipping_rectangles (int a_window,
rects[i].width, rects[i].height) ;
}
/*this aways returns 1*/
+#ifdef _MSC_VER
+ __asm int 3;
+#else
XShapeCombineRectangles (dpy, a_window, ShapeClip, 0, 0,
rects, a_num_rects, ShapeSet, YXBanded) ;
+#endif
is_ok = TRUE ;
free(rects);
@@ -1332,12 +1366,16 @@ int
hostx_has_xshape (void)
{
int event_base=0, error_base=0 ;
+#ifdef _MSC_VER
+ __asm int 3;
+#else
Display *dpy=hostx_get_display () ;
if (!XShapeQueryExtension (dpy,
&event_base,
&error_base)) {
return FALSE ;
}
+#endif
return TRUE;
}
diff --git a/xorg-server/hw/kdrive/ephyr/hostx.h b/xorg-server/hw/kdrive/ephyr/hostx.h
index e65e0c9bc..f455b3003 100644
--- a/xorg-server/hw/kdrive/ephyr/hostx.h
+++ b/xorg-server/hw/kdrive/ephyr/hostx.h
@@ -35,8 +35,12 @@
#define EPHYR_DBG(x, a...) \
fprintf(stderr, __FILE__ ":%d,%s() " x "\n", __LINE__, __func__, ##a)
#else
+#ifdef _MSC_VER
+#define EPHYR_DBG()
+#else
#define EPHYR_DBG(x, a...) do {} while (0)
#endif
+#endif
typedef struct EphyrHostXVars EphyrHostXVars;
typedef struct EphyrHostXEvent EphyrHostXEvent;
diff --git a/xorg-server/hw/kdrive/ephyr/makefile b/xorg-server/hw/kdrive/ephyr/makefile
new file mode 100644
index 000000000..eba9a93e1
--- /dev/null
+++ b/xorg-server/hw/kdrive/ephyr/makefile
@@ -0,0 +1,6 @@
+LIBRARY = libxephyr
+
+CSRCS=ephyrinit.c ephyr.c hostx.c
+
+INCLUDES += ..\src ..\..\..\exa
+
diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c
index 7f42248c0..aab64a510 100644
--- a/xorg-server/hw/kdrive/src/kdrive.c
+++ b/xorg-server/hw/kdrive/src/kdrive.c
@@ -320,6 +320,7 @@ KdProcessSwitch (void)
KdEnableScreens ();
}
+#ifndef _MSC_VER
void
AbortDDX(void)
{
@@ -342,6 +343,7 @@ ddxGiveUp (void)
{
AbortDDX ();
}
+#endif
Bool kdDumbDriver;
Bool kdSoftCursor;
@@ -1260,6 +1262,7 @@ KdInitOutput (ScreenInfo *pScreenInfo,
OsRegisterSigWrapper(KdSignalWrapper);
}
+#ifndef _MSC_VER
void
OsVendorFatalError(void)
{
@@ -1276,3 +1279,4 @@ DPMSSupported (void)
{
return FALSE;
}
+#endif
diff --git a/xorg-server/hw/kdrive/src/kdrive.h b/xorg-server/hw/kdrive/src/kdrive.h
index 8873662ee..9cf44f01e 100644
--- a/xorg-server/hw/kdrive/src/kdrive.h
+++ b/xorg-server/hw/kdrive/src/kdrive.h
@@ -53,7 +53,7 @@
#define KD_DPMS_POWERDOWN 3
#define KD_DPMS_MAX KD_DPMS_POWERDOWN
-#define Status int
+typedef int Status;
typedef struct _KdCardInfo {
struct _KdCardFuncs *cfuncs;
diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c
index 0485dc413..ee8fba65a 100644
--- a/xorg-server/hw/kdrive/src/kinput.c
+++ b/xorg-server/hw/kdrive/src/kinput.c
@@ -105,21 +105,29 @@ KdSigio (int sig)
static void
KdBlockSigio (void)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
sigset_t set;
sigemptyset (&set);
sigaddset (&set, SIGIO);
sigprocmask (SIG_BLOCK, &set, 0);
+#endif
}
static void
KdUnblockSigio (void)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
sigset_t set;
sigemptyset (&set);
sigaddset (&set, SIGIO);
sigprocmask (SIG_UNBLOCK, &set, 0);
+#endif
}
#ifdef DEBUG_SIGIO
@@ -165,15 +173,22 @@ KdResetInputMachine (void)
static void
KdNonBlockFd (int fd)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
int flags;
flags = fcntl (fd, F_GETFL);
flags |= FASYNC|NOBLOCK;
fcntl (fd, F_SETFL, flags);
+#endif
}
static void
KdAddFd (int fd)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
struct sigaction act;
sigset_t set;
@@ -190,11 +205,15 @@ KdAddFd (int fd)
sigaction (SIGIO, &act, 0);
sigemptyset (&set);
sigprocmask (SIG_SETMASK, &set, 0);
+#endif
}
static void
KdRemoveFd (int fd)
{
+#ifdef _MSC_VER
+ __asm int 3;
+#else
struct sigaction act;
int flags;
@@ -210,6 +229,7 @@ KdRemoveFd (int fd)
sigemptyset (&act.sa_mask);
sigaction (SIGIO, &act, 0);
}
+#endif
}
Bool
@@ -547,11 +567,13 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff)
return BadImplementation;
}
+#ifndef _MSC_VER
Bool
LegalModifier(unsigned int key, DeviceIntPtr pDev)
{
return TRUE;
}
+#endif
static void
KdBell (int volume, DeviceIntPtr pDev, pointer arg, int something)
@@ -570,6 +592,7 @@ KdBell (int volume, DeviceIntPtr pDev, pointer arg, int something)
KdRingBell(ki, volume, ctrl->bell_pitch, ctrl->bell_duration);
}
+#ifndef _MSC_VER
void
DDXRingBell(int volume, int pitch, int duration)
{
@@ -585,7 +608,7 @@ DDXRingBell(int volume, int pitch, int duration)
}
}
}
-
+#endif
void
KdRingBell(KdKeyboardInfo *ki, int volume, int pitch, int duration)
{
@@ -2169,6 +2192,7 @@ miPointerScreenFuncRec kdPointerScreenFuncs =
KdWarpCursor
};
+#ifndef _MSC_VER
void
ProcessInputEvents (void)
{
@@ -2178,6 +2202,7 @@ ProcessInputEvents (void)
KdProcessSwitch ();
KdCheckLock ();
}
+#endif
/* At the moment, absolute/relative is up to the client. */
int
diff --git a/xorg-server/hw/kdrive/src/makefile b/xorg-server/hw/kdrive/src/makefile
new file mode 100644
index 000000000..e3a826faa
--- /dev/null
+++ b/xorg-server/hw/kdrive/src/makefile
@@ -0,0 +1,14 @@
+LIBRARY = libkdrive
+
+CSRCS = \
+ kcmap.c \
+ kcurscol.c \
+ kdrive.c \
+ kinfo.c \
+ kinput.c \
+ kmap.c \
+ kmode.c \
+ kshadow.c
+
+
+
diff --git a/xorg-server/hw/xfree86/common/compiler.h b/xorg-server/hw/xfree86/common/compiler.h
index 9e00d7571..9c9bac6ba 100644
--- a/xorg-server/hw/xfree86/common/compiler.h
+++ b/xorg-server/hw/xfree86/common/compiler.h
@@ -86,7 +86,7 @@
# endif
# endif /* __inline__ */
# ifndef __inline
-# if defined(__GNUC__)
+# if defined(__GNUC__) || defined(_MSC_VER)
/* gcc has __inline */
# elif defined(__HIGHC__)
# define __inline _Inline
@@ -1525,10 +1525,10 @@ inl(unsigned short port)
# define asm __asm
# endif
# endif
-# if !defined(__SUNPRO_C)
+# if !defined(__SUNPRO_C) && !defined(_MSC_VER)
# include <sys/inline.h>
# endif
-# if !defined(__HIGHC__) && !defined(__SUNPRO_C) || \
+# if (!defined(__HIGHC__) && !defined(__SUNPRO_C) && !defined(_MSC_VER)) || \
defined(__USLC__)
# pragma asm partial_optimization outl
# pragma asm partial_optimization outw
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c
index 5312ca60d..bd90e6ca3 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.c
+++ b/xorg-server/hw/xfree86/common/xf86Config.c
@@ -1,2517 +1,2517 @@
-/*
- * Loosely based on code bearing the following copyright:
- *
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
- */
-
-/*
- * Copyright 1992-2003 by The XFree86 Project, Inc.
- * Copyright 1997 by Metro Link, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-/*
- *
- * Authors:
- * Dirk Hohndel <hohndel@XFree86.Org>
- * David Dawes <dawes@XFree86.Org>
- * Marc La France <tsi@XFree86.Org>
- * Egbert Eich <eich@XFree86.Org>
- * ... and others
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifdef XF86DRI
-#include <sys/types.h>
-#include <grp.h>
-#endif
-
-#include "xf86.h"
-#include "xf86Parser.h"
-#include "xf86tokens.h"
-#include "xf86Config.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-#include "configProcs.h"
-#include "globals.h"
-#include "extension.h"
-#include "xf86pciBus.h"
-
-#include "xf86Xinput.h"
-
-#include "xkbsrv.h"
-
-#include "picture.h"
-
-/*
- * These paths define the way the config file search is done. The escape
- * sequences are documented in parser/scan.c.
- */
-#ifndef ROOT_CONFIGPATH
-#define ROOT_CONFIGPATH "%A," "%R," \
- "/etc/X11/%R," "%P/etc/X11/%R," \
- "%E," "%F," \
- "/etc/X11/%F," "%P/etc/X11/%F," \
- "/etc/X11/%X," "/etc/%X," \
- "%P/etc/X11/%X.%H," \
- "%P/etc/X11/%X," \
- "%P/lib/X11/%X.%H," \
- "%P/lib/X11/%X"
-#endif
-#ifndef USER_CONFIGPATH
-#define USER_CONFIGPATH "/etc/X11/%S," "%P/etc/X11/%S," \
- "/etc/X11/%G," "%P/etc/X11/%G," \
- "/etc/X11/%X," "/etc/%X," \
- "%P/etc/X11/%X.%H," \
- "%P/etc/X11/%X," \
- "%P/lib/X11/%X.%H," \
- "%P/lib/X11/%X"
-#endif
-#ifndef ROOT_CONFIGDIRPATH
-#define ROOT_CONFIGDIRPATH "%A," "%R," \
- "/etc/X11/%R," "%C/X11/%R," \
- "/etc/X11/%X," "%C/X11/%X"
-#endif
-#ifndef USER_CONFIGDIRPATH
-#define USER_CONFIGDIRPATH "/etc/X11/%R," "%C/X11/%R," \
- "/etc/X11/%X," "%C/X11/%X"
-#endif
-#ifndef SYS_CONFIGDIRPATH
-#define SYS_CONFIGDIRPATH "/usr/share/X11/%X," "%D/X11/%X"
-#endif
-#ifndef PROJECTROOT
-#define PROJECTROOT "/usr/X11R6"
-#endif
-
-static ModuleDefault ModuleDefaults[] = {
- {.name = "extmod", .toLoad = TRUE, .load_opt=NULL},
-#ifdef DBE
- {.name = "dbe", .toLoad = TRUE, .load_opt=NULL},
-#endif
-#ifdef GLXEXT
- {.name = "glx", .toLoad = TRUE, .load_opt=NULL},
-#endif
-#ifdef XRECORD
- {.name = "record", .toLoad = TRUE, .load_opt=NULL},
-#endif
-#ifdef XF86DRI
- {.name = "dri", .toLoad = TRUE, .load_opt=NULL},
-#endif
-#ifdef DRI2
- {.name = "dri2", .toLoad = TRUE, .load_opt=NULL},
-#endif
- {.name = NULL, .toLoad = FALSE, .load_opt=NULL}
-};
-
-
-/* Forward declarations */
-static Bool configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen,
- int scrnum, MessageType from);
-static Bool configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor);
-static Bool configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device,
- Bool active);
-static Bool configInput(InputInfoPtr pInfo, XF86ConfInputPtr conf_input,
- MessageType from);
-static Bool configDisplay(DispPtr displayp, XF86ConfDisplayPtr conf_display);
-static Bool addDefaultModes(MonPtr monitorp);
-#ifdef XF86DRI
-static void configDRI(XF86ConfDRIPtr drip);
-#endif
-static void configExtensions(XF86ConfExtensionsPtr conf_ext);
-
-/*
- * xf86GetPathElem --
- * Extract a single element from the font path string starting at
- * pnt. The font path element will be returned, and pnt will be
- * updated to point to the start of the next element, or set to
- * NULL if there are no more.
- */
-static char *
-xf86GetPathElem(char **pnt)
-{
- char *p1;
-
- p1 = *pnt;
- *pnt = index(*pnt, ',');
- if (*pnt != NULL) {
- **pnt = '\0';
- *pnt += 1;
- }
- return p1;
-}
-
-/*
- * xf86ValidateFontPath --
- * Validates the user-specified font path. Each element that
- * begins with a '/' is checked to make sure the directory exists.
- * If the directory exists, the existence of a file named 'fonts.dir'
- * is checked. If either check fails, an error is printed and the
- * element is removed from the font path.
- */
-
-#define DIR_FILE "/fonts.dir"
-static char *
-xf86ValidateFontPath(char *path)
-{
- char *tmp_path, *out_pnt, *path_elem, *next, *p1, *dir_elem;
- struct stat stat_buf;
- int flag;
- int dirlen;
-
- tmp_path = calloc(1,strlen(path)+1);
- out_pnt = tmp_path;
- path_elem = NULL;
- next = path;
- while (next != NULL) {
- path_elem = xf86GetPathElem(&next);
- if (*path_elem == '/') {
- dir_elem = xnfcalloc(1, strlen(path_elem) + 1);
- if ((p1 = strchr(path_elem, ':')) != 0)
- dirlen = p1 - path_elem;
- else
- dirlen = strlen(path_elem);
- strncpy(dir_elem, path_elem, dirlen);
- dir_elem[dirlen] = '\0';
- flag = stat(dir_elem, &stat_buf);
- if (flag == 0)
- if (!S_ISDIR(stat_buf.st_mode))
- flag = -1;
- if (flag != 0) {
- xf86Msg(X_WARNING, "The directory \"%s\" does not exist.\n", dir_elem);
- xf86ErrorF("\tEntry deleted from font path.\n");
- free(dir_elem);
- continue;
- }
- else {
- XNFasprintf(&p1, "%s%s", dir_elem, DIR_FILE);
- flag = stat(p1, &stat_buf);
- if (flag == 0)
- if (!S_ISREG(stat_buf.st_mode))
- flag = -1;
- free(p1);
- if (flag != 0) {
- xf86Msg(X_WARNING,
- "`fonts.dir' not found (or not valid) in \"%s\".\n",
- dir_elem);
- xf86ErrorF("\tEntry deleted from font path.\n");
- xf86ErrorF("\t(Run 'mkfontdir' on \"%s\").\n", dir_elem);
- free(dir_elem);
- continue;
- }
- }
- free(dir_elem);
- }
-
- /*
- * Either an OK directory, or a font server name. So add it to
- * the path.
- */
- if (out_pnt != tmp_path)
- *out_pnt++ = ',';
- strcat(out_pnt, path_elem);
- out_pnt += strlen(path_elem);
- }
- return tmp_path;
-}
-
-
-/*
- * use the datastructure that the parser provides and pick out the parts
- * that we need at this point
- */
-char **
-xf86ModulelistFromConfig(pointer **optlist)
-{
- int count = 0, i = 0;
- char **modulearray;
- char *ignore[] = { "GLcore", "speedo", "bitmap", "drm",
- "freetype", "type1",
- NULL };
- pointer *optarray;
- XF86LoadPtr modp;
- Bool found;
-
- /*
- * make sure the config file has been parsed and that we have a
- * ModulePath set; if no ModulePath was given, use the default
- * ModulePath
- */
- if (xf86configptr == NULL) {
- xf86Msg(X_ERROR, "Cannot access global config data structure\n");
- return NULL;
- }
-
- if (xf86configptr->conf_modules) {
- /* Walk the disable list and let people know what we've parsed to
- * not be loaded
- */
- modp = xf86configptr->conf_modules->mod_disable_lst;
- while (modp) {
- xf86Msg(X_WARNING, "\"%s\" will not be loaded unless you've specified it to be loaded elsewhere.\n", modp->load_name);
- modp = (XF86LoadPtr) modp->list.next;
- }
- /*
- * Walk the default settings table. For each module listed to be
- * loaded, make sure it's in the mod_load_lst. If it's not, make
- * sure it's not in the mod_no_load_lst. If it's not disabled,
- * append it to mod_load_lst
- */
- for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
- if (ModuleDefaults[i].toLoad == FALSE) {
- xf86Msg(X_WARNING, "\"%s\" is not to be loaded by default. Skipping.\n", ModuleDefaults[i].name);
- continue;
- }
- found = FALSE;
- modp = xf86configptr->conf_modules->mod_load_lst;
- while (modp) {
- if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) {
- xf86Msg(X_INFO, "\"%s\" will be loaded. This was enabled by default and also specified in the config file.\n", ModuleDefaults[i].name);
- found = TRUE;
- break;
- }
- modp = (XF86LoadPtr) modp->list.next;
- }
- if (found == FALSE) {
- modp = xf86configptr->conf_modules->mod_disable_lst;
- while (modp) {
- if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) {
- xf86Msg(X_INFO, "\"%s\" will be loaded even though the default is to disable it.\n", ModuleDefaults[i].name);
- found = TRUE;
- break;
- }
- modp = (XF86LoadPtr) modp->list.next;
- }
- }
- if (found == FALSE) {
- XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
- ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
- xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n", ModuleDefaults[i].name);
- }
- }
- } else {
- xf86configptr->conf_modules = xnfcalloc(1, sizeof(XF86ConfModuleRec));
- for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
- if (ModuleDefaults[i].toLoad == TRUE) {
- XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
- ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
- }
- }
- }
-
- /*
- * Walk the list of modules in the "Module" section to determine how
- * many we have.
- */
- modp = xf86configptr->conf_modules->mod_load_lst;
- while (modp) {
- for (i = 0; ignore[i]; i++) {
- if (strcmp(modp->load_name, ignore[i]) == 0)
- modp->ignore = 1;
- }
- if (!modp->ignore)
- count++;
- modp = (XF86LoadPtr) modp->list.next;
- }
-
- /*
- * allocate the memory and walk the list again to fill in the pointers
- */
- modulearray = xnfalloc((count + 1) * sizeof(char*));
- optarray = xnfalloc((count + 1) * sizeof(pointer));
- count = 0;
- if (xf86configptr->conf_modules) {
- modp = xf86configptr->conf_modules->mod_load_lst;
- while (modp) {
- if (!modp->ignore) {
- modulearray[count] = modp->load_name;
- optarray[count] = modp->load_opt;
- count++;
- }
- modp = (XF86LoadPtr) modp->list.next;
- }
- }
- modulearray[count] = NULL;
- optarray[count] = NULL;
- if (optlist)
- *optlist = optarray;
- else
- free(optarray);
- return modulearray;
-}
-
-
-char **
-xf86DriverlistFromConfig(void)
-{
- int count = 0;
- int j;
- char **modulearray;
- screenLayoutPtr slp;
-
- /*
- * make sure the config file has been parsed and that we have a
- * ModulePath set; if no ModulePath was given, use the default
- * ModulePath
- */
- if (xf86configptr == NULL) {
- xf86Msg(X_ERROR, "Cannot access global config data structure\n");
- return NULL;
- }
-
- /*
- * Walk the list of driver lines in active "Device" sections to
- * determine now many implicitly loaded modules there are.
- *
- */
- if (xf86ConfigLayout.screens) {
- slp = xf86ConfigLayout.screens;
- while ((slp++)->screen) {
- count++;
- }
- }
-
- /*
- * Handle the set of inactive "Device" sections.
- */
- j = 0;
- while (xf86ConfigLayout.inactives[j++].identifier)
- count++;
-
- if (count == 0)
- return NULL;
-
- /*
- * allocate the memory and walk the list again to fill in the pointers
- */
- modulearray = xnfalloc((count + 1) * sizeof(char*));
- count = 0;
- slp = xf86ConfigLayout.screens;
- while (slp->screen) {
- modulearray[count] = slp->screen->device->driver;
- count++;
- slp++;
- }
-
- j = 0;
-
- while (xf86ConfigLayout.inactives[j].identifier)
- modulearray[count++] = xf86ConfigLayout.inactives[j++].driver;
-
- modulearray[count] = NULL;
-
- /* Remove duplicates */
- for (count = 0; modulearray[count] != NULL; count++) {
- int i;
-
- for (i = 0; i < count; i++)
- if (xf86NameCmp(modulearray[i], modulearray[count]) == 0) {
- modulearray[count] = "";
- break;
- }
- }
- return modulearray;
-}
-
-char **
-xf86InputDriverlistFromConfig(void)
-{
- int count = 0;
- char **modulearray;
- InputInfoPtr *idp;
-
- /*
- * make sure the config file has been parsed and that we have a
- * ModulePath set; if no ModulePath was given, use the default
- * ModulePath
- */
- if (xf86configptr == NULL) {
- xf86Msg(X_ERROR, "Cannot access global config data structure\n");
- return NULL;
- }
-
- /*
- * Walk the list of driver lines in active "InputDevice" sections to
- * determine now many implicitly loaded modules there are.
- */
- if (xf86ConfigLayout.inputs) {
- idp = xf86ConfigLayout.inputs;
- while (*idp) {
- count++;
- idp++;
- }
- }
-
- if (count == 0)
- return NULL;
-
- /*
- * allocate the memory and walk the list again to fill in the pointers
- */
- modulearray = xnfalloc((count + 1) * sizeof(char*));
- count = 0;
- idp = xf86ConfigLayout.inputs;
- while (idp && *idp) {
- modulearray[count] = (*idp)->driver;
- count++;
- idp++;
- }
- modulearray[count] = NULL;
-
- /* Remove duplicates */
- for (count = 0; modulearray[count] != NULL; count++) {
- int i;
-
- for (i = 0; i < count; i++)
- if (xf86NameCmp(modulearray[i], modulearray[count]) == 0) {
- modulearray[count] = "";
- break;
- }
- }
- return modulearray;
-}
-
-static void
-fixup_video_driver_list(char **drivers)
-{
- static const char *fallback[4] = { "vesa", "fbdev", "wsfb", NULL };
- char **end, **drv;
- char *x;
- int i;
-
- /* walk to the end of the list */
- for (end = drivers; *end && **end; end++) ;
- end--;
-
- /*
- * for each of the fallback drivers, if we find it in the list,
- * swap it with the last available non-fallback driver.
- */
- for (i = 0; fallback[i]; i++) {
- for (drv = drivers; drv != end; drv++) {
- if (strstr(*drv, fallback[i])) {
- x = *drv; *drv = *end; *end = x;
- end--;
- break;
- }
- }
- }
-}
-
-static char **
-GenerateDriverlist(char * dirname)
-{
- char **ret;
- const char *subdirs[] = { dirname, NULL };
- static const char *patlist[] = {"(.*)_drv\\.so", NULL};
- ret = LoaderListDirs(subdirs, patlist);
-
- /* fix up the probe order for video drivers */
- if (strstr(dirname, "drivers") && ret != NULL)
- fixup_video_driver_list(ret);
-
- return ret;
-}
-
-char **
-xf86DriverlistFromCompile(void)
-{
- static char **driverlist = NULL;
-
- if (!driverlist)
- driverlist = GenerateDriverlist("drivers");
-
- return driverlist;
-}
-
-/*
- * xf86ConfigError --
- * Print a READABLE ErrorMessage!!! All information that is
- * available is printed.
- */
-static void
-xf86ConfigError(char *msg, ...)
-{
- va_list ap;
-
- ErrorF("\nConfig Error:\n");
- va_start(ap, msg);
- VErrorF(msg, ap);
- va_end(ap);
- ErrorF("\n");
- return;
-}
-
-static void
-configFiles(XF86ConfFilesPtr fileconf)
-{
- MessageType pathFrom;
- Bool must_copy;
- int size, countDirs;
- char *temp_path, *log_buf, *start, *end;
-
- /* FontPath */
- must_copy = TRUE;
-
- temp_path = defaultFontPath ? defaultFontPath : "";
- if (xf86fpFlag)
- pathFrom = X_CMDLINE;
- else if (fileconf && fileconf->file_fontpath) {
- pathFrom = X_CONFIG;
- if (xf86Info.useDefaultFontPath) {
- if (asprintf(&defaultFontPath, "%s%s%s", fileconf->file_fontpath,
- *temp_path ? "," : "", temp_path) == -1)
- defaultFontPath = NULL;
- else
- must_copy = FALSE;
- }
- else
- defaultFontPath = fileconf->file_fontpath;
- }
- else
- pathFrom = X_DEFAULT;
- temp_path = defaultFontPath ? defaultFontPath : "";
-
- /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */
- temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath;
- defaultFontPath = xf86ValidateFontPath(temp_path);
- free(temp_path);
-
- /* make fontpath more readable in the logfiles */
- countDirs = 1;
- temp_path = defaultFontPath;
- while ((temp_path = index(temp_path, ',')) != NULL) {
- countDirs++;
- temp_path++;
- }
-
- log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1);
- temp_path = log_buf;
- start = defaultFontPath;
- while((end = index(start, ',')) != NULL) {
- size = (end - start) + 1;
- *(temp_path++) = '\t';
- strncpy(temp_path, start, size);
- temp_path += size;
- *(temp_path++) = '\n';
- start += size;
- }
- /* copy last entry */
- *(temp_path++) = '\t';
- strcpy(temp_path, start);
- xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf);
- free(log_buf);
-
- /* ModulePath */
-
- if (fileconf) {
- if (xf86ModPathFrom != X_CMDLINE && fileconf->file_modulepath) {
- xf86ModulePath = fileconf->file_modulepath;
- xf86ModPathFrom = X_CONFIG;
- }
- }
-
- xf86Msg(xf86ModPathFrom, "ModulePath set to \"%s\"\n", xf86ModulePath);
-
- if (!xf86xkbdirFlag && fileconf && fileconf->file_xkbdir) {
- XkbBaseDirectory = fileconf->file_xkbdir;
- xf86Msg(X_CONFIG, "XKB base directory set to \"%s\"\n",
- XkbBaseDirectory);
- }
-#if 0
- /* LogFile */
- /*
- * XXX The problem with this is that the log file is already open.
- * One option might be to copy the exiting contents to the new location.
- * and re-open it. The down side is that the default location would
- * already have been overwritten. Another option would be to start with
- * unique temporary location, then copy it once the correct name is known.
- * A problem with this is what happens if the server exits before that
- * happens.
- */
- if (xf86LogFileFrom == X_DEFAULT && fileconf->file_logfile) {
- xf86LogFile = fileconf->file_logfile;
- xf86LogFileFrom = X_CONFIG;
- }
-#endif
-
- return;
-}
-
-typedef enum {
- FLAG_NOTRAPSIGNALS,
- FLAG_DONTVTSWITCH,
- FLAG_DONTZAP,
- FLAG_DONTZOOM,
- FLAG_DISABLEVIDMODE,
- FLAG_ALLOWNONLOCAL,
- FLAG_ALLOWMOUSEOPENFAIL,
- FLAG_VTSYSREQ,
- FLAG_SAVER_BLANKTIME,
- FLAG_DPMS_STANDBYTIME,
- FLAG_DPMS_SUSPENDTIME,
- FLAG_DPMS_OFFTIME,
- FLAG_PIXMAP,
- FLAG_PC98,
- FLAG_NOPM,
- FLAG_XINERAMA,
- FLAG_LOG,
- FLAG_RENDER_COLORMAP_MODE,
- FLAG_RANDR,
- FLAG_AIGLX,
- FLAG_IGNORE_ABI,
- FLAG_ALLOW_EMPTY_INPUT,
- FLAG_USE_DEFAULT_FONT_PATH,
- FLAG_AUTO_ADD_DEVICES,
- FLAG_AUTO_ENABLE_DEVICES,
- FLAG_GLX_VISUALS,
- FLAG_DRI2,
- FLAG_USE_SIGIO
-} FlagValues;
-
-/**
- * NOTE: the last value for each entry is NOT the default. It is set to TRUE
- * if the parser found the option in the config file.
- */
-static OptionInfoRec FlagOptions[] = {
- { FLAG_NOTRAPSIGNALS, "NoTrapSignals", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_DONTVTSWITCH, "DontVTSwitch", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_DONTZOOM, "DontZoom", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_DISABLEVIDMODE, "DisableVidModeExtension", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_ALLOWNONLOCAL, "AllowNonLocalXvidtune", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_ALLOWMOUSEOPENFAIL, "AllowMouseOpenFail", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_VTSYSREQ, "VTSysReq", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_SAVER_BLANKTIME, "BlankTime" , OPTV_INTEGER,
- {0}, FALSE },
- { FLAG_DPMS_STANDBYTIME, "StandbyTime", OPTV_INTEGER,
- {0}, FALSE },
- { FLAG_DPMS_SUSPENDTIME, "SuspendTime", OPTV_INTEGER,
- {0}, FALSE },
- { FLAG_DPMS_OFFTIME, "OffTime", OPTV_INTEGER,
- {0}, FALSE },
- { FLAG_PIXMAP, "Pixmap", OPTV_INTEGER,
- {0}, FALSE },
- { FLAG_PC98, "PC98", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_NOPM, "NoPM", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_XINERAMA, "Xinerama", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_LOG, "Log", OPTV_STRING,
- {0}, FALSE },
- { FLAG_RENDER_COLORMAP_MODE, "RenderColormapMode", OPTV_STRING,
- {0}, FALSE },
- { FLAG_RANDR, "RandR", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_AIGLX, "AIGLX", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_AUTO_ADD_DEVICES, "AutoAddDevices", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_AUTO_ENABLE_DEVICES, "AutoEnableDevices", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_GLX_VISUALS, "GlxVisuals", OPTV_STRING,
- {0}, FALSE },
- { FLAG_DRI2, "DRI2", OPTV_BOOLEAN,
- {0}, FALSE },
- { FLAG_USE_SIGIO, "UseSIGIO", OPTV_BOOLEAN,
- {0}, FALSE },
- { -1, NULL, OPTV_NONE,
- {0}, FALSE },
-};
-
-#ifdef SUPPORT_PC98
-static Bool
-detectPC98(void)
-{
- unsigned char buf[2];
-
- if (xf86ReadBIOS(0xf8000, 0xe80, buf, 2) != 2)
- return FALSE;
- if ((buf[0] == 0x98) && (buf[1] == 0x21))
- return TRUE;
- else
- return FALSE;
-}
-#endif
-
-static Bool
-configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
-{
- XF86OptionPtr optp, tmp;
- int i;
- Pix24Flags pix24 = Pix24DontCare;
- Bool value;
- MessageType from;
- const char *s;
- XkbRMLVOSet set;
- /* Default options. */
- set.rules = "base";
- set.model = "pc105";
- set.layout = "us";
- set.variant = NULL;
- set.options = NULL;
-
- /*
- * Merge the ServerLayout and ServerFlags options. The former have
- * precedence over the latter.
- */
- optp = NULL;
- if (flagsconf && flagsconf->flg_option_lst)
- optp = xf86optionListDup(flagsconf->flg_option_lst);
- if (layoutopts) {
- tmp = xf86optionListDup(layoutopts);
- if (optp)
- optp = xf86optionListMerge(optp, tmp);
- else
- optp = tmp;
- }
-
- xf86ProcessOptions(-1, optp, FlagOptions);
-
- xf86GetOptValBool(FlagOptions, FLAG_NOTRAPSIGNALS, &xf86Info.notrapSignals);
- xf86GetOptValBool(FlagOptions, FLAG_DONTVTSWITCH, &xf86Info.dontVTSwitch);
- xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap);
- xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom);
-
- xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
- if (xf86Info.ignoreABI) {
- xf86Msg(X_CONFIG, "Ignoring ABI Version\n");
- }
-
- if (xf86SIGIOSupported()) {
- xf86Info.useSIGIO = xf86ReturnOptValBool(FlagOptions, FLAG_USE_SIGIO, USE_SIGIO_BY_DEFAULT);
- if (xf86IsOptionSet(FlagOptions, FLAG_USE_SIGIO)) {
- from = X_CONFIG;
- } else {
- from = X_DEFAULT;
- }
- if (!xf86Info.useSIGIO) {
- xf86Msg(from, "Disabling SIGIO handlers for input devices\n");
- } else if (from == X_CONFIG) {
- xf86Msg(from, "Enabling SIGIO handlers for input devices\n");
- }
- } else {
- xf86Info.useSIGIO = FALSE;
- }
-
- if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) {
- xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_DEVICES,
- &xf86Info.autoAddDevices);
- from = X_CONFIG;
- }
- else {
- from = X_DEFAULT;
- }
- xf86Msg(from, "%sutomatically adding devices\n",
- xf86Info.autoAddDevices ? "A" : "Not a");
-
- if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ENABLE_DEVICES)) {
- xf86GetOptValBool(FlagOptions, FLAG_AUTO_ENABLE_DEVICES,
- &xf86Info.autoEnableDevices);
- from = X_CONFIG;
- }
- else {
- from = X_DEFAULT;
- }
- xf86Msg(from, "%sutomatically enabling devices\n",
- xf86Info.autoEnableDevices ? "A" : "Not a");
-
- /*
- * Set things up based on the config file information. Some of these
- * settings may be overridden later when the command line options are
- * checked.
- */
-#ifdef XF86VIDMODE
- if (xf86GetOptValBool(FlagOptions, FLAG_DISABLEVIDMODE, &value))
- xf86Info.vidModeEnabled = !value;
- if (xf86GetOptValBool(FlagOptions, FLAG_ALLOWNONLOCAL, &value))
- xf86Info.vidModeAllowNonLocal = value;
-#endif
-
- if (xf86GetOptValBool(FlagOptions, FLAG_ALLOWMOUSEOPENFAIL, &value))
- xf86Info.allowMouseOpenFail = value;
-
- if (xf86GetOptValBool(FlagOptions, FLAG_VTSYSREQ, &value)) {
-#ifdef USE_VT_SYSREQ
- xf86Info.vtSysreq = value;
- xf86Msg(X_CONFIG, "VTSysReq %s\n", value ? "enabled" : "disabled");
-#else
- if (value)
- xf86Msg(X_WARNING, "VTSysReq is not supported on this OS\n");
-#endif
- }
-
- xf86Info.pmFlag = TRUE;
- if (xf86GetOptValBool(FlagOptions, FLAG_NOPM, &value))
- xf86Info.pmFlag = !value;
- {
- if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) {
- if (!xf86NameCmp(s,"flush")) {
- xf86Msg(X_CONFIG, "Flushing logfile enabled\n");
- xf86Info.log = LogFlush;
- LogSetParameter(XLOG_FLUSH, TRUE);
- } else if (!xf86NameCmp(s,"sync")) {
- xf86Msg(X_CONFIG, "Syncing logfile enabled\n");
- xf86Info.log = LogSync;
- LogSetParameter(XLOG_FLUSH, TRUE);
- LogSetParameter(XLOG_SYNC, TRUE);
- } else {
- xf86Msg(X_WARNING,"Unknown Log option\n");
- }
- }
- }
-
- {
- if ((s = xf86GetOptValString(FlagOptions, FLAG_RENDER_COLORMAP_MODE))){
- int policy = PictureParseCmapPolicy (s);
- if (policy == PictureCmapPolicyInvalid)
- xf86Msg(X_WARNING, "Unknown colormap policy \"%s\"\n", s);
- else
- {
- xf86Msg(X_CONFIG, "Render colormap policy set to %s\n", s);
- PictureCmapPolicy = policy;
- }
- }
- }
-
-#ifdef RANDR
- xf86Info.disableRandR = FALSE;
- xf86Info.randRFrom = X_DEFAULT;
- if (xf86GetOptValBool(FlagOptions, FLAG_RANDR, &value)) {
- xf86Info.disableRandR = !value;
- xf86Info.randRFrom = X_CONFIG;
- }
-#endif
-
- xf86Info.aiglx = TRUE;
- xf86Info.aiglxFrom = X_DEFAULT;
- if (xf86GetOptValBool(FlagOptions, FLAG_AIGLX, &value)) {
- xf86Info.aiglx = value;
- xf86Info.aiglxFrom = X_CONFIG;
- }
-
-#ifdef GLXEXT
- xf86Info.glxVisuals = XF86_GlxVisualsTypical;
- xf86Info.glxVisualsFrom = X_DEFAULT;
- if ((s = xf86GetOptValString(FlagOptions, FLAG_GLX_VISUALS))) {
- if (!xf86NameCmp(s, "minimal")) {
- xf86Info.glxVisuals = XF86_GlxVisualsMinimal;
- } else if (!xf86NameCmp(s, "typical")) {
- xf86Info.glxVisuals = XF86_GlxVisualsTypical;
- } else if (!xf86NameCmp(s, "all")) {
- xf86Info.glxVisuals = XF86_GlxVisualsAll;
- } else {
- xf86Msg(X_WARNING,"Unknown GlxVisuals option\n");
- }
- }
-
- if (xf86GetOptValBool(FlagOptions, FLAG_AIGLX, &value)) {
- xf86Info.aiglx = value;
- xf86Info.aiglxFrom = X_CONFIG;
- }
-#endif
-
- /* if we're not hotplugging, force some input devices to exist */
- xf86Info.forceInputDevices = !(xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
-
- /* when forcing input devices, we use kbd. otherwise evdev, so use the
- * evdev rules set. */
-#if defined(linux)
- if (!xf86Info.forceInputDevices)
- set.rules = "evdev";
-#endif
- XkbSetRulesDflts(&set);
-
- xf86Info.useDefaultFontPath = TRUE;
- xf86Info.useDefaultFontPathFrom = X_DEFAULT;
- if (xf86GetOptValBool(FlagOptions, FLAG_USE_DEFAULT_FONT_PATH, &value)) {
- xf86Info.useDefaultFontPath = value;
- xf86Info.useDefaultFontPathFrom = X_CONFIG;
- }
-
-/* Make sure that timers don't overflow CARD32's after multiplying */
-#define MAX_TIME_IN_MIN (0x7fffffff / MILLI_PER_MIN)
-
- i = -1;
- xf86GetOptValInteger(FlagOptions, FLAG_SAVER_BLANKTIME, &i);
- if ((i >= 0) && (i < MAX_TIME_IN_MIN))
- ScreenSaverTime = defaultScreenSaverTime = i * MILLI_PER_MIN;
- else if (i != -1)
- xf86ConfigError("BlankTime value %d outside legal range of 0 - %d minutes",
- i, MAX_TIME_IN_MIN);
-
-#ifdef DPMSExtension
- i = -1;
- xf86GetOptValInteger(FlagOptions, FLAG_DPMS_STANDBYTIME, &i);
- if ((i >= 0) && (i < MAX_TIME_IN_MIN))
- DPMSStandbyTime = i * MILLI_PER_MIN;
- else if (i != -1)
- xf86ConfigError("StandbyTime value %d outside legal range of 0 - %d minutes",
- i, MAX_TIME_IN_MIN);
- i = -1;
- xf86GetOptValInteger(FlagOptions, FLAG_DPMS_SUSPENDTIME, &i);
- if ((i >= 0) && (i < MAX_TIME_IN_MIN))
- DPMSSuspendTime = i * MILLI_PER_MIN;
- else if (i != -1)
- xf86ConfigError("SuspendTime value %d outside legal range of 0 - %d minutes",
- i, MAX_TIME_IN_MIN);
- i = -1;
- xf86GetOptValInteger(FlagOptions, FLAG_DPMS_OFFTIME, &i);
- if ((i >= 0) && (i < MAX_TIME_IN_MIN))
- DPMSOffTime = i * MILLI_PER_MIN;
- else if (i != -1)
- xf86ConfigError("OffTime value %d outside legal range of 0 - %d minutes",
- i, MAX_TIME_IN_MIN);
-#endif
-
- i = -1;
- xf86GetOptValInteger(FlagOptions, FLAG_PIXMAP, &i);
- switch (i) {
- case 24:
- pix24 = Pix24Use24;
- break;
- case 32:
- pix24 = Pix24Use32;
- break;
- case -1:
- break;
- default:
- xf86ConfigError("Pixmap option's value (%d) must be 24 or 32\n", i);
- return FALSE;
- }
- if (xf86Pix24 != Pix24DontCare) {
- xf86Info.pixmap24 = xf86Pix24;
- xf86Info.pix24From = X_CMDLINE;
- } else if (pix24 != Pix24DontCare) {
- xf86Info.pixmap24 = pix24;
- xf86Info.pix24From = X_CONFIG;
- } else {
- xf86Info.pixmap24 = Pix24DontCare;
- xf86Info.pix24From = X_DEFAULT;
- }
-#ifdef SUPPORT_PC98
- if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) {
- xf86Info.pc98 = value;
- if (value) {
- xf86Msg(X_CONFIG, "Japanese PC98 architecture\n");
- }
- } else
- if (detectPC98()) {
- xf86Info.pc98 = TRUE;
- xf86Msg(X_PROBED, "Japanese PC98 architecture\n");
- }
-#endif
-
-#ifdef PANORAMIX
- from = X_DEFAULT;
- if (!noPanoramiXExtension)
- from = X_CMDLINE;
- else if (xf86GetOptValBool(FlagOptions, FLAG_XINERAMA, &value)) {
- noPanoramiXExtension = !value;
- from = X_CONFIG;
- }
- if (!noPanoramiXExtension)
- xf86Msg(from, "Xinerama: enabled\n");
-#endif
-
-#ifdef DRI2
- xf86Info.dri2 = FALSE;
- xf86Info.dri2From = X_DEFAULT;
- if (xf86GetOptValBool(FlagOptions, FLAG_DRI2, &value)) {
- xf86Info.dri2 = value;
- xf86Info.dri2From = X_CONFIG;
- }
-#endif
-
- return TRUE;
-}
-
-Bool xf86DRI2Enabled(void)
-{
- return xf86Info.dri2;
-}
-
-/*
- * Locate the core input devices. These can be specified/located in
- * the following ways, in order of priority:
- *
- * 1. The InputDevices named by the -pointer and -keyboard command line
- * options.
- * 2. The "CorePointer" and "CoreKeyboard" InputDevices referred to by
- * the active ServerLayout.
- * 3. The first InputDevices marked as "CorePointer" and "CoreKeyboard".
- * 4. The first InputDevices that use 'keyboard' or 'kbd' and a valid mouse
- * driver (mouse, synaptics, evdev, vmmouse, void)
- * 5. Default devices with an empty (default) configuration. These defaults
- * will reference the 'mouse' and 'keyboard' drivers.
- */
-
-static Bool
-checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
-{
- InputInfoPtr corePointer = NULL, coreKeyboard = NULL;
- Bool foundPointer = FALSE, foundKeyboard = FALSE;
- const char *pointerMsg = NULL, *keyboardMsg = NULL;
- InputInfoPtr *devs, /* iterator */
- indp;
- InputInfoRec Pointer = {}, Keyboard = {};
- XF86ConfInputPtr confInput;
- XF86ConfInputRec defPtr, defKbd;
- int count = 0;
- MessageType from = X_DEFAULT;
- int found = 0;
- const char *mousedrivers[] = { "mouse", "synaptics", "evdev", "vmmouse",
- "void", NULL };
-
- /*
- * First check if a core pointer or core keyboard have been specified
- * in the active ServerLayout. If more than one is specified for either,
- * remove the core attribute from the later ones.
- */
- for (devs = servlayoutp->inputs; devs && *devs; devs++) {
- indp = *devs;
- if (indp->options &&
- xf86CheckBoolOption(indp->options, "CorePointer", FALSE)) {
- if (!corePointer) {
- corePointer = indp;
- } else {
- xf86ReplaceBoolOption(indp->options, "CorePointer", FALSE);
- xf86Msg(X_WARNING, "Duplicate core pointer devices. "
- "Removing core pointer attribute from \"%s\"\n",
- indp->name);
- }
- }
- if (indp->options &&
- xf86CheckBoolOption(indp->options, "CoreKeyboard", FALSE)) {
- if (!coreKeyboard) {
- coreKeyboard = indp;
- } else {
- xf86ReplaceBoolOption(indp->options, "CoreKeyboard", FALSE);
- xf86Msg(X_WARNING, "Duplicate core keyboard devices. "
- "Removing core keyboard attribute from \"%s\"\n",
- indp->name);
- }
- }
- count++;
- }
-
- confInput = NULL;
-
- /* 1. Check for the -pointer command line option. */
- if (xf86PointerName) {
- confInput = xf86findInput(xf86PointerName,
- xf86configptr->conf_input_lst);
- if (!confInput) {
- xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n",
- xf86PointerName);
- return FALSE;
- }
- from = X_CMDLINE;
- /*
- * If one was already specified in the ServerLayout, it needs to be
- * removed.
- */
- if (corePointer) {
- for (devs = servlayoutp->inputs; devs && *devs; devs++)
- if (*devs == corePointer)
- {
- free(*devs);
- *devs = (InputInfoPtr)0x1; /* ensure we dont skip next loop*/
- break;
- }
- for (; devs && *devs; devs++)
- devs[0] = devs[1];
- count--;
- }
- corePointer = NULL;
- foundPointer = TRUE;
- }
-
- /* 2. ServerLayout-specified core pointer. */
- if (corePointer) {
- foundPointer = TRUE;
- from = X_CONFIG;
- }
-
- /* 3. First core pointer device. */
- if (!foundPointer && (xf86Info.forceInputDevices || implicitLayout)) {
- XF86ConfInputPtr p;
-
- for (p = xf86configptr->conf_input_lst; p; p = p->list.next) {
- if (p->inp_option_lst &&
- xf86CheckBoolOption(p->inp_option_lst, "CorePointer", FALSE)) {
- confInput = p;
- foundPointer = TRUE;
- from = X_DEFAULT;
- pointerMsg = "first core pointer device";
- break;
- }
- }
- }
-
- /* 4. First pointer with an allowed mouse driver. */
- if (!foundPointer && xf86Info.forceInputDevices) {
- const char **driver = mousedrivers;
- confInput = xf86findInput(CONF_IMPLICIT_POINTER,
- xf86configptr->conf_input_lst);
- while (*driver && !confInput) {
- confInput = xf86findInputByDriver(*driver,
- xf86configptr->conf_input_lst);
- driver++;
- }
- if (confInput) {
- foundPointer = TRUE;
- from = X_DEFAULT;
- pointerMsg = "first mouse device";
- }
- }
-
- /* 5. Built-in default. */
- if (!foundPointer && xf86Info.forceInputDevices) {
- memset(&defPtr, 0, sizeof(defPtr));
- defPtr.inp_identifier = strdup("<default pointer>");
- defPtr.inp_driver = strdup("mouse");
- confInput = &defPtr;
- foundPointer = TRUE;
- from = X_DEFAULT;
- pointerMsg = "default mouse configuration";
- }
-
- /* Add the core pointer device to the layout, and set it to Core. */
- if (foundPointer && confInput) {
- foundPointer = configInput(&Pointer, confInput, from);
- if (foundPointer) {
- count++;
- devs = xnfrealloc(servlayoutp->inputs,
- (count + 1) * sizeof(InputInfoPtr));
- devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
- *devs[count - 1] = Pointer;
- devs[count - 1]->options =
- xf86addNewOption(devs[count -1]->options,
- xnfstrdup("CorePointer"), NULL);
- devs[count] = NULL;
- servlayoutp->inputs = devs;
- }
- }
-
- if (!foundPointer && xf86Info.forceInputDevices) {
- /* This shouldn't happen. */
- xf86Msg(X_ERROR, "Cannot locate a core pointer device.\n");
- return FALSE;
- }
-
- /*
- * always synthesize a 'mouse' section configured to send core
- * events, unless a 'void' section is found, in which case the user
- * probably wants to run footless.
- *
- * If you're using an evdev keyboard and expect a default mouse
- * section ... deal.
- */
- for (devs = servlayoutp->inputs; devs && *devs; devs++) {
- const char **driver = mousedrivers;
- while(*driver) {
- if (!strcmp((*devs)->driver, *driver)) {
- found = 1;
- break;
- }
- driver++;
- }
- }
- if (!found && xf86Info.forceInputDevices) {
- xf86Msg(X_INFO, "No default mouse found, adding one\n");
- memset(&defPtr, 0, sizeof(defPtr));
- defPtr.inp_identifier = strdup("<default pointer>");
- defPtr.inp_driver = strdup("mouse");
- confInput = &defPtr;
- foundPointer = configInput(&Pointer, confInput, from);
- if (foundPointer) {
- count++;
- devs = xnfrealloc(servlayoutp->inputs,
- (count + 1) * sizeof(InputInfoPtr));
- devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
- *devs[count - 1] = Pointer;
- devs[count - 1]->options =
- xf86addNewOption(NULL, xnfstrdup("AlwaysCore"), NULL);
- devs[count] = NULL;
- servlayoutp->inputs = devs;
- }
- }
-
- confInput = NULL;
-
- /* 1. Check for the -keyboard command line option. */
- if (xf86KeyboardName) {
- confInput = xf86findInput(xf86KeyboardName,
- xf86configptr->conf_input_lst);
- if (!confInput) {
- xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n",
- xf86KeyboardName);
- return FALSE;
- }
- from = X_CMDLINE;
- /*
- * If one was already specified in the ServerLayout, it needs to be
- * removed.
- */
- if (coreKeyboard) {
- for (devs = servlayoutp->inputs; devs && *devs; devs++)
- if (*devs == coreKeyboard)
- {
- free(*devs);
- *devs = (InputInfoPtr)0x1; /* ensure we dont skip next loop */
- break;
- }
- for (; devs && *devs; devs++)
- devs[0] = devs[1];
- count--;
- }
- coreKeyboard = NULL;
- foundKeyboard = TRUE;
- }
-
- /* 2. ServerLayout-specified core keyboard. */
- if (coreKeyboard) {
- foundKeyboard = TRUE;
- from = X_CONFIG;
- }
-
- /* 3. First core keyboard device. */
- if (!foundKeyboard && (xf86Info.forceInputDevices || implicitLayout)) {
- XF86ConfInputPtr p;
-
- for (p = xf86configptr->conf_input_lst; p; p = p->list.next) {
- if (p->inp_option_lst &&
- xf86CheckBoolOption(p->inp_option_lst, "CoreKeyboard", FALSE)) {
- confInput = p;
- foundKeyboard = TRUE;
- from = X_DEFAULT;
- keyboardMsg = "first core keyboard device";
- break;
- }
- }
- }
-
- /* 4. First keyboard with 'keyboard' or 'kbd' as the driver. */
- if (!foundKeyboard && xf86Info.forceInputDevices) {
- confInput = xf86findInput(CONF_IMPLICIT_KEYBOARD,
- xf86configptr->conf_input_lst);
- if (!confInput) {
- confInput = xf86findInputByDriver("kbd",
- xf86configptr->conf_input_lst);
- }
- if (confInput) {
- foundKeyboard = TRUE;
- from = X_DEFAULT;
- keyboardMsg = "first keyboard device";
- }
- }
-
- /* 5. Built-in default. */
- if (!foundKeyboard && xf86Info.forceInputDevices) {
- memset(&defKbd, 0, sizeof(defKbd));
- defKbd.inp_identifier = strdup("<default keyboard>");
- defKbd.inp_driver = strdup("kbd");
- confInput = &defKbd;
- foundKeyboard = TRUE;
- keyboardMsg = "default keyboard configuration";
- from = X_DEFAULT;
- }
-
- /* Add the core keyboard device to the layout, and set it to Core. */
- if (foundKeyboard && confInput) {
- foundKeyboard = configInput(&Keyboard, confInput, from);
- if (foundKeyboard) {
- count++;
- devs = xnfrealloc(servlayoutp->inputs,
- (count + 1) * sizeof(InputInfoPtr));
- devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
- *devs[count - 1] = Keyboard;
- devs[count - 1]->options =
- xf86addNewOption(devs[count - 1]->options,
- xnfstrdup("CoreKeyboard"), NULL);
- devs[count] = NULL;
- servlayoutp->inputs = devs;
- }
- }
-
- if (!foundKeyboard && xf86Info.forceInputDevices) {
- /* This shouldn't happen. */
- xf86Msg(X_ERROR, "Cannot locate a core keyboard device.\n");
- return FALSE;
- }
-
- if (pointerMsg) {
- if (implicitLayout)
- xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n",
- pointerMsg);
- else
- xf86Msg(X_DEFAULT, "The core pointer device wasn't specified "
- "explicitly in the layout.\n"
- "\tUsing the %s.\n", pointerMsg);
- }
-
- if (keyboardMsg) {
- if (implicitLayout)
- xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n",
- keyboardMsg);
- else
- xf86Msg(X_DEFAULT, "The core keyboard device wasn't specified "
- "explicitly in the layout.\n"
- "\tUsing the %s.\n", keyboardMsg);
- }
-
- if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
-#if defined(CONFIG_HAL) || defined(CONFIG_UDEV)
- const char *config_backend;
-#if defined(CONFIG_HAL)
- config_backend = "HAL";
-#else
- config_backend = "udev";
-#endif
- xf86Msg(X_INFO, "The server relies on %s to provide the list of "
- "input devices.\n\tIf no devices become available, "
- "reconfigure %s or disable AutoAddDevices.\n",
- config_backend, config_backend);
-#else
- xf86Msg(X_WARNING, "Hotplugging requested but the server was "
- "compiled without a config backend. "
- "No input devices were configured, the server "
- "will start without any input devices.\n");
-#endif
- }
-
- return TRUE;
-}
-
-typedef enum {
- LAYOUT_ISOLATEDEVICE,
- LAYOUT_SINGLECARD
-} LayoutValues;
-
-static OptionInfoRec LayoutOptions[] = {
- { LAYOUT_ISOLATEDEVICE, "IsolateDevice", OPTV_STRING,
- {0}, FALSE },
- { LAYOUT_SINGLECARD, "SingleCard", OPTV_BOOLEAN,
- {0}, FALSE },
- { -1, NULL, OPTV_NONE,
- {0}, FALSE },
-};
-
-static Bool
-configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp)
-{
- XF86ConfInputrefPtr irp;
- InputInfoPtr *indp;
- int count = 0;
-
- /*
- * Count the number of input devices.
- */
- irp = layout->lay_input_lst;
- while (irp) {
- count++;
- irp = (XF86ConfInputrefPtr)irp->list.next;
- }
- DebugF("Found %d input devices in the layout section %s\n",
- count, layout->lay_identifier);
- indp = xnfcalloc((count + 1), sizeof(InputInfoPtr));
- indp[count] = NULL;
- irp = layout->lay_input_lst;
- count = 0;
- while (irp) {
- indp[count] = xf86AllocateInput();
- if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) {
- while(count--)
- free(indp[count]);
- free(indp);
- return FALSE;
- }
- indp[count]->options = xf86OptionListMerge(indp[count]->options,
- irp->iref_option_lst);
- count++;
- irp = (XF86ConfInputrefPtr)irp->list.next;
- }
- servlayoutp->inputs = indp;
-
- return TRUE;
-}
-
-
-/*
- * figure out which layout is active, which screens are used in that layout,
- * which drivers and monitors are used in these screens
- */
-static Bool
-configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
- char *default_layout)
-{
- XF86ConfAdjacencyPtr adjp;
- XF86ConfInactivePtr idp;
- int count = 0;
- int scrnum;
- XF86ConfLayoutPtr l;
- MessageType from;
- screenLayoutPtr slp;
- GDevPtr gdp;
- int i = 0, j;
-
- if (!servlayoutp)
- return FALSE;
-
- /*
- * which layout section is the active one?
- *
- * If there is a -layout command line option, use that one, otherwise
- * pick the first one.
- */
- from = X_DEFAULT;
- if (xf86LayoutName != NULL)
- from = X_CMDLINE;
- else if (default_layout) {
- xf86LayoutName = default_layout;
- from = X_CONFIG;
- }
- if (xf86LayoutName != NULL) {
- if ((l = xf86findLayout(xf86LayoutName, conf_layout)) == NULL) {
- xf86Msg(X_ERROR, "No ServerLayout section called \"%s\"\n",
- xf86LayoutName);
- return FALSE;
- }
- conf_layout = l;
- }
- xf86Msg(from, "ServerLayout \"%s\"\n", conf_layout->lay_identifier);
- adjp = conf_layout->lay_adjacency_lst;
-
- /*
- * we know that each screen is referenced exactly once on the left side
- * of a layout statement in the Layout section. So to allocate the right
- * size for the array we do a quick walk of the list to figure out how
- * many sections we have
- */
- while (adjp) {
- count++;
- adjp = (XF86ConfAdjacencyPtr)adjp->list.next;
- }
-
- DebugF("Found %d screens in the layout section %s",
- count, conf_layout->lay_identifier);
- if (!count) /* alloc enough storage even if no screen is specified */
- count = 1;
-
- slp = xnfcalloc(1, (count + 1) * sizeof(screenLayoutRec));
- slp[count].screen = NULL;
- /*
- * now that we have storage, loop over the list again and fill in our
- * data structure; at this point we do not fill in the adjacency
- * information as it is not clear if we need it at all
- */
- adjp = conf_layout->lay_adjacency_lst;
- count = 0;
- while (adjp) {
- slp[count].screen = xnfcalloc(1, sizeof(confScreenRec));
- if (adjp->adj_scrnum < 0)
- scrnum = count;
- else
- scrnum = adjp->adj_scrnum;
- if (!configScreen(slp[count].screen, adjp->adj_screen, scrnum,
- X_CONFIG)) {
- free(slp);
- return FALSE;
- }
- slp[count].x = adjp->adj_x;
- slp[count].y = adjp->adj_y;
- slp[count].refname = adjp->adj_refscreen;
- switch (adjp->adj_where) {
- case CONF_ADJ_OBSOLETE:
- slp[count].where = PosObsolete;
- slp[count].topname = adjp->adj_top_str;
- slp[count].bottomname = adjp->adj_bottom_str;
- slp[count].leftname = adjp->adj_left_str;
- slp[count].rightname = adjp->adj_right_str;
- break;
- case CONF_ADJ_ABSOLUTE:
- slp[count].where = PosAbsolute;
- break;
- case CONF_ADJ_RIGHTOF:
- slp[count].where = PosRightOf;
- break;
- case CONF_ADJ_LEFTOF:
- slp[count].where = PosLeftOf;
- break;
- case CONF_ADJ_ABOVE:
- slp[count].where = PosAbove;
- break;
- case CONF_ADJ_BELOW:
- slp[count].where = PosBelow;
- break;
- case CONF_ADJ_RELATIVE:
- slp[count].where = PosRelative;
- break;
- }
- count++;
- adjp = (XF86ConfAdjacencyPtr)adjp->list.next;
- }
-
- /* No screen was specified in the layout. take the first one from the
- * config file, or - if it is NULL - configScreen autogenerates one for
- * us */
- if (!count)
- {
- slp[0].screen = xnfcalloc(1, sizeof(confScreenRec));
- if (!configScreen(slp[0].screen, xf86configptr->conf_screen_lst,
- 0, X_CONFIG)) {
- free(slp[0].screen);
- free(slp);
- return FALSE;
- }
- }
-
- /* XXX Need to tie down the upper left screen. */
-
- /* Fill in the refscreen and top/bottom/left/right values */
- for (i = 0; i < count; i++) {
- for (j = 0; j < count; j++) {
- if (slp[i].refname &&
- strcmp(slp[i].refname, slp[j].screen->id) == 0) {
- slp[i].refscreen = slp[j].screen;
- }
- if (slp[i].topname &&
- strcmp(slp[i].topname, slp[j].screen->id) == 0) {
- slp[i].top = slp[j].screen;
- }
- if (slp[i].bottomname &&
- strcmp(slp[i].bottomname, slp[j].screen->id) == 0) {
- slp[i].bottom = slp[j].screen;
- }
- if (slp[i].leftname &&
- strcmp(slp[i].leftname, slp[j].screen->id) == 0) {
- slp[i].left = slp[j].screen;
- }
- if (slp[i].rightname &&
- strcmp(slp[i].rightname, slp[j].screen->id) == 0) {
- slp[i].right = slp[j].screen;
- }
- }
- if (slp[i].where != PosObsolete
- && slp[i].where != PosAbsolute
- && !slp[i].refscreen) {
- xf86Msg(X_ERROR,"Screen %s doesn't exist: deleting placement\n",
- slp[i].refname);
- slp[i].where = PosAbsolute;
- slp[i].x = 0;
- slp[i].y = 0;
- }
- }
-
- /*
- * Count the number of inactive devices.
- */
- count = 0;
- idp = conf_layout->lay_inactive_lst;
- while (idp) {
- count++;
- idp = (XF86ConfInactivePtr)idp->list.next;
- }
- DebugF("Found %d inactive devices in the layout section %s\n",
- count, conf_layout->lay_identifier);
- gdp = xnfalloc((count + 1) * sizeof(GDevRec));
- gdp[count].identifier = NULL;
- idp = conf_layout->lay_inactive_lst;
- count = 0;
- while (idp) {
- if (!configDevice(&gdp[count], idp->inactive_device, FALSE)) {
- free(gdp);
- return FALSE;
- }
- count++;
- idp = (XF86ConfInactivePtr)idp->list.next;
- }
-
- if (!configInputDevices(conf_layout, servlayoutp))
- return FALSE;
-
- servlayoutp->id = conf_layout->lay_identifier;
- servlayoutp->screens = slp;
- servlayoutp->inactives = gdp;
- servlayoutp->options = conf_layout->lay_option_lst;
- from = X_DEFAULT;
-
- return TRUE;
-}
-
-/*
- * No layout section, so find the first Screen section and set that up as
- * the only active screen.
- */
-static Bool
-configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
- XF86ConfigPtr xf86configptr)
-{
- MessageType from;
- XF86ConfScreenPtr s;
- screenLayoutPtr slp;
- InputInfoPtr *indp;
- XF86ConfLayoutRec layout;
-
- if (!servlayoutp)
- return FALSE;
-
- /*
- * which screen section is the active one?
- *
- * If there is a -screen option, use that one, otherwise use the first
- * one.
- */
-
- from = X_CONFIG;
- if (xf86ScreenName != NULL) {
- if ((s = xf86findScreen(xf86ScreenName, conf_screen)) == NULL) {
- xf86Msg(X_ERROR, "No Screen section called \"%s\"\n",
- xf86ScreenName);
- return FALSE;
- }
- conf_screen = s;
- from = X_CMDLINE;
- }
-
- /* We have exactly one screen */
-
- slp = xnfcalloc(1, 2 * sizeof(screenLayoutRec));
- slp[0].screen = xnfcalloc(1, sizeof(confScreenRec));
- slp[1].screen = NULL;
- if (!configScreen(slp[0].screen, conf_screen, 0, from)) {
- free(slp);
- return FALSE;
- }
- servlayoutp->id = "(implicit)";
- servlayoutp->screens = slp;
- servlayoutp->inactives = xnfcalloc(1, sizeof(GDevRec));
- servlayoutp->options = NULL;
-
- memset(&layout, 0, sizeof(layout));
- layout.lay_identifier = servlayoutp->id;
- if (xf86layoutAddInputDevices(xf86configptr, &layout) > 0) {
- if (!configInputDevices(&layout, servlayoutp))
- return FALSE;
- from = X_DEFAULT;
- } else {
- /* Set up an empty input device list, then look for some core devices. */
- indp = xnfalloc(sizeof(InputInfoPtr));
- *indp = NULL;
- servlayoutp->inputs = indp;
- }
-
- return TRUE;
-}
-
-static Bool
-configXvAdaptor(confXvAdaptorPtr adaptor, XF86ConfVideoAdaptorPtr conf_adaptor)
-{
- int count = 0;
- XF86ConfVideoPortPtr conf_port;
-
- xf86Msg(X_CONFIG, "| |-->VideoAdaptor \"%s\"\n",
- conf_adaptor->va_identifier);
- adaptor->identifier = conf_adaptor->va_identifier;
- adaptor->options = conf_adaptor->va_option_lst;
- if (conf_adaptor->va_busid || conf_adaptor->va_driver) {
- xf86Msg(X_CONFIG, "| | Unsupported device type, skipping entry\n");
- return FALSE;
- }
-
- /*
- * figure out how many videoport subsections there are and fill them in
- */
- conf_port = conf_adaptor->va_port_lst;
- while(conf_port) {
- count++;
- conf_port = (XF86ConfVideoPortPtr)conf_port->list.next;
- }
- adaptor->ports = xnfalloc((count) * sizeof(confXvPortRec));
- adaptor->numports = count;
- count = 0;
- conf_port = conf_adaptor->va_port_lst;
- while(conf_port) {
- adaptor->ports[count].identifier = conf_port->vp_identifier;
- adaptor->ports[count].options = conf_port->vp_option_lst;
- count++;
- conf_port = (XF86ConfVideoPortPtr)conf_port->list.next;
- }
-
- return TRUE;
-}
-
-static Bool
-configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
- MessageType from)
-{
- int count = 0;
- XF86ConfDisplayPtr dispptr;
- XF86ConfAdaptorLinkPtr conf_adaptor;
- Bool defaultMonitor = FALSE;
- XF86ConfScreenRec local_conf_screen;
-
- if (!conf_screen) {
- memset(&local_conf_screen, 0, sizeof(local_conf_screen));
- conf_screen = &local_conf_screen;
- conf_screen->scrn_identifier = "Default Screen Section";
- xf86Msg(X_DEFAULT, "No screen section available. Using defaults.\n");
- }
-
- xf86Msg(from, "|-->Screen \"%s\" (%d)\n", conf_screen->scrn_identifier,
- scrnum);
- /*
- * now we fill in the elements of the screen
- */
- screenp->id = conf_screen->scrn_identifier;
- screenp->screennum = scrnum;
- screenp->defaultdepth = conf_screen->scrn_defaultdepth;
- screenp->defaultbpp = conf_screen->scrn_defaultbpp;
- screenp->defaultfbbpp = conf_screen->scrn_defaultfbbpp;
- screenp->monitor = xnfcalloc(1, sizeof(MonRec));
- /* If no monitor is specified, create a default one. */
- if (!conf_screen->scrn_monitor) {
- XF86ConfMonitorRec defMon;
-
- memset(&defMon, 0, sizeof(defMon));
- defMon.mon_identifier = "<default monitor>";
- if (!configMonitor(screenp->monitor, &defMon))
- return FALSE;
- defaultMonitor = TRUE;
- } else {
- if (!configMonitor(screenp->monitor,conf_screen->scrn_monitor))
- return FALSE;
- }
- /* Configure the device. If there isn't one configured, attach to the
- * first inactive one that we can configure. If there's none that work,
- * set it to NULL so that the section can be autoconfigured later */
- screenp->device = xnfcalloc(1, sizeof(GDevRec));
- if ((!conf_screen->scrn_device) && (xf86configptr->conf_device_lst)) {
- conf_screen->scrn_device = xf86configptr->conf_device_lst;
- xf86Msg(X_DEFAULT, "No device specified for screen \"%s\".\n"
- "\tUsing the first device section listed.\n", screenp->id);
- }
- if (configDevice(screenp->device,conf_screen->scrn_device, TRUE)) {
- screenp->device->myScreenSection = screenp;
- } else {
- screenp->device = NULL;
- }
- screenp->options = conf_screen->scrn_option_lst;
-
- /*
- * figure out how many display subsections there are and fill them in
- */
- dispptr = conf_screen->scrn_display_lst;
- while(dispptr) {
- count++;
- dispptr = (XF86ConfDisplayPtr)dispptr->list.next;
- }
- screenp->displays = xnfalloc((count) * sizeof(DispRec));
- screenp->numdisplays = count;
-
- /* Fill in the default Virtual size, if any */
- if (conf_screen->scrn_virtualX && conf_screen->scrn_virtualY) {
- for (count = 0, dispptr = conf_screen->scrn_display_lst;
- dispptr;
- dispptr = (XF86ConfDisplayPtr)dispptr->list.next, count++) {
- screenp->displays[count].virtualX = conf_screen->scrn_virtualX;
- screenp->displays[count].virtualY = conf_screen->scrn_virtualY;
- }
- }
-
- /* Now do the per-Display Virtual sizes */
- count = 0;
- dispptr = conf_screen->scrn_display_lst;
- while(dispptr) {
- configDisplay(&(screenp->displays[count]),dispptr);
- count++;
- dispptr = (XF86ConfDisplayPtr)dispptr->list.next;
- }
-
- /*
- * figure out how many videoadaptor references there are and fill them in
- */
- conf_adaptor = conf_screen->scrn_adaptor_lst;
- while(conf_adaptor) {
- count++;
- conf_adaptor = (XF86ConfAdaptorLinkPtr)conf_adaptor->list.next;
- }
- screenp->xvadaptors = xnfalloc((count) * sizeof(confXvAdaptorRec));
- screenp->numxvadaptors = 0;
- conf_adaptor = conf_screen->scrn_adaptor_lst;
- while(conf_adaptor) {
- if (configXvAdaptor(&(screenp->xvadaptors[screenp->numxvadaptors]),
- conf_adaptor->al_adaptor))
- screenp->numxvadaptors++;
- conf_adaptor = (XF86ConfAdaptorLinkPtr)conf_adaptor->list.next;
- }
-
- if (defaultMonitor) {
- xf86Msg(X_DEFAULT, "No monitor specified for screen \"%s\".\n"
- "\tUsing a default monitor configuration.\n", screenp->id);
- }
- return TRUE;
-}
-
-typedef enum {
- MON_REDUCEDBLANKING,
- MON_MAX_PIX_CLOCK,
-} MonitorValues;
-
-static OptionInfoRec MonitorOptions[] = {
- { MON_REDUCEDBLANKING, "ReducedBlanking", OPTV_BOOLEAN,
- {0}, FALSE },
- { MON_MAX_PIX_CLOCK, "MaxPixClock", OPTV_FREQ,
- {0}, FALSE },
- { -1, NULL, OPTV_NONE,
- {0}, FALSE },
-};
-
-static Bool
-configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
-{
- int count;
- DisplayModePtr mode,last = NULL;
- XF86ConfModeLinePtr cmodep;
- XF86ConfModesPtr modes;
- XF86ConfModesLinkPtr modeslnk = conf_monitor->mon_modes_sect_lst;
- Gamma zeros = {0.0, 0.0, 0.0};
- float badgamma = 0.0;
- double maxPixClock;
-
- xf86Msg(X_CONFIG, "| |-->Monitor \"%s\"\n",
- conf_monitor->mon_identifier);
- monitorp->id = conf_monitor->mon_identifier;
- monitorp->vendor = conf_monitor->mon_vendor;
- monitorp->model = conf_monitor->mon_modelname;
- monitorp->Modes = NULL;
- monitorp->Last = NULL;
- monitorp->gamma = zeros;
- monitorp->widthmm = conf_monitor->mon_width;
- monitorp->heightmm = conf_monitor->mon_height;
- monitorp->reducedblanking = FALSE;
- monitorp->maxPixClock = 0;
- monitorp->options = conf_monitor->mon_option_lst;
-
- /*
- * fill in the monitor structure
- */
- for( count = 0 ;
- count < conf_monitor->mon_n_hsync && count < MAX_HSYNC;
- count++) {
- monitorp->hsync[count].hi = conf_monitor->mon_hsync[count].hi;
- monitorp->hsync[count].lo = conf_monitor->mon_hsync[count].lo;
- }
- monitorp->nHsync = count;
- for( count = 0 ;
- count < conf_monitor->mon_n_vrefresh && count < MAX_VREFRESH;
- count++) {
- monitorp->vrefresh[count].hi = conf_monitor->mon_vrefresh[count].hi;
- monitorp->vrefresh[count].lo = conf_monitor->mon_vrefresh[count].lo;
- }
- monitorp->nVrefresh = count;
-
- /*
- * first we collect the mode lines from the UseModes directive
- */
- while(modeslnk)
- {
- modes = xf86findModes (modeslnk->ml_modes_str,
- xf86configptr->conf_modes_lst);
- modeslnk->ml_modes = modes;
-
-
- /* now add the modes found in the modes
- section to the list of modes for this
- monitor unless it has been added before
- because we are reusing the same section
- for another screen */
- if (xf86itemNotSublist(
- (GenericListPtr)conf_monitor->mon_modeline_lst,
- (GenericListPtr)modes->mon_modeline_lst)) {
- conf_monitor->mon_modeline_lst = (XF86ConfModeLinePtr)
- xf86addListItem(
- (GenericListPtr)conf_monitor->mon_modeline_lst,
- (GenericListPtr)modes->mon_modeline_lst);
- }
- modeslnk = modeslnk->list.next;
- }
-
- /*
- * we need to hook in the mode lines now
- * here both data structures use lists, only our internal one
- * is double linked
- */
- cmodep = conf_monitor->mon_modeline_lst;
- while( cmodep ) {
- mode = xnfcalloc(1, sizeof(DisplayModeRec));
- mode->type = 0;
- mode->Clock = cmodep->ml_clock;
- mode->HDisplay = cmodep->ml_hdisplay;
- mode->HSyncStart = cmodep->ml_hsyncstart;
- mode->HSyncEnd = cmodep->ml_hsyncend;
- mode->HTotal = cmodep->ml_htotal;
- mode->VDisplay = cmodep->ml_vdisplay;
- mode->VSyncStart = cmodep->ml_vsyncstart;
- mode->VSyncEnd = cmodep->ml_vsyncend;
- mode->VTotal = cmodep->ml_vtotal;
- mode->Flags = cmodep->ml_flags;
- mode->HSkew = cmodep->ml_hskew;
- mode->VScan = cmodep->ml_vscan;
- mode->name = xnfstrdup(cmodep->ml_identifier);
- if( last ) {
- mode->prev = last;
- last->next = mode;
- }
- else {
- /*
- * this is the first mode
- */
- monitorp->Modes = mode;
- mode->prev = NULL;
- }
- last = mode;
- cmodep = (XF86ConfModeLinePtr)cmodep->list.next;
- }
- if(last){
- last->next = NULL;
- }
- monitorp->Last = last;
-
- /* add the (VESA) default modes */
- if (! addDefaultModes(monitorp) )
- return FALSE;
-
- if (conf_monitor->mon_gamma_red > GAMMA_ZERO)
- monitorp->gamma.red = conf_monitor->mon_gamma_red;
- if (conf_monitor->mon_gamma_green > GAMMA_ZERO)
- monitorp->gamma.green = conf_monitor->mon_gamma_green;
- if (conf_monitor->mon_gamma_blue > GAMMA_ZERO)
- monitorp->gamma.blue = conf_monitor->mon_gamma_blue;
-
- /* Check that the gamma values are within range */
- if (monitorp->gamma.red > GAMMA_ZERO &&
- (monitorp->gamma.red < GAMMA_MIN ||
- monitorp->gamma.red > GAMMA_MAX)) {
- badgamma = monitorp->gamma.red;
- } else if (monitorp->gamma.green > GAMMA_ZERO &&
- (monitorp->gamma.green < GAMMA_MIN ||
- monitorp->gamma.green > GAMMA_MAX)) {
- badgamma = monitorp->gamma.green;
- } else if (monitorp->gamma.blue > GAMMA_ZERO &&
- (monitorp->gamma.blue < GAMMA_MIN ||
- monitorp->gamma.blue > GAMMA_MAX)) {
- badgamma = monitorp->gamma.blue;
- }
- if (badgamma > GAMMA_ZERO) {
- xf86ConfigError("Gamma value %.f is out of range (%.2f - %.1f)\n",
- badgamma, GAMMA_MIN, GAMMA_MAX);
- return FALSE;
- }
-
- xf86ProcessOptions(-1, monitorp->options, MonitorOptions);
- xf86GetOptValBool(MonitorOptions, MON_REDUCEDBLANKING,
- &monitorp->reducedblanking);
- if (xf86GetOptValFreq(MonitorOptions, MON_MAX_PIX_CLOCK, OPTUNITS_KHZ,
- &maxPixClock) == TRUE) {
- monitorp->maxPixClock = (int) maxPixClock;
- }
-
- return TRUE;
-}
-
-static int
-lookupVisual(const char *visname)
-{
- int i;
-
- if (!visname || !*visname)
- return -1;
-
- for (i = 0; i <= DirectColor; i++) {
- if (!xf86nameCompare(visname, xf86VisualNames[i]))
- break;
- }
-
- if (i <= DirectColor)
- return i;
-
- return -1;
-}
-
-
-static Bool
-configDisplay(DispPtr displayp, XF86ConfDisplayPtr conf_display)
-{
- int count = 0;
- XF86ModePtr modep;
-
- displayp->frameX0 = conf_display->disp_frameX0;
- displayp->frameY0 = conf_display->disp_frameY0;
- displayp->virtualX = conf_display->disp_virtualX;
- displayp->virtualY = conf_display->disp_virtualY;
- displayp->depth = conf_display->disp_depth;
- displayp->fbbpp = conf_display->disp_bpp;
- displayp->weight.red = conf_display->disp_weight.red;
- displayp->weight.green = conf_display->disp_weight.green;
- displayp->weight.blue = conf_display->disp_weight.blue;
- displayp->blackColour.red = conf_display->disp_black.red;
- displayp->blackColour.green = conf_display->disp_black.green;
- displayp->blackColour.blue = conf_display->disp_black.blue;
- displayp->whiteColour.red = conf_display->disp_white.red;
- displayp->whiteColour.green = conf_display->disp_white.green;
- displayp->whiteColour.blue = conf_display->disp_white.blue;
- displayp->options = conf_display->disp_option_lst;
- if (conf_display->disp_visual) {
- displayp->defaultVisual = lookupVisual(conf_display->disp_visual);
- if (displayp->defaultVisual == -1) {
- xf86ConfigError("Invalid visual name: \"%s\"",
- conf_display->disp_visual);
- return FALSE;
- }
- } else {
- displayp->defaultVisual = -1;
- }
-
- /*
- * now hook in the modes
- */
- modep = conf_display->disp_mode_lst;
- while(modep) {
- count++;
- modep = (XF86ModePtr)modep->list.next;
- }
- displayp->modes = xnfalloc((count+1) * sizeof(char*));
- modep = conf_display->disp_mode_lst;
- count = 0;
- while(modep) {
- displayp->modes[count] = modep->mode_name;
- count++;
- modep = (XF86ModePtr)modep->list.next;
- }
- displayp->modes[count] = NULL;
-
- return TRUE;
-}
-
-static Bool
-configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active)
-{
- int i;
-
- if (!conf_device) {
- return FALSE;
- }
-
- if (active)
- xf86Msg(X_CONFIG, "| |-->Device \"%s\"\n",
- conf_device->dev_identifier);
- else
- xf86Msg(X_CONFIG, "|-->Inactive Device \"%s\"\n",
- conf_device->dev_identifier);
-
- devicep->identifier = conf_device->dev_identifier;
- devicep->vendor = conf_device->dev_vendor;
- devicep->board = conf_device->dev_board;
- devicep->chipset = conf_device->dev_chipset;
- devicep->ramdac = conf_device->dev_ramdac;
- devicep->driver = conf_device->dev_driver;
- devicep->active = active;
- devicep->videoRam = conf_device->dev_videoram;
- devicep->BiosBase = conf_device->dev_bios_base;
- devicep->MemBase = conf_device->dev_mem_base;
- devicep->IOBase = conf_device->dev_io_base;
- devicep->clockchip = conf_device->dev_clockchip;
- devicep->busID = conf_device->dev_busid;
- devicep->textClockFreq = conf_device->dev_textclockfreq;
- devicep->chipID = conf_device->dev_chipid;
- devicep->chipRev = conf_device->dev_chiprev;
- devicep->options = conf_device->dev_option_lst;
- devicep->irq = conf_device->dev_irq;
- devicep->screen = conf_device->dev_screen;
-
- for (i = 0; i < MAXDACSPEEDS; i++) {
- if (i < CONF_MAXDACSPEEDS)
- devicep->dacSpeeds[i] = conf_device->dev_dacSpeeds[i];
- else
- devicep->dacSpeeds[i] = 0;
- }
- devicep->numclocks = conf_device->dev_clocks;
- if (devicep->numclocks > MAXCLOCKS)
- devicep->numclocks = MAXCLOCKS;
- for (i = 0; i < devicep->numclocks; i++) {
- devicep->clock[i] = conf_device->dev_clock[i];
- }
- devicep->claimed = FALSE;
-
- return TRUE;
-}
-
-#ifdef XF86DRI
-static void
-configDRI(XF86ConfDRIPtr drip)
-{
- struct group *grp;
-
- xf86ConfigDRI.group = -1;
- xf86ConfigDRI.mode = 0;
-
- if (drip) {
- if (drip->dri_group_name) {
- if ((grp = getgrnam(drip->dri_group_name)))
- xf86ConfigDRI.group = grp->gr_gid;
- } else {
- if (drip->dri_group >= 0)
- xf86ConfigDRI.group = drip->dri_group;
- }
- xf86ConfigDRI.mode = drip->dri_mode;
- }
-}
-#endif
-
-static void
-configExtensions(XF86ConfExtensionsPtr conf_ext)
-{
- XF86OptionPtr o;
-
- if (conf_ext && conf_ext->ext_option_lst) {
- for (o = conf_ext->ext_option_lst; o; o = xf86NextOption(o)) {
- char *name = xf86OptionName(o);
- char *val = xf86OptionValue(o);
- char *n;
- Bool enable = TRUE;
-
- /* Handle "No<ExtensionName>" */
- n = xf86NormalizeName(name);
- if (strncmp(n, "no", 2) == 0) {
- name += 2;
- enable = FALSE;
- }
-
- if (!val ||
- xf86NameCmp(val, "enable") == 0 ||
- xf86NameCmp(val, "enabled") == 0 ||
- xf86NameCmp(val, "on") == 0 ||
- xf86NameCmp(val, "1") == 0 ||
- xf86NameCmp(val, "yes") == 0 ||
- xf86NameCmp(val, "true") == 0) {
- /* NOTHING NEEDED -- enabling is handled below */
- } else if (xf86NameCmp(val, "disable") == 0 ||
- xf86NameCmp(val, "disabled") == 0 ||
- xf86NameCmp(val, "off") == 0 ||
- xf86NameCmp(val, "0") == 0 ||
- xf86NameCmp(val, "no") == 0 ||
- xf86NameCmp(val, "false") == 0) {
- enable = !enable;
- } else {
- xf86Msg(X_WARNING, "Ignoring unrecognized value \"%s\"\n", val);
- free(n);
- continue;
- }
-
- if (EnableDisableExtension(name, enable)) {
- xf86Msg(X_CONFIG, "Extension \"%s\" is %s\n",
- name, enable ? "enabled" : "disabled");
- } else {
- xf86Msg(X_WARNING, "Ignoring unrecognized extension \"%s\"\n",
- name);
- }
- free(n);
- }
- }
-}
-
-static Bool
-configInput(InputInfoPtr inputp, XF86ConfInputPtr conf_input, MessageType from)
-{
- xf86Msg(from, "|-->Input Device \"%s\"\n", conf_input->inp_identifier);
- inputp->name = conf_input->inp_identifier;
- inputp->driver = conf_input->inp_driver;
- inputp->options = conf_input->inp_option_lst;
- inputp->attrs = NULL;
-
- return TRUE;
-}
-
-static Bool
-modeIsPresent(DisplayModePtr mode, MonPtr monitorp)
-{
- DisplayModePtr knownmodes = monitorp->Modes;
-
- /* all I can think of is a linear search... */
- while(knownmodes != NULL)
- {
- if(!strcmp(mode->name, knownmodes->name) &&
- !(knownmodes->type & M_T_DEFAULT))
- return TRUE;
- knownmodes = knownmodes->next;
- }
- return FALSE;
-}
-
-static Bool
-addDefaultModes(MonPtr monitorp)
-{
- DisplayModePtr mode;
- DisplayModePtr last = monitorp->Last;
- int i = 0;
-
- for (i = 0; i < xf86NumDefaultModes; i++)
- {
- mode = xf86DuplicateMode(&xf86DefaultModes[i]);
- if (!modeIsPresent(mode, monitorp))
- {
- monitorp->Modes = xf86ModesAdd(monitorp->Modes, mode);
- last = mode;
- } else {
- free(mode);
- }
- }
- monitorp->Last = last;
-
- return TRUE;
-}
-
-static void
-checkInput(serverLayoutPtr layout, Bool implicit_layout) {
- checkCoreInputDevices(layout, implicit_layout);
-
- /* Unless we're forcing input devices, disable mouse/kbd devices in the
- * config. Otherwise the same physical device is added multiple times,
- * leading to duplicate events.
- */
- if (!xf86Info.forceInputDevices && layout->inputs)
- {
- InputInfoPtr *dev = layout->inputs;
- BOOL warned = FALSE;
-
- while(*dev)
- {
- if (strcmp((*dev)->driver, "kbd") == 0 ||
- strcmp((*dev)->driver, "mouse") == 0 ||
- strcmp((*dev)->driver, "vmmouse") == 0)
- {
- InputInfoPtr *current;
- if (!warned)
- {
- xf86Msg(X_WARNING, "Hotplugging is on, devices using "
- "drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.\n");
- warned = TRUE;
- }
-
- xf86Msg(X_WARNING, "Disabling %s\n", (*dev)->name);
-
- current = dev;
- free(*dev);
-
- do {
- *current = *(current + 1);
- current++;
- } while(*current);
- } else
- dev++;
- }
- }
-}
-
-/*
- * load the config file and fill the global data structure
- */
-ConfigStatus
-xf86HandleConfigFile(Bool autoconfig)
-{
- const char *filename, *dirname, *sysdirname;
- char *filesearch, *dirsearch;
- MessageType filefrom = X_DEFAULT;
- MessageType dirfrom = X_DEFAULT;
- char *scanptr;
- Bool singlecard = 0;
- Bool implicit_layout = FALSE;
-
- if (!autoconfig) {
- if (getuid() == 0) {
- filesearch = ROOT_CONFIGPATH;
- dirsearch = ROOT_CONFIGDIRPATH;
- } else {
- filesearch = USER_CONFIGPATH;
- dirsearch = USER_CONFIGDIRPATH;
- }
-
- if (xf86ConfigFile)
- filefrom = X_CMDLINE;
- if (xf86ConfigDir)
- dirfrom = X_CMDLINE;
-
- xf86initConfigFiles();
- sysdirname = xf86openConfigDirFiles(SYS_CONFIGDIRPATH, NULL,
- PROJECTROOT);
- dirname = xf86openConfigDirFiles(dirsearch, xf86ConfigDir, PROJECTROOT);
- filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT);
- if (filename) {
- xf86MsgVerb(filefrom, 0, "Using config file: \"%s\"\n", filename);
- xf86ConfigFile = xnfstrdup(filename);
- } else {
- if (xf86ConfigFile)
- xf86Msg(X_ERROR, "Unable to locate/open config file: \"%s\"\n",
- xf86ConfigFile);
- }
- if (dirname) {
- xf86MsgVerb(dirfrom, 0, "Using config directory: \"%s\"\n",
- dirname);
- xf86ConfigDir = xnfstrdup(dirname);
- } else {
- if (xf86ConfigDir)
- xf86Msg(X_ERROR,
- "Unable to locate/open config directory: \"%s\"\n",
- xf86ConfigDir);
- }
- if (sysdirname)
- xf86MsgVerb(X_DEFAULT, 0, "Using system config directory \"%s\"\n",
- sysdirname);
- if (!filename && !dirname && !sysdirname)
- return CONFIG_NOFILE;
- }
-
- if ((xf86configptr = xf86readConfigFile ()) == NULL) {
- xf86Msg(X_ERROR, "Problem parsing the config file\n");
- return CONFIG_PARSE_ERROR;
- }
- xf86closeConfigFile ();
-
- /* Initialise a few things. */
-
- /*
- * now we convert part of the information contained in the parser
- * structures into our own structures.
- * The important part here is to figure out which Screen Sections
- * in the XF86Config file are active so that we can piece together
- * the modes that we need later down the road.
- * And while we are at it, we'll decode the rest of the stuff as well
- */
-
- /* First check if a layout section is present, and if it is valid. */
-
- if (xf86configptr->conf_layout_lst == NULL || xf86ScreenName != NULL) {
- if (xf86ScreenName == NULL) {
- xf86Msg(X_DEFAULT,
- "No Layout section. Using the first Screen section.\n");
- }
- if (!configImpliedLayout(&xf86ConfigLayout,
- xf86configptr->conf_screen_lst,
- xf86configptr)) {
- xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
- return CONFIG_PARSE_ERROR;
- }
- implicit_layout = TRUE;
- } else {
- if (xf86configptr->conf_flags != NULL) {
- char *dfltlayout = NULL;
- pointer optlist = xf86configptr->conf_flags->flg_option_lst;
-
- if (optlist && xf86FindOption(optlist, "defaultserverlayout"))
- dfltlayout = xf86SetStrOption(optlist, "defaultserverlayout", NULL);
- if (!configLayout(&xf86ConfigLayout, xf86configptr->conf_layout_lst,
- dfltlayout)) {
- xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
- return CONFIG_PARSE_ERROR;
- }
- } else {
- if (!configLayout(&xf86ConfigLayout, xf86configptr->conf_layout_lst,
- NULL)) {
- xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
- return CONFIG_PARSE_ERROR;
- }
- }
- }
-
- xf86ProcessOptions(-1, xf86ConfigLayout.options, LayoutOptions);
-
- if ((scanptr = xf86GetOptValString(LayoutOptions, LAYOUT_ISOLATEDEVICE))) {
- ; /* IsolateDevice specified; overrides SingleCard */
- } else {
- xf86GetOptValBool(LayoutOptions, LAYOUT_SINGLECARD, &singlecard);
- if (singlecard)
- scanptr = xf86ConfigLayout.screens->screen->device->busID;
- }
- if (scanptr) {
- if (strncmp(scanptr, "PCI:", 4) != 0) {
- xf86Msg(X_WARNING, "Bus types other than PCI not yet isolable.\n"
- "\tIgnoring IsolateDevice option.\n");
- } else
- xf86PciIsolateDevice(scanptr);
- }
-
- /* Now process everything else */
- if (!configServerFlags(xf86configptr->conf_flags,xf86ConfigLayout.options)){
- ErrorF ("Problem when converting the config data structures\n");
- return CONFIG_PARSE_ERROR;
- }
-
- configFiles(xf86configptr->conf_files);
- configExtensions(xf86configptr->conf_extensions);
-#ifdef XF86DRI
- configDRI(xf86configptr->conf_dri);
-#endif
-
- checkInput(&xf86ConfigLayout, implicit_layout);
-
- /*
- * Handle some command line options that can override some of the
- * ServerFlags settings.
- */
-#ifdef XF86VIDMODE
- if (xf86VidModeDisabled)
- xf86Info.vidModeEnabled = FALSE;
- if (xf86VidModeAllowNonLocal)
- xf86Info.vidModeAllowNonLocal = TRUE;
-#endif
-
- if (xf86AllowMouseOpenFail)
- xf86Info.allowMouseOpenFail = TRUE;
-
- return CONFIG_OK;
-}
-
-Bool
-xf86PathIsSafe(const char *path)
-{
- return (xf86pathIsSafe(path) != 0);
-}
+/*
+ * Loosely based on code bearing the following copyright:
+ *
+ * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
+ */
+
+/*
+ * Copyright 1992-2003 by The XFree86 Project, Inc.
+ * Copyright 1997 by Metro Link, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ *
+ * Authors:
+ * Dirk Hohndel <hohndel@XFree86.Org>
+ * David Dawes <dawes@XFree86.Org>
+ * Marc La France <tsi@XFree86.Org>
+ * Egbert Eich <eich@XFree86.Org>
+ * ... and others
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifdef XF86DRI
+#include <sys/types.h>
+#include <grp.h>
+#endif
+
+#include "xf86.h"
+#include "xf86Parser.h"
+#include "xf86tokens.h"
+#include "xf86Config.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+#include "configProcs.h"
+#include "globals.h"
+#include "extension.h"
+#include "xf86pciBus.h"
+
+#include "xf86Xinput.h"
+
+#include "xkbsrv.h"
+
+#include "picture.h"
+
+/*
+ * These paths define the way the config file search is done. The escape
+ * sequences are documented in parser/scan.c.
+ */
+#ifndef ROOT_CONFIGPATH
+#define ROOT_CONFIGPATH "%A," "%R," \
+ "/etc/X11/%R," "%P/etc/X11/%R," \
+ "%E," "%F," \
+ "/etc/X11/%F," "%P/etc/X11/%F," \
+ "/etc/X11/%X," "/etc/%X," \
+ "%P/etc/X11/%X.%H," \
+ "%P/etc/X11/%X," \
+ "%P/lib/X11/%X.%H," \
+ "%P/lib/X11/%X"
+#endif
+#ifndef USER_CONFIGPATH
+#define USER_CONFIGPATH "/etc/X11/%S," "%P/etc/X11/%S," \
+ "/etc/X11/%G," "%P/etc/X11/%G," \
+ "/etc/X11/%X," "/etc/%X," \
+ "%P/etc/X11/%X.%H," \
+ "%P/etc/X11/%X," \
+ "%P/lib/X11/%X.%H," \
+ "%P/lib/X11/%X"
+#endif
+#ifndef ROOT_CONFIGDIRPATH
+#define ROOT_CONFIGDIRPATH "%A," "%R," \
+ "/etc/X11/%R," "%C/X11/%R," \
+ "/etc/X11/%X," "%C/X11/%X"
+#endif
+#ifndef USER_CONFIGDIRPATH
+#define USER_CONFIGDIRPATH "/etc/X11/%R," "%C/X11/%R," \
+ "/etc/X11/%X," "%C/X11/%X"
+#endif
+#ifndef SYS_CONFIGDIRPATH
+#define SYS_CONFIGDIRPATH "/usr/share/X11/%X," "%D/X11/%X"
+#endif
+#ifndef PROJECTROOT
+#define PROJECTROOT "/usr/X11R6"
+#endif
+
+static ModuleDefault ModuleDefaults[] = {
+ {.name = "extmod", .toLoad = TRUE, .load_opt=NULL},
+#ifdef DBE
+ {.name = "dbe", .toLoad = TRUE, .load_opt=NULL},
+#endif
+#ifdef GLXEXT
+ {.name = "glx", .toLoad = TRUE, .load_opt=NULL},
+#endif
+#ifdef XRECORD
+ {.name = "record", .toLoad = TRUE, .load_opt=NULL},
+#endif
+#ifdef XF86DRI
+ {.name = "dri", .toLoad = TRUE, .load_opt=NULL},
+#endif
+#ifdef DRI2
+ {.name = "dri2", .toLoad = TRUE, .load_opt=NULL},
+#endif
+ {.name = NULL, .toLoad = FALSE, .load_opt=NULL}
+};
+
+
+/* Forward declarations */
+static Bool configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen,
+ int scrnum, MessageType from);
+static Bool configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor);
+static Bool configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device,
+ Bool active);
+static Bool configInput(InputInfoPtr pInfo, XF86ConfInputPtr conf_input,
+ MessageType from);
+static Bool configDisplay(DispPtr displayp, XF86ConfDisplayPtr conf_display);
+static Bool addDefaultModes(MonPtr monitorp);
+#ifdef XF86DRI
+static void configDRI(XF86ConfDRIPtr drip);
+#endif
+static void configExtensions(XF86ConfExtensionsPtr conf_ext);
+
+/*
+ * xf86GetPathElem --
+ * Extract a single element from the font path string starting at
+ * pnt. The font path element will be returned, and pnt will be
+ * updated to point to the start of the next element, or set to
+ * NULL if there are no more.
+ */
+static char *
+xf86GetPathElem(char **pnt)
+{
+ char *p1;
+
+ p1 = *pnt;
+ *pnt = index(*pnt, ',');
+ if (*pnt != NULL) {
+ **pnt = '\0';
+ *pnt += 1;
+ }
+ return p1;
+}
+
+/*
+ * xf86ValidateFontPath --
+ * Validates the user-specified font path. Each element that
+ * begins with a '/' is checked to make sure the directory exists.
+ * If the directory exists, the existence of a file named 'fonts.dir'
+ * is checked. If either check fails, an error is printed and the
+ * element is removed from the font path.
+ */
+
+#define DIR_FILE "/fonts.dir"
+static char *
+xf86ValidateFontPath(char *path)
+{
+ char *tmp_path, *out_pnt, *path_elem, *next, *p1, *dir_elem;
+ struct stat stat_buf;
+ int flag;
+ int dirlen;
+
+ tmp_path = calloc(1,strlen(path)+1);
+ out_pnt = tmp_path;
+ path_elem = NULL;
+ next = path;
+ while (next != NULL) {
+ path_elem = xf86GetPathElem(&next);
+ if (*path_elem == '/') {
+ dir_elem = xnfcalloc(1, strlen(path_elem) + 1);
+ if ((p1 = strchr(path_elem, ':')) != 0)
+ dirlen = p1 - path_elem;
+ else
+ dirlen = strlen(path_elem);
+ strncpy(dir_elem, path_elem, dirlen);
+ dir_elem[dirlen] = '\0';
+ flag = stat(dir_elem, &stat_buf);
+ if (flag == 0)
+ if (!S_ISDIR(stat_buf.st_mode))
+ flag = -1;
+ if (flag != 0) {
+ xf86Msg(X_WARNING, "The directory \"%s\" does not exist.\n", dir_elem);
+ xf86ErrorF("\tEntry deleted from font path.\n");
+ free(dir_elem);
+ continue;
+ }
+ else {
+ XNFasprintf(&p1, "%s%s", dir_elem, DIR_FILE);
+ flag = stat(p1, &stat_buf);
+ if (flag == 0)
+ if (!S_ISREG(stat_buf.st_mode))
+ flag = -1;
+ free(p1);
+ if (flag != 0) {
+ xf86Msg(X_WARNING,
+ "`fonts.dir' not found (or not valid) in \"%s\".\n",
+ dir_elem);
+ xf86ErrorF("\tEntry deleted from font path.\n");
+ xf86ErrorF("\t(Run 'mkfontdir' on \"%s\").\n", dir_elem);
+ free(dir_elem);
+ continue;
+ }
+ }
+ free(dir_elem);
+ }
+
+ /*
+ * Either an OK directory, or a font server name. So add it to
+ * the path.
+ */
+ if (out_pnt != tmp_path)
+ *out_pnt++ = ',';
+ strcat(out_pnt, path_elem);
+ out_pnt += strlen(path_elem);
+ }
+ return tmp_path;
+}
+
+
+/*
+ * use the datastructure that the parser provides and pick out the parts
+ * that we need at this point
+ */
+char **
+xf86ModulelistFromConfig(pointer **optlist)
+{
+ int count = 0, i = 0;
+ char **modulearray;
+ char *ignore[] = { "GLcore", "speedo", "bitmap", "drm",
+ "freetype", "type1",
+ NULL };
+ pointer *optarray;
+ XF86LoadPtr modp;
+ Bool found;
+
+ /*
+ * make sure the config file has been parsed and that we have a
+ * ModulePath set; if no ModulePath was given, use the default
+ * ModulePath
+ */
+ if (xf86configptr == NULL) {
+ xf86Msg(X_ERROR, "Cannot access global config data structure\n");
+ return NULL;
+ }
+
+ if (xf86configptr->conf_modules) {
+ /* Walk the disable list and let people know what we've parsed to
+ * not be loaded
+ */
+ modp = xf86configptr->conf_modules->mod_disable_lst;
+ while (modp) {
+ xf86Msg(X_WARNING, "\"%s\" will not be loaded unless you've specified it to be loaded elsewhere.\n", modp->load_name);
+ modp = (XF86LoadPtr) modp->list.next;
+ }
+ /*
+ * Walk the default settings table. For each module listed to be
+ * loaded, make sure it's in the mod_load_lst. If it's not, make
+ * sure it's not in the mod_no_load_lst. If it's not disabled,
+ * append it to mod_load_lst
+ */
+ for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
+ if (ModuleDefaults[i].toLoad == FALSE) {
+ xf86Msg(X_WARNING, "\"%s\" is not to be loaded by default. Skipping.\n", ModuleDefaults[i].name);
+ continue;
+ }
+ found = FALSE;
+ modp = xf86configptr->conf_modules->mod_load_lst;
+ while (modp) {
+ if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) {
+ xf86Msg(X_INFO, "\"%s\" will be loaded. This was enabled by default and also specified in the config file.\n", ModuleDefaults[i].name);
+ found = TRUE;
+ break;
+ }
+ modp = (XF86LoadPtr) modp->list.next;
+ }
+ if (found == FALSE) {
+ modp = xf86configptr->conf_modules->mod_disable_lst;
+ while (modp) {
+ if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) {
+ xf86Msg(X_INFO, "\"%s\" will be loaded even though the default is to disable it.\n", ModuleDefaults[i].name);
+ found = TRUE;
+ break;
+ }
+ modp = (XF86LoadPtr) modp->list.next;
+ }
+ }
+ if (found == FALSE) {
+ XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
+ ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
+ xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n", ModuleDefaults[i].name);
+ }
+ }
+ } else {
+ xf86configptr->conf_modules = xnfcalloc(1, sizeof(XF86ConfModuleRec));
+ for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
+ if (ModuleDefaults[i].toLoad == TRUE) {
+ XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
+ ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
+ }
+ }
+ }
+
+ /*
+ * Walk the list of modules in the "Module" section to determine how
+ * many we have.
+ */
+ modp = xf86configptr->conf_modules->mod_load_lst;
+ while (modp) {
+ for (i = 0; ignore[i]; i++) {
+ if (strcmp(modp->load_name, ignore[i]) == 0)
+ modp->ignore = 1;
+ }
+ if (!modp->ignore)
+ count++;
+ modp = (XF86LoadPtr) modp->list.next;
+ }
+
+ /*
+ * allocate the memory and walk the list again to fill in the pointers
+ */
+ modulearray = xnfalloc((count + 1) * sizeof(char*));
+ optarray = xnfalloc((count + 1) * sizeof(pointer));
+ count = 0;
+ if (xf86configptr->conf_modules) {
+ modp = xf86configptr->conf_modules->mod_load_lst;
+ while (modp) {
+ if (!modp->ignore) {
+ modulearray[count] = modp->load_name;
+ optarray[count] = modp->load_opt;
+ count++;
+ }
+ modp = (XF86LoadPtr) modp->list.next;
+ }
+ }
+ modulearray[count] = NULL;
+ optarray[count] = NULL;
+ if (optlist)
+ *optlist = optarray;
+ else
+ free(optarray);
+ return modulearray;
+}
+
+
+char **
+xf86DriverlistFromConfig(void)
+{
+ int count = 0;
+ int j;
+ char **modulearray;
+ screenLayoutPtr slp;
+
+ /*
+ * make sure the config file has been parsed and that we have a
+ * ModulePath set; if no ModulePath was given, use the default
+ * ModulePath
+ */
+ if (xf86configptr == NULL) {
+ xf86Msg(X_ERROR, "Cannot access global config data structure\n");
+ return NULL;
+ }
+
+ /*
+ * Walk the list of driver lines in active "Device" sections to
+ * determine now many implicitly loaded modules there are.
+ *
+ */
+ if (xf86ConfigLayout.screens) {
+ slp = xf86ConfigLayout.screens;
+ while ((slp++)->screen) {
+ count++;
+ }
+ }
+
+ /*
+ * Handle the set of inactive "Device" sections.
+ */
+ j = 0;
+ while (xf86ConfigLayout.inactives[j++].identifier)
+ count++;
+
+ if (count == 0)
+ return NULL;
+
+ /*
+ * allocate the memory and walk the list again to fill in the pointers
+ */
+ modulearray = xnfalloc((count + 1) * sizeof(char*));
+ count = 0;
+ slp = xf86ConfigLayout.screens;
+ while (slp->screen) {
+ modulearray[count] = slp->screen->device->driver;
+ count++;
+ slp++;
+ }
+
+ j = 0;
+
+ while (xf86ConfigLayout.inactives[j].identifier)
+ modulearray[count++] = xf86ConfigLayout.inactives[j++].driver;
+
+ modulearray[count] = NULL;
+
+ /* Remove duplicates */
+ for (count = 0; modulearray[count] != NULL; count++) {
+ int i;
+
+ for (i = 0; i < count; i++)
+ if (xf86NameCmp(modulearray[i], modulearray[count]) == 0) {
+ modulearray[count] = "";
+ break;
+ }
+ }
+ return modulearray;
+}
+
+char **
+xf86InputDriverlistFromConfig(void)
+{
+ int count = 0;
+ char **modulearray;
+ InputInfoPtr *idp;
+
+ /*
+ * make sure the config file has been parsed and that we have a
+ * ModulePath set; if no ModulePath was given, use the default
+ * ModulePath
+ */
+ if (xf86configptr == NULL) {
+ xf86Msg(X_ERROR, "Cannot access global config data structure\n");
+ return NULL;
+ }
+
+ /*
+ * Walk the list of driver lines in active "InputDevice" sections to
+ * determine now many implicitly loaded modules there are.
+ */
+ if (xf86ConfigLayout.inputs) {
+ idp = xf86ConfigLayout.inputs;
+ while (*idp) {
+ count++;
+ idp++;
+ }
+ }
+
+ if (count == 0)
+ return NULL;
+
+ /*
+ * allocate the memory and walk the list again to fill in the pointers
+ */
+ modulearray = xnfalloc((count + 1) * sizeof(char*));
+ count = 0;
+ idp = xf86ConfigLayout.inputs;
+ while (idp && *idp) {
+ modulearray[count] = (*idp)->driver;
+ count++;
+ idp++;
+ }
+ modulearray[count] = NULL;
+
+ /* Remove duplicates */
+ for (count = 0; modulearray[count] != NULL; count++) {
+ int i;
+
+ for (i = 0; i < count; i++)
+ if (xf86NameCmp(modulearray[i], modulearray[count]) == 0) {
+ modulearray[count] = "";
+ break;
+ }
+ }
+ return modulearray;
+}
+
+static void
+fixup_video_driver_list(char **drivers)
+{
+ static const char *fallback[4] = { "vesa", "fbdev", "wsfb", NULL };
+ char **end, **drv;
+ char *x;
+ int i;
+
+ /* walk to the end of the list */
+ for (end = drivers; *end && **end; end++) ;
+ end--;
+
+ /*
+ * for each of the fallback drivers, if we find it in the list,
+ * swap it with the last available non-fallback driver.
+ */
+ for (i = 0; fallback[i]; i++) {
+ for (drv = drivers; drv != end; drv++) {
+ if (strstr(*drv, fallback[i])) {
+ x = *drv; *drv = *end; *end = x;
+ end--;
+ break;
+ }
+ }
+ }
+}
+
+static char **
+GenerateDriverlist(char * dirname)
+{
+ char **ret;
+ const char *subdirs[] = { dirname, NULL };
+ static const char *patlist[] = {"(.*)_drv\\.so", NULL};
+ ret = LoaderListDirs(subdirs, patlist);
+
+ /* fix up the probe order for video drivers */
+ if (strstr(dirname, "drivers") && ret != NULL)
+ fixup_video_driver_list(ret);
+
+ return ret;
+}
+
+char **
+xf86DriverlistFromCompile(void)
+{
+ static char **driverlist = NULL;
+
+ if (!driverlist)
+ driverlist = GenerateDriverlist("drivers");
+
+ return driverlist;
+}
+
+/*
+ * xf86ConfigError --
+ * Print a READABLE ErrorMessage!!! All information that is
+ * available is printed.
+ */
+static void
+xf86ConfigError(char *msg, ...)
+{
+ va_list ap;
+
+ ErrorF("\nConfig Error:\n");
+ va_start(ap, msg);
+ VErrorF(msg, ap);
+ va_end(ap);
+ ErrorF("\n");
+ return;
+}
+
+static void
+configFiles(XF86ConfFilesPtr fileconf)
+{
+ MessageType pathFrom;
+ Bool must_copy;
+ int size, countDirs;
+ char *temp_path, *log_buf, *start, *end;
+
+ /* FontPath */
+ must_copy = TRUE;
+
+ temp_path = defaultFontPath ? defaultFontPath : "";
+ if (xf86fpFlag)
+ pathFrom = X_CMDLINE;
+ else if (fileconf && fileconf->file_fontpath) {
+ pathFrom = X_CONFIG;
+ if (xf86Info.useDefaultFontPath) {
+ if (asprintf(&defaultFontPath, "%s%s%s", fileconf->file_fontpath,
+ *temp_path ? "," : "", temp_path) == -1)
+ defaultFontPath = NULL;
+ else
+ must_copy = FALSE;
+ }
+ else
+ defaultFontPath = fileconf->file_fontpath;
+ }
+ else
+ pathFrom = X_DEFAULT;
+ temp_path = defaultFontPath ? defaultFontPath : "";
+
+ /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */
+ temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath;
+ defaultFontPath = xf86ValidateFontPath(temp_path);
+ free(temp_path);
+
+ /* make fontpath more readable in the logfiles */
+ countDirs = 1;
+ temp_path = defaultFontPath;
+ while ((temp_path = index(temp_path, ',')) != NULL) {
+ countDirs++;
+ temp_path++;
+ }
+
+ log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1);
+ temp_path = log_buf;
+ start = defaultFontPath;
+ while((end = index(start, ',')) != NULL) {
+ size = (end - start) + 1;
+ *(temp_path++) = '\t';
+ strncpy(temp_path, start, size);
+ temp_path += size;
+ *(temp_path++) = '\n';
+ start += size;
+ }
+ /* copy last entry */
+ *(temp_path++) = '\t';
+ strcpy(temp_path, start);
+ xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf);
+ free(log_buf);
+
+ /* ModulePath */
+
+ if (fileconf) {
+ if (xf86ModPathFrom != X_CMDLINE && fileconf->file_modulepath) {
+ xf86ModulePath = fileconf->file_modulepath;
+ xf86ModPathFrom = X_CONFIG;
+ }
+ }
+
+ xf86Msg(xf86ModPathFrom, "ModulePath set to \"%s\"\n", xf86ModulePath);
+
+ if (!xf86xkbdirFlag && fileconf && fileconf->file_xkbdir) {
+ XkbBaseDirectory = fileconf->file_xkbdir;
+ xf86Msg(X_CONFIG, "XKB base directory set to \"%s\"\n",
+ XkbBaseDirectory);
+ }
+#if 0
+ /* LogFile */
+ /*
+ * XXX The problem with this is that the log file is already open.
+ * One option might be to copy the exiting contents to the new location.
+ * and re-open it. The down side is that the default location would
+ * already have been overwritten. Another option would be to start with
+ * unique temporary location, then copy it once the correct name is known.
+ * A problem with this is what happens if the server exits before that
+ * happens.
+ */
+ if (xf86LogFileFrom == X_DEFAULT && fileconf->file_logfile) {
+ xf86LogFile = fileconf->file_logfile;
+ xf86LogFileFrom = X_CONFIG;
+ }
+#endif
+
+ return;
+}
+
+typedef enum {
+ FLAG_NOTRAPSIGNALS,
+ FLAG_DONTVTSWITCH,
+ FLAG_DONTZAP,
+ FLAG_DONTZOOM,
+ FLAG_DISABLEVIDMODE,
+ FLAG_ALLOWNONLOCAL,
+ FLAG_ALLOWMOUSEOPENFAIL,
+ FLAG_VTSYSREQ,
+ FLAG_SAVER_BLANKTIME,
+ FLAG_DPMS_STANDBYTIME,
+ FLAG_DPMS_SUSPENDTIME,
+ FLAG_DPMS_OFFTIME,
+ FLAG_PIXMAP,
+ FLAG_PC98,
+ FLAG_NOPM,
+ FLAG_XINERAMA,
+ FLAG_LOG,
+ FLAG_RENDER_COLORMAP_MODE,
+ FLAG_RANDR,
+ FLAG_AIGLX,
+ FLAG_IGNORE_ABI,
+ FLAG_ALLOW_EMPTY_INPUT,
+ FLAG_USE_DEFAULT_FONT_PATH,
+ FLAG_AUTO_ADD_DEVICES,
+ FLAG_AUTO_ENABLE_DEVICES,
+ FLAG_GLX_VISUALS,
+ FLAG_DRI2,
+ FLAG_USE_SIGIO
+} FlagValues;
+
+/**
+ * NOTE: the last value for each entry is NOT the default. It is set to TRUE
+ * if the parser found the option in the config file.
+ */
+static OptionInfoRec FlagOptions[] = {
+ { FLAG_NOTRAPSIGNALS, "NoTrapSignals", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_DONTVTSWITCH, "DontVTSwitch", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_DONTZOOM, "DontZoom", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_DISABLEVIDMODE, "DisableVidModeExtension", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_ALLOWNONLOCAL, "AllowNonLocalXvidtune", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_ALLOWMOUSEOPENFAIL, "AllowMouseOpenFail", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_VTSYSREQ, "VTSysReq", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_SAVER_BLANKTIME, "BlankTime" , OPTV_INTEGER,
+ {0}, FALSE },
+ { FLAG_DPMS_STANDBYTIME, "StandbyTime", OPTV_INTEGER,
+ {0}, FALSE },
+ { FLAG_DPMS_SUSPENDTIME, "SuspendTime", OPTV_INTEGER,
+ {0}, FALSE },
+ { FLAG_DPMS_OFFTIME, "OffTime", OPTV_INTEGER,
+ {0}, FALSE },
+ { FLAG_PIXMAP, "Pixmap", OPTV_INTEGER,
+ {0}, FALSE },
+ { FLAG_PC98, "PC98", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_NOPM, "NoPM", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_XINERAMA, "Xinerama", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_LOG, "Log", OPTV_STRING,
+ {0}, FALSE },
+ { FLAG_RENDER_COLORMAP_MODE, "RenderColormapMode", OPTV_STRING,
+ {0}, FALSE },
+ { FLAG_RANDR, "RandR", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_AIGLX, "AIGLX", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_AUTO_ADD_DEVICES, "AutoAddDevices", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_AUTO_ENABLE_DEVICES, "AutoEnableDevices", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_GLX_VISUALS, "GlxVisuals", OPTV_STRING,
+ {0}, FALSE },
+ { FLAG_DRI2, "DRI2", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { FLAG_USE_SIGIO, "UseSIGIO", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { -1, NULL, OPTV_NONE,
+ {0}, FALSE },
+};
+
+#ifdef SUPPORT_PC98
+static Bool
+detectPC98(void)
+{
+ unsigned char buf[2];
+
+ if (xf86ReadBIOS(0xf8000, 0xe80, buf, 2) != 2)
+ return FALSE;
+ if ((buf[0] == 0x98) && (buf[1] == 0x21))
+ return TRUE;
+ else
+ return FALSE;
+}
+#endif
+
+static Bool
+configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
+{
+ XF86OptionPtr optp, tmp;
+ int i;
+ Pix24Flags pix24 = Pix24DontCare;
+ Bool value;
+ MessageType from;
+ const char *s;
+ XkbRMLVOSet set;
+ /* Default options. */
+ set.rules = "base";
+ set.model = "pc105";
+ set.layout = "us";
+ set.variant = NULL;
+ set.options = NULL;
+
+ /*
+ * Merge the ServerLayout and ServerFlags options. The former have
+ * precedence over the latter.
+ */
+ optp = NULL;
+ if (flagsconf && flagsconf->flg_option_lst)
+ optp = xf86optionListDup(flagsconf->flg_option_lst);
+ if (layoutopts) {
+ tmp = xf86optionListDup(layoutopts);
+ if (optp)
+ optp = xf86optionListMerge(optp, tmp);
+ else
+ optp = tmp;
+ }
+
+ xf86ProcessOptions(-1, optp, FlagOptions);
+
+ xf86GetOptValBool(FlagOptions, FLAG_NOTRAPSIGNALS, &xf86Info.notrapSignals);
+ xf86GetOptValBool(FlagOptions, FLAG_DONTVTSWITCH, &xf86Info.dontVTSwitch);
+ xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap);
+ xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom);
+
+ xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
+ if (xf86Info.ignoreABI) {
+ xf86Msg(X_CONFIG, "Ignoring ABI Version\n");
+ }
+
+ if (xf86SIGIOSupported()) {
+ xf86Info.useSIGIO = xf86ReturnOptValBool(FlagOptions, FLAG_USE_SIGIO, USE_SIGIO_BY_DEFAULT);
+ if (xf86IsOptionSet(FlagOptions, FLAG_USE_SIGIO)) {
+ from = X_CONFIG;
+ } else {
+ from = X_DEFAULT;
+ }
+ if (!xf86Info.useSIGIO) {
+ xf86Msg(from, "Disabling SIGIO handlers for input devices\n");
+ } else if (from == X_CONFIG) {
+ xf86Msg(from, "Enabling SIGIO handlers for input devices\n");
+ }
+ } else {
+ xf86Info.useSIGIO = FALSE;
+ }
+
+ if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) {
+ xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_DEVICES,
+ &xf86Info.autoAddDevices);
+ from = X_CONFIG;
+ }
+ else {
+ from = X_DEFAULT;
+ }
+ xf86Msg(from, "%sutomatically adding devices\n",
+ xf86Info.autoAddDevices ? "A" : "Not a");
+
+ if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ENABLE_DEVICES)) {
+ xf86GetOptValBool(FlagOptions, FLAG_AUTO_ENABLE_DEVICES,
+ &xf86Info.autoEnableDevices);
+ from = X_CONFIG;
+ }
+ else {
+ from = X_DEFAULT;
+ }
+ xf86Msg(from, "%sutomatically enabling devices\n",
+ xf86Info.autoEnableDevices ? "A" : "Not a");
+
+ /*
+ * Set things up based on the config file information. Some of these
+ * settings may be overridden later when the command line options are
+ * checked.
+ */
+#ifdef XF86VIDMODE
+ if (xf86GetOptValBool(FlagOptions, FLAG_DISABLEVIDMODE, &value))
+ xf86Info.vidModeEnabled = !value;
+ if (xf86GetOptValBool(FlagOptions, FLAG_ALLOWNONLOCAL, &value))
+ xf86Info.vidModeAllowNonLocal = value;
+#endif
+
+ if (xf86GetOptValBool(FlagOptions, FLAG_ALLOWMOUSEOPENFAIL, &value))
+ xf86Info.allowMouseOpenFail = value;
+
+ if (xf86GetOptValBool(FlagOptions, FLAG_VTSYSREQ, &value)) {
+#ifdef USE_VT_SYSREQ
+ xf86Info.vtSysreq = value;
+ xf86Msg(X_CONFIG, "VTSysReq %s\n", value ? "enabled" : "disabled");
+#else
+ if (value)
+ xf86Msg(X_WARNING, "VTSysReq is not supported on this OS\n");
+#endif
+ }
+
+ xf86Info.pmFlag = TRUE;
+ if (xf86GetOptValBool(FlagOptions, FLAG_NOPM, &value))
+ xf86Info.pmFlag = !value;
+ {
+ if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) {
+ if (!xf86NameCmp(s,"flush")) {
+ xf86Msg(X_CONFIG, "Flushing logfile enabled\n");
+ xf86Info.log = LogFlush;
+ LogSetParameter(XLOG_FLUSH, TRUE);
+ } else if (!xf86NameCmp(s,"sync")) {
+ xf86Msg(X_CONFIG, "Syncing logfile enabled\n");
+ xf86Info.log = LogSync;
+ LogSetParameter(XLOG_FLUSH, TRUE);
+ LogSetParameter(XLOG_SYNC, TRUE);
+ } else {
+ xf86Msg(X_WARNING,"Unknown Log option\n");
+ }
+ }
+ }
+
+ {
+ if ((s = xf86GetOptValString(FlagOptions, FLAG_RENDER_COLORMAP_MODE))){
+ int policy = PictureParseCmapPolicy (s);
+ if (policy == PictureCmapPolicyInvalid)
+ xf86Msg(X_WARNING, "Unknown colormap policy \"%s\"\n", s);
+ else
+ {
+ xf86Msg(X_CONFIG, "Render colormap policy set to %s\n", s);
+ PictureCmapPolicy = policy;
+ }
+ }
+ }
+
+#ifdef RANDR
+ xf86Info.disableRandR = FALSE;
+ xf86Info.randRFrom = X_DEFAULT;
+ if (xf86GetOptValBool(FlagOptions, FLAG_RANDR, &value)) {
+ xf86Info.disableRandR = !value;
+ xf86Info.randRFrom = X_CONFIG;
+ }
+#endif
+
+ xf86Info.aiglx = TRUE;
+ xf86Info.aiglxFrom = X_DEFAULT;
+ if (xf86GetOptValBool(FlagOptions, FLAG_AIGLX, &value)) {
+ xf86Info.aiglx = value;
+ xf86Info.aiglxFrom = X_CONFIG;
+ }
+
+#ifdef GLXEXT
+ xf86Info.glxVisuals = XF86_GlxVisualsTypical;
+ xf86Info.glxVisualsFrom = X_DEFAULT;
+ if ((s = xf86GetOptValString(FlagOptions, FLAG_GLX_VISUALS))) {
+ if (!xf86NameCmp(s, "minimal")) {
+ xf86Info.glxVisuals = XF86_GlxVisualsMinimal;
+ } else if (!xf86NameCmp(s, "typical")) {
+ xf86Info.glxVisuals = XF86_GlxVisualsTypical;
+ } else if (!xf86NameCmp(s, "all")) {
+ xf86Info.glxVisuals = XF86_GlxVisualsAll;
+ } else {
+ xf86Msg(X_WARNING,"Unknown GlxVisuals option\n");
+ }
+ }
+
+ if (xf86GetOptValBool(FlagOptions, FLAG_AIGLX, &value)) {
+ xf86Info.aiglx = value;
+ xf86Info.aiglxFrom = X_CONFIG;
+ }
+#endif
+
+ /* if we're not hotplugging, force some input devices to exist */
+ xf86Info.forceInputDevices = !(xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
+
+ /* when forcing input devices, we use kbd. otherwise evdev, so use the
+ * evdev rules set. */
+#if defined(linux)
+ if (!xf86Info.forceInputDevices)
+ set.rules = "evdev";
+#endif
+ XkbSetRulesDflts(&set);
+
+ xf86Info.useDefaultFontPath = TRUE;
+ xf86Info.useDefaultFontPathFrom = X_DEFAULT;
+ if (xf86GetOptValBool(FlagOptions, FLAG_USE_DEFAULT_FONT_PATH, &value)) {
+ xf86Info.useDefaultFontPath = value;
+ xf86Info.useDefaultFontPathFrom = X_CONFIG;
+ }
+
+/* Make sure that timers don't overflow CARD32's after multiplying */
+#define MAX_TIME_IN_MIN (0x7fffffff / MILLI_PER_MIN)
+
+ i = -1;
+ xf86GetOptValInteger(FlagOptions, FLAG_SAVER_BLANKTIME, &i);
+ if ((i >= 0) && (i < MAX_TIME_IN_MIN))
+ ScreenSaverTime = defaultScreenSaverTime = i * MILLI_PER_MIN;
+ else if (i != -1)
+ xf86ConfigError("BlankTime value %d outside legal range of 0 - %d minutes",
+ i, MAX_TIME_IN_MIN);
+
+#ifdef DPMSExtension
+ i = -1;
+ xf86GetOptValInteger(FlagOptions, FLAG_DPMS_STANDBYTIME, &i);
+ if ((i >= 0) && (i < MAX_TIME_IN_MIN))
+ DPMSStandbyTime = i * MILLI_PER_MIN;
+ else if (i != -1)
+ xf86ConfigError("StandbyTime value %d outside legal range of 0 - %d minutes",
+ i, MAX_TIME_IN_MIN);
+ i = -1;
+ xf86GetOptValInteger(FlagOptions, FLAG_DPMS_SUSPENDTIME, &i);
+ if ((i >= 0) && (i < MAX_TIME_IN_MIN))
+ DPMSSuspendTime = i * MILLI_PER_MIN;
+ else if (i != -1)
+ xf86ConfigError("SuspendTime value %d outside legal range of 0 - %d minutes",
+ i, MAX_TIME_IN_MIN);
+ i = -1;
+ xf86GetOptValInteger(FlagOptions, FLAG_DPMS_OFFTIME, &i);
+ if ((i >= 0) && (i < MAX_TIME_IN_MIN))
+ DPMSOffTime = i * MILLI_PER_MIN;
+ else if (i != -1)
+ xf86ConfigError("OffTime value %d outside legal range of 0 - %d minutes",
+ i, MAX_TIME_IN_MIN);
+#endif
+
+ i = -1;
+ xf86GetOptValInteger(FlagOptions, FLAG_PIXMAP, &i);
+ switch (i) {
+ case 24:
+ pix24 = Pix24Use24;
+ break;
+ case 32:
+ pix24 = Pix24Use32;
+ break;
+ case -1:
+ break;
+ default:
+ xf86ConfigError("Pixmap option's value (%d) must be 24 or 32\n", i);
+ return FALSE;
+ }
+ if (xf86Pix24 != Pix24DontCare) {
+ xf86Info.pixmap24 = xf86Pix24;
+ xf86Info.pix24From = X_CMDLINE;
+ } else if (pix24 != Pix24DontCare) {
+ xf86Info.pixmap24 = pix24;
+ xf86Info.pix24From = X_CONFIG;
+ } else {
+ xf86Info.pixmap24 = Pix24DontCare;
+ xf86Info.pix24From = X_DEFAULT;
+ }
+#ifdef SUPPORT_PC98
+ if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) {
+ xf86Info.pc98 = value;
+ if (value) {
+ xf86Msg(X_CONFIG, "Japanese PC98 architecture\n");
+ }
+ } else
+ if (detectPC98()) {
+ xf86Info.pc98 = TRUE;
+ xf86Msg(X_PROBED, "Japanese PC98 architecture\n");
+ }
+#endif
+
+#ifdef PANORAMIX
+ from = X_DEFAULT;
+ if (!noPanoramiXExtension)
+ from = X_CMDLINE;
+ else if (xf86GetOptValBool(FlagOptions, FLAG_XINERAMA, &value)) {
+ noPanoramiXExtension = !value;
+ from = X_CONFIG;
+ }
+ if (!noPanoramiXExtension)
+ xf86Msg(from, "Xinerama: enabled\n");
+#endif
+
+#ifdef DRI2
+ xf86Info.dri2 = FALSE;
+ xf86Info.dri2From = X_DEFAULT;
+ if (xf86GetOptValBool(FlagOptions, FLAG_DRI2, &value)) {
+ xf86Info.dri2 = value;
+ xf86Info.dri2From = X_CONFIG;
+ }
+#endif
+
+ return TRUE;
+}
+
+Bool xf86DRI2Enabled(void)
+{
+ return xf86Info.dri2;
+}
+
+/*
+ * Locate the core input devices. These can be specified/located in
+ * the following ways, in order of priority:
+ *
+ * 1. The InputDevices named by the -pointer and -keyboard command line
+ * options.
+ * 2. The "CorePointer" and "CoreKeyboard" InputDevices referred to by
+ * the active ServerLayout.
+ * 3. The first InputDevices marked as "CorePointer" and "CoreKeyboard".
+ * 4. The first InputDevices that use 'keyboard' or 'kbd' and a valid mouse
+ * driver (mouse, synaptics, evdev, vmmouse, void)
+ * 5. Default devices with an empty (default) configuration. These defaults
+ * will reference the 'mouse' and 'keyboard' drivers.
+ */
+
+static Bool
+checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
+{
+ InputInfoPtr corePointer = NULL, coreKeyboard = NULL;
+ Bool foundPointer = FALSE, foundKeyboard = FALSE;
+ const char *pointerMsg = NULL, *keyboardMsg = NULL;
+ InputInfoPtr *devs, /* iterator */
+ indp;
+ InputInfoRec Pointer = {}, Keyboard = {};
+ XF86ConfInputPtr confInput;
+ XF86ConfInputRec defPtr, defKbd;
+ int count = 0;
+ MessageType from = X_DEFAULT;
+ int found = 0;
+ const char *mousedrivers[] = { "mouse", "synaptics", "evdev", "vmmouse",
+ "void", NULL };
+
+ /*
+ * First check if a core pointer or core keyboard have been specified
+ * in the active ServerLayout. If more than one is specified for either,
+ * remove the core attribute from the later ones.
+ */
+ for (devs = servlayoutp->inputs; devs && *devs; devs++) {
+ indp = *devs;
+ if (indp->options &&
+ xf86CheckBoolOption(indp->options, "CorePointer", FALSE)) {
+ if (!corePointer) {
+ corePointer = indp;
+ } else {
+ xf86ReplaceBoolOption(indp->options, "CorePointer", FALSE);
+ xf86Msg(X_WARNING, "Duplicate core pointer devices. "
+ "Removing core pointer attribute from \"%s\"\n",
+ indp->name);
+ }
+ }
+ if (indp->options &&
+ xf86CheckBoolOption(indp->options, "CoreKeyboard", FALSE)) {
+ if (!coreKeyboard) {
+ coreKeyboard = indp;
+ } else {
+ xf86ReplaceBoolOption(indp->options, "CoreKeyboard", FALSE);
+ xf86Msg(X_WARNING, "Duplicate core keyboard devices. "
+ "Removing core keyboard attribute from \"%s\"\n",
+ indp->name);
+ }
+ }
+ count++;
+ }
+
+ confInput = NULL;
+
+ /* 1. Check for the -pointer command line option. */
+ if (xf86PointerName) {
+ confInput = xf86findInput(xf86PointerName,
+ xf86configptr->conf_input_lst);
+ if (!confInput) {
+ xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n",
+ xf86PointerName);
+ return FALSE;
+ }
+ from = X_CMDLINE;
+ /*
+ * If one was already specified in the ServerLayout, it needs to be
+ * removed.
+ */
+ if (corePointer) {
+ for (devs = servlayoutp->inputs; devs && *devs; devs++)
+ if (*devs == corePointer)
+ {
+ free(*devs);
+ *devs = (InputInfoPtr)0x1; /* ensure we dont skip next loop*/
+ break;
+ }
+ for (; devs && *devs; devs++)
+ devs[0] = devs[1];
+ count--;
+ }
+ corePointer = NULL;
+ foundPointer = TRUE;
+ }
+
+ /* 2. ServerLayout-specified core pointer. */
+ if (corePointer) {
+ foundPointer = TRUE;
+ from = X_CONFIG;
+ }
+
+ /* 3. First core pointer device. */
+ if (!foundPointer && (xf86Info.forceInputDevices || implicitLayout)) {
+ XF86ConfInputPtr p;
+
+ for (p = xf86configptr->conf_input_lst; p; p = p->list.next) {
+ if (p->inp_option_lst &&
+ xf86CheckBoolOption(p->inp_option_lst, "CorePointer", FALSE)) {
+ confInput = p;
+ foundPointer = TRUE;
+ from = X_DEFAULT;
+ pointerMsg = "first core pointer device";
+ break;
+ }
+ }
+ }
+
+ /* 4. First pointer with an allowed mouse driver. */
+ if (!foundPointer && xf86Info.forceInputDevices) {
+ const char **driver = mousedrivers;
+ confInput = xf86findInput(CONF_IMPLICIT_POINTER,
+ xf86configptr->conf_input_lst);
+ while (*driver && !confInput) {
+ confInput = xf86findInputByDriver(*driver,
+ xf86configptr->conf_input_lst);
+ driver++;
+ }
+ if (confInput) {
+ foundPointer = TRUE;
+ from = X_DEFAULT;
+ pointerMsg = "first mouse device";
+ }
+ }
+
+ /* 5. Built-in default. */
+ if (!foundPointer && xf86Info.forceInputDevices) {
+ memset(&defPtr, 0, sizeof(defPtr));
+ defPtr.inp_identifier = strdup("<default pointer>");
+ defPtr.inp_driver = strdup("mouse");
+ confInput = &defPtr;
+ foundPointer = TRUE;
+ from = X_DEFAULT;
+ pointerMsg = "default mouse configuration";
+ }
+
+ /* Add the core pointer device to the layout, and set it to Core. */
+ if (foundPointer && confInput) {
+ foundPointer = configInput(&Pointer, confInput, from);
+ if (foundPointer) {
+ count++;
+ devs = xnfrealloc(servlayoutp->inputs,
+ (count + 1) * sizeof(InputInfoPtr));
+ devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
+ *devs[count - 1] = Pointer;
+ devs[count - 1]->options =
+ xf86addNewOption(devs[count -1]->options,
+ xnfstrdup("CorePointer"), NULL);
+ devs[count] = NULL;
+ servlayoutp->inputs = devs;
+ }
+ }
+
+ if (!foundPointer && xf86Info.forceInputDevices) {
+ /* This shouldn't happen. */
+ xf86Msg(X_ERROR, "Cannot locate a core pointer device.\n");
+ return FALSE;
+ }
+
+ /*
+ * always synthesize a 'mouse' section configured to send core
+ * events, unless a 'void' section is found, in which case the user
+ * probably wants to run footless.
+ *
+ * If you're using an evdev keyboard and expect a default mouse
+ * section ... deal.
+ */
+ for (devs = servlayoutp->inputs; devs && *devs; devs++) {
+ const char **driver = mousedrivers;
+ while(*driver) {
+ if (!strcmp((*devs)->driver, *driver)) {
+ found = 1;
+ break;
+ }
+ driver++;
+ }
+ }
+ if (!found && xf86Info.forceInputDevices) {
+ xf86Msg(X_INFO, "No default mouse found, adding one\n");
+ memset(&defPtr, 0, sizeof(defPtr));
+ defPtr.inp_identifier = strdup("<default pointer>");
+ defPtr.inp_driver = strdup("mouse");
+ confInput = &defPtr;
+ foundPointer = configInput(&Pointer, confInput, from);
+ if (foundPointer) {
+ count++;
+ devs = xnfrealloc(servlayoutp->inputs,
+ (count + 1) * sizeof(InputInfoPtr));
+ devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
+ *devs[count - 1] = Pointer;
+ devs[count - 1]->options =
+ xf86addNewOption(NULL, xnfstrdup("AlwaysCore"), NULL);
+ devs[count] = NULL;
+ servlayoutp->inputs = devs;
+ }
+ }
+
+ confInput = NULL;
+
+ /* 1. Check for the -keyboard command line option. */
+ if (xf86KeyboardName) {
+ confInput = xf86findInput(xf86KeyboardName,
+ xf86configptr->conf_input_lst);
+ if (!confInput) {
+ xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n",
+ xf86KeyboardName);
+ return FALSE;
+ }
+ from = X_CMDLINE;
+ /*
+ * If one was already specified in the ServerLayout, it needs to be
+ * removed.
+ */
+ if (coreKeyboard) {
+ for (devs = servlayoutp->inputs; devs && *devs; devs++)
+ if (*devs == coreKeyboard)
+ {
+ free(*devs);
+ *devs = (InputInfoPtr)0x1; /* ensure we dont skip next loop */
+ break;
+ }
+ for (; devs && *devs; devs++)
+ devs[0] = devs[1];
+ count--;
+ }
+ coreKeyboard = NULL;
+ foundKeyboard = TRUE;
+ }
+
+ /* 2. ServerLayout-specified core keyboard. */
+ if (coreKeyboard) {
+ foundKeyboard = TRUE;
+ from = X_CONFIG;
+ }
+
+ /* 3. First core keyboard device. */
+ if (!foundKeyboard && (xf86Info.forceInputDevices || implicitLayout)) {
+ XF86ConfInputPtr p;
+
+ for (p = xf86configptr->conf_input_lst; p; p = p->list.next) {
+ if (p->inp_option_lst &&
+ xf86CheckBoolOption(p->inp_option_lst, "CoreKeyboard", FALSE)) {
+ confInput = p;
+ foundKeyboard = TRUE;
+ from = X_DEFAULT;
+ keyboardMsg = "first core keyboard device";
+ break;
+ }
+ }
+ }
+
+ /* 4. First keyboard with 'keyboard' or 'kbd' as the driver. */
+ if (!foundKeyboard && xf86Info.forceInputDevices) {
+ confInput = xf86findInput(CONF_IMPLICIT_KEYBOARD,
+ xf86configptr->conf_input_lst);
+ if (!confInput) {
+ confInput = xf86findInputByDriver("kbd",
+ xf86configptr->conf_input_lst);
+ }
+ if (confInput) {
+ foundKeyboard = TRUE;
+ from = X_DEFAULT;
+ keyboardMsg = "first keyboard device";
+ }
+ }
+
+ /* 5. Built-in default. */
+ if (!foundKeyboard && xf86Info.forceInputDevices) {
+ memset(&defKbd, 0, sizeof(defKbd));
+ defKbd.inp_identifier = strdup("<default keyboard>");
+ defKbd.inp_driver = strdup("kbd");
+ confInput = &defKbd;
+ foundKeyboard = TRUE;
+ keyboardMsg = "default keyboard configuration";
+ from = X_DEFAULT;
+ }
+
+ /* Add the core keyboard device to the layout, and set it to Core. */
+ if (foundKeyboard && confInput) {
+ foundKeyboard = configInput(&Keyboard, confInput, from);
+ if (foundKeyboard) {
+ count++;
+ devs = xnfrealloc(servlayoutp->inputs,
+ (count + 1) * sizeof(InputInfoPtr));
+ devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
+ *devs[count - 1] = Keyboard;
+ devs[count - 1]->options =
+ xf86addNewOption(devs[count - 1]->options,
+ xnfstrdup("CoreKeyboard"), NULL);
+ devs[count] = NULL;
+ servlayoutp->inputs = devs;
+ }
+ }
+
+ if (!foundKeyboard && xf86Info.forceInputDevices) {
+ /* This shouldn't happen. */
+ xf86Msg(X_ERROR, "Cannot locate a core keyboard device.\n");
+ return FALSE;
+ }
+
+ if (pointerMsg) {
+ if (implicitLayout)
+ xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n",
+ pointerMsg);
+ else
+ xf86Msg(X_DEFAULT, "The core pointer device wasn't specified "
+ "explicitly in the layout.\n"
+ "\tUsing the %s.\n", pointerMsg);
+ }
+
+ if (keyboardMsg) {
+ if (implicitLayout)
+ xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n",
+ keyboardMsg);
+ else
+ xf86Msg(X_DEFAULT, "The core keyboard device wasn't specified "
+ "explicitly in the layout.\n"
+ "\tUsing the %s.\n", keyboardMsg);
+ }
+
+ if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
+#if defined(CONFIG_HAL) || defined(CONFIG_UDEV)
+ const char *config_backend;
+#if defined(CONFIG_HAL)
+ config_backend = "HAL";
+#else
+ config_backend = "udev";
+#endif
+ xf86Msg(X_INFO, "The server relies on %s to provide the list of "
+ "input devices.\n\tIf no devices become available, "
+ "reconfigure %s or disable AutoAddDevices.\n",
+ config_backend, config_backend);
+#else
+ xf86Msg(X_WARNING, "Hotplugging requested but the server was "
+ "compiled without a config backend. "
+ "No input devices were configured, the server "
+ "will start without any input devices.\n");
+#endif
+ }
+
+ return TRUE;
+}
+
+typedef enum {
+ LAYOUT_ISOLATEDEVICE,
+ LAYOUT_SINGLECARD
+} LayoutValues;
+
+static OptionInfoRec LayoutOptions[] = {
+ { LAYOUT_ISOLATEDEVICE, "IsolateDevice", OPTV_STRING,
+ {0}, FALSE },
+ { LAYOUT_SINGLECARD, "SingleCard", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { -1, NULL, OPTV_NONE,
+ {0}, FALSE },
+};
+
+static Bool
+configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp)
+{
+ XF86ConfInputrefPtr irp;
+ InputInfoPtr *indp;
+ int count = 0;
+
+ /*
+ * Count the number of input devices.
+ */
+ irp = layout->lay_input_lst;
+ while (irp) {
+ count++;
+ irp = (XF86ConfInputrefPtr)irp->list.next;
+ }
+ DebugF("Found %d input devices in the layout section %s\n",
+ count, layout->lay_identifier);
+ indp = xnfcalloc((count + 1), sizeof(InputInfoPtr));
+ indp[count] = NULL;
+ irp = layout->lay_input_lst;
+ count = 0;
+ while (irp) {
+ indp[count] = xf86AllocateInput();
+ if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) {
+ while(count--)
+ free(indp[count]);
+ free(indp);
+ return FALSE;
+ }
+ indp[count]->options = xf86OptionListMerge(indp[count]->options,
+ irp->iref_option_lst);
+ count++;
+ irp = (XF86ConfInputrefPtr)irp->list.next;
+ }
+ servlayoutp->inputs = indp;
+
+ return TRUE;
+}
+
+
+/*
+ * figure out which layout is active, which screens are used in that layout,
+ * which drivers and monitors are used in these screens
+ */
+static Bool
+configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
+ char *default_layout)
+{
+ XF86ConfAdjacencyPtr adjp;
+ XF86ConfInactivePtr idp;
+ int count = 0;
+ int scrnum;
+ XF86ConfLayoutPtr l;
+ MessageType from;
+ screenLayoutPtr slp;
+ GDevPtr gdp;
+ int i = 0, j;
+
+ if (!servlayoutp)
+ return FALSE;
+
+ /*
+ * which layout section is the active one?
+ *
+ * If there is a -layout command line option, use that one, otherwise
+ * pick the first one.
+ */
+ from = X_DEFAULT;
+ if (xf86LayoutName != NULL)
+ from = X_CMDLINE;
+ else if (default_layout) {
+ xf86LayoutName = default_layout;
+ from = X_CONFIG;
+ }
+ if (xf86LayoutName != NULL) {
+ if ((l = xf86findLayout(xf86LayoutName, conf_layout)) == NULL) {
+ xf86Msg(X_ERROR, "No ServerLayout section called \"%s\"\n",
+ xf86LayoutName);
+ return FALSE;
+ }
+ conf_layout = l;
+ }
+ xf86Msg(from, "ServerLayout \"%s\"\n", conf_layout->lay_identifier);
+ adjp = conf_layout->lay_adjacency_lst;
+
+ /*
+ * we know that each screen is referenced exactly once on the left side
+ * of a layout statement in the Layout section. So to allocate the right
+ * size for the array we do a quick walk of the list to figure out how
+ * many sections we have
+ */
+ while (adjp) {
+ count++;
+ adjp = (XF86ConfAdjacencyPtr)adjp->list.next;
+ }
+
+ DebugF("Found %d screens in the layout section %s",
+ count, conf_layout->lay_identifier);
+ if (!count) /* alloc enough storage even if no screen is specified */
+ count = 1;
+
+ slp = xnfcalloc(1, (count + 1) * sizeof(screenLayoutRec));
+ slp[count].screen = NULL;
+ /*
+ * now that we have storage, loop over the list again and fill in our
+ * data structure; at this point we do not fill in the adjacency
+ * information as it is not clear if we need it at all
+ */
+ adjp = conf_layout->lay_adjacency_lst;
+ count = 0;
+ while (adjp) {
+ slp[count].screen = xnfcalloc(1, sizeof(confScreenRec));
+ if (adjp->adj_scrnum < 0)
+ scrnum = count;
+ else
+ scrnum = adjp->adj_scrnum;
+ if (!configScreen(slp[count].screen, adjp->adj_screen, scrnum,
+ X_CONFIG)) {
+ free(slp);
+ return FALSE;
+ }
+ slp[count].x = adjp->adj_x;
+ slp[count].y = adjp->adj_y;
+ slp[count].refname = adjp->adj_refscreen;
+ switch (adjp->adj_where) {
+ case CONF_ADJ_OBSOLETE:
+ slp[count].where = PosObsolete;
+ slp[count].topname = adjp->adj_top_str;
+ slp[count].bottomname = adjp->adj_bottom_str;
+ slp[count].leftname = adjp->adj_left_str;
+ slp[count].rightname = adjp->adj_right_str;
+ break;
+ case CONF_ADJ_ABSOLUTE:
+ slp[count].where = PosAbsolute;
+ break;
+ case CONF_ADJ_RIGHTOF:
+ slp[count].where = PosRightOf;
+ break;
+ case CONF_ADJ_LEFTOF:
+ slp[count].where = PosLeftOf;
+ break;
+ case CONF_ADJ_ABOVE:
+ slp[count].where = PosAbove;
+ break;
+ case CONF_ADJ_BELOW:
+ slp[count].where = PosBelow;
+ break;
+ case CONF_ADJ_RELATIVE:
+ slp[count].where = PosRelative;
+ break;
+ }
+ count++;
+ adjp = (XF86ConfAdjacencyPtr)adjp->list.next;
+ }
+
+ /* No screen was specified in the layout. take the first one from the
+ * config file, or - if it is NULL - configScreen autogenerates one for
+ * us */
+ if (!count)
+ {
+ slp[0].screen = xnfcalloc(1, sizeof(confScreenRec));
+ if (!configScreen(slp[0].screen, xf86configptr->conf_screen_lst,
+ 0, X_CONFIG)) {
+ free(slp[0].screen);
+ free(slp);
+ return FALSE;
+ }
+ }
+
+ /* XXX Need to tie down the upper left screen. */
+
+ /* Fill in the refscreen and top/bottom/left/right values */
+ for (i = 0; i < count; i++) {
+ for (j = 0; j < count; j++) {
+ if (slp[i].refname &&
+ strcmp(slp[i].refname, slp[j].screen->id) == 0) {
+ slp[i].refscreen = slp[j].screen;
+ }
+ if (slp[i].topname &&
+ strcmp(slp[i].topname, slp[j].screen->id) == 0) {
+ slp[i].top = slp[j].screen;
+ }
+ if (slp[i].bottomname &&
+ strcmp(slp[i].bottomname, slp[j].screen->id) == 0) {
+ slp[i].bottom = slp[j].screen;
+ }
+ if (slp[i].leftname &&
+ strcmp(slp[i].leftname, slp[j].screen->id) == 0) {
+ slp[i].left = slp[j].screen;
+ }
+ if (slp[i].rightname &&
+ strcmp(slp[i].rightname, slp[j].screen->id) == 0) {
+ slp[i].right = slp[j].screen;
+ }
+ }
+ if (slp[i].where != PosObsolete
+ && slp[i].where != PosAbsolute
+ && !slp[i].refscreen) {
+ xf86Msg(X_ERROR,"Screen %s doesn't exist: deleting placement\n",
+ slp[i].refname);
+ slp[i].where = PosAbsolute;
+ slp[i].x = 0;
+ slp[i].y = 0;
+ }
+ }
+
+ /*
+ * Count the number of inactive devices.
+ */
+ count = 0;
+ idp = conf_layout->lay_inactive_lst;
+ while (idp) {
+ count++;
+ idp = (XF86ConfInactivePtr)idp->list.next;
+ }
+ DebugF("Found %d inactive devices in the layout section %s\n",
+ count, conf_layout->lay_identifier);
+ gdp = xnfalloc((count + 1) * sizeof(GDevRec));
+ gdp[count].identifier = NULL;
+ idp = conf_layout->lay_inactive_lst;
+ count = 0;
+ while (idp) {
+ if (!configDevice(&gdp[count], idp->inactive_device, FALSE)) {
+ free(gdp);
+ return FALSE;
+ }
+ count++;
+ idp = (XF86ConfInactivePtr)idp->list.next;
+ }
+
+ if (!configInputDevices(conf_layout, servlayoutp))
+ return FALSE;
+
+ servlayoutp->id = conf_layout->lay_identifier;
+ servlayoutp->screens = slp;
+ servlayoutp->inactives = gdp;
+ servlayoutp->options = conf_layout->lay_option_lst;
+ from = X_DEFAULT;
+
+ return TRUE;
+}
+
+/*
+ * No layout section, so find the first Screen section and set that up as
+ * the only active screen.
+ */
+static Bool
+configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
+ XF86ConfigPtr xf86configptr)
+{
+ MessageType from;
+ XF86ConfScreenPtr s;
+ screenLayoutPtr slp;
+ InputInfoPtr *indp;
+ XF86ConfLayoutRec layout;
+
+ if (!servlayoutp)
+ return FALSE;
+
+ /*
+ * which screen section is the active one?
+ *
+ * If there is a -screen option, use that one, otherwise use the first
+ * one.
+ */
+
+ from = X_CONFIG;
+ if (xf86ScreenName != NULL) {
+ if ((s = xf86findScreen(xf86ScreenName, conf_screen)) == NULL) {
+ xf86Msg(X_ERROR, "No Screen section called \"%s\"\n",
+ xf86ScreenName);
+ return FALSE;
+ }
+ conf_screen = s;
+ from = X_CMDLINE;
+ }
+
+ /* We have exactly one screen */
+
+ slp = xnfcalloc(1, 2 * sizeof(screenLayoutRec));
+ slp[0].screen = xnfcalloc(1, sizeof(confScreenRec));
+ slp[1].screen = NULL;
+ if (!configScreen(slp[0].screen, conf_screen, 0, from)) {
+ free(slp);
+ return FALSE;
+ }
+ servlayoutp->id = "(implicit)";
+ servlayoutp->screens = slp;
+ servlayoutp->inactives = xnfcalloc(1, sizeof(GDevRec));
+ servlayoutp->options = NULL;
+
+ memset(&layout, 0, sizeof(layout));
+ layout.lay_identifier = servlayoutp->id;
+ if (xf86layoutAddInputDevices(xf86configptr, &layout) > 0) {
+ if (!configInputDevices(&layout, servlayoutp))
+ return FALSE;
+ from = X_DEFAULT;
+ } else {
+ /* Set up an empty input device list, then look for some core devices. */
+ indp = xnfalloc(sizeof(InputInfoPtr));
+ *indp = NULL;
+ servlayoutp->inputs = indp;
+ }
+
+ return TRUE;
+}
+
+static Bool
+configXvAdaptor(confXvAdaptorPtr adaptor, XF86ConfVideoAdaptorPtr conf_adaptor)
+{
+ int count = 0;
+ XF86ConfVideoPortPtr conf_port;
+
+ xf86Msg(X_CONFIG, "| |-->VideoAdaptor \"%s\"\n",
+ conf_adaptor->va_identifier);
+ adaptor->identifier = conf_adaptor->va_identifier;
+ adaptor->options = conf_adaptor->va_option_lst;
+ if (conf_adaptor->va_busid || conf_adaptor->va_driver) {
+ xf86Msg(X_CONFIG, "| | Unsupported device type, skipping entry\n");
+ return FALSE;
+ }
+
+ /*
+ * figure out how many videoport subsections there are and fill them in
+ */
+ conf_port = conf_adaptor->va_port_lst;
+ while(conf_port) {
+ count++;
+ conf_port = (XF86ConfVideoPortPtr)conf_port->list.next;
+ }
+ adaptor->ports = xnfalloc((count) * sizeof(confXvPortRec));
+ adaptor->numports = count;
+ count = 0;
+ conf_port = conf_adaptor->va_port_lst;
+ while(conf_port) {
+ adaptor->ports[count].identifier = conf_port->vp_identifier;
+ adaptor->ports[count].options = conf_port->vp_option_lst;
+ count++;
+ conf_port = (XF86ConfVideoPortPtr)conf_port->list.next;
+ }
+
+ return TRUE;
+}
+
+static Bool
+configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
+ MessageType from)
+{
+ int count = 0;
+ XF86ConfDisplayPtr dispptr;
+ XF86ConfAdaptorLinkPtr conf_adaptor;
+ Bool defaultMonitor = FALSE;
+ XF86ConfScreenRec local_conf_screen;
+
+ if (!conf_screen) {
+ memset(&local_conf_screen, 0, sizeof(local_conf_screen));
+ conf_screen = &local_conf_screen;
+ conf_screen->scrn_identifier = "Default Screen Section";
+ xf86Msg(X_DEFAULT, "No screen section available. Using defaults.\n");
+ }
+
+ xf86Msg(from, "|-->Screen \"%s\" (%d)\n", conf_screen->scrn_identifier,
+ scrnum);
+ /*
+ * now we fill in the elements of the screen
+ */
+ screenp->id = conf_screen->scrn_identifier;
+ screenp->screennum = scrnum;
+ screenp->defaultdepth = conf_screen->scrn_defaultdepth;
+ screenp->defaultbpp = conf_screen->scrn_defaultbpp;
+ screenp->defaultfbbpp = conf_screen->scrn_defaultfbbpp;
+ screenp->monitor = xnfcalloc(1, sizeof(MonRec));
+ /* If no monitor is specified, create a default one. */
+ if (!conf_screen->scrn_monitor) {
+ XF86ConfMonitorRec defMon;
+
+ memset(&defMon, 0, sizeof(defMon));
+ defMon.mon_identifier = "<default monitor>";
+ if (!configMonitor(screenp->monitor, &defMon))
+ return FALSE;
+ defaultMonitor = TRUE;
+ } else {
+ if (!configMonitor(screenp->monitor,conf_screen->scrn_monitor))
+ return FALSE;
+ }
+ /* Configure the device. If there isn't one configured, attach to the
+ * first inactive one that we can configure. If there's none that work,
+ * set it to NULL so that the section can be autoconfigured later */
+ screenp->device = xnfcalloc(1, sizeof(GDevRec));
+ if ((!conf_screen->scrn_device) && (xf86configptr->conf_device_lst)) {
+ conf_screen->scrn_device = xf86configptr->conf_device_lst;
+ xf86Msg(X_DEFAULT, "No device specified for screen \"%s\".\n"
+ "\tUsing the first device section listed.\n", screenp->id);
+ }
+ if (configDevice(screenp->device,conf_screen->scrn_device, TRUE)) {
+ screenp->device->myScreenSection = screenp;
+ } else {
+ screenp->device = NULL;
+ }
+ screenp->options = conf_screen->scrn_option_lst;
+
+ /*
+ * figure out how many display subsections there are and fill them in
+ */
+ dispptr = conf_screen->scrn_display_lst;
+ while(dispptr) {
+ count++;
+ dispptr = (XF86ConfDisplayPtr)dispptr->list.next;
+ }
+ screenp->displays = xnfalloc((count) * sizeof(DispRec));
+ screenp->numdisplays = count;
+
+ /* Fill in the default Virtual size, if any */
+ if (conf_screen->scrn_virtualX && conf_screen->scrn_virtualY) {
+ for (count = 0, dispptr = conf_screen->scrn_display_lst;
+ dispptr;
+ dispptr = (XF86ConfDisplayPtr)dispptr->list.next, count++) {
+ screenp->displays[count].virtualX = conf_screen->scrn_virtualX;
+ screenp->displays[count].virtualY = conf_screen->scrn_virtualY;
+ }
+ }
+
+ /* Now do the per-Display Virtual sizes */
+ count = 0;
+ dispptr = conf_screen->scrn_display_lst;
+ while(dispptr) {
+ configDisplay(&(screenp->displays[count]),dispptr);
+ count++;
+ dispptr = (XF86ConfDisplayPtr)dispptr->list.next;
+ }
+
+ /*
+ * figure out how many videoadaptor references there are and fill them in
+ */
+ conf_adaptor = conf_screen->scrn_adaptor_lst;
+ while(conf_adaptor) {
+ count++;
+ conf_adaptor = (XF86ConfAdaptorLinkPtr)conf_adaptor->list.next;
+ }
+ screenp->xvadaptors = xnfalloc((count) * sizeof(confXvAdaptorRec));
+ screenp->numxvadaptors = 0;
+ conf_adaptor = conf_screen->scrn_adaptor_lst;
+ while(conf_adaptor) {
+ if (configXvAdaptor(&(screenp->xvadaptors[screenp->numxvadaptors]),
+ conf_adaptor->al_adaptor))
+ screenp->numxvadaptors++;
+ conf_adaptor = (XF86ConfAdaptorLinkPtr)conf_adaptor->list.next;
+ }
+
+ if (defaultMonitor) {
+ xf86Msg(X_DEFAULT, "No monitor specified for screen \"%s\".\n"
+ "\tUsing a default monitor configuration.\n", screenp->id);
+ }
+ return TRUE;
+}
+
+typedef enum {
+ MON_REDUCEDBLANKING,
+ MON_MAX_PIX_CLOCK,
+} MonitorValues;
+
+static OptionInfoRec MonitorOptions[] = {
+ { MON_REDUCEDBLANKING, "ReducedBlanking", OPTV_BOOLEAN,
+ {0}, FALSE },
+ { MON_MAX_PIX_CLOCK, "MaxPixClock", OPTV_FREQ,
+ {0}, FALSE },
+ { -1, NULL, OPTV_NONE,
+ {0}, FALSE },
+};
+
+static Bool
+configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
+{
+ int count;
+ DisplayModePtr mode,last = NULL;
+ XF86ConfModeLinePtr cmodep;
+ XF86ConfModesPtr modes;
+ XF86ConfModesLinkPtr modeslnk = conf_monitor->mon_modes_sect_lst;
+ Gamma zeros = {0.0, 0.0, 0.0};
+ float badgamma = 0.0;
+ double maxPixClock;
+
+ xf86Msg(X_CONFIG, "| |-->Monitor \"%s\"\n",
+ conf_monitor->mon_identifier);
+ monitorp->id = conf_monitor->mon_identifier;
+ monitorp->vendor = conf_monitor->mon_vendor;
+ monitorp->model = conf_monitor->mon_modelname;
+ monitorp->Modes = NULL;
+ monitorp->Last = NULL;
+ monitorp->gamma = zeros;
+ monitorp->widthmm = conf_monitor->mon_width;
+ monitorp->heightmm = conf_monitor->mon_height;
+ monitorp->reducedblanking = FALSE;
+ monitorp->maxPixClock = 0;
+ monitorp->options = conf_monitor->mon_option_lst;
+
+ /*
+ * fill in the monitor structure
+ */
+ for( count = 0 ;
+ count < conf_monitor->mon_n_hsync && count < MAX_HSYNC;
+ count++) {
+ monitorp->hsync[count].hi = conf_monitor->mon_hsync[count].hi;
+ monitorp->hsync[count].lo = conf_monitor->mon_hsync[count].lo;
+ }
+ monitorp->nHsync = count;
+ for( count = 0 ;
+ count < conf_monitor->mon_n_vrefresh && count < MAX_VREFRESH;
+ count++) {
+ monitorp->vrefresh[count].hi = conf_monitor->mon_vrefresh[count].hi;
+ monitorp->vrefresh[count].lo = conf_monitor->mon_vrefresh[count].lo;
+ }
+ monitorp->nVrefresh = count;
+
+ /*
+ * first we collect the mode lines from the UseModes directive
+ */
+ while(modeslnk)
+ {
+ modes = xf86findModes (modeslnk->ml_modes_str,
+ xf86configptr->conf_modes_lst);
+ modeslnk->ml_modes = modes;
+
+
+ /* now add the modes found in the modes
+ section to the list of modes for this
+ monitor unless it has been added before
+ because we are reusing the same section
+ for another screen */
+ if (xf86itemNotSublist(
+ (GenericListPtr)conf_monitor->mon_modeline_lst,
+ (GenericListPtr)modes->mon_modeline_lst)) {
+ conf_monitor->mon_modeline_lst = (XF86ConfModeLinePtr)
+ xf86addListItem(
+ (GenericListPtr)conf_monitor->mon_modeline_lst,
+ (GenericListPtr)modes->mon_modeline_lst);
+ }
+ modeslnk = modeslnk->list.next;
+ }
+
+ /*
+ * we need to hook in the mode lines now
+ * here both data structures use lists, only our internal one
+ * is double linked
+ */
+ cmodep = conf_monitor->mon_modeline_lst;
+ while( cmodep ) {
+ mode = xnfcalloc(1, sizeof(DisplayModeRec));
+ mode->type = 0;
+ mode->Clock = cmodep->ml_clock;
+ mode->HDisplay = cmodep->ml_hdisplay;
+ mode->HSyncStart = cmodep->ml_hsyncstart;
+ mode->HSyncEnd = cmodep->ml_hsyncend;
+ mode->HTotal = cmodep->ml_htotal;
+ mode->VDisplay = cmodep->ml_vdisplay;
+ mode->VSyncStart = cmodep->ml_vsyncstart;
+ mode->VSyncEnd = cmodep->ml_vsyncend;
+ mode->VTotal = cmodep->ml_vtotal;
+ mode->Flags = cmodep->ml_flags;
+ mode->HSkew = cmodep->ml_hskew;
+ mode->VScan = cmodep->ml_vscan;
+ mode->name = xnfstrdup(cmodep->ml_identifier);
+ if( last ) {
+ mode->prev = last;
+ last->next = mode;
+ }
+ else {
+ /*
+ * this is the first mode
+ */
+ monitorp->Modes = mode;
+ mode->prev = NULL;
+ }
+ last = mode;
+ cmodep = (XF86ConfModeLinePtr)cmodep->list.next;
+ }
+ if(last){
+ last->next = NULL;
+ }
+ monitorp->Last = last;
+
+ /* add the (VESA) default modes */
+ if (! addDefaultModes(monitorp) )
+ return FALSE;
+
+ if (conf_monitor->mon_gamma_red > GAMMA_ZERO)
+ monitorp->gamma.red = conf_monitor->mon_gamma_red;
+ if (conf_monitor->mon_gamma_green > GAMMA_ZERO)
+ monitorp->gamma.green = conf_monitor->mon_gamma_green;
+ if (conf_monitor->mon_gamma_blue > GAMMA_ZERO)
+ monitorp->gamma.blue = conf_monitor->mon_gamma_blue;
+
+ /* Check that the gamma values are within range */
+ if (monitorp->gamma.red > GAMMA_ZERO &&
+ (monitorp->gamma.red < GAMMA_MIN ||
+ monitorp->gamma.red > GAMMA_MAX)) {
+ badgamma = monitorp->gamma.red;
+ } else if (monitorp->gamma.green > GAMMA_ZERO &&
+ (monitorp->gamma.green < GAMMA_MIN ||
+ monitorp->gamma.green > GAMMA_MAX)) {
+ badgamma = monitorp->gamma.green;
+ } else if (monitorp->gamma.blue > GAMMA_ZERO &&
+ (monitorp->gamma.blue < GAMMA_MIN ||
+ monitorp->gamma.blue > GAMMA_MAX)) {
+ badgamma = monitorp->gamma.blue;
+ }
+ if (badgamma > GAMMA_ZERO) {
+ xf86ConfigError("Gamma value %.f is out of range (%.2f - %.1f)\n",
+ badgamma, GAMMA_MIN, GAMMA_MAX);
+ return FALSE;
+ }
+
+ xf86ProcessOptions(-1, monitorp->options, MonitorOptions);
+ xf86GetOptValBool(MonitorOptions, MON_REDUCEDBLANKING,
+ &monitorp->reducedblanking);
+ if (xf86GetOptValFreq(MonitorOptions, MON_MAX_PIX_CLOCK, OPTUNITS_KHZ,
+ &maxPixClock) == TRUE) {
+ monitorp->maxPixClock = (int) maxPixClock;
+ }
+
+ return TRUE;
+}
+
+static int
+lookupVisual(const char *visname)
+{
+ int i;
+
+ if (!visname || !*visname)
+ return -1;
+
+ for (i = 0; i <= DirectColor; i++) {
+ if (!xf86nameCompare(visname, xf86VisualNames[i]))
+ break;
+ }
+
+ if (i <= DirectColor)
+ return i;
+
+ return -1;
+}
+
+
+static Bool
+configDisplay(DispPtr displayp, XF86ConfDisplayPtr conf_display)
+{
+ int count = 0;
+ XF86ModePtr modep;
+
+ displayp->frameX0 = conf_display->disp_frameX0;
+ displayp->frameY0 = conf_display->disp_frameY0;
+ displayp->virtualX = conf_display->disp_virtualX;
+ displayp->virtualY = conf_display->disp_virtualY;
+ displayp->depth = conf_display->disp_depth;
+ displayp->fbbpp = conf_display->disp_bpp;
+ displayp->weight.red = conf_display->disp_weight.red;
+ displayp->weight.green = conf_display->disp_weight.green;
+ displayp->weight.blue = conf_display->disp_weight.blue;
+ displayp->blackColour.red = conf_display->disp_black.red;
+ displayp->blackColour.green = conf_display->disp_black.green;
+ displayp->blackColour.blue = conf_display->disp_black.blue;
+ displayp->whiteColour.red = conf_display->disp_white.red;
+ displayp->whiteColour.green = conf_display->disp_white.green;
+ displayp->whiteColour.blue = conf_display->disp_white.blue;
+ displayp->options = conf_display->disp_option_lst;
+ if (conf_display->disp_visual) {
+ displayp->defaultVisual = lookupVisual(conf_display->disp_visual);
+ if (displayp->defaultVisual == -1) {
+ xf86ConfigError("Invalid visual name: \"%s\"",
+ conf_display->disp_visual);
+ return FALSE;
+ }
+ } else {
+ displayp->defaultVisual = -1;
+ }
+
+ /*
+ * now hook in the modes
+ */
+ modep = conf_display->disp_mode_lst;
+ while(modep) {
+ count++;
+ modep = (XF86ModePtr)modep->list.next;
+ }
+ displayp->modes = xnfalloc((count+1) * sizeof(char*));
+ modep = conf_display->disp_mode_lst;
+ count = 0;
+ while(modep) {
+ displayp->modes[count] = modep->mode_name;
+ count++;
+ modep = (XF86ModePtr)modep->list.next;
+ }
+ displayp->modes[count] = NULL;
+
+ return TRUE;
+}
+
+static Bool
+configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active)
+{
+ int i;
+
+ if (!conf_device) {
+ return FALSE;
+ }
+
+ if (active)
+ xf86Msg(X_CONFIG, "| |-->Device \"%s\"\n",
+ conf_device->dev_identifier);
+ else
+ xf86Msg(X_CONFIG, "|-->Inactive Device \"%s\"\n",
+ conf_device->dev_identifier);
+
+ devicep->identifier = conf_device->dev_identifier;
+ devicep->vendor = conf_device->dev_vendor;
+ devicep->board = conf_device->dev_board;
+ devicep->chipset = conf_device->dev_chipset;
+ devicep->ramdac = conf_device->dev_ramdac;
+ devicep->driver = conf_device->dev_driver;
+ devicep->active = active;
+ devicep->videoRam = conf_device->dev_videoram;
+ devicep->BiosBase = conf_device->dev_bios_base;
+ devicep->MemBase = conf_device->dev_mem_base;
+ devicep->IOBase = conf_device->dev_io_base;
+ devicep->clockchip = conf_device->dev_clockchip;
+ devicep->busID = conf_device->dev_busid;
+ devicep->textClockFreq = conf_device->dev_textclockfreq;
+ devicep->chipID = conf_device->dev_chipid;
+ devicep->chipRev = conf_device->dev_chiprev;
+ devicep->options = conf_device->dev_option_lst;
+ devicep->irq = conf_device->dev_irq;
+ devicep->screen = conf_device->dev_screen;
+
+ for (i = 0; i < MAXDACSPEEDS; i++) {
+ if (i < CONF_MAXDACSPEEDS)
+ devicep->dacSpeeds[i] = conf_device->dev_dacSpeeds[i];
+ else
+ devicep->dacSpeeds[i] = 0;
+ }
+ devicep->numclocks = conf_device->dev_clocks;
+ if (devicep->numclocks > MAXCLOCKS)
+ devicep->numclocks = MAXCLOCKS;
+ for (i = 0; i < devicep->numclocks; i++) {
+ devicep->clock[i] = conf_device->dev_clock[i];
+ }
+ devicep->claimed = FALSE;
+
+ return TRUE;
+}
+
+#ifdef XF86DRI
+static void
+configDRI(XF86ConfDRIPtr drip)
+{
+ struct group *grp;
+
+ xf86ConfigDRI.group = -1;
+ xf86ConfigDRI.mode = 0;
+
+ if (drip) {
+ if (drip->dri_group_name) {
+ if ((grp = getgrnam(drip->dri_group_name)))
+ xf86ConfigDRI.group = grp->gr_gid;
+ } else {
+ if (drip->dri_group >= 0)
+ xf86ConfigDRI.group = drip->dri_group;
+ }
+ xf86ConfigDRI.mode = drip->dri_mode;
+ }
+}
+#endif
+
+static void
+configExtensions(XF86ConfExtensionsPtr conf_ext)
+{
+ XF86OptionPtr o;
+
+ if (conf_ext && conf_ext->ext_option_lst) {
+ for (o = conf_ext->ext_option_lst; o; o = xf86NextOption(o)) {
+ char *name = xf86OptionName(o);
+ char *val = xf86OptionValue(o);
+ char *n;
+ Bool enable = TRUE;
+
+ /* Handle "No<ExtensionName>" */
+ n = xf86NormalizeName(name);
+ if (strncmp(n, "no", 2) == 0) {
+ name += 2;
+ enable = FALSE;
+ }
+
+ if (!val ||
+ xf86NameCmp(val, "enable") == 0 ||
+ xf86NameCmp(val, "enabled") == 0 ||
+ xf86NameCmp(val, "on") == 0 ||
+ xf86NameCmp(val, "1") == 0 ||
+ xf86NameCmp(val, "yes") == 0 ||
+ xf86NameCmp(val, "true") == 0) {
+ /* NOTHING NEEDED -- enabling is handled below */
+ } else if (xf86NameCmp(val, "disable") == 0 ||
+ xf86NameCmp(val, "disabled") == 0 ||
+ xf86NameCmp(val, "off") == 0 ||
+ xf86NameCmp(val, "0") == 0 ||
+ xf86NameCmp(val, "no") == 0 ||
+ xf86NameCmp(val, "false") == 0) {
+ enable = !enable;
+ } else {
+ xf86Msg(X_WARNING, "Ignoring unrecognized value \"%s\"\n", val);
+ free(n);
+ continue;
+ }
+
+ if (EnableDisableExtension(name, enable)) {
+ xf86Msg(X_CONFIG, "Extension \"%s\" is %s\n",
+ name, enable ? "enabled" : "disabled");
+ } else {
+ xf86Msg(X_WARNING, "Ignoring unrecognized extension \"%s\"\n",
+ name);
+ }
+ free(n);
+ }
+ }
+}
+
+static Bool
+configInput(InputInfoPtr inputp, XF86ConfInputPtr conf_input, MessageType from)
+{
+ xf86Msg(from, "|-->Input Device \"%s\"\n", conf_input->inp_identifier);
+ inputp->name = conf_input->inp_identifier;
+ inputp->driver = conf_input->inp_driver;
+ inputp->options = conf_input->inp_option_lst;
+ inputp->attrs = NULL;
+
+ return TRUE;
+}
+
+static Bool
+modeIsPresent(DisplayModePtr mode, MonPtr monitorp)
+{
+ DisplayModePtr knownmodes = monitorp->Modes;
+
+ /* all I can think of is a linear search... */
+ while(knownmodes != NULL)
+ {
+ if(!strcmp(mode->name, knownmodes->name) &&
+ !(knownmodes->type & M_T_DEFAULT))
+ return TRUE;
+ knownmodes = knownmodes->next;
+ }
+ return FALSE;
+}
+
+static Bool
+addDefaultModes(MonPtr monitorp)
+{
+ DisplayModePtr mode;
+ DisplayModePtr last = monitorp->Last;
+ int i = 0;
+
+ for (i = 0; i < xf86NumDefaultModes; i++)
+ {
+ mode = xf86DuplicateMode(&xf86DefaultModes[i]);
+ if (!modeIsPresent(mode, monitorp))
+ {
+ monitorp->Modes = xf86ModesAdd(monitorp->Modes, mode);
+ last = mode;
+ } else {
+ free(mode);
+ }
+ }
+ monitorp->Last = last;
+
+ return TRUE;
+}
+
+static void
+checkInput(serverLayoutPtr layout, Bool implicit_layout) {
+ checkCoreInputDevices(layout, implicit_layout);
+
+ /* Unless we're forcing input devices, disable mouse/kbd devices in the
+ * config. Otherwise the same physical device is added multiple times,
+ * leading to duplicate events.
+ */
+ if (!xf86Info.forceInputDevices && layout->inputs)
+ {
+ InputInfoPtr *dev = layout->inputs;
+ BOOL warned = FALSE;
+
+ while(*dev)
+ {
+ if (strcmp((*dev)->driver, "kbd") == 0 ||
+ strcmp((*dev)->driver, "mouse") == 0 ||
+ strcmp((*dev)->driver, "vmmouse") == 0)
+ {
+ InputInfoPtr *current;
+ if (!warned)
+ {
+ xf86Msg(X_WARNING, "Hotplugging is on, devices using "
+ "drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.\n");
+ warned = TRUE;
+ }
+
+ xf86Msg(X_WARNING, "Disabling %s\n", (*dev)->name);
+
+ current = dev;
+ free(*dev);
+
+ do {
+ *current = *(current + 1);
+ current++;
+ } while(*current);
+ } else
+ dev++;
+ }
+ }
+}
+
+/*
+ * load the config file and fill the global data structure
+ */
+ConfigStatus
+xf86HandleConfigFile(Bool autoconfig)
+{
+ const char *filename, *dirname, *sysdirname;
+ char *filesearch, *dirsearch;
+ MessageType filefrom = X_DEFAULT;
+ MessageType dirfrom = X_DEFAULT;
+ char *scanptr;
+ Bool singlecard = 0;
+ Bool implicit_layout = FALSE;
+
+ if (!autoconfig) {
+ if (getuid() == 0) {
+ filesearch = ROOT_CONFIGPATH;
+ dirsearch = ROOT_CONFIGDIRPATH;
+ } else {
+ filesearch = USER_CONFIGPATH;
+ dirsearch = USER_CONFIGDIRPATH;
+ }
+
+ if (xf86ConfigFile)
+ filefrom = X_CMDLINE;
+ if (xf86ConfigDir)
+ dirfrom = X_CMDLINE;
+
+ xf86initConfigFiles();
+ sysdirname = xf86openConfigDirFiles(SYS_CONFIGDIRPATH, NULL,
+ PROJECTROOT);
+ dirname = xf86openConfigDirFiles(dirsearch, xf86ConfigDir, PROJECTROOT);
+ filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT);
+ if (filename) {
+ xf86MsgVerb(filefrom, 0, "Using config file: \"%s\"\n", filename);
+ xf86ConfigFile = xnfstrdup(filename);
+ } else {
+ if (xf86ConfigFile)
+ xf86Msg(X_ERROR, "Unable to locate/open config file: \"%s\"\n",
+ xf86ConfigFile);
+ }
+ if (dirname) {
+ xf86MsgVerb(dirfrom, 0, "Using config directory: \"%s\"\n",
+ dirname);
+ xf86ConfigDir = xnfstrdup(dirname);
+ } else {
+ if (xf86ConfigDir)
+ xf86Msg(X_ERROR,
+ "Unable to locate/open config directory: \"%s\"\n",
+ xf86ConfigDir);
+ }
+ if (sysdirname)
+ xf86MsgVerb(X_DEFAULT, 0, "Using system config directory \"%s\"\n",
+ sysdirname);
+ if (!filename && !dirname && !sysdirname)
+ return CONFIG_NOFILE;
+ }
+
+ if ((xf86configptr = xf86readConfigFile ()) == NULL) {
+ xf86Msg(X_ERROR, "Problem parsing the config file\n");
+ return CONFIG_PARSE_ERROR;
+ }
+ xf86closeConfigFile ();
+
+ /* Initialise a few things. */
+
+ /*
+ * now we convert part of the information contained in the parser
+ * structures into our own structures.
+ * The important part here is to figure out which Screen Sections
+ * in the XF86Config file are active so that we can piece together
+ * the modes that we need later down the road.
+ * And while we are at it, we'll decode the rest of the stuff as well
+ */
+
+ /* First check if a layout section is present, and if it is valid. */
+
+ if (xf86configptr->conf_layout_lst == NULL || xf86ScreenName != NULL) {
+ if (xf86ScreenName == NULL) {
+ xf86Msg(X_DEFAULT,
+ "No Layout section. Using the first Screen section.\n");
+ }
+ if (!configImpliedLayout(&xf86ConfigLayout,
+ xf86configptr->conf_screen_lst,
+ xf86configptr)) {
+ xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
+ return CONFIG_PARSE_ERROR;
+ }
+ implicit_layout = TRUE;
+ } else {
+ if (xf86configptr->conf_flags != NULL) {
+ char *dfltlayout = NULL;
+ pointer optlist = xf86configptr->conf_flags->flg_option_lst;
+
+ if (optlist && xf86FindOption(optlist, "defaultserverlayout"))
+ dfltlayout = xf86SetStrOption(optlist, "defaultserverlayout", NULL);
+ if (!configLayout(&xf86ConfigLayout, xf86configptr->conf_layout_lst,
+ dfltlayout)) {
+ xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
+ return CONFIG_PARSE_ERROR;
+ }
+ } else {
+ if (!configLayout(&xf86ConfigLayout, xf86configptr->conf_layout_lst,
+ NULL)) {
+ xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
+ return CONFIG_PARSE_ERROR;
+ }
+ }
+ }
+
+ xf86ProcessOptions(-1, xf86ConfigLayout.options, LayoutOptions);
+
+ if ((scanptr = xf86GetOptValString(LayoutOptions, LAYOUT_ISOLATEDEVICE))) {
+ ; /* IsolateDevice specified; overrides SingleCard */
+ } else {
+ xf86GetOptValBool(LayoutOptions, LAYOUT_SINGLECARD, &singlecard);
+ if (singlecard)
+ scanptr = xf86ConfigLayout.screens->screen->device->busID;
+ }
+ if (scanptr) {
+ if (strncmp(scanptr, "PCI:", 4) != 0) {
+ xf86Msg(X_WARNING, "Bus types other than PCI not yet isolable.\n"
+ "\tIgnoring IsolateDevice option.\n");
+ } else
+ xf86PciIsolateDevice(scanptr);
+ }
+
+ /* Now process everything else */
+ if (!configServerFlags(xf86configptr->conf_flags,xf86ConfigLayout.options)){
+ ErrorF ("Problem when converting the config data structures\n");
+ return CONFIG_PARSE_ERROR;
+ }
+
+ configFiles(xf86configptr->conf_files);
+ configExtensions(xf86configptr->conf_extensions);
+#ifdef XF86DRI
+ configDRI(xf86configptr->conf_dri);
+#endif
+
+ checkInput(&xf86ConfigLayout, implicit_layout);
+
+ /*
+ * Handle some command line options that can override some of the
+ * ServerFlags settings.
+ */
+#ifdef XF86VIDMODE
+ if (xf86VidModeDisabled)
+ xf86Info.vidModeEnabled = FALSE;
+ if (xf86VidModeAllowNonLocal)
+ xf86Info.vidModeAllowNonLocal = TRUE;
+#endif
+
+ if (xf86AllowMouseOpenFail)
+ xf86Info.allowMouseOpenFail = TRUE;
+
+ return CONFIG_OK;
+}
+
+Bool
+xf86PathIsSafe(const char *path)
+{
+ return (xf86pathIsSafe(path) != 0);
+}
diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c
index 1a5bf8a1c..147464410 100644
--- a/xorg-server/hw/xfree86/common/xf86Helper.c
+++ b/xorg-server/hw/xfree86/common/xf86Helper.c
@@ -1,2048 +1,2048 @@
-/*
- * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-/*
- * Authors: Dirk Hohndel <hohndel@XFree86.Org>
- * David Dawes <dawes@XFree86.Org>
- * ... and others
- *
- * This file includes the helper functions that the server provides for
- * different drivers.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "servermd.h"
-#include "pixmapstr.h"
-#include "windowstr.h"
-#include "propertyst.h"
-#include "gcstruct.h"
-#include "loaderProcs.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-#include "micmap.h"
-#include "xf86DDC.h"
-#include "xf86Xinput.h"
-#include "xf86InPriv.h"
-#include "mivalidate.h"
-#include "xf86Crtc.h"
-
-/* For xf86GetClocks */
-#if defined(CSRG_BASED) || defined(__GNU__)
-#define HAS_SETPRIORITY
-#include <sys/resource.h>
-#endif
-
-static int xf86ScrnInfoPrivateCount = 0;
-
-
-/* Add a pointer to a new DriverRec to xf86DriverList */
-
-void
-xf86AddDriver(DriverPtr driver, pointer module, int flags)
-{
- /* Don't add null entries */
- if (!driver)
- return;
-
- if (xf86DriverList == NULL)
- xf86NumDrivers = 0;
-
- xf86NumDrivers++;
- xf86DriverList = xnfrealloc(xf86DriverList,
- xf86NumDrivers * sizeof(DriverPtr));
- xf86DriverList[xf86NumDrivers - 1] = xnfalloc(sizeof(DriverRec));
- if (flags & HaveDriverFuncs)
- *xf86DriverList[xf86NumDrivers - 1] = *driver;
- else {
- (void) memset( xf86DriverList[xf86NumDrivers - 1], 0,
- sizeof( DriverRec ) );
- (void) memcpy( xf86DriverList[xf86NumDrivers - 1], driver,
- sizeof(DriverRec1));
-
- }
- xf86DriverList[xf86NumDrivers - 1]->module = module;
- xf86DriverList[xf86NumDrivers - 1]->refCount = 0;
-}
-
-void
-xf86DeleteDriver(int drvIndex)
-{
- if (xf86DriverList[drvIndex]
- && (!xf86DriverHasEntities(xf86DriverList[drvIndex]))) {
- if (xf86DriverList[drvIndex]->module)
- UnloadModule(xf86DriverList[drvIndex]->module);
- free(xf86DriverList[drvIndex]);
- xf86DriverList[drvIndex] = NULL;
- }
-}
-
-/* Add a pointer to a new InputDriverRec to xf86InputDriverList */
-
-void
-xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags)
-{
- /* Don't add null entries */
- if (!driver)
- return;
-
- if (xf86InputDriverList == NULL)
- xf86NumInputDrivers = 0;
-
- xf86NumInputDrivers++;
- xf86InputDriverList = xnfrealloc(xf86InputDriverList,
- xf86NumInputDrivers * sizeof(InputDriverPtr));
- xf86InputDriverList[xf86NumInputDrivers - 1] =
- xnfalloc(sizeof(InputDriverRec));
- *xf86InputDriverList[xf86NumInputDrivers - 1] = *driver;
- xf86InputDriverList[xf86NumInputDrivers - 1]->module = module;
-}
-
-void
-xf86DeleteInputDriver(int drvIndex)
-{
- if (xf86InputDriverList[drvIndex] && xf86InputDriverList[drvIndex]->module)
- UnloadModule(xf86InputDriverList[drvIndex]->module);
- free(xf86InputDriverList[drvIndex]);
- xf86InputDriverList[drvIndex] = NULL;
-}
-
-InputDriverPtr
-xf86LookupInputDriver(const char *name)
-{
- int i;
-
- for (i = 0; i < xf86NumInputDrivers; i++) {
- if (xf86InputDriverList[i] && xf86InputDriverList[i]->driverName &&
- xf86NameCmp(name, xf86InputDriverList[i]->driverName) == 0)
- return xf86InputDriverList[i];
- }
- return NULL;
-}
-
-InputInfoPtr
-xf86LookupInput(const char *name)
-{
- InputInfoPtr p;
-
- for (p = xf86InputDevs; p != NULL; p = p->next) {
- if (strcmp(name, p->name) == 0)
- return p;
- }
-
- return NULL;
-}
-
-/* Allocate a new ScrnInfoRec in xf86Screens */
-
-ScrnInfoPtr
-xf86AllocateScreen(DriverPtr drv, int flags)
-{
- int i;
-
- if (xf86Screens == NULL)
- xf86NumScreens = 0;
-
- i = xf86NumScreens++;
- xf86Screens = xnfrealloc(xf86Screens, xf86NumScreens * sizeof(ScrnInfoPtr));
- xf86Screens[i] = xnfcalloc(sizeof(ScrnInfoRec), 1);
- xf86Screens[i]->scrnIndex = i; /* Changes when a screen is removed */
- xf86Screens[i]->origIndex = i; /* This never changes */
- xf86Screens[i]->privates = xnfcalloc(sizeof(DevUnion),
- xf86ScrnInfoPrivateCount);
- /*
- * EnableDisableFBAccess now gets initialized in InitOutput()
- * xf86Screens[i]->EnableDisableFBAccess = xf86EnableDisableFBAccess;
- */
-
- xf86Screens[i]->drv = drv;
- drv->refCount++;
- xf86Screens[i]->module = DuplicateModule(drv->module, NULL);
-
- xf86Screens[i]->DriverFunc = drv->driverFunc;
-
- return xf86Screens[i];
-}
-
-
-/*
- * Remove an entry from xf86Screens. Ideally it should free all allocated
- * data. To do this properly may require a driver hook.
- */
-
-void
-xf86DeleteScreen(int scrnIndex, int flags)
-{
- ScrnInfoPtr pScrn;
- int i;
-
- /* First check if the screen is valid */
- if (xf86NumScreens == 0 || xf86Screens == NULL)
- return;
-
- if (scrnIndex > xf86NumScreens - 1)
- return;
-
- if (!(pScrn = xf86Screens[scrnIndex]))
- return;
-
- /* If a FreeScreen function is defined, call it here */
- if (pScrn->FreeScreen != NULL)
- pScrn->FreeScreen(scrnIndex, 0);
-
- while (pScrn->modes)
- xf86DeleteMode(&pScrn->modes, pScrn->modes);
-
- while (pScrn->modePool)
- xf86DeleteMode(&pScrn->modePool, pScrn->modePool);
-
- xf86OptionListFree(pScrn->options);
-
- if (pScrn->module)
- UnloadModule(pScrn->module);
-
- if (pScrn->drv)
- pScrn->drv->refCount--;
-
- free(pScrn->privates);
-
- xf86ClearEntityListForScreen(scrnIndex);
-
- free(pScrn);
-
- /* Move the other entries down, updating their scrnIndex fields */
-
- xf86NumScreens--;
-
- for (i = scrnIndex; i < xf86NumScreens; i++) {
- xf86Screens[i] = xf86Screens[i + 1];
- xf86Screens[i]->scrnIndex = i;
- /* Also need to take care of the screen layout settings */
- }
-}
-
-/*
- * Allocate a private in ScrnInfoRec.
- */
-
-int
-xf86AllocateScrnInfoPrivateIndex(void)
-{
- int idx, i;
- ScrnInfoPtr pScr;
- DevUnion *nprivs;
-
- idx = xf86ScrnInfoPrivateCount++;
- for (i = 0; i < xf86NumScreens; i++) {
- pScr = xf86Screens[i];
- nprivs = xnfrealloc(pScr->privates,
- xf86ScrnInfoPrivateCount * sizeof(DevUnion));
- /* Zero the new private */
- memset(&nprivs[idx], 0, sizeof(DevUnion));
- pScr->privates = nprivs;
- }
- return idx;
-}
-
-Bool
-xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad)
-{
- int i;
-
- if (pScrn->numFormats >= MAXFORMATS)
- return FALSE;
-
- if (bpp <= 0) {
- if (depth == 1)
- bpp = 1;
- else if (depth <= 8)
- bpp = 8;
- else if (depth <= 16)
- bpp = 16;
- else if (depth <= 32)
- bpp = 32;
- else
- return FALSE;
- }
- if (pad <= 0)
- pad = BITMAP_SCANLINE_PAD;
-
- i = pScrn->numFormats++;
- pScrn->formats[i].depth = depth;
- pScrn->formats[i].bitsPerPixel = bpp;
- pScrn->formats[i].scanlinePad = pad;
- return TRUE;
-}
-
-/*
- * Set the depth we are using based on (in the following order of preference):
- * - values given on the command line
- * - values given in the config file
- * - values provided by the driver
- * - an overall default when nothing else is given
- *
- * Also find a Display subsection matching the depth/bpp found.
- *
- * Sets the following ScrnInfoRec fields:
- * bitsPerPixel, pixmap24, depth, display, imageByteOrder,
- * bitmapScanlinePad, bitmapScanlineUnit, bitmapBitOrder, numFormats,
- * formats, fbFormat.
- */
-
-/* Can the screen handle 24 bpp pixmaps */
-#define DO_PIX24(f) ((f & Support24bppFb) || \
- ((f & Support32bppFb) && (f & SupportConvert24to32)))
-
-/* Can the screen handle 32 bpp pixmaps */
-#define DO_PIX32(f) ((f & Support32bppFb) || \
- ((f & Support24bppFb) && (f & SupportConvert32to24)))
-
-/* Does the screen prefer 32bpp fb for 24bpp pixmaps */
-#define CHOOSE32FOR24(f) ((f & Support32bppFb) && (f & SupportConvert24to32) \
- && (f & PreferConvert24to32))
-
-/* Does the screen prefer 24bpp fb for 32bpp pixmaps */
-#define CHOOSE24FOR32(f) ((f & Support24bppFb) && (f & SupportConvert32to24) \
- && (f & PreferConvert32to24))
-
-/* Can the screen handle 32bpp pixmaps for 24bpp fb */
-#define DO_PIX32FOR24(f) ((f & Support24bppFb) && (f & SupportConvert32to24))
-
-/* Can the screen handle 24bpp pixmaps for 32bpp fb */
-#define DO_PIX24FOR32(f) ((f & Support32bppFb) && (f & SupportConvert24to32))
-
-#ifndef GLOBAL_DEFAULT_DEPTH
-#define GLOBAL_DEFAULT_DEPTH 24
-#endif
-
-Bool
-xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
- int depth24flags)
-{
- int i;
- DispPtr disp;
- Pix24Flags pix24 = xf86Info.pixmap24;
- Bool nomatch = FALSE;
-
- scrp->bitsPerPixel = -1;
- scrp->depth = -1;
- scrp->pixmap24 = Pix24DontCare;
- scrp->bitsPerPixelFrom = X_DEFAULT;
- scrp->depthFrom = X_DEFAULT;
-
- if (xf86FbBpp > 0) {
- scrp->bitsPerPixel = xf86FbBpp;
- scrp->bitsPerPixelFrom = X_CMDLINE;
- }
-
- if (xf86Depth > 0) {
- scrp->depth = xf86Depth;
- scrp->depthFrom = X_CMDLINE;
- }
-
- if (xf86FbBpp < 0 && xf86Depth < 0) {
- if (scrp->confScreen->defaultfbbpp > 0) {
- scrp->bitsPerPixel = scrp->confScreen->defaultfbbpp;
- scrp->bitsPerPixelFrom = X_CONFIG;
- }
- if (scrp->confScreen->defaultdepth > 0) {
- scrp->depth = scrp->confScreen->defaultdepth;
- scrp->depthFrom = X_CONFIG;
- }
-
- if (scrp->confScreen->defaultfbbpp <= 0 &&
- scrp->confScreen->defaultdepth <= 0) {
- /*
- * Check for DefaultDepth and DefaultFbBpp options in the
- * Device sections.
- */
- int i;
- GDevPtr device;
- Bool found = FALSE;
-
- for (i = 0; i < scrp->numEntities; i++) {
- device = xf86GetDevFromEntity(scrp->entityList[i],
- scrp->entityInstanceList[i]);
- if (device && device->options) {
- if (xf86FindOption(device->options, "DefaultDepth")) {
- scrp->depth = xf86SetIntOption(device->options,
- "DefaultDepth", -1);
- scrp->depthFrom = X_CONFIG;
- found = TRUE;
- }
- if (xf86FindOption(device->options, "DefaultFbBpp")) {
- scrp->bitsPerPixel = xf86SetIntOption(device->options,
- "DefaultFbBpp",
- -1);
- scrp->bitsPerPixelFrom = X_CONFIG;
- found = TRUE;
- }
- }
- if (found)
- break;
- }
- }
- }
-
- /* If none of these is set, pick a default */
- if (scrp->bitsPerPixel < 0 && scrp->depth < 0) {
- if (fbbpp > 0 || depth > 0) {
- if (fbbpp > 0)
- scrp->bitsPerPixel = fbbpp;
- if (depth > 0)
- scrp->depth = depth;
- } else {
- scrp->depth = GLOBAL_DEFAULT_DEPTH;
- }
- }
-
- /* If any are not given, determine a default for the others */
-
- if (scrp->bitsPerPixel < 0) {
- /* The depth must be set */
- if (scrp->depth > -1) {
- if (scrp->depth == 1)
- scrp->bitsPerPixel = 1;
- else if (scrp->depth <= 4)
- scrp->bitsPerPixel = 4;
- else if (scrp->depth <= 8)
- scrp->bitsPerPixel = 8;
- else if (scrp->depth <= 16)
- scrp->bitsPerPixel = 16;
- else if (scrp->depth <= 24) {
- /*
- * Figure out if a choice is possible based on the depth24
- * and pix24 flags.
- */
- /* Check pix24 first */
- if (pix24 != Pix24DontCare) {
- if (pix24 == Pix24Use32) {
- if (DO_PIX32(depth24flags)) {
- if (CHOOSE24FOR32(depth24flags))
- scrp->bitsPerPixel = 24;
- else
- scrp->bitsPerPixel = 32;
- } else {
- nomatch = TRUE;
- }
- } else if (pix24 == Pix24Use24) {
- if (DO_PIX24(depth24flags)) {
- if (CHOOSE32FOR24(depth24flags))
- scrp->bitsPerPixel = 32;
- else
- scrp->bitsPerPixel = 24;
- } else {
- nomatch = TRUE;
- }
- }
- } else {
- if (DO_PIX32(depth24flags)) {
- if (CHOOSE24FOR32(depth24flags))
- scrp->bitsPerPixel = 24;
- else
- scrp->bitsPerPixel = 32;
- } else if (DO_PIX24(depth24flags)) {
- if (CHOOSE32FOR24(depth24flags))
- scrp->bitsPerPixel = 32;
- else
- scrp->bitsPerPixel = 24;
- }
- }
- } else if (scrp->depth <= 32)
- scrp->bitsPerPixel = 32;
- else {
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "Specified depth (%d) is greater than 32\n",
- scrp->depth);
- return FALSE;
- }
- } else {
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "xf86SetDepthBpp: internal error: depth and fbbpp"
- " are both not set\n");
- return FALSE;
- }
- if (scrp->bitsPerPixel < 0) {
- if (nomatch)
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "Driver can't support depth 24 pixmap format (%d)\n",
- PIX24TOBPP(pix24));
- else if ((depth24flags & (Support24bppFb | Support32bppFb)) ==
- NoDepth24Support)
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "Driver can't support depth 24\n");
- else
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "Can't find fbbpp for depth 24\n");
- return FALSE;
- }
- scrp->bitsPerPixelFrom = X_PROBED;
- }
-
- if (scrp->depth <= 0) {
- /* bitsPerPixel is already set */
- switch (scrp->bitsPerPixel) {
- case 32:
- scrp->depth = 24;
- break;
- default:
- /* 1, 4, 8, 16 and 24 */
- scrp->depth = scrp->bitsPerPixel;
- break;
- }
- scrp->depthFrom = X_PROBED;
- }
-
- /* Sanity checks */
- if (scrp->depth < 1 || scrp->depth > 32) {
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "Specified depth (%d) is not in the range 1-32\n",
- scrp->depth);
- return FALSE;
- }
- switch (scrp->bitsPerPixel) {
- case 1:
- case 4:
- case 8:
- case 16:
- case 24:
- case 32:
- break;
- default:
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "Specified fbbpp (%d) is not a permitted value\n",
- scrp->bitsPerPixel);
- return FALSE;
- }
- if (scrp->depth > scrp->bitsPerPixel) {
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "Specified depth (%d) is greater than the fbbpp (%d)\n",
- scrp->depth, scrp->bitsPerPixel);
- return FALSE;
- }
-
- /* set scrp->pixmap24 if the driver isn't flexible */
- if (scrp->bitsPerPixel == 24 && !DO_PIX32FOR24(depth24flags)) {
- scrp->pixmap24 = Pix24Use24;
- }
- if (scrp->bitsPerPixel == 32 && !DO_PIX24FOR32(depth24flags)) {
- scrp->pixmap24 = Pix24Use32;
- }
-
- /*
- * Find the Display subsection matching the depth/fbbpp and initialise
- * scrp->display with it.
- */
- for (i = 0, disp = scrp->confScreen->displays;
- i < scrp->confScreen->numdisplays; i++, disp++) {
- if ((disp->depth == scrp->depth && disp->fbbpp == scrp->bitsPerPixel)
- || (disp->depth == scrp->depth && disp->fbbpp <= 0)
- || (disp->fbbpp == scrp->bitsPerPixel && disp->depth <= 0)) {
- scrp->display = disp;
- break;
- }
- }
-
- /*
- * If an exact match can't be found, see if there is one with no
- * depth or fbbpp specified.
- */
- if (i == scrp->confScreen->numdisplays) {
- for (i = 0, disp = scrp->confScreen->displays;
- i < scrp->confScreen->numdisplays; i++, disp++) {
- if (disp->depth <= 0 && disp->fbbpp <= 0) {
- scrp->display = disp;
- break;
- }
- }
- }
-
- /*
- * If all else fails, create a default one.
- */
- if (i == scrp->confScreen->numdisplays) {
- scrp->confScreen->numdisplays++;
- scrp->confScreen->displays =
- xnfrealloc(scrp->confScreen->displays,
- scrp->confScreen->numdisplays * sizeof(DispRec));
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Creating default Display subsection in Screen section\n"
- "\t\"%s\" for depth/fbbpp %d/%d\n",
- scrp->confScreen->id, scrp->depth, scrp->bitsPerPixel);
- memset(&scrp->confScreen->displays[i], 0, sizeof(DispRec));
- scrp->confScreen->displays[i].blackColour.red = -1;
- scrp->confScreen->displays[i].blackColour.green = -1;
- scrp->confScreen->displays[i].blackColour.blue = -1;
- scrp->confScreen->displays[i].whiteColour.red = -1;
- scrp->confScreen->displays[i].whiteColour.green = -1;
- scrp->confScreen->displays[i].whiteColour.blue = -1;
- scrp->confScreen->displays[i].defaultVisual = -1;
- scrp->confScreen->displays[i].modes = xnfalloc(sizeof(char *));
- scrp->confScreen->displays[i].modes[0] = NULL;
- scrp->confScreen->displays[i].depth = depth;
- scrp->confScreen->displays[i].fbbpp = fbbpp;
- scrp->display = &scrp->confScreen->displays[i];
- }
-
- /*
- * Setup defaults for the display-wide attributes the framebuffer will
- * need. These defaults should eventually be set globally, and not
- * dependent on the screens.
- */
- scrp->imageByteOrder = IMAGE_BYTE_ORDER;
- scrp->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
- if (scrp->depth < 8) {
- /* Planar modes need these settings */
- scrp->bitmapScanlineUnit = 8;
- scrp->bitmapBitOrder = MSBFirst;
- } else {
- scrp->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
- scrp->bitmapBitOrder = BITMAP_BIT_ORDER;
- }
-
- /*
- * If an unusual depth is required, add it to scrp->formats. The formats
- * for the common depths are handled globally in InitOutput
- */
- switch (scrp->depth) {
- case 1:
- case 4:
- case 8:
- case 15:
- case 16:
- case 24:
- /* Common depths. Nothing to do for them */
- break;
- default:
- if (!xf86AddPixFormat(scrp, scrp->depth, 0, 0)) {
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "Can't add pixmap format for depth %d\n", scrp->depth);
- return FALSE;
- }
- }
-
- /* Initialise the framebuffer format for this screen */
- scrp->fbFormat.depth = scrp->depth;
- scrp->fbFormat.bitsPerPixel = scrp->bitsPerPixel;
- scrp->fbFormat.scanlinePad = BITMAP_SCANLINE_PAD;
-
- return TRUE;
-}
-
-/*
- * Print out the selected depth and bpp.
- */
-void
-xf86PrintDepthBpp(ScrnInfoPtr scrp)
-{
- xf86DrvMsg(scrp->scrnIndex, scrp->depthFrom, "Depth %d, ", scrp->depth);
- xf86Msg(scrp->bitsPerPixelFrom, "framebuffer bpp %d\n", scrp->bitsPerPixel);
-}
-
-/*
- * xf86SetWeight sets scrp->weight, scrp->mask, scrp->offset, and for depths
- * greater than MAX_PSEUDO_DEPTH also scrp->rgbBits.
- */
-Bool
-xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask)
-{
- MessageType weightFrom = X_DEFAULT;
-
- scrp->weight.red = 0;
- scrp->weight.green = 0;
- scrp->weight.blue = 0;
-
- if (xf86Weight.red > 0 && xf86Weight.green > 0 && xf86Weight.blue > 0) {
- scrp->weight = xf86Weight;
- weightFrom = X_CMDLINE;
- } else if (scrp->display->weight.red > 0 && scrp->display->weight.green > 0
- && scrp->display->weight.blue > 0) {
- scrp->weight = scrp->display->weight;
- weightFrom = X_CONFIG;
- } else if (weight.red > 0 && weight.green > 0 && weight.blue > 0) {
- scrp->weight = weight;
- } else {
- switch (scrp->depth) {
- case 1:
- case 4:
- case 8:
- scrp->weight.red = scrp->weight.green =
- scrp->weight.blue = scrp->rgbBits;
- break;
- case 15:
- scrp->weight.red = scrp->weight.green = scrp->weight.blue = 5;
- break;
- case 16:
- scrp->weight.red = scrp->weight.blue = 5;
- scrp->weight.green = 6;
- break;
- case 18:
- scrp->weight.red = scrp->weight.green = scrp->weight.blue = 6;
- break;
- case 24:
- scrp->weight.red = scrp->weight.green = scrp->weight.blue = 8;
- break;
- case 30:
- scrp->weight.red = scrp->weight.green = scrp->weight.blue = 10;
- break;
- }
- }
-
- if (scrp->weight.red)
- xf86DrvMsg(scrp->scrnIndex, weightFrom, "RGB weight %d%d%d\n",
- (int)scrp->weight.red, (int)scrp->weight.green,
- (int)scrp->weight.blue);
-
- if (scrp->depth > MAX_PSEUDO_DEPTH &&
- (scrp->depth != scrp->weight.red + scrp->weight.green +
- scrp->weight.blue)) {
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "Weight given (%d%d%d) is inconsistent with the "
- "depth (%d)\n",
- (int)scrp->weight.red, (int)scrp->weight.green,
- (int)scrp->weight.blue, scrp->depth);
- return FALSE;
- }
- if (scrp->depth > MAX_PSEUDO_DEPTH && scrp->weight.red) {
- /*
- * XXX Does this even mean anything for TrueColor visuals?
- * If not, we shouldn't even be setting it here. However, this
- * matches the behaviour of 3.x versions of XFree86.
- */
- scrp->rgbBits = scrp->weight.red;
- if (scrp->weight.green > scrp->rgbBits)
- scrp->rgbBits = scrp->weight.green;
- if (scrp->weight.blue > scrp->rgbBits)
- scrp->rgbBits = scrp->weight.blue;
- }
-
- /* Set the mask and offsets */
- if (mask.red == 0 || mask.green == 0 || mask.blue == 0) {
- /* Default to a setting common to PC hardware */
- scrp->offset.red = scrp->weight.green + scrp->weight.blue;
- scrp->offset.green = scrp->weight.blue;
- scrp->offset.blue = 0;
- scrp->mask.red = ((1 << scrp->weight.red) - 1) << scrp->offset.red;
- scrp->mask.green = ((1 << scrp->weight.green) - 1)
- << scrp->offset.green;
- scrp->mask.blue = (1 << scrp->weight.blue) - 1;
- } else {
- /* Initialise to the values passed */
- scrp->mask.red = mask.red;
- scrp->mask.green = mask.green;
- scrp->mask.blue = mask.blue;
- scrp->offset.red = ffs(mask.red);
- scrp->offset.green = ffs(mask.green);
- scrp->offset.blue = ffs(mask.blue);
- }
- return TRUE;
-}
-
-Bool
-xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual)
-{
- MessageType visualFrom = X_DEFAULT;
-
- if (defaultColorVisualClass >= 0) {
- scrp->defaultVisual = defaultColorVisualClass;
- visualFrom = X_CMDLINE;
- } else if (scrp->display->defaultVisual >= 0) {
- scrp->defaultVisual = scrp->display->defaultVisual;
- visualFrom = X_CONFIG;
- } else if (visual >= 0) {
- scrp->defaultVisual = visual;
- } else {
- if (scrp->depth == 1)
- scrp->defaultVisual = StaticGray;
- else if (scrp->depth == 4)
- scrp->defaultVisual = StaticColor;
- else if (scrp->depth <= MAX_PSEUDO_DEPTH)
- scrp->defaultVisual = PseudoColor;
- else
- scrp->defaultVisual = TrueColor;
- }
- switch (scrp->defaultVisual) {
- case StaticGray:
- case GrayScale:
- case StaticColor:
- case PseudoColor:
- case TrueColor:
- case DirectColor:
- xf86DrvMsg(scrp->scrnIndex, visualFrom, "Default visual is %s\n",
- xf86VisualNames[scrp->defaultVisual]);
- return TRUE;
- default:
-
- xf86DrvMsg(scrp->scrnIndex, X_ERROR,
- "Invalid default visual class (%d)\n", scrp->defaultVisual);
- return FALSE;
- }
-}
-
-#define TEST_GAMMA(g) \
- (g).red > GAMMA_ZERO || (g).green > GAMMA_ZERO || (g).blue > GAMMA_ZERO
-
-#define SET_GAMMA(g) \
- (g) > GAMMA_ZERO ? (g) : 1.0
-
-Bool
-xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma)
-{
- MessageType from = X_DEFAULT;
-#if 0
- xf86MonPtr DDC = (xf86MonPtr)(scrp->monitor->DDC);
-#endif
- if (TEST_GAMMA(xf86Gamma)) {
- from = X_CMDLINE;
- scrp->gamma.red = SET_GAMMA(xf86Gamma.red);
- scrp->gamma.green = SET_GAMMA(xf86Gamma.green);
- scrp->gamma.blue = SET_GAMMA(xf86Gamma.blue);
- } else if (TEST_GAMMA(scrp->monitor->gamma)) {
- from = X_CONFIG;
- scrp->gamma.red = SET_GAMMA(scrp->monitor->gamma.red);
- scrp->gamma.green = SET_GAMMA(scrp->monitor->gamma.green);
- scrp->gamma.blue = SET_GAMMA(scrp->monitor->gamma.blue);
-#if 0
- } else if ( DDC && DDC->features.gamma > GAMMA_ZERO ) {
- from = X_PROBED;
- scrp->gamma.red = SET_GAMMA(DDC->features.gamma);
- scrp->gamma.green = SET_GAMMA(DDC->features.gamma);
- scrp->gamma.blue = SET_GAMMA(DDC->features.gamma);
- /* EDID structure version 2 gives optional seperate red, green & blue gamma values
- * in bytes 0x57-0x59 */
-#endif
- } else if (TEST_GAMMA(gamma)) {
- scrp->gamma.red = SET_GAMMA(gamma.red);
- scrp->gamma.green = SET_GAMMA(gamma.green);
- scrp->gamma.blue = SET_GAMMA(gamma.blue);
- } else {
- scrp->gamma.red = 1.0;
- scrp->gamma.green = 1.0;
- scrp->gamma.blue = 1.0;
- }
- /* Pretend we succeeded if we support better a gamma system.
- * This avoids a confusing message.
- */
- if (xf86_crtc_supports_gamma(scrp))
- return TRUE;
- xf86DrvMsg(scrp->scrnIndex, from,
- "Using gamma correction (%.1f, %.1f, %.1f)\n",
- scrp->gamma.red, scrp->gamma.green, scrp->gamma.blue);
-
- return TRUE;
-}
-
-#undef TEST_GAMMA
-#undef SET_GAMMA
-
-
-/*
- * Set the DPI from the command line option. XXX should allow it to be
- * calculated from the widthmm/heightmm values.
- */
-
-#undef MMPERINCH
-#define MMPERINCH 25.4
-
-void
-xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
-{
- MessageType from = X_DEFAULT;
- xf86MonPtr DDC = (xf86MonPtr)(pScrn->monitor->DDC);
- int ddcWidthmm, ddcHeightmm;
- int widthErr, heightErr;
-
- /* XXX Maybe there is no need for widthmm/heightmm in ScrnInfoRec */
- pScrn->widthmm = pScrn->monitor->widthmm;
- pScrn->heightmm = pScrn->monitor->heightmm;
-
- if (DDC && (DDC->features.hsize > 0 && DDC->features.vsize > 0) ) {
- /* DDC gives display size in mm for individual modes,
- * but cm for monitor
- */
- ddcWidthmm = DDC->features.hsize * 10; /* 10mm in 1cm */
- ddcHeightmm = DDC->features.vsize * 10; /* 10mm in 1cm */
- } else {
- ddcWidthmm = ddcHeightmm = 0;
- }
-
- if (monitorResolution > 0) {
- pScrn->xDpi = monitorResolution;
- pScrn->yDpi = monitorResolution;
- from = X_CMDLINE;
- } else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) {
- from = X_CONFIG;
- if (pScrn->widthmm > 0) {
- pScrn->xDpi =
- (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
- }
- if (pScrn->heightmm > 0) {
- pScrn->yDpi =
- (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
- }
- if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
- pScrn->yDpi = pScrn->xDpi;
- if (pScrn->yDpi > 0 && pScrn->xDpi <= 0)
- pScrn->xDpi = pScrn->yDpi;
- xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n",
- pScrn->widthmm, pScrn->heightmm);
-
- /* Warn if config and probe disagree about display size */
- if ( ddcWidthmm && ddcHeightmm ) {
- if (pScrn->widthmm > 0) {
- widthErr = abs(ddcWidthmm - pScrn->widthmm);
- } else {
- widthErr = 0;
- }
- if (pScrn->heightmm > 0) {
- heightErr = abs(ddcHeightmm - pScrn->heightmm);
- } else {
- heightErr = 0;
- }
- if (widthErr>10 || heightErr>10) {
- /* Should include config file name for monitor here */
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Probed monitor is %dx%d mm, using Displaysize %dx%d mm\n",
- ddcWidthmm,ddcHeightmm, pScrn->widthmm,pScrn->heightmm);
- }
- }
- } else if ( ddcWidthmm && ddcHeightmm ) {
- from = X_PROBED;
- xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n",
- ddcWidthmm, ddcHeightmm );
- pScrn->widthmm = ddcWidthmm;
- pScrn->heightmm = ddcHeightmm;
- if (pScrn->widthmm > 0) {
- pScrn->xDpi =
- (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
- }
- if (pScrn->heightmm > 0) {
- pScrn->yDpi =
- (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
- }
- if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
- pScrn->yDpi = pScrn->xDpi;
- if (pScrn->yDpi > 0 && pScrn->xDpi <= 0)
- pScrn->xDpi = pScrn->yDpi;
- } else {
- if (x > 0)
- pScrn->xDpi = x;
- else
- pScrn->xDpi = DEFAULT_DPI;
- if (y > 0)
- pScrn->yDpi = y;
- else
- pScrn->yDpi = DEFAULT_DPI;
- }
- xf86DrvMsg(pScrn->scrnIndex, from, "DPI set to (%d, %d)\n",
- pScrn->xDpi, pScrn->yDpi);
-}
-
-#undef MMPERINCH
-
-
-void
-xf86SetBlackWhitePixels(ScreenPtr pScreen)
-{
- if (xf86FlipPixels) {
- pScreen->whitePixel = 0;
- pScreen->blackPixel = 1;
- } else {
- pScreen->whitePixel = 1;
- pScreen->blackPixel = 0;
- }
-}
-
-/*
- * xf86SetRootClip --
- * Enable or disable rendering to the screen by
- * setting the root clip list and revalidating
- * all of the windows
- */
-
-static void
-xf86SetRootClip (ScreenPtr pScreen, Bool enable)
-{
- WindowPtr pWin = pScreen->root;
- WindowPtr pChild;
- Bool WasViewable = (Bool)(pWin->viewable);
- Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
- BoxRec box;
-
- if (WasViewable)
- {
- for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
- {
- (void) (*pScreen->MarkOverlappedWindows)(pChild,
- pChild,
- &pLayerWin);
- }
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- if (pWin->valdata)
- {
- if (HasBorder (pWin))
- {
- RegionPtr borderVisible;
-
- borderVisible = RegionCreate(NullBox, 1);
- RegionSubtract(borderVisible,
- &pWin->borderClip, &pWin->winSize);
- pWin->valdata->before.borderVisible = borderVisible;
- }
- pWin->valdata->before.resized = TRUE;
- }
- }
-
- /*
- * Use REGION_BREAK to avoid optimizations in ValidateTree
- * that assume the root borderClip can't change well, normally
- * it doesn't...)
- */
- if (enable)
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pScreen->width;
- box.y2 = pScreen->height;
- RegionInit(&pWin->winSize, &box, 1);
- RegionInit(&pWin->borderSize, &box, 1);
- if (WasViewable)
- RegionReset(&pWin->borderClip, &box);
- pWin->drawable.width = pScreen->width;
- pWin->drawable.height = pScreen->height;
- RegionBreak(&pWin->clipList);
- }
- else
- {
- RegionEmpty(&pWin->borderClip);
- RegionBreak(&pWin->clipList);
- }
-
- ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
-
- if (WasViewable)
- {
- if (pWin->firstChild)
- {
- anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
- pWin->firstChild,
- (WindowPtr *)NULL);
- }
- else
- {
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- }
-
-
- if (anyMarked)
- (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
- }
-
- if (WasViewable)
- {
- if (anyMarked)
- (*pScreen->HandleExposures)(pWin);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
- }
- if (pWin->realized)
- WindowsRestructured ();
- FlushAllOutput ();
-}
-
-/*
- * Function to enable/disable access to the frame buffer
- *
- * This is used when VT switching and when entering/leaving DGA direct mode.
- *
- * This has been rewritten again to eliminate the saved pixmap. The
- * devPrivate field in the screen pixmap is set to NULL to catch code
- * accidentally referencing the frame buffer while the X server is not
- * supposed to touch it.
- *
- * Here, we exchange the pixmap private data, rather than the pixmaps
- * themselves to avoid having to find and change any references to the screen
- * pixmap such as GC's, window privates etc. This also means that this code
- * does not need to know exactly how the pixmap pixels are accessed. Further,
- * this exchange is >not< done through the screen's ModifyPixmapHeader()
- * vector. This means the called frame buffer code layers can determine
- * whether they are switched in or out by keeping track of the root pixmap's
- * private data, and therefore don't need to access pScrnInfo->vtSema.
- */
-void
-xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
-{
- ScrnInfoPtr pScrnInfo = xf86Screens[scrnIndex];
- ScreenPtr pScreen = pScrnInfo->pScreen;
- PixmapPtr pspix;
-
- pspix = (*pScreen->GetScreenPixmap) (pScreen);
- if (enable)
- {
- /*
- * Restore all of the clip lists on the screen
- */
- if (!xf86Resetting)
- xf86SetRootClip (pScreen, TRUE);
-
- }
- else
- {
- /*
- * Empty all of the clip lists on the screen
- */
- xf86SetRootClip (pScreen, FALSE);
- }
-}
-
-/* Print driver messages in the standard format */
-
-#undef PREFIX_SIZE
-#define PREFIX_SIZE 14
-
-void
-xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format,
- va_list args)
-{
- char *tmpFormat;
-
- /* Prefix the scrnIndex name to the format string. */
- if (scrnIndex >= 0 && scrnIndex < xf86NumScreens &&
- xf86Screens[scrnIndex]->name) {
- tmpFormat = malloc(strlen(format) +
- strlen(xf86Screens[scrnIndex]->name) +
- PREFIX_SIZE + 1);
- if (!tmpFormat)
- return;
-
- snprintf(tmpFormat, PREFIX_SIZE + 1, "%s(%d): ",
- xf86Screens[scrnIndex]->name, scrnIndex);
-
- strcat(tmpFormat, format);
- LogVMessageVerb(type, verb, tmpFormat, args);
- free(tmpFormat);
- } else
- LogVMessageVerb(type, verb, format, args);
-}
-#undef PREFIX_SIZE
-
-/* Print driver messages, with verbose level specified directly */
-void
-xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format,
- ...)
-{
- va_list ap;
-
- va_start(ap, format);
- xf86VDrvMsgVerb(scrnIndex, type, verb, format, ap);
- va_end(ap);
-}
-
-/* Print driver messages, with verbose level of 1 (default) */
-void
-xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- xf86VDrvMsgVerb(scrnIndex, type, 1, format, ap);
- va_end(ap);
-}
-
-/* Print input driver messages in the standard format of
- <driver>: <device name>: <message> */
-void
-xf86VIDrvMsgVerb(InputInfoPtr dev, MessageType type, int verb, const char *format,
- va_list args)
-{
- char *msg;
-
- if (asprintf(&msg, "%s: %s: %s", dev->drv->driverName, dev->name, format)
- == -1) {
- LogVMessageVerb(type, verb, "%s", args);
- } else {
- LogVMessageVerb(type, verb, msg, args);
- free(msg);
- }
-}
-
-/* Print input driver message, with verbose level specified directly */
-void
-xf86IDrvMsgVerb(InputInfoPtr dev, MessageType type, int verb, const char *format,
- ...)
-{
- va_list ap;
-
- va_start(ap, format);
- xf86VIDrvMsgVerb(dev, type, verb, format, ap);
- va_end(ap);
-}
-
-/* Print input driver messages, with verbose level of 1 (default) */
-void
-xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- xf86VIDrvMsgVerb(dev, type, 1, format, ap);
- va_end(ap);
-}
-
-
-/* Print non-driver messages with verbose level specified directly */
-void
-xf86MsgVerb(MessageType type, int verb, const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVMessageVerb(type, verb, format, ap);
- va_end(ap);
-}
-
-/* Print non-driver messages with verbose level of 1 (default) */
-void
-xf86Msg(MessageType type, const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVMessageVerb(type, 1, format, ap);
- va_end(ap);
-}
-
-/* Just like ErrorF, but with the verbose level checked */
-void
-xf86ErrorFVerb(int verb, const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- if (xf86Verbose >= verb || xf86LogVerbose >= verb)
- LogVWrite(verb, format, ap);
- va_end(ap);
-}
-
-/* Like xf86ErrorFVerb, but with an implied verbose level of 1 */
-void
-xf86ErrorF(const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- if (xf86Verbose >= 1 || xf86LogVerbose >= 1)
- LogVWrite(1, format, ap);
- va_end(ap);
-}
-
-
-void
-xf86LogInit(void)
-{
- char *lf = NULL;
-
-#define LOGSUFFIX ".log"
-#define LOGOLDSUFFIX ".old"
-
- /* Get the log file name */
- if (xf86LogFileFrom == X_DEFAULT) {
- /* Append the display number and ".log" */
- if (asprintf(&lf, "%s%%s" LOGSUFFIX, xf86LogFile) == -1)
- FatalError("Cannot allocate space for the log file name\n");
- xf86LogFile = lf;
- }
-
- xf86LogFile = LogInit(xf86LogFile, LOGOLDSUFFIX);
- xf86LogFileWasOpened = TRUE;
-
- xf86SetVerbosity(xf86Verbose);
- xf86SetLogVerbosity(xf86LogVerbose);
-
-#undef LOGSUFFIX
-#undef LOGOLDSUFFIX
-
- free(lf);
-}
-
-void
-xf86CloseLog(void)
-{
- LogClose();
-}
-
-
-/*
- * Drivers can use these for using their own SymTabRecs.
- */
-
-const char *
-xf86TokenToString(SymTabPtr table, int token)
-{
- int i;
-
- for (i = 0; table[i].token >= 0 && table[i].token != token; i++)
- ;
-
- if (table[i].token < 0)
- return NULL;
- else
- return table[i].name;
-}
-
-int
-xf86StringToToken(SymTabPtr table, const char *string)
-{
- int i;
-
- if (string == NULL)
- return -1;
-
- for (i = 0; table[i].token >= 0 && xf86NameCmp(string, table[i].name); i++)
- ;
-
- return table[i].token;
-}
-
-/*
- * helper to display the clocks found on a card
- */
-void
-xf86ShowClocks(ScrnInfoPtr scrp, MessageType from)
-{
- int j;
-
- xf86DrvMsg(scrp->scrnIndex, from, "Pixel clocks available:");
- for (j=0; j < scrp->numClocks; j++) {
- if ((j % 4) == 0) {
- xf86ErrorF("\n");
- xf86DrvMsg(scrp->scrnIndex, from, "pixel clocks:");
- }
- xf86ErrorF(" %7.3f", (double)scrp->clock[j] / 1000.0);
- }
- xf86ErrorF("\n");
-}
-
-
-/*
- * This prints out the driver identify message, including the names of
- * the supported chipsets.
- *
- * XXX This makes assumptions about the line width, etc. Maybe we could
- * use a more general "pretty print" function for messages.
- */
-void
-xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips)
-{
- int len, i;
-
- len = 6 + strlen(drvname) + 2 + strlen(drvmsg) + 2;
- xf86Msg(X_INFO, "%s: %s:", drvname, drvmsg);
- for (i = 0; chips[i].name != NULL; i++) {
- if (i != 0) {
- xf86ErrorF(",");
- len++;
- }
- if (len + 2 + strlen(chips[i].name) < 78) {
- xf86ErrorF(" ");
- len++;
- } else {
- xf86ErrorF("\n\t");
- len = 8;
- }
- xf86ErrorF("%s", chips[i].name);
- len += strlen(chips[i].name);
- }
- xf86ErrorF("\n");
-}
-
-
-int
-xf86MatchDevice(const char *drivername, GDevPtr **sectlist)
-{
- GDevPtr gdp, *pgdp = NULL;
- confScreenPtr screensecptr;
- int i,j;
-
- if (sectlist)
- *sectlist = NULL;
-
- /*
- * This can happen when running Xorg -showopts and a module like ati
- * or vmware tries to load its submodules when xf86ConfigLayout is empty
- */
- if (!xf86ConfigLayout.screens)
- return 0;
-
- /*
- * This is a very important function that matches the device sections
- * as they show up in the config file with the drivers that the server
- * loads at run time.
- *
- * ChipProbe can call
- * int xf86MatchDevice(char * drivername, GDevPtr ** sectlist)
- * with its driver name. The function allocates an array of GDevPtr and
- * returns this via sectlist and returns the number of elements in
- * this list as return value. 0 means none found, -1 means fatal error.
- *
- * It can figure out which of the Device sections to use for which card
- * (using things like the Card statement, etc). For single headed servers
- * there will of course be just one such Device section.
- */
- i = 0;
-
- /*
- * first we need to loop over all the Screens sections to get to all
- * 'active' device sections
- */
- for (j=0; xf86ConfigLayout.screens[j].screen != NULL; j++) {
- screensecptr = xf86ConfigLayout.screens[j].screen;
- if ((screensecptr->device->driver != NULL)
- && (xf86NameCmp( screensecptr->device->driver,drivername) == 0)
- && (! screensecptr->device->claimed)) {
- /*
- * we have a matching driver that wasn't claimed, yet
- */
- pgdp = xnfrealloc(pgdp, (i + 2) * sizeof(GDevPtr));
- pgdp[i++] = screensecptr->device;
- }
- }
-
- /* Then handle the inactive devices */
- j = 0;
- while (xf86ConfigLayout.inactives[j].identifier) {
- gdp = &xf86ConfigLayout.inactives[j];
- if (gdp->driver && !gdp->claimed &&
- !xf86NameCmp(gdp->driver,drivername)) {
- /* we have a matching driver that wasn't claimed yet */
- pgdp = xnfrealloc(pgdp, (i + 2) * sizeof(GDevPtr));
- pgdp[i++] = gdp;
- }
- j++;
- }
-
- /*
- * make the array NULL terminated and return its address
- */
- if (i)
- pgdp[i] = NULL;
-
- if (sectlist)
- *sectlist = pgdp;
- else
- free(pgdp);
- return i;
-}
-
-/*
- * xf86GetClocks -- get the dot-clocks via a BIG BAD hack ...
- */
-void
-xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int),
- void (*ProtectRegs)(ScrnInfoPtr, Bool),
- void (*BlankScreen)(ScrnInfoPtr, Bool), IOADDRESS vertsyncreg,
- int maskval, int knownclkindex, int knownclkvalue)
-{
- register int status = vertsyncreg;
- unsigned long i, cnt, rcnt, sync;
-
- /* First save registers that get written on */
- (*ClockFunc)(pScrn, CLK_REG_SAVE);
-
- if (num > MAXCLOCKS)
- num = MAXCLOCKS;
-
- for (i = 0; i < num; i++)
- {
- if (ProtectRegs)
- (*ProtectRegs)(pScrn, TRUE);
- if (!(*ClockFunc)(pScrn, i))
- {
- pScrn->clock[i] = -1;
- continue;
- }
- if (ProtectRegs)
- (*ProtectRegs)(pScrn, FALSE);
- if (BlankScreen)
- (*BlankScreen)(pScrn, FALSE);
-
- usleep(50000); /* let VCO stabilise */
-
- cnt = 0;
- sync = 200000;
-
- while ((inb(status) & maskval) == 0x00)
- if (sync-- == 0) goto finish;
- /* Something appears to be happening, so reset sync count */
- sync = 200000;
- while ((inb(status) & maskval) == maskval)
- if (sync-- == 0) goto finish;
- /* Something appears to be happening, so reset sync count */
- sync = 200000;
- while ((inb(status) & maskval) == 0x00)
- if (sync-- == 0) goto finish;
-
- for (rcnt = 0; rcnt < 5; rcnt++)
- {
- while (!(inb(status) & maskval))
- cnt++;
- while ((inb(status) & maskval))
- cnt++;
- }
-
-finish:
- pScrn->clock[i] = cnt ? cnt : -1;
- if (BlankScreen)
- (*BlankScreen)(pScrn, TRUE);
- }
-
- for (i = 0; i < num; i++)
- {
- if (i != knownclkindex)
- {
- if (pScrn->clock[i] == -1)
- {
- pScrn->clock[i] = 0;
- }
- else
- {
- pScrn->clock[i] = (int)(0.5 +
- (((float)knownclkvalue) * pScrn->clock[knownclkindex]) /
- (pScrn->clock[i]));
- /* Round to nearest 10KHz */
- pScrn->clock[i] += 5;
- pScrn->clock[i] /= 10;
- pScrn->clock[i] *= 10;
- }
- }
- }
-
- pScrn->clock[knownclkindex] = knownclkvalue;
- pScrn->numClocks = num;
-
- /* Restore registers that were written on */
- (*ClockFunc)(pScrn, CLK_REG_RESTORE);
-}
-
-const char *
-xf86GetVisualName(int visual)
-{
- if (visual < 0 || visual > DirectColor)
- return NULL;
-
- return xf86VisualNames[visual];
-}
-
-
-int
-xf86GetVerbosity(void)
-{
- return max(xf86Verbose, xf86LogVerbose);
-}
-
-Pix24Flags
-xf86GetPix24(void)
-{
- return xf86Info.pixmap24;
-}
-
-
-int
-xf86GetDepth(void)
-{
- return xf86Depth;
-}
-
-
-rgb
-xf86GetWeight(void)
-{
- return xf86Weight;
-}
-
-
-Gamma
-xf86GetGamma(void)
-{
- return xf86Gamma;
-}
-
-
-Bool
-xf86GetFlipPixels(void)
-{
- return xf86FlipPixels;
-}
-
-
-const char *
-xf86GetServerName(void)
-{
- return xf86ServerName;
-}
-
-
-Bool
-xf86ServerIsExiting(void)
-{
- return (dispatchException & DE_TERMINATE) == DE_TERMINATE;
-}
-
-
-Bool
-xf86ServerIsResetting(void)
-{
- return xf86Resetting;
-}
-
-
-Bool
-xf86ServerIsInitialising(void)
-{
- return xf86Initialising;
-}
-
-
-Bool
-xf86ServerIsOnlyDetecting(void)
-{
- return xf86DoConfigure;
-}
-
-
-Bool
-xf86CaughtSignal(void)
-{
- return xf86Info.caughtSignal;
-}
-
-
-Bool
-xf86GetVidModeAllowNonLocal(void)
-{
- return xf86Info.vidModeAllowNonLocal;
-}
-
-
-Bool
-xf86GetVidModeEnabled(void)
-{
- return xf86Info.vidModeEnabled;
-}
-
-Bool
-xf86GetModInDevAllowNonLocal(void)
-{
- return xf86Info.miscModInDevAllowNonLocal;
-}
-
-
-Bool
-xf86GetModInDevEnabled(void)
-{
- return xf86Info.miscModInDevEnabled;
-}
-
-
-Bool
-xf86GetAllowMouseOpenFail(void)
-{
- return xf86Info.allowMouseOpenFail;
-}
-
-
-Bool
-xf86IsPc98(void)
-{
-#if SUPPORT_PC98
- return xf86Info.pc98;
-#else
- return FALSE;
-#endif
-}
-
-void
-xf86DisableRandR(void)
-{
- xf86Info.disableRandR = TRUE;
- xf86Info.randRFrom = X_PROBED;
-}
-
-CARD32
-xf86GetModuleVersion(pointer module)
-{
- return (CARD32)LoaderGetModuleVersion(module);
-}
-
-pointer
-xf86LoadDrvSubModule(DriverPtr drv, const char *name)
-{
- pointer ret;
- int errmaj = 0, errmin = 0;
-
- ret = LoadSubModule(drv->module, name, NULL, NULL, NULL, NULL,
- &errmaj, &errmin);
- if (!ret)
- LoaderErrorMsg(NULL, name, errmaj, errmin);
- return ret;
-}
-
-pointer
-xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name)
-{
- pointer ret;
- int errmaj = 0, errmin = 0;
-
- ret = LoadSubModule(pScrn->module, name, NULL, NULL, NULL, NULL,
- &errmaj, &errmin);
- if (!ret)
- LoaderErrorMsg(pScrn->name, name, errmaj, errmin);
- return ret;
-}
-
-/*
- * xf86LoadOneModule loads a single module.
- */
-pointer
-xf86LoadOneModule(char *name, pointer opt)
-{
- int errmaj, errmin;
- char *Name;
- pointer mod;
-
- if (!name)
- return NULL;
-
- /* Normalise the module name */
- Name = xf86NormalizeName(name);
-
- /* Skip empty names */
- if (Name == NULL)
- return NULL;
- if (*Name == '\0') {
- free(Name);
- return NULL;
- }
-
- mod = LoadModule(Name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin);
- if (!mod)
- LoaderErrorMsg(NULL, Name, errmaj, errmin);
- free(Name);
- return mod;
-}
-
-void
-xf86UnloadSubModule(pointer mod)
-{
- /*
- * This is disabled for now. The loader isn't smart enough yet to undo
- * relocations.
- */
-#if 0
- UnloadSubModule(mod);
-#endif
-}
-
-Bool
-xf86LoaderCheckSymbol(const char *name)
-{
- return LoaderSymbol(name) != NULL;
-}
-
-typedef enum {
- OPTION_BACKING_STORE
-} BSOpts;
-
-static const OptionInfoRec BSOptions[] = {
- { OPTION_BACKING_STORE, "BackingStore", OPTV_BOOLEAN, {0}, FALSE },
- { -1, NULL, OPTV_NONE, {0}, FALSE }
-};
-
-void
-xf86SetBackingStore(ScreenPtr pScreen)
-{
- Bool useBS = FALSE;
- MessageType from = X_DEFAULT;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- OptionInfoPtr options;
-
- options = xnfalloc(sizeof(BSOptions));
- (void)memcpy(options, BSOptions, sizeof(BSOptions));
- xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options);
-
- /* check for commandline option here */
- if (xf86bsEnableFlag) {
- from = X_CMDLINE;
- useBS = TRUE;
- } else if (xf86bsDisableFlag) {
- from = X_CMDLINE;
- useBS = FALSE;
- } else {
- if (xf86GetOptValBool(options, OPTION_BACKING_STORE, &useBS))
- from = X_CONFIG;
- }
- free(options);
- pScreen->backingStoreSupport = useBS ? Always : NotUseful;
- if (serverGeneration == 1)
- xf86DrvMsg(pScreen->myNum, from, "Backing store %s\n",
- useBS ? "enabled" : "disabled");
-}
-
-
-typedef enum {
- OPTION_SILKEN_MOUSE
-} SMOpts;
-
-static const OptionInfoRec SMOptions[] = {
- { OPTION_SILKEN_MOUSE, "SilkenMouse", OPTV_BOOLEAN, {0}, FALSE },
- { -1, NULL, OPTV_NONE, {0}, FALSE }
-};
-
-void
-xf86SetSilkenMouse (ScreenPtr pScreen)
-{
- Bool useSM = TRUE;
- MessageType from = X_DEFAULT;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- OptionInfoPtr options;
-
- options = xnfalloc(sizeof(SMOptions));
- (void)memcpy(options, SMOptions, sizeof(SMOptions));
- xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options);
-
- /* check for commandline option here */
- /* disable if screen shares resources */
- /* TODO VGA arb disable silken mouse */
- if (xf86silkenMouseDisableFlag) {
- from = X_CMDLINE;
- useSM = FALSE;
- } else {
- if (xf86GetOptValBool(options, OPTION_SILKEN_MOUSE, &useSM))
- from = X_CONFIG;
- }
- free(options);
- /*
- * XXX quick hack to report correctly for OSs that can't do SilkenMouse
- * yet. Should handle this differently so that alternate async methods
- * work correctly with this too.
- */
- pScrn->silkenMouse = useSM && xf86Info.useSIGIO && xf86SIGIOSupported();
- if (serverGeneration == 1)
- xf86DrvMsg(pScreen->myNum, from, "Silken mouse %s\n",
- pScrn->silkenMouse ? "enabled" : "disabled");
-}
-
-/* Wrote this function for the PM2 Xv driver, preliminary. */
-
-pointer
-xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name,
- char **adaptor_name, pointer *adaptor_options)
-{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
- confXvAdaptorPtr adaptor;
- int i;
-
- if (adaptor_index >= pScrn->confScreen->numxvadaptors) {
- if (adaptor_name) *adaptor_name = NULL;
- if (adaptor_options) *adaptor_options = NULL;
- return NULL;
- }
-
- adaptor = &pScrn->confScreen->xvadaptors[adaptor_index];
- if (adaptor_name) *adaptor_name = adaptor->identifier;
- if (adaptor_options) *adaptor_options = adaptor->options;
-
- for (i = 0; i < adaptor->numports; i++)
- if (!xf86NameCmp(adaptor->ports[i].identifier, port_name))
- return adaptor->ports[i].options;
-
- return NULL;
-}
-
-/* Rather than duplicate loader's get OS function, just include it directly */
-#define LoaderGetOS xf86GetOS
-#include "loader/os.c"
-
-static void
-xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init,
- EntityProc enter, EntityProc leave, pointer private)
-{
- ScrnInfoPtr pScrn;
-
- if ((pScrn = xf86FindScreenForEntity(pEnt->index)))
- xf86RemoveEntityFromScreen(pScrn,pEnt->index);
- xf86SetEntityFuncs(pEnt->index,init,enter,leave,private);
-}
-
-ScrnInfoPtr
-xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex,
- EntityProc init, EntityProc enter, EntityProc leave,
- pointer private)
-{
- EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex);
- if (!pEnt) return pScrn;
-
- if (!(pEnt->location.type == BUS_NONE)) {
- free(pEnt);
- return pScrn;
- }
-
- if (!pEnt->active) {
- xf86ConfigFbEntityInactive(pEnt, init, enter, leave, private);
- free(pEnt);
- return pScrn;
- }
-
- if (!pScrn)
- pScrn = xf86AllocateScreen(pEnt->driver,scrnFlag);
- xf86AddEntityToScreen(pScrn,entityIndex);
-
- xf86SetEntityFuncs(entityIndex,init,enter,leave,private);
-
- return pScrn;
-}
-
-Bool
-xf86IsScreenPrimary(int scrnIndex)
-{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
- int i;
-
- for (i=0 ; i < pScrn->numEntities; i++) {
- if (xf86IsEntityPrimary(i))
- return TRUE;
- }
- return FALSE;
-}
-
-int
-xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
- int format, unsigned long len, pointer value )
-{
- RootWinPropPtr pNewProp = NULL, pRegProp;
- int i;
- Bool existing = FALSE;
-
- DebugF("xf86RegisterRootWindowProperty(%d, %ld, %ld, %d, %ld, %p)\n",
- ScrnIndex, property, type, format, len, value);
-
- if (ScrnIndex<0 || ScrnIndex>=xf86NumScreens) {
- return BadMatch;
- }
-
- if (xf86RegisteredPropertiesTable &&
- xf86RegisteredPropertiesTable[ScrnIndex]) {
- for (pNewProp = xf86RegisteredPropertiesTable[ScrnIndex];
- pNewProp; pNewProp = pNewProp->next) {
- if (strcmp(pNewProp->name, NameForAtom(property)) == 0)
- break;
- }
- }
-
- if (!pNewProp) {
- if ((pNewProp = (RootWinPropPtr)malloc(sizeof(RootWinProp))) == NULL) {
- return BadAlloc;
- }
- /*
- * We will put this property at the end of the list so that
- * the changes are made in the order they were requested.
- */
- pNewProp->next = NULL;
- } else {
- free(pNewProp->name);
- existing = TRUE;
- }
-
- pNewProp->name = xnfstrdup(NameForAtom(property));
- pNewProp->type = type;
- pNewProp->format = format;
- pNewProp->size = len;
- pNewProp->data = value;
-
- DebugF("new property filled\n");
-
- if (NULL==xf86RegisteredPropertiesTable) {
- DebugF("creating xf86RegisteredPropertiesTable[] size %d\n",
- xf86NumScreens);
- if ( NULL==(xf86RegisteredPropertiesTable=(RootWinPropPtr*)xnfcalloc(sizeof(RootWinProp),xf86NumScreens) )) {
- return BadAlloc;
- }
- for (i=0; i<xf86NumScreens; i++) {
- xf86RegisteredPropertiesTable[i] = NULL;
- }
- }
-
- DebugF("xf86RegisteredPropertiesTable %p\n",
- (void *)xf86RegisteredPropertiesTable);
- DebugF("xf86RegisteredPropertiesTable[%d] %p\n",
- ScrnIndex, (void *)xf86RegisteredPropertiesTable[ScrnIndex]);
-
- if (!existing) {
- if ( xf86RegisteredPropertiesTable[ScrnIndex] == NULL) {
- xf86RegisteredPropertiesTable[ScrnIndex] = pNewProp;
- } else {
- pRegProp = xf86RegisteredPropertiesTable[ScrnIndex];
- while (pRegProp->next != NULL) {
- DebugF("- next %p\n", (void *)pRegProp);
- pRegProp = pRegProp->next;
- }
- pRegProp->next = pNewProp;
- }
- }
- DebugF("xf86RegisterRootWindowProperty succeeded\n");
- return Success;
-}
-
-Bool
-xf86IsUnblank(int mode)
-{
- switch(mode) {
- case SCREEN_SAVER_OFF:
- case SCREEN_SAVER_FORCER:
- return TRUE;
- case SCREEN_SAVER_ON:
- case SCREEN_SAVER_CYCLE:
- return FALSE;
- default:
- xf86MsgVerb(X_WARNING, 0, "Unexpected save screen mode: %d\n", mode);
- return TRUE;
- }
-}
-
-void
-xf86MotionHistoryAllocate(InputInfoPtr pInfo)
-{
- AllocateMotionHistory(pInfo->dev);
-}
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * Authors: Dirk Hohndel <hohndel@XFree86.Org>
+ * David Dawes <dawes@XFree86.Org>
+ * ... and others
+ *
+ * This file includes the helper functions that the server provides for
+ * different drivers.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+#include "os.h"
+#include "servermd.h"
+#include "pixmapstr.h"
+#include "windowstr.h"
+#include "propertyst.h"
+#include "gcstruct.h"
+#include "loaderProcs.h"
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+#include "micmap.h"
+#include "xf86DDC.h"
+#include "xf86Xinput.h"
+#include "xf86InPriv.h"
+#include "mivalidate.h"
+#include "xf86Crtc.h"
+
+/* For xf86GetClocks */
+#if defined(CSRG_BASED) || defined(__GNU__)
+#define HAS_SETPRIORITY
+#include <sys/resource.h>
+#endif
+
+static int xf86ScrnInfoPrivateCount = 0;
+
+
+/* Add a pointer to a new DriverRec to xf86DriverList */
+
+void
+xf86AddDriver(DriverPtr driver, pointer module, int flags)
+{
+ /* Don't add null entries */
+ if (!driver)
+ return;
+
+ if (xf86DriverList == NULL)
+ xf86NumDrivers = 0;
+
+ xf86NumDrivers++;
+ xf86DriverList = xnfrealloc(xf86DriverList,
+ xf86NumDrivers * sizeof(DriverPtr));
+ xf86DriverList[xf86NumDrivers - 1] = xnfalloc(sizeof(DriverRec));
+ if (flags & HaveDriverFuncs)
+ *xf86DriverList[xf86NumDrivers - 1] = *driver;
+ else {
+ (void) memset( xf86DriverList[xf86NumDrivers - 1], 0,
+ sizeof( DriverRec ) );
+ (void) memcpy( xf86DriverList[xf86NumDrivers - 1], driver,
+ sizeof(DriverRec1));
+
+ }
+ xf86DriverList[xf86NumDrivers - 1]->module = module;
+ xf86DriverList[xf86NumDrivers - 1]->refCount = 0;
+}
+
+void
+xf86DeleteDriver(int drvIndex)
+{
+ if (xf86DriverList[drvIndex]
+ && (!xf86DriverHasEntities(xf86DriverList[drvIndex]))) {
+ if (xf86DriverList[drvIndex]->module)
+ UnloadModule(xf86DriverList[drvIndex]->module);
+ free(xf86DriverList[drvIndex]);
+ xf86DriverList[drvIndex] = NULL;
+ }
+}
+
+/* Add a pointer to a new InputDriverRec to xf86InputDriverList */
+
+void
+xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags)
+{
+ /* Don't add null entries */
+ if (!driver)
+ return;
+
+ if (xf86InputDriverList == NULL)
+ xf86NumInputDrivers = 0;
+
+ xf86NumInputDrivers++;
+ xf86InputDriverList = xnfrealloc(xf86InputDriverList,
+ xf86NumInputDrivers * sizeof(InputDriverPtr));
+ xf86InputDriverList[xf86NumInputDrivers - 1] =
+ xnfalloc(sizeof(InputDriverRec));
+ *xf86InputDriverList[xf86NumInputDrivers - 1] = *driver;
+ xf86InputDriverList[xf86NumInputDrivers - 1]->module = module;
+}
+
+void
+xf86DeleteInputDriver(int drvIndex)
+{
+ if (xf86InputDriverList[drvIndex] && xf86InputDriverList[drvIndex]->module)
+ UnloadModule(xf86InputDriverList[drvIndex]->module);
+ free(xf86InputDriverList[drvIndex]);
+ xf86InputDriverList[drvIndex] = NULL;
+}
+
+InputDriverPtr
+xf86LookupInputDriver(const char *name)
+{
+ int i;
+
+ for (i = 0; i < xf86NumInputDrivers; i++) {
+ if (xf86InputDriverList[i] && xf86InputDriverList[i]->driverName &&
+ xf86NameCmp(name, xf86InputDriverList[i]->driverName) == 0)
+ return xf86InputDriverList[i];
+ }
+ return NULL;
+}
+
+InputInfoPtr
+xf86LookupInput(const char *name)
+{
+ InputInfoPtr p;
+
+ for (p = xf86InputDevs; p != NULL; p = p->next) {
+ if (strcmp(name, p->name) == 0)
+ return p;
+ }
+
+ return NULL;
+}
+
+/* Allocate a new ScrnInfoRec in xf86Screens */
+
+ScrnInfoPtr
+xf86AllocateScreen(DriverPtr drv, int flags)
+{
+ int i;
+
+ if (xf86Screens == NULL)
+ xf86NumScreens = 0;
+
+ i = xf86NumScreens++;
+ xf86Screens = xnfrealloc(xf86Screens, xf86NumScreens * sizeof(ScrnInfoPtr));
+ xf86Screens[i] = xnfcalloc(sizeof(ScrnInfoRec), 1);
+ xf86Screens[i]->scrnIndex = i; /* Changes when a screen is removed */
+ xf86Screens[i]->origIndex = i; /* This never changes */
+ xf86Screens[i]->privates = xnfcalloc(sizeof(DevUnion),
+ xf86ScrnInfoPrivateCount);
+ /*
+ * EnableDisableFBAccess now gets initialized in InitOutput()
+ * xf86Screens[i]->EnableDisableFBAccess = xf86EnableDisableFBAccess;
+ */
+
+ xf86Screens[i]->drv = drv;
+ drv->refCount++;
+ xf86Screens[i]->module = DuplicateModule(drv->module, NULL);
+
+ xf86Screens[i]->DriverFunc = drv->driverFunc;
+
+ return xf86Screens[i];
+}
+
+
+/*
+ * Remove an entry from xf86Screens. Ideally it should free all allocated
+ * data. To do this properly may require a driver hook.
+ */
+
+void
+xf86DeleteScreen(int scrnIndex, int flags)
+{
+ ScrnInfoPtr pScrn;
+ int i;
+
+ /* First check if the screen is valid */
+ if (xf86NumScreens == 0 || xf86Screens == NULL)
+ return;
+
+ if (scrnIndex > xf86NumScreens - 1)
+ return;
+
+ if (!(pScrn = xf86Screens[scrnIndex]))
+ return;
+
+ /* If a FreeScreen function is defined, call it here */
+ if (pScrn->FreeScreen != NULL)
+ pScrn->FreeScreen(scrnIndex, 0);
+
+ while (pScrn->modes)
+ xf86DeleteMode(&pScrn->modes, pScrn->modes);
+
+ while (pScrn->modePool)
+ xf86DeleteMode(&pScrn->modePool, pScrn->modePool);
+
+ xf86OptionListFree(pScrn->options);
+
+ if (pScrn->module)
+ UnloadModule(pScrn->module);
+
+ if (pScrn->drv)
+ pScrn->drv->refCount--;
+
+ free(pScrn->privates);
+
+ xf86ClearEntityListForScreen(scrnIndex);
+
+ free(pScrn);
+
+ /* Move the other entries down, updating their scrnIndex fields */
+
+ xf86NumScreens--;
+
+ for (i = scrnIndex; i < xf86NumScreens; i++) {
+ xf86Screens[i] = xf86Screens[i + 1];
+ xf86Screens[i]->scrnIndex = i;
+ /* Also need to take care of the screen layout settings */
+ }
+}
+
+/*
+ * Allocate a private in ScrnInfoRec.
+ */
+
+int
+xf86AllocateScrnInfoPrivateIndex(void)
+{
+ int idx, i;
+ ScrnInfoPtr pScr;
+ DevUnion *nprivs;
+
+ idx = xf86ScrnInfoPrivateCount++;
+ for (i = 0; i < xf86NumScreens; i++) {
+ pScr = xf86Screens[i];
+ nprivs = xnfrealloc(pScr->privates,
+ xf86ScrnInfoPrivateCount * sizeof(DevUnion));
+ /* Zero the new private */
+ memset(&nprivs[idx], 0, sizeof(DevUnion));
+ pScr->privates = nprivs;
+ }
+ return idx;
+}
+
+Bool
+xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad)
+{
+ int i;
+
+ if (pScrn->numFormats >= MAXFORMATS)
+ return FALSE;
+
+ if (bpp <= 0) {
+ if (depth == 1)
+ bpp = 1;
+ else if (depth <= 8)
+ bpp = 8;
+ else if (depth <= 16)
+ bpp = 16;
+ else if (depth <= 32)
+ bpp = 32;
+ else
+ return FALSE;
+ }
+ if (pad <= 0)
+ pad = BITMAP_SCANLINE_PAD;
+
+ i = pScrn->numFormats++;
+ pScrn->formats[i].depth = depth;
+ pScrn->formats[i].bitsPerPixel = bpp;
+ pScrn->formats[i].scanlinePad = pad;
+ return TRUE;
+}
+
+/*
+ * Set the depth we are using based on (in the following order of preference):
+ * - values given on the command line
+ * - values given in the config file
+ * - values provided by the driver
+ * - an overall default when nothing else is given
+ *
+ * Also find a Display subsection matching the depth/bpp found.
+ *
+ * Sets the following ScrnInfoRec fields:
+ * bitsPerPixel, pixmap24, depth, display, imageByteOrder,
+ * bitmapScanlinePad, bitmapScanlineUnit, bitmapBitOrder, numFormats,
+ * formats, fbFormat.
+ */
+
+/* Can the screen handle 24 bpp pixmaps */
+#define DO_PIX24(f) ((f & Support24bppFb) || \
+ ((f & Support32bppFb) && (f & SupportConvert24to32)))
+
+/* Can the screen handle 32 bpp pixmaps */
+#define DO_PIX32(f) ((f & Support32bppFb) || \
+ ((f & Support24bppFb) && (f & SupportConvert32to24)))
+
+/* Does the screen prefer 32bpp fb for 24bpp pixmaps */
+#define CHOOSE32FOR24(f) ((f & Support32bppFb) && (f & SupportConvert24to32) \
+ && (f & PreferConvert24to32))
+
+/* Does the screen prefer 24bpp fb for 32bpp pixmaps */
+#define CHOOSE24FOR32(f) ((f & Support24bppFb) && (f & SupportConvert32to24) \
+ && (f & PreferConvert32to24))
+
+/* Can the screen handle 32bpp pixmaps for 24bpp fb */
+#define DO_PIX32FOR24(f) ((f & Support24bppFb) && (f & SupportConvert32to24))
+
+/* Can the screen handle 24bpp pixmaps for 32bpp fb */
+#define DO_PIX24FOR32(f) ((f & Support32bppFb) && (f & SupportConvert24to32))
+
+#ifndef GLOBAL_DEFAULT_DEPTH
+#define GLOBAL_DEFAULT_DEPTH 24
+#endif
+
+Bool
+xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
+ int depth24flags)
+{
+ int i;
+ DispPtr disp;
+ Pix24Flags pix24 = xf86Info.pixmap24;
+ Bool nomatch = FALSE;
+
+ scrp->bitsPerPixel = -1;
+ scrp->depth = -1;
+ scrp->pixmap24 = Pix24DontCare;
+ scrp->bitsPerPixelFrom = X_DEFAULT;
+ scrp->depthFrom = X_DEFAULT;
+
+ if (xf86FbBpp > 0) {
+ scrp->bitsPerPixel = xf86FbBpp;
+ scrp->bitsPerPixelFrom = X_CMDLINE;
+ }
+
+ if (xf86Depth > 0) {
+ scrp->depth = xf86Depth;
+ scrp->depthFrom = X_CMDLINE;
+ }
+
+ if (xf86FbBpp < 0 && xf86Depth < 0) {
+ if (scrp->confScreen->defaultfbbpp > 0) {
+ scrp->bitsPerPixel = scrp->confScreen->defaultfbbpp;
+ scrp->bitsPerPixelFrom = X_CONFIG;
+ }
+ if (scrp->confScreen->defaultdepth > 0) {
+ scrp->depth = scrp->confScreen->defaultdepth;
+ scrp->depthFrom = X_CONFIG;
+ }
+
+ if (scrp->confScreen->defaultfbbpp <= 0 &&
+ scrp->confScreen->defaultdepth <= 0) {
+ /*
+ * Check for DefaultDepth and DefaultFbBpp options in the
+ * Device sections.
+ */
+ int i;
+ GDevPtr device;
+ Bool found = FALSE;
+
+ for (i = 0; i < scrp->numEntities; i++) {
+ device = xf86GetDevFromEntity(scrp->entityList[i],
+ scrp->entityInstanceList[i]);
+ if (device && device->options) {
+ if (xf86FindOption(device->options, "DefaultDepth")) {
+ scrp->depth = xf86SetIntOption(device->options,
+ "DefaultDepth", -1);
+ scrp->depthFrom = X_CONFIG;
+ found = TRUE;
+ }
+ if (xf86FindOption(device->options, "DefaultFbBpp")) {
+ scrp->bitsPerPixel = xf86SetIntOption(device->options,
+ "DefaultFbBpp",
+ -1);
+ scrp->bitsPerPixelFrom = X_CONFIG;
+ found = TRUE;
+ }
+ }
+ if (found)
+ break;
+ }
+ }
+ }
+
+ /* If none of these is set, pick a default */
+ if (scrp->bitsPerPixel < 0 && scrp->depth < 0) {
+ if (fbbpp > 0 || depth > 0) {
+ if (fbbpp > 0)
+ scrp->bitsPerPixel = fbbpp;
+ if (depth > 0)
+ scrp->depth = depth;
+ } else {
+ scrp->depth = GLOBAL_DEFAULT_DEPTH;
+ }
+ }
+
+ /* If any are not given, determine a default for the others */
+
+ if (scrp->bitsPerPixel < 0) {
+ /* The depth must be set */
+ if (scrp->depth > -1) {
+ if (scrp->depth == 1)
+ scrp->bitsPerPixel = 1;
+ else if (scrp->depth <= 4)
+ scrp->bitsPerPixel = 4;
+ else if (scrp->depth <= 8)
+ scrp->bitsPerPixel = 8;
+ else if (scrp->depth <= 16)
+ scrp->bitsPerPixel = 16;
+ else if (scrp->depth <= 24) {
+ /*
+ * Figure out if a choice is possible based on the depth24
+ * and pix24 flags.
+ */
+ /* Check pix24 first */
+ if (pix24 != Pix24DontCare) {
+ if (pix24 == Pix24Use32) {
+ if (DO_PIX32(depth24flags)) {
+ if (CHOOSE24FOR32(depth24flags))
+ scrp->bitsPerPixel = 24;
+ else
+ scrp->bitsPerPixel = 32;
+ } else {
+ nomatch = TRUE;
+ }
+ } else if (pix24 == Pix24Use24) {
+ if (DO_PIX24(depth24flags)) {
+ if (CHOOSE32FOR24(depth24flags))
+ scrp->bitsPerPixel = 32;
+ else
+ scrp->bitsPerPixel = 24;
+ } else {
+ nomatch = TRUE;
+ }
+ }
+ } else {
+ if (DO_PIX32(depth24flags)) {
+ if (CHOOSE24FOR32(depth24flags))
+ scrp->bitsPerPixel = 24;
+ else
+ scrp->bitsPerPixel = 32;
+ } else if (DO_PIX24(depth24flags)) {
+ if (CHOOSE32FOR24(depth24flags))
+ scrp->bitsPerPixel = 32;
+ else
+ scrp->bitsPerPixel = 24;
+ }
+ }
+ } else if (scrp->depth <= 32)
+ scrp->bitsPerPixel = 32;
+ else {
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "Specified depth (%d) is greater than 32\n",
+ scrp->depth);
+ return FALSE;
+ }
+ } else {
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "xf86SetDepthBpp: internal error: depth and fbbpp"
+ " are both not set\n");
+ return FALSE;
+ }
+ if (scrp->bitsPerPixel < 0) {
+ if (nomatch)
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "Driver can't support depth 24 pixmap format (%d)\n",
+ PIX24TOBPP(pix24));
+ else if ((depth24flags & (Support24bppFb | Support32bppFb)) ==
+ NoDepth24Support)
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "Driver can't support depth 24\n");
+ else
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "Can't find fbbpp for depth 24\n");
+ return FALSE;
+ }
+ scrp->bitsPerPixelFrom = X_PROBED;
+ }
+
+ if (scrp->depth <= 0) {
+ /* bitsPerPixel is already set */
+ switch (scrp->bitsPerPixel) {
+ case 32:
+ scrp->depth = 24;
+ break;
+ default:
+ /* 1, 4, 8, 16 and 24 */
+ scrp->depth = scrp->bitsPerPixel;
+ break;
+ }
+ scrp->depthFrom = X_PROBED;
+ }
+
+ /* Sanity checks */
+ if (scrp->depth < 1 || scrp->depth > 32) {
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "Specified depth (%d) is not in the range 1-32\n",
+ scrp->depth);
+ return FALSE;
+ }
+ switch (scrp->bitsPerPixel) {
+ case 1:
+ case 4:
+ case 8:
+ case 16:
+ case 24:
+ case 32:
+ break;
+ default:
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "Specified fbbpp (%d) is not a permitted value\n",
+ scrp->bitsPerPixel);
+ return FALSE;
+ }
+ if (scrp->depth > scrp->bitsPerPixel) {
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "Specified depth (%d) is greater than the fbbpp (%d)\n",
+ scrp->depth, scrp->bitsPerPixel);
+ return FALSE;
+ }
+
+ /* set scrp->pixmap24 if the driver isn't flexible */
+ if (scrp->bitsPerPixel == 24 && !DO_PIX32FOR24(depth24flags)) {
+ scrp->pixmap24 = Pix24Use24;
+ }
+ if (scrp->bitsPerPixel == 32 && !DO_PIX24FOR32(depth24flags)) {
+ scrp->pixmap24 = Pix24Use32;
+ }
+
+ /*
+ * Find the Display subsection matching the depth/fbbpp and initialise
+ * scrp->display with it.
+ */
+ for (i = 0, disp = scrp->confScreen->displays;
+ i < scrp->confScreen->numdisplays; i++, disp++) {
+ if ((disp->depth == scrp->depth && disp->fbbpp == scrp->bitsPerPixel)
+ || (disp->depth == scrp->depth && disp->fbbpp <= 0)
+ || (disp->fbbpp == scrp->bitsPerPixel && disp->depth <= 0)) {
+ scrp->display = disp;
+ break;
+ }
+ }
+
+ /*
+ * If an exact match can't be found, see if there is one with no
+ * depth or fbbpp specified.
+ */
+ if (i == scrp->confScreen->numdisplays) {
+ for (i = 0, disp = scrp->confScreen->displays;
+ i < scrp->confScreen->numdisplays; i++, disp++) {
+ if (disp->depth <= 0 && disp->fbbpp <= 0) {
+ scrp->display = disp;
+ break;
+ }
+ }
+ }
+
+ /*
+ * If all else fails, create a default one.
+ */
+ if (i == scrp->confScreen->numdisplays) {
+ scrp->confScreen->numdisplays++;
+ scrp->confScreen->displays =
+ xnfrealloc(scrp->confScreen->displays,
+ scrp->confScreen->numdisplays * sizeof(DispRec));
+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
+ "Creating default Display subsection in Screen section\n"
+ "\t\"%s\" for depth/fbbpp %d/%d\n",
+ scrp->confScreen->id, scrp->depth, scrp->bitsPerPixel);
+ memset(&scrp->confScreen->displays[i], 0, sizeof(DispRec));
+ scrp->confScreen->displays[i].blackColour.red = -1;
+ scrp->confScreen->displays[i].blackColour.green = -1;
+ scrp->confScreen->displays[i].blackColour.blue = -1;
+ scrp->confScreen->displays[i].whiteColour.red = -1;
+ scrp->confScreen->displays[i].whiteColour.green = -1;
+ scrp->confScreen->displays[i].whiteColour.blue = -1;
+ scrp->confScreen->displays[i].defaultVisual = -1;
+ scrp->confScreen->displays[i].modes = xnfalloc(sizeof(char *));
+ scrp->confScreen->displays[i].modes[0] = NULL;
+ scrp->confScreen->displays[i].depth = depth;
+ scrp->confScreen->displays[i].fbbpp = fbbpp;
+ scrp->display = &scrp->confScreen->displays[i];
+ }
+
+ /*
+ * Setup defaults for the display-wide attributes the framebuffer will
+ * need. These defaults should eventually be set globally, and not
+ * dependent on the screens.
+ */
+ scrp->imageByteOrder = IMAGE_BYTE_ORDER;
+ scrp->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
+ if (scrp->depth < 8) {
+ /* Planar modes need these settings */
+ scrp->bitmapScanlineUnit = 8;
+ scrp->bitmapBitOrder = MSBFirst;
+ } else {
+ scrp->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
+ scrp->bitmapBitOrder = BITMAP_BIT_ORDER;
+ }
+
+ /*
+ * If an unusual depth is required, add it to scrp->formats. The formats
+ * for the common depths are handled globally in InitOutput
+ */
+ switch (scrp->depth) {
+ case 1:
+ case 4:
+ case 8:
+ case 15:
+ case 16:
+ case 24:
+ /* Common depths. Nothing to do for them */
+ break;
+ default:
+ if (!xf86AddPixFormat(scrp, scrp->depth, 0, 0)) {
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "Can't add pixmap format for depth %d\n", scrp->depth);
+ return FALSE;
+ }
+ }
+
+ /* Initialise the framebuffer format for this screen */
+ scrp->fbFormat.depth = scrp->depth;
+ scrp->fbFormat.bitsPerPixel = scrp->bitsPerPixel;
+ scrp->fbFormat.scanlinePad = BITMAP_SCANLINE_PAD;
+
+ return TRUE;
+}
+
+/*
+ * Print out the selected depth and bpp.
+ */
+void
+xf86PrintDepthBpp(ScrnInfoPtr scrp)
+{
+ xf86DrvMsg(scrp->scrnIndex, scrp->depthFrom, "Depth %d, ", scrp->depth);
+ xf86Msg(scrp->bitsPerPixelFrom, "framebuffer bpp %d\n", scrp->bitsPerPixel);
+}
+
+/*
+ * xf86SetWeight sets scrp->weight, scrp->mask, scrp->offset, and for depths
+ * greater than MAX_PSEUDO_DEPTH also scrp->rgbBits.
+ */
+Bool
+xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask)
+{
+ MessageType weightFrom = X_DEFAULT;
+
+ scrp->weight.red = 0;
+ scrp->weight.green = 0;
+ scrp->weight.blue = 0;
+
+ if (xf86Weight.red > 0 && xf86Weight.green > 0 && xf86Weight.blue > 0) {
+ scrp->weight = xf86Weight;
+ weightFrom = X_CMDLINE;
+ } else if (scrp->display->weight.red > 0 && scrp->display->weight.green > 0
+ && scrp->display->weight.blue > 0) {
+ scrp->weight = scrp->display->weight;
+ weightFrom = X_CONFIG;
+ } else if (weight.red > 0 && weight.green > 0 && weight.blue > 0) {
+ scrp->weight = weight;
+ } else {
+ switch (scrp->depth) {
+ case 1:
+ case 4:
+ case 8:
+ scrp->weight.red = scrp->weight.green =
+ scrp->weight.blue = scrp->rgbBits;
+ break;
+ case 15:
+ scrp->weight.red = scrp->weight.green = scrp->weight.blue = 5;
+ break;
+ case 16:
+ scrp->weight.red = scrp->weight.blue = 5;
+ scrp->weight.green = 6;
+ break;
+ case 18:
+ scrp->weight.red = scrp->weight.green = scrp->weight.blue = 6;
+ break;
+ case 24:
+ scrp->weight.red = scrp->weight.green = scrp->weight.blue = 8;
+ break;
+ case 30:
+ scrp->weight.red = scrp->weight.green = scrp->weight.blue = 10;
+ break;
+ }
+ }
+
+ if (scrp->weight.red)
+ xf86DrvMsg(scrp->scrnIndex, weightFrom, "RGB weight %d%d%d\n",
+ (int)scrp->weight.red, (int)scrp->weight.green,
+ (int)scrp->weight.blue);
+
+ if (scrp->depth > MAX_PSEUDO_DEPTH &&
+ (scrp->depth != scrp->weight.red + scrp->weight.green +
+ scrp->weight.blue)) {
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "Weight given (%d%d%d) is inconsistent with the "
+ "depth (%d)\n",
+ (int)scrp->weight.red, (int)scrp->weight.green,
+ (int)scrp->weight.blue, scrp->depth);
+ return FALSE;
+ }
+ if (scrp->depth > MAX_PSEUDO_DEPTH && scrp->weight.red) {
+ /*
+ * XXX Does this even mean anything for TrueColor visuals?
+ * If not, we shouldn't even be setting it here. However, this
+ * matches the behaviour of 3.x versions of XFree86.
+ */
+ scrp->rgbBits = scrp->weight.red;
+ if (scrp->weight.green > scrp->rgbBits)
+ scrp->rgbBits = scrp->weight.green;
+ if (scrp->weight.blue > scrp->rgbBits)
+ scrp->rgbBits = scrp->weight.blue;
+ }
+
+ /* Set the mask and offsets */
+ if (mask.red == 0 || mask.green == 0 || mask.blue == 0) {
+ /* Default to a setting common to PC hardware */
+ scrp->offset.red = scrp->weight.green + scrp->weight.blue;
+ scrp->offset.green = scrp->weight.blue;
+ scrp->offset.blue = 0;
+ scrp->mask.red = ((1 << scrp->weight.red) - 1) << scrp->offset.red;
+ scrp->mask.green = ((1 << scrp->weight.green) - 1)
+ << scrp->offset.green;
+ scrp->mask.blue = (1 << scrp->weight.blue) - 1;
+ } else {
+ /* Initialise to the values passed */
+ scrp->mask.red = mask.red;
+ scrp->mask.green = mask.green;
+ scrp->mask.blue = mask.blue;
+ scrp->offset.red = ffs(mask.red);
+ scrp->offset.green = ffs(mask.green);
+ scrp->offset.blue = ffs(mask.blue);
+ }
+ return TRUE;
+}
+
+Bool
+xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual)
+{
+ MessageType visualFrom = X_DEFAULT;
+
+ if (defaultColorVisualClass >= 0) {
+ scrp->defaultVisual = defaultColorVisualClass;
+ visualFrom = X_CMDLINE;
+ } else if (scrp->display->defaultVisual >= 0) {
+ scrp->defaultVisual = scrp->display->defaultVisual;
+ visualFrom = X_CONFIG;
+ } else if (visual >= 0) {
+ scrp->defaultVisual = visual;
+ } else {
+ if (scrp->depth == 1)
+ scrp->defaultVisual = StaticGray;
+ else if (scrp->depth == 4)
+ scrp->defaultVisual = StaticColor;
+ else if (scrp->depth <= MAX_PSEUDO_DEPTH)
+ scrp->defaultVisual = PseudoColor;
+ else
+ scrp->defaultVisual = TrueColor;
+ }
+ switch (scrp->defaultVisual) {
+ case StaticGray:
+ case GrayScale:
+ case StaticColor:
+ case PseudoColor:
+ case TrueColor:
+ case DirectColor:
+ xf86DrvMsg(scrp->scrnIndex, visualFrom, "Default visual is %s\n",
+ xf86VisualNames[scrp->defaultVisual]);
+ return TRUE;
+ default:
+
+ xf86DrvMsg(scrp->scrnIndex, X_ERROR,
+ "Invalid default visual class (%d)\n", scrp->defaultVisual);
+ return FALSE;
+ }
+}
+
+#define TEST_GAMMA(g) \
+ (g).red > GAMMA_ZERO || (g).green > GAMMA_ZERO || (g).blue > GAMMA_ZERO
+
+#define SET_GAMMA(g) \
+ (g) > GAMMA_ZERO ? (g) : 1.0
+
+Bool
+xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma)
+{
+ MessageType from = X_DEFAULT;
+#if 0
+ xf86MonPtr DDC = (xf86MonPtr)(scrp->monitor->DDC);
+#endif
+ if (TEST_GAMMA(xf86Gamma)) {
+ from = X_CMDLINE;
+ scrp->gamma.red = SET_GAMMA(xf86Gamma.red);
+ scrp->gamma.green = SET_GAMMA(xf86Gamma.green);
+ scrp->gamma.blue = SET_GAMMA(xf86Gamma.blue);
+ } else if (TEST_GAMMA(scrp->monitor->gamma)) {
+ from = X_CONFIG;
+ scrp->gamma.red = SET_GAMMA(scrp->monitor->gamma.red);
+ scrp->gamma.green = SET_GAMMA(scrp->monitor->gamma.green);
+ scrp->gamma.blue = SET_GAMMA(scrp->monitor->gamma.blue);
+#if 0
+ } else if ( DDC && DDC->features.gamma > GAMMA_ZERO ) {
+ from = X_PROBED;
+ scrp->gamma.red = SET_GAMMA(DDC->features.gamma);
+ scrp->gamma.green = SET_GAMMA(DDC->features.gamma);
+ scrp->gamma.blue = SET_GAMMA(DDC->features.gamma);
+ /* EDID structure version 2 gives optional seperate red, green & blue gamma values
+ * in bytes 0x57-0x59 */
+#endif
+ } else if (TEST_GAMMA(gamma)) {
+ scrp->gamma.red = SET_GAMMA(gamma.red);
+ scrp->gamma.green = SET_GAMMA(gamma.green);
+ scrp->gamma.blue = SET_GAMMA(gamma.blue);
+ } else {
+ scrp->gamma.red = 1.0;
+ scrp->gamma.green = 1.0;
+ scrp->gamma.blue = 1.0;
+ }
+ /* Pretend we succeeded if we support better a gamma system.
+ * This avoids a confusing message.
+ */
+ if (xf86_crtc_supports_gamma(scrp))
+ return TRUE;
+ xf86DrvMsg(scrp->scrnIndex, from,
+ "Using gamma correction (%.1f, %.1f, %.1f)\n",
+ scrp->gamma.red, scrp->gamma.green, scrp->gamma.blue);
+
+ return TRUE;
+}
+
+#undef TEST_GAMMA
+#undef SET_GAMMA
+
+
+/*
+ * Set the DPI from the command line option. XXX should allow it to be
+ * calculated from the widthmm/heightmm values.
+ */
+
+#undef MMPERINCH
+#define MMPERINCH 25.4
+
+void
+xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
+{
+ MessageType from = X_DEFAULT;
+ xf86MonPtr DDC = (xf86MonPtr)(pScrn->monitor->DDC);
+ int ddcWidthmm, ddcHeightmm;
+ int widthErr, heightErr;
+
+ /* XXX Maybe there is no need for widthmm/heightmm in ScrnInfoRec */
+ pScrn->widthmm = pScrn->monitor->widthmm;
+ pScrn->heightmm = pScrn->monitor->heightmm;
+
+ if (DDC && (DDC->features.hsize > 0 && DDC->features.vsize > 0) ) {
+ /* DDC gives display size in mm for individual modes,
+ * but cm for monitor
+ */
+ ddcWidthmm = DDC->features.hsize * 10; /* 10mm in 1cm */
+ ddcHeightmm = DDC->features.vsize * 10; /* 10mm in 1cm */
+ } else {
+ ddcWidthmm = ddcHeightmm = 0;
+ }
+
+ if (monitorResolution > 0) {
+ pScrn->xDpi = monitorResolution;
+ pScrn->yDpi = monitorResolution;
+ from = X_CMDLINE;
+ } else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) {
+ from = X_CONFIG;
+ if (pScrn->widthmm > 0) {
+ pScrn->xDpi =
+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ }
+ if (pScrn->heightmm > 0) {
+ pScrn->yDpi =
+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ }
+ if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
+ pScrn->yDpi = pScrn->xDpi;
+ if (pScrn->yDpi > 0 && pScrn->xDpi <= 0)
+ pScrn->xDpi = pScrn->yDpi;
+ xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n",
+ pScrn->widthmm, pScrn->heightmm);
+
+ /* Warn if config and probe disagree about display size */
+ if ( ddcWidthmm && ddcHeightmm ) {
+ if (pScrn->widthmm > 0) {
+ widthErr = abs(ddcWidthmm - pScrn->widthmm);
+ } else {
+ widthErr = 0;
+ }
+ if (pScrn->heightmm > 0) {
+ heightErr = abs(ddcHeightmm - pScrn->heightmm);
+ } else {
+ heightErr = 0;
+ }
+ if (widthErr>10 || heightErr>10) {
+ /* Should include config file name for monitor here */
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Probed monitor is %dx%d mm, using Displaysize %dx%d mm\n",
+ ddcWidthmm,ddcHeightmm, pScrn->widthmm,pScrn->heightmm);
+ }
+ }
+ } else if ( ddcWidthmm && ddcHeightmm ) {
+ from = X_PROBED;
+ xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n",
+ ddcWidthmm, ddcHeightmm );
+ pScrn->widthmm = ddcWidthmm;
+ pScrn->heightmm = ddcHeightmm;
+ if (pScrn->widthmm > 0) {
+ pScrn->xDpi =
+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ }
+ if (pScrn->heightmm > 0) {
+ pScrn->yDpi =
+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ }
+ if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
+ pScrn->yDpi = pScrn->xDpi;
+ if (pScrn->yDpi > 0 && pScrn->xDpi <= 0)
+ pScrn->xDpi = pScrn->yDpi;
+ } else {
+ if (x > 0)
+ pScrn->xDpi = x;
+ else
+ pScrn->xDpi = DEFAULT_DPI;
+ if (y > 0)
+ pScrn->yDpi = y;
+ else
+ pScrn->yDpi = DEFAULT_DPI;
+ }
+ xf86DrvMsg(pScrn->scrnIndex, from, "DPI set to (%d, %d)\n",
+ pScrn->xDpi, pScrn->yDpi);
+}
+
+#undef MMPERINCH
+
+
+void
+xf86SetBlackWhitePixels(ScreenPtr pScreen)
+{
+ if (xf86FlipPixels) {
+ pScreen->whitePixel = 0;
+ pScreen->blackPixel = 1;
+ } else {
+ pScreen->whitePixel = 1;
+ pScreen->blackPixel = 0;
+ }
+}
+
+/*
+ * xf86SetRootClip --
+ * Enable or disable rendering to the screen by
+ * setting the root clip list and revalidating
+ * all of the windows
+ */
+
+static void
+xf86SetRootClip (ScreenPtr pScreen, Bool enable)
+{
+ WindowPtr pWin = pScreen->root;
+ WindowPtr pChild;
+ Bool WasViewable = (Bool)(pWin->viewable);
+ Bool anyMarked = FALSE;
+ WindowPtr pLayerWin;
+ BoxRec box;
+
+ if (WasViewable)
+ {
+ for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
+ {
+ (void) (*pScreen->MarkOverlappedWindows)(pChild,
+ pChild,
+ &pLayerWin);
+ }
+ (*pScreen->MarkWindow) (pWin);
+ anyMarked = TRUE;
+ if (pWin->valdata)
+ {
+ if (HasBorder (pWin))
+ {
+ RegionPtr borderVisible;
+
+ borderVisible = RegionCreate(NullBox, 1);
+ RegionSubtract(borderVisible,
+ &pWin->borderClip, &pWin->winSize);
+ pWin->valdata->before.borderVisible = borderVisible;
+ }
+ pWin->valdata->before.resized = TRUE;
+ }
+ }
+
+ /*
+ * Use REGION_BREAK to avoid optimizations in ValidateTree
+ * that assume the root borderClip can't change well, normally
+ * it doesn't...)
+ */
+ if (enable)
+ {
+ box.x1 = 0;
+ box.y1 = 0;
+ box.x2 = pScreen->width;
+ box.y2 = pScreen->height;
+ RegionInit(&pWin->winSize, &box, 1);
+ RegionInit(&pWin->borderSize, &box, 1);
+ if (WasViewable)
+ RegionReset(&pWin->borderClip, &box);
+ pWin->drawable.width = pScreen->width;
+ pWin->drawable.height = pScreen->height;
+ RegionBreak(&pWin->clipList);
+ }
+ else
+ {
+ RegionEmpty(&pWin->borderClip);
+ RegionBreak(&pWin->clipList);
+ }
+
+ ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
+
+ if (WasViewable)
+ {
+ if (pWin->firstChild)
+ {
+ anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
+ pWin->firstChild,
+ (WindowPtr *)NULL);
+ }
+ else
+ {
+ (*pScreen->MarkWindow) (pWin);
+ anyMarked = TRUE;
+ }
+
+
+ if (anyMarked)
+ (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
+ }
+
+ if (WasViewable)
+ {
+ if (anyMarked)
+ (*pScreen->HandleExposures)(pWin);
+ if (anyMarked && pScreen->PostValidateTree)
+ (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
+ }
+ if (pWin->realized)
+ WindowsRestructured ();
+ FlushAllOutput ();
+}
+
+/*
+ * Function to enable/disable access to the frame buffer
+ *
+ * This is used when VT switching and when entering/leaving DGA direct mode.
+ *
+ * This has been rewritten again to eliminate the saved pixmap. The
+ * devPrivate field in the screen pixmap is set to NULL to catch code
+ * accidentally referencing the frame buffer while the X server is not
+ * supposed to touch it.
+ *
+ * Here, we exchange the pixmap private data, rather than the pixmaps
+ * themselves to avoid having to find and change any references to the screen
+ * pixmap such as GC's, window privates etc. This also means that this code
+ * does not need to know exactly how the pixmap pixels are accessed. Further,
+ * this exchange is >not< done through the screen's ModifyPixmapHeader()
+ * vector. This means the called frame buffer code layers can determine
+ * whether they are switched in or out by keeping track of the root pixmap's
+ * private data, and therefore don't need to access pScrnInfo->vtSema.
+ */
+void
+xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
+{
+ ScrnInfoPtr pScrnInfo = xf86Screens[scrnIndex];
+ ScreenPtr pScreen = pScrnInfo->pScreen;
+ PixmapPtr pspix;
+
+ pspix = (*pScreen->GetScreenPixmap) (pScreen);
+ if (enable)
+ {
+ /*
+ * Restore all of the clip lists on the screen
+ */
+ if (!xf86Resetting)
+ xf86SetRootClip (pScreen, TRUE);
+
+ }
+ else
+ {
+ /*
+ * Empty all of the clip lists on the screen
+ */
+ xf86SetRootClip (pScreen, FALSE);
+ }
+}
+
+/* Print driver messages in the standard format */
+
+#undef PREFIX_SIZE
+#define PREFIX_SIZE 14
+
+void
+xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format,
+ va_list args)
+{
+ char *tmpFormat;
+
+ /* Prefix the scrnIndex name to the format string. */
+ if (scrnIndex >= 0 && scrnIndex < xf86NumScreens &&
+ xf86Screens[scrnIndex]->name) {
+ tmpFormat = malloc(strlen(format) +
+ strlen(xf86Screens[scrnIndex]->name) +
+ PREFIX_SIZE + 1);
+ if (!tmpFormat)
+ return;
+
+ snprintf(tmpFormat, PREFIX_SIZE + 1, "%s(%d): ",
+ xf86Screens[scrnIndex]->name, scrnIndex);
+
+ strcat(tmpFormat, format);
+ LogVMessageVerb(type, verb, tmpFormat, args);
+ free(tmpFormat);
+ } else
+ LogVMessageVerb(type, verb, format, args);
+}
+#undef PREFIX_SIZE
+
+/* Print driver messages, with verbose level specified directly */
+void
+xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format,
+ ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ xf86VDrvMsgVerb(scrnIndex, type, verb, format, ap);
+ va_end(ap);
+}
+
+/* Print driver messages, with verbose level of 1 (default) */
+void
+xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ xf86VDrvMsgVerb(scrnIndex, type, 1, format, ap);
+ va_end(ap);
+}
+
+/* Print input driver messages in the standard format of
+ <driver>: <device name>: <message> */
+void
+xf86VIDrvMsgVerb(InputInfoPtr dev, MessageType type, int verb, const char *format,
+ va_list args)
+{
+ char *msg;
+
+ if (asprintf(&msg, "%s: %s: %s", dev->drv->driverName, dev->name, format)
+ == -1) {
+ LogVMessageVerb(type, verb, "%s", args);
+ } else {
+ LogVMessageVerb(type, verb, msg, args);
+ free(msg);
+ }
+}
+
+/* Print input driver message, with verbose level specified directly */
+void
+xf86IDrvMsgVerb(InputInfoPtr dev, MessageType type, int verb, const char *format,
+ ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ xf86VIDrvMsgVerb(dev, type, verb, format, ap);
+ va_end(ap);
+}
+
+/* Print input driver messages, with verbose level of 1 (default) */
+void
+xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ xf86VIDrvMsgVerb(dev, type, 1, format, ap);
+ va_end(ap);
+}
+
+
+/* Print non-driver messages with verbose level specified directly */
+void
+xf86MsgVerb(MessageType type, int verb, const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ LogVMessageVerb(type, verb, format, ap);
+ va_end(ap);
+}
+
+/* Print non-driver messages with verbose level of 1 (default) */
+void
+xf86Msg(MessageType type, const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ LogVMessageVerb(type, 1, format, ap);
+ va_end(ap);
+}
+
+/* Just like ErrorF, but with the verbose level checked */
+void
+xf86ErrorFVerb(int verb, const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ if (xf86Verbose >= verb || xf86LogVerbose >= verb)
+ LogVWrite(verb, format, ap);
+ va_end(ap);
+}
+
+/* Like xf86ErrorFVerb, but with an implied verbose level of 1 */
+void
+xf86ErrorF(const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ if (xf86Verbose >= 1 || xf86LogVerbose >= 1)
+ LogVWrite(1, format, ap);
+ va_end(ap);
+}
+
+
+void
+xf86LogInit(void)
+{
+ char *lf = NULL;
+
+#define LOGSUFFIX ".log"
+#define LOGOLDSUFFIX ".old"
+
+ /* Get the log file name */
+ if (xf86LogFileFrom == X_DEFAULT) {
+ /* Append the display number and ".log" */
+ if (asprintf(&lf, "%s%%s" LOGSUFFIX, xf86LogFile) == -1)
+ FatalError("Cannot allocate space for the log file name\n");
+ xf86LogFile = lf;
+ }
+
+ xf86LogFile = LogInit(xf86LogFile, LOGOLDSUFFIX);
+ xf86LogFileWasOpened = TRUE;
+
+ xf86SetVerbosity(xf86Verbose);
+ xf86SetLogVerbosity(xf86LogVerbose);
+
+#undef LOGSUFFIX
+#undef LOGOLDSUFFIX
+
+ free(lf);
+}
+
+void
+xf86CloseLog(void)
+{
+ LogClose();
+}
+
+
+/*
+ * Drivers can use these for using their own SymTabRecs.
+ */
+
+const char *
+xf86TokenToString(SymTabPtr table, int token)
+{
+ int i;
+
+ for (i = 0; table[i].token >= 0 && table[i].token != token; i++)
+ ;
+
+ if (table[i].token < 0)
+ return NULL;
+ else
+ return table[i].name;
+}
+
+int
+xf86StringToToken(SymTabPtr table, const char *string)
+{
+ int i;
+
+ if (string == NULL)
+ return -1;
+
+ for (i = 0; table[i].token >= 0 && xf86NameCmp(string, table[i].name); i++)
+ ;
+
+ return table[i].token;
+}
+
+/*
+ * helper to display the clocks found on a card
+ */
+void
+xf86ShowClocks(ScrnInfoPtr scrp, MessageType from)
+{
+ int j;
+
+ xf86DrvMsg(scrp->scrnIndex, from, "Pixel clocks available:");
+ for (j=0; j < scrp->numClocks; j++) {
+ if ((j % 4) == 0) {
+ xf86ErrorF("\n");
+ xf86DrvMsg(scrp->scrnIndex, from, "pixel clocks:");
+ }
+ xf86ErrorF(" %7.3f", (double)scrp->clock[j] / 1000.0);
+ }
+ xf86ErrorF("\n");
+}
+
+
+/*
+ * This prints out the driver identify message, including the names of
+ * the supported chipsets.
+ *
+ * XXX This makes assumptions about the line width, etc. Maybe we could
+ * use a more general "pretty print" function for messages.
+ */
+void
+xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips)
+{
+ int len, i;
+
+ len = 6 + strlen(drvname) + 2 + strlen(drvmsg) + 2;
+ xf86Msg(X_INFO, "%s: %s:", drvname, drvmsg);
+ for (i = 0; chips[i].name != NULL; i++) {
+ if (i != 0) {
+ xf86ErrorF(",");
+ len++;
+ }
+ if (len + 2 + strlen(chips[i].name) < 78) {
+ xf86ErrorF(" ");
+ len++;
+ } else {
+ xf86ErrorF("\n\t");
+ len = 8;
+ }
+ xf86ErrorF("%s", chips[i].name);
+ len += strlen(chips[i].name);
+ }
+ xf86ErrorF("\n");
+}
+
+
+int
+xf86MatchDevice(const char *drivername, GDevPtr **sectlist)
+{
+ GDevPtr gdp, *pgdp = NULL;
+ confScreenPtr screensecptr;
+ int i,j;
+
+ if (sectlist)
+ *sectlist = NULL;
+
+ /*
+ * This can happen when running Xorg -showopts and a module like ati
+ * or vmware tries to load its submodules when xf86ConfigLayout is empty
+ */
+ if (!xf86ConfigLayout.screens)
+ return 0;
+
+ /*
+ * This is a very important function that matches the device sections
+ * as they show up in the config file with the drivers that the server
+ * loads at run time.
+ *
+ * ChipProbe can call
+ * int xf86MatchDevice(char * drivername, GDevPtr ** sectlist)
+ * with its driver name. The function allocates an array of GDevPtr and
+ * returns this via sectlist and returns the number of elements in
+ * this list as return value. 0 means none found, -1 means fatal error.
+ *
+ * It can figure out which of the Device sections to use for which card
+ * (using things like the Card statement, etc). For single headed servers
+ * there will of course be just one such Device section.
+ */
+ i = 0;
+
+ /*
+ * first we need to loop over all the Screens sections to get to all
+ * 'active' device sections
+ */
+ for (j=0; xf86ConfigLayout.screens[j].screen != NULL; j++) {
+ screensecptr = xf86ConfigLayout.screens[j].screen;
+ if ((screensecptr->device->driver != NULL)
+ && (xf86NameCmp( screensecptr->device->driver,drivername) == 0)
+ && (! screensecptr->device->claimed)) {
+ /*
+ * we have a matching driver that wasn't claimed, yet
+ */
+ pgdp = xnfrealloc(pgdp, (i + 2) * sizeof(GDevPtr));
+ pgdp[i++] = screensecptr->device;
+ }
+ }
+
+ /* Then handle the inactive devices */
+ j = 0;
+ while (xf86ConfigLayout.inactives[j].identifier) {
+ gdp = &xf86ConfigLayout.inactives[j];
+ if (gdp->driver && !gdp->claimed &&
+ !xf86NameCmp(gdp->driver,drivername)) {
+ /* we have a matching driver that wasn't claimed yet */
+ pgdp = xnfrealloc(pgdp, (i + 2) * sizeof(GDevPtr));
+ pgdp[i++] = gdp;
+ }
+ j++;
+ }
+
+ /*
+ * make the array NULL terminated and return its address
+ */
+ if (i)
+ pgdp[i] = NULL;
+
+ if (sectlist)
+ *sectlist = pgdp;
+ else
+ free(pgdp);
+ return i;
+}
+
+/*
+ * xf86GetClocks -- get the dot-clocks via a BIG BAD hack ...
+ */
+void
+xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int),
+ void (*ProtectRegs)(ScrnInfoPtr, Bool),
+ void (*BlankScreen)(ScrnInfoPtr, Bool), IOADDRESS vertsyncreg,
+ int maskval, int knownclkindex, int knownclkvalue)
+{
+ register int status = vertsyncreg;
+ unsigned long i, cnt, rcnt, sync;
+
+ /* First save registers that get written on */
+ (*ClockFunc)(pScrn, CLK_REG_SAVE);
+
+ if (num > MAXCLOCKS)
+ num = MAXCLOCKS;
+
+ for (i = 0; i < num; i++)
+ {
+ if (ProtectRegs)
+ (*ProtectRegs)(pScrn, TRUE);
+ if (!(*ClockFunc)(pScrn, i))
+ {
+ pScrn->clock[i] = -1;
+ continue;
+ }
+ if (ProtectRegs)
+ (*ProtectRegs)(pScrn, FALSE);
+ if (BlankScreen)
+ (*BlankScreen)(pScrn, FALSE);
+
+ usleep(50000); /* let VCO stabilise */
+
+ cnt = 0;
+ sync = 200000;
+
+ while ((inb(status) & maskval) == 0x00)
+ if (sync-- == 0) goto finish;
+ /* Something appears to be happening, so reset sync count */
+ sync = 200000;
+ while ((inb(status) & maskval) == maskval)
+ if (sync-- == 0) goto finish;
+ /* Something appears to be happening, so reset sync count */
+ sync = 200000;
+ while ((inb(status) & maskval) == 0x00)
+ if (sync-- == 0) goto finish;
+
+ for (rcnt = 0; rcnt < 5; rcnt++)
+ {
+ while (!(inb(status) & maskval))
+ cnt++;
+ while ((inb(status) & maskval))
+ cnt++;
+ }
+
+finish:
+ pScrn->clock[i] = cnt ? cnt : -1;
+ if (BlankScreen)
+ (*BlankScreen)(pScrn, TRUE);
+ }
+
+ for (i = 0; i < num; i++)
+ {
+ if (i != knownclkindex)
+ {
+ if (pScrn->clock[i] == -1)
+ {
+ pScrn->clock[i] = 0;
+ }
+ else
+ {
+ pScrn->clock[i] = (int)(0.5 +
+ (((float)knownclkvalue) * pScrn->clock[knownclkindex]) /
+ (pScrn->clock[i]));
+ /* Round to nearest 10KHz */
+ pScrn->clock[i] += 5;
+ pScrn->clock[i] /= 10;
+ pScrn->clock[i] *= 10;
+ }
+ }
+ }
+
+ pScrn->clock[knownclkindex] = knownclkvalue;
+ pScrn->numClocks = num;
+
+ /* Restore registers that were written on */
+ (*ClockFunc)(pScrn, CLK_REG_RESTORE);
+}
+
+const char *
+xf86GetVisualName(int visual)
+{
+ if (visual < 0 || visual > DirectColor)
+ return NULL;
+
+ return xf86VisualNames[visual];
+}
+
+
+int
+xf86GetVerbosity(void)
+{
+ return max(xf86Verbose, xf86LogVerbose);
+}
+
+Pix24Flags
+xf86GetPix24(void)
+{
+ return xf86Info.pixmap24;
+}
+
+
+int
+xf86GetDepth(void)
+{
+ return xf86Depth;
+}
+
+
+rgb
+xf86GetWeight(void)
+{
+ return xf86Weight;
+}
+
+
+Gamma
+xf86GetGamma(void)
+{
+ return xf86Gamma;
+}
+
+
+Bool
+xf86GetFlipPixels(void)
+{
+ return xf86FlipPixels;
+}
+
+
+const char *
+xf86GetServerName(void)
+{
+ return xf86ServerName;
+}
+
+
+Bool
+xf86ServerIsExiting(void)
+{
+ return (dispatchException & DE_TERMINATE) == DE_TERMINATE;
+}
+
+
+Bool
+xf86ServerIsResetting(void)
+{
+ return xf86Resetting;
+}
+
+
+Bool
+xf86ServerIsInitialising(void)
+{
+ return xf86Initialising;
+}
+
+
+Bool
+xf86ServerIsOnlyDetecting(void)
+{
+ return xf86DoConfigure;
+}
+
+
+Bool
+xf86CaughtSignal(void)
+{
+ return xf86Info.caughtSignal;
+}
+
+
+Bool
+xf86GetVidModeAllowNonLocal(void)
+{
+ return xf86Info.vidModeAllowNonLocal;
+}
+
+
+Bool
+xf86GetVidModeEnabled(void)
+{
+ return xf86Info.vidModeEnabled;
+}
+
+Bool
+xf86GetModInDevAllowNonLocal(void)
+{
+ return xf86Info.miscModInDevAllowNonLocal;
+}
+
+
+Bool
+xf86GetModInDevEnabled(void)
+{
+ return xf86Info.miscModInDevEnabled;
+}
+
+
+Bool
+xf86GetAllowMouseOpenFail(void)
+{
+ return xf86Info.allowMouseOpenFail;
+}
+
+
+Bool
+xf86IsPc98(void)
+{
+#if SUPPORT_PC98
+ return xf86Info.pc98;
+#else
+ return FALSE;
+#endif
+}
+
+void
+xf86DisableRandR(void)
+{
+ xf86Info.disableRandR = TRUE;
+ xf86Info.randRFrom = X_PROBED;
+}
+
+CARD32
+xf86GetModuleVersion(pointer module)
+{
+ return (CARD32)LoaderGetModuleVersion(module);
+}
+
+pointer
+xf86LoadDrvSubModule(DriverPtr drv, const char *name)
+{
+ pointer ret;
+ int errmaj = 0, errmin = 0;
+
+ ret = LoadSubModule(drv->module, name, NULL, NULL, NULL, NULL,
+ &errmaj, &errmin);
+ if (!ret)
+ LoaderErrorMsg(NULL, name, errmaj, errmin);
+ return ret;
+}
+
+pointer
+xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name)
+{
+ pointer ret;
+ int errmaj = 0, errmin = 0;
+
+ ret = LoadSubModule(pScrn->module, name, NULL, NULL, NULL, NULL,
+ &errmaj, &errmin);
+ if (!ret)
+ LoaderErrorMsg(pScrn->name, name, errmaj, errmin);
+ return ret;
+}
+
+/*
+ * xf86LoadOneModule loads a single module.
+ */
+pointer
+xf86LoadOneModule(char *name, pointer opt)
+{
+ int errmaj, errmin;
+ char *Name;
+ pointer mod;
+
+ if (!name)
+ return NULL;
+
+ /* Normalise the module name */
+ Name = xf86NormalizeName(name);
+
+ /* Skip empty names */
+ if (Name == NULL)
+ return NULL;
+ if (*Name == '\0') {
+ free(Name);
+ return NULL;
+ }
+
+ mod = LoadModule(Name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin);
+ if (!mod)
+ LoaderErrorMsg(NULL, Name, errmaj, errmin);
+ free(Name);
+ return mod;
+}
+
+void
+xf86UnloadSubModule(pointer mod)
+{
+ /*
+ * This is disabled for now. The loader isn't smart enough yet to undo
+ * relocations.
+ */
+#if 0
+ UnloadSubModule(mod);
+#endif
+}
+
+Bool
+xf86LoaderCheckSymbol(const char *name)
+{
+ return LoaderSymbol(name) != NULL;
+}
+
+typedef enum {
+ OPTION_BACKING_STORE
+} BSOpts;
+
+static const OptionInfoRec BSOptions[] = {
+ { OPTION_BACKING_STORE, "BackingStore", OPTV_BOOLEAN, {0}, FALSE },
+ { -1, NULL, OPTV_NONE, {0}, FALSE }
+};
+
+void
+xf86SetBackingStore(ScreenPtr pScreen)
+{
+ Bool useBS = FALSE;
+ MessageType from = X_DEFAULT;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ OptionInfoPtr options;
+
+ options = xnfalloc(sizeof(BSOptions));
+ (void)memcpy(options, BSOptions, sizeof(BSOptions));
+ xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options);
+
+ /* check for commandline option here */
+ if (xf86bsEnableFlag) {
+ from = X_CMDLINE;
+ useBS = TRUE;
+ } else if (xf86bsDisableFlag) {
+ from = X_CMDLINE;
+ useBS = FALSE;
+ } else {
+ if (xf86GetOptValBool(options, OPTION_BACKING_STORE, &useBS))
+ from = X_CONFIG;
+ }
+ free(options);
+ pScreen->backingStoreSupport = useBS ? Always : NotUseful;
+ if (serverGeneration == 1)
+ xf86DrvMsg(pScreen->myNum, from, "Backing store %s\n",
+ useBS ? "enabled" : "disabled");
+}
+
+
+typedef enum {
+ OPTION_SILKEN_MOUSE
+} SMOpts;
+
+static const OptionInfoRec SMOptions[] = {
+ { OPTION_SILKEN_MOUSE, "SilkenMouse", OPTV_BOOLEAN, {0}, FALSE },
+ { -1, NULL, OPTV_NONE, {0}, FALSE }
+};
+
+void
+xf86SetSilkenMouse (ScreenPtr pScreen)
+{
+ Bool useSM = TRUE;
+ MessageType from = X_DEFAULT;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ OptionInfoPtr options;
+
+ options = xnfalloc(sizeof(SMOptions));
+ (void)memcpy(options, SMOptions, sizeof(SMOptions));
+ xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options);
+
+ /* check for commandline option here */
+ /* disable if screen shares resources */
+ /* TODO VGA arb disable silken mouse */
+ if (xf86silkenMouseDisableFlag) {
+ from = X_CMDLINE;
+ useSM = FALSE;
+ } else {
+ if (xf86GetOptValBool(options, OPTION_SILKEN_MOUSE, &useSM))
+ from = X_CONFIG;
+ }
+ free(options);
+ /*
+ * XXX quick hack to report correctly for OSs that can't do SilkenMouse
+ * yet. Should handle this differently so that alternate async methods
+ * work correctly with this too.
+ */
+ pScrn->silkenMouse = useSM && xf86Info.useSIGIO && xf86SIGIOSupported();
+ if (serverGeneration == 1)
+ xf86DrvMsg(pScreen->myNum, from, "Silken mouse %s\n",
+ pScrn->silkenMouse ? "enabled" : "disabled");
+}
+
+/* Wrote this function for the PM2 Xv driver, preliminary. */
+
+pointer
+xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name,
+ char **adaptor_name, pointer *adaptor_options)
+{
+ ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ confXvAdaptorPtr adaptor;
+ int i;
+
+ if (adaptor_index >= pScrn->confScreen->numxvadaptors) {
+ if (adaptor_name) *adaptor_name = NULL;
+ if (adaptor_options) *adaptor_options = NULL;
+ return NULL;
+ }
+
+ adaptor = &pScrn->confScreen->xvadaptors[adaptor_index];
+ if (adaptor_name) *adaptor_name = adaptor->identifier;
+ if (adaptor_options) *adaptor_options = adaptor->options;
+
+ for (i = 0; i < adaptor->numports; i++)
+ if (!xf86NameCmp(adaptor->ports[i].identifier, port_name))
+ return adaptor->ports[i].options;
+
+ return NULL;
+}
+
+/* Rather than duplicate loader's get OS function, just include it directly */
+#define LoaderGetOS xf86GetOS
+#include "loader/os.c"
+
+static void
+xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init,
+ EntityProc enter, EntityProc leave, pointer private)
+{
+ ScrnInfoPtr pScrn;
+
+ if ((pScrn = xf86FindScreenForEntity(pEnt->index)))
+ xf86RemoveEntityFromScreen(pScrn,pEnt->index);
+ xf86SetEntityFuncs(pEnt->index,init,enter,leave,private);
+}
+
+ScrnInfoPtr
+xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex,
+ EntityProc init, EntityProc enter, EntityProc leave,
+ pointer private)
+{
+ EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex);
+ if (!pEnt) return pScrn;
+
+ if (!(pEnt->location.type == BUS_NONE)) {
+ free(pEnt);
+ return pScrn;
+ }
+
+ if (!pEnt->active) {
+ xf86ConfigFbEntityInactive(pEnt, init, enter, leave, private);
+ free(pEnt);
+ return pScrn;
+ }
+
+ if (!pScrn)
+ pScrn = xf86AllocateScreen(pEnt->driver,scrnFlag);
+ xf86AddEntityToScreen(pScrn,entityIndex);
+
+ xf86SetEntityFuncs(entityIndex,init,enter,leave,private);
+
+ return pScrn;
+}
+
+Bool
+xf86IsScreenPrimary(int scrnIndex)
+{
+ ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ int i;
+
+ for (i=0 ; i < pScrn->numEntities; i++) {
+ if (xf86IsEntityPrimary(i))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+int
+xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
+ int format, unsigned long len, pointer value )
+{
+ RootWinPropPtr pNewProp = NULL, pRegProp;
+ int i;
+ Bool existing = FALSE;
+
+ DebugF("xf86RegisterRootWindowProperty(%d, %ld, %ld, %d, %ld, %p)\n",
+ ScrnIndex, property, type, format, len, value);
+
+ if (ScrnIndex<0 || ScrnIndex>=xf86NumScreens) {
+ return BadMatch;
+ }
+
+ if (xf86RegisteredPropertiesTable &&
+ xf86RegisteredPropertiesTable[ScrnIndex]) {
+ for (pNewProp = xf86RegisteredPropertiesTable[ScrnIndex];
+ pNewProp; pNewProp = pNewProp->next) {
+ if (strcmp(pNewProp->name, NameForAtom(property)) == 0)
+ break;
+ }
+ }
+
+ if (!pNewProp) {
+ if ((pNewProp = (RootWinPropPtr)malloc(sizeof(RootWinProp))) == NULL) {
+ return BadAlloc;
+ }
+ /*
+ * We will put this property at the end of the list so that
+ * the changes are made in the order they were requested.
+ */
+ pNewProp->next = NULL;
+ } else {
+ free(pNewProp->name);
+ existing = TRUE;
+ }
+
+ pNewProp->name = xnfstrdup(NameForAtom(property));
+ pNewProp->type = type;
+ pNewProp->format = format;
+ pNewProp->size = len;
+ pNewProp->data = value;
+
+ DebugF("new property filled\n");
+
+ if (NULL==xf86RegisteredPropertiesTable) {
+ DebugF("creating xf86RegisteredPropertiesTable[] size %d\n",
+ xf86NumScreens);
+ if ( NULL==(xf86RegisteredPropertiesTable=(RootWinPropPtr*)xnfcalloc(sizeof(RootWinProp),xf86NumScreens) )) {
+ return BadAlloc;
+ }
+ for (i=0; i<xf86NumScreens; i++) {
+ xf86RegisteredPropertiesTable[i] = NULL;
+ }
+ }
+
+ DebugF("xf86RegisteredPropertiesTable %p\n",
+ (void *)xf86RegisteredPropertiesTable);
+ DebugF("xf86RegisteredPropertiesTable[%d] %p\n",
+ ScrnIndex, (void *)xf86RegisteredPropertiesTable[ScrnIndex]);
+
+ if (!existing) {
+ if ( xf86RegisteredPropertiesTable[ScrnIndex] == NULL) {
+ xf86RegisteredPropertiesTable[ScrnIndex] = pNewProp;
+ } else {
+ pRegProp = xf86RegisteredPropertiesTable[ScrnIndex];
+ while (pRegProp->next != NULL) {
+ DebugF("- next %p\n", (void *)pRegProp);
+ pRegProp = pRegProp->next;
+ }
+ pRegProp->next = pNewProp;
+ }
+ }
+ DebugF("xf86RegisterRootWindowProperty succeeded\n");
+ return Success;
+}
+
+Bool
+xf86IsUnblank(int mode)
+{
+ switch(mode) {
+ case SCREEN_SAVER_OFF:
+ case SCREEN_SAVER_FORCER:
+ return TRUE;
+ case SCREEN_SAVER_ON:
+ case SCREEN_SAVER_CYCLE:
+ return FALSE;
+ default:
+ xf86MsgVerb(X_WARNING, 0, "Unexpected save screen mode: %d\n", mode);
+ return TRUE;
+ }
+}
+
+void
+xf86MotionHistoryAllocate(InputInfoPtr pInfo)
+{
+ AllocateMotionHistory(pInfo->dev);
+}
diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h
index 581047dcf..1322b8046 100644
--- a/xorg-server/hw/xfree86/common/xf86Module.h
+++ b/xorg-server/hw/xfree86/common/xf86Module.h
@@ -1,212 +1,212 @@
-/*
- * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-/*
- * This file contains the parts of the loader interface that are visible
- * to modules. This is the only loader-related header that modules should
- * include.
- *
- * It should include a bare minimum of other headers.
- *
- * Longer term, the module/loader code should probably live directly under
- * Xserver/.
- *
- * XXX This file arguably belongs in xfree86/loader/.
- */
-
-#ifndef _XF86MODULE_H
-#define _XF86MODULE_H
-
-#include "misc.h"
-#ifndef NULL
-#define NULL ((void *)0)
-#endif
-
-typedef enum {
- LD_RESOLV_IFDONE = 0, /* only check if no more
- delays pending */
- LD_RESOLV_NOW = 1, /* finish one delay step */
- LD_RESOLV_FORCE = 2 /* force checking... */
-} LoaderResolveOptions;
-
-#define DEFAULT_LIST ((char *)-1)
-
-/* This indicates a special module that doesn't have the usual entry point */
-#define EXTERN_MODULE ((pointer)-1)
-
-/* Built-in ABI classes. These definitions must not be changed. */
-#define ABI_CLASS_NONE NULL
-#define ABI_CLASS_ANSIC "X.Org ANSI C Emulation"
-#define ABI_CLASS_VIDEODRV "X.Org Video Driver"
-#define ABI_CLASS_XINPUT "X.Org XInput driver"
-#define ABI_CLASS_EXTENSION "X.Org Server Extension"
-#define ABI_CLASS_FONT "X.Org Font Renderer"
-
-#define ABI_MINOR_MASK 0x0000FFFF
-#define ABI_MAJOR_MASK 0xFFFF0000
-#define GET_ABI_MINOR(v) ((v) & ABI_MINOR_MASK)
-#define GET_ABI_MAJOR(v) (((v) & ABI_MAJOR_MASK) >> 16)
-#define SET_ABI_VERSION(maj, min) \
- ((((maj) << 16) & ABI_MAJOR_MASK) | ((min) & ABI_MINOR_MASK))
-
-/*
- * ABI versions. Each version has a major and minor revision. Modules
- * using lower minor revisions must work with servers of a higher minor
- * revision. There is no compatibility between different major revisions.
- * Whenever the ABI_ANSIC_VERSION is changed, the others must also be
- * changed. The minor revision mask is 0x0000FFFF and the major revision
- * mask is 0xFFFF0000.
- */
-#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
-#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(10, 0)
-#define ABI_XINPUT_VERSION SET_ABI_VERSION(12, 2)
-#define ABI_EXTENSION_VERSION SET_ABI_VERSION(5, 0)
-#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
-
-#define MODINFOSTRING1 0xef23fdc5
-#define MODINFOSTRING2 0x10dc023a
-
-#ifndef MODULEVENDORSTRING
-#define MODULEVENDORSTRING "X.Org Foundation"
-#endif
-
-/* Error return codes for errmaj. New codes must only be added at the end. */
-typedef enum {
- LDR_NOERROR = 0,
- LDR_NOMEM, /* memory allocation failed */
- LDR_NOENT, /* Module file does not exist */
- LDR_NOSUBENT, /* pre-requsite file to be sub-loaded does not exist */
- LDR_NOSPACE, /* internal module array full */
- LDR_NOMODOPEN, /* module file could not be opened (check errmin) */
- LDR_UNKTYPE, /* file is not a recognized module type */
- LDR_NOLOAD, /* type specific loader failed */
- LDR_ONCEONLY, /* Module should only be loaded once (not an error) */
- LDR_NOPORTOPEN, /* could not open port (check errmin) */
- LDR_NOHARDWARE, /* could not query/initialize the hardware device */
- LDR_MISMATCH, /* the module didn't match the spec'd requirments */
- LDR_BADUSAGE, /* LoadModule is called with bad arguments */
- LDR_INVALID, /* The module doesn't have a valid ModuleData object */
- LDR_BADOS, /* The module doesn't support the OS */
- LDR_MODSPECIFIC /* A module-specific error in the SetupProc */
-} LoaderErrorCode;
-
-/*
- * Some common module classes. The moduleclass can be used to identify
- * that modules loaded are of the correct type. This is a finer
- * classification than the ABI classes even though the default set of
- * classes have the same names. For example, not all modules that require
- * the video driver ABI are themselves video drivers.
- */
-#define MOD_CLASS_NONE NULL
-#define MOD_CLASS_VIDEODRV "X.Org Video Driver"
-#define MOD_CLASS_XINPUT "X.Org XInput Driver"
-#define MOD_CLASS_FONT "X.Org Font Renderer"
-#define MOD_CLASS_EXTENSION "X.Org Server Extension"
-
-/* This structure is expected to be returned by the initfunc */
-typedef struct {
- const char * modname; /* name of module, e.g. "foo" */
- const char * vendor; /* vendor specific string */
- CARD32 _modinfo1_; /* constant MODINFOSTRING1/2 to find */
- CARD32 _modinfo2_; /* infoarea with a binary editor or sign tool */
- CARD32 xf86version; /* contains XF86_VERSION_CURRENT */
- CARD8 majorversion; /* module-specific major version */
- CARD8 minorversion; /* module-specific minor version */
- CARD16 patchlevel; /* module-specific patch level */
- const char * abiclass; /* ABI class that the module uses */
- CARD32 abiversion; /* ABI version */
- const char * moduleclass; /* module class description */
- CARD32 checksum[4]; /* contains a digital signature of the */
- /* version info structure */
-} XF86ModuleVersionInfo;
-
-/*
- * This structure can be used to callers of LoadModule and LoadSubModule to
- * specify version and/or ABI requirements.
- */
-typedef struct {
- CARD8 majorversion; /* module-specific major version */
- CARD8 minorversion; /* moudle-specific minor version */
- CARD16 patchlevel; /* module-specific patch level */
- const char * abiclass; /* ABI class that the module uses */
- CARD32 abiversion; /* ABI version */
- const char * moduleclass; /* module class */
-} XF86ModReqInfo;
-
-/* values to indicate unspecified fields in XF86ModReqInfo. */
-#define MAJOR_UNSPEC 0xFF
-#define MINOR_UNSPEC 0xFF
-#define PATCH_UNSPEC 0xFFFF
-#define ABI_VERS_UNSPEC 0xFFFFFFFF
-
-#define MODULE_VERSION_NUMERIC(maj, min, patch) \
- ((((maj) & 0xFF) << 24) | (((min) & 0xFF) << 16) | (patch & 0xFFFF))
-#define GET_MODULE_MAJOR_VERSION(vers) (((vers) >> 24) & 0xFF)
-#define GET_MODULE_MINOR_VERSION(vers) (((vers) >> 16) & 0xFF)
-#define GET_MODULE_PATCHLEVEL(vers) ((vers) & 0xFFFF)
-
-#define INITARGS void
-
-typedef void (*InitExtension)(INITARGS);
-
-typedef struct {
- InitExtension initFunc;
- const char * name;
- Bool *disablePtr;
- InitExtension setupFunc;
- const char ** initDependencies;
-} ExtensionModule;
-
-extern _X_EXPORT ExtensionModule *ExtensionModuleList;
-
-/* Prototypes for Loader functions that are exported to modules */
-extern _X_EXPORT pointer LoadSubModule(pointer, const char *, const char **,
- const char **, pointer, const XF86ModReqInfo *,
- int *, int *);
-extern _X_EXPORT void UnloadSubModule(pointer);
-extern _X_EXPORT void UnloadModule (pointer);
-extern _X_EXPORT pointer LoaderSymbol(const char *);
-extern _X_EXPORT char **LoaderListDirs(const char **, const char **);
-extern _X_EXPORT void LoaderFreeDirList(char **);
-extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
-extern _X_EXPORT void LoadExtension(ExtensionModule *, Bool);
-extern _X_EXPORT void LoaderGetOS(const char **name, int *major, int *minor, int *teeny);
-extern _X_EXPORT Bool LoaderShouldIgnoreABI(void);
-extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass);
-
-typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *);
-typedef void (*ModuleTearDownProc)(pointer);
-#define MODULESETUPPROTO(func) pointer func(pointer, pointer, int*, int*)
-#define MODULETEARDOWNPROTO(func) void func(pointer)
-
-typedef struct {
- XF86ModuleVersionInfo * vers;
- ModuleSetupProc setup;
- ModuleTearDownProc teardown;
-} XF86ModuleData;
-
-#endif /* _XF86STR_H */
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains the parts of the loader interface that are visible
+ * to modules. This is the only loader-related header that modules should
+ * include.
+ *
+ * It should include a bare minimum of other headers.
+ *
+ * Longer term, the module/loader code should probably live directly under
+ * Xserver/.
+ *
+ * XXX This file arguably belongs in xfree86/loader/.
+ */
+
+#ifndef _XF86MODULE_H
+#define _XF86MODULE_H
+
+#include "misc.h"
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+
+typedef enum {
+ LD_RESOLV_IFDONE = 0, /* only check if no more
+ delays pending */
+ LD_RESOLV_NOW = 1, /* finish one delay step */
+ LD_RESOLV_FORCE = 2 /* force checking... */
+} LoaderResolveOptions;
+
+#define DEFAULT_LIST ((char *)-1)
+
+/* This indicates a special module that doesn't have the usual entry point */
+#define EXTERN_MODULE ((pointer)-1)
+
+/* Built-in ABI classes. These definitions must not be changed. */
+#define ABI_CLASS_NONE NULL
+#define ABI_CLASS_ANSIC "X.Org ANSI C Emulation"
+#define ABI_CLASS_VIDEODRV "X.Org Video Driver"
+#define ABI_CLASS_XINPUT "X.Org XInput driver"
+#define ABI_CLASS_EXTENSION "X.Org Server Extension"
+#define ABI_CLASS_FONT "X.Org Font Renderer"
+
+#define ABI_MINOR_MASK 0x0000FFFF
+#define ABI_MAJOR_MASK 0xFFFF0000
+#define GET_ABI_MINOR(v) ((v) & ABI_MINOR_MASK)
+#define GET_ABI_MAJOR(v) (((v) & ABI_MAJOR_MASK) >> 16)
+#define SET_ABI_VERSION(maj, min) \
+ ((((maj) << 16) & ABI_MAJOR_MASK) | ((min) & ABI_MINOR_MASK))
+
+/*
+ * ABI versions. Each version has a major and minor revision. Modules
+ * using lower minor revisions must work with servers of a higher minor
+ * revision. There is no compatibility between different major revisions.
+ * Whenever the ABI_ANSIC_VERSION is changed, the others must also be
+ * changed. The minor revision mask is 0x0000FFFF and the major revision
+ * mask is 0xFFFF0000.
+ */
+#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
+#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(10, 0)
+#define ABI_XINPUT_VERSION SET_ABI_VERSION(12, 2)
+#define ABI_EXTENSION_VERSION SET_ABI_VERSION(5, 0)
+#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
+
+#define MODINFOSTRING1 0xef23fdc5
+#define MODINFOSTRING2 0x10dc023a
+
+#ifndef MODULEVENDORSTRING
+#define MODULEVENDORSTRING "X.Org Foundation"
+#endif
+
+/* Error return codes for errmaj. New codes must only be added at the end. */
+typedef enum {
+ LDR_NOERROR = 0,
+ LDR_NOMEM, /* memory allocation failed */
+ LDR_NOENT, /* Module file does not exist */
+ LDR_NOSUBENT, /* pre-requsite file to be sub-loaded does not exist */
+ LDR_NOSPACE, /* internal module array full */
+ LDR_NOMODOPEN, /* module file could not be opened (check errmin) */
+ LDR_UNKTYPE, /* file is not a recognized module type */
+ LDR_NOLOAD, /* type specific loader failed */
+ LDR_ONCEONLY, /* Module should only be loaded once (not an error) */
+ LDR_NOPORTOPEN, /* could not open port (check errmin) */
+ LDR_NOHARDWARE, /* could not query/initialize the hardware device */
+ LDR_MISMATCH, /* the module didn't match the spec'd requirments */
+ LDR_BADUSAGE, /* LoadModule is called with bad arguments */
+ LDR_INVALID, /* The module doesn't have a valid ModuleData object */
+ LDR_BADOS, /* The module doesn't support the OS */
+ LDR_MODSPECIFIC /* A module-specific error in the SetupProc */
+} LoaderErrorCode;
+
+/*
+ * Some common module classes. The moduleclass can be used to identify
+ * that modules loaded are of the correct type. This is a finer
+ * classification than the ABI classes even though the default set of
+ * classes have the same names. For example, not all modules that require
+ * the video driver ABI are themselves video drivers.
+ */
+#define MOD_CLASS_NONE NULL
+#define MOD_CLASS_VIDEODRV "X.Org Video Driver"
+#define MOD_CLASS_XINPUT "X.Org XInput Driver"
+#define MOD_CLASS_FONT "X.Org Font Renderer"
+#define MOD_CLASS_EXTENSION "X.Org Server Extension"
+
+/* This structure is expected to be returned by the initfunc */
+typedef struct {
+ const char * modname; /* name of module, e.g. "foo" */
+ const char * vendor; /* vendor specific string */
+ CARD32 _modinfo1_; /* constant MODINFOSTRING1/2 to find */
+ CARD32 _modinfo2_; /* infoarea with a binary editor or sign tool */
+ CARD32 xf86version; /* contains XF86_VERSION_CURRENT */
+ CARD8 majorversion; /* module-specific major version */
+ CARD8 minorversion; /* module-specific minor version */
+ CARD16 patchlevel; /* module-specific patch level */
+ const char * abiclass; /* ABI class that the module uses */
+ CARD32 abiversion; /* ABI version */
+ const char * moduleclass; /* module class description */
+ CARD32 checksum[4]; /* contains a digital signature of the */
+ /* version info structure */
+} XF86ModuleVersionInfo;
+
+/*
+ * This structure can be used to callers of LoadModule and LoadSubModule to
+ * specify version and/or ABI requirements.
+ */
+typedef struct {
+ CARD8 majorversion; /* module-specific major version */
+ CARD8 minorversion; /* moudle-specific minor version */
+ CARD16 patchlevel; /* module-specific patch level */
+ const char * abiclass; /* ABI class that the module uses */
+ CARD32 abiversion; /* ABI version */
+ const char * moduleclass; /* module class */
+} XF86ModReqInfo;
+
+/* values to indicate unspecified fields in XF86ModReqInfo. */
+#define MAJOR_UNSPEC 0xFF
+#define MINOR_UNSPEC 0xFF
+#define PATCH_UNSPEC 0xFFFF
+#define ABI_VERS_UNSPEC 0xFFFFFFFF
+
+#define MODULE_VERSION_NUMERIC(maj, min, patch) \
+ ((((maj) & 0xFF) << 24) | (((min) & 0xFF) << 16) | (patch & 0xFFFF))
+#define GET_MODULE_MAJOR_VERSION(vers) (((vers) >> 24) & 0xFF)
+#define GET_MODULE_MINOR_VERSION(vers) (((vers) >> 16) & 0xFF)
+#define GET_MODULE_PATCHLEVEL(vers) ((vers) & 0xFFFF)
+
+#define INITARGS void
+
+typedef void (*InitExtension)(INITARGS);
+
+typedef struct {
+ InitExtension initFunc;
+ const char * name;
+ Bool *disablePtr;
+ InitExtension setupFunc;
+ const char ** initDependencies;
+} ExtensionModule;
+
+extern _X_EXPORT ExtensionModule *ExtensionModuleList;
+
+/* Prototypes for Loader functions that are exported to modules */
+extern _X_EXPORT pointer LoadSubModule(pointer, const char *, const char **,
+ const char **, pointer, const XF86ModReqInfo *,
+ int *, int *);
+extern _X_EXPORT void UnloadSubModule(pointer);
+extern _X_EXPORT void UnloadModule (pointer);
+extern _X_EXPORT pointer LoaderSymbol(const char *);
+extern _X_EXPORT char **LoaderListDirs(const char **, const char **);
+extern _X_EXPORT void LoaderFreeDirList(char **);
+extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
+extern _X_EXPORT void LoadExtension(ExtensionModule *, Bool);
+extern _X_EXPORT void LoaderGetOS(const char **name, int *major, int *minor, int *teeny);
+extern _X_EXPORT Bool LoaderShouldIgnoreABI(void);
+extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass);
+
+typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *);
+typedef void (*ModuleTearDownProc)(pointer);
+#define MODULESETUPPROTO(func) pointer func(pointer, pointer, int*, int*)
+#define MODULETEARDOWNPROTO(func) void func(pointer)
+
+typedef struct {
+ XF86ModuleVersionInfo * vers;
+ ModuleSetupProc setup;
+ ModuleTearDownProc teardown;
+} XF86ModuleData;
+
+#endif /* _XF86STR_H */
diff --git a/xorg-server/hw/xfree86/common/xf86Option.c b/xorg-server/hw/xfree86/common/xf86Option.c
index 480f38694..08f143347 100644
--- a/xorg-server/hw/xfree86/common/xf86Option.c
+++ b/xorg-server/hw/xfree86/common/xf86Option.c
@@ -1,916 +1,916 @@
-/*
- * Copyright (c) 1998-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-/*
- * Author: David Dawes <dawes@xfree86.org>
- *
- * This file includes public option handling functions.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Xinput.h"
-#include "xf86Optrec.h"
-#include "xf86Parser.h"
-
-static Bool ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
- Bool markUsed);
-
-/*
- * xf86CollectOptions collects the options from each of the config file
- * sections used by the screen and puts the combined list in pScrn->options.
- * This function requires that the following have been initialised:
- *
- * pScrn->confScreen
- * pScrn->Entities[i]->device
- * pScrn->display
- * pScrn->monitor
- *
- * The extraOpts parameter may optionally contain a list of additional options
- * to include.
- *
- * The order of precedence for options is:
- *
- * extraOpts, display, confScreen, monitor, device
- */
-
-void
-xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts)
-{
- XF86OptionPtr tmp;
- XF86OptionPtr extras = (XF86OptionPtr)extraOpts;
- GDevPtr device;
-
- int i;
-
- pScrn->options = NULL;
-
- for (i=pScrn->numEntities - 1; i >= 0; i--) {
- device = xf86GetDevFromEntity(pScrn->entityList[i],
- pScrn->entityInstanceList[i]);
- if (device && device->options) {
- tmp = xf86optionListDup(device->options);
- if (pScrn->options)
- xf86optionListMerge(pScrn->options,tmp);
- else
- pScrn->options = tmp;
- }
- }
- if (pScrn->monitor->options) {
- tmp = xf86optionListDup(pScrn->monitor->options);
- if (pScrn->options)
- pScrn->options = xf86optionListMerge(pScrn->options, tmp);
- else
- pScrn->options = tmp;
- }
- if (pScrn->confScreen->options) {
- tmp = xf86optionListDup(pScrn->confScreen->options);
- if (pScrn->options)
- pScrn->options = xf86optionListMerge(pScrn->options, tmp);
- else
- pScrn->options = tmp;
- }
- if (pScrn->display->options) {
- tmp = xf86optionListDup(pScrn->display->options);
- if (pScrn->options)
- pScrn->options = xf86optionListMerge(pScrn->options, tmp);
- else
- pScrn->options = tmp;
- }
- if (extras) {
- tmp = xf86optionListDup(extras);
- if (pScrn->options)
- pScrn->options = xf86optionListMerge(pScrn->options, tmp);
- else
- pScrn->options = tmp;
- }
-}
-
-/*
- * xf86CollectInputOptions collects extra options for an InputDevice (other
- * than those added by the config backend).
- * The options are merged into the existing ones and thus take precedence
- * over the others.
- */
-
-void
-xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts)
-{
- if (defaultOpts) {
- XF86OptionPtr tmp =xf86optionListCreate(defaultOpts, -1, 0);
- if (pInfo->options)
- pInfo->options = xf86optionListMerge(tmp, pInfo->options);
- else
- pInfo->options = tmp;
- }
-}
-
-/**
- * Duplicate the option list passed in. The returned pointer will be a newly
- * allocated option list and must be freed by the caller.
- */
-pointer
-xf86OptionListDuplicate(pointer options)
-{
- pointer o = NULL;
-
- while (options)
- {
- o = xf86AddNewOption(o, xf86OptionName(options), xf86OptionValue(options));
- options = xf86nextOption(options);
- }
-
- return o;
-}
-
-
-/* Created for new XInput stuff -- essentially extensions to the parser */
-
-static int
-LookupIntOption(pointer optlist, const char *name, int deflt, Bool markUsed)
-{
- OptionInfoRec o;
-
- o.name = name;
- o.type = OPTV_INTEGER;
- if (ParseOptionValue(-1, optlist, &o, markUsed))
- deflt = o.value.num;
- return deflt;
-}
-
-
-static double
-LookupRealOption(pointer optlist, const char *name, double deflt,
- Bool markUsed)
-{
- OptionInfoRec o;
-
- o.name = name;
- o.type = OPTV_REAL;
- if (ParseOptionValue(-1, optlist, &o, markUsed))
- deflt = o.value.realnum;
- return deflt;
-}
-
-
-static char *
-LookupStrOption(pointer optlist, const char *name, char *deflt, Bool markUsed)
-{
- OptionInfoRec o;
-
- o.name = name;
- o.type = OPTV_STRING;
- if (ParseOptionValue(-1, optlist, &o, markUsed))
- deflt = o.value.str;
- if (deflt)
- return strdup(deflt);
- else
- return NULL;
-}
-
-
-static int
-LookupBoolOption(pointer optlist, const char *name, int deflt, Bool markUsed)
-{
- OptionInfoRec o;
-
- o.name = name;
- o.type = OPTV_BOOLEAN;
- if (ParseOptionValue(-1, optlist, &o, markUsed))
- deflt = o.value.bool;
- return deflt;
-}
-
-static double
-LookupPercentOption(pointer optlist, const char *name, double deflt, Bool markUsed)
-{
- OptionInfoRec o;
-
- o.name = name;
- o.type = OPTV_PERCENT;
- if (ParseOptionValue(-1, optlist, &o, markUsed))
- deflt = o.value.realnum;
- return deflt;
-}
-
-/* These xf86Set* functions are intended for use by non-screen specific code */
-
-int
-xf86SetIntOption(pointer optlist, const char *name, int deflt)
-{
- return LookupIntOption(optlist, name, deflt, TRUE);
-}
-
-
-double
-xf86SetRealOption(pointer optlist, const char *name, double deflt)
-{
- return LookupRealOption(optlist, name, deflt, TRUE);
-}
-
-
-char *
-xf86SetStrOption(pointer optlist, const char *name, char *deflt)
-{
- return LookupStrOption(optlist, name, deflt, TRUE);
-}
-
-
-int
-xf86SetBoolOption(pointer optlist, const char *name, int deflt)
-{
- return LookupBoolOption(optlist, name, deflt, TRUE);
-}
-
-double
-xf86SetPercentOption(pointer optlist, const char *name, double deflt)
-{
- return LookupPercentOption(optlist, name, deflt, TRUE);
-}
-
-/*
- * These are like the Set*Option functions, but they don't mark the options
- * as used.
- */
-int
-xf86CheckIntOption(pointer optlist, const char *name, int deflt)
-{
- return LookupIntOption(optlist, name, deflt, FALSE);
-}
-
-
-double
-xf86CheckRealOption(pointer optlist, const char *name, double deflt)
-{
- return LookupRealOption(optlist, name, deflt, FALSE);
-}
-
-
-char *
-xf86CheckStrOption(pointer optlist, const char *name, char *deflt)
-{
- return LookupStrOption(optlist, name, deflt, FALSE);
-}
-
-
-int
-xf86CheckBoolOption(pointer optlist, const char *name, int deflt)
-{
- return LookupBoolOption(optlist, name, deflt, FALSE);
-}
-
-
-double
-xf86CheckPercentOption(pointer optlist, const char *name, double deflt)
-{
- return LookupPercentOption(optlist, name, deflt, FALSE);
-}
-/*
- * addNewOption() has the required property of replacing the option value
- * if the option is already present.
- */
-pointer
-xf86ReplaceIntOption(pointer optlist, const char *name, const int val)
-{
- char tmp[16];
- sprintf(tmp,"%i",val);
- return xf86AddNewOption(optlist,name,tmp);
-}
-
-pointer
-xf86ReplaceRealOption(pointer optlist, const char *name, const double val)
-{
- char tmp[32];
- snprintf(tmp,32,"%f",val);
- return xf86AddNewOption(optlist,name,tmp);
-}
-
-pointer
-xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val)
-{
- return xf86AddNewOption(optlist,name,val?"True":"False");
-}
-
-pointer
-xf86ReplacePercentOption(pointer optlist, const char *name, const double val)
-{
- char tmp[16];
- sprintf(tmp, "%lf%%", val);
- return xf86AddNewOption(optlist,name,tmp);
-}
-
-pointer
-xf86ReplaceStrOption(pointer optlist, const char *name, const char* val)
-{
- return xf86AddNewOption(optlist,name,val);
-}
-
-pointer
-xf86AddNewOption(pointer head, const char *name, const char *val)
-{
- /* XXX These should actually be allocated in the parser library. */
- char *tmp = strdup(val);
- char *tmp_name = strdup(name);
-
- return xf86addNewOption(head, tmp_name, tmp);
-}
-
-
-pointer
-xf86NewOption(char *name, char *value)
-{
- return xf86newOption(name, value);
-}
-
-
-pointer
-xf86NextOption(pointer list)
-{
- return xf86nextOption(list);
-}
-
-pointer
-xf86OptionListCreate(const char **options, int count, int used)
-{
- return xf86optionListCreate(options, count, used);
-}
-
-pointer
-xf86OptionListMerge(pointer head, pointer tail)
-{
- return xf86optionListMerge(head, tail);
-}
-
-void
-xf86OptionListFree(pointer opt)
-{
- xf86optionListFree(opt);
-}
-
-char *
-xf86OptionName(pointer opt)
-{
- return xf86optionName(opt);
-}
-
-char *
-xf86OptionValue(pointer opt)
-{
- return xf86optionValue(opt);
-}
-
-void
-xf86OptionListReport(pointer parm)
-{
- XF86OptionPtr opts = parm;
-
- while(opts) {
- if (xf86optionValue(opts))
- xf86ErrorFVerb(5, "\tOption \"%s\" \"%s\"\n",
- xf86optionName(opts), xf86optionValue(opts));
- else
- xf86ErrorFVerb( 5, "\tOption \"%s\"\n", xf86optionName(opts));
- opts = xf86nextOption(opts);
- }
-}
-
-/* End of XInput-caused section */
-
-pointer
-xf86FindOption(pointer options, const char *name)
-{
- return xf86findOption(options, name);
-}
-
-
-char *
-xf86FindOptionValue(pointer options, const char *name)
-{
- return xf86findOptionValue(options, name);
-}
-
-
-void
-xf86MarkOptionUsed(pointer option)
-{
- if (option != NULL)
- ((XF86OptionPtr)option)->opt_used = TRUE;
-}
-
-
-void
-xf86MarkOptionUsedByName(pointer options, const char *name)
-{
- XF86OptionPtr opt;
-
- opt = xf86findOption(options, name);
- if (opt != NULL)
- opt->opt_used = TRUE;
-}
-
-Bool
-xf86CheckIfOptionUsed(pointer option)
-{
- if (option != NULL)
- return ((XF86OptionPtr)option)->opt_used;
- else
- return FALSE;
-}
-
-Bool
-xf86CheckIfOptionUsedByName(pointer options, const char *name)
-{
- XF86OptionPtr opt;
-
- opt = xf86findOption(options, name);
- if (opt != NULL)
- return opt->opt_used;
- else
- return FALSE;
-}
-
-void
-xf86ShowUnusedOptions(int scrnIndex, pointer options)
-{
- XF86OptionPtr opt = options;
-
- while (opt) {
- if (opt->opt_name && !opt->opt_used) {
- xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" is not used\n",
- opt->opt_name);
- }
- opt = opt->list.next;
- }
-}
-
-
-static Bool
-GetBoolValue(OptionInfoPtr p, const char *s)
-{
- return xf86getBoolValue(&p->value.bool, s);
-}
-
-static Bool
-ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
- Bool markUsed)
-{
- char *s, *end;
- Bool wasUsed = FALSE;
-
- if ((s = xf86findOptionValue(options, p->name)) != NULL) {
- if (markUsed) {
- wasUsed = xf86CheckIfOptionUsedByName(options, p->name);
- xf86MarkOptionUsedByName(options, p->name);
- }
- switch (p->type) {
- case OPTV_INTEGER:
- if (*s == '\0') {
- if (markUsed) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires an integer value\n",
- p->name);
- }
- p->found = FALSE;
- } else {
- p->value.num = strtoul(s, &end, 0);
- if (*end == '\0') {
- p->found = TRUE;
- } else {
- if (markUsed) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires an integer value\n",
- p->name);
- }
- p->found = FALSE;
- }
- }
- break;
- case OPTV_STRING:
- if (*s == '\0') {
- if (markUsed) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires an string value\n",
- p->name);
- }
- p->found = FALSE;
- } else {
- p->value.str = s;
- p->found = TRUE;
- }
- break;
- case OPTV_ANYSTR:
- p->value.str = s;
- p->found = TRUE;
- break;
- case OPTV_REAL:
- if (*s == '\0') {
- if (markUsed) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires a floating point "
- "value\n", p->name);
- }
- p->found = FALSE;
- } else {
- p->value.realnum = strtod(s, &end);
- if (*end == '\0') {
- p->found = TRUE;
- } else {
- if (markUsed) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires a floating point "
- "value\n", p->name);
- }
- p->found = FALSE;
- }
- }
- break;
- case OPTV_BOOLEAN:
- if (GetBoolValue(p, s)) {
- p->found = TRUE;
- } else {
- if (markUsed) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires a boolean value\n",
- p->name);
- }
- p->found = FALSE;
- }
- break;
- case OPTV_PERCENT:
- {
- char tmp = 0;
- /* awkward match, but %% doesn't increase the match counter,
- * hence 100 looks the same as 100% to the caller of sccanf
- */
- if (sscanf(s, "%lf%c", &p->value.realnum, &tmp) != 2 || tmp != '%') {
- if (markUsed) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires a percent value\n", p->name);
- }
- p->found = FALSE;
- } else {
- p->found = TRUE;
- }
- }
- break;
- case OPTV_FREQ:
- if (*s == '\0') {
- if (markUsed) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires a frequency value\n",
- p->name);
- }
- p->found = FALSE;
- } else {
- double freq = strtod(s, &end);
- int units = 0;
-
- if (end != s) {
- p->found = TRUE;
- if (!xf86NameCmp(end, "Hz"))
- units = 1;
- else if (!xf86NameCmp(end, "kHz") ||
- !xf86NameCmp(end, "k"))
- units = 1000;
- else if (!xf86NameCmp(end, "MHz") ||
- !xf86NameCmp(end, "M"))
- units = 1000000;
- else {
- if (markUsed) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires a frequency value\n",
- p->name);
- }
- p->found = FALSE;
- }
- if (p->found)
- freq *= (double)units;
- } else {
- if (markUsed) {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires a frequency value\n",
- p->name);
- }
- p->found = FALSE;
- }
- if (p->found) {
- p->value.freq.freq = freq;
- p->value.freq.units = units;
- }
- }
- break;
- case OPTV_NONE:
- /* Should never get here */
- p->found = FALSE;
- break;
- }
- if (p->found && markUsed) {
- int verb = 2;
- if (wasUsed)
- verb = 4;
- xf86DrvMsgVerb(scrnIndex, X_CONFIG, verb, "Option \"%s\"", p->name);
- if (!(p->type == OPTV_BOOLEAN && *s == 0)) {
- xf86ErrorFVerb(verb, " \"%s\"", s);
- }
- xf86ErrorFVerb(verb, "\n");
- }
- } else if (p->type == OPTV_BOOLEAN) {
- /* Look for matches with options with or without a "No" prefix. */
- char *n, *newn;
- OptionInfoRec opt;
-
- n = xf86NormalizeName(p->name);
- if (!n) {
- p->found = FALSE;
- return FALSE;
- }
- if (strncmp(n, "no", 2) == 0) {
- newn = n + 2;
- } else {
- free(n);
- if (asprintf(&n, "No%s", p->name) == -1) {
- p->found = FALSE;
- return FALSE;
- }
- newn = n;
- }
- if ((s = xf86findOptionValue(options, newn)) != NULL) {
- if (markUsed)
- xf86MarkOptionUsedByName(options, newn);
- if (GetBoolValue(&opt, s)) {
- p->value.bool = !opt.value.bool;
- p->found = TRUE;
- } else {
- xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires a boolean value\n", newn);
- p->found = FALSE;
- }
- } else {
- p->found = FALSE;
- }
- if (p->found && markUsed) {
- xf86DrvMsgVerb(scrnIndex, X_CONFIG, 2, "Option \"%s\"", newn);
- if (*s != 0) {
- xf86ErrorFVerb(2, " \"%s\"", s);
- }
- xf86ErrorFVerb(2, "\n");
- }
- free(n);
- } else {
- p->found = FALSE;
- }
- return p->found;
-}
-
-
-void
-xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo)
-{
- OptionInfoPtr p;
-
- for (p = optinfo; p->name != NULL; p++) {
- ParseOptionValue(scrnIndex, options, p, TRUE);
- }
-}
-
-
-OptionInfoPtr
-xf86TokenToOptinfo(const OptionInfoRec *table, int token)
-{
- const OptionInfoRec *p, *match = NULL, *set = NULL;
-
- if (!table) {
- ErrorF("xf86TokenToOptinfo: table is NULL\n");
- return NULL;
- }
-
- for (p = table; p->token >= 0; p++) {
- if (p->token == token) {
- match = p;
- if (p->found)
- set = p;
- }
- }
-
- if (set)
- return (OptionInfoPtr)set;
- else if (match)
- return (OptionInfoPtr)match;
- else
- return NULL;
-}
-
-
-const char *
-xf86TokenToOptName(const OptionInfoRec *table, int token)
-{
- const OptionInfoRec *p;
-
- p = xf86TokenToOptinfo(table, token);
- return p->name;
-}
-
-
-Bool
-xf86IsOptionSet(const OptionInfoRec *table, int token)
-{
- OptionInfoPtr p;
-
- p = xf86TokenToOptinfo(table, token);
- return p && p->found;
-}
-
-
-char *
-xf86GetOptValString(const OptionInfoRec *table, int token)
-{
- OptionInfoPtr p;
-
- p = xf86TokenToOptinfo(table, token);
- if (p && p->found)
- return p->value.str;
- else
- return NULL;
-}
-
-
-Bool
-xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value)
-{
- OptionInfoPtr p;
-
- p = xf86TokenToOptinfo(table, token);
- if (p && p->found) {
- *value = p->value.num;
- return TRUE;
- } else
- return FALSE;
-}
-
-
-Bool
-xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value)
-{
- OptionInfoPtr p;
-
- p = xf86TokenToOptinfo(table, token);
- if (p && p->found) {
- *value = p->value.num;
- return TRUE;
- } else
- return FALSE;
-}
-
-
-Bool
-xf86GetOptValReal(const OptionInfoRec *table, int token, double *value)
-{
- OptionInfoPtr p;
-
- p = xf86TokenToOptinfo(table, token);
- if (p && p->found) {
- *value = p->value.realnum;
- return TRUE;
- } else
- return FALSE;
-}
-
-
-Bool
-xf86GetOptValFreq(const OptionInfoRec *table, int token,
- OptFreqUnits expectedUnits, double *value)
-{
- OptionInfoPtr p;
-
- p = xf86TokenToOptinfo(table, token);
- if (p && p->found) {
- if (p->value.freq.units > 0) {
- /* Units give, so the scaling is known. */
- switch (expectedUnits) {
- case OPTUNITS_HZ:
- *value = p->value.freq.freq;
- break;
- case OPTUNITS_KHZ:
- *value = p->value.freq.freq / 1000.0;
- break;
- case OPTUNITS_MHZ:
- *value = p->value.freq.freq / 1000000.0;
- break;
- }
- } else {
- /* No units given, so try to guess the scaling. */
- switch (expectedUnits) {
- case OPTUNITS_HZ:
- *value = p->value.freq.freq;
- break;
- case OPTUNITS_KHZ:
- if (p->value.freq.freq > 1000.0)
- *value = p->value.freq.freq / 1000.0;
- else
- *value = p->value.freq.freq;
- break;
- case OPTUNITS_MHZ:
- if (p->value.freq.freq > 1000000.0)
- *value = p->value.freq.freq / 1000000.0;
- else if (p->value.freq.freq > 1000.0)
- *value = p->value.freq.freq / 1000.0;
- else
- *value = p->value.freq.freq;
- }
- }
- return TRUE;
- } else
- return FALSE;
-}
-
-
-Bool
-xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value)
-{
- OptionInfoPtr p;
-
- p = xf86TokenToOptinfo(table, token);
- if (p && p->found) {
- *value = p->value.bool;
- return TRUE;
- } else
- return FALSE;
-}
-
-
-Bool
-xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def)
-{
- OptionInfoPtr p;
-
- p = xf86TokenToOptinfo(table, token);
- if (p && p->found) {
- return p->value.bool;
- } else
- return def;
-}
-
-
-int
-xf86NameCmp(const char *s1, const char *s2)
-{
- return xf86nameCompare(s1, s2);
-}
-
-char *
-xf86NormalizeName(const char *s)
-{
- char *ret, *q;
- const char *p;
-
- if (s == NULL)
- return NULL;
-
- ret = malloc(strlen(s) + 1);
- for (p = s, q = ret; *p != 0; p++) {
- switch (*p) {
- case '_':
- case ' ':
- case '\t':
- continue;
- default:
- if (isupper(*p))
- *q++ = tolower(*p);
- else
- *q++ = *p;
- }
- }
- *q = '\0';
- return ret;
-}
+/*
+ * Copyright (c) 1998-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * Author: David Dawes <dawes@xfree86.org>
+ *
+ * This file includes public option handling functions.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <stdlib.h>
+#include <ctype.h>
+#include <X11/X.h>
+#include "os.h"
+#include "xf86.h"
+#include "xf86Xinput.h"
+#include "xf86Optrec.h"
+#include "xf86Parser.h"
+
+static Bool ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
+ Bool markUsed);
+
+/*
+ * xf86CollectOptions collects the options from each of the config file
+ * sections used by the screen and puts the combined list in pScrn->options.
+ * This function requires that the following have been initialised:
+ *
+ * pScrn->confScreen
+ * pScrn->Entities[i]->device
+ * pScrn->display
+ * pScrn->monitor
+ *
+ * The extraOpts parameter may optionally contain a list of additional options
+ * to include.
+ *
+ * The order of precedence for options is:
+ *
+ * extraOpts, display, confScreen, monitor, device
+ */
+
+void
+xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts)
+{
+ XF86OptionPtr tmp;
+ XF86OptionPtr extras = (XF86OptionPtr)extraOpts;
+ GDevPtr device;
+
+ int i;
+
+ pScrn->options = NULL;
+
+ for (i=pScrn->numEntities - 1; i >= 0; i--) {
+ device = xf86GetDevFromEntity(pScrn->entityList[i],
+ pScrn->entityInstanceList[i]);
+ if (device && device->options) {
+ tmp = xf86optionListDup(device->options);
+ if (pScrn->options)
+ xf86optionListMerge(pScrn->options,tmp);
+ else
+ pScrn->options = tmp;
+ }
+ }
+ if (pScrn->monitor->options) {
+ tmp = xf86optionListDup(pScrn->monitor->options);
+ if (pScrn->options)
+ pScrn->options = xf86optionListMerge(pScrn->options, tmp);
+ else
+ pScrn->options = tmp;
+ }
+ if (pScrn->confScreen->options) {
+ tmp = xf86optionListDup(pScrn->confScreen->options);
+ if (pScrn->options)
+ pScrn->options = xf86optionListMerge(pScrn->options, tmp);
+ else
+ pScrn->options = tmp;
+ }
+ if (pScrn->display->options) {
+ tmp = xf86optionListDup(pScrn->display->options);
+ if (pScrn->options)
+ pScrn->options = xf86optionListMerge(pScrn->options, tmp);
+ else
+ pScrn->options = tmp;
+ }
+ if (extras) {
+ tmp = xf86optionListDup(extras);
+ if (pScrn->options)
+ pScrn->options = xf86optionListMerge(pScrn->options, tmp);
+ else
+ pScrn->options = tmp;
+ }
+}
+
+/*
+ * xf86CollectInputOptions collects extra options for an InputDevice (other
+ * than those added by the config backend).
+ * The options are merged into the existing ones and thus take precedence
+ * over the others.
+ */
+
+void
+xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts)
+{
+ if (defaultOpts) {
+ XF86OptionPtr tmp =xf86optionListCreate(defaultOpts, -1, 0);
+ if (pInfo->options)
+ pInfo->options = xf86optionListMerge(tmp, pInfo->options);
+ else
+ pInfo->options = tmp;
+ }
+}
+
+/**
+ * Duplicate the option list passed in. The returned pointer will be a newly
+ * allocated option list and must be freed by the caller.
+ */
+pointer
+xf86OptionListDuplicate(pointer options)
+{
+ pointer o = NULL;
+
+ while (options)
+ {
+ o = xf86AddNewOption(o, xf86OptionName(options), xf86OptionValue(options));
+ options = xf86nextOption(options);
+ }
+
+ return o;
+}
+
+
+/* Created for new XInput stuff -- essentially extensions to the parser */
+
+static int
+LookupIntOption(pointer optlist, const char *name, int deflt, Bool markUsed)
+{
+ OptionInfoRec o;
+
+ o.name = name;
+ o.type = OPTV_INTEGER;
+ if (ParseOptionValue(-1, optlist, &o, markUsed))
+ deflt = o.value.num;
+ return deflt;
+}
+
+
+static double
+LookupRealOption(pointer optlist, const char *name, double deflt,
+ Bool markUsed)
+{
+ OptionInfoRec o;
+
+ o.name = name;
+ o.type = OPTV_REAL;
+ if (ParseOptionValue(-1, optlist, &o, markUsed))
+ deflt = o.value.realnum;
+ return deflt;
+}
+
+
+static char *
+LookupStrOption(pointer optlist, const char *name, char *deflt, Bool markUsed)
+{
+ OptionInfoRec o;
+
+ o.name = name;
+ o.type = OPTV_STRING;
+ if (ParseOptionValue(-1, optlist, &o, markUsed))
+ deflt = o.value.str;
+ if (deflt)
+ return strdup(deflt);
+ else
+ return NULL;
+}
+
+
+static int
+LookupBoolOption(pointer optlist, const char *name, int deflt, Bool markUsed)
+{
+ OptionInfoRec o;
+
+ o.name = name;
+ o.type = OPTV_BOOLEAN;
+ if (ParseOptionValue(-1, optlist, &o, markUsed))
+ deflt = o.value.bool;
+ return deflt;
+}
+
+static double
+LookupPercentOption(pointer optlist, const char *name, double deflt, Bool markUsed)
+{
+ OptionInfoRec o;
+
+ o.name = name;
+ o.type = OPTV_PERCENT;
+ if (ParseOptionValue(-1, optlist, &o, markUsed))
+ deflt = o.value.realnum;
+ return deflt;
+}
+
+/* These xf86Set* functions are intended for use by non-screen specific code */
+
+int
+xf86SetIntOption(pointer optlist, const char *name, int deflt)
+{
+ return LookupIntOption(optlist, name, deflt, TRUE);
+}
+
+
+double
+xf86SetRealOption(pointer optlist, const char *name, double deflt)
+{
+ return LookupRealOption(optlist, name, deflt, TRUE);
+}
+
+
+char *
+xf86SetStrOption(pointer optlist, const char *name, char *deflt)
+{
+ return LookupStrOption(optlist, name, deflt, TRUE);
+}
+
+
+int
+xf86SetBoolOption(pointer optlist, const char *name, int deflt)
+{
+ return LookupBoolOption(optlist, name, deflt, TRUE);
+}
+
+double
+xf86SetPercentOption(pointer optlist, const char *name, double deflt)
+{
+ return LookupPercentOption(optlist, name, deflt, TRUE);
+}
+
+/*
+ * These are like the Set*Option functions, but they don't mark the options
+ * as used.
+ */
+int
+xf86CheckIntOption(pointer optlist, const char *name, int deflt)
+{
+ return LookupIntOption(optlist, name, deflt, FALSE);
+}
+
+
+double
+xf86CheckRealOption(pointer optlist, const char *name, double deflt)
+{
+ return LookupRealOption(optlist, name, deflt, FALSE);
+}
+
+
+char *
+xf86CheckStrOption(pointer optlist, const char *name, char *deflt)
+{
+ return LookupStrOption(optlist, name, deflt, FALSE);
+}
+
+
+int
+xf86CheckBoolOption(pointer optlist, const char *name, int deflt)
+{
+ return LookupBoolOption(optlist, name, deflt, FALSE);
+}
+
+
+double
+xf86CheckPercentOption(pointer optlist, const char *name, double deflt)
+{
+ return LookupPercentOption(optlist, name, deflt, FALSE);
+}
+/*
+ * addNewOption() has the required property of replacing the option value
+ * if the option is already present.
+ */
+pointer
+xf86ReplaceIntOption(pointer optlist, const char *name, const int val)
+{
+ char tmp[16];
+ sprintf(tmp,"%i",val);
+ return xf86AddNewOption(optlist,name,tmp);
+}
+
+pointer
+xf86ReplaceRealOption(pointer optlist, const char *name, const double val)
+{
+ char tmp[32];
+ snprintf(tmp,32,"%f",val);
+ return xf86AddNewOption(optlist,name,tmp);
+}
+
+pointer
+xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val)
+{
+ return xf86AddNewOption(optlist,name,val?"True":"False");
+}
+
+pointer
+xf86ReplacePercentOption(pointer optlist, const char *name, const double val)
+{
+ char tmp[16];
+ sprintf(tmp, "%lf%%", val);
+ return xf86AddNewOption(optlist,name,tmp);
+}
+
+pointer
+xf86ReplaceStrOption(pointer optlist, const char *name, const char* val)
+{
+ return xf86AddNewOption(optlist,name,val);
+}
+
+pointer
+xf86AddNewOption(pointer head, const char *name, const char *val)
+{
+ /* XXX These should actually be allocated in the parser library. */
+ char *tmp = strdup(val);
+ char *tmp_name = strdup(name);
+
+ return xf86addNewOption(head, tmp_name, tmp);
+}
+
+
+pointer
+xf86NewOption(char *name, char *value)
+{
+ return xf86newOption(name, value);
+}
+
+
+pointer
+xf86NextOption(pointer list)
+{
+ return xf86nextOption(list);
+}
+
+pointer
+xf86OptionListCreate(const char **options, int count, int used)
+{
+ return xf86optionListCreate(options, count, used);
+}
+
+pointer
+xf86OptionListMerge(pointer head, pointer tail)
+{
+ return xf86optionListMerge(head, tail);
+}
+
+void
+xf86OptionListFree(pointer opt)
+{
+ xf86optionListFree(opt);
+}
+
+char *
+xf86OptionName(pointer opt)
+{
+ return xf86optionName(opt);
+}
+
+char *
+xf86OptionValue(pointer opt)
+{
+ return xf86optionValue(opt);
+}
+
+void
+xf86OptionListReport(pointer parm)
+{
+ XF86OptionPtr opts = parm;
+
+ while(opts) {
+ if (xf86optionValue(opts))
+ xf86ErrorFVerb(5, "\tOption \"%s\" \"%s\"\n",
+ xf86optionName(opts), xf86optionValue(opts));
+ else
+ xf86ErrorFVerb( 5, "\tOption \"%s\"\n", xf86optionName(opts));
+ opts = xf86nextOption(opts);
+ }
+}
+
+/* End of XInput-caused section */
+
+pointer
+xf86FindOption(pointer options, const char *name)
+{
+ return xf86findOption(options, name);
+}
+
+
+char *
+xf86FindOptionValue(pointer options, const char *name)
+{
+ return xf86findOptionValue(options, name);
+}
+
+
+void
+xf86MarkOptionUsed(pointer option)
+{
+ if (option != NULL)
+ ((XF86OptionPtr)option)->opt_used = TRUE;
+}
+
+
+void
+xf86MarkOptionUsedByName(pointer options, const char *name)
+{
+ XF86OptionPtr opt;
+
+ opt = xf86findOption(options, name);
+ if (opt != NULL)
+ opt->opt_used = TRUE;
+}
+
+Bool
+xf86CheckIfOptionUsed(pointer option)
+{
+ if (option != NULL)
+ return ((XF86OptionPtr)option)->opt_used;
+ else
+ return FALSE;
+}
+
+Bool
+xf86CheckIfOptionUsedByName(pointer options, const char *name)
+{
+ XF86OptionPtr opt;
+
+ opt = xf86findOption(options, name);
+ if (opt != NULL)
+ return opt->opt_used;
+ else
+ return FALSE;
+}
+
+void
+xf86ShowUnusedOptions(int scrnIndex, pointer options)
+{
+ XF86OptionPtr opt = options;
+
+ while (opt) {
+ if (opt->opt_name && !opt->opt_used) {
+ xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" is not used\n",
+ opt->opt_name);
+ }
+ opt = opt->list.next;
+ }
+}
+
+
+static Bool
+GetBoolValue(OptionInfoPtr p, const char *s)
+{
+ return xf86getBoolValue(&p->value.bool, s);
+}
+
+static Bool
+ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
+ Bool markUsed)
+{
+ char *s, *end;
+ Bool wasUsed = FALSE;
+
+ if ((s = xf86findOptionValue(options, p->name)) != NULL) {
+ if (markUsed) {
+ wasUsed = xf86CheckIfOptionUsedByName(options, p->name);
+ xf86MarkOptionUsedByName(options, p->name);
+ }
+ switch (p->type) {
+ case OPTV_INTEGER:
+ if (*s == '\0') {
+ if (markUsed) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires an integer value\n",
+ p->name);
+ }
+ p->found = FALSE;
+ } else {
+ p->value.num = strtoul(s, &end, 0);
+ if (*end == '\0') {
+ p->found = TRUE;
+ } else {
+ if (markUsed) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires an integer value\n",
+ p->name);
+ }
+ p->found = FALSE;
+ }
+ }
+ break;
+ case OPTV_STRING:
+ if (*s == '\0') {
+ if (markUsed) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires an string value\n",
+ p->name);
+ }
+ p->found = FALSE;
+ } else {
+ p->value.str = s;
+ p->found = TRUE;
+ }
+ break;
+ case OPTV_ANYSTR:
+ p->value.str = s;
+ p->found = TRUE;
+ break;
+ case OPTV_REAL:
+ if (*s == '\0') {
+ if (markUsed) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires a floating point "
+ "value\n", p->name);
+ }
+ p->found = FALSE;
+ } else {
+ p->value.realnum = strtod(s, &end);
+ if (*end == '\0') {
+ p->found = TRUE;
+ } else {
+ if (markUsed) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires a floating point "
+ "value\n", p->name);
+ }
+ p->found = FALSE;
+ }
+ }
+ break;
+ case OPTV_BOOLEAN:
+ if (GetBoolValue(p, s)) {
+ p->found = TRUE;
+ } else {
+ if (markUsed) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires a boolean value\n",
+ p->name);
+ }
+ p->found = FALSE;
+ }
+ break;
+ case OPTV_PERCENT:
+ {
+ char tmp = 0;
+ /* awkward match, but %% doesn't increase the match counter,
+ * hence 100 looks the same as 100% to the caller of sccanf
+ */
+ if (sscanf(s, "%lf%c", &p->value.realnum, &tmp) != 2 || tmp != '%') {
+ if (markUsed) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires a percent value\n", p->name);
+ }
+ p->found = FALSE;
+ } else {
+ p->found = TRUE;
+ }
+ }
+ break;
+ case OPTV_FREQ:
+ if (*s == '\0') {
+ if (markUsed) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires a frequency value\n",
+ p->name);
+ }
+ p->found = FALSE;
+ } else {
+ double freq = strtod(s, &end);
+ int units = 0;
+
+ if (end != s) {
+ p->found = TRUE;
+ if (!xf86NameCmp(end, "Hz"))
+ units = 1;
+ else if (!xf86NameCmp(end, "kHz") ||
+ !xf86NameCmp(end, "k"))
+ units = 1000;
+ else if (!xf86NameCmp(end, "MHz") ||
+ !xf86NameCmp(end, "M"))
+ units = 1000000;
+ else {
+ if (markUsed) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires a frequency value\n",
+ p->name);
+ }
+ p->found = FALSE;
+ }
+ if (p->found)
+ freq *= (double)units;
+ } else {
+ if (markUsed) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires a frequency value\n",
+ p->name);
+ }
+ p->found = FALSE;
+ }
+ if (p->found) {
+ p->value.freq.freq = freq;
+ p->value.freq.units = units;
+ }
+ }
+ break;
+ case OPTV_NONE:
+ /* Should never get here */
+ p->found = FALSE;
+ break;
+ }
+ if (p->found && markUsed) {
+ int verb = 2;
+ if (wasUsed)
+ verb = 4;
+ xf86DrvMsgVerb(scrnIndex, X_CONFIG, verb, "Option \"%s\"", p->name);
+ if (!(p->type == OPTV_BOOLEAN && *s == 0)) {
+ xf86ErrorFVerb(verb, " \"%s\"", s);
+ }
+ xf86ErrorFVerb(verb, "\n");
+ }
+ } else if (p->type == OPTV_BOOLEAN) {
+ /* Look for matches with options with or without a "No" prefix. */
+ char *n, *newn;
+ OptionInfoRec opt;
+
+ n = xf86NormalizeName(p->name);
+ if (!n) {
+ p->found = FALSE;
+ return FALSE;
+ }
+ if (strncmp(n, "no", 2) == 0) {
+ newn = n + 2;
+ } else {
+ free(n);
+ if (asprintf(&n, "No%s", p->name) == -1) {
+ p->found = FALSE;
+ return FALSE;
+ }
+ newn = n;
+ }
+ if ((s = xf86findOptionValue(options, newn)) != NULL) {
+ if (markUsed)
+ xf86MarkOptionUsedByName(options, newn);
+ if (GetBoolValue(&opt, s)) {
+ p->value.bool = !opt.value.bool;
+ p->found = TRUE;
+ } else {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Option \"%s\" requires a boolean value\n", newn);
+ p->found = FALSE;
+ }
+ } else {
+ p->found = FALSE;
+ }
+ if (p->found && markUsed) {
+ xf86DrvMsgVerb(scrnIndex, X_CONFIG, 2, "Option \"%s\"", newn);
+ if (*s != 0) {
+ xf86ErrorFVerb(2, " \"%s\"", s);
+ }
+ xf86ErrorFVerb(2, "\n");
+ }
+ free(n);
+ } else {
+ p->found = FALSE;
+ }
+ return p->found;
+}
+
+
+void
+xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo)
+{
+ OptionInfoPtr p;
+
+ for (p = optinfo; p->name != NULL; p++) {
+ ParseOptionValue(scrnIndex, options, p, TRUE);
+ }
+}
+
+
+OptionInfoPtr
+xf86TokenToOptinfo(const OptionInfoRec *table, int token)
+{
+ const OptionInfoRec *p, *match = NULL, *set = NULL;
+
+ if (!table) {
+ ErrorF("xf86TokenToOptinfo: table is NULL\n");
+ return NULL;
+ }
+
+ for (p = table; p->token >= 0; p++) {
+ if (p->token == token) {
+ match = p;
+ if (p->found)
+ set = p;
+ }
+ }
+
+ if (set)
+ return (OptionInfoPtr)set;
+ else if (match)
+ return (OptionInfoPtr)match;
+ else
+ return NULL;
+}
+
+
+const char *
+xf86TokenToOptName(const OptionInfoRec *table, int token)
+{
+ const OptionInfoRec *p;
+
+ p = xf86TokenToOptinfo(table, token);
+ return p->name;
+}
+
+
+Bool
+xf86IsOptionSet(const OptionInfoRec *table, int token)
+{
+ OptionInfoPtr p;
+
+ p = xf86TokenToOptinfo(table, token);
+ return p && p->found;
+}
+
+
+char *
+xf86GetOptValString(const OptionInfoRec *table, int token)
+{
+ OptionInfoPtr p;
+
+ p = xf86TokenToOptinfo(table, token);
+ if (p && p->found)
+ return p->value.str;
+ else
+ return NULL;
+}
+
+
+Bool
+xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value)
+{
+ OptionInfoPtr p;
+
+ p = xf86TokenToOptinfo(table, token);
+ if (p && p->found) {
+ *value = p->value.num;
+ return TRUE;
+ } else
+ return FALSE;
+}
+
+
+Bool
+xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value)
+{
+ OptionInfoPtr p;
+
+ p = xf86TokenToOptinfo(table, token);
+ if (p && p->found) {
+ *value = p->value.num;
+ return TRUE;
+ } else
+ return FALSE;
+}
+
+
+Bool
+xf86GetOptValReal(const OptionInfoRec *table, int token, double *value)
+{
+ OptionInfoPtr p;
+
+ p = xf86TokenToOptinfo(table, token);
+ if (p && p->found) {
+ *value = p->value.realnum;
+ return TRUE;
+ } else
+ return FALSE;
+}
+
+
+Bool
+xf86GetOptValFreq(const OptionInfoRec *table, int token,
+ OptFreqUnits expectedUnits, double *value)
+{
+ OptionInfoPtr p;
+
+ p = xf86TokenToOptinfo(table, token);
+ if (p && p->found) {
+ if (p->value.freq.units > 0) {
+ /* Units give, so the scaling is known. */
+ switch (expectedUnits) {
+ case OPTUNITS_HZ:
+ *value = p->value.freq.freq;
+ break;
+ case OPTUNITS_KHZ:
+ *value = p->value.freq.freq / 1000.0;
+ break;
+ case OPTUNITS_MHZ:
+ *value = p->value.freq.freq / 1000000.0;
+ break;
+ }
+ } else {
+ /* No units given, so try to guess the scaling. */
+ switch (expectedUnits) {
+ case OPTUNITS_HZ:
+ *value = p->value.freq.freq;
+ break;
+ case OPTUNITS_KHZ:
+ if (p->value.freq.freq > 1000.0)
+ *value = p->value.freq.freq / 1000.0;
+ else
+ *value = p->value.freq.freq;
+ break;
+ case OPTUNITS_MHZ:
+ if (p->value.freq.freq > 1000000.0)
+ *value = p->value.freq.freq / 1000000.0;
+ else if (p->value.freq.freq > 1000.0)
+ *value = p->value.freq.freq / 1000.0;
+ else
+ *value = p->value.freq.freq;
+ }
+ }
+ return TRUE;
+ } else
+ return FALSE;
+}
+
+
+Bool
+xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value)
+{
+ OptionInfoPtr p;
+
+ p = xf86TokenToOptinfo(table, token);
+ if (p && p->found) {
+ *value = p->value.bool;
+ return TRUE;
+ } else
+ return FALSE;
+}
+
+
+Bool
+xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def)
+{
+ OptionInfoPtr p;
+
+ p = xf86TokenToOptinfo(table, token);
+ if (p && p->found) {
+ return p->value.bool;
+ } else
+ return def;
+}
+
+
+int
+xf86NameCmp(const char *s1, const char *s2)
+{
+ return xf86nameCompare(s1, s2);
+}
+
+char *
+xf86NormalizeName(const char *s)
+{
+ char *ret, *q;
+ const char *p;
+
+ if (s == NULL)
+ return NULL;
+
+ ret = malloc(strlen(s) + 1);
+ for (p = s, q = ret; *p != 0; p++) {
+ switch (*p) {
+ case '_':
+ case ' ':
+ case '\t':
+ continue;
+ default:
+ if (isupper(*p))
+ *q++ = tolower(*p);
+ else
+ *q++ = *p;
+ }
+ }
+ *q = '\0';
+ return ret;
+}
diff --git a/xorg-server/hw/xfree86/common/xf86RandR.c b/xorg-server/hw/xfree86/common/xf86RandR.c
index 4663d0366..e8e5a3696 100644
--- a/xorg-server/hw/xfree86/common/xf86RandR.c
+++ b/xorg-server/hw/xfree86/common/xf86RandR.c
@@ -1,485 +1,485 @@
-/*
- *
- * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "globals.h"
-#include "xf86.h"
-#include "xf86str.h"
-#include "xf86Priv.h"
-#include "xf86DDC.h"
-#include "mipointer.h"
-#include <randrstr.h>
-#include "inputstr.h"
-
-typedef struct _xf86RandRInfo {
- CreateScreenResourcesProcPtr CreateScreenResources;
- CloseScreenProcPtr CloseScreen;
- int virtualX;
- int virtualY;
- int mmWidth;
- int mmHeight;
- Rotation rotation;
-} XF86RandRInfoRec, *XF86RandRInfoPtr;
-
-static DevPrivateKeyRec xf86RandRKeyRec;
-static DevPrivateKey xf86RandRKey;
-
-#define XF86RANDRINFO(p) ((XF86RandRInfoPtr)dixLookupPrivate(&(p)->devPrivates, xf86RandRKey))
-
-static int
-xf86RandRModeRefresh (DisplayModePtr mode)
-{
- if (mode->VRefresh)
- return (int) (mode->VRefresh + 0.5);
- else if (mode->Clock == 0)
- return 0;
- else
- return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + 0.5);
-}
-
-static Bool
-xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
-{
- RRScreenSizePtr pSize;
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- DisplayModePtr mode;
- int refresh0 = 60;
- xorgRRModeMM RRModeMM;
-
- *rotations = RR_Rotate_0;
-
- for (mode = scrp->modes; mode != NULL ; mode = mode->next)
- {
- int refresh = xf86RandRModeRefresh (mode);
-
- if (mode == scrp->modes)
- refresh0 = refresh;
-
- RRModeMM.mode = mode;
- RRModeMM.virtX = randrp->virtualX;
- RRModeMM.virtY = randrp->virtualY;
- RRModeMM.mmWidth = randrp->mmWidth;
- RRModeMM.mmHeight = randrp->mmHeight;
-
- if(scrp->DriverFunc) {
- (*scrp->DriverFunc)(scrp, RR_GET_MODE_MM, &RRModeMM);
- }
-
- pSize = RRRegisterSize (pScreen,
- mode->HDisplay, mode->VDisplay,
- RRModeMM.mmWidth, RRModeMM.mmHeight);
- if (!pSize)
- return FALSE;
- RRRegisterRate (pScreen, pSize, refresh);
- if (mode == scrp->currentMode &&
- mode->HDisplay == scrp->virtualX && mode->VDisplay == scrp->virtualY)
- RRSetCurrentConfig (pScreen, randrp->rotation, refresh, pSize);
- if (mode->next == scrp->modes)
- break;
- }
- if (scrp->currentMode->HDisplay != randrp->virtualX ||
- scrp->currentMode->VDisplay != randrp->virtualY)
- {
- mode = scrp->modes;
-
- RRModeMM.mode = NULL;
- RRModeMM.virtX = randrp->virtualX;
- RRModeMM.virtY = randrp->virtualY;
- RRModeMM.mmWidth = randrp->mmWidth;
- RRModeMM.mmHeight = randrp->mmHeight;
-
- if(scrp->DriverFunc) {
- (*scrp->DriverFunc)(scrp, RR_GET_MODE_MM, &RRModeMM);
- }
-
- pSize = RRRegisterSize (pScreen,
- randrp->virtualX, randrp->virtualY,
- RRModeMM.mmWidth, RRModeMM.mmHeight);
- if (!pSize)
- return FALSE;
- RRRegisterRate (pScreen, pSize, refresh0);
- if (scrp->virtualX == randrp->virtualX &&
- scrp->virtualY == randrp->virtualY)
- {
- RRSetCurrentConfig (pScreen, randrp->rotation, refresh0, pSize);
- }
- }
-
- /* If there is driver support for randr, let it set our supported rotations */
- if(scrp->DriverFunc) {
- xorgRRRotation RRRotation;
-
- RRRotation.RRRotations = *rotations;
- if (!(*scrp->DriverFunc)(scrp, RR_GET_INFO, &RRRotation))
- return TRUE;
- *rotations = RRRotation.RRRotations;
- }
-
- return TRUE;
-}
-
-static Bool
-xf86RandRSetMode (ScreenPtr pScreen,
- DisplayModePtr mode,
- Bool useVirtual,
- int mmWidth,
- int mmHeight)
-{
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- int oldWidth = pScreen->width;
- int oldHeight = pScreen->height;
- int oldmmWidth = pScreen->mmWidth;
- int oldmmHeight = pScreen->mmHeight;
- int oldVirtualX = scrp->virtualX;
- int oldVirtualY = scrp->virtualY;
- WindowPtr pRoot = pScreen->root;
- Bool ret = TRUE;
-
- if (pRoot && scrp->vtSema)
- (*scrp->EnableDisableFBAccess) (pScreen->myNum, FALSE);
- if (useVirtual)
- {
- scrp->virtualX = randrp->virtualX;
- scrp->virtualY = randrp->virtualY;
- }
- else
- {
- scrp->virtualX = mode->HDisplay;
- scrp->virtualY = mode->VDisplay;
- }
-
- /*
- * The DIX forgets the physical dimensions we passed into RRRegisterSize, so
- * reconstruct them if possible.
- */
- if(scrp->DriverFunc) {
- xorgRRModeMM RRModeMM;
-
- RRModeMM.mode = mode;
- RRModeMM.virtX = scrp->virtualX;
- RRModeMM.virtY = scrp->virtualY;
- RRModeMM.mmWidth = mmWidth;
- RRModeMM.mmHeight = mmHeight;
-
- (*scrp->DriverFunc)(scrp, RR_GET_MODE_MM, &RRModeMM);
-
- mmWidth = RRModeMM.mmWidth;
- mmHeight = RRModeMM.mmHeight;
- }
- if(randrp->rotation & (RR_Rotate_90 | RR_Rotate_270))
- {
- /* If the screen is rotated 90 or 270 degrees, swap the sizes. */
- pScreen->width = scrp->virtualY;
- pScreen->height = scrp->virtualX;
- pScreen->mmWidth = mmHeight;
- pScreen->mmHeight = mmWidth;
- }
- else
- {
- pScreen->width = scrp->virtualX;
- pScreen->height = scrp->virtualY;
- pScreen->mmWidth = mmWidth;
- pScreen->mmHeight = mmHeight;
- }
- if (!xf86SwitchMode (pScreen, mode))
- {
- pScreen->width = oldWidth;
- pScreen->height = oldHeight;
- pScreen->mmWidth = oldmmWidth;
- pScreen->mmHeight = oldmmHeight;
- scrp->virtualX = oldVirtualX;
- scrp->virtualY = oldVirtualY;
- ret = FALSE;
- }
- /*
- * Make sure the layout is correct
- */
- xf86ReconfigureLayout();
-
- /*
- * Make sure the whole screen is visible
- */
- xf86SetViewport (pScreen, pScreen->width, pScreen->height);
- xf86SetViewport (pScreen, 0, 0);
- if (pRoot && scrp->vtSema)
- (*scrp->EnableDisableFBAccess) (pScreen->myNum, TRUE);
- return ret;
-}
-
-static Bool
-xf86RandRSetConfig (ScreenPtr pScreen,
- Rotation rotation,
- int rate,
- RRScreenSizePtr pSize)
-{
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- DisplayModePtr mode;
- int pos[MAXDEVICES][2];
- Bool useVirtual = FALSE;
- Rotation oldRotation = randrp->rotation;
- DeviceIntPtr dev;
- Bool view_adjusted = FALSE;
-
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (!IsMaster(dev) && !IsFloating(dev))
- continue;
-
- miPointerGetPosition(dev, &pos[dev->id][0], &pos[dev->id][1]);
- }
-
- for (mode = scrp->modes; ; mode = mode->next)
- {
- if (mode->HDisplay == pSize->width &&
- mode->VDisplay == pSize->height &&
- (rate == 0 || xf86RandRModeRefresh (mode) == rate))
- break;
- if (mode->next == scrp->modes)
- {
- if (pSize->width == randrp->virtualX &&
- pSize->height == randrp->virtualY)
- {
- mode = scrp->modes;
- useVirtual = TRUE;
- break;
- }
- return FALSE;
- }
- }
-
- if (randrp->rotation != rotation) {
-
- /* Have the driver do its thing. */
- if (scrp->DriverFunc) {
- xorgRRRotation RRRotation;
- RRRotation.RRConfig.rotation = rotation;
- RRRotation.RRConfig.rate = rate;
- RRRotation.RRConfig.width = pSize->width;
- RRRotation.RRConfig.height = pSize->height;
-
- /*
- * Currently we need to rely on HW support for rotation.
- */
- if (!(*scrp->DriverFunc)(scrp, RR_SET_CONFIG, &RRRotation))
- return FALSE;
- } else
- return FALSE;
-
- randrp->rotation = rotation;
- }
-
- if (!xf86RandRSetMode (pScreen, mode, useVirtual, pSize->mmWidth, pSize->mmHeight)) {
- if(randrp->rotation != oldRotation) {
- /* Have the driver undo its thing. */
- if (scrp->DriverFunc) {
- xorgRRRotation RRRotation;
- RRRotation.RRConfig.rotation = oldRotation;
- RRRotation.RRConfig.rate = xf86RandRModeRefresh (scrp->currentMode);
- RRRotation.RRConfig.width = scrp->virtualX;
- RRRotation.RRConfig.height = scrp->virtualY;
- (*scrp->DriverFunc)(scrp, RR_SET_CONFIG, &RRRotation);
- }
-
- randrp->rotation = oldRotation;
- }
- return FALSE;
- }
-
- /*
- * Move the cursor back where it belongs; SwitchMode repositions it
- * FIXME: duplicated code, see modes/xf86RandR12.c
- */
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (!IsMaster(dev) && !IsFloating(dev))
- continue;
-
- if (pScreen == miPointerGetScreen(dev)) {
- int px = pos[dev->id][0];
- int py = pos[dev->id][1];
-
- px = (px >= pScreen->width ? (pScreen->width - 1) : px);
- py = (py >= pScreen->height ? (pScreen->height - 1) : py);
-
- /* Setting the viewpoint makes only sense on one device */
- if (!view_adjusted && IsMaster(dev)) {
- xf86SetViewport(pScreen, px, py);
- view_adjusted = TRUE;
- }
-
- (*pScreen->SetCursorPosition) (dev, pScreen, px, py, FALSE);
- }
- }
-
- return TRUE;
-}
-
-/*
- * Wait until the screen is initialized before whacking the
- * sizes around; otherwise the screen pixmap will be allocated
- * at the current mode size rather than the maximum size
- */
-static Bool
-xf86RandRCreateScreenResources (ScreenPtr pScreen)
-{
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
-#if 0
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
- DisplayModePtr mode;
-#endif
-
- pScreen->CreateScreenResources = randrp->CreateScreenResources;
- if (!(*pScreen->CreateScreenResources) (pScreen))
- return FALSE;
-
-#if 0
- mode = scrp->currentMode;
- if (mode)
- xf86RandRSetMode (pScreen, mode, TRUE);
-#endif
-
- return TRUE;
-}
-
-/*
- * Reset size back to original
- */
-static Bool
-xf86RandRCloseScreen (int index, ScreenPtr pScreen)
-{
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
-
- scrp->virtualX = pScreen->width = randrp->virtualX;
- scrp->virtualY = pScreen->height = randrp->virtualY;
- scrp->currentMode = scrp->modes;
- pScreen->CloseScreen = randrp->CloseScreen;
- free(randrp);
- dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, NULL);
- return (*pScreen->CloseScreen) (index, pScreen);
-}
-
-Rotation
-xf86GetRotation(ScreenPtr pScreen)
-{
- if (xf86RandRKey == NULL)
- return RR_Rotate_0;
-
- return XF86RANDRINFO(pScreen)->rotation;
-}
-
-/* Function to change RandR's idea of the virtual screen size */
-Bool
-xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
- int newvirtX, int newvirtY, int newmmWidth, int newmmHeight,
- Bool resetMode)
-{
- XF86RandRInfoPtr randrp;
-
- if (xf86RandRKey == NULL)
- return FALSE;
-
- randrp = XF86RANDRINFO(pScreen);
- if (randrp == NULL)
- return FALSE;
-
- if (newvirtX > 0)
- randrp->virtualX = newvirtX;
-
- if (newvirtY > 0)
- randrp->virtualY = newvirtY;
-
- if (newmmWidth > 0)
- randrp->mmWidth = newmmWidth;
-
- if (newmmHeight > 0)
- randrp->mmHeight = newmmHeight;
-
- /* This is only for during server start */
- if (resetMode) {
- return (xf86RandRSetMode(pScreen,
- XF86SCRNINFO(pScreen)->currentMode,
- TRUE,
- pScreen->mmWidth, pScreen->mmHeight));
- }
-
- return TRUE;
-}
-
-Bool
-xf86RandRInit (ScreenPtr pScreen)
-{
- rrScrPrivPtr rp;
- XF86RandRInfoPtr randrp;
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
-
-#ifdef PANORAMIX
- /* XXX disable RandR when using Xinerama */
- if (!noPanoramiXExtension)
- return TRUE;
-#endif
-
- xf86RandRKey = &xf86RandRKeyRec;
-
- if (!dixRegisterPrivateKey(&xf86RandRKeyRec, PRIVATE_SCREEN, 0))
- return FALSE;
-
- randrp = malloc(sizeof (XF86RandRInfoRec));
- if (!randrp)
- return FALSE;
-
- if (!RRScreenInit (pScreen))
- {
- free(randrp);
- return FALSE;
- }
- rp = rrGetScrPriv(pScreen);
- rp->rrGetInfo = xf86RandRGetInfo;
- rp->rrSetConfig = xf86RandRSetConfig;
-
- randrp->virtualX = scrp->virtualX;
- randrp->virtualY = scrp->virtualY;
- randrp->mmWidth = pScreen->mmWidth;
- randrp->mmHeight = pScreen->mmHeight;
-
- randrp->CreateScreenResources = pScreen->CreateScreenResources;
- pScreen->CreateScreenResources = xf86RandRCreateScreenResources;
-
- randrp->CloseScreen = pScreen->CloseScreen;
- pScreen->CloseScreen = xf86RandRCloseScreen;
-
- randrp->rotation = RR_Rotate_0;
-
- dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, randrp);
- return TRUE;
-}
-
-
+/*
+ *
+ * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ *
+ * 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, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+#include "os.h"
+#include "globals.h"
+#include "xf86.h"
+#include "xf86str.h"
+#include "xf86Priv.h"
+#include "xf86DDC.h"
+#include "mipointer.h"
+#include <randrstr.h>
+#include "inputstr.h"
+
+typedef struct _xf86RandRInfo {
+ CreateScreenResourcesProcPtr CreateScreenResources;
+ CloseScreenProcPtr CloseScreen;
+ int virtualX;
+ int virtualY;
+ int mmWidth;
+ int mmHeight;
+ Rotation rotation;
+} XF86RandRInfoRec, *XF86RandRInfoPtr;
+
+static DevPrivateKeyRec xf86RandRKeyRec;
+static DevPrivateKey xf86RandRKey;
+
+#define XF86RANDRINFO(p) ((XF86RandRInfoPtr)dixLookupPrivate(&(p)->devPrivates, xf86RandRKey))
+
+static int
+xf86RandRModeRefresh (DisplayModePtr mode)
+{
+ if (mode->VRefresh)
+ return (int) (mode->VRefresh + 0.5);
+ else if (mode->Clock == 0)
+ return 0;
+ else
+ return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + 0.5);
+}
+
+static Bool
+xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
+{
+ RRScreenSizePtr pSize;
+ ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ DisplayModePtr mode;
+ int refresh0 = 60;
+ xorgRRModeMM RRModeMM;
+
+ *rotations = RR_Rotate_0;
+
+ for (mode = scrp->modes; mode != NULL ; mode = mode->next)
+ {
+ int refresh = xf86RandRModeRefresh (mode);
+
+ if (mode == scrp->modes)
+ refresh0 = refresh;
+
+ RRModeMM.mode = mode;
+ RRModeMM.virtX = randrp->virtualX;
+ RRModeMM.virtY = randrp->virtualY;
+ RRModeMM.mmWidth = randrp->mmWidth;
+ RRModeMM.mmHeight = randrp->mmHeight;
+
+ if(scrp->DriverFunc) {
+ (*scrp->DriverFunc)(scrp, RR_GET_MODE_MM, &RRModeMM);
+ }
+
+ pSize = RRRegisterSize (pScreen,
+ mode->HDisplay, mode->VDisplay,
+ RRModeMM.mmWidth, RRModeMM.mmHeight);
+ if (!pSize)
+ return FALSE;
+ RRRegisterRate (pScreen, pSize, refresh);
+ if (mode == scrp->currentMode &&
+ mode->HDisplay == scrp->virtualX && mode->VDisplay == scrp->virtualY)
+ RRSetCurrentConfig (pScreen, randrp->rotation, refresh, pSize);
+ if (mode->next == scrp->modes)
+ break;
+ }
+ if (scrp->currentMode->HDisplay != randrp->virtualX ||
+ scrp->currentMode->VDisplay != randrp->virtualY)
+ {
+ mode = scrp->modes;
+
+ RRModeMM.mode = NULL;
+ RRModeMM.virtX = randrp->virtualX;
+ RRModeMM.virtY = randrp->virtualY;
+ RRModeMM.mmWidth = randrp->mmWidth;
+ RRModeMM.mmHeight = randrp->mmHeight;
+
+ if(scrp->DriverFunc) {
+ (*scrp->DriverFunc)(scrp, RR_GET_MODE_MM, &RRModeMM);
+ }
+
+ pSize = RRRegisterSize (pScreen,
+ randrp->virtualX, randrp->virtualY,
+ RRModeMM.mmWidth, RRModeMM.mmHeight);
+ if (!pSize)
+ return FALSE;
+ RRRegisterRate (pScreen, pSize, refresh0);
+ if (scrp->virtualX == randrp->virtualX &&
+ scrp->virtualY == randrp->virtualY)
+ {
+ RRSetCurrentConfig (pScreen, randrp->rotation, refresh0, pSize);
+ }
+ }
+
+ /* If there is driver support for randr, let it set our supported rotations */
+ if(scrp->DriverFunc) {
+ xorgRRRotation RRRotation;
+
+ RRRotation.RRRotations = *rotations;
+ if (!(*scrp->DriverFunc)(scrp, RR_GET_INFO, &RRRotation))
+ return TRUE;
+ *rotations = RRRotation.RRRotations;
+ }
+
+ return TRUE;
+}
+
+static Bool
+xf86RandRSetMode (ScreenPtr pScreen,
+ DisplayModePtr mode,
+ Bool useVirtual,
+ int mmWidth,
+ int mmHeight)
+{
+ ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ int oldWidth = pScreen->width;
+ int oldHeight = pScreen->height;
+ int oldmmWidth = pScreen->mmWidth;
+ int oldmmHeight = pScreen->mmHeight;
+ int oldVirtualX = scrp->virtualX;
+ int oldVirtualY = scrp->virtualY;
+ WindowPtr pRoot = pScreen->root;
+ Bool ret = TRUE;
+
+ if (pRoot && scrp->vtSema)
+ (*scrp->EnableDisableFBAccess) (pScreen->myNum, FALSE);
+ if (useVirtual)
+ {
+ scrp->virtualX = randrp->virtualX;
+ scrp->virtualY = randrp->virtualY;
+ }
+ else
+ {
+ scrp->virtualX = mode->HDisplay;
+ scrp->virtualY = mode->VDisplay;
+ }
+
+ /*
+ * The DIX forgets the physical dimensions we passed into RRRegisterSize, so
+ * reconstruct them if possible.
+ */
+ if(scrp->DriverFunc) {
+ xorgRRModeMM RRModeMM;
+
+ RRModeMM.mode = mode;
+ RRModeMM.virtX = scrp->virtualX;
+ RRModeMM.virtY = scrp->virtualY;
+ RRModeMM.mmWidth = mmWidth;
+ RRModeMM.mmHeight = mmHeight;
+
+ (*scrp->DriverFunc)(scrp, RR_GET_MODE_MM, &RRModeMM);
+
+ mmWidth = RRModeMM.mmWidth;
+ mmHeight = RRModeMM.mmHeight;
+ }
+ if(randrp->rotation & (RR_Rotate_90 | RR_Rotate_270))
+ {
+ /* If the screen is rotated 90 or 270 degrees, swap the sizes. */
+ pScreen->width = scrp->virtualY;
+ pScreen->height = scrp->virtualX;
+ pScreen->mmWidth = mmHeight;
+ pScreen->mmHeight = mmWidth;
+ }
+ else
+ {
+ pScreen->width = scrp->virtualX;
+ pScreen->height = scrp->virtualY;
+ pScreen->mmWidth = mmWidth;
+ pScreen->mmHeight = mmHeight;
+ }
+ if (!xf86SwitchMode (pScreen, mode))
+ {
+ pScreen->width = oldWidth;
+ pScreen->height = oldHeight;
+ pScreen->mmWidth = oldmmWidth;
+ pScreen->mmHeight = oldmmHeight;
+ scrp->virtualX = oldVirtualX;
+ scrp->virtualY = oldVirtualY;
+ ret = FALSE;
+ }
+ /*
+ * Make sure the layout is correct
+ */
+ xf86ReconfigureLayout();
+
+ /*
+ * Make sure the whole screen is visible
+ */
+ xf86SetViewport (pScreen, pScreen->width, pScreen->height);
+ xf86SetViewport (pScreen, 0, 0);
+ if (pRoot && scrp->vtSema)
+ (*scrp->EnableDisableFBAccess) (pScreen->myNum, TRUE);
+ return ret;
+}
+
+static Bool
+xf86RandRSetConfig (ScreenPtr pScreen,
+ Rotation rotation,
+ int rate,
+ RRScreenSizePtr pSize)
+{
+ ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ DisplayModePtr mode;
+ int pos[MAXDEVICES][2];
+ Bool useVirtual = FALSE;
+ Rotation oldRotation = randrp->rotation;
+ DeviceIntPtr dev;
+ Bool view_adjusted = FALSE;
+
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (!IsMaster(dev) && !IsFloating(dev))
+ continue;
+
+ miPointerGetPosition(dev, &pos[dev->id][0], &pos[dev->id][1]);
+ }
+
+ for (mode = scrp->modes; ; mode = mode->next)
+ {
+ if (mode->HDisplay == pSize->width &&
+ mode->VDisplay == pSize->height &&
+ (rate == 0 || xf86RandRModeRefresh (mode) == rate))
+ break;
+ if (mode->next == scrp->modes)
+ {
+ if (pSize->width == randrp->virtualX &&
+ pSize->height == randrp->virtualY)
+ {
+ mode = scrp->modes;
+ useVirtual = TRUE;
+ break;
+ }
+ return FALSE;
+ }
+ }
+
+ if (randrp->rotation != rotation) {
+
+ /* Have the driver do its thing. */
+ if (scrp->DriverFunc) {
+ xorgRRRotation RRRotation;
+ RRRotation.RRConfig.rotation = rotation;
+ RRRotation.RRConfig.rate = rate;
+ RRRotation.RRConfig.width = pSize->width;
+ RRRotation.RRConfig.height = pSize->height;
+
+ /*
+ * Currently we need to rely on HW support for rotation.
+ */
+ if (!(*scrp->DriverFunc)(scrp, RR_SET_CONFIG, &RRRotation))
+ return FALSE;
+ } else
+ return FALSE;
+
+ randrp->rotation = rotation;
+ }
+
+ if (!xf86RandRSetMode (pScreen, mode, useVirtual, pSize->mmWidth, pSize->mmHeight)) {
+ if(randrp->rotation != oldRotation) {
+ /* Have the driver undo its thing. */
+ if (scrp->DriverFunc) {
+ xorgRRRotation RRRotation;
+ RRRotation.RRConfig.rotation = oldRotation;
+ RRRotation.RRConfig.rate = xf86RandRModeRefresh (scrp->currentMode);
+ RRRotation.RRConfig.width = scrp->virtualX;
+ RRRotation.RRConfig.height = scrp->virtualY;
+ (*scrp->DriverFunc)(scrp, RR_SET_CONFIG, &RRRotation);
+ }
+
+ randrp->rotation = oldRotation;
+ }
+ return FALSE;
+ }
+
+ /*
+ * Move the cursor back where it belongs; SwitchMode repositions it
+ * FIXME: duplicated code, see modes/xf86RandR12.c
+ */
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (!IsMaster(dev) && !IsFloating(dev))
+ continue;
+
+ if (pScreen == miPointerGetScreen(dev)) {
+ int px = pos[dev->id][0];
+ int py = pos[dev->id][1];
+
+ px = (px >= pScreen->width ? (pScreen->width - 1) : px);
+ py = (py >= pScreen->height ? (pScreen->height - 1) : py);
+
+ /* Setting the viewpoint makes only sense on one device */
+ if (!view_adjusted && IsMaster(dev)) {
+ xf86SetViewport(pScreen, px, py);
+ view_adjusted = TRUE;
+ }
+
+ (*pScreen->SetCursorPosition) (dev, pScreen, px, py, FALSE);
+ }
+ }
+
+ return TRUE;
+}
+
+/*
+ * Wait until the screen is initialized before whacking the
+ * sizes around; otherwise the screen pixmap will be allocated
+ * at the current mode size rather than the maximum size
+ */
+static Bool
+xf86RandRCreateScreenResources (ScreenPtr pScreen)
+{
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+#if 0
+ ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ DisplayModePtr mode;
+#endif
+
+ pScreen->CreateScreenResources = randrp->CreateScreenResources;
+ if (!(*pScreen->CreateScreenResources) (pScreen))
+ return FALSE;
+
+#if 0
+ mode = scrp->currentMode;
+ if (mode)
+ xf86RandRSetMode (pScreen, mode, TRUE);
+#endif
+
+ return TRUE;
+}
+
+/*
+ * Reset size back to original
+ */
+static Bool
+xf86RandRCloseScreen (int index, ScreenPtr pScreen)
+{
+ ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+
+ scrp->virtualX = pScreen->width = randrp->virtualX;
+ scrp->virtualY = pScreen->height = randrp->virtualY;
+ scrp->currentMode = scrp->modes;
+ pScreen->CloseScreen = randrp->CloseScreen;
+ free(randrp);
+ dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, NULL);
+ return (*pScreen->CloseScreen) (index, pScreen);
+}
+
+Rotation
+xf86GetRotation(ScreenPtr pScreen)
+{
+ if (xf86RandRKey == NULL)
+ return RR_Rotate_0;
+
+ return XF86RANDRINFO(pScreen)->rotation;
+}
+
+/* Function to change RandR's idea of the virtual screen size */
+Bool
+xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
+ int newvirtX, int newvirtY, int newmmWidth, int newmmHeight,
+ Bool resetMode)
+{
+ XF86RandRInfoPtr randrp;
+
+ if (xf86RandRKey == NULL)
+ return FALSE;
+
+ randrp = XF86RANDRINFO(pScreen);
+ if (randrp == NULL)
+ return FALSE;
+
+ if (newvirtX > 0)
+ randrp->virtualX = newvirtX;
+
+ if (newvirtY > 0)
+ randrp->virtualY = newvirtY;
+
+ if (newmmWidth > 0)
+ randrp->mmWidth = newmmWidth;
+
+ if (newmmHeight > 0)
+ randrp->mmHeight = newmmHeight;
+
+ /* This is only for during server start */
+ if (resetMode) {
+ return (xf86RandRSetMode(pScreen,
+ XF86SCRNINFO(pScreen)->currentMode,
+ TRUE,
+ pScreen->mmWidth, pScreen->mmHeight));
+ }
+
+ return TRUE;
+}
+
+Bool
+xf86RandRInit (ScreenPtr pScreen)
+{
+ rrScrPrivPtr rp;
+ XF86RandRInfoPtr randrp;
+ ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+
+#ifdef PANORAMIX
+ /* XXX disable RandR when using Xinerama */
+ if (!noPanoramiXExtension)
+ return TRUE;
+#endif
+
+ xf86RandRKey = &xf86RandRKeyRec;
+
+ if (!dixRegisterPrivateKey(&xf86RandRKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
+ randrp = malloc(sizeof (XF86RandRInfoRec));
+ if (!randrp)
+ return FALSE;
+
+ if (!RRScreenInit (pScreen))
+ {
+ free(randrp);
+ return FALSE;
+ }
+ rp = rrGetScrPriv(pScreen);
+ rp->rrGetInfo = xf86RandRGetInfo;
+ rp->rrSetConfig = xf86RandRSetConfig;
+
+ randrp->virtualX = scrp->virtualX;
+ randrp->virtualY = scrp->virtualY;
+ randrp->mmWidth = pScreen->mmWidth;
+ randrp->mmHeight = pScreen->mmHeight;
+
+ randrp->CreateScreenResources = pScreen->CreateScreenResources;
+ pScreen->CreateScreenResources = xf86RandRCreateScreenResources;
+
+ randrp->CloseScreen = pScreen->CloseScreen;
+ pScreen->CloseScreen = xf86RandRCloseScreen;
+
+ randrp->rotation = RR_Rotate_0;
+
+ dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, randrp);
+ return TRUE;
+}
+
+
diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c
index c5ebb2780..a6266e725 100644
--- a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c
+++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c
@@ -1,1127 +1,1127 @@
-/*
- * This code was stolen from RAC and adapted to control the legacy vga
- * interface.
- *
- *
- * Copyright (c) 2007 Paulo R. Zanoni, Tiago Vignatti
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include "xorg-config.h"
-
-#include "xf86VGAarbiter.h"
-
-#ifdef HAVE_PCI_DEVICE_VGAARB_INIT
-#include "xf86VGAarbiterPriv.h"
-#include "xf86Bus.h"
-#include "xf86Priv.h"
-#include "pciaccess.h"
-
-
-static GCFuncs VGAarbiterGCFuncs = {
- VGAarbiterValidateGC, VGAarbiterChangeGC, VGAarbiterCopyGC,
- VGAarbiterDestroyGC, VGAarbiterChangeClip, VGAarbiterDestroyClip,
- VGAarbiterCopyClip
-};
-
-static GCOps VGAarbiterGCOps = {
- VGAarbiterFillSpans, VGAarbiterSetSpans, VGAarbiterPutImage,
- VGAarbiterCopyArea, VGAarbiterCopyPlane, VGAarbiterPolyPoint,
- VGAarbiterPolylines, VGAarbiterPolySegment, VGAarbiterPolyRectangle,
- VGAarbiterPolyArc, VGAarbiterFillPolygon, VGAarbiterPolyFillRect,
- VGAarbiterPolyFillArc, VGAarbiterPolyText8, VGAarbiterPolyText16,
- VGAarbiterImageText8, VGAarbiterImageText16, VGAarbiterImageGlyphBlt,
- VGAarbiterPolyGlyphBlt, VGAarbiterPushPixels,
-};
-
-static miPointerSpriteFuncRec VGAarbiterSpriteFuncs = {
- VGAarbiterSpriteRealizeCursor, VGAarbiterSpriteUnrealizeCursor,
- VGAarbiterSpriteSetCursor, VGAarbiterSpriteMoveCursor,
- VGAarbiterDeviceCursorInitialize, VGAarbiterDeviceCursorCleanup
-};
-
-static DevPrivateKeyRec VGAarbiterScreenKeyRec;
-#define VGAarbiterScreenKey (&VGAarbiterScreenKeyRec)
-static DevPrivateKeyRec VGAarbiterGCKeyRec;
-#define VGAarbiterGCKey (&VGAarbiterGCKeyRec)
-
-static int vga_no_arb = 0;
-void
-xf86VGAarbiterInit(void)
-{
- if (pci_device_vgaarb_init() != 0) {
- vga_no_arb = 1;
- xf86Msg(X_WARNING, "VGA arbiter: cannot open kernel arbiter, no multi-card support\n");
- }
-}
-
-void
-xf86VGAarbiterFini(void)
-{
- if (vga_no_arb)
- return;
- pci_device_vgaarb_fini();
-}
-
-void
-xf86VGAarbiterLock(ScrnInfoPtr pScrn)
-{
- if (vga_no_arb)
- return;
- pci_device_vgaarb_set_target(pScrn->vgaDev);
- pci_device_vgaarb_lock();
-}
-
-void
-xf86VGAarbiterUnlock(ScrnInfoPtr pScrn)
-{
- if (vga_no_arb)
- return;
- pci_device_vgaarb_unlock();
-}
-
-Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen)
-{
- int vga_count;
- int rsrc_decodes;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-
- if (vga_no_arb)
- return TRUE;
-
- pci_device_vgaarb_get_info(pScrn->vgaDev, &vga_count, &rsrc_decodes);
- if (vga_count > 1) {
- if (rsrc_decodes) {
- return FALSE;
- }
- }
- return TRUE;
-}
-
-void
-xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn)
-{
- struct pci_device *dev;
- EntityPtr pEnt;
-
- if (vga_no_arb)
- return;
-
- pEnt = xf86Entities[pScrn->entityList[0]];
- if (pEnt->bus.type != BUS_PCI)
- return;
-
- dev = pEnt->bus.id.pci;
- pScrn->vgaDev = dev;
-}
-
-void
-xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc)
-{
- if (vga_no_arb)
- return;
- pci_device_vgaarb_set_target(pScrn->vgaDev);
- pci_device_vgaarb_decodes(rsrc);
-}
-
-Bool
-xf86VGAarbiterWrapFunctions(void)
-{
- ScrnInfoPtr pScrn;
- VGAarbiterScreenPtr pScreenPriv;
- miPointerScreenPtr PointPriv;
- PictureScreenPtr ps;
- ScreenPtr pScreen;
- int vga_count, i;
-
- if (vga_no_arb)
- return FALSE;
-
- /*
- * we need to wrap the arbiter if we have more than
- * one VGA card - hotplug cries.
- */
- pci_device_vgaarb_get_info(NULL, &vga_count, NULL);
- if (vga_count < 2 || !xf86Screens)
- return FALSE;
-
- xf86Msg(X_INFO,"Found %d VGA devices: arbiter wrapping enabled\n",
- vga_count);
-
- for (i = 0; i < xf86NumScreens; i++) {
- pScreen = xf86Screens[i]->pScreen;
- ps = GetPictureScreenIfSet(pScreen);
- pScrn = xf86Screens[pScreen->myNum];
- PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
-
- if (!dixRegisterPrivateKey(&VGAarbiterGCKeyRec, PRIVATE_GC, sizeof(VGAarbiterGCRec)))
- return FALSE;
-
- if (!dixRegisterPrivateKey(&VGAarbiterScreenKeyRec, PRIVATE_SCREEN, 0))
- return FALSE;
-
- if (!(pScreenPriv = malloc(sizeof(VGAarbiterScreenRec))))
- return FALSE;
-
- dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv);
-
- WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen);
- WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen);
- WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler);
- WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler);
- WRAP_SCREEN(CreateGC, VGAarbiterCreateGC);
- WRAP_SCREEN(GetImage, VGAarbiterGetImage);
- WRAP_SCREEN(GetSpans, VGAarbiterGetSpans);
- WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate);
- WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow);
- WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground);
- WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap);
- WRAP_SCREEN(StoreColors, VGAarbiterStoreColors);
- WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor);
- WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor);
- WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor);
- WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor);
- WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition);
- WRAP_PICT(Composite,VGAarbiterComposite);
- WRAP_PICT(Glyphs,VGAarbiterGlyphs);
- WRAP_PICT(CompositeRects,VGAarbiterCompositeRects);
- WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame);
- WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode);
- WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT);
- WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT);
- WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen);
- WRAP_SPRITE;
- }
-
- return TRUE;
-}
-
-/* Screen funcs */
-static Bool
-VGAarbiterCloseScreen (int i, ScreenPtr pScreen)
-{
- Bool val;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, VGAarbiterScreenKey);
- miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, miPointerScreenKey);
- PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
-
- UNWRAP_SCREEN(CreateGC);
- UNWRAP_SCREEN(CloseScreen);
- UNWRAP_SCREEN(GetImage);
- UNWRAP_SCREEN(GetSpans);
- UNWRAP_SCREEN(SourceValidate);
- UNWRAP_SCREEN(CopyWindow);
- UNWRAP_SCREEN(ClearToBackground);
- UNWRAP_SCREEN(SaveScreen);
- UNWRAP_SCREEN(StoreColors);
- UNWRAP_SCREEN(DisplayCursor);
- UNWRAP_SCREEN(RealizeCursor);
- UNWRAP_SCREEN(UnrealizeCursor);
- UNWRAP_SCREEN(RecolorCursor);
- UNWRAP_SCREEN(SetCursorPosition);
- UNWRAP_PICT(Composite);
- UNWRAP_PICT(Glyphs);
- UNWRAP_PICT(CompositeRects);
- UNWRAP_SCREEN_INFO(AdjustFrame);
- UNWRAP_SCREEN_INFO(SwitchMode);
- UNWRAP_SCREEN_INFO(EnterVT);
- UNWRAP_SCREEN_INFO(LeaveVT);
- UNWRAP_SCREEN_INFO(FreeScreen);
- UNWRAP_SPRITE;
-
- free((pointer) pScreenPriv);
- xf86VGAarbiterLock(xf86Screens[i]);
- val = (*pScreen->CloseScreen) (i, pScreen);
- xf86VGAarbiterUnlock(xf86Screens[i]);
- return val;
-}
-
-static void
-VGAarbiterBlockHandler(int i,
- pointer blockData, pointer pTimeout, pointer pReadmask)
-{
- ScreenPtr pScreen = screenInfo.screens[i];
- SCREEN_PROLOG(BlockHandler);
- VGAGet(pScreen);
- pScreen->BlockHandler(i, blockData, pTimeout, pReadmask);
- VGAPut();
- SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler);
-}
-
-static void
-VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer pReadmask)
-{
- ScreenPtr pScreen = screenInfo.screens[i];
- SCREEN_PROLOG(WakeupHandler);
- VGAGet(pScreen);
- pScreen->WakeupHandler(i, blockData, result, pReadmask);
- VGAPut();
- SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler);
-}
-
-static void
-VGAarbiterGetImage (
- DrawablePtr pDrawable,
- int sx, int sy, int w, int h,
- unsigned int format,
- unsigned long planemask,
- char *pdstLine
- )
-{
- ScreenPtr pScreen = pDrawable->pScreen;
- SCREEN_PROLOG(GetImage);
-// if (xf86Screens[pScreen->myNum]->vtSema) {
- VGAGet(pScreen);
-// }
- (*pScreen->GetImage) (pDrawable, sx, sy, w, h,
- format, planemask, pdstLine);
- VGAPut();
- SCREEN_EPILOG (GetImage, VGAarbiterGetImage);
-}
-
-static void
-VGAarbiterGetSpans (
- DrawablePtr pDrawable,
- int wMax,
- DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- char *pdstStart
- )
-{
- ScreenPtr pScreen = pDrawable->pScreen;
-
- SCREEN_PROLOG (GetSpans);
- VGAGet(pScreen);
- (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
- VGAPut();
- SCREEN_EPILOG (GetSpans, VGAarbiterGetSpans);
-}
-
-static void
-VGAarbiterSourceValidate (
- DrawablePtr pDrawable,
- int x, int y, int width, int height,
- unsigned int subWindowMode )
-{
- ScreenPtr pScreen = pDrawable->pScreen;
- SCREEN_PROLOG (SourceValidate);
- VGAGet(pScreen);
- if (pScreen->SourceValidate)
- (*pScreen->SourceValidate) (pDrawable, x, y, width, height, subWindowMode);
- VGAPut();
- SCREEN_EPILOG (SourceValidate, VGAarbiterSourceValidate);
-}
-
-static void
-VGAarbiterCopyWindow(
- WindowPtr pWin,
- DDXPointRec ptOldOrg,
- RegionPtr prgnSrc )
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
- SCREEN_PROLOG (CopyWindow);
- VGAGet(pScreen);
- (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc);
- VGAPut();
- SCREEN_EPILOG (CopyWindow, VGAarbiterCopyWindow);
-}
-
-static void
-VGAarbiterClearToBackground (
- WindowPtr pWin,
- int x, int y,
- int w, int h,
- Bool generateExposures )
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
- SCREEN_PROLOG ( ClearToBackground);
- VGAGet(pScreen);
- (*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures);
- VGAPut();
- SCREEN_EPILOG (ClearToBackground, VGAarbiterClearToBackground);
-}
-
-static PixmapPtr
-VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned class)
-{
- PixmapPtr pPix;
-
- SCREEN_PROLOG ( CreatePixmap);
- VGAGet(pScreen);
- pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, class);
- VGAPut();
- SCREEN_EPILOG (CreatePixmap, VGAarbiterCreatePixmap);
-
- return pPix;
-}
-
-static Bool
-VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank)
-{
- Bool val;
-
- SCREEN_PROLOG (SaveScreen);
- VGAGet(pScreen);
- val = (*pScreen->SaveScreen) (pScreen, unblank);
- VGAPut();
- SCREEN_EPILOG (SaveScreen, VGAarbiterSaveScreen);
-
- return val;
-}
-
-static void
-VGAarbiterStoreColors (
- ColormapPtr pmap,
- int ndef,
- xColorItem *pdefs)
-{
- ScreenPtr pScreen = pmap->pScreen;
-
- SCREEN_PROLOG (StoreColors);
- VGAGet(pScreen);
- (*pScreen->StoreColors) (pmap,ndef,pdefs);
- VGAPut();
- SCREEN_EPILOG ( StoreColors, VGAarbiterStoreColors);
-}
-
-static void
-VGAarbiterRecolorCursor (
- DeviceIntPtr pDev,
- ScreenPtr pScreen,
- CursorPtr pCurs,
- Bool displayed
- )
-{
- SCREEN_PROLOG (RecolorCursor);
- VGAGet(pScreen);
- (*pScreen->RecolorCursor) (pDev, pScreen, pCurs, displayed);
- VGAPut();
- SCREEN_EPILOG ( RecolorCursor, VGAarbiterRecolorCursor);
-}
-
-static Bool
-VGAarbiterRealizeCursor (
- DeviceIntPtr pDev,
- ScreenPtr pScreen,
- CursorPtr pCursor
- )
-{
- Bool val;
-
- SCREEN_PROLOG (RealizeCursor);
- VGAGet(pScreen);
- val = (*pScreen->RealizeCursor) (pDev, pScreen,pCursor);
- VGAPut();
- SCREEN_EPILOG ( RealizeCursor, VGAarbiterRealizeCursor);
- return val;
-}
-
-static Bool
-VGAarbiterUnrealizeCursor (
- DeviceIntPtr pDev,
- ScreenPtr pScreen,
- CursorPtr pCursor
- )
-{
- Bool val;
-
- SCREEN_PROLOG (UnrealizeCursor);
- VGAGet(pScreen);
- val = (*pScreen->UnrealizeCursor) (pDev, pScreen, pCursor);
- VGAPut();
- SCREEN_EPILOG ( UnrealizeCursor, VGAarbiterUnrealizeCursor);
- return val;
-}
-
-static Bool
-VGAarbiterDisplayCursor (
- DeviceIntPtr pDev,
- ScreenPtr pScreen,
- CursorPtr pCursor
- )
-{
- Bool val;
-
- SCREEN_PROLOG (DisplayCursor);
- VGAGet(pScreen);
- val = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor);
- VGAPut();
- SCREEN_EPILOG ( DisplayCursor, VGAarbiterDisplayCursor);
- return val;
-}
-
-static Bool
-VGAarbiterSetCursorPosition (
- DeviceIntPtr pDev,
- ScreenPtr pScreen,
- int x, int y,
- Bool generateEvent)
-{
- Bool val;
-
- SCREEN_PROLOG (SetCursorPosition);
- VGAGet(pScreen);
- val = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent);
- VGAPut();
- SCREEN_EPILOG ( SetCursorPosition, VGAarbiterSetCursorPosition);
- return val;
-}
-
-static void
-VGAarbiterAdjustFrame(int index, int x, int y, int flags)
-{
- ScreenPtr pScreen = screenInfo.screens[index];
- VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, VGAarbiterScreenKey);
-
- VGAGet(pScreen);
- (*pScreenPriv->AdjustFrame)(index, x, y, flags);
- VGAPut();
-}
-
-static Bool
-VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags)
-{
- Bool val;
- ScreenPtr pScreen = screenInfo.screens[index];
- VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, VGAarbiterScreenKey);
-
- VGAGet(pScreen);
- val = (*pScreenPriv->SwitchMode)(index, mode, flags);
- VGAPut();
- return val;
-}
-
-static Bool
-VGAarbiterEnterVT(int index, int flags)
-{
- Bool val;
- ScrnInfoPtr pScrn = xf86Screens[index];
- ScreenPtr pScreen = screenInfo.screens[index];
- VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, VGAarbiterScreenKey);
-
- VGAGet(pScreen);
- pScrn->EnterVT = pScreenPriv->EnterVT;
- val = (*pScrn->EnterVT)(index, flags);
- pScreenPriv->EnterVT = pScrn->EnterVT;
- pScrn->EnterVT = VGAarbiterEnterVT;
- VGAPut();
- return val;
-}
-
-static void
-VGAarbiterLeaveVT(int index, int flags)
-{
- ScrnInfoPtr pScrn = xf86Screens[index];
- ScreenPtr pScreen = screenInfo.screens[index];
- VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, VGAarbiterScreenKey);
-
- VGAGet(pScreen);
- pScrn->LeaveVT = pScreenPriv->LeaveVT;
- (*pScreenPriv->LeaveVT)(index, flags);
- pScreenPriv->LeaveVT = pScrn->LeaveVT;
- pScrn->LeaveVT = VGAarbiterLeaveVT;
- VGAPut();
-}
-
-static void
-VGAarbiterFreeScreen(int index, int flags)
-{
- ScreenPtr pScreen = screenInfo.screens[index];
- VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, VGAarbiterScreenKey);
-
- VGAGet(pScreen);
- (*pScreenPriv->FreeScreen)(index, flags);
- VGAPut();
-}
-
-static Bool
-VGAarbiterCreateGC(GCPtr pGC)
-{
- ScreenPtr pScreen = pGC->pScreen;
- VGAarbiterGCPtr pGCPriv = (VGAarbiterGCPtr)dixLookupPrivate(&pGC->devPrivates, VGAarbiterGCKey);
- Bool ret;
-
- SCREEN_PROLOG(CreateGC);
- ret = (*pScreen->CreateGC)(pGC);
- GC_WRAP(pGC);
- SCREEN_EPILOG(CreateGC,VGAarbiterCreateGC);
-
- return ret;
-}
-
-/* GC funcs */
-static void
-VGAarbiterValidateGC(
- GCPtr pGC,
- unsigned long changes,
- DrawablePtr pDraw )
-{
- GC_UNWRAP(pGC);
- (*pGC->funcs->ValidateGC)(pGC, changes, pDraw);
- GC_WRAP(pGC);
-}
-
-
-static void
-VGAarbiterDestroyGC(GCPtr pGC)
-{
- GC_UNWRAP (pGC);
- (*pGC->funcs->DestroyGC)(pGC);
- GC_WRAP (pGC);
-}
-
-static void
-VGAarbiterChangeGC (
- GCPtr pGC,
- unsigned long mask)
-{
- GC_UNWRAP (pGC);
- (*pGC->funcs->ChangeGC) (pGC, mask);
- GC_WRAP (pGC);
-}
-
-static void
-VGAarbiterCopyGC (
- GCPtr pGCSrc,
- unsigned long mask,
- GCPtr pGCDst)
-{
- GC_UNWRAP (pGCDst);
- (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst);
- GC_WRAP (pGCDst);
-}
-
-static void
-VGAarbiterChangeClip (
- GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects )
-{
- GC_UNWRAP (pGC);
- (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
- GC_WRAP (pGC);
-}
-
-static void
-VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
-{
- GC_UNWRAP (pgcDst);
- (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc);
- GC_WRAP (pgcDst);
-}
-
-static void
-VGAarbiterDestroyClip(GCPtr pGC)
-{
- GC_UNWRAP (pGC);
- (* pGC->funcs->DestroyClip)(pGC);
- GC_WRAP (pGC);
-}
-
-/* GC Ops */
-static void
-VGAarbiterFillSpans(
- DrawablePtr pDraw,
- GC *pGC,
- int nInit,
- DDXPointPtr pptInit,
- int *pwidthInit,
- int fSorted )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterSetSpans(
- DrawablePtr pDraw,
- GCPtr pGC,
- char *pcharsrc,
- register DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- int fSorted )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterPutImage(
- DrawablePtr pDraw,
- GCPtr pGC,
- int depth,
- int x, int y, int w, int h,
- int leftPad,
- int format,
- char *pImage )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h,
- leftPad, format, pImage);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static RegionPtr
-VGAarbiterCopyArea(
- DrawablePtr pSrc,
- DrawablePtr pDst,
- GC *pGC,
- int srcx, int srcy,
- int width, int height,
- int dstx, int dsty )
-{
- RegionPtr ret;
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- ret = (*pGC->ops->CopyArea)(pSrc, pDst,
- pGC, srcx, srcy, width, height, dstx, dsty);
- VGAPut();
- GC_WRAP(pGC);
- return ret;
-}
-
-static RegionPtr
-VGAarbiterCopyPlane(
- DrawablePtr pSrc,
- DrawablePtr pDst,
- GCPtr pGC,
- int srcx, int srcy,
- int width, int height,
- int dstx, int dsty,
- unsigned long bitPlane )
-{
- RegionPtr ret;
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- ret = (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, srcx, srcy,
- width, height, dstx, dsty, bitPlane);
- VGAPut();
- GC_WRAP(pGC);
- return ret;
-}
-
-static void
-VGAarbiterPolyPoint(
- DrawablePtr pDraw,
- GCPtr pGC,
- int mode,
- int npt,
- xPoint *pptInit )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-
-static void
-VGAarbiterPolylines(
- DrawablePtr pDraw,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr pptInit )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterPolySegment(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nseg,
- xSegment *pSeg )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterPolyRectangle(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nRectsInit,
- xRectangle *pRectsInit )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterPolyArc(
- DrawablePtr pDraw,
- GCPtr pGC,
- int narcs,
- xArc *parcs )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterFillPolygon(
- DrawablePtr pDraw,
- GCPtr pGC,
- int shape,
- int mode,
- int count,
- DDXPointPtr ptsIn )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterPolyFillRect(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nrectFill,
- xRectangle *prectInit)
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterPolyFillArc(
- DrawablePtr pDraw,
- GCPtr pGC,
- int narcs,
- xArc *parcs )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static int
-VGAarbiterPolyText8(
- DrawablePtr pDraw,
- GCPtr pGC,
- int x,
- int y,
- int count,
- char *chars )
-{
- int ret;
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars);
- VGAPut();
- GC_WRAP(pGC);
- return ret;
-}
-
-static int
-VGAarbiterPolyText16(
- DrawablePtr pDraw,
- GCPtr pGC,
- int x,
- int y,
- int count,
- unsigned short *chars )
-{
- int ret;
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars);
- VGAPut();
- GC_WRAP(pGC);
- return ret;
-}
-
-static void
-VGAarbiterImageText8(
- DrawablePtr pDraw,
- GCPtr pGC,
- int x,
- int y,
- int count,
- char *chars )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterImageText16(
- DrawablePtr pDraw,
- GCPtr pGC,
- int x,
- int y,
- int count,
- unsigned short *chars )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-
-static void
-VGAarbiterImageGlyphBlt(
- DrawablePtr pDraw,
- GCPtr pGC,
- int xInit, int yInit,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- pointer pglyphBase )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit,
- nglyph, ppci, pglyphBase);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterPolyGlyphBlt(
- DrawablePtr pDraw,
- GCPtr pGC,
- int xInit, int yInit,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- pointer pglyphBase )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit,
- nglyph, ppci, pglyphBase);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-static void
-VGAarbiterPushPixels(
- GCPtr pGC,
- PixmapPtr pBitMap,
- DrawablePtr pDraw,
- int dx, int dy, int xOrg, int yOrg )
-{
- ScreenPtr pScreen = pGC->pScreen;
- GC_UNWRAP(pGC);
- VGAGet(pScreen);
- (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg);
- VGAPut();
- GC_WRAP(pGC);
-}
-
-
-/* miSpriteFuncs */
-static Bool
-VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur)
-{
- Bool val;
- SPRITE_PROLOG;
- VGAGet(pScreen);
- val = PointPriv->spriteFuncs->RealizeCursor(pDev, pScreen, pCur);
- VGAPut();
- SPRITE_EPILOG;
- return val;
-}
-
-static Bool
-VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur)
-{
- Bool val;
- SPRITE_PROLOG;
- VGAGet(pScreen);
- val = PointPriv->spriteFuncs->UnrealizeCursor(pDev, pScreen, pCur);
- VGAPut();
- SPRITE_EPILOG;
- return val;
-}
-
-static void
-VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur, int x, int y)
-{
- SPRITE_PROLOG;
- VGAGet(pScreen);
- PointPriv->spriteFuncs->SetCursor(pDev, pScreen, pCur, x, y);
- VGAPut();
- SPRITE_EPILOG;
-}
-
-static void
-VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
-{
- SPRITE_PROLOG;
- VGAGet(pScreen);
- PointPriv->spriteFuncs->MoveCursor(pDev, pScreen, x, y);
- VGAPut();
- SPRITE_EPILOG;
-}
-
-static Bool
-VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
-{
- Bool val;
- SPRITE_PROLOG;
- VGAGet(pScreen);
- val = PointPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen);
- VGAPut();
- SPRITE_EPILOG;
- return val;
-}
-
-static void
-VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
-{
- SPRITE_PROLOG;
- VGAGet(pScreen);
- PointPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen);
- VGAPut();
- SPRITE_EPILOG;
-}
-
-static void
-VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
- PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask,
- INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width,
- CARD16 height)
-{
- ScreenPtr pScreen = pDst->pDrawable->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
-
- PICTURE_PROLOGUE(Composite);
-
- VGAGet(pScreen);
- (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst,
- yDst, width, height);
- VGAPut();
- PICTURE_EPILOGUE(Composite, VGAarbiterComposite);
-}
-
-static void
-VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
- PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
- GlyphListPtr list, GlyphPtr *glyphs)
-{
- ScreenPtr pScreen = pDst->pDrawable->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
-
- PICTURE_PROLOGUE(Glyphs);
-
- VGAGet(pScreen);
- (*ps->Glyphs)(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs);
- VGAPut();
- PICTURE_EPILOGUE (Glyphs, VGAarbiterGlyphs);
-}
-
-static void
-VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRect,
- xRectangle *rects)
-{
- ScreenPtr pScreen = pDst->pDrawable->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
-
- PICTURE_PROLOGUE(CompositeRects);
-
- VGAGet(pScreen);
- (*ps->CompositeRects)(op, pDst, color, nRect, rects);
- VGAPut();
- PICTURE_EPILOGUE (CompositeRects, VGAarbiterCompositeRects);
-}
-#else
-/* dummy functions */
-void xf86VGAarbiterInit(void) {}
-void xf86VGAarbiterFini(void) {}
-
-void xf86VGAarbiterLock(ScrnInfoPtr pScrn) {}
-void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) {}
-Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) { return TRUE; }
-void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) {}
-void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc) {}
-Bool xf86VGAarbiterWrapFunctions(void) { return FALSE; }
-
-#endif
+/*
+ * This code was stolen from RAC and adapted to control the legacy vga
+ * interface.
+ *
+ *
+ * Copyright (c) 2007 Paulo R. Zanoni, Tiago Vignatti
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "xorg-config.h"
+
+#include "xf86VGAarbiter.h"
+
+#ifdef HAVE_PCI_DEVICE_VGAARB_INIT
+#include "xf86VGAarbiterPriv.h"
+#include "xf86Bus.h"
+#include "xf86Priv.h"
+#include "pciaccess.h"
+
+
+static GCFuncs VGAarbiterGCFuncs = {
+ VGAarbiterValidateGC, VGAarbiterChangeGC, VGAarbiterCopyGC,
+ VGAarbiterDestroyGC, VGAarbiterChangeClip, VGAarbiterDestroyClip,
+ VGAarbiterCopyClip
+};
+
+static GCOps VGAarbiterGCOps = {
+ VGAarbiterFillSpans, VGAarbiterSetSpans, VGAarbiterPutImage,
+ VGAarbiterCopyArea, VGAarbiterCopyPlane, VGAarbiterPolyPoint,
+ VGAarbiterPolylines, VGAarbiterPolySegment, VGAarbiterPolyRectangle,
+ VGAarbiterPolyArc, VGAarbiterFillPolygon, VGAarbiterPolyFillRect,
+ VGAarbiterPolyFillArc, VGAarbiterPolyText8, VGAarbiterPolyText16,
+ VGAarbiterImageText8, VGAarbiterImageText16, VGAarbiterImageGlyphBlt,
+ VGAarbiterPolyGlyphBlt, VGAarbiterPushPixels,
+};
+
+static miPointerSpriteFuncRec VGAarbiterSpriteFuncs = {
+ VGAarbiterSpriteRealizeCursor, VGAarbiterSpriteUnrealizeCursor,
+ VGAarbiterSpriteSetCursor, VGAarbiterSpriteMoveCursor,
+ VGAarbiterDeviceCursorInitialize, VGAarbiterDeviceCursorCleanup
+};
+
+static DevPrivateKeyRec VGAarbiterScreenKeyRec;
+#define VGAarbiterScreenKey (&VGAarbiterScreenKeyRec)
+static DevPrivateKeyRec VGAarbiterGCKeyRec;
+#define VGAarbiterGCKey (&VGAarbiterGCKeyRec)
+
+static int vga_no_arb = 0;
+void
+xf86VGAarbiterInit(void)
+{
+ if (pci_device_vgaarb_init() != 0) {
+ vga_no_arb = 1;
+ xf86Msg(X_WARNING, "VGA arbiter: cannot open kernel arbiter, no multi-card support\n");
+ }
+}
+
+void
+xf86VGAarbiterFini(void)
+{
+ if (vga_no_arb)
+ return;
+ pci_device_vgaarb_fini();
+}
+
+void
+xf86VGAarbiterLock(ScrnInfoPtr pScrn)
+{
+ if (vga_no_arb)
+ return;
+ pci_device_vgaarb_set_target(pScrn->vgaDev);
+ pci_device_vgaarb_lock();
+}
+
+void
+xf86VGAarbiterUnlock(ScrnInfoPtr pScrn)
+{
+ if (vga_no_arb)
+ return;
+ pci_device_vgaarb_unlock();
+}
+
+Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen)
+{
+ int vga_count;
+ int rsrc_decodes;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+
+ if (vga_no_arb)
+ return TRUE;
+
+ pci_device_vgaarb_get_info(pScrn->vgaDev, &vga_count, &rsrc_decodes);
+ if (vga_count > 1) {
+ if (rsrc_decodes) {
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+void
+xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn)
+{
+ struct pci_device *dev;
+ EntityPtr pEnt;
+
+ if (vga_no_arb)
+ return;
+
+ pEnt = xf86Entities[pScrn->entityList[0]];
+ if (pEnt->bus.type != BUS_PCI)
+ return;
+
+ dev = pEnt->bus.id.pci;
+ pScrn->vgaDev = dev;
+}
+
+void
+xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc)
+{
+ if (vga_no_arb)
+ return;
+ pci_device_vgaarb_set_target(pScrn->vgaDev);
+ pci_device_vgaarb_decodes(rsrc);
+}
+
+Bool
+xf86VGAarbiterWrapFunctions(void)
+{
+ ScrnInfoPtr pScrn;
+ VGAarbiterScreenPtr pScreenPriv;
+ miPointerScreenPtr PointPriv;
+ PictureScreenPtr ps;
+ ScreenPtr pScreen;
+ int vga_count, i;
+
+ if (vga_no_arb)
+ return FALSE;
+
+ /*
+ * we need to wrap the arbiter if we have more than
+ * one VGA card - hotplug cries.
+ */
+ pci_device_vgaarb_get_info(NULL, &vga_count, NULL);
+ if (vga_count < 2 || !xf86Screens)
+ return FALSE;
+
+ xf86Msg(X_INFO,"Found %d VGA devices: arbiter wrapping enabled\n",
+ vga_count);
+
+ for (i = 0; i < xf86NumScreens; i++) {
+ pScreen = xf86Screens[i]->pScreen;
+ ps = GetPictureScreenIfSet(pScreen);
+ pScrn = xf86Screens[pScreen->myNum];
+ PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
+
+ if (!dixRegisterPrivateKey(&VGAarbiterGCKeyRec, PRIVATE_GC, sizeof(VGAarbiterGCRec)))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(&VGAarbiterScreenKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
+ if (!(pScreenPriv = malloc(sizeof(VGAarbiterScreenRec))))
+ return FALSE;
+
+ dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv);
+
+ WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen);
+ WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen);
+ WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler);
+ WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler);
+ WRAP_SCREEN(CreateGC, VGAarbiterCreateGC);
+ WRAP_SCREEN(GetImage, VGAarbiterGetImage);
+ WRAP_SCREEN(GetSpans, VGAarbiterGetSpans);
+ WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate);
+ WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow);
+ WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground);
+ WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap);
+ WRAP_SCREEN(StoreColors, VGAarbiterStoreColors);
+ WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor);
+ WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor);
+ WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor);
+ WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor);
+ WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition);
+ WRAP_PICT(Composite,VGAarbiterComposite);
+ WRAP_PICT(Glyphs,VGAarbiterGlyphs);
+ WRAP_PICT(CompositeRects,VGAarbiterCompositeRects);
+ WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame);
+ WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode);
+ WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT);
+ WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT);
+ WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen);
+ WRAP_SPRITE;
+ }
+
+ return TRUE;
+}
+
+/* Screen funcs */
+static Bool
+VGAarbiterCloseScreen (int i, ScreenPtr pScreen)
+{
+ Bool val;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, VGAarbiterScreenKey);
+ miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, miPointerScreenKey);
+ PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
+
+ UNWRAP_SCREEN(CreateGC);
+ UNWRAP_SCREEN(CloseScreen);
+ UNWRAP_SCREEN(GetImage);
+ UNWRAP_SCREEN(GetSpans);
+ UNWRAP_SCREEN(SourceValidate);
+ UNWRAP_SCREEN(CopyWindow);
+ UNWRAP_SCREEN(ClearToBackground);
+ UNWRAP_SCREEN(SaveScreen);
+ UNWRAP_SCREEN(StoreColors);
+ UNWRAP_SCREEN(DisplayCursor);
+ UNWRAP_SCREEN(RealizeCursor);
+ UNWRAP_SCREEN(UnrealizeCursor);
+ UNWRAP_SCREEN(RecolorCursor);
+ UNWRAP_SCREEN(SetCursorPosition);
+ UNWRAP_PICT(Composite);
+ UNWRAP_PICT(Glyphs);
+ UNWRAP_PICT(CompositeRects);
+ UNWRAP_SCREEN_INFO(AdjustFrame);
+ UNWRAP_SCREEN_INFO(SwitchMode);
+ UNWRAP_SCREEN_INFO(EnterVT);
+ UNWRAP_SCREEN_INFO(LeaveVT);
+ UNWRAP_SCREEN_INFO(FreeScreen);
+ UNWRAP_SPRITE;
+
+ free((pointer) pScreenPriv);
+ xf86VGAarbiterLock(xf86Screens[i]);
+ val = (*pScreen->CloseScreen) (i, pScreen);
+ xf86VGAarbiterUnlock(xf86Screens[i]);
+ return val;
+}
+
+static void
+VGAarbiterBlockHandler(int i,
+ pointer blockData, pointer pTimeout, pointer pReadmask)
+{
+ ScreenPtr pScreen = screenInfo.screens[i];
+ SCREEN_PROLOG(BlockHandler);
+ VGAGet(pScreen);
+ pScreen->BlockHandler(i, blockData, pTimeout, pReadmask);
+ VGAPut();
+ SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler);
+}
+
+static void
+VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer pReadmask)
+{
+ ScreenPtr pScreen = screenInfo.screens[i];
+ SCREEN_PROLOG(WakeupHandler);
+ VGAGet(pScreen);
+ pScreen->WakeupHandler(i, blockData, result, pReadmask);
+ VGAPut();
+ SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler);
+}
+
+static void
+VGAarbiterGetImage (
+ DrawablePtr pDrawable,
+ int sx, int sy, int w, int h,
+ unsigned int format,
+ unsigned long planemask,
+ char *pdstLine
+ )
+{
+ ScreenPtr pScreen = pDrawable->pScreen;
+ SCREEN_PROLOG(GetImage);
+// if (xf86Screens[pScreen->myNum]->vtSema) {
+ VGAGet(pScreen);
+// }
+ (*pScreen->GetImage) (pDrawable, sx, sy, w, h,
+ format, planemask, pdstLine);
+ VGAPut();
+ SCREEN_EPILOG (GetImage, VGAarbiterGetImage);
+}
+
+static void
+VGAarbiterGetSpans (
+ DrawablePtr pDrawable,
+ int wMax,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ char *pdstStart
+ )
+{
+ ScreenPtr pScreen = pDrawable->pScreen;
+
+ SCREEN_PROLOG (GetSpans);
+ VGAGet(pScreen);
+ (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
+ VGAPut();
+ SCREEN_EPILOG (GetSpans, VGAarbiterGetSpans);
+}
+
+static void
+VGAarbiterSourceValidate (
+ DrawablePtr pDrawable,
+ int x, int y, int width, int height,
+ unsigned int subWindowMode )
+{
+ ScreenPtr pScreen = pDrawable->pScreen;
+ SCREEN_PROLOG (SourceValidate);
+ VGAGet(pScreen);
+ if (pScreen->SourceValidate)
+ (*pScreen->SourceValidate) (pDrawable, x, y, width, height, subWindowMode);
+ VGAPut();
+ SCREEN_EPILOG (SourceValidate, VGAarbiterSourceValidate);
+}
+
+static void
+VGAarbiterCopyWindow(
+ WindowPtr pWin,
+ DDXPointRec ptOldOrg,
+ RegionPtr prgnSrc )
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+
+ SCREEN_PROLOG (CopyWindow);
+ VGAGet(pScreen);
+ (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc);
+ VGAPut();
+ SCREEN_EPILOG (CopyWindow, VGAarbiterCopyWindow);
+}
+
+static void
+VGAarbiterClearToBackground (
+ WindowPtr pWin,
+ int x, int y,
+ int w, int h,
+ Bool generateExposures )
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+
+ SCREEN_PROLOG ( ClearToBackground);
+ VGAGet(pScreen);
+ (*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures);
+ VGAPut();
+ SCREEN_EPILOG (ClearToBackground, VGAarbiterClearToBackground);
+}
+
+static PixmapPtr
+VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned class)
+{
+ PixmapPtr pPix;
+
+ SCREEN_PROLOG ( CreatePixmap);
+ VGAGet(pScreen);
+ pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, class);
+ VGAPut();
+ SCREEN_EPILOG (CreatePixmap, VGAarbiterCreatePixmap);
+
+ return pPix;
+}
+
+static Bool
+VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank)
+{
+ Bool val;
+
+ SCREEN_PROLOG (SaveScreen);
+ VGAGet(pScreen);
+ val = (*pScreen->SaveScreen) (pScreen, unblank);
+ VGAPut();
+ SCREEN_EPILOG (SaveScreen, VGAarbiterSaveScreen);
+
+ return val;
+}
+
+static void
+VGAarbiterStoreColors (
+ ColormapPtr pmap,
+ int ndef,
+ xColorItem *pdefs)
+{
+ ScreenPtr pScreen = pmap->pScreen;
+
+ SCREEN_PROLOG (StoreColors);
+ VGAGet(pScreen);
+ (*pScreen->StoreColors) (pmap,ndef,pdefs);
+ VGAPut();
+ SCREEN_EPILOG ( StoreColors, VGAarbiterStoreColors);
+}
+
+static void
+VGAarbiterRecolorCursor (
+ DeviceIntPtr pDev,
+ ScreenPtr pScreen,
+ CursorPtr pCurs,
+ Bool displayed
+ )
+{
+ SCREEN_PROLOG (RecolorCursor);
+ VGAGet(pScreen);
+ (*pScreen->RecolorCursor) (pDev, pScreen, pCurs, displayed);
+ VGAPut();
+ SCREEN_EPILOG ( RecolorCursor, VGAarbiterRecolorCursor);
+}
+
+static Bool
+VGAarbiterRealizeCursor (
+ DeviceIntPtr pDev,
+ ScreenPtr pScreen,
+ CursorPtr pCursor
+ )
+{
+ Bool val;
+
+ SCREEN_PROLOG (RealizeCursor);
+ VGAGet(pScreen);
+ val = (*pScreen->RealizeCursor) (pDev, pScreen,pCursor);
+ VGAPut();
+ SCREEN_EPILOG ( RealizeCursor, VGAarbiterRealizeCursor);
+ return val;
+}
+
+static Bool
+VGAarbiterUnrealizeCursor (
+ DeviceIntPtr pDev,
+ ScreenPtr pScreen,
+ CursorPtr pCursor
+ )
+{
+ Bool val;
+
+ SCREEN_PROLOG (UnrealizeCursor);
+ VGAGet(pScreen);
+ val = (*pScreen->UnrealizeCursor) (pDev, pScreen, pCursor);
+ VGAPut();
+ SCREEN_EPILOG ( UnrealizeCursor, VGAarbiterUnrealizeCursor);
+ return val;
+}
+
+static Bool
+VGAarbiterDisplayCursor (
+ DeviceIntPtr pDev,
+ ScreenPtr pScreen,
+ CursorPtr pCursor
+ )
+{
+ Bool val;
+
+ SCREEN_PROLOG (DisplayCursor);
+ VGAGet(pScreen);
+ val = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor);
+ VGAPut();
+ SCREEN_EPILOG ( DisplayCursor, VGAarbiterDisplayCursor);
+ return val;
+}
+
+static Bool
+VGAarbiterSetCursorPosition (
+ DeviceIntPtr pDev,
+ ScreenPtr pScreen,
+ int x, int y,
+ Bool generateEvent)
+{
+ Bool val;
+
+ SCREEN_PROLOG (SetCursorPosition);
+ VGAGet(pScreen);
+ val = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent);
+ VGAPut();
+ SCREEN_EPILOG ( SetCursorPosition, VGAarbiterSetCursorPosition);
+ return val;
+}
+
+static void
+VGAarbiterAdjustFrame(int index, int x, int y, int flags)
+{
+ ScreenPtr pScreen = screenInfo.screens[index];
+ VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, VGAarbiterScreenKey);
+
+ VGAGet(pScreen);
+ (*pScreenPriv->AdjustFrame)(index, x, y, flags);
+ VGAPut();
+}
+
+static Bool
+VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags)
+{
+ Bool val;
+ ScreenPtr pScreen = screenInfo.screens[index];
+ VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, VGAarbiterScreenKey);
+
+ VGAGet(pScreen);
+ val = (*pScreenPriv->SwitchMode)(index, mode, flags);
+ VGAPut();
+ return val;
+}
+
+static Bool
+VGAarbiterEnterVT(int index, int flags)
+{
+ Bool val;
+ ScrnInfoPtr pScrn = xf86Screens[index];
+ ScreenPtr pScreen = screenInfo.screens[index];
+ VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, VGAarbiterScreenKey);
+
+ VGAGet(pScreen);
+ pScrn->EnterVT = pScreenPriv->EnterVT;
+ val = (*pScrn->EnterVT)(index, flags);
+ pScreenPriv->EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = VGAarbiterEnterVT;
+ VGAPut();
+ return val;
+}
+
+static void
+VGAarbiterLeaveVT(int index, int flags)
+{
+ ScrnInfoPtr pScrn = xf86Screens[index];
+ ScreenPtr pScreen = screenInfo.screens[index];
+ VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, VGAarbiterScreenKey);
+
+ VGAGet(pScreen);
+ pScrn->LeaveVT = pScreenPriv->LeaveVT;
+ (*pScreenPriv->LeaveVT)(index, flags);
+ pScreenPriv->LeaveVT = pScrn->LeaveVT;
+ pScrn->LeaveVT = VGAarbiterLeaveVT;
+ VGAPut();
+}
+
+static void
+VGAarbiterFreeScreen(int index, int flags)
+{
+ ScreenPtr pScreen = screenInfo.screens[index];
+ VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, VGAarbiterScreenKey);
+
+ VGAGet(pScreen);
+ (*pScreenPriv->FreeScreen)(index, flags);
+ VGAPut();
+}
+
+static Bool
+VGAarbiterCreateGC(GCPtr pGC)
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ VGAarbiterGCPtr pGCPriv = (VGAarbiterGCPtr)dixLookupPrivate(&pGC->devPrivates, VGAarbiterGCKey);
+ Bool ret;
+
+ SCREEN_PROLOG(CreateGC);
+ ret = (*pScreen->CreateGC)(pGC);
+ GC_WRAP(pGC);
+ SCREEN_EPILOG(CreateGC,VGAarbiterCreateGC);
+
+ return ret;
+}
+
+/* GC funcs */
+static void
+VGAarbiterValidateGC(
+ GCPtr pGC,
+ unsigned long changes,
+ DrawablePtr pDraw )
+{
+ GC_UNWRAP(pGC);
+ (*pGC->funcs->ValidateGC)(pGC, changes, pDraw);
+ GC_WRAP(pGC);
+}
+
+
+static void
+VGAarbiterDestroyGC(GCPtr pGC)
+{
+ GC_UNWRAP (pGC);
+ (*pGC->funcs->DestroyGC)(pGC);
+ GC_WRAP (pGC);
+}
+
+static void
+VGAarbiterChangeGC (
+ GCPtr pGC,
+ unsigned long mask)
+{
+ GC_UNWRAP (pGC);
+ (*pGC->funcs->ChangeGC) (pGC, mask);
+ GC_WRAP (pGC);
+}
+
+static void
+VGAarbiterCopyGC (
+ GCPtr pGCSrc,
+ unsigned long mask,
+ GCPtr pGCDst)
+{
+ GC_UNWRAP (pGCDst);
+ (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst);
+ GC_WRAP (pGCDst);
+}
+
+static void
+VGAarbiterChangeClip (
+ GCPtr pGC,
+ int type,
+ pointer pvalue,
+ int nrects )
+{
+ GC_UNWRAP (pGC);
+ (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
+ GC_WRAP (pGC);
+}
+
+static void
+VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
+{
+ GC_UNWRAP (pgcDst);
+ (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc);
+ GC_WRAP (pgcDst);
+}
+
+static void
+VGAarbiterDestroyClip(GCPtr pGC)
+{
+ GC_UNWRAP (pGC);
+ (* pGC->funcs->DestroyClip)(pGC);
+ GC_WRAP (pGC);
+}
+
+/* GC Ops */
+static void
+VGAarbiterFillSpans(
+ DrawablePtr pDraw,
+ GC *pGC,
+ int nInit,
+ DDXPointPtr pptInit,
+ int *pwidthInit,
+ int fSorted )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterSetSpans(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ char *pcharsrc,
+ register DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ int fSorted )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterPutImage(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int depth,
+ int x, int y, int w, int h,
+ int leftPad,
+ int format,
+ char *pImage )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h,
+ leftPad, format, pImage);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static RegionPtr
+VGAarbiterCopyArea(
+ DrawablePtr pSrc,
+ DrawablePtr pDst,
+ GC *pGC,
+ int srcx, int srcy,
+ int width, int height,
+ int dstx, int dsty )
+{
+ RegionPtr ret;
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ ret = (*pGC->ops->CopyArea)(pSrc, pDst,
+ pGC, srcx, srcy, width, height, dstx, dsty);
+ VGAPut();
+ GC_WRAP(pGC);
+ return ret;
+}
+
+static RegionPtr
+VGAarbiterCopyPlane(
+ DrawablePtr pSrc,
+ DrawablePtr pDst,
+ GCPtr pGC,
+ int srcx, int srcy,
+ int width, int height,
+ int dstx, int dsty,
+ unsigned long bitPlane )
+{
+ RegionPtr ret;
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ ret = (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, srcx, srcy,
+ width, height, dstx, dsty, bitPlane);
+ VGAPut();
+ GC_WRAP(pGC);
+ return ret;
+}
+
+static void
+VGAarbiterPolyPoint(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ xPoint *pptInit )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+
+static void
+VGAarbiterPolylines(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr pptInit )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterPolySegment(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pSeg )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterPolyRectangle(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nRectsInit,
+ xRectangle *pRectsInit )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterPolyArc(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int narcs,
+ xArc *parcs )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterFillPolygon(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int shape,
+ int mode,
+ int count,
+ DDXPointPtr ptsIn )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterPolyFillRect(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nrectFill,
+ xRectangle *prectInit)
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterPolyFillArc(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int narcs,
+ xArc *parcs )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static int
+VGAarbiterPolyText8(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ char *chars )
+{
+ int ret;
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars);
+ VGAPut();
+ GC_WRAP(pGC);
+ return ret;
+}
+
+static int
+VGAarbiterPolyText16(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ unsigned short *chars )
+{
+ int ret;
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars);
+ VGAPut();
+ GC_WRAP(pGC);
+ return ret;
+}
+
+static void
+VGAarbiterImageText8(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ char *chars )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterImageText16(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ unsigned short *chars )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+
+static void
+VGAarbiterImageGlyphBlt(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int xInit, int yInit,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ pointer pglyphBase )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit,
+ nglyph, ppci, pglyphBase);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterPolyGlyphBlt(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int xInit, int yInit,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ pointer pglyphBase )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit,
+ nglyph, ppci, pglyphBase);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+static void
+VGAarbiterPushPixels(
+ GCPtr pGC,
+ PixmapPtr pBitMap,
+ DrawablePtr pDraw,
+ int dx, int dy, int xOrg, int yOrg )
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ GC_UNWRAP(pGC);
+ VGAGet(pScreen);
+ (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg);
+ VGAPut();
+ GC_WRAP(pGC);
+}
+
+
+/* miSpriteFuncs */
+static Bool
+VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur)
+{
+ Bool val;
+ SPRITE_PROLOG;
+ VGAGet(pScreen);
+ val = PointPriv->spriteFuncs->RealizeCursor(pDev, pScreen, pCur);
+ VGAPut();
+ SPRITE_EPILOG;
+ return val;
+}
+
+static Bool
+VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur)
+{
+ Bool val;
+ SPRITE_PROLOG;
+ VGAGet(pScreen);
+ val = PointPriv->spriteFuncs->UnrealizeCursor(pDev, pScreen, pCur);
+ VGAPut();
+ SPRITE_EPILOG;
+ return val;
+}
+
+static void
+VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur, int x, int y)
+{
+ SPRITE_PROLOG;
+ VGAGet(pScreen);
+ PointPriv->spriteFuncs->SetCursor(pDev, pScreen, pCur, x, y);
+ VGAPut();
+ SPRITE_EPILOG;
+}
+
+static void
+VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
+{
+ SPRITE_PROLOG;
+ VGAGet(pScreen);
+ PointPriv->spriteFuncs->MoveCursor(pDev, pScreen, x, y);
+ VGAPut();
+ SPRITE_EPILOG;
+}
+
+static Bool
+VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+ Bool val;
+ SPRITE_PROLOG;
+ VGAGet(pScreen);
+ val = PointPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen);
+ VGAPut();
+ SPRITE_EPILOG;
+ return val;
+}
+
+static void
+VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+ SPRITE_PROLOG;
+ VGAGet(pScreen);
+ PointPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen);
+ VGAPut();
+ SPRITE_EPILOG;
+}
+
+static void
+VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
+ PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask,
+ INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width,
+ CARD16 height)
+{
+ ScreenPtr pScreen = pDst->pDrawable->pScreen;
+ PictureScreenPtr ps = GetPictureScreen(pScreen);
+
+ PICTURE_PROLOGUE(Composite);
+
+ VGAGet(pScreen);
+ (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst,
+ yDst, width, height);
+ VGAPut();
+ PICTURE_EPILOGUE(Composite, VGAarbiterComposite);
+}
+
+static void
+VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
+ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
+ GlyphListPtr list, GlyphPtr *glyphs)
+{
+ ScreenPtr pScreen = pDst->pDrawable->pScreen;
+ PictureScreenPtr ps = GetPictureScreen(pScreen);
+
+ PICTURE_PROLOGUE(Glyphs);
+
+ VGAGet(pScreen);
+ (*ps->Glyphs)(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs);
+ VGAPut();
+ PICTURE_EPILOGUE (Glyphs, VGAarbiterGlyphs);
+}
+
+static void
+VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRect,
+ xRectangle *rects)
+{
+ ScreenPtr pScreen = pDst->pDrawable->pScreen;
+ PictureScreenPtr ps = GetPictureScreen(pScreen);
+
+ PICTURE_PROLOGUE(CompositeRects);
+
+ VGAGet(pScreen);
+ (*ps->CompositeRects)(op, pDst, color, nRect, rects);
+ VGAPut();
+ PICTURE_EPILOGUE (CompositeRects, VGAarbiterCompositeRects);
+}
+#else
+/* dummy functions */
+void xf86VGAarbiterInit(void) {}
+void xf86VGAarbiterFini(void) {}
+
+void xf86VGAarbiterLock(ScrnInfoPtr pScrn) {}
+void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) {}
+Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) { return TRUE; }
+void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) {}
+void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc) {}
+Bool xf86VGAarbiterWrapFunctions(void) { return FALSE; }
+
+#endif
diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h b/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h
index e1ac20f1f..0f8416b71 100644
--- a/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h
+++ b/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h
@@ -1,253 +1,253 @@
-/*
- * Copyright (c) 2009 Tiago Vignatti
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "misc.h"
-#include "xf86.h"
-#include "xf86_OSproc.h"
-#include <X11/X.h>
-#include "colormapst.h"
-#include "scrnintstr.h"
-#include "screenint.h"
-#include "gcstruct.h"
-#include "pixmapstr.h"
-#include "pixmap.h"
-#include "windowstr.h"
-#include "window.h"
-#include "xf86str.h"
-#include "mipointer.h"
-#include "mipointrst.h"
-# include "picturestr.h"
-
-
-#define WRAP_SCREEN(x,y) {pScreenPriv->x = pScreen->x; pScreen->x = y;}
-
-#define UNWRAP_SCREEN(x) pScreen->x = pScreenPriv->x
-
-#define SCREEN_PROLOG(x) pScreen->x = ((VGAarbiterScreenPtr) \
- dixLookupPrivate(&(pScreen)->devPrivates, VGAarbiterScreenKey))->x
-
-#define SCREEN_EPILOG(x,y) pScreen->x = y;
-
-#define WRAP_PICT(x,y) if (ps) {pScreenPriv->x = ps->x;\
- ps->x = y;}
-
-#define UNWRAP_PICT(x) if (ps) {ps->x = pScreenPriv->x;}
-
-#define PICTURE_PROLOGUE(field) ps->field = \
- ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \
- VGAarbiterScreenKey))->field
-
-#define PICTURE_EPILOGUE(field, wrap) ps->field = wrap
-
-#define WRAP_SCREEN_INFO(x,y) do {pScreenPriv->x = pScrn->x; pScrn->x = y;} while(0)
-
-#define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x
-
-#define SPRITE_PROLOG miPointerScreenPtr PointPriv = \
- (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, \
- miPointerScreenKey); VGAarbiterScreenPtr pScreenPriv = \
- ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \
- VGAarbiterScreenKey)); PointPriv->spriteFuncs = pScreenPriv->miSprite;
-
-#define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\
- PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs;
-
-#define WRAP_SPRITE do { pScreenPriv->miSprite = PointPriv->spriteFuncs;\
- PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; \
- } while (0)
-
-#define UNWRAP_SPRITE PointPriv->spriteFuncs = pScreenPriv->miSprite
-
-#define GC_WRAP(x) pGCPriv->wrapOps = (x)->ops;\
- pGCPriv->wrapFuncs = (x)->funcs; (x)->ops = &VGAarbiterGCOps;\
- (x)->funcs = &VGAarbiterGCFuncs;
-
-#define GC_UNWRAP(x) VGAarbiterGCPtr pGCPriv = \
- (VGAarbiterGCPtr)dixLookupPrivate(&(x)->devPrivates, VGAarbiterGCKey);\
- (x)->ops = pGCPriv->wrapOps; (x)->funcs = pGCPriv->wrapFuncs;
-
-static inline void
-VGAGet(ScreenPtr pScreen) {
- pci_device_vgaarb_set_target(xf86Screens[pScreen->myNum]->vgaDev);
- pci_device_vgaarb_lock();
-}
-
-static inline void
-VGAPut(void) {
- pci_device_vgaarb_unlock();
-}
-
-typedef struct _VGAarbiterScreen {
- CreateGCProcPtr CreateGC;
- CloseScreenProcPtr CloseScreen;
- ScreenBlockHandlerProcPtr BlockHandler;
- ScreenWakeupHandlerProcPtr WakeupHandler;
- GetImageProcPtr GetImage;
- GetSpansProcPtr GetSpans;
- SourceValidateProcPtr SourceValidate;
- CopyWindowProcPtr CopyWindow;
- ClearToBackgroundProcPtr ClearToBackground;
- CreatePixmapProcPtr CreatePixmap;
- SaveScreenProcPtr SaveScreen;
- /* Colormap */
- StoreColorsProcPtr StoreColors;
- /* Cursor */
- DisplayCursorProcPtr DisplayCursor;
- RealizeCursorProcPtr RealizeCursor;
- UnrealizeCursorProcPtr UnrealizeCursor;
- RecolorCursorProcPtr RecolorCursor;
- SetCursorPositionProcPtr SetCursorPosition;
- void (*AdjustFrame)(int,int,int,int);
- Bool (*SwitchMode)(int, DisplayModePtr,int);
- Bool (*EnterVT)(int, int);
- void (*LeaveVT)(int, int);
- void (*FreeScreen)(int, int);
- miPointerSpriteFuncPtr miSprite;
- CompositeProcPtr Composite;
- GlyphsProcPtr Glyphs;
- CompositeRectsProcPtr CompositeRects;
-} VGAarbiterScreenRec, *VGAarbiterScreenPtr;
-
-typedef struct _VGAarbiterGC {
- GCOps *wrapOps;
- GCFuncs *wrapFuncs;
-} VGAarbiterGCRec, *VGAarbiterGCPtr;
-
-/* Screen funcs */
-static void VGAarbiterBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask);
-static void VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer pReadmask);
-static Bool VGAarbiterCloseScreen (int i, ScreenPtr pScreen);
-static void VGAarbiterGetImage (DrawablePtr pDrawable, int sx, int sy, int w,
- int h, unsigned int format, unsigned long planemask, char *pdstLine);
-static void VGAarbiterGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr
- ppt, int *pwidth, int nspans, char *pdstStart);
-static void VGAarbiterSourceValidate (DrawablePtr pDrawable, int x, int y,
- int width, int height, unsigned int subWindowMode);
-static void VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
- RegionPtr prgnSrc);
-static void VGAarbiterClearToBackground (WindowPtr pWin, int x, int y, int w,
- int h, Bool generateExposures);
-static PixmapPtr VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h,
- int depth, unsigned int class);
-static Bool VGAarbiterCreateGC(GCPtr pGC);
-static Bool VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank);
-static void VGAarbiterStoreColors (ColormapPtr pmap, int ndef, xColorItem
- *pdefs);
-static void VGAarbiterRecolorCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
- CursorPtr pCurs, Bool displayed);
-static Bool VGAarbiterRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
- CursorPtr pCursor);
-static Bool VGAarbiterUnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
- CursorPtr pCursor);
-static Bool VGAarbiterDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
- CursorPtr pCursor);
-static Bool VGAarbiterSetCursorPosition (DeviceIntPtr pDev, ScreenPtr
- pScreen, int x, int y, Bool generateEvent);
-static void VGAarbiterAdjustFrame(int index, int x, int y, int flags);
-static Bool VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags);
-static Bool VGAarbiterEnterVT(int index, int flags);
-static void VGAarbiterLeaveVT(int index, int flags);
-static void VGAarbiterFreeScreen(int index, int flags);
-
-/* GC funcs */
-static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes,
- DrawablePtr pDraw);
-static void VGAarbiterChangeGC(GCPtr pGC, unsigned long mask);
-static void VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
-static void VGAarbiterDestroyGC(GCPtr pGC);
-static void VGAarbiterChangeClip(GCPtr pGC, int type, pointer pvalue,
- int nrects);
-static void VGAarbiterDestroyClip(GCPtr pGC);
-static void VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
-
-/* GC ops */
-static void VGAarbiterFillSpans( DrawablePtr pDraw, GC *pGC, int nInit,
- DDXPointPtr pptInit, int *pwidthInit, int fSorted);
-static void VGAarbiterSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc,
- register DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
-static void VGAarbiterPutImage(DrawablePtr pDraw, GCPtr pGC, int depth,
- int x, int y, int w, int h, int leftPad, int format, char *pImage);
-static RegionPtr VGAarbiterCopyArea(DrawablePtr pSrc, DrawablePtr pDst,
- GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty);
-static RegionPtr VGAarbiterCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
- GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty,
- unsigned long bitPlane);
-static void VGAarbiterPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode,
- int npt, xPoint *pptInit);
-static void VGAarbiterPolylines(DrawablePtr pDraw, GCPtr pGC, int mode,
- int npt, DDXPointPtr pptInit);
-static void VGAarbiterPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg,
- xSegment *pSeg);
-static void VGAarbiterPolyRectangle(DrawablePtr pDraw, GCPtr pGC,
- int nRectsInit, xRectangle *pRectsInit);
-static void VGAarbiterPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs,
- xArc *parcs);
-static void VGAarbiterFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape,
- int mode, int count, DDXPointPtr ptsIn);
-static void VGAarbiterPolyFillRect( DrawablePtr pDraw, GCPtr pGC,
- int nrectFill, xRectangle *prectInit);
-static void VGAarbiterPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs,
- xArc *parcs);
-static int VGAarbiterPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y,
- int count, char *chars);
-static int VGAarbiterPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
- int count, unsigned short *chars);
-static void VGAarbiterImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y,
- int count, char *chars);
-static void VGAarbiterImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
- int count, unsigned short *chars);
-static void VGAarbiterImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit,
- int yInit, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase);
-static void VGAarbiterPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit,
- int yInit, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase);
-static void VGAarbiterPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr
- pDraw, int dx, int dy, int xOrg, int yOrg);
-
-/* miSpriteFuncs */
-static Bool VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr
- pScreen, CursorPtr pCur);
-static Bool VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr
- pScreen, CursorPtr pCur);
-static void VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
- CursorPtr pCur, int x, int y);
-static void VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
- int x, int y);
-static Bool VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen);
-static void VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen);
-
-
-static void VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
- PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
- INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
-static void VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
- PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr
- list, GlyphPtr *glyphs);
-static void VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor
- *color, int nRect, xRectangle *rects);
+/*
+ * Copyright (c) 2009 Tiago Vignatti
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include "misc.h"
+#include "xf86.h"
+#include "xf86_OSproc.h"
+#include <X11/X.h>
+#include "colormapst.h"
+#include "scrnintstr.h"
+#include "screenint.h"
+#include "gcstruct.h"
+#include "pixmapstr.h"
+#include "pixmap.h"
+#include "windowstr.h"
+#include "window.h"
+#include "xf86str.h"
+#include "mipointer.h"
+#include "mipointrst.h"
+# include "picturestr.h"
+
+
+#define WRAP_SCREEN(x,y) {pScreenPriv->x = pScreen->x; pScreen->x = y;}
+
+#define UNWRAP_SCREEN(x) pScreen->x = pScreenPriv->x
+
+#define SCREEN_PROLOG(x) pScreen->x = ((VGAarbiterScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, VGAarbiterScreenKey))->x
+
+#define SCREEN_EPILOG(x,y) pScreen->x = y;
+
+#define WRAP_PICT(x,y) if (ps) {pScreenPriv->x = ps->x;\
+ ps->x = y;}
+
+#define UNWRAP_PICT(x) if (ps) {ps->x = pScreenPriv->x;}
+
+#define PICTURE_PROLOGUE(field) ps->field = \
+ ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \
+ VGAarbiterScreenKey))->field
+
+#define PICTURE_EPILOGUE(field, wrap) ps->field = wrap
+
+#define WRAP_SCREEN_INFO(x,y) do {pScreenPriv->x = pScrn->x; pScrn->x = y;} while(0)
+
+#define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x
+
+#define SPRITE_PROLOG miPointerScreenPtr PointPriv = \
+ (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, \
+ miPointerScreenKey); VGAarbiterScreenPtr pScreenPriv = \
+ ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \
+ VGAarbiterScreenKey)); PointPriv->spriteFuncs = pScreenPriv->miSprite;
+
+#define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\
+ PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs;
+
+#define WRAP_SPRITE do { pScreenPriv->miSprite = PointPriv->spriteFuncs;\
+ PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; \
+ } while (0)
+
+#define UNWRAP_SPRITE PointPriv->spriteFuncs = pScreenPriv->miSprite
+
+#define GC_WRAP(x) pGCPriv->wrapOps = (x)->ops;\
+ pGCPriv->wrapFuncs = (x)->funcs; (x)->ops = &VGAarbiterGCOps;\
+ (x)->funcs = &VGAarbiterGCFuncs;
+
+#define GC_UNWRAP(x) VGAarbiterGCPtr pGCPriv = \
+ (VGAarbiterGCPtr)dixLookupPrivate(&(x)->devPrivates, VGAarbiterGCKey);\
+ (x)->ops = pGCPriv->wrapOps; (x)->funcs = pGCPriv->wrapFuncs;
+
+static inline void
+VGAGet(ScreenPtr pScreen) {
+ pci_device_vgaarb_set_target(xf86Screens[pScreen->myNum]->vgaDev);
+ pci_device_vgaarb_lock();
+}
+
+static inline void
+VGAPut(void) {
+ pci_device_vgaarb_unlock();
+}
+
+typedef struct _VGAarbiterScreen {
+ CreateGCProcPtr CreateGC;
+ CloseScreenProcPtr CloseScreen;
+ ScreenBlockHandlerProcPtr BlockHandler;
+ ScreenWakeupHandlerProcPtr WakeupHandler;
+ GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
+ SourceValidateProcPtr SourceValidate;
+ CopyWindowProcPtr CopyWindow;
+ ClearToBackgroundProcPtr ClearToBackground;
+ CreatePixmapProcPtr CreatePixmap;
+ SaveScreenProcPtr SaveScreen;
+ /* Colormap */
+ StoreColorsProcPtr StoreColors;
+ /* Cursor */
+ DisplayCursorProcPtr DisplayCursor;
+ RealizeCursorProcPtr RealizeCursor;
+ UnrealizeCursorProcPtr UnrealizeCursor;
+ RecolorCursorProcPtr RecolorCursor;
+ SetCursorPositionProcPtr SetCursorPosition;
+ void (*AdjustFrame)(int,int,int,int);
+ Bool (*SwitchMode)(int, DisplayModePtr,int);
+ Bool (*EnterVT)(int, int);
+ void (*LeaveVT)(int, int);
+ void (*FreeScreen)(int, int);
+ miPointerSpriteFuncPtr miSprite;
+ CompositeProcPtr Composite;
+ GlyphsProcPtr Glyphs;
+ CompositeRectsProcPtr CompositeRects;
+} VGAarbiterScreenRec, *VGAarbiterScreenPtr;
+
+typedef struct _VGAarbiterGC {
+ GCOps *wrapOps;
+ GCFuncs *wrapFuncs;
+} VGAarbiterGCRec, *VGAarbiterGCPtr;
+
+/* Screen funcs */
+static void VGAarbiterBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask);
+static void VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer pReadmask);
+static Bool VGAarbiterCloseScreen (int i, ScreenPtr pScreen);
+static void VGAarbiterGetImage (DrawablePtr pDrawable, int sx, int sy, int w,
+ int h, unsigned int format, unsigned long planemask, char *pdstLine);
+static void VGAarbiterGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr
+ ppt, int *pwidth, int nspans, char *pdstStart);
+static void VGAarbiterSourceValidate (DrawablePtr pDrawable, int x, int y,
+ int width, int height, unsigned int subWindowMode);
+static void VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
+ RegionPtr prgnSrc);
+static void VGAarbiterClearToBackground (WindowPtr pWin, int x, int y, int w,
+ int h, Bool generateExposures);
+static PixmapPtr VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h,
+ int depth, unsigned int class);
+static Bool VGAarbiterCreateGC(GCPtr pGC);
+static Bool VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank);
+static void VGAarbiterStoreColors (ColormapPtr pmap, int ndef, xColorItem
+ *pdefs);
+static void VGAarbiterRecolorCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
+ CursorPtr pCurs, Bool displayed);
+static Bool VGAarbiterRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
+ CursorPtr pCursor);
+static Bool VGAarbiterUnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
+ CursorPtr pCursor);
+static Bool VGAarbiterDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
+ CursorPtr pCursor);
+static Bool VGAarbiterSetCursorPosition (DeviceIntPtr pDev, ScreenPtr
+ pScreen, int x, int y, Bool generateEvent);
+static void VGAarbiterAdjustFrame(int index, int x, int y, int flags);
+static Bool VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags);
+static Bool VGAarbiterEnterVT(int index, int flags);
+static void VGAarbiterLeaveVT(int index, int flags);
+static void VGAarbiterFreeScreen(int index, int flags);
+
+/* GC funcs */
+static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw);
+static void VGAarbiterChangeGC(GCPtr pGC, unsigned long mask);
+static void VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
+static void VGAarbiterDestroyGC(GCPtr pGC);
+static void VGAarbiterChangeClip(GCPtr pGC, int type, pointer pvalue,
+ int nrects);
+static void VGAarbiterDestroyClip(GCPtr pGC);
+static void VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
+
+/* GC ops */
+static void VGAarbiterFillSpans( DrawablePtr pDraw, GC *pGC, int nInit,
+ DDXPointPtr pptInit, int *pwidthInit, int fSorted);
+static void VGAarbiterSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc,
+ register DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
+static void VGAarbiterPutImage(DrawablePtr pDraw, GCPtr pGC, int depth,
+ int x, int y, int w, int h, int leftPad, int format, char *pImage);
+static RegionPtr VGAarbiterCopyArea(DrawablePtr pSrc, DrawablePtr pDst,
+ GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty);
+static RegionPtr VGAarbiterCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
+ GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty,
+ unsigned long bitPlane);
+static void VGAarbiterPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode,
+ int npt, xPoint *pptInit);
+static void VGAarbiterPolylines(DrawablePtr pDraw, GCPtr pGC, int mode,
+ int npt, DDXPointPtr pptInit);
+static void VGAarbiterPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg,
+ xSegment *pSeg);
+static void VGAarbiterPolyRectangle(DrawablePtr pDraw, GCPtr pGC,
+ int nRectsInit, xRectangle *pRectsInit);
+static void VGAarbiterPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs,
+ xArc *parcs);
+static void VGAarbiterFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape,
+ int mode, int count, DDXPointPtr ptsIn);
+static void VGAarbiterPolyFillRect( DrawablePtr pDraw, GCPtr pGC,
+ int nrectFill, xRectangle *prectInit);
+static void VGAarbiterPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs,
+ xArc *parcs);
+static int VGAarbiterPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, char *chars);
+static int VGAarbiterPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, unsigned short *chars);
+static void VGAarbiterImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, char *chars);
+static void VGAarbiterImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, unsigned short *chars);
+static void VGAarbiterImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit,
+ int yInit, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase);
+static void VGAarbiterPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit,
+ int yInit, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase);
+static void VGAarbiterPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr
+ pDraw, int dx, int dy, int xOrg, int yOrg);
+
+/* miSpriteFuncs */
+static Bool VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr
+ pScreen, CursorPtr pCur);
+static Bool VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr
+ pScreen, CursorPtr pCur);
+static void VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
+ CursorPtr pCur, int x, int y);
+static void VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
+ int x, int y);
+static Bool VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen);
+static void VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen);
+
+
+static void VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
+ PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
+ INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
+static void VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
+ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr
+ list, GlyphPtr *glyphs);
+static void VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor
+ *color, int nRect, xRectangle *rects);
diff --git a/xorg-server/hw/xfree86/common/xf86sbusBus.c b/xorg-server/hw/xfree86/common/xf86sbusBus.c
index 181c6ab00..6e6ab948f 100644
--- a/xorg-server/hw/xfree86/common/xf86sbusBus.c
+++ b/xorg-server/hw/xfree86/common/xf86sbusBus.c
@@ -1,714 +1,714 @@
-/*
- * SBUS bus-specific code.
- *
- * Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * JAKUB JELINEK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <ctype.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-#include "xf86cmap.h"
-
-#include "xf86Bus.h"
-
-#include "xf86sbusBus.h"
-#include "xf86Sbus.h"
-
-Bool sbusSlotClaimed = FALSE;
-
-static int xf86nSbusInfo;
-
-static void
-CheckSbusDevice(const char *device, int fbNum)
-{
- int fd, i;
- struct fbgattr fbattr;
- sbusDevicePtr psdp;
-
- fd = open(device, O_RDONLY, 0);
- if (fd < 0)
- return;
- memset(&fbattr, 0, sizeof(fbattr));
- if (ioctl(fd, FBIOGATTR, &fbattr) < 0) {
- if (ioctl(fd, FBIOGTYPE, &fbattr.fbtype) < 0) {
- close(fd);
- return;
- }
- }
- close(fd);
- for (i = 0; sbusDeviceTable[i].devId; i++)
- if (sbusDeviceTable[i].fbType == fbattr.fbtype.fb_type)
- break;
- if (! sbusDeviceTable[i].devId)
- return;
- xf86SbusInfo = xnfrealloc(xf86SbusInfo, sizeof(psdp) * (++xf86nSbusInfo + 1));
- xf86SbusInfo[xf86nSbusInfo] = NULL;
- xf86SbusInfo[xf86nSbusInfo - 1] = psdp = xnfcalloc(sizeof (sbusDevice), 1);
- psdp->devId = sbusDeviceTable[i].devId;
- psdp->fbNum = fbNum;
- psdp->device = xnfstrdup(device);
- psdp->width = fbattr.fbtype.fb_width;
- psdp->height = fbattr.fbtype.fb_height;
- psdp->fd = -1;
-}
-
-void
-xf86SbusProbe(void)
-{
- int i, useProm = 0;
- char fbDevName[32];
- sbusDevicePtr psdp, *psdpp;
-
- xf86SbusInfo = malloc(sizeof(psdp));
- *xf86SbusInfo = NULL;
- for (i = 0; i < 32; i++) {
- sprintf(fbDevName, "/dev/fb%d", i);
- CheckSbusDevice(fbDevName, i);
- }
- if (sparcPromInit() >= 0) {
- useProm = 1;
- sparcPromAssignNodes();
- }
- for (psdpp = xf86SbusInfo; (psdp = *psdpp); psdpp++) {
- for (i = 0; sbusDeviceTable[i].devId; i++)
- if (sbusDeviceTable[i].devId == psdp->devId)
- psdp->descr = sbusDeviceTable[i].descr;
- /*
- * If we can use PROM information and found the PROM node for this
- * device, we can tell more about the card.
- */
- if (useProm && psdp->node.node) {
- char *prop, *promPath;
- int len, chiprev, vmsize;
-
- switch (psdp->devId) {
- case SBUS_DEVICE_MGX:
- prop = sparcPromGetProperty(&psdp->node, "fb_size", &len);
- if (prop && len == 4 && *(int *)prop == 0x400000)
- psdp->descr = "Quantum 3D MGXplus with 4M VRAM";
- break;
- case SBUS_DEVICE_CG6:
- chiprev = 0;
- vmsize = 0;
- prop = sparcPromGetProperty(&psdp->node, "chiprev", &len);
- if (prop && len == 4)
- chiprev = *(int *)prop;
- prop = sparcPromGetProperty(&psdp->node, "vmsize", &len);
- if (prop && len == 4)
- vmsize = *(int *)prop;
- switch (chiprev) {
- case 1:
- case 2:
- case 3:
- case 4:
- psdp->descr = "Sun Double width GX"; break;
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- psdp->descr = "Sun Single width GX"; break;
- case 11:
- switch (vmsize) {
- case 2:
- psdp->descr = "Sun Turbo GX with 1M VSIMM"; break;
- case 4:
- psdp->descr = "Sun Turbo GX Plus"; break;
- default:
- psdp->descr = "Sun Turbo GX"; break;
- }
- }
- break;
- case SBUS_DEVICE_CG14:
- prop = sparcPromGetProperty(&psdp->node, "reg", &len);
- vmsize = 0;
- if (prop && !(len % 12) && len > 0)
- vmsize = *(int *)(prop + len - 4);
- switch (vmsize) {
- case 0x400000:
- psdp->descr = "Sun SX with 4M VSIMM"; break;
- case 0x800000:
- psdp->descr = "Sun SX with 8M VSIMM"; break;
- }
- break;
- case SBUS_DEVICE_LEO:
- prop = sparcPromGetProperty(&psdp->node, "model", &len);
- if (prop && len > 0 && !strstr(prop, "501-2503"))
- psdp->descr = "Sun Turbo ZX";
- break;
- case SBUS_DEVICE_TCX:
- if (sparcPromGetBool(&psdp->node, "tcx-8-bit"))
- psdp->descr = "Sun TCX (8bit)";
- else
- psdp->descr = "Sun TCX (S24)";
- break;
- case SBUS_DEVICE_FFB:
- prop = sparcPromGetProperty(&psdp->node, "name", &len);
- chiprev = 0;
- prop = sparcPromGetProperty(&psdp->node, "board_type", &len);
- if (prop && len == 4)
- chiprev = *(int *)prop;
- if (strstr (prop, "afb")) {
- if (chiprev == 3)
- psdp->descr = "Sun|Elite3D-M6 Horizontal";
- } else {
- switch (chiprev) {
- case 0x08:
- psdp->descr = "Sun FFB 67MHz Creator"; break;
- case 0x0b:
- psdp->descr = "Sun FFB 67MHz Creator 3D"; break;
- case 0x1b:
- psdp->descr = "Sun FFB 75MHz Creator 3D"; break;
- case 0x20:
- case 0x28:
- psdp->descr = "Sun FFB2 Vertical Creator"; break;
- case 0x23:
- case 0x2b:
- psdp->descr = "Sun FFB2 Vertical Creator 3D"; break;
- case 0x30:
- psdp->descr = "Sun FFB2+ Vertical Creator"; break;
- case 0x33:
- psdp->descr = "Sun FFB2+ Vertical Creator 3D"; break;
- case 0x40:
- case 0x48:
- psdp->descr = "Sun FFB2 Horizontal Creator"; break;
- case 0x43:
- case 0x4b:
- psdp->descr = "Sun FFB2 Horizontal Creator 3D"; break;
- }
- }
- break;
- }
-
- xf86Msg(X_PROBED, "SBUS:(0x%08x) %s", psdp->node.node, psdp->descr);
- promPath = sparcPromNode2Pathname (&psdp->node);
- if (promPath) {
- xf86ErrorF(" at %s", promPath);
- free(promPath);
- }
- } else
- xf86Msg(X_PROBED, "SBUS: %s", psdp->descr);
- xf86ErrorF("\n");
- }
- if (useProm)
- sparcPromClose();
-}
-
-/*
- * Parse a BUS ID string, and return the SBUS bus parameters if it was
- * in the correct format for a SBUS bus id.
- */
-
-Bool
-xf86ParseSbusBusString(const char *busID, int *fbNum)
-{
- /*
- * The format is assumed to be one of:
- * "fbN", e.g. "fb1", which means the device corresponding to /dev/fbN
- * "nameN", e.g. "cgsix0", which means Nth instance of card NAME
- * "/prompath", e.g. "/sbus@0,10001000/cgsix@3,0" which is PROM pathname
- * to the device.
- */
-
- const char *id;
- int i, len;
-
- if (StringToBusType(busID, &id) != BUS_SBUS)
- return FALSE;
-
- if (*id != '/') {
- if (!strncmp (id, "fb", 2)) {
- if (!isdigit(id[2]))
- return FALSE;
- *fbNum = atoi(id + 2);
- return TRUE;
- } else {
- sbusDevicePtr *psdpp;
- int devId;
-
- for (i = 0, len = 0; sbusDeviceTable[i].devId; i++) {
- len = strlen(sbusDeviceTable[i].promName);
- if (!strncmp (sbusDeviceTable[i].promName, id, len)
- && isdigit(id[len]))
- break;
- }
- devId = sbusDeviceTable[i].devId;
- if (!devId) return FALSE;
- i = atoi(id + len);
- for (psdpp = xf86SbusInfo; *psdpp; ++psdpp) {
- if ((*psdpp)->devId != devId)
- continue;
- if (!i) {
- *fbNum = (*psdpp)->fbNum;
- return TRUE;
- }
- i--;
- }
- }
- return FALSE;
- }
-
- if (sparcPromInit() >= 0) {
- i = sparcPromPathname2Node(id);
- sparcPromClose();
- if (i) {
- sbusDevicePtr *psdpp;
- for (psdpp = xf86SbusInfo; *psdpp; ++psdpp) {
- if ((*psdpp)->node.node == i) {
- *fbNum = (*psdpp)->fbNum;
- return TRUE;
- }
- }
- }
- }
- return FALSE;
-}
-
-/*
- * Compare a BUS ID string with a SBUS bus id. Return TRUE if they match.
- */
-
-Bool
-xf86CompareSbusBusString(const char *busID, int fbNum)
-{
- int iFbNum;
-
- if (xf86ParseSbusBusString(busID, &iFbNum)) {
- return fbNum == iFbNum;
- } else {
- return FALSE;
- }
-}
-
-/*
- * Check if the slot requested is free. If it is already in use, return FALSE.
- */
-
-Bool
-xf86CheckSbusSlot(int fbNum)
-{
- int i;
- EntityPtr p;
-
- for (i = 0; i < xf86NumEntities; i++) {
- p = xf86Entities[i];
- /* Check if this SBUS slot is taken */
- if (p->bus.type == BUS_SBUS && p->bus.id.sbus.fbNum == fbNum)
- return FALSE;
- }
-
- return TRUE;
-}
-
-/*
- * If the slot requested is already in use, return -1.
- * Otherwise, claim the slot for the screen requesting it.
- */
-
-int
-xf86ClaimSbusSlot(sbusDevicePtr psdp, DriverPtr drvp,
- GDevPtr dev, Bool active)
-{
- EntityPtr p = NULL;
-
- int num;
-
- if (xf86CheckSbusSlot(psdp->fbNum)) {
- num = xf86AllocateEntity();
- p = xf86Entities[num];
- p->driver = drvp;
- p->chipset = -1;
- p->bus.type = BUS_SBUS;
- xf86AddDevToEntity(num, dev);
- p->bus.id.sbus.fbNum = psdp->fbNum;
- p->active = active;
- p->inUse = FALSE;
- sbusSlotClaimed = TRUE;
- return num;
- } else
- return -1;
-}
-
-int
-xf86MatchSbusInstances(const char *driverName, int sbusDevId,
- GDevPtr *devList, int numDevs, DriverPtr drvp,
- int **foundEntities)
-{
- int i,j;
- sbusDevicePtr psdp, *psdpp;
- int numClaimedInstances = 0;
- int allocatedInstances = 0;
- int numFound = 0;
- GDevPtr devBus = NULL;
- GDevPtr dev = NULL;
- int *retEntities = NULL;
- int useProm = 0;
-
- struct Inst {
- sbusDevicePtr sbus;
- GDevPtr dev;
- Bool claimed; /* BusID matches with a device section */
- } *instances = NULL;
-
- *foundEntities = NULL;
- for (psdpp = xf86SbusInfo, psdp = *psdpp; psdp; psdp = *++psdpp) {
- if (psdp->devId != sbusDevId)
- continue;
- if (psdp->fd == -2)
- continue;
- ++allocatedInstances;
- instances = xnfrealloc(instances,
- allocatedInstances * sizeof(struct Inst));
- instances[allocatedInstances - 1].sbus = psdp;
- instances[allocatedInstances - 1].dev = NULL;
- instances[allocatedInstances - 1].claimed = FALSE;
- numFound++;
- }
-
- /*
- * This may be debatable, but if no SBUS devices with a matching vendor
- * type is found, return zero now. It is probably not desirable to
- * allow the config file to override this.
- */
- if (allocatedInstances <= 0) {
- free(instances);
- return 0;
- }
-
- if (sparcPromInit() >= 0)
- useProm = 1;
-
- if (xf86DoConfigure && xf86DoConfigurePass1) {
- GDevPtr pGDev;
- int actualcards = 0;
- for (i = 0; i < allocatedInstances; i++) {
- actualcards++;
- pGDev = xf86AddBusDeviceToConfigure(drvp->driverName, BUS_SBUS,
- instances[i].sbus, -1);
- if (pGDev) {
- /*
- * XF86Match???Instances() treat chipID and chipRev as
- * overrides, so clobber them here.
- */
- pGDev->chipID = pGDev->chipRev = -1;
- }
- }
- free(instances);
- if (useProm)
- sparcPromClose();
- return actualcards;
- }
-
- DebugF("%s instances found: %d\n", driverName, allocatedInstances);
-
- for (i = 0; i < allocatedInstances; i++) {
- char *promPath = NULL;
-
- psdp = instances[i].sbus;
- devBus = NULL;
- dev = NULL;
- if (useProm && psdp->node.node)
- promPath = sparcPromNode2Pathname(&psdp->node);
-
- for (j = 0; j < numDevs; j++) {
- if (devList[j]->busID && *devList[j]->busID) {
- if (xf86CompareSbusBusString(devList[j]->busID, psdp->fbNum)) {
- if (devBus)
- xf86MsgVerb(X_WARNING,0,
- "%s: More than one matching Device section for "
- "instance (BusID: %s) found: %s\n",
- driverName,devList[j]->identifier,
- devList[j]->busID);
- else
- devBus = devList[j];
- }
- } else {
- if (!dev && !devBus) {
- if (promPath)
- xf86Msg(X_PROBED, "Assigning device section with no busID to SBUS:%s\n",
- promPath);
- else
- xf86Msg(X_PROBED, "Assigning device section with no busID to SBUS:fb%d\n",
- psdp->fbNum);
- dev = devList[j];
- } else
- xf86MsgVerb(X_WARNING, 0,
- "%s: More than one matching Device section "
- "found: %s\n", driverName, devList[j]->identifier);
- }
- }
- if (devBus) dev = devBus; /* busID preferred */
- if (!dev && psdp->fd != -2) {
- if (promPath) {
- xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section "
- "for instance (BusID SBUS:%s) found\n",
- driverName, promPath);
- } else
- xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section "
- "for instance (BusID SBUS:fb%d) found\n",
- driverName, psdp->fbNum);
- } else if (dev) {
- numClaimedInstances++;
- instances[i].claimed = TRUE;
- instances[i].dev = dev;
- }
- free(promPath);
- }
-
- DebugF("%s instances found: %d\n", driverName, numClaimedInstances);
-
- /*
- * Of the claimed instances, check that another driver hasn't already
- * claimed its slot.
- */
- numFound = 0;
- for (i = 0; i < allocatedInstances && numClaimedInstances > 0; i++) {
- if (!instances[i].claimed)
- continue;
- psdp = instances[i].sbus;
- if (!xf86CheckSbusSlot(psdp->fbNum))
- continue;
-
- DebugF("%s: card at fb%d %08x is claimed by a Device section\n",
- driverName, psdp->fbNum, psdp->node.node);
-
- /* Allocate an entry in the lists to be returned */
- numFound++;
- retEntities = xnfrealloc(retEntities, numFound * sizeof(int));
- retEntities[numFound - 1]
- = xf86ClaimSbusSlot(psdp, drvp, instances[i].dev,instances[i].dev->active ?
- TRUE : FALSE);
- }
- free(instances);
- if (numFound > 0) {
- *foundEntities = retEntities;
- }
-
- if (useProm)
- sparcPromClose();
-
- return numFound;
-}
-
-/*
- * xf86GetSbusInfoForEntity() -- Get the sbusDevicePtr of entity.
- */
-sbusDevicePtr
-xf86GetSbusInfoForEntity(int entityIndex)
-{
- sbusDevicePtr *psdpp;
- EntityPtr p = xf86Entities[entityIndex];
-
- if (entityIndex >= xf86NumEntities
- || p->bus.type != BUS_SBUS) return NULL;
-
- for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) {
- if (p->bus.id.sbus.fbNum == (*psdpp)->fbNum)
- return *psdpp;
- }
- return NULL;
-}
-
-int
-xf86GetEntityForSbusInfo(sbusDevicePtr psdp)
-{
- int i;
-
- for (i = 0; i < xf86NumEntities; i++) {
- EntityPtr p = xf86Entities[i];
- if (p->bus.type != BUS_SBUS) continue;
-
- if (p->bus.id.sbus.fbNum == psdp->fbNum)
- return i;
- }
- return -1;
-}
-
-void
-xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp)
-{
- DisplayModePtr mode;
-
- mode = xnfcalloc(sizeof(DisplayModeRec), 1);
- mode->name = "current";
- mode->next = mode;
- mode->prev = mode;
- mode->type = M_T_BUILTIN;
- mode->Clock = 100000000;
- mode->HDisplay = psdp->width;
- mode->HSyncStart = psdp->width;
- mode->HSyncEnd = psdp->width;
- mode->HTotal = psdp->width;
- mode->VDisplay = psdp->height;
- mode->VSyncStart = psdp->height;
- mode->VSyncEnd = psdp->height;
- mode->VTotal = psdp->height;
- mode->SynthClock = mode->Clock;
- mode->CrtcHDisplay = mode->HDisplay;
- mode->CrtcHSyncStart = mode->HSyncStart;
- mode->CrtcHSyncEnd = mode->HSyncEnd;
- mode->CrtcHTotal = mode->HTotal;
- mode->CrtcVDisplay = mode->VDisplay;
- mode->CrtcVSyncStart = mode->VSyncStart;
- mode->CrtcVSyncEnd = mode->VSyncEnd;
- mode->CrtcVTotal = mode->VTotal;
- mode->CrtcHAdjusted = FALSE;
- mode->CrtcVAdjusted = FALSE;
- pScrn->modes = mode;
- pScrn->virtualX = psdp->width;
- pScrn->virtualY = psdp->height;
-}
-
-static sbusPaletteKeyIndex;
-static DevPrivateKey sbusPaletteKey = &sbusPaletteKeyIndex;
-typedef struct _sbusCmap {
- sbusDevicePtr psdp;
- CloseScreenProcPtr CloseScreen;
- Bool origCmapValid;
- unsigned char origRed[16];
- unsigned char origGreen[16];
- unsigned char origBlue[16];
-} sbusCmapRec, *sbusCmapPtr;
-
-#define SBUSCMAPPTR(pScreen) ((sbusCmapPtr) \
- dixLookupPrivate(&(pScreen)->devPrivates, sbusPaletteKey))
-
-static void
-xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
- LOCO *colors, VisualPtr pVisual)
-{
- int i, index;
- sbusCmapPtr cmap;
- struct fbcmap fbcmap;
- unsigned char *data = malloc(numColors*3);
-
- cmap = SBUSCMAPPTR(pScrn->pScreen);
- if (!cmap) return;
- fbcmap.count = 0;
- fbcmap.index = indices[0];
- fbcmap.red = data;
- fbcmap.green = data + numColors;
- fbcmap.blue = fbcmap.green + numColors;
- for (i = 0; i < numColors; i++) {
- index = indices[i];
- if (fbcmap.count && index != fbcmap.index + fbcmap.count) {
- ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap);
- fbcmap.count = 0;
- fbcmap.index = index;
- }
- fbcmap.red[fbcmap.count] = colors[index].red;
- fbcmap.green[fbcmap.count] = colors[index].green;
- fbcmap.blue[fbcmap.count++] = colors[index].blue;
- }
- ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap);
- free(data);
-}
-
-static Bool
-xf86SbusCmapCloseScreen(int i, ScreenPtr pScreen)
-{
- sbusCmapPtr cmap;
- struct fbcmap fbcmap;
-
- cmap = SBUSCMAPPTR(pScreen);
- if (cmap->origCmapValid) {
- fbcmap.index = 0;
- fbcmap.count = 16;
- fbcmap.red = cmap->origRed;
- fbcmap.green = cmap->origGreen;
- fbcmap.blue = cmap->origBlue;
- ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap);
- }
- pScreen->CloseScreen = cmap->CloseScreen;
- free(cmap);
- return (*pScreen->CloseScreen) (i, pScreen);
-}
-
-Bool
-xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp)
-{
- sbusCmapPtr cmap;
- struct fbcmap fbcmap;
- unsigned char data[2];
-
- cmap = xnfcalloc(1, sizeof(sbusCmapRec));
- dixSetPrivate(&pScreen->devPrivates, sbusPaletteKey, cmap);
- cmap->psdp = psdp;
- fbcmap.index = 0;
- fbcmap.count = 16;
- fbcmap.red = cmap->origRed;
- fbcmap.green = cmap->origGreen;
- fbcmap.blue = cmap->origBlue;
- if (ioctl (psdp->fd, FBIOGETCMAP, &fbcmap) >= 0)
- cmap->origCmapValid = TRUE;
- fbcmap.index = 0;
- fbcmap.count = 2;
- fbcmap.red = data;
- fbcmap.green = data;
- fbcmap.blue = data;
- if (pScreen->whitePixel == 0) {
- data[0] = 255;
- data[1] = 0;
- } else {
- data[0] = 0;
- data[1] = 255;
- }
- ioctl (psdp->fd, FBIOPUTCMAP, &fbcmap);
- cmap->CloseScreen = pScreen->CloseScreen;
- pScreen->CloseScreen = xf86SbusCmapCloseScreen;
- return xf86HandleColormaps(pScreen, 256, 8,
- xf86SbusCmapLoadPalette, NULL, 0);
-}
-
-Bool
-xf86SbusConfigure(void *busData, sbusDevicePtr sBus)
-{
- if (sBus && sBus->fbNum == ((sbusDevicePtr) busData)->fbNum)
- return 0;
- return 1;
-}
-
-void
-xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec *GDev)
-{
- char *promPath = NULL;
-
- sBus = (sbusDevicePtr) busData;
- GDev->identifier = sBus->descr;
- if (sparcPromInit() >= 0) {
- promPath = sparcPromNode2Pathname(&sBus->node);
- sparcPromClose();
- }
- if (promPath) {
- XNFasprintf(&GDev->busID, "SBUS:%s", promPath);
- free(promPath);
- } else {
- XNFasprintf(&GDev->busID, "SBUS:fb%d", sBus->fbNum);
- }
-}
+/*
+ * SBUS bus-specific code.
+ *
+ * Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * JAKUB JELINEK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <X11/X.h>
+#include "os.h"
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+#include "xf86cmap.h"
+
+#include "xf86Bus.h"
+
+#include "xf86sbusBus.h"
+#include "xf86Sbus.h"
+
+Bool sbusSlotClaimed = FALSE;
+
+static int xf86nSbusInfo;
+
+static void
+CheckSbusDevice(const char *device, int fbNum)
+{
+ int fd, i;
+ struct fbgattr fbattr;
+ sbusDevicePtr psdp;
+
+ fd = open(device, O_RDONLY, 0);
+ if (fd < 0)
+ return;
+ memset(&fbattr, 0, sizeof(fbattr));
+ if (ioctl(fd, FBIOGATTR, &fbattr) < 0) {
+ if (ioctl(fd, FBIOGTYPE, &fbattr.fbtype) < 0) {
+ close(fd);
+ return;
+ }
+ }
+ close(fd);
+ for (i = 0; sbusDeviceTable[i].devId; i++)
+ if (sbusDeviceTable[i].fbType == fbattr.fbtype.fb_type)
+ break;
+ if (! sbusDeviceTable[i].devId)
+ return;
+ xf86SbusInfo = xnfrealloc(xf86SbusInfo, sizeof(psdp) * (++xf86nSbusInfo + 1));
+ xf86SbusInfo[xf86nSbusInfo] = NULL;
+ xf86SbusInfo[xf86nSbusInfo - 1] = psdp = xnfcalloc(sizeof (sbusDevice), 1);
+ psdp->devId = sbusDeviceTable[i].devId;
+ psdp->fbNum = fbNum;
+ psdp->device = xnfstrdup(device);
+ psdp->width = fbattr.fbtype.fb_width;
+ psdp->height = fbattr.fbtype.fb_height;
+ psdp->fd = -1;
+}
+
+void
+xf86SbusProbe(void)
+{
+ int i, useProm = 0;
+ char fbDevName[32];
+ sbusDevicePtr psdp, *psdpp;
+
+ xf86SbusInfo = malloc(sizeof(psdp));
+ *xf86SbusInfo = NULL;
+ for (i = 0; i < 32; i++) {
+ sprintf(fbDevName, "/dev/fb%d", i);
+ CheckSbusDevice(fbDevName, i);
+ }
+ if (sparcPromInit() >= 0) {
+ useProm = 1;
+ sparcPromAssignNodes();
+ }
+ for (psdpp = xf86SbusInfo; (psdp = *psdpp); psdpp++) {
+ for (i = 0; sbusDeviceTable[i].devId; i++)
+ if (sbusDeviceTable[i].devId == psdp->devId)
+ psdp->descr = sbusDeviceTable[i].descr;
+ /*
+ * If we can use PROM information and found the PROM node for this
+ * device, we can tell more about the card.
+ */
+ if (useProm && psdp->node.node) {
+ char *prop, *promPath;
+ int len, chiprev, vmsize;
+
+ switch (psdp->devId) {
+ case SBUS_DEVICE_MGX:
+ prop = sparcPromGetProperty(&psdp->node, "fb_size", &len);
+ if (prop && len == 4 && *(int *)prop == 0x400000)
+ psdp->descr = "Quantum 3D MGXplus with 4M VRAM";
+ break;
+ case SBUS_DEVICE_CG6:
+ chiprev = 0;
+ vmsize = 0;
+ prop = sparcPromGetProperty(&psdp->node, "chiprev", &len);
+ if (prop && len == 4)
+ chiprev = *(int *)prop;
+ prop = sparcPromGetProperty(&psdp->node, "vmsize", &len);
+ if (prop && len == 4)
+ vmsize = *(int *)prop;
+ switch (chiprev) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ psdp->descr = "Sun Double width GX"; break;
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ psdp->descr = "Sun Single width GX"; break;
+ case 11:
+ switch (vmsize) {
+ case 2:
+ psdp->descr = "Sun Turbo GX with 1M VSIMM"; break;
+ case 4:
+ psdp->descr = "Sun Turbo GX Plus"; break;
+ default:
+ psdp->descr = "Sun Turbo GX"; break;
+ }
+ }
+ break;
+ case SBUS_DEVICE_CG14:
+ prop = sparcPromGetProperty(&psdp->node, "reg", &len);
+ vmsize = 0;
+ if (prop && !(len % 12) && len > 0)
+ vmsize = *(int *)(prop + len - 4);
+ switch (vmsize) {
+ case 0x400000:
+ psdp->descr = "Sun SX with 4M VSIMM"; break;
+ case 0x800000:
+ psdp->descr = "Sun SX with 8M VSIMM"; break;
+ }
+ break;
+ case SBUS_DEVICE_LEO:
+ prop = sparcPromGetProperty(&psdp->node, "model", &len);
+ if (prop && len > 0 && !strstr(prop, "501-2503"))
+ psdp->descr = "Sun Turbo ZX";
+ break;
+ case SBUS_DEVICE_TCX:
+ if (sparcPromGetBool(&psdp->node, "tcx-8-bit"))
+ psdp->descr = "Sun TCX (8bit)";
+ else
+ psdp->descr = "Sun TCX (S24)";
+ break;
+ case SBUS_DEVICE_FFB:
+ prop = sparcPromGetProperty(&psdp->node, "name", &len);
+ chiprev = 0;
+ prop = sparcPromGetProperty(&psdp->node, "board_type", &len);
+ if (prop && len == 4)
+ chiprev = *(int *)prop;
+ if (strstr (prop, "afb")) {
+ if (chiprev == 3)
+ psdp->descr = "Sun|Elite3D-M6 Horizontal";
+ } else {
+ switch (chiprev) {
+ case 0x08:
+ psdp->descr = "Sun FFB 67MHz Creator"; break;
+ case 0x0b:
+ psdp->descr = "Sun FFB 67MHz Creator 3D"; break;
+ case 0x1b:
+ psdp->descr = "Sun FFB 75MHz Creator 3D"; break;
+ case 0x20:
+ case 0x28:
+ psdp->descr = "Sun FFB2 Vertical Creator"; break;
+ case 0x23:
+ case 0x2b:
+ psdp->descr = "Sun FFB2 Vertical Creator 3D"; break;
+ case 0x30:
+ psdp->descr = "Sun FFB2+ Vertical Creator"; break;
+ case 0x33:
+ psdp->descr = "Sun FFB2+ Vertical Creator 3D"; break;
+ case 0x40:
+ case 0x48:
+ psdp->descr = "Sun FFB2 Horizontal Creator"; break;
+ case 0x43:
+ case 0x4b:
+ psdp->descr = "Sun FFB2 Horizontal Creator 3D"; break;
+ }
+ }
+ break;
+ }
+
+ xf86Msg(X_PROBED, "SBUS:(0x%08x) %s", psdp->node.node, psdp->descr);
+ promPath = sparcPromNode2Pathname (&psdp->node);
+ if (promPath) {
+ xf86ErrorF(" at %s", promPath);
+ free(promPath);
+ }
+ } else
+ xf86Msg(X_PROBED, "SBUS: %s", psdp->descr);
+ xf86ErrorF("\n");
+ }
+ if (useProm)
+ sparcPromClose();
+}
+
+/*
+ * Parse a BUS ID string, and return the SBUS bus parameters if it was
+ * in the correct format for a SBUS bus id.
+ */
+
+Bool
+xf86ParseSbusBusString(const char *busID, int *fbNum)
+{
+ /*
+ * The format is assumed to be one of:
+ * "fbN", e.g. "fb1", which means the device corresponding to /dev/fbN
+ * "nameN", e.g. "cgsix0", which means Nth instance of card NAME
+ * "/prompath", e.g. "/sbus@0,10001000/cgsix@3,0" which is PROM pathname
+ * to the device.
+ */
+
+ const char *id;
+ int i, len;
+
+ if (StringToBusType(busID, &id) != BUS_SBUS)
+ return FALSE;
+
+ if (*id != '/') {
+ if (!strncmp (id, "fb", 2)) {
+ if (!isdigit(id[2]))
+ return FALSE;
+ *fbNum = atoi(id + 2);
+ return TRUE;
+ } else {
+ sbusDevicePtr *psdpp;
+ int devId;
+
+ for (i = 0, len = 0; sbusDeviceTable[i].devId; i++) {
+ len = strlen(sbusDeviceTable[i].promName);
+ if (!strncmp (sbusDeviceTable[i].promName, id, len)
+ && isdigit(id[len]))
+ break;
+ }
+ devId = sbusDeviceTable[i].devId;
+ if (!devId) return FALSE;
+ i = atoi(id + len);
+ for (psdpp = xf86SbusInfo; *psdpp; ++psdpp) {
+ if ((*psdpp)->devId != devId)
+ continue;
+ if (!i) {
+ *fbNum = (*psdpp)->fbNum;
+ return TRUE;
+ }
+ i--;
+ }
+ }
+ return FALSE;
+ }
+
+ if (sparcPromInit() >= 0) {
+ i = sparcPromPathname2Node(id);
+ sparcPromClose();
+ if (i) {
+ sbusDevicePtr *psdpp;
+ for (psdpp = xf86SbusInfo; *psdpp; ++psdpp) {
+ if ((*psdpp)->node.node == i) {
+ *fbNum = (*psdpp)->fbNum;
+ return TRUE;
+ }
+ }
+ }
+ }
+ return FALSE;
+}
+
+/*
+ * Compare a BUS ID string with a SBUS bus id. Return TRUE if they match.
+ */
+
+Bool
+xf86CompareSbusBusString(const char *busID, int fbNum)
+{
+ int iFbNum;
+
+ if (xf86ParseSbusBusString(busID, &iFbNum)) {
+ return fbNum == iFbNum;
+ } else {
+ return FALSE;
+ }
+}
+
+/*
+ * Check if the slot requested is free. If it is already in use, return FALSE.
+ */
+
+Bool
+xf86CheckSbusSlot(int fbNum)
+{
+ int i;
+ EntityPtr p;
+
+ for (i = 0; i < xf86NumEntities; i++) {
+ p = xf86Entities[i];
+ /* Check if this SBUS slot is taken */
+ if (p->bus.type == BUS_SBUS && p->bus.id.sbus.fbNum == fbNum)
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * If the slot requested is already in use, return -1.
+ * Otherwise, claim the slot for the screen requesting it.
+ */
+
+int
+xf86ClaimSbusSlot(sbusDevicePtr psdp, DriverPtr drvp,
+ GDevPtr dev, Bool active)
+{
+ EntityPtr p = NULL;
+
+ int num;
+
+ if (xf86CheckSbusSlot(psdp->fbNum)) {
+ num = xf86AllocateEntity();
+ p = xf86Entities[num];
+ p->driver = drvp;
+ p->chipset = -1;
+ p->bus.type = BUS_SBUS;
+ xf86AddDevToEntity(num, dev);
+ p->bus.id.sbus.fbNum = psdp->fbNum;
+ p->active = active;
+ p->inUse = FALSE;
+ sbusSlotClaimed = TRUE;
+ return num;
+ } else
+ return -1;
+}
+
+int
+xf86MatchSbusInstances(const char *driverName, int sbusDevId,
+ GDevPtr *devList, int numDevs, DriverPtr drvp,
+ int **foundEntities)
+{
+ int i,j;
+ sbusDevicePtr psdp, *psdpp;
+ int numClaimedInstances = 0;
+ int allocatedInstances = 0;
+ int numFound = 0;
+ GDevPtr devBus = NULL;
+ GDevPtr dev = NULL;
+ int *retEntities = NULL;
+ int useProm = 0;
+
+ struct Inst {
+ sbusDevicePtr sbus;
+ GDevPtr dev;
+ Bool claimed; /* BusID matches with a device section */
+ } *instances = NULL;
+
+ *foundEntities = NULL;
+ for (psdpp = xf86SbusInfo, psdp = *psdpp; psdp; psdp = *++psdpp) {
+ if (psdp->devId != sbusDevId)
+ continue;
+ if (psdp->fd == -2)
+ continue;
+ ++allocatedInstances;
+ instances = xnfrealloc(instances,
+ allocatedInstances * sizeof(struct Inst));
+ instances[allocatedInstances - 1].sbus = psdp;
+ instances[allocatedInstances - 1].dev = NULL;
+ instances[allocatedInstances - 1].claimed = FALSE;
+ numFound++;
+ }
+
+ /*
+ * This may be debatable, but if no SBUS devices with a matching vendor
+ * type is found, return zero now. It is probably not desirable to
+ * allow the config file to override this.
+ */
+ if (allocatedInstances <= 0) {
+ free(instances);
+ return 0;
+ }
+
+ if (sparcPromInit() >= 0)
+ useProm = 1;
+
+ if (xf86DoConfigure && xf86DoConfigurePass1) {
+ GDevPtr pGDev;
+ int actualcards = 0;
+ for (i = 0; i < allocatedInstances; i++) {
+ actualcards++;
+ pGDev = xf86AddBusDeviceToConfigure(drvp->driverName, BUS_SBUS,
+ instances[i].sbus, -1);
+ if (pGDev) {
+ /*
+ * XF86Match???Instances() treat chipID and chipRev as
+ * overrides, so clobber them here.
+ */
+ pGDev->chipID = pGDev->chipRev = -1;
+ }
+ }
+ free(instances);
+ if (useProm)
+ sparcPromClose();
+ return actualcards;
+ }
+
+ DebugF("%s instances found: %d\n", driverName, allocatedInstances);
+
+ for (i = 0; i < allocatedInstances; i++) {
+ char *promPath = NULL;
+
+ psdp = instances[i].sbus;
+ devBus = NULL;
+ dev = NULL;
+ if (useProm && psdp->node.node)
+ promPath = sparcPromNode2Pathname(&psdp->node);
+
+ for (j = 0; j < numDevs; j++) {
+ if (devList[j]->busID && *devList[j]->busID) {
+ if (xf86CompareSbusBusString(devList[j]->busID, psdp->fbNum)) {
+ if (devBus)
+ xf86MsgVerb(X_WARNING,0,
+ "%s: More than one matching Device section for "
+ "instance (BusID: %s) found: %s\n",
+ driverName,devList[j]->identifier,
+ devList[j]->busID);
+ else
+ devBus = devList[j];
+ }
+ } else {
+ if (!dev && !devBus) {
+ if (promPath)
+ xf86Msg(X_PROBED, "Assigning device section with no busID to SBUS:%s\n",
+ promPath);
+ else
+ xf86Msg(X_PROBED, "Assigning device section with no busID to SBUS:fb%d\n",
+ psdp->fbNum);
+ dev = devList[j];
+ } else
+ xf86MsgVerb(X_WARNING, 0,
+ "%s: More than one matching Device section "
+ "found: %s\n", driverName, devList[j]->identifier);
+ }
+ }
+ if (devBus) dev = devBus; /* busID preferred */
+ if (!dev && psdp->fd != -2) {
+ if (promPath) {
+ xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section "
+ "for instance (BusID SBUS:%s) found\n",
+ driverName, promPath);
+ } else
+ xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section "
+ "for instance (BusID SBUS:fb%d) found\n",
+ driverName, psdp->fbNum);
+ } else if (dev) {
+ numClaimedInstances++;
+ instances[i].claimed = TRUE;
+ instances[i].dev = dev;
+ }
+ free(promPath);
+ }
+
+ DebugF("%s instances found: %d\n", driverName, numClaimedInstances);
+
+ /*
+ * Of the claimed instances, check that another driver hasn't already
+ * claimed its slot.
+ */
+ numFound = 0;
+ for (i = 0; i < allocatedInstances && numClaimedInstances > 0; i++) {
+ if (!instances[i].claimed)
+ continue;
+ psdp = instances[i].sbus;
+ if (!xf86CheckSbusSlot(psdp->fbNum))
+ continue;
+
+ DebugF("%s: card at fb%d %08x is claimed by a Device section\n",
+ driverName, psdp->fbNum, psdp->node.node);
+
+ /* Allocate an entry in the lists to be returned */
+ numFound++;
+ retEntities = xnfrealloc(retEntities, numFound * sizeof(int));
+ retEntities[numFound - 1]
+ = xf86ClaimSbusSlot(psdp, drvp, instances[i].dev,instances[i].dev->active ?
+ TRUE : FALSE);
+ }
+ free(instances);
+ if (numFound > 0) {
+ *foundEntities = retEntities;
+ }
+
+ if (useProm)
+ sparcPromClose();
+
+ return numFound;
+}
+
+/*
+ * xf86GetSbusInfoForEntity() -- Get the sbusDevicePtr of entity.
+ */
+sbusDevicePtr
+xf86GetSbusInfoForEntity(int entityIndex)
+{
+ sbusDevicePtr *psdpp;
+ EntityPtr p = xf86Entities[entityIndex];
+
+ if (entityIndex >= xf86NumEntities
+ || p->bus.type != BUS_SBUS) return NULL;
+
+ for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) {
+ if (p->bus.id.sbus.fbNum == (*psdpp)->fbNum)
+ return *psdpp;
+ }
+ return NULL;
+}
+
+int
+xf86GetEntityForSbusInfo(sbusDevicePtr psdp)
+{
+ int i;
+
+ for (i = 0; i < xf86NumEntities; i++) {
+ EntityPtr p = xf86Entities[i];
+ if (p->bus.type != BUS_SBUS) continue;
+
+ if (p->bus.id.sbus.fbNum == psdp->fbNum)
+ return i;
+ }
+ return -1;
+}
+
+void
+xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp)
+{
+ DisplayModePtr mode;
+
+ mode = xnfcalloc(sizeof(DisplayModeRec), 1);
+ mode->name = "current";
+ mode->next = mode;
+ mode->prev = mode;
+ mode->type = M_T_BUILTIN;
+ mode->Clock = 100000000;
+ mode->HDisplay = psdp->width;
+ mode->HSyncStart = psdp->width;
+ mode->HSyncEnd = psdp->width;
+ mode->HTotal = psdp->width;
+ mode->VDisplay = psdp->height;
+ mode->VSyncStart = psdp->height;
+ mode->VSyncEnd = psdp->height;
+ mode->VTotal = psdp->height;
+ mode->SynthClock = mode->Clock;
+ mode->CrtcHDisplay = mode->HDisplay;
+ mode->CrtcHSyncStart = mode->HSyncStart;
+ mode->CrtcHSyncEnd = mode->HSyncEnd;
+ mode->CrtcHTotal = mode->HTotal;
+ mode->CrtcVDisplay = mode->VDisplay;
+ mode->CrtcVSyncStart = mode->VSyncStart;
+ mode->CrtcVSyncEnd = mode->VSyncEnd;
+ mode->CrtcVTotal = mode->VTotal;
+ mode->CrtcHAdjusted = FALSE;
+ mode->CrtcVAdjusted = FALSE;
+ pScrn->modes = mode;
+ pScrn->virtualX = psdp->width;
+ pScrn->virtualY = psdp->height;
+}
+
+static sbusPaletteKeyIndex;
+static DevPrivateKey sbusPaletteKey = &sbusPaletteKeyIndex;
+typedef struct _sbusCmap {
+ sbusDevicePtr psdp;
+ CloseScreenProcPtr CloseScreen;
+ Bool origCmapValid;
+ unsigned char origRed[16];
+ unsigned char origGreen[16];
+ unsigned char origBlue[16];
+} sbusCmapRec, *sbusCmapPtr;
+
+#define SBUSCMAPPTR(pScreen) ((sbusCmapPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, sbusPaletteKey))
+
+static void
+xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
+ LOCO *colors, VisualPtr pVisual)
+{
+ int i, index;
+ sbusCmapPtr cmap;
+ struct fbcmap fbcmap;
+ unsigned char *data = malloc(numColors*3);
+
+ cmap = SBUSCMAPPTR(pScrn->pScreen);
+ if (!cmap) return;
+ fbcmap.count = 0;
+ fbcmap.index = indices[0];
+ fbcmap.red = data;
+ fbcmap.green = data + numColors;
+ fbcmap.blue = fbcmap.green + numColors;
+ for (i = 0; i < numColors; i++) {
+ index = indices[i];
+ if (fbcmap.count && index != fbcmap.index + fbcmap.count) {
+ ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap);
+ fbcmap.count = 0;
+ fbcmap.index = index;
+ }
+ fbcmap.red[fbcmap.count] = colors[index].red;
+ fbcmap.green[fbcmap.count] = colors[index].green;
+ fbcmap.blue[fbcmap.count++] = colors[index].blue;
+ }
+ ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap);
+ free(data);
+}
+
+static Bool
+xf86SbusCmapCloseScreen(int i, ScreenPtr pScreen)
+{
+ sbusCmapPtr cmap;
+ struct fbcmap fbcmap;
+
+ cmap = SBUSCMAPPTR(pScreen);
+ if (cmap->origCmapValid) {
+ fbcmap.index = 0;
+ fbcmap.count = 16;
+ fbcmap.red = cmap->origRed;
+ fbcmap.green = cmap->origGreen;
+ fbcmap.blue = cmap->origBlue;
+ ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap);
+ }
+ pScreen->CloseScreen = cmap->CloseScreen;
+ free(cmap);
+ return (*pScreen->CloseScreen) (i, pScreen);
+}
+
+Bool
+xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp)
+{
+ sbusCmapPtr cmap;
+ struct fbcmap fbcmap;
+ unsigned char data[2];
+
+ cmap = xnfcalloc(1, sizeof(sbusCmapRec));
+ dixSetPrivate(&pScreen->devPrivates, sbusPaletteKey, cmap);
+ cmap->psdp = psdp;
+ fbcmap.index = 0;
+ fbcmap.count = 16;
+ fbcmap.red = cmap->origRed;
+ fbcmap.green = cmap->origGreen;
+ fbcmap.blue = cmap->origBlue;
+ if (ioctl (psdp->fd, FBIOGETCMAP, &fbcmap) >= 0)
+ cmap->origCmapValid = TRUE;
+ fbcmap.index = 0;
+ fbcmap.count = 2;
+ fbcmap.red = data;
+ fbcmap.green = data;
+ fbcmap.blue = data;
+ if (pScreen->whitePixel == 0) {
+ data[0] = 255;
+ data[1] = 0;
+ } else {
+ data[0] = 0;
+ data[1] = 255;
+ }
+ ioctl (psdp->fd, FBIOPUTCMAP, &fbcmap);
+ cmap->CloseScreen = pScreen->CloseScreen;
+ pScreen->CloseScreen = xf86SbusCmapCloseScreen;
+ return xf86HandleColormaps(pScreen, 256, 8,
+ xf86SbusCmapLoadPalette, NULL, 0);
+}
+
+Bool
+xf86SbusConfigure(void *busData, sbusDevicePtr sBus)
+{
+ if (sBus && sBus->fbNum == ((sbusDevicePtr) busData)->fbNum)
+ return 0;
+ return 1;
+}
+
+void
+xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec *GDev)
+{
+ char *promPath = NULL;
+
+ sBus = (sbusDevicePtr) busData;
+ GDev->identifier = sBus->descr;
+ if (sparcPromInit() >= 0) {
+ promPath = sparcPromNode2Pathname(&sBus->node);
+ sparcPromClose();
+ }
+ if (promPath) {
+ XNFasprintf(&GDev->busID, "SBUS:%s", promPath);
+ free(promPath);
+ } else {
+ XNFasprintf(&GDev->busID, "SBUS:fb%d", sBus->fbNum);
+ }
+}
diff --git a/xorg-server/hw/xfree86/loader/Makefile.am b/xorg-server/hw/xfree86/loader/Makefile.am
index 0e5b304a4..9cb27a2bd 100644
--- a/xorg-server/hw/xfree86/loader/Makefile.am
+++ b/xorg-server/hw/xfree86/loader/Makefile.am
@@ -1,33 +1,33 @@
-noinst_LTLIBRARIES = libloader.la
-
-INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(top_srcdir)/miext/cw \
- -I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes \
- -I$(srcdir)/../ramdac
-
-#AM_LDFLAGS = -r
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-
-EXTRA_DIST = \
- loader.h \
- loaderProcs.h \
- sdksyms.sh
-
-nodist_libloader_la_SOURCES = \
- sdksyms.c
-
-libloader_la_SOURCES = \
- loader.c \
- loaderProcs.h \
- loadext.c \
- loadmod.c \
- os.c
-
-libloader_la_LIBADD = $(DLOPEN_LIBS)
-
-CLEANFILES = sdksyms.c sdksyms.dep
-
-sdksyms.dep sdksyms.c: sdksyms.sh $(top_builddir)/include/do-not-use-config.h
- CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES)
-
-SDKSYMS_DEP = sdksyms.dep
-include $(SDKSYMS_DEP)
+noinst_LTLIBRARIES = libloader.la
+
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(top_srcdir)/miext/cw \
+ -I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes \
+ -I$(srcdir)/../ramdac
+
+#AM_LDFLAGS = -r
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
+
+EXTRA_DIST = \
+ loader.h \
+ loaderProcs.h \
+ sdksyms.sh
+
+nodist_libloader_la_SOURCES = \
+ sdksyms.c
+
+libloader_la_SOURCES = \
+ loader.c \
+ loaderProcs.h \
+ loadext.c \
+ loadmod.c \
+ os.c
+
+libloader_la_LIBADD = $(DLOPEN_LIBS)
+
+CLEANFILES = sdksyms.c sdksyms.dep
+
+sdksyms.dep sdksyms.c: sdksyms.sh $(top_builddir)/include/do-not-use-config.h
+ CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES)
+
+SDKSYMS_DEP = sdksyms.dep
+include $(SDKSYMS_DEP)
diff --git a/xorg-server/hw/xfree86/loader/sdksyms.sh b/xorg-server/hw/xfree86/loader/sdksyms.sh
index 18bb73523..6f5082ae5 100644
--- a/xorg-server/hw/xfree86/loader/sdksyms.sh
+++ b/xorg-server/hw/xfree86/loader/sdksyms.sh
@@ -1,425 +1,425 @@
-#!/bin/sh
-
-cat > sdksyms.c << EOF
-/* This file is automatically generated by sdksyms.sh. */
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-
-/* These must be included first */
-#include "misc.h"
-#include "miscstruct.h"
-
-
-/* render/Makefile.am */
-#include "picture.h"
-#include "mipict.h"
-#include "glyphstr.h"
-#include "picturestr.h"
-
-
-/* fb/Makefile.am -- module */
-/*
-#include "fb.h"
-#include "fbrop.h"
-#include "fboverlay.h"
-#include "wfbrename.h"
-#include "fbpict.h"
- */
-
-
-/* miext/shadow/Makefile.am -- module */
-/*
-#include "shadow.h"
- */
-
-
-/* miext/damage/Makefile.am */
-#include "damage.h"
-#include "damagestr.h"
-
-/* miext/sync/Makefile.am */
-#include "misync.h"
-#include "misyncstr.h"
-
-/* Xext/Makefile.am -- half is module, half is builtin */
-/*
-#include "xvdix.h"
-#include "xvmcext.h"
- */
-#include "geext.h"
-#include "geint.h"
-#include "shmint.h"
-#include "syncsdk.h"
-#if XINERAMA
-# include "panoramiXsrv.h"
-# include "panoramiX.h"
-#endif
-
-
-/* hw/xfree86/int10/Makefile.am -- module */
-/*
-#include "xf86int10.h"
- */
-
-
-/* hw/xfree86/i2c/Makefile.am -- "mostly" modules */
-#include "xf86i2c.h"
-/*
-#include "bt829.h"
-#include "fi1236.h"
-#include "msp3430.h"
-#include "tda8425.h"
-#include "tda9850.h"
-#include "tda9885.h"
-#include "uda1380.h"
-#include "i2c_def.h"
- */
-
-
-/* hw/xfree86/modes/Makefile.am */
-#include "xf86Crtc.h"
-#include "xf86Modes.h"
-#include "xf86RandR12.h"
-/* #include "xf86Rename.h" */
-
-
-/* hw/xfree86/ddc/Makefile.am */
-#include "edid.h"
-#include "xf86DDC.h"
-
-
-/* hw/xfree86/dri2/Makefile.am -- module */
-/*
-#if DRI2
-# include "dri2.h"
-#endif
- */
-
-
-/* hw/xfree86/vgahw/Makefile.am -- module */
-/*
-#include "vgaHW.h"
- */
-
-
-/* hw/xfree86/fbdevhw/Makefile.am -- module */
-/*
-#include "fbdevhw.h"
- */
-
-
-/* hw/xfree86/common/Makefile.am */
-#include "compiler.h"
-#include "fourcc.h"
-#include "xf86.h"
-#include "xf86Module.h"
-#include "xf86Opt.h"
-#include "xf86PciInfo.h"
-#include "xf86Priv.h"
-#include "xf86Privstr.h"
-#include "xf86cmap.h"
-#include "xf86fbman.h"
-#include "xf86str.h"
-#include "xf86Xinput.h"
-#include "xf86VGAarbiter.h"
-#include "xisb.h"
-#if XV
-# include "xf86xv.h"
-# include "xf86xvmc.h"
-# include "xf86xvpriv.h"
-#endif
-/* XF86VidMode code is in libextmod module */
-/*
-#if XF86VIDMODE
-# include "vidmodeproc.h"
-#endif
- */
-#include "xorgVersion.h"
-#if defined(__sparc__) || defined(__sparc)
-# include "xf86sbusBus.h"
-#endif
-
-
-/* hw/xfree86/ramdac/Makefile.am */
-#include "BT.h"
-#include "IBM.h"
-#include "TI.h"
-#include "xf86Cursor.h"
-#include "xf86RamDac.h"
-
-
-/* hw/xfree86/shadowfb/Makefile.am -- module */
-/*
-#include "shadowfb.h"
- */
-
-
-/* hw/xfree86/os-support/solaris/Makefile.am */
-#if defined(sun386)
-# include "agpgart.h"
-#endif
-
-
-/* hw/xfree86/os-support/Makefile.am */
-#include "xf86_OSproc.h"
-#include "xf86_OSlib.h"
-
-
-/* hw/xfree86/os-support/bus/Makefile.am */
-#include "xf86Pci.h"
-#if defined(__sparc__) || defined(__sparc)
-# include "xf86Sbus.h"
-#endif
-
-
-/* hw/xfree86/xaa/Makefile.am -- module */
-/*
-#include "xaa.h"
-#include "xaalocal.h"
-#include "xaarop.h"
- */
-
-
-/* hw/xfree86/dixmods/extmod/Makefile.am -- module */
-/*
-#include "dgaproc.h"
- */
-
-
-/* hw/xfree86/parser/Makefile.am */
-#include "xf86Parser.h"
-#include "xf86Optrec.h"
-
-
-/* hw/xfree86/vbe/Makefile.am -- module */
-/*
-#include "vbe.h"
-#include "vbeModes.h"
- */
-
-
-/* hw/xfree86/dri/Makefile.am -- module */
-/*
-#if XF86DRI
-# include "dri.h"
-# include "sarea.h"
-# include "dristruct.h"
-#endif
- */
-
-
-/* mi/Makefile.am */
-#include "micmap.h"
-#include "miline.h"
-#include "mipointer.h"
-#include "mi.h"
-#include "mibstore.h"
-#include "migc.h"
-#include "mipointrst.h"
-#include "mizerarc.h"
-#include "micoord.h"
-#include "mifillarc.h"
-#include "mispans.h"
-#include "miwideline.h"
-#include "mistruct.h"
-#include "mifpoly.h"
-#include "mioverlay.h"
-
-
-/* randr/Makefile.am */
-#include "randrstr.h"
-#include "rrtransform.h"
-
-
-/* dbe/Makefile.am -- module */
-/*
-#include "dbestruct.h"
- */
-
-
-/* exa/Makefile.am -- module */
-/*
-#include "exa.h"
- */
-
-
-/* xfixes/Makefile.am */
-#include "xfixes.h"
-
-
-/* include/Makefile.am */
-#include "XIstubs.h"
-#include "Xprintf.h"
-#include "closestr.h"
-#include "closure.h"
-#include "colormap.h"
-#include "colormapst.h"
-#include "hotplug.h"
-#include "client.h"
-#include "cursor.h"
-#include "cursorstr.h"
-#include "dix.h"
-#include "dixaccess.h"
-#include "dixevents.h"
-#include "dixfont.h"
-#include "dixfontstr.h"
-#include "dixgrabs.h"
-#include "dixstruct.h"
-#include "exevents.h"
-#include "extension.h"
-#include "extinit.h"
-#include "extnsionst.h"
-#include "gc.h"
-#include "gcstruct.h"
-#include "globals.h"
-#include "input.h"
-#include "inputstr.h"
-/* already included */
-/*
-#include "misc.h"
-#include "miscstruct.h"
- */
-#include "opaque.h"
-#include "os.h"
-#include "pixmap.h"
-#include "pixmapstr.h"
-#include "privates.h"
-#include "property.h"
-#include "propertyst.h"
-#include "ptrveloc.h"
-#include "region.h"
-#include "regionstr.h"
-#include "registry.h"
-#include "resource.h"
-#include "rgb.h"
-#include "screenint.h"
-#include "scrnintstr.h"
-#include "selection.h"
-#include "servermd.h"
-#include "site.h"
-#include "swaprep.h"
-#include "swapreq.h"
-#include "validate.h"
-#include "window.h"
-#include "windowstr.h"
-#include "xace.h"
-#include "xkbfile.h"
-#include "xkbsrv.h"
-#include "xkbstr.h"
-#include "xkbrules.h"
-#include "xserver-properties.h"
-
-EOF
-
-topdir=$1
-shift
-LC_ALL=C
-export LC_ALL
-${CPP:-cpp} "$@" -DXorgLoader sdksyms.c | ${AWK:-awk} -v topdir=$topdir '
-BEGIN {
- sdk = 0;
- print("/*");
- print(" * These symbols are referenced to ensure they");
- print(" * will be available in the X Server binary.");
- print(" */");
- printf("/* topdir=%s */\n", topdir);
- print("_X_HIDDEN void *xorg_symbols[] = {");
-
- printf("sdksyms.c:") > "sdksyms.dep";
-}
-/^# [0-9]+ "/ {
- # Process text after a include in a relative path or when the
- # processed file has a basename matching $top_srcdir.
- # Note that indexing starts at 1; 0 means no match, and there
- # is a starting ".
- sdk = $3 !~ /^"\// || index($3, topdir) == 2;
-
- if (sdk && $3 ~ /\.h"$/) {
- # remove quotes
- gsub(/"/, "", $3);
- line = $2;
- header = $3;
- if (! headers[$3]) {
- printf(" \\\n %s", $3) >> "sdksyms.dep";
- headers[$3] = 1;
- }
- }
- next;
-}
-
-/^extern[ ]/ {
- if (sdk) {
- n = 3;
-
- # skip attribute, if any
- while ($n ~ /^(__attribute__|__global)/ ||
- # skip modifiers, if any
- $n ~ /^\*?(unsigned|const|volatile|struct)$/ ||
- # skip pointer
- $n ~ /^[a-zA-Z0-9_]*\*$/)
- n++;
-
- # type specifier may not be set, as in
- # extern _X_EXPORT unsigned name(...)
- if ($n !~ /[^a-zA-Z0-9_]/)
- n++;
-
- # go back if we are at the parameter list already
- if ($n ~ /^[(]([^*].*)?$/)
- n--;
-
- # match
- # extern _X_EXPORT type (* name[])(...)
- if ($n ~ /^[^a-zA-Z0-9_]+$/)
- n++;
-
- # match
- # extern _X_EXPORT const name *const ...
- if ($n ~ /^([^a-zA-Z0-9_]+)?const$/)
- n++;
-
- # actual name may be in the next line, as in
- # extern _X_EXPORT type
- # possibly ending with a *
- # name(...)
- if ($n == "" || $n ~ /^\*+$/) {
- getline;
- n = 1;
- }
-
- # dont modify $0 or $n
- symbol = $n;
-
- # remove starting non word chars
- sub(/^[^a-zA-Z0-9_]+/, "",symbol);
-
- # remove from first non word to end of line
- sub(/[^a-zA-Z0-9_].*/, "", symbol);
-
- #print;
- printf(" (void *) &%-50s /* %s:%s */\n", symbol ",", header, line);
- }
-}
-
-{
- line++;
-}
-
-END {
- print("};");
-
- print("") >> "sdksyms.dep";
-}' > _sdksyms.c
-
-STATUS=$?
-
-cat _sdksyms.c >> sdksyms.c
-rm _sdksyms.c
-
-[ $? != 0 ] && exit $?
-
-exit $STATUS
+#!/bin/sh
+
+cat > sdksyms.c << EOF
+/* This file is automatically generated by sdksyms.sh. */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+
+/* These must be included first */
+#include "misc.h"
+#include "miscstruct.h"
+
+
+/* render/Makefile.am */
+#include "picture.h"
+#include "mipict.h"
+#include "glyphstr.h"
+#include "picturestr.h"
+
+
+/* fb/Makefile.am -- module */
+/*
+#include "fb.h"
+#include "fbrop.h"
+#include "fboverlay.h"
+#include "wfbrename.h"
+#include "fbpict.h"
+ */
+
+
+/* miext/shadow/Makefile.am -- module */
+/*
+#include "shadow.h"
+ */
+
+
+/* miext/damage/Makefile.am */
+#include "damage.h"
+#include "damagestr.h"
+
+/* miext/sync/Makefile.am */
+#include "misync.h"
+#include "misyncstr.h"
+
+/* Xext/Makefile.am -- half is module, half is builtin */
+/*
+#include "xvdix.h"
+#include "xvmcext.h"
+ */
+#include "geext.h"
+#include "geint.h"
+#include "shmint.h"
+#include "syncsdk.h"
+#if XINERAMA
+# include "panoramiXsrv.h"
+# include "panoramiX.h"
+#endif
+
+
+/* hw/xfree86/int10/Makefile.am -- module */
+/*
+#include "xf86int10.h"
+ */
+
+
+/* hw/xfree86/i2c/Makefile.am -- "mostly" modules */
+#include "xf86i2c.h"
+/*
+#include "bt829.h"
+#include "fi1236.h"
+#include "msp3430.h"
+#include "tda8425.h"
+#include "tda9850.h"
+#include "tda9885.h"
+#include "uda1380.h"
+#include "i2c_def.h"
+ */
+
+
+/* hw/xfree86/modes/Makefile.am */
+#include "xf86Crtc.h"
+#include "xf86Modes.h"
+#include "xf86RandR12.h"
+/* #include "xf86Rename.h" */
+
+
+/* hw/xfree86/ddc/Makefile.am */
+#include "edid.h"
+#include "xf86DDC.h"
+
+
+/* hw/xfree86/dri2/Makefile.am -- module */
+/*
+#if DRI2
+# include "dri2.h"
+#endif
+ */
+
+
+/* hw/xfree86/vgahw/Makefile.am -- module */
+/*
+#include "vgaHW.h"
+ */
+
+
+/* hw/xfree86/fbdevhw/Makefile.am -- module */
+/*
+#include "fbdevhw.h"
+ */
+
+
+/* hw/xfree86/common/Makefile.am */
+#include "compiler.h"
+#include "fourcc.h"
+#include "xf86.h"
+#include "xf86Module.h"
+#include "xf86Opt.h"
+#include "xf86PciInfo.h"
+#include "xf86Priv.h"
+#include "xf86Privstr.h"
+#include "xf86cmap.h"
+#include "xf86fbman.h"
+#include "xf86str.h"
+#include "xf86Xinput.h"
+#include "xf86VGAarbiter.h"
+#include "xisb.h"
+#if XV
+# include "xf86xv.h"
+# include "xf86xvmc.h"
+# include "xf86xvpriv.h"
+#endif
+/* XF86VidMode code is in libextmod module */
+/*
+#if XF86VIDMODE
+# include "vidmodeproc.h"
+#endif
+ */
+#include "xorgVersion.h"
+#if defined(__sparc__) || defined(__sparc)
+# include "xf86sbusBus.h"
+#endif
+
+
+/* hw/xfree86/ramdac/Makefile.am */
+#include "BT.h"
+#include "IBM.h"
+#include "TI.h"
+#include "xf86Cursor.h"
+#include "xf86RamDac.h"
+
+
+/* hw/xfree86/shadowfb/Makefile.am -- module */
+/*
+#include "shadowfb.h"
+ */
+
+
+/* hw/xfree86/os-support/solaris/Makefile.am */
+#if defined(sun386)
+# include "agpgart.h"
+#endif
+
+
+/* hw/xfree86/os-support/Makefile.am */
+#include "xf86_OSproc.h"
+#include "xf86_OSlib.h"
+
+
+/* hw/xfree86/os-support/bus/Makefile.am */
+#include "xf86Pci.h"
+#if defined(__sparc__) || defined(__sparc)
+# include "xf86Sbus.h"
+#endif
+
+
+/* hw/xfree86/xaa/Makefile.am -- module */
+/*
+#include "xaa.h"
+#include "xaalocal.h"
+#include "xaarop.h"
+ */
+
+
+/* hw/xfree86/dixmods/extmod/Makefile.am -- module */
+/*
+#include "dgaproc.h"
+ */
+
+
+/* hw/xfree86/parser/Makefile.am */
+#include "xf86Parser.h"
+#include "xf86Optrec.h"
+
+
+/* hw/xfree86/vbe/Makefile.am -- module */
+/*
+#include "vbe.h"
+#include "vbeModes.h"
+ */
+
+
+/* hw/xfree86/dri/Makefile.am -- module */
+/*
+#if XF86DRI
+# include "dri.h"
+# include "sarea.h"
+# include "dristruct.h"
+#endif
+ */
+
+
+/* mi/Makefile.am */
+#include "micmap.h"
+#include "miline.h"
+#include "mipointer.h"
+#include "mi.h"
+#include "mibstore.h"
+#include "migc.h"
+#include "mipointrst.h"
+#include "mizerarc.h"
+#include "micoord.h"
+#include "mifillarc.h"
+#include "mispans.h"
+#include "miwideline.h"
+#include "mistruct.h"
+#include "mifpoly.h"
+#include "mioverlay.h"
+
+
+/* randr/Makefile.am */
+#include "randrstr.h"
+#include "rrtransform.h"
+
+
+/* dbe/Makefile.am -- module */
+/*
+#include "dbestruct.h"
+ */
+
+
+/* exa/Makefile.am -- module */
+/*
+#include "exa.h"
+ */
+
+
+/* xfixes/Makefile.am */
+#include "xfixes.h"
+
+
+/* include/Makefile.am */
+#include "XIstubs.h"
+#include "Xprintf.h"
+#include "closestr.h"
+#include "closure.h"
+#include "colormap.h"
+#include "colormapst.h"
+#include "hotplug.h"
+#include "client.h"
+#include "cursor.h"
+#include "cursorstr.h"
+#include "dix.h"
+#include "dixaccess.h"
+#include "dixevents.h"
+#include "dixfont.h"
+#include "dixfontstr.h"
+#include "dixgrabs.h"
+#include "dixstruct.h"
+#include "exevents.h"
+#include "extension.h"
+#include "extinit.h"
+#include "extnsionst.h"
+#include "gc.h"
+#include "gcstruct.h"
+#include "globals.h"
+#include "input.h"
+#include "inputstr.h"
+/* already included */
+/*
+#include "misc.h"
+#include "miscstruct.h"
+ */
+#include "opaque.h"
+#include "os.h"
+#include "pixmap.h"
+#include "pixmapstr.h"
+#include "privates.h"
+#include "property.h"
+#include "propertyst.h"
+#include "ptrveloc.h"
+#include "region.h"
+#include "regionstr.h"
+#include "registry.h"
+#include "resource.h"
+#include "rgb.h"
+#include "screenint.h"
+#include "scrnintstr.h"
+#include "selection.h"
+#include "servermd.h"
+#include "site.h"
+#include "swaprep.h"
+#include "swapreq.h"
+#include "validate.h"
+#include "window.h"
+#include "windowstr.h"
+#include "xace.h"
+#include "xkbfile.h"
+#include "xkbsrv.h"
+#include "xkbstr.h"
+#include "xkbrules.h"
+#include "xserver-properties.h"
+
+EOF
+
+topdir=$1
+shift
+LC_ALL=C
+export LC_ALL
+${CPP:-cpp} "$@" -DXorgLoader sdksyms.c | ${AWK:-awk} -v topdir=$topdir '
+BEGIN {
+ sdk = 0;
+ print("/*");
+ print(" * These symbols are referenced to ensure they");
+ print(" * will be available in the X Server binary.");
+ print(" */");
+ printf("/* topdir=%s */\n", topdir);
+ print("_X_HIDDEN void *xorg_symbols[] = {");
+
+ printf("sdksyms.c:") > "sdksyms.dep";
+}
+/^# [0-9]+ "/ {
+ # Process text after a include in a relative path or when the
+ # processed file has a basename matching $top_srcdir.
+ # Note that indexing starts at 1; 0 means no match, and there
+ # is a starting ".
+ sdk = $3 !~ /^"\// || index($3, topdir) == 2;
+
+ if (sdk && $3 ~ /\.h"$/) {
+ # remove quotes
+ gsub(/"/, "", $3);
+ line = $2;
+ header = $3;
+ if (! headers[$3]) {
+ printf(" \\\n %s", $3) >> "sdksyms.dep";
+ headers[$3] = 1;
+ }
+ }
+ next;
+}
+
+/^extern[ ]/ {
+ if (sdk) {
+ n = 3;
+
+ # skip attribute, if any
+ while ($n ~ /^(__attribute__|__global)/ ||
+ # skip modifiers, if any
+ $n ~ /^\*?(unsigned|const|volatile|struct)$/ ||
+ # skip pointer
+ $n ~ /^[a-zA-Z0-9_]*\*$/)
+ n++;
+
+ # type specifier may not be set, as in
+ # extern _X_EXPORT unsigned name(...)
+ if ($n !~ /[^a-zA-Z0-9_]/)
+ n++;
+
+ # go back if we are at the parameter list already
+ if ($n ~ /^[(]([^*].*)?$/)
+ n--;
+
+ # match
+ # extern _X_EXPORT type (* name[])(...)
+ if ($n ~ /^[^a-zA-Z0-9_]+$/)
+ n++;
+
+ # match
+ # extern _X_EXPORT const name *const ...
+ if ($n ~ /^([^a-zA-Z0-9_]+)?const$/)
+ n++;
+
+ # actual name may be in the next line, as in
+ # extern _X_EXPORT type
+ # possibly ending with a *
+ # name(...)
+ if ($n == "" || $n ~ /^\*+$/) {
+ getline;
+ n = 1;
+ }
+
+ # dont modify $0 or $n
+ symbol = $n;
+
+ # remove starting non word chars
+ sub(/^[^a-zA-Z0-9_]+/, "",symbol);
+
+ # remove from first non word to end of line
+ sub(/[^a-zA-Z0-9_].*/, "", symbol);
+
+ #print;
+ printf(" (void *) &%-50s /* %s:%s */\n", symbol ",", header, line);
+ }
+}
+
+{
+ line++;
+}
+
+END {
+ print("};");
+
+ print("") >> "sdksyms.dep";
+}' > _sdksyms.c
+
+STATUS=$?
+
+cat _sdksyms.c >> sdksyms.c
+rm _sdksyms.c
+
+[ $? != 0 ] && exit $?
+
+exit $STATUS
diff --git a/xorg-server/hw/xfree86/man/xorg.conf.man b/xorg-server/hw/xfree86/man/xorg.conf.man
index 4bec31695..ce0c177bc 100644
--- a/xorg-server/hw/xfree86/man/xorg.conf.man
+++ b/xorg-server/hw/xfree86/man/xorg.conf.man
@@ -1,2485 +1,2485 @@
-.\" shorthand for double quote that works everywhere.
-.ds q \N'34'
-.TH __xconfigfile__ __filemansuffix__ __vendorversion__
-.SH NAME
-__xconfigfile__ and __xconfigdir__ \- configuration files for
-__xservername__ X server
-.SH INTRODUCTION
-.B __xservername__
-supports several mechanisms for supplying/obtaining configuration and
-run-time parameters: command line options, environment variables, the
-__xconfigfile__ and __xconfigdir__ configuration files, auto-detection,
-and fallback defaults. When the same information is supplied in more
-than one way, the highest precedence mechanism is used. The list of
-mechanisms is ordered from highest precedence to lowest. Note that not
-all parameters can be supplied via all methods. The available command
-line options and environment variables (and some defaults) are
-described in the Xserver(__appmansuffix__) and
-__xservername__(__appmansuffix__) manual pages. Most configuration file
-parameters, with their defaults, are described below. Driver and module
-specific configuration parameters are described in the relevant driver
-or module manual page.
-.SH DESCRIPTION
-.B __xservername__
-uses a configuration file called
-.I __xconfigfile__
-and files ending in the suffix
-.I .conf
-from the directory
-.I __xconfigdir__
-for its initial setup.
-The
-.I __xconfigfile__
-configuration file is searched for in the following places when the
-server is started as a normal user:
-.PP
-.RS 4
-.nf
-.IR /etc/X11/ <cmdline>
-.IR __projectroot__/etc/X11/ <cmdline>
-.IB /etc/X11/ $XORGCONFIG
-.IB __projectroot__/etc/X11/ $XORGCONFIG
-.I /etc/X11/__xconfigfile__
-.I /etc/__xconfigfile__
-.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
-.I __projectroot__/etc/X11/__xconfigfile__
-.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
-.I __projectroot__/lib/X11/__xconfigfile__
-.fi
-.RE
-.PP
-where
-.I <cmdline>
-is a relative path (with no \(lq..\(rq components) specified with the
-.B \-config
-command line option,
-.B $XORGCONFIG
-is the relative path (with no \(lq..\(rq components) specified by that
-environment variable, and
-.I <hostname>
-is the machine's hostname as reported by
-.BR gethostname (__libmansuffix__).
-.PP
-When the __xservername__ server is started by the \(lqroot\(rq user, the config file
-search locations are as follows:
-.PP
-.RS 4
-.nf
-<cmdline>
-.IR /etc/X11/ <cmdline>
-.IR __projectroot__/etc/X11/ <cmdline>
-.B $XORGCONFIG
-.IB /etc/X11/ $XORGCONFIG
-.IB __projectroot__/etc/X11/ $XORGCONFIG
-.I /etc/X11/__xconfigfile__
-.I /etc/__xconfigfile__
-.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
-.I __projectroot__/etc/X11/__xconfigfile__
-.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
-.I __projectroot__/lib/X11/__xconfigfile__
-.fi
-.RE
-.PP
-where
-.I <cmdline>
-is the path specified with the
-.B \-config
-command line option (which may be absolute or relative),
-.B $XORGCONFIG
-is the path specified by that
-environment variable (absolute or relative),
-.B $HOME
-is the path specified by that environment variable (usually the home
-directory), and
-.I <hostname>
-is the machine's hostname as reported by
-.BR gethostname (__libmansuffix__).
-.PP
-Additional configuration files are searched for in the following
-directories when the server is started as a normal user:
-.PP
-.RS 4
-.nf
-.IR /etc/X11/ <cmdline>
-.IR __sysconfdir__/X11/ <cmdline>
-.I /etc/X11/__xconfigdir__
-.I __sysconfdir__/X11/__xconfigdir__
-.fi
-.RE
-.PP
-where
-.I <cmdline>
-is a relative path (with no \(lq..\(rq components) specified with the
-.B \-configdir
-command line option.
-.PP
-When the __xservername__ server is started by the \(lqroot\(rq user, the
-config directory search locations are as follows:
-.PP
-.RS 4
-.nf
-<cmdline>
-.IR /etc/X11/ <cmdline>
-.IR __sysconfdir__/X11/ <cmdline>
-.I /etc/X11/__xconfigdir__
-.I __sysconfdir__/X11/__xconfigdir__
-.fi
-.RE
-.PP
-where
-.I <cmdline>
-is the path specified with the
-.B \-configdir
-command line option (which may be absolute or relative).
-.PP
-Finally, configuration files will also be searched for in directories
-reserved for system use. These are to separate configuration files from
-the vendor or 3rd party packages from those of local administration.
-These files are found in the following directories:
-.PP
-.RS 4
-.nf
-.I /usr/share/X11/__xconfigdir__
-.I __datadir__/X11/__xconfigdir__
-.fi
-.RE
-.PP
-The
-.I __xconfigfile__
-and
-.I __xconfigdir__
-files are composed of a number of sections which may be present in any order,
-or omitted to use default configuration values.
-Each section has the form:
-.PP
-.RS 4
-.nf
-.BI "Section \*q" SectionName \*q
-.RI " " SectionEntry
- ...
-.B EndSection
-.fi
-.RE
-.PP
-The section names are:
-.PP
-.RS 4
-.nf
-.BR "Files " "File pathnames"
-.BR "ServerFlags " "Server flags"
-.BR "Module " "Dynamic module loading"
-.BR "Extensions " "Extension enabling"
-.BR "InputDevice " "Input device description"
-.BR "InputClass " "Input class description"
-.BR "Device " "Graphics device description"
-.BR "VideoAdaptor " "Xv video adaptor description"
-.BR "Monitor " "Monitor description"
-.BR "Modes " "Video modes descriptions"
-.BR "Screen " "Screen configuration"
-.BR "ServerLayout " "Overall layout"
-.BR "DRI " "DRI\-specific configuration"
-.BR "Vendor " "Vendor\-specific configuration"
-.fi
-.RE
-.PP
-The following obsolete section names are still recognised for compatibility
-purposes.
-In new config files, the
-.B InputDevice
-section should be used instead.
-.PP
-.RS 4
-.nf
-.BR "Keyboard " "Keyboard configuration"
-.BR "Pointer " "Pointer/mouse configuration"
-.fi
-.RE
-.PP
-The old
-.B XInput
-section is no longer recognised.
-.PP
-The
-.B ServerLayout
-sections are at the highest level.
-They bind together the input and output devices that will be used in a session.
-The input devices are described in the
-.B InputDevice
-sections.
-Output devices usually consist of multiple independent components (e.g.,
-a graphics board and a monitor).
-These multiple components are bound together in the
-.B Screen
-sections, and it is these that are referenced by the
-.B ServerLayout
-section.
-Each
-.B Screen
-section binds together a graphics board and a monitor.
-The graphics boards are described in the
-.B Device
-sections, and the monitors are described in the
-.B Monitor
-sections.
-.PP
-Config file keywords are case\-insensitive, and \(lq_\(rq characters are
-ignored.
-Most strings (including
-.B Option
-names) are also case-insensitive, and insensitive to white space and
-\(lq_\(rq characters.
-.PP
-Each config file entry usually takes up a single line in the file. They
-consist of a keyword, which is possibly followed by one or more arguments,
-with the number and types of the arguments depending on the keyword.
-The argument types are:
-.PP
-.RS 4
-.nf
-.BR "Integer " "an integer number in decimal, hex or octal"
-.BR "Real " "a floating point number"
-.BR "String " "a string enclosed in double quote marks (\*q)"
-.fi
-.RE
-.PP
-Note: hex integer values must be prefixed with \(lq0x\(rq, and octal values
-with \(lq0\(rq.
-.PP
-A special keyword called
-.B Option
-may be used to provide free\-form data to various components of the server.
-The
-.B Option
-keyword takes either one or two string arguments.
-The first is the option name, and the optional second argument is the
-option value.
-Some commonly used option value types include:
-.PP
-.RS 4
-.nf
-.BR "Integer " "an integer number in decimal, hex or octal"
-.BR "Real " "a floating point number"
-.BR "String " "a sequence of characters"
-.BR "Boolean " "a boolean value (see below)"
-.BR "Frequency " "a frequency value (see below)"
-.fi
-.RE
-.PP
-Note that
-.I all
-.B Option
-values, not just strings, must be enclosed in quotes.
-.PP
-Boolean options may optionally have a value specified.
-When no value is specified, the option's value is
-.BR TRUE .
-The following boolean option values are recognised as
-.BR TRUE :
-.PP
-.RS 4
-.BR 1 ,
-.BR on ,
-.BR true ,
-.B yes
-.RE
-.PP
-and the following boolean option values are recognised as
-.BR FALSE :
-.PP
-.RS 4
-.BR 0 ,
-.BR off ,
-.BR false ,
-.B no
-.RE
-.PP
-If an option name is prefixed with
-.RB \*q No \*q,
-then the option value is negated.
-.PP
-Example: the following option entries are equivalent:
-.PP
-.RS 4
-.nf
-.B "Option \*qAccel\*q \*qOff\*q"
-.B "Option \*qNoAccel\*q"
-.B "Option \*qNoAccel\*q \*qOn\*q"
-.B "Option \*qAccel\*q \*qfalse\*q"
-.B "Option \*qAccel\*q \*qno\*q"
-.fi
-.RE
-.PP
-Frequency option values consist of a real number that is optionally
-followed by one of the following frequency units:
-.PP
-.RS 4
-.BR Hz ,
-.BR k ,
-.BR kHz ,
-.BR M ,
-.B MHz
-.RE
-.PP
-When the unit name is omitted, the correct units will be determined from
-the value and the expectations of the appropriate range of the value.
-It is recommended that the units always be specified when using frequency
-option values to avoid any errors in determining the value.
-.SH "FILES SECTION"
-The
-.B Files
-section is used to specify some path names required by the server.
-Some of these paths can also be set from the command line (see
-.BR Xserver (__appmansuffix__)
-and
-.BR __xservername__ (__appmansuffix__)).
-The command line settings override the values specified in the config
-file.
-The
-.B Files
-section is optional, as are all of the entries that may appear in it.
-.PP
-The entries that can appear in this section are:
-.TP 7
-.BI "FontPath \*q" path \*q
-sets the search path for fonts.
-This path is a comma separated list of font path elements which the __xservername__
-server searches for font databases.
-Multiple
-.B FontPath
-entries may be specified, and they will be concatenated to build up the
-fontpath used by the server. Font path elements can be absolute
-directory paths, catalogue directories or a font server identifier. The
-formats of the later two are explained below:
-.PP
-.RS 7
-Catalogue directories:
-.PP
-.RS 4
-Catalogue directories can be specified using the prefix \fBcatalogue:\fR
-before the directory name. The directory can then be populated with
-symlinks pointing to the real font directories, using the following
-syntax in the symlink name:
-.PP
-.RS 4
-.IR <identifier> : [attribute]: pri= <priority>
-.RE
-.PP
-where
-.I <identifier>
-is an alphanumeric identifier,
-.I [attribute]
-is an attribute which will be passed to the underlying FPE and
-.I <priority>
-is a number used to order the fontfile FPEs. Examples:
-.PP
-.RS 4
-.nf
-.I 75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi
-.I gscript:pri=60 -> /usr/share/fonts/default/ghostscript
-.I misc:unscaled:pri=10 \-> /usr/share/X11/fonts/misc
-.fi
-.PP
-.RE .RE .RE
-.PP
-.RS 7
-Font server identifiers:
-.PP
-.RS 4
-Font server identifiers have the form:
-.RS 4
-.PP
-.IR <trans> / <hostname> : <port\-number>
-.RE
-.PP
-where
-.I <trans>
-is the transport type to use to connect to the font server (e.g.,
-.B unix
-for UNIX\-domain sockets or
-.B tcp
-for a TCP/IP connection),
-.I <hostname>
-is the hostname of the machine running the font server, and
-.I <port\-number>
-is the port number that the font server is listening on (usually 7100).
-.RE
-.PP
-When this entry is not specified in the config file, the server falls back
-to the compiled\-in default font path, which contains the following
-font path elements (which can be set inside a catalogue directory):
-.PP
-.RS 4
-.nf
-.I __datadir__/fonts/X11/misc/
-.I __datadir__/fonts/X11/TTF/
-.I __datadir__/fonts/X11/OTF/
-.I __datadir__/fonts/X11/Type1/
-.I __datadir__/fonts/X11/100dpi/
-.I __datadir__/fonts/X11/75dpi/
-.fi
-.RE
-.PP
-Font path elements that are found to be invalid are removed from the
-font path when the server starts up.
-.RE
-.TP 7
-.BI "ModulePath \*q" path \*q
-sets the search path for loadable __xservername__ server modules.
-This path is a comma separated list of directories which the __xservername__ server
-searches for loadable modules loading in the order specified.
-Multiple
-.B ModulePath
-entries may be specified, and they will be concatenated to build the
-module search path used by the server. The default module path is
-.PP
-.RS 11
-__modulepath__
-.RE
-.\" The LogFile keyword is not currently implemented
-.ig
-.TP 7
-.BI "LogFile \*q" path \*q
-sets the name of the __xservername__ server log file.
-The default log file name is
-.PP
-.RS 11
-.RI __logdir__/__xservername__. <n> .log
-.RE
-.PP
-.RS 7
-where
-.I <n>
-is the display number for the __xservername__ server.
-..
-.TP 7
-.BI "XkbDir \*q" path \*q
-sets the base directory for keyboard layout files. The
-.B \-xkbdir
-command line option can be used to override this. The default directory is
-.PP
-.RS 11
-__xkbdir__
-.RE
-.SH "SERVERFLAGS SECTION"
-In addition to options specific to this section (described below), the
-.B ServerFlags
-section is used to specify some global
-__xservername__ server options.
-All of the entries in this section are
-.BR Options ,
-although for compatibility purposes some of the old style entries are
-still recognised.
-Those old style entries are not documented here, and using them is
-discouraged.
-The
-.B ServerFlags
-section is optional, as are the entries that may be specified in it.
-.PP
-.B Options
-specified in this section (with the exception of the
-.B \*qDefaultServerLayout\*q
-.BR Option )
-may be overridden by
-.B Options
-specified in the active
-.B ServerLayout
-section.
-Options with command line equivalents are overridden when their command
-line equivalent is used.
-The options recognised by this section are:
-.TP 7
-.BI "Option \*qDefaultServerLayout\*q \*q" layout\-id \*q
-This specifies the default
-.B ServerLayout
-section to use in the absence of the
-.B \-layout
-command line option.
-.TP 7
-.BI "Option \*qNoTrapSignals\*q \*q" boolean \*q
-This prevents the __xservername__ server from trapping a range of unexpected fatal
-signals and exiting cleanly.
-Instead, the __xservername__ server will die and drop core where the fault occurred.
-The default behaviour is for the __xservername__ server to exit cleanly, but still drop a
-core file.
-In general you never want to use this option unless you are debugging an __xservername__
-server problem and know how to deal with the consequences.
-.TP 7
-.BI "Option \*qUseSIGIO\*q \*q" boolean \*q
-This controls whether the __xservername__ server requests that events from
-input devices be reported via a SIGIO signal handler (also known as SIGPOLL
-on some platforms), or only reported via the standard select(3) loop.
-The default behaviour is platform specific. In general you do not want to
-use this option unless you are debugging the __xservername__ server, or
-working around a specific bug until it is fixed, and understand the
-consequences.
-.TP 7
-.BI "Option \*qDontVTSwitch\*q \*q" boolean \*q
-This disallows the use of the
-.BI Ctrl+Alt+F n
-sequence (where
-.RI F n
-refers to one of the numbered function keys).
-That sequence is normally used to switch to another \*qvirtual terminal\*q
-on operating systems that have this feature.
-When this option is enabled, that key sequence has no special meaning and
-is passed to clients.
-Default: off.
-.TP 7
-.BI "Option \*qDontZap\*q \*q" boolean \*q
-This disallows the use of the
-.B Terminate_Server
-XKB action (usually on Ctrl+Alt+Backspace, depending on XKB options).
-This action is normally used to terminate the __xservername__ server.
-When this option is enabled, the action has no effect.
-Default: off.
-.TP 7
-.BI "Option \*qDontZoom\*q \*q" boolean \*q
-This disallows the use of the
-.B Ctrl+Alt+Keypad\-Plus
-and
-.B Ctrl+Alt+Keypad\-Minus
-sequences.
-These sequences allows you to switch between video modes.
-When this option is enabled, those key sequences have no special meaning
-and are passed to clients.
-Default: off.
-.TP 7
-.BI "Option \*qDisableVidModeExtension\*q \*q" boolean \*q
-This disables the parts of the VidMode extension used by the xvidtune client
-that can be used to change the video modes.
-Default: the VidMode extension is enabled.
-.TP 7
-.BI "Option \*qAllowNonLocalXvidtune\*q \*q" boolean \*q
-This allows the xvidtune client (and other clients that use the VidMode
-extension) to connect from another host.
-Default: off.
-.TP 7
-.BI "Option \*qAllowMouseOpenFail\*q \*q" boolean \*q
-This tells the mousedrv(__drivermansuffix__) and vmmouse(__drivermansuffix__)
-drivers to not report failure if the mouse device can't be opened/initialised.
-It has no effect on the evdev(__drivermansuffix__) or other drivers.
-Default: false.
-.TP 7
-.BI "Option \*qVTSysReq\*q \*q" boolean \*q
-enables the SYSV\-style VT switch sequence for non\-SYSV systems
-which support VT switching.
-This sequence is
-.B Alt\-SysRq
-followed by a function key
-.RB ( Fn ).
-This prevents the __xservername__ server trapping the
-keys used for the default VT switch sequence, which means that clients can
-access them.
-Default: off.
-.TP 7
-.BI "Option \*qBlankTime\*q \*q" time \*q
-sets the inactivity timeout for the
-.B blank
-phase of the screensaver.
-.I time
-is in minutes.
-This is equivalent to the __xservername__ server's
-.B \-s
-flag, and the value can be changed at run\-time with
-.BR xset(__appmansuffix__).
-Default: 10 minutes.
-.TP 7
-.BI "Option \*qStandbyTime\*q \*q" time \*q
-sets the inactivity timeout for the
-.B standby
-phase of DPMS mode.
-.I time
-is in minutes, and the value can be changed at run\-time with
-.BR xset(__appmansuffix__).
-Default: 10 minutes.
-This is only suitable for VESA DPMS compatible monitors, and may not be
-supported by all video drivers.
-It is only enabled for screens that have the
-.B \*qDPMS\*q
-option set (see the MONITOR section below).
-.TP 7
-.BI "Option \*qSuspendTime\*q \*q" time \*q
-sets the inactivity timeout for the
-.B suspend
-phase of DPMS mode.
-.I time
-is in minutes, and the value can be changed at run\-time with
-.BR xset(__appmansuffix__).
-Default: 10 minutes.
-This is only suitable for VESA DPMS compatible monitors, and may not be
-supported by all video drivers.
-It is only enabled for screens that have the
-.B \*qDPMS\*q
-option set (see the MONITOR section below).
-.TP 7
-.BI "Option \*qOffTime\*q \*q" time \*q
-sets the inactivity timeout for the
-.B off
-phase of DPMS mode.
-.I time
-is in minutes, and the value can be changed at run\-time with
-.BR xset(__appmansuffix__).
-Default: 10 minutes.
-This is only suitable for VESA DPMS compatible monitors, and may not be
-supported by all video drivers.
-It is only enabled for screens that have the
-.B \*qDPMS\*q
-option set (see the MONITOR section below).
-.TP 7
-.BI "Option \*qPixmap\*q \*q" bpp \*q
-This sets the pixmap format to use for depth 24.
-Allowed values for
-.I bpp
-are 24 and 32.
-Default: 32 unless driver constraints don't allow this (which is rare).
-Note: some clients don't behave well when this value is set to 24.
-.TP 7
-.BI "Option \*qPC98\*q \*q" boolean \*q
-Specify that the machine is a Japanese PC\-98 machine.
-This should not be enabled for anything other than the Japanese\-specific
-PC\-98 architecture.
-Default: auto\-detected.
-.TP 7
-.BI "Option \*qNoPM\*q \*q" boolean \*q
-Disables something to do with power management events.
-Default: PM enabled on platforms that support it.
-.TP 7
-.BI "Option \*qXinerama\*q \*q" boolean \*q
-enable or disable XINERAMA extension.
-Default is disabled.
-.TP 7
-.BI "Option \*qAIGLX\*q \*q" boolean \*q
-enable or disable AIGLX. AIGLX is enabled by default.
-.TP 7
-.BI "Option \*qDRI2\*q \*q" boolean \*q
-enable or disable DRI2. DRI2 is disabled by default.
-.TP 7
-.BI "Option \*qGlxVisuals\*q \*q" string \*q
-This option controls how many GLX visuals the GLX modules sets up.
-The default value is
-.BR "typical" ,
-which will setup up a typical subset of
-the GLXFBConfigs provided by the driver as GLX visuals. Other options are
-.BR "minimal" ,
-which will set up the minimal set allowed by the GLX specification and
-.BR "all"
-which will setup GLX visuals for all GLXFBConfigs.
-.TP 7
-.BI "Option \*qUseDefaultFontPath\*q \*q" boolean \*q
-Include the default font path even if other paths are specified in
-xorg.conf. If enabled, other font paths are included as well. Enabled by
-default.
-.TP 7
-.BI "Option \*qIgnoreABI\*q \*q" boolean \*q
-Allow modules built for a different, potentially incompatible version of
-the X server to load. Disabled by default.
-.TP 7
-.BI "Option \*qAutoAddDevices\*q \*q" boolean \*q
-If this option is disabled, then no devices will be added from HAL events.
-Enabled by default.
-.TP 7
-.BI "Option \*qAutoEnableDevices\*q \*q" boolean \*q
-If this option is disabled, then the devices will be added (and the
-DevicePresenceNotify event sent), but not enabled, thus leaving policy up
-to the client.
-Enabled by default.
-.TP 7
-.BI "Option \*qLog\*q \*q" string \*q
-This option controls whether the log is flushed and/or synced to disk after
-each message.
-Possible values are
-.B flush
-or
-.BR sync .
-Unset by default.
-.SH "MODULE SECTION"
-The
-.B Module
-section is used to specify which __xservername__ server modules should be loaded.
-This section is ignored when the __xservername__ server is built in static form.
-The type of modules normally loaded in this section are __xservername__ server
-extension modules.
-Most other module types are loaded automatically when they are needed via
-other mechanisms.
-The
-.B Module
-section is optional, as are all of the entries that may be specified in
-it.
-.PP
-Entries in this section may be in two forms.
-The first and most commonly used form is an entry that uses the
-.B Load
-keyword, as described here:
-.TP 7
-.BI "Load \*q" modulename \*q
-This instructs the server to load the module called
-.IR modulename .
-The module name given should be the module's standard name, not the
-module file name.
-The standard name is case\-sensitive, and does not include the \(lqlib\(rq
-prefix, or the \(lq.a\(rq, \(lq.o\(rq, or \(lq.so\(rq suffixes.
-.PP
-.RS 7
-Example: the DRI extension module can be loaded with the following entry:
-.PP
-.RS 4
-.B "Load \*qdri\*q"
-.RE
-.RE
-.TP 7
-.BI "Disable \*q" modulename \*q
-This instructs the server to not load the module called
-.IR modulename .
-Some modules are loaded by default in the server, and this overrides that
-default. If a
-.B Load
-instruction is given for the same module, it overrides the
-.B Disable
-instruction and the module is loaded. The module name given should be the
-module's standard name, not the module file name. As with the
-.B Load
-instruction, the standard name is case-sensitive, and does not include the
-"lib" prefix, or the ".a", ".o", or ".so" suffixes.
-.PP
-The second form of entry is a
-.BR SubSection,
-with the subsection name being the module name, and the contents of the
-.B SubSection
-being
-.B Options
-that are passed to the module when it is loaded.
-.PP
-Example: the extmod module (which contains a miscellaneous group of
-server extensions) can be loaded, with the XFree86\-DGA extension
-disabled by using the following entry:
-.PP
-.RS 4
-.nf
-.B "SubSection \*qextmod\*q"
-.B " Option \*qomit XFree86\-DGA\*q"
-.B EndSubSection
-.fi
-.RE
-.PP
-Modules are searched for in each directory specified in the
-.B ModulePath
-search path, and in the drivers, extensions, input, internal, and
-multimedia subdirectories of each of those directories.
-In addition to this, operating system specific subdirectories of all
-the above are searched first if they exist.
-.PP
-To see what extension modules are available, check the extensions
-subdirectory under:
-.PP
-.RS 4
-.nf
-__modulepath__
-.fi
-.RE
-.PP
-The \(lqextmod\(rq, \(lqdbe\(rq, \(lqdri\(rq, \(lqdri2\(rq, \(lqglx\(rq,
-and \(lqrecord\(rq extension modules are loaded automatically, if they
-are present, unless disabled with \*qDisable\*q entries.
-It is recommended
-that at very least the \(lqextmod\(rq extension module be loaded.
-If it isn't, some commonly used server extensions (like the SHAPE
-extension) will not be available.
-.SH "EXTENSIONS SECTION"
-The
-.B Extensions
-section is used to specify which X11 protocol extensions should be enabled
-or disabled.
-The
-.B Extensions
-section is optional, as are all of the entries that may be specified in
-it.
-.PP
-Entries in this section are listed as Option statements with the name of
-the extension as the first argument, and a boolean value as the second.
-The extension name is case\-sensitive, and matches the form shown in the output
-of \*qXorg -extension ?\*q.
-.PP
-.RS 7
-Example: the MIT-SHM extension can be disabled with the following entry:
-.PP
-.RS 4
-.nf
-.B "Section \*qExtensions\*q"
-.B " Option \*qMIT-SHM\*q \*qDisable\*q"
-.B "EndSection"
-.fi
-.RE
-.RE
-.SH "INPUTDEVICE SECTION"
-The config file may have multiple
-.B InputDevice
-sections.
-Recent X servers employ HAL or udev backends for input device enumeration
-and input hotplugging. It is usually not
-necessary to provide
-.B InputDevice
-sections in the xorg.conf if hotplugging is in use. If hotplugging is
-enabled,
-.B InputDevice
-sections using the
-.B mouse, kbd
-and
-.B vmmouse
-driver will be ignored.
-.PP
-If hotplugging is disabled, there will normally
-be at least two: one for the core (primary) keyboard
-and one for the core pointer.
-If either of these two is missing, a default configuration for the missing
-ones will be used. In the absence of an explicitly specified core input
-device, the first
-.B InputDevice
-marked as
-.B CorePointer
-(or
-.BR CoreKeyboard )
-is used.
-If there is no match there, the first
-.B InputDevice
-that uses the \(lqmouse\(rq (or \(lqkbd\(rq) driver is used.
-The final fallback is to use built\-in default configurations.
-Currently the default configuration may not work as expected on all platforms.
-.PP
-.B InputDevice
-sections have the following format:
-.PP
-.RS 4
-.nf
-.B "Section \*qInputDevice\*q"
-.BI " Identifier \*q" name \*q
-.BI " Driver \*q" inputdriver \*q
-.I " options"
-.I " ..."
-.B "EndSection"
-.fi
-.RE
-.PP
-The
-.B Identifier
-and
-.B Driver
-entries are required in all
-.B InputDevice
-sections.
-All other entries are optional.
-.PP
-The
-.B Identifier
-entry specifies the unique name for this input device.
-The
-.B Driver
-entry specifies the name of the driver to use for this input device.
-When using the loadable server, the input driver module
-.RI \*q inputdriver \*q
-will be loaded for each active
-.B InputDevice
-section.
-An
-.B InputDevice
-section is considered active if it is referenced by an active
-.B ServerLayout
-section, if it is referenced by the
-.B \-keyboard
-or
-.B \-pointer
-command line options, or if it is selected implicitly as the core pointer
-or keyboard device in the absence of such explicit references.
-The most commonly used input drivers are
-.BR evdev (__drivermansuffix__)
-on Linux systems, and
-.BR kbd (__drivermansuffix__)
-and
-.BR mousedrv (__drivermansuffix__)
-on other platforms.
-.PP
-.PP
-.B InputDevice
-sections recognise some driver\-independent
-.BR Options ,
-which are described here.
-See the individual input driver manual pages for a description of the
-device\-specific options.
-.TP 7
-.BI "Option \*qAutoServerLayout\*q \*q" boolean \*q
-Always add the device to the ServerLayout section used by this instance of
-the server. This affects implied layouts as well as explicit layouts
-specified in the configuration and/or on the command line.
-.TP 7
-.BI "Option \*qCorePointer\*q"
-Deprecated, see
-.B Floating
-.TP 7
-.BI "Option \*qCoreKeyboard\*q"
-Deprecated, see
-.B Floating
-.TP 7
-.BI "Option \*qAlwaysCore\*q \*q" boolean \*q
-Deprecated, see
-.B Floating
-.TP 7
-.BI "Option \*qSendCoreEvents\*q \*q" boolean \*q
-Deprecated, see
-.B Floating
-
-.TP 7
-.BI "Option \*qFloating\*q \*q" boolean \*q
-When enabled, the input device is set up floating and does not
-report events through any master device or control a cursor. The device is
-only available to clients using the X Input Extension API. This option is
-disabled by default.
-The options
-.B CorePointer,
-.B CoreKeyboard,
-.B AlwaysCore,
-and
-.B SendCoreEvents,
-are the inverse of option
-.B Floating
-(i.e.
-.B SendCoreEvents \*qon\*q
-is equivalent to
-.B Floating \*qoff\*q
-).
-
-This option controls the startup behavior only, a device
-may be reattached or set floating at runtime.
-.PP
-For pointing devices, the following options control how the pointer
-is accelerated or decelerated with respect to physical device motion. Most of
-these can be adjusted at runtime, see the xinput(1) man page for details. Only
-the most important acceleration options are discussed here.
-.TP 7
-.BI "Option \*qAccelerationProfile\*q \*q" integer \*q
-Select the profile. In layman's terms, the profile constitutes the "feeling" of
-the acceleration. More formally, it defines how the transfer function (actual
-acceleration as a function of current device velocity and acceleration controls)
-is constructed. This is mainly a matter of personal preference.
-.PP
-.RS 6
-.nf
-.B " 0 classic (mostly compatible)"
-.B "-1 none (only constant deceleration is applied)"
-.B " 1 device-dependent"
-.B " 2 polynomial (polynomial function)"
-.B " 3 smooth linear (soft knee, then linear)"
-.B " 4 simple (normal when slow, otherwise accelerated)"
-.B " 5 power (power function)"
-.B " 6 linear (more speed, more acceleration)"
-.B " 7 limited (like linear, but maxes out at threshold)"
-.fi
-.RE
-.TP 7
-.BI "Option \*qConstantDeceleration\*q \*q" real \*q
-Makes the pointer go
-.B deceleration
-times slower than normal. Most useful for high-resolution devices.
-.TP 7
-.BI "Option \*qAdaptiveDeceleration\*q \*q" real \*q
-Allows to actually decelerate the pointer when going slow. At most, it will be
-.B adaptive deceleration
-times slower. Enables precise pointer placement without sacrificing speed.
-.TP 7
-.BI "Option \*qAccelerationScheme\*q \*q" string \*q
-Selects the scheme, which is the underlying algorithm.
-.PP
-.RS 7
-.nf
-.B "predictable default algorithm (behaving more predictable)"
-.B "lightweight old acceleration code (as specified in the X protocol spec)"
-.B "none no acceleration or deceleration"
-.fi
-.RE
-.TP 7
-.BI "Option \*qAccelerationNumerator\*q \*q" integer \*q
-.TP 7
-.BI "Option \*qAccelerationDenominator\*q \*q" integer \*q
-Set numerator and denominator of the acceleration factor. The acceleration
-factor is a rational which, together with threshold, can be used to tweak
-profiles to suit the users needs. The
-.B simple
-and
-.B limited
-profiles use it directly (i.e. they accelerate by the factor), for other
-profiles it should hold that a higher acceleration factor leads to a faster
-pointer. Typically, 1 is unaccelerated and values up to 5 are sensible.
-.TP 7
-.BI "Option \*qAccelerationThreshold\*q \*q" integer \*q
-Set the threshold, which is roughly the velocity (usually device units per 10
-ms) required for acceleration to become effective. The precise effect varies
-with the profile however.
-
-.SH "INPUTCLASS SECTION"
-The config file may have multiple
-.B InputClass
-sections.
-These sections are optional and are used to provide configuration for a
-class of input devices as they are automatically added. An input device can
-match more than one
-.B InputClass
-section. Each class can override settings from a previous class, so it is
-best to arrange the sections with the most generic matches first.
-.PP
-.B InputClass
-sections have the following format:
-.PP
-.RS 4
-.nf
-.B "Section \*qInputClass\*q"
-.BI " Identifier \*q" name \*q
-.I " entries"
-.I " ..."
-.I " options"
-.I " ..."
-.B "EndSection"
-.fi
-.RE
-.PP
-The
-.B Identifier
-entry is required in all
-.B InputClass
-sections.
-All other entries are optional.
-.PP
-The
-.B Identifier
-entry specifies the unique name for this input class.
-The
-.B Driver
-entry specifies the name of the driver to use for this input device.
-After all classes have been examined, the
-.RI \*q inputdriver \*q
-module from the first
-.B Driver
-entry will be enabled when using the loadable server.
-.PP
-When an input device is automatically added, its characteristics are
-checked against all
-.B InputClass
-sections. Each section can contain optional entries to narrow the match
-of the class. If none of the optional entries appear, the
-.B InputClass
-section is generic and will match any input device. If more than one of
-these entries appear, they all must match for the configuration to apply.
-.PP
-There are two types of match entries used in
-.B InputClass
-sections. The first allows various tokens to be matched against attributes
-of the device. An entry can be constructed to match attributes from different
-devices by separating arguments with a '|' character. Multiple entries of the
-same type may be supplied to add multiple matching conditions on the same
-attribute. For example:
-.PP
-.RS 4
-.nf
-.B "Section \*qInputClass\*q"
-.B " Identifier \*qMy Class\*q"
-.B " # product string must contain example and
-.B " # either gizmo or gadget
-.B " MatchProduct \*qexample\*q
-.B " MatchProduct \*qgizmo|gadget\*q
-.I " ..."
-.B "EndSection"
-.fi
-.RE
-.TP 7
-.BI "MatchProduct \*q" matchproduct \*q
-This entry can be used to check if the substring
-.RI \*q matchproduct \*q
-occurs in the device's product name.
-.TP 7
-.BI "MatchVendor \*q" matchvendor \*q
-This entry can be used to check if the substring
-.RI \*q matchvendor \*q
-occurs in the device's vendor name.
-.TP 7
-.BI "MatchDevicePath \*q" matchdevice \*q
-This entry can be used to check if the device file matches the
-.RI \*q matchdevice \*q
-pathname pattern.
-.TP 7
-.BI "MatchOS \*q" matchos \*q
-This entry can be used to check if the operating system matches the
-case-insensitive
-.RI \*q matchos \*q
-string. This entry is only supported on platforms providing the
-.BR uname (2)
-system call.
-.TP 7
-.BI "MatchPnPID \*q" matchpnp \*q
-The device's Plug and Play (PnP) ID can be checked against the
-.RI \*q matchpnp \*q
-shell wildcard pattern.
-.TP 7
-.BI "MatchUSBID \*q" matchusb \*q
-The device's USB ID can be checked against the
-.RI \*q matchusb \*q
-shell wildcard pattern. The ID is constructed as lowercase hexadecimal numbers
-separated by a ':'. This is the same format as the
-.BR lsusb (8)
-program.
-.TP 7
-.BI "MatchDriver \*q" matchdriver \*q
-Check the case-sensitive string
-.RI \*q matchdriver \*q
-against the currently configured driver of the device. Ordering of sections
-using this entry is important since it will not match unless the driver has
-been set by the config backend or a previous
-.B InputClass
-section.
-.TP 7
-.BI "MatchTag \*q" matchtag \*q
-This entry can be used to check if tags assigned by the config backend
-matches the
-.RI \*q matchtag \*q
-pattern. A match is found if at least one of the tags given in
-.RI \*q matchtag \*q
-matches at least one of the tags assigned by the backend.
-.PP
-The second type of entry is used to match device types. These entries take a
-boolean argument similar to
-.B Option
-entries.
-.TP 7
-.BI "MatchIsKeyboard \*q" bool \*q
-.TP 7
-.BI "MatchIsPointer \*q" bool \*q
-.TP 7
-.BI "MatchIsJoystick \*q" bool \*q
-.TP 7
-.BI "MatchIsTablet \*q" bool \*q
-.TP 7
-.BI "MatchIsTouchpad \*q" bool \*q
-.TP 7
-.BI "MatchIsTouchscreen \*q" bool \*q
-.PP
-When an input device has been matched to the
-.B InputClass
-section, any
-.B Option
-entries are applied to the device. One
-.B InputClass
-specific
-.B Option
-is recognized. See the
-.B InputDevice
-section above for a description of the remaining
-.B Option
-entries.
-.TP 7
-.BI "Option \*qIgnore\*q \*q" boolean \*q
-This optional entry specifies that the device should be ignored entirely,
-and not added to the server. This can be useful when the device is handled
-by another program and no X events should be generated.
-.SH "DEVICE SECTION"
-The config file may have multiple
-.B Device
-sections.
-There must be at least one, for the video card being used.
-.PP
-.B Device
-sections have the following format:
-.PP
-.RS 4
-.nf
-.B "Section \*qDevice\*q"
-.BI " Identifier \*q" name \*q
-.BI " Driver \*q" driver \*q
-.I " entries"
-.I " ..."
-.B "EndSection"
-.fi
-.RE
-.PP
-The
-.B Identifier
-and
-.B Driver
-entries are required in all
-.B Device
-sections. All other entries are optional.
-.PP
-The
-.B Identifier
-entry specifies the unique name for this graphics device.
-The
-.B Driver
-entry specifies the name of the driver to use for this graphics device.
-When using the loadable server, the driver module
-.RI \*q driver \*q
-will be loaded for each active
-.B Device
-section.
-A
-.B Device
-section is considered active if it is referenced by an active
-.B Screen
-section.
-.PP
-.B Device
-sections recognise some driver\-independent entries and
-.BR Options ,
-which are described here.
-Not all drivers make use of these
-driver\-independent entries, and many of those that do don't require them
-to be specified because the information is auto\-detected.
-See the individual graphics driver manual pages for further information
-about this, and for a description of the device\-specific options.
-Note that most of the
-.B Options
-listed here (but not the other entries) may be specified in the
-.B Screen
-section instead of here in the
-.B Device
-section.
-.TP 7
-.BI "BusID \*q" bus\-id \*q
-This specifies the bus location of the graphics card.
-For PCI/AGP cards,
-the
-.I bus\-id
-string has the form
-.BI PCI: bus : device : function
-(e.g., \(lqPCI:1:0:0\(rq might be appropriate for an AGP card).
-This field is usually optional in single-head configurations when using
-the primary graphics card.
-In multi-head configurations, or when using a secondary graphics card in a
-single-head configuration, this entry is mandatory.
-Its main purpose is to make an unambiguous connection between the device
-section and the hardware it is representing.
-This information can usually be found by running the pciaccess tool
-scanpci.
-.TP 7
-.BI "Screen " number
-This option is mandatory for cards where a single PCI entity can drive more
-than one display (i.e., multiple CRTCs sharing a single graphics accelerator
-and video memory).
-One
-.B Device
-section is required for each head, and this
-parameter determines which head each of the
-.B Device
-sections applies to.
-The legal values of
-.I number
-range from 0 to one less than the total number of heads per entity.
-Most drivers require that the primary screen (0) be present.
-.TP 7
-.BI "Chipset \*q" chipset \*q
-This usually optional entry specifies the chipset used on the graphics
-board.
-In most cases this entry is not required because the drivers will probe the
-hardware to determine the chipset type.
-Don't specify it unless the driver-specific documentation recommends that you
-do.
-.TP 7
-.BI "Ramdac \*q" ramdac\-type \*q
-This optional entry specifies the type of RAMDAC used on the graphics
-board.
-This is only used by a few of the drivers, and in most cases it is not
-required because the drivers will probe the hardware to determine the
-RAMDAC type where possible.
-Don't specify it unless the driver-specific documentation recommends that you
-do.
-.TP 7
-.BI "DacSpeed " speed
-.TP 7
-.BI "DacSpeed " "speed\-8 speed\-16 speed\-24 speed\-32"
-This optional entry specifies the RAMDAC speed rating (which is usually
-printed on the RAMDAC chip).
-The speed is in MHz.
-When one value is given, it applies to all framebuffer pixel sizes.
-When multiple values are given, they apply to the framebuffer pixel sizes
-8, 16, 24 and 32 respectively.
-This is not used by many drivers, and only needs to be specified when the
-speed rating of the RAMDAC is different from the defaults built in to
-driver, or when the driver can't auto-detect the correct defaults.
-Don't specify it unless the driver-specific documentation recommends that you
-do.
-.TP 7
-.BI "Clocks " "clock ..."
-specifies the pixel that are on your graphics board.
-The clocks are in MHz, and may be specified as a floating point number.
-The value is stored internally to the nearest kHz.
-The ordering of the clocks is important.
-It must match the order in which they are selected on the graphics board.
-Multiple
-.B Clocks
-lines may be specified, and each is concatenated to form the list.
-Most drivers do not use this entry, and it is only required for some older
-boards with non-programmable clocks.
-Don't specify this entry unless the driver-specific documentation explicitly
-recommends that you do.
-.TP
-.BI "ClockChip \*q" clockchip\-type \*q
-This optional entry is used to specify the clock chip type on graphics
-boards which have a programmable clock generator.
-Only a few __xservername__ drivers support programmable clock chips.
-For details, see the appropriate driver manual page.
-.TP 7
-.BI "VideoRam " "mem"
-This optional entry specifies the amount of video ram that is installed
-on the graphics board.
-This is measured in kBytes.
-In most cases this is not required because the __xservername__ server probes
-the graphics board to determine this quantity.
-The driver-specific documentation should indicate when it might be needed.
-.TP 7
-.BI "BiosBase " "baseaddress"
-This optional entry specifies the base address of the video BIOS for
-the VGA board.
-This address is normally auto-detected, and should only be specified if the
-driver-specific documentation recommends it.
-.TP 7
-.BI "MemBase " "baseaddress"
-This optional entry specifies the memory base address of a graphics
-board's linear frame buffer.
-This entry is not used by many drivers, and it should only be specified if
-the driver-specific documentation recommends it.
-.TP 7
-.BI "IOBase " "baseaddress"
-This optional entry specifies the IO base address.
-This entry is not used by many drivers, and it should only be specified if
-the driver-specific documentation recommends it.
-.TP 7
-.BI "ChipID " "id"
-This optional entry specifies a numerical ID representing the chip type.
-For PCI cards, it is usually the device ID.
-This can be used to override the auto-detection, but that should only be done
-when the driver-specific documentation recommends it.
-.TP 7
-.BI "ChipRev " "rev"
-This optional entry specifies the chip revision number.
-This can be used to override the auto-detection, but that should only be done
-when the driver-specific documentation recommends it.
-.TP 7
-.BI "TextClockFreq " "freq"
-This optional entry specifies the pixel clock frequency that is used
-for the regular text mode.
-The frequency is specified in MHz.
-This is rarely used.
-.TP 7
-.BI "Option \*qModeDebug\*q \*q" boolean \*q
-Enable printing of additional debugging information about modesetting to
-the server log.
-.ig
-.TP 7
-This optional entry allows an IRQ number to be specified.
-..
-.TP 7
-.B Options
-Option flags may be specified in the
-.B Device
-sections.
-These include driver\-specific options and driver\-independent options.
-The former are described in the driver\-specific documentation.
-Some of the latter are described below in the section about the
-.B Screen
-section, and they may also be included here.
-
-.SH "VIDEOADAPTOR SECTION"
-Nobody wants to say how this works.
-Maybe nobody knows ...
-
-.SH "MONITOR SECTION"
-The config file may have multiple
-.B Monitor
-sections.
-There should normally be at least one, for the monitor being used,
-but a default configuration will be created when one isn't specified.
-.PP
-.B Monitor
-sections have the following format:
-.PP
-.RS 4
-.nf
-.B "Section \*qMonitor\*q"
-.BI " Identifier \*q" name \*q
-.I " entries"
-.I " ..."
-.B "EndSection"
-.fi
-.RE
-.PP
-The only mandatory entry in a
-.B Monitor
-section is the
-.B Identifier
-entry.
-.PP
-The
-.B Identifier
-entry specifies the unique name for this monitor.
-The
-.B Monitor
-section may be used to provide information about the specifications of the
-monitor, monitor-specific
-.BR Options ,
-and information about the video modes to use with the monitor.
-.PP
-With RandR 1.2-enabled drivers, monitor sections may be tied to specific
-outputs of the video card. Using the name of the output defined by the video
-driver plus the identifier of a monitor section, one associates a monitor
-section with an output by adding an option to the Device section in the
-following format:
-
-.B Option \*qMonitor-outputname\*q \*qmonitorsection\*q
-
-(for example,
-.B Option \*qMonitor-VGA\*q \*qVGA monitor\*q
-for a VGA output)
-.PP
-In the absence of specific association of monitor sections to outputs, if a
-monitor section is present the server will associate it with an output to
-preserve compatibility for previous single-head configurations.
-.PP
-Specifying video modes is optional because the server will use the DDC or other
-information provided by the monitor to automatically configure the list of
-modes available.
-When modes are specified explicitly in the
-.B Monitor
-section (with the
-.BR Modes ,
-.BR ModeLine ,
-or
-.B UseModes
-keywords), built-in modes with the same names are not included.
-Built-in modes with different names are, however, still implicitly included,
-when they meet the requirements of the monitor.
-.PP
-The entries that may be used in
-.B Monitor
-sections are described below.
-.TP 7
-.BI "VendorName \*q" vendor \*q
-This optional entry specifies the monitor's manufacturer.
-.TP 7
-.BI "ModelName \*q" model \*q
-This optional entry specifies the monitor's model.
-.TP 7
-.BI "HorizSync " "horizsync\-range"
-gives the range(s) of horizontal sync frequencies supported by the
-monitor.
-.I horizsync\-range
-may be a comma separated list of either discrete values or ranges of
-values.
-A range of values is two values separated by a dash.
-By default the values are in units of kHz.
-They may be specified in MHz or Hz
-if
-.B MHz
-or
-.B Hz
-is added to the end of the line.
-The data given here is used by the __xservername__ server to determine if video
-modes are within the specifications of the monitor.
-This information should be available in the monitor's handbook.
-If this entry is omitted, a default range of 28\-33kHz is used.
-.TP 7
-.BI "VertRefresh " "vertrefresh\-range"
-gives the range(s) of vertical refresh frequencies supported by the
-monitor.
-.I vertrefresh\-range
-may be a comma separated list of either discrete values or ranges of
-values.
-A range of values is two values separated by a dash.
-By default the values are in units of Hz.
-They may be specified in MHz or kHz
-if
-.B MHz
-or
-.B kHz
-is added to the end of the line.
-The data given here is used by the __xservername__ server to determine if video
-modes are within the specifications of the monitor.
-This information should be available in the monitor's handbook.
-If this entry is omitted, a default range of 43\-72Hz is used.
-.TP 7
-.BI "DisplaySize " "width height"
-This optional entry gives the width and height, in millimetres, of the
-picture area of the monitor.
-If given this is used to calculate the horizontal and vertical pitch (DPI) of
-the screen.
-.TP 7
-.BI "Gamma " "gamma\-value"
-.TP 7
-.BI "Gamma " "red\-gamma green\-gamma blue\-gamma"
-This is an optional entry that can be used to specify the gamma correction
-for the monitor.
-It may be specified as either a single value or as three separate RGB values.
-The values should be in the range 0.1 to 10.0, and the default is 1.0.
-Not all drivers are capable of using this information.
-.TP 7
-.BI "UseModes \*q" modesection\-id \*q
-Include the set of modes listed in the
-.B Modes
-section called
-.IR modesection\-id.
-This makes all of the modes defined in that section available for use by
-this monitor.
-.TP 7
-.BI "Mode \*q" name \*q
-This is an optional multi-line entry that can be used to provide
-definitions for video modes for the monitor.
-In most cases this isn't necessary because the built-in set of VESA standard
-modes will be sufficient.
-The
-.B Mode
-keyword indicates the start of a multi-line video mode description.
-The mode description is terminated with the
-.B EndMode
-keyword.
-The mode description consists of the following entries:
-.RS 7
-.TP 4
-.BI "DotClock " clock
-is the dot (pixel) clock rate to be used for the mode.
-.TP 4
-.BI "HTimings " "hdisp hsyncstart hsyncend htotal"
-specifies the horizontal timings for the mode.
-.TP 4
-.BI "VTimings " "vdisp vsyncstart vsyncend vtotal"
-specifies the vertical timings for the mode.
-.TP 4
-.BI "Flags \*q" flag \*q " ..."
-specifies an optional set of mode flags, each of which is a separate
-string in double quotes.
-.B \*qInterlace\*q
-indicates that the mode is interlaced.
-.B \*qDoubleScan\*q
-indicates a mode where each scanline is doubled.
-.B \*q+HSync\*q
-and
-.B \*q\-HSync\*q
-can be used to select the polarity of the HSync signal.
-.B \*q+VSync\*q
-and
-.B \*q\-VSync\*q
-can be used to select the polarity of the VSync signal.
-.B \*qComposite\*q
-can be used to specify composite sync on hardware where this is supported.
-Additionally, on some hardware,
-.B \*q+CSync\*q
-and
-.B \*q\-CSync\*q
-may be used to select the composite sync polarity.
-.TP 4
-.BI "HSkew " hskew
-specifies the number of pixels (towards the right edge of the screen) by
-which the display enable signal is to be skewed.
-Not all drivers use this information.
-This option might become necessary to override the default value supplied
-by the server (if any).
-\(lqRoving\(rq horizontal lines indicate this value needs to be increased.
-If the last few pixels on a scan line appear on the left of the screen,
-this value should be decreased.
-.TP 4
-.BI "VScan " vscan
-specifies the number of times each scanline is painted on the screen.
-Not all drivers use this information.
-Values less than 1 are treated as 1, which is the default.
-Generally, the
-.B \*qDoubleScan\*q
-.B Flag
-mentioned above doubles this value.
-.RE
-.TP 7
-.BI "ModeLine \*q" name \*q " mode\-description"
-This entry is a more compact version of the
-.B Mode
-entry, and it also can be used to specify video modes for the monitor.
-is a single line format for specifying video modes.
-In most cases this isn't necessary because the built\-in set of VESA
-standard modes will be sufficient.
-.PP
-.RS 7
-The
-.I mode\-description
-is in four sections, the first three of which are mandatory.
-The first is the dot (pixel) clock.
-This is a single number specifying the pixel clock rate for the mode in
-MHz.
-The second section is a list of four numbers specifying the horizontal
-timings.
-These numbers are the
-.IR hdisp ,
-.IR hsyncstart ,
-.IR hsyncend ,
-and
-.I htotal
-values.
-The third section is a list of four numbers specifying the vertical
-timings.
-These numbers are the
-.IR vdisp ,
-.IR vsyncstart ,
-.IR vsyncend ,
-and
-.I vtotal
-values.
-The final section is a list of flags specifying other characteristics of
-the mode.
-.B Interlace
-indicates that the mode is interlaced.
-.B DoubleScan
-indicates a mode where each scanline is doubled.
-.B +HSync
-and
-.B \-HSync
-can be used to select the polarity of the HSync signal.
-.B +VSync
-and
-.B \-VSync
-can be used to select the polarity of the VSync signal.
-.B Composite
-can be used to specify composite sync on hardware where this is supported.
-Additionally, on some hardware,
-.B +CSync
-and
-.B \-CSync
-may be used to select the composite sync polarity.
-The
-.B HSkew
-and
-.B VScan
-options mentioned above in the
-.B Modes
-entry description can also be used here.
-.RE
-.TP 7
-.BI "Option " "\*qDPMS\*q " \*qbool\*q
-This option controls whether the server should enable the DPMS extension
-for power management for this screen. The default is to enable the
-extension.
-.TP 7
-.BI "Option " "\*qSyncOnGreen\*q " \*qbool\*q
-This option controls whether the video card should drive the sync signal
-on the green color pin. Not all cards support this option, and most
-monitors do not require it. The default is off.
-.TP 7
-.BI "Option " "\*qPrimary\*q " \*qbool\*q
-This optional entry specifies that the monitor should be treated as the primary
-monitor. (RandR 1.2-supporting drivers only)
-.TP 7
-.BI "Option " "\*qPreferredMode\*q " \*qstring\*q
-This optional entry specifies a mode to be marked as the preferred initial mode
-of the monitor.
-(RandR 1.2-supporting drivers only)
-.TP 7
-.BI "Option " "\*qPosition\*q " "\*qx y\*q"
-This optional entry specifies the position of the monitor within the X
-screen.
-(RandR 1.2-supporting drivers only)
-.TP 7
-.BI "Option " "\*qLeftOf\*q " \*qoutput\*q
-This optional entry specifies that the monitor should be positioned to the
-left of the output (not monitor) of the given name.
-(RandR 1.2-supporting drivers only)
-.TP 7
-.BI "Option " "\*qRightOf\*q " \*qoutput\*q
-This optional entry specifies that the monitor should be positioned to the
-right of the output (not monitor) of the given name.
-(RandR 1.2-supporting drivers only)
-.TP 7
-.BI "Option " "\*qAbove\*q " \*qoutput\*q
-This optional entry specifies that the monitor should be positioned above the
-output (not monitor) of the given name.
-(RandR 1.2-supporting drivers only)
-.TP 7
-.BI "Option " "\*qBelow\*q " \*qoutput\*q
-This optional entry specifies that the monitor should be positioned below the
-output (not monitor) of the given name.
-(RandR 1.2-supporting drivers only)
-.TP 7
-.BI "Option " "\*qEnable\*q " \*qbool\*q
-This optional entry specifies whether the monitor should be turned on
-at startup. By default, the server will attempt to enable all connected
-monitors.
-(RandR 1.2-supporting drivers only)
-.TP 7
-.BI "Option " "\*qDefaultModes\*q " \*qbool\*q
-This optional entry specifies whether the server should add supported default
-modes to the list of modes offered on this monitor. By default, the server
-will add default modes; you should only disable this if you can guarantee
-that EDID will be available at all times, or if you have added custom modelines
-which the server can use.
-(RandR 1.2-supporting drivers only)
-.TP 7
-.BI "Option " "\*qMinClock\*q " \*qfrequency\*q
-This optional entry specifies the minimum dot clock, in kHz, that is supported
-by the monitor.
-.TP 7
-.BI "Option " "\*qMaxClock\*q " \*qfrequency\*q
-This optional entry specifies the maximum dot clock, in kHz, that is supported
-by the monitor.
-.TP 7
-.BI "Option " "\*qIgnore\*q " \*qbool\*q
-This optional entry specifies that the monitor should be ignored entirely,
-and not reported through RandR. This is useful if the hardware reports the
-presence of outputs that don't exist.
-(RandR 1.2-supporting drivers only)
-.TP 7
-.BI "Option " "\*qRotate\*q " \*qrotation\*q
-This optional entry specifies the initial rotation of the given monitor.
-Valid values for rotation are \*qnormal\*q, \*qleft\*q, \*qright\*q, and
-\*qinverted\*q.
-(RandR 1.2-supporting drivers only)
-
-.SH "MODES SECTION"
-The config file may have multiple
-.B Modes
-sections, or none.
-These sections provide a way of defining sets of video modes independently
-of the
-.B Monitor
-sections.
-.B Monitor
-sections may include the definitions provided in these sections by
-using the
-.B UseModes
-keyword.
-In most cases the
-.B Modes
-sections are not necessary because the built\-in set of VESA standard modes
-will be sufficient.
-.PP
-.B Modes
-sections have the following format:
-.PP
-.RS 4
-.nf
-.B "Section \*qModes\*q"
-.BI " Identifier \*q" name \*q
-.I " entries"
-.I " ..."
-.B "EndSection"
-.fi
-.RE
-.PP
-The
-.B Identifier
-entry specifies the unique name for this set of mode descriptions.
-The other entries permitted in
-.B Modes
-sections are the
-.B Mode
-and
-.B ModeLine
-entries that are described above in the
-.B Monitor
-section.
-.SH "SCREEN SECTION"
-The config file may have multiple
-.B Screen
-sections.
-There must be at least one, for the \(lqscreen\(rq being used.
-A \(lqscreen\(rq represents the binding of a graphics device
-.RB ( Device
-section) and a monitor
-.RB ( Monitor
-section).
-A
-.B Screen
-section is considered \(lqactive\(rq if it is referenced by an active
-.B ServerLayout
-section or by the
-.B \-screen
-command line option.
-If neither of those is present, the first
-.B Screen
-section found in the config file is considered the active one.
-.PP
-.B Screen
-sections have the following format:
-.PP
-.RS 4
-.nf
-.B "Section \*qScreen\*q"
-.BI " Identifier \*q" name \*q
-.BI " Device \*q" devid \*q
-.BI " Monitor \*q" monid \*q
-.I " entries"
-.I " ..."
-.BI " SubSection \*qDisplay\*q"
-.I " entries"
-.I " ...
-.B " EndSubSection"
-.I " ..."
-.B "EndSection"
-.fi
-.RE
-.PP
-The
-.B Identifier
-and
-.B Device
-entries are mandatory.
-All others are optional.
-.PP
-The
-.B Identifier
-entry specifies the unique name for this screen.
-The
-.B Screen
-section provides information specific to the whole screen, including
-screen\-specific
-.BR Options .
-In multi\-head configurations, there will be multiple active
-.B Screen
-sections, one for each head.
-The entries available
-for this section are:
-.TP 7
-.BI "Device \*q" device\-id \*q
-This mandatory entry specifies the
-.B Device
-section to be used for this screen.
-This is what ties a specific graphics card to a screen.
-The
-.I device\-id
-must match the
-.B Identifier
-of a
-.B Device
-section in the config file.
-.TP 7
-.BI "Monitor \*q" monitor\-id \*q
-specifies which monitor description is to be used for this screen.
-If a
-.B Monitor
-name is not specified, a default configuration is used.
-Currently the default configuration may not function as expected on all
-platforms.
-.TP 7
-.BI "VideoAdaptor \*q" xv\-id \*q
-specifies an optional Xv video adaptor description to be used with this
-screen.
-.TP 7
-.BI "DefaultDepth " depth
-specifies which color depth the server should use by default.
-The
-.B \-depth
-command line option can be used to override this.
-If neither is specified, the default depth is driver\-specific, but in most
-cases is 8.
-.TP 7
-.BI "DefaultFbBpp " bpp
-specifies which framebuffer layout to use by default.
-The
-.B \-fbbpp
-command line option can be used to override this.
-In most cases the driver will chose the best default value for this.
-The only case where there is even a choice in this value is for depth 24,
-where some hardware supports both a packed 24 bit framebuffer layout and a
-sparse 32 bit framebuffer layout.
-.TP 7
-.B Options
-Various
-.B Option
-flags may be specified in the
-.B Screen
-section.
-Some are driver\-specific and are described in the driver documentation.
-Others are driver\-independent, and will eventually be described here.
-.\" XXX These should really be in an xaa man page.
-.TP 7
-.BI "Option \*qAccel\*q"
-Enables XAA (X Acceleration Architecture), a mechanism that makes video cards'
-2D hardware acceleration available to the __xservername__ server.
-This option is on by default, but it may be necessary to turn it off if
-there are bugs in the driver.
-There are many options to disable specific accelerated operations, listed
-below.
-Note that disabling an operation will have no effect if the operation is
-not accelerated (whether due to lack of support in the hardware or in the
-driver).
-.TP 7
-.BI "Option \*qInitPrimary\*q \*q" boolean \*q
-Use the Int10 module to initialize the primary graphics card.
-Normally, only secondary cards are soft-booted using the Int10 module, as the
-primary card has already been initialized by the BIOS at boot time.
-Default: false.
-.TP 7
-.BI "Option \*qNoInt10\*q \*q" boolean \*q
-Disables the Int10 module, a module that uses the int10 call to the BIOS
-of the graphics card to initialize it.
-Default: false.
-.TP 7
-.BI "Option \*qNoMTRR\*q"
-Disables MTRR (Memory Type Range Register) support, a feature of modern
-processors which can improve video performance by a factor of up to 2.5.
-Some hardware has buggy MTRR support, and some video drivers have been
-known to exhibit problems when MTRR's are used.
-.TP 7
-.BI "Option \*qXaaNoCPUToScreenColorExpandFill\*q"
-Disables accelerated rectangular expansion blits from source patterns
-stored in system memory (using a memory\-mapped aperture).
-.TP 7
-.BI "Option \*qXaaNoColor8x8PatternFillRect\*q"
-Disables accelerated fills of a rectangular region with a full\-color
-pattern.
-.TP 7
-.BI "Option \*qXaaNoColor8x8PatternFillTrap\*q"
-Disables accelerated fills of a trapezoidal region with a full\-color
-pattern.
-.TP 7
-.BI "Option \*qXaaNoDashedBresenhamLine\*q"
-Disables accelerated dashed Bresenham line draws.
-.TP 7
-.BI "Option \*qXaaNoDashedTwoPointLine\*q"
-Disables accelerated dashed line draws between two arbitrary points.
-.TP 7
-.BI "Option \*qXaaNoImageWriteRect\*q"
-Disables accelerated transfers of full\-color rectangular patterns from
-system memory to video memory (using a memory\-mapped aperture).
-.TP 7
-.BI "Option \*qXaaNoMono8x8PatternFillRect\*q"
-Disables accelerated fills of a rectangular region with a monochrome
-pattern.
-.TP 7
-.BI "Option \*qXaaNoMono8x8PatternFillTrap\*q"
-Disables accelerated fills of a trapezoidal region with a monochrome
-pattern.
-.TP 7
-.BI "Option \*qXaaNoOffscreenPixmaps\*q"
-Disables accelerated draws into pixmaps stored in offscreen video memory.
-.TP 7
-.BI "Option \*qXaaNoPixmapCache\*q"
-Disables caching of patterns in offscreen video memory.
-.TP 7
-.BI "Option \*qXaaNoScanlineCPUToScreenColorExpandFill\*q"
-Disables accelerated rectangular expansion blits from source patterns
-stored in system memory (one scan line at a time).
-.TP 7
-.BI "Option \*qXaaNoScanlineImageWriteRect\*q"
-Disables accelerated transfers of full\-color rectangular patterns from
-system memory to video memory (one scan line at a time).
-.TP 7
-.BI "Option \*qXaaNoScreenToScreenColorExpandFill\*q"
-Disables accelerated rectangular expansion blits from source patterns
-stored in offscreen video memory.
-.TP 7
-.BI "Option \*qXaaNoScreenToScreenCopy\*q"
-Disables accelerated copies of rectangular regions from one part of
-video memory to another part of video memory.
-.TP 7
-.BI "Option \*qXaaNoSolidBresenhamLine\*q"
-Disables accelerated solid Bresenham line draws.
-.TP 7
-.BI "Option \*qXaaNoSolidFillRect\*q"
-Disables accelerated solid\-color fills of rectangles.
-.TP 7
-.BI "Option \*qXaaNoSolidFillTrap\*q"
-Disables accelerated solid\-color fills of Bresenham trapezoids.
-.TP 7
-.BI "Option \*qXaaNoSolidHorVertLine\*q"
-Disables accelerated solid horizontal and vertical line draws.
-.TP 7
-.BI "Option \*qXaaNoSolidTwoPointLine\*q"
-Disables accelerated solid line draws between two arbitrary points.
-.PP
-Each
-.B Screen
-section may optionally contain one or more
-.B Display
-subsections.
-Those subsections provide depth/fbbpp specific configuration information,
-and the one chosen depends on the depth and/or fbbpp that is being used for
-the screen.
-The
-.B Display
-subsection format is described in the section below.
-
-.SH "DISPLAY SUBSECTION"
-Each
-.B Screen
-section may have multiple
-.B Display
-subsections.
-The \(lqactive\(rq
-.B Display
-subsection is the first that matches the depth and/or fbbpp values being
-used, or failing that, the first that has neither a depth or fbbpp value
-specified.
-The
-.B Display
-subsections are optional.
-When there isn't one that matches the depth and/or fbbpp values being used,
-all the parameters that can be specified here fall back to their defaults.
-.PP
-.B Display
-subsections have the following format:
-.PP
-.RS 4
-.nf
-.B " SubSection \*qDisplay\*q"
-.BI " Depth " depth
-.I " entries"
-.I " ..."
-.B " EndSubSection"
-.fi
-.RE
-.TP 7
-.BI "Depth " depth
-This entry specifies what colour depth the
-.B Display
-subsection is to be used for.
-This entry is usually specified, but it may be omitted to create a match\-all
-.B Display
-subsection or when wishing to match only against the
-.B FbBpp
-parameter.
-The range of
-.I depth
-values that are allowed depends on the driver.
-Most drivers support 8, 15, 16 and 24.
-Some also support 1 and/or 4, and some may support other values (like 30).
-Note:
-.I depth
-means the number of bits in a pixel that are actually used to determine
-the pixel colour.
-32 is not a valid
-.I depth
-value.
-Most hardware that uses 32 bits per pixel only uses 24 of them to hold the
-colour information, which means that the colour depth is 24, not 32.
-.TP 7
-.BI "FbBpp " bpp
-This entry specifies the framebuffer format this
-.B Display
-subsection is to be used for.
-This entry is only needed when providing depth 24 configurations that allow
-a choice between a 24 bpp packed framebuffer format and a 32bpp sparse
-framebuffer format.
-In most cases this entry should not be used.
-.TP 7
-.BI "Weight " "red\-weight green\-weight blue\-weight"
-This optional entry specifies the relative RGB weighting to be used
-for a screen is being used at depth 16 for drivers that allow multiple
-formats.
-This may also be specified from the command line with the
-.B \-weight
-option (see
-.BR __xservername__(__appmansuffix__)).
-.TP 7
-.BI "Virtual " "xdim ydim"
-This optional entry specifies the virtual screen resolution to be used.
-.I xdim
-must be a multiple of either 8 or 16 for most drivers, and a multiple
-of 32 when running in monochrome mode.
-The given value will be rounded down if this is not the case.
-Video modes which are too large for the specified virtual size will be
-rejected.
-If this entry is not present, the virtual screen resolution will be set to
-accommodate all the valid video modes given in the
-.B Modes
-entry.
-Some drivers/hardware combinations do not support virtual screens.
-Refer to the appropriate driver\-specific documentation for details.
-.TP 7
-.BI "ViewPort " "x0 y0"
-This optional entry sets the upper left corner of the initial display.
-This is only relevant when the virtual screen resolution is different
-from the resolution of the initial video mode.
-If this entry is not given, then the initial display will be centered in
-the virtual display area.
-.TP 7
-.BI "Modes \*q" mode\-name \*q " ..."
-This optional entry specifies the list of video modes to use.
-Each
-.I mode\-name
-specified must be in double quotes.
-They must correspond to those specified or referenced in the appropriate
-.B Monitor
-section (including implicitly referenced built\-in VESA standard modes).
-The server will delete modes from this list which don't satisfy various
-requirements.
-The first valid mode in this list will be the default display mode for
-startup.
-The list of valid modes is converted internally into a circular list.
-It is possible to switch to the next mode with
-.B Ctrl+Alt+Keypad\-Plus
-and to the previous mode with
-.BR Ctrl+Alt+Keypad\-Minus .
-When this entry is omitted, the valid modes referenced by the appropriate
-.B Monitor
-section will be used. If the
-.B Monitor
-section contains no modes, then the selection will be taken from the
-built-in VESA standard modes.
-.TP 7
-.BI "Visual \*q" visual\-name \*q
-This optional entry sets the default root visual type.
-This may also be specified from the command line (see the
-.BR Xserver(__appmansuffix__)
-man page).
-The visual types available for depth 8 are (default is
-.BR PseudoColor ):
-.PP
-.RS 11
-.nf
-.B StaticGray
-.B GrayScale
-.B StaticColor
-.B PseudoColor
-.B TrueColor
-.B DirectColor
-.fi
-.RE
-.PP
-.RS 7
-The visual type available for the depths 15, 16 and 24 are (default is
-.BR TrueColor ):
-.PP
-.RS 4
-.nf
-.B TrueColor
-.B DirectColor
-.fi
-.RE
-.PP
-Not all drivers support
-.B DirectColor
-at these depths.
-.PP
-The visual types available for the depth 4 are (default is
-.BR StaticColor ):
-.PP
-.RS 4
-.nf
-.B StaticGray
-.B GrayScale
-.B StaticColor
-.B PseudoColor
-.fi
-.RE
-.PP
-The visual type available for the depth 1 (monochrome) is
-.BR StaticGray .
-.RE
-.TP 7
-.BI "Black " "red green blue"
-This optional entry allows the \(lqblack\(rq colour to be specified.
-This is only supported at depth 1.
-The default is black.
-.TP 7
-.BI "White " "red green blue"
-This optional entry allows the \(lqwhite\(rq colour to be specified.
-This is only supported at depth 1.
-The default is white.
-.TP 7
-.B Options
-Option flags may be specified in the
-.B Display
-subsections.
-These may include driver\-specific options and driver\-independent options.
-The former are described in the driver\-specific documentation.
-Some of the latter are described above in the section about the
-.B Screen
-section, and they may also be included here.
-.SH "SERVERLAYOUT SECTION"
-The config file may have multiple
-.B ServerLayout
-sections.
-A \(lqserver layout\(rq represents the binding of one or more screens
-.RB ( Screen
-sections) and one or more input devices
-.RB ( InputDevice
-sections) to form a complete configuration.
-In multi\-head configurations, it also specifies the relative layout of the
-heads.
-A
-.B ServerLayout
-section is considered \(lqactive\(rq if it is referenced by the
-.B \-layout
-command line option or by an
-.B "Option \*qDefaultServerLayout\*q"
-entry in the
-.B ServerFlags
-section (the former takes precedence over the latter).
-If those options are not used, the first
-.B ServerLayout
-section found in the config file is considered the active one.
-If no
-.B ServerLayout
-sections are present, the single active screen and two active (core)
-input devices are selected as described in the relevant sections above.
-.PP
-.B ServerLayout
-sections have the following format:
-.PP
-.RS 4
-.nf
-.B "Section \*qServerLayout\*q"
-.BI " Identifier \*q" name \*q
-.BI " Screen \*q" screen\-id \*q
-.I " ..."
-.BI " InputDevice \*q" idev\-id \*q
-.I " ..."
-.I " options"
-.I " ..."
-.B "EndSection"
-.fi
-.RE
-.PP
-Each
-.B ServerLayout
-section must have an
-.B Identifier
-entry and at least one
-.B Screen
-entry.
-.PP
-The
-.B Identifier
-entry specifies the unique name for this server layout.
-The
-.B ServerLayout
-section provides information specific to the whole session, including
-session\-specific
-.BR Options .
-The
-.B ServerFlags
-options (described above) may be specified here, and ones given here
-override those given in the
-.B ServerFlags
-section.
-.PP
-The entries that may be used in this section are described here.
-.TP 7
-.BI "Screen " "screen\-num" " \*qscreen\-id\*q " "position\-information"
-One of these entries must be given for each screen being used in
-a session.
-The
-.I screen\-id
-field is mandatory, and specifies the
-.B Screen
-section being referenced.
-The
-.I screen\-num
-field is optional, and may be used to specify the screen number
-in multi\-head configurations.
-When this field is omitted, the screens will be numbered in the order that
-they are listed in.
-The numbering starts from 0, and must be consecutive.
-The
-.I position\-information
-field describes the way multiple screens are positioned.
-There are a number of different ways that this information can be provided:
-.RS 7
-.TP 4
-.I "x y"
-.TP 4
-.BI "Absolute " "x y"
-These both specify that the upper left corner's coordinates are
-.RI ( x , y ).
-The
-.B Absolute
-keyword is optional.
-Some older versions of XFree86 (4.2 and earlier) don't recognise the
-.B Absolute
-keyword, so it's safest to just specify the coordinates without it.
-.TP 4
-.BI "RightOf \*q" screen\-id \*q
-.TP 4
-.BI "LeftOf \*q" screen\-id \*q
-.TP 4
-.BI "Above \*q" screen\-id \*q
-.TP 4
-.BI "Below \*q" screen\-id \*q
-.TP 4
-.BI "Relative \*q" screen\-id \*q " x y"
-These give the screen's location relative to another screen.
-The first four position the screen immediately to the right, left, above or
-below the other screen.
-When positioning to the right or left, the top edges are aligned.
-When positioning above or below, the left edges are aligned.
-The
-.B Relative
-form specifies the offset of the screen's origin (upper left corner)
-relative to the origin of another screen.
-.RE
-.TP 7
-.BI "InputDevice \*q" idev\-id "\*q \*q" option \*q " ..."
-One of these entries should be given for each input device being used in
-a session.
-Normally at least two are required, one each for the core pointer and
-keyboard devices.
-If either of those is missing, suitable
-.B InputDevice
-entries are searched for using the method described above in the
-.B INPUTDEVICE
-section. The
-.I idev\-id
-field is mandatory, and specifies the name of the
-.B InputDevice
-section being referenced.
-Multiple
-.I option
-fields may be specified, each in double quotes.
-The options permitted here are any that may also be given in the
-.B InputDevice
-sections.
-Normally only session\-specific input device options would be used here.
-The most commonly used options are:
-.PP
-.RS 11
-.nf
-.B \*qCorePointer\*q
-.B \*qCoreKeyboard\*q
-.B \*qSendCoreEvents\*q
-.fi
-.RE
-.PP
-.RS 7
-and the first two should normally be used to indicate the core pointer
-and core keyboard devices respectively.
-.RE
-.TP 7
-.B Options
-In addition to the following, any option permitted in the
-.B ServerFlags
-section may also be specified here.
-When the same option appears in both places, the value given here overrides
-the one given in the
-.B ServerFlags
-section.
-.TP 7
-.BI "Option \*qIsolateDevice\*q \*q" bus\-id \*q
-Restrict device resets to the specified
-.IR bus\-id .
-See the
-.B BusID
-option (described in
-.BR "DEVICE SECTION" ,
-above) for the format of the
-.I bus\-id
-parameter.
-This option overrides
-.BR SingleCard ,
-if specified.
-At present, only PCI devices can be isolated in this manner.
-.TP 7
-.BI "Option \*qSingleCard\*q \*q" boolean \*q
-As
-.BR IsolateDevice ,
-except that the bus ID of the first device in the layout is used.
-.PP
-Here is an example of a
-.B ServerLayout
-section for a dual headed configuration with two mice:
-.PP
-.RS 4
-.nf
-.B "Section \*qServerLayout\*q"
-.B " Identifier \*qLayout 1\*q"
-.B " Screen \*qMGA 1\*q"
-.B " Screen \*qMGA 2\*q RightOf \*qMGA 1\*q"
-.B " InputDevice \*qKeyboard 1\*q \*qCoreKeyboard\*q"
-.B " InputDevice \*qMouse 1\*q \*qCorePointer\*q"
-.B " InputDevice \*qMouse 2\*q \*qSendCoreEvents\*q"
-.B " Option \*qBlankTime\*q \*q5\*q"
-.B "EndSection"
-.fi
-.RE
-.SH "DRI SECTION"
-This optional section is used to provide some information for the
-Direct Rendering Infrastructure.
-Details about the format of this section can be found on-line at
-.IR <http://dri.freedesktop.org/> .
-.SH "VENDOR SECTION"
-The optional
-.B Vendor
-section may be used to provide vendor\-specific configuration information.
-Multiple
-.B Vendor
-sections may be present, and they may contain an
-.B Identifier
-entry and multiple
-.B Option
-flags.
-The data therein is not used in this release.
-.PP
-.SH "SEE ALSO"
-General:
-.BR X (__miscmansuffix__),
-.BR Xserver (__appmansuffix__),
-.BR __xservername__ (__appmansuffix__),
-.BR cvt (__appmansuffix__),
-.BR gtf (__appmansuffix__).
-.PP
-.B "Not all modules or interfaces are available on all platforms."
-.PP
-Display drivers:
-.BR apm (__drivermansuffix__),
-.BR ati (__drivermansuffix__),
-.BR chips (__drivermansuffix__),
-.BR cirrus (__drivermansuffix__),
-.BR cyrix (__drivermansuffix__),
-.BR fbdev (__drivermansuffix__),
-.BR glide (__drivermansuffix__),
-.BR glint (__drivermansuffix__),
-.BR i128 (__drivermansuffix__),
-.BR i740 (__drivermansuffix__),
-.BR imstt (__drivermansuffix__),
-.BR intel (__drivermansuffix__),
-.BR mga (__drivermansuffix__),
-.BR neomagic (__drivermansuffix__),
-.BR nv (__drivermansuffix__),
-.BR openchrome (__drivermansuffix__),
-.BR r128 (__drivermansuffix__),
-.BR radeon (__drivermansuffix__),
-.BR rendition (__drivermansuffix__),
-.BR savage (__drivermansuffix__),
-.BR s3virge (__drivermansuffix__),
-.BR siliconmotion (__drivermansuffix__),
-.BR sis (__drivermansuffix__),
-.BR sisusb (__drivermansuffix__),
-.BR sunbw2 (__drivermansuffix__),
-.BR suncg14 (__drivermansuffix__),
-.BR suncg3 (__drivermansuffix__),
-.BR suncg6 (__drivermansuffix__),
-.BR sunffb (__drivermansuffix__),
-.BR sunleo (__drivermansuffix__),
-.BR suntcx (__drivermansuffix__),
-.BR tdfx (__drivermansuffix__),
-.\" .BR tga (__drivermansuffix__),
-.BR trident (__drivermansuffix__),
-.BR tseng (__drivermansuffix__),
-.BR vesa (__drivermansuffix__),
-.BR vmware (__drivermansuffix__),
-.BR voodoo (__drivermansuffix__),
-.BR wsfb (__drivermansuffix__),
-.BR xgi (__drivermansuffix__),
-.BR xgixp (__drivermansuffix__).
-.PP
-Input drivers:
-.BR acecad (__drivermansuffix__),
-.BR citron (__drivermansuffix__),
-.BR elographics (__drivermansuffix__),
-.BR evdev (__drivermansuffix__),
-.BR fpit (__drivermansuffix__),
-.BR joystick (__drivermansuffix__),
-.BR kbd (__drivermansuffix__),
-.BR mousedrv (__drivermansuffix__),
-.BR mutouch (__drivermansuffix__),
-.BR penmount (__drivermansuffix__),
-.BR synaptics (__drivermansuffix__),
-.BR vmmouse (__drivermansuffix__),
-.BR void (__drivermansuffix__),
-.BR wacom (__drivermansuffix__).
-.PP
-Other modules and interfaces:
-.BR exa (__drivermansuffix__),
-.BR fbdevhw (__drivermansuffix__),
-.\" .BR shadowfb (__drivermansuffix__),
-.BR v4l (__drivermansuffix__).
-.br
-.SH AUTHORS
-This manual page was largely rewritten by David Dawes
-.IR <dawes@xfree86.org> .
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH __xconfigfile__ __filemansuffix__ __vendorversion__
+.SH NAME
+__xconfigfile__ and __xconfigdir__ \- configuration files for
+__xservername__ X server
+.SH INTRODUCTION
+.B __xservername__
+supports several mechanisms for supplying/obtaining configuration and
+run-time parameters: command line options, environment variables, the
+__xconfigfile__ and __xconfigdir__ configuration files, auto-detection,
+and fallback defaults. When the same information is supplied in more
+than one way, the highest precedence mechanism is used. The list of
+mechanisms is ordered from highest precedence to lowest. Note that not
+all parameters can be supplied via all methods. The available command
+line options and environment variables (and some defaults) are
+described in the Xserver(__appmansuffix__) and
+__xservername__(__appmansuffix__) manual pages. Most configuration file
+parameters, with their defaults, are described below. Driver and module
+specific configuration parameters are described in the relevant driver
+or module manual page.
+.SH DESCRIPTION
+.B __xservername__
+uses a configuration file called
+.I __xconfigfile__
+and files ending in the suffix
+.I .conf
+from the directory
+.I __xconfigdir__
+for its initial setup.
+The
+.I __xconfigfile__
+configuration file is searched for in the following places when the
+server is started as a normal user:
+.PP
+.RS 4
+.nf
+.IR /etc/X11/ <cmdline>
+.IR __projectroot__/etc/X11/ <cmdline>
+.IB /etc/X11/ $XORGCONFIG
+.IB __projectroot__/etc/X11/ $XORGCONFIG
+.I /etc/X11/__xconfigfile__
+.I /etc/__xconfigfile__
+.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
+.I __projectroot__/etc/X11/__xconfigfile__
+.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
+.I __projectroot__/lib/X11/__xconfigfile__
+.fi
+.RE
+.PP
+where
+.I <cmdline>
+is a relative path (with no \(lq..\(rq components) specified with the
+.B \-config
+command line option,
+.B $XORGCONFIG
+is the relative path (with no \(lq..\(rq components) specified by that
+environment variable, and
+.I <hostname>
+is the machine's hostname as reported by
+.BR gethostname (__libmansuffix__).
+.PP
+When the __xservername__ server is started by the \(lqroot\(rq user, the config file
+search locations are as follows:
+.PP
+.RS 4
+.nf
+<cmdline>
+.IR /etc/X11/ <cmdline>
+.IR __projectroot__/etc/X11/ <cmdline>
+.B $XORGCONFIG
+.IB /etc/X11/ $XORGCONFIG
+.IB __projectroot__/etc/X11/ $XORGCONFIG
+.I /etc/X11/__xconfigfile__
+.I /etc/__xconfigfile__
+.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
+.I __projectroot__/etc/X11/__xconfigfile__
+.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
+.I __projectroot__/lib/X11/__xconfigfile__
+.fi
+.RE
+.PP
+where
+.I <cmdline>
+is the path specified with the
+.B \-config
+command line option (which may be absolute or relative),
+.B $XORGCONFIG
+is the path specified by that
+environment variable (absolute or relative),
+.B $HOME
+is the path specified by that environment variable (usually the home
+directory), and
+.I <hostname>
+is the machine's hostname as reported by
+.BR gethostname (__libmansuffix__).
+.PP
+Additional configuration files are searched for in the following
+directories when the server is started as a normal user:
+.PP
+.RS 4
+.nf
+.IR /etc/X11/ <cmdline>
+.IR __sysconfdir__/X11/ <cmdline>
+.I /etc/X11/__xconfigdir__
+.I __sysconfdir__/X11/__xconfigdir__
+.fi
+.RE
+.PP
+where
+.I <cmdline>
+is a relative path (with no \(lq..\(rq components) specified with the
+.B \-configdir
+command line option.
+.PP
+When the __xservername__ server is started by the \(lqroot\(rq user, the
+config directory search locations are as follows:
+.PP
+.RS 4
+.nf
+<cmdline>
+.IR /etc/X11/ <cmdline>
+.IR __sysconfdir__/X11/ <cmdline>
+.I /etc/X11/__xconfigdir__
+.I __sysconfdir__/X11/__xconfigdir__
+.fi
+.RE
+.PP
+where
+.I <cmdline>
+is the path specified with the
+.B \-configdir
+command line option (which may be absolute or relative).
+.PP
+Finally, configuration files will also be searched for in directories
+reserved for system use. These are to separate configuration files from
+the vendor or 3rd party packages from those of local administration.
+These files are found in the following directories:
+.PP
+.RS 4
+.nf
+.I /usr/share/X11/__xconfigdir__
+.I __datadir__/X11/__xconfigdir__
+.fi
+.RE
+.PP
+The
+.I __xconfigfile__
+and
+.I __xconfigdir__
+files are composed of a number of sections which may be present in any order,
+or omitted to use default configuration values.
+Each section has the form:
+.PP
+.RS 4
+.nf
+.BI "Section \*q" SectionName \*q
+.RI " " SectionEntry
+ ...
+.B EndSection
+.fi
+.RE
+.PP
+The section names are:
+.PP
+.RS 4
+.nf
+.BR "Files " "File pathnames"
+.BR "ServerFlags " "Server flags"
+.BR "Module " "Dynamic module loading"
+.BR "Extensions " "Extension enabling"
+.BR "InputDevice " "Input device description"
+.BR "InputClass " "Input class description"
+.BR "Device " "Graphics device description"
+.BR "VideoAdaptor " "Xv video adaptor description"
+.BR "Monitor " "Monitor description"
+.BR "Modes " "Video modes descriptions"
+.BR "Screen " "Screen configuration"
+.BR "ServerLayout " "Overall layout"
+.BR "DRI " "DRI\-specific configuration"
+.BR "Vendor " "Vendor\-specific configuration"
+.fi
+.RE
+.PP
+The following obsolete section names are still recognised for compatibility
+purposes.
+In new config files, the
+.B InputDevice
+section should be used instead.
+.PP
+.RS 4
+.nf
+.BR "Keyboard " "Keyboard configuration"
+.BR "Pointer " "Pointer/mouse configuration"
+.fi
+.RE
+.PP
+The old
+.B XInput
+section is no longer recognised.
+.PP
+The
+.B ServerLayout
+sections are at the highest level.
+They bind together the input and output devices that will be used in a session.
+The input devices are described in the
+.B InputDevice
+sections.
+Output devices usually consist of multiple independent components (e.g.,
+a graphics board and a monitor).
+These multiple components are bound together in the
+.B Screen
+sections, and it is these that are referenced by the
+.B ServerLayout
+section.
+Each
+.B Screen
+section binds together a graphics board and a monitor.
+The graphics boards are described in the
+.B Device
+sections, and the monitors are described in the
+.B Monitor
+sections.
+.PP
+Config file keywords are case\-insensitive, and \(lq_\(rq characters are
+ignored.
+Most strings (including
+.B Option
+names) are also case-insensitive, and insensitive to white space and
+\(lq_\(rq characters.
+.PP
+Each config file entry usually takes up a single line in the file. They
+consist of a keyword, which is possibly followed by one or more arguments,
+with the number and types of the arguments depending on the keyword.
+The argument types are:
+.PP
+.RS 4
+.nf
+.BR "Integer " "an integer number in decimal, hex or octal"
+.BR "Real " "a floating point number"
+.BR "String " "a string enclosed in double quote marks (\*q)"
+.fi
+.RE
+.PP
+Note: hex integer values must be prefixed with \(lq0x\(rq, and octal values
+with \(lq0\(rq.
+.PP
+A special keyword called
+.B Option
+may be used to provide free\-form data to various components of the server.
+The
+.B Option
+keyword takes either one or two string arguments.
+The first is the option name, and the optional second argument is the
+option value.
+Some commonly used option value types include:
+.PP
+.RS 4
+.nf
+.BR "Integer " "an integer number in decimal, hex or octal"
+.BR "Real " "a floating point number"
+.BR "String " "a sequence of characters"
+.BR "Boolean " "a boolean value (see below)"
+.BR "Frequency " "a frequency value (see below)"
+.fi
+.RE
+.PP
+Note that
+.I all
+.B Option
+values, not just strings, must be enclosed in quotes.
+.PP
+Boolean options may optionally have a value specified.
+When no value is specified, the option's value is
+.BR TRUE .
+The following boolean option values are recognised as
+.BR TRUE :
+.PP
+.RS 4
+.BR 1 ,
+.BR on ,
+.BR true ,
+.B yes
+.RE
+.PP
+and the following boolean option values are recognised as
+.BR FALSE :
+.PP
+.RS 4
+.BR 0 ,
+.BR off ,
+.BR false ,
+.B no
+.RE
+.PP
+If an option name is prefixed with
+.RB \*q No \*q,
+then the option value is negated.
+.PP
+Example: the following option entries are equivalent:
+.PP
+.RS 4
+.nf
+.B "Option \*qAccel\*q \*qOff\*q"
+.B "Option \*qNoAccel\*q"
+.B "Option \*qNoAccel\*q \*qOn\*q"
+.B "Option \*qAccel\*q \*qfalse\*q"
+.B "Option \*qAccel\*q \*qno\*q"
+.fi
+.RE
+.PP
+Frequency option values consist of a real number that is optionally
+followed by one of the following frequency units:
+.PP
+.RS 4
+.BR Hz ,
+.BR k ,
+.BR kHz ,
+.BR M ,
+.B MHz
+.RE
+.PP
+When the unit name is omitted, the correct units will be determined from
+the value and the expectations of the appropriate range of the value.
+It is recommended that the units always be specified when using frequency
+option values to avoid any errors in determining the value.
+.SH "FILES SECTION"
+The
+.B Files
+section is used to specify some path names required by the server.
+Some of these paths can also be set from the command line (see
+.BR Xserver (__appmansuffix__)
+and
+.BR __xservername__ (__appmansuffix__)).
+The command line settings override the values specified in the config
+file.
+The
+.B Files
+section is optional, as are all of the entries that may appear in it.
+.PP
+The entries that can appear in this section are:
+.TP 7
+.BI "FontPath \*q" path \*q
+sets the search path for fonts.
+This path is a comma separated list of font path elements which the __xservername__
+server searches for font databases.
+Multiple
+.B FontPath
+entries may be specified, and they will be concatenated to build up the
+fontpath used by the server. Font path elements can be absolute
+directory paths, catalogue directories or a font server identifier. The
+formats of the later two are explained below:
+.PP
+.RS 7
+Catalogue directories:
+.PP
+.RS 4
+Catalogue directories can be specified using the prefix \fBcatalogue:\fR
+before the directory name. The directory can then be populated with
+symlinks pointing to the real font directories, using the following
+syntax in the symlink name:
+.PP
+.RS 4
+.IR <identifier> : [attribute]: pri= <priority>
+.RE
+.PP
+where
+.I <identifier>
+is an alphanumeric identifier,
+.I [attribute]
+is an attribute which will be passed to the underlying FPE and
+.I <priority>
+is a number used to order the fontfile FPEs. Examples:
+.PP
+.RS 4
+.nf
+.I 75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi
+.I gscript:pri=60 -> /usr/share/fonts/default/ghostscript
+.I misc:unscaled:pri=10 \-> /usr/share/X11/fonts/misc
+.fi
+.PP
+.RE .RE .RE
+.PP
+.RS 7
+Font server identifiers:
+.PP
+.RS 4
+Font server identifiers have the form:
+.RS 4
+.PP
+.IR <trans> / <hostname> : <port\-number>
+.RE
+.PP
+where
+.I <trans>
+is the transport type to use to connect to the font server (e.g.,
+.B unix
+for UNIX\-domain sockets or
+.B tcp
+for a TCP/IP connection),
+.I <hostname>
+is the hostname of the machine running the font server, and
+.I <port\-number>
+is the port number that the font server is listening on (usually 7100).
+.RE
+.PP
+When this entry is not specified in the config file, the server falls back
+to the compiled\-in default font path, which contains the following
+font path elements (which can be set inside a catalogue directory):
+.PP
+.RS 4
+.nf
+.I __datadir__/fonts/X11/misc/
+.I __datadir__/fonts/X11/TTF/
+.I __datadir__/fonts/X11/OTF/
+.I __datadir__/fonts/X11/Type1/
+.I __datadir__/fonts/X11/100dpi/
+.I __datadir__/fonts/X11/75dpi/
+.fi
+.RE
+.PP
+Font path elements that are found to be invalid are removed from the
+font path when the server starts up.
+.RE
+.TP 7
+.BI "ModulePath \*q" path \*q
+sets the search path for loadable __xservername__ server modules.
+This path is a comma separated list of directories which the __xservername__ server
+searches for loadable modules loading in the order specified.
+Multiple
+.B ModulePath
+entries may be specified, and they will be concatenated to build the
+module search path used by the server. The default module path is
+.PP
+.RS 11
+__modulepath__
+.RE
+.\" The LogFile keyword is not currently implemented
+.ig
+.TP 7
+.BI "LogFile \*q" path \*q
+sets the name of the __xservername__ server log file.
+The default log file name is
+.PP
+.RS 11
+.RI __logdir__/__xservername__. <n> .log
+.RE
+.PP
+.RS 7
+where
+.I <n>
+is the display number for the __xservername__ server.
+..
+.TP 7
+.BI "XkbDir \*q" path \*q
+sets the base directory for keyboard layout files. The
+.B \-xkbdir
+command line option can be used to override this. The default directory is
+.PP
+.RS 11
+__xkbdir__
+.RE
+.SH "SERVERFLAGS SECTION"
+In addition to options specific to this section (described below), the
+.B ServerFlags
+section is used to specify some global
+__xservername__ server options.
+All of the entries in this section are
+.BR Options ,
+although for compatibility purposes some of the old style entries are
+still recognised.
+Those old style entries are not documented here, and using them is
+discouraged.
+The
+.B ServerFlags
+section is optional, as are the entries that may be specified in it.
+.PP
+.B Options
+specified in this section (with the exception of the
+.B \*qDefaultServerLayout\*q
+.BR Option )
+may be overridden by
+.B Options
+specified in the active
+.B ServerLayout
+section.
+Options with command line equivalents are overridden when their command
+line equivalent is used.
+The options recognised by this section are:
+.TP 7
+.BI "Option \*qDefaultServerLayout\*q \*q" layout\-id \*q
+This specifies the default
+.B ServerLayout
+section to use in the absence of the
+.B \-layout
+command line option.
+.TP 7
+.BI "Option \*qNoTrapSignals\*q \*q" boolean \*q
+This prevents the __xservername__ server from trapping a range of unexpected fatal
+signals and exiting cleanly.
+Instead, the __xservername__ server will die and drop core where the fault occurred.
+The default behaviour is for the __xservername__ server to exit cleanly, but still drop a
+core file.
+In general you never want to use this option unless you are debugging an __xservername__
+server problem and know how to deal with the consequences.
+.TP 7
+.BI "Option \*qUseSIGIO\*q \*q" boolean \*q
+This controls whether the __xservername__ server requests that events from
+input devices be reported via a SIGIO signal handler (also known as SIGPOLL
+on some platforms), or only reported via the standard select(3) loop.
+The default behaviour is platform specific. In general you do not want to
+use this option unless you are debugging the __xservername__ server, or
+working around a specific bug until it is fixed, and understand the
+consequences.
+.TP 7
+.BI "Option \*qDontVTSwitch\*q \*q" boolean \*q
+This disallows the use of the
+.BI Ctrl+Alt+F n
+sequence (where
+.RI F n
+refers to one of the numbered function keys).
+That sequence is normally used to switch to another \*qvirtual terminal\*q
+on operating systems that have this feature.
+When this option is enabled, that key sequence has no special meaning and
+is passed to clients.
+Default: off.
+.TP 7
+.BI "Option \*qDontZap\*q \*q" boolean \*q
+This disallows the use of the
+.B Terminate_Server
+XKB action (usually on Ctrl+Alt+Backspace, depending on XKB options).
+This action is normally used to terminate the __xservername__ server.
+When this option is enabled, the action has no effect.
+Default: off.
+.TP 7
+.BI "Option \*qDontZoom\*q \*q" boolean \*q
+This disallows the use of the
+.B Ctrl+Alt+Keypad\-Plus
+and
+.B Ctrl+Alt+Keypad\-Minus
+sequences.
+These sequences allows you to switch between video modes.
+When this option is enabled, those key sequences have no special meaning
+and are passed to clients.
+Default: off.
+.TP 7
+.BI "Option \*qDisableVidModeExtension\*q \*q" boolean \*q
+This disables the parts of the VidMode extension used by the xvidtune client
+that can be used to change the video modes.
+Default: the VidMode extension is enabled.
+.TP 7
+.BI "Option \*qAllowNonLocalXvidtune\*q \*q" boolean \*q
+This allows the xvidtune client (and other clients that use the VidMode
+extension) to connect from another host.
+Default: off.
+.TP 7
+.BI "Option \*qAllowMouseOpenFail\*q \*q" boolean \*q
+This tells the mousedrv(__drivermansuffix__) and vmmouse(__drivermansuffix__)
+drivers to not report failure if the mouse device can't be opened/initialised.
+It has no effect on the evdev(__drivermansuffix__) or other drivers.
+Default: false.
+.TP 7
+.BI "Option \*qVTSysReq\*q \*q" boolean \*q
+enables the SYSV\-style VT switch sequence for non\-SYSV systems
+which support VT switching.
+This sequence is
+.B Alt\-SysRq
+followed by a function key
+.RB ( Fn ).
+This prevents the __xservername__ server trapping the
+keys used for the default VT switch sequence, which means that clients can
+access them.
+Default: off.
+.TP 7
+.BI "Option \*qBlankTime\*q \*q" time \*q
+sets the inactivity timeout for the
+.B blank
+phase of the screensaver.
+.I time
+is in minutes.
+This is equivalent to the __xservername__ server's
+.B \-s
+flag, and the value can be changed at run\-time with
+.BR xset(__appmansuffix__).
+Default: 10 minutes.
+.TP 7
+.BI "Option \*qStandbyTime\*q \*q" time \*q
+sets the inactivity timeout for the
+.B standby
+phase of DPMS mode.
+.I time
+is in minutes, and the value can be changed at run\-time with
+.BR xset(__appmansuffix__).
+Default: 10 minutes.
+This is only suitable for VESA DPMS compatible monitors, and may not be
+supported by all video drivers.
+It is only enabled for screens that have the
+.B \*qDPMS\*q
+option set (see the MONITOR section below).
+.TP 7
+.BI "Option \*qSuspendTime\*q \*q" time \*q
+sets the inactivity timeout for the
+.B suspend
+phase of DPMS mode.
+.I time
+is in minutes, and the value can be changed at run\-time with
+.BR xset(__appmansuffix__).
+Default: 10 minutes.
+This is only suitable for VESA DPMS compatible monitors, and may not be
+supported by all video drivers.
+It is only enabled for screens that have the
+.B \*qDPMS\*q
+option set (see the MONITOR section below).
+.TP 7
+.BI "Option \*qOffTime\*q \*q" time \*q
+sets the inactivity timeout for the
+.B off
+phase of DPMS mode.
+.I time
+is in minutes, and the value can be changed at run\-time with
+.BR xset(__appmansuffix__).
+Default: 10 minutes.
+This is only suitable for VESA DPMS compatible monitors, and may not be
+supported by all video drivers.
+It is only enabled for screens that have the
+.B \*qDPMS\*q
+option set (see the MONITOR section below).
+.TP 7
+.BI "Option \*qPixmap\*q \*q" bpp \*q
+This sets the pixmap format to use for depth 24.
+Allowed values for
+.I bpp
+are 24 and 32.
+Default: 32 unless driver constraints don't allow this (which is rare).
+Note: some clients don't behave well when this value is set to 24.
+.TP 7
+.BI "Option \*qPC98\*q \*q" boolean \*q
+Specify that the machine is a Japanese PC\-98 machine.
+This should not be enabled for anything other than the Japanese\-specific
+PC\-98 architecture.
+Default: auto\-detected.
+.TP 7
+.BI "Option \*qNoPM\*q \*q" boolean \*q
+Disables something to do with power management events.
+Default: PM enabled on platforms that support it.
+.TP 7
+.BI "Option \*qXinerama\*q \*q" boolean \*q
+enable or disable XINERAMA extension.
+Default is disabled.
+.TP 7
+.BI "Option \*qAIGLX\*q \*q" boolean \*q
+enable or disable AIGLX. AIGLX is enabled by default.
+.TP 7
+.BI "Option \*qDRI2\*q \*q" boolean \*q
+enable or disable DRI2. DRI2 is disabled by default.
+.TP 7
+.BI "Option \*qGlxVisuals\*q \*q" string \*q
+This option controls how many GLX visuals the GLX modules sets up.
+The default value is
+.BR "typical" ,
+which will setup up a typical subset of
+the GLXFBConfigs provided by the driver as GLX visuals. Other options are
+.BR "minimal" ,
+which will set up the minimal set allowed by the GLX specification and
+.BR "all"
+which will setup GLX visuals for all GLXFBConfigs.
+.TP 7
+.BI "Option \*qUseDefaultFontPath\*q \*q" boolean \*q
+Include the default font path even if other paths are specified in
+xorg.conf. If enabled, other font paths are included as well. Enabled by
+default.
+.TP 7
+.BI "Option \*qIgnoreABI\*q \*q" boolean \*q
+Allow modules built for a different, potentially incompatible version of
+the X server to load. Disabled by default.
+.TP 7
+.BI "Option \*qAutoAddDevices\*q \*q" boolean \*q
+If this option is disabled, then no devices will be added from HAL events.
+Enabled by default.
+.TP 7
+.BI "Option \*qAutoEnableDevices\*q \*q" boolean \*q
+If this option is disabled, then the devices will be added (and the
+DevicePresenceNotify event sent), but not enabled, thus leaving policy up
+to the client.
+Enabled by default.
+.TP 7
+.BI "Option \*qLog\*q \*q" string \*q
+This option controls whether the log is flushed and/or synced to disk after
+each message.
+Possible values are
+.B flush
+or
+.BR sync .
+Unset by default.
+.SH "MODULE SECTION"
+The
+.B Module
+section is used to specify which __xservername__ server modules should be loaded.
+This section is ignored when the __xservername__ server is built in static form.
+The type of modules normally loaded in this section are __xservername__ server
+extension modules.
+Most other module types are loaded automatically when they are needed via
+other mechanisms.
+The
+.B Module
+section is optional, as are all of the entries that may be specified in
+it.
+.PP
+Entries in this section may be in two forms.
+The first and most commonly used form is an entry that uses the
+.B Load
+keyword, as described here:
+.TP 7
+.BI "Load \*q" modulename \*q
+This instructs the server to load the module called
+.IR modulename .
+The module name given should be the module's standard name, not the
+module file name.
+The standard name is case\-sensitive, and does not include the \(lqlib\(rq
+prefix, or the \(lq.a\(rq, \(lq.o\(rq, or \(lq.so\(rq suffixes.
+.PP
+.RS 7
+Example: the DRI extension module can be loaded with the following entry:
+.PP
+.RS 4
+.B "Load \*qdri\*q"
+.RE
+.RE
+.TP 7
+.BI "Disable \*q" modulename \*q
+This instructs the server to not load the module called
+.IR modulename .
+Some modules are loaded by default in the server, and this overrides that
+default. If a
+.B Load
+instruction is given for the same module, it overrides the
+.B Disable
+instruction and the module is loaded. The module name given should be the
+module's standard name, not the module file name. As with the
+.B Load
+instruction, the standard name is case-sensitive, and does not include the
+"lib" prefix, or the ".a", ".o", or ".so" suffixes.
+.PP
+The second form of entry is a
+.BR SubSection,
+with the subsection name being the module name, and the contents of the
+.B SubSection
+being
+.B Options
+that are passed to the module when it is loaded.
+.PP
+Example: the extmod module (which contains a miscellaneous group of
+server extensions) can be loaded, with the XFree86\-DGA extension
+disabled by using the following entry:
+.PP
+.RS 4
+.nf
+.B "SubSection \*qextmod\*q"
+.B " Option \*qomit XFree86\-DGA\*q"
+.B EndSubSection
+.fi
+.RE
+.PP
+Modules are searched for in each directory specified in the
+.B ModulePath
+search path, and in the drivers, extensions, input, internal, and
+multimedia subdirectories of each of those directories.
+In addition to this, operating system specific subdirectories of all
+the above are searched first if they exist.
+.PP
+To see what extension modules are available, check the extensions
+subdirectory under:
+.PP
+.RS 4
+.nf
+__modulepath__
+.fi
+.RE
+.PP
+The \(lqextmod\(rq, \(lqdbe\(rq, \(lqdri\(rq, \(lqdri2\(rq, \(lqglx\(rq,
+and \(lqrecord\(rq extension modules are loaded automatically, if they
+are present, unless disabled with \*qDisable\*q entries.
+It is recommended
+that at very least the \(lqextmod\(rq extension module be loaded.
+If it isn't, some commonly used server extensions (like the SHAPE
+extension) will not be available.
+.SH "EXTENSIONS SECTION"
+The
+.B Extensions
+section is used to specify which X11 protocol extensions should be enabled
+or disabled.
+The
+.B Extensions
+section is optional, as are all of the entries that may be specified in
+it.
+.PP
+Entries in this section are listed as Option statements with the name of
+the extension as the first argument, and a boolean value as the second.
+The extension name is case\-sensitive, and matches the form shown in the output
+of \*qXorg -extension ?\*q.
+.PP
+.RS 7
+Example: the MIT-SHM extension can be disabled with the following entry:
+.PP
+.RS 4
+.nf
+.B "Section \*qExtensions\*q"
+.B " Option \*qMIT-SHM\*q \*qDisable\*q"
+.B "EndSection"
+.fi
+.RE
+.RE
+.SH "INPUTDEVICE SECTION"
+The config file may have multiple
+.B InputDevice
+sections.
+Recent X servers employ HAL or udev backends for input device enumeration
+and input hotplugging. It is usually not
+necessary to provide
+.B InputDevice
+sections in the xorg.conf if hotplugging is in use. If hotplugging is
+enabled,
+.B InputDevice
+sections using the
+.B mouse, kbd
+and
+.B vmmouse
+driver will be ignored.
+.PP
+If hotplugging is disabled, there will normally
+be at least two: one for the core (primary) keyboard
+and one for the core pointer.
+If either of these two is missing, a default configuration for the missing
+ones will be used. In the absence of an explicitly specified core input
+device, the first
+.B InputDevice
+marked as
+.B CorePointer
+(or
+.BR CoreKeyboard )
+is used.
+If there is no match there, the first
+.B InputDevice
+that uses the \(lqmouse\(rq (or \(lqkbd\(rq) driver is used.
+The final fallback is to use built\-in default configurations.
+Currently the default configuration may not work as expected on all platforms.
+.PP
+.B InputDevice
+sections have the following format:
+.PP
+.RS 4
+.nf
+.B "Section \*qInputDevice\*q"
+.BI " Identifier \*q" name \*q
+.BI " Driver \*q" inputdriver \*q
+.I " options"
+.I " ..."
+.B "EndSection"
+.fi
+.RE
+.PP
+The
+.B Identifier
+and
+.B Driver
+entries are required in all
+.B InputDevice
+sections.
+All other entries are optional.
+.PP
+The
+.B Identifier
+entry specifies the unique name for this input device.
+The
+.B Driver
+entry specifies the name of the driver to use for this input device.
+When using the loadable server, the input driver module
+.RI \*q inputdriver \*q
+will be loaded for each active
+.B InputDevice
+section.
+An
+.B InputDevice
+section is considered active if it is referenced by an active
+.B ServerLayout
+section, if it is referenced by the
+.B \-keyboard
+or
+.B \-pointer
+command line options, or if it is selected implicitly as the core pointer
+or keyboard device in the absence of such explicit references.
+The most commonly used input drivers are
+.BR evdev (__drivermansuffix__)
+on Linux systems, and
+.BR kbd (__drivermansuffix__)
+and
+.BR mousedrv (__drivermansuffix__)
+on other platforms.
+.PP
+.PP
+.B InputDevice
+sections recognise some driver\-independent
+.BR Options ,
+which are described here.
+See the individual input driver manual pages for a description of the
+device\-specific options.
+.TP 7
+.BI "Option \*qAutoServerLayout\*q \*q" boolean \*q
+Always add the device to the ServerLayout section used by this instance of
+the server. This affects implied layouts as well as explicit layouts
+specified in the configuration and/or on the command line.
+.TP 7
+.BI "Option \*qCorePointer\*q"
+Deprecated, see
+.B Floating
+.TP 7
+.BI "Option \*qCoreKeyboard\*q"
+Deprecated, see
+.B Floating
+.TP 7
+.BI "Option \*qAlwaysCore\*q \*q" boolean \*q
+Deprecated, see
+.B Floating
+.TP 7
+.BI "Option \*qSendCoreEvents\*q \*q" boolean \*q
+Deprecated, see
+.B Floating
+
+.TP 7
+.BI "Option \*qFloating\*q \*q" boolean \*q
+When enabled, the input device is set up floating and does not
+report events through any master device or control a cursor. The device is
+only available to clients using the X Input Extension API. This option is
+disabled by default.
+The options
+.B CorePointer,
+.B CoreKeyboard,
+.B AlwaysCore,
+and
+.B SendCoreEvents,
+are the inverse of option
+.B Floating
+(i.e.
+.B SendCoreEvents \*qon\*q
+is equivalent to
+.B Floating \*qoff\*q
+).
+
+This option controls the startup behavior only, a device
+may be reattached or set floating at runtime.
+.PP
+For pointing devices, the following options control how the pointer
+is accelerated or decelerated with respect to physical device motion. Most of
+these can be adjusted at runtime, see the xinput(1) man page for details. Only
+the most important acceleration options are discussed here.
+.TP 7
+.BI "Option \*qAccelerationProfile\*q \*q" integer \*q
+Select the profile. In layman's terms, the profile constitutes the "feeling" of
+the acceleration. More formally, it defines how the transfer function (actual
+acceleration as a function of current device velocity and acceleration controls)
+is constructed. This is mainly a matter of personal preference.
+.PP
+.RS 6
+.nf
+.B " 0 classic (mostly compatible)"
+.B "-1 none (only constant deceleration is applied)"
+.B " 1 device-dependent"
+.B " 2 polynomial (polynomial function)"
+.B " 3 smooth linear (soft knee, then linear)"
+.B " 4 simple (normal when slow, otherwise accelerated)"
+.B " 5 power (power function)"
+.B " 6 linear (more speed, more acceleration)"
+.B " 7 limited (like linear, but maxes out at threshold)"
+.fi
+.RE
+.TP 7
+.BI "Option \*qConstantDeceleration\*q \*q" real \*q
+Makes the pointer go
+.B deceleration
+times slower than normal. Most useful for high-resolution devices.
+.TP 7
+.BI "Option \*qAdaptiveDeceleration\*q \*q" real \*q
+Allows to actually decelerate the pointer when going slow. At most, it will be
+.B adaptive deceleration
+times slower. Enables precise pointer placement without sacrificing speed.
+.TP 7
+.BI "Option \*qAccelerationScheme\*q \*q" string \*q
+Selects the scheme, which is the underlying algorithm.
+.PP
+.RS 7
+.nf
+.B "predictable default algorithm (behaving more predictable)"
+.B "lightweight old acceleration code (as specified in the X protocol spec)"
+.B "none no acceleration or deceleration"
+.fi
+.RE
+.TP 7
+.BI "Option \*qAccelerationNumerator\*q \*q" integer \*q
+.TP 7
+.BI "Option \*qAccelerationDenominator\*q \*q" integer \*q
+Set numerator and denominator of the acceleration factor. The acceleration
+factor is a rational which, together with threshold, can be used to tweak
+profiles to suit the users needs. The
+.B simple
+and
+.B limited
+profiles use it directly (i.e. they accelerate by the factor), for other
+profiles it should hold that a higher acceleration factor leads to a faster
+pointer. Typically, 1 is unaccelerated and values up to 5 are sensible.
+.TP 7
+.BI "Option \*qAccelerationThreshold\*q \*q" integer \*q
+Set the threshold, which is roughly the velocity (usually device units per 10
+ms) required for acceleration to become effective. The precise effect varies
+with the profile however.
+
+.SH "INPUTCLASS SECTION"
+The config file may have multiple
+.B InputClass
+sections.
+These sections are optional and are used to provide configuration for a
+class of input devices as they are automatically added. An input device can
+match more than one
+.B InputClass
+section. Each class can override settings from a previous class, so it is
+best to arrange the sections with the most generic matches first.
+.PP
+.B InputClass
+sections have the following format:
+.PP
+.RS 4
+.nf
+.B "Section \*qInputClass\*q"
+.BI " Identifier \*q" name \*q
+.I " entries"
+.I " ..."
+.I " options"
+.I " ..."
+.B "EndSection"
+.fi
+.RE
+.PP
+The
+.B Identifier
+entry is required in all
+.B InputClass
+sections.
+All other entries are optional.
+.PP
+The
+.B Identifier
+entry specifies the unique name for this input class.
+The
+.B Driver
+entry specifies the name of the driver to use for this input device.
+After all classes have been examined, the
+.RI \*q inputdriver \*q
+module from the first
+.B Driver
+entry will be enabled when using the loadable server.
+.PP
+When an input device is automatically added, its characteristics are
+checked against all
+.B InputClass
+sections. Each section can contain optional entries to narrow the match
+of the class. If none of the optional entries appear, the
+.B InputClass
+section is generic and will match any input device. If more than one of
+these entries appear, they all must match for the configuration to apply.
+.PP
+There are two types of match entries used in
+.B InputClass
+sections. The first allows various tokens to be matched against attributes
+of the device. An entry can be constructed to match attributes from different
+devices by separating arguments with a '|' character. Multiple entries of the
+same type may be supplied to add multiple matching conditions on the same
+attribute. For example:
+.PP
+.RS 4
+.nf
+.B "Section \*qInputClass\*q"
+.B " Identifier \*qMy Class\*q"
+.B " # product string must contain example and
+.B " # either gizmo or gadget
+.B " MatchProduct \*qexample\*q
+.B " MatchProduct \*qgizmo|gadget\*q
+.I " ..."
+.B "EndSection"
+.fi
+.RE
+.TP 7
+.BI "MatchProduct \*q" matchproduct \*q
+This entry can be used to check if the substring
+.RI \*q matchproduct \*q
+occurs in the device's product name.
+.TP 7
+.BI "MatchVendor \*q" matchvendor \*q
+This entry can be used to check if the substring
+.RI \*q matchvendor \*q
+occurs in the device's vendor name.
+.TP 7
+.BI "MatchDevicePath \*q" matchdevice \*q
+This entry can be used to check if the device file matches the
+.RI \*q matchdevice \*q
+pathname pattern.
+.TP 7
+.BI "MatchOS \*q" matchos \*q
+This entry can be used to check if the operating system matches the
+case-insensitive
+.RI \*q matchos \*q
+string. This entry is only supported on platforms providing the
+.BR uname (2)
+system call.
+.TP 7
+.BI "MatchPnPID \*q" matchpnp \*q
+The device's Plug and Play (PnP) ID can be checked against the
+.RI \*q matchpnp \*q
+shell wildcard pattern.
+.TP 7
+.BI "MatchUSBID \*q" matchusb \*q
+The device's USB ID can be checked against the
+.RI \*q matchusb \*q
+shell wildcard pattern. The ID is constructed as lowercase hexadecimal numbers
+separated by a ':'. This is the same format as the
+.BR lsusb (8)
+program.
+.TP 7
+.BI "MatchDriver \*q" matchdriver \*q
+Check the case-sensitive string
+.RI \*q matchdriver \*q
+against the currently configured driver of the device. Ordering of sections
+using this entry is important since it will not match unless the driver has
+been set by the config backend or a previous
+.B InputClass
+section.
+.TP 7
+.BI "MatchTag \*q" matchtag \*q
+This entry can be used to check if tags assigned by the config backend
+matches the
+.RI \*q matchtag \*q
+pattern. A match is found if at least one of the tags given in
+.RI \*q matchtag \*q
+matches at least one of the tags assigned by the backend.
+.PP
+The second type of entry is used to match device types. These entries take a
+boolean argument similar to
+.B Option
+entries.
+.TP 7
+.BI "MatchIsKeyboard \*q" bool \*q
+.TP 7
+.BI "MatchIsPointer \*q" bool \*q
+.TP 7
+.BI "MatchIsJoystick \*q" bool \*q
+.TP 7
+.BI "MatchIsTablet \*q" bool \*q
+.TP 7
+.BI "MatchIsTouchpad \*q" bool \*q
+.TP 7
+.BI "MatchIsTouchscreen \*q" bool \*q
+.PP
+When an input device has been matched to the
+.B InputClass
+section, any
+.B Option
+entries are applied to the device. One
+.B InputClass
+specific
+.B Option
+is recognized. See the
+.B InputDevice
+section above for a description of the remaining
+.B Option
+entries.
+.TP 7
+.BI "Option \*qIgnore\*q \*q" boolean \*q
+This optional entry specifies that the device should be ignored entirely,
+and not added to the server. This can be useful when the device is handled
+by another program and no X events should be generated.
+.SH "DEVICE SECTION"
+The config file may have multiple
+.B Device
+sections.
+There must be at least one, for the video card being used.
+.PP
+.B Device
+sections have the following format:
+.PP
+.RS 4
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" name \*q
+.BI " Driver \*q" driver \*q
+.I " entries"
+.I " ..."
+.B "EndSection"
+.fi
+.RE
+.PP
+The
+.B Identifier
+and
+.B Driver
+entries are required in all
+.B Device
+sections. All other entries are optional.
+.PP
+The
+.B Identifier
+entry specifies the unique name for this graphics device.
+The
+.B Driver
+entry specifies the name of the driver to use for this graphics device.
+When using the loadable server, the driver module
+.RI \*q driver \*q
+will be loaded for each active
+.B Device
+section.
+A
+.B Device
+section is considered active if it is referenced by an active
+.B Screen
+section.
+.PP
+.B Device
+sections recognise some driver\-independent entries and
+.BR Options ,
+which are described here.
+Not all drivers make use of these
+driver\-independent entries, and many of those that do don't require them
+to be specified because the information is auto\-detected.
+See the individual graphics driver manual pages for further information
+about this, and for a description of the device\-specific options.
+Note that most of the
+.B Options
+listed here (but not the other entries) may be specified in the
+.B Screen
+section instead of here in the
+.B Device
+section.
+.TP 7
+.BI "BusID \*q" bus\-id \*q
+This specifies the bus location of the graphics card.
+For PCI/AGP cards,
+the
+.I bus\-id
+string has the form
+.BI PCI: bus : device : function
+(e.g., \(lqPCI:1:0:0\(rq might be appropriate for an AGP card).
+This field is usually optional in single-head configurations when using
+the primary graphics card.
+In multi-head configurations, or when using a secondary graphics card in a
+single-head configuration, this entry is mandatory.
+Its main purpose is to make an unambiguous connection between the device
+section and the hardware it is representing.
+This information can usually be found by running the pciaccess tool
+scanpci.
+.TP 7
+.BI "Screen " number
+This option is mandatory for cards where a single PCI entity can drive more
+than one display (i.e., multiple CRTCs sharing a single graphics accelerator
+and video memory).
+One
+.B Device
+section is required for each head, and this
+parameter determines which head each of the
+.B Device
+sections applies to.
+The legal values of
+.I number
+range from 0 to one less than the total number of heads per entity.
+Most drivers require that the primary screen (0) be present.
+.TP 7
+.BI "Chipset \*q" chipset \*q
+This usually optional entry specifies the chipset used on the graphics
+board.
+In most cases this entry is not required because the drivers will probe the
+hardware to determine the chipset type.
+Don't specify it unless the driver-specific documentation recommends that you
+do.
+.TP 7
+.BI "Ramdac \*q" ramdac\-type \*q
+This optional entry specifies the type of RAMDAC used on the graphics
+board.
+This is only used by a few of the drivers, and in most cases it is not
+required because the drivers will probe the hardware to determine the
+RAMDAC type where possible.
+Don't specify it unless the driver-specific documentation recommends that you
+do.
+.TP 7
+.BI "DacSpeed " speed
+.TP 7
+.BI "DacSpeed " "speed\-8 speed\-16 speed\-24 speed\-32"
+This optional entry specifies the RAMDAC speed rating (which is usually
+printed on the RAMDAC chip).
+The speed is in MHz.
+When one value is given, it applies to all framebuffer pixel sizes.
+When multiple values are given, they apply to the framebuffer pixel sizes
+8, 16, 24 and 32 respectively.
+This is not used by many drivers, and only needs to be specified when the
+speed rating of the RAMDAC is different from the defaults built in to
+driver, or when the driver can't auto-detect the correct defaults.
+Don't specify it unless the driver-specific documentation recommends that you
+do.
+.TP 7
+.BI "Clocks " "clock ..."
+specifies the pixel that are on your graphics board.
+The clocks are in MHz, and may be specified as a floating point number.
+The value is stored internally to the nearest kHz.
+The ordering of the clocks is important.
+It must match the order in which they are selected on the graphics board.
+Multiple
+.B Clocks
+lines may be specified, and each is concatenated to form the list.
+Most drivers do not use this entry, and it is only required for some older
+boards with non-programmable clocks.
+Don't specify this entry unless the driver-specific documentation explicitly
+recommends that you do.
+.TP
+.BI "ClockChip \*q" clockchip\-type \*q
+This optional entry is used to specify the clock chip type on graphics
+boards which have a programmable clock generator.
+Only a few __xservername__ drivers support programmable clock chips.
+For details, see the appropriate driver manual page.
+.TP 7
+.BI "VideoRam " "mem"
+This optional entry specifies the amount of video ram that is installed
+on the graphics board.
+This is measured in kBytes.
+In most cases this is not required because the __xservername__ server probes
+the graphics board to determine this quantity.
+The driver-specific documentation should indicate when it might be needed.
+.TP 7
+.BI "BiosBase " "baseaddress"
+This optional entry specifies the base address of the video BIOS for
+the VGA board.
+This address is normally auto-detected, and should only be specified if the
+driver-specific documentation recommends it.
+.TP 7
+.BI "MemBase " "baseaddress"
+This optional entry specifies the memory base address of a graphics
+board's linear frame buffer.
+This entry is not used by many drivers, and it should only be specified if
+the driver-specific documentation recommends it.
+.TP 7
+.BI "IOBase " "baseaddress"
+This optional entry specifies the IO base address.
+This entry is not used by many drivers, and it should only be specified if
+the driver-specific documentation recommends it.
+.TP 7
+.BI "ChipID " "id"
+This optional entry specifies a numerical ID representing the chip type.
+For PCI cards, it is usually the device ID.
+This can be used to override the auto-detection, but that should only be done
+when the driver-specific documentation recommends it.
+.TP 7
+.BI "ChipRev " "rev"
+This optional entry specifies the chip revision number.
+This can be used to override the auto-detection, but that should only be done
+when the driver-specific documentation recommends it.
+.TP 7
+.BI "TextClockFreq " "freq"
+This optional entry specifies the pixel clock frequency that is used
+for the regular text mode.
+The frequency is specified in MHz.
+This is rarely used.
+.TP 7
+.BI "Option \*qModeDebug\*q \*q" boolean \*q
+Enable printing of additional debugging information about modesetting to
+the server log.
+.ig
+.TP 7
+This optional entry allows an IRQ number to be specified.
+..
+.TP 7
+.B Options
+Option flags may be specified in the
+.B Device
+sections.
+These include driver\-specific options and driver\-independent options.
+The former are described in the driver\-specific documentation.
+Some of the latter are described below in the section about the
+.B Screen
+section, and they may also be included here.
+
+.SH "VIDEOADAPTOR SECTION"
+Nobody wants to say how this works.
+Maybe nobody knows ...
+
+.SH "MONITOR SECTION"
+The config file may have multiple
+.B Monitor
+sections.
+There should normally be at least one, for the monitor being used,
+but a default configuration will be created when one isn't specified.
+.PP
+.B Monitor
+sections have the following format:
+.PP
+.RS 4
+.nf
+.B "Section \*qMonitor\*q"
+.BI " Identifier \*q" name \*q
+.I " entries"
+.I " ..."
+.B "EndSection"
+.fi
+.RE
+.PP
+The only mandatory entry in a
+.B Monitor
+section is the
+.B Identifier
+entry.
+.PP
+The
+.B Identifier
+entry specifies the unique name for this monitor.
+The
+.B Monitor
+section may be used to provide information about the specifications of the
+monitor, monitor-specific
+.BR Options ,
+and information about the video modes to use with the monitor.
+.PP
+With RandR 1.2-enabled drivers, monitor sections may be tied to specific
+outputs of the video card. Using the name of the output defined by the video
+driver plus the identifier of a monitor section, one associates a monitor
+section with an output by adding an option to the Device section in the
+following format:
+
+.B Option \*qMonitor-outputname\*q \*qmonitorsection\*q
+
+(for example,
+.B Option \*qMonitor-VGA\*q \*qVGA monitor\*q
+for a VGA output)
+.PP
+In the absence of specific association of monitor sections to outputs, if a
+monitor section is present the server will associate it with an output to
+preserve compatibility for previous single-head configurations.
+.PP
+Specifying video modes is optional because the server will use the DDC or other
+information provided by the monitor to automatically configure the list of
+modes available.
+When modes are specified explicitly in the
+.B Monitor
+section (with the
+.BR Modes ,
+.BR ModeLine ,
+or
+.B UseModes
+keywords), built-in modes with the same names are not included.
+Built-in modes with different names are, however, still implicitly included,
+when they meet the requirements of the monitor.
+.PP
+The entries that may be used in
+.B Monitor
+sections are described below.
+.TP 7
+.BI "VendorName \*q" vendor \*q
+This optional entry specifies the monitor's manufacturer.
+.TP 7
+.BI "ModelName \*q" model \*q
+This optional entry specifies the monitor's model.
+.TP 7
+.BI "HorizSync " "horizsync\-range"
+gives the range(s) of horizontal sync frequencies supported by the
+monitor.
+.I horizsync\-range
+may be a comma separated list of either discrete values or ranges of
+values.
+A range of values is two values separated by a dash.
+By default the values are in units of kHz.
+They may be specified in MHz or Hz
+if
+.B MHz
+or
+.B Hz
+is added to the end of the line.
+The data given here is used by the __xservername__ server to determine if video
+modes are within the specifications of the monitor.
+This information should be available in the monitor's handbook.
+If this entry is omitted, a default range of 28\-33kHz is used.
+.TP 7
+.BI "VertRefresh " "vertrefresh\-range"
+gives the range(s) of vertical refresh frequencies supported by the
+monitor.
+.I vertrefresh\-range
+may be a comma separated list of either discrete values or ranges of
+values.
+A range of values is two values separated by a dash.
+By default the values are in units of Hz.
+They may be specified in MHz or kHz
+if
+.B MHz
+or
+.B kHz
+is added to the end of the line.
+The data given here is used by the __xservername__ server to determine if video
+modes are within the specifications of the monitor.
+This information should be available in the monitor's handbook.
+If this entry is omitted, a default range of 43\-72Hz is used.
+.TP 7
+.BI "DisplaySize " "width height"
+This optional entry gives the width and height, in millimetres, of the
+picture area of the monitor.
+If given this is used to calculate the horizontal and vertical pitch (DPI) of
+the screen.
+.TP 7
+.BI "Gamma " "gamma\-value"
+.TP 7
+.BI "Gamma " "red\-gamma green\-gamma blue\-gamma"
+This is an optional entry that can be used to specify the gamma correction
+for the monitor.
+It may be specified as either a single value or as three separate RGB values.
+The values should be in the range 0.1 to 10.0, and the default is 1.0.
+Not all drivers are capable of using this information.
+.TP 7
+.BI "UseModes \*q" modesection\-id \*q
+Include the set of modes listed in the
+.B Modes
+section called
+.IR modesection\-id.
+This makes all of the modes defined in that section available for use by
+this monitor.
+.TP 7
+.BI "Mode \*q" name \*q
+This is an optional multi-line entry that can be used to provide
+definitions for video modes for the monitor.
+In most cases this isn't necessary because the built-in set of VESA standard
+modes will be sufficient.
+The
+.B Mode
+keyword indicates the start of a multi-line video mode description.
+The mode description is terminated with the
+.B EndMode
+keyword.
+The mode description consists of the following entries:
+.RS 7
+.TP 4
+.BI "DotClock " clock
+is the dot (pixel) clock rate to be used for the mode.
+.TP 4
+.BI "HTimings " "hdisp hsyncstart hsyncend htotal"
+specifies the horizontal timings for the mode.
+.TP 4
+.BI "VTimings " "vdisp vsyncstart vsyncend vtotal"
+specifies the vertical timings for the mode.
+.TP 4
+.BI "Flags \*q" flag \*q " ..."
+specifies an optional set of mode flags, each of which is a separate
+string in double quotes.
+.B \*qInterlace\*q
+indicates that the mode is interlaced.
+.B \*qDoubleScan\*q
+indicates a mode where each scanline is doubled.
+.B \*q+HSync\*q
+and
+.B \*q\-HSync\*q
+can be used to select the polarity of the HSync signal.
+.B \*q+VSync\*q
+and
+.B \*q\-VSync\*q
+can be used to select the polarity of the VSync signal.
+.B \*qComposite\*q
+can be used to specify composite sync on hardware where this is supported.
+Additionally, on some hardware,
+.B \*q+CSync\*q
+and
+.B \*q\-CSync\*q
+may be used to select the composite sync polarity.
+.TP 4
+.BI "HSkew " hskew
+specifies the number of pixels (towards the right edge of the screen) by
+which the display enable signal is to be skewed.
+Not all drivers use this information.
+This option might become necessary to override the default value supplied
+by the server (if any).
+\(lqRoving\(rq horizontal lines indicate this value needs to be increased.
+If the last few pixels on a scan line appear on the left of the screen,
+this value should be decreased.
+.TP 4
+.BI "VScan " vscan
+specifies the number of times each scanline is painted on the screen.
+Not all drivers use this information.
+Values less than 1 are treated as 1, which is the default.
+Generally, the
+.B \*qDoubleScan\*q
+.B Flag
+mentioned above doubles this value.
+.RE
+.TP 7
+.BI "ModeLine \*q" name \*q " mode\-description"
+This entry is a more compact version of the
+.B Mode
+entry, and it also can be used to specify video modes for the monitor.
+is a single line format for specifying video modes.
+In most cases this isn't necessary because the built\-in set of VESA
+standard modes will be sufficient.
+.PP
+.RS 7
+The
+.I mode\-description
+is in four sections, the first three of which are mandatory.
+The first is the dot (pixel) clock.
+This is a single number specifying the pixel clock rate for the mode in
+MHz.
+The second section is a list of four numbers specifying the horizontal
+timings.
+These numbers are the
+.IR hdisp ,
+.IR hsyncstart ,
+.IR hsyncend ,
+and
+.I htotal
+values.
+The third section is a list of four numbers specifying the vertical
+timings.
+These numbers are the
+.IR vdisp ,
+.IR vsyncstart ,
+.IR vsyncend ,
+and
+.I vtotal
+values.
+The final section is a list of flags specifying other characteristics of
+the mode.
+.B Interlace
+indicates that the mode is interlaced.
+.B DoubleScan
+indicates a mode where each scanline is doubled.
+.B +HSync
+and
+.B \-HSync
+can be used to select the polarity of the HSync signal.
+.B +VSync
+and
+.B \-VSync
+can be used to select the polarity of the VSync signal.
+.B Composite
+can be used to specify composite sync on hardware where this is supported.
+Additionally, on some hardware,
+.B +CSync
+and
+.B \-CSync
+may be used to select the composite sync polarity.
+The
+.B HSkew
+and
+.B VScan
+options mentioned above in the
+.B Modes
+entry description can also be used here.
+.RE
+.TP 7
+.BI "Option " "\*qDPMS\*q " \*qbool\*q
+This option controls whether the server should enable the DPMS extension
+for power management for this screen. The default is to enable the
+extension.
+.TP 7
+.BI "Option " "\*qSyncOnGreen\*q " \*qbool\*q
+This option controls whether the video card should drive the sync signal
+on the green color pin. Not all cards support this option, and most
+monitors do not require it. The default is off.
+.TP 7
+.BI "Option " "\*qPrimary\*q " \*qbool\*q
+This optional entry specifies that the monitor should be treated as the primary
+monitor. (RandR 1.2-supporting drivers only)
+.TP 7
+.BI "Option " "\*qPreferredMode\*q " \*qstring\*q
+This optional entry specifies a mode to be marked as the preferred initial mode
+of the monitor.
+(RandR 1.2-supporting drivers only)
+.TP 7
+.BI "Option " "\*qPosition\*q " "\*qx y\*q"
+This optional entry specifies the position of the monitor within the X
+screen.
+(RandR 1.2-supporting drivers only)
+.TP 7
+.BI "Option " "\*qLeftOf\*q " \*qoutput\*q
+This optional entry specifies that the monitor should be positioned to the
+left of the output (not monitor) of the given name.
+(RandR 1.2-supporting drivers only)
+.TP 7
+.BI "Option " "\*qRightOf\*q " \*qoutput\*q
+This optional entry specifies that the monitor should be positioned to the
+right of the output (not monitor) of the given name.
+(RandR 1.2-supporting drivers only)
+.TP 7
+.BI "Option " "\*qAbove\*q " \*qoutput\*q
+This optional entry specifies that the monitor should be positioned above the
+output (not monitor) of the given name.
+(RandR 1.2-supporting drivers only)
+.TP 7
+.BI "Option " "\*qBelow\*q " \*qoutput\*q
+This optional entry specifies that the monitor should be positioned below the
+output (not monitor) of the given name.
+(RandR 1.2-supporting drivers only)
+.TP 7
+.BI "Option " "\*qEnable\*q " \*qbool\*q
+This optional entry specifies whether the monitor should be turned on
+at startup. By default, the server will attempt to enable all connected
+monitors.
+(RandR 1.2-supporting drivers only)
+.TP 7
+.BI "Option " "\*qDefaultModes\*q " \*qbool\*q
+This optional entry specifies whether the server should add supported default
+modes to the list of modes offered on this monitor. By default, the server
+will add default modes; you should only disable this if you can guarantee
+that EDID will be available at all times, or if you have added custom modelines
+which the server can use.
+(RandR 1.2-supporting drivers only)
+.TP 7
+.BI "Option " "\*qMinClock\*q " \*qfrequency\*q
+This optional entry specifies the minimum dot clock, in kHz, that is supported
+by the monitor.
+.TP 7
+.BI "Option " "\*qMaxClock\*q " \*qfrequency\*q
+This optional entry specifies the maximum dot clock, in kHz, that is supported
+by the monitor.
+.TP 7
+.BI "Option " "\*qIgnore\*q " \*qbool\*q
+This optional entry specifies that the monitor should be ignored entirely,
+and not reported through RandR. This is useful if the hardware reports the
+presence of outputs that don't exist.
+(RandR 1.2-supporting drivers only)
+.TP 7
+.BI "Option " "\*qRotate\*q " \*qrotation\*q
+This optional entry specifies the initial rotation of the given monitor.
+Valid values for rotation are \*qnormal\*q, \*qleft\*q, \*qright\*q, and
+\*qinverted\*q.
+(RandR 1.2-supporting drivers only)
+
+.SH "MODES SECTION"
+The config file may have multiple
+.B Modes
+sections, or none.
+These sections provide a way of defining sets of video modes independently
+of the
+.B Monitor
+sections.
+.B Monitor
+sections may include the definitions provided in these sections by
+using the
+.B UseModes
+keyword.
+In most cases the
+.B Modes
+sections are not necessary because the built\-in set of VESA standard modes
+will be sufficient.
+.PP
+.B Modes
+sections have the following format:
+.PP
+.RS 4
+.nf
+.B "Section \*qModes\*q"
+.BI " Identifier \*q" name \*q
+.I " entries"
+.I " ..."
+.B "EndSection"
+.fi
+.RE
+.PP
+The
+.B Identifier
+entry specifies the unique name for this set of mode descriptions.
+The other entries permitted in
+.B Modes
+sections are the
+.B Mode
+and
+.B ModeLine
+entries that are described above in the
+.B Monitor
+section.
+.SH "SCREEN SECTION"
+The config file may have multiple
+.B Screen
+sections.
+There must be at least one, for the \(lqscreen\(rq being used.
+A \(lqscreen\(rq represents the binding of a graphics device
+.RB ( Device
+section) and a monitor
+.RB ( Monitor
+section).
+A
+.B Screen
+section is considered \(lqactive\(rq if it is referenced by an active
+.B ServerLayout
+section or by the
+.B \-screen
+command line option.
+If neither of those is present, the first
+.B Screen
+section found in the config file is considered the active one.
+.PP
+.B Screen
+sections have the following format:
+.PP
+.RS 4
+.nf
+.B "Section \*qScreen\*q"
+.BI " Identifier \*q" name \*q
+.BI " Device \*q" devid \*q
+.BI " Monitor \*q" monid \*q
+.I " entries"
+.I " ..."
+.BI " SubSection \*qDisplay\*q"
+.I " entries"
+.I " ...
+.B " EndSubSection"
+.I " ..."
+.B "EndSection"
+.fi
+.RE
+.PP
+The
+.B Identifier
+and
+.B Device
+entries are mandatory.
+All others are optional.
+.PP
+The
+.B Identifier
+entry specifies the unique name for this screen.
+The
+.B Screen
+section provides information specific to the whole screen, including
+screen\-specific
+.BR Options .
+In multi\-head configurations, there will be multiple active
+.B Screen
+sections, one for each head.
+The entries available
+for this section are:
+.TP 7
+.BI "Device \*q" device\-id \*q
+This mandatory entry specifies the
+.B Device
+section to be used for this screen.
+This is what ties a specific graphics card to a screen.
+The
+.I device\-id
+must match the
+.B Identifier
+of a
+.B Device
+section in the config file.
+.TP 7
+.BI "Monitor \*q" monitor\-id \*q
+specifies which monitor description is to be used for this screen.
+If a
+.B Monitor
+name is not specified, a default configuration is used.
+Currently the default configuration may not function as expected on all
+platforms.
+.TP 7
+.BI "VideoAdaptor \*q" xv\-id \*q
+specifies an optional Xv video adaptor description to be used with this
+screen.
+.TP 7
+.BI "DefaultDepth " depth
+specifies which color depth the server should use by default.
+The
+.B \-depth
+command line option can be used to override this.
+If neither is specified, the default depth is driver\-specific, but in most
+cases is 8.
+.TP 7
+.BI "DefaultFbBpp " bpp
+specifies which framebuffer layout to use by default.
+The
+.B \-fbbpp
+command line option can be used to override this.
+In most cases the driver will chose the best default value for this.
+The only case where there is even a choice in this value is for depth 24,
+where some hardware supports both a packed 24 bit framebuffer layout and a
+sparse 32 bit framebuffer layout.
+.TP 7
+.B Options
+Various
+.B Option
+flags may be specified in the
+.B Screen
+section.
+Some are driver\-specific and are described in the driver documentation.
+Others are driver\-independent, and will eventually be described here.
+.\" XXX These should really be in an xaa man page.
+.TP 7
+.BI "Option \*qAccel\*q"
+Enables XAA (X Acceleration Architecture), a mechanism that makes video cards'
+2D hardware acceleration available to the __xservername__ server.
+This option is on by default, but it may be necessary to turn it off if
+there are bugs in the driver.
+There are many options to disable specific accelerated operations, listed
+below.
+Note that disabling an operation will have no effect if the operation is
+not accelerated (whether due to lack of support in the hardware or in the
+driver).
+.TP 7
+.BI "Option \*qInitPrimary\*q \*q" boolean \*q
+Use the Int10 module to initialize the primary graphics card.
+Normally, only secondary cards are soft-booted using the Int10 module, as the
+primary card has already been initialized by the BIOS at boot time.
+Default: false.
+.TP 7
+.BI "Option \*qNoInt10\*q \*q" boolean \*q
+Disables the Int10 module, a module that uses the int10 call to the BIOS
+of the graphics card to initialize it.
+Default: false.
+.TP 7
+.BI "Option \*qNoMTRR\*q"
+Disables MTRR (Memory Type Range Register) support, a feature of modern
+processors which can improve video performance by a factor of up to 2.5.
+Some hardware has buggy MTRR support, and some video drivers have been
+known to exhibit problems when MTRR's are used.
+.TP 7
+.BI "Option \*qXaaNoCPUToScreenColorExpandFill\*q"
+Disables accelerated rectangular expansion blits from source patterns
+stored in system memory (using a memory\-mapped aperture).
+.TP 7
+.BI "Option \*qXaaNoColor8x8PatternFillRect\*q"
+Disables accelerated fills of a rectangular region with a full\-color
+pattern.
+.TP 7
+.BI "Option \*qXaaNoColor8x8PatternFillTrap\*q"
+Disables accelerated fills of a trapezoidal region with a full\-color
+pattern.
+.TP 7
+.BI "Option \*qXaaNoDashedBresenhamLine\*q"
+Disables accelerated dashed Bresenham line draws.
+.TP 7
+.BI "Option \*qXaaNoDashedTwoPointLine\*q"
+Disables accelerated dashed line draws between two arbitrary points.
+.TP 7
+.BI "Option \*qXaaNoImageWriteRect\*q"
+Disables accelerated transfers of full\-color rectangular patterns from
+system memory to video memory (using a memory\-mapped aperture).
+.TP 7
+.BI "Option \*qXaaNoMono8x8PatternFillRect\*q"
+Disables accelerated fills of a rectangular region with a monochrome
+pattern.
+.TP 7
+.BI "Option \*qXaaNoMono8x8PatternFillTrap\*q"
+Disables accelerated fills of a trapezoidal region with a monochrome
+pattern.
+.TP 7
+.BI "Option \*qXaaNoOffscreenPixmaps\*q"
+Disables accelerated draws into pixmaps stored in offscreen video memory.
+.TP 7
+.BI "Option \*qXaaNoPixmapCache\*q"
+Disables caching of patterns in offscreen video memory.
+.TP 7
+.BI "Option \*qXaaNoScanlineCPUToScreenColorExpandFill\*q"
+Disables accelerated rectangular expansion blits from source patterns
+stored in system memory (one scan line at a time).
+.TP 7
+.BI "Option \*qXaaNoScanlineImageWriteRect\*q"
+Disables accelerated transfers of full\-color rectangular patterns from
+system memory to video memory (one scan line at a time).
+.TP 7
+.BI "Option \*qXaaNoScreenToScreenColorExpandFill\*q"
+Disables accelerated rectangular expansion blits from source patterns
+stored in offscreen video memory.
+.TP 7
+.BI "Option \*qXaaNoScreenToScreenCopy\*q"
+Disables accelerated copies of rectangular regions from one part of
+video memory to another part of video memory.
+.TP 7
+.BI "Option \*qXaaNoSolidBresenhamLine\*q"
+Disables accelerated solid Bresenham line draws.
+.TP 7
+.BI "Option \*qXaaNoSolidFillRect\*q"
+Disables accelerated solid\-color fills of rectangles.
+.TP 7
+.BI "Option \*qXaaNoSolidFillTrap\*q"
+Disables accelerated solid\-color fills of Bresenham trapezoids.
+.TP 7
+.BI "Option \*qXaaNoSolidHorVertLine\*q"
+Disables accelerated solid horizontal and vertical line draws.
+.TP 7
+.BI "Option \*qXaaNoSolidTwoPointLine\*q"
+Disables accelerated solid line draws between two arbitrary points.
+.PP
+Each
+.B Screen
+section may optionally contain one or more
+.B Display
+subsections.
+Those subsections provide depth/fbbpp specific configuration information,
+and the one chosen depends on the depth and/or fbbpp that is being used for
+the screen.
+The
+.B Display
+subsection format is described in the section below.
+
+.SH "DISPLAY SUBSECTION"
+Each
+.B Screen
+section may have multiple
+.B Display
+subsections.
+The \(lqactive\(rq
+.B Display
+subsection is the first that matches the depth and/or fbbpp values being
+used, or failing that, the first that has neither a depth or fbbpp value
+specified.
+The
+.B Display
+subsections are optional.
+When there isn't one that matches the depth and/or fbbpp values being used,
+all the parameters that can be specified here fall back to their defaults.
+.PP
+.B Display
+subsections have the following format:
+.PP
+.RS 4
+.nf
+.B " SubSection \*qDisplay\*q"
+.BI " Depth " depth
+.I " entries"
+.I " ..."
+.B " EndSubSection"
+.fi
+.RE
+.TP 7
+.BI "Depth " depth
+This entry specifies what colour depth the
+.B Display
+subsection is to be used for.
+This entry is usually specified, but it may be omitted to create a match\-all
+.B Display
+subsection or when wishing to match only against the
+.B FbBpp
+parameter.
+The range of
+.I depth
+values that are allowed depends on the driver.
+Most drivers support 8, 15, 16 and 24.
+Some also support 1 and/or 4, and some may support other values (like 30).
+Note:
+.I depth
+means the number of bits in a pixel that are actually used to determine
+the pixel colour.
+32 is not a valid
+.I depth
+value.
+Most hardware that uses 32 bits per pixel only uses 24 of them to hold the
+colour information, which means that the colour depth is 24, not 32.
+.TP 7
+.BI "FbBpp " bpp
+This entry specifies the framebuffer format this
+.B Display
+subsection is to be used for.
+This entry is only needed when providing depth 24 configurations that allow
+a choice between a 24 bpp packed framebuffer format and a 32bpp sparse
+framebuffer format.
+In most cases this entry should not be used.
+.TP 7
+.BI "Weight " "red\-weight green\-weight blue\-weight"
+This optional entry specifies the relative RGB weighting to be used
+for a screen is being used at depth 16 for drivers that allow multiple
+formats.
+This may also be specified from the command line with the
+.B \-weight
+option (see
+.BR __xservername__(__appmansuffix__)).
+.TP 7
+.BI "Virtual " "xdim ydim"
+This optional entry specifies the virtual screen resolution to be used.
+.I xdim
+must be a multiple of either 8 or 16 for most drivers, and a multiple
+of 32 when running in monochrome mode.
+The given value will be rounded down if this is not the case.
+Video modes which are too large for the specified virtual size will be
+rejected.
+If this entry is not present, the virtual screen resolution will be set to
+accommodate all the valid video modes given in the
+.B Modes
+entry.
+Some drivers/hardware combinations do not support virtual screens.
+Refer to the appropriate driver\-specific documentation for details.
+.TP 7
+.BI "ViewPort " "x0 y0"
+This optional entry sets the upper left corner of the initial display.
+This is only relevant when the virtual screen resolution is different
+from the resolution of the initial video mode.
+If this entry is not given, then the initial display will be centered in
+the virtual display area.
+.TP 7
+.BI "Modes \*q" mode\-name \*q " ..."
+This optional entry specifies the list of video modes to use.
+Each
+.I mode\-name
+specified must be in double quotes.
+They must correspond to those specified or referenced in the appropriate
+.B Monitor
+section (including implicitly referenced built\-in VESA standard modes).
+The server will delete modes from this list which don't satisfy various
+requirements.
+The first valid mode in this list will be the default display mode for
+startup.
+The list of valid modes is converted internally into a circular list.
+It is possible to switch to the next mode with
+.B Ctrl+Alt+Keypad\-Plus
+and to the previous mode with
+.BR Ctrl+Alt+Keypad\-Minus .
+When this entry is omitted, the valid modes referenced by the appropriate
+.B Monitor
+section will be used. If the
+.B Monitor
+section contains no modes, then the selection will be taken from the
+built-in VESA standard modes.
+.TP 7
+.BI "Visual \*q" visual\-name \*q
+This optional entry sets the default root visual type.
+This may also be specified from the command line (see the
+.BR Xserver(__appmansuffix__)
+man page).
+The visual types available for depth 8 are (default is
+.BR PseudoColor ):
+.PP
+.RS 11
+.nf
+.B StaticGray
+.B GrayScale
+.B StaticColor
+.B PseudoColor
+.B TrueColor
+.B DirectColor
+.fi
+.RE
+.PP
+.RS 7
+The visual type available for the depths 15, 16 and 24 are (default is
+.BR TrueColor ):
+.PP
+.RS 4
+.nf
+.B TrueColor
+.B DirectColor
+.fi
+.RE
+.PP
+Not all drivers support
+.B DirectColor
+at these depths.
+.PP
+The visual types available for the depth 4 are (default is
+.BR StaticColor ):
+.PP
+.RS 4
+.nf
+.B StaticGray
+.B GrayScale
+.B StaticColor
+.B PseudoColor
+.fi
+.RE
+.PP
+The visual type available for the depth 1 (monochrome) is
+.BR StaticGray .
+.RE
+.TP 7
+.BI "Black " "red green blue"
+This optional entry allows the \(lqblack\(rq colour to be specified.
+This is only supported at depth 1.
+The default is black.
+.TP 7
+.BI "White " "red green blue"
+This optional entry allows the \(lqwhite\(rq colour to be specified.
+This is only supported at depth 1.
+The default is white.
+.TP 7
+.B Options
+Option flags may be specified in the
+.B Display
+subsections.
+These may include driver\-specific options and driver\-independent options.
+The former are described in the driver\-specific documentation.
+Some of the latter are described above in the section about the
+.B Screen
+section, and they may also be included here.
+.SH "SERVERLAYOUT SECTION"
+The config file may have multiple
+.B ServerLayout
+sections.
+A \(lqserver layout\(rq represents the binding of one or more screens
+.RB ( Screen
+sections) and one or more input devices
+.RB ( InputDevice
+sections) to form a complete configuration.
+In multi\-head configurations, it also specifies the relative layout of the
+heads.
+A
+.B ServerLayout
+section is considered \(lqactive\(rq if it is referenced by the
+.B \-layout
+command line option or by an
+.B "Option \*qDefaultServerLayout\*q"
+entry in the
+.B ServerFlags
+section (the former takes precedence over the latter).
+If those options are not used, the first
+.B ServerLayout
+section found in the config file is considered the active one.
+If no
+.B ServerLayout
+sections are present, the single active screen and two active (core)
+input devices are selected as described in the relevant sections above.
+.PP
+.B ServerLayout
+sections have the following format:
+.PP
+.RS 4
+.nf
+.B "Section \*qServerLayout\*q"
+.BI " Identifier \*q" name \*q
+.BI " Screen \*q" screen\-id \*q
+.I " ..."
+.BI " InputDevice \*q" idev\-id \*q
+.I " ..."
+.I " options"
+.I " ..."
+.B "EndSection"
+.fi
+.RE
+.PP
+Each
+.B ServerLayout
+section must have an
+.B Identifier
+entry and at least one
+.B Screen
+entry.
+.PP
+The
+.B Identifier
+entry specifies the unique name for this server layout.
+The
+.B ServerLayout
+section provides information specific to the whole session, including
+session\-specific
+.BR Options .
+The
+.B ServerFlags
+options (described above) may be specified here, and ones given here
+override those given in the
+.B ServerFlags
+section.
+.PP
+The entries that may be used in this section are described here.
+.TP 7
+.BI "Screen " "screen\-num" " \*qscreen\-id\*q " "position\-information"
+One of these entries must be given for each screen being used in
+a session.
+The
+.I screen\-id
+field is mandatory, and specifies the
+.B Screen
+section being referenced.
+The
+.I screen\-num
+field is optional, and may be used to specify the screen number
+in multi\-head configurations.
+When this field is omitted, the screens will be numbered in the order that
+they are listed in.
+The numbering starts from 0, and must be consecutive.
+The
+.I position\-information
+field describes the way multiple screens are positioned.
+There are a number of different ways that this information can be provided:
+.RS 7
+.TP 4
+.I "x y"
+.TP 4
+.BI "Absolute " "x y"
+These both specify that the upper left corner's coordinates are
+.RI ( x , y ).
+The
+.B Absolute
+keyword is optional.
+Some older versions of XFree86 (4.2 and earlier) don't recognise the
+.B Absolute
+keyword, so it's safest to just specify the coordinates without it.
+.TP 4
+.BI "RightOf \*q" screen\-id \*q
+.TP 4
+.BI "LeftOf \*q" screen\-id \*q
+.TP 4
+.BI "Above \*q" screen\-id \*q
+.TP 4
+.BI "Below \*q" screen\-id \*q
+.TP 4
+.BI "Relative \*q" screen\-id \*q " x y"
+These give the screen's location relative to another screen.
+The first four position the screen immediately to the right, left, above or
+below the other screen.
+When positioning to the right or left, the top edges are aligned.
+When positioning above or below, the left edges are aligned.
+The
+.B Relative
+form specifies the offset of the screen's origin (upper left corner)
+relative to the origin of another screen.
+.RE
+.TP 7
+.BI "InputDevice \*q" idev\-id "\*q \*q" option \*q " ..."
+One of these entries should be given for each input device being used in
+a session.
+Normally at least two are required, one each for the core pointer and
+keyboard devices.
+If either of those is missing, suitable
+.B InputDevice
+entries are searched for using the method described above in the
+.B INPUTDEVICE
+section. The
+.I idev\-id
+field is mandatory, and specifies the name of the
+.B InputDevice
+section being referenced.
+Multiple
+.I option
+fields may be specified, each in double quotes.
+The options permitted here are any that may also be given in the
+.B InputDevice
+sections.
+Normally only session\-specific input device options would be used here.
+The most commonly used options are:
+.PP
+.RS 11
+.nf
+.B \*qCorePointer\*q
+.B \*qCoreKeyboard\*q
+.B \*qSendCoreEvents\*q
+.fi
+.RE
+.PP
+.RS 7
+and the first two should normally be used to indicate the core pointer
+and core keyboard devices respectively.
+.RE
+.TP 7
+.B Options
+In addition to the following, any option permitted in the
+.B ServerFlags
+section may also be specified here.
+When the same option appears in both places, the value given here overrides
+the one given in the
+.B ServerFlags
+section.
+.TP 7
+.BI "Option \*qIsolateDevice\*q \*q" bus\-id \*q
+Restrict device resets to the specified
+.IR bus\-id .
+See the
+.B BusID
+option (described in
+.BR "DEVICE SECTION" ,
+above) for the format of the
+.I bus\-id
+parameter.
+This option overrides
+.BR SingleCard ,
+if specified.
+At present, only PCI devices can be isolated in this manner.
+.TP 7
+.BI "Option \*qSingleCard\*q \*q" boolean \*q
+As
+.BR IsolateDevice ,
+except that the bus ID of the first device in the layout is used.
+.PP
+Here is an example of a
+.B ServerLayout
+section for a dual headed configuration with two mice:
+.PP
+.RS 4
+.nf
+.B "Section \*qServerLayout\*q"
+.B " Identifier \*qLayout 1\*q"
+.B " Screen \*qMGA 1\*q"
+.B " Screen \*qMGA 2\*q RightOf \*qMGA 1\*q"
+.B " InputDevice \*qKeyboard 1\*q \*qCoreKeyboard\*q"
+.B " InputDevice \*qMouse 1\*q \*qCorePointer\*q"
+.B " InputDevice \*qMouse 2\*q \*qSendCoreEvents\*q"
+.B " Option \*qBlankTime\*q \*q5\*q"
+.B "EndSection"
+.fi
+.RE
+.SH "DRI SECTION"
+This optional section is used to provide some information for the
+Direct Rendering Infrastructure.
+Details about the format of this section can be found on-line at
+.IR <http://dri.freedesktop.org/> .
+.SH "VENDOR SECTION"
+The optional
+.B Vendor
+section may be used to provide vendor\-specific configuration information.
+Multiple
+.B Vendor
+sections may be present, and they may contain an
+.B Identifier
+entry and multiple
+.B Option
+flags.
+The data therein is not used in this release.
+.PP
+.SH "SEE ALSO"
+General:
+.BR X (__miscmansuffix__),
+.BR Xserver (__appmansuffix__),
+.BR __xservername__ (__appmansuffix__),
+.BR cvt (__appmansuffix__),
+.BR gtf (__appmansuffix__).
+.PP
+.B "Not all modules or interfaces are available on all platforms."
+.PP
+Display drivers:
+.BR apm (__drivermansuffix__),
+.BR ati (__drivermansuffix__),
+.BR chips (__drivermansuffix__),
+.BR cirrus (__drivermansuffix__),
+.BR cyrix (__drivermansuffix__),
+.BR fbdev (__drivermansuffix__),
+.BR glide (__drivermansuffix__),
+.BR glint (__drivermansuffix__),
+.BR i128 (__drivermansuffix__),
+.BR i740 (__drivermansuffix__),
+.BR imstt (__drivermansuffix__),
+.BR intel (__drivermansuffix__),
+.BR mga (__drivermansuffix__),
+.BR neomagic (__drivermansuffix__),
+.BR nv (__drivermansuffix__),
+.BR openchrome (__drivermansuffix__),
+.BR r128 (__drivermansuffix__),
+.BR radeon (__drivermansuffix__),
+.BR rendition (__drivermansuffix__),
+.BR savage (__drivermansuffix__),
+.BR s3virge (__drivermansuffix__),
+.BR siliconmotion (__drivermansuffix__),
+.BR sis (__drivermansuffix__),
+.BR sisusb (__drivermansuffix__),
+.BR sunbw2 (__drivermansuffix__),
+.BR suncg14 (__drivermansuffix__),
+.BR suncg3 (__drivermansuffix__),
+.BR suncg6 (__drivermansuffix__),
+.BR sunffb (__drivermansuffix__),
+.BR sunleo (__drivermansuffix__),
+.BR suntcx (__drivermansuffix__),
+.BR tdfx (__drivermansuffix__),
+.\" .BR tga (__drivermansuffix__),
+.BR trident (__drivermansuffix__),
+.BR tseng (__drivermansuffix__),
+.BR vesa (__drivermansuffix__),
+.BR vmware (__drivermansuffix__),
+.BR voodoo (__drivermansuffix__),
+.BR wsfb (__drivermansuffix__),
+.BR xgi (__drivermansuffix__),
+.BR xgixp (__drivermansuffix__).
+.PP
+Input drivers:
+.BR acecad (__drivermansuffix__),
+.BR citron (__drivermansuffix__),
+.BR elographics (__drivermansuffix__),
+.BR evdev (__drivermansuffix__),
+.BR fpit (__drivermansuffix__),
+.BR joystick (__drivermansuffix__),
+.BR kbd (__drivermansuffix__),
+.BR mousedrv (__drivermansuffix__),
+.BR mutouch (__drivermansuffix__),
+.BR penmount (__drivermansuffix__),
+.BR synaptics (__drivermansuffix__),
+.BR vmmouse (__drivermansuffix__),
+.BR void (__drivermansuffix__),
+.BR wacom (__drivermansuffix__).
+.PP
+Other modules and interfaces:
+.BR exa (__drivermansuffix__),
+.BR fbdevhw (__drivermansuffix__),
+.\" .BR shadowfb (__drivermansuffix__),
+.BR v4l (__drivermansuffix__).
+.br
+.SH AUTHORS
+This manual page was largely rewritten by David Dawes
+.IR <dawes@xfree86.org> .
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.h b/xorg-server/hw/xfree86/modes/xf86Crtc.h
index 68a968cc2..5dfcec280 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.h
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.h
@@ -1,972 +1,972 @@
-/*
- * Copyright © 2006 Keith Packard
- *
- * 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, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-#ifndef _XF86CRTC_H_
-#define _XF86CRTC_H_
-
-#include <edid.h>
-#include "randrstr.h"
-#if XF86_MODES_RENAME
-#include "xf86Rename.h"
-#endif
-#include "xf86Modes.h"
-#include "xf86Cursor.h"
-#include "xf86i2c.h"
-#include "damage.h"
-#include "picturestr.h"
-
-/* Compat definitions for older X Servers. */
-#ifndef M_T_PREFERRED
-#define M_T_PREFERRED 0x08
-#endif
-#ifndef M_T_DRIVER
-#define M_T_DRIVER 0x40
-#endif
-#ifndef M_T_USERPREF
-#define M_T_USERPREF 0x80
-#endif
-#ifndef HARDWARE_CURSOR_ARGB
-#define HARDWARE_CURSOR_ARGB 0x00004000
-#endif
-
-typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr;
-typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr;
-
-/* define a standard for connector types */
-typedef enum _xf86ConnectorType {
- XF86ConnectorNone,
- XF86ConnectorVGA,
- XF86ConnectorDVI_I,
- XF86ConnectorDVI_D,
- XF86ConnectorDVI_A,
- XF86ConnectorComposite,
- XF86ConnectorSvideo,
- XF86ConnectorComponent,
- XF86ConnectorLFP,
- XF86ConnectorProprietary,
- XF86ConnectorHDMI,
- XF86ConnectorDisplayPort,
-} xf86ConnectorType;
-
-typedef enum _xf86OutputStatus {
- XF86OutputStatusConnected,
- XF86OutputStatusDisconnected,
- XF86OutputStatusUnknown
-} xf86OutputStatus;
-
-typedef struct _xf86CrtcFuncs {
- /**
- * Turns the crtc on/off, or sets intermediate power levels if available.
- *
- * Unsupported intermediate modes drop to the lower power setting. If the
- * mode is DPMSModeOff, the crtc must be disabled sufficiently for it to
- * be safe to call mode_set.
- */
- void
- (*dpms)(xf86CrtcPtr crtc,
- int mode);
-
- /**
- * Saves the crtc's state for restoration on VT switch.
- */
- void
- (*save)(xf86CrtcPtr crtc);
-
- /**
- * Restore's the crtc's state at VT switch.
- */
- void
- (*restore)(xf86CrtcPtr crtc);
-
- /**
- * Lock CRTC prior to mode setting, mostly for DRI.
- * Returns whether unlock is needed
- */
- Bool
- (*lock) (xf86CrtcPtr crtc);
-
- /**
- * Unlock CRTC after mode setting, mostly for DRI
- */
- void
- (*unlock) (xf86CrtcPtr crtc);
-
- /**
- * Callback to adjust the mode to be set in the CRTC.
- *
- * This allows a CRTC to adjust the clock or even the entire set of
- * timings, which is used for panels with fixed timings or for
- * buses with clock limitations.
- */
- Bool
- (*mode_fixup)(xf86CrtcPtr crtc,
- DisplayModePtr mode,
- DisplayModePtr adjusted_mode);
-
- /**
- * Prepare CRTC for an upcoming mode set.
- */
- void
- (*prepare)(xf86CrtcPtr crtc);
-
- /**
- * Callback for setting up a video mode after fixups have been made.
- */
- void
- (*mode_set)(xf86CrtcPtr crtc,
- DisplayModePtr mode,
- DisplayModePtr adjusted_mode,
- int x, int y);
-
- /**
- * Commit mode changes to a CRTC
- */
- void
- (*commit)(xf86CrtcPtr crtc);
-
- /* Set the color ramps for the CRTC to the given values. */
- void
- (*gamma_set)(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
- int size);
-
- /**
- * Allocate the shadow area, delay the pixmap creation until needed
- */
- void *
- (*shadow_allocate) (xf86CrtcPtr crtc, int width, int height);
-
- /**
- * Create shadow pixmap for rotation support
- */
- PixmapPtr
- (*shadow_create) (xf86CrtcPtr crtc, void *data, int width, int height);
-
- /**
- * Destroy shadow pixmap
- */
- void
- (*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data);
-
- /**
- * Set cursor colors
- */
- void
- (*set_cursor_colors) (xf86CrtcPtr crtc, int bg, int fg);
-
- /**
- * Set cursor position
- */
- void
- (*set_cursor_position) (xf86CrtcPtr crtc, int x, int y);
-
- /**
- * Show cursor
- */
- void
- (*show_cursor) (xf86CrtcPtr crtc);
-
- /**
- * Hide cursor
- */
- void
- (*hide_cursor) (xf86CrtcPtr crtc);
-
- /**
- * Load monochrome image
- */
- void
- (*load_cursor_image) (xf86CrtcPtr crtc, CARD8 *image);
-
- /**
- * Load ARGB image
- */
- void
- (*load_cursor_argb) (xf86CrtcPtr crtc, CARD32 *image);
-
- /**
- * Clean up driver-specific bits of the crtc
- */
- void
- (*destroy) (xf86CrtcPtr crtc);
-
- /**
- * Less fine-grained mode setting entry point for kernel modesetting
- */
- Bool
- (*set_mode_major)(xf86CrtcPtr crtc, DisplayModePtr mode,
- Rotation rotation, int x, int y);
-
- /**
- * Callback for panning. Doesn't change the mode.
- * Added in ABI version 2
- */
- void
- (*set_origin)(xf86CrtcPtr crtc, int x, int y);
-
-} xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
-
-#define XF86_CRTC_VERSION 3
-
-struct _xf86Crtc {
- /**
- * ABI versioning
- */
- int version;
-
- /**
- * Associated ScrnInfo
- */
- ScrnInfoPtr scrn;
-
- /**
- * Desired state of this CRTC
- *
- * Set when this CRTC should be driving one or more outputs
- */
- Bool enabled;
-
- /**
- * Active mode
- *
- * This reflects the mode as set in the CRTC currently
- * It will be cleared when the VT is not active or
- * during server startup
- */
- DisplayModeRec mode;
- Rotation rotation;
- PixmapPtr rotatedPixmap;
- void *rotatedData;
-
- /**
- * Position on screen
- *
- * Locates this CRTC within the frame buffer
- */
- int x, y;
-
- /**
- * Desired mode
- *
- * This is set to the requested mode, independent of
- * whether the VT is active. In particular, it receives
- * the startup configured mode and saves the active mode
- * on VT switch.
- */
- DisplayModeRec desiredMode;
- Rotation desiredRotation;
- int desiredX, desiredY;
-
- /** crtc-specific functions */
- const xf86CrtcFuncsRec *funcs;
-
- /**
- * Driver private
- *
- * Holds driver-private information
- */
- void *driver_private;
-
-#ifdef RANDR_12_INTERFACE
- /**
- * RandR crtc
- *
- * When RandR 1.2 is available, this
- * points at the associated crtc object
- */
- RRCrtcPtr randr_crtc;
-#else
- void *randr_crtc;
-#endif
-
- /**
- * Current cursor is ARGB
- */
- Bool cursor_argb;
- /**
- * Track whether cursor is within CRTC range
- */
- Bool cursor_in_range;
- /**
- * Track state of cursor associated with this CRTC
- */
- Bool cursor_shown;
-
- /**
- * Current transformation matrix
- */
- PictTransform crtc_to_framebuffer;
- /* framebuffer_to_crtc was removed in ABI 2 */
- struct pict_f_transform f_crtc_to_framebuffer; /* ABI 2 */
- struct pict_f_transform f_framebuffer_to_crtc; /* ABI 2 */
- PictFilterPtr filter; /* ABI 2 */
- xFixed *params; /* ABI 2 */
- int nparams; /* ABI 2 */
- int filter_width; /* ABI 2 */
- int filter_height; /* ABI 2 */
- Bool transform_in_use;
- RRTransformRec transform; /* ABI 2 */
- Bool transformPresent; /* ABI 2 */
- RRTransformRec desiredTransform; /* ABI 2 */
- Bool desiredTransformPresent; /* ABI 2 */
- /**
- * Bounding box in screen space
- */
- BoxRec bounds;
- /**
- * Panning:
- * TotalArea: total panning area, larger than CRTC's size
- * TrackingArea: Area of the pointer for which the CRTC is panned
- * border: Borders of the displayed CRTC area which induces panning if the pointer reaches them
- * Added in ABI version 2
- */
- BoxRec panningTotalArea;
- BoxRec panningTrackingArea;
- INT16 panningBorder[4];
-
- /**
- * Current gamma, especially useful after initial config.
- * Added in ABI version 3
- */
- CARD16 *gamma_red;
- CARD16 *gamma_green;
- CARD16 *gamma_blue;
- int gamma_size;
-
- /**
- * Actual state of this CRTC
- *
- * Set to TRUE after modesetting, set to FALSE if no outputs are connected
- * Added in ABI version 3
- */
- Bool active;
- /**
- * Clear the shadow
- */
- Bool shadowClear;
-};
-
-typedef struct _xf86OutputFuncs {
- /**
- * Called to allow the output a chance to create properties after the
- * RandR objects have been created.
- */
- void
- (*create_resources)(xf86OutputPtr output);
-
- /**
- * Turns the output on/off, or sets intermediate power levels if available.
- *
- * Unsupported intermediate modes drop to the lower power setting. If the
- * mode is DPMSModeOff, the output must be disabled, as the DPLL may be
- * disabled afterwards.
- */
- void
- (*dpms)(xf86OutputPtr output,
- int mode);
-
- /**
- * Saves the output's state for restoration on VT switch.
- */
- void
- (*save)(xf86OutputPtr output);
-
- /**
- * Restore's the output's state at VT switch.
- */
- void
- (*restore)(xf86OutputPtr output);
-
- /**
- * Callback for testing a video mode for a given output.
- *
- * This function should only check for cases where a mode can't be supported
- * on the output specifically, and not represent generic CRTC limitations.
- *
- * \return MODE_OK if the mode is valid, or another MODE_* otherwise.
- */
- int
- (*mode_valid)(xf86OutputPtr output,
- DisplayModePtr pMode);
-
- /**
- * Callback to adjust the mode to be set in the CRTC.
- *
- * This allows an output to adjust the clock or even the entire set of
- * timings, which is used for panels with fixed timings or for
- * buses with clock limitations.
- */
- Bool
- (*mode_fixup)(xf86OutputPtr output,
- DisplayModePtr mode,
- DisplayModePtr adjusted_mode);
-
- /**
- * Callback for preparing mode changes on an output
- */
- void
- (*prepare)(xf86OutputPtr output);
-
- /**
- * Callback for committing mode changes on an output
- */
- void
- (*commit)(xf86OutputPtr output);
-
- /**
- * Callback for setting up a video mode after fixups have been made.
- *
- * This is only called while the output is disabled. The dpms callback
- * must be all that's necessary for the output, to turn the output on
- * after this function is called.
- */
- void
- (*mode_set)(xf86OutputPtr output,
- DisplayModePtr mode,
- DisplayModePtr adjusted_mode);
-
- /**
- * Probe for a connected output, and return detect_status.
- */
- xf86OutputStatus
- (*detect)(xf86OutputPtr output);
-
- /**
- * Query the device for the modes it provides.
- *
- * This function may also update MonInfo, mm_width, and mm_height.
- *
- * \return singly-linked list of modes or NULL if no modes found.
- */
- DisplayModePtr
- (*get_modes)(xf86OutputPtr output);
-
-#ifdef RANDR_12_INTERFACE
- /**
- * Callback when an output's property has changed.
- */
- Bool
- (*set_property)(xf86OutputPtr output,
- Atom property,
- RRPropertyValuePtr value);
-#endif
-#ifdef RANDR_13_INTERFACE
- /**
- * Callback to get an updated property value
- */
- Bool
- (*get_property)(xf86OutputPtr output,
- Atom property);
-#endif
-#ifdef RANDR_GET_CRTC_INTERFACE
- /**
- * Callback to get current CRTC for a given output
- */
- xf86CrtcPtr
- (*get_crtc)(xf86OutputPtr output);
-#endif
- /**
- * Clean up driver-specific bits of the output
- */
- void
- (*destroy) (xf86OutputPtr output);
-} xf86OutputFuncsRec, *xf86OutputFuncsPtr;
-
-
-#define XF86_OUTPUT_VERSION 2
-
-struct _xf86Output {
- /**
- * ABI versioning
- */
- int version;
-
- /**
- * Associated ScrnInfo
- */
- ScrnInfoPtr scrn;
-
- /**
- * Currently connected crtc (if any)
- *
- * If this output is not in use, this field will be NULL.
- */
- xf86CrtcPtr crtc;
-
- /**
- * Possible CRTCs for this output as a mask of crtc indices
- */
- CARD32 possible_crtcs;
-
- /**
- * Possible outputs to share the same CRTC as a mask of output indices
- */
- CARD32 possible_clones;
-
- /**
- * Whether this output can support interlaced modes
- */
- Bool interlaceAllowed;
-
- /**
- * Whether this output can support double scan modes
- */
- Bool doubleScanAllowed;
-
- /**
- * List of available modes on this output.
- *
- * This should be the list from get_modes(), plus perhaps additional
- * compatible modes added later.
- */
- DisplayModePtr probed_modes;
-
- /**
- * Options parsed from the related monitor section
- */
- OptionInfoPtr options;
-
- /**
- * Configured monitor section
- */
- XF86ConfMonitorPtr conf_monitor;
-
- /**
- * Desired initial position
- */
- int initial_x, initial_y;
-
- /**
- * Desired initial rotation
- */
- Rotation initial_rotation;
-
- /**
- * Current connection status
- *
- * This indicates whether a monitor is known to be connected
- * to this output or not, or whether there is no way to tell
- */
- xf86OutputStatus status;
-
- /** EDID monitor information */
- xf86MonPtr MonInfo;
-
- /** subpixel order */
- int subpixel_order;
-
- /** Physical size of the currently attached output device. */
- int mm_width, mm_height;
-
- /** Output name */
- char *name;
-
- /** output-specific functions */
- const xf86OutputFuncsRec *funcs;
-
- /** driver private information */
- void *driver_private;
-
- /** Whether to use the old per-screen Monitor config section */
- Bool use_screen_monitor;
-
-#ifdef RANDR_12_INTERFACE
- /**
- * RandR 1.2 output structure.
- *
- * When RandR 1.2 is available, this points at the associated
- * RandR output structure and is created when this output is created
- */
- RROutputPtr randr_output;
-#else
- void *randr_output;
-#endif
- /**
- * Desired initial panning
- * Added in ABI version 2
- */
- BoxRec initialTotalArea;
- BoxRec initialTrackingArea;
- INT16 initialBorder[4];
-};
-
-typedef struct _xf86CrtcConfigFuncs {
- /**
- * Requests that the driver resize the screen.
- *
- * The driver is responsible for updating scrn->virtualX and scrn->virtualY.
- * If the requested size cannot be set, the driver should leave those values
- * alone and return FALSE.
- *
- * A naive driver that cannot reallocate the screen may simply change
- * virtual[XY]. A more advanced driver will want to also change the
- * devPrivate.ptr and devKind of the screen pixmap, update any offscreen
- * pixmaps it may have moved, and change pScrn->displayWidth.
- */
- Bool
- (*resize)(ScrnInfoPtr scrn,
- int width,
- int height);
-} xf86CrtcConfigFuncsRec, *xf86CrtcConfigFuncsPtr;
-
-typedef void (*xf86_crtc_notify_proc_ptr) (ScreenPtr pScreen);
-
-typedef struct _xf86CrtcConfig {
- int num_output;
- xf86OutputPtr *output;
- /**
- * compat_output is used whenever we deal
- * with legacy code that only understands a single
- * output. pScrn->modes will be loaded from this output,
- * adjust frame will whack this output, etc.
- */
- int compat_output;
-
- int num_crtc;
- xf86CrtcPtr *crtc;
-
- int minWidth, minHeight;
- int maxWidth, maxHeight;
-
- /* For crtc-based rotation */
- DamagePtr rotation_damage;
- Bool rotation_damage_registered;
-
- /* DGA */
- unsigned int dga_flags;
- unsigned long dga_address;
- DGAModePtr dga_modes;
- int dga_nmode;
- int dga_width, dga_height, dga_stride;
- DisplayModePtr dga_save_mode;
-
- const xf86CrtcConfigFuncsRec *funcs;
-
- CreateScreenResourcesProcPtr CreateScreenResources;
-
- CloseScreenProcPtr CloseScreen;
-
- /* Cursor information */
- xf86CursorInfoPtr cursor_info;
- CursorPtr cursor;
- CARD8 *cursor_image;
- Bool cursor_on;
- CARD32 cursor_fg, cursor_bg;
-
- /**
- * Options parsed from the related device section
- */
- OptionInfoPtr options;
-
- Bool debug_modes;
-
- /* wrap screen BlockHandler for rotation */
- ScreenBlockHandlerProcPtr BlockHandler;
-
- /* callback when crtc configuration changes */
- xf86_crtc_notify_proc_ptr xf86_crtc_notify;
-
-} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
-
-extern _X_EXPORT int xf86CrtcConfigPrivateIndex;
-
-#define XF86_CRTC_CONFIG_PTR(p) ((xf86CrtcConfigPtr) ((p)->privates[xf86CrtcConfigPrivateIndex].ptr))
-
-static _X_INLINE xf86OutputPtr
-xf86CompatOutput(ScrnInfoPtr pScrn)
-{
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- return config->output[config->compat_output];
-}
-
-static _X_INLINE xf86CrtcPtr
-xf86CompatCrtc(ScrnInfoPtr pScrn)
-{
- xf86OutputPtr compat_output = xf86CompatOutput(pScrn);
- if (!compat_output)
- return NULL;
- return compat_output->crtc;
-}
-
-static _X_INLINE RRCrtcPtr
-xf86CompatRRCrtc(ScrnInfoPtr pScrn)
-{
- xf86CrtcPtr compat_crtc = xf86CompatCrtc(pScrn);
- if (!compat_crtc)
- return NULL;
- return compat_crtc->randr_crtc;
-}
-
-
-/*
- * Initialize xf86CrtcConfig structure
- */
-
-extern _X_EXPORT void
-xf86CrtcConfigInit (ScrnInfoPtr scrn,
- const xf86CrtcConfigFuncsRec *funcs);
-
-extern _X_EXPORT void
-xf86CrtcSetSizeRange (ScrnInfoPtr scrn,
- int minWidth, int minHeight,
- int maxWidth, int maxHeight);
-
-/*
- * Crtc functions
- */
-extern _X_EXPORT xf86CrtcPtr
-xf86CrtcCreate (ScrnInfoPtr scrn,
- const xf86CrtcFuncsRec *funcs);
-
-extern _X_EXPORT void
-xf86CrtcDestroy (xf86CrtcPtr crtc);
-
-
-/**
- * Sets the given video mode on the given crtc
- */
-
-extern _X_EXPORT Bool
-xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
- RRTransformPtr transform, int x, int y);
-
-extern _X_EXPORT Bool
-xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
- int x, int y);
-
-extern _X_EXPORT void
-xf86CrtcSetOrigin (xf86CrtcPtr crtc, int x, int y);
-
-/*
- * Assign crtc rotation during mode set
- */
-extern _X_EXPORT Bool
-xf86CrtcRotate (xf86CrtcPtr crtc);
-
-/*
- * Clean up any rotation data, used when a crtc is turned off
- * as well as when rotation is disabled.
- */
-extern _X_EXPORT void
-xf86RotateDestroy (xf86CrtcPtr crtc);
-
-/*
- * free shadow memory allocated for all crtcs
- */
-extern _X_EXPORT void
-xf86RotateFreeShadow(ScrnInfoPtr pScrn);
-
-/*
- * Clean up rotation during CloseScreen
- */
-extern _X_EXPORT void
-xf86RotateCloseScreen (ScreenPtr pScreen);
-
-/**
- * Return whether any output is assigned to the crtc
- */
-extern _X_EXPORT Bool
-xf86CrtcInUse (xf86CrtcPtr crtc);
-
-/*
- * Output functions
- */
-extern _X_EXPORT xf86OutputPtr
-xf86OutputCreate (ScrnInfoPtr scrn,
- const xf86OutputFuncsRec *funcs,
- const char *name);
-
-extern _X_EXPORT void
-xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor);
-
-extern _X_EXPORT Bool
-xf86OutputRename (xf86OutputPtr output, const char *name);
-
-extern _X_EXPORT void
-xf86OutputDestroy (xf86OutputPtr output);
-
-extern _X_EXPORT void
-xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY);
-
-extern _X_EXPORT void
-xf86SetScrnInfoModes (ScrnInfoPtr pScrn);
-
-#ifdef RANDR_13_INTERFACE
-# define ScreenInitRetType int
-#else
-# define ScreenInitRetType Bool
-#endif
-
-extern _X_EXPORT ScreenInitRetType
-xf86CrtcScreenInit (ScreenPtr pScreen);
-
-extern _X_EXPORT Bool
-xf86InitialConfiguration (ScrnInfoPtr pScrn, Bool canGrow);
-
-extern _X_EXPORT void
-xf86DPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags);
-
-extern _X_EXPORT Bool
-xf86SaveScreen(ScreenPtr pScreen, int mode);
-
-extern _X_EXPORT void
-xf86DisableUnusedFunctions(ScrnInfoPtr pScrn);
-
-extern _X_EXPORT DisplayModePtr
-xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired);
-
-extern _X_EXPORT Bool
-xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation);
-
-/**
- * Set the EDID information for the specified output
- */
-extern _X_EXPORT void
-xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon);
-
-/**
- * Return the list of modes supported by the EDID information
- * stored in 'output'
- */
-extern _X_EXPORT DisplayModePtr
-xf86OutputGetEDIDModes (xf86OutputPtr output);
-
-extern _X_EXPORT xf86MonPtr
-xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus);
-
-/**
- * Initialize dga for this screen
- */
-
-#ifdef XFreeXDGA
-extern _X_EXPORT Bool
-xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address);
-
-/* this is the real function, used only internally */
-_X_INTERNAL Bool
-_xf86_di_dga_init_internal (ScreenPtr pScreen);
-
-/**
- * Re-initialize dga for this screen (as when the set of modes changes)
- */
-
-extern _X_EXPORT Bool
-xf86DiDGAReInit (ScreenPtr pScreen);
-#endif
-
-/* This is the real function, used only internally */
-_X_INTERNAL Bool
-_xf86_di_dga_reinit_internal (ScreenPtr pScreen);
-
-/*
- * Set the subpixel order reported for the screen using
- * the information from the outputs
- */
-
-extern _X_EXPORT void
-xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen);
-
-/*
- * Get a standard string name for a connector type
- */
-extern _X_EXPORT char *
-xf86ConnectorGetName(xf86ConnectorType connector);
-
-/*
- * Using the desired mode information in each crtc, set
- * modes (used in EnterVT functions, or at server startup)
- */
-
-extern _X_EXPORT Bool
-xf86SetDesiredModes (ScrnInfoPtr pScrn);
-
-/**
- * Initialize the CRTC-based cursor code. CRTC function vectors must
- * contain relevant cursor setting functions.
- *
- * Driver should call this from ScreenInit function
- */
-extern _X_EXPORT Bool
-xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags);
-
-/**
- * Called when anything on the screen is reconfigured.
- *
- * Reloads cursor images as needed, then adjusts cursor positions.
- *
- * Driver should call this from crtc commit function.
- */
-extern _X_EXPORT void
-xf86_reload_cursors (ScreenPtr screen);
-
-/**
- * Called from EnterVT to turn the cursors back on
- */
-extern _X_EXPORT void
-xf86_show_cursors (ScrnInfoPtr scrn);
-
-/**
- * Called by the driver to turn cursors off
- */
-extern _X_EXPORT void
-xf86_hide_cursors (ScrnInfoPtr scrn);
-
-/**
- * Clean up CRTC-based cursor code. Driver must call this at CloseScreen time.
- */
-extern _X_EXPORT void
-xf86_cursors_fini (ScreenPtr screen);
-
-/*
- * For overlay video, compute the relevant CRTC and
- * clip video to that.
- * wraps xf86XVClipVideoHelper()
- */
-
-extern _X_EXPORT Bool
-xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn,
- xf86CrtcPtr *crtc_ret,
- xf86CrtcPtr desired_crtc,
- BoxPtr dst,
- INT32 *xa,
- INT32 *xb,
- INT32 *ya,
- INT32 *yb,
- RegionPtr reg,
- INT32 width,
- INT32 height);
-
-extern _X_EXPORT xf86_crtc_notify_proc_ptr
-xf86_wrap_crtc_notify (ScreenPtr pScreen, xf86_crtc_notify_proc_ptr new);
-
-extern _X_EXPORT void
-xf86_unwrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr old);
-
-extern _X_EXPORT void
-xf86_crtc_notify(ScreenPtr pScreen);
-
-/**
- * Gamma
- */
-
-extern _X_EXPORT Bool
-xf86_crtc_supports_gamma(ScrnInfoPtr pScrn);
-
-#endif /* _XF86CRTC_H_ */
+/*
+ * Copyright © 2006 Keith Packard
+ *
+ * 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, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+#ifndef _XF86CRTC_H_
+#define _XF86CRTC_H_
+
+#include <edid.h>
+#include "randrstr.h"
+#if XF86_MODES_RENAME
+#include "xf86Rename.h"
+#endif
+#include "xf86Modes.h"
+#include "xf86Cursor.h"
+#include "xf86i2c.h"
+#include "damage.h"
+#include "picturestr.h"
+
+/* Compat definitions for older X Servers. */
+#ifndef M_T_PREFERRED
+#define M_T_PREFERRED 0x08
+#endif
+#ifndef M_T_DRIVER
+#define M_T_DRIVER 0x40
+#endif
+#ifndef M_T_USERPREF
+#define M_T_USERPREF 0x80
+#endif
+#ifndef HARDWARE_CURSOR_ARGB
+#define HARDWARE_CURSOR_ARGB 0x00004000
+#endif
+
+typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr;
+typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr;
+
+/* define a standard for connector types */
+typedef enum _xf86ConnectorType {
+ XF86ConnectorNone,
+ XF86ConnectorVGA,
+ XF86ConnectorDVI_I,
+ XF86ConnectorDVI_D,
+ XF86ConnectorDVI_A,
+ XF86ConnectorComposite,
+ XF86ConnectorSvideo,
+ XF86ConnectorComponent,
+ XF86ConnectorLFP,
+ XF86ConnectorProprietary,
+ XF86ConnectorHDMI,
+ XF86ConnectorDisplayPort,
+} xf86ConnectorType;
+
+typedef enum _xf86OutputStatus {
+ XF86OutputStatusConnected,
+ XF86OutputStatusDisconnected,
+ XF86OutputStatusUnknown
+} xf86OutputStatus;
+
+typedef struct _xf86CrtcFuncs {
+ /**
+ * Turns the crtc on/off, or sets intermediate power levels if available.
+ *
+ * Unsupported intermediate modes drop to the lower power setting. If the
+ * mode is DPMSModeOff, the crtc must be disabled sufficiently for it to
+ * be safe to call mode_set.
+ */
+ void
+ (*dpms)(xf86CrtcPtr crtc,
+ int mode);
+
+ /**
+ * Saves the crtc's state for restoration on VT switch.
+ */
+ void
+ (*save)(xf86CrtcPtr crtc);
+
+ /**
+ * Restore's the crtc's state at VT switch.
+ */
+ void
+ (*restore)(xf86CrtcPtr crtc);
+
+ /**
+ * Lock CRTC prior to mode setting, mostly for DRI.
+ * Returns whether unlock is needed
+ */
+ Bool
+ (*lock) (xf86CrtcPtr crtc);
+
+ /**
+ * Unlock CRTC after mode setting, mostly for DRI
+ */
+ void
+ (*unlock) (xf86CrtcPtr crtc);
+
+ /**
+ * Callback to adjust the mode to be set in the CRTC.
+ *
+ * This allows a CRTC to adjust the clock or even the entire set of
+ * timings, which is used for panels with fixed timings or for
+ * buses with clock limitations.
+ */
+ Bool
+ (*mode_fixup)(xf86CrtcPtr crtc,
+ DisplayModePtr mode,
+ DisplayModePtr adjusted_mode);
+
+ /**
+ * Prepare CRTC for an upcoming mode set.
+ */
+ void
+ (*prepare)(xf86CrtcPtr crtc);
+
+ /**
+ * Callback for setting up a video mode after fixups have been made.
+ */
+ void
+ (*mode_set)(xf86CrtcPtr crtc,
+ DisplayModePtr mode,
+ DisplayModePtr adjusted_mode,
+ int x, int y);
+
+ /**
+ * Commit mode changes to a CRTC
+ */
+ void
+ (*commit)(xf86CrtcPtr crtc);
+
+ /* Set the color ramps for the CRTC to the given values. */
+ void
+ (*gamma_set)(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
+ int size);
+
+ /**
+ * Allocate the shadow area, delay the pixmap creation until needed
+ */
+ void *
+ (*shadow_allocate) (xf86CrtcPtr crtc, int width, int height);
+
+ /**
+ * Create shadow pixmap for rotation support
+ */
+ PixmapPtr
+ (*shadow_create) (xf86CrtcPtr crtc, void *data, int width, int height);
+
+ /**
+ * Destroy shadow pixmap
+ */
+ void
+ (*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data);
+
+ /**
+ * Set cursor colors
+ */
+ void
+ (*set_cursor_colors) (xf86CrtcPtr crtc, int bg, int fg);
+
+ /**
+ * Set cursor position
+ */
+ void
+ (*set_cursor_position) (xf86CrtcPtr crtc, int x, int y);
+
+ /**
+ * Show cursor
+ */
+ void
+ (*show_cursor) (xf86CrtcPtr crtc);
+
+ /**
+ * Hide cursor
+ */
+ void
+ (*hide_cursor) (xf86CrtcPtr crtc);
+
+ /**
+ * Load monochrome image
+ */
+ void
+ (*load_cursor_image) (xf86CrtcPtr crtc, CARD8 *image);
+
+ /**
+ * Load ARGB image
+ */
+ void
+ (*load_cursor_argb) (xf86CrtcPtr crtc, CARD32 *image);
+
+ /**
+ * Clean up driver-specific bits of the crtc
+ */
+ void
+ (*destroy) (xf86CrtcPtr crtc);
+
+ /**
+ * Less fine-grained mode setting entry point for kernel modesetting
+ */
+ Bool
+ (*set_mode_major)(xf86CrtcPtr crtc, DisplayModePtr mode,
+ Rotation rotation, int x, int y);
+
+ /**
+ * Callback for panning. Doesn't change the mode.
+ * Added in ABI version 2
+ */
+ void
+ (*set_origin)(xf86CrtcPtr crtc, int x, int y);
+
+} xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
+
+#define XF86_CRTC_VERSION 3
+
+struct _xf86Crtc {
+ /**
+ * ABI versioning
+ */
+ int version;
+
+ /**
+ * Associated ScrnInfo
+ */
+ ScrnInfoPtr scrn;
+
+ /**
+ * Desired state of this CRTC
+ *
+ * Set when this CRTC should be driving one or more outputs
+ */
+ Bool enabled;
+
+ /**
+ * Active mode
+ *
+ * This reflects the mode as set in the CRTC currently
+ * It will be cleared when the VT is not active or
+ * during server startup
+ */
+ DisplayModeRec mode;
+ Rotation rotation;
+ PixmapPtr rotatedPixmap;
+ void *rotatedData;
+
+ /**
+ * Position on screen
+ *
+ * Locates this CRTC within the frame buffer
+ */
+ int x, y;
+
+ /**
+ * Desired mode
+ *
+ * This is set to the requested mode, independent of
+ * whether the VT is active. In particular, it receives
+ * the startup configured mode and saves the active mode
+ * on VT switch.
+ */
+ DisplayModeRec desiredMode;
+ Rotation desiredRotation;
+ int desiredX, desiredY;
+
+ /** crtc-specific functions */
+ const xf86CrtcFuncsRec *funcs;
+
+ /**
+ * Driver private
+ *
+ * Holds driver-private information
+ */
+ void *driver_private;
+
+#ifdef RANDR_12_INTERFACE
+ /**
+ * RandR crtc
+ *
+ * When RandR 1.2 is available, this
+ * points at the associated crtc object
+ */
+ RRCrtcPtr randr_crtc;
+#else
+ void *randr_crtc;
+#endif
+
+ /**
+ * Current cursor is ARGB
+ */
+ Bool cursor_argb;
+ /**
+ * Track whether cursor is within CRTC range
+ */
+ Bool cursor_in_range;
+ /**
+ * Track state of cursor associated with this CRTC
+ */
+ Bool cursor_shown;
+
+ /**
+ * Current transformation matrix
+ */
+ PictTransform crtc_to_framebuffer;
+ /* framebuffer_to_crtc was removed in ABI 2 */
+ struct pict_f_transform f_crtc_to_framebuffer; /* ABI 2 */
+ struct pict_f_transform f_framebuffer_to_crtc; /* ABI 2 */
+ PictFilterPtr filter; /* ABI 2 */
+ xFixed *params; /* ABI 2 */
+ int nparams; /* ABI 2 */
+ int filter_width; /* ABI 2 */
+ int filter_height; /* ABI 2 */
+ Bool transform_in_use;
+ RRTransformRec transform; /* ABI 2 */
+ Bool transformPresent; /* ABI 2 */
+ RRTransformRec desiredTransform; /* ABI 2 */
+ Bool desiredTransformPresent; /* ABI 2 */
+ /**
+ * Bounding box in screen space
+ */
+ BoxRec bounds;
+ /**
+ * Panning:
+ * TotalArea: total panning area, larger than CRTC's size
+ * TrackingArea: Area of the pointer for which the CRTC is panned
+ * border: Borders of the displayed CRTC area which induces panning if the pointer reaches them
+ * Added in ABI version 2
+ */
+ BoxRec panningTotalArea;
+ BoxRec panningTrackingArea;
+ INT16 panningBorder[4];
+
+ /**
+ * Current gamma, especially useful after initial config.
+ * Added in ABI version 3
+ */
+ CARD16 *gamma_red;
+ CARD16 *gamma_green;
+ CARD16 *gamma_blue;
+ int gamma_size;
+
+ /**
+ * Actual state of this CRTC
+ *
+ * Set to TRUE after modesetting, set to FALSE if no outputs are connected
+ * Added in ABI version 3
+ */
+ Bool active;
+ /**
+ * Clear the shadow
+ */
+ Bool shadowClear;
+};
+
+typedef struct _xf86OutputFuncs {
+ /**
+ * Called to allow the output a chance to create properties after the
+ * RandR objects have been created.
+ */
+ void
+ (*create_resources)(xf86OutputPtr output);
+
+ /**
+ * Turns the output on/off, or sets intermediate power levels if available.
+ *
+ * Unsupported intermediate modes drop to the lower power setting. If the
+ * mode is DPMSModeOff, the output must be disabled, as the DPLL may be
+ * disabled afterwards.
+ */
+ void
+ (*dpms)(xf86OutputPtr output,
+ int mode);
+
+ /**
+ * Saves the output's state for restoration on VT switch.
+ */
+ void
+ (*save)(xf86OutputPtr output);
+
+ /**
+ * Restore's the output's state at VT switch.
+ */
+ void
+ (*restore)(xf86OutputPtr output);
+
+ /**
+ * Callback for testing a video mode for a given output.
+ *
+ * This function should only check for cases where a mode can't be supported
+ * on the output specifically, and not represent generic CRTC limitations.
+ *
+ * \return MODE_OK if the mode is valid, or another MODE_* otherwise.
+ */
+ int
+ (*mode_valid)(xf86OutputPtr output,
+ DisplayModePtr pMode);
+
+ /**
+ * Callback to adjust the mode to be set in the CRTC.
+ *
+ * This allows an output to adjust the clock or even the entire set of
+ * timings, which is used for panels with fixed timings or for
+ * buses with clock limitations.
+ */
+ Bool
+ (*mode_fixup)(xf86OutputPtr output,
+ DisplayModePtr mode,
+ DisplayModePtr adjusted_mode);
+
+ /**
+ * Callback for preparing mode changes on an output
+ */
+ void
+ (*prepare)(xf86OutputPtr output);
+
+ /**
+ * Callback for committing mode changes on an output
+ */
+ void
+ (*commit)(xf86OutputPtr output);
+
+ /**
+ * Callback for setting up a video mode after fixups have been made.
+ *
+ * This is only called while the output is disabled. The dpms callback
+ * must be all that's necessary for the output, to turn the output on
+ * after this function is called.
+ */
+ void
+ (*mode_set)(xf86OutputPtr output,
+ DisplayModePtr mode,
+ DisplayModePtr adjusted_mode);
+
+ /**
+ * Probe for a connected output, and return detect_status.
+ */
+ xf86OutputStatus
+ (*detect)(xf86OutputPtr output);
+
+ /**
+ * Query the device for the modes it provides.
+ *
+ * This function may also update MonInfo, mm_width, and mm_height.
+ *
+ * \return singly-linked list of modes or NULL if no modes found.
+ */
+ DisplayModePtr
+ (*get_modes)(xf86OutputPtr output);
+
+#ifdef RANDR_12_INTERFACE
+ /**
+ * Callback when an output's property has changed.
+ */
+ Bool
+ (*set_property)(xf86OutputPtr output,
+ Atom property,
+ RRPropertyValuePtr value);
+#endif
+#ifdef RANDR_13_INTERFACE
+ /**
+ * Callback to get an updated property value
+ */
+ Bool
+ (*get_property)(xf86OutputPtr output,
+ Atom property);
+#endif
+#ifdef RANDR_GET_CRTC_INTERFACE
+ /**
+ * Callback to get current CRTC for a given output
+ */
+ xf86CrtcPtr
+ (*get_crtc)(xf86OutputPtr output);
+#endif
+ /**
+ * Clean up driver-specific bits of the output
+ */
+ void
+ (*destroy) (xf86OutputPtr output);
+} xf86OutputFuncsRec, *xf86OutputFuncsPtr;
+
+
+#define XF86_OUTPUT_VERSION 2
+
+struct _xf86Output {
+ /**
+ * ABI versioning
+ */
+ int version;
+
+ /**
+ * Associated ScrnInfo
+ */
+ ScrnInfoPtr scrn;
+
+ /**
+ * Currently connected crtc (if any)
+ *
+ * If this output is not in use, this field will be NULL.
+ */
+ xf86CrtcPtr crtc;
+
+ /**
+ * Possible CRTCs for this output as a mask of crtc indices
+ */
+ CARD32 possible_crtcs;
+
+ /**
+ * Possible outputs to share the same CRTC as a mask of output indices
+ */
+ CARD32 possible_clones;
+
+ /**
+ * Whether this output can support interlaced modes
+ */
+ Bool interlaceAllowed;
+
+ /**
+ * Whether this output can support double scan modes
+ */
+ Bool doubleScanAllowed;
+
+ /**
+ * List of available modes on this output.
+ *
+ * This should be the list from get_modes(), plus perhaps additional
+ * compatible modes added later.
+ */
+ DisplayModePtr probed_modes;
+
+ /**
+ * Options parsed from the related monitor section
+ */
+ OptionInfoPtr options;
+
+ /**
+ * Configured monitor section
+ */
+ XF86ConfMonitorPtr conf_monitor;
+
+ /**
+ * Desired initial position
+ */
+ int initial_x, initial_y;
+
+ /**
+ * Desired initial rotation
+ */
+ Rotation initial_rotation;
+
+ /**
+ * Current connection status
+ *
+ * This indicates whether a monitor is known to be connected
+ * to this output or not, or whether there is no way to tell
+ */
+ xf86OutputStatus status;
+
+ /** EDID monitor information */
+ xf86MonPtr MonInfo;
+
+ /** subpixel order */
+ int subpixel_order;
+
+ /** Physical size of the currently attached output device. */
+ int mm_width, mm_height;
+
+ /** Output name */
+ char *name;
+
+ /** output-specific functions */
+ const xf86OutputFuncsRec *funcs;
+
+ /** driver private information */
+ void *driver_private;
+
+ /** Whether to use the old per-screen Monitor config section */
+ Bool use_screen_monitor;
+
+#ifdef RANDR_12_INTERFACE
+ /**
+ * RandR 1.2 output structure.
+ *
+ * When RandR 1.2 is available, this points at the associated
+ * RandR output structure and is created when this output is created
+ */
+ RROutputPtr randr_output;
+#else
+ void *randr_output;
+#endif
+ /**
+ * Desired initial panning
+ * Added in ABI version 2
+ */
+ BoxRec initialTotalArea;
+ BoxRec initialTrackingArea;
+ INT16 initialBorder[4];
+};
+
+typedef struct _xf86CrtcConfigFuncs {
+ /**
+ * Requests that the driver resize the screen.
+ *
+ * The driver is responsible for updating scrn->virtualX and scrn->virtualY.
+ * If the requested size cannot be set, the driver should leave those values
+ * alone and return FALSE.
+ *
+ * A naive driver that cannot reallocate the screen may simply change
+ * virtual[XY]. A more advanced driver will want to also change the
+ * devPrivate.ptr and devKind of the screen pixmap, update any offscreen
+ * pixmaps it may have moved, and change pScrn->displayWidth.
+ */
+ Bool
+ (*resize)(ScrnInfoPtr scrn,
+ int width,
+ int height);
+} xf86CrtcConfigFuncsRec, *xf86CrtcConfigFuncsPtr;
+
+typedef void (*xf86_crtc_notify_proc_ptr) (ScreenPtr pScreen);
+
+typedef struct _xf86CrtcConfig {
+ int num_output;
+ xf86OutputPtr *output;
+ /**
+ * compat_output is used whenever we deal
+ * with legacy code that only understands a single
+ * output. pScrn->modes will be loaded from this output,
+ * adjust frame will whack this output, etc.
+ */
+ int compat_output;
+
+ int num_crtc;
+ xf86CrtcPtr *crtc;
+
+ int minWidth, minHeight;
+ int maxWidth, maxHeight;
+
+ /* For crtc-based rotation */
+ DamagePtr rotation_damage;
+ Bool rotation_damage_registered;
+
+ /* DGA */
+ unsigned int dga_flags;
+ unsigned long dga_address;
+ DGAModePtr dga_modes;
+ int dga_nmode;
+ int dga_width, dga_height, dga_stride;
+ DisplayModePtr dga_save_mode;
+
+ const xf86CrtcConfigFuncsRec *funcs;
+
+ CreateScreenResourcesProcPtr CreateScreenResources;
+
+ CloseScreenProcPtr CloseScreen;
+
+ /* Cursor information */
+ xf86CursorInfoPtr cursor_info;
+ CursorPtr cursor;
+ CARD8 *cursor_image;
+ Bool cursor_on;
+ CARD32 cursor_fg, cursor_bg;
+
+ /**
+ * Options parsed from the related device section
+ */
+ OptionInfoPtr options;
+
+ Bool debug_modes;
+
+ /* wrap screen BlockHandler for rotation */
+ ScreenBlockHandlerProcPtr BlockHandler;
+
+ /* callback when crtc configuration changes */
+ xf86_crtc_notify_proc_ptr xf86_crtc_notify;
+
+} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
+
+extern _X_EXPORT int xf86CrtcConfigPrivateIndex;
+
+#define XF86_CRTC_CONFIG_PTR(p) ((xf86CrtcConfigPtr) ((p)->privates[xf86CrtcConfigPrivateIndex].ptr))
+
+static _X_INLINE xf86OutputPtr
+xf86CompatOutput(ScrnInfoPtr pScrn)
+{
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ return config->output[config->compat_output];
+}
+
+static _X_INLINE xf86CrtcPtr
+xf86CompatCrtc(ScrnInfoPtr pScrn)
+{
+ xf86OutputPtr compat_output = xf86CompatOutput(pScrn);
+ if (!compat_output)
+ return NULL;
+ return compat_output->crtc;
+}
+
+static _X_INLINE RRCrtcPtr
+xf86CompatRRCrtc(ScrnInfoPtr pScrn)
+{
+ xf86CrtcPtr compat_crtc = xf86CompatCrtc(pScrn);
+ if (!compat_crtc)
+ return NULL;
+ return compat_crtc->randr_crtc;
+}
+
+
+/*
+ * Initialize xf86CrtcConfig structure
+ */
+
+extern _X_EXPORT void
+xf86CrtcConfigInit (ScrnInfoPtr scrn,
+ const xf86CrtcConfigFuncsRec *funcs);
+
+extern _X_EXPORT void
+xf86CrtcSetSizeRange (ScrnInfoPtr scrn,
+ int minWidth, int minHeight,
+ int maxWidth, int maxHeight);
+
+/*
+ * Crtc functions
+ */
+extern _X_EXPORT xf86CrtcPtr
+xf86CrtcCreate (ScrnInfoPtr scrn,
+ const xf86CrtcFuncsRec *funcs);
+
+extern _X_EXPORT void
+xf86CrtcDestroy (xf86CrtcPtr crtc);
+
+
+/**
+ * Sets the given video mode on the given crtc
+ */
+
+extern _X_EXPORT Bool
+xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
+ RRTransformPtr transform, int x, int y);
+
+extern _X_EXPORT Bool
+xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
+ int x, int y);
+
+extern _X_EXPORT void
+xf86CrtcSetOrigin (xf86CrtcPtr crtc, int x, int y);
+
+/*
+ * Assign crtc rotation during mode set
+ */
+extern _X_EXPORT Bool
+xf86CrtcRotate (xf86CrtcPtr crtc);
+
+/*
+ * Clean up any rotation data, used when a crtc is turned off
+ * as well as when rotation is disabled.
+ */
+extern _X_EXPORT void
+xf86RotateDestroy (xf86CrtcPtr crtc);
+
+/*
+ * free shadow memory allocated for all crtcs
+ */
+extern _X_EXPORT void
+xf86RotateFreeShadow(ScrnInfoPtr pScrn);
+
+/*
+ * Clean up rotation during CloseScreen
+ */
+extern _X_EXPORT void
+xf86RotateCloseScreen (ScreenPtr pScreen);
+
+/**
+ * Return whether any output is assigned to the crtc
+ */
+extern _X_EXPORT Bool
+xf86CrtcInUse (xf86CrtcPtr crtc);
+
+/*
+ * Output functions
+ */
+extern _X_EXPORT xf86OutputPtr
+xf86OutputCreate (ScrnInfoPtr scrn,
+ const xf86OutputFuncsRec *funcs,
+ const char *name);
+
+extern _X_EXPORT void
+xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor);
+
+extern _X_EXPORT Bool
+xf86OutputRename (xf86OutputPtr output, const char *name);
+
+extern _X_EXPORT void
+xf86OutputDestroy (xf86OutputPtr output);
+
+extern _X_EXPORT void
+xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY);
+
+extern _X_EXPORT void
+xf86SetScrnInfoModes (ScrnInfoPtr pScrn);
+
+#ifdef RANDR_13_INTERFACE
+# define ScreenInitRetType int
+#else
+# define ScreenInitRetType Bool
+#endif
+
+extern _X_EXPORT ScreenInitRetType
+xf86CrtcScreenInit (ScreenPtr pScreen);
+
+extern _X_EXPORT Bool
+xf86InitialConfiguration (ScrnInfoPtr pScrn, Bool canGrow);
+
+extern _X_EXPORT void
+xf86DPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags);
+
+extern _X_EXPORT Bool
+xf86SaveScreen(ScreenPtr pScreen, int mode);
+
+extern _X_EXPORT void
+xf86DisableUnusedFunctions(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT DisplayModePtr
+xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired);
+
+extern _X_EXPORT Bool
+xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation);
+
+/**
+ * Set the EDID information for the specified output
+ */
+extern _X_EXPORT void
+xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon);
+
+/**
+ * Return the list of modes supported by the EDID information
+ * stored in 'output'
+ */
+extern _X_EXPORT DisplayModePtr
+xf86OutputGetEDIDModes (xf86OutputPtr output);
+
+extern _X_EXPORT xf86MonPtr
+xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus);
+
+/**
+ * Initialize dga for this screen
+ */
+
+#ifdef XFreeXDGA
+extern _X_EXPORT Bool
+xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address);
+
+/* this is the real function, used only internally */
+_X_INTERNAL Bool
+_xf86_di_dga_init_internal (ScreenPtr pScreen);
+
+/**
+ * Re-initialize dga for this screen (as when the set of modes changes)
+ */
+
+extern _X_EXPORT Bool
+xf86DiDGAReInit (ScreenPtr pScreen);
+#endif
+
+/* This is the real function, used only internally */
+_X_INTERNAL Bool
+_xf86_di_dga_reinit_internal (ScreenPtr pScreen);
+
+/*
+ * Set the subpixel order reported for the screen using
+ * the information from the outputs
+ */
+
+extern _X_EXPORT void
+xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen);
+
+/*
+ * Get a standard string name for a connector type
+ */
+extern _X_EXPORT char *
+xf86ConnectorGetName(xf86ConnectorType connector);
+
+/*
+ * Using the desired mode information in each crtc, set
+ * modes (used in EnterVT functions, or at server startup)
+ */
+
+extern _X_EXPORT Bool
+xf86SetDesiredModes (ScrnInfoPtr pScrn);
+
+/**
+ * Initialize the CRTC-based cursor code. CRTC function vectors must
+ * contain relevant cursor setting functions.
+ *
+ * Driver should call this from ScreenInit function
+ */
+extern _X_EXPORT Bool
+xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags);
+
+/**
+ * Called when anything on the screen is reconfigured.
+ *
+ * Reloads cursor images as needed, then adjusts cursor positions.
+ *
+ * Driver should call this from crtc commit function.
+ */
+extern _X_EXPORT void
+xf86_reload_cursors (ScreenPtr screen);
+
+/**
+ * Called from EnterVT to turn the cursors back on
+ */
+extern _X_EXPORT void
+xf86_show_cursors (ScrnInfoPtr scrn);
+
+/**
+ * Called by the driver to turn cursors off
+ */
+extern _X_EXPORT void
+xf86_hide_cursors (ScrnInfoPtr scrn);
+
+/**
+ * Clean up CRTC-based cursor code. Driver must call this at CloseScreen time.
+ */
+extern _X_EXPORT void
+xf86_cursors_fini (ScreenPtr screen);
+
+/*
+ * For overlay video, compute the relevant CRTC and
+ * clip video to that.
+ * wraps xf86XVClipVideoHelper()
+ */
+
+extern _X_EXPORT Bool
+xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn,
+ xf86CrtcPtr *crtc_ret,
+ xf86CrtcPtr desired_crtc,
+ BoxPtr dst,
+ INT32 *xa,
+ INT32 *xb,
+ INT32 *ya,
+ INT32 *yb,
+ RegionPtr reg,
+ INT32 width,
+ INT32 height);
+
+extern _X_EXPORT xf86_crtc_notify_proc_ptr
+xf86_wrap_crtc_notify (ScreenPtr pScreen, xf86_crtc_notify_proc_ptr new);
+
+extern _X_EXPORT void
+xf86_unwrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr old);
+
+extern _X_EXPORT void
+xf86_crtc_notify(ScreenPtr pScreen);
+
+/**
+ * Gamma
+ */
+
+extern _X_EXPORT Bool
+xf86_crtc_supports_gamma(ScrnInfoPtr pScrn);
+
+#endif /* _XF86CRTC_H_ */
diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c
index 066744744..5562f29cc 100644
--- a/xorg-server/hw/xfree86/modes/xf86Cursors.c
+++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c
@@ -1,688 +1,688 @@
-/*
- * Copyright © 2007 Keith Packard
- * Copyright © 2010 Aaron Plattner
- *
- * 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, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#else
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#endif
-
-#include <stddef.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "xf86.h"
-#include "xf86DDC.h"
-#include "xf86Crtc.h"
-#include "xf86Modes.h"
-#include "xf86RandR12.h"
-#include "xf86CursorPriv.h"
-#include "X11/extensions/render.h"
-#include "X11/extensions/dpmsconst.h"
-#include "X11/Xatom.h"
-#include "picturestr.h"
-#include "cursorstr.h"
-#include "inputstr.h"
-
-/*
- * Given a screen coordinate, rotate back to a cursor source coordinate
- */
-static void
-xf86_crtc_rotate_coord (Rotation rotation,
- int width,
- int height,
- int x_dst,
- int y_dst,
- int *x_src,
- int *y_src)
-{
- int t;
-
- switch (rotation & 0xf) {
- case RR_Rotate_0:
- break;
- case RR_Rotate_90:
- t = x_dst;
- x_dst = height - y_dst - 1;
- y_dst = t;
- break;
- case RR_Rotate_180:
- x_dst = width - x_dst - 1;
- y_dst = height - y_dst - 1;
- break;
- case RR_Rotate_270:
- t = x_dst;
- x_dst = y_dst;
- y_dst = width - t - 1;
- break;
- }
- if (rotation & RR_Reflect_X)
- x_dst = width - x_dst - 1;
- if (rotation & RR_Reflect_Y)
- y_dst = height - y_dst - 1;
- *x_src = x_dst;
- *y_src = y_dst;
-}
-
-/*
- * Given a cursor source coordinate, rotate to a screen coordinate
- */
-static void
-xf86_crtc_rotate_coord_back (Rotation rotation,
- int width,
- int height,
- int x_dst,
- int y_dst,
- int *x_src,
- int *y_src)
-{
- int t;
-
- if (rotation & RR_Reflect_X)
- x_dst = width - x_dst - 1;
- if (rotation & RR_Reflect_Y)
- y_dst = height - y_dst - 1;
-
- switch (rotation & 0xf) {
- case RR_Rotate_0:
- break;
- case RR_Rotate_90:
- t = x_dst;
- x_dst = y_dst;
- y_dst = width - t - 1;
- break;
- case RR_Rotate_180:
- x_dst = width - x_dst - 1;
- y_dst = height - y_dst - 1;
- break;
- case RR_Rotate_270:
- t = x_dst;
- x_dst = height - y_dst - 1;
- y_dst = t;
- break;
- }
- *x_src = x_dst;
- *y_src = y_dst;
-}
-
-struct cursor_bit {
- CARD8 *byte;
- char bitpos;
-};
-
-/*
- * Convert an x coordinate to a position within the cursor bitmap
- */
-static struct cursor_bit
-cursor_bitpos (CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y,
- Bool mask)
-{
- const int flags = cursor_info->Flags;
- const Bool interleaved =
- !!(flags & (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 |
- HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8 |
- HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16 |
- HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 |
- HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64));
- const int width = cursor_info->MaxWidth;
- const int height = cursor_info->MaxHeight;
- const int stride = interleaved ? width / 4 : width / 8;
-
- struct cursor_bit ret;
-
- image += y * stride;
-
- if (flags & HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK)
- mask = !mask;
- if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED)
- x = (x & ~3) | (3 - (x & 3));
- if (((flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST) == 0) ==
- (X_BYTE_ORDER == X_BIG_ENDIAN))
- x = (x & ~7) | (7 - (x & 7));
- if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1)
- x = (x << 1) + mask;
- else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8)
- x = ((x & ~7) << 1) | (mask << 3) | (x & 7);
- else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16)
- x = ((x & ~15) << 1) | (mask << 4) | (x & 15);
- else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32)
- x = ((x & ~31) << 1) | (mask << 5) | (x & 31);
- else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64)
- x = ((x & ~63) << 1) | (mask << 6) | (x & 63);
- else if (mask)
- image += stride * height;
-
- ret.byte = image + (x / 8);
- ret.bitpos = x & 7;
-
- return ret;
-}
-
-/*
- * Fetch one bit from a cursor bitmap
- */
-static CARD8
-get_bit (CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask)
-{
- struct cursor_bit bit = cursor_bitpos(image, cursor_info, x, y, mask);
- return (*bit.byte >> bit.bitpos) & 1;
-}
-
-/*
- * Set one bit in a cursor bitmap
- */
-static void
-set_bit (CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask)
-{
- struct cursor_bit bit = cursor_bitpos(image, cursor_info, x, y, mask);
- *bit.byte |= 1 << bit.bitpos;
-}
-
-/*
- * Load a two color cursor into a driver that supports only ARGB cursors
- */
-static void
-xf86_crtc_convert_cursor_to_argb (xf86CrtcPtr crtc, unsigned char *src)
-{
- ScrnInfoPtr scrn = crtc->scrn;
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
- CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image;
- int x, y;
- int xin, yin;
- int flags = cursor_info->Flags;
- CARD32 bits;
-
-#ifdef ARGB_CURSOR
- crtc->cursor_argb = FALSE;
-#endif
-
- for (y = 0; y < cursor_info->MaxHeight; y++)
- for (x = 0; x < cursor_info->MaxWidth; x++)
- {
- xf86_crtc_rotate_coord (crtc->rotation,
- cursor_info->MaxWidth,
- cursor_info->MaxHeight,
- x, y, &xin, &yin);
- if (get_bit (src, cursor_info, xin, yin, TRUE) ==
- ((flags & HARDWARE_CURSOR_INVERT_MASK) == 0))
- {
- if (get_bit (src, cursor_info, xin, yin, FALSE))
- bits = xf86_config->cursor_fg;
- else
- bits = xf86_config->cursor_bg;
- }
- else
- bits = 0;
- cursor_image[y * cursor_info->MaxWidth + x] = bits;
- }
- crtc->funcs->load_cursor_argb (crtc, cursor_image);
-}
-
-/*
- * Set the colors for a two-color cursor (ignore for ARGB cursors)
- */
-static void
-xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg)
-{
- ScreenPtr screen = scrn->pScreen;
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- CursorPtr cursor = xf86_config->cursor;
- int c;
- CARD8 *bits = cursor ?
- dixLookupPrivate(&cursor->devPrivates, CursorScreenKey(screen))
- : NULL;
-
- /* Save ARGB versions of these colors */
- xf86_config->cursor_fg = (CARD32) fg | 0xff000000;
- xf86_config->cursor_bg = (CARD32) bg | 0xff000000;
-
- for (c = 0; c < xf86_config->num_crtc; c++)
- {
- xf86CrtcPtr crtc = xf86_config->crtc[c];
-
- if (crtc->enabled && !crtc->cursor_argb)
- {
- if (crtc->funcs->load_cursor_image)
- crtc->funcs->set_cursor_colors (crtc, bg, fg);
- else if (bits)
- xf86_crtc_convert_cursor_to_argb (crtc, bits);
- }
- }
-}
-
-static void
-xf86_crtc_hide_cursor (xf86CrtcPtr crtc)
-{
- if (crtc->cursor_shown)
- {
- crtc->funcs->hide_cursor (crtc);
- crtc->cursor_shown = FALSE;
- }
-}
-
-void
-xf86_hide_cursors (ScrnInfoPtr scrn)
-{
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- int c;
-
- xf86_config->cursor_on = FALSE;
- for (c = 0; c < xf86_config->num_crtc; c++)
- {
- xf86CrtcPtr crtc = xf86_config->crtc[c];
-
- if (crtc->enabled)
- xf86_crtc_hide_cursor (crtc);
- }
-}
-
-static void
-xf86_crtc_show_cursor (xf86CrtcPtr crtc)
-{
- if (!crtc->cursor_shown && crtc->cursor_in_range)
- {
- crtc->funcs->show_cursor (crtc);
- crtc->cursor_shown = TRUE;
- }
-}
-
-void
-xf86_show_cursors (ScrnInfoPtr scrn)
-{
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- int c;
-
- xf86_config->cursor_on = TRUE;
- for (c = 0; c < xf86_config->num_crtc; c++)
- {
- xf86CrtcPtr crtc = xf86_config->crtc[c];
-
- if (crtc->enabled)
- xf86_crtc_show_cursor (crtc);
- }
-}
-
-static void
-xf86_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
-{
- ScrnInfoPtr scrn = crtc->scrn;
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
- DisplayModePtr mode = &crtc->mode;
- Bool in_range;
- int dx, dy;
-
- /*
- * Transform position of cursor on screen
- */
- if (crtc->transform_in_use)
- {
- ScreenPtr screen = scrn->pScreen;
- xf86CursorScreenPtr ScreenPriv =
- (xf86CursorScreenPtr)dixLookupPrivate(&screen->devPrivates,
- xf86CursorScreenKey);
- struct pict_f_vector v;
-
- v.v[0] = (x + ScreenPriv->HotX) + 0.5;
- v.v[1] = (y + ScreenPriv->HotY) + 0.5;
- v.v[2] = 1;
- pixman_f_transform_point (&crtc->f_framebuffer_to_crtc, &v);
- /* cursor will have 0.5 added to it already so floor is sufficent */
- x = floor (v.v[0]);
- y = floor (v.v[1]);
- /*
- * Transform position of cursor upper left corner
- */
- xf86_crtc_rotate_coord_back (crtc->rotation,
- cursor_info->MaxWidth,
- cursor_info->MaxHeight,
- ScreenPriv->HotX, ScreenPriv->HotY, &dx, &dy);
- x -= dx;
- y -= dy;
- }
- else
- {
- x -= crtc->x;
- y -= crtc->y;
- }
-
- /*
- * Disable the cursor when it is outside the viewport
- */
- in_range = TRUE;
- if (x >= mode->HDisplay || y >= mode->VDisplay ||
- x <= -cursor_info->MaxWidth || y <= -cursor_info->MaxHeight)
- {
- in_range = FALSE;
- x = 0;
- y = 0;
- }
-
- crtc->cursor_in_range = in_range;
-
- if (in_range)
- {
- crtc->funcs->set_cursor_position (crtc, x, y);
- xf86_crtc_show_cursor (crtc);
- }
- else
- xf86_crtc_hide_cursor (crtc);
-}
-
-static void
-xf86_set_cursor_position (ScrnInfoPtr scrn, int x, int y)
-{
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- int c;
-
- /* undo what xf86HWCurs did to the coordinates */
- x += scrn->frameX0;
- y += scrn->frameY0;
- for (c = 0; c < xf86_config->num_crtc; c++)
- {
- xf86CrtcPtr crtc = xf86_config->crtc[c];
-
- if (crtc->enabled)
- xf86_crtc_set_cursor_position (crtc, x, y);
- }
-}
-
-/*
- * Load a two-color cursor into a crtc, performing rotation as needed
- */
-static void
-xf86_crtc_load_cursor_image (xf86CrtcPtr crtc, CARD8 *src)
-{
- ScrnInfoPtr scrn = crtc->scrn;
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
- CARD8 *cursor_image;
-
-#ifdef ARGB_CURSOR
- crtc->cursor_argb = FALSE;
-#endif
-
- if (crtc->rotation == RR_Rotate_0)
- cursor_image = src;
- else
- {
- int x, y;
- int xin, yin;
- int stride = cursor_info->MaxWidth >> 2;
-
- cursor_image = xf86_config->cursor_image;
- memset(cursor_image, 0, cursor_info->MaxHeight * stride);
-
- for (y = 0; y < cursor_info->MaxHeight; y++)
- for (x = 0; x < cursor_info->MaxWidth; x++)
- {
- xf86_crtc_rotate_coord (crtc->rotation,
- cursor_info->MaxWidth,
- cursor_info->MaxHeight,
- x, y, &xin, &yin);
- if (get_bit(src, cursor_info, xin, yin, FALSE))
- set_bit(cursor_image, cursor_info, x, y, FALSE);
- if (get_bit(src, cursor_info, xin, yin, TRUE))
- set_bit(cursor_image, cursor_info, x, y, TRUE);
- }
- }
- crtc->funcs->load_cursor_image (crtc, cursor_image);
-}
-
-/*
- * Load a cursor image into all active CRTCs
- */
-static void
-xf86_load_cursor_image (ScrnInfoPtr scrn, unsigned char *src)
-{
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- int c;
-
- for (c = 0; c < xf86_config->num_crtc; c++)
- {
- xf86CrtcPtr crtc = xf86_config->crtc[c];
-
- if (crtc->enabled)
- {
- if (crtc->funcs->load_cursor_image)
- xf86_crtc_load_cursor_image (crtc, src);
- else if (crtc->funcs->load_cursor_argb)
- xf86_crtc_convert_cursor_to_argb (crtc, src);
- }
- }
-}
-
-static Bool
-xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
-{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
-
- ++cursor->refcnt;
- if (xf86_config->cursor)
- FreeCursor (xf86_config->cursor, None);
- xf86_config->cursor = cursor;
-
- if (cursor->bits->width > cursor_info->MaxWidth ||
- cursor->bits->height> cursor_info->MaxHeight)
- return FALSE;
-
- return TRUE;
-}
-
-static Bool
-xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor)
-{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
-
- ++cursor->refcnt;
- if (xf86_config->cursor)
- FreeCursor (xf86_config->cursor, None);
- xf86_config->cursor = cursor;
-
- /* Make sure ARGB support is available */
- if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0)
- return FALSE;
-
- if (cursor->bits->width > cursor_info->MaxWidth ||
- cursor->bits->height> cursor_info->MaxHeight)
- return FALSE;
-
- return TRUE;
-}
-
-static void
-xf86_crtc_load_cursor_argb (xf86CrtcPtr crtc, CursorPtr cursor)
-{
- ScrnInfoPtr scrn = crtc->scrn;
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
- CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image;
- CARD32 *cursor_source = (CARD32 *) cursor->bits->argb;
- int x, y;
- int xin, yin;
- CARD32 bits;
- int source_width = cursor->bits->width;
- int source_height = cursor->bits->height;
- int image_width = cursor_info->MaxWidth;
- int image_height = cursor_info->MaxHeight;
-
- for (y = 0; y < image_height; y++)
- for (x = 0; x < image_width; x++)
- {
- xf86_crtc_rotate_coord (crtc->rotation, image_width, image_height,
- x, y, &xin, &yin);
- if (xin < source_width && yin < source_height)
- bits = cursor_source[yin * source_width + xin];
- else
- bits = 0;
- cursor_image[y * image_width + x] = bits;
- }
-
- crtc->funcs->load_cursor_argb (crtc, cursor_image);
-}
-
-static void
-xf86_load_cursor_argb (ScrnInfoPtr scrn, CursorPtr cursor)
-{
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- int c;
-
- for (c = 0; c < xf86_config->num_crtc; c++)
- {
- xf86CrtcPtr crtc = xf86_config->crtc[c];
-
- if (crtc->enabled)
- xf86_crtc_load_cursor_argb (crtc, cursor);
- }
-}
-
-Bool
-xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags)
-{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- xf86CursorInfoPtr cursor_info;
-
- cursor_info = xf86CreateCursorInfoRec();
- if (!cursor_info)
- return FALSE;
-
- xf86_config->cursor_image = malloc(max_width * max_height * 4);
-
- if (!xf86_config->cursor_image)
- {
- xf86DestroyCursorInfoRec (cursor_info);
- return FALSE;
- }
-
- xf86_config->cursor_info = cursor_info;
-
- cursor_info->MaxWidth = max_width;
- cursor_info->MaxHeight = max_height;
- cursor_info->Flags = flags;
-
- cursor_info->SetCursorColors = xf86_set_cursor_colors;
- cursor_info->SetCursorPosition = xf86_set_cursor_position;
- cursor_info->LoadCursorImage = xf86_load_cursor_image;
- cursor_info->HideCursor = xf86_hide_cursors;
- cursor_info->ShowCursor = xf86_show_cursors;
- cursor_info->UseHWCursor = xf86_use_hw_cursor;
-#ifdef ARGB_CURSOR
- if (flags & HARDWARE_CURSOR_ARGB)
- {
- cursor_info->UseHWCursorARGB = xf86_use_hw_cursor_argb;
- cursor_info->LoadCursorARGB = xf86_load_cursor_argb;
- }
-#endif
-
- xf86_config->cursor = NULL;
- xf86_hide_cursors (scrn);
-
- return xf86InitCursor (screen, cursor_info);
-}
-
-/**
- * Called when anything on the screen is reconfigured.
- *
- * Reloads cursor images as needed, then adjusts cursor positions
- */
-
-void
-xf86_reload_cursors (ScreenPtr screen)
-{
- ScrnInfoPtr scrn;
- xf86CrtcConfigPtr xf86_config;
- xf86CursorInfoPtr cursor_info;
- CursorPtr cursor;
- int x, y;
- xf86CursorScreenPtr cursor_screen_priv;
-
- /* initial mode setting will not have set a screen yet.
- May be called before the devices are initialised.
- */
- if (!screen || !inputInfo.pointer)
- return;
- cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
- xf86CursorScreenKey);
- /* return if HW cursor is inactive, to avoid displaying two cursors */
- if (!cursor_screen_priv || !cursor_screen_priv->isUp)
- return;
-
- scrn = xf86Screens[screen->myNum];
- xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
-
- /* make sure the cursor code has been initialized */
- cursor_info = xf86_config->cursor_info;
- if (!cursor_info)
- return;
-
- cursor = xf86_config->cursor;
- GetSpritePosition (inputInfo.pointer, &x, &y);
- if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
- (*cursor_info->HideCursor)(scrn);
-
- if (cursor)
- {
- void *src = dixLookupPrivate(&cursor->devPrivates, CursorScreenKey(screen));
-#ifdef ARGB_CURSOR
- if (cursor->bits->argb && cursor_info->LoadCursorARGB)
- (*cursor_info->LoadCursorARGB) (scrn, cursor);
- else if (src)
-#endif
- (*cursor_info->LoadCursorImage)(scrn, src);
-
- x += scrn->frameX0 + cursor_screen_priv->HotX;
- y += scrn->frameY0 + cursor_screen_priv->HotY;
- (*cursor_info->SetCursorPosition)(scrn, x, y);
- }
-}
-
-/**
- * Clean up CRTC-based cursor code
- */
-void
-xf86_cursors_fini (ScreenPtr screen)
-{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
-
- if (xf86_config->cursor_info)
- {
- xf86DestroyCursorInfoRec (xf86_config->cursor_info);
- xf86_config->cursor_info = NULL;
- }
- free(xf86_config->cursor_image);
- xf86_config->cursor_image = NULL;
- if (xf86_config->cursor)
- {
- FreeCursor (xf86_config->cursor, None);
- xf86_config->cursor = NULL;
- }
-}
+/*
+ * Copyright © 2007 Keith Packard
+ * Copyright © 2010 Aaron Plattner
+ *
+ * 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, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#else
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#endif
+
+#include <stddef.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "xf86.h"
+#include "xf86DDC.h"
+#include "xf86Crtc.h"
+#include "xf86Modes.h"
+#include "xf86RandR12.h"
+#include "xf86CursorPriv.h"
+#include "X11/extensions/render.h"
+#include "X11/extensions/dpmsconst.h"
+#include "X11/Xatom.h"
+#include "picturestr.h"
+#include "cursorstr.h"
+#include "inputstr.h"
+
+/*
+ * Given a screen coordinate, rotate back to a cursor source coordinate
+ */
+static void
+xf86_crtc_rotate_coord (Rotation rotation,
+ int width,
+ int height,
+ int x_dst,
+ int y_dst,
+ int *x_src,
+ int *y_src)
+{
+ int t;
+
+ switch (rotation & 0xf) {
+ case RR_Rotate_0:
+ break;
+ case RR_Rotate_90:
+ t = x_dst;
+ x_dst = height - y_dst - 1;
+ y_dst = t;
+ break;
+ case RR_Rotate_180:
+ x_dst = width - x_dst - 1;
+ y_dst = height - y_dst - 1;
+ break;
+ case RR_Rotate_270:
+ t = x_dst;
+ x_dst = y_dst;
+ y_dst = width - t - 1;
+ break;
+ }
+ if (rotation & RR_Reflect_X)
+ x_dst = width - x_dst - 1;
+ if (rotation & RR_Reflect_Y)
+ y_dst = height - y_dst - 1;
+ *x_src = x_dst;
+ *y_src = y_dst;
+}
+
+/*
+ * Given a cursor source coordinate, rotate to a screen coordinate
+ */
+static void
+xf86_crtc_rotate_coord_back (Rotation rotation,
+ int width,
+ int height,
+ int x_dst,
+ int y_dst,
+ int *x_src,
+ int *y_src)
+{
+ int t;
+
+ if (rotation & RR_Reflect_X)
+ x_dst = width - x_dst - 1;
+ if (rotation & RR_Reflect_Y)
+ y_dst = height - y_dst - 1;
+
+ switch (rotation & 0xf) {
+ case RR_Rotate_0:
+ break;
+ case RR_Rotate_90:
+ t = x_dst;
+ x_dst = y_dst;
+ y_dst = width - t - 1;
+ break;
+ case RR_Rotate_180:
+ x_dst = width - x_dst - 1;
+ y_dst = height - y_dst - 1;
+ break;
+ case RR_Rotate_270:
+ t = x_dst;
+ x_dst = height - y_dst - 1;
+ y_dst = t;
+ break;
+ }
+ *x_src = x_dst;
+ *y_src = y_dst;
+}
+
+struct cursor_bit {
+ CARD8 *byte;
+ char bitpos;
+};
+
+/*
+ * Convert an x coordinate to a position within the cursor bitmap
+ */
+static struct cursor_bit
+cursor_bitpos (CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y,
+ Bool mask)
+{
+ const int flags = cursor_info->Flags;
+ const Bool interleaved =
+ !!(flags & (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 |
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8 |
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16 |
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 |
+ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64));
+ const int width = cursor_info->MaxWidth;
+ const int height = cursor_info->MaxHeight;
+ const int stride = interleaved ? width / 4 : width / 8;
+
+ struct cursor_bit ret;
+
+ image += y * stride;
+
+ if (flags & HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK)
+ mask = !mask;
+ if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED)
+ x = (x & ~3) | (3 - (x & 3));
+ if (((flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST) == 0) ==
+ (X_BYTE_ORDER == X_BIG_ENDIAN))
+ x = (x & ~7) | (7 - (x & 7));
+ if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1)
+ x = (x << 1) + mask;
+ else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8)
+ x = ((x & ~7) << 1) | (mask << 3) | (x & 7);
+ else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16)
+ x = ((x & ~15) << 1) | (mask << 4) | (x & 15);
+ else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32)
+ x = ((x & ~31) << 1) | (mask << 5) | (x & 31);
+ else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64)
+ x = ((x & ~63) << 1) | (mask << 6) | (x & 63);
+ else if (mask)
+ image += stride * height;
+
+ ret.byte = image + (x / 8);
+ ret.bitpos = x & 7;
+
+ return ret;
+}
+
+/*
+ * Fetch one bit from a cursor bitmap
+ */
+static CARD8
+get_bit (CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask)
+{
+ struct cursor_bit bit = cursor_bitpos(image, cursor_info, x, y, mask);
+ return (*bit.byte >> bit.bitpos) & 1;
+}
+
+/*
+ * Set one bit in a cursor bitmap
+ */
+static void
+set_bit (CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask)
+{
+ struct cursor_bit bit = cursor_bitpos(image, cursor_info, x, y, mask);
+ *bit.byte |= 1 << bit.bitpos;
+}
+
+/*
+ * Load a two color cursor into a driver that supports only ARGB cursors
+ */
+static void
+xf86_crtc_convert_cursor_to_argb (xf86CrtcPtr crtc, unsigned char *src)
+{
+ ScrnInfoPtr scrn = crtc->scrn;
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+ CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image;
+ int x, y;
+ int xin, yin;
+ int flags = cursor_info->Flags;
+ CARD32 bits;
+
+#ifdef ARGB_CURSOR
+ crtc->cursor_argb = FALSE;
+#endif
+
+ for (y = 0; y < cursor_info->MaxHeight; y++)
+ for (x = 0; x < cursor_info->MaxWidth; x++)
+ {
+ xf86_crtc_rotate_coord (crtc->rotation,
+ cursor_info->MaxWidth,
+ cursor_info->MaxHeight,
+ x, y, &xin, &yin);
+ if (get_bit (src, cursor_info, xin, yin, TRUE) ==
+ ((flags & HARDWARE_CURSOR_INVERT_MASK) == 0))
+ {
+ if (get_bit (src, cursor_info, xin, yin, FALSE))
+ bits = xf86_config->cursor_fg;
+ else
+ bits = xf86_config->cursor_bg;
+ }
+ else
+ bits = 0;
+ cursor_image[y * cursor_info->MaxWidth + x] = bits;
+ }
+ crtc->funcs->load_cursor_argb (crtc, cursor_image);
+}
+
+/*
+ * Set the colors for a two-color cursor (ignore for ARGB cursors)
+ */
+static void
+xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg)
+{
+ ScreenPtr screen = scrn->pScreen;
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ CursorPtr cursor = xf86_config->cursor;
+ int c;
+ CARD8 *bits = cursor ?
+ dixLookupPrivate(&cursor->devPrivates, CursorScreenKey(screen))
+ : NULL;
+
+ /* Save ARGB versions of these colors */
+ xf86_config->cursor_fg = (CARD32) fg | 0xff000000;
+ xf86_config->cursor_bg = (CARD32) bg | 0xff000000;
+
+ for (c = 0; c < xf86_config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = xf86_config->crtc[c];
+
+ if (crtc->enabled && !crtc->cursor_argb)
+ {
+ if (crtc->funcs->load_cursor_image)
+ crtc->funcs->set_cursor_colors (crtc, bg, fg);
+ else if (bits)
+ xf86_crtc_convert_cursor_to_argb (crtc, bits);
+ }
+ }
+}
+
+static void
+xf86_crtc_hide_cursor (xf86CrtcPtr crtc)
+{
+ if (crtc->cursor_shown)
+ {
+ crtc->funcs->hide_cursor (crtc);
+ crtc->cursor_shown = FALSE;
+ }
+}
+
+void
+xf86_hide_cursors (ScrnInfoPtr scrn)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ int c;
+
+ xf86_config->cursor_on = FALSE;
+ for (c = 0; c < xf86_config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = xf86_config->crtc[c];
+
+ if (crtc->enabled)
+ xf86_crtc_hide_cursor (crtc);
+ }
+}
+
+static void
+xf86_crtc_show_cursor (xf86CrtcPtr crtc)
+{
+ if (!crtc->cursor_shown && crtc->cursor_in_range)
+ {
+ crtc->funcs->show_cursor (crtc);
+ crtc->cursor_shown = TRUE;
+ }
+}
+
+void
+xf86_show_cursors (ScrnInfoPtr scrn)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ int c;
+
+ xf86_config->cursor_on = TRUE;
+ for (c = 0; c < xf86_config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = xf86_config->crtc[c];
+
+ if (crtc->enabled)
+ xf86_crtc_show_cursor (crtc);
+ }
+}
+
+static void
+xf86_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
+{
+ ScrnInfoPtr scrn = crtc->scrn;
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+ DisplayModePtr mode = &crtc->mode;
+ Bool in_range;
+ int dx, dy;
+
+ /*
+ * Transform position of cursor on screen
+ */
+ if (crtc->transform_in_use)
+ {
+ ScreenPtr screen = scrn->pScreen;
+ xf86CursorScreenPtr ScreenPriv =
+ (xf86CursorScreenPtr)dixLookupPrivate(&screen->devPrivates,
+ xf86CursorScreenKey);
+ struct pict_f_vector v;
+
+ v.v[0] = (x + ScreenPriv->HotX) + 0.5;
+ v.v[1] = (y + ScreenPriv->HotY) + 0.5;
+ v.v[2] = 1;
+ pixman_f_transform_point (&crtc->f_framebuffer_to_crtc, &v);
+ /* cursor will have 0.5 added to it already so floor is sufficent */
+ x = floor (v.v[0]);
+ y = floor (v.v[1]);
+ /*
+ * Transform position of cursor upper left corner
+ */
+ xf86_crtc_rotate_coord_back (crtc->rotation,
+ cursor_info->MaxWidth,
+ cursor_info->MaxHeight,
+ ScreenPriv->HotX, ScreenPriv->HotY, &dx, &dy);
+ x -= dx;
+ y -= dy;
+ }
+ else
+ {
+ x -= crtc->x;
+ y -= crtc->y;
+ }
+
+ /*
+ * Disable the cursor when it is outside the viewport
+ */
+ in_range = TRUE;
+ if (x >= mode->HDisplay || y >= mode->VDisplay ||
+ x <= -cursor_info->MaxWidth || y <= -cursor_info->MaxHeight)
+ {
+ in_range = FALSE;
+ x = 0;
+ y = 0;
+ }
+
+ crtc->cursor_in_range = in_range;
+
+ if (in_range)
+ {
+ crtc->funcs->set_cursor_position (crtc, x, y);
+ xf86_crtc_show_cursor (crtc);
+ }
+ else
+ xf86_crtc_hide_cursor (crtc);
+}
+
+static void
+xf86_set_cursor_position (ScrnInfoPtr scrn, int x, int y)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ int c;
+
+ /* undo what xf86HWCurs did to the coordinates */
+ x += scrn->frameX0;
+ y += scrn->frameY0;
+ for (c = 0; c < xf86_config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = xf86_config->crtc[c];
+
+ if (crtc->enabled)
+ xf86_crtc_set_cursor_position (crtc, x, y);
+ }
+}
+
+/*
+ * Load a two-color cursor into a crtc, performing rotation as needed
+ */
+static void
+xf86_crtc_load_cursor_image (xf86CrtcPtr crtc, CARD8 *src)
+{
+ ScrnInfoPtr scrn = crtc->scrn;
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+ CARD8 *cursor_image;
+
+#ifdef ARGB_CURSOR
+ crtc->cursor_argb = FALSE;
+#endif
+
+ if (crtc->rotation == RR_Rotate_0)
+ cursor_image = src;
+ else
+ {
+ int x, y;
+ int xin, yin;
+ int stride = cursor_info->MaxWidth >> 2;
+
+ cursor_image = xf86_config->cursor_image;
+ memset(cursor_image, 0, cursor_info->MaxHeight * stride);
+
+ for (y = 0; y < cursor_info->MaxHeight; y++)
+ for (x = 0; x < cursor_info->MaxWidth; x++)
+ {
+ xf86_crtc_rotate_coord (crtc->rotation,
+ cursor_info->MaxWidth,
+ cursor_info->MaxHeight,
+ x, y, &xin, &yin);
+ if (get_bit(src, cursor_info, xin, yin, FALSE))
+ set_bit(cursor_image, cursor_info, x, y, FALSE);
+ if (get_bit(src, cursor_info, xin, yin, TRUE))
+ set_bit(cursor_image, cursor_info, x, y, TRUE);
+ }
+ }
+ crtc->funcs->load_cursor_image (crtc, cursor_image);
+}
+
+/*
+ * Load a cursor image into all active CRTCs
+ */
+static void
+xf86_load_cursor_image (ScrnInfoPtr scrn, unsigned char *src)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ int c;
+
+ for (c = 0; c < xf86_config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = xf86_config->crtc[c];
+
+ if (crtc->enabled)
+ {
+ if (crtc->funcs->load_cursor_image)
+ xf86_crtc_load_cursor_image (crtc, src);
+ else if (crtc->funcs->load_cursor_argb)
+ xf86_crtc_convert_cursor_to_argb (crtc, src);
+ }
+ }
+}
+
+static Bool
+xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
+{
+ ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+
+ ++cursor->refcnt;
+ if (xf86_config->cursor)
+ FreeCursor (xf86_config->cursor, None);
+ xf86_config->cursor = cursor;
+
+ if (cursor->bits->width > cursor_info->MaxWidth ||
+ cursor->bits->height> cursor_info->MaxHeight)
+ return FALSE;
+
+ return TRUE;
+}
+
+static Bool
+xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor)
+{
+ ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+
+ ++cursor->refcnt;
+ if (xf86_config->cursor)
+ FreeCursor (xf86_config->cursor, None);
+ xf86_config->cursor = cursor;
+
+ /* Make sure ARGB support is available */
+ if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0)
+ return FALSE;
+
+ if (cursor->bits->width > cursor_info->MaxWidth ||
+ cursor->bits->height> cursor_info->MaxHeight)
+ return FALSE;
+
+ return TRUE;
+}
+
+static void
+xf86_crtc_load_cursor_argb (xf86CrtcPtr crtc, CursorPtr cursor)
+{
+ ScrnInfoPtr scrn = crtc->scrn;
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+ CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image;
+ CARD32 *cursor_source = (CARD32 *) cursor->bits->argb;
+ int x, y;
+ int xin, yin;
+ CARD32 bits;
+ int source_width = cursor->bits->width;
+ int source_height = cursor->bits->height;
+ int image_width = cursor_info->MaxWidth;
+ int image_height = cursor_info->MaxHeight;
+
+ for (y = 0; y < image_height; y++)
+ for (x = 0; x < image_width; x++)
+ {
+ xf86_crtc_rotate_coord (crtc->rotation, image_width, image_height,
+ x, y, &xin, &yin);
+ if (xin < source_width && yin < source_height)
+ bits = cursor_source[yin * source_width + xin];
+ else
+ bits = 0;
+ cursor_image[y * image_width + x] = bits;
+ }
+
+ crtc->funcs->load_cursor_argb (crtc, cursor_image);
+}
+
+static void
+xf86_load_cursor_argb (ScrnInfoPtr scrn, CursorPtr cursor)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ int c;
+
+ for (c = 0; c < xf86_config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = xf86_config->crtc[c];
+
+ if (crtc->enabled)
+ xf86_crtc_load_cursor_argb (crtc, cursor);
+ }
+}
+
+Bool
+xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags)
+{
+ ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ xf86CursorInfoPtr cursor_info;
+
+ cursor_info = xf86CreateCursorInfoRec();
+ if (!cursor_info)
+ return FALSE;
+
+ xf86_config->cursor_image = malloc(max_width * max_height * 4);
+
+ if (!xf86_config->cursor_image)
+ {
+ xf86DestroyCursorInfoRec (cursor_info);
+ return FALSE;
+ }
+
+ xf86_config->cursor_info = cursor_info;
+
+ cursor_info->MaxWidth = max_width;
+ cursor_info->MaxHeight = max_height;
+ cursor_info->Flags = flags;
+
+ cursor_info->SetCursorColors = xf86_set_cursor_colors;
+ cursor_info->SetCursorPosition = xf86_set_cursor_position;
+ cursor_info->LoadCursorImage = xf86_load_cursor_image;
+ cursor_info->HideCursor = xf86_hide_cursors;
+ cursor_info->ShowCursor = xf86_show_cursors;
+ cursor_info->UseHWCursor = xf86_use_hw_cursor;
+#ifdef ARGB_CURSOR
+ if (flags & HARDWARE_CURSOR_ARGB)
+ {
+ cursor_info->UseHWCursorARGB = xf86_use_hw_cursor_argb;
+ cursor_info->LoadCursorARGB = xf86_load_cursor_argb;
+ }
+#endif
+
+ xf86_config->cursor = NULL;
+ xf86_hide_cursors (scrn);
+
+ return xf86InitCursor (screen, cursor_info);
+}
+
+/**
+ * Called when anything on the screen is reconfigured.
+ *
+ * Reloads cursor images as needed, then adjusts cursor positions
+ */
+
+void
+xf86_reload_cursors (ScreenPtr screen)
+{
+ ScrnInfoPtr scrn;
+ xf86CrtcConfigPtr xf86_config;
+ xf86CursorInfoPtr cursor_info;
+ CursorPtr cursor;
+ int x, y;
+ xf86CursorScreenPtr cursor_screen_priv;
+
+ /* initial mode setting will not have set a screen yet.
+ May be called before the devices are initialised.
+ */
+ if (!screen || !inputInfo.pointer)
+ return;
+ cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
+ xf86CursorScreenKey);
+ /* return if HW cursor is inactive, to avoid displaying two cursors */
+ if (!cursor_screen_priv || !cursor_screen_priv->isUp)
+ return;
+
+ scrn = xf86Screens[screen->myNum];
+ xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+
+ /* make sure the cursor code has been initialized */
+ cursor_info = xf86_config->cursor_info;
+ if (!cursor_info)
+ return;
+
+ cursor = xf86_config->cursor;
+ GetSpritePosition (inputInfo.pointer, &x, &y);
+ if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
+ (*cursor_info->HideCursor)(scrn);
+
+ if (cursor)
+ {
+ void *src = dixLookupPrivate(&cursor->devPrivates, CursorScreenKey(screen));
+#ifdef ARGB_CURSOR
+ if (cursor->bits->argb && cursor_info->LoadCursorARGB)
+ (*cursor_info->LoadCursorARGB) (scrn, cursor);
+ else if (src)
+#endif
+ (*cursor_info->LoadCursorImage)(scrn, src);
+
+ x += scrn->frameX0 + cursor_screen_priv->HotX;
+ y += scrn->frameY0 + cursor_screen_priv->HotY;
+ (*cursor_info->SetCursorPosition)(scrn, x, y);
+ }
+}
+
+/**
+ * Clean up CRTC-based cursor code
+ */
+void
+xf86_cursors_fini (ScreenPtr screen)
+{
+ ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+
+ if (xf86_config->cursor_info)
+ {
+ xf86DestroyCursorInfoRec (xf86_config->cursor_info);
+ xf86_config->cursor_info = NULL;
+ }
+ free(xf86_config->cursor_image);
+ xf86_config->cursor_image = NULL;
+ if (xf86_config->cursor)
+ {
+ FreeCursor (xf86_config->cursor, None);
+ xf86_config->cursor = NULL;
+ }
+}
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c
index 744a03abe..7880a41af 100644
--- a/xorg-server/hw/xfree86/modes/xf86RandR12.c
+++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c
@@ -1,1824 +1,1824 @@
-/*
- * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
- *
- * 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, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#else
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#endif
-
-#include "xf86.h"
-#include "os.h"
-#include "globals.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86DDC.h"
-#include "mipointer.h"
-#include "windowstr.h"
-#include "inputstr.h"
-#include <randrstr.h>
-#include <X11/extensions/render.h>
-
-#include "xf86Crtc.h"
-#include "xf86RandR12.h"
-
-typedef struct _xf86RandR12Info {
- int virtualX;
- int virtualY;
- int mmWidth;
- int mmHeight;
- int maxX;
- int maxY;
- int pointerX;
- int pointerY;
- Rotation rotation; /* current mode */
- Rotation supported_rotations; /* driver supported */
-
- /* Used to wrap EnterVT so we can re-probe the outputs when a laptop unsuspends
- * (actually, any time that we switch back into our VT).
- *
- * See https://bugs.freedesktop.org/show_bug.cgi?id=21554
- */
- xf86EnterVTProc *orig_EnterVT;
-} XF86RandRInfoRec, *XF86RandRInfoPtr;
-
-#ifdef RANDR_12_INTERFACE
-static Bool xf86RandR12Init12 (ScreenPtr pScreen);
-static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen);
-#endif
-
-static int xf86RandR12Generation;
-
-static DevPrivateKeyRec xf86RandR12KeyRec;
-static DevPrivateKey xf86RandR12Key;
-#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \
- dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key))
-
-
-static int
-xf86RandR12ModeRefresh (DisplayModePtr mode)
-{
- if (mode->VRefresh)
- return (int) (mode->VRefresh + 0.5);
- else
- return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + 0.5);
-}
-
-/* Adapt panning area; return TRUE if panning area was valid without adaption */
-static int
-xf86RandR13VerifyPanningArea (xf86CrtcPtr crtc, int screenWidth, int screenHeight)
-{
- int ret = TRUE;
-
- if (crtc->version < 2)
- return FALSE;
-
- if (crtc->panningTotalArea.x2 <= crtc->panningTotalArea.x1) {
- /* Panning in X is disabled */
- if (crtc->panningTotalArea.x1 || crtc->panningTotalArea.x2)
- /* Illegal configuration -> fail/disable */
- ret = FALSE;
- crtc->panningTotalArea.x1 = crtc->panningTotalArea.x2 = 0;
- crtc->panningTrackingArea.x1 = crtc->panningTrackingArea.x2 = 0;
- crtc->panningBorder[0] = crtc->panningBorder[2] = 0;
- } else {
- /* Panning in X is enabled */
- if (crtc->panningTotalArea.x1 < 0) {
- /* Panning region outside screen -> move inside */
- crtc->panningTotalArea.x2 -= crtc->panningTotalArea.x1;
- crtc->panningTotalArea.x1 = 0;
- ret = FALSE;
- }
- if (crtc->panningTotalArea.x2 < crtc->panningTotalArea.x1 + crtc->mode.HDisplay) {
- /* Panning region smaller than displayed area -> crop to displayed area */
- crtc->panningTotalArea.x2 = crtc->panningTotalArea.x1 + crtc->mode.HDisplay;
- ret = FALSE;
- }
- if (crtc->panningTotalArea.x2 > screenWidth) {
- /* Panning region larger than screen -> move inside, then crop to screen */
- crtc->panningTotalArea.x1 -= crtc->panningTotalArea.x2 - screenWidth;
- crtc->panningTotalArea.x2 = screenWidth;
- ret = FALSE;
- if (crtc->panningTotalArea.x1 < 0)
- crtc->panningTotalArea.x1 = 0;
- }
- if (crtc->panningBorder[0] + crtc->panningBorder[2] > crtc->mode.HDisplay) {
- /* Borders too large -> set to 0 */
- crtc->panningBorder[0] = crtc->panningBorder[2] = 0;
- ret = FALSE;
- }
- }
-
- if (crtc->panningTotalArea.y2 <= crtc->panningTotalArea.y1) {
- /* Panning in Y is disabled */
- if (crtc->panningTotalArea.y1 || crtc->panningTotalArea.y2)
- /* Illegal configuration -> fail/disable */
- ret = FALSE;
- crtc->panningTotalArea.y1 = crtc->panningTotalArea.y2 = 0;
- crtc->panningTrackingArea.y1 = crtc->panningTrackingArea.y2 = 0;
- crtc->panningBorder[1] = crtc->panningBorder[3] = 0;
- } else {
- /* Panning in Y is enabled */
- if (crtc->panningTotalArea.y1 < 0) {
- /* Panning region outside screen -> move inside */
- crtc->panningTotalArea.y2 -= crtc->panningTotalArea.y1;
- crtc->panningTotalArea.y1 = 0;
- ret = FALSE;
- }
- if (crtc->panningTotalArea.y2 < crtc->panningTotalArea.y1 + crtc->mode.VDisplay) {
- /* Panning region smaller than displayed area -> crop to displayed area */
- crtc->panningTotalArea.y2 = crtc->panningTotalArea.y1 + crtc->mode.VDisplay;
- ret = FALSE;
- }
- if (crtc->panningTotalArea.y2 > screenHeight) {
- /* Panning region larger than screen -> move inside, then crop to screen */
- crtc->panningTotalArea.y1 -= crtc->panningTotalArea.y2 - screenHeight;
- crtc->panningTotalArea.y2 = screenHeight;
- ret = FALSE;
- if (crtc->panningTotalArea.y1 < 0)
- crtc->panningTotalArea.y1 = 0;
- }
- if (crtc->panningBorder[1] + crtc->panningBorder[3] > crtc->mode.VDisplay) {
- /* Borders too large -> set to 0 */
- crtc->panningBorder[1] = crtc->panningBorder[3] = 0;
- ret = FALSE;
- }
- }
-
- return ret;
-}
-
-/*
- * The heart of the panning operation:
- *
- * Given a frame buffer position (fb_x, fb_y),
- * and a crtc position (crtc_x, crtc_y),
- * and a transform matrix which maps frame buffer to crtc,
- * compute a panning position (pan_x, pan_y) that
- * makes the resulting transform line those two up
- */
-
-static void
-xf86ComputeCrtcPan (Bool transform_in_use,
- struct pixman_f_transform *m,
- double screen_x, double screen_y,
- double crtc_x, double crtc_y,
- int old_pan_x, int old_pan_y,
- int *new_pan_x, int *new_pan_y)
-{
- if (transform_in_use) {
- /*
- * Given the current transform, M, the current position
- * on the Screen, S, and the desired position on the CRTC,
- * C, compute a translation, T, such that:
- *
- * M T S = C
- *
- * where T is of the form
- *
- * | 1 0 dx |
- * | 0 1 dy |
- * | 0 0 1 |
- *
- * M T S =
- * | M00 Sx + M01 Sy + M00 dx + M01 dy + M02 | | Cx F |
- * | M10 Sx + M11 Sy + M10 dx + M11 dy + M12 | = | Cy F |
- * | M20 Sx + M21 Sy + M20 dx + M21 dy + M22 | | F |
- *
- * R = M S
- *
- * Cx F = M00 dx + M01 dy + R0
- * Cy F = M10 dx + M11 dy + R1
- * F = M20 dx + M21 dy + R2
- *
- * Zero out dx, then dy
- *
- * F (Cx M10 - Cy M00) =
- * (M10 M01 - M00 M11) dy + M10 R0 - M00 R1
- * F (M10 - Cy M20) =
- * (M10 M21 - M20 M11) dy + M10 R2 - M20 R1
- *
- * F (Cx M11 - Cy M01) =
- * (M11 M00 - M01 M10) dx + M11 R0 - M01 R1
- * F (M11 - Cy M21) =
- * (M11 M20 - M21 M10) dx + M11 R2 - M21 R1
- *
- * Make some temporaries
- *
- * T = | Cx M10 - Cy M00 |
- * | Cx M11 - Cy M01 |
- *
- * U = | M10 M01 - M00 M11 |
- * | M11 M00 - M01 M10 |
- *
- * Q = | M10 R0 - M00 R1 |
- * | M11 R0 - M01 R1 |
- *
- * P = | M10 - Cy M20 |
- * | M11 - Cy M21 |
- *
- * W = | M10 M21 - M20 M11 |
- * | M11 M20 - M21 M10 |
- *
- * V = | M10 R2 - M20 R1 |
- * | M11 R2 - M21 R1 |
- *
- * Rewrite:
- *
- * F T0 = U0 dy + Q0
- * F P0 = W0 dy + V0
- * F T1 = U1 dx + Q1
- * F P1 = W1 dx + V1
- *
- * Solve for F (two ways)
- *
- * F (W0 T0 - U0 P0) = W0 Q0 - U0 V0
- *
- * W0 Q0 - U0 V0
- * F = -------------
- * W0 T0 - U0 P0
- *
- * F (W1 T1 - U1 P1) = W1 Q1 - U1 V1
- *
- * W1 Q1 - U1 V1
- * F = -------------
- * W1 T1 - U1 P1
- *
- * We'll use which ever solution works (denominator != 0)
- *
- * Finally, solve for dx and dy:
- *
- * dx = (F T1 - Q1) / U1
- * dx = (F P1 - V1) / W1
- *
- * dy = (F T0 - Q0) / U0
- * dy = (F P0 - V0) / W0
- */
- double r[3];
- double q[2], u[2], t[2], v[2], w[2], p[2];
- double f;
- struct pict_f_vector d;
- int i;
-
- /* Get the un-normalized crtc coordinates again */
- for (i = 0; i < 3; i++)
- r[i] = m->m[i][0] * screen_x + m->m[i][1] * screen_y + m->m[i][2];
-
- /* Combine values into temporaries */
- for (i = 0; i < 2; i++) {
- q[i] = m->m[1][i] * r[0] - m->m[0][i] * r[1];
- u[i] = m->m[1][i] * m->m[0][1-i] - m->m[0][i] * m->m[1][1-i];
- t[i] = m->m[1][i] * crtc_x - m->m[0][i] * crtc_y;
-
- v[i] = m->m[1][i] * r[2] - m->m[2][i] * r[1];
- w[i] = m->m[1][i] * m->m[2][1-i] - m->m[2][i] * m->m[1][1-i];
- p[i] = m->m[1][i] - m->m[2][i] * crtc_y;
- }
-
- /* Find a way to compute f */
- f = 0;
- for (i = 0; i < 2; i++) {
- double a = w[i] * q[i] - u[i] * v[i];
- double b = w[i] * t[i] - u[i] * p[i];
- if (b != 0) {
- f = a/b;
- break;
- }
- }
-
- /* Solve for the resulting transform vector */
- for (i = 0; i < 2; i++) {
- if (u[i])
- d.v[1-i] = (t[i] * f - q[i]) / u[i];
- else if (w[1])
- d.v[1-i] = (p[i] * f - v[i]) / w[i];
- else
- d.v[1-i] = 0;
- }
- *new_pan_x = old_pan_x - floor (d.v[0] + 0.5);
- *new_pan_y = old_pan_y - floor (d.v[1] + 0.5);
- } else {
- *new_pan_x = screen_x - crtc_x;
- *new_pan_y = screen_y - crtc_y;
- }
-}
-
-static void
-xf86RandR13Pan (xf86CrtcPtr crtc, int x, int y)
-{
- int newX, newY;
- int width, height;
- Bool panned = FALSE;
-
- if (crtc->version < 2)
- return;
-
- if (! crtc->enabled ||
- (crtc->panningTotalArea.x2 <= crtc->panningTotalArea.x1 &&
- crtc->panningTotalArea.y2 <= crtc->panningTotalArea.y1))
- return;
-
- newX = crtc->x;
- newY = crtc->y;
- width = crtc->mode.HDisplay;
- height = crtc->mode.VDisplay;
-
- if ((crtc->panningTrackingArea.x2 <= crtc->panningTrackingArea.x1 ||
- (x >= crtc->panningTrackingArea.x1 && x < crtc->panningTrackingArea.x2)) &&
- (crtc->panningTrackingArea.y2 <= crtc->panningTrackingArea.y1 ||
- (y >= crtc->panningTrackingArea.y1 && y < crtc->panningTrackingArea.y2)))
- {
- struct pict_f_vector c;
-
- /*
- * Pre-clip the mouse position to the panning area so that we don't
- * push the crtc outside. This doesn't deal with changes to the
- * panning values, only mouse position changes.
- */
- if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1)
- {
- if (x < crtc->panningTotalArea.x1)
- x = crtc->panningTotalArea.x1;
- if (x >= crtc->panningTotalArea.x2)
- x = crtc->panningTotalArea.x2 - 1;
- }
- if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1)
- {
- if (y < crtc->panningTotalArea.y1)
- y = crtc->panningTotalArea.y1;
- if (y >= crtc->panningTotalArea.y2)
- y = crtc->panningTotalArea.y2 - 1;
- }
-
- c.v[0] = x;
- c.v[1] = y;
- c.v[2] = 1.0;
- if (crtc->transform_in_use) {
- pixman_f_transform_point(&crtc->f_framebuffer_to_crtc, &c);
- } else {
- c.v[0] -= crtc->x;
- c.v[1] -= crtc->y;
- }
-
- if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) {
- if (c.v[0] < crtc->panningBorder[0]) {
- c.v[0] = crtc->panningBorder[0];
- panned = TRUE;
- }
- if (c.v[0] >= width - crtc->panningBorder[2]) {
- c.v[0] = width - crtc->panningBorder[2] - 1;
- panned = TRUE;
- }
- }
- if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
- if (c.v[1] < crtc->panningBorder[1]) {
- c.v[1] = crtc->panningBorder[1];
- panned = TRUE;
- }
- if (c.v[1] >= height - crtc->panningBorder[3]) {
- c.v[1] = height - crtc->panningBorder[3] - 1;
- panned = TRUE;
- }
- }
- if (panned)
- xf86ComputeCrtcPan (crtc->transform_in_use,
- &crtc->f_framebuffer_to_crtc,
- x, y, c.v[0], c.v[1],
- newX, newY, &newX, &newY);
- }
-
- /*
- * Ensure that the crtc is within the panning region.
- *
- * XXX This computation only works when we do not have a transform
- * in use.
- */
- if (!crtc->transform_in_use)
- {
- /* Validate against [xy]1 after [xy]2, to be sure that results are > 0 for [xy]1 > 0 */
- if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) {
- if (newX > crtc->panningTotalArea.x2 - width)
- newX = crtc->panningTotalArea.x2 - width;
- if (newX < crtc->panningTotalArea.x1)
- newX = crtc->panningTotalArea.x1;
- }
- if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
- if (newY > crtc->panningTotalArea.y2 - height)
- newY = crtc->panningTotalArea.y2 - height;
- if (newY < crtc->panningTotalArea.y1)
- newY = crtc->panningTotalArea.y1;
- }
- }
- if (newX != crtc->x || newY != crtc->y)
- xf86CrtcSetOrigin (crtc, newX, newY);
-}
-
-static Bool
-xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations)
-{
- RRScreenSizePtr pSize;
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- DisplayModePtr mode;
- int refresh0 = 60;
- int maxX = 0, maxY = 0;
-
- *rotations = randrp->supported_rotations;
-
- if (randrp->virtualX == -1 || randrp->virtualY == -1)
- {
- randrp->virtualX = scrp->virtualX;
- randrp->virtualY = scrp->virtualY;
- }
-
- /* Re-probe the outputs for new monitors or modes */
- if (scrp->vtSema)
- {
- xf86ProbeOutputModes (scrp, 0, 0);
- xf86SetScrnInfoModes (scrp);
- }
-
- for (mode = scrp->modes; ; mode = mode->next)
- {
- int refresh = xf86RandR12ModeRefresh (mode);
- if (randrp->maxX == 0 || randrp->maxY == 0)
- {
- if (maxX < mode->HDisplay)
- maxX = mode->HDisplay;
- if (maxY < mode->VDisplay)
- maxY = mode->VDisplay;
- }
- if (mode == scrp->modes)
- refresh0 = refresh;
- pSize = RRRegisterSize (pScreen,
- mode->HDisplay, mode->VDisplay,
- randrp->mmWidth, randrp->mmHeight);
- if (!pSize)
- return FALSE;
- RRRegisterRate (pScreen, pSize, refresh);
-
- if (xf86ModesEqual(mode, scrp->currentMode))
- {
- RRSetCurrentConfig (pScreen, randrp->rotation, refresh, pSize);
- }
- if (mode->next == scrp->modes)
- break;
- }
-
- if (randrp->maxX == 0 || randrp->maxY == 0)
- {
- randrp->maxX = maxX;
- randrp->maxY = maxY;
- }
-
- return TRUE;
-}
-
-static Bool
-xf86RandR12SetMode (ScreenPtr pScreen,
- DisplayModePtr mode,
- Bool useVirtual,
- int mmWidth,
- int mmHeight)
-{
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- int oldWidth = pScreen->width;
- int oldHeight = pScreen->height;
- int oldmmWidth = pScreen->mmWidth;
- int oldmmHeight = pScreen->mmHeight;
- WindowPtr pRoot = pScreen->root;
- DisplayModePtr currentMode = NULL;
- Bool ret = TRUE;
-
- if (pRoot)
- (*scrp->EnableDisableFBAccess) (pScreen->myNum, FALSE);
- if (useVirtual)
- {
- scrp->virtualX = randrp->virtualX;
- scrp->virtualY = randrp->virtualY;
- }
- else
- {
- scrp->virtualX = mode->HDisplay;
- scrp->virtualY = mode->VDisplay;
- }
-
- if(randrp->rotation & (RR_Rotate_90 | RR_Rotate_270))
- {
- /* If the screen is rotated 90 or 270 degrees, swap the sizes. */
- pScreen->width = scrp->virtualY;
- pScreen->height = scrp->virtualX;
- pScreen->mmWidth = mmHeight;
- pScreen->mmHeight = mmWidth;
- }
- else
- {
- pScreen->width = scrp->virtualX;
- pScreen->height = scrp->virtualY;
- pScreen->mmWidth = mmWidth;
- pScreen->mmHeight = mmHeight;
- }
- if (scrp->currentMode == mode) {
- /* Save current mode */
- currentMode = scrp->currentMode;
- /* Reset, just so we ensure the drivers SwitchMode is called */
- scrp->currentMode = NULL;
- }
- /*
- * We know that if the driver failed to SwitchMode to the rotated
- * version, then it should revert back to it's prior mode.
- */
- if (!xf86SwitchMode (pScreen, mode))
- {
- ret = FALSE;
- scrp->virtualX = pScreen->width = oldWidth;
- scrp->virtualY = pScreen->height = oldHeight;
- pScreen->mmWidth = oldmmWidth;
- pScreen->mmHeight = oldmmHeight;
- scrp->currentMode = currentMode;
- }
-
- /*
- * Make sure the layout is correct
- */
- xf86ReconfigureLayout();
-
- /*
- * Make sure the whole screen is visible
- */
- xf86SetViewport (pScreen, pScreen->width, pScreen->height);
- xf86SetViewport (pScreen, 0, 0);
- if (pRoot)
- (*scrp->EnableDisableFBAccess) (pScreen->myNum, TRUE);
- return ret;
-}
-
-Bool
-xf86RandR12SetConfig (ScreenPtr pScreen,
- Rotation rotation,
- int rate,
- RRScreenSizePtr pSize)
-{
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- DisplayModePtr mode;
- int pos[MAXDEVICES][2];
- Bool useVirtual = FALSE;
- int maxX = 0, maxY = 0;
- Rotation oldRotation = randrp->rotation;
- DeviceIntPtr dev;
- Bool view_adjusted = FALSE;
-
- randrp->rotation = rotation;
-
- if (randrp->virtualX == -1 || randrp->virtualY == -1)
- {
- randrp->virtualX = scrp->virtualX;
- randrp->virtualY = scrp->virtualY;
- }
-
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (!IsMaster(dev) && !IsFloating(dev))
- continue;
-
- miPointerGetPosition(dev, &pos[dev->id][0], &pos[dev->id][1]);
- }
-
- for (mode = scrp->modes; ; mode = mode->next)
- {
- if (randrp->maxX == 0 || randrp->maxY == 0)
- {
- if (maxX < mode->HDisplay)
- maxX = mode->HDisplay;
- if (maxY < mode->VDisplay)
- maxY = mode->VDisplay;
- }
- if (mode->HDisplay == pSize->width &&
- mode->VDisplay == pSize->height &&
- (rate == 0 || xf86RandR12ModeRefresh (mode) == rate))
- break;
- if (mode->next == scrp->modes)
- {
- if (pSize->width == randrp->virtualX &&
- pSize->height == randrp->virtualY)
- {
- mode = scrp->modes;
- useVirtual = TRUE;
- break;
- }
- if (randrp->maxX == 0 || randrp->maxY == 0)
- {
- randrp->maxX = maxX;
- randrp->maxY = maxY;
- }
- return FALSE;
- }
- }
-
- if (randrp->maxX == 0 || randrp->maxY == 0)
- {
- randrp->maxX = maxX;
- randrp->maxY = maxY;
- }
-
- if (!xf86RandR12SetMode (pScreen, mode, useVirtual, pSize->mmWidth,
- pSize->mmHeight)) {
- randrp->rotation = oldRotation;
- return FALSE;
- }
-
- /*
- * Move the cursor back where it belongs; SwitchMode repositions it
- * FIXME: duplicated code, see modes/xf86RandR12.c
- */
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (!IsMaster(dev) && !IsFloating(dev))
- continue;
-
- if (pScreen == miPointerGetScreen(dev)) {
- int px = pos[dev->id][0];
- int py = pos[dev->id][1];
-
- px = (px >= pScreen->width ? (pScreen->width - 1) : px);
- py = (py >= pScreen->height ? (pScreen->height - 1) : py);
-
- /* Setting the viewpoint makes only sense on one device */
- if (!view_adjusted && IsMaster(dev)) {
- xf86SetViewport(pScreen, px, py);
- view_adjusted = TRUE;
- }
-
- (*pScreen->SetCursorPosition) (dev, pScreen, px, py, FALSE);
- }
- }
-
- return TRUE;
-}
-
-static Bool
-xf86RandR12ScreenSetSize (ScreenPtr pScreen,
- CARD16 width,
- CARD16 height,
- CARD32 mmWidth,
- CARD32 mmHeight)
-{
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- WindowPtr pRoot = pScreen->root;
- PixmapPtr pScrnPix;
- Bool ret = FALSE;
- int c;
-
- if (xf86RandR12Key) {
- if (randrp->virtualX == -1 || randrp->virtualY == -1)
- {
- randrp->virtualX = pScrn->virtualX;
- randrp->virtualY = pScrn->virtualY;
- }
- }
- if (pRoot && pScrn->vtSema)
- (*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE);
-
- /* Let the driver update virtualX and virtualY */
- if (!(*config->funcs->resize)(pScrn, width, height))
- goto finish;
-
- ret = TRUE;
- /* Update panning information */
- for (c = 0; c < config->num_crtc; c++) {
- xf86CrtcPtr crtc = config->crtc[c];
- if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1 ||
- crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
- if (crtc->panningTotalArea.x2 > crtc->panningTrackingArea.x1)
- crtc->panningTotalArea.x2 += width - pScreen->width;
- if (crtc->panningTotalArea.y2 > crtc->panningTrackingArea.y1)
- crtc->panningTotalArea.y2 += height - pScreen->height;
- if (crtc->panningTrackingArea.x2 > crtc->panningTrackingArea.x1)
- crtc->panningTrackingArea.x2 += width - pScreen->width;
- if (crtc->panningTrackingArea.y2 > crtc->panningTrackingArea.y1)
- crtc->panningTrackingArea.y2 += height - pScreen->height;
- xf86RandR13VerifyPanningArea (crtc, width, height);
- xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
- }
- }
-
- pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
- pScreen->width = pScrnPix->drawable.width = width;
- pScreen->height = pScrnPix->drawable.height = height;
- randrp->mmWidth = pScreen->mmWidth = mmWidth;
- randrp->mmHeight = pScreen->mmHeight = mmHeight;
-
- xf86SetViewport (pScreen, pScreen->width-1, pScreen->height-1);
- xf86SetViewport (pScreen, 0, 0);
-
-finish:
- if (pRoot && pScrn->vtSema)
- (*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
-#if RANDR_12_INTERFACE
- if (xf86RandR12Key && pScreen->root && ret)
- RRScreenSizeNotify (pScreen);
-#endif
- return ret;
-}
-
-Rotation
-xf86RandR12GetRotation(ScreenPtr pScreen)
-{
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
-
- return randrp->rotation;
-}
-
-Bool
-xf86RandR12CreateScreenResources (ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CrtcConfigPtr config;
- XF86RandRInfoPtr randrp;
- int c;
- int width, height;
- int mmWidth, mmHeight;
-#ifdef PANORAMIX
- /* XXX disable RandR when using Xinerama */
- if (!noPanoramiXExtension)
- return TRUE;
-#endif
-
- config = XF86_CRTC_CONFIG_PTR(pScrn);
- randrp = XF86RANDRINFO(pScreen);
- /*
- * Compute size of screen
- */
- width = 0; height = 0;
- for (c = 0; c < config->num_crtc; c++)
- {
- xf86CrtcPtr crtc = config->crtc[c];
- int crtc_width = crtc->x + xf86ModeWidth (&crtc->mode, crtc->rotation);
- int crtc_height = crtc->y + xf86ModeHeight (&crtc->mode, crtc->rotation);
-
- if (crtc->enabled) {
- if (crtc_width > width)
- width = crtc_width;
- if (crtc_height > height)
- height = crtc_height;
- if (crtc->panningTotalArea.x2 > width)
- width = crtc->panningTotalArea.x2;
- if (crtc->panningTotalArea.y2 > height)
- height = crtc->panningTotalArea.y2;
- }
- }
-
- if (width && height)
- {
- /*
- * Compute physical size of screen
- */
- if (monitorResolution)
- {
- mmWidth = width * 25.4 / monitorResolution;
- mmHeight = height * 25.4 / monitorResolution;
- }
- else
- {
- xf86OutputPtr output = xf86CompatOutput(pScrn);
-
- if (output &&
- output->conf_monitor &&
- (output->conf_monitor->mon_width > 0 &&
- output->conf_monitor->mon_height > 0))
- {
- /*
- * Prefer user configured DisplaySize
- */
- mmWidth = output->conf_monitor->mon_width;
- mmHeight = output->conf_monitor->mon_height;
- }
- else
- {
- /*
- * Otherwise, just set the screen to DEFAULT_DPI
- */
- mmWidth = width * 25.4 / DEFAULT_DPI;
- mmHeight = height * 25.4 / DEFAULT_DPI;
- }
- }
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Setting screen physical size to %d x %d\n",
- mmWidth, mmHeight);
- /*
- * This is the initial setting of the screen size.
- * We have to pre-set it here, otherwise panning would be adapted
- * to the new screen size.
- */
- pScreen->width = width;
- pScreen->height = height;
- xf86RandR12ScreenSetSize (pScreen,
- width,
- height,
- mmWidth,
- mmHeight);
- }
-
- if (xf86RandR12Key == NULL)
- return TRUE;
-
- if (randrp->virtualX == -1 || randrp->virtualY == -1)
- {
- randrp->virtualX = pScrn->virtualX;
- randrp->virtualY = pScrn->virtualY;
- }
- xf86CrtcSetScreenSubpixelOrder (pScreen);
-#if RANDR_12_INTERFACE
- if (xf86RandR12CreateScreenResources12 (pScreen))
- return TRUE;
-#endif
- return TRUE;
-}
-
-
-Bool
-xf86RandR12Init (ScreenPtr pScreen)
-{
- rrScrPrivPtr rp;
- XF86RandRInfoPtr randrp;
-
-#ifdef PANORAMIX
- /* XXX disable RandR when using Xinerama */
- if (!noPanoramiXExtension)
- {
- if (xf86NumScreens == 1)
- noPanoramiXExtension = TRUE;
- else
- return TRUE;
- }
-#endif
-
- if (xf86RandR12Generation != serverGeneration)
- xf86RandR12Generation = serverGeneration;
-
- xf86RandR12Key = &xf86RandR12KeyRec;
- if (!dixRegisterPrivateKey(&xf86RandR12KeyRec, PRIVATE_SCREEN, 0))
- return FALSE;
-
- randrp = malloc(sizeof (XF86RandRInfoRec));
- if (!randrp)
- return FALSE;
-
- if (!RRScreenInit(pScreen))
- {
- free(randrp);
- return FALSE;
- }
- rp = rrGetScrPriv(pScreen);
- rp->rrGetInfo = xf86RandR12GetInfo;
- rp->rrSetConfig = xf86RandR12SetConfig;
-
- randrp->virtualX = -1;
- randrp->virtualY = -1;
- randrp->mmWidth = pScreen->mmWidth;
- randrp->mmHeight = pScreen->mmHeight;
-
- randrp->rotation = RR_Rotate_0; /* initial rotated mode */
-
- randrp->supported_rotations = RR_Rotate_0;
-
- randrp->maxX = randrp->maxY = 0;
-
- dixSetPrivate(&pScreen->devPrivates, xf86RandR12Key, randrp);
-
-#if RANDR_12_INTERFACE
- if (!xf86RandR12Init12 (pScreen))
- return FALSE;
-#endif
- return TRUE;
-}
-
-void
-xf86RandR12CloseScreen (ScreenPtr pScreen)
-{
- XF86RandRInfoPtr randrp;
-
- if (xf86RandR12Key == NULL)
- return;
-
- randrp = XF86RANDRINFO(pScreen);
-#if RANDR_12_INTERFACE
- xf86Screens[pScreen->myNum]->EnterVT = randrp->orig_EnterVT;
-#endif
-
- free(randrp);
-}
-
-void
-xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations)
-{
- XF86RandRInfoPtr randrp;
-#if RANDR_12_INTERFACE
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- int c;
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
-#endif
-
- if (xf86RandR12Key == NULL)
- return;
-
- randrp = XF86RANDRINFO(pScreen);
-#if RANDR_12_INTERFACE
- for (c = 0; c < config->num_crtc; c++) {
- xf86CrtcPtr crtc = config->crtc[c];
-
- RRCrtcSetRotations (crtc->randr_crtc, rotations);
- }
-#endif
- randrp->supported_rotations = rotations;
-}
-
-void
-xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms)
-{
- XF86RandRInfoPtr randrp;
-#if RANDR_13_INTERFACE
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- int c;
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
-#endif
-
- if (xf86RandR12Key == NULL)
- return;
-
- randrp = XF86RANDRINFO(pScreen);
-#if RANDR_13_INTERFACE
- for (c = 0; c < config->num_crtc; c++) {
- xf86CrtcPtr crtc = config->crtc[c];
-
- RRCrtcSetTransformSupport (crtc->randr_crtc, transforms);
- }
-#endif
-}
-
-void
-xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y)
-{
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
-
- if (xf86RandR12Generation != serverGeneration ||
- XF86RANDRINFO(pScreen)->virtualX == -1)
- {
- *x = pScrn->virtualX;
- *y = pScrn->virtualY;
- } else {
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
-
- *x = randrp->virtualX;
- *y = randrp->virtualY;
- }
-}
-
-#if RANDR_12_INTERFACE
-
-#define FLAG_BITS (RR_HSyncPositive | \
- RR_HSyncNegative | \
- RR_VSyncPositive | \
- RR_VSyncNegative | \
- RR_Interlace | \
- RR_DoubleScan | \
- RR_CSync | \
- RR_CSyncPositive | \
- RR_CSyncNegative | \
- RR_HSkewPresent | \
- RR_BCast | \
- RR_PixelMultiplex | \
- RR_DoubleClock | \
- RR_ClockDivideBy2)
-
-static Bool
-xf86RandRModeMatches (RRModePtr randr_mode,
- DisplayModePtr mode)
-{
-#if 0
- if (match_name)
- {
- /* check for same name */
- int len = strlen (mode->name);
- if (randr_mode->mode.nameLength != len) return FALSE;
- if (memcmp (randr_mode->name, mode->name, len) != 0) return FALSE;
- }
-#endif
-
- /* check for same timings */
- if (randr_mode->mode.dotClock / 1000 != mode->Clock) return FALSE;
- if (randr_mode->mode.width != mode->HDisplay) return FALSE;
- if (randr_mode->mode.hSyncStart != mode->HSyncStart) return FALSE;
- if (randr_mode->mode.hSyncEnd != mode->HSyncEnd) return FALSE;
- if (randr_mode->mode.hTotal != mode->HTotal) return FALSE;
- if (randr_mode->mode.hSkew != mode->HSkew) return FALSE;
- if (randr_mode->mode.height != mode->VDisplay) return FALSE;
- if (randr_mode->mode.vSyncStart != mode->VSyncStart) return FALSE;
- if (randr_mode->mode.vSyncEnd != mode->VSyncEnd) return FALSE;
- if (randr_mode->mode.vTotal != mode->VTotal) return FALSE;
-
- /* check for same flags (using only the XF86 valid flag bits) */
- if ((randr_mode->mode.modeFlags & FLAG_BITS) != (mode->Flags & FLAG_BITS))
- return FALSE;
-
- /* everything matches */
- return TRUE;
-}
-
-static Bool
-xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc)
-{
- ScreenPtr pScreen = randr_crtc->pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- RRModePtr randr_mode = NULL;
- int x;
- int y;
- Rotation rotation;
- int numOutputs;
- RROutputPtr *randr_outputs;
- RROutputPtr randr_output;
- xf86CrtcPtr crtc = randr_crtc->devPrivate;
- xf86OutputPtr output;
- int i, j;
- DisplayModePtr mode = &crtc->mode;
- Bool ret;
-
- randr_outputs = malloc(config->num_output * sizeof (RROutputPtr));
- if (!randr_outputs)
- return FALSE;
- x = crtc->x;
- y = crtc->y;
- rotation = crtc->rotation;
- numOutputs = 0;
- randr_mode = NULL;
- for (i = 0; i < config->num_output; i++)
- {
- output = config->output[i];
- if (output->crtc == crtc)
- {
- randr_output = output->randr_output;
- randr_outputs[numOutputs++] = randr_output;
- /*
- * We make copies of modes, so pointer equality
- * isn't sufficient
- */
- for (j = 0; j < randr_output->numModes + randr_output->numUserModes; j++)
- {
- RRModePtr m = (j < randr_output->numModes ?
- randr_output->modes[j] :
- randr_output->userModes[j-randr_output->numModes]);
-
- if (xf86RandRModeMatches (m, mode))
- {
- randr_mode = m;
- break;
- }
- }
- }
- }
- ret = RRCrtcNotify (randr_crtc, randr_mode, x, y,
- rotation,
- crtc->transformPresent ? &crtc->transform : NULL,
- numOutputs, randr_outputs);
- free(randr_outputs);
- return ret;
-}
-
-/*
- * Convert a RandR mode to a DisplayMode
- */
-static void
-xf86RandRModeConvert (ScrnInfoPtr scrn,
- RRModePtr randr_mode,
- DisplayModePtr mode)
-{
- memset(mode, 0, sizeof(DisplayModeRec));
- mode->status = MODE_OK;
-
- mode->Clock = randr_mode->mode.dotClock / 1000;
-
- mode->HDisplay = randr_mode->mode.width;
- mode->HSyncStart = randr_mode->mode.hSyncStart;
- mode->HSyncEnd = randr_mode->mode.hSyncEnd;
- mode->HTotal = randr_mode->mode.hTotal;
- mode->HSkew = randr_mode->mode.hSkew;
-
- mode->VDisplay = randr_mode->mode.height;
- mode->VSyncStart = randr_mode->mode.vSyncStart;
- mode->VSyncEnd = randr_mode->mode.vSyncEnd;
- mode->VTotal = randr_mode->mode.vTotal;
- mode->VScan = 0;
-
- mode->Flags = randr_mode->mode.modeFlags & FLAG_BITS;
-
- xf86SetModeCrtc (mode, scrn->adjustFlags);
-}
-
-static Bool
-xf86RandR12CrtcSet (ScreenPtr pScreen,
- RRCrtcPtr randr_crtc,
- RRModePtr randr_mode,
- int x,
- int y,
- Rotation rotation,
- int num_randr_outputs,
- RROutputPtr *randr_outputs)
-{
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- xf86CrtcPtr crtc = randr_crtc->devPrivate;
- RRTransformPtr transform;
- Bool changed = FALSE;
- int o, ro;
- xf86CrtcPtr *save_crtcs;
- Bool save_enabled = crtc->enabled;
-
- if (!crtc->scrn->vtSema)
- return FALSE;
-
- save_crtcs = malloc(config->num_output * sizeof (xf86CrtcPtr));
- if ((randr_mode != NULL) != crtc->enabled)
- changed = TRUE;
- else if (randr_mode && !xf86RandRModeMatches (randr_mode, &crtc->mode))
- changed = TRUE;
-
- if (rotation != crtc->rotation)
- changed = TRUE;
-
- transform = RRCrtcGetTransform (randr_crtc);
- if ((transform != NULL) != crtc->transformPresent)
- changed = TRUE;
- else if (transform && memcmp (&transform->transform, &crtc->transform.transform,
- sizeof (transform->transform)) != 0)
- changed = TRUE;
-
- if (x != crtc->x || y != crtc->y)
- changed = TRUE;
- for (o = 0; o < config->num_output; o++)
- {
- xf86OutputPtr output = config->output[o];
- xf86CrtcPtr new_crtc;
-
- save_crtcs[o] = output->crtc;
-
- if (output->crtc == crtc)
- new_crtc = NULL;
- else
- new_crtc = output->crtc;
- for (ro = 0; ro < num_randr_outputs; ro++)
- if (output->randr_output == randr_outputs[ro])
- {
- new_crtc = crtc;
- break;
- }
- if (new_crtc != output->crtc)
- {
- changed = TRUE;
- output->crtc = new_crtc;
- }
- }
- for (ro = 0; ro < num_randr_outputs; ro++)
- if (randr_outputs[ro]->pendingProperties)
- changed = TRUE;
-
- /* XXX need device-independent mode setting code through an API */
- if (changed)
- {
- crtc->enabled = randr_mode != NULL;
-
- if (randr_mode)
- {
- DisplayModeRec mode;
- RRTransformPtr transform = RRCrtcGetTransform (randr_crtc);
-
- xf86RandRModeConvert (pScrn, randr_mode, &mode);
- if (!xf86CrtcSetModeTransform (crtc, &mode, rotation, transform, x, y))
- {
- crtc->enabled = save_enabled;
- for (o = 0; o < config->num_output; o++)
- {
- xf86OutputPtr output = config->output[o];
- output->crtc = save_crtcs[o];
- }
- free(save_crtcs);
- return FALSE;
- }
- xf86RandR13VerifyPanningArea (crtc, pScreen->width, pScreen->height);
- xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
- /*
- * Save the last successful setting for EnterVT
- */
- crtc->desiredMode = mode;
- crtc->desiredRotation = rotation;
- if (transform) {
- crtc->desiredTransform = *transform;
- crtc->desiredTransformPresent = TRUE;
- } else
- crtc->desiredTransformPresent = FALSE;
-
- crtc->desiredX = x;
- crtc->desiredY = y;
- }
- xf86DisableUnusedFunctions (pScrn);
- }
- free(save_crtcs);
- return xf86RandR12CrtcNotify (randr_crtc);
-}
-
-static Bool
-xf86RandR12CrtcSetGamma (ScreenPtr pScreen,
- RRCrtcPtr randr_crtc)
-{
- xf86CrtcPtr crtc = randr_crtc->devPrivate;
-
- if (crtc->funcs->gamma_set == NULL)
- return FALSE;
-
- if (!crtc->scrn->vtSema)
- return TRUE;
-
- /* Realloc local gamma if needed. */
- if (randr_crtc->gammaSize != crtc->gamma_size) {
- CARD16 *tmp_ptr;
- tmp_ptr = realloc(crtc->gamma_red, 3 * crtc->gamma_size * sizeof (CARD16));
- if (!tmp_ptr)
- return FALSE;
- crtc->gamma_red = tmp_ptr;
- crtc->gamma_green = crtc->gamma_red + crtc->gamma_size;
- crtc->gamma_blue = crtc->gamma_green + crtc->gamma_size;
- }
-
- crtc->gamma_size = randr_crtc->gammaSize;
- memcpy (crtc->gamma_red, randr_crtc->gammaRed, crtc->gamma_size * sizeof (CARD16));
- memcpy (crtc->gamma_green, randr_crtc->gammaGreen, crtc->gamma_size * sizeof (CARD16));
- memcpy (crtc->gamma_blue, randr_crtc->gammaBlue, crtc->gamma_size * sizeof (CARD16));
-
- /* Only set it when the crtc is actually running.
- * Otherwise it will be set when it's activated.
- */
- if (crtc->active)
- crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
- crtc->gamma_blue, crtc->gamma_size);
-
- return TRUE;
-}
-
-static Bool
-xf86RandR12CrtcGetGamma (ScreenPtr pScreen,
- RRCrtcPtr randr_crtc)
-{
- xf86CrtcPtr crtc = randr_crtc->devPrivate;
-
- if (!crtc->gamma_size)
- return FALSE;
-
- if (!crtc->gamma_red || !crtc->gamma_green || !crtc->gamma_blue)
- return FALSE;
-
- /* Realloc randr gamma if needed. */
- if (randr_crtc->gammaSize != crtc->gamma_size) {
- CARD16 *tmp_ptr;
- tmp_ptr = realloc(randr_crtc->gammaRed, 3 * crtc->gamma_size * sizeof (CARD16));
- if (!tmp_ptr)
- return FALSE;
- randr_crtc->gammaRed = tmp_ptr;
- randr_crtc->gammaGreen = randr_crtc->gammaRed + crtc->gamma_size;
- randr_crtc->gammaBlue = randr_crtc->gammaGreen + crtc->gamma_size;
- }
- randr_crtc->gammaSize = crtc->gamma_size;
- memcpy (randr_crtc->gammaRed, crtc->gamma_red, crtc->gamma_size * sizeof (CARD16));
- memcpy (randr_crtc->gammaGreen, crtc->gamma_green, crtc->gamma_size * sizeof (CARD16));
- memcpy (randr_crtc->gammaBlue, crtc->gamma_blue, crtc->gamma_size * sizeof (CARD16));
-
- return TRUE;
-}
-
-static Bool
-xf86RandR12OutputSetProperty (ScreenPtr pScreen,
- RROutputPtr randr_output,
- Atom property,
- RRPropertyValuePtr value)
-{
- xf86OutputPtr output = randr_output->devPrivate;
-
- /* If we don't have any property handler, then we don't care what the
- * user is setting properties to.
- */
- if (output->funcs->set_property == NULL)
- return TRUE;
-
- /*
- * This function gets called even when vtSema is FALSE, as
- * drivers will need to remember the correct value to apply
- * when the VT switch occurs
- */
- return output->funcs->set_property(output, property, value);
-}
-
-static Bool
-xf86RandR13OutputGetProperty (ScreenPtr pScreen,
- RROutputPtr randr_output,
- Atom property)
-{
- xf86OutputPtr output = randr_output->devPrivate;
-
- if (output->funcs->get_property == NULL)
- return TRUE;
-
- /* Should be safe even w/o vtSema */
- return output->funcs->get_property(output, property);
-}
-
-static Bool
-xf86RandR12OutputValidateMode (ScreenPtr pScreen,
- RROutputPtr randr_output,
- RRModePtr randr_mode)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86OutputPtr output = randr_output->devPrivate;
- DisplayModeRec mode;
-
- xf86RandRModeConvert (pScrn, randr_mode, &mode);
- /*
- * This function may be called when vtSema is FALSE, so
- * the underlying function must either avoid touching the hardware
- * or return FALSE when vtSema is FALSE
- */
- if (output->funcs->mode_valid (output, &mode) != MODE_OK)
- return FALSE;
- return TRUE;
-}
-
-static void
-xf86RandR12ModeDestroy (ScreenPtr pScreen, RRModePtr randr_mode)
-{
-}
-
-/**
- * Given a list of xf86 modes and a RandR Output object, construct
- * RandR modes and assign them to the output
- */
-static Bool
-xf86RROutputSetModes (RROutputPtr randr_output, DisplayModePtr modes)
-{
- DisplayModePtr mode;
- RRModePtr *rrmodes = NULL;
- int nmode = 0;
- int npreferred = 0;
- Bool ret = TRUE;
- int pref;
-
- for (mode = modes; mode; mode = mode->next)
- nmode++;
-
- if (nmode) {
- rrmodes = malloc(nmode * sizeof (RRModePtr));
-
- if (!rrmodes)
- return FALSE;
- nmode = 0;
-
- for (pref = 1; pref >= 0; pref--) {
- for (mode = modes; mode; mode = mode->next) {
- if ((pref != 0) == ((mode->type & M_T_PREFERRED) != 0)) {
- xRRModeInfo modeInfo;
- RRModePtr rrmode;
-
- modeInfo.nameLength = strlen (mode->name);
- modeInfo.width = mode->HDisplay;
- modeInfo.dotClock = mode->Clock * 1000;
- modeInfo.hSyncStart = mode->HSyncStart;
- modeInfo.hSyncEnd = mode->HSyncEnd;
- modeInfo.hTotal = mode->HTotal;
- modeInfo.hSkew = mode->HSkew;
-
- modeInfo.height = mode->VDisplay;
- modeInfo.vSyncStart = mode->VSyncStart;
- modeInfo.vSyncEnd = mode->VSyncEnd;
- modeInfo.vTotal = mode->VTotal;
- modeInfo.modeFlags = mode->Flags;
-
- rrmode = RRModeGet (&modeInfo, mode->name);
- if (rrmode) {
- rrmodes[nmode++] = rrmode;
- npreferred += pref;
- }
- }
- }
- }
- }
-
- ret = RROutputSetModes (randr_output, rrmodes, nmode, npreferred);
- free(rrmodes);
- return ret;
-}
-
-/*
- * Mirror the current mode configuration to RandR
- */
-static Bool
-xf86RandR12SetInfo12 (ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- RROutputPtr *clones;
- RRCrtcPtr *crtcs;
- int ncrtc;
- int o, c, l;
- RRCrtcPtr randr_crtc;
- int nclone;
-
- clones = malloc(config->num_output * sizeof (RROutputPtr));
- crtcs = malloc(config->num_crtc * sizeof (RRCrtcPtr));
- for (o = 0; o < config->num_output; o++)
- {
- xf86OutputPtr output = config->output[o];
-
- ncrtc = 0;
- for (c = 0; c < config->num_crtc; c++)
- if (output->possible_crtcs & (1 << c))
- crtcs[ncrtc++] = config->crtc[c]->randr_crtc;
-
- if (output->crtc)
- randr_crtc = output->crtc->randr_crtc;
- else
- randr_crtc = NULL;
-
- if (!RROutputSetCrtcs (output->randr_output, crtcs, ncrtc))
- {
- free(crtcs);
- free(clones);
- return FALSE;
- }
-
- RROutputSetPhysicalSize(output->randr_output,
- output->mm_width,
- output->mm_height);
- xf86RROutputSetModes (output->randr_output, output->probed_modes);
-
- switch (output->status) {
- case XF86OutputStatusConnected:
- RROutputSetConnection (output->randr_output, RR_Connected);
- break;
- case XF86OutputStatusDisconnected:
- RROutputSetConnection (output->randr_output, RR_Disconnected);
- break;
- case XF86OutputStatusUnknown:
- RROutputSetConnection (output->randr_output, RR_UnknownConnection);
- break;
- }
-
- RROutputSetSubpixelOrder (output->randr_output, output->subpixel_order);
-
- /*
- * Valid clones
- */
- nclone = 0;
- for (l = 0; l < config->num_output; l++)
- {
- xf86OutputPtr clone = config->output[l];
-
- if (l != o && (output->possible_clones & (1 << l)))
- clones[nclone++] = clone->randr_output;
- }
- if (!RROutputSetClones (output->randr_output, clones, nclone))
- {
- free(crtcs);
- free(clones);
- return FALSE;
- }
- }
- free(crtcs);
- free(clones);
- return TRUE;
-}
-
-
-
-/*
- * Query the hardware for the current state, then mirror
- * that to RandR
- */
-static Bool
-xf86RandR12GetInfo12 (ScreenPtr pScreen, Rotation *rotations)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-
- if (!pScrn->vtSema)
- return TRUE;
- xf86ProbeOutputModes (pScrn, 0, 0);
- xf86SetScrnInfoModes (pScrn);
- return xf86RandR12SetInfo12 (pScreen);
-}
-
-static Bool
-xf86RandR12CreateObjects12 (ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- int c;
- int o;
-
- if (!RRInit ())
- return FALSE;
-
- /*
- * Configure crtcs
- */
- for (c = 0; c < config->num_crtc; c++)
- {
- xf86CrtcPtr crtc = config->crtc[c];
-
- crtc->randr_crtc = RRCrtcCreate (pScreen, crtc);
- RRCrtcGammaSetSize (crtc->randr_crtc, 256);
- }
- /*
- * Configure outputs
- */
- for (o = 0; o < config->num_output; o++)
- {
- xf86OutputPtr output = config->output[o];
-
- output->randr_output = RROutputCreate (pScreen, output->name,
- strlen (output->name),
- output);
-
- if (output->funcs->create_resources != NULL)
- output->funcs->create_resources(output);
- RRPostPendingProperties (output->randr_output);
- }
- return TRUE;
-}
-
-static Bool
-xf86RandR12CreateScreenResources12 (ScreenPtr pScreen)
-{
- int c;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
-
- if (xf86RandR12Key == NULL)
- return TRUE;
-
- for (c = 0; c < config->num_crtc; c++)
- xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
-
- RRScreenSetSizeRange (pScreen, config->minWidth, config->minHeight,
- config->maxWidth, config->maxHeight);
- return TRUE;
-}
-
-/*
- * Something happened within the screen configuration due
- * to DGA, VidMode or hot key. Tell RandR
- */
-
-void
-xf86RandR12TellChanged (ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- int c;
-
- if (xf86RandR12Key == NULL)
- return;
-
- xf86RandR12SetInfo12 (pScreen);
- for (c = 0; c < config->num_crtc; c++)
- xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
-
- RRTellChanged (pScreen);
-}
-
-static void
-xf86RandR12PointerMoved (int scrnIndex, int x, int y)
-{
- ScreenPtr pScreen = screenInfo.screens[scrnIndex];
- ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- int c;
-
- randrp->pointerX = x;
- randrp->pointerY = y;
- for (c = 0; c < config->num_crtc; c++)
- xf86RandR13Pan (config->crtc[c], x, y);
-}
-
-static Bool
-xf86RandR13GetPanning (ScreenPtr pScreen,
- RRCrtcPtr randr_crtc,
- BoxPtr totalArea,
- BoxPtr trackingArea,
- INT16 *border)
-{
- xf86CrtcPtr crtc = randr_crtc->devPrivate;
-
- if (crtc->version < 2)
- return FALSE;
- if (totalArea)
- memcpy (totalArea, &crtc->panningTotalArea, sizeof(BoxRec));
- if (trackingArea)
- memcpy (trackingArea, &crtc->panningTrackingArea, sizeof(BoxRec));
- if (border)
- memcpy (border, crtc->panningBorder, 4*sizeof(INT16));
-
- return TRUE;
-}
-
-static Bool
-xf86RandR13SetPanning (ScreenPtr pScreen,
- RRCrtcPtr randr_crtc,
- BoxPtr totalArea,
- BoxPtr trackingArea,
- INT16 *border)
-{
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- xf86CrtcPtr crtc = randr_crtc->devPrivate;
- BoxRec oldTotalArea;
- BoxRec oldTrackingArea;
- INT16 oldBorder[4];
-
-
- if (crtc->version < 2)
- return FALSE;
-
- memcpy (&oldTotalArea, &crtc->panningTotalArea, sizeof(BoxRec));
- memcpy (&oldTrackingArea, &crtc->panningTrackingArea, sizeof(BoxRec));
- memcpy (oldBorder, crtc->panningBorder, 4*sizeof(INT16));
-
- if (totalArea)
- memcpy (&crtc->panningTotalArea, totalArea, sizeof(BoxRec));
- if (trackingArea)
- memcpy (&crtc->panningTrackingArea, trackingArea, sizeof(BoxRec));
- if (border)
- memcpy (crtc->panningBorder, border, 4*sizeof(INT16));
-
- if (xf86RandR13VerifyPanningArea (crtc, pScreen->width, pScreen->height)) {
- xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
- return TRUE;
- } else {
- /* Restore old settings */
- memcpy (&crtc->panningTotalArea, &oldTotalArea, sizeof(BoxRec));
- memcpy (&crtc->panningTrackingArea, &oldTrackingArea, sizeof(BoxRec));
- memcpy (crtc->panningBorder, oldBorder, 4*sizeof(INT16));
- return FALSE;
- }
-}
-
-/*
- * Compatibility with XF86VidMode's gamma changer. This necessarily clobbers
- * any per-crtc setup. You asked for it...
- */
-
-static void
-gamma_to_ramp(float gamma, CARD16 *ramp, int size)
-{
- int i;
-
- for (i = 0; i < size; i++) {
- if (gamma == 1.0)
- ramp[i] = i << 8;
- else
- ramp[i] = (CARD16)(pow((double)i / (double)(size - 1), 1. / gamma)
- * (double)(size - 1) * 256);
- }
-}
-
-static int
-xf86RandR12ChangeGamma(int scrnIndex, Gamma gamma)
-{
- CARD16 *points, *red, *green, *blue;
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
- RRCrtcPtr crtc = xf86CompatRRCrtc(pScrn);
- int size;
-
- if (!crtc)
- return Success;
-
- size = max(0, crtc->gammaSize);
- if (!size)
- return Success;
-
- points = calloc(size, 3 * sizeof(CARD16));
- if (!points)
- return BadAlloc;
-
- red = points;
- green = points + size;
- blue = points + 2 * size;
-
- gamma_to_ramp(gamma.red, red, size);
- gamma_to_ramp(gamma.green, green, size);
- gamma_to_ramp(gamma.blue, blue, size);
- RRCrtcGammaSet(crtc, red, green, blue);
-
- free(points);
-
- pScrn->gamma = gamma;
-
- return Success;
-}
-
-static Bool
-xf86RandR12EnterVT (int screen_index, int flags)
-{
- ScreenPtr pScreen = screenInfo.screens[screen_index];
- ScrnInfoPtr pScrn = xf86Screens[screen_index];
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- rrScrPrivPtr rp = rrGetScrPriv(pScreen);
- Bool ret;
-
- if (randrp->orig_EnterVT) {
- pScrn->EnterVT = randrp->orig_EnterVT;
- ret = pScrn->EnterVT (screen_index, flags);
- randrp->orig_EnterVT = pScrn->EnterVT;
- pScrn->EnterVT = xf86RandR12EnterVT;
- if (!ret)
- return FALSE;
- }
-
- /* reload gamma */
- int i;
- for (i = 0; i < rp->numCrtcs; i++)
- xf86RandR12CrtcSetGamma(pScreen, rp->crtcs[i]);
-
- return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */
-}
-
-static Bool
-xf86RandR12Init12 (ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- rrScrPrivPtr rp = rrGetScrPriv(pScreen);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- int i;
-
- rp->rrGetInfo = xf86RandR12GetInfo12;
- rp->rrScreenSetSize = xf86RandR12ScreenSetSize;
- rp->rrCrtcSet = xf86RandR12CrtcSet;
- rp->rrCrtcSetGamma = xf86RandR12CrtcSetGamma;
- rp->rrCrtcGetGamma = xf86RandR12CrtcGetGamma;
- rp->rrOutputSetProperty = xf86RandR12OutputSetProperty;
- rp->rrOutputValidateMode = xf86RandR12OutputValidateMode;
-#if RANDR_13_INTERFACE
- rp->rrOutputGetProperty = xf86RandR13OutputGetProperty;
- rp->rrGetPanning = xf86RandR13GetPanning;
- rp->rrSetPanning = xf86RandR13SetPanning;
-#endif
- rp->rrModeDestroy = xf86RandR12ModeDestroy;
- rp->rrSetConfig = NULL;
- pScrn->PointerMoved = xf86RandR12PointerMoved;
- pScrn->ChangeGamma = xf86RandR12ChangeGamma;
-
- randrp->orig_EnterVT = pScrn->EnterVT;
- pScrn->EnterVT = xf86RandR12EnterVT;
-
- if (!xf86RandR12CreateObjects12 (pScreen))
- return FALSE;
-
- /*
- * Configure output modes
- */
- if (!xf86RandR12SetInfo12 (pScreen))
- return FALSE;
- for (i = 0; i < rp->numCrtcs; i++) {
- xf86RandR12CrtcGetGamma(pScreen, rp->crtcs[i]);
- }
- return TRUE;
-}
-
-#endif
-
-Bool
-xf86RandR12PreInit (ScrnInfoPtr pScrn)
-{
- return TRUE;
-}
+/*
+ * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ *
+ * 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, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#else
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#endif
+
+#include "xf86.h"
+#include "os.h"
+#include "globals.h"
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86DDC.h"
+#include "mipointer.h"
+#include "windowstr.h"
+#include "inputstr.h"
+#include <randrstr.h>
+#include <X11/extensions/render.h>
+
+#include "xf86Crtc.h"
+#include "xf86RandR12.h"
+
+typedef struct _xf86RandR12Info {
+ int virtualX;
+ int virtualY;
+ int mmWidth;
+ int mmHeight;
+ int maxX;
+ int maxY;
+ int pointerX;
+ int pointerY;
+ Rotation rotation; /* current mode */
+ Rotation supported_rotations; /* driver supported */
+
+ /* Used to wrap EnterVT so we can re-probe the outputs when a laptop unsuspends
+ * (actually, any time that we switch back into our VT).
+ *
+ * See https://bugs.freedesktop.org/show_bug.cgi?id=21554
+ */
+ xf86EnterVTProc *orig_EnterVT;
+} XF86RandRInfoRec, *XF86RandRInfoPtr;
+
+#ifdef RANDR_12_INTERFACE
+static Bool xf86RandR12Init12 (ScreenPtr pScreen);
+static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen);
+#endif
+
+static int xf86RandR12Generation;
+
+static DevPrivateKeyRec xf86RandR12KeyRec;
+static DevPrivateKey xf86RandR12Key;
+#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \
+ dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key))
+
+
+static int
+xf86RandR12ModeRefresh (DisplayModePtr mode)
+{
+ if (mode->VRefresh)
+ return (int) (mode->VRefresh + 0.5);
+ else
+ return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + 0.5);
+}
+
+/* Adapt panning area; return TRUE if panning area was valid without adaption */
+static int
+xf86RandR13VerifyPanningArea (xf86CrtcPtr crtc, int screenWidth, int screenHeight)
+{
+ int ret = TRUE;
+
+ if (crtc->version < 2)
+ return FALSE;
+
+ if (crtc->panningTotalArea.x2 <= crtc->panningTotalArea.x1) {
+ /* Panning in X is disabled */
+ if (crtc->panningTotalArea.x1 || crtc->panningTotalArea.x2)
+ /* Illegal configuration -> fail/disable */
+ ret = FALSE;
+ crtc->panningTotalArea.x1 = crtc->panningTotalArea.x2 = 0;
+ crtc->panningTrackingArea.x1 = crtc->panningTrackingArea.x2 = 0;
+ crtc->panningBorder[0] = crtc->panningBorder[2] = 0;
+ } else {
+ /* Panning in X is enabled */
+ if (crtc->panningTotalArea.x1 < 0) {
+ /* Panning region outside screen -> move inside */
+ crtc->panningTotalArea.x2 -= crtc->panningTotalArea.x1;
+ crtc->panningTotalArea.x1 = 0;
+ ret = FALSE;
+ }
+ if (crtc->panningTotalArea.x2 < crtc->panningTotalArea.x1 + crtc->mode.HDisplay) {
+ /* Panning region smaller than displayed area -> crop to displayed area */
+ crtc->panningTotalArea.x2 = crtc->panningTotalArea.x1 + crtc->mode.HDisplay;
+ ret = FALSE;
+ }
+ if (crtc->panningTotalArea.x2 > screenWidth) {
+ /* Panning region larger than screen -> move inside, then crop to screen */
+ crtc->panningTotalArea.x1 -= crtc->panningTotalArea.x2 - screenWidth;
+ crtc->panningTotalArea.x2 = screenWidth;
+ ret = FALSE;
+ if (crtc->panningTotalArea.x1 < 0)
+ crtc->panningTotalArea.x1 = 0;
+ }
+ if (crtc->panningBorder[0] + crtc->panningBorder[2] > crtc->mode.HDisplay) {
+ /* Borders too large -> set to 0 */
+ crtc->panningBorder[0] = crtc->panningBorder[2] = 0;
+ ret = FALSE;
+ }
+ }
+
+ if (crtc->panningTotalArea.y2 <= crtc->panningTotalArea.y1) {
+ /* Panning in Y is disabled */
+ if (crtc->panningTotalArea.y1 || crtc->panningTotalArea.y2)
+ /* Illegal configuration -> fail/disable */
+ ret = FALSE;
+ crtc->panningTotalArea.y1 = crtc->panningTotalArea.y2 = 0;
+ crtc->panningTrackingArea.y1 = crtc->panningTrackingArea.y2 = 0;
+ crtc->panningBorder[1] = crtc->panningBorder[3] = 0;
+ } else {
+ /* Panning in Y is enabled */
+ if (crtc->panningTotalArea.y1 < 0) {
+ /* Panning region outside screen -> move inside */
+ crtc->panningTotalArea.y2 -= crtc->panningTotalArea.y1;
+ crtc->panningTotalArea.y1 = 0;
+ ret = FALSE;
+ }
+ if (crtc->panningTotalArea.y2 < crtc->panningTotalArea.y1 + crtc->mode.VDisplay) {
+ /* Panning region smaller than displayed area -> crop to displayed area */
+ crtc->panningTotalArea.y2 = crtc->panningTotalArea.y1 + crtc->mode.VDisplay;
+ ret = FALSE;
+ }
+ if (crtc->panningTotalArea.y2 > screenHeight) {
+ /* Panning region larger than screen -> move inside, then crop to screen */
+ crtc->panningTotalArea.y1 -= crtc->panningTotalArea.y2 - screenHeight;
+ crtc->panningTotalArea.y2 = screenHeight;
+ ret = FALSE;
+ if (crtc->panningTotalArea.y1 < 0)
+ crtc->panningTotalArea.y1 = 0;
+ }
+ if (crtc->panningBorder[1] + crtc->panningBorder[3] > crtc->mode.VDisplay) {
+ /* Borders too large -> set to 0 */
+ crtc->panningBorder[1] = crtc->panningBorder[3] = 0;
+ ret = FALSE;
+ }
+ }
+
+ return ret;
+}
+
+/*
+ * The heart of the panning operation:
+ *
+ * Given a frame buffer position (fb_x, fb_y),
+ * and a crtc position (crtc_x, crtc_y),
+ * and a transform matrix which maps frame buffer to crtc,
+ * compute a panning position (pan_x, pan_y) that
+ * makes the resulting transform line those two up
+ */
+
+static void
+xf86ComputeCrtcPan (Bool transform_in_use,
+ struct pixman_f_transform *m,
+ double screen_x, double screen_y,
+ double crtc_x, double crtc_y,
+ int old_pan_x, int old_pan_y,
+ int *new_pan_x, int *new_pan_y)
+{
+ if (transform_in_use) {
+ /*
+ * Given the current transform, M, the current position
+ * on the Screen, S, and the desired position on the CRTC,
+ * C, compute a translation, T, such that:
+ *
+ * M T S = C
+ *
+ * where T is of the form
+ *
+ * | 1 0 dx |
+ * | 0 1 dy |
+ * | 0 0 1 |
+ *
+ * M T S =
+ * | M00 Sx + M01 Sy + M00 dx + M01 dy + M02 | | Cx F |
+ * | M10 Sx + M11 Sy + M10 dx + M11 dy + M12 | = | Cy F |
+ * | M20 Sx + M21 Sy + M20 dx + M21 dy + M22 | | F |
+ *
+ * R = M S
+ *
+ * Cx F = M00 dx + M01 dy + R0
+ * Cy F = M10 dx + M11 dy + R1
+ * F = M20 dx + M21 dy + R2
+ *
+ * Zero out dx, then dy
+ *
+ * F (Cx M10 - Cy M00) =
+ * (M10 M01 - M00 M11) dy + M10 R0 - M00 R1
+ * F (M10 - Cy M20) =
+ * (M10 M21 - M20 M11) dy + M10 R2 - M20 R1
+ *
+ * F (Cx M11 - Cy M01) =
+ * (M11 M00 - M01 M10) dx + M11 R0 - M01 R1
+ * F (M11 - Cy M21) =
+ * (M11 M20 - M21 M10) dx + M11 R2 - M21 R1
+ *
+ * Make some temporaries
+ *
+ * T = | Cx M10 - Cy M00 |
+ * | Cx M11 - Cy M01 |
+ *
+ * U = | M10 M01 - M00 M11 |
+ * | M11 M00 - M01 M10 |
+ *
+ * Q = | M10 R0 - M00 R1 |
+ * | M11 R0 - M01 R1 |
+ *
+ * P = | M10 - Cy M20 |
+ * | M11 - Cy M21 |
+ *
+ * W = | M10 M21 - M20 M11 |
+ * | M11 M20 - M21 M10 |
+ *
+ * V = | M10 R2 - M20 R1 |
+ * | M11 R2 - M21 R1 |
+ *
+ * Rewrite:
+ *
+ * F T0 = U0 dy + Q0
+ * F P0 = W0 dy + V0
+ * F T1 = U1 dx + Q1
+ * F P1 = W1 dx + V1
+ *
+ * Solve for F (two ways)
+ *
+ * F (W0 T0 - U0 P0) = W0 Q0 - U0 V0
+ *
+ * W0 Q0 - U0 V0
+ * F = -------------
+ * W0 T0 - U0 P0
+ *
+ * F (W1 T1 - U1 P1) = W1 Q1 - U1 V1
+ *
+ * W1 Q1 - U1 V1
+ * F = -------------
+ * W1 T1 - U1 P1
+ *
+ * We'll use which ever solution works (denominator != 0)
+ *
+ * Finally, solve for dx and dy:
+ *
+ * dx = (F T1 - Q1) / U1
+ * dx = (F P1 - V1) / W1
+ *
+ * dy = (F T0 - Q0) / U0
+ * dy = (F P0 - V0) / W0
+ */
+ double r[3];
+ double q[2], u[2], t[2], v[2], w[2], p[2];
+ double f;
+ struct pict_f_vector d;
+ int i;
+
+ /* Get the un-normalized crtc coordinates again */
+ for (i = 0; i < 3; i++)
+ r[i] = m->m[i][0] * screen_x + m->m[i][1] * screen_y + m->m[i][2];
+
+ /* Combine values into temporaries */
+ for (i = 0; i < 2; i++) {
+ q[i] = m->m[1][i] * r[0] - m->m[0][i] * r[1];
+ u[i] = m->m[1][i] * m->m[0][1-i] - m->m[0][i] * m->m[1][1-i];
+ t[i] = m->m[1][i] * crtc_x - m->m[0][i] * crtc_y;
+
+ v[i] = m->m[1][i] * r[2] - m->m[2][i] * r[1];
+ w[i] = m->m[1][i] * m->m[2][1-i] - m->m[2][i] * m->m[1][1-i];
+ p[i] = m->m[1][i] - m->m[2][i] * crtc_y;
+ }
+
+ /* Find a way to compute f */
+ f = 0;
+ for (i = 0; i < 2; i++) {
+ double a = w[i] * q[i] - u[i] * v[i];
+ double b = w[i] * t[i] - u[i] * p[i];
+ if (b != 0) {
+ f = a/b;
+ break;
+ }
+ }
+
+ /* Solve for the resulting transform vector */
+ for (i = 0; i < 2; i++) {
+ if (u[i])
+ d.v[1-i] = (t[i] * f - q[i]) / u[i];
+ else if (w[1])
+ d.v[1-i] = (p[i] * f - v[i]) / w[i];
+ else
+ d.v[1-i] = 0;
+ }
+ *new_pan_x = old_pan_x - floor (d.v[0] + 0.5);
+ *new_pan_y = old_pan_y - floor (d.v[1] + 0.5);
+ } else {
+ *new_pan_x = screen_x - crtc_x;
+ *new_pan_y = screen_y - crtc_y;
+ }
+}
+
+static void
+xf86RandR13Pan (xf86CrtcPtr crtc, int x, int y)
+{
+ int newX, newY;
+ int width, height;
+ Bool panned = FALSE;
+
+ if (crtc->version < 2)
+ return;
+
+ if (! crtc->enabled ||
+ (crtc->panningTotalArea.x2 <= crtc->panningTotalArea.x1 &&
+ crtc->panningTotalArea.y2 <= crtc->panningTotalArea.y1))
+ return;
+
+ newX = crtc->x;
+ newY = crtc->y;
+ width = crtc->mode.HDisplay;
+ height = crtc->mode.VDisplay;
+
+ if ((crtc->panningTrackingArea.x2 <= crtc->panningTrackingArea.x1 ||
+ (x >= crtc->panningTrackingArea.x1 && x < crtc->panningTrackingArea.x2)) &&
+ (crtc->panningTrackingArea.y2 <= crtc->panningTrackingArea.y1 ||
+ (y >= crtc->panningTrackingArea.y1 && y < crtc->panningTrackingArea.y2)))
+ {
+ struct pict_f_vector c;
+
+ /*
+ * Pre-clip the mouse position to the panning area so that we don't
+ * push the crtc outside. This doesn't deal with changes to the
+ * panning values, only mouse position changes.
+ */
+ if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1)
+ {
+ if (x < crtc->panningTotalArea.x1)
+ x = crtc->panningTotalArea.x1;
+ if (x >= crtc->panningTotalArea.x2)
+ x = crtc->panningTotalArea.x2 - 1;
+ }
+ if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1)
+ {
+ if (y < crtc->panningTotalArea.y1)
+ y = crtc->panningTotalArea.y1;
+ if (y >= crtc->panningTotalArea.y2)
+ y = crtc->panningTotalArea.y2 - 1;
+ }
+
+ c.v[0] = x;
+ c.v[1] = y;
+ c.v[2] = 1.0;
+ if (crtc->transform_in_use) {
+ pixman_f_transform_point(&crtc->f_framebuffer_to_crtc, &c);
+ } else {
+ c.v[0] -= crtc->x;
+ c.v[1] -= crtc->y;
+ }
+
+ if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) {
+ if (c.v[0] < crtc->panningBorder[0]) {
+ c.v[0] = crtc->panningBorder[0];
+ panned = TRUE;
+ }
+ if (c.v[0] >= width - crtc->panningBorder[2]) {
+ c.v[0] = width - crtc->panningBorder[2] - 1;
+ panned = TRUE;
+ }
+ }
+ if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
+ if (c.v[1] < crtc->panningBorder[1]) {
+ c.v[1] = crtc->panningBorder[1];
+ panned = TRUE;
+ }
+ if (c.v[1] >= height - crtc->panningBorder[3]) {
+ c.v[1] = height - crtc->panningBorder[3] - 1;
+ panned = TRUE;
+ }
+ }
+ if (panned)
+ xf86ComputeCrtcPan (crtc->transform_in_use,
+ &crtc->f_framebuffer_to_crtc,
+ x, y, c.v[0], c.v[1],
+ newX, newY, &newX, &newY);
+ }
+
+ /*
+ * Ensure that the crtc is within the panning region.
+ *
+ * XXX This computation only works when we do not have a transform
+ * in use.
+ */
+ if (!crtc->transform_in_use)
+ {
+ /* Validate against [xy]1 after [xy]2, to be sure that results are > 0 for [xy]1 > 0 */
+ if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) {
+ if (newX > crtc->panningTotalArea.x2 - width)
+ newX = crtc->panningTotalArea.x2 - width;
+ if (newX < crtc->panningTotalArea.x1)
+ newX = crtc->panningTotalArea.x1;
+ }
+ if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
+ if (newY > crtc->panningTotalArea.y2 - height)
+ newY = crtc->panningTotalArea.y2 - height;
+ if (newY < crtc->panningTotalArea.y1)
+ newY = crtc->panningTotalArea.y1;
+ }
+ }
+ if (newX != crtc->x || newY != crtc->y)
+ xf86CrtcSetOrigin (crtc, newX, newY);
+}
+
+static Bool
+xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations)
+{
+ RRScreenSizePtr pSize;
+ ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ DisplayModePtr mode;
+ int refresh0 = 60;
+ int maxX = 0, maxY = 0;
+
+ *rotations = randrp->supported_rotations;
+
+ if (randrp->virtualX == -1 || randrp->virtualY == -1)
+ {
+ randrp->virtualX = scrp->virtualX;
+ randrp->virtualY = scrp->virtualY;
+ }
+
+ /* Re-probe the outputs for new monitors or modes */
+ if (scrp->vtSema)
+ {
+ xf86ProbeOutputModes (scrp, 0, 0);
+ xf86SetScrnInfoModes (scrp);
+ }
+
+ for (mode = scrp->modes; ; mode = mode->next)
+ {
+ int refresh = xf86RandR12ModeRefresh (mode);
+ if (randrp->maxX == 0 || randrp->maxY == 0)
+ {
+ if (maxX < mode->HDisplay)
+ maxX = mode->HDisplay;
+ if (maxY < mode->VDisplay)
+ maxY = mode->VDisplay;
+ }
+ if (mode == scrp->modes)
+ refresh0 = refresh;
+ pSize = RRRegisterSize (pScreen,
+ mode->HDisplay, mode->VDisplay,
+ randrp->mmWidth, randrp->mmHeight);
+ if (!pSize)
+ return FALSE;
+ RRRegisterRate (pScreen, pSize, refresh);
+
+ if (xf86ModesEqual(mode, scrp->currentMode))
+ {
+ RRSetCurrentConfig (pScreen, randrp->rotation, refresh, pSize);
+ }
+ if (mode->next == scrp->modes)
+ break;
+ }
+
+ if (randrp->maxX == 0 || randrp->maxY == 0)
+ {
+ randrp->maxX = maxX;
+ randrp->maxY = maxY;
+ }
+
+ return TRUE;
+}
+
+static Bool
+xf86RandR12SetMode (ScreenPtr pScreen,
+ DisplayModePtr mode,
+ Bool useVirtual,
+ int mmWidth,
+ int mmHeight)
+{
+ ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ int oldWidth = pScreen->width;
+ int oldHeight = pScreen->height;
+ int oldmmWidth = pScreen->mmWidth;
+ int oldmmHeight = pScreen->mmHeight;
+ WindowPtr pRoot = pScreen->root;
+ DisplayModePtr currentMode = NULL;
+ Bool ret = TRUE;
+
+ if (pRoot)
+ (*scrp->EnableDisableFBAccess) (pScreen->myNum, FALSE);
+ if (useVirtual)
+ {
+ scrp->virtualX = randrp->virtualX;
+ scrp->virtualY = randrp->virtualY;
+ }
+ else
+ {
+ scrp->virtualX = mode->HDisplay;
+ scrp->virtualY = mode->VDisplay;
+ }
+
+ if(randrp->rotation & (RR_Rotate_90 | RR_Rotate_270))
+ {
+ /* If the screen is rotated 90 or 270 degrees, swap the sizes. */
+ pScreen->width = scrp->virtualY;
+ pScreen->height = scrp->virtualX;
+ pScreen->mmWidth = mmHeight;
+ pScreen->mmHeight = mmWidth;
+ }
+ else
+ {
+ pScreen->width = scrp->virtualX;
+ pScreen->height = scrp->virtualY;
+ pScreen->mmWidth = mmWidth;
+ pScreen->mmHeight = mmHeight;
+ }
+ if (scrp->currentMode == mode) {
+ /* Save current mode */
+ currentMode = scrp->currentMode;
+ /* Reset, just so we ensure the drivers SwitchMode is called */
+ scrp->currentMode = NULL;
+ }
+ /*
+ * We know that if the driver failed to SwitchMode to the rotated
+ * version, then it should revert back to it's prior mode.
+ */
+ if (!xf86SwitchMode (pScreen, mode))
+ {
+ ret = FALSE;
+ scrp->virtualX = pScreen->width = oldWidth;
+ scrp->virtualY = pScreen->height = oldHeight;
+ pScreen->mmWidth = oldmmWidth;
+ pScreen->mmHeight = oldmmHeight;
+ scrp->currentMode = currentMode;
+ }
+
+ /*
+ * Make sure the layout is correct
+ */
+ xf86ReconfigureLayout();
+
+ /*
+ * Make sure the whole screen is visible
+ */
+ xf86SetViewport (pScreen, pScreen->width, pScreen->height);
+ xf86SetViewport (pScreen, 0, 0);
+ if (pRoot)
+ (*scrp->EnableDisableFBAccess) (pScreen->myNum, TRUE);
+ return ret;
+}
+
+Bool
+xf86RandR12SetConfig (ScreenPtr pScreen,
+ Rotation rotation,
+ int rate,
+ RRScreenSizePtr pSize)
+{
+ ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ DisplayModePtr mode;
+ int pos[MAXDEVICES][2];
+ Bool useVirtual = FALSE;
+ int maxX = 0, maxY = 0;
+ Rotation oldRotation = randrp->rotation;
+ DeviceIntPtr dev;
+ Bool view_adjusted = FALSE;
+
+ randrp->rotation = rotation;
+
+ if (randrp->virtualX == -1 || randrp->virtualY == -1)
+ {
+ randrp->virtualX = scrp->virtualX;
+ randrp->virtualY = scrp->virtualY;
+ }
+
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (!IsMaster(dev) && !IsFloating(dev))
+ continue;
+
+ miPointerGetPosition(dev, &pos[dev->id][0], &pos[dev->id][1]);
+ }
+
+ for (mode = scrp->modes; ; mode = mode->next)
+ {
+ if (randrp->maxX == 0 || randrp->maxY == 0)
+ {
+ if (maxX < mode->HDisplay)
+ maxX = mode->HDisplay;
+ if (maxY < mode->VDisplay)
+ maxY = mode->VDisplay;
+ }
+ if (mode->HDisplay == pSize->width &&
+ mode->VDisplay == pSize->height &&
+ (rate == 0 || xf86RandR12ModeRefresh (mode) == rate))
+ break;
+ if (mode->next == scrp->modes)
+ {
+ if (pSize->width == randrp->virtualX &&
+ pSize->height == randrp->virtualY)
+ {
+ mode = scrp->modes;
+ useVirtual = TRUE;
+ break;
+ }
+ if (randrp->maxX == 0 || randrp->maxY == 0)
+ {
+ randrp->maxX = maxX;
+ randrp->maxY = maxY;
+ }
+ return FALSE;
+ }
+ }
+
+ if (randrp->maxX == 0 || randrp->maxY == 0)
+ {
+ randrp->maxX = maxX;
+ randrp->maxY = maxY;
+ }
+
+ if (!xf86RandR12SetMode (pScreen, mode, useVirtual, pSize->mmWidth,
+ pSize->mmHeight)) {
+ randrp->rotation = oldRotation;
+ return FALSE;
+ }
+
+ /*
+ * Move the cursor back where it belongs; SwitchMode repositions it
+ * FIXME: duplicated code, see modes/xf86RandR12.c
+ */
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (!IsMaster(dev) && !IsFloating(dev))
+ continue;
+
+ if (pScreen == miPointerGetScreen(dev)) {
+ int px = pos[dev->id][0];
+ int py = pos[dev->id][1];
+
+ px = (px >= pScreen->width ? (pScreen->width - 1) : px);
+ py = (py >= pScreen->height ? (pScreen->height - 1) : py);
+
+ /* Setting the viewpoint makes only sense on one device */
+ if (!view_adjusted && IsMaster(dev)) {
+ xf86SetViewport(pScreen, px, py);
+ view_adjusted = TRUE;
+ }
+
+ (*pScreen->SetCursorPosition) (dev, pScreen, px, py, FALSE);
+ }
+ }
+
+ return TRUE;
+}
+
+static Bool
+xf86RandR12ScreenSetSize (ScreenPtr pScreen,
+ CARD16 width,
+ CARD16 height,
+ CARD32 mmWidth,
+ CARD32 mmHeight)
+{
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ WindowPtr pRoot = pScreen->root;
+ PixmapPtr pScrnPix;
+ Bool ret = FALSE;
+ int c;
+
+ if (xf86RandR12Key) {
+ if (randrp->virtualX == -1 || randrp->virtualY == -1)
+ {
+ randrp->virtualX = pScrn->virtualX;
+ randrp->virtualY = pScrn->virtualY;
+ }
+ }
+ if (pRoot && pScrn->vtSema)
+ (*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE);
+
+ /* Let the driver update virtualX and virtualY */
+ if (!(*config->funcs->resize)(pScrn, width, height))
+ goto finish;
+
+ ret = TRUE;
+ /* Update panning information */
+ for (c = 0; c < config->num_crtc; c++) {
+ xf86CrtcPtr crtc = config->crtc[c];
+ if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1 ||
+ crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
+ if (crtc->panningTotalArea.x2 > crtc->panningTrackingArea.x1)
+ crtc->panningTotalArea.x2 += width - pScreen->width;
+ if (crtc->panningTotalArea.y2 > crtc->panningTrackingArea.y1)
+ crtc->panningTotalArea.y2 += height - pScreen->height;
+ if (crtc->panningTrackingArea.x2 > crtc->panningTrackingArea.x1)
+ crtc->panningTrackingArea.x2 += width - pScreen->width;
+ if (crtc->panningTrackingArea.y2 > crtc->panningTrackingArea.y1)
+ crtc->panningTrackingArea.y2 += height - pScreen->height;
+ xf86RandR13VerifyPanningArea (crtc, width, height);
+ xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
+ }
+ }
+
+ pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
+ pScreen->width = pScrnPix->drawable.width = width;
+ pScreen->height = pScrnPix->drawable.height = height;
+ randrp->mmWidth = pScreen->mmWidth = mmWidth;
+ randrp->mmHeight = pScreen->mmHeight = mmHeight;
+
+ xf86SetViewport (pScreen, pScreen->width-1, pScreen->height-1);
+ xf86SetViewport (pScreen, 0, 0);
+
+finish:
+ if (pRoot && pScrn->vtSema)
+ (*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
+#if RANDR_12_INTERFACE
+ if (xf86RandR12Key && pScreen->root && ret)
+ RRScreenSizeNotify (pScreen);
+#endif
+ return ret;
+}
+
+Rotation
+xf86RandR12GetRotation(ScreenPtr pScreen)
+{
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+
+ return randrp->rotation;
+}
+
+Bool
+xf86RandR12CreateScreenResources (ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86CrtcConfigPtr config;
+ XF86RandRInfoPtr randrp;
+ int c;
+ int width, height;
+ int mmWidth, mmHeight;
+#ifdef PANORAMIX
+ /* XXX disable RandR when using Xinerama */
+ if (!noPanoramiXExtension)
+ return TRUE;
+#endif
+
+ config = XF86_CRTC_CONFIG_PTR(pScrn);
+ randrp = XF86RANDRINFO(pScreen);
+ /*
+ * Compute size of screen
+ */
+ width = 0; height = 0;
+ for (c = 0; c < config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = config->crtc[c];
+ int crtc_width = crtc->x + xf86ModeWidth (&crtc->mode, crtc->rotation);
+ int crtc_height = crtc->y + xf86ModeHeight (&crtc->mode, crtc->rotation);
+
+ if (crtc->enabled) {
+ if (crtc_width > width)
+ width = crtc_width;
+ if (crtc_height > height)
+ height = crtc_height;
+ if (crtc->panningTotalArea.x2 > width)
+ width = crtc->panningTotalArea.x2;
+ if (crtc->panningTotalArea.y2 > height)
+ height = crtc->panningTotalArea.y2;
+ }
+ }
+
+ if (width && height)
+ {
+ /*
+ * Compute physical size of screen
+ */
+ if (monitorResolution)
+ {
+ mmWidth = width * 25.4 / monitorResolution;
+ mmHeight = height * 25.4 / monitorResolution;
+ }
+ else
+ {
+ xf86OutputPtr output = xf86CompatOutput(pScrn);
+
+ if (output &&
+ output->conf_monitor &&
+ (output->conf_monitor->mon_width > 0 &&
+ output->conf_monitor->mon_height > 0))
+ {
+ /*
+ * Prefer user configured DisplaySize
+ */
+ mmWidth = output->conf_monitor->mon_width;
+ mmHeight = output->conf_monitor->mon_height;
+ }
+ else
+ {
+ /*
+ * Otherwise, just set the screen to DEFAULT_DPI
+ */
+ mmWidth = width * 25.4 / DEFAULT_DPI;
+ mmHeight = height * 25.4 / DEFAULT_DPI;
+ }
+ }
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Setting screen physical size to %d x %d\n",
+ mmWidth, mmHeight);
+ /*
+ * This is the initial setting of the screen size.
+ * We have to pre-set it here, otherwise panning would be adapted
+ * to the new screen size.
+ */
+ pScreen->width = width;
+ pScreen->height = height;
+ xf86RandR12ScreenSetSize (pScreen,
+ width,
+ height,
+ mmWidth,
+ mmHeight);
+ }
+
+ if (xf86RandR12Key == NULL)
+ return TRUE;
+
+ if (randrp->virtualX == -1 || randrp->virtualY == -1)
+ {
+ randrp->virtualX = pScrn->virtualX;
+ randrp->virtualY = pScrn->virtualY;
+ }
+ xf86CrtcSetScreenSubpixelOrder (pScreen);
+#if RANDR_12_INTERFACE
+ if (xf86RandR12CreateScreenResources12 (pScreen))
+ return TRUE;
+#endif
+ return TRUE;
+}
+
+
+Bool
+xf86RandR12Init (ScreenPtr pScreen)
+{
+ rrScrPrivPtr rp;
+ XF86RandRInfoPtr randrp;
+
+#ifdef PANORAMIX
+ /* XXX disable RandR when using Xinerama */
+ if (!noPanoramiXExtension)
+ {
+ if (xf86NumScreens == 1)
+ noPanoramiXExtension = TRUE;
+ else
+ return TRUE;
+ }
+#endif
+
+ if (xf86RandR12Generation != serverGeneration)
+ xf86RandR12Generation = serverGeneration;
+
+ xf86RandR12Key = &xf86RandR12KeyRec;
+ if (!dixRegisterPrivateKey(&xf86RandR12KeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
+ randrp = malloc(sizeof (XF86RandRInfoRec));
+ if (!randrp)
+ return FALSE;
+
+ if (!RRScreenInit(pScreen))
+ {
+ free(randrp);
+ return FALSE;
+ }
+ rp = rrGetScrPriv(pScreen);
+ rp->rrGetInfo = xf86RandR12GetInfo;
+ rp->rrSetConfig = xf86RandR12SetConfig;
+
+ randrp->virtualX = -1;
+ randrp->virtualY = -1;
+ randrp->mmWidth = pScreen->mmWidth;
+ randrp->mmHeight = pScreen->mmHeight;
+
+ randrp->rotation = RR_Rotate_0; /* initial rotated mode */
+
+ randrp->supported_rotations = RR_Rotate_0;
+
+ randrp->maxX = randrp->maxY = 0;
+
+ dixSetPrivate(&pScreen->devPrivates, xf86RandR12Key, randrp);
+
+#if RANDR_12_INTERFACE
+ if (!xf86RandR12Init12 (pScreen))
+ return FALSE;
+#endif
+ return TRUE;
+}
+
+void
+xf86RandR12CloseScreen (ScreenPtr pScreen)
+{
+ XF86RandRInfoPtr randrp;
+
+ if (xf86RandR12Key == NULL)
+ return;
+
+ randrp = XF86RANDRINFO(pScreen);
+#if RANDR_12_INTERFACE
+ xf86Screens[pScreen->myNum]->EnterVT = randrp->orig_EnterVT;
+#endif
+
+ free(randrp);
+}
+
+void
+xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations)
+{
+ XF86RandRInfoPtr randrp;
+#if RANDR_12_INTERFACE
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ int c;
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+#endif
+
+ if (xf86RandR12Key == NULL)
+ return;
+
+ randrp = XF86RANDRINFO(pScreen);
+#if RANDR_12_INTERFACE
+ for (c = 0; c < config->num_crtc; c++) {
+ xf86CrtcPtr crtc = config->crtc[c];
+
+ RRCrtcSetRotations (crtc->randr_crtc, rotations);
+ }
+#endif
+ randrp->supported_rotations = rotations;
+}
+
+void
+xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms)
+{
+ XF86RandRInfoPtr randrp;
+#if RANDR_13_INTERFACE
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ int c;
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+#endif
+
+ if (xf86RandR12Key == NULL)
+ return;
+
+ randrp = XF86RANDRINFO(pScreen);
+#if RANDR_13_INTERFACE
+ for (c = 0; c < config->num_crtc; c++) {
+ xf86CrtcPtr crtc = config->crtc[c];
+
+ RRCrtcSetTransformSupport (crtc->randr_crtc, transforms);
+ }
+#endif
+}
+
+void
+xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y)
+{
+ ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
+
+ if (xf86RandR12Generation != serverGeneration ||
+ XF86RANDRINFO(pScreen)->virtualX == -1)
+ {
+ *x = pScrn->virtualX;
+ *y = pScrn->virtualY;
+ } else {
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+
+ *x = randrp->virtualX;
+ *y = randrp->virtualY;
+ }
+}
+
+#if RANDR_12_INTERFACE
+
+#define FLAG_BITS (RR_HSyncPositive | \
+ RR_HSyncNegative | \
+ RR_VSyncPositive | \
+ RR_VSyncNegative | \
+ RR_Interlace | \
+ RR_DoubleScan | \
+ RR_CSync | \
+ RR_CSyncPositive | \
+ RR_CSyncNegative | \
+ RR_HSkewPresent | \
+ RR_BCast | \
+ RR_PixelMultiplex | \
+ RR_DoubleClock | \
+ RR_ClockDivideBy2)
+
+static Bool
+xf86RandRModeMatches (RRModePtr randr_mode,
+ DisplayModePtr mode)
+{
+#if 0
+ if (match_name)
+ {
+ /* check for same name */
+ int len = strlen (mode->name);
+ if (randr_mode->mode.nameLength != len) return FALSE;
+ if (memcmp (randr_mode->name, mode->name, len) != 0) return FALSE;
+ }
+#endif
+
+ /* check for same timings */
+ if (randr_mode->mode.dotClock / 1000 != mode->Clock) return FALSE;
+ if (randr_mode->mode.width != mode->HDisplay) return FALSE;
+ if (randr_mode->mode.hSyncStart != mode->HSyncStart) return FALSE;
+ if (randr_mode->mode.hSyncEnd != mode->HSyncEnd) return FALSE;
+ if (randr_mode->mode.hTotal != mode->HTotal) return FALSE;
+ if (randr_mode->mode.hSkew != mode->HSkew) return FALSE;
+ if (randr_mode->mode.height != mode->VDisplay) return FALSE;
+ if (randr_mode->mode.vSyncStart != mode->VSyncStart) return FALSE;
+ if (randr_mode->mode.vSyncEnd != mode->VSyncEnd) return FALSE;
+ if (randr_mode->mode.vTotal != mode->VTotal) return FALSE;
+
+ /* check for same flags (using only the XF86 valid flag bits) */
+ if ((randr_mode->mode.modeFlags & FLAG_BITS) != (mode->Flags & FLAG_BITS))
+ return FALSE;
+
+ /* everything matches */
+ return TRUE;
+}
+
+static Bool
+xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc)
+{
+ ScreenPtr pScreen = randr_crtc->pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ RRModePtr randr_mode = NULL;
+ int x;
+ int y;
+ Rotation rotation;
+ int numOutputs;
+ RROutputPtr *randr_outputs;
+ RROutputPtr randr_output;
+ xf86CrtcPtr crtc = randr_crtc->devPrivate;
+ xf86OutputPtr output;
+ int i, j;
+ DisplayModePtr mode = &crtc->mode;
+ Bool ret;
+
+ randr_outputs = malloc(config->num_output * sizeof (RROutputPtr));
+ if (!randr_outputs)
+ return FALSE;
+ x = crtc->x;
+ y = crtc->y;
+ rotation = crtc->rotation;
+ numOutputs = 0;
+ randr_mode = NULL;
+ for (i = 0; i < config->num_output; i++)
+ {
+ output = config->output[i];
+ if (output->crtc == crtc)
+ {
+ randr_output = output->randr_output;
+ randr_outputs[numOutputs++] = randr_output;
+ /*
+ * We make copies of modes, so pointer equality
+ * isn't sufficient
+ */
+ for (j = 0; j < randr_output->numModes + randr_output->numUserModes; j++)
+ {
+ RRModePtr m = (j < randr_output->numModes ?
+ randr_output->modes[j] :
+ randr_output->userModes[j-randr_output->numModes]);
+
+ if (xf86RandRModeMatches (m, mode))
+ {
+ randr_mode = m;
+ break;
+ }
+ }
+ }
+ }
+ ret = RRCrtcNotify (randr_crtc, randr_mode, x, y,
+ rotation,
+ crtc->transformPresent ? &crtc->transform : NULL,
+ numOutputs, randr_outputs);
+ free(randr_outputs);
+ return ret;
+}
+
+/*
+ * Convert a RandR mode to a DisplayMode
+ */
+static void
+xf86RandRModeConvert (ScrnInfoPtr scrn,
+ RRModePtr randr_mode,
+ DisplayModePtr mode)
+{
+ memset(mode, 0, sizeof(DisplayModeRec));
+ mode->status = MODE_OK;
+
+ mode->Clock = randr_mode->mode.dotClock / 1000;
+
+ mode->HDisplay = randr_mode->mode.width;
+ mode->HSyncStart = randr_mode->mode.hSyncStart;
+ mode->HSyncEnd = randr_mode->mode.hSyncEnd;
+ mode->HTotal = randr_mode->mode.hTotal;
+ mode->HSkew = randr_mode->mode.hSkew;
+
+ mode->VDisplay = randr_mode->mode.height;
+ mode->VSyncStart = randr_mode->mode.vSyncStart;
+ mode->VSyncEnd = randr_mode->mode.vSyncEnd;
+ mode->VTotal = randr_mode->mode.vTotal;
+ mode->VScan = 0;
+
+ mode->Flags = randr_mode->mode.modeFlags & FLAG_BITS;
+
+ xf86SetModeCrtc (mode, scrn->adjustFlags);
+}
+
+static Bool
+xf86RandR12CrtcSet (ScreenPtr pScreen,
+ RRCrtcPtr randr_crtc,
+ RRModePtr randr_mode,
+ int x,
+ int y,
+ Rotation rotation,
+ int num_randr_outputs,
+ RROutputPtr *randr_outputs)
+{
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ xf86CrtcPtr crtc = randr_crtc->devPrivate;
+ RRTransformPtr transform;
+ Bool changed = FALSE;
+ int o, ro;
+ xf86CrtcPtr *save_crtcs;
+ Bool save_enabled = crtc->enabled;
+
+ if (!crtc->scrn->vtSema)
+ return FALSE;
+
+ save_crtcs = malloc(config->num_output * sizeof (xf86CrtcPtr));
+ if ((randr_mode != NULL) != crtc->enabled)
+ changed = TRUE;
+ else if (randr_mode && !xf86RandRModeMatches (randr_mode, &crtc->mode))
+ changed = TRUE;
+
+ if (rotation != crtc->rotation)
+ changed = TRUE;
+
+ transform = RRCrtcGetTransform (randr_crtc);
+ if ((transform != NULL) != crtc->transformPresent)
+ changed = TRUE;
+ else if (transform && memcmp (&transform->transform, &crtc->transform.transform,
+ sizeof (transform->transform)) != 0)
+ changed = TRUE;
+
+ if (x != crtc->x || y != crtc->y)
+ changed = TRUE;
+ for (o = 0; o < config->num_output; o++)
+ {
+ xf86OutputPtr output = config->output[o];
+ xf86CrtcPtr new_crtc;
+
+ save_crtcs[o] = output->crtc;
+
+ if (output->crtc == crtc)
+ new_crtc = NULL;
+ else
+ new_crtc = output->crtc;
+ for (ro = 0; ro < num_randr_outputs; ro++)
+ if (output->randr_output == randr_outputs[ro])
+ {
+ new_crtc = crtc;
+ break;
+ }
+ if (new_crtc != output->crtc)
+ {
+ changed = TRUE;
+ output->crtc = new_crtc;
+ }
+ }
+ for (ro = 0; ro < num_randr_outputs; ro++)
+ if (randr_outputs[ro]->pendingProperties)
+ changed = TRUE;
+
+ /* XXX need device-independent mode setting code through an API */
+ if (changed)
+ {
+ crtc->enabled = randr_mode != NULL;
+
+ if (randr_mode)
+ {
+ DisplayModeRec mode;
+ RRTransformPtr transform = RRCrtcGetTransform (randr_crtc);
+
+ xf86RandRModeConvert (pScrn, randr_mode, &mode);
+ if (!xf86CrtcSetModeTransform (crtc, &mode, rotation, transform, x, y))
+ {
+ crtc->enabled = save_enabled;
+ for (o = 0; o < config->num_output; o++)
+ {
+ xf86OutputPtr output = config->output[o];
+ output->crtc = save_crtcs[o];
+ }
+ free(save_crtcs);
+ return FALSE;
+ }
+ xf86RandR13VerifyPanningArea (crtc, pScreen->width, pScreen->height);
+ xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
+ /*
+ * Save the last successful setting for EnterVT
+ */
+ crtc->desiredMode = mode;
+ crtc->desiredRotation = rotation;
+ if (transform) {
+ crtc->desiredTransform = *transform;
+ crtc->desiredTransformPresent = TRUE;
+ } else
+ crtc->desiredTransformPresent = FALSE;
+
+ crtc->desiredX = x;
+ crtc->desiredY = y;
+ }
+ xf86DisableUnusedFunctions (pScrn);
+ }
+ free(save_crtcs);
+ return xf86RandR12CrtcNotify (randr_crtc);
+}
+
+static Bool
+xf86RandR12CrtcSetGamma (ScreenPtr pScreen,
+ RRCrtcPtr randr_crtc)
+{
+ xf86CrtcPtr crtc = randr_crtc->devPrivate;
+
+ if (crtc->funcs->gamma_set == NULL)
+ return FALSE;
+
+ if (!crtc->scrn->vtSema)
+ return TRUE;
+
+ /* Realloc local gamma if needed. */
+ if (randr_crtc->gammaSize != crtc->gamma_size) {
+ CARD16 *tmp_ptr;
+ tmp_ptr = realloc(crtc->gamma_red, 3 * crtc->gamma_size * sizeof (CARD16));
+ if (!tmp_ptr)
+ return FALSE;
+ crtc->gamma_red = tmp_ptr;
+ crtc->gamma_green = crtc->gamma_red + crtc->gamma_size;
+ crtc->gamma_blue = crtc->gamma_green + crtc->gamma_size;
+ }
+
+ crtc->gamma_size = randr_crtc->gammaSize;
+ memcpy (crtc->gamma_red, randr_crtc->gammaRed, crtc->gamma_size * sizeof (CARD16));
+ memcpy (crtc->gamma_green, randr_crtc->gammaGreen, crtc->gamma_size * sizeof (CARD16));
+ memcpy (crtc->gamma_blue, randr_crtc->gammaBlue, crtc->gamma_size * sizeof (CARD16));
+
+ /* Only set it when the crtc is actually running.
+ * Otherwise it will be set when it's activated.
+ */
+ if (crtc->active)
+ crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
+ crtc->gamma_blue, crtc->gamma_size);
+
+ return TRUE;
+}
+
+static Bool
+xf86RandR12CrtcGetGamma (ScreenPtr pScreen,
+ RRCrtcPtr randr_crtc)
+{
+ xf86CrtcPtr crtc = randr_crtc->devPrivate;
+
+ if (!crtc->gamma_size)
+ return FALSE;
+
+ if (!crtc->gamma_red || !crtc->gamma_green || !crtc->gamma_blue)
+ return FALSE;
+
+ /* Realloc randr gamma if needed. */
+ if (randr_crtc->gammaSize != crtc->gamma_size) {
+ CARD16 *tmp_ptr;
+ tmp_ptr = realloc(randr_crtc->gammaRed, 3 * crtc->gamma_size * sizeof (CARD16));
+ if (!tmp_ptr)
+ return FALSE;
+ randr_crtc->gammaRed = tmp_ptr;
+ randr_crtc->gammaGreen = randr_crtc->gammaRed + crtc->gamma_size;
+ randr_crtc->gammaBlue = randr_crtc->gammaGreen + crtc->gamma_size;
+ }
+ randr_crtc->gammaSize = crtc->gamma_size;
+ memcpy (randr_crtc->gammaRed, crtc->gamma_red, crtc->gamma_size * sizeof (CARD16));
+ memcpy (randr_crtc->gammaGreen, crtc->gamma_green, crtc->gamma_size * sizeof (CARD16));
+ memcpy (randr_crtc->gammaBlue, crtc->gamma_blue, crtc->gamma_size * sizeof (CARD16));
+
+ return TRUE;
+}
+
+static Bool
+xf86RandR12OutputSetProperty (ScreenPtr pScreen,
+ RROutputPtr randr_output,
+ Atom property,
+ RRPropertyValuePtr value)
+{
+ xf86OutputPtr output = randr_output->devPrivate;
+
+ /* If we don't have any property handler, then we don't care what the
+ * user is setting properties to.
+ */
+ if (output->funcs->set_property == NULL)
+ return TRUE;
+
+ /*
+ * This function gets called even when vtSema is FALSE, as
+ * drivers will need to remember the correct value to apply
+ * when the VT switch occurs
+ */
+ return output->funcs->set_property(output, property, value);
+}
+
+static Bool
+xf86RandR13OutputGetProperty (ScreenPtr pScreen,
+ RROutputPtr randr_output,
+ Atom property)
+{
+ xf86OutputPtr output = randr_output->devPrivate;
+
+ if (output->funcs->get_property == NULL)
+ return TRUE;
+
+ /* Should be safe even w/o vtSema */
+ return output->funcs->get_property(output, property);
+}
+
+static Bool
+xf86RandR12OutputValidateMode (ScreenPtr pScreen,
+ RROutputPtr randr_output,
+ RRModePtr randr_mode)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86OutputPtr output = randr_output->devPrivate;
+ DisplayModeRec mode;
+
+ xf86RandRModeConvert (pScrn, randr_mode, &mode);
+ /*
+ * This function may be called when vtSema is FALSE, so
+ * the underlying function must either avoid touching the hardware
+ * or return FALSE when vtSema is FALSE
+ */
+ if (output->funcs->mode_valid (output, &mode) != MODE_OK)
+ return FALSE;
+ return TRUE;
+}
+
+static void
+xf86RandR12ModeDestroy (ScreenPtr pScreen, RRModePtr randr_mode)
+{
+}
+
+/**
+ * Given a list of xf86 modes and a RandR Output object, construct
+ * RandR modes and assign them to the output
+ */
+static Bool
+xf86RROutputSetModes (RROutputPtr randr_output, DisplayModePtr modes)
+{
+ DisplayModePtr mode;
+ RRModePtr *rrmodes = NULL;
+ int nmode = 0;
+ int npreferred = 0;
+ Bool ret = TRUE;
+ int pref;
+
+ for (mode = modes; mode; mode = mode->next)
+ nmode++;
+
+ if (nmode) {
+ rrmodes = malloc(nmode * sizeof (RRModePtr));
+
+ if (!rrmodes)
+ return FALSE;
+ nmode = 0;
+
+ for (pref = 1; pref >= 0; pref--) {
+ for (mode = modes; mode; mode = mode->next) {
+ if ((pref != 0) == ((mode->type & M_T_PREFERRED) != 0)) {
+ xRRModeInfo modeInfo;
+ RRModePtr rrmode;
+
+ modeInfo.nameLength = strlen (mode->name);
+ modeInfo.width = mode->HDisplay;
+ modeInfo.dotClock = mode->Clock * 1000;
+ modeInfo.hSyncStart = mode->HSyncStart;
+ modeInfo.hSyncEnd = mode->HSyncEnd;
+ modeInfo.hTotal = mode->HTotal;
+ modeInfo.hSkew = mode->HSkew;
+
+ modeInfo.height = mode->VDisplay;
+ modeInfo.vSyncStart = mode->VSyncStart;
+ modeInfo.vSyncEnd = mode->VSyncEnd;
+ modeInfo.vTotal = mode->VTotal;
+ modeInfo.modeFlags = mode->Flags;
+
+ rrmode = RRModeGet (&modeInfo, mode->name);
+ if (rrmode) {
+ rrmodes[nmode++] = rrmode;
+ npreferred += pref;
+ }
+ }
+ }
+ }
+ }
+
+ ret = RROutputSetModes (randr_output, rrmodes, nmode, npreferred);
+ free(rrmodes);
+ return ret;
+}
+
+/*
+ * Mirror the current mode configuration to RandR
+ */
+static Bool
+xf86RandR12SetInfo12 (ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ RROutputPtr *clones;
+ RRCrtcPtr *crtcs;
+ int ncrtc;
+ int o, c, l;
+ RRCrtcPtr randr_crtc;
+ int nclone;
+
+ clones = malloc(config->num_output * sizeof (RROutputPtr));
+ crtcs = malloc(config->num_crtc * sizeof (RRCrtcPtr));
+ for (o = 0; o < config->num_output; o++)
+ {
+ xf86OutputPtr output = config->output[o];
+
+ ncrtc = 0;
+ for (c = 0; c < config->num_crtc; c++)
+ if (output->possible_crtcs & (1 << c))
+ crtcs[ncrtc++] = config->crtc[c]->randr_crtc;
+
+ if (output->crtc)
+ randr_crtc = output->crtc->randr_crtc;
+ else
+ randr_crtc = NULL;
+
+ if (!RROutputSetCrtcs (output->randr_output, crtcs, ncrtc))
+ {
+ free(crtcs);
+ free(clones);
+ return FALSE;
+ }
+
+ RROutputSetPhysicalSize(output->randr_output,
+ output->mm_width,
+ output->mm_height);
+ xf86RROutputSetModes (output->randr_output, output->probed_modes);
+
+ switch (output->status) {
+ case XF86OutputStatusConnected:
+ RROutputSetConnection (output->randr_output, RR_Connected);
+ break;
+ case XF86OutputStatusDisconnected:
+ RROutputSetConnection (output->randr_output, RR_Disconnected);
+ break;
+ case XF86OutputStatusUnknown:
+ RROutputSetConnection (output->randr_output, RR_UnknownConnection);
+ break;
+ }
+
+ RROutputSetSubpixelOrder (output->randr_output, output->subpixel_order);
+
+ /*
+ * Valid clones
+ */
+ nclone = 0;
+ for (l = 0; l < config->num_output; l++)
+ {
+ xf86OutputPtr clone = config->output[l];
+
+ if (l != o && (output->possible_clones & (1 << l)))
+ clones[nclone++] = clone->randr_output;
+ }
+ if (!RROutputSetClones (output->randr_output, clones, nclone))
+ {
+ free(crtcs);
+ free(clones);
+ return FALSE;
+ }
+ }
+ free(crtcs);
+ free(clones);
+ return TRUE;
+}
+
+
+
+/*
+ * Query the hardware for the current state, then mirror
+ * that to RandR
+ */
+static Bool
+xf86RandR12GetInfo12 (ScreenPtr pScreen, Rotation *rotations)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+
+ if (!pScrn->vtSema)
+ return TRUE;
+ xf86ProbeOutputModes (pScrn, 0, 0);
+ xf86SetScrnInfoModes (pScrn);
+ return xf86RandR12SetInfo12 (pScreen);
+}
+
+static Bool
+xf86RandR12CreateObjects12 (ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ int c;
+ int o;
+
+ if (!RRInit ())
+ return FALSE;
+
+ /*
+ * Configure crtcs
+ */
+ for (c = 0; c < config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = config->crtc[c];
+
+ crtc->randr_crtc = RRCrtcCreate (pScreen, crtc);
+ RRCrtcGammaSetSize (crtc->randr_crtc, 256);
+ }
+ /*
+ * Configure outputs
+ */
+ for (o = 0; o < config->num_output; o++)
+ {
+ xf86OutputPtr output = config->output[o];
+
+ output->randr_output = RROutputCreate (pScreen, output->name,
+ strlen (output->name),
+ output);
+
+ if (output->funcs->create_resources != NULL)
+ output->funcs->create_resources(output);
+ RRPostPendingProperties (output->randr_output);
+ }
+ return TRUE;
+}
+
+static Bool
+xf86RandR12CreateScreenResources12 (ScreenPtr pScreen)
+{
+ int c;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+
+ if (xf86RandR12Key == NULL)
+ return TRUE;
+
+ for (c = 0; c < config->num_crtc; c++)
+ xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
+
+ RRScreenSetSizeRange (pScreen, config->minWidth, config->minHeight,
+ config->maxWidth, config->maxHeight);
+ return TRUE;
+}
+
+/*
+ * Something happened within the screen configuration due
+ * to DGA, VidMode or hot key. Tell RandR
+ */
+
+void
+xf86RandR12TellChanged (ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ int c;
+
+ if (xf86RandR12Key == NULL)
+ return;
+
+ xf86RandR12SetInfo12 (pScreen);
+ for (c = 0; c < config->num_crtc; c++)
+ xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
+
+ RRTellChanged (pScreen);
+}
+
+static void
+xf86RandR12PointerMoved (int scrnIndex, int x, int y)
+{
+ ScreenPtr pScreen = screenInfo.screens[scrnIndex];
+ ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ int c;
+
+ randrp->pointerX = x;
+ randrp->pointerY = y;
+ for (c = 0; c < config->num_crtc; c++)
+ xf86RandR13Pan (config->crtc[c], x, y);
+}
+
+static Bool
+xf86RandR13GetPanning (ScreenPtr pScreen,
+ RRCrtcPtr randr_crtc,
+ BoxPtr totalArea,
+ BoxPtr trackingArea,
+ INT16 *border)
+{
+ xf86CrtcPtr crtc = randr_crtc->devPrivate;
+
+ if (crtc->version < 2)
+ return FALSE;
+ if (totalArea)
+ memcpy (totalArea, &crtc->panningTotalArea, sizeof(BoxRec));
+ if (trackingArea)
+ memcpy (trackingArea, &crtc->panningTrackingArea, sizeof(BoxRec));
+ if (border)
+ memcpy (border, crtc->panningBorder, 4*sizeof(INT16));
+
+ return TRUE;
+}
+
+static Bool
+xf86RandR13SetPanning (ScreenPtr pScreen,
+ RRCrtcPtr randr_crtc,
+ BoxPtr totalArea,
+ BoxPtr trackingArea,
+ INT16 *border)
+{
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ xf86CrtcPtr crtc = randr_crtc->devPrivate;
+ BoxRec oldTotalArea;
+ BoxRec oldTrackingArea;
+ INT16 oldBorder[4];
+
+
+ if (crtc->version < 2)
+ return FALSE;
+
+ memcpy (&oldTotalArea, &crtc->panningTotalArea, sizeof(BoxRec));
+ memcpy (&oldTrackingArea, &crtc->panningTrackingArea, sizeof(BoxRec));
+ memcpy (oldBorder, crtc->panningBorder, 4*sizeof(INT16));
+
+ if (totalArea)
+ memcpy (&crtc->panningTotalArea, totalArea, sizeof(BoxRec));
+ if (trackingArea)
+ memcpy (&crtc->panningTrackingArea, trackingArea, sizeof(BoxRec));
+ if (border)
+ memcpy (crtc->panningBorder, border, 4*sizeof(INT16));
+
+ if (xf86RandR13VerifyPanningArea (crtc, pScreen->width, pScreen->height)) {
+ xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
+ return TRUE;
+ } else {
+ /* Restore old settings */
+ memcpy (&crtc->panningTotalArea, &oldTotalArea, sizeof(BoxRec));
+ memcpy (&crtc->panningTrackingArea, &oldTrackingArea, sizeof(BoxRec));
+ memcpy (crtc->panningBorder, oldBorder, 4*sizeof(INT16));
+ return FALSE;
+ }
+}
+
+/*
+ * Compatibility with XF86VidMode's gamma changer. This necessarily clobbers
+ * any per-crtc setup. You asked for it...
+ */
+
+static void
+gamma_to_ramp(float gamma, CARD16 *ramp, int size)
+{
+ int i;
+
+ for (i = 0; i < size; i++) {
+ if (gamma == 1.0)
+ ramp[i] = i << 8;
+ else
+ ramp[i] = (CARD16)(pow((double)i / (double)(size - 1), 1. / gamma)
+ * (double)(size - 1) * 256);
+ }
+}
+
+static int
+xf86RandR12ChangeGamma(int scrnIndex, Gamma gamma)
+{
+ CARD16 *points, *red, *green, *blue;
+ ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ RRCrtcPtr crtc = xf86CompatRRCrtc(pScrn);
+ int size;
+
+ if (!crtc)
+ return Success;
+
+ size = max(0, crtc->gammaSize);
+ if (!size)
+ return Success;
+
+ points = calloc(size, 3 * sizeof(CARD16));
+ if (!points)
+ return BadAlloc;
+
+ red = points;
+ green = points + size;
+ blue = points + 2 * size;
+
+ gamma_to_ramp(gamma.red, red, size);
+ gamma_to_ramp(gamma.green, green, size);
+ gamma_to_ramp(gamma.blue, blue, size);
+ RRCrtcGammaSet(crtc, red, green, blue);
+
+ free(points);
+
+ pScrn->gamma = gamma;
+
+ return Success;
+}
+
+static Bool
+xf86RandR12EnterVT (int screen_index, int flags)
+{
+ ScreenPtr pScreen = screenInfo.screens[screen_index];
+ ScrnInfoPtr pScrn = xf86Screens[screen_index];
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ rrScrPrivPtr rp = rrGetScrPriv(pScreen);
+ Bool ret;
+
+ if (randrp->orig_EnterVT) {
+ pScrn->EnterVT = randrp->orig_EnterVT;
+ ret = pScrn->EnterVT (screen_index, flags);
+ randrp->orig_EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = xf86RandR12EnterVT;
+ if (!ret)
+ return FALSE;
+ }
+
+ /* reload gamma */
+ int i;
+ for (i = 0; i < rp->numCrtcs; i++)
+ xf86RandR12CrtcSetGamma(pScreen, rp->crtcs[i]);
+
+ return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */
+}
+
+static Bool
+xf86RandR12Init12 (ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ rrScrPrivPtr rp = rrGetScrPriv(pScreen);
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ int i;
+
+ rp->rrGetInfo = xf86RandR12GetInfo12;
+ rp->rrScreenSetSize = xf86RandR12ScreenSetSize;
+ rp->rrCrtcSet = xf86RandR12CrtcSet;
+ rp->rrCrtcSetGamma = xf86RandR12CrtcSetGamma;
+ rp->rrCrtcGetGamma = xf86RandR12CrtcGetGamma;
+ rp->rrOutputSetProperty = xf86RandR12OutputSetProperty;
+ rp->rrOutputValidateMode = xf86RandR12OutputValidateMode;
+#if RANDR_13_INTERFACE
+ rp->rrOutputGetProperty = xf86RandR13OutputGetProperty;
+ rp->rrGetPanning = xf86RandR13GetPanning;
+ rp->rrSetPanning = xf86RandR13SetPanning;
+#endif
+ rp->rrModeDestroy = xf86RandR12ModeDestroy;
+ rp->rrSetConfig = NULL;
+ pScrn->PointerMoved = xf86RandR12PointerMoved;
+ pScrn->ChangeGamma = xf86RandR12ChangeGamma;
+
+ randrp->orig_EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = xf86RandR12EnterVT;
+
+ if (!xf86RandR12CreateObjects12 (pScreen))
+ return FALSE;
+
+ /*
+ * Configure output modes
+ */
+ if (!xf86RandR12SetInfo12 (pScreen))
+ return FALSE;
+ for (i = 0; i < rp->numCrtcs; i++) {
+ xf86RandR12CrtcGetGamma(pScreen, rp->crtcs[i]);
+ }
+ return TRUE;
+}
+
+#endif
+
+Bool
+xf86RandR12PreInit (ScrnInfoPtr pScrn)
+{
+ return TRUE;
+}
diff --git a/xorg-server/hw/xfree86/modes/xf86Rotate.c b/xorg-server/hw/xfree86/modes/xf86Rotate.c
index 57c3499ac..655857597 100644
--- a/xorg-server/hw/xfree86/modes/xf86Rotate.c
+++ b/xorg-server/hw/xfree86/modes/xf86Rotate.c
@@ -1,525 +1,525 @@
-/*
- * Copyright © 2006 Keith Packard
- *
- * 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, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#else
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#endif
-
-#include <stddef.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "xf86.h"
-#include "xf86DDC.h"
-#include "fb.h"
-#include "windowstr.h"
-#include "xf86Crtc.h"
-#include "xf86Modes.h"
-#include "xf86RandR12.h"
-#include "X11/extensions/render.h"
-#include "X11/extensions/dpmsconst.h"
-#include "X11/Xatom.h"
-
-/* borrowed from composite extension, move to Render and publish? */
-
-static VisualPtr
-compGetWindowVisual (WindowPtr pWin)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
- VisualID vid = wVisual (pWin);
- int i;
-
- for (i = 0; i < pScreen->numVisuals; i++)
- if (pScreen->visuals[i].vid == vid)
- return &pScreen->visuals[i];
- return 0;
-}
-
-static PictFormatPtr
-compWindowFormat (WindowPtr pWin)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
- return PictureMatchVisual (pScreen, pWin->drawable.depth,
- compGetWindowVisual (pWin));
-}
-
-#define F(x) IntToxFixed(x)
-
-#define toF(x) ((float) (x) / 65536.0f)
-
-static void
-xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
-{
- ScrnInfoPtr scrn = crtc->scrn;
- ScreenPtr screen = scrn->pScreen;
- WindowPtr root = screen->root;
- PixmapPtr dst_pixmap = crtc->rotatedPixmap;
- PictFormatPtr format = compWindowFormat (screen->root);
- int error;
- PicturePtr src, dst;
- int n = RegionNumRects(region);
- BoxPtr b = RegionRects(region);
- XID include_inferiors = IncludeInferiors;
-
- src = CreatePicture (None,
- &root->drawable,
- format,
- CPSubwindowMode,
- &include_inferiors,
- serverClient,
- &error);
- if (!src)
- return;
-
- dst = CreatePicture (None,
- &dst_pixmap->drawable,
- format,
- 0L,
- NULL,
- serverClient,
- &error);
- if (!dst)
- return;
-
- error = SetPictureTransform (src, &crtc->crtc_to_framebuffer);
- if (error)
- return;
- if (crtc->transform_in_use && crtc->filter)
- SetPicturePictFilter (src, crtc->filter,
- crtc->params, crtc->nparams);
-
- if (crtc->shadowClear)
- {
- CompositePicture (PictOpSrc,
- src, NULL, dst,
- 0, 0, 0, 0, 0, 0,
- crtc->mode.HDisplay, crtc->mode.VDisplay);
- crtc->shadowClear = FALSE;
- }
- else
- {
- while (n--)
- {
- BoxRec dst_box;
-
- dst_box = *b;
- dst_box.x1 -= crtc->filter_width >> 1;
- dst_box.x2 += crtc->filter_width >> 1;
- dst_box.y1 -= crtc->filter_height >> 1;
- dst_box.y2 += crtc->filter_height >> 1;
- pixman_f_transform_bounds (&crtc->f_framebuffer_to_crtc, &dst_box);
- CompositePicture (PictOpSrc,
- src, NULL, dst,
- dst_box.x1, dst_box.y1, 0, 0, dst_box.x1, dst_box.y1,
- dst_box.x2 - dst_box.x1,
- dst_box.y2 - dst_box.y1);
- b++;
- }
- }
- FreePicture (src, None);
- FreePicture (dst, None);
-}
-
-static void
-xf86CrtcDamageShadow (xf86CrtcPtr crtc)
-{
- ScrnInfoPtr pScrn = crtc->scrn;
- BoxRec damage_box;
- RegionRec damage_region;
- ScreenPtr pScreen = pScrn->pScreen;
-
- damage_box.x1 = 0;
- damage_box.x2 = crtc->mode.HDisplay;
- damage_box.y1 = 0;
- damage_box.y2 = crtc->mode.VDisplay;
- if (!pixman_transform_bounds (&crtc->crtc_to_framebuffer, &damage_box))
- {
- damage_box.x1 = 0;
- damage_box.y1 = 0;
- damage_box.x2 = pScreen->width;
- damage_box.y2 = pScreen->height;
- }
- if (damage_box.x1 < 0) damage_box.x1 = 0;
- if (damage_box.y1 < 0) damage_box.y1 = 0;
- if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width;
- if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height;
- RegionInit(&damage_region, &damage_box, 1);
- DamageDamageRegion (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
- &damage_region);
- RegionUninit(&damage_region);
- crtc->shadowClear = TRUE;
-}
-
-static void
-xf86RotatePrepare (ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- int c;
-
- for (c = 0; c < xf86_config->num_crtc; c++)
- {
- xf86CrtcPtr crtc = xf86_config->crtc[c];
-
- if (crtc->rotatedData && !crtc->rotatedPixmap)
- {
- crtc->rotatedPixmap = crtc->funcs->shadow_create (crtc,
- crtc->rotatedData,
- crtc->mode.HDisplay,
- crtc->mode.VDisplay);
- if (!xf86_config->rotation_damage_registered)
- {
- /* Hook damage to screen pixmap */
- DamageRegister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
- xf86_config->rotation_damage);
- xf86_config->rotation_damage_registered = TRUE;
- EnableLimitedSchedulingLatency();
- }
-
- xf86CrtcDamageShadow (crtc);
- }
- }
-}
-
-static Bool
-xf86RotateRedisplay(ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- DamagePtr damage = xf86_config->rotation_damage;
- RegionPtr region;
-
- if (!damage)
- return FALSE;
- xf86RotatePrepare (pScreen);
- region = DamageRegion(damage);
- if (RegionNotEmpty(region))
- {
- int c;
- SourceValidateProcPtr SourceValidate;
-
- /*
- * SourceValidate is used by the software cursor code
- * to pull the cursor off of the screen when reading
- * bits from the frame buffer. Bypassing this function
- * leaves the software cursor in place
- */
- SourceValidate = pScreen->SourceValidate;
- pScreen->SourceValidate = NULL;
-
- for (c = 0; c < xf86_config->num_crtc; c++)
- {
- xf86CrtcPtr crtc = xf86_config->crtc[c];
-
- if (crtc->transform_in_use && crtc->enabled)
- {
- RegionRec crtc_damage;
-
- /* compute portion of damage that overlaps crtc */
- RegionInit(&crtc_damage, &crtc->bounds, 1);
- RegionIntersect(&crtc_damage, &crtc_damage, region);
-
- /* update damaged region */
- if (RegionNotEmpty(&crtc_damage))
- xf86RotateCrtcRedisplay (crtc, &crtc_damage);
-
- RegionUninit(&crtc_damage);
- }
- }
- pScreen->SourceValidate = SourceValidate;
- DamageEmpty(damage);
- }
- return TRUE;
-}
-
-static void
-xf86RotateBlockHandler(int screenNum, pointer blockData,
- pointer pTimeout, pointer pReadmask)
-{
- ScreenPtr pScreen = screenInfo.screens[screenNum];
- ScrnInfoPtr pScrn = xf86Screens[screenNum];
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- Bool rotation_active;
-
- rotation_active = xf86RotateRedisplay(pScreen);
- pScreen->BlockHandler = xf86_config->BlockHandler;
- (*pScreen->BlockHandler) (screenNum, blockData, pTimeout, pReadmask);
- /* cannot avoid re-wrapping until all wrapping is audited */
- xf86_config->BlockHandler = pScreen->BlockHandler;
- pScreen->BlockHandler = xf86RotateBlockHandler;
-}
-
-void
-xf86RotateDestroy (xf86CrtcPtr crtc)
-{
- ScrnInfoPtr pScrn = crtc->scrn;
- ScreenPtr pScreen = pScrn->pScreen;
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- int c;
-
- /* Free memory from rotation */
- if (crtc->rotatedPixmap || crtc->rotatedData)
- {
- crtc->funcs->shadow_destroy (crtc, crtc->rotatedPixmap, crtc->rotatedData);
- crtc->rotatedPixmap = NULL;
- crtc->rotatedData = NULL;
- }
-
- for (c = 0; c < xf86_config->num_crtc; c++)
- if (xf86_config->crtc[c]->transform_in_use)
- return;
-
- /*
- * Clean up damage structures when no crtcs are rotated
- */
- if (xf86_config->rotation_damage)
- {
- /* Free damage structure */
- if (xf86_config->rotation_damage_registered)
- {
- DamageUnregister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
- xf86_config->rotation_damage);
- xf86_config->rotation_damage_registered = FALSE;
- DisableLimitedSchedulingLatency();
- }
- DamageDestroy (xf86_config->rotation_damage);
- xf86_config->rotation_damage = NULL;
- }
-}
-
-void
-xf86RotateFreeShadow(ScrnInfoPtr pScrn)
-{
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- int c;
-
- for (c = 0; c < config->num_crtc; c++) {
- xf86CrtcPtr crtc = config->crtc[c];
-
- if (crtc->rotatedPixmap || crtc->rotatedData) {
- crtc->funcs->shadow_destroy(crtc, crtc->rotatedPixmap,
- crtc->rotatedData);
- crtc->rotatedPixmap = NULL;
- crtc->rotatedData = NULL;
- }
- }
-}
-
-void
-xf86RotateCloseScreen (ScreenPtr screen)
-{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- int c;
-
- for (c = 0; c < xf86_config->num_crtc; c++)
- xf86RotateDestroy (xf86_config->crtc[c]);
-}
-
-static Bool
-xf86CrtcFitsScreen (xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb)
-{
- ScrnInfoPtr pScrn = crtc->scrn;
- BoxRec b;
-
- /* When called before PreInit, the driver is
- * presumably doing load detect
- */
- if (pScrn->virtualX == 0 || pScrn->virtualY == 0)
- return TRUE;
-
- b.x1 = 0;
- b.y1 = 0;
- b.x2 = crtc->mode.HDisplay;
- b.y2 = crtc->mode.VDisplay;
- if (crtc_to_fb)
- pixman_f_transform_bounds (crtc_to_fb, &b);
- else {
- b.x1 += crtc->x;
- b.y1 += crtc->y;
- b.x2 += crtc->x;
- b.y2 += crtc->y;
- }
-
- return (0 <= b.x1 && b.x2 <= pScrn->virtualX &&
- 0 <= b.y1 && b.y2 <= pScrn->virtualY);
-}
-
-Bool
-xf86CrtcRotate (xf86CrtcPtr crtc)
-{
- ScrnInfoPtr pScrn = crtc->scrn;
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
- PictTransform crtc_to_fb;
- struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
- xFixed *new_params = NULL;
- int new_nparams = 0;
- PictFilterPtr new_filter = NULL;
- int new_width = 0;
- int new_height = 0;
- RRTransformPtr transform = NULL;
- Bool damage = FALSE;
-
- if (crtc->transformPresent)
- transform = &crtc->transform;
-
- if (!RRTransformCompute (crtc->x, crtc->y,
- crtc->mode.HDisplay, crtc->mode.VDisplay,
- crtc->rotation,
- transform,
-
- &crtc_to_fb,
- &f_crtc_to_fb,
- &f_fb_to_crtc) &&
- xf86CrtcFitsScreen (crtc, &f_crtc_to_fb))
- {
- /*
- * If the untranslated transformation is the identity,
- * disable the shadow buffer
- */
- xf86RotateDestroy (crtc);
- crtc->transform_in_use = FALSE;
- free(new_params);
- new_params = NULL;
- new_nparams = 0;
- new_filter = NULL;
- new_width = 0;
- new_height = 0;
- }
- else
- {
- /*
- * these are the size of the shadow pixmap, which
- * matches the mode, not the pre-rotated copy in the
- * frame buffer
- */
- int width = crtc->mode.HDisplay;
- int height = crtc->mode.VDisplay;
- void *shadowData = crtc->rotatedData;
- PixmapPtr shadow = crtc->rotatedPixmap;
- int old_width = shadow ? shadow->drawable.width : 0;
- int old_height = shadow ? shadow->drawable.height : 0;
-
- /* Allocate memory for rotation */
- if (old_width != width || old_height != height)
- {
- if (shadow || shadowData)
- {
- crtc->funcs->shadow_destroy (crtc, shadow, shadowData);
- crtc->rotatedPixmap = NULL;
- crtc->rotatedData = NULL;
- }
- shadowData = crtc->funcs->shadow_allocate (crtc, width, height);
- if (!shadowData)
- goto bail1;
- crtc->rotatedData = shadowData;
- /* shadow will be damaged in xf86RotatePrepare */
- }
- else
- {
- /* mark shadowed area as damaged so it will be repainted */
- damage = TRUE;
- }
-
- if (!xf86_config->rotation_damage)
- {
- /* Create damage structure */
- xf86_config->rotation_damage = DamageCreate (NULL, NULL,
- DamageReportNone,
- TRUE, pScreen, pScreen);
- if (!xf86_config->rotation_damage)
- goto bail2;
-
- /* Wrap block handler */
- if (!xf86_config->BlockHandler) {
- xf86_config->BlockHandler = pScreen->BlockHandler;
- pScreen->BlockHandler = xf86RotateBlockHandler;
- }
- }
-#ifdef RANDR_12_INTERFACE
- if (transform)
- {
- if (transform->nparams) {
- new_params = malloc(transform->nparams * sizeof (xFixed));
- if (new_params) {
- memcpy (new_params, transform->params,
- transform->nparams * sizeof (xFixed));
- new_nparams = transform->nparams;
- new_filter = transform->filter;
- }
- } else
- new_filter = transform->filter;
- if (new_filter)
- {
- new_width = new_filter->width;
- new_height = new_filter->height;
- }
- }
-#endif
-
- if (0)
- {
- bail2:
- if (shadow || shadowData)
- {
- crtc->funcs->shadow_destroy (crtc, shadow, shadowData);
- crtc->rotatedPixmap = NULL;
- crtc->rotatedData = NULL;
- }
- bail1:
- if (old_width && old_height)
- crtc->rotatedPixmap = crtc->funcs->shadow_create (crtc,
- NULL,
- old_width,
- old_height);
- return FALSE;
- }
- crtc->transform_in_use = TRUE;
- }
- crtc->crtc_to_framebuffer = crtc_to_fb;
- crtc->f_crtc_to_framebuffer = f_crtc_to_fb;
- crtc->f_framebuffer_to_crtc = f_fb_to_crtc;
- free(crtc->params);
- crtc->params = new_params;
- crtc->nparams = new_nparams;
- crtc->filter = new_filter;
- crtc->filter_width = new_width;
- crtc->filter_height = new_height;
- crtc->bounds.x1 = 0;
- crtc->bounds.x2 = crtc->mode.HDisplay;
- crtc->bounds.y1 = 0;
- crtc->bounds.y2 = crtc->mode.VDisplay;
- pixman_f_transform_bounds (&f_crtc_to_fb, &crtc->bounds);
-
- if (damage)
- xf86CrtcDamageShadow (crtc);
-
- /* All done */
- return TRUE;
-}
+/*
+ * Copyright © 2006 Keith Packard
+ *
+ * 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, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#else
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#endif
+
+#include <stddef.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "xf86.h"
+#include "xf86DDC.h"
+#include "fb.h"
+#include "windowstr.h"
+#include "xf86Crtc.h"
+#include "xf86Modes.h"
+#include "xf86RandR12.h"
+#include "X11/extensions/render.h"
+#include "X11/extensions/dpmsconst.h"
+#include "X11/Xatom.h"
+
+/* borrowed from composite extension, move to Render and publish? */
+
+static VisualPtr
+compGetWindowVisual (WindowPtr pWin)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ VisualID vid = wVisual (pWin);
+ int i;
+
+ for (i = 0; i < pScreen->numVisuals; i++)
+ if (pScreen->visuals[i].vid == vid)
+ return &pScreen->visuals[i];
+ return 0;
+}
+
+static PictFormatPtr
+compWindowFormat (WindowPtr pWin)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+
+ return PictureMatchVisual (pScreen, pWin->drawable.depth,
+ compGetWindowVisual (pWin));
+}
+
+#define F(x) IntToxFixed(x)
+
+#define toF(x) ((float) (x) / 65536.0f)
+
+static void
+xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
+{
+ ScrnInfoPtr scrn = crtc->scrn;
+ ScreenPtr screen = scrn->pScreen;
+ WindowPtr root = screen->root;
+ PixmapPtr dst_pixmap = crtc->rotatedPixmap;
+ PictFormatPtr format = compWindowFormat (screen->root);
+ int error;
+ PicturePtr src, dst;
+ int n = RegionNumRects(region);
+ BoxPtr b = RegionRects(region);
+ XID include_inferiors = IncludeInferiors;
+
+ src = CreatePicture (None,
+ &root->drawable,
+ format,
+ CPSubwindowMode,
+ &include_inferiors,
+ serverClient,
+ &error);
+ if (!src)
+ return;
+
+ dst = CreatePicture (None,
+ &dst_pixmap->drawable,
+ format,
+ 0L,
+ NULL,
+ serverClient,
+ &error);
+ if (!dst)
+ return;
+
+ error = SetPictureTransform (src, &crtc->crtc_to_framebuffer);
+ if (error)
+ return;
+ if (crtc->transform_in_use && crtc->filter)
+ SetPicturePictFilter (src, crtc->filter,
+ crtc->params, crtc->nparams);
+
+ if (crtc->shadowClear)
+ {
+ CompositePicture (PictOpSrc,
+ src, NULL, dst,
+ 0, 0, 0, 0, 0, 0,
+ crtc->mode.HDisplay, crtc->mode.VDisplay);
+ crtc->shadowClear = FALSE;
+ }
+ else
+ {
+ while (n--)
+ {
+ BoxRec dst_box;
+
+ dst_box = *b;
+ dst_box.x1 -= crtc->filter_width >> 1;
+ dst_box.x2 += crtc->filter_width >> 1;
+ dst_box.y1 -= crtc->filter_height >> 1;
+ dst_box.y2 += crtc->filter_height >> 1;
+ pixman_f_transform_bounds (&crtc->f_framebuffer_to_crtc, &dst_box);
+ CompositePicture (PictOpSrc,
+ src, NULL, dst,
+ dst_box.x1, dst_box.y1, 0, 0, dst_box.x1, dst_box.y1,
+ dst_box.x2 - dst_box.x1,
+ dst_box.y2 - dst_box.y1);
+ b++;
+ }
+ }
+ FreePicture (src, None);
+ FreePicture (dst, None);
+}
+
+static void
+xf86CrtcDamageShadow (xf86CrtcPtr crtc)
+{
+ ScrnInfoPtr pScrn = crtc->scrn;
+ BoxRec damage_box;
+ RegionRec damage_region;
+ ScreenPtr pScreen = pScrn->pScreen;
+
+ damage_box.x1 = 0;
+ damage_box.x2 = crtc->mode.HDisplay;
+ damage_box.y1 = 0;
+ damage_box.y2 = crtc->mode.VDisplay;
+ if (!pixman_transform_bounds (&crtc->crtc_to_framebuffer, &damage_box))
+ {
+ damage_box.x1 = 0;
+ damage_box.y1 = 0;
+ damage_box.x2 = pScreen->width;
+ damage_box.y2 = pScreen->height;
+ }
+ if (damage_box.x1 < 0) damage_box.x1 = 0;
+ if (damage_box.y1 < 0) damage_box.y1 = 0;
+ if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width;
+ if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height;
+ RegionInit(&damage_region, &damage_box, 1);
+ DamageDamageRegion (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
+ &damage_region);
+ RegionUninit(&damage_region);
+ crtc->shadowClear = TRUE;
+}
+
+static void
+xf86RotatePrepare (ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ int c;
+
+ for (c = 0; c < xf86_config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = xf86_config->crtc[c];
+
+ if (crtc->rotatedData && !crtc->rotatedPixmap)
+ {
+ crtc->rotatedPixmap = crtc->funcs->shadow_create (crtc,
+ crtc->rotatedData,
+ crtc->mode.HDisplay,
+ crtc->mode.VDisplay);
+ if (!xf86_config->rotation_damage_registered)
+ {
+ /* Hook damage to screen pixmap */
+ DamageRegister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
+ xf86_config->rotation_damage);
+ xf86_config->rotation_damage_registered = TRUE;
+ EnableLimitedSchedulingLatency();
+ }
+
+ xf86CrtcDamageShadow (crtc);
+ }
+ }
+}
+
+static Bool
+xf86RotateRedisplay(ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ DamagePtr damage = xf86_config->rotation_damage;
+ RegionPtr region;
+
+ if (!damage)
+ return FALSE;
+ xf86RotatePrepare (pScreen);
+ region = DamageRegion(damage);
+ if (RegionNotEmpty(region))
+ {
+ int c;
+ SourceValidateProcPtr SourceValidate;
+
+ /*
+ * SourceValidate is used by the software cursor code
+ * to pull the cursor off of the screen when reading
+ * bits from the frame buffer. Bypassing this function
+ * leaves the software cursor in place
+ */
+ SourceValidate = pScreen->SourceValidate;
+ pScreen->SourceValidate = NULL;
+
+ for (c = 0; c < xf86_config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = xf86_config->crtc[c];
+
+ if (crtc->transform_in_use && crtc->enabled)
+ {
+ RegionRec crtc_damage;
+
+ /* compute portion of damage that overlaps crtc */
+ RegionInit(&crtc_damage, &crtc->bounds, 1);
+ RegionIntersect(&crtc_damage, &crtc_damage, region);
+
+ /* update damaged region */
+ if (RegionNotEmpty(&crtc_damage))
+ xf86RotateCrtcRedisplay (crtc, &crtc_damage);
+
+ RegionUninit(&crtc_damage);
+ }
+ }
+ pScreen->SourceValidate = SourceValidate;
+ DamageEmpty(damage);
+ }
+ return TRUE;
+}
+
+static void
+xf86RotateBlockHandler(int screenNum, pointer blockData,
+ pointer pTimeout, pointer pReadmask)
+{
+ ScreenPtr pScreen = screenInfo.screens[screenNum];
+ ScrnInfoPtr pScrn = xf86Screens[screenNum];
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ Bool rotation_active;
+
+ rotation_active = xf86RotateRedisplay(pScreen);
+ pScreen->BlockHandler = xf86_config->BlockHandler;
+ (*pScreen->BlockHandler) (screenNum, blockData, pTimeout, pReadmask);
+ /* cannot avoid re-wrapping until all wrapping is audited */
+ xf86_config->BlockHandler = pScreen->BlockHandler;
+ pScreen->BlockHandler = xf86RotateBlockHandler;
+}
+
+void
+xf86RotateDestroy (xf86CrtcPtr crtc)
+{
+ ScrnInfoPtr pScrn = crtc->scrn;
+ ScreenPtr pScreen = pScrn->pScreen;
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ int c;
+
+ /* Free memory from rotation */
+ if (crtc->rotatedPixmap || crtc->rotatedData)
+ {
+ crtc->funcs->shadow_destroy (crtc, crtc->rotatedPixmap, crtc->rotatedData);
+ crtc->rotatedPixmap = NULL;
+ crtc->rotatedData = NULL;
+ }
+
+ for (c = 0; c < xf86_config->num_crtc; c++)
+ if (xf86_config->crtc[c]->transform_in_use)
+ return;
+
+ /*
+ * Clean up damage structures when no crtcs are rotated
+ */
+ if (xf86_config->rotation_damage)
+ {
+ /* Free damage structure */
+ if (xf86_config->rotation_damage_registered)
+ {
+ DamageUnregister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
+ xf86_config->rotation_damage);
+ xf86_config->rotation_damage_registered = FALSE;
+ DisableLimitedSchedulingLatency();
+ }
+ DamageDestroy (xf86_config->rotation_damage);
+ xf86_config->rotation_damage = NULL;
+ }
+}
+
+void
+xf86RotateFreeShadow(ScrnInfoPtr pScrn)
+{
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ int c;
+
+ for (c = 0; c < config->num_crtc; c++) {
+ xf86CrtcPtr crtc = config->crtc[c];
+
+ if (crtc->rotatedPixmap || crtc->rotatedData) {
+ crtc->funcs->shadow_destroy(crtc, crtc->rotatedPixmap,
+ crtc->rotatedData);
+ crtc->rotatedPixmap = NULL;
+ crtc->rotatedData = NULL;
+ }
+ }
+}
+
+void
+xf86RotateCloseScreen (ScreenPtr screen)
+{
+ ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ int c;
+
+ for (c = 0; c < xf86_config->num_crtc; c++)
+ xf86RotateDestroy (xf86_config->crtc[c]);
+}
+
+static Bool
+xf86CrtcFitsScreen (xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb)
+{
+ ScrnInfoPtr pScrn = crtc->scrn;
+ BoxRec b;
+
+ /* When called before PreInit, the driver is
+ * presumably doing load detect
+ */
+ if (pScrn->virtualX == 0 || pScrn->virtualY == 0)
+ return TRUE;
+
+ b.x1 = 0;
+ b.y1 = 0;
+ b.x2 = crtc->mode.HDisplay;
+ b.y2 = crtc->mode.VDisplay;
+ if (crtc_to_fb)
+ pixman_f_transform_bounds (crtc_to_fb, &b);
+ else {
+ b.x1 += crtc->x;
+ b.y1 += crtc->y;
+ b.x2 += crtc->x;
+ b.y2 += crtc->y;
+ }
+
+ return (0 <= b.x1 && b.x2 <= pScrn->virtualX &&
+ 0 <= b.y1 && b.y2 <= pScrn->virtualY);
+}
+
+Bool
+xf86CrtcRotate (xf86CrtcPtr crtc)
+{
+ ScrnInfoPtr pScrn = crtc->scrn;
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
+ ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
+ PictTransform crtc_to_fb;
+ struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+ xFixed *new_params = NULL;
+ int new_nparams = 0;
+ PictFilterPtr new_filter = NULL;
+ int new_width = 0;
+ int new_height = 0;
+ RRTransformPtr transform = NULL;
+ Bool damage = FALSE;
+
+ if (crtc->transformPresent)
+ transform = &crtc->transform;
+
+ if (!RRTransformCompute (crtc->x, crtc->y,
+ crtc->mode.HDisplay, crtc->mode.VDisplay,
+ crtc->rotation,
+ transform,
+
+ &crtc_to_fb,
+ &f_crtc_to_fb,
+ &f_fb_to_crtc) &&
+ xf86CrtcFitsScreen (crtc, &f_crtc_to_fb))
+ {
+ /*
+ * If the untranslated transformation is the identity,
+ * disable the shadow buffer
+ */
+ xf86RotateDestroy (crtc);
+ crtc->transform_in_use = FALSE;
+ free(new_params);
+ new_params = NULL;
+ new_nparams = 0;
+ new_filter = NULL;
+ new_width = 0;
+ new_height = 0;
+ }
+ else
+ {
+ /*
+ * these are the size of the shadow pixmap, which
+ * matches the mode, not the pre-rotated copy in the
+ * frame buffer
+ */
+ int width = crtc->mode.HDisplay;
+ int height = crtc->mode.VDisplay;
+ void *shadowData = crtc->rotatedData;
+ PixmapPtr shadow = crtc->rotatedPixmap;
+ int old_width = shadow ? shadow->drawable.width : 0;
+ int old_height = shadow ? shadow->drawable.height : 0;
+
+ /* Allocate memory for rotation */
+ if (old_width != width || old_height != height)
+ {
+ if (shadow || shadowData)
+ {
+ crtc->funcs->shadow_destroy (crtc, shadow, shadowData);
+ crtc->rotatedPixmap = NULL;
+ crtc->rotatedData = NULL;
+ }
+ shadowData = crtc->funcs->shadow_allocate (crtc, width, height);
+ if (!shadowData)
+ goto bail1;
+ crtc->rotatedData = shadowData;
+ /* shadow will be damaged in xf86RotatePrepare */
+ }
+ else
+ {
+ /* mark shadowed area as damaged so it will be repainted */
+ damage = TRUE;
+ }
+
+ if (!xf86_config->rotation_damage)
+ {
+ /* Create damage structure */
+ xf86_config->rotation_damage = DamageCreate (NULL, NULL,
+ DamageReportNone,
+ TRUE, pScreen, pScreen);
+ if (!xf86_config->rotation_damage)
+ goto bail2;
+
+ /* Wrap block handler */
+ if (!xf86_config->BlockHandler) {
+ xf86_config->BlockHandler = pScreen->BlockHandler;
+ pScreen->BlockHandler = xf86RotateBlockHandler;
+ }
+ }
+#ifdef RANDR_12_INTERFACE
+ if (transform)
+ {
+ if (transform->nparams) {
+ new_params = malloc(transform->nparams * sizeof (xFixed));
+ if (new_params) {
+ memcpy (new_params, transform->params,
+ transform->nparams * sizeof (xFixed));
+ new_nparams = transform->nparams;
+ new_filter = transform->filter;
+ }
+ } else
+ new_filter = transform->filter;
+ if (new_filter)
+ {
+ new_width = new_filter->width;
+ new_height = new_filter->height;
+ }
+ }
+#endif
+
+ if (0)
+ {
+ bail2:
+ if (shadow || shadowData)
+ {
+ crtc->funcs->shadow_destroy (crtc, shadow, shadowData);
+ crtc->rotatedPixmap = NULL;
+ crtc->rotatedData = NULL;
+ }
+ bail1:
+ if (old_width && old_height)
+ crtc->rotatedPixmap = crtc->funcs->shadow_create (crtc,
+ NULL,
+ old_width,
+ old_height);
+ return FALSE;
+ }
+ crtc->transform_in_use = TRUE;
+ }
+ crtc->crtc_to_framebuffer = crtc_to_fb;
+ crtc->f_crtc_to_framebuffer = f_crtc_to_fb;
+ crtc->f_framebuffer_to_crtc = f_fb_to_crtc;
+ free(crtc->params);
+ crtc->params = new_params;
+ crtc->nparams = new_nparams;
+ crtc->filter = new_filter;
+ crtc->filter_width = new_width;
+ crtc->filter_height = new_height;
+ crtc->bounds.x1 = 0;
+ crtc->bounds.x2 = crtc->mode.HDisplay;
+ crtc->bounds.y1 = 0;
+ crtc->bounds.y2 = crtc->mode.VDisplay;
+ pixman_f_transform_bounds (&f_crtc_to_fb, &crtc->bounds);
+
+ if (damage)
+ xf86CrtcDamageShadow (crtc);
+
+ /* All done */
+ return TRUE;
+}
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
index 123eb17d1..7775e5dff 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
@@ -1,756 +1,756 @@
-/*
- * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
- * Copyright 1993 by David Wexelblat <dwex@goblin.org>
- *
- * 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, and that the names of Rich Murphey and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
- * the software without specific, written prior permission. Rich Murphey and
- * David Wexelblat make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#include "compiler.h"
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-#include <sys/utsname.h>
-#include <sys/ioctl.h>
-#include <stdlib.h>
-#include <errno.h>
-
-static Bool KeepTty = FALSE;
-static int devConsoleFd = -1;
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-static int VTnum = -1;
-static int initialVT = -1;
-static Bool ShareVTs = FALSE;
-#endif
-
-#ifdef PCCONS_SUPPORT
-/* Stock 0.1 386bsd pccons console driver interface */
-#define PCCONS_CONSOLE_DEV1 "/dev/ttyv0"
-#define PCCONS_CONSOLE_DEV2 "/dev/vga"
-#define PCCONS_CONSOLE_MODE O_RDWR|O_NDELAY
-#endif
-
-#ifdef SYSCONS_SUPPORT
-/* The FreeBSD 1.1 version syscons driver uses /dev/ttyv0 */
-#define SYSCONS_CONSOLE_DEV1 "/dev/ttyv0"
-#define SYSCONS_CONSOLE_DEV2 "/dev/vga"
-#define SYSCONS_CONSOLE_MODE O_RDWR|O_NDELAY
-#endif
-
-#ifdef PCVT_SUPPORT
-/* Hellmuth Michaelis' pcvt driver */
-#ifndef __OpenBSD__
-# define PCVT_CONSOLE_DEV "/dev/ttyv0"
-#else
-# define PCVT_CONSOLE_DEV "/dev/ttyC0"
-#endif
-#define PCVT_CONSOLE_MODE O_RDWR|O_NDELAY
-#endif
-
-#if defined(WSCONS_SUPPORT) && defined(__NetBSD__)
-/* NetBSD's new console driver */
-#define WSCONS_PCVT_COMPAT_CONSOLE_DEV "/dev/ttyE0"
-#endif
-
-#ifdef __GLIBC__
-#define setpgrp setpgid
-#endif
-
-#define CHECK_DRIVER_MSG \
- "Check your kernel's console driver configuration and /dev entries"
-
-static char *supported_drivers[] = {
-#ifdef PCCONS_SUPPORT
- "pccons (with X support)",
-#endif
-#ifdef SYSCONS_SUPPORT
- "syscons",
-#endif
-#ifdef PCVT_SUPPORT
- "pcvt",
-#endif
-#ifdef WSCONS_SUPPORT
- "wscons",
-#endif
-};
-
-
-/*
- * Functions to probe for the existance of a supported console driver.
- * Any function returns either a valid file descriptor (driver probed
- * succesfully), -1 (driver not found), or uses FatalError() if the
- * driver was found but proved to not support the required mode to run
- * an X server.
- */
-
-typedef int (*xf86ConsOpen_t)(void);
-
-#ifdef PCCONS_SUPPORT
-static int xf86OpenPccons(void);
-#endif /* PCCONS_SUPPORT */
-
-#ifdef SYSCONS_SUPPORT
-static int xf86OpenSyscons(void);
-#endif /* SYSCONS_SUPPORT */
-
-#ifdef PCVT_SUPPORT
-static int xf86OpenPcvt(void);
-#endif /* PCVT_SUPPORT */
-
-#ifdef WSCONS_SUPPORT
-static int xf86OpenWScons(void);
-#endif
-
-/*
- * The sequence of the driver probes is important; start with the
- * driver that is best distinguishable, and end with the most generic
- * driver. (Otherwise, pcvt would also probe as syscons, and either
- * pcvt or syscons might succesfully probe as pccons.)
- */
-static xf86ConsOpen_t xf86ConsTab[] = {
-#ifdef PCVT_SUPPORT
- xf86OpenPcvt,
-#endif
-#ifdef SYSCONS_SUPPORT
- xf86OpenSyscons,
-#endif
-#ifdef PCCONS_SUPPORT
- xf86OpenPccons,
-#endif
-#ifdef WSCONS_SUPPORT
- xf86OpenWScons,
-#endif
- (xf86ConsOpen_t)NULL
-};
-
-
-void
-xf86OpenConsole()
-{
- int i, fd = -1;
- xf86ConsOpen_t *driver;
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- int result;
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- struct utsname uts;
-#endif
- vtmode_t vtmode;
-#endif
-
- if (serverGeneration == 1)
- {
- /* check if we are run with euid==0 */
- if (geteuid() != 0)
- {
- FatalError("xf86OpenConsole: Server must be suid root");
- }
-
- if (!KeepTty)
- {
- /*
- * detaching the controlling tty solves problems of kbd character
- * loss. This is not interesting for CO driver, because it is
- * exclusive.
- */
- setpgrp(0, getpid());
- if ((i = open("/dev/tty",O_RDWR)) >= 0)
- {
- ioctl(i,TIOCNOTTY,(char *)0);
- close(i);
- }
- }
-
- /* detect which driver we are running on */
- for (driver = xf86ConsTab; *driver; driver++)
- {
- if ((fd = (*driver)()) >= 0)
- break;
- }
-
- /* Check that a supported console driver was found */
- if (fd < 0)
- {
- char cons_drivers[80] = {0, };
- for (i = 0; i < sizeof(supported_drivers) / sizeof(char *); i++)
- {
- if (i)
- {
- strcat(cons_drivers, ", ");
- }
- strcat(cons_drivers, supported_drivers[i]);
- }
- FatalError(
- "%s: No console driver found\n\tSupported drivers: %s\n\t%s",
- "xf86OpenConsole", cons_drivers, CHECK_DRIVER_MSG);
- }
-#if 0 /* stdin is already closed in OsInit() */
- fclose(stdin);
-#endif
- xf86Info.consoleFd = fd;
- xf86Info.screenFd = fd;
-
- switch (xf86Info.consType)
- {
-#ifdef PCCONS_SUPPORT
- case PCCONS:
- if (ioctl (xf86Info.consoleFd, CONSOLE_X_MODE_ON, 0) < 0)
- {
- FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s",
- "xf86OpenConsole", strerror(errno),
- CHECK_DRIVER_MSG);
- }
- /*
- * Hack to prevent keyboard hanging when syslogd closes
- * /dev/console
- */
- if ((devConsoleFd = open("/dev/console", O_WRONLY,0)) < 0)
- {
- xf86Msg(X_WARNING,
- "xf86OpenConsole: couldn't open /dev/console (%s)\n",
- strerror(errno));
- }
- break;
-#endif
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- case SYSCONS:
- /* as of FreeBSD 2.2.8, syscons driver does not need the #1 vt
- * switching anymore. Here we check for FreeBSD 3.1 and up.
- * Add cases for other *BSD that behave the same.
- */
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- uname (&uts);
- i = atof(uts.release) * 100;
- if (i >= 310) goto acquire_vt;
-#endif
- /* otherwise fall through */
- case PCVT:
-#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 200000000))
- /*
- * First activate the #1 VT. This is a hack to allow a server
- * to be started while another one is active. There should be
- * a better way.
- */
- if (initialVT != 1) {
-
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) != 0)
- {
- xf86Msg(X_WARNING,
- "xf86OpenConsole: VT_ACTIVATE failed\n");
- }
- sleep(1);
- }
-#endif
-acquire_vt:
- if (!ShareVTs) {
- /*
- * now get the VT
- */
- SYSCALL(result =
- ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno));
- if (result != 0)
- {
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
- }
- SYSCALL(result =
- ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno));
- if (result != 0)
- {
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
- }
-
- signal(SIGUSR1, xf86VTRequest);
-
- vtmode.mode = VT_PROCESS;
- vtmode.relsig = SIGUSR1;
- vtmode.acqsig = SIGUSR1;
- vtmode.frsig = SIGUSR1;
- if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0)
- {
- FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed");
- }
- #if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
- if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0)
- {
- FatalError("xf86OpenConsole: KDENABIO failed (%s)",
- strerror(errno));
- }
- #endif
- if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
- {
- FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
- }
- } else { /* ShareVTs */
- close(xf86Info.consoleFd);
- }
- break;
-#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
-#ifdef WSCONS_SUPPORT
- case WSCONS:
- /* Nothing to do */
- break;
-#endif
- }
- }
- else
- {
- /* serverGeneration != 1 */
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (!ShareVTs) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT)
- {
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
- {
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
- }
- }
-#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
- }
- return;
-}
-
-
-#ifdef PCCONS_SUPPORT
-
-static int
-xf86OpenPccons()
-{
- int fd = -1;
-
- if ((fd = open(PCCONS_CONSOLE_DEV1, PCCONS_CONSOLE_MODE, 0))
- >= 0 ||
- (fd = open(PCCONS_CONSOLE_DEV2, PCCONS_CONSOLE_MODE, 0))
- >= 0)
- {
- if (ioctl(fd, CONSOLE_X_MODE_OFF, 0) < 0)
- {
- FatalError(
- "%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s",
- "xf86OpenPccons",
- strerror(errno),
- "Was expecting pccons driver with X support",
- CHECK_DRIVER_MSG);
- }
- xf86Info.consType = PCCONS;
- xf86Msg(X_PROBED, "Using pccons driver with X support\n");
- }
- return fd;
-}
-
-#endif /* PCCONS_SUPPORT */
-
-#ifdef SYSCONS_SUPPORT
-
-static int
-xf86OpenSyscons()
-{
- int fd = -1;
- vtmode_t vtmode;
- char vtname[12];
- struct stat status;
- long syscons_version;
- MessageType from;
-
- /* Check for syscons */
- if ((fd = open(SYSCONS_CONSOLE_DEV1, SYSCONS_CONSOLE_MODE, 0)) >= 0
- || (fd = open(SYSCONS_CONSOLE_DEV2, SYSCONS_CONSOLE_MODE, 0)) >= 0)
- {
- if (ioctl(fd, VT_GETMODE, &vtmode) >= 0)
- {
- /* Get syscons version */
- if (ioctl(fd, CONS_GETVERS, &syscons_version) < 0)
- {
- syscons_version = 0;
- }
-
- xf86Info.vtno = VTnum;
- from = X_CMDLINE;
-
-#ifdef VT_GETACTIVE
- if (ioctl(fd, VT_GETACTIVE, &initialVT) < 0)
- initialVT = -1;
-#endif
- if (ShareVTs)
- xf86Info.vtno = initialVT;
-
- if (xf86Info.vtno == -1)
- {
- /*
- * For old syscons versions (<0x100), VT_OPENQRY returns
- * the current VT rather than the next free VT. In this
- * case, the server gets started on the current VT instead
- * of the next free VT.
- */
-
-#if 0
- /* check for the fixed VT_OPENQRY */
- if (syscons_version >= 0x100)
- {
-#endif
- if (ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0)
- {
- /* No free VTs */
- xf86Info.vtno = -1;
- }
-#if 0
- }
-#endif
-
- if (xf86Info.vtno == -1)
- {
- /*
- * All VTs are in use. If initialVT was found, use it.
- * Otherwise, if stdin is a VT, use that one.
- * XXX stdin is already closed, so this won't work.
- */
- if (initialVT != -1)
- {
- xf86Info.vtno = initialVT;
- }
- else if ((fstat(0, &status) >= 0)
- && S_ISCHR(status.st_mode)
- && (ioctl(0, VT_GETMODE, &vtmode) >= 0))
- {
- /* stdin is a VT */
- xf86Info.vtno = minor(status.st_rdev) + 1;
- }
- else
- {
- if (syscons_version >= 0x100)
- {
- FatalError("%s: Cannot find a free VT",
- "xf86OpenSyscons");
- }
- /* Should no longer reach here */
- FatalError("%s: %s %s\n\t%s %s",
- "xf86OpenSyscons",
- "syscons versions prior to 1.0 require",
- "either the",
- "server's stdin be a VT",
- "or the use of the vtxx server option");
- }
- }
- from = X_PROBED;
- }
-
- close(fd);
-#ifndef __OpenBSD__
- sprintf(vtname, "/dev/ttyv%01x", xf86Info.vtno - 1);
-#else
- sprintf(vtname, "/dev/ttyC%01x", xf86Info.vtno - 1);
-#endif
- if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0)
- {
- FatalError("xf86OpenSyscons: Cannot open %s (%s)",
- vtname, strerror(errno));
- }
- if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
- {
- FatalError("xf86OpenSyscons: VT_GETMODE failed");
- }
- xf86Info.consType = SYSCONS;
- xf86Msg(X_PROBED, "Using syscons driver with X support");
- if (syscons_version >= 0x100)
- {
- xf86ErrorF(" (version %ld.%ld)\n", syscons_version >> 8,
- syscons_version & 0xFF);
- }
- else
- {
- xf86ErrorF(" (version 0.x)\n");
- }
- xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
- }
- else
- {
- /* VT_GETMODE failed, probably not syscons */
- close(fd);
- fd = -1;
- }
- }
- return fd;
-}
-
-#endif /* SYSCONS_SUPPORT */
-
-
-#ifdef PCVT_SUPPORT
-
-static int
-xf86OpenPcvt()
-{
- /* This looks much like syscons, since pcvt is API compatible */
- int fd = -1;
- vtmode_t vtmode;
- char vtname[12], *vtprefix;
- struct stat status;
- struct pcvtid pcvt_version;
-
-#ifndef __OpenBSD__
- vtprefix = "/dev/ttyv";
-#else
- vtprefix = "/dev/ttyC";
-#endif
-
- fd = open(PCVT_CONSOLE_DEV, PCVT_CONSOLE_MODE, 0);
-#ifdef WSCONS_PCVT_COMPAT_CONSOLE_DEV
- if (fd < 0)
- {
- fd = open(WSCONS_PCVT_COMPAT_CONSOLE_DEV, PCVT_CONSOLE_MODE, 0);
- vtprefix = "/dev/ttyE";
- }
-#endif
- if (fd >= 0)
- {
- if (ioctl(fd, VGAPCVTID, &pcvt_version) >= 0)
- {
- if(ioctl(fd, VT_GETMODE, &vtmode) < 0)
- {
- FatalError("%s: VT_GETMODE failed\n%s%s\n%s",
- "xf86OpenPcvt",
- "Found pcvt driver but X11 seems to be",
- " not supported.", CHECK_DRIVER_MSG);
- }
-
- xf86Info.vtno = VTnum;
-
- if (ioctl(fd, VT_GETACTIVE, &initialVT) < 0)
- initialVT = -1;
-
- if (xf86Info.vtno == -1)
- {
- if (ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0)
- {
- /* No free VTs */
- xf86Info.vtno = -1;
- }
-
- if (xf86Info.vtno == -1)
- {
- /*
- * All VTs are in use. If initialVT was found, use it.
- * Otherwise, if stdin is a VT, use that one.
- * XXX stdin is already closed, so this won't work.
- */
- if (initialVT != -1)
- {
- xf86Info.vtno = initialVT;
- }
- else if ((fstat(0, &status) >= 0)
- && S_ISCHR(status.st_mode)
- && (ioctl(0, VT_GETMODE, &vtmode) >= 0))
- {
- /* stdin is a VT */
- xf86Info.vtno = minor(status.st_rdev) + 1;
- }
- else
- {
- FatalError("%s: Cannot find a free VT",
- "xf86OpenPcvt");
- }
- }
- }
-
- close(fd);
- sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
- if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0)
- {
- ErrorF("xf86OpenPcvt: Cannot open %s (%s)",
- vtname, strerror(errno));
- xf86Info.vtno = initialVT;
- sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
- if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0) {
- FatalError("xf86OpenPcvt: Cannot open %s (%s)",
- vtname, strerror(errno));
- }
- }
- if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
- {
- FatalError("xf86OpenPcvt: VT_GETMODE failed");
- }
- xf86Info.consType = PCVT;
-#ifdef WSCONS_SUPPORT
- xf86Msg(X_PROBED,
- "Using wscons driver on %s in pcvt compatibility mode "
- "(version %d.%d)\n", vtname,
- pcvt_version.rmajor, pcvt_version.rminor);
-#else
- xf86Msg(X_PROBED, "Using pcvt driver (version %d.%d)\n",
- pcvt_version.rmajor, pcvt_version.rminor);
-#endif
- }
- else
- {
- /* Not pcvt */
- close(fd);
- fd = -1;
- }
- }
- return fd;
-}
-
-#endif /* PCVT_SUPPORT */
-
-#ifdef WSCONS_SUPPORT
-
-static int
-xf86OpenWScons()
-{
- int fd = -1;
- int mode = WSDISPLAYIO_MODE_MAPPED;
- int i;
- char ttyname[16];
-
- /* XXX Is this ok? */
- for (i = 0; i < 8; i++) {
-#if defined(__NetBSD__)
- sprintf(ttyname, "/dev/ttyE%d", i);
-#elif defined(__OpenBSD__)
- sprintf(ttyname, "/dev/ttyC%x", i);
-#endif
- if ((fd = open(ttyname, 2)) != -1)
- break;
- }
- if (fd != -1) {
- if (ioctl(fd, WSDISPLAYIO_SMODE, &mode) < 0) {
- FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s",
- "xf86OpenConsole", strerror(errno),
- CHECK_DRIVER_MSG);
- }
- xf86Info.consType = WSCONS;
- xf86Msg(X_PROBED, "Using wscons driver\n");
- }
- return fd;
-}
-
-#endif /* WSCONS_SUPPORT */
-
-void
-xf86CloseConsole()
-{
-#if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT)
- struct vt_mode VT;
-#endif
-
- if (ShareVTs) return;
-
- switch (xf86Info.consType)
- {
-#ifdef PCCONS_SUPPORT
- case PCCONS:
- ioctl (xf86Info.consoleFd, CONSOLE_X_MODE_OFF, 0);
- break;
-#endif /* PCCONS_SUPPORT */
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- case SYSCONS:
- case PCVT:
- ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); /* Back to text mode */
- if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1)
- {
- VT.mode = VT_AUTO;
- ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */
- }
-#if !defined(OpenBSD) && !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
- if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0)
- {
- xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)",
- strerror(errno));
- }
-#endif
- if (initialVT != -1)
- ioctl(xf86Info.consoleFd, VT_ACTIVATE, initialVT);
- break;
-#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
-#ifdef WSCONS_SUPPORT
- case WSCONS:
- {
- int mode = WSDISPLAYIO_MODE_EMUL;
- ioctl(xf86Info.screenFd, WSDISPLAYIO_SMODE, &mode);
- break;
- }
-#endif
- }
-
- if (xf86Info.screenFd != xf86Info.consoleFd)
- {
- close(xf86Info.screenFd);
- close(xf86Info.consoleFd);
- if ((xf86Info.consoleFd = open("/dev/console",O_RDONLY,0)) <0)
- {
- xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)",
- strerror(errno));
- }
- }
- close(xf86Info.consoleFd);
- if (devConsoleFd >= 0)
- close(devConsoleFd);
- return;
-}
-
-int
-xf86ProcessArgument(int argc, char *argv[], int i)
-{
- /*
- * Keep server from detaching from controlling tty. This is useful
- * when debugging (so the server can receive keyboard signals.
- */
- if (!strcmp(argv[i], "-keeptty"))
- {
- KeepTty = TRUE;
- return 1;
- }
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (!strcmp(argv[i], "-sharevts"))
- {
- ShareVTs = TRUE;
- return 1;
- }
- if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
- {
- if (sscanf(argv[i], "vt%2d", &VTnum) == 0 ||
- VTnum < 1 || VTnum > 12)
- {
- UseMsg();
- VTnum = -1;
- return 0;
- }
- return 1;
- }
-#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
- return 0;
-}
-
-void
-xf86UseMsg()
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- ErrorF("vtXX use the specified VT number (1-12)\n");
- ErrorF("-sharevts share VTs with another X server\n");
-#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
- ErrorF("-keeptty ");
- ErrorF("don't detach controlling tty (for debugging only)\n");
- return;
-}
+/*
+ * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
+ * Copyright 1993 by David Wexelblat <dwex@goblin.org>
+ *
+ * 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, and that the names of Rich Murphey and David Wexelblat
+ * not be used in advertising or publicity pertaining to distribution of
+ * the software without specific, written prior permission. Rich Murphey and
+ * David Wexelblat make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ *
+ * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
+ * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+
+#include "compiler.h"
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+#include <sys/utsname.h>
+#include <sys/ioctl.h>
+#include <stdlib.h>
+#include <errno.h>
+
+static Bool KeepTty = FALSE;
+static int devConsoleFd = -1;
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+static int VTnum = -1;
+static int initialVT = -1;
+static Bool ShareVTs = FALSE;
+#endif
+
+#ifdef PCCONS_SUPPORT
+/* Stock 0.1 386bsd pccons console driver interface */
+#define PCCONS_CONSOLE_DEV1 "/dev/ttyv0"
+#define PCCONS_CONSOLE_DEV2 "/dev/vga"
+#define PCCONS_CONSOLE_MODE O_RDWR|O_NDELAY
+#endif
+
+#ifdef SYSCONS_SUPPORT
+/* The FreeBSD 1.1 version syscons driver uses /dev/ttyv0 */
+#define SYSCONS_CONSOLE_DEV1 "/dev/ttyv0"
+#define SYSCONS_CONSOLE_DEV2 "/dev/vga"
+#define SYSCONS_CONSOLE_MODE O_RDWR|O_NDELAY
+#endif
+
+#ifdef PCVT_SUPPORT
+/* Hellmuth Michaelis' pcvt driver */
+#ifndef __OpenBSD__
+# define PCVT_CONSOLE_DEV "/dev/ttyv0"
+#else
+# define PCVT_CONSOLE_DEV "/dev/ttyC0"
+#endif
+#define PCVT_CONSOLE_MODE O_RDWR|O_NDELAY
+#endif
+
+#if defined(WSCONS_SUPPORT) && defined(__NetBSD__)
+/* NetBSD's new console driver */
+#define WSCONS_PCVT_COMPAT_CONSOLE_DEV "/dev/ttyE0"
+#endif
+
+#ifdef __GLIBC__
+#define setpgrp setpgid
+#endif
+
+#define CHECK_DRIVER_MSG \
+ "Check your kernel's console driver configuration and /dev entries"
+
+static char *supported_drivers[] = {
+#ifdef PCCONS_SUPPORT
+ "pccons (with X support)",
+#endif
+#ifdef SYSCONS_SUPPORT
+ "syscons",
+#endif
+#ifdef PCVT_SUPPORT
+ "pcvt",
+#endif
+#ifdef WSCONS_SUPPORT
+ "wscons",
+#endif
+};
+
+
+/*
+ * Functions to probe for the existance of a supported console driver.
+ * Any function returns either a valid file descriptor (driver probed
+ * succesfully), -1 (driver not found), or uses FatalError() if the
+ * driver was found but proved to not support the required mode to run
+ * an X server.
+ */
+
+typedef int (*xf86ConsOpen_t)(void);
+
+#ifdef PCCONS_SUPPORT
+static int xf86OpenPccons(void);
+#endif /* PCCONS_SUPPORT */
+
+#ifdef SYSCONS_SUPPORT
+static int xf86OpenSyscons(void);
+#endif /* SYSCONS_SUPPORT */
+
+#ifdef PCVT_SUPPORT
+static int xf86OpenPcvt(void);
+#endif /* PCVT_SUPPORT */
+
+#ifdef WSCONS_SUPPORT
+static int xf86OpenWScons(void);
+#endif
+
+/*
+ * The sequence of the driver probes is important; start with the
+ * driver that is best distinguishable, and end with the most generic
+ * driver. (Otherwise, pcvt would also probe as syscons, and either
+ * pcvt or syscons might succesfully probe as pccons.)
+ */
+static xf86ConsOpen_t xf86ConsTab[] = {
+#ifdef PCVT_SUPPORT
+ xf86OpenPcvt,
+#endif
+#ifdef SYSCONS_SUPPORT
+ xf86OpenSyscons,
+#endif
+#ifdef PCCONS_SUPPORT
+ xf86OpenPccons,
+#endif
+#ifdef WSCONS_SUPPORT
+ xf86OpenWScons,
+#endif
+ (xf86ConsOpen_t)NULL
+};
+
+
+void
+xf86OpenConsole()
+{
+ int i, fd = -1;
+ xf86ConsOpen_t *driver;
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ int result;
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ struct utsname uts;
+#endif
+ vtmode_t vtmode;
+#endif
+
+ if (serverGeneration == 1)
+ {
+ /* check if we are run with euid==0 */
+ if (geteuid() != 0)
+ {
+ FatalError("xf86OpenConsole: Server must be suid root");
+ }
+
+ if (!KeepTty)
+ {
+ /*
+ * detaching the controlling tty solves problems of kbd character
+ * loss. This is not interesting for CO driver, because it is
+ * exclusive.
+ */
+ setpgrp(0, getpid());
+ if ((i = open("/dev/tty",O_RDWR)) >= 0)
+ {
+ ioctl(i,TIOCNOTTY,(char *)0);
+ close(i);
+ }
+ }
+
+ /* detect which driver we are running on */
+ for (driver = xf86ConsTab; *driver; driver++)
+ {
+ if ((fd = (*driver)()) >= 0)
+ break;
+ }
+
+ /* Check that a supported console driver was found */
+ if (fd < 0)
+ {
+ char cons_drivers[80] = {0, };
+ for (i = 0; i < sizeof(supported_drivers) / sizeof(char *); i++)
+ {
+ if (i)
+ {
+ strcat(cons_drivers, ", ");
+ }
+ strcat(cons_drivers, supported_drivers[i]);
+ }
+ FatalError(
+ "%s: No console driver found\n\tSupported drivers: %s\n\t%s",
+ "xf86OpenConsole", cons_drivers, CHECK_DRIVER_MSG);
+ }
+#if 0 /* stdin is already closed in OsInit() */
+ fclose(stdin);
+#endif
+ xf86Info.consoleFd = fd;
+ xf86Info.screenFd = fd;
+
+ switch (xf86Info.consType)
+ {
+#ifdef PCCONS_SUPPORT
+ case PCCONS:
+ if (ioctl (xf86Info.consoleFd, CONSOLE_X_MODE_ON, 0) < 0)
+ {
+ FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s",
+ "xf86OpenConsole", strerror(errno),
+ CHECK_DRIVER_MSG);
+ }
+ /*
+ * Hack to prevent keyboard hanging when syslogd closes
+ * /dev/console
+ */
+ if ((devConsoleFd = open("/dev/console", O_WRONLY,0)) < 0)
+ {
+ xf86Msg(X_WARNING,
+ "xf86OpenConsole: couldn't open /dev/console (%s)\n",
+ strerror(errno));
+ }
+ break;
+#endif
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ case SYSCONS:
+ /* as of FreeBSD 2.2.8, syscons driver does not need the #1 vt
+ * switching anymore. Here we check for FreeBSD 3.1 and up.
+ * Add cases for other *BSD that behave the same.
+ */
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ uname (&uts);
+ i = atof(uts.release) * 100;
+ if (i >= 310) goto acquire_vt;
+#endif
+ /* otherwise fall through */
+ case PCVT:
+#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 200000000))
+ /*
+ * First activate the #1 VT. This is a hack to allow a server
+ * to be started while another one is active. There should be
+ * a better way.
+ */
+ if (initialVT != 1) {
+
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) != 0)
+ {
+ xf86Msg(X_WARNING,
+ "xf86OpenConsole: VT_ACTIVATE failed\n");
+ }
+ sleep(1);
+ }
+#endif
+acquire_vt:
+ if (!ShareVTs) {
+ /*
+ * now get the VT
+ */
+ SYSCALL(result =
+ ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno));
+ if (result != 0)
+ {
+ xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
+ }
+ SYSCALL(result =
+ ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno));
+ if (result != 0)
+ {
+ xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
+ }
+
+ signal(SIGUSR1, xf86VTRequest);
+
+ vtmode.mode = VT_PROCESS;
+ vtmode.relsig = SIGUSR1;
+ vtmode.acqsig = SIGUSR1;
+ vtmode.frsig = SIGUSR1;
+ if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0)
+ {
+ FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed");
+ }
+ #if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
+ if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0)
+ {
+ FatalError("xf86OpenConsole: KDENABIO failed (%s)",
+ strerror(errno));
+ }
+ #endif
+ if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
+ {
+ FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
+ }
+ } else { /* ShareVTs */
+ close(xf86Info.consoleFd);
+ }
+ break;
+#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
+#ifdef WSCONS_SUPPORT
+ case WSCONS:
+ /* Nothing to do */
+ break;
+#endif
+ }
+ }
+ else
+ {
+ /* serverGeneration != 1 */
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (!ShareVTs) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT)
+ {
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
+ {
+ xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
+ }
+ }
+#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
+ }
+ return;
+}
+
+
+#ifdef PCCONS_SUPPORT
+
+static int
+xf86OpenPccons()
+{
+ int fd = -1;
+
+ if ((fd = open(PCCONS_CONSOLE_DEV1, PCCONS_CONSOLE_MODE, 0))
+ >= 0 ||
+ (fd = open(PCCONS_CONSOLE_DEV2, PCCONS_CONSOLE_MODE, 0))
+ >= 0)
+ {
+ if (ioctl(fd, CONSOLE_X_MODE_OFF, 0) < 0)
+ {
+ FatalError(
+ "%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s",
+ "xf86OpenPccons",
+ strerror(errno),
+ "Was expecting pccons driver with X support",
+ CHECK_DRIVER_MSG);
+ }
+ xf86Info.consType = PCCONS;
+ xf86Msg(X_PROBED, "Using pccons driver with X support\n");
+ }
+ return fd;
+}
+
+#endif /* PCCONS_SUPPORT */
+
+#ifdef SYSCONS_SUPPORT
+
+static int
+xf86OpenSyscons()
+{
+ int fd = -1;
+ vtmode_t vtmode;
+ char vtname[12];
+ struct stat status;
+ long syscons_version;
+ MessageType from;
+
+ /* Check for syscons */
+ if ((fd = open(SYSCONS_CONSOLE_DEV1, SYSCONS_CONSOLE_MODE, 0)) >= 0
+ || (fd = open(SYSCONS_CONSOLE_DEV2, SYSCONS_CONSOLE_MODE, 0)) >= 0)
+ {
+ if (ioctl(fd, VT_GETMODE, &vtmode) >= 0)
+ {
+ /* Get syscons version */
+ if (ioctl(fd, CONS_GETVERS, &syscons_version) < 0)
+ {
+ syscons_version = 0;
+ }
+
+ xf86Info.vtno = VTnum;
+ from = X_CMDLINE;
+
+#ifdef VT_GETACTIVE
+ if (ioctl(fd, VT_GETACTIVE, &initialVT) < 0)
+ initialVT = -1;
+#endif
+ if (ShareVTs)
+ xf86Info.vtno = initialVT;
+
+ if (xf86Info.vtno == -1)
+ {
+ /*
+ * For old syscons versions (<0x100), VT_OPENQRY returns
+ * the current VT rather than the next free VT. In this
+ * case, the server gets started on the current VT instead
+ * of the next free VT.
+ */
+
+#if 0
+ /* check for the fixed VT_OPENQRY */
+ if (syscons_version >= 0x100)
+ {
+#endif
+ if (ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0)
+ {
+ /* No free VTs */
+ xf86Info.vtno = -1;
+ }
+#if 0
+ }
+#endif
+
+ if (xf86Info.vtno == -1)
+ {
+ /*
+ * All VTs are in use. If initialVT was found, use it.
+ * Otherwise, if stdin is a VT, use that one.
+ * XXX stdin is already closed, so this won't work.
+ */
+ if (initialVT != -1)
+ {
+ xf86Info.vtno = initialVT;
+ }
+ else if ((fstat(0, &status) >= 0)
+ && S_ISCHR(status.st_mode)
+ && (ioctl(0, VT_GETMODE, &vtmode) >= 0))
+ {
+ /* stdin is a VT */
+ xf86Info.vtno = minor(status.st_rdev) + 1;
+ }
+ else
+ {
+ if (syscons_version >= 0x100)
+ {
+ FatalError("%s: Cannot find a free VT",
+ "xf86OpenSyscons");
+ }
+ /* Should no longer reach here */
+ FatalError("%s: %s %s\n\t%s %s",
+ "xf86OpenSyscons",
+ "syscons versions prior to 1.0 require",
+ "either the",
+ "server's stdin be a VT",
+ "or the use of the vtxx server option");
+ }
+ }
+ from = X_PROBED;
+ }
+
+ close(fd);
+#ifndef __OpenBSD__
+ sprintf(vtname, "/dev/ttyv%01x", xf86Info.vtno - 1);
+#else
+ sprintf(vtname, "/dev/ttyC%01x", xf86Info.vtno - 1);
+#endif
+ if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0)
+ {
+ FatalError("xf86OpenSyscons: Cannot open %s (%s)",
+ vtname, strerror(errno));
+ }
+ if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
+ {
+ FatalError("xf86OpenSyscons: VT_GETMODE failed");
+ }
+ xf86Info.consType = SYSCONS;
+ xf86Msg(X_PROBED, "Using syscons driver with X support");
+ if (syscons_version >= 0x100)
+ {
+ xf86ErrorF(" (version %ld.%ld)\n", syscons_version >> 8,
+ syscons_version & 0xFF);
+ }
+ else
+ {
+ xf86ErrorF(" (version 0.x)\n");
+ }
+ xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
+ }
+ else
+ {
+ /* VT_GETMODE failed, probably not syscons */
+ close(fd);
+ fd = -1;
+ }
+ }
+ return fd;
+}
+
+#endif /* SYSCONS_SUPPORT */
+
+
+#ifdef PCVT_SUPPORT
+
+static int
+xf86OpenPcvt()
+{
+ /* This looks much like syscons, since pcvt is API compatible */
+ int fd = -1;
+ vtmode_t vtmode;
+ char vtname[12], *vtprefix;
+ struct stat status;
+ struct pcvtid pcvt_version;
+
+#ifndef __OpenBSD__
+ vtprefix = "/dev/ttyv";
+#else
+ vtprefix = "/dev/ttyC";
+#endif
+
+ fd = open(PCVT_CONSOLE_DEV, PCVT_CONSOLE_MODE, 0);
+#ifdef WSCONS_PCVT_COMPAT_CONSOLE_DEV
+ if (fd < 0)
+ {
+ fd = open(WSCONS_PCVT_COMPAT_CONSOLE_DEV, PCVT_CONSOLE_MODE, 0);
+ vtprefix = "/dev/ttyE";
+ }
+#endif
+ if (fd >= 0)
+ {
+ if (ioctl(fd, VGAPCVTID, &pcvt_version) >= 0)
+ {
+ if(ioctl(fd, VT_GETMODE, &vtmode) < 0)
+ {
+ FatalError("%s: VT_GETMODE failed\n%s%s\n%s",
+ "xf86OpenPcvt",
+ "Found pcvt driver but X11 seems to be",
+ " not supported.", CHECK_DRIVER_MSG);
+ }
+
+ xf86Info.vtno = VTnum;
+
+ if (ioctl(fd, VT_GETACTIVE, &initialVT) < 0)
+ initialVT = -1;
+
+ if (xf86Info.vtno == -1)
+ {
+ if (ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0)
+ {
+ /* No free VTs */
+ xf86Info.vtno = -1;
+ }
+
+ if (xf86Info.vtno == -1)
+ {
+ /*
+ * All VTs are in use. If initialVT was found, use it.
+ * Otherwise, if stdin is a VT, use that one.
+ * XXX stdin is already closed, so this won't work.
+ */
+ if (initialVT != -1)
+ {
+ xf86Info.vtno = initialVT;
+ }
+ else if ((fstat(0, &status) >= 0)
+ && S_ISCHR(status.st_mode)
+ && (ioctl(0, VT_GETMODE, &vtmode) >= 0))
+ {
+ /* stdin is a VT */
+ xf86Info.vtno = minor(status.st_rdev) + 1;
+ }
+ else
+ {
+ FatalError("%s: Cannot find a free VT",
+ "xf86OpenPcvt");
+ }
+ }
+ }
+
+ close(fd);
+ sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
+ if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0)
+ {
+ ErrorF("xf86OpenPcvt: Cannot open %s (%s)",
+ vtname, strerror(errno));
+ xf86Info.vtno = initialVT;
+ sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
+ if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0) {
+ FatalError("xf86OpenPcvt: Cannot open %s (%s)",
+ vtname, strerror(errno));
+ }
+ }
+ if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
+ {
+ FatalError("xf86OpenPcvt: VT_GETMODE failed");
+ }
+ xf86Info.consType = PCVT;
+#ifdef WSCONS_SUPPORT
+ xf86Msg(X_PROBED,
+ "Using wscons driver on %s in pcvt compatibility mode "
+ "(version %d.%d)\n", vtname,
+ pcvt_version.rmajor, pcvt_version.rminor);
+#else
+ xf86Msg(X_PROBED, "Using pcvt driver (version %d.%d)\n",
+ pcvt_version.rmajor, pcvt_version.rminor);
+#endif
+ }
+ else
+ {
+ /* Not pcvt */
+ close(fd);
+ fd = -1;
+ }
+ }
+ return fd;
+}
+
+#endif /* PCVT_SUPPORT */
+
+#ifdef WSCONS_SUPPORT
+
+static int
+xf86OpenWScons()
+{
+ int fd = -1;
+ int mode = WSDISPLAYIO_MODE_MAPPED;
+ int i;
+ char ttyname[16];
+
+ /* XXX Is this ok? */
+ for (i = 0; i < 8; i++) {
+#if defined(__NetBSD__)
+ sprintf(ttyname, "/dev/ttyE%d", i);
+#elif defined(__OpenBSD__)
+ sprintf(ttyname, "/dev/ttyC%x", i);
+#endif
+ if ((fd = open(ttyname, 2)) != -1)
+ break;
+ }
+ if (fd != -1) {
+ if (ioctl(fd, WSDISPLAYIO_SMODE, &mode) < 0) {
+ FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s",
+ "xf86OpenConsole", strerror(errno),
+ CHECK_DRIVER_MSG);
+ }
+ xf86Info.consType = WSCONS;
+ xf86Msg(X_PROBED, "Using wscons driver\n");
+ }
+ return fd;
+}
+
+#endif /* WSCONS_SUPPORT */
+
+void
+xf86CloseConsole()
+{
+#if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT)
+ struct vt_mode VT;
+#endif
+
+ if (ShareVTs) return;
+
+ switch (xf86Info.consType)
+ {
+#ifdef PCCONS_SUPPORT
+ case PCCONS:
+ ioctl (xf86Info.consoleFd, CONSOLE_X_MODE_OFF, 0);
+ break;
+#endif /* PCCONS_SUPPORT */
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ case SYSCONS:
+ case PCVT:
+ ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); /* Back to text mode */
+ if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1)
+ {
+ VT.mode = VT_AUTO;
+ ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */
+ }
+#if !defined(OpenBSD) && !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
+ if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0)
+ {
+ xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)",
+ strerror(errno));
+ }
+#endif
+ if (initialVT != -1)
+ ioctl(xf86Info.consoleFd, VT_ACTIVATE, initialVT);
+ break;
+#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
+#ifdef WSCONS_SUPPORT
+ case WSCONS:
+ {
+ int mode = WSDISPLAYIO_MODE_EMUL;
+ ioctl(xf86Info.screenFd, WSDISPLAYIO_SMODE, &mode);
+ break;
+ }
+#endif
+ }
+
+ if (xf86Info.screenFd != xf86Info.consoleFd)
+ {
+ close(xf86Info.screenFd);
+ close(xf86Info.consoleFd);
+ if ((xf86Info.consoleFd = open("/dev/console",O_RDONLY,0)) <0)
+ {
+ xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)",
+ strerror(errno));
+ }
+ }
+ close(xf86Info.consoleFd);
+ if (devConsoleFd >= 0)
+ close(devConsoleFd);
+ return;
+}
+
+int
+xf86ProcessArgument(int argc, char *argv[], int i)
+{
+ /*
+ * Keep server from detaching from controlling tty. This is useful
+ * when debugging (so the server can receive keyboard signals.
+ */
+ if (!strcmp(argv[i], "-keeptty"))
+ {
+ KeepTty = TRUE;
+ return 1;
+ }
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (!strcmp(argv[i], "-sharevts"))
+ {
+ ShareVTs = TRUE;
+ return 1;
+ }
+ if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
+ {
+ if (sscanf(argv[i], "vt%2d", &VTnum) == 0 ||
+ VTnum < 1 || VTnum > 12)
+ {
+ UseMsg();
+ VTnum = -1;
+ return 0;
+ }
+ return 1;
+ }
+#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
+ return 0;
+}
+
+void
+xf86UseMsg()
+{
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ ErrorF("vtXX use the specified VT number (1-12)\n");
+ ErrorF("-sharevts share VTs with another X server\n");
+#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
+ ErrorF("-keeptty ");
+ ErrorF("don't detach controlling tty (for debugging only)\n");
+ return;
+}
diff --git a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
index 24c91cc37..6eab1a3dd 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
+++ b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
@@ -1,475 +1,475 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86CursorPriv.h"
-#include "colormapst.h"
-#include "cursorstr.h"
-
-/* FIXME: This was added with the ABI change of the miPointerSpriteFuncs for
- * MPX.
- * inputInfo is needed to pass the core pointer as the default argument into
- * the cursor functions.
- *
- * Externing inputInfo is not the nice way to do it but it works.
- */
-#include "inputstr.h"
-extern InputInfo inputInfo;
-
-DevPrivateKeyRec xf86CursorScreenKeyRec;
-
-/* sprite functions */
-
-static Bool xf86CursorRealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr);
-static Bool xf86CursorUnrealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr);
-static void xf86CursorSetCursor(DeviceIntPtr, ScreenPtr, CursorPtr, int, int);
-static void xf86CursorMoveCursor(DeviceIntPtr, ScreenPtr, int, int);
-static Bool xf86DeviceCursorInitialize(DeviceIntPtr, ScreenPtr);
-static void xf86DeviceCursorCleanup(DeviceIntPtr, ScreenPtr);
-
-static miPointerSpriteFuncRec xf86CursorSpriteFuncs = {
- xf86CursorRealizeCursor,
- xf86CursorUnrealizeCursor,
- xf86CursorSetCursor,
- xf86CursorMoveCursor,
- xf86DeviceCursorInitialize,
- xf86DeviceCursorCleanup
-};
-
-/* Screen functions */
-
-static void xf86CursorInstallColormap(ColormapPtr);
-static void xf86CursorRecolorCursor(DeviceIntPtr pDev, ScreenPtr, CursorPtr, Bool);
-static Bool xf86CursorCloseScreen(int, ScreenPtr);
-static void xf86CursorQueryBestSize(int, unsigned short*, unsigned short*,
- ScreenPtr);
-
-/* ScrnInfoRec functions */
-
-static void xf86CursorEnableDisableFBAccess(int, Bool);
-static Bool xf86CursorSwitchMode(int, DisplayModePtr,int);
-
-Bool
-xf86InitCursor(
- ScreenPtr pScreen,
- xf86CursorInfoPtr infoPtr
-)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CursorScreenPtr ScreenPriv;
- miPointerScreenPtr PointPriv;
-
- if (!xf86InitHardwareCursor(pScreen, infoPtr))
- return FALSE;
-
- if (!dixRegisterPrivateKey(&xf86CursorScreenKeyRec, PRIVATE_SCREEN, 0))
- return FALSE;
-
- ScreenPriv = calloc(1, sizeof(xf86CursorScreenRec));
- if (!ScreenPriv)
- return FALSE;
-
- dixSetPrivate(&pScreen->devPrivates, xf86CursorScreenKey, ScreenPriv);
-
- ScreenPriv->SWCursor = TRUE;
- ScreenPriv->isUp = FALSE;
- ScreenPriv->CurrentCursor = NULL;
- ScreenPriv->CursorInfoPtr = infoPtr;
- ScreenPriv->PalettedCursor = FALSE;
- ScreenPriv->pInstalledMap = NULL;
-
- ScreenPriv->CloseScreen = pScreen->CloseScreen;
- pScreen->CloseScreen = xf86CursorCloseScreen;
- ScreenPriv->QueryBestSize = pScreen->QueryBestSize;
- pScreen->QueryBestSize = xf86CursorQueryBestSize;
- ScreenPriv->RecolorCursor = pScreen->RecolorCursor;
- pScreen->RecolorCursor = xf86CursorRecolorCursor;
-
- if ((infoPtr->pScrn->bitsPerPixel == 8) &&
- !(infoPtr->Flags & HARDWARE_CURSOR_TRUECOLOR_AT_8BPP)) {
- ScreenPriv->InstallColormap = pScreen->InstallColormap;
- pScreen->InstallColormap = xf86CursorInstallColormap;
- ScreenPriv->PalettedCursor = TRUE;
- }
-
- PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
-
- ScreenPriv->showTransparent = PointPriv->showTransparent;
- if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT)
- PointPriv->showTransparent = TRUE;
- else
- PointPriv->showTransparent = FALSE;
- ScreenPriv->spriteFuncs = PointPriv->spriteFuncs;
- PointPriv->spriteFuncs = &xf86CursorSpriteFuncs;
-
- ScreenPriv->EnableDisableFBAccess = pScrn->EnableDisableFBAccess;
- ScreenPriv->SwitchMode = pScrn->SwitchMode;
-
- ScreenPriv->ForceHWCursorCount = 0;
- ScreenPriv->HWCursorForced = FALSE;
-
- pScrn->EnableDisableFBAccess = xf86CursorEnableDisableFBAccess;
- if (pScrn->SwitchMode)
- pScrn->SwitchMode = xf86CursorSwitchMode;
-
- return TRUE;
-}
-
-/***** Screen functions *****/
-
-static Bool
-xf86CursorCloseScreen(int i, ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, miPointerScreenKey);
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- if (ScreenPriv->isUp && pScrn->vtSema)
- xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y);
-
- if (ScreenPriv->CurrentCursor)
- FreeCursor(ScreenPriv->CurrentCursor, None);
-
- pScreen->CloseScreen = ScreenPriv->CloseScreen;
- pScreen->QueryBestSize = ScreenPriv->QueryBestSize;
- pScreen->RecolorCursor = ScreenPriv->RecolorCursor;
- if (ScreenPriv->InstallColormap)
- pScreen->InstallColormap = ScreenPriv->InstallColormap;
-
- PointPriv->spriteFuncs = ScreenPriv->spriteFuncs;
- PointPriv->showTransparent = ScreenPriv->showTransparent;
-
- pScrn->EnableDisableFBAccess = ScreenPriv->EnableDisableFBAccess;
- pScrn->SwitchMode = ScreenPriv->SwitchMode;
-
- free(ScreenPriv->transparentData);
- free(ScreenPriv);
-
- return (*pScreen->CloseScreen)(i, pScreen);
-}
-
-static void
-xf86CursorQueryBestSize(
- int class,
- unsigned short *width,
- unsigned short *height,
- ScreenPtr pScreen)
-{
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- if (class == CursorShape) {
- if(*width > ScreenPriv->CursorInfoPtr->MaxWidth)
- *width = ScreenPriv->CursorInfoPtr->MaxWidth;
- if(*height > ScreenPriv->CursorInfoPtr->MaxHeight)
- *height = ScreenPriv->CursorInfoPtr->MaxHeight;
- } else
- (*ScreenPriv->QueryBestSize)(class, width, height, pScreen);
-}
-
-static void
-xf86CursorInstallColormap(ColormapPtr pMap)
-{
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pMap->pScreen->devPrivates, xf86CursorScreenKey);
-
- ScreenPriv->pInstalledMap = pMap;
-
- (*ScreenPriv->InstallColormap)(pMap);
-}
-
-static void
-xf86CursorRecolorCursor(
- DeviceIntPtr pDev,
- ScreenPtr pScreen,
- CursorPtr pCurs,
- Bool displayed)
-{
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- if (!displayed)
- return;
-
- if (ScreenPriv->SWCursor)
- (*ScreenPriv->RecolorCursor)(pDev, pScreen, pCurs, displayed);
- else
- xf86RecolorCursor(pScreen, pCurs, displayed);
-}
-
-/***** ScrnInfoRec functions *********/
-
-static void
-xf86CursorEnableDisableFBAccess(
- int index,
- Bool enable)
-{
- DeviceIntPtr pDev = inputInfo.pointer;
-
- ScreenPtr pScreen = screenInfo.screens[index];
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- if (!enable && ScreenPriv->CurrentCursor != NullCursor) {
- CursorPtr currentCursor = ScreenPriv->CurrentCursor;
- xf86CursorSetCursor(pDev, pScreen, NullCursor, ScreenPriv->x,
- ScreenPriv->y);
- ScreenPriv->isUp = FALSE;
- ScreenPriv->SWCursor = TRUE;
- ScreenPriv->SavedCursor = currentCursor;
- }
-
- if (ScreenPriv->EnableDisableFBAccess)
- (*ScreenPriv->EnableDisableFBAccess)(index, enable);
-
- if (enable && ScreenPriv->SavedCursor)
- {
- /*
- * Re-set current cursor so drivers can react to FB access having been
- * temporarily disabled.
- */
- xf86CursorSetCursor(pDev, pScreen, ScreenPriv->SavedCursor,
- ScreenPriv->x, ScreenPriv->y);
- ScreenPriv->SavedCursor = NULL;
- }
-}
-
-static Bool
-xf86CursorSwitchMode(int index, DisplayModePtr mode, int flags)
-{
- Bool ret;
- ScreenPtr pScreen = screenInfo.screens[index];
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- if (ScreenPriv->isUp) {
- xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y);
- ScreenPriv->isUp = FALSE;
- }
-
- ret = (*ScreenPriv->SwitchMode)(index, mode, flags);
-
- /*
- * Cannot restore cursor here because the new frame[XY][01] haven't been
- * calculated yet. However, because the hardware cursor was removed above,
- * ensure the cursor is repainted by miPointerWarpCursor().
- */
- ScreenPriv->CursorToRestore = ScreenPriv->CurrentCursor;
- miPointerSetWaitForUpdate(pScreen, FALSE); /* Force cursor repaint */
-
- return ret;
-}
-
-/****** miPointerSpriteFunctions *******/
-
-static Bool
-xf86CursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs)
-{
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- if (pCurs->refcnt <= 1)
- dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), NULL);
-
- return (*ScreenPriv->spriteFuncs->RealizeCursor)(pDev, pScreen, pCurs);
-}
-
-static Bool
-xf86CursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
- CursorPtr pCurs)
-{
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- if (pCurs->refcnt <= 1) {
- free(dixLookupPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen)));
- dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), NULL);
- }
-
- return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pDev, pScreen, pCurs);
-}
-
-static void
-xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
- int x, int y)
-{
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
- xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
-
- if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */
- if (ScreenPriv->SWCursor ||
- !(GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer))
- (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y);
- else if (ScreenPriv->isUp) {
- xf86SetCursor(pScreen, NullCursor, x, y);
- ScreenPriv->isUp = FALSE;
- }
- if (ScreenPriv->CurrentCursor)
- FreeCursor(ScreenPriv->CurrentCursor, None);
- ScreenPriv->CurrentCursor = NullCursor;
- return;
- }
-
- /* only update for VCP, otherwise we get cursor jumps when removing a
- sprite. The second cursor is never HW rendered anyway. */
- if (GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer)
- {
- pCurs->refcnt++;
- if (ScreenPriv->CurrentCursor)
- FreeCursor(ScreenPriv->CurrentCursor, None);
- ScreenPriv->CurrentCursor = pCurs;
- ScreenPriv->x = x;
- ScreenPriv->y = y;
- ScreenPriv->CursorToRestore = NULL;
- ScreenPriv->HotX = pCurs->bits->xhot;
- ScreenPriv->HotY = pCurs->bits->yhot;
-
- if (!infoPtr->pScrn->vtSema)
- ScreenPriv->SavedCursor = pCurs;
-
- if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || ((
-#ifdef ARGB_CURSOR
- pCurs->bits->argb && infoPtr->UseHWCursorARGB &&
- (*infoPtr->UseHWCursorARGB) (pScreen, pCurs) ) || (
- pCurs->bits->argb == 0 &&
-#endif
- (pCurs->bits->height <= infoPtr->MaxHeight) &&
- (pCurs->bits->width <= infoPtr->MaxWidth) &&
- (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor)(pScreen, pCurs))))))
- {
-
- if (ScreenPriv->SWCursor) /* remove the SW cursor */
- (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y);
-
- xf86SetCursor(pScreen, pCurs, x, y);
- ScreenPriv->SWCursor = FALSE;
- ScreenPriv->isUp = TRUE;
-
- miPointerSetWaitForUpdate(pScreen, !infoPtr->pScrn->silkenMouse);
- return;
- }
-
- miPointerSetWaitForUpdate(pScreen, TRUE);
-
- if (ScreenPriv->isUp) {
- /* Remove the HW cursor, or make it transparent */
- if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT) {
- xf86SetTransparentCursor(pScreen);
- } else {
- xf86SetCursor(pScreen, NullCursor, x, y);
- ScreenPriv->isUp = FALSE;
- }
- }
-
- if (!ScreenPriv->SWCursor)
- ScreenPriv->SWCursor = TRUE;
-
- }
-
- if (pCurs->bits->emptyMask && !ScreenPriv->showTransparent)
- pCurs = NullCursor;
-
- (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, pCurs, x, y);
-}
-
-static void
-xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
-{
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- /* only update coordinate state for first sprite, otherwise we get jumps
- when removing a sprite. The second sprite is never HW rendered anyway */
- if (GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer)
- {
- ScreenPriv->x = x;
- ScreenPriv->y = y;
-
- if (ScreenPriv->CursorToRestore)
- xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CursorToRestore, x, y);
- else if (ScreenPriv->SWCursor)
- (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y);
- else if (ScreenPriv->isUp)
- xf86MoveCursor(pScreen, x, y);
- } else
- (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y);
-}
-
-void
-xf86ForceHWCursor (ScreenPtr pScreen, Bool on)
-{
- DeviceIntPtr pDev = inputInfo.pointer;
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- if (on)
- {
- if (ScreenPriv->ForceHWCursorCount++ == 0)
- {
- if (ScreenPriv->SWCursor && ScreenPriv->CurrentCursor)
- {
- ScreenPriv->HWCursorForced = TRUE;
- xf86CursorSetCursor (pDev, pScreen, ScreenPriv->CurrentCursor,
- ScreenPriv->x, ScreenPriv->y);
- }
- else
- ScreenPriv->HWCursorForced = FALSE;
- }
- }
- else
- {
- if (--ScreenPriv->ForceHWCursorCount == 0)
- {
- if (ScreenPriv->HWCursorForced && ScreenPriv->CurrentCursor)
- xf86CursorSetCursor (pDev, pScreen, ScreenPriv->CurrentCursor,
- ScreenPriv->x, ScreenPriv->y);
- }
- }
-}
-
-xf86CursorInfoPtr
-xf86CreateCursorInfoRec(void)
-{
- return calloc(1, sizeof(xf86CursorInfoRec));
-}
-
-void
-xf86DestroyCursorInfoRec(xf86CursorInfoPtr infoPtr)
-{
- free(infoPtr);
-}
-
-/**
- * New cursor has been created. Do your initalizations here.
- */
-static Bool
-xf86DeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
-{
- int ret;
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- /* Init SW cursor */
- ret = (*ScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen);
-
- return ret;
-}
-
-/**
- * Cursor has been removed. Clean up after yourself.
- */
-static void
-xf86DeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
-{
- xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
- &pScreen->devPrivates, xf86CursorScreenKey);
-
- /* Clean up SW cursor */
- (*ScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen);
-}
-
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include "xf86.h"
+#include "xf86CursorPriv.h"
+#include "colormapst.h"
+#include "cursorstr.h"
+
+/* FIXME: This was added with the ABI change of the miPointerSpriteFuncs for
+ * MPX.
+ * inputInfo is needed to pass the core pointer as the default argument into
+ * the cursor functions.
+ *
+ * Externing inputInfo is not the nice way to do it but it works.
+ */
+#include "inputstr.h"
+extern InputInfo inputInfo;
+
+DevPrivateKeyRec xf86CursorScreenKeyRec;
+
+/* sprite functions */
+
+static Bool xf86CursorRealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr);
+static Bool xf86CursorUnrealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr);
+static void xf86CursorSetCursor(DeviceIntPtr, ScreenPtr, CursorPtr, int, int);
+static void xf86CursorMoveCursor(DeviceIntPtr, ScreenPtr, int, int);
+static Bool xf86DeviceCursorInitialize(DeviceIntPtr, ScreenPtr);
+static void xf86DeviceCursorCleanup(DeviceIntPtr, ScreenPtr);
+
+static miPointerSpriteFuncRec xf86CursorSpriteFuncs = {
+ xf86CursorRealizeCursor,
+ xf86CursorUnrealizeCursor,
+ xf86CursorSetCursor,
+ xf86CursorMoveCursor,
+ xf86DeviceCursorInitialize,
+ xf86DeviceCursorCleanup
+};
+
+/* Screen functions */
+
+static void xf86CursorInstallColormap(ColormapPtr);
+static void xf86CursorRecolorCursor(DeviceIntPtr pDev, ScreenPtr, CursorPtr, Bool);
+static Bool xf86CursorCloseScreen(int, ScreenPtr);
+static void xf86CursorQueryBestSize(int, unsigned short*, unsigned short*,
+ ScreenPtr);
+
+/* ScrnInfoRec functions */
+
+static void xf86CursorEnableDisableFBAccess(int, Bool);
+static Bool xf86CursorSwitchMode(int, DisplayModePtr,int);
+
+Bool
+xf86InitCursor(
+ ScreenPtr pScreen,
+ xf86CursorInfoPtr infoPtr
+)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ xf86CursorScreenPtr ScreenPriv;
+ miPointerScreenPtr PointPriv;
+
+ if (!xf86InitHardwareCursor(pScreen, infoPtr))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(&xf86CursorScreenKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
+ ScreenPriv = calloc(1, sizeof(xf86CursorScreenRec));
+ if (!ScreenPriv)
+ return FALSE;
+
+ dixSetPrivate(&pScreen->devPrivates, xf86CursorScreenKey, ScreenPriv);
+
+ ScreenPriv->SWCursor = TRUE;
+ ScreenPriv->isUp = FALSE;
+ ScreenPriv->CurrentCursor = NULL;
+ ScreenPriv->CursorInfoPtr = infoPtr;
+ ScreenPriv->PalettedCursor = FALSE;
+ ScreenPriv->pInstalledMap = NULL;
+
+ ScreenPriv->CloseScreen = pScreen->CloseScreen;
+ pScreen->CloseScreen = xf86CursorCloseScreen;
+ ScreenPriv->QueryBestSize = pScreen->QueryBestSize;
+ pScreen->QueryBestSize = xf86CursorQueryBestSize;
+ ScreenPriv->RecolorCursor = pScreen->RecolorCursor;
+ pScreen->RecolorCursor = xf86CursorRecolorCursor;
+
+ if ((infoPtr->pScrn->bitsPerPixel == 8) &&
+ !(infoPtr->Flags & HARDWARE_CURSOR_TRUECOLOR_AT_8BPP)) {
+ ScreenPriv->InstallColormap = pScreen->InstallColormap;
+ pScreen->InstallColormap = xf86CursorInstallColormap;
+ ScreenPriv->PalettedCursor = TRUE;
+ }
+
+ PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
+
+ ScreenPriv->showTransparent = PointPriv->showTransparent;
+ if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT)
+ PointPriv->showTransparent = TRUE;
+ else
+ PointPriv->showTransparent = FALSE;
+ ScreenPriv->spriteFuncs = PointPriv->spriteFuncs;
+ PointPriv->spriteFuncs = &xf86CursorSpriteFuncs;
+
+ ScreenPriv->EnableDisableFBAccess = pScrn->EnableDisableFBAccess;
+ ScreenPriv->SwitchMode = pScrn->SwitchMode;
+
+ ScreenPriv->ForceHWCursorCount = 0;
+ ScreenPriv->HWCursorForced = FALSE;
+
+ pScrn->EnableDisableFBAccess = xf86CursorEnableDisableFBAccess;
+ if (pScrn->SwitchMode)
+ pScrn->SwitchMode = xf86CursorSwitchMode;
+
+ return TRUE;
+}
+
+/***** Screen functions *****/
+
+static Bool
+xf86CursorCloseScreen(int i, ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, miPointerScreenKey);
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ if (ScreenPriv->isUp && pScrn->vtSema)
+ xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y);
+
+ if (ScreenPriv->CurrentCursor)
+ FreeCursor(ScreenPriv->CurrentCursor, None);
+
+ pScreen->CloseScreen = ScreenPriv->CloseScreen;
+ pScreen->QueryBestSize = ScreenPriv->QueryBestSize;
+ pScreen->RecolorCursor = ScreenPriv->RecolorCursor;
+ if (ScreenPriv->InstallColormap)
+ pScreen->InstallColormap = ScreenPriv->InstallColormap;
+
+ PointPriv->spriteFuncs = ScreenPriv->spriteFuncs;
+ PointPriv->showTransparent = ScreenPriv->showTransparent;
+
+ pScrn->EnableDisableFBAccess = ScreenPriv->EnableDisableFBAccess;
+ pScrn->SwitchMode = ScreenPriv->SwitchMode;
+
+ free(ScreenPriv->transparentData);
+ free(ScreenPriv);
+
+ return (*pScreen->CloseScreen)(i, pScreen);
+}
+
+static void
+xf86CursorQueryBestSize(
+ int class,
+ unsigned short *width,
+ unsigned short *height,
+ ScreenPtr pScreen)
+{
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ if (class == CursorShape) {
+ if(*width > ScreenPriv->CursorInfoPtr->MaxWidth)
+ *width = ScreenPriv->CursorInfoPtr->MaxWidth;
+ if(*height > ScreenPriv->CursorInfoPtr->MaxHeight)
+ *height = ScreenPriv->CursorInfoPtr->MaxHeight;
+ } else
+ (*ScreenPriv->QueryBestSize)(class, width, height, pScreen);
+}
+
+static void
+xf86CursorInstallColormap(ColormapPtr pMap)
+{
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pMap->pScreen->devPrivates, xf86CursorScreenKey);
+
+ ScreenPriv->pInstalledMap = pMap;
+
+ (*ScreenPriv->InstallColormap)(pMap);
+}
+
+static void
+xf86CursorRecolorCursor(
+ DeviceIntPtr pDev,
+ ScreenPtr pScreen,
+ CursorPtr pCurs,
+ Bool displayed)
+{
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ if (!displayed)
+ return;
+
+ if (ScreenPriv->SWCursor)
+ (*ScreenPriv->RecolorCursor)(pDev, pScreen, pCurs, displayed);
+ else
+ xf86RecolorCursor(pScreen, pCurs, displayed);
+}
+
+/***** ScrnInfoRec functions *********/
+
+static void
+xf86CursorEnableDisableFBAccess(
+ int index,
+ Bool enable)
+{
+ DeviceIntPtr pDev = inputInfo.pointer;
+
+ ScreenPtr pScreen = screenInfo.screens[index];
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ if (!enable && ScreenPriv->CurrentCursor != NullCursor) {
+ CursorPtr currentCursor = ScreenPriv->CurrentCursor;
+ xf86CursorSetCursor(pDev, pScreen, NullCursor, ScreenPriv->x,
+ ScreenPriv->y);
+ ScreenPriv->isUp = FALSE;
+ ScreenPriv->SWCursor = TRUE;
+ ScreenPriv->SavedCursor = currentCursor;
+ }
+
+ if (ScreenPriv->EnableDisableFBAccess)
+ (*ScreenPriv->EnableDisableFBAccess)(index, enable);
+
+ if (enable && ScreenPriv->SavedCursor)
+ {
+ /*
+ * Re-set current cursor so drivers can react to FB access having been
+ * temporarily disabled.
+ */
+ xf86CursorSetCursor(pDev, pScreen, ScreenPriv->SavedCursor,
+ ScreenPriv->x, ScreenPriv->y);
+ ScreenPriv->SavedCursor = NULL;
+ }
+}
+
+static Bool
+xf86CursorSwitchMode(int index, DisplayModePtr mode, int flags)
+{
+ Bool ret;
+ ScreenPtr pScreen = screenInfo.screens[index];
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ if (ScreenPriv->isUp) {
+ xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y);
+ ScreenPriv->isUp = FALSE;
+ }
+
+ ret = (*ScreenPriv->SwitchMode)(index, mode, flags);
+
+ /*
+ * Cannot restore cursor here because the new frame[XY][01] haven't been
+ * calculated yet. However, because the hardware cursor was removed above,
+ * ensure the cursor is repainted by miPointerWarpCursor().
+ */
+ ScreenPriv->CursorToRestore = ScreenPriv->CurrentCursor;
+ miPointerSetWaitForUpdate(pScreen, FALSE); /* Force cursor repaint */
+
+ return ret;
+}
+
+/****** miPointerSpriteFunctions *******/
+
+static Bool
+xf86CursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs)
+{
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ if (pCurs->refcnt <= 1)
+ dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), NULL);
+
+ return (*ScreenPriv->spriteFuncs->RealizeCursor)(pDev, pScreen, pCurs);
+}
+
+static Bool
+xf86CursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
+ CursorPtr pCurs)
+{
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ if (pCurs->refcnt <= 1) {
+ free(dixLookupPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen)));
+ dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), NULL);
+ }
+
+ return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pDev, pScreen, pCurs);
+}
+
+static void
+xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
+ int x, int y)
+{
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+ xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
+
+ if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */
+ if (ScreenPriv->SWCursor ||
+ !(GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer))
+ (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y);
+ else if (ScreenPriv->isUp) {
+ xf86SetCursor(pScreen, NullCursor, x, y);
+ ScreenPriv->isUp = FALSE;
+ }
+ if (ScreenPriv->CurrentCursor)
+ FreeCursor(ScreenPriv->CurrentCursor, None);
+ ScreenPriv->CurrentCursor = NullCursor;
+ return;
+ }
+
+ /* only update for VCP, otherwise we get cursor jumps when removing a
+ sprite. The second cursor is never HW rendered anyway. */
+ if (GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer)
+ {
+ pCurs->refcnt++;
+ if (ScreenPriv->CurrentCursor)
+ FreeCursor(ScreenPriv->CurrentCursor, None);
+ ScreenPriv->CurrentCursor = pCurs;
+ ScreenPriv->x = x;
+ ScreenPriv->y = y;
+ ScreenPriv->CursorToRestore = NULL;
+ ScreenPriv->HotX = pCurs->bits->xhot;
+ ScreenPriv->HotY = pCurs->bits->yhot;
+
+ if (!infoPtr->pScrn->vtSema)
+ ScreenPriv->SavedCursor = pCurs;
+
+ if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || ((
+#ifdef ARGB_CURSOR
+ pCurs->bits->argb && infoPtr->UseHWCursorARGB &&
+ (*infoPtr->UseHWCursorARGB) (pScreen, pCurs) ) || (
+ pCurs->bits->argb == 0 &&
+#endif
+ (pCurs->bits->height <= infoPtr->MaxHeight) &&
+ (pCurs->bits->width <= infoPtr->MaxWidth) &&
+ (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor)(pScreen, pCurs))))))
+ {
+
+ if (ScreenPriv->SWCursor) /* remove the SW cursor */
+ (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y);
+
+ xf86SetCursor(pScreen, pCurs, x, y);
+ ScreenPriv->SWCursor = FALSE;
+ ScreenPriv->isUp = TRUE;
+
+ miPointerSetWaitForUpdate(pScreen, !infoPtr->pScrn->silkenMouse);
+ return;
+ }
+
+ miPointerSetWaitForUpdate(pScreen, TRUE);
+
+ if (ScreenPriv->isUp) {
+ /* Remove the HW cursor, or make it transparent */
+ if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT) {
+ xf86SetTransparentCursor(pScreen);
+ } else {
+ xf86SetCursor(pScreen, NullCursor, x, y);
+ ScreenPriv->isUp = FALSE;
+ }
+ }
+
+ if (!ScreenPriv->SWCursor)
+ ScreenPriv->SWCursor = TRUE;
+
+ }
+
+ if (pCurs->bits->emptyMask && !ScreenPriv->showTransparent)
+ pCurs = NullCursor;
+
+ (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, pCurs, x, y);
+}
+
+static void
+xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
+{
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ /* only update coordinate state for first sprite, otherwise we get jumps
+ when removing a sprite. The second sprite is never HW rendered anyway */
+ if (GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer)
+ {
+ ScreenPriv->x = x;
+ ScreenPriv->y = y;
+
+ if (ScreenPriv->CursorToRestore)
+ xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CursorToRestore, x, y);
+ else if (ScreenPriv->SWCursor)
+ (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y);
+ else if (ScreenPriv->isUp)
+ xf86MoveCursor(pScreen, x, y);
+ } else
+ (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y);
+}
+
+void
+xf86ForceHWCursor (ScreenPtr pScreen, Bool on)
+{
+ DeviceIntPtr pDev = inputInfo.pointer;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ if (on)
+ {
+ if (ScreenPriv->ForceHWCursorCount++ == 0)
+ {
+ if (ScreenPriv->SWCursor && ScreenPriv->CurrentCursor)
+ {
+ ScreenPriv->HWCursorForced = TRUE;
+ xf86CursorSetCursor (pDev, pScreen, ScreenPriv->CurrentCursor,
+ ScreenPriv->x, ScreenPriv->y);
+ }
+ else
+ ScreenPriv->HWCursorForced = FALSE;
+ }
+ }
+ else
+ {
+ if (--ScreenPriv->ForceHWCursorCount == 0)
+ {
+ if (ScreenPriv->HWCursorForced && ScreenPriv->CurrentCursor)
+ xf86CursorSetCursor (pDev, pScreen, ScreenPriv->CurrentCursor,
+ ScreenPriv->x, ScreenPriv->y);
+ }
+ }
+}
+
+xf86CursorInfoPtr
+xf86CreateCursorInfoRec(void)
+{
+ return calloc(1, sizeof(xf86CursorInfoRec));
+}
+
+void
+xf86DestroyCursorInfoRec(xf86CursorInfoPtr infoPtr)
+{
+ free(infoPtr);
+}
+
+/**
+ * New cursor has been created. Do your initalizations here.
+ */
+static Bool
+xf86DeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+ int ret;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ /* Init SW cursor */
+ ret = (*ScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen);
+
+ return ret;
+}
+
+/**
+ * Cursor has been removed. Clean up after yourself.
+ */
+static void
+xf86DeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+
+ /* Clean up SW cursor */
+ (*ScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen);
+}
+
diff --git a/xorg-server/hw/xfree86/vbe/vbe.c b/xorg-server/hw/xfree86/vbe/vbe.c
index 04132d956..082cfae4f 100644
--- a/xorg-server/hw/xfree86/vbe/vbe.c
+++ b/xorg-server/hw/xfree86/vbe/vbe.c
@@ -1,1089 +1,1089 @@
-
-/*
- * XFree86 vbe module
- * Copyright 2000 Egbert Eich
- *
- * The mode query/save/set/restore functions from the vesa driver
- * have been moved here.
- * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com)
- * Authors: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <string.h>
-
-#include "xf86.h"
-#include "vbe.h"
-#include <X11/extensions/dpmsconst.h>
-
-#define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x)
-
-#if X_BYTE_ORDER == X_LITTLE_ENDIAN
-#define B_O16(x) (x)
-#define B_O32(x) (x)
-#else
-#define B_O16(x) ((((x) & 0xff) << 8) | (((x) & 0xff) >> 8))
-#define B_O32(x) ((((x) & 0xff) << 24) | (((x) & 0xff00) << 8) \
- | (((x) & 0xff0000) >> 8) | (((x) & 0xff000000) >> 24))
-#endif
-#define L_ADD(x) (B_O32(x) & 0xffff) + ((B_O32(x) >> 12) & 0xffff00)
-
-#define FARP(p) (((unsigned)(p & 0xffff0000) >> 12) | (p & 0xffff))
-#define R16(v) ((v) & 0xffff)
-
-static unsigned char * vbeReadEDID(vbeInfoPtr pVbe);
-static Bool vbeProbeDDC(vbeInfoPtr pVbe);
-
-static const char vbeVersionString[] = "VBE2";
-
-vbeInfoPtr
-VBEInit(xf86Int10InfoPtr pInt, int entityIndex)
-{
- return VBEExtendedInit(pInt, entityIndex, 0);
-}
-
-vbeInfoPtr
-VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags)
-{
- int RealOff;
- pointer page = NULL;
- ScrnInfoPtr pScrn = xf86FindScreenForEntity(entityIndex);
- vbeControllerInfoPtr vbe = NULL;
- Bool init_int10 = FALSE;
- vbeInfoPtr vip = NULL;
- int screen;
-
- if (!pScrn) return NULL;
- screen = pScrn->scrnIndex;
-
- if (!pInt) {
- if (!xf86LoadSubModule(pScrn, "int10"))
- goto error;
-
- xf86DrvMsg(screen,X_INFO,"initializing int10\n");
- pInt = xf86ExtendedInitInt10(entityIndex,Flags);
- if (!pInt)
- goto error;
- init_int10 = TRUE;
- }
-
- page = xf86Int10AllocPages(pInt,1,&RealOff);
- if (!page) goto error;
- vbe = (vbeControllerInfoPtr) page;
- memcpy(vbe->VbeSignature,vbeVersionString,4);
-
- pInt->ax = 0x4F00;
- pInt->es = SEG_ADDR(RealOff);
- pInt->di = SEG_OFF(RealOff);
- pInt->num = 0x10;
-
- xf86ExecX86int10(pInt);
-
- if ((pInt->ax & 0xff) != 0x4f) {
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA BIOS not detected\n");
- goto error;
- }
-
- switch (pInt->ax & 0xff00) {
- case 0:
- xf86DrvMsg(screen,X_INFO,"VESA BIOS detected\n");
- break;
- case 0x100:
- xf86DrvMsg(screen,X_INFO,"VESA BIOS function failed\n");
- goto error;
- case 0x200:
- xf86DrvMsg(screen,X_INFO,"VESA BIOS not supported\n");
- goto error;
- case 0x300:
- xf86DrvMsg(screen,X_INFO,"VESA BIOS not supported in current mode\n");
- goto error;
- default:
- xf86DrvMsg(screen,X_INFO,"Invalid\n");
- goto error;
- }
-
- xf86DrvMsgVerb(screen, X_INFO, 4,
- "VbeVersion is %d, OemStringPtr is 0x%08lx,\n"
- "\tOemVendorNamePtr is 0x%08lx, OemProductNamePtr is 0x%08lx,\n"
- "\tOemProductRevPtr is 0x%08lx\n",
- vbe->VbeVersion, (unsigned long)vbe->OemStringPtr,
- (unsigned long)vbe->OemVendorNamePtr,
- (unsigned long)vbe->OemProductNamePtr,
- (unsigned long)vbe->OemProductRevPtr);
-
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE Version %i.%i\n",
- VERSION(vbe->VbeVersion));
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE Total Mem: %i kB\n",
- vbe->TotalMem * 64);
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE OEM: %s\n",
- (CARD8*)xf86int10Addr(pInt,L_ADD(vbe->OemStringPtr)));
-
- if (B_O16(vbe->VbeVersion) >= 0x200) {
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE OEM Software Rev: %i.%i\n",
- VERSION(vbe->OemSoftwareRev));
- if (vbe->OemVendorNamePtr)
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE OEM Vendor: %s\n",
- (CARD8*)xf86int10Addr(pInt,L_ADD(vbe->OemVendorNamePtr)));
- if (vbe->OemProductNamePtr)
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE OEM Product: %s\n",
- (CARD8*)xf86int10Addr(pInt,L_ADD(vbe->OemProductNamePtr)));
- if (vbe->OemProductRevPtr)
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE OEM Product Rev: %s\n",
- (CARD8*)xf86int10Addr(pInt,L_ADD(vbe->OemProductRevPtr)));
- }
- vip = (vbeInfoPtr)xnfalloc(sizeof(vbeInfoRec));
- vip->version = B_O16(vbe->VbeVersion);
- vip->pInt10 = pInt;
- vip->ddc = DDC_UNCHECKED;
- vip->memory = page;
- vip->real_mode_base = RealOff;
- vip->num_pages = 1;
- vip->init_int10 = init_int10;
-
- return vip;
-
- error:
- if (page)
- xf86Int10FreePages(pInt, page, 1);
- if (init_int10)
- xf86FreeInt10(pInt);
- return NULL;
-}
-
-void
-vbeFree(vbeInfoPtr pVbe)
-{
- if (!pVbe)
- return;
-
- xf86Int10FreePages(pVbe->pInt10,pVbe->memory,pVbe->num_pages);
- /* If we have initalized int10 we ought to free it, too */
- if (pVbe->init_int10)
- xf86FreeInt10(pVbe->pInt10);
- free(pVbe);
- return;
-}
-
-static Bool
-vbeProbeDDC(vbeInfoPtr pVbe)
-{
- char *ddc_level;
- int screen = pVbe->pInt10->scrnIndex;
-
- if (pVbe->ddc == DDC_NONE)
- return FALSE;
- if (pVbe->ddc != DDC_UNCHECKED)
- return TRUE;
-
- pVbe->pInt10->ax = 0x4F15;
- pVbe->pInt10->bx = 0;
- pVbe->pInt10->cx = 0;
- pVbe->pInt10->es = 0;
- pVbe->pInt10->di = 0;
- pVbe->pInt10->num = 0x10;
-
- xf86ExecX86int10(pVbe->pInt10);
-
- if ((pVbe->pInt10->ax & 0xff) != 0x4f) {
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC not supported\n");
- pVbe->ddc = DDC_NONE;
- return FALSE;
- }
-
- switch ((pVbe->pInt10->ax >> 8) & 0xff) {
- case 0:
- xf86DrvMsg(screen,X_INFO,"VESA VBE DDC supported\n");
- switch (pVbe->pInt10->bx & 0x3) {
- case 0:
- ddc_level = " none";
- pVbe->ddc = DDC_NONE;
- break;
- case 1:
- ddc_level = " 1";
- pVbe->ddc = DDC_1;
- break;
- case 2:
- ddc_level = " 2";
- pVbe->ddc = DDC_2;
- break;
- case 3:
- ddc_level = " 1 + 2";
- pVbe->ddc = DDC_1_2;
- break;
- default:
- ddc_level = "";
- pVbe->ddc = DDC_NONE;
- break;
- }
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC Level%s\n",ddc_level);
- if (pVbe->pInt10->bx & 0x4) {
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC Screen blanked"
- "for data transfer\n");
- pVbe->ddc_blank = TRUE;
- } else
- pVbe->ddc_blank = FALSE;
-
- xf86DrvMsgVerb(screen,X_INFO,3,
- "VESA VBE DDC transfer in appr. %x sec.\n",
- (pVbe->pInt10->bx >> 8) & 0xff);
- }
-
- return TRUE;
-}
-
-typedef enum {
- VBEOPT_NOVBE,
- VBEOPT_NODDC
-} VBEOpts;
-
-static const OptionInfoRec VBEOptions[] = {
- { VBEOPT_NOVBE, "NoVBE", OPTV_BOOLEAN, {0}, FALSE },
- { VBEOPT_NODDC, "NoDDC", OPTV_BOOLEAN, {0}, FALSE },
- { -1, NULL, OPTV_NONE, {0}, FALSE },
-};
-
-static unsigned char *
-vbeReadEDID(vbeInfoPtr pVbe)
-{
- int RealOff = pVbe->real_mode_base;
- pointer page = pVbe->memory;
- unsigned char *tmp = NULL;
- Bool novbe = FALSE;
- Bool noddc = FALSE;
- int screen = pVbe->pInt10->scrnIndex;
- OptionInfoPtr options;
-
- if (!page) return NULL;
-
- options = xnfalloc(sizeof(VBEOptions));
- (void)memcpy(options, VBEOptions, sizeof(VBEOptions));
- xf86ProcessOptions(screen, xf86Screens[screen]->options, options);
- xf86GetOptValBool(options, VBEOPT_NOVBE, &novbe);
- xf86GetOptValBool(options, VBEOPT_NODDC, &noddc);
- free(options);
- if (novbe || noddc) return NULL;
-
- if (!vbeProbeDDC(pVbe)) goto error;
-
- memset(page,0,sizeof(vbeInfoPtr));
- strcpy(page,vbeVersionString);
-
- pVbe->pInt10->ax = 0x4F15;
- pVbe->pInt10->bx = 0x01;
- pVbe->pInt10->cx = 0;
- pVbe->pInt10->dx = 0;
- pVbe->pInt10->es = SEG_ADDR(RealOff);
- pVbe->pInt10->di = SEG_OFF(RealOff);
- pVbe->pInt10->num = 0x10;
-
- xf86ExecX86int10(pVbe->pInt10);
-
- if ((pVbe->pInt10->ax & 0xff) != 0x4f) {
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC invalid\n");
- goto error;
- }
- switch (pVbe->pInt10->ax & 0xff00) {
- case 0x0:
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC read successfully\n");
- tmp = (unsigned char *)xnfalloc(128);
- memcpy(tmp,page,128);
- break;
- case 0x100:
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC read failed\n");
- break;
- default:
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC unkown failure %i\n",
- pVbe->pInt10->ax & 0xff00);
- break;
- }
-
- error:
- return tmp;
-}
-
-xf86MonPtr
-vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule)
-{
- xf86MonPtr pMonitor;
- pointer pModule;
- unsigned char *DDC_data = NULL;
-
- if (!pVbe) return NULL;
- if (pVbe->version < 0x200)
- return NULL;
-
- if (!(pModule = pDDCModule)) {
- pModule =
- xf86LoadSubModule(xf86Screens[pVbe->pInt10->scrnIndex], "ddc");
- if (!pModule)
- return NULL;
- }
-
- DDC_data = vbeReadEDID(pVbe);
-
- if (!DDC_data)
- return NULL;
-
- pMonitor = xf86InterpretEDID(pVbe->pInt10->scrnIndex, DDC_data);
-
- if (!pDDCModule)
- xf86UnloadSubModule(pModule);
- return pMonitor;
-}
-
-#define GET_UNALIGNED2(x) \
- ((*(CARD16*)(x)) | (*(((CARD16*)(x) + 1))) << 16)
-
-VbeInfoBlock *
-VBEGetVBEInfo(vbeInfoPtr pVbe)
-{
- VbeInfoBlock *block = NULL;
- int i, pStr, pModes;
- char *str;
- CARD16 major, *modes;
-
- memset(pVbe->memory, 0, sizeof(VbeInfoBlock));
-
- /*
- Input:
- AH := 4Fh Super VGA support
- AL := 00h Return Super VGA information
- ES:DI := Pointer to buffer
-
- Output:
- AX := status
- (All other registers are preserved)
- */
-
- ((char*)pVbe->memory)[0] = 'V';
- ((char*)pVbe->memory)[1] = 'B';
- ((char*)pVbe->memory)[2] = 'E';
- ((char*)pVbe->memory)[3] = '2';
-
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f00;
- pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base);
- pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
- xf86ExecX86int10(pVbe->pInt10);
-
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return NULL;
-
- block = calloc(sizeof(VbeInfoBlock), 1);
- block->VESASignature[0] = ((char*)pVbe->memory)[0];
- block->VESASignature[1] = ((char*)pVbe->memory)[1];
- block->VESASignature[2] = ((char*)pVbe->memory)[2];
- block->VESASignature[3] = ((char*)pVbe->memory)[3];
-
- block->VESAVersion = *(CARD16*)(((char*)pVbe->memory) + 4);
- major = (unsigned)block->VESAVersion >> 8;
-
- pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 6));
- str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
- block->OEMStringPtr = strdup(str);
-
- block->Capabilities[0] = ((char*)pVbe->memory)[10];
- block->Capabilities[1] = ((char*)pVbe->memory)[11];
- block->Capabilities[2] = ((char*)pVbe->memory)[12];
- block->Capabilities[3] = ((char*)pVbe->memory)[13];
-
- pModes = GET_UNALIGNED2((((char*)pVbe->memory) + 14));
- modes = xf86int10Addr(pVbe->pInt10, FARP(pModes));
- i = 0;
- while (modes[i] != 0xffff)
- i++;
- block->VideoModePtr = malloc(sizeof(CARD16) * (i + 1));
- memcpy(block->VideoModePtr, modes, sizeof(CARD16) * i);
- block->VideoModePtr[i] = 0xffff;
-
- block->TotalMemory = *(CARD16*)(((char*)pVbe->memory) + 18);
-
- if (major < 2)
- memcpy(&block->OemSoftwareRev, ((char*)pVbe->memory) + 20, 236);
- else {
- block->OemSoftwareRev = *(CARD16*)(((char*)pVbe->memory) + 20);
- pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 22));
- str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
- block->OemVendorNamePtr = strdup(str);
- pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 26));
- str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
- block->OemProductNamePtr = strdup(str);
- pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 30));
- str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
- block->OemProductRevPtr = strdup(str);
- memcpy(&block->Reserved, ((char*)pVbe->memory) + 34, 222);
- memcpy(&block->OemData, ((char*)pVbe->memory) + 256, 256);
- }
-
- return block;
-}
-
-void
-VBEFreeVBEInfo(VbeInfoBlock *block)
-{
- free(block->OEMStringPtr);
- free(block->VideoModePtr);
- if (((unsigned)block->VESAVersion >> 8) >= 2) {
- free(block->OemVendorNamePtr);
- free(block->OemProductNamePtr);
- free(block->OemProductRevPtr);
- }
- free(block);
-}
-
-Bool
-VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock *block)
-{
- /*
- Input:
- AH := 4Fh Super VGA support
- AL := 02h Set Super VGA video mode
- BX := Video mode
- D0-D8 := Mode number
- D9-D10 := Reserved (must be 0)
- D11 := 0 Use current default refresh rate
- := 1 Use user specified CRTC values for refresh rate
- D12-13 Reserved for VBE/AF (must be 0)
- D14 := 0 Use windowed frame buffer model
- := 1 Use linear/flat frame buffer model
- D15 := 0 Clear video memory
- := 1 Don't clear video memory
- ES:DI := Pointer to VbeCRTCInfoBlock structure
-
- Output: AX = Status
- (All other registers are preserved)
- */
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f02;
- pVbe->pInt10->bx = mode;
- if (block) {
- pVbe->pInt10->bx |= 1 << 11;
- memcpy(pVbe->memory, block, sizeof(VbeCRTCInfoBlock));
- pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base);
- pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
- } else
- pVbe->pInt10->bx &= ~(1 << 11);
-
- xf86ExecX86int10(pVbe->pInt10);
-
- return (R16(pVbe->pInt10->ax) == 0x4f);
-}
-
-Bool
-VBEGetVBEMode(vbeInfoPtr pVbe, int *mode)
-{
- /*
- Input:
- AH := 4Fh Super VGA support
- AL := 03h Return current video mode
-
- Output:
- AX := Status
- BX := Current video mode
- (All other registers are preserved)
- */
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f03;
-
- xf86ExecX86int10(pVbe->pInt10);
-
- if (R16(pVbe->pInt10->ax) == 0x4f) {
- *mode = R16(pVbe->pInt10->bx);
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-VbeModeInfoBlock *
-VBEGetModeInfo(vbeInfoPtr pVbe, int mode)
-{
- VbeModeInfoBlock *block = NULL;
-
- memset(pVbe->memory, 0, sizeof(VbeModeInfoBlock));
-
- /*
- Input:
- AH := 4Fh Super VGA support
- AL := 01h Return Super VGA mode information
- CX := Super VGA video mode
- (mode number must be one of those returned by Function 0)
- ES:DI := Pointer to buffer
-
- Output:
- AX := status
- (All other registers are preserved)
- */
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f01;
- pVbe->pInt10->cx = mode;
- pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base);
- pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
- xf86ExecX86int10(pVbe->pInt10);
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return NULL;
-
- block = malloc(sizeof(VbeModeInfoBlock));
- if (block)
- memcpy(block, pVbe->memory, sizeof(*block));
-
- return block;
-}
-
-void
-VBEFreeModeInfo(VbeModeInfoBlock *block)
-{
- free(block);
-}
-
-Bool
-VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction function,
- pointer *memory, int *size, int *real_mode_pages)
-{
- /*
- Input:
- AH := 4Fh Super VGA support
- AL := 04h Save/restore Super VGA video state
- DL := 00h Return save/restore state buffer size
- CX := Requested states
- D0 = Save/restore video hardware state
- D1 = Save/restore video BIOS data state
- D2 = Save/restore video DAC state
- D3 = Save/restore Super VGA state
-
- Output:
- AX = Status
- BX = Number of 64-byte blocks to hold the state buffer
- (All other registers are preserved)
-
-
- Input:
- AH := 4Fh Super VGA support
- AL := 04h Save/restore Super VGA video state
- DL := 01h Save Super VGA video state
- CX := Requested states (see above)
- ES:BX := Pointer to buffer
-
- Output:
- AX := Status
- (All other registers are preserved)
-
-
- Input:
- AH := 4Fh Super VGA support
- AL := 04h Save/restore Super VGA video state
- DL := 02h Restore Super VGA video state
- CX := Requested states (see above)
- ES:BX := Pointer to buffer
-
- Output:
- AX := Status
- (All other registers are preserved)
- */
-
- if ((pVbe->version & 0xff00) > 0x100) {
- int screen = pVbe->pInt10->scrnIndex;
- if (function == MODE_QUERY ||
- (function == MODE_SAVE && !*memory)) {
- /* Query amount of memory to save state */
-
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f04;
- pVbe->pInt10->dx = 0;
- pVbe->pInt10->cx = 0x000f;
- xf86ExecX86int10(pVbe->pInt10);
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return FALSE;
-
- if (function == MODE_SAVE) {
- int npages = (R16(pVbe->pInt10->bx) * 64) / 4096 + 1;
- if ((*memory = xf86Int10AllocPages(pVbe->pInt10, npages,
- real_mode_pages)) == NULL) {
- xf86DrvMsg(screen, X_ERROR,
- "Cannot allocate memory to save SVGA state.\n");
- return FALSE;
- }
- }
- *size = pVbe->pInt10->bx * 64;
- }
-
- /* Save/Restore Super VGA state */
- if (function != MODE_QUERY) {
-
- if (!*memory) return FALSE;
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f04;
- switch (function) {
- case MODE_SAVE:
- pVbe->pInt10->dx = 1;
- break;
- case MODE_RESTORE:
- pVbe->pInt10->dx = 2;
- break;
- case MODE_QUERY:
- return FALSE;
- }
- pVbe->pInt10->cx = 0x000f;
-
- pVbe->pInt10->es = SEG_ADDR(*real_mode_pages);
- pVbe->pInt10->bx = SEG_OFF(*real_mode_pages);
- xf86ExecX86int10(pVbe->pInt10);
- return (R16(pVbe->pInt10->ax) == 0x4f);
-
- }
- }
- return TRUE;
-}
-
-Bool
-VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window)
-{
- /*
- Input:
- AH := 4Fh Super VGA support
- AL := 05h
-
- Output:
- */
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f05;
- pVbe->pInt10->bx = window;
- pVbe->pInt10->dx = iBank;
- xf86ExecX86int10(pVbe->pInt10);
-
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return FALSE;
-
- return TRUE;
-}
-
-Bool
-VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command,
- int width, int *pixels, int *bytes, int *max)
-{
- if (command < SCANWID_SET || command > SCANWID_GET_MAX)
- return FALSE;
-
- /*
- Input:
- AX := 4F06h VBE Set/Get Logical Scan Line Length
- BL := 00h Set Scan Line Length in Pixels
- := 01h Get Scan Line Length
- := 02h Set Scan Line Length in Bytes
- := 03h Get Maximum Scan Line Length
- CX := If BL=00h Desired Width in Pixels
- If BL=02h Desired Width in Bytes
- (Ignored for Get Functions)
-
- Output:
- AX := VBE Return Status
- BX := Bytes Per Scan Line
- CX := Actual Pixels Per Scan Line
- (truncated to nearest complete pixel)
- DX := Maximum Number of Scan Lines
- */
-
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f06;
- pVbe->pInt10->bx = command;
- if (command == SCANWID_SET || command == SCANWID_SET_BYTES)
- pVbe->pInt10->cx = width;
- xf86ExecX86int10(pVbe->pInt10);
-
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return FALSE;
-
- if (command == SCANWID_GET || command == SCANWID_GET_MAX) {
- if (pixels)
- *pixels = R16(pVbe->pInt10->cx);
- if (bytes)
- *bytes = R16(pVbe->pInt10->bx);
- if (max)
- *max = R16(pVbe->pInt10->dx);
- }
-
- return TRUE;
-}
-
-Bool
-VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace)
-{
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f07;
- pVbe->pInt10->bx = wait_retrace ? 0x80 : 0x00;
- pVbe->pInt10->cx = x;
- pVbe->pInt10->dx = y;
- xf86ExecX86int10(pVbe->pInt10);
-
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return FALSE;
-
- return TRUE;
-}
-
-Bool
-VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y)
-{
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f07;
- pVbe->pInt10->bx = 0x01;
- xf86ExecX86int10(pVbe->pInt10);
-
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return FALSE;
-
- *x = pVbe->pInt10->cx;
- *y = pVbe->pInt10->dx;
-
- return TRUE;
-}
-
-int
-VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits)
-{
- /*
- Input:
- AX := 4F08h VBE Set/Get Palette Format
- BL := 00h Set DAC Palette Format
- := 01h Get DAC Palette Format
- BH := Desired bits of color per primary
- (Set DAC Palette Format only)
-
- Output:
- AX := VBE Return Status
- BH := Current number of bits of color per primary
- */
-
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f08;
- if (!bits)
- pVbe->pInt10->bx = 0x01;
- else
- pVbe->pInt10->bx = (bits & 0x00ff) << 8;
- xf86ExecX86int10(pVbe->pInt10);
-
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return 0;
-
- return (bits != 0 ? bits : (pVbe->pInt10->bx >> 8) & 0x00ff);
-}
-
-CARD32 *
-VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num,
- CARD32 *data, Bool secondary, Bool wait_retrace)
-{
- /*
- Input:
- (16-bit)
- AX := 4F09h VBE Load/Unload Palette Data
- BL := 00h Set Palette Data
- := 01h Get Palette Data
- := 02h Set Secondary Palette Data
- := 03h Get Secondary Palette Data
- := 80h Set Palette Data during Vertical Retrace
- CX := Number of palette registers to update (to a maximum of 256)
- DX := First of the palette registers to update (start)
- ES:DI := Table of palette values (see below for format)
-
- Output:
- AX := VBE Return Status
-
-
- Input:
- (32-bit)
- BL := 00h Set Palette Data
- := 80h Set Palette Data during Vertical Retrace
- CX := Number of palette registers to update (to a maximum of 256)
- DX := First of the palette registers to update (start)
- ES:EDI := Table of palette values (see below for format)
- DS := Selector for memory mapped registers
- */
-
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f09;
- if (!secondary)
- pVbe->pInt10->bx = set && wait_retrace ? 0x80 : set ? 0 : 1;
- else
- pVbe->pInt10->bx = set ? 2 : 3;
- pVbe->pInt10->cx = num;
- pVbe->pInt10->dx = first;
- pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base);
- pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
- if (set)
- memcpy(pVbe->memory, data, num * sizeof(CARD32));
- xf86ExecX86int10(pVbe->pInt10);
-
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return NULL;
-
- if (set)
- return data;
-
- data = malloc(num * sizeof(CARD32));
- memcpy(data, pVbe->memory, num * sizeof(CARD32));
-
- return data;
-}
-
-VBEpmi *
-VBEGetVBEpmi(vbeInfoPtr pVbe)
-{
- VBEpmi *pmi;
-
- /*
- Input:
- AH := 4Fh Super VGA support
- AL := 0Ah Protected Mode Interface
- BL := 00h Return Protected Mode Table
-
- Output:
- AX := Status
- ES := Real Mode Segment of Table
- DI := Offset of Table
- CX := Lenght of Table including protected mode code in bytes (for copying purposes)
- (All other registers are preserved)
- */
-
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f0a;
- pVbe->pInt10->bx = 0;
- pVbe->pInt10->di = 0;
- xf86ExecX86int10(pVbe->pInt10);
-
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return NULL;
-
- pmi = malloc(sizeof(VBEpmi));
- pmi->seg_tbl = R16(pVbe->pInt10->es);
- pmi->tbl_off = R16(pVbe->pInt10->di);
- pmi->tbl_len = R16(pVbe->pInt10->cx);
-
- return pmi;
-}
-
-#if 0
-vbeModeInfoPtr
-VBEBuildVbeModeList(vbeInfoPtr pVbe, VbeInfoBlock *vbe)
-{
- vbeModeInfoPtr ModeList = NULL;
-
- int i = 0;
- while (vbe->VideoModePtr[i] != 0xffff) {
- vbeModeInfoPtr m;
- VbeModeInfoBlock *mode;
- int id = vbe->VideoModePtr[i++];
- int bpp;
-
- if ((mode = VBEGetModeInfo(pVbe, id)) == NULL)
- continue;
-
- bpp = mode->BitsPerPixel;
-
- m = xnfcalloc(sizeof(vbeModeInfoRec),1);
- m->width = mode->XResolution;
- m->height = mode->YResolution;
- m->bpp = bpp;
- m->n = id;
- m->next = ModeList;
-
- xf86DrvMsgVerb(pVbe->pInt10->scrnIndex, X_PROBED, 3,
- "BIOS reported VESA mode 0x%x: x:%i y:%i bpp:%i\n",
- m->n, m->width, m->height, m->bpp);
-
- ModeList = m;
-
- VBEFreeModeInfo(mode);
- }
- return ModeList;
-}
-
-unsigned short
-VBECalcVbeModeIndex(vbeModeInfoPtr m, DisplayModePtr mode, int bpp)
-{
- while (m) {
- if (bpp == m->bpp
- && mode->HDisplay == m->width
- && mode->VDisplay == m->height)
- return m->n;
- m = m->next;
- }
- return 0;
-}
-#endif
-
-void
-VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr,
- vbeSaveRestoreFunction function)
-{
- Bool SaveSucc = FALSE;
-
- if (VBE_VERSION_MAJOR(pVbe->version) > 1
- && (function == MODE_SAVE || vbe_sr->pstate)) {
- if (function == MODE_RESTORE)
- memcpy(vbe_sr->state, vbe_sr->pstate, vbe_sr->stateSize);
- ErrorF("VBESaveRestore\n");
- if ((VBESaveRestore(pVbe,function,
- (pointer)&vbe_sr->state,
- &vbe_sr->stateSize,&vbe_sr->statePage))) {
- if (function == MODE_SAVE) {
- SaveSucc = TRUE;
- vbe_sr->stateMode = -1; /* invalidate */
- /* don't rely on the memory not being touched */
- if (vbe_sr->pstate == NULL)
- vbe_sr->pstate = malloc(vbe_sr->stateSize);
- memcpy(vbe_sr->pstate, vbe_sr->state, vbe_sr->stateSize);
- }
- ErrorF("VBESaveRestore done with success\n");
- return;
- }
- ErrorF("VBESaveRestore done\n");
- }
-
- if (function == MODE_SAVE && !SaveSucc)
- (void)VBEGetVBEMode(pVbe, &vbe_sr->stateMode);
-
- if (function == MODE_RESTORE && vbe_sr->stateMode != -1)
- VBESetVBEMode(pVbe, vbe_sr->stateMode, NULL);
-
-}
-
-int
-VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock)
-{
- /*
- Input:
- AX := 4F0Bh VBE Get Pixel Clock
- BL := 00h Get Pixel Clock
- ECX := pixel clock in units of Hz
- DX := mode number
-
- Output:
- AX := VBE Return Status
- ECX := Closest pixel clock
- */
-
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f0b;
- pVbe->pInt10->bx = 0x00;
- pVbe->pInt10->cx = clock;
- pVbe->pInt10->dx = mode;
- xf86ExecX86int10(pVbe->pInt10);
-
- if (R16(pVbe->pInt10->ax) != 0x4f)
- return 0;
-
- return pVbe->pInt10->cx;
-}
-
-Bool
-VBEDPMSSet(vbeInfoPtr pVbe, int mode)
-{
- /*
- Input:
- AX := 4F10h DPMS
- BL := 01h Set Display Power State
- BH := requested power state
-
- Output:
- AX := VBE Return Status
- */
-
- pVbe->pInt10->num = 0x10;
- pVbe->pInt10->ax = 0x4f10;
- pVbe->pInt10->bx = 0x01;
- switch (mode) {
- case DPMSModeOn:
- break;
- case DPMSModeStandby:
- pVbe->pInt10->bx |= 0x100;
- break;
- case DPMSModeSuspend:
- pVbe->pInt10->bx |= 0x200;
- break;
- case DPMSModeOff:
- pVbe->pInt10->bx |= 0x400;
- break;
- }
- xf86ExecX86int10(pVbe->pInt10);
- return (R16(pVbe->pInt10->ax) == 0x4f);
-}
-
-void
-VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data)
-{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
- DisplayModePtr mode;
- const float PANEL_HZ = 60.0;
-
- if (!data)
- return;
-
- xf86DrvMsg(scrnIndex, X_INFO, "PanelID returned panel resolution %dx%d\n",
- data->hsize, data->vsize);
-
- if (pScrn->monitor->nHsync || pScrn->monitor->nVrefresh)
- return;
-
- if (data->hsize < 320 || data->vsize < 240) {
- xf86DrvMsg(scrnIndex, X_INFO, "...which I refuse to believe\n");
- return;
- }
-
- mode = xf86CVTMode(data->hsize, data->vsize, PANEL_HZ, 1, 0);
-
- pScrn->monitor->nHsync = 1;
- pScrn->monitor->hsync[0].lo = 31.5;
- pScrn->monitor->hsync[0].hi = (float)mode->Clock / (float)mode->HTotal;
- pScrn->monitor->nVrefresh = 1;
- pScrn->monitor->vrefresh[0].lo = 56.0;
- pScrn->monitor->vrefresh[0].hi =
- (float)mode->Clock*1000.0 / (float)mode->HTotal / (float)mode->VTotal;
-
- free(mode);
-}
-
-struct vbePanelID *
-VBEReadPanelID(vbeInfoPtr pVbe)
-{
- int RealOff = pVbe->real_mode_base;
- pointer page = pVbe->memory;
- void *tmp = NULL;
- int screen = pVbe->pInt10->scrnIndex;
-
- pVbe->pInt10->ax = 0x4F11;
- pVbe->pInt10->bx = 0x01;
- pVbe->pInt10->cx = 0;
- pVbe->pInt10->dx = 0;
- pVbe->pInt10->es = SEG_ADDR(RealOff);
- pVbe->pInt10->di = SEG_OFF(RealOff);
- pVbe->pInt10->num = 0x10;
-
- xf86ExecX86int10(pVbe->pInt10);
-
- if ((pVbe->pInt10->ax & 0xff) != 0x4f) {
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID invalid\n");
- goto error;
- }
-
- switch (pVbe->pInt10->ax & 0xff00) {
- case 0x0:
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID read successfully\n");
- tmp = xnfalloc(32);
- memcpy(tmp, page, 32);
- break;
- case 0x100:
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID read failed\n");
- break;
- default:
- xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID unknown failure %i\n",
- pVbe->pInt10->ax & 0xff00);
- break;
- }
-
-error:
- return tmp;
-}
+
+/*
+ * XFree86 vbe module
+ * Copyright 2000 Egbert Eich
+ *
+ * The mode query/save/set/restore functions from the vesa driver
+ * have been moved here.
+ * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com)
+ * Authors: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <string.h>
+
+#include "xf86.h"
+#include "vbe.h"
+#include <X11/extensions/dpmsconst.h>
+
+#define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x)
+
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+#define B_O16(x) (x)
+#define B_O32(x) (x)
+#else
+#define B_O16(x) ((((x) & 0xff) << 8) | (((x) & 0xff) >> 8))
+#define B_O32(x) ((((x) & 0xff) << 24) | (((x) & 0xff00) << 8) \
+ | (((x) & 0xff0000) >> 8) | (((x) & 0xff000000) >> 24))
+#endif
+#define L_ADD(x) (B_O32(x) & 0xffff) + ((B_O32(x) >> 12) & 0xffff00)
+
+#define FARP(p) (((unsigned)(p & 0xffff0000) >> 12) | (p & 0xffff))
+#define R16(v) ((v) & 0xffff)
+
+static unsigned char * vbeReadEDID(vbeInfoPtr pVbe);
+static Bool vbeProbeDDC(vbeInfoPtr pVbe);
+
+static const char vbeVersionString[] = "VBE2";
+
+vbeInfoPtr
+VBEInit(xf86Int10InfoPtr pInt, int entityIndex)
+{
+ return VBEExtendedInit(pInt, entityIndex, 0);
+}
+
+vbeInfoPtr
+VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags)
+{
+ int RealOff;
+ pointer page = NULL;
+ ScrnInfoPtr pScrn = xf86FindScreenForEntity(entityIndex);
+ vbeControllerInfoPtr vbe = NULL;
+ Bool init_int10 = FALSE;
+ vbeInfoPtr vip = NULL;
+ int screen;
+
+ if (!pScrn) return NULL;
+ screen = pScrn->scrnIndex;
+
+ if (!pInt) {
+ if (!xf86LoadSubModule(pScrn, "int10"))
+ goto error;
+
+ xf86DrvMsg(screen,X_INFO,"initializing int10\n");
+ pInt = xf86ExtendedInitInt10(entityIndex,Flags);
+ if (!pInt)
+ goto error;
+ init_int10 = TRUE;
+ }
+
+ page = xf86Int10AllocPages(pInt,1,&RealOff);
+ if (!page) goto error;
+ vbe = (vbeControllerInfoPtr) page;
+ memcpy(vbe->VbeSignature,vbeVersionString,4);
+
+ pInt->ax = 0x4F00;
+ pInt->es = SEG_ADDR(RealOff);
+ pInt->di = SEG_OFF(RealOff);
+ pInt->num = 0x10;
+
+ xf86ExecX86int10(pInt);
+
+ if ((pInt->ax & 0xff) != 0x4f) {
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA BIOS not detected\n");
+ goto error;
+ }
+
+ switch (pInt->ax & 0xff00) {
+ case 0:
+ xf86DrvMsg(screen,X_INFO,"VESA BIOS detected\n");
+ break;
+ case 0x100:
+ xf86DrvMsg(screen,X_INFO,"VESA BIOS function failed\n");
+ goto error;
+ case 0x200:
+ xf86DrvMsg(screen,X_INFO,"VESA BIOS not supported\n");
+ goto error;
+ case 0x300:
+ xf86DrvMsg(screen,X_INFO,"VESA BIOS not supported in current mode\n");
+ goto error;
+ default:
+ xf86DrvMsg(screen,X_INFO,"Invalid\n");
+ goto error;
+ }
+
+ xf86DrvMsgVerb(screen, X_INFO, 4,
+ "VbeVersion is %d, OemStringPtr is 0x%08lx,\n"
+ "\tOemVendorNamePtr is 0x%08lx, OemProductNamePtr is 0x%08lx,\n"
+ "\tOemProductRevPtr is 0x%08lx\n",
+ vbe->VbeVersion, (unsigned long)vbe->OemStringPtr,
+ (unsigned long)vbe->OemVendorNamePtr,
+ (unsigned long)vbe->OemProductNamePtr,
+ (unsigned long)vbe->OemProductRevPtr);
+
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE Version %i.%i\n",
+ VERSION(vbe->VbeVersion));
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE Total Mem: %i kB\n",
+ vbe->TotalMem * 64);
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE OEM: %s\n",
+ (CARD8*)xf86int10Addr(pInt,L_ADD(vbe->OemStringPtr)));
+
+ if (B_O16(vbe->VbeVersion) >= 0x200) {
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE OEM Software Rev: %i.%i\n",
+ VERSION(vbe->OemSoftwareRev));
+ if (vbe->OemVendorNamePtr)
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE OEM Vendor: %s\n",
+ (CARD8*)xf86int10Addr(pInt,L_ADD(vbe->OemVendorNamePtr)));
+ if (vbe->OemProductNamePtr)
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE OEM Product: %s\n",
+ (CARD8*)xf86int10Addr(pInt,L_ADD(vbe->OemProductNamePtr)));
+ if (vbe->OemProductRevPtr)
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE OEM Product Rev: %s\n",
+ (CARD8*)xf86int10Addr(pInt,L_ADD(vbe->OemProductRevPtr)));
+ }
+ vip = (vbeInfoPtr)xnfalloc(sizeof(vbeInfoRec));
+ vip->version = B_O16(vbe->VbeVersion);
+ vip->pInt10 = pInt;
+ vip->ddc = DDC_UNCHECKED;
+ vip->memory = page;
+ vip->real_mode_base = RealOff;
+ vip->num_pages = 1;
+ vip->init_int10 = init_int10;
+
+ return vip;
+
+ error:
+ if (page)
+ xf86Int10FreePages(pInt, page, 1);
+ if (init_int10)
+ xf86FreeInt10(pInt);
+ return NULL;
+}
+
+void
+vbeFree(vbeInfoPtr pVbe)
+{
+ if (!pVbe)
+ return;
+
+ xf86Int10FreePages(pVbe->pInt10,pVbe->memory,pVbe->num_pages);
+ /* If we have initalized int10 we ought to free it, too */
+ if (pVbe->init_int10)
+ xf86FreeInt10(pVbe->pInt10);
+ free(pVbe);
+ return;
+}
+
+static Bool
+vbeProbeDDC(vbeInfoPtr pVbe)
+{
+ char *ddc_level;
+ int screen = pVbe->pInt10->scrnIndex;
+
+ if (pVbe->ddc == DDC_NONE)
+ return FALSE;
+ if (pVbe->ddc != DDC_UNCHECKED)
+ return TRUE;
+
+ pVbe->pInt10->ax = 0x4F15;
+ pVbe->pInt10->bx = 0;
+ pVbe->pInt10->cx = 0;
+ pVbe->pInt10->es = 0;
+ pVbe->pInt10->di = 0;
+ pVbe->pInt10->num = 0x10;
+
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if ((pVbe->pInt10->ax & 0xff) != 0x4f) {
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC not supported\n");
+ pVbe->ddc = DDC_NONE;
+ return FALSE;
+ }
+
+ switch ((pVbe->pInt10->ax >> 8) & 0xff) {
+ case 0:
+ xf86DrvMsg(screen,X_INFO,"VESA VBE DDC supported\n");
+ switch (pVbe->pInt10->bx & 0x3) {
+ case 0:
+ ddc_level = " none";
+ pVbe->ddc = DDC_NONE;
+ break;
+ case 1:
+ ddc_level = " 1";
+ pVbe->ddc = DDC_1;
+ break;
+ case 2:
+ ddc_level = " 2";
+ pVbe->ddc = DDC_2;
+ break;
+ case 3:
+ ddc_level = " 1 + 2";
+ pVbe->ddc = DDC_1_2;
+ break;
+ default:
+ ddc_level = "";
+ pVbe->ddc = DDC_NONE;
+ break;
+ }
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC Level%s\n",ddc_level);
+ if (pVbe->pInt10->bx & 0x4) {
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC Screen blanked"
+ "for data transfer\n");
+ pVbe->ddc_blank = TRUE;
+ } else
+ pVbe->ddc_blank = FALSE;
+
+ xf86DrvMsgVerb(screen,X_INFO,3,
+ "VESA VBE DDC transfer in appr. %x sec.\n",
+ (pVbe->pInt10->bx >> 8) & 0xff);
+ }
+
+ return TRUE;
+}
+
+typedef enum {
+ VBEOPT_NOVBE,
+ VBEOPT_NODDC
+} VBEOpts;
+
+static const OptionInfoRec VBEOptions[] = {
+ { VBEOPT_NOVBE, "NoVBE", OPTV_BOOLEAN, {0}, FALSE },
+ { VBEOPT_NODDC, "NoDDC", OPTV_BOOLEAN, {0}, FALSE },
+ { -1, NULL, OPTV_NONE, {0}, FALSE },
+};
+
+static unsigned char *
+vbeReadEDID(vbeInfoPtr pVbe)
+{
+ int RealOff = pVbe->real_mode_base;
+ pointer page = pVbe->memory;
+ unsigned char *tmp = NULL;
+ Bool novbe = FALSE;
+ Bool noddc = FALSE;
+ int screen = pVbe->pInt10->scrnIndex;
+ OptionInfoPtr options;
+
+ if (!page) return NULL;
+
+ options = xnfalloc(sizeof(VBEOptions));
+ (void)memcpy(options, VBEOptions, sizeof(VBEOptions));
+ xf86ProcessOptions(screen, xf86Screens[screen]->options, options);
+ xf86GetOptValBool(options, VBEOPT_NOVBE, &novbe);
+ xf86GetOptValBool(options, VBEOPT_NODDC, &noddc);
+ free(options);
+ if (novbe || noddc) return NULL;
+
+ if (!vbeProbeDDC(pVbe)) goto error;
+
+ memset(page,0,sizeof(vbeInfoPtr));
+ strcpy(page,vbeVersionString);
+
+ pVbe->pInt10->ax = 0x4F15;
+ pVbe->pInt10->bx = 0x01;
+ pVbe->pInt10->cx = 0;
+ pVbe->pInt10->dx = 0;
+ pVbe->pInt10->es = SEG_ADDR(RealOff);
+ pVbe->pInt10->di = SEG_OFF(RealOff);
+ pVbe->pInt10->num = 0x10;
+
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if ((pVbe->pInt10->ax & 0xff) != 0x4f) {
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC invalid\n");
+ goto error;
+ }
+ switch (pVbe->pInt10->ax & 0xff00) {
+ case 0x0:
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC read successfully\n");
+ tmp = (unsigned char *)xnfalloc(128);
+ memcpy(tmp,page,128);
+ break;
+ case 0x100:
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC read failed\n");
+ break;
+ default:
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE DDC unkown failure %i\n",
+ pVbe->pInt10->ax & 0xff00);
+ break;
+ }
+
+ error:
+ return tmp;
+}
+
+xf86MonPtr
+vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule)
+{
+ xf86MonPtr pMonitor;
+ pointer pModule;
+ unsigned char *DDC_data = NULL;
+
+ if (!pVbe) return NULL;
+ if (pVbe->version < 0x200)
+ return NULL;
+
+ if (!(pModule = pDDCModule)) {
+ pModule =
+ xf86LoadSubModule(xf86Screens[pVbe->pInt10->scrnIndex], "ddc");
+ if (!pModule)
+ return NULL;
+ }
+
+ DDC_data = vbeReadEDID(pVbe);
+
+ if (!DDC_data)
+ return NULL;
+
+ pMonitor = xf86InterpretEDID(pVbe->pInt10->scrnIndex, DDC_data);
+
+ if (!pDDCModule)
+ xf86UnloadSubModule(pModule);
+ return pMonitor;
+}
+
+#define GET_UNALIGNED2(x) \
+ ((*(CARD16*)(x)) | (*(((CARD16*)(x) + 1))) << 16)
+
+VbeInfoBlock *
+VBEGetVBEInfo(vbeInfoPtr pVbe)
+{
+ VbeInfoBlock *block = NULL;
+ int i, pStr, pModes;
+ char *str;
+ CARD16 major, *modes;
+
+ memset(pVbe->memory, 0, sizeof(VbeInfoBlock));
+
+ /*
+ Input:
+ AH := 4Fh Super VGA support
+ AL := 00h Return Super VGA information
+ ES:DI := Pointer to buffer
+
+ Output:
+ AX := status
+ (All other registers are preserved)
+ */
+
+ ((char*)pVbe->memory)[0] = 'V';
+ ((char*)pVbe->memory)[1] = 'B';
+ ((char*)pVbe->memory)[2] = 'E';
+ ((char*)pVbe->memory)[3] = '2';
+
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f00;
+ pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base);
+ pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return NULL;
+
+ block = calloc(sizeof(VbeInfoBlock), 1);
+ block->VESASignature[0] = ((char*)pVbe->memory)[0];
+ block->VESASignature[1] = ((char*)pVbe->memory)[1];
+ block->VESASignature[2] = ((char*)pVbe->memory)[2];
+ block->VESASignature[3] = ((char*)pVbe->memory)[3];
+
+ block->VESAVersion = *(CARD16*)(((char*)pVbe->memory) + 4);
+ major = (unsigned)block->VESAVersion >> 8;
+
+ pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 6));
+ str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
+ block->OEMStringPtr = strdup(str);
+
+ block->Capabilities[0] = ((char*)pVbe->memory)[10];
+ block->Capabilities[1] = ((char*)pVbe->memory)[11];
+ block->Capabilities[2] = ((char*)pVbe->memory)[12];
+ block->Capabilities[3] = ((char*)pVbe->memory)[13];
+
+ pModes = GET_UNALIGNED2((((char*)pVbe->memory) + 14));
+ modes = xf86int10Addr(pVbe->pInt10, FARP(pModes));
+ i = 0;
+ while (modes[i] != 0xffff)
+ i++;
+ block->VideoModePtr = malloc(sizeof(CARD16) * (i + 1));
+ memcpy(block->VideoModePtr, modes, sizeof(CARD16) * i);
+ block->VideoModePtr[i] = 0xffff;
+
+ block->TotalMemory = *(CARD16*)(((char*)pVbe->memory) + 18);
+
+ if (major < 2)
+ memcpy(&block->OemSoftwareRev, ((char*)pVbe->memory) + 20, 236);
+ else {
+ block->OemSoftwareRev = *(CARD16*)(((char*)pVbe->memory) + 20);
+ pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 22));
+ str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
+ block->OemVendorNamePtr = strdup(str);
+ pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 26));
+ str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
+ block->OemProductNamePtr = strdup(str);
+ pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 30));
+ str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
+ block->OemProductRevPtr = strdup(str);
+ memcpy(&block->Reserved, ((char*)pVbe->memory) + 34, 222);
+ memcpy(&block->OemData, ((char*)pVbe->memory) + 256, 256);
+ }
+
+ return block;
+}
+
+void
+VBEFreeVBEInfo(VbeInfoBlock *block)
+{
+ free(block->OEMStringPtr);
+ free(block->VideoModePtr);
+ if (((unsigned)block->VESAVersion >> 8) >= 2) {
+ free(block->OemVendorNamePtr);
+ free(block->OemProductNamePtr);
+ free(block->OemProductRevPtr);
+ }
+ free(block);
+}
+
+Bool
+VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock *block)
+{
+ /*
+ Input:
+ AH := 4Fh Super VGA support
+ AL := 02h Set Super VGA video mode
+ BX := Video mode
+ D0-D8 := Mode number
+ D9-D10 := Reserved (must be 0)
+ D11 := 0 Use current default refresh rate
+ := 1 Use user specified CRTC values for refresh rate
+ D12-13 Reserved for VBE/AF (must be 0)
+ D14 := 0 Use windowed frame buffer model
+ := 1 Use linear/flat frame buffer model
+ D15 := 0 Clear video memory
+ := 1 Don't clear video memory
+ ES:DI := Pointer to VbeCRTCInfoBlock structure
+
+ Output: AX = Status
+ (All other registers are preserved)
+ */
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f02;
+ pVbe->pInt10->bx = mode;
+ if (block) {
+ pVbe->pInt10->bx |= 1 << 11;
+ memcpy(pVbe->memory, block, sizeof(VbeCRTCInfoBlock));
+ pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base);
+ pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
+ } else
+ pVbe->pInt10->bx &= ~(1 << 11);
+
+ xf86ExecX86int10(pVbe->pInt10);
+
+ return (R16(pVbe->pInt10->ax) == 0x4f);
+}
+
+Bool
+VBEGetVBEMode(vbeInfoPtr pVbe, int *mode)
+{
+ /*
+ Input:
+ AH := 4Fh Super VGA support
+ AL := 03h Return current video mode
+
+ Output:
+ AX := Status
+ BX := Current video mode
+ (All other registers are preserved)
+ */
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f03;
+
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if (R16(pVbe->pInt10->ax) == 0x4f) {
+ *mode = R16(pVbe->pInt10->bx);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+VbeModeInfoBlock *
+VBEGetModeInfo(vbeInfoPtr pVbe, int mode)
+{
+ VbeModeInfoBlock *block = NULL;
+
+ memset(pVbe->memory, 0, sizeof(VbeModeInfoBlock));
+
+ /*
+ Input:
+ AH := 4Fh Super VGA support
+ AL := 01h Return Super VGA mode information
+ CX := Super VGA video mode
+ (mode number must be one of those returned by Function 0)
+ ES:DI := Pointer to buffer
+
+ Output:
+ AX := status
+ (All other registers are preserved)
+ */
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f01;
+ pVbe->pInt10->cx = mode;
+ pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base);
+ pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
+ xf86ExecX86int10(pVbe->pInt10);
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return NULL;
+
+ block = malloc(sizeof(VbeModeInfoBlock));
+ if (block)
+ memcpy(block, pVbe->memory, sizeof(*block));
+
+ return block;
+}
+
+void
+VBEFreeModeInfo(VbeModeInfoBlock *block)
+{
+ free(block);
+}
+
+Bool
+VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction function,
+ pointer *memory, int *size, int *real_mode_pages)
+{
+ /*
+ Input:
+ AH := 4Fh Super VGA support
+ AL := 04h Save/restore Super VGA video state
+ DL := 00h Return save/restore state buffer size
+ CX := Requested states
+ D0 = Save/restore video hardware state
+ D1 = Save/restore video BIOS data state
+ D2 = Save/restore video DAC state
+ D3 = Save/restore Super VGA state
+
+ Output:
+ AX = Status
+ BX = Number of 64-byte blocks to hold the state buffer
+ (All other registers are preserved)
+
+
+ Input:
+ AH := 4Fh Super VGA support
+ AL := 04h Save/restore Super VGA video state
+ DL := 01h Save Super VGA video state
+ CX := Requested states (see above)
+ ES:BX := Pointer to buffer
+
+ Output:
+ AX := Status
+ (All other registers are preserved)
+
+
+ Input:
+ AH := 4Fh Super VGA support
+ AL := 04h Save/restore Super VGA video state
+ DL := 02h Restore Super VGA video state
+ CX := Requested states (see above)
+ ES:BX := Pointer to buffer
+
+ Output:
+ AX := Status
+ (All other registers are preserved)
+ */
+
+ if ((pVbe->version & 0xff00) > 0x100) {
+ int screen = pVbe->pInt10->scrnIndex;
+ if (function == MODE_QUERY ||
+ (function == MODE_SAVE && !*memory)) {
+ /* Query amount of memory to save state */
+
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f04;
+ pVbe->pInt10->dx = 0;
+ pVbe->pInt10->cx = 0x000f;
+ xf86ExecX86int10(pVbe->pInt10);
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return FALSE;
+
+ if (function == MODE_SAVE) {
+ int npages = (R16(pVbe->pInt10->bx) * 64) / 4096 + 1;
+ if ((*memory = xf86Int10AllocPages(pVbe->pInt10, npages,
+ real_mode_pages)) == NULL) {
+ xf86DrvMsg(screen, X_ERROR,
+ "Cannot allocate memory to save SVGA state.\n");
+ return FALSE;
+ }
+ }
+ *size = pVbe->pInt10->bx * 64;
+ }
+
+ /* Save/Restore Super VGA state */
+ if (function != MODE_QUERY) {
+
+ if (!*memory) return FALSE;
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f04;
+ switch (function) {
+ case MODE_SAVE:
+ pVbe->pInt10->dx = 1;
+ break;
+ case MODE_RESTORE:
+ pVbe->pInt10->dx = 2;
+ break;
+ case MODE_QUERY:
+ return FALSE;
+ }
+ pVbe->pInt10->cx = 0x000f;
+
+ pVbe->pInt10->es = SEG_ADDR(*real_mode_pages);
+ pVbe->pInt10->bx = SEG_OFF(*real_mode_pages);
+ xf86ExecX86int10(pVbe->pInt10);
+ return (R16(pVbe->pInt10->ax) == 0x4f);
+
+ }
+ }
+ return TRUE;
+}
+
+Bool
+VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window)
+{
+ /*
+ Input:
+ AH := 4Fh Super VGA support
+ AL := 05h
+
+ Output:
+ */
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f05;
+ pVbe->pInt10->bx = window;
+ pVbe->pInt10->dx = iBank;
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return FALSE;
+
+ return TRUE;
+}
+
+Bool
+VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command,
+ int width, int *pixels, int *bytes, int *max)
+{
+ if (command < SCANWID_SET || command > SCANWID_GET_MAX)
+ return FALSE;
+
+ /*
+ Input:
+ AX := 4F06h VBE Set/Get Logical Scan Line Length
+ BL := 00h Set Scan Line Length in Pixels
+ := 01h Get Scan Line Length
+ := 02h Set Scan Line Length in Bytes
+ := 03h Get Maximum Scan Line Length
+ CX := If BL=00h Desired Width in Pixels
+ If BL=02h Desired Width in Bytes
+ (Ignored for Get Functions)
+
+ Output:
+ AX := VBE Return Status
+ BX := Bytes Per Scan Line
+ CX := Actual Pixels Per Scan Line
+ (truncated to nearest complete pixel)
+ DX := Maximum Number of Scan Lines
+ */
+
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f06;
+ pVbe->pInt10->bx = command;
+ if (command == SCANWID_SET || command == SCANWID_SET_BYTES)
+ pVbe->pInt10->cx = width;
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return FALSE;
+
+ if (command == SCANWID_GET || command == SCANWID_GET_MAX) {
+ if (pixels)
+ *pixels = R16(pVbe->pInt10->cx);
+ if (bytes)
+ *bytes = R16(pVbe->pInt10->bx);
+ if (max)
+ *max = R16(pVbe->pInt10->dx);
+ }
+
+ return TRUE;
+}
+
+Bool
+VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace)
+{
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f07;
+ pVbe->pInt10->bx = wait_retrace ? 0x80 : 0x00;
+ pVbe->pInt10->cx = x;
+ pVbe->pInt10->dx = y;
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return FALSE;
+
+ return TRUE;
+}
+
+Bool
+VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y)
+{
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f07;
+ pVbe->pInt10->bx = 0x01;
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return FALSE;
+
+ *x = pVbe->pInt10->cx;
+ *y = pVbe->pInt10->dx;
+
+ return TRUE;
+}
+
+int
+VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits)
+{
+ /*
+ Input:
+ AX := 4F08h VBE Set/Get Palette Format
+ BL := 00h Set DAC Palette Format
+ := 01h Get DAC Palette Format
+ BH := Desired bits of color per primary
+ (Set DAC Palette Format only)
+
+ Output:
+ AX := VBE Return Status
+ BH := Current number of bits of color per primary
+ */
+
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f08;
+ if (!bits)
+ pVbe->pInt10->bx = 0x01;
+ else
+ pVbe->pInt10->bx = (bits & 0x00ff) << 8;
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return 0;
+
+ return (bits != 0 ? bits : (pVbe->pInt10->bx >> 8) & 0x00ff);
+}
+
+CARD32 *
+VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num,
+ CARD32 *data, Bool secondary, Bool wait_retrace)
+{
+ /*
+ Input:
+ (16-bit)
+ AX := 4F09h VBE Load/Unload Palette Data
+ BL := 00h Set Palette Data
+ := 01h Get Palette Data
+ := 02h Set Secondary Palette Data
+ := 03h Get Secondary Palette Data
+ := 80h Set Palette Data during Vertical Retrace
+ CX := Number of palette registers to update (to a maximum of 256)
+ DX := First of the palette registers to update (start)
+ ES:DI := Table of palette values (see below for format)
+
+ Output:
+ AX := VBE Return Status
+
+
+ Input:
+ (32-bit)
+ BL := 00h Set Palette Data
+ := 80h Set Palette Data during Vertical Retrace
+ CX := Number of palette registers to update (to a maximum of 256)
+ DX := First of the palette registers to update (start)
+ ES:EDI := Table of palette values (see below for format)
+ DS := Selector for memory mapped registers
+ */
+
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f09;
+ if (!secondary)
+ pVbe->pInt10->bx = set && wait_retrace ? 0x80 : set ? 0 : 1;
+ else
+ pVbe->pInt10->bx = set ? 2 : 3;
+ pVbe->pInt10->cx = num;
+ pVbe->pInt10->dx = first;
+ pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base);
+ pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
+ if (set)
+ memcpy(pVbe->memory, data, num * sizeof(CARD32));
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return NULL;
+
+ if (set)
+ return data;
+
+ data = malloc(num * sizeof(CARD32));
+ memcpy(data, pVbe->memory, num * sizeof(CARD32));
+
+ return data;
+}
+
+VBEpmi *
+VBEGetVBEpmi(vbeInfoPtr pVbe)
+{
+ VBEpmi *pmi;
+
+ /*
+ Input:
+ AH := 4Fh Super VGA support
+ AL := 0Ah Protected Mode Interface
+ BL := 00h Return Protected Mode Table
+
+ Output:
+ AX := Status
+ ES := Real Mode Segment of Table
+ DI := Offset of Table
+ CX := Lenght of Table including protected mode code in bytes (for copying purposes)
+ (All other registers are preserved)
+ */
+
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f0a;
+ pVbe->pInt10->bx = 0;
+ pVbe->pInt10->di = 0;
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return NULL;
+
+ pmi = malloc(sizeof(VBEpmi));
+ pmi->seg_tbl = R16(pVbe->pInt10->es);
+ pmi->tbl_off = R16(pVbe->pInt10->di);
+ pmi->tbl_len = R16(pVbe->pInt10->cx);
+
+ return pmi;
+}
+
+#if 0
+vbeModeInfoPtr
+VBEBuildVbeModeList(vbeInfoPtr pVbe, VbeInfoBlock *vbe)
+{
+ vbeModeInfoPtr ModeList = NULL;
+
+ int i = 0;
+ while (vbe->VideoModePtr[i] != 0xffff) {
+ vbeModeInfoPtr m;
+ VbeModeInfoBlock *mode;
+ int id = vbe->VideoModePtr[i++];
+ int bpp;
+
+ if ((mode = VBEGetModeInfo(pVbe, id)) == NULL)
+ continue;
+
+ bpp = mode->BitsPerPixel;
+
+ m = xnfcalloc(sizeof(vbeModeInfoRec),1);
+ m->width = mode->XResolution;
+ m->height = mode->YResolution;
+ m->bpp = bpp;
+ m->n = id;
+ m->next = ModeList;
+
+ xf86DrvMsgVerb(pVbe->pInt10->scrnIndex, X_PROBED, 3,
+ "BIOS reported VESA mode 0x%x: x:%i y:%i bpp:%i\n",
+ m->n, m->width, m->height, m->bpp);
+
+ ModeList = m;
+
+ VBEFreeModeInfo(mode);
+ }
+ return ModeList;
+}
+
+unsigned short
+VBECalcVbeModeIndex(vbeModeInfoPtr m, DisplayModePtr mode, int bpp)
+{
+ while (m) {
+ if (bpp == m->bpp
+ && mode->HDisplay == m->width
+ && mode->VDisplay == m->height)
+ return m->n;
+ m = m->next;
+ }
+ return 0;
+}
+#endif
+
+void
+VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr,
+ vbeSaveRestoreFunction function)
+{
+ Bool SaveSucc = FALSE;
+
+ if (VBE_VERSION_MAJOR(pVbe->version) > 1
+ && (function == MODE_SAVE || vbe_sr->pstate)) {
+ if (function == MODE_RESTORE)
+ memcpy(vbe_sr->state, vbe_sr->pstate, vbe_sr->stateSize);
+ ErrorF("VBESaveRestore\n");
+ if ((VBESaveRestore(pVbe,function,
+ (pointer)&vbe_sr->state,
+ &vbe_sr->stateSize,&vbe_sr->statePage))) {
+ if (function == MODE_SAVE) {
+ SaveSucc = TRUE;
+ vbe_sr->stateMode = -1; /* invalidate */
+ /* don't rely on the memory not being touched */
+ if (vbe_sr->pstate == NULL)
+ vbe_sr->pstate = malloc(vbe_sr->stateSize);
+ memcpy(vbe_sr->pstate, vbe_sr->state, vbe_sr->stateSize);
+ }
+ ErrorF("VBESaveRestore done with success\n");
+ return;
+ }
+ ErrorF("VBESaveRestore done\n");
+ }
+
+ if (function == MODE_SAVE && !SaveSucc)
+ (void)VBEGetVBEMode(pVbe, &vbe_sr->stateMode);
+
+ if (function == MODE_RESTORE && vbe_sr->stateMode != -1)
+ VBESetVBEMode(pVbe, vbe_sr->stateMode, NULL);
+
+}
+
+int
+VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock)
+{
+ /*
+ Input:
+ AX := 4F0Bh VBE Get Pixel Clock
+ BL := 00h Get Pixel Clock
+ ECX := pixel clock in units of Hz
+ DX := mode number
+
+ Output:
+ AX := VBE Return Status
+ ECX := Closest pixel clock
+ */
+
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f0b;
+ pVbe->pInt10->bx = 0x00;
+ pVbe->pInt10->cx = clock;
+ pVbe->pInt10->dx = mode;
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if (R16(pVbe->pInt10->ax) != 0x4f)
+ return 0;
+
+ return pVbe->pInt10->cx;
+}
+
+Bool
+VBEDPMSSet(vbeInfoPtr pVbe, int mode)
+{
+ /*
+ Input:
+ AX := 4F10h DPMS
+ BL := 01h Set Display Power State
+ BH := requested power state
+
+ Output:
+ AX := VBE Return Status
+ */
+
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f10;
+ pVbe->pInt10->bx = 0x01;
+ switch (mode) {
+ case DPMSModeOn:
+ break;
+ case DPMSModeStandby:
+ pVbe->pInt10->bx |= 0x100;
+ break;
+ case DPMSModeSuspend:
+ pVbe->pInt10->bx |= 0x200;
+ break;
+ case DPMSModeOff:
+ pVbe->pInt10->bx |= 0x400;
+ break;
+ }
+ xf86ExecX86int10(pVbe->pInt10);
+ return (R16(pVbe->pInt10->ax) == 0x4f);
+}
+
+void
+VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data)
+{
+ ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ DisplayModePtr mode;
+ const float PANEL_HZ = 60.0;
+
+ if (!data)
+ return;
+
+ xf86DrvMsg(scrnIndex, X_INFO, "PanelID returned panel resolution %dx%d\n",
+ data->hsize, data->vsize);
+
+ if (pScrn->monitor->nHsync || pScrn->monitor->nVrefresh)
+ return;
+
+ if (data->hsize < 320 || data->vsize < 240) {
+ xf86DrvMsg(scrnIndex, X_INFO, "...which I refuse to believe\n");
+ return;
+ }
+
+ mode = xf86CVTMode(data->hsize, data->vsize, PANEL_HZ, 1, 0);
+
+ pScrn->monitor->nHsync = 1;
+ pScrn->monitor->hsync[0].lo = 31.5;
+ pScrn->monitor->hsync[0].hi = (float)mode->Clock / (float)mode->HTotal;
+ pScrn->monitor->nVrefresh = 1;
+ pScrn->monitor->vrefresh[0].lo = 56.0;
+ pScrn->monitor->vrefresh[0].hi =
+ (float)mode->Clock*1000.0 / (float)mode->HTotal / (float)mode->VTotal;
+
+ free(mode);
+}
+
+struct vbePanelID *
+VBEReadPanelID(vbeInfoPtr pVbe)
+{
+ int RealOff = pVbe->real_mode_base;
+ pointer page = pVbe->memory;
+ void *tmp = NULL;
+ int screen = pVbe->pInt10->scrnIndex;
+
+ pVbe->pInt10->ax = 0x4F11;
+ pVbe->pInt10->bx = 0x01;
+ pVbe->pInt10->cx = 0;
+ pVbe->pInt10->dx = 0;
+ pVbe->pInt10->es = SEG_ADDR(RealOff);
+ pVbe->pInt10->di = SEG_OFF(RealOff);
+ pVbe->pInt10->num = 0x10;
+
+ xf86ExecX86int10(pVbe->pInt10);
+
+ if ((pVbe->pInt10->ax & 0xff) != 0x4f) {
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID invalid\n");
+ goto error;
+ }
+
+ switch (pVbe->pInt10->ax & 0xff00) {
+ case 0x0:
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID read successfully\n");
+ tmp = xnfalloc(32);
+ memcpy(tmp, page, 32);
+ break;
+ case 0x100:
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID read failed\n");
+ break;
+ default:
+ xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID unknown failure %i\n",
+ pVbe->pInt10->ax & 0xff00);
+ break;
+ }
+
+error:
+ return tmp;
+}
diff --git a/xorg-server/hw/xfree86/xaa/xaaInit.c b/xorg-server/hw/xfree86/xaa/xaaInit.c
index dcbd5aba0..c0617149a 100644
--- a/xorg-server/hw/xfree86/xaa/xaaInit.c
+++ b/xorg-server/hw/xfree86/xaa/xaaInit.c
@@ -1,635 +1,635 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "misc.h"
-#include "xf86.h"
-#include "xf86_OSproc.h"
-
-#include <X11/X.h>
-#include "scrnintstr.h"
-#include "pixmapstr.h"
-#include "windowstr.h"
-#include "xf86str.h"
-#include "mi.h"
-#include "miline.h"
-#include "xaa.h"
-#include "xaalocal.h"
-#include "xaawrap.h"
-#include "xf86fbman.h"
-#include "servermd.h"
-#ifdef COMPOSITE
-#include "cw.h"
-#endif
-
-#define MAX_PREALLOC_MEM 65536 /* MUST be >= 1024 */
-
-#define MIN_OFFPIX_SIZE (320*200)
-
-static Bool XAACloseScreen(int i, ScreenPtr pScreen);
-static void XAAGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
- unsigned int format, unsigned long planemask,
- char *pdstLine);
-static void XAAGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
- int *pwidth, int nspans, char *pdstStart);
-static PixmapPtr XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
- unsigned class);
-static Bool XAADestroyPixmap(PixmapPtr pPixmap);
-static Bool XAAEnterVT (int index, int flags);
-static void XAALeaveVT (int index, int flags);
-static int XAASetDGAMode(int index, int num, DGADevicePtr devRet);
-static void XAAEnableDisableFBAccess (int index, Bool enable);
-static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask);
-
-static DevPrivateKeyRec XAAScreenKeyRec;
-#define XAAScreenKey (&XAAScreenKeyRec)
-static DevPrivateKeyRec XAAGCKeyRec;
-#define XAAGCKey (&XAAGCKeyRec)
-static DevPrivateKeyRec XAAPixmapKeyRec;
-#define XAAPixmapKey (&XAAPixmapKeyRec)
-
-DevPrivateKey XAAGetScreenKey(void) {
- return XAAScreenKey;
-}
-
-DevPrivateKey XAAGetGCKey(void) {
- return XAAGCKey;
-}
-
-DevPrivateKey XAAGetPixmapKey(void) {
- return XAAPixmapKey;
-}
-
-/* temp kludge */
-static Bool SwitchedOut = FALSE;
-
-XAAInfoRecPtr
-XAACreateInfoRec(void)
-{
- XAAInfoRecPtr infoRec;
-
- infoRec = calloc(1, sizeof(XAAInfoRec));
- if(infoRec)
- infoRec->CachePixelGranularity = -1;
-
- return infoRec;
-}
-
-void
-XAADestroyInfoRec(XAAInfoRecPtr infoRec)
-{
- if(!infoRec) return;
-
- if(infoRec->ClosePixmapCache)
- (*infoRec->ClosePixmapCache)(infoRec->pScrn->pScreen);
-
- free(infoRec->PreAllocMem);
-
- free(infoRec->PixmapCachePrivate);
-
- free(infoRec);
-}
-
-
-Bool
-XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- XAAScreenPtr pScreenPriv;
- int i;
- PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
-
- /* Return successfully if no acceleration wanted */
- if (!infoRec)
- return TRUE;
-
- if (!dixRegisterPrivateKey(&XAAGCKeyRec, PRIVATE_GC, sizeof(XAAGCRec)))
- return FALSE;
-
- if (!dixRegisterPrivateKey(&XAAPixmapKeyRec, PRIVATE_PIXMAP, sizeof(XAAPixmapRec)))
- return FALSE;
-
- if (!dixRegisterPrivateKey(&XAAScreenKeyRec, PRIVATE_SCREEN, 0))
- return FALSE;
-
- if (!(pScreenPriv = malloc(sizeof(XAAScreenRec))))
- return FALSE;
-
- dixSetPrivate(&pScreen->devPrivates, XAAScreenKey, pScreenPriv);
-
- if(!xf86FBManagerRunning(pScreen))
- infoRec->Flags &= ~(PIXMAP_CACHE | OFFSCREEN_PIXMAPS);
- if(!(infoRec->Flags & LINEAR_FRAMEBUFFER))
- infoRec->Flags &= ~OFFSCREEN_PIXMAPS;
-
- if(!infoRec->FullPlanemask) { /* for backwards compatibility */
- infoRec->FullPlanemask = (1 << pScrn->depth) - 1;
- infoRec->FullPlanemasks[pScrn->depth - 1] = infoRec->FullPlanemask;
- }
-
- for(i = 0; i < 32; i++) {
- if(!infoRec->FullPlanemasks[i]) /* keep any set by caller */
- infoRec->FullPlanemasks[i] = (1 << (i+1)) - 1;
- }
-
- if(!XAAInitAccel(pScreen, infoRec)) return FALSE;
- pScreenPriv->AccelInfoRec = infoRec;
- infoRec->ScratchGC.pScreen = pScreen;
-
-
- if(!infoRec->GetImage)
- infoRec->GetImage = XAAGetImage;
- if(!infoRec->GetSpans)
- infoRec->GetSpans = XAAGetSpans;
- if(!infoRec->CopyWindow)
- infoRec->CopyWindow = XAACopyWindow;
-
- pScreenPriv->CreateGC = pScreen->CreateGC;
- pScreen->CreateGC = XAACreateGC;
- pScreenPriv->CloseScreen = pScreen->CloseScreen;
- pScreen->CloseScreen = XAACloseScreen;
- pScreenPriv->GetImage = pScreen->GetImage;
- pScreen->GetImage = infoRec->GetImage;
- pScreenPriv->GetSpans = pScreen->GetSpans;
- pScreen->GetSpans = infoRec->GetSpans;
- pScreenPriv->CopyWindow = pScreen->CopyWindow;
- pScreen->CopyWindow = infoRec->CopyWindow;
- pScreenPriv->CreatePixmap = pScreen->CreatePixmap;
- pScreen->CreatePixmap = XAACreatePixmap;
- pScreenPriv->DestroyPixmap = pScreen->DestroyPixmap;
- pScreen->DestroyPixmap = XAADestroyPixmap;
- pScreenPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
- pScreen->ChangeWindowAttributes = XAAChangeWindowAttributes;
-
- pScreenPriv->EnterVT = pScrn->EnterVT;
- pScrn->EnterVT = XAAEnterVT;
- pScreenPriv->LeaveVT = pScrn->LeaveVT;
- pScrn->LeaveVT = XAALeaveVT;
- pScreenPriv->SetDGAMode = pScrn->SetDGAMode;
- pScrn->SetDGAMode = XAASetDGAMode;
- pScreenPriv->EnableDisableFBAccess = pScrn->EnableDisableFBAccess;
- pScrn->EnableDisableFBAccess = XAAEnableDisableFBAccess;
-
- pScreenPriv->WindowExposures = pScreen->WindowExposures;
- if (ps)
- {
- pScreenPriv->Composite = ps->Composite;
- ps->Composite = XAAComposite;
- pScreenPriv->Glyphs = ps->Glyphs;
- ps->Glyphs = XAAGlyphs;
- }
- if(pScrn->overlayFlags & OVERLAY_8_32_PLANAR)
- XAASetupOverlay8_32Planar(pScreen);
-
- infoRec->PreAllocMem = malloc(MAX_PREALLOC_MEM);
- if(infoRec->PreAllocMem)
- infoRec->PreAllocSize = MAX_PREALLOC_MEM;
-
- if(infoRec->Flags & PIXMAP_CACHE)
- xf86RegisterFreeBoxCallback(pScreen, infoRec->InitPixmapCache,
- (pointer)infoRec);
-
- if(infoRec->Flags & MICROSOFT_ZERO_LINE_BIAS)
- miSetZeroLineBias(pScreen, OCTANT1 | OCTANT2 | OCTANT3 | OCTANT4);
-
-#ifdef COMPOSITE
- /* Initialize the composite wrapper. This needs to happen after the
- * wrapping above (so it comes before us), but before all other extensions,
- * so it doesn't confuse them. (particularly damage).
- */
- miInitializeCompositeWrapper(pScreen);
-#endif
-
- return TRUE;
-}
-
-
-
-static Bool
-XAACloseScreen (int i, ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- XAAScreenPtr pScreenPriv =
- (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
-
- pScrn->EnterVT = pScreenPriv->EnterVT;
- pScrn->LeaveVT = pScreenPriv->LeaveVT;
- pScrn->EnableDisableFBAccess = pScreenPriv->EnableDisableFBAccess;
-
- pScreen->CreateGC = pScreenPriv->CreateGC;
- pScreen->CloseScreen = pScreenPriv->CloseScreen;
- pScreen->GetImage = pScreenPriv->GetImage;
- pScreen->GetSpans = pScreenPriv->GetSpans;
- pScreen->CopyWindow = pScreenPriv->CopyWindow;
- pScreen->WindowExposures = pScreenPriv->WindowExposures;
- pScreen->CreatePixmap = pScreenPriv->CreatePixmap;
- pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap;
- pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes;
-
- /* We leave it up to the client to free the XAAInfoRec */
-
- free((pointer) pScreenPriv);
-
- return (*pScreen->CloseScreen) (i, pScreen);
-}
-
-static void
-XAAGetImage (
- DrawablePtr pDraw,
- int sx, int sy, int w, int h,
- unsigned int format,
- unsigned long planemask,
- char *pdstLine
-)
-{
- ScreenPtr pScreen = pDraw->pScreen;
- XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
- ScrnInfoPtr pScrn = infoRec->pScrn;
-
- if(pScrn->vtSema &&
- ((pDraw->type == DRAWABLE_WINDOW) || IS_OFFSCREEN_PIXMAP(pDraw)))
- {
- if(infoRec->ReadPixmap && (format == ZPixmap) &&
- ((planemask & infoRec->FullPlanemasks[pDraw->depth - 1]) ==
- infoRec->FullPlanemasks[pDraw->depth - 1]) &&
- (pDraw->bitsPerPixel == BitsPerPixel(pDraw->depth)))
- {
- (*infoRec->ReadPixmap)(pScrn,
- sx + pDraw->x, sy + pDraw->y, w, h,
- (unsigned char *)pdstLine,
- PixmapBytePad(w, pDraw->depth),
- pDraw->bitsPerPixel, pDraw->depth);
- return;
- }
- SYNC_CHECK(pDraw);
- }
-
- XAA_SCREEN_PROLOGUE (pScreen, GetImage);
- (*pScreen->GetImage) (pDraw, sx, sy, w, h, format, planemask, pdstLine);
- XAA_SCREEN_EPILOGUE (pScreen, GetImage, XAAGetImage);
-}
-
-static void
-XAAGetSpans (
- DrawablePtr pDraw,
- int wMax,
- DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- char *pdstStart
-)
-{
- ScreenPtr pScreen = pDraw->pScreen;
- XAA_SCREEN_PROLOGUE (pScreen, GetSpans);
- if(xf86Screens[pScreen->myNum]->vtSema &&
- ((pDraw->type == DRAWABLE_WINDOW) || IS_OFFSCREEN_PIXMAP(pDraw))) {
- SYNC_CHECK(pDraw);
- }
- (*pScreen->GetSpans) (pDraw, wMax, ppt, pwidth, nspans, pdstStart);
- XAA_SCREEN_EPILOGUE (pScreen, GetSpans, XAAGetSpans);
-}
-
-
-static int
-XAAPixmapBPP (ScreenPtr pScreen, int depth)
-{
- PixmapPtr pPix;
- int bpp;
- DestroyPixmapProcPtr destroyPixmap;
-
- XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
- pPix = (*pScreen->CreatePixmap) (pScreen, 1, 1, depth,
- CREATE_PIXMAP_USAGE_SCRATCH);
- XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
- if (!pPix)
- return 0;
- bpp = pPix->drawable.bitsPerPixel;
- destroyPixmap = pScreen->DestroyPixmap;
- XAA_SCREEN_PROLOGUE (pScreen, DestroyPixmap);
- (*pScreen->DestroyPixmap) (pPix);
- XAA_SCREEN_EPILOGUE (pScreen, DestroyPixmap, destroyPixmap);
- return bpp;
-}
-
-static void
-XAAInitializeOffscreenDepths (ScreenPtr pScreen)
-{
- XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- int d, dep;
-
- infoRec->offscreenDepthsInitialized = TRUE;
- infoRec->offscreenDepths = 0;
- if (infoRec->Flags & OFFSCREEN_PIXMAPS) {
- for (d = 0; d < pScreen->numDepths; d++) {
- dep = pScreen->allowedDepths[d].depth;
- if (XAAPixmapBPP (pScreen, dep) == pScrn->bitsPerPixel)
- infoRec->offscreenDepths |= (1 << (dep - 1));
- }
- }
-}
-
-static PixmapPtr
-XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned class)
-{
- XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- XAAPixmapPtr pPriv;
- PixmapPtr pPix = NULL;
- int size = w * h;
-
- if (w > 32767 || h > 32767)
- return NullPixmap;
-
- if (!infoRec->offscreenDepthsInitialized)
- XAAInitializeOffscreenDepths (pScreen);
-
- if(pScrn->vtSema &&
- (class != CREATE_PIXMAP_USAGE_GLYPH_PICTURE) &&
- (infoRec->offscreenDepths & (1 << (depth - 1))) &&
- (size >= MIN_OFFPIX_SIZE) && !SwitchedOut &&
- (!infoRec->maxOffPixWidth || (w <= infoRec->maxOffPixWidth)) &&
- (!infoRec->maxOffPixHeight || (h <= infoRec->maxOffPixHeight)) )
- {
- PixmapLinkPtr pLink;
- PixmapPtr pScreenPix;
- FBAreaPtr area;
- int gran = 0;
-
- switch(pScrn->bitsPerPixel) {
- case 24:
- case 8: gran = 4; break;
- case 16: gran = 2; break;
- case 32: gran = 1; break;
- default: break;
- }
-
- if(BITMAP_SCANLINE_PAD == 64)
- gran *= 2;
-
- if(!(area = xf86AllocateOffscreenArea(pScreen, w, h, gran, 0,
- XAARemoveAreaCallback, NULL))) {
- goto BAILOUT;
- }
-
- if(!(pLink = malloc(sizeof(PixmapLink)))) {
- xf86FreeOffscreenArea(area);
- goto BAILOUT;
- }
-
- XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
- pPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, class);
- XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
-
- if (!pPix) {
- free(pLink);
- xf86FreeOffscreenArea(area);
- goto BAILOUT;
- }
-
- pScreenPix = (*pScreen->GetScreenPixmap)(pScreen);
-
- pPriv = XAA_GET_PIXMAP_PRIVATE(pPix);
- pPix->drawable.x = area->box.x1;
- pPix->drawable.y = area->box.y1;
- pPix->drawable.width = w;
- pPix->drawable.height = h;
- pPix->drawable.bitsPerPixel = pScrn->bitsPerPixel;
- pPix->devKind = pScreenPix->devKind;
- pPix->devPrivate.ptr = pScreenPix->devPrivate.ptr;
- area->devPrivate.ptr = pPix;
-
- pPriv->flags = OFFSCREEN;
- pPriv->offscreenArea = area;
- pPriv->freeData = FALSE;
-
- pLink->next = infoRec->OffscreenPixmaps;
- pLink->pPix = pPix;
- infoRec->OffscreenPixmaps = pLink;
- return pPix;
- }
-BAILOUT:
- XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
- pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, class);
- XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
-
- if(pPix) {
- pPriv = XAA_GET_PIXMAP_PRIVATE(pPix);
- pPriv->flags = 0;
- pPriv->offscreenArea = NULL;
- pPriv->freeData = FALSE;
- if(!w || !h) /* either scratch or shared memory */
- pPriv->flags |= SHARED_PIXMAP;
- }
-
- return pPix;
-}
-
-static Bool
-XAADestroyPixmap(PixmapPtr pPix)
-{
- ScreenPtr pScreen = pPix->drawable.pScreen;
- XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
- XAAPixmapPtr pPriv = XAA_GET_PIXMAP_PRIVATE(pPix);
- Bool ret;
-
- if(pPix->refcnt == 1) {
- if(pPriv->flags & OFFSCREEN) {
- if(pPriv->flags & DGA_PIXMAP)
- free(pPriv->offscreenArea);
- else {
- FBAreaPtr area = pPriv->offscreenArea;
- PixmapLinkPtr pLink = infoRec->OffscreenPixmaps;
- PixmapLinkPtr prev = NULL;
-
- while(pLink->pPix != pPix) {
- prev = pLink;
- pLink = pLink->next;
- }
-
- if(prev) prev->next = pLink->next;
- else infoRec->OffscreenPixmaps = pLink->next;
-
- if(!area) area = pLink->area;
-
- xf86FreeOffscreenArea(area);
- pPriv->offscreenArea = NULL;
- free(pLink);
- }
- }
-
- if(pPriv->freeData) { /* pixmaps that were once in video ram */
- free(pPix->devPrivate.ptr);
- pPix->devPrivate.ptr = NULL;
- }
- }
-
- XAA_SCREEN_PROLOGUE (pScreen, DestroyPixmap);
- ret = (*pScreen->DestroyPixmap) (pPix);
- XAA_SCREEN_EPILOGUE (pScreen, DestroyPixmap, XAADestroyPixmap);
-
- return ret;
-}
-
-static Bool
-XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
- Bool ret;
-
- XAA_SCREEN_PROLOGUE (pScreen, ChangeWindowAttributes);
- ret = (*pScreen->ChangeWindowAttributes) (pWin, mask);
- XAA_SCREEN_EPILOGUE (pScreen, ChangeWindowAttributes, XAAChangeWindowAttributes);
-
- /* we have to assume that shared memory pixmaps are dirty
- because we can't wrap operations on them */
-
- if((mask & CWBackPixmap) && (pWin->backgroundState == BackgroundPixmap) &&
- PIXMAP_IS_SHARED(pWin->background.pixmap))
- {
- XAAPixmapPtr pPixPriv = XAA_GET_PIXMAP_PRIVATE(pWin->background.pixmap);
- pPixPriv->flags |= DIRTY;
- }
- if((mask & CWBorderPixmap) && !(pWin->borderIsPixel) &&
- PIXMAP_IS_SHARED(pWin->border.pixmap))
- {
- XAAPixmapPtr pPixPriv = XAA_GET_PIXMAP_PRIVATE(pWin->border.pixmap);
- pPixPriv->flags |= DIRTY;
- }
-
- return ret;
-}
-
-
-
-/* These two aren't really needed for anything */
-
-static Bool
-XAAEnterVT(int index, int flags)
-{
- ScrnInfoPtr pScrn = xf86Screens[index];
- Bool ret;
- ScreenPtr pScreen = screenInfo.screens[index];
- XAAScreenPtr pScreenPriv =
- (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
-
- pScrn->EnterVT = pScreenPriv->EnterVT;
- ret = ((*pScreenPriv->EnterVT)(index, flags));
- pScreenPriv->EnterVT = pScrn->EnterVT;
- pScrn->EnterVT = XAAEnterVT;
- return ret;
-}
-
-static void
-XAALeaveVT(int index, int flags)
-{
- ScrnInfoPtr pScrn = xf86Screens[index];
- ScreenPtr pScreen = screenInfo.screens[index];
- XAAScreenPtr pScreenPriv =
- (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
- XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec;
-
- if(infoRec->NeedToSync) {
- (*infoRec->Sync)(infoRec->pScrn);
- infoRec->NeedToSync = FALSE;
- }
-
- pScrn->LeaveVT = pScreenPriv->LeaveVT;
- (*pScreenPriv->LeaveVT)(index, flags);
- pScreenPriv->LeaveVT = pScrn->LeaveVT;
- pScrn->LeaveVT = XAALeaveVT;
-}
-
-typedef struct {
- Bool UsingPixmapCache;
- Bool CanDoColor8x8;
- Bool CanDoMono8x8;
-} SavedCacheState, *SavedCacheStatePtr;
-
-static int
-XAASetDGAMode(int index, int num, DGADevicePtr devRet)
-{
- ScreenPtr pScreen = screenInfo.screens[index];
- XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
- XAAScreenPtr pScreenPriv =
- (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
- int ret;
-
- if (!num && infoRec->dgaSaves) { /* restore old pixmap cache state */
- SavedCacheStatePtr state = (SavedCacheStatePtr)infoRec->dgaSaves;
-
- infoRec->UsingPixmapCache = state->UsingPixmapCache;
- infoRec->CanDoColor8x8 = state->CanDoColor8x8;
- infoRec->CanDoMono8x8 = state->CanDoMono8x8;
- free(infoRec->dgaSaves);
- infoRec->dgaSaves = NULL;
- }
-
- ret = (*pScreenPriv->SetDGAMode)(index, num, devRet);
- if(ret != Success) return ret;
-
- if(num && devRet->pPix) { /* accelerate this pixmap */
- XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE(devRet->pPix);
- FBAreaPtr area;
-
- if((area = malloc(sizeof(FBArea)))) {
- area->pScreen = pScreen;
- area->box.x1 = 0;
- area->box.x2 = 0;
- area->box.y1 = devRet->mode->pixmapWidth;
- area->box.y2 = devRet->mode->pixmapHeight;
- area->granularity = 0;
- area->MoveAreaCallback = 0;
- area->RemoveAreaCallback = 0;
- area->devPrivate.ptr = 0;
-
- pixPriv->flags |= OFFSCREEN | DGA_PIXMAP;
- pixPriv->offscreenArea = area;
-
- if(!infoRec->dgaSaves) { /* save pixmap cache state */
- SavedCacheStatePtr state = malloc(sizeof(SavedCacheState));
-
- state->UsingPixmapCache = infoRec->UsingPixmapCache;
- state->CanDoColor8x8 = infoRec->CanDoColor8x8;
- state->CanDoMono8x8 = infoRec->CanDoMono8x8;
- infoRec->dgaSaves = (char*)state;
-
- infoRec->UsingPixmapCache = FALSE;
- if(infoRec->PixmapCacheFlags & CACHE_MONO_8x8)
- infoRec->CanDoMono8x8 = FALSE;
- if(infoRec->PixmapCacheFlags & CACHE_COLOR_8x8)
- infoRec->CanDoColor8x8 = FALSE;
- }
- }
- }
-
- return ret;
-}
-
-
-
-static void
-XAAEnableDisableFBAccess (int index, Bool enable)
-{
- ScreenPtr pScreen = screenInfo.screens[index];
- XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
- XAAScreenPtr pScreenPriv =
- (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
-
- if(!enable) {
- if((infoRec->Flags & OFFSCREEN_PIXMAPS) && (infoRec->OffscreenPixmaps))
- XAAMoveOutOffscreenPixmaps(pScreen);
- if(infoRec->Flags & PIXMAP_CACHE)
- XAAInvalidatePixmapCache(pScreen);
- SwitchedOut = TRUE;
- }
-
- (*pScreenPriv->EnableDisableFBAccess)(index, enable);
-
- if(enable) {
- if((infoRec->Flags & OFFSCREEN_PIXMAPS) && (infoRec->OffscreenPixmaps))
- XAAMoveInOffscreenPixmaps(pScreen);
- SwitchedOut = FALSE;
- }
-}
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include "misc.h"
+#include "xf86.h"
+#include "xf86_OSproc.h"
+
+#include <X11/X.h>
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "windowstr.h"
+#include "xf86str.h"
+#include "mi.h"
+#include "miline.h"
+#include "xaa.h"
+#include "xaalocal.h"
+#include "xaawrap.h"
+#include "xf86fbman.h"
+#include "servermd.h"
+#ifdef COMPOSITE
+#include "cw.h"
+#endif
+
+#define MAX_PREALLOC_MEM 65536 /* MUST be >= 1024 */
+
+#define MIN_OFFPIX_SIZE (320*200)
+
+static Bool XAACloseScreen(int i, ScreenPtr pScreen);
+static void XAAGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
+ unsigned int format, unsigned long planemask,
+ char *pdstLine);
+static void XAAGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
+ int *pwidth, int nspans, char *pdstStart);
+static PixmapPtr XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
+ unsigned class);
+static Bool XAADestroyPixmap(PixmapPtr pPixmap);
+static Bool XAAEnterVT (int index, int flags);
+static void XAALeaveVT (int index, int flags);
+static int XAASetDGAMode(int index, int num, DGADevicePtr devRet);
+static void XAAEnableDisableFBAccess (int index, Bool enable);
+static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask);
+
+static DevPrivateKeyRec XAAScreenKeyRec;
+#define XAAScreenKey (&XAAScreenKeyRec)
+static DevPrivateKeyRec XAAGCKeyRec;
+#define XAAGCKey (&XAAGCKeyRec)
+static DevPrivateKeyRec XAAPixmapKeyRec;
+#define XAAPixmapKey (&XAAPixmapKeyRec)
+
+DevPrivateKey XAAGetScreenKey(void) {
+ return XAAScreenKey;
+}
+
+DevPrivateKey XAAGetGCKey(void) {
+ return XAAGCKey;
+}
+
+DevPrivateKey XAAGetPixmapKey(void) {
+ return XAAPixmapKey;
+}
+
+/* temp kludge */
+static Bool SwitchedOut = FALSE;
+
+XAAInfoRecPtr
+XAACreateInfoRec(void)
+{
+ XAAInfoRecPtr infoRec;
+
+ infoRec = calloc(1, sizeof(XAAInfoRec));
+ if(infoRec)
+ infoRec->CachePixelGranularity = -1;
+
+ return infoRec;
+}
+
+void
+XAADestroyInfoRec(XAAInfoRecPtr infoRec)
+{
+ if(!infoRec) return;
+
+ if(infoRec->ClosePixmapCache)
+ (*infoRec->ClosePixmapCache)(infoRec->pScrn->pScreen);
+
+ free(infoRec->PreAllocMem);
+
+ free(infoRec->PixmapCachePrivate);
+
+ free(infoRec);
+}
+
+
+Bool
+XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ XAAScreenPtr pScreenPriv;
+ int i;
+ PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
+
+ /* Return successfully if no acceleration wanted */
+ if (!infoRec)
+ return TRUE;
+
+ if (!dixRegisterPrivateKey(&XAAGCKeyRec, PRIVATE_GC, sizeof(XAAGCRec)))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(&XAAPixmapKeyRec, PRIVATE_PIXMAP, sizeof(XAAPixmapRec)))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(&XAAScreenKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
+ if (!(pScreenPriv = malloc(sizeof(XAAScreenRec))))
+ return FALSE;
+
+ dixSetPrivate(&pScreen->devPrivates, XAAScreenKey, pScreenPriv);
+
+ if(!xf86FBManagerRunning(pScreen))
+ infoRec->Flags &= ~(PIXMAP_CACHE | OFFSCREEN_PIXMAPS);
+ if(!(infoRec->Flags & LINEAR_FRAMEBUFFER))
+ infoRec->Flags &= ~OFFSCREEN_PIXMAPS;
+
+ if(!infoRec->FullPlanemask) { /* for backwards compatibility */
+ infoRec->FullPlanemask = (1 << pScrn->depth) - 1;
+ infoRec->FullPlanemasks[pScrn->depth - 1] = infoRec->FullPlanemask;
+ }
+
+ for(i = 0; i < 32; i++) {
+ if(!infoRec->FullPlanemasks[i]) /* keep any set by caller */
+ infoRec->FullPlanemasks[i] = (1 << (i+1)) - 1;
+ }
+
+ if(!XAAInitAccel(pScreen, infoRec)) return FALSE;
+ pScreenPriv->AccelInfoRec = infoRec;
+ infoRec->ScratchGC.pScreen = pScreen;
+
+
+ if(!infoRec->GetImage)
+ infoRec->GetImage = XAAGetImage;
+ if(!infoRec->GetSpans)
+ infoRec->GetSpans = XAAGetSpans;
+ if(!infoRec->CopyWindow)
+ infoRec->CopyWindow = XAACopyWindow;
+
+ pScreenPriv->CreateGC = pScreen->CreateGC;
+ pScreen->CreateGC = XAACreateGC;
+ pScreenPriv->CloseScreen = pScreen->CloseScreen;
+ pScreen->CloseScreen = XAACloseScreen;
+ pScreenPriv->GetImage = pScreen->GetImage;
+ pScreen->GetImage = infoRec->GetImage;
+ pScreenPriv->GetSpans = pScreen->GetSpans;
+ pScreen->GetSpans = infoRec->GetSpans;
+ pScreenPriv->CopyWindow = pScreen->CopyWindow;
+ pScreen->CopyWindow = infoRec->CopyWindow;
+ pScreenPriv->CreatePixmap = pScreen->CreatePixmap;
+ pScreen->CreatePixmap = XAACreatePixmap;
+ pScreenPriv->DestroyPixmap = pScreen->DestroyPixmap;
+ pScreen->DestroyPixmap = XAADestroyPixmap;
+ pScreenPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
+ pScreen->ChangeWindowAttributes = XAAChangeWindowAttributes;
+
+ pScreenPriv->EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = XAAEnterVT;
+ pScreenPriv->LeaveVT = pScrn->LeaveVT;
+ pScrn->LeaveVT = XAALeaveVT;
+ pScreenPriv->SetDGAMode = pScrn->SetDGAMode;
+ pScrn->SetDGAMode = XAASetDGAMode;
+ pScreenPriv->EnableDisableFBAccess = pScrn->EnableDisableFBAccess;
+ pScrn->EnableDisableFBAccess = XAAEnableDisableFBAccess;
+
+ pScreenPriv->WindowExposures = pScreen->WindowExposures;
+ if (ps)
+ {
+ pScreenPriv->Composite = ps->Composite;
+ ps->Composite = XAAComposite;
+ pScreenPriv->Glyphs = ps->Glyphs;
+ ps->Glyphs = XAAGlyphs;
+ }
+ if(pScrn->overlayFlags & OVERLAY_8_32_PLANAR)
+ XAASetupOverlay8_32Planar(pScreen);
+
+ infoRec->PreAllocMem = malloc(MAX_PREALLOC_MEM);
+ if(infoRec->PreAllocMem)
+ infoRec->PreAllocSize = MAX_PREALLOC_MEM;
+
+ if(infoRec->Flags & PIXMAP_CACHE)
+ xf86RegisterFreeBoxCallback(pScreen, infoRec->InitPixmapCache,
+ (pointer)infoRec);
+
+ if(infoRec->Flags & MICROSOFT_ZERO_LINE_BIAS)
+ miSetZeroLineBias(pScreen, OCTANT1 | OCTANT2 | OCTANT3 | OCTANT4);
+
+#ifdef COMPOSITE
+ /* Initialize the composite wrapper. This needs to happen after the
+ * wrapping above (so it comes before us), but before all other extensions,
+ * so it doesn't confuse them. (particularly damage).
+ */
+ miInitializeCompositeWrapper(pScreen);
+#endif
+
+ return TRUE;
+}
+
+
+
+static Bool
+XAACloseScreen (int i, ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ XAAScreenPtr pScreenPriv =
+ (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
+
+ pScrn->EnterVT = pScreenPriv->EnterVT;
+ pScrn->LeaveVT = pScreenPriv->LeaveVT;
+ pScrn->EnableDisableFBAccess = pScreenPriv->EnableDisableFBAccess;
+
+ pScreen->CreateGC = pScreenPriv->CreateGC;
+ pScreen->CloseScreen = pScreenPriv->CloseScreen;
+ pScreen->GetImage = pScreenPriv->GetImage;
+ pScreen->GetSpans = pScreenPriv->GetSpans;
+ pScreen->CopyWindow = pScreenPriv->CopyWindow;
+ pScreen->WindowExposures = pScreenPriv->WindowExposures;
+ pScreen->CreatePixmap = pScreenPriv->CreatePixmap;
+ pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap;
+ pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes;
+
+ /* We leave it up to the client to free the XAAInfoRec */
+
+ free((pointer) pScreenPriv);
+
+ return (*pScreen->CloseScreen) (i, pScreen);
+}
+
+static void
+XAAGetImage (
+ DrawablePtr pDraw,
+ int sx, int sy, int w, int h,
+ unsigned int format,
+ unsigned long planemask,
+ char *pdstLine
+)
+{
+ ScreenPtr pScreen = pDraw->pScreen;
+ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
+ ScrnInfoPtr pScrn = infoRec->pScrn;
+
+ if(pScrn->vtSema &&
+ ((pDraw->type == DRAWABLE_WINDOW) || IS_OFFSCREEN_PIXMAP(pDraw)))
+ {
+ if(infoRec->ReadPixmap && (format == ZPixmap) &&
+ ((planemask & infoRec->FullPlanemasks[pDraw->depth - 1]) ==
+ infoRec->FullPlanemasks[pDraw->depth - 1]) &&
+ (pDraw->bitsPerPixel == BitsPerPixel(pDraw->depth)))
+ {
+ (*infoRec->ReadPixmap)(pScrn,
+ sx + pDraw->x, sy + pDraw->y, w, h,
+ (unsigned char *)pdstLine,
+ PixmapBytePad(w, pDraw->depth),
+ pDraw->bitsPerPixel, pDraw->depth);
+ return;
+ }
+ SYNC_CHECK(pDraw);
+ }
+
+ XAA_SCREEN_PROLOGUE (pScreen, GetImage);
+ (*pScreen->GetImage) (pDraw, sx, sy, w, h, format, planemask, pdstLine);
+ XAA_SCREEN_EPILOGUE (pScreen, GetImage, XAAGetImage);
+}
+
+static void
+XAAGetSpans (
+ DrawablePtr pDraw,
+ int wMax,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ char *pdstStart
+)
+{
+ ScreenPtr pScreen = pDraw->pScreen;
+ XAA_SCREEN_PROLOGUE (pScreen, GetSpans);
+ if(xf86Screens[pScreen->myNum]->vtSema &&
+ ((pDraw->type == DRAWABLE_WINDOW) || IS_OFFSCREEN_PIXMAP(pDraw))) {
+ SYNC_CHECK(pDraw);
+ }
+ (*pScreen->GetSpans) (pDraw, wMax, ppt, pwidth, nspans, pdstStart);
+ XAA_SCREEN_EPILOGUE (pScreen, GetSpans, XAAGetSpans);
+}
+
+
+static int
+XAAPixmapBPP (ScreenPtr pScreen, int depth)
+{
+ PixmapPtr pPix;
+ int bpp;
+ DestroyPixmapProcPtr destroyPixmap;
+
+ XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
+ pPix = (*pScreen->CreatePixmap) (pScreen, 1, 1, depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
+ XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
+ if (!pPix)
+ return 0;
+ bpp = pPix->drawable.bitsPerPixel;
+ destroyPixmap = pScreen->DestroyPixmap;
+ XAA_SCREEN_PROLOGUE (pScreen, DestroyPixmap);
+ (*pScreen->DestroyPixmap) (pPix);
+ XAA_SCREEN_EPILOGUE (pScreen, DestroyPixmap, destroyPixmap);
+ return bpp;
+}
+
+static void
+XAAInitializeOffscreenDepths (ScreenPtr pScreen)
+{
+ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ int d, dep;
+
+ infoRec->offscreenDepthsInitialized = TRUE;
+ infoRec->offscreenDepths = 0;
+ if (infoRec->Flags & OFFSCREEN_PIXMAPS) {
+ for (d = 0; d < pScreen->numDepths; d++) {
+ dep = pScreen->allowedDepths[d].depth;
+ if (XAAPixmapBPP (pScreen, dep) == pScrn->bitsPerPixel)
+ infoRec->offscreenDepths |= (1 << (dep - 1));
+ }
+ }
+}
+
+static PixmapPtr
+XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned class)
+{
+ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ XAAPixmapPtr pPriv;
+ PixmapPtr pPix = NULL;
+ int size = w * h;
+
+ if (w > 32767 || h > 32767)
+ return NullPixmap;
+
+ if (!infoRec->offscreenDepthsInitialized)
+ XAAInitializeOffscreenDepths (pScreen);
+
+ if(pScrn->vtSema &&
+ (class != CREATE_PIXMAP_USAGE_GLYPH_PICTURE) &&
+ (infoRec->offscreenDepths & (1 << (depth - 1))) &&
+ (size >= MIN_OFFPIX_SIZE) && !SwitchedOut &&
+ (!infoRec->maxOffPixWidth || (w <= infoRec->maxOffPixWidth)) &&
+ (!infoRec->maxOffPixHeight || (h <= infoRec->maxOffPixHeight)) )
+ {
+ PixmapLinkPtr pLink;
+ PixmapPtr pScreenPix;
+ FBAreaPtr area;
+ int gran = 0;
+
+ switch(pScrn->bitsPerPixel) {
+ case 24:
+ case 8: gran = 4; break;
+ case 16: gran = 2; break;
+ case 32: gran = 1; break;
+ default: break;
+ }
+
+ if(BITMAP_SCANLINE_PAD == 64)
+ gran *= 2;
+
+ if(!(area = xf86AllocateOffscreenArea(pScreen, w, h, gran, 0,
+ XAARemoveAreaCallback, NULL))) {
+ goto BAILOUT;
+ }
+
+ if(!(pLink = malloc(sizeof(PixmapLink)))) {
+ xf86FreeOffscreenArea(area);
+ goto BAILOUT;
+ }
+
+ XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
+ pPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, class);
+ XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
+
+ if (!pPix) {
+ free(pLink);
+ xf86FreeOffscreenArea(area);
+ goto BAILOUT;
+ }
+
+ pScreenPix = (*pScreen->GetScreenPixmap)(pScreen);
+
+ pPriv = XAA_GET_PIXMAP_PRIVATE(pPix);
+ pPix->drawable.x = area->box.x1;
+ pPix->drawable.y = area->box.y1;
+ pPix->drawable.width = w;
+ pPix->drawable.height = h;
+ pPix->drawable.bitsPerPixel = pScrn->bitsPerPixel;
+ pPix->devKind = pScreenPix->devKind;
+ pPix->devPrivate.ptr = pScreenPix->devPrivate.ptr;
+ area->devPrivate.ptr = pPix;
+
+ pPriv->flags = OFFSCREEN;
+ pPriv->offscreenArea = area;
+ pPriv->freeData = FALSE;
+
+ pLink->next = infoRec->OffscreenPixmaps;
+ pLink->pPix = pPix;
+ infoRec->OffscreenPixmaps = pLink;
+ return pPix;
+ }
+BAILOUT:
+ XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
+ pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, class);
+ XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
+
+ if(pPix) {
+ pPriv = XAA_GET_PIXMAP_PRIVATE(pPix);
+ pPriv->flags = 0;
+ pPriv->offscreenArea = NULL;
+ pPriv->freeData = FALSE;
+ if(!w || !h) /* either scratch or shared memory */
+ pPriv->flags |= SHARED_PIXMAP;
+ }
+
+ return pPix;
+}
+
+static Bool
+XAADestroyPixmap(PixmapPtr pPix)
+{
+ ScreenPtr pScreen = pPix->drawable.pScreen;
+ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
+ XAAPixmapPtr pPriv = XAA_GET_PIXMAP_PRIVATE(pPix);
+ Bool ret;
+
+ if(pPix->refcnt == 1) {
+ if(pPriv->flags & OFFSCREEN) {
+ if(pPriv->flags & DGA_PIXMAP)
+ free(pPriv->offscreenArea);
+ else {
+ FBAreaPtr area = pPriv->offscreenArea;
+ PixmapLinkPtr pLink = infoRec->OffscreenPixmaps;
+ PixmapLinkPtr prev = NULL;
+
+ while(pLink->pPix != pPix) {
+ prev = pLink;
+ pLink = pLink->next;
+ }
+
+ if(prev) prev->next = pLink->next;
+ else infoRec->OffscreenPixmaps = pLink->next;
+
+ if(!area) area = pLink->area;
+
+ xf86FreeOffscreenArea(area);
+ pPriv->offscreenArea = NULL;
+ free(pLink);
+ }
+ }
+
+ if(pPriv->freeData) { /* pixmaps that were once in video ram */
+ free(pPix->devPrivate.ptr);
+ pPix->devPrivate.ptr = NULL;
+ }
+ }
+
+ XAA_SCREEN_PROLOGUE (pScreen, DestroyPixmap);
+ ret = (*pScreen->DestroyPixmap) (pPix);
+ XAA_SCREEN_EPILOGUE (pScreen, DestroyPixmap, XAADestroyPixmap);
+
+ return ret;
+}
+
+static Bool
+XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ Bool ret;
+
+ XAA_SCREEN_PROLOGUE (pScreen, ChangeWindowAttributes);
+ ret = (*pScreen->ChangeWindowAttributes) (pWin, mask);
+ XAA_SCREEN_EPILOGUE (pScreen, ChangeWindowAttributes, XAAChangeWindowAttributes);
+
+ /* we have to assume that shared memory pixmaps are dirty
+ because we can't wrap operations on them */
+
+ if((mask & CWBackPixmap) && (pWin->backgroundState == BackgroundPixmap) &&
+ PIXMAP_IS_SHARED(pWin->background.pixmap))
+ {
+ XAAPixmapPtr pPixPriv = XAA_GET_PIXMAP_PRIVATE(pWin->background.pixmap);
+ pPixPriv->flags |= DIRTY;
+ }
+ if((mask & CWBorderPixmap) && !(pWin->borderIsPixel) &&
+ PIXMAP_IS_SHARED(pWin->border.pixmap))
+ {
+ XAAPixmapPtr pPixPriv = XAA_GET_PIXMAP_PRIVATE(pWin->border.pixmap);
+ pPixPriv->flags |= DIRTY;
+ }
+
+ return ret;
+}
+
+
+
+/* These two aren't really needed for anything */
+
+static Bool
+XAAEnterVT(int index, int flags)
+{
+ ScrnInfoPtr pScrn = xf86Screens[index];
+ Bool ret;
+ ScreenPtr pScreen = screenInfo.screens[index];
+ XAAScreenPtr pScreenPriv =
+ (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
+
+ pScrn->EnterVT = pScreenPriv->EnterVT;
+ ret = ((*pScreenPriv->EnterVT)(index, flags));
+ pScreenPriv->EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = XAAEnterVT;
+ return ret;
+}
+
+static void
+XAALeaveVT(int index, int flags)
+{
+ ScrnInfoPtr pScrn = xf86Screens[index];
+ ScreenPtr pScreen = screenInfo.screens[index];
+ XAAScreenPtr pScreenPriv =
+ (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
+ XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec;
+
+ if(infoRec->NeedToSync) {
+ (*infoRec->Sync)(infoRec->pScrn);
+ infoRec->NeedToSync = FALSE;
+ }
+
+ pScrn->LeaveVT = pScreenPriv->LeaveVT;
+ (*pScreenPriv->LeaveVT)(index, flags);
+ pScreenPriv->LeaveVT = pScrn->LeaveVT;
+ pScrn->LeaveVT = XAALeaveVT;
+}
+
+typedef struct {
+ Bool UsingPixmapCache;
+ Bool CanDoColor8x8;
+ Bool CanDoMono8x8;
+} SavedCacheState, *SavedCacheStatePtr;
+
+static int
+XAASetDGAMode(int index, int num, DGADevicePtr devRet)
+{
+ ScreenPtr pScreen = screenInfo.screens[index];
+ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
+ XAAScreenPtr pScreenPriv =
+ (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
+ int ret;
+
+ if (!num && infoRec->dgaSaves) { /* restore old pixmap cache state */
+ SavedCacheStatePtr state = (SavedCacheStatePtr)infoRec->dgaSaves;
+
+ infoRec->UsingPixmapCache = state->UsingPixmapCache;
+ infoRec->CanDoColor8x8 = state->CanDoColor8x8;
+ infoRec->CanDoMono8x8 = state->CanDoMono8x8;
+ free(infoRec->dgaSaves);
+ infoRec->dgaSaves = NULL;
+ }
+
+ ret = (*pScreenPriv->SetDGAMode)(index, num, devRet);
+ if(ret != Success) return ret;
+
+ if(num && devRet->pPix) { /* accelerate this pixmap */
+ XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE(devRet->pPix);
+ FBAreaPtr area;
+
+ if((area = malloc(sizeof(FBArea)))) {
+ area->pScreen = pScreen;
+ area->box.x1 = 0;
+ area->box.x2 = 0;
+ area->box.y1 = devRet->mode->pixmapWidth;
+ area->box.y2 = devRet->mode->pixmapHeight;
+ area->granularity = 0;
+ area->MoveAreaCallback = 0;
+ area->RemoveAreaCallback = 0;
+ area->devPrivate.ptr = 0;
+
+ pixPriv->flags |= OFFSCREEN | DGA_PIXMAP;
+ pixPriv->offscreenArea = area;
+
+ if(!infoRec->dgaSaves) { /* save pixmap cache state */
+ SavedCacheStatePtr state = malloc(sizeof(SavedCacheState));
+
+ state->UsingPixmapCache = infoRec->UsingPixmapCache;
+ state->CanDoColor8x8 = infoRec->CanDoColor8x8;
+ state->CanDoMono8x8 = infoRec->CanDoMono8x8;
+ infoRec->dgaSaves = (char*)state;
+
+ infoRec->UsingPixmapCache = FALSE;
+ if(infoRec->PixmapCacheFlags & CACHE_MONO_8x8)
+ infoRec->CanDoMono8x8 = FALSE;
+ if(infoRec->PixmapCacheFlags & CACHE_COLOR_8x8)
+ infoRec->CanDoColor8x8 = FALSE;
+ }
+ }
+ }
+
+ return ret;
+}
+
+
+
+static void
+XAAEnableDisableFBAccess (int index, Bool enable)
+{
+ ScreenPtr pScreen = screenInfo.screens[index];
+ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
+ XAAScreenPtr pScreenPriv =
+ (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
+
+ if(!enable) {
+ if((infoRec->Flags & OFFSCREEN_PIXMAPS) && (infoRec->OffscreenPixmaps))
+ XAAMoveOutOffscreenPixmaps(pScreen);
+ if(infoRec->Flags & PIXMAP_CACHE)
+ XAAInvalidatePixmapCache(pScreen);
+ SwitchedOut = TRUE;
+ }
+
+ (*pScreenPriv->EnableDisableFBAccess)(index, enable);
+
+ if(enable) {
+ if((infoRec->Flags & OFFSCREEN_PIXMAPS) && (infoRec->OffscreenPixmaps))
+ XAAMoveInOffscreenPixmaps(pScreen);
+ SwitchedOut = FALSE;
+ }
+}
diff --git a/xorg-server/hw/xnest/Pixmap.c b/xorg-server/hw/xnest/Pixmap.c
index c901db19f..efb2774d3 100644
--- a/xorg-server/hw/xnest/Pixmap.c
+++ b/xorg-server/hw/xnest/Pixmap.c
@@ -1,136 +1,136 @@
-/*
-
-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 "regionstr.h"
-#include "pixmapstr.h"
-#include "scrnintstr.h"
-#include "regionstr.h"
-#include "gc.h"
-#include "servermd.h"
-#include "privates.h"
-#include "mi.h"
-
-#include "Xnest.h"
-
-#include "Display.h"
-#include "Screen.h"
-#include "XNPixmap.h"
-
-DevPrivateKeyRec xnestPixmapPrivateKeyRec;
-
-PixmapPtr
-xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
- unsigned class)
-{
- PixmapPtr pPixmap;
-
- pPixmap = AllocatePixmap(pScreen, 0);
- if (!pPixmap)
- return NullPixmap;
- pPixmap->drawable.type = DRAWABLE_PIXMAP;
- pPixmap->drawable.class = class;
- pPixmap->drawable.depth = depth;
- pPixmap->drawable.bitsPerPixel = depth;
- pPixmap->drawable.id = 0;
- pPixmap->drawable.x = 0;
- pPixmap->drawable.y = 0;
- pPixmap->drawable.width = width;
- pPixmap->drawable.height = height;
- pPixmap->drawable.pScreen = pScreen;
- pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
- pPixmap->refcnt = 1;
- pPixmap->devKind = PixmapBytePad(width, depth);
- if (width && height)
- xnestPixmapPriv(pPixmap)->pixmap =
- XCreatePixmap(xnestDisplay,
- xnestDefaultWindows[pScreen->myNum],
- width, height, depth);
- else
- xnestPixmapPriv(pPixmap)->pixmap = 0;
-
- return pPixmap;
-}
-
-Bool
-xnestDestroyPixmap(PixmapPtr pPixmap)
-{
- if(--pPixmap->refcnt)
- return TRUE;
- XFreePixmap(xnestDisplay, xnestPixmap(pPixmap));
- FreePixmap(pPixmap);
- return TRUE;
-}
-
-RegionPtr
-xnestPixmapToRegion(PixmapPtr pPixmap)
-{
- XImage *ximage;
- register RegionPtr pReg, pTmpReg;
- register int x, y;
- unsigned long previousPixel, currentPixel;
- BoxRec Box = { 0, 0, 0, 0 };
- Bool overlap;
-
- ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0,
- pPixmap->drawable.width, pPixmap->drawable.height,
- 1, XYPixmap);
-
- pReg = RegionCreate(NULL, 1);
- pTmpReg = RegionCreate(NULL, 1);
- if(!pReg || !pTmpReg) {
- XDestroyImage(ximage);
- return NullRegion;
- }
-
- for (y = 0; y < pPixmap->drawable.height; y++) {
- Box.y1 = y;
- Box.y2 = y + 1;
- previousPixel = 0L;
- for (x = 0; x < pPixmap->drawable.width; x++) {
- currentPixel = XGetPixel(ximage, x, y);
- if (previousPixel != currentPixel) {
- if (previousPixel == 0L) {
- /* left edge */
- Box.x1 = x;
- }
- else if (currentPixel == 0L) {
- /* right edge */
- Box.x2 = x;
- RegionReset(pTmpReg, &Box);
- RegionAppend(pReg, pTmpReg);
- }
- previousPixel = currentPixel;
- }
- }
- if (previousPixel != 0L) {
- /* right edge because of the end of pixmap */
- Box.x2 = pPixmap->drawable.width;
- RegionReset(pTmpReg, &Box);
- RegionAppend(pReg, pTmpReg);
- }
- }
-
- RegionDestroy(pTmpReg);
- XDestroyImage(ximage);
-
- RegionValidate(pReg, &overlap);
-
- return pReg;
-}
+/*
+
+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 "regionstr.h"
+#include "pixmapstr.h"
+#include "scrnintstr.h"
+#include "regionstr.h"
+#include "gc.h"
+#include "servermd.h"
+#include "privates.h"
+#include "mi.h"
+
+#include "Xnest.h"
+
+#include "Display.h"
+#include "Screen.h"
+#include "XNPixmap.h"
+
+DevPrivateKeyRec xnestPixmapPrivateKeyRec;
+
+PixmapPtr
+xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
+ unsigned class)
+{
+ PixmapPtr pPixmap;
+
+ pPixmap = AllocatePixmap(pScreen, 0);
+ if (!pPixmap)
+ return NullPixmap;
+ pPixmap->drawable.type = DRAWABLE_PIXMAP;
+ pPixmap->drawable.class = class;
+ pPixmap->drawable.depth = depth;
+ pPixmap->drawable.bitsPerPixel = depth;
+ pPixmap->drawable.id = 0;
+ pPixmap->drawable.x = 0;
+ pPixmap->drawable.y = 0;
+ pPixmap->drawable.width = width;
+ pPixmap->drawable.height = height;
+ pPixmap->drawable.pScreen = pScreen;
+ pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+ pPixmap->refcnt = 1;
+ pPixmap->devKind = PixmapBytePad(width, depth);
+ if (width && height)
+ xnestPixmapPriv(pPixmap)->pixmap =
+ XCreatePixmap(xnestDisplay,
+ xnestDefaultWindows[pScreen->myNum],
+ width, height, depth);
+ else
+ xnestPixmapPriv(pPixmap)->pixmap = 0;
+
+ return pPixmap;
+}
+
+Bool
+xnestDestroyPixmap(PixmapPtr pPixmap)
+{
+ if(--pPixmap->refcnt)
+ return TRUE;
+ XFreePixmap(xnestDisplay, xnestPixmap(pPixmap));
+ FreePixmap(pPixmap);
+ return TRUE;
+}
+
+RegionPtr
+xnestPixmapToRegion(PixmapPtr pPixmap)
+{
+ XImage *ximage;
+ register RegionPtr pReg, pTmpReg;
+ register int x, y;
+ unsigned long previousPixel, currentPixel;
+ BoxRec Box = { 0, 0, 0, 0 };
+ Bool overlap;
+
+ ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0,
+ pPixmap->drawable.width, pPixmap->drawable.height,
+ 1, XYPixmap);
+
+ pReg = RegionCreate(NULL, 1);
+ pTmpReg = RegionCreate(NULL, 1);
+ if(!pReg || !pTmpReg) {
+ XDestroyImage(ximage);
+ return NullRegion;
+ }
+
+ for (y = 0; y < pPixmap->drawable.height; y++) {
+ Box.y1 = y;
+ Box.y2 = y + 1;
+ previousPixel = 0L;
+ for (x = 0; x < pPixmap->drawable.width; x++) {
+ currentPixel = XGetPixel(ximage, x, y);
+ if (previousPixel != currentPixel) {
+ if (previousPixel == 0L) {
+ /* left edge */
+ Box.x1 = x;
+ }
+ else if (currentPixel == 0L) {
+ /* right edge */
+ Box.x2 = x;
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
+ }
+ previousPixel = currentPixel;
+ }
+ }
+ if (previousPixel != 0L) {
+ /* right edge because of the end of pixmap */
+ Box.x2 = pPixmap->drawable.width;
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
+ }
+ }
+
+ RegionDestroy(pTmpReg);
+ XDestroyImage(ximage);
+
+ RegionValidate(pReg, &overlap);
+
+ return pReg;
+}
diff --git a/xorg-server/hw/xnest/XNPixmap.h b/xorg-server/hw/xnest/XNPixmap.h
index 638a43a1a..c9223e5ce 100644
--- a/xorg-server/hw/xnest/XNPixmap.h
+++ b/xorg-server/hw/xnest/XNPixmap.h
@@ -1,37 +1,37 @@
-/*
-
-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.
-
-*/
-
-#ifndef XNESTPIXMAP_H
-#define XNESTPIXMAP_H
-
-extern DevPrivateKeyRec xnestPixmapPrivateKeyRec;
-#define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec)
-
-typedef struct {
- Pixmap pixmap;
-} xnestPrivPixmap;
-
-#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \
- dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey))
-
-#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
-
-#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)
-
-PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height,
- int depth, unsigned class);
-Bool xnestDestroyPixmap(PixmapPtr pPixmap);
-RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap);
-
-#endif /* XNESTPIXMAP_H */
+/*
+
+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.
+
+*/
+
+#ifndef XNESTPIXMAP_H
+#define XNESTPIXMAP_H
+
+extern DevPrivateKeyRec xnestPixmapPrivateKeyRec;
+#define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec)
+
+typedef struct {
+ Pixmap pixmap;
+} xnestPrivPixmap;
+
+#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \
+ dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey))
+
+#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
+
+#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)
+
+PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height,
+ int depth, unsigned class);
+Bool xnestDestroyPixmap(PixmapPtr pPixmap);
+RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap);
+
+#endif /* XNESTPIXMAP_H */
diff --git a/xorg-server/hw/xquartz/X11Application.h b/xorg-server/hw/xquartz/X11Application.h
index 256ff187a..b7fb0a8ec 100644
--- a/xorg-server/hw/xquartz/X11Application.h
+++ b/xorg-server/hw/xquartz/X11Application.h
@@ -1,112 +1,112 @@
-/* X11Application.h -- subclass of NSApplication to multiplex events
-
- Copyright (c) 2002-2007 Apple Inc. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
- HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-
- Except as contained in this notice, the name(s) of the above
- copyright holders shall not be used in advertising or otherwise to
- promote the sale, use or other dealings in this Software without
- prior written authorization. */
-
-#ifndef X11APPLICATION_H
-#define X11APPLICATION_H 1
-
-#if __OBJC__
-
-#import "X11Controller.h"
-
-@interface X11Application : NSApplication {
- X11Controller *_controller;
-
- unsigned int _x_active :1;
-}
-
-- (void) set_controller:controller;
-- (void) set_window_menu:(NSArray *)list;
-
-- (int) prefs_get_integer:(NSString *)key default:(int)def;
-- (const char *) prefs_get_string:(NSString *)key default:(const char *)def;
-- (float) prefs_get_float:(NSString *)key default:(float)def;
-- (int) prefs_get_boolean:(NSString *)key default:(int)def;
-- (NSURL *) prefs_copy_url:(NSString *)key default:(NSURL *)def;
-- (NSArray *) prefs_get_array:(NSString *)key;
-- (void) prefs_set_integer:(NSString *)key value:(int)value;
-- (void) prefs_set_float:(NSString *)key value:(float)value;
-- (void) prefs_set_boolean:(NSString *)key value:(int)value;
-- (void) prefs_set_array:(NSString *)key value:(NSArray *)value;
-- (void) prefs_set_string:(NSString *)key value:(NSString *)value;
-- (void) prefs_synchronize;
-
-- (X11Controller *) controller;
-- (OSX_BOOL) x_active;
-@end
-
-extern X11Application *X11App;
-
-#endif /* __OBJC__ */
-
-void X11ApplicationSetWindowMenu (int nitems, const char **items,
- const char *shortcuts);
-void X11ApplicationSetWindowMenuCheck (int idx);
-void X11ApplicationSetFrontProcess (void);
-void X11ApplicationSetCanQuit (int state);
-void X11ApplicationServerReady (void);
-void X11ApplicationShowHideMenubar (int state);
-void X11ApplicationLaunchClient (const char *cmd);
-
-Bool X11ApplicationCanEnterRandR (void);
-
-void X11ApplicationMain(int argc, char **argv, char **envp);
-
-#define PREFS_APPSMENU "apps_menu"
-#define PREFS_FAKEBUTTONS "enable_fake_buttons"
-#define PREFS_KEYEQUIVS "enable_key_equivalents"
-#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys"
-#define PREFS_FULLSCREEN_MENU "fullscreen_menu"
-#define PREFS_SYNC_KEYMAP "sync_keymap"
-#define PREFS_DEPTH "depth"
-#define PREFS_NO_AUTH "no_auth"
-#define PREFS_NO_TCP "nolisten_tcp"
-#define PREFS_DONE_XINIT_CHECK "done_xinit_check"
-#define PREFS_NO_QUIT_ALERT "no_quit_alert"
-#define PREFS_NO_RANDR_ALERT "no_randr_alert"
-#define PREFS_OPTION_SENDS_ALT "option_sends_alt"
-#define PREFS_FAKE_BUTTON2 "fake_button2"
-#define PREFS_FAKE_BUTTON3 "fake_button3"
-#define PREFS_APPKIT_MODIFIERS "appkit_modifiers"
-#define PREFS_WINDOW_ITEM_MODIFIERS "window_item_modifiers"
-#define PREFS_ROOTLESS "rootless"
-#define PREFS_TEST_EXTENSIONS "enable_test_extensions"
-#define PREFS_XP_OPTIONS "xp_options"
-#define PREFS_LOGIN_SHELL "login_shell"
-#define PREFS_UPDATE_FEED "update_feed"
-#define PREFS_CLICK_THROUGH "wm_click_through"
-#define PREFS_FFM "wm_ffm"
-#define PREFS_FOCUS_ON_NEW_WINDOW "wm_focus_on_new_window"
-
-#define PREFS_SYNC_PB "sync_pasteboard"
-#define PREFS_SYNC_PB_TO_CLIPBOARD "sync_pasteboard_to_clipboard"
-#define PREFS_SYNC_PB_TO_PRIMARY "sync_pasteboard_to_primary"
-#define PREFS_SYNC_CLIPBOARD_TO_PB "sync_clipboard_to_pasteboard"
-#define PREFS_SYNC_PRIMARY_ON_SELECT "sync_primary_on_select"
-
-#endif /* X11APPLICATION_H */
+/* X11Application.h -- subclass of NSApplication to multiplex events
+
+ Copyright (c) 2002-2007 Apple Inc. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software without
+ prior written authorization. */
+
+#ifndef X11APPLICATION_H
+#define X11APPLICATION_H 1
+
+#if __OBJC__
+
+#import "X11Controller.h"
+
+@interface X11Application : NSApplication {
+ X11Controller *_controller;
+
+ unsigned int _x_active :1;
+}
+
+- (void) set_controller:controller;
+- (void) set_window_menu:(NSArray *)list;
+
+- (int) prefs_get_integer:(NSString *)key default:(int)def;
+- (const char *) prefs_get_string:(NSString *)key default:(const char *)def;
+- (float) prefs_get_float:(NSString *)key default:(float)def;
+- (int) prefs_get_boolean:(NSString *)key default:(int)def;
+- (NSURL *) prefs_copy_url:(NSString *)key default:(NSURL *)def;
+- (NSArray *) prefs_get_array:(NSString *)key;
+- (void) prefs_set_integer:(NSString *)key value:(int)value;
+- (void) prefs_set_float:(NSString *)key value:(float)value;
+- (void) prefs_set_boolean:(NSString *)key value:(int)value;
+- (void) prefs_set_array:(NSString *)key value:(NSArray *)value;
+- (void) prefs_set_string:(NSString *)key value:(NSString *)value;
+- (void) prefs_synchronize;
+
+- (X11Controller *) controller;
+- (OSX_BOOL) x_active;
+@end
+
+extern X11Application *X11App;
+
+#endif /* __OBJC__ */
+
+void X11ApplicationSetWindowMenu (int nitems, const char **items,
+ const char *shortcuts);
+void X11ApplicationSetWindowMenuCheck (int idx);
+void X11ApplicationSetFrontProcess (void);
+void X11ApplicationSetCanQuit (int state);
+void X11ApplicationServerReady (void);
+void X11ApplicationShowHideMenubar (int state);
+void X11ApplicationLaunchClient (const char *cmd);
+
+Bool X11ApplicationCanEnterRandR (void);
+
+void X11ApplicationMain(int argc, char **argv, char **envp);
+
+#define PREFS_APPSMENU "apps_menu"
+#define PREFS_FAKEBUTTONS "enable_fake_buttons"
+#define PREFS_KEYEQUIVS "enable_key_equivalents"
+#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys"
+#define PREFS_FULLSCREEN_MENU "fullscreen_menu"
+#define PREFS_SYNC_KEYMAP "sync_keymap"
+#define PREFS_DEPTH "depth"
+#define PREFS_NO_AUTH "no_auth"
+#define PREFS_NO_TCP "nolisten_tcp"
+#define PREFS_DONE_XINIT_CHECK "done_xinit_check"
+#define PREFS_NO_QUIT_ALERT "no_quit_alert"
+#define PREFS_NO_RANDR_ALERT "no_randr_alert"
+#define PREFS_OPTION_SENDS_ALT "option_sends_alt"
+#define PREFS_FAKE_BUTTON2 "fake_button2"
+#define PREFS_FAKE_BUTTON3 "fake_button3"
+#define PREFS_APPKIT_MODIFIERS "appkit_modifiers"
+#define PREFS_WINDOW_ITEM_MODIFIERS "window_item_modifiers"
+#define PREFS_ROOTLESS "rootless"
+#define PREFS_TEST_EXTENSIONS "enable_test_extensions"
+#define PREFS_XP_OPTIONS "xp_options"
+#define PREFS_LOGIN_SHELL "login_shell"
+#define PREFS_UPDATE_FEED "update_feed"
+#define PREFS_CLICK_THROUGH "wm_click_through"
+#define PREFS_FFM "wm_ffm"
+#define PREFS_FOCUS_ON_NEW_WINDOW "wm_focus_on_new_window"
+
+#define PREFS_SYNC_PB "sync_pasteboard"
+#define PREFS_SYNC_PB_TO_CLIPBOARD "sync_pasteboard_to_clipboard"
+#define PREFS_SYNC_PB_TO_PRIMARY "sync_pasteboard_to_primary"
+#define PREFS_SYNC_CLIPBOARD_TO_PB "sync_clipboard_to_pasteboard"
+#define PREFS_SYNC_PRIMARY_ON_SELECT "sync_primary_on_select"
+
+#endif /* X11APPLICATION_H */
diff --git a/xorg-server/hw/xquartz/X11Application.m b/xorg-server/hw/xquartz/X11Application.m
index 3521517a2..2dd3bd36c 100644
--- a/xorg-server/hw/xquartz/X11Application.m
+++ b/xorg-server/hw/xquartz/X11Application.m
@@ -1,1349 +1,1349 @@
-/* X11Application.m -- subclass of NSApplication to multiplex events
-
- Copyright (c) 2002-2008 Apple Inc.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
- HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-
- Except as contained in this notice, the name(s) of the above
- copyright holders shall not be used in advertising or otherwise to
- promote the sale, use or other dealings in this Software without
- prior written authorization. */
-
-#include "sanitizedCarbon.h"
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "quartzCommon.h"
-
-#import "X11Application.h"
-
-#include "darwin.h"
-#include "quartz.h"
-#include "darwinEvents.h"
-#include "quartzKeyboard.h"
-#include "quartz.h"
-#include <X11/extensions/applewmconst.h>
-#include "micmap.h"
-#include "exglobals.h"
-
-#include <mach/mach.h>
-#include <unistd.h>
-#include <AvailabilityMacros.h>
-
-#include <Xplugin.h>
-
-// pbproxy/pbproxy.h
-extern int xpbproxy_run (void);
-
-#define DEFAULTS_FILE X11LIBDIR"/X11/xserver/Xquartz.plist"
-
-#ifndef XSERVER_VERSION
-#define XSERVER_VERSION "?"
-#endif
-
-/* Stuck modifier / button state... force release when we context switch */
-static NSEventType keyState[NUM_KEYCODES];
-
-extern Bool noTestExtensions;
-
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
-static TISInputSourceRef last_key_layout;
-#else
-static KeyboardLayoutRef last_key_layout;
-#endif
-
-extern int darwinFakeButtons;
-
-/* Store the mouse location while in the background, and update X11's pointer
- * location when we become the foreground application
- */
-static NSPoint bgMouseLocation;
-static BOOL bgMouseLocationUpdated = FALSE;
-
-X11Application *X11App;
-
-CFStringRef app_prefs_domain_cfstr = NULL;
-
-#define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask | NSCommandKeyMask)
-
-@interface X11Application (Private)
-- (void) sendX11NSEvent:(NSEvent *)e;
-@end
-
-@implementation X11Application
-
-typedef struct message_struct message;
-struct message_struct {
- mach_msg_header_t hdr;
- SEL selector;
- NSObject *arg;
-};
-
-static mach_port_t _port;
-
-/* Quartz mode initialization routine. This is often dynamically loaded
- but is statically linked into this X server. */
-Bool QuartzModeBundleInit(void);
-
-static void init_ports (void) {
- kern_return_t r;
- NSPort *p;
-
- if (_port != MACH_PORT_NULL) return;
-
- r = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &_port);
- if (r != KERN_SUCCESS) return;
-
- p = [NSMachPort portWithMachPort:_port];
- [p setDelegate:NSApp];
- [p scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
-}
-
-static void message_kit_thread (SEL selector, NSObject *arg) {
- message msg;
- kern_return_t r;
-
- msg.hdr.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_MAKE_SEND, 0);
- msg.hdr.msgh_size = sizeof (msg);
- msg.hdr.msgh_remote_port = _port;
- msg.hdr.msgh_local_port = MACH_PORT_NULL;
- msg.hdr.msgh_reserved = 0;
- msg.hdr.msgh_id = 0;
-
- msg.selector = selector;
- msg.arg = [arg retain];
-
- r = mach_msg (&msg.hdr, MACH_SEND_MSG, msg.hdr.msgh_size,
- 0, MACH_PORT_NULL, 0, MACH_PORT_NULL);
- if (r != KERN_SUCCESS)
- ErrorF("%s: mach_msg failed: %x\n", __FUNCTION__, r);
-}
-
-- (void) handleMachMessage:(void *)_msg {
- message *msg = _msg;
-
- [self performSelector:msg->selector withObject:msg->arg];
- [msg->arg release];
-}
-
-- (void) set_controller:obj {
- if (_controller == nil) _controller = [obj retain];
-}
-
-- (void) dealloc {
- if (_controller != nil) [_controller release];
-
- if (_port != MACH_PORT_NULL)
- mach_port_deallocate (mach_task_self (), _port);
-
- [super dealloc];
-}
-
-- (void) orderFrontStandardAboutPanel: (id) sender {
- NSMutableDictionary *dict;
- NSDictionary *infoDict;
- NSString *tem;
-
- dict = [NSMutableDictionary dictionaryWithCapacity:3];
- infoDict = [[NSBundle mainBundle] infoDictionary];
-
- [dict setObject: NSLocalizedString (@"The X Window System", @"About panel")
- forKey:@"ApplicationName"];
-
- tem = [infoDict objectForKey:@"CFBundleShortVersionString"];
-
- [dict setObject:[NSString stringWithFormat:@"XQuartz %@", tem]
- forKey:@"ApplicationVersion"];
-
- [dict setObject:[NSString stringWithFormat:@"xorg-server %s", XSERVER_VERSION]
- forKey:@"Version"];
-
- [self orderFrontStandardAboutPanelWithOptions: dict];
-}
-
-- (void) activateX:(OSX_BOOL)state {
- size_t i;
- DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active)
- if (state) {
- if(bgMouseLocationUpdated) {
- DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, bgMouseLocation.x, bgMouseLocation.y, 0.0, 0.0, 0.0);
- bgMouseLocationUpdated = FALSE;
- }
- DarwinSendDDXEvent(kXquartzActivate, 0);
- } else {
-
- if(darwin_all_modifier_flags)
- DarwinUpdateModKeys(0);
- for(i=0; i < NUM_KEYCODES; i++) {
- if(keyState[i] == NSKeyDown) {
- DarwinSendKeyboardEvents(KeyRelease, i);
- keyState[i] = NSKeyUp;
- }
- }
-
- DarwinSendDDXEvent(kXquartzDeactivate, 0);
- }
-
- _x_active = state;
-}
-
-- (void) became_key:(NSWindow *)win {
- [self activateX:NO];
-}
-
-- (void) sendEvent:(NSEvent *)e {
- OSX_BOOL for_appkit, for_x;
-
- /* By default pass down the responder chain and to X. */
- for_appkit = YES;
- for_x = YES;
-
- switch ([e type]) {
- case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
- case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
- if ([e window] != nil) {
- /* Pointer event has an (AppKit) window. Probably something for the kit. */
- for_x = NO;
- if (_x_active) [self activateX:NO];
- } else if ([self modalWindow] == nil) {
- /* Must be an X window. Tell appkit it doesn't have focus. */
- for_appkit = NO;
-
- if ([self isActive]) {
- [self deactivate];
- if (!_x_active && quartzProcs->IsX11Window([e window],
- [e windowNumber]))
- [self activateX:YES];
- }
- }
-
- /* We want to force sending to appkit if we're over the menu bar */
- if(!for_appkit) {
- NSPoint NSlocation = [e locationInWindow];
- NSWindow *window = [e window];
- NSRect NSframe, NSvisibleFrame;
- CGRect CGframe, CGvisibleFrame;
- CGPoint CGlocation;
-
- if (window != nil) {
- NSRect frame = [window frame];
- NSlocation.x += frame.origin.x;
- NSlocation.y += frame.origin.y;
- }
-
- NSframe = [[NSScreen mainScreen] frame];
- NSvisibleFrame = [[NSScreen mainScreen] visibleFrame];
-
- CGframe = CGRectMake(NSframe.origin.x, NSframe.origin.y,
- NSframe.size.width, NSframe.size.height);
- CGvisibleFrame = CGRectMake(NSvisibleFrame.origin.x,
- NSvisibleFrame.origin.y,
- NSvisibleFrame.size.width,
- NSvisibleFrame.size.height);
- CGlocation = CGPointMake(NSlocation.x, NSlocation.y);
-
- if(CGRectContainsPoint(CGframe, CGlocation) &&
- !CGRectContainsPoint(CGvisibleFrame, CGlocation))
- for_appkit = YES;
- }
-
- break;
-
- case NSKeyDown: case NSKeyUp:
-
- if(_x_active) {
- static BOOL do_swallow = NO;
- static int swallow_keycode;
-
- if([e type] == NSKeyDown) {
- /* Before that though, see if there are any global
- * shortcuts bound to it. */
-
- if(darwinAppKitModMask & [e modifierFlags]) {
- /* Override to force sending to Appkit */
- swallow_keycode = [e keyCode];
- do_swallow = YES;
- for_x = NO;
-#if XPLUGIN_VERSION >= 1
- } else if(XQuartzEnableKeyEquivalents &&
- xp_is_symbolic_hotkey_event([e eventRef])) {
- swallow_keycode = [e keyCode];
- do_swallow = YES;
- for_x = NO;
-#endif
- } else if(XQuartzEnableKeyEquivalents &&
- [[self mainMenu] performKeyEquivalent:e]) {
- swallow_keycode = [e keyCode];
- do_swallow = YES;
- for_appkit = NO;
- for_x = NO;
- } else if(!XQuartzIsRootless
- && ([e modifierFlags] & ALL_KEY_MASKS) == (NSCommandKeyMask | NSAlternateKeyMask)
- && ([e keyCode] == 0 /*a*/ || [e keyCode] == 53 /*Esc*/)) {
- /* We have this here to force processing fullscreen
- * toggle even if XQuartzEnableKeyEquivalents is disabled */
- swallow_keycode = [e keyCode];
- do_swallow = YES;
- for_x = NO;
- for_appkit = NO;
- DarwinSendDDXEvent(kXquartzToggleFullscreen, 0);
- } else {
- /* No kit window is focused, so send it to X. */
- for_appkit = NO;
- }
- } else { /* KeyUp */
- /* If we saw a key equivalent on the down, don't pass
- * the up through to X. */
- if (do_swallow && [e keyCode] == swallow_keycode) {
- do_swallow = NO;
- for_x = NO;
- }
- }
- } else { /* !_x_active */
- for_x = NO;
- }
- break;
-
- case NSFlagsChanged:
- /* Don't tell X11 about modifiers changing while it's not active */
- if (!_x_active)
- for_x = NO;
- break;
-
- case NSAppKitDefined:
- switch ([e subtype]) {
- case NSApplicationActivatedEventType:
- for_x = NO;
- if ([self modalWindow] == nil) {
- BOOL order_all_windows = YES, workspaces, ok;
- for_appkit = NO;
-
- /* FIXME: hack to avoid having to pass the event to appkit,
- which would cause it to raise one of its windows. */
- _appFlags._active = YES;
-
- [self activateX:YES];
-
- /* Get the Spaces preference for SwitchOnActivate */
- (void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock"));
- workspaces = CFPreferencesGetAppBooleanValue(CFSTR("workspaces"), CFSTR("com.apple.dock"), &ok);
- if (!ok)
- workspaces = NO;
-
- if (workspaces) {
- (void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences"));
- order_all_windows = CFPreferencesGetAppBooleanValue(CFSTR("AppleSpacesSwitchOnActivate"), CFSTR(".GlobalPreferences"), &ok);
- if (!ok)
- order_all_windows = YES;
- }
-
- /* TODO: In the workspaces && !AppleSpacesSwitchOnActivate case, the windows are ordered
- * correctly, but we need to activate the top window on this space if there is
- * none active.
- *
- * If there are no active windows, and there are minimized windows, we should
- * be restoring one of them.
- */
- if ([e data2] & 0x10) // 0x10 is set when we use cmd-tab or the dock icon
- DarwinSendDDXEvent(kXquartzBringAllToFront, 1, order_all_windows);
- }
- break;
-
- case 18: /* ApplicationDidReactivate */
- if (XQuartzFullscreenVisible) for_appkit = NO;
- break;
-
- case NSApplicationDeactivatedEventType:
- for_x = NO;
- [self activateX:NO];
- break;
- }
- break;
-
- default: break; /* for gcc */
- }
-
- if (for_appkit) [super sendEvent:e];
-
- if (for_x) [self sendX11NSEvent:e];
-}
-
-- (void) set_window_menu:(NSArray *)list {
- [_controller set_window_menu:list];
-}
-
-- (void) set_window_menu_check:(NSNumber *)n {
- [_controller set_window_menu_check:n];
-}
-
-- (void) set_apps_menu:(NSArray *)list {
- [_controller set_apps_menu:list];
-}
-
-- (void) set_front_process:unused {
- [NSApp activateIgnoringOtherApps:YES];
-
- if ([self modalWindow] == nil)
- [self activateX:YES];
-}
-
-- (void) set_can_quit:(NSNumber *)state {
- [_controller set_can_quit:[state boolValue]];
-}
-
-- (void) server_ready:unused {
- [_controller server_ready];
-}
-
-- (void) show_hide_menubar:(NSNumber *)state {
- /* Also shows/hides the dock */
- if ([state boolValue])
- SetSystemUIMode(kUIModeNormal, 0);
- else
- SetSystemUIMode(kUIModeAllHidden, XQuartzFullscreenMenu ? kUIOptionAutoShowMenuBar : 0); // kUIModeAllSuppressed or kUIOptionAutoShowMenuBar can be used to allow "mouse-activation"
-}
-
-- (void) launch_client:(NSString *)cmd {
- (void)[_controller application:self openFile:cmd];
-}
-
-/* user preferences */
-
-/* Note that these functions only work for arrays whose elements
- can be toll-free-bridged between NS and CF worlds. */
-
-static const void *cfretain (CFAllocatorRef a, const void *b) {
- return CFRetain (b);
-}
-
-static void cfrelease (CFAllocatorRef a, const void *b) {
- CFRelease (b);
-}
-
-static CFMutableArrayRef nsarray_to_cfarray (NSArray *in) {
- CFMutableArrayRef out;
- CFArrayCallBacks cb;
- NSObject *ns;
- const CFTypeRef *cf;
- int i, count;
-
- memset (&cb, 0, sizeof (cb));
- cb.version = 0;
- cb.retain = cfretain;
- cb.release = cfrelease;
-
- count = [in count];
- out = CFArrayCreateMutable (NULL, count, &cb);
-
- for (i = 0; i < count; i++) {
- ns = [in objectAtIndex:i];
-
- if ([ns isKindOfClass:[NSArray class]])
- cf = (CFTypeRef) nsarray_to_cfarray ((NSArray *) ns);
- else
- cf = CFRetain ((CFTypeRef) ns);
-
- CFArrayAppendValue (out, cf);
- CFRelease (cf);
- }
-
- return out;
-}
-
-static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
- NSMutableArray *out;
- const CFTypeRef *cf;
- NSObject *ns;
- int i, count;
-
- count = CFArrayGetCount (in);
- out = [[NSMutableArray alloc] initWithCapacity:count];
-
- for (i = 0; i < count; i++) {
- cf = CFArrayGetValueAtIndex (in, i);
-
- if (CFGetTypeID (cf) == CFArrayGetTypeID ())
- ns = cfarray_to_nsarray ((CFArrayRef) cf);
- else
- ns = [(id)cf retain];
-
- [out addObject:ns];
- [ns release];
- }
-
- return out;
-}
-
-- (CFPropertyListRef) prefs_get_copy:(NSString *)key {
- CFPropertyListRef value;
-
- value = CFPreferencesCopyAppValue ((CFStringRef) key, app_prefs_domain_cfstr);
-
- if (value == NULL) {
- static CFDictionaryRef defaults;
-
- if (defaults == NULL) {
- CFStringRef error = NULL;
- CFDataRef data;
- CFURLRef url;
- SInt32 error_code;
-
- url = (CFURLCreateFromFileSystemRepresentation
- (NULL, (unsigned char *)DEFAULTS_FILE, strlen (DEFAULTS_FILE), false));
- if (CFURLCreateDataAndPropertiesFromResource (NULL, url, &data,
- NULL, NULL, &error_code)) {
- defaults = (CFPropertyListCreateFromXMLData
- (NULL, data, kCFPropertyListMutableContainersAndLeaves, &error));
- if (error != NULL) CFRelease (error);
- CFRelease (data);
- }
- CFRelease (url);
-
- if (defaults != NULL) {
- NSMutableArray *apps, *elt;
- int count, i;
- NSString *name, *nname;
-
- /* Localize the names in the default apps menu. */
-
- apps = [(NSDictionary *)defaults objectForKey:@PREFS_APPSMENU];
- if (apps != nil) {
- count = [apps count];
- for (i = 0; i < count; i++) {
- elt = [apps objectAtIndex:i];
- if (elt != nil && [elt isKindOfClass:[NSArray class]]) {
- name = [elt objectAtIndex:0];
- if (name != nil) {
- nname = NSLocalizedString (name, nil);
- if (nname != nil && nname != name)
- [elt replaceObjectAtIndex:0 withObject:nname];
- }
- }
- }
- }
- }
- }
-
- if (defaults != NULL) value = CFDictionaryGetValue (defaults, key);
- if (value != NULL) CFRetain (value);
- }
-
- return value;
-}
-
-- (int) prefs_get_integer:(NSString *)key default:(int)def {
- CFPropertyListRef value;
- int ret;
-
- value = [self prefs_get_copy:key];
-
- if (value != NULL && CFGetTypeID (value) == CFNumberGetTypeID ())
- CFNumberGetValue (value, kCFNumberIntType, &ret);
- else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
- ret = CFStringGetIntValue (value);
- else
- ret = def;
-
- if (value != NULL) CFRelease (value);
-
- return ret;
-}
-
-- (const char *) prefs_get_string:(NSString *)key default:(const char *)def {
- CFPropertyListRef value;
- const char *ret = NULL;
-
- value = [self prefs_get_copy:key];
-
- if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) {
- NSString *s = (NSString *) value;
-
- ret = [s UTF8String];
- }
-
- if (value != NULL) CFRelease (value);
-
- return ret != NULL ? ret : def;
-}
-
-- (NSURL *) prefs_copy_url:(NSString *)key default:(NSURL *)def {
- CFPropertyListRef value;
- NSURL *ret = NULL;
-
- value = [self prefs_get_copy:key];
-
- if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) {
- NSString *s = (NSString *) value;
-
- ret = [NSURL URLWithString:s];
- [ret retain];
- }
-
- if (value != NULL) CFRelease (value);
-
- return ret != NULL ? ret : def;
-}
-
-- (float) prefs_get_float:(NSString *)key default:(float)def {
- CFPropertyListRef value;
- float ret = def;
-
- value = [self prefs_get_copy:key];
-
- if (value != NULL
- && CFGetTypeID (value) == CFNumberGetTypeID ()
- && CFNumberIsFloatType (value))
- CFNumberGetValue (value, kCFNumberFloatType, &ret);
- else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
- ret = CFStringGetDoubleValue (value);
-
- if (value != NULL) CFRelease (value);
-
- return ret;
-}
-
-- (int) prefs_get_boolean:(NSString *)key default:(int)def {
- CFPropertyListRef value;
- int ret = def;
-
- value = [self prefs_get_copy:key];
-
- if (value != NULL) {
- if (CFGetTypeID (value) == CFNumberGetTypeID ())
- CFNumberGetValue (value, kCFNumberIntType, &ret);
- else if (CFGetTypeID (value) == CFBooleanGetTypeID ())
- ret = CFBooleanGetValue (value);
- else if (CFGetTypeID (value) == CFStringGetTypeID ()) {
- const char *tem = [(NSString *) value UTF8String];
- if (strcasecmp (tem, "true") == 0 || strcasecmp (tem, "yes") == 0)
- ret = YES;
- else
- ret = NO;
- }
-
- CFRelease (value);
- }
- return ret;
-}
-
-- (NSArray *) prefs_get_array:(NSString *)key {
- NSArray *ret = nil;
- CFPropertyListRef value;
-
- value = [self prefs_get_copy:key];
-
- if (value != NULL) {
- if (CFGetTypeID (value) == CFArrayGetTypeID ())
- ret = [cfarray_to_nsarray (value) autorelease];
-
- CFRelease (value);
- }
-
- return ret;
-}
-
-- (void) prefs_set_integer:(NSString *)key value:(int)value {
- CFNumberRef x;
-
- x = CFNumberCreate (NULL, kCFNumberIntType, &value);
-
- CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, app_prefs_domain_cfstr,
- kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
-
- CFRelease (x);
-}
-
-- (void) prefs_set_float:(NSString *)key value:(float)value {
- CFNumberRef x;
-
- x = CFNumberCreate (NULL, kCFNumberFloatType, &value);
-
- CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, app_prefs_domain_cfstr,
- kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
-
- CFRelease (x);
-}
-
-- (void) prefs_set_boolean:(NSString *)key value:(int)value {
- CFPreferencesSetValue ((CFStringRef) key,
- (CFTypeRef) (value ? kCFBooleanTrue
- : kCFBooleanFalse), app_prefs_domain_cfstr,
- kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
-
-}
-
-- (void) prefs_set_array:(NSString *)key value:(NSArray *)value {
- CFArrayRef cfarray;
-
- cfarray = nsarray_to_cfarray (value);
- CFPreferencesSetValue ((CFStringRef) key,
- (CFTypeRef) cfarray,
- app_prefs_domain_cfstr,
- kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
- CFRelease (cfarray);
-}
-
-- (void) prefs_set_string:(NSString *)key value:(NSString *)value {
- CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) value,
- app_prefs_domain_cfstr, kCFPreferencesCurrentUser,
- kCFPreferencesAnyHost);
-}
-
-- (void) prefs_synchronize {
- CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication);
-}
-
-- (void) read_defaults
-{
- NSString *nsstr;
- const char *tem;
-
- XQuartzRootlessDefault = [self prefs_get_boolean:@PREFS_ROOTLESS
- default:XQuartzRootlessDefault];
- XQuartzFullscreenMenu = [self prefs_get_boolean:@PREFS_FULLSCREEN_MENU
- default:XQuartzFullscreenMenu];
- XQuartzFullscreenDisableHotkeys = ![self prefs_get_boolean:@PREFS_FULLSCREEN_HOTKEYS
- default:!XQuartzFullscreenDisableHotkeys];
- darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS
- default:darwinFakeButtons];
- XQuartzOptionSendsAlt = [self prefs_get_boolean:@PREFS_OPTION_SENDS_ALT
- default:XQuartzOptionSendsAlt];
-
- if (darwinFakeButtons) {
- const char *fake2, *fake3;
-
- fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL];
- fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL];
-
- if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2, TRUE);
- if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3, TRUE);
- }
-
- tem = [self prefs_get_string:@PREFS_APPKIT_MODIFIERS default:NULL];
- if (tem != NULL) darwinAppKitModMask = DarwinParseModifierList(tem, TRUE);
-
- tem = [self prefs_get_string:@PREFS_WINDOW_ITEM_MODIFIERS default:NULL];
- if (tem != NULL) {
- windowItemModMask = DarwinParseModifierList(tem, FALSE);
- } else {
- nsstr = NSLocalizedString (@"window item modifiers", @"window item modifiers");
- if(nsstr != NULL) {
- tem = [nsstr UTF8String];
- if((tem != NULL) && strcmp(tem, "window item modifiers")) {
- windowItemModMask = DarwinParseModifierList(tem, FALSE);
- }
- }
- }
-
- XQuartzEnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
- default:XQuartzEnableKeyEquivalents];
-
- darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP
- default:darwinSyncKeymap];
-
- darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
- default:darwinDesiredDepth];
-
- noTestExtensions = ![self prefs_get_boolean:@PREFS_TEST_EXTENSIONS
- default:FALSE];
-
-#if XQUARTZ_SPARKLE
- NSURL *url = [self prefs_copy_url:@PREFS_UPDATE_FEED default:nil];
- if(url) {
- [[SUUpdater sharedUpdater] setFeedURL:url];
- [url release];
- }
-#endif
-}
-
-/* This will end up at the end of the responder chain. */
-- (void) copy:sender {
- DarwinSendDDXEvent(kXquartzPasteboardNotify, 1,
- AppleWMCopyToPasteboard);
-}
-
-- (X11Controller *) controller {
- return _controller;
-}
-
-- (OSX_BOOL) x_active {
- return _x_active;
-}
-
-@end
-
-static NSArray *
-array_with_strings_and_numbers (int nitems, const char **items,
- const char *numbers) {
- NSMutableArray *array, *subarray;
- NSString *string, *number;
- int i;
-
- /* (Can't autorelease on the X server thread) */
-
- array = [[NSMutableArray alloc] initWithCapacity:nitems];
-
- for (i = 0; i < nitems; i++) {
- subarray = [[NSMutableArray alloc] initWithCapacity:2];
-
- string = [[NSString alloc] initWithUTF8String:items[i]];
- [subarray addObject:string];
- [string release];
-
- if (numbers[i] != 0) {
- number = [[NSString alloc] initWithFormat:@"%d", numbers[i]];
- [subarray addObject:number];
- [number release];
- } else
- [subarray addObject:@""];
-
- [array addObject:subarray];
- [subarray release];
- }
-
- return array;
-}
-
-void X11ApplicationSetWindowMenu (int nitems, const char **items,
- const char *shortcuts) {
- NSArray *array;
- array = array_with_strings_and_numbers (nitems, items, shortcuts);
-
- /* Send the array of strings over to the appkit thread */
-
- message_kit_thread (@selector (set_window_menu:), array);
- [array release];
-}
-
-void X11ApplicationSetWindowMenuCheck (int idx) {
- NSNumber *n;
-
- n = [[NSNumber alloc] initWithInt:idx];
-
- message_kit_thread (@selector (set_window_menu_check:), n);
-
- [n release];
-}
-
-void X11ApplicationSetFrontProcess (void) {
- message_kit_thread (@selector (set_front_process:), nil);
-}
-
-void X11ApplicationSetCanQuit (int state) {
- NSNumber *n;
-
- n = [[NSNumber alloc] initWithBool:state];
-
- message_kit_thread (@selector (set_can_quit:), n);
-
- [n release];
-}
-
-void X11ApplicationServerReady (void) {
- message_kit_thread (@selector (server_ready:), nil);
-}
-
-void X11ApplicationShowHideMenubar (int state) {
- NSNumber *n;
-
- n = [[NSNumber alloc] initWithBool:state];
-
- message_kit_thread (@selector (show_hide_menubar:), n);
-
- [n release];
-}
-
-void X11ApplicationLaunchClient (const char *cmd) {
- NSString *string;
-
- string = [[NSString alloc] initWithUTF8String:cmd];
-
- message_kit_thread (@selector (launch_client:), string);
-
- [string release];
-}
-
-/* This is a special function in that it is run from the *SERVER* thread and
- * not the AppKit thread. We want to block entering a screen-capturing RandR
- * mode until we notify the user about how to get out if the X11 client crashes.
- */
-Bool X11ApplicationCanEnterRandR(void) {
- NSString *title, *msg;
-
- if([X11App prefs_get_boolean:@PREFS_NO_RANDR_ALERT default:NO] || XQuartzShieldingWindowLevel != 0)
- return TRUE;
-
- title = NSLocalizedString(@"Enter RandR mode?", @"Dialog title when switching to RandR");
- msg = NSLocalizedString(@"An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the ⌥⌘A key sequence to force X11 to return to the previous state.",
- @"Dialog when switching to RandR");
-
- if(!XQuartzIsRootless)
- QuartzShowFullscreen(FALSE);
-
- switch(NSRunAlertPanel(title, msg, NSLocalizedString(@"Allow", @""), NSLocalizedString (@"Cancel", @""), NSLocalizedString (@"Always Allow", @""))) {
- case NSAlertOtherReturn:
- [X11App prefs_set_boolean:@PREFS_NO_RANDR_ALERT value:YES];
- [X11App prefs_synchronize];
- case NSAlertDefaultReturn:
- return YES;
-
- default:
- return NO;
- }
-}
-
-static void check_xinitrc (void) {
- char *tem, buf[1024];
- NSString *msg;
-
- if ([X11App prefs_get_boolean:@PREFS_DONE_XINIT_CHECK default:NO])
- return;
-
- tem = getenv ("HOME");
- if (tem == NULL) goto done;
-
- snprintf (buf, sizeof (buf), "%s/.xinitrc", tem);
- if (access (buf, F_OK) != 0)
- goto done;
-
- msg = NSLocalizedString (@"You have an existing ~/.xinitrc file.\n\n\
-Windows displayed by X11 applications may not have titlebars, or may look \
-different to windows displayed by native applications.\n\n\
-Would you like to move aside the existing file and use the standard X11 \
-environment the next time you start X11?", @"Startup xinitrc dialog");
-
- if(NSAlertDefaultReturn == NSRunAlertPanel (nil, msg, NSLocalizedString (@"Yes", @""),
- NSLocalizedString (@"No", @""), nil)) {
- char buf2[1024];
- int i = -1;
-
- snprintf (buf2, sizeof (buf2), "%s.old", buf);
-
- for(i = 1; access (buf2, F_OK) == 0; i++)
- snprintf (buf2, sizeof (buf2), "%s.old.%d", buf, i);
-
- rename (buf, buf2);
- }
-
- done:
- [X11App prefs_set_boolean:@PREFS_DONE_XINIT_CHECK value:YES];
- [X11App prefs_synchronize];
-}
-
-static inline pthread_t create_thread(void *func, void *arg) {
- pthread_attr_t attr;
- pthread_t tid;
-
- pthread_attr_init(&attr);
- pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- pthread_create(&tid, &attr, func, arg);
- pthread_attr_destroy(&attr);
-
- return tid;
-}
-
-static void *xpbproxy_x_thread(void *args) {
- xpbproxy_run();
-
- fprintf(stderr, "xpbproxy thread is terminating unexpectedly.\n");
- return NULL;
-}
-
-void X11ApplicationMain (int argc, char **argv, char **envp) {
- NSAutoreleasePool *pool;
-
-#ifdef DEBUG
- while (access ("/tmp/x11-block", F_OK) == 0) sleep (1);
-#endif
-
- pool = [[NSAutoreleasePool alloc] init];
- X11App = (X11Application *) [X11Application sharedApplication];
- init_ports ();
-
- app_prefs_domain_cfstr = (CFStringRef)[[NSBundle mainBundle] bundleIdentifier];
-
- [NSApp read_defaults];
- [NSBundle loadNibNamed:@"main" owner:NSApp];
- [[NSNotificationCenter defaultCenter] addObserver:NSApp
- selector:@selector (became_key:)
- name:NSWindowDidBecomeKeyNotification object:nil];
-
- /*
- * The xpr Quartz mode is statically linked into this server.
- * Initialize all the Quartz functions.
- */
- QuartzModeBundleInit();
-
- /* Calculate the height of the menubar so we can avoid it. */
- aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
- NSMaxY([[NSScreen mainScreen] visibleFrame]);
-
- /* Set the key layout seed before we start the server */
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
- last_key_layout = TISCopyCurrentKeyboardLayoutInputSource();
-
- if(!last_key_layout)
- fprintf(stderr, "X11ApplicationMain: Unable to determine TISCopyCurrentKeyboardLayoutInputSource() at startup.\n");
-#else
- KLGetCurrentKeyboardLayout(&last_key_layout);
- if(!last_key_layout)
- fprintf(stderr, "X11ApplicationMain: Unable to determine KLGetCurrentKeyboardLayout() at startup.\n");
-#endif
-
- if (!QuartsResyncKeymap(FALSE)) {
- fprintf(stderr, "X11ApplicationMain: Could not build a valid keymap.\n");
- }
-
- /* Tell the server thread that it can proceed */
- QuartzInitServer(argc, argv, envp);
-
- /* This must be done after QuartzInitServer because it can result in
- * an mieqEnqueue() - <rdar://problem/6300249>
- */
- check_xinitrc();
-
- create_thread(xpbproxy_x_thread, NULL);
-
-#if XQUARTZ_SPARKLE
- [[X11App controller] setup_sparkle];
- [[SUUpdater sharedUpdater] resetUpdateCycle];
-// [[SUUpdater sharedUpdater] checkForUpdates:X11App];
-#endif
-
- [pool release];
- [NSApp run];
- /* not reached */
-}
-
-@implementation X11Application (Private)
-
-#ifdef NX_DEVICELCMDKEYMASK
-/* This is to workaround a bug in the VNC server where we sometimes see the L
- * modifier and sometimes see no "side"
- */
-static inline int ensure_flag(int flags, int device_independent, int device_dependents, int device_dependent_default) {
- if( (flags & device_independent) &&
- !(flags & device_dependents))
- flags |= device_dependent_default;
- return flags;
-}
-#endif
-
-#ifdef DEBUG_UNTRUSTED_POINTER_DELTA
-static const char *untrusted_str(NSEvent *e) {
- switch([e type]) {
- case NSScrollWheel:
- return "NSScrollWheel";
- case NSTabletPoint:
- return "NSTabletPoint";
- case NSOtherMouseDown:
- return "NSOtherMouseDown";
- case NSOtherMouseUp:
- return "NSOtherMouseUp";
- case NSLeftMouseDown:
- return "NSLeftMouseDown";
- case NSLeftMouseUp:
- return "NSLeftMouseUp";
- default:
- switch([e subtype]) {
- case NSTabletPointEventSubtype:
- return "NSTabletPointEventSubtype";
- case NSTabletProximityEventSubtype:
- return "NSTabletProximityEventSubtype";
- default:
- return "Other";
- }
- }
-}
-#endif
-
-- (void) sendX11NSEvent:(NSEvent *)e {
- NSPoint location = NSZeroPoint, tilt = NSZeroPoint;
- int ev_button, ev_type;
- float pressure = 0.0;
- DeviceIntPtr pDev;
- int modifierFlags;
- BOOL isMouseOrTabletEvent, isTabletEvent;
-
- isMouseOrTabletEvent = [e type] == NSLeftMouseDown || [e type] == NSOtherMouseDown || [e type] == NSRightMouseDown ||
- [e type] == NSLeftMouseUp || [e type] == NSOtherMouseUp || [e type] == NSRightMouseUp ||
- [e type] == NSLeftMouseDragged || [e type] == NSOtherMouseDragged || [e type] == NSRightMouseDragged ||
- [e type] == NSMouseMoved || [e type] == NSTabletPoint || [e type] == NSScrollWheel;
-
- isTabletEvent = ([e type] == NSTabletPoint) ||
- (isMouseOrTabletEvent && ([e subtype] == NSTabletPointEventSubtype || [e subtype] == NSTabletProximityEventSubtype));
-
- if(isMouseOrTabletEvent) {
- static NSPoint lastpt;
- NSWindow *window = [e window];
- NSRect screen = [[[NSScreen screens] objectAtIndex:0] frame];
- BOOL hasUntrustedPointerDelta;
-
- // NSEvents for tablets are not consistent wrt deltaXY between events, so we cannot rely on that
- // Thus tablets will be subject to the warp-pointer bug worked around by the delta, but tablets
- // are not normally used in cases where that bug would present itself, so this is a fair tradeoff
- // <rdar://problem/7111003> deltaX and deltaY are incorrect for NSMouseMoved, NSTabletPointEventSubtype
- // http://xquartz.macosforge.org/trac/ticket/288
- hasUntrustedPointerDelta = isTabletEvent;
-
- // The deltaXY for middle click events also appear erroneous after fast user switching
- // <rdar://problem/7979468> deltaX and deltaY are incorrect for NSOtherMouseDown and NSOtherMouseUp after FUS
- // http://xquartz.macosforge.org/trac/ticket/389
- hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSOtherMouseDown || [e type] == NSOtherMouseUp;
-
- // The deltaXY for scroll events correspond to the scroll delta, not the pointer delta
- // <rdar://problem/7989690> deltaXY for wheel events are being sent as mouse movement
- hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSScrollWheel;
-
-#ifdef DEBUG_UNTRUSTED_POINTER_DELTA
- hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSLeftMouseDown || [e type] == NSLeftMouseUp;
-#endif
-
- if (window != nil) {
- NSRect frame = [window frame];
- location = [e locationInWindow];
- location.x += frame.origin.x;
- location.y += frame.origin.y;
- lastpt = location;
- } else if(hasUntrustedPointerDelta) {
-#ifdef DEBUG_UNTRUSTED_POINTER_DELTA
- ErrorF("--- Begin Event Debug ---\n");
- ErrorF("Event type: %s\n", untrusted_str(e));
- ErrorF("old lastpt: (%0.2f, %0.2f)\n", lastpt.x, lastpt.y);
- ErrorF(" delta: (%0.2f, %0.2f)\n", [e deltaX], -[e deltaY]);
- ErrorF(" location: (%0.2f, %0.2f)\n", lastpt.x + [e deltaX], lastpt.y - [e deltaY]);
- ErrorF("workaround: (%0.2f, %0.2f)\n", [e locationInWindow].x, [e locationInWindow].y);
- ErrorF("--- End Event Debug ---\n");
-
- location.x = lastpt.x + [e deltaX];
- location.y = lastpt.y - [e deltaY];
- lastpt = [e locationInWindow];
-#else
- location = [e locationInWindow];
- lastpt = location;
-#endif
- } else {
- location.x = lastpt.x + [e deltaX];
- location.y = lastpt.y - [e deltaY];
- lastpt = [e locationInWindow];
- }
-
- /* Convert coordinate system */
- location.y = (screen.origin.y + screen.size.height) - location.y;
- }
-
- modifierFlags = [e modifierFlags];
-
-#ifdef NX_DEVICELCMDKEYMASK
- /* This is to workaround a bug in the VNC server where we sometimes see the L
- * modifier and sometimes see no "side"
- */
- modifierFlags = ensure_flag(modifierFlags, NX_CONTROLMASK, NX_DEVICELCTLKEYMASK | NX_DEVICERCTLKEYMASK, NX_DEVICELCTLKEYMASK);
- modifierFlags = ensure_flag(modifierFlags, NX_SHIFTMASK, NX_DEVICELSHIFTKEYMASK | NX_DEVICERSHIFTKEYMASK, NX_DEVICELSHIFTKEYMASK);
- modifierFlags = ensure_flag(modifierFlags, NX_COMMANDMASK, NX_DEVICELCMDKEYMASK | NX_DEVICERCMDKEYMASK, NX_DEVICELCMDKEYMASK);
- modifierFlags = ensure_flag(modifierFlags, NX_ALTERNATEMASK, NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK, NX_DEVICELALTKEYMASK);
-#endif
-
- modifierFlags &= darwin_all_modifier_mask;
-
- /* We don't receive modifier key events while out of focus, and 3button
- * emulation mucks this up, so we need to check our modifier flag state
- * on every event... ugg
- */
-
- if(darwin_all_modifier_flags != modifierFlags)
- DarwinUpdateModKeys(modifierFlags);
-
- switch ([e type]) {
- case NSLeftMouseDown: ev_button=1; ev_type=ButtonPress; goto handle_mouse;
- case NSOtherMouseDown: ev_button=2; ev_type=ButtonPress; goto handle_mouse;
- case NSRightMouseDown: ev_button=3; ev_type=ButtonPress; goto handle_mouse;
- case NSLeftMouseUp: ev_button=1; ev_type=ButtonRelease; goto handle_mouse;
- case NSOtherMouseUp: ev_button=2; ev_type=ButtonRelease; goto handle_mouse;
- case NSRightMouseUp: ev_button=3; ev_type=ButtonRelease; goto handle_mouse;
- case NSLeftMouseDragged: ev_button=1; ev_type=MotionNotify; goto handle_mouse;
- case NSOtherMouseDragged: ev_button=2; ev_type=MotionNotify; goto handle_mouse;
- case NSRightMouseDragged: ev_button=3; ev_type=MotionNotify; goto handle_mouse;
- case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
- case NSTabletPoint: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
-
- handle_mouse:
- pDev = darwinPointer;
-
- /* NSTabletPoint can have no subtype */
- if([e type] != NSTabletPoint &&
- [e subtype] == NSTabletProximityEventSubtype) {
- switch([e pointingDeviceType]) {
- case NSEraserPointingDevice:
- darwinTabletCurrent=darwinTabletEraser;
- break;
- case NSPenPointingDevice:
- darwinTabletCurrent=darwinTabletStylus;
- break;
- case NSCursorPointingDevice:
- case NSUnknownPointingDevice:
- default:
- darwinTabletCurrent=darwinTabletCursor;
- break;
- }
-
- /* NSTabletProximityEventSubtype doesn't encode pressure ant tilt
- * So we just pretend the motion was caused by the mouse. Hopefully
- * we'll have a better solution for this in the future (like maybe
- * NSTabletProximityEventSubtype will come from NSTabletPoint
- * rather than NSMouseMoved.
- pressure = [e pressure];
- tilt = [e tilt];
- pDev = darwinTabletCurrent;
- */
-
- DarwinSendProximityEvents([e isEnteringProximity] ? ProximityIn : ProximityOut,
- location.x, location.y);
- }
-
- if ([e type] == NSTabletPoint || [e subtype] == NSTabletPointEventSubtype) {
- pressure = [e pressure];
- tilt = [e tilt];
-
- pDev = darwinTabletCurrent;
- }
-
- if(!XQuartzServerVisible && noTestExtensions) {
-#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION > 0
-/* Older libXplugin (Tiger/"Stock" Leopard) aren't thread safe, so we can't call xp_find_window from the Appkit thread */
- xp_window_id wid = 0;
- xp_error e;
-
- /* Sigh. Need to check that we're really over one of
- * our windows. (We need to receive pointer events while
- * not in the foreground, but we don't want to receive them
- * when another window is over us or we might show a tooltip)
- */
-
- e = xp_find_window(location.x, location.y, 0, &wid);
-
- if (e != XP_Success || (e == XP_Success && wid == 0))
-#endif
- {
- bgMouseLocation = location;
- bgMouseLocationUpdated = TRUE;
- return;
- }
- }
-
- if(bgMouseLocationUpdated) {
- if(!(ev_type == MotionNotify && ev_button == 0)) {
- DarwinSendPointerEvents(pDev, MotionNotify, 0, location.x,
- location.y, pressure, tilt.x, tilt.y);
- }
- bgMouseLocationUpdated = FALSE;
- }
-
- DarwinSendPointerEvents(pDev, ev_type, ev_button, location.x, location.y,
- pressure, tilt.x, tilt.y);
-
- break;
-
- case NSTabletProximity:
- switch([e pointingDeviceType]) {
- case NSEraserPointingDevice:
- darwinTabletCurrent=darwinTabletEraser;
- break;
- case NSPenPointingDevice:
- darwinTabletCurrent=darwinTabletStylus;
- break;
- case NSCursorPointingDevice:
- case NSUnknownPointingDevice:
- default:
- darwinTabletCurrent=darwinTabletCursor;
- break;
- }
-
- DarwinSendProximityEvents([e isEnteringProximity] ? ProximityIn : ProximityOut,
- location.x, location.y);
- break;
-
- case NSScrollWheel:
-#if !defined(XPLUGIN_VERSION) || XPLUGIN_VERSION == 0
- /* If we're in the background, we need to send a MotionNotify event
- * first, since we aren't getting them on background mouse motion
- */
- if(!XQuartzServerVisible && noTestExtensions) {
- bgMouseLocationUpdated = FALSE;
- DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, location.x,
- location.y, pressure, tilt.x, tilt.y);
- }
-#endif
- DarwinSendScrollEvents([e deltaX], [e deltaY], location.x, location.y,
- pressure, tilt.x, tilt.y);
- break;
-
- case NSKeyDown: case NSKeyUp:
- {
- /* XKB clobbers our keymap at startup, so we need to force it on the first keypress.
- * TODO: Make this less of a kludge.
- */
- static int force_resync_keymap = YES;
- if(force_resync_keymap) {
- DarwinSendDDXEvent(kXquartzReloadKeymap, 0);
- force_resync_keymap = NO;
- }
- }
-
- if(darwinSyncKeymap) {
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
- TISInputSourceRef key_layout = TISCopyCurrentKeyboardLayoutInputSource();
- TISInputSourceRef clear;
- if (CFEqual(key_layout, last_key_layout)) {
- CFRelease(key_layout);
- } else {
- /* Swap/free thread-safely */
- clear = last_key_layout;
- last_key_layout = key_layout;
- CFRelease(clear);
-#else
- KeyboardLayoutRef key_layout;
- KLGetCurrentKeyboardLayout(&key_layout);
- if(key_layout != last_key_layout) {
- last_key_layout = key_layout;
-#endif
- /* Update keyInfo */
- if (!QuartsResyncKeymap(TRUE)) {
- fprintf(stderr, "sendX11NSEvent: Could not build a valid keymap.\n");
- }
- }
- }
-
- /* Avoid stuck keys on context switch */
- if(keyState[[e keyCode]] == [e type])
- return;
- keyState[[e keyCode]] = [e type];
-
- DarwinSendKeyboardEvents(([e type] == NSKeyDown) ? KeyPress : KeyRelease, [e keyCode]);
- break;
-
- default: break; /* for gcc */
- }
-}
-@end
+/* X11Application.m -- subclass of NSApplication to multiplex events
+
+ Copyright (c) 2002-2008 Apple Inc.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software without
+ prior written authorization. */
+
+#include "sanitizedCarbon.h"
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "quartzCommon.h"
+
+#import "X11Application.h"
+
+#include "darwin.h"
+#include "quartz.h"
+#include "darwinEvents.h"
+#include "quartzKeyboard.h"
+#include "quartz.h"
+#include <X11/extensions/applewmconst.h>
+#include "micmap.h"
+#include "exglobals.h"
+
+#include <mach/mach.h>
+#include <unistd.h>
+#include <AvailabilityMacros.h>
+
+#include <Xplugin.h>
+
+// pbproxy/pbproxy.h
+extern int xpbproxy_run (void);
+
+#define DEFAULTS_FILE X11LIBDIR"/X11/xserver/Xquartz.plist"
+
+#ifndef XSERVER_VERSION
+#define XSERVER_VERSION "?"
+#endif
+
+/* Stuck modifier / button state... force release when we context switch */
+static NSEventType keyState[NUM_KEYCODES];
+
+extern Bool noTestExtensions;
+
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
+static TISInputSourceRef last_key_layout;
+#else
+static KeyboardLayoutRef last_key_layout;
+#endif
+
+extern int darwinFakeButtons;
+
+/* Store the mouse location while in the background, and update X11's pointer
+ * location when we become the foreground application
+ */
+static NSPoint bgMouseLocation;
+static BOOL bgMouseLocationUpdated = FALSE;
+
+X11Application *X11App;
+
+CFStringRef app_prefs_domain_cfstr = NULL;
+
+#define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask | NSCommandKeyMask)
+
+@interface X11Application (Private)
+- (void) sendX11NSEvent:(NSEvent *)e;
+@end
+
+@implementation X11Application
+
+typedef struct message_struct message;
+struct message_struct {
+ mach_msg_header_t hdr;
+ SEL selector;
+ NSObject *arg;
+};
+
+static mach_port_t _port;
+
+/* Quartz mode initialization routine. This is often dynamically loaded
+ but is statically linked into this X server. */
+Bool QuartzModeBundleInit(void);
+
+static void init_ports (void) {
+ kern_return_t r;
+ NSPort *p;
+
+ if (_port != MACH_PORT_NULL) return;
+
+ r = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &_port);
+ if (r != KERN_SUCCESS) return;
+
+ p = [NSMachPort portWithMachPort:_port];
+ [p setDelegate:NSApp];
+ [p scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
+}
+
+static void message_kit_thread (SEL selector, NSObject *arg) {
+ message msg;
+ kern_return_t r;
+
+ msg.hdr.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_MAKE_SEND, 0);
+ msg.hdr.msgh_size = sizeof (msg);
+ msg.hdr.msgh_remote_port = _port;
+ msg.hdr.msgh_local_port = MACH_PORT_NULL;
+ msg.hdr.msgh_reserved = 0;
+ msg.hdr.msgh_id = 0;
+
+ msg.selector = selector;
+ msg.arg = [arg retain];
+
+ r = mach_msg (&msg.hdr, MACH_SEND_MSG, msg.hdr.msgh_size,
+ 0, MACH_PORT_NULL, 0, MACH_PORT_NULL);
+ if (r != KERN_SUCCESS)
+ ErrorF("%s: mach_msg failed: %x\n", __FUNCTION__, r);
+}
+
+- (void) handleMachMessage:(void *)_msg {
+ message *msg = _msg;
+
+ [self performSelector:msg->selector withObject:msg->arg];
+ [msg->arg release];
+}
+
+- (void) set_controller:obj {
+ if (_controller == nil) _controller = [obj retain];
+}
+
+- (void) dealloc {
+ if (_controller != nil) [_controller release];
+
+ if (_port != MACH_PORT_NULL)
+ mach_port_deallocate (mach_task_self (), _port);
+
+ [super dealloc];
+}
+
+- (void) orderFrontStandardAboutPanel: (id) sender {
+ NSMutableDictionary *dict;
+ NSDictionary *infoDict;
+ NSString *tem;
+
+ dict = [NSMutableDictionary dictionaryWithCapacity:3];
+ infoDict = [[NSBundle mainBundle] infoDictionary];
+
+ [dict setObject: NSLocalizedString (@"The X Window System", @"About panel")
+ forKey:@"ApplicationName"];
+
+ tem = [infoDict objectForKey:@"CFBundleShortVersionString"];
+
+ [dict setObject:[NSString stringWithFormat:@"XQuartz %@", tem]
+ forKey:@"ApplicationVersion"];
+
+ [dict setObject:[NSString stringWithFormat:@"xorg-server %s", XSERVER_VERSION]
+ forKey:@"Version"];
+
+ [self orderFrontStandardAboutPanelWithOptions: dict];
+}
+
+- (void) activateX:(OSX_BOOL)state {
+ size_t i;
+ DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active)
+ if (state) {
+ if(bgMouseLocationUpdated) {
+ DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, bgMouseLocation.x, bgMouseLocation.y, 0.0, 0.0, 0.0);
+ bgMouseLocationUpdated = FALSE;
+ }
+ DarwinSendDDXEvent(kXquartzActivate, 0);
+ } else {
+
+ if(darwin_all_modifier_flags)
+ DarwinUpdateModKeys(0);
+ for(i=0; i < NUM_KEYCODES; i++) {
+ if(keyState[i] == NSKeyDown) {
+ DarwinSendKeyboardEvents(KeyRelease, i);
+ keyState[i] = NSKeyUp;
+ }
+ }
+
+ DarwinSendDDXEvent(kXquartzDeactivate, 0);
+ }
+
+ _x_active = state;
+}
+
+- (void) became_key:(NSWindow *)win {
+ [self activateX:NO];
+}
+
+- (void) sendEvent:(NSEvent *)e {
+ OSX_BOOL for_appkit, for_x;
+
+ /* By default pass down the responder chain and to X. */
+ for_appkit = YES;
+ for_x = YES;
+
+ switch ([e type]) {
+ case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
+ case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
+ if ([e window] != nil) {
+ /* Pointer event has an (AppKit) window. Probably something for the kit. */
+ for_x = NO;
+ if (_x_active) [self activateX:NO];
+ } else if ([self modalWindow] == nil) {
+ /* Must be an X window. Tell appkit it doesn't have focus. */
+ for_appkit = NO;
+
+ if ([self isActive]) {
+ [self deactivate];
+ if (!_x_active && quartzProcs->IsX11Window([e window],
+ [e windowNumber]))
+ [self activateX:YES];
+ }
+ }
+
+ /* We want to force sending to appkit if we're over the menu bar */
+ if(!for_appkit) {
+ NSPoint NSlocation = [e locationInWindow];
+ NSWindow *window = [e window];
+ NSRect NSframe, NSvisibleFrame;
+ CGRect CGframe, CGvisibleFrame;
+ CGPoint CGlocation;
+
+ if (window != nil) {
+ NSRect frame = [window frame];
+ NSlocation.x += frame.origin.x;
+ NSlocation.y += frame.origin.y;
+ }
+
+ NSframe = [[NSScreen mainScreen] frame];
+ NSvisibleFrame = [[NSScreen mainScreen] visibleFrame];
+
+ CGframe = CGRectMake(NSframe.origin.x, NSframe.origin.y,
+ NSframe.size.width, NSframe.size.height);
+ CGvisibleFrame = CGRectMake(NSvisibleFrame.origin.x,
+ NSvisibleFrame.origin.y,
+ NSvisibleFrame.size.width,
+ NSvisibleFrame.size.height);
+ CGlocation = CGPointMake(NSlocation.x, NSlocation.y);
+
+ if(CGRectContainsPoint(CGframe, CGlocation) &&
+ !CGRectContainsPoint(CGvisibleFrame, CGlocation))
+ for_appkit = YES;
+ }
+
+ break;
+
+ case NSKeyDown: case NSKeyUp:
+
+ if(_x_active) {
+ static BOOL do_swallow = NO;
+ static int swallow_keycode;
+
+ if([e type] == NSKeyDown) {
+ /* Before that though, see if there are any global
+ * shortcuts bound to it. */
+
+ if(darwinAppKitModMask & [e modifierFlags]) {
+ /* Override to force sending to Appkit */
+ swallow_keycode = [e keyCode];
+ do_swallow = YES;
+ for_x = NO;
+#if XPLUGIN_VERSION >= 1
+ } else if(XQuartzEnableKeyEquivalents &&
+ xp_is_symbolic_hotkey_event([e eventRef])) {
+ swallow_keycode = [e keyCode];
+ do_swallow = YES;
+ for_x = NO;
+#endif
+ } else if(XQuartzEnableKeyEquivalents &&
+ [[self mainMenu] performKeyEquivalent:e]) {
+ swallow_keycode = [e keyCode];
+ do_swallow = YES;
+ for_appkit = NO;
+ for_x = NO;
+ } else if(!XQuartzIsRootless
+ && ([e modifierFlags] & ALL_KEY_MASKS) == (NSCommandKeyMask | NSAlternateKeyMask)
+ && ([e keyCode] == 0 /*a*/ || [e keyCode] == 53 /*Esc*/)) {
+ /* We have this here to force processing fullscreen
+ * toggle even if XQuartzEnableKeyEquivalents is disabled */
+ swallow_keycode = [e keyCode];
+ do_swallow = YES;
+ for_x = NO;
+ for_appkit = NO;
+ DarwinSendDDXEvent(kXquartzToggleFullscreen, 0);
+ } else {
+ /* No kit window is focused, so send it to X. */
+ for_appkit = NO;
+ }
+ } else { /* KeyUp */
+ /* If we saw a key equivalent on the down, don't pass
+ * the up through to X. */
+ if (do_swallow && [e keyCode] == swallow_keycode) {
+ do_swallow = NO;
+ for_x = NO;
+ }
+ }
+ } else { /* !_x_active */
+ for_x = NO;
+ }
+ break;
+
+ case NSFlagsChanged:
+ /* Don't tell X11 about modifiers changing while it's not active */
+ if (!_x_active)
+ for_x = NO;
+ break;
+
+ case NSAppKitDefined:
+ switch ([e subtype]) {
+ case NSApplicationActivatedEventType:
+ for_x = NO;
+ if ([self modalWindow] == nil) {
+ BOOL order_all_windows = YES, workspaces, ok;
+ for_appkit = NO;
+
+ /* FIXME: hack to avoid having to pass the event to appkit,
+ which would cause it to raise one of its windows. */
+ _appFlags._active = YES;
+
+ [self activateX:YES];
+
+ /* Get the Spaces preference for SwitchOnActivate */
+ (void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock"));
+ workspaces = CFPreferencesGetAppBooleanValue(CFSTR("workspaces"), CFSTR("com.apple.dock"), &ok);
+ if (!ok)
+ workspaces = NO;
+
+ if (workspaces) {
+ (void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences"));
+ order_all_windows = CFPreferencesGetAppBooleanValue(CFSTR("AppleSpacesSwitchOnActivate"), CFSTR(".GlobalPreferences"), &ok);
+ if (!ok)
+ order_all_windows = YES;
+ }
+
+ /* TODO: In the workspaces && !AppleSpacesSwitchOnActivate case, the windows are ordered
+ * correctly, but we need to activate the top window on this space if there is
+ * none active.
+ *
+ * If there are no active windows, and there are minimized windows, we should
+ * be restoring one of them.
+ */
+ if ([e data2] & 0x10) // 0x10 is set when we use cmd-tab or the dock icon
+ DarwinSendDDXEvent(kXquartzBringAllToFront, 1, order_all_windows);
+ }
+ break;
+
+ case 18: /* ApplicationDidReactivate */
+ if (XQuartzFullscreenVisible) for_appkit = NO;
+ break;
+
+ case NSApplicationDeactivatedEventType:
+ for_x = NO;
+ [self activateX:NO];
+ break;
+ }
+ break;
+
+ default: break; /* for gcc */
+ }
+
+ if (for_appkit) [super sendEvent:e];
+
+ if (for_x) [self sendX11NSEvent:e];
+}
+
+- (void) set_window_menu:(NSArray *)list {
+ [_controller set_window_menu:list];
+}
+
+- (void) set_window_menu_check:(NSNumber *)n {
+ [_controller set_window_menu_check:n];
+}
+
+- (void) set_apps_menu:(NSArray *)list {
+ [_controller set_apps_menu:list];
+}
+
+- (void) set_front_process:unused {
+ [NSApp activateIgnoringOtherApps:YES];
+
+ if ([self modalWindow] == nil)
+ [self activateX:YES];
+}
+
+- (void) set_can_quit:(NSNumber *)state {
+ [_controller set_can_quit:[state boolValue]];
+}
+
+- (void) server_ready:unused {
+ [_controller server_ready];
+}
+
+- (void) show_hide_menubar:(NSNumber *)state {
+ /* Also shows/hides the dock */
+ if ([state boolValue])
+ SetSystemUIMode(kUIModeNormal, 0);
+ else
+ SetSystemUIMode(kUIModeAllHidden, XQuartzFullscreenMenu ? kUIOptionAutoShowMenuBar : 0); // kUIModeAllSuppressed or kUIOptionAutoShowMenuBar can be used to allow "mouse-activation"
+}
+
+- (void) launch_client:(NSString *)cmd {
+ (void)[_controller application:self openFile:cmd];
+}
+
+/* user preferences */
+
+/* Note that these functions only work for arrays whose elements
+ can be toll-free-bridged between NS and CF worlds. */
+
+static const void *cfretain (CFAllocatorRef a, const void *b) {
+ return CFRetain (b);
+}
+
+static void cfrelease (CFAllocatorRef a, const void *b) {
+ CFRelease (b);
+}
+
+static CFMutableArrayRef nsarray_to_cfarray (NSArray *in) {
+ CFMutableArrayRef out;
+ CFArrayCallBacks cb;
+ NSObject *ns;
+ const CFTypeRef *cf;
+ int i, count;
+
+ memset (&cb, 0, sizeof (cb));
+ cb.version = 0;
+ cb.retain = cfretain;
+ cb.release = cfrelease;
+
+ count = [in count];
+ out = CFArrayCreateMutable (NULL, count, &cb);
+
+ for (i = 0; i < count; i++) {
+ ns = [in objectAtIndex:i];
+
+ if ([ns isKindOfClass:[NSArray class]])
+ cf = (CFTypeRef) nsarray_to_cfarray ((NSArray *) ns);
+ else
+ cf = CFRetain ((CFTypeRef) ns);
+
+ CFArrayAppendValue (out, cf);
+ CFRelease (cf);
+ }
+
+ return out;
+}
+
+static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
+ NSMutableArray *out;
+ const CFTypeRef *cf;
+ NSObject *ns;
+ int i, count;
+
+ count = CFArrayGetCount (in);
+ out = [[NSMutableArray alloc] initWithCapacity:count];
+
+ for (i = 0; i < count; i++) {
+ cf = CFArrayGetValueAtIndex (in, i);
+
+ if (CFGetTypeID (cf) == CFArrayGetTypeID ())
+ ns = cfarray_to_nsarray ((CFArrayRef) cf);
+ else
+ ns = [(id)cf retain];
+
+ [out addObject:ns];
+ [ns release];
+ }
+
+ return out;
+}
+
+- (CFPropertyListRef) prefs_get_copy:(NSString *)key {
+ CFPropertyListRef value;
+
+ value = CFPreferencesCopyAppValue ((CFStringRef) key, app_prefs_domain_cfstr);
+
+ if (value == NULL) {
+ static CFDictionaryRef defaults;
+
+ if (defaults == NULL) {
+ CFStringRef error = NULL;
+ CFDataRef data;
+ CFURLRef url;
+ SInt32 error_code;
+
+ url = (CFURLCreateFromFileSystemRepresentation
+ (NULL, (unsigned char *)DEFAULTS_FILE, strlen (DEFAULTS_FILE), false));
+ if (CFURLCreateDataAndPropertiesFromResource (NULL, url, &data,
+ NULL, NULL, &error_code)) {
+ defaults = (CFPropertyListCreateFromXMLData
+ (NULL, data, kCFPropertyListMutableContainersAndLeaves, &error));
+ if (error != NULL) CFRelease (error);
+ CFRelease (data);
+ }
+ CFRelease (url);
+
+ if (defaults != NULL) {
+ NSMutableArray *apps, *elt;
+ int count, i;
+ NSString *name, *nname;
+
+ /* Localize the names in the default apps menu. */
+
+ apps = [(NSDictionary *)defaults objectForKey:@PREFS_APPSMENU];
+ if (apps != nil) {
+ count = [apps count];
+ for (i = 0; i < count; i++) {
+ elt = [apps objectAtIndex:i];
+ if (elt != nil && [elt isKindOfClass:[NSArray class]]) {
+ name = [elt objectAtIndex:0];
+ if (name != nil) {
+ nname = NSLocalizedString (name, nil);
+ if (nname != nil && nname != name)
+ [elt replaceObjectAtIndex:0 withObject:nname];
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (defaults != NULL) value = CFDictionaryGetValue (defaults, key);
+ if (value != NULL) CFRetain (value);
+ }
+
+ return value;
+}
+
+- (int) prefs_get_integer:(NSString *)key default:(int)def {
+ CFPropertyListRef value;
+ int ret;
+
+ value = [self prefs_get_copy:key];
+
+ if (value != NULL && CFGetTypeID (value) == CFNumberGetTypeID ())
+ CFNumberGetValue (value, kCFNumberIntType, &ret);
+ else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
+ ret = CFStringGetIntValue (value);
+ else
+ ret = def;
+
+ if (value != NULL) CFRelease (value);
+
+ return ret;
+}
+
+- (const char *) prefs_get_string:(NSString *)key default:(const char *)def {
+ CFPropertyListRef value;
+ const char *ret = NULL;
+
+ value = [self prefs_get_copy:key];
+
+ if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) {
+ NSString *s = (NSString *) value;
+
+ ret = [s UTF8String];
+ }
+
+ if (value != NULL) CFRelease (value);
+
+ return ret != NULL ? ret : def;
+}
+
+- (NSURL *) prefs_copy_url:(NSString *)key default:(NSURL *)def {
+ CFPropertyListRef value;
+ NSURL *ret = NULL;
+
+ value = [self prefs_get_copy:key];
+
+ if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) {
+ NSString *s = (NSString *) value;
+
+ ret = [NSURL URLWithString:s];
+ [ret retain];
+ }
+
+ if (value != NULL) CFRelease (value);
+
+ return ret != NULL ? ret : def;
+}
+
+- (float) prefs_get_float:(NSString *)key default:(float)def {
+ CFPropertyListRef value;
+ float ret = def;
+
+ value = [self prefs_get_copy:key];
+
+ if (value != NULL
+ && CFGetTypeID (value) == CFNumberGetTypeID ()
+ && CFNumberIsFloatType (value))
+ CFNumberGetValue (value, kCFNumberFloatType, &ret);
+ else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
+ ret = CFStringGetDoubleValue (value);
+
+ if (value != NULL) CFRelease (value);
+
+ return ret;
+}
+
+- (int) prefs_get_boolean:(NSString *)key default:(int)def {
+ CFPropertyListRef value;
+ int ret = def;
+
+ value = [self prefs_get_copy:key];
+
+ if (value != NULL) {
+ if (CFGetTypeID (value) == CFNumberGetTypeID ())
+ CFNumberGetValue (value, kCFNumberIntType, &ret);
+ else if (CFGetTypeID (value) == CFBooleanGetTypeID ())
+ ret = CFBooleanGetValue (value);
+ else if (CFGetTypeID (value) == CFStringGetTypeID ()) {
+ const char *tem = [(NSString *) value UTF8String];
+ if (strcasecmp (tem, "true") == 0 || strcasecmp (tem, "yes") == 0)
+ ret = YES;
+ else
+ ret = NO;
+ }
+
+ CFRelease (value);
+ }
+ return ret;
+}
+
+- (NSArray *) prefs_get_array:(NSString *)key {
+ NSArray *ret = nil;
+ CFPropertyListRef value;
+
+ value = [self prefs_get_copy:key];
+
+ if (value != NULL) {
+ if (CFGetTypeID (value) == CFArrayGetTypeID ())
+ ret = [cfarray_to_nsarray (value) autorelease];
+
+ CFRelease (value);
+ }
+
+ return ret;
+}
+
+- (void) prefs_set_integer:(NSString *)key value:(int)value {
+ CFNumberRef x;
+
+ x = CFNumberCreate (NULL, kCFNumberIntType, &value);
+
+ CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, app_prefs_domain_cfstr,
+ kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+
+ CFRelease (x);
+}
+
+- (void) prefs_set_float:(NSString *)key value:(float)value {
+ CFNumberRef x;
+
+ x = CFNumberCreate (NULL, kCFNumberFloatType, &value);
+
+ CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, app_prefs_domain_cfstr,
+ kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+
+ CFRelease (x);
+}
+
+- (void) prefs_set_boolean:(NSString *)key value:(int)value {
+ CFPreferencesSetValue ((CFStringRef) key,
+ (CFTypeRef) (value ? kCFBooleanTrue
+ : kCFBooleanFalse), app_prefs_domain_cfstr,
+ kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+
+}
+
+- (void) prefs_set_array:(NSString *)key value:(NSArray *)value {
+ CFArrayRef cfarray;
+
+ cfarray = nsarray_to_cfarray (value);
+ CFPreferencesSetValue ((CFStringRef) key,
+ (CFTypeRef) cfarray,
+ app_prefs_domain_cfstr,
+ kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+ CFRelease (cfarray);
+}
+
+- (void) prefs_set_string:(NSString *)key value:(NSString *)value {
+ CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) value,
+ app_prefs_domain_cfstr, kCFPreferencesCurrentUser,
+ kCFPreferencesAnyHost);
+}
+
+- (void) prefs_synchronize {
+ CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication);
+}
+
+- (void) read_defaults
+{
+ NSString *nsstr;
+ const char *tem;
+
+ XQuartzRootlessDefault = [self prefs_get_boolean:@PREFS_ROOTLESS
+ default:XQuartzRootlessDefault];
+ XQuartzFullscreenMenu = [self prefs_get_boolean:@PREFS_FULLSCREEN_MENU
+ default:XQuartzFullscreenMenu];
+ XQuartzFullscreenDisableHotkeys = ![self prefs_get_boolean:@PREFS_FULLSCREEN_HOTKEYS
+ default:!XQuartzFullscreenDisableHotkeys];
+ darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS
+ default:darwinFakeButtons];
+ XQuartzOptionSendsAlt = [self prefs_get_boolean:@PREFS_OPTION_SENDS_ALT
+ default:XQuartzOptionSendsAlt];
+
+ if (darwinFakeButtons) {
+ const char *fake2, *fake3;
+
+ fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL];
+ fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL];
+
+ if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2, TRUE);
+ if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3, TRUE);
+ }
+
+ tem = [self prefs_get_string:@PREFS_APPKIT_MODIFIERS default:NULL];
+ if (tem != NULL) darwinAppKitModMask = DarwinParseModifierList(tem, TRUE);
+
+ tem = [self prefs_get_string:@PREFS_WINDOW_ITEM_MODIFIERS default:NULL];
+ if (tem != NULL) {
+ windowItemModMask = DarwinParseModifierList(tem, FALSE);
+ } else {
+ nsstr = NSLocalizedString (@"window item modifiers", @"window item modifiers");
+ if(nsstr != NULL) {
+ tem = [nsstr UTF8String];
+ if((tem != NULL) && strcmp(tem, "window item modifiers")) {
+ windowItemModMask = DarwinParseModifierList(tem, FALSE);
+ }
+ }
+ }
+
+ XQuartzEnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
+ default:XQuartzEnableKeyEquivalents];
+
+ darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP
+ default:darwinSyncKeymap];
+
+ darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
+ default:darwinDesiredDepth];
+
+ noTestExtensions = ![self prefs_get_boolean:@PREFS_TEST_EXTENSIONS
+ default:FALSE];
+
+#if XQUARTZ_SPARKLE
+ NSURL *url = [self prefs_copy_url:@PREFS_UPDATE_FEED default:nil];
+ if(url) {
+ [[SUUpdater sharedUpdater] setFeedURL:url];
+ [url release];
+ }
+#endif
+}
+
+/* This will end up at the end of the responder chain. */
+- (void) copy:sender {
+ DarwinSendDDXEvent(kXquartzPasteboardNotify, 1,
+ AppleWMCopyToPasteboard);
+}
+
+- (X11Controller *) controller {
+ return _controller;
+}
+
+- (OSX_BOOL) x_active {
+ return _x_active;
+}
+
+@end
+
+static NSArray *
+array_with_strings_and_numbers (int nitems, const char **items,
+ const char *numbers) {
+ NSMutableArray *array, *subarray;
+ NSString *string, *number;
+ int i;
+
+ /* (Can't autorelease on the X server thread) */
+
+ array = [[NSMutableArray alloc] initWithCapacity:nitems];
+
+ for (i = 0; i < nitems; i++) {
+ subarray = [[NSMutableArray alloc] initWithCapacity:2];
+
+ string = [[NSString alloc] initWithUTF8String:items[i]];
+ [subarray addObject:string];
+ [string release];
+
+ if (numbers[i] != 0) {
+ number = [[NSString alloc] initWithFormat:@"%d", numbers[i]];
+ [subarray addObject:number];
+ [number release];
+ } else
+ [subarray addObject:@""];
+
+ [array addObject:subarray];
+ [subarray release];
+ }
+
+ return array;
+}
+
+void X11ApplicationSetWindowMenu (int nitems, const char **items,
+ const char *shortcuts) {
+ NSArray *array;
+ array = array_with_strings_and_numbers (nitems, items, shortcuts);
+
+ /* Send the array of strings over to the appkit thread */
+
+ message_kit_thread (@selector (set_window_menu:), array);
+ [array release];
+}
+
+void X11ApplicationSetWindowMenuCheck (int idx) {
+ NSNumber *n;
+
+ n = [[NSNumber alloc] initWithInt:idx];
+
+ message_kit_thread (@selector (set_window_menu_check:), n);
+
+ [n release];
+}
+
+void X11ApplicationSetFrontProcess (void) {
+ message_kit_thread (@selector (set_front_process:), nil);
+}
+
+void X11ApplicationSetCanQuit (int state) {
+ NSNumber *n;
+
+ n = [[NSNumber alloc] initWithBool:state];
+
+ message_kit_thread (@selector (set_can_quit:), n);
+
+ [n release];
+}
+
+void X11ApplicationServerReady (void) {
+ message_kit_thread (@selector (server_ready:), nil);
+}
+
+void X11ApplicationShowHideMenubar (int state) {
+ NSNumber *n;
+
+ n = [[NSNumber alloc] initWithBool:state];
+
+ message_kit_thread (@selector (show_hide_menubar:), n);
+
+ [n release];
+}
+
+void X11ApplicationLaunchClient (const char *cmd) {
+ NSString *string;
+
+ string = [[NSString alloc] initWithUTF8String:cmd];
+
+ message_kit_thread (@selector (launch_client:), string);
+
+ [string release];
+}
+
+/* This is a special function in that it is run from the *SERVER* thread and
+ * not the AppKit thread. We want to block entering a screen-capturing RandR
+ * mode until we notify the user about how to get out if the X11 client crashes.
+ */
+Bool X11ApplicationCanEnterRandR(void) {
+ NSString *title, *msg;
+
+ if([X11App prefs_get_boolean:@PREFS_NO_RANDR_ALERT default:NO] || XQuartzShieldingWindowLevel != 0)
+ return TRUE;
+
+ title = NSLocalizedString(@"Enter RandR mode?", @"Dialog title when switching to RandR");
+ msg = NSLocalizedString(@"An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the ⌥⌘A key sequence to force X11 to return to the previous state.",
+ @"Dialog when switching to RandR");
+
+ if(!XQuartzIsRootless)
+ QuartzShowFullscreen(FALSE);
+
+ switch(NSRunAlertPanel(title, msg, NSLocalizedString(@"Allow", @""), NSLocalizedString (@"Cancel", @""), NSLocalizedString (@"Always Allow", @""))) {
+ case NSAlertOtherReturn:
+ [X11App prefs_set_boolean:@PREFS_NO_RANDR_ALERT value:YES];
+ [X11App prefs_synchronize];
+ case NSAlertDefaultReturn:
+ return YES;
+
+ default:
+ return NO;
+ }
+}
+
+static void check_xinitrc (void) {
+ char *tem, buf[1024];
+ NSString *msg;
+
+ if ([X11App prefs_get_boolean:@PREFS_DONE_XINIT_CHECK default:NO])
+ return;
+
+ tem = getenv ("HOME");
+ if (tem == NULL) goto done;
+
+ snprintf (buf, sizeof (buf), "%s/.xinitrc", tem);
+ if (access (buf, F_OK) != 0)
+ goto done;
+
+ msg = NSLocalizedString (@"You have an existing ~/.xinitrc file.\n\n\
+Windows displayed by X11 applications may not have titlebars, or may look \
+different to windows displayed by native applications.\n\n\
+Would you like to move aside the existing file and use the standard X11 \
+environment the next time you start X11?", @"Startup xinitrc dialog");
+
+ if(NSAlertDefaultReturn == NSRunAlertPanel (nil, msg, NSLocalizedString (@"Yes", @""),
+ NSLocalizedString (@"No", @""), nil)) {
+ char buf2[1024];
+ int i = -1;
+
+ snprintf (buf2, sizeof (buf2), "%s.old", buf);
+
+ for(i = 1; access (buf2, F_OK) == 0; i++)
+ snprintf (buf2, sizeof (buf2), "%s.old.%d", buf, i);
+
+ rename (buf, buf2);
+ }
+
+ done:
+ [X11App prefs_set_boolean:@PREFS_DONE_XINIT_CHECK value:YES];
+ [X11App prefs_synchronize];
+}
+
+static inline pthread_t create_thread(void *func, void *arg) {
+ pthread_attr_t attr;
+ pthread_t tid;
+
+ pthread_attr_init(&attr);
+ pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+ pthread_create(&tid, &attr, func, arg);
+ pthread_attr_destroy(&attr);
+
+ return tid;
+}
+
+static void *xpbproxy_x_thread(void *args) {
+ xpbproxy_run();
+
+ fprintf(stderr, "xpbproxy thread is terminating unexpectedly.\n");
+ return NULL;
+}
+
+void X11ApplicationMain (int argc, char **argv, char **envp) {
+ NSAutoreleasePool *pool;
+
+#ifdef DEBUG
+ while (access ("/tmp/x11-block", F_OK) == 0) sleep (1);
+#endif
+
+ pool = [[NSAutoreleasePool alloc] init];
+ X11App = (X11Application *) [X11Application sharedApplication];
+ init_ports ();
+
+ app_prefs_domain_cfstr = (CFStringRef)[[NSBundle mainBundle] bundleIdentifier];
+
+ [NSApp read_defaults];
+ [NSBundle loadNibNamed:@"main" owner:NSApp];
+ [[NSNotificationCenter defaultCenter] addObserver:NSApp
+ selector:@selector (became_key:)
+ name:NSWindowDidBecomeKeyNotification object:nil];
+
+ /*
+ * The xpr Quartz mode is statically linked into this server.
+ * Initialize all the Quartz functions.
+ */
+ QuartzModeBundleInit();
+
+ /* Calculate the height of the menubar so we can avoid it. */
+ aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
+ NSMaxY([[NSScreen mainScreen] visibleFrame]);
+
+ /* Set the key layout seed before we start the server */
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
+ last_key_layout = TISCopyCurrentKeyboardLayoutInputSource();
+
+ if(!last_key_layout)
+ fprintf(stderr, "X11ApplicationMain: Unable to determine TISCopyCurrentKeyboardLayoutInputSource() at startup.\n");
+#else
+ KLGetCurrentKeyboardLayout(&last_key_layout);
+ if(!last_key_layout)
+ fprintf(stderr, "X11ApplicationMain: Unable to determine KLGetCurrentKeyboardLayout() at startup.\n");
+#endif
+
+ if (!QuartsResyncKeymap(FALSE)) {
+ fprintf(stderr, "X11ApplicationMain: Could not build a valid keymap.\n");
+ }
+
+ /* Tell the server thread that it can proceed */
+ QuartzInitServer(argc, argv, envp);
+
+ /* This must be done after QuartzInitServer because it can result in
+ * an mieqEnqueue() - <rdar://problem/6300249>
+ */
+ check_xinitrc();
+
+ create_thread(xpbproxy_x_thread, NULL);
+
+#if XQUARTZ_SPARKLE
+ [[X11App controller] setup_sparkle];
+ [[SUUpdater sharedUpdater] resetUpdateCycle];
+// [[SUUpdater sharedUpdater] checkForUpdates:X11App];
+#endif
+
+ [pool release];
+ [NSApp run];
+ /* not reached */
+}
+
+@implementation X11Application (Private)
+
+#ifdef NX_DEVICELCMDKEYMASK
+/* This is to workaround a bug in the VNC server where we sometimes see the L
+ * modifier and sometimes see no "side"
+ */
+static inline int ensure_flag(int flags, int device_independent, int device_dependents, int device_dependent_default) {
+ if( (flags & device_independent) &&
+ !(flags & device_dependents))
+ flags |= device_dependent_default;
+ return flags;
+}
+#endif
+
+#ifdef DEBUG_UNTRUSTED_POINTER_DELTA
+static const char *untrusted_str(NSEvent *e) {
+ switch([e type]) {
+ case NSScrollWheel:
+ return "NSScrollWheel";
+ case NSTabletPoint:
+ return "NSTabletPoint";
+ case NSOtherMouseDown:
+ return "NSOtherMouseDown";
+ case NSOtherMouseUp:
+ return "NSOtherMouseUp";
+ case NSLeftMouseDown:
+ return "NSLeftMouseDown";
+ case NSLeftMouseUp:
+ return "NSLeftMouseUp";
+ default:
+ switch([e subtype]) {
+ case NSTabletPointEventSubtype:
+ return "NSTabletPointEventSubtype";
+ case NSTabletProximityEventSubtype:
+ return "NSTabletProximityEventSubtype";
+ default:
+ return "Other";
+ }
+ }
+}
+#endif
+
+- (void) sendX11NSEvent:(NSEvent *)e {
+ NSPoint location = NSZeroPoint, tilt = NSZeroPoint;
+ int ev_button, ev_type;
+ float pressure = 0.0;
+ DeviceIntPtr pDev;
+ int modifierFlags;
+ BOOL isMouseOrTabletEvent, isTabletEvent;
+
+ isMouseOrTabletEvent = [e type] == NSLeftMouseDown || [e type] == NSOtherMouseDown || [e type] == NSRightMouseDown ||
+ [e type] == NSLeftMouseUp || [e type] == NSOtherMouseUp || [e type] == NSRightMouseUp ||
+ [e type] == NSLeftMouseDragged || [e type] == NSOtherMouseDragged || [e type] == NSRightMouseDragged ||
+ [e type] == NSMouseMoved || [e type] == NSTabletPoint || [e type] == NSScrollWheel;
+
+ isTabletEvent = ([e type] == NSTabletPoint) ||
+ (isMouseOrTabletEvent && ([e subtype] == NSTabletPointEventSubtype || [e subtype] == NSTabletProximityEventSubtype));
+
+ if(isMouseOrTabletEvent) {
+ static NSPoint lastpt;
+ NSWindow *window = [e window];
+ NSRect screen = [[[NSScreen screens] objectAtIndex:0] frame];
+ BOOL hasUntrustedPointerDelta;
+
+ // NSEvents for tablets are not consistent wrt deltaXY between events, so we cannot rely on that
+ // Thus tablets will be subject to the warp-pointer bug worked around by the delta, but tablets
+ // are not normally used in cases where that bug would present itself, so this is a fair tradeoff
+ // <rdar://problem/7111003> deltaX and deltaY are incorrect for NSMouseMoved, NSTabletPointEventSubtype
+ // http://xquartz.macosforge.org/trac/ticket/288
+ hasUntrustedPointerDelta = isTabletEvent;
+
+ // The deltaXY for middle click events also appear erroneous after fast user switching
+ // <rdar://problem/7979468> deltaX and deltaY are incorrect for NSOtherMouseDown and NSOtherMouseUp after FUS
+ // http://xquartz.macosforge.org/trac/ticket/389
+ hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSOtherMouseDown || [e type] == NSOtherMouseUp;
+
+ // The deltaXY for scroll events correspond to the scroll delta, not the pointer delta
+ // <rdar://problem/7989690> deltaXY for wheel events are being sent as mouse movement
+ hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSScrollWheel;
+
+#ifdef DEBUG_UNTRUSTED_POINTER_DELTA
+ hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSLeftMouseDown || [e type] == NSLeftMouseUp;
+#endif
+
+ if (window != nil) {
+ NSRect frame = [window frame];
+ location = [e locationInWindow];
+ location.x += frame.origin.x;
+ location.y += frame.origin.y;
+ lastpt = location;
+ } else if(hasUntrustedPointerDelta) {
+#ifdef DEBUG_UNTRUSTED_POINTER_DELTA
+ ErrorF("--- Begin Event Debug ---\n");
+ ErrorF("Event type: %s\n", untrusted_str(e));
+ ErrorF("old lastpt: (%0.2f, %0.2f)\n", lastpt.x, lastpt.y);
+ ErrorF(" delta: (%0.2f, %0.2f)\n", [e deltaX], -[e deltaY]);
+ ErrorF(" location: (%0.2f, %0.2f)\n", lastpt.x + [e deltaX], lastpt.y - [e deltaY]);
+ ErrorF("workaround: (%0.2f, %0.2f)\n", [e locationInWindow].x, [e locationInWindow].y);
+ ErrorF("--- End Event Debug ---\n");
+
+ location.x = lastpt.x + [e deltaX];
+ location.y = lastpt.y - [e deltaY];
+ lastpt = [e locationInWindow];
+#else
+ location = [e locationInWindow];
+ lastpt = location;
+#endif
+ } else {
+ location.x = lastpt.x + [e deltaX];
+ location.y = lastpt.y - [e deltaY];
+ lastpt = [e locationInWindow];
+ }
+
+ /* Convert coordinate system */
+ location.y = (screen.origin.y + screen.size.height) - location.y;
+ }
+
+ modifierFlags = [e modifierFlags];
+
+#ifdef NX_DEVICELCMDKEYMASK
+ /* This is to workaround a bug in the VNC server where we sometimes see the L
+ * modifier and sometimes see no "side"
+ */
+ modifierFlags = ensure_flag(modifierFlags, NX_CONTROLMASK, NX_DEVICELCTLKEYMASK | NX_DEVICERCTLKEYMASK, NX_DEVICELCTLKEYMASK);
+ modifierFlags = ensure_flag(modifierFlags, NX_SHIFTMASK, NX_DEVICELSHIFTKEYMASK | NX_DEVICERSHIFTKEYMASK, NX_DEVICELSHIFTKEYMASK);
+ modifierFlags = ensure_flag(modifierFlags, NX_COMMANDMASK, NX_DEVICELCMDKEYMASK | NX_DEVICERCMDKEYMASK, NX_DEVICELCMDKEYMASK);
+ modifierFlags = ensure_flag(modifierFlags, NX_ALTERNATEMASK, NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK, NX_DEVICELALTKEYMASK);
+#endif
+
+ modifierFlags &= darwin_all_modifier_mask;
+
+ /* We don't receive modifier key events while out of focus, and 3button
+ * emulation mucks this up, so we need to check our modifier flag state
+ * on every event... ugg
+ */
+
+ if(darwin_all_modifier_flags != modifierFlags)
+ DarwinUpdateModKeys(modifierFlags);
+
+ switch ([e type]) {
+ case NSLeftMouseDown: ev_button=1; ev_type=ButtonPress; goto handle_mouse;
+ case NSOtherMouseDown: ev_button=2; ev_type=ButtonPress; goto handle_mouse;
+ case NSRightMouseDown: ev_button=3; ev_type=ButtonPress; goto handle_mouse;
+ case NSLeftMouseUp: ev_button=1; ev_type=ButtonRelease; goto handle_mouse;
+ case NSOtherMouseUp: ev_button=2; ev_type=ButtonRelease; goto handle_mouse;
+ case NSRightMouseUp: ev_button=3; ev_type=ButtonRelease; goto handle_mouse;
+ case NSLeftMouseDragged: ev_button=1; ev_type=MotionNotify; goto handle_mouse;
+ case NSOtherMouseDragged: ev_button=2; ev_type=MotionNotify; goto handle_mouse;
+ case NSRightMouseDragged: ev_button=3; ev_type=MotionNotify; goto handle_mouse;
+ case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
+ case NSTabletPoint: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
+
+ handle_mouse:
+ pDev = darwinPointer;
+
+ /* NSTabletPoint can have no subtype */
+ if([e type] != NSTabletPoint &&
+ [e subtype] == NSTabletProximityEventSubtype) {
+ switch([e pointingDeviceType]) {
+ case NSEraserPointingDevice:
+ darwinTabletCurrent=darwinTabletEraser;
+ break;
+ case NSPenPointingDevice:
+ darwinTabletCurrent=darwinTabletStylus;
+ break;
+ case NSCursorPointingDevice:
+ case NSUnknownPointingDevice:
+ default:
+ darwinTabletCurrent=darwinTabletCursor;
+ break;
+ }
+
+ /* NSTabletProximityEventSubtype doesn't encode pressure ant tilt
+ * So we just pretend the motion was caused by the mouse. Hopefully
+ * we'll have a better solution for this in the future (like maybe
+ * NSTabletProximityEventSubtype will come from NSTabletPoint
+ * rather than NSMouseMoved.
+ pressure = [e pressure];
+ tilt = [e tilt];
+ pDev = darwinTabletCurrent;
+ */
+
+ DarwinSendProximityEvents([e isEnteringProximity] ? ProximityIn : ProximityOut,
+ location.x, location.y);
+ }
+
+ if ([e type] == NSTabletPoint || [e subtype] == NSTabletPointEventSubtype) {
+ pressure = [e pressure];
+ tilt = [e tilt];
+
+ pDev = darwinTabletCurrent;
+ }
+
+ if(!XQuartzServerVisible && noTestExtensions) {
+#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION > 0
+/* Older libXplugin (Tiger/"Stock" Leopard) aren't thread safe, so we can't call xp_find_window from the Appkit thread */
+ xp_window_id wid = 0;
+ xp_error e;
+
+ /* Sigh. Need to check that we're really over one of
+ * our windows. (We need to receive pointer events while
+ * not in the foreground, but we don't want to receive them
+ * when another window is over us or we might show a tooltip)
+ */
+
+ e = xp_find_window(location.x, location.y, 0, &wid);
+
+ if (e != XP_Success || (e == XP_Success && wid == 0))
+#endif
+ {
+ bgMouseLocation = location;
+ bgMouseLocationUpdated = TRUE;
+ return;
+ }
+ }
+
+ if(bgMouseLocationUpdated) {
+ if(!(ev_type == MotionNotify && ev_button == 0)) {
+ DarwinSendPointerEvents(pDev, MotionNotify, 0, location.x,
+ location.y, pressure, tilt.x, tilt.y);
+ }
+ bgMouseLocationUpdated = FALSE;
+ }
+
+ DarwinSendPointerEvents(pDev, ev_type, ev_button, location.x, location.y,
+ pressure, tilt.x, tilt.y);
+
+ break;
+
+ case NSTabletProximity:
+ switch([e pointingDeviceType]) {
+ case NSEraserPointingDevice:
+ darwinTabletCurrent=darwinTabletEraser;
+ break;
+ case NSPenPointingDevice:
+ darwinTabletCurrent=darwinTabletStylus;
+ break;
+ case NSCursorPointingDevice:
+ case NSUnknownPointingDevice:
+ default:
+ darwinTabletCurrent=darwinTabletCursor;
+ break;
+ }
+
+ DarwinSendProximityEvents([e isEnteringProximity] ? ProximityIn : ProximityOut,
+ location.x, location.y);
+ break;
+
+ case NSScrollWheel:
+#if !defined(XPLUGIN_VERSION) || XPLUGIN_VERSION == 0
+ /* If we're in the background, we need to send a MotionNotify event
+ * first, since we aren't getting them on background mouse motion
+ */
+ if(!XQuartzServerVisible && noTestExtensions) {
+ bgMouseLocationUpdated = FALSE;
+ DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, location.x,
+ location.y, pressure, tilt.x, tilt.y);
+ }
+#endif
+ DarwinSendScrollEvents([e deltaX], [e deltaY], location.x, location.y,
+ pressure, tilt.x, tilt.y);
+ break;
+
+ case NSKeyDown: case NSKeyUp:
+ {
+ /* XKB clobbers our keymap at startup, so we need to force it on the first keypress.
+ * TODO: Make this less of a kludge.
+ */
+ static int force_resync_keymap = YES;
+ if(force_resync_keymap) {
+ DarwinSendDDXEvent(kXquartzReloadKeymap, 0);
+ force_resync_keymap = NO;
+ }
+ }
+
+ if(darwinSyncKeymap) {
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
+ TISInputSourceRef key_layout = TISCopyCurrentKeyboardLayoutInputSource();
+ TISInputSourceRef clear;
+ if (CFEqual(key_layout, last_key_layout)) {
+ CFRelease(key_layout);
+ } else {
+ /* Swap/free thread-safely */
+ clear = last_key_layout;
+ last_key_layout = key_layout;
+ CFRelease(clear);
+#else
+ KeyboardLayoutRef key_layout;
+ KLGetCurrentKeyboardLayout(&key_layout);
+ if(key_layout != last_key_layout) {
+ last_key_layout = key_layout;
+#endif
+ /* Update keyInfo */
+ if (!QuartsResyncKeymap(TRUE)) {
+ fprintf(stderr, "sendX11NSEvent: Could not build a valid keymap.\n");
+ }
+ }
+ }
+
+ /* Avoid stuck keys on context switch */
+ if(keyState[[e keyCode]] == [e type])
+ return;
+ keyState[[e keyCode]] = [e type];
+
+ DarwinSendKeyboardEvents(([e type] == NSKeyDown) ? KeyPress : KeyRelease, [e keyCode]);
+ break;
+
+ default: break; /* for gcc */
+ }
+}
+@end
diff --git a/xorg-server/hw/xquartz/bundle/Info.plist.cpp b/xorg-server/hw/xquartz/bundle/Info.plist.cpp
index 0e98218be..a2a22ad64 100644
--- a/xorg-server/hw/xquartz/bundle/Info.plist.cpp
+++ b/xorg-server/hw/xquartz/bundle/Info.plist.cpp
@@ -1,49 +1,49 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>X11</string>
- <key>CFBundleGetInfoString</key>
- <string>LAUNCHD_ID_PREFIX.X11</string>
- <key>CFBundleIconFile</key>
- <string>X11.icns</string>
- <key>CFBundleIdentifier</key>
- <string>LAUNCHD_ID_PREFIX.X11</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>APPLE_APPLICATION_NAME</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>2.6.1</string>
- <key>CFBundleVersion</key>
- <string>2.6.1</string>
- <key>CFBundleSignature</key>
- <string>x11a</string>
- <key>CSResourcesFileMapped</key>
- <true/>
-#ifdef XQUARTZ_SPARKLE
- <key>SUEnableAutomaticChecks</key>
- <true/>
- <key>SUPublicDSAKeyFile</key>
- <string>sparkle.pem</string>
- <key>SUFeedURL</key>
- <string>http://xquartz.macosforge.org/downloads/sparkle/release.xml</string>
-#endif
- <key>LSApplicationCategoryType</key>
- <string>public.app-category.utilities</string>
- <key>NSHumanReadableCopyright</key>
- <string>© 2003-2011 Apple Inc.
-© 2003 XFree86 Project, Inc.
-© 2003-2011 X.org Foundation, Inc.
-</string>
- <key>NSMainNibFile</key>
- <string>main</string>
- <key>NSPrincipalClass</key>
- <string>X11Application</string>
-</dict>
-</plist>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>X11</string>
+ <key>CFBundleGetInfoString</key>
+ <string>LAUNCHD_ID_PREFIX.X11</string>
+ <key>CFBundleIconFile</key>
+ <string>X11.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>LAUNCHD_ID_PREFIX.X11</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>APPLE_APPLICATION_NAME</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>2.6.1</string>
+ <key>CFBundleVersion</key>
+ <string>2.6.1</string>
+ <key>CFBundleSignature</key>
+ <string>x11a</string>
+ <key>CSResourcesFileMapped</key>
+ <true/>
+#ifdef XQUARTZ_SPARKLE
+ <key>SUEnableAutomaticChecks</key>
+ <true/>
+ <key>SUPublicDSAKeyFile</key>
+ <string>sparkle.pem</string>
+ <key>SUFeedURL</key>
+ <string>http://xquartz.macosforge.org/downloads/sparkle/release.xml</string>
+#endif
+ <key>LSApplicationCategoryType</key>
+ <string>public.app-category.utilities</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>© 2003-2011 Apple Inc.
+© 2003 XFree86 Project, Inc.
+© 2003-2011 X.org Foundation, Inc.
+</string>
+ <key>NSMainNibFile</key>
+ <string>main</string>
+ <key>NSPrincipalClass</key>
+ <string>X11Application</string>
+</dict>
+</plist>
diff --git a/xorg-server/hw/xquartz/bundle/Resources/French.lproj/locversion.plist b/xorg-server/hw/xquartz/bundle/Resources/French.lproj/locversion.plist
index 1af1256c3..12eb574ea 100644
--- a/xorg-server/hw/xquartz/bundle/Resources/French.lproj/locversion.plist
+++ b/xorg-server/hw/xquartz/bundle/Resources/French.lproj/locversion.plist
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>LprojCompatibleVersion</key>
- <string>101</string>
- <key>LprojLocale</key>
- <string>fr</string>
- <key>LprojRevisionLevel</key>
- <string>1</string>
- <key>LprojVersion</key>
- <string>101</string>
-</dict>
-</plist>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>LprojCompatibleVersion</key>
+ <string>101</string>
+ <key>LprojLocale</key>
+ <string>fr</string>
+ <key>LprojRevisionLevel</key>
+ <string>1</string>
+ <key>LprojVersion</key>
+ <string>101</string>
+</dict>
+</plist>
diff --git a/xorg-server/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib
index cec363241..8f96e859a 100644
--- a/xorg-server/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib
+++ b/xorg-server/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib
@@ -1,3767 +1,3767 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
- <data>
- <int key="IBDocument.SystemTarget">1040</int>
- <string key="IBDocument.SystemVersion">11A289</string>
- <string key="IBDocument.InterfaceBuilderVersion">851</string>
- <string key="IBDocument.AppKitVersion">1094.2</string>
- <string key="IBDocument.HIToolboxVersion">521.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">851</string>
- </object>
- <array class="NSMutableArray" key="IBDocument.EditedObjectIDs"/>
- <array key="IBDocument.PluginDependencies">
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </array>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
- <integer value="1" key="NS.object.0"/>
- </object>
- <array class="NSMutableArray" key="IBDocument.RootObjects" id="904585544">
- <object class="NSCustomObject" id="815810918">
- <object class="NSMutableString" key="NSClassName">
- <characters key="NS.bytes">NSApplication</characters>
- </object>
- </object>
- <object class="NSCustomObject" id="941939442">
- <string key="NSClassName">FirstResponder</string>
- </object>
- <object class="NSCustomObject" id="951368722">
- <string key="NSClassName">NSApplication</string>
- </object>
- <object class="NSMenu" id="524015605">
- <string key="NSTitle">MainMenu</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="365880285">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">X11</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <object class="NSCustomResource" key="NSOnImage" id="531645050">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSMenuCheckmark</string>
- </object>
- <object class="NSCustomResource" key="NSMixedImage" id="351811234">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSMenuMixedState</string>
- </object>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="576521955">
- <string key="NSTitle">X11</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="139290918">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">À propos d’X11</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="386173216">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Préférences…</string>
- <string key="NSKeyEquiv">,</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="272876017">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="32285361">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Services</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="821388474">
- <object class="NSMutableString" key="NSTitle">
- <characters key="NS.bytes">Services</characters>
- </object>
- <array class="NSMutableArray" key="NSMenuItems"/>
- <string key="NSName">_NSServicesMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="431301145">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="6876565">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Basculer en mode plein écran</string>
- <string key="NSKeyEquiv">a</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="479677589">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="301008465">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Masquer X11</string>
- <string key="NSKeyEquiv">h</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <int key="NSTag">42</int>
- </object>
- <object class="NSMenuItem" id="206802571">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Masquer les autres</string>
- <string key="NSKeyEquiv">h</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1023546148">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Tout afficher</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <int key="NSTag">42</int>
- </object>
- <object class="NSMenuItem" id="848095279">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="274138642">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Quitter X11</string>
- <string key="NSKeyEquiv">q</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- <string key="NSName">_NSAppleMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="868031522">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">Applications</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="981161348">
- <string key="NSTitle">Applications</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="390088328">
- <reference key="NSMenu" ref="981161348"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1065386165">
- <reference key="NSMenu" ref="981161348"/>
- <string key="NSTitle">Personnaliser…</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- <object class="NSMenuItem" id="200491363">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">Édition</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="526778998">
- <string key="NSTitle">Édition</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="185296989">
- <reference key="NSMenu" ref="526778998"/>
- <string key="NSTitle">Copier</string>
- <string key="NSKeyEquiv">c</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- <object class="NSMenuItem" id="931553638">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">Fenêtre</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="96874957">
- <string key="NSTitle">Fenêtre</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="984461797">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Fermer</string>
- <string key="NSKeyEquiv">w</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="677652931">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Placer dans le Dock</string>
- <string key="NSKeyEquiv">m</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1066447520">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Réduire/agrandir</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="280172320">
- <reference key="NSMenu" ref="96874957"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1036389925">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Faire défiler les fenêtres</string>
- <string key="NSKeyEquiv">`</string>
- <int key="NSKeyEquivModMask">1048840</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="369641893">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Faire défiler les fenêtres en sens inverse</string>
- <string key="NSKeyEquiv">`</string>
- <int key="NSKeyEquivModMask">1179648</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="155085383">
- <reference key="NSMenu" ref="96874957"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="276216762">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Tout ramener au premier plan</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- <string key="NSName">_NSWindowsMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="551174276">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">Aide</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="511848303">
- <string key="NSTitle">Aide</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="504984881">
- <reference key="NSMenu" ref="511848303"/>
- <string key="NSTitle">Aide X11</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- </array>
- <string key="NSName">_NSMainMenu</string>
- </object>
- <object class="NSCustomObject" id="485884620">
- <string key="NSClassName">X11Controller</string>
- </object>
- <object class="NSWindowTemplate" id="124913468">
- <int key="NSWindowStyleMask">3</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{414, 417}, {582, 329}}</string>
- <int key="NSWTFlags">1350041600</int>
- <string key="NSWindowTitle">Préférences d’X11</string>
- <string key="NSWindowClass">NSPanel</string>
- <object class="NSMutableString" key="NSViewClass">
- <characters key="NS.bytes">View</characters>
- </object>
- <nil key="NSUserInterfaceItemIdentifier"/>
- <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSWindowContentMinSize">{320, 240}</string>
- <object class="NSView" key="NSWindowView" id="941366957">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSTabView" id="448510093">
- <reference key="NSNextResponder" ref="941366957"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{13, 10}, {556, 313}}</string>
- <reference key="NSSuperview" ref="941366957"/>
- <array class="NSMutableArray" key="NSTabViewItems">
- <object class="NSTabViewItem" id="287591690">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">1</characters>
- </object>
- <object class="NSView" key="NSView" id="596750588">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="119157981">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{67, 235}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="990762273">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Émuler une souris à trois boutons</string>
- <object class="NSFont" key="NSSupport" id="463863101">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">1044</int>
- </object>
- <reference key="NSControlView" ref="119157981"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <object class="NSCustomResource" key="NSNormalImage" id="243093215">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSSwitch</string>
- </object>
- <object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
- <string key="NSImageName">NSSwitch</string>
- </object>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="443008216">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{85, 64}, {385, 42}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="391919450">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Quand cette option est activée, les touches équivalentes de la barre des menus peuvent perturber les applications X11 qui utilisent le modificateur d’instructions virtuelles.</string>
- <object class="NSFont" key="NSSupport" id="26">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">11</double>
- <int key="NSfFlags">3100</int>
- </object>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="443008216"/>
- <object class="NSColor" key="NSBackgroundColor" id="57160303">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlColor</string>
- <object class="NSColor" key="NSColor" id="590688762">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
- </object>
- </object>
- <object class="NSColor" key="NSTextColor" id="930815747">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlTextColor</string>
- <object class="NSColor" key="NSColor" id="214098874">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- </object>
- </object>
- </object>
- </object>
- <object class="NSTextField" id="282885445">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{85, 195}, {385, 34}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="649334366">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string type="base64-UTF8" key="NSContents">TWFpbnRlbmV6IGxhIHRvdWNoZSBPcHRpb24gb3UgQ29tbWFuZGUgZW5mb25jw6llIHRvdXQgZW4gY2xp
-cXVhbnQgcG91ciBhY3RpdmVyIGxlIGJvdXRvbiBkcm9pdCBvdSBjZW50cmFsIGRlIGxhIHNvdXJpcy4K
-A</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="282885445"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="842100515">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{67, 112}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="940564599">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Activer les touches équivalentes sous X11</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="842100515"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="31160162">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{85, 136}, {385, 29}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="666057093">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Autorise les modifications du menu d’entrée pour remplacer la disposition des touches du clavier X11.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="31160162"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="179949713">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{67, 171}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="967619578">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Utiliser la disposition des touches du clavier du système</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="179949713"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="278155937">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{85, 6}, {385, 28}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="617441821">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Une fois activées, les touches option envoient les symboles Alt_L et Alt_R au lieu de Mode_switch.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="278155937"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="406291430">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{67, 40}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="67728988">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Les touches option envoient Alt_L et Alt_R</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="406291430"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {536, 267}}</string>
- </object>
- <string key="NSLabel">Entrée</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="960678392">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">2</characters>
- </object>
- <object class="NSView" key="NSView" id="515308735">
- <reference key="NSNextResponder" ref="448510093"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSPopUpButton" id="709074847">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{104, 223}, {128, 26}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSPopUpButtonCell" key="NSCell" id="633115429">
- <int key="NSCellFlags">-2076049856</int>
- <int key="NSCellFlags2">1024</int>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="709074847"/>
- <int key="NSButtonFlags">109199615</int>
- <int key="NSButtonFlags2">1</int>
- <object class="NSFont" key="NSAlternateImage">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">16</int>
- </object>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- <object class="NSMenuItem" key="NSMenuItem" id="616492372">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">du moniteur</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <int key="NSState">1</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">-1</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- <bool key="NSMenuItemRespectAlignment">YES</bool>
- <object class="NSMenu" key="NSMenu" id="341113515">
- <object class="NSMutableString" key="NSTitle">
- <characters key="NS.bytes">OtherViews</characters>
- </object>
- <array class="NSMutableArray" key="NSMenuItems">
- <reference ref="616492372"/>
- <object class="NSMenuItem" id="759499526">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">256 couleurs</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">8</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- <object class="NSMenuItem" id="543935434">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">milliers</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">15</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- <object class="NSMenuItem" id="836673018">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">millions</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">24</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- </array>
- </object>
- <int key="NSPreferredEdge">3</int>
- <bool key="NSUsesItemFromMenu">YES</bool>
- <bool key="NSAltersState">YES</bool>
- <int key="NSArrowPosition">1</int>
- </object>
- </object>
- <object class="NSTextField" id="201731424">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{33, 226}, {71, 20}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="930265681">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Couleurs :</string>
- <reference key="NSSupport" ref="463863101"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="201731424"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="86150604">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{52, 204}, {392, 14}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="311969422">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Cette option prend effet au prochain lancement d’X11.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="86150604"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="477203622">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{34, 170}, {409, 23}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="631531164">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Mode plein écran</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="477203622"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="57246850">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{53, 109}, {445, 18}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="917248662">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Afficher automatiquement la barre des menus en mode plein écran</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="57246850"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="298603383">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{52, 133}, {385, 31}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="761107402">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Active la fenêtre root X11. Utilisez le raccourci clavier Commande + Option + A pour ouvrir et fermer le mode plein écran.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="298603383"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {536, 267}}</string>
- <reference key="NSSuperview" ref="448510093"/>
- </object>
- <string key="NSLabel">Sortie</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="723450037">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">2</characters>
- </object>
- <object class="NSView" key="NSView" id="408298283">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="878106058">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{25, 235}, {409, 23}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="718083688">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Activer la synchronisation</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="878106058"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="386152084">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{43, 187}, {378, 42}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="572508492">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Active la commande de menu « Copier » et permet la synchronisation entre le presse-papiers de OSX, celui de X11 (CLIPBOARD) et les mémoires tampons principales (PRIMARY).</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="386152084"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="477050998">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{41, 105}, {424, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="501304422">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Mettre à jour CLIPBOARD lorsque le presse-papiers est modifié</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="477050998"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="765780304">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{41, 83}, {489, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="510771323">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Mettre à jour PRIMARY (clic central) lorsque le presse-papiers est modifié</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="765780304"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="1002778833">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{41, 61}, {437, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="897099877">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Mettre à jour le presse-papiers dès la sélection de nouveau texte</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="1002778833"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="487809555">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{41, 163}, {424, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="619977658">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Mettre à jour le presse-papiers lorsque CLIPBOARD est modifié</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="487809555"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="620944856">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{55, 129}, {385, 28}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="461823902">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Désactivez cette option si vous voulez utiliser xclipboard, klipper, ou tout autre gestionnaire de presse-papiers X11.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="620944856"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="522511724">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{55, 29}, {385, 28}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="994587858">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">En raison de limitations du protocole X11, cette option ne fonctionnera pas toujours dans certaines applications.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="522511724"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {536, 267}}</string>
- </object>
- <string key="NSLabel">Presse-papiers</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="10973343">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">2</characters>
- </object>
- <object class="NSView" key="NSView" id="184765684">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="657659108">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{67, 235}, {402, 18}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="259618205">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Activation des fenêtres inactives en un clic</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="657659108"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="290578835">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{75, 198}, {385, 31}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="399127858">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">En cas d’activation de cette option, si vous cliquez sur une fenêtre inactive, celle-ci deviendra active et le clic sera effectif.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="290578835"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="992839333">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{67, 174}, {402, 18}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="959555182">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Activation des fenêtres survolées par la souris</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="992839333"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="138261120">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{75, 140}, {381, 28}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="183409141">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">L’activation des fenêtres X11 suit le curseur. Ceci comporte des effets adverses.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="138261120"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="128352289">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{67, 116}, {402, 18}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="556463187">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Activation des nouvelles fenêtres</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="128352289"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="57161931">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{75, 68}, {385, 42}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="989804990">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Lorsque cette option est activée, la création d’une nouvelle fenêtre X11 fait passer X11.app au premier plan (au lieu de Finder.app, Terminal.app, etc.)</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="57161931"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {536, 267}}</string>
- </object>
- <string key="NSLabel">Fenêtres</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="348328898">
- <object class="NSView" key="NSView" id="300811574">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="989050925">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{67, 235}, {402, 18}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="189594322">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Authentifier les connexions</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="989050925"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="700826966">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{67, 158}, {402, 18}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="489340979">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Autoriser les connexions de clients réseau</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="700826966"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="243093215"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="168436707">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{85, 187}, {385, 42}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="53243865">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Le lancement d’X11 créera des touches de contrôle d’accès Xauthority. Si l’adresse IP du système change, ces touches ne seront plus valides, ce qui risquera d’empêcher le lancement des applications X11.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="168436707"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="363817195">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{85, 96}, {385, 56}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="390084685">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">En cas d’activation de cette option, « Authentifier les connexions » doit aussi être activée pour garantir la sécurité du système. En cas de désactivation, les connexions à partir d’applications distantes sont interdites.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="363817195"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="223835729">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{20, 5}, {404, 14}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="283628678">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Ces options prennent effet au prochain lancement d’X11.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="223835729"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {536, 267}}</string>
- </object>
- <string key="NSLabel">Sécurité</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- </array>
- <reference key="NSSelectedTabViewItem" ref="960678392"/>
- <reference key="NSFont" ref="463863101"/>
- <int key="NSTvFlags">0</int>
- <bool key="NSAllowTruncatedLabels">YES</bool>
- <bool key="NSDrawsBackground">YES</bool>
- <array class="NSMutableArray" key="NSSubviews">
- <reference ref="515308735"/>
- </array>
- </object>
- </array>
- <string key="NSFrameSize">{582, 329}</string>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
- <string key="NSMinSize">{320, 262}</string>
- <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSFrameAutosaveName">x11_prefs</string>
- </object>
- <object class="NSWindowTemplate" id="604417141">
- <int key="NSWindowStyleMask">11</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{302, 440}, {548, 271}}</string>
- <int key="NSWTFlags">1350041600</int>
- <string key="NSWindowTitle">Menu de l’application X11</string>
- <string key="NSWindowClass">NSPanel</string>
- <object class="NSMutableString" key="NSViewClass">
- <characters key="NS.bytes">View</characters>
- </object>
- <nil key="NSUserInterfaceItemIdentifier"/>
- <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSWindowContentMinSize">{320, 240}</string>
- <object class="NSView" key="NSWindowView" id="85544634">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="671954382">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{372, 191}, {162, 32}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="143554520">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">137887744</int>
- <string key="NSContents">Dupliquer</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="671954382"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <object class="NSFont" key="NSAlternateImage" id="549406736">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">16</int>
- </object>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="492358940">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{372, 159}, {162, 32}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="8201128">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">137887744</int>
- <string key="NSContents">Supprimer</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="492358940"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <reference key="NSAlternateImage" ref="549406736"/>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSScrollView" id="1063387772">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">274</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSClipView" id="580565898">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">2304</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSTableView" id="905092943">
- <reference key="NSNextResponder" ref="580565898"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{333, 198}</string>
- <reference key="NSSuperview" ref="580565898"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTableHeaderView" key="NSHeaderView" id="792419186">
- <reference key="NSNextResponder" ref="672307654"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{333, 17}</string>
- <reference key="NSSuperview" ref="672307654"/>
- <reference key="NSTableView" ref="905092943"/>
- </object>
- <object class="_NSCornerView" key="NSCornerView" id="898633680">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{334, 0}, {16, 17}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- </object>
- <array class="NSMutableArray" key="NSTableColumns">
- <object class="NSTableColumn" id="938444323">
- <double key="NSWidth">155</double>
- <double key="NSMinWidth">62.730998992919922</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Nom</string>
- <reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor" id="113872566">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
- </object>
- <object class="NSColor" key="NSTextColor" id="249576247">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerTextColor</string>
- <reference key="NSColor" ref="214098874"/>
- </object>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="825378892">
- <int key="NSCellFlags">338820672</int>
- <int key="NSCellFlags2">1024</int>
- <string key="NSContents">Text Cell</string>
- <reference key="NSSupport" ref="463863101"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="905092943"/>
- <object class="NSColor" key="NSBackgroundColor" id="822946413">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="905092943"/>
- <string key="NSHeaderToolTip"/>
- </object>
- <object class="NSTableColumn" id="84282687">
- <double key="NSWidth">100</double>
- <double key="NSMinWidth">40</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Commande</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSBackgroundColor" ref="113872566"/>
- <reference key="NSTextColor" ref="249576247"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="432610585">
- <int key="NSCellFlags">338820672</int>
- <int key="NSCellFlags2">1024</int>
- <string key="NSContents">Text Cell</string>
- <reference key="NSSupport" ref="463863101"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="905092943"/>
- <reference key="NSBackgroundColor" ref="822946413"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="905092943"/>
- <string key="NSHeaderToolTip"/>
- </object>
- <object class="NSTableColumn" id="242608782">
- <double key="NSWidth">69</double>
- <double key="NSMinWidth">10</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Raccourci</string>
- <reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerColor</string>
- <reference key="NSColor" ref="822946413"/>
- </object>
- <reference key="NSTextColor" ref="249576247"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="34714764">
- <int key="NSCellFlags">338820672</int>
- <int key="NSCellFlags2">1024</int>
- <string key="NSContents">Text Cell</string>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">12</double>
- <int key="NSfFlags">16</int>
- </object>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="905092943"/>
- <bool key="NSDrawsBackground">YES</bool>
- <object class="NSColor" key="NSBackgroundColor" id="812484075">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlBackgroundColor</string>
- <reference key="NSColor" ref="590688762"/>
- </object>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="905092943"/>
- <string key="NSHeaderToolTip"/>
- </object>
- </array>
- <double key="NSIntercellSpacingWidth">3</double>
- <double key="NSIntercellSpacingHeight">2</double>
- <reference key="NSBackgroundColor" ref="822946413"/>
- <object class="NSColor" key="NSGridColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">gridColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC41AA</bytes>
- </object>
- </object>
- <double key="NSRowHeight">17</double>
- <int key="NSTvFlags">1379958784</int>
- <reference key="NSDelegate"/>
- <reference key="NSDataSource"/>
- <int key="NSColumnAutoresizingStyle">1</int>
- <int key="NSDraggingSourceMaskForLocal">-1</int>
- <int key="NSDraggingSourceMaskForNonLocal">0</int>
- <bool key="NSAllowsTypeSelect">YES</bool>
- <int key="NSTableViewDraggingDestinationStyle">0</int>
- <int key="NSTableViewGroupRowStyle">1</int>
- </object>
- </array>
- <string key="NSFrame">{{1, 17}, {333, 198}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <reference key="NSNextKeyView" ref="905092943"/>
- <reference key="NSDocView" ref="905092943"/>
- <reference key="NSBGColor" ref="812484075"/>
- <int key="NScvFlags">4</int>
- </object>
- <object class="NSScroller" id="842897584">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{334, 17}, {15, 198}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <reference key="NSTarget" ref="1063387772"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.99492380000000002</double>
- </object>
- <object class="NSScroller" id="17278747">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{1, 215}, {333, 15}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <int key="NSsFlags">1</int>
- <reference key="NSTarget" ref="1063387772"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.68852460000000004</double>
- </object>
- <object class="NSClipView" id="672307654">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">2304</int>
- <array class="NSMutableArray" key="NSSubviews">
- <reference ref="792419186"/>
- </array>
- <string key="NSFrame">{{1, 0}, {333, 17}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <reference key="NSNextKeyView" ref="792419186"/>
- <reference key="NSDocView" ref="792419186"/>
- <reference key="NSBGColor" ref="812484075"/>
- <int key="NScvFlags">4</int>
- </object>
- <reference ref="898633680"/>
- </array>
- <string key="NSFrame">{{20, 20}, {350, 231}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <reference key="NSNextKeyView" ref="580565898"/>
- <int key="NSsFlags">133170</int>
- <reference key="NSVScroller" ref="842897584"/>
- <reference key="NSHScroller" ref="17278747"/>
- <reference key="NSContentView" ref="580565898"/>
- <reference key="NSHeaderClipView" ref="672307654"/>
- <reference key="NSCornerView" ref="898633680"/>
- <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
- </object>
- <object class="NSButton" id="758204686">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{372, 223}, {162, 32}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="1025474039">
- <int key="NSCellFlags">-2080244224</int>
- <int key="NSCellFlags2">137887744</int>
- <string key="NSContents">Ajouter un élément</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="758204686"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <reference key="NSAlternateImage" ref="549406736"/>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- </array>
- <string key="NSFrameSize">{548, 271}</string>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
- <string key="NSMinSize">{320, 262}</string>
- <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSFrameAutosaveName">x11_apps</string>
- </object>
- <object class="NSMenu" id="294137138">
- <string key="NSTitle">Menu</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="318286212">
- <reference key="NSMenu" ref="294137138"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="511651072">
- <reference key="NSMenu" ref="294137138"/>
- <string key="NSTitle">Applications</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="48278059">
- <string key="NSTitle">Applications</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="563798000">
- <reference key="NSMenu" ref="48278059"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1032342329">
- <reference key="NSMenu" ref="48278059"/>
- <string key="NSTitle">Personnaliser…</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- </array>
- <string key="NSName"/>
- </object>
- </array>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <array class="NSMutableArray" key="connectionRecords">
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">copy:</string>
- <reference key="source" ref="941939442"/>
- <reference key="destination" ref="185296989"/>
- </object>
- <int key="connectionID">181</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">minimize_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="677652931"/>
- </object>
- <int key="connectionID">202</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">close_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="984461797"/>
- </object>
- <int key="connectionID">205</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">zoom_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1066447520"/>
- </object>
- <int key="connectionID">206</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">bring_to_front:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="276216762"/>
- </object>
- <int key="connectionID">207</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">hideOtherApplications:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="206802571"/>
- </object>
- <int key="connectionID">263</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">apps_separator</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="390088328"/>
- </object>
- <int key="connectionID">273</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">apps_table</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="905092943"/>
- </object>
- <int key="connectionID">301</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_delete:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="492358940"/>
- </object>
- <int key="connectionID">303</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_duplicate:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="671954382"/>
- </object>
- <int key="connectionID">304</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_show:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1065386165"/>
- </object>
- <int key="connectionID">308</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_new:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="758204686"/>
- </object>
- <int key="connectionID">311</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_show:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="386173216"/>
- </object>
- <int key="connectionID">318</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">x11_about_item</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="139290918"/>
- </object>
- <int key="connectionID">321</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_auth</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="989050925"/>
- </object>
- <int key="connectionID">387</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_tcp</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="700826966"/>
- </object>
- <int key="connectionID">388</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">depth</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="709074847"/>
- </object>
- <int key="connectionID">389</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">fake_buttons</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="119157981"/>
- </object>
- <int key="connectionID">391</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_keymap</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="179949713"/>
- </object>
- <int key="connectionID">392</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_keyequivs</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="842100515"/>
- </object>
- <int key="connectionID">393</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="119157981"/>
- </object>
- <int key="connectionID">394</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="179949713"/>
- </object>
- <int key="connectionID">395</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="842100515"/>
- </object>
- <int key="connectionID">396</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="709074847"/>
- </object>
- <int key="connectionID">398</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="989050925"/>
- </object>
- <int key="connectionID">399</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="700826966"/>
- </object>
- <int key="connectionID">401</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">prefs_panel</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="124913468"/>
- </object>
- <int key="connectionID">402</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">x11_help:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="504984881"/>
- </object>
- <int key="connectionID">422</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dockMenu</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="294137138"/>
- </object>
- <int key="connectionID">426</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dock_menu</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="294137138"/>
- </object>
- <int key="connectionID">428</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="485884620"/>
- </object>
- <int key="connectionID">429</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">hide:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="301008465"/>
- </object>
- <int key="connectionID">430</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">unhideAllApplications:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="1023546148"/>
- </object>
- <int key="connectionID">431</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">orderFrontStandardAboutPanel:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="139290918"/>
- </object>
- <int key="connectionID">433</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dock_apps_menu</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="48278059"/>
- </object>
- <int key="connectionID">530</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dock_window_separator</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="318286212"/>
- </object>
- <int key="connectionID">531</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_show:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1032342329"/>
- </object>
- <int key="connectionID">534</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">next_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1036389925"/>
- </object>
- <int key="connectionID">539</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">previous_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="369641893"/>
- </object>
- <int key="connectionID">540</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_fullscreen</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477203622"/>
- </object>
- <int key="connectionID">546</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">enable_fullscreen_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477203622"/>
- </object>
- <int key="connectionID">547</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggle_fullscreen:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="6876565"/>
- </object>
- <int key="connectionID">548</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">toggle_fullscreen_item</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="6876565"/>
- </object>
- <int key="connectionID">549</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">menu</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="524015605"/>
- </object>
- <int key="connectionID">300334</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">terminate:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="274138642"/>
- </object>
- <int key="connectionID">300336</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="657659108"/>
- </object>
- <int key="connectionID">300389</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="992839333"/>
- </object>
- <int key="connectionID">300390</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="128352289"/>
- </object>
- <int key="connectionID">300391</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">click_through</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="657659108"/>
- </object>
- <int key="connectionID">300392</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">focus_follows_mouse</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="992839333"/>
- </object>
- <int key="connectionID">300393</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">focus_on_new_window</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="128352289"/>
- </object>
- <int key="connectionID">300394</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">copy_menu_item</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="185296989"/>
- </object>
- <int key="connectionID">300443</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_pasteboard</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="878106058"/>
- </object>
- <int key="connectionID">300444</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_clipboard_to_pasteboard</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="487809555"/>
- </object>
- <int key="connectionID">300461</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_pasteboard_to_clipboard</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477050998"/>
- </object>
- <int key="connectionID">300462</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_pasteboard_to_primary</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="765780304"/>
- </object>
- <int key="connectionID">300463</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_primary_immediately</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1002778833"/>
- </object>
- <int key="connectionID">300464</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="878106058"/>
- </object>
- <int key="connectionID">300465</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="487809555"/>
- </object>
- <int key="connectionID">300466</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477050998"/>
- </object>
- <int key="connectionID">300467</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="765780304"/>
- </object>
- <int key="connectionID">300468</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1002778833"/>
- </object>
- <int key="connectionID">300469</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_text1</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="620944856"/>
- </object>
- <int key="connectionID">300470</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_text2</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="522511724"/>
- </object>
- <int key="connectionID">300471</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_fullscreen_menu</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="57246850"/>
- </object>
- <int key="connectionID">300474</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="57246850"/>
- </object>
- <int key="connectionID">300475</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="406291430"/>
- </object>
- <int key="connectionID">300480</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">option_sends_alt</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="406291430"/>
- </object>
- <int key="connectionID">300481</int>
- </object>
- </array>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <array key="orderedObjects">
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <array key="object" id="0"/>
- <reference key="children" ref="904585544"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-2</int>
- <reference key="object" ref="815810918"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">File's Owner</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="941939442"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">First Responder</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-3</int>
- <reference key="object" ref="951368722"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">Application</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">29</int>
- <reference key="object" ref="524015605"/>
- <array class="NSMutableArray" key="children">
- <reference ref="931553638"/>
- <reference ref="365880285"/>
- <reference ref="200491363"/>
- <reference ref="868031522"/>
- <reference ref="551174276"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">MainMenu</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">19</int>
- <reference key="object" ref="931553638"/>
- <array class="NSMutableArray" key="children">
- <reference ref="96874957"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">24</int>
- <reference key="object" ref="96874957"/>
- <array class="NSMutableArray" key="children">
- <reference ref="677652931"/>
- <reference ref="276216762"/>
- <reference ref="1066447520"/>
- <reference ref="1036389925"/>
- <reference ref="369641893"/>
- <reference ref="155085383"/>
- <reference ref="984461797"/>
- <reference ref="280172320"/>
- </array>
- <reference key="parent" ref="931553638"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">5</int>
- <reference key="object" ref="276216762"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">23</int>
- <reference key="object" ref="677652931"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">92</int>
- <reference key="object" ref="280172320"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">203</int>
- <reference key="object" ref="984461797"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">204</int>
- <reference key="object" ref="1066447520"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">536</int>
- <reference key="object" ref="155085383"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">537</int>
- <reference key="object" ref="1036389925"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">538</int>
- <reference key="object" ref="369641893"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">56</int>
- <reference key="object" ref="365880285"/>
- <array class="NSMutableArray" key="children">
- <reference ref="576521955"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">57</int>
- <reference key="object" ref="576521955"/>
- <array class="NSMutableArray" key="children">
- <reference ref="139290918"/>
- <reference ref="386173216"/>
- <reference ref="32285361"/>
- <reference ref="301008465"/>
- <reference ref="274138642"/>
- <reference ref="272876017"/>
- <reference ref="431301145"/>
- <reference ref="206802571"/>
- <reference ref="848095279"/>
- <reference ref="1023546148"/>
- <reference ref="6876565"/>
- <reference ref="479677589"/>
- </array>
- <reference key="parent" ref="365880285"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">58</int>
- <reference key="object" ref="139290918"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">129</int>
- <reference key="object" ref="386173216"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">131</int>
- <reference key="object" ref="32285361"/>
- <array class="NSMutableArray" key="children">
- <reference ref="821388474"/>
- </array>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">130</int>
- <reference key="object" ref="821388474"/>
- <reference key="parent" ref="32285361"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">134</int>
- <reference key="object" ref="301008465"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">136</int>
- <reference key="object" ref="274138642"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">143</int>
- <reference key="object" ref="272876017"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">144</int>
- <reference key="object" ref="431301145"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">145</int>
- <reference key="object" ref="206802571"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">149</int>
- <reference key="object" ref="848095279"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">150</int>
- <reference key="object" ref="1023546148"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">544</int>
- <reference key="object" ref="6876565"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">545</int>
- <reference key="object" ref="479677589"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">163</int>
- <reference key="object" ref="200491363"/>
- <array class="NSMutableArray" key="children">
- <reference ref="526778998"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">169</int>
- <reference key="object" ref="526778998"/>
- <array class="NSMutableArray" key="children">
- <reference ref="185296989"/>
- </array>
- <reference key="parent" ref="200491363"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">157</int>
- <reference key="object" ref="185296989"/>
- <reference key="parent" ref="526778998"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">269</int>
- <reference key="object" ref="868031522"/>
- <array class="NSMutableArray" key="children">
- <reference ref="981161348"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">270</int>
- <reference key="object" ref="981161348"/>
- <array class="NSMutableArray" key="children">
- <reference ref="390088328"/>
- <reference ref="1065386165"/>
- </array>
- <reference key="parent" ref="868031522"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">272</int>
- <reference key="object" ref="390088328"/>
- <reference key="parent" ref="981161348"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">305</int>
- <reference key="object" ref="1065386165"/>
- <reference key="parent" ref="981161348"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">419</int>
- <reference key="object" ref="551174276"/>
- <array class="NSMutableArray" key="children">
- <reference ref="511848303"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">420</int>
- <reference key="object" ref="511848303"/>
- <array class="NSMutableArray" key="children">
- <reference ref="504984881"/>
- </array>
- <reference key="parent" ref="551174276"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">421</int>
- <reference key="object" ref="504984881"/>
- <reference key="parent" ref="511848303"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">196</int>
- <reference key="object" ref="485884620"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">X11Controller</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">244</int>
- <reference key="object" ref="124913468"/>
- <array class="NSMutableArray" key="children">
- <reference ref="941366957"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">PrefsPanel</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">245</int>
- <reference key="object" ref="941366957"/>
- <array class="NSMutableArray" key="children">
- <reference ref="448510093"/>
- </array>
- <reference key="parent" ref="124913468"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">348</int>
- <reference key="object" ref="448510093"/>
- <array class="NSMutableArray" key="children">
- <reference ref="287591690"/>
- <reference ref="960678392"/>
- <reference ref="348328898"/>
- <reference ref="10973343"/>
- <reference ref="723450037"/>
- </array>
- <reference key="parent" ref="941366957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">349</int>
- <reference key="object" ref="287591690"/>
- <array class="NSMutableArray" key="children">
- <reference ref="596750588"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">351</int>
- <reference key="object" ref="596750588"/>
- <array class="NSMutableArray" key="children">
- <reference ref="119157981"/>
- <reference ref="443008216"/>
- <reference ref="282885445"/>
- <reference ref="842100515"/>
- <reference ref="31160162"/>
- <reference ref="179949713"/>
- <reference ref="278155937"/>
- <reference ref="406291430"/>
- </array>
- <reference key="parent" ref="287591690"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">363</int>
- <reference key="object" ref="119157981"/>
- <array class="NSMutableArray" key="children">
- <reference ref="990762273"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">364</int>
- <reference key="object" ref="443008216"/>
- <array class="NSMutableArray" key="children">
- <reference ref="391919450"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">365</int>
- <reference key="object" ref="282885445"/>
- <array class="NSMutableArray" key="children">
- <reference ref="649334366"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">368</int>
- <reference key="object" ref="842100515"/>
- <array class="NSMutableArray" key="children">
- <reference ref="940564599"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">369</int>
- <reference key="object" ref="31160162"/>
- <array class="NSMutableArray" key="children">
- <reference ref="666057093"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">370</int>
- <reference key="object" ref="179949713"/>
- <array class="NSMutableArray" key="children">
- <reference ref="967619578"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">352</int>
- <reference key="object" ref="960678392"/>
- <array class="NSMutableArray" key="children">
- <reference ref="515308735"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">350</int>
- <reference key="object" ref="515308735"/>
- <array class="NSMutableArray" key="children">
- <reference ref="709074847"/>
- <reference ref="201731424"/>
- <reference ref="86150604"/>
- <reference ref="477203622"/>
- <reference ref="57246850"/>
- <reference ref="298603383"/>
- </array>
- <reference key="parent" ref="960678392"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">382</int>
- <reference key="object" ref="709074847"/>
- <array class="NSMutableArray" key="children">
- <reference ref="633115429"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">385</int>
- <reference key="object" ref="201731424"/>
- <array class="NSMutableArray" key="children">
- <reference ref="930265681"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">386</int>
- <reference key="object" ref="86150604"/>
- <array class="NSMutableArray" key="children">
- <reference ref="311969422"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">541</int>
- <reference key="object" ref="477203622"/>
- <array class="NSMutableArray" key="children">
- <reference ref="631531164"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">543</int>
- <reference key="object" ref="298603383"/>
- <array class="NSMutableArray" key="children">
- <reference ref="761107402"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">353</int>
- <reference key="object" ref="348328898"/>
- <array class="NSMutableArray" key="children">
- <reference ref="300811574"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">354</int>
- <reference key="object" ref="300811574"/>
- <array class="NSMutableArray" key="children">
- <reference ref="989050925"/>
- <reference ref="700826966"/>
- <reference ref="168436707"/>
- <reference ref="363817195"/>
- <reference ref="223835729"/>
- </array>
- <reference key="parent" ref="348328898"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">374</int>
- <reference key="object" ref="989050925"/>
- <array class="NSMutableArray" key="children">
- <reference ref="189594322"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">375</int>
- <reference key="object" ref="700826966"/>
- <array class="NSMutableArray" key="children">
- <reference ref="489340979"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">376</int>
- <reference key="object" ref="168436707"/>
- <array class="NSMutableArray" key="children">
- <reference ref="53243865"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">377</int>
- <reference key="object" ref="363817195"/>
- <array class="NSMutableArray" key="children">
- <reference ref="390084685"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">379</int>
- <reference key="object" ref="223835729"/>
- <array class="NSMutableArray" key="children">
- <reference ref="283628678"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">285</int>
- <reference key="object" ref="604417141"/>
- <array class="NSMutableArray" key="children">
- <reference ref="85544634"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">EditPrograms</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">286</int>
- <reference key="object" ref="85544634"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1063387772"/>
- <reference ref="758204686"/>
- <reference ref="671954382"/>
- <reference ref="492358940"/>
- </array>
- <reference key="parent" ref="604417141"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">423</int>
- <reference key="object" ref="294137138"/>
- <array class="NSMutableArray" key="children">
- <reference ref="318286212"/>
- <reference ref="511651072"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">DockMenu</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">524</int>
- <reference key="object" ref="318286212"/>
- <reference key="parent" ref="294137138"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">526</int>
- <reference key="object" ref="511651072"/>
- <array class="NSMutableArray" key="children">
- <reference ref="48278059"/>
- </array>
- <reference key="parent" ref="294137138"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">527</int>
- <reference key="object" ref="48278059"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1032342329"/>
- <reference ref="563798000"/>
- </array>
- <reference key="parent" ref="511651072"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">532</int>
- <reference key="object" ref="1032342329"/>
- <reference key="parent" ref="48278059"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">533</int>
- <reference key="object" ref="563798000"/>
- <reference key="parent" ref="48278059"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100363</int>
- <reference key="object" ref="990762273"/>
- <reference key="parent" ref="119157981"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100364</int>
- <reference key="object" ref="391919450"/>
- <reference key="parent" ref="443008216"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100365</int>
- <reference key="object" ref="649334366"/>
- <reference key="parent" ref="282885445"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100368</int>
- <reference key="object" ref="940564599"/>
- <reference key="parent" ref="842100515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100369</int>
- <reference key="object" ref="666057093"/>
- <reference key="parent" ref="31160162"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100370</int>
- <reference key="object" ref="967619578"/>
- <reference key="parent" ref="179949713"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100382</int>
- <reference key="object" ref="633115429"/>
- <array class="NSMutableArray" key="children">
- <reference ref="341113515"/>
- </array>
- <reference key="parent" ref="709074847"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100385</int>
- <reference key="object" ref="930265681"/>
- <reference key="parent" ref="201731424"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100386</int>
- <reference key="object" ref="311969422"/>
- <reference key="parent" ref="86150604"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100541</int>
- <reference key="object" ref="631531164"/>
- <reference key="parent" ref="477203622"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100543</int>
- <reference key="object" ref="761107402"/>
- <reference key="parent" ref="298603383"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100374</int>
- <reference key="object" ref="189594322"/>
- <reference key="parent" ref="989050925"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100375</int>
- <reference key="object" ref="489340979"/>
- <reference key="parent" ref="700826966"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100376</int>
- <reference key="object" ref="53243865"/>
- <reference key="parent" ref="168436707"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100377</int>
- <reference key="object" ref="390084685"/>
- <reference key="parent" ref="363817195"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100379</int>
- <reference key="object" ref="283628678"/>
- <reference key="parent" ref="223835729"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">380</int>
- <reference key="object" ref="341113515"/>
- <array class="NSMutableArray" key="children">
- <reference ref="759499526"/>
- <reference ref="616492372"/>
- <reference ref="543935434"/>
- <reference ref="836673018"/>
- </array>
- <reference key="parent" ref="633115429"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">435</int>
- <reference key="object" ref="759499526"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">384</int>
- <reference key="object" ref="616492372"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">383</int>
- <reference key="object" ref="543935434"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">381</int>
- <reference key="object" ref="836673018"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">295</int>
- <reference key="object" ref="1063387772"/>
- <array class="NSMutableArray" key="children">
- <reference ref="792419186"/>
- <reference ref="17278747"/>
- <reference ref="842897584"/>
- <reference ref="905092943"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300295</int>
- <reference key="object" ref="792419186"/>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">200295</int>
- <reference key="object" ref="17278747"/>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100295</int>
- <reference key="object" ref="842897584"/>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">296</int>
- <reference key="object" ref="905092943"/>
- <array class="NSMutableArray" key="children">
- <reference ref="242608782"/>
- <reference ref="938444323"/>
- <reference ref="84282687"/>
- </array>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">535</int>
- <reference key="object" ref="242608782"/>
- <array class="NSMutableArray" key="children">
- <reference ref="34714764"/>
- </array>
- <reference key="parent" ref="905092943"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">575</int>
- <reference key="object" ref="34714764"/>
- <reference key="parent" ref="242608782"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">298</int>
- <reference key="object" ref="938444323"/>
- <array class="NSMutableArray" key="children">
- <reference ref="825378892"/>
- </array>
- <reference key="parent" ref="905092943"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">573</int>
- <reference key="object" ref="825378892"/>
- <reference key="parent" ref="938444323"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">297</int>
- <reference key="object" ref="84282687"/>
- <array class="NSMutableArray" key="children">
- <reference ref="432610585"/>
- </array>
- <reference key="parent" ref="905092943"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">574</int>
- <reference key="object" ref="432610585"/>
- <reference key="parent" ref="84282687"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">310</int>
- <reference key="object" ref="758204686"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1025474039"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100310</int>
- <reference key="object" ref="1025474039"/>
- <reference key="parent" ref="758204686"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">292</int>
- <reference key="object" ref="671954382"/>
- <array class="NSMutableArray" key="children">
- <reference ref="143554520"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100292</int>
- <reference key="object" ref="143554520"/>
- <reference key="parent" ref="671954382"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">293</int>
- <reference key="object" ref="492358940"/>
- <array class="NSMutableArray" key="children">
- <reference ref="8201128"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100293</int>
- <reference key="object" ref="8201128"/>
- <reference key="parent" ref="492358940"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300337</int>
- <reference key="object" ref="10973343"/>
- <array class="NSMutableArray" key="children">
- <reference ref="184765684"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300338</int>
- <reference key="object" ref="184765684"/>
- <array class="NSMutableArray" key="children">
- <reference ref="657659108"/>
- <reference ref="290578835"/>
- <reference ref="992839333"/>
- <reference ref="138261120"/>
- <reference ref="128352289"/>
- <reference ref="57161931"/>
- </array>
- <reference key="parent" ref="10973343"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300358</int>
- <reference key="object" ref="290578835"/>
- <array class="NSMutableArray" key="children">
- <reference ref="399127858"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300359</int>
- <reference key="object" ref="657659108"/>
- <array class="NSMutableArray" key="children">
- <reference ref="259618205"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300360</int>
- <reference key="object" ref="259618205"/>
- <reference key="parent" ref="657659108"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300361</int>
- <reference key="object" ref="399127858"/>
- <reference key="parent" ref="290578835"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300362</int>
- <reference key="object" ref="992839333"/>
- <array class="NSMutableArray" key="children">
- <reference ref="959555182"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300363</int>
- <reference key="object" ref="959555182"/>
- <reference key="parent" ref="992839333"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300364</int>
- <reference key="object" ref="138261120"/>
- <array class="NSMutableArray" key="children">
- <reference ref="183409141"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300365</int>
- <reference key="object" ref="183409141"/>
- <reference key="parent" ref="138261120"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300368</int>
- <reference key="object" ref="128352289"/>
- <array class="NSMutableArray" key="children">
- <reference ref="556463187"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300369</int>
- <reference key="object" ref="556463187"/>
- <reference key="parent" ref="128352289"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300370</int>
- <reference key="object" ref="57161931"/>
- <array class="NSMutableArray" key="children">
- <reference ref="989804990"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300371</int>
- <reference key="object" ref="989804990"/>
- <reference key="parent" ref="57161931"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300421</int>
- <reference key="object" ref="723450037"/>
- <array class="NSMutableArray" key="children">
- <reference ref="408298283"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300422</int>
- <reference key="object" ref="408298283"/>
- <array class="NSMutableArray" key="children">
- <reference ref="878106058"/>
- <reference ref="386152084"/>
- <reference ref="487809555"/>
- <reference ref="620944856"/>
- <reference ref="477050998"/>
- <reference ref="765780304"/>
- <reference ref="1002778833"/>
- <reference ref="522511724"/>
- </array>
- <reference key="parent" ref="723450037"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300423</int>
- <reference key="object" ref="386152084"/>
- <array class="NSMutableArray" key="children">
- <reference ref="572508492"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300424</int>
- <reference key="object" ref="878106058"/>
- <array class="NSMutableArray" key="children">
- <reference ref="718083688"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300440</int>
- <reference key="object" ref="718083688"/>
- <reference key="parent" ref="878106058"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300441</int>
- <reference key="object" ref="572508492"/>
- <reference key="parent" ref="386152084"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300447</int>
- <reference key="object" ref="477050998"/>
- <array class="NSMutableArray" key="children">
- <reference ref="501304422"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300450</int>
- <reference key="object" ref="501304422"/>
- <reference key="parent" ref="477050998"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300451</int>
- <reference key="object" ref="765780304"/>
- <array class="NSMutableArray" key="children">
- <reference ref="510771323"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300452</int>
- <reference key="object" ref="510771323"/>
- <reference key="parent" ref="765780304"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300453</int>
- <reference key="object" ref="487809555"/>
- <array class="NSMutableArray" key="children">
- <reference ref="619977658"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300454</int>
- <reference key="object" ref="619977658"/>
- <reference key="parent" ref="487809555"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300455</int>
- <reference key="object" ref="620944856"/>
- <array class="NSMutableArray" key="children">
- <reference ref="461823902"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300456</int>
- <reference key="object" ref="461823902"/>
- <reference key="parent" ref="620944856"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300457</int>
- <reference key="object" ref="1002778833"/>
- <array class="NSMutableArray" key="children">
- <reference ref="897099877"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300458</int>
- <reference key="object" ref="897099877"/>
- <reference key="parent" ref="1002778833"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300459</int>
- <reference key="object" ref="522511724"/>
- <array class="NSMutableArray" key="children">
- <reference ref="994587858"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300460</int>
- <reference key="object" ref="994587858"/>
- <reference key="parent" ref="522511724"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300472</int>
- <reference key="object" ref="57246850"/>
- <array class="NSMutableArray" key="children">
- <reference ref="917248662"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300473</int>
- <reference key="object" ref="917248662"/>
- <reference key="parent" ref="57246850"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300476</int>
- <reference key="object" ref="278155937"/>
- <array class="NSMutableArray" key="children">
- <reference ref="617441821"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300477</int>
- <reference key="object" ref="406291430"/>
- <array class="NSMutableArray" key="children">
- <reference ref="67728988"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300478</int>
- <reference key="object" ref="67728988"/>
- <reference key="parent" ref="406291430"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300479</int>
- <reference key="object" ref="617441821"/>
- <reference key="parent" ref="278155937"/>
- </object>
- </array>
- </object>
- <dictionary class="NSMutableDictionary" key="flattenedProperties">
- <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="-3.ImportedFromIB2"/>
- <string key="100292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="100295.IBShouldRemoveOnLegacySave"/>
- <string key="100310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="129.ImportedFromIB2"/>
- <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="130.ImportedFromIB2"/>
- <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="131.ImportedFromIB2"/>
- <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="134.ImportedFromIB2"/>
- <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="136.ImportedFromIB2"/>
- <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="143.ImportedFromIB2"/>
- <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="144.ImportedFromIB2"/>
- <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="145.ImportedFromIB2"/>
- <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="149.ImportedFromIB2"/>
- <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="150.ImportedFromIB2"/>
- <string key="157.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="157.ImportedFromIB2"/>
- <string key="163.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="163.ImportedFromIB2"/>
- <string key="169.IBEditorWindowLastContentRect">{{168, 821}, {113, 23}}</string>
- <string key="169.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="169.ImportedFromIB2"/>
- <string key="169.editorWindowContentRectSynchronizationRect">{{202, 626}, {154, 153}}</string>
- <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="19.ImportedFromIB2"/>
- <integer value="1" key="196.ImportedFromIB2"/>
- <string key="200295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="200295.IBShouldRemoveOnLegacySave"/>
- <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="203.ImportedFromIB2"/>
- <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="204.ImportedFromIB2"/>
- <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="23.ImportedFromIB2"/>
- <string key="24.IBEditorWindowLastContentRect">{{349, 868}, {315, 143}}</string>
- <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="24.ImportedFromIB2"/>
- <string key="24.editorWindowContentRectSynchronizationRect">{{271, 666}, {301, 153}}</string>
- <string key="244.IBEditorWindowLastContentRect">{{507, 565}, {484, 308}}</string>
- <string key="244.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="244.IBWindowTemplateEditedContentRect">{{507, 565}, {484, 308}}</string>
- <integer value="1" key="244.ImportedFromIB2"/>
- <string key="244.editorWindowContentRectSynchronizationRect">{{184, 290}, {481, 345}}</string>
- <integer value="0" key="244.windowTemplate.hasMaxSize"/>
- <integer value="1" key="244.windowTemplate.hasMinSize"/>
- <string key="244.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="244.windowTemplate.minSize">{320, 240}</string>
- <string key="245.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="245.ImportedFromIB2"/>
- <string key="269.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="269.ImportedFromIB2"/>
- <string key="270.IBEditorWindowLastContentRect">{{58, 803}, {155, 33}}</string>
- <string key="270.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="270.ImportedFromIB2"/>
- <string key="270.editorWindowContentRectSynchronizationRect">{{100, 746}, {155, 33}}</string>
- <string key="272.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="272.ImportedFromIB2"/>
- <string key="285.IBEditorWindowLastContentRect">{{68, 585}, {454, 271}}</string>
- <string key="285.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="285.IBViewEditorWindowController.showingBoundsRectangles"/>
- <integer value="1" key="285.IBViewEditorWindowController.showingLayoutRectangles"/>
- <string key="285.IBWindowTemplateEditedContentRect">{{68, 585}, {454, 271}}</string>
- <integer value="1" key="285.ImportedFromIB2"/>
- <string key="285.editorWindowContentRectSynchronizationRect">{{433, 406}, {486, 327}}</string>
- <integer value="0" key="285.windowTemplate.hasMaxSize"/>
- <integer value="1" key="285.windowTemplate.hasMinSize"/>
- <string key="285.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="285.windowTemplate.minSize">{320, 240}</string>
- <string key="286.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="286.ImportedFromIB2"/>
- <string key="29.IBEditorWindowLastContentRect">{{145, 1011}, {336, 20}}</string>
- <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="29.ImportedFromIB2"/>
- <string key="29.editorWindowContentRectSynchronizationRect">{{67, 819}, {336, 20}}</string>
- <string key="292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="292.ImportedFromIB2"/>
- <string key="293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="293.ImportedFromIB2"/>
- <string key="295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="295.ImportedFromIB2"/>
- <string key="296.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="296.ImportedFromIB2"/>
- <string key="297.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="297.ImportedFromIB2"/>
- <string key="298.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="298.ImportedFromIB2"/>
- <string key="300295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300295.IBShouldRemoveOnLegacySave"/>
- <string key="300337.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300337.ImportedFromIB2"/>
- <string key="300338.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300338.ImportedFromIB2"/>
- <string key="300358.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300358.ImportedFromIB2"/>
- <string key="300359.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300359.ImportedFromIB2"/>
- <string key="300360.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300361.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300362.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300362.ImportedFromIB2"/>
- <string key="300363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300364.ImportedFromIB2"/>
- <string key="300365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300368.ImportedFromIB2"/>
- <string key="300369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300370.ImportedFromIB2"/>
- <string key="300371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300421.ImportedFromIB2"/>
- <string key="300422.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300422.ImportedFromIB2"/>
- <string key="300423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300423.ImportedFromIB2"/>
- <string key="300424.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300424.ImportedFromIB2"/>
- <string key="300440.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300441.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300447.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300447.ImportedFromIB2"/>
- <string key="300450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300451.ImportedFromIB2"/>
- <string key="300452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300453.ImportedFromIB2"/>
- <string key="300454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300455.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300455.ImportedFromIB2"/>
- <string key="300456.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300457.ImportedFromIB2"/>
- <string key="300458.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300459.ImportedFromIB2"/>
- <string key="300460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300472.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300472.ImportedFromIB2"/>
- <string key="300473.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300476.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300476.ImportedFromIB2"/>
- <string key="300477.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300477.ImportedFromIB2"/>
- <string key="300478.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300479.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="305.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="305.ImportedFromIB2"/>
- <string key="310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="310.ImportedFromIB2"/>
- <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="348.ImportedFromIB2"/>
- <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="349.ImportedFromIB2"/>
- <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="350.ImportedFromIB2"/>
- <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="351.ImportedFromIB2"/>
- <string key="352.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="352.ImportedFromIB2"/>
- <string key="353.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="353.ImportedFromIB2"/>
- <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="354.ImportedFromIB2"/>
- <string key="363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="363.ImportedFromIB2"/>
- <string key="364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="364.ImportedFromIB2"/>
- <string key="365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="365.ImportedFromIB2"/>
- <string key="368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="368.ImportedFromIB2"/>
- <string key="369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="369.ImportedFromIB2"/>
- <string key="370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="370.ImportedFromIB2"/>
- <string key="374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="374.ImportedFromIB2"/>
- <string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="375.ImportedFromIB2"/>
- <string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="376.ImportedFromIB2"/>
- <string key="377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="377.ImportedFromIB2"/>
- <string key="379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="379.ImportedFromIB2"/>
- <string key="380.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="380.ImportedFromIB2"/>
- <string key="381.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="381.ImportedFromIB2"/>
- <string key="382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="382.ImportedFromIB2"/>
- <string key="383.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="383.ImportedFromIB2"/>
- <string key="384.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="384.ImportedFromIB2"/>
- <string key="385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="385.ImportedFromIB2"/>
- <string key="386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="386.ImportedFromIB2"/>
- <string key="419.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="419.ImportedFromIB2"/>
- <string key="420.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="420.ImportedFromIB2"/>
- <string key="421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="421.ImportedFromIB2"/>
- <string key="423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="423.ImportedFromIB2"/>
- <string key="435.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="435.ImportedFromIB2"/>
- <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="5.ImportedFromIB2"/>
- <string key="524.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="524.ImportedFromIB2"/>
- <string key="526.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="526.ImportedFromIB2"/>
- <string key="527.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="527.ImportedFromIB2"/>
- <string key="532.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="532.ImportedFromIB2"/>
- <string key="533.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="533.ImportedFromIB2"/>
- <string key="535.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="535.ImportedFromIB2"/>
- <string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="536.ImportedFromIB2"/>
- <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="537.ImportedFromIB2"/>
- <string key="538.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="538.ImportedFromIB2"/>
- <string key="541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="541.ImportedFromIB2"/>
- <string key="543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="543.ImportedFromIB2"/>
- <string key="544.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="544.ImportedFromIB2"/>
- <string key="545.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="545.ImportedFromIB2"/>
- <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="56.ImportedFromIB2"/>
- <string key="57.IBEditorWindowLastContentRect">{{20, 641}, {218, 203}}</string>
- <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="57.ImportedFromIB2"/>
- <string key="57.editorWindowContentRectSynchronizationRect">{{79, 616}, {218, 203}}</string>
- <string key="573.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="573.ImportedFromIB2"/>
- <string key="574.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="574.ImportedFromIB2"/>
- <string key="575.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="575.ImportedFromIB2"/>
- <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="58.ImportedFromIB2"/>
- <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="92.ImportedFromIB2"/>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
- <nil key="activeLocalization"/>
- <dictionary class="NSMutableDictionary" key="localizations"/>
- <nil key="sourceID"/>
- <int key="maxID">300481</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <array class="NSMutableArray" key="referencedPartialClassDescriptions">
- <object class="IBPartialClassDescription">
- <string key="className">FirstResponder</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSFormatter</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">X11Controller</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- </array>
- <array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
- <object class="IBPartialClassDescription">
- <string key="className">X11Controller</string>
- <string key="superclassName">NSObject</string>
- <dictionary class="NSMutableDictionary" key="actions">
- <string key="apps_table_delete:">id</string>
- <string key="apps_table_done:">id</string>
- <string key="apps_table_duplicate:">id</string>
- <string key="apps_table_new:">id</string>
- <string key="apps_table_show:">id</string>
- <string key="bring_to_front:">id</string>
- <string key="close_window:">id</string>
- <string key="enable_fullscreen_changed:">id</string>
- <string key="minimize_window:">id</string>
- <string key="next_window:">id</string>
- <string key="prefs_changed:">id</string>
- <string key="prefs_show:">id</string>
- <string key="previous_window:">id</string>
- <string key="quit:">id</string>
- <string key="toggle_fullscreen:">id</string>
- <string key="x11_help:">id</string>
- <string key="zoom_window:">id</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="actionInfosByName">
- <object class="IBActionInfo" key="apps_table_delete:">
- <string key="name">apps_table_delete:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_done:">
- <string key="name">apps_table_done:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_duplicate:">
- <string key="name">apps_table_duplicate:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_new:">
- <string key="name">apps_table_new:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_show:">
- <string key="name">apps_table_show:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="bring_to_front:">
- <string key="name">bring_to_front:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="close_window:">
- <string key="name">close_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="enable_fullscreen_changed:">
- <string key="name">enable_fullscreen_changed:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="minimize_window:">
- <string key="name">minimize_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="next_window:">
- <string key="name">next_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="prefs_changed:">
- <string key="name">prefs_changed:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="prefs_show:">
- <string key="name">prefs_show:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="previous_window:">
- <string key="name">previous_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="quit:">
- <string key="name">quit:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="toggle_fullscreen:">
- <string key="name">toggle_fullscreen:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="x11_help:">
- <string key="name">x11_help:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="zoom_window:">
- <string key="name">zoom_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="outlets">
- <string key="apps_separator">NSMenuItem</string>
- <string key="apps_table">NSTableView</string>
- <string key="click_through">NSButton</string>
- <string key="copy_menu_item">NSMenuItem</string>
- <string key="depth">NSPopUpButton</string>
- <string key="dock_apps_menu">NSMenu</string>
- <string key="dock_menu">NSMenu</string>
- <string key="dock_window_separator">NSMenuItem</string>
- <string key="enable_auth">NSButton</string>
- <string key="enable_fullscreen">NSButton</string>
- <string key="enable_fullscreen_menu">NSButton</string>
- <string key="enable_keyequivs">NSButton</string>
- <string key="enable_tcp">NSButton</string>
- <string key="fake_buttons">NSButton</string>
- <string key="focus_follows_mouse">NSButton</string>
- <string key="focus_on_new_window">NSButton</string>
- <string key="option_sends_alt">NSButton</string>
- <string key="prefs_panel">NSPanel</string>
- <string key="sync_clipboard_to_pasteboard">NSButton</string>
- <string key="sync_keymap">NSButton</string>
- <string key="sync_pasteboard">NSButton</string>
- <string key="sync_pasteboard_to_clipboard">NSButton</string>
- <string key="sync_pasteboard_to_primary">NSButton</string>
- <string key="sync_primary_immediately">NSButton</string>
- <string key="sync_text1">NSTextField</string>
- <string key="sync_text2">NSTextField</string>
- <string key="toggle_fullscreen_item">NSMenuItem</string>
- <string key="use_sysbeep">NSButton</string>
- <string key="window_separator">NSMenuItem</string>
- <string key="x11_about_item">NSMenuItem</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
- <object class="IBToOneOutletInfo" key="apps_separator">
- <string key="name">apps_separator</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="apps_table">
- <string key="name">apps_table</string>
- <string key="candidateClassName">NSTableView</string>
- </object>
- <object class="IBToOneOutletInfo" key="click_through">
- <string key="name">click_through</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="copy_menu_item">
- <string key="name">copy_menu_item</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="depth">
- <string key="name">depth</string>
- <string key="candidateClassName">NSPopUpButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="dock_apps_menu">
- <string key="name">dock_apps_menu</string>
- <string key="candidateClassName">NSMenu</string>
- </object>
- <object class="IBToOneOutletInfo" key="dock_menu">
- <string key="name">dock_menu</string>
- <string key="candidateClassName">NSMenu</string>
- </object>
- <object class="IBToOneOutletInfo" key="dock_window_separator">
- <string key="name">dock_window_separator</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_auth">
- <string key="name">enable_auth</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_fullscreen">
- <string key="name">enable_fullscreen</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_fullscreen_menu">
- <string key="name">enable_fullscreen_menu</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_keyequivs">
- <string key="name">enable_keyequivs</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_tcp">
- <string key="name">enable_tcp</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="fake_buttons">
- <string key="name">fake_buttons</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="focus_follows_mouse">
- <string key="name">focus_follows_mouse</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="focus_on_new_window">
- <string key="name">focus_on_new_window</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="option_sends_alt">
- <string key="name">option_sends_alt</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="prefs_panel">
- <string key="name">prefs_panel</string>
- <string key="candidateClassName">NSPanel</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_clipboard_to_pasteboard">
- <string key="name">sync_clipboard_to_pasteboard</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_keymap">
- <string key="name">sync_keymap</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_pasteboard">
- <string key="name">sync_pasteboard</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_pasteboard_to_clipboard">
- <string key="name">sync_pasteboard_to_clipboard</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_pasteboard_to_primary">
- <string key="name">sync_pasteboard_to_primary</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_primary_immediately">
- <string key="name">sync_primary_immediately</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_text1">
- <string key="name">sync_text1</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_text2">
- <string key="name">sync_text2</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="toggle_fullscreen_item">
- <string key="name">toggle_fullscreen_item</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="use_sysbeep">
- <string key="name">use_sysbeep</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="window_separator">
- <string key="name">window_separator</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="x11_about_item">
- <string key="name">x11_about_item</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- </dictionary>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBDocumentRelativeSource</string>
- <string key="minorKey">../../../X11Controller.h</string>
- </object>
- </object>
- </array>
- </object>
- <int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
- <integer value="1040" key="NS.object.0"/>
- </object>
- <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">../X11.xcodeproj</string>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
- <string key="NSMenuCheckmark">{9, 8}</string>
- <string key="NSMenuMixedState">{7, 2}</string>
- <string key="NSSwitch">{15, 15}</string>
- </dictionary>
- </data>
-</archive>
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1040</int>
+ <string key="IBDocument.SystemVersion">11A289</string>
+ <string key="IBDocument.InterfaceBuilderVersion">851</string>
+ <string key="IBDocument.AppKitVersion">1094.2</string>
+ <string key="IBDocument.HIToolboxVersion">521.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="NS.object.0">851</string>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.EditedObjectIDs"/>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="904585544">
+ <object class="NSCustomObject" id="815810918">
+ <object class="NSMutableString" key="NSClassName">
+ <characters key="NS.bytes">NSApplication</characters>
+ </object>
+ </object>
+ <object class="NSCustomObject" id="941939442">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="951368722">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSMenu" id="524015605">
+ <string key="NSTitle">MainMenu</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="365880285">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">X11</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <object class="NSCustomResource" key="NSOnImage" id="531645050">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuCheckmark</string>
+ </object>
+ <object class="NSCustomResource" key="NSMixedImage" id="351811234">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuMixedState</string>
+ </object>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="576521955">
+ <string key="NSTitle">X11</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="139290918">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">À propos d’X11</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="386173216">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Préférences…</string>
+ <string key="NSKeyEquiv">,</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="272876017">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="32285361">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Services</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="821388474">
+ <object class="NSMutableString" key="NSTitle">
+ <characters key="NS.bytes">Services</characters>
+ </object>
+ <array class="NSMutableArray" key="NSMenuItems"/>
+ <string key="NSName">_NSServicesMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="431301145">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="6876565">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Basculer en mode plein écran</string>
+ <string key="NSKeyEquiv">a</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="479677589">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="301008465">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Masquer X11</string>
+ <string key="NSKeyEquiv">h</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <int key="NSTag">42</int>
+ </object>
+ <object class="NSMenuItem" id="206802571">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Masquer les autres</string>
+ <string key="NSKeyEquiv">h</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1023546148">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Tout afficher</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <int key="NSTag">42</int>
+ </object>
+ <object class="NSMenuItem" id="848095279">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="274138642">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Quitter X11</string>
+ <string key="NSKeyEquiv">q</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ <string key="NSName">_NSAppleMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="868031522">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">Applications</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="981161348">
+ <string key="NSTitle">Applications</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="390088328">
+ <reference key="NSMenu" ref="981161348"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1065386165">
+ <reference key="NSMenu" ref="981161348"/>
+ <string key="NSTitle">Personnaliser…</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="200491363">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">Édition</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="526778998">
+ <string key="NSTitle">Édition</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="185296989">
+ <reference key="NSMenu" ref="526778998"/>
+ <string key="NSTitle">Copier</string>
+ <string key="NSKeyEquiv">c</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="931553638">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">Fenêtre</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="96874957">
+ <string key="NSTitle">Fenêtre</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="984461797">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Fermer</string>
+ <string key="NSKeyEquiv">w</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="677652931">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Placer dans le Dock</string>
+ <string key="NSKeyEquiv">m</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1066447520">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Réduire/agrandir</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="280172320">
+ <reference key="NSMenu" ref="96874957"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1036389925">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Faire défiler les fenêtres</string>
+ <string key="NSKeyEquiv">`</string>
+ <int key="NSKeyEquivModMask">1048840</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="369641893">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Faire défiler les fenêtres en sens inverse</string>
+ <string key="NSKeyEquiv">`</string>
+ <int key="NSKeyEquivModMask">1179648</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="155085383">
+ <reference key="NSMenu" ref="96874957"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="276216762">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Tout ramener au premier plan</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ <string key="NSName">_NSWindowsMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="551174276">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">Aide</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="511848303">
+ <string key="NSTitle">Aide</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="504984881">
+ <reference key="NSMenu" ref="511848303"/>
+ <string key="NSTitle">Aide X11</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ </array>
+ <string key="NSName">_NSMainMenu</string>
+ </object>
+ <object class="NSCustomObject" id="485884620">
+ <string key="NSClassName">X11Controller</string>
+ </object>
+ <object class="NSWindowTemplate" id="124913468">
+ <int key="NSWindowStyleMask">3</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{414, 417}, {582, 329}}</string>
+ <int key="NSWTFlags">1350041600</int>
+ <string key="NSWindowTitle">Préférences d’X11</string>
+ <string key="NSWindowClass">NSPanel</string>
+ <object class="NSMutableString" key="NSViewClass">
+ <characters key="NS.bytes">View</characters>
+ </object>
+ <nil key="NSUserInterfaceItemIdentifier"/>
+ <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSWindowContentMinSize">{320, 240}</string>
+ <object class="NSView" key="NSWindowView" id="941366957">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSTabView" id="448510093">
+ <reference key="NSNextResponder" ref="941366957"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{13, 10}, {556, 313}}</string>
+ <reference key="NSSuperview" ref="941366957"/>
+ <array class="NSMutableArray" key="NSTabViewItems">
+ <object class="NSTabViewItem" id="287591690">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">1</characters>
+ </object>
+ <object class="NSView" key="NSView" id="596750588">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="119157981">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{67, 235}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="990762273">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Émuler une souris à trois boutons</string>
+ <object class="NSFont" key="NSSupport" id="463863101">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="119157981"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="243093215">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSSwitch</string>
+ </object>
+ <object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
+ <string key="NSImageName">NSSwitch</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="443008216">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{85, 64}, {385, 42}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="391919450">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Quand cette option est activée, les touches équivalentes de la barre des menus peuvent perturber les applications X11 qui utilisent le modificateur d’instructions virtuelles.</string>
+ <object class="NSFont" key="NSSupport" id="26">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">11</double>
+ <int key="NSfFlags">3100</int>
+ </object>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="443008216"/>
+ <object class="NSColor" key="NSBackgroundColor" id="57160303">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlColor</string>
+ <object class="NSColor" key="NSColor" id="590688762">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="930815747">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlTextColor</string>
+ <object class="NSColor" key="NSColor" id="214098874">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSTextField" id="282885445">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{85, 195}, {385, 34}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="649334366">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string type="base64-UTF8" key="NSContents">TWFpbnRlbmV6IGxhIHRvdWNoZSBPcHRpb24gb3UgQ29tbWFuZGUgZW5mb25jw6llIHRvdXQgZW4gY2xp
+cXVhbnQgcG91ciBhY3RpdmVyIGxlIGJvdXRvbiBkcm9pdCBvdSBjZW50cmFsIGRlIGxhIHNvdXJpcy4K
+A</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="282885445"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="842100515">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{67, 112}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="940564599">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Activer les touches équivalentes sous X11</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="842100515"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="31160162">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{85, 136}, {385, 29}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="666057093">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Autorise les modifications du menu d’entrée pour remplacer la disposition des touches du clavier X11.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="31160162"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="179949713">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{67, 171}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="967619578">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Utiliser la disposition des touches du clavier du système</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="179949713"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="278155937">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{85, 6}, {385, 28}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="617441821">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Une fois activées, les touches option envoient les symboles Alt_L et Alt_R au lieu de Mode_switch.</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="278155937"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="406291430">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{67, 40}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="67728988">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Les touches option envoient Alt_L et Alt_R</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="406291430"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {536, 267}}</string>
+ </object>
+ <string key="NSLabel">Entrée</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="960678392">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">2</characters>
+ </object>
+ <object class="NSView" key="NSView" id="515308735">
+ <reference key="NSNextResponder" ref="448510093"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSPopUpButton" id="709074847">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{104, 223}, {128, 26}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSPopUpButtonCell" key="NSCell" id="633115429">
+ <int key="NSCellFlags">-2076049856</int>
+ <int key="NSCellFlags2">1024</int>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="709074847"/>
+ <int key="NSButtonFlags">109199615</int>
+ <int key="NSButtonFlags2">1</int>
+ <object class="NSFont" key="NSAlternateImage">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ <object class="NSMenuItem" key="NSMenuItem" id="616492372">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">du moniteur</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <int key="NSState">1</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">-1</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ <bool key="NSMenuItemRespectAlignment">YES</bool>
+ <object class="NSMenu" key="NSMenu" id="341113515">
+ <object class="NSMutableString" key="NSTitle">
+ <characters key="NS.bytes">OtherViews</characters>
+ </object>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <reference ref="616492372"/>
+ <object class="NSMenuItem" id="759499526">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">256 couleurs</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">8</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ <object class="NSMenuItem" id="543935434">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">milliers</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">15</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ <object class="NSMenuItem" id="836673018">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">millions</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">24</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ </array>
+ </object>
+ <int key="NSPreferredEdge">3</int>
+ <bool key="NSUsesItemFromMenu">YES</bool>
+ <bool key="NSAltersState">YES</bool>
+ <int key="NSArrowPosition">1</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="201731424">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{33, 226}, {71, 20}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="930265681">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Couleurs :</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="201731424"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="86150604">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{52, 204}, {392, 14}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="311969422">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Cette option prend effet au prochain lancement d’X11.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="86150604"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="477203622">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{34, 170}, {409, 23}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="631531164">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Mode plein écran</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="477203622"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="57246850">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{53, 109}, {445, 18}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="917248662">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Afficher automatiquement la barre des menus en mode plein écran</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="57246850"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="298603383">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{52, 133}, {385, 31}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="761107402">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Active la fenêtre root X11. Utilisez le raccourci clavier Commande + Option + A pour ouvrir et fermer le mode plein écran.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="298603383"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {536, 267}}</string>
+ <reference key="NSSuperview" ref="448510093"/>
+ </object>
+ <string key="NSLabel">Sortie</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="723450037">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">2</characters>
+ </object>
+ <object class="NSView" key="NSView" id="408298283">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="878106058">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{25, 235}, {409, 23}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="718083688">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Activer la synchronisation</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="878106058"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="386152084">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{43, 187}, {378, 42}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="572508492">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Active la commande de menu « Copier » et permet la synchronisation entre le presse-papiers de OSX, celui de X11 (CLIPBOARD) et les mémoires tampons principales (PRIMARY).</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="386152084"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="477050998">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{41, 105}, {424, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="501304422">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Mettre à jour CLIPBOARD lorsque le presse-papiers est modifié</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="477050998"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="765780304">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{41, 83}, {489, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="510771323">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Mettre à jour PRIMARY (clic central) lorsque le presse-papiers est modifié</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="765780304"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="1002778833">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{41, 61}, {437, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="897099877">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Mettre à jour le presse-papiers dès la sélection de nouveau texte</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="1002778833"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="487809555">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{41, 163}, {424, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="619977658">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Mettre à jour le presse-papiers lorsque CLIPBOARD est modifié</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="487809555"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="620944856">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{55, 129}, {385, 28}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="461823902">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Désactivez cette option si vous voulez utiliser xclipboard, klipper, ou tout autre gestionnaire de presse-papiers X11.</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="620944856"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="522511724">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{55, 29}, {385, 28}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="994587858">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">En raison de limitations du protocole X11, cette option ne fonctionnera pas toujours dans certaines applications.</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="522511724"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {536, 267}}</string>
+ </object>
+ <string key="NSLabel">Presse-papiers</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="10973343">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">2</characters>
+ </object>
+ <object class="NSView" key="NSView" id="184765684">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="657659108">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{67, 235}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="259618205">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Activation des fenêtres inactives en un clic</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="657659108"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="290578835">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{75, 198}, {385, 31}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="399127858">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">En cas d’activation de cette option, si vous cliquez sur une fenêtre inactive, celle-ci deviendra active et le clic sera effectif.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="290578835"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="992839333">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{67, 174}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="959555182">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Activation des fenêtres survolées par la souris</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="992839333"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="138261120">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{75, 140}, {381, 28}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="183409141">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">L’activation des fenêtres X11 suit le curseur. Ceci comporte des effets adverses.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="138261120"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="128352289">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{67, 116}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="556463187">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Activation des nouvelles fenêtres</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="128352289"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="57161931">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{75, 68}, {385, 42}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="989804990">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Lorsque cette option est activée, la création d’une nouvelle fenêtre X11 fait passer X11.app au premier plan (au lieu de Finder.app, Terminal.app, etc.)</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="57161931"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {536, 267}}</string>
+ </object>
+ <string key="NSLabel">Fenêtres</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="348328898">
+ <object class="NSView" key="NSView" id="300811574">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="989050925">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{67, 235}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="189594322">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Authentifier les connexions</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="989050925"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="700826966">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{67, 158}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="489340979">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Autoriser les connexions de clients réseau</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="700826966"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="243093215"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="168436707">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{85, 187}, {385, 42}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="53243865">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Le lancement d’X11 créera des touches de contrôle d’accès Xauthority. Si l’adresse IP du système change, ces touches ne seront plus valides, ce qui risquera d’empêcher le lancement des applications X11.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="168436707"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="363817195">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{85, 96}, {385, 56}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="390084685">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">En cas d’activation de cette option, « Authentifier les connexions » doit aussi être activée pour garantir la sécurité du système. En cas de désactivation, les connexions à partir d’applications distantes sont interdites.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="363817195"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="223835729">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{20, 5}, {404, 14}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="283628678">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Ces options prennent effet au prochain lancement d’X11.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="223835729"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {536, 267}}</string>
+ </object>
+ <string key="NSLabel">Sécurité</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ </array>
+ <reference key="NSSelectedTabViewItem" ref="960678392"/>
+ <reference key="NSFont" ref="463863101"/>
+ <int key="NSTvFlags">0</int>
+ <bool key="NSAllowTruncatedLabels">YES</bool>
+ <bool key="NSDrawsBackground">YES</bool>
+ <array class="NSMutableArray" key="NSSubviews">
+ <reference ref="515308735"/>
+ </array>
+ </object>
+ </array>
+ <string key="NSFrameSize">{582, 329}</string>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSMinSize">{320, 262}</string>
+ <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSFrameAutosaveName">x11_prefs</string>
+ </object>
+ <object class="NSWindowTemplate" id="604417141">
+ <int key="NSWindowStyleMask">11</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{302, 440}, {548, 271}}</string>
+ <int key="NSWTFlags">1350041600</int>
+ <string key="NSWindowTitle">Menu de l’application X11</string>
+ <string key="NSWindowClass">NSPanel</string>
+ <object class="NSMutableString" key="NSViewClass">
+ <characters key="NS.bytes">View</characters>
+ </object>
+ <nil key="NSUserInterfaceItemIdentifier"/>
+ <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSWindowContentMinSize">{320, 240}</string>
+ <object class="NSView" key="NSWindowView" id="85544634">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="671954382">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{372, 191}, {162, 32}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="143554520">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">137887744</int>
+ <string key="NSContents">Dupliquer</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="671954382"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <object class="NSFont" key="NSAlternateImage" id="549406736">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="492358940">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{372, 159}, {162, 32}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="8201128">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">137887744</int>
+ <string key="NSContents">Supprimer</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="492358940"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="549406736"/>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSScrollView" id="1063387772">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSClipView" id="580565898">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">2304</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSTableView" id="905092943">
+ <reference key="NSNextResponder" ref="580565898"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{333, 198}</string>
+ <reference key="NSSuperview" ref="580565898"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTableHeaderView" key="NSHeaderView" id="792419186">
+ <reference key="NSNextResponder" ref="672307654"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{333, 17}</string>
+ <reference key="NSSuperview" ref="672307654"/>
+ <reference key="NSTableView" ref="905092943"/>
+ </object>
+ <object class="_NSCornerView" key="NSCornerView" id="898633680">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{334, 0}, {16, 17}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ </object>
+ <array class="NSMutableArray" key="NSTableColumns">
+ <object class="NSTableColumn" id="938444323">
+ <double key="NSWidth">155</double>
+ <double key="NSMinWidth">62.730998992919922</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">Nom</string>
+ <reference key="NSSupport" ref="26"/>
+ <object class="NSColor" key="NSBackgroundColor" id="113872566">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="249576247">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">headerTextColor</string>
+ <reference key="NSColor" ref="214098874"/>
+ </object>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="825378892">
+ <int key="NSCellFlags">338820672</int>
+ <int key="NSCellFlags2">1024</int>
+ <string key="NSContents">Text Cell</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="905092943"/>
+ <object class="NSColor" key="NSBackgroundColor" id="822946413">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="905092943"/>
+ <string key="NSHeaderToolTip"/>
+ </object>
+ <object class="NSTableColumn" id="84282687">
+ <double key="NSWidth">100</double>
+ <double key="NSMinWidth">40</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">Commande</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSBackgroundColor" ref="113872566"/>
+ <reference key="NSTextColor" ref="249576247"/>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="432610585">
+ <int key="NSCellFlags">338820672</int>
+ <int key="NSCellFlags2">1024</int>
+ <string key="NSContents">Text Cell</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="905092943"/>
+ <reference key="NSBackgroundColor" ref="822946413"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="905092943"/>
+ <string key="NSHeaderToolTip"/>
+ </object>
+ <object class="NSTableColumn" id="242608782">
+ <double key="NSWidth">69</double>
+ <double key="NSMinWidth">10</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">Raccourci</string>
+ <reference key="NSSupport" ref="26"/>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">headerColor</string>
+ <reference key="NSColor" ref="822946413"/>
+ </object>
+ <reference key="NSTextColor" ref="249576247"/>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="34714764">
+ <int key="NSCellFlags">338820672</int>
+ <int key="NSCellFlags2">1024</int>
+ <string key="NSContents">Text Cell</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">12</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="905092943"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <object class="NSColor" key="NSBackgroundColor" id="812484075">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlBackgroundColor</string>
+ <reference key="NSColor" ref="590688762"/>
+ </object>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="905092943"/>
+ <string key="NSHeaderToolTip"/>
+ </object>
+ </array>
+ <double key="NSIntercellSpacingWidth">3</double>
+ <double key="NSIntercellSpacingHeight">2</double>
+ <reference key="NSBackgroundColor" ref="822946413"/>
+ <object class="NSColor" key="NSGridColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">gridColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ </object>
+ <double key="NSRowHeight">17</double>
+ <int key="NSTvFlags">1379958784</int>
+ <reference key="NSDelegate"/>
+ <reference key="NSDataSource"/>
+ <int key="NSColumnAutoresizingStyle">1</int>
+ <int key="NSDraggingSourceMaskForLocal">-1</int>
+ <int key="NSDraggingSourceMaskForNonLocal">0</int>
+ <bool key="NSAllowsTypeSelect">YES</bool>
+ <int key="NSTableViewDraggingDestinationStyle">0</int>
+ <int key="NSTableViewGroupRowStyle">1</int>
+ </object>
+ </array>
+ <string key="NSFrame">{{1, 17}, {333, 198}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <reference key="NSNextKeyView" ref="905092943"/>
+ <reference key="NSDocView" ref="905092943"/>
+ <reference key="NSBGColor" ref="812484075"/>
+ <int key="NScvFlags">4</int>
+ </object>
+ <object class="NSScroller" id="842897584">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{334, 17}, {15, 198}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <reference key="NSTarget" ref="1063387772"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">0.99492380000000002</double>
+ </object>
+ <object class="NSScroller" id="17278747">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{1, 215}, {333, 15}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <int key="NSsFlags">1</int>
+ <reference key="NSTarget" ref="1063387772"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">0.68852460000000004</double>
+ </object>
+ <object class="NSClipView" id="672307654">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">2304</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <reference ref="792419186"/>
+ </array>
+ <string key="NSFrame">{{1, 0}, {333, 17}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <reference key="NSNextKeyView" ref="792419186"/>
+ <reference key="NSDocView" ref="792419186"/>
+ <reference key="NSBGColor" ref="812484075"/>
+ <int key="NScvFlags">4</int>
+ </object>
+ <reference ref="898633680"/>
+ </array>
+ <string key="NSFrame">{{20, 20}, {350, 231}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <reference key="NSNextKeyView" ref="580565898"/>
+ <int key="NSsFlags">133170</int>
+ <reference key="NSVScroller" ref="842897584"/>
+ <reference key="NSHScroller" ref="17278747"/>
+ <reference key="NSContentView" ref="580565898"/>
+ <reference key="NSHeaderClipView" ref="672307654"/>
+ <reference key="NSCornerView" ref="898633680"/>
+ <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
+ </object>
+ <object class="NSButton" id="758204686">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{372, 223}, {162, 32}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="1025474039">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">137887744</int>
+ <string key="NSContents">Ajouter un élément</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="758204686"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="549406736"/>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrameSize">{548, 271}</string>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSMinSize">{320, 262}</string>
+ <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSFrameAutosaveName">x11_apps</string>
+ </object>
+ <object class="NSMenu" id="294137138">
+ <string key="NSTitle">Menu</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="318286212">
+ <reference key="NSMenu" ref="294137138"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="511651072">
+ <reference key="NSMenu" ref="294137138"/>
+ <string key="NSTitle">Applications</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="48278059">
+ <string key="NSTitle">Applications</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="563798000">
+ <reference key="NSMenu" ref="48278059"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1032342329">
+ <reference key="NSMenu" ref="48278059"/>
+ <string key="NSTitle">Personnaliser…</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ </array>
+ <string key="NSName"/>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">copy:</string>
+ <reference key="source" ref="941939442"/>
+ <reference key="destination" ref="185296989"/>
+ </object>
+ <int key="connectionID">181</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">minimize_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="677652931"/>
+ </object>
+ <int key="connectionID">202</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">close_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="984461797"/>
+ </object>
+ <int key="connectionID">205</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">zoom_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1066447520"/>
+ </object>
+ <int key="connectionID">206</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">bring_to_front:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="276216762"/>
+ </object>
+ <int key="connectionID">207</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">hideOtherApplications:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="206802571"/>
+ </object>
+ <int key="connectionID">263</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">apps_separator</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="390088328"/>
+ </object>
+ <int key="connectionID">273</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">apps_table</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="905092943"/>
+ </object>
+ <int key="connectionID">301</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_delete:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="492358940"/>
+ </object>
+ <int key="connectionID">303</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_duplicate:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="671954382"/>
+ </object>
+ <int key="connectionID">304</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_show:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1065386165"/>
+ </object>
+ <int key="connectionID">308</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_new:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="758204686"/>
+ </object>
+ <int key="connectionID">311</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_show:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="386173216"/>
+ </object>
+ <int key="connectionID">318</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">x11_about_item</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="139290918"/>
+ </object>
+ <int key="connectionID">321</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_auth</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="989050925"/>
+ </object>
+ <int key="connectionID">387</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_tcp</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="700826966"/>
+ </object>
+ <int key="connectionID">388</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">depth</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="709074847"/>
+ </object>
+ <int key="connectionID">389</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">fake_buttons</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="119157981"/>
+ </object>
+ <int key="connectionID">391</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_keymap</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="179949713"/>
+ </object>
+ <int key="connectionID">392</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_keyequivs</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="842100515"/>
+ </object>
+ <int key="connectionID">393</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="119157981"/>
+ </object>
+ <int key="connectionID">394</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="179949713"/>
+ </object>
+ <int key="connectionID">395</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="842100515"/>
+ </object>
+ <int key="connectionID">396</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="709074847"/>
+ </object>
+ <int key="connectionID">398</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="989050925"/>
+ </object>
+ <int key="connectionID">399</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="700826966"/>
+ </object>
+ <int key="connectionID">401</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">prefs_panel</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="124913468"/>
+ </object>
+ <int key="connectionID">402</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">x11_help:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="504984881"/>
+ </object>
+ <int key="connectionID">422</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dockMenu</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="294137138"/>
+ </object>
+ <int key="connectionID">426</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dock_menu</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="294137138"/>
+ </object>
+ <int key="connectionID">428</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="485884620"/>
+ </object>
+ <int key="connectionID">429</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">hide:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="301008465"/>
+ </object>
+ <int key="connectionID">430</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">unhideAllApplications:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="1023546148"/>
+ </object>
+ <int key="connectionID">431</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">orderFrontStandardAboutPanel:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="139290918"/>
+ </object>
+ <int key="connectionID">433</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dock_apps_menu</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="48278059"/>
+ </object>
+ <int key="connectionID">530</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dock_window_separator</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="318286212"/>
+ </object>
+ <int key="connectionID">531</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_show:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1032342329"/>
+ </object>
+ <int key="connectionID">534</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">next_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1036389925"/>
+ </object>
+ <int key="connectionID">539</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">previous_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="369641893"/>
+ </object>
+ <int key="connectionID">540</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_fullscreen</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477203622"/>
+ </object>
+ <int key="connectionID">546</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">enable_fullscreen_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477203622"/>
+ </object>
+ <int key="connectionID">547</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggle_fullscreen:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="6876565"/>
+ </object>
+ <int key="connectionID">548</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">toggle_fullscreen_item</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="6876565"/>
+ </object>
+ <int key="connectionID">549</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">menu</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="524015605"/>
+ </object>
+ <int key="connectionID">300334</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">terminate:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="274138642"/>
+ </object>
+ <int key="connectionID">300336</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="657659108"/>
+ </object>
+ <int key="connectionID">300389</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="992839333"/>
+ </object>
+ <int key="connectionID">300390</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="128352289"/>
+ </object>
+ <int key="connectionID">300391</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">click_through</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="657659108"/>
+ </object>
+ <int key="connectionID">300392</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">focus_follows_mouse</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="992839333"/>
+ </object>
+ <int key="connectionID">300393</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">focus_on_new_window</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="128352289"/>
+ </object>
+ <int key="connectionID">300394</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">copy_menu_item</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="185296989"/>
+ </object>
+ <int key="connectionID">300443</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_pasteboard</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="878106058"/>
+ </object>
+ <int key="connectionID">300444</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_clipboard_to_pasteboard</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="487809555"/>
+ </object>
+ <int key="connectionID">300461</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_pasteboard_to_clipboard</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477050998"/>
+ </object>
+ <int key="connectionID">300462</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_pasteboard_to_primary</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="765780304"/>
+ </object>
+ <int key="connectionID">300463</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_primary_immediately</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1002778833"/>
+ </object>
+ <int key="connectionID">300464</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="878106058"/>
+ </object>
+ <int key="connectionID">300465</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="487809555"/>
+ </object>
+ <int key="connectionID">300466</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477050998"/>
+ </object>
+ <int key="connectionID">300467</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="765780304"/>
+ </object>
+ <int key="connectionID">300468</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1002778833"/>
+ </object>
+ <int key="connectionID">300469</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_text1</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="620944856"/>
+ </object>
+ <int key="connectionID">300470</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_text2</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="522511724"/>
+ </object>
+ <int key="connectionID">300471</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_fullscreen_menu</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="57246850"/>
+ </object>
+ <int key="connectionID">300474</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="57246850"/>
+ </object>
+ <int key="connectionID">300475</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="406291430"/>
+ </object>
+ <int key="connectionID">300480</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">option_sends_alt</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="406291430"/>
+ </object>
+ <int key="connectionID">300481</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="904585544"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="815810918"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="941939442"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="951368722"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">29</int>
+ <reference key="object" ref="524015605"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="931553638"/>
+ <reference ref="365880285"/>
+ <reference ref="200491363"/>
+ <reference ref="868031522"/>
+ <reference ref="551174276"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">MainMenu</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">19</int>
+ <reference key="object" ref="931553638"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="96874957"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">24</int>
+ <reference key="object" ref="96874957"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="677652931"/>
+ <reference ref="276216762"/>
+ <reference ref="1066447520"/>
+ <reference ref="1036389925"/>
+ <reference ref="369641893"/>
+ <reference ref="155085383"/>
+ <reference ref="984461797"/>
+ <reference ref="280172320"/>
+ </array>
+ <reference key="parent" ref="931553638"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="276216762"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">23</int>
+ <reference key="object" ref="677652931"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">92</int>
+ <reference key="object" ref="280172320"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">203</int>
+ <reference key="object" ref="984461797"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">204</int>
+ <reference key="object" ref="1066447520"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">536</int>
+ <reference key="object" ref="155085383"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">537</int>
+ <reference key="object" ref="1036389925"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">538</int>
+ <reference key="object" ref="369641893"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">56</int>
+ <reference key="object" ref="365880285"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="576521955"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">57</int>
+ <reference key="object" ref="576521955"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="139290918"/>
+ <reference ref="386173216"/>
+ <reference ref="32285361"/>
+ <reference ref="301008465"/>
+ <reference ref="274138642"/>
+ <reference ref="272876017"/>
+ <reference ref="431301145"/>
+ <reference ref="206802571"/>
+ <reference ref="848095279"/>
+ <reference ref="1023546148"/>
+ <reference ref="6876565"/>
+ <reference ref="479677589"/>
+ </array>
+ <reference key="parent" ref="365880285"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">58</int>
+ <reference key="object" ref="139290918"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">129</int>
+ <reference key="object" ref="386173216"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">131</int>
+ <reference key="object" ref="32285361"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="821388474"/>
+ </array>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">130</int>
+ <reference key="object" ref="821388474"/>
+ <reference key="parent" ref="32285361"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">134</int>
+ <reference key="object" ref="301008465"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">136</int>
+ <reference key="object" ref="274138642"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">143</int>
+ <reference key="object" ref="272876017"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">144</int>
+ <reference key="object" ref="431301145"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">145</int>
+ <reference key="object" ref="206802571"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">149</int>
+ <reference key="object" ref="848095279"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">150</int>
+ <reference key="object" ref="1023546148"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">544</int>
+ <reference key="object" ref="6876565"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">545</int>
+ <reference key="object" ref="479677589"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">163</int>
+ <reference key="object" ref="200491363"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="526778998"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">169</int>
+ <reference key="object" ref="526778998"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="185296989"/>
+ </array>
+ <reference key="parent" ref="200491363"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">157</int>
+ <reference key="object" ref="185296989"/>
+ <reference key="parent" ref="526778998"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">269</int>
+ <reference key="object" ref="868031522"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="981161348"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">270</int>
+ <reference key="object" ref="981161348"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="390088328"/>
+ <reference ref="1065386165"/>
+ </array>
+ <reference key="parent" ref="868031522"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">272</int>
+ <reference key="object" ref="390088328"/>
+ <reference key="parent" ref="981161348"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">305</int>
+ <reference key="object" ref="1065386165"/>
+ <reference key="parent" ref="981161348"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">419</int>
+ <reference key="object" ref="551174276"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="511848303"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">420</int>
+ <reference key="object" ref="511848303"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="504984881"/>
+ </array>
+ <reference key="parent" ref="551174276"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">421</int>
+ <reference key="object" ref="504984881"/>
+ <reference key="parent" ref="511848303"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">196</int>
+ <reference key="object" ref="485884620"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">X11Controller</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">244</int>
+ <reference key="object" ref="124913468"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="941366957"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">PrefsPanel</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">245</int>
+ <reference key="object" ref="941366957"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="448510093"/>
+ </array>
+ <reference key="parent" ref="124913468"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">348</int>
+ <reference key="object" ref="448510093"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="287591690"/>
+ <reference ref="960678392"/>
+ <reference ref="348328898"/>
+ <reference ref="10973343"/>
+ <reference ref="723450037"/>
+ </array>
+ <reference key="parent" ref="941366957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">349</int>
+ <reference key="object" ref="287591690"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="596750588"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">351</int>
+ <reference key="object" ref="596750588"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="119157981"/>
+ <reference ref="443008216"/>
+ <reference ref="282885445"/>
+ <reference ref="842100515"/>
+ <reference ref="31160162"/>
+ <reference ref="179949713"/>
+ <reference ref="278155937"/>
+ <reference ref="406291430"/>
+ </array>
+ <reference key="parent" ref="287591690"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">363</int>
+ <reference key="object" ref="119157981"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="990762273"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">364</int>
+ <reference key="object" ref="443008216"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="391919450"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">365</int>
+ <reference key="object" ref="282885445"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="649334366"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">368</int>
+ <reference key="object" ref="842100515"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="940564599"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">369</int>
+ <reference key="object" ref="31160162"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="666057093"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">370</int>
+ <reference key="object" ref="179949713"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="967619578"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">352</int>
+ <reference key="object" ref="960678392"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="515308735"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">350</int>
+ <reference key="object" ref="515308735"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="709074847"/>
+ <reference ref="201731424"/>
+ <reference ref="86150604"/>
+ <reference ref="477203622"/>
+ <reference ref="57246850"/>
+ <reference ref="298603383"/>
+ </array>
+ <reference key="parent" ref="960678392"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">382</int>
+ <reference key="object" ref="709074847"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="633115429"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">385</int>
+ <reference key="object" ref="201731424"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="930265681"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">386</int>
+ <reference key="object" ref="86150604"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="311969422"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">541</int>
+ <reference key="object" ref="477203622"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="631531164"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">543</int>
+ <reference key="object" ref="298603383"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="761107402"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">353</int>
+ <reference key="object" ref="348328898"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="300811574"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">354</int>
+ <reference key="object" ref="300811574"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="989050925"/>
+ <reference ref="700826966"/>
+ <reference ref="168436707"/>
+ <reference ref="363817195"/>
+ <reference ref="223835729"/>
+ </array>
+ <reference key="parent" ref="348328898"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">374</int>
+ <reference key="object" ref="989050925"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="189594322"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">375</int>
+ <reference key="object" ref="700826966"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="489340979"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">376</int>
+ <reference key="object" ref="168436707"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="53243865"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">377</int>
+ <reference key="object" ref="363817195"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="390084685"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">379</int>
+ <reference key="object" ref="223835729"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="283628678"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">285</int>
+ <reference key="object" ref="604417141"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="85544634"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">EditPrograms</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">286</int>
+ <reference key="object" ref="85544634"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1063387772"/>
+ <reference ref="758204686"/>
+ <reference ref="671954382"/>
+ <reference ref="492358940"/>
+ </array>
+ <reference key="parent" ref="604417141"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">423</int>
+ <reference key="object" ref="294137138"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="318286212"/>
+ <reference ref="511651072"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">DockMenu</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">524</int>
+ <reference key="object" ref="318286212"/>
+ <reference key="parent" ref="294137138"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">526</int>
+ <reference key="object" ref="511651072"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="48278059"/>
+ </array>
+ <reference key="parent" ref="294137138"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">527</int>
+ <reference key="object" ref="48278059"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1032342329"/>
+ <reference ref="563798000"/>
+ </array>
+ <reference key="parent" ref="511651072"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">532</int>
+ <reference key="object" ref="1032342329"/>
+ <reference key="parent" ref="48278059"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">533</int>
+ <reference key="object" ref="563798000"/>
+ <reference key="parent" ref="48278059"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100363</int>
+ <reference key="object" ref="990762273"/>
+ <reference key="parent" ref="119157981"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100364</int>
+ <reference key="object" ref="391919450"/>
+ <reference key="parent" ref="443008216"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100365</int>
+ <reference key="object" ref="649334366"/>
+ <reference key="parent" ref="282885445"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100368</int>
+ <reference key="object" ref="940564599"/>
+ <reference key="parent" ref="842100515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100369</int>
+ <reference key="object" ref="666057093"/>
+ <reference key="parent" ref="31160162"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100370</int>
+ <reference key="object" ref="967619578"/>
+ <reference key="parent" ref="179949713"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100382</int>
+ <reference key="object" ref="633115429"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="341113515"/>
+ </array>
+ <reference key="parent" ref="709074847"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100385</int>
+ <reference key="object" ref="930265681"/>
+ <reference key="parent" ref="201731424"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100386</int>
+ <reference key="object" ref="311969422"/>
+ <reference key="parent" ref="86150604"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100541</int>
+ <reference key="object" ref="631531164"/>
+ <reference key="parent" ref="477203622"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100543</int>
+ <reference key="object" ref="761107402"/>
+ <reference key="parent" ref="298603383"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100374</int>
+ <reference key="object" ref="189594322"/>
+ <reference key="parent" ref="989050925"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100375</int>
+ <reference key="object" ref="489340979"/>
+ <reference key="parent" ref="700826966"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100376</int>
+ <reference key="object" ref="53243865"/>
+ <reference key="parent" ref="168436707"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100377</int>
+ <reference key="object" ref="390084685"/>
+ <reference key="parent" ref="363817195"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100379</int>
+ <reference key="object" ref="283628678"/>
+ <reference key="parent" ref="223835729"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">380</int>
+ <reference key="object" ref="341113515"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="759499526"/>
+ <reference ref="616492372"/>
+ <reference ref="543935434"/>
+ <reference ref="836673018"/>
+ </array>
+ <reference key="parent" ref="633115429"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">435</int>
+ <reference key="object" ref="759499526"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">384</int>
+ <reference key="object" ref="616492372"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">383</int>
+ <reference key="object" ref="543935434"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">381</int>
+ <reference key="object" ref="836673018"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">295</int>
+ <reference key="object" ref="1063387772"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="792419186"/>
+ <reference ref="17278747"/>
+ <reference ref="842897584"/>
+ <reference ref="905092943"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300295</int>
+ <reference key="object" ref="792419186"/>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">200295</int>
+ <reference key="object" ref="17278747"/>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100295</int>
+ <reference key="object" ref="842897584"/>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">296</int>
+ <reference key="object" ref="905092943"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="242608782"/>
+ <reference ref="938444323"/>
+ <reference ref="84282687"/>
+ </array>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">535</int>
+ <reference key="object" ref="242608782"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="34714764"/>
+ </array>
+ <reference key="parent" ref="905092943"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">575</int>
+ <reference key="object" ref="34714764"/>
+ <reference key="parent" ref="242608782"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">298</int>
+ <reference key="object" ref="938444323"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="825378892"/>
+ </array>
+ <reference key="parent" ref="905092943"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">573</int>
+ <reference key="object" ref="825378892"/>
+ <reference key="parent" ref="938444323"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">297</int>
+ <reference key="object" ref="84282687"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="432610585"/>
+ </array>
+ <reference key="parent" ref="905092943"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">574</int>
+ <reference key="object" ref="432610585"/>
+ <reference key="parent" ref="84282687"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">310</int>
+ <reference key="object" ref="758204686"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1025474039"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100310</int>
+ <reference key="object" ref="1025474039"/>
+ <reference key="parent" ref="758204686"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">292</int>
+ <reference key="object" ref="671954382"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="143554520"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100292</int>
+ <reference key="object" ref="143554520"/>
+ <reference key="parent" ref="671954382"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">293</int>
+ <reference key="object" ref="492358940"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="8201128"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100293</int>
+ <reference key="object" ref="8201128"/>
+ <reference key="parent" ref="492358940"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300337</int>
+ <reference key="object" ref="10973343"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="184765684"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300338</int>
+ <reference key="object" ref="184765684"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="657659108"/>
+ <reference ref="290578835"/>
+ <reference ref="992839333"/>
+ <reference ref="138261120"/>
+ <reference ref="128352289"/>
+ <reference ref="57161931"/>
+ </array>
+ <reference key="parent" ref="10973343"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300358</int>
+ <reference key="object" ref="290578835"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="399127858"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300359</int>
+ <reference key="object" ref="657659108"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="259618205"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300360</int>
+ <reference key="object" ref="259618205"/>
+ <reference key="parent" ref="657659108"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300361</int>
+ <reference key="object" ref="399127858"/>
+ <reference key="parent" ref="290578835"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300362</int>
+ <reference key="object" ref="992839333"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="959555182"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300363</int>
+ <reference key="object" ref="959555182"/>
+ <reference key="parent" ref="992839333"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300364</int>
+ <reference key="object" ref="138261120"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="183409141"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300365</int>
+ <reference key="object" ref="183409141"/>
+ <reference key="parent" ref="138261120"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300368</int>
+ <reference key="object" ref="128352289"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="556463187"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300369</int>
+ <reference key="object" ref="556463187"/>
+ <reference key="parent" ref="128352289"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300370</int>
+ <reference key="object" ref="57161931"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="989804990"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300371</int>
+ <reference key="object" ref="989804990"/>
+ <reference key="parent" ref="57161931"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300421</int>
+ <reference key="object" ref="723450037"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="408298283"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300422</int>
+ <reference key="object" ref="408298283"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="878106058"/>
+ <reference ref="386152084"/>
+ <reference ref="487809555"/>
+ <reference ref="620944856"/>
+ <reference ref="477050998"/>
+ <reference ref="765780304"/>
+ <reference ref="1002778833"/>
+ <reference ref="522511724"/>
+ </array>
+ <reference key="parent" ref="723450037"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300423</int>
+ <reference key="object" ref="386152084"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="572508492"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300424</int>
+ <reference key="object" ref="878106058"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="718083688"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300440</int>
+ <reference key="object" ref="718083688"/>
+ <reference key="parent" ref="878106058"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300441</int>
+ <reference key="object" ref="572508492"/>
+ <reference key="parent" ref="386152084"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300447</int>
+ <reference key="object" ref="477050998"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="501304422"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300450</int>
+ <reference key="object" ref="501304422"/>
+ <reference key="parent" ref="477050998"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300451</int>
+ <reference key="object" ref="765780304"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="510771323"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300452</int>
+ <reference key="object" ref="510771323"/>
+ <reference key="parent" ref="765780304"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300453</int>
+ <reference key="object" ref="487809555"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="619977658"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300454</int>
+ <reference key="object" ref="619977658"/>
+ <reference key="parent" ref="487809555"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300455</int>
+ <reference key="object" ref="620944856"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="461823902"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300456</int>
+ <reference key="object" ref="461823902"/>
+ <reference key="parent" ref="620944856"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300457</int>
+ <reference key="object" ref="1002778833"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="897099877"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300458</int>
+ <reference key="object" ref="897099877"/>
+ <reference key="parent" ref="1002778833"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300459</int>
+ <reference key="object" ref="522511724"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="994587858"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300460</int>
+ <reference key="object" ref="994587858"/>
+ <reference key="parent" ref="522511724"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300472</int>
+ <reference key="object" ref="57246850"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="917248662"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300473</int>
+ <reference key="object" ref="917248662"/>
+ <reference key="parent" ref="57246850"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300476</int>
+ <reference key="object" ref="278155937"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="617441821"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300477</int>
+ <reference key="object" ref="406291430"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="67728988"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300478</int>
+ <reference key="object" ref="67728988"/>
+ <reference key="parent" ref="406291430"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300479</int>
+ <reference key="object" ref="617441821"/>
+ <reference key="parent" ref="278155937"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="-3.ImportedFromIB2"/>
+ <string key="100292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="100295.IBShouldRemoveOnLegacySave"/>
+ <string key="100310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="129.ImportedFromIB2"/>
+ <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="130.ImportedFromIB2"/>
+ <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="131.ImportedFromIB2"/>
+ <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="134.ImportedFromIB2"/>
+ <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="136.ImportedFromIB2"/>
+ <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="143.ImportedFromIB2"/>
+ <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="144.ImportedFromIB2"/>
+ <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="145.ImportedFromIB2"/>
+ <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="149.ImportedFromIB2"/>
+ <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="150.ImportedFromIB2"/>
+ <string key="157.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="157.ImportedFromIB2"/>
+ <string key="163.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="163.ImportedFromIB2"/>
+ <string key="169.IBEditorWindowLastContentRect">{{168, 821}, {113, 23}}</string>
+ <string key="169.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="169.ImportedFromIB2"/>
+ <string key="169.editorWindowContentRectSynchronizationRect">{{202, 626}, {154, 153}}</string>
+ <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="19.ImportedFromIB2"/>
+ <integer value="1" key="196.ImportedFromIB2"/>
+ <string key="200295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="200295.IBShouldRemoveOnLegacySave"/>
+ <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="203.ImportedFromIB2"/>
+ <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="204.ImportedFromIB2"/>
+ <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="23.ImportedFromIB2"/>
+ <string key="24.IBEditorWindowLastContentRect">{{349, 868}, {315, 143}}</string>
+ <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="24.ImportedFromIB2"/>
+ <string key="24.editorWindowContentRectSynchronizationRect">{{271, 666}, {301, 153}}</string>
+ <string key="244.IBEditorWindowLastContentRect">{{507, 565}, {484, 308}}</string>
+ <string key="244.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="244.IBWindowTemplateEditedContentRect">{{507, 565}, {484, 308}}</string>
+ <integer value="1" key="244.ImportedFromIB2"/>
+ <string key="244.editorWindowContentRectSynchronizationRect">{{184, 290}, {481, 345}}</string>
+ <integer value="0" key="244.windowTemplate.hasMaxSize"/>
+ <integer value="1" key="244.windowTemplate.hasMinSize"/>
+ <string key="244.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="244.windowTemplate.minSize">{320, 240}</string>
+ <string key="245.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="245.ImportedFromIB2"/>
+ <string key="269.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="269.ImportedFromIB2"/>
+ <string key="270.IBEditorWindowLastContentRect">{{58, 803}, {155, 33}}</string>
+ <string key="270.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="270.ImportedFromIB2"/>
+ <string key="270.editorWindowContentRectSynchronizationRect">{{100, 746}, {155, 33}}</string>
+ <string key="272.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="272.ImportedFromIB2"/>
+ <string key="285.IBEditorWindowLastContentRect">{{68, 585}, {454, 271}}</string>
+ <string key="285.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="285.IBViewEditorWindowController.showingBoundsRectangles"/>
+ <integer value="1" key="285.IBViewEditorWindowController.showingLayoutRectangles"/>
+ <string key="285.IBWindowTemplateEditedContentRect">{{68, 585}, {454, 271}}</string>
+ <integer value="1" key="285.ImportedFromIB2"/>
+ <string key="285.editorWindowContentRectSynchronizationRect">{{433, 406}, {486, 327}}</string>
+ <integer value="0" key="285.windowTemplate.hasMaxSize"/>
+ <integer value="1" key="285.windowTemplate.hasMinSize"/>
+ <string key="285.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="285.windowTemplate.minSize">{320, 240}</string>
+ <string key="286.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="286.ImportedFromIB2"/>
+ <string key="29.IBEditorWindowLastContentRect">{{145, 1011}, {336, 20}}</string>
+ <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="29.ImportedFromIB2"/>
+ <string key="29.editorWindowContentRectSynchronizationRect">{{67, 819}, {336, 20}}</string>
+ <string key="292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="292.ImportedFromIB2"/>
+ <string key="293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="293.ImportedFromIB2"/>
+ <string key="295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="295.ImportedFromIB2"/>
+ <string key="296.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="296.ImportedFromIB2"/>
+ <string key="297.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="297.ImportedFromIB2"/>
+ <string key="298.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="298.ImportedFromIB2"/>
+ <string key="300295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300295.IBShouldRemoveOnLegacySave"/>
+ <string key="300337.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300337.ImportedFromIB2"/>
+ <string key="300338.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300338.ImportedFromIB2"/>
+ <string key="300358.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300358.ImportedFromIB2"/>
+ <string key="300359.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300359.ImportedFromIB2"/>
+ <string key="300360.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300361.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300362.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300362.ImportedFromIB2"/>
+ <string key="300363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300364.ImportedFromIB2"/>
+ <string key="300365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300368.ImportedFromIB2"/>
+ <string key="300369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300370.ImportedFromIB2"/>
+ <string key="300371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300421.ImportedFromIB2"/>
+ <string key="300422.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300422.ImportedFromIB2"/>
+ <string key="300423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300423.ImportedFromIB2"/>
+ <string key="300424.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300424.ImportedFromIB2"/>
+ <string key="300440.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300441.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300447.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300447.ImportedFromIB2"/>
+ <string key="300450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300451.ImportedFromIB2"/>
+ <string key="300452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300453.ImportedFromIB2"/>
+ <string key="300454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300455.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300455.ImportedFromIB2"/>
+ <string key="300456.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300457.ImportedFromIB2"/>
+ <string key="300458.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300459.ImportedFromIB2"/>
+ <string key="300460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300472.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300472.ImportedFromIB2"/>
+ <string key="300473.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300476.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300476.ImportedFromIB2"/>
+ <string key="300477.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300477.ImportedFromIB2"/>
+ <string key="300478.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300479.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="305.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="305.ImportedFromIB2"/>
+ <string key="310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="310.ImportedFromIB2"/>
+ <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="348.ImportedFromIB2"/>
+ <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="349.ImportedFromIB2"/>
+ <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="350.ImportedFromIB2"/>
+ <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="351.ImportedFromIB2"/>
+ <string key="352.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="352.ImportedFromIB2"/>
+ <string key="353.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="353.ImportedFromIB2"/>
+ <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="354.ImportedFromIB2"/>
+ <string key="363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="363.ImportedFromIB2"/>
+ <string key="364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="364.ImportedFromIB2"/>
+ <string key="365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="365.ImportedFromIB2"/>
+ <string key="368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="368.ImportedFromIB2"/>
+ <string key="369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="369.ImportedFromIB2"/>
+ <string key="370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="370.ImportedFromIB2"/>
+ <string key="374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="374.ImportedFromIB2"/>
+ <string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="375.ImportedFromIB2"/>
+ <string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="376.ImportedFromIB2"/>
+ <string key="377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="377.ImportedFromIB2"/>
+ <string key="379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="379.ImportedFromIB2"/>
+ <string key="380.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="380.ImportedFromIB2"/>
+ <string key="381.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="381.ImportedFromIB2"/>
+ <string key="382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="382.ImportedFromIB2"/>
+ <string key="383.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="383.ImportedFromIB2"/>
+ <string key="384.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="384.ImportedFromIB2"/>
+ <string key="385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="385.ImportedFromIB2"/>
+ <string key="386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="386.ImportedFromIB2"/>
+ <string key="419.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="419.ImportedFromIB2"/>
+ <string key="420.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="420.ImportedFromIB2"/>
+ <string key="421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="421.ImportedFromIB2"/>
+ <string key="423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="423.ImportedFromIB2"/>
+ <string key="435.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="435.ImportedFromIB2"/>
+ <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="5.ImportedFromIB2"/>
+ <string key="524.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="524.ImportedFromIB2"/>
+ <string key="526.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="526.ImportedFromIB2"/>
+ <string key="527.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="527.ImportedFromIB2"/>
+ <string key="532.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="532.ImportedFromIB2"/>
+ <string key="533.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="533.ImportedFromIB2"/>
+ <string key="535.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="535.ImportedFromIB2"/>
+ <string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="536.ImportedFromIB2"/>
+ <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="537.ImportedFromIB2"/>
+ <string key="538.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="538.ImportedFromIB2"/>
+ <string key="541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="541.ImportedFromIB2"/>
+ <string key="543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="543.ImportedFromIB2"/>
+ <string key="544.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="544.ImportedFromIB2"/>
+ <string key="545.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="545.ImportedFromIB2"/>
+ <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="56.ImportedFromIB2"/>
+ <string key="57.IBEditorWindowLastContentRect">{{20, 641}, {218, 203}}</string>
+ <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="57.ImportedFromIB2"/>
+ <string key="57.editorWindowContentRectSynchronizationRect">{{79, 616}, {218, 203}}</string>
+ <string key="573.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="573.ImportedFromIB2"/>
+ <string key="574.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="574.ImportedFromIB2"/>
+ <string key="575.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="575.ImportedFromIB2"/>
+ <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="58.ImportedFromIB2"/>
+ <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="92.ImportedFromIB2"/>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">300481</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">FirstResponder</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSFormatter</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">X11Controller</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ </array>
+ <array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
+ <object class="IBPartialClassDescription">
+ <string key="className">X11Controller</string>
+ <string key="superclassName">NSObject</string>
+ <dictionary class="NSMutableDictionary" key="actions">
+ <string key="apps_table_delete:">id</string>
+ <string key="apps_table_done:">id</string>
+ <string key="apps_table_duplicate:">id</string>
+ <string key="apps_table_new:">id</string>
+ <string key="apps_table_show:">id</string>
+ <string key="bring_to_front:">id</string>
+ <string key="close_window:">id</string>
+ <string key="enable_fullscreen_changed:">id</string>
+ <string key="minimize_window:">id</string>
+ <string key="next_window:">id</string>
+ <string key="prefs_changed:">id</string>
+ <string key="prefs_show:">id</string>
+ <string key="previous_window:">id</string>
+ <string key="quit:">id</string>
+ <string key="toggle_fullscreen:">id</string>
+ <string key="x11_help:">id</string>
+ <string key="zoom_window:">id</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="actionInfosByName">
+ <object class="IBActionInfo" key="apps_table_delete:">
+ <string key="name">apps_table_delete:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_done:">
+ <string key="name">apps_table_done:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_duplicate:">
+ <string key="name">apps_table_duplicate:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_new:">
+ <string key="name">apps_table_new:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_show:">
+ <string key="name">apps_table_show:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="bring_to_front:">
+ <string key="name">bring_to_front:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="close_window:">
+ <string key="name">close_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="enable_fullscreen_changed:">
+ <string key="name">enable_fullscreen_changed:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="minimize_window:">
+ <string key="name">minimize_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="next_window:">
+ <string key="name">next_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="prefs_changed:">
+ <string key="name">prefs_changed:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="prefs_show:">
+ <string key="name">prefs_show:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="previous_window:">
+ <string key="name">previous_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="quit:">
+ <string key="name">quit:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="toggle_fullscreen:">
+ <string key="name">toggle_fullscreen:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="x11_help:">
+ <string key="name">x11_help:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="zoom_window:">
+ <string key="name">zoom_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="outlets">
+ <string key="apps_separator">NSMenuItem</string>
+ <string key="apps_table">NSTableView</string>
+ <string key="click_through">NSButton</string>
+ <string key="copy_menu_item">NSMenuItem</string>
+ <string key="depth">NSPopUpButton</string>
+ <string key="dock_apps_menu">NSMenu</string>
+ <string key="dock_menu">NSMenu</string>
+ <string key="dock_window_separator">NSMenuItem</string>
+ <string key="enable_auth">NSButton</string>
+ <string key="enable_fullscreen">NSButton</string>
+ <string key="enable_fullscreen_menu">NSButton</string>
+ <string key="enable_keyequivs">NSButton</string>
+ <string key="enable_tcp">NSButton</string>
+ <string key="fake_buttons">NSButton</string>
+ <string key="focus_follows_mouse">NSButton</string>
+ <string key="focus_on_new_window">NSButton</string>
+ <string key="option_sends_alt">NSButton</string>
+ <string key="prefs_panel">NSPanel</string>
+ <string key="sync_clipboard_to_pasteboard">NSButton</string>
+ <string key="sync_keymap">NSButton</string>
+ <string key="sync_pasteboard">NSButton</string>
+ <string key="sync_pasteboard_to_clipboard">NSButton</string>
+ <string key="sync_pasteboard_to_primary">NSButton</string>
+ <string key="sync_primary_immediately">NSButton</string>
+ <string key="sync_text1">NSTextField</string>
+ <string key="sync_text2">NSTextField</string>
+ <string key="toggle_fullscreen_item">NSMenuItem</string>
+ <string key="use_sysbeep">NSButton</string>
+ <string key="window_separator">NSMenuItem</string>
+ <string key="x11_about_item">NSMenuItem</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <object class="IBToOneOutletInfo" key="apps_separator">
+ <string key="name">apps_separator</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="apps_table">
+ <string key="name">apps_table</string>
+ <string key="candidateClassName">NSTableView</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="click_through">
+ <string key="name">click_through</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="copy_menu_item">
+ <string key="name">copy_menu_item</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="depth">
+ <string key="name">depth</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dock_apps_menu">
+ <string key="name">dock_apps_menu</string>
+ <string key="candidateClassName">NSMenu</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dock_menu">
+ <string key="name">dock_menu</string>
+ <string key="candidateClassName">NSMenu</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dock_window_separator">
+ <string key="name">dock_window_separator</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_auth">
+ <string key="name">enable_auth</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_fullscreen">
+ <string key="name">enable_fullscreen</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_fullscreen_menu">
+ <string key="name">enable_fullscreen_menu</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_keyequivs">
+ <string key="name">enable_keyequivs</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_tcp">
+ <string key="name">enable_tcp</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="fake_buttons">
+ <string key="name">fake_buttons</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="focus_follows_mouse">
+ <string key="name">focus_follows_mouse</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="focus_on_new_window">
+ <string key="name">focus_on_new_window</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="option_sends_alt">
+ <string key="name">option_sends_alt</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="prefs_panel">
+ <string key="name">prefs_panel</string>
+ <string key="candidateClassName">NSPanel</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_clipboard_to_pasteboard">
+ <string key="name">sync_clipboard_to_pasteboard</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_keymap">
+ <string key="name">sync_keymap</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_pasteboard">
+ <string key="name">sync_pasteboard</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_pasteboard_to_clipboard">
+ <string key="name">sync_pasteboard_to_clipboard</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_pasteboard_to_primary">
+ <string key="name">sync_pasteboard_to_primary</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_primary_immediately">
+ <string key="name">sync_primary_immediately</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_text1">
+ <string key="name">sync_text1</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_text2">
+ <string key="name">sync_text2</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="toggle_fullscreen_item">
+ <string key="name">toggle_fullscreen_item</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="use_sysbeep">
+ <string key="name">use_sysbeep</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="window_separator">
+ <string key="name">window_separator</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="x11_about_item">
+ <string key="name">x11_about_item</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ </dictionary>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBDocumentRelativeSource</string>
+ <string key="minorKey">../../../X11Controller.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
+ <integer value="1040" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../X11.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NSMenuCheckmark">{9, 8}</string>
+ <string key="NSMenuMixedState">{7, 2}</string>
+ <string key="NSSwitch">{15, 15}</string>
+ </dictionary>
+ </data>
+</archive>
diff --git a/xorg-server/hw/xquartz/bundle/Resources/German.lproj/locversion.plist b/xorg-server/hw/xquartz/bundle/Resources/German.lproj/locversion.plist
index caf0364c7..50d130551 100644
--- a/xorg-server/hw/xquartz/bundle/Resources/German.lproj/locversion.plist
+++ b/xorg-server/hw/xquartz/bundle/Resources/German.lproj/locversion.plist
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>LprojCompatibleVersion</key>
- <string>102</string>
- <key>LprojLocale</key>
- <string>de</string>
- <key>LprojRevisionLevel</key>
- <string>1</string>
- <key>LprojVersion</key>
- <string>102</string>
-</dict>
-</plist>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>LprojCompatibleVersion</key>
+ <string>102</string>
+ <key>LprojLocale</key>
+ <string>de</string>
+ <key>LprojRevisionLevel</key>
+ <string>1</string>
+ <key>LprojVersion</key>
+ <string>102</string>
+</dict>
+</plist>
diff --git a/xorg-server/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib
index dea837bce..2dd073a66 100644
--- a/xorg-server/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib
+++ b/xorg-server/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib
@@ -1,3759 +1,3759 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
- <data>
- <int key="IBDocument.SystemTarget">1040</int>
- <string key="IBDocument.SystemVersion">11A289</string>
- <string key="IBDocument.InterfaceBuilderVersion">844</string>
- <string key="IBDocument.AppKitVersion">1094.2</string>
- <string key="IBDocument.HIToolboxVersion">521.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">844</string>
- </object>
- <array class="NSMutableArray" key="IBDocument.EditedObjectIDs"/>
- <array key="IBDocument.PluginDependencies">
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </array>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
- <integer value="1" key="NS.object.0"/>
- </object>
- <array class="NSMutableArray" key="IBDocument.RootObjects" id="904585544">
- <object class="NSCustomObject" id="815810918">
- <object class="NSMutableString" key="NSClassName">
- <characters key="NS.bytes">NSApplication</characters>
- </object>
- </object>
- <object class="NSCustomObject" id="941939442">
- <string key="NSClassName">FirstResponder</string>
- </object>
- <object class="NSCustomObject" id="951368722">
- <string key="NSClassName">NSApplication</string>
- </object>
- <object class="NSMenu" id="524015605">
- <string key="NSTitle">MainMenu</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="365880285">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">X11</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <object class="NSCustomResource" key="NSOnImage" id="531645050">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSMenuCheckmark</string>
- </object>
- <object class="NSCustomResource" key="NSMixedImage" id="351811234">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSMenuMixedState</string>
- </object>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="576521955">
- <string key="NSTitle">X11</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="139290918">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Über X11</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="386173216">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Einstellungen …</string>
- <string key="NSKeyEquiv">,</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="272876017">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="32285361">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Dienste</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="821388474">
- <string key="NSTitle">Dienste</string>
- <array class="NSMutableArray" key="NSMenuItems"/>
- <string key="NSName">_NSServicesMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="431301145">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="6876565">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Vollbildmodus ein-/ausschalten</string>
- <string key="NSKeyEquiv">a</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="479677589">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="301008465">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">X11 ausblenden</string>
- <string key="NSKeyEquiv">h</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <int key="NSTag">42</int>
- </object>
- <object class="NSMenuItem" id="206802571">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Andere ausblenden</string>
- <string key="NSKeyEquiv">h</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1023546148">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">Alle einblenden</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <int key="NSTag">42</int>
- </object>
- <object class="NSMenuItem" id="848095279">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="274138642">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">X11 beenden</string>
- <string key="NSKeyEquiv">q</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- <string key="NSName">_NSAppleMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="868031522">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">Programme</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="981161348">
- <string key="NSTitle">Programme</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="390088328">
- <reference key="NSMenu" ref="981161348"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1065386165">
- <reference key="NSMenu" ref="981161348"/>
- <string key="NSTitle">Anpassen …</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- <object class="NSMenuItem" id="200491363">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">Bearbeiten</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="526778998">
- <string key="NSTitle">Bearbeiten</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="185296989">
- <reference key="NSMenu" ref="526778998"/>
- <string key="NSTitle">Kopieren</string>
- <string key="NSKeyEquiv">c</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- <object class="NSMenuItem" id="931553638">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">Fenster</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="96874957">
- <string key="NSTitle">Fenster</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="984461797">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Schließen</string>
- <string key="NSKeyEquiv">w</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="677652931">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Im Dock ablegen</string>
- <string key="NSKeyEquiv">m</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1066447520">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Zoomen</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="280172320">
- <reference key="NSMenu" ref="96874957"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1036389925">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Vorwärts blättern</string>
- <string key="NSKeyEquiv">&lt;</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="369641893">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Rückwärts blättern</string>
- <string key="NSKeyEquiv">&gt;</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="155085383">
- <reference key="NSMenu" ref="96874957"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="276216762">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">Alle nach vorne bringen</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- <string key="NSName">_NSWindowsMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="551174276">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">Hilfe</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="511848303">
- <string key="NSTitle">Hilfe</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="504984881">
- <reference key="NSMenu" ref="511848303"/>
- <string key="NSTitle">X11 Hilfe</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- </array>
- <string key="NSName">_NSMainMenu</string>
- </object>
- <object class="NSCustomObject" id="485884620">
- <string key="NSClassName">X11Controller</string>
- </object>
- <object class="NSWindowTemplate" id="124913468">
- <int key="NSWindowStyleMask">3</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{2350, 1291}, {613, 302}}</string>
- <int key="NSWTFlags">1350041600</int>
- <string key="NSWindowTitle">X11 Einstellungen</string>
- <string key="NSWindowClass">NSPanel</string>
- <object class="NSMutableString" key="NSViewClass">
- <characters key="NS.bytes">View</characters>
- </object>
- <nil key="NSUserInterfaceItemIdentifier"/>
- <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSWindowContentMinSize">{320, 240}</string>
- <object class="NSView" key="NSWindowView" id="941366957">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSTabView" id="448510093">
- <reference key="NSNextResponder" ref="941366957"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{13, 10}, {579, 286}}</string>
- <reference key="NSSuperview" ref="941366957"/>
- <array class="NSMutableArray" key="NSTabViewItems">
- <object class="NSTabViewItem" id="287591690">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">1</characters>
- </object>
- <object class="NSView" key="NSView" id="596750588">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="119157981">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 211}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="990762273">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Drei Maustasten nachbilden</string>
- <object class="NSFont" key="NSSupport" id="463863101">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">1044</int>
- </object>
- <reference key="NSControlView" ref="119157981"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <object class="NSCustomResource" key="NSNormalImage" id="65187362">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSSwitch</string>
- </object>
- <object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
- <string key="NSImageName">NSSwitch</string>
- </object>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="443008216">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 60}, {376, 28}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="391919450">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Bei Aktivierung können die Tastenentsprechungen für die Menüleiste die X11-Programme stören, die Meta-Sondertasten verwenden.</string>
- <object class="NSFont" key="NSSupport" id="26">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">11</double>
- <int key="NSfFlags">3100</int>
- </object>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="443008216"/>
- <object class="NSColor" key="NSBackgroundColor" id="57160303">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlColor</string>
- <object class="NSColor" key="NSColor" id="590688762">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
- </object>
- </object>
- <object class="NSColor" key="NSTextColor" id="930815747">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlTextColor</string>
- <object class="NSColor" key="NSColor" id="214098874">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- </object>
- </object>
- </object>
- </object>
- <object class="NSTextField" id="282885445">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 171}, {385, 34}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="649334366">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string type="base64-UTF8" key="NSContents">SGFsdGVuIFNpZSBiZWltIEtsaWNrZW4gZGllIFdhaGx0YXN0ZSBvZGVyIGRpZSBCZWZlaGxzdGFzdGUg
-Z2VkcsO8Y2t0LCB1bSBkaWUgbWl0dGxlcmUgb2RlciBkaWUgcmVjaHRlIE1hdXN0YXN0ZSB6dSBha3Rp
-dmllcmVuLgo</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="282885445"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="842100515">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 94}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="940564599">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Tastenentsprechungen unter X11 aktivieren</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="842100515"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="31160162">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 118}, {385, 28}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="666057093">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Bei Aktivierung kann Ihre aktuelle X11-Keymap durch Änderungen des Tastaturmenüs überschrieben werden.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="31160162"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="179949713">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 152}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="967619578">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Tastaturbelegung des Systems verwenden</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="179949713"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="278155937">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, -1}, {385, 31}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="617441821">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Bei Aktivierung entsprechen die Wahltasten Alt_L und Alt_R X11-Tastensymbolen anstatt „Mode_switch“.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="278155937"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="406291430">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 36}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="67728988">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Wahltasten entsprechen Alt_L und Alt_R</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="406291430"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {559, 240}}</string>
- </object>
- <string key="NSLabel">Eingabe</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="960678392">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">2</characters>
- </object>
- <object class="NSView" key="NSView" id="515308735">
- <reference key="NSNextResponder" ref="448510093"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSPopUpButton" id="709074847">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{74, 210}, {197, 26}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSPopUpButtonCell" key="NSCell" id="633115429">
- <int key="NSCellFlags">-2076049856</int>
- <int key="NSCellFlags2">1024</int>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="709074847"/>
- <int key="NSButtonFlags">109199615</int>
- <int key="NSButtonFlags2">1</int>
- <object class="NSFont" key="NSAlternateImage">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">16</int>
- </object>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- <object class="NSMenuItem" key="NSMenuItem" id="616492372">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">Vom Monitor</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <int key="NSState">1</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">-1</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- <bool key="NSMenuItemRespectAlignment">YES</bool>
- <object class="NSMenu" key="NSMenu" id="341113515">
- <object class="NSMutableString" key="NSTitle">
- <characters key="NS.bytes">OtherViews</characters>
- </object>
- <array class="NSMutableArray" key="NSMenuItems">
- <reference ref="616492372"/>
- <object class="NSMenuItem" id="759499526">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">256 Farben</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">8</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- <object class="NSMenuItem" id="543935434">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">32768 Farben</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">15</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- <object class="NSMenuItem" id="836673018">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">16,7 Millionen Farben</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">24</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- </array>
- </object>
- <int key="NSPreferredEdge">3</int>
- <bool key="NSUsesItemFromMenu">YES</bool>
- <bool key="NSAltersState">YES</bool>
- <int key="NSArrowPosition">1</int>
- </object>
- </object>
- <object class="NSTextField" id="201731424">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{17, 214}, {55, 20}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="930265681">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Farben:</string>
- <reference key="NSSupport" ref="463863101"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="201731424"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="86150604">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 192}, {392, 14}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="311969422">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Diese Option wird beim nächsten Start von X11 wirksam.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="86150604"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="477203622">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{15, 158}, {409, 23}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="631531164">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Vollbildmodus</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="477203622"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="57246850">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{34, 81}, {409, 23}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="917248662">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Menüleiste automatisch im Vollbildmodus anzeigen</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="57246850"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="298603383">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{33, 110}, {383, 42}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="761107402">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Hiermit wird das X11-Hauptfenster aktiviert. Verwenden Sie die Tastenkombination Befehl+Wahl+A, um den Vollbildmodus ein- oder auszuschalten.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="298603383"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {559, 240}}</string>
- <reference key="NSSuperview" ref="448510093"/>
- </object>
- <string key="NSLabel">Ausgabe</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="723450037">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">2</characters>
- </object>
- <object class="NSView" key="NSView" id="408298283">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="878106058">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 216}, {409, 23}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="718083688">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Synchronisierung aktivieren</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="878106058"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="386152084">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 182}, {464, 28}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="572508492">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Aktiviert das Menüobjekt „Kopieren“ und ermöglicht die Synchronisierung zwischen dem „OSX Pasteboard“ und den Pufferspeichern „CLIPBOARD“ und „PRIMARY“ von X11.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="386152084"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="477050998">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{34, 100}, {436, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="501304422">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">CLIPBOARD aktualisieren, wenn Pasteboard geändert wird</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="477050998"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="765780304">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{34, 72}, {463, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="510771323">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">PRIMARY (Mittel-Klick) aktualisieren, wenn Pasteboard geändert wird</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="765780304"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="1002778833">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{34, 43}, {498, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="897099877">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Pasteboard sofort aktualisieren, wenn Text ausgewählt wird</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="1002778833"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="487809555">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{34, 158}, {438, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="619977658">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Pasteboard aktualisieren, wenn CLIPBOARD geändert wird</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="487809555"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="620944856">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{48, 124}, {401, 28}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="461823902">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Deaktivieren Sie diese Option, wenn Sie „xclipboard“, „klipper“ oder einen beliebigen anderen X11-Zwischenablage-Manager verwenden möchten.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="620944856"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="522511724">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{48, 9}, {497, 28}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="994587858">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Aufgrund von Einschränkungen im X11-Protokoll funktioniert diese Option in manchen Programmen u. U. nicht immer.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="522511724"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {559, 240}}</string>
- </object>
- <string key="NSLabel">Zwischenablage</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="10973343">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">2</characters>
- </object>
- <object class="NSView" key="NSView" id="184765684">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="657659108">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{15, 206}, {213, 18}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="259618205">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Durch inaktive Fenster klicken</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="657659108"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="290578835">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{23, 172}, {456, 28}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="399127858">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Bei Aktivierung wird beim Klicken auf ein inaktives Fenster der Mausklick zusätzlich an dieses Fenster weitergegeben.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="290578835"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="992839333">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{15, 145}, {155, 18}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="959555182">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Fokus folgt der Maus</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="992839333"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="138261120">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{23, 122}, {442, 17}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="183409141">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Der Fokus des X11-Fensters folgt dem Cursor. Dies hat einige nachteilige Effekte.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="138261120"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="128352289">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{15, 101}, {402, 18}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="556463187">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Fokus auf neuem Fenster</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="128352289"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="57161931">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{23, 53}, {456, 42}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="989804990">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Bei Aktivierung wird beim Erzeugen eines neuen X11-Fensters das „X11.app“ in den Vordergrund gebracht (anstelle von „Finder.app“, „Terminal.app“ usw.).</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="57161931"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {559, 240}}</string>
- </object>
- <string key="NSLabel">Fenster</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="348328898">
- <object class="NSView" key="NSView" id="300811574">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="989050925">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 204}, {215, 18}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="189594322">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Verbindungen authentifizieren</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="989050925"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="700826966">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 121}, {312, 18}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="489340979">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Verbindungen von Netzwerk-Clients erlauben</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="700826966"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="65187362"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="168436707">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 150}, {463, 48}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="53243865">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Beim Starten von X11 werden Xauthority-Schlüssel zur Zugriffskontrolle erstellt. Wenn sich die IP-Adresse des Systems ändert, sind diese Schlüssel nicht mehr gültig. Möglicherweise können die X11-Programme dann nicht mehr gestartet werden.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="168436707"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="363817195">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 59}, {463, 56}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="390084685">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Bei Aktivierung muss „Verbindungen authentifizieren“ ebenfalls aktiviert sein, damit die Sicherheit des System gewährleistet ist. Bei Deaktivierung sind Verbindungen von entfernten Programmen nicht erlaubt.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="363817195"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="223835729">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{20, -22}, {404, 14}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="283628678">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Diese Optionen werden beim nächsten Start von X11 wirksam.</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="223835729"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {559, 240}}</string>
- </object>
- <string key="NSLabel">Sicherheit</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- </array>
- <reference key="NSSelectedTabViewItem" ref="960678392"/>
- <reference key="NSFont" ref="463863101"/>
- <int key="NSTvFlags">0</int>
- <bool key="NSAllowTruncatedLabels">YES</bool>
- <bool key="NSDrawsBackground">YES</bool>
- <array class="NSMutableArray" key="NSSubviews">
- <reference ref="515308735"/>
- </array>
- </object>
- </array>
- <string key="NSFrameSize">{613, 302}</string>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
- <string key="NSMinSize">{320, 262}</string>
- <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSFrameAutosaveName">x11_prefs</string>
- </object>
- <object class="NSWindowTemplate" id="604417141">
- <int key="NSWindowStyleMask">11</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{360, 400}, {512, 271}}</string>
- <int key="NSWTFlags">1350041600</int>
- <string key="NSWindowTitle">X11-Programmmenü</string>
- <string key="NSWindowClass">NSPanel</string>
- <object class="NSMutableString" key="NSViewClass">
- <characters key="NS.bytes">View</characters>
- </object>
- <nil key="NSUserInterfaceItemIdentifier"/>
- <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSWindowContentMinSize">{512, 240}</string>
- <object class="NSView" key="NSWindowView" id="85544634">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="671954382">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{340, 191}, {158, 32}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="143554520">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">137887744</int>
- <string key="NSContents">Duplizieren</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="671954382"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <object class="NSFont" key="NSAlternateImage" id="549406736">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">16</int>
- </object>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="492358940">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{340, 159}, {158, 32}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="8201128">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">137887744</int>
- <string key="NSContents">Entfernen</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="492358940"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <reference key="NSAlternateImage" ref="549406736"/>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSScrollView" id="1063387772">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">274</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSClipView" id="580565898">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">2304</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSTableView" id="905092943">
- <reference key="NSNextResponder" ref="580565898"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{301, 198}</string>
- <reference key="NSSuperview" ref="580565898"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTableHeaderView" key="NSHeaderView" id="792419186">
- <reference key="NSNextResponder" ref="672307654"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{301, 17}</string>
- <reference key="NSSuperview" ref="672307654"/>
- <reference key="NSTableView" ref="905092943"/>
- </object>
- <object class="_NSCornerView" key="NSCornerView" id="898633680">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{302, 0}, {16, 17}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- </object>
- <array class="NSMutableArray" key="NSTableColumns">
- <object class="NSTableColumn" id="938444323">
- <double key="NSWidth">122.73100280761719</double>
- <double key="NSMinWidth">62.730998992919922</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Name</string>
- <reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor" id="113872566">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
- </object>
- <object class="NSColor" key="NSTextColor" id="249576247">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerTextColor</string>
- <reference key="NSColor" ref="214098874"/>
- </object>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="825378892">
- <int key="NSCellFlags">338820672</int>
- <int key="NSCellFlags2">1024</int>
- <string key="NSContents">Textzelle</string>
- <reference key="NSSupport" ref="463863101"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="905092943"/>
- <object class="NSColor" key="NSBackgroundColor" id="822946413">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="905092943"/>
- </object>
- <object class="NSTableColumn" id="84282687">
- <double key="NSWidth">100</double>
- <double key="NSMinWidth">40</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Befehl</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSBackgroundColor" ref="113872566"/>
- <reference key="NSTextColor" ref="249576247"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="432610585">
- <int key="NSCellFlags">338820672</int>
- <int key="NSCellFlags2">1024</int>
- <string key="NSContents">Textzelle</string>
- <reference key="NSSupport" ref="463863101"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="905092943"/>
- <reference key="NSBackgroundColor" ref="822946413"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="905092943"/>
- </object>
- <object class="NSTableColumn" id="242608782">
- <double key="NSWidth">69</double>
- <double key="NSMinWidth">10</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Kurzbefehl</string>
- <reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerColor</string>
- <reference key="NSColor" ref="822946413"/>
- </object>
- <reference key="NSTextColor" ref="249576247"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="34714764">
- <int key="NSCellFlags">338820672</int>
- <int key="NSCellFlags2">1024</int>
- <string key="NSContents">Textzelle</string>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">12</double>
- <int key="NSfFlags">16</int>
- </object>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="905092943"/>
- <bool key="NSDrawsBackground">YES</bool>
- <object class="NSColor" key="NSBackgroundColor" id="812484075">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlBackgroundColor</string>
- <reference key="NSColor" ref="590688762"/>
- </object>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="905092943"/>
- </object>
- </array>
- <double key="NSIntercellSpacingWidth">3</double>
- <double key="NSIntercellSpacingHeight">2</double>
- <reference key="NSBackgroundColor" ref="822946413"/>
- <object class="NSColor" key="NSGridColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">gridColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC41AA</bytes>
- </object>
- </object>
- <double key="NSRowHeight">17</double>
- <int key="NSTvFlags">1379958784</int>
- <reference key="NSDelegate"/>
- <reference key="NSDataSource"/>
- <int key="NSColumnAutoresizingStyle">1</int>
- <int key="NSDraggingSourceMaskForLocal">-1</int>
- <int key="NSDraggingSourceMaskForNonLocal">0</int>
- <bool key="NSAllowsTypeSelect">YES</bool>
- <int key="NSTableViewDraggingDestinationStyle">0</int>
- <int key="NSTableViewGroupRowStyle">1</int>
- </object>
- </array>
- <string key="NSFrame">{{1, 17}, {301, 198}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <reference key="NSNextKeyView" ref="905092943"/>
- <reference key="NSDocView" ref="905092943"/>
- <reference key="NSBGColor" ref="812484075"/>
- <int key="NScvFlags">4</int>
- </object>
- <object class="NSScroller" id="842897584">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{302, 17}, {15, 198}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <reference key="NSTarget" ref="1063387772"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.99492380000000002</double>
- </object>
- <object class="NSScroller" id="17278747">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{1, 215}, {301, 15}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <int key="NSsFlags">1</int>
- <reference key="NSTarget" ref="1063387772"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.68852460000000004</double>
- </object>
- <object class="NSClipView" id="672307654">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">2304</int>
- <array class="NSMutableArray" key="NSSubviews">
- <reference ref="792419186"/>
- </array>
- <string key="NSFrame">{{1, 0}, {301, 17}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <reference key="NSNextKeyView" ref="792419186"/>
- <reference key="NSDocView" ref="792419186"/>
- <reference key="NSBGColor" ref="812484075"/>
- <int key="NScvFlags">4</int>
- </object>
- <reference ref="898633680"/>
- </array>
- <string key="NSFrame">{{20, 20}, {318, 231}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <reference key="NSNextKeyView" ref="580565898"/>
- <int key="NSsFlags">133170</int>
- <reference key="NSVScroller" ref="842897584"/>
- <reference key="NSHScroller" ref="17278747"/>
- <reference key="NSContentView" ref="580565898"/>
- <reference key="NSHeaderClipView" ref="672307654"/>
- <reference key="NSCornerView" ref="898633680"/>
- <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
- </object>
- <object class="NSButton" id="758204686">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{340, 223}, {158, 32}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="1025474039">
- <int key="NSCellFlags">-2080244224</int>
- <int key="NSCellFlags2">137887744</int>
- <string key="NSContents">Objekt hinzufügen</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="758204686"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <reference key="NSAlternateImage" ref="549406736"/>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- </array>
- <string key="NSFrameSize">{512, 271}</string>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
- <string key="NSMinSize">{512, 262}</string>
- <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSFrameAutosaveName">x11_apps</string>
- </object>
- <object class="NSMenu" id="294137138">
- <string key="NSTitle">Menü</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="318286212">
- <reference key="NSMenu" ref="294137138"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="511651072">
- <reference key="NSMenu" ref="294137138"/>
- <string key="NSTitle">Programme</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="48278059">
- <string key="NSTitle">Programme</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="563798000">
- <reference key="NSMenu" ref="48278059"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1032342329">
- <reference key="NSMenu" ref="48278059"/>
- <string key="NSTitle">Anpassen …</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- </array>
- <string key="NSName"/>
- </object>
- </array>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <array class="NSMutableArray" key="connectionRecords">
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">copy:</string>
- <reference key="source" ref="941939442"/>
- <reference key="destination" ref="185296989"/>
- </object>
- <int key="connectionID">181</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">minimize_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="677652931"/>
- </object>
- <int key="connectionID">202</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">close_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="984461797"/>
- </object>
- <int key="connectionID">205</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">zoom_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1066447520"/>
- </object>
- <int key="connectionID">206</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">bring_to_front:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="276216762"/>
- </object>
- <int key="connectionID">207</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">hideOtherApplications:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="206802571"/>
- </object>
- <int key="connectionID">263</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">apps_separator</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="390088328"/>
- </object>
- <int key="connectionID">273</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">apps_table</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="905092943"/>
- </object>
- <int key="connectionID">301</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_delete:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="492358940"/>
- </object>
- <int key="connectionID">303</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_duplicate:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="671954382"/>
- </object>
- <int key="connectionID">304</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_show:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1065386165"/>
- </object>
- <int key="connectionID">308</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_new:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="758204686"/>
- </object>
- <int key="connectionID">311</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_show:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="386173216"/>
- </object>
- <int key="connectionID">318</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">x11_about_item</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="139290918"/>
- </object>
- <int key="connectionID">321</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_auth</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="989050925"/>
- </object>
- <int key="connectionID">387</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_tcp</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="700826966"/>
- </object>
- <int key="connectionID">388</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">depth</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="709074847"/>
- </object>
- <int key="connectionID">389</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">fake_buttons</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="119157981"/>
- </object>
- <int key="connectionID">391</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_keymap</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="179949713"/>
- </object>
- <int key="connectionID">392</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_keyequivs</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="842100515"/>
- </object>
- <int key="connectionID">393</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="119157981"/>
- </object>
- <int key="connectionID">394</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="179949713"/>
- </object>
- <int key="connectionID">395</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="842100515"/>
- </object>
- <int key="connectionID">396</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="709074847"/>
- </object>
- <int key="connectionID">398</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="989050925"/>
- </object>
- <int key="connectionID">399</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="700826966"/>
- </object>
- <int key="connectionID">401</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">prefs_panel</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="124913468"/>
- </object>
- <int key="connectionID">402</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">x11_help:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="504984881"/>
- </object>
- <int key="connectionID">422</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dockMenu</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="294137138"/>
- </object>
- <int key="connectionID">426</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dock_menu</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="294137138"/>
- </object>
- <int key="connectionID">428</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="485884620"/>
- </object>
- <int key="connectionID">429</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">hide:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="301008465"/>
- </object>
- <int key="connectionID">430</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">unhideAllApplications:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="1023546148"/>
- </object>
- <int key="connectionID">431</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">orderFrontStandardAboutPanel:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="139290918"/>
- </object>
- <int key="connectionID">433</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dock_apps_menu</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="48278059"/>
- </object>
- <int key="connectionID">530</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dock_window_separator</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="318286212"/>
- </object>
- <int key="connectionID">531</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_show:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1032342329"/>
- </object>
- <int key="connectionID">534</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">next_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1036389925"/>
- </object>
- <int key="connectionID">539</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">previous_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="369641893"/>
- </object>
- <int key="connectionID">540</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_fullscreen</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477203622"/>
- </object>
- <int key="connectionID">546</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">enable_fullscreen_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477203622"/>
- </object>
- <int key="connectionID">547</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggle_fullscreen:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="6876565"/>
- </object>
- <int key="connectionID">548</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">toggle_fullscreen_item</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="6876565"/>
- </object>
- <int key="connectionID">549</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">menu</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="524015605"/>
- </object>
- <int key="connectionID">300334</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">terminate:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="274138642"/>
- </object>
- <int key="connectionID">300336</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="657659108"/>
- </object>
- <int key="connectionID">300389</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="992839333"/>
- </object>
- <int key="connectionID">300390</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="128352289"/>
- </object>
- <int key="connectionID">300391</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">click_through</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="657659108"/>
- </object>
- <int key="connectionID">300392</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">focus_follows_mouse</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="992839333"/>
- </object>
- <int key="connectionID">300393</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">focus_on_new_window</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="128352289"/>
- </object>
- <int key="connectionID">300394</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">copy_menu_item</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="185296989"/>
- </object>
- <int key="connectionID">300443</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_pasteboard</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="878106058"/>
- </object>
- <int key="connectionID">300444</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_clipboard_to_pasteboard</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="487809555"/>
- </object>
- <int key="connectionID">300461</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_pasteboard_to_clipboard</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477050998"/>
- </object>
- <int key="connectionID">300462</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_pasteboard_to_primary</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="765780304"/>
- </object>
- <int key="connectionID">300463</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_primary_immediately</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1002778833"/>
- </object>
- <int key="connectionID">300464</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="878106058"/>
- </object>
- <int key="connectionID">300465</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="487809555"/>
- </object>
- <int key="connectionID">300466</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477050998"/>
- </object>
- <int key="connectionID">300467</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="765780304"/>
- </object>
- <int key="connectionID">300468</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1002778833"/>
- </object>
- <int key="connectionID">300469</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_text1</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="620944856"/>
- </object>
- <int key="connectionID">300470</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_text2</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="522511724"/>
- </object>
- <int key="connectionID">300471</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_fullscreen_menu</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="57246850"/>
- </object>
- <int key="connectionID">300474</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="57246850"/>
- </object>
- <int key="connectionID">300475</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="406291430"/>
- </object>
- <int key="connectionID">300480</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">option_sends_alt</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="406291430"/>
- </object>
- <int key="connectionID">300481</int>
- </object>
- </array>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <array key="orderedObjects">
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <array key="object" id="0"/>
- <reference key="children" ref="904585544"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-2</int>
- <reference key="object" ref="815810918"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">File's Owner</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="941939442"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">First Responder</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-3</int>
- <reference key="object" ref="951368722"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">Application</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">29</int>
- <reference key="object" ref="524015605"/>
- <array class="NSMutableArray" key="children">
- <reference ref="931553638"/>
- <reference ref="365880285"/>
- <reference ref="200491363"/>
- <reference ref="868031522"/>
- <reference ref="551174276"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">MainMenu</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">19</int>
- <reference key="object" ref="931553638"/>
- <array class="NSMutableArray" key="children">
- <reference ref="96874957"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">24</int>
- <reference key="object" ref="96874957"/>
- <array class="NSMutableArray" key="children">
- <reference ref="677652931"/>
- <reference ref="276216762"/>
- <reference ref="1066447520"/>
- <reference ref="1036389925"/>
- <reference ref="369641893"/>
- <reference ref="155085383"/>
- <reference ref="984461797"/>
- <reference ref="280172320"/>
- </array>
- <reference key="parent" ref="931553638"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">5</int>
- <reference key="object" ref="276216762"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">23</int>
- <reference key="object" ref="677652931"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">92</int>
- <reference key="object" ref="280172320"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">203</int>
- <reference key="object" ref="984461797"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">204</int>
- <reference key="object" ref="1066447520"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">536</int>
- <reference key="object" ref="155085383"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">537</int>
- <reference key="object" ref="1036389925"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">538</int>
- <reference key="object" ref="369641893"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">56</int>
- <reference key="object" ref="365880285"/>
- <array class="NSMutableArray" key="children">
- <reference ref="576521955"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">57</int>
- <reference key="object" ref="576521955"/>
- <array class="NSMutableArray" key="children">
- <reference ref="139290918"/>
- <reference ref="386173216"/>
- <reference ref="32285361"/>
- <reference ref="301008465"/>
- <reference ref="274138642"/>
- <reference ref="272876017"/>
- <reference ref="431301145"/>
- <reference ref="206802571"/>
- <reference ref="848095279"/>
- <reference ref="1023546148"/>
- <reference ref="6876565"/>
- <reference ref="479677589"/>
- </array>
- <reference key="parent" ref="365880285"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">58</int>
- <reference key="object" ref="139290918"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">129</int>
- <reference key="object" ref="386173216"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">131</int>
- <reference key="object" ref="32285361"/>
- <array class="NSMutableArray" key="children">
- <reference ref="821388474"/>
- </array>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">130</int>
- <reference key="object" ref="821388474"/>
- <reference key="parent" ref="32285361"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">134</int>
- <reference key="object" ref="301008465"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">136</int>
- <reference key="object" ref="274138642"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">143</int>
- <reference key="object" ref="272876017"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">144</int>
- <reference key="object" ref="431301145"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">145</int>
- <reference key="object" ref="206802571"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">149</int>
- <reference key="object" ref="848095279"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">150</int>
- <reference key="object" ref="1023546148"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">544</int>
- <reference key="object" ref="6876565"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">545</int>
- <reference key="object" ref="479677589"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">163</int>
- <reference key="object" ref="200491363"/>
- <array class="NSMutableArray" key="children">
- <reference ref="526778998"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">169</int>
- <reference key="object" ref="526778998"/>
- <array class="NSMutableArray" key="children">
- <reference ref="185296989"/>
- </array>
- <reference key="parent" ref="200491363"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">157</int>
- <reference key="object" ref="185296989"/>
- <reference key="parent" ref="526778998"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">269</int>
- <reference key="object" ref="868031522"/>
- <array class="NSMutableArray" key="children">
- <reference ref="981161348"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">270</int>
- <reference key="object" ref="981161348"/>
- <array class="NSMutableArray" key="children">
- <reference ref="390088328"/>
- <reference ref="1065386165"/>
- </array>
- <reference key="parent" ref="868031522"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">272</int>
- <reference key="object" ref="390088328"/>
- <reference key="parent" ref="981161348"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">305</int>
- <reference key="object" ref="1065386165"/>
- <reference key="parent" ref="981161348"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">419</int>
- <reference key="object" ref="551174276"/>
- <array class="NSMutableArray" key="children">
- <reference ref="511848303"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">420</int>
- <reference key="object" ref="511848303"/>
- <array class="NSMutableArray" key="children">
- <reference ref="504984881"/>
- </array>
- <reference key="parent" ref="551174276"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">421</int>
- <reference key="object" ref="504984881"/>
- <reference key="parent" ref="511848303"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">196</int>
- <reference key="object" ref="485884620"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">X11Controller</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">244</int>
- <reference key="object" ref="124913468"/>
- <array class="NSMutableArray" key="children">
- <reference ref="941366957"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">PrefsPanel</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">245</int>
- <reference key="object" ref="941366957"/>
- <array class="NSMutableArray" key="children">
- <reference ref="448510093"/>
- </array>
- <reference key="parent" ref="124913468"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">348</int>
- <reference key="object" ref="448510093"/>
- <array class="NSMutableArray" key="children">
- <reference ref="287591690"/>
- <reference ref="960678392"/>
- <reference ref="348328898"/>
- <reference ref="10973343"/>
- <reference ref="723450037"/>
- </array>
- <reference key="parent" ref="941366957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">349</int>
- <reference key="object" ref="287591690"/>
- <array class="NSMutableArray" key="children">
- <reference ref="596750588"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">351</int>
- <reference key="object" ref="596750588"/>
- <array class="NSMutableArray" key="children">
- <reference ref="119157981"/>
- <reference ref="443008216"/>
- <reference ref="282885445"/>
- <reference ref="842100515"/>
- <reference ref="31160162"/>
- <reference ref="179949713"/>
- <reference ref="278155937"/>
- <reference ref="406291430"/>
- </array>
- <reference key="parent" ref="287591690"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">363</int>
- <reference key="object" ref="119157981"/>
- <array class="NSMutableArray" key="children">
- <reference ref="990762273"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">364</int>
- <reference key="object" ref="443008216"/>
- <array class="NSMutableArray" key="children">
- <reference ref="391919450"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">365</int>
- <reference key="object" ref="282885445"/>
- <array class="NSMutableArray" key="children">
- <reference ref="649334366"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">368</int>
- <reference key="object" ref="842100515"/>
- <array class="NSMutableArray" key="children">
- <reference ref="940564599"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">369</int>
- <reference key="object" ref="31160162"/>
- <array class="NSMutableArray" key="children">
- <reference ref="666057093"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">370</int>
- <reference key="object" ref="179949713"/>
- <array class="NSMutableArray" key="children">
- <reference ref="967619578"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">352</int>
- <reference key="object" ref="960678392"/>
- <array class="NSMutableArray" key="children">
- <reference ref="515308735"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">350</int>
- <reference key="object" ref="515308735"/>
- <array class="NSMutableArray" key="children">
- <reference ref="709074847"/>
- <reference ref="201731424"/>
- <reference ref="86150604"/>
- <reference ref="477203622"/>
- <reference ref="57246850"/>
- <reference ref="298603383"/>
- </array>
- <reference key="parent" ref="960678392"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">382</int>
- <reference key="object" ref="709074847"/>
- <array class="NSMutableArray" key="children">
- <reference ref="633115429"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">385</int>
- <reference key="object" ref="201731424"/>
- <array class="NSMutableArray" key="children">
- <reference ref="930265681"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">386</int>
- <reference key="object" ref="86150604"/>
- <array class="NSMutableArray" key="children">
- <reference ref="311969422"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">541</int>
- <reference key="object" ref="477203622"/>
- <array class="NSMutableArray" key="children">
- <reference ref="631531164"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">543</int>
- <reference key="object" ref="298603383"/>
- <array class="NSMutableArray" key="children">
- <reference ref="761107402"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">353</int>
- <reference key="object" ref="348328898"/>
- <array class="NSMutableArray" key="children">
- <reference ref="300811574"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">354</int>
- <reference key="object" ref="300811574"/>
- <array class="NSMutableArray" key="children">
- <reference ref="989050925"/>
- <reference ref="700826966"/>
- <reference ref="168436707"/>
- <reference ref="363817195"/>
- <reference ref="223835729"/>
- </array>
- <reference key="parent" ref="348328898"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">374</int>
- <reference key="object" ref="989050925"/>
- <array class="NSMutableArray" key="children">
- <reference ref="189594322"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">375</int>
- <reference key="object" ref="700826966"/>
- <array class="NSMutableArray" key="children">
- <reference ref="489340979"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">376</int>
- <reference key="object" ref="168436707"/>
- <array class="NSMutableArray" key="children">
- <reference ref="53243865"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">377</int>
- <reference key="object" ref="363817195"/>
- <array class="NSMutableArray" key="children">
- <reference ref="390084685"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">379</int>
- <reference key="object" ref="223835729"/>
- <array class="NSMutableArray" key="children">
- <reference ref="283628678"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">285</int>
- <reference key="object" ref="604417141"/>
- <array class="NSMutableArray" key="children">
- <reference ref="85544634"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">EditPrograms</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">286</int>
- <reference key="object" ref="85544634"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1063387772"/>
- <reference ref="758204686"/>
- <reference ref="671954382"/>
- <reference ref="492358940"/>
- </array>
- <reference key="parent" ref="604417141"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">423</int>
- <reference key="object" ref="294137138"/>
- <array class="NSMutableArray" key="children">
- <reference ref="318286212"/>
- <reference ref="511651072"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">DockMenu</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">524</int>
- <reference key="object" ref="318286212"/>
- <reference key="parent" ref="294137138"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">526</int>
- <reference key="object" ref="511651072"/>
- <array class="NSMutableArray" key="children">
- <reference ref="48278059"/>
- </array>
- <reference key="parent" ref="294137138"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">527</int>
- <reference key="object" ref="48278059"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1032342329"/>
- <reference ref="563798000"/>
- </array>
- <reference key="parent" ref="511651072"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">532</int>
- <reference key="object" ref="1032342329"/>
- <reference key="parent" ref="48278059"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">533</int>
- <reference key="object" ref="563798000"/>
- <reference key="parent" ref="48278059"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100363</int>
- <reference key="object" ref="990762273"/>
- <reference key="parent" ref="119157981"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100364</int>
- <reference key="object" ref="391919450"/>
- <reference key="parent" ref="443008216"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100365</int>
- <reference key="object" ref="649334366"/>
- <reference key="parent" ref="282885445"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100368</int>
- <reference key="object" ref="940564599"/>
- <reference key="parent" ref="842100515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100369</int>
- <reference key="object" ref="666057093"/>
- <reference key="parent" ref="31160162"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100370</int>
- <reference key="object" ref="967619578"/>
- <reference key="parent" ref="179949713"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100382</int>
- <reference key="object" ref="633115429"/>
- <array class="NSMutableArray" key="children">
- <reference ref="341113515"/>
- </array>
- <reference key="parent" ref="709074847"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100385</int>
- <reference key="object" ref="930265681"/>
- <reference key="parent" ref="201731424"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100386</int>
- <reference key="object" ref="311969422"/>
- <reference key="parent" ref="86150604"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100541</int>
- <reference key="object" ref="631531164"/>
- <reference key="parent" ref="477203622"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100543</int>
- <reference key="object" ref="761107402"/>
- <reference key="parent" ref="298603383"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100374</int>
- <reference key="object" ref="189594322"/>
- <reference key="parent" ref="989050925"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100375</int>
- <reference key="object" ref="489340979"/>
- <reference key="parent" ref="700826966"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100376</int>
- <reference key="object" ref="53243865"/>
- <reference key="parent" ref="168436707"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100377</int>
- <reference key="object" ref="390084685"/>
- <reference key="parent" ref="363817195"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100379</int>
- <reference key="object" ref="283628678"/>
- <reference key="parent" ref="223835729"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">380</int>
- <reference key="object" ref="341113515"/>
- <array class="NSMutableArray" key="children">
- <reference ref="759499526"/>
- <reference ref="616492372"/>
- <reference ref="543935434"/>
- <reference ref="836673018"/>
- </array>
- <reference key="parent" ref="633115429"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">435</int>
- <reference key="object" ref="759499526"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">384</int>
- <reference key="object" ref="616492372"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">383</int>
- <reference key="object" ref="543935434"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">381</int>
- <reference key="object" ref="836673018"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">295</int>
- <reference key="object" ref="1063387772"/>
- <array class="NSMutableArray" key="children">
- <reference ref="792419186"/>
- <reference ref="17278747"/>
- <reference ref="842897584"/>
- <reference ref="905092943"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300295</int>
- <reference key="object" ref="792419186"/>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">200295</int>
- <reference key="object" ref="17278747"/>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100295</int>
- <reference key="object" ref="842897584"/>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">296</int>
- <reference key="object" ref="905092943"/>
- <array class="NSMutableArray" key="children">
- <reference ref="242608782"/>
- <reference ref="938444323"/>
- <reference ref="84282687"/>
- </array>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">535</int>
- <reference key="object" ref="242608782"/>
- <array class="NSMutableArray" key="children">
- <reference ref="34714764"/>
- </array>
- <reference key="parent" ref="905092943"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">575</int>
- <reference key="object" ref="34714764"/>
- <reference key="parent" ref="242608782"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">298</int>
- <reference key="object" ref="938444323"/>
- <array class="NSMutableArray" key="children">
- <reference ref="825378892"/>
- </array>
- <reference key="parent" ref="905092943"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">573</int>
- <reference key="object" ref="825378892"/>
- <reference key="parent" ref="938444323"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">297</int>
- <reference key="object" ref="84282687"/>
- <array class="NSMutableArray" key="children">
- <reference ref="432610585"/>
- </array>
- <reference key="parent" ref="905092943"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">574</int>
- <reference key="object" ref="432610585"/>
- <reference key="parent" ref="84282687"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">310</int>
- <reference key="object" ref="758204686"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1025474039"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100310</int>
- <reference key="object" ref="1025474039"/>
- <reference key="parent" ref="758204686"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">292</int>
- <reference key="object" ref="671954382"/>
- <array class="NSMutableArray" key="children">
- <reference ref="143554520"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100292</int>
- <reference key="object" ref="143554520"/>
- <reference key="parent" ref="671954382"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">293</int>
- <reference key="object" ref="492358940"/>
- <array class="NSMutableArray" key="children">
- <reference ref="8201128"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100293</int>
- <reference key="object" ref="8201128"/>
- <reference key="parent" ref="492358940"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300337</int>
- <reference key="object" ref="10973343"/>
- <array class="NSMutableArray" key="children">
- <reference ref="184765684"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300338</int>
- <reference key="object" ref="184765684"/>
- <array class="NSMutableArray" key="children">
- <reference ref="657659108"/>
- <reference ref="290578835"/>
- <reference ref="992839333"/>
- <reference ref="138261120"/>
- <reference ref="128352289"/>
- <reference ref="57161931"/>
- </array>
- <reference key="parent" ref="10973343"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300358</int>
- <reference key="object" ref="290578835"/>
- <array class="NSMutableArray" key="children">
- <reference ref="399127858"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300359</int>
- <reference key="object" ref="657659108"/>
- <array class="NSMutableArray" key="children">
- <reference ref="259618205"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300360</int>
- <reference key="object" ref="259618205"/>
- <reference key="parent" ref="657659108"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300361</int>
- <reference key="object" ref="399127858"/>
- <reference key="parent" ref="290578835"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300362</int>
- <reference key="object" ref="992839333"/>
- <array class="NSMutableArray" key="children">
- <reference ref="959555182"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300363</int>
- <reference key="object" ref="959555182"/>
- <reference key="parent" ref="992839333"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300364</int>
- <reference key="object" ref="138261120"/>
- <array class="NSMutableArray" key="children">
- <reference ref="183409141"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300365</int>
- <reference key="object" ref="183409141"/>
- <reference key="parent" ref="138261120"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300368</int>
- <reference key="object" ref="128352289"/>
- <array class="NSMutableArray" key="children">
- <reference ref="556463187"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300369</int>
- <reference key="object" ref="556463187"/>
- <reference key="parent" ref="128352289"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300370</int>
- <reference key="object" ref="57161931"/>
- <array class="NSMutableArray" key="children">
- <reference ref="989804990"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300371</int>
- <reference key="object" ref="989804990"/>
- <reference key="parent" ref="57161931"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300421</int>
- <reference key="object" ref="723450037"/>
- <array class="NSMutableArray" key="children">
- <reference ref="408298283"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300422</int>
- <reference key="object" ref="408298283"/>
- <array class="NSMutableArray" key="children">
- <reference ref="878106058"/>
- <reference ref="386152084"/>
- <reference ref="487809555"/>
- <reference ref="620944856"/>
- <reference ref="477050998"/>
- <reference ref="765780304"/>
- <reference ref="1002778833"/>
- <reference ref="522511724"/>
- </array>
- <reference key="parent" ref="723450037"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300423</int>
- <reference key="object" ref="386152084"/>
- <array class="NSMutableArray" key="children">
- <reference ref="572508492"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300424</int>
- <reference key="object" ref="878106058"/>
- <array class="NSMutableArray" key="children">
- <reference ref="718083688"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300440</int>
- <reference key="object" ref="718083688"/>
- <reference key="parent" ref="878106058"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300441</int>
- <reference key="object" ref="572508492"/>
- <reference key="parent" ref="386152084"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300447</int>
- <reference key="object" ref="477050998"/>
- <array class="NSMutableArray" key="children">
- <reference ref="501304422"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300450</int>
- <reference key="object" ref="501304422"/>
- <reference key="parent" ref="477050998"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300451</int>
- <reference key="object" ref="765780304"/>
- <array class="NSMutableArray" key="children">
- <reference ref="510771323"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300452</int>
- <reference key="object" ref="510771323"/>
- <reference key="parent" ref="765780304"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300453</int>
- <reference key="object" ref="487809555"/>
- <array class="NSMutableArray" key="children">
- <reference ref="619977658"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300454</int>
- <reference key="object" ref="619977658"/>
- <reference key="parent" ref="487809555"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300455</int>
- <reference key="object" ref="620944856"/>
- <array class="NSMutableArray" key="children">
- <reference ref="461823902"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300456</int>
- <reference key="object" ref="461823902"/>
- <reference key="parent" ref="620944856"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300457</int>
- <reference key="object" ref="1002778833"/>
- <array class="NSMutableArray" key="children">
- <reference ref="897099877"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300458</int>
- <reference key="object" ref="897099877"/>
- <reference key="parent" ref="1002778833"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300459</int>
- <reference key="object" ref="522511724"/>
- <array class="NSMutableArray" key="children">
- <reference ref="994587858"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300460</int>
- <reference key="object" ref="994587858"/>
- <reference key="parent" ref="522511724"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300472</int>
- <reference key="object" ref="57246850"/>
- <array class="NSMutableArray" key="children">
- <reference ref="917248662"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300473</int>
- <reference key="object" ref="917248662"/>
- <reference key="parent" ref="57246850"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300476</int>
- <reference key="object" ref="278155937"/>
- <array class="NSMutableArray" key="children">
- <reference ref="617441821"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300477</int>
- <reference key="object" ref="406291430"/>
- <array class="NSMutableArray" key="children">
- <reference ref="67728988"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300478</int>
- <reference key="object" ref="67728988"/>
- <reference key="parent" ref="406291430"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300479</int>
- <reference key="object" ref="617441821"/>
- <reference key="parent" ref="278155937"/>
- </object>
- </array>
- </object>
- <dictionary class="NSMutableDictionary" key="flattenedProperties">
- <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="-3.ImportedFromIB2"/>
- <string key="100292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="100295.IBShouldRemoveOnLegacySave"/>
- <string key="100310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="129.ImportedFromIB2"/>
- <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="130.ImportedFromIB2"/>
- <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="131.ImportedFromIB2"/>
- <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="134.ImportedFromIB2"/>
- <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="136.ImportedFromIB2"/>
- <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="143.ImportedFromIB2"/>
- <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="144.ImportedFromIB2"/>
- <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="145.ImportedFromIB2"/>
- <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="149.ImportedFromIB2"/>
- <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="150.ImportedFromIB2"/>
- <string key="157.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="157.ImportedFromIB2"/>
- <string key="163.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="163.ImportedFromIB2"/>
- <string key="169.IBEditorWindowLastContentRect">{{168, 821}, {113, 23}}</string>
- <string key="169.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="169.ImportedFromIB2"/>
- <string key="169.editorWindowContentRectSynchronizationRect">{{202, 626}, {154, 153}}</string>
- <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="19.ImportedFromIB2"/>
- <integer value="1" key="196.ImportedFromIB2"/>
- <string key="200295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="200295.IBShouldRemoveOnLegacySave"/>
- <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="203.ImportedFromIB2"/>
- <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="204.ImportedFromIB2"/>
- <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="23.ImportedFromIB2"/>
- <string key="24.IBEditorWindowLastContentRect">{{349, 868}, {315, 143}}</string>
- <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="24.ImportedFromIB2"/>
- <string key="24.editorWindowContentRectSynchronizationRect">{{271, 666}, {301, 153}}</string>
- <string key="244.IBEditorWindowLastContentRect">{{507, 565}, {484, 308}}</string>
- <string key="244.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="244.IBWindowTemplateEditedContentRect">{{507, 565}, {484, 308}}</string>
- <integer value="1" key="244.ImportedFromIB2"/>
- <string key="244.editorWindowContentRectSynchronizationRect">{{184, 290}, {481, 345}}</string>
- <integer value="0" key="244.windowTemplate.hasMaxSize"/>
- <integer value="1" key="244.windowTemplate.hasMinSize"/>
- <string key="244.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="244.windowTemplate.minSize">{320, 240}</string>
- <string key="245.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="245.ImportedFromIB2"/>
- <string key="269.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="269.ImportedFromIB2"/>
- <string key="270.IBEditorWindowLastContentRect">{{58, 803}, {155, 33}}</string>
- <string key="270.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="270.ImportedFromIB2"/>
- <string key="270.editorWindowContentRectSynchronizationRect">{{100, 746}, {155, 33}}</string>
- <string key="272.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="272.ImportedFromIB2"/>
- <string key="285.IBEditorWindowLastContentRect">{{68, 585}, {454, 271}}</string>
- <string key="285.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="285.IBViewEditorWindowController.showingBoundsRectangles"/>
- <integer value="1" key="285.IBViewEditorWindowController.showingLayoutRectangles"/>
- <string key="285.IBWindowTemplateEditedContentRect">{{68, 585}, {454, 271}}</string>
- <integer value="1" key="285.ImportedFromIB2"/>
- <string key="285.editorWindowContentRectSynchronizationRect">{{433, 406}, {486, 327}}</string>
- <integer value="0" key="285.windowTemplate.hasMaxSize"/>
- <integer value="1" key="285.windowTemplate.hasMinSize"/>
- <string key="285.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="285.windowTemplate.minSize">{512, 240}</string>
- <string key="286.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="286.ImportedFromIB2"/>
- <string key="29.IBEditorWindowLastContentRect">{{145, 1011}, {336, 20}}</string>
- <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="29.ImportedFromIB2"/>
- <string key="29.editorWindowContentRectSynchronizationRect">{{67, 819}, {336, 20}}</string>
- <string key="292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="292.ImportedFromIB2"/>
- <string key="293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="293.ImportedFromIB2"/>
- <string key="295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="295.ImportedFromIB2"/>
- <string key="296.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="296.ImportedFromIB2"/>
- <string key="297.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="297.ImportedFromIB2"/>
- <string key="298.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="298.ImportedFromIB2"/>
- <string key="300295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300295.IBShouldRemoveOnLegacySave"/>
- <string key="300337.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300337.ImportedFromIB2"/>
- <string key="300338.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300338.ImportedFromIB2"/>
- <string key="300358.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300358.ImportedFromIB2"/>
- <string key="300359.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300359.ImportedFromIB2"/>
- <string key="300360.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300361.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300362.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300362.ImportedFromIB2"/>
- <string key="300363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300364.ImportedFromIB2"/>
- <string key="300365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300368.ImportedFromIB2"/>
- <string key="300369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300370.ImportedFromIB2"/>
- <string key="300371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300421.ImportedFromIB2"/>
- <string key="300422.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300422.ImportedFromIB2"/>
- <string key="300423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300423.ImportedFromIB2"/>
- <string key="300424.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300424.ImportedFromIB2"/>
- <string key="300440.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300441.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300447.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300447.ImportedFromIB2"/>
- <string key="300450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300451.ImportedFromIB2"/>
- <string key="300452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300453.ImportedFromIB2"/>
- <string key="300454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300455.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300455.ImportedFromIB2"/>
- <string key="300456.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300457.ImportedFromIB2"/>
- <string key="300458.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300459.ImportedFromIB2"/>
- <string key="300460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300472.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300472.ImportedFromIB2"/>
- <string key="300473.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300476.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300476.ImportedFromIB2"/>
- <string key="300477.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300477.ImportedFromIB2"/>
- <string key="300478.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300479.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="305.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="305.ImportedFromIB2"/>
- <string key="310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="310.ImportedFromIB2"/>
- <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="348.ImportedFromIB2"/>
- <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="349.ImportedFromIB2"/>
- <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="350.ImportedFromIB2"/>
- <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="351.ImportedFromIB2"/>
- <string key="352.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="352.ImportedFromIB2"/>
- <string key="353.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="353.ImportedFromIB2"/>
- <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="354.ImportedFromIB2"/>
- <string key="363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="363.ImportedFromIB2"/>
- <string key="364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="364.ImportedFromIB2"/>
- <string key="365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="365.ImportedFromIB2"/>
- <string key="368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="368.ImportedFromIB2"/>
- <string key="369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="369.ImportedFromIB2"/>
- <string key="370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="370.ImportedFromIB2"/>
- <string key="374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="374.ImportedFromIB2"/>
- <string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="375.ImportedFromIB2"/>
- <string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="376.ImportedFromIB2"/>
- <string key="377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="377.ImportedFromIB2"/>
- <string key="379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="379.ImportedFromIB2"/>
- <string key="380.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="380.ImportedFromIB2"/>
- <string key="381.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="381.ImportedFromIB2"/>
- <string key="382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="382.ImportedFromIB2"/>
- <string key="383.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="383.ImportedFromIB2"/>
- <string key="384.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="384.ImportedFromIB2"/>
- <string key="385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="385.ImportedFromIB2"/>
- <string key="386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="386.ImportedFromIB2"/>
- <string key="419.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="419.ImportedFromIB2"/>
- <string key="420.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="420.ImportedFromIB2"/>
- <string key="421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="421.ImportedFromIB2"/>
- <string key="423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="423.ImportedFromIB2"/>
- <string key="435.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="435.ImportedFromIB2"/>
- <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="5.ImportedFromIB2"/>
- <string key="524.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="524.ImportedFromIB2"/>
- <string key="526.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="526.ImportedFromIB2"/>
- <string key="527.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="527.ImportedFromIB2"/>
- <string key="532.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="532.ImportedFromIB2"/>
- <string key="533.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="533.ImportedFromIB2"/>
- <string key="535.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="535.ImportedFromIB2"/>
- <string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="536.ImportedFromIB2"/>
- <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="537.ImportedFromIB2"/>
- <string key="538.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="538.ImportedFromIB2"/>
- <string key="541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="541.ImportedFromIB2"/>
- <string key="543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="543.ImportedFromIB2"/>
- <string key="544.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="544.ImportedFromIB2"/>
- <string key="545.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="545.ImportedFromIB2"/>
- <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="56.ImportedFromIB2"/>
- <string key="57.IBEditorWindowLastContentRect">{{20, 641}, {218, 203}}</string>
- <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="57.ImportedFromIB2"/>
- <string key="57.editorWindowContentRectSynchronizationRect">{{79, 616}, {218, 203}}</string>
- <string key="573.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="573.ImportedFromIB2"/>
- <string key="574.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="574.ImportedFromIB2"/>
- <string key="575.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="575.ImportedFromIB2"/>
- <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="58.ImportedFromIB2"/>
- <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="92.ImportedFromIB2"/>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
- <nil key="activeLocalization"/>
- <dictionary class="NSMutableDictionary" key="localizations"/>
- <nil key="sourceID"/>
- <int key="maxID">300481</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <array class="NSMutableArray" key="referencedPartialClassDescriptions">
- <object class="IBPartialClassDescription">
- <string key="className">FirstResponder</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSFormatter</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">X11Controller</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- </array>
- <array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
- <object class="IBPartialClassDescription">
- <string key="className">X11Controller</string>
- <string key="superclassName">NSObject</string>
- <dictionary class="NSMutableDictionary" key="actions">
- <string key="apps_table_delete:">id</string>
- <string key="apps_table_done:">id</string>
- <string key="apps_table_duplicate:">id</string>
- <string key="apps_table_new:">id</string>
- <string key="apps_table_show:">id</string>
- <string key="bring_to_front:">id</string>
- <string key="close_window:">id</string>
- <string key="enable_fullscreen_changed:">id</string>
- <string key="minimize_window:">id</string>
- <string key="next_window:">id</string>
- <string key="prefs_changed:">id</string>
- <string key="prefs_show:">id</string>
- <string key="previous_window:">id</string>
- <string key="quit:">id</string>
- <string key="toggle_fullscreen:">id</string>
- <string key="x11_help:">id</string>
- <string key="zoom_window:">id</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="actionInfosByName">
- <object class="IBActionInfo" key="apps_table_delete:">
- <string key="name">apps_table_delete:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_done:">
- <string key="name">apps_table_done:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_duplicate:">
- <string key="name">apps_table_duplicate:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_new:">
- <string key="name">apps_table_new:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_show:">
- <string key="name">apps_table_show:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="bring_to_front:">
- <string key="name">bring_to_front:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="close_window:">
- <string key="name">close_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="enable_fullscreen_changed:">
- <string key="name">enable_fullscreen_changed:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="minimize_window:">
- <string key="name">minimize_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="next_window:">
- <string key="name">next_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="prefs_changed:">
- <string key="name">prefs_changed:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="prefs_show:">
- <string key="name">prefs_show:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="previous_window:">
- <string key="name">previous_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="quit:">
- <string key="name">quit:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="toggle_fullscreen:">
- <string key="name">toggle_fullscreen:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="x11_help:">
- <string key="name">x11_help:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="zoom_window:">
- <string key="name">zoom_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="outlets">
- <string key="apps_separator">NSMenuItem</string>
- <string key="apps_table">NSTableView</string>
- <string key="click_through">NSButton</string>
- <string key="copy_menu_item">NSMenuItem</string>
- <string key="depth">NSPopUpButton</string>
- <string key="dock_apps_menu">NSMenu</string>
- <string key="dock_menu">NSMenu</string>
- <string key="dock_window_separator">NSMenuItem</string>
- <string key="enable_auth">NSButton</string>
- <string key="enable_fullscreen">NSButton</string>
- <string key="enable_fullscreen_menu">NSButton</string>
- <string key="enable_keyequivs">NSButton</string>
- <string key="enable_tcp">NSButton</string>
- <string key="fake_buttons">NSButton</string>
- <string key="focus_follows_mouse">NSButton</string>
- <string key="focus_on_new_window">NSButton</string>
- <string key="option_sends_alt">NSButton</string>
- <string key="prefs_panel">NSPanel</string>
- <string key="sync_clipboard_to_pasteboard">NSButton</string>
- <string key="sync_keymap">NSButton</string>
- <string key="sync_pasteboard">NSButton</string>
- <string key="sync_pasteboard_to_clipboard">NSButton</string>
- <string key="sync_pasteboard_to_primary">NSButton</string>
- <string key="sync_primary_immediately">NSButton</string>
- <string key="sync_text1">NSTextField</string>
- <string key="sync_text2">NSTextField</string>
- <string key="toggle_fullscreen_item">NSMenuItem</string>
- <string key="use_sysbeep">NSButton</string>
- <string key="window_separator">NSMenuItem</string>
- <string key="x11_about_item">NSMenuItem</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
- <object class="IBToOneOutletInfo" key="apps_separator">
- <string key="name">apps_separator</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="apps_table">
- <string key="name">apps_table</string>
- <string key="candidateClassName">NSTableView</string>
- </object>
- <object class="IBToOneOutletInfo" key="click_through">
- <string key="name">click_through</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="copy_menu_item">
- <string key="name">copy_menu_item</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="depth">
- <string key="name">depth</string>
- <string key="candidateClassName">NSPopUpButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="dock_apps_menu">
- <string key="name">dock_apps_menu</string>
- <string key="candidateClassName">NSMenu</string>
- </object>
- <object class="IBToOneOutletInfo" key="dock_menu">
- <string key="name">dock_menu</string>
- <string key="candidateClassName">NSMenu</string>
- </object>
- <object class="IBToOneOutletInfo" key="dock_window_separator">
- <string key="name">dock_window_separator</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_auth">
- <string key="name">enable_auth</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_fullscreen">
- <string key="name">enable_fullscreen</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_fullscreen_menu">
- <string key="name">enable_fullscreen_menu</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_keyequivs">
- <string key="name">enable_keyequivs</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_tcp">
- <string key="name">enable_tcp</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="fake_buttons">
- <string key="name">fake_buttons</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="focus_follows_mouse">
- <string key="name">focus_follows_mouse</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="focus_on_new_window">
- <string key="name">focus_on_new_window</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="option_sends_alt">
- <string key="name">option_sends_alt</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="prefs_panel">
- <string key="name">prefs_panel</string>
- <string key="candidateClassName">NSPanel</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_clipboard_to_pasteboard">
- <string key="name">sync_clipboard_to_pasteboard</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_keymap">
- <string key="name">sync_keymap</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_pasteboard">
- <string key="name">sync_pasteboard</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_pasteboard_to_clipboard">
- <string key="name">sync_pasteboard_to_clipboard</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_pasteboard_to_primary">
- <string key="name">sync_pasteboard_to_primary</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_primary_immediately">
- <string key="name">sync_primary_immediately</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_text1">
- <string key="name">sync_text1</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_text2">
- <string key="name">sync_text2</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="toggle_fullscreen_item">
- <string key="name">toggle_fullscreen_item</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="use_sysbeep">
- <string key="name">use_sysbeep</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="window_separator">
- <string key="name">window_separator</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="x11_about_item">
- <string key="name">x11_about_item</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- </dictionary>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBDocumentRelativeSource</string>
- <string key="minorKey">../../../X11Controller.h</string>
- </object>
- </object>
- </array>
- </object>
- <int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
- <integer value="1040" key="NS.object.0"/>
- </object>
- <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">../X11.xcodeproj</string>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
- <string key="NSMenuCheckmark">{9, 8}</string>
- <string key="NSMenuMixedState">{7, 2}</string>
- <string key="NSSwitch">{15, 15}</string>
- </dictionary>
- </data>
-</archive>
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1040</int>
+ <string key="IBDocument.SystemVersion">11A289</string>
+ <string key="IBDocument.InterfaceBuilderVersion">844</string>
+ <string key="IBDocument.AppKitVersion">1094.2</string>
+ <string key="IBDocument.HIToolboxVersion">521.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="NS.object.0">844</string>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.EditedObjectIDs"/>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="904585544">
+ <object class="NSCustomObject" id="815810918">
+ <object class="NSMutableString" key="NSClassName">
+ <characters key="NS.bytes">NSApplication</characters>
+ </object>
+ </object>
+ <object class="NSCustomObject" id="941939442">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="951368722">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSMenu" id="524015605">
+ <string key="NSTitle">MainMenu</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="365880285">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">X11</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <object class="NSCustomResource" key="NSOnImage" id="531645050">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuCheckmark</string>
+ </object>
+ <object class="NSCustomResource" key="NSMixedImage" id="351811234">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuMixedState</string>
+ </object>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="576521955">
+ <string key="NSTitle">X11</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="139290918">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Über X11</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="386173216">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Einstellungen …</string>
+ <string key="NSKeyEquiv">,</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="272876017">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="32285361">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Dienste</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="821388474">
+ <string key="NSTitle">Dienste</string>
+ <array class="NSMutableArray" key="NSMenuItems"/>
+ <string key="NSName">_NSServicesMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="431301145">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="6876565">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Vollbildmodus ein-/ausschalten</string>
+ <string key="NSKeyEquiv">a</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="479677589">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="301008465">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">X11 ausblenden</string>
+ <string key="NSKeyEquiv">h</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <int key="NSTag">42</int>
+ </object>
+ <object class="NSMenuItem" id="206802571">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Andere ausblenden</string>
+ <string key="NSKeyEquiv">h</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1023546148">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">Alle einblenden</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <int key="NSTag">42</int>
+ </object>
+ <object class="NSMenuItem" id="848095279">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="274138642">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">X11 beenden</string>
+ <string key="NSKeyEquiv">q</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ <string key="NSName">_NSAppleMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="868031522">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">Programme</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="981161348">
+ <string key="NSTitle">Programme</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="390088328">
+ <reference key="NSMenu" ref="981161348"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1065386165">
+ <reference key="NSMenu" ref="981161348"/>
+ <string key="NSTitle">Anpassen …</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="200491363">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">Bearbeiten</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="526778998">
+ <string key="NSTitle">Bearbeiten</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="185296989">
+ <reference key="NSMenu" ref="526778998"/>
+ <string key="NSTitle">Kopieren</string>
+ <string key="NSKeyEquiv">c</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="931553638">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">Fenster</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="96874957">
+ <string key="NSTitle">Fenster</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="984461797">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Schließen</string>
+ <string key="NSKeyEquiv">w</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="677652931">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Im Dock ablegen</string>
+ <string key="NSKeyEquiv">m</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1066447520">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Zoomen</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="280172320">
+ <reference key="NSMenu" ref="96874957"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1036389925">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Vorwärts blättern</string>
+ <string key="NSKeyEquiv">&lt;</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="369641893">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Rückwärts blättern</string>
+ <string key="NSKeyEquiv">&gt;</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="155085383">
+ <reference key="NSMenu" ref="96874957"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="276216762">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">Alle nach vorne bringen</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ <string key="NSName">_NSWindowsMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="551174276">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">Hilfe</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="511848303">
+ <string key="NSTitle">Hilfe</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="504984881">
+ <reference key="NSMenu" ref="511848303"/>
+ <string key="NSTitle">X11 Hilfe</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ </array>
+ <string key="NSName">_NSMainMenu</string>
+ </object>
+ <object class="NSCustomObject" id="485884620">
+ <string key="NSClassName">X11Controller</string>
+ </object>
+ <object class="NSWindowTemplate" id="124913468">
+ <int key="NSWindowStyleMask">3</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{2350, 1291}, {613, 302}}</string>
+ <int key="NSWTFlags">1350041600</int>
+ <string key="NSWindowTitle">X11 Einstellungen</string>
+ <string key="NSWindowClass">NSPanel</string>
+ <object class="NSMutableString" key="NSViewClass">
+ <characters key="NS.bytes">View</characters>
+ </object>
+ <nil key="NSUserInterfaceItemIdentifier"/>
+ <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSWindowContentMinSize">{320, 240}</string>
+ <object class="NSView" key="NSWindowView" id="941366957">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSTabView" id="448510093">
+ <reference key="NSNextResponder" ref="941366957"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{13, 10}, {579, 286}}</string>
+ <reference key="NSSuperview" ref="941366957"/>
+ <array class="NSMutableArray" key="NSTabViewItems">
+ <object class="NSTabViewItem" id="287591690">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">1</characters>
+ </object>
+ <object class="NSView" key="NSView" id="596750588">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="119157981">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 211}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="990762273">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Drei Maustasten nachbilden</string>
+ <object class="NSFont" key="NSSupport" id="463863101">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="119157981"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="65187362">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSSwitch</string>
+ </object>
+ <object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
+ <string key="NSImageName">NSSwitch</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="443008216">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 60}, {376, 28}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="391919450">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Bei Aktivierung können die Tastenentsprechungen für die Menüleiste die X11-Programme stören, die Meta-Sondertasten verwenden.</string>
+ <object class="NSFont" key="NSSupport" id="26">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">11</double>
+ <int key="NSfFlags">3100</int>
+ </object>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="443008216"/>
+ <object class="NSColor" key="NSBackgroundColor" id="57160303">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlColor</string>
+ <object class="NSColor" key="NSColor" id="590688762">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="930815747">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlTextColor</string>
+ <object class="NSColor" key="NSColor" id="214098874">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSTextField" id="282885445">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 171}, {385, 34}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="649334366">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string type="base64-UTF8" key="NSContents">SGFsdGVuIFNpZSBiZWltIEtsaWNrZW4gZGllIFdhaGx0YXN0ZSBvZGVyIGRpZSBCZWZlaGxzdGFzdGUg
+Z2VkcsO8Y2t0LCB1bSBkaWUgbWl0dGxlcmUgb2RlciBkaWUgcmVjaHRlIE1hdXN0YXN0ZSB6dSBha3Rp
+dmllcmVuLgo</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="282885445"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="842100515">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 94}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="940564599">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Tastenentsprechungen unter X11 aktivieren</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="842100515"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="31160162">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 118}, {385, 28}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="666057093">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Bei Aktivierung kann Ihre aktuelle X11-Keymap durch Änderungen des Tastaturmenüs überschrieben werden.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="31160162"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="179949713">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 152}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="967619578">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Tastaturbelegung des Systems verwenden</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="179949713"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="278155937">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, -1}, {385, 31}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="617441821">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Bei Aktivierung entsprechen die Wahltasten Alt_L und Alt_R X11-Tastensymbolen anstatt „Mode_switch“.</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="278155937"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="406291430">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 36}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="67728988">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Wahltasten entsprechen Alt_L und Alt_R</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="406291430"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {559, 240}}</string>
+ </object>
+ <string key="NSLabel">Eingabe</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="960678392">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">2</characters>
+ </object>
+ <object class="NSView" key="NSView" id="515308735">
+ <reference key="NSNextResponder" ref="448510093"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSPopUpButton" id="709074847">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{74, 210}, {197, 26}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSPopUpButtonCell" key="NSCell" id="633115429">
+ <int key="NSCellFlags">-2076049856</int>
+ <int key="NSCellFlags2">1024</int>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="709074847"/>
+ <int key="NSButtonFlags">109199615</int>
+ <int key="NSButtonFlags2">1</int>
+ <object class="NSFont" key="NSAlternateImage">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ <object class="NSMenuItem" key="NSMenuItem" id="616492372">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">Vom Monitor</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <int key="NSState">1</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">-1</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ <bool key="NSMenuItemRespectAlignment">YES</bool>
+ <object class="NSMenu" key="NSMenu" id="341113515">
+ <object class="NSMutableString" key="NSTitle">
+ <characters key="NS.bytes">OtherViews</characters>
+ </object>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <reference ref="616492372"/>
+ <object class="NSMenuItem" id="759499526">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">256 Farben</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">8</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ <object class="NSMenuItem" id="543935434">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">32768 Farben</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">15</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ <object class="NSMenuItem" id="836673018">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">16,7 Millionen Farben</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">24</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ </array>
+ </object>
+ <int key="NSPreferredEdge">3</int>
+ <bool key="NSUsesItemFromMenu">YES</bool>
+ <bool key="NSAltersState">YES</bool>
+ <int key="NSArrowPosition">1</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="201731424">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{17, 214}, {55, 20}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="930265681">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Farben:</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="201731424"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="86150604">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 192}, {392, 14}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="311969422">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Diese Option wird beim nächsten Start von X11 wirksam.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="86150604"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="477203622">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{15, 158}, {409, 23}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="631531164">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Vollbildmodus</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="477203622"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="57246850">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{34, 81}, {409, 23}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="917248662">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Menüleiste automatisch im Vollbildmodus anzeigen</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="57246850"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="298603383">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{33, 110}, {383, 42}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="761107402">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Hiermit wird das X11-Hauptfenster aktiviert. Verwenden Sie die Tastenkombination Befehl+Wahl+A, um den Vollbildmodus ein- oder auszuschalten.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="298603383"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {559, 240}}</string>
+ <reference key="NSSuperview" ref="448510093"/>
+ </object>
+ <string key="NSLabel">Ausgabe</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="723450037">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">2</characters>
+ </object>
+ <object class="NSView" key="NSView" id="408298283">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="878106058">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 216}, {409, 23}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="718083688">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Synchronisierung aktivieren</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="878106058"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="386152084">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 182}, {464, 28}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="572508492">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Aktiviert das Menüobjekt „Kopieren“ und ermöglicht die Synchronisierung zwischen dem „OSX Pasteboard“ und den Pufferspeichern „CLIPBOARD“ und „PRIMARY“ von X11.</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="386152084"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="477050998">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{34, 100}, {436, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="501304422">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">CLIPBOARD aktualisieren, wenn Pasteboard geändert wird</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="477050998"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="765780304">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{34, 72}, {463, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="510771323">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">PRIMARY (Mittel-Klick) aktualisieren, wenn Pasteboard geändert wird</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="765780304"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="1002778833">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{34, 43}, {498, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="897099877">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Pasteboard sofort aktualisieren, wenn Text ausgewählt wird</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="1002778833"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="487809555">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{34, 158}, {438, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="619977658">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Pasteboard aktualisieren, wenn CLIPBOARD geändert wird</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="487809555"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="620944856">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{48, 124}, {401, 28}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="461823902">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Deaktivieren Sie diese Option, wenn Sie „xclipboard“, „klipper“ oder einen beliebigen anderen X11-Zwischenablage-Manager verwenden möchten.</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="620944856"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="522511724">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{48, 9}, {497, 28}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="994587858">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Aufgrund von Einschränkungen im X11-Protokoll funktioniert diese Option in manchen Programmen u. U. nicht immer.</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="522511724"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {559, 240}}</string>
+ </object>
+ <string key="NSLabel">Zwischenablage</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="10973343">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">2</characters>
+ </object>
+ <object class="NSView" key="NSView" id="184765684">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="657659108">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{15, 206}, {213, 18}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="259618205">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Durch inaktive Fenster klicken</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="657659108"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="290578835">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{23, 172}, {456, 28}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="399127858">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Bei Aktivierung wird beim Klicken auf ein inaktives Fenster der Mausklick zusätzlich an dieses Fenster weitergegeben.</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="290578835"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="992839333">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{15, 145}, {155, 18}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="959555182">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Fokus folgt der Maus</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="992839333"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="138261120">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{23, 122}, {442, 17}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="183409141">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Der Fokus des X11-Fensters folgt dem Cursor. Dies hat einige nachteilige Effekte.</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="138261120"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="128352289">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{15, 101}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="556463187">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Fokus auf neuem Fenster</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="128352289"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="57161931">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{23, 53}, {456, 42}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="989804990">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Bei Aktivierung wird beim Erzeugen eines neuen X11-Fensters das „X11.app“ in den Vordergrund gebracht (anstelle von „Finder.app“, „Terminal.app“ usw.).</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="57161931"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {559, 240}}</string>
+ </object>
+ <string key="NSLabel">Fenster</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="348328898">
+ <object class="NSView" key="NSView" id="300811574">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="989050925">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 204}, {215, 18}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="189594322">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Verbindungen authentifizieren</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="989050925"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="700826966">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 121}, {312, 18}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="489340979">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Verbindungen von Netzwerk-Clients erlauben</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="700826966"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="65187362"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="168436707">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 150}, {463, 48}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="53243865">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Beim Starten von X11 werden Xauthority-Schlüssel zur Zugriffskontrolle erstellt. Wenn sich die IP-Adresse des Systems ändert, sind diese Schlüssel nicht mehr gültig. Möglicherweise können die X11-Programme dann nicht mehr gestartet werden.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="168436707"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="363817195">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 59}, {463, 56}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="390084685">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Bei Aktivierung muss „Verbindungen authentifizieren“ ebenfalls aktiviert sein, damit die Sicherheit des System gewährleistet ist. Bei Deaktivierung sind Verbindungen von entfernten Programmen nicht erlaubt.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="363817195"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="223835729">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{20, -22}, {404, 14}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="283628678">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">Diese Optionen werden beim nächsten Start von X11 wirksam.</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="223835729"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {559, 240}}</string>
+ </object>
+ <string key="NSLabel">Sicherheit</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ </array>
+ <reference key="NSSelectedTabViewItem" ref="960678392"/>
+ <reference key="NSFont" ref="463863101"/>
+ <int key="NSTvFlags">0</int>
+ <bool key="NSAllowTruncatedLabels">YES</bool>
+ <bool key="NSDrawsBackground">YES</bool>
+ <array class="NSMutableArray" key="NSSubviews">
+ <reference ref="515308735"/>
+ </array>
+ </object>
+ </array>
+ <string key="NSFrameSize">{613, 302}</string>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSMinSize">{320, 262}</string>
+ <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSFrameAutosaveName">x11_prefs</string>
+ </object>
+ <object class="NSWindowTemplate" id="604417141">
+ <int key="NSWindowStyleMask">11</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{360, 400}, {512, 271}}</string>
+ <int key="NSWTFlags">1350041600</int>
+ <string key="NSWindowTitle">X11-Programmmenü</string>
+ <string key="NSWindowClass">NSPanel</string>
+ <object class="NSMutableString" key="NSViewClass">
+ <characters key="NS.bytes">View</characters>
+ </object>
+ <nil key="NSUserInterfaceItemIdentifier"/>
+ <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSWindowContentMinSize">{512, 240}</string>
+ <object class="NSView" key="NSWindowView" id="85544634">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="671954382">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{340, 191}, {158, 32}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="143554520">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">137887744</int>
+ <string key="NSContents">Duplizieren</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="671954382"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <object class="NSFont" key="NSAlternateImage" id="549406736">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="492358940">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{340, 159}, {158, 32}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="8201128">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">137887744</int>
+ <string key="NSContents">Entfernen</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="492358940"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="549406736"/>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSScrollView" id="1063387772">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSClipView" id="580565898">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">2304</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSTableView" id="905092943">
+ <reference key="NSNextResponder" ref="580565898"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{301, 198}</string>
+ <reference key="NSSuperview" ref="580565898"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTableHeaderView" key="NSHeaderView" id="792419186">
+ <reference key="NSNextResponder" ref="672307654"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{301, 17}</string>
+ <reference key="NSSuperview" ref="672307654"/>
+ <reference key="NSTableView" ref="905092943"/>
+ </object>
+ <object class="_NSCornerView" key="NSCornerView" id="898633680">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{302, 0}, {16, 17}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ </object>
+ <array class="NSMutableArray" key="NSTableColumns">
+ <object class="NSTableColumn" id="938444323">
+ <double key="NSWidth">122.73100280761719</double>
+ <double key="NSMinWidth">62.730998992919922</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">Name</string>
+ <reference key="NSSupport" ref="26"/>
+ <object class="NSColor" key="NSBackgroundColor" id="113872566">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="249576247">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">headerTextColor</string>
+ <reference key="NSColor" ref="214098874"/>
+ </object>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="825378892">
+ <int key="NSCellFlags">338820672</int>
+ <int key="NSCellFlags2">1024</int>
+ <string key="NSContents">Textzelle</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="905092943"/>
+ <object class="NSColor" key="NSBackgroundColor" id="822946413">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="905092943"/>
+ </object>
+ <object class="NSTableColumn" id="84282687">
+ <double key="NSWidth">100</double>
+ <double key="NSMinWidth">40</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">Befehl</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSBackgroundColor" ref="113872566"/>
+ <reference key="NSTextColor" ref="249576247"/>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="432610585">
+ <int key="NSCellFlags">338820672</int>
+ <int key="NSCellFlags2">1024</int>
+ <string key="NSContents">Textzelle</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="905092943"/>
+ <reference key="NSBackgroundColor" ref="822946413"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="905092943"/>
+ </object>
+ <object class="NSTableColumn" id="242608782">
+ <double key="NSWidth">69</double>
+ <double key="NSMinWidth">10</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">Kurzbefehl</string>
+ <reference key="NSSupport" ref="26"/>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">headerColor</string>
+ <reference key="NSColor" ref="822946413"/>
+ </object>
+ <reference key="NSTextColor" ref="249576247"/>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="34714764">
+ <int key="NSCellFlags">338820672</int>
+ <int key="NSCellFlags2">1024</int>
+ <string key="NSContents">Textzelle</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">12</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="905092943"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <object class="NSColor" key="NSBackgroundColor" id="812484075">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlBackgroundColor</string>
+ <reference key="NSColor" ref="590688762"/>
+ </object>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="905092943"/>
+ </object>
+ </array>
+ <double key="NSIntercellSpacingWidth">3</double>
+ <double key="NSIntercellSpacingHeight">2</double>
+ <reference key="NSBackgroundColor" ref="822946413"/>
+ <object class="NSColor" key="NSGridColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">gridColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ </object>
+ <double key="NSRowHeight">17</double>
+ <int key="NSTvFlags">1379958784</int>
+ <reference key="NSDelegate"/>
+ <reference key="NSDataSource"/>
+ <int key="NSColumnAutoresizingStyle">1</int>
+ <int key="NSDraggingSourceMaskForLocal">-1</int>
+ <int key="NSDraggingSourceMaskForNonLocal">0</int>
+ <bool key="NSAllowsTypeSelect">YES</bool>
+ <int key="NSTableViewDraggingDestinationStyle">0</int>
+ <int key="NSTableViewGroupRowStyle">1</int>
+ </object>
+ </array>
+ <string key="NSFrame">{{1, 17}, {301, 198}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <reference key="NSNextKeyView" ref="905092943"/>
+ <reference key="NSDocView" ref="905092943"/>
+ <reference key="NSBGColor" ref="812484075"/>
+ <int key="NScvFlags">4</int>
+ </object>
+ <object class="NSScroller" id="842897584">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{302, 17}, {15, 198}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <reference key="NSTarget" ref="1063387772"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">0.99492380000000002</double>
+ </object>
+ <object class="NSScroller" id="17278747">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{1, 215}, {301, 15}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <int key="NSsFlags">1</int>
+ <reference key="NSTarget" ref="1063387772"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">0.68852460000000004</double>
+ </object>
+ <object class="NSClipView" id="672307654">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">2304</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <reference ref="792419186"/>
+ </array>
+ <string key="NSFrame">{{1, 0}, {301, 17}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <reference key="NSNextKeyView" ref="792419186"/>
+ <reference key="NSDocView" ref="792419186"/>
+ <reference key="NSBGColor" ref="812484075"/>
+ <int key="NScvFlags">4</int>
+ </object>
+ <reference ref="898633680"/>
+ </array>
+ <string key="NSFrame">{{20, 20}, {318, 231}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <reference key="NSNextKeyView" ref="580565898"/>
+ <int key="NSsFlags">133170</int>
+ <reference key="NSVScroller" ref="842897584"/>
+ <reference key="NSHScroller" ref="17278747"/>
+ <reference key="NSContentView" ref="580565898"/>
+ <reference key="NSHeaderClipView" ref="672307654"/>
+ <reference key="NSCornerView" ref="898633680"/>
+ <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
+ </object>
+ <object class="NSButton" id="758204686">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{340, 223}, {158, 32}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="1025474039">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">137887744</int>
+ <string key="NSContents">Objekt hinzufügen</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="758204686"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="549406736"/>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrameSize">{512, 271}</string>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSMinSize">{512, 262}</string>
+ <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSFrameAutosaveName">x11_apps</string>
+ </object>
+ <object class="NSMenu" id="294137138">
+ <string key="NSTitle">Menü</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="318286212">
+ <reference key="NSMenu" ref="294137138"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="511651072">
+ <reference key="NSMenu" ref="294137138"/>
+ <string key="NSTitle">Programme</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="48278059">
+ <string key="NSTitle">Programme</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="563798000">
+ <reference key="NSMenu" ref="48278059"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1032342329">
+ <reference key="NSMenu" ref="48278059"/>
+ <string key="NSTitle">Anpassen …</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ </array>
+ <string key="NSName"/>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">copy:</string>
+ <reference key="source" ref="941939442"/>
+ <reference key="destination" ref="185296989"/>
+ </object>
+ <int key="connectionID">181</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">minimize_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="677652931"/>
+ </object>
+ <int key="connectionID">202</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">close_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="984461797"/>
+ </object>
+ <int key="connectionID">205</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">zoom_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1066447520"/>
+ </object>
+ <int key="connectionID">206</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">bring_to_front:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="276216762"/>
+ </object>
+ <int key="connectionID">207</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">hideOtherApplications:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="206802571"/>
+ </object>
+ <int key="connectionID">263</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">apps_separator</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="390088328"/>
+ </object>
+ <int key="connectionID">273</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">apps_table</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="905092943"/>
+ </object>
+ <int key="connectionID">301</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_delete:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="492358940"/>
+ </object>
+ <int key="connectionID">303</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_duplicate:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="671954382"/>
+ </object>
+ <int key="connectionID">304</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_show:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1065386165"/>
+ </object>
+ <int key="connectionID">308</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_new:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="758204686"/>
+ </object>
+ <int key="connectionID">311</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_show:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="386173216"/>
+ </object>
+ <int key="connectionID">318</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">x11_about_item</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="139290918"/>
+ </object>
+ <int key="connectionID">321</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_auth</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="989050925"/>
+ </object>
+ <int key="connectionID">387</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_tcp</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="700826966"/>
+ </object>
+ <int key="connectionID">388</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">depth</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="709074847"/>
+ </object>
+ <int key="connectionID">389</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">fake_buttons</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="119157981"/>
+ </object>
+ <int key="connectionID">391</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_keymap</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="179949713"/>
+ </object>
+ <int key="connectionID">392</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_keyequivs</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="842100515"/>
+ </object>
+ <int key="connectionID">393</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="119157981"/>
+ </object>
+ <int key="connectionID">394</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="179949713"/>
+ </object>
+ <int key="connectionID">395</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="842100515"/>
+ </object>
+ <int key="connectionID">396</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="709074847"/>
+ </object>
+ <int key="connectionID">398</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="989050925"/>
+ </object>
+ <int key="connectionID">399</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="700826966"/>
+ </object>
+ <int key="connectionID">401</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">prefs_panel</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="124913468"/>
+ </object>
+ <int key="connectionID">402</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">x11_help:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="504984881"/>
+ </object>
+ <int key="connectionID">422</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dockMenu</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="294137138"/>
+ </object>
+ <int key="connectionID">426</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dock_menu</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="294137138"/>
+ </object>
+ <int key="connectionID">428</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="485884620"/>
+ </object>
+ <int key="connectionID">429</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">hide:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="301008465"/>
+ </object>
+ <int key="connectionID">430</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">unhideAllApplications:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="1023546148"/>
+ </object>
+ <int key="connectionID">431</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">orderFrontStandardAboutPanel:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="139290918"/>
+ </object>
+ <int key="connectionID">433</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dock_apps_menu</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="48278059"/>
+ </object>
+ <int key="connectionID">530</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dock_window_separator</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="318286212"/>
+ </object>
+ <int key="connectionID">531</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_show:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1032342329"/>
+ </object>
+ <int key="connectionID">534</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">next_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1036389925"/>
+ </object>
+ <int key="connectionID">539</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">previous_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="369641893"/>
+ </object>
+ <int key="connectionID">540</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_fullscreen</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477203622"/>
+ </object>
+ <int key="connectionID">546</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">enable_fullscreen_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477203622"/>
+ </object>
+ <int key="connectionID">547</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggle_fullscreen:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="6876565"/>
+ </object>
+ <int key="connectionID">548</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">toggle_fullscreen_item</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="6876565"/>
+ </object>
+ <int key="connectionID">549</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">menu</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="524015605"/>
+ </object>
+ <int key="connectionID">300334</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">terminate:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="274138642"/>
+ </object>
+ <int key="connectionID">300336</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="657659108"/>
+ </object>
+ <int key="connectionID">300389</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="992839333"/>
+ </object>
+ <int key="connectionID">300390</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="128352289"/>
+ </object>
+ <int key="connectionID">300391</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">click_through</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="657659108"/>
+ </object>
+ <int key="connectionID">300392</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">focus_follows_mouse</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="992839333"/>
+ </object>
+ <int key="connectionID">300393</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">focus_on_new_window</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="128352289"/>
+ </object>
+ <int key="connectionID">300394</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">copy_menu_item</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="185296989"/>
+ </object>
+ <int key="connectionID">300443</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_pasteboard</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="878106058"/>
+ </object>
+ <int key="connectionID">300444</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_clipboard_to_pasteboard</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="487809555"/>
+ </object>
+ <int key="connectionID">300461</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_pasteboard_to_clipboard</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477050998"/>
+ </object>
+ <int key="connectionID">300462</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_pasteboard_to_primary</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="765780304"/>
+ </object>
+ <int key="connectionID">300463</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_primary_immediately</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1002778833"/>
+ </object>
+ <int key="connectionID">300464</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="878106058"/>
+ </object>
+ <int key="connectionID">300465</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="487809555"/>
+ </object>
+ <int key="connectionID">300466</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477050998"/>
+ </object>
+ <int key="connectionID">300467</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="765780304"/>
+ </object>
+ <int key="connectionID">300468</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1002778833"/>
+ </object>
+ <int key="connectionID">300469</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_text1</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="620944856"/>
+ </object>
+ <int key="connectionID">300470</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_text2</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="522511724"/>
+ </object>
+ <int key="connectionID">300471</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_fullscreen_menu</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="57246850"/>
+ </object>
+ <int key="connectionID">300474</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="57246850"/>
+ </object>
+ <int key="connectionID">300475</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="406291430"/>
+ </object>
+ <int key="connectionID">300480</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">option_sends_alt</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="406291430"/>
+ </object>
+ <int key="connectionID">300481</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="904585544"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="815810918"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="941939442"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="951368722"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">29</int>
+ <reference key="object" ref="524015605"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="931553638"/>
+ <reference ref="365880285"/>
+ <reference ref="200491363"/>
+ <reference ref="868031522"/>
+ <reference ref="551174276"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">MainMenu</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">19</int>
+ <reference key="object" ref="931553638"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="96874957"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">24</int>
+ <reference key="object" ref="96874957"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="677652931"/>
+ <reference ref="276216762"/>
+ <reference ref="1066447520"/>
+ <reference ref="1036389925"/>
+ <reference ref="369641893"/>
+ <reference ref="155085383"/>
+ <reference ref="984461797"/>
+ <reference ref="280172320"/>
+ </array>
+ <reference key="parent" ref="931553638"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="276216762"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">23</int>
+ <reference key="object" ref="677652931"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">92</int>
+ <reference key="object" ref="280172320"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">203</int>
+ <reference key="object" ref="984461797"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">204</int>
+ <reference key="object" ref="1066447520"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">536</int>
+ <reference key="object" ref="155085383"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">537</int>
+ <reference key="object" ref="1036389925"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">538</int>
+ <reference key="object" ref="369641893"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">56</int>
+ <reference key="object" ref="365880285"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="576521955"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">57</int>
+ <reference key="object" ref="576521955"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="139290918"/>
+ <reference ref="386173216"/>
+ <reference ref="32285361"/>
+ <reference ref="301008465"/>
+ <reference ref="274138642"/>
+ <reference ref="272876017"/>
+ <reference ref="431301145"/>
+ <reference ref="206802571"/>
+ <reference ref="848095279"/>
+ <reference ref="1023546148"/>
+ <reference ref="6876565"/>
+ <reference ref="479677589"/>
+ </array>
+ <reference key="parent" ref="365880285"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">58</int>
+ <reference key="object" ref="139290918"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">129</int>
+ <reference key="object" ref="386173216"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">131</int>
+ <reference key="object" ref="32285361"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="821388474"/>
+ </array>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">130</int>
+ <reference key="object" ref="821388474"/>
+ <reference key="parent" ref="32285361"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">134</int>
+ <reference key="object" ref="301008465"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">136</int>
+ <reference key="object" ref="274138642"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">143</int>
+ <reference key="object" ref="272876017"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">144</int>
+ <reference key="object" ref="431301145"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">145</int>
+ <reference key="object" ref="206802571"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">149</int>
+ <reference key="object" ref="848095279"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">150</int>
+ <reference key="object" ref="1023546148"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">544</int>
+ <reference key="object" ref="6876565"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">545</int>
+ <reference key="object" ref="479677589"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">163</int>
+ <reference key="object" ref="200491363"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="526778998"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">169</int>
+ <reference key="object" ref="526778998"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="185296989"/>
+ </array>
+ <reference key="parent" ref="200491363"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">157</int>
+ <reference key="object" ref="185296989"/>
+ <reference key="parent" ref="526778998"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">269</int>
+ <reference key="object" ref="868031522"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="981161348"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">270</int>
+ <reference key="object" ref="981161348"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="390088328"/>
+ <reference ref="1065386165"/>
+ </array>
+ <reference key="parent" ref="868031522"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">272</int>
+ <reference key="object" ref="390088328"/>
+ <reference key="parent" ref="981161348"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">305</int>
+ <reference key="object" ref="1065386165"/>
+ <reference key="parent" ref="981161348"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">419</int>
+ <reference key="object" ref="551174276"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="511848303"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">420</int>
+ <reference key="object" ref="511848303"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="504984881"/>
+ </array>
+ <reference key="parent" ref="551174276"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">421</int>
+ <reference key="object" ref="504984881"/>
+ <reference key="parent" ref="511848303"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">196</int>
+ <reference key="object" ref="485884620"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">X11Controller</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">244</int>
+ <reference key="object" ref="124913468"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="941366957"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">PrefsPanel</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">245</int>
+ <reference key="object" ref="941366957"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="448510093"/>
+ </array>
+ <reference key="parent" ref="124913468"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">348</int>
+ <reference key="object" ref="448510093"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="287591690"/>
+ <reference ref="960678392"/>
+ <reference ref="348328898"/>
+ <reference ref="10973343"/>
+ <reference ref="723450037"/>
+ </array>
+ <reference key="parent" ref="941366957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">349</int>
+ <reference key="object" ref="287591690"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="596750588"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">351</int>
+ <reference key="object" ref="596750588"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="119157981"/>
+ <reference ref="443008216"/>
+ <reference ref="282885445"/>
+ <reference ref="842100515"/>
+ <reference ref="31160162"/>
+ <reference ref="179949713"/>
+ <reference ref="278155937"/>
+ <reference ref="406291430"/>
+ </array>
+ <reference key="parent" ref="287591690"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">363</int>
+ <reference key="object" ref="119157981"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="990762273"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">364</int>
+ <reference key="object" ref="443008216"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="391919450"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">365</int>
+ <reference key="object" ref="282885445"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="649334366"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">368</int>
+ <reference key="object" ref="842100515"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="940564599"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">369</int>
+ <reference key="object" ref="31160162"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="666057093"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">370</int>
+ <reference key="object" ref="179949713"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="967619578"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">352</int>
+ <reference key="object" ref="960678392"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="515308735"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">350</int>
+ <reference key="object" ref="515308735"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="709074847"/>
+ <reference ref="201731424"/>
+ <reference ref="86150604"/>
+ <reference ref="477203622"/>
+ <reference ref="57246850"/>
+ <reference ref="298603383"/>
+ </array>
+ <reference key="parent" ref="960678392"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">382</int>
+ <reference key="object" ref="709074847"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="633115429"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">385</int>
+ <reference key="object" ref="201731424"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="930265681"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">386</int>
+ <reference key="object" ref="86150604"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="311969422"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">541</int>
+ <reference key="object" ref="477203622"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="631531164"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">543</int>
+ <reference key="object" ref="298603383"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="761107402"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">353</int>
+ <reference key="object" ref="348328898"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="300811574"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">354</int>
+ <reference key="object" ref="300811574"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="989050925"/>
+ <reference ref="700826966"/>
+ <reference ref="168436707"/>
+ <reference ref="363817195"/>
+ <reference ref="223835729"/>
+ </array>
+ <reference key="parent" ref="348328898"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">374</int>
+ <reference key="object" ref="989050925"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="189594322"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">375</int>
+ <reference key="object" ref="700826966"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="489340979"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">376</int>
+ <reference key="object" ref="168436707"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="53243865"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">377</int>
+ <reference key="object" ref="363817195"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="390084685"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">379</int>
+ <reference key="object" ref="223835729"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="283628678"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">285</int>
+ <reference key="object" ref="604417141"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="85544634"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">EditPrograms</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">286</int>
+ <reference key="object" ref="85544634"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1063387772"/>
+ <reference ref="758204686"/>
+ <reference ref="671954382"/>
+ <reference ref="492358940"/>
+ </array>
+ <reference key="parent" ref="604417141"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">423</int>
+ <reference key="object" ref="294137138"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="318286212"/>
+ <reference ref="511651072"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">DockMenu</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">524</int>
+ <reference key="object" ref="318286212"/>
+ <reference key="parent" ref="294137138"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">526</int>
+ <reference key="object" ref="511651072"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="48278059"/>
+ </array>
+ <reference key="parent" ref="294137138"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">527</int>
+ <reference key="object" ref="48278059"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1032342329"/>
+ <reference ref="563798000"/>
+ </array>
+ <reference key="parent" ref="511651072"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">532</int>
+ <reference key="object" ref="1032342329"/>
+ <reference key="parent" ref="48278059"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">533</int>
+ <reference key="object" ref="563798000"/>
+ <reference key="parent" ref="48278059"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100363</int>
+ <reference key="object" ref="990762273"/>
+ <reference key="parent" ref="119157981"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100364</int>
+ <reference key="object" ref="391919450"/>
+ <reference key="parent" ref="443008216"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100365</int>
+ <reference key="object" ref="649334366"/>
+ <reference key="parent" ref="282885445"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100368</int>
+ <reference key="object" ref="940564599"/>
+ <reference key="parent" ref="842100515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100369</int>
+ <reference key="object" ref="666057093"/>
+ <reference key="parent" ref="31160162"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100370</int>
+ <reference key="object" ref="967619578"/>
+ <reference key="parent" ref="179949713"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100382</int>
+ <reference key="object" ref="633115429"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="341113515"/>
+ </array>
+ <reference key="parent" ref="709074847"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100385</int>
+ <reference key="object" ref="930265681"/>
+ <reference key="parent" ref="201731424"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100386</int>
+ <reference key="object" ref="311969422"/>
+ <reference key="parent" ref="86150604"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100541</int>
+ <reference key="object" ref="631531164"/>
+ <reference key="parent" ref="477203622"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100543</int>
+ <reference key="object" ref="761107402"/>
+ <reference key="parent" ref="298603383"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100374</int>
+ <reference key="object" ref="189594322"/>
+ <reference key="parent" ref="989050925"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100375</int>
+ <reference key="object" ref="489340979"/>
+ <reference key="parent" ref="700826966"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100376</int>
+ <reference key="object" ref="53243865"/>
+ <reference key="parent" ref="168436707"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100377</int>
+ <reference key="object" ref="390084685"/>
+ <reference key="parent" ref="363817195"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100379</int>
+ <reference key="object" ref="283628678"/>
+ <reference key="parent" ref="223835729"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">380</int>
+ <reference key="object" ref="341113515"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="759499526"/>
+ <reference ref="616492372"/>
+ <reference ref="543935434"/>
+ <reference ref="836673018"/>
+ </array>
+ <reference key="parent" ref="633115429"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">435</int>
+ <reference key="object" ref="759499526"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">384</int>
+ <reference key="object" ref="616492372"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">383</int>
+ <reference key="object" ref="543935434"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">381</int>
+ <reference key="object" ref="836673018"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">295</int>
+ <reference key="object" ref="1063387772"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="792419186"/>
+ <reference ref="17278747"/>
+ <reference ref="842897584"/>
+ <reference ref="905092943"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300295</int>
+ <reference key="object" ref="792419186"/>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">200295</int>
+ <reference key="object" ref="17278747"/>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100295</int>
+ <reference key="object" ref="842897584"/>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">296</int>
+ <reference key="object" ref="905092943"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="242608782"/>
+ <reference ref="938444323"/>
+ <reference ref="84282687"/>
+ </array>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">535</int>
+ <reference key="object" ref="242608782"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="34714764"/>
+ </array>
+ <reference key="parent" ref="905092943"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">575</int>
+ <reference key="object" ref="34714764"/>
+ <reference key="parent" ref="242608782"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">298</int>
+ <reference key="object" ref="938444323"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="825378892"/>
+ </array>
+ <reference key="parent" ref="905092943"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">573</int>
+ <reference key="object" ref="825378892"/>
+ <reference key="parent" ref="938444323"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">297</int>
+ <reference key="object" ref="84282687"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="432610585"/>
+ </array>
+ <reference key="parent" ref="905092943"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">574</int>
+ <reference key="object" ref="432610585"/>
+ <reference key="parent" ref="84282687"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">310</int>
+ <reference key="object" ref="758204686"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1025474039"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100310</int>
+ <reference key="object" ref="1025474039"/>
+ <reference key="parent" ref="758204686"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">292</int>
+ <reference key="object" ref="671954382"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="143554520"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100292</int>
+ <reference key="object" ref="143554520"/>
+ <reference key="parent" ref="671954382"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">293</int>
+ <reference key="object" ref="492358940"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="8201128"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100293</int>
+ <reference key="object" ref="8201128"/>
+ <reference key="parent" ref="492358940"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300337</int>
+ <reference key="object" ref="10973343"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="184765684"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300338</int>
+ <reference key="object" ref="184765684"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="657659108"/>
+ <reference ref="290578835"/>
+ <reference ref="992839333"/>
+ <reference ref="138261120"/>
+ <reference ref="128352289"/>
+ <reference ref="57161931"/>
+ </array>
+ <reference key="parent" ref="10973343"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300358</int>
+ <reference key="object" ref="290578835"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="399127858"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300359</int>
+ <reference key="object" ref="657659108"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="259618205"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300360</int>
+ <reference key="object" ref="259618205"/>
+ <reference key="parent" ref="657659108"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300361</int>
+ <reference key="object" ref="399127858"/>
+ <reference key="parent" ref="290578835"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300362</int>
+ <reference key="object" ref="992839333"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="959555182"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300363</int>
+ <reference key="object" ref="959555182"/>
+ <reference key="parent" ref="992839333"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300364</int>
+ <reference key="object" ref="138261120"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="183409141"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300365</int>
+ <reference key="object" ref="183409141"/>
+ <reference key="parent" ref="138261120"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300368</int>
+ <reference key="object" ref="128352289"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="556463187"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300369</int>
+ <reference key="object" ref="556463187"/>
+ <reference key="parent" ref="128352289"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300370</int>
+ <reference key="object" ref="57161931"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="989804990"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300371</int>
+ <reference key="object" ref="989804990"/>
+ <reference key="parent" ref="57161931"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300421</int>
+ <reference key="object" ref="723450037"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="408298283"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300422</int>
+ <reference key="object" ref="408298283"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="878106058"/>
+ <reference ref="386152084"/>
+ <reference ref="487809555"/>
+ <reference ref="620944856"/>
+ <reference ref="477050998"/>
+ <reference ref="765780304"/>
+ <reference ref="1002778833"/>
+ <reference ref="522511724"/>
+ </array>
+ <reference key="parent" ref="723450037"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300423</int>
+ <reference key="object" ref="386152084"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="572508492"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300424</int>
+ <reference key="object" ref="878106058"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="718083688"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300440</int>
+ <reference key="object" ref="718083688"/>
+ <reference key="parent" ref="878106058"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300441</int>
+ <reference key="object" ref="572508492"/>
+ <reference key="parent" ref="386152084"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300447</int>
+ <reference key="object" ref="477050998"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="501304422"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300450</int>
+ <reference key="object" ref="501304422"/>
+ <reference key="parent" ref="477050998"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300451</int>
+ <reference key="object" ref="765780304"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="510771323"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300452</int>
+ <reference key="object" ref="510771323"/>
+ <reference key="parent" ref="765780304"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300453</int>
+ <reference key="object" ref="487809555"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="619977658"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300454</int>
+ <reference key="object" ref="619977658"/>
+ <reference key="parent" ref="487809555"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300455</int>
+ <reference key="object" ref="620944856"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="461823902"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300456</int>
+ <reference key="object" ref="461823902"/>
+ <reference key="parent" ref="620944856"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300457</int>
+ <reference key="object" ref="1002778833"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="897099877"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300458</int>
+ <reference key="object" ref="897099877"/>
+ <reference key="parent" ref="1002778833"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300459</int>
+ <reference key="object" ref="522511724"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="994587858"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300460</int>
+ <reference key="object" ref="994587858"/>
+ <reference key="parent" ref="522511724"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300472</int>
+ <reference key="object" ref="57246850"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="917248662"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300473</int>
+ <reference key="object" ref="917248662"/>
+ <reference key="parent" ref="57246850"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300476</int>
+ <reference key="object" ref="278155937"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="617441821"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300477</int>
+ <reference key="object" ref="406291430"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="67728988"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300478</int>
+ <reference key="object" ref="67728988"/>
+ <reference key="parent" ref="406291430"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300479</int>
+ <reference key="object" ref="617441821"/>
+ <reference key="parent" ref="278155937"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="-3.ImportedFromIB2"/>
+ <string key="100292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="100295.IBShouldRemoveOnLegacySave"/>
+ <string key="100310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="129.ImportedFromIB2"/>
+ <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="130.ImportedFromIB2"/>
+ <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="131.ImportedFromIB2"/>
+ <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="134.ImportedFromIB2"/>
+ <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="136.ImportedFromIB2"/>
+ <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="143.ImportedFromIB2"/>
+ <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="144.ImportedFromIB2"/>
+ <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="145.ImportedFromIB2"/>
+ <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="149.ImportedFromIB2"/>
+ <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="150.ImportedFromIB2"/>
+ <string key="157.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="157.ImportedFromIB2"/>
+ <string key="163.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="163.ImportedFromIB2"/>
+ <string key="169.IBEditorWindowLastContentRect">{{168, 821}, {113, 23}}</string>
+ <string key="169.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="169.ImportedFromIB2"/>
+ <string key="169.editorWindowContentRectSynchronizationRect">{{202, 626}, {154, 153}}</string>
+ <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="19.ImportedFromIB2"/>
+ <integer value="1" key="196.ImportedFromIB2"/>
+ <string key="200295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="200295.IBShouldRemoveOnLegacySave"/>
+ <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="203.ImportedFromIB2"/>
+ <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="204.ImportedFromIB2"/>
+ <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="23.ImportedFromIB2"/>
+ <string key="24.IBEditorWindowLastContentRect">{{349, 868}, {315, 143}}</string>
+ <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="24.ImportedFromIB2"/>
+ <string key="24.editorWindowContentRectSynchronizationRect">{{271, 666}, {301, 153}}</string>
+ <string key="244.IBEditorWindowLastContentRect">{{507, 565}, {484, 308}}</string>
+ <string key="244.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="244.IBWindowTemplateEditedContentRect">{{507, 565}, {484, 308}}</string>
+ <integer value="1" key="244.ImportedFromIB2"/>
+ <string key="244.editorWindowContentRectSynchronizationRect">{{184, 290}, {481, 345}}</string>
+ <integer value="0" key="244.windowTemplate.hasMaxSize"/>
+ <integer value="1" key="244.windowTemplate.hasMinSize"/>
+ <string key="244.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="244.windowTemplate.minSize">{320, 240}</string>
+ <string key="245.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="245.ImportedFromIB2"/>
+ <string key="269.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="269.ImportedFromIB2"/>
+ <string key="270.IBEditorWindowLastContentRect">{{58, 803}, {155, 33}}</string>
+ <string key="270.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="270.ImportedFromIB2"/>
+ <string key="270.editorWindowContentRectSynchronizationRect">{{100, 746}, {155, 33}}</string>
+ <string key="272.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="272.ImportedFromIB2"/>
+ <string key="285.IBEditorWindowLastContentRect">{{68, 585}, {454, 271}}</string>
+ <string key="285.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="285.IBViewEditorWindowController.showingBoundsRectangles"/>
+ <integer value="1" key="285.IBViewEditorWindowController.showingLayoutRectangles"/>
+ <string key="285.IBWindowTemplateEditedContentRect">{{68, 585}, {454, 271}}</string>
+ <integer value="1" key="285.ImportedFromIB2"/>
+ <string key="285.editorWindowContentRectSynchronizationRect">{{433, 406}, {486, 327}}</string>
+ <integer value="0" key="285.windowTemplate.hasMaxSize"/>
+ <integer value="1" key="285.windowTemplate.hasMinSize"/>
+ <string key="285.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="285.windowTemplate.minSize">{512, 240}</string>
+ <string key="286.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="286.ImportedFromIB2"/>
+ <string key="29.IBEditorWindowLastContentRect">{{145, 1011}, {336, 20}}</string>
+ <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="29.ImportedFromIB2"/>
+ <string key="29.editorWindowContentRectSynchronizationRect">{{67, 819}, {336, 20}}</string>
+ <string key="292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="292.ImportedFromIB2"/>
+ <string key="293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="293.ImportedFromIB2"/>
+ <string key="295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="295.ImportedFromIB2"/>
+ <string key="296.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="296.ImportedFromIB2"/>
+ <string key="297.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="297.ImportedFromIB2"/>
+ <string key="298.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="298.ImportedFromIB2"/>
+ <string key="300295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300295.IBShouldRemoveOnLegacySave"/>
+ <string key="300337.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300337.ImportedFromIB2"/>
+ <string key="300338.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300338.ImportedFromIB2"/>
+ <string key="300358.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300358.ImportedFromIB2"/>
+ <string key="300359.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300359.ImportedFromIB2"/>
+ <string key="300360.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300361.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300362.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300362.ImportedFromIB2"/>
+ <string key="300363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300364.ImportedFromIB2"/>
+ <string key="300365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300368.ImportedFromIB2"/>
+ <string key="300369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300370.ImportedFromIB2"/>
+ <string key="300371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300421.ImportedFromIB2"/>
+ <string key="300422.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300422.ImportedFromIB2"/>
+ <string key="300423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300423.ImportedFromIB2"/>
+ <string key="300424.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300424.ImportedFromIB2"/>
+ <string key="300440.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300441.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300447.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300447.ImportedFromIB2"/>
+ <string key="300450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300451.ImportedFromIB2"/>
+ <string key="300452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300453.ImportedFromIB2"/>
+ <string key="300454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300455.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300455.ImportedFromIB2"/>
+ <string key="300456.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300457.ImportedFromIB2"/>
+ <string key="300458.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300459.ImportedFromIB2"/>
+ <string key="300460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300472.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300472.ImportedFromIB2"/>
+ <string key="300473.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300476.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300476.ImportedFromIB2"/>
+ <string key="300477.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300477.ImportedFromIB2"/>
+ <string key="300478.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300479.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="305.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="305.ImportedFromIB2"/>
+ <string key="310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="310.ImportedFromIB2"/>
+ <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="348.ImportedFromIB2"/>
+ <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="349.ImportedFromIB2"/>
+ <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="350.ImportedFromIB2"/>
+ <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="351.ImportedFromIB2"/>
+ <string key="352.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="352.ImportedFromIB2"/>
+ <string key="353.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="353.ImportedFromIB2"/>
+ <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="354.ImportedFromIB2"/>
+ <string key="363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="363.ImportedFromIB2"/>
+ <string key="364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="364.ImportedFromIB2"/>
+ <string key="365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="365.ImportedFromIB2"/>
+ <string key="368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="368.ImportedFromIB2"/>
+ <string key="369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="369.ImportedFromIB2"/>
+ <string key="370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="370.ImportedFromIB2"/>
+ <string key="374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="374.ImportedFromIB2"/>
+ <string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="375.ImportedFromIB2"/>
+ <string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="376.ImportedFromIB2"/>
+ <string key="377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="377.ImportedFromIB2"/>
+ <string key="379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="379.ImportedFromIB2"/>
+ <string key="380.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="380.ImportedFromIB2"/>
+ <string key="381.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="381.ImportedFromIB2"/>
+ <string key="382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="382.ImportedFromIB2"/>
+ <string key="383.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="383.ImportedFromIB2"/>
+ <string key="384.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="384.ImportedFromIB2"/>
+ <string key="385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="385.ImportedFromIB2"/>
+ <string key="386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="386.ImportedFromIB2"/>
+ <string key="419.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="419.ImportedFromIB2"/>
+ <string key="420.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="420.ImportedFromIB2"/>
+ <string key="421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="421.ImportedFromIB2"/>
+ <string key="423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="423.ImportedFromIB2"/>
+ <string key="435.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="435.ImportedFromIB2"/>
+ <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="5.ImportedFromIB2"/>
+ <string key="524.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="524.ImportedFromIB2"/>
+ <string key="526.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="526.ImportedFromIB2"/>
+ <string key="527.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="527.ImportedFromIB2"/>
+ <string key="532.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="532.ImportedFromIB2"/>
+ <string key="533.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="533.ImportedFromIB2"/>
+ <string key="535.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="535.ImportedFromIB2"/>
+ <string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="536.ImportedFromIB2"/>
+ <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="537.ImportedFromIB2"/>
+ <string key="538.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="538.ImportedFromIB2"/>
+ <string key="541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="541.ImportedFromIB2"/>
+ <string key="543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="543.ImportedFromIB2"/>
+ <string key="544.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="544.ImportedFromIB2"/>
+ <string key="545.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="545.ImportedFromIB2"/>
+ <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="56.ImportedFromIB2"/>
+ <string key="57.IBEditorWindowLastContentRect">{{20, 641}, {218, 203}}</string>
+ <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="57.ImportedFromIB2"/>
+ <string key="57.editorWindowContentRectSynchronizationRect">{{79, 616}, {218, 203}}</string>
+ <string key="573.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="573.ImportedFromIB2"/>
+ <string key="574.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="574.ImportedFromIB2"/>
+ <string key="575.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="575.ImportedFromIB2"/>
+ <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="58.ImportedFromIB2"/>
+ <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="92.ImportedFromIB2"/>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">300481</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">FirstResponder</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSFormatter</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">X11Controller</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ </array>
+ <array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
+ <object class="IBPartialClassDescription">
+ <string key="className">X11Controller</string>
+ <string key="superclassName">NSObject</string>
+ <dictionary class="NSMutableDictionary" key="actions">
+ <string key="apps_table_delete:">id</string>
+ <string key="apps_table_done:">id</string>
+ <string key="apps_table_duplicate:">id</string>
+ <string key="apps_table_new:">id</string>
+ <string key="apps_table_show:">id</string>
+ <string key="bring_to_front:">id</string>
+ <string key="close_window:">id</string>
+ <string key="enable_fullscreen_changed:">id</string>
+ <string key="minimize_window:">id</string>
+ <string key="next_window:">id</string>
+ <string key="prefs_changed:">id</string>
+ <string key="prefs_show:">id</string>
+ <string key="previous_window:">id</string>
+ <string key="quit:">id</string>
+ <string key="toggle_fullscreen:">id</string>
+ <string key="x11_help:">id</string>
+ <string key="zoom_window:">id</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="actionInfosByName">
+ <object class="IBActionInfo" key="apps_table_delete:">
+ <string key="name">apps_table_delete:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_done:">
+ <string key="name">apps_table_done:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_duplicate:">
+ <string key="name">apps_table_duplicate:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_new:">
+ <string key="name">apps_table_new:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_show:">
+ <string key="name">apps_table_show:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="bring_to_front:">
+ <string key="name">bring_to_front:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="close_window:">
+ <string key="name">close_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="enable_fullscreen_changed:">
+ <string key="name">enable_fullscreen_changed:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="minimize_window:">
+ <string key="name">minimize_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="next_window:">
+ <string key="name">next_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="prefs_changed:">
+ <string key="name">prefs_changed:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="prefs_show:">
+ <string key="name">prefs_show:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="previous_window:">
+ <string key="name">previous_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="quit:">
+ <string key="name">quit:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="toggle_fullscreen:">
+ <string key="name">toggle_fullscreen:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="x11_help:">
+ <string key="name">x11_help:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="zoom_window:">
+ <string key="name">zoom_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="outlets">
+ <string key="apps_separator">NSMenuItem</string>
+ <string key="apps_table">NSTableView</string>
+ <string key="click_through">NSButton</string>
+ <string key="copy_menu_item">NSMenuItem</string>
+ <string key="depth">NSPopUpButton</string>
+ <string key="dock_apps_menu">NSMenu</string>
+ <string key="dock_menu">NSMenu</string>
+ <string key="dock_window_separator">NSMenuItem</string>
+ <string key="enable_auth">NSButton</string>
+ <string key="enable_fullscreen">NSButton</string>
+ <string key="enable_fullscreen_menu">NSButton</string>
+ <string key="enable_keyequivs">NSButton</string>
+ <string key="enable_tcp">NSButton</string>
+ <string key="fake_buttons">NSButton</string>
+ <string key="focus_follows_mouse">NSButton</string>
+ <string key="focus_on_new_window">NSButton</string>
+ <string key="option_sends_alt">NSButton</string>
+ <string key="prefs_panel">NSPanel</string>
+ <string key="sync_clipboard_to_pasteboard">NSButton</string>
+ <string key="sync_keymap">NSButton</string>
+ <string key="sync_pasteboard">NSButton</string>
+ <string key="sync_pasteboard_to_clipboard">NSButton</string>
+ <string key="sync_pasteboard_to_primary">NSButton</string>
+ <string key="sync_primary_immediately">NSButton</string>
+ <string key="sync_text1">NSTextField</string>
+ <string key="sync_text2">NSTextField</string>
+ <string key="toggle_fullscreen_item">NSMenuItem</string>
+ <string key="use_sysbeep">NSButton</string>
+ <string key="window_separator">NSMenuItem</string>
+ <string key="x11_about_item">NSMenuItem</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <object class="IBToOneOutletInfo" key="apps_separator">
+ <string key="name">apps_separator</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="apps_table">
+ <string key="name">apps_table</string>
+ <string key="candidateClassName">NSTableView</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="click_through">
+ <string key="name">click_through</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="copy_menu_item">
+ <string key="name">copy_menu_item</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="depth">
+ <string key="name">depth</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dock_apps_menu">
+ <string key="name">dock_apps_menu</string>
+ <string key="candidateClassName">NSMenu</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dock_menu">
+ <string key="name">dock_menu</string>
+ <string key="candidateClassName">NSMenu</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dock_window_separator">
+ <string key="name">dock_window_separator</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_auth">
+ <string key="name">enable_auth</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_fullscreen">
+ <string key="name">enable_fullscreen</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_fullscreen_menu">
+ <string key="name">enable_fullscreen_menu</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_keyequivs">
+ <string key="name">enable_keyequivs</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_tcp">
+ <string key="name">enable_tcp</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="fake_buttons">
+ <string key="name">fake_buttons</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="focus_follows_mouse">
+ <string key="name">focus_follows_mouse</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="focus_on_new_window">
+ <string key="name">focus_on_new_window</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="option_sends_alt">
+ <string key="name">option_sends_alt</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="prefs_panel">
+ <string key="name">prefs_panel</string>
+ <string key="candidateClassName">NSPanel</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_clipboard_to_pasteboard">
+ <string key="name">sync_clipboard_to_pasteboard</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_keymap">
+ <string key="name">sync_keymap</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_pasteboard">
+ <string key="name">sync_pasteboard</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_pasteboard_to_clipboard">
+ <string key="name">sync_pasteboard_to_clipboard</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_pasteboard_to_primary">
+ <string key="name">sync_pasteboard_to_primary</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_primary_immediately">
+ <string key="name">sync_primary_immediately</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_text1">
+ <string key="name">sync_text1</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_text2">
+ <string key="name">sync_text2</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="toggle_fullscreen_item">
+ <string key="name">toggle_fullscreen_item</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="use_sysbeep">
+ <string key="name">use_sysbeep</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="window_separator">
+ <string key="name">window_separator</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="x11_about_item">
+ <string key="name">x11_about_item</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ </dictionary>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBDocumentRelativeSource</string>
+ <string key="minorKey">../../../X11Controller.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
+ <integer value="1040" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../X11.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NSMenuCheckmark">{9, 8}</string>
+ <string key="NSMenuMixedState">{7, 2}</string>
+ <string key="NSSwitch">{15, 15}</string>
+ </dictionary>
+ </data>
+</archive>
diff --git a/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist b/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist
index 6c8948397..e0a16c72f 100644
--- a/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist
+++ b/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>LprojCompatibleVersion</key>
- <string>102</string>
- <key>LprojLocale</key>
- <string>ja</string>
- <key>LprojRevisionLevel</key>
- <string>1</string>
- <key>LprojVersion</key>
- <string>102</string>
-</dict>
-</plist>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>LprojCompatibleVersion</key>
+ <string>102</string>
+ <key>LprojLocale</key>
+ <string>ja</string>
+ <key>LprojRevisionLevel</key>
+ <string>1</string>
+ <key>LprojVersion</key>
+ <string>102</string>
+</dict>
+</plist>
diff --git a/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib
index a800d3c9d..57bb540cd 100644
--- a/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib
+++ b/xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib
@@ -1,3765 +1,3765 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
- <data>
- <int key="IBDocument.SystemTarget">1040</int>
- <string key="IBDocument.SystemVersion">11A289</string>
- <string key="IBDocument.InterfaceBuilderVersion">844</string>
- <string key="IBDocument.AppKitVersion">1094.2</string>
- <string key="IBDocument.HIToolboxVersion">521.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">844</string>
- </object>
- <array class="NSMutableArray" key="IBDocument.EditedObjectIDs"/>
- <array key="IBDocument.PluginDependencies">
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </array>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
- <integer value="1" key="NS.object.0"/>
- </object>
- <array class="NSMutableArray" key="IBDocument.RootObjects" id="904585544">
- <object class="NSCustomObject" id="815810918">
- <object class="NSMutableString" key="NSClassName">
- <characters key="NS.bytes">NSApplication</characters>
- </object>
- </object>
- <object class="NSCustomObject" id="941939442">
- <string key="NSClassName">FirstResponder</string>
- </object>
- <object class="NSCustomObject" id="951368722">
- <string key="NSClassName">NSApplication</string>
- </object>
- <object class="NSMenu" id="524015605">
- <string key="NSTitle">MainMenu</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="365880285">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">X11</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <object class="NSCustomResource" key="NSOnImage" id="531645050">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSMenuCheckmark</string>
- </object>
- <object class="NSCustomResource" key="NSMixedImage" id="351811234">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSMenuMixedState</string>
- </object>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="576521955">
- <string key="NSTitle">X11</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="139290918">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">X11 について</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="386173216">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">環境設定...</string>
- <string key="NSKeyEquiv">,</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="272876017">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="32285361">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">サービス</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="821388474">
- <string key="NSTitle">サービス</string>
- <array class="NSMutableArray" key="NSMenuItems"/>
- <string key="NSName">_NSServicesMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="431301145">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="6876565">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">フルスクリーンを切り替える</string>
- <string key="NSKeyEquiv">a</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="479677589">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="301008465">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">X11 を隠す</string>
- <string key="NSKeyEquiv">h</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <int key="NSTag">42</int>
- </object>
- <object class="NSMenuItem" id="206802571">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">ほかを隠す</string>
- <string key="NSKeyEquiv">h</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1023546148">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">すべてを表示</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <int key="NSTag">42</int>
- </object>
- <object class="NSMenuItem" id="848095279">
- <reference key="NSMenu" ref="576521955"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="274138642">
- <reference key="NSMenu" ref="576521955"/>
- <string key="NSTitle">X11 を終了</string>
- <string key="NSKeyEquiv">q</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- <string key="NSName">_NSAppleMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="868031522">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">アプリケーション</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="981161348">
- <string key="NSTitle">アプリケーション</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="390088328">
- <reference key="NSMenu" ref="981161348"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1065386165">
- <reference key="NSMenu" ref="981161348"/>
- <string key="NSTitle">カスタマイズ...</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- <object class="NSMenuItem" id="200491363">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">編集</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="526778998">
- <string key="NSTitle">編集</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="185296989">
- <reference key="NSMenu" ref="526778998"/>
- <string key="NSTitle">コピー</string>
- <string key="NSKeyEquiv">c</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- <object class="NSMenuItem" id="931553638">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">ウインドウ</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="96874957">
- <string key="NSTitle">ウインドウ</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="984461797">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">閉じる</string>
- <string key="NSKeyEquiv">w</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="677652931">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">しまう</string>
- <string key="NSKeyEquiv">m</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1066447520">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">拡大/縮小</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="280172320">
- <reference key="NSMenu" ref="96874957"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1036389925">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">ウインドウを巡回</string>
- <string key="NSKeyEquiv"></string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="369641893">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">ウインドウを逆方向に巡回</string>
- <string key="NSKeyEquiv"></string>
- <int key="NSKeyEquivModMask">1179648</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="155085383">
- <reference key="NSMenu" ref="96874957"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="276216762">
- <reference key="NSMenu" ref="96874957"/>
- <string key="NSTitle">すべてを手前に移動</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- <string key="NSName">_NSWindowsMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="551174276">
- <reference key="NSMenu" ref="524015605"/>
- <string key="NSTitle">ヘルプ</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="511848303">
- <string key="NSTitle">ヘルプ</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="504984881">
- <reference key="NSMenu" ref="511848303"/>
- <string key="NSTitle">X11 ヘルプ</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- </array>
- <string key="NSName">_NSMainMenu</string>
- </object>
- <object class="NSCustomObject" id="485884620">
- <string key="NSClassName">X11Controller</string>
- </object>
- <object class="NSWindowTemplate" id="124913468">
- <int key="NSWindowStyleMask">3</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{319, 328}, {584, 308}}</string>
- <int key="NSWTFlags">1350041600</int>
- <string key="NSWindowTitle">X11 の環境設定</string>
- <string key="NSWindowClass">NSPanel</string>
- <object class="NSMutableString" key="NSViewClass">
- <characters key="NS.bytes">View</characters>
- </object>
- <nil key="NSUserInterfaceItemIdentifier"/>
- <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSWindowContentMinSize">{320, 240}</string>
- <object class="NSView" key="NSWindowView" id="941366957">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSTabView" id="448510093">
- <reference key="NSNextResponder" ref="941366957"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{13, 10}, {558, 292}}</string>
- <reference key="NSSuperview" ref="941366957"/>
- <array class="NSMutableArray" key="NSTabViewItems">
- <object class="NSTabViewItem" id="287591690">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">1</characters>
- </object>
- <object class="NSView" key="NSView" id="596750588">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="119157981">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 210}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="990762273">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">3 ボタンマウスをエミュレート</string>
- <object class="NSFont" key="NSSupport" id="463863101">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">1044</int>
- </object>
- <reference key="NSControlView" ref="119157981"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <object class="NSCustomResource" key="NSNormalImage" id="891575339">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSSwitch</string>
- </object>
- <object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
- <string key="NSImageName">NSSwitch</string>
- </object>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="443008216">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 59}, {466, 28}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="391919450">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">有効にすると、メニューバーの代替キーによって X11 アプリケーションのメタ修飾キーを使用できなくなる場合があります。</string>
- <object class="NSFont" key="NSSupport" id="26">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">11</double>
- <int key="NSfFlags">3100</int>
- </object>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="443008216"/>
- <object class="NSColor" key="NSBackgroundColor" id="57160303">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlColor</string>
- <object class="NSColor" key="NSColor" id="590688762">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
- </object>
- </object>
- <object class="NSColor" key="NSTextColor" id="930815747">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlTextColor</string>
- <object class="NSColor" key="NSColor" id="214098874">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- </object>
- </object>
- </object>
- </object>
- <object class="NSTextField" id="282885445">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 176}, {466, 28}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="649334366">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string type="base64-UTF8" key="NSContents">T3B0aW9uIOOCreODvOOCkuaKvOOBl+OBn+OBvuOBvuOCr+ODquODg+OCr+OBmeOCi+OBqOODnuOCpuOC
-ueOBruS4reODnOOCv+ODs+aTjeS9nOOBq+OBquOCiuOAgUNvbW1hbmQg44Kt44O844KS5oq844GX44Gf
-44G+44G+44Kv44Oq44OD44Kv44GZ44KL44Go44Oe44Km44K544Gu5Y+z44Oc44K/44Oz5pON5L2c44Gr
-44Gq44KK44G+44GZ44CCCg</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="282885445"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="842100515">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 93}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="940564599">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">X11 の代替キーを有効にする</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="842100515"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="31160162">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 123}, {466, 17}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="666057093">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">入力メニューを変更して現在の X11 キーマップを上書きすることを許可します。</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="31160162"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="179949713">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 146}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="967619578">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">システムのキーボードレイアウトに従う</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="179949713"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="278155937">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, -1}, {466, 31}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="617441821">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">有効にすると、option キー で Mode_switch の代わりに X11 キーシンボルの Alt_L と Alt_R が送信されます。 </string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="278155937"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="406291430">
- <reference key="NSNextResponder" ref="596750588"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 36}, {402, 18}}</string>
- <reference key="NSSuperview" ref="596750588"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="67728988">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Option キーで Alt_L と Alt_R が送信されます</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="406291430"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {538, 246}}</string>
- </object>
- <string key="NSLabel">入力</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="960678392">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">2</characters>
- </object>
- <object class="NSView" key="NSView" id="515308735">
- <reference key="NSNextResponder" ref="448510093"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSPopUpButton" id="709074847">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{75, 201}, {163, 26}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSPopUpButtonCell" key="NSCell" id="633115429">
- <int key="NSCellFlags">-2076049856</int>
- <int key="NSCellFlags2">1024</int>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="709074847"/>
- <int key="NSButtonFlags">109199615</int>
- <int key="NSButtonFlags2">1</int>
- <object class="NSFont" key="NSAlternateImage">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">16</int>
- </object>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- <object class="NSMenuItem" key="NSMenuItem" id="616492372">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">ディスプレイから</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <int key="NSState">1</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">-1</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- <bool key="NSMenuItemRespectAlignment">YES</bool>
- <object class="NSMenu" key="NSMenu" id="341113515">
- <object class="NSMutableString" key="NSTitle">
- <characters key="NS.bytes">OtherViews</characters>
- </object>
- <array class="NSMutableArray" key="NSMenuItems">
- <reference ref="616492372"/>
- <object class="NSMenuItem" id="759499526">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">256 色</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">8</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- <object class="NSMenuItem" id="543935434">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">約 32000 色</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">15</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- <object class="NSMenuItem" id="836673018">
- <reference key="NSMenu" ref="341113515"/>
- <string key="NSTitle">約 1670 万色</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">24</int>
- <reference key="NSTarget" ref="633115429"/>
- </object>
- </array>
- </object>
- <int key="NSPreferredEdge">3</int>
- <bool key="NSUsesItemFromMenu">YES</bool>
- <bool key="NSAltersState">YES</bool>
- <int key="NSArrowPosition">1</int>
- </object>
- </object>
- <object class="NSTextField" id="201731424">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{17, 205}, {56, 19}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="930265681">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">カラー:</string>
- <reference key="NSSupport" ref="463863101"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="201731424"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="86150604">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 183}, {392, 14}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="311969422">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">このオプションは、次回 X11 を起動したときに有効になります。</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="86150604"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="477203622">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 149}, {409, 23}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="631531164">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">フルスクリーンモード</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="477203622"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="57246850">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{37, 83}, {409, 23}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="917248662">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">フルスクリーンモードでメニューバーを自動的に表示</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="57246850"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="298603383">
- <reference key="NSNextResponder" ref="515308735"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 113}, {468, 30}}</string>
- <reference key="NSSuperview" ref="515308735"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="761107402">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">X11 のルートウインドウを有効にします。フルスクリーンモードに切り替えたり、フルスクリーンモードを終了するときは、コマンド + Option + A キーを押します。</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="298603383"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {538, 246}}</string>
- <reference key="NSSuperview" ref="448510093"/>
- </object>
- <string key="NSLabel">出力</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="723450037">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">2</characters>
- </object>
- <object class="NSView" key="NSView" id="408298283">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="878106058">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 222}, {409, 23}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="718083688">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">同期を有効にする</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="878106058"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="386152084">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 188}, {488, 28}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="572508492">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">“コピー”メニュー項目を有効にして、OSX のペーストボードと X11 の CLIPBOARD バッファおよび PRIMARY バッファを同期できるようにします。</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="386152084"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="477050998">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{37, 96}, {414, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="501304422">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">ペーストボードが変更されたときに CLIPBOARD をアップデート</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="477050998"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="765780304">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{37, 71}, {486, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="510771323">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">ペーストボードが変更されたときに PRIMARY (中クリック)をアップデート</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="765780304"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="1002778833">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{37, 46}, {451, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="897099877">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">新しいテキストが選択されたら、すぐにペーストボードをアップデート</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="1002778833"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="487809555">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{37, 159}, {410, 18}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="619977658">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">CLIPBOARD が変更されたときにペーストボードをアップデート</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="487809555"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="620944856">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{55, 125}, {469, 28}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="461823902">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">xclipboard、klipper、その他の X11 クリップボードマネージャを使用したい場合は、このオプションを無効にしてください。</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="620944856"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="522511724">
- <reference key="NSNextResponder" ref="408298283"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{55, 12}, {469, 28}}</string>
- <reference key="NSSuperview" ref="408298283"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="994587858">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">X11 プロトコルの制限により、このオプションは、一部のアプリケーションで機能しない場合があります。</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="522511724"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {538, 246}}</string>
- </object>
- <string key="NSLabel">ペーストボード</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="10973343">
- <object class="NSMutableString" key="NSIdentifier">
- <characters key="NS.bytes">2</characters>
- </object>
- <object class="NSView" key="NSView" id="184765684">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="657659108">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 210}, {402, 18}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="259618205">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">選択されていないウインドウを直接クリック</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="657659108"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="290578835">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 176}, {474, 28}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="399127858">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">有効にした場合、選択されていないウインドウをクリックしたときに、そのウインドウを一番手前に表示するだけでなく、ウインドウ内の項目を直接クリックします。</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="290578835"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="992839333">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 146}, {402, 18}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="959555182">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">フォーカスをマウスと一緒に移動</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="992839333"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="138261120">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 126}, {474, 14}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="183409141">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">X11 ウインドウのフォーカスがカーソルと一緒に移動します。逆効果になる場合もあります。</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="138261120"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSButton" id="128352289">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 96}, {402, 18}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="556463187">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">新規ウインドウにフォーカス</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="128352289"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="57161931">
- <reference key="NSNextResponder" ref="184765684"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 62}, {474, 28}}</string>
- <reference key="NSSuperview" ref="184765684"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="989804990">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">有効にした場合、新しい X11 ウインドウを作成すると、Finder.app や ターミナル.app などの代わりに、X11.app が前面に移動します。</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="57161931"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {538, 246}}</string>
- </object>
- <string key="NSLabel">ウインドウ</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- <object class="NSTabViewItem" id="348328898">
- <object class="NSView" key="NSView" id="300811574">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="989050925">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 210}, {402, 18}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="189594322">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">接続を認証</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="989050925"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="700826966">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 132}, {402, 18}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="489340979">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">ネットワーク・クライアントからの接続を許可</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="700826966"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="891575339"/>
- <reference key="NSAlternateImage" ref="391434389"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="168436707">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 162}, {465, 42}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="53243865">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">X11 の起動時に、Xauthority アクセス制御キーを作成します。システムの IP アドレスが変更されると、これらのキーが無効になり、X11 アプリケーションが起動しなくなることがあります。</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="168436707"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="363817195">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{36, 84}, {465, 42}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="390084685">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">有効にする場合は、システムのセキュリティを維持するために、“接続を認証”も有効にしてください。無効にすると、リモートアプリケーションからの接続は拒否されます。</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="363817195"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- <object class="NSTextField" id="223835729">
- <reference key="NSNextResponder" ref="300811574"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{20, -16}, {404, 14}}</string>
- <reference key="NSSuperview" ref="300811574"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="283628678">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">これらのオプションは、次回 X11 を起動したときに有効になります。</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="223835729"/>
- <reference key="NSBackgroundColor" ref="57160303"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{10, 33}, {538, 246}}</string>
- </object>
- <string key="NSLabel">セキュリティ</string>
- <reference key="NSColor" ref="57160303"/>
- <reference key="NSTabView" ref="448510093"/>
- </object>
- </array>
- <reference key="NSSelectedTabViewItem" ref="960678392"/>
- <reference key="NSFont" ref="463863101"/>
- <int key="NSTvFlags">0</int>
- <bool key="NSAllowTruncatedLabels">YES</bool>
- <bool key="NSDrawsBackground">YES</bool>
- <array class="NSMutableArray" key="NSSubviews">
- <reference ref="515308735"/>
- </array>
- </object>
- </array>
- <string key="NSFrameSize">{584, 308}</string>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
- <string key="NSMinSize">{320, 262}</string>
- <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSFrameAutosaveName">x11_prefs</string>
- </object>
- <object class="NSWindowTemplate" id="604417141">
- <int key="NSWindowStyleMask">11</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{360, 402}, {454, 271}}</string>
- <int key="NSWTFlags">1350041600</int>
- <string key="NSWindowTitle">X11 アプリケーションメニュー</string>
- <string key="NSWindowClass">NSPanel</string>
- <object class="NSMutableString" key="NSViewClass">
- <characters key="NS.bytes">View</characters>
- </object>
- <nil key="NSUserInterfaceItemIdentifier"/>
- <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSWindowContentMinSize">{454, 271}</string>
- <object class="NSView" key="NSWindowView" id="85544634">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="671954382">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{340, 191}, {105, 32}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="143554520">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">137887744</int>
- <string key="NSContents">複製</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="671954382"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <object class="NSFont" key="NSAlternateImage" id="549406736">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">16</int>
- </object>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="492358940">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{340, 159}, {105, 32}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="8201128">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">137887744</int>
- <string key="NSContents">取り除く</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="492358940"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <reference key="NSAlternateImage" ref="549406736"/>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSScrollView" id="1063387772">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">274</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSClipView" id="580565898">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">2304</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSTableView" id="905092943">
- <reference key="NSNextResponder" ref="580565898"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{301, 198}</string>
- <reference key="NSSuperview" ref="580565898"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTableHeaderView" key="NSHeaderView" id="792419186">
- <reference key="NSNextResponder" ref="672307654"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{301, 17}</string>
- <reference key="NSSuperview" ref="672307654"/>
- <reference key="NSTableView" ref="905092943"/>
- </object>
- <object class="_NSCornerView" key="NSCornerView" id="898633680">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{302, 0}, {16, 17}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- </object>
- <array class="NSMutableArray" key="NSTableColumns">
- <object class="NSTableColumn" id="938444323">
- <double key="NSWidth">103</double>
- <double key="NSMinWidth">43</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">名前</string>
- <reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor" id="113872566">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
- </object>
- <object class="NSColor" key="NSTextColor" id="249576247">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerTextColor</string>
- <reference key="NSColor" ref="214098874"/>
- </object>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="825378892">
- <int key="NSCellFlags">338820672</int>
- <int key="NSCellFlags2">1024</int>
- <string key="NSContents">テキストセル</string>
- <reference key="NSSupport" ref="463863101"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="905092943"/>
- <object class="NSColor" key="NSBackgroundColor" id="822946413">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="905092943"/>
- <string key="NSHeaderToolTip"/>
- </object>
- <object class="NSTableColumn" id="84282687">
- <double key="NSWidth">100</double>
- <double key="NSMinWidth">40</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">コマンド</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSBackgroundColor" ref="113872566"/>
- <reference key="NSTextColor" ref="249576247"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="432610585">
- <int key="NSCellFlags">338820672</int>
- <int key="NSCellFlags2">1024</int>
- <string key="NSContents">テキストセル</string>
- <reference key="NSSupport" ref="463863101"/>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="905092943"/>
- <reference key="NSBackgroundColor" ref="822946413"/>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="905092943"/>
- <string key="NSHeaderToolTip"/>
- </object>
- <object class="NSTableColumn" id="242608782">
- <double key="NSWidth">89</double>
- <double key="NSMinWidth">30</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">ショートカット</string>
- <reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerColor</string>
- <reference key="NSColor" ref="822946413"/>
- </object>
- <reference key="NSTextColor" ref="249576247"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="34714764">
- <int key="NSCellFlags">338820672</int>
- <int key="NSCellFlags2">1024</int>
- <string key="NSContents">テキストセル</string>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">12</double>
- <int key="NSfFlags">16</int>
- </object>
- <string key="NSPlaceholderString"/>
- <reference key="NSControlView" ref="905092943"/>
- <bool key="NSDrawsBackground">YES</bool>
- <object class="NSColor" key="NSBackgroundColor" id="812484075">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlBackgroundColor</string>
- <reference key="NSColor" ref="590688762"/>
- </object>
- <reference key="NSTextColor" ref="930815747"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="905092943"/>
- <string key="NSHeaderToolTip"/>
- </object>
- </array>
- <double key="NSIntercellSpacingWidth">3</double>
- <double key="NSIntercellSpacingHeight">2</double>
- <reference key="NSBackgroundColor" ref="822946413"/>
- <object class="NSColor" key="NSGridColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">gridColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC41AA</bytes>
- </object>
- </object>
- <double key="NSRowHeight">17</double>
- <int key="NSTvFlags">1379958784</int>
- <reference key="NSDelegate"/>
- <reference key="NSDataSource"/>
- <int key="NSColumnAutoresizingStyle">1</int>
- <int key="NSDraggingSourceMaskForLocal">-1</int>
- <int key="NSDraggingSourceMaskForNonLocal">0</int>
- <bool key="NSAllowsTypeSelect">YES</bool>
- <int key="NSTableViewDraggingDestinationStyle">0</int>
- <int key="NSTableViewGroupRowStyle">1</int>
- </object>
- </array>
- <string key="NSFrame">{{1, 17}, {301, 198}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <reference key="NSNextKeyView" ref="905092943"/>
- <reference key="NSDocView" ref="905092943"/>
- <reference key="NSBGColor" ref="812484075"/>
- <int key="NScvFlags">4</int>
- </object>
- <object class="NSScroller" id="842897584">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{302, 17}, {15, 198}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <reference key="NSTarget" ref="1063387772"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.99492380000000002</double>
- </object>
- <object class="NSScroller" id="17278747">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{1, 215}, {301, 15}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <int key="NSsFlags">1</int>
- <reference key="NSTarget" ref="1063387772"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.68852460000000004</double>
- </object>
- <object class="NSClipView" id="672307654">
- <reference key="NSNextResponder" ref="1063387772"/>
- <int key="NSvFlags">2304</int>
- <array class="NSMutableArray" key="NSSubviews">
- <reference ref="792419186"/>
- </array>
- <string key="NSFrame">{{1, 0}, {301, 17}}</string>
- <reference key="NSSuperview" ref="1063387772"/>
- <reference key="NSNextKeyView" ref="792419186"/>
- <reference key="NSDocView" ref="792419186"/>
- <reference key="NSBGColor" ref="812484075"/>
- <int key="NScvFlags">4</int>
- </object>
- <reference ref="898633680"/>
- </array>
- <string key="NSFrame">{{20, 20}, {318, 231}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <reference key="NSNextKeyView" ref="580565898"/>
- <int key="NSsFlags">133170</int>
- <reference key="NSVScroller" ref="842897584"/>
- <reference key="NSHScroller" ref="17278747"/>
- <reference key="NSContentView" ref="580565898"/>
- <reference key="NSHeaderClipView" ref="672307654"/>
- <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
- </object>
- <object class="NSButton" id="758204686">
- <reference key="NSNextResponder" ref="85544634"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{340, 223}, {105, 32}}</string>
- <reference key="NSSuperview" ref="85544634"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="1025474039">
- <int key="NSCellFlags">-2080244224</int>
- <int key="NSCellFlags2">137887744</int>
- <string key="NSContents">項目を追加</string>
- <reference key="NSSupport" ref="463863101"/>
- <reference key="NSControlView" ref="758204686"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <reference key="NSAlternateImage" ref="549406736"/>
- <string key="NSAlternateContents"/>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- </array>
- <string key="NSFrameSize">{454, 271}</string>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
- <string key="NSMinSize">{454, 293}</string>
- <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
- <string key="NSFrameAutosaveName">x11_apps</string>
- </object>
- <object class="NSMenu" id="294137138">
- <string key="NSTitle">メニュー</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="318286212">
- <reference key="NSMenu" ref="294137138"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="511651072">
- <reference key="NSMenu" ref="294137138"/>
- <string key="NSTitle">アプリケーション</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="48278059">
- <string key="NSTitle">アプリケーション</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="563798000">
- <reference key="NSMenu" ref="48278059"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- <object class="NSMenuItem" id="1032342329">
- <reference key="NSMenu" ref="48278059"/>
- <string key="NSTitle">カスタマイズ...</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="531645050"/>
- <reference key="NSMixedImage" ref="351811234"/>
- </object>
- </array>
- </object>
- </object>
- </array>
- <string key="NSName"/>
- </object>
- </array>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <array class="NSMutableArray" key="connectionRecords">
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">copy:</string>
- <reference key="source" ref="941939442"/>
- <reference key="destination" ref="185296989"/>
- </object>
- <int key="connectionID">181</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">minimize_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="677652931"/>
- </object>
- <int key="connectionID">202</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">close_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="984461797"/>
- </object>
- <int key="connectionID">205</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">zoom_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1066447520"/>
- </object>
- <int key="connectionID">206</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">bring_to_front:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="276216762"/>
- </object>
- <int key="connectionID">207</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">hideOtherApplications:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="206802571"/>
- </object>
- <int key="connectionID">263</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">apps_separator</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="390088328"/>
- </object>
- <int key="connectionID">273</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">apps_table</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="905092943"/>
- </object>
- <int key="connectionID">301</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_delete:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="492358940"/>
- </object>
- <int key="connectionID">303</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_duplicate:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="671954382"/>
- </object>
- <int key="connectionID">304</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_show:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1065386165"/>
- </object>
- <int key="connectionID">308</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_new:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="758204686"/>
- </object>
- <int key="connectionID">311</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_show:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="386173216"/>
- </object>
- <int key="connectionID">318</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">x11_about_item</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="139290918"/>
- </object>
- <int key="connectionID">321</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_auth</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="989050925"/>
- </object>
- <int key="connectionID">387</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_tcp</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="700826966"/>
- </object>
- <int key="connectionID">388</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">depth</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="709074847"/>
- </object>
- <int key="connectionID">389</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">fake_buttons</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="119157981"/>
- </object>
- <int key="connectionID">391</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_keymap</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="179949713"/>
- </object>
- <int key="connectionID">392</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_keyequivs</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="842100515"/>
- </object>
- <int key="connectionID">393</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="119157981"/>
- </object>
- <int key="connectionID">394</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="179949713"/>
- </object>
- <int key="connectionID">395</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="842100515"/>
- </object>
- <int key="connectionID">396</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="709074847"/>
- </object>
- <int key="connectionID">398</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="989050925"/>
- </object>
- <int key="connectionID">399</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="700826966"/>
- </object>
- <int key="connectionID">401</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">prefs_panel</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="124913468"/>
- </object>
- <int key="connectionID">402</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">x11_help:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="504984881"/>
- </object>
- <int key="connectionID">422</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dockMenu</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="294137138"/>
- </object>
- <int key="connectionID">426</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dock_menu</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="294137138"/>
- </object>
- <int key="connectionID">428</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="485884620"/>
- </object>
- <int key="connectionID">429</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">hide:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="301008465"/>
- </object>
- <int key="connectionID">430</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">unhideAllApplications:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="1023546148"/>
- </object>
- <int key="connectionID">431</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">orderFrontStandardAboutPanel:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="139290918"/>
- </object>
- <int key="connectionID">433</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dock_apps_menu</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="48278059"/>
- </object>
- <int key="connectionID">530</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dock_window_separator</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="318286212"/>
- </object>
- <int key="connectionID">531</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">apps_table_show:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1032342329"/>
- </object>
- <int key="connectionID">534</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">next_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1036389925"/>
- </object>
- <int key="connectionID">539</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">previous_window:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="369641893"/>
- </object>
- <int key="connectionID">540</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_fullscreen</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477203622"/>
- </object>
- <int key="connectionID">546</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">enable_fullscreen_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477203622"/>
- </object>
- <int key="connectionID">547</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggle_fullscreen:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="6876565"/>
- </object>
- <int key="connectionID">548</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">toggle_fullscreen_item</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="6876565"/>
- </object>
- <int key="connectionID">549</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">menu</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="524015605"/>
- </object>
- <int key="connectionID">300334</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">terminate:</string>
- <reference key="source" ref="815810918"/>
- <reference key="destination" ref="274138642"/>
- </object>
- <int key="connectionID">300336</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="657659108"/>
- </object>
- <int key="connectionID">300389</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="992839333"/>
- </object>
- <int key="connectionID">300390</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="128352289"/>
- </object>
- <int key="connectionID">300391</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">click_through</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="657659108"/>
- </object>
- <int key="connectionID">300392</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">focus_follows_mouse</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="992839333"/>
- </object>
- <int key="connectionID">300393</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">focus_on_new_window</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="128352289"/>
- </object>
- <int key="connectionID">300394</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">copy_menu_item</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="185296989"/>
- </object>
- <int key="connectionID">300443</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_pasteboard</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="878106058"/>
- </object>
- <int key="connectionID">300444</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_clipboard_to_pasteboard</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="487809555"/>
- </object>
- <int key="connectionID">300461</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_pasteboard_to_clipboard</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477050998"/>
- </object>
- <int key="connectionID">300462</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_pasteboard_to_primary</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="765780304"/>
- </object>
- <int key="connectionID">300463</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_primary_immediately</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1002778833"/>
- </object>
- <int key="connectionID">300464</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="878106058"/>
- </object>
- <int key="connectionID">300465</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="487809555"/>
- </object>
- <int key="connectionID">300466</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="477050998"/>
- </object>
- <int key="connectionID">300467</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="765780304"/>
- </object>
- <int key="connectionID">300468</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="1002778833"/>
- </object>
- <int key="connectionID">300469</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_text1</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="620944856"/>
- </object>
- <int key="connectionID">300470</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sync_text2</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="522511724"/>
- </object>
- <int key="connectionID">300471</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enable_fullscreen_menu</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="57246850"/>
- </object>
- <int key="connectionID">300474</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="57246850"/>
- </object>
- <int key="connectionID">300475</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">prefs_changed:</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="406291430"/>
- </object>
- <int key="connectionID">300480</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">option_sends_alt</string>
- <reference key="source" ref="485884620"/>
- <reference key="destination" ref="406291430"/>
- </object>
- <int key="connectionID">300481</int>
- </object>
- </array>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <array key="orderedObjects">
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <array key="object" id="0"/>
- <reference key="children" ref="904585544"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-2</int>
- <reference key="object" ref="815810918"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">File's Owner</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="941939442"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">First Responder</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-3</int>
- <reference key="object" ref="951368722"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">Application</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">29</int>
- <reference key="object" ref="524015605"/>
- <array class="NSMutableArray" key="children">
- <reference ref="931553638"/>
- <reference ref="365880285"/>
- <reference ref="200491363"/>
- <reference ref="868031522"/>
- <reference ref="551174276"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">MainMenu</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">19</int>
- <reference key="object" ref="931553638"/>
- <array class="NSMutableArray" key="children">
- <reference ref="96874957"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">24</int>
- <reference key="object" ref="96874957"/>
- <array class="NSMutableArray" key="children">
- <reference ref="677652931"/>
- <reference ref="276216762"/>
- <reference ref="1066447520"/>
- <reference ref="1036389925"/>
- <reference ref="369641893"/>
- <reference ref="155085383"/>
- <reference ref="984461797"/>
- <reference ref="280172320"/>
- </array>
- <reference key="parent" ref="931553638"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">5</int>
- <reference key="object" ref="276216762"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">23</int>
- <reference key="object" ref="677652931"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">92</int>
- <reference key="object" ref="280172320"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">203</int>
- <reference key="object" ref="984461797"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">204</int>
- <reference key="object" ref="1066447520"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">536</int>
- <reference key="object" ref="155085383"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">537</int>
- <reference key="object" ref="1036389925"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">538</int>
- <reference key="object" ref="369641893"/>
- <reference key="parent" ref="96874957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">56</int>
- <reference key="object" ref="365880285"/>
- <array class="NSMutableArray" key="children">
- <reference ref="576521955"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">57</int>
- <reference key="object" ref="576521955"/>
- <array class="NSMutableArray" key="children">
- <reference ref="139290918"/>
- <reference ref="386173216"/>
- <reference ref="32285361"/>
- <reference ref="301008465"/>
- <reference ref="274138642"/>
- <reference ref="272876017"/>
- <reference ref="431301145"/>
- <reference ref="206802571"/>
- <reference ref="848095279"/>
- <reference ref="1023546148"/>
- <reference ref="6876565"/>
- <reference ref="479677589"/>
- </array>
- <reference key="parent" ref="365880285"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">58</int>
- <reference key="object" ref="139290918"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">129</int>
- <reference key="object" ref="386173216"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">131</int>
- <reference key="object" ref="32285361"/>
- <array class="NSMutableArray" key="children">
- <reference ref="821388474"/>
- </array>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">130</int>
- <reference key="object" ref="821388474"/>
- <reference key="parent" ref="32285361"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">134</int>
- <reference key="object" ref="301008465"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">136</int>
- <reference key="object" ref="274138642"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">143</int>
- <reference key="object" ref="272876017"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">144</int>
- <reference key="object" ref="431301145"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">145</int>
- <reference key="object" ref="206802571"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">149</int>
- <reference key="object" ref="848095279"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">150</int>
- <reference key="object" ref="1023546148"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">544</int>
- <reference key="object" ref="6876565"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">545</int>
- <reference key="object" ref="479677589"/>
- <reference key="parent" ref="576521955"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">163</int>
- <reference key="object" ref="200491363"/>
- <array class="NSMutableArray" key="children">
- <reference ref="526778998"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">169</int>
- <reference key="object" ref="526778998"/>
- <array class="NSMutableArray" key="children">
- <reference ref="185296989"/>
- </array>
- <reference key="parent" ref="200491363"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">157</int>
- <reference key="object" ref="185296989"/>
- <reference key="parent" ref="526778998"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">269</int>
- <reference key="object" ref="868031522"/>
- <array class="NSMutableArray" key="children">
- <reference ref="981161348"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">270</int>
- <reference key="object" ref="981161348"/>
- <array class="NSMutableArray" key="children">
- <reference ref="390088328"/>
- <reference ref="1065386165"/>
- </array>
- <reference key="parent" ref="868031522"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">272</int>
- <reference key="object" ref="390088328"/>
- <reference key="parent" ref="981161348"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">305</int>
- <reference key="object" ref="1065386165"/>
- <reference key="parent" ref="981161348"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">419</int>
- <reference key="object" ref="551174276"/>
- <array class="NSMutableArray" key="children">
- <reference ref="511848303"/>
- </array>
- <reference key="parent" ref="524015605"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">420</int>
- <reference key="object" ref="511848303"/>
- <array class="NSMutableArray" key="children">
- <reference ref="504984881"/>
- </array>
- <reference key="parent" ref="551174276"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">421</int>
- <reference key="object" ref="504984881"/>
- <reference key="parent" ref="511848303"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">196</int>
- <reference key="object" ref="485884620"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">X11Controller</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">244</int>
- <reference key="object" ref="124913468"/>
- <array class="NSMutableArray" key="children">
- <reference ref="941366957"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">PrefsPanel</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">245</int>
- <reference key="object" ref="941366957"/>
- <array class="NSMutableArray" key="children">
- <reference ref="448510093"/>
- </array>
- <reference key="parent" ref="124913468"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">348</int>
- <reference key="object" ref="448510093"/>
- <array class="NSMutableArray" key="children">
- <reference ref="287591690"/>
- <reference ref="960678392"/>
- <reference ref="348328898"/>
- <reference ref="10973343"/>
- <reference ref="723450037"/>
- </array>
- <reference key="parent" ref="941366957"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">349</int>
- <reference key="object" ref="287591690"/>
- <array class="NSMutableArray" key="children">
- <reference ref="596750588"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">351</int>
- <reference key="object" ref="596750588"/>
- <array class="NSMutableArray" key="children">
- <reference ref="119157981"/>
- <reference ref="443008216"/>
- <reference ref="282885445"/>
- <reference ref="842100515"/>
- <reference ref="31160162"/>
- <reference ref="179949713"/>
- <reference ref="278155937"/>
- <reference ref="406291430"/>
- </array>
- <reference key="parent" ref="287591690"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">363</int>
- <reference key="object" ref="119157981"/>
- <array class="NSMutableArray" key="children">
- <reference ref="990762273"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">364</int>
- <reference key="object" ref="443008216"/>
- <array class="NSMutableArray" key="children">
- <reference ref="391919450"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">365</int>
- <reference key="object" ref="282885445"/>
- <array class="NSMutableArray" key="children">
- <reference ref="649334366"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">368</int>
- <reference key="object" ref="842100515"/>
- <array class="NSMutableArray" key="children">
- <reference ref="940564599"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">369</int>
- <reference key="object" ref="31160162"/>
- <array class="NSMutableArray" key="children">
- <reference ref="666057093"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">370</int>
- <reference key="object" ref="179949713"/>
- <array class="NSMutableArray" key="children">
- <reference ref="967619578"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">352</int>
- <reference key="object" ref="960678392"/>
- <array class="NSMutableArray" key="children">
- <reference ref="515308735"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">350</int>
- <reference key="object" ref="515308735"/>
- <array class="NSMutableArray" key="children">
- <reference ref="709074847"/>
- <reference ref="201731424"/>
- <reference ref="86150604"/>
- <reference ref="477203622"/>
- <reference ref="57246850"/>
- <reference ref="298603383"/>
- </array>
- <reference key="parent" ref="960678392"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">382</int>
- <reference key="object" ref="709074847"/>
- <array class="NSMutableArray" key="children">
- <reference ref="633115429"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">385</int>
- <reference key="object" ref="201731424"/>
- <array class="NSMutableArray" key="children">
- <reference ref="930265681"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">386</int>
- <reference key="object" ref="86150604"/>
- <array class="NSMutableArray" key="children">
- <reference ref="311969422"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">541</int>
- <reference key="object" ref="477203622"/>
- <array class="NSMutableArray" key="children">
- <reference ref="631531164"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">543</int>
- <reference key="object" ref="298603383"/>
- <array class="NSMutableArray" key="children">
- <reference ref="761107402"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">353</int>
- <reference key="object" ref="348328898"/>
- <array class="NSMutableArray" key="children">
- <reference ref="300811574"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">354</int>
- <reference key="object" ref="300811574"/>
- <array class="NSMutableArray" key="children">
- <reference ref="989050925"/>
- <reference ref="700826966"/>
- <reference ref="168436707"/>
- <reference ref="363817195"/>
- <reference ref="223835729"/>
- </array>
- <reference key="parent" ref="348328898"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">374</int>
- <reference key="object" ref="989050925"/>
- <array class="NSMutableArray" key="children">
- <reference ref="189594322"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">375</int>
- <reference key="object" ref="700826966"/>
- <array class="NSMutableArray" key="children">
- <reference ref="489340979"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">376</int>
- <reference key="object" ref="168436707"/>
- <array class="NSMutableArray" key="children">
- <reference ref="53243865"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">377</int>
- <reference key="object" ref="363817195"/>
- <array class="NSMutableArray" key="children">
- <reference ref="390084685"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">379</int>
- <reference key="object" ref="223835729"/>
- <array class="NSMutableArray" key="children">
- <reference ref="283628678"/>
- </array>
- <reference key="parent" ref="300811574"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">285</int>
- <reference key="object" ref="604417141"/>
- <array class="NSMutableArray" key="children">
- <reference ref="85544634"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">EditPrograms</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">286</int>
- <reference key="object" ref="85544634"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1063387772"/>
- <reference ref="758204686"/>
- <reference ref="671954382"/>
- <reference ref="492358940"/>
- </array>
- <reference key="parent" ref="604417141"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">423</int>
- <reference key="object" ref="294137138"/>
- <array class="NSMutableArray" key="children">
- <reference ref="318286212"/>
- <reference ref="511651072"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">DockMenu</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">524</int>
- <reference key="object" ref="318286212"/>
- <reference key="parent" ref="294137138"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">526</int>
- <reference key="object" ref="511651072"/>
- <array class="NSMutableArray" key="children">
- <reference ref="48278059"/>
- </array>
- <reference key="parent" ref="294137138"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">527</int>
- <reference key="object" ref="48278059"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1032342329"/>
- <reference ref="563798000"/>
- </array>
- <reference key="parent" ref="511651072"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">532</int>
- <reference key="object" ref="1032342329"/>
- <reference key="parent" ref="48278059"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">533</int>
- <reference key="object" ref="563798000"/>
- <reference key="parent" ref="48278059"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100363</int>
- <reference key="object" ref="990762273"/>
- <reference key="parent" ref="119157981"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100364</int>
- <reference key="object" ref="391919450"/>
- <reference key="parent" ref="443008216"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100365</int>
- <reference key="object" ref="649334366"/>
- <reference key="parent" ref="282885445"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100368</int>
- <reference key="object" ref="940564599"/>
- <reference key="parent" ref="842100515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100369</int>
- <reference key="object" ref="666057093"/>
- <reference key="parent" ref="31160162"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100370</int>
- <reference key="object" ref="967619578"/>
- <reference key="parent" ref="179949713"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100382</int>
- <reference key="object" ref="633115429"/>
- <array class="NSMutableArray" key="children">
- <reference ref="341113515"/>
- </array>
- <reference key="parent" ref="709074847"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100385</int>
- <reference key="object" ref="930265681"/>
- <reference key="parent" ref="201731424"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100386</int>
- <reference key="object" ref="311969422"/>
- <reference key="parent" ref="86150604"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100541</int>
- <reference key="object" ref="631531164"/>
- <reference key="parent" ref="477203622"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100543</int>
- <reference key="object" ref="761107402"/>
- <reference key="parent" ref="298603383"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100374</int>
- <reference key="object" ref="189594322"/>
- <reference key="parent" ref="989050925"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100375</int>
- <reference key="object" ref="489340979"/>
- <reference key="parent" ref="700826966"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100376</int>
- <reference key="object" ref="53243865"/>
- <reference key="parent" ref="168436707"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100377</int>
- <reference key="object" ref="390084685"/>
- <reference key="parent" ref="363817195"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100379</int>
- <reference key="object" ref="283628678"/>
- <reference key="parent" ref="223835729"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">380</int>
- <reference key="object" ref="341113515"/>
- <array class="NSMutableArray" key="children">
- <reference ref="759499526"/>
- <reference ref="616492372"/>
- <reference ref="543935434"/>
- <reference ref="836673018"/>
- </array>
- <reference key="parent" ref="633115429"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">435</int>
- <reference key="object" ref="759499526"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">384</int>
- <reference key="object" ref="616492372"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">383</int>
- <reference key="object" ref="543935434"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">381</int>
- <reference key="object" ref="836673018"/>
- <reference key="parent" ref="341113515"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">295</int>
- <reference key="object" ref="1063387772"/>
- <array class="NSMutableArray" key="children">
- <reference ref="792419186"/>
- <reference ref="17278747"/>
- <reference ref="842897584"/>
- <reference ref="905092943"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300295</int>
- <reference key="object" ref="792419186"/>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">200295</int>
- <reference key="object" ref="17278747"/>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100295</int>
- <reference key="object" ref="842897584"/>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">296</int>
- <reference key="object" ref="905092943"/>
- <array class="NSMutableArray" key="children">
- <reference ref="242608782"/>
- <reference ref="938444323"/>
- <reference ref="84282687"/>
- </array>
- <reference key="parent" ref="1063387772"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">535</int>
- <reference key="object" ref="242608782"/>
- <array class="NSMutableArray" key="children">
- <reference ref="34714764"/>
- </array>
- <reference key="parent" ref="905092943"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">575</int>
- <reference key="object" ref="34714764"/>
- <reference key="parent" ref="242608782"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">298</int>
- <reference key="object" ref="938444323"/>
- <array class="NSMutableArray" key="children">
- <reference ref="825378892"/>
- </array>
- <reference key="parent" ref="905092943"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">573</int>
- <reference key="object" ref="825378892"/>
- <reference key="parent" ref="938444323"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">297</int>
- <reference key="object" ref="84282687"/>
- <array class="NSMutableArray" key="children">
- <reference ref="432610585"/>
- </array>
- <reference key="parent" ref="905092943"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">574</int>
- <reference key="object" ref="432610585"/>
- <reference key="parent" ref="84282687"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">310</int>
- <reference key="object" ref="758204686"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1025474039"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100310</int>
- <reference key="object" ref="1025474039"/>
- <reference key="parent" ref="758204686"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">292</int>
- <reference key="object" ref="671954382"/>
- <array class="NSMutableArray" key="children">
- <reference ref="143554520"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100292</int>
- <reference key="object" ref="143554520"/>
- <reference key="parent" ref="671954382"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">293</int>
- <reference key="object" ref="492358940"/>
- <array class="NSMutableArray" key="children">
- <reference ref="8201128"/>
- </array>
- <reference key="parent" ref="85544634"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">100293</int>
- <reference key="object" ref="8201128"/>
- <reference key="parent" ref="492358940"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300337</int>
- <reference key="object" ref="10973343"/>
- <array class="NSMutableArray" key="children">
- <reference ref="184765684"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300338</int>
- <reference key="object" ref="184765684"/>
- <array class="NSMutableArray" key="children">
- <reference ref="657659108"/>
- <reference ref="290578835"/>
- <reference ref="992839333"/>
- <reference ref="138261120"/>
- <reference ref="128352289"/>
- <reference ref="57161931"/>
- </array>
- <reference key="parent" ref="10973343"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300358</int>
- <reference key="object" ref="290578835"/>
- <array class="NSMutableArray" key="children">
- <reference ref="399127858"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300359</int>
- <reference key="object" ref="657659108"/>
- <array class="NSMutableArray" key="children">
- <reference ref="259618205"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300360</int>
- <reference key="object" ref="259618205"/>
- <reference key="parent" ref="657659108"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300361</int>
- <reference key="object" ref="399127858"/>
- <reference key="parent" ref="290578835"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300362</int>
- <reference key="object" ref="992839333"/>
- <array class="NSMutableArray" key="children">
- <reference ref="959555182"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300363</int>
- <reference key="object" ref="959555182"/>
- <reference key="parent" ref="992839333"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300364</int>
- <reference key="object" ref="138261120"/>
- <array class="NSMutableArray" key="children">
- <reference ref="183409141"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300365</int>
- <reference key="object" ref="183409141"/>
- <reference key="parent" ref="138261120"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300368</int>
- <reference key="object" ref="128352289"/>
- <array class="NSMutableArray" key="children">
- <reference ref="556463187"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300369</int>
- <reference key="object" ref="556463187"/>
- <reference key="parent" ref="128352289"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300370</int>
- <reference key="object" ref="57161931"/>
- <array class="NSMutableArray" key="children">
- <reference ref="989804990"/>
- </array>
- <reference key="parent" ref="184765684"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300371</int>
- <reference key="object" ref="989804990"/>
- <reference key="parent" ref="57161931"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300421</int>
- <reference key="object" ref="723450037"/>
- <array class="NSMutableArray" key="children">
- <reference ref="408298283"/>
- </array>
- <reference key="parent" ref="448510093"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300422</int>
- <reference key="object" ref="408298283"/>
- <array class="NSMutableArray" key="children">
- <reference ref="878106058"/>
- <reference ref="386152084"/>
- <reference ref="487809555"/>
- <reference ref="620944856"/>
- <reference ref="477050998"/>
- <reference ref="765780304"/>
- <reference ref="1002778833"/>
- <reference ref="522511724"/>
- </array>
- <reference key="parent" ref="723450037"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300423</int>
- <reference key="object" ref="386152084"/>
- <array class="NSMutableArray" key="children">
- <reference ref="572508492"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300424</int>
- <reference key="object" ref="878106058"/>
- <array class="NSMutableArray" key="children">
- <reference ref="718083688"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300440</int>
- <reference key="object" ref="718083688"/>
- <reference key="parent" ref="878106058"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300441</int>
- <reference key="object" ref="572508492"/>
- <reference key="parent" ref="386152084"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300447</int>
- <reference key="object" ref="477050998"/>
- <array class="NSMutableArray" key="children">
- <reference ref="501304422"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300450</int>
- <reference key="object" ref="501304422"/>
- <reference key="parent" ref="477050998"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300451</int>
- <reference key="object" ref="765780304"/>
- <array class="NSMutableArray" key="children">
- <reference ref="510771323"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300452</int>
- <reference key="object" ref="510771323"/>
- <reference key="parent" ref="765780304"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300453</int>
- <reference key="object" ref="487809555"/>
- <array class="NSMutableArray" key="children">
- <reference ref="619977658"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300454</int>
- <reference key="object" ref="619977658"/>
- <reference key="parent" ref="487809555"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300455</int>
- <reference key="object" ref="620944856"/>
- <array class="NSMutableArray" key="children">
- <reference ref="461823902"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300456</int>
- <reference key="object" ref="461823902"/>
- <reference key="parent" ref="620944856"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300457</int>
- <reference key="object" ref="1002778833"/>
- <array class="NSMutableArray" key="children">
- <reference ref="897099877"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300458</int>
- <reference key="object" ref="897099877"/>
- <reference key="parent" ref="1002778833"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300459</int>
- <reference key="object" ref="522511724"/>
- <array class="NSMutableArray" key="children">
- <reference ref="994587858"/>
- </array>
- <reference key="parent" ref="408298283"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300460</int>
- <reference key="object" ref="994587858"/>
- <reference key="parent" ref="522511724"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300472</int>
- <reference key="object" ref="57246850"/>
- <array class="NSMutableArray" key="children">
- <reference ref="917248662"/>
- </array>
- <reference key="parent" ref="515308735"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300473</int>
- <reference key="object" ref="917248662"/>
- <reference key="parent" ref="57246850"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300476</int>
- <reference key="object" ref="278155937"/>
- <array class="NSMutableArray" key="children">
- <reference ref="617441821"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300477</int>
- <reference key="object" ref="406291430"/>
- <array class="NSMutableArray" key="children">
- <reference ref="67728988"/>
- </array>
- <reference key="parent" ref="596750588"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300478</int>
- <reference key="object" ref="67728988"/>
- <reference key="parent" ref="406291430"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">300479</int>
- <reference key="object" ref="617441821"/>
- <reference key="parent" ref="278155937"/>
- </object>
- </array>
- </object>
- <dictionary class="NSMutableDictionary" key="flattenedProperties">
- <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="-3.ImportedFromIB2"/>
- <string key="100292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="100295.IBShouldRemoveOnLegacySave"/>
- <string key="100310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="100543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="129.ImportedFromIB2"/>
- <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="130.ImportedFromIB2"/>
- <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="131.ImportedFromIB2"/>
- <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="134.ImportedFromIB2"/>
- <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="136.ImportedFromIB2"/>
- <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="143.ImportedFromIB2"/>
- <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="144.ImportedFromIB2"/>
- <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="145.ImportedFromIB2"/>
- <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="149.ImportedFromIB2"/>
- <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="150.ImportedFromIB2"/>
- <string key="157.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="157.ImportedFromIB2"/>
- <string key="163.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="163.ImportedFromIB2"/>
- <string key="169.IBEditorWindowLastContentRect">{{168, 821}, {113, 23}}</string>
- <string key="169.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="169.ImportedFromIB2"/>
- <string key="169.editorWindowContentRectSynchronizationRect">{{202, 626}, {154, 153}}</string>
- <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="19.ImportedFromIB2"/>
- <integer value="1" key="196.ImportedFromIB2"/>
- <string key="200295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="200295.IBShouldRemoveOnLegacySave"/>
- <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="203.ImportedFromIB2"/>
- <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="204.ImportedFromIB2"/>
- <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="23.ImportedFromIB2"/>
- <string key="24.IBEditorWindowLastContentRect">{{349, 868}, {315, 143}}</string>
- <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="24.ImportedFromIB2"/>
- <string key="24.editorWindowContentRectSynchronizationRect">{{271, 666}, {301, 153}}</string>
- <string key="244.IBEditorWindowLastContentRect">{{507, 565}, {484, 308}}</string>
- <string key="244.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="244.IBWindowTemplateEditedContentRect">{{507, 565}, {484, 308}}</string>
- <integer value="1" key="244.ImportedFromIB2"/>
- <string key="244.editorWindowContentRectSynchronizationRect">{{184, 290}, {481, 345}}</string>
- <integer value="0" key="244.windowTemplate.hasMaxSize"/>
- <integer value="1" key="244.windowTemplate.hasMinSize"/>
- <string key="244.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="244.windowTemplate.minSize">{320, 240}</string>
- <string key="245.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="245.ImportedFromIB2"/>
- <string key="269.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="269.ImportedFromIB2"/>
- <string key="270.IBEditorWindowLastContentRect">{{58, 803}, {155, 33}}</string>
- <string key="270.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="270.ImportedFromIB2"/>
- <string key="270.editorWindowContentRectSynchronizationRect">{{100, 746}, {155, 33}}</string>
- <string key="272.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="272.ImportedFromIB2"/>
- <string key="285.IBEditorWindowLastContentRect">{{68, 585}, {454, 271}}</string>
- <string key="285.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="285.IBViewEditorWindowController.showingBoundsRectangles"/>
- <integer value="1" key="285.IBViewEditorWindowController.showingLayoutRectangles"/>
- <string key="285.IBWindowTemplateEditedContentRect">{{68, 585}, {454, 271}}</string>
- <integer value="1" key="285.ImportedFromIB2"/>
- <string key="285.editorWindowContentRectSynchronizationRect">{{433, 406}, {486, 327}}</string>
- <integer value="0" key="285.windowTemplate.hasMaxSize"/>
- <integer value="1" key="285.windowTemplate.hasMinSize"/>
- <string key="285.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="285.windowTemplate.minSize">{454, 271}</string>
- <string key="286.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="286.ImportedFromIB2"/>
- <string key="29.IBEditorWindowLastContentRect">{{145, 1011}, {336, 20}}</string>
- <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="29.ImportedFromIB2"/>
- <string key="29.editorWindowContentRectSynchronizationRect">{{67, 819}, {336, 20}}</string>
- <string key="292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="292.ImportedFromIB2"/>
- <string key="293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="293.ImportedFromIB2"/>
- <string key="295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="295.ImportedFromIB2"/>
- <string key="296.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="296.ImportedFromIB2"/>
- <string key="297.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="297.ImportedFromIB2"/>
- <string key="298.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="298.ImportedFromIB2"/>
- <string key="300295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300295.IBShouldRemoveOnLegacySave"/>
- <string key="300337.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300337.ImportedFromIB2"/>
- <string key="300338.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300338.ImportedFromIB2"/>
- <string key="300358.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300358.ImportedFromIB2"/>
- <string key="300359.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300359.ImportedFromIB2"/>
- <string key="300360.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300361.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300362.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300362.ImportedFromIB2"/>
- <string key="300363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300364.ImportedFromIB2"/>
- <string key="300365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300368.ImportedFromIB2"/>
- <string key="300369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300370.ImportedFromIB2"/>
- <string key="300371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300421.ImportedFromIB2"/>
- <string key="300422.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300422.ImportedFromIB2"/>
- <string key="300423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300423.ImportedFromIB2"/>
- <string key="300424.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300424.ImportedFromIB2"/>
- <string key="300440.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300441.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300447.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300447.ImportedFromIB2"/>
- <string key="300450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300451.ImportedFromIB2"/>
- <string key="300452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300453.ImportedFromIB2"/>
- <string key="300454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300455.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300455.ImportedFromIB2"/>
- <string key="300456.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300457.ImportedFromIB2"/>
- <string key="300458.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300459.ImportedFromIB2"/>
- <string key="300460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300472.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300472.ImportedFromIB2"/>
- <string key="300473.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300476.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300476.ImportedFromIB2"/>
- <string key="300477.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="300477.ImportedFromIB2"/>
- <string key="300478.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="300479.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="305.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="305.ImportedFromIB2"/>
- <string key="310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="310.ImportedFromIB2"/>
- <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="348.ImportedFromIB2"/>
- <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="349.ImportedFromIB2"/>
- <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="350.ImportedFromIB2"/>
- <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="351.ImportedFromIB2"/>
- <string key="352.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="352.ImportedFromIB2"/>
- <string key="353.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="353.ImportedFromIB2"/>
- <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="354.ImportedFromIB2"/>
- <string key="363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="363.ImportedFromIB2"/>
- <string key="364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="364.ImportedFromIB2"/>
- <string key="365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="365.ImportedFromIB2"/>
- <string key="368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="368.ImportedFromIB2"/>
- <string key="369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="369.ImportedFromIB2"/>
- <string key="370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="370.ImportedFromIB2"/>
- <string key="374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="374.ImportedFromIB2"/>
- <string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="375.ImportedFromIB2"/>
- <string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="376.ImportedFromIB2"/>
- <string key="377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="377.ImportedFromIB2"/>
- <string key="379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="379.ImportedFromIB2"/>
- <string key="380.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="380.ImportedFromIB2"/>
- <string key="381.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="381.ImportedFromIB2"/>
- <string key="382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="382.ImportedFromIB2"/>
- <string key="383.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="383.ImportedFromIB2"/>
- <string key="384.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="384.ImportedFromIB2"/>
- <string key="385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="385.ImportedFromIB2"/>
- <string key="386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="386.ImportedFromIB2"/>
- <string key="419.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="419.ImportedFromIB2"/>
- <string key="420.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="420.ImportedFromIB2"/>
- <string key="421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="421.ImportedFromIB2"/>
- <string key="423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="423.ImportedFromIB2"/>
- <string key="435.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="435.ImportedFromIB2"/>
- <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="5.ImportedFromIB2"/>
- <string key="524.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="524.ImportedFromIB2"/>
- <string key="526.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="526.ImportedFromIB2"/>
- <string key="527.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="527.ImportedFromIB2"/>
- <string key="532.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="532.ImportedFromIB2"/>
- <string key="533.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="533.ImportedFromIB2"/>
- <string key="535.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="535.ImportedFromIB2"/>
- <string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="536.ImportedFromIB2"/>
- <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="537.ImportedFromIB2"/>
- <string key="538.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="538.ImportedFromIB2"/>
- <string key="541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="541.ImportedFromIB2"/>
- <string key="543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="543.ImportedFromIB2"/>
- <string key="544.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="544.ImportedFromIB2"/>
- <string key="545.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="545.ImportedFromIB2"/>
- <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="56.ImportedFromIB2"/>
- <string key="57.IBEditorWindowLastContentRect">{{20, 641}, {218, 203}}</string>
- <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="57.ImportedFromIB2"/>
- <string key="57.editorWindowContentRectSynchronizationRect">{{79, 616}, {218, 203}}</string>
- <string key="573.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="573.ImportedFromIB2"/>
- <string key="574.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="574.ImportedFromIB2"/>
- <string key="575.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="575.ImportedFromIB2"/>
- <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="58.ImportedFromIB2"/>
- <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" key="92.ImportedFromIB2"/>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
- <nil key="activeLocalization"/>
- <dictionary class="NSMutableDictionary" key="localizations"/>
- <nil key="sourceID"/>
- <int key="maxID">300481</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <array class="NSMutableArray" key="referencedPartialClassDescriptions">
- <object class="IBPartialClassDescription">
- <string key="className">FirstResponder</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSFormatter</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">X11Controller</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- </array>
- <array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
- <object class="IBPartialClassDescription">
- <string key="className">X11Controller</string>
- <string key="superclassName">NSObject</string>
- <dictionary class="NSMutableDictionary" key="actions">
- <string key="apps_table_delete:">id</string>
- <string key="apps_table_done:">id</string>
- <string key="apps_table_duplicate:">id</string>
- <string key="apps_table_new:">id</string>
- <string key="apps_table_show:">id</string>
- <string key="bring_to_front:">id</string>
- <string key="close_window:">id</string>
- <string key="enable_fullscreen_changed:">id</string>
- <string key="minimize_window:">id</string>
- <string key="next_window:">id</string>
- <string key="prefs_changed:">id</string>
- <string key="prefs_show:">id</string>
- <string key="previous_window:">id</string>
- <string key="quit:">id</string>
- <string key="toggle_fullscreen:">id</string>
- <string key="x11_help:">id</string>
- <string key="zoom_window:">id</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="actionInfosByName">
- <object class="IBActionInfo" key="apps_table_delete:">
- <string key="name">apps_table_delete:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_done:">
- <string key="name">apps_table_done:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_duplicate:">
- <string key="name">apps_table_duplicate:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_new:">
- <string key="name">apps_table_new:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="apps_table_show:">
- <string key="name">apps_table_show:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="bring_to_front:">
- <string key="name">bring_to_front:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="close_window:">
- <string key="name">close_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="enable_fullscreen_changed:">
- <string key="name">enable_fullscreen_changed:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="minimize_window:">
- <string key="name">minimize_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="next_window:">
- <string key="name">next_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="prefs_changed:">
- <string key="name">prefs_changed:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="prefs_show:">
- <string key="name">prefs_show:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="previous_window:">
- <string key="name">previous_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="quit:">
- <string key="name">quit:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="toggle_fullscreen:">
- <string key="name">toggle_fullscreen:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="x11_help:">
- <string key="name">x11_help:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="zoom_window:">
- <string key="name">zoom_window:</string>
- <string key="candidateClassName">id</string>
- </object>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="outlets">
- <string key="apps_separator">NSMenuItem</string>
- <string key="apps_table">NSTableView</string>
- <string key="click_through">NSButton</string>
- <string key="copy_menu_item">NSMenuItem</string>
- <string key="depth">NSPopUpButton</string>
- <string key="dock_apps_menu">NSMenu</string>
- <string key="dock_menu">NSMenu</string>
- <string key="dock_window_separator">NSMenuItem</string>
- <string key="enable_auth">NSButton</string>
- <string key="enable_fullscreen">NSButton</string>
- <string key="enable_fullscreen_menu">NSButton</string>
- <string key="enable_keyequivs">NSButton</string>
- <string key="enable_tcp">NSButton</string>
- <string key="fake_buttons">NSButton</string>
- <string key="focus_follows_mouse">NSButton</string>
- <string key="focus_on_new_window">NSButton</string>
- <string key="option_sends_alt">NSButton</string>
- <string key="prefs_panel">NSPanel</string>
- <string key="sync_clipboard_to_pasteboard">NSButton</string>
- <string key="sync_keymap">NSButton</string>
- <string key="sync_pasteboard">NSButton</string>
- <string key="sync_pasteboard_to_clipboard">NSButton</string>
- <string key="sync_pasteboard_to_primary">NSButton</string>
- <string key="sync_primary_immediately">NSButton</string>
- <string key="sync_text1">NSTextField</string>
- <string key="sync_text2">NSTextField</string>
- <string key="toggle_fullscreen_item">NSMenuItem</string>
- <string key="use_sysbeep">NSButton</string>
- <string key="window_separator">NSMenuItem</string>
- <string key="x11_about_item">NSMenuItem</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
- <object class="IBToOneOutletInfo" key="apps_separator">
- <string key="name">apps_separator</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="apps_table">
- <string key="name">apps_table</string>
- <string key="candidateClassName">NSTableView</string>
- </object>
- <object class="IBToOneOutletInfo" key="click_through">
- <string key="name">click_through</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="copy_menu_item">
- <string key="name">copy_menu_item</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="depth">
- <string key="name">depth</string>
- <string key="candidateClassName">NSPopUpButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="dock_apps_menu">
- <string key="name">dock_apps_menu</string>
- <string key="candidateClassName">NSMenu</string>
- </object>
- <object class="IBToOneOutletInfo" key="dock_menu">
- <string key="name">dock_menu</string>
- <string key="candidateClassName">NSMenu</string>
- </object>
- <object class="IBToOneOutletInfo" key="dock_window_separator">
- <string key="name">dock_window_separator</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_auth">
- <string key="name">enable_auth</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_fullscreen">
- <string key="name">enable_fullscreen</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_fullscreen_menu">
- <string key="name">enable_fullscreen_menu</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_keyequivs">
- <string key="name">enable_keyequivs</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="enable_tcp">
- <string key="name">enable_tcp</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="fake_buttons">
- <string key="name">fake_buttons</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="focus_follows_mouse">
- <string key="name">focus_follows_mouse</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="focus_on_new_window">
- <string key="name">focus_on_new_window</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="option_sends_alt">
- <string key="name">option_sends_alt</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="prefs_panel">
- <string key="name">prefs_panel</string>
- <string key="candidateClassName">NSPanel</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_clipboard_to_pasteboard">
- <string key="name">sync_clipboard_to_pasteboard</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_keymap">
- <string key="name">sync_keymap</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_pasteboard">
- <string key="name">sync_pasteboard</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_pasteboard_to_clipboard">
- <string key="name">sync_pasteboard_to_clipboard</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_pasteboard_to_primary">
- <string key="name">sync_pasteboard_to_primary</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_primary_immediately">
- <string key="name">sync_primary_immediately</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_text1">
- <string key="name">sync_text1</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="sync_text2">
- <string key="name">sync_text2</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="toggle_fullscreen_item">
- <string key="name">toggle_fullscreen_item</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="use_sysbeep">
- <string key="name">use_sysbeep</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="window_separator">
- <string key="name">window_separator</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo" key="x11_about_item">
- <string key="name">x11_about_item</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- </dictionary>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBDocumentRelativeSource</string>
- <string key="minorKey">../../../X11Controller.h</string>
- </object>
- </object>
- </array>
- </object>
- <int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
- <integer value="1040" key="NS.object.0"/>
- </object>
- <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">../X11.xcodeproj</string>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
- <string key="NSMenuCheckmark">{9, 8}</string>
- <string key="NSMenuMixedState">{7, 2}</string>
- <string key="NSSwitch">{15, 15}</string>
- </dictionary>
- </data>
-</archive>
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1040</int>
+ <string key="IBDocument.SystemVersion">11A289</string>
+ <string key="IBDocument.InterfaceBuilderVersion">844</string>
+ <string key="IBDocument.AppKitVersion">1094.2</string>
+ <string key="IBDocument.HIToolboxVersion">521.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="NS.object.0">844</string>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.EditedObjectIDs"/>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="904585544">
+ <object class="NSCustomObject" id="815810918">
+ <object class="NSMutableString" key="NSClassName">
+ <characters key="NS.bytes">NSApplication</characters>
+ </object>
+ </object>
+ <object class="NSCustomObject" id="941939442">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="951368722">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSMenu" id="524015605">
+ <string key="NSTitle">MainMenu</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="365880285">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">X11</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <object class="NSCustomResource" key="NSOnImage" id="531645050">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuCheckmark</string>
+ </object>
+ <object class="NSCustomResource" key="NSMixedImage" id="351811234">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuMixedState</string>
+ </object>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="576521955">
+ <string key="NSTitle">X11</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="139290918">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">X11 について</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="386173216">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">環境設定...</string>
+ <string key="NSKeyEquiv">,</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="272876017">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="32285361">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">サービス</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="821388474">
+ <string key="NSTitle">サービス</string>
+ <array class="NSMutableArray" key="NSMenuItems"/>
+ <string key="NSName">_NSServicesMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="431301145">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="6876565">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">フルスクリーンを切り替える</string>
+ <string key="NSKeyEquiv">a</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="479677589">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="301008465">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">X11 を隠す</string>
+ <string key="NSKeyEquiv">h</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <int key="NSTag">42</int>
+ </object>
+ <object class="NSMenuItem" id="206802571">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">ほかを隠す</string>
+ <string key="NSKeyEquiv">h</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1023546148">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">すべてを表示</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <int key="NSTag">42</int>
+ </object>
+ <object class="NSMenuItem" id="848095279">
+ <reference key="NSMenu" ref="576521955"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="274138642">
+ <reference key="NSMenu" ref="576521955"/>
+ <string key="NSTitle">X11 を終了</string>
+ <string key="NSKeyEquiv">q</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ <string key="NSName">_NSAppleMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="868031522">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">アプリケーション</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="981161348">
+ <string key="NSTitle">アプリケーション</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="390088328">
+ <reference key="NSMenu" ref="981161348"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1065386165">
+ <reference key="NSMenu" ref="981161348"/>
+ <string key="NSTitle">カスタマイズ...</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="200491363">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">編集</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="526778998">
+ <string key="NSTitle">編集</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="185296989">
+ <reference key="NSMenu" ref="526778998"/>
+ <string key="NSTitle">コピー</string>
+ <string key="NSKeyEquiv">c</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="931553638">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">ウインドウ</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="96874957">
+ <string key="NSTitle">ウインドウ</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="984461797">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">閉じる</string>
+ <string key="NSKeyEquiv">w</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="677652931">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">しまう</string>
+ <string key="NSKeyEquiv">m</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1066447520">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">拡大/縮小</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="280172320">
+ <reference key="NSMenu" ref="96874957"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1036389925">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">ウインドウを巡回</string>
+ <string key="NSKeyEquiv"></string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="369641893">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">ウインドウを逆方向に巡回</string>
+ <string key="NSKeyEquiv"></string>
+ <int key="NSKeyEquivModMask">1179648</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="155085383">
+ <reference key="NSMenu" ref="96874957"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="276216762">
+ <reference key="NSMenu" ref="96874957"/>
+ <string key="NSTitle">すべてを手前に移動</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ <string key="NSName">_NSWindowsMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="551174276">
+ <reference key="NSMenu" ref="524015605"/>
+ <string key="NSTitle">ヘルプ</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="511848303">
+ <string key="NSTitle">ヘルプ</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="504984881">
+ <reference key="NSMenu" ref="511848303"/>
+ <string key="NSTitle">X11 ヘルプ</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ </array>
+ <string key="NSName">_NSMainMenu</string>
+ </object>
+ <object class="NSCustomObject" id="485884620">
+ <string key="NSClassName">X11Controller</string>
+ </object>
+ <object class="NSWindowTemplate" id="124913468">
+ <int key="NSWindowStyleMask">3</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{319, 328}, {584, 308}}</string>
+ <int key="NSWTFlags">1350041600</int>
+ <string key="NSWindowTitle">X11 の環境設定</string>
+ <string key="NSWindowClass">NSPanel</string>
+ <object class="NSMutableString" key="NSViewClass">
+ <characters key="NS.bytes">View</characters>
+ </object>
+ <nil key="NSUserInterfaceItemIdentifier"/>
+ <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSWindowContentMinSize">{320, 240}</string>
+ <object class="NSView" key="NSWindowView" id="941366957">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSTabView" id="448510093">
+ <reference key="NSNextResponder" ref="941366957"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{13, 10}, {558, 292}}</string>
+ <reference key="NSSuperview" ref="941366957"/>
+ <array class="NSMutableArray" key="NSTabViewItems">
+ <object class="NSTabViewItem" id="287591690">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">1</characters>
+ </object>
+ <object class="NSView" key="NSView" id="596750588">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="119157981">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 210}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="990762273">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">3 ボタンマウスをエミュレート</string>
+ <object class="NSFont" key="NSSupport" id="463863101">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="119157981"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="891575339">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSSwitch</string>
+ </object>
+ <object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
+ <string key="NSImageName">NSSwitch</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="443008216">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 59}, {466, 28}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="391919450">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">有効にすると、メニューバーの代替キーによって X11 アプリケーションのメタ修飾キーを使用できなくなる場合があります。</string>
+ <object class="NSFont" key="NSSupport" id="26">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">11</double>
+ <int key="NSfFlags">3100</int>
+ </object>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="443008216"/>
+ <object class="NSColor" key="NSBackgroundColor" id="57160303">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlColor</string>
+ <object class="NSColor" key="NSColor" id="590688762">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="930815747">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlTextColor</string>
+ <object class="NSColor" key="NSColor" id="214098874">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSTextField" id="282885445">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 176}, {466, 28}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="649334366">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string type="base64-UTF8" key="NSContents">T3B0aW9uIOOCreODvOOCkuaKvOOBl+OBn+OBvuOBvuOCr+ODquODg+OCr+OBmeOCi+OBqOODnuOCpuOC
+ueOBruS4reODnOOCv+ODs+aTjeS9nOOBq+OBquOCiuOAgUNvbW1hbmQg44Kt44O844KS5oq844GX44Gf
+44G+44G+44Kv44Oq44OD44Kv44GZ44KL44Go44Oe44Km44K544Gu5Y+z44Oc44K/44Oz5pON5L2c44Gr
+44Gq44KK44G+44GZ44CCCg</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="282885445"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="842100515">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 93}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="940564599">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">X11 の代替キーを有効にする</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="842100515"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="31160162">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 123}, {466, 17}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="666057093">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">入力メニューを変更して現在の X11 キーマップを上書きすることを許可します。</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="31160162"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="179949713">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 146}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="967619578">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">システムのキーボードレイアウトに従う</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="179949713"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="278155937">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, -1}, {466, 31}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="617441821">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">有効にすると、option キー で Mode_switch の代わりに X11 キーシンボルの Alt_L と Alt_R が送信されます。 </string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="278155937"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="406291430">
+ <reference key="NSNextResponder" ref="596750588"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 36}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="596750588"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="67728988">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Option キーで Alt_L と Alt_R が送信されます</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="406291430"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {538, 246}}</string>
+ </object>
+ <string key="NSLabel">入力</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="960678392">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">2</characters>
+ </object>
+ <object class="NSView" key="NSView" id="515308735">
+ <reference key="NSNextResponder" ref="448510093"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSPopUpButton" id="709074847">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{75, 201}, {163, 26}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSPopUpButtonCell" key="NSCell" id="633115429">
+ <int key="NSCellFlags">-2076049856</int>
+ <int key="NSCellFlags2">1024</int>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="709074847"/>
+ <int key="NSButtonFlags">109199615</int>
+ <int key="NSButtonFlags2">1</int>
+ <object class="NSFont" key="NSAlternateImage">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ <object class="NSMenuItem" key="NSMenuItem" id="616492372">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">ディスプレイから</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <int key="NSState">1</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">-1</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ <bool key="NSMenuItemRespectAlignment">YES</bool>
+ <object class="NSMenu" key="NSMenu" id="341113515">
+ <object class="NSMutableString" key="NSTitle">
+ <characters key="NS.bytes">OtherViews</characters>
+ </object>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <reference ref="616492372"/>
+ <object class="NSMenuItem" id="759499526">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">256 色</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">8</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ <object class="NSMenuItem" id="543935434">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">約 32000 色</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">15</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ <object class="NSMenuItem" id="836673018">
+ <reference key="NSMenu" ref="341113515"/>
+ <string key="NSTitle">約 1670 万色</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">24</int>
+ <reference key="NSTarget" ref="633115429"/>
+ </object>
+ </array>
+ </object>
+ <int key="NSPreferredEdge">3</int>
+ <bool key="NSUsesItemFromMenu">YES</bool>
+ <bool key="NSAltersState">YES</bool>
+ <int key="NSArrowPosition">1</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="201731424">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{17, 205}, {56, 19}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="930265681">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">カラー:</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="201731424"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="86150604">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 183}, {392, 14}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="311969422">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">このオプションは、次回 X11 を起動したときに有効になります。</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="86150604"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="477203622">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 149}, {409, 23}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="631531164">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">フルスクリーンモード</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="477203622"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="57246850">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{37, 83}, {409, 23}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="917248662">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">フルスクリーンモードでメニューバーを自動的に表示</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="57246850"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="298603383">
+ <reference key="NSNextResponder" ref="515308735"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 113}, {468, 30}}</string>
+ <reference key="NSSuperview" ref="515308735"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="761107402">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">X11 のルートウインドウを有効にします。フルスクリーンモードに切り替えたり、フルスクリーンモードを終了するときは、コマンド + Option + A キーを押します。</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="298603383"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {538, 246}}</string>
+ <reference key="NSSuperview" ref="448510093"/>
+ </object>
+ <string key="NSLabel">出力</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="723450037">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">2</characters>
+ </object>
+ <object class="NSView" key="NSView" id="408298283">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="878106058">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 222}, {409, 23}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="718083688">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">同期を有効にする</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="878106058"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="386152084">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 188}, {488, 28}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="572508492">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">“コピー”メニュー項目を有効にして、OSX のペーストボードと X11 の CLIPBOARD バッファおよび PRIMARY バッファを同期できるようにします。</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="386152084"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="477050998">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{37, 96}, {414, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="501304422">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">ペーストボードが変更されたときに CLIPBOARD をアップデート</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="477050998"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="765780304">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{37, 71}, {486, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="510771323">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">ペーストボードが変更されたときに PRIMARY (中クリック)をアップデート</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="765780304"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="1002778833">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{37, 46}, {451, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="897099877">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">新しいテキストが選択されたら、すぐにペーストボードをアップデート</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="1002778833"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="487809555">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{37, 159}, {410, 18}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="619977658">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">CLIPBOARD が変更されたときにペーストボードをアップデート</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="487809555"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="620944856">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{55, 125}, {469, 28}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="461823902">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">xclipboard、klipper、その他の X11 クリップボードマネージャを使用したい場合は、このオプションを無効にしてください。</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="620944856"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="522511724">
+ <reference key="NSNextResponder" ref="408298283"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{55, 12}, {469, 28}}</string>
+ <reference key="NSSuperview" ref="408298283"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="994587858">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">X11 プロトコルの制限により、このオプションは、一部のアプリケーションで機能しない場合があります。</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="522511724"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {538, 246}}</string>
+ </object>
+ <string key="NSLabel">ペーストボード</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="10973343">
+ <object class="NSMutableString" key="NSIdentifier">
+ <characters key="NS.bytes">2</characters>
+ </object>
+ <object class="NSView" key="NSView" id="184765684">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="657659108">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 210}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="259618205">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">選択されていないウインドウを直接クリック</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="657659108"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="290578835">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 176}, {474, 28}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="399127858">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">有効にした場合、選択されていないウインドウをクリックしたときに、そのウインドウを一番手前に表示するだけでなく、ウインドウ内の項目を直接クリックします。</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="290578835"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="992839333">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 146}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="959555182">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">フォーカスをマウスと一緒に移動</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="992839333"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="138261120">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 126}, {474, 14}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="183409141">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">X11 ウインドウのフォーカスがカーソルと一緒に移動します。逆効果になる場合もあります。</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="138261120"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSButton" id="128352289">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 96}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="556463187">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">新規ウインドウにフォーカス</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="128352289"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="57161931">
+ <reference key="NSNextResponder" ref="184765684"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 62}, {474, 28}}</string>
+ <reference key="NSSuperview" ref="184765684"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="989804990">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">有効にした場合、新しい X11 ウインドウを作成すると、Finder.app や ターミナル.app などの代わりに、X11.app が前面に移動します。</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="57161931"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {538, 246}}</string>
+ </object>
+ <string key="NSLabel">ウインドウ</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ <object class="NSTabViewItem" id="348328898">
+ <object class="NSView" key="NSView" id="300811574">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="989050925">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 210}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="189594322">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">接続を認証</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="989050925"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="700826966">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 132}, {402, 18}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="489340979">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">ネットワーク・クライアントからの接続を許可</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="700826966"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="891575339"/>
+ <reference key="NSAlternateImage" ref="391434389"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="168436707">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 162}, {465, 42}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="53243865">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">X11 の起動時に、Xauthority アクセス制御キーを作成します。システムの IP アドレスが変更されると、これらのキーが無効になり、X11 アプリケーションが起動しなくなることがあります。</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="168436707"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="363817195">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{36, 84}, {465, 42}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="390084685">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">有効にする場合は、システムのセキュリティを維持するために、“接続を認証”も有効にしてください。無効にすると、リモートアプリケーションからの接続は拒否されます。</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="363817195"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="223835729">
+ <reference key="NSNextResponder" ref="300811574"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{20, -16}, {404, 14}}</string>
+ <reference key="NSSuperview" ref="300811574"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="283628678">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4194304</int>
+ <string key="NSContents">これらのオプションは、次回 X11 を起動したときに有効になります。</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="223835729"/>
+ <reference key="NSBackgroundColor" ref="57160303"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{10, 33}, {538, 246}}</string>
+ </object>
+ <string key="NSLabel">セキュリティ</string>
+ <reference key="NSColor" ref="57160303"/>
+ <reference key="NSTabView" ref="448510093"/>
+ </object>
+ </array>
+ <reference key="NSSelectedTabViewItem" ref="960678392"/>
+ <reference key="NSFont" ref="463863101"/>
+ <int key="NSTvFlags">0</int>
+ <bool key="NSAllowTruncatedLabels">YES</bool>
+ <bool key="NSDrawsBackground">YES</bool>
+ <array class="NSMutableArray" key="NSSubviews">
+ <reference ref="515308735"/>
+ </array>
+ </object>
+ </array>
+ <string key="NSFrameSize">{584, 308}</string>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSMinSize">{320, 262}</string>
+ <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSFrameAutosaveName">x11_prefs</string>
+ </object>
+ <object class="NSWindowTemplate" id="604417141">
+ <int key="NSWindowStyleMask">11</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{360, 402}, {454, 271}}</string>
+ <int key="NSWTFlags">1350041600</int>
+ <string key="NSWindowTitle">X11 アプリケーションメニュー</string>
+ <string key="NSWindowClass">NSPanel</string>
+ <object class="NSMutableString" key="NSViewClass">
+ <characters key="NS.bytes">View</characters>
+ </object>
+ <nil key="NSUserInterfaceItemIdentifier"/>
+ <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSWindowContentMinSize">{454, 271}</string>
+ <object class="NSView" key="NSWindowView" id="85544634">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="671954382">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{340, 191}, {105, 32}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="143554520">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">137887744</int>
+ <string key="NSContents">複製</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="671954382"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <object class="NSFont" key="NSAlternateImage" id="549406736">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="492358940">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{340, 159}, {105, 32}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="8201128">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">137887744</int>
+ <string key="NSContents">取り除く</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="492358940"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="549406736"/>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSScrollView" id="1063387772">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSClipView" id="580565898">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">2304</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSTableView" id="905092943">
+ <reference key="NSNextResponder" ref="580565898"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{301, 198}</string>
+ <reference key="NSSuperview" ref="580565898"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTableHeaderView" key="NSHeaderView" id="792419186">
+ <reference key="NSNextResponder" ref="672307654"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{301, 17}</string>
+ <reference key="NSSuperview" ref="672307654"/>
+ <reference key="NSTableView" ref="905092943"/>
+ </object>
+ <object class="_NSCornerView" key="NSCornerView" id="898633680">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{302, 0}, {16, 17}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ </object>
+ <array class="NSMutableArray" key="NSTableColumns">
+ <object class="NSTableColumn" id="938444323">
+ <double key="NSWidth">103</double>
+ <double key="NSMinWidth">43</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">名前</string>
+ <reference key="NSSupport" ref="26"/>
+ <object class="NSColor" key="NSBackgroundColor" id="113872566">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="249576247">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">headerTextColor</string>
+ <reference key="NSColor" ref="214098874"/>
+ </object>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="825378892">
+ <int key="NSCellFlags">338820672</int>
+ <int key="NSCellFlags2">1024</int>
+ <string key="NSContents">テキストセル</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="905092943"/>
+ <object class="NSColor" key="NSBackgroundColor" id="822946413">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="905092943"/>
+ <string key="NSHeaderToolTip"/>
+ </object>
+ <object class="NSTableColumn" id="84282687">
+ <double key="NSWidth">100</double>
+ <double key="NSMinWidth">40</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">コマンド</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSBackgroundColor" ref="113872566"/>
+ <reference key="NSTextColor" ref="249576247"/>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="432610585">
+ <int key="NSCellFlags">338820672</int>
+ <int key="NSCellFlags2">1024</int>
+ <string key="NSContents">テキストセル</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="905092943"/>
+ <reference key="NSBackgroundColor" ref="822946413"/>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="905092943"/>
+ <string key="NSHeaderToolTip"/>
+ </object>
+ <object class="NSTableColumn" id="242608782">
+ <double key="NSWidth">89</double>
+ <double key="NSMinWidth">30</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">ショートカット</string>
+ <reference key="NSSupport" ref="26"/>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">headerColor</string>
+ <reference key="NSColor" ref="822946413"/>
+ </object>
+ <reference key="NSTextColor" ref="249576247"/>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="34714764">
+ <int key="NSCellFlags">338820672</int>
+ <int key="NSCellFlags2">1024</int>
+ <string key="NSContents">テキストセル</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">12</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <string key="NSPlaceholderString"/>
+ <reference key="NSControlView" ref="905092943"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <object class="NSColor" key="NSBackgroundColor" id="812484075">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlBackgroundColor</string>
+ <reference key="NSColor" ref="590688762"/>
+ </object>
+ <reference key="NSTextColor" ref="930815747"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="905092943"/>
+ <string key="NSHeaderToolTip"/>
+ </object>
+ </array>
+ <double key="NSIntercellSpacingWidth">3</double>
+ <double key="NSIntercellSpacingHeight">2</double>
+ <reference key="NSBackgroundColor" ref="822946413"/>
+ <object class="NSColor" key="NSGridColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">gridColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ </object>
+ <double key="NSRowHeight">17</double>
+ <int key="NSTvFlags">1379958784</int>
+ <reference key="NSDelegate"/>
+ <reference key="NSDataSource"/>
+ <int key="NSColumnAutoresizingStyle">1</int>
+ <int key="NSDraggingSourceMaskForLocal">-1</int>
+ <int key="NSDraggingSourceMaskForNonLocal">0</int>
+ <bool key="NSAllowsTypeSelect">YES</bool>
+ <int key="NSTableViewDraggingDestinationStyle">0</int>
+ <int key="NSTableViewGroupRowStyle">1</int>
+ </object>
+ </array>
+ <string key="NSFrame">{{1, 17}, {301, 198}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <reference key="NSNextKeyView" ref="905092943"/>
+ <reference key="NSDocView" ref="905092943"/>
+ <reference key="NSBGColor" ref="812484075"/>
+ <int key="NScvFlags">4</int>
+ </object>
+ <object class="NSScroller" id="842897584">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{302, 17}, {15, 198}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <reference key="NSTarget" ref="1063387772"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">0.99492380000000002</double>
+ </object>
+ <object class="NSScroller" id="17278747">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{1, 215}, {301, 15}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <int key="NSsFlags">1</int>
+ <reference key="NSTarget" ref="1063387772"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">0.68852460000000004</double>
+ </object>
+ <object class="NSClipView" id="672307654">
+ <reference key="NSNextResponder" ref="1063387772"/>
+ <int key="NSvFlags">2304</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <reference ref="792419186"/>
+ </array>
+ <string key="NSFrame">{{1, 0}, {301, 17}}</string>
+ <reference key="NSSuperview" ref="1063387772"/>
+ <reference key="NSNextKeyView" ref="792419186"/>
+ <reference key="NSDocView" ref="792419186"/>
+ <reference key="NSBGColor" ref="812484075"/>
+ <int key="NScvFlags">4</int>
+ </object>
+ <reference ref="898633680"/>
+ </array>
+ <string key="NSFrame">{{20, 20}, {318, 231}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <reference key="NSNextKeyView" ref="580565898"/>
+ <int key="NSsFlags">133170</int>
+ <reference key="NSVScroller" ref="842897584"/>
+ <reference key="NSHScroller" ref="17278747"/>
+ <reference key="NSContentView" ref="580565898"/>
+ <reference key="NSHeaderClipView" ref="672307654"/>
+ <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
+ </object>
+ <object class="NSButton" id="758204686">
+ <reference key="NSNextResponder" ref="85544634"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{340, 223}, {105, 32}}</string>
+ <reference key="NSSuperview" ref="85544634"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="1025474039">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">137887744</int>
+ <string key="NSContents">項目を追加</string>
+ <reference key="NSSupport" ref="463863101"/>
+ <reference key="NSControlView" ref="758204686"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="549406736"/>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrameSize">{454, 271}</string>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSMinSize">{454, 293}</string>
+ <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <string key="NSFrameAutosaveName">x11_apps</string>
+ </object>
+ <object class="NSMenu" id="294137138">
+ <string key="NSTitle">メニュー</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="318286212">
+ <reference key="NSMenu" ref="294137138"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="511651072">
+ <reference key="NSMenu" ref="294137138"/>
+ <string key="NSTitle">アプリケーション</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="48278059">
+ <string key="NSTitle">アプリケーション</string>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="563798000">
+ <reference key="NSMenu" ref="48278059"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ <object class="NSMenuItem" id="1032342329">
+ <reference key="NSMenu" ref="48278059"/>
+ <string key="NSTitle">カスタマイズ...</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="531645050"/>
+ <reference key="NSMixedImage" ref="351811234"/>
+ </object>
+ </array>
+ </object>
+ </object>
+ </array>
+ <string key="NSName"/>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">copy:</string>
+ <reference key="source" ref="941939442"/>
+ <reference key="destination" ref="185296989"/>
+ </object>
+ <int key="connectionID">181</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">minimize_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="677652931"/>
+ </object>
+ <int key="connectionID">202</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">close_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="984461797"/>
+ </object>
+ <int key="connectionID">205</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">zoom_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1066447520"/>
+ </object>
+ <int key="connectionID">206</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">bring_to_front:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="276216762"/>
+ </object>
+ <int key="connectionID">207</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">hideOtherApplications:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="206802571"/>
+ </object>
+ <int key="connectionID">263</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">apps_separator</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="390088328"/>
+ </object>
+ <int key="connectionID">273</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">apps_table</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="905092943"/>
+ </object>
+ <int key="connectionID">301</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_delete:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="492358940"/>
+ </object>
+ <int key="connectionID">303</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_duplicate:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="671954382"/>
+ </object>
+ <int key="connectionID">304</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_show:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1065386165"/>
+ </object>
+ <int key="connectionID">308</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_new:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="758204686"/>
+ </object>
+ <int key="connectionID">311</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_show:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="386173216"/>
+ </object>
+ <int key="connectionID">318</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">x11_about_item</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="139290918"/>
+ </object>
+ <int key="connectionID">321</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_auth</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="989050925"/>
+ </object>
+ <int key="connectionID">387</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_tcp</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="700826966"/>
+ </object>
+ <int key="connectionID">388</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">depth</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="709074847"/>
+ </object>
+ <int key="connectionID">389</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">fake_buttons</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="119157981"/>
+ </object>
+ <int key="connectionID">391</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_keymap</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="179949713"/>
+ </object>
+ <int key="connectionID">392</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_keyequivs</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="842100515"/>
+ </object>
+ <int key="connectionID">393</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="119157981"/>
+ </object>
+ <int key="connectionID">394</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="179949713"/>
+ </object>
+ <int key="connectionID">395</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="842100515"/>
+ </object>
+ <int key="connectionID">396</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="709074847"/>
+ </object>
+ <int key="connectionID">398</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="989050925"/>
+ </object>
+ <int key="connectionID">399</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="700826966"/>
+ </object>
+ <int key="connectionID">401</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">prefs_panel</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="124913468"/>
+ </object>
+ <int key="connectionID">402</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">x11_help:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="504984881"/>
+ </object>
+ <int key="connectionID">422</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dockMenu</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="294137138"/>
+ </object>
+ <int key="connectionID">426</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dock_menu</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="294137138"/>
+ </object>
+ <int key="connectionID">428</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="485884620"/>
+ </object>
+ <int key="connectionID">429</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">hide:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="301008465"/>
+ </object>
+ <int key="connectionID">430</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">unhideAllApplications:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="1023546148"/>
+ </object>
+ <int key="connectionID">431</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">orderFrontStandardAboutPanel:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="139290918"/>
+ </object>
+ <int key="connectionID">433</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dock_apps_menu</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="48278059"/>
+ </object>
+ <int key="connectionID">530</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dock_window_separator</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="318286212"/>
+ </object>
+ <int key="connectionID">531</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">apps_table_show:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1032342329"/>
+ </object>
+ <int key="connectionID">534</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">next_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1036389925"/>
+ </object>
+ <int key="connectionID">539</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">previous_window:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="369641893"/>
+ </object>
+ <int key="connectionID">540</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_fullscreen</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477203622"/>
+ </object>
+ <int key="connectionID">546</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">enable_fullscreen_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477203622"/>
+ </object>
+ <int key="connectionID">547</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggle_fullscreen:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="6876565"/>
+ </object>
+ <int key="connectionID">548</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">toggle_fullscreen_item</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="6876565"/>
+ </object>
+ <int key="connectionID">549</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">menu</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="524015605"/>
+ </object>
+ <int key="connectionID">300334</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">terminate:</string>
+ <reference key="source" ref="815810918"/>
+ <reference key="destination" ref="274138642"/>
+ </object>
+ <int key="connectionID">300336</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="657659108"/>
+ </object>
+ <int key="connectionID">300389</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="992839333"/>
+ </object>
+ <int key="connectionID">300390</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="128352289"/>
+ </object>
+ <int key="connectionID">300391</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">click_through</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="657659108"/>
+ </object>
+ <int key="connectionID">300392</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">focus_follows_mouse</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="992839333"/>
+ </object>
+ <int key="connectionID">300393</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">focus_on_new_window</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="128352289"/>
+ </object>
+ <int key="connectionID">300394</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">copy_menu_item</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="185296989"/>
+ </object>
+ <int key="connectionID">300443</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_pasteboard</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="878106058"/>
+ </object>
+ <int key="connectionID">300444</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_clipboard_to_pasteboard</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="487809555"/>
+ </object>
+ <int key="connectionID">300461</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_pasteboard_to_clipboard</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477050998"/>
+ </object>
+ <int key="connectionID">300462</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_pasteboard_to_primary</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="765780304"/>
+ </object>
+ <int key="connectionID">300463</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_primary_immediately</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1002778833"/>
+ </object>
+ <int key="connectionID">300464</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="878106058"/>
+ </object>
+ <int key="connectionID">300465</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="487809555"/>
+ </object>
+ <int key="connectionID">300466</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="477050998"/>
+ </object>
+ <int key="connectionID">300467</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="765780304"/>
+ </object>
+ <int key="connectionID">300468</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="1002778833"/>
+ </object>
+ <int key="connectionID">300469</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_text1</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="620944856"/>
+ </object>
+ <int key="connectionID">300470</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sync_text2</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="522511724"/>
+ </object>
+ <int key="connectionID">300471</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enable_fullscreen_menu</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="57246850"/>
+ </object>
+ <int key="connectionID">300474</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="57246850"/>
+ </object>
+ <int key="connectionID">300475</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">prefs_changed:</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="406291430"/>
+ </object>
+ <int key="connectionID">300480</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">option_sends_alt</string>
+ <reference key="source" ref="485884620"/>
+ <reference key="destination" ref="406291430"/>
+ </object>
+ <int key="connectionID">300481</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="904585544"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="815810918"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="941939442"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="951368722"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">29</int>
+ <reference key="object" ref="524015605"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="931553638"/>
+ <reference ref="365880285"/>
+ <reference ref="200491363"/>
+ <reference ref="868031522"/>
+ <reference ref="551174276"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">MainMenu</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">19</int>
+ <reference key="object" ref="931553638"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="96874957"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">24</int>
+ <reference key="object" ref="96874957"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="677652931"/>
+ <reference ref="276216762"/>
+ <reference ref="1066447520"/>
+ <reference ref="1036389925"/>
+ <reference ref="369641893"/>
+ <reference ref="155085383"/>
+ <reference ref="984461797"/>
+ <reference ref="280172320"/>
+ </array>
+ <reference key="parent" ref="931553638"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="276216762"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">23</int>
+ <reference key="object" ref="677652931"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">92</int>
+ <reference key="object" ref="280172320"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">203</int>
+ <reference key="object" ref="984461797"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">204</int>
+ <reference key="object" ref="1066447520"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">536</int>
+ <reference key="object" ref="155085383"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">537</int>
+ <reference key="object" ref="1036389925"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">538</int>
+ <reference key="object" ref="369641893"/>
+ <reference key="parent" ref="96874957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">56</int>
+ <reference key="object" ref="365880285"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="576521955"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">57</int>
+ <reference key="object" ref="576521955"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="139290918"/>
+ <reference ref="386173216"/>
+ <reference ref="32285361"/>
+ <reference ref="301008465"/>
+ <reference ref="274138642"/>
+ <reference ref="272876017"/>
+ <reference ref="431301145"/>
+ <reference ref="206802571"/>
+ <reference ref="848095279"/>
+ <reference ref="1023546148"/>
+ <reference ref="6876565"/>
+ <reference ref="479677589"/>
+ </array>
+ <reference key="parent" ref="365880285"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">58</int>
+ <reference key="object" ref="139290918"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">129</int>
+ <reference key="object" ref="386173216"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">131</int>
+ <reference key="object" ref="32285361"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="821388474"/>
+ </array>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">130</int>
+ <reference key="object" ref="821388474"/>
+ <reference key="parent" ref="32285361"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">134</int>
+ <reference key="object" ref="301008465"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">136</int>
+ <reference key="object" ref="274138642"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">143</int>
+ <reference key="object" ref="272876017"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">144</int>
+ <reference key="object" ref="431301145"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">145</int>
+ <reference key="object" ref="206802571"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">149</int>
+ <reference key="object" ref="848095279"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">150</int>
+ <reference key="object" ref="1023546148"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">544</int>
+ <reference key="object" ref="6876565"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">545</int>
+ <reference key="object" ref="479677589"/>
+ <reference key="parent" ref="576521955"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">163</int>
+ <reference key="object" ref="200491363"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="526778998"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">169</int>
+ <reference key="object" ref="526778998"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="185296989"/>
+ </array>
+ <reference key="parent" ref="200491363"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">157</int>
+ <reference key="object" ref="185296989"/>
+ <reference key="parent" ref="526778998"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">269</int>
+ <reference key="object" ref="868031522"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="981161348"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">270</int>
+ <reference key="object" ref="981161348"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="390088328"/>
+ <reference ref="1065386165"/>
+ </array>
+ <reference key="parent" ref="868031522"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">272</int>
+ <reference key="object" ref="390088328"/>
+ <reference key="parent" ref="981161348"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">305</int>
+ <reference key="object" ref="1065386165"/>
+ <reference key="parent" ref="981161348"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">419</int>
+ <reference key="object" ref="551174276"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="511848303"/>
+ </array>
+ <reference key="parent" ref="524015605"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">420</int>
+ <reference key="object" ref="511848303"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="504984881"/>
+ </array>
+ <reference key="parent" ref="551174276"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">421</int>
+ <reference key="object" ref="504984881"/>
+ <reference key="parent" ref="511848303"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">196</int>
+ <reference key="object" ref="485884620"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">X11Controller</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">244</int>
+ <reference key="object" ref="124913468"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="941366957"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">PrefsPanel</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">245</int>
+ <reference key="object" ref="941366957"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="448510093"/>
+ </array>
+ <reference key="parent" ref="124913468"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">348</int>
+ <reference key="object" ref="448510093"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="287591690"/>
+ <reference ref="960678392"/>
+ <reference ref="348328898"/>
+ <reference ref="10973343"/>
+ <reference ref="723450037"/>
+ </array>
+ <reference key="parent" ref="941366957"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">349</int>
+ <reference key="object" ref="287591690"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="596750588"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">351</int>
+ <reference key="object" ref="596750588"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="119157981"/>
+ <reference ref="443008216"/>
+ <reference ref="282885445"/>
+ <reference ref="842100515"/>
+ <reference ref="31160162"/>
+ <reference ref="179949713"/>
+ <reference ref="278155937"/>
+ <reference ref="406291430"/>
+ </array>
+ <reference key="parent" ref="287591690"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">363</int>
+ <reference key="object" ref="119157981"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="990762273"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">364</int>
+ <reference key="object" ref="443008216"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="391919450"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">365</int>
+ <reference key="object" ref="282885445"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="649334366"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">368</int>
+ <reference key="object" ref="842100515"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="940564599"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">369</int>
+ <reference key="object" ref="31160162"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="666057093"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">370</int>
+ <reference key="object" ref="179949713"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="967619578"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">352</int>
+ <reference key="object" ref="960678392"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="515308735"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">350</int>
+ <reference key="object" ref="515308735"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="709074847"/>
+ <reference ref="201731424"/>
+ <reference ref="86150604"/>
+ <reference ref="477203622"/>
+ <reference ref="57246850"/>
+ <reference ref="298603383"/>
+ </array>
+ <reference key="parent" ref="960678392"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">382</int>
+ <reference key="object" ref="709074847"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="633115429"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">385</int>
+ <reference key="object" ref="201731424"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="930265681"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">386</int>
+ <reference key="object" ref="86150604"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="311969422"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">541</int>
+ <reference key="object" ref="477203622"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="631531164"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">543</int>
+ <reference key="object" ref="298603383"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="761107402"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">353</int>
+ <reference key="object" ref="348328898"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="300811574"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">354</int>
+ <reference key="object" ref="300811574"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="989050925"/>
+ <reference ref="700826966"/>
+ <reference ref="168436707"/>
+ <reference ref="363817195"/>
+ <reference ref="223835729"/>
+ </array>
+ <reference key="parent" ref="348328898"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">374</int>
+ <reference key="object" ref="989050925"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="189594322"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">375</int>
+ <reference key="object" ref="700826966"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="489340979"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">376</int>
+ <reference key="object" ref="168436707"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="53243865"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">377</int>
+ <reference key="object" ref="363817195"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="390084685"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">379</int>
+ <reference key="object" ref="223835729"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="283628678"/>
+ </array>
+ <reference key="parent" ref="300811574"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">285</int>
+ <reference key="object" ref="604417141"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="85544634"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">EditPrograms</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">286</int>
+ <reference key="object" ref="85544634"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1063387772"/>
+ <reference ref="758204686"/>
+ <reference ref="671954382"/>
+ <reference ref="492358940"/>
+ </array>
+ <reference key="parent" ref="604417141"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">423</int>
+ <reference key="object" ref="294137138"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="318286212"/>
+ <reference ref="511651072"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">DockMenu</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">524</int>
+ <reference key="object" ref="318286212"/>
+ <reference key="parent" ref="294137138"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">526</int>
+ <reference key="object" ref="511651072"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="48278059"/>
+ </array>
+ <reference key="parent" ref="294137138"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">527</int>
+ <reference key="object" ref="48278059"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1032342329"/>
+ <reference ref="563798000"/>
+ </array>
+ <reference key="parent" ref="511651072"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">532</int>
+ <reference key="object" ref="1032342329"/>
+ <reference key="parent" ref="48278059"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">533</int>
+ <reference key="object" ref="563798000"/>
+ <reference key="parent" ref="48278059"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100363</int>
+ <reference key="object" ref="990762273"/>
+ <reference key="parent" ref="119157981"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100364</int>
+ <reference key="object" ref="391919450"/>
+ <reference key="parent" ref="443008216"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100365</int>
+ <reference key="object" ref="649334366"/>
+ <reference key="parent" ref="282885445"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100368</int>
+ <reference key="object" ref="940564599"/>
+ <reference key="parent" ref="842100515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100369</int>
+ <reference key="object" ref="666057093"/>
+ <reference key="parent" ref="31160162"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100370</int>
+ <reference key="object" ref="967619578"/>
+ <reference key="parent" ref="179949713"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100382</int>
+ <reference key="object" ref="633115429"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="341113515"/>
+ </array>
+ <reference key="parent" ref="709074847"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100385</int>
+ <reference key="object" ref="930265681"/>
+ <reference key="parent" ref="201731424"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100386</int>
+ <reference key="object" ref="311969422"/>
+ <reference key="parent" ref="86150604"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100541</int>
+ <reference key="object" ref="631531164"/>
+ <reference key="parent" ref="477203622"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100543</int>
+ <reference key="object" ref="761107402"/>
+ <reference key="parent" ref="298603383"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100374</int>
+ <reference key="object" ref="189594322"/>
+ <reference key="parent" ref="989050925"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100375</int>
+ <reference key="object" ref="489340979"/>
+ <reference key="parent" ref="700826966"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100376</int>
+ <reference key="object" ref="53243865"/>
+ <reference key="parent" ref="168436707"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100377</int>
+ <reference key="object" ref="390084685"/>
+ <reference key="parent" ref="363817195"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100379</int>
+ <reference key="object" ref="283628678"/>
+ <reference key="parent" ref="223835729"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">380</int>
+ <reference key="object" ref="341113515"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="759499526"/>
+ <reference ref="616492372"/>
+ <reference ref="543935434"/>
+ <reference ref="836673018"/>
+ </array>
+ <reference key="parent" ref="633115429"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">435</int>
+ <reference key="object" ref="759499526"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">384</int>
+ <reference key="object" ref="616492372"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">383</int>
+ <reference key="object" ref="543935434"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">381</int>
+ <reference key="object" ref="836673018"/>
+ <reference key="parent" ref="341113515"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">295</int>
+ <reference key="object" ref="1063387772"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="792419186"/>
+ <reference ref="17278747"/>
+ <reference ref="842897584"/>
+ <reference ref="905092943"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300295</int>
+ <reference key="object" ref="792419186"/>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">200295</int>
+ <reference key="object" ref="17278747"/>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100295</int>
+ <reference key="object" ref="842897584"/>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">296</int>
+ <reference key="object" ref="905092943"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="242608782"/>
+ <reference ref="938444323"/>
+ <reference ref="84282687"/>
+ </array>
+ <reference key="parent" ref="1063387772"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">535</int>
+ <reference key="object" ref="242608782"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="34714764"/>
+ </array>
+ <reference key="parent" ref="905092943"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">575</int>
+ <reference key="object" ref="34714764"/>
+ <reference key="parent" ref="242608782"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">298</int>
+ <reference key="object" ref="938444323"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="825378892"/>
+ </array>
+ <reference key="parent" ref="905092943"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">573</int>
+ <reference key="object" ref="825378892"/>
+ <reference key="parent" ref="938444323"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">297</int>
+ <reference key="object" ref="84282687"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="432610585"/>
+ </array>
+ <reference key="parent" ref="905092943"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">574</int>
+ <reference key="object" ref="432610585"/>
+ <reference key="parent" ref="84282687"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">310</int>
+ <reference key="object" ref="758204686"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1025474039"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100310</int>
+ <reference key="object" ref="1025474039"/>
+ <reference key="parent" ref="758204686"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">292</int>
+ <reference key="object" ref="671954382"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="143554520"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100292</int>
+ <reference key="object" ref="143554520"/>
+ <reference key="parent" ref="671954382"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">293</int>
+ <reference key="object" ref="492358940"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="8201128"/>
+ </array>
+ <reference key="parent" ref="85544634"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100293</int>
+ <reference key="object" ref="8201128"/>
+ <reference key="parent" ref="492358940"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300337</int>
+ <reference key="object" ref="10973343"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="184765684"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300338</int>
+ <reference key="object" ref="184765684"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="657659108"/>
+ <reference ref="290578835"/>
+ <reference ref="992839333"/>
+ <reference ref="138261120"/>
+ <reference ref="128352289"/>
+ <reference ref="57161931"/>
+ </array>
+ <reference key="parent" ref="10973343"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300358</int>
+ <reference key="object" ref="290578835"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="399127858"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300359</int>
+ <reference key="object" ref="657659108"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="259618205"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300360</int>
+ <reference key="object" ref="259618205"/>
+ <reference key="parent" ref="657659108"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300361</int>
+ <reference key="object" ref="399127858"/>
+ <reference key="parent" ref="290578835"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300362</int>
+ <reference key="object" ref="992839333"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="959555182"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300363</int>
+ <reference key="object" ref="959555182"/>
+ <reference key="parent" ref="992839333"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300364</int>
+ <reference key="object" ref="138261120"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="183409141"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300365</int>
+ <reference key="object" ref="183409141"/>
+ <reference key="parent" ref="138261120"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300368</int>
+ <reference key="object" ref="128352289"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="556463187"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300369</int>
+ <reference key="object" ref="556463187"/>
+ <reference key="parent" ref="128352289"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300370</int>
+ <reference key="object" ref="57161931"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="989804990"/>
+ </array>
+ <reference key="parent" ref="184765684"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300371</int>
+ <reference key="object" ref="989804990"/>
+ <reference key="parent" ref="57161931"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300421</int>
+ <reference key="object" ref="723450037"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="408298283"/>
+ </array>
+ <reference key="parent" ref="448510093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300422</int>
+ <reference key="object" ref="408298283"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="878106058"/>
+ <reference ref="386152084"/>
+ <reference ref="487809555"/>
+ <reference ref="620944856"/>
+ <reference ref="477050998"/>
+ <reference ref="765780304"/>
+ <reference ref="1002778833"/>
+ <reference ref="522511724"/>
+ </array>
+ <reference key="parent" ref="723450037"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300423</int>
+ <reference key="object" ref="386152084"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="572508492"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300424</int>
+ <reference key="object" ref="878106058"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="718083688"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300440</int>
+ <reference key="object" ref="718083688"/>
+ <reference key="parent" ref="878106058"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300441</int>
+ <reference key="object" ref="572508492"/>
+ <reference key="parent" ref="386152084"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300447</int>
+ <reference key="object" ref="477050998"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="501304422"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300450</int>
+ <reference key="object" ref="501304422"/>
+ <reference key="parent" ref="477050998"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300451</int>
+ <reference key="object" ref="765780304"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="510771323"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300452</int>
+ <reference key="object" ref="510771323"/>
+ <reference key="parent" ref="765780304"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300453</int>
+ <reference key="object" ref="487809555"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="619977658"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300454</int>
+ <reference key="object" ref="619977658"/>
+ <reference key="parent" ref="487809555"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300455</int>
+ <reference key="object" ref="620944856"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="461823902"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300456</int>
+ <reference key="object" ref="461823902"/>
+ <reference key="parent" ref="620944856"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300457</int>
+ <reference key="object" ref="1002778833"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="897099877"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300458</int>
+ <reference key="object" ref="897099877"/>
+ <reference key="parent" ref="1002778833"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300459</int>
+ <reference key="object" ref="522511724"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="994587858"/>
+ </array>
+ <reference key="parent" ref="408298283"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300460</int>
+ <reference key="object" ref="994587858"/>
+ <reference key="parent" ref="522511724"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300472</int>
+ <reference key="object" ref="57246850"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="917248662"/>
+ </array>
+ <reference key="parent" ref="515308735"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300473</int>
+ <reference key="object" ref="917248662"/>
+ <reference key="parent" ref="57246850"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300476</int>
+ <reference key="object" ref="278155937"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="617441821"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300477</int>
+ <reference key="object" ref="406291430"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="67728988"/>
+ </array>
+ <reference key="parent" ref="596750588"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300478</int>
+ <reference key="object" ref="67728988"/>
+ <reference key="parent" ref="406291430"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">300479</int>
+ <reference key="object" ref="617441821"/>
+ <reference key="parent" ref="278155937"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="-3.ImportedFromIB2"/>
+ <string key="100292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="100295.IBShouldRemoveOnLegacySave"/>
+ <string key="100310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="100543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="129.ImportedFromIB2"/>
+ <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="130.ImportedFromIB2"/>
+ <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="131.ImportedFromIB2"/>
+ <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="134.ImportedFromIB2"/>
+ <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="136.ImportedFromIB2"/>
+ <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="143.ImportedFromIB2"/>
+ <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="144.ImportedFromIB2"/>
+ <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="145.ImportedFromIB2"/>
+ <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="149.ImportedFromIB2"/>
+ <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="150.ImportedFromIB2"/>
+ <string key="157.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="157.ImportedFromIB2"/>
+ <string key="163.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="163.ImportedFromIB2"/>
+ <string key="169.IBEditorWindowLastContentRect">{{168, 821}, {113, 23}}</string>
+ <string key="169.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="169.ImportedFromIB2"/>
+ <string key="169.editorWindowContentRectSynchronizationRect">{{202, 626}, {154, 153}}</string>
+ <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="19.ImportedFromIB2"/>
+ <integer value="1" key="196.ImportedFromIB2"/>
+ <string key="200295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="200295.IBShouldRemoveOnLegacySave"/>
+ <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="203.ImportedFromIB2"/>
+ <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="204.ImportedFromIB2"/>
+ <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="23.ImportedFromIB2"/>
+ <string key="24.IBEditorWindowLastContentRect">{{349, 868}, {315, 143}}</string>
+ <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="24.ImportedFromIB2"/>
+ <string key="24.editorWindowContentRectSynchronizationRect">{{271, 666}, {301, 153}}</string>
+ <string key="244.IBEditorWindowLastContentRect">{{507, 565}, {484, 308}}</string>
+ <string key="244.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="244.IBWindowTemplateEditedContentRect">{{507, 565}, {484, 308}}</string>
+ <integer value="1" key="244.ImportedFromIB2"/>
+ <string key="244.editorWindowContentRectSynchronizationRect">{{184, 290}, {481, 345}}</string>
+ <integer value="0" key="244.windowTemplate.hasMaxSize"/>
+ <integer value="1" key="244.windowTemplate.hasMinSize"/>
+ <string key="244.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="244.windowTemplate.minSize">{320, 240}</string>
+ <string key="245.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="245.ImportedFromIB2"/>
+ <string key="269.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="269.ImportedFromIB2"/>
+ <string key="270.IBEditorWindowLastContentRect">{{58, 803}, {155, 33}}</string>
+ <string key="270.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="270.ImportedFromIB2"/>
+ <string key="270.editorWindowContentRectSynchronizationRect">{{100, 746}, {155, 33}}</string>
+ <string key="272.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="272.ImportedFromIB2"/>
+ <string key="285.IBEditorWindowLastContentRect">{{68, 585}, {454, 271}}</string>
+ <string key="285.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="285.IBViewEditorWindowController.showingBoundsRectangles"/>
+ <integer value="1" key="285.IBViewEditorWindowController.showingLayoutRectangles"/>
+ <string key="285.IBWindowTemplateEditedContentRect">{{68, 585}, {454, 271}}</string>
+ <integer value="1" key="285.ImportedFromIB2"/>
+ <string key="285.editorWindowContentRectSynchronizationRect">{{433, 406}, {486, 327}}</string>
+ <integer value="0" key="285.windowTemplate.hasMaxSize"/>
+ <integer value="1" key="285.windowTemplate.hasMinSize"/>
+ <string key="285.windowTemplate.maxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="285.windowTemplate.minSize">{454, 271}</string>
+ <string key="286.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="286.ImportedFromIB2"/>
+ <string key="29.IBEditorWindowLastContentRect">{{145, 1011}, {336, 20}}</string>
+ <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="29.ImportedFromIB2"/>
+ <string key="29.editorWindowContentRectSynchronizationRect">{{67, 819}, {336, 20}}</string>
+ <string key="292.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="292.ImportedFromIB2"/>
+ <string key="293.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="293.ImportedFromIB2"/>
+ <string key="295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="295.ImportedFromIB2"/>
+ <string key="296.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="296.ImportedFromIB2"/>
+ <string key="297.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="297.ImportedFromIB2"/>
+ <string key="298.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="298.ImportedFromIB2"/>
+ <string key="300295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300295.IBShouldRemoveOnLegacySave"/>
+ <string key="300337.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300337.ImportedFromIB2"/>
+ <string key="300338.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300338.ImportedFromIB2"/>
+ <string key="300358.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300358.ImportedFromIB2"/>
+ <string key="300359.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300359.ImportedFromIB2"/>
+ <string key="300360.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300361.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300362.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300362.ImportedFromIB2"/>
+ <string key="300363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300364.ImportedFromIB2"/>
+ <string key="300365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300368.ImportedFromIB2"/>
+ <string key="300369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300370.ImportedFromIB2"/>
+ <string key="300371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300421.ImportedFromIB2"/>
+ <string key="300422.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300422.ImportedFromIB2"/>
+ <string key="300423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300423.ImportedFromIB2"/>
+ <string key="300424.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300424.ImportedFromIB2"/>
+ <string key="300440.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300441.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300447.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300447.ImportedFromIB2"/>
+ <string key="300450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300451.ImportedFromIB2"/>
+ <string key="300452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300453.ImportedFromIB2"/>
+ <string key="300454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300455.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300455.ImportedFromIB2"/>
+ <string key="300456.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300457.ImportedFromIB2"/>
+ <string key="300458.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300459.ImportedFromIB2"/>
+ <string key="300460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300472.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300472.ImportedFromIB2"/>
+ <string key="300473.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300476.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300476.ImportedFromIB2"/>
+ <string key="300477.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="300477.ImportedFromIB2"/>
+ <string key="300478.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="300479.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="305.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="305.ImportedFromIB2"/>
+ <string key="310.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="310.ImportedFromIB2"/>
+ <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="348.ImportedFromIB2"/>
+ <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="349.ImportedFromIB2"/>
+ <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="350.ImportedFromIB2"/>
+ <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="351.ImportedFromIB2"/>
+ <string key="352.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="352.ImportedFromIB2"/>
+ <string key="353.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="353.ImportedFromIB2"/>
+ <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="354.ImportedFromIB2"/>
+ <string key="363.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="363.ImportedFromIB2"/>
+ <string key="364.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="364.ImportedFromIB2"/>
+ <string key="365.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="365.ImportedFromIB2"/>
+ <string key="368.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="368.ImportedFromIB2"/>
+ <string key="369.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="369.ImportedFromIB2"/>
+ <string key="370.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="370.ImportedFromIB2"/>
+ <string key="374.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="374.ImportedFromIB2"/>
+ <string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="375.ImportedFromIB2"/>
+ <string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="376.ImportedFromIB2"/>
+ <string key="377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="377.ImportedFromIB2"/>
+ <string key="379.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="379.ImportedFromIB2"/>
+ <string key="380.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="380.ImportedFromIB2"/>
+ <string key="381.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="381.ImportedFromIB2"/>
+ <string key="382.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="382.ImportedFromIB2"/>
+ <string key="383.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="383.ImportedFromIB2"/>
+ <string key="384.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="384.ImportedFromIB2"/>
+ <string key="385.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="385.ImportedFromIB2"/>
+ <string key="386.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="386.ImportedFromIB2"/>
+ <string key="419.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="419.ImportedFromIB2"/>
+ <string key="420.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="420.ImportedFromIB2"/>
+ <string key="421.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="421.ImportedFromIB2"/>
+ <string key="423.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="423.ImportedFromIB2"/>
+ <string key="435.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="435.ImportedFromIB2"/>
+ <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="5.ImportedFromIB2"/>
+ <string key="524.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="524.ImportedFromIB2"/>
+ <string key="526.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="526.ImportedFromIB2"/>
+ <string key="527.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="527.ImportedFromIB2"/>
+ <string key="532.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="532.ImportedFromIB2"/>
+ <string key="533.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="533.ImportedFromIB2"/>
+ <string key="535.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="535.ImportedFromIB2"/>
+ <string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="536.ImportedFromIB2"/>
+ <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="537.ImportedFromIB2"/>
+ <string key="538.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="538.ImportedFromIB2"/>
+ <string key="541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="541.ImportedFromIB2"/>
+ <string key="543.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="543.ImportedFromIB2"/>
+ <string key="544.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="544.ImportedFromIB2"/>
+ <string key="545.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="545.ImportedFromIB2"/>
+ <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="56.ImportedFromIB2"/>
+ <string key="57.IBEditorWindowLastContentRect">{{20, 641}, {218, 203}}</string>
+ <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="57.ImportedFromIB2"/>
+ <string key="57.editorWindowContentRectSynchronizationRect">{{79, 616}, {218, 203}}</string>
+ <string key="573.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="573.ImportedFromIB2"/>
+ <string key="574.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="574.ImportedFromIB2"/>
+ <string key="575.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="575.ImportedFromIB2"/>
+ <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="58.ImportedFromIB2"/>
+ <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" key="92.ImportedFromIB2"/>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">300481</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">FirstResponder</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSFormatter</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">X11Controller</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ </array>
+ <array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
+ <object class="IBPartialClassDescription">
+ <string key="className">X11Controller</string>
+ <string key="superclassName">NSObject</string>
+ <dictionary class="NSMutableDictionary" key="actions">
+ <string key="apps_table_delete:">id</string>
+ <string key="apps_table_done:">id</string>
+ <string key="apps_table_duplicate:">id</string>
+ <string key="apps_table_new:">id</string>
+ <string key="apps_table_show:">id</string>
+ <string key="bring_to_front:">id</string>
+ <string key="close_window:">id</string>
+ <string key="enable_fullscreen_changed:">id</string>
+ <string key="minimize_window:">id</string>
+ <string key="next_window:">id</string>
+ <string key="prefs_changed:">id</string>
+ <string key="prefs_show:">id</string>
+ <string key="previous_window:">id</string>
+ <string key="quit:">id</string>
+ <string key="toggle_fullscreen:">id</string>
+ <string key="x11_help:">id</string>
+ <string key="zoom_window:">id</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="actionInfosByName">
+ <object class="IBActionInfo" key="apps_table_delete:">
+ <string key="name">apps_table_delete:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_done:">
+ <string key="name">apps_table_done:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_duplicate:">
+ <string key="name">apps_table_duplicate:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_new:">
+ <string key="name">apps_table_new:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="apps_table_show:">
+ <string key="name">apps_table_show:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="bring_to_front:">
+ <string key="name">bring_to_front:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="close_window:">
+ <string key="name">close_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="enable_fullscreen_changed:">
+ <string key="name">enable_fullscreen_changed:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="minimize_window:">
+ <string key="name">minimize_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="next_window:">
+ <string key="name">next_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="prefs_changed:">
+ <string key="name">prefs_changed:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="prefs_show:">
+ <string key="name">prefs_show:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="previous_window:">
+ <string key="name">previous_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="quit:">
+ <string key="name">quit:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="toggle_fullscreen:">
+ <string key="name">toggle_fullscreen:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="x11_help:">
+ <string key="name">x11_help:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="zoom_window:">
+ <string key="name">zoom_window:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="outlets">
+ <string key="apps_separator">NSMenuItem</string>
+ <string key="apps_table">NSTableView</string>
+ <string key="click_through">NSButton</string>
+ <string key="copy_menu_item">NSMenuItem</string>
+ <string key="depth">NSPopUpButton</string>
+ <string key="dock_apps_menu">NSMenu</string>
+ <string key="dock_menu">NSMenu</string>
+ <string key="dock_window_separator">NSMenuItem</string>
+ <string key="enable_auth">NSButton</string>
+ <string key="enable_fullscreen">NSButton</string>
+ <string key="enable_fullscreen_menu">NSButton</string>
+ <string key="enable_keyequivs">NSButton</string>
+ <string key="enable_tcp">NSButton</string>
+ <string key="fake_buttons">NSButton</string>
+ <string key="focus_follows_mouse">NSButton</string>
+ <string key="focus_on_new_window">NSButton</string>
+ <string key="option_sends_alt">NSButton</string>
+ <string key="prefs_panel">NSPanel</string>
+ <string key="sync_clipboard_to_pasteboard">NSButton</string>
+ <string key="sync_keymap">NSButton</string>
+ <string key="sync_pasteboard">NSButton</string>
+ <string key="sync_pasteboard_to_clipboard">NSButton</string>
+ <string key="sync_pasteboard_to_primary">NSButton</string>
+ <string key="sync_primary_immediately">NSButton</string>
+ <string key="sync_text1">NSTextField</string>
+ <string key="sync_text2">NSTextField</string>
+ <string key="toggle_fullscreen_item">NSMenuItem</string>
+ <string key="use_sysbeep">NSButton</string>
+ <string key="window_separator">NSMenuItem</string>
+ <string key="x11_about_item">NSMenuItem</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <object class="IBToOneOutletInfo" key="apps_separator">
+ <string key="name">apps_separator</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="apps_table">
+ <string key="name">apps_table</string>
+ <string key="candidateClassName">NSTableView</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="click_through">
+ <string key="name">click_through</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="copy_menu_item">
+ <string key="name">copy_menu_item</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="depth">
+ <string key="name">depth</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dock_apps_menu">
+ <string key="name">dock_apps_menu</string>
+ <string key="candidateClassName">NSMenu</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dock_menu">
+ <string key="name">dock_menu</string>
+ <string key="candidateClassName">NSMenu</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dock_window_separator">
+ <string key="name">dock_window_separator</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_auth">
+ <string key="name">enable_auth</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_fullscreen">
+ <string key="name">enable_fullscreen</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_fullscreen_menu">
+ <string key="name">enable_fullscreen_menu</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_keyequivs">
+ <string key="name">enable_keyequivs</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="enable_tcp">
+ <string key="name">enable_tcp</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="fake_buttons">
+ <string key="name">fake_buttons</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="focus_follows_mouse">
+ <string key="name">focus_follows_mouse</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="focus_on_new_window">
+ <string key="name">focus_on_new_window</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="option_sends_alt">
+ <string key="name">option_sends_alt</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="prefs_panel">
+ <string key="name">prefs_panel</string>
+ <string key="candidateClassName">NSPanel</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_clipboard_to_pasteboard">
+ <string key="name">sync_clipboard_to_pasteboard</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_keymap">
+ <string key="name">sync_keymap</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_pasteboard">
+ <string key="name">sync_pasteboard</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_pasteboard_to_clipboard">
+ <string key="name">sync_pasteboard_to_clipboard</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_pasteboard_to_primary">
+ <string key="name">sync_pasteboard_to_primary</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_primary_immediately">
+ <string key="name">sync_primary_immediately</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_text1">
+ <string key="name">sync_text1</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="sync_text2">
+ <string key="name">sync_text2</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="toggle_fullscreen_item">
+ <string key="name">toggle_fullscreen_item</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="use_sysbeep">
+ <string key="name">use_sysbeep</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="window_separator">
+ <string key="name">window_separator</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="x11_about_item">
+ <string key="name">x11_about_item</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ </dictionary>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBDocumentRelativeSource</string>
+ <string key="minorKey">../../../X11Controller.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
+ <integer value="1040" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../X11.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NSMenuCheckmark">{9, 8}</string>
+ <string key="NSMenuMixedState">{7, 2}</string>
+ <string key="NSSwitch">{15, 15}</string>
+ </dictionary>
+ </data>
+</archive>
diff --git a/xorg-server/hw/xquartz/pbproxy/x-selection.h b/xorg-server/hw/xquartz/pbproxy/x-selection.h
index d4a39e58f..b31d7515e 100644
--- a/xorg-server/hw/xquartz/pbproxy/x-selection.h
+++ b/xorg-server/hw/xquartz/pbproxy/x-selection.h
@@ -1,110 +1,110 @@
-/* x-selection.h -- proxies between NSPasteboard and X11 selections
-
- Copyright (c) 2002, 2008 Apple Computer, Inc. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
- HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-
- Except as contained in this notice, the name(s) of the above
- copyright holders shall not be used in advertising or otherwise to
- promote the sale, use or other dealings in this Software without
- prior written authorization.
-*/
-
-#ifndef X_SELECTION_H
-#define X_SELECTION_H 1
-
-#include "pbproxy.h"
-
-#define Cursor X_Cursor
-#include <X11/extensions/Xfixes.h>
-#undef Cursor
-
-#include <AppKit/NSPasteboard.h>
-
-/* This stores image data or text. */
-struct propdata {
- unsigned char *data;
- size_t length;
- int format;
-};
-
-struct atom_list {
- Atom primary, clipboard, text, utf8_string, string, targets, multiple,
- cstring, image_png, image_jpeg, incr, atom, clipboard_manager,
- compound_text, atom_pair;
-};
-
-
-@interface x_selection : NSObject
-{
-@private
-
- /* The unmapped window we use for fetching selections. */
- Window _selection_window;
-
- Atom request_atom;
-
- struct {
- struct propdata propdata;
- Window requestor;
- Atom selection;
- } pending;
-
- /*
- * This is the number of times the user has requested a copy.
- * Once the copy is completed, we --pending_copy, and if the
- * pending_copy is > 0 we do it again.
- */
- int pending_copy;
- /*
- * This is used for the same purpose as pending_copy, but for the
- * CLIPBOARD. It also prevents a race with INCR transfers.
- */
- int pending_clipboard;
-
- struct atom_list atoms[1];
-}
-
-- (void) x_active:(Time)timestamp;
-- (void) x_inactive:(Time)timestamp;
-
-- (void) x_copy:(Time)timestamp;
-
-- (void) clear_event:(XSelectionClearEvent *)e;
-- (void) request_event:(XSelectionRequestEvent *)e;
-- (void) notify_event:(XSelectionEvent *)e;
-- (void) property_event:(XPropertyEvent *)e;
-- (void) xfixes_selection_notify:(XFixesSelectionNotifyEvent *)e;
-- (void) handle_selection:(Atom)selection type:(Atom)type propdata:(struct propdata *)pdata;
-- (void) claim_clipboard;
-- (BOOL) set_clipboard_manager_status:(BOOL)value;
-- (void) own_clipboard;
-- (void) copy_completed:(Atom)selection;
-
-- (void) reload_preferences;
-- (BOOL) is_active;
-- (void) send_none:(XSelectionRequestEvent *)e;
-@end
-
-/* main.m */
-extern x_selection *_selection_object;
-
-#endif /* X_SELECTION_H */
+/* x-selection.h -- proxies between NSPasteboard and X11 selections
+
+ Copyright (c) 2002, 2008 Apple Computer, Inc. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software without
+ prior written authorization.
+*/
+
+#ifndef X_SELECTION_H
+#define X_SELECTION_H 1
+
+#include "pbproxy.h"
+
+#define Cursor X_Cursor
+#include <X11/extensions/Xfixes.h>
+#undef Cursor
+
+#include <AppKit/NSPasteboard.h>
+
+/* This stores image data or text. */
+struct propdata {
+ unsigned char *data;
+ size_t length;
+ int format;
+};
+
+struct atom_list {
+ Atom primary, clipboard, text, utf8_string, string, targets, multiple,
+ cstring, image_png, image_jpeg, incr, atom, clipboard_manager,
+ compound_text, atom_pair;
+};
+
+
+@interface x_selection : NSObject
+{
+@private
+
+ /* The unmapped window we use for fetching selections. */
+ Window _selection_window;
+
+ Atom request_atom;
+
+ struct {
+ struct propdata propdata;
+ Window requestor;
+ Atom selection;
+ } pending;
+
+ /*
+ * This is the number of times the user has requested a copy.
+ * Once the copy is completed, we --pending_copy, and if the
+ * pending_copy is > 0 we do it again.
+ */
+ int pending_copy;
+ /*
+ * This is used for the same purpose as pending_copy, but for the
+ * CLIPBOARD. It also prevents a race with INCR transfers.
+ */
+ int pending_clipboard;
+
+ struct atom_list atoms[1];
+}
+
+- (void) x_active:(Time)timestamp;
+- (void) x_inactive:(Time)timestamp;
+
+- (void) x_copy:(Time)timestamp;
+
+- (void) clear_event:(XSelectionClearEvent *)e;
+- (void) request_event:(XSelectionRequestEvent *)e;
+- (void) notify_event:(XSelectionEvent *)e;
+- (void) property_event:(XPropertyEvent *)e;
+- (void) xfixes_selection_notify:(XFixesSelectionNotifyEvent *)e;
+- (void) handle_selection:(Atom)selection type:(Atom)type propdata:(struct propdata *)pdata;
+- (void) claim_clipboard;
+- (BOOL) set_clipboard_manager_status:(BOOL)value;
+- (void) own_clipboard;
+- (void) copy_completed:(Atom)selection;
+
+- (void) reload_preferences;
+- (BOOL) is_active;
+- (void) send_none:(XSelectionRequestEvent *)e;
+@end
+
+/* main.m */
+extern x_selection *_selection_object;
+
+#endif /* X_SELECTION_H */
diff --git a/xorg-server/hw/xquartz/quartz.c b/xorg-server/hw/xquartz/quartz.c
index 11e5a74d7..9e9f6be14 100644
--- a/xorg-server/hw/xquartz/quartz.c
+++ b/xorg-server/hw/xquartz/quartz.c
@@ -1,483 +1,483 @@
-/*
- *
- * Quartz-specific support for the Darwin X Server
- *
- * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include "sanitizedCarbon.h"
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "quartzCommon.h"
-#include "quartzRandR.h"
-#include "inputstr.h"
-#include "quartz.h"
-#include "darwin.h"
-#include "darwinEvents.h"
-#include "pseudoramiX.h"
-#define _APPLEWM_SERVER_
-#include "applewmExt.h"
-
-#include "X11Application.h"
-
-#include <X11/extensions/applewmconst.h>
-
-// X headers
-#include "scrnintstr.h"
-#include "windowstr.h"
-#include "colormapst.h"
-#include "globals.h"
-#include "mi.h"
-
-// System headers
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <IOKit/pwr_mgt/IOPMLib.h>
-#include <pthread.h>
-#include <signal.h>
-
-#include <rootlessCommon.h>
-#include <Xplugin.h>
-
-DevPrivateKeyRec quartzScreenKeyRec;
-int aquaMenuBarHeight = 0;
-QuartzModeProcsPtr quartzProcs = NULL;
-const char *quartzOpenGLBundle = NULL;
-
-Bool XQuartzFullscreenDisableHotkeys = TRUE;
-Bool XQuartzOptionSendsAlt = FALSE;
-Bool XQuartzEnableKeyEquivalents = TRUE;
-Bool XQuartzFullscreenVisible = FALSE;
-Bool XQuartzRootlessDefault = TRUE;
-Bool XQuartzIsRootless = TRUE;
-Bool XQuartzServerVisible = FALSE;
-Bool XQuartzFullscreenMenu = FALSE;
-
-int32_t XQuartzShieldingWindowLevel = 0;
-
-/*
-===========================================================================
-
- Screen functions
-
-===========================================================================
-*/
-
-/*
- * QuartzAddScreen
- * Do mode dependent initialization of each screen for Quartz.
- */
-Bool QuartzAddScreen(
- int index,
- ScreenPtr pScreen)
-{
- // allocate space for private per screen Quartz specific storage
- QuartzScreenPtr displayInfo = calloc(sizeof(QuartzScreenRec), 1);
-
- // QUARTZ_PRIV(pScreen) = displayInfo;
- dixSetPrivate(&pScreen->devPrivates, quartzScreenKey, displayInfo);
-
- // do Quartz mode specific initialization
- return quartzProcs->AddScreen(index, pScreen);
-}
-
-
-/*
- * QuartzSetupScreen
- * Finalize mode specific setup of each screen.
- */
-Bool QuartzSetupScreen(
- int index,
- ScreenPtr pScreen)
-{
- // do Quartz mode specific setup
- if (! quartzProcs->SetupScreen(index, pScreen))
- return FALSE;
-
- // setup cursor support
- if (! quartzProcs->InitCursor(pScreen))
- return FALSE;
-
-#if defined(RANDR)
- if(!QuartzRandRInit(pScreen)) {
- DEBUG_LOG("Failed to init RandR extension.\n");
- return FALSE;
- }
-#endif
-
- return TRUE;
-}
-
-
-/*
- * QuartzInitOutput
- * Quartz display initialization.
- */
-void QuartzInitOutput(
- int argc,
- char **argv )
-{
- /* For XQuartz, we want to just use the default signal handler to work better with CrashTracer */
- signal(SIGSEGV, SIG_DFL);
- signal(SIGILL, SIG_DFL);
-#ifdef SIGEMT
- signal(SIGEMT, SIG_DFL);
-#endif
- signal(SIGFPE, SIG_DFL);
-#ifdef SIGBUS
- signal(SIGBUS, SIG_DFL);
-#endif
-#ifdef SIGSYS
- signal(SIGSYS, SIG_DFL);
-#endif
-#ifdef SIGXCPU
- signal(SIGXCPU, SIG_DFL);
-#endif
-#ifdef SIGXFSZ
- signal(SIGXFSZ, SIG_DFL);
-#endif
-
- if (!RegisterBlockAndWakeupHandlers(QuartzBlockHandler,
- QuartzWakeupHandler,
- NULL))
- {
- FatalError("Could not register block and wakeup handlers.");
- }
-
- if (!dixRegisterPrivateKey(&quartzScreenKeyRec, PRIVATE_SCREEN, 0))
- FatalError("Failed to alloc quartz screen private.\n");
-
- // Do display mode specific initialization
- quartzProcs->DisplayInit();
-}
-
-
-/*
- * QuartzInitInput
- * Inform the main thread the X server is ready to handle events.
- */
-void QuartzInitInput(
- int argc,
- char **argv )
-{
- X11ApplicationSetCanQuit(0);
- X11ApplicationServerReady();
- // Do final display mode specific initialization before handling events
- if (quartzProcs->InitInput)
- quartzProcs->InitInput(argc, argv);
-}
-
-
-void QuartzUpdateScreens(void) {
- ScreenPtr pScreen;
- WindowPtr pRoot;
- int x, y, width, height, sx, sy;
- xEvent e;
- BoxRec bounds;
-
- if (noPseudoramiXExtension || screenInfo.numScreens != 1)
- {
- /* FIXME: if not using Xinerama, we have multiple screens, and
- to do this properly may need to add or remove screens. Which
- isn't possible. So don't do anything. Another reason why
- we default to running with Xinerama. */
-
- return;
- }
-
- pScreen = screenInfo.screens[0];
-
- PseudoramiXResetScreens();
- quartzProcs->AddPseudoramiXScreens(&x, &y, &width, &height, pScreen);
-
- pScreen->x = x;
- pScreen->y = y;
- pScreen->mmWidth = pScreen->mmWidth * ((double) width / pScreen->width);
- pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height);
- pScreen->width = width;
- pScreen->height = height;
-
- DarwinAdjustScreenOrigins(&screenInfo);
-
- /* DarwinAdjustScreenOrigins or UpdateScreen may change pScreen->x/y,
- * so use it rather than x/y
- */
- sx = pScreen->x + darwinMainScreenX;
- sy = pScreen->y + darwinMainScreenY;
-
- /* Adjust the root window. */
- pRoot = pScreen->root;
- AppleWMSetScreenOrigin(pRoot);
- pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
-
- miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
-
- /* <rdar://problem/7770779> pointer events are clipped to old display region after display reconfiguration
- * http://xquartz.macosforge.org/trac/ticket/346
- */
- bounds.x1 = 0;
- bounds.x2 = width;
- bounds.y1 = 0;
- bounds.y2 = height;
- pScreen->ConstrainCursor(inputInfo.pointer, pScreen, &bounds);
- inputInfo.pointer->spriteInfo->sprite->physLimits = bounds;
- inputInfo.pointer->spriteInfo->sprite->hotLimits = bounds;
-
- DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, pScreen->x, pScreen->y);
-
- /* Send an event for the root reconfigure */
- e.u.u.type = ConfigureNotify;
- e.u.configureNotify.window = pRoot->drawable.id;
- e.u.configureNotify.aboveSibling = None;
- e.u.configureNotify.x = x - sx;
- e.u.configureNotify.y = y - sy;
- e.u.configureNotify.width = width;
- e.u.configureNotify.height = height;
- e.u.configureNotify.borderWidth = wBorderWidth(pRoot);
- e.u.configureNotify.override = pRoot->overrideRedirect;
- DeliverEvents(pRoot, &e, 1, NullWindow);
-
- quartzProcs->UpdateScreen(pScreen);
-
- /* Tell RandR about the new size, so new connections get the correct info */
- RRScreenSizeNotify(pScreen);
-}
-
-static void pokeActivityCallback(CFRunLoopTimerRef timer, void *info) {
- UpdateSystemActivity(OverallAct);
-}
-
-static void QuartzScreenSaver(int state) {
- static CFRunLoopTimerRef pokeActivityTimer = NULL;
- static CFRunLoopTimerContext pokeActivityContext = { 0, NULL, NULL, NULL, NULL };
- static pthread_mutex_t pokeActivityMutex = PTHREAD_MUTEX_INITIALIZER;
-
- pthread_mutex_lock(&pokeActivityMutex);
-
- if(state) {
- if(pokeActivityTimer == NULL)
- goto QuartzScreenSaverEnd;
-
- CFRunLoopTimerInvalidate(pokeActivityTimer);
- CFRelease(pokeActivityTimer);
- pokeActivityTimer = NULL;
- } else {
- if(pokeActivityTimer != NULL)
- goto QuartzScreenSaverEnd;
-
- pokeActivityTimer = CFRunLoopTimerCreate(NULL, CFAbsoluteTimeGetCurrent(), 30, 0, 0, pokeActivityCallback, &pokeActivityContext);
- if(pokeActivityTimer == NULL) {
- ErrorF("Unable to create pokeActivityTimer.\n");
- goto QuartzScreenSaverEnd;
- }
-
- CFRunLoopAddTimer(CFRunLoopGetMain(), pokeActivityTimer, kCFRunLoopCommonModes);
- }
-QuartzScreenSaverEnd:
- pthread_mutex_unlock(&pokeActivityMutex);
-}
-
-void QuartzShowFullscreen(int state) {
- int i;
-
- DEBUG_LOG("QuartzShowFullscreen: state=%d\n", state);
-
- if(XQuartzIsRootless) {
- ErrorF("QuartzShowFullscreen called while in rootless mode.\n");
- return;
- }
-
- QuartzScreenSaver(!state);
-
- if(XQuartzFullscreenVisible == state)
- return;
-
- XQuartzFullscreenVisible = state;
-
- xp_disable_update ();
-
- if (!XQuartzFullscreenVisible)
- RootlessHideAllWindows();
-
- RootlessUpdateRooted(XQuartzFullscreenVisible);
-
- if (XQuartzFullscreenVisible) {
- RootlessShowAllWindows ();
- for (i=0; i < screenInfo.numScreens; i++) {
- ScreenPtr pScreen = screenInfo.screens[i];
- RootlessRepositionWindows(pScreen);
- // JH: I don't think this is necessary, but keeping it here as a reminder
- //RootlessUpdateScreenPixmap(pScreen);
- }
- }
-
- /* Somehow the menubar manages to interfere with our event stream
- * in fullscreen mode, even though it's not visible.
- */
- X11ApplicationShowHideMenubar(!XQuartzFullscreenVisible);
-
- xp_reenable_update ();
-
- if (XQuartzFullscreenDisableHotkeys)
- xp_disable_hot_keys(XQuartzFullscreenVisible);
-}
-
-void QuartzSetRootless(Bool state) {
- DEBUG_LOG("QuartzSetRootless state=%d\n", state);
-
- if(XQuartzIsRootless == state)
- return;
-
- if(state)
- QuartzShowFullscreen(FALSE);
-
- XQuartzIsRootless = state;
-
- xp_disable_update();
-
- /* When in rootless, the menubar is not part of the screen, so we need to update our screens on toggle */
- QuartzUpdateScreens();
-
- if(XQuartzIsRootless) {
- RootlessShowAllWindows();
- } else {
- RootlessHideAllWindows();
- }
-
- X11ApplicationShowHideMenubar(TRUE);
-
- xp_reenable_update();
-
- xp_disable_hot_keys(FALSE);
-}
-
-/*
- * QuartzShow
- * Show the X server on screen. Does nothing if already shown.
- * Calls mode specific screen resume to restore the X clip regions
- * (if needed) and the X server cursor state.
- */
-void QuartzShow(void) {
- int i;
-
- if (XQuartzServerVisible)
- return;
-
- XQuartzServerVisible = TRUE;
- for (i = 0; i < screenInfo.numScreens; i++) {
- if (screenInfo.screens[i]) {
- quartzProcs->ResumeScreen(screenInfo.screens[i]);
- }
- }
-
- if (!XQuartzIsRootless)
- QuartzShowFullscreen(TRUE);
-}
-
-
-/*
- * QuartzHide
- * Remove the X server display from the screen. Does nothing if already
- * hidden. Calls mode specific screen suspend to set X clip regions to
- * prevent drawing (if needed) and restore the Aqua cursor.
- */
-void QuartzHide(void)
-{
- int i;
-
- if (XQuartzServerVisible) {
- for (i = 0; i < screenInfo.numScreens; i++) {
- if (screenInfo.screens[i]) {
- quartzProcs->SuspendScreen(screenInfo.screens[i]);
- }
- }
- }
-
- if(!XQuartzIsRootless)
- QuartzShowFullscreen(FALSE);
- XQuartzServerVisible = FALSE;
-}
-
-
-/*
- * QuartzSetRootClip
- * Enable or disable rendering to the X screen.
- */
-void QuartzSetRootClip(
- BOOL enable)
-{
- int i;
-
- if (!XQuartzServerVisible)
- return;
-
- for (i = 0; i < screenInfo.numScreens; i++) {
- if (screenInfo.screens[i]) {
- xf86SetRootClip(screenInfo.screens[i], enable);
- }
- }
-}
-
-/*
- * QuartzSpaceChanged
- * Unmap offscreen windows, map onscreen windows
- */
-void QuartzSpaceChanged(uint32_t space_id) {
- /* Do something special here, so we don't depend on quartz-wm for spaces to work... */
- DEBUG_LOG("Space Changed (%u) ... do something interesting...\n", space_id);
-}
-
-/*
- * QuartzCopyDisplayIDs
- * Associate an X11 screen with one or more CoreGraphics display IDs by copying
- * the list into a private array. Free the previously copied array, if present.
- */
-void QuartzCopyDisplayIDs(ScreenPtr pScreen,
- int displayCount, CGDirectDisplayID *displayIDs) {
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- int size = displayCount * sizeof(CGDirectDisplayID);
-
- free(pQuartzScreen->displayIDs);
- pQuartzScreen->displayIDs = malloc(size);
- memcpy(pQuartzScreen->displayIDs, displayIDs, size);
- pQuartzScreen->displayCount = displayCount;
-}
-
-void NSBeep(void);
-void DDXRingBell(
- int volume, // volume is % of max
- int pitch, // pitch is Hz
- int duration) // duration is milliseconds
-{
- if (volume)
- NSBeep();
-}
+/*
+ *
+ * Quartz-specific support for the Darwin X Server
+ *
+ * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#include "sanitizedCarbon.h"
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "quartzCommon.h"
+#include "quartzRandR.h"
+#include "inputstr.h"
+#include "quartz.h"
+#include "darwin.h"
+#include "darwinEvents.h"
+#include "pseudoramiX.h"
+#define _APPLEWM_SERVER_
+#include "applewmExt.h"
+
+#include "X11Application.h"
+
+#include <X11/extensions/applewmconst.h>
+
+// X headers
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include "colormapst.h"
+#include "globals.h"
+#include "mi.h"
+
+// System headers
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <IOKit/pwr_mgt/IOPMLib.h>
+#include <pthread.h>
+#include <signal.h>
+
+#include <rootlessCommon.h>
+#include <Xplugin.h>
+
+DevPrivateKeyRec quartzScreenKeyRec;
+int aquaMenuBarHeight = 0;
+QuartzModeProcsPtr quartzProcs = NULL;
+const char *quartzOpenGLBundle = NULL;
+
+Bool XQuartzFullscreenDisableHotkeys = TRUE;
+Bool XQuartzOptionSendsAlt = FALSE;
+Bool XQuartzEnableKeyEquivalents = TRUE;
+Bool XQuartzFullscreenVisible = FALSE;
+Bool XQuartzRootlessDefault = TRUE;
+Bool XQuartzIsRootless = TRUE;
+Bool XQuartzServerVisible = FALSE;
+Bool XQuartzFullscreenMenu = FALSE;
+
+int32_t XQuartzShieldingWindowLevel = 0;
+
+/*
+===========================================================================
+
+ Screen functions
+
+===========================================================================
+*/
+
+/*
+ * QuartzAddScreen
+ * Do mode dependent initialization of each screen for Quartz.
+ */
+Bool QuartzAddScreen(
+ int index,
+ ScreenPtr pScreen)
+{
+ // allocate space for private per screen Quartz specific storage
+ QuartzScreenPtr displayInfo = calloc(sizeof(QuartzScreenRec), 1);
+
+ // QUARTZ_PRIV(pScreen) = displayInfo;
+ dixSetPrivate(&pScreen->devPrivates, quartzScreenKey, displayInfo);
+
+ // do Quartz mode specific initialization
+ return quartzProcs->AddScreen(index, pScreen);
+}
+
+
+/*
+ * QuartzSetupScreen
+ * Finalize mode specific setup of each screen.
+ */
+Bool QuartzSetupScreen(
+ int index,
+ ScreenPtr pScreen)
+{
+ // do Quartz mode specific setup
+ if (! quartzProcs->SetupScreen(index, pScreen))
+ return FALSE;
+
+ // setup cursor support
+ if (! quartzProcs->InitCursor(pScreen))
+ return FALSE;
+
+#if defined(RANDR)
+ if(!QuartzRandRInit(pScreen)) {
+ DEBUG_LOG("Failed to init RandR extension.\n");
+ return FALSE;
+ }
+#endif
+
+ return TRUE;
+}
+
+
+/*
+ * QuartzInitOutput
+ * Quartz display initialization.
+ */
+void QuartzInitOutput(
+ int argc,
+ char **argv )
+{
+ /* For XQuartz, we want to just use the default signal handler to work better with CrashTracer */
+ signal(SIGSEGV, SIG_DFL);
+ signal(SIGILL, SIG_DFL);
+#ifdef SIGEMT
+ signal(SIGEMT, SIG_DFL);
+#endif
+ signal(SIGFPE, SIG_DFL);
+#ifdef SIGBUS
+ signal(SIGBUS, SIG_DFL);
+#endif
+#ifdef SIGSYS
+ signal(SIGSYS, SIG_DFL);
+#endif
+#ifdef SIGXCPU
+ signal(SIGXCPU, SIG_DFL);
+#endif
+#ifdef SIGXFSZ
+ signal(SIGXFSZ, SIG_DFL);
+#endif
+
+ if (!RegisterBlockAndWakeupHandlers(QuartzBlockHandler,
+ QuartzWakeupHandler,
+ NULL))
+ {
+ FatalError("Could not register block and wakeup handlers.");
+ }
+
+ if (!dixRegisterPrivateKey(&quartzScreenKeyRec, PRIVATE_SCREEN, 0))
+ FatalError("Failed to alloc quartz screen private.\n");
+
+ // Do display mode specific initialization
+ quartzProcs->DisplayInit();
+}
+
+
+/*
+ * QuartzInitInput
+ * Inform the main thread the X server is ready to handle events.
+ */
+void QuartzInitInput(
+ int argc,
+ char **argv )
+{
+ X11ApplicationSetCanQuit(0);
+ X11ApplicationServerReady();
+ // Do final display mode specific initialization before handling events
+ if (quartzProcs->InitInput)
+ quartzProcs->InitInput(argc, argv);
+}
+
+
+void QuartzUpdateScreens(void) {
+ ScreenPtr pScreen;
+ WindowPtr pRoot;
+ int x, y, width, height, sx, sy;
+ xEvent e;
+ BoxRec bounds;
+
+ if (noPseudoramiXExtension || screenInfo.numScreens != 1)
+ {
+ /* FIXME: if not using Xinerama, we have multiple screens, and
+ to do this properly may need to add or remove screens. Which
+ isn't possible. So don't do anything. Another reason why
+ we default to running with Xinerama. */
+
+ return;
+ }
+
+ pScreen = screenInfo.screens[0];
+
+ PseudoramiXResetScreens();
+ quartzProcs->AddPseudoramiXScreens(&x, &y, &width, &height, pScreen);
+
+ pScreen->x = x;
+ pScreen->y = y;
+ pScreen->mmWidth = pScreen->mmWidth * ((double) width / pScreen->width);
+ pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height);
+ pScreen->width = width;
+ pScreen->height = height;
+
+ DarwinAdjustScreenOrigins(&screenInfo);
+
+ /* DarwinAdjustScreenOrigins or UpdateScreen may change pScreen->x/y,
+ * so use it rather than x/y
+ */
+ sx = pScreen->x + darwinMainScreenX;
+ sy = pScreen->y + darwinMainScreenY;
+
+ /* Adjust the root window. */
+ pRoot = pScreen->root;
+ AppleWMSetScreenOrigin(pRoot);
+ pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
+
+ miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
+
+ /* <rdar://problem/7770779> pointer events are clipped to old display region after display reconfiguration
+ * http://xquartz.macosforge.org/trac/ticket/346
+ */
+ bounds.x1 = 0;
+ bounds.x2 = width;
+ bounds.y1 = 0;
+ bounds.y2 = height;
+ pScreen->ConstrainCursor(inputInfo.pointer, pScreen, &bounds);
+ inputInfo.pointer->spriteInfo->sprite->physLimits = bounds;
+ inputInfo.pointer->spriteInfo->sprite->hotLimits = bounds;
+
+ DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, pScreen->x, pScreen->y);
+
+ /* Send an event for the root reconfigure */
+ e.u.u.type = ConfigureNotify;
+ e.u.configureNotify.window = pRoot->drawable.id;
+ e.u.configureNotify.aboveSibling = None;
+ e.u.configureNotify.x = x - sx;
+ e.u.configureNotify.y = y - sy;
+ e.u.configureNotify.width = width;
+ e.u.configureNotify.height = height;
+ e.u.configureNotify.borderWidth = wBorderWidth(pRoot);
+ e.u.configureNotify.override = pRoot->overrideRedirect;
+ DeliverEvents(pRoot, &e, 1, NullWindow);
+
+ quartzProcs->UpdateScreen(pScreen);
+
+ /* Tell RandR about the new size, so new connections get the correct info */
+ RRScreenSizeNotify(pScreen);
+}
+
+static void pokeActivityCallback(CFRunLoopTimerRef timer, void *info) {
+ UpdateSystemActivity(OverallAct);
+}
+
+static void QuartzScreenSaver(int state) {
+ static CFRunLoopTimerRef pokeActivityTimer = NULL;
+ static CFRunLoopTimerContext pokeActivityContext = { 0, NULL, NULL, NULL, NULL };
+ static pthread_mutex_t pokeActivityMutex = PTHREAD_MUTEX_INITIALIZER;
+
+ pthread_mutex_lock(&pokeActivityMutex);
+
+ if(state) {
+ if(pokeActivityTimer == NULL)
+ goto QuartzScreenSaverEnd;
+
+ CFRunLoopTimerInvalidate(pokeActivityTimer);
+ CFRelease(pokeActivityTimer);
+ pokeActivityTimer = NULL;
+ } else {
+ if(pokeActivityTimer != NULL)
+ goto QuartzScreenSaverEnd;
+
+ pokeActivityTimer = CFRunLoopTimerCreate(NULL, CFAbsoluteTimeGetCurrent(), 30, 0, 0, pokeActivityCallback, &pokeActivityContext);
+ if(pokeActivityTimer == NULL) {
+ ErrorF("Unable to create pokeActivityTimer.\n");
+ goto QuartzScreenSaverEnd;
+ }
+
+ CFRunLoopAddTimer(CFRunLoopGetMain(), pokeActivityTimer, kCFRunLoopCommonModes);
+ }
+QuartzScreenSaverEnd:
+ pthread_mutex_unlock(&pokeActivityMutex);
+}
+
+void QuartzShowFullscreen(int state) {
+ int i;
+
+ DEBUG_LOG("QuartzShowFullscreen: state=%d\n", state);
+
+ if(XQuartzIsRootless) {
+ ErrorF("QuartzShowFullscreen called while in rootless mode.\n");
+ return;
+ }
+
+ QuartzScreenSaver(!state);
+
+ if(XQuartzFullscreenVisible == state)
+ return;
+
+ XQuartzFullscreenVisible = state;
+
+ xp_disable_update ();
+
+ if (!XQuartzFullscreenVisible)
+ RootlessHideAllWindows();
+
+ RootlessUpdateRooted(XQuartzFullscreenVisible);
+
+ if (XQuartzFullscreenVisible) {
+ RootlessShowAllWindows ();
+ for (i=0; i < screenInfo.numScreens; i++) {
+ ScreenPtr pScreen = screenInfo.screens[i];
+ RootlessRepositionWindows(pScreen);
+ // JH: I don't think this is necessary, but keeping it here as a reminder
+ //RootlessUpdateScreenPixmap(pScreen);
+ }
+ }
+
+ /* Somehow the menubar manages to interfere with our event stream
+ * in fullscreen mode, even though it's not visible.
+ */
+ X11ApplicationShowHideMenubar(!XQuartzFullscreenVisible);
+
+ xp_reenable_update ();
+
+ if (XQuartzFullscreenDisableHotkeys)
+ xp_disable_hot_keys(XQuartzFullscreenVisible);
+}
+
+void QuartzSetRootless(Bool state) {
+ DEBUG_LOG("QuartzSetRootless state=%d\n", state);
+
+ if(XQuartzIsRootless == state)
+ return;
+
+ if(state)
+ QuartzShowFullscreen(FALSE);
+
+ XQuartzIsRootless = state;
+
+ xp_disable_update();
+
+ /* When in rootless, the menubar is not part of the screen, so we need to update our screens on toggle */
+ QuartzUpdateScreens();
+
+ if(XQuartzIsRootless) {
+ RootlessShowAllWindows();
+ } else {
+ RootlessHideAllWindows();
+ }
+
+ X11ApplicationShowHideMenubar(TRUE);
+
+ xp_reenable_update();
+
+ xp_disable_hot_keys(FALSE);
+}
+
+/*
+ * QuartzShow
+ * Show the X server on screen. Does nothing if already shown.
+ * Calls mode specific screen resume to restore the X clip regions
+ * (if needed) and the X server cursor state.
+ */
+void QuartzShow(void) {
+ int i;
+
+ if (XQuartzServerVisible)
+ return;
+
+ XQuartzServerVisible = TRUE;
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ if (screenInfo.screens[i]) {
+ quartzProcs->ResumeScreen(screenInfo.screens[i]);
+ }
+ }
+
+ if (!XQuartzIsRootless)
+ QuartzShowFullscreen(TRUE);
+}
+
+
+/*
+ * QuartzHide
+ * Remove the X server display from the screen. Does nothing if already
+ * hidden. Calls mode specific screen suspend to set X clip regions to
+ * prevent drawing (if needed) and restore the Aqua cursor.
+ */
+void QuartzHide(void)
+{
+ int i;
+
+ if (XQuartzServerVisible) {
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ if (screenInfo.screens[i]) {
+ quartzProcs->SuspendScreen(screenInfo.screens[i]);
+ }
+ }
+ }
+
+ if(!XQuartzIsRootless)
+ QuartzShowFullscreen(FALSE);
+ XQuartzServerVisible = FALSE;
+}
+
+
+/*
+ * QuartzSetRootClip
+ * Enable or disable rendering to the X screen.
+ */
+void QuartzSetRootClip(
+ BOOL enable)
+{
+ int i;
+
+ if (!XQuartzServerVisible)
+ return;
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ if (screenInfo.screens[i]) {
+ xf86SetRootClip(screenInfo.screens[i], enable);
+ }
+ }
+}
+
+/*
+ * QuartzSpaceChanged
+ * Unmap offscreen windows, map onscreen windows
+ */
+void QuartzSpaceChanged(uint32_t space_id) {
+ /* Do something special here, so we don't depend on quartz-wm for spaces to work... */
+ DEBUG_LOG("Space Changed (%u) ... do something interesting...\n", space_id);
+}
+
+/*
+ * QuartzCopyDisplayIDs
+ * Associate an X11 screen with one or more CoreGraphics display IDs by copying
+ * the list into a private array. Free the previously copied array, if present.
+ */
+void QuartzCopyDisplayIDs(ScreenPtr pScreen,
+ int displayCount, CGDirectDisplayID *displayIDs) {
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+ int size = displayCount * sizeof(CGDirectDisplayID);
+
+ free(pQuartzScreen->displayIDs);
+ pQuartzScreen->displayIDs = malloc(size);
+ memcpy(pQuartzScreen->displayIDs, displayIDs, size);
+ pQuartzScreen->displayCount = displayCount;
+}
+
+void NSBeep(void);
+void DDXRingBell(
+ int volume, // volume is % of max
+ int pitch, // pitch is Hz
+ int duration) // duration is milliseconds
+{
+ if (volume)
+ NSBeep();
+}
diff --git a/xorg-server/hw/xquartz/quartz.h b/xorg-server/hw/xquartz/quartz.h
index 67a7919b2..d520c1dcb 100644
--- a/xorg-server/hw/xquartz/quartz.h
+++ b/xorg-server/hw/xquartz/quartz.h
@@ -1,147 +1,147 @@
-/*
- * quartz.h
- *
- * External interface of the Quartz display modes seen by the generic, mode
- * independent parts of the Darwin X server.
- *
- * Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifndef _QUARTZ_H
-#define _QUARTZ_H
-
-#include "screenint.h"
-#include "window.h"
-#include "pixmap.h"
-
-/*------------------------------------------
- Quartz display mode function types
- ------------------------------------------*/
-
-/*
- * Display mode initialization
- */
-typedef void (*DisplayInitProc)(void);
-typedef Bool (*AddScreenProc)(int index, ScreenPtr pScreen);
-typedef Bool (*SetupScreenProc)(int index, ScreenPtr pScreen);
-typedef void (*InitInputProc)(int argc, char **argv);
-
-/*
- * Cursor functions
- */
-typedef Bool (*InitCursorProc)(ScreenPtr pScreen);
-
-/*
- * Suspend and resume X11 activity
- */
-typedef void (*SuspendScreenProc)(ScreenPtr pScreen);
-typedef void (*ResumeScreenProc)(ScreenPtr pScreen);
-
-/*
- * Screen state change support
- */
-typedef void (*AddPseudoramiXScreensProc)
- (int *x, int *y, int *width, int *height, ScreenPtr pScreen);
-typedef void (*UpdateScreenProc)(ScreenPtr pScreen);
-
-/*
- * Rootless helper functions
- */
-typedef Bool (*IsX11WindowProc)(void *nsWindow, int windowNumber);
-typedef void (*HideWindowsProc)(Bool hide);
-
-/*
- * Rootless functions for optional export to GLX layer
- */
-typedef void * (*FrameForWindowProc)(WindowPtr pWin, Bool create);
-typedef WindowPtr (*TopLevelParentProc)(WindowPtr pWindow);
-typedef Bool (*CreateSurfaceProc)
- (ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable,
- unsigned int client_id, unsigned int *surface_id,
- unsigned int key[2], void (*notify) (void *arg, void *data),
- void *notify_data);
-typedef Bool (*DestroySurfaceProc)
- (ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable,
- void (*notify) (void *arg, void *data), void *notify_data);
-
-/*
- * Quartz display mode function list
- */
-typedef struct _QuartzModeProcs {
- DisplayInitProc DisplayInit;
- AddScreenProc AddScreen;
- SetupScreenProc SetupScreen;
- InitInputProc InitInput;
-
- InitCursorProc InitCursor;
-
- SuspendScreenProc SuspendScreen;
- ResumeScreenProc ResumeScreen;
-
- AddPseudoramiXScreensProc AddPseudoramiXScreens;
- UpdateScreenProc UpdateScreen;
-
- IsX11WindowProc IsX11Window;
- HideWindowsProc HideWindows;
-
- FrameForWindowProc FrameForWindow;
- TopLevelParentProc TopLevelParent;
- CreateSurfaceProc CreateSurface;
- DestroySurfaceProc DestroySurface;
-} QuartzModeProcsRec, *QuartzModeProcsPtr;
-
-extern QuartzModeProcsPtr quartzProcs;
-
-extern Bool XQuartzFullscreenVisible; /* Are the windows visible (predicated on !rootless) */
-extern Bool XQuartzServerVisible; /* Is the server visible ... TODO: Refactor to "active" */
-extern Bool XQuartzEnableKeyEquivalents;
-extern Bool XQuartzRootlessDefault; /* Is our default mode rootless? */
-extern Bool XQuartzIsRootless; /* Is our current mode rootless (or FS)? */
-extern Bool XQuartzFullscreenMenu; /* Show the menu bar (autohide) while in FS */
-extern Bool XQuartzFullscreenDisableHotkeys;
-extern Bool XQuartzOptionSendsAlt; /* Alt or Mode_switch? */
-
-extern int32_t XQuartzShieldingWindowLevel; /* CGShieldingWindowLevel() or 0 */
-
-Bool QuartzAddScreen(int index, ScreenPtr pScreen);
-Bool QuartzSetupScreen(int index, ScreenPtr pScreen);
-void QuartzInitOutput(int argc,char **argv);
-void QuartzInitInput(int argc, char **argv);
-void QuartzInitServer(int argc, char **argv, char **envp);
-void QuartzGiveUp(void);
-void QuartzProcessEvent(xEvent *xe);
-void QuartzUpdateScreens(void);
-
-void QuartzShow(void);
-void QuartzHide(void);
-void QuartzSetRootClip(BOOL enable);
-void QuartzSpaceChanged(uint32_t space_id);
-
-void QuartzSetRootless(Bool state);
-void QuartzShowFullscreen(Bool state);
-
-int server_main(int argc, char **argv, char **envp);
-#endif
+/*
+ * quartz.h
+ *
+ * External interface of the Quartz display modes seen by the generic, mode
+ * independent parts of the Darwin X server.
+ *
+ * Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifndef _QUARTZ_H
+#define _QUARTZ_H
+
+#include "screenint.h"
+#include "window.h"
+#include "pixmap.h"
+
+/*------------------------------------------
+ Quartz display mode function types
+ ------------------------------------------*/
+
+/*
+ * Display mode initialization
+ */
+typedef void (*DisplayInitProc)(void);
+typedef Bool (*AddScreenProc)(int index, ScreenPtr pScreen);
+typedef Bool (*SetupScreenProc)(int index, ScreenPtr pScreen);
+typedef void (*InitInputProc)(int argc, char **argv);
+
+/*
+ * Cursor functions
+ */
+typedef Bool (*InitCursorProc)(ScreenPtr pScreen);
+
+/*
+ * Suspend and resume X11 activity
+ */
+typedef void (*SuspendScreenProc)(ScreenPtr pScreen);
+typedef void (*ResumeScreenProc)(ScreenPtr pScreen);
+
+/*
+ * Screen state change support
+ */
+typedef void (*AddPseudoramiXScreensProc)
+ (int *x, int *y, int *width, int *height, ScreenPtr pScreen);
+typedef void (*UpdateScreenProc)(ScreenPtr pScreen);
+
+/*
+ * Rootless helper functions
+ */
+typedef Bool (*IsX11WindowProc)(void *nsWindow, int windowNumber);
+typedef void (*HideWindowsProc)(Bool hide);
+
+/*
+ * Rootless functions for optional export to GLX layer
+ */
+typedef void * (*FrameForWindowProc)(WindowPtr pWin, Bool create);
+typedef WindowPtr (*TopLevelParentProc)(WindowPtr pWindow);
+typedef Bool (*CreateSurfaceProc)
+ (ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable,
+ unsigned int client_id, unsigned int *surface_id,
+ unsigned int key[2], void (*notify) (void *arg, void *data),
+ void *notify_data);
+typedef Bool (*DestroySurfaceProc)
+ (ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable,
+ void (*notify) (void *arg, void *data), void *notify_data);
+
+/*
+ * Quartz display mode function list
+ */
+typedef struct _QuartzModeProcs {
+ DisplayInitProc DisplayInit;
+ AddScreenProc AddScreen;
+ SetupScreenProc SetupScreen;
+ InitInputProc InitInput;
+
+ InitCursorProc InitCursor;
+
+ SuspendScreenProc SuspendScreen;
+ ResumeScreenProc ResumeScreen;
+
+ AddPseudoramiXScreensProc AddPseudoramiXScreens;
+ UpdateScreenProc UpdateScreen;
+
+ IsX11WindowProc IsX11Window;
+ HideWindowsProc HideWindows;
+
+ FrameForWindowProc FrameForWindow;
+ TopLevelParentProc TopLevelParent;
+ CreateSurfaceProc CreateSurface;
+ DestroySurfaceProc DestroySurface;
+} QuartzModeProcsRec, *QuartzModeProcsPtr;
+
+extern QuartzModeProcsPtr quartzProcs;
+
+extern Bool XQuartzFullscreenVisible; /* Are the windows visible (predicated on !rootless) */
+extern Bool XQuartzServerVisible; /* Is the server visible ... TODO: Refactor to "active" */
+extern Bool XQuartzEnableKeyEquivalents;
+extern Bool XQuartzRootlessDefault; /* Is our default mode rootless? */
+extern Bool XQuartzIsRootless; /* Is our current mode rootless (or FS)? */
+extern Bool XQuartzFullscreenMenu; /* Show the menu bar (autohide) while in FS */
+extern Bool XQuartzFullscreenDisableHotkeys;
+extern Bool XQuartzOptionSendsAlt; /* Alt or Mode_switch? */
+
+extern int32_t XQuartzShieldingWindowLevel; /* CGShieldingWindowLevel() or 0 */
+
+Bool QuartzAddScreen(int index, ScreenPtr pScreen);
+Bool QuartzSetupScreen(int index, ScreenPtr pScreen);
+void QuartzInitOutput(int argc,char **argv);
+void QuartzInitInput(int argc, char **argv);
+void QuartzInitServer(int argc, char **argv, char **envp);
+void QuartzGiveUp(void);
+void QuartzProcessEvent(xEvent *xe);
+void QuartzUpdateScreens(void);
+
+void QuartzShow(void);
+void QuartzHide(void);
+void QuartzSetRootClip(BOOL enable);
+void QuartzSpaceChanged(uint32_t space_id);
+
+void QuartzSetRootless(Bool state);
+void QuartzShowFullscreen(Bool state);
+
+int server_main(int argc, char **argv, char **envp);
+#endif
diff --git a/xorg-server/hw/xquartz/quartzRandR.c b/xorg-server/hw/xquartz/quartzRandR.c
index 05641a65d..54e099c06 100644
--- a/xorg-server/hw/xquartz/quartzRandR.c
+++ b/xorg-server/hw/xquartz/quartzRandR.c
@@ -1,570 +1,570 @@
-/*
- * Quartz-specific support for the XRandR extension
- *
- * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons,
- * 2010 Jan Hauffa.
- * 2010 Apple Inc.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include "sanitizedCarbon.h"
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "quartzCommon.h"
-#include "quartzRandR.h"
-#include "quartz.h"
-#include "darwin.h"
-
-#include "X11Application.h"
-
-#include <AvailabilityMacros.h>
-
-#include <X11/extensions/randr.h>
-#include <randrstr.h>
-#include <IOKit/graphics/IOGraphicsTypes.h>
-
-/* TODO: UGLY, find a better way!
- * We want to ignore kXquartzDisplayChanged which are generated by us
- */
-static Bool ignore_next_fake_mode_update = FALSE;
-
-#define FAKE_REFRESH_ROOTLESS 1
-#define FAKE_REFRESH_FULLSCREEN 2
-
-#define DEFAULT_REFRESH 60
-#define kDisplayModeUsableFlags (kDisplayModeValidFlag | kDisplayModeSafeFlag)
-
-#define CALLBACK_SUCCESS 0
-#define CALLBACK_CONTINUE 1
-#define CALLBACK_ERROR -1
-
-typedef int (*QuartzModeCallback)
- (ScreenPtr, QuartzModeInfoPtr, void *);
-
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-
-static long getDictLong (CFDictionaryRef dictRef, CFStringRef key) {
- long value;
-
- CFNumberRef numRef = (CFNumberRef) CFDictionaryGetValue(dictRef, key);
- if (!numRef)
- return 0;
-
- if (!CFNumberGetValue(numRef, kCFNumberLongType, &value))
- return 0;
- return value;
-}
-
-static double getDictDouble (CFDictionaryRef dictRef, CFStringRef key) {
- double value;
-
- CFNumberRef numRef = (CFNumberRef) CFDictionaryGetValue(dictRef, key);
- if (!numRef)
- return 0.0;
-
- if (!CFNumberGetValue(numRef, kCFNumberDoubleType, &value))
- return 0.0;
- return value;
-}
-
-static void QuartzRandRGetModeInfo (CFDictionaryRef modeRef,
- QuartzModeInfoPtr pMode) {
- pMode->width = (size_t) getDictLong(modeRef, kCGDisplayWidth);
- pMode->height = (size_t) getDictLong(modeRef, kCGDisplayHeight);
- pMode->refresh = (int)(getDictDouble(modeRef, kCGDisplayRefreshRate) + 0.5);
- if (pMode->refresh == 0)
- pMode->refresh = DEFAULT_REFRESH;
- pMode->ref = NULL;
- pMode->pSize = NULL;
-}
-
-static Bool QuartzRandRCopyCurrentModeInfo (CGDirectDisplayID screenId,
- QuartzModeInfoPtr pMode) {
- CFDictionaryRef curModeRef = CGDisplayCurrentMode(screenId);
- if (!curModeRef)
- return FALSE;
-
- QuartzRandRGetModeInfo(curModeRef, pMode);
- pMode->ref = (void *)curModeRef;
- CFRetain(pMode->ref);
- return TRUE;
-}
-
-static Bool QuartzRandRSetCGMode (CGDirectDisplayID screenId,
- QuartzModeInfoPtr pMode) {
- CFDictionaryRef modeRef = (CFDictionaryRef) pMode->ref;
- return (CGDisplaySwitchToMode(screenId, modeRef) == kCGErrorSuccess);
-}
-
-static Bool QuartzRandREnumerateModes (ScreenPtr pScreen,
- QuartzModeCallback callback,
- void *data) {
- CFDictionaryRef curModeRef, modeRef;
- long curBpp;
- CFArrayRef modes;
- QuartzModeInfo modeInfo;
- int i;
- BOOL retval = FALSE;
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
-
- curModeRef = CGDisplayCurrentMode(screenId);
- if (!curModeRef)
- return FALSE;
- curBpp = getDictLong(curModeRef, kCGDisplayBitsPerPixel);
-
- modes = CGDisplayAvailableModes(screenId);
- if (!modes)
- return FALSE;
- for (i = 0; i < CFArrayGetCount(modes); i++) {
- int cb;
- modeRef = (CFDictionaryRef) CFArrayGetValueAtIndex(modes, i);
-
- /* Skip modes that are not usable on the current display or have a
- different pixel encoding than the current mode. */
- if (((unsigned long) getDictLong(modeRef, kCGDisplayIOFlags) &
- kDisplayModeUsableFlags) != kDisplayModeUsableFlags)
- continue;
- if (getDictLong(modeRef, kCGDisplayBitsPerPixel) != curBpp)
- continue;
-
- QuartzRandRGetModeInfo(modeRef, &modeInfo);
- modeInfo.ref = (void *)modeRef;
- cb = callback(pScreen, &modeInfo, data);
- if (cb == CALLBACK_CONTINUE)
- retval = TRUE;
- else if (cb == CALLBACK_SUCCESS)
- return TRUE;
- else if (cb == CALLBACK_ERROR)
- return FALSE;
- }
-
- switch(callback(pScreen, &pQuartzScreen->rootlessMode, data)) {
- case CALLBACK_SUCCESS:
- return TRUE;
- case CALLBACK_ERROR:
- return FALSE;
- case CALLBACK_CONTINUE:
- retval = TRUE;
- default:
- break;
- }
-
- switch(callback(pScreen, &pQuartzScreen->fullscreenMode, data)) {
- case CALLBACK_SUCCESS:
- return TRUE;
- case CALLBACK_ERROR:
- return FALSE;
- case CALLBACK_CONTINUE:
- retval = TRUE;
- default:
- break;
- }
-
- return retval;
-}
-
-#else /* we have the new CG APIs from Snow Leopard */
-
-static void QuartzRandRGetModeInfo (CGDisplayModeRef modeRef,
- QuartzModeInfoPtr pMode) {
- pMode->width = CGDisplayModeGetWidth(modeRef);
- pMode->height = CGDisplayModeGetHeight(modeRef);
- pMode->refresh = (int) (CGDisplayModeGetRefreshRate(modeRef) + 0.5);
- if (pMode->refresh == 0)
- pMode->refresh = DEFAULT_REFRESH;
- pMode->ref = NULL;
- pMode->pSize = NULL;
-}
-
-static Bool QuartzRandRCopyCurrentModeInfo (CGDirectDisplayID screenId,
- QuartzModeInfoPtr pMode) {
- CGDisplayModeRef curModeRef = CGDisplayCopyDisplayMode(screenId);
- if (!curModeRef)
- return FALSE;
-
- QuartzRandRGetModeInfo(curModeRef, pMode);
- pMode->ref = curModeRef;
- return TRUE;
-}
-
-static Bool QuartzRandRSetCGMode (CGDirectDisplayID screenId,
- QuartzModeInfoPtr pMode) {
- CGDisplayModeRef modeRef = (CGDisplayModeRef) pMode->ref;
- if (!modeRef)
- return FALSE;
-
- return (CGDisplaySetDisplayMode(screenId, modeRef, NULL) == kCGErrorSuccess);
-}
-
-static Bool QuartzRandREnumerateModes (ScreenPtr pScreen,
- QuartzModeCallback callback,
- void *data) {
- CGDisplayModeRef curModeRef, modeRef;
- CFStringRef curPixelEnc, pixelEnc;
- CFComparisonResult pixelEncEqual;
- CFArrayRef modes;
- QuartzModeInfo modeInfo;
- int i;
- Bool retval = FALSE;
-
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
-
- curModeRef = CGDisplayCopyDisplayMode(screenId);
- if (!curModeRef)
- return FALSE;
- curPixelEnc = CGDisplayModeCopyPixelEncoding(curModeRef);
- CGDisplayModeRelease(curModeRef);
-
- modes = CGDisplayCopyAllDisplayModes(screenId, NULL);
- if (!modes) {
- CFRelease(curPixelEnc);
- return FALSE;
- }
- for (i = 0; i < CFArrayGetCount(modes); i++) {
- int cb;
- modeRef = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i);
-
- /* Skip modes that are not usable on the current display or have a
- different pixel encoding than the current mode. */
- if ((CGDisplayModeGetIOFlags(modeRef) & kDisplayModeUsableFlags) !=
- kDisplayModeUsableFlags)
- continue;
- pixelEnc = CGDisplayModeCopyPixelEncoding(modeRef);
- pixelEncEqual = CFStringCompare(pixelEnc, curPixelEnc, 0);
- CFRelease(pixelEnc);
- if (pixelEncEqual != kCFCompareEqualTo)
- continue;
-
- QuartzRandRGetModeInfo(modeRef, &modeInfo);
- modeInfo.ref = modeRef;
- cb = callback(pScreen, &modeInfo, data);
- if (cb == CALLBACK_CONTINUE) {
- retval = TRUE;
- } else if (cb == CALLBACK_SUCCESS) {
- CFRelease(modes);
- CFRelease(curPixelEnc);
- return TRUE;
- } else if (cb == CALLBACK_ERROR) {
- CFRelease(modes);
- CFRelease(curPixelEnc);
- return FALSE;
- }
- }
-
- CFRelease(modes);
- CFRelease(curPixelEnc);
-
- switch(callback(pScreen, &pQuartzScreen->rootlessMode, data)) {
- case CALLBACK_SUCCESS:
- return TRUE;
- case CALLBACK_ERROR:
- return FALSE;
- case CALLBACK_CONTINUE:
- retval = TRUE;
- default:
- break;
- }
-
- switch(callback(pScreen, &pQuartzScreen->fullscreenMode, data)) {
- case CALLBACK_SUCCESS:
- return TRUE;
- case CALLBACK_ERROR:
- return FALSE;
- case CALLBACK_CONTINUE:
- retval = TRUE;
- default:
- break;
- }
-
- return retval;
-}
-
-#endif /* Snow Leopard CoreGraphics APIs */
-
-
-static Bool QuartzRandRModesEqual (QuartzModeInfoPtr pMode1,
- QuartzModeInfoPtr pMode2) {
- return (pMode1->width == pMode2->width) &&
- (pMode1->height == pMode2->height) &&
- (pMode1->refresh == pMode2->refresh);
-}
-
-static Bool QuartzRandRRegisterMode (ScreenPtr pScreen,
- QuartzModeInfoPtr pMode) {
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- Bool isCurrentMode = QuartzRandRModesEqual(&pQuartzScreen->currentMode, pMode);
-
- /* TODO: DPI */
- pMode->pSize = RRRegisterSize(pScreen, pMode->width, pMode->height, pScreen->mmWidth, pScreen->mmHeight);
- if (pMode->pSize) {
- //DEBUG_LOG("registering: %d x %d @ %d %s\n", (int)pMode->width, (int)pMode->height, (int)pMode->refresh, isCurrentMode ? "*" : "");
- RRRegisterRate(pScreen, pMode->pSize, pMode->refresh);
-
- if (isCurrentMode)
- RRSetCurrentConfig(pScreen, RR_Rotate_0, pMode->refresh, pMode->pSize);
-
- return TRUE;
- }
- return FALSE;
-}
-
-static int QuartzRandRRegisterModeCallback (ScreenPtr pScreen,
- QuartzModeInfoPtr pMode,
- void *data __unused) {
- if(QuartzRandRRegisterMode(pScreen, pMode)) {
- return CALLBACK_CONTINUE;
- } else {
- return CALLBACK_ERROR;
- }
-}
-
-static Bool QuartzRandRSetMode(ScreenPtr pScreen, QuartzModeInfoPtr pMode, BOOL doRegister) {
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
- Bool captureDisplay = (pMode->refresh != FAKE_REFRESH_FULLSCREEN && pMode->refresh != FAKE_REFRESH_ROOTLESS);
-
- if(XQuartzShieldingWindowLevel == 0 && captureDisplay) {
- if(!X11ApplicationCanEnterRandR())
- return FALSE;
- CGCaptureAllDisplays();
- XQuartzShieldingWindowLevel = CGShieldingWindowLevel(); // 2147483630
- DEBUG_LOG("Display captured. ShieldWindowID: %u, Shield level: %d\n",
- CGShieldingWindowID(screenId), XQuartzShieldingWindowLevel);
- }
-
- if (pQuartzScreen->currentMode.ref && CFEqual(pMode->ref, pQuartzScreen->currentMode.ref)) {
- DEBUG_LOG("Requested RandR resolution matches current CG mode\n");
- } if (QuartzRandRSetCGMode(screenId, pMode)) {
- ignore_next_fake_mode_update = TRUE;
- } else {
- DEBUG_LOG("Error while requesting CG resolution change.\n");
- return FALSE;
- }
-
- /* If the client requested the fake rootless mode, switch to rootless.
- * Otherwise, force fullscreen mode.
- */
- QuartzSetRootless(pMode->refresh == FAKE_REFRESH_ROOTLESS);
- if (pMode->refresh != FAKE_REFRESH_ROOTLESS) {
- QuartzShowFullscreen(TRUE);
- }
-
- if(pQuartzScreen->currentMode.ref)
- CFRelease(pQuartzScreen->currentMode.ref);
- pQuartzScreen->currentMode = *pMode;
- CFRetain(pQuartzScreen->currentMode.ref);
-
- if(XQuartzShieldingWindowLevel != 0 && !captureDisplay) {
- CGReleaseAllDisplays();
- XQuartzShieldingWindowLevel = 0;
- }
-
- return TRUE;
-}
-
-static int QuartzRandRSetModeCallback (ScreenPtr pScreen,
- QuartzModeInfoPtr pMode,
- void *data) {
- QuartzModeInfoPtr pReqMode = (QuartzModeInfoPtr) data;
-
- if (!QuartzRandRModesEqual(pMode, pReqMode))
- return CALLBACK_CONTINUE; /* continue enumeration */
-
- DEBUG_LOG("Found a match for requested RandR resolution (%dx%d@%d).\n", (int)pMode->width, (int)pMode->height, (int)pMode->refresh);
-
- if(QuartzRandRSetMode(pScreen, pMode, FALSE))
- return CALLBACK_SUCCESS;
- else
- return CALLBACK_ERROR;
-}
-
-static Bool QuartzRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) {
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
-
- *rotations = RR_Rotate_0; /* TODO: support rotation */
-
- if (pQuartzScreen->displayCount == 0)
- return FALSE;
-
- return QuartzRandREnumerateModes(pScreen, QuartzRandRRegisterModeCallback, NULL);
-}
-
-static Bool QuartzRandRSetConfig (ScreenPtr pScreen,
- Rotation randr,
- int rate,
- RRScreenSizePtr pSize) {
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- QuartzModeInfo reqMode;
-
- reqMode.width = pSize->width;
- reqMode.height = pSize->height;
- reqMode.refresh = rate;
-
- if (pQuartzScreen->displayCount == 0)
- return FALSE;
-
- /* Do not switch modes if requested mode is equal to current mode. */
- if (QuartzRandRModesEqual(&reqMode, &pQuartzScreen->currentMode))
- return TRUE;
-
- if (QuartzRandREnumerateModes(pScreen, QuartzRandRSetModeCallback, &reqMode)) {
- return TRUE;
- }
-
- DEBUG_LOG("Unable to find a matching config: %d x %d @ %d\n", (int)reqMode.width, (int)reqMode.height, (int)reqMode.refresh);
- return FALSE;
-}
-
-static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
-
- if(pQuartzScreen->fullscreenMode.ref)
- CFRelease(pQuartzScreen->fullscreenMode.ref);
- if(pQuartzScreen->currentMode.ref)
- CFRelease(pQuartzScreen->currentMode.ref);
-
- if (!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0],
- &pQuartzScreen->fullscreenMode))
- return FALSE;
-
- if (pQuartzScreen->displayCount > 1) {
- pQuartzScreen->fullscreenMode.width = pScreen->width;
- pQuartzScreen->fullscreenMode.height = pScreen->height;
- if(XQuartzIsRootless)
- pQuartzScreen->fullscreenMode.height += aquaMenuBarHeight;
- }
-
- pQuartzScreen->fullscreenMode.refresh = FAKE_REFRESH_FULLSCREEN;
-
- pQuartzScreen->rootlessMode = pQuartzScreen->fullscreenMode;
- pQuartzScreen->rootlessMode.refresh = FAKE_REFRESH_ROOTLESS;
- pQuartzScreen->rootlessMode.height -= aquaMenuBarHeight;
-
- if(XQuartzIsRootless) {
- pQuartzScreen->currentMode = pQuartzScreen->rootlessMode;
- } else {
- pQuartzScreen->currentMode = pQuartzScreen->fullscreenMode;
- }
-
- /* This extra retain is for currentMode's copy.
- * fullscreen and rootless share a retain.
- */
- CFRetain(pQuartzScreen->currentMode.ref);
-
- DEBUG_LOG("rootlessMode: %d x %d\n", (int)pQuartzScreen->rootlessMode.width, (int)pQuartzScreen->rootlessMode.height);
- DEBUG_LOG("fullscreenMode: %d x %d\n", (int)pQuartzScreen->fullscreenMode.width, (int)pQuartzScreen->fullscreenMode.height);
- DEBUG_LOG("currentMode: %d x %d\n", (int)pQuartzScreen->currentMode.width, (int)pQuartzScreen->currentMode.height);
-
- return TRUE;
-}
-
-Bool QuartzRandRUpdateFakeModes (BOOL force_update) {
- ScreenPtr pScreen = screenInfo.screens[0];
-
- if(ignore_next_fake_mode_update) {
- DEBUG_LOG("Ignoring update request caused by RandR resolution change.\n");
- ignore_next_fake_mode_update = FALSE;
- return TRUE;
- }
-
- if(!_QuartzRandRUpdateFakeModes(pScreen))
- return FALSE;
-
- if(force_update)
- RRGetInfo(pScreen, TRUE);
-
- return TRUE;
-}
-
-Bool QuartzRandRInit (ScreenPtr pScreen) {
- rrScrPrivPtr pScrPriv;
-
- if (!RRScreenInit (pScreen)) return FALSE;
- if (!_QuartzRandRUpdateFakeModes (pScreen)) return FALSE;
-
- pScrPriv = rrGetScrPriv(pScreen);
- pScrPriv->rrGetInfo = QuartzRandRGetInfo;
- pScrPriv->rrSetConfig = QuartzRandRSetConfig;
- return TRUE;
-}
-
-void QuartzRandRSetFakeRootless (void) {
- int i;
-
- DEBUG_LOG("QuartzRandRSetFakeRootless called.\n");
-
- for (i=0; i < screenInfo.numScreens; i++) {
- ScreenPtr pScreen = screenInfo.screens[i];
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
-
- QuartzRandRSetMode(pScreen, &pQuartzScreen->rootlessMode, TRUE);
- }
-}
-
-void QuartzRandRSetFakeFullscreen (BOOL state) {
- int i;
-
- DEBUG_LOG("QuartzRandRSetFakeFullscreen called.\n");
-
- for (i=0; i < screenInfo.numScreens; i++) {
- ScreenPtr pScreen = screenInfo.screens[i];
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
-
- QuartzRandRSetMode(pScreen, &pQuartzScreen->fullscreenMode, TRUE);
- }
-
- QuartzShowFullscreen(state);
-}
-
-/* Toggle fullscreen mode. If "fake" fullscreen is the current mode,
- * this will just show/hide the X11 windows. If we are in a RandR fullscreen
- * mode, this will toggles us to the default fake mode and hide windows if
- * it is fullscreen
- */
-void QuartzRandRToggleFullscreen (void) {
- ScreenPtr pScreen = screenInfo.screens[0];
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
-
- if (pQuartzScreen->currentMode.ref == NULL) {
- ErrorF("Ignoring QuartzRandRToggleFullscreen because don't have a current mode set.\n");
- } else if (pQuartzScreen->currentMode.refresh == FAKE_REFRESH_ROOTLESS) {
- ErrorF("Ignoring QuartzRandRToggleFullscreen because we are in rootless mode.\n");
- } else if (pQuartzScreen->currentMode.refresh == FAKE_REFRESH_FULLSCREEN) {
- /* Legacy fullscreen mode. Hide/Show */
- QuartzShowFullscreen(!XQuartzFullscreenVisible);
- } else {
- /* RandR fullscreen mode. Return to default mode and hide if it is fullscreen. */
- if(XQuartzRootlessDefault) {
- QuartzRandRSetFakeRootless();
- } else {
- QuartzRandRSetFakeFullscreen(FALSE);
- }
- }
-}
+/*
+ * Quartz-specific support for the XRandR extension
+ *
+ * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons,
+ * 2010 Jan Hauffa.
+ * 2010 Apple Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#include "sanitizedCarbon.h"
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "quartzCommon.h"
+#include "quartzRandR.h"
+#include "quartz.h"
+#include "darwin.h"
+
+#include "X11Application.h"
+
+#include <AvailabilityMacros.h>
+
+#include <X11/extensions/randr.h>
+#include <randrstr.h>
+#include <IOKit/graphics/IOGraphicsTypes.h>
+
+/* TODO: UGLY, find a better way!
+ * We want to ignore kXquartzDisplayChanged which are generated by us
+ */
+static Bool ignore_next_fake_mode_update = FALSE;
+
+#define FAKE_REFRESH_ROOTLESS 1
+#define FAKE_REFRESH_FULLSCREEN 2
+
+#define DEFAULT_REFRESH 60
+#define kDisplayModeUsableFlags (kDisplayModeValidFlag | kDisplayModeSafeFlag)
+
+#define CALLBACK_SUCCESS 0
+#define CALLBACK_CONTINUE 1
+#define CALLBACK_ERROR -1
+
+typedef int (*QuartzModeCallback)
+ (ScreenPtr, QuartzModeInfoPtr, void *);
+
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+
+static long getDictLong (CFDictionaryRef dictRef, CFStringRef key) {
+ long value;
+
+ CFNumberRef numRef = (CFNumberRef) CFDictionaryGetValue(dictRef, key);
+ if (!numRef)
+ return 0;
+
+ if (!CFNumberGetValue(numRef, kCFNumberLongType, &value))
+ return 0;
+ return value;
+}
+
+static double getDictDouble (CFDictionaryRef dictRef, CFStringRef key) {
+ double value;
+
+ CFNumberRef numRef = (CFNumberRef) CFDictionaryGetValue(dictRef, key);
+ if (!numRef)
+ return 0.0;
+
+ if (!CFNumberGetValue(numRef, kCFNumberDoubleType, &value))
+ return 0.0;
+ return value;
+}
+
+static void QuartzRandRGetModeInfo (CFDictionaryRef modeRef,
+ QuartzModeInfoPtr pMode) {
+ pMode->width = (size_t) getDictLong(modeRef, kCGDisplayWidth);
+ pMode->height = (size_t) getDictLong(modeRef, kCGDisplayHeight);
+ pMode->refresh = (int)(getDictDouble(modeRef, kCGDisplayRefreshRate) + 0.5);
+ if (pMode->refresh == 0)
+ pMode->refresh = DEFAULT_REFRESH;
+ pMode->ref = NULL;
+ pMode->pSize = NULL;
+}
+
+static Bool QuartzRandRCopyCurrentModeInfo (CGDirectDisplayID screenId,
+ QuartzModeInfoPtr pMode) {
+ CFDictionaryRef curModeRef = CGDisplayCurrentMode(screenId);
+ if (!curModeRef)
+ return FALSE;
+
+ QuartzRandRGetModeInfo(curModeRef, pMode);
+ pMode->ref = (void *)curModeRef;
+ CFRetain(pMode->ref);
+ return TRUE;
+}
+
+static Bool QuartzRandRSetCGMode (CGDirectDisplayID screenId,
+ QuartzModeInfoPtr pMode) {
+ CFDictionaryRef modeRef = (CFDictionaryRef) pMode->ref;
+ return (CGDisplaySwitchToMode(screenId, modeRef) == kCGErrorSuccess);
+}
+
+static Bool QuartzRandREnumerateModes (ScreenPtr pScreen,
+ QuartzModeCallback callback,
+ void *data) {
+ CFDictionaryRef curModeRef, modeRef;
+ long curBpp;
+ CFArrayRef modes;
+ QuartzModeInfo modeInfo;
+ int i;
+ BOOL retval = FALSE;
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+ CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
+
+ curModeRef = CGDisplayCurrentMode(screenId);
+ if (!curModeRef)
+ return FALSE;
+ curBpp = getDictLong(curModeRef, kCGDisplayBitsPerPixel);
+
+ modes = CGDisplayAvailableModes(screenId);
+ if (!modes)
+ return FALSE;
+ for (i = 0; i < CFArrayGetCount(modes); i++) {
+ int cb;
+ modeRef = (CFDictionaryRef) CFArrayGetValueAtIndex(modes, i);
+
+ /* Skip modes that are not usable on the current display or have a
+ different pixel encoding than the current mode. */
+ if (((unsigned long) getDictLong(modeRef, kCGDisplayIOFlags) &
+ kDisplayModeUsableFlags) != kDisplayModeUsableFlags)
+ continue;
+ if (getDictLong(modeRef, kCGDisplayBitsPerPixel) != curBpp)
+ continue;
+
+ QuartzRandRGetModeInfo(modeRef, &modeInfo);
+ modeInfo.ref = (void *)modeRef;
+ cb = callback(pScreen, &modeInfo, data);
+ if (cb == CALLBACK_CONTINUE)
+ retval = TRUE;
+ else if (cb == CALLBACK_SUCCESS)
+ return TRUE;
+ else if (cb == CALLBACK_ERROR)
+ return FALSE;
+ }
+
+ switch(callback(pScreen, &pQuartzScreen->rootlessMode, data)) {
+ case CALLBACK_SUCCESS:
+ return TRUE;
+ case CALLBACK_ERROR:
+ return FALSE;
+ case CALLBACK_CONTINUE:
+ retval = TRUE;
+ default:
+ break;
+ }
+
+ switch(callback(pScreen, &pQuartzScreen->fullscreenMode, data)) {
+ case CALLBACK_SUCCESS:
+ return TRUE;
+ case CALLBACK_ERROR:
+ return FALSE;
+ case CALLBACK_CONTINUE:
+ retval = TRUE;
+ default:
+ break;
+ }
+
+ return retval;
+}
+
+#else /* we have the new CG APIs from Snow Leopard */
+
+static void QuartzRandRGetModeInfo (CGDisplayModeRef modeRef,
+ QuartzModeInfoPtr pMode) {
+ pMode->width = CGDisplayModeGetWidth(modeRef);
+ pMode->height = CGDisplayModeGetHeight(modeRef);
+ pMode->refresh = (int) (CGDisplayModeGetRefreshRate(modeRef) + 0.5);
+ if (pMode->refresh == 0)
+ pMode->refresh = DEFAULT_REFRESH;
+ pMode->ref = NULL;
+ pMode->pSize = NULL;
+}
+
+static Bool QuartzRandRCopyCurrentModeInfo (CGDirectDisplayID screenId,
+ QuartzModeInfoPtr pMode) {
+ CGDisplayModeRef curModeRef = CGDisplayCopyDisplayMode(screenId);
+ if (!curModeRef)
+ return FALSE;
+
+ QuartzRandRGetModeInfo(curModeRef, pMode);
+ pMode->ref = curModeRef;
+ return TRUE;
+}
+
+static Bool QuartzRandRSetCGMode (CGDirectDisplayID screenId,
+ QuartzModeInfoPtr pMode) {
+ CGDisplayModeRef modeRef = (CGDisplayModeRef) pMode->ref;
+ if (!modeRef)
+ return FALSE;
+
+ return (CGDisplaySetDisplayMode(screenId, modeRef, NULL) == kCGErrorSuccess);
+}
+
+static Bool QuartzRandREnumerateModes (ScreenPtr pScreen,
+ QuartzModeCallback callback,
+ void *data) {
+ CGDisplayModeRef curModeRef, modeRef;
+ CFStringRef curPixelEnc, pixelEnc;
+ CFComparisonResult pixelEncEqual;
+ CFArrayRef modes;
+ QuartzModeInfo modeInfo;
+ int i;
+ Bool retval = FALSE;
+
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+ CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
+
+ curModeRef = CGDisplayCopyDisplayMode(screenId);
+ if (!curModeRef)
+ return FALSE;
+ curPixelEnc = CGDisplayModeCopyPixelEncoding(curModeRef);
+ CGDisplayModeRelease(curModeRef);
+
+ modes = CGDisplayCopyAllDisplayModes(screenId, NULL);
+ if (!modes) {
+ CFRelease(curPixelEnc);
+ return FALSE;
+ }
+ for (i = 0; i < CFArrayGetCount(modes); i++) {
+ int cb;
+ modeRef = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i);
+
+ /* Skip modes that are not usable on the current display or have a
+ different pixel encoding than the current mode. */
+ if ((CGDisplayModeGetIOFlags(modeRef) & kDisplayModeUsableFlags) !=
+ kDisplayModeUsableFlags)
+ continue;
+ pixelEnc = CGDisplayModeCopyPixelEncoding(modeRef);
+ pixelEncEqual = CFStringCompare(pixelEnc, curPixelEnc, 0);
+ CFRelease(pixelEnc);
+ if (pixelEncEqual != kCFCompareEqualTo)
+ continue;
+
+ QuartzRandRGetModeInfo(modeRef, &modeInfo);
+ modeInfo.ref = modeRef;
+ cb = callback(pScreen, &modeInfo, data);
+ if (cb == CALLBACK_CONTINUE) {
+ retval = TRUE;
+ } else if (cb == CALLBACK_SUCCESS) {
+ CFRelease(modes);
+ CFRelease(curPixelEnc);
+ return TRUE;
+ } else if (cb == CALLBACK_ERROR) {
+ CFRelease(modes);
+ CFRelease(curPixelEnc);
+ return FALSE;
+ }
+ }
+
+ CFRelease(modes);
+ CFRelease(curPixelEnc);
+
+ switch(callback(pScreen, &pQuartzScreen->rootlessMode, data)) {
+ case CALLBACK_SUCCESS:
+ return TRUE;
+ case CALLBACK_ERROR:
+ return FALSE;
+ case CALLBACK_CONTINUE:
+ retval = TRUE;
+ default:
+ break;
+ }
+
+ switch(callback(pScreen, &pQuartzScreen->fullscreenMode, data)) {
+ case CALLBACK_SUCCESS:
+ return TRUE;
+ case CALLBACK_ERROR:
+ return FALSE;
+ case CALLBACK_CONTINUE:
+ retval = TRUE;
+ default:
+ break;
+ }
+
+ return retval;
+}
+
+#endif /* Snow Leopard CoreGraphics APIs */
+
+
+static Bool QuartzRandRModesEqual (QuartzModeInfoPtr pMode1,
+ QuartzModeInfoPtr pMode2) {
+ return (pMode1->width == pMode2->width) &&
+ (pMode1->height == pMode2->height) &&
+ (pMode1->refresh == pMode2->refresh);
+}
+
+static Bool QuartzRandRRegisterMode (ScreenPtr pScreen,
+ QuartzModeInfoPtr pMode) {
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+ Bool isCurrentMode = QuartzRandRModesEqual(&pQuartzScreen->currentMode, pMode);
+
+ /* TODO: DPI */
+ pMode->pSize = RRRegisterSize(pScreen, pMode->width, pMode->height, pScreen->mmWidth, pScreen->mmHeight);
+ if (pMode->pSize) {
+ //DEBUG_LOG("registering: %d x %d @ %d %s\n", (int)pMode->width, (int)pMode->height, (int)pMode->refresh, isCurrentMode ? "*" : "");
+ RRRegisterRate(pScreen, pMode->pSize, pMode->refresh);
+
+ if (isCurrentMode)
+ RRSetCurrentConfig(pScreen, RR_Rotate_0, pMode->refresh, pMode->pSize);
+
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static int QuartzRandRRegisterModeCallback (ScreenPtr pScreen,
+ QuartzModeInfoPtr pMode,
+ void *data __unused) {
+ if(QuartzRandRRegisterMode(pScreen, pMode)) {
+ return CALLBACK_CONTINUE;
+ } else {
+ return CALLBACK_ERROR;
+ }
+}
+
+static Bool QuartzRandRSetMode(ScreenPtr pScreen, QuartzModeInfoPtr pMode, BOOL doRegister) {
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+ CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
+ Bool captureDisplay = (pMode->refresh != FAKE_REFRESH_FULLSCREEN && pMode->refresh != FAKE_REFRESH_ROOTLESS);
+
+ if(XQuartzShieldingWindowLevel == 0 && captureDisplay) {
+ if(!X11ApplicationCanEnterRandR())
+ return FALSE;
+ CGCaptureAllDisplays();
+ XQuartzShieldingWindowLevel = CGShieldingWindowLevel(); // 2147483630
+ DEBUG_LOG("Display captured. ShieldWindowID: %u, Shield level: %d\n",
+ CGShieldingWindowID(screenId), XQuartzShieldingWindowLevel);
+ }
+
+ if (pQuartzScreen->currentMode.ref && CFEqual(pMode->ref, pQuartzScreen->currentMode.ref)) {
+ DEBUG_LOG("Requested RandR resolution matches current CG mode\n");
+ } if (QuartzRandRSetCGMode(screenId, pMode)) {
+ ignore_next_fake_mode_update = TRUE;
+ } else {
+ DEBUG_LOG("Error while requesting CG resolution change.\n");
+ return FALSE;
+ }
+
+ /* If the client requested the fake rootless mode, switch to rootless.
+ * Otherwise, force fullscreen mode.
+ */
+ QuartzSetRootless(pMode->refresh == FAKE_REFRESH_ROOTLESS);
+ if (pMode->refresh != FAKE_REFRESH_ROOTLESS) {
+ QuartzShowFullscreen(TRUE);
+ }
+
+ if(pQuartzScreen->currentMode.ref)
+ CFRelease(pQuartzScreen->currentMode.ref);
+ pQuartzScreen->currentMode = *pMode;
+ CFRetain(pQuartzScreen->currentMode.ref);
+
+ if(XQuartzShieldingWindowLevel != 0 && !captureDisplay) {
+ CGReleaseAllDisplays();
+ XQuartzShieldingWindowLevel = 0;
+ }
+
+ return TRUE;
+}
+
+static int QuartzRandRSetModeCallback (ScreenPtr pScreen,
+ QuartzModeInfoPtr pMode,
+ void *data) {
+ QuartzModeInfoPtr pReqMode = (QuartzModeInfoPtr) data;
+
+ if (!QuartzRandRModesEqual(pMode, pReqMode))
+ return CALLBACK_CONTINUE; /* continue enumeration */
+
+ DEBUG_LOG("Found a match for requested RandR resolution (%dx%d@%d).\n", (int)pMode->width, (int)pMode->height, (int)pMode->refresh);
+
+ if(QuartzRandRSetMode(pScreen, pMode, FALSE))
+ return CALLBACK_SUCCESS;
+ else
+ return CALLBACK_ERROR;
+}
+
+static Bool QuartzRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) {
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+
+ *rotations = RR_Rotate_0; /* TODO: support rotation */
+
+ if (pQuartzScreen->displayCount == 0)
+ return FALSE;
+
+ return QuartzRandREnumerateModes(pScreen, QuartzRandRRegisterModeCallback, NULL);
+}
+
+static Bool QuartzRandRSetConfig (ScreenPtr pScreen,
+ Rotation randr,
+ int rate,
+ RRScreenSizePtr pSize) {
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+ QuartzModeInfo reqMode;
+
+ reqMode.width = pSize->width;
+ reqMode.height = pSize->height;
+ reqMode.refresh = rate;
+
+ if (pQuartzScreen->displayCount == 0)
+ return FALSE;
+
+ /* Do not switch modes if requested mode is equal to current mode. */
+ if (QuartzRandRModesEqual(&reqMode, &pQuartzScreen->currentMode))
+ return TRUE;
+
+ if (QuartzRandREnumerateModes(pScreen, QuartzRandRSetModeCallback, &reqMode)) {
+ return TRUE;
+ }
+
+ DEBUG_LOG("Unable to find a matching config: %d x %d @ %d\n", (int)reqMode.width, (int)reqMode.height, (int)reqMode.refresh);
+ return FALSE;
+}
+
+static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+
+ if(pQuartzScreen->fullscreenMode.ref)
+ CFRelease(pQuartzScreen->fullscreenMode.ref);
+ if(pQuartzScreen->currentMode.ref)
+ CFRelease(pQuartzScreen->currentMode.ref);
+
+ if (!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0],
+ &pQuartzScreen->fullscreenMode))
+ return FALSE;
+
+ if (pQuartzScreen->displayCount > 1) {
+ pQuartzScreen->fullscreenMode.width = pScreen->width;
+ pQuartzScreen->fullscreenMode.height = pScreen->height;
+ if(XQuartzIsRootless)
+ pQuartzScreen->fullscreenMode.height += aquaMenuBarHeight;
+ }
+
+ pQuartzScreen->fullscreenMode.refresh = FAKE_REFRESH_FULLSCREEN;
+
+ pQuartzScreen->rootlessMode = pQuartzScreen->fullscreenMode;
+ pQuartzScreen->rootlessMode.refresh = FAKE_REFRESH_ROOTLESS;
+ pQuartzScreen->rootlessMode.height -= aquaMenuBarHeight;
+
+ if(XQuartzIsRootless) {
+ pQuartzScreen->currentMode = pQuartzScreen->rootlessMode;
+ } else {
+ pQuartzScreen->currentMode = pQuartzScreen->fullscreenMode;
+ }
+
+ /* This extra retain is for currentMode's copy.
+ * fullscreen and rootless share a retain.
+ */
+ CFRetain(pQuartzScreen->currentMode.ref);
+
+ DEBUG_LOG("rootlessMode: %d x %d\n", (int)pQuartzScreen->rootlessMode.width, (int)pQuartzScreen->rootlessMode.height);
+ DEBUG_LOG("fullscreenMode: %d x %d\n", (int)pQuartzScreen->fullscreenMode.width, (int)pQuartzScreen->fullscreenMode.height);
+ DEBUG_LOG("currentMode: %d x %d\n", (int)pQuartzScreen->currentMode.width, (int)pQuartzScreen->currentMode.height);
+
+ return TRUE;
+}
+
+Bool QuartzRandRUpdateFakeModes (BOOL force_update) {
+ ScreenPtr pScreen = screenInfo.screens[0];
+
+ if(ignore_next_fake_mode_update) {
+ DEBUG_LOG("Ignoring update request caused by RandR resolution change.\n");
+ ignore_next_fake_mode_update = FALSE;
+ return TRUE;
+ }
+
+ if(!_QuartzRandRUpdateFakeModes(pScreen))
+ return FALSE;
+
+ if(force_update)
+ RRGetInfo(pScreen, TRUE);
+
+ return TRUE;
+}
+
+Bool QuartzRandRInit (ScreenPtr pScreen) {
+ rrScrPrivPtr pScrPriv;
+
+ if (!RRScreenInit (pScreen)) return FALSE;
+ if (!_QuartzRandRUpdateFakeModes (pScreen)) return FALSE;
+
+ pScrPriv = rrGetScrPriv(pScreen);
+ pScrPriv->rrGetInfo = QuartzRandRGetInfo;
+ pScrPriv->rrSetConfig = QuartzRandRSetConfig;
+ return TRUE;
+}
+
+void QuartzRandRSetFakeRootless (void) {
+ int i;
+
+ DEBUG_LOG("QuartzRandRSetFakeRootless called.\n");
+
+ for (i=0; i < screenInfo.numScreens; i++) {
+ ScreenPtr pScreen = screenInfo.screens[i];
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+
+ QuartzRandRSetMode(pScreen, &pQuartzScreen->rootlessMode, TRUE);
+ }
+}
+
+void QuartzRandRSetFakeFullscreen (BOOL state) {
+ int i;
+
+ DEBUG_LOG("QuartzRandRSetFakeFullscreen called.\n");
+
+ for (i=0; i < screenInfo.numScreens; i++) {
+ ScreenPtr pScreen = screenInfo.screens[i];
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+
+ QuartzRandRSetMode(pScreen, &pQuartzScreen->fullscreenMode, TRUE);
+ }
+
+ QuartzShowFullscreen(state);
+}
+
+/* Toggle fullscreen mode. If "fake" fullscreen is the current mode,
+ * this will just show/hide the X11 windows. If we are in a RandR fullscreen
+ * mode, this will toggles us to the default fake mode and hide windows if
+ * it is fullscreen
+ */
+void QuartzRandRToggleFullscreen (void) {
+ ScreenPtr pScreen = screenInfo.screens[0];
+ QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+
+ if (pQuartzScreen->currentMode.ref == NULL) {
+ ErrorF("Ignoring QuartzRandRToggleFullscreen because don't have a current mode set.\n");
+ } else if (pQuartzScreen->currentMode.refresh == FAKE_REFRESH_ROOTLESS) {
+ ErrorF("Ignoring QuartzRandRToggleFullscreen because we are in rootless mode.\n");
+ } else if (pQuartzScreen->currentMode.refresh == FAKE_REFRESH_FULLSCREEN) {
+ /* Legacy fullscreen mode. Hide/Show */
+ QuartzShowFullscreen(!XQuartzFullscreenVisible);
+ } else {
+ /* RandR fullscreen mode. Return to default mode and hide if it is fullscreen. */
+ if(XQuartzRootlessDefault) {
+ QuartzRandRSetFakeRootless();
+ } else {
+ QuartzRandRSetFakeFullscreen(FALSE);
+ }
+ }
+}
diff --git a/xorg-server/hw/xquartz/xpr/xprAppleWM.c b/xorg-server/hw/xquartz/xpr/xprAppleWM.c
index 21e6f98fa..1e99a07dc 100644
--- a/xorg-server/hw/xquartz/xpr/xprAppleWM.c
+++ b/xorg-server/hw/xquartz/xpr/xprAppleWM.c
@@ -1,162 +1,162 @@
-/*
- * Xplugin rootless implementation functions for AppleWM extension
- *
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
- * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "xpr.h"
-
-#include <X11/extensions/applewmproto.h>
-
-#include "applewmExt.h"
-#include "rootless.h"
-#include "rootlessCommon.h"
-#include <Xplugin.h>
-#include <X11/X.h>
-#include "quartz.h"
-#include "x-hash.h"
-
-static int xprSetWindowLevel(
- WindowPtr pWin,
- int level)
-{
- xp_window_id wid;
- xp_window_changes wc;
- RootlessWindowRec *winRec;
-
- // AppleWMNumWindowLevels is allowed, but is only set by the server
- // for the root window.
- if (level < 0 || level >= AppleWMNumWindowLevels) {
- return BadValue;
- }
-
- wid = x_cvt_vptr_to_uint(RootlessFrameForWindow (pWin, TRUE));
- if (wid == 0)
- return BadWindow;
-
- RootlessStopDrawing (pWin, FALSE);
- winRec = WINREC(pWin);
-
- if(!winRec)
- return BadWindow;
-
- if(XQuartzIsRootless)
- wc.window_level = normal_window_levels[level];
- else if(XQuartzShieldingWindowLevel)
- wc.window_level = XQuartzShieldingWindowLevel + 1;
- else
- wc.window_level = rooted_window_levels[level];
-
- if (xp_configure_window (wid, XP_WINDOW_LEVEL, &wc) != Success) {
- return BadValue;
- }
-
- winRec->level = level;
-
- return Success;
-}
-
-#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 3
-static int xprAttachTransient(WindowPtr pWinChild, WindowPtr pWinParent) {
- xp_window_id child_wid, parent_wid;
- xp_window_changes wc;
-
- child_wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWinChild, TRUE));
- if (child_wid == 0)
- return BadWindow;
-
- if(pWinParent) {
- parent_wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWinParent, TRUE));
- if (parent_wid == 0)
- return BadWindow;
- } else {
- parent_wid = 0;
- }
-
- wc.transient_for = parent_wid;
-
- RootlessStopDrawing (pWinChild, FALSE);
-
- if (xp_configure_window(child_wid, XP_ATTACH_TRANSIENT, &wc) != Success) {
- return BadValue;
- }
-
- return Success;
-}
-#endif
-
-static int xprFrameDraw(
- WindowPtr pWin,
- int class,
- unsigned int attr,
- const BoxRec *outer,
- const BoxRec *inner,
- unsigned int title_len,
- const unsigned char *title_bytes)
-{
- xp_window_id wid;
-
- wid = x_cvt_vptr_to_uint(RootlessFrameForWindow (pWin, FALSE));
- if (wid == 0)
- return BadWindow;
-
- if (xp_frame_draw (wid, class, attr, outer, inner,
- title_len, title_bytes) != Success)
- {
- return BadValue;
- }
-
- return Success;
-}
-
-static AppleWMProcsRec xprAppleWMProcs = {
- xp_disable_update,
- xp_reenable_update,
- xprSetWindowLevel,
- xp_frame_get_rect,
- xp_frame_hit_test,
- xprFrameDraw,
-#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 3
- xp_set_dock_proxy,
- xprAttachTransient
-#elif defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 2
- xp_set_dock_proxy,
- NULL
-#else
- NULL,
- NULL
-#endif
-};
-
-
-void xprAppleWMInit(void)
-{
- AppleWMExtensionInit(&xprAppleWMProcs);
-}
+/*
+ * Xplugin rootless implementation functions for AppleWM extension
+ *
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "xpr.h"
+
+#include <X11/extensions/applewmproto.h>
+
+#include "applewmExt.h"
+#include "rootless.h"
+#include "rootlessCommon.h"
+#include <Xplugin.h>
+#include <X11/X.h>
+#include "quartz.h"
+#include "x-hash.h"
+
+static int xprSetWindowLevel(
+ WindowPtr pWin,
+ int level)
+{
+ xp_window_id wid;
+ xp_window_changes wc;
+ RootlessWindowRec *winRec;
+
+ // AppleWMNumWindowLevels is allowed, but is only set by the server
+ // for the root window.
+ if (level < 0 || level >= AppleWMNumWindowLevels) {
+ return BadValue;
+ }
+
+ wid = x_cvt_vptr_to_uint(RootlessFrameForWindow (pWin, TRUE));
+ if (wid == 0)
+ return BadWindow;
+
+ RootlessStopDrawing (pWin, FALSE);
+ winRec = WINREC(pWin);
+
+ if(!winRec)
+ return BadWindow;
+
+ if(XQuartzIsRootless)
+ wc.window_level = normal_window_levels[level];
+ else if(XQuartzShieldingWindowLevel)
+ wc.window_level = XQuartzShieldingWindowLevel + 1;
+ else
+ wc.window_level = rooted_window_levels[level];
+
+ if (xp_configure_window (wid, XP_WINDOW_LEVEL, &wc) != Success) {
+ return BadValue;
+ }
+
+ winRec->level = level;
+
+ return Success;
+}
+
+#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 3
+static int xprAttachTransient(WindowPtr pWinChild, WindowPtr pWinParent) {
+ xp_window_id child_wid, parent_wid;
+ xp_window_changes wc;
+
+ child_wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWinChild, TRUE));
+ if (child_wid == 0)
+ return BadWindow;
+
+ if(pWinParent) {
+ parent_wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWinParent, TRUE));
+ if (parent_wid == 0)
+ return BadWindow;
+ } else {
+ parent_wid = 0;
+ }
+
+ wc.transient_for = parent_wid;
+
+ RootlessStopDrawing (pWinChild, FALSE);
+
+ if (xp_configure_window(child_wid, XP_ATTACH_TRANSIENT, &wc) != Success) {
+ return BadValue;
+ }
+
+ return Success;
+}
+#endif
+
+static int xprFrameDraw(
+ WindowPtr pWin,
+ int class,
+ unsigned int attr,
+ const BoxRec *outer,
+ const BoxRec *inner,
+ unsigned int title_len,
+ const unsigned char *title_bytes)
+{
+ xp_window_id wid;
+
+ wid = x_cvt_vptr_to_uint(RootlessFrameForWindow (pWin, FALSE));
+ if (wid == 0)
+ return BadWindow;
+
+ if (xp_frame_draw (wid, class, attr, outer, inner,
+ title_len, title_bytes) != Success)
+ {
+ return BadValue;
+ }
+
+ return Success;
+}
+
+static AppleWMProcsRec xprAppleWMProcs = {
+ xp_disable_update,
+ xp_reenable_update,
+ xprSetWindowLevel,
+ xp_frame_get_rect,
+ xp_frame_hit_test,
+ xprFrameDraw,
+#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 3
+ xp_set_dock_proxy,
+ xprAttachTransient
+#elif defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 2
+ xp_set_dock_proxy,
+ NULL
+#else
+ NULL,
+ NULL
+#endif
+};
+
+
+void xprAppleWMInit(void)
+{
+ AppleWMExtensionInit(&xprAppleWMProcs);
+}
diff --git a/xorg-server/hw/xquartz/xpr/xprFrame.c b/xorg-server/hw/xquartz/xpr/xprFrame.c
index 15598e942..cddec5ce2 100644
--- a/xorg-server/hw/xquartz/xpr/xprFrame.c
+++ b/xorg-server/hw/xquartz/xpr/xprFrame.c
@@ -1,646 +1,646 @@
-/*
- * Xplugin rootless implementation frame functions
- *
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
- * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "xpr.h"
-#include "rootlessCommon.h"
-#include <Xplugin.h>
-#include "x-hash.h"
-#include "x-list.h"
-#include "applewmExt.h"
-
-#include "propertyst.h"
-#include "dix.h"
-#include <X11/Xatom.h>
-#include "windowstr.h"
-#include "quartz.h"
-
-#include "threadSafety.h"
-
-#include <pthread.h>
-
-#define DEFINE_ATOM_HELPER(func,atom_name) \
-static Atom func (void) { \
- static int generation; \
- static Atom atom; \
- if (generation != serverGeneration) { \
- generation = serverGeneration; \
- atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \
- } \
- return atom; \
-}
-
-DEFINE_ATOM_HELPER(xa_native_window_id, "_NATIVE_WINDOW_ID")
-
-/* Maps xp_window_id -> RootlessWindowRec */
-static x_hash_table *window_hash;
-static pthread_mutex_t window_hash_mutex;
-
-/* Prototypes for static functions */
-static Bool xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
- int newX, int newY, RegionPtr pShape);
-static void xprDestroyFrame(RootlessFrameID wid);
-static void xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY);
-static void xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
- int newX, int newY, unsigned int newW, unsigned int newH,
- unsigned int gravity);
-static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid);
-static void xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape);
-static void xprUnmapFrame(RootlessFrameID wid);
-static void xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow);
-static void xprStopDrawing(RootlessFrameID wid, Bool flush);
-static void xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage);
-static void xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects,
- int shift_x, int shift_y);
-static void xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin);
-static Bool xprDoReorderWindow(RootlessWindowPtr pFrame);
-static void xprHideWindow(RootlessFrameID wid);
-static void xprUpdateColormap(RootlessFrameID wid, ScreenPtr pScreen);
-static void xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
- int dx, int dy);
-
-
-static inline xp_error
-xprConfigureWindow(xp_window_id id, unsigned int mask,
- const xp_window_changes *values)
-{
- TA_SERVER();
-
- return xp_configure_window(id, mask, values);
-}
-
-
-static void
-xprSetNativeProperty(RootlessWindowPtr pFrame)
-{
- xp_error err;
- unsigned int native_id;
- long data;
-
- TA_SERVER();
-
- err = xp_get_native_window(x_cvt_vptr_to_uint(pFrame->wid), &native_id);
- if (err == Success)
- {
- /* FIXME: move this to AppleWM extension */
-
- data = native_id;
- dixChangeWindowProperty(serverClient, pFrame->win, xa_native_window_id(),
- XA_INTEGER, 32, PropModeReplace, 1, &data, TRUE);
- }
-}
-
-static xp_error
-xprColormapCallback(void *data, int first_color, int n_colors, uint32_t *colors)
-{
- return (RootlessResolveColormap (data, first_color, n_colors, colors) ? XP_Success : XP_BadMatch);
-}
-
-/*
- * Create and display a new frame.
- */
-static Bool
-xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
- int newX, int newY, RegionPtr pShape)
-{
- WindowPtr pWin = pFrame->win;
- xp_window_changes wc;
- unsigned int mask = 0;
- xp_error err;
-
- TA_SERVER();
-
- wc.x = newX;
- wc.y = newY;
- wc.width = pFrame->width;
- wc.height = pFrame->height;
- wc.bit_gravity = XP_GRAVITY_NONE;
- mask |= XP_BOUNDS;
-
- if (pWin->drawable.depth == 8)
- {
- wc.depth = XP_DEPTH_INDEX8;
- wc.colormap = xprColormapCallback;
- wc.colormap_data = pScreen;
- mask |= XP_COLORMAP;
- }
- else if (pWin->drawable.depth == 15)
- wc.depth = XP_DEPTH_RGB555;
- else if (pWin->drawable.depth == 24)
- wc.depth = XP_DEPTH_ARGB8888;
- else
- wc.depth = XP_DEPTH_NIL;
- mask |= XP_DEPTH;
-
- if (pShape != NULL)
- {
- wc.shape_nrects = RegionNumRects(pShape);
- wc.shape_rects = RegionRects(pShape);
- wc.shape_tx = wc.shape_ty = 0;
- mask |= XP_SHAPE;
- }
-
- pFrame->level = !IsRoot (pWin) ? AppleWMWindowLevelNormal : AppleWMNumWindowLevels;
-
- if(XQuartzIsRootless)
- wc.window_level = normal_window_levels[pFrame->level];
- else if(XQuartzShieldingWindowLevel)
- wc.window_level = XQuartzShieldingWindowLevel + 1;
- else
- wc.window_level = rooted_window_levels[pFrame->level];
- mask |= XP_WINDOW_LEVEL;
-
- err = xp_create_window(mask, &wc, (xp_window_id *) &pFrame->wid);
-
- if (err != Success)
- {
- return FALSE;
- }
-
- if (window_hash == NULL)
- {
- window_hash = x_hash_table_new(NULL, NULL, NULL, NULL);
- pthread_mutex_init(&window_hash_mutex, NULL);
- }
-
- pthread_mutex_lock(&window_hash_mutex);
- x_hash_table_insert(window_hash, pFrame->wid, pFrame);
- pthread_mutex_unlock(&window_hash_mutex);
-
- xprSetNativeProperty(pFrame);
-
- return TRUE;
-}
-
-
-/*
- * Destroy a frame.
- */
-static void
-xprDestroyFrame(RootlessFrameID wid)
-{
- xp_error err;
- TA_SERVER();
-
- pthread_mutex_lock(&window_hash_mutex);
- x_hash_table_remove(window_hash, wid);
- pthread_mutex_unlock(&window_hash_mutex);
-
- err = xp_destroy_window(x_cvt_vptr_to_uint(wid));
- if (err != Success)
- FatalError("Could not destroy window %i.", (int)x_cvt_vptr_to_uint(wid));
-}
-
-
-/*
- * Move a frame on screen.
- */
-static void
-xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY)
-{
- xp_window_changes wc;
-
- TA_SERVER();
-
- wc.x = newX;
- wc.y = newY;
- // ErrorF("xprMoveFrame(%d, %p, %d, %d)\n", wid, pScreen, newX, newY);
- xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_ORIGIN, &wc);
-}
-
-
-/*
- * Resize and move a frame.
- */
-static void
-xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
- int newX, int newY, unsigned int newW, unsigned int newH,
- unsigned int gravity)
-{
- xp_window_changes wc;
-
- TA_SERVER();
-
- wc.x = newX;
- wc.y = newY;
- wc.width = newW;
- wc.height = newH;
- wc.bit_gravity = gravity;
-
- /* It's unlikely that being async will save us anything here.
- But it can't hurt. */
-
- xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_BOUNDS, &wc);
-}
-
-
-/*
- * Change frame stacking.
- */
-static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) {
- xp_window_changes wc;
- unsigned int mask = XP_STACKING;
-
- TA_SERVER();
-
- /* Stack frame below nextWid it if it exists, or raise
- frame above everything otherwise. */
-
- if(nextWid == NULL) {
- wc.stack_mode = XP_MAPPED_ABOVE;
- wc.sibling = 0;
- } else {
- wc.stack_mode = XP_MAPPED_BELOW;
- wc.sibling = x_cvt_vptr_to_uint(nextWid);
- }
-
- if(window_hash) {
- RootlessWindowRec *winRec = x_hash_table_lookup(window_hash, wid, NULL);
-
- if(winRec) {
- if(XQuartzIsRootless)
- wc.window_level = normal_window_levels[winRec->level];
- else if(XQuartzShieldingWindowLevel)
- wc.window_level = XQuartzShieldingWindowLevel + 1;
- else
- wc.window_level = rooted_window_levels[winRec->level];
- mask |= XP_WINDOW_LEVEL;
- }
- }
-
- xprConfigureWindow(x_cvt_vptr_to_uint(wid), mask, &wc);
-}
-
-
-/*
- * Change the frame's shape.
- */
-static void
-xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape)
-{
- xp_window_changes wc;
-
- TA_SERVER();
-
- if (pShape != NULL)
- {
- wc.shape_nrects = RegionNumRects(pShape);
- wc.shape_rects = RegionRects(pShape);
- }
- else
- {
- wc.shape_nrects = -1;
- wc.shape_rects = NULL;
- }
-
- wc.shape_tx = wc.shape_ty = 0;
-
- xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_SHAPE, &wc);
-}
-
-
-/*
- * Unmap a frame.
- */
-static void
-xprUnmapFrame(RootlessFrameID wid)
-{
- xp_window_changes wc;
-
- TA_SERVER();
-
- wc.stack_mode = XP_UNMAPPED;
- wc.sibling = 0;
-
- xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_STACKING, &wc);
-}
-
-
-/*
- * Start drawing to a frame.
- * Prepare for direct access to its backing buffer.
- */
-static void
-xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
-{
- void *data[2];
- unsigned int rowbytes[2];
- xp_error err;
-
- TA_SERVER();
-
- err = xp_lock_window(x_cvt_vptr_to_uint(wid), NULL, NULL, data, rowbytes, NULL);
- if (err != Success)
- FatalError("Could not lock window %i for drawing.", (int)x_cvt_vptr_to_uint(wid));
-
- *pixelData = data[0];
- *bytesPerRow = rowbytes[0];
-}
-
-
-/*
- * Stop drawing to a frame.
- */
-static void
-xprStopDrawing(RootlessFrameID wid, Bool flush)
-{
- xp_error err;
- TA_SERVER();
-
- err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
- if(err != Success)
- FatalError("Could not unlock window %i after drawing.", (int)x_cvt_vptr_to_uint(wid));
-}
-
-
-/*
- * Flush drawing updates to the screen.
- */
-static void
-xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage)
-{
- TA_SERVER();
-
- xp_flush_window(x_cvt_vptr_to_uint(wid));
-}
-
-
-/*
- * Mark damaged rectangles as requiring redisplay to screen.
- */
-static void
-xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects,
- int shift_x, int shift_y)
-{
- TA_SERVER();
-
- xp_mark_window(x_cvt_vptr_to_uint(wid), nrects, rects, shift_x, shift_y);
-}
-
-
-/*
- * Called after the window associated with a frame has been switched
- * to a new top-level parent.
- */
-static void
-xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin)
-{
- DeleteProperty(serverClient, oldWin, xa_native_window_id());
-
- TA_SERVER();
-
- xprSetNativeProperty(pFrame);
-}
-
-
-/*
- * Called to check if the frame should be reordered when it is restacked.
- */
-static Bool xprDoReorderWindow(RootlessWindowPtr pFrame)
-{
- WindowPtr pWin = pFrame->win;
-
- TA_SERVER();
-
- return AppleWMDoReorderWindow(pWin);
-}
-
-
-/*
- * Copy area in frame to another part of frame.
- * Used to accelerate scrolling.
- */
-static void
-xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
- int dx, int dy)
-{
- TA_SERVER();
-
- xp_copy_window(x_cvt_vptr_to_uint(wid), x_cvt_vptr_to_uint(wid),
- dstNrects, dstRects, dx, dy);
-}
-
-
-static RootlessFrameProcsRec xprRootlessProcs = {
- xprCreateFrame,
- xprDestroyFrame,
- xprMoveFrame,
- xprResizeFrame,
- xprRestackFrame,
- xprReshapeFrame,
- xprUnmapFrame,
- xprStartDrawing,
- xprStopDrawing,
- xprUpdateRegion,
- xprDamageRects,
- xprSwitchWindow,
- xprDoReorderWindow,
- xprHideWindow,
- xprUpdateColormap,
- xp_copy_bytes,
- xprCopyWindow
-};
-
-
-/*
- * Initialize XPR implementation
- */
-Bool
-xprInit(ScreenPtr pScreen)
-{
- RootlessInit(pScreen, &xprRootlessProcs);
-
- TA_SERVER();
-
- rootless_CopyBytes_threshold = xp_copy_bytes_threshold;
- rootless_CopyWindow_threshold = xp_scroll_area_threshold;
-
- return TRUE;
-}
-
-
-/*
- * Given the id of a physical window, try to find the top-level (or root)
- * X window that it represents.
- */
-WindowPtr
-xprGetXWindow(xp_window_id wid)
-{
- RootlessWindowRec *winRec;
-
- if (window_hash == NULL)
- return NULL;
-
- winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr(wid), NULL);
-
- return winRec != NULL ? winRec->win : NULL;
-}
-
-#ifdef UNUSED_CODE
-/*
- * Given the id of a physical window, try to find the top-level (or root)
- * X window that it represents.
- */
-WindowPtr
-xprGetXWindowFromAppKit(int windowNumber)
-{
- RootlessWindowRec *winRec;
- Bool ret;
- xp_window_id wid;
-
- if (window_hash == NULL)
- return FALSE;
-
- /* need to lock, since this function can be called by any thread */
-
- pthread_mutex_lock(&window_hash_mutex);
-
- if (xp_lookup_native_window(windowNumber, &wid))
- ret = xprGetXWindow(wid) != NULL;
- else
- ret = FALSE;
-
- pthread_mutex_unlock(&window_hash_mutex);
-
- if (!ret) return NULL;
- winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr(wid), NULL);
-
- return winRec != NULL ? winRec->win : NULL;
-}
-#endif
-
-/*
- * The windowNumber is an AppKit window number. Returns TRUE if xpr is
- * displaying a window with that number.
- */
-Bool
-xprIsX11Window(void *nsWindow, int windowNumber)
-{
- Bool ret;
- xp_window_id wid;
-
- if (window_hash == NULL)
- return FALSE;
-
- /* need to lock, since this function can be called by any thread */
-
- pthread_mutex_lock(&window_hash_mutex);
-
- if (xp_lookup_native_window(windowNumber, &wid))
- ret = xprGetXWindow(wid) != NULL;
- else
- ret = FALSE;
-
- pthread_mutex_unlock(&window_hash_mutex);
-
- return ret;
-}
-
-
-/*
- * xprHideWindows
- * Hide or unhide all top level windows. This is called for application hide/
- * unhide events if the window manager is not Apple-WM aware. Xplugin windows
- * do not hide or unhide themselves.
- */
-void
-xprHideWindows(Bool hide)
-{
- int screen;
- WindowPtr pRoot, pWin;
-
- TA_SERVER();
-
- for (screen = 0; screen < screenInfo.numScreens; screen++) {
- RootlessFrameID prevWid = NULL;
- pRoot = screenInfo.screens[screen]->root;
-
- for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) {
- RootlessWindowRec *winRec = WINREC(pWin);
-
- if (winRec != NULL) {
- if (hide) {
- xprUnmapFrame(winRec->wid);
- } else {
- BoxRec box;
-
- xprRestackFrame(winRec->wid, prevWid);
- prevWid = winRec->wid;
-
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = winRec->width;
- box.y2 = winRec->height;
-
- xprDamageRects(winRec->wid, 1, &box, 0, 0);
- RootlessQueueRedisplay(screenInfo.screens[screen]);
- }
- }
- }
- }
-}
-
-// XXX: identical to x_cvt_vptr_to_uint ?
-#define MAKE_WINDOW_ID(x) ((xp_window_id)((size_t)(x)))
-
-Bool no_configure_window;
-
-static inline int
-configure_window (xp_window_id id, unsigned int mask,
- const xp_window_changes *values)
-{
- if (!no_configure_window)
- return xp_configure_window (id, mask, values);
- else
- return XP_Success;
-}
-
-
-static
-void xprUpdateColormap(RootlessFrameID wid, ScreenPtr pScreen)
-{
- /* This is how we tell xp that the colormap may have changed. */
- xp_window_changes wc;
- wc.colormap = xprColormapCallback;
- wc.colormap_data = pScreen;
-
- configure_window(MAKE_WINDOW_ID(wid), XP_COLORMAP, &wc);
-}
-
-static
-void xprHideWindow(RootlessFrameID wid)
-{
- xp_window_changes wc;
- wc.stack_mode = XP_UNMAPPED;
- wc.sibling = 0;
- configure_window(MAKE_WINDOW_ID(wid), XP_STACKING, &wc);
-}
+/*
+ * Xplugin rootless implementation frame functions
+ *
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "xpr.h"
+#include "rootlessCommon.h"
+#include <Xplugin.h>
+#include "x-hash.h"
+#include "x-list.h"
+#include "applewmExt.h"
+
+#include "propertyst.h"
+#include "dix.h"
+#include <X11/Xatom.h>
+#include "windowstr.h"
+#include "quartz.h"
+
+#include "threadSafety.h"
+
+#include <pthread.h>
+
+#define DEFINE_ATOM_HELPER(func,atom_name) \
+static Atom func (void) { \
+ static int generation; \
+ static Atom atom; \
+ if (generation != serverGeneration) { \
+ generation = serverGeneration; \
+ atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \
+ } \
+ return atom; \
+}
+
+DEFINE_ATOM_HELPER(xa_native_window_id, "_NATIVE_WINDOW_ID")
+
+/* Maps xp_window_id -> RootlessWindowRec */
+static x_hash_table *window_hash;
+static pthread_mutex_t window_hash_mutex;
+
+/* Prototypes for static functions */
+static Bool xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
+ int newX, int newY, RegionPtr pShape);
+static void xprDestroyFrame(RootlessFrameID wid);
+static void xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY);
+static void xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
+ int newX, int newY, unsigned int newW, unsigned int newH,
+ unsigned int gravity);
+static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid);
+static void xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape);
+static void xprUnmapFrame(RootlessFrameID wid);
+static void xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow);
+static void xprStopDrawing(RootlessFrameID wid, Bool flush);
+static void xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage);
+static void xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects,
+ int shift_x, int shift_y);
+static void xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin);
+static Bool xprDoReorderWindow(RootlessWindowPtr pFrame);
+static void xprHideWindow(RootlessFrameID wid);
+static void xprUpdateColormap(RootlessFrameID wid, ScreenPtr pScreen);
+static void xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
+ int dx, int dy);
+
+
+static inline xp_error
+xprConfigureWindow(xp_window_id id, unsigned int mask,
+ const xp_window_changes *values)
+{
+ TA_SERVER();
+
+ return xp_configure_window(id, mask, values);
+}
+
+
+static void
+xprSetNativeProperty(RootlessWindowPtr pFrame)
+{
+ xp_error err;
+ unsigned int native_id;
+ long data;
+
+ TA_SERVER();
+
+ err = xp_get_native_window(x_cvt_vptr_to_uint(pFrame->wid), &native_id);
+ if (err == Success)
+ {
+ /* FIXME: move this to AppleWM extension */
+
+ data = native_id;
+ dixChangeWindowProperty(serverClient, pFrame->win, xa_native_window_id(),
+ XA_INTEGER, 32, PropModeReplace, 1, &data, TRUE);
+ }
+}
+
+static xp_error
+xprColormapCallback(void *data, int first_color, int n_colors, uint32_t *colors)
+{
+ return (RootlessResolveColormap (data, first_color, n_colors, colors) ? XP_Success : XP_BadMatch);
+}
+
+/*
+ * Create and display a new frame.
+ */
+static Bool
+xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
+ int newX, int newY, RegionPtr pShape)
+{
+ WindowPtr pWin = pFrame->win;
+ xp_window_changes wc;
+ unsigned int mask = 0;
+ xp_error err;
+
+ TA_SERVER();
+
+ wc.x = newX;
+ wc.y = newY;
+ wc.width = pFrame->width;
+ wc.height = pFrame->height;
+ wc.bit_gravity = XP_GRAVITY_NONE;
+ mask |= XP_BOUNDS;
+
+ if (pWin->drawable.depth == 8)
+ {
+ wc.depth = XP_DEPTH_INDEX8;
+ wc.colormap = xprColormapCallback;
+ wc.colormap_data = pScreen;
+ mask |= XP_COLORMAP;
+ }
+ else if (pWin->drawable.depth == 15)
+ wc.depth = XP_DEPTH_RGB555;
+ else if (pWin->drawable.depth == 24)
+ wc.depth = XP_DEPTH_ARGB8888;
+ else
+ wc.depth = XP_DEPTH_NIL;
+ mask |= XP_DEPTH;
+
+ if (pShape != NULL)
+ {
+ wc.shape_nrects = RegionNumRects(pShape);
+ wc.shape_rects = RegionRects(pShape);
+ wc.shape_tx = wc.shape_ty = 0;
+ mask |= XP_SHAPE;
+ }
+
+ pFrame->level = !IsRoot (pWin) ? AppleWMWindowLevelNormal : AppleWMNumWindowLevels;
+
+ if(XQuartzIsRootless)
+ wc.window_level = normal_window_levels[pFrame->level];
+ else if(XQuartzShieldingWindowLevel)
+ wc.window_level = XQuartzShieldingWindowLevel + 1;
+ else
+ wc.window_level = rooted_window_levels[pFrame->level];
+ mask |= XP_WINDOW_LEVEL;
+
+ err = xp_create_window(mask, &wc, (xp_window_id *) &pFrame->wid);
+
+ if (err != Success)
+ {
+ return FALSE;
+ }
+
+ if (window_hash == NULL)
+ {
+ window_hash = x_hash_table_new(NULL, NULL, NULL, NULL);
+ pthread_mutex_init(&window_hash_mutex, NULL);
+ }
+
+ pthread_mutex_lock(&window_hash_mutex);
+ x_hash_table_insert(window_hash, pFrame->wid, pFrame);
+ pthread_mutex_unlock(&window_hash_mutex);
+
+ xprSetNativeProperty(pFrame);
+
+ return TRUE;
+}
+
+
+/*
+ * Destroy a frame.
+ */
+static void
+xprDestroyFrame(RootlessFrameID wid)
+{
+ xp_error err;
+ TA_SERVER();
+
+ pthread_mutex_lock(&window_hash_mutex);
+ x_hash_table_remove(window_hash, wid);
+ pthread_mutex_unlock(&window_hash_mutex);
+
+ err = xp_destroy_window(x_cvt_vptr_to_uint(wid));
+ if (err != Success)
+ FatalError("Could not destroy window %i.", (int)x_cvt_vptr_to_uint(wid));
+}
+
+
+/*
+ * Move a frame on screen.
+ */
+static void
+xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY)
+{
+ xp_window_changes wc;
+
+ TA_SERVER();
+
+ wc.x = newX;
+ wc.y = newY;
+ // ErrorF("xprMoveFrame(%d, %p, %d, %d)\n", wid, pScreen, newX, newY);
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_ORIGIN, &wc);
+}
+
+
+/*
+ * Resize and move a frame.
+ */
+static void
+xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
+ int newX, int newY, unsigned int newW, unsigned int newH,
+ unsigned int gravity)
+{
+ xp_window_changes wc;
+
+ TA_SERVER();
+
+ wc.x = newX;
+ wc.y = newY;
+ wc.width = newW;
+ wc.height = newH;
+ wc.bit_gravity = gravity;
+
+ /* It's unlikely that being async will save us anything here.
+ But it can't hurt. */
+
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_BOUNDS, &wc);
+}
+
+
+/*
+ * Change frame stacking.
+ */
+static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) {
+ xp_window_changes wc;
+ unsigned int mask = XP_STACKING;
+
+ TA_SERVER();
+
+ /* Stack frame below nextWid it if it exists, or raise
+ frame above everything otherwise. */
+
+ if(nextWid == NULL) {
+ wc.stack_mode = XP_MAPPED_ABOVE;
+ wc.sibling = 0;
+ } else {
+ wc.stack_mode = XP_MAPPED_BELOW;
+ wc.sibling = x_cvt_vptr_to_uint(nextWid);
+ }
+
+ if(window_hash) {
+ RootlessWindowRec *winRec = x_hash_table_lookup(window_hash, wid, NULL);
+
+ if(winRec) {
+ if(XQuartzIsRootless)
+ wc.window_level = normal_window_levels[winRec->level];
+ else if(XQuartzShieldingWindowLevel)
+ wc.window_level = XQuartzShieldingWindowLevel + 1;
+ else
+ wc.window_level = rooted_window_levels[winRec->level];
+ mask |= XP_WINDOW_LEVEL;
+ }
+ }
+
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), mask, &wc);
+}
+
+
+/*
+ * Change the frame's shape.
+ */
+static void
+xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape)
+{
+ xp_window_changes wc;
+
+ TA_SERVER();
+
+ if (pShape != NULL)
+ {
+ wc.shape_nrects = RegionNumRects(pShape);
+ wc.shape_rects = RegionRects(pShape);
+ }
+ else
+ {
+ wc.shape_nrects = -1;
+ wc.shape_rects = NULL;
+ }
+
+ wc.shape_tx = wc.shape_ty = 0;
+
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_SHAPE, &wc);
+}
+
+
+/*
+ * Unmap a frame.
+ */
+static void
+xprUnmapFrame(RootlessFrameID wid)
+{
+ xp_window_changes wc;
+
+ TA_SERVER();
+
+ wc.stack_mode = XP_UNMAPPED;
+ wc.sibling = 0;
+
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_STACKING, &wc);
+}
+
+
+/*
+ * Start drawing to a frame.
+ * Prepare for direct access to its backing buffer.
+ */
+static void
+xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
+{
+ void *data[2];
+ unsigned int rowbytes[2];
+ xp_error err;
+
+ TA_SERVER();
+
+ err = xp_lock_window(x_cvt_vptr_to_uint(wid), NULL, NULL, data, rowbytes, NULL);
+ if (err != Success)
+ FatalError("Could not lock window %i for drawing.", (int)x_cvt_vptr_to_uint(wid));
+
+ *pixelData = data[0];
+ *bytesPerRow = rowbytes[0];
+}
+
+
+/*
+ * Stop drawing to a frame.
+ */
+static void
+xprStopDrawing(RootlessFrameID wid, Bool flush)
+{
+ xp_error err;
+ TA_SERVER();
+
+ err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
+ if(err != Success)
+ FatalError("Could not unlock window %i after drawing.", (int)x_cvt_vptr_to_uint(wid));
+}
+
+
+/*
+ * Flush drawing updates to the screen.
+ */
+static void
+xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage)
+{
+ TA_SERVER();
+
+ xp_flush_window(x_cvt_vptr_to_uint(wid));
+}
+
+
+/*
+ * Mark damaged rectangles as requiring redisplay to screen.
+ */
+static void
+xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects,
+ int shift_x, int shift_y)
+{
+ TA_SERVER();
+
+ xp_mark_window(x_cvt_vptr_to_uint(wid), nrects, rects, shift_x, shift_y);
+}
+
+
+/*
+ * Called after the window associated with a frame has been switched
+ * to a new top-level parent.
+ */
+static void
+xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin)
+{
+ DeleteProperty(serverClient, oldWin, xa_native_window_id());
+
+ TA_SERVER();
+
+ xprSetNativeProperty(pFrame);
+}
+
+
+/*
+ * Called to check if the frame should be reordered when it is restacked.
+ */
+static Bool xprDoReorderWindow(RootlessWindowPtr pFrame)
+{
+ WindowPtr pWin = pFrame->win;
+
+ TA_SERVER();
+
+ return AppleWMDoReorderWindow(pWin);
+}
+
+
+/*
+ * Copy area in frame to another part of frame.
+ * Used to accelerate scrolling.
+ */
+static void
+xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
+ int dx, int dy)
+{
+ TA_SERVER();
+
+ xp_copy_window(x_cvt_vptr_to_uint(wid), x_cvt_vptr_to_uint(wid),
+ dstNrects, dstRects, dx, dy);
+}
+
+
+static RootlessFrameProcsRec xprRootlessProcs = {
+ xprCreateFrame,
+ xprDestroyFrame,
+ xprMoveFrame,
+ xprResizeFrame,
+ xprRestackFrame,
+ xprReshapeFrame,
+ xprUnmapFrame,
+ xprStartDrawing,
+ xprStopDrawing,
+ xprUpdateRegion,
+ xprDamageRects,
+ xprSwitchWindow,
+ xprDoReorderWindow,
+ xprHideWindow,
+ xprUpdateColormap,
+ xp_copy_bytes,
+ xprCopyWindow
+};
+
+
+/*
+ * Initialize XPR implementation
+ */
+Bool
+xprInit(ScreenPtr pScreen)
+{
+ RootlessInit(pScreen, &xprRootlessProcs);
+
+ TA_SERVER();
+
+ rootless_CopyBytes_threshold = xp_copy_bytes_threshold;
+ rootless_CopyWindow_threshold = xp_scroll_area_threshold;
+
+ return TRUE;
+}
+
+
+/*
+ * Given the id of a physical window, try to find the top-level (or root)
+ * X window that it represents.
+ */
+WindowPtr
+xprGetXWindow(xp_window_id wid)
+{
+ RootlessWindowRec *winRec;
+
+ if (window_hash == NULL)
+ return NULL;
+
+ winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr(wid), NULL);
+
+ return winRec != NULL ? winRec->win : NULL;
+}
+
+#ifdef UNUSED_CODE
+/*
+ * Given the id of a physical window, try to find the top-level (or root)
+ * X window that it represents.
+ */
+WindowPtr
+xprGetXWindowFromAppKit(int windowNumber)
+{
+ RootlessWindowRec *winRec;
+ Bool ret;
+ xp_window_id wid;
+
+ if (window_hash == NULL)
+ return FALSE;
+
+ /* need to lock, since this function can be called by any thread */
+
+ pthread_mutex_lock(&window_hash_mutex);
+
+ if (xp_lookup_native_window(windowNumber, &wid))
+ ret = xprGetXWindow(wid) != NULL;
+ else
+ ret = FALSE;
+
+ pthread_mutex_unlock(&window_hash_mutex);
+
+ if (!ret) return NULL;
+ winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr(wid), NULL);
+
+ return winRec != NULL ? winRec->win : NULL;
+}
+#endif
+
+/*
+ * The windowNumber is an AppKit window number. Returns TRUE if xpr is
+ * displaying a window with that number.
+ */
+Bool
+xprIsX11Window(void *nsWindow, int windowNumber)
+{
+ Bool ret;
+ xp_window_id wid;
+
+ if (window_hash == NULL)
+ return FALSE;
+
+ /* need to lock, since this function can be called by any thread */
+
+ pthread_mutex_lock(&window_hash_mutex);
+
+ if (xp_lookup_native_window(windowNumber, &wid))
+ ret = xprGetXWindow(wid) != NULL;
+ else
+ ret = FALSE;
+
+ pthread_mutex_unlock(&window_hash_mutex);
+
+ return ret;
+}
+
+
+/*
+ * xprHideWindows
+ * Hide or unhide all top level windows. This is called for application hide/
+ * unhide events if the window manager is not Apple-WM aware. Xplugin windows
+ * do not hide or unhide themselves.
+ */
+void
+xprHideWindows(Bool hide)
+{
+ int screen;
+ WindowPtr pRoot, pWin;
+
+ TA_SERVER();
+
+ for (screen = 0; screen < screenInfo.numScreens; screen++) {
+ RootlessFrameID prevWid = NULL;
+ pRoot = screenInfo.screens[screen]->root;
+
+ for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) {
+ RootlessWindowRec *winRec = WINREC(pWin);
+
+ if (winRec != NULL) {
+ if (hide) {
+ xprUnmapFrame(winRec->wid);
+ } else {
+ BoxRec box;
+
+ xprRestackFrame(winRec->wid, prevWid);
+ prevWid = winRec->wid;
+
+ box.x1 = 0;
+ box.y1 = 0;
+ box.x2 = winRec->width;
+ box.y2 = winRec->height;
+
+ xprDamageRects(winRec->wid, 1, &box, 0, 0);
+ RootlessQueueRedisplay(screenInfo.screens[screen]);
+ }
+ }
+ }
+ }
+}
+
+// XXX: identical to x_cvt_vptr_to_uint ?
+#define MAKE_WINDOW_ID(x) ((xp_window_id)((size_t)(x)))
+
+Bool no_configure_window;
+
+static inline int
+configure_window (xp_window_id id, unsigned int mask,
+ const xp_window_changes *values)
+{
+ if (!no_configure_window)
+ return xp_configure_window (id, mask, values);
+ else
+ return XP_Success;
+}
+
+
+static
+void xprUpdateColormap(RootlessFrameID wid, ScreenPtr pScreen)
+{
+ /* This is how we tell xp that the colormap may have changed. */
+ xp_window_changes wc;
+ wc.colormap = xprColormapCallback;
+ wc.colormap_data = pScreen;
+
+ configure_window(MAKE_WINDOW_ID(wid), XP_COLORMAP, &wc);
+}
+
+static
+void xprHideWindow(RootlessFrameID wid)
+{
+ xp_window_changes wc;
+ wc.stack_mode = XP_UNMAPPED;
+ wc.sibling = 0;
+ configure_window(MAKE_WINDOW_ID(wid), XP_STACKING, &wc);
+}
diff --git a/xorg-server/hw/xquartz/xpr/xprScreen.c b/xorg-server/hw/xquartz/xpr/xprScreen.c
index 972278b75..338440a39 100644
--- a/xorg-server/hw/xquartz/xpr/xprScreen.c
+++ b/xorg-server/hw/xquartz/xpr/xprScreen.c
@@ -1,483 +1,483 @@
-/*
- * Xplugin rootless implementation screen functions
- *
- * Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
- * Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include "sanitizedCarbon.h"
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "quartzCommon.h"
-#include "inputstr.h"
-#include "quartz.h"
-#include "quartzRandR.h"
-#include "xpr.h"
-#include "xprEvent.h"
-#include "pseudoramiX.h"
-#include "darwin.h"
-#include "darwinEvents.h"
-#include "rootless.h"
-#include "dri.h"
-#include "globals.h"
-#include <Xplugin.h>
-#include "applewmExt.h"
-#include "micmap.h"
-
-#include "rootlessCommon.h"
-
-#ifdef DAMAGE
-# include "damage.h"
-#endif
-
-/* 10.4's deferred update makes X slower.. have to live with the tearing
- for now.. */
-#define XP_NO_DEFERRED_UPDATES 8
-
-// Name of GLX bundle for native OpenGL
-static const char *xprOpenGLBundle = "glxCGL.bundle";
-
-/*
- * eventHandler
- * Callback handler for Xplugin events.
- */
-static void eventHandler(unsigned int type, const void *arg,
- unsigned int arg_size, void *data) {
-
- switch (type) {
- case XP_EVENT_DISPLAY_CHANGED:
- DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n");
- DarwinSendDDXEvent(kXquartzDisplayChanged, 0);
- break;
-
- case XP_EVENT_WINDOW_STATE_CHANGED:
- if (arg_size >= sizeof(xp_window_state_event)) {
- const xp_window_state_event *ws_arg = arg;
-
- DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: id=%d, state=%d\n", ws_arg->id, ws_arg->state);
- DarwinSendDDXEvent(kXquartzWindowState, 2,
- ws_arg->id, ws_arg->state);
- } else {
- DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: ignored\n");
- }
- break;
-
- case XP_EVENT_WINDOW_MOVED:
- DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n");
- if (arg_size == sizeof(xp_window_id)) {
- xp_window_id id = * (xp_window_id *) arg;
- DarwinSendDDXEvent(kXquartzWindowMoved, 1, id);
- }
- break;
-
- case XP_EVENT_SURFACE_DESTROYED:
- DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n");
- case XP_EVENT_SURFACE_CHANGED:
- DEBUG_LOG("XP_EVENT_SURFACE_CHANGED\n");
- if (arg_size == sizeof(xp_surface_id)) {
- int kind;
-
- if (type == XP_EVENT_SURFACE_DESTROYED)
- kind = AppleDRISurfaceNotifyDestroyed;
- else
- kind = AppleDRISurfaceNotifyChanged;
-
- DRISurfaceNotify(*(xp_surface_id *) arg, kind);
- }
- break;
-#ifdef XP_EVENT_SPACE_CHANGED
- case XP_EVENT_SPACE_CHANGED:
- DEBUG_LOG("XP_EVENT_SPACE_CHANGED\n");
- if(arg_size == sizeof(uint32_t)) {
- uint32_t space_id = *(uint32_t *)arg;
- DarwinSendDDXEvent(kXquartzSpaceChanged, 1, space_id);
- }
- break;
-#endif
- default:
- ErrorF("Unknown XP_EVENT type (%d) in xprScreen:eventHandler\n", type);
- }
-}
-
-/*
- * displayAtIndex
- * Return the display ID for a particular display index.
- */
-static CGDirectDisplayID
-displayAtIndex(int index)
-{
- CGError err;
- CGDisplayCount cnt;
- CGDirectDisplayID dpy[index+1];
-
- err = CGGetActiveDisplayList(index + 1, dpy, &cnt);
- if (err == kCGErrorSuccess && cnt == index + 1)
- return dpy[index];
- else
- return kCGNullDirectDisplay;
-}
-
-/*
- * displayScreenBounds
- * Return the bounds of a particular display.
- */
-static CGRect
-displayScreenBounds(CGDirectDisplayID id)
-{
- CGRect frame;
-
- frame = CGDisplayBounds(id);
-
- DEBUG_LOG(" %dx%d @ (%d,%d).\n",
- (int)frame.size.width, (int)frame.size.height,
- (int)frame.origin.x, (int)frame.origin.y);
-
- /* Remove menubar to help standard X11 window managers. */
- if (XQuartzIsRootless &&
- frame.origin.x == 0 && frame.origin.y == 0) {
- frame.origin.y += aquaMenuBarHeight;
- frame.size.height -= aquaMenuBarHeight;
- }
-
- DEBUG_LOG(" %dx%d @ (%d,%d).\n",
- (int)frame.size.width, (int)frame.size.height,
- (int)frame.origin.x, (int)frame.origin.y);
-
- return frame;
-}
-
-/*
- * xprAddPseudoramiXScreens
- * Add a single virtual screen encompassing all the physical screens
- * with PseudoramiX.
- */
-static void
-xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height, ScreenPtr pScreen)
-{
- CGDisplayCount i, displayCount;
- CGDirectDisplayID *displayList = NULL;
- CGRect unionRect = CGRectNull, frame;
-
- // Find all the CoreGraphics displays
- CGGetActiveDisplayList(0, NULL, &displayCount);
- DEBUG_LOG("displayCount: %d\n", (int)displayCount);
-
- if(!displayCount) {
- ErrorF("CoreGraphics has reported no connected displays. Creating a stub 800x600 display.\n");
- *x = *y = 0;
- *width = 800;
- *height = 600;
- PseudoramiXAddScreen(*x, *y, *width, *height);
- return;
- }
-
- /* If the displays are captured, we are in a RandR game mode
- * on the primary display, so we only want to include the first
- * display. The others are covered by the shield window.
- */
- if (CGDisplayIsCaptured(kCGDirectMainDisplay))
- displayCount = 1;
-
- displayList = malloc(displayCount * sizeof(CGDirectDisplayID));
- if(!displayList)
- FatalError("Unable to allocate memory for list of displays.\n");
- CGGetActiveDisplayList(displayCount, displayList, &displayCount);
- QuartzCopyDisplayIDs(pScreen, displayCount, displayList);
-
- /* Get the union of all screens */
- for (i = 0; i < displayCount; i++) {
- CGDirectDisplayID dpy = displayList[i];
- frame = displayScreenBounds(dpy);
- unionRect = CGRectUnion(unionRect, frame);
- }
-
- /* Use unionRect as the screen size for the X server. */
- *x = unionRect.origin.x;
- *y = unionRect.origin.y;
- *width = unionRect.size.width;
- *height = unionRect.size.height;
-
- DEBUG_LOG(" screen union origin: (%d,%d) size: (%d,%d).\n",
- *x, *y, *width, *height);
-
- /* Tell PseudoramiX about the real screens. */
- for (i = 0; i < displayCount; i++)
- {
- CGDirectDisplayID dpy = displayList[i];
-
- frame = displayScreenBounds(dpy);
- frame.origin.x -= unionRect.origin.x;
- frame.origin.y -= unionRect.origin.y;
-
- DEBUG_LOG(" placed at X11 coordinate (%d,%d).\n",
- (int)frame.origin.x, (int)frame.origin.y);
-
- PseudoramiXAddScreen(frame.origin.x, frame.origin.y,
- frame.size.width, frame.size.height);
- }
-
- free(displayList);
-}
-
-/*
- * xprDisplayInit
- * Find number of CoreGraphics displays and initialize Xplugin.
- */
-static void
-xprDisplayInit(void)
-{
- CGDisplayCount displayCount;
-
- DEBUG_LOG("");
-
- CGGetActiveDisplayList(0, NULL, &displayCount);
-
- /* With PseudoramiX, the X server only sees one screen; only PseudoramiX
- itself knows about all of the screens. */
-
- if (noPseudoramiXExtension)
- darwinScreensFound = displayCount;
- else
- darwinScreensFound = 1;
-
- if (xp_init(XP_BACKGROUND_EVENTS | XP_NO_DEFERRED_UPDATES) != Success)
- FatalError("Could not initialize the Xplugin library.");
-
- xp_select_events(XP_EVENT_DISPLAY_CHANGED
- | XP_EVENT_WINDOW_STATE_CHANGED
- | XP_EVENT_WINDOW_MOVED
-#ifdef XP_EVENT_SPACE_CHANGED
- | XP_EVENT_SPACE_CHANGED
-#endif
- | XP_EVENT_SURFACE_CHANGED
- | XP_EVENT_SURFACE_DESTROYED,
- eventHandler, NULL);
-
- AppleDRIExtensionInit();
- xprAppleWMInit();
-
- XQuartzIsRootless = XQuartzRootlessDefault;
- if (!XQuartzIsRootless)
- RootlessHideAllWindows();
-}
-
-/*
- * xprAddScreen
- * Init the framebuffer and record pixmap parameters for the screen.
- */
-static Bool
-xprAddScreen(int index, ScreenPtr pScreen)
-{
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
- int depth = darwinDesiredDepth;
-
- DEBUG_LOG("index=%d depth=%d\n", index, depth);
-
- if(depth == -1) {
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
- depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay);
-#else
- CGDisplayModeRef modeRef;
- CFStringRef encStrRef;
-
- modeRef = CGDisplayCopyDisplayMode(kCGDirectMainDisplay);
- if(!modeRef)
- goto have_depth;
-
- encStrRef = CGDisplayModeCopyPixelEncoding(modeRef);
- CFRelease(modeRef);
- if(!encStrRef)
- goto have_depth;
-
- if(CFStringCompare(encStrRef, CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) {
- depth = 24;
- } else if(CFStringCompare(encStrRef, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) {
- depth = 15;
- } else if(CFStringCompare(encStrRef, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) {
- depth = 8;
- }
-
- CFRelease(encStrRef);
-#endif
- }
-
-have_depth:
- switch(depth) {
- case 8: // pseudo-working
- dfb->visuals = PseudoColorMask;
- dfb->preferredCVC = PseudoColor;
- dfb->depth = 8;
- dfb->bitsPerRGB = 8;
- dfb->bitsPerPixel = 8;
- dfb->redMask = 0;
- dfb->greenMask = 0;
- dfb->blueMask = 0;
- break;
- case 15:
- dfb->visuals = TrueColorMask; //LARGE_VISUALS;
- dfb->preferredCVC = TrueColor;
- dfb->depth = 15;
- dfb->bitsPerRGB = 5;
- dfb->bitsPerPixel = 16;
- dfb->redMask = RM_ARGB(0,5,5,5);
- dfb->greenMask = GM_ARGB(0,5,5,5);
- dfb->blueMask = BM_ARGB(0,5,5,5);
- break;
-// case 24:
- default:
- if(depth != 24)
- ErrorF("Unsupported color depth requested. Defaulting to 24bit. (depth=%d darwinDesiredDepth=%d)\n", depth, darwinDesiredDepth);
- dfb->visuals = TrueColorMask; //LARGE_VISUALS;
- dfb->preferredCVC = TrueColor;
- dfb->depth = 24;
- dfb->bitsPerRGB = 8;
- dfb->bitsPerPixel = 32;
- dfb->redMask = RM_ARGB(0,8,8,8);
- dfb->greenMask = GM_ARGB(0,8,8,8);
- dfb->blueMask = BM_ARGB(0,8,8,8);
- break;
- }
-
- if (noPseudoramiXExtension)
- {
- CGDirectDisplayID dpy;
- CGRect frame;
-
- ErrorF("Warning: noPseudoramiXExtension!\n");
-
- dpy = displayAtIndex(index);
- QuartzCopyDisplayIDs(pScreen, 1, &dpy);
-
- frame = displayScreenBounds(dpy);
-
- dfb->x = frame.origin.x;
- dfb->y = frame.origin.y;
- dfb->width = frame.size.width;
- dfb->height = frame.size.height;
- }
- else
- {
- xprAddPseudoramiXScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height, pScreen);
- }
-
- /* Passing zero width (pitch) makes miCreateScreenResources set the
- screen pixmap to the framebuffer pointer, i.e. NULL. The generic
- rootless code takes care of making this work. */
- dfb->pitch = 0;
- dfb->framebuffer = NULL;
-
- DRIScreenInit(pScreen);
-
- return TRUE;
-}
-
-/*
- * xprSetupScreen
- * Setup the screen for rootless access.
- */
-static Bool
-xprSetupScreen(int index, ScreenPtr pScreen)
-{
-#ifdef DAMAGE
- // The Damage extension needs to wrap underneath the
- // generic rootless layer, so do it now.
- if (!DamageSetup(pScreen))
- return FALSE;
-#endif
-
- // Initialize generic rootless code
- if (!xprInit(pScreen))
- return FALSE;
-
- return DRIFinishScreenInit(pScreen);
-}
-
-/*
- * xprUpdateScreen
- * Update screen after configuation change.
- */
-static void
-xprUpdateScreen(ScreenPtr pScreen)
-{
- rootlessGlobalOffsetX = darwinMainScreenX;
- rootlessGlobalOffsetY = darwinMainScreenY;
-
- AppleWMSetScreenOrigin(pScreen->root);
-
- RootlessRepositionWindows(pScreen);
- RootlessUpdateScreenPixmap(pScreen);
-}
-
-/*
- * xprInitInput
- * Finalize xpr specific setup.
- */
-static void
-xprInitInput(int argc, char **argv)
-{
- int i;
-
- rootlessGlobalOffsetX = darwinMainScreenX;
- rootlessGlobalOffsetY = darwinMainScreenY;
-
- for (i = 0; i < screenInfo.numScreens; i++)
- AppleWMSetScreenOrigin(screenInfo.screens[i]->root);
-}
-
-/*
- * Quartz display mode function list.
- */
-static QuartzModeProcsRec xprModeProcs = {
- xprDisplayInit,
- xprAddScreen,
- xprSetupScreen,
- xprInitInput,
- QuartzInitCursor,
- QuartzSuspendXCursor,
- QuartzResumeXCursor,
- xprAddPseudoramiXScreens,
- xprUpdateScreen,
- xprIsX11Window,
- xprHideWindows,
- RootlessFrameForWindow,
- TopLevelParent,
- DRICreateSurface,
- DRIDestroySurface
-};
-
-/*
- * QuartzModeBundleInit
- * Initialize the display mode bundle after loading.
- */
-Bool
-QuartzModeBundleInit(void)
-{
- quartzProcs = &xprModeProcs;
- quartzOpenGLBundle = xprOpenGLBundle;
- return TRUE;
-}
+/*
+ * Xplugin rootless implementation screen functions
+ *
+ * Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
+ * Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#include "sanitizedCarbon.h"
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "quartzCommon.h"
+#include "inputstr.h"
+#include "quartz.h"
+#include "quartzRandR.h"
+#include "xpr.h"
+#include "xprEvent.h"
+#include "pseudoramiX.h"
+#include "darwin.h"
+#include "darwinEvents.h"
+#include "rootless.h"
+#include "dri.h"
+#include "globals.h"
+#include <Xplugin.h>
+#include "applewmExt.h"
+#include "micmap.h"
+
+#include "rootlessCommon.h"
+
+#ifdef DAMAGE
+# include "damage.h"
+#endif
+
+/* 10.4's deferred update makes X slower.. have to live with the tearing
+ for now.. */
+#define XP_NO_DEFERRED_UPDATES 8
+
+// Name of GLX bundle for native OpenGL
+static const char *xprOpenGLBundle = "glxCGL.bundle";
+
+/*
+ * eventHandler
+ * Callback handler for Xplugin events.
+ */
+static void eventHandler(unsigned int type, const void *arg,
+ unsigned int arg_size, void *data) {
+
+ switch (type) {
+ case XP_EVENT_DISPLAY_CHANGED:
+ DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n");
+ DarwinSendDDXEvent(kXquartzDisplayChanged, 0);
+ break;
+
+ case XP_EVENT_WINDOW_STATE_CHANGED:
+ if (arg_size >= sizeof(xp_window_state_event)) {
+ const xp_window_state_event *ws_arg = arg;
+
+ DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: id=%d, state=%d\n", ws_arg->id, ws_arg->state);
+ DarwinSendDDXEvent(kXquartzWindowState, 2,
+ ws_arg->id, ws_arg->state);
+ } else {
+ DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: ignored\n");
+ }
+ break;
+
+ case XP_EVENT_WINDOW_MOVED:
+ DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n");
+ if (arg_size == sizeof(xp_window_id)) {
+ xp_window_id id = * (xp_window_id *) arg;
+ DarwinSendDDXEvent(kXquartzWindowMoved, 1, id);
+ }
+ break;
+
+ case XP_EVENT_SURFACE_DESTROYED:
+ DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n");
+ case XP_EVENT_SURFACE_CHANGED:
+ DEBUG_LOG("XP_EVENT_SURFACE_CHANGED\n");
+ if (arg_size == sizeof(xp_surface_id)) {
+ int kind;
+
+ if (type == XP_EVENT_SURFACE_DESTROYED)
+ kind = AppleDRISurfaceNotifyDestroyed;
+ else
+ kind = AppleDRISurfaceNotifyChanged;
+
+ DRISurfaceNotify(*(xp_surface_id *) arg, kind);
+ }
+ break;
+#ifdef XP_EVENT_SPACE_CHANGED
+ case XP_EVENT_SPACE_CHANGED:
+ DEBUG_LOG("XP_EVENT_SPACE_CHANGED\n");
+ if(arg_size == sizeof(uint32_t)) {
+ uint32_t space_id = *(uint32_t *)arg;
+ DarwinSendDDXEvent(kXquartzSpaceChanged, 1, space_id);
+ }
+ break;
+#endif
+ default:
+ ErrorF("Unknown XP_EVENT type (%d) in xprScreen:eventHandler\n", type);
+ }
+}
+
+/*
+ * displayAtIndex
+ * Return the display ID for a particular display index.
+ */
+static CGDirectDisplayID
+displayAtIndex(int index)
+{
+ CGError err;
+ CGDisplayCount cnt;
+ CGDirectDisplayID dpy[index+1];
+
+ err = CGGetActiveDisplayList(index + 1, dpy, &cnt);
+ if (err == kCGErrorSuccess && cnt == index + 1)
+ return dpy[index];
+ else
+ return kCGNullDirectDisplay;
+}
+
+/*
+ * displayScreenBounds
+ * Return the bounds of a particular display.
+ */
+static CGRect
+displayScreenBounds(CGDirectDisplayID id)
+{
+ CGRect frame;
+
+ frame = CGDisplayBounds(id);
+
+ DEBUG_LOG(" %dx%d @ (%d,%d).\n",
+ (int)frame.size.width, (int)frame.size.height,
+ (int)frame.origin.x, (int)frame.origin.y);
+
+ /* Remove menubar to help standard X11 window managers. */
+ if (XQuartzIsRootless &&
+ frame.origin.x == 0 && frame.origin.y == 0) {
+ frame.origin.y += aquaMenuBarHeight;
+ frame.size.height -= aquaMenuBarHeight;
+ }
+
+ DEBUG_LOG(" %dx%d @ (%d,%d).\n",
+ (int)frame.size.width, (int)frame.size.height,
+ (int)frame.origin.x, (int)frame.origin.y);
+
+ return frame;
+}
+
+/*
+ * xprAddPseudoramiXScreens
+ * Add a single virtual screen encompassing all the physical screens
+ * with PseudoramiX.
+ */
+static void
+xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height, ScreenPtr pScreen)
+{
+ CGDisplayCount i, displayCount;
+ CGDirectDisplayID *displayList = NULL;
+ CGRect unionRect = CGRectNull, frame;
+
+ // Find all the CoreGraphics displays
+ CGGetActiveDisplayList(0, NULL, &displayCount);
+ DEBUG_LOG("displayCount: %d\n", (int)displayCount);
+
+ if(!displayCount) {
+ ErrorF("CoreGraphics has reported no connected displays. Creating a stub 800x600 display.\n");
+ *x = *y = 0;
+ *width = 800;
+ *height = 600;
+ PseudoramiXAddScreen(*x, *y, *width, *height);
+ return;
+ }
+
+ /* If the displays are captured, we are in a RandR game mode
+ * on the primary display, so we only want to include the first
+ * display. The others are covered by the shield window.
+ */
+ if (CGDisplayIsCaptured(kCGDirectMainDisplay))
+ displayCount = 1;
+
+ displayList = malloc(displayCount * sizeof(CGDirectDisplayID));
+ if(!displayList)
+ FatalError("Unable to allocate memory for list of displays.\n");
+ CGGetActiveDisplayList(displayCount, displayList, &displayCount);
+ QuartzCopyDisplayIDs(pScreen, displayCount, displayList);
+
+ /* Get the union of all screens */
+ for (i = 0; i < displayCount; i++) {
+ CGDirectDisplayID dpy = displayList[i];
+ frame = displayScreenBounds(dpy);
+ unionRect = CGRectUnion(unionRect, frame);
+ }
+
+ /* Use unionRect as the screen size for the X server. */
+ *x = unionRect.origin.x;
+ *y = unionRect.origin.y;
+ *width = unionRect.size.width;
+ *height = unionRect.size.height;
+
+ DEBUG_LOG(" screen union origin: (%d,%d) size: (%d,%d).\n",
+ *x, *y, *width, *height);
+
+ /* Tell PseudoramiX about the real screens. */
+ for (i = 0; i < displayCount; i++)
+ {
+ CGDirectDisplayID dpy = displayList[i];
+
+ frame = displayScreenBounds(dpy);
+ frame.origin.x -= unionRect.origin.x;
+ frame.origin.y -= unionRect.origin.y;
+
+ DEBUG_LOG(" placed at X11 coordinate (%d,%d).\n",
+ (int)frame.origin.x, (int)frame.origin.y);
+
+ PseudoramiXAddScreen(frame.origin.x, frame.origin.y,
+ frame.size.width, frame.size.height);
+ }
+
+ free(displayList);
+}
+
+/*
+ * xprDisplayInit
+ * Find number of CoreGraphics displays and initialize Xplugin.
+ */
+static void
+xprDisplayInit(void)
+{
+ CGDisplayCount displayCount;
+
+ DEBUG_LOG("");
+
+ CGGetActiveDisplayList(0, NULL, &displayCount);
+
+ /* With PseudoramiX, the X server only sees one screen; only PseudoramiX
+ itself knows about all of the screens. */
+
+ if (noPseudoramiXExtension)
+ darwinScreensFound = displayCount;
+ else
+ darwinScreensFound = 1;
+
+ if (xp_init(XP_BACKGROUND_EVENTS | XP_NO_DEFERRED_UPDATES) != Success)
+ FatalError("Could not initialize the Xplugin library.");
+
+ xp_select_events(XP_EVENT_DISPLAY_CHANGED
+ | XP_EVENT_WINDOW_STATE_CHANGED
+ | XP_EVENT_WINDOW_MOVED
+#ifdef XP_EVENT_SPACE_CHANGED
+ | XP_EVENT_SPACE_CHANGED
+#endif
+ | XP_EVENT_SURFACE_CHANGED
+ | XP_EVENT_SURFACE_DESTROYED,
+ eventHandler, NULL);
+
+ AppleDRIExtensionInit();
+ xprAppleWMInit();
+
+ XQuartzIsRootless = XQuartzRootlessDefault;
+ if (!XQuartzIsRootless)
+ RootlessHideAllWindows();
+}
+
+/*
+ * xprAddScreen
+ * Init the framebuffer and record pixmap parameters for the screen.
+ */
+static Bool
+xprAddScreen(int index, ScreenPtr pScreen)
+{
+ DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
+ int depth = darwinDesiredDepth;
+
+ DEBUG_LOG("index=%d depth=%d\n", index, depth);
+
+ if(depth == -1) {
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay);
+#else
+ CGDisplayModeRef modeRef;
+ CFStringRef encStrRef;
+
+ modeRef = CGDisplayCopyDisplayMode(kCGDirectMainDisplay);
+ if(!modeRef)
+ goto have_depth;
+
+ encStrRef = CGDisplayModeCopyPixelEncoding(modeRef);
+ CFRelease(modeRef);
+ if(!encStrRef)
+ goto have_depth;
+
+ if(CFStringCompare(encStrRef, CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) {
+ depth = 24;
+ } else if(CFStringCompare(encStrRef, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) {
+ depth = 15;
+ } else if(CFStringCompare(encStrRef, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) {
+ depth = 8;
+ }
+
+ CFRelease(encStrRef);
+#endif
+ }
+
+have_depth:
+ switch(depth) {
+ case 8: // pseudo-working
+ dfb->visuals = PseudoColorMask;
+ dfb->preferredCVC = PseudoColor;
+ dfb->depth = 8;
+ dfb->bitsPerRGB = 8;
+ dfb->bitsPerPixel = 8;
+ dfb->redMask = 0;
+ dfb->greenMask = 0;
+ dfb->blueMask = 0;
+ break;
+ case 15:
+ dfb->visuals = TrueColorMask; //LARGE_VISUALS;
+ dfb->preferredCVC = TrueColor;
+ dfb->depth = 15;
+ dfb->bitsPerRGB = 5;
+ dfb->bitsPerPixel = 16;
+ dfb->redMask = RM_ARGB(0,5,5,5);
+ dfb->greenMask = GM_ARGB(0,5,5,5);
+ dfb->blueMask = BM_ARGB(0,5,5,5);
+ break;
+// case 24:
+ default:
+ if(depth != 24)
+ ErrorF("Unsupported color depth requested. Defaulting to 24bit. (depth=%d darwinDesiredDepth=%d)\n", depth, darwinDesiredDepth);
+ dfb->visuals = TrueColorMask; //LARGE_VISUALS;
+ dfb->preferredCVC = TrueColor;
+ dfb->depth = 24;
+ dfb->bitsPerRGB = 8;
+ dfb->bitsPerPixel = 32;
+ dfb->redMask = RM_ARGB(0,8,8,8);
+ dfb->greenMask = GM_ARGB(0,8,8,8);
+ dfb->blueMask = BM_ARGB(0,8,8,8);
+ break;
+ }
+
+ if (noPseudoramiXExtension)
+ {
+ CGDirectDisplayID dpy;
+ CGRect frame;
+
+ ErrorF("Warning: noPseudoramiXExtension!\n");
+
+ dpy = displayAtIndex(index);
+ QuartzCopyDisplayIDs(pScreen, 1, &dpy);
+
+ frame = displayScreenBounds(dpy);
+
+ dfb->x = frame.origin.x;
+ dfb->y = frame.origin.y;
+ dfb->width = frame.size.width;
+ dfb->height = frame.size.height;
+ }
+ else
+ {
+ xprAddPseudoramiXScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height, pScreen);
+ }
+
+ /* Passing zero width (pitch) makes miCreateScreenResources set the
+ screen pixmap to the framebuffer pointer, i.e. NULL. The generic
+ rootless code takes care of making this work. */
+ dfb->pitch = 0;
+ dfb->framebuffer = NULL;
+
+ DRIScreenInit(pScreen);
+
+ return TRUE;
+}
+
+/*
+ * xprSetupScreen
+ * Setup the screen for rootless access.
+ */
+static Bool
+xprSetupScreen(int index, ScreenPtr pScreen)
+{
+#ifdef DAMAGE
+ // The Damage extension needs to wrap underneath the
+ // generic rootless layer, so do it now.
+ if (!DamageSetup(pScreen))
+ return FALSE;
+#endif
+
+ // Initialize generic rootless code
+ if (!xprInit(pScreen))
+ return FALSE;
+
+ return DRIFinishScreenInit(pScreen);
+}
+
+/*
+ * xprUpdateScreen
+ * Update screen after configuation change.
+ */
+static void
+xprUpdateScreen(ScreenPtr pScreen)
+{
+ rootlessGlobalOffsetX = darwinMainScreenX;
+ rootlessGlobalOffsetY = darwinMainScreenY;
+
+ AppleWMSetScreenOrigin(pScreen->root);
+
+ RootlessRepositionWindows(pScreen);
+ RootlessUpdateScreenPixmap(pScreen);
+}
+
+/*
+ * xprInitInput
+ * Finalize xpr specific setup.
+ */
+static void
+xprInitInput(int argc, char **argv)
+{
+ int i;
+
+ rootlessGlobalOffsetX = darwinMainScreenX;
+ rootlessGlobalOffsetY = darwinMainScreenY;
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ AppleWMSetScreenOrigin(screenInfo.screens[i]->root);
+}
+
+/*
+ * Quartz display mode function list.
+ */
+static QuartzModeProcsRec xprModeProcs = {
+ xprDisplayInit,
+ xprAddScreen,
+ xprSetupScreen,
+ xprInitInput,
+ QuartzInitCursor,
+ QuartzSuspendXCursor,
+ QuartzResumeXCursor,
+ xprAddPseudoramiXScreens,
+ xprUpdateScreen,
+ xprIsX11Window,
+ xprHideWindows,
+ RootlessFrameForWindow,
+ TopLevelParent,
+ DRICreateSurface,
+ DRIDestroySurface
+};
+
+/*
+ * QuartzModeBundleInit
+ * Initialize the display mode bundle after loading.
+ */
+Bool
+QuartzModeBundleInit(void)
+{
+ quartzProcs = &xprModeProcs;
+ quartzOpenGLBundle = xprOpenGLBundle;
+ return TRUE;
+}
diff --git a/xorg-server/hw/xwin/InitInput.c b/xorg-server/hw/xwin/InitInput.c
index 5f51fc457..e01a8f655 100644
--- a/xorg-server/hw/xwin/InitInput.c
+++ b/xorg-server/hw/xwin/InitInput.c
@@ -32,7 +32,7 @@
#include "win.h"
#include "dixstruct.h"
#include "inputstr.h"
-
+#include <unistd.h>
/*
* Local function prototypes
@@ -40,7 +40,6 @@
#ifdef XWIN_CLIPBOARD
int winProcEstablishConnection(ClientPtr /* client */);
-int winProcQueryTree(ClientPtr /* client */);
int winProcSetSelectionOwner(ClientPtr /* client */);
#endif
@@ -76,15 +75,7 @@ LegalModifier (unsigned int uiKey, DeviceIntPtr pDevice)
void
ProcessInputEvents (void)
{
-#if 0
- ErrorF ("ProcessInputEvents\n");
-#endif
-
mieqProcessInputEvents ();
-
-#if 0
- ErrorF ("ProcessInputEvents - returning\n");
-#endif
}
@@ -99,9 +90,7 @@ void DDXRingBell(int volume, int pitch, int duration)
void
InitInput (int argc, char *argv[])
{
-#if CYGDEBUG
winDebug ("InitInput\n");
-#endif
#ifdef XWIN_CLIPBOARD
/*
@@ -112,12 +101,6 @@ InitInput (int argc, char *argv[])
winProcEstablishConnectionOrig = InitialVector[2];
InitialVector[2] = winProcEstablishConnection;
}
- if (g_fXdmcpEnabled
- && ProcVector[X_QueryTree] != winProcQueryTree)
- {
- winProcQueryTreeOrig = ProcVector[X_QueryTree];
- ProcVector[X_QueryTree] = winProcQueryTree;
- }
#endif
g_pwinPointer = AddInputDevice (serverClient, winMouseProc, TRUE);
@@ -127,8 +110,8 @@ InitInput (int argc, char *argv[])
mieqInit ();
- /* Initialize the mode key states */
- winInitializeModeKeyStates ();
+ /* Do not nitialize the mode key states here yet since the keyboard device is not started yet
+ winInitializeModeKeyStates (); */
#ifdef HAS_DEVWINDOWS
/* Only open the windows message queue device once */
@@ -148,12 +131,12 @@ InitInput (int argc, char *argv[])
}
#endif
-#if CYGDEBUG
winDebug ("InitInput - returning\n");
-#endif
}
void
CloseInput (void)
{
+ g_pwinPointer=NULL;
+ g_pwinKeyboard=NULL;
}
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index 7faed0170..725011ea5 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -35,12 +35,10 @@ from The Open Group.
#include "winmsg.h"
#include "winconfig.h"
#include "winprefs.h"
-#ifdef XWIN_CLIPBOARD
-#include "X11/Xlocale.h"
-#endif
#ifdef DPMSExtension
#include "dpmsproc.h"
#endif
+#include <locale.h>
#ifdef __CYGWIN__
#include <mntent.h>
#endif
@@ -48,13 +46,14 @@ from The Open Group.
#include "xkbsrv.h"
#endif
#ifdef RELOCATE_PROJECTROOT
+#undef Status
#include <shlobj.h>
-typedef HRESULT (*SHGETFOLDERPATHPROC)(
+typedef HRESULT (__stdcall * SHGETFOLDERPATHPROC)(
HWND hwndOwner,
int nFolder,
HANDLE hToken,
DWORD dwFlags,
- LPTSTR pszPath
+ LPSTR pszPath
);
#endif
@@ -142,6 +141,7 @@ winClipboardShutdown (void)
/* Synchronously destroy the clipboard window */
if (g_hwndClipboard != NULL)
{
+ g_fClipboardStarted=FALSE; /* This is to avoid dead-locls caused by the clipboard thread still doing some stuff */
SendMessage (g_hwndClipboard, WM_DESTROY, 0, 0);
/* NOTE: g_hwndClipboard is set to NULL in winclipboardthread.c */
}
@@ -151,25 +151,11 @@ winClipboardShutdown (void)
/* Wait for the clipboard thread to exit */
pthread_join (g_ptClipboardProc, NULL);
- g_fClipboardLaunched = FALSE;
- g_fClipboardStarted = FALSE;
-
winDebug ("winClipboardShutdown - Clipboard thread has exited.\n");
}
}
#endif
-void
-ddxPushProviders(void)
-{
-#ifdef XWIN_GLX_WINDOWS
- if (g_fNativeGl)
- {
- /* install the native GL provider */
- glxWinPushNativeProvider();
- }
-#endif
-}
#if defined(DDXBEFORERESET)
/*
@@ -195,9 +181,7 @@ ddxGiveUp (void)
{
int i;
-#if CYGDEBUG
winDebug ("ddxGiveUp\n");
-#endif
/* Perform per-screen deinitialization */
for (i = 0; i < g_iNumScreens; ++i)
@@ -260,9 +244,7 @@ ddxGiveUp (void)
void
AbortDDX (void)
{
-#if CYGDEBUG
winDebug ("AbortDDX\n");
-#endif
ddxGiveUp ();
}
@@ -347,8 +329,10 @@ winCheckMount(void)
return;
}
- if (!binary)
- winMsg(X_WARNING, "/tmp mounted in textmode\n");
+#ifdef WINDBG
+ if (!binary)
+ winDebug("/tmp mounted in textmode\n");
+#endif
}
#else
static void
@@ -400,7 +384,17 @@ winFixupPaths (void)
#ifdef READ_FONTDIRS
{
/* Open fontpath configuration file */
+#if defined WIN32 && defined __MINGW32__
+ static Bool once = False;
+ char buffer[MAX_PATH];
+ snprintf(buffer, sizeof(buffer), "%s\\font-dirs", basedir);
+ buffer[sizeof(buffer)-1] = 0;
+ FILE *fontdirs = fopen(buffer, "rt");
+ if (once) fontdirs = NULL;
+ else once = True;
+#else
FILE *fontdirs = fopen(ETCX11DIR "/font-dirs", "rt");
+#endif
if (fontdirs != NULL)
{
char buffer[256];
@@ -573,7 +567,7 @@ winFixupPaths (void)
}
#endif /* RELOCATE_PROJECTROOT */
if (changed_fontpath)
- winMsg (font_from, "FontPath set to \"%s\"\n", defaultFontPath);
+ winDebug ("FontPath set to \"%s\"\n", defaultFontPath);
#ifdef RELOCATE_PROJECTROOT
if (getenv("XKEYSYMDB") == NULL)
@@ -600,6 +594,14 @@ winFixupPaths (void)
buffer[sizeof(buffer)-1] = 0;
putenv(buffer);
}
+ if (getenv("XHOSTPREFIX") == NULL)
+ {
+ char buffer[MAX_PATH];
+ snprintf(buffer, sizeof(buffer), "XHOSTPREFIX=%s\\X",
+ basedir);
+ buffer[sizeof(buffer)-1] = 0;
+ putenv(buffer);
+ }
if (getenv("HOME") == NULL)
{
HMODULE shfolder;
@@ -626,7 +628,7 @@ winFixupPaths (void)
putenv(buffer);
} else
{
- winMsg (X_ERROR, "Can not determine HOME directory\n");
+ ErrorF ("Can not determine HOME directory\n");
}
if (shfolder != NULL)
FreeLibrary(shfolder);
@@ -637,16 +639,17 @@ winFixupPaths (void)
if (size && size < sizeof(buffer))
{
snprintf(buffer + size, sizeof(buffer) - size,
- "XWin.%s.log", display);
+ "VCXSrv.%s.log", display);
buffer[sizeof(buffer)-1] = 0;
g_pszLogFile = buffer;
- winMsg (X_DEFAULT, "Logfile set to \"%s\"\n", g_pszLogFile);
+ GetLongPathName(buffer, buffer, MAX_PATH);
+ winDebug ("Logfile set to \"%s\"\n", g_pszLogFile);
}
}
{
static char xkbbasedir[MAX_PATH];
- snprintf(xkbbasedir, sizeof(xkbbasedir), "%s\\xkb", basedir);
+ snprintf(xkbbasedir, sizeof(xkbbasedir), "%s\\xkbdata", basedir);
if (sizeof(xkbbasedir) > 0)
xkbbasedir[sizeof(xkbbasedir)-1] = 0;
XkbBaseDirectory = xkbbasedir;
@@ -718,6 +721,10 @@ winUseMsg (void)
#ifdef XWIN_CLIPBOARD
ErrorF ("-[no]clipboard\n"
"\tEnable [disable] the clipboard integration. Default is enabled.\n");
+ ErrorF ("-[no]clipboardprimary\n"
+ "\t[Do not] map the PRIMARY selection to the windows clipboard.\n"
+ "\tThe CLIPBOARD selection is always mapped if -clipboard is enabled.\n"
+ "\tDefault is mapped.\n");
#endif
ErrorF ("-clipupdates num_boxes\n"
@@ -769,7 +776,7 @@ winUseMsg (void)
ErrorF ("-ignoreinput\n"
"\tIgnore keyboard and mouse input.\n");
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
ErrorF ("-internalwm\n"
"\tRun the internal window manager.\n");
#endif
@@ -861,10 +868,8 @@ winUseMsg (void)
ErrorF ("-[no]unixkill\n"
"\tCtrl+Alt+Backspace exits the X Server.\n");
-#ifdef XWIN_GLX_WINDOWS
ErrorF ("-[no]wgl\n"
"\tEnable the GLX extension to use the native Windows WGL interface for accelerated OpenGL\n");
-#endif
ErrorF ("-[no]winkill\n"
"\tAlt+F4 exits the X Server.\n");
@@ -926,9 +931,7 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
/* Log the command line */
winLogCommandLine (argc, argv);
-#if CYGDEBUG
winDebug ("InitOutput\n");
-#endif
/* Validate command-line arguments */
if (serverGeneration == 1 && !winValidateArgs ())
@@ -949,11 +952,8 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
#ifdef XWIN_XF86CONFIG
/* Try to read the xorg.conf-style configuration file */
if (!winReadConfigfile ())
- winErrorFVerb (1, "InitOutput - Error reading config file\n");
+ ErrorF ("InitOutput - Error reading config file\n");
#else
- winMsg(X_INFO, "xorg.conf is not supported\n");
- winMsg(X_INFO, "See http://x.cygwin.com/docs/faq/cygwin-x-faq.html "
- "for more information\n");
winConfigFiles ();
#endif
@@ -987,7 +987,7 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
"_TrackMouseEvent");
if (g_fpTrackMouseEvent == NULL)
{
- winErrorFVerb (1, "InitOutput - Could not get pointer to function\n"
+ ErrorF ("InitOutput - Could not get pointer to function\n"
"\t_TrackMouseEvent in comctl32.dll. Try installing\n"
"\tInternet Explorer 3.0 or greater if you have not\n"
"\talready.\n");
@@ -1026,13 +1026,22 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
* setlocale applies to all threads in the current process.
* Apply locale specified in LANG environment variable.
*/
- setlocale (LC_ALL, "");
+ if (!setlocale (LC_ALL, ""))
+ {
+ ErrorF ("setlocale failed.\n");
+ }
+
+ /* See if X supports the current locale */
+ if (XSupportsLocale () == FALSE)
+ {
+ ErrorF ("Warning: Locale not supported by X, falling back to 'C' locale.\n");
+ setlocale(LC_ALL, "C");
+ }
+
}
#endif
-#if CYGDEBUG || YES
winDebug ("InitOutput - Returning.\n");
-#endif
}
@@ -1055,7 +1064,7 @@ winCheckDisplayNumber (void)
/* Check display range */
nDisp = atoi (display);
- if (nDisp < 0 || nDisp > 65535)
+ if (nDisp < 0 || nDisp > 59535)
{
ErrorF ("winCheckDisplayNumber - Bad display number: %d\n", nDisp);
return FALSE;
@@ -1102,7 +1111,7 @@ winCheckDisplayNumber (void)
if (GetLastError () == ERROR_ALREADY_EXISTS)
{
ErrorF ("winCheckDisplayNumber - "
- PROJECT_NAME " is already running on display %d\n",
+ "VCXsrv, Xming or Cygwin/X is already running on display %d\n",
nDisp);
return FALSE;
}
diff --git a/xorg-server/hw/xwin/Makefile.am b/xorg-server/hw/xwin/Makefile.am
index ce2edb2e6..0afd81883 100644
--- a/xorg-server/hw/xwin/Makefile.am
+++ b/xorg-server/hw/xwin/Makefile.am
@@ -120,6 +120,7 @@ SRCS = InitInput.c \
winprefs.h \
winresource.h \
winwindow.h \
+ windisplay.c \
XWin.rc \
$(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c \
diff --git a/xorg-server/hw/xwin/XWin.rc b/xorg-server/hw/xwin/XWin.rc
index 539bd0e4d..ef2aa3e09 100644
--- a/xorg-server/hw/xwin/XWin.rc
+++ b/xorg-server/hw/xwin/XWin.rc
@@ -1,108 +1,116 @@
-/*
- *Copyright (C) 2002-2004 Harold L Hunt II All Rights Reserved.
- *Copyright (C) 2008 Yaakov Selkowitz All Rights Reserved
- *
- *Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- *"Software"), to deal in the Software without restriction, including
- *without limitation the rights to use, copy, modify, merge, publish,
- *distribute, sublicense, and/or sell copies of the Software, and to
- *permit persons to whom the Software is furnished to do so, subject to
- *the following conditions:
- *
- *The above copyright notice and this permission notice shall be
- *included in all copies or substantial portions of the Software.
- *
- *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
- *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *Except as contained in this notice, the names of the authors
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from the authors.
- *
- * Authors: Harold L Hunt II, Yaakov Selkowitz
- */
-
-#include <windows.h>
-#include "winresource.h"
-#include "xwin-config.h"
-#include "version-config.h"
-
-/*
- * Dialogs
- */
-
-/* About */
-ABOUT_BOX DIALOGEX 32, 32, 260, 105
-STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
-CAPTION "About " XVENDORNAMESHORT
-FONT 8, "MS Shell Dlg 2"
-BEGIN
- CONTROL IDI_XWIN, IDC_STATIC, "Static", SS_ICON, 8, 8, 32, 32
- LTEXT XVENDORNAMESHORT " X Server ", IDC_STATIC, 36, 8, 220, 8
- LTEXT VENDOR_MAN_VERSION, IDC_STATIC, 36, 18, 220, 8
- LTEXT BUILDERSTRING, IDC_STATIC, 36, 28, 220, 8
- LTEXT "This software is licensed under the terms of the MIT/X11 License.", IDC_STATIC, 36, 48, 220, 20
- CONTROL __VENDORDWEBSUPPORT__, ID_ABOUT_WEBSITE, "Button",
- BS_OWNERDRAW | WS_TABSTOP, 36, 68, 68, 8
- DEFPUSHBUTTON "&OK", IDOK, 105, 85, 50, 15
-END
-
-
-/* Depth change */
-
-DEPTH_CHANGE_BOX DIALOGEX 32, 32, 180, 100
-STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTERMOUSE
-FONT 8, "MS Shell Dlg 2"
-CAPTION XVENDORNAMESHORT
-BEGIN
- DEFPUSHBUTTON "Dismiss", IDOK, 66, 80, 50, 14
- CTEXT XVENDORNAMESHORT, IDC_STATIC, 40, 12, 100, 8
- CTEXT "Disruptive screen configuration change.", IDC_STATIC, 7, 40, 166, 8
- CTEXT "Restore previous resolution to use " XVENDORNAMESHORT ".", IDC_STATIC, 7, 52, 166, 8
-END
-
-
-/* Exit */
-
-EXIT_DIALOG DIALOGEX 32, 32, 180, 78
-STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
-FONT 8, "MS Shell Dlg 2"
-CAPTION "Exit " XVENDORNAMESHORT "?"
-BEGIN
- PUSHBUTTON "E&xit", IDOK, 55, 56, 30, 14
- DEFPUSHBUTTON "&Cancel", IDCANCEL, 95, 56, 30, 14
- CTEXT "E&xiting will close all screens running on this display.", IDC_STATIC, 7, 12, 166, 8
- CTEXT "No information about connected clients available.", IDC_CLIENTS_CONNECTED, 7, 24, 166, 8
- CTEXT "Proceed with shutdown of this display/server?", IDC_STATIC, 7, 36, 166, 8
-END
-
-
-/*
- * Menus
- */
-
-IDM_TRAYICON_MENU MENU
-BEGIN
- POPUP "TRAYICON_MENU"
- BEGIN
- MENUITEM "&Hide Root Window", ID_APP_HIDE_ROOT
- MENUITEM "&About...", ID_APP_ABOUT
- MENUITEM SEPARATOR
- MENUITEM "E&xit...", ID_APP_EXIT
- END
-END
-
-
-/*
- * Icons
- */
-
-IDI_XWIN ICON "X.ico"
-CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "XWin.exe.manifest"
+/*
+ *Copyright (C) 2002-2004 Harold L Hunt II All Rights Reserved.
+ *Copyright (C) 2008 Yaakov Selkowitz All Rights Reserved
+ *
+ *Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ *"Software"), to deal in the Software without restriction, including
+ *without limitation the rights to use, copy, modify, merge, publish,
+ *distribute, sublicense, and/or sell copies of the Software, and to
+ *permit persons to whom the Software is furnished to do so, subject to
+ *the following conditions:
+ *
+ *The above copyright notice and this permission notice shall be
+ *included in all copies or substantial portions of the Software.
+ *
+ *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
+ *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *Except as contained in this notice, the names of the authors
+ *shall not be used in advertising or otherwise to promote the sale, use
+ *or other dealings in this Software without prior written authorization
+ *from the authors.
+ *
+ * Authors: Harold L Hunt II, Yaakov Selkowitz
+ */
+
+#include <windows.h>
+#include "winresource.h"
+#include "xwin-config.h"
+
+/*
+ * Dialogs
+ */
+
+/* About */
+ABOUT_BOX DIALOGEX 32, 32, 260, 95
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
+CAPTION "About "XVENDORNAMESHORT
+FONT 8, "MS Shell Dlg 2"
+BEGIN
+ CONTROL IDI_XWIN, IDC_STATIC, "Static", SS_ICON, 8, 8, 32, 32
+ LTEXT "VcXsrv X Server ", IDC_STATIC, 36, 8, 220, 8
+ LTEXT "http://www.hc-consult.be", IDC_STATIC, 36, 18, 220, 8
+ LTEXT "marc@hc-consult.be", IDC_STATIC, 36, 28, 220, 8
+ LTEXT "Version 1.10.0.0 (8 March 2011)", IDC_STATIC, 36, 38, 220, 8
+ DEFPUSHBUTTON "OK", IDOK, 105, 75, 50, 15
+END
+
+
+/* Depth change */
+
+DEPTH_CHANGE_BOX DIALOGEX 32, 32, 180, 100
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTERMOUSE
+FONT 8, "MS Shell Dlg 2"
+CAPTION XVENDORNAMESHORT
+BEGIN
+ DEFPUSHBUTTON "Dismiss", IDOK, 66, 80, 50, 14
+ CTEXT XVENDORNAMESHORT, IDC_STATIC, 40, 12, 100, 8
+ CTEXT "Disruptive screen configuration change.", IDC_STATIC, 7, 40, 166, 8
+ CTEXT "Restore previous resolution to use "XVENDORNAMESHORT".", IDC_STATIC, 7, 52, 166, 8
+END
+
+
+/* Exit */
+
+EXIT_DIALOG DIALOGEX 32, 32, 180, 78
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
+FONT 8, "MS Shell Dlg 2"
+CAPTION "Exit "XVENDORNAMESHORT"?"
+BEGIN
+ PUSHBUTTON "E&xit", IDOK, 55, 56, 30, 14
+ DEFPUSHBUTTON "&Cancel", IDCANCEL, 95, 56, 30, 14
+ CTEXT "E&xiting will close all screens running on this display.", IDC_STATIC, 7, 12, 166, 8
+ CTEXT "No information about connected clients available.", IDC_CLIENTS_CONNECTED, 7, 24, 166, 8
+ CTEXT "Proceed with shutdown of this display/server?", IDC_STATIC, 7, 36, 166, 8
+END
+
+/* Xdmcp host selection dialog */
+XDMCP_HOSTS DIALOGEX 32, 32, 260, 156
+STYLE DS_SETFONT | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION
+EXSTYLE WS_EX_NOPARENTNOTIFY
+CAPTION "Select host to connect to"
+FONT 8, "MS Shell Dlg 2", 0, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "Connect",IDOK,61,132,50,15
+ LISTBOX IDC_HOSTLIST,7,7,245,113,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_NOTIFY | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Cancel",IDCANCEL,147,134,50,14
+END
+
+/*
+ * Menus
+ */
+
+IDM_TRAYICON_MENU MENU
+BEGIN
+ POPUP "TRAYICON_MENU"
+ BEGIN
+ MENUITEM "&Hide Root Window", ID_APP_HIDE_ROOT
+ MENUITEM "&About...", ID_APP_ABOUT
+ MENUITEM SEPARATOR
+ MENUITEM "E&xit...", ID_APP_EXIT
+ END
+END
+
+
+/*
+ * Icons
+ */
+
+IDI_XWIN ICON "X.ico"
+/* CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "XWin.exe.manifest"*/
diff --git a/xorg-server/hw/xwin/ddraw.h b/xorg-server/hw/xwin/ddraw.h
deleted file mode 100644
index 2eb7c2674..000000000
--- a/xorg-server/hw/xwin/ddraw.h
+++ /dev/null
@@ -1,2106 +0,0 @@
-#ifndef __XWIN_DDRAW_H
-#define __XWIN_DDRAW_H
-
-#include <winnt.h>
-#include <wingdi.h>
-#include <objbase.h>
-
-#if defined(NONAMELESSUNION) && !defined(DUMMYUNIONNAME1)
-#define DUMMYUNIONNAME1 u1
-#endif
-
-#define ICOM_CALL_( xfn, p, args) (p)->lpVtbl->xfn args
-
-# ifdef UNICODE
-# define WINELIB_NAME_AW(func) func##W
-# else
-# define WINELIB_NAME_AW(func) func##A
-# endif /* UNICODE */
-#define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* defined(__cplusplus) */
-
-#ifndef DIRECTDRAW_VERSION
-#define DIRECTDRAW_VERSION 0x0700
-#endif /* DIRECTDRAW_VERSION */
-
-/*****************************************************************************
- * Predeclare the interfaces
- */
-DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
-DEFINE_GUID( CLSID_DirectDraw7, 0x3C305196,0x50DB,0x11D3,0x9C,0xFE,0x00,0xC0,0x4F,0xD9,0x30,0xC5 );
-DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
-DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
-DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
-DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
-DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
-DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
-DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
-DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
-DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
-DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
-DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
-DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
-DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
-DEFINE_GUID( IID_IDirectDrawGammaControl,0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
-
-typedef struct IDirectDraw *LPDIRECTDRAW;
-typedef struct IDirectDraw2 *LPDIRECTDRAW2;
-typedef struct IDirectDraw4 *LPDIRECTDRAW4;
-typedef struct IDirectDraw7 *LPDIRECTDRAW7;
-typedef struct IDirectDrawClipper *LPDIRECTDRAWCLIPPER;
-typedef struct IDirectDrawPalette *LPDIRECTDRAWPALETTE;
-typedef struct IDirectDrawSurface *LPDIRECTDRAWSURFACE;
-typedef struct IDirectDrawSurface2 *LPDIRECTDRAWSURFACE2;
-typedef struct IDirectDrawSurface3 *LPDIRECTDRAWSURFACE3;
-typedef struct IDirectDrawSurface4 *LPDIRECTDRAWSURFACE4;
-typedef struct IDirectDrawSurface7 *LPDIRECTDRAWSURFACE7;
-typedef struct IDirectDrawColorControl *LPDIRECTDRAWCOLORCONTROL;
-typedef struct IDirectDrawGammaControl *LPDIRECTDRAWGAMMACONTROL;
-
-
-#define DDENUMRET_CANCEL 0
-#define DDENUMRET_OK 1
-
-#define DD_OK 0
-
-
-#define _FACDD 0x876
-#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
-
-#define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
-#define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
-#define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
-#define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
-#define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
-#define DDERR_GENERIC E_FAIL
-#define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
-#define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
-#define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
-#define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
-#define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
-#define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
-#define DDERR_INVALIDPARAMS E_INVALIDARG
-#define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
-#define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
-#define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
-#define DDERR_NO3D MAKE_DDHRESULT( 170 )
-#define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
-#define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 )
-#define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 )
-#define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
-#define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
-#define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
-#define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
-#define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
-#define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
-#define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
-#define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
-#define DDERR_NOGDI MAKE_DDHRESULT( 240 )
-#define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
-#define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
-#define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
-#define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 )
-#define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
-#define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
-#define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
-#define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
-#define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
-#define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
-#define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
-#define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
-#define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
-#define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
-#define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
-#define DDERR_OUTOFMEMORY E_OUTOFMEMORY
-#define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
-#define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
-#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
-#define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
-#define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
-#define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
-#define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
-#define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
-#define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
-#define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
-#define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
-#define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
-#define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
-#define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
-#define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
-#define DDERR_UNSUPPORTED E_NOTIMPL
-#define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
-#define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
-#define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 )
-#define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
-#define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
-#define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 )
-#define DDERR_XALIGN MAKE_DDHRESULT( 560 )
-#define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
-#define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
-#define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
-#define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
-#define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
-#define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
-#define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
-#define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
-#define DDERR_NOHWND MAKE_DDHRESULT( 569 )
-#define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
-#define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
-#define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
-#define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
-#define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
-#define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
-#define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
-#define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
-#define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
-#define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
-#define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
-#define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
-#define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
-#define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
-#define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
-#define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
-#define DDERR_NODC MAKE_DDHRESULT( 586 )
-#define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
-#define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
-#define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
-#define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
-#define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
-#define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
-#define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
-#define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
-#define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
-#define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 )
-#define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
-#define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
-#define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
-#define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
-#define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
-#define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
-#define DDERR_EXPIRED MAKE_DDHRESULT( 691 )
-#define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 )
-#define DDERR_NEWMODE MAKE_DDHRESULT( 693 )
-#define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 )
-#define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
-#define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 )
-#define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 )
-#define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
-#define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
-
-/* dwFlags for Blt* */
-#define DDBLT_ALPHADEST 0x00000001
-#define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002
-#define DDBLT_ALPHADESTNEG 0x00000004
-#define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008
-#define DDBLT_ALPHAEDGEBLEND 0x00000010
-#define DDBLT_ALPHASRC 0x00000020
-#define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040
-#define DDBLT_ALPHASRCNEG 0x00000080
-#define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100
-#define DDBLT_ASYNC 0x00000200
-#define DDBLT_COLORFILL 0x00000400
-#define DDBLT_DDFX 0x00000800
-#define DDBLT_DDROPS 0x00001000
-#define DDBLT_KEYDEST 0x00002000
-#define DDBLT_KEYDESTOVERRIDE 0x00004000
-#define DDBLT_KEYSRC 0x00008000
-#define DDBLT_KEYSRCOVERRIDE 0x00010000
-#define DDBLT_ROP 0x00020000
-#define DDBLT_ROTATIONANGLE 0x00040000
-#define DDBLT_ZBUFFER 0x00080000
-#define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000
-#define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000
-#define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000
-#define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000
-#define DDBLT_WAIT 0x01000000
-#define DDBLT_DEPTHFILL 0x02000000
-#define DDBLT_DONOTWAIT 0x08000000
-
-/* dwTrans for BltFast */
-#define DDBLTFAST_NOCOLORKEY 0x00000000
-#define DDBLTFAST_SRCCOLORKEY 0x00000001
-#define DDBLTFAST_DESTCOLORKEY 0x00000002
-#define DDBLTFAST_WAIT 0x00000010
-#define DDBLTFAST_DONOTWAIT 0x00000020
-
-/* dwFlags for Flip */
-#define DDFLIP_WAIT 0x00000001
-#define DDFLIP_EVEN 0x00000002 /* only valid for overlay */
-#define DDFLIP_ODD 0x00000004 /* only valid for overlay */
-#define DDFLIP_NOVSYNC 0x00000008
-#define DDFLIP_STEREO 0x00000010
-#define DDFLIP_DONOTWAIT 0x00000020
-
-/* dwFlags for GetBltStatus */
-#define DDGBS_CANBLT 0x00000001
-#define DDGBS_ISBLTDONE 0x00000002
-
-/* dwFlags for IDirectDrawSurface7::GetFlipStatus */
-#define DDGFS_CANFLIP 1L
-#define DDGFS_ISFLIPDONE 2L
-
-/* dwFlags for IDirectDrawSurface7::SetPrivateData */
-#define DDSPD_IUNKNOWNPTR 1L
-#define DDSPD_VOLATILE 2L
-
-/* DDSCAPS.dwCaps */
-/* reserved1, was 3d capable */
-#define DDSCAPS_RESERVED1 0x00000001
-/* surface contains alpha information */
-#define DDSCAPS_ALPHA 0x00000002
-/* this surface is a backbuffer */
-#define DDSCAPS_BACKBUFFER 0x00000004
-/* complex surface structure */
-#define DDSCAPS_COMPLEX 0x00000008
-/* part of surface flipping structure */
-#define DDSCAPS_FLIP 0x00000010
-/* this surface is the frontbuffer surface */
-#define DDSCAPS_FRONTBUFFER 0x00000020
-/* this is a plain offscreen surface */
-#define DDSCAPS_OFFSCREENPLAIN 0x00000040
-/* overlay */
-#define DDSCAPS_OVERLAY 0x00000080
-/* palette objects can be created and attached to us */
-#define DDSCAPS_PALETTE 0x00000100
-/* primary surface (the one the user looks at currently)(right eye)*/
-#define DDSCAPS_PRIMARYSURFACE 0x00000200
-/* primary surface for left eye */
-#define DDSCAPS_PRIMARYSURFACELEFT 0x00000400
-/* surface exists in systemmemory */
-#define DDSCAPS_SYSTEMMEMORY 0x00000800
-/* surface can be used as a texture */
-#define DDSCAPS_TEXTURE 0x00001000
-/* surface may be destination for 3d rendering */
-#define DDSCAPS_3DDEVICE 0x00002000
-/* surface exists in videomemory */
-#define DDSCAPS_VIDEOMEMORY 0x00004000
-/* surface changes immediately visible */
-#define DDSCAPS_VISIBLE 0x00008000
-/* write only surface */
-#define DDSCAPS_WRITEONLY 0x00010000
-/* zbuffer surface */
-#define DDSCAPS_ZBUFFER 0x00020000
-/* has its own DC */
-#define DDSCAPS_OWNDC 0x00040000
-/* surface should be able to receive live video */
-#define DDSCAPS_LIVEVIDEO 0x00080000
-/* should be able to have a hw codec decompress stuff into it */
-#define DDSCAPS_HWCODEC 0x00100000
-/* mode X (320x200 or 320x240) surface */
-#define DDSCAPS_MODEX 0x00200000
-/* one mipmap surface (1 level) */
-#define DDSCAPS_MIPMAP 0x00400000
-#define DDSCAPS_RESERVED2 0x00800000
-/* memory allocation delayed until Load() */
-#define DDSCAPS_ALLOCONLOAD 0x04000000
-/* Indicates that the surface will receive data from a video port */
-#define DDSCAPS_VIDEOPORT 0x08000000
-/* surface is in local videomemory */
-#define DDSCAPS_LOCALVIDMEM 0x10000000
-/* surface is in nonlocal videomemory */
-#define DDSCAPS_NONLOCALVIDMEM 0x20000000
-/* surface is a standard VGA mode surface (NOT ModeX) */
-#define DDSCAPS_STANDARDVGAMODE 0x40000000
-/* optimized? surface */
-#define DDSCAPS_OPTIMIZED 0x80000000
-
-typedef struct _DDSCAPS {
- DWORD dwCaps; /* capabilities of surface wanted */
-} DDSCAPS,*LPDDSCAPS;
-
-/* DDSCAPS2.dwCaps2 */
-/* indicates the surface will receive data from a video port using
- deinterlacing hardware. */
-#define DDSCAPS2_HARDWAREDEINTERLACE 0x00000002
-/* indicates the surface will be locked very frequently. */
-#define DDSCAPS2_HINTDYNAMIC 0x00000004
-/* indicates surface can be re-ordered or retiled on load() */
-#define DDSCAPS2_HINTSTATIC 0x00000008
-/* indicates surface to be managed by directdraw/direct3D */
-#define DDSCAPS2_TEXTUREMANAGE 0x00000010
-/* reserved bits */
-#define DDSCAPS2_RESERVED1 0x00000020
-#define DDSCAPS2_RESERVED2 0x00000040
-/* indicates surface will never be locked again */
-#define DDSCAPS2_OPAQUE 0x00000080
-/* set at CreateSurface() time to indicate antialising will be used */
-#define DDSCAPS2_HINTANTIALIASING 0x00000100
-/* set at CreateSurface() time to indicate cubic environment map */
-#define DDSCAPS2_CUBEMAP 0x00000200
-/* face flags for cube maps */
-#define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
-#define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
-#define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
-#define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
-#define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
-#define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
-/* specifies all faces of a cube for CreateSurface() */
-#define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
- DDSCAPS2_CUBEMAP_NEGATIVEX |\
- DDSCAPS2_CUBEMAP_POSITIVEY |\
- DDSCAPS2_CUBEMAP_NEGATIVEY |\
- DDSCAPS2_CUBEMAP_POSITIVEZ |\
- DDSCAPS2_CUBEMAP_NEGATIVEZ )
-/* set for mipmap sublevels on DirectX7 and later. ignored by CreateSurface() */
-#define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000
-/* indicates texture surface to be managed by Direct3D *only* */
-#define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000
-/* indicates managed surface that can safely be lost */
-#define DDSCAPS2_DONOTPERSIST 0x00040000
-/* indicates surface is part of a stereo flipping chain */
-#define DDSCAPS2_STEREOSURFACELEFT 0x00080000
-
-typedef struct _DDSCAPS2 {
- DWORD dwCaps; /* capabilities of surface wanted */
- DWORD dwCaps2; /* additional capabilities */
- DWORD dwCaps3; /* reserved capabilities */
- DWORD dwCaps4; /* more reserved capabilities */
-} DDSCAPS2,*LPDDSCAPS2;
-
-#define DD_ROP_SPACE (256/32) /* space required to store ROP array */
-
-typedef struct _DDCAPS_DX7 /* DirectX 7 version of caps struct */
-{
- DWORD dwSize; /* size of the DDDRIVERCAPS structure */
- DWORD dwCaps; /* driver specific capabilities */
- DWORD dwCaps2; /* more driver specific capabilites */
- DWORD dwCKeyCaps; /* color key capabilities of the surface */
- DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
- DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
- DWORD dwPalCaps; /* palette capabilities */
- DWORD dwSVCaps; /* stereo vision capabilities */
- DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
- DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
- DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
- DWORD dwVidMemTotal; /* total amount of video memory */
- DWORD dwVidMemFree; /* amount of free video memory */
- DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
- DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
- DWORD dwNumFourCCCodes; /* number of four cc codes */
- DWORD dwAlignBoundarySrc; /* source rectangle alignment */
- DWORD dwAlignSizeSrc; /* source rectangle byte size */
- DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
- DWORD dwAlignSizeDest; /* dest rectangle byte size */
- DWORD dwAlignStrideAlign; /* stride alignment */
- DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
- DDSCAPS ddsOldCaps; /* old DDSCAPS - superceded for DirectX6+ */
- DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwReserved1;
- DWORD dwReserved2;
- DWORD dwReserved3;
- DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
- DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
- DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
- DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
- DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
- DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
- DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
- DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
- DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
- DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
- DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
- DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
- DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
- DWORD dwCurrVideoPorts; /* current number of video ports used */
- DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
- DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
- DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
- DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
- DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
- DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
- DDSCAPS2 ddsCaps; /* surface capabilities */
-} DDCAPS_DX7,*LPDDCAPS_DX7;
-
-typedef struct _DDCAPS_DX6 /* DirectX 6 version of caps struct */
-{
- DWORD dwSize; /* size of the DDDRIVERCAPS structure */
- DWORD dwCaps; /* driver specific capabilities */
- DWORD dwCaps2; /* more driver specific capabilites */
- DWORD dwCKeyCaps; /* color key capabilities of the surface */
- DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
- DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
- DWORD dwPalCaps; /* palette capabilities */
- DWORD dwSVCaps; /* stereo vision capabilities */
- DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
- DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
- DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
- DWORD dwVidMemTotal; /* total amount of video memory */
- DWORD dwVidMemFree; /* amount of free video memory */
- DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
- DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
- DWORD dwNumFourCCCodes; /* number of four cc codes */
- DWORD dwAlignBoundarySrc; /* source rectangle alignment */
- DWORD dwAlignSizeSrc; /* source rectangle byte size */
- DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
- DWORD dwAlignSizeDest; /* dest rectangle byte size */
- DWORD dwAlignStrideAlign; /* stride alignment */
- DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
- DDSCAPS ddsOldCaps; /* old DDSCAPS - superceded for DirectX6+ */
- DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwReserved1;
- DWORD dwReserved2;
- DWORD dwReserved3;
- DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
- DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
- DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
- DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
- DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
- DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
- DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
- DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
- DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
- DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
- DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
- DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
- DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
- DWORD dwCurrVideoPorts; /* current number of video ports used */
- DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
- DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
- DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
- DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
- DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
- DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
- /* and one new member for DirectX 6 */
- DDSCAPS2 ddsCaps; /* surface capabilities */
-} DDCAPS_DX6,*LPDDCAPS_DX6;
-
-typedef struct _DDCAPS_DX5 /* DirectX5 version of caps struct */
-{
- DWORD dwSize; /* size of the DDDRIVERCAPS structure */
- DWORD dwCaps; /* driver specific capabilities */
- DWORD dwCaps2; /* more driver specific capabilites */
- DWORD dwCKeyCaps; /* color key capabilities of the surface */
- DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
- DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
- DWORD dwPalCaps; /* palette capabilities */
- DWORD dwSVCaps; /* stereo vision capabilities */
- DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
- DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
- DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
- DWORD dwVidMemTotal; /* total amount of video memory */
- DWORD dwVidMemFree; /* amount of free video memory */
- DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
- DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
- DWORD dwNumFourCCCodes; /* number of four cc codes */
- DWORD dwAlignBoundarySrc; /* source rectangle alignment */
- DWORD dwAlignSizeSrc; /* source rectangle byte size */
- DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
- DWORD dwAlignSizeDest; /* dest rectangle byte size */
- DWORD dwAlignStrideAlign; /* stride alignment */
- DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
- DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
- DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwReserved1;
- DWORD dwReserved2;
- DWORD dwReserved3;
- DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
- DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
- DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
- DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
- DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
- DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
- DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
- DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
- DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
- DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
- DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
- DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
- /* the following are the new DirectX 5 members */
- DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
- DWORD dwCurrVideoPorts; /* current number of video ports used */
- DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
- DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
- DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
- DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
- DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
- DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
-} DDCAPS_DX5,*LPDDCAPS_DX5;
-
-typedef struct _DDCAPS_DX3 /* DirectX3 version of caps struct */
-{
- DWORD dwSize; /* size of the DDDRIVERCAPS structure */
- DWORD dwCaps; /* driver specific capabilities */
- DWORD dwCaps2; /* more driver specific capabilites */
- DWORD dwCKeyCaps; /* color key capabilities of the surface */
- DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
- DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
- DWORD dwPalCaps; /* palette capabilities */
- DWORD dwSVCaps; /* stereo vision capabilities */
- DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
- DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
- DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
- DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
- DWORD dwVidMemTotal; /* total amount of video memory */
- DWORD dwVidMemFree; /* amount of free video memory */
- DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
- DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
- DWORD dwNumFourCCCodes; /* number of four cc codes */
- DWORD dwAlignBoundarySrc; /* source rectangle alignment */
- DWORD dwAlignSizeSrc; /* source rectangle byte size */
- DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
- DWORD dwAlignSizeDest; /* dest rectangle byte size */
- DWORD dwAlignStrideAlign; /* stride alignment */
- DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
- DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
- DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
- DWORD dwReserved1;
- DWORD dwReserved2;
- DWORD dwReserved3;
- DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
- DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
- DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
- DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
- DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
- DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
- DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
- DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
- DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
- DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
- DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
- DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
- DWORD dwReserved4;
- DWORD dwReserved5;
- DWORD dwReserved6;
-} DDCAPS_DX3,*LPDDCAPS_DX3;
-
-/* set caps struct according to DIRECTDRAW_VERSION */
-
-#if DIRECTDRAW_VERSION <= 0x300
-typedef DDCAPS_DX3 DDCAPS;
-#elif DIRECTDRAW_VERSION <= 0x500
-typedef DDCAPS_DX5 DDCAPS;
-#elif DIRECTDRAW_VERSION <= 0x600
-typedef DDCAPS_DX6 DDCAPS;
-#else
-typedef DDCAPS_DX7 DDCAPS;
-#endif
-
-typedef DDCAPS *LPDDCAPS;
-
-/* DDCAPS.dwCaps */
-#define DDCAPS_3D 0x00000001
-#define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
-#define DDCAPS_ALIGNSIZEDEST 0x00000004
-#define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
-#define DDCAPS_ALIGNSIZESRC 0x00000010
-#define DDCAPS_ALIGNSTRIDE 0x00000020
-#define DDCAPS_BLT 0x00000040
-#define DDCAPS_BLTQUEUE 0x00000080
-#define DDCAPS_BLTFOURCC 0x00000100
-#define DDCAPS_BLTSTRETCH 0x00000200
-#define DDCAPS_GDI 0x00000400
-#define DDCAPS_OVERLAY 0x00000800
-#define DDCAPS_OVERLAYCANTCLIP 0x00001000
-#define DDCAPS_OVERLAYFOURCC 0x00002000
-#define DDCAPS_OVERLAYSTRETCH 0x00004000
-#define DDCAPS_PALETTE 0x00008000
-#define DDCAPS_PALETTEVSYNC 0x00010000
-#define DDCAPS_READSCANLINE 0x00020000
-#define DDCAPS_STEREOVIEW 0x00040000
-#define DDCAPS_VBI 0x00080000
-#define DDCAPS_ZBLTS 0x00100000
-#define DDCAPS_ZOVERLAYS 0x00200000
-#define DDCAPS_COLORKEY 0x00400000
-#define DDCAPS_ALPHA 0x00800000
-#define DDCAPS_COLORKEYHWASSIST 0x01000000
-#define DDCAPS_NOHARDWARE 0x02000000
-#define DDCAPS_BLTCOLORFILL 0x04000000
-#define DDCAPS_BANKSWITCHED 0x08000000
-#define DDCAPS_BLTDEPTHFILL 0x10000000
-#define DDCAPS_CANCLIP 0x20000000
-#define DDCAPS_CANCLIPSTRETCHED 0x40000000
-#define DDCAPS_CANBLTSYSMEM 0x80000000
-
-/* DDCAPS.dwCaps2 */
-#define DDCAPS2_CERTIFIED 0x00000001
-#define DDCAPS2_NO2DDURING3DSCENE 0x00000002
-#define DDCAPS2_VIDEOPORT 0x00000004
-#define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
-#define DDCAPS2_CANBOBINTERLEAVED 0x00000010
-#define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
-#define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
-#define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
-#define DDCAPS2_CANDROPZ16BIT 0x00000100
-#define DDCAPS2_NONLOCALVIDMEM 0x00000200
-#define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
-#define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
-#define DDCAPS2_WIDESURFACES 0x00001000
-#define DDCAPS2_CANFLIPODDEVEN 0x00002000
-#define DDCAPS2_CANBOBHARDWARE 0x00004000
-#define DDCAPS2_COPYFOURCC 0x00008000
-#define DDCAPS2_PRIMARYGAMMA 0x00020000
-#define DDCAPS2_CANRENDERWINDOWED 0x00080000
-#define DDCAPS2_CANCALIBRATEGAMMA 0x00100000
-#define DDCAPS2_FLIPINTERVAL 0x00200000
-#define DDCAPS2_FLIPNOVSYNC 0x00400000
-#define DDCAPS2_CANMANAGETEXTURE 0x00800000
-#define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000
-#define DDCAPS2_STEREO 0x02000000
-#define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000
-
-
-/* Set/Get Colour Key Flags */
-#define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
-#define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
-#define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
-#define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
-#define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
-
-typedef struct _DDCOLORKEY
-{
- DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
- * be treated as Color Key, inclusive
- */
- DWORD dwColorSpaceHighValue;/* high boundary of color space that is
- * to be treated as Color Key, inclusive
- */
-} DDCOLORKEY,*LPDDCOLORKEY;
-
-/* ddCKEYCAPS bits */
-#define DDCKEYCAPS_DESTBLT 0x00000001
-#define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
-#define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
-#define DDCKEYCAPS_DESTBLTYUV 0x00000008
-#define DDCKEYCAPS_DESTOVERLAY 0x00000010
-#define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
-#define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
-#define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
-#define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
-#define DDCKEYCAPS_SRCBLT 0x00000200
-#define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
-#define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
-#define DDCKEYCAPS_SRCBLTYUV 0x00001000
-#define DDCKEYCAPS_SRCOVERLAY 0x00002000
-#define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
-#define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
-#define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
-#define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
-#define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
-
-typedef struct _DDPIXELFORMAT {
- DWORD dwSize; /* 0: size of structure */
- DWORD dwFlags; /* 4: pixel format flags */
- DWORD dwFourCC; /* 8: (FOURCC code) */
- union {
- DWORD dwRGBBitCount; /* C: how many bits per pixel */
- DWORD dwYUVBitCount; /* C: how many bits per pixel */
- DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
- DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
- DWORD dwLuminanceBitCount;
- DWORD dwBumpBitCount;
- } DUMMYUNIONNAME1;
- union {
- DWORD dwRBitMask; /* 10: mask for red bit*/
- DWORD dwYBitMask; /* 10: mask for Y bits*/
- DWORD dwStencilBitDepth;
- DWORD dwLuminanceBitMask;
- DWORD dwBumpDuBitMask;
- } DUMMYUNIONNAME2;
- union {
- DWORD dwGBitMask; /* 14: mask for green bits*/
- DWORD dwUBitMask; /* 14: mask for U bits*/
- DWORD dwZBitMask;
- DWORD dwBumpDvBitMask;
- } DUMMYUNIONNAME3;
- union {
- DWORD dwBBitMask; /* 18: mask for blue bits*/
- DWORD dwVBitMask; /* 18: mask for V bits*/
- DWORD dwStencilBitMask;
- DWORD dwBumpLuminanceBitMask;
- } DUMMYUNIONNAME4;
- union {
- DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
- DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
- DWORD dwLuminanceAlphaBitMask;
- DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
- DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
- } DUMMYUNIONNAME5;
- /* 20: next structure */
-} DDPIXELFORMAT,*LPDDPIXELFORMAT;
-
-/* DDCAPS.dwFXCaps */
-#define DDFXCAPS_BLTALPHA 0x00000001
-#define DDFXCAPS_OVERLAYALPHA 0x00000004
-#define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
-#define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
-#define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
-#define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
-#define DDFXCAPS_BLTROTATION 0x00000100
-#define DDFXCAPS_BLTROTATION90 0x00000200
-#define DDFXCAPS_BLTSHRINKX 0x00000400
-#define DDFXCAPS_BLTSHRINKXN 0x00000800
-#define DDFXCAPS_BLTSHRINKY 0x00001000
-#define DDFXCAPS_BLTSHRINKYN 0x00002000
-#define DDFXCAPS_BLTSTRETCHX 0x00004000
-#define DDFXCAPS_BLTSTRETCHXN 0x00008000
-#define DDFXCAPS_BLTSTRETCHY 0x00010000
-#define DDFXCAPS_BLTSTRETCHYN 0x00020000
-#define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
-#define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
-#define DDFXCAPS_OVERLAYSHRINKX 0x00080000
-#define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
-#define DDFXCAPS_OVERLAYSHRINKY 0x00200000
-#define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
-#define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
-#define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
-#define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
-#define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
-#define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
-#define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
-
-#define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
-
-/* DDCAPS.dwFXAlphaCaps */
-#define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
-#define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
-#define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
-#define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
-#define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
-#define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
-#define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
-#define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
-#define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
-#define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
-
-/* DDCAPS.dwPalCaps */
-#define DDPCAPS_4BIT 0x00000001
-#define DDPCAPS_8BITENTRIES 0x00000002
-#define DDPCAPS_8BIT 0x00000004
-#define DDPCAPS_INITIALIZE 0x00000008
-#define DDPCAPS_PRIMARYSURFACE 0x00000010
-#define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
-#define DDPCAPS_ALLOW256 0x00000040
-#define DDPCAPS_VSYNC 0x00000080
-#define DDPCAPS_1BIT 0x00000100
-#define DDPCAPS_2BIT 0x00000200
-#define DDPCAPS_ALPHA 0x00000400
-
-/* DDCAPS.dwSVCaps */
-/* the first 4 of these are now obsolete */
-#if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occured */
-#define DDSVCAPS_RESERVED1 0x00000001
-#define DDSVCAPS_RESERVED2 0x00000002
-#define DDSVCAPS_RESERVED3 0x00000004
-#define DDSVCAPS_RESERVED4 0x00000008
-#else
-#define DDSVCAPS_ENIGMA 0x00000001
-#define DDSVCAPS_FLICKER 0x00000002
-#define DDSVCAPS_REDBLUE 0x00000004
-#define DDSVCAPS_SPLIT 0x00000008
-#endif
-#define DDSVCAPS_STEREOSEQUENTIAL 0x00000010
-
-/* BitDepths */
-#define DDBD_1 0x00004000
-#define DDBD_2 0x00002000
-#define DDBD_4 0x00001000
-#define DDBD_8 0x00000800
-#define DDBD_16 0x00000400
-#define DDBD_24 0x00000200
-#define DDBD_32 0x00000100
-
-/* DDOVERLAYFX.dwDDFX */
-#define DDOVERFX_ARITHSTRETCHY 0x00000001
-#define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
-#define DDOVERFX_MIRRORUPDOWN 0x00000004
-
-/* UpdateOverlay flags */
-#define DDOVER_ALPHADEST 0x00000001
-#define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
-#define DDOVER_ALPHADESTNEG 0x00000004
-#define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
-#define DDOVER_ALPHAEDGEBLEND 0x00000010
-#define DDOVER_ALPHASRC 0x00000020
-#define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
-#define DDOVER_ALPHASRCNEG 0x00000080
-#define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
-#define DDOVER_HIDE 0x00000200
-#define DDOVER_KEYDEST 0x00000400
-#define DDOVER_KEYDESTOVERRIDE 0x00000800
-#define DDOVER_KEYSRC 0x00001000
-#define DDOVER_KEYSRCOVERRIDE 0x00002000
-#define DDOVER_SHOW 0x00004000
-#define DDOVER_ADDDIRTYRECT 0x00008000
-#define DDOVER_REFRESHDIRTYRECTS 0x00010000
-#define DDOVER_REFRESHALL 0x00020000
-#define DDOVER_DDFX 0x00080000
-#define DDOVER_AUTOFLIP 0x00100000
-#define DDOVER_BOB 0x00200000
-#define DDOVER_OVERRIDEBOBWEAVE 0x00400000
-#define DDOVER_INTERLEAVED 0x00800000
-
-/* DDCOLORKEY.dwFlags */
-#define DDPF_ALPHAPIXELS 0x00000001
-#define DDPF_ALPHA 0x00000002
-#define DDPF_FOURCC 0x00000004
-#define DDPF_PALETTEINDEXED4 0x00000008
-#define DDPF_PALETTEINDEXEDTO8 0x00000010
-#define DDPF_PALETTEINDEXED8 0x00000020
-#define DDPF_RGB 0x00000040
-#define DDPF_COMPRESSED 0x00000080
-#define DDPF_RGBTOYUV 0x00000100
-#define DDPF_YUV 0x00000200
-#define DDPF_ZBUFFER 0x00000400
-#define DDPF_PALETTEINDEXED1 0x00000800
-#define DDPF_PALETTEINDEXED2 0x00001000
-#define DDPF_ZPIXELS 0x00002000
-#define DDPF_STENCILBUFFER 0x00004000
-#define DDPF_ALPHAPREMULT 0x00008000
-#define DDPF_LUMINANCE 0x00020000
-#define DDPF_BUMPLUMINANCE 0x00040000
-#define DDPF_BUMPDUDV 0x00080000
-
-/* SetCooperativeLevel dwFlags */
-#define DDSCL_FULLSCREEN 0x00000001
-#define DDSCL_ALLOWREBOOT 0x00000002
-#define DDSCL_NOWINDOWCHANGES 0x00000004
-#define DDSCL_NORMAL 0x00000008
-#define DDSCL_EXCLUSIVE 0x00000010
-#define DDSCL_ALLOWMODEX 0x00000040
-#define DDSCL_SETFOCUSWINDOW 0x00000080
-#define DDSCL_SETDEVICEWINDOW 0x00000100
-#define DDSCL_CREATEDEVICEWINDOW 0x00000200
-#define DDSCL_MULTITHREADED 0x00000400
-#define DDSCL_FPUSETUP 0x00000800
-#define DDSCL_FPUPRESERVE 0x00001000
-
-
-/* DDSURFACEDESC.dwFlags */
-#define DDSD_CAPS 0x00000001
-#define DDSD_HEIGHT 0x00000002
-#define DDSD_WIDTH 0x00000004
-#define DDSD_PITCH 0x00000008
-#define DDSD_BACKBUFFERCOUNT 0x00000020
-#define DDSD_ZBUFFERBITDEPTH 0x00000040
-#define DDSD_ALPHABITDEPTH 0x00000080
-#define DDSD_LPSURFACE 0x00000800
-#define DDSD_PIXELFORMAT 0x00001000
-#define DDSD_CKDESTOVERLAY 0x00002000
-#define DDSD_CKDESTBLT 0x00004000
-#define DDSD_CKSRCOVERLAY 0x00008000
-#define DDSD_CKSRCBLT 0x00010000
-#define DDSD_MIPMAPCOUNT 0x00020000
-#define DDSD_REFRESHRATE 0x00040000
-#define DDSD_LINEARSIZE 0x00080000
-#define DDSD_TEXTURESTAGE 0x00100000
-#define DDSD_FVF 0x00200000
-#define DDSD_SRCVBHANDLE 0x00400000
-#define DDSD_ALL 0x007ff9ee
-
-/* EnumSurfaces flags */
-#define DDENUMSURFACES_ALL 0x00000001
-#define DDENUMSURFACES_MATCH 0x00000002
-#define DDENUMSURFACES_NOMATCH 0x00000004
-#define DDENUMSURFACES_CANBECREATED 0x00000008
-#define DDENUMSURFACES_DOESEXIST 0x00000010
-
-/* SetDisplayMode flags */
-#define DDSDM_STANDARDVGAMODE 0x00000001
-
-/* EnumDisplayModes flags */
-#define DDEDM_REFRESHRATES 0x00000001
-#define DDEDM_STANDARDVGAMODES 0x00000002
-
-/* WaitForVerticalDisplay flags */
-
-#define DDWAITVB_BLOCKBEGIN 0x00000001
-#define DDWAITVB_BLOCKBEGINEVENT 0x00000002
-#define DDWAITVB_BLOCKEND 0x00000004
-
-typedef struct _DDSURFACEDESC
-{
- DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
- DWORD dwFlags; /* 4: determines what fields are valid*/
- DWORD dwHeight; /* 8: height of surface to be created*/
- DWORD dwWidth; /* C: width of input surface*/
- union {
- LONG lPitch; /* 10: distance to start of next line (return value only)*/
- DWORD dwLinearSize;
- } DUMMYUNIONNAME1;
- DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
- union {
- DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
- DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
- DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
- } DUMMYUNIONNAME2;
- DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
- DWORD dwReserved; /* 20:reserved*/
- LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
- DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
- DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
- DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
- DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
- DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
- DDSCAPS ddsCaps; /* 68: direct draw surface caps */
-} DDSURFACEDESC,*LPDDSURFACEDESC;
-
-typedef struct _DDSURFACEDESC2
-{
- DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
- DWORD dwFlags; /* 4: determines what fields are valid*/
- DWORD dwHeight; /* 8: height of surface to be created*/
- DWORD dwWidth; /* C: width of input surface*/
- union {
- LONG lPitch; /*10: distance to start of next line (return value only)*/
- DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
- } DUMMYUNIONNAME1;
- DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
- union {
- DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
- DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
- DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
- } DUMMYUNIONNAME2;
- DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
- DWORD dwReserved; /* 20:reserved*/
- LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
- union {
- DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
- DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
- } DUMMYUNIONNAME3;
- DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
- DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
- DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
-
- union {
- DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
- DWORD dwFVF; /* 48: vertex format description of vertex buffers */
- } DUMMYUNIONNAME4;
- DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */
- DWORD dwTextureStage; /* 78: stage in multitexture cascade */
-} DDSURFACEDESC2,*LPDDSURFACEDESC2;
-
-/* DDCOLORCONTROL.dwFlags */
-#define DDCOLOR_BRIGHTNESS 0x00000001
-#define DDCOLOR_CONTRAST 0x00000002
-#define DDCOLOR_HUE 0x00000004
-#define DDCOLOR_SATURATION 0x00000008
-#define DDCOLOR_SHARPNESS 0x00000010
-#define DDCOLOR_GAMMA 0x00000020
-#define DDCOLOR_COLORENABLE 0x00000040
-
-typedef struct {
- DWORD dwSize;
- DWORD dwFlags;
- LONG lBrightness;
- LONG lContrast;
- LONG lHue;
- LONG lSaturation;
- LONG lSharpness;
- LONG lGamma;
- LONG lColorEnable;
- DWORD dwReserved1;
-} DDCOLORCONTROL,*LPDDCOLORCONTROL;
-
-typedef struct {
- WORD red[256];
- WORD green[256];
- WORD blue[256];
-} DDGAMMARAMP,*LPDDGAMMARAMP;
-
-typedef BOOL CALLBACK (*LPDDENUMCALLBACKA)(GUID *, LPSTR, LPSTR, LPVOID);
-typedef BOOL CALLBACK (*LPDDENUMCALLBACKW)(GUID *, LPWSTR, LPWSTR, LPVOID);
-DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
-
-typedef HRESULT CALLBACK (*LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
-typedef HRESULT CALLBACK (*LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
-typedef HRESULT CALLBACK (*LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
-typedef HRESULT CALLBACK (*LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
-typedef HRESULT CALLBACK (*LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID);
-
-typedef BOOL CALLBACK (*LPDDENUMCALLBACKEXA)(GUID *, LPSTR, LPSTR, LPVOID, HMONITOR);
-typedef BOOL CALLBACK (*LPDDENUMCALLBACKEXW)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
-DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
-
-HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
-HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
-#define DirectDrawEnumerateEx WINELIB_NAME_AW(DirectDrawEnumerateEx)
-
-/* flags for DirectDrawEnumerateEx */
-#define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
-#define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
-#define DDENUM_NONDISPLAYDEVICES 0x00000004
-
-/* flags for DirectDrawCreate or IDirectDraw::Initialize */
-#define DDCREATE_HARDWAREONLY 1L
-#define DDCREATE_EMULATIONONLY 2L
-
-typedef struct _DDBLTFX
-{
- DWORD dwSize; /* size of structure */
- DWORD dwDDFX; /* FX operations */
- DWORD dwROP; /* Win32 raster operations */
- DWORD dwDDROP; /* Raster operations new for DirectDraw */
- DWORD dwRotationAngle; /* Rotation angle for blt */
- DWORD dwZBufferOpCode; /* ZBuffer compares */
- DWORD dwZBufferLow; /* Low limit of Z buffer */
- DWORD dwZBufferHigh; /* High limit of Z buffer */
- DWORD dwZBufferBaseDest; /* Destination base value */
- DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
- union
- {
- DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
- LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
- } DUMMYUNIONNAME1;
- DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
- union
- {
- DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
- LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
- } DUMMYUNIONNAME2;
- DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
- DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
- DWORD dwReserved;
- DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
- union
- {
- DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
- LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */
- } DUMMYUNIONNAME3;
- DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
- union
- {
- DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
- LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
- } DUMMYUNIONNAME4;
- union
- {
- DWORD dwFillColor; /* color in RGB or Palettized */
- DWORD dwFillDepth; /* depth value for z-buffer */
- DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
- LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */
- } DUMMYUNIONNAME5;
- DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
- DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
-} DDBLTFX,*LPDDBLTFX;
-
-/* dwDDFX */
-/* arithmetic stretching along y axis */
-#define DDBLTFX_ARITHSTRETCHY 0x00000001
-/* mirror on y axis */
-#define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
-/* mirror on x axis */
-#define DDBLTFX_MIRRORUPDOWN 0x00000004
-/* do not tear */
-#define DDBLTFX_NOTEARING 0x00000008
-/* 180 degrees clockwise rotation */
-#define DDBLTFX_ROTATE180 0x00000010
-/* 270 degrees clockwise rotation */
-#define DDBLTFX_ROTATE270 0x00000020
-/* 90 degrees clockwise rotation */
-#define DDBLTFX_ROTATE90 0x00000040
-/* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
-#define DDBLTFX_ZBUFFERRANGE 0x00000080
-/* add dwZBufferBaseDest to every source z value before compare */
-#define DDBLTFX_ZBUFFERBASEDEST 0x00000100
-
-typedef struct _DDOVERLAYFX
-{
- DWORD dwSize; /* size of structure */
- DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
- DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
- DWORD dwReserved;
- DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
- union
- {
- DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
- LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
- } DUMMYUNIONNAME1;
- DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
- union
- {
- DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
- LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
- } DUMMYUNIONNAME2;
- DDCOLORKEY dckDestColorkey; /* DestColorkey override */
- DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
- DWORD dwDDFX; /* Overlay FX */
- DWORD dwFlags; /* flags */
-} DDOVERLAYFX,*LPDDOVERLAYFX;
-
-typedef struct _DDBLTBATCH
-{
- LPRECT lprDest;
- LPDIRECTDRAWSURFACE lpDDSSrc;
- LPRECT lprSrc;
- DWORD dwFlags;
- LPDDBLTFX lpDDBltFx;
-} DDBLTBATCH,*LPDDBLTBATCH;
-
-#define MAX_DDDEVICEID_STRING 512
-
-typedef struct tagDDDEVICEIDENTIFIER {
- char szDriver[MAX_DDDEVICEID_STRING];
- char szDescription[MAX_DDDEVICEID_STRING];
- LARGE_INTEGER liDriverVersion;
- DWORD dwVendorId;
- DWORD dwDeviceId;
- DWORD dwSubSysId;
- DWORD dwRevision;
- GUID guidDeviceIdentifier;
-} DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
-
-typedef struct tagDDDEVICEIDENTIFIER2 {
- char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */
- char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
- LARGE_INTEGER liDriverVersion; /* driver version */
- DWORD dwVendorId; /* vendor ID, zero if unknown */
- DWORD dwDeviceId; /* chipset ID, zero if unknown */
- DWORD dwSubSysId; /* board ID, zero if unknown */
- DWORD dwRevision; /* chipset version, zero if unknown */
- GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */
- DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */
-} DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
-
-/*****************************************************************************
- * IDirectDrawPalette interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectDrawPalette
-DECLARE_INTERFACE_(IDirectDrawPalette,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetCaps)(THIS_ LPDWORD lpdwCaps) PURE;
- STDMETHOD(GetEntries)(THIS_ DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries) PURE;
- STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, DWORD dwFlags, LPPALETTEENTRY lpDDColorTable) PURE;
- STDMETHOD(SetEntries)(THIS_ DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDrawPalette_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDrawPalette_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDrawPalette_Release(p) ICOM_CALL_(Release,p,(p))
- /*** IDirectDrawPalette methods ***/
-#define IDirectDrawPalette_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a))
-#define IDirectDrawPalette_GetEntries(p,a,b,c,d) ICOM_CALL_(GetEntries,p,(p,a,b,c,d))
-#define IDirectDrawPalette_Initialize(p,a,b,c) ICOM_CALL_(Initialize,p,(p,a,b,c))
-#define IDirectDrawPalette_SetEntries(p,a,b,c,d) ICOM_CALL_(SetEntries,p,(p,a,b,c,d))
-
-
-/*****************************************************************************
- * IDirectDrawClipper interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectDrawClipper
-DECLARE_INTERFACE_(IDirectDrawClipper,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClipList)(THIS_ LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize) PURE;
- STDMETHOD(GetHWnd)(THIS_ HWND* lphWnd) PURE;
- STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, DWORD dwFlags) PURE;
- STDMETHOD(IsClipListChanged)(THIS_ BOOL* lpbChanged) PURE;
- STDMETHOD(SetClipList)(THIS_ LPRGNDATA lpClipList, DWORD dwFlags) PURE;
- STDMETHOD(SetHWnd)(THIS_ DWORD dwFlags, HWND hWnd) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDrawClipper_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDrawClipper_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDrawClipper_Release(p) ICOM_CALL_(Release,p,(p))
- /*** IDirectDrawClipper methods ***/
-#define IDirectDrawClipper_GetClipList(p,a,b,c) ICOM_CALL_(GetClipList,p,(p,a,b,c))
-#define IDirectDrawClipper_GetHWnd(p,a) ICOM_CALL_(GetHWnd,p,(p,a))
-#define IDirectDrawClipper_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b))
-#define IDirectDrawClipper_IsClipListChanged(p,a) ICOM_CALL_(IsClipListChanged,p,(p,a))
-#define IDirectDrawClipper_SetClipList(p,a,b) ICOM_CALL_(SetClipList,p,(p,a,b))
-#define IDirectDrawClipper_SetHWnd(p,a,b) ICOM_CALL_(SetHWnd,p,(p,a,b))
-
-
-/*****************************************************************************
- * IDirectDraw interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectDraw
-DECLARE_INTERFACE_(IDirectDraw,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Compact)(THIS) PURE;
- STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER* lplpDDClipper, IUnknown* pUnkOuter) PURE;
- STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE* lplpDDPalette, IUnknown* pUnkOuter) PURE;
- STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE* lplpDDSurface, IUnknown* pUnkOuter) PURE;
- STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE* lplpDupDDSurface) PURE;
- STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE;
- STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
- STDMETHOD(FlipToGDISurface)(THIS) PURE;
- STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
- STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
- STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
- STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE* lplpGDIDDSurface) PURE;
- STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
- STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
- STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL* lpbIsInVB) PURE;
- STDMETHOD(Initialize)(THIS_ GUID* lpGUID) PURE;
- STDMETHOD(RestoreDisplayMode)(THIS) PURE;
- STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
- STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD, DWORD) PURE;
- STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDraw_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDraw_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDraw_Release(p) ICOM_CALL_(Release,p,(p))
- /*** IDirectDraw methods ***/
-#define IDirectDraw_Compact(p) ICOM_CALL_(Compact,p,(p))
-#define IDirectDraw_CreateClipper(p,a,b,c) ICOM_CALL_(CreateClipper,p,(p,a,b,c))
-#define IDirectDraw_CreatePalette(p,a,b,c,d) ICOM_CALL_(CreatePalette,p,(p,a,b,c,d))
-#define IDirectDraw_CreateSurface(p,a,b,c) ICOM_CALL_(CreateSurface,p,(p,a,b,c))
-#define IDirectDraw_DuplicateSurface(p,a,b) ICOM_CALL_(DuplicateSurface,p,(p,a,b))
-#define IDirectDraw_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d))
-#define IDirectDraw_EnumSurfaces(p,a,b,c,d) ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d))
-#define IDirectDraw_FlipToGDISurface(p) ICOM_CALL_(FlipToGDISurface,p,(p))
-#define IDirectDraw_GetCaps(p,a,b) ICOM_CALL_(GetCaps,p,(p,a,b))
-#define IDirectDraw_GetDisplayMode(p,a) ICOM_CALL_(GetDisplayMode,p,(p,a))
-#define IDirectDraw_GetFourCCCodes(p,a,b) ICOM_CALL_(GetFourCCCodes,p,(p,a,b))
-#define IDirectDraw_GetGDISurface(p,a) ICOM_CALL_(GetGDISurface,p,(p,a))
-#define IDirectDraw_GetMonitorFrequency(p,a) ICOM_CALL_(GetMonitorFrequency,p,(p,a))
-#define IDirectDraw_GetScanLine(p,a) ICOM_CALL_(GetScanLine,p,(p,a))
-#define IDirectDraw_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a))
-#define IDirectDraw_Initialize(p,a) ICOM_CALL_(Initialize,p,(p,a))
-#define IDirectDraw_RestoreDisplayMode(p) ICOM_CALL_(RestoreDisplayMode,p,(p))
-#define IDirectDraw_SetCooperativeLevel(p,a,b) ICOM_CALL_(SetCooperativeLevel,p,(p,a,b))
-#define IDirectDraw_SetDisplayMode(p,a,b,c) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c))
-#define IDirectDraw_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b))
-
-
-/* flags for Lock() */
-#define DDLOCK_SURFACEMEMORYPTR 0x00000000
-#define DDLOCK_WAIT 0x00000001
-#define DDLOCK_EVENT 0x00000002
-#define DDLOCK_READONLY 0x00000010
-#define DDLOCK_WRITEONLY 0x00000020
-#define DDLOCK_NOSYSLOCK 0x00000800
-
-
-/*****************************************************************************
- * IDirectDraw2 interface
- */
-/* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
- * arguments of SetDisplayMode has changed !
- */
-#undef INTERFACE
-#define INTERFACE IDirectDraw2
-DECLARE_INTERFACE_(IDirectDraw2,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Compact)(THIS) PURE;
- STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER* lplpDDClipper, IUnknown* pUnkOuter) PURE;
- STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE* lplpDDPalette, IUnknown* pUnkOuter) PURE;
- STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE2* lplpDDSurface, IUnknown* pUnkOuter) PURE;
- STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE2 lpDDSurface, LPDIRECTDRAWSURFACE2* lplpDupDDSurface) PURE;
- STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE;
- STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
- STDMETHOD(FlipToGDISurface)(THIS) PURE;
- STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
- STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
- STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
- STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE2* lplpGDIDDSurface) PURE;
- STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
- STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
- STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL* lpbIsInVB) PURE;
- STDMETHOD(Initialize)(THIS_ GUID* lpGUID) PURE;
- STDMETHOD(RestoreDisplayMode)(THIS) PURE;
- STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
- STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
- STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
-
- STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDraw2_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDraw2_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDraw2_Release(p) ICOM_CALL_(Release,p,(p))
- /*** IDirectDraw methods ***/
-#define IDirectDraw2_Compact(p) ICOM_CALL_(Compact,p,(p))
-#define IDirectDraw2_CreateClipper(p,a,b,c) ICOM_CALL_(CreateClipper,p,(p,a,b,c))
-#define IDirectDraw2_CreatePalette(p,a,b,c,d) ICOM_CALL_(CreatePalette,p,(p,a,b,c,d))
-#define IDirectDraw2_CreateSurface(p,a,b,c) ICOM_CALL_(CreateSurface,p,(p,a,b,c))
-#define IDirectDraw2_DuplicateSurface(p,a,b) ICOM_CALL_(DuplicateSurface,p,(p,a,b))
-#define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d))
-#define IDirectDraw2_EnumSurfaces(p,a,b,c,d) ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d))
-#define IDirectDraw2_FlipToGDISurface(p) ICOM_CALL_(FlipToGDISurface,p,(p))
-#define IDirectDraw2_GetCaps(p,a,b) ICOM_CALL_(GetCaps,p,(p,a,b))
-#define IDirectDraw2_GetDisplayMode(p,a) ICOM_CALL_(GetDisplayMode,p,(p,a))
-#define IDirectDraw2_GetFourCCCodes(p,a,b) ICOM_CALL_(GetFourCCCodes,p,(p,a,b))
-#define IDirectDraw2_GetGDISurface(p,a) ICOM_CALL_(GetGDISurface,p,(p,a))
-#define IDirectDraw2_GetMonitorFrequency(p,a) ICOM_CALL_(GetMonitorFrequency,p,(p,a))
-#define IDirectDraw2_GetScanLine(p,a) ICOM_CALL_(GetScanLine,p,(p,a))
-#define IDirectDraw2_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a))
-#define IDirectDraw2_Initialize(p,a) ICOM_CALL_(Initialize,p,(p,a))
-#define IDirectDraw2_RestoreDisplayMode(p) ICOM_CALL_(RestoreDisplayMode,p,(p))
-#define IDirectDraw2_SetCooperativeLevel(p,a,b) ICOM_CALL_(SetCooperativeLevel,p,(p,a,b))
-#define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c,d,e))
-#define IDirectDraw2_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b))
-/*** IDirectDraw2 methods ***/
-#define IDirectDraw2_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c))
-
-
-/*****************************************************************************
- * IDirectDraw4 interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectDraw4
-DECLARE_INTERFACE_(IDirectDraw4,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Compact)(THIS) PURE;
- STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER* lplpDDClipper, IUnknown* pUnkOuter) PURE;
- STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE* lplpDDPalette, IUnknown* pUnkOuter) PURE;
- STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE4* lplpDDSurface, IUnknown* pUnkOuter) PURE;
- STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSurface, LPDIRECTDRAWSURFACE4* lplpDupDDSurface) PURE;
- STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback) PURE;
- STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback) PURE;
- STDMETHOD(FlipToGDISurface)(THIS) PURE;
- STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
- STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
- STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
- STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4* lplpGDIDDSurface) PURE;
- STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
- STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
- STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL* lpbIsInVB) PURE;
- STDMETHOD(Initialize)(THIS_ GUID* lpGUID) PURE;
- STDMETHOD(RestoreDisplayMode)(THIS) PURE;
- STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
- STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
- STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
-
- STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2 lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
-
- STDMETHOD(GetSurfaceFromDC)(THIS_ HDC , LPDIRECTDRAWSURFACE4* ) PURE;
- STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
- STDMETHOD(TestCooperativeLevel)(THIS) PURE;
- STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER , DWORD ) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDraw4_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDraw4_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDraw4_Release(p) ICOM_CALL_(Release,p,(p))
- /*** IDirectDraw methods ***/
-#define IDirectDraw4_Compact(p) ICOM_CALL_(Compact,p,(p))
-#define IDirectDraw4_CreateClipper(p,a,b,c) ICOM_CALL_(CreateClipper,p,(p,a,b,c))
-#define IDirectDraw4_CreatePalette(p,a,b,c,d) ICOM_CALL_(CreatePalette,p,(p,a,b,c,d))
-#define IDirectDraw4_CreateSurface(p,a,b,c) ICOM_CALL_(CreateSurface,p,(p,a,b,c))
-#define IDirectDraw4_DuplicateSurface(p,a,b) ICOM_CALL_(DuplicateSurface,p,(p,a,b))
-#define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d))
-#define IDirectDraw4_EnumSurfaces(p,a,b,c,d) ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d))
-#define IDirectDraw4_FlipToGDISurface(p) ICOM_CALL_(FlipToGDISurface,p,(p))
-#define IDirectDraw4_GetCaps(p,a,b) ICOM_CALL_(GetCaps,p,(p,a,b))
-#define IDirectDraw4_GetDisplayMode(p,a) ICOM_CALL_(GetDisplayMode,p,(p,a))
-#define IDirectDraw4_GetFourCCCodes(p,a,b) ICOM_CALL_(GetFourCCCodes,p,(p,a,b))
-#define IDirectDraw4_GetGDISurface(p,a) ICOM_CALL_(GetGDISurface,p,(p,a))
-#define IDirectDraw4_GetMonitorFrequency(p,a) ICOM_CALL_(GetMonitorFrequency,p,(p,a))
-#define IDirectDraw4_GetScanLine(p,a) ICOM_CALL_(GetScanLine,p,(p,a))
-#define IDirectDraw4_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a))
-#define IDirectDraw4_Initialize(p,a) ICOM_CALL_(Initialize,p,(p,a))
-#define IDirectDraw4_RestoreDisplayMode(p) ICOM_CALL_(RestoreDisplayMode,p,(p))
-#define IDirectDraw4_SetCooperativeLevel(p,a,b) ICOM_CALL_(SetCooperativeLevel,p,(p,a,b))
-#define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c,d,e))
-#define IDirectDraw4_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b))
-/*** IDirectDraw2 methods ***/
-#define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c))
-/*** IDirectDraw4 methods ***/
-#define IDirectDraw4_GetSurfaceFromDC(p,a,b) ICOM_CALL_(GetSurfaceFromDC,p,(p,a,b))
-#define IDirectDraw4_RestoreAllSurfaces(pc) ICOM_CALL_(RestoreAllSurfaces,p,(p))
-#define IDirectDraw4_TestCooperativeLevel(p) ICOM_CALL_(TestCooperativeLevel,p,(p))
-#define IDirectDraw4_GetDeviceIdentifier(p,a,b) ICOM_CALL_(GetDeviceIdentifier,p,(p,a,b))
-
-
-/*****************************************************************************
- * IDirectDraw7 interface
- */
-/* Note: IDirectDraw7 cannot derive from IDirectDraw4; it is even documented
- * as not interchangeable with earlier DirectDraw interfaces.
- */
-#undef INTERFACE
-#define INTERFACE IDirectDraw7
-DECLARE_INTERFACE_(IDirectDraw7,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Compact)(THIS) PURE;
- STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER* lplpDDClipper, IUnknown* pUnkOuter) PURE;
- STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE* lplpDDPalette, IUnknown* pUnkOuter) PURE;
- STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE7* lplpDDSurface, IUnknown* pUnkOuter) PURE;
- STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSurface, LPDIRECTDRAWSURFACE7* lplpDupDDSurface) PURE;
- STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback) PURE;
- STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback) PURE;
- STDMETHOD(FlipToGDISurface)(THIS) PURE;
- STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
- STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
- STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
- STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE7* lplpGDIDDSurface) PURE;
- STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
- STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
- STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL* lpbIsInVB) PURE;
- STDMETHOD(Initialize)(THIS_ GUID* lpGUID) PURE;
- STDMETHOD(RestoreDisplayMode)(THIS) PURE;
- STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
- STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
- STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
-
- STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2 lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
-
- STDMETHOD(GetSurfaceFromDC)(THIS_ HDC , LPDIRECTDRAWSURFACE7* ) PURE;
- STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
- STDMETHOD(TestCooperativeLevel)(THIS) PURE;
- STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER2 , DWORD ) PURE;
-
- STDMETHOD(StartModeTest)(THIS_ LPSIZE , DWORD , DWORD ) PURE;
- STDMETHOD(EvaluateMode)(THIS_ DWORD , DWORD * ) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDraw7_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDraw7_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDraw7_Release(p) ICOM_CALL_(Release,p,(p))
- /*** IDirectDraw methods ***/
-#define IDirectDraw7_Compact(p) ICOM_CALL_(Compact,p,(p))
-#define IDirectDraw7_CreateClipper(p,a,b,c) ICOM_CALL_(CreateClipper,p,(p,a,b,c))
-#define IDirectDraw7_CreatePalette(p,a,b,c,d) ICOM_CALL_(CreatePalette,p,(p,a,b,c,d))
-#define IDirectDraw7_CreateSurface(p,a,b,c) ICOM_CALL_(CreateSurface,p,(p,a,b,c))
-#define IDirectDraw7_DuplicateSurface(p,a,b) ICOM_CALL_(DuplicateSurface,p,(p,a,b))
-#define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d))
-#define IDirectDraw7_EnumSurfaces(p,a,b,c,d) ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d))
-#define IDirectDraw7_FlipToGDISurface(p) ICOM_CALL_(FlipToGDISurface,p,(p))
-#define IDirectDraw7_GetCaps(p,a,b) ICOM_CALL_(GetCaps,p,(p,a,b))
-#define IDirectDraw7_GetDisplayMode(p,a) ICOM_CALL_(GetDisplayMode,p,(p,a))
-#define IDirectDraw7_GetFourCCCodes(p,a,b) ICOM_CALL_(GetFourCCCodes,p,(p,a,b))
-#define IDirectDraw7_GetGDISurface(p,a) ICOM_CALL_(GetGDISurface,p,(p,a))
-#define IDirectDraw7_GetMonitorFrequency(p,a) ICOM_CALL_(GetMonitorFrequency,p,(p,a))
-#define IDirectDraw7_GetScanLine(p,a) ICOM_CALL_(GetScanLine,p,(p,a))
-#define IDirectDraw7_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a))
-#define IDirectDraw7_Initialize(p,a) ICOM_CALL_(Initialize,p,(p,a))
-#define IDirectDraw7_RestoreDisplayMode(p) ICOM_CALL_(RestoreDisplayMode,p,(p))
-#define IDirectDraw7_SetCooperativeLevel(p,a,b) ICOM_CALL_(SetCooperativeLevel,p,(p,a,b))
-#define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c,d,e))
-#define IDirectDraw7_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b))
-/*** added in IDirectDraw2 ***/
-#define IDirectDraw7_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c))
-/*** added in IDirectDraw4 ***/
-#define IDirectDraw7_GetSurfaceFromDC(p,a,b) ICOM_CALL_(GetSurfaceFromDC,p,(p,a,b))
-#define IDirectDraw7_RestoreAllSurfaces(p) ICOM_CALL_(RestoreAllSurfaces,p,(p))
-#define IDirectDraw7_TestCooperativeLevel(p) ICOM_CALL_(TestCooperativeLevel,p,(p))
-#define IDirectDraw7_GetDeviceIdentifier(p,a,b) ICOM_CALL_(GetDeviceIdentifier,p,(p,a,b))
-/*** added in IDirectDraw 7 ***/
-#define IDirectDraw7_StartModeTest(p,a,b,c) ICOM_CALL_(StartModeTest,p,(p,a,b,c))
-#define IDirectDraw7_EvaluateMode(p,a,b) ICOM_CALL_(EvaluateMode,p,(p,a,b))
-
-
-/*****************************************************************************
- * IDirectDrawSurface interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectDrawSurface
-DECLARE_INTERFACE_(IDirectDrawSurface,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSAttachedSurface) PURE;
- STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
- STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
- STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
- STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
- STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSAttachedSurface) PURE;
- STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
- STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
- STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
- STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE* lplpDDAttachedSurface) PURE;
- STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE;
- STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER* lplpDDClipper) PURE;
- STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
- STDMETHOD(GetDC)(THIS_ HDC* lphDC) PURE;
- STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
- STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE* lplpDDPalette) PURE;
- STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
- STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
- STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
- STDMETHOD(IsLost)(THIS) PURE;
- STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
- STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
- STDMETHOD(Restore)(THIS) PURE;
- STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
- STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
- STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
- STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
- STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE;
- STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
- STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSReference) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDrawSurface_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDrawSurface_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDrawSurface_Release(p) ICOM_CALL_(Release,p,(p))
- /*** IDirectDrawSurface methods ***/
-#define IDirectDrawSurface_AddAttachedSurface(p,a) ICOM_CALL_(AddAttachedSurface,p,(p,a))
-#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) ICOM_CALL_(AddOverlayDirtyRect,p,(p,a))
-#define IDirectDrawSurface_Blt(p,a,b,c,d,e) ICOM_CALL_(Blt,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface_BltBatch(p,a,b,c) ICOM_CALL_(BltBatch,p,(p,a,b,c))
-#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) ICOM_CALL_(BltFast,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b))
-#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b))
-#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c))
-#define IDirectDrawSurface_Flip(p,a,b) ICOM_CALL_(Flip,p,(p,a,b))
-#define IDirectDrawSurface_GetAttachedSurface(p,a,b) ICOM_CALL_(GetAttachedSurface,p,(p,a,b))
-#define IDirectDrawSurface_GetBltStatus(p,a) ICOM_CALL_(GetBltStatus,p,(p,a))
-#define IDirectDrawSurface_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a))
-#define IDirectDrawSurface_GetClipper(p,a) ICOM_CALL_(GetClipper,p,(p,a))
-#define IDirectDrawSurface_GetColorKey(p,a,b) ICOM_CALL_(GetColorKey,p,(p,a,b))
-#define IDirectDrawSurface_GetDC(p,a) ICOM_CALL_(GetDC,p,(p,a))
-#define IDirectDrawSurface_GetFlipStatus(p,a) ICOM_CALL_(GetFlipStatus,p,(p,a))
-#define IDirectDrawSurface_GetOverlayPosition(p,a,b) ICOM_CALL_(GetOverlayPosition,p,(p,a,b))
-#define IDirectDrawSurface_GetPalette(p,a) ICOM_CALL_(GetPalette,p,(p,a))
-#define IDirectDrawSurface_GetPixelFormat(p,a) ICOM_CALL_(GetPixelFormat,p,(p,a))
-#define IDirectDrawSurface_GetSurfaceDesc(p,a) ICOM_CALL_(GetSurfaceDesc,p,(p,a))
-#define IDirectDrawSurface_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b))
-#define IDirectDrawSurface_IsLost(p) ICOM_CALL_(IsLost,p,(p))
-#define IDirectDrawSurface_Lock(p,a,b,c,d) ICOM_CALL_(Lock,p,(p,a,b,c,d))
-#define IDirectDrawSurface_ReleaseDC(p,a) ICOM_CALL_(ReleaseDC,p,(p,a))
-#define IDirectDrawSurface_Restore(p) ICOM_CALL_(Restore,p,(p))
-#define IDirectDrawSurface_SetClipper(p,a) ICOM_CALL_(SetClipper,p,(p,a))
-#define IDirectDrawSurface_SetColorKey(p,a,b) ICOM_CALL_(SetColorKey,p,(p,a,b))
-#define IDirectDrawSurface_SetOverlayPosition(p,a,b) ICOM_CALL_(SetOverlayPosition,p,(p,a,b))
-#define IDirectDrawSurface_SetPalette(p,a) ICOM_CALL_(SetPalette,p,(p,a))
-#define IDirectDrawSurface_Unlock(p,a) ICOM_CALL_(Unlock,p,(p,a))
-#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) ICOM_CALL_(UpdateOverlayDisplay,p,(p,a))
-#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b))
-
-
-/*****************************************************************************
- * IDirectDrawSurface2 interface
- */
-/* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
- * have been converted to LPDIRECTDRAWSURFACE2.
- */
-#undef INTERFACE
-#define INTERFACE IDirectDrawSurface2
-DECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface) PURE;
- STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
- STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
- STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
- STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
- STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface) PURE;
- STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
- STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
- STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
- STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE2* lplpDDAttachedSurface) PURE;
- STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE;
- STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER* lplpDDClipper) PURE;
- STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
- STDMETHOD(GetDC)(THIS_ HDC* lphDC) PURE;
- STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
- STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE* lplpDDPalette) PURE;
- STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
- STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
- STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
- STDMETHOD(IsLost)(THIS) PURE;
- STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
- STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
- STDMETHOD(Restore)(THIS) PURE;
- STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
- STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
- STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
- STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
- STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE;
- STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE2 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
- STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSReference) PURE;
- /* added in v2 */
- STDMETHOD(GetDDInterface)(THIS_ LPVOID* lplpDD) PURE;
- STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDrawSurface2_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDrawSurface2_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDrawSurface2_Release(p) ICOM_CALL_(Release,p,(p))
-/*** IDirectDrawSurface methods (almost) ***/
-#define IDirectDrawSurface2_AddAttachedSurface(p,a) ICOM_CALL_(AddAttachedSurface,p,(p,a))
-#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) ICOM_CALL_(AddOverlayDirtyRect,p,(p,a))
-#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) ICOM_CALL_(Blt,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface2_BltBatch(p,a,b,c) ICOM_CALL_(BltBatch,p,(p,a,b,c))
-#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) ICOM_CALL_(BltFast,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b))
-#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b))
-#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c))
-#define IDirectDrawSurface2_Flip(p,a,b) ICOM_CALL_(Flip,p,(p,a,b))
-#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) ICOM_CALL_(GetAttachedSurface,p,(p,a,b))
-#define IDirectDrawSurface2_GetBltStatus(p,a) ICOM_CALL_(GetBltStatus,p,(p,a))
-#define IDirectDrawSurface2_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a))
-#define IDirectDrawSurface2_GetClipper(p,a) ICOM_CALL_(GetClipper,p,(p,a))
-#define IDirectDrawSurface2_GetColorKey(p,a,b) ICOM_CALL_(GetColorKey,p,(p,a,b))
-#define IDirectDrawSurface2_GetDC(p,a) ICOM_CALL_(GetDC,p,(p,a))
-#define IDirectDrawSurface2_GetFlipStatus(p,a) ICOM_CALL_(GetFlipStatus,p,(p,a))
-#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) ICOM_CALL_(GetOverlayPosition,p,(p,a,b))
-#define IDirectDrawSurface2_GetPalette(p,a) ICOM_CALL_(GetPalette,p,(p,a))
-#define IDirectDrawSurface2_GetPixelFormat(p,a) ICOM_CALL_(GetPixelFormat,p,(p,a))
-#define IDirectDrawSurface2_GetSurfaceDesc(p,a) ICOM_CALL_(GetSurfaceDesc,p,(p,a))
-#define IDirectDrawSurface2_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b))
-#define IDirectDrawSurface2_IsLost(p) ICOM_CALL_(IsLost,p,(p))
-#define IDirectDrawSurface2_Lock(p,a,b,c,d) ICOM_CALL_(Lock,p,(p,a,b,c,d))
-#define IDirectDrawSurface2_ReleaseDC(p,a) ICOM_CALL_(ReleaseDC,p,(p,a))
-#define IDirectDrawSurface2_Restore(p) ICOM_CALL_(Restore,p,(p))
-#define IDirectDrawSurface2_SetClipper(p,a) ICOM_CALL_(SetClipper,p,(p,a))
-#define IDirectDrawSurface2_SetColorKey(p,a,b) ICOM_CALL_(SetColorKey,p,(p,a,b))
-#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) ICOM_CALL_(SetOverlayPosition,p,(p,a,b))
-#define IDirectDrawSurface2_SetPalette(p,a) ICOM_CALL_(SetPalette,p,(p,a))
-#define IDirectDrawSurface2_Unlock(p,a) ICOM_CALL_(Unlock,p,(p,a))
-#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) ICOM_CALL_(UpdateOverlayDisplay,p,(p,a))
-#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b))
-/*** IDirectDrawSurface2 methods ***/
-#define IDirectDrawSurface2_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a))
-#define IDirectDrawSurface2_PageLock(p,a) ICOM_CALL_(PageLock,p,(p,a))
-#define IDirectDrawSurface2_PageUnlock(p,a) ICOM_CALL_(PageUnlock,p,(p,a))
-
-
-/*****************************************************************************
- * IDirectDrawSurface3 interface
- */
-/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
- * have been converted to LPDIRECTDRAWSURFACE3.
- */
-#undef INTERFACE
-#define INTERFACE IDirectDrawSurface3
-DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface) PURE;
- STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
- STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
- STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
- STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
- STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface) PURE;
- STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
- STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
- STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
- STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE3* lplpDDAttachedSurface) PURE;
- STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE;
- STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER* lplpDDClipper) PURE;
- STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
- STDMETHOD(GetDC)(THIS_ HDC* lphDC) PURE;
- STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
- STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE* lplpDDPalette) PURE;
- STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
- STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
- STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
- STDMETHOD(IsLost)(THIS) PURE;
- STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
- STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
- STDMETHOD(Restore)(THIS) PURE;
- STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
- STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
- STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
- STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
- STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE;
- STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE3 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
- STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSReference) PURE;
- /* added in v2 */
- STDMETHOD(GetDDInterface)(THIS_ LPVOID* lplpDD) PURE;
- STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
- /* added in v3 */
- STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSD, DWORD dwFlags) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDrawSurface3_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDrawSurface3_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDrawSurface3_Release(p) ICOM_CALL_(Release,p,(p))
-/*** IDirectDrawSurface methods (almost) ***/
-#define IDirectDrawSurface3_AddAttachedSurface(p,a) ICOM_CALL_(AddAttachedSurface,p,(p,a))
-#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) ICOM_CALL_(AddOverlayDirtyRect,p,(p,a))
-#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) ICOM_CALL_(Blt,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface3_BltBatch(p,a,b,c) ICOM_CALL_(BltBatch,p,(p,a,b,c))
-#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) ICOM_CALL_(BltFast,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b))
-#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b))
-#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c))
-#define IDirectDrawSurface3_Flip(p,a,b) ICOM_CALL_(Flip,p,(p,a,b))
-#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) ICOM_CALL_(GetAttachedSurface,p,(p,a,b))
-#define IDirectDrawSurface3_GetBltStatus(p,a) ICOM_CALL_(GetBltStatus,p,(p,a))
-#define IDirectDrawSurface3_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a))
-#define IDirectDrawSurface3_GetClipper(p,a) ICOM_CALL_(GetClipper,p,(p,a))
-#define IDirectDrawSurface3_GetColorKey(p,a,b) ICOM_CALL_(GetColorKey,p,(p,a,b))
-#define IDirectDrawSurface3_GetDC(p,a) ICOM_CALL_(GetDC,p,(p,a))
-#define IDirectDrawSurface3_GetFlipStatus(p,a) ICOM_CALL_(GetFlipStatus,p,(p,a))
-#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) ICOM_CALL_(GetOverlayPosition,p,(p,a,b))
-#define IDirectDrawSurface3_GetPalette(p,a) ICOM_CALL_(GetPalette,p,(p,a))
-#define IDirectDrawSurface3_GetPixelFormat(p,a) ICOM_CALL_(GetPixelFormat,p,(p,a))
-#define IDirectDrawSurface3_GetSurfaceDesc(p,a) ICOM_CALL_(GetSurfaceDesc,p,(p,a))
-#define IDirectDrawSurface3_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b))
-#define IDirectDrawSurface3_IsLost(p) ICOM_CALL_(IsLost,p,(p))
-#define IDirectDrawSurface3_Lock(p,a,b,c,d) ICOM_CALL_(Lock,p,(p,a,b,c,d))
-#define IDirectDrawSurface3_ReleaseDC(p,a) ICOM_CALL_(ReleaseDC,p,(p,a))
-#define IDirectDrawSurface3_Restore(p) ICOM_CALL_(Restore,p,(p))
-#define IDirectDrawSurface3_SetClipper(p,a) ICOM_CALL_(SetClipper,p,(p,a))
-#define IDirectDrawSurface3_SetColorKey(p,a,b) ICOM_CALL_(SetColorKey,p,(p,a,b))
-#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) ICOM_CALL_(SetOverlayPosition,p,(p,a,b))
-#define IDirectDrawSurface3_SetPalette(p,a) ICOM_CALL_(SetPalette,p,(p,a))
-#define IDirectDrawSurface3_Unlock(p,a) ICOM_CALL_(Unlock,p,(p,a))
-#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) ICOM_CALL_(UpdateOverlayDisplay,p,(p,a))
-#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b))
-/*** IDirectDrawSurface2 methods ***/
-#define IDirectDrawSurface3_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a))
-#define IDirectDrawSurface3_PageLock(p,a) ICOM_CALL_(PageLock,p,(p,a))
-#define IDirectDrawSurface3_PageUnlock(p,a) ICOM_CALL_(PageUnlock,p,(p,a))
-/*** IDirectDrawSurface3 methods ***/
-#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) ICOM_CALL_(SetSurfaceDesc,p,(p,a,b))
-
-
-/*****************************************************************************
- * IDirectDrawSurface4 interface
- */
-/* Cannot inherit from IDirectDrawSurface2 because DDSCAPS changed to DDSCAPS2.
- */
-#undef INTERFACE
-#define INTERFACE IDirectDrawSurface4
-DECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE;
- STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
- STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
- STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
- STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
- STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE;
- STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
- STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
- STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
- STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE4* lplpDDAttachedSurface) PURE;
- STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2 lpDDSCaps) PURE;
- STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER* lplpDDClipper) PURE;
- STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
- STDMETHOD(GetDC)(THIS_ HDC* lphDC) PURE;
- STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
- STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE* lplpDDPalette) PURE;
- STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
- STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
- STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
- STDMETHOD(IsLost)(THIS) PURE;
- STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
- STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
- STDMETHOD(Restore)(THIS) PURE;
- STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
- STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
- STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
- STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
- STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
- STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE4 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
- STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSReference) PURE;
- /* added in v2 */
- STDMETHOD(GetDDInterface)(THIS_ LPVOID* lplpDD) PURE;
- STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
- /* added in v3 */
- STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSD, DWORD dwFlags) PURE;
- /* added in v4 */
- STDMETHOD(SetPrivateData)(THIS_ REFGUID , LPVOID , DWORD , DWORD ) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID , LPVOID , LPDWORD ) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID ) PURE;
- STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD ) PURE;
- STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDrawSurface4_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDrawSurface4_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDrawSurface4_Release(p) ICOM_CALL_(Release,p,(p))
-/*** IDirectDrawSurface (almost) methods ***/
-#define IDirectDrawSurface4_AddAttachedSurface(p,a) ICOM_CALL_(AddAttachedSurface,p,(p,a))
-#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) ICOM_CALL_(AddOverlayDirtyRect,p,(p,a))
-#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) ICOM_CALL_(Blt,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface4_BltBatch(p,a,b,c) ICOM_CALL_(BltBatch,p,(p,a,b,c))
-#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) ICOM_CALL_(BltFast,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b))
-#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b))
-#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c))
-#define IDirectDrawSurface4_Flip(p,a,b) ICOM_CALL_(Flip,p,(p,a,b))
-#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) ICOM_CALL_(GetAttachedSurface,p,(p,a,b))
-#define IDirectDrawSurface4_GetBltStatus(p,a) ICOM_CALL_(GetBltStatus,p,(p,a))
-#define IDirectDrawSurface4_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a))
-#define IDirectDrawSurface4_GetClipper(p,a) ICOM_CALL_(GetClipper,p,(p,a))
-#define IDirectDrawSurface4_GetColorKey(p,a,b) ICOM_CALL_(GetColorKey,p,(p,a,b))
-#define IDirectDrawSurface4_GetDC(p,a) ICOM_CALL_(GetDC,p,(p,a))
-#define IDirectDrawSurface4_GetFlipStatus(p,a) ICOM_CALL_(GetFlipStatus,p,(p,a))
-#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) ICOM_CALL_(GetOverlayPosition,p,(p,a,b))
-#define IDirectDrawSurface4_GetPalette(p,a) ICOM_CALL_(GetPalette,p,(p,a))
-#define IDirectDrawSurface4_GetPixelFormat(p,a) ICOM_CALL_(GetPixelFormat,p,(p,a))
-#define IDirectDrawSurface4_GetSurfaceDesc(p,a) ICOM_CALL_(GetSurfaceDesc,p,(p,a))
-#define IDirectDrawSurface4_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b))
-#define IDirectDrawSurface4_IsLost(p) ICOM_CALL_(IsLost,p,(p))
-#define IDirectDrawSurface4_Lock(p,a,b,c,d) ICOM_CALL_(Lock,p,(p,a,b,c,d))
-#define IDirectDrawSurface4_ReleaseDC(p,a) ICOM_CALL_(ReleaseDC,p,(p,a))
-#define IDirectDrawSurface4_Restore(p) ICOM_CALL_(Restore,p,(p))
-#define IDirectDrawSurface4_SetClipper(p,a) ICOM_CALL_(SetClipper,p,(p,a))
-#define IDirectDrawSurface4_SetColorKey(p,a,b) ICOM_CALL_(SetColorKey,p,(p,a,b))
-#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) ICOM_CALL_(SetOverlayPosition,p,(p,a,b))
-#define IDirectDrawSurface4_SetPalette(p,a) ICOM_CALL_(SetPalette,p,(p,a))
-#define IDirectDrawSurface4_Unlock(p,a) ICOM_CALL_(Unlock,p,(p,a))
-#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) ICOM_CALL_(UpdateOverlayDisplay,p,(p,a))
-#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b))
-/*** IDirectDrawSurface2 methods ***/
-#define IDirectDrawSurface4_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a))
-#define IDirectDrawSurface4_PageLock(p,a) ICOM_CALL_(PageLock,p,(p,a))
-#define IDirectDrawSurface4_PageUnlock(p,a) ICOM_CALL_(PageUnlock,p,(p,a))
-/*** IDirectDrawSurface3 methods ***/
-#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) ICOM_CALL_(SetSurfaceDesc,p,(p,a,b))
-/*** IDirectDrawSurface4 methods ***/
-#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) ICOM_CALL_(SetPrivateData,p,(p,a,b,c,d))
-#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) ICOM_CALL_(GetPrivateData,p,(p,a,b,c))
-#define IDirectDrawSurface4_FreePrivateData(p,a) ICOM_CALL_(FreePrivateData,p,(p,a))
-#define IDirectDrawSurface4_GetUniquenessValue(p,a) ICOM_CALL_(GetUniquenessValue,p,(p,a))
-#define IDirectDrawSurface4_ChangeUniquenessValue(p) ICOM_CALL_(ChangeUniquenessValue,p,(p))
-
-
-/*****************************************************************************
- * IDirectDrawSurface7 interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectDrawSurface7
-DECLARE_INTERFACE_(IDirectDrawSurface7,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface) PURE;
- STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
- STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
- STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
- STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
- STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface) PURE;
- STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback) PURE;
- STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpfnCallback) PURE;
- STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
- STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE7* lplpDDAttachedSurface) PURE;
- STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2 lpDDSCaps) PURE;
- STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER* lplpDDClipper) PURE;
- STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
- STDMETHOD(GetDC)(THIS_ HDC* lphDC) PURE;
- STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
- STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE* lplpDDPalette) PURE;
- STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
- STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
- STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
- STDMETHOD(IsLost)(THIS) PURE;
- STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
- STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
- STDMETHOD(Restore)(THIS) PURE;
- STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
- STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
- STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
- STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
- STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
- STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE7 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
- STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSReference) PURE;
- /* added in v2 */
- STDMETHOD(GetDDInterface)(THIS_ LPVOID* lplpDD) PURE;
- STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
- STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
- /* added in v3 */
- STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSD, DWORD dwFlags) PURE;
- /* added in v4 */
- STDMETHOD(SetPrivateData)(THIS_ REFGUID , LPVOID , DWORD , DWORD ) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID , LPVOID , LPDWORD ) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID ) PURE;
- STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD ) PURE;
- STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
- /* added in v7 */
- STDMETHOD(SetPriority)(THIS_ DWORD prio) PURE;
- STDMETHOD(GetPriority)(THIS_ LPDWORD prio) PURE;
- STDMETHOD(SetLOD)(THIS_ DWORD lod) PURE;
- STDMETHOD(GetLOD)(THIS_ LPDWORD lod) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDrawSurface7_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDrawSurface7_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDrawSurface7_Release(p) ICOM_CALL_(Release,p,(p))
-/*** IDirectDrawSurface (almost) methods ***/
-#define IDirectDrawSurface7_AddAttachedSurface(p,a) ICOM_CALL_(AddAttachedSurface,p,(p,a))
-#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) ICOM_CALL_(AddOverlayDirtyRect,p,(p,a))
-#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) ICOM_CALL_(Blt,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface7_BltBatch(p,a,b,c) ICOM_CALL_(BltBatch,p,(p,a,b,c))
-#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) ICOM_CALL_(BltFast,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b))
-#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b))
-#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c))
-#define IDirectDrawSurface7_Flip(p,a,b) ICOM_CALL_(Flip,p,(p,a,b))
-#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) ICOM_CALL_(GetAttachedSurface,p,(p,a,b))
-#define IDirectDrawSurface7_GetBltStatus(p,a) ICOM_CALL_(GetBltStatus,p,(p,a))
-#define IDirectDrawSurface7_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a))
-#define IDirectDrawSurface7_GetClipper(p,a) ICOM_CALL_(GetClipper,p,(p,a))
-#define IDirectDrawSurface7_GetColorKey(p,a,b) ICOM_CALL_(GetColorKey,p,(p,a,b))
-#define IDirectDrawSurface7_GetDC(p,a) ICOM_CALL_(GetDC,p,(p,a))
-#define IDirectDrawSurface7_GetFlipStatus(p,a) ICOM_CALL_(GetFlipStatus,p,(p,a))
-#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) ICOM_CALL_(GetOverlayPosition,p,(p,a,b))
-#define IDirectDrawSurface7_GetPalette(p,a) ICOM_CALL_(GetPalette,p,(p,a))
-#define IDirectDrawSurface7_GetPixelFormat(p,a) ICOM_CALL_(GetPixelFormat,p,(p,a))
-#define IDirectDrawSurface7_GetSurfaceDesc(p,a) ICOM_CALL_(GetSurfaceDesc,p,(p,a))
-#define IDirectDrawSurface7_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b))
-#define IDirectDrawSurface7_IsLost(p) ICOM_CALL_(IsLost,p,(p))
-#define IDirectDrawSurface7_Lock(p,a,b,c,d) ICOM_CALL_(Lock,p,(p,a,b,c,d))
-#define IDirectDrawSurface7_ReleaseDC(p,a) ICOM_CALL_(ReleaseDC,p,(p,a))
-#define IDirectDrawSurface7_Restore(p) ICOM_CALL_(Restore,p,(p))
-#define IDirectDrawSurface7_SetClipper(p,a) ICOM_CALL_(SetClipper,p,(p,a))
-#define IDirectDrawSurface7_SetColorKey(p,a,b) ICOM_CALL_(SetColorKey,p,(p,a,b))
-#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) ICOM_CALL_(SetOverlayPosition,p,(p,a,b))
-#define IDirectDrawSurface7_SetPalette(p,a) ICOM_CALL_(SetPalette,p,(p,a))
-#define IDirectDrawSurface7_Unlock(p,a) ICOM_CALL_(Unlock,p,(p,a))
-#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e))
-#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) ICOM_CALL_(UpdateOverlayDisplay,p,(p,a))
-#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b))
-/*** IDirectDrawSurface2 methods ***/
-#define IDirectDrawSurface7_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a))
-#define IDirectDrawSurface7_PageLock(p,a) ICOM_CALL_(PageLock,p,(p,a))
-#define IDirectDrawSurface7_PageUnlock(p,a) ICOM_CALL_(PageUnlock,p,(p,a))
-/*** IDirectDrawSurface3 methods ***/
-#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) ICOM_CALL_(SetSurfaceDesc,p,(p,a,b))
-/*** IDirectDrawSurface4 methods ***/
-#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) ICOM_CALL_(SetPrivateData,p,(p,a,b,c,d))
-#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) ICOM_CALL_(GetPrivateData,p,(p,a,b,c))
-#define IDirectDrawSurface7_FreePrivateData(p,a) ICOM_CALL_(FreePrivateData,p,(p,a))
-#define IDirectDrawSurface7_GetUniquenessValue(p,a) ICOM_CALL_(GetUniquenessValue,p,(p,a))
-#define IDirectDrawSurface7_ChangeUniquenessValue(p) ICOM_CALL_(ChangeUniquenessValue,p,(p))
-/*** IDirectDrawSurface7 methods ***/
-#define IDirectDrawSurface7_SetPriority(p,a) ICOM_CALL_(SetPriority,p,(p,a))
-#define IDirectDrawSurface7_GetPriority(p,a) ICOM_CALL_(GetPriority,p,(p,a))
-#define IDirectDrawSurface7_SetLOD(p,a) ICOM_CALL_(SetLOD,p,(p,a))
-#define IDirectDrawSurface7_GetLOD(p,a) ICOM_CALL_(GetLOD,p,(p,a))
-
-/*****************************************************************************
- * IDirectDrawColorControl interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectDrawColorControl
-DECLARE_INTERFACE_(IDirectDrawColorControl,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL lpColorControl) PURE;
- STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL lpColorControl) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDrawColorControl_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDrawColorControl_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDrawColorControl_Release(p) ICOM_CALL_(Release,p,(p))
- /*** IDirectDrawColorControl methods ***/
-#define IDirectDrawColorControl_GetColorControls(p,a) ICOM_CALL_(GetColorControls,p,(p,a))
-#define IDirectDrawColorControl_SetColorControls(p,a) ICOM_CALL_(SetColorControls,p,(p,a))
-
-/*****************************************************************************
- * IDirectDrawGammaControl interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectDrawGammaControl
-DECLARE_INTERFACE_(IDirectDrawGammaControl,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetGammaRamp)(THIS_ DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp) PURE;
- STDMETHOD(SetGammaRamp)(THIS_ DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp) PURE;
-};
-
- /*** IUnknown methods ***/
-#define IDirectDrawGammaControl_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b))
-#define IDirectDrawGammaControl_AddRef(p) ICOM_CALL_(AddRef,p,(p))
-#define IDirectDrawGammaControl_Release(p) ICOM_CALL_(Release,p,(p))
- /*** IDirectDrawGammaControl methods ***/
-#define IDirectDrawGammaControl_GetGammaRamp(p,a,b) ICOM_CALL_(GetGammaRamp,p,(p,a,b))
-#define IDirectDrawGammaControl_SetGammaRamp(p,a,b) ICOM_CALL_(SetGammaRamp,p,(p,a,b))
-
-
-HRESULT WINAPI DirectDrawCreate(LPGUID,LPDIRECTDRAW*,LPUNKNOWN);
-HRESULT WINAPI DirectDrawCreateEx(LPGUID,LPVOID*,REFIID,LPUNKNOWN);
-HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA,LPVOID);
-HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW,LPVOID);
-#define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate)
-HRESULT WINAPI DirectDrawCreateClipper(DWORD,LPDIRECTDRAWCLIPPER*,LPUNKNOWN);
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* defined(__cplusplus) */
-
-#endif /* __XWIN_DDRAW_H */
diff --git a/xorg-server/hw/xwin/doflexbison.bat b/xorg-server/hw/xwin/doflexbison.bat
new file mode 100644
index 000000000..a29508bcb
--- /dev/null
+++ b/xorg-server/hw/xwin/doflexbison.bat
@@ -0,0 +1,18 @@
+@echo off
+setlocal
+
+cd "%~dp0"
+
+set M4=..\..\..\tools\mhmake\m4.exe
+set BISON_PKGDATADIR=../../../tools/mhmake/src/bisondata
+
+set path=..\..\..\tools\mhmake;%path%
+
+..\..\..\tools\mhmake\bison.exe -d -o%1/winprefsyacc.c winprefsyacc.y
+
+copy "..\..\..\tools\mhmake\flex++.exe" flex.exe
+flex.exe -i -o%1/winprefslex.c winprefslex.l
+del flex.exe
+
+endlocal
+
diff --git a/xorg-server/hw/xwin/glx/Makefile.am b/xorg-server/hw/xwin/glx/Makefile.am
index 303ff53f2..94ebbb828 100644
--- a/xorg-server/hw/xwin/glx/Makefile.am
+++ b/xorg-server/hw/xwin/glx/Makefile.am
@@ -1,60 +1,60 @@
-noinst_LTLIBRARIES = libXwinGLX.la
-
-libXwinGLX_la_SOURCES = \
- winpriv.c \
- winpriv.h \
- glwindows.h \
- glwrap.c \
- indirect.c \
- wgl_ext_api.c
-
-if XWIN_MULTIWINDOW
-DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW
-endif
-
-if XWIN_MULTIWINDOWEXTWM
-DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM
-endif
-
-DEFS = $(DEFS_MULTIWINDOW) $(DEFS_MULTIWINDOWEXTWM)
-
-INCLUDES = -I$(top_srcdir)/miext/rootless
-
-AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
- $(XWINMODULES_CFLAGS) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/hw/xwin/
-
-glwrap.c: generated_gl_wrappers.c
-wgl_ext_api.c: generated_wgl_wrappers.c wglext.h
-wgl_ext_api.h: wglext.h
-indirect.c: wgl_ext_api.h
-
-SPEC_FILES = gl.spec gl.tm wglext.spec wgl.tm
-
-gl.spec:
- wget http://www.opengl.org/registry/api/gl.spec
-
-gl.tm:
- wget http://www.opengl.org/registry/api/gl.tm
-
-wglext.spec:
- wget http://www.opengl.org/registry/api/wglext.spec
-
-wgl.tm:
- wget http://www.opengl.org/registry/api/wgl.tm
-
-generated_gl_wrappers.c: gen_gl_wrappers.py gl.spec gl.tm
- $(srcdir)/gen_gl_wrappers.py --spec=`test -e gl.spec || echo $(srcdir)/`gl.spec --typemap=`test -e gl.tm || echo $(srcdir)/`gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c
-
-generated_wgl_wrappers.c: gen_gl_wrappers.py wglext.spec wgl.tm
- $(srcdir)/gen_gl_wrappers.py --spec=`test -e wglext.spec || echo $(srcdir)/`wglext.spec --typemap=`test -e wgl.tm || echo $(srcdir)/`wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c
-
-wglext.h:
- wget http://www.opengl.org/registry/api/wglext.h
-
-BUILT_SOURCES = generated_gl_wrappers.c generated_wgl_wrappers.c
-CLEANFILES = $(BUILT_SOURCES)
-DISTCLEANFILES = $(SPEC_FILES) wglext.h
-
-EXTRA_DIST = gen_gl_wrappers.py $(SPEC_FILES) wglext.h
+noinst_LTLIBRARIES = libXwinGLX.la
+
+libXwinGLX_la_SOURCES = \
+ winpriv.c \
+ winpriv.h \
+ glwindows.h \
+ glwrap.c \
+ indirect.c \
+ wgl_ext_api.c
+
+if XWIN_MULTIWINDOW
+DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW
+endif
+
+if XWIN_MULTIWINDOWEXTWM
+DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM
+endif
+
+DEFS = $(DEFS_MULTIWINDOW) $(DEFS_MULTIWINDOWEXTWM)
+
+INCLUDES = -I$(top_srcdir)/miext/rootless
+
+AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
+ $(XWINMODULES_CFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/hw/xwin/
+
+glwrap.c: generated_gl_wrappers.c
+wgl_ext_api.c: generated_wgl_wrappers.c wglext.h
+wgl_ext_api.h: wglext.h
+indirect.c: wgl_ext_api.h
+
+SPEC_FILES = gl.spec gl.tm wglext.spec wgl.tm
+
+gl.spec:
+ wget http://www.opengl.org/registry/api/gl.spec
+
+gl.tm:
+ wget http://www.opengl.org/registry/api/gl.tm
+
+wglext.spec:
+ wget http://www.opengl.org/registry/api/wglext.spec
+
+wgl.tm:
+ wget http://www.opengl.org/registry/api/wgl.tm
+
+generated_gl_wrappers.c: gen_gl_wrappers.py gl.spec gl.tm
+ $(srcdir)/gen_gl_wrappers.py --spec=`test -e gl.spec || echo $(srcdir)/`gl.spec --typemap=`test -e gl.tm || echo $(srcdir)/`gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c
+
+generated_wgl_wrappers.c: gen_gl_wrappers.py wglext.spec wgl.tm
+ $(srcdir)/gen_gl_wrappers.py --spec=`test -e wglext.spec || echo $(srcdir)/`wglext.spec --typemap=`test -e wgl.tm || echo $(srcdir)/`wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c
+
+wglext.h:
+ wget http://www.opengl.org/registry/api/wglext.h
+
+BUILT_SOURCES = generated_gl_wrappers.c generated_wgl_wrappers.c
+CLEANFILES = $(BUILT_SOURCES)
+DISTCLEANFILES = $(SPEC_FILES) wglext.h
+
+EXTRA_DIST = gen_gl_wrappers.py $(SPEC_FILES) wglext.h
diff --git a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py
index d7fe98dec..28fad1943 100644
--- a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py
+++ b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py
@@ -239,10 +239,12 @@ for w in sorted(wrappers.keys()) :
if wrappers[w]['category'].startswith('VERSION_1_0') or wrappers[w]['category'].startswith('VERSION_1_1') :
if staticwrappers :
print 'static',
- print returntype + ' ' + funcname + 'Wrapper(' + arglist + ')'
+ print returntype + ' __stdcall ' + funcname + 'Wrapper(' + arglist + ')'
print '{'
+ print '#ifdef _DEBUG'
print ' if (glxWinDebugSettings.enable' + prefix.upper() + 'callTrace) ErrorF("'+ funcname + '\\n");'
print ' glWinDirectProcCalls++;'
+ print '#endif'
if returntype.lower() == 'void' :
print ' ' + funcname + '(',
else :
@@ -257,7 +259,7 @@ for w in sorted(wrappers.keys()) :
else:
if staticwrappers :
print 'static',
- print returntype + ' ' + funcname + 'Wrapper(' + arglist + ')'
+ print returntype + ' __stdcall ' + funcname + 'Wrapper(' + arglist + ')'
print '{'
stringname = funcname
@@ -287,11 +289,15 @@ for w in sorted(wrappers.keys()) :
if returntype.lower() == 'void' :
print ' RESOLVE(' + pfntypename + ', "' + stringname + '");'
+ print '#ifdef _DEBUG'
print ' if (glxWinDebugSettings.enable' + prefix.upper() + 'callTrace) ErrorF("'+ funcname + '\\n");'
+ print '#endif'
print ' RESOLVED_PROC(' + pfntypename + ')(',
else :
print ' RESOLVE_RET(' + pfntypename + ', "' + stringname + '", FALSE);'
+ print '#ifdef _DEBUG'
print ' if (glxWinDebugSettings.enable' + prefix.upper() + 'callTrace) ErrorF("'+ funcname + '\\n");'
+ print '#endif'
print ' return RESOLVED_PROC(' + pfntypename + ')(',
if arglist != 'void' :
@@ -314,6 +320,6 @@ if dispatchheader :
if wrappers.has_key(d) :
print ' SET_'+ d + '(disp, ' + prefix + d + 'Wrapper);'
else :
- print '#warning No wrapper for ' + prefix + d + ' !'
+ print '#pragma message("No wrapper for ' + prefix + d + ' !")'
print '}'
diff --git a/xorg-server/hw/xwin/glx/gl.spec b/xorg-server/hw/xwin/glx/gl.spec
new file mode 100644
index 000000000..86a6064e7
--- /dev/null
+++ b/xorg-server/hw/xwin/glx/gl.spec
@@ -0,0 +1,31488 @@
+# gl.spec file
+# DON'T REMOVE PREVIOUS LINE!!! libspec depends on it!
+#
+# Copyright (c) 1991-2005 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2006-2010 The Khronos Group Inc.
+#
+# This document is licensed under the SGI Free Software B License Version
+# 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+#
+# $Revision: 13168 $ on $Date: 2010-12-09 02:18:26 -0800 (Thu, 09 Dec 2010) $
+
+required-props:
+# Description of a parameter
+param: retval retained
+# Display list flags
+dlflags: notlistable handcode
+# GLX implementation flags
+glxflags: client-intercept client-handcode server-handcode EXT SGI ignore ARB
+# Vector ('v') equivalent form of a command taking 1-4 explicit xyzw/rgba arguments
+vectorequiv: *
+# Category this function falls in. While there are many categories for
+# early GL 1.0 functions, later functions just have a core version
+# (e.g. VERSION_major_minor) or extension name for the category.
+category: display-list drawing drawing-control feedback framebuf misc modeling pixel-op pixel-rw state-req xform VERSION_1_0 VERSION_1_0_DEPRECATED VERSION_1_1 VERSION_1_1_DEPRECATED VERSION_1_2 VERSION_1_2_DEPRECATED VERSION_1_3 VERSION_1_3_DEPRECATED VERSION_1_4 VERSION_1_4_DEPRECATED VERSION_1_5 VERSION_2_0 VERSION_2_1 VERSION_3_0 VERSION_3_0_DEPRECATED VERSION_3_1 VERSION_3_2 VERSION_3_3 VERSION_4_0 VERSION_4_1 VERSION_4_1_DEPRECATED ATI_element_array ATI_envmap_bumpmap ATI_fragment_shader ATI_pn_triangles ATI_vertex_array_object ATI_vertex_streams EXT_blend_color EXT_blend_minmax EXT_convolution EXT_copy_texture EXT_histogram EXT_polygon_offset EXT_subtexture EXT_texture3D EXT_texture_object EXT_vertex_array EXT_vertex_shader SGIS_detail_texture SGIS_multisample SGIS_pixel_texture ARB_point_parameters EXT_point_parameters SGIS_point_parameters SGIS_sharpen_texture SGIS_texture4D SGIS_texture_filter4 SGIX_async SGIX_flush_raster SGIX_fragment_lighting SGIX_framezoom SGIX_igloo_interface SGIX_instruments SGIX_list_priority SGIX_pixel_texture SGIX_polynomial_ffd SGIX_reference_plane SGIX_sprite SGIX_tag_sample_buffer SGI_color_table ARB_multitexture ARB_multisample ARB_texture_compression ARB_transpose_matrix ARB_vertex_blend ARB_matrix_palette EXT_compiled_vertex_array EXT_cull_vertex EXT_index_func EXT_index_material EXT_draw_range_elements EXT_vertex_weighting INGR_blend_func_separate NV_evaluators NV_fence NV_occlusion_query NV_point_sprite NV_register_combiners NV_register_combiners2 NV_vertex_array_range NV_vertex_program NV_vertex_program1_1_dcc MESA_resize_buffers MESA_window_pos PGI_misc_hints EXT_fog_coord EXT_blend_func_separate EXT_color_subtable EXT_coordinate_frame EXT_light_texture EXT_multi_draw_arrays EXT_paletted_texture EXT_pixel_transform EXT_secondary_color EXT_texture_perturb_normal HP_image_transform IBM_multimode_draw_arrays IBM_vertex_array_lists INTEL_parallel_arrays SUNX_constant_data SUN_global_alpha SUN_mesh_array SUN_triangle_list SUN_vertex 3DFX_tbuffer EXT_multisample SGIS_fog_function SGIS_texture_color_mask ARB_window_pos EXT_stencil_two_side EXT_depth_bounds_test EXT_blend_equation_separate ARB_vertex_program ARB_fragment_program ARB_vertex_buffer_object ARB_occlusion_query ARB_shader_objects ARB_vertex_shader ARB_fragment_shader S3_s3tc ATI_draw_buffers ATI_texture_env_combine3 ATI_texture_float NV_float_buffer NV_fragment_program NV_half_float NV_pixel_data_range NV_primitive_restart NV_texture_expand_normal NV_texture_expand_normal NV_vertex_program2 APPLE_element_array APPLE_fence APPLE_vertex_array_object APPLE_vertex_array_range ATI_draw_buffers NV_fragment_program NV_half_float NV_pixel_data_range NV_primitive_restart ATI_map_object_buffer ATI_separate_stencil ATI_vertex_attrib_array_object ARB_draw_buffers ARB_texture_rectangle ARB_color_buffer_float EXT_framebuffer_object GREMEDY_string_marker EXT_stencil_clear_tag EXT_framebuffer_blit EXT_framebuffer_multisample MESAX_texture_stack EXT_timer_query EXT_gpu_program_parameters APPLE_flush_buffer_range NV_gpu_program4 NV_geometry_program4 EXT_geometry_shader4 NV_vertex_program4 EXT_gpu_shader4 EXT_draw_instanced EXT_texture_buffer_object NV_depth_buffer_float NV_framebuffer_multisample_coverage NV_parameter_buffer_object EXT_draw_buffers2 NV_transform_feedback EXT_bindable_uniform EXT_texture_integer GREMEDY_frame_terminator NV_conditional_render NV_present_video EXT_transform_feedback ARB_depth_buffer_float ARB_draw_instanced ARB_framebuffer_object ARB_framebuffer_sRGB ARB_geometry_shader4 ARB_half_float_vertex ARB_instanced_arrays ARB_map_buffer_range ARB_texture_buffer_object ARB_texture_compression_rgtc ARB_texture_rg ARB_vertex_array_object EXT_direct_state_access EXT_vertex_array_bgra EXT_texture_swizzle NV_explicit_multisample NV_transform_feedback2 ATI_meminfo AMD_performance_monitor AMD_vertex_shader_tesselator EXT_provoking_vertex ARB_uniform_buffer_object ARB_copy_buffer EXT_texture_snorm AMD_draw_buffers_blend APPLE_texture_range APPLE_float_pixels APPLE_vertex_program_evaluators APPLE_aux_depth_stencil APPLE_object_purgeable APPLE_row_bytes ARB_draw_elements_base_vertex ARB_provoking_vertex ARB_sync ARB_texture_multisample ARB_draw_buffers_blend ARB_sample_shading NV_video_capture NV_copy_image EXT_separate_shader_objects NV_parameter_buffer_object2 NV_shader_buffer_load NV_vertex_buffer_unified_memory NV_texture_barrier ARB_shading_language_include ARB_blend_func_extended ARB_sampler_objects ARB_timer_query ARB_vertex_type_2_10_10_10_rev ARB_draw_indirect ARB_gpu_shader_fp64 ARB_shader_subroutine ARB_tessellation_shader ARB_transform_feedback2 ARB_transform_feedback3 AMD_conservative_depth NV_vdpau_interop ARB_ES2_compatibility ARB_get_program_binary ARB_separate_shader_objects ARB_vertex_attrib_64bit ARB_viewport_array ARB_cl_event ARB_debug_output ARB_robustness EXT_shader_image_load_store EXT_vertex_attrib_64bit NV_gpu_shader5 NV_vertex_attrib_integer_64bit AMD_name_gen_delete AMD_debug_output NV_vdpau_interop NV_gpu_program5
+
+# Categories for extensions with no functions - need not be included now
+# ARB_texture_env_add ARB_texture_cube_map ARB_texture_border_clamp
+# ARB_shading_language_100 ARB_texture_non_power_of_two ARB_point_sprite
+# ARB_half_float_pixel ARB_texture_float ARB_pixel_buffer_object EXT_abgr
+# EXT_texture SGI_color_matrix SGI_texture_color_table EXT_cmyka
+# EXT_packed_pixels SGIS_texture_lod EXT_rescale_normal EXT_misc_attribute
+# SGIS_generate_mipmap SGIX_clipmap SGIX_shadow SGIS_texture_edge_clamp
+# SGIS_texture_border_clamp EXT_blend_subtract EXT_blend_logic_op
+# SGIX_async_histogram SGIX_async_pixel SGIX_interlace SGIX_pixel_tiles
+# SGIX_texture_select SGIX_texture_multi_buffer SGIX_texture_scale_bias
+# SGIX_depth_texture SGIX_fog_offset HP_convolution_border_modes
+# SGIX_texture_add_env PGI_vertex_hints EXT_clip_volume_hint
+# SGIX_ir_instrument1 SGIX_calligraphic_fragment SGIX_texture_lod_bias
+# SGIX_shadow_ambient EXT_index_texture EXT_index_array_formats SGIX_ycrcb
+# IBM_rasterpos_clip HP_texture_lighting WIN_phong_shading
+# WIN_specular_fog SGIX_blend_alpha_minmax EXT_bgra HP_occlusion_test
+# EXT_pixel_transform_color_table EXT_shared_texture_palette
+# EXT_separate_specular_color EXT_texture_env REND_screen_coordinates
+# EXT_texture_env_combine APPLE_specular_vector APPLE_transform_hint
+# SGIX_fog_scale INGR_color_clamp INGR_interlace_read EXT_stencil_wrap
+# EXT_422_pixels NV_texgen_reflection SUN_convolution_border_modes
+# SUN_slice_accum EXT_texture_env_add EXT_texture_lod_bias
+# EXT_texture_filter_anisotropic NV_light_max_exponent NV_fog_distance
+# NV_texgen_emboss NV_blend_square NV_texture_env_combine4
+# NV_packed_depth_stencil NV_texture_compression_vtc NV_texture_rectangle
+# NV_texture_shader NV_texture_shader2 NV_vertex_array_range2
+# IBM_cull_vertex SGIX_subsample SGIX_ycrcba SGIX_ycrcb_subsample
+# SGIX_depth_pass_instrument 3DFX_texture_compression_FXT1
+# 3DFX_multisample SGIX_vertex_preclip SGIX_convolution_accuracy
+# SGIX_resample SGIX_scalebias_hint SGIX_texture_coordinate_clamp
+# EXT_shadow_funcs MESA_pack_invert MESA_ycbcr_texture EXT_packed_float
+# EXT_texture_array EXT_texture_compression_latc
+# EXT_texture_compression_rgtc EXT_texture_shared_exponent
+# NV_fragment_program4 EXT_framebuffer_sRGB NV_geometry_shader4
+# EXT_vertex_array_bgra ARB_depth_clamp ARB_fragment_coord_conventions
+# ARB_seamless_cube_map ARB_vertex_array_bgra ARB_texture_cube_map_array
+# ARB_texture_gather ARB_texture_query_lod
+# AMD_shader_stencil_export AMD_seamless_cubemap_per_texture
+
+# Core version in which a function was introduced, or against
+# which an extension can be implemented
+version: 1.0 1.1 1.2 1.3 1.4 1.5 2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1
+# Core version in which a function was removed
+deprecated: 3.1
+# GLX Single, Rendering, or Vendor Private opcode
+glxsingle: *
+glxropcode: *
+glxvendorpriv: *
+# WGL implementation flags (incomplete)
+wglflags: client-handcode server-handcode small-data batchable
+# Drivers in which this is implemented (very incomplete)
+extension: future not_implemented soft WINSOFT NV10 NV20 NV50
+# Function this aliases (indistinguishable to the GL)
+alias: *
+# Mesa dispatch table offset (incomplete)
+offset: *
+# These properties are picked up from NVIDIA .spec files, we don't use them
+glfflags: *
+beginend: *
+glxvectorequiv: *
+subcategory: *
+glextmask: *
+
+###############################################################################
+#
+# glxsingle, glxropcode, and other GLX allocations to vendors
+# are used here, but the master registry for GLX is in
+# /repos/ogl/trunk/doc/registry/extensions.reserved
+#
+# XFree86 dispatch offsets: 0-645
+# 578-641 NV_vertex_program
+# GLS opcodes: 0x0030-0x0269
+#
+###############################################################################
+
+###############################################################################
+#
+# things to remember when adding an extension command
+#
+# - append new ARB and non-ARB extensions to the appropriate portion of
+# the spec file, in extension number order.
+# - leading tabs are suggested. Whitespace of any sort may be used elsewhere.
+# - set glxflags to "ignore" until GLX is updated to support the new command
+# - add new data types to typemaps/spec2wire.map
+# - add extension name in alphabetical order to category list
+# - add commands within an extension in spec order
+# - use existing command entries as a model (where possible)
+# - when reserving new glxropcodes, update extensions.reserved (per above)
+#
+###############################################################################
+
+# New type declarations
+
+passthru: #include <stddef.h>
+
+passthru: #ifndef GL_VERSION_2_0
+passthru: /* GL type for program/shader text */
+passthru: typedef char GLchar;
+passthru: #endif
+passthru:
+passthru: #ifndef GL_VERSION_1_5
+passthru: /* GL types for handling large vertex buffer objects */
+passthru: typedef ptrdiff_t GLintptr;
+passthru: typedef ptrdiff_t GLsizeiptr;
+passthru: #endif
+passthru:
+passthru: #ifndef GL_ARB_vertex_buffer_object
+passthru: /* GL types for handling large vertex buffer objects */
+passthru: typedef ptrdiff_t GLintptrARB;
+passthru: typedef ptrdiff_t GLsizeiptrARB;
+passthru: #endif
+passthru:
+passthru: #ifndef GL_ARB_shader_objects
+passthru: /* GL types for program/shader text and shader object handles */
+passthru: typedef char GLcharARB;
+passthru: typedef unsigned int GLhandleARB;
+passthru: #endif
+passthru:
+passthru: /* GL type for "half" precision (s10e5) float data in host memory */
+passthru: #ifndef GL_ARB_half_float_pixel
+passthru: typedef unsigned short GLhalfARB;
+passthru: #endif
+passthru:
+passthru: #ifndef GL_NV_half_float
+passthru: typedef unsigned short GLhalfNV;
+passthru: #endif
+passthru:
+passthru: #ifndef GLEXT_64_TYPES_DEFINED
+passthru: /* This code block is duplicated in glxext.h, so must be protected */
+passthru: #define GLEXT_64_TYPES_DEFINED
+passthru: /* Define int32_t, int64_t, and uint64_t types for UST/MSC */
+passthru: /* (as used in the GL_EXT_timer_query extension). */
+passthru: #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+passthru: #include <inttypes.h>
+passthru: #elif defined(__sun__) || defined(__digital__)
+passthru: #include <inttypes.h>
+passthru: #if defined(__STDC__)
+passthru: #if defined(__arch64__) || defined(_LP64)
+passthru: typedef long int int64_t;
+passthru: typedef unsigned long int uint64_t;
+passthru: #else
+passthru: typedef long long int int64_t;
+passthru: typedef unsigned long long int uint64_t;
+passthru: #endif /* __arch64__ */
+passthru: #endif /* __STDC__ */
+passthru: #elif defined( __VMS ) || defined(__sgi)
+passthru: #include <inttypes.h>
+passthru: #elif defined(__SCO__) || defined(__USLC__)
+passthru: #include <stdint.h>
+passthru: #elif defined(__UNIXOS2__) || defined(__SOL64__)
+passthru: typedef long int int32_t;
+passthru: typedef long long int int64_t;
+passthru: typedef unsigned long long int uint64_t;
+passthru: #elif defined(_WIN32) && defined(__GNUC__)
+passthru: #include <stdint.h>
+passthru: #elif defined(_WIN32)
+passthru: typedef __int32 int32_t;
+passthru: typedef __int64 int64_t;
+passthru: typedef unsigned __int64 uint64_t;
+passthru: #else
+passthru: /* Fallback if nothing above works */
+passthru: #include <inttypes.h>
+passthru: #endif
+passthru: #endif
+passthru:
+passthru: #ifndef GL_EXT_timer_query
+passthru: typedef int64_t GLint64EXT;
+passthru: typedef uint64_t GLuint64EXT;
+passthru: #endif
+passthru:
+passthru: #ifndef GL_ARB_sync
+passthru: typedef int64_t GLint64;
+passthru: typedef uint64_t GLuint64;
+passthru: typedef struct __GLsync *GLsync;
+passthru: #endif
+passthru:
+passthru: #ifndef GL_ARB_cl_event
+passthru: /* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */
+passthru: struct _cl_context;
+passthru: struct _cl_event;
+passthru: #endif
+passthru:
+passthru: #ifndef GL_ARB_debug_output
+passthru: typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+passthru: #endif
+passthru:
+passthru: #ifndef GL_AMD_debug_output
+passthru: typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+passthru: #endif
+passthru:
+passthru: #ifndef GL_NV_vdpau_interop
+passthru: typedef GLintptr GLvdpauSurfaceNV;
+passthru: #endif
+passthru:
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.0 commands
+#
+###############################################################################
+###############################################################################
+
+###############################################################################
+#
+# drawing-control commands
+#
+###############################################################################
+
+CullFace(mode)
+ return void
+ param mode CullFaceMode in value
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 79
+ offset 152
+
+FrontFace(mode)
+ return void
+ param mode FrontFaceDirection in value
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 84
+ offset 157
+
+Hint(target, mode)
+ return void
+ param target HintTarget in value
+ param mode HintMode in value
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 85
+ offset 158
+
+LineWidth(width)
+ return void
+ param width CheckedFloat32 in value
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 95
+ offset 168
+
+PointSize(size)
+ return void
+ param size CheckedFloat32 in value
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 100
+ offset 173
+
+PolygonMode(face, mode)
+ return void
+ param face MaterialFace in value
+ param mode PolygonMode in value
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 101
+ offset 174
+
+Scissor(x, y, width, height)
+ return void
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 103
+ offset 176
+
+TexParameterf(target, pname, param)
+ return void
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param param CheckedFloat32 in value
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 105
+ wglflags small-data
+ offset 178
+
+TexParameterfv(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 106
+ wglflags small-data
+ offset 179
+
+TexParameteri(target, pname, param)
+ return void
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param param CheckedInt32 in value
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 107
+ wglflags small-data
+ offset 180
+
+TexParameteriv(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category VERSION_1_0 # old: drawing-control
+ version 1.0
+ glxropcode 108
+ wglflags small-data
+ offset 181
+
+TexImage1D(target, level, internalformat, width, border, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureComponentCount in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width)]
+ category VERSION_1_0 # old: drawing-control
+ dlflags handcode
+ glxflags client-handcode server-handcode
+ version 1.0
+ glxropcode 109
+ wglflags client-handcode server-handcode
+ offset 182
+
+TexImage2D(target, level, internalformat, width, height, border, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureComponentCount in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height)]
+ category VERSION_1_0 # old: drawing-control
+ dlflags handcode
+ glxflags client-handcode server-handcode
+ version 1.0
+ glxropcode 110
+ wglflags client-handcode server-handcode
+ offset 183
+
+###############################################################################
+#
+# framebuf commands
+#
+###############################################################################
+
+DrawBuffer(mode)
+ return void
+ param mode DrawBufferMode in value
+ category VERSION_1_0 # old: framebuf
+ version 1.0
+ glxropcode 126
+ offset 202
+
+Clear(mask)
+ return void
+ param mask ClearBufferMask in value
+ category VERSION_1_0 # old: framebuf
+ version 1.0
+ glxropcode 127
+ offset 203
+
+ClearColor(red, green, blue, alpha)
+ return void
+ param red ClampedColorF in value
+ param green ClampedColorF in value
+ param blue ClampedColorF in value
+ param alpha ClampedColorF in value
+ category VERSION_1_0 # old: framebuf
+ version 1.0
+ glxropcode 130
+ offset 206
+
+ClearStencil(s)
+ return void
+ param s StencilValue in value
+ category VERSION_1_0 # old: framebuf
+ version 1.0
+ glxropcode 131
+ offset 207
+
+ClearDepth(depth)
+ return void
+ param depth ClampedFloat64 in value
+ category VERSION_1_0 # old: framebuf
+ version 1.0
+ glxropcode 132
+ offset 208
+
+StencilMask(mask)
+ return void
+ param mask MaskedStencilValue in value
+ category VERSION_1_0 # old: framebuf
+ version 1.0
+ glxropcode 133
+ offset 209
+
+ColorMask(red, green, blue, alpha)
+ return void
+ param red Boolean in value
+ param green Boolean in value
+ param blue Boolean in value
+ param alpha Boolean in value
+ category VERSION_1_0 # old: framebuf
+ version 1.0
+ glxropcode 134
+ offset 210
+
+DepthMask(flag)
+ return void
+ param flag Boolean in value
+ category VERSION_1_0 # old: framebuf
+ version 1.0
+ glxropcode 135
+ offset 211
+
+###############################################################################
+#
+# misc commands
+#
+###############################################################################
+
+Disable(cap)
+ return void
+ param cap EnableCap in value
+ category VERSION_1_0 # old: misc
+ version 1.0
+ dlflags handcode
+ glxflags client-handcode client-intercept
+ glxropcode 138
+ offset 214
+
+Enable(cap)
+ return void
+ param cap EnableCap in value
+ category VERSION_1_0 # old: misc
+ version 1.0
+ dlflags handcode
+ glxflags client-handcode client-intercept
+ glxropcode 139
+ offset 215
+
+Finish()
+ return void
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ category VERSION_1_0 # old: misc
+ version 1.0
+ glxsingle 108
+ offset 216
+
+Flush()
+ return void
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ category VERSION_1_0 # old: misc
+ version 1.0
+ glxsingle 142
+ offset 217
+
+###############################################################################
+#
+# pixel-op commands
+#
+###############################################################################
+
+BlendFunc(sfactor, dfactor)
+ return void
+ param sfactor BlendingFactorSrc in value
+ param dfactor BlendingFactorDest in value
+ category VERSION_1_0 # old: pixel-op
+ version 1.0
+ glxropcode 160
+ offset 241
+
+LogicOp(opcode)
+ return void
+ param opcode LogicOp in value
+ category VERSION_1_0 # old: pixel-op
+ version 1.0
+ glxropcode 161
+ offset 242
+
+StencilFunc(func, ref, mask)
+ return void
+ param func StencilFunction in value
+ param ref ClampedStencilValue in value
+ param mask MaskedStencilValue in value
+ category VERSION_1_0 # old: pixel-op
+ version 1.0
+ glxropcode 162
+ offset 243
+
+StencilOp(fail, zfail, zpass)
+ return void
+ param fail StencilOp in value
+ param zfail StencilOp in value
+ param zpass StencilOp in value
+ category VERSION_1_0 # old: pixel-op
+ version 1.0
+ glxropcode 163
+ offset 244
+
+DepthFunc(func)
+ return void
+ param func DepthFunction in value
+ category VERSION_1_0 # old: pixel-op
+ version 1.0
+ glxropcode 164
+ offset 245
+
+###############################################################################
+#
+# pixel-rw commands
+#
+###############################################################################
+
+PixelStoref(pname, param)
+ return void
+ param pname PixelStoreParameter in value
+ param param CheckedFloat32 in value
+ dlflags notlistable
+ glxflags client-handcode
+ category VERSION_1_0 # old: pixel-rw
+ version 1.0
+ glxsingle 109
+ wglflags batchable
+ offset 249
+
+PixelStorei(pname, param)
+ return void
+ param pname PixelStoreParameter in value
+ param param CheckedInt32 in value
+ dlflags notlistable
+ glxflags client-handcode
+ category VERSION_1_0 # old: pixel-rw
+ version 1.0
+ glxsingle 110
+ wglflags batchable
+ offset 250
+
+ReadBuffer(mode)
+ return void
+ param mode ReadBufferMode in value
+ category VERSION_1_0 # old: pixel-rw
+ version 1.0
+ glxropcode 171
+ offset 254
+
+ReadPixels(x, y, width, height, format, type, pixels)
+ return void
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void out array [COMPSIZE(format/type/width/height)]
+ category VERSION_1_0 # old: pixel-rw
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.0
+ glxsingle 111
+ wglflags client-handcode server-handcode
+ offset 256
+
+###############################################################################
+#
+# state-req commands
+#
+###############################################################################
+
+GetBooleanv(pname, params)
+ return void
+ param pname GetPName in value
+ param params Boolean out array [COMPSIZE(pname)]
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ glxflags client-handcode
+ version 1.0
+ glxsingle 112
+ wglflags small-data
+ offset 258
+
+GetDoublev(pname, params)
+ return void
+ param pname GetPName in value
+ param params Float64 out array [COMPSIZE(pname)]
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ glxflags client-handcode
+ version 1.0
+ glxsingle 114
+ wglflags small-data
+ offset 260
+
+GetError()
+ return ErrorCode
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ glxflags client-handcode
+ version 1.0
+ glxsingle 115
+ offset 261
+
+GetFloatv(pname, params)
+ return void
+ param pname GetPName in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ glxflags client-handcode
+ version 1.0
+ glxsingle 116
+ wglflags small-data
+ offset 262
+
+GetIntegerv(pname, params)
+ return void
+ param pname GetPName in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ glxflags client-handcode
+ version 1.0
+ glxsingle 117
+ wglflags small-data
+ offset 263
+
+GetString(name)
+ return String
+ param name StringName in value
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.0
+ glxsingle 129
+ wglflags client-handcode server-handcode
+ offset 275
+
+GetTexImage(target, level, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void out array [COMPSIZE(target/level/format/type)]
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.0
+ glxsingle 135
+ wglflags client-handcode server-handcode
+ offset 281
+
+GetTexParameterfv(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ version 1.0
+ glxsingle 136
+ wglflags small-data
+ offset 282
+
+GetTexParameteriv(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ version 1.0
+ glxsingle 137
+ wglflags small-data
+ offset 283
+
+GetTexLevelParameterfv(target, level, pname, params)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param pname GetTextureParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ version 1.0
+ glxsingle 138
+ wglflags small-data
+ offset 284
+
+GetTexLevelParameteriv(target, level, pname, params)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param pname GetTextureParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ version 1.0
+ glxsingle 139
+ wglflags small-data
+ offset 285
+
+IsEnabled(cap)
+ return Boolean
+ param cap EnableCap in value
+ category VERSION_1_0 # old: state-req
+ dlflags notlistable
+ version 1.0
+ glxflags client-handcode client-intercept
+ glxsingle 140
+ offset 286
+
+###############################################################################
+#
+# xform commands
+#
+###############################################################################
+
+DepthRange(near, far)
+ return void
+ param near ClampedFloat64 in value
+ param far ClampedFloat64 in value
+ category VERSION_1_0 # old: xform
+ version 1.0
+ glxropcode 174
+ offset 288
+
+Viewport(x, y, width, height)
+ return void
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category VERSION_1_0 # old: xform
+ version 1.0
+ glxropcode 191
+ offset 305
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.0 deprecated commands
+#
+###############################################################################
+###############################################################################
+
+# display-list commands
+
+NewList(list, mode)
+ return void
+ param list List in value
+ param mode ListMode in value
+ dlflags notlistable
+ category VERSION_1_0_DEPRECATED # old: display-list
+ version 1.0
+ deprecated 3.1
+ glxsingle 101
+ wglflags batchable
+ offset 0
+
+EndList()
+ return void
+ dlflags notlistable
+ category VERSION_1_0_DEPRECATED # old: display-list
+ version 1.0
+ deprecated 3.1
+ glxsingle 102
+ wglflags batchable
+ offset 1
+
+CallList(list)
+ return void
+ param list List in value
+ category VERSION_1_0_DEPRECATED # old: display-list
+ version 1.0
+ deprecated 3.1
+ glxropcode 1
+ offset 2
+
+CallLists(n, type, lists)
+ return void
+ param n SizeI in value
+ param type ListNameType in value
+ param lists Void in array [COMPSIZE(n/type)]
+ category VERSION_1_0_DEPRECATED # old: display-list
+ glxflags client-handcode server-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 2
+ offset 3
+
+DeleteLists(list, range)
+ return void
+ param list List in value
+ param range SizeI in value
+ dlflags notlistable
+ category VERSION_1_0_DEPRECATED # old: display-list
+ version 1.0
+ deprecated 3.1
+ glxsingle 103
+ wglflags batchable
+ offset 4
+
+GenLists(range)
+ return List
+ param range SizeI in value
+ dlflags notlistable
+ category VERSION_1_0_DEPRECATED # old: display-list
+ version 1.0
+ deprecated 3.1
+ glxsingle 104
+ offset 5
+
+ListBase(base)
+ return void
+ param base List in value
+ category VERSION_1_0_DEPRECATED # old: display-list
+ version 1.0
+ deprecated 3.1
+ glxropcode 3
+ offset 6
+
+# drawing commands
+
+Begin(mode)
+ return void
+ param mode BeginMode in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 4
+ offset 7
+
+Bitmap(width, height, xorig, yorig, xmove, ymove, bitmap)
+ return void
+ param width SizeI in value
+ param height SizeI in value
+ param xorig CoordF in value
+ param yorig CoordF in value
+ param xmove CoordF in value
+ param ymove CoordF in value
+ param bitmap UInt8 in array [COMPSIZE(width/height)]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ dlflags handcode
+ glxflags client-handcode server-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 5
+ wglflags client-handcode server-handcode
+ offset 8
+
+Color3b(red, green, blue)
+ return void
+ param red ColorB in value
+ param green ColorB in value
+ param blue ColorB in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color3bv
+ version 1.0
+ deprecated 3.1
+ offset 9
+
+Color3bv(v)
+ return void
+ param v ColorB in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 6
+ offset 10
+
+Color3d(red, green, blue)
+ return void
+ param red ColorD in value
+ param green ColorD in value
+ param blue ColorD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color3dv
+ version 1.0
+ deprecated 3.1
+ offset 11
+
+Color3dv(v)
+ return void
+ param v ColorD in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 7
+ offset 12
+
+Color3f(red, green, blue)
+ return void
+ param red ColorF in value
+ param green ColorF in value
+ param blue ColorF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color3fv
+ version 1.0
+ deprecated 3.1
+ offset 13
+
+Color3fv(v)
+ return void
+ param v ColorF in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 8
+ offset 14
+
+Color3i(red, green, blue)
+ return void
+ param red ColorI in value
+ param green ColorI in value
+ param blue ColorI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color3iv
+ version 1.0
+ deprecated 3.1
+ offset 15
+
+Color3iv(v)
+ return void
+ param v ColorI in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 9
+ offset 16
+
+Color3s(red, green, blue)
+ return void
+ param red ColorS in value
+ param green ColorS in value
+ param blue ColorS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color3sv
+ version 1.0
+ deprecated 3.1
+ offset 17
+
+Color3sv(v)
+ return void
+ param v ColorS in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 10
+ offset 18
+
+Color3ub(red, green, blue)
+ return void
+ param red ColorUB in value
+ param green ColorUB in value
+ param blue ColorUB in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color3ubv
+ version 1.0
+ deprecated 3.1
+ offset 19
+
+Color3ubv(v)
+ return void
+ param v ColorUB in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 11
+ offset 20
+
+Color3ui(red, green, blue)
+ return void
+ param red ColorUI in value
+ param green ColorUI in value
+ param blue ColorUI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color3uiv
+ version 1.0
+ deprecated 3.1
+ offset 21
+
+Color3uiv(v)
+ return void
+ param v ColorUI in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 12
+ offset 22
+
+Color3us(red, green, blue)
+ return void
+ param red ColorUS in value
+ param green ColorUS in value
+ param blue ColorUS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color3usv
+ version 1.0
+ deprecated 3.1
+ offset 23
+
+Color3usv(v)
+ return void
+ param v ColorUS in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 13
+ offset 24
+
+Color4b(red, green, blue, alpha)
+ return void
+ param red ColorB in value
+ param green ColorB in value
+ param blue ColorB in value
+ param alpha ColorB in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color4bv
+ version 1.0
+ deprecated 3.1
+ offset 25
+
+Color4bv(v)
+ return void
+ param v ColorB in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 14
+ offset 26
+
+Color4d(red, green, blue, alpha)
+ return void
+ param red ColorD in value
+ param green ColorD in value
+ param blue ColorD in value
+ param alpha ColorD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color4dv
+ version 1.0
+ deprecated 3.1
+ offset 27
+
+Color4dv(v)
+ return void
+ param v ColorD in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 15
+ offset 28
+
+Color4f(red, green, blue, alpha)
+ return void
+ param red ColorF in value
+ param green ColorF in value
+ param blue ColorF in value
+ param alpha ColorF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color4fv
+ version 1.0
+ deprecated 3.1
+ offset 29
+
+Color4fv(v)
+ return void
+ param v ColorF in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 16
+ offset 30
+
+Color4i(red, green, blue, alpha)
+ return void
+ param red ColorI in value
+ param green ColorI in value
+ param blue ColorI in value
+ param alpha ColorI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color4iv
+ version 1.0
+ deprecated 3.1
+ offset 31
+
+Color4iv(v)
+ return void
+ param v ColorI in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 17
+ offset 32
+
+Color4s(red, green, blue, alpha)
+ return void
+ param red ColorS in value
+ param green ColorS in value
+ param blue ColorS in value
+ param alpha ColorS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color4sv
+ version 1.0
+ deprecated 3.1
+ offset 33
+
+Color4sv(v)
+ return void
+ param v ColorS in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 18
+ offset 34
+
+Color4ub(red, green, blue, alpha)
+ return void
+ param red ColorUB in value
+ param green ColorUB in value
+ param blue ColorUB in value
+ param alpha ColorUB in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color4ubv
+ version 1.0
+ deprecated 3.1
+ offset 35
+
+Color4ubv(v)
+ return void
+ param v ColorUB in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 19
+ offset 36
+
+Color4ui(red, green, blue, alpha)
+ return void
+ param red ColorUI in value
+ param green ColorUI in value
+ param blue ColorUI in value
+ param alpha ColorUI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color4uiv
+ version 1.0
+ deprecated 3.1
+ offset 37
+
+Color4uiv(v)
+ return void
+ param v ColorUI in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 20
+ offset 38
+
+Color4us(red, green, blue, alpha)
+ return void
+ param red ColorUS in value
+ param green ColorUS in value
+ param blue ColorUS in value
+ param alpha ColorUS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Color4usv
+ version 1.0
+ deprecated 3.1
+ offset 39
+
+Color4usv(v)
+ return void
+ param v ColorUS in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 21
+ offset 40
+
+EdgeFlag(flag)
+ return void
+ param flag Boolean in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv EdgeFlagv
+ version 1.0
+ deprecated 3.1
+ offset 41
+
+EdgeFlagv(flag)
+ return void
+ param flag Boolean in array [1]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 22
+ offset 42
+
+End()
+ return void
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 23
+ offset 43
+
+Indexd(c)
+ return void
+ param c ColorIndexValueD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Indexdv
+ version 1.0
+ deprecated 3.1
+ offset 44
+
+Indexdv(c)
+ return void
+ param c ColorIndexValueD in array [1]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 24
+ offset 45
+
+Indexf(c)
+ return void
+ param c ColorIndexValueF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Indexfv
+ version 1.0
+ deprecated 3.1
+ offset 46
+
+Indexfv(c)
+ return void
+ param c ColorIndexValueF in array [1]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 25
+ offset 47
+
+Indexi(c)
+ return void
+ param c ColorIndexValueI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Indexiv
+ version 1.0
+ deprecated 3.1
+ offset 48
+
+Indexiv(c)
+ return void
+ param c ColorIndexValueI in array [1]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 26
+ offset 49
+
+Indexs(c)
+ return void
+ param c ColorIndexValueS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Indexsv
+ version 1.0
+ deprecated 3.1
+ offset 50
+
+Indexsv(c)
+ return void
+ param c ColorIndexValueS in array [1]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 27
+ offset 51
+
+Normal3b(nx, ny, nz)
+ return void
+ param nx Int8 in value
+ param ny Int8 in value
+ param nz Int8 in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Normal3bv
+ version 1.0
+ deprecated 3.1
+ offset 52
+
+Normal3bv(v)
+ return void
+ param v Int8 in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 28
+ offset 53
+
+Normal3d(nx, ny, nz)
+ return void
+ param nx CoordD in value
+ param ny CoordD in value
+ param nz CoordD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Normal3dv
+ version 1.0
+ deprecated 3.1
+ offset 54
+
+Normal3dv(v)
+ return void
+ param v CoordD in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 29
+ offset 55
+
+Normal3f(nx, ny, nz)
+ return void
+ param nx CoordF in value
+ param ny CoordF in value
+ param nz CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Normal3fv
+ version 1.0
+ deprecated 3.1
+ offset 56
+
+Normal3fv(v)
+ return void
+ param v CoordF in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 30
+ offset 57
+
+Normal3i(nx, ny, nz)
+ return void
+ param nx Int32 in value
+ param ny Int32 in value
+ param nz Int32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Normal3iv
+ version 1.0
+ deprecated 3.1
+ offset 58
+
+Normal3iv(v)
+ return void
+ param v Int32 in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 31
+ offset 59
+
+Normal3s(nx, ny, nz)
+ return void
+ param nx Int16 in value
+ param ny Int16 in value
+ param nz Int16 in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Normal3sv
+ version 1.0
+ deprecated 3.1
+ offset 60
+
+Normal3sv(v)
+ return void
+ param v Int16 in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 32
+ offset 61
+
+RasterPos2d(x, y)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv RasterPos2dv
+ version 1.0
+ deprecated 3.1
+ offset 62
+
+RasterPos2dv(v)
+ return void
+ param v CoordD in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 33
+ offset 63
+
+RasterPos2f(x, y)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv RasterPos2fv
+ version 1.0
+ deprecated 3.1
+ offset 64
+
+RasterPos2fv(v)
+ return void
+ param v CoordF in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 34
+ offset 65
+
+RasterPos2i(x, y)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv RasterPos2iv
+ version 1.0
+ deprecated 3.1
+ offset 66
+
+RasterPos2iv(v)
+ return void
+ param v CoordI in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 35
+ offset 67
+
+RasterPos2s(x, y)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv RasterPos2sv
+ version 1.0
+ deprecated 3.1
+ offset 68
+
+RasterPos2sv(v)
+ return void
+ param v CoordS in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 36
+ offset 69
+
+RasterPos3d(x, y, z)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ param z CoordD in value
+ vectorequiv RasterPos3dv
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ offset 70
+
+RasterPos3dv(v)
+ return void
+ param v CoordD in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 37
+ offset 71
+
+RasterPos3f(x, y, z)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ param z CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv RasterPos3fv
+ version 1.0
+ deprecated 3.1
+ offset 72
+
+RasterPos3fv(v)
+ return void
+ param v CoordF in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 38
+ offset 73
+
+RasterPos3i(x, y, z)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ param z CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv RasterPos3iv
+ version 1.0
+ deprecated 3.1
+ offset 74
+
+RasterPos3iv(v)
+ return void
+ param v CoordI in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 39
+ offset 75
+
+RasterPos3s(x, y, z)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ param z CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv RasterPos3sv
+ version 1.0
+ deprecated 3.1
+ offset 76
+
+RasterPos3sv(v)
+ return void
+ param v CoordS in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 40
+ offset 77
+
+RasterPos4d(x, y, z, w)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ param z CoordD in value
+ param w CoordD in value
+ vectorequiv RasterPos4dv
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ offset 78
+
+RasterPos4dv(v)
+ return void
+ param v CoordD in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 41
+ offset 79
+
+RasterPos4f(x, y, z, w)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ param z CoordF in value
+ param w CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv RasterPos4fv
+ version 1.0
+ deprecated 3.1
+ offset 80
+
+RasterPos4fv(v)
+ return void
+ param v CoordF in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 42
+ offset 81
+
+RasterPos4i(x, y, z, w)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ param z CoordI in value
+ param w CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv RasterPos4iv
+ version 1.0
+ deprecated 3.1
+ offset 82
+
+RasterPos4iv(v)
+ return void
+ param v CoordI in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 43
+ offset 83
+
+RasterPos4s(x, y, z, w)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ param z CoordS in value
+ param w CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv RasterPos4sv
+ version 1.0
+ deprecated 3.1
+ offset 84
+
+RasterPos4sv(v)
+ return void
+ param v CoordS in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 44
+ offset 85
+
+Rectd(x1, y1, x2, y2)
+ return void
+ param x1 CoordD in value
+ param y1 CoordD in value
+ param x2 CoordD in value
+ param y2 CoordD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Rectdv
+ version 1.0
+ deprecated 3.1
+ offset 86
+
+Rectdv(v1, v2)
+ return void
+ param v1 CoordD in array [2]
+ param v2 CoordD in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 45
+ offset 87
+
+Rectf(x1, y1, x2, y2)
+ return void
+ param x1 CoordF in value
+ param y1 CoordF in value
+ param x2 CoordF in value
+ param y2 CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Rectfv
+ version 1.0
+ deprecated 3.1
+ offset 88
+
+Rectfv(v1, v2)
+ return void
+ param v1 CoordF in array [2]
+ param v2 CoordF in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 46
+ offset 89
+
+Recti(x1, y1, x2, y2)
+ return void
+ param x1 CoordI in value
+ param y1 CoordI in value
+ param x2 CoordI in value
+ param y2 CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Rectiv
+ version 1.0
+ deprecated 3.1
+ offset 90
+
+Rectiv(v1, v2)
+ return void
+ param v1 CoordI in array [2]
+ param v2 CoordI in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 47
+ offset 91
+
+Rects(x1, y1, x2, y2)
+ return void
+ param x1 CoordS in value
+ param y1 CoordS in value
+ param x2 CoordS in value
+ param y2 CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Rectsv
+ version 1.0
+ deprecated 3.1
+ offset 92
+
+Rectsv(v1, v2)
+ return void
+ param v1 CoordS in array [2]
+ param v2 CoordS in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 48
+ offset 93
+
+TexCoord1d(s)
+ return void
+ param s CoordD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord1dv
+ version 1.0
+ deprecated 3.1
+ offset 94
+
+TexCoord1dv(v)
+ return void
+ param v CoordD in array [1]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 49
+ offset 95
+
+TexCoord1f(s)
+ return void
+ param s CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord1fv
+ version 1.0
+ deprecated 3.1
+ offset 96
+
+TexCoord1fv(v)
+ return void
+ param v CoordF in array [1]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 50
+ offset 97
+
+TexCoord1i(s)
+ return void
+ param s CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord1iv
+ version 1.0
+ deprecated 3.1
+ offset 98
+
+TexCoord1iv(v)
+ return void
+ param v CoordI in array [1]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 51
+ offset 99
+
+TexCoord1s(s)
+ return void
+ param s CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord1sv
+ version 1.0
+ deprecated 3.1
+ offset 100
+
+TexCoord1sv(v)
+ return void
+ param v CoordS in array [1]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 52
+ offset 101
+
+TexCoord2d(s, t)
+ return void
+ param s CoordD in value
+ param t CoordD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord2dv
+ version 1.0
+ deprecated 3.1
+ offset 102
+
+TexCoord2dv(v)
+ return void
+ param v CoordD in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 53
+ offset 103
+
+TexCoord2f(s, t)
+ return void
+ param s CoordF in value
+ param t CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord2fv
+ version 1.0
+ deprecated 3.1
+ offset 104
+
+TexCoord2fv(v)
+ return void
+ param v CoordF in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 54
+ offset 105
+
+TexCoord2i(s, t)
+ return void
+ param s CoordI in value
+ param t CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord2iv
+ version 1.0
+ deprecated 3.1
+ offset 106
+
+TexCoord2iv(v)
+ return void
+ param v CoordI in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 55
+ offset 107
+
+TexCoord2s(s, t)
+ return void
+ param s CoordS in value
+ param t CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord2sv
+ version 1.0
+ deprecated 3.1
+ offset 108
+
+TexCoord2sv(v)
+ return void
+ param v CoordS in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 56
+ offset 109
+
+TexCoord3d(s, t, r)
+ return void
+ param s CoordD in value
+ param t CoordD in value
+ param r CoordD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord3dv
+ version 1.0
+ deprecated 3.1
+ offset 110
+
+TexCoord3dv(v)
+ return void
+ param v CoordD in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 57
+ offset 111
+
+TexCoord3f(s, t, r)
+ return void
+ param s CoordF in value
+ param t CoordF in value
+ param r CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord3fv
+ version 1.0
+ deprecated 3.1
+ offset 112
+
+TexCoord3fv(v)
+ return void
+ param v CoordF in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 58
+ offset 113
+
+TexCoord3i(s, t, r)
+ return void
+ param s CoordI in value
+ param t CoordI in value
+ param r CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord3iv
+ version 1.0
+ deprecated 3.1
+ offset 114
+
+TexCoord3iv(v)
+ return void
+ param v CoordI in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 59
+ offset 115
+
+TexCoord3s(s, t, r)
+ return void
+ param s CoordS in value
+ param t CoordS in value
+ param r CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord3sv
+ version 1.0
+ deprecated 3.1
+ offset 116
+
+TexCoord3sv(v)
+ return void
+ param v CoordS in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 60
+ offset 117
+
+TexCoord4d(s, t, r, q)
+ return void
+ param s CoordD in value
+ param t CoordD in value
+ param r CoordD in value
+ param q CoordD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord4dv
+ version 1.0
+ deprecated 3.1
+ offset 118
+
+TexCoord4dv(v)
+ return void
+ param v CoordD in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 61
+ offset 119
+
+TexCoord4f(s, t, r, q)
+ return void
+ param s CoordF in value
+ param t CoordF in value
+ param r CoordF in value
+ param q CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord4fv
+ version 1.0
+ deprecated 3.1
+ offset 120
+
+TexCoord4fv(v)
+ return void
+ param v CoordF in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 62
+ offset 121
+
+TexCoord4i(s, t, r, q)
+ return void
+ param s CoordI in value
+ param t CoordI in value
+ param r CoordI in value
+ param q CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord4iv
+ version 1.0
+ deprecated 3.1
+ offset 122
+
+TexCoord4iv(v)
+ return void
+ param v CoordI in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 63
+ offset 123
+
+TexCoord4s(s, t, r, q)
+ return void
+ param s CoordS in value
+ param t CoordS in value
+ param r CoordS in value
+ param q CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv TexCoord4sv
+ version 1.0
+ deprecated 3.1
+ offset 124
+
+TexCoord4sv(v)
+ return void
+ param v CoordS in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 64
+ offset 125
+
+Vertex2d(x, y)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex2dv
+ version 1.0
+ deprecated 3.1
+ offset 126
+
+Vertex2dv(v)
+ return void
+ param v CoordD in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 65
+ offset 127
+
+Vertex2f(x, y)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex2fv
+ version 1.0
+ deprecated 3.1
+ offset 128
+
+Vertex2fv(v)
+ return void
+ param v CoordF in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 66
+ offset 129
+
+Vertex2i(x, y)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex2iv
+ version 1.0
+ deprecated 3.1
+ offset 130
+
+Vertex2iv(v)
+ return void
+ param v CoordI in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 67
+ offset 131
+
+Vertex2s(x, y)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex2sv
+ version 1.0
+ deprecated 3.1
+ offset 132
+
+Vertex2sv(v)
+ return void
+ param v CoordS in array [2]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 68
+ offset 133
+
+Vertex3d(x, y, z)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ param z CoordD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex3dv
+ version 1.0
+ deprecated 3.1
+ offset 134
+
+Vertex3dv(v)
+ return void
+ param v CoordD in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 69
+ offset 135
+
+Vertex3f(x, y, z)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ param z CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex3fv
+ version 1.0
+ deprecated 3.1
+ offset 136
+
+Vertex3fv(v)
+ return void
+ param v CoordF in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 70
+ offset 137
+
+Vertex3i(x, y, z)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ param z CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex3iv
+ version 1.0
+ deprecated 3.1
+ offset 138
+
+Vertex3iv(v)
+ return void
+ param v CoordI in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 71
+ offset 139
+
+Vertex3s(x, y, z)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ param z CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex3sv
+ version 1.0
+ deprecated 3.1
+ offset 140
+
+Vertex3sv(v)
+ return void
+ param v CoordS in array [3]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 72
+ offset 141
+
+Vertex4d(x, y, z, w)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ param z CoordD in value
+ param w CoordD in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex4dv
+ version 1.0
+ deprecated 3.1
+ offset 142
+
+Vertex4dv(v)
+ return void
+ param v CoordD in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 73
+ offset 143
+
+Vertex4f(x, y, z, w)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ param z CoordF in value
+ param w CoordF in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex4fv
+ version 1.0
+ deprecated 3.1
+ offset 144
+
+Vertex4fv(v)
+ return void
+ param v CoordF in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 74
+ offset 145
+
+Vertex4i(x, y, z, w)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ param z CoordI in value
+ param w CoordI in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex4iv
+ version 1.0
+ deprecated 3.1
+ offset 146
+
+Vertex4iv(v)
+ return void
+ param v CoordI in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 75
+ offset 147
+
+Vertex4s(x, y, z, w)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ param z CoordS in value
+ param w CoordS in value
+ category VERSION_1_0_DEPRECATED # old: drawing
+ vectorequiv Vertex4sv
+ version 1.0
+ deprecated 3.1
+ offset 148
+
+Vertex4sv(v)
+ return void
+ param v CoordS in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing
+ version 1.0
+ deprecated 3.1
+ glxropcode 76
+ offset 149
+
+ClipPlane(plane, equation)
+ return void
+ param plane ClipPlaneName in value
+ param equation Float64 in array [4]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 77
+ offset 150
+
+ColorMaterial(face, mode)
+ return void
+ param face MaterialFace in value
+ param mode ColorMaterialParameter in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 78
+ offset 151
+
+Fogf(pname, param)
+ return void
+ param pname FogParameter in value
+ param param CheckedFloat32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 80
+ wglflags small-data
+ offset 153
+
+Fogfv(pname, params)
+ return void
+ param pname FogParameter in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 81
+ wglflags small-data
+ offset 154
+
+Fogi(pname, param)
+ return void
+ param pname FogParameter in value
+ param param CheckedInt32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 82
+ wglflags small-data
+ offset 155
+
+Fogiv(pname, params)
+ return void
+ param pname FogParameter in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 83
+ wglflags small-data
+ offset 156
+
+Lightf(light, pname, param)
+ return void
+ param light LightName in value
+ param pname LightParameter in value
+ param param CheckedFloat32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 86
+ wglflags small-data
+ offset 159
+
+Lightfv(light, pname, params)
+ return void
+ param light LightName in value
+ param pname LightParameter in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 87
+ wglflags small-data
+ offset 160
+
+Lighti(light, pname, param)
+ return void
+ param light LightName in value
+ param pname LightParameter in value
+ param param CheckedInt32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 88
+ wglflags small-data
+ offset 161
+
+Lightiv(light, pname, params)
+ return void
+ param light LightName in value
+ param pname LightParameter in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 89
+ wglflags small-data
+ offset 162
+
+LightModelf(pname, param)
+ return void
+ param pname LightModelParameter in value
+ param param Float32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 90
+ wglflags small-data
+ offset 163
+
+LightModelfv(pname, params)
+ return void
+ param pname LightModelParameter in value
+ param params Float32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 91
+ wglflags small-data
+ offset 164
+
+LightModeli(pname, param)
+ return void
+ param pname LightModelParameter in value
+ param param Int32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 92
+ wglflags small-data
+ offset 165
+
+LightModeliv(pname, params)
+ return void
+ param pname LightModelParameter in value
+ param params Int32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 93
+ wglflags small-data
+ offset 166
+
+LineStipple(factor, pattern)
+ return void
+ param factor CheckedInt32 in value
+ param pattern LineStipple in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 94
+ offset 167
+
+Materialf(face, pname, param)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param param CheckedFloat32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 96
+ wglflags small-data
+ offset 169
+
+Materialfv(face, pname, params)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 97
+ wglflags small-data
+ offset 170
+
+Materiali(face, pname, param)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param param CheckedInt32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 98
+ wglflags small-data
+ offset 171
+
+Materialiv(face, pname, params)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 99
+ wglflags small-data
+ offset 172
+
+PolygonStipple(mask)
+ return void
+ param mask UInt8 in array [COMPSIZE()]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ dlflags handcode
+ glxflags client-handcode server-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 102
+ wglflags client-handcode server-handcode
+ offset 175
+
+ShadeModel(mode)
+ return void
+ param mode ShadingModel in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 104
+ offset 177
+
+TexEnvf(target, pname, param)
+ return void
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param param CheckedFloat32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 111
+ wglflags small-data
+ offset 184
+
+TexEnvfv(target, pname, params)
+ return void
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 112
+ wglflags small-data
+ offset 185
+
+TexEnvi(target, pname, param)
+ return void
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param param CheckedInt32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 113
+ wglflags small-data
+ offset 186
+
+TexEnviv(target, pname, params)
+ return void
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 114
+ wglflags small-data
+ offset 187
+
+TexGend(coord, pname, param)
+ return void
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param param Float64 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 115
+ wglflags small-data
+ offset 188
+
+TexGendv(coord, pname, params)
+ return void
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params Float64 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 116
+ wglflags small-data
+ offset 189
+
+TexGenf(coord, pname, param)
+ return void
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param param CheckedFloat32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 117
+ wglflags small-data
+ offset 190
+
+TexGenfv(coord, pname, params)
+ return void
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 118
+ wglflags small-data
+ offset 191
+
+TexGeni(coord, pname, param)
+ return void
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param param CheckedInt32 in value
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 119
+ wglflags small-data
+ offset 192
+
+TexGeniv(coord, pname, params)
+ return void
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: drawing-control
+ version 1.0
+ deprecated 3.1
+ glxropcode 120
+ wglflags small-data
+ offset 193
+
+# feedback commands
+
+FeedbackBuffer(size, type, buffer)
+ return void
+ param size SizeI in value
+ param type FeedbackType in value
+ param buffer FeedbackElement out array [size] retained
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ category VERSION_1_0_DEPRECATED # old: feedback
+ version 1.0
+ deprecated 3.1
+ glxsingle 105
+ wglflags client-handcode server-handcode batchable
+ offset 194
+
+SelectBuffer(size, buffer)
+ return void
+ param size SizeI in value
+ param buffer SelectName out array [size] retained
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ category VERSION_1_0_DEPRECATED # old: feedback
+ version 1.0
+ deprecated 3.1
+ glxsingle 106
+ wglflags client-handcode server-handcode batchable
+ offset 195
+
+RenderMode(mode)
+ return Int32
+ param mode RenderingMode in value
+ category VERSION_1_0_DEPRECATED # old: feedback
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.0
+ deprecated 3.1
+ glxsingle 107
+ wglflags client-handcode server-handcode
+ offset 196
+
+InitNames()
+ return void
+ category VERSION_1_0_DEPRECATED # old: feedback
+ version 1.0
+ deprecated 3.1
+ glxropcode 121
+ offset 197
+
+LoadName(name)
+ return void
+ param name SelectName in value
+ category VERSION_1_0_DEPRECATED # old: feedback
+ version 1.0
+ deprecated 3.1
+ glxropcode 122
+ offset 198
+
+PassThrough(token)
+ return void
+ param token FeedbackElement in value
+ category VERSION_1_0_DEPRECATED # old: feedback
+ version 1.0
+ deprecated 3.1
+ glxropcode 123
+ offset 199
+
+PopName()
+ return void
+ category VERSION_1_0_DEPRECATED # old: feedback
+ version 1.0
+ deprecated 3.1
+ glxropcode 124
+ offset 200
+
+PushName(name)
+ return void
+ param name SelectName in value
+ category VERSION_1_0_DEPRECATED # old: feedback
+ version 1.0
+ deprecated 3.1
+ glxropcode 125
+ offset 201
+
+ClearAccum(red, green, blue, alpha)
+ return void
+ param red Float32 in value
+ param green Float32 in value
+ param blue Float32 in value
+ param alpha Float32 in value
+ category VERSION_1_0_DEPRECATED # old: framebuf
+ version 1.0
+ deprecated 3.1
+ glxropcode 128
+ offset 204
+
+ClearIndex(c)
+ return void
+ param c MaskedColorIndexValueF in value
+ category VERSION_1_0_DEPRECATED # old: framebuf
+ version 1.0
+ deprecated 3.1
+ glxropcode 129
+ offset 205
+
+IndexMask(mask)
+ return void
+ param mask MaskedColorIndexValueI in value
+ category VERSION_1_0_DEPRECATED # old: framebuf
+ version 1.0
+ deprecated 3.1
+ glxropcode 136
+ offset 212
+
+Accum(op, value)
+ return void
+ param op AccumOp in value
+ param value CoordF in value
+ category VERSION_1_0_DEPRECATED # old: misc
+ version 1.0
+ deprecated 3.1
+ glxropcode 137
+ offset 213
+
+PopAttrib()
+ return void
+ category VERSION_1_0_DEPRECATED # old: misc
+ version 1.0
+ deprecated 3.1
+ glxropcode 141
+ offset 218
+
+PushAttrib(mask)
+ return void
+ param mask AttribMask in value
+ category VERSION_1_0_DEPRECATED # old: misc
+ version 1.0
+ deprecated 3.1
+ glxropcode 142
+ offset 219
+
+# modeling commands
+
+Map1d(target, u1, u2, stride, order, points)
+ return void
+ param target MapTarget in value
+ param u1 CoordD in value
+ param u2 CoordD in value
+ param stride Int32 in value
+ param order CheckedInt32 in value
+ param points CoordD in array [COMPSIZE(target/stride/order)]
+ category VERSION_1_0_DEPRECATED # old: modeling
+ dlflags handcode
+ glxflags client-handcode server-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 143
+ wglflags client-handcode server-handcode
+ offset 220
+
+Map1f(target, u1, u2, stride, order, points)
+ return void
+ param target MapTarget in value
+ param u1 CoordF in value
+ param u2 CoordF in value
+ param stride Int32 in value
+ param order CheckedInt32 in value
+ param points CoordF in array [COMPSIZE(target/stride/order)]
+ category VERSION_1_0_DEPRECATED # old: modeling
+ dlflags handcode
+ glxflags client-handcode server-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 144
+ wglflags client-handcode server-handcode
+ offset 221
+
+Map2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points)
+ return void
+ param target MapTarget in value
+ param u1 CoordD in value
+ param u2 CoordD in value
+ param ustride Int32 in value
+ param uorder CheckedInt32 in value
+ param v1 CoordD in value
+ param v2 CoordD in value
+ param vstride Int32 in value
+ param vorder CheckedInt32 in value
+ param points CoordD in array [COMPSIZE(target/ustride/uorder/vstride/vorder)]
+ category VERSION_1_0_DEPRECATED # old: modeling
+ dlflags handcode
+ glxflags client-handcode server-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 145
+ wglflags client-handcode server-handcode
+ offset 222
+
+Map2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points)
+ return void
+ param target MapTarget in value
+ param u1 CoordF in value
+ param u2 CoordF in value
+ param ustride Int32 in value
+ param uorder CheckedInt32 in value
+ param v1 CoordF in value
+ param v2 CoordF in value
+ param vstride Int32 in value
+ param vorder CheckedInt32 in value
+ param points CoordF in array [COMPSIZE(target/ustride/uorder/vstride/vorder)]
+ category VERSION_1_0_DEPRECATED # old: modeling
+ dlflags handcode
+ glxflags client-handcode server-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 146
+ wglflags client-handcode server-handcode
+ offset 223
+
+MapGrid1d(un, u1, u2)
+ return void
+ param un Int32 in value
+ param u1 CoordD in value
+ param u2 CoordD in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 147
+ offset 224
+
+MapGrid1f(un, u1, u2)
+ return void
+ param un Int32 in value
+ param u1 CoordF in value
+ param u2 CoordF in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 148
+ offset 225
+
+MapGrid2d(un, u1, u2, vn, v1, v2)
+ return void
+ param un Int32 in value
+ param u1 CoordD in value
+ param u2 CoordD in value
+ param vn Int32 in value
+ param v1 CoordD in value
+ param v2 CoordD in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 149
+ offset 226
+
+MapGrid2f(un, u1, u2, vn, v1, v2)
+ return void
+ param un Int32 in value
+ param u1 CoordF in value
+ param u2 CoordF in value
+ param vn Int32 in value
+ param v1 CoordF in value
+ param v2 CoordF in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 150
+ offset 227
+
+EvalCoord1d(u)
+ return void
+ param u CoordD in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ vectorequiv EvalCoord1dv
+ version 1.0
+ deprecated 3.1
+ offset 228
+
+EvalCoord1dv(u)
+ return void
+ param u CoordD in array [1]
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 151
+ offset 229
+
+EvalCoord1f(u)
+ return void
+ param u CoordF in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ vectorequiv EvalCoord1fv
+ version 1.0
+ deprecated 3.1
+ offset 230
+
+EvalCoord1fv(u)
+ return void
+ param u CoordF in array [1]
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 152
+ offset 231
+
+EvalCoord2d(u, v)
+ return void
+ param u CoordD in value
+ param v CoordD in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ vectorequiv EvalCoord2dv
+ version 1.0
+ deprecated 3.1
+ offset 232
+
+EvalCoord2dv(u)
+ return void
+ param u CoordD in array [2]
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 153
+ offset 233
+
+EvalCoord2f(u, v)
+ return void
+ param u CoordF in value
+ param v CoordF in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ vectorequiv EvalCoord2fv
+ version 1.0
+ deprecated 3.1
+ offset 234
+
+EvalCoord2fv(u)
+ return void
+ param u CoordF in array [2]
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 154
+ offset 235
+
+EvalMesh1(mode, i1, i2)
+ return void
+ param mode MeshMode1 in value
+ param i1 CheckedInt32 in value
+ param i2 CheckedInt32 in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 155
+ offset 236
+
+EvalPoint1(i)
+ return void
+ param i Int32 in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 156
+ offset 237
+
+EvalMesh2(mode, i1, i2, j1, j2)
+ return void
+ param mode MeshMode2 in value
+ param i1 CheckedInt32 in value
+ param i2 CheckedInt32 in value
+ param j1 CheckedInt32 in value
+ param j2 CheckedInt32 in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 157
+ offset 238
+
+EvalPoint2(i, j)
+ return void
+ param i CheckedInt32 in value
+ param j CheckedInt32 in value
+ category VERSION_1_0_DEPRECATED # old: modeling
+ version 1.0
+ deprecated 3.1
+ glxropcode 158
+ offset 239
+
+AlphaFunc(func, ref)
+ return void
+ param func AlphaFunction in value
+ param ref ClampedFloat32 in value
+ category VERSION_1_0_DEPRECATED # old: pixel-op
+ version 1.0
+ deprecated 3.1
+ glxropcode 159
+ offset 240
+
+PixelZoom(xfactor, yfactor)
+ return void
+ param xfactor Float32 in value
+ param yfactor Float32 in value
+ category VERSION_1_0_DEPRECATED # old: pixel-rw
+ version 1.0
+ deprecated 3.1
+ glxropcode 165
+ offset 246
+
+PixelTransferf(pname, param)
+ return void
+ param pname PixelTransferParameter in value
+ param param CheckedFloat32 in value
+ category VERSION_1_0_DEPRECATED # old: pixel-rw
+ version 1.0
+ deprecated 3.1
+ glxropcode 166
+ offset 247
+
+PixelTransferi(pname, param)
+ return void
+ param pname PixelTransferParameter in value
+ param param CheckedInt32 in value
+ category VERSION_1_0_DEPRECATED # old: pixel-rw
+ version 1.0
+ deprecated 3.1
+ glxropcode 167
+ offset 248
+
+PixelMapfv(map, mapsize, values)
+ return void
+ param map PixelMap in value
+ param mapsize CheckedInt32 in value
+ param values Float32 in array [mapsize]
+ category VERSION_1_0_DEPRECATED # old: pixel-rw
+ glxflags client-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 168
+ offset 251
+
+PixelMapuiv(map, mapsize, values)
+ return void
+ param map PixelMap in value
+ param mapsize CheckedInt32 in value
+ param values UInt32 in array [mapsize]
+ category VERSION_1_0_DEPRECATED # old: pixel-rw
+ glxflags client-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 169
+ offset 252
+
+PixelMapusv(map, mapsize, values)
+ return void
+ param map PixelMap in value
+ param mapsize CheckedInt32 in value
+ param values UInt16 in array [mapsize]
+ category VERSION_1_0_DEPRECATED # old: pixel-rw
+ glxflags client-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 170
+ offset 253
+
+CopyPixels(x, y, width, height, type)
+ return void
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ param type PixelCopyType in value
+ category VERSION_1_0_DEPRECATED # old: pixel-rw
+ version 1.0
+ deprecated 3.1
+ glxropcode 172
+ offset 255
+
+DrawPixels(width, height, format, type, pixels)
+ return void
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height)]
+ category VERSION_1_0_DEPRECATED # old: pixel-rw
+ dlflags handcode
+ glxflags client-handcode server-handcode
+ version 1.0
+ deprecated 3.1
+ glxropcode 173
+ wglflags client-handcode server-handcode
+ offset 257
+
+GetClipPlane(plane, equation)
+ return void
+ param plane ClipPlaneName in value
+ param equation Float64 out array [4]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 113
+ glxflags client-handcode server-handcode
+ offset 259
+
+GetLightfv(light, pname, params)
+ return void
+ param light LightName in value
+ param pname LightParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 118
+ wglflags small-data
+ offset 264
+
+GetLightiv(light, pname, params)
+ return void
+ param light LightName in value
+ param pname LightParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 119
+ wglflags small-data
+ offset 265
+
+GetMapdv(target, query, v)
+ return void
+ param target MapTarget in value
+ param query GetMapQuery in value
+ param v Float64 out array [COMPSIZE(target/query)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 120
+ offset 266
+
+GetMapfv(target, query, v)
+ return void
+ param target MapTarget in value
+ param query GetMapQuery in value
+ param v Float32 out array [COMPSIZE(target/query)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 121
+ offset 267
+
+GetMapiv(target, query, v)
+ return void
+ param target MapTarget in value
+ param query GetMapQuery in value
+ param v Int32 out array [COMPSIZE(target/query)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 122
+ offset 268
+
+GetMaterialfv(face, pname, params)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 123
+ wglflags small-data
+ offset 269
+
+GetMaterialiv(face, pname, params)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 124
+ wglflags small-data
+ offset 270
+
+GetPixelMapfv(map, values)
+ return void
+ param map PixelMap in value
+ param values Float32 out array [COMPSIZE(map)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 125
+ offset 271
+
+GetPixelMapuiv(map, values)
+ return void
+ param map PixelMap in value
+ param values UInt32 out array [COMPSIZE(map)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 126
+ offset 272
+
+GetPixelMapusv(map, values)
+ return void
+ param map PixelMap in value
+ param values UInt16 out array [COMPSIZE(map)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 127
+ offset 273
+
+GetPolygonStipple(mask)
+ return void
+ param mask UInt8 out array [COMPSIZE()]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.0
+ deprecated 3.1
+ glxsingle 128
+ wglflags client-handcode server-handcode
+ offset 274
+
+GetTexEnvfv(target, pname, params)
+ return void
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 130
+ wglflags small-data
+ offset 276
+
+GetTexEnviv(target, pname, params)
+ return void
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 131
+ wglflags small-data
+ offset 277
+
+GetTexGendv(coord, pname, params)
+ return void
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params Float64 out array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 132
+ wglflags small-data
+ offset 278
+
+GetTexGenfv(coord, pname, params)
+ return void
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 133
+ wglflags small-data
+ offset 279
+
+GetTexGeniv(coord, pname, params)
+ return void
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 134
+ wglflags small-data
+ offset 280
+
+IsList(list)
+ return Boolean
+ param list List in value
+ category VERSION_1_0_DEPRECATED # old: state-req
+ dlflags notlistable
+ version 1.0
+ deprecated 3.1
+ glxsingle 141
+ offset 287
+
+Frustum(left, right, bottom, top, zNear, zFar)
+ return void
+ param left Float64 in value
+ param right Float64 in value
+ param bottom Float64 in value
+ param top Float64 in value
+ param zNear Float64 in value
+ param zFar Float64 in value
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 175
+ offset 289
+
+LoadIdentity()
+ return void
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 176
+ offset 290
+
+LoadMatrixf(m)
+ return void
+ param m Float32 in array [16]
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 177
+ offset 291
+
+LoadMatrixd(m)
+ return void
+ param m Float64 in array [16]
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 178
+ offset 292
+
+MatrixMode(mode)
+ return void
+ param mode MatrixMode in value
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 179
+ offset 293
+
+MultMatrixf(m)
+ return void
+ param m Float32 in array [16]
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 180
+ offset 294
+
+MultMatrixd(m)
+ return void
+ param m Float64 in array [16]
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 181
+ offset 295
+
+Ortho(left, right, bottom, top, zNear, zFar)
+ return void
+ param left Float64 in value
+ param right Float64 in value
+ param bottom Float64 in value
+ param top Float64 in value
+ param zNear Float64 in value
+ param zFar Float64 in value
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 182
+ offset 296
+
+PopMatrix()
+ return void
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 183
+ offset 297
+
+PushMatrix()
+ return void
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 184
+ offset 298
+
+Rotated(angle, x, y, z)
+ return void
+ param angle Float64 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 185
+ offset 299
+
+Rotatef(angle, x, y, z)
+ return void
+ param angle Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 186
+ offset 300
+
+Scaled(x, y, z)
+ return void
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 187
+ offset 301
+
+Scalef(x, y, z)
+ return void
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 188
+ offset 302
+
+Translated(x, y, z)
+ return void
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 189
+ offset 303
+
+Translatef(x, y, z)
+ return void
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category VERSION_1_0_DEPRECATED # old: xform
+ version 1.0
+ deprecated 3.1
+ glxropcode 190
+ offset 304
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.1 commands
+#
+###############################################################################
+###############################################################################
+
+DrawArrays(mode, first, count)
+ return void
+ param mode BeginMode in value
+ param first Int32 in value
+ param count SizeI in value
+ category VERSION_1_1
+ dlflags handcode
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ glxropcode 193
+ offset 310
+
+DrawElements(mode, count, type, indices)
+ return void
+ param mode BeginMode in value
+ param count SizeI in value
+ param type DrawElementsType in value
+ param indices Void in array [COMPSIZE(count/type)]
+ category VERSION_1_1
+ dlflags handcode
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ offset 311
+
+GetPointerv(pname, params)
+ return void
+ param pname GetPointervPName in value
+ param params VoidPointer out array [1]
+ category VERSION_1_1
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ offset 329
+
+PolygonOffset(factor, units)
+ return void
+ param factor Float32 in value
+ param units Float32 in value
+ category VERSION_1_1
+ version 1.1
+ glxropcode 192
+ offset 319
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+CopyTexImage1D(target, level, internalformat, x, y, width, border)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ category VERSION_1_1
+ version 1.1
+ glxropcode 4119
+ glxflags EXT
+ offset 323
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+CopyTexImage2D(target, level, internalformat, x, y, width, height, border)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ category VERSION_1_1
+ version 1.1
+ glxropcode 4120
+ glxflags EXT
+ offset 324
+
+CopyTexSubImage1D(target, level, xoffset, x, y, width)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ category VERSION_1_1
+ version 1.1
+ glxropcode 4121
+ glxflags EXT
+ offset 325
+
+CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category VERSION_1_1
+ version 1.1
+ glxropcode 4122
+ glxflags EXT
+ offset 326
+
+TexSubImage1D(target, level, xoffset, width, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width)]
+ category VERSION_1_1
+ dlflags handcode
+ glxflags EXT client-handcode server-handcode
+ version 1.1
+ glxropcode 4099
+ offset 332
+
+TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height)]
+ category VERSION_1_1
+ dlflags handcode
+ glxflags EXT client-handcode server-handcode
+ version 1.1
+ glxropcode 4100
+ offset 333
+
+BindTexture(target, texture)
+ return void
+ param target TextureTarget in value
+ param texture Texture in value
+ category VERSION_1_1
+ version 1.1
+ glxropcode 4117
+ glxflags EXT
+ offset 307
+
+DeleteTextures(n, textures)
+ return void
+ param n SizeI in value
+ param textures Texture in array [n]
+ category VERSION_1_1
+ dlflags notlistable
+ version 1.1
+ glxsingle 144
+ offset 327
+
+GenTextures(n, textures)
+ return void
+ param n SizeI in value
+ param textures Texture out array [n]
+ category VERSION_1_1
+ dlflags notlistable
+ version 1.1
+ glxsingle 145
+ offset 328
+
+IsTexture(texture)
+ return Boolean
+ param texture Texture in value
+ category VERSION_1_1
+ dlflags notlistable
+ version 1.1
+ glxsingle 146
+ offset 330
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.1 deprecated commands
+#
+###############################################################################
+###############################################################################
+
+ArrayElement(i)
+ return void
+ param i Int32 in value
+ category VERSION_1_1_DEPRECATED
+ dlflags handcode
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ deprecated 3.1
+ offset 306
+
+ColorPointer(size, type, stride, pointer)
+ return void
+ param size Int32 in value
+ param type ColorPointerType in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride)] retained
+ category VERSION_1_1_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ deprecated 3.1
+ offset 308
+
+DisableClientState(array)
+ return void
+ param array EnableCap in value
+ category VERSION_1_1_DEPRECATED
+ version 1.1
+ deprecated 3.1
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ offset 309
+
+EdgeFlagPointer(stride, pointer)
+ return void
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(stride)] retained
+ category VERSION_1_1_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ deprecated 3.1
+ offset 312
+
+EnableClientState(array)
+ return void
+ param array EnableCap in value
+ category VERSION_1_1_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ deprecated 3.1
+ offset 313
+
+IndexPointer(type, stride, pointer)
+ return void
+ param type IndexPointerType in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride)] retained
+ category VERSION_1_1_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ deprecated 3.1
+ offset 314
+
+InterleavedArrays(format, stride, pointer)
+ return void
+ param format InterleavedArrayFormat in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(format/stride)] retained
+ category VERSION_1_1_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ deprecated 3.1
+ offset 317
+
+NormalPointer(type, stride, pointer)
+ return void
+ param type NormalPointerType in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride)] retained
+ category VERSION_1_1_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ deprecated 3.1
+ offset 318
+
+TexCoordPointer(size, type, stride, pointer)
+ return void
+ param size Int32 in value
+ param type TexCoordPointerType in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride)] retained
+ category VERSION_1_1_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ deprecated 3.1
+ offset 320
+
+VertexPointer(size, type, stride, pointer)
+ return void
+ param size Int32 in value
+ param type VertexPointerType in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride)] retained
+ category VERSION_1_1_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ deprecated 3.1
+ offset 321
+
+AreTexturesResident(n, textures, residences)
+ return Boolean
+ param n SizeI in value
+ param textures Texture in array [n]
+ param residences Boolean out array [n]
+ category VERSION_1_1_DEPRECATED
+ glxsingle 143
+ dlflags notlistable
+ version 1.1
+ deprecated 3.1
+ offset 322
+
+PrioritizeTextures(n, textures, priorities)
+ return void
+ param n SizeI in value
+ param textures Texture in array [n]
+ param priorities ClampedFloat32 in array [n]
+ category VERSION_1_1_DEPRECATED
+ version 1.1
+ deprecated 3.1
+ glxropcode 4118
+ glxflags EXT
+ offset 331
+
+Indexub(c)
+ return void
+ param c ColorIndexValueUB in value
+ category VERSION_1_1_DEPRECATED
+ vectorequiv Indexubv
+ version 1.1
+ offset 315
+
+Indexubv(c)
+ return void
+ param c ColorIndexValueUB in array [1]
+ category VERSION_1_1_DEPRECATED
+ version 1.1
+ glxropcode 194
+ offset 316
+
+PopClientAttrib()
+ return void
+ category VERSION_1_1_DEPRECATED
+ version 1.1
+ deprecated 3.1
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ offset 334
+
+PushClientAttrib(mask)
+ return void
+ param mask ClientAttribMask in value
+ category VERSION_1_1_DEPRECATED
+ version 1.1
+ deprecated 3.1
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ offset 335
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.2 commands
+#
+###############################################################################
+###############################################################################
+
+BlendColor(red, green, blue, alpha)
+ return void
+ param red ClampedColorF in value
+ param green ClampedColorF in value
+ param blue ClampedColorF in value
+ param alpha ClampedColorF in value
+ category VERSION_1_2
+ glxflags EXT
+ version 1.2
+ glxropcode 4096
+ offset 336
+
+BlendEquation(mode)
+ return void
+ param mode BlendEquationMode in value
+ category VERSION_1_2
+ glxflags EXT
+ version 1.2
+ glxropcode 4097
+ offset 337
+
+DrawRangeElements(mode, start, end, count, type, indices)
+ return void
+ param mode BeginMode in value
+ param start UInt32 in value
+ param end UInt32 in value
+ param count SizeI in value
+ param type DrawElementsType in value
+ param indices Void in array [COMPSIZE(count/type)]
+ category VERSION_1_2
+ dlflags handcode
+ glxflags client-handcode client-intercept server-handcode
+ version 1.2
+ offset 338
+
+# OpenGL 1.2 (EXT_texture3D) commands
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+TexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureComponentCount in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height/depth)]
+ category VERSION_1_2
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4114
+ offset 371
+
+TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height/depth)]
+ category VERSION_1_2
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.2
+ glxropcode 4115
+ offset 372
+
+# OpenGL 1.2 (EXT_copy_texture) commands (specific to texture3D)
+
+CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category VERSION_1_2
+ glxflags EXT
+ version 1.2
+ glxropcode 4123
+ offset 373
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.2 deprecated commands
+#
+###############################################################################
+###############################################################################
+
+# OpenGL 1.2 (SGI_color_table) commands
+
+ColorTable(target, internalformat, width, format, type, table)
+ return void
+ param target ColorTableTarget in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param table Void in array [COMPSIZE(format/type/width)]
+ category VERSION_1_2_DEPRECATED
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 2053
+ offset 339
+
+ColorTableParameterfv(target, pname, params)
+ return void
+ param target ColorTableTarget in value
+ param pname ColorTableParameterPName in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 2054
+ offset 340
+
+ColorTableParameteriv(target, pname, params)
+ return void
+ param target ColorTableTarget in value
+ param pname ColorTableParameterPName in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 2055
+ offset 341
+
+CopyColorTable(target, internalformat, x, y, width)
+ return void
+ param target ColorTableTarget in value
+ param internalformat PixelInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 2056
+ offset 342
+
+GetColorTable(target, format, type, table)
+ return void
+ param target ColorTableTarget in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param table Void out array [COMPSIZE(target/format/type)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.2
+ deprecated 3.1
+ glxsingle 147
+ offset 343
+
+GetColorTableParameterfv(target, pname, params)
+ return void
+ param target ColorTableTarget in value
+ param pname GetColorTableParameterPName in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ version 1.2
+ deprecated 3.1
+ glxsingle 148
+ offset 344
+
+GetColorTableParameteriv(target, pname, params)
+ return void
+ param target ColorTableTarget in value
+ param pname GetColorTableParameterPName in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ version 1.2
+ deprecated 3.1
+ glxsingle 149
+ offset 345
+
+# OpenGL 1.2 (EXT_color_subtable) commands
+
+ColorSubTable(target, start, count, format, type, data)
+ return void
+ param target ColorTableTarget in value
+ param start SizeI in value
+ param count SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param data Void in array [COMPSIZE(format/type/count)]
+ category VERSION_1_2_DEPRECATED
+ dlflags handcode
+ glxflags client-handcode server-handcode
+ version 1.2
+ deprecated 3.1
+ glxropcode 195
+ offset 346
+
+CopyColorSubTable(target, start, x, y, width)
+ return void
+ param target ColorTableTarget in value
+ param start SizeI in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ category VERSION_1_2_DEPRECATED
+ version 1.2
+ deprecated 3.1
+ glxropcode 196
+ offset 347
+
+# OpenGL 1.2 (EXT_convolution) commands
+
+ConvolutionFilter1D(target, internalformat, width, format, type, image)
+ return void
+ param target ConvolutionTarget in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param image Void in array [COMPSIZE(format/type/width)]
+ category VERSION_1_2_DEPRECATED
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4101
+ offset 348
+
+ConvolutionFilter2D(target, internalformat, width, height, format, type, image)
+ return void
+ param target ConvolutionTarget in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param image Void in array [COMPSIZE(format/type/width/height)]
+ category VERSION_1_2_DEPRECATED
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4102
+ offset 349
+
+ConvolutionParameterf(target, pname, params)
+ return void
+ param target ConvolutionTarget in value
+ param pname ConvolutionParameter in value
+ param params CheckedFloat32 in value
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4103
+ offset 350
+
+ConvolutionParameterfv(target, pname, params)
+ return void
+ param target ConvolutionTarget in value
+ param pname ConvolutionParameter in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4104
+ offset 351
+
+ConvolutionParameteri(target, pname, params)
+ return void
+ param target ConvolutionTarget in value
+ param pname ConvolutionParameter in value
+ param params CheckedInt32 in value
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4105
+ offset 352
+
+ConvolutionParameteriv(target, pname, params)
+ return void
+ param target ConvolutionTarget in value
+ param pname ConvolutionParameter in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4106
+ offset 353
+
+CopyConvolutionFilter1D(target, internalformat, x, y, width)
+ return void
+ param target ConvolutionTarget in value
+ param internalformat PixelInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4107
+ offset 354
+
+CopyConvolutionFilter2D(target, internalformat, x, y, width, height)
+ return void
+ param target ConvolutionTarget in value
+ param internalformat PixelInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4108
+ offset 355
+
+GetConvolutionFilter(target, format, type, image)
+ return void
+ param target ConvolutionTarget in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param image Void out array [COMPSIZE(target/format/type)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.2
+ deprecated 3.1
+ glxsingle 150
+ offset 356
+
+GetConvolutionParameterfv(target, pname, params)
+ return void
+ param target ConvolutionTarget in value
+ param pname GetConvolutionParameterPName in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ version 1.2
+ deprecated 3.1
+ glxsingle 151
+ offset 357
+
+GetConvolutionParameteriv(target, pname, params)
+ return void
+ param target ConvolutionTarget in value
+ param pname GetConvolutionParameterPName in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ version 1.2
+ deprecated 3.1
+ glxsingle 152
+ offset 358
+
+GetSeparableFilter(target, format, type, row, column, span)
+ return void
+ param target SeparableTarget in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param row Void out array [COMPSIZE(target/format/type)]
+ param column Void out array [COMPSIZE(target/format/type)]
+ param span Void out array [COMPSIZE(target/format/type)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.2
+ deprecated 3.1
+ glxsingle 153
+ offset 359
+
+SeparableFilter2D(target, internalformat, width, height, format, type, row, column)
+ return void
+ param target SeparableTarget in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param row Void in array [COMPSIZE(target/format/type/width)]
+ param column Void in array [COMPSIZE(target/format/type/height)]
+ category VERSION_1_2_DEPRECATED
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4109
+ offset 360
+
+# OpenGL 1.2 (EXT_histogram) commands
+
+GetHistogram(target, reset, format, type, values)
+ return void
+ param target HistogramTarget in value
+ param reset Boolean in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param values Void out array [COMPSIZE(target/format/type)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.2
+ deprecated 3.1
+ glxsingle 154
+ offset 361
+
+GetHistogramParameterfv(target, pname, params)
+ return void
+ param target HistogramTarget in value
+ param pname GetHistogramParameterPName in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ version 1.2
+ deprecated 3.1
+ glxsingle 155
+ offset 362
+
+GetHistogramParameteriv(target, pname, params)
+ return void
+ param target HistogramTarget in value
+ param pname GetHistogramParameterPName in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ version 1.2
+ deprecated 3.1
+ glxsingle 156
+ offset 363
+
+GetMinmax(target, reset, format, type, values)
+ return void
+ param target MinmaxTarget in value
+ param reset Boolean in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param values Void out array [COMPSIZE(target/format/type)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.2
+ deprecated 3.1
+ glxsingle 157
+ offset 364
+
+GetMinmaxParameterfv(target, pname, params)
+ return void
+ param target MinmaxTarget in value
+ param pname GetMinmaxParameterPName in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ version 1.2
+ deprecated 3.1
+ glxsingle 158
+ offset 365
+
+GetMinmaxParameteriv(target, pname, params)
+ return void
+ param target MinmaxTarget in value
+ param pname GetMinmaxParameterPName in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_2_DEPRECATED
+ dlflags notlistable
+ version 1.2
+ deprecated 3.1
+ glxsingle 159
+ offset 366
+
+Histogram(target, width, internalformat, sink)
+ return void
+ param target HistogramTarget in value
+ param width SizeI in value
+ param internalformat PixelInternalFormat in value
+ param sink Boolean in value
+ category VERSION_1_2_DEPRECATED
+ dlflags handcode
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4110
+ offset 367
+
+Minmax(target, internalformat, sink)
+ return void
+ param target MinmaxTarget in value
+ param internalformat PixelInternalFormat in value
+ param sink Boolean in value
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4111
+ offset 368
+
+ResetHistogram(target)
+ return void
+ param target HistogramTarget in value
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4112
+ offset 369
+
+ResetMinmax(target)
+ return void
+ param target MinmaxTarget in value
+ category VERSION_1_2_DEPRECATED
+ glxflags EXT
+ version 1.2
+ deprecated 3.1
+ glxropcode 4113
+ offset 370
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.3 commands
+#
+###############################################################################
+###############################################################################
+
+# OpenGL 1.3 (ARB_multitexture) commands
+
+ActiveTexture(texture)
+ return void
+ param texture TextureUnit in value
+ category VERSION_1_3
+ glxflags ARB
+ version 1.3
+ glxropcode 197
+ offset 374
+
+# OpenGL 1.3 (ARB_multisample) commands
+
+SampleCoverage(value, invert)
+ return void
+ param value ClampedFloat32 in value
+ param invert Boolean in value
+ category VERSION_1_3
+ glxflags ARB
+ version 1.3
+ glxropcode 229
+ offset 412
+
+# OpenGL 1.3 (ARB_texture_compression) commands
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category VERSION_1_3
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.3
+ glxropcode 216
+ wglflags client-handcode server-handcode
+ offset 554
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category VERSION_1_3
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.3
+ glxropcode 215
+ wglflags client-handcode server-handcode
+ offset 555
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+CompressedTexImage1D(target, level, internalformat, width, border, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category VERSION_1_3
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.3
+ glxropcode 214
+ wglflags client-handcode server-handcode
+ offset 556
+
+CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category VERSION_1_3
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.3
+ glxropcode 219
+ wglflags client-handcode server-handcode
+ offset 557
+
+CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category VERSION_1_3
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.3
+ glxropcode 218
+ wglflags client-handcode server-handcode
+ offset 558
+
+CompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category VERSION_1_3
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.3
+ glxropcode 217
+ wglflags client-handcode server-handcode
+ offset 559
+
+GetCompressedTexImage(target, level, img)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param img CompressedTextureARB out array [COMPSIZE(target/level)]
+ category VERSION_1_3
+ dlflags notlistable
+ glxflags ARB client-handcode server-handcode
+ version 1.3
+ glxsingle 160
+ wglflags client-handcode server-handcode
+ offset 560
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.3 deprecated commands
+#
+###############################################################################
+###############################################################################
+
+ClientActiveTexture(texture)
+ return void
+ param texture TextureUnit in value
+ category VERSION_1_3_DEPRECATED
+ dlflags notlistable
+ glxflags ARB client-handcode client-intercept server-handcode
+ version 1.3
+ deprecated 3.1
+ offset 375
+
+MultiTexCoord1d(target, s)
+ return void
+ param target TextureUnit in value
+ param s CoordD in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord1dv
+ offset 376
+
+MultiTexCoord1dv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordD in array [1]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 198
+ offset 377
+
+MultiTexCoord1f(target, s)
+ return void
+ param target TextureUnit in value
+ param s CoordF in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord1fv
+ offset 378
+
+MultiTexCoord1fv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordF in array [1]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 199
+ offset 379
+
+MultiTexCoord1i(target, s)
+ return void
+ param target TextureUnit in value
+ param s CoordI in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord1iv
+ offset 380
+
+MultiTexCoord1iv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordI in array [1]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 200
+ offset 381
+
+MultiTexCoord1s(target, s)
+ return void
+ param target TextureUnit in value
+ param s CoordS in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord1sv
+ offset 382
+
+MultiTexCoord1sv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordS in array [1]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 201
+ offset 383
+
+MultiTexCoord2d(target, s, t)
+ return void
+ param target TextureUnit in value
+ param s CoordD in value
+ param t CoordD in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord2dv
+ offset 384
+
+MultiTexCoord2dv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordD in array [2]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 202
+ offset 385
+
+MultiTexCoord2f(target, s, t)
+ return void
+ param target TextureUnit in value
+ param s CoordF in value
+ param t CoordF in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord2fv
+ offset 386
+
+MultiTexCoord2fv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordF in array [2]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 203
+ offset 387
+
+MultiTexCoord2i(target, s, t)
+ return void
+ param target TextureUnit in value
+ param s CoordI in value
+ param t CoordI in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord2iv
+ offset 388
+
+MultiTexCoord2iv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordI in array [2]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 204
+ offset 389
+
+MultiTexCoord2s(target, s, t)
+ return void
+ param target TextureUnit in value
+ param s CoordS in value
+ param t CoordS in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord2sv
+ offset 390
+
+MultiTexCoord2sv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordS in array [2]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 205
+ offset 391
+
+MultiTexCoord3d(target, s, t, r)
+ return void
+ param target TextureUnit in value
+ param s CoordD in value
+ param t CoordD in value
+ param r CoordD in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord3dv
+ offset 392
+
+MultiTexCoord3dv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordD in array [3]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 206
+ offset 393
+
+MultiTexCoord3f(target, s, t, r)
+ return void
+ param target TextureUnit in value
+ param s CoordF in value
+ param t CoordF in value
+ param r CoordF in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord3fv
+ offset 394
+
+MultiTexCoord3fv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordF in array [3]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 207
+ offset 395
+
+MultiTexCoord3i(target, s, t, r)
+ return void
+ param target TextureUnit in value
+ param s CoordI in value
+ param t CoordI in value
+ param r CoordI in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord3iv
+ offset 396
+
+MultiTexCoord3iv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordI in array [3]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 208
+ offset 397
+
+MultiTexCoord3s(target, s, t, r)
+ return void
+ param target TextureUnit in value
+ param s CoordS in value
+ param t CoordS in value
+ param r CoordS in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord3sv
+ offset 398
+
+MultiTexCoord3sv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordS in array [3]
+ category VERSION_1_3_DEPRECATED
+ version 1.3
+ deprecated 3.1
+ glxflags ARB
+ glxropcode 209
+ offset 399
+
+MultiTexCoord4d(target, s, t, r, q)
+ return void
+ param target TextureUnit in value
+ param s CoordD in value
+ param t CoordD in value
+ param r CoordD in value
+ param q CoordD in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord4dv
+ offset 400
+
+MultiTexCoord4dv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordD in array [4]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 210
+ offset 401
+
+MultiTexCoord4f(target, s, t, r, q)
+ return void
+ param target TextureUnit in value
+ param s CoordF in value
+ param t CoordF in value
+ param r CoordF in value
+ param q CoordF in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord4fv
+ offset 402
+
+MultiTexCoord4fv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordF in array [4]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 211
+ offset 403
+
+MultiTexCoord4i(target, s, t, r, q)
+ return void
+ param target TextureUnit in value
+ param s CoordI in value
+ param t CoordI in value
+ param r CoordI in value
+ param q CoordI in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord4iv
+ offset 404
+
+MultiTexCoord4iv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordI in array [4]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 212
+ offset 405
+
+MultiTexCoord4s(target, s, t, r, q)
+ return void
+ param target TextureUnit in value
+ param s CoordS in value
+ param t CoordS in value
+ param r CoordS in value
+ param q CoordS in value
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ vectorequiv MultiTexCoord4sv
+ offset 406
+
+MultiTexCoord4sv(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordS in array [4]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB
+ version 1.3
+ deprecated 3.1
+ glxropcode 213
+ offset 407
+
+# OpenGL 1.3 (ARB_transpose_matrix) commands
+
+LoadTransposeMatrixf(m)
+ return void
+ param m Float32 in array [16]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB client-handcode client-intercept server-handcode
+ version 1.3
+ deprecated 3.1
+ offset 408
+
+LoadTransposeMatrixd(m)
+ return void
+ param m Float64 in array [16]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB client-handcode client-intercept server-handcode
+ version 1.3
+ deprecated 3.1
+ offset 409
+
+MultTransposeMatrixf(m)
+ return void
+ param m Float32 in array [16]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB client-handcode client-intercept server-handcode
+ version 1.3
+ deprecated 3.1
+ offset 410
+
+MultTransposeMatrixd(m)
+ return void
+ param m Float64 in array [16]
+ category VERSION_1_3_DEPRECATED
+ glxflags ARB client-handcode client-intercept server-handcode
+ version 1.3
+ deprecated 3.1
+ offset 411
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.4 commands
+#
+###############################################################################
+###############################################################################
+
+# OpenGL 1.4 (EXT_blend_func_separate) commands
+
+BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)
+ return void
+ param sfactorRGB BlendFuncSeparateParameterEXT in value
+ param dfactorRGB BlendFuncSeparateParameterEXT in value
+ param sfactorAlpha BlendFuncSeparateParameterEXT in value
+ param dfactorAlpha BlendFuncSeparateParameterEXT in value
+ category VERSION_1_4
+ glxropcode 4134
+ version 1.4
+ extension
+ offset 537
+
+# OpenGL 1.4 (EXT_multi_draw_arrays) commands
+
+# first and count are really 'in'
+MultiDrawArrays(mode, first, count, primcount)
+ return void
+ param mode BeginMode in value
+ param first Int32 in array [COMPSIZE(count)]
+ param count SizeI in array [COMPSIZE(primcount)]
+ param primcount SizeI in value
+ category VERSION_1_4
+ version 1.4
+ glxropcode ?
+ offset 644
+
+MultiDrawElements(mode, count, type, indices, primcount)
+ return void
+ param mode BeginMode in value
+ param count SizeI in array [COMPSIZE(primcount)]
+ param type DrawElementsType in value
+ param indices VoidPointer in array [COMPSIZE(primcount)]
+ param primcount SizeI in value
+ category VERSION_1_4
+ version 1.4
+ glxropcode ?
+ offset 645
+
+# OpenGL 1.4 (ARB_point_parameters, NV_point_sprite) commands
+
+PointParameterf(pname, param)
+ return void
+ param pname PointParameterNameARB in value
+ param param CheckedFloat32 in value
+ category VERSION_1_4
+ version 1.4
+ glxropcode 2065
+ extension
+ offset 458
+
+PointParameterfv(pname, params)
+ return void
+ param pname PointParameterNameARB in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category VERSION_1_4
+ version 1.4
+ glxropcode 2066
+ extension
+ offset 459
+
+PointParameteri(pname, param)
+ return void
+ param pname PointParameterNameARB in value
+ param param Int32 in value
+ category VERSION_1_4
+ version 1.4
+ extension soft WINSOFT NV20
+ glxropcode 4221
+ offset 642
+
+PointParameteriv(pname, params)
+ return void
+ param pname PointParameterNameARB in value
+ param params Int32 in array [COMPSIZE(pname)]
+ category VERSION_1_4
+ version 1.4
+ extension soft WINSOFT NV20
+ glxropcode 4222re
+ offset 643
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.4 deprecated commands
+#
+###############################################################################
+###############################################################################
+
+# OpenGL 1.4 (EXT_fog_coord) commands
+
+FogCoordf(coord)
+ return void
+ param coord CoordF in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv FogCoordfv
+ version 1.4
+ deprecated 3.1
+ offset 545
+
+FogCoordfv(coord)
+ return void
+ param coord CoordF in array [1]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 4124
+ offset 546
+
+FogCoordd(coord)
+ return void
+ param coord CoordD in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv FogCoorddv
+ version 1.4
+ deprecated 3.1
+ offset 547
+
+FogCoorddv(coord)
+ return void
+ param coord CoordD in array [1]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 4125
+ offset 548
+
+FogCoordPointer(type, stride, pointer)
+ return void
+ param type FogPointerTypeEXT in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride)] retained
+ category VERSION_1_4_DEPRECATED
+ dlflags notlistable
+ version 1.4
+ deprecated 3.1
+ glxflags client-handcode server-handcode
+ offset 549
+
+# OpenGL 1.4 (EXT_secondary_color) commands
+
+SecondaryColor3b(red, green, blue)
+ return void
+ param red ColorB in value
+ param green ColorB in value
+ param blue ColorB in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv SecondaryColor3bv
+ version 1.4
+ deprecated 3.1
+ offset 561
+
+SecondaryColor3bv(v)
+ return void
+ param v ColorB in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 4126
+ offset 562
+
+SecondaryColor3d(red, green, blue)
+ return void
+ param red ColorD in value
+ param green ColorD in value
+ param blue ColorD in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv SecondaryColor3dv
+ version 1.4
+ deprecated 3.1
+ offset 563
+
+SecondaryColor3dv(v)
+ return void
+ param v ColorD in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 4130
+ offset 564
+
+SecondaryColor3f(red, green, blue)
+ return void
+ param red ColorF in value
+ param green ColorF in value
+ param blue ColorF in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv SecondaryColor3fv
+ version 1.4
+ deprecated 3.1
+ offset 565
+
+SecondaryColor3fv(v)
+ return void
+ param v ColorF in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 4129
+ offset 566
+
+SecondaryColor3i(red, green, blue)
+ return void
+ param red ColorI in value
+ param green ColorI in value
+ param blue ColorI in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv SecondaryColor3iv
+ version 1.4
+ deprecated 3.1
+ offset 567
+
+SecondaryColor3iv(v)
+ return void
+ param v ColorI in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 4128
+ offset 568
+
+SecondaryColor3s(red, green, blue)
+ return void
+ param red ColorS in value
+ param green ColorS in value
+ param blue ColorS in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv SecondaryColor3sv
+ version 1.4
+ deprecated 3.1
+ offset 569
+
+SecondaryColor3sv(v)
+ return void
+ param v ColorS in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 4127
+ offset 570
+
+SecondaryColor3ub(red, green, blue)
+ return void
+ param red ColorUB in value
+ param green ColorUB in value
+ param blue ColorUB in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv SecondaryColor3ubv
+ version 1.4
+ deprecated 3.1
+ offset 571
+
+SecondaryColor3ubv(v)
+ return void
+ param v ColorUB in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 4131
+ offset 572
+
+SecondaryColor3ui(red, green, blue)
+ return void
+ param red ColorUI in value
+ param green ColorUI in value
+ param blue ColorUI in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv SecondaryColor3uiv
+ version 1.4
+ deprecated 3.1
+ offset 573
+
+SecondaryColor3uiv(v)
+ return void
+ param v ColorUI in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 4133
+ offset 574
+
+SecondaryColor3us(red, green, blue)
+ return void
+ param red ColorUS in value
+ param green ColorUS in value
+ param blue ColorUS in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv SecondaryColor3usv
+ version 1.4
+ deprecated 3.1
+ offset 575
+
+SecondaryColor3usv(v)
+ return void
+ param v ColorUS in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 4132
+ offset 576
+
+SecondaryColorPointer(size, type, stride, pointer)
+ return void
+ param size Int32 in value
+ param type ColorPointerType in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride)] retained
+ category VERSION_1_4_DEPRECATED
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ version 1.4
+ deprecated 3.1
+ extension
+ offset 577
+
+# OpenGL 1.4 (ARB_window_pos) commands
+# Note: all WindowPos* entry points use glxropcode ropcode 230, with 3 float parameters
+
+WindowPos2d(x, y)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv WindowPos2dv
+ version 1.4
+ deprecated 3.1
+ offset 513
+
+WindowPos2dv(v)
+ return void
+ param v CoordD in array [2]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ offset 514
+
+WindowPos2f(x, y)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv WindowPos2fv
+ version 1.4
+ deprecated 3.1
+ offset 515
+
+WindowPos2fv(v)
+ return void
+ param v CoordF in array [2]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ offset 516
+
+WindowPos2i(x, y)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv WindowPos2iv
+ version 1.4
+ deprecated 3.1
+ offset 517
+
+WindowPos2iv(v)
+ return void
+ param v CoordI in array [2]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ offset 518
+
+WindowPos2s(x, y)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv WindowPos2sv
+ version 1.4
+ deprecated 3.1
+ offset 519
+
+WindowPos2sv(v)
+ return void
+ param v CoordS in array [2]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ offset 520
+
+WindowPos3d(x, y, z)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ param z CoordD in value
+ vectorequiv WindowPos3dv
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ offset 521
+
+WindowPos3dv(v)
+ return void
+ param v CoordD in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ offset 522
+
+WindowPos3f(x, y, z)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ param z CoordF in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv WindowPos3fv
+ version 1.4
+ deprecated 3.1
+ offset 523
+
+WindowPos3fv(v)
+ return void
+ param v CoordF in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ offset 524
+
+WindowPos3i(x, y, z)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ param z CoordI in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv WindowPos3iv
+ version 1.4
+ deprecated 3.1
+ offset 525
+
+WindowPos3iv(v)
+ return void
+ param v CoordI in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ offset 526
+
+WindowPos3s(x, y, z)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ param z CoordS in value
+ category VERSION_1_4_DEPRECATED
+ vectorequiv WindowPos3sv
+ version 1.4
+ deprecated 3.1
+ offset 527
+
+WindowPos3sv(v)
+ return void
+ param v CoordS in array [3]
+ category VERSION_1_4_DEPRECATED
+ version 1.4
+ deprecated 3.1
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ offset 528
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 1.5 commands
+#
+###############################################################################
+###############################################################################
+
+# OpenGL 1.5 (ARB_occlusion_query) commands
+
+GenQueries(n, ids)
+ return void
+ param n SizeI in value
+ param ids UInt32 out array [n]
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxsingle 162
+ glxflags ignore
+ offset 700
+
+DeleteQueries(n, ids)
+ return void
+ param n SizeI in value
+ param ids UInt32 in array [n]
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxsingle 161
+ glxflags ignore
+ offset 701
+
+IsQuery(id)
+ return Boolean
+ param id UInt32 in value
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxsingle 163
+ glxflags ignore
+ offset 702
+
+BeginQuery(target, id)
+ return void
+ param target GLenum in value
+ param id UInt32 in value
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxropcode 231
+ glxflags ignore
+ offset 703
+
+EndQuery(target)
+ return void
+ param target GLenum in value
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxropcode 232
+ glxflags ignore
+ offset 704
+
+GetQueryiv(target, pname, params)
+ return void
+ param target GLenum in value
+ param pname GLenum in value
+ param params Int32 out array [pname]
+ category VERSION_1_5
+ dlflags notlistable
+ version 1.5
+ extension
+ glxsingle 164
+ glxflags ignore
+ offset 705
+
+GetQueryObjectiv(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [pname]
+ category VERSION_1_5
+ dlflags notlistable
+ version 1.5
+ extension
+ glxsingle 165
+ glxflags ignore
+ offset 706
+
+GetQueryObjectuiv(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname GLenum in value
+ param params UInt32 out array [pname]
+ category VERSION_1_5
+ dlflags notlistable
+ version 1.5
+ extension
+ glxsingle 166
+ glxflags ignore
+ offset 707
+
+# OpenGL 1.5 (ARB_vertex_buffer_object) commands
+
+BindBuffer(target, buffer)
+ return void
+ param target BufferTargetARB in value
+ param buffer UInt32 in value
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 688
+
+DeleteBuffers(n, buffers)
+ return void
+ param n SizeI in value
+ param buffers ConstUInt32 in array [n]
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 691
+
+GenBuffers(n, buffers)
+ return void
+ param n SizeI in value
+ param buffers UInt32 out array [n]
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 692
+
+IsBuffer(buffer)
+ return Boolean
+ param buffer UInt32 in value
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 696
+
+BufferData(target, size, data, usage)
+ return void
+ param target BufferTargetARB in value
+ param size BufferSize in value
+ param data ConstVoid in array [size]
+ param usage BufferUsageARB in value
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 689
+
+BufferSubData(target, offset, size, data)
+ return void
+ param target BufferTargetARB in value
+ param offset BufferOffset in value
+ param size BufferSize in value
+ param data ConstVoid in array [size]
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 690
+
+GetBufferSubData(target, offset, size, data)
+ return void
+ param target BufferTargetARB in value
+ param offset BufferOffset in value
+ param size BufferSize in value
+ param data Void out array [size]
+ category VERSION_1_5
+ dlflags notlistable
+ version 1.5
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset 695
+
+MapBuffer(target, access)
+ return VoidPointer
+ param target BufferTargetARB in value
+ param access BufferAccessARB in value
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 697
+
+UnmapBuffer(target)
+ return Boolean
+ param target BufferTargetARB in value
+ category VERSION_1_5
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 698
+
+GetBufferParameteriv(target, pname, params)
+ return void
+ param target BufferTargetARB in value
+ param pname BufferPNameARB in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_1_5
+ dlflags notlistable
+ version 1.5
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset 693
+
+GetBufferPointerv(target, pname, params)
+ return void
+ param target BufferTargetARB in value
+ param pname BufferPointerNameARB in value
+ param params VoidPointer out array [1]
+ category VERSION_1_5
+ dlflags notlistable
+ version 1.5
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset 694
+
+# OpenGL 1.5 (EXT_shadow_funcs) commands - none
+
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 2.0 commands
+#
+###############################################################################
+###############################################################################
+
+# OpenGL 2.0 (EXT_blend_equation_separate) commands
+
+BlendEquationSeparate(modeRGB, modeAlpha)
+ return void
+ param modeRGB BlendEquationModeEXT in value
+ param modeAlpha BlendEquationModeEXT in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode 4228
+
+# OpenGL 2.0 (ARB_draw_buffers) commands
+
+DrawBuffers(n, bufs)
+ return void
+ param n SizeI in value
+ param bufs DrawBufferModeATI in array [n]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode 233
+ glxflags ignore
+ offset ?
+
+# OpenGL 2.0 (ARB_stencil_two_side) commands
+
+StencilOpSeparate(face, sfail, dpfail, dppass)
+ return void
+ param face StencilFaceDirection in value
+ param sfail StencilOp in value
+ param dpfail StencilOp in value
+ param dppass StencilOp in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+StencilFuncSeparate(face, func, ref, mask)
+ return void
+ param face StencilFaceDirection in value
+ param func StencilFunction in value
+ param ref ClampedStencilValue in value
+ param mask MaskedStencilValue in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+StencilMaskSeparate(face, mask)
+ return void
+ param face StencilFaceDirection in value
+ param mask MaskedStencilValue in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+# OpenGL 2.0 (ARB_shader_objects / ARB_vertex_shader / ARB_fragment_shader) commands
+
+AttachShader(program, shader)
+ return void
+ param program UInt32 in value
+ param shader UInt32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindAttribLocation(program, index, name)
+ return void
+ param program UInt32 in value
+ param index UInt32 in value
+ param name Char in array []
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+CompileShader(shader)
+ return void
+ param shader UInt32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+CreateProgram()
+ return UInt32
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+CreateShader(type)
+ return UInt32
+ param type GLenum in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteProgram(program)
+ return void
+ param program UInt32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteShader(shader)
+ return void
+ param shader UInt32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DetachShader(program, shader)
+ return void
+ param program UInt32 in value
+ param shader UInt32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DisableVertexAttribArray(index)
+ return void
+ param index UInt32 in value
+ dlflags notlistable
+ category VERSION_2_0
+ version 2.0
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 666
+
+EnableVertexAttribArray(index)
+ return void
+ param index UInt32 in value
+ dlflags notlistable
+ category VERSION_2_0
+ version 2.0
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 665
+
+GetActiveAttrib(program, index, bufSize, length, size, type, name)
+ return void
+ param program UInt32 in value
+ param index UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param size Int32 out array [1]
+ param type GLenum out array [1]
+ param name Char out array []
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetActiveUniform(program, index, bufSize, length, size, type, name)
+ return void
+ param program UInt32 in value
+ param index UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param size Int32 out array [1]
+ param type GLenum out array [1]
+ param name Char out array []
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetAttachedShaders(program, maxCount, count, obj)
+ return void
+ param program UInt32 in value
+ param maxCount SizeI in value
+ param count SizeI out array [1]
+ param obj UInt32 out array [count]
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetAttribLocation(program, name)
+ return Int32
+ param program UInt32 in value
+ param name Char in array []
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetProgramiv(program, pname, params)
+ return void
+ param program UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [pname]
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetProgramInfoLog(program, bufSize, length, infoLog)
+ return void
+ param program UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param infoLog Char out array [length]
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetShaderiv(shader, pname, params)
+ return void
+ param shader UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [pname]
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetShaderInfoLog(shader, bufSize, length, infoLog)
+ return void
+ param shader UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param infoLog Char out array [length]
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetShaderSource(shader, bufSize, length, source)
+ return void
+ param shader UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param source Char out array [length]
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetUniformLocation(program, name)
+ return Int32
+ param program UInt32 in value
+ param name Char in array []
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetUniformfv(program, location, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param params Float32 out array [COMPSIZE(location)]
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetUniformiv(program, location, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param params Int32 out array [COMPSIZE(location)]
+ category VERSION_2_0
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVertexAttribdv(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribPropertyARB in value
+ param params Float64 out array [4]
+ dlflags notlistable
+ category VERSION_2_0
+ version 2.0
+ extension soft WINSOFT NV10
+ glxvendorpriv 1301
+ offset 588
+
+GetVertexAttribfv(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribPropertyARB in value
+ param params Float32 out array [4]
+ dlflags notlistable
+ category VERSION_2_0
+ version 2.0
+ extension soft WINSOFT NV10
+ glxvendorpriv 1302
+ offset 589
+
+GetVertexAttribiv(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribPropertyARB in value
+ param params Int32 out array [4]
+ dlflags notlistable
+ category VERSION_2_0
+ version 2.0
+ extension soft WINSOFT NV10
+ glxvendorpriv 1303
+ offset 590
+
+GetVertexAttribPointerv(index, pname, pointer)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribPointerPropertyARB in value
+ param pointer VoidPointer out array [1]
+ dlflags notlistable
+ category VERSION_2_0
+ version 2.0
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 591
+
+IsProgram(program)
+ return Boolean
+ param program UInt32 in value
+ dlflags notlistable
+ category VERSION_2_0
+ version 2.0
+ extension soft WINSOFT NV10
+ glxvendorpriv 1304
+ offset 592
+
+IsShader(shader)
+ return Boolean
+ param shader UInt32 in value
+ dlflags notlistable
+ category VERSION_2_0
+ version 2.0
+ extension soft WINSOFT NV10
+ glxvendorpriv ?
+ offset ?
+
+LinkProgram(program)
+ return void
+ param program UInt32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ShaderSource(shader, count, string, length)
+ return void
+ param shader UInt32 in value
+ param count SizeI in value
+ param string CharPointer in array [count]
+ param length Int32 in array [1]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UseProgram(program)
+ return void
+ param program UInt32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform1f(location, v0)
+ return void
+ param location Int32 in value
+ param v0 Float32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform2f(location, v0, v1)
+ return void
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform3f(location, v0, v1, v2)
+ return void
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ param v2 Float32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform4f(location, v0, v1, v2, v3)
+ return void
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ param v2 Float32 in value
+ param v3 Float32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform1i(location, v0)
+ return void
+ param location Int32 in value
+ param v0 Int32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform2i(location, v0, v1)
+ return void
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform3i(location, v0, v1, v2)
+ return void
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ param v2 Int32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform4i(location, v0, v1, v2, v3)
+ return void
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ param v2 Int32 in value
+ param v3 Int32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform1fv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform2fv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform3fv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform4fv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform1iv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform2iv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform3iv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform4iv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix2fv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix3fv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix4fv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ValidateProgram(program)
+ return void
+ param program UInt32 in value
+ category VERSION_2_0
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttrib1d(index, x)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib1dv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 603
+
+VertexAttrib1dv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [1]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4197
+ offset 604
+
+VertexAttrib1f(index, x)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib1fv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 605
+
+VertexAttrib1fv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [1]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4193
+ offset 606
+
+VertexAttrib1s(index, x)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib1sv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 607
+
+VertexAttrib1sv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [1]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4189
+ offset 608
+
+VertexAttrib2d(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib2dv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 609
+
+VertexAttrib2dv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [2]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4198
+ offset 610
+
+VertexAttrib2f(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib2fv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 611
+
+VertexAttrib2fv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [2]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4194
+ offset 612
+
+VertexAttrib2s(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ param y Int16 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib2sv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 613
+
+VertexAttrib2sv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [2]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4190
+ offset 614
+
+VertexAttrib3d(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib3dv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 615
+
+VertexAttrib3dv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [3]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4199
+ offset 616
+
+VertexAttrib3f(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib3fv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 617
+
+VertexAttrib3fv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [3]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4195
+ offset 618
+
+VertexAttrib3s(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ param y Int16 in value
+ param z Int16 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib3sv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 619
+
+VertexAttrib3sv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [3]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4191
+ offset 620
+
+VertexAttrib4Nbv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int8 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 659
+
+VertexAttrib4Niv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 661
+
+VertexAttrib4Nsv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 660
+
+VertexAttrib4Nub(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x UInt8 in value
+ param y UInt8 in value
+ param z UInt8 in value
+ param w UInt8 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 627
+
+VertexAttrib4Nubv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt8 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ glxropcode 4201
+ offset 628
+
+VertexAttrib4Nuiv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 663
+
+VertexAttrib4Nusv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt16 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 662
+
+VertexAttrib4bv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int8 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 654
+
+VertexAttrib4d(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib4dv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 621
+
+VertexAttrib4dv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4200
+ offset 622
+
+VertexAttrib4f(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib4fv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 623
+
+VertexAttrib4fv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxropcode 4196
+ offset 624
+
+VertexAttrib4iv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 655
+
+VertexAttrib4s(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ param y Int16 in value
+ param z Int16 in value
+ param w Int16 in value
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ vectorequiv VertexAttrib4sv
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 625
+
+VertexAttrib4sv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ glxropcode 4192
+ offset 626
+
+VertexAttrib4ubv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt8 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 656
+
+VertexAttrib4uiv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 658
+
+VertexAttrib4usv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt16 in array [4]
+ category VERSION_2_0
+ version 2.0
+ deprecated 3.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 657
+
+VertexAttribPointer(index, size, type, normalized, stride, pointer)
+ return void
+ param index UInt32 in value
+ param size Int32 in value
+ param type VertexAttribPointerTypeARB in value
+ param normalized Boolean in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride)] retained
+ dlflags notlistable
+ category VERSION_2_0
+ version 2.0
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 664
+
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 2.1 commands
+#
+###############################################################################
+###############################################################################
+
+# OpenGL 2.1 (ARB_pixel_buffer_object) commands - none
+
+# OpenGL 2.1 (EXT_texture_sRGB) commands - none
+
+# New commands in OpenGL 2.1
+
+UniformMatrix2x3fv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [6]
+ category VERSION_2_1
+ version 2.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix3x2fv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [6]
+ category VERSION_2_1
+ version 2.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix2x4fv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [8]
+ category VERSION_2_1
+ version 2.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix4x2fv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [8]
+ category VERSION_2_1
+ version 2.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix3x4fv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [12]
+ category VERSION_2_1
+ version 2.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix4x3fv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [12]
+ category VERSION_2_1
+ version 2.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 3.0 commands
+#
+###############################################################################
+###############################################################################
+
+# OpenGL 3.0 (EXT_draw_buffers2) commands
+
+ColorMaski(index, r, g, b, a)
+ return void
+ param index UInt32 in value
+ param r Boolean in value
+ param g Boolean in value
+ param b Boolean in value
+ param a Boolean in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ glxflags ignore
+ glfflags ignore
+
+GetBooleani_v(target, index, data)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param data Boolean out array [COMPSIZE(target)]
+ category VERSION_3_0
+ version 3.0
+ extension
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+GetIntegeri_v(target, index, data)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param data Int32 out array [COMPSIZE(target)]
+ category VERSION_3_0
+ version 3.0
+ extension
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+Enablei(target, index)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ glxflags ignore
+ glfflags ignore
+
+Disablei(target, index)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ glxflags ignore
+ glfflags ignore
+
+IsEnabledi(target, index)
+ return Boolean
+ param target GLenum in value
+ param index UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+# OpenGL 3.0 (EXT_transform_feedback) commands
+
+BeginTransformFeedback(primitiveMode)
+ return void
+ param primitiveMode GLenum in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+EndTransformFeedback()
+ return void
+ category VERSION_3_0
+ version 3.0
+ extension
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+BindBufferRange(target, index, buffer, offset, size)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param buffer UInt32 in value
+ param offset BufferOffset in value
+ param size BufferSize in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+BindBufferBase(target, index, buffer)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param buffer UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+TransformFeedbackVaryings(program, count, varyings, bufferMode)
+ return void
+ param program UInt32 in value
+ param count SizeI in value
+ param varyings CharPointer in array [count]
+ param bufferMode GLenum in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name)
+ return void
+ param program UInt32 in value
+ param index UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param size SizeI out array [1]
+ param type GLenum out array [1]
+ param name Char out array [COMPSIZE(length)]
+ category VERSION_3_0
+ dlflags notlistable
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+ClampColor(target, clamp)
+ return void
+ param target ClampColorTargetARB in value
+ param clamp ClampColorModeARB in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ glxropcode 234
+ glxflags ignore
+ offset ?
+
+BeginConditionalRender(id, mode)
+ return void
+ param id UInt32 in value
+ param mode TypeEnum in value
+ category VERSION_3_0
+ version 3.0
+ glfflags ignore
+ glxflags ignore
+
+EndConditionalRender()
+ return void
+ category VERSION_3_0
+ version 3.0
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribIPointer(index, size, type, stride, pointer)
+ return void
+ param index UInt32 in value
+ param size Int32 in value
+ param type VertexAttribEnum in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride)] retained
+ category VERSION_3_0
+ version 3.0
+ dlflags notlistable
+ extension
+ glfflags ignore
+ glxflags ignore
+
+GetVertexAttribIiv(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribEnum in value
+ param params Int32 out array [1]
+ category VERSION_3_0
+ version 3.0
+ dlflags notlistable
+ extension
+ glfflags ignore
+ glxflags ignore
+
+GetVertexAttribIuiv(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribEnum in value
+ param params UInt32 out array [1]
+ category VERSION_3_0
+ version 3.0
+ dlflags notlistable
+ extension
+ glfflags ignore
+ glxflags ignore
+
+# OpenGL 3.0 (NV_vertex_program4) commands
+
+VertexAttribI1i(index, x)
+ return void
+ param index UInt32 in value
+ param x Int32 in value
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ vectorequiv VertexAttribI1iv
+ glxvectorequiv VertexAttribI1iv
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI2i(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Int32 in value
+ param y Int32 in value
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ vectorequiv VertexAttribI2iv
+ glxvectorequiv VertexAttribI2iv
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI3i(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Int32 in value
+ param y Int32 in value
+ param z Int32 in value
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ vectorequiv VertexAttribI3iv
+ glxvectorequiv VertexAttribI3iv
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI4i(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Int32 in value
+ param y Int32 in value
+ param z Int32 in value
+ param w Int32 in value
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ vectorequiv VertexAttribI4iv
+ glxvectorequiv VertexAttribI4iv
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI1ui(index, x)
+ return void
+ param index UInt32 in value
+ param x UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ vectorequiv VertexAttribI1uiv
+ glxvectorequiv VertexAttribI1uiv
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI2ui(index, x, y)
+ return void
+ param index UInt32 in value
+ param x UInt32 in value
+ param y UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ vectorequiv VertexAttribI2uiv
+ glxvectorequiv VertexAttribI2uiv
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI3ui(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x UInt32 in value
+ param y UInt32 in value
+ param z UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ vectorequiv VertexAttribI3uiv
+ glxvectorequiv VertexAttribI3uiv
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI4ui(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x UInt32 in value
+ param y UInt32 in value
+ param z UInt32 in value
+ param w UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ vectorequiv VertexAttribI4uiv
+ glxvectorequiv VertexAttribI4uiv
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI1iv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [1]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI2iv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [2]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI3iv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [3]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI4iv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [4]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI1uiv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [1]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI2uiv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [2]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI3uiv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [3]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI4uiv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [4]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI4bv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int8 in array [4]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI4sv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [4]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI4ubv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt8 in array [4]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+VertexAttribI4usv(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt16 in array [4]
+ category VERSION_3_0
+ version 3.0
+ deprecated 3.1
+ beginend allow-inside
+ extension
+ glfflags ignore
+ glxflags ignore
+
+# OpenGL 3.0 (EXT_gpu_shader4) commands
+
+GetUniformuiv(program, location, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param params UInt32 out array [COMPSIZE(program/location)]
+ category VERSION_3_0
+ dlflags notlistable
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+BindFragDataLocation(program, color, name)
+ return void
+ param program UInt32 in value
+ param color UInt32 in value
+ param name Char in array [COMPSIZE(name)]
+ category VERSION_3_0
+ dlflags notlistable
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+GetFragDataLocation(program, name)
+ return Int32
+ param program UInt32 in value
+ param name Char in array [COMPSIZE(name)]
+ category VERSION_3_0
+ dlflags notlistable
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+Uniform1ui(location, v0)
+ return void
+ param location Int32 in value
+ param v0 UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+Uniform2ui(location, v0, v1)
+ return void
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+Uniform3ui(location, v0, v1, v2)
+ return void
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ param v2 UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+Uniform4ui(location, v0, v1, v2, v3)
+ return void
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ param v2 UInt32 in value
+ param v3 UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+Uniform1uiv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count]
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+Uniform2uiv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count*2]
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+Uniform3uiv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count*3]
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+Uniform4uiv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count*4]
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+# OpenGL 3.0 (EXT_texture_integer) commands
+
+TexParameterIiv(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params Int32 in array [COMPSIZE(pname)]
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+TexParameterIuiv(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params UInt32 in array [COMPSIZE(pname)]
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+GetTexParameterIiv(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category VERSION_3_0
+ dlflags notlistable
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+GetTexParameterIuiv(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params UInt32 out array [COMPSIZE(pname)]
+ category VERSION_3_0
+ dlflags notlistable
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+# New commands in OpenGL 3.0
+
+ClearBufferiv(buffer, drawbuffer, value)
+ return void
+ param buffer GLenum in value
+ param drawbuffer DrawBufferName in value
+ param value Int32 in array [COMPSIZE(buffer)]
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+ClearBufferuiv(buffer, drawbuffer, value)
+ return void
+ param buffer GLenum in value
+ param drawbuffer DrawBufferName in value
+ param value UInt32 in array [COMPSIZE(buffer)]
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+ClearBufferfv(buffer, drawbuffer, value)
+ return void
+ param buffer GLenum in value
+ param drawbuffer DrawBufferName in value
+ param value Float32 in array [COMPSIZE(buffer)]
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+ClearBufferfi(buffer, drawbuffer, depth, stencil)
+ return void
+ param buffer GLenum in value
+ param drawbuffer DrawBufferName in value
+ param depth Float32 in value
+ param stencil Int32 in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+GetStringi(name, index)
+ return String
+ param name GLenum in value
+ param index UInt32 in value
+ category VERSION_3_0
+ version 3.0
+ extension
+ dlflags notlistable
+ glxflags client-handcode server-handcode
+ glfflags ignore
+ glxsingle ?
+
+passthru: /* OpenGL 3.0 also reuses entry points from these extensions: */
+passthru: /* ARB_framebuffer_object */
+passthru: /* ARB_map_buffer_range */
+passthru: /* ARB_vertex_array_object */
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 3.0 deprecated commands
+#
+###############################################################################
+###############################################################################
+
+# (none - VertexAttribI* were moved back into non-deprecated)
+
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 3.1 commands
+#
+###############################################################################
+###############################################################################
+
+# New commands in OpenGL 3.1 - none
+
+# OpenGL 3.1 (ARB_draw_instanced) commands
+
+DrawArraysInstanced(mode, first, count, primcount)
+ return void
+ param mode BeginMode in value
+ param first Int32 in value
+ param count SizeI in value
+ param primcount SizeI in value
+ category VERSION_3_1
+ version 3.1
+ extension
+ dlflags notlistable
+ vectorequiv ArrayElement
+ glfflags ignore
+ glxflags ignore
+
+DrawElementsInstanced(mode, count, type, indices, primcount)
+ return void
+ param mode BeginMode in value
+ param count SizeI in value
+ param type DrawElementsType in value
+ param indices Void in array [COMPSIZE(count/type)]
+ param primcount SizeI in value
+ category VERSION_3_1
+ version 3.1
+ extension
+ dlflags notlistable
+ vectorequiv ArrayElement
+ glfflags ignore
+ glxflags ignore
+
+# OpenGL 3.1 (ARB_texture_buffer_object) commands
+
+TexBuffer(target, internalformat, buffer)
+ return void
+ param target TextureTarget in value
+ param internalformat GLenum in value
+ param buffer UInt32 in value
+ category VERSION_3_1
+ version 3.1
+ extension
+ glfflags ignore
+ glxflags ignore
+
+# OpenGL 3.1 (ARB_texture_rectangle) commands - none
+
+# OpenGL 3.1 (SNORM texture) commands - none
+
+# OpenGL 3.1 (NV_primitive_restart) commands
+# This is *not* an alias of PrimitiveRestartIndexNV, since it sets
+# server instead of client state.
+
+PrimitiveRestartIndex(index)
+ return void
+ param index UInt32 in value
+ category VERSION_3_1
+ version 3.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+passthru: /* OpenGL 3.1 also reuses entry points from these extensions: */
+passthru: /* ARB_copy_buffer */
+passthru: /* ARB_uniform_buffer_object */
+
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 3.2 commands
+#
+###############################################################################
+###############################################################################
+
+# New commands in OpenGL 3.2
+
+GetInteger64i_v(target, index, data)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param data Int64 out array [COMPSIZE(target)]
+ category VERSION_3_2
+ version 3.2
+ extension
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+
+GetBufferParameteri64v(target, pname, params)
+ return void
+ param target BufferTargetARB in value
+ param pname BufferPNameARB in value
+ param params Int64 out array [COMPSIZE(pname)]
+ category VERSION_3_2
+ dlflags notlistable
+ version 3.2
+ extension
+ glxsingle ?
+ glxflags ignore
+
+# OpenGL 3.2 (ARB_depth_clamp) commands - none
+# OpenGL 3.2 (ARB_fragment_coord_conventions) commands - none
+
+# OpenGL 3.2 (ARB_geometry_shader4) commands
+# ProgramParameteriARB was NOT promoted to core 3.2, but
+# IS part of core 4.1 through other ARB extensions.
+
+FramebufferTexture(target, attachment, texture, level)
+ return void
+ param target GLenum in value
+ param attachment GLenum in value
+ param texture UInt32 in value
+ param level Int32 in value
+ category VERSION_3_2
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+# FramebufferTextureLayer already declared in ARB_framebuffer_object
+# FramebufferTextureLayer(target, attachment, texture, level, layer)
+
+# Not promoted to the core along with the rest
+# FramebufferTextureFace(target, attachment, texture, level, face)
+
+# OpenGL 3.2 (ARB_seamless_cube_map) commands - none
+# OpenGL 3.2 (ARB_vertex_array_bgra) commands - none
+
+passthru: /* OpenGL 3.2 also reuses entry points from these extensions: */
+passthru: /* ARB_draw_elements_base_vertex */
+passthru: /* ARB_provoking_vertex */
+passthru: /* ARB_sync */
+passthru: /* ARB_texture_multisample */
+
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 3.3 commands
+#
+###############################################################################
+###############################################################################
+
+# New commands in OpenGL 3.3
+
+# OpenGL 3.3 (ARB_instanced_arrays) commands
+
+VertexAttribDivisor(index, divisor)
+ return void
+ param index UInt32 in value
+ param divisor UInt32 in value
+ category VERSION_3_3
+ version 1.1
+ extension
+ glfflags ignore
+ glxflags ignore
+
+passthru: /* OpenGL 3.3 also reuses entry points from these extensions: */
+passthru: /* ARB_blend_func_extended */
+passthru: /* ARB_sampler_objects */
+passthru: /* ARB_explicit_attrib_location, but it has none */
+passthru: /* ARB_occlusion_query2 (no entry points) */
+passthru: /* ARB_shader_bit_encoding (no entry points) */
+passthru: /* ARB_texture_rgb10_a2ui (no entry points) */
+passthru: /* ARB_texture_swizzle (no entry points) */
+passthru: /* ARB_timer_query */
+passthru: /* ARB_vertex_type_2_10_10_10_rev */
+
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 4.0 commands
+#
+###############################################################################
+###############################################################################
+
+# New commands in OpenGL 4.0 - none
+
+# OpenGL 4.0 (ARB_sample_shading) commands
+
+MinSampleShading(value)
+ return void
+ param value ClampedColorF in value
+ category VERSION_4_0
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+# OpenGL 4.0 (ARB_draw_buffers_blend) commands
+
+BlendEquationi(buf, mode)
+ return void
+ param buf UInt32 in value
+ param mode GLenum in value
+ category VERSION_4_0
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BlendEquationSeparatei(buf, modeRGB, modeAlpha)
+ return void
+ param buf UInt32 in value
+ param modeRGB GLenum in value
+ param modeAlpha GLenum in value
+ category VERSION_4_0
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BlendFunci(buf, src, dst)
+ return void
+ param buf UInt32 in value
+ param src GLenum in value
+ param dst GLenum in value
+ category VERSION_4_0
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha)
+ return void
+ param buf UInt32 in value
+ param srcRGB GLenum in value
+ param dstRGB GLenum in value
+ param srcAlpha GLenum in value
+ param dstAlpha GLenum in value
+ category VERSION_4_0
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+passthru: /* OpenGL 4.0 also reuses entry points from these extensions: */
+passthru: /* ARB_texture_query_lod (no entry points) */
+passthru: /* ARB_draw_indirect */
+passthru: /* ARB_gpu_shader5 (no entry points) */
+passthru: /* ARB_gpu_shader_fp64 */
+passthru: /* ARB_shader_subroutine */
+passthru: /* ARB_tessellation_shader */
+passthru: /* ARB_texture_buffer_object_rgb32 (no entry points) */
+passthru: /* ARB_texture_cube_map_array (no entry points) */
+passthru: /* ARB_texture_gather (no entry points) */
+passthru: /* ARB_transform_feedback2 */
+passthru: /* ARB_transform_feedback3 */
+
+
+###############################################################################
+###############################################################################
+#
+# OpenGL 4.1 commands
+#
+###############################################################################
+###############################################################################
+
+# New commands in OpenGL 4.1 - none
+newcategory: VERSION_4_1
+
+passthru: /* OpenGL 4.1 also reuses entry points from these extensions: */
+passthru: /* ARB_ES2_compatibility */
+passthru: /* ARB_get_program_binary */
+passthru: /* ARB_separate_shader_objects */
+passthru: /* ARB_shader_precision (no entry points) */
+passthru: /* ARB_vertex_attrib_64bit */
+passthru: /* ARB_viewport_array */
+
+
+###############################################################################
+###############################################################################
+#
+# ARB extensions, in order by ARB extension number
+#
+###############################################################################
+###############################################################################
+
+###############################################################################
+#
+# ARB Extension #1
+# ARB_multitexture commands
+#
+###############################################################################
+
+ActiveTextureARB(texture)
+ return void
+ param texture TextureUnit in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 197
+ alias ActiveTexture
+
+ClientActiveTextureARB(texture)
+ return void
+ param texture TextureUnit in value
+ category ARB_multitexture
+ dlflags notlistable
+ glxflags ARB client-handcode client-intercept server-handcode
+ version 1.2
+ alias ClientActiveTexture
+
+MultiTexCoord1dARB(target, s)
+ return void
+ param target TextureUnit in value
+ param s CoordD in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord1dv
+
+MultiTexCoord1dvARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordD in array [1]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 198
+ alias MultiTexCoord1dv
+
+MultiTexCoord1fARB(target, s)
+ return void
+ param target TextureUnit in value
+ param s CoordF in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord1fv
+
+MultiTexCoord1fvARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordF in array [1]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 199
+ alias MultiTexCoord1fv
+
+MultiTexCoord1iARB(target, s)
+ return void
+ param target TextureUnit in value
+ param s CoordI in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord1iv
+
+MultiTexCoord1ivARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordI in array [1]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 200
+ alias MultiTexCoord1iv
+
+MultiTexCoord1sARB(target, s)
+ return void
+ param target TextureUnit in value
+ param s CoordS in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord1sv
+
+MultiTexCoord1svARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordS in array [1]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 201
+ alias MultiTexCoord1sv
+
+MultiTexCoord2dARB(target, s, t)
+ return void
+ param target TextureUnit in value
+ param s CoordD in value
+ param t CoordD in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord2dv
+
+MultiTexCoord2dvARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordD in array [2]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 202
+ alias MultiTexCoord2dv
+
+MultiTexCoord2fARB(target, s, t)
+ return void
+ param target TextureUnit in value
+ param s CoordF in value
+ param t CoordF in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord2fv
+
+MultiTexCoord2fvARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordF in array [2]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 203
+ alias MultiTexCoord2fv
+
+MultiTexCoord2iARB(target, s, t)
+ return void
+ param target TextureUnit in value
+ param s CoordI in value
+ param t CoordI in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord2iv
+
+MultiTexCoord2ivARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordI in array [2]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 204
+ alias MultiTexCoord2iv
+
+MultiTexCoord2sARB(target, s, t)
+ return void
+ param target TextureUnit in value
+ param s CoordS in value
+ param t CoordS in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord2sv
+
+MultiTexCoord2svARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordS in array [2]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 205
+ alias MultiTexCoord2sv
+
+MultiTexCoord3dARB(target, s, t, r)
+ return void
+ param target TextureUnit in value
+ param s CoordD in value
+ param t CoordD in value
+ param r CoordD in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord3dv
+
+MultiTexCoord3dvARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordD in array [3]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 206
+ alias MultiTexCoord3dv
+
+MultiTexCoord3fARB(target, s, t, r)
+ return void
+ param target TextureUnit in value
+ param s CoordF in value
+ param t CoordF in value
+ param r CoordF in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord3fv
+
+MultiTexCoord3fvARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordF in array [3]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 207
+ alias MultiTexCoord3fv
+
+MultiTexCoord3iARB(target, s, t, r)
+ return void
+ param target TextureUnit in value
+ param s CoordI in value
+ param t CoordI in value
+ param r CoordI in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord3iv
+
+MultiTexCoord3ivARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordI in array [3]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 208
+ alias MultiTexCoord3iv
+
+MultiTexCoord3sARB(target, s, t, r)
+ return void
+ param target TextureUnit in value
+ param s CoordS in value
+ param t CoordS in value
+ param r CoordS in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord3sv
+
+MultiTexCoord3svARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordS in array [3]
+ category ARB_multitexture
+ version 1.2
+ glxflags ARB
+ glxropcode 209
+ alias MultiTexCoord3sv
+
+MultiTexCoord4dARB(target, s, t, r, q)
+ return void
+ param target TextureUnit in value
+ param s CoordD in value
+ param t CoordD in value
+ param r CoordD in value
+ param q CoordD in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord4dv
+
+MultiTexCoord4dvARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordD in array [4]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 210
+ alias MultiTexCoord4dv
+
+MultiTexCoord4fARB(target, s, t, r, q)
+ return void
+ param target TextureUnit in value
+ param s CoordF in value
+ param t CoordF in value
+ param r CoordF in value
+ param q CoordF in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord4fv
+
+MultiTexCoord4fvARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordF in array [4]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 211
+ alias MultiTexCoord4fv
+
+MultiTexCoord4iARB(target, s, t, r, q)
+ return void
+ param target TextureUnit in value
+ param s CoordI in value
+ param t CoordI in value
+ param r CoordI in value
+ param q CoordI in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord4iv
+
+MultiTexCoord4ivARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordI in array [4]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 212
+ alias MultiTexCoord4iv
+
+MultiTexCoord4sARB(target, s, t, r, q)
+ return void
+ param target TextureUnit in value
+ param s CoordS in value
+ param t CoordS in value
+ param r CoordS in value
+ param q CoordS in value
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ vectorequiv MultiTexCoord4sv
+
+MultiTexCoord4svARB(target, v)
+ return void
+ param target TextureUnit in value
+ param v CoordS in array [4]
+ category ARB_multitexture
+ glxflags ARB
+ version 1.2
+ glxropcode 213
+ alias MultiTexCoord4sv
+
+################################################################################
+#
+# ARB Extension #2 - GLX_ARB_get_proc_address
+#
+###############################################################################
+
+################################################################################
+#
+# ARB Extension #3
+# ARB_transpose_matrix commands
+#
+###############################################################################
+
+LoadTransposeMatrixfARB(m)
+ return void
+ param m Float32 in array [16]
+ category ARB_transpose_matrix
+ glxflags ARB client-handcode client-intercept server-handcode
+ version 1.2
+ alias LoadTransposeMatrixf
+
+LoadTransposeMatrixdARB(m)
+ return void
+ param m Float64 in array [16]
+ category ARB_transpose_matrix
+ glxflags ARB client-handcode client-intercept server-handcode
+ version 1.2
+ alias LoadTransposeMatrixd
+
+MultTransposeMatrixfARB(m)
+ return void
+ param m Float32 in array [16]
+ category ARB_transpose_matrix
+ glxflags ARB client-handcode client-intercept server-handcode
+ version 1.2
+ alias MultTransposeMatrixf
+
+MultTransposeMatrixdARB(m)
+ return void
+ param m Float64 in array [16]
+ category ARB_transpose_matrix
+ glxflags ARB client-handcode client-intercept server-handcode
+ version 1.2
+ alias MultTransposeMatrixd
+
+################################################################################
+#
+# ARB Extension #4 - WGL_ARB_buffer_region
+#
+###############################################################################
+
+################################################################################
+#
+# ARB Extension #5
+# ARB_multisample commands
+#
+###############################################################################
+
+SampleCoverageARB(value, invert)
+ return void
+ param value ClampedFloat32 in value
+ param invert Boolean in value
+ category ARB_multisample
+ glxflags ARB
+ version 1.2
+ alias SampleCoverage
+
+################################################################################
+#
+# ARB Extension #6
+# ARB_texture_env_add commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_env_add
+
+################################################################################
+#
+# ARB Extension #7
+# ARB_texture_cube_map commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_cube_map
+
+################################################################################
+#
+# ARB Extension #8 - WGL_ARB_extensions_string
+# ARB Extension #9 - WGL_ARB_pixel_format commands
+# ARB Extension #10 - WGL_ARB_make_current_read commands
+# ARB Extension #11 - WGL_ARB_pbuffer
+#
+###############################################################################
+
+################################################################################
+#
+# ARB Extension #12
+# ARB_texture_compression commands
+#
+###############################################################################
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+CompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category ARB_texture_compression
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.2
+ glxropcode 216
+ alias CompressedTexImage3D
+ wglflags client-handcode server-handcode
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+CompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category ARB_texture_compression
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.2
+ glxropcode 215
+ alias CompressedTexImage2D
+ wglflags client-handcode server-handcode
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+CompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category ARB_texture_compression
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.2
+ glxropcode 214
+ alias CompressedTexImage1D
+ wglflags client-handcode server-handcode
+
+CompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category ARB_texture_compression
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.2
+ glxropcode 219
+ alias CompressedTexSubImage3D
+ wglflags client-handcode server-handcode
+
+CompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category ARB_texture_compression
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.2
+ glxropcode 218
+ alias CompressedTexSubImage2D
+ wglflags client-handcode server-handcode
+
+CompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, data)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param data CompressedTextureARB in array [imageSize]
+ category ARB_texture_compression
+ dlflags handcode
+ glxflags ARB client-handcode server-handcode
+ version 1.2
+ glxropcode 217
+ alias CompressedTexSubImage1D
+ wglflags client-handcode server-handcode
+
+GetCompressedTexImageARB(target, level, img)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param img CompressedTextureARB out array [COMPSIZE(target/level)]
+ category ARB_texture_compression
+ dlflags notlistable
+ glxflags ARB client-handcode server-handcode
+ version 1.2
+ glxsingle 160
+ alias GetCompressedTexImage
+ wglflags client-handcode server-handcode
+
+################################################################################
+#
+# ARB Extension #13
+# ARB_texture_border_clamp commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_border_clamp
+
+###############################################################################
+#
+# ARB Extension #14
+# ARB_point_parameters commands
+#
+###############################################################################
+
+PointParameterfARB(pname, param)
+ return void
+ param pname PointParameterNameARB in value
+ param param CheckedFloat32 in value
+ category ARB_point_parameters
+ version 1.0
+ glxflags ARB
+ glxropcode 2065
+ extension
+ alias PointParameterf
+
+PointParameterfvARB(pname, params)
+ return void
+ param pname PointParameterNameARB in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category ARB_point_parameters
+ version 1.0
+ glxflags ARB
+ glxropcode 2066
+ extension
+ alias PointParameterfv
+
+################################################################################
+#
+# ARB Extension #15
+# ARB_vertex_blend commands
+#
+###############################################################################
+
+WeightbvARB(size, weights)
+ return void
+ param size Int32 in value
+ param weights Int8 in array [size]
+ category ARB_vertex_blend
+ version 1.1
+ extension
+ glxropcode 220
+ glxflags ignore
+ offset ?
+
+WeightsvARB(size, weights)
+ return void
+ param size Int32 in value
+ param weights Int16 in array [size]
+ category ARB_vertex_blend
+ version 1.1
+ extension
+ glxropcode 222
+ glxflags ignore
+ offset ?
+
+WeightivARB(size, weights)
+ return void
+ param size Int32 in value
+ param weights Int32 in array [size]
+ category ARB_vertex_blend
+ version 1.1
+ extension
+ glxropcode 224
+ glxflags ignore
+ offset ?
+
+WeightfvARB(size, weights)
+ return void
+ param size Int32 in value
+ param weights Float32 in array [size]
+ category ARB_vertex_blend
+ version 1.1
+ extension
+ glxropcode 227
+ glxflags ignore
+ offset ?
+
+WeightdvARB(size, weights)
+ return void
+ param size Int32 in value
+ param weights Float64 in array [size]
+ category ARB_vertex_blend
+ version 1.1
+ extension
+ glxropcode 228
+ glxflags ignore
+ offset ?
+
+WeightubvARB(size, weights)
+ return void
+ param size Int32 in value
+ param weights UInt8 in array [size]
+ category ARB_vertex_blend
+ version 1.1
+ extension
+ glxropcode 221
+ glxflags ignore
+ offset ?
+
+WeightusvARB(size, weights)
+ return void
+ param size Int32 in value
+ param weights UInt16 in array [size]
+ category ARB_vertex_blend
+ version 1.1
+ extension
+ glxropcode 223
+ glxflags ignore
+ offset ?
+
+WeightuivARB(size, weights)
+ return void
+ param size Int32 in value
+ param weights UInt32 in array [size]
+ category ARB_vertex_blend
+ version 1.1
+ extension
+ glxropcode 225
+ glxflags ignore
+ offset ?
+
+WeightPointerARB(size, type, stride, pointer)
+ return void
+ param size Int32 in value
+ param type WeightPointerTypeARB in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride)] retained
+ category ARB_vertex_blend
+ version 1.1
+ extension
+ dlflags notlistable
+ glxflags ignore
+ offset ?
+
+VertexBlendARB(count)
+ return void
+ param count Int32 in value
+ category ARB_vertex_blend
+ version 1.1
+ extension
+ glxropcode 226
+ glxflags ignore
+ offset ?
+
+################################################################################
+#
+# ARB Extension #16
+# ARB_matrix_palette commands
+#
+###############################################################################
+
+CurrentPaletteMatrixARB(index)
+ return void
+ param index Int32 in value
+ category ARB_matrix_palette
+ version 1.1
+ extension
+ glxropcode 4329
+ glxflags ignore
+ offset ?
+
+MatrixIndexubvARB(size, indices)
+ return void
+ param size Int32 in value
+ param indices UInt8 in array [size]
+ category ARB_matrix_palette
+ version 1.1
+ extension
+ glxropcode 4326
+ glxflags ignore
+ offset ?
+
+MatrixIndexusvARB(size, indices)
+ return void
+ param size Int32 in value
+ param indices UInt16 in array [size]
+ category ARB_matrix_palette
+ version 1.1
+ extension
+ glxropcode 4327
+ glxflags ignore
+ offset ?
+
+MatrixIndexuivARB(size, indices)
+ return void
+ param size Int32 in value
+ param indices UInt32 in array [size]
+ category ARB_matrix_palette
+ version 1.1
+ extension
+ glxropcode 4328
+ glxflags ignore
+ offset ?
+
+MatrixIndexPointerARB(size, type, stride, pointer)
+ return void
+ param size Int32 in value
+ param type MatrixIndexPointerTypeARB in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride)] retained
+ category ARB_matrix_palette
+ version 1.1
+ extension
+ dlflags notlistable
+ glxflags ignore
+ offset ?
+
+################################################################################
+#
+# ARB Extension #17
+# ARB_texture_env_combine commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_env_combine
+
+################################################################################
+#
+# ARB Extension #18
+# ARB_texture_env_crossbar commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_env_crossbar
+
+################################################################################
+#
+# ARB Extension #19
+# ARB_texture_env_dot3 commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_env_dot3
+
+###############################################################################
+#
+# ARB Extension #20 - WGL_ARB_render_texture
+#
+###############################################################################
+
+###############################################################################
+#
+# ARB Extension #21
+# ARB_texture_mirrored_repeat commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_mirrored_repeat
+
+###############################################################################
+#
+# ARB Extension #22
+# ARB_depth_texture commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_depth_texture
+
+###############################################################################
+#
+# ARB Extension #23
+# ARB_shadow commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_shadow
+
+###############################################################################
+#
+# ARB Extension #24
+# ARB_shadow_ambient commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_shadow_ambient
+
+###############################################################################
+#
+# ARB Extension #25
+# ARB_window_pos commands
+# Note: all entry points use glxropcode ropcode 230, with 3 float parameters
+#
+###############################################################################
+
+WindowPos2dARB(x, y)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ category ARB_window_pos
+ vectorequiv WindowPos2dvARB
+ version 1.0
+ alias WindowPos2d
+
+WindowPos2dvARB(v)
+ return void
+ param v CoordD in array [2]
+ category ARB_window_pos
+ version 1.0
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ alias WindowPos2dv
+
+WindowPos2fARB(x, y)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ category ARB_window_pos
+ vectorequiv WindowPos2fvARB
+ version 1.0
+ alias WindowPos2f
+
+WindowPos2fvARB(v)
+ return void
+ param v CoordF in array [2]
+ category ARB_window_pos
+ version 1.0
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ alias WindowPos2fv
+
+WindowPos2iARB(x, y)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ category ARB_window_pos
+ vectorequiv WindowPos2ivARB
+ version 1.0
+ alias WindowPos2i
+
+WindowPos2ivARB(v)
+ return void
+ param v CoordI in array [2]
+ category ARB_window_pos
+ version 1.0
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ alias WindowPos2iv
+
+WindowPos2sARB(x, y)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ category ARB_window_pos
+ vectorequiv WindowPos2svARB
+ version 1.0
+ alias WindowPos2s
+
+WindowPos2svARB(v)
+ return void
+ param v CoordS in array [2]
+ category ARB_window_pos
+ version 1.0
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ alias WindowPos2sv
+
+WindowPos3dARB(x, y, z)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ param z CoordD in value
+ vectorequiv WindowPos3dvARB
+ category ARB_window_pos
+ version 1.0
+ alias WindowPos3d
+
+WindowPos3dvARB(v)
+ return void
+ param v CoordD in array [3]
+ category ARB_window_pos
+ version 1.0
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ alias WindowPos3dv
+
+WindowPos3fARB(x, y, z)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ param z CoordF in value
+ category ARB_window_pos
+ vectorequiv WindowPos3fvARB
+ version 1.0
+ alias WindowPos3f
+
+WindowPos3fvARB(v)
+ return void
+ param v CoordF in array [3]
+ category ARB_window_pos
+ version 1.0
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ alias WindowPos3fv
+
+WindowPos3iARB(x, y, z)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ param z CoordI in value
+ category ARB_window_pos
+ vectorequiv WindowPos3ivARB
+ version 1.0
+ alias WindowPos3i
+
+WindowPos3ivARB(v)
+ return void
+ param v CoordI in array [3]
+ category ARB_window_pos
+ version 1.0
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ alias WindowPos3iv
+
+WindowPos3sARB(x, y, z)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ param z CoordS in value
+ category ARB_window_pos
+ vectorequiv WindowPos3svARB
+ version 1.0
+ alias WindowPos3s
+
+WindowPos3svARB(v)
+ return void
+ param v CoordS in array [3]
+ category ARB_window_pos
+ version 1.0
+ glxropcode 230
+ glxflags client-handcode server-handcode
+ alias WindowPos3sv
+
+###############################################################################
+#
+# ARB Extension #26
+# ARB_vertex_program commands
+#
+###############################################################################
+
+VertexAttrib1dARB(index, x)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib1dvARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib1d
+
+VertexAttrib1dvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [1]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4197
+ alias VertexAttrib1dv
+
+VertexAttrib1fARB(index, x)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib1fvARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib1f
+
+VertexAttrib1fvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [1]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4193
+ alias VertexAttrib1fv
+
+VertexAttrib1sARB(index, x)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib1svARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib1s
+
+VertexAttrib1svARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [1]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4189
+ alias VertexAttrib1sv
+
+VertexAttrib2dARB(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib2dvARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib2d
+
+VertexAttrib2dvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [2]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4198
+ alias VertexAttrib2dv
+
+VertexAttrib2fARB(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib2fvARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib2f
+
+VertexAttrib2fvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [2]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4194
+ alias VertexAttrib2fv
+
+VertexAttrib2sARB(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ param y Int16 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib2svARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib2s
+
+VertexAttrib2svARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [2]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4190
+ alias VertexAttrib2sv
+
+VertexAttrib3dARB(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib3dvARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib3d
+
+VertexAttrib3dvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [3]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4199
+ alias VertexAttrib3dv
+
+VertexAttrib3fARB(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib3fvARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib3f
+
+VertexAttrib3fvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [3]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4195
+ alias VertexAttrib3fv
+
+VertexAttrib3sARB(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ param y Int16 in value
+ param z Int16 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib3svARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib3s
+
+VertexAttrib3svARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [3]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4191
+ alias VertexAttrib3sv
+
+VertexAttrib4NbvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Int8 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4Nbv
+
+VertexAttrib4NivARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4Niv
+
+VertexAttrib4NsvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4Nsv
+
+VertexAttrib4NubARB(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x UInt8 in value
+ param y UInt8 in value
+ param z UInt8 in value
+ param w UInt8 in value
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4Nub
+
+VertexAttrib4NubvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt8 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4201
+ alias VertexAttrib4Nubv
+
+VertexAttrib4NuivARB(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4Nuiv
+
+VertexAttrib4NusvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt16 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4Nusv
+
+VertexAttrib4bvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Int8 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4bv
+
+VertexAttrib4dARB(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib4dvARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib4d
+
+VertexAttrib4dvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4200
+ alias VertexAttrib4dv
+
+VertexAttrib4fARB(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib4fvARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib4f
+
+VertexAttrib4fvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4196
+ alias VertexAttrib4fv
+
+VertexAttrib4ivARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4iv
+
+VertexAttrib4sARB(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ param y Int16 in value
+ param z Int16 in value
+ param w Int16 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv VertexAttrib4svARB
+ extension soft WINSOFT NV10
+ alias VertexAttrib4s
+
+VertexAttrib4svARB(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4192
+ alias VertexAttrib4sv
+
+VertexAttrib4ubvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt8 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4ubv
+
+VertexAttrib4uivARB(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4uiv
+
+VertexAttrib4usvARB(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt16 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttrib4usv
+
+VertexAttribPointerARB(index, size, type, normalized, stride, pointer)
+ return void
+ param index UInt32 in value
+ param size Int32 in value
+ param type VertexAttribPointerTypeARB in value
+ param normalized Boolean in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride)] retained
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias VertexAttribPointer
+
+EnableVertexAttribArrayARB(index)
+ return void
+ param index UInt32 in value
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias EnableVertexAttribArray
+
+DisableVertexAttribArrayARB(index)
+ return void
+ param index UInt32 in value
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ alias DisableVertexAttribArray
+
+ProgramStringARB(target, format, len, string)
+ return void
+ param target ProgramTargetARB in value
+ param format ProgramFormatARB in value
+ param len SizeI in value
+ param string Void in array [len]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 667
+
+BindProgramARB(target, program)
+ return void
+ param target ProgramTargetARB in value
+ param program UInt32 in value
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxropcode 4180
+ offset 579
+
+DeleteProgramsARB(n, programs)
+ return void
+ param n SizeI in value
+ param programs UInt32 in array [n]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxvendorpriv 1294
+ offset 580
+
+GenProgramsARB(n, programs)
+ return void
+ param n SizeI in value
+ param programs UInt32 out array [n]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxvendorpriv 1295
+ offset 582
+
+ProgramEnvParameter4dARB(target, index, x, y, z, w)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv ProgramEnvParameter4dvARB
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 668
+
+ProgramEnvParameter4dvARB(target, index, params)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param params Float64 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 669
+
+ProgramEnvParameter4fARB(target, index, x, y, z, w)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv ProgramEnvParameter4fvARB
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 670
+
+ProgramEnvParameter4fvARB(target, index, params)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param params Float32 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 671
+
+ProgramLocalParameter4dARB(target, index, x, y, z, w)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv ProgramLocalParameter4dvARB
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 672
+
+ProgramLocalParameter4dvARB(target, index, params)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param params Float64 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 673
+
+ProgramLocalParameter4fARB(target, index, x, y, z, w)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category ARB_vertex_program
+ version 1.3
+ vectorequiv ProgramLocalParameter4fvARB
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 674
+
+ProgramLocalParameter4fvARB(target, index, params)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param params Float32 in array [4]
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 675
+
+GetProgramEnvParameterdvARB(target, index, params)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param params Float64 out array [4]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 676
+
+GetProgramEnvParameterfvARB(target, index, params)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param params Float32 out array [4]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 677
+
+GetProgramLocalParameterdvARB(target, index, params)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param params Float64 out array [4]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 678
+
+GetProgramLocalParameterfvARB(target, index, params)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param params Float32 out array [4]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 679
+
+GetProgramivARB(target, pname, params)
+ return void
+ param target ProgramTargetARB in value
+ param pname ProgramPropertyARB in value
+ param params Int32 out array [1]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 680
+
+GetProgramStringARB(target, pname, string)
+ return void
+ param target ProgramTargetARB in value
+ param pname ProgramStringPropertyARB in value
+ param string Void out array [COMPSIZE(target,pname)]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 681
+
+GetVertexAttribdvARB(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribPropertyARB in value
+ param params Float64 out array [4]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxvendorpriv 1301
+ alias GetVertexAttribdv
+
+GetVertexAttribfvARB(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribPropertyARB in value
+ param params Float32 out array [4]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxvendorpriv 1302
+ alias GetVertexAttribfv
+
+GetVertexAttribivARB(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribPropertyARB in value
+ param params Int32 out array [4]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxvendorpriv 1303
+ alias GetVertexAttribiv
+
+GetVertexAttribPointervARB(index, pname, pointer)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribPointerPropertyARB in value
+ param pointer VoidPointer out array [1]
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxflags ignore
+ alias GetVertexAttribPointerv
+
+IsProgramARB(program)
+ return Boolean
+ param program UInt32 in value
+ dlflags notlistable
+ category ARB_vertex_program
+ version 1.3
+ extension soft WINSOFT NV10
+ glxvendorpriv 1304
+ alias IsProgram
+
+
+###############################################################################
+#
+# ARB Extension #27
+# ARB_fragment_program commands
+#
+###############################################################################
+
+# All ARB_fragment_program entry points are shared with ARB_vertex_program,
+# and are only included in that #define block, for now.
+newcategory: ARB_fragment_program
+passthru: /* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
+
+###############################################################################
+#
+# ARB Extension #28
+# ARB_vertex_buffer_object commands
+#
+###############################################################################
+
+BindBufferARB(target, buffer)
+ return void
+ param target BufferTargetARB in value
+ param buffer UInt32 in value
+ category ARB_vertex_buffer_object
+ version 1.2
+ extension
+ alias BindBuffer
+
+DeleteBuffersARB(n, buffers)
+ return void
+ param n SizeI in value
+ param buffers ConstUInt32 in array [n]
+ category ARB_vertex_buffer_object
+ version 1.2
+ extension
+ alias DeleteBuffers
+
+GenBuffersARB(n, buffers)
+ return void
+ param n SizeI in value
+ param buffers UInt32 out array [n]
+ category ARB_vertex_buffer_object
+ version 1.2
+ extension
+ alias GenBuffers
+
+IsBufferARB(buffer)
+ return Boolean
+ param buffer UInt32 in value
+ category ARB_vertex_buffer_object
+ version 1.2
+ extension
+ alias IsBuffer
+
+BufferDataARB(target, size, data, usage)
+ return void
+ param target BufferTargetARB in value
+ param size BufferSizeARB in value
+ param data ConstVoid in array [size]
+ param usage BufferUsageARB in value
+ category ARB_vertex_buffer_object
+ version 1.2
+ extension
+ alias BufferData
+
+BufferSubDataARB(target, offset, size, data)
+ return void
+ param target BufferTargetARB in value
+ param offset BufferOffsetARB in value
+ param size BufferSizeARB in value
+ param data ConstVoid in array [size]
+ category ARB_vertex_buffer_object
+ version 1.2
+ extension
+ alias BufferSubData
+
+GetBufferSubDataARB(target, offset, size, data)
+ return void
+ param target BufferTargetARB in value
+ param offset BufferOffsetARB in value
+ param size BufferSizeARB in value
+ param data Void out array [size]
+ category ARB_vertex_buffer_object
+ dlflags notlistable
+ version 1.2
+ extension
+ alias GetBufferSubData
+
+MapBufferARB(target, access)
+ return VoidPointer
+ param target BufferTargetARB in value
+ param access BufferAccessARB in value
+ category ARB_vertex_buffer_object
+ version 1.2
+ extension
+ alias MapBuffer
+
+UnmapBufferARB(target)
+ return Boolean
+ param target BufferTargetARB in value
+ category ARB_vertex_buffer_object
+ version 1.2
+ extension
+ alias UnmapBuffer
+
+GetBufferParameterivARB(target, pname, params)
+ return void
+ param target BufferTargetARB in value
+ param pname BufferPNameARB in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category ARB_vertex_buffer_object
+ dlflags notlistable
+ version 1.2
+ extension
+ alias GetBufferParameteriv
+
+GetBufferPointervARB(target, pname, params)
+ return void
+ param target BufferTargetARB in value
+ param pname BufferPointerNameARB in value
+ param params VoidPointer out array [1]
+ category ARB_vertex_buffer_object
+ dlflags notlistable
+ version 1.2
+ extension
+ alias GetBufferPointerv
+
+###############################################################################
+#
+# ARB Extension #29
+# ARB_occlusion_query commands
+#
+###############################################################################
+
+GenQueriesARB(n, ids)
+ return void
+ param n SizeI in value
+ param ids UInt32 out array [n]
+ category ARB_occlusion_query
+ version 1.5
+ extension
+ alias GenQueries
+
+DeleteQueriesARB(n, ids)
+ return void
+ param n SizeI in value
+ param ids UInt32 in array [n]
+ category ARB_occlusion_query
+ version 1.5
+ extension
+ alias DeleteQueries
+
+IsQueryARB(id)
+ return Boolean
+ param id UInt32 in value
+ category ARB_occlusion_query
+ version 1.5
+ extension
+ alias IsQuery
+
+BeginQueryARB(target, id)
+ return void
+ param target GLenum in value
+ param id UInt32 in value
+ category ARB_occlusion_query
+ version 1.5
+ extension
+ alias BeginQuery
+
+EndQueryARB(target)
+ return void
+ param target GLenum in value
+ category ARB_occlusion_query
+ version 1.5
+ extension
+ alias EndQuery
+
+GetQueryivARB(target, pname, params)
+ return void
+ param target GLenum in value
+ param pname GLenum in value
+ param params Int32 out array [pname]
+ category ARB_occlusion_query
+ dlflags notlistable
+ version 1.5
+ extension
+ alias GetQueryiv
+
+GetQueryObjectivARB(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [pname]
+ category ARB_occlusion_query
+ dlflags notlistable
+ version 1.5
+ extension
+ alias GetQueryObjectiv
+
+GetQueryObjectuivARB(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname GLenum in value
+ param params UInt32 out array [pname]
+ category ARB_occlusion_query
+ dlflags notlistable
+ version 1.5
+ extension
+ alias GetQueryObjectuiv
+
+###############################################################################
+#
+# ARB Extension #30
+# ARB_shader_objects commands
+#
+###############################################################################
+
+DeleteObjectARB(obj)
+ return void
+ param obj handleARB in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetHandleARB(pname)
+ return handleARB
+ param pname GLenum in value
+ category ARB_shader_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+DetachObjectARB(containerObj, attachedObj)
+ return void
+ param containerObj handleARB in value
+ param attachedObj handleARB in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias DetachShader
+
+CreateShaderObjectARB(shaderType)
+ return handleARB
+ param shaderType GLenum in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias CreateShader
+
+ShaderSourceARB(shaderObj, count, string, length)
+ return void
+ param shaderObj handleARB in value
+ param count SizeI in value
+ param string charPointerARB in array [count]
+ param length Int32 in array [1]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias ShaderSource
+
+CompileShaderARB(shaderObj)
+ return void
+ param shaderObj handleARB in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias CompileShader
+
+CreateProgramObjectARB()
+ return handleARB
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias CreateProgram
+
+AttachObjectARB(containerObj, obj)
+ return void
+ param containerObj handleARB in value
+ param obj handleARB in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias AttachShader
+
+LinkProgramARB(programObj)
+ return void
+ param programObj handleARB in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias LinkProgram
+
+UseProgramObjectARB(programObj)
+ return void
+ param programObj handleARB in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias UseProgram
+
+ValidateProgramARB(programObj)
+ return void
+ param programObj handleARB in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias ValidateProgram
+
+Uniform1fARB(location, v0)
+ return void
+ param location Int32 in value
+ param v0 Float32 in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform1f
+
+Uniform2fARB(location, v0, v1)
+ return void
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform2f
+
+Uniform3fARB(location, v0, v1, v2)
+ return void
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ param v2 Float32 in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform3f
+
+Uniform4fARB(location, v0, v1, v2, v3)
+ return void
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ param v2 Float32 in value
+ param v3 Float32 in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform4f
+
+Uniform1iARB(location, v0)
+ return void
+ param location Int32 in value
+ param v0 Int32 in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform1i
+
+Uniform2iARB(location, v0, v1)
+ return void
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform2i
+
+Uniform3iARB(location, v0, v1, v2)
+ return void
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ param v2 Int32 in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform3i
+
+Uniform4iARB(location, v0, v1, v2, v3)
+ return void
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ param v2 Int32 in value
+ param v3 Int32 in value
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform4i
+
+Uniform1fvARB(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform1fv
+
+Uniform2fvARB(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform2fv
+
+Uniform3fvARB(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform3fv
+
+Uniform4fvARB(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform4fv
+
+Uniform1ivARB(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform1iv
+
+Uniform2ivARB(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform2iv
+
+Uniform3ivARB(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform3iv
+
+Uniform4ivARB(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias Uniform4iv
+
+UniformMatrix2fvARB(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias UniformMatrix2fv
+
+UniformMatrix3fvARB(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias UniformMatrix3fv
+
+UniformMatrix4fvARB(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category ARB_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias UniformMatrix4fv
+
+GetObjectParameterfvARB(obj, pname, params)
+ return void
+ param obj handleARB in value
+ param pname GLenum in value
+ param params Float32 out array [pname]
+ category ARB_shader_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetObjectParameterivARB(obj, pname, params)
+ return void
+ param obj handleARB in value
+ param pname GLenum in value
+ param params Int32 out array [pname]
+ category ARB_shader_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetInfoLogARB(obj, maxLength, length, infoLog)
+ return void
+ param obj handleARB in value
+ param maxLength SizeI in value
+ param length SizeI out array [1]
+ param infoLog charARB out array [length]
+ category ARB_shader_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetAttachedObjectsARB(containerObj, maxCount, count, obj)
+ return void
+ param containerObj handleARB in value
+ param maxCount SizeI in value
+ param count SizeI out array [1]
+ param obj handleARB out array [count]
+ category ARB_shader_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ alias GetAttachedShaders
+
+GetUniformLocationARB(programObj, name)
+ return Int32
+ param programObj handleARB in value
+ param name charARB in array []
+ category ARB_shader_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ alias GetUniformLocation
+
+GetActiveUniformARB(programObj, index, maxLength, length, size, type, name)
+ return void
+ param programObj handleARB in value
+ param index UInt32 in value
+ param maxLength SizeI in value
+ param length SizeI out array [1]
+ param size Int32 out array [1]
+ param type GLenum out array [1]
+ param name charARB out array []
+ category ARB_shader_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ alias GetActiveUniform
+
+GetUniformfvARB(programObj, location, params)
+ return void
+ param programObj handleARB in value
+ param location Int32 in value
+ param params Float32 out array [COMPSIZE(location)]
+ category ARB_shader_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ alias GetUniformfv
+
+GetUniformivARB(programObj, location, params)
+ return void
+ param programObj handleARB in value
+ param location Int32 in value
+ param params Int32 out array [COMPSIZE(location)]
+ category ARB_shader_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ alias GetUniformiv
+
+GetShaderSourceARB(obj, maxLength, length, source)
+ return void
+ param obj handleARB in value
+ param maxLength SizeI in value
+ param length SizeI out array [1]
+ param source charARB out array [length]
+ category ARB_shader_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ alias GetShaderSource
+
+
+###############################################################################
+#
+# ARB Extension #31
+# ARB_vertex_shader commands
+#
+###############################################################################
+
+BindAttribLocationARB(programObj, index, name)
+ return void
+ param programObj handleARB in value
+ param index UInt32 in value
+ param name charARB in array []
+ category ARB_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias BindAttribLocation
+
+GetActiveAttribARB(programObj, index, maxLength, length, size, type, name)
+ return void
+ param programObj handleARB in value
+ param index UInt32 in value
+ param maxLength SizeI in value
+ param length SizeI out array [1]
+ param size Int32 out array [1]
+ param type GLenum out array [1]
+ param name charARB out array []
+ category ARB_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ alias GetActiveAttrib
+
+GetAttribLocationARB(programObj, name)
+ return Int32
+ param programObj handleARB in value
+ param name charARB in array []
+ category ARB_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ alias GetAttribLocation
+
+###############################################################################
+#
+# ARB Extension #32
+# ARB_fragment_shader commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_fragment_shader
+
+###############################################################################
+#
+# ARB Extension #33
+# ARB_shading_language_100 commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_shading_language_100
+
+###############################################################################
+#
+# ARB Extension #34
+# ARB_texture_non_power_of_two commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_non_power_of_two
+
+###############################################################################
+#
+# ARB Extension #35
+# ARB_point_sprite commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_point_sprite
+
+###############################################################################
+#
+# ARB Extension #36
+# ARB_fragment_program_shadow commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_fragment_program_shadow
+
+###############################################################################
+#
+# ARB Extension #37
+# ARB_draw_buffers commands
+#
+###############################################################################
+
+DrawBuffersARB(n, bufs)
+ return void
+ param n SizeI in value
+ param bufs DrawBufferModeATI in array [n]
+ category ARB_draw_buffers
+ version 1.5
+ extension
+ alias DrawBuffers
+
+###############################################################################
+#
+# ARB Extension #38
+# ARB_texture_rectangle commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_rectangle
+
+###############################################################################
+#
+# ARB Extension #39
+# ARB_color_buffer_float commands
+#
+###############################################################################
+
+ClampColorARB(target, clamp)
+ return void
+ param target ClampColorTargetARB in value
+ param clamp ClampColorModeARB in value
+ category ARB_color_buffer_float
+ version 1.5
+ extension
+ glxropcode 234
+ glxflags ignore
+ alias ClampColor
+
+###############################################################################
+#
+# ARB Extension #40
+# ARB_half_float_pixel commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_half_float_pixel
+
+###############################################################################
+#
+# ARB Extension #41
+# ARB_texture_float commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_float
+
+###############################################################################
+#
+# ARB Extension #42
+# ARB_pixel_buffer_object commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_pixel_buffer_object
+
+###############################################################################
+#
+# ARB Extension #43
+# ARB_depth_buffer_float commands (also OpenGL 3.0)
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_depth_buffer_float
+
+###############################################################################
+#
+# ARB Extension #44
+# ARB_draw_instanced commands
+#
+###############################################################################
+
+DrawArraysInstancedARB(mode, first, count, primcount)
+ return void
+ param mode BeginMode in value
+ param first Int32 in value
+ param count SizeI in value
+ param primcount SizeI in value
+ category ARB_draw_instanced
+ version 2.0
+ extension soft WINSOFT
+ dlflags notlistable
+ vectorequiv ArrayElement
+ glfflags ignore
+ glxflags ignore
+ alias DrawArraysInstanced
+
+DrawElementsInstancedARB(mode, count, type, indices, primcount)
+ return void
+ param mode BeginMode in value
+ param count SizeI in value
+ param type DrawElementsType in value
+ param indices Void in array [COMPSIZE(count/type)]
+ param primcount SizeI in value
+ category ARB_draw_instanced
+ version 2.0
+ extension soft WINSOFT
+ dlflags notlistable
+ vectorequiv ArrayElement
+ glfflags ignore
+ glxflags ignore
+ alias DrawElementsInstanced
+
+###############################################################################
+#
+# ARB Extension #45
+# ARB_framebuffer_object commands (also OpenGL 3.0)
+#
+###############################################################################
+
+# Promoted from EXT_framebuffer_object
+IsRenderbuffer(renderbuffer)
+ return Boolean
+ param renderbuffer UInt32 in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxvendorpriv 1422
+ glxflags ignore
+ offset ?
+
+# GLX opcode changed so it can be differentiated from BindRenderbufferEXT
+# (see ARB_framebuffer_object extension spec revision 23)
+BindRenderbuffer(target, renderbuffer)
+ return void
+ param target RenderbufferTarget in value
+ param renderbuffer UInt32 in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxropcode 235
+ glxflags ignore
+ offset ?
+
+DeleteRenderbuffers(n, renderbuffers)
+ return void
+ param n SizeI in value
+ param renderbuffers UInt32 in array [n]
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxropcode 4317
+ glxflags ignore
+ offset ?
+
+GenRenderbuffers(n, renderbuffers)
+ return void
+ param n SizeI in value
+ param renderbuffers UInt32 out array [n]
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxvendorpriv 1423
+ glxflags ignore
+ offset ?
+
+RenderbufferStorage(target, internalformat, width, height)
+ return void
+ param target RenderbufferTarget in value
+ param internalformat GLenum in value
+ param width SizeI in value
+ param height SizeI in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxropcode 4318
+ glxflags ignore
+ offset ?
+
+GetRenderbufferParameteriv(target, pname, params)
+ return void
+ param target RenderbufferTarget in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category ARB_framebuffer_object
+ dlflags notlistable
+ version 3.0
+ extension
+ glxvendorpriv 1424
+ glxflags ignore
+ offset ?
+
+IsFramebuffer(framebuffer)
+ return Boolean
+ param framebuffer UInt32 in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxvendorpriv 1425
+ glxflags ignore
+ offset ?
+
+# GLX opcode changed so it can be differentiated from BindFramebufferEXT
+# (see ARB_framebuffer_object extension spec revision 23)
+BindFramebuffer(target, framebuffer)
+ return void
+ param target FramebufferTarget in value
+ param framebuffer UInt32 in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxropcode 236
+ glxflags ignore
+ offset ?
+
+DeleteFramebuffers(n, framebuffers)
+ return void
+ param n SizeI in value
+ param framebuffers UInt32 in array [n]
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxropcode 4320
+ glxflags ignore
+ offset ?
+
+GenFramebuffers(n, framebuffers)
+ return void
+ param n SizeI in value
+ param framebuffers UInt32 out array [n]
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxvendorpriv 1426
+ glxflags ignore
+ offset ?
+
+CheckFramebufferStatus(target)
+ return GLenum
+ param target FramebufferTarget in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxvendorpriv 1427
+ glxflags ignore
+ offset ?
+
+FramebufferTexture1D(target, attachment, textarget, texture, level)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param textarget GLenum in value
+ param texture UInt32 in value
+ param level Int32 in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxropcode 4321
+ glxflags ignore
+ offset ?
+
+FramebufferTexture2D(target, attachment, textarget, texture, level)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param textarget GLenum in value
+ param texture UInt32 in value
+ param level Int32 in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxropcode 4322
+ glxflags ignore
+ offset ?
+
+FramebufferTexture3D(target, attachment, textarget, texture, level, zoffset)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param textarget GLenum in value
+ param texture UInt32 in value
+ param level Int32 in value
+ param zoffset Int32 in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxropcode 4323
+ glxflags ignore
+ offset ?
+
+FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param renderbuffertarget RenderbufferTarget in value
+ param renderbuffer UInt32 in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxropcode 4324
+ glxflags ignore
+ offset ?
+
+GetFramebufferAttachmentParameteriv(target, attachment, pname, params)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category ARB_framebuffer_object
+ dlflags notlistable
+ version 3.0
+ extension
+ glxvendorpriv 1428
+ glxflags ignore
+ offset ?
+
+GenerateMipmap(target)
+ return void
+ param target GLenum in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension
+ glxropcode 4325
+ glxflags ignore
+ offset ?
+
+# Promoted from EXT_framebuffer_blit
+BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter)
+ return void
+ param srcX0 Int32 in value
+ param srcY0 Int32 in value
+ param srcX1 Int32 in value
+ param srcY1 Int32 in value
+ param dstX0 Int32 in value
+ param dstY0 Int32 in value
+ param dstX1 Int32 in value
+ param dstY1 Int32 in value
+ param mask ClearBufferMask in value
+ param filter GLenum in value
+ category ARB_framebuffer_object
+ version 3.0
+ glxropcode 4330
+ offset ?
+
+# Promoted from EXT_framebuffer_multisample
+RenderbufferStorageMultisample(target, samples, internalformat, width, height)
+ return void
+ param target GLenum in value
+ param samples SizeI in value
+ param internalformat GLenum in value
+ param width SizeI in value
+ param height SizeI in value
+ category ARB_framebuffer_object
+ version 3.0
+ glxropcode 4331
+ offset ?
+
+# Promoted from ARB_geometry_shader4
+FramebufferTextureLayer(target, attachment, texture, level, layer)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ param layer CheckedInt32 in value
+ category ARB_framebuffer_object
+ version 3.0
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxropcode 237
+ offset ?
+
+
+###############################################################################
+#
+# ARB Extension #46
+# ARB_framebuffer_sRGB commands (also OpenGL 3.0)
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_framebuffer_sRGB
+
+###############################################################################
+#
+# ARB Extension #47
+# ARB_geometry_shader4 commands
+#
+###############################################################################
+
+ProgramParameteriARB(program, pname, value)
+ return void
+ param program UInt32 in value
+ param pname ProgramParameterPName in value
+ param value Int32 in value
+ category ARB_geometry_shader4
+ version 3.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias ProgramParameteri
+
+FramebufferTextureARB(target, attachment, texture, level)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ category ARB_geometry_shader4
+ version 3.0
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+
+FramebufferTextureLayerARB(target, attachment, texture, level, layer)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ param layer CheckedInt32 in value
+ category ARB_geometry_shader4
+ version 3.0
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ alias FramebufferTextureLayer
+
+FramebufferTextureFaceARB(target, attachment, texture, level, face)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ param face TextureTarget in value
+ category ARB_geometry_shader4
+ version 3.0
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# ARB Extension #48
+# ARB_half_float_vertex commands (also OpenGL 3.0)
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_half_float_vertex
+
+###############################################################################
+#
+# ARB Extension #49
+# ARB_instanced_arrays commands
+#
+###############################################################################
+
+VertexAttribDivisorARB(index, divisor)
+ return void
+ param index UInt32 in value
+ param divisor UInt32 in value
+ category ARB_instanced_arrays
+ version 2.0
+ extension
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# ARB Extension #50
+# ARB_map_buffer_range commands (also OpenGL 3.0)
+#
+###############################################################################
+
+MapBufferRange(target, offset, length, access)
+ return VoidPointer
+ param target BufferTargetARB in value
+ param offset BufferOffset in value
+ param length BufferSize in value
+ param access BufferAccessMask in value
+ category ARB_map_buffer_range
+ version 3.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+# Promoted from APPLE_flush_buffer_range
+FlushMappedBufferRange(target, offset, length)
+ return void
+ param target BufferTargetARB in value
+ param offset BufferOffset in value
+ param length BufferSize in value
+ category ARB_map_buffer_range
+ version 3.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #51
+# ARB_texture_buffer_object commands
+#
+###############################################################################
+
+TexBufferARB(target, internalformat, buffer)
+ return void
+ param target TextureTarget in value
+ param internalformat GLenum in value
+ param buffer UInt32 in value
+ category ARB_texture_buffer_object
+ version 3.0
+ extension soft WINSOFT NV50
+ glfflags ignore
+ alias TexBuffer
+
+###############################################################################
+#
+# ARB Extension #52
+# ARB_texture_compression_rgtc commands (also OpenGL 3.0)
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_compression_rgtc
+
+###############################################################################
+#
+# ARB Extension #53
+# ARB_texture_rg commands (also OpenGL 3.0)
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_rg
+
+###############################################################################
+#
+# ARB Extension #54
+# ARB_vertex_array_object commands (also OpenGL 3.0)
+#
+###############################################################################
+
+# Promoted from APPLE_vertex_array_object
+BindVertexArray(array)
+ return void
+ param array UInt32 in value
+ category ARB_vertex_array_object
+ version 3.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteVertexArrays(n, arrays)
+ return void
+ param n SizeI in value
+ param arrays UInt32 in array [n]
+ category ARB_vertex_array_object
+ version 3.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GenVertexArrays(n, arrays)
+ return void
+ param n SizeI in value
+ param arrays UInt32 out array [n]
+ category ARB_vertex_array_object
+ version 3.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsVertexArray(array)
+ return Boolean
+ param array UInt32 in value
+ category ARB_vertex_array_object
+ version 3.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #55 - WGL_ARB_create_context
+# ARB Extension #56 - GLX_ARB_create_context
+#
+###############################################################################
+
+###############################################################################
+#
+# ARB Extension #57
+# ARB_uniform_buffer_object commands
+#
+###############################################################################
+
+GetUniformIndices(program, uniformCount, uniformNames, uniformIndices)
+ return void
+ param program UInt32 in value
+ param uniformCount SizeI in value
+ param uniformNames CharPointer in array [COMPSIZE(uniformCount)]
+ param uniformIndices UInt32 out array [COMPSIZE(uniformCount)]
+ category ARB_uniform_buffer_object
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params)
+ return void
+ param program UInt32 in value
+ param uniformCount SizeI in value
+ param uniformIndices UInt32 in array [COMPSIZE(uniformCount)]
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category ARB_uniform_buffer_object
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetActiveUniformName(program, uniformIndex, bufSize, length, uniformName)
+ return void
+ param program UInt32 in value
+ param uniformIndex UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param uniformName Char out array [bufSize]
+ category ARB_uniform_buffer_object
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetUniformBlockIndex(program, uniformBlockName)
+ return UInt32
+ param program UInt32 in value
+ param uniformBlockName Char in array [COMPSIZE()]
+ category ARB_uniform_buffer_object
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params)
+ return void
+ param program UInt32 in value
+ param uniformBlockIndex UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category ARB_uniform_buffer_object
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName)
+ return void
+ param program UInt32 in value
+ param uniformBlockIndex UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param uniformBlockName Char out array [bufSize]
+ category ARB_uniform_buffer_object
+ dlflags notlistable
+ version 2.0
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding)
+ return void
+ param program UInt32 in value
+ param uniformBlockIndex UInt32 in value
+ param uniformBlockBinding UInt32 in value
+ category ARB_uniform_buffer_object
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+
+###############################################################################
+#
+# ARB Extension #58
+# ARB_compatibility commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_compatibility
+
+###############################################################################
+#
+# ARB Extension #59
+# ARB_copy_buffer commands
+#
+###############################################################################
+
+CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size)
+ return void
+ param readTarget GLenum in value
+ param writeTarget GLenum in value
+ param readOffset BufferOffset in value
+ param writeOffset BufferOffset in value
+ param size BufferSize in value
+ category ARB_copy_buffer
+ version 3.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #60
+# ARB_shader_texture_lod commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_shader_texture_lod
+
+###############################################################################
+#
+# ARB Extension #61
+# ARB_depth_clamp commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_depth_clamp
+
+###############################################################################
+#
+# ARB Extension #62
+# ARB_draw_elements_base_vertex commands
+#
+###############################################################################
+
+DrawElementsBaseVertex(mode, count, type, indices, basevertex)
+ return void
+ param mode GLenum in value
+ param count SizeI in value
+ param type DrawElementsType in value
+ param indices Void in array [COMPSIZE(count/type)]
+ param basevertex Int32 in value
+ category ARB_draw_elements_base_vertex
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex)
+ return void
+ param mode GLenum in value
+ param start UInt32 in value
+ param end UInt32 in value
+ param count SizeI in value
+ param type DrawElementsType in value
+ param indices Void in array [COMPSIZE(count/type)]
+ param basevertex Int32 in value
+ category ARB_draw_elements_base_vertex
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DrawElementsInstancedBaseVertex(mode, count, type, indices, primcount, basevertex)
+ return void
+ param mode GLenum in value
+ param count SizeI in value
+ param type DrawElementsType in value
+ param indices Void in array [COMPSIZE(count/type)]
+ param primcount SizeI in value
+ param basevertex Int32 in value
+ category ARB_draw_elements_base_vertex
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiDrawElementsBaseVertex(mode, count, type, indices, primcount, basevertex)
+ return void
+ param mode GLenum in value
+ param count SizeI in array [COMPSIZE(primcount)]
+ param type DrawElementsType in value
+ param indices VoidPointer in array [COMPSIZE(primcount)]
+ param primcount SizeI in value
+ param basevertex Int32 in array [COMPSIZE(primcount)]
+ category ARB_draw_elements_base_vertex
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #63
+# ARB_fragment_coord_conventions commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_fragment_coord_conventions
+
+###############################################################################
+#
+# ARB Extension #64
+# ARB_provoking_vertex commands
+#
+###############################################################################
+
+ProvokingVertex(mode)
+ return void
+ param mode GLenum in value
+ category ARB_provoking_vertex
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #65
+# ARB_seamless_cube_map commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_seamless_cube_map
+
+###############################################################################
+#
+# ARB Extension #66
+# ARB_sync commands
+#
+###############################################################################
+
+FenceSync(condition, flags)
+ return sync
+ param condition GLenum in value
+ param flags GLbitfield in value
+ category ARB_sync
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsSync(sync)
+ return Boolean
+ param sync sync in value
+ category ARB_sync
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteSync(sync)
+ return void
+ param sync sync in value
+ category ARB_sync
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ClientWaitSync(sync, flags, timeout)
+ return GLenum
+ param sync sync in value
+ param flags GLbitfield in value
+ param timeout UInt64 in value
+ category ARB_sync
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+WaitSync(sync, flags, timeout)
+ return void
+ param sync sync in value
+ param flags GLbitfield in value
+ param timeout UInt64 in value
+ category ARB_sync
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetInteger64v(pname, params)
+ return void
+ param pname GLenum in value
+ param params Int64 out array [COMPSIZE(pname)]
+ category ARB_sync
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetSynciv(sync, pname, bufSize, length, values)
+ return void
+ param sync sync in value
+ param pname GLenum in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param values Int32 out array [length]
+ category ARB_sync
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #67
+# ARB_texture_multisample commands
+#
+###############################################################################
+
+TexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations)
+ return void
+ param target GLenum in value
+ param samples SizeI in value
+ param internalformat Int32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param fixedsamplelocations Boolean in value
+ category ARB_texture_multisample
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations)
+ return void
+ param target GLenum in value
+ param samples SizeI in value
+ param internalformat Int32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param fixedsamplelocations Boolean in value
+ category ARB_texture_multisample
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetMultisamplefv(pname, index, val)
+ return void
+ param pname GLenum in value
+ param index UInt32 in value
+ param val Float32 out array [COMPSIZE(pname)]
+ category ARB_texture_multisample
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+SampleMaski(index, mask)
+ return void
+ param index UInt32 in value
+ param mask GLbitfield in value
+ category ARB_texture_multisample
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #68
+# ARB_vertex_array_bgra commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_vertex_array_bgra
+
+###############################################################################
+#
+# ARB Extension #69
+# ARB_draw_buffers_blend commands
+#
+###############################################################################
+
+BlendEquationiARB(buf, mode)
+ return void
+ param buf UInt32 in value
+ param mode GLenum in value
+ category ARB_draw_buffers_blend
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+ alias BlendEquationi
+
+BlendEquationSeparateiARB(buf, modeRGB, modeAlpha)
+ return void
+ param buf UInt32 in value
+ param modeRGB GLenum in value
+ param modeAlpha GLenum in value
+ category ARB_draw_buffers_blend
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+ alias BlendEquationSeparatei
+
+BlendFunciARB(buf, src, dst)
+ return void
+ param buf UInt32 in value
+ param src GLenum in value
+ param dst GLenum in value
+ category ARB_draw_buffers_blend
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+ alias BlendFunci
+
+BlendFuncSeparateiARB(buf, srcRGB, dstRGB, srcAlpha, dstAlpha)
+ return void
+ param buf UInt32 in value
+ param srcRGB GLenum in value
+ param dstRGB GLenum in value
+ param srcAlpha GLenum in value
+ param dstAlpha GLenum in value
+ category ARB_draw_buffers_blend
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+ alias BlendFuncSeparatei
+
+###############################################################################
+#
+# ARB Extension #70
+# ARB_sample_shading commands
+#
+###############################################################################
+
+MinSampleShadingARB(value)
+ return void
+ param value ClampedColorF in value
+ category ARB_sample_shading
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+ alias MinSampleShading
+
+###############################################################################
+#
+# ARB Extension #71
+# ARB_texture_cube_map_array commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_cube_map_array
+
+###############################################################################
+#
+# ARB Extension #72
+# ARB_texture_gather commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_gather
+
+###############################################################################
+#
+# ARB Extension #73
+# ARB_texture_query_lod commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_query_lod
+
+###############################################################################
+#
+# ARB Extension #74 - WGL_ARB_create_context_profile
+# ARB Extension #75 - GLX_ARB_create_context_profile
+#
+###############################################################################
+
+###############################################################################
+#
+# ARB Extension #76
+# ARB_shading_language_include commands
+#
+###############################################################################
+
+NamedStringARB(type, namelen, name, stringlen, string)
+ return void
+ param type GLenum in value
+ param namelen Int32 in value
+ param name Char in array [namelen]
+ param stringlen Int32 in value
+ param string Char in array [stringlen]
+ category ARB_shading_language_include
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteNamedStringARB(namelen, name)
+ return void
+ param namelen Int32 in value
+ param name Char in array [namelen]
+ category ARB_shading_language_include
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+CompileShaderIncludeARB(shader, count, path, length)
+ return void
+ param shader UInt32 in value
+ param count SizeI in value
+ param path CharPointer in array [count]
+ param length Int32 in array [count]
+ category ARB_shading_language_include
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsNamedStringARB(namelen, name)
+ return Boolean
+ param namelen Int32 in value
+ param name Char in array [namelen]
+ category ARB_shading_language_include
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetNamedStringARB(namelen, name, bufSize, stringlen, string)
+ return void
+ param namelen Int32 in value
+ param name Char in array [namelen]
+ param bufSize SizeI in value
+ param stringlen Int32 out array [1]
+ param string Char out array [bufSize]
+ category ARB_shading_language_include
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetNamedStringivARB(namelen, name, pname, params)
+ return void
+ param namelen Int32 in value
+ param name Char in array [namelen]
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category ARB_shading_language_include
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #77
+# ARB_texture_compression_bptc commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_compression_bptc
+
+###############################################################################
+#
+# ARB Extension #78
+# ARB_blend_func_extended commands
+#
+###############################################################################
+
+BindFragDataLocationIndexed(program, colorNumber, index, name)
+ return void
+ param program UInt32 in value
+ param colorNumber UInt32 in value
+ param index UInt32 in value
+ param name Char in array []
+ category ARB_blend_func_extended
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetFragDataIndex(program, name)
+ return Int32
+ param program UInt32 in value
+ param name Char in array []
+ category ARB_blend_func_extended
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #79
+# ARB_explicit_attrib_location commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_explicit_attrib_location
+
+###############################################################################
+#
+# ARB Extension #80
+# ARB_occlusion_query2 commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_occlusion_query2
+
+###############################################################################
+#
+# ARB Extension #81
+# ARB_sampler_objects commands
+#
+###############################################################################
+
+GenSamplers(count, samplers)
+ return void
+ param count SizeI in value
+ param samplers UInt32 out array [count]
+ category ARB_sampler_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteSamplers(count, samplers)
+ return void
+ param count SizeI in value
+ param samplers UInt32 in array [count]
+ category ARB_sampler_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsSampler(sampler)
+ return Boolean
+ param sampler UInt32 in value
+ category ARB_sampler_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindSampler(unit, sampler)
+ return void
+ param unit UInt32 in value
+ param sampler UInt32 in value
+ category ARB_sampler_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SamplerParameteri(sampler, pname, param)
+ return void
+ param sampler UInt32 in value
+ param pname GLenum in value
+ param param Int32 in value
+ category ARB_sampler_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SamplerParameteriv(sampler, pname, param)
+ return void
+ param sampler UInt32 in value
+ param pname GLenum in value
+ param param Int32 in array [COMPSIZE(pname)]
+ category ARB_sampler_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SamplerParameterf(sampler, pname, param)
+ return void
+ param sampler UInt32 in value
+ param pname GLenum in value
+ param param Float32 in value
+ category ARB_sampler_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SamplerParameterfv(sampler, pname, param)
+ return void
+ param sampler UInt32 in value
+ param pname GLenum in value
+ param param Float32 in array [COMPSIZE(pname)]
+ category ARB_sampler_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SamplerParameterIiv(sampler, pname, param)
+ return void
+ param sampler UInt32 in value
+ param pname GLenum in value
+ param param Int32 in array [COMPSIZE(pname)]
+ category ARB_sampler_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SamplerParameterIuiv(sampler, pname, param)
+ return void
+ param sampler UInt32 in value
+ param pname GLenum in value
+ param param UInt32 in array [COMPSIZE(pname)]
+ category ARB_sampler_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetSamplerParameteriv(sampler, pname, params)
+ return void
+ param sampler UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category ARB_sampler_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetSamplerParameterIiv(sampler, pname, params)
+ return void
+ param sampler UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category ARB_sampler_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetSamplerParameterfv(sampler, pname, params)
+ return void
+ param sampler UInt32 in value
+ param pname GLenum in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category ARB_sampler_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetSamplerParameterIuiv(sampler, pname, params)
+ return void
+ param sampler UInt32 in value
+ param pname GLenum in value
+ param params UInt32 out array [COMPSIZE(pname)]
+ category ARB_sampler_objects
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #82
+# ARB_shader_bit_encoding commands
+#
+###############################################################################
+
+# (none)
+newcategroy: ARB_shader_bit_encoding
+
+###############################################################################
+#
+# ARB Extension #83
+# ARB_texture_rgb10_a2ui commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_rgb10_a2ui
+
+###############################################################################
+#
+# ARB Extension #84
+# ARB_texture_swizzle commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_swizzle
+
+###############################################################################
+#
+# ARB Extension #85
+# ARB_timer_query commands
+#
+###############################################################################
+
+QueryCounter(id, target)
+ return void
+ param id UInt32 in value
+ param target GLenum in value
+ category ARB_timer_query
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetQueryObjecti64v(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname GLenum in value
+ param params Int64 out array [COMPSIZE(pname)]
+ category ARB_timer_query
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetQueryObjectui64v(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname GLenum in value
+ param params UInt64 out array [COMPSIZE(pname)]
+ category ARB_timer_query
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #86
+# ARB_vertex_type_2_10_10_10_rev commands
+#
+###############################################################################
+
+VertexP2ui(type, value)
+ return void
+ param type GLenum in value
+ param value UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexP2uiv(type, value)
+ return void
+ param type GLenum in value
+ param value UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexP3ui(type, value)
+ return void
+ param type GLenum in value
+ param value UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexP3uiv(type, value)
+ return void
+ param type GLenum in value
+ param value UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexP4ui(type, value)
+ return void
+ param type GLenum in value
+ param value UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexP4uiv(type, value)
+ return void
+ param type GLenum in value
+ param value UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoordP1ui(type, coords)
+ return void
+ param type GLenum in value
+ param coords UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoordP1uiv(type, coords)
+ return void
+ param type GLenum in value
+ param coords UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoordP2ui(type, coords)
+ return void
+ param type GLenum in value
+ param coords UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoordP2uiv(type, coords)
+ return void
+ param type GLenum in value
+ param coords UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoordP3ui(type, coords)
+ return void
+ param type GLenum in value
+ param coords UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoordP3uiv(type, coords)
+ return void
+ param type GLenum in value
+ param coords UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoordP4ui(type, coords)
+ return void
+ param type GLenum in value
+ param coords UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoordP4uiv(type, coords)
+ return void
+ param type GLenum in value
+ param coords UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoordP1ui(texture, type, coords)
+ return void
+ param texture GLenum in value
+ param type GLenum in value
+ param coords UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoordP1uiv(texture, type, coords)
+ return void
+ param texture GLenum in value
+ param type GLenum in value
+ param coords UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoordP2ui(texture, type, coords)
+ return void
+ param texture GLenum in value
+ param type GLenum in value
+ param coords UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoordP2uiv(texture, type, coords)
+ return void
+ param texture GLenum in value
+ param type GLenum in value
+ param coords UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoordP3ui(texture, type, coords)
+ return void
+ param texture GLenum in value
+ param type GLenum in value
+ param coords UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoordP3uiv(texture, type, coords)
+ return void
+ param texture GLenum in value
+ param type GLenum in value
+ param coords UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoordP4ui(texture, type, coords)
+ return void
+ param texture GLenum in value
+ param type GLenum in value
+ param coords UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoordP4uiv(texture, type, coords)
+ return void
+ param texture GLenum in value
+ param type GLenum in value
+ param coords UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalP3ui(type, coords)
+ return void
+ param type GLenum in value
+ param coords UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalP3uiv(type, coords)
+ return void
+ param type GLenum in value
+ param coords UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ColorP3ui(type, color)
+ return void
+ param type GLenum in value
+ param color UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ColorP3uiv(type, color)
+ return void
+ param type GLenum in value
+ param color UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ColorP4ui(type, color)
+ return void
+ param type GLenum in value
+ param color UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ColorP4uiv(type, color)
+ return void
+ param type GLenum in value
+ param color UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SecondaryColorP3ui(type, color)
+ return void
+ param type GLenum in value
+ param color UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SecondaryColorP3uiv(type, color)
+ return void
+ param type GLenum in value
+ param color UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribP1ui(index, type, normalized, value)
+ return void
+ param index UInt32 in value
+ param type GLenum in value
+ param normalized Boolean in value
+ param value UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribP1uiv(index, type, normalized, value)
+ return void
+ param index UInt32 in value
+ param type GLenum in value
+ param normalized Boolean in value
+ param value UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribP2ui(index, type, normalized, value)
+ return void
+ param index UInt32 in value
+ param type GLenum in value
+ param normalized Boolean in value
+ param value UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribP2uiv(index, type, normalized, value)
+ return void
+ param index UInt32 in value
+ param type GLenum in value
+ param normalized Boolean in value
+ param value UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribP3ui(index, type, normalized, value)
+ return void
+ param index UInt32 in value
+ param type GLenum in value
+ param normalized Boolean in value
+ param value UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribP3uiv(index, type, normalized, value)
+ return void
+ param index UInt32 in value
+ param type GLenum in value
+ param normalized Boolean in value
+ param value UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribP4ui(index, type, normalized, value)
+ return void
+ param index UInt32 in value
+ param type GLenum in value
+ param normalized Boolean in value
+ param value UInt32 in value
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribP4uiv(index, type, normalized, value)
+ return void
+ param index UInt32 in value
+ param type GLenum in value
+ param normalized Boolean in value
+ param value UInt32 in array [1]
+ category ARB_vertex_type_2_10_10_10_rev
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #87
+# ARB_draw_indirect commands
+#
+###############################################################################
+
+DrawArraysIndirect(mode, indirect)
+ return void
+ param mode GLenum in value
+ param indirect Void in array []
+ category ARB_draw_indirect
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DrawElementsIndirect(mode, type, indirect)
+ return void
+ param mode GLenum in value
+ param type GLenum in value
+ param indirect Void in array []
+ category ARB_draw_indirect
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #88
+# ARB_gpu_shader5 commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_gpu_shader5
+
+###############################################################################
+#
+# ARB Extension #89
+# ARB_gpu_shader_fp64 commands
+#
+###############################################################################
+
+Uniform1d(location, x)
+ return void
+ param location Int32 in value
+ param x Float64 in value
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform2d(location, x, y)
+ return void
+ param location Int32 in value
+ param x Float64 in value
+ param y Float64 in value
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform3d(location, x, y, z)
+ return void
+ param location Int32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform4d(location, x, y, z, w)
+ return void
+ param location Int32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform1dv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform2dv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform3dv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform4dv(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix2dv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix3dv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix4dv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix2x3dv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix2x4dv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix3x2dv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix3x4dv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix4x2dv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UniformMatrix4x3dv(location, count, transpose, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetUniformdv(program, location, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param params Float64 out array [COMPSIZE(location)]
+ category ARB_gpu_shader_fp64
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #90
+# ARB_shader_subroutine commands
+#
+###############################################################################
+
+GetSubroutineUniformLocation(program, shadertype, name)
+ return Int32
+ param program UInt32 in value
+ param shadertype GLenum in value
+ param name Char in array []
+ category ARB_shader_subroutine
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetSubroutineIndex(program, shadertype, name)
+ return UInt32
+ param program UInt32 in value
+ param shadertype GLenum in value
+ param name Char in array []
+ category ARB_shader_subroutine
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetActiveSubroutineUniformiv(program, shadertype, index, pname, values)
+ return void
+ param program UInt32 in value
+ param shadertype GLenum in value
+ param index UInt32 in value
+ param pname GLenum in value
+ param values Int32 out array [COMPSIZE(pname)]
+ category ARB_shader_subroutine
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetActiveSubroutineUniformName(program, shadertype, index, bufsize, length, name)
+ return void
+ param program UInt32 in value
+ param shadertype GLenum in value
+ param index UInt32 in value
+ param bufsize SizeI in value
+ param length SizeI out array [1]
+ param name Char out array [bufsize]
+ category ARB_shader_subroutine
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetActiveSubroutineName(program, shadertype, index, bufsize, length, name)
+ return void
+ param program UInt32 in value
+ param shadertype GLenum in value
+ param index UInt32 in value
+ param bufsize SizeI in value
+ param length SizeI out array [1]
+ param name Char out array [bufsize]
+ category ARB_shader_subroutine
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+UniformSubroutinesuiv(shadertype, count, indices)
+ return void
+ param shadertype GLenum in value
+ param count SizeI in value
+ param indices UInt32 in array [count]
+ category ARB_shader_subroutine
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetUniformSubroutineuiv(shadertype, location, params)
+ return void
+ param shadertype GLenum in value
+ param location Int32 in value
+ param params UInt32 out array [1]
+ category ARB_shader_subroutine
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetProgramStageiv(program, shadertype, pname, values)
+ return void
+ param program UInt32 in value
+ param shadertype GLenum in value
+ param pname GLenum in value
+ param values Int32 out array [1]
+ category ARB_shader_subroutine
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #91
+# ARB_tessellation_shader commands
+#
+###############################################################################
+
+PatchParameteri(pname, value)
+ return void
+ param pname GLenum in value
+ param value Int32 in value
+ category ARB_tessellation_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+PatchParameterfv(pname, values)
+ return void
+ param pname GLenum in value
+ param values Float32 in array [COMPSIZE(pname)]
+ category ARB_tessellation_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #92
+# ARB_texture_buffer_object_rgb32 commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_texture_buffer_object_rgb32
+
+###############################################################################
+#
+# ARB Extension #93
+# ARB_transform_feedback2 commands
+#
+###############################################################################
+
+BindTransformFeedback(target, id)
+ return void
+ param target GLenum in value
+ param id UInt32 in value
+ category ARB_transform_feedback2
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteTransformFeedbacks(n, ids)
+ return void
+ param n SizeI in value
+ param ids UInt32 in array [n]
+ category ARB_transform_feedback2
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GenTransformFeedbacks(n, ids)
+ return void
+ param n SizeI in value
+ param ids UInt32 out array [n]
+ category ARB_transform_feedback2
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsTransformFeedback(id)
+ return Boolean
+ param id UInt32 in value
+ category ARB_transform_feedback2
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+PauseTransformFeedback()
+ return void
+ category ARB_transform_feedback2
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ResumeTransformFeedback()
+ return void
+ category ARB_transform_feedback2
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DrawTransformFeedback(mode, id)
+ return void
+ param mode GLenum in value
+ param id UInt32 in value
+ category ARB_transform_feedback2
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #94
+# ARB_transform_feedback3 commands
+#
+###############################################################################
+
+DrawTransformFeedbackStream(mode, id, stream)
+ return void
+ param mode GLenum in value
+ param id UInt32 in value
+ param stream UInt32 in value
+ category ARB_transform_feedback3
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BeginQueryIndexed(target, index, id)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param id UInt32 in value
+ category ARB_transform_feedback3
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+EndQueryIndexed(target, index)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ category ARB_transform_feedback3
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetQueryIndexediv(target, index, pname, params)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category ARB_transform_feedback3
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #95
+# ARB_ES2_compatibility commands
+#
+###############################################################################
+
+ReleaseShaderCompiler()
+ return void
+ category ARB_ES2_compatibility
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ShaderBinary(count, shaders, binaryformat, binary, length)
+ return void
+ param count SizeI in value
+ param shaders UInt32 in array [count]
+ param binaryformat GLenum in value
+ param binary Void in array [length]
+ param length SizeI in value
+ category ARB_ES2_compatibility
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetShaderPrecisionFormat(shadertype, precisiontype, range, precision)
+ return void
+ param shadertype GLenum in value
+ param precisiontype GLenum in value
+ param range Int32 out array [2]
+ param precision Int32 out array [2]
+ category ARB_ES2_compatibility
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+DepthRangef(n, f)
+ return void
+ param n ClampedFloat32 in value
+ param f ClampedFloat32 in value
+ category ARB_ES2_compatibility
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ClearDepthf(d)
+ return void
+ param d ClampedFloat32 in value
+ category ARB_ES2_compatibility
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #96
+# ARB_get_program_binary commands
+#
+###############################################################################
+
+GetProgramBinary(program, bufSize, length, binaryFormat, binary)
+ return void
+ param program UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param binaryFormat GLenum out array [1]
+ param binary Void out array [COMPSIZE(length)]
+ category ARB_get_program_binary
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+ProgramBinary(program, binaryFormat, binary, length)
+ return void
+ param program UInt32 in value
+ param binaryFormat GLenum in value
+ param binary Void in array [length]
+ param length SizeI in value
+ category ARB_get_program_binary
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramParameteri(program, pname, value)
+ return void
+ param program UInt32 in value
+ param pname ProgramParameterPName in value
+ param value Int32 in value
+ category ARB_get_program_binary
+ version 3.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# ARB Extension #97
+# ARB_separate_shader_objects commands
+#
+###############################################################################
+
+UseProgramStages(pipeline, stages, program)
+ return void
+ param pipeline UInt32 in value
+ param stages GLbitfield in value
+ param program UInt32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ActiveShaderProgram(pipeline, program)
+ return void
+ param pipeline UInt32 in value
+ param program UInt32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+CreateShaderProgramv(type, count, strings)
+ return UInt32
+ param type GLenum in value
+ param count SizeI in value
+ param strings CharPointer in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindProgramPipeline(pipeline)
+ return void
+ param pipeline UInt32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteProgramPipelines(n, pipelines)
+ return void
+ param n SizeI in value
+ param pipelines UInt32 in array [n]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GenProgramPipelines(n, pipelines)
+ return void
+ param n SizeI in value
+ param pipelines UInt32 out array [n]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsProgramPipeline(pipeline)
+ return Boolean
+ param pipeline UInt32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+#@ ProgramParameteri also in ARB_get_program_binary
+
+GetProgramPipelineiv(pipeline, pname, params)
+ return void
+ param pipeline UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category ARB_separate_shader_objects
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1i(program, location, v0)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Int32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1iv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [1]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1f(program, location, v0)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1fv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [1]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1d(program, location, v0)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float64 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1dv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [1]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1ui(program, location, v0)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 UInt32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1uiv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [1]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2i(program, location, v0, v1)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2iv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [2]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2f(program, location, v0, v1)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2fv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [2]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2d(program, location, v0, v1)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float64 in value
+ param v1 Float64 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2dv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [2]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2ui(program, location, v0, v1)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2uiv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [2]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3i(program, location, v0, v1, v2)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ param v2 Int32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3iv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [3]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3f(program, location, v0, v1, v2)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ param v2 Float32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3fv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [3]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3d(program, location, v0, v1, v2)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float64 in value
+ param v1 Float64 in value
+ param v2 Float64 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3dv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [3]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3ui(program, location, v0, v1, v2)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ param v2 UInt32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3uiv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [3]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4i(program, location, v0, v1, v2, v3)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ param v2 Int32 in value
+ param v3 Int32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4iv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [4]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4f(program, location, v0, v1, v2, v3)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ param v2 Float32 in value
+ param v3 Float32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4fv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [4]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4d(program, location, v0, v1, v2, v3)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float64 in value
+ param v1 Float64 in value
+ param v2 Float64 in value
+ param v3 Float64 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4dv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [4]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4ui(program, location, v0, v1, v2, v3)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ param v2 UInt32 in value
+ param v3 UInt32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4uiv(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [4]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix2fv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [2]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix3fv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [3]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix4fv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [4]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix2dv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [2]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix3dv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [3]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix4dv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [4]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix2x3fv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix3x2fv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix2x4fv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix4x2fv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix3x4fv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix4x3fv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix2x3dv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix3x2dv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix2x4dv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix4x2dv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix3x4dv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix4x3dv(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ValidateProgramPipeline(pipeline)
+ return void
+ param pipeline UInt32 in value
+ category ARB_separate_shader_objects
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog)
+ return void
+ param pipeline UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param infoLog Char out array [COMPSIZE(length)]
+ category ARB_separate_shader_objects
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #98
+# ARB_shader_precision commands
+#
+###############################################################################
+
+###############################################################################
+#
+# ARB Extension #99
+# ARB_vertex_attrib_64bit commands
+#
+###############################################################################
+
+VertexAttribL1d(index, x)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ category ARB_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL2d(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ category ARB_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL3d(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category ARB_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL4d(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category ARB_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL1dv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [1]
+ category ARB_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL2dv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [2]
+ category ARB_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL3dv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [3]
+ category ARB_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL4dv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [4]
+ category ARB_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribLPointer(index, size, type, stride, pointer)
+ return void
+ param index UInt32 in value
+ param size Int32 in value
+ param type GLenum in value
+ param stride SizeI in value
+ param pointer Void in array [size]
+ category ARB_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetVertexAttribLdv(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname GLenum in value
+ param params Float64 out array [COMPSIZE(pname)]
+ category ARB_vertex_attrib_64bit
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+#@ VertexArrayVertexAttribLOffsetEXT also in EXT_vertex_attrib_64bit
+
+###############################################################################
+#
+# ARB Extension #100
+# ARB_viewport_array commands
+#
+###############################################################################
+
+ViewportArrayv(first, count, v)
+ return void
+ param first UInt32 in value
+ param count SizeI in value
+ param v Float32 in array [COMPSIZE(count)]
+ category ARB_viewport_array
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ViewportIndexedf(index, x, y, w, h)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param w Float32 in value
+ param h Float32 in value
+ category ARB_viewport_array
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ViewportIndexedfv(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [4]
+ category ARB_viewport_array
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ScissorArrayv(first, count, v)
+ return void
+ param first UInt32 in value
+ param count SizeI in value
+ param v Int32 in array [COMPSIZE(count)]
+ category ARB_viewport_array
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ScissorIndexed(index, left, bottom, width, height)
+ return void
+ param index UInt32 in value
+ param left Int32 in value
+ param bottom Int32 in value
+ param width SizeI in value
+ param height SizeI in value
+ category ARB_viewport_array
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ScissorIndexedv(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [4]
+ category ARB_viewport_array
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DepthRangeArrayv(first, count, v)
+ return void
+ param first UInt32 in value
+ param count SizeI in value
+ param v ClampedFloat64 in array [COMPSIZE(count)]
+ category ARB_viewport_array
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DepthRangeIndexed(index, n, f)
+ return void
+ param index UInt32 in value
+ param n ClampedFloat64 in value
+ param f ClampedFloat64 in value
+ category ARB_viewport_array
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetFloati_v(target, index, data)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param data Float32 out array [COMPSIZE(target)]
+ category ARB_viewport_array
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetDoublei_v(target, index, data)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param data Float64 out array [COMPSIZE(target)]
+ category ARB_viewport_array
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #101 - GLX_ARB_create_context_robustness
+# ARB Extension #102 - WGL_ARB_create_context_robustness
+#
+###############################################################################
+
+###############################################################################
+#
+# ARB Extension #103
+# ARB_cl_event commands
+#
+###############################################################################
+
+CreateSyncFromCLeventARB(context, event, flags)
+ return sync
+ param context cl_context in value
+ param event cl_event in value
+ param flags GLbitfield in value
+ category ARB_cl_event
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #104
+# ARB_debug_output commands
+#
+###############################################################################
+
+DebugMessageControlARB(source, type, severity, count, ids, enabled)
+ return void
+ param source GLenum in value
+ param type GLenum in value
+ param severity GLenum in value
+ param count SizeI in value
+ param ids UInt32 in array [count]
+ param enabled Boolean in value
+ category ARB_debug_output
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DebugMessageInsertARB(source, type, id, severity, length, buf)
+ return void
+ param source GLenum in value
+ param type GLenum in value
+ param id UInt32 in value
+ param severity GLenum in value
+ param length SizeI in value
+ param buf Char in array [length]
+ category ARB_debug_output
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DebugMessageCallbackARB(callback, userParam)
+ return void
+ param callback GLDEBUGPROCARB in value
+ param userParam Void in array [COMPSIZE(callback)]
+ category ARB_debug_output
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetDebugMessageLogARB(count, bufsize, sources, types, ids, severities, lengths, messageLog)
+ return UInt32
+ param count UInt32 in value
+ param bufsize SizeI in value
+ param sources GLenum out array [count]
+ param types GLenum out array [count]
+ param ids UInt32 out array [count]
+ param severities GLenum out array [count]
+ param lengths SizeI out array [count]
+ param messageLog Char out array [COMPSIZE(lengths)]
+ category ARB_debug_output
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+#@ GetPointerv is redeclared in this extension
+
+###############################################################################
+#
+# ARB Extension #105
+# ARB_robustness commands
+#
+###############################################################################
+
+GetGraphicsResetStatusARB()
+ return GLenum
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnMapdvARB(target, query, bufSize, v)
+ return void
+ param target GLenum in value
+ param query GLenum in value
+ param bufSize SizeI in value
+ param v Float64 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnMapfvARB(target, query, bufSize, v)
+ return void
+ param target GLenum in value
+ param query GLenum in value
+ param bufSize SizeI in value
+ param v Float32 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnMapivARB(target, query, bufSize, v)
+ return void
+ param target GLenum in value
+ param query GLenum in value
+ param bufSize SizeI in value
+ param v Int32 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnPixelMapfvARB(map, bufSize, values)
+ return void
+ param map GLenum in value
+ param bufSize SizeI in value
+ param values Float32 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnPixelMapuivARB(map, bufSize, values)
+ return void
+ param map GLenum in value
+ param bufSize SizeI in value
+ param values UInt32 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnPixelMapusvARB(map, bufSize, values)
+ return void
+ param map GLenum in value
+ param bufSize SizeI in value
+ param values UInt16 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnPolygonStippleARB(bufSize, pattern)
+ return void
+ param bufSize SizeI in value
+ param pattern UInt8 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnColorTableARB(target, format, type, bufSize, table)
+ return void
+ param target GLenum in value
+ param format GLenum in value
+ param type GLenum in value
+ param bufSize SizeI in value
+ param table Void out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnConvolutionFilterARB(target, format, type, bufSize, image)
+ return void
+ param target GLenum in value
+ param format GLenum in value
+ param type GLenum in value
+ param bufSize SizeI in value
+ param image Void out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnSeparableFilterARB(target, format, type, rowBufSize, row, columnBufSize, column, span)
+ return void
+ param target GLenum in value
+ param format GLenum in value
+ param type GLenum in value
+ param rowBufSize SizeI in value
+ param row Void out array [rowBufSize]
+ param columnBufSize SizeI in value
+ param column Void out array [columnBufSize]
+ param span Void out array [0]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnHistogramARB(target, reset, format, type, bufSize, values)
+ return void
+ param target GLenum in value
+ param reset Boolean in value
+ param format GLenum in value
+ param type GLenum in value
+ param bufSize SizeI in value
+ param values Void out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnMinmaxARB(target, reset, format, type, bufSize, values)
+ return void
+ param target GLenum in value
+ param reset Boolean in value
+ param format GLenum in value
+ param type GLenum in value
+ param bufSize SizeI in value
+ param values Void out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnTexImageARB(target, level, format, type, bufSize, img)
+ return void
+ param target GLenum in value
+ param level Int32 in value
+ param format GLenum in value
+ param type GLenum in value
+ param bufSize SizeI in value
+ param img Void out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+ReadnPixelsARB(x, y, width, height, format, type, bufSize, data)
+ return void
+ param x Int32 in value
+ param y Int32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param format GLenum in value
+ param type GLenum in value
+ param bufSize SizeI in value
+ param data Void out array [bufSize]
+ category ARB_robustness
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetnCompressedTexImageARB(target, lod, bufSize, img)
+ return void
+ param target GLenum in value
+ param lod Int32 in value
+ param bufSize SizeI in value
+ param img Void out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnUniformfvARB(program, location, bufSize, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param bufSize SizeI in value
+ param params Float32 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnUniformivARB(program, location, bufSize, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param bufSize SizeI in value
+ param params Int32 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnUniformuivARB(program, location, bufSize, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param bufSize SizeI in value
+ param params UInt32 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetnUniformdvARB(program, location, bufSize, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param bufSize SizeI in value
+ param params Float64 out array [bufSize]
+ category ARB_robustness
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# ARB Extension #106
+# ARB_shader_stencil_export commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_shader_stencil_export
+
+
+###############################################################################
+###############################################################################
+#
+# Non-ARB extensions, in order by registry extension number
+#
+###############################################################################
+###############################################################################
+
+###############################################################################
+#
+# Extension #1
+# EXT_abgr commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_abgr
+
+###############################################################################
+#
+# Extension #2
+# EXT_blend_color commands
+#
+###############################################################################
+
+BlendColorEXT(red, green, blue, alpha)
+ return void
+ param red ClampedColorF in value
+ param green ClampedColorF in value
+ param blue ClampedColorF in value
+ param alpha ClampedColorF in value
+ category EXT_blend_color
+ version 1.0
+ glxropcode 4096
+ glxflags EXT
+ extension soft
+ alias BlendColor
+
+###############################################################################
+#
+# Extension #3
+# EXT_polygon_offset commands
+#
+###############################################################################
+
+PolygonOffsetEXT(factor, bias)
+ return void
+ param factor Float32 in value
+ param bias Float32 in value
+ category EXT_polygon_offset
+ version 1.0
+ glxropcode 4098
+ glxflags EXT
+ extension soft
+ offset 414
+
+###############################################################################
+#
+# Extension #4
+# EXT_texture commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture
+
+###############################################################################
+#
+# Extension #5 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #6
+# EXT_texture3D commands
+#
+###############################################################################
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+TexImage3DEXT(target, level, internalformat, width, height, depth, border, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height/depth)]
+ category EXT_texture3D
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxropcode 4114
+ extension
+ alias TexImage3D
+
+TexSubImage3DEXT(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height/depth)]
+ category EXT_texture3D
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxropcode 4115
+ extension
+ alias TexSubImage3D
+
+###############################################################################
+#
+# Extension #7
+# SGIS_texture_filter4 commands
+#
+###############################################################################
+
+GetTexFilterFuncSGIS(target, filter, weights)
+ return void
+ param target TextureTarget in value
+ param filter TextureFilterSGIS in value
+ param weights Float32 out array [COMPSIZE(target/filter)]
+ category SGIS_texture_filter4
+ dlflags notlistable
+ version 1.0
+ glxflags SGI
+ glxvendorpriv 4101
+ extension
+ offset 415
+
+TexFilterFuncSGIS(target, filter, n, weights)
+ return void
+ param target TextureTarget in value
+ param filter TextureFilterSGIS in value
+ param n SizeI in value
+ param weights Float32 in array [n]
+ category SGIS_texture_filter4
+ glxflags SGI
+ version 1.0
+ glxropcode 2064
+ extension
+ offset 416
+
+###############################################################################
+#
+# Extension #8 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #9
+# EXT_subtexture commands
+#
+###############################################################################
+
+TexSubImage1DEXT(target, level, xoffset, width, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width)]
+ category EXT_subtexture
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxropcode 4099
+ extension
+ alias TexSubImage1D
+
+TexSubImage2DEXT(target, level, xoffset, yoffset, width, height, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height)]
+ category EXT_subtexture
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxropcode 4100
+ extension
+ alias TexSubImage2D
+
+###############################################################################
+#
+# Extension #10
+# EXT_copy_texture commands
+#
+###############################################################################
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+CopyTexImage1DEXT(target, level, internalformat, x, y, width, border)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ category EXT_copy_texture
+ version 1.0
+ glxflags EXT
+ glxropcode 4119
+ extension
+ alias CopyTexImage1D
+
+# Arguably TexelInternalFormat, not PixelInternalFormat
+CopyTexImage2DEXT(target, level, internalformat, x, y, width, height, border)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ category EXT_copy_texture
+ version 1.0
+ glxflags EXT
+ glxropcode 4120
+ extension
+ alias CopyTexImage2D
+
+CopyTexSubImage1DEXT(target, level, xoffset, x, y, width)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ category EXT_copy_texture
+ version 1.0
+ glxflags EXT
+ glxropcode 4121
+ extension
+ alias CopyTexSubImage1D
+
+CopyTexSubImage2DEXT(target, level, xoffset, yoffset, x, y, width, height)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_copy_texture
+ version 1.0
+ glxflags EXT
+ glxropcode 4122
+ extension
+ alias CopyTexSubImage2D
+
+CopyTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset, x, y, width, height)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_copy_texture
+ version 1.0
+ glxflags EXT
+ glxropcode 4123
+ extension
+ alias CopyTexSubImage3D
+
+###############################################################################
+#
+# Extension #11
+# EXT_histogram commands
+#
+###############################################################################
+
+GetHistogramEXT(target, reset, format, type, values)
+ return void
+ param target HistogramTargetEXT in value
+ param reset Boolean in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param values Void out array [COMPSIZE(target/format/type)]
+ category EXT_histogram
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxvendorpriv 5
+ extension
+ offset 417
+
+GetHistogramParameterfvEXT(target, pname, params)
+ return void
+ param target HistogramTargetEXT in value
+ param pname GetHistogramParameterPNameEXT in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category EXT_histogram
+ dlflags notlistable
+ version 1.0
+ glxvendorpriv 6
+ glxflags EXT
+ extension
+ offset 418
+
+GetHistogramParameterivEXT(target, pname, params)
+ return void
+ param target HistogramTargetEXT in value
+ param pname GetHistogramParameterPNameEXT in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_histogram
+ dlflags notlistable
+ version 1.0
+ glxvendorpriv 7
+ glxflags EXT
+ extension
+ offset 419
+
+GetMinmaxEXT(target, reset, format, type, values)
+ return void
+ param target MinmaxTargetEXT in value
+ param reset Boolean in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param values Void out array [COMPSIZE(target/format/type)]
+ category EXT_histogram
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxvendorpriv 8
+ extension
+ offset 420
+
+GetMinmaxParameterfvEXT(target, pname, params)
+ return void
+ param target MinmaxTargetEXT in value
+ param pname GetMinmaxParameterPNameEXT in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category EXT_histogram
+ dlflags notlistable
+ version 1.0
+ glxvendorpriv 9
+ glxflags EXT
+ extension
+ offset 421
+
+GetMinmaxParameterivEXT(target, pname, params)
+ return void
+ param target MinmaxTargetEXT in value
+ param pname GetMinmaxParameterPNameEXT in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_histogram
+ dlflags notlistable
+ version 1.0
+ glxvendorpriv 10
+ glxflags EXT
+ extension
+ offset 422
+
+HistogramEXT(target, width, internalformat, sink)
+ return void
+ param target HistogramTargetEXT in value
+ param width SizeI in value
+ param internalformat PixelInternalFormat in value
+ param sink Boolean in value
+ category EXT_histogram
+ version 1.0
+ glxropcode 4110
+ glxflags EXT
+ extension
+ alias Histogram
+
+MinmaxEXT(target, internalformat, sink)
+ return void
+ param target MinmaxTargetEXT in value
+ param internalformat PixelInternalFormat in value
+ param sink Boolean in value
+ category EXT_histogram
+ version 1.0
+ glxropcode 4111
+ glxflags EXT
+ extension
+ alias Minmax
+
+ResetHistogramEXT(target)
+ return void
+ param target HistogramTargetEXT in value
+ category EXT_histogram
+ version 1.0
+ glxropcode 4112
+ glxflags EXT
+ extension
+ alias ResetHistogram
+
+ResetMinmaxEXT(target)
+ return void
+ param target MinmaxTargetEXT in value
+ category EXT_histogram
+ version 1.0
+ glxropcode 4113
+ glxflags EXT
+ extension
+ alias ResetMinmax
+
+###############################################################################
+#
+# Extension #12
+# EXT_convolution commands
+#
+###############################################################################
+
+ConvolutionFilter1DEXT(target, internalformat, width, format, type, image)
+ return void
+ param target ConvolutionTargetEXT in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param image Void in array [COMPSIZE(format/type/width)]
+ category EXT_convolution
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxropcode 4101
+ extension
+ alias ConvolutionFilter1D
+
+ConvolutionFilter2DEXT(target, internalformat, width, height, format, type, image)
+ return void
+ param target ConvolutionTargetEXT in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param image Void in array [COMPSIZE(format/type/width/height)]
+ category EXT_convolution
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxropcode 4102
+ extension
+ alias ConvolutionFilter2D
+
+ConvolutionParameterfEXT(target, pname, params)
+ return void
+ param target ConvolutionTargetEXT in value
+ param pname ConvolutionParameterEXT in value
+ param params CheckedFloat32 in value
+ category EXT_convolution
+ version 1.0
+ glxropcode 4103
+ glxflags EXT
+ extension
+ alias ConvolutionParameterf
+
+ConvolutionParameterfvEXT(target, pname, params)
+ return void
+ param target ConvolutionTargetEXT in value
+ param pname ConvolutionParameterEXT in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category EXT_convolution
+ version 1.0
+ glxropcode 4104
+ glxflags EXT
+ extension
+ alias ConvolutionParameterfv
+
+ConvolutionParameteriEXT(target, pname, params)
+ return void
+ param target ConvolutionTargetEXT in value
+ param pname ConvolutionParameterEXT in value
+ param params CheckedInt32 in value
+ category EXT_convolution
+ version 1.0
+ glxropcode 4105
+ glxflags EXT
+ extension
+ alias ConvolutionParameteri
+
+ConvolutionParameterivEXT(target, pname, params)
+ return void
+ param target ConvolutionTargetEXT in value
+ param pname ConvolutionParameterEXT in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category EXT_convolution
+ version 1.0
+ glxropcode 4106
+ glxflags EXT
+ extension
+ alias ConvolutionParameteriv
+
+CopyConvolutionFilter1DEXT(target, internalformat, x, y, width)
+ return void
+ param target ConvolutionTargetEXT in value
+ param internalformat PixelInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ category EXT_convolution
+ version 1.0
+ glxropcode 4107
+ glxflags EXT
+ extension
+ alias CopyConvolutionFilter1D
+
+CopyConvolutionFilter2DEXT(target, internalformat, x, y, width, height)
+ return void
+ param target ConvolutionTargetEXT in value
+ param internalformat PixelInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_convolution
+ version 1.0
+ glxropcode 4108
+ glxflags EXT
+ extension
+ alias CopyConvolutionFilter2D
+
+GetConvolutionFilterEXT(target, format, type, image)
+ return void
+ param target ConvolutionTargetEXT in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param image Void out array [COMPSIZE(target/format/type)]
+ category EXT_convolution
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxvendorpriv 1
+ extension
+ offset 423
+
+GetConvolutionParameterfvEXT(target, pname, params)
+ return void
+ param target ConvolutionTargetEXT in value
+ param pname ConvolutionParameterEXT in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category EXT_convolution
+ dlflags notlistable
+ version 1.0
+ glxvendorpriv 2
+ glxflags EXT
+ extension
+ offset 424
+
+GetConvolutionParameterivEXT(target, pname, params)
+ return void
+ param target ConvolutionTargetEXT in value
+ param pname ConvolutionParameterEXT in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_convolution
+ dlflags notlistable
+ version 1.0
+ glxvendorpriv 3
+ glxflags EXT
+ extension
+ offset 425
+
+GetSeparableFilterEXT(target, format, type, row, column, span)
+ return void
+ param target SeparableTargetEXT in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param row Void out array [COMPSIZE(target/format/type)]
+ param column Void out array [COMPSIZE(target/format/type)]
+ param span Void out array [COMPSIZE(target/format/type)]
+ category EXT_convolution
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxvendorpriv 4
+ extension
+ offset 426
+
+SeparableFilter2DEXT(target, internalformat, width, height, format, type, row, column)
+ return void
+ param target SeparableTargetEXT in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param row Void in array [COMPSIZE(target/format/type/width)]
+ param column Void in array [COMPSIZE(target/format/type/height)]
+ category EXT_convolution
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxropcode 4109
+ extension
+ alias SeparableFilter2D
+
+###############################################################################
+#
+# Extension #13
+# SGI_color_matrix commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGI_color_matrix
+
+###############################################################################
+#
+# Extension #14
+# SGI_color_table commands
+#
+###############################################################################
+
+ColorTableSGI(target, internalformat, width, format, type, table)
+ return void
+ param target ColorTableTargetSGI in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param table Void in array [COMPSIZE(format/type/width)]
+ category SGI_color_table
+ dlflags handcode
+ glxflags client-handcode server-handcode SGI
+ version 1.0
+ glxropcode 2053
+ extension
+ alias ColorTable
+
+ColorTableParameterfvSGI(target, pname, params)
+ return void
+ param target ColorTableTargetSGI in value
+ param pname ColorTableParameterPNameSGI in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category SGI_color_table
+ version 1.0
+ glxropcode 2054
+ glxflags SGI
+ extension
+ alias ColorTableParameterfv
+
+ColorTableParameterivSGI(target, pname, params)
+ return void
+ param target ColorTableTargetSGI in value
+ param pname ColorTableParameterPNameSGI in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category SGI_color_table
+ version 1.0
+ glxropcode 2055
+ glxflags SGI
+ extension
+ alias ColorTableParameteriv
+
+CopyColorTableSGI(target, internalformat, x, y, width)
+ return void
+ param target ColorTableTargetSGI in value
+ param internalformat PixelInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ category SGI_color_table
+ version 1.0
+ glxropcode 2056
+ glxflags SGI
+ extension
+ alias CopyColorTable
+
+GetColorTableSGI(target, format, type, table)
+ return void
+ param target ColorTableTargetSGI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param table Void out array [COMPSIZE(target/format/type)]
+ category SGI_color_table
+ dlflags notlistable
+ glxflags client-handcode server-handcode SGI
+ version 1.0
+ glxvendorpriv 4098
+ extension
+ offset 427
+
+GetColorTableParameterfvSGI(target, pname, params)
+ return void
+ param target ColorTableTargetSGI in value
+ param pname GetColorTableParameterPNameSGI in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category SGI_color_table
+ dlflags notlistable
+ version 1.0
+ glxflags SGI
+ glxvendorpriv 4099
+ extension
+ offset 428
+
+GetColorTableParameterivSGI(target, pname, params)
+ return void
+ param target ColorTableTargetSGI in value
+ param pname GetColorTableParameterPNameSGI in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category SGI_color_table
+ dlflags notlistable
+ version 1.0
+ glxflags SGI
+ glxvendorpriv 4100
+ extension
+ offset 429
+
+###############################################################################
+#
+# Extension #15
+# SGIX_pixel_texture commands
+#
+###############################################################################
+
+PixelTexGenSGIX(mode)
+ return void
+ param mode PixelTexGenModeSGIX in value
+ category SGIX_pixel_texture
+ version 1.0
+ glxflags SGI
+ glxropcode 2059
+ extension
+ offset 430
+
+###############################################################################
+#
+# Extension #15 (variant)
+# SGIS_pixel_texture commands
+# Both SGIS and SGIX forms have extension #15!
+#
+###############################################################################
+
+PixelTexGenParameteriSGIS(pname, param)
+ return void
+ param pname PixelTexGenParameterNameSGIS in value
+ param param CheckedInt32 in value
+ category SGIS_pixel_texture
+ version 1.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 431
+
+PixelTexGenParameterivSGIS(pname, params)
+ return void
+ param pname PixelTexGenParameterNameSGIS in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category SGIS_pixel_texture
+ version 1.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 432
+
+PixelTexGenParameterfSGIS(pname, param)
+ return void
+ param pname PixelTexGenParameterNameSGIS in value
+ param param CheckedFloat32 in value
+ category SGIS_pixel_texture
+ version 1.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 433
+
+PixelTexGenParameterfvSGIS(pname, params)
+ return void
+ param pname PixelTexGenParameterNameSGIS in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category SGIS_pixel_texture
+ version 1.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 434
+
+GetPixelTexGenParameterivSGIS(pname, params)
+ return void
+ param pname PixelTexGenParameterNameSGIS in value
+ param params CheckedInt32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category SGIS_pixel_texture
+ version 1.0
+ extension
+ glxvendorpriv ?
+ glxflags ignore
+ offset 435
+
+GetPixelTexGenParameterfvSGIS(pname, params)
+ return void
+ param pname PixelTexGenParameterNameSGIS in value
+ param params CheckedFloat32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category SGIS_pixel_texture
+ version 1.0
+ extension
+ glxvendorpriv ?
+ glxflags ignore
+ offset 436
+
+###############################################################################
+#
+# Extension #16
+# SGIS_texture4D commands
+#
+###############################################################################
+
+TexImage4DSGIS(target, level, internalformat, width, height, depth, size4d, border, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param size4d SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height/depth/size4d)]
+ category SGIS_texture4D
+ dlflags handcode
+ glxflags client-handcode server-handcode SGI
+ version 1.0
+ glxropcode 2057
+ extension
+ offset 437
+
+TexSubImage4DSGIS(target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, pixels)
+ return void
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param woffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param size4d SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height/depth/size4d)]
+ category SGIS_texture4D
+ dlflags handcode
+ glxflags client-handcode server-handcode SGI
+ version 1.0
+ glxropcode 2058
+ extension
+ offset 438
+
+###############################################################################
+#
+# Extension #17
+# SGI_texture_color_table commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGI_texture_color_table
+
+###############################################################################
+#
+# Extension #18
+# EXT_cmyka commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_cmyka
+
+###############################################################################
+#
+# Extension #19 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #20
+# EXT_texture_object commands
+#
+###############################################################################
+
+AreTexturesResidentEXT(n, textures, residences)
+ return Boolean
+ param n SizeI in value
+ param textures Texture in array [n]
+ param residences Boolean out array [n]
+ category EXT_texture_object
+ glxflags EXT
+ glxvendorpriv 11
+ dlflags notlistable
+ version 1.0
+ extension
+ offset 439
+
+BindTextureEXT(target, texture)
+ return void
+ param target TextureTarget in value
+ param texture Texture in value
+ category EXT_texture_object
+ version 1.0
+ glxflags EXT
+ glxropcode 4117
+ extension
+ alias BindTexture
+
+DeleteTexturesEXT(n, textures)
+ return void
+ param n SizeI in value
+ param textures Texture in array [n]
+ category EXT_texture_object
+ dlflags notlistable
+ version 1.0
+ glxflags EXT
+ glxvendorpriv 12
+ extension
+ offset 561
+
+GenTexturesEXT(n, textures)
+ return void
+ param n SizeI in value
+ param textures Texture out array [n]
+ category EXT_texture_object
+ dlflags notlistable
+ version 1.0
+ glxflags EXT
+ glxvendorpriv 13
+ extension
+ offset 440
+
+IsTextureEXT(texture)
+ return Boolean
+ param texture Texture in value
+ category EXT_texture_object
+ dlflags notlistable
+ version 1.0
+ glxflags EXT
+ glxvendorpriv 14
+ extension
+ offset 441
+
+PrioritizeTexturesEXT(n, textures, priorities)
+ return void
+ param n SizeI in value
+ param textures Texture in array [n]
+ param priorities ClampedFloat32 in array [n]
+ category EXT_texture_object
+ glxflags EXT
+ version 1.0
+ glxropcode 4118
+ extension
+ alias PrioritizeTextures
+
+###############################################################################
+#
+# Extension #21
+# SGIS_detail_texture commands
+#
+###############################################################################
+
+DetailTexFuncSGIS(target, n, points)
+ return void
+ param target TextureTarget in value
+ param n SizeI in value
+ param points Float32 in array [n*2]
+ category SGIS_detail_texture
+ glxflags SGI
+ version 1.0
+ glxropcode 2051
+ extension
+ offset 442
+
+GetDetailTexFuncSGIS(target, points)
+ return void
+ param target TextureTarget in value
+ param points Float32 out array [COMPSIZE(target)]
+ category SGIS_detail_texture
+ dlflags notlistable
+ version 1.0
+ glxflags SGI
+ glxvendorpriv 4096
+ extension
+ offset 443
+
+###############################################################################
+#
+# Extension #22
+# SGIS_sharpen_texture commands
+#
+###############################################################################
+
+SharpenTexFuncSGIS(target, n, points)
+ return void
+ param target TextureTarget in value
+ param n SizeI in value
+ param points Float32 in array [n*2]
+ category SGIS_sharpen_texture
+ glxflags SGI
+ version 1.0
+ glxropcode 2052
+ extension
+ offset 444
+
+GetSharpenTexFuncSGIS(target, points)
+ return void
+ param target TextureTarget in value
+ param points Float32 out array [COMPSIZE(target)]
+ category SGIS_sharpen_texture
+ dlflags notlistable
+ version 1.0
+ glxflags SGI
+ glxvendorpriv 4097
+ extension
+ offset 445
+
+###############################################################################
+#
+# EXT_packed_pixels commands
+# Extension #23
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_packed_pixels
+
+###############################################################################
+#
+# Extension #24
+# SGIS_texture_lod commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIS_texture_lod
+
+###############################################################################
+#
+# Extension #25
+# SGIS_multisample commands
+#
+###############################################################################
+
+SampleMaskSGIS(value, invert)
+ return void
+ param value ClampedFloat32 in value
+ param invert Boolean in value
+ category SGIS_multisample
+ version 1.1
+ glxropcode 2048
+ glxflags SGI
+ extension
+ alias SampleMaskEXT
+
+SamplePatternSGIS(pattern)
+ return void
+ param pattern SamplePatternSGIS in value
+ category SGIS_multisample
+ version 1.0
+ glxropcode 2049
+ glxflags SGI
+ extension
+ alias SamplePatternEXT
+
+###############################################################################
+#
+# Extension #26 - no specification?
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #27
+# EXT_rescale_normal commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_rescale_normal
+
+###############################################################################
+#
+# Extension #28 - GLX_EXT_visual_info
+# Extension #29 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #30
+# EXT_vertex_array commands
+#
+###############################################################################
+
+ArrayElementEXT(i)
+ return void
+ param i Int32 in value
+ category EXT_vertex_array
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ extension
+ alias ArrayElement
+
+ColorPointerEXT(size, type, stride, count, pointer)
+ return void
+ param size Int32 in value
+ param type ColorPointerType in value
+ param stride SizeI in value
+ param count SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride/count)] retained
+ category EXT_vertex_array
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ extension
+ offset 448
+
+DrawArraysEXT(mode, first, count)
+ return void
+ param mode BeginMode in value
+ param first Int32 in value
+ param count SizeI in value
+ category EXT_vertex_array
+ dlflags handcode
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ glxropcode 4116
+ extension
+ alias DrawArrays
+
+EdgeFlagPointerEXT(stride, count, pointer)
+ return void
+ param stride SizeI in value
+ param count SizeI in value
+ param pointer Boolean in array [COMPSIZE(stride/count)] retained
+ category EXT_vertex_array
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ extension
+ offset 449
+
+GetPointervEXT(pname, params)
+ return void
+ param pname GetPointervPName in value
+ param params VoidPointer out array [1]
+ category EXT_vertex_array
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ extension
+ alias GetPointerv
+
+IndexPointerEXT(type, stride, count, pointer)
+ return void
+ param type IndexPointerType in value
+ param stride SizeI in value
+ param count SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride/count)] retained
+ category EXT_vertex_array
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ extension
+ offset 450
+
+NormalPointerEXT(type, stride, count, pointer)
+ return void
+ param type NormalPointerType in value
+ param stride SizeI in value
+ param count SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride/count)] retained
+ category EXT_vertex_array
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ extension
+ offset 451
+
+TexCoordPointerEXT(size, type, stride, count, pointer)
+ return void
+ param size Int32 in value
+ param type TexCoordPointerType in value
+ param stride SizeI in value
+ param count SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride/count)] retained
+ category EXT_vertex_array
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ extension
+ offset 452
+
+VertexPointerEXT(size, type, stride, count, pointer)
+ return void
+ param size Int32 in value
+ param type VertexPointerType in value
+ param stride SizeI in value
+ param count SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride/count)] retained
+ category EXT_vertex_array
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.0
+ extension
+ offset 453
+
+###############################################################################
+#
+# Extension #31
+# EXT_misc_attribute commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_misc_attribute
+
+###############################################################################
+#
+# Extension #32
+# SGIS_generate_mipmap commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIS_generate_mipmap
+
+###############################################################################
+#
+# Extension #33
+# SGIX_clipmap commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_clipmap
+
+###############################################################################
+#
+# Extension #34
+# SGIX_shadow commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_shadow
+
+###############################################################################
+#
+# Extension #35
+# SGIS_texture_edge_clamp commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIS_texture_edge_clamp
+
+###############################################################################
+#
+# Extension #36
+# SGIS_texture_border_clamp commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIS_texture_border_clamp
+
+###############################################################################
+#
+# Extension #37
+# EXT_blend_minmax commands
+#
+###############################################################################
+
+BlendEquationEXT(mode)
+ return void
+ param mode BlendEquationModeEXT in value
+ category EXT_blend_minmax
+ version 1.0
+ glxropcode 4097
+ glxflags EXT
+ extension soft
+ alias BlendEquation
+
+###############################################################################
+#
+# Extension #38
+# EXT_blend_subtract commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_blend_subtract
+
+###############################################################################
+#
+# Extension #39
+# EXT_blend_logic_op commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_blend_logic_op
+
+###############################################################################
+#
+# Extension #40 - GLX_SGI_swap_control
+# Extension #41 - GLX_SGI_video_sync
+# Extension #42 - GLX_SGI_make_current_read
+# Extension #43 - GLX_SGIX_video_source
+# Extension #44 - GLX_EXT_visual_rating
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #45
+# SGIX_interlace commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_interlace
+
+###############################################################################
+#
+# Extension #46
+# SGIX_pixel_tiles commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_pixel_tiles
+
+###############################################################################
+#
+# Extension #47 - GLX_EXT_import_context
+# Extension #48 - skipped
+# Extension #49 - GLX_SGIX_fbconfig
+# Extension #50 - GLX_SGIX_pbuffer
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #51
+# SGIX_texture_select commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_texture_select
+
+###############################################################################
+#
+# Extension #52
+# SGIX_sprite commands
+#
+###############################################################################
+
+SpriteParameterfSGIX(pname, param)
+ return void
+ param pname SpriteParameterNameSGIX in value
+ param param CheckedFloat32 in value
+ category SGIX_sprite
+ version 1.0
+ glxflags SGI
+ glxropcode 2060
+ extension
+ offset 454
+
+SpriteParameterfvSGIX(pname, params)
+ return void
+ param pname SpriteParameterNameSGIX in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category SGIX_sprite
+ version 1.0
+ glxflags SGI
+ glxropcode 2061
+ extension
+ offset 455
+
+SpriteParameteriSGIX(pname, param)
+ return void
+ param pname SpriteParameterNameSGIX in value
+ param param CheckedInt32 in value
+ category SGIX_sprite
+ version 1.0
+ glxflags SGI
+ glxropcode 2062
+ extension
+ offset 456
+
+SpriteParameterivSGIX(pname, params)
+ return void
+ param pname SpriteParameterNameSGIX in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category SGIX_sprite
+ version 1.0
+ glxflags SGI
+ glxropcode 2063
+ extension
+ offset 457
+
+###############################################################################
+#
+# Extension #53
+# SGIX_texture_multi_buffer commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_texture_multi_buffer
+
+###############################################################################
+#
+# Extension #54
+# EXT_point_parameters / SGIS_point_parameters commands
+#
+###############################################################################
+
+PointParameterfEXT(pname, param)
+ return void
+ param pname PointParameterNameARB in value
+ param param CheckedFloat32 in value
+ category EXT_point_parameters
+ version 1.0
+ glxflags SGI
+ extension
+ alias PointParameterfARB
+
+PointParameterfvEXT(pname, params)
+ return void
+ param pname PointParameterNameARB in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category EXT_point_parameters
+ version 1.0
+ glxflags SGI
+ extension
+ alias PointParameterfvARB
+
+PointParameterfSGIS(pname, param)
+ return void
+ param pname PointParameterNameARB in value
+ param param CheckedFloat32 in value
+ category SGIS_point_parameters
+ version 1.0
+ glxflags SGI
+ extension
+ alias PointParameterfARB
+
+PointParameterfvSGIS(pname, params)
+ return void
+ param pname PointParameterNameARB in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category SGIS_point_parameters
+ version 1.0
+ glxflags SGI
+ extension
+ alias PointParameterfvARB
+
+###############################################################################
+#
+# Extension #55
+# SGIX_instruments commands
+#
+###############################################################################
+
+GetInstrumentsSGIX()
+ return Int32
+ dlflags notlistable
+ category SGIX_instruments
+ version 1.0
+ glxflags SGI
+ glxvendorpriv 4102
+ extension
+ offset 460
+
+InstrumentsBufferSGIX(size, buffer)
+ return void
+ param size SizeI in value
+ param buffer Int32 out array [size] retained
+ dlflags notlistable
+ category SGIX_instruments
+ version 1.0
+ glxflags SGI
+ glxvendorpriv 4103
+ extension
+ offset 461
+
+PollInstrumentsSGIX(marker_p)
+ return Int32
+ param marker_p Int32 out array [1]
+ dlflags notlistable
+ category SGIX_instruments
+ version 1.0
+ glxflags SGI
+ glxvendorpriv 4104
+ extension
+ offset 462
+
+ReadInstrumentsSGIX(marker)
+ return void
+ param marker Int32 in value
+ category SGIX_instruments
+ version 1.0
+ glxflags SGI
+ glxropcode 2077
+ extension
+ offset 463
+
+StartInstrumentsSGIX()
+ return void
+ category SGIX_instruments
+ version 1.0
+ glxflags SGI
+ glxropcode 2069
+ extension
+ offset 464
+
+StopInstrumentsSGIX(marker)
+ return void
+ param marker Int32 in value
+ category SGIX_instruments
+ version 1.0
+ glxflags SGI
+ glxropcode 2070
+ extension
+ offset 465
+
+###############################################################################
+#
+# Extension #56
+# SGIX_texture_scale_bias commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_texture_scale_bias
+
+###############################################################################
+#
+# Extension #57
+# SGIX_framezoom commands
+#
+###############################################################################
+
+FrameZoomSGIX(factor)
+ return void
+ param factor CheckedInt32 in value
+ category SGIX_framezoom
+ version 1.0
+ glxflags SGI
+ glxropcode 2072
+ extension
+ offset 466
+
+###############################################################################
+#
+# Extension #58
+# SGIX_tag_sample_buffer commands
+#
+###############################################################################
+
+TagSampleBufferSGIX()
+ return void
+ category SGIX_tag_sample_buffer
+ version 1.0
+ glxropcode 2050
+ glxflags SGI
+ extension
+ offset 467
+
+###############################################################################
+#
+# Extension #59
+# SGIX_polynomial_ffd commands
+#
+###############################################################################
+
+DeformationMap3dSGIX(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points)
+ return void
+ param target FfdTargetSGIX in value
+ param u1 CoordD in value
+ param u2 CoordD in value
+ param ustride Int32 in value
+ param uorder CheckedInt32 in value
+ param v1 CoordD in value
+ param v2 CoordD in value
+ param vstride Int32 in value
+ param vorder CheckedInt32 in value
+ param w1 CoordD in value
+ param w2 CoordD in value
+ param wstride Int32 in value
+ param worder CheckedInt32 in value
+ param points CoordD in array [COMPSIZE(target/ustride/uorder/vstride/vorder/wstride/worder)]
+ dlflags handcode
+ category SGIX_polynomial_ffd
+ version 1.0
+ glxflags SGI ignore
+ glxropcode 2073
+ extension
+ offset ?
+
+DeformationMap3fSGIX(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points)
+ return void
+ param target FfdTargetSGIX in value
+ param u1 CoordF in value
+ param u2 CoordF in value
+ param ustride Int32 in value
+ param uorder CheckedInt32 in value
+ param v1 CoordF in value
+ param v2 CoordF in value
+ param vstride Int32 in value
+ param vorder CheckedInt32 in value
+ param w1 CoordF in value
+ param w2 CoordF in value
+ param wstride Int32 in value
+ param worder CheckedInt32 in value
+ param points CoordF in array [COMPSIZE(target/ustride/uorder/vstride/vorder/wstride/worder)]
+ category SGIX_polynomial_ffd
+ dlflags handcode
+ version 1.0
+ glxflags SGI ignore
+ glxropcode 2074
+ extension
+ offset ?
+
+DeformSGIX(mask)
+ return void
+ param mask FfdMaskSGIX in value
+ category SGIX_polynomial_ffd
+ version 1.0
+ glxflags SGI ignore
+ glxropcode 2075
+ extension
+ offset ?
+
+LoadIdentityDeformationMapSGIX(mask)
+ return void
+ param mask FfdMaskSGIX in value
+ category SGIX_polynomial_ffd
+ version 1.0
+ glxflags SGI ignore
+ glxropcode 2076
+ extension
+ offset ?
+
+###############################################################################
+#
+# Extension #60
+# SGIX_reference_plane commands
+#
+###############################################################################
+
+ReferencePlaneSGIX(equation)
+ return void
+ param equation Float64 in array [4]
+ category SGIX_reference_plane
+ version 1.0
+ glxflags SGI
+ glxropcode 2071
+ extension
+ offset 468
+
+###############################################################################
+#
+# Extension #61
+# SGIX_flush_raster commands
+#
+###############################################################################
+
+FlushRasterSGIX()
+ return void
+ category SGIX_flush_raster
+ version 1.0
+ dlflags notlistable
+ glxflags SGI
+ glxvendorpriv 4105
+ extension
+ offset 469
+
+###############################################################################
+#
+# Extension #62 - GLX_SGIX_cushion
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #63
+# SGIX_depth_texture commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_depth_texture
+
+###############################################################################
+#
+# Extension #64
+# SGIS_fog_function commands
+#
+###############################################################################
+
+FogFuncSGIS(n, points)
+ return void
+ param n SizeI in value
+ param points Float32 in array [n*2]
+ category SGIS_fog_function
+ version 1.1
+ glxflags SGI
+ glxropcode 2067
+ extension
+ offset
+
+# Need to insert GLX information
+GetFogFuncSGIS(points)
+ return void
+ param points Float32 out array [COMPSIZE()]
+ category SGIS_fog_function
+ version 1.1
+ dlflags notlistable
+ glxflags ignore
+ extension
+ offset
+
+###############################################################################
+#
+# Extension #65
+# SGIX_fog_offset commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_fog_offset
+
+###############################################################################
+#
+# Extension #66
+# HP_image_transform commands
+#
+###############################################################################
+
+ImageTransformParameteriHP(target, pname, param)
+ return void
+ param target ImageTransformTargetHP in value
+ param pname ImageTransformPNameHP in value
+ param param Int32 in value
+ category HP_image_transform
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ImageTransformParameterfHP(target, pname, param)
+ return void
+ param target ImageTransformTargetHP in value
+ param pname ImageTransformPNameHP in value
+ param param Float32 in value
+ category HP_image_transform
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ImageTransformParameterivHP(target, pname, params)
+ return void
+ param target ImageTransformTargetHP in value
+ param pname ImageTransformPNameHP in value
+ param params Int32 in array [COMPSIZE(pname)]
+ category HP_image_transform
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ImageTransformParameterfvHP(target, pname, params)
+ return void
+ param target ImageTransformTargetHP in value
+ param pname ImageTransformPNameHP in value
+ param params Float32 in array [COMPSIZE(pname)]
+ category HP_image_transform
+ version 1.1
+ glxropcode ?
+ offset ?
+
+GetImageTransformParameterivHP(target, pname, params)
+ return void
+ param target ImageTransformTargetHP in value
+ param pname ImageTransformPNameHP in value
+ param params Int32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category HP_image_transform
+ version 1.1
+ glxropcode ?
+ offset ?
+
+GetImageTransformParameterfvHP(target, pname, params)
+ return void
+ param target ImageTransformTargetHP in value
+ param pname ImageTransformPNameHP in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category HP_image_transform
+ version 1.1
+ glxropcode ?
+ offset ?
+
+###############################################################################
+#
+# Extension #67
+# HP_convolution_border_modes commands
+#
+###############################################################################
+
+# (none)
+newcategory: HP_convolution_border_modes
+
+###############################################################################
+#
+# Extension #68
+# INGR_palette_buffer commands
+#
+###############################################################################
+
+#@ (Intergraph hasn't provided a spec)
+
+###############################################################################
+#
+# Extension #69
+# SGIX_texture_add_env commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_texture_add_env
+
+###############################################################################
+#
+# Extension #70 - skipped
+# Extension #71 - skipped
+# Extension #72 - skipped
+# Extension #73 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #74
+# EXT_color_subtable commands
+#
+# This was probably never actually shipped as an EXT - just written up as a
+# reference for OpenGL 1.2 ARB_imaging.
+#
+###############################################################################
+
+ColorSubTableEXT(target, start, count, format, type, data)
+ return void
+ param target ColorTableTarget in value
+ param start SizeI in value
+ param count SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param data Void in array [COMPSIZE(format/type/count)]
+ category EXT_color_subtable
+ version 1.2
+ alias ColorSubTable
+
+CopyColorSubTableEXT(target, start, x, y, width)
+ return void
+ param target ColorTableTarget in value
+ param start SizeI in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ category EXT_color_subtable
+ version 1.2
+ alias CopyColorSubTable
+
+###############################################################################
+#
+# Extension #75 - GLU_EXT_object_space_tess
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #76
+# PGI_vertex_hints commands
+#
+###############################################################################
+
+# (none)
+newcategory: PGI_vertex_hints
+
+###############################################################################
+#
+# Extension #77
+# PGI_misc_hints commands
+#
+###############################################################################
+
+HintPGI(target, mode)
+ return void
+ param target HintTargetPGI in value
+ param mode Int32 in value
+ category PGI_misc_hints
+ version 1.1
+ offset 544
+
+###############################################################################
+#
+# Extension #78
+# EXT_paletted_texture commands
+#
+###############################################################################
+
+ColorTableEXT(target, internalFormat, width, format, type, table)
+ return void
+ param target ColorTableTarget in value
+ param internalFormat PixelInternalFormat in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param table Void in array [COMPSIZE(format/type/width)]
+ category EXT_paletted_texture
+ version 1.1
+ alias ColorTable
+
+GetColorTableEXT(target, format, type, data)
+ return void
+ param target ColorTableTarget in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param data Void out array [COMPSIZE(target/format/type)]
+ category EXT_paletted_texture
+ version 1.1
+ offset 550
+
+GetColorTableParameterivEXT(target, pname, params)
+ return void
+ param target ColorTableTarget in value
+ param pname GetColorTableParameterPName in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_paletted_texture
+ version 1.1
+ offset 551
+
+GetColorTableParameterfvEXT(target, pname, params)
+ return void
+ param target ColorTableTarget in value
+ param pname GetColorTableParameterPName in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category EXT_paletted_texture
+ version 1.1
+ offset 552
+
+###############################################################################
+#
+# Extension #79
+# EXT_clip_volume_hint commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_clip_volume_hint
+
+###############################################################################
+#
+# Extension #80
+# SGIX_list_priority commands
+#
+###############################################################################
+
+# @@@ Needs vendorpriv opcodes assigned
+GetListParameterfvSGIX(list, pname, params)
+ return void
+ param list List in value
+ param pname ListParameterName in value
+ param params CheckedFloat32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ glxflags ignore
+ category SGIX_list_priority
+ version 1.0
+ glxvendorpriv ?
+ extension
+ offset 470
+
+# @@@ Needs vendorpriv opcodes assigned
+GetListParameterivSGIX(list, pname, params)
+ return void
+ param list List in value
+ param pname ListParameterName in value
+ param params CheckedInt32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ glxflags ignore
+ category SGIX_list_priority
+ version 1.0
+ glxvendorpriv ?
+ extension
+ offset 471
+
+ListParameterfSGIX(list, pname, param)
+ return void
+ param list List in value
+ param pname ListParameterName in value
+ param param CheckedFloat32 in value
+ dlflags notlistable
+ glxflags ignore
+ category SGIX_list_priority
+ version 1.0
+ glxropcode 2078
+ extension
+ offset 472
+
+ListParameterfvSGIX(list, pname, params)
+ return void
+ param list List in value
+ param pname ListParameterName in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ dlflags notlistable
+ glxflags ignore
+ category SGIX_list_priority
+ version 1.0
+ glxropcode 2079
+ extension
+ offset 473
+
+ListParameteriSGIX(list, pname, param)
+ return void
+ param list List in value
+ param pname ListParameterName in value
+ param param CheckedInt32 in value
+ dlflags notlistable
+ glxflags ignore
+ category SGIX_list_priority
+ version 1.0
+ glxropcode 2080
+ extension
+ offset 474
+
+ListParameterivSGIX(list, pname, params)
+ return void
+ param list List in value
+ param pname ListParameterName in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ dlflags notlistable
+ glxflags ignore
+ category SGIX_list_priority
+ version 1.0
+ glxropcode 2081
+ extension
+ offset 475
+
+###############################################################################
+#
+# Extension #81
+# SGIX_ir_instrument1 commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_ir_instrument1
+
+###############################################################################
+#
+# Extension #82
+# SGIX_calligraphic_fragment commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_calligraphic_fragment
+
+###############################################################################
+#
+# Extension #83 - GLX_SGIX_video_resize
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #84
+# SGIX_texture_lod_bias commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_texture_lod_bias
+
+###############################################################################
+#
+# Extension #85 - skipped
+# Extension #86 - GLX_SGIX_dmbuffer
+# Extension #87 - skipped
+# Extension #88 - skipped
+# Extension #89 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #90
+# SGIX_shadow_ambient commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_shadow_ambient
+
+###############################################################################
+#
+# Extension #91 - GLX_SGIX_swap_group
+# Extension #92 - GLX_SGIX_swap_barrier
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #93
+# EXT_index_texture commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_index_texture
+
+###############################################################################
+#
+# Extension #94
+# EXT_index_material commands
+#
+###############################################################################
+
+IndexMaterialEXT(face, mode)
+ return void
+ param face MaterialFace in value
+ param mode IndexMaterialParameterEXT in value
+ category EXT_index_material
+ version 1.1
+ extension soft
+ glxflags ignore
+ offset 538
+
+###############################################################################
+#
+# Extension #95
+# EXT_index_func commands
+#
+###############################################################################
+
+IndexFuncEXT(func, ref)
+ return void
+ param func IndexFunctionEXT in value
+ param ref ClampedFloat32 in value
+ category EXT_index_func
+ version 1.1
+ extension soft
+ glxflags ignore
+ offset 539
+
+###############################################################################
+#
+# Extension #96
+# EXT_index_array_formats commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_index_array_formats
+
+###############################################################################
+#
+# Extension #97
+# EXT_compiled_vertex_array commands
+#
+###############################################################################
+
+LockArraysEXT(first, count)
+ return void
+ param first Int32 in value
+ param count SizeI in value
+ category EXT_compiled_vertex_array
+ version 1.1
+ dlflags notlistable
+ extension soft
+ glxflags ignore
+ offset 540
+
+UnlockArraysEXT()
+ return void
+ category EXT_compiled_vertex_array
+ version 1.1
+ dlflags notlistable
+ extension soft
+ glxflags ignore
+ offset 541
+
+###############################################################################
+#
+# Extension #98
+# EXT_cull_vertex commands
+#
+###############################################################################
+
+CullParameterdvEXT(pname, params)
+ return void
+ param pname CullParameterEXT in value
+ param params Float64 out array [4]
+ category EXT_cull_vertex
+ version 1.1
+ dlflags notlistable
+ extension soft
+ glxflags ignore
+ offset 542
+
+CullParameterfvEXT(pname, params)
+ return void
+ param pname CullParameterEXT in value
+ param params Float32 out array [4]
+ category EXT_cull_vertex
+ version 1.1
+ dlflags notlistable
+ extension soft
+ glxflags ignore
+ offset 543
+
+###############################################################################
+#
+# Extension #99 - skipped
+# Extension #100 - GLU_EXT_nurbs_tessellator
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #101
+# SGIX_ycrcb commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_ycrcb
+
+###############################################################################
+#
+# Extension #102
+# SGIX_fragment_lighting commands
+#
+###############################################################################
+
+FragmentColorMaterialSGIX(face, mode)
+ return void
+ param face MaterialFace in value
+ param mode MaterialParameter in value
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 476
+
+FragmentLightfSGIX(light, pname, param)
+ return void
+ param light FragmentLightNameSGIX in value
+ param pname FragmentLightParameterSGIX in value
+ param param CheckedFloat32 in value
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 477
+
+FragmentLightfvSGIX(light, pname, params)
+ return void
+ param light FragmentLightNameSGIX in value
+ param pname FragmentLightParameterSGIX in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 478
+
+FragmentLightiSGIX(light, pname, param)
+ return void
+ param light FragmentLightNameSGIX in value
+ param pname FragmentLightParameterSGIX in value
+ param param CheckedInt32 in value
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 479
+
+FragmentLightivSGIX(light, pname, params)
+ return void
+ param light FragmentLightNameSGIX in value
+ param pname FragmentLightParameterSGIX in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 480
+
+FragmentLightModelfSGIX(pname, param)
+ return void
+ param pname FragmentLightModelParameterSGIX in value
+ param param CheckedFloat32 in value
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 481
+
+FragmentLightModelfvSGIX(pname, params)
+ return void
+ param pname FragmentLightModelParameterSGIX in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 482
+
+FragmentLightModeliSGIX(pname, param)
+ return void
+ param pname FragmentLightModelParameterSGIX in value
+ param param CheckedInt32 in value
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 483
+
+FragmentLightModelivSGIX(pname, params)
+ return void
+ param pname FragmentLightModelParameterSGIX in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 484
+
+FragmentMaterialfSGIX(face, pname, param)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param param CheckedFloat32 in value
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 485
+
+FragmentMaterialfvSGIX(face, pname, params)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 486
+
+FragmentMaterialiSGIX(face, pname, param)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param param CheckedInt32 in value
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 487
+
+FragmentMaterialivSGIX(face, pname, params)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 488
+
+GetFragmentLightfvSGIX(light, pname, params)
+ return void
+ param light FragmentLightNameSGIX in value
+ param pname FragmentLightParameterSGIX in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category SGIX_fragment_lighting
+ dlflags notlistable
+ glxflags ignore
+ version 1.0
+ extension
+ offset 489
+
+GetFragmentLightivSGIX(light, pname, params)
+ return void
+ param light FragmentLightNameSGIX in value
+ param pname FragmentLightParameterSGIX in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category SGIX_fragment_lighting
+ dlflags notlistable
+ glxflags ignore
+ version 1.0
+ extension
+ offset 490
+
+GetFragmentMaterialfvSGIX(face, pname, params)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category SGIX_fragment_lighting
+ dlflags notlistable
+ glxflags ignore
+ version 1.0
+ extension
+ offset 491
+
+GetFragmentMaterialivSGIX(face, pname, params)
+ return void
+ param face MaterialFace in value
+ param pname MaterialParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category SGIX_fragment_lighting
+ dlflags notlistable
+ glxflags ignore
+ version 1.0
+ extension
+ offset 492
+
+LightEnviSGIX(pname, param)
+ return void
+ param pname LightEnvParameterSGIX in value
+ param param CheckedInt32 in value
+ category SGIX_fragment_lighting
+ glxflags ignore
+ version 1.0
+ extension
+ offset 493
+
+###############################################################################
+#
+# Extension #103 - skipped
+# Extension #104 - skipped
+# Extension #105 - skipped
+# Extension #106 - skipped
+# Extension #107 - skipped
+# Extension #108 - skipped
+# Extension #109 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #110
+# IBM_rasterpos_clip commands
+#
+###############################################################################
+
+# (none)
+newcategory: IBM_rasterpos_clip
+
+###############################################################################
+#
+# Extension #111
+# HP_texture_lighting commands
+#
+###############################################################################
+
+# (none)
+newcategory: HP_texture_lighting
+
+###############################################################################
+#
+# Extension #112
+# EXT_draw_range_elements commands
+#
+###############################################################################
+
+# Spec entries to be written
+DrawRangeElementsEXT(mode, start, end, count, type, indices)
+ return void
+ param mode BeginMode in value
+ param start UInt32 in value
+ param end UInt32 in value
+ param count SizeI in value
+ param type DrawElementsType in value
+ param indices Void in array [COMPSIZE(count/type)]
+ category EXT_draw_range_elements
+ dlflags handcode
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ alias DrawRangeElements
+
+###############################################################################
+#
+# Extension #113
+# WIN_phong_shading commands
+#
+###############################################################################
+
+# (none)
+newcategory: WIN_phong_shading
+
+###############################################################################
+#
+# Extension #114
+# WIN_specular_fog commands
+#
+###############################################################################
+
+# (none)
+newcategory: WIN_specular_fog
+
+###############################################################################
+#
+# Extension #115 - skipped
+# Extension #116 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #117
+# EXT_light_texture commands
+#
+###############################################################################
+
+# Spec entries to be written
+ApplyTextureEXT(mode)
+ return void
+ param mode LightTextureModeEXT in value
+ category EXT_light_texture
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TextureLightEXT(pname)
+ return void
+ param pname LightTexturePNameEXT in value
+ category EXT_light_texture
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TextureMaterialEXT(face, mode)
+ return void
+ param face MaterialFace in value
+ param mode MaterialParameter in value
+ category EXT_light_texture
+ version 1.1
+ glxropcode ?
+ offset ?
+
+###############################################################################
+#
+# Extension #118 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #119
+# SGIX_blend_alpha_minmax commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_blend_alpha_minmax
+
+###############################################################################
+#
+# Extension #120 - skipped
+# Extension #121 - skipped
+# Extension #122 - skipped
+# Extension #123 - skipped
+# Extension #124 - skipped
+# Extension #125 - skipped
+# Extension #126 - skipped
+# Extension #127 - skipped
+# Extension #128 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #129
+# EXT_bgra commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_bgra
+
+###############################################################################
+#
+# Extension #130 - skipped
+# Extension #131 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #132
+# SGIX_async commands
+#
+###############################################################################
+
+AsyncMarkerSGIX(marker)
+ return void
+ param marker UInt32 in value
+ category SGIX_async
+ version 1.0
+ glxflags ignore
+ extension
+ offset ?
+
+FinishAsyncSGIX(markerp)
+ return Int32
+ param markerp UInt32 out array [1]
+ category SGIX_async
+ version 1.0
+ dlflags notlistable
+ glxflags ignore
+ extension
+ offset ?
+
+PollAsyncSGIX(markerp)
+ return Int32
+ param markerp UInt32 out array [1]
+ category SGIX_async
+ version 1.0
+ dlflags notlistable
+ glxflags ignore
+ extension
+ offset ?
+
+GenAsyncMarkersSGIX(range)
+ return UInt32
+ param range SizeI in value
+ category SGIX_async
+ version 1.0
+ dlflags notlistable
+ glxflags ignore
+ extension
+ offset ?
+
+DeleteAsyncMarkersSGIX(marker, range)
+ return void
+ param marker UInt32 in value
+ param range SizeI in value
+ category SGIX_async
+ version 1.0
+ dlflags notlistable
+ glxflags ignore
+ extension
+ offset ?
+
+IsAsyncMarkerSGIX(marker)
+ return Boolean
+ param marker UInt32 in value
+ category SGIX_async
+ version 1.0
+ dlflags notlistable
+ glxflags ignore
+ extension
+ offset ?
+
+###############################################################################
+#
+# Extension #133
+# SGIX_async_pixel commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_async_pixel
+
+###############################################################################
+#
+# Extension #134
+# SGIX_async_histogram commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_async_histogram
+
+###############################################################################
+#
+# Extension #135 - skipped (INTEL_texture_scissor was never implemented)
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #136
+# INTEL_parallel_arrays commands
+#
+###############################################################################
+
+VertexPointervINTEL(size, type, pointer)
+ return void
+ param size Int32 in value
+ param type VertexPointerType in value
+ param pointer VoidPointer in array [4] retained
+ category INTEL_parallel_arrays
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.1
+ offset ?
+
+NormalPointervINTEL(type, pointer)
+ return void
+ param type NormalPointerType in value
+ param pointer VoidPointer in array [4] retained
+ category INTEL_parallel_arrays
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.1
+ offset ?
+
+ColorPointervINTEL(size, type, pointer)
+ return void
+ param size Int32 in value
+ param type VertexPointerType in value
+ param pointer VoidPointer in array [4] retained
+ category INTEL_parallel_arrays
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.1
+ offset ?
+
+TexCoordPointervINTEL(size, type, pointer)
+ return void
+ param size Int32 in value
+ param type VertexPointerType in value
+ param pointer VoidPointer in array [4] retained
+ category INTEL_parallel_arrays
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.1
+ offset ?
+
+
+###############################################################################
+#
+# Extension #137
+# HP_occlusion_test commands
+#
+###############################################################################
+
+# (none)
+newcategory: HP_occlusion_test
+
+###############################################################################
+#
+# Extension #138
+# EXT_pixel_transform commands
+#
+###############################################################################
+
+PixelTransformParameteriEXT(target, pname, param)
+ return void
+ param target PixelTransformTargetEXT in value
+ param pname PixelTransformPNameEXT in value
+ param param Int32 in value
+ category EXT_pixel_transform
+ version 1.1
+ glxropcode ?
+ offset ?
+
+PixelTransformParameterfEXT(target, pname, param)
+ return void
+ param target PixelTransformTargetEXT in value
+ param pname PixelTransformPNameEXT in value
+ param param Float32 in value
+ category EXT_pixel_transform
+ version 1.1
+ glxropcode ?
+ offset ?
+
+PixelTransformParameterivEXT(target, pname, params)
+ return void
+ param target PixelTransformTargetEXT in value
+ param pname PixelTransformPNameEXT in value
+ param params Int32 in array [1]
+ category EXT_pixel_transform
+ version 1.1
+ glxropcode ?
+ offset ?
+
+PixelTransformParameterfvEXT(target, pname, params)
+ return void
+ param target PixelTransformTargetEXT in value
+ param pname PixelTransformPNameEXT in value
+ param params Float32 in array [1]
+ category EXT_pixel_transform
+ version 1.1
+ glxropcode ?
+ offset ?
+
+###############################################################################
+#
+# Extension #139
+# EXT_pixel_transform_color_table commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_pixel_transform_color_table
+
+###############################################################################
+#
+# Extension #140 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #141
+# EXT_shared_texture_palette commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_shared_texture_palette
+
+###############################################################################
+#
+# Extension #142 - GLX_SGIS_blended_overlay
+# Extension #143 - GLX_SGIS_shared_multisample
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #144
+# EXT_separate_specular_color commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_separate_specular_color
+
+###############################################################################
+#
+# Extension #145
+# EXT_secondary_color commands
+#
+###############################################################################
+
+SecondaryColor3bEXT(red, green, blue)
+ return void
+ param red ColorB in value
+ param green ColorB in value
+ param blue ColorB in value
+ category EXT_secondary_color
+ vectorequiv SecondaryColor3bvEXT
+ version 1.1
+ alias SecondaryColor3b
+
+SecondaryColor3bvEXT(v)
+ return void
+ param v ColorB in array [3]
+ category EXT_secondary_color
+ version 1.1
+ glxropcode 4126
+ alias SecondaryColor3bv
+
+SecondaryColor3dEXT(red, green, blue)
+ return void
+ param red ColorD in value
+ param green ColorD in value
+ param blue ColorD in value
+ category EXT_secondary_color
+ vectorequiv SecondaryColor3dvEXT
+ version 1.1
+ alias SecondaryColor3d
+
+SecondaryColor3dvEXT(v)
+ return void
+ param v ColorD in array [3]
+ category EXT_secondary_color
+ version 1.1
+ glxropcode 4130
+ alias SecondaryColor3dv
+
+SecondaryColor3fEXT(red, green, blue)
+ return void
+ param red ColorF in value
+ param green ColorF in value
+ param blue ColorF in value
+ category EXT_secondary_color
+ vectorequiv SecondaryColor3fvEXT
+ version 1.1
+ alias SecondaryColor3f
+
+SecondaryColor3fvEXT(v)
+ return void
+ param v ColorF in array [3]
+ category EXT_secondary_color
+ version 1.1
+ glxropcode 4129
+ alias SecondaryColor3fv
+
+SecondaryColor3iEXT(red, green, blue)
+ return void
+ param red ColorI in value
+ param green ColorI in value
+ param blue ColorI in value
+ category EXT_secondary_color
+ vectorequiv SecondaryColor3ivEXT
+ version 1.1
+ alias SecondaryColor3i
+
+SecondaryColor3ivEXT(v)
+ return void
+ param v ColorI in array [3]
+ category EXT_secondary_color
+ version 1.1
+ glxropcode 4128
+ offset 568
+ alias SecondaryColor3iv
+
+SecondaryColor3sEXT(red, green, blue)
+ return void
+ param red ColorS in value
+ param green ColorS in value
+ param blue ColorS in value
+ category EXT_secondary_color
+ vectorequiv SecondaryColor3svEXT
+ version 1.1
+ alias SecondaryColor3s
+
+SecondaryColor3svEXT(v)
+ return void
+ param v ColorS in array [3]
+ category EXT_secondary_color
+ version 1.1
+ glxropcode 4127
+ alias SecondaryColor3sv
+
+SecondaryColor3ubEXT(red, green, blue)
+ return void
+ param red ColorUB in value
+ param green ColorUB in value
+ param blue ColorUB in value
+ category EXT_secondary_color
+ vectorequiv SecondaryColor3ubvEXT
+ version 1.1
+ alias SecondaryColor3ub
+
+SecondaryColor3ubvEXT(v)
+ return void
+ param v ColorUB in array [3]
+ category EXT_secondary_color
+ version 1.1
+ glxropcode 4131
+ alias SecondaryColor3ubv
+
+SecondaryColor3uiEXT(red, green, blue)
+ return void
+ param red ColorUI in value
+ param green ColorUI in value
+ param blue ColorUI in value
+ category EXT_secondary_color
+ vectorequiv SecondaryColor3uivEXT
+ version 1.1
+ alias SecondaryColor3ui
+
+SecondaryColor3uivEXT(v)
+ return void
+ param v ColorUI in array [3]
+ category EXT_secondary_color
+ version 1.1
+ glxropcode 4133
+ alias SecondaryColor3uiv
+
+SecondaryColor3usEXT(red, green, blue)
+ return void
+ param red ColorUS in value
+ param green ColorUS in value
+ param blue ColorUS in value
+ category EXT_secondary_color
+ vectorequiv SecondaryColor3usvEXT
+ version 1.1
+ alias SecondaryColor3us
+
+SecondaryColor3usvEXT(v)
+ return void
+ param v ColorUS in array [3]
+ category EXT_secondary_color
+ version 1.1
+ glxropcode 4132
+ alias SecondaryColor3usv
+
+SecondaryColorPointerEXT(size, type, stride, pointer)
+ return void
+ param size Int32 in value
+ param type ColorPointerType in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride)] retained
+ category EXT_secondary_color
+ dlflags notlistable
+ glxflags client-handcode server-handcode EXT
+ version 1.1
+ extension
+ alias SecondaryColorPointer
+
+###############################################################################
+#
+# Extension #146
+# EXT_texture_env commands
+#
+###############################################################################
+
+# Dead extension - never implemented (removed from registry!)
+# (none)
+# newcategory: EXT_texture_env
+
+###############################################################################
+#
+# Extension #147
+# EXT_texture_perturb_normal commands
+#
+###############################################################################
+
+TextureNormalEXT(mode)
+ return void
+ param mode TextureNormalModeEXT in value
+ category EXT_texture_perturb_normal
+ version 1.1
+ glxropcode ?
+ offset ?
+
+###############################################################################
+#
+# Extension #148
+# EXT_multi_draw_arrays commands
+#
+###############################################################################
+
+# first and count are really 'in'
+MultiDrawArraysEXT(mode, first, count, primcount)
+ return void
+ param mode BeginMode in value
+ param first Int32 in array [COMPSIZE(primcount)]
+ param count SizeI in array [COMPSIZE(primcount)]
+ param primcount SizeI in value
+ category EXT_multi_draw_arrays
+ version 1.1
+ glxropcode ?
+ alias MultiDrawArrays
+
+MultiDrawElementsEXT(mode, count, type, indices, primcount)
+ return void
+ param mode BeginMode in value
+ param count SizeI in array [COMPSIZE(primcount)]
+ param type DrawElementsType in value
+ param indices VoidPointer in array [COMPSIZE(primcount)]
+ param primcount SizeI in value
+ category EXT_multi_draw_arrays
+ version 1.1
+ glxropcode ?
+ alias MultiDrawElements
+
+###############################################################################
+#
+# Extension #149
+# EXT_fog_coord commands
+#
+###############################################################################
+
+FogCoordfEXT(coord)
+ return void
+ param coord CoordF in value
+ category EXT_fog_coord
+ vectorequiv FogCoordfvEXT
+ version 1.1
+ alias FogCoordf
+
+FogCoordfvEXT(coord)
+ return void
+ param coord CoordF in array [1]
+ category EXT_fog_coord
+ version 1.1
+ glxropcode 4124
+ alias FogCoordfv
+
+FogCoorddEXT(coord)
+ return void
+ param coord CoordD in value
+ category EXT_fog_coord
+ vectorequiv FogCoorddvEXT
+ version 1.1
+ alias FogCoordd
+
+FogCoorddvEXT(coord)
+ return void
+ param coord CoordD in array [1]
+ category EXT_fog_coord
+ version 1.1
+ glxropcode 4125
+ alias FogCoorddv
+
+FogCoordPointerEXT(type, stride, pointer)
+ return void
+ param type FogPointerTypeEXT in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride)] retained
+ category EXT_fog_coord
+ dlflags notlistable
+ version 1.1
+ glxflags client-handcode server-handcode EXT
+ alias FogCoordPointer
+
+###############################################################################
+#
+# Extension #150 - skipped
+# Extension #151 - skipped
+# Extension #152 - skipped
+# Extension #153 - skipped
+# Extension #154 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #155
+# REND_screen_coordinates commands
+#
+###############################################################################
+
+# (none)
+newcategory: REND_screen_coordinates
+
+###############################################################################
+#
+# Extension #156
+# EXT_coordinate_frame commands
+#
+###############################################################################
+
+Tangent3bEXT(tx, ty, tz)
+ return void
+ param tx Int8 in value
+ param ty Int8 in value
+ param tz Int8 in value
+ category EXT_coordinate_frame
+ vectorequiv Tangent3bvEXT
+ version 1.1
+ offset ?
+
+Tangent3bvEXT(v)
+ return void
+ param v Int8 in array [3]
+ category EXT_coordinate_frame
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Tangent3dEXT(tx, ty, tz)
+ return void
+ param tx CoordD in value
+ param ty CoordD in value
+ param tz CoordD in value
+ category EXT_coordinate_frame
+ vectorequiv Tangent3dvEXT
+ version 1.1
+ offset ?
+
+Tangent3dvEXT(v)
+ return void
+ param v CoordD in array [3]
+ category EXT_coordinate_frame
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Tangent3fEXT(tx, ty, tz)
+ return void
+ param tx CoordF in value
+ param ty CoordF in value
+ param tz CoordF in value
+ category EXT_coordinate_frame
+ vectorequiv Tangent3fvEXT
+ version 1.1
+ offset ?
+
+Tangent3fvEXT(v)
+ return void
+ param v CoordF in array [3]
+ category EXT_coordinate_frame
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Tangent3iEXT(tx, ty, tz)
+ return void
+ param tx Int32 in value
+ param ty Int32 in value
+ param tz Int32 in value
+ category EXT_coordinate_frame
+ vectorequiv Tangent3ivEXT
+ version 1.1
+ offset ?
+
+Tangent3ivEXT(v)
+ return void
+ param v Int32 in array [3]
+ category EXT_coordinate_frame
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Tangent3sEXT(tx, ty, tz)
+ return void
+ param tx Int16 in value
+ param ty Int16 in value
+ param tz Int16 in value
+ category EXT_coordinate_frame
+ vectorequiv Tangent3svEXT
+ version 1.1
+ offset ?
+
+Tangent3svEXT(v)
+ return void
+ param v Int16 in array [3]
+ category EXT_coordinate_frame
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Binormal3bEXT(bx, by, bz)
+ return void
+ param bx Int8 in value
+ param by Int8 in value
+ param bz Int8 in value
+ category EXT_coordinate_frame
+ vectorequiv Binormal3bvEXT
+ version 1.1
+ offset ?
+
+Binormal3bvEXT(v)
+ return void
+ param v Int8 in array [3]
+ category EXT_coordinate_frame
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Binormal3dEXT(bx, by, bz)
+ return void
+ param bx CoordD in value
+ param by CoordD in value
+ param bz CoordD in value
+ category EXT_coordinate_frame
+ vectorequiv Binormal3dvEXT
+ version 1.1
+ offset ?
+
+Binormal3dvEXT(v)
+ return void
+ param v CoordD in array [3]
+ category EXT_coordinate_frame
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Binormal3fEXT(bx, by, bz)
+ return void
+ param bx CoordF in value
+ param by CoordF in value
+ param bz CoordF in value
+ category EXT_coordinate_frame
+ vectorequiv Binormal3fvEXT
+ version 1.1
+ offset ?
+
+Binormal3fvEXT(v)
+ return void
+ param v CoordF in array [3]
+ category EXT_coordinate_frame
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Binormal3iEXT(bx, by, bz)
+ return void
+ param bx Int32 in value
+ param by Int32 in value
+ param bz Int32 in value
+ category EXT_coordinate_frame
+ vectorequiv Binormal3ivEXT
+ version 1.1
+ offset ?
+
+Binormal3ivEXT(v)
+ return void
+ param v Int32 in array [3]
+ category EXT_coordinate_frame
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Binormal3sEXT(bx, by, bz)
+ return void
+ param bx Int16 in value
+ param by Int16 in value
+ param bz Int16 in value
+ category EXT_coordinate_frame
+ vectorequiv Binormal3svEXT
+ version 1.1
+ offset ?
+
+Binormal3svEXT(v)
+ return void
+ param v Int16 in array [3]
+ category EXT_coordinate_frame
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TangentPointerEXT(type, stride, pointer)
+ return void
+ param type TangentPointerTypeEXT in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride)] retained
+ category EXT_coordinate_frame
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ offset ?
+
+BinormalPointerEXT(type, stride, pointer)
+ return void
+ param type BinormalPointerTypeEXT in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride)] retained
+ category EXT_coordinate_frame
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ offset ?
+
+###############################################################################
+#
+# Extension #157 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #158
+# EXT_texture_env_combine commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_env_combine
+
+###############################################################################
+#
+# Extension #159
+# APPLE_specular_vector commands
+#
+###############################################################################
+
+# (none)
+newcategory: APPLE_specular_vector
+
+###############################################################################
+#
+# Extension #160
+# APPLE_transform_hint commands
+#
+###############################################################################
+
+# (none)
+newcategory: APPLE_transform_hint
+
+###############################################################################
+#
+# Extension #161
+# SGIX_fog_scale commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_fog_scale
+
+###############################################################################
+#
+# Extension #162 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #163
+# SUNX_constant_data commands
+#
+###############################################################################
+
+FinishTextureSUNX()
+ return void
+ category SUNX_constant_data
+ version 1.1
+ glxropcode ?
+ offset ?
+
+###############################################################################
+#
+# Extension #164
+# SUN_global_alpha commands
+#
+###############################################################################
+
+GlobalAlphaFactorbSUN(factor)
+ return void
+ param factor Int8 in value
+ category SUN_global_alpha
+ version 1.1
+ glxropcode ?
+ offset ?
+
+GlobalAlphaFactorsSUN(factor)
+ return void
+ param factor Int16 in value
+ category SUN_global_alpha
+ version 1.1
+ glxropcode ?
+ offset ?
+
+GlobalAlphaFactoriSUN(factor)
+ return void
+ param factor Int32 in value
+ category SUN_global_alpha
+ version 1.1
+ glxropcode ?
+ offset ?
+
+GlobalAlphaFactorfSUN(factor)
+ return void
+ param factor Float32 in value
+ category SUN_global_alpha
+ version 1.1
+ glxropcode ?
+ offset ?
+
+GlobalAlphaFactordSUN(factor)
+ return void
+ param factor Float64 in value
+ category SUN_global_alpha
+ version 1.1
+ glxropcode ?
+ offset ?
+
+GlobalAlphaFactorubSUN(factor)
+ return void
+ param factor UInt8 in value
+ category SUN_global_alpha
+ version 1.1
+ glxropcode ?
+ offset ?
+
+GlobalAlphaFactorusSUN(factor)
+ return void
+ param factor UInt16 in value
+ category SUN_global_alpha
+ version 1.1
+ glxropcode ?
+ offset ?
+
+GlobalAlphaFactoruiSUN(factor)
+ return void
+ param factor UInt32 in value
+ category SUN_global_alpha
+ version 1.1
+ glxropcode ?
+ offset ?
+
+###############################################################################
+#
+# Extension #165
+# SUN_triangle_list commands
+#
+###############################################################################
+
+ReplacementCodeuiSUN(code)
+ return void
+ param code UInt32 in value
+ category SUN_triangle_list
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeusSUN(code)
+ return void
+ param code UInt16 in value
+ category SUN_triangle_list
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeubSUN(code)
+ return void
+ param code UInt8 in value
+ category SUN_triangle_list
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuivSUN(code)
+ return void
+ param code UInt32 in array [COMPSIZE()]
+ category SUN_triangle_list
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeusvSUN(code)
+ return void
+ param code UInt16 in array [COMPSIZE()]
+ category SUN_triangle_list
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeubvSUN(code)
+ return void
+ param code UInt8 in array [COMPSIZE()]
+ category SUN_triangle_list
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodePointerSUN(type, stride, pointer)
+ return void
+ param type ReplacementCodeTypeSUN in value
+ param stride SizeI in value
+ param pointer VoidPointer in array [COMPSIZE(type/stride)] retained
+ category SUN_triangle_list
+ version 1.1
+ glxropcode ?
+ offset ?
+
+###############################################################################
+#
+# Extension #166
+# SUN_vertex commands
+#
+###############################################################################
+
+Color4ubVertex2fSUN(r, g, b, a, x, y)
+ return void
+ param r UInt8 in value
+ param g UInt8 in value
+ param b UInt8 in value
+ param a UInt8 in value
+ param x Float32 in value
+ param y Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Color4ubVertex2fvSUN(c, v)
+ return void
+ param c UInt8 in array [4]
+ param v Float32 in array [2]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Color4ubVertex3fSUN(r, g, b, a, x, y, z)
+ return void
+ param r UInt8 in value
+ param g UInt8 in value
+ param b UInt8 in value
+ param a UInt8 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Color4ubVertex3fvSUN(c, v)
+ return void
+ param c UInt8 in array [4]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Color3fVertex3fSUN(r, g, b, x, y, z)
+ return void
+ param r Float32 in value
+ param g Float32 in value
+ param b Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Color3fVertex3fvSUN(c, v)
+ return void
+ param c Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Normal3fVertex3fSUN(nx, ny, nz, x, y, z)
+ return void
+ param nx Float32 in value
+ param ny Float32 in value
+ param nz Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Normal3fVertex3fvSUN(n, v)
+ return void
+ param n Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Color4fNormal3fVertex3fSUN(r, g, b, a, nx, ny, nz, x, y, z)
+ return void
+ param r Float32 in value
+ param g Float32 in value
+ param b Float32 in value
+ param a Float32 in value
+ param nx Float32 in value
+ param ny Float32 in value
+ param nz Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+Color4fNormal3fVertex3fvSUN(c, n, v)
+ return void
+ param c Float32 in array [4]
+ param n Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord2fVertex3fSUN(s, t, x, y, z)
+ return void
+ param s Float32 in value
+ param t Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord2fVertex3fvSUN(tc, v)
+ return void
+ param tc Float32 in array [2]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord4fVertex4fSUN(s, t, p, q, x, y, z, w)
+ return void
+ param s Float32 in value
+ param t Float32 in value
+ param p Float32 in value
+ param q Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord4fVertex4fvSUN(tc, v)
+ return void
+ param tc Float32 in array [4]
+ param v Float32 in array [4]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord2fColor4ubVertex3fSUN(s, t, r, g, b, a, x, y, z)
+ return void
+ param s Float32 in value
+ param t Float32 in value
+ param r UInt8 in value
+ param g UInt8 in value
+ param b UInt8 in value
+ param a UInt8 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord2fColor4ubVertex3fvSUN(tc, c, v)
+ return void
+ param tc Float32 in array [2]
+ param c UInt8 in array [4]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord2fColor3fVertex3fSUN(s, t, r, g, b, x, y, z)
+ return void
+ param s Float32 in value
+ param t Float32 in value
+ param r Float32 in value
+ param g Float32 in value
+ param b Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord2fColor3fVertex3fvSUN(tc, c, v)
+ return void
+ param tc Float32 in array [2]
+ param c Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord2fNormal3fVertex3fSUN(s, t, nx, ny, nz, x, y, z)
+ return void
+ param s Float32 in value
+ param t Float32 in value
+ param nx Float32 in value
+ param ny Float32 in value
+ param nz Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord2fNormal3fVertex3fvSUN(tc, n, v)
+ return void
+ param tc Float32 in array [2]
+ param n Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord2fColor4fNormal3fVertex3fSUN(s, t, r, g, b, a, nx, ny, nz, x, y, z)
+ return void
+ param s Float32 in value
+ param t Float32 in value
+ param r Float32 in value
+ param g Float32 in value
+ param b Float32 in value
+ param a Float32 in value
+ param nx Float32 in value
+ param ny Float32 in value
+ param nz Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord2fColor4fNormal3fVertex3fvSUN(tc, c, n, v)
+ return void
+ param tc Float32 in array [2]
+ param c Float32 in array [4]
+ param n Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord4fColor4fNormal3fVertex4fSUN(s, t, p, q, r, g, b, a, nx, ny, nz, x, y, z, w)
+ return void
+ param s Float32 in value
+ param t Float32 in value
+ param p Float32 in value
+ param q Float32 in value
+ param r Float32 in value
+ param g Float32 in value
+ param b Float32 in value
+ param a Float32 in value
+ param nx Float32 in value
+ param ny Float32 in value
+ param nz Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoord4fColor4fNormal3fVertex4fvSUN(tc, c, n, v)
+ return void
+ param tc Float32 in array [4]
+ param c Float32 in array [4]
+ param n Float32 in array [3]
+ param v Float32 in array [4]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiVertex3fSUN(rc, x, y, z)
+ return void
+ param rc ReplacementCodeSUN in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiVertex3fvSUN(rc, v)
+ return void
+ param rc ReplacementCodeSUN in array [1]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiColor4ubVertex3fSUN(rc, r, g, b, a, x, y, z)
+ return void
+ param rc ReplacementCodeSUN in value
+ param r UInt8 in value
+ param g UInt8 in value
+ param b UInt8 in value
+ param a UInt8 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiColor4ubVertex3fvSUN(rc, c, v)
+ return void
+ param rc ReplacementCodeSUN in array [1]
+ param c UInt8 in array [4]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiColor3fVertex3fSUN(rc, r, g, b, x, y, z)
+ return void
+ param rc ReplacementCodeSUN in value
+ param r Float32 in value
+ param g Float32 in value
+ param b Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiColor3fVertex3fvSUN(rc, c, v)
+ return void
+ param rc ReplacementCodeSUN in array [1]
+ param c Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiNormal3fVertex3fSUN(rc, nx, ny, nz, x, y, z)
+ return void
+ param rc ReplacementCodeSUN in value
+ param nx Float32 in value
+ param ny Float32 in value
+ param nz Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiNormal3fVertex3fvSUN(rc, n, v)
+ return void
+ param rc ReplacementCodeSUN in array [1]
+ param n Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiColor4fNormal3fVertex3fSUN(rc, r, g, b, a, nx, ny, nz, x, y, z)
+ return void
+ param rc ReplacementCodeSUN in value
+ param r Float32 in value
+ param g Float32 in value
+ param b Float32 in value
+ param a Float32 in value
+ param nx Float32 in value
+ param ny Float32 in value
+ param nz Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiColor4fNormal3fVertex3fvSUN(rc, c, n, v)
+ return void
+ param rc ReplacementCodeSUN in array [1]
+ param c Float32 in array [4]
+ param n Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiTexCoord2fVertex3fSUN(rc, s, t, x, y, z)
+ return void
+ param rc ReplacementCodeSUN in value
+ param s Float32 in value
+ param t Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiTexCoord2fVertex3fvSUN(rc, tc, v)
+ return void
+ param rc ReplacementCodeSUN in array [1]
+ param tc Float32 in array [2]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN(rc, s, t, nx, ny, nz, x, y, z)
+ return void
+ param rc ReplacementCodeSUN in value
+ param s Float32 in value
+ param t Float32 in value
+ param nx Float32 in value
+ param ny Float32 in value
+ param nz Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN(rc, tc, n, v)
+ return void
+ param rc ReplacementCodeSUN in array [1]
+ param tc Float32 in array [2]
+ param n Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN(rc, s, t, r, g, b, a, nx, ny, nz, x, y, z)
+ return void
+ param rc ReplacementCodeSUN in value
+ param s Float32 in value
+ param t Float32 in value
+ param r Float32 in value
+ param g Float32 in value
+ param b Float32 in value
+ param a Float32 in value
+ param nx Float32 in value
+ param ny Float32 in value
+ param nz Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN(rc, tc, c, n, v)
+ return void
+ param rc ReplacementCodeSUN in array [1]
+ param tc Float32 in array [2]
+ param c Float32 in array [4]
+ param n Float32 in array [3]
+ param v Float32 in array [3]
+ category SUN_vertex
+ version 1.1
+ glxropcode ?
+ offset ?
+
+###############################################################################
+#
+# Extension #167 - WGL_EXT_display_color_table
+# Extension #168 - WGL_EXT_extensions_string
+# Extension #169 - WGL_EXT_make_current_read
+# Extension #170 - WGL_EXT_pixel_format
+# Extension #171 - WGL_EXT_pbuffer
+# Extension #172 - WGL_EXT_swap_control
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #173
+# EXT_blend_func_separate commands (also INGR_blend_func_separate)
+#
+###############################################################################
+
+BlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)
+ return void
+ param sfactorRGB BlendFuncSeparateParameterEXT in value
+ param dfactorRGB BlendFuncSeparateParameterEXT in value
+ param sfactorAlpha BlendFuncSeparateParameterEXT in value
+ param dfactorAlpha BlendFuncSeparateParameterEXT in value
+ category EXT_blend_func_separate
+ glxropcode 4134
+ version 1.0
+ extension
+ alias BlendFuncSeparate
+
+BlendFuncSeparateINGR(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)
+ return void
+ param sfactorRGB BlendFuncSeparateParameterEXT in value
+ param dfactorRGB BlendFuncSeparateParameterEXT in value
+ param sfactorAlpha BlendFuncSeparateParameterEXT in value
+ param dfactorAlpha BlendFuncSeparateParameterEXT in value
+ category INGR_blend_func_separate
+ glxropcode 4134
+ version 1.0
+ extension
+ alias BlendFuncSeparateEXT
+
+###############################################################################
+#
+# Extension #174
+# INGR_color_clamp commands
+#
+###############################################################################
+
+# (none)
+newcategory: INGR_color_clamp
+
+###############################################################################
+#
+# Extension #175
+# INGR_interlace_read commands
+#
+###############################################################################
+
+# (none)
+newcategory: INGR_interlace_read
+
+###############################################################################
+#
+# Extension #176
+# EXT_stencil_wrap commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_stencil_wrap
+
+###############################################################################
+#
+# Extension #177 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #178
+# EXT_422_pixels commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_422_pixels
+
+###############################################################################
+#
+# Extension #179
+# NV_texgen_reflection commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_texgen_reflection
+
+###############################################################################
+#
+# Extension #???
+# @ EXT_texture_cube_map commands
+#
+###############################################################################
+
+# (none)
+
+###############################################################################
+#
+# Extension #180 - skipped
+# Extension #181 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #182
+# SUN_convolution_border_modes commands
+#
+###############################################################################
+
+# (none)
+newcategory: SUN_convolution_border_modes
+
+###############################################################################
+#
+# Extension #183 - GLX_SUN_get_transparent_index
+# Extension #184 - skipped
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #185
+# EXT_texture_env_add commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_env_add
+
+###############################################################################
+#
+# Extension #186
+# EXT_texture_lod_bias commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_lod_bias
+
+###############################################################################
+#
+# Extension #187
+# EXT_texture_filter_anisotropic commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_filter_anisotropic
+
+###############################################################################
+#
+# Extension #188
+# EXT_vertex_weighting commands
+#
+###############################################################################
+
+# GLX stuff to be written
+VertexWeightfEXT(weight)
+ return void
+ param weight Float32 in value
+ category EXT_vertex_weighting
+ vectorequiv VertexWeightfvEXT
+ version 1.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 494
+
+VertexWeightfvEXT(weight)
+ return void
+ param weight Float32 in array [1]
+ category EXT_vertex_weighting
+ version 1.1
+ extension soft WINSOFT NV10
+ glxropcode 4135
+ glxflags ignore
+ offset 495
+
+VertexWeightPointerEXT(size, type, stride, pointer)
+ return void
+ param size SizeI in value
+ param type VertexWeightPointerTypeEXT in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(type/stride)] retained
+ category EXT_vertex_weighting
+ version 1.1
+ extension soft WINSOFT NV10
+ dlflags notlistable
+ glxflags ignore
+ offset 496
+
+###############################################################################
+#
+# Extension #189
+# NV_light_max_exponent commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_light_max_exponent
+
+###############################################################################
+#
+# Extension #190
+# NV_vertex_array_range commands
+#
+###############################################################################
+
+FlushVertexArrayRangeNV()
+ return void
+ category NV_vertex_array_range
+ version 1.1
+ extension soft WINSOFT NV10
+ dlflags notlistable
+ glxflags client-handcode server-handcode ignore
+ offset 497
+
+VertexArrayRangeNV(length, pointer)
+ return void
+ param length SizeI in value
+ param pointer Void in array [COMPSIZE(length)] retained
+ category NV_vertex_array_range
+ version 1.1
+ extension soft WINSOFT NV10
+ dlflags notlistable
+ glxflags client-handcode server-handcode ignore
+ offset 498
+
+###############################################################################
+#
+# Extension #191
+# NV_register_combiners commands
+#
+###############################################################################
+
+CombinerParameterfvNV(pname, params)
+ return void
+ param pname CombinerParameterNV in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxropcode 4137
+ glxflags ignore
+ offset 499
+
+CombinerParameterfNV(pname, param)
+ return void
+ param pname CombinerParameterNV in value
+ param param Float32 in value
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxropcode 4136
+ glxflags ignore
+ offset 500
+
+CombinerParameterivNV(pname, params)
+ return void
+ param pname CombinerParameterNV in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxropcode 4139
+ glxflags ignore
+ offset 501
+
+CombinerParameteriNV(pname, param)
+ return void
+ param pname CombinerParameterNV in value
+ param param Int32 in value
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxropcode 4138
+ glxflags ignore
+ offset 502
+
+CombinerInputNV(stage, portion, variable, input, mapping, componentUsage)
+ return void
+ param stage CombinerStageNV in value
+ param portion CombinerPortionNV in value
+ param variable CombinerVariableNV in value
+ param input CombinerRegisterNV in value
+ param mapping CombinerMappingNV in value
+ param componentUsage CombinerComponentUsageNV in value
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxropcode 4140
+ glxflags ignore
+ offset 503
+
+CombinerOutputNV(stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum)
+ return void
+ param stage CombinerStageNV in value
+ param portion CombinerPortionNV in value
+ param abOutput CombinerRegisterNV in value
+ param cdOutput CombinerRegisterNV in value
+ param sumOutput CombinerRegisterNV in value
+ param scale CombinerScaleNV in value
+ param bias CombinerBiasNV in value
+ param abDotProduct Boolean in value
+ param cdDotProduct Boolean in value
+ param muxSum Boolean in value
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxropcode 4141
+ glxflags ignore
+ offset 504
+
+FinalCombinerInputNV(variable, input, mapping, componentUsage)
+ return void
+ param variable CombinerVariableNV in value
+ param input CombinerRegisterNV in value
+ param mapping CombinerMappingNV in value
+ param componentUsage CombinerComponentUsageNV in value
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxropcode 4142
+ glxflags ignore
+ offset 505
+
+GetCombinerInputParameterfvNV(stage, portion, variable, pname, params)
+ return void
+ param stage CombinerStageNV in value
+ param portion CombinerPortionNV in value
+ param variable CombinerVariableNV in value
+ param pname CombinerParameterNV in value
+ param params Float32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxvendorpriv 1270
+ glxflags ignore
+ offset 506
+
+GetCombinerInputParameterivNV(stage, portion, variable, pname, params)
+ return void
+ param stage CombinerStageNV in value
+ param portion CombinerPortionNV in value
+ param variable CombinerVariableNV in value
+ param pname CombinerParameterNV in value
+ param params Int32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxvendorpriv 1271
+ glxflags ignore
+ offset 507
+
+GetCombinerOutputParameterfvNV(stage, portion, pname, params)
+ return void
+ param stage CombinerStageNV in value
+ param portion CombinerPortionNV in value
+ param pname CombinerParameterNV in value
+ param params Float32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxvendorpriv 1272
+ glxflags ignore
+ offset 508
+
+GetCombinerOutputParameterivNV(stage, portion, pname, params)
+ return void
+ param stage CombinerStageNV in value
+ param portion CombinerPortionNV in value
+ param pname CombinerParameterNV in value
+ param params Int32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxvendorpriv 1273
+ glxflags ignore
+ offset 509
+
+GetFinalCombinerInputParameterfvNV(variable, pname, params)
+ return void
+ param variable CombinerVariableNV in value
+ param pname CombinerParameterNV in value
+ param params Float32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxvendorpriv 1274
+ glxflags ignore
+ offset 510
+
+GetFinalCombinerInputParameterivNV(variable, pname, params)
+ return void
+ param variable CombinerVariableNV in value
+ param pname CombinerParameterNV in value
+ param params Int32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category NV_register_combiners
+ version 1.1
+ extension soft WINSOFT NV10
+ glxvendorpriv 1275
+ glxflags ignore
+ offset 511
+
+###############################################################################
+#
+# Extension #192
+# NV_fog_distance commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_fog_distance
+
+###############################################################################
+#
+# Extension #193
+# NV_texgen_emboss commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_texgen_emboss
+
+###############################################################################
+#
+# Extension #194
+# NV_blend_square commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_blend_square
+
+###############################################################################
+#
+# Extension #195
+# NV_texture_env_combine4 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_texture_env_combine4
+
+###############################################################################
+#
+# Extension #196
+# MESA_resize_buffers commands
+#
+###############################################################################
+
+ResizeBuffersMESA()
+ return void
+ category MESA_resize_buffers
+ version 1.0
+ glxropcode ?
+ offset 512
+
+###############################################################################
+#
+# Extension #197
+# MESA_window_pos commands
+#
+# Note that the 2- and 3-component versions are now aliases of ARB
+# entry points.
+#
+###############################################################################
+
+WindowPos2dMESA(x, y)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ category MESA_window_pos
+ vectorequiv WindowPos2dvMESA
+ version 1.0
+ alias WindowPos2dARB
+
+WindowPos2dvMESA(v)
+ return void
+ param v CoordD in array [2]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ alias WindowPos2dvARB
+
+WindowPos2fMESA(x, y)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ category MESA_window_pos
+ vectorequiv WindowPos2fvMESA
+ version 1.0
+ alias WindowPos2fARB
+
+WindowPos2fvMESA(v)
+ return void
+ param v CoordF in array [2]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ alias WindowPos2fvARB
+
+WindowPos2iMESA(x, y)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ category MESA_window_pos
+ vectorequiv WindowPos2ivMESA
+ version 1.0
+ alias WindowPos2iARB
+
+WindowPos2ivMESA(v)
+ return void
+ param v CoordI in array [2]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ alias WindowPos2ivARB
+
+WindowPos2sMESA(x, y)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ category MESA_window_pos
+ vectorequiv WindowPos2svMESA
+ version 1.0
+ alias WindowPos2sARB
+
+WindowPos2svMESA(v)
+ return void
+ param v CoordS in array [2]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ alias WindowPos2svARB
+
+WindowPos3dMESA(x, y, z)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ param z CoordD in value
+ vectorequiv WindowPos3dvMESA
+ category MESA_window_pos
+ version 1.0
+ alias WindowPos3dARB
+
+WindowPos3dvMESA(v)
+ return void
+ param v CoordD in array [3]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ alias WindowPos3dvARB
+
+WindowPos3fMESA(x, y, z)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ param z CoordF in value
+ category MESA_window_pos
+ vectorequiv WindowPos3fvMESA
+ version 1.0
+ alias WindowPos3fARB
+
+WindowPos3fvMESA(v)
+ return void
+ param v CoordF in array [3]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ alias WindowPos3fvARB
+
+WindowPos3iMESA(x, y, z)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ param z CoordI in value
+ category MESA_window_pos
+ vectorequiv WindowPos3ivMESA
+ version 1.0
+ alias WindowPos3iARB
+
+WindowPos3ivMESA(v)
+ return void
+ param v CoordI in array [3]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ alias WindowPos3ivARB
+
+WindowPos3sMESA(x, y, z)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ param z CoordS in value
+ category MESA_window_pos
+ vectorequiv WindowPos3svMESA
+ version 1.0
+ alias WindowPos3sARB
+
+WindowPos3svMESA(v)
+ return void
+ param v CoordS in array [3]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ alias WindowPos3svARB
+
+WindowPos4dMESA(x, y, z, w)
+ return void
+ param x CoordD in value
+ param y CoordD in value
+ param z CoordD in value
+ param w CoordD in value
+ vectorequiv WindowPos4dvMESA
+ category MESA_window_pos
+ version 1.0
+ offset 529
+
+WindowPos4dvMESA(v)
+ return void
+ param v CoordD in array [4]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ offset 530
+
+WindowPos4fMESA(x, y, z, w)
+ return void
+ param x CoordF in value
+ param y CoordF in value
+ param z CoordF in value
+ param w CoordF in value
+ category MESA_window_pos
+ vectorequiv WindowPos4fvMESA
+ version 1.0
+ offset 531
+
+WindowPos4fvMESA(v)
+ return void
+ param v CoordF in array [4]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ offset 532
+
+WindowPos4iMESA(x, y, z, w)
+ return void
+ param x CoordI in value
+ param y CoordI in value
+ param z CoordI in value
+ param w CoordI in value
+ category MESA_window_pos
+ vectorequiv WindowPos4ivMESA
+ version 1.0
+ offset 533
+
+WindowPos4ivMESA(v)
+ return void
+ param v CoordI in array [4]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ offset 534
+
+WindowPos4sMESA(x, y, z, w)
+ return void
+ param x CoordS in value
+ param y CoordS in value
+ param z CoordS in value
+ param w CoordS in value
+ category MESA_window_pos
+ vectorequiv WindowPos4svMESA
+ version 1.0
+ offset 535
+
+WindowPos4svMESA(v)
+ return void
+ param v CoordS in array [4]
+ category MESA_window_pos
+ version 1.0
+ glxropcode ?
+ offset 536
+
+###############################################################################
+#
+# Extension #198
+# EXT_texture_compression_s3tc commands
+#
+###############################################################################
+
+#@@ (none yet)
+
+###############################################################################
+#
+# Extension #199
+# IBM_cull_vertex commands
+#
+###############################################################################
+
+# (none)
+newcategory: IBM_cull_vertex
+
+###############################################################################
+#
+# Extension #200
+# IBM_multimode_draw_arrays commands
+#
+###############################################################################
+
+MultiModeDrawArraysIBM(mode, first, count, primcount, modestride)
+ return void
+ param mode BeginMode in array [COMPSIZE(primcount)]
+ param first Int32 in array [COMPSIZE(primcount)]
+ param count SizeI in array [COMPSIZE(primcount)]
+ param primcount SizeI in value
+ param modestride Int32 in value
+ category IBM_multimode_draw_arrays
+ version 1.1
+ glxropcode ?
+ offset 708
+
+
+MultiModeDrawElementsIBM(mode, count, type, indices, primcount, modestride)
+ return void
+ param mode BeginMode in array [COMPSIZE(primcount)]
+ param count SizeI in array [COMPSIZE(primcount)]
+ param type DrawElementsType in value
+ param indices ConstVoidPointer in array [COMPSIZE(primcount)]
+ param primcount SizeI in value
+ param modestride Int32 in value
+ category IBM_multimode_draw_arrays
+ version 1.1
+ glxropcode ?
+ offset 709
+
+###############################################################################
+#
+# Extension #201
+# IBM_vertex_array_lists commands
+#
+###############################################################################
+
+ColorPointerListIBM(size, type, stride, pointer, ptrstride)
+ return void
+ param size Int32 in value
+ param type ColorPointerType in value
+ param stride Int32 in value
+ param pointer VoidPointer in array [COMPSIZE(size/type/stride)] retained
+ param ptrstride Int32 in value
+ category IBM_vertex_array_lists
+ version 1.1
+ glxropcode ?
+ offset ?
+
+SecondaryColorPointerListIBM(size, type, stride, pointer, ptrstride)
+ return void
+ param size Int32 in value
+ param type SecondaryColorPointerTypeIBM in value
+ param stride Int32 in value
+ param pointer VoidPointer in array [COMPSIZE(size/type/stride)] retained
+ param ptrstride Int32 in value
+ category IBM_vertex_array_lists
+ version 1.1
+ glxropcode ?
+ offset ?
+
+EdgeFlagPointerListIBM(stride, pointer, ptrstride)
+ return void
+ param stride Int32 in value
+ param pointer BooleanPointer in array [COMPSIZE(stride)] retained
+ param ptrstride Int32 in value
+ category IBM_vertex_array_lists
+ version 1.1
+ glxropcode ?
+ offset ?
+
+FogCoordPointerListIBM(type, stride, pointer, ptrstride)
+ return void
+ param type FogPointerTypeIBM in value
+ param stride Int32 in value
+ param pointer VoidPointer in array [COMPSIZE(type/stride)] retained
+ param ptrstride Int32 in value
+ category IBM_vertex_array_lists
+ version 1.1
+ glxropcode ?
+ offset ?
+
+IndexPointerListIBM(type, stride, pointer, ptrstride)
+ return void
+ param type IndexPointerType in value
+ param stride Int32 in value
+ param pointer VoidPointer in array [COMPSIZE(type/stride)] retained
+ param ptrstride Int32 in value
+ category IBM_vertex_array_lists
+ version 1.1
+ glxropcode ?
+ offset ?
+
+NormalPointerListIBM(type, stride, pointer, ptrstride)
+ return void
+ param type NormalPointerType in value
+ param stride Int32 in value
+ param pointer VoidPointer in array [COMPSIZE(type/stride)] retained
+ param ptrstride Int32 in value
+ category IBM_vertex_array_lists
+ version 1.1
+ glxropcode ?
+ offset ?
+
+TexCoordPointerListIBM(size, type, stride, pointer, ptrstride)
+ return void
+ param size Int32 in value
+ param type TexCoordPointerType in value
+ param stride Int32 in value
+ param pointer VoidPointer in array [COMPSIZE(size/type/stride)] retained
+ param ptrstride Int32 in value
+ category IBM_vertex_array_lists
+ version 1.1
+ glxropcode ?
+ offset ?
+
+VertexPointerListIBM(size, type, stride, pointer, ptrstride)
+ return void
+ param size Int32 in value
+ param type VertexPointerType in value
+ param stride Int32 in value
+ param pointer VoidPointer in array [COMPSIZE(size/type/stride)] retained
+ param ptrstride Int32 in value
+ category IBM_vertex_array_lists
+ version 1.1
+ glxropcode ?
+ offset ?
+
+###############################################################################
+#
+# Extension #202
+# SGIX_subsample commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_subsample
+
+###############################################################################
+#
+# Extension #203
+# SGIX_ycrcba commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_ycrcba
+
+###############################################################################
+#
+# Extension #204
+# SGIX_ycrcb_subsample commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_ycrcb_subsample
+
+###############################################################################
+#
+# Extension #205
+# SGIX_depth_pass_instrument commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_depth_pass_instrument
+
+###############################################################################
+#
+# Extension #206
+# 3DFX_texture_compression_FXT1 commands
+#
+###############################################################################
+
+# (none)
+newcategory: 3DFX_texture_compression_FXT1
+
+###############################################################################
+#
+# Extension #207
+# 3DFX_multisample commands
+#
+###############################################################################
+
+# (none)
+newcategory: 3DFX_multisample
+
+###############################################################################
+#
+# Extension #208
+# 3DFX_tbuffer commands
+#
+###############################################################################
+
+TbufferMask3DFX(mask)
+ return void
+ param mask UInt32 in value
+ category 3DFX_tbuffer
+ version 1.2
+ glxropcode ?
+ offset 553
+
+###############################################################################
+#
+# Extension #209
+# EXT_multisample commands
+#
+###############################################################################
+
+SampleMaskEXT(value, invert)
+ return void
+ param value ClampedFloat32 in value
+ param invert Boolean in value
+ category EXT_multisample
+ version 1.0
+ glxropcode ?
+ extension
+ offset 446
+
+SamplePatternEXT(pattern)
+ return void
+ param pattern SamplePatternEXT in value
+ category EXT_multisample
+ version 1.0
+ glxropcode ?
+ glxflags
+ extension
+ offset 447
+
+###############################################################################
+#
+# Extension #210
+# SGIX_vertex_preclip commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_vertex_preclip
+
+###############################################################################
+#
+# Extension #211
+# SGIX_convolution_accuracy commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_convolution_accuracy
+
+###############################################################################
+#
+# Extension #212
+# SGIX_resample commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_resample
+
+###############################################################################
+#
+# Extension #213
+# SGIS_point_line_texgen commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIS_point_line_texgen
+
+###############################################################################
+#
+# Extension #214
+# SGIS_texture_color_mask commands
+#
+###############################################################################
+
+TextureColorMaskSGIS(red, green, blue, alpha)
+ return void
+ param red Boolean in value
+ param green Boolean in value
+ param blue Boolean in value
+ param alpha Boolean in value
+ category SGIS_texture_color_mask
+ version 1.1
+ glxropcode 2082
+ extension
+ offset ?
+
+###############################################################################
+#
+# Extension #215 - GLX_MESA_copy_sub_buffer
+# Extension #216 - GLX_MESA_pixmap_colormap
+# Extension #217 - GLX_MESA_release_buffers
+# Extension #218 - GLX_MESA_set_3dfx_mode
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #219
+# SGIX_igloo_interface commands
+#
+###############################################################################
+
+IglooInterfaceSGIX(pname, params)
+ return void
+ dlflags notlistable
+ param pname IglooFunctionSelectSGIX in value
+ param params IglooParameterSGIX in array [COMPSIZE(pname)]
+ category SGIX_igloo_interface
+ version 1.0
+ glxflags SGI ignore
+ extension
+ glxropcode 200
+ offset ?
+
+###############################################################################
+#
+# Extension #220
+# EXT_texture_env_dot3 commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_env_dot3
+
+###############################################################################
+#
+# Extension #221
+# ATI_texture_mirror_once commands
+#
+###############################################################################
+# (none)
+newcategory: ATI_texture_mirror_once
+
+###############################################################################
+#
+# Extension #222
+# NV_fence commands
+#
+###############################################################################
+
+DeleteFencesNV(n, fences)
+ return void
+ param n SizeI in value
+ param fences FenceNV in array [n]
+ category NV_fence
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1276
+ glxflags ignore
+ offset 647
+
+GenFencesNV(n, fences)
+ return void
+ param n SizeI in value
+ param fences FenceNV out array [n]
+ category NV_fence
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1277
+ glxflags ignore
+ offset 648
+
+IsFenceNV(fence)
+ return Boolean
+ param fence FenceNV in value
+ category NV_fence
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1278
+ glxflags ignore
+ offset 649
+
+TestFenceNV(fence)
+ return Boolean
+ param fence FenceNV in value
+ category NV_fence
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1279
+ glxflags ignore
+ offset 650
+
+GetFenceivNV(fence, pname, params)
+ return void
+ param fence FenceNV in value
+ param pname FenceParameterNameNV in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category NV_fence
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1280
+ glxflags ignore
+ offset 651
+
+FinishFenceNV(fence)
+ return void
+ param fence FenceNV in value
+ category NV_fence
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1312
+ glxflags ignore
+ offset 652
+
+SetFenceNV(fence, condition)
+ return void
+ param fence FenceNV in value
+ param condition FenceConditionNV in value
+ category NV_fence
+ version 1.2
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 653
+
+###############################################################################
+#
+# Extension #225
+# NV_evaluators commands
+#
+###############################################################################
+
+MapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, points)
+ return void
+ param target EvalTargetNV in value
+ param index UInt32 in value
+ param type MapTypeNV in value
+ param ustride SizeI in value
+ param vstride SizeI in value
+ param uorder CheckedInt32 in value
+ param vorder CheckedInt32 in value
+ param packed Boolean in value
+ param points Void in array [COMPSIZE(target/uorder/vorder)]
+ category NV_evaluators
+ dlflags handcode
+ version 1.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset ?
+
+MapParameterivNV(target, pname, params)
+ return void
+ param target EvalTargetNV in value
+ param pname MapParameterNV in value
+ param params CheckedInt32 in array [COMPSIZE(target/pname)]
+ category NV_evaluators
+ version 1.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset ?
+
+MapParameterfvNV(target, pname, params)
+ return void
+ param target EvalTargetNV in value
+ param pname MapParameterNV in value
+ param params CheckedFloat32 in array [COMPSIZE(target/pname)]
+ category NV_evaluators
+ version 1.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset ?
+
+GetMapControlPointsNV(target, index, type, ustride, vstride, packed, points)
+ return void
+ param target EvalTargetNV in value
+ param index UInt32 in value
+ param type MapTypeNV in value
+ param ustride SizeI in value
+ param vstride SizeI in value
+ param packed Boolean in value
+ param points Void out array [COMPSIZE(target)]
+ category NV_evaluators
+ dlflags notlistable
+ version 1.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset ?
+
+GetMapParameterivNV(target, pname, params)
+ return void
+ param target EvalTargetNV in value
+ param pname MapParameterNV in value
+ param params Int32 out array [COMPSIZE(target/pname)]
+ category NV_evaluators
+ dlflags notlistable
+ version 1.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset ?
+
+GetMapParameterfvNV(target, pname, params)
+ return void
+ param target EvalTargetNV in value
+ param pname MapParameterNV in value
+ param params Float32 out array [COMPSIZE(target/pname)]
+ category NV_evaluators
+ dlflags notlistable
+ version 1.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset ?
+
+GetMapAttribParameterivNV(target, index, pname, params)
+ return void
+ param target EvalTargetNV in value
+ param index UInt32 in value
+ param pname MapAttribParameterNV in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category NV_evaluators
+ dlflags notlistable
+ version 1.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset ?
+
+GetMapAttribParameterfvNV(target, index, pname, params)
+ return void
+ param target EvalTargetNV in value
+ param index UInt32 in value
+ param pname MapAttribParameterNV in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category NV_evaluators
+ dlflags notlistable
+ version 1.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset ?
+
+EvalMapsNV(target, mode)
+ return void
+ param target EvalTargetNV in value
+ param mode EvalMapsModeNV in value
+ category NV_evaluators
+ version 1.1
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #226
+# NV_packed_depth_stencil commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_packed_depth_stencil
+
+###############################################################################
+#
+# Extension #227
+# NV_register_combiners2 commands
+#
+###############################################################################
+
+CombinerStageParameterfvNV(stage, pname, params)
+ return void
+ param stage CombinerStageNV in value
+ param pname CombinerParameterNV in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category NV_register_combiners2
+ version 1.1
+ extension
+ glxflags ignore
+ offset ?
+
+GetCombinerStageParameterfvNV(stage, pname, params)
+ return void
+ param stage CombinerStageNV in value
+ param pname CombinerParameterNV in value
+ param params Float32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category NV_register_combiners2
+ version 1.1
+ extension
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #228
+# NV_texture_compression_vtc commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_texture_compression_vtc
+
+###############################################################################
+#
+# Extension #229
+# NV_texture_rectangle commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_texture_rectangle
+
+###############################################################################
+#
+# Extension #230
+# NV_texture_shader commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_texture_shader
+
+###############################################################################
+#
+# Extension #231
+# NV_texture_shader2 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_texture_shader2
+
+###############################################################################
+#
+# Extension #232
+# NV_vertex_array_range2 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_vertex_array_range2
+
+###############################################################################
+#
+# Extension #233
+# NV_vertex_program commands
+#
+###############################################################################
+
+AreProgramsResidentNV(n, programs, residences)
+ return Boolean
+ param n SizeI in value
+ param programs UInt32 in array [n]
+ param residences Boolean out array [n]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxflags ignore
+ glxvendorpriv 1293
+ offset 578
+
+BindProgramNV(target, id)
+ return void
+ param target VertexAttribEnumNV in value
+ param id UInt32 in value
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4180
+ alias BindProgramARB
+
+DeleteProgramsNV(n, programs)
+ return void
+ param n SizeI in value
+ param programs UInt32 in array [n]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1294
+ alias DeleteProgramsARB
+
+ExecuteProgramNV(target, id, params)
+ return void
+ param target VertexAttribEnumNV in value
+ param id UInt32 in value
+ param params Float32 in array [4]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxflags ignore
+ glxropcode 4181
+ offset 581
+
+GenProgramsNV(n, programs)
+ return void
+ param n SizeI in value
+ param programs UInt32 out array [n]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1295
+ alias GenProgramsARB
+
+GetProgramParameterdvNV(target, index, pname, params)
+ return void
+ param target VertexAttribEnumNV in value
+ param index UInt32 in value
+ param pname VertexAttribEnumNV in value
+ param params Float64 out array [4]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxflags ignore
+ glxvendorpriv 1297
+ offset 583
+
+GetProgramParameterfvNV(target, index, pname, params)
+ return void
+ param target VertexAttribEnumNV in value
+ param index UInt32 in value
+ param pname VertexAttribEnumNV in value
+ param params Float32 out array [4]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxflags ignore
+ glxvendorpriv 1296
+ offset 584
+
+# GetProgramParameterSigneddvNV(target, index, pname, params)
+# return void
+# param target VertexAttribEnumNV in value
+# param index Int32 in value
+# param pname VertexAttribEnumNV in value
+# param params Float64 out array [4]
+# category NV_vertex_program1_1_dcc
+# dlflags notlistable
+# version 1.2
+# extension soft WINSOFT NV20
+# glxflags ignore
+# offset ?
+#
+# GetProgramParameterSignedfvNV(target, index, pname, params)
+# return void
+# param target VertexAttribEnumNV in value
+# param index Int32 in value
+# param pname VertexAttribEnumNV in value
+# param params Float32 out array [4]
+# category NV_vertex_program1_1_dcc
+# dlflags notlistable
+# version 1.2
+# extension soft WINSOFT NV20
+# glxflags ignore
+# offset ?
+
+GetProgramivNV(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname VertexAttribEnumNV in value
+ param params Int32 out array [4]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxflags ignore
+ glxvendorpriv 1298
+ offset 585
+
+GetProgramStringNV(id, pname, program)
+ return void
+ param id UInt32 in value
+ param pname VertexAttribEnumNV in value
+ param program ProgramCharacterNV out array [COMPSIZE(id/pname)]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxflags ignore
+ glxvendorpriv 1299
+ offset 586
+
+GetTrackMatrixivNV(target, address, pname, params)
+ return void
+ param target VertexAttribEnumNV in value
+ param address UInt32 in value
+ param pname VertexAttribEnumNV in value
+ param params Int32 out array [1]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxflags ignore
+ glxvendorpriv 1300
+ offset 587
+
+GetVertexAttribdvNV(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribEnumNV in value
+ param params Float64 out array [1]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1301
+ alias GetVertexAttribdv
+
+GetVertexAttribfvNV(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribEnumNV in value
+ param params Float32 out array [1]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1302
+ alias GetVertexAttribfv
+
+GetVertexAttribivNV(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribEnumNV in value
+ param params Int32 out array [1]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1303
+ alias GetVertexAttribiv
+
+GetVertexAttribPointervNV(index, pname, pointer)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribEnumNV in value
+ param pointer VoidPointer out array [1]
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxflags ignore
+ alias GetVertexAttribPointerv
+
+IsProgramNV(id)
+ return Boolean
+ param id UInt32 in value
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxvendorpriv 1304
+ alias IsProgram
+
+LoadProgramNV(target, id, len, program)
+ return void
+ param target VertexAttribEnumNV in value
+ param id UInt32 in value
+ param len SizeI in value
+ param program UInt8 in array [len]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4183
+ offset 593
+
+ProgramParameter4dNV(target, index, x, y, z, w)
+ return void
+ param target VertexAttribEnumNV in value
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv ProgramParameter4dvNV
+ extension soft WINSOFT NV10
+ offset 594
+
+ProgramParameter4dvNV(target, index, v)
+ return void
+ param target VertexAttribEnumNV in value
+ param index UInt32 in value
+ param v Float64 in array [4]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4185
+ offset 595
+
+ProgramParameter4fNV(target, index, x, y, z, w)
+ return void
+ param target VertexAttribEnumNV in value
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv ProgramParameter4fvNV
+ extension soft WINSOFT NV10
+ offset 596
+
+ProgramParameter4fvNV(target, index, v)
+ return void
+ param target VertexAttribEnumNV in value
+ param index UInt32 in value
+ param v Float32 in array [4]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4184
+ offset 597
+
+#??? 'count' was SizeI in the latest NVIDIA gl.spec, but UInt32 in the
+#??? extension specification in the registry.
+ProgramParameters4dvNV(target, index, count, v)
+ return void
+ param target VertexAttribEnumNV in value
+ param index UInt32 in value
+ param count SizeI in value
+ param v Float64 in array [count*4]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4187
+ offset 598
+
+ProgramParameters4fvNV(target, index, count, v)
+ return void
+ param target VertexAttribEnumNV in value
+ param index UInt32 in value
+ param count SizeI in value
+ param v Float32 in array [count*4]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4186
+ offset 599
+
+# ProgramParameterSigned4dNV(target, index, x, y, z, w)
+# return void
+# param target VertexAttribEnumNV in value
+# param index Int32 in value
+# param x Float64 in value
+# param y Float64 in value
+# param z Float64 in value
+# param w Float64 in value
+# category NV_vertex_program1_1_dcc
+# version 1.2
+# vectorequiv ProgramParameterSigned4dvNV
+# extension soft WINSOFT NV20
+# offset ?
+#
+# ProgramParameterSigned4dvNV(target, index, v)
+# return void
+# param target VertexAttribEnumNV in value
+# param index Int32 in value
+# param v Float64 in array [4]
+# category NV_vertex_program1_1_dcc
+# version 1.2
+# extension soft WINSOFT NV20
+# glxflags ignore
+# offset ?
+#
+# ProgramParameterSigned4fNV(target, index, x, y, z, w)
+# return void
+# param target VertexAttribEnumNV in value
+# param index Int32 in value
+# param x Float32 in value
+# param y Float32 in value
+# param z Float32 in value
+# param w Float32 in value
+# category NV_vertex_program1_1_dcc
+# version 1.2
+# vectorequiv ProgramParameterSigned4fvNV
+# extension soft WINSOFT NV20
+# offset ?
+#
+# ProgramParameterSigned4fvNV(target, index, v)
+# return void
+# param target VertexAttribEnumNV in value
+# param index Int32 in value
+# param v Float32 in array [4]
+# category NV_vertex_program1_1_dcc
+# version 1.2
+# extension soft WINSOFT NV20
+# glxflags ignore
+# offset ?
+#
+# ProgramParametersSigned4dvNV(target, index, count, v)
+# return void
+# param target VertexAttribEnumNV in value
+# param index Int32 in value
+# param count SizeI in value
+# param v Float64 in array [count*4]
+# category NV_vertex_program1_1_dcc
+# version 1.2
+# extension soft WINSOFT NV20
+# glxflags ignore
+# offset ?
+#
+# ProgramParametersSigned4fvNV(target, index, count, v)
+# return void
+# param target VertexAttribEnumNV in value
+# param index Int32 in value
+# param count SizeI in value
+# param v Float32 in array [count*4]
+# category NV_vertex_program1_1_dcc
+# version 1.2
+# extension soft WINSOFT NV20
+# glxflags ignore
+# offset ?
+
+RequestResidentProgramsNV(n, programs)
+ return void
+ param n SizeI in value
+ param programs UInt32 in array [n]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4182
+ offset 600
+
+TrackMatrixNV(target, address, matrix, transform)
+ return void
+ param target VertexAttribEnumNV in value
+ param address UInt32 in value
+ param matrix VertexAttribEnumNV in value
+ param transform VertexAttribEnumNV in value
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4188
+ offset 601
+
+VertexAttribPointerNV(index, fsize, type, stride, pointer)
+ return void
+ param index UInt32 in value
+ param fsize Int32 in value
+ param type VertexAttribEnumNV in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(fsize/type/stride)] retained
+ category NV_vertex_program
+ dlflags notlistable
+ version 1.2
+ extension soft WINSOFT NV10
+ glxflags ignore
+ offset 602
+
+VertexAttrib1dNV(index, x)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib1dvNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib1d
+
+VertexAttrib1dvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [1]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4197
+ alias VertexAttrib1dv
+
+VertexAttrib1fNV(index, x)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib1fvNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib1f
+
+VertexAttrib1fvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [1]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4193
+ alias VertexAttrib1fv
+
+VertexAttrib1sNV(index, x)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib1svNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib1s
+
+VertexAttrib1svNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [1]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4189
+ alias VertexAttrib1sv
+
+VertexAttrib2dNV(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib2dvNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib2d
+
+VertexAttrib2dvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [2]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4198
+ alias VertexAttrib2dv
+
+VertexAttrib2fNV(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib2fvNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib2f
+
+VertexAttrib2fvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [2]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4194
+ alias VertexAttrib2fv
+
+VertexAttrib2sNV(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ param y Int16 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib2svNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib2s
+
+VertexAttrib2svNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [2]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4190
+ alias VertexAttrib2sv
+
+VertexAttrib3dNV(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib3dvNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib3d
+
+VertexAttrib3dvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [3]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4199
+ alias VertexAttrib3dv
+
+VertexAttrib3fNV(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib3fvNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib3f
+
+VertexAttrib3fvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [3]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4195
+ alias VertexAttrib3fv
+
+VertexAttrib3sNV(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ param y Int16 in value
+ param z Int16 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib3svNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib3s
+
+VertexAttrib3svNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [3]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4191
+ alias VertexAttrib3sv
+
+VertexAttrib4dNV(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib4dvNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib4d
+
+VertexAttrib4dvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [4]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4200
+ alias VertexAttrib4dv
+
+VertexAttrib4fNV(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib4fvNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib4f
+
+VertexAttrib4fvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Float32 in array [4]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4196
+ alias VertexAttrib4fv
+
+VertexAttrib4sNV(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Int16 in value
+ param y Int16 in value
+ param z Int16 in value
+ param w Int16 in value
+ category NV_vertex_program
+ version 1.2
+ vectorequiv VertexAttrib4svNV
+ extension soft WINSOFT NV10
+ alias VertexAttrib4s
+
+VertexAttrib4svNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [4]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4192
+ alias VertexAttrib4sv
+
+VertexAttrib4ubNV(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x ColorUB in value
+ param y ColorUB in value
+ param z ColorUB in value
+ param w ColorUB in value
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ vectorequiv VertexAttrib4ubvNV
+ alias VertexAttrib4Nub
+
+VertexAttrib4ubvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v ColorUB in array [4]
+ category NV_vertex_program
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4201
+ alias VertexAttrib4Nubv
+
+VertexAttribs1dvNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Float64 in array [count]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4210
+ offset 629
+
+VertexAttribs1fvNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Float32 in array [count]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4206
+ offset 630
+
+VertexAttribs1svNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Int16 in array [count]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4202
+ offset 631
+
+VertexAttribs2dvNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Float64 in array [count*2]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4211
+ offset 632
+
+VertexAttribs2fvNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Float32 in array [count*2]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4207
+ offset 633
+
+VertexAttribs2svNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Int16 in array [count*2]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4203
+ offset 634
+
+VertexAttribs3dvNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Float64 in array [count*3]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4212
+ offset 635
+
+VertexAttribs3fvNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Float32 in array [count*3]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4208
+ offset 636
+
+VertexAttribs3svNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Int16 in array [count*3]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4204
+ offset 637
+
+VertexAttribs4dvNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Float64 in array [count*4]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4213
+ offset 638
+
+VertexAttribs4fvNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Float32 in array [count*4]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4209
+ offset 639
+
+VertexAttribs4svNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v Int16 in array [count*4]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4205
+ offset 640
+
+VertexAttribs4ubvNV(index, count, v)
+ return void
+ param index UInt32 in value
+ param count SizeI in value
+ param v ColorUB in array [count*4]
+ category NV_vertex_program
+ dlflags handcode
+ version 1.2
+ extension soft WINSOFT NV10
+ glxropcode 4214
+ offset 641
+
+
+###############################################################################
+#
+# Extension #234 - GLX_SGIX_visual_select_group
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #235
+# SGIX_texture_coordinate_clamp commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_texture_coordinate_clamp
+
+###############################################################################
+#
+# Extension #236
+# SGIX_scalebias_hint commands
+#
+###############################################################################
+
+# (none)
+newcategory: SGIX_scalebias_hint
+
+###############################################################################
+#
+# Extension #237 - GLX_OML_swap_method commands
+# Extension #238 - GLX_OML_sync_control commands
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #239
+# OML_interlace commands
+#
+###############################################################################
+
+# (none)
+newcategory: OML_interlace
+
+###############################################################################
+#
+# Extension #240
+# OML_subsample commands
+#
+###############################################################################
+
+# (none)
+newcategory: OML_subsample
+
+###############################################################################
+#
+# Extension #241
+# OML_resample commands
+#
+###############################################################################
+
+# (none)
+newcategory: OML_resample
+
+###############################################################################
+#
+# Extension #242 - WGL_OML_sync_control commands
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #243
+# NV_copy_depth_to_color commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_copy_depth_to_color
+
+###############################################################################
+#
+# Extension #244
+# ATI_envmap_bumpmap commands
+#
+###############################################################################
+
+TexBumpParameterivATI(pname, param)
+ return void
+ param pname TexBumpParameterATI in value
+ param param Int32 in array [COMPSIZE(pname)]
+ category ATI_envmap_bumpmap
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexBumpParameterfvATI(pname, param)
+ return void
+ param pname TexBumpParameterATI in value
+ param param Float32 in array [COMPSIZE(pname)]
+ category ATI_envmap_bumpmap
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetTexBumpParameterivATI(pname, param)
+ return void
+ param pname GetTexBumpParameterATI in value
+ param param Int32 out array [COMPSIZE(pname)]
+ category ATI_envmap_bumpmap
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetTexBumpParameterfvATI(pname, param)
+ return void
+ param pname GetTexBumpParameterATI in value
+ param param Float32 out array [COMPSIZE(pname)]
+ category ATI_envmap_bumpmap
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #245
+# ATI_fragment_shader commands
+#
+###############################################################################
+
+GenFragmentShadersATI(range)
+ return UInt32
+ param range UInt32 in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindFragmentShaderATI(id)
+ return void
+ param id UInt32 in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteFragmentShaderATI(id)
+ return void
+ param id UInt32 in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BeginFragmentShaderATI()
+ return void
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+EndFragmentShaderATI()
+ return void
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+PassTexCoordATI(dst, coord, swizzle)
+ return void
+ param dst UInt32 in value
+ param coord UInt32 in value
+ param swizzle SwizzleOpATI in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SampleMapATI(dst, interp, swizzle)
+ return void
+ param dst UInt32 in value
+ param interp UInt32 in value
+ param swizzle SwizzleOpATI in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ColorFragmentOp1ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod)
+ return void
+ param op FragmentOpATI in value
+ param dst UInt32 in value
+ param dstMask UInt32 in value
+ param dstMod UInt32 in value
+ param arg1 UInt32 in value
+ param arg1Rep UInt32 in value
+ param arg1Mod UInt32 in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ColorFragmentOp2ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod)
+ return void
+ param op FragmentOpATI in value
+ param dst UInt32 in value
+ param dstMask UInt32 in value
+ param dstMod UInt32 in value
+ param arg1 UInt32 in value
+ param arg1Rep UInt32 in value
+ param arg1Mod UInt32 in value
+ param arg2 UInt32 in value
+ param arg2Rep UInt32 in value
+ param arg2Mod UInt32 in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ColorFragmentOp3ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod)
+ return void
+ param op FragmentOpATI in value
+ param dst UInt32 in value
+ param dstMask UInt32 in value
+ param dstMod UInt32 in value
+ param arg1 UInt32 in value
+ param arg1Rep UInt32 in value
+ param arg1Mod UInt32 in value
+ param arg2 UInt32 in value
+ param arg2Rep UInt32 in value
+ param arg2Mod UInt32 in value
+ param arg3 UInt32 in value
+ param arg3Rep UInt32 in value
+ param arg3Mod UInt32 in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+AlphaFragmentOp1ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod)
+ return void
+ param op FragmentOpATI in value
+ param dst UInt32 in value
+ param dstMod UInt32 in value
+ param arg1 UInt32 in value
+ param arg1Rep UInt32 in value
+ param arg1Mod UInt32 in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+AlphaFragmentOp2ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod)
+ return void
+ param op FragmentOpATI in value
+ param dst UInt32 in value
+ param dstMod UInt32 in value
+ param arg1 UInt32 in value
+ param arg1Rep UInt32 in value
+ param arg1Mod UInt32 in value
+ param arg2 UInt32 in value
+ param arg2Rep UInt32 in value
+ param arg2Mod UInt32 in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+AlphaFragmentOp3ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod)
+ return void
+ param op FragmentOpATI in value
+ param dst UInt32 in value
+ param dstMod UInt32 in value
+ param arg1 UInt32 in value
+ param arg1Rep UInt32 in value
+ param arg1Mod UInt32 in value
+ param arg2 UInt32 in value
+ param arg2Rep UInt32 in value
+ param arg2Mod UInt32 in value
+ param arg3 UInt32 in value
+ param arg3Rep UInt32 in value
+ param arg3Mod UInt32 in value
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SetFragmentShaderConstantATI(dst, value)
+ return void
+ param dst UInt32 in value
+ param value ConstFloat32 in array [4]
+ category ATI_fragment_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #246
+# ATI_pn_triangles commands
+#
+###############################################################################
+
+PNTrianglesiATI(pname, param)
+ return void
+ param pname PNTrianglesPNameATI in value
+ param param Int32 in value
+ category ATI_pn_triangles
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+PNTrianglesfATI(pname, param)
+ return void
+ param pname PNTrianglesPNameATI in value
+ param param Float32 in value
+ category ATI_pn_triangles
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #247
+# ATI_vertex_array_object commands
+#
+###############################################################################
+
+NewObjectBufferATI(size, pointer, usage)
+ return UInt32
+ param size SizeI in value
+ param pointer ConstVoid in array [size]
+ param usage ArrayObjectUsageATI in value
+ category ATI_vertex_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsObjectBufferATI(buffer)
+ return Boolean
+ param buffer UInt32 in value
+ category ATI_vertex_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UpdateObjectBufferATI(buffer, offset, size, pointer, preserve)
+ return void
+ param buffer UInt32 in value
+ param offset UInt32 in value
+ param size SizeI in value
+ param pointer ConstVoid in array [size]
+ param preserve PreserveModeATI in value
+ category ATI_vertex_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetObjectBufferfvATI(buffer, pname, params)
+ return void
+ param buffer UInt32 in value
+ param pname ArrayObjectPNameATI in value
+ param params Float32 out array [1]
+ category ATI_vertex_array_object
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetObjectBufferivATI(buffer, pname, params)
+ return void
+ param buffer UInt32 in value
+ param pname ArrayObjectPNameATI in value
+ param params Int32 out array [1]
+ category ATI_vertex_array_object
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+FreeObjectBufferATI(buffer)
+ return void
+ param buffer UInt32 in value
+ category ATI_vertex_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ArrayObjectATI(array, size, type, stride, buffer, offset)
+ return void
+ param array EnableCap in value
+ param size Int32 in value
+ param type ScalarType in value
+ param stride SizeI in value
+ param buffer UInt32 in value
+ param offset UInt32 in value
+ category ATI_vertex_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetArrayObjectfvATI(array, pname, params)
+ return void
+ param array EnableCap in value
+ param pname ArrayObjectPNameATI in value
+ param params Float32 out array [1]
+ category ATI_vertex_array_object
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetArrayObjectivATI(array, pname, params)
+ return void
+ param array EnableCap in value
+ param pname ArrayObjectPNameATI in value
+ param params Int32 out array [1]
+ category ATI_vertex_array_object
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+VariantArrayObjectATI(id, type, stride, buffer, offset)
+ return void
+ param id UInt32 in value
+ param type ScalarType in value
+ param stride SizeI in value
+ param buffer UInt32 in value
+ param offset UInt32 in value
+ category ATI_vertex_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetVariantArrayObjectfvATI(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname ArrayObjectPNameATI in value
+ param params Float32 out array [1]
+ category ATI_vertex_array_object
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVariantArrayObjectivATI(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname ArrayObjectPNameATI in value
+ param params Int32 out array [1]
+ category ATI_vertex_array_object
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #248
+# EXT_vertex_shader commands
+#
+###############################################################################
+
+BeginVertexShaderEXT()
+ return void
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+EndVertexShaderEXT()
+ return void
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindVertexShaderEXT(id)
+ return void
+ param id UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GenVertexShadersEXT(range)
+ return UInt32
+ param range UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteVertexShaderEXT(id)
+ return void
+ param id UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ShaderOp1EXT(op, res, arg1)
+ return void
+ param op VertexShaderOpEXT in value
+ param res UInt32 in value
+ param arg1 UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ShaderOp2EXT(op, res, arg1, arg2)
+ return void
+ param op VertexShaderOpEXT in value
+ param res UInt32 in value
+ param arg1 UInt32 in value
+ param arg2 UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ShaderOp3EXT(op, res, arg1, arg2, arg3)
+ return void
+ param op VertexShaderOpEXT in value
+ param res UInt32 in value
+ param arg1 UInt32 in value
+ param arg2 UInt32 in value
+ param arg3 UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SwizzleEXT(res, in, outX, outY, outZ, outW)
+ return void
+ param res UInt32 in value
+ param in UInt32 in value
+ param outX VertexShaderCoordOutEXT in value
+ param outY VertexShaderCoordOutEXT in value
+ param outZ VertexShaderCoordOutEXT in value
+ param outW VertexShaderCoordOutEXT in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+WriteMaskEXT(res, in, outX, outY, outZ, outW)
+ return void
+ param res UInt32 in value
+ param in UInt32 in value
+ param outX VertexShaderWriteMaskEXT in value
+ param outY VertexShaderWriteMaskEXT in value
+ param outZ VertexShaderWriteMaskEXT in value
+ param outW VertexShaderWriteMaskEXT in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+InsertComponentEXT(res, src, num)
+ return void
+ param res UInt32 in value
+ param src UInt32 in value
+ param num UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ExtractComponentEXT(res, src, num)
+ return void
+ param res UInt32 in value
+ param src UInt32 in value
+ param num UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GenSymbolsEXT(datatype, storagetype, range, components)
+ return UInt32
+ param datatype DataTypeEXT in value
+ param storagetype VertexShaderStorageTypeEXT in value
+ param range ParameterRangeEXT in value
+ param components UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SetInvariantEXT(id, type, addr)
+ return void
+ param id UInt32 in value
+ param type ScalarType in value
+ param addr Void in array [COMPSIZE(id/type)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SetLocalConstantEXT(id, type, addr)
+ return void
+ param id UInt32 in value
+ param type ScalarType in value
+ param addr Void in array [COMPSIZE(id/type)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VariantbvEXT(id, addr)
+ return void
+ param id UInt32 in value
+ param addr Int8 in array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VariantsvEXT(id, addr)
+ return void
+ param id UInt32 in value
+ param addr Int16 in array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VariantivEXT(id, addr)
+ return void
+ param id UInt32 in value
+ param addr Int32 in array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VariantfvEXT(id, addr)
+ return void
+ param id UInt32 in value
+ param addr Float32 in array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VariantdvEXT(id, addr)
+ return void
+ param id UInt32 in value
+ param addr Float64 in array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VariantubvEXT(id, addr)
+ return void
+ param id UInt32 in value
+ param addr UInt8 in array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VariantusvEXT(id, addr)
+ return void
+ param id UInt32 in value
+ param addr UInt16 in array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VariantuivEXT(id, addr)
+ return void
+ param id UInt32 in value
+ param addr UInt32 in array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VariantPointerEXT(id, type, stride, addr)
+ return void
+ param id UInt32 in value
+ param type ScalarType in value
+ param stride UInt32 in value
+ param addr Void in array [COMPSIZE(id/type/stride)]
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+EnableVariantClientStateEXT(id)
+ return void
+ param id UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DisableVariantClientStateEXT(id)
+ return void
+ param id UInt32 in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindLightParameterEXT(light, value)
+ return UInt32
+ param light LightName in value
+ param value LightParameter in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindMaterialParameterEXT(face, value)
+ return UInt32
+ param face MaterialFace in value
+ param value MaterialParameter in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindTexGenParameterEXT(unit, coord, value)
+ return UInt32
+ param unit TextureUnit in value
+ param coord TextureCoordName in value
+ param value TextureGenParameter in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindTextureUnitParameterEXT(unit, value)
+ return UInt32
+ param unit TextureUnit in value
+ param value VertexShaderTextureUnitParameter in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindParameterEXT(value)
+ return UInt32
+ param value VertexShaderParameterEXT in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsVariantEnabledEXT(id, cap)
+ return Boolean
+ param id UInt32 in value
+ param cap VariantCapEXT in value
+ category EXT_vertex_shader
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetVariantBooleanvEXT(id, value, data)
+ return void
+ param id UInt32 in value
+ param value GetVariantValueEXT in value
+ param data Boolean out array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVariantIntegervEXT(id, value, data)
+ return void
+ param id UInt32 in value
+ param value GetVariantValueEXT in value
+ param data Int32 out array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVariantFloatvEXT(id, value, data)
+ return void
+ param id UInt32 in value
+ param value GetVariantValueEXT in value
+ param data Float32 out array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVariantPointervEXT(id, value, data)
+ return void
+ param id UInt32 in value
+ param value GetVariantValueEXT in value
+ param data VoidPointer out array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetInvariantBooleanvEXT(id, value, data)
+ return void
+ param id UInt32 in value
+ param value GetVariantValueEXT in value
+ param data Boolean out array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetInvariantIntegervEXT(id, value, data)
+ return void
+ param id UInt32 in value
+ param value GetVariantValueEXT in value
+ param data Int32 out array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetInvariantFloatvEXT(id, value, data)
+ return void
+ param id UInt32 in value
+ param value GetVariantValueEXT in value
+ param data Float32 out array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetLocalConstantBooleanvEXT(id, value, data)
+ return void
+ param id UInt32 in value
+ param value GetVariantValueEXT in value
+ param data Boolean out array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetLocalConstantIntegervEXT(id, value, data)
+ return void
+ param id UInt32 in value
+ param value GetVariantValueEXT in value
+ param data Int32 out array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetLocalConstantFloatvEXT(id, value, data)
+ return void
+ param id UInt32 in value
+ param value GetVariantValueEXT in value
+ param data Float32 out array [COMPSIZE(id)]
+ category EXT_vertex_shader
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #249
+# ATI_vertex_streams commands
+#
+###############################################################################
+
+VertexStream1sATI(stream, x)
+ return void
+ param stream VertexStreamATI in value
+ param x Int16 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream1svATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int16 in array [1]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream1iATI(stream, x)
+ return void
+ param stream VertexStreamATI in value
+ param x Int32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream1ivATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int32 in array [1]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream1fATI(stream, x)
+ return void
+ param stream VertexStreamATI in value
+ param x Float32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream1fvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Float32 in array [1]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream1dATI(stream, x)
+ return void
+ param stream VertexStreamATI in value
+ param x Float64 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream1dvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Float64 in array [1]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream2sATI(stream, x, y)
+ return void
+ param stream VertexStreamATI in value
+ param x Int16 in value
+ param y Int16 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream2svATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int16 in array [2]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream2iATI(stream, x, y)
+ return void
+ param stream VertexStreamATI in value
+ param x Int32 in value
+ param y Int32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream2ivATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int32 in array [2]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream2fATI(stream, x, y)
+ return void
+ param stream VertexStreamATI in value
+ param x Float32 in value
+ param y Float32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream2fvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Float32 in array [2]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream2dATI(stream, x, y)
+ return void
+ param stream VertexStreamATI in value
+ param x Float64 in value
+ param y Float64 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream2dvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Float64 in array [2]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream3sATI(stream, x, y, z)
+ return void
+ param stream VertexStreamATI in value
+ param x Int16 in value
+ param y Int16 in value
+ param z Int16 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream3svATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int16 in array [3]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream3iATI(stream, x, y, z)
+ return void
+ param stream VertexStreamATI in value
+ param x Int32 in value
+ param y Int32 in value
+ param z Int32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream3ivATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int32 in array [3]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream3fATI(stream, x, y, z)
+ return void
+ param stream VertexStreamATI in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream3fvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Float32 in array [3]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream3dATI(stream, x, y, z)
+ return void
+ param stream VertexStreamATI in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream3dvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Float64 in array [3]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream4sATI(stream, x, y, z, w)
+ return void
+ param stream VertexStreamATI in value
+ param x Int16 in value
+ param y Int16 in value
+ param z Int16 in value
+ param w Int16 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream4svATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int16 in array [4]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream4iATI(stream, x, y, z, w)
+ return void
+ param stream VertexStreamATI in value
+ param x Int32 in value
+ param y Int32 in value
+ param z Int32 in value
+ param w Int32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream4ivATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int32 in array [4]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream4fATI(stream, x, y, z, w)
+ return void
+ param stream VertexStreamATI in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream4fvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Float32 in array [4]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream4dATI(stream, x, y, z, w)
+ return void
+ param stream VertexStreamATI in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexStream4dvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Float64 in array [4]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalStream3bATI(stream, nx, ny, nz)
+ return void
+ param stream VertexStreamATI in value
+ param nx Int8 in value
+ param ny Int8 in value
+ param nz Int8 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalStream3bvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int8 in array [3]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalStream3sATI(stream, nx, ny, nz)
+ return void
+ param stream VertexStreamATI in value
+ param nx Int16 in value
+ param ny Int16 in value
+ param nz Int16 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalStream3svATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int16 in array [3]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalStream3iATI(stream, nx, ny, nz)
+ return void
+ param stream VertexStreamATI in value
+ param nx Int32 in value
+ param ny Int32 in value
+ param nz Int32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalStream3ivATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Int32 in array [3]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalStream3fATI(stream, nx, ny, nz)
+ return void
+ param stream VertexStreamATI in value
+ param nx Float32 in value
+ param ny Float32 in value
+ param nz Float32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalStream3fvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Float32 in array [3]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalStream3dATI(stream, nx, ny, nz)
+ return void
+ param stream VertexStreamATI in value
+ param nx Float64 in value
+ param ny Float64 in value
+ param nz Float64 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalStream3dvATI(stream, coords)
+ return void
+ param stream VertexStreamATI in value
+ param coords Float64 in array [3]
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ClientActiveVertexStreamATI(stream)
+ return void
+ param stream VertexStreamATI in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexBlendEnviATI(pname, param)
+ return void
+ param pname VertexStreamATI in value
+ param param Int32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexBlendEnvfATI(pname, param)
+ return void
+ param pname VertexStreamATI in value
+ param param Float32 in value
+ category ATI_vertex_streams
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #250 - WGL_I3D_digital_video_control
+# Extension #251 - WGL_I3D_gamma
+# Extension #252 - WGL_I3D_genlock
+# Extension #253 - WGL_I3D_image_buffer
+# Extension #254 - WGL_I3D_swap_frame_lock
+# Extension #255 - WGL_I3D_swap_frame_usage
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #256
+# ATI_element_array commands
+#
+###############################################################################
+
+ElementPointerATI(type, pointer)
+ return void
+ param type ElementPointerTypeATI in value
+ param pointer Void in array [COMPSIZE(type)] retained
+ category ATI_element_array
+ dlflags notlistable
+ glxflags client-handcode client-intercept server-handcode
+ version 1.2
+ offset ?
+
+DrawElementArrayATI(mode, count)
+ return void
+ param mode BeginMode in value
+ param count SizeI in value
+ category ATI_element_array
+ dlflags handcode
+ glxflags client-handcode client-intercept server-handcode
+ version 1.2
+ offset ?
+
+DrawRangeElementArrayATI(mode, start, end, count)
+ return void
+ param mode BeginMode in value
+ param start UInt32 in value
+ param end UInt32 in value
+ param count SizeI in value
+ category ATI_element_array
+ dlflags handcode
+ glxflags client-handcode client-intercept server-handcode
+ version 1.2
+ offset ?
+
+###############################################################################
+#
+# Extension #257
+# SUN_mesh_array commands
+#
+###############################################################################
+
+DrawMeshArraysSUN(mode, first, count, width)
+ return void
+ param mode BeginMode in value
+ param first Int32 in value
+ param count SizeI in value
+ param width SizeI in value
+ category SUN_mesh_array
+ dlflags handcode
+ glxflags client-handcode client-intercept server-handcode
+ version 1.1
+ glxropcode ?
+ offset ?
+
+###############################################################################
+#
+# Extension #258
+# SUN_slice_accum commands
+#
+###############################################################################
+
+# (none)
+newcategory: SUN_slice_accum
+
+###############################################################################
+#
+# Extension #259
+# NV_multisample_filter_hint commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_multisample_filter_hint
+
+###############################################################################
+#
+# Extension #260
+# NV_depth_clamp commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_depth_clamp
+
+###############################################################################
+#
+# Extension #261
+# NV_occlusion_query commands
+#
+###############################################################################
+
+GenOcclusionQueriesNV(n, ids)
+ return void
+ param n SizeI in value
+ param ids UInt32 out array [n]
+ dlflags notlistable
+ category NV_occlusion_query
+ version 1.2
+ extension soft WINSOFT NV20
+ glxflags ignore
+
+DeleteOcclusionQueriesNV(n, ids)
+ return void
+ param n SizeI in value
+ param ids UInt32 in array [n]
+ dlflags notlistable
+ category NV_occlusion_query
+ version 1.2
+ extension soft WINSOFT NV20
+ glxflags ignore
+
+IsOcclusionQueryNV(id)
+ return Boolean
+ param id UInt32 in value
+ dlflags notlistable
+ category NV_occlusion_query
+ version 1.2
+ extension soft WINSOFT NV20
+ glxflags ignore
+
+BeginOcclusionQueryNV(id)
+ return void
+ param id UInt32 in value
+ category NV_occlusion_query
+ version 1.2
+ extension soft WINSOFT NV20
+ glxflags ignore
+
+EndOcclusionQueryNV()
+ return void
+ category NV_occlusion_query
+ version 1.2
+ extension soft WINSOFT NV20
+ glxflags ignore
+
+GetOcclusionQueryivNV(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname OcclusionQueryParameterNameNV in value
+ param params Int32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category NV_occlusion_query
+ version 1.2
+ extension soft WINSOFT NV20
+ glxflags ignore
+
+GetOcclusionQueryuivNV(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname OcclusionQueryParameterNameNV in value
+ param params UInt32 out array [COMPSIZE(pname)]
+ dlflags notlistable
+ category NV_occlusion_query
+ version 1.2
+ extension soft WINSOFT NV20
+ glxflags ignore
+
+###############################################################################
+#
+# Extension #262
+# NV_point_sprite commands
+#
+###############################################################################
+
+PointParameteriNV(pname, param)
+ return void
+ param pname PointParameterNameARB in value
+ param param Int32 in value
+ category NV_point_sprite
+ version 1.2
+ extension soft WINSOFT NV20
+ glxropcode 4221
+ alias PointParameteri
+
+PointParameterivNV(pname, params)
+ return void
+ param pname PointParameterNameARB in value
+ param params Int32 in array [COMPSIZE(pname)]
+ category NV_point_sprite
+ version 1.2
+ extension soft WINSOFT NV20
+ glxropcode 4222
+ alias PointParameteriv
+
+###############################################################################
+#
+# Extension #263 - WGL_NV_render_depth_texture
+# Extension #264 - WGL_NV_render_texture_rectangle
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #265
+# NV_texture_shader3 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_texture_shader3
+
+###############################################################################
+#
+# Extension #266
+# NV_vertex_program1_1 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_vertex_program1_1
+
+###############################################################################
+#
+# Extension #267
+# EXT_shadow_funcs commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_shadow_funcs
+
+###############################################################################
+#
+# Extension #268
+# EXT_stencil_two_side commands
+#
+###############################################################################
+
+ActiveStencilFaceEXT(face)
+ return void
+ param face StencilFaceDirection in value
+ category EXT_stencil_two_side
+ version 1.3
+ glxropcode 4220
+ offset 646
+
+###############################################################################
+#
+# Extension #269
+# ATI_text_fragment_shader commands
+#
+###############################################################################
+
+# Uses ARB_vertex_program entry points
+newcategory: ATI_text_fragment_shader
+
+###############################################################################
+#
+# Extension #270
+# APPLE_client_storage commands
+#
+###############################################################################
+
+# (none)
+newcategory: APPLE_client_storage
+
+###############################################################################
+#
+# Extension #271
+# APPLE_element_array commands
+#
+###############################################################################
+
+# @@ Need to verify/add GLX protocol
+
+# @@@ like #256 ATI_element_array
+ElementPointerAPPLE(type, pointer)
+ return void
+ param type ElementPointerTypeATI in value
+ param pointer Void in array [type]
+ category APPLE_element_array
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DrawElementArrayAPPLE(mode, first, count)
+ return void
+ param mode BeginMode in value
+ param first Int32 in value
+ param count SizeI in value
+ category APPLE_element_array
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DrawRangeElementArrayAPPLE(mode, start, end, first, count)
+ return void
+ param mode BeginMode in value
+ param start UInt32 in value
+ param end UInt32 in value
+ param first Int32 in value
+ param count SizeI in value
+ category APPLE_element_array
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiDrawElementArrayAPPLE(mode, first, count, primcount)
+ return void
+ param mode BeginMode in value
+ param first Int32 in array [primcount]
+ param count SizeI in array [primcount]
+ param primcount SizeI in value
+ category APPLE_element_array
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiDrawRangeElementArrayAPPLE(mode, start, end, first, count, primcount)
+ return void
+ param mode BeginMode in value
+ param start UInt32 in value
+ param end UInt32 in value
+ param first Int32 in array [primcount]
+ param count SizeI in array [primcount]
+ param primcount SizeI in value
+ category APPLE_element_array
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #272
+# APPLE_fence commands
+#
+###############################################################################
+
+# @@ Need to verify/add GLX protocol
+
+# @@@ like #222 NV_fence
+GenFencesAPPLE(n, fences)
+ return void
+ param n SizeI in value
+ param fences FenceNV out array [n]
+ category APPLE_fence
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteFencesAPPLE(n, fences)
+ return void
+ param n SizeI in value
+ param fences FenceNV in array [n]
+ category APPLE_fence
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SetFenceAPPLE(fence)
+ return void
+ param fence FenceNV in value
+ category APPLE_fence
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsFenceAPPLE(fence)
+ return Boolean
+ param fence FenceNV in value
+ category APPLE_fence
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TestFenceAPPLE(fence)
+ return Boolean
+ param fence FenceNV in value
+ category APPLE_fence
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+FinishFenceAPPLE(fence)
+ return void
+ param fence FenceNV in value
+ category APPLE_fence
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TestObjectAPPLE(object, name)
+ return Boolean
+ param object ObjectTypeAPPLE in value
+ param name UInt32 in value
+ category APPLE_fence
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+FinishObjectAPPLE(object, name)
+ return void
+ param object ObjectTypeAPPLE in value
+ param name Int32 in value
+ category APPLE_fence
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #273
+# APPLE_vertex_array_object commands
+#
+###############################################################################
+
+BindVertexArrayAPPLE(array)
+ return void
+ param array UInt32 in value
+ category APPLE_vertex_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias BindVertexArray
+
+DeleteVertexArraysAPPLE(n, arrays)
+ return void
+ param n SizeI in value
+ param arrays UInt32 in array [n]
+ category APPLE_vertex_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias DeleteVertexArrays
+
+GenVertexArraysAPPLE(n, arrays)
+ return void
+ param n SizeI in value
+ param arrays UInt32 out array [n]
+ category APPLE_vertex_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias GenVertexArray
+
+IsVertexArrayAPPLE(array)
+ return Boolean
+ param array UInt32 in value
+ category APPLE_vertex_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias IsVertexArray
+
+###############################################################################
+#
+# Extension #274
+# APPLE_vertex_array_range commands
+#
+###############################################################################
+
+# @@ Need to verify/add GLX protocol
+
+# @@@ like #190 NV_vertex_array_range,
+VertexArrayRangeAPPLE(length, pointer)
+ return void
+ param length SizeI in value
+ param pointer Void out array [length]
+ category APPLE_vertex_array_range
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+FlushVertexArrayRangeAPPLE(length, pointer)
+ return void
+ param length SizeI in value
+ param pointer Void out array [length]
+ category APPLE_vertex_array_range
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexArrayParameteriAPPLE(pname, param)
+ return void
+ param pname VertexArrayPNameAPPLE in value
+ param param Int32 in value
+ category APPLE_vertex_array_range
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #275
+# APPLE_ycbcr_422 commands
+#
+###############################################################################
+
+# (none)
+newcategory: APPLE_ycbcr_422
+
+###############################################################################
+#
+# Extension #276
+# S3_s3tc commands
+#
+###############################################################################
+
+# (none)
+newcategory: S3_s3tc
+
+###############################################################################
+#
+# Extension #277
+# ATI_draw_buffers commands
+#
+###############################################################################
+
+DrawBuffersATI(n, bufs)
+ return void
+ param n SizeI in value
+ param bufs DrawBufferModeATI in array [n]
+ category ATI_draw_buffers
+ version 1.2
+ extension
+ glxropcode 233
+ alias DrawBuffers
+
+###############################################################################
+#
+# Extension #278 - WGL_ATI_pixel_format_float
+#
+###############################################################################
+newcategory: ATI_pixel_format_float
+passthru: /* This is really a WGL extension, but defines some associated GL enums.
+passthru: * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
+passthru: */
+
+###############################################################################
+#
+# Extension #279
+# ATI_texture_env_combine3 commands
+#
+###############################################################################
+
+# (none)
+newcategory: ATI_texture_env_combine3
+
+###############################################################################
+#
+# Extension #280
+# ATI_texture_float commands
+#
+###############################################################################
+
+# (none)
+newcategory: ATI_texture_float
+
+###############################################################################
+#
+# Extension #281 (also WGL_NV_float_buffer)
+# NV_float_buffer commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_float_buffer
+
+###############################################################################
+#
+# Extension #282
+# NV_fragment_program commands
+#
+###############################################################################
+
+# @@ Need to verify/add GLX protocol
+
+# Some NV_fragment_program entry points are shared with ARB_vertex_program,
+# and are only included in that #define block, for now.
+newcategory: NV_fragment_program
+passthru: /* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
+
+ProgramNamedParameter4fNV(id, len, name, x, y, z, w)
+ return void
+ param id UInt32 in value
+ param len SizeI in value
+ param name UInt8 in array [1]
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category NV_fragment_program
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 682
+
+ProgramNamedParameter4dNV(id, len, name, x, y, z, w)
+ return void
+ param id UInt32 in value
+ param len SizeI in value
+ param name UInt8 in array [1]
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category NV_fragment_program
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 683
+
+ProgramNamedParameter4fvNV(id, len, name, v)
+ return void
+ param id UInt32 in value
+ param len SizeI in value
+ param name UInt8 in array [1]
+ param v Float32 in array [4]
+ category NV_fragment_program
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 684
+
+ProgramNamedParameter4dvNV(id, len, name, v)
+ return void
+ param id UInt32 in value
+ param len SizeI in value
+ param name UInt8 in array [1]
+ param v Float64 in array [4]
+ category NV_fragment_program
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset 685
+
+GetProgramNamedParameterfvNV(id, len, name, params)
+ return void
+ param id UInt32 in value
+ param len SizeI in value
+ param name UInt8 in array [1]
+ param params Float32 out array [4]
+ category NV_fragment_program
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset 686
+
+GetProgramNamedParameterdvNV(id, len, name, params)
+ return void
+ param id UInt32 in value
+ param len SizeI in value
+ param name UInt8 in array [1]
+ param params Float64 out array [4]
+ category NV_fragment_program
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset 687
+
+###############################################################################
+#
+# Extension #283
+# NV_half_float commands
+#
+###############################################################################
+
+# @@ Need to verify/add GLX protocol
+
+Vertex2hNV(x, y)
+ return void
+ param x Half16NV in value
+ param y Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Vertex2hvNV(v)
+ return void
+ param v Half16NV in array [2]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Vertex3hNV(x, y, z)
+ return void
+ param x Half16NV in value
+ param y Half16NV in value
+ param z Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Vertex3hvNV(v)
+ return void
+ param v Half16NV in array [3]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Vertex4hNV(x, y, z, w)
+ return void
+ param x Half16NV in value
+ param y Half16NV in value
+ param z Half16NV in value
+ param w Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Vertex4hvNV(v)
+ return void
+ param v Half16NV in array [4]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Normal3hNV(nx, ny, nz)
+ return void
+ param nx Half16NV in value
+ param ny Half16NV in value
+ param nz Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Normal3hvNV(v)
+ return void
+ param v Half16NV in array [3]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Color3hNV(red, green, blue)
+ return void
+ param red Half16NV in value
+ param green Half16NV in value
+ param blue Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Color3hvNV(v)
+ return void
+ param v Half16NV in array [3]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Color4hNV(red, green, blue, alpha)
+ return void
+ param red Half16NV in value
+ param green Half16NV in value
+ param blue Half16NV in value
+ param alpha Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Color4hvNV(v)
+ return void
+ param v Half16NV in array [4]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoord1hNV(s)
+ return void
+ param s Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoord1hvNV(v)
+ return void
+ param v Half16NV in array [1]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoord2hNV(s, t)
+ return void
+ param s Half16NV in value
+ param t Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoord2hvNV(v)
+ return void
+ param v Half16NV in array [2]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoord3hNV(s, t, r)
+ return void
+ param s Half16NV in value
+ param t Half16NV in value
+ param r Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoord3hvNV(v)
+ return void
+ param v Half16NV in array [3]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoord4hNV(s, t, r, q)
+ return void
+ param s Half16NV in value
+ param t Half16NV in value
+ param r Half16NV in value
+ param q Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoord4hvNV(v)
+ return void
+ param v Half16NV in array [4]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoord1hNV(target, s)
+ return void
+ param target TextureUnit in value
+ param s Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoord1hvNV(target, v)
+ return void
+ param target TextureUnit in value
+ param v Half16NV in array [1]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoord2hNV(target, s, t)
+ return void
+ param target TextureUnit in value
+ param s Half16NV in value
+ param t Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoord2hvNV(target, v)
+ return void
+ param target TextureUnit in value
+ param v Half16NV in array [2]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoord3hNV(target, s, t, r)
+ return void
+ param target TextureUnit in value
+ param s Half16NV in value
+ param t Half16NV in value
+ param r Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoord3hvNV(target, v)
+ return void
+ param target TextureUnit in value
+ param v Half16NV in array [3]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoord4hNV(target, s, t, r, q)
+ return void
+ param target TextureUnit in value
+ param s Half16NV in value
+ param t Half16NV in value
+ param r Half16NV in value
+ param q Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MultiTexCoord4hvNV(target, v)
+ return void
+ param target TextureUnit in value
+ param v Half16NV in array [4]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+FogCoordhNV(fog)
+ return void
+ param fog Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+FogCoordhvNV(fog)
+ return void
+ param fog Half16NV in array [1]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SecondaryColor3hNV(red, green, blue)
+ return void
+ param red Half16NV in value
+ param green Half16NV in value
+ param blue Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SecondaryColor3hvNV(v)
+ return void
+ param v Half16NV in array [3]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexWeighthNV(weight)
+ return void
+ param weight Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexWeighthvNV(weight)
+ return void
+ param weight Half16NV in array [1]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttrib1hNV(index, x)
+ return void
+ param index UInt32 in value
+ param x Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttrib1hvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Half16NV in array [1]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttrib2hNV(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Half16NV in value
+ param y Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttrib2hvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Half16NV in array [2]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttrib3hNV(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Half16NV in value
+ param y Half16NV in value
+ param z Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttrib3hvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Half16NV in array [3]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttrib4hNV(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Half16NV in value
+ param y Half16NV in value
+ param z Half16NV in value
+ param w Half16NV in value
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttrib4hvNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Half16NV in array [4]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribs1hvNV(index, n, v)
+ return void
+ param index UInt32 in value
+ param n SizeI in value
+ param v Half16NV in array [n]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribs2hvNV(index, n, v)
+ return void
+ param index UInt32 in value
+ param n SizeI in value
+ param v Half16NV in array [n]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribs3hvNV(index, n, v)
+ return void
+ param index UInt32 in value
+ param n SizeI in value
+ param v Half16NV in array [n]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribs4hvNV(index, n, v)
+ return void
+ param index UInt32 in value
+ param n SizeI in value
+ param v Half16NV in array [n]
+ category NV_half_float
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #284
+# NV_pixel_data_range commands
+#
+###############################################################################
+
+# @@ Need to verify/add GLX protocol
+
+PixelDataRangeNV(target, length, pointer)
+ return void
+ param target PixelDataRangeTargetNV in value
+ param length SizeI in value
+ param pointer Void out array [length]
+ category NV_pixel_data_range
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+FlushPixelDataRangeNV(target)
+ return void
+ param target PixelDataRangeTargetNV in value
+ category NV_pixel_data_range
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #285
+# NV_primitive_restart commands
+#
+###############################################################################
+
+# @@ Need to verify/add GLX protocol
+
+PrimitiveRestartNV()
+ return void
+ category NV_primitive_restart
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+PrimitiveRestartIndexNV(index)
+ return void
+ param index UInt32 in value
+ category NV_primitive_restart
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+
+###############################################################################
+#
+# Extension #286
+# NV_texture_expand_normal commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_texture_expand_normal
+
+###############################################################################
+#
+# Extension #287
+# NV_vertex_program2 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_vertex_program2
+
+###############################################################################
+#
+# Extension #288
+# ATI_map_object_buffer commands
+#
+###############################################################################
+
+# @@ Need to verify/add GLX protocol
+
+MapObjectBufferATI(buffer)
+ return VoidPointer
+ param buffer UInt32 in value
+ category ATI_map_object_buffer
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+UnmapObjectBufferATI(buffer)
+ return void
+ param buffer UInt32 in value
+ category ATI_map_object_buffer
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #289
+# ATI_separate_stencil commands
+#
+###############################################################################
+
+# @@ Need to verify/add GLX protocol
+
+StencilOpSeparateATI(face, sfail, dpfail, dppass)
+ return void
+ param face StencilFaceDirection in value
+ param sfail StencilOp in value
+ param dpfail StencilOp in value
+ param dppass StencilOp in value
+ category ATI_separate_stencil
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias StencilOpSeparate
+
+StencilFuncSeparateATI(frontfunc, backfunc, ref, mask)
+ return void
+ param frontfunc StencilFunction in value
+ param backfunc StencilFunction in value
+ param ref ClampedStencilValue in value
+ param mask MaskedStencilValue in value
+ category ATI_separate_stencil
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias StencilFuncSeparate
+
+###############################################################################
+#
+# Extension #290
+# ATI_vertex_attrib_array_object commands
+#
+###############################################################################
+
+# @@ Need to verify/add GLX protocol
+
+VertexAttribArrayObjectATI(index, size, type, normalized, stride, buffer, offset)
+ return void
+ param index UInt32 in value
+ param size Int32 in value
+ param type VertexAttribPointerTypeARB in value
+ param normalized Boolean in value
+ param stride SizeI in value
+ param buffer UInt32 in value
+ param offset UInt32 in value
+ category ATI_vertex_attrib_array_object
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetVertexAttribArrayObjectfvATI(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname ArrayObjectPNameATI in value
+ param params Float32 out array [pname]
+ category ATI_vertex_attrib_array_object
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVertexAttribArrayObjectivATI(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname ArrayObjectPNameATI in value
+ param params Int32 out array [pname]
+ category ATI_vertex_attrib_array_object
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #291 - OpenGL ES only, not in glext.h
+# OES_byte_coordinates commands
+#
+###############################################################################
+
+# void Vertex{234}bOES(T coords)
+# void Vertex{234}bvOES(T *coords)
+# void TexCoord{1234}bOES(T coords)
+# void TexCoord{1234}bvOES(T *coords)
+# void MultiTexCoord{1234}bOES(enum texture, T coords)
+# void MultiTexCoord{1234}bvOES(enum texture, T *coords)
+# All are handcode - mapped to non-byte GLX protocol on client side
+
+# newcategory: OES_byte_coordinates
+
+###############################################################################
+#
+# Extension #292 - OpenGL ES only, not in glext.h
+# OES_fixed_point commands
+#
+###############################################################################
+
+# Too many to list in just a comment - see spec in the extension registry
+# All are handcode - mapped to non-byte GLX protocol on client side
+
+# newcategory: OES_fixed_point
+
+###############################################################################
+#
+# Extension #293 - OpenGL ES only, not in glext.h
+# OES_single_precision commands
+#
+###############################################################################
+
+# void DepthRangefOES(clampf n, clampf f)
+# void FrustumfOES(float l, float r, float b, float t, float n, float f)
+# void OrthofOES(float l, float r, float b, float t, float n, float f)
+# void ClipPlanefOES(enum plane, const float* equation)
+# void glClearDepthfOES(clampd depth)
+# GLX ropcodes 4308-4312 (not respectively, see extension spec)
+# void GetClipPlanefOES(enum plane, float* equation)
+# GLX vendor private 1421
+
+# newcategory: OES_single_precision
+
+###############################################################################
+#
+# Extension #294 - OpenGL ES only, not in glext.h
+# OES_compressed_paletted_texture commands
+#
+###############################################################################
+
+# (none)
+# newcategory: OES_compressed_paletted_texture
+
+###############################################################################
+#
+# Extension #295 - This is an OpenGL ES extension, but also implemented in Mesa
+# OES_read_format commands
+#
+###############################################################################
+
+# (none)
+newcategory: OES_read_format
+
+###############################################################################
+#
+# Extension #296 - OpenGL ES only, not in glext.h
+# OES_query_matrix commands
+#
+###############################################################################
+
+# bitfield queryMatrixxOES(fixed mantissa[16], int exponent[16])
+# All are handcode - mapped to non-byte GLX protocol on client side
+
+# newcategory: OES_query_matrix
+
+###############################################################################
+#
+# Extension #297
+# EXT_depth_bounds_test commands
+#
+###############################################################################
+
+DepthBoundsEXT(zmin, zmax)
+ return void
+ param zmin ClampedFloat64 in value
+ param zmax ClampedFloat64 in value
+ category EXT_depth_bounds_test
+ version 1.2
+ extension
+ glxropcode 4229
+ offset 699
+
+###############################################################################
+#
+# Extension #298
+# EXT_texture_mirror_clamp commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_mirror_clamp
+
+###############################################################################
+#
+# Extension #299
+# EXT_blend_equation_separate commands
+#
+###############################################################################
+
+BlendEquationSeparateEXT(modeRGB, modeAlpha)
+ return void
+ param modeRGB BlendEquationModeEXT in value
+ param modeAlpha BlendEquationModeEXT in value
+ category EXT_blend_equation_separate
+ version 1.2
+ extension
+ glxropcode 4228
+ alias BlendEquationSeparate
+
+###############################################################################
+#
+# Extension #300
+# MESA_pack_invert commands
+#
+###############################################################################
+
+# (none)
+newcategory: MESA_pack_invert
+
+###############################################################################
+#
+# Extension #301
+# MESA_ycbcr_texture commands
+#
+###############################################################################
+
+# (none)
+newcategory: MESA_ycbcr_texture
+
+###############################################################################
+#
+# Extension #301
+# MESA_ycbcr_texture commands
+#
+###############################################################################
+
+# (none)
+newcategory: MESA_ycbcr_texture
+
+###############################################################################
+#
+# Extension #302
+# EXT_pixel_buffer_object commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_pixel_buffer_object
+
+###############################################################################
+#
+# Extension #303
+# NV_fragment_program_option commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_fragment_program_option
+
+###############################################################################
+#
+# Extension #304
+# NV_fragment_program2 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_fragment_program2
+
+###############################################################################
+#
+# Extension #305
+# NV_vertex_program2_option commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_vertex_program2_option
+
+###############################################################################
+#
+# Extension #306
+# NV_vertex_program3 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_vertex_program3
+
+###############################################################################
+#
+# Extension #307 - GLX_SGIX_hyperpipe commands
+# Extension #308 - GLX_MESA_agp_offset commands
+# Extension #309 - GL_EXT_texture_compression_dxt1 (OpenGL ES only, subset of _st3c version)
+#
+###############################################################################
+
+# (none)
+# newcategory: EXT_texture_compression_dxt1
+
+###############################################################################
+#
+# Extension #310
+# EXT_framebuffer_object commands
+#
+###############################################################################
+
+IsRenderbufferEXT(renderbuffer)
+ return Boolean
+ param renderbuffer UInt32 in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxvendorpriv 1422
+ glxflags ignore
+ alias IsRenderbuffer
+
+# Not aliased to BindRenderbuffer
+BindRenderbufferEXT(target, renderbuffer)
+ return void
+ param target RenderbufferTarget in value
+ param renderbuffer UInt32 in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxropcode 4316
+ glxflags ignore
+
+DeleteRenderbuffersEXT(n, renderbuffers)
+ return void
+ param n SizeI in value
+ param renderbuffers UInt32 in array [n]
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxropcode 4317
+ glxflags ignore
+ alias DeleteRenderbuffers
+
+GenRenderbuffersEXT(n, renderbuffers)
+ return void
+ param n SizeI in value
+ param renderbuffers UInt32 out array [n]
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxvendorpriv 1423
+ glxflags ignore
+ alias GenRenderbuffers
+
+RenderbufferStorageEXT(target, internalformat, width, height)
+ return void
+ param target RenderbufferTarget in value
+ param internalformat GLenum in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxropcode 4318
+ glxflags ignore
+ alias RenderbufferStorage
+
+GetRenderbufferParameterivEXT(target, pname, params)
+ return void
+ param target RenderbufferTarget in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_framebuffer_object
+ dlflags notlistable
+ version 1.2
+ extension
+ glxvendorpriv 1424
+ glxflags ignore
+ alias GetRenderbufferParameteriv
+
+IsFramebufferEXT(framebuffer)
+ return Boolean
+ param framebuffer UInt32 in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxvendorpriv 1425
+ glxflags ignore
+ alias IsFramebuffer
+
+# Not aliased to BindFramebuffer
+BindFramebufferEXT(target, framebuffer)
+ return void
+ param target FramebufferTarget in value
+ param framebuffer UInt32 in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxropcode 4319
+ glxflags ignore
+
+DeleteFramebuffersEXT(n, framebuffers)
+ return void
+ param n SizeI in value
+ param framebuffers UInt32 in array [n]
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxropcode 4320
+ glxflags ignore
+ alias DeleteFramebuffers
+
+GenFramebuffersEXT(n, framebuffers)
+ return void
+ param n SizeI in value
+ param framebuffers UInt32 out array [n]
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxvendorpriv 1426
+ glxflags ignore
+ alias GenFramebuffers
+
+CheckFramebufferStatusEXT(target)
+ return GLenum
+ param target FramebufferTarget in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxvendorpriv 1427
+ glxflags ignore
+ alias CheckFramebufferStatus
+
+FramebufferTexture1DEXT(target, attachment, textarget, texture, level)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param textarget GLenum in value
+ param texture UInt32 in value
+ param level Int32 in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxropcode 4321
+ glxflags ignore
+ alias FramebufferTexture1D
+
+FramebufferTexture2DEXT(target, attachment, textarget, texture, level)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param textarget GLenum in value
+ param texture UInt32 in value
+ param level Int32 in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxropcode 4322
+ glxflags ignore
+ alias FramebufferTexture2D
+
+FramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param textarget GLenum in value
+ param texture UInt32 in value
+ param level Int32 in value
+ param zoffset Int32 in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxropcode 4323
+ glxflags ignore
+ alias FramebufferTexture3D
+
+FramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param renderbuffertarget RenderbufferTarget in value
+ param renderbuffer UInt32 in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxropcode 4324
+ glxflags ignore
+ alias FramebufferRenderbuffer
+
+GetFramebufferAttachmentParameterivEXT(target, attachment, pname, params)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_framebuffer_object
+ dlflags notlistable
+ version 1.2
+ extension
+ glxvendorpriv 1428
+ glxflags ignore
+ alias GetFramebufferAttachmentParameteriv
+
+GenerateMipmapEXT(target)
+ return void
+ param target GLenum in value
+ category EXT_framebuffer_object
+ version 1.2
+ extension
+ glxropcode 4325
+ glxflags ignore
+ alias GenerateMipmap
+
+
+###############################################################################
+#
+# Extension #311
+# GREMEDY_string_marker commands
+#
+###############################################################################
+
+StringMarkerGREMEDY(len, string)
+ return void
+ param len SizeI in value
+ param string Void in array [len]
+ category GREMEDY_string_marker
+ version 1.0
+ extension
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #312
+# EXT_packed_depth_stencil commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_packed_depth_stencil
+
+###############################################################################
+#
+# Extension #313 - WGL_3DL_stereo_control
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #314
+# EXT_stencil_clear_tag commands
+#
+###############################################################################
+
+StencilClearTagEXT(stencilTagBits, stencilClearTag)
+ return void
+ param stencilTagBits SizeI in value
+ param stencilClearTag UInt32 in value
+ category EXT_stencil_clear_tag
+ version 1.5
+ extension
+ glxropcode 4223
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #315
+# EXT_texture_sRGB commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_sRGB
+
+###############################################################################
+#
+# Extension #316
+# EXT_framebuffer_blit commands
+#
+###############################################################################
+
+BlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter)
+ return void
+ param srcX0 Int32 in value
+ param srcY0 Int32 in value
+ param srcX1 Int32 in value
+ param srcY1 Int32 in value
+ param dstX0 Int32 in value
+ param dstY0 Int32 in value
+ param dstX1 Int32 in value
+ param dstY1 Int32 in value
+ param mask ClearBufferMask in value
+ param filter GLenum in value
+ category EXT_framebuffer_blit
+ version 1.5
+ glxropcode 4330
+ alias BlitFramebuffer
+
+###############################################################################
+#
+# Extension #317
+# EXT_framebuffer_multisample commands
+#
+###############################################################################
+
+RenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height)
+ return void
+ param target GLenum in value
+ param samples SizeI in value
+ param internalformat GLenum in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_framebuffer_multisample
+ version 1.5
+ glxropcode 4331
+ alias RenderbufferStorageMultisample
+
+###############################################################################
+#
+# Extension #318
+# MESAX_texture_stack commands
+#
+###############################################################################
+
+# (none)
+newcategory: MESAX_texture_stack
+
+###############################################################################
+#
+# Extension #319
+# EXT_timer_query commands
+#
+###############################################################################
+
+GetQueryObjecti64vEXT(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname GLenum in value
+ param params Int64EXT out array [pname]
+ category EXT_timer_query
+ dlflags notlistable
+ version 1.5
+ glxvendorpriv 1328
+ glxflags ignore
+ offset ?
+
+GetQueryObjectui64vEXT(id, pname, params)
+ return void
+ param id UInt32 in value
+ param pname GLenum in value
+ param params UInt64EXT out array [pname]
+ category EXT_timer_query
+ dlflags notlistable
+ version 1.5
+ glxvendorpriv 1329
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #320
+# EXT_gpu_program_parameters commands
+#
+###############################################################################
+
+ProgramEnvParameters4fvEXT(target, index, count, params)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params Float32 in array [count*4]
+ category EXT_gpu_program_parameters
+ version 1.2
+ glxropcode 4281
+ offset ?
+
+ProgramLocalParameters4fvEXT(target, index, count, params)
+ return void
+ param target ProgramTargetARB in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params Float32 in array [count*4]
+ category EXT_gpu_program_parameters
+ version 1.2
+ glxropcode 4282
+ offset ?
+
+###############################################################################
+#
+# Extension #321
+# APPLE_flush_buffer_range commands
+#
+###############################################################################
+
+BufferParameteriAPPLE(target, pname, param)
+ return void
+ param target GLenum in value
+ param pname GLenum in value
+ param param Int32 in value
+ category APPLE_flush_buffer_range
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+FlushMappedBufferRangeAPPLE(target, offset, size)
+ return void
+ param target GLenum in value
+ param offset BufferOffset in value
+ param size BufferSize in value
+ category APPLE_flush_buffer_range
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ alias FlushMappedBufferRange
+
+###############################################################################
+#
+# Extension #322
+# NV_gpu_program4 commands
+#
+###############################################################################
+
+ProgramLocalParameterI4iNV(target, index, x, y, z, w)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param x Int32 in value
+ param y Int32 in value
+ param z Int32 in value
+ param w Int32 in value
+ category NV_gpu_program4
+ version 1.3
+ vectorequiv ProgramLocalParameterI4ivNV
+ glxvectorequiv ProgramLocalParameterI4ivNV
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramLocalParameterI4ivNV(target, index, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params Int32 in array [4]
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramLocalParametersI4ivNV(target, index, count, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params Int32 in array [count*4]
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramLocalParameterI4uiNV(target, index, x, y, z, w)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param x UInt32 in value
+ param y UInt32 in value
+ param z UInt32 in value
+ param w UInt32 in value
+ category NV_gpu_program4
+ version 1.3
+ vectorequiv ProgramLocalParameterI4uivNV
+ glxvectorequiv ProgramLocalParameterI4uivNV
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramLocalParameterI4uivNV(target, index, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params UInt32 in array [4]
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramLocalParametersI4uivNV(target, index, count, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params UInt32 in array [count*4]
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramEnvParameterI4iNV(target, index, x, y, z, w)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param x Int32 in value
+ param y Int32 in value
+ param z Int32 in value
+ param w Int32 in value
+ category NV_gpu_program4
+ version 1.3
+ vectorequiv ProgramEnvParameterI4ivNV
+ glxvectorequiv ProgramEnvParameterI4ivNV
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramEnvParameterI4ivNV(target, index, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params Int32 in array [4]
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramEnvParametersI4ivNV(target, index, count, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params Int32 in array [count*4]
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramEnvParameterI4uiNV(target, index, x, y, z, w)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param x UInt32 in value
+ param y UInt32 in value
+ param z UInt32 in value
+ param w UInt32 in value
+ category NV_gpu_program4
+ version 1.3
+ vectorequiv ProgramEnvParameterI4uivNV
+ glxvectorequiv ProgramEnvParameterI4uivNV
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramEnvParameterI4uivNV(target, index, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params UInt32 in array [4]
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramEnvParametersI4uivNV(target, index, count, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params UInt32 in array [count*4]
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+GetProgramLocalParameterIivNV(target, index, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params Int32 out array [4]
+ dlflags notlistable
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+GetProgramLocalParameterIuivNV(target, index, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params UInt32 out array [4]
+ dlflags notlistable
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+GetProgramEnvParameterIivNV(target, index, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params Int32 out array [4]
+ dlflags notlistable
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+GetProgramEnvParameterIuivNV(target, index, params)
+ return void
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params UInt32 out array [4]
+ dlflags notlistable
+ category NV_gpu_program4
+ version 1.3
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# Extension #323
+# NV_geometry_program4 commands
+#
+###############################################################################
+
+ProgramVertexLimitNV(target, limit)
+ return void
+ param target ProgramTarget in value
+ param limit Int32 in value
+ category NV_geometry_program4
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+
+FramebufferTextureEXT(target, attachment, texture, level)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ category NV_geometry_program4
+ version 2.0
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ alias FramebufferTextureARB
+
+FramebufferTextureLayerEXT(target, attachment, texture, level, layer)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ param layer CheckedInt32 in value
+ category NV_geometry_program4
+ version 2.0
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ alias FramebufferTextureLayer
+
+FramebufferTextureFaceEXT(target, attachment, texture, level, face)
+ return void
+ param target FramebufferTarget in value
+ param attachment FramebufferAttachment in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ param face TextureTarget in value
+ category NV_geometry_program4
+ version 2.0
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ alias FramebufferTextureFaceARB
+
+###############################################################################
+#
+# Extension #324
+# EXT_geometry_shader4 commands
+#
+###############################################################################
+
+ProgramParameteriEXT(program, pname, value)
+ return void
+ param program UInt32 in value
+ param pname ProgramParameterPName in value
+ param value Int32 in value
+ category EXT_geometry_shader4
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias ProgramParameteriARB
+
+###############################################################################
+#
+# Extension #325
+# NV_vertex_program4 commands
+#
+###############################################################################
+
+VertexAttribI1iEXT(index, x)
+ return void
+ param index UInt32 in value
+ param x Int32 in value
+ category NV_vertex_program4
+ beginend allow-inside
+ vectorequiv VertexAttribI1ivEXT
+ glxvectorequiv VertexAttribI1ivEXT
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI1i
+
+VertexAttribI2iEXT(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Int32 in value
+ param y Int32 in value
+ category NV_vertex_program4
+ beginend allow-inside
+ vectorequiv VertexAttribI2ivEXT
+ glxvectorequiv VertexAttribI2ivEXT
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI2i
+
+VertexAttribI3iEXT(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Int32 in value
+ param y Int32 in value
+ param z Int32 in value
+ category NV_vertex_program4
+ beginend allow-inside
+ vectorequiv VertexAttribI3ivEXT
+ glxvectorequiv VertexAttribI3ivEXT
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI3i
+
+VertexAttribI4iEXT(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Int32 in value
+ param y Int32 in value
+ param z Int32 in value
+ param w Int32 in value
+ category NV_vertex_program4
+ beginend allow-inside
+ vectorequiv VertexAttribI4ivEXT
+ glxvectorequiv VertexAttribI4ivEXT
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI4i
+
+VertexAttribI1uiEXT(index, x)
+ return void
+ param index UInt32 in value
+ param x UInt32 in value
+ category NV_vertex_program4
+ beginend allow-inside
+ vectorequiv VertexAttribI1uivEXT
+ glxvectorequiv VertexAttribI1uivEXT
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI1ui
+
+VertexAttribI2uiEXT(index, x, y)
+ return void
+ param index UInt32 in value
+ param x UInt32 in value
+ param y UInt32 in value
+ category NV_vertex_program4
+ beginend allow-inside
+ vectorequiv VertexAttribI2uivEXT
+ glxvectorequiv VertexAttribI2uivEXT
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI2ui
+
+VertexAttribI3uiEXT(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x UInt32 in value
+ param y UInt32 in value
+ param z UInt32 in value
+ category NV_vertex_program4
+ beginend allow-inside
+ vectorequiv VertexAttribI3uivEXT
+ glxvectorequiv VertexAttribI3uivEXT
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI3ui
+
+VertexAttribI4uiEXT(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x UInt32 in value
+ param y UInt32 in value
+ param z UInt32 in value
+ param w UInt32 in value
+ category NV_vertex_program4
+ beginend allow-inside
+ vectorequiv VertexAttribI4uivEXT
+ glxvectorequiv VertexAttribI4uivEXT
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI4ui
+
+VertexAttribI1ivEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [1]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI1iv
+
+VertexAttribI2ivEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [2]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI2iv
+
+VertexAttribI3ivEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [3]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI3iv
+
+VertexAttribI4ivEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v Int32 in array [4]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI4iv
+
+VertexAttribI1uivEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [1]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI1uiv
+
+VertexAttribI2uivEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [2]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI2uiv
+
+VertexAttribI3uivEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [3]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI3uiv
+
+VertexAttribI4uivEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt32 in array [4]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI4uiv
+
+VertexAttribI4bvEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v Int8 in array [4]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI4bv
+
+VertexAttribI4svEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v Int16 in array [4]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI4sv
+
+VertexAttribI4ubvEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt8 in array [4]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI4ubv
+
+VertexAttribI4usvEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt16 in array [4]
+ category NV_vertex_program4
+ beginend allow-inside
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribI4usv
+
+VertexAttribIPointerEXT(index, size, type, stride, pointer)
+ return void
+ param index UInt32 in value
+ param size Int32 in value
+ param type VertexAttribEnum in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride)] retained
+ category NV_vertex_program4
+ dlflags notlistable
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias VertexAttribIPointer
+
+GetVertexAttribIivEXT(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribEnum in value
+ param params Int32 out array [1]
+ category NV_vertex_program4
+ dlflags notlistable
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias GetVertexAttribIiv
+
+GetVertexAttribIuivEXT(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname VertexAttribEnum in value
+ param params UInt32 out array [1]
+ category NV_vertex_program4
+ dlflags notlistable
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ alias GetVertexAttribIuiv
+
+###############################################################################
+#
+# Extension #326
+# EXT_gpu_shader4 commands
+#
+###############################################################################
+
+GetUniformuivEXT(program, location, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param params UInt32 out array [COMPSIZE(program/location)]
+ category EXT_gpu_shader4
+ dlflags notlistable
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias GetUniformuiv
+
+BindFragDataLocationEXT(program, color, name)
+ return void
+ param program UInt32 in value
+ param color UInt32 in value
+ param name Char in array [COMPSIZE(name)]
+ category EXT_gpu_shader4
+ dlflags notlistable
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias BindFragDataLocation
+
+GetFragDataLocationEXT(program, name)
+ return Int32
+ param program UInt32 in value
+ param name Char in array [COMPSIZE(name)]
+ category EXT_gpu_shader4
+ dlflags notlistable
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias GetFragDataLocation
+
+Uniform1uiEXT(location, v0)
+ return void
+ param location Int32 in value
+ param v0 UInt32 in value
+ category EXT_gpu_shader4
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias Uniform1ui
+
+Uniform2uiEXT(location, v0, v1)
+ return void
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ category EXT_gpu_shader4
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias Uniform2ui
+
+Uniform3uiEXT(location, v0, v1, v2)
+ return void
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ param v2 UInt32 in value
+ category EXT_gpu_shader4
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias Uniform3ui
+
+Uniform4uiEXT(location, v0, v1, v2, v3)
+ return void
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ param v2 UInt32 in value
+ param v3 UInt32 in value
+ category EXT_gpu_shader4
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias Uniform4ui
+
+Uniform1uivEXT(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count]
+ category EXT_gpu_shader4
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias Uniform1uiv
+
+Uniform2uivEXT(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count*2]
+ category EXT_gpu_shader4
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias Uniform2uiv
+
+Uniform3uivEXT(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count*3]
+ category EXT_gpu_shader4
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias Uniform3uiv
+
+Uniform4uivEXT(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count*4]
+ category EXT_gpu_shader4
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias Uniform4uiv
+
+###############################################################################
+#
+# Extension #327
+# EXT_draw_instanced commands
+#
+###############################################################################
+
+DrawArraysInstancedEXT(mode, start, count, primcount)
+ return void
+ param mode BeginMode in value
+ param start Int32 in value
+ param count SizeI in value
+ param primcount SizeI in value
+ category EXT_draw_instanced
+ version 2.0
+ extension soft WINSOFT
+ dlflags notlistable
+ vectorequiv ArrayElement
+ glfflags ignore
+ glxflags ignore
+ alias DrawArraysInstancedARB
+
+DrawElementsInstancedEXT(mode, count, type, indices, primcount)
+ return void
+ param mode BeginMode in value
+ param count SizeI in value
+ param type DrawElementsType in value
+ param indices Void in array [COMPSIZE(count/type)]
+ param primcount SizeI in value
+ category EXT_draw_instanced
+ version 2.0
+ extension soft WINSOFT
+ dlflags notlistable
+ vectorequiv ArrayElement
+ glfflags ignore
+ glxflags ignore
+ alias DrawElementsInstancedARB
+
+###############################################################################
+#
+# Extension #328
+# EXT_packed_float commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_packed_float
+
+###############################################################################
+#
+# Extension #329
+# EXT_texture_array commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_array
+
+###############################################################################
+#
+# Extension #330
+# EXT_texture_buffer_object commands
+#
+###############################################################################
+
+TexBufferEXT(target, internalformat, buffer)
+ return void
+ param target TextureTarget in value
+ param internalformat GLenum in value
+ param buffer UInt32 in value
+ category EXT_texture_buffer_object
+ version 2.0
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ alias TexBufferARB
+
+###############################################################################
+#
+# Extension #331
+# EXT_texture_compression_latc commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_compression_latc
+
+###############################################################################
+#
+# Extension #332
+# EXT_texture_compression_rgtc commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_compression_rgtc
+
+###############################################################################
+#
+# Extension #333
+# EXT_texture_shared_exponent commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_shared_exponent
+
+###############################################################################
+#
+# Extension #334
+# NV_depth_buffer_float commands
+#
+###############################################################################
+
+DepthRangedNV(zNear, zFar)
+ return void
+ param zNear Float64 in value
+ param zFar Float64 in value
+ category NV_depth_buffer_float
+ extension soft WINSOFT NV50
+ version 2.0
+ glfflags ignore
+ glxflags ignore
+
+ClearDepthdNV(depth)
+ return void
+ param depth Float64 in value
+ category NV_depth_buffer_float
+ extension soft WINSOFT NV50
+ version 2.0
+ glfflags ignore
+ glxflags ignore
+
+DepthBoundsdNV(zmin, zmax)
+ return void
+ param zmin Float64 in value
+ param zmax Float64 in value
+ category NV_depth_buffer_float
+ extension soft WINSOFT NV50
+ version 2.0
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# Extension #335
+# NV_fragment_program4 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_fragment_program4
+
+###############################################################################
+#
+# Extension #336
+# NV_framebuffer_multisample_coverage commands
+#
+###############################################################################
+
+RenderbufferStorageMultisampleCoverageNV(target, coverageSamples, colorSamples, internalformat, width, height)
+ return void
+ param target RenderbufferTarget in value
+ param coverageSamples SizeI in value
+ param colorSamples SizeI in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ category NV_framebuffer_multisample_coverage
+ version 1.5
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# Extension #337
+# EXT_framebuffer_sRGB commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_framebuffer_sRGB
+
+###############################################################################
+#
+# Extension #338
+# NV_geometry_shader4 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_geometry_shader4
+
+###############################################################################
+#
+# Extension #339
+# NV_parameter_buffer_object commands
+#
+###############################################################################
+
+ProgramBufferParametersfvNV(target, buffer, index, count, params)
+ return void
+ param target ProgramTarget in value
+ param buffer UInt32 in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params Float32 in array [count]
+ category NV_parameter_buffer_object
+ version 1.2
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramBufferParametersIivNV(target, buffer, index, count, params)
+ return void
+ param target ProgramTarget in value
+ param buffer UInt32 in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params Int32 in array [count]
+ category NV_parameter_buffer_object
+ version 1.2
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ProgramBufferParametersIuivNV(target, buffer, index, count, params)
+ return void
+ param target ProgramTarget in value
+ param buffer UInt32 in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params UInt32 in array [count]
+ category NV_parameter_buffer_object
+ version 1.2
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# Extension #340
+# EXT_draw_buffers2 commands
+#
+###############################################################################
+
+ColorMaskIndexedEXT(index, r, g, b, a)
+ return void
+ param index UInt32 in value
+ param r Boolean in value
+ param g Boolean in value
+ param b Boolean in value
+ param a Boolean in value
+ category EXT_draw_buffers2
+ version 2.0
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias ColorMaski
+
+GetBooleanIndexedvEXT(target, index, data)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param data Boolean out array [COMPSIZE(target)]
+ category EXT_draw_buffers2
+ version 2.0
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias GetBooleani_v
+
+GetIntegerIndexedvEXT(target, index, data)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param data Int32 out array [COMPSIZE(target)]
+ category EXT_draw_buffers2
+ version 2.0
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias GetIntegeri_v
+
+EnableIndexedEXT(target, index)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ category EXT_draw_buffers2
+ version 2.0
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias Enablei
+
+DisableIndexedEXT(target, index)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ category EXT_draw_buffers2
+ version 2.0
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias Disablei
+
+IsEnabledIndexedEXT(target, index)
+ return Boolean
+ param target GLenum in value
+ param index UInt32 in value
+ category EXT_draw_buffers2
+ version 2.0
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias IsEnabledi
+
+###############################################################################
+#
+# Extension #341
+# NV_transform_feedback commands
+#
+###############################################################################
+
+BeginTransformFeedbackNV(primitiveMode)
+ return void
+ param primitiveMode GLenum in value
+ category NV_transform_feedback
+ version 1.5
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias BeginTransformFeedback
+
+EndTransformFeedbackNV()
+ return void
+ category NV_transform_feedback
+ version 1.5
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias EndTransformFeedback
+
+TransformFeedbackAttribsNV(count, attribs, bufferMode)
+ return void
+ param count UInt32 in value
+ param attribs Int32 in array [COMPSIZE(count)]
+ param bufferMode GLenum in value
+ category NV_transform_feedback
+ version 1.5
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+
+BindBufferRangeNV(target, index, buffer, offset, size)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param buffer UInt32 in value
+ param offset BufferOffset in value
+ param size BufferSize in value
+ category NV_transform_feedback
+ version 1.5
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias BindBufferRange
+
+BindBufferOffsetNV(target, index, buffer, offset)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param buffer UInt32 in value
+ param offset BufferOffset in value
+ category NV_transform_feedback
+ version 1.5
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias BindBufferOffsetEXT
+
+BindBufferBaseNV(target, index, buffer)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param buffer UInt32 in value
+ category NV_transform_feedback
+ version 1.5
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias BindBufferBase
+
+TransformFeedbackVaryingsNV(program, count, locations, bufferMode)
+ return void
+ param program UInt32 in value
+ param count SizeI in value
+ param locations Int32 in array [count]
+ param bufferMode GLenum in value
+ category NV_transform_feedback
+ version 1.5
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias TransformFeedbackVaryings
+
+ActiveVaryingNV(program, name)
+ return void
+ param program UInt32 in value
+ param name Char in array [COMPSIZE(name)]
+ category NV_transform_feedback
+ version 1.5
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+
+GetVaryingLocationNV(program, name)
+ return Int32
+ param program UInt32 in value
+ param name Char in array [COMPSIZE(name)]
+ category NV_transform_feedback
+ dlflags notlistable
+ version 1.5
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+
+GetActiveVaryingNV(program, index, bufSize, length, size, type, name)
+ return void
+ param program UInt32 in value
+ param index UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param size SizeI out array [1]
+ param type GLenum out array [1]
+ param name Char out array [COMPSIZE(program/index/bufSize)]
+ category NV_transform_feedback
+ dlflags notlistable
+ version 1.5
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+
+GetTransformFeedbackVaryingNV(program, index, location)
+ return void
+ param program UInt32 in value
+ param index UInt32 in value
+ param location Int32 out array [1]
+ category NV_transform_feedback
+ dlflags notlistable
+ version 1.5
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias GetTransformFeedbackVarying
+
+# These commands require ARB_transform_feedback3
+#@@ void TransformFeedbackStreamAttribsNV(sizei count, const int * attribs, sizei nbuffers, const int *bufstreams, enum bufferMode);
+
+TransformFeedbackStreamAttribsNV(count, attribs, nbuffers, bufstreams, bufferMode)
+ return void
+ param count SizeI in value
+ param attribs Int32 in array [count]
+ param nbuffers SizeI in value
+ param bufstreams Int32 in array [nbuffers]
+ param bufferMode GLenum in value
+ category NV_transform_feedback
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+
+###############################################################################
+#
+# Extension #342
+# EXT_bindable_uniform commands
+#
+###############################################################################
+
+UniformBufferEXT(program, location, buffer)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param buffer UInt32 in value
+ category EXT_bindable_uniform
+ version 2.0
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+GetUniformBufferSizeEXT(program, location)
+ return Int32
+ param program UInt32 in value
+ param location Int32 in value
+ category EXT_bindable_uniform
+ dlflags notlistable
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+
+GetUniformOffsetEXT(program, location)
+ return BufferOffset
+ param program UInt32 in value
+ param location Int32 in value
+ category EXT_bindable_uniform
+ dlflags notlistable
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# Extension #343
+# EXT_texture_integer extension commands
+#
+###############################################################################
+
+TexParameterIivEXT(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params Int32 in array [COMPSIZE(pname)]
+ category EXT_texture_integer
+ version 2.0
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ alias TexParameterIiv
+
+TexParameterIuivEXT(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params UInt32 in array [COMPSIZE(pname)]
+ category EXT_texture_integer
+ version 2.0
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ alias TexParameterIuiv
+
+GetTexParameterIivEXT(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_texture_integer
+ dlflags notlistable
+ version 1.0
+ version 2.0
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ alias GetTexParameterIiv
+
+GetTexParameterIuivEXT(target, pname, params)
+ return void
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params UInt32 out array [COMPSIZE(pname)]
+ category EXT_texture_integer
+ dlflags notlistable
+ version 1.0
+ version 2.0
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ alias GetTexParameterIuiv
+
+ClearColorIiEXT(red, green, blue, alpha)
+ return void
+ param red Int32 in value
+ param green Int32 in value
+ param blue Int32 in value
+ param alpha Int32 in value
+ category EXT_texture_integer
+ version 2.0
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+ClearColorIuiEXT(red, green, blue, alpha)
+ return void
+ param red UInt32 in value
+ param green UInt32 in value
+ param blue UInt32 in value
+ param alpha UInt32 in value
+ category EXT_texture_integer
+ version 2.0
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# Extension #344 - GLX_EXT_texture_from_pixmap
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #345
+# GREMEDY_frame_terminator commands
+#
+###############################################################################
+
+FrameTerminatorGREMEDY()
+ return void
+ category GREMEDY_frame_terminator
+ version 1.0
+ extension
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #346
+# NV_conditional_render commands
+#
+###############################################################################
+
+BeginConditionalRenderNV(id, mode)
+ return void
+ param id UInt32 in value
+ param mode TypeEnum in value
+ category NV_conditional_render
+ glfflags ignore
+ glxflags ignore
+ alias BeginConditionalRender
+
+EndConditionalRenderNV()
+ return void
+ category NV_conditional_render
+ glfflags ignore
+ glxflags ignore
+ alias EndConditionalRender
+
+###############################################################################
+#
+# Extension #347
+# NV_present_video commands
+#
+###############################################################################
+
+# TBD
+# void PresentFrameKeyedNV(uint video_slot, uint64EXT minPresentTime,
+# uint beginPresentTimeId, uint
+# presentDurationId, enum type, enum target0,
+# uint fill0, uint key0, enum target1, uint
+# fill1, uint key1);
+#
+# void PresentFrameDualFillNV(uint video_slot, uint64EXT
+# minPresentTime, uint beginPresentTimeId,
+# uint presentDurationId, enum type, enum
+# target0, uint fill0, enum target1, uint
+# fill1, enum target2, uint fill2, enum
+# target3, uint fill3);
+#
+# void GetVideoivNV(uint video_slot, enum pname, int *params);
+# void GetVideouivNV(uint video_slot, enum pname, uint *params);
+# void GetVideoi64vNV(uint video_slot, enum pname, int64EXT *params);
+# void GetVideoui64vNV(uint video_slot, enum pname, uint64EXT *params);
+# void VideoParameterivNV(uint video_slot, enum pname, const int *params);
+
+PresentFrameKeyedNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, key0, target1, fill1, key1)
+ return void
+ param video_slot UInt32 in value
+ param minPresentTime UInt64EXT in value
+ param beginPresentTimeId UInt32 in value
+ param presentDurationId UInt32 in value
+ param type GLenum in value
+ param target0 GLenum in value
+ param fill0 UInt32 in value
+ param key0 UInt32 in value
+ param target1 GLenum in value
+ param fill1 UInt32 in value
+ param key1 UInt32 in value
+ category NV_present_video
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+PresentFrameDualFillNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, target1, fill1, target2, fill2, target3, fill3)
+ return void
+ param video_slot UInt32 in value
+ param minPresentTime UInt64EXT in value
+ param beginPresentTimeId UInt32 in value
+ param presentDurationId UInt32 in value
+ param type GLenum in value
+ param target0 GLenum in value
+ param fill0 UInt32 in value
+ param target1 GLenum in value
+ param fill1 UInt32 in value
+ param target2 GLenum in value
+ param fill2 UInt32 in value
+ param target3 GLenum in value
+ param fill3 UInt32 in value
+ category NV_present_video
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetVideoivNV(video_slot, pname, params)
+ return void
+ param video_slot UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category NV_present_video
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVideouivNV(video_slot, pname, params)
+ return void
+ param video_slot UInt32 in value
+ param pname GLenum in value
+ param params UInt32 out array [COMPSIZE(pname)]
+ category NV_present_video
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVideoi64vNV(video_slot, pname, params)
+ return void
+ param video_slot UInt32 in value
+ param pname GLenum in value
+ param params Int64EXT out array [COMPSIZE(pname)]
+ category NV_present_video
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVideoui64vNV(video_slot, pname, params)
+ return void
+ param video_slot UInt32 in value
+ param pname GLenum in value
+ param params UInt64EXT out array [COMPSIZE(pname)]
+ category NV_present_video
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #348 - GLX_NV_video_out
+# Extension #349 - WGL_NV_video_out
+# Extension #350 - GLX_NV_swap_group
+# Extension #351 - WGL_NV_swap_group
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #352
+# EXT_transform_feedback commands
+#
+###############################################################################
+
+# From EXT_draw_buffers2: GetBooleanIndexedvEXT / GetIntegerIndexedvEXT
+
+BeginTransformFeedbackEXT(primitiveMode)
+ return void
+ param primitiveMode GLenum in value
+ category EXT_transform_feedback
+ version 2.0
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias BeginTransformFeedback
+
+EndTransformFeedbackEXT()
+ return void
+ category EXT_transform_feedback
+ version 2.0
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias EndTransformFeedback
+
+BindBufferRangeEXT(target, index, buffer, offset, size)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param buffer UInt32 in value
+ param offset BufferOffset in value
+ param size BufferSize in value
+ category EXT_transform_feedback
+ version 2.0
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias BindBufferRange
+
+# Not promoted to the OpenGL 3.0 core
+BindBufferOffsetEXT(target, index, buffer, offset)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param buffer UInt32 in value
+ param offset BufferOffset in value
+ category EXT_transform_feedback
+ version 2.0
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+
+BindBufferBaseEXT(target, index, buffer)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param buffer UInt32 in value
+ category EXT_transform_feedback
+ version 2.0
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias BindBufferBase
+
+TransformFeedbackVaryingsEXT(program, count, varyings, bufferMode)
+ return void
+ param program UInt32 in value
+ param count SizeI in value
+ param varyings CharPointer in array [count]
+ param bufferMode GLenum in value
+ category EXT_transform_feedback
+ version 2.0
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+ alias TransformFeedbackVaryings
+
+GetTransformFeedbackVaryingEXT(program, index, bufSize, length, size, type, name)
+ return void
+ param program UInt32 in value
+ param index UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param size SizeI out array [1]
+ param type GLenum out array [1]
+ param name Char out array [COMPSIZE(length)]
+ category EXT_transform_feedback
+ dlflags notlistable
+ version 2.0
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ alias GetTransformFeedbackVarying
+
+###############################################################################
+#
+# Extension #353
+# EXT_direct_state_access commands
+#
+###############################################################################
+
+# New 1.1 client commands
+
+ClientAttribDefaultEXT(mask)
+ return void
+ param mask ClientAttribMask in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore ### client-handcode client-intercept server-handcode
+
+PushClientAttribDefaultEXT(mask)
+ return void
+ param mask ClientAttribMask in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore ### client-handcode client-intercept server-handcode
+
+# New 1.0 matrix commands
+
+MatrixLoadfEXT(mode, m)
+ return void
+ param mode MatrixMode in value
+ param m Float32 in array [16]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixLoaddEXT(mode, m)
+ return void
+ param mode MatrixMode in value
+ param m Float64 in array [16]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixMultfEXT(mode, m)
+ return void
+ param mode MatrixMode in value
+ param m Float32 in array [16]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixMultdEXT(mode, m)
+ return void
+ param mode MatrixMode in value
+ param m Float64 in array [16]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixLoadIdentityEXT(mode)
+ return void
+ param mode MatrixMode in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixRotatefEXT(mode, angle, x, y, z)
+ return void
+ param mode MatrixMode in value
+ param angle Float32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixRotatedEXT(mode, angle, x, y, z)
+ return void
+ param mode MatrixMode in value
+ param angle Float64 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixScalefEXT(mode, x, y, z)
+ return void
+ param mode MatrixMode in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixScaledEXT(mode, x, y, z)
+ return void
+ param mode MatrixMode in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixTranslatefEXT(mode, x, y, z)
+ return void
+ param mode MatrixMode in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixTranslatedEXT(mode, x, y, z)
+ return void
+ param mode MatrixMode in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixFrustumEXT(mode, left, right, bottom, top, zNear, zFar)
+ return void
+ param mode MatrixMode in value
+ param left Float64 in value
+ param right Float64 in value
+ param bottom Float64 in value
+ param top Float64 in value
+ param zNear Float64 in value
+ param zFar Float64 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixOrthoEXT(mode, left, right, bottom, top, zNear, zFar)
+ return void
+ param mode MatrixMode in value
+ param left Float64 in value
+ param right Float64 in value
+ param bottom Float64 in value
+ param top Float64 in value
+ param zNear Float64 in value
+ param zFar Float64 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixPopEXT(mode)
+ return void
+ param mode MatrixMode in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixPushEXT(mode)
+ return void
+ param mode MatrixMode in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+# New 1.3 matrix transpose commands
+
+MatrixLoadTransposefEXT(mode, m)
+ return void
+ param mode MatrixMode in value
+ param m Float32 in array [16]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixLoadTransposedEXT(mode, m)
+ return void
+ param mode MatrixMode in value
+ param m Float64 in array [16]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixMultTransposefEXT(mode, m)
+ return void
+ param mode MatrixMode in value
+ param m Float32 in array [16]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MatrixMultTransposedEXT(mode, m)
+ return void
+ param mode MatrixMode in value
+ param m Float64 in array [16]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+# New 1.1 texture object commands
+
+TextureParameterfEXT(texture, target, pname, param)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param param CheckedFloat32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+ vectorequiv TextureParameterfvEXT
+
+TextureParameterfvEXT(texture, target, pname, params)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+TextureParameteriEXT(texture, target, pname, param)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param param CheckedInt32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+ vectorequiv TextureParameterivEXT
+
+TextureParameterivEXT(texture, target, pname, params)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+TextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ extension soft WINSOFT
+ glfflags capture-handcode decode-handcode pixel-unpack
+
+TextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, pixels)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ extension soft WINSOFT
+ glfflags capture-handcode decode-handcode pixel-unpack
+
+TextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### EXT client-handcode server-handcode
+ glxflags ignore
+ extension soft WINSOFT
+ glfflags ignore
+
+TextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### EXT client-handcode server-handcode
+ extension soft WINSOFT
+ glfflags ignore
+
+CopyTextureImage1DEXT(texture, target, level, internalformat, x, y, width, border)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore ### EXT
+
+CopyTextureImage2DEXT(texture, target, level, internalformat, x, y, width, height, border)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore ### EXT
+
+CopyTextureSubImage1DEXT(texture, target, level, xoffset, x, y, width)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore ### EXT
+
+CopyTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, x, y, width, height)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore ### EXT
+
+# New 1.1 texture object queries
+
+GetTextureImageEXT(texture, target, level, format, type, pixels)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void out array [COMPSIZE(target/level/format/type)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ glxflags ignore ### client-handcode server-handcode
+ extension soft WINSOFT
+ glfflags capture-execute capture-handcode decode-handcode pixel-pack
+
+GetTextureParameterfvEXT(texture, target, pname, params)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+GetTextureParameterivEXT(texture, target, pname, params)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+GetTextureLevelParameterfvEXT(texture, target, level, pname, params)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param pname GetTextureParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+GetTextureLevelParameterivEXT(texture, target, level, pname, params)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param pname GetTextureParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+# New 1.2 3D texture object commands
+
+TextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, pixels)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height/depth)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode EXT
+ extension soft WINSOFT
+ glfflags ignore
+
+TextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height/depth)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode EXT
+ extension soft WINSOFT
+ glfflags ignore
+
+CopyTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, x, y, width, height)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_direct_state_access
+ glxflags ignore ### EXT
+ extension soft WINSOFT
+ glfflags ignore
+
+# New 1.1 multitexture commands
+
+MultiTexParameterfEXT(texunit, target, pname, param)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param param CheckedFloat32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+ vectorequiv MultiTexParameterfvEXT
+
+MultiTexParameterfvEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MultiTexParameteriEXT(texunit, target, pname, param)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param param CheckedInt32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+ vectorequiv MultiTexParameterivEXT
+
+MultiTexParameterivEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+
+MultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ extension soft WINSOFT
+ glfflags capture-handcode decode-handcode pixel-unpack
+
+MultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, pixels)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ extension soft WINSOFT
+ glfflags capture-handcode decode-handcode pixel-unpack
+
+MultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### EXT client-handcode server-handcode
+ extension soft WINSOFT
+ glfflags ignore
+
+MultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### EXT client-handcode server-handcode
+ extension soft WINSOFT
+ glfflags ignore
+
+CopyMultiTexImage1DEXT(texunit, target, level, internalformat, x, y, width, border)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore ### EXT
+
+CopyMultiTexImage2DEXT(texunit, target, level, internalformat, x, y, width, height, border)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore ### EXT
+
+CopyMultiTexSubImage1DEXT(texunit, target, level, xoffset, x, y, width)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore ### EXT
+
+CopyMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, x, y, width, height)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore ### EXT
+
+# New 1.1 multitexture queries
+
+GetMultiTexImageEXT(texunit, target, level, format, type, pixels)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void out array [COMPSIZE(target/level/format/type)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ glxflags ignore ### client-handcode server-handcode
+ extension soft WINSOFT
+ glfflags capture-execute capture-handcode decode-handcode pixel-pack
+
+GetMultiTexParameterfvEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+GetMultiTexParameterivEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+GetMultiTexLevelParameterfvEXT(texunit, target, level, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param pname GetTextureParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+GetMultiTexLevelParameterivEXT(texunit, target, level, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param pname GetTextureParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+# New 1.2 3D multitexture commands
+
+MultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param border CheckedInt32 in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height/depth)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode EXT
+ extension soft WINSOFT
+ glfflags ignore
+
+MultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param format PixelFormat in value
+ param type PixelType in value
+ param pixels Void in array [COMPSIZE(format/type/width/height/depth)]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode EXT
+ extension soft WINSOFT
+ glfflags ignore
+
+CopyMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param x WinCoord in value
+ param y WinCoord in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_direct_state_access
+ glxflags ignore ### EXT
+ extension soft WINSOFT
+ glfflags ignore
+
+# New 1.2.1 multitexture texture commands
+
+BindMultiTextureEXT(texunit, target, texture)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param texture Texture in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore ### EXT
+
+EnableClientStateIndexedEXT(array, index)
+ return void
+ param array EnableCap in value
+ param index UInt32 in value
+ category EXT_direct_state_access
+ dlflags notlistable
+ glxflags ignore ### client-handcode client-intercept server-handcode
+ extension soft WINSOFT
+
+DisableClientStateIndexedEXT(array, index)
+ return void
+ param array EnableCap in value
+ param index UInt32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore ### client-handcode client-intercept server-handcode
+
+MultiTexCoordPointerEXT(texunit, size, type, stride, pointer)
+ return void
+ param texunit TextureUnit in value
+ param size Int32 in value
+ param type TexCoordPointerType in value
+ param stride SizeI in value
+ param pointer Void in array [COMPSIZE(size/type/stride)] retained
+ category EXT_direct_state_access
+ dlflags notlistable
+ glxflags ignore ### client-handcode client-intercept server-handcode
+ extension soft WINSOFT
+ glfflags ignore
+
+MultiTexEnvfEXT(texunit, target, pname, param)
+ return void
+ param texunit TextureUnit in value
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param param CheckedFloat32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ vectorequiv MultiTexEnvfvEXT
+ glxflags ignore
+ glfflags gl-enum
+
+MultiTexEnvfvEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags gl-enum
+
+MultiTexEnviEXT(texunit, target, pname, param)
+ return void
+ param texunit TextureUnit in value
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param param CheckedInt32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ vectorequiv MultiTexEnvivEXT
+ glxflags ignore
+ glfflags gl-enum
+
+MultiTexEnvivEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags gl-enum
+
+MultiTexGendEXT(texunit, coord, pname, param)
+ return void
+ param texunit TextureUnit in value
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param param Float64 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ vectorequiv MultiTexGendvEXT
+ glxflags ignore
+ glfflags gl-enum
+
+MultiTexGendvEXT(texunit, coord, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params Float64 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags gl-enum
+
+MultiTexGenfEXT(texunit, coord, pname, param)
+ return void
+ param texunit TextureUnit in value
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param param CheckedFloat32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ vectorequiv MultiTexGenfvEXT
+ glxflags ignore
+ glfflags gl-enum
+
+MultiTexGenfvEXT(texunit, coord, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params CheckedFloat32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags gl-enum
+
+MultiTexGeniEXT(texunit, coord, pname, param)
+ return void
+ param texunit TextureUnit in value
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param param CheckedInt32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ vectorequiv MultiTexGenivEXT
+ glxflags ignore
+ glfflags gl-enum
+
+MultiTexGenivEXT(texunit, coord, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags gl-enum
+
+# New 1.2.1 multitexture texture queries
+
+GetMultiTexEnvfvEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+GetMultiTexEnvivEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureEnvTarget in value
+ param pname TextureEnvParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+GetMultiTexGendvEXT(texunit, coord, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params Float64 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+GetMultiTexGenfvEXT(texunit, coord, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+GetMultiTexGenivEXT(texunit, coord, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param coord TextureCoordName in value
+ param pname TextureGenParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+# From EXT_draw_buffers2
+# EnableIndexedEXT
+# DisableIndexedEXT
+# IsEnabledIndexedEXT
+
+GetFloatIndexedvEXT(target, index, data)
+ return void
+ param target TypeEnum in value
+ param index UInt32 in value
+ param data Float32 out array [COMPSIZE(target)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+
+GetDoubleIndexedvEXT(target, index, data)
+ return void
+ param target TypeEnum in value
+ param index UInt32 in value
+ param data Float64 out array [COMPSIZE(target)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+
+GetPointerIndexedvEXT(target, index, data)
+ return void
+ param target TypeEnum in value
+ param index UInt32 in value
+ param data VoidPointer out array [COMPSIZE(target)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+ extension soft WINSOFT
+
+# New compressed texture commands
+
+CompressedTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, imageSize, bits)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+CompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, imageSize, bits)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+CompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, imageSize, bits)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+CompressedTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+CompressedTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, imageSize, bits)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+CompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, imageSize, bits)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+# New compressed texture query
+
+GetCompressedTextureImageEXT(texture, target, lod, img)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param lod CheckedInt32 in value
+ param img Void out array [COMPSIZE(target/lod)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ glxflags ignore ### server-handcode
+ extension soft WINSOFT
+
+# New compressed multitexture commands
+
+CompressedMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, imageSize, bits)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+CompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, imageSize, bits)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+CompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, imageSize, bits)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param internalformat TextureInternalFormat in value
+ param width SizeI in value
+ param border CheckedInt32 in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+CompressedMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+CompressedMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, imageSize, bits)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param yoffset CheckedInt32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+CompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, imageSize, bits)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param level CheckedInt32 in value
+ param xoffset CheckedInt32 in value
+ param width SizeI in value
+ param format PixelFormat in value
+ param imageSize SizeI in value
+ param bits Void in array [imageSize]
+ category EXT_direct_state_access
+ dlflags handcode
+ glxflags ignore ### client-handcode server-handcode
+ glfflags ignore
+ extension soft WINSOFT
+
+# New compressed multitexture query
+
+GetCompressedMultiTexImageEXT(texunit, target, lod, img)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param lod CheckedInt32 in value
+ param img Void out array [COMPSIZE(target/lod)]
+ category EXT_direct_state_access
+ dlflags notlistable
+ glxflags ignore ### server-handcode
+ extension soft WINSOFT
+
+# New ARB assembly program named commands
+
+NamedProgramStringEXT(program, target, format, len, string)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param format ProgramFormat in value
+ param len SizeI in value
+ param string Void in array [len]
+ category EXT_direct_state_access
+ subcategory ARB_vertex_program
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore ### client-handcode server-handcode EXT
+ glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program
+
+NamedProgramLocalParameter4dEXT(program, target, index, x, y, z, w)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category EXT_direct_state_access
+ subcategory ARB_vertex_program
+ vectorequiv NamedProgramLocalParameter4dvEXT
+ glxvectorequiv NamedProgramLocalParameter4dvEXT
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore ### EXT
+ glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program
+
+NamedProgramLocalParameter4dvEXT(program, target, index, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params Float64 in array [4]
+ category EXT_direct_state_access
+ subcategory ARB_vertex_program
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore ### EXT
+ glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program
+
+NamedProgramLocalParameter4fEXT(program, target, index, x, y, z, w)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param x Float32 in value
+ param y Float32 in value
+ param z Float32 in value
+ param w Float32 in value
+ category EXT_direct_state_access
+ subcategory ARB_vertex_program
+ vectorequiv NamedProgramLocalParameter4fvEXT
+ glxvectorequiv NamedProgramLocalParameter4fvEXT
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore ### EXT
+ glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program
+
+NamedProgramLocalParameter4fvEXT(program, target, index, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params Float32 in array [4]
+ category EXT_direct_state_access
+ subcategory ARB_vertex_program
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore ### EXT
+ glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program
+
+# New ARB assembly program named queries
+
+GetNamedProgramLocalParameterdvEXT(program, target, index, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params Float64 out array [4]
+ dlflags notlistable
+ category EXT_direct_state_access
+ subcategory ARB_vertex_program
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore ### client-handcode server-handcode EXT
+ glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program
+
+GetNamedProgramLocalParameterfvEXT(program, target, index, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params Float32 out array [4]
+ dlflags notlistable
+ category EXT_direct_state_access
+ subcategory ARB_vertex_program
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore ### client-handcode server-handcode EXT
+ glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program
+
+GetNamedProgramivEXT(program, target, pname, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param pname ProgramProperty in value
+ param params Int32 out array [1]
+ dlflags notlistable
+ category EXT_direct_state_access
+ subcategory ARB_vertex_program
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore ### client-handcode server-handcode EXT
+ glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program
+
+GetNamedProgramStringEXT(program, target, pname, string)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param pname ProgramStringProperty in value
+ param string Void out array [COMPSIZE(program,pname)]
+ dlflags notlistable
+ category EXT_direct_state_access
+ subcategory ARB_vertex_program
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore ### client-handcode server-handcode EXT
+ glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program
+
+# New EXT_gpu_program_parameters command
+
+NamedProgramLocalParameters4fvEXT(program, target, index, count, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params Float32 in array [count*4]
+ category EXT_direct_state_access
+ subcategory EXT_gpu_program_parameters
+ extension soft WINSOFT NV10
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_gpu_program_parameters
+
+# New NV_gpu_program4 commands
+
+NamedProgramLocalParameterI4iEXT(program, target, index, x, y, z, w)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param x Int32 in value
+ param y Int32 in value
+ param z Int32 in value
+ param w Int32 in value
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ vectorequiv NamedProgramLocalParameterI4ivEXT
+ glxvectorequiv NamedProgramLocalParameterI4ivEXT
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+NamedProgramLocalParameterI4ivEXT(program, target, index, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params Int32 in array [4]
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+NamedProgramLocalParametersI4ivEXT(program, target, index, count, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params Int32 in array [count*4]
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+NamedProgramLocalParameterI4uiEXT(program, target, index, x, y, z, w)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param x UInt32 in value
+ param y UInt32 in value
+ param z UInt32 in value
+ param w UInt32 in value
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ vectorequiv NamedProgramLocalParameterI4uivEXT
+ glxvectorequiv NamedProgramLocalParameterI4uivEXT
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+NamedProgramLocalParameterI4uivEXT(program, target, index, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params UInt32 in array [4]
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+NamedProgramLocalParametersI4uivEXT(program, target, index, count, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param count SizeI in value
+ param params UInt32 in array [count*4]
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+GetNamedProgramLocalParameterIivEXT(program, target, index, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params Int32 out array [4]
+ dlflags notlistable
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+GetNamedProgramLocalParameterIuivEXT(program, target, index, params)
+ return void
+ param program UInt32 in value
+ param target ProgramTarget in value
+ param index UInt32 in value
+ param params UInt32 out array [4]
+ dlflags notlistable
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+# New EXT_texture_integer texture object commands
+
+TextureParameterIivEXT(texture, target, pname, params)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_texture_integer
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+ glextmask GL_MASK_EXT_texture_integer
+
+TextureParameterIuivEXT(texture, target, pname, params)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params UInt32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_texture_integer
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+ glextmask GL_MASK_EXT_texture_integer
+
+# New EXT_texture_integer texture object queries
+
+GetTextureParameterIivEXT(texture, target, pname, params)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_texture_integer
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+ glextmask GL_MASK_EXT_texture_integer
+
+GetTextureParameterIuivEXT(texture, target, pname, params)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params UInt32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_texture_integer
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+ glextmask GL_MASK_EXT_texture_integer
+
+# New EXT_texture_integer multitexture commands
+
+MultiTexParameterIivEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params CheckedInt32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_texture_integer
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+ glextmask GL_MASK_EXT_texture_integer
+
+MultiTexParameterIuivEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param pname TextureParameterName in value
+ param params UInt32 in array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_texture_integer
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags ignore
+ glextmask GL_MASK_EXT_texture_integer
+
+# New EXT_texture_integer multitexture queries
+
+GetMultiTexParameterIivEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_texture_integer
+ dlflags notlistable
+ extension soft WINSOFT
+ glfflags capture-execute gl-enum
+ glxflags ignore
+ glextmask GL_MASK_EXT_texture_integer
+
+GetMultiTexParameterIuivEXT(texunit, target, pname, params)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param pname GetTextureParameter in value
+ param params UInt32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_texture_integer
+ dlflags notlistable
+ extension soft WINSOFT
+ glfflags capture-execute gl-enum
+ glxflags ignore
+ glextmask GL_MASK_EXT_texture_integer
+
+# New GLSL 2.0 uniform commands
+
+ProgramUniform1fEXT(program, location, v0)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float32 in value
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform2fEXT(program, location, v0, v1)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform3fEXT(program, location, v0, v1, v2)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ param v2 Float32 in value
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform4fEXT(program, location, v0, v1, v2, v3)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Float32 in value
+ param v1 Float32 in value
+ param v2 Float32 in value
+ param v3 Float32 in value
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform1iEXT(program, location, v0)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Int32 in value
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform2iEXT(program, location, v0, v1)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform3iEXT(program, location, v0, v1, v2)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ param v2 Int32 in value
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform4iEXT(program, location, v0, v1, v2, v3)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 Int32 in value
+ param v1 Int32 in value
+ param v2 Int32 in value
+ param v3 Int32 in value
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform1fvEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform2fvEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count*2]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform3fvEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count*3]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform4fvEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float32 in array [count*4]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform1ivEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform2ivEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count*2]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform3ivEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count*3]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform4ivEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int32 in array [count*4]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniformMatrix2fvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count*4]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniformMatrix3fvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count*9]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniformMatrix4fvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count*16]
+ category EXT_direct_state_access
+ subcategory VERSION_2_0
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+# New GLSL 2.1 uniform commands
+
+ProgramUniformMatrix2x3fvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count*6]
+ category EXT_direct_state_access
+ subcategory VERSION_2_1
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniformMatrix3x2fvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count*6]
+ category EXT_direct_state_access
+ subcategory VERSION_2_1
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniformMatrix2x4fvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count*8]
+ category EXT_direct_state_access
+ subcategory VERSION_2_1
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniformMatrix4x2fvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count*8]
+ category EXT_direct_state_access
+ subcategory VERSION_2_1
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniformMatrix3x4fvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count*12]
+ category EXT_direct_state_access
+ subcategory VERSION_2_1
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniformMatrix4x3fvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float32 in array [count*12]
+ category EXT_direct_state_access
+ subcategory VERSION_2_1
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+# New EXT_gpu_shader4 commands
+
+ProgramUniform1uiEXT(program, location, v0)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 UInt32 in value
+ category EXT_direct_state_access
+ subcategory EXT_gpu_shader4
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform2uiEXT(program, location, v0, v1)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ category EXT_direct_state_access
+ subcategory EXT_gpu_shader4
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform3uiEXT(program, location, v0, v1, v2)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ param v2 UInt32 in value
+ category EXT_direct_state_access
+ subcategory EXT_gpu_shader4
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform4uiEXT(program, location, v0, v1, v2, v3)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param v0 UInt32 in value
+ param v1 UInt32 in value
+ param v2 UInt32 in value
+ param v3 UInt32 in value
+ category EXT_direct_state_access
+ subcategory EXT_gpu_shader4
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform1uivEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count]
+ category EXT_direct_state_access
+ subcategory EXT_gpu_shader4
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform2uivEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count*2]
+ category EXT_direct_state_access
+ subcategory EXT_gpu_shader4
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform3uivEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count*3]
+ category EXT_direct_state_access
+ subcategory EXT_gpu_shader4
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+ProgramUniform4uivEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt32 in array [count*4]
+ category EXT_direct_state_access
+ subcategory EXT_gpu_shader4
+ glfflags ignore
+ glxflags ignore
+ extension soft WINSOFT
+ glextmask GL_MASK_OpenGL_2_0
+
+# New named buffer commands
+
+NamedBufferDataEXT(buffer, size, data, usage)
+ return void
+ param buffer UInt32 in value
+ param size Sizeiptr in value
+ param data Void in array [COMPSIZE(size)]
+ param usage VertexBufferObjectUsage in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+NamedBufferSubDataEXT(buffer, offset, size, data)
+ return void
+ param buffer UInt32 in value
+ param offset Intptr in value
+ param size Sizeiptr in value
+ param data Void in array [COMPSIZE(size)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+MapNamedBufferEXT(buffer, access)
+ return VoidPointer
+ param buffer UInt32 in value
+ param access VertexBufferObjectAccess in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+UnmapNamedBufferEXT(buffer)
+ return Boolean
+ param buffer UInt32 in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+MapNamedBufferRangeEXT(buffer, offset, length, access)
+ return VoidPointer
+ param buffer UInt32 in value
+ param offset Intptr in value
+ param length Sizeiptr in value
+ param access BufferAccessMask in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+FlushMappedNamedBufferRangeEXT(buffer, offset, length)
+ return void
+ param buffer UInt32 in value
+ param offset Intptr in value
+ param length Sizeiptr in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+NamedCopyBufferSubDataEXT(readBuffer, writeBuffer, readOffset, writeOffset, size)
+ return void
+ param readBuffer UInt32 in value
+ param writeBuffer UInt32 in value
+ param readOffset Intptr in value
+ param writeOffset Intptr in value
+ param size Sizeiptr in value
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+# New named buffer queries
+
+GetNamedBufferParameterivEXT(buffer, pname, params)
+ return void
+ param buffer UInt32 in value
+ param pname VertexBufferObjectParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+GetNamedBufferPointervEXT(buffer, pname, params)
+ return void
+ param buffer UInt32 in value
+ param pname VertexBufferObjectParameter in value
+ param params VoidPointer out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+GetNamedBufferSubDataEXT(buffer, offset, size, data)
+ return void
+ param buffer UInt32 in value
+ param offset Intptr in value
+ param size Sizeiptr in value
+ param data Void out array [COMPSIZE(size)]
+ category EXT_direct_state_access
+ extension soft WINSOFT
+ dlflags notlistable
+ glxflags ignore
+ glfflags ignore
+
+# New named texture buffer texture object command
+
+TextureBufferEXT(texture, target, internalformat, buffer)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param internalformat TypeEnum in value
+ param buffer UInt32 in value
+ category EXT_direct_state_access
+ subcategory EXT_texture_buffer_object
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_texture_buffer_object
+ dlflags notlistable
+
+# New named texture buffer multitexture command
+
+MultiTexBufferEXT(texunit, target, internalformat, buffer)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param internalformat TypeEnum in value
+ param buffer UInt32 in value
+ category EXT_direct_state_access
+ subcategory EXT_texture_buffer_object
+ extension soft WINSOFT NV50
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_texture_buffer_object
+ dlflags notlistable
+
+# New named frame buffer object commands
+
+NamedRenderbufferStorageEXT(renderbuffer, internalformat, width, height)
+ return void
+ param renderbuffer Renderbuffer in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+GetNamedRenderbufferParameterivEXT(renderbuffer, pname, params)
+ return void
+ param renderbuffer Renderbuffer in value
+ param pname RenderbufferParameterName in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+CheckNamedFramebufferStatusEXT(framebuffer, target)
+ return FramebufferStatus
+ param framebuffer Framebuffer in value
+ param target FramebufferTarget in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+NamedFramebufferTexture1DEXT(framebuffer, attachment, textarget, texture, level)
+ return void
+ param framebuffer Framebuffer in value
+ param attachment FramebufferAttachment in value
+ param textarget TextureTarget in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+NamedFramebufferTexture2DEXT(framebuffer, attachment, textarget, texture, level)
+ return void
+ param framebuffer Framebuffer in value
+ param attachment FramebufferAttachment in value
+ param textarget TextureTarget in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+NamedFramebufferTexture3DEXT(framebuffer, attachment, textarget, texture, level, zoffset)
+ return void
+ param framebuffer Framebuffer in value
+ param attachment FramebufferAttachment in value
+ param textarget TextureTarget in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ param zoffset CheckedInt32 in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+NamedFramebufferRenderbufferEXT(framebuffer, attachment, renderbuffertarget, renderbuffer)
+ return void
+ param framebuffer Framebuffer in value
+ param attachment FramebufferAttachment in value
+ param renderbuffertarget RenderbufferTarget in value
+ param renderbuffer Renderbuffer in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+GetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, params)
+ return void
+ param framebuffer Framebuffer in value
+ param attachment FramebufferAttachment in value
+ param pname FramebufferAttachmentParameterName in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+GenerateTextureMipmapEXT(texture, target)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+GenerateMultiTexMipmapEXT(texunit, target)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+FramebufferDrawBufferEXT(framebuffer, mode)
+ return void
+ param framebuffer Framebuffer in value
+ param mode DrawBufferMode in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+FramebufferDrawBuffersEXT(framebuffer, n, bufs)
+ return void
+ param framebuffer Framebuffer in value
+ param n SizeI in value
+ param bufs DrawBufferMode in array [n]
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+FramebufferReadBufferEXT(framebuffer, mode)
+ return void
+ param framebuffer Framebuffer in value
+ param mode ReadBufferMode in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ extension soft WINSOFT
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_object
+
+GetFramebufferParameterivEXT(framebuffer, pname, params)
+ return void
+ param framebuffer Framebuffer in value
+ param pname GetFramebufferParameter in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_object
+ dlflags notlistable
+ extension soft WINSOFT
+ glxflags ignore
+ glfflags capture-execute gl-enum
+
+# New named framebuffer multisample object commands
+
+NamedRenderbufferStorageMultisampleEXT(renderbuffer, samples, internalformat, width, height)
+ return void
+ param renderbuffer Renderbuffer in value
+ param samples SizeI in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_direct_state_access
+ subcategory EXT_framebuffer_multisample
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_EXT_framebuffer_multisample
+
+# New named framebuffer multisample coverage object commands
+
+NamedRenderbufferStorageMultisampleCoverageEXT(renderbuffer, coverageSamples, colorSamples, internalformat, width, height)
+ return void
+ param renderbuffer Renderbuffer in value
+ param coverageSamples SizeI in value
+ param colorSamples SizeI in value
+ param internalformat PixelInternalFormat in value
+ param width SizeI in value
+ param height SizeI in value
+ category EXT_direct_state_access
+ subcategory NV_framebuffer_multisample_coverage
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_framebuffer_multisample_coverage
+
+# New named geometry program/shader frame buffer object commands
+
+NamedFramebufferTextureEXT(framebuffer, attachment, texture, level)
+ return void
+ param framebuffer Framebuffer in value
+ param attachment FramebufferAttachment in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+NamedFramebufferTextureLayerEXT(framebuffer, attachment, texture, level, layer)
+ return void
+ param framebuffer Framebuffer in value
+ param attachment FramebufferAttachment in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ param layer CheckedInt32 in value
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+NamedFramebufferTextureFaceEXT(framebuffer, attachment, texture, level, face)
+ return void
+ param framebuffer Framebuffer in value
+ param attachment FramebufferAttachment in value
+ param texture Texture in value
+ param level CheckedInt32 in value
+ param face TextureTarget in value
+ category EXT_direct_state_access
+ subcategory NV_gpu_program4
+ extension soft WINSOFT
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_gpu_program4
+
+# New explicit multisample query and commands
+
+TextureRenderbufferEXT(texture, target, renderbuffer)
+ return void
+ param texture Texture in value
+ param target TextureTarget in value
+ param renderbuffer UInt32 in value
+ category EXT_direct_state_access
+ subcategory NV_explicit_multisample
+ extension soft WINSOFT NV50
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_explicit_multisample
+
+MultiTexRenderbufferEXT(texunit, target, renderbuffer)
+ return void
+ param texunit TextureUnit in value
+ param target TextureTarget in value
+ param renderbuffer UInt32 in value
+ category EXT_direct_state_access
+ subcategory NV_explicit_multisample
+ extension soft WINSOFT NV50
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+ glextmask GL_MASK_NV_explicit_multisample
+
+# New ARB_gpu_shader_fp64 commands
+
+ProgramUniform1dEXT(program, location, x)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x Float64 in value
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2dEXT(program, location, x, y)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x Float64 in value
+ param y Float64 in value
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3dEXT(program, location, x, y, z)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4dEXT(program, location, x, y, z, w)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1dvEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2dvEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3dvEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4dvEXT(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix2dvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix3dvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix4dvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix2x3dvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix2x4dvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix3x2dvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix3x4dvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix4x2dvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformMatrix4x3dvEXT(program, location, count, transpose, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param transpose Boolean in value
+ param value Float64 in array [count]
+ category EXT_direct_state_access
+ subcategory ARB_gpu_shader_fp64
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #354
+# EXT_vertex_array_bgra commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_vertex_array_bgra
+
+###############################################################################
+#
+# Extension #355 - WGL_NV_gpu_affinity
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #356
+# EXT_texture_swizzle commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_swizzle
+
+###############################################################################
+#
+# Extension #357
+# NV_explicit_multisample commands
+#
+###############################################################################
+
+# From EXT_draw_buffers2: GetBooleanIndexedvEXT / GetIntegerIndexedvEXT
+
+GetMultisamplefvNV(pname, index, val)
+ return void
+ param pname GetMultisamplePNameNV in value
+ param index UInt32 in value
+ param val Float32 out array [2]
+ category NV_explicit_multisample
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+
+SampleMaskIndexedNV(index, mask)
+ return void
+ param index UInt32 in value
+ param mask SampleMaskNV in value
+ category NV_explicit_multisample
+ glfflags ignore
+ glxflags ignore
+
+TexRenderbufferNV(target, renderbuffer)
+ return void
+ param target TextureTarget in value
+ param renderbuffer UInt32 in value
+ category NV_explicit_multisample
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# Extension #358
+# NV_transform_feedback2 commands
+#
+###############################################################################
+
+BindTransformFeedbackNV(target, id)
+ return void
+ param target BufferTargetARB in value
+ param id UInt32 in value
+ category NV_transform_feedback2
+ glfflags ignore
+ glxflags ignore
+
+DeleteTransformFeedbacksNV(n, ids)
+ return void
+ param n SizeI in value
+ param ids UInt32 in array [n]
+ category NV_transform_feedback2
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+
+GenTransformFeedbacksNV(n, ids)
+ return void
+ param n SizeI in value
+ param ids UInt32 out array [n]
+ category NV_transform_feedback2
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+
+IsTransformFeedbackNV(id)
+ return Boolean
+ param id UInt32 in value
+ category NV_transform_feedback2
+ dlflags notlistable
+ glfflags ignore
+ glxflags ignore
+
+PauseTransformFeedbackNV()
+ return void
+ category NV_transform_feedback2
+ glfflags ignore
+ glxflags ignore
+
+ResumeTransformFeedbackNV()
+ return void
+ category NV_transform_feedback2
+ glfflags ignore
+ glxflags ignore
+
+DrawTransformFeedbackNV(mode, id)
+ return void
+ param mode GLenum in value
+ param id UInt32 in value
+ category NV_transform_feedback2
+ glfflags ignore
+ glxflags ignore
+
+###############################################################################
+#
+# Extension #359
+# ATI_meminfo commands
+#
+###############################################################################
+
+# (none)
+newcategory: ATI_meminfo
+
+###############################################################################
+#
+# Extension #360
+# AMD_performance_monitor commands
+#
+###############################################################################
+
+GetPerfMonitorGroupsAMD(numGroups, groupsSize, groups)
+ return void
+ param numGroups Int32 out array [1]
+ param groupsSize SizeI in value
+ param groups UInt32 out array [groupsSize]
+ category AMD_performance_monitor
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counterSize, counters)
+ return void
+ param group UInt32 in value
+ param numCounters Int32 out array [1]
+ param maxActiveCounters Int32 out array [1]
+ param counterSize SizeI in value
+ param counters UInt32 out array [counterSize]
+ category AMD_performance_monitor
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetPerfMonitorGroupStringAMD(group, bufSize, length, groupString)
+ return void
+ param group UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param groupString Char out array [bufSize]
+ category AMD_performance_monitor
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetPerfMonitorCounterStringAMD(group, counter, bufSize, length, counterString)
+ return void
+ param group UInt32 in value
+ param counter UInt32 in value
+ param bufSize SizeI in value
+ param length SizeI out array [1]
+ param counterString Char out array [bufSize]
+ category AMD_performance_monitor
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetPerfMonitorCounterInfoAMD(group, counter, pname, data)
+ return void
+ param group UInt32 in value
+ param counter UInt32 in value
+ param pname GLenum in value
+ param data Void out array [COMPSIZE(pname)]
+ category AMD_performance_monitor
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GenPerfMonitorsAMD(n, monitors)
+ return void
+ param n SizeI in value
+ param monitors UInt32 out array [n]
+ category AMD_performance_monitor
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+# 'monitors' is actually in, not out, but extension spec doesn't use const
+DeletePerfMonitorsAMD(n, monitors)
+ return void
+ param n SizeI in value
+ param monitors UInt32 out array [n]
+ category AMD_performance_monitor
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+# 'counterList' is actually in, not out, but extension spec doesn't use const
+SelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, counterList)
+ return void
+ param monitor UInt32 in value
+ param enable Boolean in value
+ param group UInt32 in value
+ param numCounters Int32 in value
+ param counterList UInt32 out array [numCounters]
+ category AMD_performance_monitor
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BeginPerfMonitorAMD(monitor)
+ return void
+ param monitor UInt32 in value
+ category AMD_performance_monitor
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+EndPerfMonitorAMD(monitor)
+ return void
+ param monitor UInt32 in value
+ category AMD_performance_monitor
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data, bytesWritten)
+ return void
+ param monitor UInt32 in value
+ param pname GLenum in value
+ param dataSize SizeI in value
+ param data UInt32 out array [dataSize]
+ param bytesWritten Int32 out array [1]
+ category AMD_performance_monitor
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #361 - WGL_AMD_gpu_association
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #362
+# AMD_texture_texture4 commands
+#
+###############################################################################
+
+# (none)
+newcategory: AMD_texture_texture4
+
+###############################################################################
+#
+# Extension #363
+# AMD_vertex_shader_tesselator commands
+#
+###############################################################################
+
+TessellationFactorAMD(factor)
+ return void
+ param factor Float32 in value
+ category AMD_vertex_shader_tesselator
+ version 2.0
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+TessellationModeAMD(mode)
+ return void
+ param mode GLenum in value
+ category AMD_vertex_shader_tesselator
+ version 2.0
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #364
+# EXT_provoking_vertex commands
+#
+###############################################################################
+
+ProvokingVertexEXT(mode)
+ return void
+ param mode GLenum in value
+ category EXT_provoking_vertex
+ version 2.1
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #365
+# EXT_texture_snorm commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_snorm
+
+###############################################################################
+#
+# Extension #366
+# AMD_draw_buffers_blend commands
+#
+###############################################################################
+
+# void BlendFuncIndexedAMD(uint buf, enum src, enum dst)
+# void BlendFuncSeparateIndexedAMD(uint buf, enum srcRGB, enum dstRGB, enum srcAlpha, enum dstAlpha)
+# void BlendEquationIndexedAMD(uint buf, enum mode)
+# void BlendEquationSeparateIndexedAMD(uint buf, enum modeRGB, enum modeAlpha)
+
+BlendFuncIndexedAMD(buf, src, dst)
+ return void
+ param buf UInt32 in value
+ param src GLenum in value
+ param dst GLenum in value
+ category AMD_draw_buffers_blend
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BlendFuncSeparateIndexedAMD(buf, srcRGB, dstRGB, srcAlpha, dstAlpha)
+ return void
+ param buf UInt32 in value
+ param srcRGB GLenum in value
+ param dstRGB GLenum in value
+ param srcAlpha GLenum in value
+ param dstAlpha GLenum in value
+ category AMD_draw_buffers_blend
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BlendEquationIndexedAMD(buf, mode)
+ return void
+ param buf UInt32 in value
+ param mode GLenum in value
+ category AMD_draw_buffers_blend
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BlendEquationSeparateIndexedAMD(buf, modeRGB, modeAlpha)
+ return void
+ param buf UInt32 in value
+ param modeRGB GLenum in value
+ param modeAlpha GLenum in value
+ category AMD_draw_buffers_blend
+ version 2.0
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #367
+# APPLE_texture_range commands
+#
+###############################################################################
+
+TextureRangeAPPLE(target, length, pointer)
+ return void
+ param target GLenum in value
+ param length SizeI in value
+ param pointer Void in array [length]
+ category APPLE_texture_range
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetTexParameterPointervAPPLE(target, pname, params)
+ return void
+ param target GLenum in value
+ param pname GLenum in value
+ param params VoidPointer out array [1]
+ category APPLE_texture_range
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #368
+# APPLE_float_pixels commands
+#
+###############################################################################
+
+# (none)
+newcategory: APPLE_float_pixels
+
+###############################################################################
+#
+# Extension #369
+# APPLE_vertex_program_evaluators commands
+#
+###############################################################################
+
+EnableVertexAttribAPPLE(index, pname)
+ return void
+ param index UInt32 in value
+ param pname GLenum in value
+ category APPLE_vertex_program_evaluators
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DisableVertexAttribAPPLE(index, pname)
+ return void
+ param index UInt32 in value
+ param pname GLenum in value
+ category APPLE_vertex_program_evaluators
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsVertexAttribEnabledAPPLE(index, pname)
+ return Boolean
+ param index UInt32 in value
+ param pname GLenum in value
+ category APPLE_vertex_program_evaluators
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MapVertexAttrib1dAPPLE(index, size, u1, u2, stride, order, points)
+ return void
+ param index UInt32 in value
+ param size UInt32 in value
+ param u1 CoordD in value
+ param u2 CoordD in value
+ param stride Int32 in value
+ param order CheckedInt32 in value
+ param points CoordD in array [COMPSIZE(size/stride/order)]
+ category APPLE_vertex_program_evaluators
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MapVertexAttrib1fAPPLE(index, size, u1, u2, stride, order, points)
+ return void
+ param index UInt32 in value
+ param size UInt32 in value
+ param u1 CoordF in value
+ param u2 CoordF in value
+ param stride Int32 in value
+ param order CheckedInt32 in value
+ param points CoordF in array [COMPSIZE(size/stride/order)]
+ category APPLE_vertex_program_evaluators
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MapVertexAttrib2dAPPLE(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points)
+ return void
+ param index UInt32 in value
+ param size UInt32 in value
+ param u1 CoordD in value
+ param u2 CoordD in value
+ param ustride Int32 in value
+ param uorder CheckedInt32 in value
+ param v1 CoordD in value
+ param v2 CoordD in value
+ param vstride Int32 in value
+ param vorder CheckedInt32 in value
+ param points CoordD in array [COMPSIZE(size/ustride/uorder/vstride/vorder)]
+ category APPLE_vertex_program_evaluators
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MapVertexAttrib2fAPPLE(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points)
+ return void
+ param index UInt32 in value
+ param size UInt32 in value
+ param u1 CoordF in value
+ param u2 CoordF in value
+ param ustride Int32 in value
+ param uorder CheckedInt32 in value
+ param v1 CoordF in value
+ param v2 CoordF in value
+ param vstride Int32 in value
+ param vorder CheckedInt32 in value
+ param points CoordF in array [COMPSIZE(size/ustride/uorder/vstride/vorder)]
+ category APPLE_vertex_program_evaluators
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #370
+# APPLE_aux_depth_stencil commands
+#
+###############################################################################
+
+# (none)
+newcategory: APPLE_aux_depth_stencil
+
+###############################################################################
+#
+# Extension #371
+# APPLE_object_purgeable commands
+#
+###############################################################################
+
+ObjectPurgeableAPPLE(objectType, name, option)
+ return GLenum
+ param objectType GLenum in value
+ param name UInt32 in value
+ param option GLenum in value
+ category APPLE_object_purgeable
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ObjectUnpurgeableAPPLE(objectType, name, option)
+ return GLenum
+ param objectType GLenum in value
+ param name UInt32 in value
+ param option GLenum in value
+ category APPLE_object_purgeable
+ version 1.5
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetObjectParameterivAPPLE(objectType, name, pname, params)
+ return void
+ param objectType GLenum in value
+ param name UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category APPLE_object_purgeable
+ dlflags notlistable
+ version 1.5
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #372
+# APPLE_row_bytes commands
+#
+###############################################################################
+
+# (none)
+newcategory: APPLE_row_bytes
+
+###############################################################################
+#
+# Extension #373
+# APPLE_rgb_422 commands
+#
+###############################################################################
+
+# (none)
+newcategory: APPLE_rgb_422
+
+###############################################################################
+#
+# Extension #374
+# NV_video_capture commands
+#
+###############################################################################
+
+BeginVideoCaptureNV(video_capture_slot)
+ return void
+ param video_capture_slot UInt32 in value
+ category NV_video_capture
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindVideoCaptureStreamBufferNV(video_capture_slot, stream, frame_region, offset)
+ return void
+ param video_capture_slot UInt32 in value
+ param stream UInt32 in value
+ param frame_region GLenum in value
+ param offset BufferOffsetARB in value
+ category NV_video_capture
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+BindVideoCaptureStreamTextureNV(video_capture_slot, stream, frame_region, target, texture)
+ return void
+ param video_capture_slot UInt32 in value
+ param stream UInt32 in value
+ param frame_region GLenum in value
+ param target GLenum in value
+ param texture UInt32 in value
+ category NV_video_capture
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+EndVideoCaptureNV(video_capture_slot)
+ return void
+ param video_capture_slot UInt32 in value
+ category NV_video_capture
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetVideoCaptureivNV(video_capture_slot, pname, params)
+ return void
+ param video_capture_slot UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category NV_video_capture
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVideoCaptureStreamivNV(video_capture_slot, stream, pname, params)
+ return void
+ param video_capture_slot UInt32 in value
+ param stream UInt32 in value
+ param pname GLenum in value
+ param params Int32 out array [COMPSIZE(pname)]
+ category NV_video_capture
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVideoCaptureStreamfvNV(video_capture_slot, stream, pname, params)
+ return void
+ param video_capture_slot UInt32 in value
+ param stream UInt32 in value
+ param pname GLenum in value
+ param params Float32 out array [COMPSIZE(pname)]
+ category NV_video_capture
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVideoCaptureStreamdvNV(video_capture_slot, stream, pname, params)
+ return void
+ param video_capture_slot UInt32 in value
+ param stream UInt32 in value
+ param pname GLenum in value
+ param params Float64 out array [COMPSIZE(pname)]
+ category NV_video_capture
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+VideoCaptureNV(video_capture_slot, sequence_num, capture_time)
+ return GLenum
+ param video_capture_slot UInt32 in value
+ param sequence_num UInt32 out reference
+ param capture_time UInt64EXT out reference
+ category NV_video_capture
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VideoCaptureStreamParameterivNV(video_capture_slot, stream, pname, params)
+ return void
+ param video_capture_slot UInt32 in value
+ param stream UInt32 in value
+ param pname GLenum in value
+ param params Int32 in array [COMPSIZE(pname)]
+ category NV_video_capture
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VideoCaptureStreamParameterfvNV(video_capture_slot, stream, pname, params)
+ return void
+ param video_capture_slot UInt32 in value
+ param stream UInt32 in value
+ param pname GLenum in value
+ param params Float32 in array [COMPSIZE(pname)]
+ category NV_video_capture
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VideoCaptureStreamParameterdvNV(video_capture_slot, stream, pname, params)
+ return void
+ param video_capture_slot UInt32 in value
+ param stream UInt32 in value
+ param pname GLenum in value
+ param params Float64 in array [COMPSIZE(pname)]
+ category NV_video_capture
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #375 - GLX_EXT_swap_control
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #376 - also GLX_NV_copy_image, WGL_NV_copy_image
+# NV_copy_image commands
+#
+###############################################################################
+
+CopyImageSubDataNV(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth)
+ return void
+ param srcName UInt32 in value
+ param srcTarget GLenum in value
+ param srcLevel Int32 in value
+ param srcX Int32 in value
+ param srcY Int32 in value
+ param srcZ Int32 in value
+ param dstName UInt32 in value
+ param dstTarget GLenum in value
+ param dstLevel Int32 in value
+ param dstX Int32 in value
+ param dstY Int32 in value
+ param dstZ Int32 in value
+ param width SizeI in value
+ param height SizeI in value
+ param depth SizeI in value
+ category NV_copy_image
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #377
+# EXT_separate_shader_objects commands
+#
+###############################################################################
+
+UseShaderProgramEXT(type, program)
+ return void
+ param type GLenum in value
+ param program UInt32 in value
+ category EXT_separate_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ActiveProgramEXT(program)
+ return void
+ param program UInt32 in value
+ category EXT_separate_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+CreateShaderProgramEXT(type, string)
+ return UInt32
+ param type GLenum in value
+ param string Char in array []
+ category EXT_separate_shader_objects
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #378
+# NV_parameter_buffer_object2 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_parameter_buffer_object2
+
+###############################################################################
+#
+# Extension #379
+# NV_shader_buffer_load commands
+#
+###############################################################################
+
+MakeBufferResidentNV(target, access)
+ return void
+ param target GLenum in value
+ param access GLenum in value
+ category NV_shader_buffer_load
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MakeBufferNonResidentNV(target)
+ return void
+ param target GLenum in value
+ category NV_shader_buffer_load
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsBufferResidentNV(target)
+ return Boolean
+ param target GLenum in value
+ category NV_shader_buffer_load
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MakeNamedBufferResidentNV(buffer, access)
+ return void
+ param buffer UInt32 in value
+ param access GLenum in value
+ category NV_shader_buffer_load
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MakeNamedBufferNonResidentNV(buffer)
+ return void
+ param buffer UInt32 in value
+ category NV_shader_buffer_load
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsNamedBufferResidentNV(buffer)
+ return Boolean
+ param buffer UInt32 in value
+ category NV_shader_buffer_load
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetBufferParameterui64vNV(target, pname, params)
+ return void
+ param target GLenum in value
+ param pname GLenum in value
+ param params UInt64EXT out array [COMPSIZE(pname)]
+ category NV_shader_buffer_load
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetNamedBufferParameterui64vNV(buffer, pname, params)
+ return void
+ param buffer UInt32 in value
+ param pname GLenum in value
+ param params UInt64EXT out array [COMPSIZE(pname)]
+ category NV_shader_buffer_load
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetIntegerui64vNV(value, result)
+ return void
+ param value GLenum in value
+ param result UInt64EXT out array [COMPSIZE(value)]
+ category NV_shader_buffer_load
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+Uniformui64NV(location, value)
+ return void
+ param location Int32 in value
+ param value UInt64EXT in value
+ category NV_shader_buffer_load
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniformui64vNV(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt64EXT in array [count]
+ category NV_shader_buffer_load
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetUniformui64vNV(program, location, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param params UInt64EXT out array [COMPSIZE(program/location)]
+ category NV_shader_buffer_load
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformui64NV(program, location, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param value UInt64EXT in value
+ category NV_shader_buffer_load
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniformui64vNV(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt64EXT in array [count]
+ category NV_shader_buffer_load
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #380
+# NV_vertex_buffer_unified_memory commands
+#
+###############################################################################
+
+BufferAddressRangeNV(pname, index, address, length)
+ return void
+ param pname GLenum in value
+ param index UInt32 in value
+ param address UInt64EXT in value
+ param length BufferSize in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexFormatNV(size, type, stride)
+ return void
+ param size Int32 in value
+ param type GLenum in value
+ param stride SizeI in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+NormalFormatNV(type, stride)
+ return void
+ param type GLenum in value
+ param stride SizeI in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ColorFormatNV(size, type, stride)
+ return void
+ param size Int32 in value
+ param type GLenum in value
+ param stride SizeI in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IndexFormatNV(type, stride)
+ return void
+ param type GLenum in value
+ param stride SizeI in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+TexCoordFormatNV(size, type, stride)
+ return void
+ param size Int32 in value
+ param type GLenum in value
+ param stride SizeI in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+EdgeFlagFormatNV(stride)
+ return void
+ param stride SizeI in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+SecondaryColorFormatNV(size, type, stride)
+ return void
+ param size Int32 in value
+ param type GLenum in value
+ param stride SizeI in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+FogCoordFormatNV(type, stride)
+ return void
+ param type GLenum in value
+ param stride SizeI in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribFormatNV(index, size, type, normalized, stride)
+ return void
+ param index UInt32 in value
+ param size Int32 in value
+ param type GLenum in value
+ param normalized Boolean in value
+ param stride SizeI in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribIFormatNV(index, size, type, stride)
+ return void
+ param index UInt32 in value
+ param size Int32 in value
+ param type GLenum in value
+ param stride SizeI in value
+ category NV_vertex_buffer_unified_memory
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetIntegerui64i_vNV(value, index, result)
+ return void
+ param value GLenum in value
+ param index UInt32 in value
+ param result UInt64EXT out array [COMPSIZE(value)]
+ category NV_vertex_buffer_unified_memory
+ dlflags notlistable
+ version 1.2
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #381
+# NV_texture_barrier commands
+#
+###############################################################################
+
+TextureBarrierNV()
+ return void
+ category NV_texture_barrier
+ version 1.2
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #382
+# AMD_shader_stencil_export commands
+#
+###############################################################################
+
+# (none)
+newcategory: AMD_shader_stencil_export
+
+###############################################################################
+#
+# Extension #383
+# AMD_seamless_cubemap_per_texture commands
+#
+###############################################################################
+
+# (none)
+newcategory: AMD_seamless_cubemap_per_texture
+
+###############################################################################
+#
+# Extension #384 - GLX_INTEL_swap_event
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #385
+# AMD_conservative_depth commands
+#
+###############################################################################
+
+# (none)
+newcategory: AMD_conservative_depth
+
+###############################################################################
+#
+# Extension #386
+# EXT_shader_image_load_store commands
+#
+###############################################################################
+
+BindImageTextureEXT(index, texture, level, layered, layer, access, format)
+ return void
+ param index UInt32 in value
+ param texture UInt32 in value
+ param level Int32 in value
+ param layered Boolean in value
+ param layer Int32 in value
+ param access GLenum in value
+ param format Int32 in value
+ category EXT_shader_image_load_store
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+MemoryBarrierEXT(barriers)
+ return void
+ param barriers GLbitfield in value
+ category EXT_shader_image_load_store
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #387
+# EXT_vertex_attrib_64bit commands
+#
+###############################################################################
+
+VertexAttribL1dEXT(index, x)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ category EXT_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL2dEXT(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ category EXT_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL3dEXT(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ category EXT_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL4dEXT(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Float64 in value
+ param y Float64 in value
+ param z Float64 in value
+ param w Float64 in value
+ category EXT_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL1dvEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [1]
+ category EXT_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL2dvEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [2]
+ category EXT_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL3dvEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [3]
+ category EXT_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL4dvEXT(index, v)
+ return void
+ param index UInt32 in value
+ param v Float64 in array [4]
+ category EXT_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribLPointerEXT(index, size, type, stride, pointer)
+ return void
+ param index UInt32 in value
+ param size Int32 in value
+ param type GLenum in value
+ param stride SizeI in value
+ param pointer Void in array [size]
+ category EXT_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetVertexAttribLdvEXT(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname GLenum in value
+ param params Float64 out array [COMPSIZE(pname)]
+ category EXT_vertex_attrib_64bit
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+# Also in ARB_vertex_array_64bit. Supposedly dependent on another
+# unregistered extension, EXT_direct_state_access_memory
+
+VertexArrayVertexAttribLOffsetEXT(vaobj, buffer, index, size, type, stride, offset)
+ return void
+ param vaobj UInt32 in value
+ param buffer UInt32 in value
+ param index UInt32 in value
+ param size Int32 in value
+ param type GLenum in value
+ param stride SizeI in value
+ param offset BufferOffset in value
+ category EXT_vertex_attrib_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #388
+# NV_gpu_program5 commands
+#
+###############################################################################
+
+# These commands require ARB_shader_subroutine
+#@@ void ProgramSubroutineParametersuivNV(enum target, sizei count, const uint *params);
+#@@ void GetProgramSubroutineParameteruivNV(enum target, uint index, uint *param);
+
+ProgramSubroutineParametersuivNV(target, count, params)
+ return void
+ param target GLenum in value
+ param count SizeI in value
+ param params UInt32 in array [count]
+ category NV_gpu_program5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetProgramSubroutineParameteruivNV(target, index, param)
+ return void
+ param target GLenum in value
+ param index UInt32 in value
+ param param UInt32 out array [COMPSIZE(target)]
+ category NV_gpu_program5
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #389
+# NV_gpu_shader5 commands
+#
+###############################################################################
+
+Uniform1i64NV(location, x)
+ return void
+ param location Int32 in value
+ param x Int64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform2i64NV(location, x, y)
+ return void
+ param location Int32 in value
+ param x Int64EXT in value
+ param y Int64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform3i64NV(location, x, y, z)
+ return void
+ param location Int32 in value
+ param x Int64EXT in value
+ param y Int64EXT in value
+ param z Int64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform4i64NV(location, x, y, z, w)
+ return void
+ param location Int32 in value
+ param x Int64EXT in value
+ param y Int64EXT in value
+ param z Int64EXT in value
+ param w Int64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform1i64vNV(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int64EXT in array [count]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform2i64vNV(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int64EXT in array [COMPSIZE(count*2)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform3i64vNV(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int64EXT in array [COMPSIZE(count*3)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform4i64vNV(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value Int64EXT in array [COMPSIZE(count*4)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform1ui64NV(location, x)
+ return void
+ param location Int32 in value
+ param x UInt64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform2ui64NV(location, x, y)
+ return void
+ param location Int32 in value
+ param x UInt64EXT in value
+ param y UInt64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform3ui64NV(location, x, y, z)
+ return void
+ param location Int32 in value
+ param x UInt64EXT in value
+ param y UInt64EXT in value
+ param z UInt64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform4ui64NV(location, x, y, z, w)
+ return void
+ param location Int32 in value
+ param x UInt64EXT in value
+ param y UInt64EXT in value
+ param z UInt64EXT in value
+ param w UInt64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform1ui64vNV(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt64EXT in array [count]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform2ui64vNV(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt64EXT in array [COMPSIZE(count*2)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform3ui64vNV(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt64EXT in array [COMPSIZE(count*3)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+Uniform4ui64vNV(location, count, value)
+ return void
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt64EXT in array [COMPSIZE(count*4)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetUniformi64vNV(program, location, params)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param params Int64EXT out array [COMPSIZE(location)]
+ category NV_gpu_shader5
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1i64NV(program, location, x)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x Int64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2i64NV(program, location, x, y)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x Int64EXT in value
+ param y Int64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3i64NV(program, location, x, y, z)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x Int64EXT in value
+ param y Int64EXT in value
+ param z Int64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4i64NV(program, location, x, y, z, w)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x Int64EXT in value
+ param y Int64EXT in value
+ param z Int64EXT in value
+ param w Int64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1i64vNV(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int64EXT in array [count]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2i64vNV(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int64EXT in array [COMPSIZE(count*2)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3i64vNV(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int64EXT in array [COMPSIZE(count*3)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4i64vNV(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value Int64EXT in array [COMPSIZE(count*4)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1ui64NV(program, location, x)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x UInt64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2ui64NV(program, location, x, y)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x UInt64EXT in value
+ param y UInt64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3ui64NV(program, location, x, y, z)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x UInt64EXT in value
+ param y UInt64EXT in value
+ param z UInt64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4ui64NV(program, location, x, y, z, w)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param x UInt64EXT in value
+ param y UInt64EXT in value
+ param z UInt64EXT in value
+ param w UInt64EXT in value
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform1ui64vNV(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt64EXT in array [count]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform2ui64vNV(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt64EXT in array [COMPSIZE(count*2)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform3ui64vNV(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt64EXT in array [COMPSIZE(count*3)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+ProgramUniform4ui64vNV(program, location, count, value)
+ return void
+ param program UInt32 in value
+ param location Int32 in value
+ param count SizeI in value
+ param value UInt64EXT in array [COMPSIZE(count*4)]
+ category NV_gpu_shader5
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+#@ GetUniformui64vNV also in NV_shader_buffer_load
+
+###############################################################################
+#
+# Extension #390
+# NV_shader_buffer_store commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_shader_buffer_store
+
+###############################################################################
+#
+# Extension #391
+# NV_tessellation_program5 commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_tessellation_program5
+
+###############################################################################
+#
+# Extension #392
+# NV_vertex_attrib_integer_64bit commands
+#
+###############################################################################
+
+VertexAttribL1i64NV(index, x)
+ return void
+ param index UInt32 in value
+ param x Int64EXT in value
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL2i64NV(index, x, y)
+ return void
+ param index UInt32 in value
+ param x Int64EXT in value
+ param y Int64EXT in value
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL3i64NV(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x Int64EXT in value
+ param y Int64EXT in value
+ param z Int64EXT in value
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL4i64NV(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x Int64EXT in value
+ param y Int64EXT in value
+ param z Int64EXT in value
+ param w Int64EXT in value
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL1i64vNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Int64EXT in array [1]
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL2i64vNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Int64EXT in array [2]
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL3i64vNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Int64EXT in array [3]
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL4i64vNV(index, v)
+ return void
+ param index UInt32 in value
+ param v Int64EXT in array [4]
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL1ui64NV(index, x)
+ return void
+ param index UInt32 in value
+ param x UInt64EXT in value
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL2ui64NV(index, x, y)
+ return void
+ param index UInt32 in value
+ param x UInt64EXT in value
+ param y UInt64EXT in value
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL3ui64NV(index, x, y, z)
+ return void
+ param index UInt32 in value
+ param x UInt64EXT in value
+ param y UInt64EXT in value
+ param z UInt64EXT in value
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL4ui64NV(index, x, y, z, w)
+ return void
+ param index UInt32 in value
+ param x UInt64EXT in value
+ param y UInt64EXT in value
+ param z UInt64EXT in value
+ param w UInt64EXT in value
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL1ui64vNV(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt64EXT in array [1]
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL2ui64vNV(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt64EXT in array [2]
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL3ui64vNV(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt64EXT in array [3]
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VertexAttribL4ui64vNV(index, v)
+ return void
+ param index UInt32 in value
+ param v UInt64EXT in array [4]
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetVertexAttribLi64vNV(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname GLenum in value
+ param params Int64EXT out array [COMPSIZE(pname)]
+ category NV_vertex_attrib_integer_64bit
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+GetVertexAttribLui64vNV(index, pname, params)
+ return void
+ param index UInt32 in value
+ param pname GLenum in value
+ param params UInt64EXT out array [COMPSIZE(pname)]
+ category NV_vertex_attrib_integer_64bit
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+#@ VertexAttribLFormatNV also requires NV_vertex_buffer_unified_memory
+
+VertexAttribLFormatNV(index, size, type, stride)
+ return void
+ param index UInt32 in value
+ param size Int32 in value
+ param type GLenum in value
+ param stride SizeI in value
+ category NV_vertex_attrib_integer_64bit
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #393
+# NV_multisample_coverage commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_multisample_coverage
+
+###############################################################################
+#
+# Extension #394
+# AMD_name_gen_delete commands
+#
+###############################################################################
+
+GenNamesAMD(identifier, num, names)
+ return void
+ param identifier GLenum in value
+ param num UInt32 in value
+ param names UInt32 out array [num]
+ category AMD_name_gen_delete
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DeleteNamesAMD(identifier, num, names)
+ return void
+ param identifier GLenum in value
+ param num UInt32 in value
+ param names UInt32 in array [num]
+ category AMD_name_gen_delete
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+IsNameAMD(identifier, name)
+ return Boolean
+ param identifier GLenum in value
+ param name UInt32 in value
+ category AMD_name_gen_delete
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #395
+# AMD_debug_output commands
+#
+###############################################################################
+
+DebugMessageEnableAMD(category, severity, count, ids, enabled)
+ return void
+ param category GLenum in value
+ param severity GLenum in value
+ param count SizeI in value
+ param ids UInt32 in array [count]
+ param enabled Boolean in value
+ category AMD_debug_output
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DebugMessageInsertAMD(category, severity, id, length, buf)
+ return void
+ param category GLenum in value
+ param severity GLenum in value
+ param id UInt32 in value
+ param length SizeI in value
+ param buf Char in array [length]
+ category AMD_debug_output
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+DebugMessageCallbackAMD(callback, userParam)
+ return void
+ param callback GLDEBUGPROCAMD in value
+ param userParam Void out reference
+ category AMD_debug_output
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+GetDebugMessageLogAMD(count, bufsize, categories, severities, ids, lengths, message)
+ return UInt32
+ param count UInt32 in value
+ param bufsize SizeI in value
+ param categories GLenum out array [count]
+ param severities UInt32 out array [count]
+ param ids UInt32 out array [count]
+ param lengths SizeI out array [count]
+ param message Char out array [bufsize]
+ category AMD_debug_output
+ dlflags notlistable
+ version 4.1
+ extension
+ glxsingle ?
+ glxflags ignore
+ offset ?
+
+###############################################################################
+#
+# Extension #396
+# NV_vdpau_interop commands
+#
+###############################################################################
+
+VDPAUInitNV(vdpDevice, getProcAddress)
+ return void
+ param vdpDevice Void in reference
+ param getProcAddress Void in reference
+ category NV_vdpau_interop
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VDPAUFiniNV()
+ return void
+ category NV_vdpau_interop
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VDPAURegisterVideoSurfaceNV(vdpSurface, target, numTextureNames, textureNames)
+ return vdpauSurfaceNV
+ param vdpSurface Void out reference
+ param target GLenum in value
+ param numTextureNames SizeI in value
+ param textureNames UInt32 in array [numTextureNames]
+ category NV_vdpau_interop
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VDPAURegisterOutputSurfaceNV(vdpSurface, target, numTextureNames, textureNames)
+ return vdpauSurfaceNV
+ param vdpSurface Void out reference
+ param target GLenum in value
+ param numTextureNames SizeI in value
+ param textureNames UInt32 in array [numTextureNames]
+ category NV_vdpau_interop
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VDPAUIsSurfaceNV(surface)
+ return void
+ param surface vdpauSurfaceNV in value
+ category NV_vdpau_interop
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VDPAUUnregisterSurfaceNV(surface)
+ return void
+ param surface vdpauSurfaceNV in value
+ category NV_vdpau_interop
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VDPAUGetSurfaceivNV(surface, pname, bufSize, length, values)
+ return void
+ param surface vdpauSurfaceNV in value
+ param pname GLenum in value
+ param bufSize SizeI in value
+ param length SizeI out reference
+ param values Int32 out array [length]
+ category NV_vdpau_interop
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VDPAUSurfaceAccessNV(surface, access)
+ return void
+ param surface vdpauSurfaceNV in value
+ param access GLenum in value
+ category NV_vdpau_interop
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VDPAUMapSurfacesNV(numSurfaces, surfaces)
+ return void
+ param numSurfaces SizeI in value
+ param surfaces vdpauSurfaceNV in array [numSurfaces]
+ category NV_vdpau_interop
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+VDPAUUnmapSurfacesNV(numSurface, surfaces)
+ return void
+ param numSurface SizeI in value
+ param surfaces vdpauSurfaceNV in array [numSurface]
+ category NV_vdpau_interop
+ version 4.1
+ extension
+ glxropcode ?
+ glxflags ignore
+ offset ?
+
+
+###############################################################################
+#
+# Extension #397
+# AMD_transform_feedback3_lines_triangles commands
+#
+###############################################################################
+
+# (none)
+newcategory: AMD_transform_feedback3_lines_triangles
+
+###############################################################################
+#
+# Extension #398 - GLX_AMD_gpu_association
+# Extension #399 - GLX_EXT_create_context_es2_profile
+# Extension #400 - WGL_EXT_create_context_es2_profile
+#
+###############################################################################
+
+###############################################################################
+#
+# Extension #401
+# AMD_depth_clamp_separate commands
+#
+###############################################################################
+
+# (none)
+newcategory: AMD_depth_clamp_separate
+
+###############################################################################
+#
+# Extension #402
+# EXT_texture_sRGB_decode commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_texture_sRGB_decode
+
diff --git a/xorg-server/hw/xwin/glx/gl.tm b/xorg-server/hw/xwin/glx/gl.tm
new file mode 100644
index 000000000..f7b3856ac
--- /dev/null
+++ b/xorg-server/hw/xwin/glx/gl.tm
@@ -0,0 +1,328 @@
+AccumOp,*,*, GLenum,*,*
+AlphaFunction,*,*, GLenum,*,*
+AttribMask,*,*, GLbitfield,*,*
+BeginMode,*,*, GLenum,*,*
+BinormalPointerTypeEXT,*,*, GLenum,*,*
+BlendEquationMode,*,*, GLenum,*,*
+BlendEquationModeEXT,*,*, GLenum,*,*
+BlendFuncSeparateParameterEXT,*,*, GLenum,*,*
+BlendingFactorDest,*,*, GLenum,*,*
+BlendingFactorSrc,*,*, GLenum,*,*
+Boolean,*,*, GLboolean,*,*
+BooleanPointer,*,*, GLboolean*,*,*
+Char,*,*, GLchar,*,*
+CharPointer,*,*, GLchar*,*,*
+CheckedFloat32,*,*, GLfloat,*,*
+CheckedInt32,*,*, GLint,*,*
+ClampColorTargetARB,*,*, GLenum,*,*
+ClampColorModeARB,*,*, GLenum,*,*
+ClampedColorF,*,*, GLclampf,*,*
+ClampedFloat32,*,*, GLclampf,*,*
+ClampedFloat64,*,*, GLclampd,*,*
+ClampedStencilValue,*,*, GLint,*,*
+ClearBufferMask,*,*, GLbitfield,*,*
+ClientAttribMask,*,*, GLbitfield,*,*
+ClipPlaneName,*,*, GLenum,*,*
+ColorB,*,*, GLbyte,*,*
+ColorD,*,*, GLdouble,*,*
+ColorF,*,*, GLfloat,*,*
+ColorI,*,*, GLint,*,*
+ColorIndexValueD,*,*, GLdouble,*,*
+ColorIndexValueF,*,*, GLfloat,*,*
+ColorIndexValueI,*,*, GLint,*,*
+ColorIndexValueS,*,*, GLshort,*,*
+ColorIndexValueUB,*,*, GLubyte,*,*
+ColorMaterialParameter,*,*, GLenum,*,*
+ColorPointerType,*,*, GLenum,*,*
+ColorS,*,*, GLshort,*,*
+ColorTableParameterPName,*,*, GLenum,*,*
+ColorTableParameterPNameSGI,*,*, GLenum,*,*
+ColorTableTarget,*,*, GLenum,*,*
+ColorTableTargetSGI,*,*, GLenum,*,*
+ColorUB,*,*, GLubyte,*,*
+ColorUI,*,*, GLuint,*,*
+ColorUS,*,*, GLushort,*,*
+CombinerBiasNV,*,*, GLenum,*,*
+CombinerComponentUsageNV,*,*, GLenum,*,*
+CombinerMappingNV,*,*, GLenum,*,*
+CombinerParameterNV,*,*, GLenum,*,*
+CombinerPortionNV,*,*, GLenum,*,*
+CombinerRegisterNV,*,*, GLenum,*,*
+CombinerScaleNV,*,*, GLenum,*,*
+CombinerStageNV,*,*, GLenum,*,*
+CombinerVariableNV,*,*, GLenum,*,*
+CompressedTextureARB,*,*, GLvoid,*,*
+ControlPointNV,*,*, GLvoid,*,*
+ControlPointTypeNV,*,*, GLenum,*,*
+ConvolutionParameter,*,*, GLenum,*,*
+ConvolutionParameterEXT,*,*, GLenum,*,*
+ConvolutionTarget,*,*, GLenum,*,*
+ConvolutionTargetEXT,*,*, GLenum,*,*
+CoordD,*,*, GLdouble,*,*
+CoordF,*,*, GLfloat,*,*
+CoordI,*,*, GLint,*,*
+CoordS,*,*, GLshort,*,*
+CullFaceMode,*,*, GLenum,*,*
+CullParameterEXT,*,*, GLenum,*,*
+DepthFunction,*,*, GLenum,*,*
+DrawBufferMode,*,*, GLenum,*,*
+DrawBufferName,*,*, GLint,*,*
+DrawElementsType,*,*, GLenum,*,*
+ElementPointerTypeATI,*,*, GLenum,*,*
+EnableCap,*,*, GLenum,*,*
+ErrorCode,*,*, GLenum,*,*
+EvalMapsModeNV,*,*, GLenum,*,*
+EvalTargetNV,*,*, GLenum,*,*
+FeedbackElement,*,*, GLfloat,*,*
+FeedbackType,*,*, GLenum,*,*
+FenceNV,*,*, GLuint,*,*
+FenceConditionNV,*,*, GLenum,*,*
+FenceParameterNameNV,*,*, GLenum,*,*
+FfdMaskSGIX,*,*, GLbitfield,*,*
+FfdTargetSGIX,*,*, GLenum,*,*
+Float32,*,*, GLfloat,*,*
+Float32Pointer,*,*, GLfloat*,*,*
+Float64,*,*, GLdouble,*,*
+Float64Pointer,*,*, GLdouble*,*,*
+FogParameter,*,*, GLenum,*,*
+FogPointerTypeEXT,*,*, GLenum,*,*
+FogPointerTypeIBM,*,*, GLenum,*,*
+FragmentLightModelParameterSGIX,*,*,GLenum,*,*
+FragmentLightNameSGIX,*,*, GLenum,*,*
+FragmentLightParameterSGIX,*,*, GLenum,*,*
+FramebufferAttachment,*,*, GLenum,*,*
+FramebufferTarget,*,*, GLenum,*,*
+FrontFaceDirection,*,*, GLenum,*,*
+FunctionPointer,*,*, _GLfuncptr,*,*
+GetColorTableParameterPName,*,*, GLenum,*,*
+GetColorTableParameterPNameSGI,*,*, GLenum,*,*
+GetConvolutionParameterPName,*,*, GLenum,*,*
+GetHistogramParameterPName,*,*, GLenum,*,*
+GetHistogramParameterPNameEXT,*,*, GLenum,*,*
+GetMapQuery,*,*, GLenum,*,*
+GetMinmaxParameterPName,*,*, GLenum,*,*
+GetMinmaxParameterPNameEXT,*,*, GLenum,*,*
+GetPName,*,*, GLenum,*,*
+GetPointervPName,*,*, GLenum,*,*
+GetTextureParameter,*,*, GLenum,*,*
+HintMode,*,*, GLenum,*,*
+HintTarget,*,*, GLenum,*,*
+HintTargetPGI,*,*, GLenum,*,*
+HistogramTarget,*,*, GLenum,*,*
+HistogramTargetEXT,*,*, GLenum,*,*
+IglooFunctionSelectSGIX,*,*, GLenum,*,*
+IglooParameterSGIX,*,*, GLvoid,*,*
+ImageTransformPNameHP,*,*, GLenum,*,*
+ImageTransformTargetHP,*,*, GLenum,*,*
+IndexFunctionEXT,*,*, GLenum,*,*
+IndexMaterialParameterEXT,*,*, GLenum,*,*
+IndexPointerType,*,*, GLenum,*,*
+Int16,*,*, GLshort,*,*
+Int32,*,*, GLint,*,*
+Int8,*,*, GLbyte,*,*
+InterleavedArrayFormat,*,*, GLenum,*,*
+LightEnvParameterSGIX,*,*, GLenum,*,*
+LightModelParameter,*,*, GLenum,*,*
+LightName,*,*, GLenum,*,*
+LightParameter,*,*, GLenum,*,*
+LightTextureModeEXT,*,*, GLenum,*,*
+LightTexturePNameEXT,*,*, GLenum,*,*
+LineStipple,*,*, GLushort,*,*
+List,*,*, GLuint,*,*
+ListMode,*,*, GLenum,*,*
+ListNameType,*,*, GLenum,*,*
+ListParameterName,*,*, GLenum,*,*
+LogicOp,*,*, GLenum,*,*
+MapAttribParameterNV,*,*, GLenum,*,*
+MapParameterNV,*,*, GLenum,*,*
+MapTarget,*,*, GLenum,*,*
+MapTargetNV,*,*, GLenum,*,*
+MapTypeNV,*,*, GLenum,*,*
+MaskedColorIndexValueF,*,*, GLfloat,*,*
+MaskedColorIndexValueI,*,*, GLuint,*,*
+MaskedStencilValue,*,*, GLuint,*,*
+MaterialFace,*,*, GLenum,*,*
+MaterialParameter,*,*, GLenum,*,*
+MatrixIndexPointerTypeARB,*,*, GLenum,*,*
+MatrixMode,*,*, GLenum,*,*
+MatrixTransformNV,*,*, GLenum,*,*
+MeshMode1,*,*, GLenum,*,*
+MeshMode2,*,*, GLenum,*,*
+MinmaxTarget,*,*, GLenum,*,*
+MinmaxTargetEXT,*,*, GLenum,*,*
+NormalPointerType,*,*, GLenum,*,*
+NurbsCallback,*,*, GLenum,*,*
+NurbsObj,*,*, GLUnurbs*,*,*
+NurbsProperty,*,*, GLenum,*,*
+NurbsTrim,*,*, GLenum,*,*
+OcclusionQueryParameterNameNV,*,*, GLenum,*,*
+PixelCopyType,*,*, GLenum,*,*
+PixelFormat,*,*, GLenum,*,*
+PixelInternalFormat,*,*, GLenum,*,*
+PixelMap,*,*, GLenum,*,*
+PixelStoreParameter,*,*, GLenum,*,*
+PixelTexGenModeSGIX,*,*, GLenum,*,*
+PixelTexGenParameterNameSGIS,*,*, GLenum,*,*
+PixelTransferParameter,*,*, GLenum,*,*
+PixelTransformPNameEXT,*,*, GLenum,*,*
+PixelTransformTargetEXT,*,*, GLenum,*,*
+PixelType,*,*, GLenum,*,*
+PointParameterNameARB,*,*, GLenum,*,*
+PolygonMode,*,*, GLenum,*,*
+ProgramNV,*,*, GLuint,*,*
+ProgramCharacterNV,*,*, GLubyte,*,*
+ProgramParameterNV,*,*, GLenum,*,*
+ProgramParameterPName,*,*, GLenum,*,*
+QuadricCallback,*,*, GLenum,*,*
+QuadricDrawStyle,*,*, GLenum,*,*
+QuadricNormal,*,*, GLenum,*,*
+QuadricObj,*,*, GLUquadric*,*,*
+QuadricOrientation,*,*, GLenum,*,*
+ReadBufferMode,*,*, GLenum,*,*
+RenderbufferTarget,*,*, GLenum,*,*
+RenderingMode,*,*, GLenum,*,*
+ReplacementCodeSUN,*,*, GLuint,*,*
+ReplacementCodeTypeSUN,*,*, GLenum,*,*
+SamplePassARB,*,*, GLenum,*,*
+SamplePatternEXT,*,*, GLenum,*,*
+SamplePatternSGIS,*,*, GLenum,*,*
+SecondaryColorPointerTypeIBM,*,*, GLenum,*,*
+SelectName,*,*, GLuint,*,*
+SeparableTarget,*,*, GLenum,*,*
+SeparableTargetEXT,*,*, GLenum,*,*
+ShadingModel,*,*, GLenum,*,*
+SizeI,*,*, GLsizei,*,*
+SpriteParameterNameSGIX,*,*, GLenum,*,*
+StencilFunction,*,*, GLenum,*,*
+StencilFaceDirection,*,*, GLenum,*,*
+StencilOp,*,*, GLenum,*,*
+StencilValue,*,*, GLint,*,*
+String,*,*, const GLubyte *,*,*
+StringName,*,*, GLenum,*,*
+TangentPointerTypeEXT,*,*, GLenum,*,*
+TessCallback,*,*, GLenum,*,*
+TessContour,*,*, GLenum,*,*
+TessProperty,*,*, GLenum,*,*
+TesselatorObj,*,*, GLUtesselator*,*,*
+TexCoordPointerType,*,*, GLenum,*,*
+Texture,*,*, GLuint,*,*
+TextureComponentCount,*,*, GLint,*,*
+TextureCoordName,*,*, GLenum,*,*
+TextureEnvParameter,*,*, GLenum,*,*
+TextureEnvTarget,*,*, GLenum,*,*
+TextureFilterSGIS,*,*, GLenum,*,*
+TextureGenParameter,*,*, GLenum,*,*
+TextureNormalModeEXT,*,*, GLenum,*,*
+TextureParameterName,*,*, GLenum,*,*
+TextureTarget,*,*, GLenum,*,*
+TextureUnit,*,*, GLenum,*,*
+UInt16,*,*, GLushort,*,*
+UInt32,*,*, GLuint,*,*
+UInt8,*,*, GLubyte,*,*
+VertexAttribEnum,*,*, GLenum,*,*
+VertexAttribEnumNV,*,*, GLenum,*,*
+VertexAttribPointerTypeNV,*,*, GLenum,*,*
+VertexPointerType,*,*, GLenum,*,*
+VertexWeightPointerTypeEXT,*,*, GLenum,*,*
+Void,*,*, GLvoid,*,*
+VoidPointer,*,*, GLvoid*,*,*
+ConstVoidPointer,*,*, GLvoid* const,*,*
+WeightPointerTypeARB,*,*, GLenum,*,*
+WinCoord,*,*, GLint,*,*
+void,*,*, *,*,*
+ArrayObjectPNameATI,*,*, GLenum,*,*
+ArrayObjectUsageATI,*,*, GLenum,*,*,
+ConstFloat32,*,*, GLfloat,*,*
+ConstInt32,*,*, GLint,*,*
+ConstUInt32,*,*, GLuint,*,*
+ConstVoid,*,*, GLvoid,*,*
+DataTypeEXT,*,*, GLenum,*,*
+FragmentOpATI,*,*, GLenum,*,*
+GetTexBumpParameterATI,*,*, GLenum,*,*
+GetVariantValueEXT,*,*, GLenum,*,*
+ParameterRangeEXT,*,*, GLenum,*,*
+PreserveModeATI,*,*, GLenum,*,*
+ProgramFormatARB,*,*, GLenum,*,*
+ProgramTargetARB,*,*, GLenum,*,*
+ProgramTarget,*,*, GLenum,*,*
+ProgramPropertyARB,*,*, GLenum,*,*
+ProgramStringPropertyARB,*,*, GLenum,*,*
+ScalarType,*,*, GLenum,*,*
+SwizzleOpATI,*,*, GLenum,*,*
+TexBumpParameterATI,*,*, GLenum,*,*
+VariantCapEXT,*,*, GLenum,*,*
+VertexAttribPointerPropertyARB,*,*, GLenum,*,*
+VertexAttribPointerTypeARB,*,*, GLenum,*,*
+VertexAttribPropertyARB,*,*, GLenum,*,*
+VertexShaderCoordOutEXT,*,*, GLenum,*,*
+VertexShaderOpEXT,*,*, GLenum,*,*
+VertexShaderParameterEXT,*,*, GLenum,*,*
+VertexShaderStorageTypeEXT,*,*, GLenum,*,*
+VertexShaderTextureUnitParameter,*,*, GLenum,*,*
+VertexShaderWriteMaskEXT,*,*, GLenum,*,*
+VertexStreamATI,*,*, GLenum,*,*
+PNTrianglesPNameATI,*,*, GLenum,*,*
+# ARB_vertex_buffer_object types and core equivalents for new types
+BufferOffset,*,*, GLintptr,*,*
+BufferSize,*,*, GLsizeiptr,*,*
+BufferAccessARB,*,*, GLenum,*,*
+BufferOffsetARB,*,*, GLintptrARB,*,*
+BufferPNameARB,*,*, GLenum,*,*
+BufferPointerNameARB,*,*, GLenum,*,*
+BufferSizeARB,*,*, GLsizeiptrARB,*,*
+BufferTargetARB,*,*, GLenum,*,*
+BufferUsageARB,*,*, GLenum,*,*
+# APPLE_fence
+ObjectTypeAPPLE,*,*, GLenum,*,*
+# APPLE_vertex_array_range
+VertexArrayPNameAPPLE,*,*, GLenum,*,*
+# ATI_draw_buffers
+DrawBufferModeATI,*,*, GLenum,*,*
+# NV_half
+Half16NV,*,*, GLhalfNV,*,*
+# NV_pixel_data_range
+PixelDataRangeTargetNV,*,*, GLenum,*,*
+# Generic types for as-yet-unspecified enums
+TypeEnum,*,*, GLenum,*,*
+GLbitfield,*,*, GLbitfield,*,*
+GLenum,*,*, GLenum,*,*
+Int64,*,*, GLint64,*,*
+UInt64,*,*, GLuint64,*,*
+# Object handle & data pointers
+handleARB,*,*, GLhandleARB,*,*
+charARB,*,*, GLcharARB,*,*
+charPointerARB,*,*, GLcharARB*,*,*
+sync,*,*, GLsync,*,*,
+# EXT_timer_query
+Int64EXT,*,*, GLint64EXT,*,*
+UInt64EXT,*,*, GLuint64EXT,*,*
+# EXT_direct_state_access
+FramebufferAttachmentParameterName,*,*, GLenum,*,*
+Framebuffer,*,*, GLuint,*,*
+FramebufferStatus,*,*, GLenum,*,*
+GetFramebufferParameter,*,*, GLenum,*,*
+Intptr,*,*, GLintptr,*,*
+ProgramFormat,*,*, GLenum,*,*
+ProgramProperty,*,*, GLenum,*,*
+ProgramStringProperty,*,*, GLenum,*,*
+Renderbuffer,*,*, GLuint,*,*
+RenderbufferParameterName,*,*, GLenum,*,*
+Sizeiptr,*,*, GLsizeiptr,*,*
+TextureInternalFormat,*,*, GLenum,*,*
+VertexBufferObjectAccess,*,*, GLenum,*,*
+VertexBufferObjectParameter,*,*, GLenum,*,*
+VertexBufferObjectUsage,*,*, GLenum,*,*
+# ARB_map_buffer_range
+BufferAccessMask,*,*, GLbitfield,*,*
+# NV_explicit_multisample
+GetMultisamplePNameNV,*,*, GLenum,*,*
+SampleMaskNV,*,*, GLbitfield,*,*
+# ARB_debug_output
+GLDEBUGPROCARB,*,*, GLDEBUGPROCARB,*,*
+# AMD_debug_output
+GLDEBUGPROCAMD,*,*, GLDEBUGPROCAMD,*,*
+# NV_vdpau_interop
+vdpauSurfaceNV,*,*, GLvdpauSurfaceNV,*,*,
+# External API types
+cl_context,*,*, struct _cl_context *,*,*
+cl_event,*,*, struct _cl_event *,*,*
diff --git a/xorg-server/hw/xwin/glx/glwindows.h b/xorg-server/hw/xwin/glx/glwindows.h
index cc3f2e6ee..72278df30 100644
--- a/xorg-server/hw/xwin/glx/glwindows.h
+++ b/xorg-server/hw/xwin/glx/glwindows.h
@@ -49,9 +49,15 @@ const GLubyte* glGetStringWrapperNonstatic(GLenum name);
void glAddSwapHintRectWINWrapperNonstatic(GLint x, GLint y, GLsizei width, GLsizei height);
void glWinSetupDispatchTable(void);
-#if 1
+#ifdef _DEBUG
+#ifdef _MSC_VER
+#define GLWIN_TRACE_MSG(msg, ...) if (glxWinDebugSettings.enableTrace) ErrorF(msg " [%s:%d]\n" , __VA_ARGS__ , __FUNCTION__, __LINE__ )
+#define GLWIN_DEBUG_MSG(msg, ...) if (glxWinDebugSettings.enableDebug) ErrorF(msg " [%s:%d]\n" , __VA_ARGS__ , __FUNCTION__, __LINE__ )
+#else
#define GLWIN_TRACE_MSG(msg, args...) if (glxWinDebugSettings.enableTrace) ErrorF(msg " [%s:%d]\n" , ##args , __FUNCTION__, __LINE__ )
#define GLWIN_DEBUG_MSG(msg, args...) if (glxWinDebugSettings.enableDebug) ErrorF(msg " [%s:%d]\n" , ##args , __FUNCTION__, __LINE__ )
+#endif
+
#else
#define GLWIN_TRACE_MSG(a, ...)
#define GLWIN_DEBUG_MSG(a, ...)
diff --git a/xorg-server/hw/xwin/glx/glwrap.c b/xorg-server/hw/xwin/glx/glwrap.c
index 5190d36f7..fe59f71ef 100644
--- a/xorg-server/hw/xwin/glx/glwrap.c
+++ b/xorg-server/hw/xwin/glx/glwrap.c
@@ -44,7 +44,9 @@
#include <glx/glapi.h>
#include <glx/dispatch.h>
#include <glwindows.h>
+#include <winmsg.h>
+#ifdef _DEBUG
static unsigned int glWinIndirectProcCalls = 0;
static unsigned int glWinDirectProcCalls = 0;
@@ -66,6 +68,7 @@ glWinCallDelta(void)
glWinIndirectProcCallsLast = glWinIndirectProcCalls;
}
}
+#endif
static PROC
glWinResolveHelper(PROC *cache, char *symbol)
@@ -78,12 +81,12 @@ glWinResolveHelper(PROC *cache, char *symbol)
proc = wglGetProcAddress(symbol);
if (proc == NULL)
{
- ErrorF("glwrap: Can't resolve \"%s\"\n", symbol);
+ winDebug("glwrap: Can't resolve \"%s\"\n", symbol);
(*cache) = (PROC)-1;
}
else
{
- ErrorF("glwrap: Resolved \"%s\"\n", symbol);
+ winDebug("glwrap: Resolved \"%s\"\n", symbol);
(*cache) = proc;
}
}
@@ -101,14 +104,20 @@ glWinResolveHelper(PROC *cache, char *symbol)
return proc;
}
+#ifdef _DEBUG
+#define INCPROCCALLS glWinIndirectProcCalls++;
+#else
+#define INCPROCCALLS
+#endif
+
#define RESOLVE_RET(proctype, symbol, retval) \
static PROC cache = NULL; \
- __stdcall proctype proc = (proctype)glWinResolveHelper(&cache, symbol); \
+ proctype proc = (proctype)glWinResolveHelper(&cache, symbol); \
if (proc == NULL) { \
__glXErrorCallBack(0); \
return retval; \
} \
- glWinIndirectProcCalls++;
+ INCPROCCALLS
#define RESOLVE(proctype, symbol) RESOLVE_RET(proctype, symbol,)
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index 4877a9ac8..84d4a34c6 100644
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -77,6 +77,11 @@
#include <winpriv.h>
#include <wgl_ext_api.h>
+#include "win.h"
+#include <winmsg.h>
+
+extern Bool g_fXdmcpEnabled;
+extern Bool g_fNativeGl;
#define NUM_ELEMENTS(x) (sizeof(x)/ sizeof(x[1]))
@@ -91,17 +96,19 @@ typedef struct __GLXWinScreen glxWinScreen;
typedef struct __GLXWinConfig GLXWinConfig;
struct __GLXWinContext {
- __GLXcontext base;
+ glx_context base;
HGLRC ctx; /* Windows GL Context */
+ HDC hDC; /* Windows device context */
+ HDC hreadDC; /* Windows device read context */
__GLXWinContext *shareContext; /* Context with which we will share display lists and textures */
HWND hwnd; /* For detecting when HWND has changed */
+ HWND hreadwnd;
};
struct __GLXWinDrawable
{
__GLXdrawable base;
__GLXWinContext *drawContext;
- __GLXWinContext *readContext;
/* If this drawable is GLX_DRAWABLE_PBUFFER */
HPBUFFERARB hPbuffer;
@@ -128,7 +135,9 @@ struct __GLXWinScreen
/* wrapped screen functions */
RealizeWindowProcPtr RealizeWindow;
UnrealizeWindowProcPtr UnrealizeWindow;
+ DestroyWindowProcPtr DestroyWindow;
CopyWindowProcPtr CopyWindow;
+ PositionWindowProcPtr PositionWindow;
};
struct __GLXWinConfig
@@ -142,12 +151,34 @@ struct __GLXWinConfig
* Various debug helpers
*/
-#define GLWIN_DEBUG_HWND(hwnd) \
- if (glxWinDebugSettings.dumpHWND) { \
- char buffer[1024]; \
- if (GetWindowText(hwnd, buffer, sizeof(buffer))==0) *buffer=0; \
- GLWIN_DEBUG_MSG("Got HWND %p for window '%s'", hwnd, buffer); \
- }
+#ifdef _DEBUG
+void GLWIN_DEBUG_HWND(HWND hwnd)
+{
+ if (glxWinDebugSettings.dumpHWND)
+ {
+ char buffer[1024];
+ RECT Rect;
+ HDC hDc=GetDC(hwnd);
+
+ if (GetWindowText(hwnd, buffer, sizeof(buffer))==0) *buffer=0;
+ GetWindowRect(hwnd,&Rect);
+
+ GLWIN_DEBUG_MSG("Got HWND %p (hdc %p) for window '%s' (%d,%d,%d,%d)", hwnd, hDc, buffer, Rect.left, Rect.top, Rect.right, Rect.bottom);
+ ReleaseDC(hwnd,hDc);
+ }
+}
+
+void GLWIN_HDC_DEBUG_MSG(const char *Message, HDC hDc, HWND hwnd)
+{
+ char buffer[1024];
+ RECT Rect;
+
+ if (GetWindowText(hwnd, buffer, sizeof(buffer))==0) *buffer=0;
+ GetWindowRect(hwnd,&Rect);
+
+ GLWIN_DEBUG_MSG("Got HDC %p (hwnd %p) for window '%s' (%d,%d,%d,%d)", hDc, hwnd, buffer, Rect.left, Rect.top, Rect.right, Rect.bottom);
+
+}
glxWinDebugSettingsRec glxWinDebugSettings = { 0, 0, 0, 0, 0, 0};
@@ -195,18 +226,24 @@ static void glxWinInitDebugSettings(void)
glxWinDebugSettings.enableWGLcallTrace = 1;
}
}
+#endif
static
const char *glxWinErrorMessage(void)
{
static char errorbuffer[1024];
+ DWORD Error=GetLastError();
+ int offset;
+
+ sprintf(errorbuffer, "%p ",Error);
+ offset=strlen(errorbuffer);
if (!FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
- GetLastError(),
+ Error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &errorbuffer,
+ (LPTSTR) &errorbuffer[offset],
sizeof(errorbuffer),
NULL ))
{
@@ -221,6 +258,8 @@ const char *glxWinErrorMessage(void)
static void pfdOut(const PIXELFORMATDESCRIPTOR *pfd);
+#ifdef _DEBUG
+
#define DUMP_PFD_FLAG(flag) \
if (pfd->dwFlags & flag) { \
ErrorF("%s%s", pipesym, #flag); \
@@ -247,6 +286,9 @@ static void pfdOut(const PIXELFORMATDESCRIPTOR *pfd)
DUMP_PFD_FLAG(PFD_SWAP_COPY);
DUMP_PFD_FLAG(PFD_SWAP_LAYER_BUFFERS);
DUMP_PFD_FLAG(PFD_GENERIC_ACCELERATED);
+ DUMP_PFD_FLAG(PFD_SUPPORT_DIRECTDRAW);
+ DUMP_PFD_FLAG(PFD_DIRECT3D_ACCELERATED);
+ DUMP_PFD_FLAG(PFD_SUPPORT_COMPOSITION);
DUMP_PFD_FLAG(PFD_DEPTH_DONTCARE);
DUMP_PFD_FLAG(PFD_DOUBLEBUFFER_DONTCARE);
DUMP_PFD_FLAG(PFD_STEREO_DONTCARE);
@@ -328,7 +370,7 @@ fbConfigsDump(unsigned int n, __GLXconfig *c)
{
unsigned int i = ((GLXWinConfig *)c)->pixelFormatIndex;
- ErrorF("%3d %2x %2x "
+ ErrorF("%3d %3x %3x "
"%-11s"
" %3d %3d %s %s %s %s %s "
"%2d %2d %2d %2d "
@@ -365,6 +407,7 @@ fbConfigsDump(unsigned int n, __GLXconfig *c)
c = c->next;
}
}
+#endif
/* ---------------------------------------------------------------------- */
/*
@@ -372,9 +415,9 @@ fbConfigsDump(unsigned int n, __GLXconfig *c)
*/
static __GLXscreen *glxWinScreenProbe(ScreenPtr pScreen);
-static __GLXcontext *glxWinCreateContext(__GLXscreen *screen,
+static glx_context *glxWinCreateContext(__GLXscreen *screen,
__GLXconfig *modes,
- __GLXcontext *baseShareContext);
+ glx_context *baseShareContext);
static __GLXdrawable *glxWinCreateDrawable(ClientPtr client,
__GLXscreen *screen,
DrawablePtr pDraw,
@@ -385,9 +428,11 @@ static __GLXdrawable *glxWinCreateDrawable(ClientPtr client,
static Bool glxWinRealizeWindow(WindowPtr pWin);
static Bool glxWinUnrealizeWindow(WindowPtr pWin);
+static Bool glxWinDestroyWindow(WindowPtr pWin);
static void glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
+static Bool glxWinPositionWindow(WindowPtr pWindow, int x, int y);
-static HDC glxWinMakeDC(__GLXWinContext *gc, __GLXWinDrawable *draw, HDC *hdc, HWND *hwnd);
+static HDC glxWinMakeDC(__GLXWinContext *gc, __GLXWinDrawable *draw, HWND *hwnd);
static void glxWinReleaseDC(HWND hwnd, HDC hdc, __GLXWinDrawable *draw);
static void glxWinCreateConfigs(HDC dc, glxWinScreen *screen);
@@ -409,7 +454,8 @@ __GLXprovider __glXWGLProvider = {
void
glxWinPushNativeProvider(void)
{
- GlxPushProvider(&__glXWGLProvider);
+ if (g_fNativeGl)
+ GlxPushProvider(&__glXWGLProvider);
}
/* ---------------------------------------------------------------------- */
@@ -436,6 +482,16 @@ glxWinScreenSwapInterval(__GLXdrawable *drawable, int interval)
return ret;
}
+static LRESULT CALLBACK GlxWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ if (uMsg== WM_NCHITTEST)
+ {
+ return HTTRANSPARENT;
+ }
+ else
+ return DefWindowProc(hwnd, uMsg, wParam, lParam);
+}
+
/*
Report the extensions split and formatted to avoid overflowing a line
*/
@@ -453,7 +509,7 @@ glxLogExtensions(const char *prefix, const char *extensions)
}
strl = strtok(str, " ");
- ErrorF("%s%s", prefix, strl);
+ winDebug("%s%s", prefix, strl);
length = strlen(prefix) + strlen(strl);
while (1)
@@ -463,21 +519,21 @@ glxLogExtensions(const char *prefix, const char *extensions)
if (length + strlen(strl) + 1 > 120)
{
- ErrorF("\n");
- ErrorF("%s",prefix);
+ winDebug("\n");
+ winDebug("%s",prefix);
length = strlen(prefix);
}
else
{
- ErrorF(" ");
+ winDebug(" ");
length++;
}
- ErrorF("%s", strl);
+ winDebug("%s", strl);
length = length + strlen(strl);
}
- ErrorF("\n");
+ winDebug("\n");
free(str);
}
@@ -495,7 +551,9 @@ glxWinScreenProbe(ScreenPtr pScreen)
GLWIN_DEBUG_MSG("glxWinScreenProbe");
+#ifdef _DEBUG
glxWinInitDebugSettings();
+#endif
if (pScreen == NULL)
return NULL;
@@ -518,27 +576,31 @@ glxWinScreenProbe(ScreenPtr pScreen)
pScreen->UnrealizeWindow = glxWinUnrealizeWindow;
screen->CopyWindow = pScreen->CopyWindow;
pScreen->CopyWindow = glxWinCopyWindow;
+ screen->PositionWindow = pScreen->PositionWindow;
+ pScreen->PositionWindow = glxWinPositionWindow;
+ screen->DestroyWindow = pScreen->DestroyWindow;
+ pScreen->DestroyWindow = glxWinDestroyWindow;
/* Dump out some useful information about the native renderer */
// create window class
-#define WIN_GL_TEST_WINDOW_CLASS "XWinGLTest"
{
static wATOM glTestWndClass = 0;
if (glTestWndClass == 0)
{
WNDCLASSEX wc;
+ glTestWndClass=1;
wc.cbSize = sizeof(WNDCLASSEX);
- wc.style = CS_HREDRAW | CS_VREDRAW;
- wc.lpfnWndProc = DefWindowProc;
+ wc.style = CS_OWNDC ;
+ wc.lpfnWndProc = GlxWindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
- wc.hInstance = GetModuleHandle(NULL);
+ wc.hInstance = g_hInstance;
wc.hIcon = 0;
wc.hCursor = 0;
- wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
+ wc.hbrBackground = 0;
wc.lpszMenuName = NULL;
- wc.lpszClassName = WIN_GL_TEST_WINDOW_CLASS;
+ wc.lpszClassName = WIN_GL_WINDOW_CLASS;
wc.hIconSm = 0;
RegisterClassEx (&wc);
}
@@ -546,7 +608,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
// create an invisible window for a scratch DC
hwnd = CreateWindowExA(0,
- WIN_GL_TEST_WINDOW_CLASS,
+ WIN_GL_WINDOW_CLASS,
"XWin GL Renderer Capabilities Test Window",
0, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), NULL);
if (hwnd == NULL)
@@ -557,15 +619,19 @@ glxWinScreenProbe(ScreenPtr pScreen)
// we must set a pixel format before we can create a context, just use the first one...
SetPixelFormat(hdc, 1, NULL);
hglrc = wglCreateContext(hdc);
- wglMakeCurrent(hdc, hglrc);
+ if (!wglMakeCurrent(hdc, hglrc))
+ {
+ DWORD ErrorCode=GetLastError();
+ ErrorF("wglMakeCurrent error: %x dc %p ctx %p\n", ErrorCode,hdc,hglrc);
+ }
// initialize wgl extension proc pointers (don't call them before here...)
// (but we need to have a current context for them to be resolvable)
wglResolveExtensionProcs();
- ErrorF("GL_VERSION: %s\n", glGetStringWrapperNonstatic(GL_VERSION));
- ErrorF("GL_VENDOR: %s\n", glGetStringWrapperNonstatic(GL_VENDOR));
- ErrorF("GL_RENDERER: %s\n", glGetStringWrapperNonstatic(GL_RENDERER));
+ winDebug("GL_VERSION: %s\n", glGetStringWrapperNonstatic(GL_VERSION));
+ winDebug("GL_VENDOR: %s\n", glGetStringWrapperNonstatic(GL_VENDOR));
+ winDebug("GL_RENDERER: %s\n", glGetStringWrapperNonstatic(GL_RENDERER));
gl_extensions = (const char *)glGetStringWrapperNonstatic(GL_EXTENSIONS);
glxLogExtensions("GL_EXTENSIONS: ", gl_extensions);
wgl_extensions = wglGetExtensionsStringARBWrapper(hdc);
@@ -651,17 +717,37 @@ glxWinScreenProbe(ScreenPtr pScreen)
screen->base.swapInterval = glxWinScreenSwapInterval;
screen->base.pScreen = pScreen;
+ // Creating the fbConfigs initializes screen->base.fbconfigs and screen->base.numFBConfigs
if (strstr(wgl_extensions, "WGL_ARB_pixel_format"))
{
glxWinCreateConfigsExt(hdc, screen);
- screen->has_WGL_ARB_pixel_format = TRUE;
+
+ /*
+ Some graphics drivers appear to advertise WGL_ARB_pixel_format,
+ but it doesn't work usefully, so we have to be prepared for it
+ to fail and fall back to using DescribePixelFormat()
+ */
+ if (screen->base.numFBConfigs > 0)
+ {
+ screen->has_WGL_ARB_pixel_format = TRUE;
+ }
}
- else
+
+ if (screen->base.numFBConfigs <= 0)
{
glxWinCreateConfigs(hdc, screen);
screen->has_WGL_ARB_pixel_format = FALSE;
}
- // Initializes screen->base.fbconfigs and screen->base.numFBConfigs
+
+ /*
+ If we still didn't get any fbConfigs, we can't provide GLX for this screen
+ */
+ if (screen->base.numFBConfigs <= 0)
+ {
+ free(screen);
+ LogMessage(X_ERROR,"AIGLX: No fbConfigs could be made from native OpenGL pixel formats\n");
+ return NULL;
+ }
/* These will be set by __glXScreenInit */
screen->base.visuals = NULL;
@@ -669,8 +755,10 @@ glxWinScreenProbe(ScreenPtr pScreen)
__glXScreenInit(&screen->base, pScreen);
+#ifdef _DEBUG
// dump out fbConfigs now fbConfigIds and visualIDs have been assigned
fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs);
+#endif
// Override the GL extensions string set by __glXScreenInit()
screen->base.GLextensions = strdup(gl_extensions);
@@ -689,30 +777,26 @@ glxWinScreenProbe(ScreenPtr pScreen)
//
// Override the GLX version (__glXScreenInit() sets it to "1.2")
- // if we have all the needed extensionsto operate as a higher version
+ // if we have all the needed extensions to operate as a higher version
//
// SGIX_fbconfig && SGIX_pbuffer && SGI_make_current_read -> 1.3
// ARB_multisample -> 1.4
//
if (screen->has_WGL_ARB_pbuffer && glx_sgi_make_current_read)
{
- free(screen->base.GLXversion);
-
if (screen->has_WGL_ARB_multisample)
{
- screen->base.GLXversion = strdup("1.4");
screen->base.GLXmajor = 1;
screen->base.GLXminor = 4;
}
else
{
- screen->base.GLXversion = strdup("1.3");
screen->base.GLXmajor = 1;
screen->base.GLXminor = 3;
}
- LogMessage(X_INFO, "AIGLX: Set GLX version to %s\n", screen->base.GLXversion);
}
}
+ LogMessage(X_INFO, "AIGLX: Set GLX version to %d.%d\n", screen->base.GLXmajor, screen->base.GLXminor);
wglMakeCurrent(NULL, NULL);
wglDeleteContext(hglrc);
@@ -733,6 +817,7 @@ glxWinRealizeWindow(WindowPtr pWin)
Bool result;
ScreenPtr pScreen = pWin->drawable.pScreen;
glxWinScreen *screenPriv = (glxWinScreen *) glxGetScreen(pScreen);
+ winWindowPriv(pWin);
GLWIN_DEBUG_MSG("glxWinRealizeWindow");
@@ -740,7 +825,12 @@ glxWinRealizeWindow(WindowPtr pWin)
pScreen->RealizeWindow = screenPriv->RealizeWindow;
result = pScreen->RealizeWindow(pWin);
pScreen->RealizeWindow = glxWinRealizeWindow;
-
+
+ // Check if ze need to move the window\n
+ if (pWinPriv->GlCtxWnd && pWinPriv->hWnd)
+ {
+ ShowWindow(pWinPriv->hWnd,SW_SHOWNOACTIVATE);
+ }
return result;
}
@@ -776,20 +866,92 @@ glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
pScreen->CopyWindow = screenPriv->CopyWindow;
pScreen->CopyWindow(pWindow, ptOldOrg, prgnSrc);
pScreen->CopyWindow = glxWinCopyWindow;
+
+}
+
+static Bool
+glxWinPositionWindow(WindowPtr pWin, int x, int y)
+{
+ Bool result;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ glxWinScreen *screenPriv = (glxWinScreen *) glxGetScreen(pScreen);
+ winWindowPriv(pWin);
+
+ pScreen->PositionWindow = screenPriv->PositionWindow;
+ result = pScreen->PositionWindow(pWin, x, y);
+ pScreen->PositionWindow = glxWinPositionWindow;
+
+ if (pWinPriv->GlCtxWnd && pWinPriv->hWnd)
+ {
+ MoveWindow(pWinPriv->hWnd,
+ pWin->drawable.x,
+ pWin->drawable.y,
+ pWin->drawable.width,
+ pWin->drawable.height,
+ FALSE);
+ winDebug("Move window %x, %x, %d, %d, %d, %d\n",pWinPriv->hWnd,GetParent(pWinPriv->hWnd), pWin->drawable.x, pWin->drawable.y, pWin->drawable.width, pWin->drawable.height);
+ }
+ return result;
}
+
static Bool
glxWinUnrealizeWindow(WindowPtr pWin)
{
Bool result;
ScreenPtr pScreen = pWin->drawable.pScreen;
glxWinScreen *screenPriv = (glxWinScreen *)glxGetScreen(pScreen);
+ winWindowPriv(pWin);
GLWIN_DEBUG_MSG("glxWinUnrealizeWindow");
- pScreen->UnrealizeWindow = screenPriv->UnrealizeWindow;
- result = pScreen->UnrealizeWindow(pWin);
- pScreen->UnrealizeWindow = glxWinUnrealizeWindow;
+ if (pWinPriv->GlCtxWnd && pWinPriv->hWnd)
+ {
+ ShowWindow(pWinPriv->hWnd,SW_HIDE);
+ result = TRUE;
+ }
+ else
+ {
+ pScreen->UnrealizeWindow = screenPriv->UnrealizeWindow;
+ result = pScreen->UnrealizeWindow(pWin);
+ pScreen->UnrealizeWindow = glxWinUnrealizeWindow;
+ }
+
+
+ return result;
+}
+
+static Bool
+glxWinDestroyWindow(WindowPtr pWin)
+{
+ Bool result;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ glxWinScreen *screenPriv = (glxWinScreen *)glxGetScreen(pScreen);
+ __GLXWinDrawable *pGlxDraw;
+ winWindowPriv(pWin);
+
+ GLWIN_DEBUG_MSG("glxWinDestroyWindow");
+
+ dixLookupResourceByType((pointer) &pGlxDraw, pWin->drawable.id, __glXDrawableRes, NullClient, DixUnknownAccess);
+
+ if (pGlxDraw && pGlxDraw->drawContext)
+ {
+ if (pGlxDraw->drawContext->hwnd!=pWinPriv->hWnd)
+ ErrorF("Wrong assumption\n");
+ glxWinReleaseDC(pGlxDraw->drawContext->hwnd, pGlxDraw->drawContext->hDC, pGlxDraw);
+ pGlxDraw->drawContext->hDC=NULL;
+ pGlxDraw->drawContext->hwnd=NULL;
+ }
+ if (pWinPriv->GlCtxWnd && pWinPriv->hWnd)
+ {
+ DestroyWindow(pWinPriv->hWnd);
+ pWinPriv->hWnd=NULL;
+ pWinPriv->GlCtxWnd=0;
+ }
+
+ pScreen->DestroyWindow = screenPriv->DestroyWindow;
+ result = pScreen->DestroyWindow(pWin);
+ pScreen->DestroyWindow = glxWinDestroyWindow;
return result;
}
@@ -802,8 +964,6 @@ glxWinUnrealizeWindow(WindowPtr pWin)
static GLboolean
glxWinDrawableSwapBuffers(ClientPtr client, __GLXdrawable *base)
{
- HDC dc;
- HWND hwnd;
BOOL ret;
__GLXWinDrawable *draw = (__GLXWinDrawable *)base;
@@ -822,13 +982,7 @@ glxWinDrawableSwapBuffers(ClientPtr client, __GLXdrawable *base)
*/
assert((draw->drawContext->base.drawPriv == NULL) || (draw->drawContext->base.drawPriv == base));
- dc = glxWinMakeDC(draw->drawContext, draw, &dc, &hwnd);
- if (dc == NULL)
- return GL_FALSE;
-
- ret = wglSwapLayerBuffers(dc, WGL_SWAP_MAIN_PLANE);
-
- glxWinReleaseDC(hwnd, dc, draw);
+ ret = SwapBuffers(draw->drawContext->hDC);
if (!ret)
{
@@ -896,22 +1050,20 @@ glxWinDrawableDestroy(__GLXdrawable *base)
static __GLXdrawable *
glxWinCreateDrawable(ClientPtr client,
- __GLXscreen *screen,
- DrawablePtr pDraw,
- XID drawId,
- int type,
- XID glxDrawId,
- __GLXconfig *conf)
+ __GLXscreen *screen,
+ DrawablePtr pDraw,
+ XID drawId,
+ int type,
+ XID glxDrawId,
+ __GLXconfig *conf)
{
__GLXWinDrawable *glxPriv;
- glxPriv = malloc(sizeof *glxPriv);
+ glxPriv = calloc(1,sizeof(*glxPriv));
if (glxPriv == NULL)
return NULL;
- memset(glxPriv, 0, sizeof *glxPriv);
-
if(!__glXDrawableInit(&glxPriv->base, screen, pDraw, type, glxDrawId, conf)) {
free(glxPriv);
return NULL;
@@ -934,7 +1086,7 @@ glxWinCreateDrawable(ClientPtr client,
*/
static
-int glxWinBindTexImage(__GLXcontext *baseContext,
+int glxWinBindTexImage(glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap)
{
@@ -943,7 +1095,7 @@ int glxWinBindTexImage(__GLXcontext *baseContext,
}
static
-int glxWinReleaseTexImage(__GLXcontext *baseContext,
+int glxWinReleaseTexImage(glx_context *baseContext,
int buffer,
__GLXdrawable *pixmap)
{
@@ -979,25 +1131,24 @@ glxWinSetPixelFormat(__GLXWinContext *gc, HDC hdc, int bppOverride, int drawable
__GLXconfig *config = gc->base.config;
GLXWinConfig *winConfig = (GLXWinConfig *)config;
+
+ WindowPtr pWin;
+ __GLXWinDrawable *drawPriv = (__GLXWinDrawable *)gc->base.drawPriv;
+ pWin = (WindowPtr) drawPriv->base.pDraw;
+ {
+ winWindowPriv(pWin);
+ if (pWinPriv->OpenGlWindow)
+ {
+ ErrorF("Not Setting pixel format to %d on hdc %x for window %x (not allowed on windows)\n",winConfig->pixelFormatIndex,hdc,pWinPriv->hWnd);
+ return; /* Pixel format is already set on this window so it cannot be changed anymore */
+ }
+ }
GLWIN_DEBUG_MSG("glxWinSetPixelFormat: pixelFormatIndex %d", winConfig->pixelFormatIndex);
/*
Normally, we can just use the the pixelFormatIndex corresponding
to the fbconfig which has been specified by the client
*/
-
- if (!((bppOverride && (bppOverride != (config->redBits + config->greenBits + config->blueBits) ))
- || ((config->drawableType & drawableTypeOverride) == 0)))
- {
- if (!SetPixelFormat(hdc, winConfig->pixelFormatIndex, NULL))
- {
- ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
- return;
- }
-
- return;
- }
-
/*
However, in certain special cases this pixel format will be incompatible with the
use we are going to put it to, so we need to re-evaluate the pixel format to use:
@@ -1030,8 +1181,10 @@ glxWinSetPixelFormat(__GLXWinContext *gc, HDC hdc, int bppOverride, int drawable
return;
}
- if (glxWinDebugSettings.dumpPFD)
+#ifdef _DEBUG
+ if (glxWinDebugSettings.dumpPFD)
pfdOut(&pfd);
+#endif
if (bppOverride)
{
@@ -1049,6 +1202,7 @@ glxWinSetPixelFormat(__GLXWinContext *gc, HDC hdc, int bppOverride, int drawable
GLWIN_DEBUG_MSG("ChoosePixelFormat: chose pixelFormatIndex %d", pixelFormat);
ErrorF("ChoosePixelFormat: chose pixelFormatIndex %d (rather than %d as originally planned)\n", pixelFormat, winConfig->pixelFormatIndex);
+ ErrorF("Setting pixel format 2 to %d on hdc %x\n",pixelFormat,hdc);
if (!SetPixelFormat(hdc, pixelFormat, &pfd))
{
ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
@@ -1058,27 +1212,62 @@ glxWinSetPixelFormat(__GLXWinContext *gc, HDC hdc, int bppOverride, int drawable
else
{
int pixelFormat = fbConfigToPixelFormatIndex(hdc, gc->base.config, drawableTypeOverride, winScreen);
- if (pixelFormat == 0)
+ if (pixelFormat != 0)
{
- ErrorF("wglChoosePixelFormat error: %s\n", glxWinErrorMessage());
- return;
- }
-
- GLWIN_DEBUG_MSG("wglChoosePixelFormat: chose pixelFormatIndex %d", pixelFormat);
- ErrorF("wglChoosePixelFormat: chose pixelFormatIndex %d (rather than %d as originally planned)\n", pixelFormat, winConfig->pixelFormatIndex);
+ GLWIN_DEBUG_MSG("wglChoosePixelFormat: chose pixelFormatIndex %d", pixelFormat);
- if (!SetPixelFormat(hdc, pixelFormat, NULL))
- {
- ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
+ ErrorF("Setting pixel format 3 to %d on hdc %x\n",pixelFormat,hdc);
+ if (!SetPixelFormat(hdc, pixelFormat, NULL))
+ {
+ ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
+ return;
+ }
return;
}
+ else
+ {
+ /* There was an error choose some default for the moment */
+ PIXELFORMATDESCRIPTOR pfd = {
+ sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd
+ 1, // version number
+ PFD_DRAW_TO_WINDOW | // support window
+ PFD_SUPPORT_OPENGL | // support OpenGL
+ PFD_DOUBLEBUFFER, // double buffered
+ PFD_TYPE_RGBA, // RGBA type
+ 24, // 24-bit color depth
+ 0, 0, 0, 0, 0, 0, // color bits ignored
+ 0, // no alpha buffer
+ 0, // shift bit ignored
+ 0, // no accumulation buffer
+ 0, 0, 0, 0, // accum bits ignored
+ 32, // 32-bit z-buffer
+ 0, // no stencil buffer
+ 0, // no auxiliary buffer
+ PFD_MAIN_PLANE, // main layer
+ 0, // reserved
+ 0, 0, 0 // layer masks ignored
+ };
+ int iPixelFormat;
+
+ // get the best available match of pixel format for the device context
+ iPixelFormat = ChoosePixelFormat(hdc, &pfd);
+
+ ErrorF("Setting pixel format 4 to %d on hdc %x\n",iPixelFormat,hdc);
+ // make that the pixel format of the device context
+ if (!SetPixelFormat(hdc, iPixelFormat, &pfd))
+ {
+ ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
+ return;
+ }
+ }
}
+
}
static HDC
-glxWinMakeDC(__GLXWinContext *gc, __GLXWinDrawable *draw, HDC *hdc, HWND *hwnd)
+glxWinMakeDC(__GLXWinContext *gc, __GLXWinDrawable *draw, HWND *hwnd)
{
- *hdc = NULL;
+ HDC hdc = NULL;
*hwnd = NULL;
if (draw == NULL)
@@ -1108,38 +1297,51 @@ glxWinMakeDC(__GLXWinContext *gc, __GLXWinDrawable *draw, HDC *hdc, HWND *hwnd)
return NULL;
}
- *hdc = GetDC(*hwnd);
+ if (!gc->hDC)
+ {
+ winWindowPriv(pWin);
- if (*hdc == NULL)
- ErrorF("GetDC error: %s\n", glxWinErrorMessage());
+ hdc = GetDC(*hwnd);
- /* Check if the hwnd has changed... */
- if (*hwnd != gc->hwnd)
- {
- if (glxWinDebugSettings.enableTrace)
+ if (hdc == NULL)
+ ErrorF("GetDC error: %s: hwnd %x, gc %p, gc->ctx %p ,gc->hwnd %p\n", glxWinErrorMessage(), *hwnd, gc, gc->ctx, gc->hwnd);
+
+ glxWinSetPixelFormat(gc, hdc, 0, GLX_WINDOW_BIT);
+ pWinPriv->OpenGlWindow=TRUE; /* Identify it as an opengl window, also used to check if the pixel format is already set */
+ gc->ctx = wglCreateContext(hdc);
+ }
+
+#ifdef _DEBUG
+ if (glxWinDebugSettings.enableTrace)
GLWIN_DEBUG_HWND(*hwnd);
GLWIN_TRACE_MSG("for context %p (native ctx %p), hWnd changed from %p to %p", gc, gc->ctx, gc->hwnd, *hwnd);
- gc->hwnd = *hwnd;
+#endif
+ if (gc->hwnd!=*hwnd)
+ ErrorF("Window changed handle from %x to %x\n", gc->hwnd, *hwnd);
- /* We must select a pixelformat, but SetPixelFormat can only be called once for a window... */
- glxWinSetPixelFormat(gc, *hdc, 0, GLX_WINDOW_BIT);
- }
+ gc->hwnd = *hwnd;
}
break;
case GLX_DRAWABLE_PBUFFER:
{
- *hdc = wglGetPbufferDCARBWrapper(draw->hPbuffer);
+ hdc = wglGetPbufferDCARBWrapper(draw->hPbuffer);
- if (*hdc == NULL)
+ if (hdc == NULL)
ErrorF("GetDC (pbuffer) error: %s\n", glxWinErrorMessage());
+
+ gc->ctx = wglCreateContext(hdc);
}
break;
case GLX_DRAWABLE_PIXMAP:
{
- *hdc = draw->dibDC;
+ hdc = draw->dibDC;
+#ifdef _DEBUG
+ if (glxWinDebugSettings.dumpDC)
+ GLWIN_DEBUG_MSG("Got PIXMAP HDC %p for window %p", hdc, *hwnd);
+#endif
}
break;
@@ -1149,10 +1351,12 @@ glxWinMakeDC(__GLXWinContext *gc, __GLXWinDrawable *draw, HDC *hdc, HWND *hwnd)
}
}
+#ifdef _DEBUG
if (glxWinDebugSettings.dumpDC)
- GLWIN_DEBUG_MSG("Got HDC %p", *hdc);
+ GLWIN_HDC_DEBUG_MSG("Got HDC %p for window %p", hdc, *hwnd);
+#endif
- return *hdc;
+ return hdc;
}
static void
@@ -1195,7 +1399,6 @@ glxWinReleaseDC(HWND hwnd, HDC hdc,__GLXWinDrawable *draw)
static void
glxWinDeferredCreateContext(__GLXWinContext *gc, __GLXWinDrawable *draw)
{
- HDC dc;
HWND hwnd;
GLWIN_DEBUG_MSG("glxWinDeferredCreateContext: attach context %p to drawable %p", gc, draw);
@@ -1228,13 +1431,16 @@ glxWinDeferredCreateContext(__GLXWinContext *gc, __GLXWinDrawable *draw)
case GLX_DRAWABLE_PBUFFER:
{
+ WindowPtr pWin = (WindowPtr) draw->base.pDraw;
if (draw->hPbuffer == NULL)
{
__GLXscreen *screen;
glxWinScreen *winScreen;
int pixelFormat;
// XXX: which DC are supposed to use???
- HDC screenDC = GetDC(NULL);
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen);
+ HDC screenDC=pWinScreen->hdcScreen;
if (!(gc->base.config->drawableType & GLX_PBUFFER_BIT))
{
@@ -1244,7 +1450,7 @@ glxWinDeferredCreateContext(__GLXWinContext *gc, __GLXWinDrawable *draw)
screen = gc->base.pGlxScreen;
winScreen = (glxWinScreen *)screen;
- pixelFormat = fbConfigToPixelFormatIndex(screenDC, gc->base.config, GLX_DRAWABLE_PBUFFER, winScreen);
+ pixelFormat = fbConfigToPixelFormatIndex(screenDC, gc->base.config, GLX_PBUFFER_BIT, winScreen);
if (pixelFormat == 0)
{
ErrorF("wglChoosePixelFormat error: %s\n", glxWinErrorMessage());
@@ -1252,7 +1458,6 @@ glxWinDeferredCreateContext(__GLXWinContext *gc, __GLXWinDrawable *draw)
}
draw->hPbuffer = wglCreatePbufferARBWrapper(screenDC, pixelFormat, draw->base.pDraw->width, draw->base.pDraw->height, NULL);
- ReleaseDC(NULL, screenDC);
if (draw->hPbuffer == NULL)
{
@@ -1328,12 +1533,13 @@ glxWinDeferredCreateContext(__GLXWinContext *gc, __GLXWinDrawable *draw)
}
}
- dc = glxWinMakeDC(gc, draw, &dc, &hwnd);
- gc->ctx = wglCreateContext(dc);
- glxWinReleaseDC(hwnd, dc, draw);
+ gc->hDC = glxWinMakeDC(gc, draw, &hwnd);
if (gc->ctx == NULL)
{
+ glxWinReleaseDC(hwnd, gc->hDC, draw);
+ gc->hDC=0;
+
ErrorF("wglCreateContext error: %s\n", glxWinErrorMessage());
return;
}
@@ -1341,7 +1547,7 @@ glxWinDeferredCreateContext(__GLXWinContext *gc, __GLXWinDrawable *draw)
GLWIN_DEBUG_MSG("glxWinDeferredCreateContext: attached context %p to native context %p drawable %p", gc, gc->ctx, draw);
// if the native context was created successfully, shareLists if needed
- if (gc->ctx && gc->shareContext)
+ if (gc->ctx && gc->shareContext && gc->shareContext->ctx)
{
GLWIN_DEBUG_MSG("glxWinCreateContextReal shareLists with context %p (native ctx %p)", gc->shareContext, gc->shareContext->ctx);
@@ -1360,27 +1566,24 @@ glxWinDeferredCreateContext(__GLXWinContext *gc, __GLXWinDrawable *draw)
/* Context manipulation routines should return TRUE on success, FALSE on failure */
static int
-glxWinContextMakeCurrent(__GLXcontext *base)
+glxWinContextMakeCurrent(glx_context *base)
{
__GLXWinContext *gc = (__GLXWinContext *)base;
BOOL ret;
- HDC drawDC;
- HDC readDC = NULL;
- __GLXdrawable *drawPriv;
- __GLXdrawable *readPriv = NULL;
- HWND hDrawWnd;
- HWND hReadWnd;
+ __GLXWinDrawable *drawPriv;
+#ifdef _DEBUG
GLWIN_TRACE_MSG("glxWinContextMakeCurrent context %p (native ctx %p)", gc, gc->ctx);
glWinCallDelta();
+#endif
/* Keep a note of the last active context in the drawable */
- drawPriv = gc->base.drawPriv;
- ((__GLXWinDrawable *)drawPriv)->drawContext = gc;
+ drawPriv = (__GLXWinDrawable *)gc->base.drawPriv;
+ drawPriv->drawContext = gc;
if (gc->ctx == NULL)
{
- glxWinDeferredCreateContext(gc, (__GLXWinDrawable *)drawPriv);
+ glxWinDeferredCreateContext(gc, drawPriv);
}
if (gc->ctx == NULL)
@@ -1389,13 +1592,6 @@ glxWinContextMakeCurrent(__GLXcontext *base)
return FALSE;
}
- drawDC = glxWinMakeDC(gc, (__GLXWinDrawable *)drawPriv, &drawDC, &hDrawWnd);
- if (drawDC == NULL)
- {
- ErrorF("glxWinMakeDC failed for drawDC\n");
- return FALSE;
- }
-
if ((gc->base.readPriv != NULL) && (gc->base.readPriv != gc->base.drawPriv))
{
// XXX: should only occur with WGL_ARB_make_current_read
@@ -1404,16 +1600,14 @@ glxWinContextMakeCurrent(__GLXcontext *base)
use the wglMakeContextCurrent extension to make the context current drawing
to one DC and reading from the other
*/
- readPriv = gc->base.readPriv;
- readDC = glxWinMakeDC(gc, (__GLXWinDrawable *)readPriv, &readDC, &hReadWnd);
- if (readDC == NULL)
+ gc->hreadDC = glxWinMakeDC(gc, (__GLXWinDrawable *)gc->base.readPriv, &gc->hreadwnd);
+ if (gc->hreadDC == NULL)
{
ErrorF("glxWinMakeDC failed for readDC\n");
- glxWinReleaseDC(hDrawWnd, drawDC, (__GLXWinDrawable *)drawPriv);
return FALSE;
}
- ret = wglMakeContextCurrentARBWrapper(drawDC, readDC, gc->ctx);
+ ret = wglMakeContextCurrentARBWrapper(gc->hDC, gc->hreadDC, gc->ctx);
if (!ret)
{
ErrorF("wglMakeContextCurrentARBWrapper error: %s\n", glxWinErrorMessage());
@@ -1422,48 +1616,61 @@ glxWinContextMakeCurrent(__GLXcontext *base)
else
{
/* Otherwise, just use wglMakeCurrent */
- ret = wglMakeCurrent(drawDC, gc->ctx);
+ if (!gc->hDC)
+ {
+ /* It probably has been release by loseCurrent, so create it again */
+ gc->hDC = glxWinMakeDC(gc, drawPriv, &gc->hwnd);
+ }
+ ret = wglMakeCurrent(gc->hDC, gc->ctx);
if (!ret)
{
- ErrorF("wglMakeCurrent error: %s\n", glxWinErrorMessage());
+ DWORD ErrorCode=GetLastError();
+ ErrorF("wglMakeCurrent error: %x dc %p ctx %p\n", ErrorCode,gc->hDC,gc->ctx);
+ if (!ErrorCode)
+ {
+ ErrorF("Error code was 0, assuming no error.\n");
+ ret=TRUE;
+ }
}
}
// apparently make current could fail if the context is current in a different thread,
// but that shouldn't be able to happen in the current server...
- glxWinReleaseDC(hDrawWnd, drawDC, (__GLXWinDrawable *)drawPriv);
- if (readDC)
- glxWinReleaseDC(hReadWnd, readDC, (__GLXWinDrawable *)readPriv);
-
return ret;
}
static int
-glxWinContextLoseCurrent(__GLXcontext *base)
+glxWinContextLoseCurrent(glx_context *base)
{
- BOOL ret;
+ BOOL ret=TRUE;
__GLXWinContext *gc = (__GLXWinContext *)base;
+#ifdef _DEBUG
GLWIN_TRACE_MSG("glxWinContextLoseCurrent context %p (native ctx %p)", gc, gc->ctx);
glWinCallDelta();
+#endif
- /*
- An error seems to be reported if we try to make no context current
- if there is already no current context, so avoid doing that...
- */
- if (__glXLastContext != NULL)
- {
- ret = wglMakeCurrent(NULL, NULL); /* We don't need a DC when setting no current context */
- if (!ret)
- ErrorF("glxWinContextLoseCurrent error: %s\n", glxWinErrorMessage());
- }
- return TRUE;
+ if (wglGetCurrentContext()==gc->ctx)
+ {
+ /* Only do this when we are sure we are currently the active, otherwise we are deactivating the wrong one (this is happening!!!) */
+ ret = wglMakeCurrent(NULL, NULL);
+ if (!ret)
+ ErrorF("glxWinContextLoseCurrent error: %s\n", glxWinErrorMessage());
+ }
+ else
+ {
+ return FALSE;
+ }
+
+ base->isCurrent=FALSE; /* It looks like glx is not doing this */
+
+ return ret;
}
static int
-glxWinContextCopy(__GLXcontext *dst_base, __GLXcontext *src_base, unsigned long mask)
+glxWinContextCopy(glx_context *dst_base, glx_context *src_base, unsigned long mask)
{
__GLXWinContext *dst = (__GLXWinContext *)dst_base;
__GLXWinContext *src = (__GLXWinContext *)src_base;
@@ -1481,14 +1688,14 @@ glxWinContextCopy(__GLXcontext *dst_base, __GLXcontext *src_base, unsigned long
}
static int
-glxWinContextForceCurrent(__GLXcontext *base)
+glxWinContextForceCurrent(glx_context *base)
{
/* wglMakeCurrent always flushes the previous context, so this is equivalent to glxWinContextMakeCurrent */
return glxWinContextMakeCurrent(base);
}
static void
-glxWinContextDestroy(__GLXcontext *base)
+glxWinContextDestroy(glx_context *base)
{
__GLXWinContext *gc = (__GLXWinContext *)base;
@@ -1498,18 +1705,20 @@ glxWinContextDestroy(__GLXcontext *base)
if (gc->ctx)
{
+ BOOL ret;
/* It's bad style to delete the context while it's still current */
if (wglGetCurrentContext() == gc->ctx)
{
wglMakeCurrent(NULL, NULL);
}
- {
- BOOL ret = wglDeleteContext(gc->ctx);
- if (!ret)
- ErrorF("wglDeleteContext error: %s\n", glxWinErrorMessage());
- }
-
+ ret = wglDeleteContext(gc->ctx);
+ if (!ret)
+ ErrorF("wglDeleteContext error: %s\n", glxWinErrorMessage());
+ if (gc->base.drawPriv && gc->hDC) glxWinReleaseDC(gc->hwnd, gc->hDC, (__GLXWinDrawable *)gc->base.drawPriv);
+ if (gc->base.readPriv && gc->hreadDC) glxWinReleaseDC(gc->hreadwnd, gc->hreadDC, (__GLXWinDrawable *)gc->base.readPriv);
+ gc->hDC=NULL;
+ gc->hreadDC=NULL;
gc->ctx = NULL;
}
@@ -1517,10 +1726,10 @@ glxWinContextDestroy(__GLXcontext *base)
}
}
-static __GLXcontext *
+static glx_context *
glxWinCreateContext(__GLXscreen *screen,
__GLXconfig *modes,
- __GLXcontext *baseShareContext)
+ glx_context *baseShareContext)
{
__GLXWinContext *context;
__GLXWinContext *shareContext = (__GLXWinContext *)baseShareContext;
@@ -1547,7 +1756,7 @@ glxWinCreateContext(__GLXscreen *screen,
context->base.pGlxScreen = screen;
// actual native GL context creation is deferred until attach()
- context->ctx = NULL;
+ //context->ctx = NULL; already done with memset
context->shareContext = shareContext;
glWinSetupDispatchTable();
@@ -1562,6 +1771,17 @@ glxWinCreateContext(__GLXscreen *screen,
* Utility functions
*/
+static int GetShift(int Mask)
+{
+ int Shift=0;
+ while ((Mask&1)==0)
+ {
+ Shift++;
+ Mask>>=1;
+ }
+ return Shift;
+}
+
static int
fbConfigToPixelFormat(__GLXconfig *mode, PIXELFORMATDESCRIPTOR *pfdret, int drawableTypeOverride)
{
@@ -1597,16 +1817,26 @@ fbConfigToPixelFormat(__GLXconfig *mode, PIXELFORMATDESCRIPTOR *pfdret, int draw
pfd.dwFlags |= PFD_DOUBLEBUFFER;
}
- pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = mode->redBits + mode->greenBits + mode->blueBits;
pfd.cRedBits = mode->redBits;
- pfd.cRedShift = 0; /* FIXME */
+ pfd.cRedShift = GetShift(mode->redMask);
pfd.cGreenBits = mode->greenBits;
- pfd.cGreenShift = 0; /* FIXME */
+ pfd.cGreenShift = GetShift(mode->greenMask);
pfd.cBlueBits = mode->blueBits;
- pfd.cBlueShift = 0; /* FIXME */
+ pfd.cBlueShift = GetShift(mode->blueMask);
pfd.cAlphaBits = mode->alphaBits;
- pfd.cAlphaShift = 0; /* FIXME */
+ pfd.cAlphaShift = GetShift(mode->alphaMask);
+
+ if (mode->visualType = GLX_TRUE_COLOR)
+ {
+ pfd.iPixelType = PFD_TYPE_RGBA;
+ pfd.dwVisibleMask = (pfd.cRedBits << pfd.cRedShift) | (pfd.cGreenBits << pfd.cGreenShift) | (pfd.cBlueBits << pfd.cBlueShift) | (pfd.cAlphaBits << pfd.cAlphaShift);
+ }
+ else
+ {
+ pfd.iPixelType = PFD_TYPE_COLORINDEX;
+ pfd.dwVisibleMask = mode->transparentIndex;
+ }
pfd.cAccumBits = mode->accumRedBits + mode->accumGreenBits + mode->accumBlueBits + mode->accumAlphaBits;
pfd.cAccumRedBits = mode->accumRedBits;
@@ -1772,8 +2002,10 @@ glxWinCreateConfigs(HDC hdc, glxWinScreen *screen)
break;
}
+#ifdef _DEBUG
if (glxWinDebugSettings.dumpPFD)
pfdOut(&pfd);
+#endif
if (!(pfd.dwFlags & (PFD_DRAW_TO_WINDOW | PFD_DRAW_TO_BITMAP)) || !(pfd.dwFlags & PFD_SUPPORT_OPENGL))
{
@@ -1838,26 +2070,24 @@ glxWinCreateConfigs(HDC hdc, glxWinScreen *screen)
if (pfd.iPixelType == PFD_TYPE_COLORINDEX)
{
c->base.visualType = GLX_STATIC_COLOR;
-
- if (!getenv("GLWIN_ENABLE_COLORINDEX_FBCONFIGS"))
- {
- GLWIN_DEBUG_MSG("pixelFormat %d is PFD_TYPE_COLORINDEX, skipping", i+1);
- continue;
- }
+ c->base.transparentRed = GLX_NONE;
+ c->base.transparentGreen = GLX_NONE;
+ c->base.transparentBlue = GLX_NONE;
+ c->base.transparentAlpha = GLX_NONE;
+ c->base.transparentIndex = pfd.dwVisibleMask;
+ c->base.transparentPixel = GLX_TRANSPARENT_INDEX;
}
else
{
c->base.visualType = GLX_TRUE_COLOR;
+ c->base.transparentRed = (pfd.dwVisibleMask&c->base.redMask) >>pfd.cRedShift;
+ c->base.transparentGreen = (pfd.dwVisibleMask&c->base.greenMask)>>pfd.cGreenShift;
+ c->base.transparentBlue = (pfd.dwVisibleMask&c->base.blueMask) >>pfd.cBlueShift;
+ c->base.transparentAlpha = (pfd.dwVisibleMask&c->base.alphaMask)>>pfd.cAlphaShift;
+ c->base.transparentIndex = GLX_NONE;
+ c->base.transparentPixel = GLX_TRANSPARENT_RGB;
}
- // pfd.dwVisibleMask; ???
- c->base.transparentPixel = GLX_NONE;
- c->base.transparentRed = GLX_NONE;
- c->base.transparentGreen = GLX_NONE;
- c->base.transparentBlue = GLX_NONE;
- c->base.transparentAlpha = GLX_NONE;
- c->base.transparentIndex = GLX_NONE;
-
/* ARB_multisample / SGIS_multisample */
c->base.sampleBuffers = 0;
c->base.samples = 0;
@@ -2059,7 +2289,10 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen *screen)
/* fill in configs */
for (i = 0; i < numConfigs; i++)
{
- int values[num_attrs];
+ int sizevalues=num_attrs*sizeof(int);
+ int *values=(int*)_alloca(sizevalues);
+
+ memset(values,0,sizevalues);
c = &(result[i]);
c->base.next = NULL;
@@ -2098,13 +2331,6 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen *screen)
c->base.indexBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0);
c->base.rgbBits = 0;
c->base.visualType = GLX_STATIC_COLOR;
-
- if (!getenv("GLWIN_ENABLE_COLORINDEX_FBCONFIGS"))
- {
- GLWIN_DEBUG_MSG("pixelFormat %d is WGL_TYPE_COLORINDEX_ARB, skipping", i+1);
- continue;
- }
-
break;
case WGL_TYPE_RGBA_FLOAT_ARB:
diff --git a/xorg-server/hw/xwin/glx/makefile b/xorg-server/hw/xwin/glx/makefile
new file mode 100644
index 000000000..5f93d8204
--- /dev/null
+++ b/xorg-server/hw/xwin/glx/makefile
@@ -0,0 +1,45 @@
+LIBRARY=libwinglx
+
+INCLUDES += $(OBJDIR) ..\..\..\glx .. ..\..\..
+DEFINES += GLAPIENTRY=__stdcall _GLAPI_NO_EXPORTS
+
+DEFINES += XWIN_CLIPBOARD
+DEFINES += XWIN_MULTIWINDOW
+DEFINES += XWIN_RANDR
+DEFINES += RELOCATE_PROJECTROOT
+INCLUDES += ..\..\..\miext\rootless
+DEFINES += HAVE_XWIN_CONFIG_H PTW32_STATIC_LIB
+
+CSRCS = \
+ winpriv.c \
+ glwrap.c \
+ indirect.c \
+ wgl_ext_api.c
+
+.PHONY: getspecfiles
+
+getspecfiles:
+ wget http://www.opengl.org/registry/api/gl.spec
+ wget http://www.opengl.org/registry/api/gl.tm
+
+ wget http://www.opengl.org/registry/api/glxenum.spec
+ wget http://www.opengl.org/registry/api/glxenumext.spec
+ wget http://www.opengl.org/registry/api/glx.spec
+ wget http://www.opengl.org/registry/api/glxext.spec
+ wget http://www.opengl.org/registry/api/glx.tm
+
+ wget http://www.opengl.org/registry/api/wglenum.spec
+ wget http://www.opengl.org/registry/api/wglenumext.spec
+ wget http://www.opengl.org/registry/api/wgl.spec
+ wget http://www.opengl.org/registry/api/wglext.spec
+ wget http://www.opengl.org/registry/api/wgl.tm
+ wget http://www.opengl.org/registry/api/wglext.h
+ wget http://www.opengl.org/registry/api/glext.h
+ wget http://www.opengl.org/registry/api/glxext.h
+
+$(OBJDIR)\generated_gl_wrappers.c: gen_gl_wrappers.py gl.spec gl.tm
+ gen_gl_wrappers --spec=gl.spec --typemap=gl.tm --dispatch-header=../../../glx/dispatch.h --staticwrappers > $@
+
+$(OBJDIR)\generated_wgl_wrappers.c: gen_gl_wrappers.py wglext.spec wgl.tm
+ gen_gl_wrappers --spec=wglext.spec --typemap=wgl.tm --prefix=wgl --preresolve > $@
+
diff --git a/xorg-server/hw/xwin/glx/wgl.tm b/xorg-server/hw/xwin/glx/wgl.tm
new file mode 100644
index 000000000..baceced55
--- /dev/null
+++ b/xorg-server/hw/xwin/glx/wgl.tm
@@ -0,0 +1,36 @@
+BOOL,*,*, BOOL,*,*
+DWORD,*,*, DWORD,*,*
+FLOAT,*,*, FLOAT,*,*
+GLbitfield,*,*, GLbitfield,*,*
+GLboolean,*,*, GLboolean,*,*
+GLenum,*,*, GLenum,*,*
+GLfloat,*,*, GLfloat,*,*
+GLint,*,*, GLint,*,*
+GLsizei,*,*, GLsizei,*,*
+GLuint,*,*, GLuint,*,*
+GLushort,*,*, GLushort,*,*
+HANDLE,*,*, HANDLE,*,*
+HDC,*,*, HDC,*,*
+HGLRC,*,*, HGLRC,*,*
+HGPUNV,*,*, HGPUNV,*,*
+HPBUFFERARB,*,*, HPBUFFERARB,*,*
+HPBUFFEREXT,*,*, HPBUFFEREXT,*,*
+HPVIDEODEV,*,*, HPVIDEODEV,*,*
+HPGPUNV,*,*, HPGPUNV,*,*
+HVIDEOINPUTDEVICENV,*,*, HVIDEOINPUTDEVICENV,*,*
+HVIDEOOUTPUTDEVICENV,*,*, HVIDEOOUTPUTDEVICENV,*,*
+INT,*,*, INT,*,*
+INT32,*,*, INT32,*,*
+INT64,*,*, INT64,*,*
+LPVOID,*,*, LPVOID,*,*
+PGPU_DEVICE,*,*, PGPU_DEVICE,*,*
+String,*,*, const char *,*,*
+UINT,*,*, UINT,*,*
+USHORT,*,*, USHORT,*,*
+VOID,*,*, VOID,*,*
+VoidPointer,*,*, void*,*,*
+float,*,*, float,*,*
+int,*,*, int,*,*
+uint,*,*, unsigned int,*,*
+ulong,*,*, unsigned long,*,*
+void,*,*, *,*,*
diff --git a/xorg-server/hw/xwin/glx/wgl_ext_api.c b/xorg-server/hw/xwin/glx/wgl_ext_api.c
index 4b8359fb1..984ce64a2 100644
--- a/xorg-server/hw/xwin/glx/wgl_ext_api.c
+++ b/xorg-server/hw/xwin/glx/wgl_ext_api.c
@@ -42,12 +42,17 @@
#define RESOLVE_DECL(type) \
static type type##proc = NULL;
+#ifdef _DEBUG
#define PRERESOLVE(type, symbol) \
type##proc = (type)wglGetProcAddress(symbol); \
if (type##proc == NULL) \
ErrorF("wglwrap: Can't resolve \"%s\"\n", symbol); \
else \
ErrorF("wglwrap: Resolved \"%s\"\n", symbol);
+#else
+#define PRERESOLVE(type, symbol) \
+ type##proc = (type)wglGetProcAddress(symbol);
+#endif
#define RESOLVE_RET(type, symbol, retval) \
if (type##proc == NULL) { \
diff --git a/xorg-server/hw/xwin/glx/wgl_ext_api.h b/xorg-server/hw/xwin/glx/wgl_ext_api.h
index e4462ac5c..3c46d1d30 100644
--- a/xorg-server/hw/xwin/glx/wgl_ext_api.h
+++ b/xorg-server/hw/xwin/glx/wgl_ext_api.h
@@ -38,50 +38,50 @@ void wglResolveExtensionProcs(void);
XXX: should be automatically generated as well
*/
-const char *wglGetExtensionsStringARBWrapper(HDC hdc);
-BOOL wglMakeContextCurrentARBWrapper(HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
-HDC wglGetCurrentReadDCARBWrapper(VOID);
+const char * __stdcall wglGetExtensionsStringARBWrapper(HDC hdc);
+BOOL __stdcall wglMakeContextCurrentARBWrapper(HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
+HDC __stdcall wglGetCurrentReadDCARBWrapper(VOID);
-BOOL wglGetPixelFormatAttribivARBWrapper(HDC hdc,
+BOOL __stdcall wglGetPixelFormatAttribivARBWrapper(HDC hdc,
int iPixelFormat,
int iLayerPlane,
UINT nAttributes,
const int *piAttributes,
int *piValues);
-BOOL wglGetPixelFormatAttribfvARBWrapper(HDC hdc,
+BOOL __stdcall wglGetPixelFormatAttribfvARBWrapper(HDC hdc,
int iPixelFormat,
int iLayerPlane,
UINT nAttributes,
const int *piAttributes,
FLOAT *pfValues);
-BOOL wglChoosePixelFormatARBWrapper(HDC hdc,
+BOOL __stdcall wglChoosePixelFormatARBWrapper(HDC hdc,
const int *piAttribIList,
const FLOAT *pfAttribFList,
UINT nMaxFormats,
int *piFormats,
UINT *nNumFormats);
-HPBUFFERARB wglCreatePbufferARBWrapper(HDC hDC,
+HPBUFFERARB __stdcall wglCreatePbufferARBWrapper(HDC hDC,
int iPixelFormat,
int iWidth,
int iHeight,
const int *piAttribList);
-HDC wglGetPbufferDCARBWrapper(HPBUFFERARB hPbuffer);
+HDC __stdcall wglGetPbufferDCARBWrapper(HPBUFFERARB hPbuffer);
-int wglReleasePbufferDCARBWrapper(HPBUFFERARB hPbuffer,
+int __stdcall wglReleasePbufferDCARBWrapper(HPBUFFERARB hPbuffer,
HDC hDC);
-BOOL wglDestroyPbufferARBWrapper(HPBUFFERARB hPbuffer);
+BOOL __stdcall wglDestroyPbufferARBWrapper(HPBUFFERARB hPbuffer);
-BOOL wglQueryPbufferARBWrapper(HPBUFFERARB hPbuffer,
+BOOL __stdcall wglQueryPbufferARBWrapper(HPBUFFERARB hPbuffer,
int iAttribute,
int *piValue);
-BOOL wglSwapIntervalEXTWrapper(int interval);
+BOOL __stdcall wglSwapIntervalEXTWrapper(int interval);
-int wglGetSwapIntervalEXTWrapper(void);
+int __stdcall wglGetSwapIntervalEXTWrapper(void);
#endif /* wgl_ext_api_h */
diff --git a/xorg-server/hw/xwin/glx/wglext.h b/xorg-server/hw/xwin/glx/wglext.h
new file mode 100644
index 000000000..e60c6527d
--- /dev/null
+++ b/xorg-server/hw/xwin/glx/wglext.h
@@ -0,0 +1,901 @@
+#ifndef __wglext_h_
+#define __wglext_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2007-2010 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Function declaration macros - to move into glplatform.h */
+
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+/*************************************************************/
+
+/* Header file version number */
+/* wglext.h last updated 2010/08/06 */
+/* Current version at http://www.opengl.org/registry/ */
+#define WGL_WGLEXT_VERSION 22
+
+#ifndef WGL_ARB_buffer_region
+#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
+#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
+#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
+#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
+#endif
+
+#ifndef WGL_ARB_multisample
+#define WGL_SAMPLE_BUFFERS_ARB 0x2041
+#define WGL_SAMPLES_ARB 0x2042
+#endif
+
+#ifndef WGL_ARB_extensions_string
+#endif
+
+#ifndef WGL_ARB_pixel_format
+#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
+#define WGL_DRAW_TO_WINDOW_ARB 0x2001
+#define WGL_DRAW_TO_BITMAP_ARB 0x2002
+#define WGL_ACCELERATION_ARB 0x2003
+#define WGL_NEED_PALETTE_ARB 0x2004
+#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
+#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
+#define WGL_SWAP_METHOD_ARB 0x2007
+#define WGL_NUMBER_OVERLAYS_ARB 0x2008
+#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
+#define WGL_TRANSPARENT_ARB 0x200A
+#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
+#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
+#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
+#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
+#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
+#define WGL_SHARE_DEPTH_ARB 0x200C
+#define WGL_SHARE_STENCIL_ARB 0x200D
+#define WGL_SHARE_ACCUM_ARB 0x200E
+#define WGL_SUPPORT_GDI_ARB 0x200F
+#define WGL_SUPPORT_OPENGL_ARB 0x2010
+#define WGL_DOUBLE_BUFFER_ARB 0x2011
+#define WGL_STEREO_ARB 0x2012
+#define WGL_PIXEL_TYPE_ARB 0x2013
+#define WGL_COLOR_BITS_ARB 0x2014
+#define WGL_RED_BITS_ARB 0x2015
+#define WGL_RED_SHIFT_ARB 0x2016
+#define WGL_GREEN_BITS_ARB 0x2017
+#define WGL_GREEN_SHIFT_ARB 0x2018
+#define WGL_BLUE_BITS_ARB 0x2019
+#define WGL_BLUE_SHIFT_ARB 0x201A
+#define WGL_ALPHA_BITS_ARB 0x201B
+#define WGL_ALPHA_SHIFT_ARB 0x201C
+#define WGL_ACCUM_BITS_ARB 0x201D
+#define WGL_ACCUM_RED_BITS_ARB 0x201E
+#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
+#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
+#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
+#define WGL_DEPTH_BITS_ARB 0x2022
+#define WGL_STENCIL_BITS_ARB 0x2023
+#define WGL_AUX_BUFFERS_ARB 0x2024
+#define WGL_NO_ACCELERATION_ARB 0x2025
+#define WGL_GENERIC_ACCELERATION_ARB 0x2026
+#define WGL_FULL_ACCELERATION_ARB 0x2027
+#define WGL_SWAP_EXCHANGE_ARB 0x2028
+#define WGL_SWAP_COPY_ARB 0x2029
+#define WGL_SWAP_UNDEFINED_ARB 0x202A
+#define WGL_TYPE_RGBA_ARB 0x202B
+#define WGL_TYPE_COLORINDEX_ARB 0x202C
+#endif
+
+#ifndef WGL_ARB_make_current_read
+#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
+#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
+#endif
+
+#ifndef WGL_ARB_pbuffer
+#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
+#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
+#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
+#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
+#define WGL_PBUFFER_LARGEST_ARB 0x2033
+#define WGL_PBUFFER_WIDTH_ARB 0x2034
+#define WGL_PBUFFER_HEIGHT_ARB 0x2035
+#define WGL_PBUFFER_LOST_ARB 0x2036
+#endif
+
+#ifndef WGL_ARB_render_texture
+#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
+#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
+#define WGL_TEXTURE_FORMAT_ARB 0x2072
+#define WGL_TEXTURE_TARGET_ARB 0x2073
+#define WGL_MIPMAP_TEXTURE_ARB 0x2074
+#define WGL_TEXTURE_RGB_ARB 0x2075
+#define WGL_TEXTURE_RGBA_ARB 0x2076
+#define WGL_NO_TEXTURE_ARB 0x2077
+#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
+#define WGL_TEXTURE_1D_ARB 0x2079
+#define WGL_TEXTURE_2D_ARB 0x207A
+#define WGL_MIPMAP_LEVEL_ARB 0x207B
+#define WGL_CUBE_MAP_FACE_ARB 0x207C
+#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
+#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
+#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
+#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
+#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
+#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
+#define WGL_FRONT_LEFT_ARB 0x2083
+#define WGL_FRONT_RIGHT_ARB 0x2084
+#define WGL_BACK_LEFT_ARB 0x2085
+#define WGL_BACK_RIGHT_ARB 0x2086
+#define WGL_AUX0_ARB 0x2087
+#define WGL_AUX1_ARB 0x2088
+#define WGL_AUX2_ARB 0x2089
+#define WGL_AUX3_ARB 0x208A
+#define WGL_AUX4_ARB 0x208B
+#define WGL_AUX5_ARB 0x208C
+#define WGL_AUX6_ARB 0x208D
+#define WGL_AUX7_ARB 0x208E
+#define WGL_AUX8_ARB 0x208F
+#define WGL_AUX9_ARB 0x2090
+#endif
+
+#ifndef WGL_ARB_pixel_format_float
+#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
+#endif
+
+#ifndef WGL_ARB_framebuffer_sRGB
+#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
+#endif
+
+#ifndef WGL_ARB_create_context
+#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
+#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
+#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
+#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
+#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
+#define WGL_CONTEXT_FLAGS_ARB 0x2094
+#define ERROR_INVALID_VERSION_ARB 0x2095
+#endif
+
+#ifndef WGL_ARB_create_context_profile
+#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
+#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
+#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
+#define ERROR_INVALID_PROFILE_ARB 0x2096
+#endif
+
+#ifndef WGL_ARB_create_context_robustness
+#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
+#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
+#endif
+
+#ifndef WGL_EXT_make_current_read
+#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
+#endif
+
+#ifndef WGL_EXT_pixel_format
+#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
+#define WGL_DRAW_TO_WINDOW_EXT 0x2001
+#define WGL_DRAW_TO_BITMAP_EXT 0x2002
+#define WGL_ACCELERATION_EXT 0x2003
+#define WGL_NEED_PALETTE_EXT 0x2004
+#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
+#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
+#define WGL_SWAP_METHOD_EXT 0x2007
+#define WGL_NUMBER_OVERLAYS_EXT 0x2008
+#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
+#define WGL_TRANSPARENT_EXT 0x200A
+#define WGL_TRANSPARENT_VALUE_EXT 0x200B
+#define WGL_SHARE_DEPTH_EXT 0x200C
+#define WGL_SHARE_STENCIL_EXT 0x200D
+#define WGL_SHARE_ACCUM_EXT 0x200E
+#define WGL_SUPPORT_GDI_EXT 0x200F
+#define WGL_SUPPORT_OPENGL_EXT 0x2010
+#define WGL_DOUBLE_BUFFER_EXT 0x2011
+#define WGL_STEREO_EXT 0x2012
+#define WGL_PIXEL_TYPE_EXT 0x2013
+#define WGL_COLOR_BITS_EXT 0x2014
+#define WGL_RED_BITS_EXT 0x2015
+#define WGL_RED_SHIFT_EXT 0x2016
+#define WGL_GREEN_BITS_EXT 0x2017
+#define WGL_GREEN_SHIFT_EXT 0x2018
+#define WGL_BLUE_BITS_EXT 0x2019
+#define WGL_BLUE_SHIFT_EXT 0x201A
+#define WGL_ALPHA_BITS_EXT 0x201B
+#define WGL_ALPHA_SHIFT_EXT 0x201C
+#define WGL_ACCUM_BITS_EXT 0x201D
+#define WGL_ACCUM_RED_BITS_EXT 0x201E
+#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
+#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
+#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
+#define WGL_DEPTH_BITS_EXT 0x2022
+#define WGL_STENCIL_BITS_EXT 0x2023
+#define WGL_AUX_BUFFERS_EXT 0x2024
+#define WGL_NO_ACCELERATION_EXT 0x2025
+#define WGL_GENERIC_ACCELERATION_EXT 0x2026
+#define WGL_FULL_ACCELERATION_EXT 0x2027
+#define WGL_SWAP_EXCHANGE_EXT 0x2028
+#define WGL_SWAP_COPY_EXT 0x2029
+#define WGL_SWAP_UNDEFINED_EXT 0x202A
+#define WGL_TYPE_RGBA_EXT 0x202B
+#define WGL_TYPE_COLORINDEX_EXT 0x202C
+#endif
+
+#ifndef WGL_EXT_pbuffer
+#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
+#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
+#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
+#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
+#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
+#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
+#define WGL_PBUFFER_LARGEST_EXT 0x2033
+#define WGL_PBUFFER_WIDTH_EXT 0x2034
+#define WGL_PBUFFER_HEIGHT_EXT 0x2035
+#endif
+
+#ifndef WGL_EXT_depth_float
+#define WGL_DEPTH_FLOAT_EXT 0x2040
+#endif
+
+#ifndef WGL_3DFX_multisample
+#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
+#define WGL_SAMPLES_3DFX 0x2061
+#endif
+
+#ifndef WGL_EXT_multisample
+#define WGL_SAMPLE_BUFFERS_EXT 0x2041
+#define WGL_SAMPLES_EXT 0x2042
+#endif
+
+#ifndef WGL_I3D_digital_video_control
+#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
+#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
+#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
+#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
+#endif
+
+#ifndef WGL_I3D_gamma
+#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
+#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
+#endif
+
+#ifndef WGL_I3D_genlock
+#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
+#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045
+#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046
+#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047
+#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
+#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
+#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
+#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
+#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
+#endif
+
+#ifndef WGL_I3D_image_buffer
+#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
+#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
+#endif
+
+#ifndef WGL_I3D_swap_frame_lock
+#endif
+
+#ifndef WGL_NV_render_depth_texture
+#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
+#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
+#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
+#define WGL_DEPTH_COMPONENT_NV 0x20A7
+#endif
+
+#ifndef WGL_NV_render_texture_rectangle
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
+#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
+#endif
+
+#ifndef WGL_ATI_pixel_format_float
+#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
+#endif
+
+#ifndef WGL_NV_float_buffer
+#define WGL_FLOAT_COMPONENTS_NV 0x20B0
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
+#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
+#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
+#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
+#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
+#endif
+
+#ifndef WGL_3DL_stereo_control
+#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
+#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
+#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
+#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
+#endif
+
+#ifndef WGL_EXT_pixel_format_packed_float
+#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
+#endif
+
+#ifndef WGL_EXT_framebuffer_sRGB
+#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
+#endif
+
+#ifndef WGL_NV_present_video
+#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
+#endif
+
+#ifndef WGL_NV_video_out
+#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
+#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
+#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
+#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
+#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
+#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
+#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
+#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
+#define WGL_VIDEO_OUT_FRAME 0x20C8
+#define WGL_VIDEO_OUT_FIELD_1 0x20C9
+#define WGL_VIDEO_OUT_FIELD_2 0x20CA
+#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
+#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
+#endif
+
+#ifndef WGL_NV_swap_group
+#endif
+
+#ifndef WGL_NV_gpu_affinity
+#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
+#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
+#endif
+
+#ifndef WGL_AMD_gpu_association
+#define WGL_GPU_VENDOR_AMD 0x1F00
+#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
+#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
+#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
+#define WGL_GPU_RAM_AMD 0x21A3
+#define WGL_GPU_CLOCK_AMD 0x21A4
+#define WGL_GPU_NUM_PIPES_AMD 0x21A5
+#define WGL_GPU_NUM_SIMD_AMD 0x21A6
+#define WGL_GPU_NUM_RB_AMD 0x21A7
+#define WGL_GPU_NUM_SPI_AMD 0x21A8
+#endif
+
+#ifndef WGL_NV_video_capture
+#define WGL_UNIQUE_ID_NV 0x20CE
+#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
+#endif
+
+#ifndef WGL_NV_copy_image
+#endif
+
+#ifndef WGL_NV_multisample_coverage
+#define WGL_COVERAGE_SAMPLES_NV 0x2042
+#define WGL_COLOR_SAMPLES_NV 0x20B9
+#endif
+
+#ifndef WGL_EXT_create_context_es2_profile
+#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
+#endif
+
+
+/*************************************************************/
+
+#ifndef WGL_ARB_pbuffer
+DECLARE_HANDLE(HPBUFFERARB);
+#endif
+#ifndef WGL_EXT_pbuffer
+DECLARE_HANDLE(HPBUFFEREXT);
+#endif
+#ifndef WGL_NV_present_video
+DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
+#endif
+#ifndef WGL_NV_video_output
+DECLARE_HANDLE(HPVIDEODEV);
+#endif
+#ifndef WGL_NV_gpu_affinity
+DECLARE_HANDLE(HPGPUNV);
+DECLARE_HANDLE(HGPUNV);
+
+typedef struct _GPU_DEVICE {
+ DWORD cb;
+ CHAR DeviceName[32];
+ CHAR DeviceString[128];
+ DWORD Flags;
+ RECT rcVirtualScreen;
+} GPU_DEVICE, *PGPU_DEVICE;
+#endif
+#ifndef WGL_NV_video_capture
+DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
+#endif
+
+#ifndef WGL_ARB_buffer_region
+#define WGL_ARB_buffer_region 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType);
+extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion);
+extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height);
+extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
+typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
+typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
+typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
+#endif
+
+#ifndef WGL_ARB_multisample
+#define WGL_ARB_multisample 1
+#endif
+
+#ifndef WGL_ARB_extensions_string
+#define WGL_ARB_extensions_string 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern const char * WINAPI wglGetExtensionsStringARB (HDC hdc);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
+#endif
+
+#ifndef WGL_ARB_pixel_format
+#define WGL_ARB_pixel_format 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
+extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
+extern BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
+typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
+#endif
+
+#ifndef WGL_ARB_make_current_read
+#define WGL_ARB_make_current_read 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
+extern HDC WINAPI wglGetCurrentReadDCARB (void);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
+typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
+#endif
+
+#ifndef WGL_ARB_pbuffer
+#define WGL_ARB_pbuffer 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
+extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer);
+extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC);
+extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer);
+extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
+typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
+typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
+typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
+typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
+#endif
+
+#ifndef WGL_ARB_render_texture
+#define WGL_ARB_render_texture 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
+extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
+extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
+typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
+typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
+#endif
+
+#ifndef WGL_ARB_pixel_format_float
+#define WGL_ARB_pixel_format_float 1
+#endif
+
+#ifndef WGL_ARB_framebuffer_sRGB
+#define WGL_ARB_framebuffer_sRGB 1
+#endif
+
+#ifndef WGL_ARB_create_context
+#define WGL_ARB_create_context 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
+#endif
+
+#ifndef WGL_ARB_create_context_profile
+#define WGL_ARB_create_context_profile 1
+#endif
+
+#ifndef WGL_ARB_create_context_robustness
+#define WGL_ARB_create_context_robustness 1
+#endif
+
+#ifndef WGL_EXT_display_color_table
+#define WGL_EXT_display_color_table 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id);
+extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length);
+extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id);
+extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
+typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
+typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
+typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
+#endif
+
+#ifndef WGL_EXT_extensions_string
+#define WGL_EXT_extensions_string 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern const char * WINAPI wglGetExtensionsStringEXT (void);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
+#endif
+
+#ifndef WGL_EXT_make_current_read
+#define WGL_EXT_make_current_read 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
+extern HDC WINAPI wglGetCurrentReadDCEXT (void);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
+typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
+#endif
+
+#ifndef WGL_EXT_pbuffer
+#define WGL_EXT_pbuffer 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
+extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer);
+extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC);
+extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer);
+extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
+typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
+typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
+typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
+typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
+#endif
+
+#ifndef WGL_EXT_pixel_format
+#define WGL_EXT_pixel_format 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
+extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
+extern BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
+typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
+#endif
+
+#ifndef WGL_EXT_swap_control
+#define WGL_EXT_swap_control 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglSwapIntervalEXT (int interval);
+extern int WINAPI wglGetSwapIntervalEXT (void);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
+typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
+#endif
+
+#ifndef WGL_EXT_depth_float
+#define WGL_EXT_depth_float 1
+#endif
+
+#ifndef WGL_NV_vertex_array_range
+#define WGL_NV_vertex_array_range 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern void* WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
+extern void WINAPI wglFreeMemoryNV (void *pointer);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
+typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
+#endif
+
+#ifndef WGL_3DFX_multisample
+#define WGL_3DFX_multisample 1
+#endif
+
+#ifndef WGL_EXT_multisample
+#define WGL_EXT_multisample 1
+#endif
+
+#ifndef WGL_OML_sync_control
+#define WGL_OML_sync_control 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
+extern BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator);
+extern INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
+extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
+extern BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
+extern BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
+typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);
+typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
+typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
+typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
+typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
+#endif
+
+#ifndef WGL_I3D_digital_video_control
+#define WGL_I3D_digital_video_control 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue);
+extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
+typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
+#endif
+
+#ifndef WGL_I3D_gamma
+#define WGL_I3D_gamma 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue);
+extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue);
+extern BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
+extern BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
+typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
+typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
+typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
+#endif
+
+#ifndef WGL_I3D_genlock
+#define WGL_I3D_genlock 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglEnableGenlockI3D (HDC hDC);
+extern BOOL WINAPI wglDisableGenlockI3D (HDC hDC);
+extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag);
+extern BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource);
+extern BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource);
+extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge);
+extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge);
+extern BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate);
+extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate);
+extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay);
+extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay);
+extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
+typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
+typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);
+typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);
+typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);
+typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);
+typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);
+typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
+#endif
+
+#ifndef WGL_I3D_image_buffer
+#define WGL_I3D_image_buffer 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags);
+extern BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress);
+extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
+extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
+typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
+typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
+typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);
+#endif
+
+#ifndef WGL_I3D_swap_frame_lock
+#define WGL_I3D_swap_frame_lock 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglEnableFrameLockI3D (void);
+extern BOOL WINAPI wglDisableFrameLockI3D (void);
+extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag);
+extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
+typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
+typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
+typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
+#endif
+
+#ifndef WGL_I3D_swap_frame_usage
+#define WGL_I3D_swap_frame_usage 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglGetFrameUsageI3D (float *pUsage);
+extern BOOL WINAPI wglBeginFrameTrackingI3D (void);
+extern BOOL WINAPI wglEndFrameTrackingI3D (void);
+extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);
+typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
+typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
+typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
+#endif
+
+#ifndef WGL_ATI_pixel_format_float
+#define WGL_ATI_pixel_format_float 1
+#endif
+
+#ifndef WGL_NV_float_buffer
+#define WGL_NV_float_buffer 1
+#endif
+
+#ifndef WGL_3DL_stereo_control
+#define WGL_3DL_stereo_control 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
+#endif
+
+#ifndef WGL_EXT_pixel_format_packed_float
+#define WGL_EXT_pixel_format_packed_float 1
+#endif
+
+#ifndef WGL_EXT_framebuffer_sRGB
+#define WGL_EXT_framebuffer_sRGB 1
+#endif
+
+#ifndef WGL_NV_present_video
+#define WGL_NV_present_video 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
+extern BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
+extern BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
+typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
+typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
+#endif
+
+#ifndef WGL_NV_video_output
+#define WGL_NV_video_output 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
+extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice);
+extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
+extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer);
+extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
+extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
+typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
+typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
+typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
+typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
+typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
+#endif
+
+#ifndef WGL_NV_swap_group
+#define WGL_NV_swap_group 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group);
+extern BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier);
+extern BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier);
+extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
+extern BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count);
+extern BOOL WINAPI wglResetFrameCountNV (HDC hDC);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
+typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
+typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);
+typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
+typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);
+typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
+#endif
+
+#ifndef WGL_NV_gpu_affinity
+#define WGL_NV_gpu_affinity 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu);
+extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
+extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList);
+extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
+extern BOOL WINAPI wglDeleteDCNV (HDC hdc);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
+typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
+typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
+typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
+typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
+#endif
+
+#ifndef WGL_AMD_gpu_association
+#define WGL_AMD_gpu_association 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids);
+extern INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data);
+extern UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc);
+extern HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id);
+extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList);
+extern BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc);
+extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc);
+extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void);
+extern VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids);
+typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data);
+typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
+typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
+typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList);
+typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
+typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
+typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
+typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+
+#ifndef WGL_NV_video_capture
+#define WGL_NV_video_capture 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
+extern UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
+extern BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
+extern BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
+extern BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
+typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
+typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
+typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
+typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
+#endif
+
+#ifndef WGL_NV_copy_image
+#define WGL_NV_copy_image 1
+#ifdef WGL_WGLEXT_PROTOTYPES
+extern BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
+#endif /* WGL_WGLEXT_PROTOTYPES */
+typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+
+#ifndef WGL_NV_multisample_coverage
+#define WGL_NV_multisample_coverage 1
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/xorg-server/hw/xwin/glx/wglext.spec b/xorg-server/hw/xwin/glx/wglext.spec
new file mode 100644
index 000000000..a2276fc48
--- /dev/null
+++ b/xorg-server/hw/xwin/glx/wglext.spec
@@ -0,0 +1,1126 @@
+# wglext.spec file
+# DON'T REMOVE PREVIOUS LINE!!! libspec depends on it!
+#
+# Copyright (c) 1991-2002 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2006-2010 The Khronos Group, Inc.
+#
+# This document is licensed under the SGI Free Software B License Version
+# 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+#
+# $Revision: 12183 $ on $Date: 2010-08-06 02:53:05 -0700 (Fri, 06 Aug 2010) $
+
+required-props:
+param: retval retained
+category: wgl ARB_buffer_region ARB_extensions_string ARB_pixel_format ARB_make_current_read ARB_pbuffer ARB_render_texture ARB_pixel_format_float EXT_display_color_table EXT_extensions_string EXT_make_current_read EXT_pbuffer EXT_pixel_format EXT_swap_control OML_sync_control I3D_digital_video_control I3D_gamma I3D_genlock I3D_image_buffer I3D_swap_frame_lock I3D_swap_frame_usage NV_vertex_array_range 3DL_stereo_control NV_swap_group NV_video_output NV_present_video ARB_create_context NV_gpu_affinity AMD_gpu_association NV_video_capture NV_copy_image ARB_framebuffer_sRGB
+# required-props in wgl.spec (which is not used for anything):
+# dlflags: notlistable handcode
+# wglflags: client-handcode server-handcode non-dispatch
+
+#
+# Boilerplate to define types used by some extensions. This is done
+# up front, since it involves some complexities in protecting
+# the declarations whether or not the -protect flag is given to
+# the generator scripts.
+#
+
+passthru: #ifndef WGL_ARB_pbuffer
+passthru: DECLARE_HANDLE(HPBUFFERARB);
+passthru: #endif
+passthru: #ifndef WGL_EXT_pbuffer
+passthru: DECLARE_HANDLE(HPBUFFEREXT);
+passthru: #endif
+passthru: #ifndef WGL_NV_present_video
+passthru: DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
+passthru: #endif
+passthru: #ifndef WGL_NV_video_output
+passthru: DECLARE_HANDLE(HPVIDEODEV);
+passthru: #endif
+passthru: #ifndef WGL_NV_gpu_affinity
+passthru: DECLARE_HANDLE(HPGPUNV);
+passthru: DECLARE_HANDLE(HGPUNV);
+passthru:
+passthru: typedef struct _GPU_DEVICE {
+passthru: DWORD cb;
+passthru: CHAR DeviceName[32];
+passthru: CHAR DeviceString[128];
+passthru: DWORD Flags;
+passthru: RECT rcVirtualScreen;
+passthru: } GPU_DEVICE, *PGPU_DEVICE;
+passthru: #endif
+passthru: #ifndef WGL_NV_video_capture
+passthru: DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
+passthru: #endif
+passthru:
+
+
+###############################################################################
+#
+# ARB Extension #4
+# ARB_buffer_region commands
+#
+###############################################################################
+
+CreateBufferRegionARB(hDC, iLayerPlane, uType)
+ return HANDLE
+ param hDC HDC in value
+ param iLayerPlane int in value
+ param uType UINT in value
+ category ARB_buffer_region
+
+DeleteBufferRegionARB(hRegion)
+ return VOID
+ param hRegion HANDLE in value
+ category ARB_buffer_region
+
+SaveBufferRegionARB(hRegion, x, y, width, height)
+ return BOOL
+ param hRegion HANDLE in value
+ param x int in value
+ param y int in value
+ param width int in value
+ param height int in value
+ category ARB_buffer_region
+
+RestoreBufferRegionARB(hRegion, x, y, width, height, xSrc, ySrc)
+ return BOOL
+ param hRegion HANDLE in value
+ param x int in value
+ param y int in value
+ param width int in value
+ param height int in value
+ param xSrc int in value
+ param ySrc int in value
+ category ARB_buffer_region
+
+###############################################################################
+#
+# ARB Extension #5
+# ARB_multisample commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_multisample
+
+###############################################################################
+#
+# ARB Extension #8
+# ARB_extensions_string commands
+#
+###############################################################################
+
+GetExtensionsStringARB(hdc)
+ return String
+ param hdc HDC in value
+ category ARB_extensions_string
+
+###############################################################################
+#
+# ARB Extension #9
+# ARB_pixel_format commands
+#
+###############################################################################
+
+GetPixelFormatAttribivARB(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues)
+ return BOOL
+ param hdc HDC in value
+ param iPixelFormat int in value
+ param iLayerPlane int in value
+ param nAttributes UINT in value
+ param piAttributes int in array [nAttributes]
+ param piValues int out array [nAttributes]
+ category ARB_pixel_format
+
+GetPixelFormatAttribfvARB(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues)
+ return BOOL
+ param hdc HDC in value
+ param iPixelFormat int in value
+ param iLayerPlane int in value
+ param nAttributes UINT in value
+ param piAttributes int in array [nAttributes]
+ param pfValues FLOAT out array [nAttributes]
+ category ARB_pixel_format
+
+ChoosePixelFormatARB(hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats)
+ return BOOL
+ param hdc HDC in value
+ param piAttribIList int in array [COMPSIZE()]
+ param pfAttribFList FLOAT in array [COMPSIZE()]
+ param nMaxFormats UINT in value
+ param piFormats int out array [COMPSIZE(nNumFormats)]
+ param nNumFormats UINT out reference
+ category ARB_pixel_format
+
+###############################################################################
+#
+# ARB Extension #10
+# ARB_make_current_read commands
+#
+###############################################################################
+
+MakeContextCurrentARB(hDrawDC, hReadDC, hglrc)
+ return BOOL
+ param hDrawDC HDC in value
+ param hReadDC HDC in value
+ param hglrc HGLRC in value
+ category ARB_make_current_read
+
+GetCurrentReadDCARB()
+ return HDC
+ category ARB_make_current_read
+
+###############################################################################
+#
+# ARB Extension #11
+# ARB_pbuffer commands
+#
+###############################################################################
+
+CreatePbufferARB(hDC, iPixelFormat, iWidth, iHeight, piAttribList)
+ return HPBUFFERARB
+ param hDC HDC in value
+ param iPixelFormat int in value
+ param iWidth int in value
+ param iHeight int in value
+ param piAttribList int in array [COMPSIZE()]
+ category ARB_pbuffer
+
+GetPbufferDCARB(hPbuffer)
+ return HDC
+ param hPbuffer HPBUFFERARB in value
+ category ARB_pbuffer
+
+ReleasePbufferDCARB(hPbuffer, hDC)
+ return int
+ param hPbuffer HPBUFFERARB in value
+ param hDC HDC in value
+ category ARB_pbuffer
+
+DestroyPbufferARB(hPbuffer)
+ return BOOL
+ param hPbuffer HPBUFFERARB in value
+ category ARB_pbuffer
+
+QueryPbufferARB(hPbuffer, iAttribute, piValue)
+ return BOOL
+ param hPbuffer HPBUFFERARB in value
+ param iAttribute int in value
+ param piValue int out reference
+ category ARB_pbuffer
+
+###############################################################################
+#
+# ARB Extension #20
+# ARB_render_texture commands
+#
+###############################################################################
+
+BindTexImageARB(hPbuffer, iBuffer)
+ return BOOL
+ param hPbuffer HPBUFFERARB in value
+ param iBuffer int in value
+ category ARB_render_texture
+
+ReleaseTexImageARB(hPbuffer, iBuffer)
+ return BOOL
+ param hPbuffer HPBUFFERARB in value
+ param iBuffer int in value
+ category ARB_render_texture
+
+SetPbufferAttribARB(hPbuffer, piAttribList)
+ return BOOL
+ param hPbuffer HPBUFFERARB in value
+ param piAttribList int in array [COMPSIZE()]
+ category ARB_render_texture
+
+###############################################################################
+#
+# ARB Extension #39
+# ARB_pixel_format_float commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_pixel_format_float
+
+###############################################################################
+#
+# ARB Extension #46
+# ARB_framebuffer_sRGB commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_framebuffer_sRGB
+
+###############################################################################
+#
+# ARB Extension #55
+# ARB_create_context commands
+#
+###############################################################################
+
+CreateContextAttribsARB(hDC, hShareContext, attribList)
+ return HGLRC
+ param hDC HDC in value
+ param hShareContext HGLRC in value
+ param attribList int in array [COMPSIZE()]
+ category ARB_create_context
+
+###############################################################################
+#
+# ARB Extension #74
+# ARB_create_context_profile commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_create_context_profile
+
+###############################################################################
+#
+# ARB Extension #102
+# ARB_create_context_robustness commands
+#
+###############################################################################
+
+# (none)
+newcategory: ARB_create_context_robustness
+
+
+###############################################################################
+#
+# Extension #167
+# EXT_display_color_table commands
+#
+###############################################################################
+
+CreateDisplayColorTableEXT(id)
+ return GLboolean
+ param id GLushort in value
+ category EXT_display_color_table
+
+LoadDisplayColorTableEXT(table, length)
+ return GLboolean
+ param table GLushort in array [length]
+ param length GLuint in value
+ category EXT_display_color_table
+
+BindDisplayColorTableEXT(id)
+ return GLboolean
+ param id GLushort in value
+ category EXT_display_color_table
+
+DestroyDisplayColorTableEXT(id)
+ return VOID
+ param id GLushort in value
+ category EXT_display_color_table
+
+###############################################################################
+#
+# Extension #168
+# EXT_extensions_string commands
+#
+###############################################################################
+
+GetExtensionsStringEXT()
+ return String
+ category EXT_extensions_string
+
+###############################################################################
+#
+# Extension #169
+# EXT_make_current_read commands
+#
+###############################################################################
+
+MakeContextCurrentEXT(hDrawDC, hReadDC, hglrc)
+ return BOOL
+ param hDrawDC HDC in value
+ param hReadDC HDC in value
+ param hglrc HGLRC in value
+ category EXT_make_current_read
+
+GetCurrentReadDCEXT()
+ return HDC
+ category EXT_make_current_read
+
+###############################################################################
+#
+# Extension #171
+# EXT_pbuffer commands
+#
+###############################################################################
+
+CreatePbufferEXT(hDC, iPixelFormat, iWidth, iHeight, piAttribList)
+ return HPBUFFEREXT
+ param hDC HDC in value
+ param iPixelFormat int in value
+ param iWidth int in value
+ param iHeight int in value
+ param piAttribList int in array [COMPSIZE()]
+ category EXT_pbuffer
+
+GetPbufferDCEXT(hPbuffer)
+ return HDC
+ param hPbuffer HPBUFFEREXT in value
+ category EXT_pbuffer
+
+ReleasePbufferDCEXT(hPbuffer, hDC)
+ return int
+ param hPbuffer HPBUFFEREXT in value
+ param hDC HDC in value
+ category EXT_pbuffer
+
+DestroyPbufferEXT(hPbuffer)
+ return BOOL
+ param hPbuffer HPBUFFEREXT in value
+ category EXT_pbuffer
+
+QueryPbufferEXT(hPbuffer, iAttribute, piValue)
+ return BOOL
+ param hPbuffer HPBUFFEREXT in value
+ param iAttribute int in value
+ param piValue int out reference
+ category EXT_pbuffer
+
+###############################################################################
+#
+# Extension #170
+# EXT_pixel_format commands
+#
+###############################################################################
+
+GetPixelFormatAttribivEXT(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues)
+ return BOOL
+ param hdc HDC in value
+ param iPixelFormat int in value
+ param iLayerPlane int in value
+ param nAttributes UINT in value
+ param piAttributes int out array [nAttributes]
+ param piValues int out array [nAttributes]
+ category EXT_pixel_format
+
+GetPixelFormatAttribfvEXT(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues)
+ return BOOL
+ param hdc HDC in value
+ param iPixelFormat int in value
+ param iLayerPlane int in value
+ param nAttributes UINT in value
+ param piAttributes int out array [nAttributes]
+ param pfValues FLOAT out array [nAttributes]
+ category EXT_pixel_format
+
+ChoosePixelFormatEXT(hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats)
+ return BOOL
+ param hdc HDC in value
+ param piAttribIList int in array [COMPSIZE()]
+ param pfAttribFList FLOAT in array [COMPSIZE()]
+ param nMaxFormats UINT in value
+ param piFormats int out array [COMPSIZE(nNumFormats)]
+ param nNumFormats UINT out reference
+ category EXT_pixel_format
+
+###############################################################################
+#
+# Extension #172
+# EXT_swap_control commands
+#
+###############################################################################
+
+SwapIntervalEXT(interval)
+ return BOOL
+ param interval int in value
+ category EXT_swap_control
+
+GetSwapIntervalEXT()
+ return int
+ category EXT_swap_control
+
+###############################################################################
+#
+# Extension #177
+# EXT_depth_float commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_depth_float
+
+###############################################################################
+#
+# Extension #190
+# NV_vertex_array_range commands
+#
+###############################################################################
+
+AllocateMemoryNV(size, readfreq, writefreq, priority)
+ return VoidPointer
+ param size GLsizei in value
+ param readfreq GLfloat in value
+ param writefreq GLfloat in value
+ param priority GLfloat in value
+ category NV_vertex_array_range
+
+FreeMemoryNV(pointer)
+ return void
+ param pointer void out array [1]
+ category NV_vertex_array_range
+
+###############################################################################
+#
+# Extension #207
+# 3DFX_multisample commands
+#
+###############################################################################
+
+# (none)
+newcategory: 3DFX_multisample
+
+###############################################################################
+#
+# Extension #209
+# EXT_multisample commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_multisample
+
+###############################################################################
+#
+# Extension #242
+# OML_sync_control commands
+#
+###############################################################################
+
+GetSyncValuesOML(hdc, ust, msc, sbc)
+ return BOOL
+ param hdc HDC in value
+ param ust INT64 out array [1]
+ param msc INT64 out array [1]
+ param sbc INT64 out array [1]
+ category OML_sync_control
+
+GetMscRateOML(hdc, numerator, denominator)
+ return BOOL
+ param hdc HDC in value
+ param numerator INT32 out array [1]
+ param denominator INT32 out array [1]
+ category OML_sync_control
+
+SwapBuffersMscOML(hdc, target_msc, divisor, remainder)
+ return INT64
+ param hdc HDC in value
+ param target_msc INT64 in value
+ param divisor INT64 in value
+ param remainder INT64 in value
+ category OML_sync_control
+
+SwapLayerBuffersMscOML(hdc, fuPlanes, target_msc, divisor, remainder)
+ return INT64
+ param hdc HDC in value
+ param fuPlanes int in value
+ param target_msc INT64 in value
+ param divisor INT64 in value
+ param remainder INT64 in value
+ category OML_sync_control
+
+WaitForMscOML(hdc, target_msc, divisor, remainder , ust, msc, sbc)
+ return BOOL
+ param hdc HDC in value
+ param target_msc INT64 in value
+ param divisor INT64 in value
+ param remainder INT64 in value
+ param ust INT64 out array [1]
+ param msc INT64 out array [1]
+ param sbc INT64 out array [1]
+ category OML_sync_control
+
+WaitForSbcOML(hdc, target_sbc, ust, msc, sbc)
+ return BOOL
+ param hdc HDC in value
+ param target_sbc INT64 in value
+ param ust INT64 out array [1]
+ param msc INT64 out array [1]
+ param sbc INT64 out array [1]
+ category OML_sync_control
+
+###############################################################################
+#
+# Extension #250
+# I3D_digital_video_control commands
+#
+###############################################################################
+
+GetDigitalVideoParametersI3D(hDC, iAttribute, piValue)
+ return BOOL
+ param hDC HDC in value
+ param iAttribute int in value
+ param piValue int out array [COMPSIZE(iAttribute)]
+ category I3D_digital_video_control
+
+SetDigitalVideoParametersI3D(hDC, iAttribute, piValue)
+ return BOOL
+ param hDC HDC in value
+ param iAttribute int in value
+ param piValue int in array [COMPSIZE(iAttribute)]
+ category I3D_digital_video_control
+
+###############################################################################
+#
+# Extension #251
+# I3D_gamma commands
+#
+###############################################################################
+
+GetGammaTableParametersI3D(hDC, iAttribute, piValue)
+ return BOOL
+ param hDC HDC in value
+ param iAttribute int in value
+ param piValue int out array [COMPSIZE(iAttribute)]
+ category I3D_gamma
+
+SetGammaTableParametersI3D(hDC, iAttribute, piValue)
+ return BOOL
+ param hDC HDC in value
+ param iAttribute int in value
+ param piValue int in array [COMPSIZE(iAttribute)]
+ category I3D_gamma
+
+GetGammaTableI3D(hDC, iEntries, puRed, puGreen, puBlue)
+ return BOOL
+ param hDC HDC in value
+ param iEntries int in value
+ param puRed USHORT out array [iEntries]
+ param puGreen USHORT out array [iEntries]
+ param puBlue USHORT out array [iEntries]
+ category I3D_gamma
+
+SetGammaTableI3D(hDC, iEntries, puRed, puGreen, puBlue)
+ return BOOL
+ param hDC HDC in value
+ param iEntries int in value
+ param puRed USHORT in array [iEntries]
+ param puGreen USHORT in array [iEntries]
+ param puBlue USHORT in array [iEntries]
+ category I3D_gamma
+
+###############################################################################
+#
+# Extension #252
+# I3D_genlock commands
+#
+###############################################################################
+
+EnableGenlockI3D(hDC)
+ return BOOL
+ param hDC HDC in value
+ category I3D_genlock
+
+DisableGenlockI3D(hDC)
+ return BOOL
+ param hDC HDC in value
+ category I3D_genlock
+
+IsEnabledGenlockI3D(hDC, pFlag)
+ return BOOL
+ param hDC HDC in value
+ param pFlag BOOL out reference
+ category I3D_genlock
+
+GenlockSourceI3D(hDC, uSource)
+ return BOOL
+ param hDC HDC in value
+ param uSource UINT in value
+ category I3D_genlock
+
+GetGenlockSourceI3D(hDC, uSource)
+ return BOOL
+ param hDC HDC in value
+ param uSource UINT out reference
+ category I3D_genlock
+
+GenlockSourceEdgeI3D(hDC, uEdge)
+ return BOOL
+ param hDC HDC in value
+ param uEdge UINT in value
+ category I3D_genlock
+
+GetGenlockSourceEdgeI3D(hDC, uEdge)
+ return BOOL
+ param hDC HDC in value
+ param uEdge UINT out reference
+ category I3D_genlock
+
+GenlockSampleRateI3D(hDC, uRate)
+ return BOOL
+ param hDC HDC in value
+ param uRate UINT in value
+ category I3D_genlock
+
+GetGenlockSampleRateI3D(hDC, uRate)
+ return BOOL
+ param hDC HDC in value
+ param uRate UINT out reference
+ category I3D_genlock
+
+GenlockSourceDelayI3D(hDC, uDelay)
+ return BOOL
+ param hDC HDC in value
+ param uDelay UINT in value
+ category I3D_genlock
+
+GetGenlockSourceDelayI3D(hDC, uDelay)
+ return BOOL
+ param hDC HDC in value
+ param uDelay UINT out reference
+ category I3D_genlock
+
+QueryGenlockMaxSourceDelayI3D(hDC, uMaxLineDelay, uMaxPixelDelay)
+ return BOOL
+ param hDC HDC in value
+ param uMaxLineDelay UINT out reference
+ param uMaxPixelDelay UINT out reference
+ category I3D_genlock
+
+###############################################################################
+#
+# Extension #253
+# I3D_image_buffer commands
+#
+###############################################################################
+
+CreateImageBufferI3D(hDC, dwSize, uFlags)
+ return LPVOID
+ param hDC HDC in value
+ param dwSize DWORD in value
+ param uFlags UINT in value
+ category I3D_image_buffer
+
+DestroyImageBufferI3D(hDC, pAddress)
+ return BOOL
+ param hDC HDC in value
+ param pAddress LPVOID in value
+ category I3D_image_buffer
+
+AssociateImageBufferEventsI3D(hDC, pEvent, pAddress, pSize, count)
+ return BOOL
+ param hDC HDC in value
+ param pEvent HANDLE in array [count]
+ param pAddress LPVOID in array [count]
+ param pSize DWORD in array [count]
+ param count UINT in value
+ category I3D_image_buffer
+
+ReleaseImageBufferEventsI3D(hDC, pAddress, count)
+ return BOOL
+ param hDC HDC in value
+ param pAddress LPVOID in array [count]
+ param count UINT in value
+ category I3D_image_buffer
+
+###############################################################################
+#
+# Extension #254
+# I3D_swap_frame_lock commands
+#
+###############################################################################
+
+EnableFrameLockI3D()
+ return BOOL
+ category I3D_swap_frame_lock
+
+DisableFrameLockI3D()
+ return BOOL
+ category I3D_swap_frame_lock
+
+IsEnabledFrameLockI3D(pFlag)
+ return BOOL
+ param pFlag BOOL out reference
+ category I3D_swap_frame_lock
+
+QueryFrameLockMasterI3D(pFlag)
+ return BOOL
+ param pFlag BOOL out reference
+ category I3D_swap_frame_lock
+
+###############################################################################
+#
+# Extension #255
+# I3D_swap_frame_usage commands
+#
+###############################################################################
+
+GetFrameUsageI3D(pUsage)
+ return BOOL
+ param pUsage float out reference
+ category I3D_swap_frame_usage
+
+BeginFrameTrackingI3D()
+ return BOOL
+ category I3D_swap_frame_usage
+
+EndFrameTrackingI3D()
+ return BOOL
+ category I3D_swap_frame_usage
+
+QueryFrameTrackingI3D(pFrameCount, pMissedFrames, pLastMissedUsage)
+ return BOOL
+ param pFrameCount DWORD out reference
+ param pMissedFrames DWORD out reference
+ param pLastMissedUsage float out reference
+ category I3D_swap_frame_usage
+
+###############################################################################
+#
+# Extension #278
+# ATI_pixel_format_float commands
+#
+###############################################################################
+
+# (none)
+newcategory: ATI_pixel_format_float
+
+###############################################################################
+#
+# Extension #281
+# NV_float_buffer commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_float_buffer
+
+###############################################################################
+#
+# Extension #313
+# 3DL_stereo_control commands
+#
+###############################################################################
+
+SetStereoEmitterState3DL(hDC, uState)
+ return BOOL
+ param hDC HDC in value
+ param uState UINT in value
+ category 3DL_stereo_control
+
+###############################################################################
+#
+# Extension #328
+# EXT_pixel_format_packed_float commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_pixel_format_packed_float
+
+###############################################################################
+#
+# Extension #337
+# EXT_framebuffer_sRGB commands
+#
+###############################################################################
+
+# (none)
+newcategory: EXT_framebuffer_sRGB
+
+###############################################################################
+#
+# Extension #347
+# NV_present_video commands
+#
+###############################################################################
+
+EnumerateVideoDevicesNV(hDC, phDeviceList)
+ return int
+ param hDC HDC in value
+ param phDeviceList HVIDEOOUTPUTDEVICENV out array
+ category NV_present_video
+
+BindVideoDeviceNV(hDC, uVideoSlot, hVideoDevice, piAttribList)
+ return BOOL
+ param hDC HDC in value
+ param uVideoSlot uint in value
+ param hVideoDevice HVIDEOOUTPUTDEVICENV in value
+ param piAttribList int in array [COMPSIZE()]
+ category NV_present_video
+
+QueryCurrentContextNV(iAttribute, piValue)
+ return BOOL
+ param iAttribute int in value
+ param piValue int out array [COMPSIZE()]
+ category NV_present_video
+
+###############################################################################
+#
+# Extension #349
+# NV_video_output commands
+#
+###############################################################################
+
+GetVideoDeviceNV(hDC, numDevices, hVideoDevice)
+ return BOOL
+ param hDC HDC in value
+ param numDevices int in value
+ param hVideoDevice HPVIDEODEV out reference
+ category NV_video_output
+
+ReleaseVideoDeviceNV(hVideoDevice)
+ return BOOL
+ param hVideoDevice HPVIDEODEV in value
+ category NV_video_output
+
+BindVideoImageNV(hVideoDevice, hPbuffer, iVideoBuffer)
+ return BOOL
+ param hVideoDevice HPVIDEODEV in value
+ param hPbuffer HPBUFFERARB in value
+ param iVideoBuffer int in value
+ category NV_video_output
+
+ReleaseVideoImageNV(hPbuffer, iVideoBuffer)
+ return BOOL
+ param hPbuffer HPBUFFERARB in value
+ param iVideoBuffer int in value
+ category NV_video_output
+
+SendPbufferToVideoNV(hPbuffer, iBufferType, pulCounterPbuffer, bBlock)
+ return BOOL
+ param hPbuffer HPBUFFERARB in value
+ param iBufferType int in value
+ param pulCounterPbuffer ulong out reference
+ param bBlock BOOL in value
+ category NV_video_output
+
+GetVideoInfoNV(hpVideoDevice, pulCounterOutputPbuffer, pulCounterOutputVideo)
+ return BOOL
+ param hpVideoDevice HPVIDEODEV in value
+ param pulCounterOutputPbuffer ulong out reference
+ param pulCounterOutputVideo ulong out reference
+ category NV_video_output
+
+###############################################################################
+#
+# Extension #351
+# NV_swap_group commands
+#
+###############################################################################
+
+JoinSwapGroupNV(hDC, group)
+ return BOOL
+ param hDC HDC in value
+ param group GLuint in value
+ category NV_swap_group
+
+BindSwapBarrierNV(group, barrier)
+ return BOOL
+ param group GLuint in value
+ param barrier GLuint in value
+ category NV_swap_group
+
+QuerySwapGroupNV(hDC, group, barrier)
+ return BOOL
+ param hDC HDC in value
+ param group GLuint out reference
+ param barrier GLuint out reference
+ category NV_swap_group
+
+QueryMaxSwapGroupsNV(hDC, maxGroups, maxBarriers)
+ return BOOL
+ param hDC HDC in value
+ param maxGroups GLuint out reference
+ param maxBarriers GLuint out reference
+ category NV_swap_group
+
+QueryFrameCountNV(hDC, count)
+ return BOOL
+ param hDC HDC in value
+ param count GLuint out reference
+ category NV_swap_group
+
+ResetFrameCountNV(hDC)
+ return BOOL
+ param hDC HDC in value
+ category NV_swap_group
+
+###############################################################################
+#
+# Extension #355
+# NV_gpu_affinity commands
+#
+###############################################################################
+
+EnumGpusNV(iGpuIndex, phGpu)
+ return BOOL
+ param iGpuIndex UINT in value
+ param phGpu HGPUNV out reference
+ category NV_gpu_affinity
+
+EnumGpuDevicesNV(hGpu, iDeviceIndex, lpGpuDevice)
+ return BOOL
+ param hGpu HGPUNV in value
+ param iDeviceIndex UINT in value
+ param lpGpuDevice PGPU_DEVICE in value
+ category NV_gpu_affinity
+
+CreateAffinityDCNV(phGpuList)
+ return HDC
+ param phGpuList HGPUNV in array [COMPSIZE()]
+ category NV_gpu_affinity
+
+EnumGpusFromAffinityDCNV(hAffinityDC, iGpuIndex, hGpu)
+ return BOOL
+ param hAffinityDC HDC in value
+ param iGpuIndex UINT in value
+ param hGpu HGPUNV out reference
+ category NV_gpu_affinity
+
+DeleteDCNV(hdc)
+ return BOOL
+ param hdc HDC in value
+ category NV_gpu_affinity
+
+###############################################################################
+#
+# Extension #361
+# AMD_gpu_association commands
+#
+###############################################################################
+
+GetGPUIDsAMD(maxCount, ids)
+ return UINT
+ param maxCount UINT in value
+ param ids UINT out array [maxCount]
+ category AMD_gpu_association
+
+GetGPUInfoAMD(id, property, dataType, size, data)
+ return INT
+ param id UINT in value
+ param property int in value
+ param dataType GLenum in value
+ param size UINT in value
+ param data void out array [COMPSIZE(dataType,size)]
+ category AMD_gpu_association
+
+GetContextGPUIDAMD(hglrc)
+ return UINT
+ param hglrc HGLRC in value
+ category AMD_gpu_association
+
+CreateAssociatedContextAMD(id)
+ return HGLRC
+ param id UINT in value
+ category AMD_gpu_association
+
+CreateAssociatedContextAttribsAMD(id, hShareContext, attribList)
+ return HGLRC
+ param id UINT in value
+ param hShareContext HGLRC in value
+ param attribList int in array [COMPSIZE()]
+ category AMD_gpu_association
+
+DeleteAssociatedContextAMD(hglrc)
+ return BOOL
+ param hglrc HGLRC in value
+ category AMD_gpu_association
+
+MakeAssociatedContextCurrentAMD(hglrc)
+ return BOOL
+ param hglrc HGLRC in value
+ category AMD_gpu_association
+
+GetCurrentAssociatedContextAMD()
+ return HGLRC
+ category AMD_gpu_association
+
+BlitContextFramebufferAMD(dstCtx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter)
+ return VOID
+ param dstCtx HGLRC in value
+ param srcX0 GLint in value
+ param srcY0 GLint in value
+ param srcX1 GLint in value
+ param srcY1 GLint in value
+ param dstX0 GLint in value
+ param dstY0 GLint in value
+ param dstX1 GLint in value
+ param dstY1 GLint in value
+ param mask GLbitfield in value
+ param filter GLenum in value
+ category AMD_gpu_association
+
+###############################################################################
+#
+# Extension #374
+# NV_video_capture commands
+#
+###############################################################################
+
+BindVideoCaptureDeviceNV(uVideoSlot, hDevice)
+ return BOOL
+ param uVideoSlot UINT in value
+ param hDevice HVIDEOINPUTDEVICENV in value
+ category NV_video_capture
+
+EnumerateVideoCaptureDevicesNV(hDc, phDeviceList)
+ return UINT
+ param hDc HDC in value
+ param phDeviceList HVIDEOINPUTDEVICENV out reference
+ category NV_video_capture
+
+LockVideoCaptureDeviceNV(hDc, hDevice)
+ return BOOL
+ param hDc HDC in value
+ param hDevice HVIDEOINPUTDEVICENV in value
+ category NV_video_capture
+
+QueryVideoCaptureDeviceNV(hDc, hDevice, iAttribute, piValue)
+ return BOOL
+ param hDc HDC in value
+ param hDevice HVIDEOINPUTDEVICENV in value
+ param iAttribute int in value
+ param piValue int out reference
+ category NV_video_capture
+
+ReleaseVideoCaptureDeviceNV(hDc, hDevice)
+ return BOOL
+ param hDc HDC in value
+ param hDevice HVIDEOINPUTDEVICENV in value
+ category NV_video_capture
+
+###############################################################################
+#
+# Extension #376
+# WGL_NV_copy_image commands
+#
+###############################################################################
+
+CopyImageSubDataNV(hSrcRC, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, hDstRC, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth)
+ return BOOL
+ param hSrcRC HGLRC in value
+ param srcName GLuint in value
+ param srcTarget GLenum in value
+ param srcLevel GLint in value
+ param srcX GLint in value
+ param srcY GLint in value
+ param srcZ GLint in value
+ param hDstRC HGLRC in value
+ param dstName GLuint in value
+ param dstTarget GLenum in value
+ param dstLevel GLint in value
+ param dstX GLint in value
+ param dstY GLint in value
+ param dstZ GLint in value
+ param width GLsizei in value
+ param height GLsizei in value
+ param depth GLsizei in value
+ category NV_copy_image
+
+###############################################################################
+#
+# Extension #393
+# NV_multisample_coverage commands
+#
+###############################################################################
+
+# (none)
+newcategory: NV_multisample_coverage
diff --git a/xorg-server/hw/xwin/glx/winpriv.c b/xorg-server/hw/xwin/glx/winpriv.c
index a35392b26..c689bae08 100644
--- a/xorg-server/hw/xwin/glx/winpriv.c
+++ b/xorg-server/hw/xwin/glx/winpriv.c
@@ -11,6 +11,8 @@
#include "winpriv.h"
#include "winwindow.h"
+extern Bool g_fXdmcpEnabled;
+
void
winCreateWindowsWindow (WindowPtr pWin);
/**
@@ -19,7 +21,8 @@ winCreateWindowsWindow (WindowPtr pWin);
*/
HWND winGetWindowInfo(WindowPtr pWin)
{
- winDebug("%s: pWin=%p\n", __FUNCTION__, pWin);
+ HWND hwnd = NULL;
+ winDebug("%s:%d pWin=%p\n", __FUNCTION__, __LINE__, pWin);
/* a real window was requested */
if (pWin != NULL)
@@ -28,12 +31,11 @@ HWND winGetWindowInfo(WindowPtr pWin)
ScreenPtr pScreen = pWin->drawable.pScreen;
winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen);
winScreenInfoPtr pScreenInfo = NULL;
- HWND hwnd = NULL;
if (pWinScreen == NULL)
{
ErrorF("winGetWindowInfo: screen has no privates\n");
- return NULL;
+ return hwnd;
}
hwnd = pWinScreen->hwndScreen;
@@ -53,17 +55,104 @@ HWND winGetWindowInfo(WindowPtr pWin)
if (pWinPriv->hWnd == NULL)
{
- winCreateWindowsWindow(pWin);
- ErrorF("winGetWindowInfo: forcing window to exist...\n");
+ if (pWin->parent && pWin->parent->parent)
+ {
+ int offsetx;
+ int offsety;
+ int ExtraClass=(pWin->realized)?WS_VISIBLE:0;
+ HWND hWndParent;
+ WindowPtr pParent=pWin->parent;
+ while (pParent)
+ {
+ winWindowPriv(pParent);
+ hWndParent=pWinPriv->hWnd;
+ if (hWndParent)
+ break;
+ pParent=pParent->parent;
+ }
+ if (!hWndParent)
+ hWndParent=hwnd;
+ if (pParent)
+ {
+ offsetx=pParent->drawable.x;
+ offsety=pParent->drawable.y;
+ }
+ else
+ {
+ offsetx=0;
+ offsety=0;
+ }
+ pWinPriv->hWnd=CreateWindowExA(WS_EX_TRANSPARENT,
+ WIN_GL_WINDOW_CLASS,
+ "",
+ WS_CHILD |WS_CLIPSIBLINGS | WS_CLIPCHILDREN | ExtraClass,
+ pWin->drawable.x-offsetx,
+ pWin->drawable.y-offsety,
+ pWin->drawable.width,
+ pWin->drawable.height,
+ hWndParent,
+ NULL,
+ GetModuleHandle(NULL),
+ NULL);
+ winDebug("Window created %x %x %d %d %d %d\n",pWinPriv->hWnd,hWndParent,pWin->drawable.x-offsetx,pWin->drawable.y-offsety,pWin->drawable.width, pWin->drawable.height);
+ pWinPriv->GlCtxWnd=TRUE;
+ }
+ else
+ {
+ winCreateWindowsWindow(pWin);
+ winDebug("winGetWindowInfo: forcing window to exist...\n");
+ }
}
-
if (pWinPriv->hWnd != NULL)
- {
+ {
/* copy window handle */
hwnd = pWinPriv->hWnd;
- }
+ }
+ }
+ else if (g_fXdmcpEnabled)
+ {
+ winWindowPriv(pWin);
- return hwnd;
+ if (pWinPriv == NULL)
+ {
+ ErrorF("winGetWindowInfo: window has no privates\n");
+ return hwnd;
+ }
+ if (pWinPriv->hWnd == NULL)
+ {
+ if (!((pWin->drawable.x==0) &&
+ (pWin->drawable.y==0) &&
+ (pWin->drawable.width==pScreen->width) &&
+ (pWin->drawable.height==pScreen->height)
+ )
+ )
+ {
+ int ExtraClass=(pWin->realized)?WS_VISIBLE:0;
+ pWinPriv->hWnd=CreateWindowExA(WS_EX_TRANSPARENT,
+ WIN_GL_WINDOW_CLASS,
+ "",
+ WS_CHILD |WS_CLIPSIBLINGS | WS_CLIPCHILDREN | ExtraClass,
+ pWin->drawable.x,
+ pWin->drawable.y,
+ pWin->drawable.width,
+ pWin->drawable.height,
+ pWinScreen->hwndScreen,
+ NULL,
+ GetModuleHandle(NULL),
+ NULL);
+ pWinPriv->GlCtxWnd=TRUE;
+ /* copy size and window handle */
+ hwnd = pWinPriv->hWnd;
+ }
+ else
+ {
+ hwnd = pWinScreen->hwndScreen;
+ }
+ }
+ else
+ {
+ hwnd = pWinPriv->hWnd;
+ }
}
#endif
#ifdef XWIN_MULTIWINDOWEXTWM
@@ -75,7 +164,6 @@ HWND winGetWindowInfo(WindowPtr pWin)
if (pRLWinPriv == NULL) {
ErrorF("winGetWindowInfo: window has no privates\n");
- return hwnd;
}
if (pRLWinPriv->hWnd != NULL)
@@ -83,7 +171,6 @@ HWND winGetWindowInfo(WindowPtr pWin)
/* copy window handle */
hwnd = pRLWinPriv->hWnd;
}
- return hwnd;
}
#endif
}
@@ -95,15 +182,16 @@ HWND winGetWindowInfo(WindowPtr pWin)
if (pWinScreen == NULL)
{
ErrorF("winGetWindowInfo: screen has no privates\n");
- return NULL;
}
+ else
+ {
+ winDebug("winGetWindowInfo: returning root window\n");
- ErrorF("winGetWindowInfo: returning root window\n");
-
- return pWinScreen->hwndScreen;
+ hwnd=pWinScreen->hwndScreen;
+ }
}
- return NULL;
+ return hwnd;
}
Bool
@@ -122,5 +210,8 @@ winCheckScreenAiglxIsSupported(ScreenPtr pScreen)
return TRUE;
#endif
+ if (g_fXdmcpEnabled)
+ return TRUE;
+
return FALSE;
}
diff --git a/xorg-server/hw/xwin/glx/winpriv.h b/xorg-server/hw/xwin/glx/winpriv.h
index dce1edf48..710525ccc 100644
--- a/xorg-server/hw/xwin/glx/winpriv.h
+++ b/xorg-server/hw/xwin/glx/winpriv.h
@@ -7,5 +7,7 @@
#include <X11/Xwindows.h>
#include <windowstr.h>
+#define WIN_GL_WINDOW_CLASS "XWinGLTest"
+
HWND winGetWindowInfo(WindowPtr pWin);
Bool winCheckScreenAiglxIsSupported(ScreenPtr pScreen);
diff --git a/xorg-server/hw/xwin/makefile b/xorg-server/hw/xwin/makefile
new file mode 100644
index 000000000..d6940dbaf
--- /dev/null
+++ b/xorg-server/hw/xwin/makefile
@@ -0,0 +1,164 @@
+LIBRARY = libXWin
+
+XWIN_MULTIWINDOW=1
+XWIN_CLIPBOARD=1
+XWIN_MULTIWINDOWEXTWM=0 # currently not working correctly
+XWIN_MULTIWINDOWINTWM=0 # currently not working correctly
+XWIN_RANDR=1
+XWIN_NATIVEGDI=0 # currently not working correctly
+XWIN_PRIMARYFB=0 # currently not working correctly
+XWIN_GLX_WINDOWS=0 # everything is in the glx makefile
+
+if XWIN_CLIPBOARD
+SRCS_CLIPBOARD = \
+ winclipboardinit.c \
+ winclipboardtextconv.c \
+ winclipboardthread.c \
+ winclipboardunicode.c \
+ winclipboardwndproc.c \
+ winclipboardwrappers.c \
+ winclipboardxevents.c
+DEFS_CLIPBOARD = -DXWIN_CLIPBOARD
+endif
+
+if XWIN_GLX_WINDOWS
+GLX_DIR = glx
+DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS
+XWIN_GLX_LIBS = $(top_builddir)/hw/xwin/glx/libXwinGLX.la
+XWIN_GLX_LINK_FLAGS = -lopengl32
+endif
+
+if XWIN_MULTIWINDOW
+SRCS_MULTIWINDOW = \
+ winmultiwindowshape.c \
+ winmultiwindowwindow.c \
+ winmultiwindowwm.c \
+ winmultiwindowwndproc.c
+DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW
+endif
+
+if XWIN_MULTIWINDOWEXTWM
+SRCS_MULTIWINDOWEXTWM = \
+ winwin32rootless.c \
+ winwin32rootlesswindow.c \
+ winwin32rootlesswndproc.c \
+ winwindowswm.c
+DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM
+MULTIWINDOWEXTWM_LIBS = $(top_builddir)/miext/rootless/librootless.la
+endif
+
+if XWIN_NATIVEGDI
+SRCS_NATIVEGDI = \
+ winclip.c \
+ winfillsp.c \
+ winfont.c \
+ wingc.c \
+ wingetsp.c \
+ winnativegdi.c \
+ winpixmap.c \
+ winpolyline.c \
+ winrop.c \
+ winsetsp.c
+DEFS_NATIVEGDI = -DXWIN_NATIVEGDI
+endif
+
+if XWIN_PRIMARYFB
+SRCS_PRIMARYFB = \
+ winpfbdd.c
+DEFS_PRIMARYFB = -DXWIN_PRIMARYFB
+endif
+
+if XWIN_RANDR
+SRCS_RANDR = \
+ winrandr.c
+DEFS_RANDR = -DXWIN_RANDR
+endif
+
+if XWIN_XV
+SRCS_XV = \
+ winvideo.c
+DEFS_XV = -DXWIN_XV
+endif
+
+SRCS = InitInput.c \
+ InitOutput.c \
+ winallpriv.c \
+ winauth.c \
+ winblock.c \
+ wincmap.c \
+ winconfig.c \
+ wincreatewnd.c \
+ wincursor.c \
+ windialogs.c \
+ winengine.c \
+ winerror.c \
+ winglobals.c \
+ winkeybd.c \
+ winkeyhook.c \
+ winmisc.c \
+ winmonitors.c \
+ winmouse.c \
+ winmsg.c \
+ winmultiwindowclass.c \
+ winmultiwindowicons.c \
+ winprefs.c \
+ winprefsyacc.y \
+ winprefslex.l \
+ winprocarg.c \
+ winregistry.c \
+ winscrinit.c \
+ winshaddd.c \
+ winshadddnl.c \
+ winshadgdi.c \
+ wintrayicon.c \
+ winvalargs.c \
+ winwakeup.c \
+ winwindow.c \
+ winwndproc.c \
+ ddraw.h \
+ winclipboard.h \
+ winconfig.h \
+ win.h \
+ winkeybd.h \
+ winkeynames.h \
+ winlayouts.h \
+ winmessages.h \
+ winmsg.h \
+ winms.h \
+ winmultiwindowclass.h \
+ winprefs.h \
+ winresource.h \
+ winwindow.h \
+ windisplay.c \
+ XWin.rc \
+ $(SRCS_CLIPBOARD) \
+ $(SRCS_MULTIWINDOW) \
+ $(SRCS_MULTIWINDOWEXTWM) \
+ $(SRCS_NATIVEGDI) \
+ $(SRCS_PRIMARYFB) \
+ $(SRCS_RANDR) \
+ $(SRCS_XV) \
+ xdmcphostselect.c
+
+CSRCS=$(filter %.c,$(SRCS)) $(filter %.y,$(SRCS)) $(filter %.l,$(SRCS))
+CSRCS := $(CSRCS:%.y=%.c)
+CSRCS := $(CSRCS:%.l=%.c)
+
+ DEFS = $(DEFS_CLIPBOARD) \
+ $(DEFS_GLX_WINDOWS) \
+ $(DEFS_MULTIWINDOW) \
+ $(DEFS_MULTIWINDOWEXTWM) \
+ $(DEFS_NATIVEGDI) \
+ $(DEFS_PRIMARYFB) \
+ $(DEFS_RANDR) \
+ $(DEFS_XV)
+
+DEFINES += $(DEFS:-D%=%) HAVE_XWIN_CONFIG_H PTW32_STATIC_LIB RELOCATE_PROJECTROOT
+
+INCLUDES += ..\..\miext\rootless
+
+INCLUDES += $(OBJDIR)
+
+$(OBJDIR)\winprefslex.c $(OBJDIR)\winprefsyacc.c $(OBJDIR)\winprefsyacc.h: winprefslex.l winprefsyacc.y
+ doflexbison.bat $(subst \,/,$(OBJDIR))
+
diff --git a/xorg-server/hw/xwin/win.h b/xorg-server/hw/xwin/win.h
index 606645f9f..e01955cb1 100644
--- a/xorg-server/hw/xwin/win.h
+++ b/xorg-server/hw/xwin/win.h
@@ -1,1491 +1,1465 @@
-/*
- *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
- *
- *Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- *"Software"), to deal in the Software without restriction, including
- *without limitation the rights to use, copy, modify, merge, publish,
- *distribute, sublicense, and/or sell copies of the Software, and to
- *permit persons to whom the Software is furnished to do so, subject to
- *the following conditions:
- *
- *The above copyright notice and this permission notice shall be
- *included in all copies or substantial portions of the Software.
- *
- *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
- *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *Except as contained in this notice, the name of the XFree86 Project
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from the XFree86 Project.
- *
- * Authors: Dakshinamurthy Karra
- * Suhaib M Siddiqi
- * Peter Busch
- * Harold L Hunt II
- * Kensuke Matsuzaki
- */
-
-#ifndef _WIN_H_
-#define _WIN_H_
-
-#ifndef NO
-#define NO 0
-#endif
-#ifndef YES
-#define YES 1
-#endif
-
-/* Turn debug messages on or off */
-#ifndef CYGDEBUG
-#define CYGDEBUG NO
-#endif
-
-/* WM_XBUTTON Messages. They should go into w32api. */
-#ifndef WM_XBUTTONDOWN
-# define WM_XBUTTONDOWN 523
-#endif
-#ifndef WM_XBUTTONUP
-# define WM_XBUTTONUP 524
-#endif
-#ifndef WM_XBUTTONDBLCLK
-# define WM_XBUTTONDBLCLK 525
-#endif
-
-
-#define WIN_DEFAULT_BPP 0
-#define WIN_DEFAULT_WHITEPIXEL 255
-#define WIN_DEFAULT_BLACKPIXEL 0
-#define WIN_DEFAULT_LINEBIAS 0
-#define WIN_DEFAULT_E3B_TIME 50 /* milliseconds */
-#define WIN_DEFAULT_DPI 75
-#define WIN_DEFAULT_REFRESH 0
-#define WIN_DEFAULT_WIN_KILL TRUE
-#define WIN_DEFAULT_UNIX_KILL FALSE
-#define WIN_DEFAULT_CLIP_UPDATES_NBOXES 0
-#ifdef XWIN_EMULATEPSEUDO
-#define WIN_DEFAULT_EMULATE_PSEUDO FALSE
-#endif
-#define WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH FALSE
-
-/*
- * Windows only supports 256 color palettes
- */
-#define WIN_NUM_PALETTE_ENTRIES 256
-
-/*
- * Number of times to call Restore in an attempt to restore the primary surface
- */
-#define WIN_REGAIN_SURFACE_RETRIES 1
-
-/*
- * Build a supported display depths mask by shifting one to the left
- * by the number of bits in the supported depth.
- */
-#define WIN_SUPPORTED_BPPS ( (1 << (32 - 1)) | (1 << (24 - 1)) \
- | (1 << (16 - 1)) | (1 << (15 - 1)) \
- | (1 << ( 8 - 1)))
-#define WIN_CHECK_DEPTH YES
-
-/*
- * Timer IDs for WM_TIMER
- */
-#define WIN_E3B_TIMER_ID 1
-#define WIN_POLLING_MOUSE_TIMER_ID 2
-
-#define MOUSE_POLLING_INTERVAL 50
-
-#define WIN_E3B_OFF -1
-#define WIN_FD_INVALID -1
-
-#define WIN_SERVER_NONE 0x0L /* 0 */
-#define WIN_SERVER_SHADOW_GDI 0x1L /* 1 */
-#define WIN_SERVER_SHADOW_DD 0x2L /* 2 */
-#define WIN_SERVER_SHADOW_DDNL 0x4L /* 4 */
-#ifdef XWIN_PRIMARYFB
-#define WIN_SERVER_PRIMARY_DD 0x8L /* 8 */
-#endif
-#ifdef XWIN_NATIVEGDI
-# define WIN_SERVER_NATIVE_GDI 0x10L /* 16 */
-#endif
-
-#define AltMapIndex Mod1MapIndex
-#define NumLockMapIndex Mod2MapIndex
-#define AltLangMapIndex Mod3MapIndex
-#define KanaMapIndex Mod4MapIndex
-#define ScrollLockMapIndex Mod5MapIndex
-
-#define WIN_MOD_LALT 0x00000001
-#define WIN_MOD_RALT 0x00000002
-#define WIN_MOD_LCONTROL 0x00000004
-#define WIN_MOD_RCONTROL 0x00000008
-
-#define WIN_24BPP_MASK_RED 0x00FF0000
-#define WIN_24BPP_MASK_GREEN 0x0000FF00
-#define WIN_24BPP_MASK_BLUE 0x000000FF
-
-#define WIN_MAX_KEYS_PER_KEY 4
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-
-#include <errno.h>
-#if defined(XWIN_MULTIWINDOWEXTWM) || defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
-#define HANDLE void *
-#include <pthread.h>
-#undef HANDLE
-#endif
-
-#ifdef HAS_MMAP
-#include <sys/mman.h>
-#ifndef MAP_FILE
-#define MAP_FILE 0
-#endif /* MAP_FILE */
-#endif /* HAS_MMAP */
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/Xos.h>
-#include <X11/Xprotostr.h>
-#include "scrnintstr.h"
-#include "pixmapstr.h"
-#include "pixmap.h"
-#include "region.h"
-#include "gcstruct.h"
-#include "colormap.h"
-#include "colormapst.h"
-#include "miscstruct.h"
-#include "servermd.h"
-#include "windowstr.h"
-#include "mi.h"
-#include "micmap.h"
-#include "mifillarc.h"
-#include "mifpoly.h"
-#include "mibstore.h"
-#include "input.h"
-#include "mipointer.h"
-#include "X11/keysym.h"
-#include "mibstore.h"
-#include "micoord.h"
-#include "dix.h"
-#include "miline.h"
-#include "shadow.h"
-#include "fb.h"
-#include "rootless.h"
-
-#include "mipict.h"
-#include "picturestr.h"
-
-#ifdef RANDR
-#include "randrstr.h"
-#endif
-
-/*
- * Windows headers
- */
-#include "winms.h"
-#include "winresource.h"
-
-
-/*
- * Define Windows constants
- */
-
-#define WM_TRAYICON (WM_USER + 1000)
-#define WM_INIT_SYS_MENU (WM_USER + 1001)
-#define WM_GIVEUP (WM_USER + 1002)
-
-
-/* Local includes */
-#include "winwindow.h"
-#include "winmsg.h"
-
-
-/*
- * Debugging macros
- */
-
-#if CYGDEBUG
-#define DEBUG_MSG(str,...) \
-if (fDebugProcMsg) \
-{ \
- char *pszTemp; \
- int iLength; \
- if (asprintf (&pszTemp, str, ##__VA_ARGS__) != -1) { \
- MessageBox (NULL, pszTemp, szFunctionName, MB_OK); \
- free (pszTemp); \
- } \
-}
-#else
-#define DEBUG_MSG(str,...)
-#endif
-
-#if CYGDEBUG
-#define DEBUG_FN_NAME(str) PTSTR szFunctionName = str
-#else
-#define DEBUG_FN_NAME(str)
-#endif
-
-#if CYGDEBUG || YES
-#define DEBUGVARS BOOL fDebugProcMsg = FALSE
-#else
-#define DEBUGVARS
-#endif
-
-#if CYGDEBUG || YES
-#define DEBUGPROC_MSG fDebugProcMsg = TRUE
-#else
-#define DEBUGPROC_MSG
-#endif
-
-#define PROFILEPOINT(point,thresh)\
-{\
-static unsigned int PROFPT##point = 0;\
-if (++PROFPT##point % thresh == 0)\
-ErrorF (#point ": PROFILEPOINT hit %u times\n", PROFPT##point);\
-}
-
-
-/* We use xor this macro for detecting toggle key state changes */
-#define WIN_XOR(a,b) ((!(a) && (b)) || ((a) && !(b)))
-
-#define DEFINE_ATOM_HELPER(func,atom_name) \
-static Atom func (void) { \
- static int generation; \
- static Atom atom; \
- if (generation != serverGeneration) { \
- generation = serverGeneration; \
- atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \
- } \
- return atom; \
-}
-
-/*
- * Typedefs for engine dependent function pointers
- */
-
-typedef Bool (*winAllocateFBProcPtr)(ScreenPtr);
-
-typedef void (*winFreeFBProcPtr)(ScreenPtr);
-
-typedef void (*winShadowUpdateProcPtr)(ScreenPtr, shadowBufPtr);
-
-typedef Bool (*winInitScreenProcPtr)(ScreenPtr);
-
-typedef Bool (*winCloseScreenProcPtr)(int, ScreenPtr);
-
-typedef Bool (*winInitVisualsProcPtr)(ScreenPtr);
-
-typedef Bool (*winAdjustVideoModeProcPtr)(ScreenPtr);
-
-typedef Bool (*winCreateBoundingWindowProcPtr)(ScreenPtr);
-
-typedef Bool (*winFinishScreenInitProcPtr)(int, ScreenPtr, int, char **);
-
-typedef Bool (*winBltExposedRegionsProcPtr)(ScreenPtr);
-
-typedef Bool (*winActivateAppProcPtr)(ScreenPtr);
-
-typedef Bool (*winRedrawScreenProcPtr)(ScreenPtr pScreen);
-
-typedef Bool (*winRealizeInstalledPaletteProcPtr)(ScreenPtr pScreen);
-
-typedef Bool (*winInstallColormapProcPtr)(ColormapPtr pColormap);
-
-typedef Bool (*winStoreColorsProcPtr)(ColormapPtr pmap,
- int ndef, xColorItem *pdefs);
-
-typedef Bool (*winCreateColormapProcPtr)(ColormapPtr pColormap);
-
-typedef Bool (*winDestroyColormapProcPtr)(ColormapPtr pColormap);
-
-typedef Bool (*winHotKeyAltTabProcPtr)(ScreenPtr);
-
-typedef Bool (*winCreatePrimarySurfaceProcPtr)(ScreenPtr);
-
-typedef Bool (*winReleasePrimarySurfaceProcPtr)(ScreenPtr);
-
-typedef Bool (*winFinishCreateWindowsWindowProcPtr)(WindowPtr pWin);
-
-typedef Bool (*winCreateScreenResourcesProc)(ScreenPtr);
-
-#ifdef XWIN_NATIVEGDI
-/* Typedefs for native GDI wrappers */
-typedef Bool (*RealizeFontPtr) (ScreenPtr pScreen, FontPtr pFont);
-typedef Bool (*UnrealizeFontPtr)(ScreenPtr pScreen, FontPtr pFont);
-#endif
-
-
-/*
- * GC (graphics context) privates
- */
-
-typedef struct
-{
- HDC hdc;
- HDC hdcMem;
-} winPrivGCRec, *winPrivGCPtr;
-
-
-/*
- * Pixmap privates
- */
-
-typedef struct
-{
- HDC hdcSelected;
- HBITMAP hBitmap;
- BYTE *pbBits;
- DWORD dwScanlineBytes;
- BITMAPINFOHEADER *pbmih;
-} winPrivPixmapRec, *winPrivPixmapPtr;
-
-
-/*
- * Colormap privates
- */
-
-typedef struct
-{
- HPALETTE hPalette;
- LPDIRECTDRAWPALETTE lpDDPalette;
- RGBQUAD rgbColors[WIN_NUM_PALETTE_ENTRIES];
- PALETTEENTRY peColors[WIN_NUM_PALETTE_ENTRIES];
-} winPrivCmapRec, *winPrivCmapPtr;
-
-/*
- * Windows Cursor handling.
- */
-
-typedef struct {
- /* from GetSystemMetrics */
- int sm_cx;
- int sm_cy;
-
- BOOL visible;
- HCURSOR handle;
- QueryBestSizeProcPtr QueryBestSize;
- miPointerSpriteFuncPtr spriteFuncs;
-} winCursorRec;
-
-/*
- * Resize modes
- */
-typedef enum {
- notAllowed,
- resizeWithScrollbars,
- resizeWithRandr
-} winResizeMode;
-
-/*
- * Screen information structure that we need before privates are available
- * in the server startup sequence.
- */
-
-typedef struct
-{
- ScreenPtr pScreen;
-
- /* Did the user specify a height and width? */
- Bool fUserGaveHeightAndWidth;
-
- DWORD dwScreen;
-
- int iMonitor;
- DWORD dwUserWidth;
- DWORD dwUserHeight;
- DWORD dwWidth;
- DWORD dwHeight;
- DWORD dwPaddedWidth;
-
- /* Did the user specify a screen position? */
- Bool fUserGavePosition;
- DWORD dwInitialX;
- DWORD dwInitialY;
-
- /*
- * dwStride is the number of whole pixels that occupy a scanline,
- * including those pixels that are not displayed. This is basically
- * a rounding up of the width.
- */
- DWORD dwStride;
-
- /* Offset of the screen in the window when using scrollbars */
- DWORD dwXOffset;
- DWORD dwYOffset;
-
- DWORD dwBPP;
- DWORD dwDepth;
- DWORD dwRefreshRate;
- char *pfb;
- DWORD dwEngine;
- DWORD dwEnginePreferred;
- DWORD dwClipUpdatesNBoxes;
-#ifdef XWIN_EMULATEPSEUDO
- Bool fEmulatePseudo;
-#endif
- Bool fFullScreen;
- Bool fDecoration;
-#ifdef XWIN_MULTIWINDOWEXTWM
- Bool fMWExtWM;
- Bool fInternalWM;
- Bool fAnotherWMRunning;
-#endif
- Bool fRootless;
-#ifdef XWIN_MULTIWINDOW
- Bool fMultiWindow;
-#endif
-#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
- Bool fMultiMonitorOverride;
-#endif
- Bool fMultipleMonitors;
- Bool fLessPointer;
- winResizeMode iResizeMode;
- Bool fNoTrayIcon;
- int iE3BTimeout;
- /* Windows (Alt+F4) and Unix (Ctrl+Alt+Backspace) Killkey */
- Bool fUseWinKillKey;
- Bool fUseUnixKillKey;
- Bool fIgnoreInput;
-
- /* Did the user explicitly set this screen? */
- Bool fExplicitScreen;
-} winScreenInfo, *winScreenInfoPtr;
-
-
-/*
- * Screen privates
- */
-
-typedef struct _winPrivScreenRec
-{
- winScreenInfoPtr pScreenInfo;
-
- Bool fEnabled;
- Bool fClosed;
- Bool fActive;
- Bool fBadDepth;
-
- int iDeltaZ;
-
- int iConnectedClients;
-
- CloseScreenProcPtr CloseScreen;
-
- DWORD dwRedMask;
- DWORD dwGreenMask;
- DWORD dwBlueMask;
- DWORD dwBitsPerRGB;
-
- DWORD dwModeKeyStates;
-
- /* Handle to icons that must be freed */
- HICON hiconNotifyIcon;
-
- /* Palette management */
- ColormapPtr pcmapInstalled;
-
- /* Pointer to the root visual so we only have to look it up once */
- VisualPtr pRootVisual;
-
- /* 3 button emulation variables */
- int iE3BCachedPress;
- Bool fE3BFakeButton2Sent;
-
- /* Privates used by shadow fb GDI server */
- HBITMAP hbmpShadow;
- HDC hdcScreen;
- HDC hdcShadow;
- HWND hwndScreen;
- BITMAPINFOHEADER *pbmih;
-
- /* Privates used by shadow fb and primary fb DirectDraw servers */
- LPDIRECTDRAW pdd;
- LPDIRECTDRAWSURFACE2 pddsPrimary;
- LPDIRECTDRAW2 pdd2;
-
- /* Privates used by shadow fb DirectDraw server */
- LPDIRECTDRAWSURFACE2 pddsShadow;
- LPDDSURFACEDESC pddsdShadow;
-
- /* Privates used by primary fb DirectDraw server */
- LPDIRECTDRAWSURFACE2 pddsOffscreen;
- LPDDSURFACEDESC pddsdOffscreen;
- LPDDSURFACEDESC pddsdPrimary;
-
- /* Privates used by shadow fb DirectDraw Nonlocking server */
- LPDIRECTDRAW4 pdd4;
- LPDIRECTDRAWSURFACE4 pddsShadow4;
- LPDIRECTDRAWSURFACE4 pddsPrimary4;
- BOOL fRetryCreateSurface;
-
- /* Privates used by both shadow fb DirectDraw servers */
- LPDIRECTDRAWCLIPPER pddcPrimary;
-
-#ifdef XWIN_MULTIWINDOWEXTWM
- /* Privates used by multi-window external window manager */
- RootlessFrameID widTop;
- Bool fRestacking;
-#endif
-
-#ifdef XWIN_MULTIWINDOW
- /* Privates used by multi-window */
- pthread_t ptWMProc;
- pthread_t ptXMsgProc;
- void *pWMInfo;
-#endif
-
-#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
- /* Privates used by both multi-window and rootless */
- Bool fRootWindowShown;
-#endif
-
-#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
- /* Privates used for any module running in a seperate thread */
- pthread_mutex_t pmServerStarted;
- Bool fServerStarted;
-#endif
-
- /* Engine specific functions */
- winAllocateFBProcPtr pwinAllocateFB;
- winFreeFBProcPtr pwinFreeFB;
- winShadowUpdateProcPtr pwinShadowUpdate;
- winInitScreenProcPtr pwinInitScreen;
- winCloseScreenProcPtr pwinCloseScreen;
- winInitVisualsProcPtr pwinInitVisuals;
- winAdjustVideoModeProcPtr pwinAdjustVideoMode;
- winCreateBoundingWindowProcPtr pwinCreateBoundingWindow;
- winFinishScreenInitProcPtr pwinFinishScreenInit;
- winBltExposedRegionsProcPtr pwinBltExposedRegions;
- winActivateAppProcPtr pwinActivateApp;
- winRedrawScreenProcPtr pwinRedrawScreen;
- winRealizeInstalledPaletteProcPtr pwinRealizeInstalledPalette;
- winInstallColormapProcPtr pwinInstallColormap;
- winStoreColorsProcPtr pwinStoreColors;
- winCreateColormapProcPtr pwinCreateColormap;
- winDestroyColormapProcPtr pwinDestroyColormap;
- winHotKeyAltTabProcPtr pwinHotKeyAltTab;
- winCreatePrimarySurfaceProcPtr pwinCreatePrimarySurface;
- winReleasePrimarySurfaceProcPtr pwinReleasePrimarySurface;
-
- winCreateScreenResourcesProc pwinCreateScreenResources;
-
-#ifdef XWIN_MULTIWINDOW
- /* Window Procedures for MultiWindow mode */
- winFinishCreateWindowsWindowProcPtr pwinFinishCreateWindowsWindow;
-#endif
-
- /* Window Procedures for Rootless mode */
- CreateWindowProcPtr CreateWindow;
- DestroyWindowProcPtr DestroyWindow;
- PositionWindowProcPtr PositionWindow;
- ChangeWindowAttributesProcPtr ChangeWindowAttributes;
- RealizeWindowProcPtr RealizeWindow;
- UnrealizeWindowProcPtr UnrealizeWindow;
- ValidateTreeProcPtr ValidateTree;
- PostValidateTreeProcPtr PostValidateTree;
- WindowExposuresProcPtr WindowExposures;
- CopyWindowProcPtr CopyWindow;
- ClearToBackgroundProcPtr ClearToBackground;
- ClipNotifyProcPtr ClipNotify;
- RestackWindowProcPtr RestackWindow;
- ReparentWindowProcPtr ReparentWindow;
- ResizeWindowProcPtr ResizeWindow;
- MoveWindowProcPtr MoveWindow;
- SetShapeProcPtr SetShape;
-
- winCursorRec cursor;
-
-#ifdef XWIN_NATIVEGDI
- RealizeFontPtr RealizeFont;
- UnrealizeFontPtr UnrealizeFont;
-#endif
-
-} winPrivScreenRec;
-
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-typedef struct {
- RootlessWindowPtr pFrame;
- HWND hWnd;
- int dwWidthBytes;
- BITMAPINFOHEADER *pbmihShadow;
- HBITMAP hbmpShadow;
- HDC hdcShadow;
- HDC hdcScreen;
- BOOL fResized;
- BOOL fRestackingNow;
- BOOL fClose;
- BOOL fMovingOrSizing;
- BOOL fDestroyed;//for debug
- char *pfb;
-} win32RootlessWindowRec, *win32RootlessWindowPtr;
-#endif
-
-
-typedef struct {
- pointer value;
- XID id;
-} WindowIDPairRec, *WindowIDPairPtr;
-
-
-/*
- * Extern declares for general global variables
- */
-
-#include "winglobals.h"
-
-extern winScreenInfo * g_ScreenInfo;
-extern miPointerScreenFuncRec g_winPointerCursorFuncs;
-extern DWORD g_dwEvents;
-#ifdef HAS_DEVWINDOWS
-extern int g_fdMessageQueue;
-#endif
-extern DevPrivateKeyRec g_iScreenPrivateKeyRec;
-#define g_iScreenPrivateKey (&g_iScreenPrivateKeyRec)
-extern DevPrivateKeyRec g_iCmapPrivateKeyRec;
-#define g_iCmapPrivateKey (&g_iCmapPrivateKeyRec)
-extern DevPrivateKeyRec g_iGCPrivateKeyRec;
-#define g_iGCPrivateKey (&g_iGCPrivateKeyRec)
-extern DevPrivateKeyRec g_iPixmapPrivateKeyRec;
-#define g_iPixmapPrivateKey (&g_iPixmapPrivateKeyRec)
-extern DevPrivateKeyRec g_iWindowPrivateKeyRec;
-#define g_iWindowPrivateKey (&g_iWindowPrivateKeyRec)
-
-extern unsigned long g_ulServerGeneration;
-extern DWORD g_dwEnginesSupported;
-extern HINSTANCE g_hInstance;
-extern int g_copyROP[];
-extern int g_patternROP[];
-extern const char * g_pszQueryHost;
-extern DeviceIntPtr g_pwinPointer;
-extern DeviceIntPtr g_pwinKeyboard;
-
-/*
- * Extern declares for dynamically loaded library function pointers
- */
-
-extern FARPROC g_fpDirectDrawCreate;
-extern FARPROC g_fpDirectDrawCreateClipper;
-extern FARPROC g_fpTrackMouseEvent;
-
-
-/*
- * Screen privates macros
- */
-
-#define winGetScreenPriv(pScreen) ((winPrivScreenPtr) \
- dixLookupPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey))
-
-#define winSetScreenPriv(pScreen,v) \
- dixSetPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey, v)
-
-#define winScreenPriv(pScreen) \
- winPrivScreenPtr pScreenPriv = winGetScreenPriv(pScreen)
-
-
-/*
- * Colormap privates macros
- */
-
-#define winGetCmapPriv(pCmap) ((winPrivCmapPtr) \
- dixLookupPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey))
-
-#define winSetCmapPriv(pCmap,v) \
- dixSetPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey, v)
-
-#define winCmapPriv(pCmap) \
- winPrivCmapPtr pCmapPriv = winGetCmapPriv(pCmap)
-
-
-/*
- * GC privates macros
- */
-
-#define winGetGCPriv(pGC) ((winPrivGCPtr) \
- dixLookupPrivate(&(pGC)->devPrivates, g_iGCPrivateKey))
-
-#define winSetGCPriv(pGC,v) \
- dixSetPrivate(&(pGC)->devPrivates, g_iGCPrivateKey, v)
-
-#define winGCPriv(pGC) \
- winPrivGCPtr pGCPriv = winGetGCPriv(pGC)
-
-
-/*
- * Pixmap privates macros
- */
-
-#define winGetPixmapPriv(pPixmap) ((winPrivPixmapPtr) \
- dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey))
-
-#define winSetPixmapPriv(pPixmap,v) \
- dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey, v)
-
-#define winPixmapPriv(pPixmap) \
- winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap)
-
-
-/*
- * Window privates macros
- */
-
-#define winGetWindowPriv(pWin) ((winPrivWinPtr) \
- dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey))
-
-#define winSetWindowPriv(pWin,v) \
- dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey, v)
-
-#define winWindowPriv(pWin) \
- winPrivWinPtr pWinPriv = winGetWindowPriv(pWin)
-
-/*
- * wrapper macros
- */
-#define _WIN_WRAP(priv, real, mem, func) {\
- priv->mem = real->mem; \
- real->mem = func; \
-}
-
-#define _WIN_UNWRAP(priv, real, mem) {\
- real->mem = priv->mem; \
-}
-
-#define WIN_WRAP(mem, func) _WIN_WRAP(pScreenPriv, pScreen, mem, func)
-
-#define WIN_UNWRAP(mem) _WIN_UNWRAP(pScreenPriv, pScreen, mem)
-
-/*
- * BEGIN DDX and DIX Function Prototypes
- */
-
-
-/*
- * winallpriv.c
- */
-
-Bool
-winAllocatePrivates (ScreenPtr pScreen);
-
-Bool
-winInitCmapPrivates (ColormapPtr pCmap, int index);
-
-Bool
-winAllocateCmapPrivates (ColormapPtr pCmap);
-
-
-/*
- * winauth.c
- */
-
-#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
-Bool
-winGenerateAuthorization (void);
-void winSetAuthorization(void);
-#endif
-
-
-/*
- * winblock.c
- */
-
-void
-winBlockHandler (int nScreen,
- pointer pBlockData,
- pointer pTimeout,
- pointer pReadMask);
-
-
-#ifdef XWIN_NATIVEGDI
-/*
- * winclip.c
- */
-
-RegionPtr
-winPixmapToRegionNativeGDI (PixmapPtr pPix);
-#endif
-
-
-#ifdef XWIN_CLIPBOARD
-/*
- * winclipboardinit.c
- */
-
-Bool
-winInitClipboard (void);
-
-void
-winFixClipboardChain (void);
-#endif
-
-
-/*
- * wincmap.c
- */
-
-void
-winSetColormapFunctions (ScreenPtr pScreen);
-
-Bool
-winCreateDefColormap (ScreenPtr pScreen);
-
-
-/*
- * wincreatewnd.c
- */
-
-Bool
-winCreateBoundingWindowFullScreen (ScreenPtr pScreen);
-
-Bool
-winCreateBoundingWindowWindowed (ScreenPtr pScreen);
-
-
-/*
- * windialogs.c
- */
-
-void
-winDisplayExitDialog (winPrivScreenPtr pScreenPriv);
-
-void
-winDisplayDepthChangeDialog (winPrivScreenPtr pScreenPriv);
-
-void
-winDisplayAboutDialog (winPrivScreenPtr pScreenPriv);
-
-
-/*
- * winengine.c
- */
-
-void
-winDetectSupportedEngines (void);
-
-Bool
-winSetEngine (ScreenPtr pScreen);
-
-Bool
-winGetDDProcAddresses (void);
-
-void
-winReleaseDDProcAddresses(void);
-
-
-/*
- * winerror.c
- */
-
-#ifdef DDXOSVERRORF
-void
-OSVenderVErrorF (const char *pszFormat, va_list va_args);
-#endif
-
-void
-winMessageBoxF (const char *pszError, UINT uType, ...);
-
-
-#ifdef XWIN_NATIVEGDI
-/*
- * winfillsp.c
- */
-
-void
-winFillSpansNativeGDI (DrawablePtr pDrawable,
- GCPtr pGC,
- int nSpans,
- DDXPointPtr pPoints,
- int *pWidths,
- int fSorted);
-#endif
-
-
-#ifdef XWIN_NATIVEGDI
-/*
- * winfont.c
- */
-
-Bool
-winRealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont);
-
-Bool
-winUnrealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont);
-#endif
-
-
-#ifdef XWIN_NATIVEGDI
-/*
- * wingc.c
- */
-
-Bool
-winCreateGCNativeGDI (GCPtr pGC);
-#endif
-
-
-#ifdef XWIN_NATIVEGDI
-/*
- * wingetsp.c
- */
-
-void
-winGetSpansNativeGDI (DrawablePtr pDrawable,
- int wMax,
- DDXPointPtr pPoints,
- int *pWidths,
- int nSpans,
- char *pDst);
-#endif
-
-
-/*
- * winglobals.c
- */
-
-void
-winInitializeGlobals (void);
-
-
-/*
- * winkeybd.c
- */
-
-void
-winTranslateKey (WPARAM wParam, LPARAM lParam, int *piScanCode);
-
-int
-winKeybdProc (DeviceIntPtr pDeviceInt, int iState);
-
-void
-winInitializeModeKeyStates (void);
-
-void
-winRestoreModeKeyStates (void);
-
-Bool
-winIsFakeCtrl_L (UINT message, WPARAM wParam, LPARAM lParam);
-
-void
-winKeybdReleaseKeys (void);
-
-void
-winSendKeyEvent (DWORD dwKey, Bool fDown);
-
-BOOL
-winCheckKeyPressed(WPARAM wParam, LPARAM lParam);
-
-void
-winFixShiftKeys (int iScanCode);
-
-/*
- * winkeyhook.c
- */
-
-Bool
-winInstallKeyboardHookLL (void);
-
-void
-winRemoveKeyboardHookLL (void);
-
-
-/*
- * winmisc.c
- */
-
-#ifdef XWIN_NATIVEGDI
-void
-winQueryBestSizeNativeGDI (int class, unsigned short *pWidth,
- unsigned short *pHeight, ScreenPtr pScreen);
-#endif
-
-CARD8
-winCountBits (DWORD dw);
-
-Bool
-winUpdateFBPointer (ScreenPtr pScreen, void *pbits);
-
-#ifdef XWIN_NATIVEGDI
-BOOL
-winPaintBackground (HWND hwnd, COLORREF colorref);
-#endif
-
-
-/*
- * winmouse.c
- */
-
-int
-winMouseProc (DeviceIntPtr pDeviceInt, int iState);
-
-int
-winMouseWheel (ScreenPtr pScreen, int iDeltaZ);
-
-void
-winMouseButtonsSendEvent (int iEventType, int iButton);
-
-int
-winMouseButtonsHandle (ScreenPtr pScreen,
- int iEventType, int iButton,
- WPARAM wParam);
-
-void
-winEnqueueMotion(int x, int y);
-
-#ifdef XWIN_NATIVEGDI
-/*
- * winnativegdi.c
- */
-
-HBITMAP
-winCreateDIBNativeGDI (int iWidth, int iHeight, int iDepth,
- BYTE **ppbBits, BITMAPINFO **ppbmi);
-
-Bool
-winSetEngineFunctionsNativeGDI (ScreenPtr pScreen);
-#endif
-
-
-#ifdef XWIN_PRIMARYFB
-/*
- * winpfbddd.c
- */
-
-Bool
-winSetEngineFunctionsPrimaryDD (ScreenPtr pScreen);
-#endif
-
-
-#ifdef XWIN_NATIVEGDI
-/*
- * winpixmap.c
- */
-
-PixmapPtr
-winCreatePixmapNativeGDI (ScreenPtr pScreen, int width, int height, int depth,
- unsigned class);
-
-Bool
-winDestroyPixmapNativeGDI (PixmapPtr pPixmap);
-
-Bool
-winModifyPixmapHeaderNativeGDI (PixmapPtr pPixmap,
- int iWidth, int iHeight,
- int iDepth,
- int iBitsPerPixel,
- int devKind,
- pointer pPixData);
-#endif
-
-#ifdef XWIN_NATIVEGDI
-/*
- * winpolyline.c
- */
-
-void
-winPolyLineNativeGDI (DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr ppt);
-#endif
-
-
-#ifdef XWIN_NATIVEGDI
-/*
- * winpushpxl.c
- */
-
-void
-winPushPixels (GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable,
- int dx, int dy, int xOrg, int yOrg);
-#endif
-
-
-/*
- * winscrinit.c
- */
-
-Bool
-winScreenInit (int index,
- ScreenPtr pScreen,
- int argc, char **argv);
-
-Bool
-winFinishScreenInitFB (int index,
- ScreenPtr pScreen,
- int argc, char **argv);
-
-#if defined(XWIN_NATIVEGDI)
-Bool
-winFinishScreenInitNativeGDI (int index,
- ScreenPtr pScreen,
- int argc, char **argv);
-#endif
-
-
-#ifdef XWIN_NATIVEGDI
-/*
- * winsetsp.c
- */
-
-void
-winSetSpansNativeGDI (DrawablePtr pDrawable,
- GCPtr pGC,
- char *pSrc,
- DDXPointPtr pPoints,
- int *pWidth,
- int nSpans,
- int fSorted);
-#endif
-
-
-/*
- * winshaddd.c
- */
-
-Bool
-winSetEngineFunctionsShadowDD (ScreenPtr pScreen);
-
-
-/*
- * winshadddnl.c
- */
-
-Bool
-winSetEngineFunctionsShadowDDNL (ScreenPtr pScreen);
-
-
-/*
- * winshadgdi.c
- */
-
-Bool
-winSetEngineFunctionsShadowGDI (ScreenPtr pScreen);
-
-
-/*
- * winwakeup.c
- */
-
-void
-winWakeupHandler (int nScreen,
- pointer pWakeupData,
- unsigned long ulResult,
- pointer pReadmask);
-
-
-/*
- * winwindow.c
- */
-
-#ifdef XWIN_NATIVEGDI
-Bool
-winCreateWindowNativeGDI (WindowPtr pWin);
-
-Bool
-winDestroyWindowNativeGDI (WindowPtr pWin);
-
-Bool
-winPositionWindowNativeGDI (WindowPtr pWin, int x, int y);
-
-void
-winCopyWindowNativeGDI (WindowPtr pWin,
- DDXPointRec ptOldOrg,
- RegionPtr prgnSrc);
-
-Bool
-winChangeWindowAttributesNativeGDI (WindowPtr pWin, unsigned long mask);
-
-Bool
-winUnmapWindowNativeGDI (WindowPtr pWindow);
-
-Bool
-winMapWindowNativeGDI (WindowPtr pWindow);
-#endif
-
-Bool
-winCreateWindowRootless (WindowPtr pWindow);
-
-Bool
-winDestroyWindowRootless (WindowPtr pWindow);
-
-Bool
-winPositionWindowRootless (WindowPtr pWindow, int x, int y);
-
-Bool
-winChangeWindowAttributesRootless (WindowPtr pWindow, unsigned long mask);
-
-Bool
-winUnmapWindowRootless (WindowPtr pWindow);
-
-Bool
-winMapWindowRootless (WindowPtr pWindow);
-
-void
-winSetShapeRootless (WindowPtr pWindow, int kind);
-
-
-/*
- * winmultiwindowicons.c - Used by both multi-window and Win32Rootless
- */
-
-HICON
-winXIconToHICON (WindowPtr pWin, int iconSize);
-
-void
-winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon);
-
-#ifdef XWIN_MULTIWINDOW
-/*
- * winmultiwindowshape.c
- */
-
-void
-winReshapeMultiWindow (WindowPtr pWin);
-
-void
-winSetShapeMultiWindow (WindowPtr pWindow, int kind);
-
-void
-winUpdateRgnMultiWindow (WindowPtr pWindow);
-#endif
-
-
-#ifdef XWIN_MULTIWINDOW
-/*
- * winmultiwindowwindow.c
- */
-
-Bool
-winCreateWindowMultiWindow (WindowPtr pWindow);
-
-Bool
-winDestroyWindowMultiWindow (WindowPtr pWindow);
-
-Bool
-winPositionWindowMultiWindow (WindowPtr pWindow, int x, int y);
-
-Bool
-winChangeWindowAttributesMultiWindow (WindowPtr pWindow, unsigned long mask);
-
-Bool
-winUnmapWindowMultiWindow (WindowPtr pWindow);
-
-Bool
-winMapWindowMultiWindow (WindowPtr pWindow);
-
-void
-winReparentWindowMultiWindow (WindowPtr pWin, WindowPtr pPriorParent);
-
-void
-winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib);
-
-void
-winReorderWindowsMultiWindow (void);
-
-void
-winResizeWindowMultiWindow (WindowPtr pWin, int x, int y, unsigned int w,
- unsigned int h, WindowPtr pSib);
-void
-winMoveWindowMultiWindow (WindowPtr pWin, int x, int y,
- WindowPtr pSib, VTKind kind);
-
-void
-winCopyWindowMultiWindow (WindowPtr pWin, DDXPointRec oldpt,
- RegionPtr oldRegion);
-
-XID
-winGetWindowID (WindowPtr pWin);
-
-int
-winAdjustXWindow (WindowPtr pWin, HWND hwnd);
-#endif
-
-
-#ifdef XWIN_MULTIWINDOW
-/*
- * winmultiwindowwndproc.c
- */
-
-LRESULT CALLBACK
-winTopLevelWindowProc (HWND hwnd, UINT message,
- WPARAM wParam, LPARAM lParam);
-#endif
-
-
-/*
- * wintrayicon.c
- */
-
-void
-winInitNotifyIcon (winPrivScreenPtr pScreenPriv);
-
-void
-winDeleteNotifyIcon (winPrivScreenPtr pScreenPriv);
-
-LRESULT
-winHandleIconMessage (HWND hwnd, UINT message,
- WPARAM wParam, LPARAM lParam,
- winPrivScreenPtr pScreenPriv);
-
-
-/*
- * winwndproc.c
- */
-
-LRESULT CALLBACK
-winWindowProc (HWND hWnd, UINT message,
- WPARAM wParam, LPARAM lParam);
-
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-/*
- * winwin32rootless.c
- */
-
-Bool
-winMWExtWMCreateFrame (RootlessWindowPtr pFrame, ScreenPtr pScreen,
- int newX, int newY, RegionPtr pShape);
-
-void
-winMWExtWMDestroyFrame (RootlessFrameID wid);
-
-void
-winMWExtWMMoveFrame (RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY);
-
-void
-winMWExtWMResizeFrame (RootlessFrameID wid, ScreenPtr pScreen,
- int newX, int newY, unsigned int newW, unsigned int newH,
- unsigned int gravity);
-
-void
-winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid);
-
-void
-winMWExtWMReshapeFrame (RootlessFrameID wid, RegionPtr pShape);
-
-void
-winMWExtWMUnmapFrame (RootlessFrameID wid);
-
-void
-winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow);
-
-void
-winMWExtWMStopDrawing (RootlessFrameID wid, Bool flush);
-
-void
-winMWExtWMUpdateRegion (RootlessFrameID wid, RegionPtr pDamage);
-
-void
-winMWExtWMDamageRects (RootlessFrameID wid, int count, const BoxRec *rects,
- int shift_x, int shift_y);
-
-void
-winMWExtWMRootlessSwitchWindow (RootlessWindowPtr pFrame, WindowPtr oldWin);
-
-void
-winMWExtWMCopyBytes (unsigned int width, unsigned int height,
- const void *src, unsigned int srcRowBytes,
- void *dst, unsigned int dstRowBytes);
-
-void
-winMWExtWMCopyWindow (RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
- int dx, int dy);
-#endif
-
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-/*
- * winwin32rootlesswindow.c
- */
-
-void
-winMWExtWMReorderWindows (ScreenPtr pScreen);
-
-void
-winMWExtWMMoveXWindow (WindowPtr pWin, int x, int y);
-
-void
-winMWExtWMResizeXWindow (WindowPtr pWin, int w, int h);
-
-void
-winMWExtWMMoveResizeXWindow (WindowPtr pWin, int x, int y, int w, int h);
-
-void
-winMWExtWMUpdateIcon (Window id);
-
-void
-winMWExtWMUpdateWindowDecoration (win32RootlessWindowPtr pRLWinPriv,
- winScreenInfoPtr pScreenInfo);
-
-wBOOL CALLBACK
-winMWExtWMDecorateWindow (HWND hwnd, LPARAM lParam);
-
-Bool
-winIsInternalWMRunning (winScreenInfoPtr pScreenInfo);
-
-void
-winMWExtWMRestackWindows (ScreenPtr pScreen);
-#endif
-
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-/*
- * winwin32rootlesswndproc.c
- */
-
-LRESULT CALLBACK
-winMWExtWMWindowProc (HWND hwnd, UINT message,
- WPARAM wParam, LPARAM lParam);
-#endif
-
-
-/*
- * winwindowswm.c
- */
-
-void
-winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg,
- Window window, int x, int y, int w, int h);
-
-void
-winWindowsWMExtensionInit (void);
-
-/*
- * wincursor.c
- */
-
-Bool
-winInitCursor (ScreenPtr pScreen);
-
-/*
- * winprocarg.c
- */
-void
-winInitializeScreens(int maxscreens);
-
-/*
- * winrandr.c
- */
-Bool
-winRandRInit (ScreenPtr pScreen);
-void
-winDoRandRScreenSetSize (ScreenPtr pScreen,
- CARD16 width,
- CARD16 height,
- CARD32 mmWidth,
- CARD32 mmHeight);
-
-/*
- * END DDX and DIX Function Prototypes
- */
-
-#endif /* _WIN_H_ */
-
+/*
+ *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
+ *
+ *Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ *"Software"), to deal in the Software without restriction, including
+ *without limitation the rights to use, copy, modify, merge, publish,
+ *distribute, sublicense, and/or sell copies of the Software, and to
+ *permit persons to whom the Software is furnished to do so, subject to
+ *the following conditions:
+ *
+ *The above copyright notice and this permission notice shall be
+ *included in all copies or substantial portions of the Software.
+ *
+ *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
+ *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *Except as contained in this notice, the name of the XFree86 Project
+ *shall not be used in advertising or otherwise to promote the sale, use
+ *or other dealings in this Software without prior written authorization
+ *from the XFree86 Project.
+ *
+ * Authors: Dakshinamurthy Karra
+ * Suhaib M Siddiqi
+ * Peter Busch
+ * Harold L Hunt II
+ * Kensuke Matsuzaki
+ */
+
+#ifndef _WIN_H_
+#define _WIN_H_
+
+#ifndef NO
+#define NO 0
+#endif
+#ifndef YES
+#define YES 1
+#endif
+
+/* WM_XBUTTON Messages. They should go into w32api. */
+#ifndef WM_XBUTTONDOWN
+# define WM_XBUTTONDOWN 523
+#endif
+#ifndef WM_XBUTTONUP
+# define WM_XBUTTONUP 524
+#endif
+#ifndef WM_XBUTTONDBLCLK
+# define WM_XBUTTONDBLCLK 525
+#endif
+
+
+#define WIN_DEFAULT_BPP 0
+#define WIN_DEFAULT_WHITEPIXEL 255
+#define WIN_DEFAULT_BLACKPIXEL 0
+#define WIN_DEFAULT_LINEBIAS 0
+#define WIN_DEFAULT_E3B_TIME 50 /* milliseconds */
+#define WIN_DEFAULT_DPI 75
+#define WIN_DEFAULT_REFRESH 0
+#define WIN_DEFAULT_WIN_KILL TRUE
+#define WIN_DEFAULT_UNIX_KILL FALSE
+#define WIN_DEFAULT_CLIP_UPDATES_NBOXES 0
+#ifdef XWIN_EMULATEPSEUDO
+#define WIN_DEFAULT_EMULATE_PSEUDO FALSE
+#endif
+#define WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH FALSE
+
+/*
+ * Windows only supports 256 color palettes
+ */
+#define WIN_NUM_PALETTE_ENTRIES 256
+
+/*
+ * Number of times to call Restore in an attempt to restore the primary surface
+ */
+#define WIN_REGAIN_SURFACE_RETRIES 1
+
+/*
+ * Build a supported display depths mask by shifting one to the left
+ * by the number of bits in the supported depth.
+ */
+#define WIN_SUPPORTED_BPPS ( (1 << (32 - 1)) | (1 << (24 - 1)) \
+ | (1 << (16 - 1)) | (1 << (15 - 1)) \
+ | (1 << ( 8 - 1)))
+#define WIN_CHECK_DEPTH YES
+
+/*
+ * Timer IDs for WM_TIMER
+ */
+#define WIN_E3B_TIMER_ID 1
+#define WIN_POLLING_MOUSE_TIMER_ID 2
+
+#define MOUSE_POLLING_INTERVAL 50
+
+#define WIN_E3B_OFF -1
+#define WIN_FD_INVALID -1
+
+#define WIN_SERVER_NONE 0x0L /* 0 */
+#define WIN_SERVER_SHADOW_GDI 0x1L /* 1 */
+#define WIN_SERVER_SHADOW_DD 0x2L /* 2 */
+#define WIN_SERVER_SHADOW_DDNL 0x4L /* 4 */
+#ifdef XWIN_PRIMARYFB
+#define WIN_SERVER_PRIMARY_DD 0x8L /* 8 */
+#endif
+#ifdef XWIN_NATIVEGDI
+# define WIN_SERVER_NATIVE_GDI 0x10L /* 16 */
+#endif
+
+#define AltMapIndex Mod1MapIndex
+#define NumLockMapIndex Mod2MapIndex
+#define AltLangMapIndex Mod3MapIndex
+#define KanaMapIndex Mod4MapIndex
+#define ScrollLockMapIndex Mod5MapIndex
+
+#define WIN_MOD_LALT 0x00000001
+#define WIN_MOD_RALT 0x00000002
+#define WIN_MOD_LCONTROL 0x00000004
+#define WIN_MOD_RCONTROL 0x00000008
+
+#define WIN_24BPP_MASK_RED 0x00FF0000
+#define WIN_24BPP_MASK_GREEN 0x0000FF00
+#define WIN_24BPP_MASK_BLUE 0x000000FF
+
+#define WIN_MAX_KEYS_PER_KEY 4
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+
+#include <errno.h>
+#if defined(XWIN_MULTIWINDOWEXTWM) || defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
+#define HANDLE void *
+#ifdef _MSC_VER
+typedef int pid_t;
+#endif
+#include <pthread.h>
+#undef HANDLE
+#endif
+
+#ifdef HAS_MMAP
+#include <sys/mman.h>
+#ifndef MAP_FILE
+#define MAP_FILE 0
+#endif /* MAP_FILE */
+#endif /* HAS_MMAP */
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/Xos.h>
+#include <X11/Xprotostr.h>
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "pixmap.h"
+#include "region.h"
+#include "gcstruct.h"
+#include "colormap.h"
+#include "colormapst.h"
+#include "miscstruct.h"
+#include "servermd.h"
+#include "windowstr.h"
+#include "mi.h"
+#include "micmap.h"
+#include "mifillarc.h"
+#include "mifpoly.h"
+#include "mibstore.h"
+#include "input.h"
+#include "mipointer.h"
+#include "X11/keysym.h"
+#include "mibstore.h"
+#include "micoord.h"
+#include "dix.h"
+#include "miline.h"
+#include "shadow.h"
+#include "fb.h"
+#include "rootless.h"
+
+#include "mipict.h"
+#include "picturestr.h"
+
+#ifdef RANDR
+#include "randrstr.h"
+#endif
+
+/*
+ * Windows headers
+ */
+#include "winms.h"
+#include "winresource.h"
+
+
+/*
+ * Define Windows constants
+ */
+
+#define WM_TRAYICON (WM_USER + 1000)
+#define WM_INIT_SYS_MENU (WM_USER + 1001)
+#define WM_GIVEUP (WM_USER + 1002)
+
+
+/* Local includes */
+#include "winwindow.h"
+#include "winmsg.h"
+
+#define PROFILEPOINT(point,thresh)\
+{\
+static unsigned int PROFPT##point = 0;\
+if (++PROFPT##point % thresh == 0)\
+ErrorF (#point ": PROFILEPOINT hit %u times\n", PROFPT##point);\
+}
+
+
+/* We use xor this macro for detecting toggle key state changes */
+#define WIN_XOR(a,b) ((!(a) && (b)) || ((a) && !(b)))
+
+#define DEFINE_ATOM_HELPER(func,atom_name) \
+static Atom func (void) { \
+ static int generation; \
+ static Atom atom; \
+ if (generation != serverGeneration) { \
+ generation = serverGeneration; \
+ atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \
+ } \
+ return atom; \
+}
+
+/*
+ * Typedefs for engine dependent function pointers
+ */
+
+typedef Bool (*winAllocateFBProcPtr)(ScreenPtr);
+
+typedef void (*winFreeFBProcPtr)(ScreenPtr);
+
+typedef void (*winShadowUpdateProcPtr)(ScreenPtr, shadowBufPtr);
+
+typedef Bool (*winInitScreenProcPtr)(ScreenPtr);
+
+typedef Bool (*winCloseScreenProcPtr)(int, ScreenPtr);
+
+typedef Bool (*winInitVisualsProcPtr)(ScreenPtr);
+
+typedef Bool (*winAdjustVideoModeProcPtr)(ScreenPtr);
+
+typedef Bool (*winCreateBoundingWindowProcPtr)(ScreenPtr);
+
+typedef Bool (*winFinishScreenInitProcPtr)(int, ScreenPtr, int, char **);
+
+typedef Bool (*winBltExposedRegionsProcPtr)(ScreenPtr);
+
+typedef Bool (*winActivateAppProcPtr)(ScreenPtr);
+
+typedef Bool (*winRedrawScreenProcPtr)(ScreenPtr pScreen);
+
+typedef Bool (*winRealizeInstalledPaletteProcPtr)(ScreenPtr pScreen);
+
+typedef Bool (*winInstallColormapProcPtr)(ColormapPtr pColormap);
+
+typedef Bool (*winStoreColorsProcPtr)(ColormapPtr pmap,
+ int ndef, xColorItem *pdefs);
+
+typedef Bool (*winCreateColormapProcPtr)(ColormapPtr pColormap);
+
+typedef Bool (*winDestroyColormapProcPtr)(ColormapPtr pColormap);
+
+typedef Bool (*winHotKeyAltTabProcPtr)(ScreenPtr);
+
+typedef Bool (*winCreatePrimarySurfaceProcPtr)(ScreenPtr);
+
+typedef Bool (*winReleasePrimarySurfaceProcPtr)(ScreenPtr);
+
+typedef Bool (*winFinishCreateWindowsWindowProcPtr)(WindowPtr pWin);
+
+typedef Bool (*winCreateScreenResourcesProc)(ScreenPtr);
+
+#ifdef XWIN_NATIVEGDI
+/* Typedefs for native GDI wrappers */
+typedef Bool (*RealizeFontPtr) (ScreenPtr pScreen, FontPtr pFont);
+typedef Bool (*UnrealizeFontPtr)(ScreenPtr pScreen, FontPtr pFont);
+#endif
+
+
+/*
+ * GC (graphics context) privates
+ */
+
+typedef struct
+{
+ HDC hdc;
+ HDC hdcMem;
+} winPrivGCRec, *winPrivGCPtr;
+
+
+/*
+ * Pixmap privates
+ */
+
+typedef struct
+{
+ HDC hdcSelected;
+ HBITMAP hBitmap;
+ BYTE *pbBits;
+ DWORD dwScanlineBytes;
+ BITMAPINFOHEADER *pbmih;
+} winPrivPixmapRec, *winPrivPixmapPtr;
+
+
+/*
+ * Colormap privates
+ */
+
+typedef struct
+{
+ HPALETTE hPalette;
+ LPDIRECTDRAWPALETTE lpDDPalette;
+ RGBQUAD rgbColors[WIN_NUM_PALETTE_ENTRIES];
+ PALETTEENTRY peColors[WIN_NUM_PALETTE_ENTRIES];
+} winPrivCmapRec, *winPrivCmapPtr;
+
+/*
+ * Windows Cursor handling.
+ */
+
+typedef struct {
+ /* from GetSystemMetrics */
+ int sm_cx;
+ int sm_cy;
+
+ BOOL visible;
+ HCURSOR handle;
+ QueryBestSizeProcPtr QueryBestSize;
+ miPointerSpriteFuncPtr spriteFuncs;
+} winCursorRec;
+
+/*
+ * Resize modes
+ */
+typedef enum {
+ notAllowed,
+ resizeWithScrollbars,
+ resizeWithRandr
+} winResizeMode;
+
+/*
+ * Screen information structure that we need before privates are available
+ * in the server startup sequence.
+ */
+
+typedef struct
+{
+ ScreenPtr pScreen;
+
+ /* Did the user specify a height and width? */
+ Bool fUserGaveHeightAndWidth;
+
+ DWORD dwScreen;
+
+ int iMonitor;
+ DWORD dwUserWidth;
+ DWORD dwUserHeight;
+ DWORD dwWidth;
+ DWORD dwHeight;
+ DWORD dwPaddedWidth;
+
+ /* Did the user specify a screen position? */
+ Bool fUserGavePosition;
+ DWORD dwInitialX;
+ DWORD dwInitialY;
+
+ /*
+ * dwStride is the number of whole pixels that occupy a scanline,
+ * including those pixels that are not displayed. This is basically
+ * a rounding up of the width.
+ */
+ DWORD dwStride;
+
+ /* Offset of the screen in the window when using scrollbars */
+ DWORD dwXOffset;
+ DWORD dwYOffset;
+
+ DWORD dwBPP;
+ DWORD dwDepth;
+ DWORD dwRefreshRate;
+ char *pfb;
+ DWORD dwEngine;
+ DWORD dwEnginePreferred;
+ DWORD dwClipUpdatesNBoxes;
+#ifdef XWIN_EMULATEPSEUDO
+ Bool fEmulatePseudo;
+#endif
+ Bool fFullScreen;
+ Bool fDecoration;
+#ifdef XWIN_MULTIWINDOWEXTWM
+ Bool fMWExtWM;
+ Bool fAnotherWMRunning;
+#endif
+#ifdef XWIN_MULTIWINDOWINTWM
+ Bool fInternalWM;
+#endif
+ Bool fRootless;
+#ifdef XWIN_MULTIWINDOW
+ Bool fMultiWindow;
+#endif
+#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
+ Bool fMultiMonitorOverride;
+#endif
+ Bool fMultipleMonitors;
+ Bool fLessPointer;
+ winResizeMode iResizeMode;
+ Bool fNoTrayIcon;
+ int iE3BTimeout;
+ /* Windows (Alt+F4) and Unix (Ctrl+Alt+Backspace) Killkey */
+ Bool fUseWinKillKey;
+ Bool fUseUnixKillKey;
+ Bool fIgnoreInput;
+
+ /* Did the user explicitly set this screen? */
+ Bool fExplicitScreen;
+} winScreenInfo, *winScreenInfoPtr;
+
+
+/*
+ * Screen privates
+ */
+
+typedef struct _winPrivScreenRec
+{
+ winScreenInfoPtr pScreenInfo;
+
+ Bool fEnabled;
+ Bool fClosed;
+ Bool fActive;
+ Bool fBadDepth;
+
+ int iDeltaZ;
+
+ int iConnectedClients;
+
+ CloseScreenProcPtr CloseScreen;
+
+ DWORD dwRedMask;
+ DWORD dwGreenMask;
+ DWORD dwBlueMask;
+ DWORD dwBitsPerRGB;
+
+ DWORD dwModeKeyStates;
+
+ /* Handle to icons that must be freed */
+ HICON hiconNotifyIcon;
+
+ /* Palette management */
+ ColormapPtr pcmapInstalled;
+
+ /* Pointer to the root visual so we only have to look it up once */
+ VisualPtr pRootVisual;
+
+ /* 3 button emulation variables */
+ int iE3BCachedPress;
+ Bool fE3BFakeButton2Sent;
+
+ /* Privates used by shadow fb GDI server */
+ HBITMAP hbmpShadow;
+ HDC hdcScreen;
+ HDC hdcShadow;
+ HWND hwndScreen;
+ BITMAPINFOHEADER *pbmih;
+
+ /* Privates used by shadow fb and primary fb DirectDraw servers */
+ LPDIRECTDRAW pdd;
+ LPDIRECTDRAWSURFACE pddsPrimary;
+ LPDIRECTDRAW2 pdd2;
+
+ /* Privates used by shadow fb DirectDraw server */
+ LPDIRECTDRAWSURFACE pddsShadow;
+ LPDDSURFACEDESC pddsdShadow;
+
+#ifdef XWIN_PRIMARYFB
+ /* Privates used by primary fb DirectDraw server */
+ LPDIRECTDRAWSURFACE pddsOffscreen;
+ LPDDSURFACEDESC pddsdOffscreen;
+ LPDDSURFACEDESC pddsdPrimary;
+#endif
+
+ /* Privates used by shadow fb DirectDraw Nonlocking server */
+ LPDIRECTDRAW4 pdd4;
+ LPDIRECTDRAWSURFACE4 pddsShadow4;
+ LPDIRECTDRAWSURFACE4 pddsPrimary4;
+ BOOL fRetryCreateSurface;
+
+ /* Privates used by both shadow fb DirectDraw servers */
+ LPDIRECTDRAWCLIPPER pddcPrimary;
+
+#ifdef XWIN_MULTIWINDOWEXTWM
+ /* Privates used by multi-window external window manager */
+ RootlessFrameID widTop;
+ Bool fRestacking;
+#endif
+
+#ifdef XWIN_MULTIWINDOW
+ /* Privates used by multi-window */
+ pthread_t ptWMProc;
+ pthread_t ptXMsgProc;
+ void *pWMInfo;
+#endif
+
+#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
+ /* Privates used by both multi-window and rootless */
+ Bool fRootWindowShown;
+#endif
+
+#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
+ /* Privates used for any module running in a seperate thread */
+ pthread_mutex_t pmServerStarted;
+ Bool fServerStarted;
+#endif
+
+ /* Engine specific functions */
+ winAllocateFBProcPtr pwinAllocateFB;
+ winFreeFBProcPtr pwinFreeFB;
+ winShadowUpdateProcPtr pwinShadowUpdate;
+ winInitScreenProcPtr pwinInitScreen;
+ winCloseScreenProcPtr pwinCloseScreen;
+ winInitVisualsProcPtr pwinInitVisuals;
+ winAdjustVideoModeProcPtr pwinAdjustVideoMode;
+ winCreateBoundingWindowProcPtr pwinCreateBoundingWindow;
+ winFinishScreenInitProcPtr pwinFinishScreenInit;
+ winBltExposedRegionsProcPtr pwinBltExposedRegions;
+ winActivateAppProcPtr pwinActivateApp;
+ winRedrawScreenProcPtr pwinRedrawScreen;
+ winRealizeInstalledPaletteProcPtr pwinRealizeInstalledPalette;
+ winInstallColormapProcPtr pwinInstallColormap;
+ winStoreColorsProcPtr pwinStoreColors;
+ winCreateColormapProcPtr pwinCreateColormap;
+ winDestroyColormapProcPtr pwinDestroyColormap;
+ winHotKeyAltTabProcPtr pwinHotKeyAltTab;
+ winCreatePrimarySurfaceProcPtr pwinCreatePrimarySurface;
+ winReleasePrimarySurfaceProcPtr pwinReleasePrimarySurface;
+
+ winCreateScreenResourcesProc pwinCreateScreenResources;
+
+#ifdef XWIN_MULTIWINDOW
+ /* Window Procedures for MultiWindow mode */
+ winFinishCreateWindowsWindowProcPtr pwinFinishCreateWindowsWindow;
+#endif
+
+ /* Window Procedures for Rootless mode */
+ CreateWindowProcPtr CreateWindow;
+ DestroyWindowProcPtr DestroyWindow;
+ PositionWindowProcPtr PositionWindow;
+ ChangeWindowAttributesProcPtr ChangeWindowAttributes;
+ RealizeWindowProcPtr RealizeWindow;
+ UnrealizeWindowProcPtr UnrealizeWindow;
+ ValidateTreeProcPtr ValidateTree;
+ PostValidateTreeProcPtr PostValidateTree;
+ WindowExposuresProcPtr WindowExposures;
+ CopyWindowProcPtr CopyWindow;
+ ClearToBackgroundProcPtr ClearToBackground;
+ ClipNotifyProcPtr ClipNotify;
+ RestackWindowProcPtr RestackWindow;
+ ReparentWindowProcPtr ReparentWindow;
+ ResizeWindowProcPtr ResizeWindow;
+ MoveWindowProcPtr MoveWindow;
+ SetShapeProcPtr SetShape;
+
+ winCursorRec cursor;
+
+#ifdef XWIN_NATIVEGDI
+ RealizeFontPtr RealizeFont;
+ UnrealizeFontPtr UnrealizeFont;
+#endif
+
+} winPrivScreenRec;
+
+
+#ifdef XWIN_MULTIWINDOWEXTWM
+typedef struct {
+ RootlessWindowPtr pFrame;
+ HWND hWnd;
+ int dwWidthBytes;
+ BITMAPINFOHEADER *pbmihShadow;
+ HBITMAP hbmpShadow;
+ HDC hdcShadow;
+ HDC hdcScreen;
+ BOOL fResized;
+ BOOL fRestackingNow;
+ BOOL fClose;
+ BOOL fMovingOrSizing;
+ BOOL fDestroyed;//for debug
+ char *pfb;
+} win32RootlessWindowRec, *win32RootlessWindowPtr;
+#endif
+
+
+typedef struct {
+ pointer value;
+ XID id;
+} WindowIDPairRec, *WindowIDPairPtr;
+
+
+/*
+ * Extern declares for general global variables
+ */
+
+#include "winglobals.h"
+
+extern winScreenInfo * g_ScreenInfo;
+extern miPointerScreenFuncRec g_winPointerCursorFuncs;
+extern DWORD g_dwEvents;
+#ifdef HAS_DEVWINDOWS
+extern int g_fdMessageQueue;
+#endif
+extern DevPrivateKeyRec g_iScreenPrivateKeyRec;
+#define g_iScreenPrivateKey (&g_iScreenPrivateKeyRec)
+extern DevPrivateKeyRec g_iCmapPrivateKeyRec;
+#define g_iCmapPrivateKey (&g_iCmapPrivateKeyRec)
+extern DevPrivateKeyRec g_iGCPrivateKeyRec;
+#define g_iGCPrivateKey (&g_iGCPrivateKeyRec)
+extern DevPrivateKeyRec g_iPixmapPrivateKeyRec;
+#define g_iPixmapPrivateKey (&g_iPixmapPrivateKeyRec)
+extern DevPrivateKeyRec g_iWindowPrivateKeyRec;
+#define g_iWindowPrivateKey (&g_iWindowPrivateKeyRec)
+
+extern unsigned long g_ulServerGeneration;
+extern DWORD g_dwEnginesSupported;
+extern HINSTANCE g_hInstance;
+extern int g_copyROP[];
+extern int g_patternROP[];
+extern const char * g_pszQueryHost;
+extern DeviceIntPtr g_pwinPointer;
+extern DeviceIntPtr g_pwinKeyboard;
+
+/*
+ * Extern declares for dynamically loaded library function pointers
+ */
+
+extern FARPROC g_fpDirectDrawCreate;
+extern FARPROC g_fpDirectDrawCreateClipper;
+extern FARPROC g_fpTrackMouseEvent;
+
+
+/*
+ * Screen privates macros
+ */
+
+#define winGetScreenPriv(pScreen) ((winPrivScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey))
+
+#define winSetScreenPriv(pScreen,v) \
+ dixSetPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey, v)
+
+#define winScreenPriv(pScreen) \
+ winPrivScreenPtr pScreenPriv = winGetScreenPriv(pScreen)
+
+
+/*
+ * Colormap privates macros
+ */
+
+#define winGetCmapPriv(pCmap) ((winPrivCmapPtr) \
+ dixLookupPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey))
+
+#define winSetCmapPriv(pCmap,v) \
+ dixSetPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey, v)
+
+#define winCmapPriv(pCmap) \
+ winPrivCmapPtr pCmapPriv = winGetCmapPriv(pCmap)
+
+
+/*
+ * GC privates macros
+ */
+
+#define winGetGCPriv(pGC) ((winPrivGCPtr) \
+ dixLookupPrivate(&(pGC)->devPrivates, g_iGCPrivateKey))
+
+#define winSetGCPriv(pGC,v) \
+ dixSetPrivate(&(pGC)->devPrivates, g_iGCPrivateKey, v)
+
+#define winGCPriv(pGC) \
+ winPrivGCPtr pGCPriv = winGetGCPriv(pGC)
+
+
+/*
+ * Pixmap privates macros
+ */
+
+#define winGetPixmapPriv(pPixmap) ((winPrivPixmapPtr) \
+ dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey))
+
+#define winSetPixmapPriv(pPixmap,v) \
+ dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey, v)
+
+#define winPixmapPriv(pPixmap) \
+ winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap)
+
+
+/*
+ * Window privates macros
+ */
+
+#define winGetWindowPriv(pWin) ((winPrivWinPtr) \
+ dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey))
+
+#define winSetWindowPriv(pWin,v) \
+ dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey, v)
+
+#define winWindowPriv(pWin) \
+ winPrivWinPtr pWinPriv = winGetWindowPriv(pWin)
+
+/*
+ * wrapper macros
+ */
+#define _WIN_WRAP(priv, real, mem, func) {\
+ priv->mem = real->mem; \
+ real->mem = func; \
+}
+
+#define _WIN_UNWRAP(priv, real, mem) {\
+ real->mem = priv->mem; \
+}
+
+#define WIN_WRAP(mem, func) _WIN_WRAP(pScreenPriv, pScreen, mem, func)
+
+#define WIN_UNWRAP(mem) _WIN_UNWRAP(pScreenPriv, pScreen, mem)
+
+/*
+ * BEGIN DDX and DIX Function Prototypes
+ */
+
+
+/*
+ * winallpriv.c
+ */
+
+Bool
+winAllocatePrivates (ScreenPtr pScreen);
+
+Bool
+winInitCmapPrivates (ColormapPtr pCmap, int index);
+
+Bool
+winAllocateCmapPrivates (ColormapPtr pCmap);
+
+
+/*
+ * winauth.c
+ */
+
+#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
+Bool
+winGenerateAuthorization (void);
+void winSetAuthorization(void);
+#endif
+
+
+/*
+ * winblock.c
+ */
+
+void
+winBlockHandler (int nScreen,
+ pointer pBlockData,
+ pointer pTimeout,
+ pointer pReadMask);
+
+
+#ifdef XWIN_NATIVEGDI
+/*
+ * winclip.c
+ */
+
+RegionPtr
+winPixmapToRegionNativeGDI (PixmapPtr pPix);
+#endif
+
+
+#ifdef XWIN_CLIPBOARD
+/*
+ * winclipboardinit.c
+ */
+
+Bool
+winInitClipboard (void);
+
+void
+winFixClipboardChain (int Removed);
+#endif
+
+
+/*
+ * wincmap.c
+ */
+
+void
+winSetColormapFunctions (ScreenPtr pScreen);
+
+Bool
+winCreateDefColormap (ScreenPtr pScreen);
+
+
+/*
+ * wincreatewnd.c
+ */
+
+Bool
+winCreateBoundingWindowFullScreen (ScreenPtr pScreen);
+
+Bool
+winCreateBoundingWindowWindowed (ScreenPtr pScreen);
+
+
+/*
+ * windialogs.c
+ */
+
+int
+GetLiveClients (winPrivScreenPtr pScreenPriv);
+
+void
+winDisplayExitDialog (winPrivScreenPtr pScreenPriv);
+
+void
+winDisplayDepthChangeDialog (winPrivScreenPtr pScreenPriv);
+
+void
+winDisplayAboutDialog (winPrivScreenPtr pScreenPriv);
+
+
+/*
+ * winengine.c
+ */
+
+void
+winDetectSupportedEngines (void);
+
+Bool
+winSetEngine (ScreenPtr pScreen);
+
+Bool
+winGetDDProcAddresses (void);
+
+void
+winReleaseDDProcAddresses(void);
+
+
+/*
+ * winerror.c
+ */
+
+#ifdef DDXOSVERRORF
+void
+OSVenderVErrorF (const char *pszFormat, va_list va_args);
+#endif
+
+void
+winMessageBoxF (const char *pszError, UINT uType, ...);
+
+
+#ifdef XWIN_NATIVEGDI
+/*
+ * winfillsp.c
+ */
+
+void
+winFillSpansNativeGDI (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nSpans,
+ DDXPointPtr pPoints,
+ int *pWidths,
+ int fSorted);
+#endif
+
+
+#ifdef XWIN_NATIVEGDI
+/*
+ * winfont.c
+ */
+
+Bool
+winRealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont);
+
+Bool
+winUnrealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont);
+#endif
+
+
+#ifdef XWIN_NATIVEGDI
+/*
+ * wingc.c
+ */
+
+Bool
+winCreateGCNativeGDI (GCPtr pGC);
+#endif
+
+
+#ifdef XWIN_NATIVEGDI
+/*
+ * wingetsp.c
+ */
+
+void
+winGetSpansNativeGDI (DrawablePtr pDrawable,
+ int wMax,
+ DDXPointPtr pPoints,
+ int *pWidths,
+ int nSpans,
+ char *pDst);
+#endif
+
+
+/*
+ * winglobals.c
+ */
+
+void
+winInitializeGlobals (void);
+
+
+/*
+ * winkeybd.c
+ */
+
+void
+winTranslateKey (WPARAM wParam, LPARAM lParam, int *piScanCode);
+
+int
+winKeybdProc (DeviceIntPtr pDeviceInt, int iState);
+
+void
+winInitializeModeKeyStates (void);
+
+void
+winRestoreModeKeyStates (void);
+
+Bool
+winIsFakeCtrl_L (UINT message, WPARAM wParam, LPARAM lParam);
+
+void
+winKeybdReleaseKeys (void);
+
+void
+winSendKeyEvent (DWORD dwKey, Bool fDown);
+
+BOOL
+winCheckKeyPressed(WPARAM wParam, LPARAM lParam);
+
+void
+winFixShiftKeys (int iScanCode);
+
+/*
+ * winkeyhook.c
+ */
+
+Bool
+winInstallKeyboardHookLL (void);
+
+void
+winRemoveKeyboardHookLL (void);
+
+
+/*
+ * winmisc.c
+ */
+
+#ifdef XWIN_NATIVEGDI
+void
+winQueryBestSizeNativeGDI (int class, unsigned short *pWidth,
+ unsigned short *pHeight, ScreenPtr pScreen);
+#endif
+
+CARD8
+winCountBits (DWORD dw);
+
+Bool
+winUpdateFBPointer (ScreenPtr pScreen, void *pbits);
+
+#ifdef XWIN_NATIVEGDI
+BOOL
+winPaintBackground (HWND hwnd, COLORREF colorref);
+#endif
+
+
+/*
+ * winmouse.c
+ */
+
+int
+winMouseProc (DeviceIntPtr pDeviceInt, int iState);
+
+int
+winMouseWheel (ScreenPtr pScreen, int iDeltaZ);
+
+void
+winMouseButtonsSendEvent (int iEventType, int iButton);
+
+int
+winMouseButtonsHandle (ScreenPtr pScreen,
+ int iEventType, int iButton,
+ WPARAM wParam);
+
+void
+winEnqueueMotion(int x, int y);
+
+#ifdef XWIN_NATIVEGDI
+/*
+ * winnativegdi.c
+ */
+
+HBITMAP
+winCreateDIBNativeGDI (int iWidth, int iHeight, int iDepth,
+ BYTE **ppbBits, BITMAPINFO **ppbmi);
+
+Bool
+winSetEngineFunctionsNativeGDI (ScreenPtr pScreen);
+#endif
+
+
+#ifdef XWIN_PRIMARYFB
+/*
+ * winpfbddd.c
+ */
+
+Bool
+winSetEngineFunctionsPrimaryDD (ScreenPtr pScreen);
+#endif
+
+
+#ifdef XWIN_NATIVEGDI
+/*
+ * winpixmap.c
+ */
+
+PixmapPtr
+winCreatePixmapNativeGDI (ScreenPtr pScreen, int width, int height, int depth,
+ unsigned class);
+
+Bool
+winDestroyPixmapNativeGDI (PixmapPtr pPixmap);
+
+Bool
+winModifyPixmapHeaderNativeGDI (PixmapPtr pPixmap,
+ int iWidth, int iHeight,
+ int iDepth,
+ int iBitsPerPixel,
+ int devKind,
+ pointer pPixData);
+#endif
+
+#ifdef XWIN_NATIVEGDI
+/*
+ * winpolyline.c
+ */
+
+void
+winPolyLineNativeGDI (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr ppt);
+#endif
+
+
+#ifdef XWIN_NATIVEGDI
+/*
+ * winpushpxl.c
+ */
+
+void
+winPushPixels (GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable,
+ int dx, int dy, int xOrg, int yOrg);
+#endif
+
+
+/*
+ * winscrinit.c
+ */
+
+Bool
+winScreenInit (int index,
+ ScreenPtr pScreen,
+ int argc, char **argv);
+
+Bool
+winFinishScreenInitFB (int index,
+ ScreenPtr pScreen,
+ int argc, char **argv);
+
+#if defined(XWIN_NATIVEGDI)
+Bool
+winFinishScreenInitNativeGDI (int index,
+ ScreenPtr pScreen,
+ int argc, char **argv);
+#endif
+
+
+#ifdef XWIN_NATIVEGDI
+/*
+ * winsetsp.c
+ */
+
+void
+winSetSpansNativeGDI (DrawablePtr pDrawable,
+ GCPtr pGC,
+ char *pSrc,
+ DDXPointPtr pPoints,
+ int *pWidth,
+ int nSpans,
+ int fSorted);
+#endif
+
+
+/*
+ * winshaddd.c
+ */
+
+Bool
+winSetEngineFunctionsShadowDD (ScreenPtr pScreen);
+
+
+/*
+ * winshadddnl.c
+ */
+
+Bool
+winSetEngineFunctionsShadowDDNL (ScreenPtr pScreen);
+
+
+/*
+ * winshadgdi.c
+ */
+
+Bool
+winSetEngineFunctionsShadowGDI (ScreenPtr pScreen);
+
+
+/*
+ * winwakeup.c
+ */
+
+void
+winWakeupHandler (int nScreen,
+ pointer pWakeupData,
+ unsigned long ulResult,
+ pointer pReadmask);
+
+
+/*
+ * winwindow.c
+ */
+
+#ifdef XWIN_NATIVEGDI
+Bool
+winCreateWindowNativeGDI (WindowPtr pWin);
+
+Bool
+winDestroyWindowNativeGDI (WindowPtr pWin);
+
+Bool
+winPositionWindowNativeGDI (WindowPtr pWin, int x, int y);
+
+void
+winCopyWindowNativeGDI (WindowPtr pWin,
+ DDXPointRec ptOldOrg,
+ RegionPtr prgnSrc);
+
+Bool
+winChangeWindowAttributesNativeGDI (WindowPtr pWin, unsigned long mask);
+
+Bool
+winUnmapWindowNativeGDI (WindowPtr pWindow);
+
+Bool
+winMapWindowNativeGDI (WindowPtr pWindow);
+#endif
+
+Bool
+winCreateWindowRootless (WindowPtr pWindow);
+
+Bool
+winDestroyWindowRootless (WindowPtr pWindow);
+
+Bool
+winPositionWindowRootless (WindowPtr pWindow, int x, int y);
+
+Bool
+winChangeWindowAttributesRootless (WindowPtr pWindow, unsigned long mask);
+
+Bool
+winUnmapWindowRootless (WindowPtr pWindow);
+
+Bool
+winMapWindowRootless (WindowPtr pWindow);
+
+void
+winSetShapeRootless (WindowPtr pWindow, int kind);
+
+
+/*
+ * winmultiwindowicons.c - Used by both multi-window and Win32Rootless
+ */
+
+HICON
+winXIconToHICON (WindowPtr pWin, int iconSize);
+
+void
+winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon);
+
+#ifdef XWIN_MULTIWINDOW
+/*
+ * winmultiwindowshape.c
+ */
+
+void
+winReshapeMultiWindow (WindowPtr pWin);
+
+void
+winSetShapeMultiWindow (WindowPtr pWindow, int kind);
+
+void
+winUpdateRgnMultiWindow (WindowPtr pWindow);
+#endif
+
+
+#ifdef XWIN_MULTIWINDOW
+/*
+ * winmultiwindowwindow.c
+ */
+
+Bool
+winCreateWindowMultiWindow (WindowPtr pWindow);
+
+Bool
+winDestroyWindowMultiWindow (WindowPtr pWindow);
+
+Bool
+winPositionWindowMultiWindow (WindowPtr pWindow, int x, int y);
+
+Bool
+winChangeWindowAttributesMultiWindow (WindowPtr pWindow, unsigned long mask);
+
+Bool
+winUnmapWindowMultiWindow (WindowPtr pWindow);
+
+Bool
+winMapWindowMultiWindow (WindowPtr pWindow);
+
+void
+winReparentWindowMultiWindow (WindowPtr pWin, WindowPtr pPriorParent);
+
+void
+winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib);
+
+void
+winReorderWindowsMultiWindow (void);
+
+void
+winResizeWindowMultiWindow (WindowPtr pWin, int x, int y, unsigned int w,
+ unsigned int h, WindowPtr pSib);
+void
+winMoveWindowMultiWindow (WindowPtr pWin, int x, int y,
+ WindowPtr pSib, VTKind kind);
+
+void
+winCopyWindowMultiWindow (WindowPtr pWin, DDXPointRec oldpt,
+ RegionPtr oldRegion);
+
+XID
+winGetWindowID (WindowPtr pWin);
+
+int
+winAdjustXWindow (WindowPtr pWin, HWND hwnd);
+#endif
+
+
+#ifdef XWIN_MULTIWINDOW
+/*
+ * winmultiwindowwndproc.c
+ */
+
+LRESULT CALLBACK
+winTopLevelWindowProc (HWND hwnd, UINT message,
+ WPARAM wParam, LPARAM lParam);
+#endif
+
+
+/*
+ * wintrayicon.c
+ */
+
+void
+winInitNotifyIcon (winPrivScreenPtr pScreenPriv, Bool Modify);
+
+void
+winDeleteNotifyIcon (winPrivScreenPtr pScreenPriv);
+
+LRESULT
+winHandleIconMessage (HWND hwnd, UINT message,
+ WPARAM wParam, LPARAM lParam,
+ winPrivScreenPtr pScreenPriv);
+
+
+/*
+ * winwndproc.c
+ */
+
+LRESULT CALLBACK
+winWindowProc (HWND hWnd, UINT message,
+ WPARAM wParam, LPARAM lParam);
+
+
+#ifdef XWIN_MULTIWINDOWEXTWM
+/*
+ * winwin32rootless.c
+ */
+
+Bool
+winMWExtWMCreateFrame (RootlessWindowPtr pFrame, ScreenPtr pScreen,
+ int newX, int newY, RegionPtr pShape);
+
+void
+winMWExtWMDestroyFrame (RootlessFrameID wid);
+
+void
+winMWExtWMMoveFrame (RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY);
+
+void
+winMWExtWMResizeFrame (RootlessFrameID wid, ScreenPtr pScreen,
+ int newX, int newY, unsigned int newW, unsigned int newH,
+ unsigned int gravity);
+
+void
+winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid);
+
+void
+winMWExtWMReshapeFrame (RootlessFrameID wid, RegionPtr pShape);
+
+void
+winMWExtWMUnmapFrame (RootlessFrameID wid);
+
+void
+winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow);
+
+void
+winMWExtWMStopDrawing (RootlessFrameID wid, Bool flush);
+
+void
+winMWExtWMUpdateRegion (RootlessFrameID wid, RegionPtr pDamage);
+
+void
+winMWExtWMDamageRects (RootlessFrameID wid, int count, const BoxRec *rects,
+ int shift_x, int shift_y);
+
+void
+winMWExtWMRootlessSwitchWindow (RootlessWindowPtr pFrame, WindowPtr oldWin);
+
+void
+winMWExtWMCopyBytes (unsigned int width, unsigned int height,
+ const void *src, unsigned int srcRowBytes,
+ void *dst, unsigned int dstRowBytes);
+
+void
+winMWExtWMCopyWindow (RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
+ int dx, int dy);
+#endif
+
+
+#ifdef XWIN_MULTIWINDOWEXTWM
+/*
+ * winwin32rootlesswindow.c
+ */
+
+void
+winMWExtWMReorderWindows (ScreenPtr pScreen);
+
+void
+winMWExtWMMoveXWindow (WindowPtr pWin, int x, int y);
+
+void
+winMWExtWMResizeXWindow (WindowPtr pWin, int w, int h);
+
+void
+winMWExtWMMoveResizeXWindow (WindowPtr pWin, int x, int y, int w, int h);
+
+void
+winMWExtWMUpdateIcon (Window id);
+
+void
+winMWExtWMUpdateWindowDecoration (win32RootlessWindowPtr pRLWinPriv,
+ winScreenInfoPtr pScreenInfo);
+
+wBOOL CALLBACK
+winMWExtWMDecorateWindow (HWND hwnd, LPARAM lParam);
+
+void
+winMWExtWMRestackWindows (ScreenPtr pScreen);
+#endif
+#ifdef XWIN_MULTIWINDOWINTWM
+Bool
+winIsInternalWMRunning (winScreenInfoPtr pScreenInfo);
+#endif
+
+#ifdef XWIN_MULTIWINDOWEXTWM
+/*
+ * winwin32rootlesswndproc.c
+ */
+
+LRESULT CALLBACK
+winMWExtWMWindowProc (HWND hwnd, UINT message,
+ WPARAM wParam, LPARAM lParam);
+#endif
+
+
+/*
+ * winwindowswm.c
+ */
+
+void
+winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg,
+ Window window, int x, int y, int w, int h);
+
+void
+winWindowsWMExtensionInit (void);
+
+/*
+ * wincursor.c
+ */
+
+Bool
+winInitCursor (ScreenPtr pScreen);
+
+/*
+ * winprocarg.c
+ */
+void
+winInitializeScreens(int maxscreens);
+
+/*
+ * windisplay.c
+ */
+
+void
+winGetDisplayName(char *szDisplay, unsigned int screen);
+
+/*
+ * winrandr.c
+ */
+Bool
+winRandRInit (ScreenPtr pScreen);
+void
+winDoRandRScreenSetSize (ScreenPtr pScreen,
+ CARD16 width,
+ CARD16 height,
+ CARD32 mmWidth,
+ CARD32 mmHeight);
+
+/*
+ * END DDX and DIX Function Prototypes
+ */
+
+#endif /* _WIN_H_ */
+
diff --git a/xorg-server/hw/xwin/winallpriv.c b/xorg-server/hw/xwin/winallpriv.c
index ce74a021e..f4078207e 100644
--- a/xorg-server/hw/xwin/winallpriv.c
+++ b/xorg-server/hw/xwin/winallpriv.c
@@ -48,11 +48,9 @@ winAllocatePrivates (ScreenPtr pScreen)
{
winPrivScreenPtr pScreenPriv;
-#if CYGDEBUG
winDebug ("winAllocateScreenPrivates - g_ulServerGeneration: %d "
"serverGeneration: %d\n",
g_ulServerGeneration, serverGeneration);
-#endif
/* We need a new slot for our privates if the screen gen has changed */
if (g_ulServerGeneration != serverGeneration)
@@ -77,7 +75,7 @@ winAllocatePrivates (ScreenPtr pScreen)
/* Register our screen private */
if (!dixRegisterPrivateKey(g_iScreenPrivateKey, PRIVATE_SCREEN, 0))
{
- ErrorF ("winAllocatePrivates - AllocateScreenPrivate () failed\n");
+ ErrorF ("winAllocatePrivates - dixRegisterPrivateKey () failed\n");
return FALSE;
}
@@ -118,9 +116,7 @@ winAllocatePrivates (ScreenPtr pScreen)
Bool
winInitCmapPrivates (ColormapPtr pcmap, int index)
{
-#if CYGDEBUG
winDebug ("winInitCmapPrivates\n");
-#endif
/*
* I see no way that this function can do anything useful
@@ -146,9 +142,7 @@ winAllocateCmapPrivates (ColormapPtr pCmap)
winPrivCmapPtr pCmapPriv;
static unsigned long s_ulPrivateGeneration = 0;
-#if CYGDEBUG
winDebug ("winAllocateCmapPrivates\n");
-#endif
/* Get a new privates index when the server generation changes */
if (s_ulPrivateGeneration != serverGeneration)
@@ -178,9 +172,7 @@ winAllocateCmapPrivates (ColormapPtr pCmap)
/* Save the cmap private pointer */
winSetCmapPriv (pCmap, pCmapPriv);
-#if CYGDEBUG
winDebug ("winAllocateCmapPrivates - Returning\n");
-#endif
return TRUE;
}
diff --git a/xorg-server/hw/xwin/winauth.c b/xorg-server/hw/xwin/winauth.c
index 7d4372549..b603f70f5 100644
--- a/xorg-server/hw/xwin/winauth.c
+++ b/xorg-server/hw/xwin/winauth.c
@@ -32,12 +32,15 @@
#include <xwin-config.h>
#endif
+#define GC X11_GC /* To avoid compilation errors later when including win.h (which also defines the GC type) */
+#include <X11/Xlib.h>
+#undef GC
+
#include "win.h"
/* Includes for authorization */
#include "securitysrv.h"
-
/*
* Constants
*/
@@ -57,16 +60,29 @@ static char *g_pAuthData = NULL;
* Code to generate a MIT-MAGIC-COOKIE-1, copied from under XCSECURITY
*/
+
+
#ifndef XCSECURITY
static
void
GenerateRandomData (int len, char *buf)
{
int fd;
+#ifdef _MSC_VER
+ static HANDLE hAdvApi32;
+ static BOOLEAN (_stdcall * RtlGenRandom)(void *,unsigned long);
+ if (!hAdvApi32)
+ {
+ hAdvApi32=LoadLibrary("advapi32.dll");
+ RtlGenRandom=(BOOLEAN (_stdcall *)(void*,unsigned long))GetProcAddress(hAdvApi32,"SystemFunction036");
+ }
+ RtlGenRandom(buf, len);
+#else
fd = open("/dev/urandom", O_RDONLY);
read(fd, buf, len);
close(fd);
+#endif
}
@@ -124,7 +140,6 @@ GenerateAuthorization(
Bool
winGenerateAuthorization (void)
{
- Bool fFreeAuth = FALSE;
SecurityAuthorizationPtr pAuth = NULL;
/* Call OS layer to generate authorization key */
@@ -139,13 +154,14 @@ winGenerateAuthorization (void)
ErrorF ("winGenerateAuthorization - GenerateAuthorization failed\n");
goto auth_bailout;
}
-
+#ifdef WINDBG
else
{
winDebug("winGenerateAuthorization - GenerateAuthorization success!\n"
"AuthDataLen: %d AuthData: %s\n",
g_uiAuthDataLen, g_pAuthData);
}
+#endif
#ifdef XCSECURITY
/* Allocate structure for additional auth information */
@@ -174,19 +190,16 @@ winGenerateAuthorization (void)
pAuth))
{
ErrorF ("winGenerateAuthorization - AddResource failed for auth.\n");
- fFreeAuth = TRUE;
goto auth_bailout;
}
/* Don't free the auth data, since it is still used internally */
- pAuth = NULL;
#endif
return TRUE;
auth_bailout:
- if (fFreeAuth)
- free(pAuth);
+ free(pAuth);
return FALSE;
}
@@ -195,6 +208,7 @@ winGenerateAuthorization (void)
void
winSetAuthorization(void)
{
+ if (g_pAuthData)
XSetAuthorization (AUTH_NAME,
strlen (AUTH_NAME),
g_pAuthData,
diff --git a/xorg-server/hw/xwin/winclip.c b/xorg-server/hw/xwin/winclip.c
index aab7d632d..cbbf08c59 100644
--- a/xorg-server/hw/xwin/winclip.c
+++ b/xorg-server/hw/xwin/winclip.c
@@ -37,6 +37,6 @@
RegionPtr
winPixmapToRegionNativeGDI (PixmapPtr pPix)
{
- ErrorF ("winPixmapToRegion()\n");
+ winDebug ("winPixmapToRegion()\n");
return NULL;
}
diff --git a/xorg-server/hw/xwin/winclipboard.h b/xorg-server/hw/xwin/winclipboard.h
index 089c2913b..e55f6023d 100644
--- a/xorg-server/hw/xwin/winclipboard.h
+++ b/xorg-server/hw/xwin/winclipboard.h
@@ -34,7 +34,9 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#ifndef _MSC_VER
#include <unistd.h>
+#endif
#ifdef __CYGWIN__
#include <sys/select.h>
#else
@@ -43,6 +45,9 @@
#endif
#include <fcntl.h>
#include <setjmp.h>
+#ifdef _MSC_VER
+typedef int pid_t;
+#endif
#include <pthread.h>
/* X headers */
@@ -50,7 +55,6 @@
#include <X11/Xatom.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
-#include <X11/Xlocale.h>
/* Windows headers */
#include <X11/Xwindows.h>
@@ -72,17 +76,13 @@
#define WIN_XEVENTS_CONVERT 2
#define WIN_XEVENTS_NOTIFY 3
-#define WM_WM_REINIT (WM_USER + 1)
+#include "winmsg.h"
/*
* References to external symbols
*/
extern char *display;
-extern void ErrorF (const char* /*f*/, ...);
-extern void winDebug (const char *format, ...);
-extern void winErrorFVerb (int verb, const char *format, ...);
-
/*
* winclipboardinit.c
@@ -145,5 +145,6 @@ int
winClipboardFlushXEvents (HWND hwnd,
int iWindow,
Display *pDisplay,
- Bool fUnicodeSupport);
+ Bool fUnicodeSupport,
+ Bool ClipboardOpened);
#endif
diff --git a/xorg-server/hw/xwin/winclipboardinit.c b/xorg-server/hw/xwin/winclipboardinit.c
index a8b038c5c..d5990900a 100644
--- a/xorg-server/hw/xwin/winclipboardinit.c
+++ b/xorg-server/hw/xwin/winclipboardinit.c
@@ -33,6 +33,9 @@
#endif
#include "dixstruct.h"
#include "winclipboard.h"
+#include "objbase.h"
+#include "ddraw.h"
+#include "winwindow.h"
/*
@@ -61,7 +64,7 @@ extern HWND g_hwndClipboard;
Bool
winInitClipboard (void)
{
- ErrorF ("winInitClipboard ()\n");
+ winDebug ("winInitClipboard ()\n");
/* Wrap some internal server functions */
if (ProcVector[X_SetSelectionOwner] != winProcSetSelectionOwner)
@@ -135,11 +138,11 @@ winClipboardCreateMessagingWindow (void)
}
void
-winFixClipboardChain (void)
+winFixClipboardChain (int Removed)
{
if (g_fClipboard
&& g_hwndClipboard)
{
- PostMessage (g_hwndClipboard, WM_WM_REINIT, 0, 0);
+ PostMessage (g_hwndClipboard, WM_WM_REINIT, Removed, 0);
}
}
diff --git a/xorg-server/hw/xwin/winclipboardtextconv.c b/xorg-server/hw/xwin/winclipboardtextconv.c
index 400f560fa..487df81ef 100644
--- a/xorg-server/hw/xwin/winclipboardtextconv.c
+++ b/xorg-server/hw/xwin/winclipboardtextconv.c
@@ -1,155 +1,155 @@
-/*
- *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
- *
- *Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- *"Software"), to deal in the Software without restriction, including
- *without limitation the rights to use, copy, modify, merge, publish,
- *distribute, sublicense, and/or sell copies of the Software, and to
- *permit persons to whom the Software is furnished to do so, subject to
- *the following conditions:
- *
- *The above copyright notice and this permission notice shall be
- *included in all copies or substantial portions of the Software.
- *
- *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
- *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *Except as contained in this notice, the name of Harold L Hunt II
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from Harold L Hunt II.
- *
- * Authors: Harold L Hunt II
- */
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include "win.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-void
-winClipboardDOStoUNIX (char *pszSrc, int iLength);
-void
-winClipboardUNIXtoDOS (unsigned char **ppszData, int iLength);
-
-/*
- * Convert \r\n to \n
- *
- * NOTE: This was heavily inspired by, Cygwin's
- * winsup/cygwin/fhandler.cc/fhandler_base::read ()
- */
-
-void
-winClipboardDOStoUNIX (char *pszSrc, int iLength)
-{
- char *pszDest = pszSrc;
- char *pszEnd = pszSrc + iLength;
-
- /* Loop until the last character */
- while (pszSrc < pszEnd)
- {
- /* Copy the current source character to current destination character */
- *pszDest = *pszSrc;
-
- /* Advance to the next source character */
- pszSrc++;
-
- /* Don't advance the destination character if we need to drop an \r */
- if (*pszDest != '\r' || *pszSrc != '\n')
- pszDest++;
- }
-
- /* Move the terminating null */
- *pszDest = '\0';
-}
-
-
-/*
- * Convert \n to \r\n
- */
-
-void
-winClipboardUNIXtoDOS (unsigned char **ppszData, int iLength)
-{
- int iNewlineCount = 0;
- unsigned char *pszSrc = *ppszData;
- unsigned char *pszEnd = pszSrc + iLength;
- unsigned char *pszDest = NULL, *pszDestBegin = NULL;
-
- winDebug("UNIXtoDOS () - Original data:'%s'\n", *ppszData);
-
- /* Count \n characters without leading \r */
- while (pszSrc < pszEnd)
- {
- /* Skip ahead two character if found set of \r\n */
- if (*pszSrc == '\r' && pszSrc + 1 < pszEnd && *(pszSrc + 1) == '\n')
- {
- pszSrc += 2;
- continue;
- }
-
- /* Increment the count if found naked \n */
- if (*pszSrc == '\n')
- {
- iNewlineCount++;
- }
-
- pszSrc++;
- }
-
- /* Return if no naked \n's */
- if (iNewlineCount == 0)
- return;
-
- /* Allocate a new string */
- pszDestBegin = pszDest = malloc (iLength + iNewlineCount + 1);
-
- /* Set source pointer to beginning of data string */
- pszSrc = *ppszData;
-
- /* Loop through all characters in source string */
- while (pszSrc < pszEnd)
- {
- /* Copy line endings that are already valid */
- if (*pszSrc == '\r' && pszSrc + 1 < pszEnd && *(pszSrc + 1) == '\n')
- {
- *pszDest = *pszSrc;
- *(pszDest + 1) = *(pszSrc + 1);
- pszDest += 2;
- pszSrc += 2;
- continue;
- }
-
- /* Add \r to naked \n's */
- if (*pszSrc == '\n')
- {
- *pszDest = '\r';
- *(pszDest + 1) = *pszSrc;
- pszDest += 2;
- pszSrc += 1;
- continue;
- }
-
- /* Copy normal characters */
- *pszDest = *pszSrc;
- pszSrc++;
- pszDest++;
- }
-
- /* Put terminating null at end of new string */
- *pszDest = '\0';
-
- /* Swap string pointers */
- free (*ppszData);
- *ppszData = pszDestBegin;
-
- winDebug("UNIXtoDOS () - Final string:'%s'\n", pszDestBegin);
-}
+/*
+ *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
+ *
+ *Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ *"Software"), to deal in the Software without restriction, including
+ *without limitation the rights to use, copy, modify, merge, publish,
+ *distribute, sublicense, and/or sell copies of the Software, and to
+ *permit persons to whom the Software is furnished to do so, subject to
+ *the following conditions:
+ *
+ *The above copyright notice and this permission notice shall be
+ *included in all copies or substantial portions of the Software.
+ *
+ *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
+ *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *Except as contained in this notice, the name of Harold L Hunt II
+ *shall not be used in advertising or otherwise to promote the sale, use
+ *or other dealings in this Software without prior written authorization
+ *from Harold L Hunt II.
+ *
+ * Authors: Harold L Hunt II
+ */
+
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+#include "win.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+winClipboardDOStoUNIX (char *pszSrc, int iLength);
+void
+winClipboardUNIXtoDOS (unsigned char **ppszData, int iLength);
+
+/*
+ * Convert \r\n to \n
+ *
+ * NOTE: This was heavily inspired by, Cygwin's
+ * winsup/cygwin/fhandler.cc/fhandler_base::read ()
+ */
+
+void
+winClipboardDOStoUNIX (char *pszSrc, int iLength)
+{
+ char *pszDest = pszSrc;
+ char *pszEnd = pszSrc + iLength;
+
+ /* Loop until the last character */
+ while (pszSrc < pszEnd)
+ {
+ /* Copy the current source character to current destination character */
+ *pszDest = *pszSrc;
+
+ /* Advance to the next source character */
+ pszSrc++;
+
+ /* Don't advance the destination character if we need to drop an \r */
+ if (*pszDest != '\r' || *pszSrc != '\n')
+ pszDest++;
+ }
+
+ /* Move the terminating null */
+ *pszDest = '\0';
+}
+
+
+/*
+ * Convert \n to \r\n
+ */
+
+void
+winClipboardUNIXtoDOS (unsigned char **ppszData, int iLength)
+{
+ int iNewlineCount = 0;
+ unsigned char *pszSrc = *ppszData;
+ unsigned char *pszEnd = pszSrc + iLength;
+ unsigned char *pszDest = NULL, *pszDestBegin = NULL;
+
+ winDebug("UNIXtoDOS () - Original data:'%s'\n", *ppszData);
+
+ /* Count \n characters without leading \r */
+ while (pszSrc < pszEnd)
+ {
+ /* Skip ahead two character if found set of \r\n */
+ if (*pszSrc == '\r' && pszSrc + 1 < pszEnd && *(pszSrc + 1) == '\n')
+ {
+ pszSrc += 2;
+ continue;
+ }
+
+ /* Increment the count if found naked \n */
+ if (*pszSrc == '\n')
+ {
+ iNewlineCount++;
+ }
+
+ pszSrc++;
+ }
+
+ /* Return if no naked \n's */
+ if (iNewlineCount == 0)
+ return;
+
+ /* Allocate a new string */
+ pszDestBegin = pszDest = malloc (iLength + iNewlineCount + 1);
+
+ /* Set source pointer to beginning of data string */
+ pszSrc = *ppszData;
+
+ /* Loop through all characters in source string */
+ while (pszSrc < pszEnd)
+ {
+ /* Copy line endings that are already valid */
+ if (*pszSrc == '\r' && pszSrc + 1 < pszEnd && *(pszSrc + 1) == '\n')
+ {
+ *pszDest = *pszSrc;
+ *(pszDest + 1) = *(pszSrc + 1);
+ pszDest += 2;
+ pszSrc += 2;
+ continue;
+ }
+
+ /* Add \r to naked \n's */
+ if (*pszSrc == '\n')
+ {
+ *pszDest = '\r';
+ *(pszDest + 1) = *pszSrc;
+ pszDest += 2;
+ pszSrc += 1;
+ continue;
+ }
+
+ /* Copy normal characters */
+ *pszDest = *pszSrc;
+ pszSrc++;
+ pszDest++;
+ }
+
+ /* Put terminating null at end of new string */
+ *pszDest = '\0';
+
+ /* Swap string pointers */
+ free (*ppszData);
+ *ppszData = pszDestBegin;
+
+ winDebug("UNIXtoDOS () - Final string:'%s'\n", pszDestBegin);
+}
diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c
index 34a963ce8..b3ffff689 100644
--- a/xorg-server/hw/xwin/winclipboardthread.c
+++ b/xorg-server/hw/xwin/winclipboardthread.c
@@ -39,7 +39,11 @@
#include <errno.h>
#endif
#include "misc.h"
+#include "winmsg.h"
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
/*
* References to external symbols
@@ -47,10 +51,12 @@
extern Bool g_fUnicodeClipboard;
extern unsigned long serverGeneration;
+extern Bool g_fClipboardLaunched;
extern Bool g_fClipboardStarted;
extern HWND g_hwndClipboard;
extern void *g_pClipboardDisplay;
extern Window g_iClipboardWindow;
+extern Bool g_fClipboardPrimary;
/*
@@ -58,6 +64,9 @@ extern Window g_iClipboardWindow;
*/
static jmp_buf g_jmpEntry;
+static XIOErrorHandler g_winClipboardOldIOErrorHandler;
+static pthread_t g_winClipboardProcThread;
+
Bool g_fUnicodeSupport = FALSE;
Bool g_fUseUnicode = FALSE;
@@ -72,6 +81,8 @@ winClipboardErrorHandler (Display *pDisplay, XErrorEvent *pErr);
static int
winClipboardIOErrorHandler (Display *pDisplay);
+static void
+winClipboardThreadExit(void *arg);
/*
* Main thread function
@@ -98,7 +109,9 @@ winClipboardProc (void *pvNotUsed)
char szDisplay[512];
int iSelectError;
- ErrorF ("winClipboardProc - Hello\n");
+ pthread_cleanup_push(&winClipboardThreadExit, NULL);
+
+ winDebug ("winClipboardProc - Hello\n");
/* Do we have Unicode support? */
g_fUnicodeSupport = winClipboardDetectUnicodeSupport ();
@@ -109,18 +122,16 @@ winClipboardProc (void *pvNotUsed)
/* Save the Unicode support flag in a global */
g_fUseUnicode = fUseUnicode;
- /* Allow multiple threads to access Xlib */
- if (XInitThreads () == 0)
- {
- ErrorF ("winClipboardProc - XInitThreads failed.\n");
- pthread_exit (NULL);
- }
+ /* Create Windows messaging window */
+ hwnd = winClipboardCreateMessagingWindow ();
+
+ /* Save copy of HWND in screen privates */
+ g_hwndClipboard = hwnd;
- /* See if X supports the current locale */
- if (XSupportsLocale () == False)
- {
- ErrorF ("winClipboardProc - Warning: Locale not supported by X.\n");
- }
+ /* Set error handler */
+ XSetErrorHandler (winClipboardErrorHandler);
+ g_winClipboardProcThread = pthread_self();
+ g_winClipboardOldIOErrorHandler = XSetIOErrorHandler (winClipboardIOErrorHandler);
/* Set jump point for Error exits */
iReturn = setjmp (g_jmpEntry);
@@ -132,22 +143,18 @@ winClipboardProc (void *pvNotUsed)
/* setjmp returned an unknown value, exit */
ErrorF ("winClipboardProc - setjmp returned: %d exiting\n",
iReturn);
- pthread_exit (NULL);
+ goto thread_errorexit;
}
else if (iReturn == WIN_JMP_ERROR_IO)
{
/* TODO: Cleanup the Win32 window and free any allocated memory */
ErrorF ("winClipboardProc - setjmp returned for IO Error Handler.\n");
- pthread_exit (NULL);
+ //goto thread_errorexit;
}
/* Use our generated cookie for authentication */
winSetAuthorization();
- /* Set error handler */
- XSetErrorHandler (winClipboardErrorHandler);
- XSetIOErrorHandler (winClipboardIOErrorHandler);
-
/* Initialize retry count */
iRetries = 0;
@@ -159,13 +166,10 @@ winClipboardProc (void *pvNotUsed)
* for all screens on the display. That is why there is only
* one clipboard client thread.
*/
- snprintf (szDisplay,
- 512,
- "127.0.0.1:%s.0",
- display);
+ winGetDisplayName(szDisplay,0);
/* Print the display connection string */
- ErrorF ("winClipboardProc - DISPLAY=%s\n", szDisplay);
+ winDebug ("winClipboardProc - DISPLAY=%s\n", szDisplay);
/* Open the X display */
do
@@ -189,25 +193,27 @@ winClipboardProc (void *pvNotUsed)
if (pDisplay == NULL)
{
ErrorF ("winClipboardProc - Failed opening the display, giving up\n");
- pthread_exit (NULL);
+ goto thread_errorexit;
}
/* Save the display in the screen privates */
g_pClipboardDisplay = pDisplay;
- ErrorF ("winClipboardProc - XOpenDisplay () returned and "
+ winDebug ("winClipboardProc - XOpenDisplay () returned and "
"successfully opened the display.\n");
/* Get our connection number */
iConnectionNumber = ConnectionNumber (pDisplay);
+ winDebug("Clipboard is using socket %d\n",iConnectionNumber);
+
#ifdef HAS_DEVWINDOWS
/* Open a file descriptor for the windows message queue */
- fdMessageQueue = open (WIN_MSG_QUEUE_FNAME, O_RDONLY);
+ fdMessageQueue = open (WIN_MSG_QUEUE_FNAME, _O_RDONLY);
if (fdMessageQueue == -1)
{
ErrorF ("winClipboardProc - Failed opening %s\n", WIN_MSG_QUEUE_FNAME);
- pthread_exit (NULL);
+ goto thread_errorexit;
}
/* Find max of our file descriptors */
@@ -219,6 +225,10 @@ winClipboardProc (void *pvNotUsed)
/* Create atoms */
atomClipboard = XInternAtom (pDisplay, "CLIPBOARD", False);
atomClipboardManager = XInternAtom (pDisplay, "CLIPBOARD_MANAGER", False);
+ XInternAtom (pDisplay, WIN_LOCAL_PROPERTY, False);
+ XInternAtom (pDisplay, "UTF8_STRING", False);
+ XInternAtom (pDisplay, "COMPOUND_TEXT", False);
+ XInternAtom (pDisplay, "TARGETS", False);
/* Create a messaging window */
iWindow = XCreateSimpleWindow (pDisplay,
@@ -231,9 +241,11 @@ winClipboardProc (void *pvNotUsed)
if (iWindow == 0)
{
ErrorF ("winClipboardProc - Could not create an X window.\n");
- pthread_exit (NULL);
+ goto thread_errorexit;
}
+ XStoreName(pDisplay, iWindow, "xwinclip");
+
/* Select event types to watch */
if (XSelectInput (pDisplay,
iWindow,
@@ -244,33 +256,31 @@ winClipboardProc (void *pvNotUsed)
/* Save the window in the screen privates */
g_iClipboardWindow = iWindow;
- /* Create Windows messaging window */
- hwnd = winClipboardCreateMessagingWindow ();
-
- /* Save copy of HWND in screen privates */
- g_hwndClipboard = hwnd;
-
/* Assert ownership of selections if Win32 clipboard is owned */
if (NULL != GetClipboardOwner ())
{
- /* PRIMARY */
- iReturn = XSetSelectionOwner (pDisplay, XA_PRIMARY,
- iWindow, CurrentTime);
- if (iReturn == BadAtom || iReturn == BadWindow ||
- XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow)
+ if (g_fClipboardPrimary)
+ {
+ /* PRIMARY */
+ winDebug("winClipboardProc - asserted ownership.\n");
+ iReturn = XSetSelectionOwner (pDisplay, XA_PRIMARY,
+ iWindow, CurrentTime);
+ if (iReturn == BadAtom || iReturn == BadWindow /*||
+ XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow*/)
{
ErrorF ("winClipboardProc - Could not set PRIMARY owner\n");
- pthread_exit (NULL);
+ goto thread_errorexit;
}
+ }
/* CLIPBOARD */
iReturn = XSetSelectionOwner (pDisplay, atomClipboard,
iWindow, CurrentTime);
- if (iReturn == BadAtom || iReturn == BadWindow ||
- XGetSelectionOwner (pDisplay, atomClipboard) != iWindow)
+ if (iReturn == BadAtom || iReturn == BadWindow /*||
+ XGetSelectionOwner (pDisplay, atomClipboard) != iWindow*/)
{
ErrorF ("winClipboardProc - Could not set CLIPBOARD owner\n");
- pthread_exit (NULL);
+ goto thread_errorexit;
}
}
@@ -280,15 +290,20 @@ winClipboardProc (void *pvNotUsed)
* because there may be events in local data structures
* already.
*/
- winClipboardFlushXEvents (hwnd,
+ /*winClipboardFlushXEvents (hwnd,
iWindow,
pDisplay,
fUseUnicode);
-
+ */
/* Pre-flush Windows messages */
+ winDebug ("Start flushing \n");
if (!winClipboardFlushWindowsMessageQueue (hwnd))
- return 0;
+ {
+ ErrorF ("winClipboardFlushWindowsMessageQueue - returned 0\n");
+ goto thread_errorexit;
+ }
+ winDebug ("winClipboardProc - Started\n");
/* Signal that the clipboard client has started */
g_fClipboardStarted = TRUE;
@@ -343,21 +358,24 @@ winClipboardProc (void *pvNotUsed)
}
/* Branch on which descriptor became active */
- if (FD_ISSET (iConnectionNumber, &fdsRead))
- {
+// if (FD_ISSET (iConnectionNumber, &fdsRead))
+// { Also do it when no read since winClipboardFlushXEvents
+// is sending the output.
/* Process X events */
/* Exit when we see that server is shutting down */
iReturn = winClipboardFlushXEvents (hwnd,
iWindow,
pDisplay,
- fUseUnicode);
+ fUseUnicode,
+ FALSE
+ );
if (WIN_XEVENTS_SHUTDOWN == iReturn)
{
ErrorF ("winClipboardProc - winClipboardFlushXEvents "
"trapped shutdown event, exiting main loop.\n");
break;
}
- }
+// }
#ifdef HAS_DEVWINDOWS
/* Check for Windows event ready */
@@ -383,8 +401,10 @@ winClipboardProc (void *pvNotUsed)
iReturn = XDestroyWindow (pDisplay, iWindow);
if (iReturn == BadWindow)
ErrorF ("winClipboardProc - XDestroyWindow returned BadWindow.\n");
+#ifdef WINDBG
else
- ErrorF ("winClipboardProc - XDestroyWindow succeeded.\n");
+ winDebug ("winClipboardProc - XDestroyWindow succeeded.\n");
+#endif
}
@@ -415,9 +435,28 @@ winClipboardProc (void *pvNotUsed)
}
#endif
+ goto commonexit;
+
+thread_errorexit:
+ if (g_pClipboardDisplay && g_iClipboardWindow)
+ {
+ iReturn = XDestroyWindow (g_pClipboardDisplay, g_iClipboardWindow);
+ if (iReturn == BadWindow)
+ ErrorF ("winClipboardProc - XDestroyWindow returned BadWindow.\n");
+#ifdef WINDBG
+ else
+ winDebug ("winClipboardProc - XDestroyWindow succeeded.\n");
+#endif
+ }
+ winDebug ("Clipboard thread died.\n");
+
+commonexit:
g_iClipboardWindow = None;
g_pClipboardDisplay = NULL;
- g_hwndClipboard = NULL;
+ g_fClipboardLaunched = FALSE;
+ g_fClipboardStarted = FALSE;
+
+ pthread_cleanup_pop(0);
return NULL;
}
@@ -437,11 +476,17 @@ winClipboardErrorHandler (Display *pDisplay, XErrorEvent *pErr)
pszErrorMsg,
sizeof (pszErrorMsg));
ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n"
- "\tSerial: %lu, Request Code: %d, Minor Code: %d\n",
- pszErrorMsg,
- pErr->serial,
- pErr->request_code,
- pErr->minor_code);
+ " errorCode %d\n"
+ " serial %lu\n"
+ " resourceID 0x%x\n"
+ " majorCode %d\n"
+ " minorCode %d\n"
+ , pszErrorMsg
+ , pErr->error_code
+ , pErr->serial
+ , pErr->resourceid
+ , pErr->request_code
+ , pErr->minor_code);
return 0;
}
@@ -455,8 +500,26 @@ winClipboardIOErrorHandler (Display *pDisplay)
{
ErrorF ("winClipboardIOErrorHandler!\n\n");
- /* Restart at the main entry point */
- longjmp (g_jmpEntry, WIN_JMP_ERROR_IO);
-
+ if (pthread_equal(pthread_self(),g_winClipboardProcThread))
+ {
+ /* Restart at the main entry point */
+ longjmp (g_jmpEntry, WIN_JMP_ERROR_IO);
+ }
+
+ if (g_winClipboardOldIOErrorHandler)
+ g_winClipboardOldIOErrorHandler(pDisplay);
+
return 0;
}
+
+/*
+ * winClipboardThreadExit - Thread exit handler
+ */
+
+static void
+winClipboardThreadExit(void *arg)
+{
+ /* clipboard thread has exited, stop server as well */
+ AbortDDX();
+ TerminateProcess(GetCurrentProcess(),1);
+}
diff --git a/xorg-server/hw/xwin/winclipboardunicode.c b/xorg-server/hw/xwin/winclipboardunicode.c
index ba86915a4..947475509 100644
--- a/xorg-server/hw/xwin/winclipboardunicode.c
+++ b/xorg-server/hw/xwin/winclipboardunicode.c
@@ -43,25 +43,43 @@ Bool
winClipboardDetectUnicodeSupport (void)
{
Bool fReturn = FALSE;
- OSVERSIONINFO osvi = {0};
+ OSVERSIONINFOEX osvi = {0};
/* Get operating system version information */
osvi.dwOSVersionInfoSize = sizeof (osvi);
- GetVersionEx (&osvi);
+ GetVersionEx ((LPOSVERSIONINFO)&osvi);
/* Branch on platform ID */
switch (osvi.dwPlatformId)
{
case VER_PLATFORM_WIN32_NT:
- /* Unicode supported on NT only */
- ErrorF ("DetectUnicodeSupport - Windows NT/2000/XP\n");
- fReturn = TRUE;
+ if (osvi.dwMajorVersion >= 6)
+ {
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ winDebug ("OS: Windows Vista\n");
+ else
+ winDebug ("OS: Windows Server 2008\n");
+ fReturn = TRUE;
+ }
+ else if (osvi.dwMajorVersion == 5)
+ {
+ if (osvi.dwMinorVersion == 2)
+ {
+ winDebug ("OS: Windows 2003\n");
+ fReturn = TRUE;
+ }
+ else if (osvi.dwMinorVersion == 1)
+ {
+ winDebug ("OS: Windows XP\n");
+ fReturn = TRUE;
+ }
+ else if (osvi.dwMinorVersion == 0) winDebug ("OS: Windows 2000\n");
+ }
+ else if (osvi.dwMajorVersion <= 4) winDebug ("OS: Windows NT\n");
break;
case VER_PLATFORM_WIN32_WINDOWS:
- /* Unicode is not supported on non-NT */
- ErrorF ("DetectUnicodeSupport - Windows 95/98/Me\n");
- fReturn = FALSE;
+ winDebug ("OS: Windows 95/98/Me\n");
break;
}
diff --git a/xorg-server/hw/xwin/winclipboardwndproc.c b/xorg-server/hw/xwin/winclipboardwndproc.c
index 9394b04db..57413b1c3 100644
--- a/xorg-server/hw/xwin/winclipboardwndproc.c
+++ b/xorg-server/hw/xwin/winclipboardwndproc.c
@@ -1,629 +1,566 @@
-/*
- *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
- *Copyright (C) Colin Harrison 2005-2008
- *
- *Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- *"Software"), to deal in the Software without restriction, including
- *without limitation the rights to use, copy, modify, merge, publish,
- *distribute, sublicense, and/or sell copies of the Software, and to
- *permit persons to whom the Software is furnished to do so, subject to
- *the following conditions:
- *
- *The above copyright notice and this permission notice shall be
- *included in all copies or substantial portions of the Software.
- *
- *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
- *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *Except as contained in this notice, the name of the copyright holder(s)
- *and author(s) shall not be used in advertising or otherwise to promote
- *the sale, use or other dealings in this Software without prior written
- *authorization from the copyright holder(s) and author(s).
- *
- * Authors: Harold L Hunt II
- * Colin Harrison
- */
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include <sys/types.h>
-#include <sys/time.h>
-#include "winclipboard.h"
-#include "misc.h"
-
-/*
- * Constants
- */
-
-#define WIN_CLIPBOARD_PROP "cyg_clipboard_prop"
-#define WIN_POLL_TIMEOUT 1
-
-
-/*
- * References to external symbols
- */
-
-extern Bool g_fUseUnicode;
-extern Bool g_fUnicodeSupport;
-extern void *g_pClipboardDisplay;
-extern Window g_iClipboardWindow;
-extern Atom g_atomLastOwnedSelection;
-
-/* BPS - g_hwndClipboard needed for X app->Windows paste fix */
-extern HWND g_hwndClipboard;
-
-/*
- * Local function prototypes
- */
-
-static int
-winProcessXEventsTimeout (HWND hwnd, int iWindow, Display *pDisplay,
- Bool fUseUnicode, int iTimeoutSec);
-
-
-/*
- * Process X events up to specified timeout
- */
-
-static int
-winProcessXEventsTimeout (HWND hwnd, int iWindow, Display *pDisplay,
- Bool fUseUnicode, int iTimeoutSec)
-{
- int iConnNumber;
- struct timeval tv;
- int iReturn;
- DWORD dwStopTime = (GetTickCount () / 1000) + iTimeoutSec;
-
- /* We need to ensure that all pending events are processed */
- XSync (pDisplay, FALSE);
-
- /* Get our connection number */
- iConnNumber = ConnectionNumber (pDisplay);
-
- /* Loop for X events */
- while (1)
- {
- fd_set fdsRead;
-
- /* Setup the file descriptor set */
- FD_ZERO (&fdsRead);
- FD_SET (iConnNumber, &fdsRead);
-
- /* Adjust timeout */
- tv.tv_sec = dwStopTime - (GetTickCount () / 1000);
- tv.tv_usec = 0;
-
- /* Break out if no time left */
- if (tv.tv_sec < 0)
- return WIN_XEVENTS_SUCCESS;
-
- /* Wait for an X event */
- iReturn = select (iConnNumber + 1,/* Highest fds number */
- &fdsRead, /* Read mask */
- NULL, /* No write mask */
- NULL, /* No exception mask */
- &tv); /* No timeout */
- if (iReturn < 0)
- {
- ErrorF ("winProcessXEventsTimeout - Call to select () failed: %d. "
- "Bailing.\n", iReturn);
- break;
- }
-
- /* Branch on which descriptor became active */
- if (FD_ISSET (iConnNumber, &fdsRead))
- {
- /* Process X events */
- /* Exit when we see that server is shutting down */
- iReturn = winClipboardFlushXEvents (hwnd,
- iWindow,
- pDisplay,
- fUseUnicode);
- if (WIN_XEVENTS_NOTIFY == iReturn
- || WIN_XEVENTS_CONVERT == iReturn)
- {
- /* Bail out if convert or notify processed */
- return iReturn;
- }
- }
- }
-
- return WIN_XEVENTS_SUCCESS;
-}
-
-
-/*
- * Process a given Windows message
- */
-
-/* BPS - Define our own message, which we'll post to ourselves to facilitate
- * resetting the delayed rendering mechanism after each paste from X app to
- * Windows app. TODO - Perhaps move to win.h with the other WM_USER messages.
- */
-#define WM_USER_PASTE_COMPLETE (WM_USER + 1003)
-
-LRESULT CALLBACK
-winClipboardWindowProc (HWND hwnd, UINT message,
- WPARAM wParam, LPARAM lParam)
-{
- static HWND s_hwndNextViewer;
- static Bool s_fCBCInitialized;
-
- /* Branch on message type */
- switch (message)
- {
- case WM_DESTROY:
- {
- winDebug ("winClipboardWindowProc - WM_DESTROY\n");
-
- /* Remove ourselves from the clipboard chain */
- ChangeClipboardChain (hwnd, s_hwndNextViewer);
-
- s_hwndNextViewer = NULL;
-
- PostQuitMessage (0);
- }
- return 0;
-
-
- case WM_CREATE:
- {
- HWND first, next;
- DWORD error_code = 0;
- winDebug ("winClipboardWindowProc - WM_CREATE\n");
-
- first = GetClipboardViewer(); /* Get handle to first viewer in chain. */
- if (first == hwnd) return 0; /* Make sure it's not us! */
- /* Add ourselves to the clipboard viewer chain */
- next = SetClipboardViewer (hwnd);
- error_code = GetLastError();
- if (SUCCEEDED(error_code) && (next == first)) /* SetClipboardViewer must have succeeded, and the handle */
- s_hwndNextViewer = next; /* it returned must have been the first window in the chain */
- else
- s_fCBCInitialized = FALSE;
- }
- return 0;
-
-
- case WM_CHANGECBCHAIN:
- {
- winDebug ("winClipboardWindowProc - WM_CHANGECBCHAIN: wParam(%x) "
- "lParam(%x) s_hwndNextViewer(%x)\n",
- wParam, lParam, s_hwndNextViewer);
-
- if ((HWND) wParam == s_hwndNextViewer)
- {
- s_hwndNextViewer = (HWND) lParam;
- if (s_hwndNextViewer == hwnd)
- {
- s_hwndNextViewer = NULL;
- winErrorFVerb (1, "winClipboardWindowProc - WM_CHANGECBCHAIN: "
- "attempted to set next window to ourselves.");
- }
- }
- else if (s_hwndNextViewer)
- SendMessage (s_hwndNextViewer, message,
- wParam, lParam);
-
- }
- winDebug ("winClipboardWindowProc - WM_CHANGECBCHAIN: Exit\n");
- return 0;
-
- case WM_WM_REINIT:
- {
- /* Ensure that we're in the clipboard chain. Some apps,
- * WinXP's remote desktop for one, don't play nice with the
- * chain. This message is called whenever we receive a
- * WM_ACTIVATEAPP message to ensure that we continue to
- * receive clipboard messages.
- *
- * It might be possible to detect if we're still in the chain
- * by calling SendMessage (GetClipboardViewer(),
- * WM_DRAWCLIPBOARD, 0, 0); and then seeing if we get the
- * WM_DRAWCLIPBOARD message. That, however, might be more
- * expensive than just putting ourselves back into the chain.
- */
-
- HWND first, next;
- DWORD error_code = 0;
- winDebug ("winClipboardWindowProc - WM_WM_REINIT: Enter\n");
-
- first = GetClipboardViewer(); /* Get handle to first viewer in chain. */
- if (first == hwnd) return 0; /* Make sure it's not us! */
- winDebug (" WM_WM_REINIT: Replacing us(%x) with %x at head "
- "of chain\n", hwnd, s_hwndNextViewer);
- s_fCBCInitialized = FALSE;
- ChangeClipboardChain (hwnd, s_hwndNextViewer);
- s_hwndNextViewer = NULL;
- s_fCBCInitialized = FALSE;
- winDebug (" WM_WM_REINIT: Putting us back at head of chain.\n");
- first = GetClipboardViewer(); /* Get handle to first viewer in chain. */
- if (first == hwnd) return 0; /* Make sure it's not us! */
- next = SetClipboardViewer (hwnd);
- error_code = GetLastError();
- if (SUCCEEDED(error_code) && (next == first)) /* SetClipboardViewer must have succeeded, and the handle */
- s_hwndNextViewer = next; /* it returned must have been the first window in the chain */
- else
- s_fCBCInitialized = FALSE;
- }
- winDebug ("winClipboardWindowProc - WM_WM_REINIT: Exit\n");
- return 0;
-
-
- case WM_DRAWCLIPBOARD:
- {
- static Atom atomClipboard;
- static int generation;
- static Bool s_fProcessingDrawClipboard = FALSE;
- Display *pDisplay = g_pClipboardDisplay;
- Window iWindow = g_iClipboardWindow;
- int iReturn;
-
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Enter\n");
-
- if (generation != serverGeneration)
- {
- generation = serverGeneration;
- atomClipboard = XInternAtom (pDisplay, "CLIPBOARD", False);
- }
-
- /*
- * We've occasionally seen a loop in the clipboard chain.
- * Try and fix it on the first hint of recursion.
- */
- if (! s_fProcessingDrawClipboard)
- {
- s_fProcessingDrawClipboard = TRUE;
- }
- else
- {
- /* Attempt to break the nesting by getting out of the chain, twice?, and then fix and bail */
- s_fCBCInitialized = FALSE;
- ChangeClipboardChain (hwnd, s_hwndNextViewer);
- winFixClipboardChain();
- winErrorFVerb (1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "Nested calls detected. Re-initing.\n");
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
- s_fProcessingDrawClipboard = FALSE;
- return 0;
- }
-
- /* Bail on first message */
- if (!s_fCBCInitialized)
- {
- s_fCBCInitialized = TRUE;
- s_fProcessingDrawClipboard = FALSE;
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
- return 0;
- }
-
- /*
- * NOTE: We cannot bail out when NULL == GetClipboardOwner ()
- * because some applications deal with the clipboard in a manner
- * that causes the clipboard owner to be NULL when they are in
- * fact taking ownership. One example of this is the Win32
- * native compile of emacs.
- */
-
- /* Bail when we still own the clipboard */
- if (hwnd == GetClipboardOwner ())
- {
-
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "We own the clipboard, returning.\n");
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
- s_fProcessingDrawClipboard = FALSE;
- if (s_hwndNextViewer)
- SendMessage (s_hwndNextViewer, message, wParam, lParam);
- return 0;
- }
-
- /*
- * Do not take ownership of the X11 selections when something
- * other than CF_TEXT or CF_UNICODETEXT has been copied
- * into the Win32 clipboard.
- */
- if (!IsClipboardFormatAvailable (CF_TEXT)
- && !IsClipboardFormatAvailable (CF_UNICODETEXT))
- {
-
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "Clipboard does not contain CF_TEXT nor "
- "CF_UNICODETEXT.\n");
-
- /*
- * We need to make sure that the X Server has processed
- * previous XSetSelectionOwner messages.
- */
- XSync (pDisplay, FALSE);
-
- /* Release PRIMARY selection if owned */
- iReturn = XGetSelectionOwner (pDisplay, XA_PRIMARY);
- if (iReturn == g_iClipboardWindow)
- {
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "PRIMARY selection is owned by us.\n");
- XSetSelectionOwner (pDisplay,
- XA_PRIMARY,
- None,
- CurrentTime);
- }
- else if (BadWindow == iReturn || BadAtom == iReturn)
- winErrorFVerb (1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "XGetSelection failed for PRIMARY: %d\n", iReturn);
-
- /* Release CLIPBOARD selection if owned */
- iReturn = XGetSelectionOwner (pDisplay,
- atomClipboard);
- if (iReturn == g_iClipboardWindow)
- {
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "CLIPBOARD selection is owned by us.\n");
- XSetSelectionOwner (pDisplay,
- atomClipboard,
- None,
- CurrentTime);
- }
- else if (BadWindow == iReturn || BadAtom == iReturn)
- winErrorFVerb (1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "XGetSelection failed for CLIPBOARD: %d\n", iReturn);
-
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
- s_fProcessingDrawClipboard = FALSE;
- if (s_hwndNextViewer)
- SendMessage (s_hwndNextViewer, message, wParam, lParam);
- return 0;
- }
-
- /* Reassert ownership of PRIMARY */
- iReturn = XSetSelectionOwner (pDisplay,
- XA_PRIMARY,
- iWindow,
- CurrentTime);
- if (iReturn == BadAtom || iReturn == BadWindow ||
- XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow)
- {
- winErrorFVerb (1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "Could not reassert ownership of PRIMARY\n");
- }
- else
- {
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "Reasserted ownership of PRIMARY\n");
- }
-
- /* Reassert ownership of the CLIPBOARD */
- iReturn = XSetSelectionOwner (pDisplay,
- atomClipboard,
- iWindow,
- CurrentTime);
-
- if (iReturn == BadAtom || iReturn == BadWindow ||
- XGetSelectionOwner (pDisplay, atomClipboard) != iWindow)
- {
- winErrorFVerb (1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "Could not reassert ownership of CLIPBOARD\n");
- }
- else
- {
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
- "Reasserted ownership of CLIPBOARD\n");
- }
-
- /* Flush the pending SetSelectionOwner event now */
- XFlush (pDisplay);
-
- s_fProcessingDrawClipboard = FALSE;
- }
- winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
- /* Pass the message on the next window in the clipboard viewer chain */
- if (s_hwndNextViewer)
- SendMessage (s_hwndNextViewer, message, wParam, lParam);
- return 0;
-
-
- case WM_DESTROYCLIPBOARD:
- /*
- * NOTE: Intentionally do nothing.
- * Changes in the Win32 clipboard are handled by WM_DRAWCLIPBOARD
- * above. We only process this message to conform to the specs
- * for delayed clipboard rendering in Win32. You might think
- * that we need to release ownership of the X11 selections, but
- * we do not, because a WM_DRAWCLIPBOARD message will closely
- * follow this message and reassert ownership of the X11
- * selections, handling the issue for us.
- */
- winDebug ("winClipboardWindowProc - WM_DESTROYCLIPBOARD - Ignored.\n");
- return 0;
-
- case WM_RENDERFORMAT:
- case WM_RENDERALLFORMATS:
- {
- int iReturn;
- Display *pDisplay = g_pClipboardDisplay;
- Window iWindow = g_iClipboardWindow;
- Bool fConvertToUnicode;
-
- winDebug ("winClipboardWindowProc - WM_RENDER*FORMAT - Hello.\n");
-
- /* Flag whether to convert to Unicode or not */
- if (message == WM_RENDERALLFORMATS)
- fConvertToUnicode = FALSE;
- else
- fConvertToUnicode = g_fUnicodeSupport && (CF_UNICODETEXT == wParam);
-
- /* Request the selection contents */
- iReturn = XConvertSelection (pDisplay,
- g_atomLastOwnedSelection,
- XInternAtom (pDisplay,
- "COMPOUND_TEXT", False),
- XInternAtom (pDisplay,
- "CYGX_CUT_BUFFER", False),
- iWindow,
- CurrentTime);
- if (iReturn == BadAtom || iReturn == BadWindow)
- {
- winErrorFVerb (1, "winClipboardWindowProc - WM_RENDER*FORMAT - "
- "XConvertSelection () failed\n");
- break;
- }
-
- /* Special handling for WM_RENDERALLFORMATS */
- if (message == WM_RENDERALLFORMATS)
- {
- /* We must open and empty the clipboard */
-
- /* Close clipboard if we have it open already */
- if (GetOpenClipboardWindow () == hwnd)
- {
- CloseClipboard ();
- }
-
- if (!OpenClipboard (hwnd))
- {
- winErrorFVerb (1, "winClipboardWindowProc - WM_RENDER*FORMATS - "
- "OpenClipboard () failed: %08x\n",
- GetLastError ());
- break;
- }
-
- if (!EmptyClipboard ())
- {
- winErrorFVerb (1, "winClipboardWindowProc - WM_RENDER*FORMATS - "
- "EmptyClipboard () failed: %08x\n",
- GetLastError ());
- break;
- }
- }
-
- /* Process the SelectionNotify event */
- iReturn = winProcessXEventsTimeout (hwnd,
- iWindow,
- pDisplay,
- fConvertToUnicode,
- WIN_POLL_TIMEOUT);
- if (WIN_XEVENTS_CONVERT == iReturn)
- {
- /*
- * The selection was offered for conversion first, so we have
- * to process a second SelectionNotify event to get the actual
- * data in the selection.
- */
- iReturn = winProcessXEventsTimeout (hwnd,
- iWindow,
- pDisplay,
- fConvertToUnicode,
- WIN_POLL_TIMEOUT);
- }
-
- /*
- * The last of the up-to two calls to winProcessXEventsTimeout
- * from above had better have seen a notify event, or else we
- * are dealing with a buggy or old X11 app. In these cases we
- * have to paste some fake data to the Win32 clipboard to
- * satisfy the requirement that we write something to it.
- */
- if (WIN_XEVENTS_NOTIFY != iReturn)
- {
- /* Paste no data, to satisfy required call to SetClipboardData */
- if (g_fUnicodeSupport)
- SetClipboardData (CF_UNICODETEXT, NULL);
- SetClipboardData (CF_TEXT, NULL);
-
- ErrorF("winClipboardWindowProc - timed out waiting for WIN_XEVENTS_NOTIFY\n");
- }
-
- /* BPS - Post ourselves a user message whose handler will reset the
- * delayed rendering mechanism after the paste is complete. This is
- * necessary because calling SetClipboardData() with a NULL argument
- * here will cause the data we just put on the clipboard to be lost!
- */
- PostMessage(g_hwndClipboard, WM_USER_PASTE_COMPLETE, 0, 0);
-
- /* Special handling for WM_RENDERALLFORMATS */
- if (message == WM_RENDERALLFORMATS)
- {
- /* We must close the clipboard */
-
- if (!CloseClipboard ())
- {
- winErrorFVerb (1, "winClipboardWindowProc - WM_RENDERALLFORMATS - "
- "CloseClipboard () failed: %08x\n",
- GetLastError ());
- break;
- }
- }
-
- winDebug ("winClipboardWindowProc - WM_RENDER*FORMAT - Returning.\n");
- return 0;
- }
- /* BPS - This WM_USER message is posted by us. It gives us the opportunity
- * to reset the delayed rendering mechanism after each and every paste
- * from an X app to a Windows app. Without such a mechanism, subsequent
- * changes of selection in the X app owning the selection are not
- * reflected in pastes into Windows apps, since Windows won't send us the
- * WM_RENDERFORMAT message unless someone has set changed data (or NULL)
- * on the clipboard. */
- case WM_USER_PASTE_COMPLETE:
- {
- if (hwnd != GetClipboardOwner ())
- /* In case we've lost the selection since posting the message */
- return 0;
- winDebug ("winClipboardWindowProc - WM_USER_PASTE_COMPLETE\n");
-
- /* Set up for another delayed rendering callback */
- OpenClipboard (g_hwndClipboard);
-
- /* Take ownership of the Windows clipboard */
- EmptyClipboard ();
-
- /* Advertise Unicode if we support it */
- if (g_fUnicodeSupport)
- SetClipboardData (CF_UNICODETEXT, NULL);
-
- /* Always advertise regular text */
- SetClipboardData (CF_TEXT, NULL);
-
- /* Release the clipboard */
- CloseClipboard ();
- }
- return 0;
- }
-
- /* Let Windows perform default processing for unhandled messages */
- return DefWindowProc (hwnd, message, wParam, lParam);
-}
-
-
-/*
- * Process any pending Windows messages
- */
-
-BOOL
-winClipboardFlushWindowsMessageQueue (HWND hwnd)
-{
- MSG msg;
-
- /* Flush the messaging window queue */
- /* NOTE: Do not pass the hwnd of our messaging window to PeekMessage,
- * as this will filter out many non-window-specific messages that
- * are sent to our thread, such as WM_QUIT.
- */
- while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
- {
- /* Dispatch the message if not WM_QUIT */
- if (msg.message == WM_QUIT)
- return FALSE;
- else
- DispatchMessage (&msg);
- }
-
- return TRUE;
-}
+/*
+ *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
+ *Copyright (C) Colin Harrison 2005-2008
+ *
+ *Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ *"Software"), to deal in the Software without restriction, including
+ *without limitation the rights to use, copy, modify, merge, publish,
+ *distribute, sublicense, and/or sell copies of the Software, and to
+ *permit persons to whom the Software is furnished to do so, subject to
+ *the following conditions:
+ *
+ *The above copyright notice and this permission notice shall be
+ *included in all copies or substantial portions of the Software.
+ *
+ *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
+ *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *Except as contained in this notice, the name of the copyright holder(s)
+ *and author(s) shall not be used in advertising or otherwise to promote
+ *the sale, use or other dealings in this Software without prior written
+ *authorization from the copyright holder(s) and author(s).
+ *
+ * Authors: Harold L Hunt II
+ * Colin Harrison
+ */
+
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+#include <sys/types.h>
+#include <sys/time.h>
+#include "winclipboard.h"
+#include "misc.h"
+#include "winmsg.h"
+#include "objbase.h"
+#include "ddraw.h"
+#include "winwindow.h"
+
+/*
+ * Constants
+ */
+
+#define WIN_POLL_TIMEOUT 1
+
+/*
+ * References to external symbols
+ */
+
+extern Bool g_fUseUnicode;
+extern Bool g_fUnicodeSupport;
+extern void *g_pClipboardDisplay;
+extern Window g_iClipboardWindow;
+extern Atom g_atomLastOwnedSelection;
+extern Bool g_fClipboardStarted;
+/* BPS - g_hwndClipboard needed for X app->Windows paste fix */
+extern HWND g_hwndClipboard;
+extern Bool g_fClipboardPrimary;
+
+/*
+ * Local function prototypes
+ */
+
+static int
+winProcessXEventsTimeout (HWND hwnd, int iWindow, Display *pDisplay,
+ Bool fUseUnicode, int iTimeoutSec);
+
+
+/*
+ * Process X events up to specified timeout
+ */
+
+static int
+winProcessXEventsTimeout (HWND hwnd, int iWindow, Display *pDisplay,
+ Bool fUseUnicode, int iTimeoutSec)
+{
+ int iConnNumber;
+ struct timeval tv;
+ int iReturn;
+ DWORD dwStopTime = (GetTickCount () / 1000) + iTimeoutSec;
+
+ /* Make sure the output messages are sent before waiting on a response. */
+ iReturn = winClipboardFlushXEvents (hwnd,
+ iWindow,
+ pDisplay,
+ fUseUnicode,
+ TRUE);
+ if (WIN_XEVENTS_NOTIFY == iReturn)
+ {
+ /* Bail out if notify processed */
+ return iReturn;
+ }
+
+ /* Get our connection number */
+ iConnNumber = ConnectionNumber (pDisplay);
+
+ /* Loop for X events */
+ while (1)
+ {
+ fd_set fdsRead;
+
+ /* Setup the file descriptor set */
+ FD_ZERO (&fdsRead);
+ FD_SET (iConnNumber, &fdsRead);
+
+ /* Adjust timeout */
+ tv.tv_sec = dwStopTime - (GetTickCount () / 1000);
+ tv.tv_usec = 0;
+
+ /* Break out if no time left */
+ if (tv.tv_sec < 0)
+ return WIN_XEVENTS_SUCCESS;
+
+ /* Wait for an X event */
+ iReturn = select (iConnNumber + 1,/* Highest fds number */
+ &fdsRead, /* Read mask */
+ NULL, /* No write mask */
+ NULL, /* No exception mask */
+ &tv); /* No timeout */
+ if (iReturn < 0)
+ {
+ ErrorF ("winProcessXEventsTimeout - Call to select () failed: %d (%x). "
+ "Bailing.\n", iReturn, WSAGetLastError());
+ break;
+ }
+
+ /* Branch on which descriptor became active */
+ if (FD_ISSET (iConnNumber, &fdsRead))
+ {
+ /* Process X events */
+ /* Exit when we see that server is shutting down */
+ iReturn = winClipboardFlushXEvents (hwnd,
+ iWindow,
+ pDisplay,
+ fUseUnicode,
+ TRUE);
+ if (WIN_XEVENTS_NOTIFY == iReturn
+ || WIN_XEVENTS_CONVERT == iReturn)
+ {
+ /* Bail out if convert or notify processed */
+ return iReturn;
+ }
+ }
+ }
+
+ return WIN_XEVENTS_SUCCESS;
+}
+
+/*
+ * Process a given Windows message
+ */
+
+LRESULT CALLBACK
+winClipboardWindowProc (HWND hwnd, UINT message,
+ WPARAM wParam, LPARAM lParam)
+{
+ static HWND s_hwndNextViewer;
+
+ /* Branch on message type */
+ switch (message)
+ {
+ case WM_DESTROY:
+ {
+ winDebug ("winClipboardWindowProc - WM_DESTROY\n");
+
+ /* Remove ourselves from the clipboard chain */
+ ChangeClipboardChain (hwnd, s_hwndNextViewer);
+
+ s_hwndNextViewer = NULL;
+ g_hwndClipboard = NULL;
+ PostQuitMessage (0);
+ }
+ return 0;
+
+
+ case WM_CREATE:
+ {
+ HWND first, next;
+ DWORD error_code = 0;
+ winDebug ("winClipboardWindowProc - WM_CREATE\n");
+
+ /* Add ourselves to the clipboard viewer chain */
+ s_hwndNextViewer = SetClipboardViewer (hwnd);
+ #ifdef _DEBUG
+ if (s_hwndNextViewer== hwnd)
+ {
+ ErrorF("WM_CREATE: SetClipboardViewer returned own window. This causes an endless loop, so reset s_hwndNextViewer. ");
+ s_hwndNextViewer=NULL;
+ }
+ #endif
+
+ }
+ return 0;
+
+
+ case WM_CHANGECBCHAIN:
+ {
+ winDebug ("winClipboardWindowProc - WM_CHANGECBCHAIN: wParam(%x) "
+ "lParam(%x) s_hwndNextViewer(%x)\n",
+ wParam, lParam, s_hwndNextViewer);
+
+ if ((HWND) wParam == s_hwndNextViewer)
+ {
+ s_hwndNextViewer = (HWND) lParam;
+ if (s_hwndNextViewer == hwnd)
+ {
+ winDebug("WM_CHANGECBCHAIN: trying to set s_hwndNextViewer to own window. Resetting it back to NULL. ");
+ s_hwndNextViewer=NULL; /* This would cause an endless loop, so break it by ending the loop here. I have seen this happening, why??? */
+ }
+ }
+ else if (s_hwndNextViewer)
+ SendMessage (s_hwndNextViewer, message,
+ wParam, lParam);
+
+ }
+ winDebug ("winClipboardWindowProc - WM_CHANGECBCHAIN: Exit\n");
+ return 0;
+
+ case WM_WM_REINIT:
+ {
+ /* Ensure that we're in the clipboard chain. Some apps,
+ * WinXP's remote desktop for one, don't play nice with the
+ * chain. This message is called whenever we receive a
+ * WM_ACTIVATEAPP message to ensure that we continue to
+ * receive clipboard messages.
+ *
+ * It might be possible to detect if we're still in the chain
+ * by calling SendMessage (GetClipboardViewer(),
+ * WM_DRAWCLIPBOARD, 0, 0); and then seeing if we get the
+ * WM_DRAWCLIPBOARD message. That, however, might be more
+ * expensive than just putting ourselves back into the chain.
+ */
+
+ HWND first, next;
+ DWORD error_code = 0;
+ if (!g_hwndClipboard)
+ return 0;
+ winDebug ("winClipboardWindowProc - WM_WM_REINIT: Enter\n");
+
+ first = GetClipboardViewer(); /* Get handle to first viewer in chain. */
+ if (first != hwnd)
+ {
+ winDebug (" WM_WM_REINIT: Replacing us(%x) with %x at head "
+ "of chain\n", hwnd, s_hwndNextViewer);
+ if (!wParam) ChangeClipboardChain (hwnd, s_hwndNextViewer); /* When wParam is set, the window was already removed from the chain */
+ winDebug (" WM_WM_REINIT: Putting us back at head of chain.\n");
+ s_hwndNextViewer = SetClipboardViewer (hwnd);
+ #ifdef _DEBUG
+ if (s_hwndNextViewer== hwnd)
+ {
+ ErrorF("WM_WM_REINIT: SetClipboardViewer returned own window. This causes an endless loop, so reset s_hwndNextViewer. ");
+ s_hwndNextViewer=NULL;
+ }
+ #endif
+ }
+ winDebug ("winClipboardWindowProc - WM_WM_REINIT: Exit\n");
+ }
+ return 0;
+
+
+ case WM_DRAWCLIPBOARD:
+ {
+ static Atom atomClipboard;
+ static int generation;
+ static Bool s_fProcessingDrawClipboard = FALSE;
+ Display *pDisplay = g_pClipboardDisplay;
+ Window iWindow = g_iClipboardWindow;
+ int iReturn;
+
+ winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD 0x%x 0x%x 0x%x: Enter\n",hwnd,wParam,lParam);
+
+ if (!g_fClipboardStarted)
+ {
+ winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit with no processing\n");
+ if (s_hwndNextViewer)
+ SendMessage (s_hwndNextViewer, message, wParam, lParam);
+ return 0;
+ }
+
+ if (generation != serverGeneration)
+ {
+ generation = serverGeneration;
+ atomClipboard = XInternAtom (pDisplay, "CLIPBOARD", False);
+ }
+
+ /*
+ * We've occasionally seen a loop in the clipboard chain.
+ * Try and fix it on the first hint of recursion.
+ */
+ if (! s_fProcessingDrawClipboard)
+ {
+ s_fProcessingDrawClipboard = TRUE;
+ }
+ else
+ {
+ /* Attempt to break the nesting by getting out of the chain, twice?, and then fix and bail */
+ ChangeClipboardChain (hwnd, s_hwndNextViewer);
+ winFixClipboardChain(1);
+ ErrorF ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+ "Nested calls detected. Re-initing.\n");
+ winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
+ s_fProcessingDrawClipboard = FALSE;
+ return 0;
+ }
+
+ /*
+ * Do not take ownership of the X11 selections when something
+ * other than CF_TEXT or CF_UNICODETEXT has been copied
+ * into the Win32 clipboard.
+ */
+ if (!IsClipboardFormatAvailable (CF_TEXT)
+ && !IsClipboardFormatAvailable (CF_UNICODETEXT))
+ {
+
+ winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+ "Clipboard does not contain CF_TEXT nor "
+ "CF_UNICODETEXT.\n");
+
+ /*
+ * We need to make sure that the X Server has processed
+ * previous XSetSelectionOwner messages.
+ */
+ XSync (pDisplay, FALSE);
+
+ if (g_fClipboardPrimary)
+ {
+ /* Release PRIMARY selection if owned */
+ iReturn = XGetSelectionOwner (pDisplay, XA_PRIMARY);
+ if (iReturn == g_iClipboardWindow)
+ {
+ winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+ "PRIMARY selection is owned by us.\n");
+ XSetSelectionOwner (pDisplay,
+ XA_PRIMARY,
+ None,
+ CurrentTime);
+ }
+ else if (BadWindow == iReturn || BadAtom == iReturn)
+ ErrorF ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+ "XGetSelection failed for PRIMARY: %d\n", iReturn);
+ }
+ /* Release CLIPBOARD selection if owned */
+ iReturn = XGetSelectionOwner (pDisplay,
+ atomClipboard);
+ if (iReturn == g_iClipboardWindow)
+ {
+ winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+ "CLIPBOARD selection is owned by us.\n");
+ XSetSelectionOwner (pDisplay,
+ atomClipboard,
+ None,
+ CurrentTime);
+ }
+ else if (BadWindow == iReturn || BadAtom == iReturn)
+ ErrorF ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+ "XGetSelection failed for CLIPBOARD: %d\n", iReturn);
+
+ winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
+ s_fProcessingDrawClipboard = FALSE;
+ if (s_hwndNextViewer)
+ SendMessage (s_hwndNextViewer, message, wParam, lParam);
+ return 0;
+ }
+ /* Only reassert ownership when we did not change the clipboard ourselves */
+ if (hwnd!=(HWND)wParam)
+ {
+ if (g_fClipboardPrimary)
+ {
+ /* Reassert ownership of PRIMARY */
+ iReturn = XSetSelectionOwner (pDisplay,
+ XA_PRIMARY,
+ iWindow,
+ CurrentTime);
+ if (iReturn == BadAtom || iReturn == BadWindow ||
+ XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow)
+ {
+ ErrorF ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+ "Could not reassert ownership of PRIMARY\n");
+ }
+ else
+ {
+ winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+ "Reasserted ownership of PRIMARY\n");
+ }
+ }
+ /* Reassert ownership of the CLIPBOARD */
+ iReturn = XSetSelectionOwner (pDisplay,
+ atomClipboard,
+ iWindow,
+ CurrentTime);
+
+ if (iReturn == BadAtom || iReturn == BadWindow ||
+ XGetSelectionOwner (pDisplay, atomClipboard) != iWindow)
+ {
+ ErrorF ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+ "Could not reassert ownership of CLIPBOARD\n");
+ }
+ else
+ {
+ winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+ "Reasserted ownership of CLIPBOARD\n");
+ }
+
+ /* Flush the pending SetSelectionOwner event now */
+ XFlush (pDisplay);
+ }
+
+ s_fProcessingDrawClipboard = FALSE;
+ winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
+ /* Pass the message on the next window in the clipboard viewer chain */
+ if (s_hwndNextViewer)
+ SendMessage (s_hwndNextViewer, message, wParam, lParam);
+ return 0;
+
+ }
+
+ case WM_DESTROYCLIPBOARD:
+ /*
+ * NOTE: Intentionally do nothing.
+ * Changes in the Win32 clipboard are handled by WM_DRAWCLIPBOARD
+ * above. We only process this message to conform to the specs
+ * for delayed clipboard rendering in Win32. You might think
+ * that we need to release ownership of the X11 selections, but
+ * we do not, because a WM_DRAWCLIPBOARD message will closely
+ * follow this message and reassert ownership of the X11
+ * selections, handling the issue for us.
+ */
+ winDebug ("winClipboardWindowProc - WM_DESTROYCLIPBOARD - Ignored.\n");
+ return 0;
+
+ case WM_RENDERFORMAT:
+ case WM_RENDERALLFORMATS:
+ {
+ int iReturn;
+ Display *pDisplay = g_pClipboardDisplay;
+ Window iWindow = g_iClipboardWindow;
+ Bool fConvertToUnicode;
+
+ winDebug ("winClipboardWindowProc - WM_RENDER*FORMAT - Hello.\n");
+
+ /* Flag whether to convert to Unicode or not */
+ if (message == WM_RENDERALLFORMATS)
+ fConvertToUnicode = FALSE;
+ else
+ fConvertToUnicode = g_fUnicodeSupport && (CF_UNICODETEXT == wParam);
+
+ /* Request the selection contents */
+ iReturn = XConvertSelection (pDisplay,
+ g_atomLastOwnedSelection,
+ XInternAtom (pDisplay,
+ "COMPOUND_TEXT", False),
+ XInternAtom (pDisplay,
+ WIN_LOCAL_PROPERTY, False),
+ iWindow,
+ CurrentTime);
+ if (iReturn == BadAtom || iReturn == BadWindow)
+ {
+ ErrorF ("winClipboardWindowProc - WM_RENDER*FORMAT - "
+ "XConvertSelection () failed\n");
+ break;
+ }
+
+ /* Special handling for WM_RENDERALLFORMATS */
+ if (message == WM_RENDERALLFORMATS)
+ {
+ /* We must open and empty the clipboard */
+ if (!OpenClipboard (hwnd))
+ {
+ ErrorF ("winClipboardWindowProc - WM_RENDER*FORMATS - "
+ "OpenClipboard () failed: %08x\n",
+ GetLastError ());
+ break;
+ }
+
+ if (!EmptyClipboard ())
+ {
+ ErrorF ("winClipboardWindowProc - WM_RENDER*FORMATS - "
+ "EmptyClipboard () failed: %08x\n",
+ GetLastError ());
+ CloseClipboard ();
+ break;
+ }
+ }
+
+ /* Process the SelectionNotify event */
+ do {
+ iReturn = winProcessXEventsTimeout (hwnd,
+ iWindow,
+ pDisplay,
+ fConvertToUnicode,
+ WIN_POLL_TIMEOUT);
+ } while (WIN_XEVENTS_CONVERT == iReturn);
+
+
+ /*
+ * The last call to winProcessXEventsTimeout
+ * from above had better have seen a notify event, or else we
+ * are dealing with a buggy or old X11 app. In these cases we
+ * have to paste some fake data to the Win32 clipboard to
+ * satisfy the requirement that we write something to it.
+ */
+ if (WIN_XEVENTS_NOTIFY != iReturn)
+ {
+ ErrorF("winClipboardWindowProc - winProcessXEventsTimeout should have returned WIN_XEVENTS_NOTIFY was %d\n",iReturn);
+ /* Paste no data, to satisfy required call to SetClipboardData */
+ if (g_fUnicodeSupport)
+ SetClipboardData (CF_UNICODETEXT, NULL);
+ SetClipboardData (CF_TEXT, NULL);
+
+ ErrorF("winClipboardWindowProc - timed out waiting for WIN_XEVENTS_NOTIFY\n");
+ }
+
+ /* Special handling for WM_RENDERALLFORMATS */
+ if (message == WM_RENDERALLFORMATS)
+ {
+ /* We must close the clipboard */
+
+ if (!CloseClipboard ())
+ {
+ ErrorF ("winClipboardWindowProc - WM_RENDERALLFORMATS - "
+ "CloseClipboard () failed: %08x\n",
+ GetLastError ());
+ break;
+ }
+ }
+
+ winDebug ("winClipboardWindowProc - WM_RENDER*FORMAT - Returning.\n");
+ return 0;
+ }
+ }
+
+ /* Let Windows perform default processing for unhandled messages */
+ return DefWindowProc (hwnd, message, wParam, lParam);
+}
+
+
+/*
+ * Process any pending Windows messages
+ */
+
+BOOL
+winClipboardFlushWindowsMessageQueue (HWND hwnd)
+{
+ MSG msg;
+
+ /* Flush the messaging window queue */
+ /* NOTE: Do not pass the hwnd of our messaging window to PeekMessage,
+ * as this will filter out many non-window-specific messages that
+ * are sent to our thread, such as WM_QUIT.
+ */
+ while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
+ {
+ /* Dispatch the message if not WM_QUIT */
+ if (msg.message == WM_QUIT)
+ return FALSE;
+ else
+ DispatchMessage (&msg);
+ }
+
+ return TRUE;
+}
diff --git a/xorg-server/hw/xwin/winclipboardwrappers.c b/xorg-server/hw/xwin/winclipboardwrappers.c
index ddc7814d7..cbf9a8ed2 100644
--- a/xorg-server/hw/xwin/winclipboardwrappers.c
+++ b/xorg-server/hw/xwin/winclipboardwrappers.c
@@ -42,7 +42,6 @@
* Constants
*/
-#define CLIP_NUM_CALLS 4
#define CLIP_NUM_SELECTIONS 2
#define CLIP_OWN_PRIMARY 0
#define CLIP_OWN_CLIPBOARD 1
@@ -53,7 +52,6 @@
*/
int winProcEstablishConnection(ClientPtr /* client */);
-int winProcQueryTree(ClientPtr /* client */);
int winProcSetSelectionOwner(ClientPtr /* client */);
@@ -72,111 +70,13 @@ extern Bool g_fClipboard;
extern Window g_iClipboardWindow;
extern Atom g_atomLastOwnedSelection;
extern HWND g_hwndClipboard;
+extern Bool g_fClipboardPrimary;
extern winDispatchProcPtr winProcEstablishConnectionOrig;
-extern winDispatchProcPtr winProcQueryTreeOrig;
extern winDispatchProcPtr winProcSetSelectionOwnerOrig;
/*
- * Wrapper for internal QueryTree function.
- * Hides the clipboard client when it is the only client remaining.
- */
-
-int
-winProcQueryTree (ClientPtr client)
-{
- int iReturn;
-
- ErrorF ("winProcQueryTree - Hello\n");
-
- /*
- * This procedure is only used for initialization.
- * We can unwrap the original procedure at this point
- * so that this function is no longer called until the
- * server resets and the function is wrapped again.
- */
- ProcVector[X_QueryTree] = winProcQueryTreeOrig;
-
- /*
- * Call original function and bail if it fails.
- * NOTE: We must do this first, since we need XdmcpOpenDisplay
- * to be called before we initialize our clipboard client.
- */
- iReturn = (*winProcQueryTreeOrig) (client);
- if (iReturn != 0)
- {
- ErrorF ("winProcQueryTree - ProcQueryTree failed, bailing.\n");
- return iReturn;
- }
-
- /* Make errors more obvious */
- winProcQueryTreeOrig = NULL;
-
- /* Do nothing if clipboard is not enabled */
- if (!g_fClipboard)
- {
- ErrorF ("winProcQueryTree - Clipboard is not enabled, "
- "returning.\n");
- return iReturn;
- }
-
- /* If the clipboard client has already been started, abort */
- if (g_fClipboardLaunched)
- {
- ErrorF ("winProcQueryTree - Clipboard client already "
- "launched, returning.\n");
- return iReturn;
- }
-
- /* Startup the clipboard client if clipboard mode is being used */
- if (g_fXdmcpEnabled && g_fClipboard)
- {
- /*
- * NOTE: The clipboard client is started here for a reason:
- * 1) Assume you are using XDMCP (e.g. XWin -query %hostname%)
- * 2) If the clipboard client attaches during X Server startup,
- * then it becomes the "magic client" that causes the X Server
- * to reset if it exits.
- * 3) XDMCP calls KillAllClients when it starts up.
- * 4) The clipboard client is a client, so it is killed.
- * 5) The clipboard client is the "magic client", so the X Server
- * resets itself.
- * 6) This repeats ad infinitum.
- * 7) We avoid this by waiting until at least one client (could
- * be XDM, could be another client) connects, which makes it
- * almost certain that the clipboard client will not connect
- * until after XDM when using XDMCP.
- * 8) Unfortunately, there is another problem.
- * 9) XDM walks the list of windows with XQueryTree,
- * killing any client it finds with a window.
- * 10)Thus, when using XDMCP we wait until the first call
- * to ProcQueryTree before we startup the clipboard client.
- * This should prevent XDM from finding the clipboard client,
- * since it has not yet created a window.
- * 11)Startup when not using XDMCP is handled in
- * winProcEstablishConnection.
- */
-
- /* Create the clipboard client thread */
- if (!winInitClipboard ())
- {
- ErrorF ("winProcQueryTree - winClipboardInit "
- "failed.\n");
- return iReturn;
- }
-
- ErrorF ("winProcQueryTree - winInitClipboard returned.\n");
- }
-
- /* Flag that clipboard client has been launched */
- g_fClipboardLaunched = TRUE;
-
- return iReturn;
-}
-
-
-/*
* Wrapper for internal EstablishConnection function.
* Initializes internal clients that must not be started until
* an external client has connected.
@@ -189,12 +89,14 @@ winProcEstablishConnection (ClientPtr client)
static int s_iCallCount = 0;
static unsigned long s_ulServerGeneration = 0;
- if (s_iCallCount == 0 || s_iCallCount == CLIP_NUM_CALLS) ErrorF ("winProcEstablishConnection - Hello\n");
+ #ifdef WINDBG
+ if (s_iCallCount == 0) winDebug ("winProcEstablishConnection - Hello\n");
+ #endif
/* Do nothing if clipboard is not enabled */
if (!g_fClipboard)
{
- ErrorF ("winProcEstablishConnection - Clipboard is not enabled, "
+ winDebug ("winProcEstablishConnection - Clipboard is not enabled, "
"returning.\n");
/* Unwrap the original function, call it, and return */
@@ -217,18 +119,6 @@ winProcEstablishConnection (ClientPtr client)
/* Increment call count */
++s_iCallCount;
- /* Wait for CLIP_NUM_CALLS when Xdmcp is enabled */
- if (g_fXdmcpEnabled
- && !g_fClipboardLaunched
- && s_iCallCount < CLIP_NUM_CALLS)
- {
- if (s_iCallCount == 1) ErrorF ("winProcEstablishConnection - Xdmcp, waiting to "
- "start clipboard client until %dth call", CLIP_NUM_CALLS);
- if (s_iCallCount == CLIP_NUM_CALLS - 1) ErrorF (".\n");
- else ErrorF (".");
- return (*winProcEstablishConnectionOrig) (client);
- }
-
/*
* This procedure is only used for initialization.
* We can unwrap the original procedure at this point
@@ -256,7 +146,7 @@ winProcEstablishConnection (ClientPtr client)
/* If the clipboard client has already been started, abort */
if (g_fClipboardLaunched)
{
- ErrorF ("winProcEstablishConnection - Clipboard client already "
+ winDebug ("winProcEstablishConnection - Clipboard client already "
"launched, returning.\n");
return iReturn;
}
@@ -279,13 +169,6 @@ winProcEstablishConnection (ClientPtr client)
* be XDM, could be another client) connects, which makes it
* almost certain that the clipboard client will not connect
* until after XDM when using XDMCP.
- * 8) Unfortunately, there is another problem.
- * 9) XDM walks the list of windows with XQueryTree,
- * killing any client it finds with a window.
- * 10)Thus, when using XDMCP we wait until CLIP_NUM_CALLS
- * to ProcEstablishCeonnection before we startup the clipboard
- * client. This should prevent XDM from finding the clipboard
- * client, since it has not yet created a window.
*/
/* Create the clipboard client thread */
@@ -296,7 +179,7 @@ winProcEstablishConnection (ClientPtr client)
return iReturn;
}
- ErrorF ("winProcEstablishConnection - winInitClipboard returned.\n");
+ winDebug ("winProcEstablishConnection - winInitClipboard returned.\n");
}
/* Flag that clipboard client has been launched */
@@ -310,28 +193,26 @@ winProcEstablishConnection (ClientPtr client)
* Wrapper for internal SetSelectionOwner function.
* Grabs ownership of Windows clipboard when X11 clipboard owner changes.
*/
-
int
winProcSetSelectionOwner (ClientPtr client)
{
int i;
DrawablePtr pDrawable;
WindowPtr pWindow = None;
- Bool fOwnedToNotOwned = FALSE;
static Window s_iOwners[CLIP_NUM_SELECTIONS] = {None};
static unsigned long s_ulServerGeneration = 0;
REQUEST(xSetSelectionOwnerReq);
REQUEST_SIZE_MATCH(xSetSelectionOwnerReq);
- winDebug("winProcSetSelectionOwner - Hello.\n");
+ winDebug ("winProcSetSelectionOwner - Hello.\n");
/* Watch for server reset */
if (s_ulServerGeneration != serverGeneration)
{
/* Save new generation number */
s_ulServerGeneration = serverGeneration;
-
+
/* Initialize static variables */
for (i = 0; i < CLIP_NUM_SELECTIONS; ++i)
s_iOwners[i] = None;
@@ -340,9 +221,9 @@ winProcSetSelectionOwner (ClientPtr client)
/* Abort if clipboard not completely initialized yet */
if (!g_fClipboardStarted)
{
- /* ErrorF ("winProcSetSelectionOwner - Clipboard not yet started, "
- "aborting.\n"); */
- goto winProcSetSelectionOwner_Done;
+ winDebug ("winProcSetSelectionOwner - Clipboard not yet started, "
+ "aborting.\n");
+ goto winProcSetSelectionOwner_Done;
}
/* Grab window if we have one */
@@ -359,29 +240,27 @@ winProcSetSelectionOwner (ClientPtr client)
/* Now we either have a valid window or None */
/* Save selection owners for monitored selections, ignore other selections */
- if (XA_PRIMARY == stuff->selection)
+ if (XA_PRIMARY == stuff->selection && g_fClipboardPrimary)
{
/* Look for owned -> not owned transition */
if (None == stuff->window
&& None != s_iOwners[CLIP_OWN_PRIMARY])
{
- fOwnedToNotOwned = TRUE;
+ winDebug ("winProcSetSelectionOwner - PRIMARY - Going from "
+ "owned to not owned.\n");
- winDebug("winProcSetSelectionOwner - PRIMARY - Going from "
- "owned to not owned.\n");
-
- /* Adjust last owned selection */
+ /* Adjust last owned selection */
if (None != s_iOwners[CLIP_OWN_CLIPBOARD])
g_atomLastOwnedSelection = MakeAtom ("CLIPBOARD", 9, TRUE);
else
g_atomLastOwnedSelection = None;
}
-
+
/* Save new selection owner or None */
s_iOwners[CLIP_OWN_PRIMARY] = stuff->window;
- winDebug("winProcSetSelectionOwner - PRIMARY - Now owned by: %d\n",
- stuff->window);
+ winDebug ("winProcSetSelectionOwner - PRIMARY - Now owned by: 0x%x (clipboard is 0x%x)\n",
+ stuff->window,g_iClipboardWindow);
}
else if (MakeAtom ("CLIPBOARD", 9, TRUE) == stuff->selection)
{
@@ -389,13 +268,11 @@ winProcSetSelectionOwner (ClientPtr client)
if (None == stuff->window
&& None != s_iOwners[CLIP_OWN_CLIPBOARD])
{
- fOwnedToNotOwned = TRUE;
-
- winDebug("winProcSetSelectionOwner - CLIPBOARD - Going from "
- "owned to not owned.\n");
+ winDebug ("winProcSetSelectionOwner - CLIPBOARD - Going from "
+ "owned to not owned.\n");
/* Adjust last owned selection */
- if (None != s_iOwners[CLIP_OWN_PRIMARY])
+ if ((None != s_iOwners[CLIP_OWN_PRIMARY]) && g_fClipboardPrimary)
g_atomLastOwnedSelection = XA_PRIMARY;
else
g_atomLastOwnedSelection = None;
@@ -404,9 +281,8 @@ winProcSetSelectionOwner (ClientPtr client)
/* Save new selection owner or None */
s_iOwners[CLIP_OWN_CLIPBOARD] = stuff->window;
- winDebug("winProcSetSelectionOwner - CLIPBOARD - Now owned by: %d\n",
- stuff->window);
-
+ winDebug ("winProcSetSelectionOwner - CLIPBOARD - Now owned by: 0x%x, clipboard is 0x%x\n",
+ stuff->window,g_iClipboardWindow);
}
else
goto winProcSetSelectionOwner_Done;
@@ -421,44 +297,17 @@ winProcSetSelectionOwner (ClientPtr client)
if (g_iClipboardWindow == s_iOwners[CLIP_OWN_CLIPBOARD])
s_iOwners[CLIP_OWN_CLIPBOARD] = None;
- /*
- * Handle case when selection is being disowned,
- * WM_DRAWCLIPBOARD did not do the disowning,
- * both monitored selections are no longer owned,
- * an owned to not owned transition was detected,
- * and we currently own the Win32 clipboard.
- */
- if (stuff->window == None
- && s_iOwners[CLIP_OWN_PRIMARY] == None
- && s_iOwners[CLIP_OWN_CLIPBOARD] == None
- && fOwnedToNotOwned
- && g_hwndClipboard != NULL
- && g_hwndClipboard == GetClipboardOwner ())
- {
- winDebug("winProcSetSelectionOwner - We currently own the "
- "clipboard and neither the PRIMARY nor the CLIPBOARD "
- "selections are owned, releasing ownership of Win32 "
- "clipboard.\n");
-
- /* Release ownership of the Windows clipboard */
- OpenClipboard (NULL);
- EmptyClipboard ();
- CloseClipboard ();
-
- goto winProcSetSelectionOwner_Done;
- }
-
/* Abort if no window at this point */
if (None == stuff->window)
{
- winDebug("winProcSetSelectionOwner - No window, returning.\n");
+ winDebug ("winProcSetSelectionOwner - No window, returning.\n");
goto winProcSetSelectionOwner_Done;
}
/* Abort if invalid selection */
if (!ValidAtom (stuff->selection))
{
- ErrorF ("winProcSetSelectionOwner - Found BadAtom, aborting.\n");
+ winDebug ("winProcSetSelectionOwner - Found BadAtom, aborting.\n");
goto winProcSetSelectionOwner_Done;
}
@@ -468,7 +317,7 @@ winProcSetSelectionOwner (ClientPtr client)
/* Abort if clipboard manager is owning the selection */
if (pDrawable->id == g_iClipboardWindow)
{
- winDebug("winProcSetSelectionOwner - We changed ownership, "
+ winDebug ("winProcSetSelectionOwner - We changed ownership, "
"aborting.\n");
goto winProcSetSelectionOwner_Done;
}
@@ -476,22 +325,16 @@ winProcSetSelectionOwner (ClientPtr client)
/* Abort if root window is taking ownership */
if (pDrawable->id == 0)
{
- ErrorF ("winProcSetSelectionOwner - Root window taking ownership, "
+ winDebug ("winProcSetSelectionOwner - Root window taking ownership, "
"aborting\n");
goto winProcSetSelectionOwner_Done;
}
- /* Close clipboard if we have it open already */
- if (GetOpenClipboardWindow () == g_hwndClipboard)
- {
- CloseClipboard ();
- }
-
/* Access the Windows clipboard */
if (!OpenClipboard (g_hwndClipboard))
{
- ErrorF ("winProcSetSelectionOwner - OpenClipboard () failed: %08x\n",
- (int) GetLastError ());
+ ErrorF ("winProcSetSelectionOwner - OpenClipboard () failed: %08x, hwnd: %08x\n",
+ (int) GetLastError (),g_hwndClipboard);
goto winProcSetSelectionOwner_Done;
}
@@ -500,9 +343,12 @@ winProcSetSelectionOwner (ClientPtr client)
{
ErrorF ("winProcSetSelectionOwner - EmptyClipboard () failed: %08x\n",
(int) GetLastError ());
+ CloseClipboard ();
goto winProcSetSelectionOwner_Done;
}
+ winDebug("winProcSetSelectionOwner - SetClipboardData NULL\n");
+
/* Advertise Unicode if we support it */
if (g_fUnicodeSupport)
SetClipboardData (CF_UNICODETEXT, NULL);
@@ -522,6 +368,6 @@ winProcSetSelectionOwner (ClientPtr client)
goto winProcSetSelectionOwner_Done;
}
- winProcSetSelectionOwner_Done:
+winProcSetSelectionOwner_Done:
return (*winProcSetSelectionOwnerOrig) (client);
}
diff --git a/xorg-server/hw/xwin/winclipboardxevents.c b/xorg-server/hw/xwin/winclipboardxevents.c
index e65717008..00bf90a28 100644
--- a/xorg-server/hw/xwin/winclipboardxevents.c
+++ b/xorg-server/hw/xwin/winclipboardxevents.c
@@ -35,13 +35,15 @@
#endif
#include "winclipboard.h"
#include "misc.h"
-
+#include "winmsg.h"
+#include <unistd.h>
/*
* References to external symbols
*/
extern Bool g_fUnicodeSupport;
+extern Bool g_fClipboardPrimary;
/*
@@ -52,7 +54,8 @@ int
winClipboardFlushXEvents (HWND hwnd,
int iWindow,
Display *pDisplay,
- Bool fUseUnicode)
+ Bool fUseUnicode,
+ Bool ClipboardOpened)
{
static Atom atomLocalProperty;
static Atom atomCompoundText;
@@ -97,6 +100,8 @@ winClipboardFlushXEvents (HWND hwnd,
/* Get the next event - will not block because one is ready */
XNextEvent (pDisplay, &event);
+ winDebug ("Received event type %d\n",event.type);
+
/* Branch on the event type */
switch (event.type)
{
@@ -105,6 +110,7 @@ winClipboardFlushXEvents (HWND hwnd,
*/
case SelectionRequest:
+#ifdef _DEBUG
{
char *pszAtomName = NULL;
winDebug("SelectionRequest - target %d\n",
@@ -115,7 +121,10 @@ winClipboardFlushXEvents (HWND hwnd,
winDebug("SelectionRequest - Target atom name %s\n", pszAtomName);
XFree (pszAtomName);
pszAtomName = NULL;
+ winDebug ("SelectionRequest - owner %d\n", event.xselectionrequest.owner);
+ winDebug ("SelectionRequest - requestor %d\n", event.xselectionrequest.requestor);
}
+#endif
/* Abort if invalid target type */
if (event.xselectionrequest.target != XA_STRING
@@ -211,27 +220,23 @@ winClipboardFlushXEvents (HWND hwnd,
goto winClipboardFlushXEvents_SelectionRequest_Done;
}
- /* Close clipboard if we have it open already */
- if (GetOpenClipboardWindow () == hwnd)
- {
- CloseClipboard ();
- }
-
/* Access the clipboard */
- if (!OpenClipboard (hwnd))
- {
- ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
- "OpenClipboard () failed: %08lx\n",
- GetLastError ());
-
- /* Abort */
- fAbort = TRUE;
- goto winClipboardFlushXEvents_SelectionRequest_Done;
- }
+ if (!ClipboardOpened)
+ {
+ if (!OpenClipboard (hwnd))
+ {
+ ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
+ "OpenClipboard () failed: %08lx\n",
+ GetLastError ());
+
+ /* Abort */
+ fAbort = TRUE;
+ goto winClipboardFlushXEvents_SelectionRequest_Done;
+ }
- /* Indicate that clipboard was opened */
- fCloseClipboard = TRUE;
-
+ /* Indicate that clipboard was opened */
+ fCloseClipboard = TRUE;
+ }
/* Setup the string style */
if (event.xselectionrequest.target == XA_STRING)
xiccesStyle = XStringStyle;
@@ -261,7 +266,16 @@ winClipboardFlushXEvents (HWND hwnd,
}
if (!hGlobal)
{
- ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
+ if (GetLastError()==ERROR_CLIPBOARD_NOT_OPEN && ClipboardOpened)
+ {
+ ErrorF("We should not have received a SelectionRequest????\n"
+ "The owner is the clipboard, but in reality it was"
+ "an X window\n");
+ /* Set the owner to None */
+ if (g_fClipboardPrimary) XSetSelectionOwner (pDisplay, XA_PRIMARY, None, CurrentTime);
+ XSetSelectionOwner (pDisplay, XInternAtom (pDisplay, "CLIPBOARD", False), None, CurrentTime);
+ }
+ ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
"GetClipboardData () failed: %08lx\n",
GetLastError ());
@@ -369,9 +383,11 @@ winClipboardFlushXEvents (HWND hwnd,
/* Release the clipboard data */
GlobalUnlock (hGlobal);
pszGlobalData = NULL;
- fCloseClipboard = FALSE;
- CloseClipboard ();
-
+ if (fCloseClipboard)
+ {
+ fCloseClipboard = FALSE;
+ CloseClipboard ();
+ }
/* Clean up */
XFree (xtpText.value);
xtpText.value = NULL;
@@ -460,9 +476,8 @@ winClipboardFlushXEvents (HWND hwnd,
/*
* SelectionNotify
*/
-
case SelectionNotify:
-
+#ifdef _DEBUG
winDebug ("winClipboardFlushXEvents - SelectionNotify\n");
{
char *pszAtomName;
@@ -471,8 +486,11 @@ winClipboardFlushXEvents (HWND hwnd,
winDebug("winClipboardFlushXEvents - SelectionNotify - ATOM: %s\n",
pszAtomName);
+ winDebug ("SelectionNotify - requestor %d\n", event.xselectionrequest.requestor);
XFree (pszAtomName);
}
+#endif
+
/*
* Request conversion of UTF8 and CompoundText targets.
@@ -574,6 +592,7 @@ winClipboardFlushXEvents (HWND hwnd,
break;
}
+#ifdef WINDBG
{
char *pszAtomName = NULL;
@@ -584,6 +603,7 @@ winClipboardFlushXEvents (HWND hwnd,
XFree (pszAtomName);
pszAtomName = NULL;
}
+#endif
if (fUseUnicode)
{
@@ -612,7 +632,7 @@ winClipboardFlushXEvents (HWND hwnd,
{
iReturnDataLen += strlen(ppszTextList[i]);
}
- pszReturnData = malloc (iReturnDataLen + 1);
+ pszReturnData = (char *) malloc (iReturnDataLen + 1);
pszReturnData[0] = '\0';
for (i = 0; i < iCount; i++)
{
@@ -623,7 +643,7 @@ winClipboardFlushXEvents (HWND hwnd,
{
ErrorF ("winClipboardFlushXEvents - SelectionNotify - "
"X*TextPropertyToTextList list_return is NULL.\n");
- pszReturnData = malloc (1);
+ pszReturnData = (char *) malloc (1);
pszReturnData[0] = '\0';
}
}
@@ -636,14 +656,17 @@ winClipboardFlushXEvents (HWND hwnd,
case XNoMemory:
ErrorF ("XNoMemory\n");
break;
+ case XLocaleNotSupported:
+ ErrorF ("XLocaleNotSupported\n");
+ break;
case XConverterNotFound:
ErrorF ("XConverterNotFound\n");
break;
default:
- ErrorF ("%d", iReturn);
+ ErrorF ("%d\n", iReturn);
break;
}
- pszReturnData = malloc (1);
+ pszReturnData = (char *) malloc (1);
pszReturnData[0] = '\0';
}
@@ -656,7 +679,7 @@ winClipboardFlushXEvents (HWND hwnd,
xtpText.nitems = 0;
/* Convert the X clipboard string to DOS format */
- winClipboardUNIXtoDOS (&pszReturnData, strlen (pszReturnData));
+ winClipboardUNIXtoDOS ((unsigned char **)&pszReturnData, strlen (pszReturnData));
if (fUseUnicode)
{
@@ -782,14 +805,32 @@ winClipboardFlushXEvents (HWND hwnd,
SetClipboardData (CF_TEXT, NULL);
return WIN_XEVENTS_NOTIFY;
- case SelectionClear:
- winDebug("SelectionClear - doing nothing\n");
- break;
+ /*
+ * SelectionClear
+ */
+ case SelectionClear:
+#ifdef _DEBUG
+ winDebug ("SelectionClear - doing nothing\n");
+ {
+ char *pszAtomName;
+
+ pszAtomName = XGetAtomName (pDisplay,
+ event.xselection.selection);
+
+ winDebug ("SelectionClear - ATOM: %s\n",
+ pszAtomName);
+ winDebug ("SelectionClear - owner %d\n", event.xselectionrequest.owner);
+
+ XFree (pszAtomName);
+ }
+#endif
+ break;
case PropertyNotify:
break;
-
+
case MappingNotify:
+ XRefreshKeyboardMapping((XMappingEvent *)&event);
break;
default:
diff --git a/xorg-server/hw/xwin/wincmap.c b/xorg-server/hw/xwin/wincmap.c
index 6cb037243..83279fd84 100644
--- a/xorg-server/hw/xwin/wincmap.c
+++ b/xorg-server/hw/xwin/wincmap.c
@@ -119,17 +119,13 @@ winInstallColormap (ColormapPtr pColormap)
winScreenPriv(pScreen);
ColormapPtr oldpmap = pScreenPriv->pcmapInstalled;
-#if CYGDEBUG
winDebug ("winInstallColormap\n");
-#endif
/* Did the colormap actually change? */
if (pColormap != oldpmap)
{
-#if CYGDEBUG
winDebug ("winInstallColormap - Colormap has changed, attempt "
"to install.\n");
-#endif
/* Was there a previous colormap? */
if (oldpmap != (ColormapPtr) None)
@@ -145,7 +141,7 @@ winInstallColormap (ColormapPtr pColormap)
/* Call the engine specific colormap install procedure */
if (!((*pScreenPriv->pwinInstallColormap) (pColormap)))
{
- winErrorFVerb (2, "winInstallColormap - Screen specific colormap install "
+ ErrorF ("winInstallColormap - Screen specific colormap install "
"procedure failed. Continuing, but colors may be "
"messed up from now on.\n");
}
@@ -163,9 +159,7 @@ winUninstallColormap (ColormapPtr pmap)
winScreenPriv(pmap->pScreen);
ColormapPtr curpmap = pScreenPriv->pcmapInstalled;
-#if CYGDEBUG
winDebug ("winUninstallColormap\n");
-#endif
/* Is the colormap currently installed? */
if (pmap != curpmap)
@@ -204,7 +198,7 @@ winStoreColors (ColormapPtr pmap,
int i;
unsigned short nRed, nGreen, nBlue;
-#if CYGDEBUG
+#ifdef WINDBG
if (ndef != 1)
winDebug ("winStoreColors - ndef: %d\n",
ndef);
@@ -228,16 +222,14 @@ winStoreColors (ColormapPtr pmap,
pCmapPriv->rgbColors[pdefs[0].pixel + i].rgbGreen = nGreen;
pCmapPriv->rgbColors[pdefs[0].pixel + i].rgbBlue = nBlue;
-#if CYGDEBUG
winDebug ("winStoreColors - nRed %d nGreen %d nBlue %d\n",
nRed, nGreen, nBlue);
-#endif
}
/* Call the engine specific store colors procedure */
if (!((pScreenPriv->pwinStoreColors) (pmap, ndef, pdefs)))
{
- winErrorFVerb (2, "winStoreColors - Engine cpecific color storage procedure "
+ ErrorF ("winStoreColors - Engine cpecific color storage procedure "
"failed. Continuing, but colors may be messed up from now "
"on.\n");
}
@@ -251,9 +243,7 @@ winResolveColor (unsigned short *pred,
unsigned short *pblue,
VisualPtr pVisual)
{
-#if CYGDEBUG
winDebug ("winResolveColor ()\n");
-#endif
miResolveColor (pred, pgreen, pblue, pVisual);
}
@@ -267,9 +257,7 @@ winCreateColormap (ColormapPtr pmap)
ScreenPtr pScreen = pmap->pScreen;
winScreenPriv(pScreen);
-#if CYGDEBUG
winDebug ("winCreateColormap\n");
-#endif
/* Allocate colormap privates */
if (!winAllocateCmapPrivates (pmap))
@@ -319,7 +307,7 @@ winDestroyColormap (ColormapPtr pColormap)
/* Call the engine specific colormap destruction procedure */
if (!((*pScreenPriv->pwinDestroyColormap) (pColormap)))
{
- winErrorFVerb (2, "winDestroyColormap - Engine specific colormap destruction "
+ ErrorF ("winDestroyColormap - Engine specific colormap destruction "
"procedure failed. Continuing, but it is possible that memory "
"was leaked, or that colors will be messed up from now on.\n");
}
@@ -328,9 +316,7 @@ winDestroyColormap (ColormapPtr pColormap)
free (pCmapPriv);
winSetCmapPriv (pColormap, NULL);
-#if CYGDEBUG
winDebug ("winDestroyColormap - Returning\n");
-#endif
}
@@ -359,10 +345,8 @@ winGetPaletteDIB (ScreenPtr pScreen, ColormapPtr pcmap)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winGetPaletteDIB - Retrieved %d colors from DIB\n",
uiColorsRetrieved);
-#endif
/* Set the DIB color table to the default screen palette */
if (SetDIBColorTable (pScreenPriv->hdcShadow,
@@ -384,11 +368,9 @@ winGetPaletteDIB (ScreenPtr pScreen, ColormapPtr pcmap)
nGreen = rgbColors[i].rgbGreen << 8;
nBlue = rgbColors[i].rgbBlue << 8;
-#if CYGDEBUG
winDebug ("winGetPaletteDIB - Allocating a color: %d; "
"%d %d %d\n",
pixel, nRed, nGreen, nBlue);
-#endif
/* Allocate a entry in the X colormap */
if (AllocColor (pcmap,
@@ -460,10 +442,8 @@ winGetPaletteDD (ScreenPtr pScreen, ColormapPtr pcmap)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winGetPaletteDD - uiSystemPaletteEntries %d\n",
uiSystemPaletteEntries);
-#endif
/* Allocate palette entries structure */
ppeColors = malloc (uiSystemPaletteEntries * sizeof (PALETTEENTRY));
@@ -486,11 +466,9 @@ winGetPaletteDD (ScreenPtr pScreen, ColormapPtr pcmap)
nRed = ppeColors[i].peRed << 8;
nGreen = ppeColors[i].peGreen << 8;
nBlue = ppeColors[i].peBlue << 8;
-#if CYGDEBUG
winDebug ("winGetPaletteDD - Allocating a color: %d; "
"%d %d %d\n",
pixel, nRed, nGreen, nBlue);
-#endif
if (AllocColor (pcmap,
&nRed,
&nGreen,
@@ -545,9 +523,7 @@ winCreateDefColormap (ScreenPtr pScreen)
ColormapPtr pcmap = NULL;
Pixel wp, bp;
-#if CYGDEBUG
winDebug ("winCreateDefColormap\n");
-#endif
/* Use standard fb colormaps for non palettized color modes */
if (pScreenInfo->dwBPP > 8)
@@ -567,10 +543,8 @@ winCreateDefColormap (ScreenPtr pScreen)
* to be changed by clients.
*/
-#if CYGDEBUG
winDebug ("winCreateDefColormap - defColormap: %d\n",
pScreen->defColormap);
-#endif
/* Allocate an X colormap, owned by client 0 */
if (CreateColormap (pScreen->defColormap,
@@ -589,9 +563,7 @@ winCreateDefColormap (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winCreateDefColormap - Created a colormap\n");
-#endif
/* Branch on the visual class */
if (!(pVisual->class & DynamicClass))
@@ -636,36 +608,12 @@ winCreateDefColormap (ScreenPtr pScreen)
pScreen->whitePixel = wp;
pScreen->blackPixel = bp;
-#if 0
- /* Have to reserve first 10 and last ten pixels in DirectDraw windowed */
- if (pScreenInfo->dwEngine != WIN_SERVER_SHADOW_GDI)
- {
- int k;
- Pixel p;
-
- for (k = 1; k < 10; ++k)
- {
- p = k;
- if (AllocColor (pcmap, &ones, &ones, &ones, &p, 0) != Success)
- FatalError ("Foo!\n");
- }
-
- for (k = 245; k < 255; ++k)
- {
- p = k;
- if (AllocColor (pcmap, &zero, &zero, &zero, &p, 0) != Success)
- FatalError ("Baz!\n");
- }
- }
-#endif
}
/* Install the created colormap */
(*pScreen->InstallColormap)(pcmap);
-#if CYGDEBUG
winDebug ("winCreateDefColormap - Returning\n");
-#endif
return TRUE;
}
diff --git a/xorg-server/hw/xwin/winconfig.c b/xorg-server/hw/xwin/winconfig.c
index 7b26432f2..1325e77a6 100644
--- a/xorg-server/hw/xwin/winconfig.c
+++ b/xorg-server/hw/xwin/winconfig.c
@@ -145,11 +145,11 @@ winReadConfigfile ()
if (filename)
{
- winMsg (from, "Using config file: \"%s\"\n", filename);
+ winDebug ("Using config file: \"%s\"\n", filename);
}
else
{
- winMsg (X_ERROR, "Unable to locate/open config file");
+ ErrorF ("Unable to locate/open config file");
if (xf86ConfigFile)
ErrorF (": \"%s\"", xf86ConfigFile);
ErrorF ("\n");
@@ -171,7 +171,7 @@ winReadConfigfile ()
}
if ((g_xf86configptr = xf86readConfigFile ()) == NULL)
{
- winMsg (X_ERROR, "Problem parsing the config file\n");
+ ErrorF ("Problem parsing the config file\n");
return FALSE;
}
xf86closeConfigFile ();
@@ -184,13 +184,12 @@ winReadConfigfile ()
{
if (g_cmdline.screenname == NULL)
{
- winMsg (X_WARNING,
- "No Layout section. Using the first Screen section.\n");
+ winDebug ("No Layout section. Using the first Screen section.\n");
}
if (!configImpliedLayout (&g_winConfigLayout,
g_xf86configptr->conf_screen_lst))
{
- winMsg (X_ERROR, "Unable to determine the screen layout\n");
+ ErrorF ("Unable to determine the screen layout\n");
return FALSE;
}
}
@@ -210,7 +209,7 @@ winReadConfigfile ()
g_xf86configptr->conf_layout_lst,
dfltlayout))
{
- winMsg (X_ERROR, "Unable to determine the screen layout\n");
+ ErrorF ("Unable to determine the screen layout\n");
return FALSE;
}
}
@@ -220,7 +219,7 @@ winReadConfigfile ()
g_xf86configptr->conf_layout_lst,
NULL))
{
- winMsg (X_ERROR, "Unable to determine the screen layout\n");
+ ErrorF ("Unable to determine the screen layout\n");
return FALSE;
}
}
@@ -272,7 +271,7 @@ winConfigKeyboard (DeviceIntPtr pDevice)
case 3: g_winInfo.keyboard.delay = 1000; break;
}
g_winInfo.keyboard.rate = (kbd_speed>0)?kbd_speed:1;
- winMsgVerb(X_PROBED, 1, "Setting autorepeat to delay=%d, rate=%d\n",
+ winDebug("Setting autorepeat to delay=%d, rate=%d\n",
g_winInfo.keyboard.delay, g_winInfo.keyboard.rate);
}
}
@@ -298,9 +297,9 @@ winConfigKeyboard (DeviceIntPtr pDevice)
such as the lack of WM_KEYUP for Caps Lock key.
Loading US layout fixes this problem. */
if (LoadKeyboardLayout("00000409", KLF_ACTIVATE) != NULL)
- winMsg (X_INFO, "Loading US keyboard layout.\n");
+ winDebug("Loading US keyboard layout.\n");
else
- winMsg (X_ERROR, "LoadKeyboardLayout failed.\n");
+ ErrorF ("LoadKeyboardLayout failed.\n");
}
}
@@ -324,7 +323,7 @@ winConfigKeyboard (DeviceIntPtr pDevice)
free(regpath);
}
- winMsg (X_PROBED, "Windows keyboard layout: \"%s\" (%08x) \"%s\", type %d\n",
+ winDebug ("Windows keyboard layout: \"%s\" (%08x) \"%s\", type %d\n",
layoutName, layoutNum, layoutFriendlyName, keyboardType);
for (pLayout = winKBLayouts; pLayout->winlayout != -1; pLayout++)
@@ -335,11 +334,11 @@ winConfigKeyboard (DeviceIntPtr pDevice)
continue;
bfound = TRUE;
- winMsg (X_PROBED,
+ winDebug (
"Found matching XKB configuration \"%s\"\n",
pLayout->layoutname);
- winMsg(X_PROBED,
+ winDebug(
"Model = \"%s\" Layout = \"%s\""
" Variant = \"%s\" Options = \"%s\"\n",
pLayout->xkbmodel ? pLayout->xkbmodel : "none",
@@ -358,7 +357,7 @@ winConfigKeyboard (DeviceIntPtr pDevice)
if (!bfound)
{
- winMsg (X_ERROR, "Keyboardlayout \"%s\" (%s) is unknown, using X server default layout\n", layoutFriendlyName, layoutName);
+ ErrorF ("Keyboardlayout \"%s\" (%s) is unknown, using X server default layout\n", layoutFriendlyName, layoutName);
}
}
@@ -392,7 +391,7 @@ winConfigKeyboard (DeviceIntPtr pDevice)
{
if (kbd->inp_identifier)
- winMsg (kbdfrom, "Using keyboard \"%s\" as primary keyboard\n",
+ winDebug ("Using keyboard \"%s\" as primary keyboard\n",
kbd->inp_identifier);
if ((s = winSetStrOption(kbd->inp_option_lst, "AutoRepeat", NULL)))
@@ -403,12 +402,12 @@ winConfigKeyboard (DeviceIntPtr pDevice)
(g_winInfo.keyboard.rate == 0) ||
(1000 / g_winInfo.keyboard.rate) < 1)
{
- winErrorFVerb (2, "\"%s\" is not a valid AutoRepeat value", s);
+ ErrorF ("\"%s\" is not a valid AutoRepeat value", s);
free(s);
return FALSE;
}
free(s);
- winMsg (X_CONFIG, "AutoRepeat: %ld %ld\n",
+ winDebug ("AutoRepeat: %ld %ld\n",
g_winInfo.keyboard.delay, g_winInfo.keyboard.rate);
}
#endif
@@ -429,7 +428,7 @@ winConfigKeyboard (DeviceIntPtr pDevice)
if (s)
{
g_winInfo.xkb.rules = NULL_IF_EMPTY (s);
- winMsg (from, "XKB: rules: \"%s\"\n", s);
+ winDebug ("XKB: rules: \"%s\"\n", s);
}
s = NULL;
@@ -448,7 +447,7 @@ winConfigKeyboard (DeviceIntPtr pDevice)
if (s)
{
g_winInfo.xkb.model = NULL_IF_EMPTY (s);
- winMsg (from, "XKB: model: \"%s\"\n", s);
+ winDebug ("XKB: model: \"%s\"\n", s);
}
s = NULL;
@@ -467,7 +466,7 @@ winConfigKeyboard (DeviceIntPtr pDevice)
if (s)
{
g_winInfo.xkb.layout = NULL_IF_EMPTY (s);
- winMsg (from, "XKB: layout: \"%s\"\n", s);
+ winDebug ("XKB: layout: \"%s\"\n", s);
}
s = NULL;
@@ -486,7 +485,7 @@ winConfigKeyboard (DeviceIntPtr pDevice)
if (s)
{
g_winInfo.xkb.variant = NULL_IF_EMPTY (s);
- winMsg (from, "XKB: variant: \"%s\"\n", s);
+ winDebug ("XKB: variant: \"%s\"\n", s);
}
s = NULL;
@@ -505,7 +504,7 @@ winConfigKeyboard (DeviceIntPtr pDevice)
if (s)
{
g_winInfo.xkb.options = NULL_IF_EMPTY (s);
- winMsg (from, "XKB: options: \"%s\"\n", s);
+ winDebug ("XKB: options: \"%s\"\n", s);
}
#ifdef XWIN_XF86CONFIG
@@ -547,7 +546,7 @@ winConfigMouse (DeviceIntPtr pDevice)
if (mouse != NULL)
{
if (mouse->inp_identifier)
- winMsg (mousefrom, "Using pointer \"%s\" as primary pointer\n",
+ winDebug ("Using pointer \"%s\" as primary pointer\n",
mouse->inp_identifier);
g_winInfo.pointer.emulate3Buttons =
@@ -562,8 +561,8 @@ winConfigMouse (DeviceIntPtr pDevice)
}
else
{
- winMsg (X_ERROR, "No primary pointer configured\n");
- winMsg (X_DEFAULT, "Using compiletime defaults for pointer\n");
+ winDebug ("No primary pointer configured\n");
+ winDebug ("Using compiletime defaults for pointer\n");
}
return TRUE;
@@ -596,7 +595,7 @@ winConfigFiles ()
from = X_CONFIG;
defaultFontPath = strdup (filesptr->file_fontpath);
}
- winMsg (from, "FontPath set to \"%s\"\n", defaultFontPath);
+ winDebug ("FontPath set to \"%s\"\n", defaultFontPath);
return TRUE;
}
@@ -608,7 +607,7 @@ winConfigFiles (void)
if (g_cmdline.fontPath)
{
defaultFontPath = g_cmdline.fontPath;
- winMsg (X_CMDLINE, "FontPath set to \"%s\"\n", defaultFontPath);
+ winDebug("FontPath set to \"%s\"\n", defaultFontPath);
}
return TRUE;
@@ -800,8 +799,7 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
case OPTV_INTEGER:
if (*s == '\0')
{
- winDrvMsg (scrnIndex, X_WARNING,
- "Option \"%s\" requires an integer value\n",
+ winDebug ( "Option \"%s\" requires an integer value\n",
p->name);
p->found = FALSE;
}
@@ -814,8 +812,7 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
}
else
{
- winDrvMsg (scrnIndex, X_WARNING,
- "Option \"%s\" requires an integer value\n",
+ winDebug ( "Option \"%s\" requires an integer value\n",
p->name);
p->found = FALSE;
}
@@ -824,8 +821,7 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
case OPTV_STRING:
if (*s == '\0')
{
- winDrvMsg (scrnIndex, X_WARNING,
- "Option \"%s\" requires an string value\n", p->name);
+ winDebug ( "Option \"%s\" requires an string value\n", p->name);
p->found = FALSE;
}
else
@@ -841,8 +837,7 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
case OPTV_REAL:
if (*s == '\0')
{
- winDrvMsg (scrnIndex, X_WARNING,
- "Option \"%s\" requires a floating point value\n",
+ winDebug ( "Option \"%s\" requires a floating point value\n",
p->name);
p->found = FALSE;
}
@@ -855,8 +850,7 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
}
else
{
- winDrvMsg (scrnIndex, X_WARNING,
- "Option \"%s\" requires a floating point value\n",
+ winDebug ( "Option \"%s\" requires a floating point value\n",
p->name);
p->found = FALSE;
}
@@ -869,8 +863,7 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
}
else
{
- winDrvMsg (scrnIndex, X_WARNING,
- "Option \"%s\" requires a boolean value\n", p->name);
+ winDebug ( "Option \"%s\" requires a boolean value\n", p->name);
p->found = FALSE;
}
break;
@@ -902,8 +895,7 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
case OPTV_FREQ:
if (*s == '\0')
{
- winDrvMsg (scrnIndex, X_WARNING,
- "Option \"%s\" requires a frequency value\n",
+ winDebug ( "Option \"%s\" requires a frequency value\n",
p->name);
p->found = FALSE;
}
@@ -925,8 +917,7 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
units = 1000000;
else
{
- winDrvMsg (scrnIndex, X_WARNING,
- "Option \"%s\" requires a frequency value\n",
+ winDebug ( "Option \"%s\" requires a frequency value\n",
p->name);
p->found = FALSE;
}
@@ -935,8 +926,7 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
}
else
{
- winDrvMsg (scrnIndex, X_WARNING,
- "Option \"%s\" requires a frequency value\n",
+ winDebug ( "Option \"%s\" requires a frequency value\n",
p->name);
p->found = FALSE;
}
@@ -954,12 +944,12 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
}
if (p->found)
{
- winDrvMsgVerb (scrnIndex, X_CONFIG, 2, "Option \"%s\"", p->name);
+ winDebug ("Option \"%s\"", p->name);
if (!(p->type == OPTV_BOOLEAN && *s == 0))
{
- winErrorFVerb (2, " \"%s\"", s);
+ winDebug (" \"%s\"", s);
}
- winErrorFVerb (2, "\n");
+ winDebug ("\n");
}
}
else if (p->type == OPTV_BOOLEAN)
@@ -1000,8 +990,7 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
}
else
{
- winDrvMsg (scrnIndex, X_WARNING,
- "Option \"%s\" requires a boolean value\n", newn);
+ winDebug ( "Option \"%s\" requires a boolean value\n", newn);
p->found = FALSE;
}
}
@@ -1011,12 +1000,12 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p)
}
if (p->found)
{
- winDrvMsgVerb (scrnIndex, X_CONFIG, 2, "Option \"%s\"", newn);
+ winDebug ("Option \"%s\"", newn);
if (*s != 0)
{
- winErrorFVerb (2, " \"%s\"", s);
+ winDebug (" \"%s\"", s);
}
- winErrorFVerb (2, "\n");
+ winDebug ("\n");
}
free (n);
}
diff --git a/xorg-server/hw/xwin/wincreatewnd.c b/xorg-server/hw/xwin/wincreatewnd.c
index 755373965..9931abe75 100644
--- a/xorg-server/hw/xwin/wincreatewnd.c
+++ b/xorg-server/hw/xwin/wincreatewnd.c
@@ -65,10 +65,10 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen)
HWND *phwnd = &pScreenPriv->hwndScreen;
WNDCLASSEX wc;
char szTitle[256];
+ char HostName[256];
+ gethostname(HostName,256);
-#if CYGDEBUG
winDebug ("winCreateBoundingWindowFullScreen\n");
-#endif
/* Setup our window class */
wc.cbSize=sizeof(WNDCLASSEX);
@@ -93,15 +93,18 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen)
sizeof (szTitle),
WINDOW_TITLE_XDMCP,
g_pszQueryHost,
+ HostName,
display,
(int) pScreenInfo->dwScreen);
- else
+ else
+ {
snprintf (szTitle,
sizeof (szTitle),
WINDOW_TITLE,
+ HostName,
display,
(int) pScreenInfo->dwScreen);
-
+ }
/* Create the window */
*phwnd = CreateWindowExA (0, /* Extended styles */
WINDOW_CLASS, /* Class name */
@@ -161,6 +164,9 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
DWORD dwWindowStyle;
BOOL fForceShowWindow = FALSE;
char szTitle[256];
+ char HostName[256];
+
+ gethostname(HostName,256);
winDebug ("winCreateBoundingWindowWindowed - User w: %d h: %d\n",
(int) pScreenInfo->dwUserWidth, (int) pScreenInfo->dwUserHeight);
@@ -253,10 +259,8 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
if (pScreenInfo->fUserGaveHeightAndWidth)
{
/* User gave a desired height and width, try to accomodate */
-#if CYGDEBUG
winDebug ("winCreateBoundingWindowWindowed - User gave height "
"and width\n");
-#endif
/* Adjust the window width and height for borders and title bar */
if (pScreenInfo->fDecoration
@@ -269,16 +273,12 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
#endif
)
{
-#if CYGDEBUG
winDebug ("winCreateBoundingWindowWindowed - Window has decoration\n");
-#endif
/* Are we resizable */
if (pScreenInfo->iResizeMode != notAllowed)
{
-#if CYGDEBUG
winDebug ("winCreateBoundingWindowWindowed - Window is resizable\n");
-#endif
iWidth += 2 * GetSystemMetrics (SM_CXSIZEFRAME);
iHeight += 2 * GetSystemMetrics (SM_CYSIZEFRAME)
@@ -286,9 +286,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
}
else
{
-#if CYGDEBUG
winDebug ("winCreateBoundingWindowWindowed - Window is not resizable\n");
-#endif
iWidth += 2 * GetSystemMetrics (SM_CXFIXEDFRAME);
iHeight += 2 * GetSystemMetrics (SM_CYFIXEDFRAME)
@@ -299,10 +297,8 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
else
{
/* By default, we are creating a window that is as large as possible */
-#if CYGDEBUG
winDebug ("winCreateBoundingWindowWindowed - User did not give "
"height and width\n");
-#endif
/* Defaults are wrong if we have multiple monitors */
if (pScreenInfo->fMultipleMonitors)
{
@@ -329,11 +325,9 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
if (iHeight >= (rcWorkArea.bottom - rcWorkArea.top))
iHeight = rcWorkArea.bottom - rcWorkArea.top;
-#if CYGDEBUG
winDebug ("winCreateBoundingWindowWindowed - Adjusted width: %d "\
"height: %d\n",
iWidth, iHeight);
-#endif
}
/* Set display and screen-specific tooltip text */
@@ -342,14 +336,18 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
sizeof (szTitle),
WINDOW_TITLE_XDMCP,
g_pszQueryHost,
+ HostName,
display,
(int) pScreenInfo->dwScreen);
- else
+ else
+ {
snprintf (szTitle,
sizeof (szTitle),
WINDOW_TITLE,
+ HostName,
display,
(int) pScreenInfo->dwScreen);
+ }
/* Create the window */
*phwnd = CreateWindowExA (0, /* Extended styles */
@@ -370,9 +368,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winCreateBoundingWindowWindowed - CreateWindowEx () returned\n");
-#endif
if (fForceShowWindow)
{
diff --git a/xorg-server/hw/xwin/wincursor.c b/xorg-server/hw/xwin/wincursor.c
index 9f669bcf8..3cae2361b 100644
--- a/xorg-server/hw/xwin/wincursor.c
+++ b/xorg-server/hw/xwin/wincursor.c
@@ -43,10 +43,9 @@
#define BRIGHTNESS(x) (x##Red * 0.299 + x##Green * 0.587 + x##Blue * 0.114)
-#if 0
-# define WIN_DEBUG_MSG winDebug
-#else
-# define WIN_DEBUG_MSG(...)
+#ifdef _MSC_VER
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
/*
@@ -85,7 +84,7 @@ winPointerWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
/* Don't ignore subsequent warps */
s_fInitialWarp = FALSE;
- winErrorFVerb (2, "winPointerWarpCursor - Discarding first warp: %d %d\n",
+ winDebug ("winPointerWarpCursor - Discarding first warp: %d %d\n",
x, y);
return;
@@ -170,7 +169,7 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen)
BITMAPINFO *pbmi;
unsigned long *lpBits;
- WIN_DEBUG_MSG("winLoadCursor: Win32: %dx%d X11: %dx%d hotspot: %d,%d\n",
+ winDebug("winLoadCursor: Win32: %dx%d X11: %dx%d hotspot: %d,%d\n",
pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy,
pCursor->bits->width, pCursor->bits->height,
pCursor->bits->xhot, pCursor->bits->yhot
@@ -186,7 +185,7 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen)
if (pScreenPriv->cursor.sm_cx < pCursor->bits->width ||
pScreenPriv->cursor.sm_cy < pCursor->bits->height)
{
- winErrorFVerb (3, "winLoadCursor - Windows requires %dx%d cursor but X requires %dx%d\n",
+ ErrorF ("winLoadCursor - Windows requires %dx%d cursor but X requires %dx%d\n",
pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy,
pCursor->bits->width, pCursor->bits->height);
}
@@ -248,7 +247,7 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen)
/* We have a truecolor alpha-blended cursor and can use it! */
if (pCursor->bits->argb)
{
- WIN_DEBUG_MSG("winLoadCursor: Trying truecolor alphablended cursor\n");
+ winDebug("winLoadCursor: Trying truecolor alphablended cursor\n");
memset (&bi, 0, sizeof (BITMAPV4HEADER));
bi.bV4Size = sizeof(BITMAPV4HEADER);
bi.bV4Width = pScreenPriv->cursor.sm_cx;
@@ -279,7 +278,7 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen)
if (!lpBits)
{
/* Bicolor, use a palettized DIB */
- WIN_DEBUG_MSG("winLoadCursor: Trying two color cursor\n");
+ winDebug("winLoadCursor: Trying two color cursor\n");
pbmi = (BITMAPINFO*)&bi;
memset (pbmi, 0, sizeof (BITMAPINFOHEADER));
pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
@@ -343,7 +342,7 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen)
/* If one of the previous two methods gave us the bitmap we need, make a cursor */
if (lpBits)
{
- WIN_DEBUG_MSG("winLoadCursor: Creating bitmap cursor: hotspot %d,%d\n",
+ winDebug("winLoadCursor: Creating bitmap cursor: hotspot %d,%d\n",
pCursor->bits->xhot, pCursor->bits->yhot);
hAnd = NULL;
@@ -371,14 +370,14 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen)
hCursor = (HCURSOR) CreateIconIndirect( &ii );
if (hCursor == NULL)
- winW32Error(2, "winLoadCursor - CreateIconIndirect failed:");
+ winW32Error("winLoadCursor - CreateIconIndirect failed:");
else
{
if (GetIconInfo(hCursor, &ii))
{
if (ii.fIcon)
{
- WIN_DEBUG_MSG("winLoadCursor: CreateIconIndirect returned no cursor. Trying again.\n");
+ winDebug("winLoadCursor: CreateIconIndirect returned no cursor. Trying again.\n");
DestroyCursor(hCursor);
@@ -388,7 +387,7 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen)
hCursor = (HCURSOR) CreateIconIndirect( &ii );
if (hCursor == NULL)
- winW32Error(2, "winLoadCursor - CreateIconIndirect failed:");
+ winW32Error("winLoadCursor - CreateIconIndirect failed:");
}
/* GetIconInfo creates new bitmaps. Destroy them again */
if (ii.hbmMask)
@@ -414,7 +413,7 @@ winLoadCursor (ScreenPtr pScreen, CursorPtr pCursor, int screen)
pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy,
pAnd, pXor);
if (hCursor == NULL)
- winW32Error(2, "winLoadCursor - CreateCursor failed:");
+ winW32Error("winLoadCursor - CreateCursor failed:");
}
free (pAnd);
free (pXor);
@@ -469,7 +468,7 @@ winSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, in
RECT rcClient;
BOOL bInhibit;
winScreenPriv(pScreen);
- WIN_DEBUG_MSG("winSetCursor: cursor=%p\n", pCursor);
+ winDebug("winSetCursor: cursor=%p\n", pCursor);
/* Inhibit changing the cursor if the mouse is not in a client area */
bInhibit = FALSE;
@@ -520,7 +519,7 @@ winSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, in
}
pScreenPriv->cursor.handle =
winLoadCursor (pScreen, pCursor, pScreen->myNum);
- WIN_DEBUG_MSG("winSetCursor: handle=%p\n", pScreenPriv->cursor.handle);
+ winDebug("winSetCursor: handle=%p\n", pScreenPriv->cursor.handle);
if (!bInhibit)
SetCursor (pScreenPriv->cursor.handle);
@@ -614,9 +613,11 @@ winInitCursor (ScreenPtr pScreen)
pPointPriv = (miPointerScreenPtr)
dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
+ if (pPointPriv)
+ {
pScreenPriv->cursor.spriteFuncs = pPointPriv->spriteFuncs;
pPointPriv->spriteFuncs = &winSpriteFuncsRec;
-
+ }
pScreenPriv->cursor.handle = NULL;
pScreenPriv->cursor.visible = FALSE;
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c
index c3a149762..346e7b4e0 100644
--- a/xorg-server/hw/xwin/windialogs.c
+++ b/xorg-server/hw/xwin/windialogs.c
@@ -202,8 +202,8 @@ winInitDialog (HWND hwndDlg)
*/
if (GetSystemMetrics(SM_CMONITORS)>1) {
/* Still need to refresh the frame change. */
- SetWindowPos (hwndDlg, HWND_TOPMOST, 0,0,0,0,
- SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
+ SetWindowPos (hwndDlg, HWND_TOP, 0,0,0,0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
} else {
GetWindowRect (hwndDesk, &rcDesk);
GetWindowRect (hwndDlg, &rcDlg);
@@ -242,12 +242,8 @@ winInitDialog (HWND hwndDlg)
}
-/*
- * Display the Exit dialog box
- */
-
-void
-winDisplayExitDialog (winPrivScreenPtr pScreenPriv)
+int
+GetLiveClients (winPrivScreenPtr pScreenPriv)
{
int i;
int liveClients = 0;
@@ -268,7 +264,21 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv)
/* A user reported that this sometimes drops below zero. just eye-candy. */
if (liveClients < 0)
- liveClients = 0;
+ liveClients = 0;
+
+ pScreenPriv->iConnectedClients = liveClients;
+
+ return liveClients;
+}
+
+/*
+ * Display the Exit dialog box
+ */
+
+void
+winDisplayExitDialog (winPrivScreenPtr pScreenPriv)
+{
+ int liveClients = GetLiveClients(pScreenPriv);
/* Don't show the exit confirmation dialog if SilentExit & no clients,
or ForceExit, is enabled */
@@ -283,8 +293,6 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv)
return;
}
- pScreenPriv->iConnectedClients = liveClients;
-
/* Check if dialog already exists */
if (g_hDlgExit != NULL)
{
@@ -434,9 +442,9 @@ winDisplayDepthChangeDialog (winPrivScreenPtr pScreenPriv)
/* Show the dialog box */
ShowWindow (g_hDlgDepthChange, SW_SHOW);
- ErrorF ("winDisplayDepthChangeDialog - DialogBox returned: %d\n",
+ winDebug ("winDisplayDepthChangeDialog - DialogBox returned: %d\n",
(int) g_hDlgDepthChange);
- ErrorF ("winDisplayDepthChangeDialog - GetLastError: %d\n",
+ winDebug ("winDisplayDepthChangeDialog - GetLastError: %d\n",
(int) GetLastError ());
/* Minimize the display window */
@@ -457,52 +465,42 @@ winChangeDepthDlgProc (HWND hwndDialog, UINT message,
static winScreenInfo *s_pScreenInfo = NULL;
static ScreenPtr s_pScreen = NULL;
-#if CYGDEBUG
winDebug ("winChangeDepthDlgProc\n");
-#endif
/* Branch on message type */
switch (message)
{
case WM_INITDIALOG:
-#if CYGDEBUG
winDebug ("winChangeDepthDlgProc - WM_INITDIALOG\n");
-#endif
/* Store pointers to private structures for future use */
s_pScreenPriv = (winPrivScreenPtr) lParam;
s_pScreenInfo = s_pScreenPriv->pScreenInfo;
s_pScreen = s_pScreenInfo->pScreen;
-#if CYGDEBUG
winDebug ("winChangeDepthDlgProc - WM_INITDIALOG - s_pScreenPriv: %08x, "
"s_pScreenInfo: %08x, s_pScreen: %08x\n",
s_pScreenPriv, s_pScreenInfo, s_pScreen);
-#endif
-#if CYGDEBUG
winDebug ("winChangeDepthDlgProc - WM_INITDIALOG - orig bpp: %d, "
"current bpp: %d\n",
s_pScreenInfo->dwBPP,
GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL));
-#endif
winInitDialog( hwndDialog );
return TRUE;
case WM_DISPLAYCHANGE:
-#if CYGDEBUG
winDebug ("winChangeDepthDlgProc - WM_DISPLAYCHANGE - orig bpp: %d, "
"new bpp: %d\n",
s_pScreenInfo->dwBPP,
GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL));
-#endif
/* Dismiss the dialog if the display returns to the original depth */
if (GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL) == s_pScreenInfo->dwBPP)
{
- ErrorF ("winChangeDelthDlgProc - wParam == s_pScreenInfo->dwBPP\n");
+ winDebug ("winChangeDelthDlgProc - wParam == s_pScreenInfo->dwBPP\n");
/* Depth has been restored, dismiss dialog */
DestroyWindow (g_hDlgDepthChange);
@@ -530,7 +528,7 @@ winChangeDepthDlgProc (HWND hwndDialog, UINT message,
break;
case WM_CLOSE:
- ErrorF ("winChangeDepthDlgProc - WM_CLOSE\n");
+ winDebug ("winChangeDepthDlgProc - WM_CLOSE\n");
DestroyWindow (g_hDlgAbout);
g_hDlgAbout = NULL;
@@ -596,17 +594,13 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
static winScreenInfo *s_pScreenInfo = NULL;
static ScreenPtr s_pScreen = NULL;
-#if CYGDEBUG
winDebug ("winAboutDlgProc\n");
-#endif
/* Branch on message type */
switch (message)
{
case WM_INITDIALOG:
-#if CYGDEBUG
winDebug ("winAboutDlgProc - WM_INITDIALOG\n");
-#endif
/* Store pointers to private structures for future use */
s_pScreenPriv = (winPrivScreenPtr) lParam;
@@ -643,7 +637,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
{
case IDOK:
case IDCANCEL:
- ErrorF ("winAboutDlgProc - WM_COMMAND - IDOK or IDCANCEL\n");
+ winDebug ("winAboutDlgProc - WM_COMMAND - IDOK or IDCANCEL\n");
DestroyWindow (g_hDlgAbout);
g_hDlgAbout = NULL;
diff --git a/xorg-server/hw/xwin/windisplay.c b/xorg-server/hw/xwin/windisplay.c
new file mode 100644
index 000000000..db7b2f4d8
--- /dev/null
+++ b/xorg-server/hw/xwin/windisplay.c
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) Jon TURNEY 2009
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+#include "win.h"
+
+#include <X11/Xwindows.h>
+
+/*
+ Generate a display name string referring to the display of this server,
+ using a transport we know is enabled
+*/
+
+void
+winGetDisplayName(char *szDisplay, unsigned int screen)
+{
+ if (TransIsListening("local"))
+ {
+ snprintf(szDisplay, 512, ":%s.%d", display, screen);
+ }
+ else if (TransIsListening("inet"))
+ {
+ snprintf(szDisplay, 512, "127.0.0.1:%s.%d", display, screen);
+ }
+ else if (TransIsListening("inet6"))
+ {
+ snprintf(szDisplay, 512, "[::1]:%s.%d", display, screen);
+ }
+ else
+ {
+ // this can't happen!
+ winDebug ("winGetDisplay: Don't know what to use for DISPLAY\n");
+ snprintf(szDisplay, 512, "localhost:%s.%d", display, screen);
+ }
+
+ winDebug ("winGetDisplay: DISPLAY=%s\n", szDisplay);
+}
diff --git a/xorg-server/hw/xwin/winengine.c b/xorg-server/hw/xwin/winengine.c
index 1e3ee2bef..d9d0d476c 100644
--- a/xorg-server/hw/xwin/winengine.c
+++ b/xorg-server/hw/xwin/winengine.c
@@ -73,12 +73,12 @@ winDetectSupportedEngines (void)
{
case VER_PLATFORM_WIN32_NT:
/* Engine 4 is supported on NT only */
- winErrorFVerb (2, "winDetectSupportedEngines - Windows NT/2000/XP\n");
+ winDebug ("winDetectSupportedEngines - Windows NT/2000/XP\n");
break;
case VER_PLATFORM_WIN32_WINDOWS:
/* Engine 4 is supported on NT only */
- winErrorFVerb (2, "winDetectSupportedEngines - Windows 95/98/Me\n");
+ winDebug ("winDetectSupportedEngines - Windows 95/98/Me\n");
break;
}
@@ -104,13 +104,13 @@ winDetectSupportedEngines (void)
if (FAILED (ddrval))
{
/* No DirectDraw support */
- winErrorFVerb (2, "winDetectSupportedEngines - DirectDraw not installed\n");
+ winDebug ("winDetectSupportedEngines - DirectDraw not installed\n");
return;
}
else
{
/* We have DirectDraw */
- winErrorFVerb (2, "winDetectSupportedEngines - DirectDraw installed\n");
+ winDebug ("winDetectSupportedEngines - DirectDraw installed\n");
g_dwEnginesSupported |= WIN_SERVER_SHADOW_DD;
#ifdef XWIN_PRIMARYFB
@@ -118,7 +118,7 @@ winDetectSupportedEngines (void)
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
g_dwEnginesSupported |= WIN_SERVER_PRIMARY_DD;
- winErrorFVerb (2, "winDetectSupportedEngines - Allowing PrimaryDD\n");
+ winDebug ("winDetectSupportedEngines - Allowing PrimaryDD\n");
}
#endif
}
@@ -130,7 +130,7 @@ winDetectSupportedEngines (void)
if (SUCCEEDED (ddrval))
{
/* We have DirectDraw4 */
- winErrorFVerb (2, "winDetectSupportedEngines - DirectDraw4 installed\n");
+ winDebug ("winDetectSupportedEngines - DirectDraw4 installed\n");
g_dwEnginesSupported |= WIN_SERVER_SHADOW_DDNL;
}
@@ -141,7 +141,7 @@ winDetectSupportedEngines (void)
IDirectDraw_Release (lpdd);
}
- winErrorFVerb (2, "winDetectSupportedEngines - Returning, supported engines %08x\n",
+ winDebug ("winDetectSupportedEngines - Returning, supported engines %08x\n",
(unsigned int) g_dwEnginesSupported);
}
@@ -182,7 +182,7 @@ winSetEngine (ScreenPtr pScreen)
/* ShadowGDI is the only engine that supports windowed PseudoColor */
if (dwBPP == 8 && !pScreenInfo->fFullScreen)
{
- winErrorFVerb (2, "winSetEngine - Windowed && PseudoColor => ShadowGDI\n");
+ winDebug ("winSetEngine - Windowed && PseudoColor => ShadowGDI\n");
pScreenInfo->dwEngine = WIN_SERVER_SHADOW_GDI;
/* Set engine function pointers */
@@ -204,7 +204,7 @@ winSetEngine (ScreenPtr pScreen)
#endif
)
{
- winErrorFVerb (2, "winSetEngine - Multi Window or Rootless => ShadowGDI\n");
+ winDebug ("winSetEngine - Multi Window or Rootless => ShadowGDI\n");
pScreenInfo->dwEngine = WIN_SERVER_SHADOW_GDI;
/* Set engine function pointers */
@@ -212,10 +212,10 @@ winSetEngine (ScreenPtr pScreen)
return TRUE;
}
- /* If the user's choice is supported, we'll use that */
- if (g_dwEnginesSupported & pScreenInfo->dwEnginePreferred)
+ /* If there is a user's choice, we'll use that */
+ if (pScreenInfo->dwEnginePreferred)
{
- winErrorFVerb (2, "winSetEngine - Using user's preference: %d\n",
+ winDebug ("winSetEngine - Using user's preference: %d\n",
(int) pScreenInfo->dwEnginePreferred);
pScreenInfo->dwEngine = pScreenInfo->dwEnginePreferred;
@@ -242,7 +242,7 @@ winSetEngine (ScreenPtr pScreen)
break;
#endif
default:
- FatalError ("winSetEngine - Invalid engine type\n");
+ FatalError ("winSetEngine - Invalid engine type %d\n",pScreenInfo->dwEngine);
}
return TRUE;
}
@@ -250,7 +250,7 @@ winSetEngine (ScreenPtr pScreen)
/* ShadowDDNL has good performance, so why not */
if (g_dwEnginesSupported & WIN_SERVER_SHADOW_DDNL)
{
- winErrorFVerb (2, "winSetEngine - Using Shadow DirectDraw NonLocking\n");
+ winDebug ("winSetEngine - Using Shadow DirectDraw NonLocking\n");
pScreenInfo->dwEngine = WIN_SERVER_SHADOW_DDNL;
/* Set engine function pointers */
@@ -261,7 +261,7 @@ winSetEngine (ScreenPtr pScreen)
/* ShadowDD is next in line */
if (g_dwEnginesSupported & WIN_SERVER_SHADOW_DD)
{
- winErrorFVerb (2, "winSetEngine - Using Shadow DirectDraw\n");
+ winDebug ("winSetEngine - Using Shadow DirectDraw\n");
pScreenInfo->dwEngine = WIN_SERVER_SHADOW_DD;
/* Set engine function pointers */
@@ -272,7 +272,7 @@ winSetEngine (ScreenPtr pScreen)
/* ShadowGDI is next in line */
if (g_dwEnginesSupported & WIN_SERVER_SHADOW_GDI)
{
- winErrorFVerb (2, "winSetEngine - Using Shadow GDI DIB\n");
+ winDebug ("winSetEngine - Using Shadow GDI DIB\n");
pScreenInfo->dwEngine = WIN_SERVER_SHADOW_GDI;
/* Set engine function pointers */
diff --git a/xorg-server/hw/xwin/winerror.c b/xorg-server/hw/xwin/winerror.c
index 988c5952e..47e1bd86f 100644
--- a/xorg-server/hw/xwin/winerror.c
+++ b/xorg-server/hw/xwin/winerror.c
@@ -35,6 +35,7 @@
#include <../xfree86/common/xorgVersion.h>
#include "win.h"
+extern Bool g_fSilentDupError;
#ifdef DDXOSVERRORF
/* Prototype */
void
@@ -52,6 +53,24 @@ OsVendorVErrorF (const char *pszFormat, va_list va_args)
pthread_mutex_lock (&s_pmPrinting);
#endif
+ /*
+ If we want to silence it,
+ detect if we are going to abort due to duplication error
+ */
+ if (g_fSilentDupError)
+ {
+ if ((strcmp(pszFormat,
+ "InitOutput - Duplicate invocation on display "
+ "number: %s. Exiting.\n") == 0)
+ || (strcmp(pszFormat,
+ "Server is already active for display %s\n%s %s\n%s\n") == 0)
+ || (strcmp(pszFormat,
+ "MakeAllCOTSServerListeners: server already running\n") == 0))
+ {
+ g_fSilentFatalError = TRUE;
+ }
+ }
+
/* Print the error message to a log file, could be stderr */
LogVWrite (0, pszFormat, va_args);
@@ -70,6 +89,7 @@ OsVendorVErrorF (const char *pszFormat, va_list va_args)
*
* Attempt to do last-ditch, safe, important cleanup here.
*/
+char g_FatalErrorMessage[1024];
void
OsVendorFatalError (void)
{
@@ -85,8 +105,9 @@ OsVendorFatalError (void)
winMessageBoxF (
"A fatal error has occurred and " PROJECT_NAME " will now exit.\n" \
- "Please open %s for more information.\n",
- MB_ICONERROR, (g_pszLogFile?g_pszLogFile:"the logfile"));
+ "%s\n"
+ "Please open %s for more information.\n",
+ MB_ICONERROR, g_FatalErrorMessage, (g_pszLogFile?g_pszLogFile:"the logfile"));
}
@@ -114,7 +135,7 @@ winMessageBoxF (const char *pszError, UINT uType, ...)
#define MESSAGEBOXF \
"%s\n" \
"Vendor: %s\n" \
- "Release: %d.%d.%d.%d (%d)\n" \
+ "Release: %d.%d.%d.%d\n" \
"Contact: %s\n" \
"%s\n\n" \
"XWin was started with the following command-line:\n\n" \
@@ -123,7 +144,7 @@ winMessageBoxF (const char *pszError, UINT uType, ...)
size = asprintf (&pszMsgBox, MESSAGEBOXF,
pszErrorF, XVENDORNAME,
XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH,
- XORG_VERSION_SNAP, XORG_VERSION_CURRENT,
+ XORG_VERSION_SNAP,
BUILDERADDR,
BUILDERSTRING,
g_pszCommandLine);
diff --git a/xorg-server/hw/xwin/winfont.c b/xorg-server/hw/xwin/winfont.c
index af3e90da5..5a3011c0a 100644
--- a/xorg-server/hw/xwin/winfont.c
+++ b/xorg-server/hw/xwin/winfont.c
@@ -42,9 +42,7 @@ winRealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont)
BOOL fResult = TRUE;
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winRealizeFont (%p, %p)\n", pScreen, pFont);
-#endif
+ winDebug ("winRealizeFont (%p, %p)\n", pScreen, pFont);
WIN_UNWRAP(RealizeFont);
if (pScreen->RealizeFont)
@@ -62,9 +60,7 @@ winUnrealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont)
BOOL fResult = TRUE;
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winUnrealizeFont (%p, %p)\n", pScreen, pFont);
-#endif
+ winDebug ("winUnrealizeFont (%p, %p)\n", pScreen, pFont);
WIN_UNWRAP(UnrealizeFont);
if (pScreen->UnrealizeFont)
@@ -72,9 +68,5 @@ winUnrealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont)
WIN_WRAP(UnrealizeFont, winUnrealizeFontNativeGDI);
return fResult;
-#if CYGDEBUG
- winDebug ("winUnrealizeFont()\n");
-#endif
- return TRUE;
}
#endif
diff --git a/xorg-server/hw/xwin/wingc.c b/xorg-server/hw/xwin/wingc.c
index a131264b9..bf307a44c 100644
--- a/xorg-server/hw/xwin/wingc.c
+++ b/xorg-server/hw/xwin/wingc.c
@@ -41,47 +41,14 @@ winPushPixels (GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, int dx, int
* Local prototypes
*/
-#if 0
-static void
-winChangeGCNativeGDI (GCPtr pGC, unsigned long ulChanges);
-#endif
-
static void
winValidateGCNativeGDI (GCPtr pGC,
unsigned long changes,
DrawablePtr pDrawable);
-#if 0
-static void
-winCopyGCNativeGDI (GCPtr pGCsrc, unsigned long ulMask, GCPtr pGCdst);
-#endif
-
static void
winDestroyGCNativeGDI (GCPtr pGC);
-#if 0
-static void
-winChangeClipNativeGDI (GCPtr pGC, int nType, pointer pValue, int nRects);
-
-static void
-winDestroyClipNativeGDI (GCPtr pGC);
-
-static void
-winCopyClipNativeGDI (GCPtr pGCdst, GCPtr pGCsrc);
-#endif
-
-#if 0
-/* GC Handling Routines */
-const GCFuncs winGCFuncs = {
- winValidateGCNativeGDI,
- winChangeGCNativeGDI,
- winCopyGCNativeGDI,
- winDestroyGCNativeGDI,
- winChangeClipNativeGDI,
- winDestroyClipNativeGDI,
- winCopyClipNativeGDI,
-};
-#else
const GCFuncs winGCFuncs = {
winValidateGCNativeGDI,
miChangeGC,
@@ -91,7 +58,6 @@ const GCFuncs winGCFuncs = {
miDestroyClip,
miCopyClip,
};
-#endif
/* Drawing Primitives */
const GCOps winGCOps = {
@@ -112,13 +78,8 @@ const GCOps winGCOps = {
miPolyText16,
miImageText8,
miImageText16,
-#if 0
- winImageGlyphBltNativeGDI,
- winPolyGlyphBltNativeGDI,
-#else
miImageGlyphBlt,
miPolyGlyphBlt,
-#endif
miPushPixels,
};
@@ -132,10 +93,8 @@ winCreateGCNativeGDI (GCPtr pGC)
winPrivGCPtr pGCPriv = NULL;
winPrivScreenPtr pScreenPriv = NULL;
-#if 0
- ErrorF ("winCreateGCNativeGDI - depth: %d\n",
+ winDebug ("winCreateGCNativeGDI - depth: %d\n",
pGC->depth);
-#endif
pGC->ops = (GCOps *) &winGCOps;
pGC->funcs = (GCFuncs *) &winGCFuncs;
@@ -161,19 +120,6 @@ winCreateGCNativeGDI (GCPtr pGC)
return TRUE;
}
-
-#if 0
-/* See Porting Layer Definition - p. 45 */
-static void
-winChangeGCNativeGDI (GCPtr pGC, unsigned long ulChanges)
-{
-#if 0
- ErrorF ("winChangeGCNativeGDI () - Doing nothing\n");
-#endif
-}
-#endif
-
-
static void
winValidateGCNativeGDI (GCPtr pGC,
unsigned long ulChanges,
@@ -187,16 +133,6 @@ winValidateGCNativeGDI (GCPtr pGC,
}
-#if 0
-/* See Porting Layer Definition - p. 46 */
-static void
-winCopyGCNativeGDI (GCPtr pGCsrc, unsigned long ulMask, GCPtr pGCdst)
-{
-
-}
-#endif
-
-
/* See Porting Layer Definition - p. 46 */
static void
winDestroyGCNativeGDI (GCPtr pGC)
@@ -224,28 +160,3 @@ winDestroyGCNativeGDI (GCPtr pGC)
/* Invalidate the GC privates pointer */
winSetGCPriv (pGC, NULL);
}
-
-#if 0
-/* See Porting Layer Definition - p. 46 */
-static void
-winChangeClipNativeGDI (GCPtr pGC, int nType, pointer pValue, int nRects)
-{
-
-}
-
-
-/* See Porting Layer Definition - p. 47 */
-static void
-winDestroyClipNativeGDI (GCPtr pGC)
-{
-
-}
-
-
-/* See Porting Layer Definition - p. 47 */
-static void
-winCopyClipNativeGDI (GCPtr pGCdst, GCPtr pGCsrc)
-{
-
-}
-#endif
diff --git a/xorg-server/hw/xwin/wingetsp.c b/xorg-server/hw/xwin/wingetsp.c
index ab4c181c7..0fd0ebce9 100644
--- a/xorg-server/hw/xwin/wingetsp.c
+++ b/xorg-server/hw/xwin/wingetsp.c
@@ -59,10 +59,8 @@ winGetSpansNativeGDI (DrawablePtr pDrawable,
switch (pDrawable->type)
{
case DRAWABLE_PIXMAP:
-#if 0
- ErrorF ("winGetSpans - DRAWABLE_PIXMAP %08x\n",
+ winDebug ("winGetSpans - DRAWABLE_PIXMAP %08x\n",
pDrawable);
-#endif
pPixmap = (PixmapPtr) pDrawable;
pPixmapPriv = winGetPixmapPriv (pPixmap);
@@ -107,12 +105,6 @@ winGetSpansNativeGDI (DrawablePtr pDrawable,
SelectObject (hdcMem, hbmpOrig);
DeleteObject (hbmpWindow);
-#if 0
- ErrorF ("(%dx%dx%d) (%d,%d) w: %d\n",
- pDrawable->width, pDrawable->height, pDrawable->depth,
- pPoint->x, pPoint->y, *piWidth);
-#endif
-
/* Calculate offset of next bit destination */
pDst += PixmapBytePad (*piWidth, pDrawable->depth);
}
@@ -126,9 +118,6 @@ winGetSpansNativeGDI (DrawablePtr pDrawable,
break;
case DRAWABLE_WINDOW:
-#if 0
- ErrorF ("winGetSpans - DRAWABLE_WINDOW\n");
-#endif
/* Open a memory HDC */
hdcMem = CreateCompatibleDC (NULL);
@@ -163,12 +152,6 @@ winGetSpansNativeGDI (DrawablePtr pDrawable,
DeleteObject (hbmpWindow);
-#if 0
- ErrorF ("(%dx%dx%d) (%d,%d) w: %d\n",
- pDrawable->width, pDrawable->height, pDrawable->depth,
- pPoint->x, pPoint->y, *piWidth);
-#endif
-
/* Calculate offset of next bit destination */
pDst += PixmapBytePad (*piWidth, pDrawable->depth);
}
diff --git a/xorg-server/hw/xwin/winglobals.c b/xorg-server/hw/xwin/winglobals.c
index 80d946c5d..0f52b651c 100644
--- a/xorg-server/hw/xwin/winglobals.c
+++ b/xorg-server/hw/xwin/winglobals.c
@@ -76,7 +76,7 @@ Bool g_fKeyboardHookLL = FALSE;
Bool g_fNoHelpMessageBox = FALSE;
Bool g_fSoftwareCursor = FALSE;
Bool g_fSilentDupError = FALSE;
-Bool g_fNativeGl = FALSE;
+Bool g_fNativeGl = FALSE;
/*
* Global variables for dynamically loaded libraries and
@@ -91,7 +91,6 @@ FARPROC g_fpTrackMouseEvent = (FARPROC) (void (*)(void))NoopDDA;
* Wrapped DIX functions
*/
winDispatchProcPtr winProcEstablishConnectionOrig = NULL;
-winDispatchProcPtr winProcQueryTreeOrig = NULL;
winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL;
@@ -101,6 +100,7 @@ winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL;
Bool g_fUnicodeClipboard = TRUE;
Bool g_fClipboard = TRUE;
+Bool g_fClipboardPrimary = TRUE;
Bool g_fClipboardLaunched = FALSE;
Bool g_fClipboardStarted = FALSE;
pthread_t g_ptClipboardProc;
@@ -121,8 +121,6 @@ winInitializeGlobals (void)
{
g_dwCurrentThreadID = GetCurrentThreadId ();
#ifdef XWIN_CLIPBOARD
- g_fClipboardLaunched = FALSE;
- g_fClipboardStarted = FALSE;
g_iClipboardWindow = None;
g_pClipboardDisplay = NULL;
g_atomLastOwnedSelection = None;
diff --git a/xorg-server/hw/xwin/winglobals.h b/xorg-server/hw/xwin/winglobals.h
index 898b9388a..dd7c72949 100644
--- a/xorg-server/hw/xwin/winglobals.h
+++ b/xorg-server/hw/xwin/winglobals.h
@@ -64,7 +64,6 @@ typedef int (*winDispatchProcPtr) (ClientPtr);
* Wrapped DIX functions
*/
extern winDispatchProcPtr winProcEstablishConnectionOrig;
-extern winDispatchProcPtr winProcQueryTreeOrig;
extern winDispatchProcPtr winProcSetSelectionOwnerOrig;
#endif
diff --git a/xorg-server/hw/xwin/winkeybd.c b/xorg-server/hw/xwin/winkeybd.c
index 94318969f..e53d84b3f 100644
--- a/xorg-server/hw/xwin/winkeybd.c
+++ b/xorg-server/hw/xwin/winkeybd.c
@@ -160,13 +160,13 @@ winKeybdProc (DeviceIntPtr pDeviceInt, int iState)
/* FIXME: Maybe we should use winGetKbdLeds () here? */
defaultKeyboardControl.leds = g_winInfo.keyboard.leds;
- winErrorFVerb(2, "Rules = \"%s\" Model = \"%s\" Layout = \"%s\""
- " Variant = \"%s\" Options = \"%s\"\n",
- g_winInfo.xkb.rules ? g_winInfo.xkb.rules : "none",
- g_winInfo.xkb.model ? g_winInfo.xkb.model : "none",
- g_winInfo.xkb.layout ? g_winInfo.xkb.layout : "none",
- g_winInfo.xkb.variant ? g_winInfo.xkb.variant : "none",
- g_winInfo.xkb.options ? g_winInfo.xkb.options : "none");
+ winDebug("Rules = \"%s\" Model = \"%s\" Layout = \"%s\""
+ " Variant = \"%s\" Options = \"%s\"\n",
+ g_winInfo.xkb.rules ? g_winInfo.xkb.rules : "none",
+ g_winInfo.xkb.model ? g_winInfo.xkb.model : "none",
+ g_winInfo.xkb.layout ? g_winInfo.xkb.layout : "none",
+ g_winInfo.xkb.variant ? g_winInfo.xkb.variant : "none",
+ g_winInfo.xkb.options ? g_winInfo.xkb.options : "none");
InitKeyboardDeviceStruct (pDeviceInt,
&g_winInfo.xkb,
@@ -182,7 +182,7 @@ winKeybdProc (DeviceIntPtr pDeviceInt, int iState)
}
else
{
- winErrorFVerb (1, "winKeybdProc - Error initializing keyboard AutoRepeat\n");
+ winDebug ("winKeybdProc - Error initializing keyboard AutoRepeat\n");
}
break;
@@ -276,6 +276,21 @@ winRestoreModeKeyStates (void)
internalKeyStates = XkbStateFieldFromRec(&inputInfo.keyboard->key->xkbInfo->state);
winDebug("winRestoreModeKeyStates: state %d\n", internalKeyStates);
+ {
+ /* Make sure the message queue is empty, otherwise the GetKeyState will not always
+ return the correct state of the numlock key, capslock key, ...
+ This is mainly because this function is called from the WM_SETFOCUS handler.
+ From MSDN GetKeyState: The key status returned from this function changes as a thread
+ reads key messages from its message queue.*/
+ MSG msg;
+
+ /* Process all messages on our queue */
+ while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
+ {
+ DispatchMessage (&msg);
+ }
+ }
+
/*
* NOTE: The C XOR operator, ^, will not work here because it is
* a bitwise operator, not a logical operator. C does not
diff --git a/xorg-server/hw/xwin/winkeybd.h b/xorg-server/hw/xwin/winkeybd.h
index 40fbc179f..37cc66733 100644
--- a/xorg-server/hw/xwin/winkeybd.h
+++ b/xorg-server/hw/xwin/winkeybd.h
@@ -37,8 +37,10 @@
#define WIN_KEYMAP_COLS 3
-/* Rows 160 through 165 correspond to software-generated codes, which
- * may not be associated with the appropriate scan code.
+/* ASCII column, rows 33 through 40 are for Speech Recognition with
+ * num-lock asserted.
+ * Rows 160 through 165 correspond to software-generated codes, which
+ * may not be associated with the appropriate scan code/extended bit
*/
const int
g_iKeyMap [] = {
@@ -76,14 +78,14 @@ g_iKeyMap [] = {
/* 30 */ 0, 0, 0,
/* 31 */ 0, 0, 0,
/* 32 */ 0, 0, 0,
- /* 33 */ VK_PRIOR, 0, KEY_PgUp,
- /* 34 */ VK_NEXT, 0, KEY_PgDown,
- /* 35 */ VK_END, 0, KEY_End,
- /* 36 */ VK_HOME, 0, KEY_Home,
- /* 37 */ VK_LEFT, 0, KEY_Left,
- /* 38 */ VK_UP, 0, KEY_Up,
- /* 39 */ VK_RIGHT, 0, KEY_Right,
- /* 40 */ VK_DOWN, 0, KEY_Down,
+ /* 33 */ VK_PRIOR, KEY_PgUp, KEY_PgUp,
+ /* 34 */ VK_NEXT, KEY_PgDown, KEY_PgDown,
+ /* 35 */ VK_END, KEY_End, KEY_End,
+ /* 36 */ VK_HOME, KEY_Home, KEY_Home,
+ /* 37 */ VK_LEFT, KEY_Left, KEY_Left,
+ /* 38 */ VK_UP, KEY_Up, KEY_Up,
+ /* 39 */ VK_RIGHT, KEY_Right, KEY_Right,
+ /* 40 */ VK_DOWN, KEY_Down, KEY_Down,
/* 41 */ 0, 0, 0,
/* 42 */ 0, 0, 0,
/* 43 */ 0, 0, 0,
@@ -203,12 +205,12 @@ g_iKeyMap [] = {
/* 157 */ 0, 0, 0,
/* 158 */ 0, 0, 0,
/* 159 */ 0, 0, 0,
- /* 160 */ VK_LSHIFT, KEY_ShiftL, 0,
- /* 161 */ VK_RSHIFT, KEY_ShiftR, 0,
- /* 162 */ VK_LCONTROL, KEY_LCtrl, 0,
- /* 163 */ VK_RCONTROL, KEY_RCtrl, 0,
- /* 164 */ VK_LMENU, KEY_Alt, 0,
- /* 165 */ VK_RMENU, KEY_AltLang, 0,
+ /* 160 */ VK_LSHIFT, KEY_ShiftL, KEY_ShiftL,
+ /* 161 */ VK_RSHIFT, KEY_ShiftR, KEY_ShiftR,
+ /* 162 */ VK_LCONTROL, KEY_LCtrl, KEY_LCtrl,
+ /* 163 */ VK_RCONTROL, KEY_RCtrl, KEY_RCtrl,
+ /* 164 */ VK_LMENU, KEY_Alt, KEY_Alt,
+ /* 165 */ VK_RMENU, KEY_AltLang, KEY_AltLang,
/* 166 */ 0, 0, 0,
/* 167 */ 0, 0, 0,
/* 168 */ 0, 0, 0,
diff --git a/xorg-server/hw/xwin/winlayouts.h b/xorg-server/hw/xwin/winlayouts.h
index 743f03c39..c53f0e054 100644
--- a/xorg-server/hw/xwin/winlayouts.h
+++ b/xorg-server/hw/xwin/winlayouts.h
@@ -63,6 +63,7 @@ WinKBLayoutRec winKBLayouts[] =
{ 0x0000040b, -1, "pc105", "fi", NULL, NULL, "Finnish"},
{ 0x0000040c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"},
{ 0x0000080c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"},
+ { 0x0001080c, -1, "pc105", "be", NULL, NULL, "Belgian (Comma)"},
{ 0x00000c0c, -1, "pc105", "ca", "fr-legacy", NULL, "French (Canada, Legacy)"},
{ 0x0000100c, -1, "pc105", "ch", "fr", NULL, "French (Switzerland)"},
{ 0x0000040d, -1, "pc105", "il", NULL, NULL, "Hebrew"},
diff --git a/xorg-server/hw/xwin/winmisc.c b/xorg-server/hw/xwin/winmisc.c
index 8e6698118..a5a2d3d1c 100644
--- a/xorg-server/hw/xwin/winmisc.c
+++ b/xorg-server/hw/xwin/winmisc.c
@@ -44,7 +44,7 @@ void
winQueryBestSizeNativeGDI (int class, unsigned short *pWidth,
unsigned short *pHeight, ScreenPtr pScreen)
{
- ErrorF ("winQueryBestSizeNativeGDI\n");
+ winDebug ("winQueryBestSizeNativeGDI\n");
}
#endif
diff --git a/xorg-server/hw/xwin/winmonitors.c b/xorg-server/hw/xwin/winmonitors.c
index 63af803d0..876d23437 100644
--- a/xorg-server/hw/xwin/winmonitors.c
+++ b/xorg-server/hw/xwin/winmonitors.c
@@ -27,8 +27,13 @@ from The Open Group.
*/
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
#include "win.h"
+#define COMPILE_MULTIMON_STUBS
+#include <multimon.h>
#include "winmonitors.h"
/*
@@ -53,30 +58,8 @@ wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _d
return TRUE;
}
-typedef wBOOL (*ENUMDISPLAYMONITORSPROC)(HDC,LPCRECT,MONITORENUMPROC,LPARAM);
-ENUMDISPLAYMONITORSPROC _EnumDisplayMonitors;
-
-wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data);
-
Bool QueryMonitor(int index, struct GetMonitorInfoData *data)
{
- /* Load EnumDisplayMonitors from DLL */
- HMODULE user32;
- FARPROC func;
- user32 = LoadLibrary("user32.dll");
- if (user32 == NULL)
- {
- winW32Error(2, "Could not open user32.dll");
- return FALSE;
- }
- func = GetProcAddress(user32, "EnumDisplayMonitors");
- if (func == NULL)
- {
- winW32Error(2, "Could not resolve EnumDisplayMonitors: ");
- return FALSE;
- }
- _EnumDisplayMonitors = (ENUMDISPLAYMONITORSPROC)func;
-
/* prepare data */
if (data == NULL)
return FALSE;
@@ -84,9 +67,7 @@ Bool QueryMonitor(int index, struct GetMonitorInfoData *data)
data->requestedMonitor = index;
/* query information */
- _EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data);
+ xEnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data);
- /* cleanup */
- FreeLibrary(user32);
return TRUE;
}
diff --git a/xorg-server/hw/xwin/winmouse.c b/xorg-server/hw/xwin/winmouse.c
index 32bb49bf2..acdf6e129 100644
--- a/xorg-server/hw/xwin/winmouse.c
+++ b/xorg-server/hw/xwin/winmouse.c
@@ -36,6 +36,13 @@
#endif
#include "win.h"
+#ifdef XKB
+#ifndef XKB_IN_SERVER
+#define XKB_IN_SERVER
+#endif
+#include <xkbsrv.h>
+#endif
+
#include "inputstr.h"
#include "exevents.h" /* for button/axes labels */
#include "xserver-properties.h"
@@ -89,7 +96,7 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
*/
if (lngMouseButtons < 3)
lngMouseButtons = 3;
- winMsg(X_PROBED, "%d mouse buttons found\n", lngMouseButtons);
+ winDebug("%d mouse buttons found\n", lngMouseButtons);
/* allocate memory:
* number of buttons + 2x mouse wheel event + 1 extra (offset for map)
@@ -249,10 +256,8 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
for (i = 0; i < nevents; i++)
mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event);
-#if CYGDEBUG
- ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
+ winDebug("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
iEventType, iButton, nevents);
-#endif
}
@@ -372,7 +377,7 @@ void winEnqueueMotion(int x, int y)
ValuatorMask mask;
EventListPtr events;
- miPointerSetPosition(g_pwinPointer, &x, &y);
+ miPointerSetPosition(g_pwinPointer, Absolute, &x, &y);
valuators[0] = x;
valuators[1] = y;
diff --git a/xorg-server/hw/xwin/winmsg.c b/xorg-server/hw/xwin/winmsg.c
index d0464f71b..e3d68915f 100644
--- a/xorg-server/hw/xwin/winmsg.c
+++ b/xorg-server/hw/xwin/winmsg.c
@@ -33,71 +33,12 @@
#endif
#include "win.h"
#include "winmsg.h"
-#if CYGDEBUG
+#ifdef WINDBG
#include "winmessages.h"
#endif
#include <stdarg.h>
-void winVMsg (int, MessageType, int verb, const char *, va_list);
-
-void
-winVMsg (int scrnIndex, MessageType type, int verb, const char *format,
- va_list ap)
-{
- LogVMessageVerb(type, verb, format, ap);
-}
-
-
-void
-winDrvMsg (int scrnIndex, MessageType type, const char *format, ...)
-{
- va_list ap;
- va_start (ap, format);
- LogVMessageVerb(type, 0, format, ap);
- va_end (ap);
-}
-
-
-void
-winMsg (MessageType type, const char *format, ...)
-{
- va_list ap;
- va_start (ap, format);
- LogVMessageVerb(type, 1, format, ap);
- va_end (ap);
-}
-
-
-void
-winDrvMsgVerb (int scrnIndex, MessageType type, int verb, const char *format,
- ...)
-{
- va_list ap;
- va_start (ap, format);
- LogVMessageVerb(type, verb, format, ap);
- va_end (ap);
-}
-
-
-void
-winMsgVerb (MessageType type, int verb, const char *format, ...)
-{
- va_list ap;
- va_start (ap, format);
- LogVMessageVerb(type, verb, format, ap);
- va_end (ap);
-}
-
-
-void
-winErrorFVerb (int verb, const char *format, ...)
-{
- va_list ap;
- va_start (ap, format);
- LogVMessageVerb(X_NONE, verb, format, ap);
- va_end (ap);
-}
-
+#ifdef WINDBG
void
winDebug (const char *format, ...)
{
@@ -108,22 +49,23 @@ winDebug (const char *format, ...)
}
void
-winTrace (const char *format, ...)
+winDebug4 (const char *format, ...)
{
va_list ap;
va_start (ap, format);
- LogVMessageVerb(X_NONE, 10, format, ap);
+ LogVMessageVerb(X_NONE, 4, format, ap);
va_end (ap);
}
+#endif
void
-winW32Error(int verb, const char *msg)
+winW32Error(const char *msg)
{
- winW32ErrorEx(verb, msg, GetLastError());
+ winW32ErrorEx(msg, GetLastError());
}
void
-winW32ErrorEx(int verb, const char *msg, DWORD errorcode)
+winW32ErrorEx(const char *msg, DWORD errorcode)
{
LPVOID buffer;
if (!FormatMessage(
@@ -137,16 +79,17 @@ winW32ErrorEx(int verb, const char *msg, DWORD errorcode)
0,
NULL ))
{
- winErrorFVerb(verb, "Unknown error in FormatMessage!\n");
+ ErrorF(msg);
+ ErrorF("Unknown error in FormatMessage!\n");
}
else
{
- winErrorFVerb(verb, "%s %s", msg, (char *)buffer);
+ ErrorF("%s %s", msg, (char *)buffer);
LocalFree(buffer);
}
}
-#if CYGDEBUG
+#ifdef WINDBG
void winDebugWin32Message(const char* function, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static int force = 0;
@@ -172,8 +115,4 @@ void winDebugWin32Message(const char* function, HWND hwnd, UINT message, WPARAM
}
}
}
-#else
-void winDebugWin32Message(const char* function, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-}
#endif
diff --git a/xorg-server/hw/xwin/winmsg.h b/xorg-server/hw/xwin/winmsg.h
index 611dd6962..beb6683ed 100644
--- a/xorg-server/hw/xwin/winmsg.h
+++ b/xorg-server/hw/xwin/winmsg.h
@@ -33,18 +33,21 @@
/*
* Function prototypes
*/
+
+#include "os.h"
-void winDrvMsgVerb (int scrnIndex,
- MessageType type, int verb, const char *format, ...);
-void winDrvMsg (int scrnIndex, MessageType type, const char *format, ...);
-void winMsgVerb (MessageType type, int verb, const char *format, ...);
-void winMsg (MessageType type, const char *format, ...);
+#if !defined(_MSC_VER) || defined(_DEBUG)
+#define WINDBG
void winDebug (const char *format, ...);
-void winTrace (const char *format, ...);
-
-void winErrorFVerb (int verb, const char *format, ...);
-void winW32Error(int verb, const char *message);
-void winW32ErrorEx(int verb, const char *message, DWORD errorcode);
+void winDebug4 (const char *format, ...);
void winDebugWin32Message(const char* function, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
+#else
+#define winDebug(...)
+#define winDebug4(...)
+#define winDebugWin32Message(...)
+#endif
+
+void winW32Error(const char *message);
+void winW32ErrorEx(const char *message, DWORD errorcode);
#endif
diff --git a/xorg-server/hw/xwin/winmultiwindowclass.c b/xorg-server/hw/xwin/winmultiwindowclass.c
index a5cf2120a..ca08ae483 100644
--- a/xorg-server/hw/xwin/winmultiwindowclass.c
+++ b/xorg-server/hw/xwin/winmultiwindowclass.c
@@ -139,9 +139,10 @@ winMultiWindowGetWMHints (WindowPtr pWin, WinXWMHints *hints)
while (prop)
{
if (prop->propertyName == XA_WM_HINTS
+ && prop->format == 32
&& prop->data)
{
- memcpy (hints, prop->data, sizeof (WinXWMHints));
+ memcpy (hints, prop->data, 4*(int)prop->size); /* format/8 = 4 */
return 1;
}
else
@@ -224,9 +225,10 @@ winMultiWindowGetWMNormalHints (WindowPtr pWin, WinXSizeHints *hints)
while (prop)
{
if (prop->propertyName == XA_WM_NORMAL_HINTS
+ && prop->format == 32
&& prop->data)
{
- memcpy (hints, prop->data, sizeof (WinXSizeHints));
+ memcpy (hints, prop->data, 4*(int)prop->size); /* format/8 = 4 */
return 1;
}
else
@@ -260,10 +262,12 @@ winMultiWindowGetTransientFor (WindowPtr pWin, WindowPtr *ppDaddy)
while (prop)
{
- if (prop->propertyName == XA_WM_TRANSIENT_FOR)
+ if (prop->propertyName == XA_WM_TRANSIENT_FOR
+ && prop->format == 32
+ && prop->data)
{
if (ppDaddy)
- memcpy (ppDaddy, prop->data, sizeof (WindowPtr));
+ memcpy (ppDaddy, prop->data, 4*(int)prop->size); /* format/8 = 4 */
return 1;
}
else
diff --git a/xorg-server/hw/xwin/winmultiwindowicons.c b/xorg-server/hw/xwin/winmultiwindowicons.c
index 6af9636ea..3186cd7a0 100644
--- a/xorg-server/hw/xwin/winmultiwindowicons.c
+++ b/xorg-server/hw/xwin/winmultiwindowicons.c
@@ -266,19 +266,21 @@ NetWMToWinIconAlpha(uint32_t *icon)
HICON result;
HDC hdc = GetDC(NULL);
uint32_t *DIB_pixels;
- ICONINFO ii = {TRUE};
- BITMAPV4HEADER bmh = {sizeof(bmh)};
+ ICONINFO ii;
+ BITMAPV5HEADER bmh;
/* Define an ARGB pixel format used for Color+Alpha icons */
- bmh.bV4Width = width;
- bmh.bV4Height = -height; /* Invert the image */
- bmh.bV4Planes = 1;
- bmh.bV4BitCount = 32;
- bmh.bV4V4Compression = BI_BITFIELDS;
- bmh.bV4AlphaMask = 0xFF000000;
- bmh.bV4RedMask = 0x00FF0000;
- bmh.bV4GreenMask = 0x0000FF00;
- bmh.bV4BlueMask = 0x000000FF;
+ ZeroMemory(&bmh,sizeof(bmh));
+ bmh.bV5Size = sizeof(bmh);
+ bmh.bV5Width = width;
+ bmh.bV5Height = -height; /* Invert the image */
+ bmh.bV5Planes = 1;
+ bmh.bV5BitCount = 32;
+ bmh.bV5Compression = BI_BITFIELDS;
+ bmh.bV5AlphaMask = 0xFF000000;
+ bmh.bV5RedMask = 0x00FF0000;
+ bmh.bV5GreenMask = 0x0000FF00;
+ bmh.bV5BlueMask = 0x000000FF;
ii.hbmColor = CreateDIBSection(hdc, (BITMAPINFO*)&bmh,
DIB_RGB_COLORS, (void**)&DIB_pixels, NULL, 0);
@@ -289,6 +291,9 @@ NetWMToWinIconAlpha(uint32_t *icon)
/* CreateIconIndirect() traditionally required DDBitmaps */
/* Systems from WinXP accept 32-bit ARGB DIBitmaps with full 8-bit alpha support */
/* The icon is created with a DIB + empty DDB mask (an MS example does the same) */
+ ii.fIcon = TRUE;
+ ii.xHotspot = 0;
+ ii.yHotspot = 0;
result = CreateIconIndirect(&ii);
DeleteObject(ii.hbmColor);
@@ -306,7 +311,7 @@ NetWMToWinIconThreshold(uint32_t *icon)
uint32_t *pixels = &icon[2];
int row, col;
HICON result;
- ICONINFO ii = {TRUE};
+ ICONINFO ii;
HDC hdc = GetDC(NULL);
HDC xorDC = CreateCompatibleDC(hdc);
@@ -334,6 +339,9 @@ NetWMToWinIconThreshold(uint32_t *icon)
DeleteDC(xorDC);
DeleteDC(andDC);
+ ii.fIcon = TRUE;
+ ii.xHotspot = 0;
+ ii.yHotspot = 0;
result = CreateIconIndirect(&ii);
DeleteObject(ii.hbmColor);
@@ -364,7 +372,7 @@ NetWMToWinIcon(int bpp, uint32_t *icon)
hasIconAlphaChannel = VerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION, dwlConditionMask);
versionChecked = TRUE;
- ErrorF("OS has icon alpha channel support: %s\n", hasIconAlphaChannel ? "yes" : "no");
+ winDebug("OS has icon alpha channel support: %s\n", hasIconAlphaChannel ? "yes" : "no");
}
if (hasIconAlphaChannel && (bpp==32))
diff --git a/xorg-server/hw/xwin/winmultiwindowshape.c b/xorg-server/hw/xwin/winmultiwindowshape.c
index b622db95a..9219bb708 100644
--- a/xorg-server/hw/xwin/winmultiwindowshape.c
+++ b/xorg-server/hw/xwin/winmultiwindowshape.c
@@ -46,9 +46,7 @@ winSetShapeMultiWindow (WindowPtr pWin, int kind)
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winSetShapeMultiWindow - pWin: %08x kind: %i\n", pWin, kind);
-#endif
+ winDebug ("winSetShapeMultiWindow - pWin: %08x kind: %i\n", pWin, kind);
WIN_UNWRAP(SetShape);
(*pScreen->SetShape)(pWin, kind);
@@ -90,9 +88,7 @@ winReshapeMultiWindow (WindowPtr pWin)
HRGN hRgn, hRgnRect;
winWindowPriv(pWin);
-#if CYGDEBUG
winDebug ("winReshape ()\n");
-#endif
/* Bail if the window is the root window */
if (pWin->parent == NULL)
@@ -206,3 +202,14 @@ winReshapeMultiWindow (WindowPtr pWin)
return;
}
+
+void
+winShapeRgnUpdateMultiwindow(HWND hwnd)
+{
+ WindowPtr pWin = GetProp (hwnd, WIN_WINDOW_PROP);
+ if (pWin)
+ {
+ winReshapeMultiWindow(pWin);
+ winUpdateRgnMultiWindow(pWin);
+ }
+}
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index 93434fceb..1e95fecc4 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -78,7 +78,7 @@ void winInitMultiWindowClass(void)
wcx.hIconSm = g_hSmallIconX;
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winCreateWindowsWindow - Creating class: %s\n", WINDOW_CLASS_X);
+ winDebug ("winCreateWindowsWindow - Creating class: %s\n", WINDOW_CLASS_X);
#endif
atomXWinClass = RegisterClassEx (&wcx);
@@ -98,7 +98,7 @@ winCreateWindowMultiWindow (WindowPtr pWin)
winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG
- winTrace ("winCreateWindowMultiWindow - pWin: %p\n", pWin);
+ winDebug ("winCreateWindowMultiWindow - pWin: %p\n", pWin);
#endif
WIN_UNWRAP(CreateWindow);
@@ -108,6 +108,7 @@ winCreateWindowMultiWindow (WindowPtr pWin)
/* Initialize some privates values */
pWinPriv->hRgn = NULL;
pWinPriv->hWnd = NULL;
+ pWinPriv->GlCtxWnd = FALSE;
pWinPriv->pScreenPriv = winGetScreenPriv(pWin->drawable.pScreen);
pWinPriv->fXKilled = FALSE;
@@ -128,7 +129,7 @@ winDestroyWindowMultiWindow (WindowPtr pWin)
winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winDestroyWindowMultiWindow - pWin: %p\n", pWin);
+ winDebug ("winDestroyWindowMultiWindow - pWin: %p\n", pWin);
#endif
WIN_UNWRAP(DestroyWindow);
@@ -165,32 +166,31 @@ winPositionWindowMultiWindow (WindowPtr pWin, int x, int y)
HWND hWnd = pWinPriv->hWnd;
RECT rcNew;
RECT rcOld;
-#if CYGMULTIWINDOW_DEBUG
+#ifdef WINDBG
RECT rcClient;
RECT *lpRc;
#endif
DWORD dwExStyle;
DWORD dwStyle;
-#if CYGMULTIWINDOW_DEBUG
- winTrace ("winPositionWindowMultiWindow - pWin: %p\n", pWin);
-#endif
+ winDebug ("winPositionWindowMultiWindow - pWin: %p\n", pWin);
WIN_UNWRAP(PositionWindow);
fResult = (*pScreen->PositionWindow)(pWin, x, y);
WIN_WRAP(PositionWindow, winPositionWindowMultiWindow);
-#if CYGWINDOWING_DEBUG
- ErrorF ("winPositionWindowMultiWindow: (x, y) = (%d, %d)\n",
+ winDebug ("winPositionWindowMultiWindow: (x, y) = (%d, %d)\n",
x, y);
-#endif
/* Bail out if the Windows window handle is bad */
if (!hWnd)
{
-#if CYGWINDOWING_DEBUG
- ErrorF ("\timmediately return since hWnd is NULL\n");
-#endif
+ winDebug ("\timmediately return since hWnd is NULL\n");
+ if (pWin->redirectDraw != RedirectDrawNone)
+ {
+ winDebug("winPositionWindowMultiWindow: Calling compReallocPixmap to make sure the pixmap buffer is valid.\n");
+ compReallocPixmap(pWin, x, y, pWin->drawable.width, pWin->drawable.height, pWin->borderWidth);
+ }
return fResult;
}
@@ -211,7 +211,7 @@ winPositionWindowMultiWindow (WindowPtr pWin, int x, int y)
#if CYGMULTIWINDOW_DEBUG
lpRc = &rcNew;
- ErrorF ("winPositionWindowMultiWindow - (%d ms)drawable (%d, %d)-(%d, %d)\n",
+ winDebug ("winPositionWindowMultiWindow - (%d ms)drawable (%d, %d)-(%d, %d)\n",
GetTickCount (), lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
#endif
@@ -229,40 +229,45 @@ winPositionWindowMultiWindow (WindowPtr pWin, int x, int y)
GetClientRect (hWnd, &rcClient);
lpRc = &rcNew;
- ErrorF ("winPositionWindowMultiWindow - (%d ms)rcNew (%d, %d)-(%d, %d)\n",
+ winDebug ("winPositionWindowMultiWindow - (%d ms)rcNew (%d, %d)-(%d, %d)\n",
GetTickCount (), lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
lpRc = &rcOld;
- ErrorF ("winPositionWindowMultiWindow - (%d ms)rcOld (%d, %d)-(%d, %d)\n",
+ winDebug ("winPositionWindowMultiWindow - (%d ms)rcOld (%d, %d)-(%d, %d)\n",
GetTickCount (), lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
lpRc = &rcClient;
- ErrorF ("(%d ms)rcClient (%d, %d)-(%d, %d)\n",
+ winDebug ("(%d ms)rcClient (%d, %d)-(%d, %d)\n",
GetTickCount (), lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
#endif
/* Check if the old rectangle and new rectangle are the same */
if (!EqualRect (&rcNew, &rcOld))
{
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winPositionWindowMultiWindow - Need to move\n");
-#endif
-
-#if CYGWINDOWING_DEBUG
- ErrorF ("\tMoveWindow to (%ld, %ld) - %ldx%ld\n", rcNew.left, rcNew.top,
+ winDebug ("winPositionWindowMultiWindow - Need to move\n");
+ winDebug ("\tMoveWindow to (%ld, %ld) - %ldx%ld\n", rcNew.left, rcNew.top,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
-#endif
- /* Change the position and dimensions of the Windows window */
- MoveWindow (hWnd,
- rcNew.left, rcNew.top,
- rcNew.right - rcNew.left, rcNew.bottom - rcNew.top,
- TRUE);
+
+ /* Change the position and dimensions of the Windows window */
+ if (pWinPriv->GlCtxWnd)
+ {
+ int iWidth=rcNew.right - rcNew.left;
+ int iHeight=rcNew.bottom - rcNew.top;
+ ScreenToClient(GetParent(hWnd), (LPPOINT)&rcNew);
+ MoveWindow (hWnd,
+ rcNew.left, rcNew.top,
+ iWidth, iHeight,
+ TRUE);
+ }
+ else
+ MoveWindow (hWnd,
+ rcNew.left, rcNew.top,
+ rcNew.right - rcNew.left, rcNew.bottom - rcNew.top,
+ TRUE);
}
else
{
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winPositionWindowMultiWindow - Not need to move\n");
-#endif
+ winDebug ("winPositionWindowMultiWindow - Not need to move\n");
}
return fResult;
@@ -280,9 +285,7 @@ winChangeWindowAttributesMultiWindow (WindowPtr pWin, unsigned long mask)
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winChangeWindowAttributesMultiWindow - pWin: %08x\n", pWin);
-#endif
+ winDebug ("winChangeWindowAttributesMultiWindow - pWin: %08x\n", pWin);
WIN_UNWRAP(ChangeWindowAttributes);
fResult = (*pScreen->ChangeWindowAttributes)(pWin, mask);
@@ -310,7 +313,7 @@ winUnmapWindowMultiWindow (WindowPtr pWin)
winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winUnmapWindowMultiWindow - pWin: %08x\n", pWin);
+ winDebug ("winUnmapWindowMultiWindow - pWin: %08x\n", pWin);
#endif
WIN_UNWRAP(UnrealizeWindow);
@@ -341,7 +344,7 @@ winMapWindowMultiWindow (WindowPtr pWin)
winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winMapWindowMultiWindow - pWin: %08x\n", pWin);
+ winDebug ("winMapWindowMultiWindow - pWin: %08x\n", pWin);
#endif
WIN_UNWRAP(RealizeWindow);
@@ -373,7 +376,7 @@ winReparentWindowMultiWindow (WindowPtr pWin, WindowPtr pPriorParent)
winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winReparentMultiWindow - pWin: %08x\n", pWin);
+ winDebug ("winReparentMultiWindow - pWin: %08x\n", pWin);
#endif
WIN_UNWRAP(ReparentWindow);
@@ -393,85 +396,22 @@ winReparentWindowMultiWindow (WindowPtr pWin, WindowPtr pPriorParent)
void
winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib)
{
-#if 0
- WindowPtr pPrevWin;
- UINT uFlags;
- HWND hInsertAfter;
- HWND hWnd = NULL;
-#endif
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGMULTIWINDOW_DEBUG || CYGWINDOWING_DEBUG
- winTrace ("winRestackMultiWindow - %08x\n", pWin);
-#endif
+ winDebug ("winRestackMultiWindow - %08x\n", pWin);
WIN_UNWRAP(RestackWindow);
if (pScreen->RestackWindow)
(*pScreen->RestackWindow)(pWin, pOldNextSib);
WIN_WRAP(RestackWindow, winRestackWindowMultiWindow);
-#if 1
/*
* Calling winReorderWindowsMultiWindow here means our window manager
* (i.e. Windows Explorer) has initiative to determine Z order.
*/
if (pWin->nextSib != pOldNextSib)
winReorderWindowsMultiWindow ();
-#else
- /* Bail out if no window privates or window handle is invalid */
- if (!pWinPriv || !pWinPriv->hWnd)
- return;
-
- /* Get a pointer to our previous sibling window */
- pPrevWin = pWin->prevSib;
-
- /*
- * Look for a sibling window with
- * valid privates and window handle
- */
- while (pPrevWin
- && !winGetWindowPriv(pPrevWin)
- && !winGetWindowPriv(pPrevWin)->hWnd)
- pPrevWin = pPrevWin->prevSib;
-
- /* Check if we found a valid sibling */
- if (pPrevWin)
- {
- /* Valid sibling - get handle to insert window after */
- hInsertAfter = winGetWindowPriv(pPrevWin)->hWnd;
- uFlags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE;
-
- hWnd = GetNextWindow (pWinPriv->hWnd, GW_HWNDPREV);
-
- do
- {
- if (GetProp (hWnd, WIN_WINDOW_PROP))
- {
- if (hWnd == winGetWindowPriv(pPrevWin)->hWnd)
- {
- uFlags |= SWP_NOZORDER;
- }
- break;
- }
- hWnd = GetNextWindow (hWnd, GW_HWNDPREV);
- }
- while (hWnd);
- }
- else
- {
- /* No valid sibling - make this window the top window */
- hInsertAfter = HWND_TOP;
- uFlags = SWP_NOMOVE | SWP_NOSIZE;
- }
-
- /* Perform the restacking operation in Windows */
- SetWindowPos (pWinPriv->hWnd,
- hInsertAfter,
- 0, 0,
- 0, 0,
- uFlags);
-#endif
}
@@ -493,12 +433,13 @@ winCreateWindowsWindow (WindowPtr pWin)
winPrivScreenPtr pScreenPriv = pWinPriv->pScreenPriv;
WinXSizeHints hints;
WindowPtr pDaddy;
+ DWORD dwStyle;
+ DWORD dwExStyle;
+ RECT rc;
winInitMultiWindowClass();
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winCreateWindowsWindow - pWin: %08x\n", pWin);
-#endif
+ winDebug ("winCreateWindowsWindow - pWin: %08x\n", pWin);
iX = pWin->drawable.x + GetSystemMetrics (SM_XVIRTUALSCREEN);
iY = pWin->drawable.y + GetSystemMetrics (SM_YVIRTUALSCREEN);
@@ -506,12 +447,46 @@ winCreateWindowsWindow (WindowPtr pWin)
iWidth = pWin->drawable.width;
iHeight = pWin->drawable.height;
- /* ensure window actually ends up somewhere visible */
- if (iX > GetSystemMetrics (SM_CXVIRTUALSCREEN))
- iX = CW_USEDEFAULT;
+ /* If it's an InputOutput window, and so is going to end up being made visible,
+ make sure the window actually ends up somewhere where it will be visible
+ Dont't do it by making just one of the two iX and iY CW_USEDEFAULT since
+ this will create a window at place CW_USEDEFAULT which is 0x80000000 */
+ if (pWin->drawable.class != InputOnly)
+ {
+ while (1)
+ {
+ if (iX < GetSystemMetrics (SM_XVIRTUALSCREEN))
+ {
+ iX = GetSystemMetrics (SM_XVIRTUALSCREEN);
+ ErrorF("Resetting iX to %d\n",iX);
+ }
+ else if (iX > GetSystemMetrics (SM_CXVIRTUALSCREEN))
+ {
+ iX = GetSystemMetrics (SM_CXVIRTUALSCREEN)-iWidth;
+ ErrorF("Resetting iX to %d\n",iX);
+ }
+ else
+ break;
+ }
- if (iY > GetSystemMetrics (SM_CYVIRTUALSCREEN))
- iY = CW_USEDEFAULT;
+ while (1)
+ {
+ if (iY < GetSystemMetrics (SM_YVIRTUALSCREEN))
+ {
+ iY = GetSystemMetrics (SM_YVIRTUALSCREEN);
+ ErrorF("Resetting iY to %d\n",iY);
+ }
+ else if (iY > GetSystemMetrics (SM_CYVIRTUALSCREEN))
+ {
+ iY = GetSystemMetrics (SM_CYVIRTUALSCREEN)-iHeight;
+ ErrorF("Resetting iY to %d\n",iY);
+ }
+ else
+ break;
+ }
+ }
+
+ winDebug("winCreateWindowsWindow - %dx%d @ %dx%d\n", iWidth, iHeight, iX, iY);
if (winMultiWindowGetTransientFor (pWin, &pDaddy))
{
@@ -537,10 +512,23 @@ winCreateWindowsWindow (WindowPtr pWin)
/* Create the window */
/* Make it OVERLAPPED in create call since WS_POPUP doesn't support */
/* CW_USEDEFAULT, change back to popup after creation */
- hWnd = CreateWindowExA (WS_EX_TOOLWINDOW, /* Extended styles */
+
+ dwStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
+ dwExStyle = WS_EX_TOOLWINDOW;
+ rc.top = 0;
+ rc.left = 0;
+ rc.bottom = iHeight;
+ rc.right = iWidth;
+ AdjustWindowRectEx(&rc, dwStyle, FALSE, dwExStyle);
+ iHeight = rc.bottom - rc.top;
+ iWidth = rc.right - rc.left;
+
+ winDebug("winCreateWindowsWindow - window size %dx%d\n", iWidth, iHeight);
+
+ hWnd = CreateWindowExA (dwExStyle, /* Extended styles */
WINDOW_CLASS_X, /* Class name */
WINDOW_TITLE_X, /* Window name */
- WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
+ dwStyle, /* Styles */
iX, /* Horizontal position */
iY, /* Vertical position */
iWidth, /* Right edge */
@@ -561,6 +549,10 @@ winCreateWindowsWindow (WindowPtr pWin)
if (hIcon) SendMessage (hWnd, WM_SETICON, ICON_BIG, (LPARAM) hIcon);
if (hIconSmall) SendMessage (hWnd, WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall);
+ /* If we asked the native WM to place the window, synchronize the X window position */
+ if (iX == CW_USEDEFAULT)
+ winAdjustXWindow(pWin, hWnd);
+
/* Change style back to popup, already placed... */
SetWindowLongPtr(hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
SetWindowPos (hWnd, 0, 0, 0, 0, 0,
@@ -592,9 +584,11 @@ winDestroyWindowsWindow (WindowPtr pWin)
MSG msg;
winWindowPriv(pWin);
BOOL oldstate = winInDestroyWindowsWindow;
+ HICON hIcon;
+ HICON hIconSm;
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winDestroyWindowsWindow\n");
+ winDebug ("winDestroyWindowsWindow\n");
#endif
/* Bail out if the Windows window handle is invalid */
@@ -603,6 +597,10 @@ winDestroyWindowsWindow (WindowPtr pWin)
winInDestroyWindowsWindow = TRUE;
+ /* Store the info we need to destroy after this window is gone */
+ hIcon = (HICON)SendMessage(pWinPriv->hWnd, WM_GETICON, ICON_BIG, 0);
+ hIconSm = (HICON)SendMessage(pWinPriv->hWnd, WM_GETICON, ICON_SMALL, 0);
+
SetProp (pWinPriv->hWnd, WIN_WINDOW_PROP, NULL);
/* Destroy the Windows window */
DestroyWindow (pWinPriv->hWnd);
@@ -610,6 +608,10 @@ winDestroyWindowsWindow (WindowPtr pWin)
/* Null our handle to the Window so referencing it will cause an error */
pWinPriv->hWnd = NULL;
+ /* Destroy any icons we created for this window */
+ winDestroyIcon(hIcon);
+ winDestroyIcon(hIconSm);
+
/* Process all messages on our queue */
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
@@ -622,7 +624,7 @@ winDestroyWindowsWindow (WindowPtr pWin)
winInDestroyWindowsWindow = oldstate;
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("-winDestroyWindowsWindow\n");
+ winDebug ("-winDestroyWindowsWindow\n");
#endif
}
@@ -639,7 +641,7 @@ winUpdateWindowsWindow (WindowPtr pWin)
HWND hWnd = pWinPriv->hWnd;
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winUpdateWindowsWindow\n");
+ winDebug ("winUpdateWindowsWindow\n");
#endif
/* Check if the Windows window's parents have been destroyed */
@@ -655,20 +657,57 @@ winUpdateWindowsWindow (WindowPtr pWin)
}
/* Display the window without activating it */
- ShowWindow (pWinPriv->hWnd, SW_SHOWNOACTIVATE);
+ if (pWin->drawable.class != InputOnly)
+ ShowWindow (pWinPriv->hWnd, SW_SHOWNOACTIVATE);
/* Send first paint message */
UpdateWindow (pWinPriv->hWnd);
}
else if (hWnd != NULL)
{
- /* Destroy the Windows window if its parents are destroyed */
- winDestroyWindowsWindow (pWin);
- assert (pWinPriv->hWnd == NULL);
+ if (pWinPriv->GlCtxWnd)
+ {
+ /* We do not need to destroy the window but to reparent it and move it to the
+ correct place when it is an opengl window */
+ int offsetx;
+ int offsety;
+ HWND hParentWnd;
+ WindowPtr pParent=pWin->parent;
+
+ while (pParent)
+ {
+ winWindowPriv(pParent);
+ hParentWnd=pWinPriv->hWnd;
+ if (hParentWnd)
+ break;
+ pParent=pParent->parent;
+ }
+
+ if (pParent)
+ {
+ offsetx=pParent->drawable.x;
+ offsety=pParent->drawable.y;
+ }
+ else
+ {
+ offsetx=0;
+ offsety=0;
+ }
+ winDebug ("-winUpdateWindowsWindow: %x changing parent to %x and moving to %d,%d\n",pWinPriv->hWnd,hParentWnd,pWin->drawable.x-offsetx,pWin->drawable.y-offsety);
+ SetParent(pWinPriv->hWnd,hParentWnd);
+ SetWindowPos(pWinPriv->hWnd,NULL,pWin->drawable.x-offsetx,pWin->drawable.y-offsety,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_SHOWWINDOW);
+ }
+ else
+ {
+ /* Destroy the Windows window if its parents are destroyed */
+ /* First check if we need to release the DC when it is an opengl window */
+ winDestroyWindowsWindow (pWin);
+ assert (pWinPriv->hWnd == NULL);
+ }
}
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("-winUpdateWindowsWindow\n");
+ winDebug ("-winUpdateWindowsWindow\n");
#endif
}
@@ -687,7 +726,7 @@ winGetWindowID (WindowPtr pWin)
FindClientResourcesByType (c, RT_WINDOW, winFindWindow, &wi);
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winGetWindowID - Window ID: %d\n", wi.id);
+ winDebug ("winGetWindowID - Window ID: %d\n", wi.id);
#endif
return wi.id;
@@ -725,17 +764,13 @@ winReorderWindowsMultiWindow (void)
DWORD dwCurrentProcessID = GetCurrentProcessId ();
DWORD dwWindowProcessID = 0;
-#if CYGMULTIWINDOW_DEBUG || CYGWINDOWING_DEBUG
- winTrace ("winReorderWindowsMultiWindow\n");
-#endif
+ winDebug ("winReorderWindowsMultiWindow\n");
if (fRestacking)
{
/* It is a recusive call so immediately exit */
-#if CYGWINDOWING_DEBUG
- ErrorF ("winReorderWindowsMultiWindow - "
+ winDebug ("winReorderWindowsMultiWindow - "
"exit because fRestacking == TRUE\n");
-#endif
return;
}
fRestacking = TRUE;
@@ -793,9 +828,7 @@ winMinimizeWindow (Window id)
winPrivScreenPtr pScreenPriv = NULL;
winScreenInfo *pScreenInfo = NULL;
-#if CYGWINDOWING_DEBUG
- ErrorF ("winMinimizeWindow\n");
-#endif
+ winDebug ("winMinimizeWindow\n");
dixLookupResourceByType((pointer) &pWin, id, RT_WINDOW, NullClient, DixUnknownAccess);
if (!pWin)
@@ -808,7 +841,7 @@ winMinimizeWindow (Window id)
if (pScreen) pScreenPriv = winGetScreenPriv(pScreen);
if (pScreenPriv) pScreenInfo = pScreenPriv->pScreenInfo;
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
if (pScreenPriv && pScreenInfo->fInternalWM)
{
pRLWinPriv = (win32RootlessWindowPtr) RootlessFrameForWindow (pWin, FALSE);
@@ -837,9 +870,8 @@ winCopyWindowMultiWindow (WindowPtr pWin, DDXPointRec oldpt,
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGWINDOWING_DEBUG
- ErrorF ("CopyWindowMultiWindow\n");
-#endif
+ winDebug ("CopyWindowMultiWindow\n");
+
WIN_UNWRAP(CopyWindow);
(*pScreen->CopyWindow)(pWin, oldpt, oldRegion);
WIN_WRAP(CopyWindow, winCopyWindowMultiWindow);
@@ -856,9 +888,7 @@ winMoveWindowMultiWindow (WindowPtr pWin, int x, int y,
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGWINDOWING_DEBUG
- ErrorF ("MoveWindowMultiWindow to (%d, %d)\n", x, y);
-#endif
+ winDebug ("MoveWindowMultiWindow to (%d, %d)\n", x, y);
WIN_UNWRAP(MoveWindow);
(*pScreen->MoveWindow)(pWin, x, y, pSib, kind);
@@ -876,9 +906,8 @@ winResizeWindowMultiWindow (WindowPtr pWin, int x, int y, unsigned int w,
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGWINDOWING_DEBUG
- ErrorF ("ResizeWindowMultiWindow to (%d, %d) - %dx%d\n", x, y, w, h);
-#endif
+ winDebug ("ResizeWindowMultiWindow to (%d, %d) - %dx%d\n", x, y, w, h);
+
WIN_UNWRAP(ResizeWindow);
(*pScreen->ResizeWindow)(pWin, x, y, w, h, pSib);
WIN_WRAP(ResizeWindow, winResizeWindowMultiWindow);
@@ -908,15 +937,11 @@ winAdjustXWindow (WindowPtr pWin, HWND hwnd)
#define WIDTH(rc) (rc.right - rc.left)
#define HEIGHT(rc) (rc.bottom - rc.top)
-#if CYGWINDOWING_DEBUG
- ErrorF ("winAdjustXWindow\n");
-#endif
+ winDebug ("winAdjustXWindow\n");
if (IsIconic (hwnd))
{
-#if CYGWINDOWING_DEBUG
- ErrorF ("\timmediately return because the window is iconized\n");
-#endif
+ winDebug ("\timmediately return because the window is iconized\n");
/*
* If the Windows window is minimized, its WindowRect has
* meaningless values so we don't adjust X window to it.
@@ -932,34 +957,26 @@ winAdjustXWindow (WindowPtr pWin, HWND hwnd)
x = pDraw->x + GetSystemMetrics (SM_XVIRTUALSCREEN);
y = pDraw->y + GetSystemMetrics (SM_YVIRTUALSCREEN);
SetRect (&rcDraw, x, y, x + pDraw->width, y + pDraw->height);
-#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tDrawable extend {%d, %d, %d, %d}, {%d, %d}\n",
rcDraw.left, rcDraw.top, rcDraw.right, rcDraw.bottom,
rcDraw.right - rcDraw.left, rcDraw.bottom - rcDraw.top);
-#endif
dwExStyle = GetWindowLongPtr (hwnd, GWL_EXSTYLE);
dwStyle = GetWindowLongPtr (hwnd, GWL_STYLE);
-#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindowStyle: %08x %08x\n", dwStyle, dwExStyle);
-#endif
AdjustWindowRectEx (&rcDraw, dwStyle, FALSE, dwExStyle);
/* The source of adjust */
GetWindowRect (hwnd, &rcWin);
-#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindow extend {%d, %d, %d, %d}, {%d, %d}\n",
rcWin.left, rcWin.top, rcWin.right, rcWin.bottom,
rcWin.right - rcWin.left, rcWin.bottom - rcWin.top);
winDebug("\tDraw extend {%d, %d, %d, %d}, {%d, %d}\n",
rcDraw.left, rcDraw.top, rcDraw.right, rcDraw.bottom,
rcDraw.right - rcDraw.left, rcDraw.bottom - rcDraw.top);
-#endif
if (EqualRect (&rcDraw, &rcWin)) {
/* Bail if no adjust is needed */
-#if CYGWINDOWING_DEBUG
- ErrorF ("\treturn because already adjusted\n");
-#endif
+ winDebug ("\treturn because already adjusted\n");
return 0;
}
@@ -979,10 +996,8 @@ winAdjustXWindow (WindowPtr pWin, HWND hwnd)
vlist[1] = pDraw->y + dY - wBorderWidth(pWin);
vlist[2] = pDraw->width + dW;
vlist[3] = pDraw->height + dH;
-#if CYGWINDOWING_DEBUG
- ErrorF ("\tConfigureWindow to (%ld, %ld) - %ldx%ld\n", vlist[0], vlist[1],
+ winDebug ("\tConfigureWindow to (%ld, %ld) - %ldx%ld\n", vlist[0], vlist[1],
vlist[2], vlist[3]);
-#endif
return ConfigureWindow (pWin, CWX | CWY | CWWidth | CWHeight,
vlist, wClient(pWin));
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index 28685a729..f178967e1 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -43,12 +43,14 @@
#include <fcntl.h>
#include <setjmp.h>
#define HANDLE void *
+#ifdef _MSC_VER
+typedef int pid_t;
+#endif
#include <pthread.h>
#undef HANDLE
#include <X11/X.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
-#include <X11/Xlocale.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
@@ -61,9 +63,12 @@
#include "winprefs.h"
#include "window.h"
#include "pixmapstr.h"
+#include "winmsg.h"
#include "windowstr.h"
+#include "winmultiwindowclass.h"
#ifdef XWIN_MULTIWINDOWEXTWM
+#define _WINDOWSWM_SERVER_
#include <X11/extensions/windowswmstr.h>
#else
/* We need the native HWND atom for intWM, so for consistency use the
@@ -75,10 +80,6 @@ extern void winDebug(const char *format, ...);
extern void winReshapeMultiWindow(WindowPtr pWin);
extern void winUpdateRgnMultiWindow(WindowPtr pWin);
-#ifndef CYGDEBUG
-#define CYGDEBUG NO
-#endif
-
/*
* Constant defines
*/
@@ -105,7 +106,9 @@ typedef struct _WMMsgQueueRec {
struct _WMMsgNodeRec *pTail;
pthread_mutex_t pmMutex;
pthread_cond_t pcNotEmpty;
+#ifdef _DEBUG
int nQueueSize;
+#endif
} WMMsgQueueRec, *WMMsgQueuePtr;
typedef struct _WMInfo {
@@ -114,7 +117,9 @@ typedef struct _WMInfo {
Atom atmWmProtos;
Atom atmWmDelete;
Atom atmPrivMap;
+#ifdef XWIN_MULTIWINDOWINTWM
Bool fAllowOtherWM;
+#endif
} WMInfoRec, *WMInfoPtr;
typedef struct _WMProcArgRec {
@@ -179,17 +184,15 @@ winMultiWindowXMsgProcErrorHandler (Display *pDisplay, XErrorEvent *pErr);
static int
winMultiWindowXMsgProcIOErrorHandler (Display *pDisplay);
+static void
+winMultiWindowThreadExit(void *arg);
+
static int
winRedirectErrorHandler (Display *pDisplay, XErrorEvent *pErr);
static void
winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg);
-#if 0
-static void
-PreserveWin32Stack(WMInfoPtr pWMInfo, Window iWindow, UINT direction);
-#endif
-
static Bool
CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen, Bool fAllowOtherWM);
@@ -204,7 +207,11 @@ winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle);
*/
static jmp_buf g_jmpWMEntry;
+static XIOErrorHandler g_winMultiWindowWMOldIOErrorHandler;
+static pthread_t g_winMultiWindowWMThread;
static jmp_buf g_jmpXMsgProcEntry;
+static XIOErrorHandler g_winMultiWindowXMsgProcOldIOErrorHandler;
+static pthread_t g_winMultiWindowXMsgProcThread;
static Bool g_shutdown = FALSE;
static Bool redirectError = FALSE;
static Bool g_fAnotherWMRunning = FALSE;
@@ -233,48 +240,10 @@ PushMessage (WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
pQueue->pHead = pNode;
}
-
-#if 0
- switch (pNode->msg.msg)
- {
- case WM_WM_MOVE:
- ErrorF ("\tWM_WM_MOVE\n");
- break;
- case WM_WM_SIZE:
- ErrorF ("\tWM_WM_SIZE\n");
- break;
- case WM_WM_RAISE:
- ErrorF ("\tWM_WM_RAISE\n");
- break;
- case WM_WM_LOWER:
- ErrorF ("\tWM_WM_LOWER\n");
- break;
- case WM_WM_MAP:
- ErrorF ("\tWM_WM_MAP\n");
- break;
- case WM_WM_MAP2:
- ErrorF ("\tWM_WM_MAP2\n");
- break;
- case WM_WM_MAP3:
- ErrorF ("\tWM_WM_MAP3\n");
- break;
- case WM_WM_UNMAP:
- ErrorF ("\tWM_WM_UNMAP\n");
- break;
- case WM_WM_KILL:
- ErrorF ("\tWM_WM_KILL\n");
- break;
- case WM_WM_ACTIVATE:
- ErrorF ("\tWM_WM_ACTIVATE\n");
- break;
- default:
- ErrorF ("\tUnknown Message.\n");
- break;
- }
-#endif
-
- /* Increase the count of elements in the queue by one */
+#ifdef _DEBUG
+ /* Increase the count of elements in the queue by one */
++(pQueue->nQueueSize);
+#endif
/* Release the queue mutex */
pthread_mutex_unlock (&pQueue->pmMutex);
@@ -284,7 +253,7 @@ PushMessage (WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
}
-#if CYGMULTIWINDOW_DEBUG
+#ifdef WINDBG
/*
* QueueSize - Return the size of the queue
*/
@@ -333,12 +302,12 @@ PopMessage (WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo)
pQueue->pTail = NULL;
}
- /* Drop the number of elements in the queue by one */
+ #ifdef _DEBUG
+ /* Drop the number of elements in the queue by one */
--(pQueue->nQueueSize);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("Queue Size %d %d\n", pQueue->nQueueSize, QueueSize(pQueue));
-#endif
+ winDebug ("Queue Size %d %d\n", pQueue->nQueueSize, QueueSize(pQueue));
+ #endif
/* Release the queue mutex */
pthread_mutex_unlock (&pQueue->pmMutex);
@@ -388,24 +357,24 @@ InitQueue (WMMsgQueuePtr pQueue)
pQueue->pTail = NULL;
/* There are no elements initially */
+ #ifdef _DEBUG
pQueue->nQueueSize = 0;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("InitQueue - Queue Size %d %d\n", pQueue->nQueueSize,
+ winDebug ("InitQueue - Queue Size %d %d\n", pQueue->nQueueSize,
QueueSize(pQueue));
-#endif
+ #endif
- ErrorF ("InitQueue - Calling pthread_mutex_init\n");
+ winDebug ("InitQueue - Calling pthread_mutex_init\n");
/* Create synchronization objects */
pthread_mutex_init (&pQueue->pmMutex, NULL);
- ErrorF ("InitQueue - pthread_mutex_init returned\n");
- ErrorF ("InitQueue - Calling pthread_cond_init\n");
+ winDebug ("InitQueue - pthread_mutex_init returned\n");
+ winDebug ("InitQueue - Calling pthread_cond_init\n");
pthread_cond_init (&pQueue->pcNotEmpty, NULL);
- ErrorF ("InitQueue - pthread_cond_init returned\n");
+ winDebug ("InitQueue - pthread_cond_init returned\n");
return TRUE;
}
@@ -424,9 +393,7 @@ GetWindowName (Display *pDisplay, Window iWin, wchar_t **ppName)
int iLen, i;
XTextProperty xtpName;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("GetWindowName\n");
-#endif
+ winDebug ("GetWindowName\n");
/* Intialize ppName to NULL */
*ppName = NULL;
@@ -435,9 +402,7 @@ GetWindowName (Display *pDisplay, Window iWin, wchar_t **ppName)
nResult = XGetWMName (pDisplay, iWin, &xtpName);
if (!nResult || !xtpName.value || !xtpName.nitems)
{
-#if CYGMULTIWINDOW_DEBUG
ErrorF ("GetWindowName - XGetWMName failed. No name.\n");
-#endif
return;
}
@@ -460,10 +425,7 @@ GetWindowName (Display *pDisplay, Window iWin, wchar_t **ppName)
MultiByteToWideChar (CP_UTF8, 0, pszReturnData, -1, *ppName, iLen);
XFree (xtpName.value);
free (pszReturnData);
-
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("GetWindowName - Returning\n");
-#endif
+ winDebug ("GetWindowName - Returning\n");
}
@@ -626,24 +588,26 @@ winMultiWindowWMProc (void *pArg)
{
WMProcArgPtr pProcArg = (WMProcArgPtr)pArg;
WMInfoPtr pWMInfo = pProcArg->pWMInfo;
+
+ pthread_cleanup_push(&winMultiWindowThreadExit, NULL);
/* Initialize the Window Manager */
winInitMultiWindowWM (pWMInfo, pProcArg);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winMultiWindowWMProc ()\n");
-#endif
+ winDebug ("winMultiWindowWMProc ()\n");
/* Loop until we explicitly break out */
for (;;)
{
WMMsgNodePtr pNode;
+#ifdef XWIN_MULTIWINDOWINTWM
if(g_fAnotherWMRunning)/* Another Window manager exists. */
{
Sleep (1000);
continue;
}
+#endif
/* Pop a message off of our queue */
pNode = PopMessage (&pWMInfo->wmMsgQueue, pWMInfo);
@@ -655,48 +619,27 @@ winMultiWindowWMProc (void *pArg)
pthread_exit (NULL);
}
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winMultiWindowWMProc - %d ms MSG: %d ID: %d\n",
+ winDebug ("winMultiWindowWMProc - %d ms MSG: %d ID: %d\n",
GetTickCount (), (int)pNode->msg.msg, (int)pNode->msg.dwID);
-#endif
/* Branch on the message type */
switch (pNode->msg.msg)
{
-#if 0
- case WM_WM_MOVE:
- ErrorF ("\tWM_WM_MOVE\n");
- break;
-
- case WM_WM_SIZE:
- ErrorF ("\tWM_WM_SIZE\n");
- break;
-#endif
-
case WM_WM_RAISE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_RAISE\n");
-#endif
+ winDebug ("\tWM_WM_RAISE\n");
/* Raise the window */
XRaiseWindow (pWMInfo->pDisplay, pNode->msg.iWindow);
-#if 0
- PreserveWin32Stack (pWMInfo, pNode->msg.iWindow, GW_HWNDPREV);
-#endif
break;
case WM_WM_LOWER:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_LOWER\n");
-#endif
+ winDebug ("\tWM_WM_LOWER\n");
/* Lower the window */
XLowerWindow (pWMInfo->pDisplay, pNode->msg.iWindow);
break;
case WM_WM_MAP:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_MAP\n");
-#endif
+ winDebug ("\tWM_WM_MAP\n");
/* Put a note as to the HWND associated with this Window */
XChangeProperty (pWMInfo->pDisplay,
pNode->msg.iWindow,
@@ -708,12 +651,16 @@ winMultiWindowWMProc (void *pArg)
1);
UpdateName (pWMInfo, pNode->msg.iWindow);
winUpdateIcon (pNode->msg.iWindow);
+ {
+ HWND zstyle = HWND_NOTOPMOST;
+ winApplyHints (pWMInfo->pDisplay, pNode->msg.iWindow, pNode->msg.hwndWindow, &zstyle);
+ winUpdateWindowPosition (pNode->msg.hwndWindow, TRUE, &zstyle);
+ }
break;
case WM_WM_MAP2:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_MAP2\n");
-#endif
+ winDebug ("\tWM_WM_MAP2\n");
+
XChangeProperty (pWMInfo->pDisplay,
pNode->msg.iWindow,
pWMInfo->atmPrivMap,
@@ -725,9 +672,8 @@ winMultiWindowWMProc (void *pArg)
break;
case WM_WM_MAP3:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_MAP3\n");
-#endif
+ winDebug ("\tWM_WM_MAP3\n");
+
/* Put a note as to the HWND associated with this Window */
XChangeProperty (pWMInfo->pDisplay,
pNode->msg.iWindow,
@@ -747,18 +693,14 @@ winMultiWindowWMProc (void *pArg)
break;
case WM_WM_UNMAP:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_UNMAP\n");
-#endif
+ winDebug ("\tWM_WM_UNMAP\n");
/* Unmap the window */
XUnmapWindow (pWMInfo->pDisplay, pNode->msg.iWindow);
break;
case WM_WM_KILL:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_KILL\n");
-#endif
+ winDebug ("\tWM_WM_KILL\n");
{
int i, n, found = 0;
Atom *protocols;
@@ -789,9 +731,7 @@ winMultiWindowWMProc (void *pArg)
break;
case WM_WM_ACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tWM_WM_ACTIVATE\n");
-#endif
+ winDebug ("\tWM_WM_ACTIVATE\n");
/* Set the input focus */
XSetInputFocus (pWMInfo->pDisplay,
@@ -835,9 +775,10 @@ winMultiWindowWMProc (void *pArg)
/* Free the passed-in argument */
free (pProcArg);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF("-winMultiWindowWMProc ()\n");
-#endif
+ winDebug("-winMultiWindowWMProc ()\n");
+
+ pthread_cleanup_pop(0);
+
return NULL;
}
@@ -860,7 +801,9 @@ winMultiWindowXMsgProc (void *pArg)
int iReturn;
XIconSize *xis;
- ErrorF ("winMultiWindowXMsgProc - Hello\n");
+ pthread_cleanup_push(&winMultiWindowThreadExit, NULL);
+
+ winDebug ("winMultiWindowXMsgProc - Hello\n");
/* Check that argument pointer is not invalid */
if (pProcArg == NULL)
@@ -869,7 +812,7 @@ winMultiWindowXMsgProc (void *pArg)
pthread_exit (NULL);
}
- ErrorF ("winMultiWindowXMsgProc - Calling pthread_mutex_lock ()\n");
+ winDebug ("winMultiWindowXMsgProc - Calling pthread_mutex_lock ()\n");
/* Grab the server started mutex - pause until we get it */
iReturn = pthread_mutex_lock (pProcArg->ppmServerStarted);
@@ -881,29 +824,21 @@ winMultiWindowXMsgProc (void *pArg)
pthread_exit (NULL);
}
- ErrorF ("winMultiWindowXMsgProc - pthread_mutex_lock () returned.\n");
-
- /* Allow multiple threads to access Xlib */
- if (XInitThreads () == 0)
- {
- ErrorF ("winMultiWindowXMsgProc - XInitThreads () failed. Exiting.\n");
- pthread_exit (NULL);
- }
-
- /* See if X supports the current locale */
- if (XSupportsLocale () == False)
- {
- ErrorF ("winMultiWindowXMsgProc - Warning: locale not supported by X\n");
- }
+ winDebug ("winMultiWindowXMsgProc - pthread_mutex_lock () returned.\n");
/* Release the server started mutex */
pthread_mutex_unlock (pProcArg->ppmServerStarted);
- ErrorF ("winMultiWindowXMsgProc - pthread_mutex_unlock () returned.\n");
+ winDebug ("winMultiWindowXMsgProc - pthread_mutex_unlock () returned.\n");
+
+ /* Install our error handler */
+ XSetErrorHandler (winMultiWindowXMsgProcErrorHandler);
+ g_winMultiWindowXMsgProcThread = pthread_self();
+ g_winMultiWindowXMsgProcOldIOErrorHandler = XSetIOErrorHandler (winMultiWindowXMsgProcIOErrorHandler);
/* Set jump point for IO Error exits */
iReturn = setjmp (g_jmpXMsgProcEntry);
-
+
/* Check if we should continue operations */
if (iReturn != WIN_JMP_ERROR_IO
&& iReturn != WIN_JMP_OKAY)
@@ -919,16 +854,11 @@ winMultiWindowXMsgProc (void *pArg)
pthread_exit (NULL);
}
- /* Install our error handler */
- XSetErrorHandler (winMultiWindowXMsgProcErrorHandler);
- XSetIOErrorHandler (winMultiWindowXMsgProcIOErrorHandler);
-
/* Setup the display connection string x */
- snprintf (pszDisplay,
- 512, "127.0.0.1:%s.%d", display, (int)pProcArg->dwScreen);
+ winGetDisplayName(pszDisplay, (int)pProcArg->dwScreen);
/* Print the display connection string */
- ErrorF ("winMultiWindowXMsgProc - DISPLAY=%s\n", pszDisplay);
+ winDebug ("winMultiWindowXMsgProc - DISPLAY=%s\n", pszDisplay);
/* Use our generated cookie for authentication */
winSetAuthorization();
@@ -943,7 +873,7 @@ winMultiWindowXMsgProc (void *pArg)
pProcArg->pDisplay = XOpenDisplay (pszDisplay);
if (pProcArg->pDisplay == NULL)
{
- ErrorF ("winMultiWindowXMsgProc - Could not open display, try: %d, "
+ winDebug ("winMultiWindowXMsgProc - Could not open display, try: %d, "
"sleeping: %d\n",
iRetries + 1, WIN_CONNECT_DELAY);
++iRetries;
@@ -963,13 +893,21 @@ winMultiWindowXMsgProc (void *pArg)
pthread_exit (NULL);
}
- ErrorF ("winMultiWindowXMsgProc - XOpenDisplay () returned and "
+ winDebug ("winMultiWindowXMsgProc - XOpenDisplay () returned and "
"successfully opened the display.\n");
/* Check if another window manager is already running */
+#ifdef XWIN_MULTIWINDOWINTWM
g_fAnotherWMRunning = CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen, pProcArg->pWMInfo->fAllowOtherWM);
+#else
+ g_fAnotherWMRunning = CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen, FALSE);
+#endif
- if (g_fAnotherWMRunning && !pProcArg->pWMInfo->fAllowOtherWM)
+ if (g_fAnotherWMRunning
+#ifdef XWIN_MULTIWINDOWINTWM
+ && !pProcArg->pWMInfo->fAllowOtherWM
+#endif
+ )
{
ErrorF ("winMultiWindowXMsgProc - "
"another window manager is running. Exiting.\n");
@@ -1016,6 +954,7 @@ winMultiWindowXMsgProc (void *pArg)
if (g_shutdown)
break;
+#ifdef XWIN_MULTIWINDOWINTWM
if (pProcArg->pWMInfo->fAllowOtherWM && !XPending (pProcArg->pDisplay))
{
if (CheckAnotherWindowManager (pProcArg->pDisplay, pProcArg->dwScreen, TRUE))
@@ -1037,12 +976,13 @@ winMultiWindowXMsgProc (void *pArg)
Sleep (500);
continue;
}
+#endif
/* Fetch next event */
XNextEvent (pProcArg->pDisplay, &event);
/* Branch on event type */
- if (event.type == CreateNotify)
+ if (event.type == MapNotify /* CreateNotify */)
{
XWindowAttributes attr;
@@ -1055,7 +995,7 @@ winMultiWindowXMsgProc (void *pArg)
event.xcreatewindow.window,
&attr);
- if (!attr.override_redirect)
+ if (!attr.override_redirect && attr.class != InputOnly)
XSetWindowBorderWidth(pProcArg->pDisplay,
event.xcreatewindow.window,
0);
@@ -1106,6 +1046,7 @@ winMultiWindowXMsgProc (void *pArg)
event_send.xreparent.parent = parent;
event_send.xreparent.x = attr.x;
event_send.xreparent.y = attr.y;
+ event_send.xreparent.override_redirect = False;
XSendEvent(event.xmap.display,
event.xmap.window,
@@ -1114,6 +1055,30 @@ winMultiWindowXMsgProc (void *pArg)
}
}
}
+ else if (event.type == ConfigureNotify)
+ {
+ if (!event.xconfigure.send_event)
+ {
+ /*
+ Java applications using AWT on JRE 1.6.0 break with non-reparenting WMs AWT
+ doesn't explicitly know about (See sun bug #6434227)
+
+ XDecoratedPeer.handleConfigureNotifyEvent() only processes non-synthetic
+ ConfigureNotify events to update window location if it's identified the
+ WM as a non-reparenting WM it knows about (compiz or lookingglass)
+
+ Rather than tell all sorts of lies to get XWM to recognize us as one of
+ those, simply send a synthetic ConfigureNotify for every non-synthetic one
+ */
+ XEvent event_send = event;
+ event_send.xconfigure.send_event = TRUE;
+ event_send.xconfigure.event = event.xconfigure.window;
+ XSendEvent(event.xconfigure.display,
+ event.xconfigure.window,
+ True, StructureNotifyMask,
+ &event_send);
+ }
+ }
else if (event.type == PropertyNotify
&& event.xproperty.atom == atmWmName)
{
@@ -1140,7 +1105,7 @@ winMultiWindowXMsgProc (void *pArg)
&& event.xclient.message_type == atmWmChange
&& event.xclient.data.l[0] == IconicState)
{
- ErrorF ("winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState\n");
+ winDebug ("winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState\n");
memset (&msg, 0, sizeof (msg));
@@ -1152,7 +1117,7 @@ winMultiWindowXMsgProc (void *pArg)
}
XCloseDisplay (pProcArg->pDisplay);
- pthread_exit (NULL);
+ pthread_cleanup_pop(0);
return NULL;
}
@@ -1190,7 +1155,9 @@ winInitWM (void **ppWMInfo,
/* Set a return pointer to the Window Manager info structure */
*ppWMInfo = pWMInfo;
+#ifdef XWIN_MULTIWINDOWINTWM
pWMInfo->fAllowOtherWM = allowOtherWM;
+#endif
/* Setup the argument structure for the thread function */
pArg->dwScreen = dwScreen;
@@ -1224,9 +1191,7 @@ winInitWM (void **ppWMInfo,
return FALSE;
}
-#if CYGDEBUG || YES
winDebug ("winInitWM - Returning.\n");
-#endif
return TRUE;
}
@@ -1243,7 +1208,7 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
char pszDisplay[512];
int iReturn;
- ErrorF ("winInitMultiWindowWM - Hello\n");
+ winDebug ("winInitMultiWindowWM - Hello\n");
/* Check that argument pointer is not invalid */
if (pProcArg == NULL)
@@ -1252,7 +1217,7 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pthread_exit (NULL);
}
- ErrorF ("winInitMultiWindowWM - Calling pthread_mutex_lock ()\n");
+ winDebug ("winInitMultiWindowWM - Calling pthread_mutex_lock ()\n");
/* Grab our garbage mutex to satisfy pthread_cond_wait */
iReturn = pthread_mutex_lock (pProcArg->ppmServerStarted);
@@ -1264,29 +1229,21 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pthread_exit (NULL);
}
- ErrorF ("winInitMultiWindowWM - pthread_mutex_lock () returned.\n");
-
- /* Allow multiple threads to access Xlib */
- if (XInitThreads () == 0)
- {
- ErrorF ("winInitMultiWindowWM - XInitThreads () failed. Exiting.\n");
- pthread_exit (NULL);
- }
-
- /* See if X supports the current locale */
- if (XSupportsLocale () == False)
- {
- ErrorF ("winInitMultiWindowWM - Warning: Locale not supported by X.\n");
- }
+ winDebug ("winInitMultiWindowWM - pthread_mutex_lock () returned.\n");
/* Release the server started mutex */
pthread_mutex_unlock (pProcArg->ppmServerStarted);
- ErrorF ("winInitMultiWindowWM - pthread_mutex_unlock () returned.\n");
+ winDebug ("winInitMultiWindowWM - pthread_mutex_unlock () returned.\n");
+
+ /* Install our error handler */
+ XSetErrorHandler (winMultiWindowWMErrorHandler);
+ g_winMultiWindowWMThread = pthread_self();
+ g_winMultiWindowWMOldIOErrorHandler = XSetIOErrorHandler (winMultiWindowWMIOErrorHandler);
/* Set jump point for IO Error exits */
iReturn = setjmp (g_jmpWMEntry);
-
+
/* Check if we should continue operations */
if (iReturn != WIN_JMP_ERROR_IO
&& iReturn != WIN_JMP_OKAY)
@@ -1302,19 +1259,11 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pthread_exit (NULL);
}
- /* Install our error handler */
- XSetErrorHandler (winMultiWindowWMErrorHandler);
- XSetIOErrorHandler (winMultiWindowWMIOErrorHandler);
-
/* Setup the display connection string x */
- snprintf (pszDisplay,
- 512,
- "127.0.0.1:%s.%d",
- display,
- (int) pProcArg->dwScreen);
+ winGetDisplayName(pszDisplay, (int)pProcArg->dwScreen);
/* Print the display connection string */
- ErrorF ("winInitMultiWindowWM - DISPLAY=%s\n", pszDisplay);
+ winDebug ("winInitMultiWindowWM - DISPLAY=%s\n", pszDisplay);
/* Use our generated cookie for authentication */
winSetAuthorization();
@@ -1346,7 +1295,7 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pthread_exit (NULL);
}
- ErrorF ("winInitMultiWindowWM - XOpenDisplay () returned and "
+ winDebug ("winInitMultiWindowWM - XOpenDisplay () returned and "
"successfully opened the display.\n");
@@ -1383,9 +1332,7 @@ winSendMessageToWM (void *pWMInfo, winWMMessagePtr pMsg)
{
WMMsgNodePtr pNode;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winSendMessageToWM ()\n");
-#endif
+ winDebug ("winSendMessageToWM ()\n");
pNode = (WMMsgNodePtr)malloc(sizeof(WMMsgNodeRec));
if (pNode != NULL)
@@ -1417,7 +1364,18 @@ winMultiWindowWMErrorHandler (Display *pDisplay, XErrorEvent *pErr)
pErr->error_code,
pszErrorMsg,
sizeof (pszErrorMsg));
- ErrorF ("winMultiWindowWMErrorHandler - ERROR: %s\n", pszErrorMsg);
+ ErrorF ("winMultiWindowWMErrorHandler - ERROR: %s\n"
+ " errorCode %d\n"
+ " serial %d\n"
+ " resourceID 0x%x\n"
+ " majorCode %d\n"
+ " minorCode %d\n"
+ , pszErrorMsg
+ , pErr->error_code
+ , pErr->serial
+ , pErr->resourceid
+ , pErr->request_code
+ , pErr->minor_code);
return 0;
}
@@ -1432,12 +1390,18 @@ winMultiWindowWMIOErrorHandler (Display *pDisplay)
{
ErrorF ("winMultiWindowWMIOErrorHandler!\n\n");
- if (g_shutdown)
- pthread_exit(NULL);
+ if (pthread_equal(pthread_self(),g_winMultiWindowWMThread))
+ {
+ if (g_shutdown)
+ pthread_exit(NULL);
+
+ /* Restart at the main entry point */
+ longjmp (g_jmpWMEntry, WIN_JMP_ERROR_IO);
+ }
+
+ if (g_winMultiWindowWMOldIOErrorHandler)
+ g_winMultiWindowWMOldIOErrorHandler(pDisplay);
- /* Restart at the main entry point */
- longjmp (g_jmpWMEntry, WIN_JMP_ERROR_IO);
-
return 0;
}
@@ -1455,9 +1419,18 @@ winMultiWindowXMsgProcErrorHandler (Display *pDisplay, XErrorEvent *pErr)
pErr->error_code,
pszErrorMsg,
sizeof (pszErrorMsg));
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winMultiWindowXMsgProcErrorHandler - ERROR: %s\n", pszErrorMsg);
-#endif
+ ErrorF ("winMultiWindowXMsgProcErrorHandler - ERROR: %s\n"
+ " errorCode %d\n"
+ " serial %d\n"
+ " resourceID 0x%x\n"
+ " majorCode %d\n"
+ " minorCode %d\n"
+ , pszErrorMsg
+ , pErr->error_code
+ , pErr->serial
+ , pErr->resourceid
+ , pErr->request_code
+ , pErr->minor_code);
return 0;
}
@@ -1472,12 +1445,30 @@ winMultiWindowXMsgProcIOErrorHandler (Display *pDisplay)
{
ErrorF ("winMultiWindowXMsgProcIOErrorHandler!\n\n");
- /* Restart at the main entry point */
- longjmp (g_jmpXMsgProcEntry, WIN_JMP_ERROR_IO);
-
+ if (pthread_equal(pthread_self(),g_winMultiWindowXMsgProcThread))
+ {
+ /* Restart at the main entry point */
+ longjmp (g_jmpXMsgProcEntry, WIN_JMP_ERROR_IO);
+ }
+
+ if (g_winMultiWindowXMsgProcOldIOErrorHandler)
+ g_winMultiWindowXMsgProcOldIOErrorHandler(pDisplay);
+
return 0;
}
+/*
+ * winMultiWindowThreadExit - Thread exit handler
+ */
+
+static void
+winMultiWindowThreadExit(void *arg)
+{
+ AbortDDX();
+
+ /* multiwindow client thread has exited, stop server as well */
+ TerminateProcess(GetCurrentProcess(),1);
+}
/*
* Catch RedirectError to detect other window manager running
@@ -1528,7 +1519,7 @@ CheckAnotherWindowManager (Display *pDisplay, DWORD dwScreen, Bool fAllowOtherWM
void
winDeinitMultiWindowWM (void)
{
- ErrorF ("winDeinitMultiWindowWM - Noting shutdown in progress\n");
+ winDebug ("winDeinitMultiWindowWM - Noting shutdown in progress\n");
g_shutdown = TRUE;
}
@@ -1554,6 +1545,7 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
unsigned long hint = 0, maxmin = 0, style, nitems = 0 , left = 0;
WindowPtr pWin = GetProp (hWnd, WIN_WINDOW_PROP);
MwmHints *mwm_hint = NULL;
+ WinXSizeHints SizeHints;
if (!hWnd) return;
if (!IsWindow (hWnd)) return;
@@ -1645,7 +1637,25 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
}
/* Override hint settings from above with settings from config file */
- style = winOverrideStyle((unsigned long)pWin);
+ {
+ XClassHint class_hint = {0,0};
+
+ if (XGetClassHint(pDisplay, iWindow, &class_hint))
+ {
+ char *window_name = 0;
+ XFetchName(pDisplay, iWindow, &window_name);
+
+ style = winOverrideStyle(class_hint.res_name, class_hint.res_class, window_name);
+
+ if (class_hint.res_name) XFree(class_hint.res_name);
+ if (class_hint.res_class) XFree(class_hint.res_class);
+ if (window_name) XFree(window_name);
+ }
+ else
+ {
+ style = STYLE_NONE;
+ }
+ }
if (style & STYLE_TOPMOST) *zstyle = HWND_TOPMOST;
else if (style & STYLE_MAXIMIZE) maxmin = (hint & ~HINT_MIN) | HINT_MAX;
else if (style & STYLE_MINIMIZE) maxmin = (hint & ~HINT_MAX) | HINT_MIN;
@@ -1657,16 +1667,14 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
if (style & STYLE_NOTITLE)
hint = (hint & ~HINT_NOFRAME & ~HINT_BORDER & ~HINT_CAPTION) | HINT_SIZEBOX;
else if (style & STYLE_OUTLINE)
- hint = (hint & ~HINT_NOFRAME & ~HINT_SIZEBOX & ~HINT_CAPTION) | HINT_BORDER;
+ hint = (hint & ~HINT_NOFRAME & ~HINT_CAPTION) | HINT_BORDER;
else if (style & STYLE_NOFRAME)
- hint = (hint & ~HINT_BORDER & ~HINT_CAPTION & ~HINT_SIZEBOX) | HINT_NOFRAME;
+ hint = (hint & ~HINT_BORDER & ~HINT_CAPTION) | HINT_NOFRAME;
/* Now apply styles to window */
style = GetWindowLongPtr(hWnd, GWL_STYLE) & ~WS_CAPTION & ~WS_SIZEBOX; /* Just in case */
- if (!style) return;
-
- if (!hint) /* All on */
- style = style | WS_CAPTION | WS_SIZEBOX;
+ if (!hint) /* All on, but no resize of children is allowed */
+ style = style | WS_CAPTION;
else if (hint & HINT_NOFRAME) /* All off */
style = style & ~WS_CAPTION & ~WS_SIZEBOX;
else style = style | ((hint & HINT_BORDER) ? WS_BORDER : 0) |
@@ -1676,6 +1684,14 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
if (hint & HINT_NOMAXIMIZE)
style = style & ~WS_MAXIMIZEBOX;
+
+ if (winMultiWindowGetWMNormalHints(pWin, &SizeHints))
+ {
+ if (!(SizeHints.max_width&&SizeHints.max_height&&(SizeHints.min_width == SizeHints.max_width)&&(SizeHints.min_height == SizeHints.max_height) ))
+ style|=WS_SIZEBOX;
+ }
+ else
+ style|=WS_SIZEBOX;
SetWindowLongPtr (hWnd, GWL_STYLE, style);
}
@@ -1703,12 +1719,6 @@ winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle)
/* Setup a rectangle with the X window position and size */
SetRect (&rcNew, iX, iY, iX + iWidth, iY + iHeight);
-#if 0
- ErrorF ("winUpdateWindowPosition - (%d, %d)-(%d, %d)\n",
- rcNew.left, rcNew.top,
- rcNew.right, rcNew.bottom);
-#endif
-
AdjustWindowRectEx (&rcNew, GetWindowLongPtr (hWnd, GWL_STYLE), FALSE, WS_EX_APPWINDOW);
/* Don't allow window decoration to disappear off to top-left as a result of this adjustment */
@@ -1726,12 +1736,6 @@ winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle)
rcNew.bottom += iDy;
}
-#if 0
- ErrorF ("winUpdateWindowPosition - (%d, %d)-(%d, %d)\n",
- rcNew.left, rcNew.top,
- rcNew.right, rcNew.bottom);
-#endif
-
/* Position the Windows window */
SetWindowPos (hWnd, *zstyle, rcNew.left, rcNew.top,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top,
diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c
index 10123c63a..fe262be61 100644
--- a/xorg-server/hw/xwin/winmultiwindowwndproc.c
+++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c
@@ -42,6 +42,13 @@
#include "winmsg.h"
#include "inputstr.h"
+#ifdef XKB
+#ifndef XKB_IN_SERVER
+#define XKB_IN_SERVER
+#endif
+#include <xkbsrv.h>
+#endif
+
extern void winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle);
@@ -322,9 +329,7 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
Bool needRestack = FALSE;
LRESULT ret;
-#if CYGDEBUG
winDebugWin32Message("winTopLevelWindowProc", hwnd, message, wParam, lParam);
-#endif
/* Check if the Windows window property for our X window pointer is valid */
if ((pWin = GetProp (hwnd, WIN_WINDOW_PROP)) != NULL)
@@ -357,31 +362,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
fWMMsgInitialized = TRUE;
-#if 0
- /*
- * Print some debugging information
- */
-
- ErrorF ("hWnd %08X\n", hwnd);
- ErrorF ("pWin %08X\n", pWin);
- ErrorF ("pDraw %08X\n", pDraw);
- ErrorF ("\ttype %08X\n", pWin->drawable.type);
- ErrorF ("\tclass %08X\n", pWin->drawable.class);
- ErrorF ("\tdepth %08X\n", pWin->drawable.depth);
- ErrorF ("\tbitsPerPixel %08X\n", pWin->drawable.bitsPerPixel);
- ErrorF ("\tid %08X\n", pWin->drawable.id);
- ErrorF ("\tx %08X\n", pWin->drawable.x);
- ErrorF ("\ty %08X\n", pWin->drawable.y);
- ErrorF ("\twidth %08X\n", pWin->drawable.width);
- ErrorF ("\thenght %08X\n", pWin->drawable.height);
- ErrorF ("\tpScreen %08X\n", pWin->drawable.pScreen);
- ErrorF ("\tserialNumber %08X\n", pWin->drawable.serialNumber);
- ErrorF ("g_iWindowPrivateKey %p\n", g_iWindowPrivateKey);
- ErrorF ("pWinPriv %08X\n", pWinPriv);
- ErrorF ("s_pScreenPriv %08X\n", s_pScreenPriv);
- ErrorF ("s_pScreenInfo %08X\n", s_pScreenInfo);
- ErrorF ("hwndScreen %08X\n", hwndScreen);
-#endif
}
/* Branch on message type */
@@ -413,10 +393,9 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
GetWindowRect(hwnd, &rWindow);
hRgnWindow = CreateRectRgnIndirect(&rWindow);
SetWindowRgn (hwnd, hRgnWindow, TRUE);
- DeleteObject(hRgnWindow);
}
- SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)XMING_SIGNATURE);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)VCXSRV_SIGNATURE);
return 0;
@@ -732,7 +711,7 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
if (wParam == VK_F4 && (GetKeyState (VK_MENU) & 0x8000))
break;
-#if CYGWINDOWING_DEBUG
+#ifdef WINDBG
if (wParam == VK_ESCAPE)
{
/* Place for debug: put any tests and dumps here */
@@ -743,27 +722,27 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
windPlace.length = sizeof (WINDOWPLACEMENT);
GetWindowPlacement (hwnd, &windPlace);
pRect = &windPlace.rcNormalPosition;
- ErrorF ("\nCYGWINDOWING Dump:\n"
+ winDebug ("\nCYGWINDOWING Dump:\n"
"\tdrawable: (%hd, %hd) - %hdx%hd\n", pDraw->x,
pDraw->y, pDraw->width, pDraw->height);
- ErrorF ("\twindPlace: (%ld, %ld) - %ldx%ld\n", pRect->left,
+ winDebug ("\twindPlace: (%ld, %ld) - %ldx%ld\n", pRect->left,
pRect->top, pRect->right - pRect->left,
pRect->bottom - pRect->top);
if (GetClientRect (hwnd, &rc))
{
pRect = &rc;
- ErrorF ("\tClientRect: (%ld, %ld) - %ldx%ld\n", pRect->left,
+ winDebug ("\tClientRect: (%ld, %ld) - %ldx%ld\n", pRect->left,
pRect->top, pRect->right - pRect->left,
pRect->bottom - pRect->top);
}
if (GetWindowRect (hwnd, &rc))
{
pRect = &rc;
- ErrorF ("\tWindowRect: (%ld, %ld) - %ldx%ld\n", pRect->left,
+ winDebug ("\tWindowRect: (%ld, %ld) - %ldx%ld\n", pRect->left,
pRect->top, pRect->right - pRect->left,
pRect->bottom - pRect->top);
}
- ErrorF ("\n");
+ winDebug ("\n");
}
#endif
@@ -800,9 +779,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
/* Tell our Window Manager thread to activate the window */
wmMsg.msg = WM_WM_ACTIVATE;
- if (fWMMsgInitialized)
- if (!pWin || !pWin->overrideRedirect) /* for OOo menus */
- winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
+ if (fWMMsgInitialized && pWin->realized && !pWin->overrideRedirect /* for OOo menus */)
+ winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
}
/* Prevent the mouse wheel from stalling when another window is minimized */
if (HIWORD(wParam) == 0 && LOWORD(wParam) == WA_ACTIVE &&
@@ -838,7 +816,7 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
/* Branch on if the window was killed in X already */
if (pWinPriv && !pWinPriv->fXKilled)
{
- ErrorF ("winTopLevelWindowProc - WM_DESTROY - WM_WM_KILL\n");
+ winDebug ("winTopLevelWindowProc - WM_DESTROY - WM_WM_KILL\n");
/* Tell our Window Manager thread to kill the window */
wmMsg.msg = WM_WM_KILL;
@@ -891,12 +869,10 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
else /* It is an overridden window so make it top of Z stack */
{
HWND forHwnd = GetForegroundWindow();
-#if CYGWINDOWING_DEBUG
- ErrorF ("overridden window is shown\n");
-#endif
+ winDebug ("overridden window is shown\n");
if (forHwnd != NULL)
{
- if (GetWindowLongPtr(forHwnd, GWLP_USERDATA) & (LONG_PTR)XMING_SIGNATURE)
+ if (GetWindowLongPtr(forHwnd, GWLP_USERDATA) & (LONG_PTR)VCXSRV_SIGNATURE)
{
if (GetWindowLongPtr(forHwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)
SetWindowPos (hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
@@ -982,7 +958,7 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
case WM_SIZE:
/* see dix/window.c */
-#if CYGWINDOWING_DEBUG
+#ifdef WINDBG
{
char buf[64];
switch (wParam)
@@ -999,24 +975,34 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
default:
strcpy(buf, "UNKNOWN_FLAG");
}
- ErrorF ("winTopLevelWindowProc - WM_SIZE to %dx%d (%s) - %d ms\n",
+ winDebug ("winTopLevelWindowProc - WM_SIZE to %dx%d (%s) - %d ms\n",
(int)LOWORD(lParam), (int)HIWORD(lParam), buf,
(int)(GetTickCount ()));
}
#endif
/* Adjust the X Window to the moved Windows window */
winAdjustXWindow (pWin, hwnd);
+ if (wParam == SIZE_MINIMIZED) winReorderWindowsMultiWindow();
return 0; /* end of WM_SIZE handler */
+ case WM_STYLECHANGED:
+ /* when the style changes, adjust the window size so the client area remains the same */
+ {
+ LONG x,y;
+ DrawablePtr pDraw = &pWin->drawable;
+ x = pDraw->x - wBorderWidth(pWin);
+ y = pDraw->y - wBorderWidth(pWin);
+ winPositionWindowMultiWindow(pWin, x, y);
+ }
+ return 0;
+
case WM_MOUSEACTIVATE:
/* Check if this window needs to be made active when clicked */
if (!GetProp (pWinPriv->hWnd, WIN_NEEDMANAGE_PROP))
{
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_MOUSEACTIVATE - "
+ winDebug ("winTopLevelWindowProc - WM_MOUSEACTIVATE - "
"MA_NOACTIVATE\n");
-#endif
/* */
return MA_NOACTIVATE;
diff --git a/xorg-server/hw/xwin/winnativegdi.c b/xorg-server/hw/xwin/winnativegdi.c
index 4d7afe898..ef95f834a 100644
--- a/xorg-server/hw/xwin/winnativegdi.c
+++ b/xorg-server/hw/xwin/winnativegdi.c
@@ -116,7 +116,7 @@ winCloseScreenNativeGDI (int nIndex, ScreenPtr pScreen)
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
- ErrorF ("winCloseScreenNativeGDI - Freeing screen resources\n");
+ winDebug ("winCloseScreenNativeGDI - Freeing screen resources\n");
/* Flag that the screen is closed */
pScreenPriv->fClosed = TRUE;
@@ -130,7 +130,7 @@ winCloseScreenNativeGDI (int nIndex, ScreenPtr pScreen)
/* Delete the window property */
RemoveProp (pScreenPriv->hwndScreen, WIN_SCR_PROP);
- ErrorF ("winCloseScreenNativeGDI - Destroying window\n");
+ winDebug ("winCloseScreenNativeGDI - Destroying window\n");
/* Delete tray icon, if we have one */
if (!pScreenInfo->fNoTrayIcon)
@@ -156,7 +156,7 @@ winCloseScreenNativeGDI (int nIndex, ScreenPtr pScreen)
/* Free the screen privates for this screen */
free (pScreenPriv);
- ErrorF ("winCloseScreenNativeGDI - Returning\n");
+ winDebug ("winCloseScreenNativeGDI - Returning\n");
return TRUE;
}
@@ -215,7 +215,7 @@ winInitVisualsNativeGDI (ScreenPtr pScreen)
}
/* Tell the user how many bits per RGB we are using */
- ErrorF ("winInitVisualsNativeGDI - Using dwBitsPerRGB: %d\n",
+ winDebug ("winInitVisualsNativeGDI - Using dwBitsPerRGB: %d\n",
(int) pScreenPriv->dwBitsPerRGB);
/* Create a single visual according to the Windows screen depth */
@@ -238,7 +238,7 @@ winInitVisualsNativeGDI (ScreenPtr pScreen)
break;
case 8:
- ErrorF ("winInitVisuals - Calling miSetVisualTypesAndMasks\n");
+ winDebug ("winInitVisuals - Calling miSetVisualTypesAndMasks\n");
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
StaticColorMask,
pScreenPriv->dwBitsPerRGB,
@@ -257,9 +257,7 @@ winInitVisualsNativeGDI (ScreenPtr pScreen)
return FALSE;
}
-#if 1
- ErrorF ("winInitVisualsNativeGDI - Returning\n");
-#endif
+ winDebug ("winInitVisualsNativeGDI - Returning\n");
return TRUE;
}
@@ -386,11 +384,13 @@ winCreateDIBNativeGDI (int iWidth, int iHeight, int iDepth,
pbmih->biPlanes = 1;
pbmih->biBitCount = iDepth;
pbmih->biCompression = BI_RGB;
+ /*
pbmih->biSizeImage = 0;
pbmih->biXPelsPerMeter = 0;
pbmih->biYPelsPerMeter = 0;
pbmih->biClrUsed = 0;
pbmih->biClrImportant = 0;
+ */
/* Setup color table for mono DIBs */
if (iDepth == 1)
diff --git a/xorg-server/hw/xwin/winpfbdd.c b/xorg-server/hw/xwin/winpfbdd.c
index c0bca71e3..c6d0167ca 100644
--- a/xorg-server/hw/xwin/winpfbdd.c
+++ b/xorg-server/hw/xwin/winpfbdd.c
@@ -75,7 +75,7 @@ winAllocateFBPrimaryDD (ScreenPtr pScreen)
DDSURFACEDESC *pddsdOffscreen = NULL;
RECT rcClient;
- ErrorF ("winAllocateFBPrimaryDD\n");
+ winDebug ("winAllocateFBPrimaryDD\n");
/* Get client area location in screen coords */
GetClientRect (pScreenPriv->hwndScreen, &rcClient);
@@ -100,7 +100,7 @@ winAllocateFBPrimaryDD (ScreenPtr pScreen)
}
- ErrorF ("winAllocateFBPrimaryDD - Created and initialized DD\n");
+ winDebug ("winAllocateFBPrimaryDD - Created and initialized DD\n");
/* Are we windowed or fullscreen? */
if (pScreenInfo->fFullScreen)
@@ -151,7 +151,7 @@ winAllocateFBPrimaryDD (ScreenPtr pScreen)
FatalError ("winAllocateFBPrimaryDD - Could not create primary "
"surface %08x\n", (unsigned int) ddrval);
- ErrorF ("winAllocateFBPrimaryDD - Created primary\n");
+ winDebug ("winAllocateFBPrimaryDD - Created primary\n");
/* Allocate a DD surface description for our screen privates */
pddsdPrimary = pScreenPriv->pddsdPrimary
@@ -187,7 +187,7 @@ winAllocateFBPrimaryDD (ScreenPtr pScreen)
FatalError ("winAllocateFBPrimaryDD - Could not create shadow "
"surface\n");
- ErrorF ("winAllocateFBPrimaryDD - Created offscreen\n");
+ winDebug ("winAllocateFBPrimaryDD - Created offscreen\n");
/* Allocate a DD surface description for our screen privates */
pddsdOffscreen = pScreenPriv->pddsdOffscreen
@@ -198,7 +198,7 @@ winAllocateFBPrimaryDD (ScreenPtr pScreen)
ZeroMemory (pddsdOffscreen, sizeof (*pddsdOffscreen));
pddsdOffscreen->dwSize = sizeof (*pddsdOffscreen);
- ErrorF ("winAllocateFBPrimaryDD - Locking primary\n");
+ winDebug ("winAllocateFBPrimaryDD - Locking primary\n");
/* Lock the primary surface */
ddrval = IDirectDrawSurface2_Lock (pScreenPriv->pddsPrimary,
@@ -210,7 +210,7 @@ winAllocateFBPrimaryDD (ScreenPtr pScreen)
FatalError ("winAllocateFBPrimaryDD - Could not lock "
"primary surface\n");
- ErrorF ("winAllocateFBPrimaryDD - Locked primary\n");
+ winDebug ("winAllocateFBPrimaryDD - Locked primary\n");
/* We don't know how to deal with anything other than RGB */
if (!(pddsdPrimary->ddpfPixelFormat.dwFlags & DDPF_RGB))
@@ -228,7 +228,7 @@ winAllocateFBPrimaryDD (ScreenPtr pScreen)
pScreenPriv->dwGreenMask = pddsdPrimary->ddpfPixelFormat.u3.dwGBitMask;
pScreenPriv->dwBlueMask = pddsdPrimary->ddpfPixelFormat.u4.dwBBitMask;
- ErrorF ("winAllocateFBPrimaryDD - Returning\n");
+ winDebug ("winAllocateFBPrimaryDD - Returning\n");
return TRUE;
}
@@ -357,7 +357,7 @@ winInitVisualsPrimaryDD (ScreenPtr pScreen)
else
pScreenPriv->dwBitsPerRGB = dwBlueBits;
- ErrorF ("winInitVisualsPrimaryDD - Masks: %08x %08x %08x bpRGB: %d\n",
+ winDebug ("winInitVisualsPrimaryDD - Masks: %08x %08x %08x bpRGB: %d\n",
(unsigned int) pScreenPriv->dwRedMask,
(unsigned int) pScreenPriv->dwGreenMask,
(unsigned int) pScreenPriv->dwBlueMask,
@@ -384,9 +384,7 @@ winInitVisualsPrimaryDD (ScreenPtr pScreen)
break;
case 8:
-#if CYGDEBUG
winDebug ("winInitVisuals - Calling miSetVisualTypesAndMasks\n");
-#endif /* CYGDEBUG */
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
PseudoColorMask,
pScreenPriv->dwBitsPerRGB,
@@ -399,10 +397,8 @@ winInitVisualsPrimaryDD (ScreenPtr pScreen)
"miSetVisualTypesAndMasks failed\n");
return FALSE;
}
-#if CYGDEBUG
winDebug ("winInitVisualsPrimaryDD - Returned from "
"miSetVisualTypesAndMasks\n");
-#endif /* CYGDEBUG */
break;
default:
@@ -410,7 +406,7 @@ winInitVisualsPrimaryDD (ScreenPtr pScreen)
return FALSE;
}
- ErrorF ("winInitVisualsPrimaryDD - Returning\n");
+ winDebug ("winInitVisualsPrimaryDD - Returning\n");
return TRUE;
}
@@ -553,7 +549,7 @@ winHotKeyAltTabPrimaryDD (ScreenPtr pScreen)
RECT rcClient, rcSrc;
HRESULT ddrval = DD_OK;
- ErrorF ("\nwinHotKeyAltTabPrimaryDD\n\n");
+ winDebug ("\nwinHotKeyAltTabPrimaryDD\n\n");
/* Alt+Tab was pressed, we will lose focus very soon */
pScreenPriv->fActive = FALSE;
diff --git a/xorg-server/hw/xwin/winpixmap.c b/xorg-server/hw/xwin/winpixmap.c
index 62717f31b..d174d70d3 100644
--- a/xorg-server/hw/xwin/winpixmap.c
+++ b/xorg-server/hw/xwin/winpixmap.c
@@ -1,231 +1,183 @@
-/*
- *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
- *
- *Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- *"Software"), to deal in the Software without restriction, including
- *without limitation the rights to use, copy, modify, merge, publish,
- *distribute, sublicense, and/or sell copies of the Software, and to
- *permit persons to whom the Software is furnished to do so, subject to
- *the following conditions:
- *
- *The above copyright notice and this permission notice shall be
- *included in all copies or substantial portions of the Software.
- *
- *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
- *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *Except as contained in this notice, the name of the XFree86 Project
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from the XFree86 Project.
- *
- * Authors: drewry, september 1986
- * Harold L Hunt II
- */
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include "win.h"
-
-
-/*
- * Local prototypes
- */
-
-#if 0
-static void
-winXRotatePixmapNativeGDI (PixmapPtr pPix, int rw);
-
-static void
-winYRotatePixmapNativeGDI (PixmapPtr pPix, int rh);
-
-static void
-winCopyRotatePixmapNativeGDI (PixmapPtr psrcPix, PixmapPtr *ppdstPix,
- int xrot, int yrot);
-#endif
-
-
-/* See Porting Layer Definition - p. 34 */
-/* See mfb/mfbpixmap.c - mfbCreatePixmap() */
-PixmapPtr
-winCreatePixmapNativeGDI (ScreenPtr pScreen,
- int iWidth, int iHeight,
- int iDepth, unsigned class)
-{
- winPrivPixmapPtr pPixmapPriv = NULL;
- PixmapPtr pPixmap = NULL;
-
- /* Allocate pixmap memory */
- pPixmap = AllocatePixmap (pScreen, 0);
- if (!pPixmap)
- {
- ErrorF ("winCreatePixmapNativeGDI () - Couldn't allocate a pixmap\n");
- return NullPixmap;
- }
-
-#if CYGDEBUG
- winDebug ("winCreatePixmap () - w %d h %d d %d uh %d bw %d\n",
- iWidth, iHeight, iDepth, class,
- PixmapBytePad (iWidth, iDepth));
-#endif
-
- /* Setup pixmap values */
- pPixmap->drawable.type = DRAWABLE_PIXMAP;
- pPixmap->drawable.class = class;
- pPixmap->drawable.pScreen = pScreen;
- pPixmap->drawable.depth = iDepth;
- pPixmap->drawable.bitsPerPixel = BitsPerPixel (iDepth);
- pPixmap->drawable.id = 0;
- pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
- pPixmap->drawable.x = 0;
- pPixmap->drawable.y = 0;
- pPixmap->drawable.width = iWidth;
- pPixmap->drawable.height = iHeight;
- pPixmap->devKind = 0;
- pPixmap->refcnt = 1;
- pPixmap->devPrivate.ptr = NULL;
-
- /* Pixmap privates are allocated by AllocatePixmap */
- pPixmapPriv = winGetPixmapPriv (pPixmap);
-
- /* Initialize pixmap privates */
- pPixmapPriv->hBitmap = NULL;
- pPixmapPriv->hdcSelected = NULL;
- pPixmapPriv->pbBits = NULL;
- pPixmapPriv->dwScanlineBytes = PixmapBytePad (iWidth, iDepth);
-
- /* Check for zero width or height pixmaps */
- if (iWidth == 0 || iHeight == 0)
- {
- /* Don't allocate a real pixmap, just set fields and return */
- return pPixmap;
- }
-
- /* Create a DIB for the pixmap */
- pPixmapPriv->hBitmap = winCreateDIBNativeGDI (iWidth, iHeight, iDepth,
- &pPixmapPriv->pbBits,
- (BITMAPINFO **) &pPixmapPriv->pbmih);
-
-#if CYGDEBUG
- winDebug ("winCreatePixmap () - Created a pixmap %08x, %dx%dx%d, for " \
- "screen: %08x\n",
- pPixmapPriv->hBitmap, iWidth, iHeight, iDepth, pScreen);
-#endif
-
- return pPixmap;
-}
-
-
-/*
- * See Porting Layer Definition - p. 35
- *
- * See mfb/mfbpixmap.c - mfbDestroyPixmap()
- */
-
-Bool
-winDestroyPixmapNativeGDI (PixmapPtr pPixmap)
-{
- winPrivPixmapPtr pPixmapPriv = NULL;
-
-#if CYGDEBUG
- winDebug ("winDestroyPixmapNativeGDI ()\n");
-#endif
-
- /* Bail early if there is not a pixmap to destroy */
- if (pPixmap == NULL)
- {
- ErrorF ("winDestroyPixmapNativeGDI () - No pixmap to destroy\n");
- return TRUE;
- }
-
- /* Get a handle to the pixmap privates */
- pPixmapPriv = winGetPixmapPriv (pPixmap);
-
-#if CYGDEBUG
- winDebug ("winDestroyPixmapNativeGDI - pPixmapPriv->hBitmap: %08x\n",
- pPixmapPriv->hBitmap);
-#endif
-
- /* Decrement reference count, return if nonzero */
- --pPixmap->refcnt;
- if (pPixmap->refcnt != 0)
- return TRUE;
-
- /* Free GDI bitmap */
- if (pPixmapPriv->hBitmap) DeleteObject (pPixmapPriv->hBitmap);
-
- /* Free the bitmap info header memory */
- free(pPixmapPriv->pbmih);
- pPixmapPriv->pbmih = NULL;
-
- /* Free the pixmap memory */
- free (pPixmap);
- pPixmap = NULL;
-
- return TRUE;
-}
-
-
-/*
- * Not used yet
- */
-
-Bool
-winModifyPixmapHeaderNativeGDI (PixmapPtr pPixmap,
- int iWidth, int iHeight,
- int iDepth,
- int iBitsPerPixel,
- int devKind,
- pointer pPixData)
-{
- FatalError ("winModifyPixmapHeaderNativeGDI ()\n");
- return TRUE;
-}
-
-
-#if 0
-/*
- * Not used yet.
- * See cfb/cfbpixmap.c
- */
-
-static void
-winXRotatePixmapNativeGDI (PixmapPtr pPix, int rw)
-{
- ErrorF ("winXRotatePixmap()\n");
- /* fill in this function, look at CFB */
-}
-
-
-/*
- * Not used yet.
- * See cfb/cfbpixmap.c
- */
-static void
-winYRotatePixmapNativeGDI (PixmapPtr pPix, int rh)
-{
- ErrorF ("winYRotatePixmap()\n");
- /* fill in this function, look at CFB */
-}
-
-
-/*
- * Not used yet.
- * See cfb/cfbpixmap.c
- */
-
-static void
-winCopyRotatePixmapNativeGDI (PixmapPtr psrcPix, PixmapPtr *ppdstPix,
- int xrot, int yrot)
-{
- ErrorF ("winCopyRotatePixmap()\n");
- /* fill in this function, look at CFB */
-}
-#endif
+/*
+ *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
+ *
+ *Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ *"Software"), to deal in the Software without restriction, including
+ *without limitation the rights to use, copy, modify, merge, publish,
+ *distribute, sublicense, and/or sell copies of the Software, and to
+ *permit persons to whom the Software is furnished to do so, subject to
+ *the following conditions:
+ *
+ *The above copyright notice and this permission notice shall be
+ *included in all copies or substantial portions of the Software.
+ *
+ *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
+ *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *Except as contained in this notice, the name of the XFree86 Project
+ *shall not be used in advertising or otherwise to promote the sale, use
+ *or other dealings in this Software without prior written authorization
+ *from the XFree86 Project.
+ *
+ * Authors: drewry, september 1986
+ * Harold L Hunt II
+ */
+
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+#include "win.h"
+
+
+/*
+ * Local prototypes
+ */
+
+#if 0
+static void
+winXRotatePixmapNativeGDI (PixmapPtr pPix, int rw);
+
+static void
+winYRotatePixmapNativeGDI (PixmapPtr pPix, int rh);
+
+static void
+winCopyRotatePixmapNativeGDI (PixmapPtr psrcPix, PixmapPtr *ppdstPix,
+ int xrot, int yrot);
+#endif
+
+
+/* See Porting Layer Definition - p. 34 */
+/* See mfb/mfbpixmap.c - mfbCreatePixmap() */
+PixmapPtr
+winCreatePixmapNativeGDI (ScreenPtr pScreen,
+ int iWidth, int iHeight,
+ int iDepth, unsigned class)
+{
+ winPrivPixmapPtr pPixmapPriv = NULL;
+ PixmapPtr pPixmap = NULL;
+
+ /* Allocate pixmap memory */
+ pPixmap = AllocatePixmap (pScreen, 0);
+ if (!pPixmap)
+ {
+ ErrorF ("winCreatePixmapNativeGDI () - Couldn't allocate a pixmap\n");
+ return NullPixmap;
+ }
+
+ winDebug ("winCreatePixmap () - w %d h %d d %d uh %d bw %d\n",
+ iWidth, iHeight, iDepth, class,
+ PixmapBytePad (iWidth, iDepth));
+
+ /* Setup pixmap values */
+ pPixmap->drawable.type = DRAWABLE_PIXMAP;
+ pPixmap->drawable.class = class;
+ pPixmap->drawable.pScreen = pScreen;
+ pPixmap->drawable.depth = iDepth;
+ pPixmap->drawable.bitsPerPixel = BitsPerPixel (iDepth);
+ pPixmap->drawable.id = 0;
+ pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+ pPixmap->drawable.x = 0;
+ pPixmap->drawable.y = 0;
+ pPixmap->drawable.width = iWidth;
+ pPixmap->drawable.height = iHeight;
+ pPixmap->devKind = 0;
+ pPixmap->refcnt = 1;
+ pPixmap->devPrivate.ptr = NULL;
+
+ /* Pixmap privates are allocated by AllocatePixmap */
+ pPixmapPriv = winGetPixmapPriv (pPixmap);
+
+ /* Initialize pixmap privates */
+ pPixmapPriv->hBitmap = NULL;
+ pPixmapPriv->hdcSelected = NULL;
+ pPixmapPriv->pbBits = NULL;
+ pPixmapPriv->dwScanlineBytes = PixmapBytePad (iWidth, iDepth);
+
+ /* Check for zero width or height pixmaps */
+ if (iWidth == 0 || iHeight == 0)
+ {
+ /* Don't allocate a real pixmap, just set fields and return */
+ return pPixmap;
+ }
+
+ /* Create a DIB for the pixmap */
+ pPixmapPriv->hBitmap = winCreateDIBNativeGDI (iWidth, iHeight, iDepth,
+ &pPixmapPriv->pbBits,
+ (BITMAPINFO **) &pPixmapPriv->pbmih);
+
+ winDebug ("winCreatePixmap () - Created a pixmap %08x, %dx%dx%d, for " \
+ "screen: %08x\n",
+ pPixmapPriv->hBitmap, iWidth, iHeight, iDepth, pScreen);
+
+ return pPixmap;
+}
+
+
+/*
+ * See Porting Layer Definition - p. 35
+ *
+ * See mfb/mfbpixmap.c - mfbDestroyPixmap()
+ */
+
+Bool
+winDestroyPixmapNativeGDI (PixmapPtr pPixmap)
+{
+ winPrivPixmapPtr pPixmapPriv = NULL;
+
+ winDebug ("winDestroyPixmapNativeGDI ()\n");
+
+ /* Bail early if there is not a pixmap to destroy */
+ if (pPixmap == NULL)
+ {
+ ErrorF ("winDestroyPixmapNativeGDI () - No pixmap to destroy\n");
+ return TRUE;
+ }
+
+ /* Get a handle to the pixmap privates */
+ pPixmapPriv = winGetPixmapPriv (pPixmap);
+
+ winDebug ("winDestroyPixmapNativeGDI - pPixmapPriv->hBitmap: %08x\n",
+ pPixmapPriv->hBitmap);
+
+ /* Decrement reference count, return if nonzero */
+ --pPixmap->refcnt;
+ if (pPixmap->refcnt != 0)
+ return TRUE;
+
+ /* Free GDI bitmap */
+ if (pPixmapPriv->hBitmap) DeleteObject (pPixmapPriv->hBitmap);
+
+ /* Free the bitmap info header memory */
+ free(pPixmapPriv->pbmih);
+ pPixmapPriv->pbmih = NULL;
+
+ /* Free the pixmap memory */
+ free (pPixmap);
+ pPixmap = NULL;
+
+ return TRUE;
+}
+
+
+/*
+ * Not used yet
+ */
+
+Bool
+winModifyPixmapHeaderNativeGDI (PixmapPtr pPixmap,
+ int iWidth, int iHeight,
+ int iDepth,
+ int iBitsPerPixel,
+ int devKind,
+ pointer pPixData)
+{
+ FatalError ("winModifyPixmapHeaderNativeGDI ()\n");
+ return TRUE;
+}
+
diff --git a/xorg-server/hw/xwin/winpolyline.c b/xorg-server/hw/xwin/winpolyline.c
index db9dd345b..bf98d73ec 100644
--- a/xorg-server/hw/xwin/winpolyline.c
+++ b/xorg-server/hw/xwin/winpolyline.c
@@ -45,7 +45,7 @@ winPolyLineNativeGDI (DrawablePtr pDrawable,
{
case LineSolid:
if (pGC->lineWidth == 0)
- return miZeroLine (pDrawable, pGC, mode, npt, ppt);
+ miZeroLine (pDrawable, pGC, mode, npt, ppt);
else
miWideLine (pDrawable, pGC, mode, npt, ppt);
break;
diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c
index 073c9ec62..e92e95f2b 100644
--- a/xorg-server/hw/xwin/winprefs.c
+++ b/xorg-server/hw/xwin/winprefs.c
@@ -51,6 +51,8 @@
extern const char *winGetBaseDir(void);
+extern const char *g_pszLogFile;
+
/* From winmultiwindowflex.l, the real parser */
extern void parse_file (FILE *fp);
@@ -376,8 +378,8 @@ HandleCustomWM_COMMAND (unsigned long hwndIn,
memset (&start, 0, sizeof (start));
start.cb = sizeof (start);
- start.dwFlags = STARTF_USESHOWWINDOW;
- start.wShowWindow = SW_HIDE;
+ //start.dwFlags = STARTF_USESHOWWINDOW;
+ //start.wShowWindow = SW_HIDE;
memset (&child, 0, sizeof (child));
@@ -388,7 +390,7 @@ HandleCustomWM_COMMAND (unsigned long hwndIn,
CloseHandle (child.hProcess);
}
else
- MessageBox(NULL, m->menuItem[j].param, "Mingrc Exec Command Error!", MB_OK | MB_ICONEXCLAMATION);
+ MessageBox(NULL, m->menuItem[j].param, "VcXsrv Exec Command Error!", MB_OK | MB_ICONEXCLAMATION);
}
return TRUE;
#endif
@@ -740,7 +742,9 @@ LoadPreferences (void)
prefFile = fopen (fname, "r");
if (prefFile)
- ErrorF ("winPrefsLoadPreferences: %s\n", fname);
+ {
+ winDebug ("winPrefsLoadPreferences: %s\n", fname);
+ }
}
/* No home file found, check system default */
@@ -755,7 +759,9 @@ LoadPreferences (void)
buffer[sizeof(buffer)-1] = 0;
prefFile = fopen (buffer, "r");
if (prefFile)
- ErrorF ("winPrefsLoadPreferences: %s\n", buffer);
+ {
+ winDebug ("winPrefsLoadPreferences: %s\n", buffer);
+ }
}
/* If we could open it, then read the settings and close it */
@@ -766,17 +772,13 @@ LoadPreferences (void)
}
/* Setup a DISPLAY environment variable, need to allocate on heap */
- /* because putenv doesn't copy the argument... */
- snprintf (szDisplay, 512, "DISPLAY=127.0.0.1:%s.0", display);
- szEnvDisplay = (char *)(malloc (strlen(szDisplay)+1));
- if (szEnvDisplay)
- {
- strcpy (szEnvDisplay, szDisplay);
- putenv (szEnvDisplay);
- }
+ /* because putenv doesn't copy the argument... Always use screen 0 */
+ winGetDisplayName(szDisplay, 0);
+ szEnvDisplay = (char *)(malloc(strlen(szDisplay)+9/*strlen("DISPLAY=")+1*/));
+ snprintf(szEnvDisplay, 512, "DISPLAY=%s", szDisplay);
+ putenv (szEnvDisplay);
/* Replace any "%display%" in menu commands with display string */
- snprintf (szDisplay, 512, "127.0.0.1:%s.0", display);
for (i=0; i<pref.menuItems; i++)
{
for (j=0; j<pref.menu[i].menuItems; j++)
@@ -792,6 +794,12 @@ LoadPreferences (void)
dstParam += strlen(szDisplay);
srcParam += 9;
}
+ else if (!strncmp(srcParam, "%logfile%", 9))
+ {
+ memcpy (dstParam, g_pszLogFile, strlen(g_pszLogFile));
+ dstParam += strlen(g_pszLogFile);
+ srcParam += 9;
+ }
else
{
*dstParam = *srcParam;
@@ -813,40 +821,20 @@ LoadPreferences (void)
* STYLES{} section in the prefs file, and return the style type
*/
unsigned long
-winOverrideStyle (unsigned long longpWin)
+winOverrideStyle (char *res_name, char *res_class, char *wmName)
{
- WindowPtr pWin = (WindowPtr) longpWin;
- char *res_name, *res_class;
int i;
- char *wmName;
-
- if (pWin==NULL)
- return STYLE_NONE;
-
- /* If we can't find the class, we can't override from default! */
- if (!winMultiWindowGetClassHint (pWin, &res_name, &res_class))
- return STYLE_NONE;
-
- winMultiWindowGetWMName (pWin, &wmName);
for (i=0; i<pref.styleItems; i++) {
- if (!strcmp(pref.style[i].match, res_name) ||
- !strcmp(pref.style[i].match, res_class) ||
+ if ((res_name && !strcmp(pref.style[i].match, res_name)) ||
+ (res_class && !strcmp(pref.style[i].match, res_class)) ||
(wmName && strstr(wmName, pref.style[i].match)))
{
- free (res_name);
- free (res_class);
- free(wmName);
-
if (pref.style[i].type)
return pref.style[i].type;
}
}
/* Didn't find the style, fail gracefully */
- free (res_name);
- free (res_class);
- free(wmName);
-
return STYLE_NONE;
}
diff --git a/xorg-server/hw/xwin/winprefs.h b/xorg-server/hw/xwin/winprefs.h
index 276b9724d..00f01348d 100644
--- a/xorg-server/hw/xwin/winprefs.h
+++ b/xorg-server/hw/xwin/winprefs.h
@@ -180,7 +180,7 @@ HICON
winOverrideIcon (unsigned long longpWin);
unsigned long
-winOverrideStyle (unsigned long longpWin);
+winOverrideStyle (char *res_name, char *res_class, char *wmName);
HICON
winTaskbarIcon(void);
diff --git a/xorg-server/hw/xwin/winprefslex.l b/xorg-server/hw/xwin/winprefslex.l
index 463dff4ca..5a443407f 100644
--- a/xorg-server/hw/xwin/winprefslex.l
+++ b/xorg-server/hw/xwin/winprefslex.l
@@ -41,8 +41,6 @@ extern YYSTYPE yylval;
extern char *yytext;
extern int yyparse(void);
-extern void ErrorF (const char* /*f*/, ...);
-
int yylineno;
/* Copy the parsed string, must be free()d in yacc parser */
diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y
index 0acf160e4..b9e961622 100644
--- a/xorg-server/hw/xwin/winprefsyacc.y
+++ b/xorg-server/hw/xwin/winprefsyacc.y
@@ -1,457 +1,460 @@
-%{
-/*
- * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
- * Copyright (C) Colin Harrison 2005-2008
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project
- * shall not be used in advertising or otherwise to promote the sale, use
- * or other dealings in this Software without prior written authorization
- * from the XFree86 Project.
- *
- * Authors: Earle F. Philhower, III
- * Colin Harrison
- */
-/* $XFree86: $ */
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "winprefs.h"
-
-/* The following give better error messages in bison at the cost of a few KB */
-#define YYERROR_VERBOSE 1
-
-/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */
-#define YYLTYPE_IS_TRIVIAL 1
-#define YYENABLE_NLS 0
-
-/* The global pref settings */
-WINPREFS pref;
-
-/* The working menu */
-static MENUPARSED menu;
-
-/* Functions for parsing the tokens into out structure */
-/* Defined at the end section of this file */
-
-static void SetIconDirectory (char *path);
-static void SetDefaultIcon (char *fname);
-static void SetRootMenu (char *menu);
-static void SetDefaultSysMenu (char *menu, int pos);
-static void SetTrayIcon (char *fname);
-
-static void OpenMenu(char *menuname);
-static void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param);
-static void CloseMenu(void);
-
-static void OpenIcons(void);
-static void AddIconLine(char *matchstr, char *iconfile);
-static void CloseIcons(void);
-
-static void OpenStyles(void);
-static void AddStyleLine(char *matchstr, unsigned long style);
-static void CloseStyles(void);
-
-static void OpenSysMenu(void);
-static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
-static void CloseSysMenu(void);
-
-static int yyerror (char *s);
-
-extern void ErrorF (const char* /*f*/, ...);
-extern char *yytext;
-extern int yylex(void);
-
-%}
-
-%union {
- char *sVal;
- unsigned long uVal;
- int iVal;
-}
-
-%token NEWLINE
-%token MENU
-%token LB
-%token RB
-%token ICONDIRECTORY
-%token DEFAULTICON
-%token ICONS
-%token STYLES
-%token TOPMOST
-%token MAXIMIZE
-%token MINIMIZE
-%token BOTTOM
-%token NOTITLE
-%token OUTLINE
-%token NOFRAME
-%token DEFAULTSYSMENU
-%token SYSMENU
-%token ROOTMENU
-%token SEPARATOR
-%token ATSTART
-%token ATEND
-%token EXEC
-%token ALWAYSONTOP
-%token DEBUGOUTPUT "DEBUG"
-%token RELOAD
-%token TRAYICON
-%token FORCEEXIT
-%token SILENTEXIT
-
-%token <sVal> STRING
-%type <uVal> group1
-%type <uVal> group2
-%type <uVal> stylecombo
-%type <iVal> atspot
-
-%%
-
-input: /* empty */
- | input line
- ;
-
-line: NEWLINE
- | command
- ;
-
-
-newline_or_nada:
- | NEWLINE newline_or_nada
- ;
-
-command: defaulticon
- | icondirectory
- | menu
- | icons
- | styles
- | sysmenu
- | rootmenu
- | defaultsysmenu
- | debug
- | trayicon
- | forceexit
- | silentexit
- ;
-
-trayicon: TRAYICON STRING NEWLINE { SetTrayIcon($2); free($2); }
- ;
-
-rootmenu: ROOTMENU STRING NEWLINE { SetRootMenu($2); free($2); }
- ;
-
-defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE { SetDefaultSysMenu($2, $3); free($2); }
- ;
-
-defaulticon: DEFAULTICON STRING NEWLINE { SetDefaultIcon($2); free($2); }
- ;
-
-icondirectory: ICONDIRECTORY STRING NEWLINE { SetIconDirectory($2); free($2); }
- ;
-
-menuline: SEPARATOR NEWLINE newline_or_nada { AddMenuLine("-", CMD_SEPARATOR, ""); }
- | STRING ALWAYSONTOP NEWLINE newline_or_nada { AddMenuLine($1, CMD_ALWAYSONTOP, ""); free($1); }
- | STRING EXEC STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_EXEC, $3); free($1); free($3); }
- | STRING MENU STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_MENU, $3); free($1); free($3); }
- | STRING RELOAD NEWLINE newline_or_nada { AddMenuLine($1, CMD_RELOAD, ""); free($1); }
- ;
-
-menulist: menuline
- | menuline menulist
- ;
-
-menu: MENU STRING LB { OpenMenu($2); free($2); } newline_or_nada menulist RB {CloseMenu();}
- ;
-
-iconline: STRING STRING NEWLINE newline_or_nada { AddIconLine($1, $2); free($1); free($2); }
- ;
-
-iconlist: iconline
- | iconline iconlist
- ;
-
-icons: ICONS LB {OpenIcons();} newline_or_nada iconlist RB {CloseIcons();}
- ;
-
-group1: TOPMOST { $$=STYLE_TOPMOST; }
- | MAXIMIZE { $$=STYLE_MAXIMIZE; }
- | MINIMIZE { $$=STYLE_MINIMIZE; }
- | BOTTOM { $$=STYLE_BOTTOM; }
- ;
-
-group2: NOTITLE { $$=STYLE_NOTITLE; }
- | OUTLINE { $$=STYLE_OUTLINE; }
- | NOFRAME { $$=STYLE_NOFRAME; }
- ;
-
-stylecombo: group1 { $$=$1; }
- | group2 { $$=$1; }
- | group1 group2 { $$=$1|$2; }
- | group2 group1 { $$=$1|$2; }
- ;
-
-styleline: STRING stylecombo NEWLINE newline_or_nada { AddStyleLine($1, $2); free($1); }
- ;
-
-stylelist: styleline
- | styleline stylelist
- ;
-
-styles: STYLES LB {OpenStyles();} newline_or_nada stylelist RB {CloseStyles();}
- ;
-
-atspot: { $$=AT_END; }
- | ATSTART { $$=AT_START; }
- | ATEND { $$=AT_END; }
- ;
-
-sysmenuline: STRING STRING atspot NEWLINE newline_or_nada { AddSysMenuLine($1, $2, $3); free($1); free($2); }
- ;
-
-sysmenulist: sysmenuline
- | sysmenuline sysmenulist
- ;
-
-sysmenu: SYSMENU LB NEWLINE {OpenSysMenu();} newline_or_nada sysmenulist RB {CloseSysMenu();}
- ;
-
-forceexit: FORCEEXIT NEWLINE { pref.fForceExit = TRUE; }
- ;
-
-silentexit: SILENTEXIT NEWLINE { pref.fSilentExit = TRUE; }
- ;
-
-debug: DEBUGOUTPUT STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($2); }
- ;
-
-
-%%
-/*
- * Errors in parsing abort and print log messages
- */
-static int
-yyerror (char *s)
-{
- extern int yylineno; /* Handled by flex internally */
-
- ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
- return 1;
-}
-
-/* Miscellaneous functions to store TOKENs into the structure */
-static void
-SetIconDirectory (char *path)
-{
- strncpy (pref.iconDirectory, path, PATH_MAX);
- pref.iconDirectory[PATH_MAX] = 0;
-}
-
-static void
-SetDefaultIcon (char *fname)
-{
- strncpy (pref.defaultIconName, fname, NAME_MAX);
- pref.defaultIconName[NAME_MAX] = 0;
-}
-
-static void
-SetTrayIcon (char *fname)
-{
- strncpy (pref.trayIconName, fname, NAME_MAX);
- pref.trayIconName[NAME_MAX] = 0;
-}
-
-static void
-SetRootMenu (char *menu)
-{
- strncpy (pref.rootMenuName, menu, MENU_MAX);
- pref.rootMenuName[MENU_MAX] = 0;
-}
-
-static void
-SetDefaultSysMenu (char *menu, int pos)
-{
- strncpy (pref.defaultSysMenuName, menu, MENU_MAX);
- pref.defaultSysMenuName[MENU_MAX] = 0;
- pref.defaultSysMenuPos = pos;
-}
-
-static void
-OpenMenu (char *menuname)
-{
- if (menu.menuItem) free(menu.menuItem);
- menu.menuItem = NULL;
- strncpy(menu.menuName, menuname, MENU_MAX);
- menu.menuName[MENU_MAX] = 0;
- menu.menuItems = 0;
-}
-
-static void
-AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param)
-{
- if (menu.menuItem==NULL)
- menu.menuItem = (MENUITEM*)malloc(sizeof(MENUITEM));
- else
- menu.menuItem = (MENUITEM*)
- realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
-
- strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
- menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
-
- menu.menuItem[menu.menuItems].cmd = cmd;
-
- strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX);
- menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0;
-
- menu.menuItem[menu.menuItems].commandID = 0;
-
- menu.menuItems++;
-}
-
-static void
-CloseMenu (void)
-{
- if (menu.menuItem==NULL || menu.menuItems==0)
- {
- ErrorF("LoadPreferences: Empty menu detected\n");
- return;
- }
-
- if (pref.menuItems)
- pref.menu = (MENUPARSED*)
- realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
- else
- pref.menu = (MENUPARSED*)malloc (sizeof(MENUPARSED));
-
- memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
- pref.menuItems++;
-
- memset (&menu, 0, sizeof(MENUPARSED));
-}
-
-static void
-OpenIcons (void)
-{
- if (pref.icon != NULL) {
- ErrorF("LoadPreferences: Redefining icon mappings\n");
- free(pref.icon);
- pref.icon = NULL;
- }
- pref.iconItems = 0;
-}
-
-static void
-AddIconLine (char *matchstr, char *iconfile)
-{
- if (pref.icon==NULL)
- pref.icon = (ICONITEM*)malloc(sizeof(ICONITEM));
- else
- pref.icon = (ICONITEM*)
- realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
-
- strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
- pref.icon[pref.iconItems].match[MENU_MAX] = 0;
-
- strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1);
- pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0;
-
- pref.icon[pref.iconItems].hicon = 0;
-
- pref.iconItems++;
-}
-
-static void
-CloseIcons (void)
-{
-}
-
-static void
-OpenStyles (void)
-{
- if (pref.style != NULL) {
- ErrorF("LoadPreferences: Redefining window style\n");
- free(pref.style);
- pref.style = NULL;
- }
- pref.styleItems = 0;
-}
-
-static void
-AddStyleLine (char *matchstr, unsigned long style)
-{
- if (pref.style==NULL)
- pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM));
- else
- pref.style = (STYLEITEM*)
- realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
-
- strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
- pref.style[pref.styleItems].match[MENU_MAX] = 0;
-
- pref.style[pref.styleItems].type = style;
-
- pref.styleItems++;
-}
-
-static void
-CloseStyles (void)
-{
-}
-
-static void
-OpenSysMenu (void)
-{
- if (pref.sysMenu != NULL) {
- ErrorF("LoadPreferences: Redefining system menu\n");
- free(pref.sysMenu);
- pref.sysMenu = NULL;
- }
- pref.sysMenuItems = 0;
-}
-
-static void
-AddSysMenuLine (char *matchstr, char *menuname, int pos)
-{
- if (pref.sysMenu==NULL)
- pref.sysMenu = (SYSMENUITEM*)malloc(sizeof(SYSMENUITEM));
- else
- pref.sysMenu = (SYSMENUITEM*)
- realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
-
- strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
- pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;
-
- strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX);
- pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0;
-
- pref.sysMenu[pref.sysMenuItems].menuPos = pos;
-
- pref.sysMenuItems++;
-}
-
-static void
-CloseSysMenu (void)
-{
-}
-
+%{
+/*
+ * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
+ * Copyright (C) Colin Harrison 2005-2008
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * from the XFree86 Project.
+ *
+ * Authors: Earle F. Philhower, III
+ * Colin Harrison
+ */
+/* $XFree86: $ */
+
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "winprefs.h"
+#include "winmsg.h"
+
+/* The following give better error messages in bison at the cost of a few KB */
+#define YYERROR_VERBOSE 1
+
+/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */
+#define YYLTYPE_IS_TRIVIAL 1
+#define YYENABLE_NLS 0
+
+/* The global pref settings */
+WINPREFS pref;
+
+/* The working menu */
+static MENUPARSED menu;
+
+/* Functions for parsing the tokens into out structure */
+/* Defined at the end section of this file */
+
+static void SetIconDirectory (char *path);
+static void SetDefaultIcon (char *fname);
+static void SetRootMenu (char *menu);
+static void SetDefaultSysMenu (char *menu, int pos);
+static void SetTrayIcon (char *fname);
+
+static void OpenMenu(char *menuname);
+static void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param);
+static void CloseMenu(void);
+
+static void OpenIcons(void);
+static void AddIconLine(char *matchstr, char *iconfile);
+static void CloseIcons(void);
+
+static void OpenStyles(void);
+static void AddStyleLine(char *matchstr, unsigned long style);
+static void CloseStyles(void);
+
+static void OpenSysMenu(void);
+static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
+static void CloseSysMenu(void);
+
+static int yyerror (char *s);
+
+extern char *yytext;
+extern int yylex(void);
+
+#define YYMALLOC malloc
+#define YYFREE free
+
+%}
+
+%union {
+ char *sVal;
+ unsigned long uVal;
+ int iVal;
+}
+
+%token NEWLINE
+%token MENU
+%token LB
+%token RB
+%token ICONDIRECTORY
+%token DEFAULTICON
+%token ICONS
+%token STYLES
+%token TOPMOST
+%token MAXIMIZE
+%token MINIMIZE
+%token BOTTOM
+%token NOTITLE
+%token OUTLINE
+%token NOFRAME
+%token DEFAULTSYSMENU
+%token SYSMENU
+%token ROOTMENU
+%token SEPARATOR
+%token ATSTART
+%token ATEND
+%token EXEC
+%token ALWAYSONTOP
+%token DEBUGOUTPUT "DEBUG"
+%token RELOAD
+%token TRAYICON
+%token FORCEEXIT
+%token SILENTEXIT
+
+%token <sVal> STRING
+%type <uVal> group1
+%type <uVal> group2
+%type <uVal> stylecombo
+%type <iVal> atspot
+
+%%
+
+input: /* empty */
+ | input line
+ ;
+
+line: NEWLINE
+ | command
+ ;
+
+
+newline_or_nada:
+ | NEWLINE newline_or_nada
+ ;
+
+command: defaulticon
+ | icondirectory
+ | menu
+ | icons
+ | styles
+ | sysmenu
+ | rootmenu
+ | defaultsysmenu
+ | debug
+ | trayicon
+ | forceexit
+ | silentexit
+ ;
+
+trayicon: TRAYICON STRING NEWLINE { SetTrayIcon($2); free($2); }
+ ;
+
+rootmenu: ROOTMENU STRING NEWLINE { SetRootMenu($2); free($2); }
+ ;
+
+defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE { SetDefaultSysMenu($2, $3); free($2); }
+ ;
+
+defaulticon: DEFAULTICON STRING NEWLINE { SetDefaultIcon($2); free($2); }
+ ;
+
+icondirectory: ICONDIRECTORY STRING NEWLINE { SetIconDirectory($2); free($2); }
+ ;
+
+menuline: SEPARATOR NEWLINE newline_or_nada { AddMenuLine("-", CMD_SEPARATOR, ""); }
+ | STRING ALWAYSONTOP NEWLINE newline_or_nada { AddMenuLine($1, CMD_ALWAYSONTOP, ""); free($1); }
+ | STRING EXEC STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_EXEC, $3); free($1); free($3); }
+ | STRING MENU STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_MENU, $3); free($1); free($3); }
+ | STRING RELOAD NEWLINE newline_or_nada { AddMenuLine($1, CMD_RELOAD, ""); free($1); }
+ ;
+
+menulist: menuline
+ | menuline menulist
+ ;
+
+menu: MENU STRING LB { OpenMenu($2); free($2); } newline_or_nada menulist RB {CloseMenu();}
+ ;
+
+iconline: STRING STRING NEWLINE newline_or_nada { AddIconLine($1, $2); free($1); free($2); }
+ ;
+
+iconlist: iconline
+ | iconline iconlist
+ ;
+
+icons: ICONS LB {OpenIcons();} newline_or_nada iconlist RB {CloseIcons();}
+ ;
+
+group1: TOPMOST { $$=STYLE_TOPMOST; }
+ | MAXIMIZE { $$=STYLE_MAXIMIZE; }
+ | MINIMIZE { $$=STYLE_MINIMIZE; }
+ | BOTTOM { $$=STYLE_BOTTOM; }
+ ;
+
+group2: NOTITLE { $$=STYLE_NOTITLE; }
+ | OUTLINE { $$=STYLE_OUTLINE; }
+ | NOFRAME { $$=STYLE_NOFRAME; }
+ ;
+
+stylecombo: group1 { $$=$1; }
+ | group2 { $$=$1; }
+ | group1 group2 { $$=$1|$2; }
+ | group2 group1 { $$=$1|$2; }
+ ;
+
+styleline: STRING stylecombo NEWLINE newline_or_nada { AddStyleLine($1, $2); free($1); }
+ ;
+
+stylelist: styleline
+ | styleline stylelist
+ ;
+
+styles: STYLES LB {OpenStyles();} newline_or_nada stylelist RB {CloseStyles();}
+ ;
+
+atspot: { $$=AT_END; }
+ | ATSTART { $$=AT_START; }
+ | ATEND { $$=AT_END; }
+ ;
+
+sysmenuline: STRING STRING atspot NEWLINE newline_or_nada { AddSysMenuLine($1, $2, $3); free($1); free($2); }
+ ;
+
+sysmenulist: sysmenuline
+ | sysmenuline sysmenulist
+ ;
+
+sysmenu: SYSMENU LB NEWLINE {OpenSysMenu();} newline_or_nada sysmenulist RB {CloseSysMenu();}
+ ;
+
+forceexit: FORCEEXIT NEWLINE { pref.fForceExit = TRUE; }
+ ;
+
+silentexit: SILENTEXIT NEWLINE { pref.fSilentExit = TRUE; }
+ ;
+
+debug: DEBUGOUTPUT STRING NEWLINE { winDebug("LoadPreferences: %s\n", $2); free($2); }
+ ;
+
+
+%%
+/*
+ * Errors in parsing abort and print log messages
+ */
+static int
+yyerror (char *s)
+{
+ extern int yylineno; /* Handled by flex internally */
+
+ ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
+ return 1;
+}
+
+/* Miscellaneous functions to store TOKENs into the structure */
+static void
+SetIconDirectory (char *path)
+{
+ strncpy (pref.iconDirectory, path, PATH_MAX);
+ pref.iconDirectory[PATH_MAX] = 0;
+}
+
+static void
+SetDefaultIcon (char *fname)
+{
+ strncpy (pref.defaultIconName, fname, NAME_MAX);
+ pref.defaultIconName[NAME_MAX] = 0;
+}
+
+static void
+SetTrayIcon (char *fname)
+{
+ strncpy (pref.trayIconName, fname, NAME_MAX);
+ pref.trayIconName[NAME_MAX] = 0;
+}
+
+static void
+SetRootMenu (char *menu)
+{
+ strncpy (pref.rootMenuName, menu, MENU_MAX);
+ pref.rootMenuName[MENU_MAX] = 0;
+}
+
+static void
+SetDefaultSysMenu (char *menu, int pos)
+{
+ strncpy (pref.defaultSysMenuName, menu, MENU_MAX);
+ pref.defaultSysMenuName[MENU_MAX] = 0;
+ pref.defaultSysMenuPos = pos;
+}
+
+static void
+OpenMenu (char *menuname)
+{
+ if (menu.menuItem) free(menu.menuItem);
+ menu.menuItem = NULL;
+ strncpy(menu.menuName, menuname, MENU_MAX);
+ menu.menuName[MENU_MAX] = 0;
+ menu.menuItems = 0;
+}
+
+static void
+AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param)
+{
+ if (menu.menuItem==NULL)
+ menu.menuItem = (MENUITEM*)malloc(sizeof(MENUITEM));
+ else
+ menu.menuItem = (MENUITEM*)
+ realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
+
+ strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
+ menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
+
+ menu.menuItem[menu.menuItems].cmd = cmd;
+
+ strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX);
+ menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0;
+
+ menu.menuItem[menu.menuItems].commandID = 0;
+
+ menu.menuItems++;
+}
+
+static void
+CloseMenu (void)
+{
+ if (menu.menuItem==NULL || menu.menuItems==0)
+ {
+ ErrorF("LoadPreferences: Empty menu detected\n");
+ return;
+ }
+
+ if (pref.menuItems)
+ pref.menu = (MENUPARSED*)
+ realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
+ else
+ pref.menu = (MENUPARSED*)malloc (sizeof(MENUPARSED));
+
+ memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
+ pref.menuItems++;
+
+ memset (&menu, 0, sizeof(MENUPARSED));
+}
+
+static void
+OpenIcons (void)
+{
+ if (pref.icon != NULL) {
+ winDebug("LoadPreferences: Redefining icon mappings\n");
+ free(pref.icon);
+ pref.icon = NULL;
+ }
+ pref.iconItems = 0;
+}
+
+static void
+AddIconLine (char *matchstr, char *iconfile)
+{
+ if (pref.icon==NULL)
+ pref.icon = (ICONITEM*)malloc(sizeof(ICONITEM));
+ else
+ pref.icon = (ICONITEM*)
+ realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
+
+ strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
+ pref.icon[pref.iconItems].match[MENU_MAX] = 0;
+
+ strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1);
+ pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0;
+
+ pref.icon[pref.iconItems].hicon = 0;
+
+ pref.iconItems++;
+}
+
+static void
+CloseIcons (void)
+{
+}
+
+static void
+OpenStyles (void)
+{
+ if (pref.style != NULL) {
+ winDebug("LoadPreferences: Redefining window style\n");
+ free(pref.style);
+ pref.style = NULL;
+ }
+ pref.styleItems = 0;
+}
+
+static void
+AddStyleLine (char *matchstr, unsigned long style)
+{
+ if (pref.style==NULL)
+ pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM));
+ else
+ pref.style = (STYLEITEM*)
+ realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
+
+ strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
+ pref.style[pref.styleItems].match[MENU_MAX] = 0;
+
+ pref.style[pref.styleItems].type = style;
+
+ pref.styleItems++;
+}
+
+static void
+CloseStyles (void)
+{
+}
+
+static void
+OpenSysMenu (void)
+{
+ if (pref.sysMenu != NULL) {
+ winDebug("LoadPreferences: Redefining system menu\n");
+ free(pref.sysMenu);
+ pref.sysMenu = NULL;
+ }
+ pref.sysMenuItems = 0;
+}
+
+static void
+AddSysMenuLine (char *matchstr, char *menuname, int pos)
+{
+ if (pref.sysMenu==NULL)
+ pref.sysMenu = (SYSMENUITEM*)malloc(sizeof(SYSMENUITEM));
+ else
+ pref.sysMenu = (SYSMENUITEM*)
+ realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
+
+ strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
+ pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;
+
+ strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX);
+ pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0;
+
+ pref.sysMenu[pref.sysMenuItems].menuPos = pos;
+
+ pref.sysMenuItems++;
+}
+
+static void
+CloseSysMenu (void)
+{
+}
+
diff --git a/xorg-server/hw/xwin/winprocarg.c b/xorg-server/hw/xwin/winprocarg.c
index ddfe1f5b7..aab5091c9 100644
--- a/xorg-server/hw/xwin/winprocarg.c
+++ b/xorg-server/hw/xwin/winprocarg.c
@@ -44,6 +44,7 @@ from The Open Group.
#ifdef XWIN_CLIPBOARD
extern Bool g_fUnicodeClipboard;
extern Bool g_fClipboard;
+extern Bool g_fClipboardPrimary;
#endif
/*
@@ -88,7 +89,7 @@ winInitializeScreenDefaults(void)
dwWidth = GetSystemMetrics (SM_CXSCREEN);
dwHeight = GetSystemMetrics (SM_CYSCREEN);
- winErrorFVerb (2, "winInitializeScreenDefaults - w %d h %d\n",
+ winDebug ("winInitializeScreenDefaults - w %d h %d\n",
(int) dwWidth, (int) dwHeight);
/* Set a default DPI, if no parameter was passed */
@@ -113,6 +114,8 @@ winInitializeScreenDefaults(void)
defaultScreenInfo.fDecoration = TRUE;
#ifdef XWIN_MULTIWINDOWEXTWM
defaultScreenInfo.fMWExtWM = FALSE;
+#endif
+#ifdef XWIN_MULTIWINDOWINTWM
defaultScreenInfo.fInternalWM = FALSE;
#endif
defaultScreenInfo.fRootless = FALSE;
@@ -139,7 +142,7 @@ winInitializeScreenDefaults(void)
static void
winInitializeScreen(int i)
{
- winErrorFVerb (2, "winInitializeScreen - %d\n",i);
+ winDebug ("winInitializeScreen - %d\n",i);
/* Initialize default screen values, if needed */
winInitializeScreenDefaults();
@@ -155,7 +158,7 @@ void
winInitializeScreens(int maxscreens)
{
int i;
- winErrorFVerb (2, "winInitializeScreens - %i\n", maxscreens);
+ winDebug ("winInitializeScreens - %i\n", maxscreens);
if (maxscreens > g_iNumScreens)
{
@@ -231,15 +234,13 @@ ddxProcessArgument (int argc, char *argv[], int i)
* OsVendorInit () gets called, otherwise we will overwrite
* settings changed by parameters such as -fullscreen, etc.
*/
- winErrorFVerb (2, "ddxProcessArgument - Initializing default "
+ winDebug ("ddxProcessArgument - Initializing default "
"screens\n");
winInitializeScreenDefaults();
}
}
-#if CYGDEBUG
winDebug ("ddxProcessArgument - arg: %s\n", argv[i]);
-#endif
/*
* Look for the '-help' and similar options
@@ -273,10 +274,8 @@ ddxProcessArgument (int argc, char *argv[], int i)
int iWidth, iHeight, iX, iY;
int iMonitor;
-#if CYGDEBUG
winDebug ("ddxProcessArgument - screen - argc: %d i: %d\n",
argc, i);
-#endif
/* Display the usage message if the argument is malformed */
if (i + 1 >= argc)
@@ -315,7 +314,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
"Querying monitors is not supported on NT4 and Win95\n");
} else if (data.bMonitorSpecifiedExists == TRUE)
{
- winErrorFVerb(2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
+ winDebug("ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
iArgsProcessed = 3;
g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = FALSE;
g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
@@ -344,7 +343,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
(int *) &iWidth,
(int *) &iHeight))
{
- winErrorFVerb (2, "ddxProcessArgument - screen - Found ``WxD'' arg\n");
+ winDebug ("ddxProcessArgument - screen - Found ``WxD'' arg\n");
iArgsProcessed = 3;
g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = TRUE;
g_ScreenInfo[nScreenNum].dwWidth = iWidth;
@@ -356,7 +355,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
(int *) &iX,
(int *) &iY))
{
- winErrorFVerb (2, "ddxProcessArgument - screen - Found ``X+Y'' arg\n");
+ winDebug("ddxProcessArgument - screen - Found ``X+Y'' arg\n");
g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
g_ScreenInfo[nScreenNum].dwInitialX = iX;
g_ScreenInfo[nScreenNum].dwInitialY = iY;
@@ -400,7 +399,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
"Querying monitors is not supported on NT4 and Win95\n");
} else if (data.bMonitorSpecifiedExists == TRUE)
{
- winErrorFVerb (2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
+ winDebug ("ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
g_ScreenInfo[nScreenNum].iMonitor = iMonitor;
g_ScreenInfo[nScreenNum].dwInitialX = data.monitorOffsetX;
@@ -424,7 +423,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
&& 1 == sscanf (argv[i + 3], "%d",
(int *) &iHeight))
{
- winErrorFVerb (2, "ddxProcessArgument - screen - Found ``W D'' arg\n");
+ winDebug ("ddxProcessArgument - screen - Found ``W D'' arg\n");
iArgsProcessed = 4;
g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = TRUE;
g_ScreenInfo[nScreenNum].dwWidth = iWidth;
@@ -437,7 +436,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
&& 1 == sscanf (argv[i + 5], "%d",
(int *) &iY))
{
- winErrorFVerb (2, "ddxProcessArgument - screen - Found ``X Y'' arg\n");
+ winDebug ("ddxProcessArgument - screen - Found ``X Y'' arg\n");
iArgsProcessed = 6;
g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
g_ScreenInfo[nScreenNum].dwInitialX = iX;
@@ -446,7 +445,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
}
else
{
- winErrorFVerb (2, "ddxProcessArgument - screen - Did not find size arg. "
+ ErrorF ("ddxProcessArgument - screen - Did not find size arg. "
"dwWidth: %d dwHeight: %d\n",
(int) g_ScreenInfo[nScreenNum].dwWidth,
(int) g_ScreenInfo[nScreenNum].dwHeight);
@@ -577,7 +576,9 @@ ddxProcessArgument (int argc, char *argv[], int i)
/* Indicate that we have processed this argument */
return 1;
}
- /*
+#endif
+#ifdef XWIN_MULTIWINDOWINTWM
+ /*
* Look for the '-internalwm' argument
*/
if (IS_OPTION ("-internalwm"))
@@ -729,6 +730,30 @@ ddxProcessArgument (int argc, char *argv[], int i)
/* Indicate that we have processed this argument */
return 1;
}
+
+ /*
+ * Look for the '-clipboard' argument
+ */
+ if (IS_OPTION ("-clipboardprimary"))
+ {
+ /* Now the default, we still accept the arg for backwards compatibility */
+ g_fClipboardPrimary = TRUE;
+
+ /* Indicate that we have processed this argument */
+ return 1;
+ }
+
+ /*
+ * Look for the '-noclipboard' argument
+ */
+ if (IS_OPTION ("-noclipboardprimary"))
+ {
+ g_fClipboardPrimary = FALSE;
+
+ /* Indicate that we have processed this argument */
+ return 1;
+ }
+
#endif
@@ -1191,7 +1216,7 @@ winLogCommandLine (int argc, char *argv[])
iCurrLen += strlen (argv[i]);
}
- ErrorF ("XWin was started with the following command line:\n\n"
+ winDebug ("XWin was started with the following command line:\n\n"
"%s\n\n", g_pszCommandLine);
}
@@ -1203,15 +1228,17 @@ winLogCommandLine (int argc, char *argv[])
void
winLogVersionInfo (void)
{
+#ifdef WINDBG
static Bool s_fBeenHere = FALSE;
if (s_fBeenHere)
return;
s_fBeenHere = TRUE;
- ErrorF ("Welcome to the XWin X Server\n");
- ErrorF ("Vendor: %s\n", XVENDORNAME);
- ErrorF ("Release: %d.%d.%d.%d (%d)\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT);
- ErrorF ("%s\n\n", BUILDERSTRING);
- ErrorF ("Contact: %s\n", BUILDERADDR);
+ winDebug ("Welcome to the VcXsrv X Server\n");
+ winDebug ("Vendor: %s\n", XVENDORNAME);
+ winDebug ("Release: %d.%d.%d.%d\n\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP);
+ winDebug ("%s\n\n", BUILDERSTRING);
+ winDebug ("Contact: %s\n\n", BUILDERADDR);
+#endif
}
diff --git a/xorg-server/hw/xwin/winrandr.c b/xorg-server/hw/xwin/winrandr.c
index 248404800..680817e9d 100644
--- a/xorg-server/hw/xwin/winrandr.c
+++ b/xorg-server/hw/xwin/winrandr.c
@@ -70,7 +70,7 @@ winRandRGetInfo (ScreenPtr pScreen, Rotation *pRotations)
Why can't this be in DIX?
Does union _Validate vary depending on DDX??
*/
-static void
+void
xf86SetRootClip (ScreenPtr pScreen, Bool enable)
{
WindowPtr pWin = pScreen->root;
@@ -96,8 +96,8 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
{
RegionPtr borderVisible;
- borderVisible = REGION_CREATE(pScreen, NullBox, 1);
- REGION_SUBTRACT(pScreen, borderVisible,
+ borderVisible = RegionCreate(NullBox, 1);
+ RegionSubtract(borderVisible,
&pWin->borderClip, &pWin->winSize);
pWin->valdata->before.borderVisible = borderVisible;
}
@@ -116,18 +116,18 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
box.y1 = 0;
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_INIT (pScreen, &pWin->winSize, &box, 1);
- REGION_INIT (pScreen, &pWin->borderSize, &box, 1);
+ RegionInit(&pWin->winSize, &box, 1);
+ RegionInit(&pWin->borderSize, &box, 1);
if (WasViewable)
- REGION_RESET(pScreen, &pWin->borderClip, &box);
+ RegionReset(&pWin->borderClip, &box);
pWin->drawable.width = pScreen->width;
pWin->drawable.height = pScreen->height;
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionBreak(&pWin->clipList);
}
else
{
- REGION_EMPTY(pScreen, &pWin->borderClip);
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionEmpty(&pWin->borderClip);
+ RegionBreak(&pWin->clipList);
}
ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
@@ -222,8 +222,6 @@ Bool
winRandRScreenSetSize (ScreenPtr pScreen,
CARD16 width,
CARD16 height,
- CARD16 pixWidth,
- CARD16 pixHeight,
CARD32 mmWidth,
CARD32 mmHeight)
{
diff --git a/xorg-server/hw/xwin/winregistry.c b/xorg-server/hw/xwin/winregistry.c
index 3571b14d7..898ed978b 100644
--- a/xorg-server/hw/xwin/winregistry.c
+++ b/xorg-server/hw/xwin/winregistry.c
@@ -55,11 +55,11 @@ winGetRegistryDWORD (HKEY hkey, char *pszRegistryKey)
if (dwDisposition == REG_CREATED_NEW_KEY)
{
- ErrorF ("winGetRegistryDWORD - Created new key: %s\n", pszRegistryKey);
+ winDebug ("winGetRegistryDWORD - Created new key: %s\n", pszRegistryKey);
}
else if (dwDisposition == REG_OPENED_EXISTING_KEY)
{
- ErrorF ("winGetRegistryDWORD - Opened existing key: %s\n",
+ winDebug ("winGetRegistryDWORD - Opened existing key: %s\n",
pszRegistryKey);
}
diff --git a/xorg-server/hw/xwin/winresource.h b/xorg-server/hw/xwin/winresource.h
index 7085117e6..6a04153f0 100644
--- a/xorg-server/hw/xwin/winresource.h
+++ b/xorg-server/hw/xwin/winresource.h
@@ -51,4 +51,6 @@
#define ID_ABOUT_CHANGELOG 302
#define ID_ABOUT_WEBSITE 303
+#define IDC_HOSTLIST 100
+
#endif
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c
index 691237e6f..c67eb6de8 100644
--- a/xorg-server/hw/xwin/winscrinit.c
+++ b/xorg-server/hw/xwin/winscrinit.c
@@ -93,10 +93,8 @@ winScreenInit (int index,
HDC hdc;
DWORD dwInitialBPP;
-#if CYGDEBUG || YES
winDebug ("winScreenInit - dwWidth: %ld dwHeight: %ld\n",
pScreenInfo->dwWidth, pScreenInfo->dwHeight);
-#endif
/* Allocate privates for this screen */
if (!winAllocatePrivates (pScreen))
@@ -129,8 +127,8 @@ winScreenInit (int index,
/* Horribly misnamed function: Allow engine to adjust BPP for screen */
dwInitialBPP = pScreenInfo->dwBPP;
-
- if (!(*pScreenPriv->pwinAdjustVideoMode) (pScreen))
+
+ if (pScreenPriv->pwinAdjustVideoMode && !(*pScreenPriv->pwinAdjustVideoMode) (pScreen))
{
ErrorF ("winScreenInit - winAdjustVideoMode () failed\n");
return FALSE;
@@ -139,16 +137,16 @@ winScreenInit (int index,
if (dwInitialBPP == WIN_DEFAULT_BPP)
{
/* No -depth parameter was passed, let the user know the depth being used */
- ErrorF ("winScreenInit - Using Windows display depth of %d bits per pixel\n", (int) pScreenInfo->dwBPP);
+ winDebug ("winScreenInit - Using Windows display depth of %d bits per pixel\n", (int) pScreenInfo->dwBPP);
}
else if (dwInitialBPP != pScreenInfo->dwBPP)
{
/* Warn user if engine forced a depth different to -depth parameter */
- ErrorF ("winScreenInit - Command line depth of %d bpp overidden by engine, using %d bpp\n", (int) dwInitialBPP, (int) pScreenInfo->dwBPP);
+ winDebug ("winScreenInit - Command line depth of %d bpp overidden by engine, using %d bpp\n", (int) dwInitialBPP, (int) pScreenInfo->dwBPP);
}
else
{
- ErrorF ("winScreenInit - Using command line depth of %d bpp\n", (int) pScreenInfo->dwBPP);
+ winDebug ("winScreenInit - Using command line depth of %d bpp\n", (int) pScreenInfo->dwBPP);
}
/* Check for supported display depth */
@@ -186,7 +184,7 @@ winScreenInit (int index,
}
/* Create display window */
- if (!(*pScreenPriv->pwinCreateBoundingWindow) (pScreen))
+ if (pScreenPriv->pwinCreateBoundingWindow && !(*pScreenPriv->pwinCreateBoundingWindow) (pScreen))
{
ErrorF ("winScreenInit - pwinCreateBoundingWindow () "
"failed\n");
@@ -217,7 +215,7 @@ winScreenInit (int index,
miClearVisualTypes ();
/* Call the engine dependent screen initialization procedure */
- if (!((*pScreenPriv->pwinFinishScreenInit) (index, pScreen, argc, argv)))
+ if (pScreenPriv->pwinFinishScreenInit && !((*pScreenPriv->pwinFinishScreenInit) (index, pScreen, argc, argv)))
{
ErrorF ("winScreenInit - winFinishScreenInit () failed\n");
return FALSE;
@@ -225,8 +223,10 @@ winScreenInit (int index,
if (!g_fSoftwareCursor)
winInitCursor(pScreen);
+#ifdef WINDBG
else
- winErrorFVerb(2, "winScreenInit - Using software cursor\n");
+ winDebug("winScreenInit - Using software cursor\n");
+#endif
/*
Note the screen origin in a normalized coordinate space where (0,0) is at the top left
@@ -235,12 +235,9 @@ winScreenInit (int index,
pScreen->x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN);
pScreen->y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN);
- ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n",
+ winDebug("Screen %d added at virtual desktop coordinate (%d,%d).\n",
index, pScreen->x, pScreen->y);
-
-#if CYGDEBUG || YES
winDebug ("winScreenInit - returning\n");
-#endif
return TRUE;
}
@@ -297,7 +294,7 @@ winFinishScreenInitFB (int index,
+ winCountBits (pScreenPriv->dwGreenMask)
+ winCountBits (pScreenPriv->dwBlueMask);
- winErrorFVerb (2, "winFinishScreenInitFB - Masks: %08x %08x %08x\n",
+ winDebug ("winFinishScreenInitFB - Masks: %08x %08x %08x\n",
(unsigned int) pScreenPriv->dwRedMask,
(unsigned int) pScreenPriv->dwGreenMask,
(unsigned int) pScreenPriv->dwBlueMask);
@@ -397,16 +394,12 @@ winFinishScreenInitFB (int index,
#endif
/* Setup the cursor routines */
-#if CYGDEBUG
winDebug ("winFinishScreenInitFB - Calling miDCInitialize ()\n");
-#endif
miDCInitialize (pScreen, &g_winPointerCursorFuncs);
/* KDrive does winCreateDefColormap right after miDCInitialize */
/* Create a default colormap */
-#if CYGDEBUG
winDebug ("winFinishScreenInitFB - Calling winCreateDefColormap ()\n");
-#endif
if (!winCreateDefColormap (pScreen))
{
ErrorF ("winFinishScreenInitFB - Could not create colormap\n");
@@ -422,9 +415,7 @@ winFinishScreenInitFB (int index,
#endif
)
{
-#if CYGDEBUG
winDebug ("winFinishScreenInitFB - Calling shadowSetup ()\n");
-#endif
if (!shadowSetup(pScreen))
{
ErrorF ("winFinishScreenInitFB - shadowSetup () failed\n");
@@ -572,14 +563,12 @@ winFinishScreenInitFB (int index,
#ifdef XWIN_MULTIWINDOW
|| pScreenInfo->fMultiWindow
#endif
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
|| pScreenInfo->fInternalWM
#endif
)
{
-#if CYGDEBUG || YES
winDebug ("winFinishScreenInitFB - Calling winInitWM.\n");
-#endif
/* Initialize multi window mode */
if (!winInitWM (&pScreenPriv->pWMInfo,
@@ -588,7 +577,7 @@ winFinishScreenInitFB (int index,
&pScreenPriv->pmServerStarted,
pScreenInfo->dwScreen,
(HWND)&pScreenPriv->hwndScreen,
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
pScreenInfo->fInternalWM ||
#endif
FALSE))
@@ -605,9 +594,7 @@ winFinishScreenInitFB (int index,
/* Tell the server that we have a valid depth */
pScreenPriv->fBadDepth = FALSE;
-#if CYGDEBUG || YES
winDebug ("winFinishScreenInitFB - returning\n");
-#endif
return TRUE;
}
@@ -723,7 +710,7 @@ winFinishScreenInitNativeGDI (int index,
/* Bitmap */
pScreen->BitmapToRegion = winPixmapToRegionNativeGDI;
- ErrorF ("winFinishScreenInitNativeGDI - calling miDCInitialize\n");
+ winDebug ("winFinishScreenInitNativeGDI - calling miDCInitialize\n");
/* Set the default white and black pixel positions */
pScreen->whitePixel = pScreen->blackPixel = (Pixel) 0;
@@ -743,7 +730,7 @@ winFinishScreenInitNativeGDI (int index,
return FALSE;
}
- ErrorF ("winFinishScreenInitNativeGDI - miCreateDefColormap () "
+ winDebug ("winFinishScreenInitNativeGDI - miCreateDefColormap () "
"returned\n");
/* mi doesn't use a CloseScreen procedure, so no need to wrap */
@@ -752,7 +739,7 @@ winFinishScreenInitNativeGDI (int index,
/* Tell the server that we are enabled */
pScreenPriv->fEnabled = TRUE;
- ErrorF ("winFinishScreenInitNativeGDI - Successful addition of "
+ winDebug ("winFinishScreenInitNativeGDI - Successful addition of "
"screen %08x\n",
(unsigned int) pScreen);
diff --git a/xorg-server/hw/xwin/winsetsp.c b/xorg-server/hw/xwin/winsetsp.c
index fa492b479..6150a9182 100644
--- a/xorg-server/hw/xwin/winsetsp.c
+++ b/xorg-server/hw/xwin/winsetsp.c
@@ -34,6 +34,11 @@
#endif
#include "win.h"
+typedef struct mybitmap
+{
+ BITMAPINFOHEADER bmiHeader;
+ RGBQUAD bmiColors[256]; /* Maximum palette used in case of 8-bit per pixel */
+} mybitmap_t;
/* See Porting Layer Definition - p. 55 */
void
@@ -49,7 +54,7 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
PixmapPtr pPixmap = NULL;
winPrivPixmapPtr pPixmapPriv = NULL;
HBITMAP hbmpOrig = NULL;
- BITMAPINFO bmi;
+ mybitmap_t bmi;
HRGN hrgn = NULL, combined = NULL;
int nbox;
BoxPtr pbox;
@@ -90,7 +95,7 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
while (iSpans--)
{
- ZeroMemory (&bmi, sizeof (BITMAPINFO));
+ ZeroMemory (&bmi, sizeof (mybitmap_t));
bmi.bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = *piWidths;
bmi.bmiHeader.biHeight = 1;
@@ -112,7 +117,7 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
0, 0,
*piWidths, 1,
pSrcs,
- (BITMAPINFO *) &bmi,
+ (BITMAPINFO*)&bmi,
DIB_RGB_COLORS,
g_copyROP[pGC->alu]);
@@ -136,7 +141,7 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
while (iSpans--)
{
- ZeroMemory (&bmi, sizeof (BITMAPINFO));
+ ZeroMemory (&bmi, sizeof (mybitmap_t));
bmi.bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = *piWidths;
bmi.bmiHeader.biHeight = 1;
diff --git a/xorg-server/hw/xwin/winshaddd.c b/xorg-server/hw/xwin/winshaddd.c
index 00d7a379f..59530b1ed 100644
--- a/xorg-server/hw/xwin/winshaddd.c
+++ b/xorg-server/hw/xwin/winshaddd.c
@@ -38,22 +38,6 @@
/*
- * FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
- * so we have to redefine it here.
- */
-#ifdef DEFINE_GUID
-#undef DEFINE_GUID
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
-#endif /* DEFINE_GUID */
-
-
-/*
- * FIXME: Headers are broken, IID_IDirectDraw2 has to be defined
- * here manually. Should be handled by ddraw.h
- */
-#ifndef IID_IDirectDraw2
-DEFINE_GUID( IID_IDirectDraw2,0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
-#endif /* IID_IDirectDraw2 */
/*
@@ -140,9 +124,7 @@ winCreatePrimarySurfaceShadowDD (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winCreatePrimarySurfaceShadowDD - Created primary surface\n");
-#endif
/*
* Attach a clipper to the primary surface that will clip our blits to our
@@ -158,10 +140,8 @@ winCreatePrimarySurfaceShadowDD (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winCreatePrimarySurfaceShadowDD - Attached clipper to "
"primary surface\n");
-#endif
/* Everything was correct */
return TRUE;
@@ -178,7 +158,7 @@ winReleasePrimarySurfaceShadowDD (ScreenPtr pScreen)
{
winScreenPriv(pScreen);
- ErrorF ("winReleasePrimarySurfaceShadowDD - Hello\n");
+ winDebug ("winReleasePrimarySurfaceShadowDD - Hello\n");
/* Release the primary surface and clipper, if they exist */
if (pScreenPriv->pddsPrimary)
@@ -190,14 +170,14 @@ winReleasePrimarySurfaceShadowDD (ScreenPtr pScreen)
IDirectDrawSurface2_SetClipper (pScreenPriv->pddsPrimary,
NULL);
- ErrorF ("winReleasePrimarySurfaceShadowDD - Detached clipper\n");
+ winDebug ("winReleasePrimarySurfaceShadowDD - Detached clipper\n");
/* Release the primary surface */
IDirectDrawSurface2_Release (pScreenPriv->pddsPrimary);
pScreenPriv->pddsPrimary = NULL;
}
- ErrorF ("winReleasePrimarySurfaceShadowDD - Released primary surface\n");
+ winDebug ("winReleasePrimarySurfaceShadowDD - Released primary surface\n");
return TRUE;
}
@@ -220,9 +200,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen)
DDSURFACEDESC ddsd;
DDSURFACEDESC *pddsdShadow = NULL;
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDD\n");
-#endif
/* Create a clipper */
ddrval = (*g_fpDirectDrawCreateClipper) (0,
@@ -235,9 +213,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDD - Created a clipper\n");
-#endif
/* Attach the clipper to our display window */
ddrval = IDirectDrawClipper_SetHWnd (pScreenPriv->pddcPrimary,
@@ -251,9 +227,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDD - Attached clipper to window\n");
-#endif
/* Create a DirectDraw object, store the address at lpdd */
ddrval = (*g_fpDirectDrawCreate) (NULL, &pScreenPriv->pdd, NULL);
@@ -264,9 +238,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDD () - Created and initialized DD\n");
-#endif
/* Get a DirectDraw2 interface pointer */
ddrval = IDirectDraw_QueryInterface (pScreenPriv->pdd,
@@ -349,7 +321,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen)
|| pScreenInfo->dwBPP != GetDeviceCaps (hdc, BITSPIXEL)
|| pScreenInfo->dwRefreshRate != 0))
{
- ErrorF ("winAllocateFBShadowDD - Changing video mode\n");
+ winDebug ("winAllocateFBShadowDD - Changing video mode\n");
/* Change the video mode to the mode requested, and use the driver default refresh rate on failure */
ddrval = IDirectDraw2_SetDisplayMode (pScreenPriv->pdd2,
@@ -381,7 +353,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen)
}
else
{
- ErrorF ("winAllocateFBShadowDD - Not changing video mode\n");
+ winDebug ("winAllocateFBShadowDD - Not changing video mode\n");
}
/* Release our DC */
@@ -438,9 +410,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDD - Created shadow\n");
-#endif
/* Allocate a DD surface description for our screen privates */
pddsdShadow = pScreenPriv->pddsdShadow = malloc (sizeof (DDSURFACEDESC));
@@ -453,9 +423,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen)
ZeroMemory (pddsdShadow, sizeof (*pddsdShadow));
pddsdShadow->dwSize = sizeof (*pddsdShadow);
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDD - Locking shadow\n");
-#endif
/* Lock the shadow surface */
ddrval = IDirectDrawSurface2_Lock (pScreenPriv->pddsShadow,
@@ -470,9 +438,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDD - Locked shadow\n");
-#endif
/* We don't know how to deal with anything other than RGB */
if (!(pddsdShadow->ddpfPixelFormat.dwFlags & DDPF_RGB))
@@ -493,9 +459,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen)
pScreenPriv->dwGreenMask = pddsdShadow->ddpfPixelFormat.u3.dwGBitMask;
pScreenPriv->dwBlueMask = pddsdShadow->ddpfPixelFormat.u4.dwBBitMask;
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDD - Returning\n");
-#endif
return TRUE;
}
@@ -682,6 +646,7 @@ winShadowUpdateDD (ScreenPtr pScreen,
/* Has our memory pointer changed? */
if (pScreenInfo->pfb != pScreenPriv->pddsdShadow->lpSurface)
{
+ extern const char *g_pszLogFile;
ErrorF ("winShadowUpdateDD - Memory location of the shadow "
"surface has changed, trying to update the root window "
"pixmap header to point to the new address. If you get "
@@ -718,9 +683,7 @@ winCloseScreenShadowDD (int nIndex, ScreenPtr pScreen)
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
Bool fReturn;
-#if CYGDEBUG
winDebug ("winCloseScreenShadowDD - Freeing screen resources\n");
-#endif
/* Flag that the screen is closed */
pScreenPriv->fClosed = TRUE;
@@ -801,7 +764,7 @@ winInitVisualsShadowDD (ScreenPtr pScreen)
else
pScreenPriv->dwBitsPerRGB = dwBlueBits;
- ErrorF ("winInitVisualsShadowDD - Masks %08x %08x %08x BPRGB %d d %d "
+ winDebug ("winInitVisualsShadowDD - Masks %08x %08x %08x BPRGB %d d %d "
"bpp %d\n",
(unsigned int) pScreenPriv->dwRedMask,
(unsigned int) pScreenPriv->dwGreenMask,
@@ -872,9 +835,7 @@ winInitVisualsShadowDD (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winInitVisualsShadowDD - Returning\n");
-#endif
return TRUE;
}
@@ -1288,10 +1249,8 @@ winDestroyColormapShadowDD (ColormapPtr pColormap)
*/
if (pColormap->flags & IsDefault)
{
-#if CYGDEBUG
winDebug ("winDestroyColormapShadowDD - Destroying default "
"colormap\n");
-#endif
/*
* FIXME: Walk the list of all screens, popping the default
diff --git a/xorg-server/hw/xwin/winshadddnl.c b/xorg-server/hw/xwin/winshadddnl.c
index 0a0b4ae13..4a573470d 100644
--- a/xorg-server/hw/xwin/winshadddnl.c
+++ b/xorg-server/hw/xwin/winshadddnl.c
@@ -41,10 +41,12 @@
* FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
* so we have to redefine it here.
*/
+#ifndef _MSC_VER
#ifdef DEFINE_GUID
#undef DEFINE_GUID
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
#endif /* DEFINE_GUID */
+#endif
/*
* FIXME: Headers are broken, IID_IDirectDraw4 has to be defined
@@ -109,6 +111,61 @@ winCreatePrimarySurfaceShadowDDNL (ScreenPtr pScreen);
static Bool
winReleasePrimarySurfaceShadowDDNL (ScreenPtr pScreen);
+static HRESULT myIDirectDrawSurface4_Blt( ScreenPtr pScreen, RECT *pRect, RECT *prcSrc)
+{
+ HRESULT ddrval = DD_OK;
+ unsigned i;
+ winScreenPriv(pScreen);
+
+ for (i = 0; i < 3; ++i)
+ {
+ ddrval = IDirectDrawSurface4_Blt(pScreenPriv->pddsPrimary4, pRect, pScreenPriv->pddsShadow4, prcSrc, DDBLT_WAIT, NULL);
+ /* Try to regain the primary surface and blit again if we've lost it */
+ if (ddrval == DDERR_SURFACELOST)
+ {
+ /* Surface was lost */
+ ErrorF ("IDirectDrawSurface4_Blt reported that the primary "
+ "surface was lost, trying to restore, retry: %d\n", i + 1);
+
+ /* Try to restore the surface, once */
+
+ if (i==1)
+ {
+ ErrorF("Recreating DDraw surface because restoring of surface didn't work.\n");
+ winAllocateFBShadowDDNL(pScreen);
+ }
+ else
+ {
+ ddrval = IDirectDraw4_RestoreAllSurfaces (pScreenPriv->pdd4);
+ ErrorF ("IDirectDraw4_RestoreAllSurfaces returned: ");
+ if (ddrval == DD_OK)
+ ErrorF ("DD_OK\n");
+ else if (ddrval == DDERR_WRONGMODE)
+ ErrorF ("DDERR_WRONGMODE\n");
+ else if (ddrval == DDERR_INCOMPATIBLEPRIMARY)
+ ErrorF ("DDERR_INCOMPATIBLEPRIMARY\n");
+ else if (ddrval == DDERR_UNSUPPORTED)
+ ErrorF ("DDERR_UNSUPPORTED\n");
+ else if (ddrval == DDERR_INVALIDPARAMS)
+ ErrorF ("DDERR_INVALIDPARAMS\n");
+ else if (ddrval == DDERR_INVALIDOBJECT)
+ ErrorF ("DDERR_INVALIDOBJECT\n");
+ else
+ ErrorF ("unknown error: %08x\n", ddrval);
+ }
+ /* Loop around to try the blit one more time */
+ continue;
+ }
+ else if (FAILED (ddrval))
+ {
+ ErrorF ("IDirectDrawSurface4_Blt failed, but surface not "
+ "lost: %08x %d\n", ddrval, ddrval);
+ }
+ break;
+ }
+ return ddrval;
+}
+
/*
* Create the primary surface and attach the clipper.
@@ -154,9 +211,7 @@ winCreatePrimarySurfaceShadowDDNL (ScreenPtr pScreen)
return FALSE;
}
-#if 1
winDebug ("winCreatePrimarySurfaceShadowDDNL - Created primary surface\n");
-#endif
/* Attach our clipper to our primary surface handle */
ddrval = IDirectDrawSurface4_SetClipper (pScreenPriv->pddsPrimary4,
@@ -169,28 +224,16 @@ winCreatePrimarySurfaceShadowDDNL (ScreenPtr pScreen)
return FALSE;
}
-#if 1
winDebug ("winCreatePrimarySurfaceShadowDDNL - Attached clipper to primary "
"surface\n");
-#endif
/* Everything was correct */
return TRUE;
}
-/*
- * Detach the clipper and release the primary surface.
- * Called from WM_DISPLAYCHANGE.
- */
-
-static Bool
-winReleasePrimarySurfaceShadowDDNL (ScreenPtr pScreen)
+static void ClosePrimarySurfaceShadowDDNL (winPrivScreenPtr pScreenPriv)
{
- winScreenPriv(pScreen);
-
- winDebug ("winReleasePrimarySurfaceShadowDDNL - Hello\n");
-
/* Release the primary surface and clipper, if they exist */
if (pScreenPriv->pddsPrimary4)
{
@@ -198,8 +241,7 @@ winReleasePrimarySurfaceShadowDDNL (ScreenPtr pScreen)
* Detach the clipper from the primary surface.
* NOTE: We do this explicity for clarity. The Clipper is not released.
*/
- IDirectDrawSurface4_SetClipper (pScreenPriv->pddsPrimary4,
- NULL);
+ IDirectDrawSurface4_SetClipper (pScreenPriv->pddsPrimary4, NULL);
winDebug ("winReleasePrimarySurfaceShadowDDNL - Detached clipper\n");
@@ -208,6 +250,47 @@ winReleasePrimarySurfaceShadowDDNL (ScreenPtr pScreen)
pScreenPriv->pddsPrimary4 = NULL;
}
+}
+
+static void ReleaseDDNL(winPrivScreenPtr pScreenPriv)
+{
+ /* Release the clipper object */
+ if (pScreenPriv->pddcPrimary)
+ {
+ IDirectDrawClipper_Release (pScreenPriv->pddcPrimary);
+ pScreenPriv->pddcPrimary = NULL;
+ }
+
+ /* Free the DirectDraw4 object, if there is one */
+ if (pScreenPriv->pdd4)
+ {
+ IDirectDraw4_RestoreDisplayMode (pScreenPriv->pdd4);
+ IDirectDraw4_Release (pScreenPriv->pdd4);
+ pScreenPriv->pdd4 = NULL;
+ }
+
+ /* Free the DirectDraw object, if there is one */
+ if (pScreenPriv->pdd)
+ {
+ IDirectDraw_Release (pScreenPriv->pdd);
+ pScreenPriv->pdd = NULL;
+ }
+}
+
+/*
+ * Detach the clipper and release the primary surface.
+ * Called from WM_DISPLAYCHANGE.
+ */
+
+static Bool
+winReleasePrimarySurfaceShadowDDNL (ScreenPtr pScreen)
+{
+ winScreenPriv(pScreen);
+
+ winDebug ("winReleasePrimarySurfaceShadowDDNL - Hello\n");
+
+ ClosePrimarySurfaceShadowDDNL(pScreenPriv);
+
winDebug ("winReleasePrimarySurfaceShadowDDNL - Released primary surface\n");
return TRUE;
@@ -232,29 +315,42 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen)
char *lpSurface = NULL;
DDPIXELFORMAT ddpfPrimary;
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDDNL - w %d h %d d %d\n",
pScreenInfo->dwWidth, pScreenInfo->dwHeight, pScreenInfo->dwDepth);
-#endif
/* Set the padded screen width */
pScreenInfo->dwPaddedWidth = PixmapBytePad (pScreenInfo->dwWidth,
pScreenInfo->dwBPP);
- /* Allocate memory for our shadow surface */
- lpSurface = malloc (pScreenInfo->dwPaddedWidth * pScreenInfo->dwHeight);
- if (lpSurface == NULL)
+ if ( pScreenInfo->pfb)
+ {
+ ErrorF("winAllocateFBShadowDDNL calling for the second time, reallocating\n");
+ lpSurface=pScreenInfo->pfb;
+
+ if (pScreenPriv->pddsShadow4)
{
- ErrorF ("winAllocateFBShadowDDNL - Could not allocate bits\n");
- return FALSE;
+ IDirectDrawSurface4_Release (pScreenPriv->pddsShadow4);
+ pScreenPriv->pddsShadow4 = NULL;
}
-
- /*
- * Initialize the framebuffer memory so we don't get a
- * strange display at startup
- */
- ZeroMemory (lpSurface, pScreenInfo->dwPaddedWidth * pScreenInfo->dwHeight);
+ ClosePrimarySurfaceShadowDDNL(pScreenPriv);
+ ReleaseDDNL(pScreenPriv);
+ }
+ else
+ {
+ /* Allocate memory for our shadow surface */
+ lpSurface = malloc (pScreenInfo->dwPaddedWidth * pScreenInfo->dwHeight);
+ if (lpSurface == NULL)
+ {
+ ErrorF ("winAllocateFBShadowDDNL - Could not allocate bits\n");
+ return FALSE;
+ }
+ /*
+ * Initialize the framebuffer memory so we don't get a
+ * strange display at startup
+ */
+ ZeroMemory (lpSurface, pScreenInfo->dwPaddedWidth * pScreenInfo->dwHeight);
+ }
/* Create a clipper */
ddrval = (*g_fpDirectDrawCreateClipper) (0,
&pScreenPriv->pddcPrimary,
@@ -266,9 +362,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDDNL - Created a clipper\n");
-#endif
/* Attach the clipper to our display window */
ddrval = IDirectDrawClipper_SetHWnd (pScreenPriv->pddcPrimary,
@@ -282,9 +376,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDDNL - Attached clipper to window\n");
-#endif
/* Create a DirectDraw object, store the address at lpdd */
ddrval = (*g_fpDirectDrawCreate) (NULL,
@@ -298,9 +390,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDDNL - Created and initialized DD\n");
-#endif
/* Get a DirectDraw4 interface pointer */
ddrval = IDirectDraw_QueryInterface (pScreenPriv->pdd,
@@ -458,14 +548,12 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDDNL - Primary masks: %08x %08x %08x "
"dwRGBBitCount: %d\n",
ddpfPrimary.u2.dwRBitMask,
ddpfPrimary.u3.dwGBitMask,
ddpfPrimary.u4.dwBBitMask,
ddpfPrimary.u1.dwRGBBitCount);
-#endif
/* Describe the shadow surface to be created */
/*
@@ -502,19 +590,15 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG || YES
winDebug ("winAllocateFBShadowDDNL - Created shadow pitch: %d\n",
(int) ddsdShadow.u1.lPitch);
-#endif
/* Grab the pitch from the surface desc */
pScreenInfo->dwStride = (ddsdShadow.u1.lPitch * 8)
/ pScreenInfo->dwBPP;
-#if CYGDEBUG || YES
winDebug ("winAllocateFBShadowDDNL - Created shadow stride: %d\n",
(int) pScreenInfo->dwStride);
-#endif
/* Save the pointer to our surface memory */
pScreenInfo->pfb = lpSurface;
@@ -524,9 +608,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen)
pScreenPriv->dwGreenMask = ddsdShadow.u4.ddpfPixelFormat.u3.dwGBitMask;
pScreenPriv->dwBlueMask = ddsdShadow.u4.ddpfPixelFormat.u4.dwBBitMask;
-#if CYGDEBUG
winDebug ("winAllocateFBShadowDDNL - Returning\n");
-#endif
return TRUE;
}
@@ -549,27 +631,7 @@ winFreeFBShadowDDNL(ScreenPtr pScreen)
/* Detach the clipper from the primary surface and release the primary surface, if there is one */
winReleasePrimarySurfaceShadowDDNL(pScreen);
- /* Release the clipper object */
- if (pScreenPriv->pddcPrimary)
- {
- IDirectDrawClipper_Release (pScreenPriv->pddcPrimary);
- pScreenPriv->pddcPrimary = NULL;
- }
-
- /* Free the DirectDraw4 object, if there is one */
- if (pScreenPriv->pdd4)
- {
- IDirectDraw4_RestoreDisplayMode (pScreenPriv->pdd4);
- IDirectDraw4_Release (pScreenPriv->pdd4);
- pScreenPriv->pdd4 = NULL;
- }
-
- /* Free the DirectDraw object, if there is one */
- if (pScreenPriv->pdd)
- {
- IDirectDraw_Release (pScreenPriv->pdd);
- pScreenPriv->pdd = NULL;
- }
+ ReleaseDDNL(pScreenPriv);
/* Invalidate the ScreenInfo's fb pointer */
pScreenInfo->pfb = NULL;
@@ -635,7 +697,6 @@ winShadowUpdateDDNL (ScreenPtr pScreen,
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
RegionPtr damage = shadowDamage(pBuf);
- HRESULT ddrval = DD_OK;
RECT rcDest, rcSrc;
POINT ptOrigin;
DWORD dwBox = RegionNumRects (damage);
@@ -684,33 +745,10 @@ winShadowUpdateDDNL (ScreenPtr pScreen,
rcDest.bottom = ptOrigin.y + rcSrc.bottom;
/* Blit the damaged areas */
- ddrval = IDirectDrawSurface4_Blt (pScreenPriv->pddsPrimary4,
- &rcDest,
- pScreenPriv->pddsShadow4,
- &rcSrc,
- DDBLT_WAIT,
- NULL);
- if (FAILED (ddrval))
- {
- static int s_iFailCount = 0;
-
- if (s_iFailCount < FAIL_MSG_MAX_BLT)
- {
- ErrorF ("winShadowUpdateDDNL - IDirectDrawSurface4_Blt () "
- "failed: %08x\n",
- (unsigned int) ddrval);
-
- ++s_iFailCount;
-
- if (s_iFailCount == FAIL_MSG_MAX_BLT)
- {
- ErrorF ("winShadowUpdateDDNL - IDirectDrawSurface4_Blt "
- "failure message maximum (%d) reached. No "
- "more failure messages will be printed.\n",
- FAIL_MSG_MAX_BLT);
- }
- }
- }
+ if (pScreenPriv->pddsPrimary4)
+ myIDirectDrawSurface4_Blt (pScreen,
+ &rcDest,
+ &rcSrc);
/* Get a pointer to the next box */
++pBox;
@@ -737,11 +775,9 @@ winShadowUpdateDDNL (ScreenPtr pScreen,
DeleteObject (hrgnCombined);
hrgnCombined = NULL;
-#if CYGDEBUG
winDebug ("winShadowUpdateDDNL - be x1 %d y1 %d x2 %d y2 %d\n",
pBoxExtents->x1, pBoxExtents->y1,
pBoxExtents->x2, pBoxExtents->y2);
-#endif
/* Calculating a bounding box for the source is easy */
rcSrc.left = pBoxExtents->x1;
@@ -756,12 +792,7 @@ winShadowUpdateDDNL (ScreenPtr pScreen,
rcDest.bottom = ptOrigin.y + rcSrc.bottom;
/* Our Blt should be clipped to the invalidated region */
- ddrval = IDirectDrawSurface4_Blt (pScreenPriv->pddsPrimary4,
- &rcDest,
- pScreenPriv->pddsShadow4,
- &rcSrc,
- DDBLT_WAIT,
- NULL);
+ myIDirectDrawSurface4_Blt (pScreen, &rcDest, &rcSrc);
/* Reset the clip region */
SelectClipRgn (pScreenPriv->hdcScreen, NULL);
@@ -792,9 +823,7 @@ winCloseScreenShadowDDNL (int nIndex, ScreenPtr pScreen)
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
Bool fReturn;
-#if CYGDEBUG
winDebug ("winCloseScreenShadowDDNL - Freeing screen resources\n");
-#endif
/* Flag that the screen is closed */
pScreenPriv->fClosed = TRUE;
@@ -946,9 +975,7 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winInitVisualsShadowDDNL - Returning\n");
-#endif
return TRUE;
}
@@ -1048,63 +1075,14 @@ winBltExposedRegionsShadowDDNL (ScreenPtr pScreen)
rcSrc.right = pScreenInfo->dwWidth;
rcSrc.bottom = pScreenInfo->dwHeight;
- /* Try to regain the primary surface and blit again if we've lost it */
- for (i = 0; i <= WIN_REGAIN_SURFACE_RETRIES; ++i)
- {
/* Our Blt should be clipped to the invalidated region */
- ddrval = IDirectDrawSurface4_Blt (pScreenPriv->pddsPrimary4,
- &rcDest,
- pScreenPriv->pddsShadow4,
- &rcSrc,
- DDBLT_WAIT,
- NULL);
- if (ddrval == DDERR_SURFACELOST)
- {
- /* Surface was lost */
- winErrorFVerb (1, "winBltExposedRegionsShadowDDNL - "
- "IDirectDrawSurface4_Blt reported that the primary "
- "surface was lost, trying to restore, retry: %d\n", i + 1);
-
- /* Try to restore the surface, once */
-
- ddrval = IDirectDrawSurface4_Restore (pScreenPriv->pddsPrimary4);
- winDebug ("winBltExposedRegionsShadowDDNL - "
- "IDirectDrawSurface4_Restore returned: ");
- if (ddrval == DD_OK)
- winDebug ("DD_OK\n");
- else if (ddrval == DDERR_WRONGMODE)
- winDebug ("DDERR_WRONGMODE\n");
- else if (ddrval == DDERR_INCOMPATIBLEPRIMARY)
- winDebug ("DDERR_INCOMPATIBLEPRIMARY\n");
- else if (ddrval == DDERR_UNSUPPORTED)
- winDebug ("DDERR_UNSUPPORTED\n");
- else if (ddrval == DDERR_INVALIDPARAMS)
- winDebug ("DDERR_INVALIDPARAMS\n");
- else if (ddrval == DDERR_INVALIDOBJECT)
- winDebug ("DDERR_INVALIDOBJECT\n");
- else
- winDebug ("unknown error: %08x\n", (unsigned int) ddrval);
-
- /* Loop around to try the blit one more time */
- continue;
- }
- else if (FAILED (ddrval))
+ ddrval = myIDirectDrawSurface4_Blt (pScreen, &rcDest, &rcSrc);
+ if (FAILED (ddrval))
{
fReturn = FALSE;
- winErrorFVerb (1, "winBltExposedRegionsShadowDDNL - "
- "IDirectDrawSurface4_Blt failed, but surface not "
- "lost: %08x %d\n",
- (unsigned int) ddrval, (int) ddrval);
- goto winBltExposedRegionsShadowDDNL_Exit;
- }
- else
- {
- /* Success, stop looping */
- break;
}
- }
- winBltExposedRegionsShadowDDNL_Exit:
+winBltExposedRegionsShadowDDNL_Exit:
/* EndPaint frees the DC */
if (hdcUpdate != NULL)
EndPaint (pScreenPriv->hwndScreen, &ps);
@@ -1147,7 +1125,6 @@ winRedrawScreenShadowDDNL (ScreenPtr pScreen)
{
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
- HRESULT ddrval = DD_OK;
RECT rcSrc, rcDest;
POINT ptOrigin;
@@ -1169,19 +1146,7 @@ winRedrawScreenShadowDDNL (ScreenPtr pScreen)
rcSrc.bottom = pScreenInfo->dwHeight;
/* Redraw the whole window, to take account for the new colors */
- ddrval = IDirectDrawSurface4_Blt (pScreenPriv->pddsPrimary4,
- &rcDest,
- pScreenPriv->pddsShadow4,
- &rcSrc,
- DDBLT_WAIT,
- NULL);
- if (FAILED (ddrval))
- {
- ErrorF ("winRedrawScreenShadowDDNL - IDirectDrawSurface4_Blt () "
- "failed: %08x\n",
- (unsigned int) ddrval);
- }
-
+ myIDirectDrawSurface4_Blt (pScreen, &rcDest, &rcSrc);
return TRUE;
}
@@ -1319,9 +1284,7 @@ winDestroyColormapShadowDDNL (ColormapPtr pColormap)
*/
if (pColormap->flags & IsDefault)
{
-#if CYGDEBUG
winDebug ("winDestroyColormapShadowDDNL - Destroying default colormap\n");
-#endif
/*
* FIXME: Walk the list of all screens, popping the default
diff --git a/xorg-server/hw/xwin/winshadgdi.c b/xorg-server/hw/xwin/winshadgdi.c
index 499037656..7d53d4969 100644
--- a/xorg-server/hw/xwin/winshadgdi.c
+++ b/xorg-server/hw/xwin/winshadgdi.c
@@ -99,7 +99,7 @@ winQueryScreenDIBFormat (ScreenPtr pScreen, BITMAPINFOHEADER *pbmih)
{
winScreenPriv(pScreen);
HBITMAP hbmp;
-#if CYGDEBUG
+#ifdef WINDBG
LPDWORD pdw = NULL;
#endif
@@ -128,7 +128,7 @@ winQueryScreenDIBFormat (ScreenPtr pScreen, BITMAPINFOHEADER *pbmih)
return FALSE;
}
-#if CYGDEBUG
+#ifdef WINDBG
/* Get a pointer to bitfields */
pdw = (DWORD*) ((CARD8*)pbmih + sizeof (BITMAPINFOHEADER));
@@ -189,7 +189,7 @@ winQueryRGBBitsAndMasks (ScreenPtr pScreen)
if (GetDeviceCaps (pScreenPriv->hdcScreen, PLANES)
* GetDeviceCaps (pScreenPriv->hdcScreen, BITSPIXEL) == 24)
{
- ErrorF ("winQueryRGBBitsAndMasks - GetDeviceCaps (BITSPIXEL) "
+ winDebug ("winQueryRGBBitsAndMasks - GetDeviceCaps (BITSPIXEL) "
"returned 24 for the screen. Using default 24bpp masks.\n");
/* 8 bits per primary color */
@@ -218,7 +218,7 @@ winQueryRGBBitsAndMasks (ScreenPtr pScreen)
/* Get a pointer to bitfields */
pdw = (DWORD*) ((CARD8*)pbmih + sizeof (BITMAPINFOHEADER));
-#if CYGDEBUG
+#ifdef WINDBG
winDebug ("%s - Masks: %08x %08x %08x\n", __FUNCTION__,
pdw[0], pdw[1], pdw[2]);
winDebug ("%s - Bitmap: %dx%d %d bpp %d planes\n", __FUNCTION__,
@@ -345,7 +345,7 @@ winAllocateFBShadowGDI (ScreenPtr pScreen)
pScreenPriv->pbmih->biWidth = pScreenInfo->dwWidth;
pScreenPriv->pbmih->biHeight = -pScreenInfo->dwHeight;
- ErrorF ("winAllocateFBShadowGDI - Creating DIB with width: %d height: %d "
+ winDebug ("winAllocateFBShadowGDI - Creating DIB with width: %d height: %d "
"depth: %d\n",
(int) pScreenPriv->pbmih->biWidth, (int) -pScreenPriv->pbmih->biHeight, pScreenPriv->pbmih->biBitCount);
@@ -358,14 +358,12 @@ winAllocateFBShadowGDI (ScreenPtr pScreen)
0);
if (pScreenPriv->hbmpShadow == NULL || pScreenInfo->pfb == NULL)
{
- winW32Error (2, "winAllocateFBShadowGDI - CreateDIBSection failed:");
+ winW32Error ("winAllocateFBShadowGDI - CreateDIBSection failed:");
return FALSE;
}
else
{
-#if CYGDEBUG
winDebug ("winAllocateFBShadowGDI - Shadow buffer allocated\n");
-#endif
}
/* Get information about the bitmap that was allocated */
@@ -373,22 +371,18 @@ winAllocateFBShadowGDI (ScreenPtr pScreen)
sizeof (dibsection),
&dibsection);
-#if CYGDEBUG || YES
/* Print information about bitmap allocated */
winDebug ("winAllocateFBShadowGDI - Dibsection width: %d height: %d "
"depth: %d size image: %d\n",
(int) dibsection.dsBmih.biWidth, (int) dibsection.dsBmih.biHeight,
dibsection.dsBmih.biBitCount,
(int) dibsection.dsBmih.biSizeImage);
-#endif
/* Select the shadow bitmap into the shadow DC */
SelectObject (pScreenPriv->hdcShadow,
pScreenPriv->hbmpShadow);
-#if CYGDEBUG
winDebug ("winAllocateFBShadowGDI - Attempting a shadow blit\n");
-#endif
/* Do a test blit from the shadow to the screen, I think */
fReturn = BitBlt (pScreenPriv->hdcScreen,
@@ -399,21 +393,15 @@ winAllocateFBShadowGDI (ScreenPtr pScreen)
SRCCOPY);
if (fReturn)
{
-#if CYGDEBUG
winDebug ("winAllocateFBShadowGDI - Shadow blit success\n");
-#endif
}
else
{
- winW32Error (2, "winAllocateFBShadowGDI - Shadow blit failure\n");
-#if 0
- return FALSE;
-#else
+ winW32Error ("winAllocateFBShadowGDI - Shadow blit failure\n");
/* ago: ignore this error. The blit fails with wine, but does not
* cause any problems later. */
fReturn = TRUE;
-#endif
}
/* Look for height weirdness */
@@ -427,10 +415,8 @@ winAllocateFBShadowGDI (ScreenPtr pScreen)
/ dibsection.dsBmih.biHeight)
* 8) / pScreenInfo->dwBPP;
-#if CYGDEBUG || YES
winDebug ("winAllocateFBShadowGDI - Created shadow stride: %d\n",
(int) pScreenInfo->dwStride);
-#endif
#ifdef XWIN_MULTIWINDOW
/* Redraw all windows */
@@ -490,15 +476,17 @@ winShadowUpdateGDI (ScreenPtr pScreen,
if (dwBox != 1)
{
++s_dwNonUnitRegions;
- ErrorF ("winShadowUpdatGDI - dwBox: %d\n", dwBox);
+ winDebug ("winShadowUpdatGDI - dwBox: %d\n", dwBox);
}
if ((s_dwTotalUpdates % 100) == 0)
- ErrorF ("winShadowUpdateGDI - %d%% non-unity regions, avg boxes: %d "
+ {
+ winDebug ("winShadowUpdateGDI - %d%% non-unity regions, avg boxes: %d "
"nu: %d tu: %d\n",
(s_dwNonUnitRegions * 100) / s_dwTotalUpdates,
s_dwTotalBoxes / s_dwTotalUpdates,
s_dwNonUnitRegions, s_dwTotalUpdates);
+ }
#endif /* XWIN_UPDATESTATS */
/*
@@ -626,9 +614,7 @@ winCloseScreenShadowGDI (int nIndex, ScreenPtr pScreen)
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
Bool fReturn;
-#if CYGDEBUG
winDebug ("winCloseScreenShadowGDI - Freeing screen resources\n");
-#endif
/* Flag that the screen is closed */
pScreenPriv->fClosed = TRUE;
@@ -697,7 +683,7 @@ winInitVisualsShadowGDI (ScreenPtr pScreen)
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
/* Display debugging information */
- ErrorF ("winInitVisualsShadowGDI - Masks %08x %08x %08x BPRGB %d d %d "
+ winDebug ("winInitVisualsShadowGDI - Masks %08x %08x %08x BPRGB %d d %d "
"bpp %d\n",
(unsigned int) pScreenPriv->dwRedMask,
(unsigned int) pScreenPriv->dwGreenMask,
@@ -766,9 +752,7 @@ winInitVisualsShadowGDI (ScreenPtr pScreen)
return FALSE;
}
-#if CYGDEBUG
winDebug ("winInitVisualsShadowGDI - Returning\n");
-#endif
return TRUE;
}
@@ -943,17 +927,13 @@ winRealizeInstalledPaletteShadowGDI (ScreenPtr pScreen)
winScreenPriv(pScreen);
winPrivCmapPtr pCmapPriv = NULL;
-#if CYGDEBUG
winDebug ("winRealizeInstalledPaletteShadowGDI\n");
-#endif
/* Don't do anything if there is not a colormap */
if (pScreenPriv->pcmapInstalled == NULL)
{
-#if CYGDEBUG
winDebug ("winRealizeInstalledPaletteShadowGDI - No colormap "
"installed\n");
-#endif
return TRUE;
}
@@ -1180,10 +1160,8 @@ winDestroyColormapShadowGDI (ColormapPtr pColormap)
*/
if (pColormap->flags & IsDefault)
{
-#if CYGDEBUG
winDebug ("winDestroyColormapShadowGDI - Destroying default "
"colormap\n");
-#endif
/*
* FIXME: Walk the list of all screens, popping the default
diff --git a/xorg-server/hw/xwin/wintrayicon.c b/xorg-server/hw/xwin/wintrayicon.c
index 895b47caf..01d53bc44 100644
--- a/xorg-server/hw/xwin/wintrayicon.c
+++ b/xorg-server/hw/xwin/wintrayicon.c
@@ -36,35 +36,57 @@
#include <shellapi.h>
#include "winprefs.h"
+static NOTIFYICONDATA nid;
/*
* Initialize the tray icon
*/
void
-winInitNotifyIcon (winPrivScreenPtr pScreenPriv)
+winInitNotifyIcon (winPrivScreenPtr pScreenPriv, Bool Modify)
{
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
- NOTIFYICONDATA nid = {0};
+ char HostName[256];
- nid.cbSize = sizeof (NOTIFYICONDATA);
- nid.hWnd = pScreenPriv->hwndScreen;
- nid.uID = pScreenInfo->dwScreen;
- nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
- nid.uCallbackMessage = WM_TRAYICON;
- nid.hIcon = winTaskbarIcon ();
+ if (!Modify)
+ {
+ nid.cbSize = sizeof (NOTIFYICONDATA);
+ nid.hWnd = pScreenPriv->hwndScreen;
+ nid.uID = pScreenInfo->dwScreen;
+ nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
+ nid.uCallbackMessage = WM_TRAYICON;
+ nid.hIcon = winTaskbarIcon ();
- /* Save handle to the icon so it can be freed later */
- pScreenPriv->hiconNotifyIcon = nid.hIcon;
+ /* Save handle to the icon so it can be freed later */
+ pScreenPriv->hiconNotifyIcon = nid.hIcon;
+ }
+
+ gethostname(HostName,256);
/* Set display and screen-specific tooltip text */
- snprintf (nid.szTip,
+ if (g_pszQueryHost)
+ {
+ snprintf (nid.szTip,
+ sizeof (nid.szTip),
+ "%s - %s:%s.%d - %d clients",
+ g_pszQueryHost,
+ HostName,
+ display,
+ (int) pScreenInfo->dwScreen,
+ pScreenPriv->iConnectedClients);
+ }
+ else
+ {
+ snprintf (nid.szTip,
sizeof (nid.szTip),
- PROJECT_NAME " Server:%s.%d",
+ "%s:%s.%d - %d clients",
+ HostName,
display,
- (int) pScreenInfo->dwScreen);
+ (int) pScreenInfo->dwScreen,
+ pScreenPriv->iConnectedClients);
+ }
/* Add the tray icon */
- if (!Shell_NotifyIcon (NIM_ADD, &nid))
+ if (!Shell_NotifyIcon ((Modify) ? NIM_MODIFY : NIM_ADD, &nid))
ErrorF ("winInitNotifyIcon - Shell_NotifyIcon Failed\n");
}
@@ -77,29 +99,16 @@ void
winDeleteNotifyIcon (winPrivScreenPtr pScreenPriv)
{
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
- NOTIFYICONDATA nid = {0};
-
-#if 0
- ErrorF ("winDeleteNotifyIcon\n");
-#endif
-
- nid.cbSize = sizeof (NOTIFYICONDATA);
- nid.hWnd = pScreenPriv->hwndScreen;
- nid.uID = pScreenInfo->dwScreen;
+ if (!pScreenPriv->hiconNotifyIcon)
+ return;
+
/* Delete the tray icon */
- if (!Shell_NotifyIcon (NIM_DELETE, &nid))
- {
- ErrorF ("winDeleteNotifyIcon - Shell_NotifyIcon failed\n");
- return;
- }
+ Shell_NotifyIcon (NIM_DELETE, &nid);
/* Free the icon that was loaded */
- if (pScreenPriv->hiconNotifyIcon != NULL
- && DestroyIcon (pScreenPriv->hiconNotifyIcon) == 0)
- {
- ErrorF ("winDeleteNotifyIcon - DestroyIcon failed\n");
- }
+ DestroyIcon (pScreenPriv->hiconNotifyIcon);
+
pScreenPriv->hiconNotifyIcon = NULL;
}
@@ -119,6 +128,17 @@ winHandleIconMessage (HWND hwnd, UINT message,
switch (lParam)
{
+ case WM_MOUSEMOVE:
+ {
+ static int PrevNrClients;
+ int NrClients=GetLiveClients(pScreenPriv);
+ if (NrClients!=PrevNrClients)
+ {
+ PrevNrClients=NrClients;
+ winInitNotifyIcon (pScreenPriv, TRUE);
+ }
+ }
+ break;
case WM_LBUTTONUP:
/* Restack and bring all windows to top */
SetForegroundWindow (hwnd);
diff --git a/xorg-server/hw/xwin/winwin32rootless.c b/xorg-server/hw/xwin/winwin32rootless.c
index 5049e40b5..e1c2da7f4 100644
--- a/xorg-server/hw/xwin/winwin32rootless.c
+++ b/xorg-server/hw/xwin/winwin32rootless.c
@@ -83,7 +83,7 @@ Bool
winMWExtWMQueryDIBFormat (win32RootlessWindowPtr pRLWinPriv, BITMAPINFOHEADER *pbmih)
{
HBITMAP hbmp;
-#if CYGMULTIWINDOW_DEBUG
+#ifdef _DEBUG
LPDWORD pdw = NULL;
#endif
@@ -112,7 +112,7 @@ winMWExtWMQueryDIBFormat (win32RootlessWindowPtr pRLWinPriv, BITMAPINFOHEADER *p
return FALSE;
}
-#if CYGMULTIWINDOW_DEBUG
+#ifdef _DEBUG
/* Get a pointer to bitfields */
pdw = (DWORD*) ((CARD8*)pbmih + sizeof (BITMAPINFOHEADER));
@@ -228,10 +228,8 @@ winMWExtWMCreateFrame (RootlessWindowPtr pFrame, ScreenPtr pScreen,
char *res_name, *res_class, *res_role;
static int s_iWindowID = 0;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMCreateFrame %d %d - %d %d\n",
newX, newY, pFrame->width, pFrame->height);
-#endif
pRLWinPriv = (win32RootlessWindowPtr) malloc (sizeof (win32RootlessWindowRec));
pRLWinPriv->pFrame = pFrame;
@@ -282,9 +280,7 @@ winMWExtWMCreateFrame (RootlessWindowPtr pFrame, ScreenPtr pScreen,
pszWindowID[sizeof(pszWindowID)-1] = 0;
strcat (pszClass, pszWindowID);
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winCreateWindowsWindow - Creating class: %s\n", pszClass);
-#endif
/* Setup our window class */
wc.cbSize = sizeof(wc);
@@ -322,9 +318,7 @@ winMWExtWMCreateFrame (RootlessWindowPtr pFrame, ScreenPtr pScreen,
fResult = FALSE;
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMCreateFrame - ShowWindow\n");
-#endif
//ShowWindow (pRLWinPriv->hWnd, SW_SHOWNOACTIVATE);
g_fNoConfigureWindow = FALSE;
@@ -334,28 +328,8 @@ winMWExtWMCreateFrame (RootlessWindowPtr pFrame, ScreenPtr pScreen,
winMWExtWMReshapeFrame (pFrame->wid, pShape);
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMCreateFrame - (%08x) %08x\n",
(int) pFrame->wid, (int) pRLWinPriv->hWnd);
-#if 0
- {
- WindowPtr pWin2 = NULL;
- win32RootlessWindowPtr pRLWinPriv2 = NULL;
-
- /* Check if the Windows window property for our X window pointer is valid */
- if ((pWin2 = (WindowPtr)GetProp (pRLWinPriv->hWnd, WIN_WINDOW_PROP)) != NULL)
- {
- pRLWinPriv2 = (win32RootlessWindowPtr) RootlessFrameForWindow (pWin2, FALSE);
- }
- winDebug ("winMWExtWMCreateFrame2 (%08x) %08x\n",
- pRLWinPriv2, pRLWinPriv2->hWnd);
- if (pRLWinPriv != pRLWinPriv2 || pRLWinPriv->hWnd != pRLWinPriv2->hWnd)
- {
- winDebug ("Error param missmatch\n");
- }
- }
-#endif
-#endif
winMWExtWMSetNativeProperty (pFrame);
@@ -372,29 +346,8 @@ winMWExtWMDestroyFrame (RootlessFrameID wid)
int iReturn;
char pszClass[CLASS_NAME_LENGTH];
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMDestroyFrame (%08x) %08x\n",
(int) pRLWinPriv, (int) pRLWinPriv->hWnd);
-#if 0
- {
- WindowPtr pWin2 = NULL;
- win32RootlessWindowPtr pRLWinPriv2 = NULL;
-
- /* Check if the Windows window property for our X window pointer is valid */
- if ((pWin2 = (WindowPtr)GetProp (pRLWinPriv->hWnd, WIN_WINDOW_PROP)) != NULL)
- {
- pRLWinPriv2 = (win32RootlessWindowPtr) RootlessFrameForWindow (pWin2, FALSE);
- }
- winDebug ("winMWExtWMDestroyFrame2 (%08x) %08x\n",
- pRLWinPriv2, pRLWinPriv2->hWnd);
- if (pRLWinPriv != pRLWinPriv2 || pRLWinPriv->hWnd != pRLWinPriv2->hWnd)
- {
- winDebug ("Error param missmatch\n");
- *(int*)0 = 1;//raise exseption
- }
- }
-#endif
-#endif
/* Store the info we need to destroy after this window is gone */
hInstance = (HINSTANCE) GetClassLongPtr (pRLWinPriv->hWnd, GCLP_HMODULE);
@@ -411,22 +364,16 @@ winMWExtWMDestroyFrame (RootlessFrameID wid)
/* Only if we were able to get the name */
if (iReturn)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMDestroyFrame - Unregistering %s: ", pszClass);
-#endif
iReturn = UnregisterClass (pszClass, hInstance);
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMDestroyFramew - %d Deleting Icon: ", iReturn);
-#endif
-
- winDestroyIcon(hiconClass);
- winDestroyIcon(hiconSmClass);
}
-#if CYGMULTIWINDOW_DEBUG
+ winDestroyIcon(hiconClass);
+ winDestroyIcon(hiconSmClass);
+
winDebug ("winMWExtWMDestroyFrame - done\n");
-#endif
}
void
@@ -438,9 +385,7 @@ winMWExtWMMoveFrame (RootlessFrameID wid, ScreenPtr pScreen, int iNewX, int iNew
DWORD dwStyle;
int iX, iY, iWidth, iHeight;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMMoveFrame (%08x) (%d %d)\n", (int) pRLWinPriv, iNewX, iNewY);
-#endif
/* Get the Windows window style and extended style */
dwExStyle = GetWindowLongPtr (pRLWinPriv->hWnd, GWL_EXSTYLE);
@@ -457,29 +402,23 @@ winMWExtWMMoveFrame (RootlessFrameID wid, ScreenPtr pScreen, int iNewX, int iNew
/* Store the origin, height, and width in a rectangle structure */
SetRect (&rcNew, iX, iY, iX + iWidth, iY + iHeight);
-#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindow {%d, %d, %d, %d}, {%d, %d}\n",
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
-#endif
/*
* Calculate the required size of the Windows window rectangle,
* given the size of the Windows window client area.
*/
AdjustWindowRectEx (&rcNew, dwStyle, FALSE, dwExStyle);
-#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tAdjusted {%d, %d, %d, %d}, {%d, %d}\n",
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
-#endif
g_fNoConfigureWindow = TRUE;
SetWindowPos (pRLWinPriv->hWnd, NULL, rcNew.left, rcNew.top, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER);
g_fNoConfigureWindow = FALSE;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMMoveFrame (%08x) done\n", (int) pRLWinPriv);
-#endif
}
void
@@ -495,10 +434,8 @@ winMWExtWMResizeFrame (RootlessFrameID wid, ScreenPtr pScreen,
DWORD dwStyle;
int iX, iY;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMResizeFrame (%08x) (%d %d)-(%d %d)\n",
(int) pRLWinPriv, iNewX, iNewY, uiNewWidth, uiNewHeight);
-#endif
pRLWinPriv->fResized = TRUE;
@@ -547,9 +484,9 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
HWND hWnd;
Bool fFirst = TRUE;
Bool fNeedRestack = TRUE;
-#if CYGMULTIWINDOW_DEBUG
+
winDebug ("winMWExtWMRestackFrame (%08x)\n", (int) pRLWinPriv);
-#endif
+
if (pScreenPriv->fRestacking) return;
@@ -563,19 +500,17 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
if (pRLNextWinPriv == NULL)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("Win %08x is top\n", pRLWinPriv);
-#endif
pScreenPriv->widTop = wid;
SetWindowPos (pRLWinPriv->hWnd, HWND_TOP,
0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
}
+#ifdef XWIN_MULTIWINDOWINTWM
else if (winIsInternalWMRunning(pScreenInfo))
{
/* using mulwinidow wm */
-#if CYGMULTIWINDOW_DEBUG
winDebug ("Win %08x is not top\n", pRLWinPriv);
-#endif
+
for (hWnd = GetNextWindow (pRLWinPriv->hWnd, GW_HWNDPREV);
fNeedRestack && hWnd != NULL;
hWnd = GetNextWindow (hWnd, GW_HWNDPREV))
@@ -590,18 +525,15 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
/* Enable interleave X window and Windows window */
if (!fFirst)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("raise: Insert after Win %08x\n", pRLNextWinPriv);
-#endif
+
SetWindowPos (pRLWinPriv->hWnd, pRLNextWinPriv->hWnd,
0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
}
else
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("No change\n");
-#endif
}
fNeedRestack = FALSE;
break;
@@ -621,9 +553,8 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
{
if (hWnd == pRLNextWinPriv->hWnd)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("lower: Insert after Win %08x\n", pRLNextWinPriv);
-#endif
+
SetWindowPos (pRLWinPriv->hWnd, pRLNextWinPriv->hWnd,
0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
@@ -633,19 +564,16 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
}
}
}
- else
+#endif
+ else
{
/* using general wm like twm, wmaker etc.
Interleave X window and Windows window will cause problem. */
SetWindowPos (pRLWinPriv->hWnd, pRLNextWinPriv->hWnd,
0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
-#if 0
-#endif
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMRestackFrame - done (%08x)\n", (int) pRLWinPriv);
-#endif
pRLWinPriv->fRestackingNow = FALSE;
}
@@ -656,9 +584,8 @@ winMWExtWMReshapeFrame (RootlessFrameID wid, RegionPtr pShape)
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
HRGN hRgn, hRgnWindow, hRgnClient;
RECT rcWindow, rcClient;
-#if CYGMULTIWINDOW_DEBUG
+
winDebug ("winMWExtWMReshapeFrame (%08x)\n", (int) pRLWinPriv);
-#endif
hRgn = winMWExtWMCreateRgnFromRegion (pShape);
@@ -685,9 +612,8 @@ void
winMWExtWMUnmapFrame (RootlessFrameID wid)
{
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-#if CYGMULTIWINDOW_DEBUG
+
winDebug ("winMWExtWMUnmapFrame (%08x)\n", (int) pRLWinPriv);
-#endif
g_fNoConfigureWindow = TRUE;
//ShowWindow (pRLWinPriv->hWnd, SW_MINIMIZE);
@@ -709,9 +635,8 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
Bool fReturn = TRUE;
HDC hdcNew;
HBITMAP hbmpNew;
-#if CYGMULTIWINDOW_DEBUG
+
winDebug ("winMWExtWMStartDrawing (%08x) %08x\n", (int) pRLWinPriv, pRLWinPriv->fDestroyed);
-#endif
if (!pRLWinPriv->fDestroyed)
{
@@ -719,12 +644,11 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
if (pScreen) pScreenPriv = winGetScreenPriv(pScreen);
if (pScreenPriv) pScreenInfo = pScreenPriv->pScreenInfo;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tpScreenPriv %08X\n", (int) pScreenPriv);
winDebug ("\tpScreenInfo %08X\n", (int) pScreenInfo);
winDebug ("\t(%d, %d)\n", (int)pRLWinPriv->pFrame->width,
(int) pRLWinPriv->pFrame->height);
-#endif
+
if (pRLWinPriv->hdcScreen == NULL)
{
InitWin32RootlessEngine (pRLWinPriv);
@@ -764,15 +688,12 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
}
else
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMStartDrawing - Shadow buffer allocated\n");
-#endif
}
/* Get information about the bitmap that was allocated */
GetObject (hbmpNew, sizeof (dibsection), &dibsection);
-#if CYGMULTIWINDOW_DEBUG
/* Print information about bitmap allocated */
winDebug ("winMWExtWMStartDrawing - Dibsection width: %d height: %d "
"depth: %d size image: %d\n",
@@ -780,14 +701,11 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
(unsigned int)dibsection.dsBmih.biHeight,
(unsigned int)dibsection.dsBmih.biBitCount,
(unsigned int)dibsection.dsBmih.biSizeImage);
-#endif
/* Select the shadow bitmap into the shadow DC */
SelectObject (hdcNew, hbmpNew);
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMStartDrawing - Attempting a shadow blit\n");
-#endif
/* Blit from the old shadow to the new shadow */
fReturn = BitBlt (hdcNew,
@@ -798,9 +716,7 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
SRCCOPY);
if (fReturn)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMStartDrawing - Shadow blit success\n");
-#endif
}
else
{
@@ -821,10 +737,8 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
pRLWinPriv->dwWidthBytes = dibsection.dsBm.bmWidthBytes;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMStartDrawing - bytesPerRow: %d\n",
(unsigned int)dibsection.dsBm.bmWidthBytes);
-#endif
/* Free the old shadow bitmap */
DeleteObject (pRLWinPriv->hdcShadow);
@@ -834,22 +748,18 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
pRLWinPriv->hbmpShadow = hbmpNew;
pRLWinPriv->fResized = FALSE;
-#if CYGMULTIWINDOW_DEBUG && FALSE
winDebug ("winMWExtWMStartDrawing - 0x%08x %d\n",
(unsigned int)pRLWinPriv->pfb,
(unsigned int)dibsection.dsBm.bmWidthBytes);
-#endif
}
}
else
{
ErrorF ("winMWExtWMStartDrawing - Already window was destroyed \n");
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMStartDrawing - done (0x%08x) 0x%08x %d\n",
(int) pRLWinPriv,
(unsigned int)pRLWinPriv->pfb, (unsigned int)pRLWinPriv->dwWidthBytes);
-#endif
*pixelData = pRLWinPriv->pfb;
*bytesPerRow = pRLWinPriv->dwWidthBytes;
}
@@ -857,77 +767,12 @@ winMWExtWMStartDrawing (RootlessFrameID wid, char **pixelData, int *bytesPerRow)
void
winMWExtWMStopDrawing (RootlessFrameID wid, Bool fFlush)
{
-#if 0
- win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
- BLENDFUNCTION bfBlend;
- SIZE szWin;
- POINT ptSrc;
-#if CYGMULTIWINDOW_DEBUG || TRUE
- winDebug ("winMWExtWMStopDrawing (%08x)\n", pRLWinPriv);
-#endif
- szWin.cx = pRLWinPriv->dwWidth;
- szWin.cy = pRLWinPriv->dwHeight;
- ptSrc.x = 0;
- ptSrc.y = 0;
- bfBlend.BlendOp = AC_SRC_OVER;
- bfBlend.BlendFlags = 0;
- bfBlend.SourceConstantAlpha = 255;
- bfBlend.AlphaFormat = AC_SRC_ALPHA;
-
- if (!UpdateLayeredWindow (pRLWinPriv->hWnd,
- NULL, NULL, &szWin,
- pRLWinPriv->hdcShadow, &ptSrc,
- 0, &bfBlend, ULW_ALPHA))
- {
- ErrorF ("winMWExtWMStopDrawing - UpdateLayeredWindow failed\n");
- }
-#endif
}
void
winMWExtWMUpdateRegion (RootlessFrameID wid, RegionPtr pDamage)
{
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-#if 0
- BLENDFUNCTION bfBlend;
- SIZE szWin;
- POINT ptSrc;
-#endif
-#if CYGMULTIWINDOW_DEBUG && 0
- winDebug ("winMWExtWMUpdateRegion (%08x)\n", pRLWinPriv);
-#endif
-#if 0
- szWin.cx = pRLWinPriv->dwWidth;
- szWin.cy = pRLWinPriv->dwHeight;
- ptSrc.x = 0;
- ptSrc.y = 0;
- bfBlend.BlendOp = AC_SRC_OVER;
- bfBlend.BlendFlags = 0;
- bfBlend.SourceConstantAlpha = 255;
- bfBlend.AlphaFormat = AC_SRC_ALPHA;
-
- if (!UpdateLayeredWindow (pRLWinPriv->hWnd,
- NULL, NULL, &szWin,
- pRLWinPriv->hdcShadow, &ptSrc,
- 0, &bfBlend, ULW_ALPHA))
- {
- LPVOID lpMsgBuf;
-
- /* Display a fancy error message */
- FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- GetLastError (),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &lpMsgBuf,
- 0, NULL);
-
- ErrorF ("winMWExtWMUpdateRegion - UpdateLayeredWindow failed: %s\n",
- (LPSTR)lpMsgBuf);
- LocalFree (lpMsgBuf);
- }
-#endif
if (!g_fNoConfigureWindow) UpdateWindow (pRLWinPriv->hWnd);
}
@@ -937,10 +782,8 @@ winMWExtWMDamageRects (RootlessFrameID wid, int nCount, const BoxRec *pRects,
{
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
const BoxRec *pEnd;
-#if CYGMULTIWINDOW_DEBUG && 0
winDebug ("winMWExtWMDamageRects (%08x, %d, %08x, %d, %d)\n",
pRLWinPriv, nCount, pRects, shift_x, shift_y);
-#endif
for (pEnd = pRects + nCount; pRects < pEnd; pRects++) {
RECT rcDmg;
@@ -957,10 +800,8 @@ void
winMWExtWMRootlessSwitchWindow (RootlessWindowPtr pFrame, WindowPtr oldWin)
{
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) pFrame->wid;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMRootlessSwitchWindow (%08x) %08x\n",
(int) pRLWinPriv, (int) pRLWinPriv->hWnd);
-#endif
pRLWinPriv->pFrame = pFrame;
pRLWinPriv->fResized = TRUE;
@@ -973,26 +814,6 @@ winMWExtWMRootlessSwitchWindow (RootlessWindowPtr pFrame, WindowPtr oldWin)
DeleteProperty (serverClient, oldWin, AtmWindowsWmNativeHwnd ());
winMWExtWMSetNativeProperty (pFrame);
-#if CYGMULTIWINDOW_DEBUG
-#if 0
- {
- WindowPtr pWin2 = NULL;
- win32RootlessWindowPtr pRLWinPriv2 = NULL;
-
- /* Check if the Windows window property for our X window pointer is valid */
- if ((pWin2 = (WindowPtr)GetProp (pRLWinPriv->hWnd, WIN_WINDOW_PROP)) != NULL)
- {
- pRLWinPriv2 = (win32RootlessWindowPtr) RootlessFrameForWindow (pWin2, FALSE);
- }
- winDebug ("winMWExtWMSwitchFrame2 (%08x) %08x\n",
- pRLWinPriv2, pRLWinPriv2->hWnd);
- if (pRLWinPriv != pRLWinPriv2 || pRLWinPriv->hWnd != pRLWinPriv2->hWnd)
- {
- winDebug ("Error param missmatch\n");
- }
- }
-#endif
-#endif
}
void
@@ -1000,9 +821,7 @@ winMWExtWMCopyBytes (unsigned int width, unsigned int height,
const void *src, unsigned int srcRowBytes,
void *dst, unsigned int dstRowBytes)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMCopyBytes - Not implemented\n");
-#endif
}
void
@@ -1012,21 +831,17 @@ winMWExtWMCopyWindow (RootlessFrameID wid, int nDstRects, const BoxRec *pDstRect
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
const BoxRec *pEnd;
RECT rcDmg;
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMCopyWindow (%08x, %d, %08x, %d, %d)\n",
(int) pRLWinPriv, nDstRects, (int) pDstRects, nDx, nDy);
-#endif
for (pEnd = pDstRects + nDstRects; pDstRects < pEnd; pDstRects++)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("BitBlt (%d, %d, %d, %d) (%d, %d)\n",
pDstRects->x1, pDstRects->y1,
pDstRects->x2 - pDstRects->x1,
pDstRects->y2 - pDstRects->y1,
pDstRects->x1 + nDx,
pDstRects->y1 + nDy);
-#endif
if (!BitBlt (pRLWinPriv->hdcShadow,
pDstRects->x1, pDstRects->y1,
@@ -1046,9 +861,7 @@ winMWExtWMCopyWindow (RootlessFrameID wid, int nDstRects, const BoxRec *pDstRect
InvalidateRect (pRLWinPriv->hWnd, &rcDmg, FALSE);
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMCopyWindow - done\n");
-#endif
}
diff --git a/xorg-server/hw/xwin/winwin32rootlesswindow.c b/xorg-server/hw/xwin/winwin32rootlesswindow.c
index 60e1f8bea..bfb35e70f 100644
--- a/xorg-server/hw/xwin/winwin32rootlesswindow.c
+++ b/xorg-server/hw/xwin/winwin32rootlesswindow.c
@@ -230,23 +230,18 @@ winMWExtWMUpdateWindowDecoration (win32RootlessWindowPtr pRLWinPriv,
/* Get current window placement */
GetWindowPlacement (pRLWinPriv->hWnd, &wndPlace);
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
if (!pRLWinPriv->pFrame->win->overrideRedirect)
fDecorate = TRUE;
}
-#if 0
- if (wndPlace.showCmd == SW_HIDE)
- return;//showCmd = SWP_HIDEWINDOW;
- else
- showCmd = SWP_SHOWWINDOW;
-#else
+#endif
if (wndPlace.showCmd == SW_HIDE)
return;
if (IsWindowVisible (pRLWinPriv->hWnd))
showCmd = SWP_SHOWWINDOW;
-#endif
showCmd |= SWP_NOMOVE | SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOZORDER;
@@ -388,7 +383,7 @@ winMWExtWMUpdateWindowDecoration (win32RootlessWindowPtr pRLWinPriv,
}
}
-
+#ifdef XWIN_MULTIWINDOWINTWM
/*
* winIsInternalWMRunning (winScreenInfoPtr pScreenInfo)
*/
@@ -397,7 +392,7 @@ winIsInternalWMRunning (winScreenInfoPtr pScreenInfo)
{
return pScreenInfo->fInternalWM && !pScreenInfo->fAnotherWMRunning;
}
-
+#endif
/*
* winMWExtWMRestackWindows
diff --git a/xorg-server/hw/xwin/winwin32rootlesswndproc.c b/xorg-server/hw/xwin/winwin32rootlesswndproc.c
index 47a1abe73..c8a6e66c3 100644
--- a/xorg-server/hw/xwin/winwin32rootlesswndproc.c
+++ b/xorg-server/hw/xwin/winwin32rootlesswndproc.c
@@ -433,7 +433,6 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
wmMsg.iHeight = pRLWinPriv->pFrame->height;
fWMMsgInitialized = TRUE;
-#if CYGDEBUG
winDebugWin32Message("winMWExtWMWindowProc", hwnd, message, wParam, lParam);
winDebug ("\thWnd %08X\n", hwnd);
@@ -442,7 +441,6 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
winDebug ("\thwndScreen %08X\n", hwndScreen);
winDebug ("winMWExtWMWindowProc (%08x) %08x %08x %08x\n",
pRLWinPriv, message, wParam, lParam);
-#endif
}
/* Branch on message type */
switch (message)
@@ -458,9 +456,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
return 0;
case WM_CLOSE:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_CLOSE %d\n", pRLWinPriv->fClose);
-#endif
+
/* Tell window-manager to close window */
if (pRLWinPriv->fClose)
{
@@ -468,6 +465,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
}
else
{
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
/* Tell our Window Manager thread to kill the window */
@@ -475,6 +473,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (fWMMsgInitialized)
winSendMessageToWM (pScreenPriv->pWMInfo, &wmMsg);
}
+#endif
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -694,23 +693,24 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
return 0;
case WM_MOUSEACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_MOUSEACTIVATE\n");
-#endif
-#if 1
+
+#ifdef XWIN_MULTIWINDOWINTWM
/* Check if this window needs to be made active when clicked */
if (winIsInternalWMRunning(pScreenInfo) && pWin->overrideRedirect)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_MOUSEACTIVATE - "
"MA_NOACTIVATE\n");
-#endif
/* */
return MA_NOACTIVATE;
}
#endif
- if (!winIsInternalWMRunning(pScreenInfo) && !IsMouseActive (pWin))
+ if (
+#ifdef XWIN_MULTIWINDOWINTWM
+ !winIsInternalWMRunning(pScreenInfo) &&
+#endif
+ !IsMouseActive (pWin))
return MA_NOACTIVATE;
break;
@@ -776,9 +776,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
return 0;
case WM_ERASEBKGND:
-#if CYGDEBUG
winDebug ("winMWExtWMWindowProc - WM_ERASEBKGND\n");
-#endif
/*
* Pretend that we did erase the background but we don't care,
* since we repaint the entire region anyhow
@@ -822,11 +820,10 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
break;
case WM_ACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_ACTIVATE\n");
-#endif
if (LOWORD(wParam) != WA_INACTIVE)
{
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
#if 0
@@ -841,6 +838,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (!pWin || !pWin->overrideRedirect) /* for OOo menus */
winSendMessageToWM (pScreenPriv->pWMInfo, &wmMsg);
}
+#endif
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -858,24 +856,23 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
{
if (pRLWinPriv->fRestackingNow || pScreenPriv->fRestacking)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("Win %08x is now restacking.\n", (unsigned int)pRLWinPriv);
-#endif
break;
}
- if (winIsInternalWMRunning(pScreenInfo) || IsRaiseOnClick (pWin))
+ if (
+#ifdef XWIN_MULTIWINDOWINTWM
+ winIsInternalWMRunning(pScreenInfo) ||
+#endif
+ IsRaiseOnClick (pWin))
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("Win %08x has WINDOWSWM_RAISE_ON_CLICK.\n", (unsigned int)pRLWinPriv);
-#endif
break;
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("Win %08x forbid to change z order (%08x).\n",
(unsigned int)pRLWinPriv, (unsigned int)pWinPos->hwndInsertAfter);
-#endif
+
pWinPos->flags |= SWP_NOZORDER;
}
break;
@@ -908,14 +905,14 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
}
#endif
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\t(%d, %d)\n", (short) LOWORD(lParam), (short) HIWORD(lParam));
-#endif
+
if (!pRLWinPriv->fMovingOrSizing)
{
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMMoveXWindow (pWin,
(LOWORD(lParam) - wBorderWidth (pWin)
- GetSystemMetrics (SM_XVIRTUALSCREEN)),
@@ -925,14 +922,14 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
return 0;
case WM_SHOWWINDOW:
-#if CYGMULTIWINDOW_DEBUG || TRUE
winDebug ("winMWExtWMWindowProc - WM_SHOWWINDOW - %d ms\n",
(unsigned int)GetTickCount ());
-#endif
+
/* Bail out if the window is being hidden */
if (!wParam)
return 0;
+#ifdef XWIN_MULTIWINDOWINTWM
if (!pScreenInfo->fInternalWM)//XXXX
return 0;
@@ -940,9 +937,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (winIsInternalWMRunning(pScreenInfo))
{
-#if CYGMULTIWINDOW_DEBUG || TRUE
winDebug ("\tMapWindow\n");
-#endif
+
/* Tell X to map the window */
MapWindow (pWin, wClient(pWin));
@@ -959,6 +955,9 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (fWMMsgInitialized)
winSendMessageToWM (pScreenPriv->pWMInfo, &wmMsg);
}
+#else
+ return 0;
+#endif
break;
case WM_SIZING:
@@ -969,7 +968,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
case WM_WINDOWPOSCHANGED:
{
pWinPos = (LPWINDOWPOS) lParam;
-#if CYGMULTIWINDOW_DEBUG
+#ifdef _DEBUG
winDebug("winMWExtWMWindowProc - WM_WINDOWPOSCHANGED\n");
winDebug("\tflags: %s%s%s%s%s%s%s%s%s%s%s%s\n",
(pWinPos->flags & SWP_DRAWFRAME)?"SWP_DRAWFRAME ":"",
@@ -991,22 +990,21 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
#endif
if (pWinPos->flags & SWP_HIDEWINDOW) break;
+#ifdef XWIN_MULTIWINDOWINTWM
/* Reorder if window z order was changed */
if ((pScreenPriv != NULL)
&& !(pWinPos->flags & SWP_NOZORDER)
&& !(pWinPos->flags & SWP_SHOWWINDOW)
&& winIsInternalWMRunning(pScreenInfo))
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\twindow z order was changed\n");
-#endif
+
if (pWinPos->hwndInsertAfter == HWND_TOP
||pWinPos->hwndInsertAfter == HWND_TOPMOST
||pWinPos->hwndInsertAfter == HWND_NOTOPMOST)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\traise to top\n");
-#endif
+
/* Raise the window to the top in Z order */
wmMsg.msg = WM_WM_RAISE;
if (fWMMsgInitialized)
@@ -1040,9 +1038,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
raise it in X stack. */
if (hWndAbove == NULL)
{
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\traise to top\n");
-#endif
+
/* Raise the window to the top in Z order */
wmMsg.msg = WM_WM_RAISE;
if (fWMMsgInitialized)
@@ -1051,12 +1048,12 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
}
#endif
}
+#endif
if (!(pWinPos->flags & SWP_NOSIZE)) {
if (IsIconic(hwnd)){
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tIconic -> MINIMIZED\n");
-#endif
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
/* Raise the window to the top in Z order */
@@ -1064,6 +1061,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (fWMMsgInitialized)
winSendMessageToWM (pScreenPriv->pWMInfo, &wmMsg);
}
+#endif
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -1071,9 +1069,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
pWin->drawable.id,
0, 0, 0, 0);
} else if (IsZoomed(hwnd)){
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tZoomed -> MAXIMIZED\n");
-#endif
+
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -1081,9 +1078,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
pWin->drawable.id,
0, 0, 0, 0);
} else {
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tnone -> RESTORED\n");
-#endif
+
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -1101,12 +1097,12 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (!(pWinPos->flags & SWP_NOMOVE)
&&!(pWinPos->flags & SWP_NOSIZE)) {
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tmove & resize\n");
-#endif
+
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMMoveResizeXWindow (pWin,
rcClient.left - wBorderWidth (pWin)
- GetSystemMetrics (SM_XVIRTUALSCREEN),
@@ -1117,12 +1113,11 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
rcClient.bottom - rcClient.top
- wBorderWidth (pWin)*2);
} else if (!(pWinPos->flags & SWP_NOMOVE)) {
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tmove\n");
-#endif
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMMoveResizeXWindow (pWin,
rcClient.left - wBorderWidth (pWin)
- GetSystemMetrics (SM_XVIRTUALSCREEN),
@@ -1133,24 +1128,23 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
rcClient.bottom - rcClient.top
- wBorderWidth (pWin)*2);
} else if (!(pWinPos->flags & SWP_NOMOVE)) {
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tmove\n");
-#endif
+
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMMoveXWindow (pWin,
rcClient.left - wBorderWidth (pWin)
- GetSystemMetrics (SM_XVIRTUALSCREEN),
rcClient.top - wBorderWidth (pWin)
- GetSystemMetrics (SM_YVIRTUALSCREEN));
} else if (!(pWinPos->flags & SWP_NOSIZE)) {
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tresize\n");
-#endif
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMResizeXWindow (pWin,
rcClient.right - rcClient.left
- wBorderWidth (pWin)*2,
@@ -1160,30 +1154,27 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
}
}
}
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_WINDOWPOSCHANGED - done.\n");
-#endif
+
return 0;
case WM_SIZE:
/* see dix/window.c */
/* FIXME: Maximize/Restore? */
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_SIZE - %d ms\n",
(unsigned int)GetTickCount ());
-#endif
-#if CYGMULTIWINDOW_DEBUG
+
winDebug ("\t(%d, %d) %d\n", (short) LOWORD(lParam), (short) HIWORD(lParam), g_fNoConfigureWindow);
-#endif
+
if (g_fNoConfigureWindow) break;
/* Branch on type of resizing occurring */
switch (wParam)
{
case SIZE_MINIMIZED:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tSIZE_MINIMIZED\n");
-#endif
+
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
/* Raise the window to the top in Z order */
@@ -1191,6 +1182,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (fWMMsgInitialized)
winSendMessageToWM (pScreenPriv->pWMInfo, &wmMsg);
}
+#endif
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -1201,9 +1193,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
break;
case SIZE_RESTORED:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("\tSIZE_RESTORED\n");
-#endif
+
winWindowsWMSendEvent(WindowsWMControllerNotify,
WindowsWMControllerNotifyMask,
1,
@@ -1230,9 +1221,10 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
/* Perform the resize and notify the X client */
if (!pRLWinPriv->fMovingOrSizing)
{
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
-
+#endif
winMWExtWMResizeXWindow (pWin,
(short) LOWORD(lParam)
- wBorderWidth (pWin)*2,
@@ -1248,12 +1240,14 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
#endif
if (wParam)
{
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
{
}
else
{
}
+#endif
winWindowsWMSendEvent(WindowsWMActivationNotify,
WindowsWMActivationNotifyMask,
1,
@@ -1283,26 +1277,26 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
break;
case WM_ENTERSIZEMOVE:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_ENTERSIZEMOVE - %d ms\n",
(unsigned int)GetTickCount ());
-#endif
+
pRLWinPriv->fMovingOrSizing = TRUE;
break;
case WM_EXITSIZEMOVE:
-#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMWindowProc - WM_EXITSIZEMOVE - %d ms\n",
(unsigned int)GetTickCount ());
-#endif
+
pRLWinPriv->fMovingOrSizing = FALSE;
GetClientRect (hwnd, &rcClient);
MapWindowPoints (hwnd, HWND_DESKTOP, (LPPOINT)&rcClient, 2);
+#ifdef XWIN_MULTIWINDOWINTWM
if (winIsInternalWMRunning(pScreenInfo))
winAdjustXWindow (pWin, hwnd);
+#endif
winMWExtWMMoveResizeXWindow (pWin,
rcClient.left - wBorderWidth (pWin)
@@ -1316,11 +1310,11 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
break;
case WM_MANAGE:
- ErrorF ("winMWExtWMWindowProc - WM_MANAGE\n");
+ winDebug ("winMWExtWMWindowProc - WM_MANAGE\n");
break;
case WM_UNMANAGE:
- ErrorF ("winMWExtWMWindowProc - WM_UNMANAGE\n");
+ winDebug ("winMWExtWMWindowProc - WM_UNMANAGE\n");
break;
default:
diff --git a/xorg-server/hw/xwin/winwindow.c b/xorg-server/hw/xwin/winwindow.c
index 7975d71a9..b83ea9485 100644
--- a/xorg-server/hw/xwin/winwindow.c
+++ b/xorg-server/hw/xwin/winwindow.c
@@ -63,9 +63,7 @@ winCreateWindowNativeGDI (WindowPtr pWin)
winWindowPriv(pWin);
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winCreateWindowNativeGDI (%p)\n", pWin);
-#endif
+ winDebug ("winCreateWindowNativeGDI (%p)\n", pWin);
WIN_UNWRAP(CreateWindow);
fResult = (*pScreen->CreateWindow) (pWin);
@@ -86,9 +84,7 @@ winDestroyWindowNativeGDI (WindowPtr pWin)
winWindowPriv(pWin);
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winDestroyWindowNativeGDI (%p)\n", pWin);
-#endif
+ winDebug ("winDestroyWindowNativeGDI (%p)\n", pWin);
WIN_UNWRAP(DestroyWindow);
fResult = (*pScreen->DestroyWindow)(pWin);
@@ -109,9 +105,7 @@ winPositionWindowNativeGDI (WindowPtr pWin, int x, int y)
winWindowPriv(pWin);
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winPositionWindowNativeGDI (%p)\n", pWin);
-#endif
+ winDebug ("winPositionWindowNativeGDI (%p)\n", pWin);
WIN_UNWRAP(PositionWindow);
fResult = (*pScreen->PositionWindow)(pWin, x, y);
@@ -140,10 +134,6 @@ winCopyWindowNativeGDI (WindowPtr pWin,
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if 0
- ErrorF ("winCopyWindow\n");
-#endif
-
/* Get a pointer to the root window */
pwinRoot = pWin->drawable.pScreen->root;
@@ -183,19 +173,9 @@ winCopyWindowNativeGDI (WindowPtr pWin,
pBoxDst = RegionRects(prgnDst);
ppt = pptSrc;
-#if 0
- ErrorF ("winCopyWindow - x1\tx2\ty1\ty2\tx\ty\n");
-#endif
-
/* BitBlt each source to the destination point */
for (i = nbox; --i >= 0; pBoxDst++, ppt++)
{
-#if 0
- ErrorF ("winCopyWindow - %d\t%d\t%d\t%d\t%d\t%d\n",
- pBoxDst->x1, pBoxDst->x2, pBoxDst->y1, pBoxDst->y2,
- ppt->x, ppt->y);
-#endif
-
BitBlt (pScreenPriv->hdcScreen,
pBoxDst->x1, pBoxDst->y1,
pBoxDst->x2 - pBoxDst->x1, pBoxDst->y2 - pBoxDst->y1,
@@ -221,9 +201,7 @@ winChangeWindowAttributesNativeGDI (WindowPtr pWin, unsigned long mask)
winWindowPriv(pWin);
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winChangeWindowAttributesNativeGDI (%p)\n", pWin);
-#endif
+ winDebug ("winChangeWindowAttributesNativeGDI (%p)\n", pWin);
WIN_UNWRAP(ChangeWindowAttributes);
fResult = (*pScreen->ChangeWindowAttributes)(pWin, mask);
@@ -249,9 +227,7 @@ winUnmapWindowNativeGDI (WindowPtr pWin)
winWindowPriv(pWin);
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winUnmapWindowNativeGDI (%p)\n", pWin);
-#endif
+ winDebug ("winUnmapWindowNativeGDI (%p)\n", pWin);
WIN_UNWRAP(UnrealizeWindow);
fResult = (*pScreen->UnrealizeWindow)(pWin);
@@ -273,9 +249,7 @@ winMapWindowNativeGDI (WindowPtr pWin)
winWindowPriv(pWin);
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winMapWindowNativeGDI (%p)\n", pWin);
-#endif
+ winDebug ("winMapWindowNativeGDI (%p)\n", pWin);
WIN_UNWRAP(RealizeWindow);
fResult = (*pScreen->RealizeWindow)(pWin);
@@ -298,9 +272,7 @@ winCreateWindowRootless (WindowPtr pWin)
winWindowPriv(pWin);
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winCreateWindowRootless (%p)\n", pWin);
-#endif
+ winDebug ("winCreateWindowRootless (%p)\n", pWin);
WIN_UNWRAP(CreateWindow);
fResult = (*pScreen->CreateWindow) (pWin);
@@ -323,9 +295,7 @@ winDestroyWindowRootless (WindowPtr pWin)
winWindowPriv(pWin);
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winDestroyWindowRootless (%p)\n", pWin);
-#endif
+ winDebug ("winDestroyWindowRootless (%p)\n", pWin);
WIN_UNWRAP(DestroyWindow);
fResult = (*pScreen->DestroyWindow)(pWin);
@@ -353,10 +323,7 @@ winPositionWindowRootless (WindowPtr pWin, int x, int y)
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-
-#if CYGDEBUG
- winTrace ("winPositionWindowRootless (%p)\n", pWin);
-#endif
+ winDebug ("winPositionWindowRootless (%p)\n", pWin);
WIN_UNWRAP(PositionWindow);
fResult = (*pScreen->PositionWindow)(pWin, x, y);
@@ -378,9 +345,7 @@ winChangeWindowAttributesRootless (WindowPtr pWin, unsigned long mask)
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winChangeWindowAttributesRootless (%p)\n", pWin);
-#endif
+ winDebug ("winChangeWindowAttributesRootless (%p)\n", pWin);
WIN_UNWRAP(ChangeWindowAttributes);
fResult = (*pScreen->ChangeWindowAttributes)(pWin, mask);
@@ -404,9 +369,7 @@ winUnmapWindowRootless (WindowPtr pWin)
winWindowPriv(pWin);
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winUnmapWindowRootless (%p)\n", pWin);
-#endif
+ winDebug ("winUnmapWindowRootless (%p)\n", pWin);
WIN_UNWRAP(UnrealizeWindow);
fResult = (*pScreen->UnrealizeWindow)(pWin);
@@ -435,9 +398,7 @@ winMapWindowRootless (WindowPtr pWin)
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winMapWindowRootless (%p)\n", pWin);
-#endif
+ winDebug ("winMapWindowRootless (%p)\n", pWin);
WIN_UNWRAP(RealizeWindow);
fResult = (*pScreen->RealizeWindow)(pWin);
@@ -457,9 +418,7 @@ winSetShapeRootless (WindowPtr pWin, int kind)
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGDEBUG
- winTrace ("winSetShapeRootless (%p, %i)\n", pWin, kind);
-#endif
+ winDebug ("winSetShapeRootless (%p, %i)\n", pWin, kind);
WIN_UNWRAP(SetShape);
(*pScreen->SetShape)(pWin, kind);
@@ -488,9 +447,7 @@ winAddRgn (WindowPtr pWin, pointer data)
/* If pWin is not Root */
if (pWin->parent != NULL)
{
-#if CYGDEBUG
winDebug ("winAddRgn ()\n");
-#endif
if (pWin->mapped)
{
iBorder = wBorderWidth (pWin);
@@ -505,8 +462,8 @@ winAddRgn (WindowPtr pWin, pointer data)
if (hRgnWin == NULL)
{
- ErrorF ("winAddRgn - CreateRectRgn () failed\n");
- ErrorF (" Rect %d %d %d %d\n",
+ winDebug ("winAddRgn - CreateRectRgn () failed\n");
+ winDebug (" Rect %d %d %d %d\n",
iX, iY, iX + iWidth, iY + iHeight);
}
@@ -570,9 +527,7 @@ winReshapeRootless (WindowPtr pWin)
HRGN hRgn, hRgnRect;
winWindowPriv(pWin);
-#if CYGDEBUG
winDebug ("winReshapeRootless ()\n");
-#endif
/* Bail if the window is the root window */
if (pWin->parent == NULL)
diff --git a/xorg-server/hw/xwin/winwindow.h b/xorg-server/hw/xwin/winwindow.h
index cf2f93f0a..8778fc696 100644
--- a/xorg-server/hw/xwin/winwindow.h
+++ b/xorg-server/hw/xwin/winwindow.h
@@ -41,29 +41,23 @@
/* Constant strings */
#ifndef PROJECT_NAME
-# define PROJECT_NAME "Cygwin/X"
+# define PROJECT_NAME "VcXsrv"
#endif
-#define EXECUTABLE_NAME "XWin"
-#define WINDOW_CLASS "cygwin/x"
-#define WINDOW_TITLE PROJECT_NAME ":%s.%d"
-#define WINDOW_TITLE_XDMCP "%s:%s.%d"
-#define WIN_SCR_PROP "cyg_screen_prop rl"
-#define WINDOW_CLASS_X "cygwin/x X rl"
+#define EXECUTABLE_NAME "VcXsrv"
+#define WINDOW_CLASS "VcXsrv/x"
+#define WINDOW_TITLE PROJECT_NAME " Server - Display %s:%s.%d"
+#define WINDOW_TITLE_XDMCP PROJECT_NAME " Server - %s - Display %s:%s.%d"
+#define WIN_SCR_PROP "vcxsrv_screen_prop rl"
+#define WINDOW_CLASS_X "vcxsrv/x X rl"
#define WINDOW_TITLE_X PROJECT_NAME " X"
-#define WIN_WINDOW_PROP "cyg_window_prop_rl"
+#define WIN_WINDOW_PROP "vcxsrv_window_prop_rl"
#ifdef HAS_DEVWINDOWS
# define WIN_MSG_QUEUE_FNAME "/dev/windows"
#endif
-#define WIN_WID_PROP "cyg_wid_prop_rl"
-#define WIN_NEEDMANAGE_PROP "cyg_override_redirect_prop_rl"
-#ifndef CYGMULTIWINDOW_DEBUG
-#define CYGMULTIWINDOW_DEBUG NO
-#endif
-#ifndef CYGWINDOWING_DEBUG
-#define CYGWINDOWING_DEBUG NO
-#endif
+#define WIN_WID_PROP "vcxsrv_wid_prop_rl"
+#define WIN_NEEDMANAGE_PROP "vcxsrv_override_redirect_prop_rl"
-#define XMING_SIGNATURE 0x12345678L
+#define VCXSRV_SIGNATURE 0xdeaddeadL
typedef struct _winPrivScreenRec *winPrivScreenPtr;
@@ -77,6 +71,8 @@ typedef struct
DWORD dwDummy;
HRGN hRgn;
HWND hWnd;
+ BOOL GlCtxWnd;
+ BOOL OpenGlWindow;
winPrivScreenPtr pScreenPriv;
Bool fXKilled;
@@ -120,6 +116,8 @@ typedef struct _winWMMessageRec{
#define WM_WM_MAP3 (WM_USER + 13)
#define WM_MANAGE (WM_USER + 100)
#define WM_UNMANAGE (WM_USER + 102)
+#define WM_WM_REINIT (WM_USER + 200)
+
#define MwmHintsDecorations (1L << 1)
diff --git a/xorg-server/hw/xwin/winwindowswm.c b/xorg-server/hw/xwin/winwindowswm.c
index 966732a5a..f839171e9 100644
--- a/xorg-server/hw/xwin/winwindowswm.c
+++ b/xorg-server/hw/xwin/winwindowswm.c
@@ -261,10 +261,8 @@ winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg,
WMEventPtr *pHead, pEvent;
ClientPtr client;
xWindowsWMNotifyEvent se;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winWindowsWMSendEvent %d %d %d %d, %d %d - %d %d\n",
+ winDebug ("winWindowsWMSendEvent %d %d %d %d, %d %d - %d %d\n",
type, mask, which, arg, x, y, w, h);
-#endif
dixLookupResourceByType((pointer) &pHead, eventResource, eventResourceType,
NullClient, DixUnknownAccess);
if (!pHead)
@@ -272,16 +270,13 @@ winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg,
for (pEvent = *pHead; pEvent; pEvent = pEvent->next)
{
client = pEvent->client;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winWindowsWMSendEvent - x%08x\n", (int) client);
-#endif
+ winDebug ("winWindowsWMSendEvent - x%08x\n", (int) client);
if ((pEvent->mask & mask) == 0)
{
continue;
}
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winWindowsWMSendEvent - send\n");
-#endif
+ winDebug ("winWindowsWMSendEvent - send\n");
+
se.type = type + WMEventBase;
se.kind = which;
se.window = window;
@@ -341,10 +336,8 @@ ProcWindowsWMFrameGetRect (ClientPtr client)
RECT rcNew;
REQUEST(xWindowsWMFrameGetRectReq);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameGetRect %d %d\n",
+ winDebug ("ProcWindowsWMFrameGetRect %d %d\n",
(sizeof(xWindowsWMFrameGetRectReq) >> 2), (int) client->req_len);
-#endif
REQUEST_SIZE_MATCH(xWindowsWMFrameGetRectReq);
rep.type = X_Reply;
@@ -363,10 +356,8 @@ ProcWindowsWMFrameGetRect (ClientPtr client)
SetRect (&rcNew, stuff->ix, stuff->iy,
stuff->ix + stuff->iw, stuff->iy + stuff->ih);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameGetRect - %d %d %d %d\n",
+ winDebug ("ProcWindowsWMFrameGetRect - %d %d %d %d\n",
stuff->ix, stuff->iy, stuff->ix + stuff->iw, stuff->iy + stuff->ih);
-#endif
/*
* Calculate the required size of the Windows window rectangle,
@@ -377,10 +368,8 @@ ProcWindowsWMFrameGetRect (ClientPtr client)
rep.y = rcNew.top;
rep.w = rcNew.right - rcNew.left;
rep.h = rcNew.bottom - rcNew.top;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameGetRect - %d %d %d %d\n",
+ winDebug ("ProcWindowsWMFrameGetRect - %d %d %d %d\n",
rep.x, rep.y, rep.w, rep.h);
-#endif
WriteToClient(client, sizeof(xWindowsWMFrameGetRectReply), (char *)&rep);
return Success;
@@ -399,26 +388,22 @@ ProcWindowsWMFrameDraw (ClientPtr client)
REQUEST_SIZE_MATCH (xWindowsWMFrameDrawReq);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameDraw\n");
-#endif
+ winDebug ("ProcWindowsWMFrameDraw\n");
+
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
if (rc != Success)
return rc;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameDraw - Window found\n");
-#endif
+
+ winDebug ("ProcWindowsWMFrameDraw - Window found\n");
pRLWinPriv = (win32RootlessWindowPtr) RootlessFrameForWindow (pWin, TRUE);
if (pRLWinPriv == 0) return BadWindow;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameDraw - HWND 0x%08x 0x%08x 0x%08x\n",
+ winDebug ("ProcWindowsWMFrameDraw - HWND 0x%08x 0x%08x 0x%08x\n",
(int) pRLWinPriv->hWnd, (int) stuff->frame_style,
(int) stuff->frame_style_ex);
- ErrorF ("ProcWindowsWMFrameDraw - %d %d %d %d\n",
+ winDebug ("ProcWindowsWMFrameDraw - %d %d %d %d\n",
stuff->ix, stuff->iy, stuff->iw, stuff->ih);
-#endif
/* Store the origin, height, and width in a rectangle structure */
SetRect (&rcNew, stuff->ix, stuff->iy,
@@ -470,9 +455,7 @@ ProcWindowsWMFrameDraw (ClientPtr client)
winMWExtWMReshapeFrame (pRLWinPriv, &newShape);
RegionUninit(&newShape);
}
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameDraw - done\n");
-#endif
+ winDebug ("ProcWindowsWMFrameDraw - done\n");
return Success;
}
@@ -487,18 +470,14 @@ ProcWindowsWMFrameSetTitle(ClientPtr client)
win32RootlessWindowPtr pRLWinPriv;
int rc;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameSetTitle\n");
-#endif
+ winDebug ("ProcWindowsWMFrameSetTitle\n");
REQUEST_AT_LEAST_SIZE(xWindowsWMFrameSetTitleReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
if (rc != Success)
return rc;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameSetTitle - Window found\n");
-#endif
+ winDebug ("ProcWindowsWMFrameSetTitle - Window found\n");
title_length = stuff->title_length;
title_max = (stuff->length << 2) - sizeof(xWindowsWMFrameSetTitleReq);
@@ -506,9 +485,7 @@ ProcWindowsWMFrameSetTitle(ClientPtr client)
if (title_max < title_length)
return BadValue;
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameSetTitle - length is valid\n");
-#endif
+ winDebug ("ProcWindowsWMFrameSetTitle - length is valid\n");
title_bytes = malloc (title_length+1);
strncpy (title_bytes, (unsigned char *) &stuff[1], title_length);
@@ -527,9 +504,7 @@ ProcWindowsWMFrameSetTitle(ClientPtr client)
free (title_bytes);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("ProcWindowsWMFrameSetTitle - done\n");
-#endif
+ winDebug ("ProcWindowsWMFrameSetTitle - done\n");
return Success;
}
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index bccd6f9f2..649de4368 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -43,10 +43,18 @@
#include "winmonitors.h"
#include "inputstr.h"
+#ifndef XKB_IN_SERVER
+#define XKB_IN_SERVER
+#endif
+#include <xkbsrv.h>
+
+void xf86SetRootClip (ScreenPtr pScreen, Bool enable);
+
/*
* Global variables
*/
+extern Bool g_fClipboardStarted;
Bool g_fCursor = TRUE;
Bool g_fButton[3] = { FALSE, FALSE, FALSE };
@@ -71,9 +79,7 @@ winWindowProc (HWND hwnd, UINT message,
int iScanCode;
int i;
-#if CYGDEBUG
winDebugWin32Message("winWindowProc", hwnd, message, wParam, lParam);
-#endif
/* Watch for server regeneration */
if (g_ulServerGeneration != s_ulServerGeneration)
@@ -86,9 +92,7 @@ winWindowProc (HWND hwnd, UINT message,
if ((s_pScreenPriv == NULL || hwnd != s_hwndLastPrivates)
&& (s_pScreenPriv = GetProp (hwnd, WIN_SCR_PROP)) != NULL)
{
-#if CYGDEBUG
winDebug ("winWindowProc - Setting privates handle\n");
-#endif
s_pScreenInfo = s_pScreenPriv->pScreenInfo;
s_pScreen = s_pScreenInfo->pScreen;
s_hwndLastPrivates = hwnd;
@@ -109,9 +113,7 @@ winWindowProc (HWND hwnd, UINT message,
s_pScreenPriv);
case WM_CREATE:
-#if CYGDEBUG
winDebug ("winWindowProc - WM_CREATE\n");
-#endif
/*
* Add a property to our display window that references
@@ -144,7 +146,7 @@ winWindowProc (HWND hwnd, UINT message,
s_pScreenPriv->hwndScreen = hwnd;
- winInitNotifyIcon (s_pScreenPriv);
+ winInitNotifyIcon (s_pScreenPriv,FALSE);
}
return 0;
@@ -178,7 +180,7 @@ winWindowProc (HWND hwnd, UINT message,
break;
}
- ErrorF ("winWindowProc - WM_DISPLAYCHANGE - new width: %d "
+ winDebug ("winWindowProc - WM_DISPLAYCHANGE - new width: %d "
"new height: %d new bpp: %d\n",
LOWORD (lParam), HIWORD (lParam), wParam);
@@ -201,7 +203,7 @@ winWindowProc (HWND hwnd, UINT message,
))
{
/* Cannot display the visual until the depth is restored */
- ErrorF ("winWindowProc - Disruptive change in depth\n");
+ winDebug ("winWindowProc - Disruptive change in depth\n");
/* Display depth change dialog */
winDisplayDepthChangeDialog (s_pScreenPriv);
@@ -248,7 +250,7 @@ winWindowProc (HWND hwnd, UINT message,
#endif
))
{
- DWORD dwWidth, dwHeight;
+ DWORD dwWidth = 0, dwHeight = 0;
if (s_pScreenInfo->fMultipleMonitors)
{
@@ -314,15 +316,31 @@ winWindowProc (HWND hwnd, UINT message,
winDebug ("winWindowProc - WM_DISPLAYCHANGE - Releasing and recreating primary surface\n");
- /* Release the old primary surface */
- (*s_pScreenPriv->pwinReleasePrimarySurface) (s_pScreen);
-
- /* Create the new primary surface */
- (*s_pScreenPriv->pwinCreatePrimarySurface) (s_pScreen);
+ /* Reallocate the framebuffer used by the drawing engine */
+ (*s_pScreenPriv->pwinFreeFB)(s_pScreen);
+ if (!(*s_pScreenPriv->pwinAllocateFB)(s_pScreen))
+ {
+ ErrorF ("winWindowProc - WM_DISPLAYCHANGE - Could not reallocate framebuffer\n");
+ }
+ /* Update the screen pixmap to point to the new framebuffer */
+ winUpdateFBPointer(s_pScreen, s_pScreenPriv->pScreenInfo->pfb);
+ // Restore the ability to update screen, now with new dimensions
+ xf86SetRootClip(s_pScreen, TRUE);
+
+ // and arrange for it to be repainted
+ miPaintWindow(s_pScreen->root, &s_pScreen->root->borderClip, PW_BACKGROUND);
}
}
break;
+
+ case WM_SYSCOMMAND:
+ if (wParam == SC_MAXIMIZE||wParam == SC_RESTORE)
+ {
+ winDebug("Posting WM_EXITSIZEMOVE message since windows does not send it when the maximised/restored button is clicked.\n");
+ PostMessage(hwnd, WM_EXITSIZEMOVE, 0, 0);
+ }
+ break;
case WM_SIZE:
{
@@ -330,9 +348,7 @@ winWindowProc (HWND hwnd, UINT message,
RECT rcWindow;
int iWidth, iHeight;
-#if CYGDEBUG
winDebug ("winWindowProc - WM_SIZE\n");
-#endif
/* Break if we do not allow resizing */
if ((s_pScreenInfo->iResizeMode == notAllowed)
@@ -351,7 +367,7 @@ winWindowProc (HWND hwnd, UINT message,
if (wParam == SIZE_MINIMIZED)
return 0;
- ErrorF ("winWindowProc - WM_SIZE - new client area w: %d h: %d\n",
+ winDebug ("winWindowProc - WM_SIZE - new client area w: %d h: %d\n",
LOWORD (lParam), HIWORD (lParam));
if (s_pScreenInfo->iResizeMode == resizeWithRandr)
@@ -433,13 +449,13 @@ winWindowProc (HWND hwnd, UINT message,
s_pScreenInfo->dwYOffset = -si.nPos;
}
return 0;
-
+
case WM_ENTERSIZEMOVE:
- ErrorF("winWindowProc - WM_ENTERSIZEMOVE\n");
+ winDebug("winWindowProc - WM_ENTERSIZEMOVE\n");
break;
case WM_EXITSIZEMOVE:
- ErrorF("winWindowProc - WM_EXITSIZEMOVE\n");
+ winDebug("winWindowProc - WM_EXITSIZEMOVE\n");
if (s_pScreenInfo->iResizeMode == resizeWithRandr)
{
@@ -470,9 +486,7 @@ winWindowProc (HWND hwnd, UINT message,
SCROLLINFO si;
int iVertPos;
-#if CYGDEBUG
winDebug ("winWindowProc - WM_VSCROLL\n");
-#endif
/* Get vertical scroll bar info */
si.cbSize = sizeof (si);
@@ -555,9 +569,7 @@ winWindowProc (HWND hwnd, UINT message,
SCROLLINFO si;
int iHorzPos;
-#if CYGDEBUG
winDebug ("winWindowProc - WM_HSCROLL\n");
-#endif
/* Get horizontal scroll bar info */
si.cbSize = sizeof (si);
@@ -641,10 +653,8 @@ winWindowProc (HWND hwnd, UINT message,
int iCaptionHeight;
int iBorderHeight, iBorderWidth;
-#if CYGDEBUG
winDebug ("winWindowProc - WM_GETMINMAXINFO - pScreenInfo: %08x\n",
s_pScreenInfo);
-#endif
/* Can't do anything without screen info */
if (s_pScreenInfo == NULL
@@ -687,9 +697,7 @@ winWindowProc (HWND hwnd, UINT message,
return 0;
case WM_ERASEBKGND:
-#if CYGDEBUG
winDebug ("winWindowProc - WM_ERASEBKGND\n");
-#endif
/*
* Pretend that we did erase the background but we don't care,
* the application uses the full window estate. This avoids some
@@ -698,9 +706,6 @@ winWindowProc (HWND hwnd, UINT message,
return TRUE;
case WM_PAINT:
-#if CYGDEBUG
- winDebug ("winWindowProc - WM_PAINT\n");
-#endif
/* Only paint if we have privates and the server is enabled */
if (s_pScreenPriv == NULL
|| !s_pScreenPriv->fEnabled
@@ -721,9 +726,7 @@ winWindowProc (HWND hwnd, UINT message,
case WM_PALETTECHANGED:
{
-#if CYGDEBUG
winDebug ("winWindowProc - WM_PALETTECHANGED\n");
-#endif
/*
* Don't process if we don't have privates or a colormap,
* or if we have an invalid depth.
@@ -991,9 +994,7 @@ winWindowProc (HWND hwnd, UINT message,
case WM_MOUSEWHEEL:
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
break;
-#if CYGDEBUG
winDebug ("winWindowProc - WM_MOUSEWHEEL\n");
-#endif
winMouseWheel (s_pScreen, GET_WHEEL_DELTA_WPARAM(wParam));
break;
@@ -1045,7 +1046,7 @@ winWindowProc (HWND hwnd, UINT message,
* user enters Alt + F4 and is surprised when the application
* quits.
*/
- ErrorF ("winWindowProc - WM_*KEYDOWN - Closekey hit, quitting\n");
+ winDebug ("winWindowProc - WM_*KEYDOWN - Closekey hit, quitting\n");
/* Display Exit dialog */
winDisplayExitDialog (s_pScreenPriv);
@@ -1138,7 +1139,7 @@ winWindowProc (HWND hwnd, UINT message,
/* TODO: Override display of window when we have a bad depth */
if (LOWORD(wParam) != WA_INACTIVE && s_pScreenPriv->fBadDepth)
{
- ErrorF ("winWindowProc - WM_ACTIVATE - Bad depth, trying "
+ winDebug ("winWindowProc - WM_ACTIVATE - Bad depth, trying "
"to override window activation\n");
/* Minimize the window */
@@ -1160,9 +1161,7 @@ winWindowProc (HWND hwnd, UINT message,
return 0;
}
-#if CYGDEBUG
winDebug ("winWindowProc - WM_ACTIVATE\n");
-#endif
/*
* Focus is being changed to another window.
@@ -1188,9 +1187,7 @@ winWindowProc (HWND hwnd, UINT message,
|| s_pScreenInfo->fIgnoreInput)
break;
-#if CYGDEBUG || TRUE
winDebug ("winWindowProc - WM_ACTIVATEAPP\n");
-#endif
/* Activate or deactivate */
s_pScreenPriv->fActive = wParam;
@@ -1206,13 +1203,13 @@ winWindowProc (HWND hwnd, UINT message,
#ifdef XWIN_CLIPBOARD
/* Make sure the clipboard chain is ok. */
- winFixClipboardChain ();
+ winFixClipboardChain (0);
#endif
/* Call engine specific screen activation/deactivation function */
(*s_pScreenPriv->pwinActivateApp) (s_pScreen);
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
if (s_pScreenPriv->fActive)
{
/* Restack all window unless using built-in wm. */
@@ -1260,6 +1257,7 @@ winWindowProc (HWND hwnd, UINT message,
if (s_pScreenInfo->fMultiWindow)
winDeinitMultiWindowWM ();
#endif
+ g_fClipboardStarted=FALSE; /* This is to avoid dead-locls caused by the clipboard thread still doing some stuff */
GiveUp (0);
return 0;
@@ -1278,32 +1276,36 @@ winWindowProc (HWND hwnd, UINT message,
#ifdef XWIN_MULTIWINDOWEXTWM
case WM_MANAGE:
- ErrorF ("winWindowProc - WM_MANAGE\n");
+ winDebug ("winWindowProc - WM_MANAGE\n");
s_pScreenInfo->fAnotherWMRunning = FALSE;
+#ifdef XWIN_MULTIWINDOWINTWM
if (s_pScreenInfo->fInternalWM)
{
EnumThreadWindows (g_dwCurrentThreadID, winMWExtWMDecorateWindow, 0);
//RootlessRepositionWindows (s_pScreen);
}
+#endif
break;
case WM_UNMANAGE:
- ErrorF ("winWindowProc - WM_UNMANAGE\n");
+ winDebug ("winWindowProc - WM_UNMANAGE\n");
s_pScreenInfo->fAnotherWMRunning = TRUE;
+#ifdef XWIN_MULTIWINDOWINTWM
if (s_pScreenInfo->fInternalWM)
{
EnumThreadWindows (g_dwCurrentThreadID, winMWExtWMDecorateWindow, 0);
winMWExtWMRestackWindows (s_pScreen);
}
+#endif
break;
#endif
default:
if(message == s_uTaskbarRestart)
{
- winInitNotifyIcon (s_pScreenPriv);
+ winInitNotifyIcon (s_pScreenPriv,FALSE);
}
break;
}
diff --git a/xorg-server/hw/xwin/xdmcphostselect.c b/xorg-server/hw/xwin/xdmcphostselect.c
new file mode 100644
index 000000000..3196da4af
--- /dev/null
+++ b/xorg-server/hw/xwin/xdmcphostselect.c
@@ -0,0 +1,183 @@
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+#include "win.h"
+
+void XdmcpHostSelected(int HostIndex);
+
+static HWND g_hDlgHosts;
+static char HostToConnect[128];
+
+static void SelectHost(int Index)
+{
+ int i;
+ char HostName[128];
+ int HostIndex=SendDlgItemMessage(g_hDlgHosts, IDC_HOSTLIST, LB_GETITEMDATA, (WPARAM)Index, 0);
+
+ HostToConnect[0]=0;
+ SendDlgItemMessage(g_hDlgHosts, IDC_HOSTLIST, LB_GETTEXT, (WPARAM)Index, (LPARAM)HostToConnect);
+ g_pszQueryHost=HostToConnect;
+
+ gethostname(HostName,128);
+
+ XdmcpHostSelected(HostIndex);
+
+ for (i = 0; i < g_iNumScreens; ++i)
+ {
+ /* Change the window title to reflect the host we are connecting to */
+ if (g_ScreenInfo[i].pScreen)
+ {
+ char szTitle[256];
+
+ winScreenPriv(g_ScreenInfo[i].pScreen);
+ winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
+ snprintf (szTitle, sizeof (szTitle), WINDOW_TITLE_XDMCP, HostToConnect, HostName, display, (int) pScreenInfo->dwScreen);
+ SetWindowText(pScreenPriv->hwndScreen,szTitle);
+ }
+ }
+
+ DestroyWindow (g_hDlgHosts);
+ g_hDlgHosts = NULL;
+}
+
+/*
+ * Process messages for the about dialog.
+ */
+
+static wBOOL CALLBACK DisplayXdmcpHostsDlgProc (HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ /* Branch on message type */
+ switch (message)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndDesk=GetForegroundWindow();
+ RECT rc, rcDlg, rcDesk;
+
+ GetWindowRect (hwndDesk, &rcDesk);
+ GetWindowRect (hwndDialog, &rcDlg);
+ CopyRect (&rc, &rcDesk);
+
+ OffsetRect (&rcDlg, -rcDlg.left, -rcDlg.top);
+ OffsetRect (&rc, -rc.left, -rc.top);
+ OffsetRect (&rc, -rcDlg.right, -rcDlg.bottom);
+
+ SetWindowPos (hwndDialog,
+ HWND_TOPMOST,
+ rcDesk.left + (rc.right / 2),
+ rcDesk.top + (rc.bottom / 2),
+ 0, 0,
+ SWP_NOSIZE | SWP_FRAMECHANGED);
+ return TRUE;
+ }
+ break;
+ case WM_MOUSEMOVE:
+ case WM_NCMOUSEMOVE:
+ /* Show the cursor if it is hidden */
+ if (g_fSoftwareCursor && !g_fCursor)
+ {
+ g_fCursor = TRUE;
+ ShowCursor (TRUE);
+ }
+ return TRUE;
+
+ case WM_COMMAND:
+ switch (LOWORD (wParam))
+ {
+ case IDOK:
+ {
+ int Index;
+ winDebug ("DisplayXdmcpHostsDlgProc - WM_COMMAND - IDOK or IDCANCEL\n");
+
+ /* Retreive the host to connect to */
+ Index=SendDlgItemMessage(g_hDlgHosts, IDC_HOSTLIST, LB_GETCURSEL, 0, 0);
+ if (Index==LB_ERR)
+ {
+ MessageBox(hwndDialog,"Please select a host to connect to!","Error",MB_OK);
+ }
+ else
+ {
+ SelectHost(Index);
+ }
+
+ return TRUE;
+ }
+ break;
+ case IDCANCEL:
+ winDebug ("DisplayXdmcpHostsDlgProc - WM_COMMAND - IDCANCEL\n");
+
+ DestroyWindow (g_hDlgHosts);
+ AbortDDX();
+ TerminateProcess(GetCurrentProcess(),1); /* Exit the application */
+
+ return TRUE;
+ break;
+ case IDC_HOSTLIST:
+ if (HIWORD(wParam)==LBN_DBLCLK)
+ {
+ int Index=SendDlgItemMessage(g_hDlgHosts, IDC_HOSTLIST, LB_GETCURSEL, 0, 0);
+ SelectHost(Index);
+ return TRUE;
+ }
+ break;
+ }
+ break;
+
+ case WM_CLOSE:
+ ErrorF ("DisplayXdmcpHostsDlgProc - WM_CLOSE\n");
+
+ DestroyWindow (g_hDlgHosts);
+ g_hDlgHosts = NULL;
+ AbortDDX();
+ TerminateProcess(GetCurrentProcess(),1); /* Exit the application */
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+int XdmcpHostAddName(const char *HostName, int HostIndex)
+{
+ int Index=SendDlgItemMessage(g_hDlgHosts, IDC_HOSTLIST, LB_FINDSTRINGEXACT, -1, (LPARAM)HostName);
+ if (LB_ERR==Index)
+ {
+ Index=SendDlgItemMessage(g_hDlgHosts, IDC_HOSTLIST, LB_ADDSTRING, 0, (LPARAM)HostName);
+ SendDlgItemMessage(g_hDlgHosts, IDC_HOSTLIST, LB_SETITEMDATA, (WPARAM)Index, (LPARAM)HostIndex);
+ return -1;
+ }
+ else
+ return SendDlgItemMessage(g_hDlgHosts, IDC_HOSTLIST, LB_GETITEMDATA, (WPARAM)Index, 0);
+}
+/*
+ * Display the host selection dialog box
+ */
+
+void DisplayXdmcpHostsDialog(void)
+{
+ /* Check if dialog already exists */
+ if (g_hDlgHosts != NULL)
+ {
+ /* Dialog box already exists, display it */
+ ShowWindow (g_hDlgHosts, SW_SHOWDEFAULT);
+
+ /* User has lost the dialog. Show them where it is. */
+ SetForegroundWindow (g_hDlgHosts);
+
+ return;
+ }
+
+ /*
+ * Display the about box
+ */
+ g_hDlgHosts = CreateDialogParam (g_hInstance, "XDMCP_HOSTS", NULL, DisplayXdmcpHostsDlgProc, 0);
+
+ /* Show the dialog box */
+ ShowWindow (g_hDlgHosts, SW_SHOW);
+
+ /* Needed to get keyboard controls (tab, arrows, enter, esc) to work */
+ SetForegroundWindow (g_hDlgHosts);
+
+ /* Set focus to the OK button */
+ PostMessage (g_hDlgAbout, WM_NEXTDLGCTL, (WPARAM)GetDlgItem (g_hDlgHosts, IDOK), TRUE);
+}
diff --git a/xorg-server/hw/xwin/xlaunch/Makefile b/xorg-server/hw/xwin/xlaunch/Makefile
deleted file mode 100644
index f7cf923df..000000000
--- a/xorg-server/hw/xwin/xlaunch/Makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Copyright (c) 2005 Alexander Gottwald
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name(s) of the above copyright
-# holders shall not be used in advertising or otherwise to promote the sale,
-# use or other dealings in this Software without prior written authorization.
-#
-WINDRES=windres
-
-TARGET=mingw
-#DEBUG_FLAGS=-D_DEBUG
-
-OS_FLAGS_mingw=-mno-cygwin
-OS_FLAGS=$(OS_FLAGS_$(TARGET)) $(DEBUG_FLAGS)
-
-X11_DIR_$(TARGET)=/usr/X11R6
-X11_DIR_mingw=../../../../../exports
-X11_DIR=$(X11_DIR_$(TARGET))
-X11_INCLUDE=-I$(X11_DIR)/include
-X11_LIBDIR=-L$(X11_DIR)/lib
-X11_LIBS_$(TARGET)=-lX11
-X11_LIBS_mingw=-lX11 -lwsock32
-X11_LIBS=$(X11_LIBS_$(TARGET))
-
-PROGRAMFILES:=$(shell cygpath -u $(PROGRAMFILES))
-#MSXML_DIR=$(PROGRAMFILES)/MSXML 4.0
-MSXML_DIR=$(PROGRAMFILES)/Microsoft XML Parser SDK
-MSXML_INCLUDE="-I$(MSXML_DIR)/inc"
-MSXML_LIBDIR="-L$(MSXML_DIR)/lib"
-MSXML_LIBS=
-
-
-CXXFLAGS=-g $(OS_FLAGS) $(X11_INCLUDE) $(MSXML_INCLUDE)
-LDFLAGS=-mwindows $(X11_LIBDIR) $(MSXML_LIBDIR)
-LIBS=-lcomctl32 -lole32 -loleaut32 $(X11_LIBS) $(MSXML_LIBS)
-all:xlaunch.exe
-%.res: %.rc
- $(WINDRES) -O coff -o $@ $<
-
-WINDOW_PARTS=window util dialog wizard
-WINDOW_OBJECTS=$(foreach file,$(WINDOW_PARTS),window/$(file).o)
-
-RESOURCES_IMAGES=resources/multiwindow.bmp resources/fullscreen.bmp \
- resources/windowed.bmp resources/nodecoration.bmp
-
-resources/resources.res: resources/resources.rc resources/resources.h \
- resources/images.rc resources/dialog.rc resources/strings.rc \
- $(RESOURCES_IMAGES)
-xlaunch.exe: $(WINDOW_OBJECTS) main.o config.o resources/resources.res
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-
-window/dialog.o: window/dialog.cc window/dialog.h window/window.h window/util.h
-window/frame.o: window/frame.cc window/frame.h window/window.h
-window/util.o: window/util.cc window/util.h
-window/window.o: window/window.cc window/window.h window/util.h
-window/wizard.o: window/wizard.cc window/wizard.h window/dialog.h \
- window/window.h window/util.h
-main.o: main.cc window/util.h window/wizard.h window/dialog.h \
- window/window.h resources/resources.h config.h
-config.o: config.cc config.h
diff --git a/xorg-server/hw/xwin/xlaunch/config.cc b/xorg-server/hw/xwin/xlaunch/config.cc
index b6bf65ae3..c7ac398fb 100644
--- a/xorg-server/hw/xwin/xlaunch/config.cc
+++ b/xorg-server/hw/xwin/xlaunch/config.cc
@@ -1,282 +1,198 @@
-/*
- * Copyright (c) 2005 Alexander Gottwald
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-#include "config.h"
-#include "window/util.h"
-#include <msxml2.h>
-#include <stdexcept>
-
-const CLSID CLSID_DOMDocument40 = {0x88d969c0,0xf192,0x11d4,0xa6,0x5f,0x00,0x40,0x96,0x32,0x51,0xe5};
-const CLSID CLSID_DOMDocument30 = {0xf5078f32,0xc551,0x11d3,0x89,0xb9,0x00,0x00,0xf8,0x1f,0xe2,0x21};
-const IID IID_IXMLDOMDocument2 = {0x2933BF95,0x7B36,0x11d2,0xB2,0x0E,0x00,0xC0,0x4F,0x98,0x3E,0x60};
-
-#define HRCALL(x, msg) if (FAILED(x)) { throw std::runtime_error("OLE Error:" msg " failed"); };
-
-char *wcconvert(const wchar_t *wstr)
-{
- int chars = WideCharToMultiByte(CP_ACP, 0, wstr, -1, NULL, 0, NULL, NULL);
- if (chars == 0)
- throw win32_error("WideCharToMultiByte");
- char *mbstr = new char[chars];
- chars = WideCharToMultiByte(CP_ACP, 0, wstr, -1, mbstr, chars, NULL, NULL);
- if (chars == 0)
- throw win32_error("WideCharToMultiByte");
- return mbstr;
-}
-
-wchar_t *mbconvert(const char *mbstr)
-{
- int chars = MultiByteToWideChar(CP_ACP, 0, mbstr, -1, NULL, 0);
- if (chars == 0)
- throw win32_error("MultiByteToWideChar");
- wchar_t *wstr = new wchar_t[chars];
- chars = MultiByteToWideChar(CP_ACP, 0, mbstr, -1, wstr, chars);
- if (chars == 0)
- throw win32_error("MultiByteToWideChar");
- return wstr;
-}
-
-VARIANT VariantString(const char *filename)
-{
-
- wchar_t *str = mbconvert(filename);
-
- VARIANT var;
- VariantInit(&var);
- V_BSTR(&var) = SysAllocString(str);
- V_VT(&var) = VT_BSTR;
-
- delete [] str;
- return var;
-}
-
-VARIANT VariantString(const wchar_t *str)
-{
- VARIANT var;
- VariantInit(&var);
- V_BSTR(&var) = SysAllocString(str);
- V_VT(&var) = VT_BSTR;
- return var;
-}
-
-IXMLDOMDocument2 *CreateDocument()
-{
- IXMLDOMDocument2 *doc = NULL;
-
- CoInitialize(NULL);
-
- HRCALL(CoCreateInstance(CLSID_DOMDocument40, NULL, CLSCTX_INPROC_SERVER,
- IID_IXMLDOMDocument2, (void**)&doc), "CoCreateInstance");
-
- try {
- HRCALL(doc->put_async(VARIANT_FALSE), "put_async");
- HRCALL(doc->put_validateOnParse(VARIANT_FALSE), "put_validateOnParse");
- HRCALL(doc->put_resolveExternals(VARIANT_FALSE), "put_resolveExternals");
-
- IXMLDOMProcessingInstruction *pi = NULL;
- IXMLDOMElement *root = NULL;
- BSTR xml = SysAllocString(L"xml");
- BSTR ver = SysAllocString(L"version='1.0'");
- HRCALL(doc->createProcessingInstruction(xml,ver, &pi),
- "createProcessingInstruction");
- HRCALL(doc->appendChild(pi, NULL),
- "appendChild");
- pi->Release();
- SysFreeString(xml);
- SysFreeString(ver);
-
- BSTR elemname = SysAllocString(L"XLaunch");
- HRCALL(doc->createElement(elemname, &root), "createElement");
- HRCALL(doc->appendChild(root, NULL), "appendChild");
- SysFreeString(elemname);
- } catch (...)
- {
- doc->Release();
- throw;
- }
- return doc;
-}
-
-void setAttribute(IXMLDOMElement *elem, const wchar_t *name, const wchar_t *value)
-{
- BSTR str = SysAllocString(name);
- VARIANT var = VariantString(value);
- HRCALL(elem->setAttribute(str, var), "setAttribute");
- VariantClear(&var);
- SysFreeString(str);
-}
-
-void setAttribute(IXMLDOMElement *elem, const wchar_t *name, const char *value)
-{
- wchar_t *wstr = mbconvert(value);
- setAttribute(elem, name, wstr);
- delete [] wstr;
- return;
-}
-
-void CConfig::Save(const char *filename)
-{
- IXMLDOMDocument2 *doc = CreateDocument();
- IXMLDOMElement *root = NULL;
-
- HRCALL(doc->get_documentElement(&root), "get_documentElement");
-
- switch (window)
- {
- case MultiWindow:
- setAttribute(root, L"WindowMode", L"MultiWindow");
- break;
- case Fullscreen:
- setAttribute(root, L"WindowMode", L"Fullscreen");
- break;
- default:
- case Windowed:
- setAttribute(root, L"WindowMode", L"Windowed");
- break;
- case Nodecoration:
- setAttribute(root, L"WindowMode", L"Nodecoration");
- break;
- }
- switch (client)
- {
- default:
- case NoClient:
- setAttribute(root, L"ClientMode", L"NoClient");
- break;
- case StartProgram:
- setAttribute(root, L"ClientMode", L"StartProgram");
- break;
- case XDMCP:
- setAttribute(root, L"ClientMode", L"XDMCP");
- break;
- }
- setAttribute(root, L"LocalClient", local?L"True":L"False");
- setAttribute(root, L"Display", display.c_str());
- setAttribute(root, L"Program", program.c_str());
- setAttribute(root, L"RemoteProtocol", protocol.c_str());
- setAttribute(root, L"RemoteHost", host.c_str());
- setAttribute(root, L"RemoteUser", user.c_str());
- setAttribute(root, L"XDMCPHost", xdmcp_host.c_str());
- setAttribute(root, L"XDMCPBroadcast", broadcast?L"True":L"False");
- setAttribute(root, L"XDMCPIndirect", indirect?L"True":L"False");
- setAttribute(root, L"Clipboard", clipboard?L"True":L"False");
- setAttribute(root, L"ExtraParams", extra_params.c_str());
-
- VARIANT var = VariantString(filename);
- HRCALL(doc->save(var), "save");
- VariantClear(&var);
-
-
- root->Release();
- doc->Release();
-}
-
-BOOL getAttribute(IXMLDOMElement *elem, const wchar_t *name, std::string &ret)
-{
- VARIANT var;
- HRCALL(elem->getAttribute((OLECHAR*)name, &var), "getAttribute");
- if (V_VT(&var) != VT_NULL && V_VT(&var) == VT_BSTR)
- {
- char *str = wcconvert(V_BSTR(&var));
- ret = str;
- delete [] str;
- return true;
- }
- return false;
-}
-
-BOOL getAttributeBool(IXMLDOMElement *elem, const wchar_t *name, bool &ret)
-{
- std::string str;
- if (getAttribute(elem, name, str))
- {
- if (str == "True")
- ret = true;
- else
- ret = false;
- return true;
- }
- return false;
-}
-
-
-void CConfig::Load(const char *filename)
-{
- IXMLDOMDocument2 *doc = CreateDocument();
- IXMLDOMElement *root = NULL;
-
- VARIANT var = VariantString(filename);
- VARIANT_BOOL status;
- HRCALL(doc->load(var, &status), "load");
- VariantClear(&var);
-
- if (status == VARIANT_FALSE)
- {
- doc->Release();
- return;
- }
-
- HRCALL(doc->get_documentElement(&root), "get_documentElement");
-
- std::string windowMode;
- std::string clientMode;
-
- if (getAttribute(root, L"WindowMode", windowMode))
- {
- if (windowMode == "MultiWindow")
- window = MultiWindow;
- else if (windowMode == "Fullscreen")
- window = Fullscreen;
- else if (windowMode == "Windowed")
- window = Windowed;
- else if (windowMode == "Nodecoration")
- window = Nodecoration;
- }
- if (getAttribute(root, L"ClientMode", clientMode))
- {
- if (clientMode == "NoClient")
- client = NoClient;
- else if (clientMode == "StartProgram")
- client = StartProgram;
- else if (clientMode == "XDMCP")
- client = XDMCP;
- }
-
- getAttributeBool(root, L"LocalClient", local);
- getAttribute(root, L"Display", display);
- getAttribute(root, L"Program", program);
- getAttribute(root, L"RemoteProtocol", protocol);
- getAttribute(root, L"RemoteHost", host);
- getAttribute(root, L"RemoteUser", user);
- getAttribute(root, L"XDMCPHost", xdmcp_host);
- getAttributeBool(root, L"XDMCPBroadcast", broadcast);
- getAttributeBool(root, L"XDMCPIndirect", indirect);
- getAttributeBool(root, L"Clipboard", clipboard);
- getAttribute(root, L"ExtraParams", extra_params);
-
-
- doc->Release();
-}
-
+/*
+ * Copyright (c) 2005 Alexander Gottwald
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include "config.h"
+#include "window/util.h"
+#include <stdexcept>
+
+xmlDocPtr CreateDocument()
+{
+ xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0");
+ xmlNodePtr root_node = xmlNewNode(NULL, BAD_CAST "XLaunch");
+ xmlDocSetRootElement(doc, root_node);
+
+ return doc;
+
+}
+
+void setAttribute(xmlNodePtr elem, const char *name, const char *value)
+{
+ xmlNewProp(elem, BAD_CAST name, BAD_CAST value);
+}
+
+void CConfig::Save(const char *filename)
+{
+ xmlDocPtr doc = CreateDocument();
+ xmlNodePtr root = xmlDocGetRootElement(doc);
+
+ switch (window)
+ {
+ case MultiWindow:
+ setAttribute(root, "WindowMode", "MultiWindow");
+ break;
+ case Fullscreen:
+ setAttribute(root, "WindowMode", "Fullscreen");
+ break;
+ default:
+ case Windowed:
+ setAttribute(root, "WindowMode", "Windowed");
+ break;
+ case Nodecoration:
+ setAttribute(root, "WindowMode", "Nodecoration");
+ break;
+ }
+ switch (client)
+ {
+ default:
+ case NoClient:
+ setAttribute(root, "ClientMode", "NoClient");
+ break;
+ case StartProgram:
+ setAttribute(root, "ClientMode", "StartProgram");
+ break;
+ case XDMCP:
+ setAttribute(root, "ClientMode", "XDMCP");
+ break;
+ }
+ setAttribute(root, "LocalClient", local?"True":"False");
+ setAttribute(root, "Display", display.c_str());
+ setAttribute(root, "LocalProgram", localprogram.c_str());
+ setAttribute(root, "RemoteProgram", remoteprogram.c_str());
+ setAttribute(root, "RemotePassword", remotepassword.c_str());
+ setAttribute(root, "RemoteHost", host.c_str());
+ setAttribute(root, "RemoteUser", user.c_str());
+ setAttribute(root, "XDMCPHost", xdmcp_host.c_str());
+ setAttribute(root, "XDMCPBroadcast", broadcast?"True":"False");
+ setAttribute(root, "XDMCPIndirect", indirect?"True":"False");
+ setAttribute(root, "Clipboard", clipboard?"True":"False");
+ setAttribute(root, "ClipboardPrimary", clipboardprimary?"True":"False");
+ setAttribute(root, "ExtraParams", extra_params.c_str());
+ setAttribute(root, "Wgl", wgl?"True":"False");
+ setAttribute(root, "DisableAC", disableac?"True":"False");
+ setAttribute(root, "XDMCPTerminate", xdmcpterminate?"True":"False");
+
+ xmlSaveFormatFileEnc(filename, doc, "UTF-8", 1);
+
+ /*free the document */
+ xmlFreeDoc(doc);
+
+ /*
+ *Free the global variables that may
+ *have been allocated by the parser.
+ */
+ xmlCleanupParser();
+}
+
+BOOL getAttribute(xmlNodePtr elem, const char *name, std::string &ret)
+{
+ char *pVal=(char*)xmlGetProp(elem,BAD_CAST name);
+ if (!pVal)
+ return false;
+ ret=pVal;
+ return true;
+}
+
+BOOL getAttributeBool(xmlNodePtr elem, const char *name, bool &ret)
+{
+ const char *pVal=(char*)xmlGetProp(elem, BAD_CAST name);
+ if (!pVal)
+ return false;
+
+ std::string str(pVal);
+
+ if (str == "True")
+ ret = true;
+ else
+ ret = false;
+ return true;
+}
+
+
+void CConfig::Load(const char *filename)
+{
+ xmlDocPtr doc = xmlReadFile(filename, NULL, 0);
+
+ xmlNodePtr root;
+
+ if (doc == NULL)
+ {
+ return;
+ }
+
+ root = xmlDocGetRootElement(doc);
+
+ std::string windowMode;
+ std::string clientMode;
+
+ if (getAttribute(root, "WindowMode", windowMode))
+ {
+ if (windowMode == "MultiWindow")
+ window = MultiWindow;
+ else if (windowMode == "Fullscreen")
+ window = Fullscreen;
+ else if (windowMode == "Windowed")
+ window = Windowed;
+ else if (windowMode == "Nodecoration")
+ window = Nodecoration;
+ }
+ if (getAttribute(root, "ClientMode", clientMode))
+ {
+ if (clientMode == "NoClient")
+ client = NoClient;
+ else if (clientMode == "StartProgram")
+ client = StartProgram;
+ else if (clientMode == "XDMCP")
+ client = XDMCP;
+ }
+
+ getAttributeBool(root, "LocalClient", local);
+ getAttribute(root, "Display", display);
+ getAttribute(root, "LocalProgram", localprogram);
+ getAttribute(root, "RemoteProgram", remoteprogram);
+ getAttribute(root, "RemotePassword", remotepassword);
+ getAttribute(root, "RemoteHost", host);
+ getAttribute(root, "RemoteUser", user);
+ getAttribute(root, "XDMCPHost", xdmcp_host);
+ getAttributeBool(root, "XDMCPBroadcast", broadcast);
+ getAttributeBool(root, "XDMCPIndirect", indirect);
+ getAttributeBool(root, "Clipboard", clipboard);
+ getAttributeBool(root, "ClipboardPrimary", clipboardprimary);
+ getAttribute(root, "ExtraParams", extra_params);
+ getAttributeBool(root, "Wgl", wgl);
+ getAttributeBool(root, "DisableAC", disableac);
+ getAttributeBool(root, "XDMCPTerminate", xdmcpterminate);
+
+ /*free the document */
+ xmlFreeDoc(doc);
+
+ /*
+ *Free the global variables that may
+ *have been allocated by the parser.
+ */
+ xmlCleanupParser();
+}
+
diff --git a/xorg-server/hw/xwin/xlaunch/config.h b/xorg-server/hw/xwin/xlaunch/config.h
index f0aed3cf1..ecd22fe75 100644
--- a/xorg-server/hw/xwin/xlaunch/config.h
+++ b/xorg-server/hw/xwin/xlaunch/config.h
@@ -22,39 +22,68 @@
* Except as contained in this notice, the name(s) of the above copyright
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
+ *
+ * Authors: Alexander Gottwald, Colin Harrison
*/
#ifndef __CONFIG_H__
#define __CONFIG_H__
+#define UNICODE
+#define _UNICODE
+
+#define PROG_NUMBER 10
+#define HOST_NUMBER 10
+#define MAX_MESSAGE 256
+#define MAX_CAPTION 128
+#include <windows.h>
#include <string>
+#include <vector>
struct CConfig
{
enum {MultiWindow, Fullscreen, Windowed, Nodecoration} window;
enum {NoClient, StartProgram, XDMCP} client;
bool local;
std::string display;
- std::string protocol;
- std::string program;
+ std::string localprogram;
+ std::string remoteprogram;
+ bool compress;
std::string host;
std::string user;
+ std::string remotepassword;
bool broadcast;
bool indirect;
std::string xdmcp_host;
bool clipboard;
+ bool clipboardprimary;
+ bool wgl;
+ bool disableac;
+ bool xdmcpterminate;
std::string extra_params;
#ifdef _DEBUG
- CConfig() : window(MultiWindow), client(StartProgram), local(false), display("1"),
- protocol("Putty"), program("xterm"), host("lupus"), user("ago"),
- broadcast(false), indirect(false), xdmcp_host("lupus"),
- clipboard(true), extra_params() {};
+ CConfig() : window(MultiWindow), client(NoClient), display("1"),
#else
- CConfig() : window(MultiWindow), client(StartProgram), local(false), display("0"),
- protocol("Putty"), program("xterm"), host(""), user(""),
- broadcast(true), indirect(false), xdmcp_host(""),
- clipboard(true), extra_params() {};
+ CConfig() : window(MultiWindow), client(NoClient), display("0"),
#endif
- void Load(const char* filename);
- void Save(const char* filename);
+ local(false),
+ remotepassword(""),
+ localprogram("xcalc"),
+ remoteprogram("xterm"),
+ compress(false),
+ host(""),
+ user(""),
+ broadcast(false),
+ indirect(false),
+ xdmcp_host(""),
+ clipboard(true),
+ clipboardprimary(true),
+ extra_params(),
+ disableac(true),
+ wgl(true),
+ xdmcpterminate(false)
+ {
+ };
+ void Load(const char * filename);
+ void Save(const char * filename);
};
#endif
diff --git a/xorg-server/hw/xwin/xlaunch/main.cc b/xorg-server/hw/xwin/xlaunch/main.cc
index 2247d3aaf..0a80630f0 100644
--- a/xorg-server/hw/xwin/xlaunch/main.cc
+++ b/xorg-server/hw/xwin/xlaunch/main.cc
@@ -34,6 +34,8 @@
#include <X11/Xlib.h>
+#include <stdlib.h>
+
/// @brief Send WM_ENDSESSION to all program windows.
/// This will shutdown the started xserver
BOOL CALLBACK KillWindowsProc(HWND hwnd, LPARAM lParam)
@@ -48,7 +50,7 @@ class CMyWizard : public CWizard
{
public:
private:
- CConfig config; /// Storage for config options.
+ CConfig config; /// Storage for config options.
public:
/// @brief Constructor.
/// Set wizard pages.
@@ -59,307 +61,339 @@ class CMyWizard : public CWizard
AddPage(IDD_PROGRAM, IDS_PROGRAM_TITLE, IDS_PROGRAM_SUBTITLE);
AddPage(IDD_XDMCP, IDS_XDMCP_TITLE, IDS_XDMCP_SUBTITLE);
//AddPage(IDD_FONTPATH, IDS_FONTPATH_TITLE, IDS_FONTPATH_SUBTITLE);
- AddPage(IDD_CLIPBOARD, IDS_CLIPBOARD_TITLE, IDS_CLIPBOARD_SUBTITLE);
+ AddPage(IDD_EXTRA, IDS_EXTRA_TITLE, IDS_EXTRA_SUBTITLE);
AddPage(IDD_FINISH, IDS_FINISH_TITLE, IDS_FINISH_SUBTITLE);
}
- virtual void LoadConfig(const char *filename)
- {
- try {
- config.Load(filename);
- } catch (std::runtime_error &e)
- {
- printf("Fehler: %s\n", e.what());
- }
- }
+ virtual void LoadConfig(const char *filename)
+ {
+ try {
+ config.Load(filename);
+ } catch (std::runtime_error &e)
+ {
+ char Message[255];
+ sprintf(Message,"Failure: %s\n", e.what());
+ MessageBox(NULL,Message,"Exception",MB_OK);
+ }
+ }
/// @brief Handle the PSN_WIZNEXT message.
/// @param hwndDlg Handle to active page dialog.
/// @param index Index of current page.
/// @return TRUE if the message was handled. FALSE otherwise.
- virtual BOOL WizardNext(HWND hwndDlg, unsigned index)
- {
+ virtual BOOL WizardNext(HWND hwndDlg, unsigned index)
+ {
#ifdef _DEBUG
- printf("%s %d\n", __FUNCTION__, index);
+ printf("%s %d\n", __FUNCTION__, index);
#endif
- switch (PageID(index))
- {
- case IDD_DISPLAY:
+ switch (PageID(index))
+ {
+ case IDD_DISPLAY:
// Check for select window mode
- if (IsDlgButtonChecked(hwndDlg, IDC_MULTIWINDOW))
- config.window = CConfig::MultiWindow;
- else if (IsDlgButtonChecked(hwndDlg, IDC_FULLSCREEN))
- config.window = CConfig::Fullscreen;
- else if (IsDlgButtonChecked(hwndDlg, IDC_WINDOWED))
- config.window = CConfig::Windowed;
- else if (IsDlgButtonChecked(hwndDlg, IDC_NODECORATION))
- config.window = CConfig::Nodecoration;
- else
- {
- SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
- return TRUE;
- }
+ if (IsDlgButtonChecked(hwndDlg, IDC_MULTIWINDOW))
+ config.window = CConfig::MultiWindow;
+ else if (IsDlgButtonChecked(hwndDlg, IDC_FULLSCREEN))
+ config.window = CConfig::Fullscreen;
+ else if (IsDlgButtonChecked(hwndDlg, IDC_WINDOWED))
+ config.window = CConfig::Windowed;
+ else if (IsDlgButtonChecked(hwndDlg, IDC_NODECORATION))
+ config.window = CConfig::Nodecoration;
+ else
+ {
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
+ return TRUE;
+ }
// Get selected display number
- {
- char buffer[512];
- GetDlgItemText(hwndDlg, IDC_DISPLAY, buffer, 512);
- buffer[511] = 0;
- config.display = buffer;
+ {
+ char buffer[512];
+ GetDlgItemText(hwndDlg, IDC_DISPLAY, buffer, 512);
+ buffer[511] = 0;
+ config.display = buffer;
}
// Check for valid input
if (config.display.empty())
- SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
+ {
+ MessageBox(hwndDlg,"Please fill in a display number.","Error",MB_OK);
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
+ }
else
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIENTS);
- return TRUE;
- case IDD_CLIENTS:
+ return TRUE;
+ case IDD_CLIENTS:
// Check for select client startup method
- if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT))
- {
- config.client = CConfig::StartProgram;
- SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROGRAM);
- } else if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP))
- {
- config.client = CConfig::XDMCP;
- SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_XDMCP);
- } else if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_NONE))
- {
- config.client = CConfig::NoClient;
- SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIPBOARD);
- } else
- SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
- return TRUE;
- case IDD_PROGRAM:
+ if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT))
+ {
+ config.client = CConfig::StartProgram;
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROGRAM);
+ } else if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP))
+ {
+ config.client = CConfig::XDMCP;
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_XDMCP);
+ } else if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_NONE))
+ {
+ config.client = CConfig::NoClient;
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_EXTRA);
+ } else
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
+ return TRUE;
+ case IDD_PROGRAM:
// Check wether local or remote client should be started
- if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_LOCAL))
- config.local = true;
- else if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_REMOTE))
- config.local = false;
- else
- {
- SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
- return TRUE;
- }
+ if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_LOCAL))
+ config.local = true;
+ else if (IsDlgButtonChecked(hwndDlg, IDC_CLIENT_REMOTE))
+ config.local = false;
+ else
+ {
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
+ return TRUE;
+ }
// Read program, user and host name
- {
- char buffer[512];
- GetDlgItemText(hwndDlg, IDC_CLIENT_USER, buffer, 512);
- buffer[511] = 0;
- config.user = buffer;
- GetDlgItemText(hwndDlg, IDC_CLIENT_HOST, buffer, 512);
- buffer[511] = 0;
- config.host = buffer;
- GetDlgItemText(hwndDlg, IDC_CLIENT_PROGRAM, buffer, 512);
- buffer[511] = 0;
- config.program = buffer;
- }
+ {
+ char buffer[512];
+ GetDlgItemText(hwndDlg, IDC_CLIENT_USER, buffer, 512);
+ buffer[511] = 0;
+ config.user = buffer;
+ GetDlgItemText(hwndDlg, IDC_CLIENT_HOST, buffer, 512);
+ buffer[511] = 0;
+ config.host = buffer;
+ GetDlgItemText(hwndDlg, IDC_CLIENT_PROGRAM, buffer, 512);
+ buffer[511] = 0;
+ config.localprogram = buffer;
+ GetDlgItemText(hwndDlg, IDC_CLIENT_REMOTEPROGRAM, buffer, 512);
+ buffer[511] = 0;
+ config.remoteprogram = buffer;
+ GetDlgItemText(hwndDlg, IDC_CLIENT_PASSWORD, buffer, 512);
+ buffer[511] = 0;
+ config.remotepassword = buffer;
+ }
// Check for valid input
- if (!config.local && (config.host.empty() || config.program.empty()))
- SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
- else
- SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIPBOARD);
- return TRUE;
- case IDD_XDMCP:
+ if (!config.local && (config.host.empty() || config.localprogram.empty() || config.remoteprogram.empty()))
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
+ else
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_EXTRA);
+ return TRUE;
+ case IDD_XDMCP:
// Check for broadcast
- if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_BROADCAST))
- config.broadcast = true;
- else if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_QUERY))
- config.broadcast = false;
- else
- {
- SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
- return TRUE;
- }
+ if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_BROADCAST))
+ config.broadcast = true;
+ else if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_QUERY))
+ config.broadcast = false;
+ else
+ {
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
+ return TRUE;
+ }
// Check for indirect mode
- if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_INDIRECT))
- config.indirect = true;
- else
- config.indirect = false;
+ if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_INDIRECT))
+ config.indirect = true;
+ else
+ config.indirect = false;
// Read hostname
- {
- char buffer[512];
- GetDlgItemText(hwndDlg, IDC_XDMCP_HOST, buffer, 512);
- buffer[511] = 0;
- config.xdmcp_host = buffer;
- }
+ {
+ char buffer[512];
+ GetDlgItemText(hwndDlg, IDC_XDMCP_HOST, buffer, 512);
+ buffer[511] = 0;
+ config.xdmcp_host = buffer;
+ }
// Check for valid input
- if (!config.broadcast && config.xdmcp_host.empty())
- SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
- else
- SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIPBOARD);
- return TRUE;
- case IDD_CLIPBOARD:
+ if (!config.broadcast && config.xdmcp_host.empty())
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
+ else
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_EXTRA);
+ if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP_TERMINATE))
+ config.xdmcpterminate = true;
+ else
+ config.xdmcpterminate = false;
+ return TRUE;
+ case IDD_EXTRA:
// check for clipboard
if (IsDlgButtonChecked(hwndDlg, IDC_CLIPBOARD))
config.clipboard = true;
else
config.clipboard = false;
+ // check for clipboard primary selection
+ if (IsDlgButtonChecked(hwndDlg, IDC_CLIPBOARDPRIMARY))
+ config.clipboardprimary = true;
+ else
+ config.clipboardprimary = false;
+ // check for wgl
+ if (IsDlgButtonChecked(hwndDlg, IDC_WGL))
+ config.wgl = true;
+ else
+ config.wgl = false;
+ // check for access control
+ if (IsDlgButtonChecked(hwndDlg, IDC_DISABLEAC))
+ config.disableac = true;
+ else
+ config.disableac = false;
// read parameters
- {
- char buffer[512];
- GetDlgItemText(hwndDlg, IDC_EXTRA_PARAMS, buffer, 512);
- buffer[511] = 0;
- config.extra_params = buffer;
- }
+ {
+ char buffer[512];
+ GetDlgItemText(hwndDlg, IDC_EXTRA_PARAMS, buffer, 512);
+ buffer[511] = 0;
+ config.extra_params = buffer;
+ }
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_FINISH);
return TRUE;
- default:
- break;
- }
- return FALSE;
- }
+ default:
+ break;
+ }
+ return FALSE;
+ }
/// @brief Handle PSN_WIZFINISH message.
/// @param hwndDlg Handle to active page dialog.
/// @param index Index of current page.
/// @return TRUE if the message was handled. FALSE otherwise.
- virtual BOOL WizardFinish(HWND hwndDlg, unsigned index)
- {
+ virtual BOOL WizardFinish(HWND hwndDlg, unsigned index)
+ {
#ifdef _DEBUG
- printf("finish %d\n", index);
+ printf("finish %d\n", index);
#endif
- return FALSE;
- }
+ return FALSE;
+ }
/// @brief Handle PSN_WIZBACK message.
/// Basicly handles switching to proper page (skipping XDMCP or program page
/// if required).
/// @param hwndDlg Handle to active page dialog.
/// @param index Index of current page.
/// @return TRUE if the message was handled. FALSE otherwise.
- virtual BOOL WizardBack(HWND hwndDlg, unsigned index)
- {
- switch (PageID(index))
- {
- case IDD_PROGRAM:
- case IDD_XDMCP:
- SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIENTS);
- return TRUE;
- case IDD_FONTPATH:
- case IDD_CLIPBOARD: // temporary. fontpath is disabled
- switch (config.client)
- {
- case CConfig::NoClient:
- SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIENTS);
- return TRUE;
- case CConfig::StartProgram:
- SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROGRAM);
- return TRUE;
- case CConfig::XDMCP:
- SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_XDMCP);
- return TRUE;
- }
- break;
- }
- return FALSE;
- }
+ virtual BOOL WizardBack(HWND hwndDlg, unsigned index)
+ {
+ switch (PageID(index))
+ {
+ case IDD_PROGRAM:
+ case IDD_XDMCP:
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIENTS);
+ return TRUE;
+ case IDD_FONTPATH:
+ case IDD_EXTRA: // temporary. fontpath is disabled
+ switch (config.client)
+ {
+ case CConfig::NoClient:
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CLIENTS);
+ return TRUE;
+ case CConfig::StartProgram:
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROGRAM);
+ return TRUE;
+ case CConfig::XDMCP:
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_XDMCP);
+ return TRUE;
+ }
+ break;
+ }
+ return FALSE;
+ }
/// @brief Handle PSN_SETACTIVE message.
/// @param hwndDlg Handle to active page dialog.
/// @param index Index of current page.
/// @return TRUE if the message was handled. FALSE otherwise.
- virtual BOOL WizardActivate(HWND hwndDlg, unsigned index)
- {
+ virtual BOOL WizardActivate(HWND hwndDlg, unsigned index)
+ {
#ifdef _DEBUG
- printf("%s %d\n", __FUNCTION__, index);
+ printf("%s %d\n", __FUNCTION__, index);
#endif
- switch (PageID(index))
- {
- case IDD_CLIENTS:
+ switch (PageID(index))
+ {
+ case IDD_CLIENTS:
// Enable or disable XDMCP radiobutton and text
- EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP), config.window != CConfig::MultiWindow);
- EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_DESC), config.window != CConfig::MultiWindow);
- break;
- }
- return FALSE;
- }
+ if (config.window != CConfig::MultiWindow)
+ {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP), true);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_DESC), true);
+ }
+ else
+ {
+ if (IsDlgButtonChecked(hwndDlg, IDC_XDMCP))
+ CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT_NONE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_DESC), false);
+ }
+ break;
+ }
+ return FALSE;
+ }
protected:
/// @brief Enable or disable the control for remote clients.
/// @param hwndDlg Handle to active page dialog.
/// @param state State of control group.
- void EnableRemoteProgramGroup(HWND hwndDlg, BOOL state)
- {
- EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PROTOCOL), state);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_HOST), state);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_USER), state);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PROTOCOL_DESC), state);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_HOST_DESC), state);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_USER_DESC), state);
- }
+ void EnableRemoteProgramGroup(HWND hwndDlg, BOOL state)
+ {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PASSWORD), state);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_HOST), state);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_USER), state);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PASSWORD_DESC), state);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_HOST_DESC), state);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_USER_DESC), state);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_REMOTEPROGRAM), state);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_REMOTEPROGRAM_DESC), state);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PROGRAM), !state);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CLIENT_PROGRAM_DESC), !state);
+ }
/// @brief Enable or disable the control for XDMCP connection.
/// @param hwndDlg Handle to active page dialog.
/// @param state State of control group.
- void EnableXDMCPQueryGroup(HWND hwndDlg, BOOL state)
- {
- EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_HOST), state);
- EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_INDIRECT), state);
- }
+ void EnableXDMCPQueryGroup(HWND hwndDlg, BOOL state)
+ {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_HOST), state);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_XDMCP_INDIRECT), state);
+ }
/// @brief Fill program box with default values.
/// @param hwndDlg Handle to active page dialog.
- void FillProgramBox(HWND hwndDlg)
- {
- HWND cbwnd = GetDlgItem(hwndDlg, IDC_CLIENT_PROGRAM);
- if (cbwnd == NULL)
- return;
- SendMessage(cbwnd, CB_RESETCONTENT, 0, 0);
- SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "xterm");
- SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "startkde");
- SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "gnome-session");
- SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) ".xinitrc");
- SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "wmaker");
- SendMessage(cbwnd, CB_SETCURSEL, 0, 0);
- }
- /// @brief Fill protocol box with default values.
- /// @param hwndDlg Handle to active page dialog.
- void FillProtocolBox(HWND hwndDlg)
- {
- HWND cbwnd = GetDlgItem(hwndDlg, IDC_CLIENT_PROTOCOL);
- if (cbwnd == NULL)
- return;
- SendMessage(cbwnd, CB_RESETCONTENT, 0, 0);
- SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "Putty");
- //SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "OpenSSH");
- SendMessage(cbwnd, CB_SETCURSEL, 0, 0);
- }
- void ShowSaveDialog(HWND parent)
- {
- char szTitle[512];
- char szFilter[512];
- char szFileTitle[512];
- char szFile[MAX_PATH];
- HINSTANCE hInst = GetModuleHandle(NULL);
-
- LoadString(hInst, IDS_SAVE_TITLE, szTitle, sizeof(szTitle));
- LoadString(hInst, IDS_SAVE_FILETITLE, szFileTitle, sizeof(szFileTitle));
- LoadString(hInst, IDS_SAVE_FILTER, szFilter, sizeof(szFilter));
- for (unsigned i=0; szFilter[i]; i++)
- if (szFilter[i] == '%')
- szFilter[i] = '\0';
-
- strcpy(szFile, "config.xlaunch");
-
- OPENFILENAME ofn;
- memset(&ofn, 0, sizeof(OPENFILENAME));
- ofn.lStructSize = sizeof(OPENFILENAME);
- ofn.hwndOwner = parent;
- ofn.lpstrFilter = szFilter;
- ofn.lpstrFile= szFile;
- ofn.nMaxFile = sizeof(szFile)/ sizeof(*szFile);
- ofn.lpstrFileTitle = szFileTitle;
- ofn.nMaxFileTitle = sizeof(szFileTitle);
- ofn.lpstrInitialDir = (LPSTR)NULL;
- ofn.Flags = OFN_SHOWHELP | OFN_OVERWRITEPROMPT;
- ofn.lpstrTitle = szTitle;
-
- if (GetSaveFileName(&ofn))
- {
- try {
- config.Save(ofn.lpstrFile);
- } catch (std::runtime_error &e)
- {
- printf("Fehler: %s\n", e.what());
- }
- }
- }
+ void FillProgramBox(HWND hwndDlg)
+ {
+ HWND cbwnd = GetDlgItem(hwndDlg, IDC_CLIENT_PROGRAM);
+ if (cbwnd == NULL)
+ return;
+ SendMessage(cbwnd, CB_RESETCONTENT, 0, 0);
+ SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "xcalc");
+ SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "xclock");
+ SendMessage(cbwnd, CB_ADDSTRING, 0, (LPARAM) "xwininfo");
+ SendMessage(cbwnd, CB_SETCURSEL, 0, 0);
+ }
+ void ShowSaveDialog(HWND parent)
+ {
+ char szTitle[512];
+ char szFilter[512];
+ char szFileTitle[512];
+ char szFile[MAX_PATH];
+ HINSTANCE hInst = GetModuleHandle(NULL);
+
+ LoadString(hInst, IDS_SAVE_TITLE, szTitle, sizeof(szTitle));
+ LoadString(hInst, IDS_SAVE_FILETITLE, szFileTitle, sizeof(szFileTitle));
+ LoadString(hInst, IDS_SAVE_FILTER, szFilter, sizeof(szFilter));
+ for (unsigned i=0; szFilter[i]; i++)
+ if (szFilter[i] == '%')
+ szFilter[i] = '\0';
+
+ strcpy(szFile, "config.xlaunch");
+
+ OPENFILENAME ofn;
+ memset(&ofn, 0, sizeof(OPENFILENAME));
+ ofn.lStructSize = sizeof(OPENFILENAME);
+ ofn.hwndOwner = parent;
+ ofn.lpstrFilter = szFilter;
+ ofn.lpstrFile= szFile;
+ ofn.nMaxFile = sizeof(szFile)/ sizeof(*szFile);
+ ofn.lpstrFileTitle = szFileTitle;
+ ofn.nMaxFileTitle = sizeof(szFileTitle);
+ ofn.lpstrInitialDir = (LPSTR)NULL;
+ ofn.Flags = OFN_SHOWHELP | OFN_OVERWRITEPROMPT;
+ ofn.lpstrTitle = szTitle;
+
+ if (GetSaveFileName(&ofn))
+ {
+ try {
+ config.Save(ofn.lpstrFile);
+ } catch (std::runtime_error &e)
+ {
+ char Message[255];
+ sprintf(Message,"Failure: %s\n", e.what());
+ MessageBox(NULL,Message,"Exception",MB_OK);
+ }
+ }
+ }
public:
-
+
/// @brief Handle messages fo the dialog pages.
/// @param hwndDlg Handle of active dialog.
/// @param uMsg Message code.
@@ -376,64 +410,70 @@ class CMyWizard : public CWizard
{
case IDD_DISPLAY:
// Init display dialog. Enable correct check buttons
- switch (config.window)
- {
- default:
- case CConfig::MultiWindow:
- CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_MULTIWINDOW);
- break;
- case CConfig::Fullscreen:
- CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_FULLSCREEN);
- break;
- case CConfig::Windowed:
- CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_WINDOWED);
- break;
- case CConfig::Nodecoration:
- CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_NODECORATION);
- break;
- }
+ switch (config.window)
+ {
+ default:
+ case CConfig::MultiWindow:
+ CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_MULTIWINDOW);
+ break;
+ case CConfig::Fullscreen:
+ CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_FULLSCREEN);
+ break;
+ case CConfig::Windowed:
+ CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_WINDOWED);
+ break;
+ case CConfig::Nodecoration:
+ CheckRadioButton(hwndDlg, IDC_MULTIWINDOW, IDC_NODECORATION, IDC_NODECORATION);
+ break;
+ }
// Set display number
SetDlgItemText(hwndDlg, IDC_DISPLAY, config.display.c_str());
break;
case IDD_CLIENTS:
// Init client dialog. Enable correct check buttons
- switch (config.client)
- {
- default:
- case CConfig::NoClient:
- CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT_NONE);
- break;
- case CConfig::StartProgram:
- CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT);
- break;
- case CConfig::XDMCP:
- CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_XDMCP);
- break;
- }
+ switch (config.client)
+ {
+ default:
+ case CConfig::NoClient:
+ CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT_NONE);
+ break;
+ case CConfig::StartProgram:
+ CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_CLIENT);
+ break;
+ case CConfig::XDMCP:
+ CheckRadioButton(hwndDlg, IDC_CLIENT_NONE, IDC_CLIENT, IDC_XDMCP);
+ break;
+ }
break;
- case IDD_PROGRAM:
+ case IDD_PROGRAM:
// Init program dialog. Check local and remote buttons
CheckRadioButton(hwndDlg, IDC_CLIENT_LOCAL, IDC_CLIENT_REMOTE, config.local?IDC_CLIENT_LOCAL:IDC_CLIENT_REMOTE);
- EnableRemoteProgramGroup(hwndDlg, config.local?FALSE:TRUE);
+ EnableRemoteProgramGroup(hwndDlg, config.local?FALSE:TRUE);
// Fill combo boxes
- FillProgramBox(hwndDlg);
- FillProtocolBox(hwndDlg);
+ FillProgramBox(hwndDlg);
// Set edit fields
- if (!config.program.empty())
- SetDlgItemText(hwndDlg, IDC_CLIENT_PROGRAM, config.program.c_str());
- SetDlgItemText(hwndDlg, IDC_CLIENT_USER, config.user.c_str());
- SetDlgItemText(hwndDlg, IDC_CLIENT_HOST, config.host.c_str());
- break;
- case IDD_XDMCP:
+ if (!config.localprogram.empty())
+ SetDlgItemText(hwndDlg, IDC_CLIENT_PROGRAM, config.localprogram.c_str());
+ if (!config.remoteprogram.empty())
+ SetDlgItemText(hwndDlg, IDC_CLIENT_REMOTEPROGRAM, config.remoteprogram.c_str());
+ SetDlgItemText(hwndDlg, IDC_CLIENT_USER, config.user.c_str());
+ SetDlgItemText(hwndDlg, IDC_CLIENT_HOST, config.host.c_str());
+ SetDlgItemText(hwndDlg, IDC_CLIENT_PASSWORD, config.remotepassword.c_str());
+ break;
+ case IDD_XDMCP:
// Init XDMCP dialog. Check broadcast and indirect button
CheckRadioButton(hwndDlg, IDC_XDMCP_QUERY, IDC_XDMCP_BROADCAST, config.broadcast?IDC_XDMCP_BROADCAST:IDC_XDMCP_QUERY);
CheckDlgButton(hwndDlg, IDC_XDMCP_INDIRECT, config.indirect?BST_CHECKED:BST_UNCHECKED);
- EnableXDMCPQueryGroup(hwndDlg, config.broadcast?FALSE:TRUE);
+ EnableXDMCPQueryGroup(hwndDlg, config.broadcast?FALSE:TRUE);
// Set hostname
- SetDlgItemText(hwndDlg, IDC_XDMCP_HOST, config.xdmcp_host.c_str());
- break;
- case IDD_CLIPBOARD:
+ SetDlgItemText(hwndDlg, IDC_XDMCP_HOST, config.xdmcp_host.c_str());
+ CheckDlgButton(hwndDlg, IDC_XDMCP_TERMINATE, config.xdmcpterminate?BST_CHECKED:BST_UNCHECKED);
+ break;
+ case IDD_EXTRA:
CheckDlgButton(hwndDlg, IDC_CLIPBOARD, config.clipboard?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CLIPBOARDPRIMARY, config.clipboardprimary?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_WGL, config.wgl?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DISABLEAC, config.disableac?BST_CHECKED:BST_UNCHECKED);
SetDlgItemText(hwndDlg, IDC_EXTRA_PARAMS, config.extra_params.c_str());
break;
@@ -453,15 +493,15 @@ class CMyWizard : public CWizard
// Disable unavailable controls
case IDC_CLIENT_REMOTE:
case IDC_CLIENT_LOCAL:
- EnableRemoteProgramGroup(hwndDlg, LOWORD(wParam) == IDC_CLIENT_REMOTE);
+ EnableRemoteProgramGroup(hwndDlg, LOWORD(wParam) == IDC_CLIENT_REMOTE);
+ break;
+ case IDC_XDMCP_QUERY:
+ case IDC_XDMCP_BROADCAST:
+ EnableXDMCPQueryGroup(hwndDlg, LOWORD(wParam) == IDC_XDMCP_QUERY);
+ break;
+ case IDC_FINISH_SAVE:
+ ShowSaveDialog(hwndDlg);
break;
- case IDC_XDMCP_QUERY:
- case IDC_XDMCP_BROADCAST:
- EnableXDMCPQueryGroup(hwndDlg, LOWORD(wParam) == IDC_XDMCP_QUERY);
- break;
- case IDC_FINISH_SAVE:
- ShowSaveDialog(hwndDlg);
- break;
}
}
// pass messages to parent
@@ -489,54 +529,57 @@ class CMyWizard : public CWizard
return NULL;
}
- /// @brief Do the actual start of Xming and clients
- void StartUp()
- {
- std::string buffer;
- std::string client;
+ /// @brief Do the actual start of VCXsrv and clients
+ void StartUp()
+ {
+ std::string buffer;
+ std::string client;
// Construct display strings
- std::string display_id = ":" + config.display;
- std::string display = "localhost" + display_id + ":0";
-
-#ifdef _DEBUG
- // Debug only: Switch to Xming installation directory
- SetCurrentDirectory("C:\\Programme\\Xming");
-#endif
+ std::string display_id = ":" + config.display;
+ std::string display = "DISPLAY=127.0.0.1" + display_id + ".0";
- // Build Xming commandline
- buffer = "Xming " + display_id + " ";
- switch (config.window)
- {
- case CConfig::MultiWindow:
- buffer += "-multiwindow ";
- break;
- case CConfig::Fullscreen:
- buffer += "-fullscreen ";
- break;
- case CConfig::Nodecoration:
- buffer += "-nodecoration ";
- break;
- default:
- break;
- }
+ // Build Xsrv commandline
+ buffer = "vcxsrv " + display_id + " ";
+ switch (config.window)
+ {
+ case CConfig::MultiWindow:
+ buffer += "-multiwindow ";
+ break;
+ case CConfig::Fullscreen:
+ buffer += "-fullscreen ";
+ break;
+ case CConfig::Nodecoration:
+ buffer += "-nodecoration ";
+ break;
+ default:
+ break;
+ }
// Add XDMCP parameter
- if (config.client == CConfig::XDMCP)
- {
- if (config.broadcast)
- buffer += "-broadcast ";
- else
- {
- if (config.indirect)
- buffer += "-indirect ";
- else
- buffer += "-query ";
- buffer += config.xdmcp_host;
- buffer += " ";
- }
- }
+ if (config.client == CConfig::XDMCP)
+ {
+ if (config.broadcast)
+ buffer += "-broadcast ";
+ else
+ {
+ if (config.indirect)
+ buffer += "-indirect ";
+ else
+ buffer += "-query ";
+ buffer += config.xdmcp_host;
+ buffer += " ";
+ }
+ if (config.xdmcpterminate)
+ buffer += "-terminate ";
+ }
if (config.clipboard)
buffer += "-clipboard ";
+ if (!config.clipboardprimary)
+ buffer += "-noclipboardprimary ";
+ if (config.wgl)
+ buffer += "-wgl ";
+ if (config.disableac)
+ buffer += "-ac ";
if (!config.extra_params.empty())
{
buffer += config.extra_params;
@@ -544,52 +587,57 @@ class CMyWizard : public CWizard
}
// Construct client commandline
- if (config.client == CConfig::StartProgram)
- {
- if (!config.local)
- {
- char cmdline[512];
+ if (config.client == CConfig::StartProgram)
+ {
+ if (!config.local)
+ {
+ char cmdline[512];
std::string host = config.host;
+ std::string remotepassword;
if (!config.user.empty())
host = config.user + "@" + config.host;
- if (config.protocol == "Putty")
- snprintf(cmdline,512,"plink -X %s %s",
- host.c_str(),config.program.c_str());
- else
- snprintf(cmdline,512,"ssh -Y %s %s",
- host.c_str(),config.program.c_str());
- client += cmdline;
- } else
- client += config.program.c_str();
- }
+ if (!config.remotepassword.empty())
+ remotepassword=std::string(" -pw ")+config.remotepassword;
+ _snprintf(cmdline,512,"plink -ssh -X%s %s %s",
+ remotepassword.c_str(), host.c_str(),config.remoteprogram.c_str());
+ client += cmdline;
+ }
+ else
+ {
+ client += config.localprogram.c_str();
+ }
+ }
// Prepare program startup
- STARTUPINFO si, sic;
- PROCESS_INFORMATION pi, pic;
- HANDLE handles[2];
- DWORD hcount = 0;
+ STARTUPINFO si, sic;
+ PROCESS_INFORMATION pi, pic;
+ HANDLE handles[2];
+ DWORD hcount = 0;
Display *dpy = NULL;
- ZeroMemory( &si, sizeof(si) );
- si.cb = sizeof(si);
- ZeroMemory( &pi, sizeof(pi) );
- ZeroMemory( &sic, sizeof(sic) );
- sic.cb = sizeof(sic);
- ZeroMemory( &pic, sizeof(pic) );
+ ZeroMemory( &si, sizeof(si) );
+ si.cb = sizeof(si);
+ ZeroMemory( &pi, sizeof(pi) );
+ ZeroMemory( &sic, sizeof(sic) );
+ sic.cb = sizeof(sic);
+ ZeroMemory( &pic, sizeof(pic) );
- // Start Xming process.
+ // Start VCXsrv process.
#ifdef _DEBUG
- printf("%s\n", buffer.c_str());
+ printf("%s\n", buffer.c_str());
#endif
- if( !CreateProcess( NULL, (CHAR*)buffer.c_str(), NULL, NULL,
- FALSE, 0, NULL, NULL, &si, &pi ))
- throw win32_error("CreateProcess failed");
- handles[hcount++] = pi.hProcess;
-
- if (!client.empty())
- {
+ char CurDir[MAX_PATH];
+ GetModuleFileName(NULL,CurDir,MAX_PATH);
+ *strrchr(CurDir,'\\')=0;
+ if( !CreateProcess( NULL, (CHAR*)buffer.c_str(), NULL, NULL,
+ FALSE, 0, NULL, CurDir, &si, &pi ))
+ throw win32_error("CreateProcess failed");
+ handles[hcount++] = pi.hProcess;
+
+ if (!client.empty())
+ {
// Set DISPLAY variable
- SetEnvironmentVariable("DISPLAY",display.c_str());
+ _putenv(display.c_str());
// Wait for server to startup
dpy = WaitForServer(pi.hProcess);
@@ -597,59 +645,62 @@ class CMyWizard : public CWizard
{
while (hcount--)
TerminateProcess(handles[hcount], (DWORD)-1);
- throw std::runtime_error("Connection to server failed");
+ throw std::runtime_error("Connection to server failed");
}
#ifdef _DEBUG
- printf("%s\n", client.c_str());
+ printf("%s\n", client.c_str());
#endif
// Hide a console window
// FIXME: This may make it impossible to enter the password
- sic.dwFlags = STARTF_USESHOWWINDOW;
- sic.wShowWindow = SW_HIDE;
-
- // Start the child process.
- if( !CreateProcess( NULL, (CHAR*)client.c_str(), NULL, NULL,
- FALSE, 0, NULL, NULL, &sic, &pic ))
- {
+ sic.dwFlags = STARTF_USESHOWWINDOW;
+ sic.wShowWindow = SW_HIDE;
+
+ // Start the child process.
+ if( !CreateProcess( NULL, (CHAR*)client.c_str(), NULL, NULL,
+ FALSE, 0, NULL, CurDir, &sic, &pic ))
+ {
DWORD err = GetLastError();
while (hcount--)
TerminateProcess(handles[hcount], (DWORD)-1);
- throw win32_error("CreateProcess failed", err);
- }
- handles[hcount++] = pic.hProcess;
- }
+ throw win32_error("CreateProcess failed", err);
+ }
+ handles[hcount++] = pic.hProcess;
+ }
- // Wait until any child process exits.
- DWORD ret = WaitForMultipleObjects(hcount, handles, FALSE, INFINITE );
+ // Wait until any child process exits.
+ DWORD ret = WaitForMultipleObjects(hcount, handles, FALSE, INFINITE );
#ifdef _DEBUG
- printf("killing process!\n");
+ printf("killing process!\n");
#endif
- // Check if Xming is still running
- DWORD exitcode;
- GetExitCodeProcess(pi.hProcess, &exitcode);
- unsigned counter = 0;
- while (exitcode == STILL_ACTIVE)
- {
- if (++counter > 10)
- TerminateProcess(pi.hProcess, (DWORD)-1);
- else
- // Shutdown Xming (the soft way!)
- EnumThreadWindows(pi.dwThreadId, KillWindowsProc, 0);
- Sleep(500);
- GetExitCodeProcess(pi.hProcess, &exitcode);
- }
- // Kill the client
- TerminateProcess(pic.hProcess, (DWORD)-1);
+ // Check if Xsrv is still running, but only when we started a local program
+ if (config.local)
+ {
+ DWORD exitcode;
+ GetExitCodeProcess(pi.hProcess, &exitcode);
+ unsigned counter = 0;
+ while (exitcode == STILL_ACTIVE)
+ {
+ if (++counter > 10)
+ TerminateProcess(pi.hProcess, (DWORD)-1);
+ else
+ // Shutdown Xsrv (the soft way!)
+ EnumThreadWindows(pi.dwThreadId, KillWindowsProc, 0);
+ Sleep(500);
+ GetExitCodeProcess(pi.hProcess, &exitcode);
+ }
+ // Kill the client
+ TerminateProcess(pic.hProcess, (DWORD)-1);
+ }
- // Close process and thread handles.
- CloseHandle( pi.hProcess );
- CloseHandle( pi.hThread );
- CloseHandle( pic.hProcess );
- CloseHandle( pic.hThread );
- }
+ // Close process and thread handles.
+ CloseHandle( pi.hProcess );
+ CloseHandle( pi.hThread );
+ CloseHandle( pic.hProcess );
+ CloseHandle( pic.hThread );
+ }
};
int main(int argc, char **argv)
@@ -658,39 +709,41 @@ int main(int argc, char **argv)
InitCommonControls();
CMyWizard dialog;
- bool skip_wizard = false;
+ bool skip_wizard = false;
- for (int i = 1; i < argc; i++)
- {
- if (argv[i] == NULL)
- continue;
-
- std::string arg(argv[i]);
- if (arg == "-load" && i + 1 < argc)
- {
- i++;
- dialog.LoadConfig(argv[i]);
- continue;
- }
- if (arg == "-run" && i + 1 < argc)
- {
- i++;
- dialog.LoadConfig(argv[i]);
- skip_wizard = true;
- continue;
- }
- }
+ for (int i = 1; i < argc; i++)
+ {
+ if (argv[i] == NULL)
+ continue;
+
+ std::string arg(argv[i]);
+ if (arg == "-load" && i + 1 < argc)
+ {
+ i++;
+ dialog.LoadConfig(argv[i]);
+ continue;
+ }
+ if (arg == "-run" && i + 1 < argc)
+ {
+ i++;
+ dialog.LoadConfig(argv[i]);
+ skip_wizard = true;
+ continue;
+ }
+ }
- int ret = 0;
+ int ret = 0;
if (skip_wizard || (ret =dialog.ShowModal()) != 0)
- dialog.StartUp();
+ dialog.StartUp();
#ifdef _DEBUG
- printf("return %d\n", ret);
+ printf("return %d\n", ret);
#endif
- return 0;
+ return 0;
} catch (std::runtime_error &e)
{
- printf("Fehler: %s\n", e.what());
+ char Message[255];
+ sprintf(Message,"Failure: %s\n", e.what());
+ MessageBox(NULL,Message,"Exception",MB_OK);
return -1;
}
}
diff --git a/xorg-server/hw/xwin/xlaunch/makefile b/xorg-server/hw/xwin/xlaunch/makefile
new file mode 100644
index 000000000..b97d7ecb6
--- /dev/null
+++ b/xorg-server/hw/xwin/xlaunch/makefile
@@ -0,0 +1,36 @@
+INCLUDELIBFILES = window\$(OBJDIR)\window.lib \
+ $(MHMAKECONF)\libx11\src\$(OBJDIR)\libx11.lib \
+ $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \
+ $(MHMAKECONF)\libxau\$(OBJDIR)\libxau.lib \
+ $(MHMAKECONF)\libx11\src\xlibi18n\$(OBJDIR)\libi18n.lib \
+ $(MHMAKECONF)\libx11\modules\lc\xlocale\$(OBJDIR)\libxlocale.lib \
+ $(MHMAKECONF)\libx11\modules\lc\utf8\$(OBJDIR)\libxlcUTF8Load.lib \
+ $(MHMAKECONF)\libx11\modules\lc\gen\$(OBJDIR)\liblcGenConvLoad.lib \
+ $(MHMAKECONF)\libx11\modules\lc\def\$(OBJDIR)\libxlcDef.lib \
+ $(MHMAKECONF)\libx11\src\xkb\$(OBJDIR)\libxkb.lib \
+ $(MHMAKECONF)\libx11\modules\im\ximcp\$(OBJDIR)\libximcp.lib \
+ $(MHMAKECONF)\libx11\modules\om\generic\$(OBJDIR)\libxomGeneric.lib
+
+CSRCS=config.cc main.cc
+
+INCLUDES += $(MHMAKECONF)\libxml2\include
+
+WINAPP = xlaunch
+
+RESOURCES = resources.rc
+
+$(OBJDIR)\%.res : resources\%.rc $(wildcard resources\*.rc)
+ $(RC) $(RCFLAGS) $(RCDEFINES:%=-d "%") $(RCINCLUDES:%=-i %) -Fo$(relpath $@) $<
+
+LIBDIRS=$(dir $(INCLUDELIBFILES))
+
+load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=$(MAKESERVER) DEBUG=$(DEBUG);)
+
+LINKLIBS += $(MHMAKECONF)\libxml2\lib\libxml2.lib
+
+ifeq ($(DEBUG),1)
+LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2d.lib
+else
+LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2.lib
+endif
+
diff --git a/xorg-server/hw/xwin/xlaunch/resources/dialog.rc b/xorg-server/hw/xwin/xlaunch/resources/dialog.rc
index 8b00df4ef..d7f1aa46f 100644
--- a/xorg-server/hw/xwin/xlaunch/resources/dialog.rc
+++ b/xorg-server/hw/xwin/xlaunch/resources/dialog.rc
@@ -68,19 +68,25 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION STR_CAPTION_PROGRAM
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT STR_CLIENT_PROGRAM_DESC,IDC_CLIENT_PROGRAM_DESC,7,14,64,10
- COMBOBOX IDC_CLIENT_PROGRAM,70,12,64,54,CBS_DROPDOWN | WS_VSCROLL
+ AUTORADIOBUTTON STR_CLIENT_LOCAL,IDC_CLIENT_LOCAL,7,14,300,10
+ AUTORADIOBUTTON STR_CLIENT_REMOTE,IDC_CLIENT_REMOTE,7,50,300,10
- AUTORADIOBUTTON STR_CLIENT_LOCAL,IDC_CLIENT_LOCAL,7,28,300,10
- AUTORADIOBUTTON STR_CLIENT_REMOTE,IDC_CLIENT_REMOTE,7,42,300,10
+ LTEXT STR_CLIENT_PROGRAM_DESC,IDC_CLIENT_PROGRAM_DESC,19,28,64,10
+ COMBOBOX IDC_CLIENT_PROGRAM,100,26,64,54,CBS_DROPDOWN | WS_VSCROLL
+
+
+ LTEXT STR_CLIENT_REMOTEPROGRAM_DESC,IDC_CLIENT_REMOTEPROGRAM_DESC,19,64,70,10
+ EDITTEXT IDC_CLIENT_REMOTEPROGRAM,100,62,200,12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL
+
+ LTEXT STR_CLIENT_PASSWORD_DESC,IDC_CLIENT_PASSWORD_DESC,19,78,70,10
+ EDITTEXT IDC_CLIENT_PASSWORD,100,76,64,12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL
- LTEXT STR_CLIENT_PROTOCOL_DESC,IDC_CLIENT_PROTOCOL_DESC,19,56,70,10
- COMBOBOX IDC_CLIENT_PROTOCOL,100,54,64,54,CBS_DROPDOWNLIST | WS_VSCROLL
+
+ LTEXT STR_CLIENT_HOST_DESC,IDC_CLIENT_HOST_DESC,19,92,70,10
+ EDITTEXT IDC_CLIENT_HOST,100,90,64,12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL
- LTEXT STR_CLIENT_HOST_DESC,IDC_CLIENT_HOST_DESC,19,70,70,10
- LTEXT STR_CLIENT_USER_DESC,IDC_CLIENT_USER_DESC,19,84,70,10
- EDITTEXT IDC_CLIENT_HOST,100,68,64,12
- EDITTEXT IDC_CLIENT_USER,100,82,64,12
+ LTEXT STR_CLIENT_USER_DESC,IDC_CLIENT_USER_DESC,19,106,70,10
+ EDITTEXT IDC_CLIENT_USER,100,104,64,12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL
END
IDD_XDMCP DIALOGEX 0, 0, 317, 143
@@ -92,19 +98,29 @@ BEGIN
EDITTEXT IDC_XDMCP_HOST,78,12,64,12
AUTOCHECKBOX STR_XDMCP_INDIRECT,IDC_XDMCP_INDIRECT,19,28,280,10
AUTORADIOBUTTON STR_XDMCP_BROADCAST, IDC_XDMCP_BROADCAST,7,42,300,10
- LTEXT STR_XDMCP_QUERY_DESC,IDC_XDMCP_QUERY_DESC,7,56,300,42
+ LTEXT STR_XDMCP_QUERY_DESC,IDC_XDMCP_QUERY_DESC,7,66,300,42
+ AUTOCHECKBOX STR_XDMCP_TERMINATE,IDC_XDMCP_TERMINATE,7,94,300,10
END
-IDD_CLIPBOARD DIALOGEX 0, 0, 317, 143
+IDD_EXTRA DIALOGEX 0, 0, 317, 143
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_CENTERMOUSE
-CAPTION STR_CAPTION_CLIPBOARD
+CAPTION STR_CAPTION_EXTRA
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- AUTOCHECKBOX STR_CLIPBOARD,IDC_CLIPBOARD,7,14,300,10
- LTEXT STR_CLIPBOARD_DESC,IDC_CLIPBOARD_DESC,19,28,280,27
+ AUTOCHECKBOX STR_CLIPBOARD,IDC_CLIPBOARD,7,10,300,10
+ LTEXT STR_CLIPBOARD_DESC,IDC_CLIPBOARD_DESC,19,20,280,27
+
+ AUTOCHECKBOX STR_CLIPBOARDPRIMARY,IDC_CLIPBOARDPRIMARY,19,30,300,10
+ LTEXT STR_CLIPBOARDPRIMARY_DESC,IDC_CLIPBOARDPRIMARY_DESC,31,40,280,27
+
+ AUTOCHECKBOX STR_WGL,IDC_WGL,7,52,300,10
+ LTEXT STR_WGL_DESC,IDC_WGL_DESC,19,62,280,27
+
+ AUTOCHECKBOX STR_DISABLEAC,IDC_DISABLEAC,7,82,300,10
+ LTEXT STR_DISABLEAC_DESC,IDC_DISABLEAC_DESC,19,92,280,27
- LTEXT STR_EXTRA_PARAMS_DESC,IDC_EXTRA_PARAMS_DESC,7,56,280,10
- EDITTEXT IDC_EXTRA_PARAMS,7,70,128,12
+ LTEXT STR_EXTRA_PARAMS_DESC,IDC_EXTRA_PARAMS_DESC,7,105,280,10
+ EDITTEXT IDC_EXTRA_PARAMS,7,115,300,12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL
END
IDD_FINISH DIALOGEX 0, 0, 317, 143
diff --git a/xorg-server/hw/xwin/xlaunch/resources/resources.h b/xorg-server/hw/xwin/xlaunch/resources/resources.h
index 470005192..03f3dac1f 100644
--- a/xorg-server/hw/xwin/xlaunch/resources/resources.h
+++ b/xorg-server/hw/xwin/xlaunch/resources/resources.h
@@ -24,76 +24,88 @@
* use or other dealings in this Software without prior written authorization.
*/
-#define IDC_STATIC -1
+#define IDC_STATIC -1
-#define IDD_WELCOME 100
-#define IDD_FINISH 101
-#define IDD_DISPLAY 102
-#define IDD_CLIENTS 103
-#define IDD_PROGRAM 104
-#define IDD_XDMCP 105
-#define IDD_FONTPATH 106
-#define IDD_CLIPBOARD 107
+#define IDD_WELCOME 100
+#define IDD_FINISH 101
+#define IDD_DISPLAY 102
+#define IDD_CLIENTS 103
+#define IDD_PROGRAM 104
+#define IDD_XDMCP 105
+#define IDD_FONTPATH 106
+#define IDD_EXTRA 107
-#define IDS_DISPLAY_TITLE 300
-#define IDS_DISPLAY_SUBTITLE 301
-#define IDS_CLIENTS_TITLE 302
-#define IDS_CLIENTS_SUBTITLE 303
-#define IDS_PROGRAM_TITLE 304
-#define IDS_PROGRAM_SUBTITLE 305
-#define IDS_XDMCP_TITLE 306
-#define IDS_XDMCP_SUBTITLE 307
-#define IDS_FONTPATH_TITLE 308
-#define IDS_FONTPATH_SUBTITLE 309
-#define IDS_FINISH_TITLE 310
-#define IDS_FINISH_SUBTITLE 311
-#define IDS_CLIPBOARD_TITLE 312
-#define IDS_CLIPBOARD_SUBTITLE 313
-#define IDS_SAVE_TITLE 320
-#define IDS_SAVE_FILETITLE 321
-#define IDS_SAVE_FILTER 322
-
-#define IDC_MULTIWINDOW 200
-#define IDC_WINDOWED 201
-#define IDC_FULLSCREEN 202
-#define IDC_NODECORATION 203
-#define IDC_MULTIWINDOW_IMG 204
-#define IDC_WINDOWED_IMG 205
-#define IDC_FULLSCREEN_IMG 206
-#define IDC_NODECORATION_IMG 207
-#define IDC_DISPLAY 208
-#define IDC_DISPLAY_DESC 209
+#define IDI_XLAUNCH 108
+
+#define IDC_MULTIWINDOW 200
+#define IDC_WINDOWED 201
+#define IDC_FULLSCREEN 202
+#define IDC_NODECORATION 203
+#define IDC_MULTIWINDOW_IMG 204
+#define IDC_WINDOWED_IMG 205
+#define IDC_FULLSCREEN_IMG 206
+#define IDC_NODECORATION_IMG 207
+#define IDC_DISPLAY 208
+#define IDC_DISPLAY_DESC 209
-#define IDC_CLIENT_NONE 210
-#define IDC_XDMCP 211
-#define IDC_CLIENT 212
-#define IDC_CLIENT_LOCAL 213
-#define IDC_CLIENT_REMOTE 214
-#define IDC_CLIENT_HOST 215
-#define IDC_CLIENT_USER 216
-#define IDC_CLIENT_PROTOCOL 217
-#define IDC_CLIENT_CONFIGURE 218
-#define IDC_CLIENT_PROGRAM 219
-#define IDC_XDMCP_QUERY 220
-#define IDC_XDMCP_BROADCAST 221
-#define IDC_XDMCP_INDIRECT 222
-#define IDC_XDMCP_HOST 223
-#define IDC_CLIENT_NONE_DESC 224
-#define IDC_XDMCP_DESC 225
-#define IDC_CLIENT_DESC 226
-#define IDC_XDMCP_QUERY_DESC 227
-#define IDC_CLIENT_PROGRAM_DESC 228
-#define IDC_CLIENT_HOST_DESC 229
-#define IDC_CLIENT_USER_DESC 230
-#define IDC_CLIENT_PROTOCOL_DESC 231
+#define IDC_CLIENT_NONE 210
+#define IDC_XDMCP 211
+#define IDC_CLIENT 212
+#define IDC_CLIENT_LOCAL 213
+#define IDC_CLIENT_REMOTE 214
+#define IDC_CLIENT_HOST 215
+#define IDC_CLIENT_USER 216
+#define IDC_CLIENT_PASSWORD 217
+#define IDC_CLIENT_CONFIGURE 218
+#define IDC_CLIENT_PROGRAM 219
+#define IDC_XDMCP_QUERY 220
+#define IDC_XDMCP_BROADCAST 221
+#define IDC_XDMCP_INDIRECT 222
+#define IDC_XDMCP_HOST 223
+#define IDC_CLIENT_NONE_DESC 224
+#define IDC_XDMCP_DESC 225
+#define IDC_CLIENT_DESC 226
+#define IDC_XDMCP_QUERY_DESC 227
+#define IDC_CLIENT_PROGRAM_DESC 228
+#define IDC_CLIENT_HOST_DESC 229
+#define IDC_CLIENT_USER_DESC 230
+#define IDC_CLIENT_PASSWORD_DESC 231
+#define IDC_CLIENT_REMOTEPROGRAM 232
+#define IDC_CLIENT_REMOTEPROGRAM_DESC 233
-#define IDC_FONTPATH_DESC 240
+#define IDC_FONTPATH_DESC 240
-#define IDC_FINISH_DESC 250
-#define IDC_FINISH_SAVE 251
-#define IDC_FINISH_SAVE_DESC 252
+#define IDC_FINISH_DESC 250
+#define IDC_FINISH_SAVE 251
+#define IDC_FINISH_SAVE_DESC 252
-#define IDC_CLIPBOARD 260
-#define IDC_CLIPBOARD_DESC 261
-#define IDC_EXTRA_PARAMS 262
-#define IDC_EXTRA_PARAMS_DESC 263
+#define IDC_CLIPBOARD 260
+#define IDC_CLIPBOARD_DESC 261
+#define IDC_EXTRA_PARAMS 262
+#define IDC_EXTRA_PARAMS_DESC 263
+#define IDC_WGL 264
+#define IDC_WGL_DESC 265
+#define IDC_CLIPBOARDPRIMARY 266
+#define IDC_CLIPBOARDPRIMARY_DESC 267
+#define IDC_DISABLEAC 268
+#define IDC_DISABLEAC_DESC 269
+#define IDC_XDMCP_TERMINATE 270
+
+#define IDS_DISPLAY_TITLE 300
+#define IDS_DISPLAY_SUBTITLE 301
+#define IDS_CLIENTS_TITLE 302
+#define IDS_CLIENTS_SUBTITLE 303
+#define IDS_PROGRAM_TITLE 304
+#define IDS_PROGRAM_SUBTITLE 305
+#define IDS_XDMCP_TITLE 306
+#define IDS_XDMCP_SUBTITLE 307
+#define IDS_FONTPATH_TITLE 308
+#define IDS_FONTPATH_SUBTITLE 309
+#define IDS_FINISH_TITLE 310
+#define IDS_FINISH_SUBTITLE 311
+#define IDS_EXTRA_TITLE 312
+#define IDS_EXTRA_SUBTITLE 313
+#define IDS_SAVE_TITLE 320
+#define IDS_SAVE_FILETITLE 321
+#define IDS_SAVE_FILTER 322
+
diff --git a/xorg-server/hw/xwin/xlaunch/resources/resources.rc b/xorg-server/hw/xwin/xlaunch/resources/resources.rc
index 07fd52f32..e3df4610a 100644
--- a/xorg-server/hw/xwin/xlaunch/resources/resources.rc
+++ b/xorg-server/hw/xwin/xlaunch/resources/resources.rc
@@ -28,3 +28,5 @@
#include "resources.h"
#include "images.rc"
#include "dialog.rc"
+
+IDI_XLAUNCH ICON "..\\..\\X.ico"
diff --git a/xorg-server/hw/xwin/xlaunch/resources/strings.rc b/xorg-server/hw/xwin/xlaunch/resources/strings.rc
index 5a9cd281b..dab2b30af 100644
--- a/xorg-server/hw/xwin/xlaunch/resources/strings.rc
+++ b/xorg-server/hw/xwin/xlaunch/resources/strings.rc
@@ -40,13 +40,15 @@
#define STR_XDMCP_DESC "This will start a remote XDMCP session. Starting local clients later is limited. This option is not available with the ""Multiple windows"" mode."
#define STR_CAPTION_PROGRAM "Start program"
-#define STR_CLIENT_PROGRAM_DESC "Start program"
+#define STR_CLIENT_PROGRAM_DESC "Local program"
#define STR_CLIENT_LOCAL "Start program on this computer"
#define STR_CLIENT_REMOTE "Start program on remote computer"
-#define STR_CLIENT_PROTOCOL_DESC "Connect using"
+#define STR_CLIENT_PASSWORD_DESC "Password"
#define STR_CLIENT_HOST_DESC "Connect to computer"
#define STR_CLIENT_USER_DESC "Login as user"
+#define STR_CLIENT_REMOTEPROGRAM_DESC "Remote program"
+
#define STR_CAPTION_XDMCP "XDMCP settings"
#define STR_XDMCP_QUERY "Connect to host"
@@ -57,18 +59,27 @@
#define STR_CAPTION_FONTPATH "Fontpath settings"
-#define STR_CAPTION_CLIPBOARD "Clipboard settings"
+#define STR_CAPTION_EXTRA "Extra settings"
#define STR_CLIPBOARD "Clipboard"
#define STR_CLIPBOARD_DESC "Start the integrated clipboard manager"
-#define STR_EXTRA_PARAMS_DESC "Additional parameters for Xming"
+#define STR_CLIPBOARDPRIMARY "Primary Selection"
+#define STR_CLIPBOARDPRIMARY_DESC "Also map the PRIMARY selection to the windows clipboard."
+#define STR_WGL "Native opengl"
+#define STR_WGL_DESC "Use the native windows opengl library (wgl). Make sure to export the LIBGL_ALWAYS_INDIRECT environment variable."
+#define STR_EXTRA_PARAMS_DESC "Additional parameters for VcXsrv"
+
+#define STR_DISABLEAC "Disable access control"
+#define STR_DISABLEAC_DESC "Use this when you want vcxsrv to accept connections from all clients."
+
+#define STR_XDMCP_TERMINATE "Terminate on server reset."
#define STR_CAPTION_FINISH "Finish configuration"
-#define STR_FINISH_DESC "Configuration is complete. Clish Finish to start Xming."
+#define STR_FINISH_DESC "Configuration is complete. Click Finish to start VcXsrv."
#define STR_FINISH_SAVE_DESC "You may also save the configuration for later use."
#define STR_FINISH_SAVE "Save configuration"
#define STR_DISPLAY_TITLE "Select display settings"
-#define STR_DISPLAY_SUBTITLE "Choose how Xming display programs"
+#define STR_DISPLAY_SUBTITLE "Choose how VcXsrv display programs"
#define STR_CLIENTS_TITLE "Select how to start clients"
#define STR_CLIENTS_SUBTITLE ""
#define STR_PROGRAM_TITLE "Specify the program to start"
@@ -79,8 +90,8 @@
#define STR_FONTPATH_SUBTITLE ""
#define STR_FINISH_TITLE "Configuration complete"
#define STR_FINISH_SUBTITLE ""
-#define STR_CLIPBOARD_TITLE "Clipboard settings"
-#define STR_CLIPBOARD_SUBTITLE ""
+#define STR_EXTRA_TITLE "Extra settings"
+#define STR_EXTRA_SUBTITLE ""
#define STR_SAVE_TITLE "Save configuration"
#define STR_SAVE_FILETITLE "Filename"
@@ -100,9 +111,9 @@ BEGIN
IDS_FONTPATH_SUBTITLE STR_FONTPATH_SUBTITLE
IDS_FINISH_TITLE STR_FINISH_TITLE
IDS_FINISH_SUBTITLE STR_FINISH_SUBTITLE
- IDS_CLIPBOARD_TITLE STR_CLIPBOARD_TITLE
- IDS_CLIPBOARD_SUBTITLE STR_CLIPBOARD_SUBTITLE
- IDS_SAVE_TITLE STR_SAVE_TITLE
+ IDS_EXTRA_TITLE STR_EXTRA_TITLE
+ IDS_EXTRA_SUBTITLE STR_EXTRA_SUBTITLE
+ IDS_SAVE_TITLE STR_SAVE_TITLE
IDS_SAVE_FILETITLE STR_SAVE_FILETITLE
IDS_SAVE_FILTER STR_SAVE_FILTER
END
diff --git a/xorg-server/hw/xwin/xlaunch/window/makefile b/xorg-server/hw/xwin/xlaunch/window/makefile
new file mode 100644
index 000000000..18a33e728
--- /dev/null
+++ b/xorg-server/hw/xwin/xlaunch/window/makefile
@@ -0,0 +1,4 @@
+CSRCS=dialog.cc util.cc window.cc wizard.cc
+
+LIBRARY = window
+
diff --git a/xorg-server/hw/xwin/xlaunch/window/util.cc b/xorg-server/hw/xwin/xlaunch/window/util.cc
index fb7e87297..6f768348e 100644
--- a/xorg-server/hw/xwin/xlaunch/window/util.cc
+++ b/xorg-server/hw/xwin/xlaunch/window/util.cc
@@ -25,6 +25,8 @@
*/
#include "util.h"
+const char * MessageDebug::notify_names[NOTIFY_NAMES_LEN];
+
std::string win32_error::message(DWORD errorcode)
{
LPVOID lpMsgBuf;
diff --git a/xorg-server/hw/xwin/xlaunch/window/util.h b/xorg-server/hw/xwin/xlaunch/window/util.h
index cd21da657..a1196b115 100644
--- a/xorg-server/hw/xwin/xlaunch/window/util.h
+++ b/xorg-server/hw/xwin/xlaunch/window/util.h
@@ -28,7 +28,7 @@
#include <windows.h>
#include <stdexcept>
-
+#include <string>
class win32_error : public std::runtime_error
{
@@ -39,7 +39,7 @@ class win32_error : public std::runtime_error
};
#define MESSAGE_NAMES_LEN 1024
-#define NOTIFY_NAMES_LEN 0
+#define NOTIFY_NAMES_LEN 1
class MessageDebug
{
protected:
diff --git a/xorg-server/hw/xwin/xlaunch/window/wizard.h b/xorg-server/hw/xwin/xlaunch/window/wizard.h
index a2361c51c..c576cc093 100644
--- a/xorg-server/hw/xwin/xlaunch/window/wizard.h
+++ b/xorg-server/hw/xwin/xlaunch/window/wizard.h
@@ -29,7 +29,6 @@
#include "dialog.h"
#include <vector>
-#define _WIN32_IE 0x0500
#include <prsht.h>
class CWizard : public CBaseDialog
diff --git a/xorg-server/include/Makefile.am b/xorg-server/include/Makefile.am
index 6f63c764f..5b2e4cc58 100644
--- a/xorg-server/include/Makefile.am
+++ b/xorg-server/include/Makefile.am
@@ -1,72 +1,72 @@
-if XORG
-sdk_HEADERS = \
- XIstubs.h \
- Xprintf.h \
- callback.h \
- client.h \
- closestr.h \
- closure.h \
- colormap.h \
- colormapst.h \
- hotplug.h \
- cursor.h \
- cursorstr.h \
- dix.h \
- dixaccess.h \
- dixevents.h \
- dixfont.h \
- dixfontstr.h \
- dixgrabs.h \
- dixstruct.h \
- events.h \
- exevents.h \
- extension.h \
- extinit.h \
- extnsionst.h \
- gc.h \
- gcstruct.h \
- globals.h \
- input.h \
- inputstr.h \
- list.h \
- misc.h \
- miscstruct.h \
- opaque.h \
- os.h \
- pixmap.h \
- pixmapstr.h \
- privates.h \
- property.h \
- propertyst.h \
- ptrveloc.h \
- region.h \
- regionstr.h \
- registry.h \
- resource.h \
- rgb.h \
- screenint.h \
- scrnintstr.h \
- selection.h \
- servermd.h \
- site.h \
- swaprep.h \
- swapreq.h \
- validate.h \
- window.h \
- windowstr.h \
- xkbfile.h \
- xkbsrv.h \
- xkbstr.h \
- xkbrules.h \
- xserver-properties.h
-
-nodist_sdk_HEADERS = xorg-server.h
-endif
-
-AM_CFLAGS = $(DIX_CFLAGS)
-
-EXTRA_DIST = \
- dix-config-apple-verbatim.h \
- eventconvert.h eventstr.h inpututils.h \
- protocol-versions.h \
- xsha1.h
+if XORG
+sdk_HEADERS = \
+ XIstubs.h \
+ Xprintf.h \
+ callback.h \
+ client.h \
+ closestr.h \
+ closure.h \
+ colormap.h \
+ colormapst.h \
+ hotplug.h \
+ cursor.h \
+ cursorstr.h \
+ dix.h \
+ dixaccess.h \
+ dixevents.h \
+ dixfont.h \
+ dixfontstr.h \
+ dixgrabs.h \
+ dixstruct.h \
+ events.h \
+ exevents.h \
+ extension.h \
+ extinit.h \
+ extnsionst.h \
+ gc.h \
+ gcstruct.h \
+ globals.h \
+ input.h \
+ inputstr.h \
+ list.h \
+ misc.h \
+ miscstruct.h \
+ opaque.h \
+ os.h \
+ pixmap.h \
+ pixmapstr.h \
+ privates.h \
+ property.h \
+ propertyst.h \
+ ptrveloc.h \
+ region.h \
+ regionstr.h \
+ registry.h \
+ resource.h \
+ rgb.h \
+ screenint.h \
+ scrnintstr.h \
+ selection.h \
+ servermd.h \
+ site.h \
+ swaprep.h \
+ swapreq.h \
+ validate.h \
+ window.h \
+ windowstr.h \
+ xkbfile.h \
+ xkbsrv.h \
+ xkbstr.h \
+ xkbrules.h \
+ xserver-properties.h
+
+nodist_sdk_HEADERS = xorg-server.h
+endif
+
+AM_CFLAGS = $(DIX_CFLAGS)
+
+EXTRA_DIST = \
+ dix-config-apple-verbatim.h \
+ eventconvert.h eventstr.h inpututils.h \
+ protocol-versions.h \
+ xsha1.h
diff --git a/xorg-server/include/callback.h b/xorg-server/include/callback.h
index 94360dc72..2c4510a6e 100644
--- a/xorg-server/include/callback.h
+++ b/xorg-server/include/callback.h
@@ -53,6 +53,10 @@ SOFTWARE.
#include <X11/Xproto.h>
#include <X11/Xfuncproto.h>
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
/*
* callback manager stuff
*/
diff --git a/xorg-server/include/closestr.h b/xorg-server/include/closestr.h
index d29ee4d91..5cd52198f 100644
--- a/xorg-server/include/closestr.h
+++ b/xorg-server/include/closestr.h
@@ -53,6 +53,7 @@ typedef struct _OFclosure {
XID fontid;
char *fontname;
int fnamelen;
+ Bool from_dispatch;
FontPtr non_cachable_font;
} OFclosureRec;
@@ -78,6 +79,7 @@ typedef struct _LFWIclosure {
LFWIstateRec saved;
int savedNumFonts;
Bool haveSaved;
+ Bool from_dispatch;
char *savedName;
} LFWIclosureRec;
@@ -91,6 +93,7 @@ typedef struct _LFclosure {
LFWIstateRec current;
LFWIstateRec saved;
Bool haveSaved;
+ Bool from_dispatch;
char *savedName;
int savedNameLen;
} LFclosureRec;
@@ -109,6 +112,7 @@ typedef struct _PTclosure {
CARD8 reqType;
XID did;
int err;
+ Bool from_dispatch;
} PTclosureRec;
/* ImageText */
@@ -123,5 +127,6 @@ typedef struct _ITclosure {
int yorg;
CARD8 reqType;
XID did;
+ Bool from_dispatch;
} ITclosureRec;
#endif /* CLOSESTR_H */
diff --git a/xorg-server/include/colormapst.h b/xorg-server/include/colormapst.h
index b597e2c60..6f514c5db 100644
--- a/xorg-server/include/colormapst.h
+++ b/xorg-server/include/colormapst.h
@@ -1,132 +1,132 @@
-/*
-
-Copyright 1987, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-*/
-
-#ifndef CMAPSTRUCT_H
-#define CMAPSTRUCT_H 1
-
-#include <X11/Xarch.h>
-
-#include "colormap.h"
-#include "screenint.h"
-#include "privates.h"
-
-/* Shared color -- the color is used by AllocColorPlanes */
-typedef struct
-{
- unsigned short color;
- short refcnt;
-} SHAREDCOLOR;
-
-/* LOCO -- a local color for a PseudoColor cell. DirectColor maps always
- * use the first value (called red) in the structure. What channel they
- * are really talking about depends on which map they are in. */
-typedef struct
-{
- unsigned short red, green, blue;
-} LOCO;
-
-/* SHCO -- a shared color for a PseudoColor cell. Used with AllocColorPlanes.
- * DirectColor maps always use the first value (called red) in the structure.
- * What channel they are really talking about depends on which map they
- * are in. */
-typedef struct
-{
- SHAREDCOLOR *red, *green, *blue;
-} SHCO;
-
-
-/* color map entry */
-typedef struct _CMEntry
-{
- union
- {
- LOCO local;
- SHCO shco;
- } co;
- short refcnt;
- Bool fShared;
-} Entry;
-
-/*
- * COLORMAPs can be used for either Direct or Pseudo color. PseudoColor
- * only needs one cell table, we arbitrarily pick red. We keep track
- * of that table with freeRed, numPixelsRed, and clientPixelsRed
- *
- * The padN variables are unfortunate ABI BC. See fdo bug #6924.
- */
-
-typedef struct _ColormapRec
-{
- VisualPtr pVisual;
- short class; /* PseudoColor or DirectColor */
-#if defined(_LP64)
- short pad0;
- XID pad1;
-#endif
- XID mid; /* client's name for colormap */
-#if defined(_LP64) && (X_BYTE_ORDER == X_LITTLE_ENDIAN)
- XID pad2;
-#endif
- ScreenPtr pScreen; /* screen map is associated with */
- short flags; /* 1 = IsDefault
- * 2 = AllAllocated */
- int freeRed;
- int freeGreen;
- int freeBlue;
- int *numPixelsRed;
- int *numPixelsGreen;
- int *numPixelsBlue;
- Pixel **clientPixelsRed;
- Pixel **clientPixelsGreen;
- Pixel **clientPixelsBlue;
- Entry *red;
- Entry *green;
- Entry *blue;
- PrivateRec *devPrivates;
-} ColormapRec;
-
-#endif /* COLORMAP_H */
+/*
+
+Copyright 1987, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+*/
+
+#ifndef CMAPSTRUCT_H
+#define CMAPSTRUCT_H 1
+
+#include <X11/Xarch.h>
+
+#include "colormap.h"
+#include "screenint.h"
+#include "privates.h"
+
+/* Shared color -- the color is used by AllocColorPlanes */
+typedef struct
+{
+ unsigned short color;
+ short refcnt;
+} SHAREDCOLOR;
+
+/* LOCO -- a local color for a PseudoColor cell. DirectColor maps always
+ * use the first value (called red) in the structure. What channel they
+ * are really talking about depends on which map they are in. */
+typedef struct
+{
+ unsigned short red, green, blue;
+} LOCO;
+
+/* SHCO -- a shared color for a PseudoColor cell. Used with AllocColorPlanes.
+ * DirectColor maps always use the first value (called red) in the structure.
+ * What channel they are really talking about depends on which map they
+ * are in. */
+typedef struct
+{
+ SHAREDCOLOR *red, *green, *blue;
+} SHCO;
+
+
+/* color map entry */
+typedef struct _CMEntry
+{
+ union
+ {
+ LOCO local;
+ SHCO shco;
+ } co;
+ short refcnt;
+ Bool fShared;
+} Entry;
+
+/*
+ * COLORMAPs can be used for either Direct or Pseudo color. PseudoColor
+ * only needs one cell table, we arbitrarily pick red. We keep track
+ * of that table with freeRed, numPixelsRed, and clientPixelsRed
+ *
+ * The padN variables are unfortunate ABI BC. See fdo bug #6924.
+ */
+
+typedef struct _ColormapRec
+{
+ VisualPtr pVisual;
+ short class; /* PseudoColor or DirectColor */
+#if defined(_LP64)
+ short pad0;
+ XID pad1;
+#endif
+ XID mid; /* client's name for colormap */
+#if defined(_LP64) && (X_BYTE_ORDER == X_LITTLE_ENDIAN)
+ XID pad2;
+#endif
+ ScreenPtr pScreen; /* screen map is associated with */
+ short flags; /* 1 = IsDefault
+ * 2 = AllAllocated */
+ int freeRed;
+ int freeGreen;
+ int freeBlue;
+ int *numPixelsRed;
+ int *numPixelsGreen;
+ int *numPixelsBlue;
+ Pixel **clientPixelsRed;
+ Pixel **clientPixelsGreen;
+ Pixel **clientPixelsBlue;
+ Entry *red;
+ Entry *green;
+ Entry *blue;
+ PrivateRec *devPrivates;
+} ColormapRec;
+
+#endif /* COLORMAP_H */
diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in
index fc93f3ec1..174e64a99 100644
--- a/xorg-server/include/dix-config.h.in
+++ b/xorg-server/include/dix-config.h.in
@@ -1,452 +1,452 @@
-/* dix-config.h.in: not at all generated. -*- c -*- */
-
-#ifndef _DIX_CONFIG_H_
-#define _DIX_CONFIG_H_
-
-/* Support BigRequests extension */
-#undef BIGREQS
-
-/* Builder address */
-#undef BUILDERADDR
-
-/* Operating System Name */
-#undef OSNAME
-
-/* Operating System Vendor */
-#undef OSVENDOR
-
-/* Builder string */
-#undef BUILDERSTRING
-
-/* Default font path */
-#undef COMPILEDDEFAULTFONTPATH
-
-/* Miscellaneous server configuration files path */
-#undef SERVER_MISC_CONFIG_PATH
-
-/* Support Composite Extension */
-#undef COMPOSITE
-
-/* Support Damage extension */
-#undef DAMAGE
-
-/* Build for darwin with Quartz support */
-#undef DARWIN_WITH_QUARTZ
-
-/* Use OsVendorVErrorF */
-#undef DDXOSVERRORF
-
-/* Use ddxBeforeReset */
-#undef DDXBEFORERESET
-
-/* Build DPMS extension */
-#undef DPMSExtension
-
-/* Build GLX extension */
-#undef GLXEXT
-
-/* Build GLX DRI loader */
-#undef GLX_DRI
-
-/* Path to DRI drivers */
-#undef DRI_DRIVER_PATH
-
-/* Support XDM-AUTH*-1 */
-#undef HASXDMAUTH
-
-/* Define to 1 if you have the `getdtablesize' function. */
-#undef HAS_GETDTABLESIZE
-
-/* Define to 1 if you have the `getifaddrs' function. */
-#undef HAS_GETIFADDRS
-
-/* Define to 1 if you have the `getpeereid' function. */
-#undef HAS_GETPEEREID
-
-/* Define to 1 if you have the `getpeerucred' function. */
-#undef HAS_GETPEERUCRED
-
-/* Define to 1 if you have the `mmap' function. */
-#undef HAS_MMAP
-
-/* Support SHM */
-#undef HAS_SHM
-
-/* Have the 'strlcpy' function */
-#undef HAS_STRLCPY
-
-/* Define to 1 if you have the <asm/mtrr.h> header file. */
-#undef HAVE_ASM_MTRR_H
-
-/* Has backtrace support */
-#undef HAVE_BACKTRACE
-
-/* Define to 1 if you have the <byteswap.h> header file. */
-#undef HAVE_BYTESWAP_H
-
-/* Define to 1 if you have cbrt */
-#undef HAVE_CBRT
-
-/* Define to 1 if you have the <dbm.h> header file. */
-#undef HAVE_DBM_H
-
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-#undef HAVE_DIRENT_H
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
-/* Have execinfo.h */
-#undef HAVE_EXECINFO_H
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the `geteuid' function. */
-#undef HAVE_GETEUID
-
-/* Define to 1 if you have the `getisax' function. */
-#undef HAVE_GETISAX
-
-/* Define to 1 if you have the `getuid' function. */
-#undef HAVE_GETUID
-
-/* Define to 1 if you have the `getzoneid' function. */
-#undef HAVE_GETZONEID
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Have Quartz */
-#undef XQUARTZ
-
-/* Support application updating through sparkle. */
-#undef XQUARTZ_SPARKLE
-
-/* Prefix to use for launchd identifiers */
-#undef LAUNCHD_ID_PREFIX
-
-/* Build a standalone xpbproxy */
-#undef STANDALONE_XPBPROXY
-
-/* Define to 1 if you have the `m' library (-lm). */
-#undef HAVE_LIBM
-
-/* Define to 1 if you have the `link' function. */
-#undef HAVE_LINK
-
-/* Define to 1 if you have the <linux/agpgart.h> header file. */
-#undef HAVE_LINUX_AGPGART_H
-
-/* Define to 1 if you have the <linux/apm_bios.h> header file. */
-#undef HAVE_LINUX_APM_BIOS_H
-
-/* Define to 1 if you have the <linux/fb.h> header file. */
-#undef HAVE_LINUX_FB_H
-
-/* Define to 1 if you have the `mkstemp' function. */
-#undef HAVE_MKSTEMP
-
-/* Define to 1 if you have the <ndbm.h> header file. */
-#undef HAVE_NDBM_H
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-#undef HAVE_NDIR_H
-
-/* Define to 1 if you have the <rpcsvc/dbm.h> header file. */
-#undef HAVE_RPCSVC_DBM_H
-
-/* Define to use libc SHA1 functions */
-#undef HAVE_SHA1_IN_LIBC
-
-/* Define to use CommonCrypto SHA1 functions */
-#undef HAVE_SHA1_IN_COMMONCRYPTO
-
-/* Define to use libmd SHA1 functions */
-#undef HAVE_SHA1_IN_LIBMD
-
-/* Define to use libgcrypt SHA1 functions */
-#undef HAVE_SHA1_IN_LIBGCRYPT
-
-/* Define to use libsha1 for SHA1 */
-#undef HAVE_SHA1_IN_LIBSHA1
-
-/* Define to 1 if you have the `shmctl64' function. */
-#undef HAVE_SHMCTL64
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strrchr' function. */
-#undef HAVE_STRRCHR
-
-/* Define to 1 if you have the `strtol' function. */
-#undef HAVE_STRTOL
-
-/* Define to 1 if SYSV IPC is available */
-#undef HAVE_SYSV_IPC
-
-/* Define to 1 if you have the <sys/agpio.h> header file. */
-#undef HAVE_SYS_AGPIO_H
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-#undef HAVE_SYS_DIR_H
-
-/* Define to 1 if you have the <sys/io.h> header file. */
-#undef HAVE_SYS_IO_H
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-#undef HAVE_SYS_NDIR_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/utsname.h> header file. */
-#undef HAVE_SYS_UTSNAME_H
-
-/* Define to 1 if you have the <sys/vm86.h> header file. */
-#undef HAVE_SYS_VM86_H
-
-/* Define to 1 if you have the <tslib.h> header file. */
-#undef HAVE_TSLIB_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the <fnmatch.h> header file. */
-#undef HAVE_FNMATCH_H
-
-/* Have /dev/urandom */
-#undef HAVE_URANDOM
-
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
-/* Define to 1 if you have the `vasprintf' function. */
-#undef HAVE_VASPRINTF
-
-/* Support IPv6 for TCP connections */
-#undef IPv6
-
-/* Support os-specific local connections */
-#undef LOCALCONN
-
-/* Support MIT-SHM Extension */
-#undef MITSHM
-
-/* Enable some debugging code */
-#undef DEBUG
-
-/* Name of package */
-#undef PACKAGE
-
-/* Internal define for Xinerama */
-#undef PANORAMIX
-
-/* Overall prefix */
-#undef PROJECTROOT
-
-/* Support RANDR extension */
-#undef RANDR
-
-/* Support Record extension */
-#undef XRECORD
-
-/* Support RENDER extension */
-#undef RENDER
-
-/* Support X resource extension */
-#undef RES
-
-/* Support client ID tracking in X resource extension */
-#undef CLIENTIDS
-
-/* Support MIT-SCREEN-SAVER extension */
-#undef SCREENSAVER
-
-/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
-#undef SECURE_RPC
-
-/* Support SHAPE extension */
-#undef SHAPE
-
-/* Define to 1 on systems derived from System V Release 4 */
-#undef SVR4
-
-/* Support TCP socket connections */
-#undef TCPCONN
-
-/* Enable touchscreen support */
-#undef TOUCHSCREEN
-
-/* Support tslib touchscreen abstraction library */
-#undef TSLIB
-
-/* Support UNIX socket connections */
-#undef UNIXCONN
-
-/* Define to use byteswap macros from <sys/endian.h> */
-#undef USE_SYS_ENDIAN_H
-
-/* unaligned word accesses behave as expected */
-#undef WORKING_UNALIGNED_INT
-
-/* Build X string registry */
-#undef XREGISTRY
-
-/* Build X-ACE extension */
-#undef XACE
-
-/* Build SELinux extension */
-#undef XSELINUX
-
-/* Support XCMisc extension */
-#undef XCMISC
-
-/* Build Security extension */
-#undef XCSECURITY
-
-/* Support Xdmcp */
-#undef XDMCP
-
-/* Build XFree86 BigFont extension */
-#undef XF86BIGFONT
-
-/* Support XFree86 Video Mode extension */
-#undef XF86VIDMODE
-
-/* Support XFixes extension */
-#undef XFIXES
-
-/* Build XDGA support */
-#undef XFreeXDGA
-
-/* Support Xinerama extension */
-#undef XINERAMA
-
-/* Vendor release */
-#undef XORG_RELEASE
-
-/* Current Xorg version */
-#undef XORG_VERSION_CURRENT
-
-/* Xorg release date */
-#undef XORG_DATE
-
-/* Build Xv Extension */
-#undef XvExtension
-
-/* Build XvMC Extension */
-#undef XvMCExtension
-
-/* Support XSync extension */
-#undef XSYNC
-
-/* Support XTest extension */
-#undef XTEST
-
-/* Support Xv extension */
-#undef XV
-
-/* Support DRI extension */
-#undef XF86DRI
-
-/* Build DRI2 extension */
-#undef DRI2
-
-/* Build DBE support */
-#undef DBE
-
-/* Vendor name */
-#undef XVENDORNAME
-
-/* Enable GNU and other extensions to the C environment for GLIBC */
-#undef _GNU_SOURCE
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef pid_t
-
-/* Build Rootless code */
-#undef ROOTLESS
-
-/* Define to 1 if unsigned long is 64 bits. */
-#undef _XSERVER64
-
-/* System is BSD-like */
-#undef CSRG_BASED
-
-/* Define to 1 if `struct sockaddr_in' has a `sin_len' member */
-#undef BSD44SOCKETS
-
-/* Support D-Bus */
-#undef HAVE_DBUS
-
-/* Use libudev for input hotplug */
-#undef CONFIG_UDEV
-
-/* Use D-Bus for input hotplug */
-#undef CONFIG_NEED_DBUS
-
-/* Support the D-Bus hotplug API */
-#undef CONFIG_DBUS_API
-
-/* Support HAL for hotplug */
-#undef CONFIG_HAL
-
-/* Have a monotonic clock from clock_gettime() */
-#undef MONOTONIC_CLOCK
-
-/* Define to 1 if the DTrace Xserver provider probes should be built in */
-#undef XSERVER_DTRACE
-
-/* Define to 16-bit byteswap macro */
-#undef bswap_16
-
-/* Define to 32-bit byteswap macro */
-#undef bswap_32
-
-/* Define to 64-bit byteswap macro */
-#undef bswap_64
-
-/* Need the strcasecmp function. */
-#undef NEED_STRCASECMP
-
-/* Need the strncasecmp function. */
-#undef NEED_STRNCASECMP
-
-/* Need the strcasestr function. */
-#undef NEED_STRCASESTR
-
-/* Define to 1 if you have the `ffs' function. */
-#undef HAVE_FFS
-
-/* Correctly set _XSERVER64 for OSX fat binaries */
-#ifdef __APPLE__
-#include "dix-config-apple-verbatim.h"
-#endif
-
-#endif /* _DIX_CONFIG_H_ */
+/* dix-config.h.in: not at all generated. -*- c -*- */
+
+#ifndef _DIX_CONFIG_H_
+#define _DIX_CONFIG_H_
+
+/* Support BigRequests extension */
+#undef BIGREQS
+
+/* Builder address */
+#undef BUILDERADDR
+
+/* Operating System Name */
+#undef OSNAME
+
+/* Operating System Vendor */
+#undef OSVENDOR
+
+/* Builder string */
+#undef BUILDERSTRING
+
+/* Default font path */
+#undef COMPILEDDEFAULTFONTPATH
+
+/* Miscellaneous server configuration files path */
+#undef SERVER_MISC_CONFIG_PATH
+
+/* Support Composite Extension */
+#undef COMPOSITE
+
+/* Support Damage extension */
+#undef DAMAGE
+
+/* Build for darwin with Quartz support */
+#undef DARWIN_WITH_QUARTZ
+
+/* Use OsVendorVErrorF */
+#undef DDXOSVERRORF
+
+/* Use ddxBeforeReset */
+#undef DDXBEFORERESET
+
+/* Build DPMS extension */
+#undef DPMSExtension
+
+/* Build GLX extension */
+#undef GLXEXT
+
+/* Build GLX DRI loader */
+#undef GLX_DRI
+
+/* Path to DRI drivers */
+#undef DRI_DRIVER_PATH
+
+/* Support XDM-AUTH*-1 */
+#undef HASXDMAUTH
+
+/* Define to 1 if you have the `getdtablesize' function. */
+#undef HAS_GETDTABLESIZE
+
+/* Define to 1 if you have the `getifaddrs' function. */
+#undef HAS_GETIFADDRS
+
+/* Define to 1 if you have the `getpeereid' function. */
+#undef HAS_GETPEEREID
+
+/* Define to 1 if you have the `getpeerucred' function. */
+#undef HAS_GETPEERUCRED
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAS_MMAP
+
+/* Support SHM */
+#undef HAS_SHM
+
+/* Have the 'strlcpy' function */
+#undef HAS_STRLCPY
+
+/* Define to 1 if you have the <asm/mtrr.h> header file. */
+#undef HAVE_ASM_MTRR_H
+
+/* Has backtrace support */
+#undef HAVE_BACKTRACE
+
+/* Define to 1 if you have the <byteswap.h> header file. */
+#undef HAVE_BYTESWAP_H
+
+/* Define to 1 if you have cbrt */
+#undef HAVE_CBRT
+
+/* Define to 1 if you have the <dbm.h> header file. */
+#undef HAVE_DBM_H
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Have execinfo.h */
+#undef HAVE_EXECINFO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getisax' function. */
+#undef HAVE_GETISAX
+
+/* Define to 1 if you have the `getuid' function. */
+#undef HAVE_GETUID
+
+/* Define to 1 if you have the `getzoneid' function. */
+#undef HAVE_GETZONEID
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Have Quartz */
+#undef XQUARTZ
+
+/* Support application updating through sparkle. */
+#undef XQUARTZ_SPARKLE
+
+/* Prefix to use for launchd identifiers */
+#undef LAUNCHD_ID_PREFIX
+
+/* Build a standalone xpbproxy */
+#undef STANDALONE_XPBPROXY
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the `link' function. */
+#undef HAVE_LINK
+
+/* Define to 1 if you have the <linux/agpgart.h> header file. */
+#undef HAVE_LINUX_AGPGART_H
+
+/* Define to 1 if you have the <linux/apm_bios.h> header file. */
+#undef HAVE_LINUX_APM_BIOS_H
+
+/* Define to 1 if you have the <linux/fb.h> header file. */
+#undef HAVE_LINUX_FB_H
+
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have the <ndbm.h> header file. */
+#undef HAVE_NDBM_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <rpcsvc/dbm.h> header file. */
+#undef HAVE_RPCSVC_DBM_H
+
+/* Define to use libc SHA1 functions */
+#undef HAVE_SHA1_IN_LIBC
+
+/* Define to use CommonCrypto SHA1 functions */
+#undef HAVE_SHA1_IN_COMMONCRYPTO
+
+/* Define to use libmd SHA1 functions */
+#undef HAVE_SHA1_IN_LIBMD
+
+/* Define to use libgcrypt SHA1 functions */
+#undef HAVE_SHA1_IN_LIBGCRYPT
+
+/* Define to use libsha1 for SHA1 */
+#undef HAVE_SHA1_IN_LIBSHA1
+
+/* Define to 1 if you have the `shmctl64' function. */
+#undef HAVE_SHMCTL64
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if SYSV IPC is available */
+#undef HAVE_SYSV_IPC
+
+/* Define to 1 if you have the <sys/agpio.h> header file. */
+#undef HAVE_SYS_AGPIO_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/io.h> header file. */
+#undef HAVE_SYS_IO_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/utsname.h> header file. */
+#undef HAVE_SYS_UTSNAME_H
+
+/* Define to 1 if you have the <sys/vm86.h> header file. */
+#undef HAVE_SYS_VM86_H
+
+/* Define to 1 if you have the <tslib.h> header file. */
+#undef HAVE_TSLIB_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <fnmatch.h> header file. */
+#undef HAVE_FNMATCH_H
+
+/* Have /dev/urandom */
+#undef HAVE_URANDOM
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
+/* Support IPv6 for TCP connections */
+#undef IPv6
+
+/* Support os-specific local connections */
+#undef LOCALCONN
+
+/* Support MIT-SHM Extension */
+#undef MITSHM
+
+/* Enable some debugging code */
+#undef DEBUG
+
+/* Name of package */
+#undef PACKAGE
+
+/* Internal define for Xinerama */
+#undef PANORAMIX
+
+/* Overall prefix */
+#undef PROJECTROOT
+
+/* Support RANDR extension */
+#undef RANDR
+
+/* Support Record extension */
+#undef XRECORD
+
+/* Support RENDER extension */
+#undef RENDER
+
+/* Support X resource extension */
+#undef RES
+
+/* Support client ID tracking in X resource extension */
+#undef CLIENTIDS
+
+/* Support MIT-SCREEN-SAVER extension */
+#undef SCREENSAVER
+
+/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
+#undef SECURE_RPC
+
+/* Support SHAPE extension */
+#undef SHAPE
+
+/* Define to 1 on systems derived from System V Release 4 */
+#undef SVR4
+
+/* Support TCP socket connections */
+#undef TCPCONN
+
+/* Enable touchscreen support */
+#undef TOUCHSCREEN
+
+/* Support tslib touchscreen abstraction library */
+#undef TSLIB
+
+/* Support UNIX socket connections */
+#undef UNIXCONN
+
+/* Define to use byteswap macros from <sys/endian.h> */
+#undef USE_SYS_ENDIAN_H
+
+/* unaligned word accesses behave as expected */
+#undef WORKING_UNALIGNED_INT
+
+/* Build X string registry */
+#undef XREGISTRY
+
+/* Build X-ACE extension */
+#undef XACE
+
+/* Build SELinux extension */
+#undef XSELINUX
+
+/* Support XCMisc extension */
+#undef XCMISC
+
+/* Build Security extension */
+#undef XCSECURITY
+
+/* Support Xdmcp */
+#undef XDMCP
+
+/* Build XFree86 BigFont extension */
+#undef XF86BIGFONT
+
+/* Support XFree86 Video Mode extension */
+#undef XF86VIDMODE
+
+/* Support XFixes extension */
+#undef XFIXES
+
+/* Build XDGA support */
+#undef XFreeXDGA
+
+/* Support Xinerama extension */
+#undef XINERAMA
+
+/* Vendor release */
+#undef XORG_RELEASE
+
+/* Current Xorg version */
+#undef XORG_VERSION_CURRENT
+
+/* Xorg release date */
+#undef XORG_DATE
+
+/* Build Xv Extension */
+#undef XvExtension
+
+/* Build XvMC Extension */
+#undef XvMCExtension
+
+/* Support XSync extension */
+#undef XSYNC
+
+/* Support XTest extension */
+#undef XTEST
+
+/* Support Xv extension */
+#undef XV
+
+/* Support DRI extension */
+#undef XF86DRI
+
+/* Build DRI2 extension */
+#undef DRI2
+
+/* Build DBE support */
+#undef DBE
+
+/* Vendor name */
+#undef XVENDORNAME
+
+/* Enable GNU and other extensions to the C environment for GLIBC */
+#undef _GNU_SOURCE
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Build Rootless code */
+#undef ROOTLESS
+
+/* Define to 1 if unsigned long is 64 bits. */
+#undef _XSERVER64
+
+/* System is BSD-like */
+#undef CSRG_BASED
+
+/* Define to 1 if `struct sockaddr_in' has a `sin_len' member */
+#undef BSD44SOCKETS
+
+/* Support D-Bus */
+#undef HAVE_DBUS
+
+/* Use libudev for input hotplug */
+#undef CONFIG_UDEV
+
+/* Use D-Bus for input hotplug */
+#undef CONFIG_NEED_DBUS
+
+/* Support the D-Bus hotplug API */
+#undef CONFIG_DBUS_API
+
+/* Support HAL for hotplug */
+#undef CONFIG_HAL
+
+/* Have a monotonic clock from clock_gettime() */
+#undef MONOTONIC_CLOCK
+
+/* Define to 1 if the DTrace Xserver provider probes should be built in */
+#undef XSERVER_DTRACE
+
+/* Define to 16-bit byteswap macro */
+#undef bswap_16
+
+/* Define to 32-bit byteswap macro */
+#undef bswap_32
+
+/* Define to 64-bit byteswap macro */
+#undef bswap_64
+
+/* Need the strcasecmp function. */
+#undef NEED_STRCASECMP
+
+/* Need the strncasecmp function. */
+#undef NEED_STRNCASECMP
+
+/* Need the strcasestr function. */
+#undef NEED_STRCASESTR
+
+/* Define to 1 if you have the `ffs' function. */
+#undef HAVE_FFS
+
+/* Correctly set _XSERVER64 for OSX fat binaries */
+#ifdef __APPLE__
+#include "dix-config-apple-verbatim.h"
+#endif
+
+#endif /* _DIX_CONFIG_H_ */
diff --git a/xorg-server/include/dix.h b/xorg-server/include/dix.h
index c201e3ac1..de78b7e24 100644
--- a/xorg-server/include/dix.h
+++ b/xorg-server/include/dix.h
@@ -1,579 +1,579 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef DIX_H
-#define DIX_H
-
-#include "callback.h"
-#include "gc.h"
-#include "window.h"
-#include "input.h"
-#include "cursor.h"
-#include "geext.h"
-#include "events.h"
-#include <X11/extensions/XI.h>
-
-#define EARLIER -1
-#define SAMETIME 0
-#define LATER 1
-
-#define NullClient ((ClientPtr) 0)
-#define REQUEST(type) \
- type *stuff = (type *)client->requestBuffer
-
-
-#define REQUEST_SIZE_MATCH(req)\
- if ((sizeof(req) >> 2) != client->req_len)\
- return(BadLength)
-
-#define REQUEST_AT_LEAST_SIZE(req) \
- if ((sizeof(req) >> 2) > client->req_len )\
- return(BadLength)
-
-#define REQUEST_FIXED_SIZE(req, n)\
- if (((sizeof(req) >> 2) > client->req_len) || \
- (((sizeof(req) + (n) + 3) >> 2) != client->req_len)) \
- return(BadLength)
-
-#define LEGAL_NEW_RESOURCE(id,client)\
- if (!LegalNewID(id,client)) \
- {\
- client->errorValue = id;\
- return BadIDChoice;\
- }
-
-#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
- {\
- int rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
- if (rc != Success)\
- return rc;\
- rc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
- if (rc != Success)\
- return rc;\
- if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
- return BadMatch;\
- }\
- if (pGC->serialNumber != pDraw->serialNumber)\
- ValidateGC(pDraw, pGC);
-
-
-#define WriteReplyToClient(pClient, size, pReply) { \
- if ((pClient)->swapped) \
- (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
- (pClient, (int)(size), pReply); \
- else (void) WriteToClient(pClient, (int)(size), (char *)(pReply)); }
-
-#define WriteSwappedDataToClient(pClient, size, pbuf) \
- if ((pClient)->swapped) \
- (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
- else (void) WriteToClient (pClient, (int)(size), (char *)(pbuf));
-
-typedef struct _TimeStamp *TimeStampPtr;
-
-#ifndef _XTYPEDEF_CLIENTPTR
-typedef struct _Client *ClientPtr; /* also in misc.h */
-#define _XTYPEDEF_CLIENTPTR
-#endif
-
-typedef struct _WorkQueue *WorkQueuePtr;
-
-extern _X_EXPORT ClientPtr clients[MAXCLIENTS];
-extern _X_EXPORT ClientPtr serverClient;
-extern _X_EXPORT int currentMaxClients;
-extern _X_EXPORT char dispatchExceptionAtReset;
-
-typedef int HWEventQueueType;
-typedef HWEventQueueType* HWEventQueuePtr;
-
-extern _X_EXPORT HWEventQueuePtr checkForInput[2];
-
-typedef struct _TimeStamp {
- CARD32 months; /* really ~49.7 days */
- CARD32 milliseconds;
-} TimeStamp;
-
-/* dispatch.c */
-
-extern _X_EXPORT void SetInputCheck(
- HWEventQueuePtr /*c0*/,
- HWEventQueuePtr /*c1*/);
-
-extern _X_EXPORT void CloseDownClient(
- ClientPtr /*client*/);
-
-extern _X_EXPORT void UpdateCurrentTime(void);
-
-extern _X_EXPORT void UpdateCurrentTimeIf(void);
-
-extern _X_EXPORT int dixDestroyPixmap(
- pointer /*value*/,
- XID /*pid*/);
-
-extern _X_EXPORT void InitClient(
- ClientPtr /*client*/,
- int /*i*/,
- pointer /*ospriv*/);
-
-extern _X_EXPORT ClientPtr NextAvailableClient(
- pointer /*ospriv*/);
-
-extern _X_EXPORT void SendErrorToClient(
- ClientPtr /*client*/,
- unsigned int /*majorCode*/,
- unsigned int /*minorCode*/,
- XID /*resId*/,
- int /*errorCode*/);
-
-extern _X_EXPORT void MarkClientException(
- ClientPtr /*client*/);
-
-extern _X_HIDDEN Bool CreateConnectionBlock(void);
-/* dixutils.c */
-
-extern _X_EXPORT int CompareISOLatin1Lowered(
- unsigned char * /*a*/,
- int alen,
- unsigned char * /*b*/,
- int blen);
-
-extern _X_EXPORT int dixLookupWindow(
- WindowPtr *result,
- XID id,
- ClientPtr client,
- Mask access_mode);
-
-extern _X_EXPORT int dixLookupDrawable(
- DrawablePtr *result,
- XID id,
- ClientPtr client,
- Mask type_mask,
- Mask access_mode);
-
-extern _X_EXPORT int dixLookupGC(
- GCPtr *result,
- XID id,
- ClientPtr client,
- Mask access_mode);
-
-extern _X_EXPORT int dixLookupFontable(
- FontPtr *result,
- XID id,
- ClientPtr client,
- Mask access_mode);
-
-extern _X_EXPORT int dixLookupClient(
- ClientPtr *result,
- XID id,
- ClientPtr client,
- Mask access_mode);
-
-extern _X_EXPORT void NoopDDA(void);
-
-extern _X_EXPORT int AlterSaveSetForClient(
- ClientPtr /*client*/,
- WindowPtr /*pWin*/,
- unsigned /*mode*/,
- Bool /*toRoot*/,
- Bool /*map*/);
-
-extern _X_EXPORT void DeleteWindowFromAnySaveSet(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void BlockHandler(
- pointer /*pTimeout*/,
- pointer /*pReadmask*/);
-
-extern _X_EXPORT void WakeupHandler(
- int /*result*/,
- pointer /*pReadmask*/);
-
-void
-EnableLimitedSchedulingLatency(void);
-
-void
-DisableLimitedSchedulingLatency(void);
-
-typedef void (* WakeupHandlerProcPtr)(
- pointer /* blockData */,
- int /* result */,
- pointer /* pReadmask */);
-
-extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(
- BlockHandlerProcPtr /*blockHandler*/,
- WakeupHandlerProcPtr /*wakeupHandler*/,
- pointer /*blockData*/);
-
-extern _X_EXPORT void RemoveBlockAndWakeupHandlers(
- BlockHandlerProcPtr /*blockHandler*/,
- WakeupHandlerProcPtr /*wakeupHandler*/,
- pointer /*blockData*/);
-
-extern _X_EXPORT void InitBlockAndWakeupHandlers(void);
-
-extern _X_EXPORT void ProcessWorkQueue(void);
-
-extern _X_EXPORT void ProcessWorkQueueZombies(void);
-
-extern _X_EXPORT Bool QueueWorkProc(
- Bool (* /*function*/)(
- ClientPtr /*clientUnused*/,
- pointer /*closure*/),
- ClientPtr /*client*/,
- pointer /*closure*/
-);
-
-typedef Bool (* ClientSleepProcPtr)(
- ClientPtr /*client*/,
- pointer /*closure*/);
-
-extern _X_EXPORT Bool ClientSleep(
- ClientPtr /*client*/,
- ClientSleepProcPtr /* function */,
- pointer /*closure*/);
-
-#ifndef ___CLIENTSIGNAL_DEFINED___
-#define ___CLIENTSIGNAL_DEFINED___
-extern _X_EXPORT Bool ClientSignal(
- ClientPtr /*client*/);
-#endif /* ___CLIENTSIGNAL_DEFINED___ */
-
-extern _X_EXPORT void ClientWakeup(
- ClientPtr /*client*/);
-
-extern _X_EXPORT Bool ClientIsAsleep(
- ClientPtr /*client*/);
-
-/* atom.c */
-
-extern _X_EXPORT Atom MakeAtom(
- const char * /*string*/,
- unsigned /*len*/,
- Bool /*makeit*/);
-
-extern _X_EXPORT Bool ValidAtom(
- Atom /*atom*/);
-
-extern _X_EXPORT const char *NameForAtom(
- Atom /*atom*/);
-
-extern _X_EXPORT void AtomError(void) _X_NORETURN;
-
-extern _X_EXPORT void FreeAllAtoms(void);
-
-extern _X_EXPORT void InitAtoms(void);
-
-/* main.c */
-
-extern _X_EXPORT void SetVendorRelease(int release);
-
-extern _X_EXPORT void SetVendorString(char *string);
-
-/* events.c */
-
-extern void SetMaskForEvent(
- int /* deviceid */,
- Mask /* mask */,
- int /* event */);
-
-extern _X_EXPORT void ConfineToShape(
- DeviceIntPtr /* pDev */,
- RegionPtr /* shape */,
- int* /* px */,
- int* /* py */);
-
-extern _X_EXPORT Bool IsParent(
- WindowPtr /* maybeparent */,
- WindowPtr /* child */);
-
-extern _X_EXPORT WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev);
-
-extern _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev);
-
-
-extern _X_EXPORT void NoticeEventTime(InternalEvent *ev);
-
-extern void EnqueueEvent(
- InternalEvent * /* ev */,
- DeviceIntPtr /* device */);
-
-extern void ActivatePointerGrab(
- DeviceIntPtr /* mouse */,
- GrabPtr /* grab */,
- TimeStamp /* time */,
- Bool /* autoGrab */);
-
-extern void DeactivatePointerGrab(
- DeviceIntPtr /* mouse */);
-
-extern void ActivateKeyboardGrab(
- DeviceIntPtr /* keybd */,
- GrabPtr /* grab */,
- TimeStamp /* time */,
- Bool /* passive */);
-
-extern void DeactivateKeyboardGrab(
- DeviceIntPtr /* keybd */);
-
-extern BOOL ActivateFocusInGrab(
- DeviceIntPtr /* dev */,
- WindowPtr /* old */,
- WindowPtr /* win */);
-
-extern void AllowSome(
- ClientPtr /* client */,
- TimeStamp /* time */,
- DeviceIntPtr /* thisDev */,
- int /* newState */);
-
-extern void ReleaseActiveGrabs(
- ClientPtr client);
-
-extern GrabPtr CheckPassiveGrabsOnWindow(
- WindowPtr /* pWin */,
- DeviceIntPtr /* device */,
- DeviceEvent * /* event */,
- BOOL /* checkCore */,
- BOOL /* activate */);
-
-extern _X_EXPORT int DeliverEventsToWindow(
- DeviceIntPtr /* pWin */,
- WindowPtr /* pWin */,
- xEventPtr /* pEvents */,
- int /* count */,
- Mask /* filter */,
- GrabPtr /* grab */);
-
-extern int DeliverDeviceEvents(
- WindowPtr /* pWin */,
- InternalEvent* /* event */,
- GrabPtr /* grab */,
- WindowPtr /* stopAt */,
- DeviceIntPtr /* dev */);
-
-extern void InitializeSprite(
- DeviceIntPtr /* pDev */,
- WindowPtr /* pWin */);
-
-extern void UpdateSpriteForScreen(
- DeviceIntPtr /* pDev */,
- ScreenPtr /* pScreen */);
-
-extern _X_EXPORT void WindowHasNewCursor(
- WindowPtr /* pWin */);
-
-extern Bool CheckDeviceGrabs(
- DeviceIntPtr /* device */,
- DeviceEvent* /* event */,
- WindowPtr /* ancestor */);
-
-extern void DeliverFocusedEvent(
- DeviceIntPtr /* keybd */,
- InternalEvent* /* event */,
- WindowPtr /* window */);
-
-extern void DeliverGrabbedEvent(
- InternalEvent* /* event */,
- DeviceIntPtr /* thisDev */,
- Bool /* deactivateGrab */);
-
-extern void FixKeyState(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */);
-
-extern void RecalculateDeliverableEvents(
- WindowPtr /* pWin */);
-
-extern _X_EXPORT int OtherClientGone(
- pointer /* value */,
- XID /* id */);
-
-extern void DoFocusEvents(
- DeviceIntPtr /* dev */,
- WindowPtr /* fromWin */,
- WindowPtr /* toWin */,
- int /* mode */);
-
-extern int SetInputFocus(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- Window /* focusID */,
- CARD8 /* revertTo */,
- Time /* ctime */,
- Bool /* followOK */);
-
-extern int GrabDevice(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- unsigned /* this_mode */,
- unsigned /* other_mode */,
- Window /* grabWindow */,
- unsigned /* ownerEvents */,
- Time /* ctime */,
- GrabMask* /* mask */,
- int /* grabtype */,
- Cursor /* curs */,
- Window /* confineToWin */,
- CARD8 * /* status */);
-
-extern void InitEvents(void);
-
-extern void CloseDownEvents(void);
-
-extern void DeleteWindowFromAnyEvents(
- WindowPtr /* pWin */,
- Bool /* freeResources */);
-
-
-extern Mask EventMaskForClient(
- WindowPtr /* pWin */,
- ClientPtr /* client */);
-
-
-
-extern _X_EXPORT int DeliverEvents(
- WindowPtr /*pWin*/,
- xEventPtr /*xE*/,
- int /*count*/,
- WindowPtr /*otherParent*/);
-
-extern Bool CheckMotion(
- DeviceEvent* /* ev */,
- DeviceIntPtr /* pDev */);
-
-extern _X_EXPORT void WriteEventsToClient(
- ClientPtr /*pClient*/,
- int /*count*/,
- xEventPtr /*events*/);
-
-extern _X_EXPORT int TryClientEvents(
- ClientPtr /*client*/,
- DeviceIntPtr /* device */,
- xEventPtr /*pEvents*/,
- int /*count*/,
- Mask /*mask*/,
- Mask /*filter*/,
- GrabPtr /*grab*/);
-
-extern _X_EXPORT void WindowsRestructured(void);
-
-extern int SetClientPointer(
- ClientPtr /* client */,
- DeviceIntPtr /* device */);
-
-extern _X_EXPORT DeviceIntPtr PickPointer(
- ClientPtr /* client */);
-
-extern _X_EXPORT DeviceIntPtr PickKeyboard(
- ClientPtr /* client */);
-
-extern Bool IsInterferingGrab(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- xEvent* /* events */);
-
-#ifdef PANORAMIX
-extern _X_EXPORT void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
-#endif
-
-#ifdef RANDR
-extern _X_EXPORT void
-ScreenRestructured (ScreenPtr pScreen);
-#endif
-
-extern _X_EXPORT int ffs(int i);
-
-
-/*
- * ServerGrabCallback stuff
- */
-
-extern _X_EXPORT CallbackListPtr ServerGrabCallback;
-
-typedef enum {SERVER_GRABBED, SERVER_UNGRABBED,
- CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState;
-
-typedef struct {
- ClientPtr client;
- ServerGrabState grabstate;
-} ServerGrabInfoRec;
-
-/*
- * EventCallback stuff
- */
-
-extern _X_EXPORT CallbackListPtr EventCallback;
-
-typedef struct {
- ClientPtr client;
- xEventPtr events;
- int count;
-} EventInfoRec;
-
-/*
- * DeviceEventCallback stuff
- */
-
-extern _X_EXPORT CallbackListPtr DeviceEventCallback;
-
-typedef struct {
- InternalEvent *event;
- DeviceIntPtr device;
-} DeviceEventInfoRec;
-
-extern int XItoCoreType(int xi_type);
-extern Bool DevHasCursor(DeviceIntPtr pDev);
-extern Bool _X_EXPORT IsPointerDevice( DeviceIntPtr dev);
-extern Bool _X_EXPORT IsKeyboardDevice(DeviceIntPtr dev);
-extern Bool IsPointerEvent(InternalEvent *event);
-extern _X_EXPORT Bool IsMaster(DeviceIntPtr dev);
-extern _X_EXPORT Bool IsFloating(DeviceIntPtr dev);
-
-extern _X_HIDDEN void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
-extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what);
-extern _X_HIDDEN int CoreKeyboardProc(DeviceIntPtr dev, int what);
-
-#endif /* DIX_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIX_H
+#define DIX_H
+
+#include "callback.h"
+#include "gc.h"
+#include "window.h"
+#include "input.h"
+#include "cursor.h"
+#include "geext.h"
+#include "events.h"
+#include <X11/extensions/XI.h>
+
+#define EARLIER -1
+#define SAMETIME 0
+#define LATER 1
+
+#define NullClient ((ClientPtr) 0)
+#define REQUEST(type) \
+ type *stuff = (type *)client->requestBuffer
+
+
+#define REQUEST_SIZE_MATCH(req)\
+ if ((sizeof(req) >> 2) != client->req_len)\
+ return(BadLength)
+
+#define REQUEST_AT_LEAST_SIZE(req) \
+ if ((sizeof(req) >> 2) > client->req_len )\
+ return(BadLength)
+
+#define REQUEST_FIXED_SIZE(req, n)\
+ if (((sizeof(req) >> 2) > client->req_len) || \
+ (((sizeof(req) + (n) + 3) >> 2) != client->req_len)) \
+ return(BadLength)
+
+#define LEGAL_NEW_RESOURCE(id,client)\
+ if (!LegalNewID(id,client)) \
+ {\
+ client->errorValue = id;\
+ return BadIDChoice;\
+ }
+
+#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
+ {\
+ int rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
+ if (rc != Success)\
+ return rc;\
+ rc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
+ if (rc != Success)\
+ return rc;\
+ if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
+ return BadMatch;\
+ }\
+ if (pGC->serialNumber != pDraw->serialNumber)\
+ ValidateGC(pDraw, pGC);
+
+
+#define WriteReplyToClient(pClient, size, pReply) { \
+ if ((pClient)->swapped) \
+ (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
+ (pClient, (int)(size), pReply); \
+ else (void) WriteToClient(pClient, (int)(size), (char *)(pReply)); }
+
+#define WriteSwappedDataToClient(pClient, size, pbuf) \
+ if ((pClient)->swapped) \
+ (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
+ else (void) WriteToClient (pClient, (int)(size), (char *)(pbuf));
+
+typedef struct _TimeStamp *TimeStampPtr;
+
+#ifndef _XTYPEDEF_CLIENTPTR
+typedef struct _Client *ClientPtr; /* also in misc.h */
+#define _XTYPEDEF_CLIENTPTR
+#endif
+
+typedef struct _WorkQueue *WorkQueuePtr;
+
+extern _X_EXPORT ClientPtr clients[MAXCLIENTS];
+extern _X_EXPORT ClientPtr serverClient;
+extern _X_EXPORT int currentMaxClients;
+extern _X_EXPORT char dispatchExceptionAtReset;
+
+typedef int HWEventQueueType;
+typedef HWEventQueueType* HWEventQueuePtr;
+
+extern _X_EXPORT HWEventQueuePtr checkForInput[2];
+
+typedef struct _TimeStamp {
+ CARD32 months; /* really ~49.7 days */
+ CARD32 milliseconds;
+} TimeStamp;
+
+/* dispatch.c */
+
+extern _X_EXPORT void SetInputCheck(
+ HWEventQueuePtr /*c0*/,
+ HWEventQueuePtr /*c1*/);
+
+extern _X_EXPORT void CloseDownClient(
+ ClientPtr /*client*/);
+
+extern _X_EXPORT void UpdateCurrentTime(void);
+
+extern _X_EXPORT void UpdateCurrentTimeIf(void);
+
+extern _X_EXPORT int dixDestroyPixmap(
+ pointer /*value*/,
+ XID /*pid*/);
+
+extern _X_EXPORT void InitClient(
+ ClientPtr /*client*/,
+ int /*i*/,
+ pointer /*ospriv*/);
+
+extern _X_EXPORT ClientPtr NextAvailableClient(
+ pointer /*ospriv*/);
+
+extern _X_EXPORT void SendErrorToClient(
+ ClientPtr /*client*/,
+ unsigned int /*majorCode*/,
+ unsigned int /*minorCode*/,
+ XID /*resId*/,
+ int /*errorCode*/);
+
+extern _X_EXPORT void MarkClientException(
+ ClientPtr /*client*/);
+
+extern _X_HIDDEN Bool CreateConnectionBlock(void);
+/* dixutils.c */
+
+extern _X_EXPORT int CompareISOLatin1Lowered(
+ unsigned char * /*a*/,
+ int alen,
+ unsigned char * /*b*/,
+ int blen);
+
+extern _X_EXPORT int dixLookupWindow(
+ WindowPtr *result,
+ XID id,
+ ClientPtr client,
+ Mask access_mode);
+
+extern _X_EXPORT int dixLookupDrawable(
+ DrawablePtr *result,
+ XID id,
+ ClientPtr client,
+ Mask type_mask,
+ Mask access_mode);
+
+extern _X_EXPORT int dixLookupGC(
+ GCPtr *result,
+ XID id,
+ ClientPtr client,
+ Mask access_mode);
+
+extern _X_EXPORT int dixLookupFontable(
+ FontPtr *result,
+ XID id,
+ ClientPtr client,
+ Mask access_mode);
+
+extern _X_EXPORT int dixLookupClient(
+ ClientPtr *result,
+ XID id,
+ ClientPtr client,
+ Mask access_mode);
+
+extern _X_EXPORT void NoopDDA(void);
+
+extern _X_EXPORT int AlterSaveSetForClient(
+ ClientPtr /*client*/,
+ WindowPtr /*pWin*/,
+ unsigned /*mode*/,
+ Bool /*toRoot*/,
+ Bool /*map*/);
+
+extern _X_EXPORT void DeleteWindowFromAnySaveSet(
+ WindowPtr /*pWin*/);
+
+extern _X_EXPORT void BlockHandler(
+ pointer /*pTimeout*/,
+ pointer /*pReadmask*/);
+
+extern _X_EXPORT void WakeupHandler(
+ int /*result*/,
+ pointer /*pReadmask*/);
+
+void
+EnableLimitedSchedulingLatency(void);
+
+void
+DisableLimitedSchedulingLatency(void);
+
+typedef void (* WakeupHandlerProcPtr)(
+ pointer /* blockData */,
+ int /* result */,
+ pointer /* pReadmask */);
+
+extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(
+ BlockHandlerProcPtr /*blockHandler*/,
+ WakeupHandlerProcPtr /*wakeupHandler*/,
+ pointer /*blockData*/);
+
+extern _X_EXPORT void RemoveBlockAndWakeupHandlers(
+ BlockHandlerProcPtr /*blockHandler*/,
+ WakeupHandlerProcPtr /*wakeupHandler*/,
+ pointer /*blockData*/);
+
+extern _X_EXPORT void InitBlockAndWakeupHandlers(void);
+
+extern _X_EXPORT void ProcessWorkQueue(void);
+
+extern _X_EXPORT void ProcessWorkQueueZombies(void);
+
+extern _X_EXPORT Bool QueueWorkProc(
+ Bool (* /*function*/)(
+ ClientPtr /*clientUnused*/,
+ pointer /*closure*/),
+ ClientPtr /*client*/,
+ pointer /*closure*/
+);
+
+typedef Bool (* ClientSleepProcPtr)(
+ ClientPtr /*client*/,
+ pointer /*closure*/);
+
+extern _X_EXPORT Bool ClientSleep(
+ ClientPtr /*client*/,
+ ClientSleepProcPtr /* function */,
+ pointer /*closure*/);
+
+#ifndef ___CLIENTSIGNAL_DEFINED___
+#define ___CLIENTSIGNAL_DEFINED___
+extern _X_EXPORT Bool ClientSignal(
+ ClientPtr /*client*/);
+#endif /* ___CLIENTSIGNAL_DEFINED___ */
+
+extern _X_EXPORT void ClientWakeup(
+ ClientPtr /*client*/);
+
+extern _X_EXPORT Bool ClientIsAsleep(
+ ClientPtr /*client*/);
+
+/* atom.c */
+
+extern _X_EXPORT Atom MakeAtom(
+ const char * /*string*/,
+ unsigned /*len*/,
+ Bool /*makeit*/);
+
+extern _X_EXPORT Bool ValidAtom(
+ Atom /*atom*/);
+
+extern _X_EXPORT const char *NameForAtom(
+ Atom /*atom*/);
+
+extern _X_EXPORT void AtomError(void) _X_NORETURN;
+
+extern _X_EXPORT void FreeAllAtoms(void);
+
+extern _X_EXPORT void InitAtoms(void);
+
+/* main.c */
+
+extern _X_EXPORT void SetVendorRelease(int release);
+
+extern _X_EXPORT void SetVendorString(char *string);
+
+/* events.c */
+
+extern void SetMaskForEvent(
+ int /* deviceid */,
+ Mask /* mask */,
+ int /* event */);
+
+extern _X_EXPORT void ConfineToShape(
+ DeviceIntPtr /* pDev */,
+ RegionPtr /* shape */,
+ int* /* px */,
+ int* /* py */);
+
+extern _X_EXPORT Bool IsParent(
+ WindowPtr /* maybeparent */,
+ WindowPtr /* child */);
+
+extern _X_EXPORT WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev);
+
+extern _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev);
+
+
+extern _X_EXPORT void NoticeEventTime(InternalEvent *ev);
+
+extern void EnqueueEvent(
+ InternalEvent * /* ev */,
+ DeviceIntPtr /* device */);
+
+extern void ActivatePointerGrab(
+ DeviceIntPtr /* mouse */,
+ GrabPtr /* grab */,
+ TimeStamp /* time */,
+ Bool /* autoGrab */);
+
+extern void DeactivatePointerGrab(
+ DeviceIntPtr /* mouse */);
+
+extern void ActivateKeyboardGrab(
+ DeviceIntPtr /* keybd */,
+ GrabPtr /* grab */,
+ TimeStamp /* time */,
+ Bool /* passive */);
+
+extern void DeactivateKeyboardGrab(
+ DeviceIntPtr /* keybd */);
+
+extern BOOL ActivateFocusInGrab(
+ DeviceIntPtr /* dev */,
+ WindowPtr /* old */,
+ WindowPtr /* win */);
+
+extern void AllowSome(
+ ClientPtr /* client */,
+ TimeStamp /* time */,
+ DeviceIntPtr /* thisDev */,
+ int /* newState */);
+
+extern void ReleaseActiveGrabs(
+ ClientPtr client);
+
+extern GrabPtr CheckPassiveGrabsOnWindow(
+ WindowPtr /* pWin */,
+ DeviceIntPtr /* device */,
+ DeviceEvent * /* event */,
+ BOOL /* checkCore */,
+ BOOL /* activate */);
+
+extern _X_EXPORT int DeliverEventsToWindow(
+ DeviceIntPtr /* pWin */,
+ WindowPtr /* pWin */,
+ xEventPtr /* pEvents */,
+ int /* count */,
+ Mask /* filter */,
+ GrabPtr /* grab */);
+
+extern int DeliverDeviceEvents(
+ WindowPtr /* pWin */,
+ InternalEvent* /* event */,
+ GrabPtr /* grab */,
+ WindowPtr /* stopAt */,
+ DeviceIntPtr /* dev */);
+
+extern void InitializeSprite(
+ DeviceIntPtr /* pDev */,
+ WindowPtr /* pWin */);
+
+extern void UpdateSpriteForScreen(
+ DeviceIntPtr /* pDev */,
+ ScreenPtr /* pScreen */);
+
+extern _X_EXPORT void WindowHasNewCursor(
+ WindowPtr /* pWin */);
+
+extern Bool CheckDeviceGrabs(
+ DeviceIntPtr /* device */,
+ DeviceEvent* /* event */,
+ WindowPtr /* ancestor */);
+
+extern void DeliverFocusedEvent(
+ DeviceIntPtr /* keybd */,
+ InternalEvent* /* event */,
+ WindowPtr /* window */);
+
+extern void DeliverGrabbedEvent(
+ InternalEvent* /* event */,
+ DeviceIntPtr /* thisDev */,
+ Bool /* deactivateGrab */);
+
+extern void FixKeyState(
+ DeviceEvent* /* event */,
+ DeviceIntPtr /* keybd */);
+
+extern void RecalculateDeliverableEvents(
+ WindowPtr /* pWin */);
+
+extern _X_EXPORT int OtherClientGone(
+ pointer /* value */,
+ XID /* id */);
+
+extern void DoFocusEvents(
+ DeviceIntPtr /* dev */,
+ WindowPtr /* fromWin */,
+ WindowPtr /* toWin */,
+ int /* mode */);
+
+extern int SetInputFocus(
+ ClientPtr /* client */,
+ DeviceIntPtr /* dev */,
+ Window /* focusID */,
+ CARD8 /* revertTo */,
+ Time /* ctime */,
+ Bool /* followOK */);
+
+extern int GrabDevice(
+ ClientPtr /* client */,
+ DeviceIntPtr /* dev */,
+ unsigned /* this_mode */,
+ unsigned /* other_mode */,
+ Window /* grabWindow */,
+ unsigned /* ownerEvents */,
+ Time /* ctime */,
+ GrabMask* /* mask */,
+ int /* grabtype */,
+ Cursor /* curs */,
+ Window /* confineToWin */,
+ CARD8 * /* status */);
+
+extern void InitEvents(void);
+
+extern void CloseDownEvents(void);
+
+extern void DeleteWindowFromAnyEvents(
+ WindowPtr /* pWin */,
+ Bool /* freeResources */);
+
+
+extern Mask EventMaskForClient(
+ WindowPtr /* pWin */,
+ ClientPtr /* client */);
+
+
+
+extern _X_EXPORT int DeliverEvents(
+ WindowPtr /*pWin*/,
+ xEventPtr /*xE*/,
+ int /*count*/,
+ WindowPtr /*otherParent*/);
+
+extern Bool CheckMotion(
+ DeviceEvent* /* ev */,
+ DeviceIntPtr /* pDev */);
+
+extern _X_EXPORT void WriteEventsToClient(
+ ClientPtr /*pClient*/,
+ int /*count*/,
+ xEventPtr /*events*/);
+
+extern _X_EXPORT int TryClientEvents(
+ ClientPtr /*client*/,
+ DeviceIntPtr /* device */,
+ xEventPtr /*pEvents*/,
+ int /*count*/,
+ Mask /*mask*/,
+ Mask /*filter*/,
+ GrabPtr /*grab*/);
+
+extern _X_EXPORT void WindowsRestructured(void);
+
+extern int SetClientPointer(
+ ClientPtr /* client */,
+ DeviceIntPtr /* device */);
+
+extern _X_EXPORT DeviceIntPtr PickPointer(
+ ClientPtr /* client */);
+
+extern _X_EXPORT DeviceIntPtr PickKeyboard(
+ ClientPtr /* client */);
+
+extern Bool IsInterferingGrab(
+ ClientPtr /* client */,
+ DeviceIntPtr /* dev */,
+ xEvent* /* events */);
+
+#ifdef PANORAMIX
+extern _X_EXPORT void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
+#endif
+
+#ifdef RANDR
+extern _X_EXPORT void
+ScreenRestructured (ScreenPtr pScreen);
+#endif
+
+extern _X_EXPORT int ffs(int i);
+
+
+/*
+ * ServerGrabCallback stuff
+ */
+
+extern _X_EXPORT CallbackListPtr ServerGrabCallback;
+
+typedef enum {SERVER_GRABBED, SERVER_UNGRABBED,
+ CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState;
+
+typedef struct {
+ ClientPtr client;
+ ServerGrabState grabstate;
+} ServerGrabInfoRec;
+
+/*
+ * EventCallback stuff
+ */
+
+extern _X_EXPORT CallbackListPtr EventCallback;
+
+typedef struct {
+ ClientPtr client;
+ xEventPtr events;
+ int count;
+} EventInfoRec;
+
+/*
+ * DeviceEventCallback stuff
+ */
+
+extern _X_EXPORT CallbackListPtr DeviceEventCallback;
+
+typedef struct {
+ InternalEvent *event;
+ DeviceIntPtr device;
+} DeviceEventInfoRec;
+
+extern int XItoCoreType(int xi_type);
+extern Bool DevHasCursor(DeviceIntPtr pDev);
+extern Bool _X_EXPORT IsPointerDevice( DeviceIntPtr dev);
+extern Bool _X_EXPORT IsKeyboardDevice(DeviceIntPtr dev);
+extern Bool IsPointerEvent(InternalEvent *event);
+extern _X_EXPORT Bool IsMaster(DeviceIntPtr dev);
+extern _X_EXPORT Bool IsFloating(DeviceIntPtr dev);
+
+extern _X_HIDDEN void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
+extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what);
+extern _X_HIDDEN int CoreKeyboardProc(DeviceIntPtr dev, int what);
+
+#endif /* DIX_H */
diff --git a/xorg-server/include/dixstruct.h b/xorg-server/include/dixstruct.h
index 443e8b0ae..50430c81a 100644
--- a/xorg-server/include/dixstruct.h
+++ b/xorg-server/include/dixstruct.h
@@ -1,192 +1,192 @@
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef DIXSTRUCT_H
-#define DIXSTRUCT_H
-
-#include "client.h"
-#include "dix.h"
-#include "resource.h"
-#include "cursor.h"
-#include "gc.h"
-#include "pixmap.h"
-#include "privates.h"
-#include <X11/Xmd.h>
-
-/*
- * direct-mapped hash table, used by resource manager to store
- * translation from client ids to server addresses.
- */
-
-extern _X_EXPORT CallbackListPtr ClientStateCallback;
-
-typedef struct {
- ClientPtr client;
- xConnSetupPrefix *prefix;
- xConnSetup *setup;
-} NewClientInfoRec;
-
-typedef void (*ReplySwapPtr) (
- ClientPtr /* pClient */,
- int /* size */,
- void * /* pbuf */);
-
-extern _X_EXPORT void ReplyNotSwappd (
- ClientPtr /* pClient */,
- int /* size */,
- void * /* pbuf */) _X_NORETURN;
-
-typedef enum {ClientStateInitial,
- ClientStateAuthenticating,
- ClientStateRunning,
- ClientStateRetained,
- ClientStateGone,
- ClientStateCheckingSecurity,
- ClientStateCheckedSecurity} ClientState;
-
-#ifdef XFIXES
-typedef struct _saveSet {
- struct _Window *windowPtr;
- Bool toRoot;
- Bool map;
-} SaveSetElt;
-#define SaveSetWindow(ss) ((ss).windowPtr)
-#define SaveSetToRoot(ss) ((ss).toRoot)
-#define SaveSetShouldMap(ss) ((ss).map)
-#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
-#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
-#define SaveSetAssignMap(ss,m) ((ss).map = (m))
-#else
-typedef struct _Window *SaveSetElt;
-#define SaveSetWindow(ss) (ss)
-#define SaveSetToRoot(ss) FALSE
-#define SaveSetShouldMap(ss) TRUE
-#define SaveSetAssignWindow(ss,w) ((ss) = (w))
-#define SaveSetAssignToRoot(ss,tr)
-#define SaveSetAssignMap(ss,m)
-#endif
-
-typedef struct _Client {
- int index;
- Mask clientAsMask;
- pointer requestBuffer;
- pointer osPrivate; /* for OS layer, including scheduler */
- Bool swapped;
- ReplySwapPtr pSwapReplyFunc;
- XID errorValue;
- int sequence;
- int closeDownMode;
- int clientGone;
- int noClientException; /* this client died or needs to be
- * killed */
- int ignoreCount; /* count for Attend/IgnoreClient */
- SaveSetElt *saveSet;
- int numSaved;
- int (**requestVector) (
- ClientPtr /* pClient */);
- CARD32 req_len; /* length of current request */
- Bool big_requests; /* supports large requests */
- int priority;
- ClientState clientState;
- PrivateRec *devPrivates;
- unsigned short xkbClientFlags;
- unsigned short mapNotifyMask;
- unsigned short newKeyboardNotifyMask;
- unsigned short vMajor,vMinor;
- KeyCode minKC,maxKC;
-
- unsigned long replyBytesRemaining;
- int smart_priority;
- long smart_start_tick;
- long smart_stop_tick;
- long smart_check_tick;
-
- DeviceIntPtr clientPtr;
- ClientIdPtr clientIds;
-} ClientRec;
-
-/*
- * Scheduling interface
- */
-extern _X_EXPORT long SmartScheduleTime;
-extern _X_EXPORT long SmartScheduleInterval;
-extern _X_EXPORT long SmartScheduleSlice;
-extern _X_EXPORT long SmartScheduleMaxSlice;
-extern _X_EXPORT Bool SmartScheduleDisable;
-extern _X_EXPORT void SmartScheduleStartTimer(void);
-extern _X_EXPORT void SmartScheduleStopTimer(void);
-#define SMART_MAX_PRIORITY (20)
-#define SMART_MIN_PRIORITY (-20)
-
-extern _X_EXPORT void SmartScheduleInit(void);
-
-
-/* This prototype is used pervasively in Xext, dix */
-#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
-
-typedef struct _WorkQueue {
- struct _WorkQueue *next;
- Bool (*function) (
- ClientPtr /* pClient */,
- pointer /* closure */
-);
- ClientPtr client;
- pointer closure;
-} WorkQueueRec;
-
-extern _X_EXPORT TimeStamp currentTime;
-extern _X_EXPORT TimeStamp lastDeviceEventTime;
-
-extern _X_EXPORT int CompareTimeStamps(
- TimeStamp /*a*/,
- TimeStamp /*b*/);
-
-extern _X_EXPORT TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
-
-typedef struct _CallbackRec {
- CallbackProcPtr proc;
- pointer data;
- Bool deleted;
- struct _CallbackRec *next;
-} CallbackRec, *CallbackPtr;
-
-typedef struct _CallbackList {
- int inCallback;
- Bool deleted;
- int numDeleted;
- CallbackPtr list;
-} CallbackListRec;
-
-/* proc vectors */
-
-extern _X_EXPORT int (* InitialVector[3]) (ClientPtr /*client*/);
-
-extern _X_EXPORT int (* ProcVector[256]) (ClientPtr /*client*/);
-
-extern _X_EXPORT int (* SwappedProcVector[256]) (ClientPtr /*client*/);
-
-extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
-
-extern _X_EXPORT int ProcBadRequest(ClientPtr /*client*/);
-
-#endif /* DIXSTRUCT_H */
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIXSTRUCT_H
+#define DIXSTRUCT_H
+
+#include "client.h"
+#include "dix.h"
+#include "resource.h"
+#include "cursor.h"
+#include "gc.h"
+#include "pixmap.h"
+#include "privates.h"
+#include <X11/Xmd.h>
+
+/*
+ * direct-mapped hash table, used by resource manager to store
+ * translation from client ids to server addresses.
+ */
+
+extern _X_EXPORT CallbackListPtr ClientStateCallback;
+
+typedef struct {
+ ClientPtr client;
+ xConnSetupPrefix *prefix;
+ xConnSetup *setup;
+} NewClientInfoRec;
+
+typedef void (*ReplySwapPtr) (
+ ClientPtr /* pClient */,
+ int /* size */,
+ void * /* pbuf */);
+
+extern _X_EXPORT void ReplyNotSwappd (
+ ClientPtr /* pClient */,
+ int /* size */,
+ void * /* pbuf */) _X_NORETURN;
+
+typedef enum {ClientStateInitial,
+ ClientStateAuthenticating,
+ ClientStateRunning,
+ ClientStateRetained,
+ ClientStateGone,
+ ClientStateCheckingSecurity,
+ ClientStateCheckedSecurity} ClientState;
+
+#ifdef XFIXES
+typedef struct _saveSet {
+ struct _Window *windowPtr;
+ Bool toRoot;
+ Bool map;
+} SaveSetElt;
+#define SaveSetWindow(ss) ((ss).windowPtr)
+#define SaveSetToRoot(ss) ((ss).toRoot)
+#define SaveSetShouldMap(ss) ((ss).map)
+#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
+#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
+#define SaveSetAssignMap(ss,m) ((ss).map = (m))
+#else
+typedef struct _Window *SaveSetElt;
+#define SaveSetWindow(ss) (ss)
+#define SaveSetToRoot(ss) FALSE
+#define SaveSetShouldMap(ss) TRUE
+#define SaveSetAssignWindow(ss,w) ((ss) = (w))
+#define SaveSetAssignToRoot(ss,tr)
+#define SaveSetAssignMap(ss,m)
+#endif
+
+typedef struct _Client {
+ int index;
+ Mask clientAsMask;
+ pointer requestBuffer;
+ pointer osPrivate; /* for OS layer, including scheduler */
+ Bool swapped;
+ ReplySwapPtr pSwapReplyFunc;
+ XID errorValue;
+ unsigned short sequence; //MH
+ int closeDownMode;
+ int clientGone;
+ int noClientException; /* this client died or needs to be
+ * killed */
+ int ignoreCount; /* count for Attend/IgnoreClient */
+ SaveSetElt *saveSet;
+ int numSaved;
+ int (**requestVector) (
+ ClientPtr /* pClient */);
+ CARD32 req_len; /* length of current request */
+ Bool big_requests; /* supports large requests */
+ int priority;
+ ClientState clientState;
+ PrivateRec *devPrivates;
+ unsigned short xkbClientFlags;
+ unsigned short mapNotifyMask;
+ unsigned short newKeyboardNotifyMask;
+ unsigned short vMajor,vMinor;
+ KeyCode minKC,maxKC;
+
+ unsigned long replyBytesRemaining;
+ int smart_priority;
+ long smart_start_tick;
+ long smart_stop_tick;
+ long smart_check_tick;
+
+ DeviceIntPtr clientPtr;
+ ClientIdPtr clientIds;
+} ClientRec;
+
+/*
+ * Scheduling interface
+ */
+extern _X_EXPORT long SmartScheduleTime;
+extern _X_EXPORT long SmartScheduleInterval;
+extern _X_EXPORT long SmartScheduleSlice;
+extern _X_EXPORT long SmartScheduleMaxSlice;
+extern _X_EXPORT Bool SmartScheduleDisable;
+extern _X_EXPORT void SmartScheduleStartTimer(void);
+extern _X_EXPORT void SmartScheduleStopTimer(void);
+#define SMART_MAX_PRIORITY (20)
+#define SMART_MIN_PRIORITY (-20)
+
+extern _X_EXPORT void SmartScheduleInit(void);
+
+
+/* This prototype is used pervasively in Xext, dix */
+#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
+
+typedef struct _WorkQueue {
+ struct _WorkQueue *next;
+ Bool (*function) (
+ ClientPtr /* pClient */,
+ pointer /* closure */
+);
+ ClientPtr client;
+ pointer closure;
+} WorkQueueRec;
+
+extern _X_EXPORT TimeStamp currentTime;
+extern _X_EXPORT TimeStamp lastDeviceEventTime;
+
+extern _X_EXPORT int CompareTimeStamps(
+ TimeStamp /*a*/,
+ TimeStamp /*b*/);
+
+extern _X_EXPORT TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
+
+typedef struct _CallbackRec {
+ CallbackProcPtr proc;
+ pointer data;
+ Bool deleted;
+ struct _CallbackRec *next;
+} CallbackRec, *CallbackPtr;
+
+typedef struct _CallbackList {
+ int inCallback;
+ Bool deleted;
+ int numDeleted;
+ CallbackPtr list;
+} CallbackListRec;
+
+/* proc vectors */
+
+extern _X_EXPORT int (* InitialVector[3]) (ClientPtr /*client*/);
+
+extern _X_EXPORT int (* ProcVector[256]) (ClientPtr /*client*/);
+
+extern _X_EXPORT int (* SwappedProcVector[256]) (ClientPtr /*client*/);
+
+extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
+
+extern _X_EXPORT int ProcBadRequest(ClientPtr /*client*/);
+
+#endif /* DIXSTRUCT_H */
diff --git a/xorg-server/include/eventconvert.h b/xorg-server/include/eventconvert.h
index b000abc4b..9e63b46be 100644
--- a/xorg-server/include/eventconvert.h
+++ b/xorg-server/include/eventconvert.h
@@ -1,40 +1,40 @@
-/*
- * Copyright © 2009 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#ifndef _EVENTCONVERT_H_
-#include <X11/X.h>
-#include <X11/extensions/XIproto.h>
-#include "input.h"
-#include "events.h"
-
-#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16))
-
-_X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count);
-_X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count);
-_X_EXPORT int EventToXI2(InternalEvent *ev, xEvent **xi);
-_X_INTERNAL int GetCoreType(InternalEvent* ev);
-_X_INTERNAL int GetXIType(InternalEvent* ev);
-_X_INTERNAL int GetXI2Type(InternalEvent* ev);
-
-#endif /* _EVENTCONVERT_H_ */
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef _EVENTCONVERT_H_
+#include <X11/X.h>
+#include <X11/extensions/XIproto.h>
+#include "input.h"
+#include "events.h"
+
+#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16))
+
+_X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count);
+_X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count);
+_X_EXPORT int EventToXI2(InternalEvent *ev, xEvent **xi);
+_X_INTERNAL int GetCoreType(InternalEvent* ev);
+_X_INTERNAL int GetXIType(InternalEvent* ev);
+_X_INTERNAL int GetXI2Type(InternalEvent* ev);
+
+#endif /* _EVENTCONVERT_H_ */
diff --git a/xorg-server/include/globals.h b/xorg-server/include/globals.h
index e9a6028dd..a528d4c31 100644
--- a/xorg-server/include/globals.h
+++ b/xorg-server/include/globals.h
@@ -38,9 +38,7 @@ extern _X_EXPORT Bool DPMSCapableFlag;
extern _X_EXPORT Bool PanoramiXExtensionDisabledHack;
#endif
-#ifdef COMPOSITE
extern _X_EXPORT Bool noCompositeExtension;
-#endif
#ifdef DAMAGE
extern _X_EXPORT Bool noDamageExtension;
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index 8509eb024..02c30d33e 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/include/inputstr.h
@@ -1,615 +1,615 @@
-/************************************************************
-
-Copyright 1987, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-********************************************************/
-
-
-#ifndef INPUTSTRUCT_H
-#define INPUTSTRUCT_H
-
-#include <pixman.h>
-#include "input.h"
-#include "window.h"
-#include "dixstruct.h"
-#include "cursorstr.h"
-#include "geext.h"
-#include "privates.h"
-
-#define BitIsOn(ptr, bit) (!!(((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))))
-#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
-#define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7)))
-extern _X_EXPORT int CountBits(const uint8_t *mask, int len);
-
-#define SameClient(obj,client) \
- (CLIENT_BITS((obj)->resource) == (client)->clientAsMask)
-
-#define EMASKSIZE MAXDEVICES + 2
-
-/* This is the last XI2 event supported by the server. If you add
- * events to the protocol, the server will not support these events until
- * this number here is bumped.
- */
-#define XI2LASTEVENT 17 /* XI_RawMotion */
-#define XI2MASKSIZE ((XI2LASTEVENT + 7)/8) /* no of bits for masks */
-
-/**
- * This struct stores the core event mask for each client except the client
- * that created the window.
- *
- * Each window that has events selected from other clients has at least one of
- * these masks. If multiple clients selected for events on the same window,
- * these masks are in a linked list.
- *
- * The event mask for the client that created the window is stored in
- * win->eventMask instead.
- *
- * The resource id is simply a fake client ID to associate this mask with a
- * client.
- *
- * Kludge: OtherClients and InputClients must be compatible, see code.
- */
-typedef struct _OtherClients {
- OtherClientsPtr next; /**< Pointer to the next mask */
- XID resource; /**< id for putting into resource manager */
- Mask mask; /**< Core event mask */
-} OtherClients;
-
-/**
- * This struct stores the XI event mask for each client.
- *
- * Each window that has events selected has at least one of these masks. If
- * multiple client selected for events on the same window, these masks are in
- * a linked list.
- */
-typedef struct _InputClients {
- InputClientsPtr next; /**< Pointer to the next mask */
- XID resource; /**< id for putting into resource manager */
- Mask mask[EMASKSIZE]; /**< Actual XI event mask, deviceid is index */
- /** XI2 event masks. One per device, each bit is a mask of (1 << type) */
- unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE];
-} InputClients;
-
-/**
- * Combined XI event masks from all devices.
- *
- * This is the XI equivalent of the deliverableEvents, eventMask and
- * dontPropagate mask of the WindowRec (or WindowOptRec).
- *
- * A window that has an XI client selecting for events has exactly one
- * OtherInputMasks struct and exactly one InputClients struct hanging off
- * inputClients. Each further client appends to the inputClients list.
- * Each Mask field is per-device, with the device id as the index.
- * Exception: for non-device events (Presence events), the MAXDEVICES
- * deviceid is used.
- */
-typedef struct _OtherInputMasks {
- /**
- * Bitwise OR of all masks by all clients and the window's parent's masks.
- */
- Mask deliverableEvents[EMASKSIZE];
- /**
- * Bitwise OR of all masks by all clients on this window.
- */
- Mask inputEvents[EMASKSIZE];
- /** The do-not-propagate masks for each device. */
- Mask dontPropagateMask[EMASKSIZE];
- /** The clients that selected for events */
- InputClientsPtr inputClients;
- /* XI2 event masks. One per device, each bit is a mask of (1 << type) */
- unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE];
-} OtherInputMasks;
-
-/*
- * The following structure gets used for both active and passive grabs. For
- * active grabs some of the fields (e.g. modifiers) are not used. However,
- * that is not much waste since there aren't many active grabs (one per
- * keyboard/pointer device) going at once in the server.
- */
-
-#define MasksPerDetailMask 8 /* 256 keycodes and 256 possible
- modifier combinations, but only
- 3 buttons. */
-
-typedef struct _DetailRec { /* Grab details may be bit masks */
- unsigned int exact;
- Mask *pMask;
-} DetailRec;
-
-typedef enum {
- GRABTYPE_CORE,
- GRABTYPE_XI,
- GRABTYPE_XI2
-} GrabType;
-
-union _GrabMask {
- Mask core;
- Mask xi;
- char xi2mask[EMASKSIZE][XI2MASKSIZE];
-};
-
-/**
- * Central struct for device grabs.
- * The same struct is used for both core grabs and device grabs, with
- * different fields being set.
- * If the grab is a core grab (GrabPointer/GrabKeyboard), then the eventMask
- * is a combination of standard event masks (i.e. PointerMotionMask |
- * ButtonPressMask).
- * If the grab is a device grab (GrabDevice), then the eventMask is a
- * combination of event masks for a given XI event type (see SetEventInfo).
- *
- * If the grab is a result of a ButtonPress, then eventMask is the core mask
- * and deviceMask is set to the XI event mask for the grab.
- */
-typedef struct _GrabRec {
- GrabPtr next; /* for chain of passive grabs */
- XID resource;
- DeviceIntPtr device;
- WindowPtr window;
- unsigned ownerEvents:1;
- unsigned keyboardMode:1;
- unsigned pointerMode:1;
- GrabType grabtype;
- CARD8 type; /* event type */
- DetailRec modifiersDetail;
- DeviceIntPtr modifierDevice;
- DetailRec detail; /* key or button */
- WindowPtr confineTo; /* always NULL for keyboards */
- CursorPtr cursor; /* always NULL for keyboards */
- Mask eventMask;
- Mask deviceMask;
- /* XI2 event masks. One per device, each bit is a mask of (1 << type) */
- unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE];
-} GrabRec;
-
-/**
- * Sprite information for a device.
- */
-typedef struct _SpriteRec {
- CursorPtr current;
- BoxRec hotLimits; /* logical constraints of hot spot */
- Bool confined; /* confined to screen */
- RegionPtr hotShape; /* additional logical shape constraint */
- BoxRec physLimits; /* physical constraints of hot spot */
- WindowPtr win; /* window of logical position */
- HotSpot hot; /* logical pointer position */
- HotSpot hotPhys; /* physical pointer position */
-#ifdef PANORAMIX
- ScreenPtr screen; /* all others are in Screen 0 coordinates */
- RegionRec Reg1; /* Region 1 for confining motion */
- RegionRec Reg2; /* Region 2 for confining virtual motion */
- WindowPtr windows[MAXSCREENS];
- WindowPtr confineWin; /* confine window */
-#endif
- /* The window trace information is used at dix/events.c to avoid having
- * to compute all the windows between the root and the current pointer
- * window each time a button or key goes down. The grabs on each of those
- * windows must be checked.
- * spriteTraces should only be used at dix/events.c! */
- WindowPtr *spriteTrace;
- int spriteTraceSize;
- int spriteTraceGood;
-
- /* Due to delays between event generation and event processing, it is
- * possible that the pointer has crossed screen boundaries between the
- * time in which it begins generating events and the time when
- * those events are processed.
- *
- * pEnqueueScreen: screen the pointer was on when the event was generated
- * pDequeueScreen: screen the pointer was on when the event is processed
- */
- ScreenPtr pEnqueueScreen;
- ScreenPtr pDequeueScreen;
-
-} SpriteRec;
-
-typedef struct _KeyClassRec {
- int sourceid;
- CARD8 down[DOWN_LENGTH];
- CARD8 postdown[DOWN_LENGTH];
- int modifierKeyCount[8];
- struct _XkbSrvInfo *xkbInfo;
-} KeyClassRec, *KeyClassPtr;
-
-typedef struct _AxisInfo {
- int resolution;
- int min_resolution;
- int max_resolution;
- int min_value;
- int max_value;
- Atom label;
- CARD8 mode;
-} AxisInfo, *AxisInfoPtr;
-
-typedef struct _ValuatorAccelerationRec {
- int number;
- PointerAccelSchemeProc AccelSchemeProc;
- void *accelData; /* at disposal of AccelScheme */
- PointerAccelSchemeInitProc AccelInitProc;
- DeviceCallbackProc AccelCleanupProc;
-} ValuatorAccelerationRec, *ValuatorAccelerationPtr;
-
-typedef struct _ValuatorClassRec {
- int sourceid;
- int numMotionEvents;
- int first_motion;
- int last_motion;
- void *motion; /* motion history buffer. Different layout
- for MDs and SDs!*/
- WindowPtr motionHintWindow;
-
- AxisInfoPtr axes;
- unsigned short numAxes;
- double *axisVal; /* always absolute, but device-coord system */
- ValuatorAccelerationRec accelScheme;
-} ValuatorClassRec, *ValuatorClassPtr;
-
-typedef struct _ButtonClassRec {
- int sourceid;
- CARD8 numButtons;
- CARD8 buttonsDown; /* number of buttons currently down
- This counts logical buttons, not
- physical ones, i.e if some buttons
- are mapped to 0, they're not counted
- here */
- unsigned short state;
- Mask motionMask;
- CARD8 down[DOWN_LENGTH];
- CARD8 postdown[DOWN_LENGTH];
- CARD8 map[MAP_LENGTH];
- union _XkbAction *xkb_acts;
- Atom labels[MAX_BUTTONS];
-} ButtonClassRec, *ButtonClassPtr;
-
-typedef struct _FocusClassRec {
- int sourceid;
- WindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */
- int revert;
- TimeStamp time;
- WindowPtr *trace;
- int traceSize;
- int traceGood;
-} FocusClassRec, *FocusClassPtr;
-
-typedef struct _ProximityClassRec {
- int sourceid;
- char in_proximity;
-} ProximityClassRec, *ProximityClassPtr;
-
-typedef struct _AbsoluteClassRec {
- int sourceid;
- /* Calibration. */
- int min_x;
- int max_x;
- int min_y;
- int max_y;
- int flip_x;
- int flip_y;
- int rotation;
- int button_threshold;
-
- /* Area. */
- int offset_x;
- int offset_y;
- int width;
- int height;
- int screen;
- XID following;
-} AbsoluteClassRec, *AbsoluteClassPtr;
-
-typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr;
-typedef struct _PtrFeedbackClassRec *PtrFeedbackPtr;
-typedef struct _IntegerFeedbackClassRec *IntegerFeedbackPtr;
-typedef struct _StringFeedbackClassRec *StringFeedbackPtr;
-typedef struct _BellFeedbackClassRec *BellFeedbackPtr;
-typedef struct _LedFeedbackClassRec *LedFeedbackPtr;
-
-typedef struct _KbdFeedbackClassRec {
- BellProcPtr BellProc;
- KbdCtrlProcPtr CtrlProc;
- KeybdCtrl ctrl;
- KbdFeedbackPtr next;
- struct _XkbSrvLedInfo *xkb_sli;
-} KbdFeedbackClassRec;
-
-typedef struct _PtrFeedbackClassRec {
- PtrCtrlProcPtr CtrlProc;
- PtrCtrl ctrl;
- PtrFeedbackPtr next;
-} PtrFeedbackClassRec;
-
-typedef struct _IntegerFeedbackClassRec {
- IntegerCtrlProcPtr CtrlProc;
- IntegerCtrl ctrl;
- IntegerFeedbackPtr next;
-} IntegerFeedbackClassRec;
-
-typedef struct _StringFeedbackClassRec {
- StringCtrlProcPtr CtrlProc;
- StringCtrl ctrl;
- StringFeedbackPtr next;
-} StringFeedbackClassRec;
-
-typedef struct _BellFeedbackClassRec {
- BellProcPtr BellProc;
- BellCtrlProcPtr CtrlProc;
- BellCtrl ctrl;
- BellFeedbackPtr next;
-} BellFeedbackClassRec;
-
-typedef struct _LedFeedbackClassRec {
- LedCtrlProcPtr CtrlProc;
- LedCtrl ctrl;
- LedFeedbackPtr next;
- struct _XkbSrvLedInfo *xkb_sli;
-} LedFeedbackClassRec;
-
-
-typedef struct _ClassesRec {
- KeyClassPtr key;
- ValuatorClassPtr valuator;
- ButtonClassPtr button;
- FocusClassPtr focus;
- ProximityClassPtr proximity;
- AbsoluteClassPtr absolute;
- KbdFeedbackPtr kbdfeed;
- PtrFeedbackPtr ptrfeed;
- IntegerFeedbackPtr intfeed;
- StringFeedbackPtr stringfeed;
- BellFeedbackPtr bell;
- LedFeedbackPtr leds;
-} ClassesRec;
-
-
-/* Device properties */
-typedef struct _XIPropertyValue
-{
- Atom type; /* ignored by server */
- short format; /* format of data for swapping - 8,16,32 */
- long size; /* size of data in (format/8) bytes */
- pointer data; /* private to client */
-} XIPropertyValueRec;
-
-typedef struct _XIProperty
-{
- struct _XIProperty *next;
- Atom propertyName;
- BOOL deletable; /* clients can delete this prop? */
- XIPropertyValueRec value;
-} XIPropertyRec;
-
-typedef XIPropertyRec *XIPropertyPtr;
-typedef XIPropertyValueRec *XIPropertyValuePtr;
-
-
-typedef struct _XIPropertyHandler
-{
- struct _XIPropertyHandler* next;
- long id;
- int (*SetProperty) (DeviceIntPtr dev,
- Atom property,
- XIPropertyValuePtr prop,
- BOOL checkonly);
- int (*GetProperty) (DeviceIntPtr dev,
- Atom property);
- int (*DeleteProperty) (DeviceIntPtr dev,
- Atom property);
-} XIPropertyHandler, *XIPropertyHandlerPtr;
-
-/* states for devices */
-
-#define NOT_GRABBED 0
-#define THAWED 1
-#define THAWED_BOTH 2 /* not a real state */
-#define FREEZE_NEXT_EVENT 3
-#define FREEZE_BOTH_NEXT_EVENT 4
-#define FROZEN 5 /* any state >= has device frozen */
-#define FROZEN_NO_EVENT 5
-#define FROZEN_WITH_EVENT 6
-#define THAW_OTHERS 7
-
-
-typedef struct _GrabInfoRec {
- TimeStamp grabTime;
- Bool fromPassiveGrab; /* true if from passive grab */
- Bool implicitGrab; /* implicit from ButtonPress */
- GrabRec activeGrab;
- GrabPtr grab;
- CARD8 activatingKey;
- void (*ActivateGrab) (
- DeviceIntPtr /*device*/,
- GrabPtr /*grab*/,
- TimeStamp /*time*/,
- Bool /*autoGrab*/);
- void (*DeactivateGrab)(
- DeviceIntPtr /*device*/);
- struct {
- Bool frozen;
- int state;
- GrabPtr other; /* if other grab has this frozen */
- DeviceEvent *event; /* saved to be replayed */
- } sync;
-} GrabInfoRec, *GrabInfoPtr;
-
-typedef struct _SpriteInfoRec {
- /* sprite must always point to a valid sprite. For devices sharing the
- * sprite, let sprite point to a paired spriteOwner's sprite. */
- SpritePtr sprite; /* sprite information */
- Bool spriteOwner; /* True if device owns the sprite */
- DeviceIntPtr paired; /* The paired device. Keyboard if
- spriteOwner is TRUE, otherwise the
- pointer that owns the sprite. */
-
- /* keep states for animated cursor */
- struct {
- CursorPtr pCursor;
- ScreenPtr pScreen;
- int elt;
- CARD32 time;
- } anim;
-} SpriteInfoRec, *SpriteInfoPtr;
-
-/* device types */
-#define MASTER_POINTER 1
-#define MASTER_KEYBOARD 2
-#define SLAVE 3
-#define MASTER_ATTACHED 4 /* special type for GetMaster */
-
-typedef struct _DeviceIntRec {
- DeviceRec public;
- DeviceIntPtr next;
- Bool startup; /* true if needs to be turned on at
- server intialization time */
- DeviceProc deviceProc; /* proc(DevicePtr, DEVICE_xx). It is
- used to initialize, turn on, or
- turn off the device */
- Bool inited; /* TRUE if INIT returns Success */
- Bool enabled; /* TRUE if ON returns Success */
- Bool coreEvents; /* TRUE if device also sends core */
- GrabInfoRec deviceGrab; /* grab on the device */
- int type; /* MASTER_POINTER, MASTER_KEYBOARD, SLAVE */
- Atom xinput_type;
- char *name;
- int id;
- KeyClassPtr key;
- ValuatorClassPtr valuator;
- ButtonClassPtr button;
- FocusClassPtr focus;
- ProximityClassPtr proximity;
- AbsoluteClassPtr absolute;
- KbdFeedbackPtr kbdfeed;
- PtrFeedbackPtr ptrfeed;
- IntegerFeedbackPtr intfeed;
- StringFeedbackPtr stringfeed;
- BellFeedbackPtr bell;
- LedFeedbackPtr leds;
- struct _XkbInterest *xkb_interest;
- char *config_info; /* used by the hotplug layer */
- ClassesPtr unused_classes; /* for master devices */
- int saved_master_id; /* for slaves while grabbed */
- PrivateRec *devPrivates;
- DeviceUnwrapProc unwrapProc;
- SpriteInfoPtr spriteInfo;
- DeviceIntPtr master; /* master device */
- DeviceIntPtr lastSlave; /* last slave device used */
-
- /* last valuator values recorded, not posted to client;
- * for slave devices, valuators is in device coordinates
- * for master devices, valuators is in screen coordinates
- * see dix/getevents.c
- * remainder supports acceleration
- */
- struct {
- int valuators[MAX_VALUATORS];
- float remainder[MAX_VALUATORS];
- int numValuators;
- DeviceIntPtr slave;
- } last;
-
- /* Input device property handling. */
- struct {
- XIPropertyPtr properties;
- XIPropertyHandlerPtr handlers; /* NULL-terminated */
- } properties;
-
- /* coordinate transformation matrix for absolute input devices */
- struct pixman_f_transform transform;
-
- /* XTest related master device id */
- int xtest_master_id;
-} DeviceIntRec;
-
-typedef struct {
- int numDevices; /* total number of devices */
- DeviceIntPtr devices; /* all devices turned on */
- DeviceIntPtr off_devices; /* all devices turned off */
- DeviceIntPtr keyboard; /* the main one for the server */
- DeviceIntPtr pointer;
- DeviceIntPtr all_devices;
- DeviceIntPtr all_master_devices;
-} InputInfo;
-
-extern _X_EXPORT InputInfo inputInfo;
-
-/* for keeping the events for devices grabbed synchronously */
-typedef struct _QdEvent *QdEventPtr;
-typedef struct _QdEvent {
- QdEventPtr next;
- DeviceIntPtr device;
- ScreenPtr pScreen; /* what screen the pointer was on */
- unsigned long months; /* milliseconds is in the event */
- InternalEvent *event;
-} QdEventRec;
-
-/**
- * syncEvents is the global structure for queued events.
- *
- * Devices can be frozen through GrabModeSync pointer grabs. If this is the
- * case, events from these devices are added to "pending" instead of being
- * processed normally. When the device is unfrozen, events in "pending" are
- * replayed and processed as if they would come from the device directly.
- */
-typedef struct _EventSyncInfo {
- QdEventPtr pending, /**< list of queued events */
- *pendtail; /**< last event in list */
- /** The device to replay events for. Only set in AllowEvents(), in which
- * case it is set to the device specified in the request. */
- DeviceIntPtr replayDev; /* kludgy rock to put flag for */
-
- /**
- * The window the events are supposed to be replayed on.
- * This window may be set to the grab's window (but only when
- * Replay{Pointer|Keyboard} is given in the XAllowEvents()
- * request. */
- WindowPtr replayWin; /* ComputeFreezes */
- /**
- * Flag to indicate whether we're in the process of
- * replaying events. Only set in ComputeFreezes(). */
- Bool playingEvents;
- TimeStamp time;
-} EventSyncInfoRec, *EventSyncInfoPtr;
-
-extern EventSyncInfoRec syncEvents;
-
-#endif /* INPUTSTRUCT_H */
+/************************************************************
+
+Copyright 1987, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+
+#ifndef INPUTSTRUCT_H
+#define INPUTSTRUCT_H
+
+#include <pixman.h>
+#include "input.h"
+#include "window.h"
+#include "dixstruct.h"
+#include "cursorstr.h"
+#include "geext.h"
+#include "privates.h"
+
+#define BitIsOn(ptr, bit) (!!(((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))))
+#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
+#define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7)))
+extern _X_EXPORT int CountBits(const uint8_t *mask, int len);
+
+#define SameClient(obj,client) \
+ (CLIENT_BITS((obj)->resource) == (client)->clientAsMask)
+
+#define EMASKSIZE MAXDEVICES + 2
+
+/* This is the last XI2 event supported by the server. If you add
+ * events to the protocol, the server will not support these events until
+ * this number here is bumped.
+ */
+#define XI2LASTEVENT 17 /* XI_RawMotion */
+#define XI2MASKSIZE ((XI2LASTEVENT + 7)/8) /* no of bits for masks */
+
+/**
+ * This struct stores the core event mask for each client except the client
+ * that created the window.
+ *
+ * Each window that has events selected from other clients has at least one of
+ * these masks. If multiple clients selected for events on the same window,
+ * these masks are in a linked list.
+ *
+ * The event mask for the client that created the window is stored in
+ * win->eventMask instead.
+ *
+ * The resource id is simply a fake client ID to associate this mask with a
+ * client.
+ *
+ * Kludge: OtherClients and InputClients must be compatible, see code.
+ */
+typedef struct _OtherClients {
+ OtherClientsPtr next; /**< Pointer to the next mask */
+ XID resource; /**< id for putting into resource manager */
+ Mask mask; /**< Core event mask */
+} OtherClients;
+
+/**
+ * This struct stores the XI event mask for each client.
+ *
+ * Each window that has events selected has at least one of these masks. If
+ * multiple client selected for events on the same window, these masks are in
+ * a linked list.
+ */
+typedef struct _InputClients {
+ InputClientsPtr next; /**< Pointer to the next mask */
+ XID resource; /**< id for putting into resource manager */
+ Mask mask[EMASKSIZE]; /**< Actual XI event mask, deviceid is index */
+ /** XI2 event masks. One per device, each bit is a mask of (1 << type) */
+ unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE];
+} InputClients;
+
+/**
+ * Combined XI event masks from all devices.
+ *
+ * This is the XI equivalent of the deliverableEvents, eventMask and
+ * dontPropagate mask of the WindowRec (or WindowOptRec).
+ *
+ * A window that has an XI client selecting for events has exactly one
+ * OtherInputMasks struct and exactly one InputClients struct hanging off
+ * inputClients. Each further client appends to the inputClients list.
+ * Each Mask field is per-device, with the device id as the index.
+ * Exception: for non-device events (Presence events), the MAXDEVICES
+ * deviceid is used.
+ */
+typedef struct _OtherInputMasks {
+ /**
+ * Bitwise OR of all masks by all clients and the window's parent's masks.
+ */
+ Mask deliverableEvents[EMASKSIZE];
+ /**
+ * Bitwise OR of all masks by all clients on this window.
+ */
+ Mask inputEvents[EMASKSIZE];
+ /** The do-not-propagate masks for each device. */
+ Mask dontPropagateMask[EMASKSIZE];
+ /** The clients that selected for events */
+ InputClientsPtr inputClients;
+ /* XI2 event masks. One per device, each bit is a mask of (1 << type) */
+ unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE];
+} OtherInputMasks;
+
+/*
+ * The following structure gets used for both active and passive grabs. For
+ * active grabs some of the fields (e.g. modifiers) are not used. However,
+ * that is not much waste since there aren't many active grabs (one per
+ * keyboard/pointer device) going at once in the server.
+ */
+
+#define MasksPerDetailMask 8 /* 256 keycodes and 256 possible
+ modifier combinations, but only
+ 3 buttons. */
+
+typedef struct _DetailRec { /* Grab details may be bit masks */
+ unsigned int exact;
+ Mask *pMask;
+} DetailRec;
+
+typedef enum {
+ GRABTYPE_CORE,
+ GRABTYPE_XI,
+ GRABTYPE_XI2
+} GrabType;
+
+union _GrabMask {
+ Mask core;
+ Mask xi;
+ char xi2mask[EMASKSIZE][XI2MASKSIZE];
+};
+
+/**
+ * Central struct for device grabs.
+ * The same struct is used for both core grabs and device grabs, with
+ * different fields being set.
+ * If the grab is a core grab (GrabPointer/GrabKeyboard), then the eventMask
+ * is a combination of standard event masks (i.e. PointerMotionMask |
+ * ButtonPressMask).
+ * If the grab is a device grab (GrabDevice), then the eventMask is a
+ * combination of event masks for a given XI event type (see SetEventInfo).
+ *
+ * If the grab is a result of a ButtonPress, then eventMask is the core mask
+ * and deviceMask is set to the XI event mask for the grab.
+ */
+typedef struct _GrabRec {
+ GrabPtr next; /* for chain of passive grabs */
+ XID resource;
+ DeviceIntPtr device;
+ WindowPtr window;
+ unsigned ownerEvents:1;
+ unsigned keyboardMode:1;
+ unsigned pointerMode:1;
+ GrabType grabtype;
+ CARD8 type; /* event type */
+ DetailRec modifiersDetail;
+ DeviceIntPtr modifierDevice;
+ DetailRec detail; /* key or button */
+ WindowPtr confineTo; /* always NULL for keyboards */
+ CursorPtr cursor; /* always NULL for keyboards */
+ Mask eventMask;
+ Mask deviceMask;
+ /* XI2 event masks. One per device, each bit is a mask of (1 << type) */
+ unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE];
+} GrabRec;
+
+/**
+ * Sprite information for a device.
+ */
+typedef struct _SpriteRec {
+ CursorPtr current;
+ BoxRec hotLimits; /* logical constraints of hot spot */
+ Bool confined; /* confined to screen */
+ RegionPtr hotShape; /* additional logical shape constraint */
+ BoxRec physLimits; /* physical constraints of hot spot */
+ WindowPtr win; /* window of logical position */
+ HotSpot hot; /* logical pointer position */
+ HotSpot hotPhys; /* physical pointer position */
+#ifdef PANORAMIX
+ ScreenPtr screen; /* all others are in Screen 0 coordinates */
+ RegionRec Reg1; /* Region 1 for confining motion */
+ RegionRec Reg2; /* Region 2 for confining virtual motion */
+ WindowPtr windows[MAXSCREENS];
+ WindowPtr confineWin; /* confine window */
+#endif
+ /* The window trace information is used at dix/events.c to avoid having
+ * to compute all the windows between the root and the current pointer
+ * window each time a button or key goes down. The grabs on each of those
+ * windows must be checked.
+ * spriteTraces should only be used at dix/events.c! */
+ WindowPtr *spriteTrace;
+ int spriteTraceSize;
+ int spriteTraceGood;
+
+ /* Due to delays between event generation and event processing, it is
+ * possible that the pointer has crossed screen boundaries between the
+ * time in which it begins generating events and the time when
+ * those events are processed.
+ *
+ * pEnqueueScreen: screen the pointer was on when the event was generated
+ * pDequeueScreen: screen the pointer was on when the event is processed
+ */
+ ScreenPtr pEnqueueScreen;
+ ScreenPtr pDequeueScreen;
+
+} SpriteRec;
+
+typedef struct _KeyClassRec {
+ int sourceid;
+ CARD8 down[DOWN_LENGTH];
+ CARD8 postdown[DOWN_LENGTH];
+ int modifierKeyCount[8];
+ struct _XkbSrvInfo *xkbInfo;
+} KeyClassRec, *KeyClassPtr;
+
+typedef struct _AxisInfo {
+ int resolution;
+ int min_resolution;
+ int max_resolution;
+ int min_value;
+ int max_value;
+ Atom label;
+ CARD8 mode;
+} AxisInfo, *AxisInfoPtr;
+
+typedef struct _ValuatorAccelerationRec {
+ int number;
+ PointerAccelSchemeProc AccelSchemeProc;
+ void *accelData; /* at disposal of AccelScheme */
+ PointerAccelSchemeInitProc AccelInitProc;
+ DeviceCallbackProc AccelCleanupProc;
+} ValuatorAccelerationRec, *ValuatorAccelerationPtr;
+
+typedef struct _ValuatorClassRec {
+ int sourceid;
+ int numMotionEvents;
+ int first_motion;
+ int last_motion;
+ void *motion; /* motion history buffer. Different layout
+ for MDs and SDs!*/
+ WindowPtr motionHintWindow;
+
+ AxisInfoPtr axes;
+ unsigned short numAxes;
+ double *axisVal; /* always absolute, but device-coord system */
+ ValuatorAccelerationRec accelScheme;
+} ValuatorClassRec, *ValuatorClassPtr;
+
+typedef struct _ButtonClassRec {
+ int sourceid;
+ CARD8 numButtons;
+ CARD8 buttonsDown; /* number of buttons currently down
+ This counts logical buttons, not
+ physical ones, i.e if some buttons
+ are mapped to 0, they're not counted
+ here */
+ unsigned short state;
+ Mask motionMask;
+ CARD8 down[DOWN_LENGTH];
+ CARD8 postdown[DOWN_LENGTH];
+ CARD8 map[MAP_LENGTH];
+ union _XkbAction *xkb_acts;
+ Atom labels[MAX_BUTTONS];
+} ButtonClassRec, *ButtonClassPtr;
+
+typedef struct _FocusClassRec {
+ int sourceid;
+ WindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */
+ int revert;
+ TimeStamp time;
+ WindowPtr *trace;
+ int traceSize;
+ int traceGood;
+} FocusClassRec, *FocusClassPtr;
+
+typedef struct _ProximityClassRec {
+ int sourceid;
+ char in_proximity;
+} ProximityClassRec, *ProximityClassPtr;
+
+typedef struct _AbsoluteClassRec {
+ int sourceid;
+ /* Calibration. */
+ int min_x;
+ int max_x;
+ int min_y;
+ int max_y;
+ int flip_x;
+ int flip_y;
+ int rotation;
+ int button_threshold;
+
+ /* Area. */
+ int offset_x;
+ int offset_y;
+ int width;
+ int height;
+ int screen;
+ XID following;
+} AbsoluteClassRec, *AbsoluteClassPtr;
+
+typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr;
+typedef struct _PtrFeedbackClassRec *PtrFeedbackPtr;
+typedef struct _IntegerFeedbackClassRec *IntegerFeedbackPtr;
+typedef struct _StringFeedbackClassRec *StringFeedbackPtr;
+typedef struct _BellFeedbackClassRec *BellFeedbackPtr;
+typedef struct _LedFeedbackClassRec *LedFeedbackPtr;
+
+typedef struct _KbdFeedbackClassRec {
+ BellProcPtr BellProc;
+ KbdCtrlProcPtr CtrlProc;
+ KeybdCtrl ctrl;
+ KbdFeedbackPtr next;
+ struct _XkbSrvLedInfo *xkb_sli;
+} KbdFeedbackClassRec;
+
+typedef struct _PtrFeedbackClassRec {
+ PtrCtrlProcPtr CtrlProc;
+ PtrCtrl ctrl;
+ PtrFeedbackPtr next;
+} PtrFeedbackClassRec;
+
+typedef struct _IntegerFeedbackClassRec {
+ IntegerCtrlProcPtr CtrlProc;
+ IntegerCtrl ctrl;
+ IntegerFeedbackPtr next;
+} IntegerFeedbackClassRec;
+
+typedef struct _StringFeedbackClassRec {
+ StringCtrlProcPtr CtrlProc;
+ StringCtrl ctrl;
+ StringFeedbackPtr next;
+} StringFeedbackClassRec;
+
+typedef struct _BellFeedbackClassRec {
+ BellProcPtr BellProc;
+ BellCtrlProcPtr CtrlProc;
+ BellCtrl ctrl;
+ BellFeedbackPtr next;
+} BellFeedbackClassRec;
+
+typedef struct _LedFeedbackClassRec {
+ LedCtrlProcPtr CtrlProc;
+ LedCtrl ctrl;
+ LedFeedbackPtr next;
+ struct _XkbSrvLedInfo *xkb_sli;
+} LedFeedbackClassRec;
+
+
+typedef struct _ClassesRec {
+ KeyClassPtr key;
+ ValuatorClassPtr valuator;
+ ButtonClassPtr button;
+ FocusClassPtr focus;
+ ProximityClassPtr proximity;
+ AbsoluteClassPtr absolute;
+ KbdFeedbackPtr kbdfeed;
+ PtrFeedbackPtr ptrfeed;
+ IntegerFeedbackPtr intfeed;
+ StringFeedbackPtr stringfeed;
+ BellFeedbackPtr bell;
+ LedFeedbackPtr leds;
+} ClassesRec;
+
+
+/* Device properties */
+typedef struct _XIPropertyValue
+{
+ Atom type; /* ignored by server */
+ short format; /* format of data for swapping - 8,16,32 */
+ long size; /* size of data in (format/8) bytes */
+ pointer data; /* private to client */
+} XIPropertyValueRec;
+
+typedef struct _XIProperty
+{
+ struct _XIProperty *next;
+ Atom propertyName;
+ BOOL deletable; /* clients can delete this prop? */
+ XIPropertyValueRec value;
+} XIPropertyRec;
+
+typedef XIPropertyRec *XIPropertyPtr;
+typedef XIPropertyValueRec *XIPropertyValuePtr;
+
+
+typedef struct _XIPropertyHandler
+{
+ struct _XIPropertyHandler* next;
+ long id;
+ int (*SetProperty) (DeviceIntPtr dev,
+ Atom property,
+ XIPropertyValuePtr prop,
+ BOOL checkonly);
+ int (*GetProperty) (DeviceIntPtr dev,
+ Atom property);
+ int (*DeleteProperty) (DeviceIntPtr dev,
+ Atom property);
+} XIPropertyHandler, *XIPropertyHandlerPtr;
+
+/* states for devices */
+
+#define NOT_GRABBED 0
+#define THAWED 1
+#define THAWED_BOTH 2 /* not a real state */
+#define FREEZE_NEXT_EVENT 3
+#define FREEZE_BOTH_NEXT_EVENT 4
+#define FROZEN 5 /* any state >= has device frozen */
+#define FROZEN_NO_EVENT 5
+#define FROZEN_WITH_EVENT 6
+#define THAW_OTHERS 7
+
+
+typedef struct _GrabInfoRec {
+ TimeStamp grabTime;
+ Bool fromPassiveGrab; /* true if from passive grab */
+ Bool implicitGrab; /* implicit from ButtonPress */
+ GrabRec activeGrab;
+ GrabPtr grab;
+ CARD8 activatingKey;
+ void (*ActivateGrab) (
+ DeviceIntPtr /*device*/,
+ GrabPtr /*grab*/,
+ TimeStamp /*time*/,
+ Bool /*autoGrab*/);
+ void (*DeactivateGrab)(
+ DeviceIntPtr /*device*/);
+ struct {
+ Bool frozen;
+ int state;
+ GrabPtr other; /* if other grab has this frozen */
+ DeviceEvent *event; /* saved to be replayed */
+ } sync;
+} GrabInfoRec, *GrabInfoPtr;
+
+typedef struct _SpriteInfoRec {
+ /* sprite must always point to a valid sprite. For devices sharing the
+ * sprite, let sprite point to a paired spriteOwner's sprite. */
+ SpritePtr sprite; /* sprite information */
+ Bool spriteOwner; /* True if device owns the sprite */
+ DeviceIntPtr paired; /* The paired device. Keyboard if
+ spriteOwner is TRUE, otherwise the
+ pointer that owns the sprite. */
+
+ /* keep states for animated cursor */
+ struct {
+ CursorPtr pCursor;
+ ScreenPtr pScreen;
+ int elt;
+ CARD32 time;
+ } anim;
+} SpriteInfoRec, *SpriteInfoPtr;
+
+/* device types */
+#define MASTER_POINTER 1
+#define MASTER_KEYBOARD 2
+#define SLAVE 3
+#define MASTER_ATTACHED 4 /* special type for GetMaster */
+
+typedef struct _DeviceIntRec {
+ DeviceRec public;
+ DeviceIntPtr next;
+ Bool startup; /* true if needs to be turned on at
+ server intialization time */
+ DeviceProc deviceProc; /* proc(DevicePtr, DEVICE_xx). It is
+ used to initialize, turn on, or
+ turn off the device */
+ Bool inited; /* TRUE if INIT returns Success */
+ Bool enabled; /* TRUE if ON returns Success */
+ Bool coreEvents; /* TRUE if device also sends core */
+ GrabInfoRec deviceGrab; /* grab on the device */
+ int type; /* MASTER_POINTER, MASTER_KEYBOARD, SLAVE */
+ Atom xinput_type;
+ char *name;
+ int id;
+ KeyClassPtr key;
+ ValuatorClassPtr valuator;
+ ButtonClassPtr button;
+ FocusClassPtr focus;
+ ProximityClassPtr proximity;
+ AbsoluteClassPtr absolute;
+ KbdFeedbackPtr kbdfeed;
+ PtrFeedbackPtr ptrfeed;
+ IntegerFeedbackPtr intfeed;
+ StringFeedbackPtr stringfeed;
+ BellFeedbackPtr bell;
+ LedFeedbackPtr leds;
+ struct _XkbInterest *xkb_interest;
+ char *config_info; /* used by the hotplug layer */
+ ClassesPtr unused_classes; /* for master devices */
+ int saved_master_id; /* for slaves while grabbed */
+ PrivateRec *devPrivates;
+ DeviceUnwrapProc unwrapProc;
+ SpriteInfoPtr spriteInfo;
+ DeviceIntPtr master; /* master device */
+ DeviceIntPtr lastSlave; /* last slave device used */
+
+ /* last valuator values recorded, not posted to client;
+ * for slave devices, valuators is in device coordinates
+ * for master devices, valuators is in screen coordinates
+ * see dix/getevents.c
+ * remainder supports acceleration
+ */
+ struct {
+ int valuators[MAX_VALUATORS];
+ float remainder[MAX_VALUATORS];
+ int numValuators;
+ DeviceIntPtr slave;
+ } last;
+
+ /* Input device property handling. */
+ struct {
+ XIPropertyPtr properties;
+ XIPropertyHandlerPtr handlers; /* NULL-terminated */
+ } properties;
+
+ /* coordinate transformation matrix for absolute input devices */
+ struct pixman_f_transform transform;
+
+ /* XTest related master device id */
+ int xtest_master_id;
+} DeviceIntRec;
+
+typedef struct {
+ int numDevices; /* total number of devices */
+ DeviceIntPtr devices; /* all devices turned on */
+ DeviceIntPtr off_devices; /* all devices turned off */
+ DeviceIntPtr keyboard; /* the main one for the server */
+ DeviceIntPtr pointer;
+ DeviceIntPtr all_devices;
+ DeviceIntPtr all_master_devices;
+} InputInfo;
+
+extern _X_EXPORT InputInfo inputInfo;
+
+/* for keeping the events for devices grabbed synchronously */
+typedef struct _QdEvent *QdEventPtr;
+typedef struct _QdEvent {
+ QdEventPtr next;
+ DeviceIntPtr device;
+ ScreenPtr pScreen; /* what screen the pointer was on */
+ unsigned long months; /* milliseconds is in the event */
+ InternalEvent *event;
+} QdEventRec;
+
+/**
+ * syncEvents is the global structure for queued events.
+ *
+ * Devices can be frozen through GrabModeSync pointer grabs. If this is the
+ * case, events from these devices are added to "pending" instead of being
+ * processed normally. When the device is unfrozen, events in "pending" are
+ * replayed and processed as if they would come from the device directly.
+ */
+typedef struct _EventSyncInfo {
+ QdEventPtr pending, /**< list of queued events */
+ *pendtail; /**< last event in list */
+ /** The device to replay events for. Only set in AllowEvents(), in which
+ * case it is set to the device specified in the request. */
+ DeviceIntPtr replayDev; /* kludgy rock to put flag for */
+
+ /**
+ * The window the events are supposed to be replayed on.
+ * This window may be set to the grab's window (but only when
+ * Replay{Pointer|Keyboard} is given in the XAllowEvents()
+ * request. */
+ WindowPtr replayWin; /* ComputeFreezes */
+ /**
+ * Flag to indicate whether we're in the process of
+ * replaying events. Only set in ComputeFreezes(). */
+ Bool playingEvents;
+ TimeStamp time;
+} EventSyncInfoRec, *EventSyncInfoPtr;
+
+extern EventSyncInfoRec syncEvents;
+
+#endif /* INPUTSTRUCT_H */
diff --git a/xorg-server/include/list.h b/xorg-server/include/list.h
index 5933b973d..2acf149cc 100644
--- a/xorg-server/include/list.h
+++ b/xorg-server/include/list.h
@@ -1,281 +1,281 @@
-/*
- * Copyright © 2010 Intel Corporation
- * Copyright © 2010 Francisco Jerez <currojerez@riseup.net>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- *
- */
-
-#ifndef _LIST_H_
-#define _LIST_H_
-
-/**
- * @file Classic doubly-link circular list implementation.
- *
- * Example:
- * We need to keep a list of struct foo in the parent struct bar, i.e. what
- * we want is something like this.
- *
- * struct bar {
- * ...
- * struct foo *foos; -----> struct foo {}, struct foo {}, struct foo{}
- * ...
- * }
- *
- * We need one list head in bar and a list element in all foos (both are of
- * data type 'struct list').
- *
- * struct bar {
- * ...
- * struct list foos;
- * ...
- * }
- *
- * struct foo {
- * ...
- * struct list entry;
- * ...
- * }
- *
- * Now we initialize the list head:
- *
- * struct bar bar;
- * ...
- * list_init(&bar.foos);
- *
- * Then we create the first element and add it to this list:
- *
- * struct foo *foo = malloc(...);
- * ....
- * list_add(&foo->entry, &bar.foos);
- *
- * Repeat the above for each element you want to add to the list. Deleting
- * works with the element itself.
- * list_del(&foo->entry);
- * free(foo);
- *
- * Note: calling list_del(&bar.foos) will set bar.foos to an empty
- * list again.
- *
- * Looping through the list requires a 'struct foo' as iterator and the
- * name of the field the subnodes use.
- *
- * struct foo *iterator;
- * list_for_each_entry(iterator, &bar.foos, entry) {
- * if (iterator->something == ...)
- * ...
- * }
- *
- * Note: You must not call list_del() on the iterator if you continue the
- * loop. You need to run the safe for-each loop instead:
- *
- * struct foo *iterator, *next;
- * list_for_each_entry_safe(iterator, next, &bar.foos, entry) {
- * if (...)
- * list_del(&iterator->entry);
- * }
- *
- */
-
-/**
- * The linkage struct for list nodes. This struct must be part of your
- * to-be-linked struct.
- *
- * Example:
- * struct foo {
- * int a;
- * void *b;
- * struct list *mylist;
- * }
- *
- * Position and name of the struct list field is irrelevant.
- * There are no requirements that elements of a list are of the same type.
- * There are no requirements for a list head, any struct list can be a list
- * head.
- */
-struct list {
- struct list *next, *prev;
-};
-
-/**
- * Initialize the list as an empty list.
- *
- * Example:
- * list_init(&foo->mylist);
- *
- * @param The list to initialized.
- */
-static void
-list_init(struct list *list)
-{
- list->next = list->prev = list;
-}
-
-static inline void
-__list_add(struct list *entry,
- struct list *prev,
- struct list *next)
-{
- next->prev = entry;
- entry->next = next;
- entry->prev = prev;
- prev->next = entry;
-}
-
-/**
- * Insert a new element after the given list head.
- * The list changes from:
- * head → some element → ...
- * to
- * head → new element → older element → ...
- *
- * Example:
- * struct foo *newfoo = malloc(...);
- * list_add(&newfoo->mylist, &foo->mylist);
- *
- * @param entry The new element to prepend to the list.
- * @param head The existing list.
- */
-static inline void
-list_add(struct list *entry, struct list *head)
-{
- __list_add(entry, head, head->next);
-}
-
-static inline void
-__list_del(struct list *prev, struct list *next)
-{
- next->prev = prev;
- prev->next = next;
-}
-
-/**
- * Remove the element from the list it is in. Using this function will reset
- * the pointers to/from this element so it is removed from the list. It does
- * NOT free the element itself or manipulate it otherwise.
- *
- * Using list_del on a pure list head (like in the example at the top of
- * this file) will NOT remove the first element from
- * the list but rather reset the list as empty list.
- *
- * Example:
- * list_del(&newfoo->mylist);
- *
- * @param entry The element to remove.
- */
-static inline void
-list_del(struct list *entry)
-{
- __list_del(entry->prev, entry->next);
- list_init(entry);
-}
-
-/**
- * Check if the list is empty.
- *
- * Example:
- * list_is_empty(&foo->mylist);
- *
- * @return True if the list contains one or more elements or False otherwise.
- */
-static inline Bool
-list_is_empty(struct list *head)
-{
- return head->next == head;
-}
-
-/**
- * Returns a pointer to the container of this list element.
- *
- * Example:
- * struct foo* f;
- * f = container_of(&foo->mylist, struct foo, mylist);
- * assert(f == foo);
- *
- * @param ptr Pointer to the struct list.
- * @param type Data type of the list element.
- * @param member Member name of the struct list field in the list element.
- * @return A pointer to the data struct containing the list head.
- */
-#ifndef container_of
-#define container_of(ptr, type, member) \
- (type *)((char *)(ptr) - (char *) &((type *)0)->member)
-#endif
-
-/**
- * Alias of container_of
- */
-#define list_entry(ptr, type, member) \
- container_of(ptr, type, member)
-
-/**
- * Retrieve the first list entry for the given list pointer.
- *
- * Example:
- * struct foo *first;
- * first = list_first_entry(&foo->mylist, struct foo, mylist);
- *
- * @param ptr The list head
- * @param type Data type of the list element to retrieve
- * @param member Member name of the struct list field in the list element.
- * @return A pointer to the first list element.
- */
-#define list_first_entry(ptr, type, member) \
- list_entry((ptr)->next, type, member)
-
-#define __container_of(ptr, sample, member) \
- (void *)((char *)(ptr) \
- - ((char *)&(sample)->member - (char *)(sample)))
-/**
- * Loop through the list given by head and set pos to struct in the list.
- *
- * Example:
- * struct foo *iterator;
- * list_for_each_entry(iterator, &foo->mylist, mylist) {
- * [modify iterator]
- * }
- *
- * This macro is not safe for node deletion. Use list_for_each_entry_safe
- * instead.
- *
- * @param pos Iterator variable of the type of the list elements.
- * @param head List head
- * @param member Member name of the struct list in the list elements.
- *
- */
-#define list_for_each_entry(pos, head, member) \
- for (pos = __container_of((head)->next, pos, member); \
- &pos->member != (head); \
- pos = __container_of(pos->member.next, pos, member))
-
-/**
- * Loop through the list, keeping a backup pointer to the element. This
- * macro allows for the deletion of a list element while looping through the
- * list.
- *
- * See list_for_each_entry for more details.
- */
-#define list_for_each_entry_safe(pos, tmp, head, member) \
- for (pos = __container_of((head)->next, pos, member), \
- tmp = __container_of(pos->member.next, pos, member); \
- &pos->member != (head); \
- pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
-
-#endif
+/*
+ * Copyright © 2010 Intel Corporation
+ * Copyright © 2010 Francisco Jerez <currojerez@riseup.net>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#ifndef _LIST_H_
+#define _LIST_H_
+
+/**
+ * @file Classic doubly-link circular list implementation.
+ *
+ * Example:
+ * We need to keep a list of struct foo in the parent struct bar, i.e. what
+ * we want is something like this.
+ *
+ * struct bar {
+ * ...
+ * struct foo *foos; -----> struct foo {}, struct foo {}, struct foo{}
+ * ...
+ * }
+ *
+ * We need one list head in bar and a list element in all foos (both are of
+ * data type 'struct list').
+ *
+ * struct bar {
+ * ...
+ * struct list foos;
+ * ...
+ * }
+ *
+ * struct foo {
+ * ...
+ * struct list entry;
+ * ...
+ * }
+ *
+ * Now we initialize the list head:
+ *
+ * struct bar bar;
+ * ...
+ * list_init(&bar.foos);
+ *
+ * Then we create the first element and add it to this list:
+ *
+ * struct foo *foo = malloc(...);
+ * ....
+ * list_add(&foo->entry, &bar.foos);
+ *
+ * Repeat the above for each element you want to add to the list. Deleting
+ * works with the element itself.
+ * list_del(&foo->entry);
+ * free(foo);
+ *
+ * Note: calling list_del(&bar.foos) will set bar.foos to an empty
+ * list again.
+ *
+ * Looping through the list requires a 'struct foo' as iterator and the
+ * name of the field the subnodes use.
+ *
+ * struct foo *iterator;
+ * list_for_each_entry(iterator, &bar.foos, entry) {
+ * if (iterator->something == ...)
+ * ...
+ * }
+ *
+ * Note: You must not call list_del() on the iterator if you continue the
+ * loop. You need to run the safe for-each loop instead:
+ *
+ * struct foo *iterator, *next;
+ * list_for_each_entry_safe(iterator, next, &bar.foos, entry) {
+ * if (...)
+ * list_del(&iterator->entry);
+ * }
+ *
+ */
+
+/**
+ * The linkage struct for list nodes. This struct must be part of your
+ * to-be-linked struct.
+ *
+ * Example:
+ * struct foo {
+ * int a;
+ * void *b;
+ * struct list *mylist;
+ * }
+ *
+ * Position and name of the struct list field is irrelevant.
+ * There are no requirements that elements of a list are of the same type.
+ * There are no requirements for a list head, any struct list can be a list
+ * head.
+ */
+struct list {
+ struct list *next, *prev;
+};
+
+/**
+ * Initialize the list as an empty list.
+ *
+ * Example:
+ * list_init(&foo->mylist);
+ *
+ * @param The list to initialized.
+ */
+static void
+list_init(struct list *list)
+{
+ list->next = list->prev = list;
+}
+
+static inline void
+__list_add(struct list *entry,
+ struct list *prev,
+ struct list *next)
+{
+ next->prev = entry;
+ entry->next = next;
+ entry->prev = prev;
+ prev->next = entry;
+}
+
+/**
+ * Insert a new element after the given list head.
+ * The list changes from:
+ * head → some element → ...
+ * to
+ * head → new element → older element → ...
+ *
+ * Example:
+ * struct foo *newfoo = malloc(...);
+ * list_add(&newfoo->mylist, &foo->mylist);
+ *
+ * @param entry The new element to prepend to the list.
+ * @param head The existing list.
+ */
+static inline void
+list_add(struct list *entry, struct list *head)
+{
+ __list_add(entry, head, head->next);
+}
+
+static inline void
+__list_del(struct list *prev, struct list *next)
+{
+ next->prev = prev;
+ prev->next = next;
+}
+
+/**
+ * Remove the element from the list it is in. Using this function will reset
+ * the pointers to/from this element so it is removed from the list. It does
+ * NOT free the element itself or manipulate it otherwise.
+ *
+ * Using list_del on a pure list head (like in the example at the top of
+ * this file) will NOT remove the first element from
+ * the list but rather reset the list as empty list.
+ *
+ * Example:
+ * list_del(&newfoo->mylist);
+ *
+ * @param entry The element to remove.
+ */
+static inline void
+list_del(struct list *entry)
+{
+ __list_del(entry->prev, entry->next);
+ list_init(entry);
+}
+
+/**
+ * Check if the list is empty.
+ *
+ * Example:
+ * list_is_empty(&foo->mylist);
+ *
+ * @return True if the list contains one or more elements or False otherwise.
+ */
+static inline Bool
+list_is_empty(struct list *head)
+{
+ return head->next == head;
+}
+
+/**
+ * Returns a pointer to the container of this list element.
+ *
+ * Example:
+ * struct foo* f;
+ * f = container_of(&foo->mylist, struct foo, mylist);
+ * assert(f == foo);
+ *
+ * @param ptr Pointer to the struct list.
+ * @param type Data type of the list element.
+ * @param member Member name of the struct list field in the list element.
+ * @return A pointer to the data struct containing the list head.
+ */
+#ifndef container_of
+#define container_of(ptr, type, member) \
+ (type *)((char *)(ptr) - (char *) &((type *)0)->member)
+#endif
+
+/**
+ * Alias of container_of
+ */
+#define list_entry(ptr, type, member) \
+ container_of(ptr, type, member)
+
+/**
+ * Retrieve the first list entry for the given list pointer.
+ *
+ * Example:
+ * struct foo *first;
+ * first = list_first_entry(&foo->mylist, struct foo, mylist);
+ *
+ * @param ptr The list head
+ * @param type Data type of the list element to retrieve
+ * @param member Member name of the struct list field in the list element.
+ * @return A pointer to the first list element.
+ */
+#define list_first_entry(ptr, type, member) \
+ list_entry((ptr)->next, type, member)
+
+#define __container_of(ptr, sample, member) \
+ (void *)((char *)(ptr) \
+ - ((char *)&(sample)->member - (char *)(sample)))
+/**
+ * Loop through the list given by head and set pos to struct in the list.
+ *
+ * Example:
+ * struct foo *iterator;
+ * list_for_each_entry(iterator, &foo->mylist, mylist) {
+ * [modify iterator]
+ * }
+ *
+ * This macro is not safe for node deletion. Use list_for_each_entry_safe
+ * instead.
+ *
+ * @param pos Iterator variable of the type of the list elements.
+ * @param head List head
+ * @param member Member name of the struct list in the list elements.
+ *
+ */
+#define list_for_each_entry(pos, head, member) \
+ for (pos = __container_of((head)->next, pos, member); \
+ &pos->member != (head); \
+ pos = __container_of(pos->member.next, pos, member))
+
+/**
+ * Loop through the list, keeping a backup pointer to the element. This
+ * macro allows for the deletion of a list element while looping through the
+ * list.
+ *
+ * See list_for_each_entry for more details.
+ */
+#define list_for_each_entry_safe(pos, tmp, head, member) \
+ for (pos = __container_of((head)->next, pos, member), \
+ tmp = __container_of(pos->member.next, pos, member); \
+ &pos->member != (head); \
+ pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
+
+#endif
diff --git a/xorg-server/include/misc.h b/xorg-server/include/misc.h
index 42f225b17..02790d38e 100644
--- a/xorg-server/include/misc.h
+++ b/xorg-server/include/misc.h
@@ -80,6 +80,11 @@ OF THIS SOFTWARE.
#include <stddef.h>
#include <stdint.h>
+#include <unistd.h>
+
+#ifdef _MSC_VER
+#define inline __inline
+#endif
#ifndef MAXSCREENS
#define MAXSCREENS 16
@@ -165,9 +170,9 @@ typedef struct _xReq *xReqPtr;
#include <math.h>
#undef MAXSHORT
-#define MAXSHORT SHRT_MAX
+#define MAXSHORT 32767
#undef MINSHORT
-#define MINSHORT SHRT_MIN
+#define MINSHORT -32768
#undef MAXINT
#define MAXINT INT_MAX
#undef MININT
@@ -195,7 +200,7 @@ typedef struct _xReq *xReqPtr;
* @param bits The minimum number of bits needed.
* @return The number of bytes needed to hold bits.
*/
-static inline int
+static __inline int
bits_to_bytes(const int bits) {
return ((bits + 7) >> 3);
}
@@ -205,7 +210,7 @@ bits_to_bytes(const int bits) {
* @param bytes The minimum number of bytes needed.
* @return The number of 4-byte units needed to hold bytes.
*/
-static inline int
+static __inline int
bytes_to_int32(const int bytes) {
return (((bytes) + 3) >> 2);
}
@@ -215,7 +220,7 @@ bytes_to_int32(const int bytes) {
* @param bytes The minimum number of bytes needed.
* @return The closest multiple of 4 that is equal or higher than bytes.
*/
-static inline int
+static __inline int
pad_to_int32(const int bytes) {
return (((bytes) + 3) & ~3);
}
diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h
index 87e786e1f..a11cacc44 100644
--- a/xorg-server/include/os.h
+++ b/xorg-server/include/os.h
@@ -115,6 +115,8 @@ extern _X_EXPORT int WriteToClient(ClientPtr /*who*/, int /*count*/, const void*
extern _X_EXPORT void ResetOsBuffers(void);
+extern _X_EXPORT int TransIsListening(char *protocol);
+
extern _X_EXPORT void InitConnectionLimits(void);
extern _X_EXPORT void NotifyParentProcess(void);
@@ -327,7 +329,7 @@ extern _X_EXPORT int AddHost(
ClientPtr /*client*/,
int /*family*/,
unsigned /*length*/,
- const void */*pAddr*/);
+ const void * /*pAddr*/);
extern _X_EXPORT Bool ForEachHostInFamily (
int /*family*/,
@@ -390,7 +392,7 @@ extern _X_EXPORT void DisableLocalHost(void);
extern _X_EXPORT void AccessUsingXdmcp(void);
-extern _X_EXPORT void DefineSelf(int /*fd*/);
+extern _X_EXPORT void DefineSelf(int /*fd*/, const int /*protocol*/);
#if XDMCP
extern _X_EXPORT void AugmentSelf(pointer /*from*/, int /*len*/);
@@ -536,4 +538,8 @@ extern _X_EXPORT void LogPrintMarkers(void);
extern _X_EXPORT void xorg_backtrace(void);
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
#endif /* OS_H */
diff --git a/xorg-server/include/pixmapstr.h b/xorg-server/include/pixmapstr.h
index 542c381bc..47dce91e1 100644
--- a/xorg-server/include/pixmapstr.h
+++ b/xorg-server/include/pixmapstr.h
@@ -1,85 +1,83 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef PIXMAPSTRUCT_H
-#define PIXMAPSTRUCT_H
-#include "pixmap.h"
-#include "screenint.h"
-#include "regionstr.h"
-#include "privates.h"
-
-typedef struct _Drawable {
- unsigned char type; /* DRAWABLE_<type> */
- unsigned char class; /* specific to type */
- unsigned char depth;
- unsigned char bitsPerPixel;
- XID id; /* resource id */
- short x; /* window: screen absolute, pixmap: 0 */
- short y; /* window: screen absolute, pixmap: 0 */
- unsigned short width;
- unsigned short height;
- ScreenPtr pScreen;
- unsigned long serialNumber;
-} DrawableRec;
-
-/*
- * PIXMAP -- device dependent
- */
-
-typedef struct _Pixmap {
- DrawableRec drawable;
- PrivateRec *devPrivates;
- int refcnt;
- int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */
- DevUnion devPrivate; /* When !NULL, devPrivate.ptr points to the raw pixel data. */
-#ifdef COMPOSITE
- short screen_x;
- short screen_y;
-#endif
-} PixmapRec;
-
-#endif /* PIXMAPSTRUCT_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PIXMAPSTRUCT_H
+#define PIXMAPSTRUCT_H
+#include "pixmap.h"
+#include "screenint.h"
+#include "regionstr.h"
+#include "privates.h"
+
+typedef struct _Drawable {
+ unsigned char type; /* DRAWABLE_<type> */
+ unsigned char class; /* specific to type */
+ unsigned char depth;
+ unsigned char bitsPerPixel;
+ XID id; /* resource id */
+ short x; /* window: screen absolute, pixmap: 0 */
+ short y; /* window: screen absolute, pixmap: 0 */
+ unsigned short width;
+ unsigned short height;
+ ScreenPtr pScreen;
+ unsigned long serialNumber;
+} DrawableRec;
+
+/*
+ * PIXMAP -- device dependent
+ */
+
+typedef struct _Pixmap {
+ DrawableRec drawable;
+ PrivateRec *devPrivates;
+ int refcnt;
+ int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */
+ DevUnion devPrivate; /* When !NULL, devPrivate.ptr points to the raw pixel data. */
+ short screen_x;
+ short screen_y;
+} PixmapRec;
+
+#endif /* PIXMAPSTRUCT_H */
diff --git a/xorg-server/include/privates.h b/xorg-server/include/privates.h
index e6c427fab..ec2604cab 100644
--- a/xorg-server/include/privates.h
+++ b/xorg-server/include/privates.h
@@ -195,7 +195,7 @@ dixGetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenP
static inline void
dixSetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen, pointer val)
{
- return dixSetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen), val);
+ dixSetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen), val);
}
static inline pointer
diff --git a/xorg-server/include/protocol-versions.h b/xorg-server/include/protocol-versions.h
index 8692ded8a..55d5fa9b5 100644
--- a/xorg-server/include/protocol-versions.h
+++ b/xorg-server/include/protocol-versions.h
@@ -1,144 +1,144 @@
-/*
- * Copyright © 2009 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-/**
- * This file specifies the server-supported protocol versions.
- */
-#ifndef _PROTOCOL_VERSIONS_
-#define _PROTOCOL_VERSIONS_
-
-/* Apple DRI */
-#define SERVER_APPLEDRI_MAJOR_VERSION 1
-#define SERVER_APPLEDRI_MINOR_VERSION 0
-#define SERVER_APPLEDRI_PATCH_VERSION 0
-
-/* AppleWM */
-#define SERVER_APPLEWM_MAJOR_VERSION 1
-#define SERVER_APPLEWM_MINOR_VERSION 3
-#define SERVER_APPLEWM_PATCH_VERSION 0
-
-/* Composite */
-#define SERVER_COMPOSITE_MAJOR_VERSION 0
-#define SERVER_COMPOSITE_MINOR_VERSION 4
-
-/* Damage */
-#define SERVER_DAMAGE_MAJOR_VERSION 1
-#define SERVER_DAMAGE_MINOR_VERSION 1
-
-/* DMX */
-#define SERVER_DMX_MAJOR_VERSION 2
-#define SERVER_DMX_MINOR_VERSION 2
-#define SERVER_DMX_PATCH_VERSION 20040604
-
-/* Generic event extension */
-#define SERVER_GE_MAJOR_VERSION 1
-#define SERVER_GE_MINOR_VERSION 0
-
-/* GLX */
-#define SERVER_GLX_MAJOR_VERSION 1
-#define SERVER_GLX_MINOR_VERSION 4
-
-/* Xinerama */
-#define SERVER_PANORAMIX_MAJOR_VERSION 1
-#define SERVER_PANORAMIX_MINOR_VERSION 1
-
-/* RandR */
-#define SERVER_RANDR_MAJOR_VERSION 1
-#define SERVER_RANDR_MINOR_VERSION 3
-
-/* Record */
-#define SERVER_RECORD_MAJOR_VERSION 1
-#define SERVER_RECORD_MINOR_VERSION 13
-
-/* Render */
-#define SERVER_RENDER_MAJOR_VERSION 0
-#define SERVER_RENDER_MINOR_VERSION 11
-
-/* RandR Xinerama */
-#define SERVER_RRXINERAMA_MAJOR_VERSION 1
-#define SERVER_RRXINERAMA_MINOR_VERSION 1
-
-/* Screensaver */
-#define SERVER_SAVER_MAJOR_VERSION 1
-#define SERVER_SAVER_MINOR_VERSION 1
-
-/* Security */
-#define SERVER_SECURITY_MAJOR_VERSION 1
-#define SERVER_SECURITY_MINOR_VERSION 0
-
-/* Shape */
-#define SERVER_SHAPE_MAJOR_VERSION 1
-#define SERVER_SHAPE_MINOR_VERSION 1
-
-/* SHM */
-#define SERVER_SHM_MAJOR_VERSION 1
-#define SERVER_SHM_MINOR_VERSION 1
-
-/* Sync */
-#define SERVER_SYNC_MAJOR_VERSION 3
-#define SERVER_SYNC_MINOR_VERSION 1
-
-/* Windows WM */
-#define SERVER_WINDOWSWM_MAJOR_VERSION 1
-#define SERVER_WINDOWSWM_MINOR_VERSION 0
-#define SERVER_WINDOWSWM_PATCH_VERSION 0
-
-/* DGA */
-#define SERVER_XDGA_MAJOR_VERSION 2
-#define SERVER_XDGA_MINOR_VERSION 0
-
-/* Big Font */
-#define SERVER_XF86BIGFONT_MAJOR_VERSION 1
-#define SERVER_XF86BIGFONT_MINOR_VERSION 1
-
-/* DRI */
-#define SERVER_XF86DRI_MAJOR_VERSION 4
-#define SERVER_XF86DRI_MINOR_VERSION 1
-#define SERVER_XF86DRI_PATCH_VERSION 20040604
-
-/* Vidmode */
-#define SERVER_XF86VIDMODE_MAJOR_VERSION 2
-#define SERVER_XF86VIDMODE_MINOR_VERSION 2
-
-/* Fixes */
-#define SERVER_XFIXES_MAJOR_VERSION 4
-#define SERVER_XFIXES_MINOR_VERSION 0
-
-/* X Input */
-#define SERVER_XI_MAJOR_VERSION 2
-#define SERVER_XI_MINOR_VERSION 0
-
-/* XKB */
-#define SERVER_XKB_MAJOR_VERSION 1
-#define SERVER_XKB_MINOR_VERSION 0
-
-/* Resource */
-#define SERVER_XRES_MAJOR_VERSION 1
-#define SERVER_XRES_MINOR_VERSION 0
-
-/* XvMC */
-#define SERVER_XVMC_MAJOR_VERSION 1
-#define SERVER_XVMC_MINOR_VERSION 1
-
-#endif
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/**
+ * This file specifies the server-supported protocol versions.
+ */
+#ifndef _PROTOCOL_VERSIONS_
+#define _PROTOCOL_VERSIONS_
+
+/* Apple DRI */
+#define SERVER_APPLEDRI_MAJOR_VERSION 1
+#define SERVER_APPLEDRI_MINOR_VERSION 0
+#define SERVER_APPLEDRI_PATCH_VERSION 0
+
+/* AppleWM */
+#define SERVER_APPLEWM_MAJOR_VERSION 1
+#define SERVER_APPLEWM_MINOR_VERSION 3
+#define SERVER_APPLEWM_PATCH_VERSION 0
+
+/* Composite */
+#define SERVER_COMPOSITE_MAJOR_VERSION 0
+#define SERVER_COMPOSITE_MINOR_VERSION 4
+
+/* Damage */
+#define SERVER_DAMAGE_MAJOR_VERSION 1
+#define SERVER_DAMAGE_MINOR_VERSION 1
+
+/* DMX */
+#define SERVER_DMX_MAJOR_VERSION 2
+#define SERVER_DMX_MINOR_VERSION 2
+#define SERVER_DMX_PATCH_VERSION 20040604
+
+/* Generic event extension */
+#define SERVER_GE_MAJOR_VERSION 1
+#define SERVER_GE_MINOR_VERSION 0
+
+/* GLX */
+#define SERVER_GLX_MAJOR_VERSION 1
+#define SERVER_GLX_MINOR_VERSION 4
+
+/* Xinerama */
+#define SERVER_PANORAMIX_MAJOR_VERSION 1
+#define SERVER_PANORAMIX_MINOR_VERSION 1
+
+/* RandR */
+#define SERVER_RANDR_MAJOR_VERSION 1
+#define SERVER_RANDR_MINOR_VERSION 3
+
+/* Record */
+#define SERVER_RECORD_MAJOR_VERSION 1
+#define SERVER_RECORD_MINOR_VERSION 13
+
+/* Render */
+#define SERVER_RENDER_MAJOR_VERSION 0
+#define SERVER_RENDER_MINOR_VERSION 11
+
+/* RandR Xinerama */
+#define SERVER_RRXINERAMA_MAJOR_VERSION 1
+#define SERVER_RRXINERAMA_MINOR_VERSION 1
+
+/* Screensaver */
+#define SERVER_SAVER_MAJOR_VERSION 1
+#define SERVER_SAVER_MINOR_VERSION 1
+
+/* Security */
+#define SERVER_SECURITY_MAJOR_VERSION 1
+#define SERVER_SECURITY_MINOR_VERSION 0
+
+/* Shape */
+#define SERVER_SHAPE_MAJOR_VERSION 1
+#define SERVER_SHAPE_MINOR_VERSION 1
+
+/* SHM */
+#define SERVER_SHM_MAJOR_VERSION 1
+#define SERVER_SHM_MINOR_VERSION 1
+
+/* Sync */
+#define SERVER_SYNC_MAJOR_VERSION 3
+#define SERVER_SYNC_MINOR_VERSION 1
+
+/* Windows WM */
+#define SERVER_WINDOWSWM_MAJOR_VERSION 1
+#define SERVER_WINDOWSWM_MINOR_VERSION 0
+#define SERVER_WINDOWSWM_PATCH_VERSION 0
+
+/* DGA */
+#define SERVER_XDGA_MAJOR_VERSION 2
+#define SERVER_XDGA_MINOR_VERSION 0
+
+/* Big Font */
+#define SERVER_XF86BIGFONT_MAJOR_VERSION 1
+#define SERVER_XF86BIGFONT_MINOR_VERSION 1
+
+/* DRI */
+#define SERVER_XF86DRI_MAJOR_VERSION 4
+#define SERVER_XF86DRI_MINOR_VERSION 1
+#define SERVER_XF86DRI_PATCH_VERSION 20040604
+
+/* Vidmode */
+#define SERVER_XF86VIDMODE_MAJOR_VERSION 2
+#define SERVER_XF86VIDMODE_MINOR_VERSION 2
+
+/* Fixes */
+#define SERVER_XFIXES_MAJOR_VERSION 4
+#define SERVER_XFIXES_MINOR_VERSION 0
+
+/* X Input */
+#define SERVER_XI_MAJOR_VERSION 2
+#define SERVER_XI_MINOR_VERSION 0
+
+/* XKB */
+#define SERVER_XKB_MAJOR_VERSION 1
+#define SERVER_XKB_MINOR_VERSION 0
+
+/* Resource */
+#define SERVER_XRES_MAJOR_VERSION 1
+#define SERVER_XRES_MINOR_VERSION 0
+
+/* XvMC */
+#define SERVER_XVMC_MAJOR_VERSION 1
+#define SERVER_XVMC_MINOR_VERSION 1
+
+#endif
diff --git a/xorg-server/include/regionstr.h b/xorg-server/include/regionstr.h
index 3759fe17b..f34ecf319 100644
--- a/xorg-server/include/regionstr.h
+++ b/xorg-server/include/regionstr.h
@@ -1,360 +1,360 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef REGIONSTRUCT_H
-#define REGIONSTRUCT_H
-
-typedef struct pixman_region16 RegionRec, *RegionPtr;
-
-#include "miscstruct.h"
-
-/* Return values from RectIn() */
-
-#define rgnOUT 0
-#define rgnIN 1
-#define rgnPART 2
-
-#define NullRegion ((RegionPtr)0)
-
-/*
- * clip region
- */
-
-typedef struct pixman_region16_data RegDataRec, *RegDataPtr;
-
-extern _X_EXPORT BoxRec RegionEmptyBox;
-extern _X_EXPORT RegDataRec RegionEmptyData;
-extern _X_EXPORT RegDataRec RegionBrokenData;
-static inline Bool RegionNil(RegionPtr reg) {
- return ((reg)->data && !(reg)->data->numRects);
-}
-
-/* not a region */
-
-static inline Bool RegionNar(RegionPtr reg) {
- return ((reg)->data == &RegionBrokenData);
-}
-
-static inline int RegionNumRects(RegionPtr reg) {
- return ((reg)->data ? (reg)->data->numRects : 1);
-}
-
-static inline int RegionSize(RegionPtr reg) {
- return ((reg)->data ? (reg)->data->size : 0);
-}
-
-static inline BoxPtr RegionRects(RegionPtr reg) {
- return ((reg)->data ? (BoxPtr)((reg)->data + 1) : &(reg)->extents);
-}
-
-static inline BoxPtr RegionBoxptr(RegionPtr reg) {
- return ((BoxPtr)((reg)->data + 1));
-}
-
-static inline BoxPtr RegionBox(RegionPtr reg, int i) {
- return (&RegionBoxptr(reg)[i]);
-}
-
-static inline BoxPtr RegionTop(RegionPtr reg) {
- return RegionBox(reg, (reg)->data->numRects);
-}
-
-static inline BoxPtr RegionEnd(RegionPtr reg) {
- return RegionBox(reg, (reg)->data->numRects - 1);
-}
-
-static inline size_t RegionSizeof(int n) {
- return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
-}
-
-static inline void RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size)
-{
- if ((_rect) != NULL)
- {
- (_pReg)->extents = *(_rect);
- (_pReg)->data = (RegDataPtr)NULL;
- }
- else
- {
- (_pReg)->extents = RegionEmptyBox;
- if (((_size) > 1) && ((_pReg)->data =
- (RegDataPtr)malloc(RegionSizeof(_size))))
- {
- (_pReg)->data->size = (_size);
- (_pReg)->data->numRects = 0;
- }
- else
- (_pReg)->data = &RegionEmptyData;
- }
-}
-
-static inline void RegionUninit(RegionPtr _pReg)
-{
- if ((_pReg)->data && (_pReg)->data->size) {
- free((_pReg)->data);
- (_pReg)->data = NULL;
- }
-}
-
-static inline void RegionReset(RegionPtr _pReg, BoxPtr _pBox)
-{
- (_pReg)->extents = *(_pBox);
- RegionUninit(_pReg);
- (_pReg)->data = (RegDataPtr)NULL;
-}
-
-static inline Bool RegionNotEmpty(RegionPtr _pReg) {
- return !RegionNil(_pReg);
-}
-
-static inline Bool RegionBroken(RegionPtr _pReg) {
- return RegionNar(_pReg);
-}
-
-static inline void RegionEmpty(RegionPtr _pReg)
-{
- RegionUninit(_pReg);
- (_pReg)->extents.x2 = (_pReg)->extents.x1;
- (_pReg)->extents.y2 = (_pReg)->extents.y1;
- (_pReg)->data = &RegionEmptyData;
-}
-
-static inline BoxPtr RegionExtents(RegionPtr _pReg)
-{
- return (&(_pReg)->extents);
-}
-
-static inline void RegionNull(RegionPtr _pReg)
-{
- (_pReg)->extents = RegionEmptyBox;
- (_pReg)->data = &RegionEmptyData;
-}
-
-extern _X_EXPORT void InitRegions(void);
-
-extern _X_EXPORT RegionPtr RegionCreate(
- BoxPtr /*rect*/,
- int /*size*/);
-
-extern _X_EXPORT void RegionDestroy(
- RegionPtr /*pReg*/);
-
-static inline Bool
-RegionCopy(RegionPtr dst, RegionPtr src)
-{
- return pixman_region_copy (dst, src);
-}
-
-static inline Bool
-RegionIntersect(
- RegionPtr newReg, /* destination Region */
- RegionPtr reg1,
- RegionPtr reg2 /* source regions */
- )
-{
- return pixman_region_intersect (newReg, reg1, reg2);
-}
-
-static inline Bool
-RegionUnion(
- RegionPtr newReg, /* destination Region */
- RegionPtr reg1,
- RegionPtr reg2 /* source regions */
- )
-{
- return pixman_region_union (newReg, reg1, reg2);
-}
-
-extern _X_EXPORT Bool RegionAppend(
- RegionPtr /*dstrgn*/,
- RegionPtr /*rgn*/);
-
-extern _X_EXPORT Bool RegionValidate(
- RegionPtr /*badreg*/,
- Bool * /*pOverlap*/);
-
-extern _X_EXPORT RegionPtr RegionFromRects(
- int /*nrects*/,
- xRectanglePtr /*prect*/,
- int /*ctype*/);
-
-/*-
- *-----------------------------------------------------------------------
- * Subtract --
- * Subtract regS from regM and leave the result in regD.
- * S stands for subtrahend, M for minuend and D for difference.
- *
- * Results:
- * TRUE if successful.
- *
- * Side Effects:
- * regD is overwritten.
- *
- *-----------------------------------------------------------------------
- */
-static inline Bool
-RegionSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS)
-{
- return pixman_region_subtract (regD, regM, regS);
-}
-
-/*-
- *-----------------------------------------------------------------------
- * Inverse --
- * Take a region and a box and return a region that is everything
- * in the box but not in the region. The careful reader will note
- * that this is the same as subtracting the region from the box...
- *
- * Results:
- * TRUE.
- *
- * Side Effects:
- * newReg is overwritten.
- *
- *-----------------------------------------------------------------------
- */
-
-static inline Bool
-RegionInverse(
- RegionPtr newReg, /* Destination region */
- RegionPtr reg1, /* Region to invert */
- BoxPtr invRect /* Bounding box for inversion */
- )
-{
- return pixman_region_inverse (newReg, reg1, invRect);
-}
-
-static inline int
-RegionContainsRect(RegionPtr region, BoxPtr prect)
-{
- return pixman_region_contains_rectangle (region, prect);
-}
-
-/* TranslateRegion(pReg, x, y)
- translates in place
-*/
-
-static inline void
-RegionTranslate(RegionPtr pReg, int x, int y)
-{
- pixman_region_translate (pReg, x, y);
-}
-
-extern _X_EXPORT Bool RegionBreak(
- RegionPtr /*pReg*/);
-
-static inline Bool
-RegionContainsPoint(
- RegionPtr pReg,
- int x,
- int y,
- BoxPtr box /* "return" value */
- )
-{
- return pixman_region_contains_point (pReg, x, y, box);
-}
-
-static inline Bool
-RegionEqual(RegionPtr reg1, RegionPtr reg2)
-{
- return pixman_region_equal (reg1, reg2);
-}
-
-extern _X_EXPORT Bool RegionRectAlloc(
- RegionPtr /*pRgn*/,
- int /*n*/
-);
-
-#ifdef DEBUG
-extern _X_EXPORT Bool RegionIsValid(
- RegionPtr /*prgn*/
-);
-#endif
-
-extern _X_EXPORT void RegionPrint(
- RegionPtr /*pReg*/);
-
-#define INCLUDE_LEGACY_REGION_DEFINES
-#ifdef INCLUDE_LEGACY_REGION_DEFINES
-
-#define REGION_NIL RegionNil
-#define REGION_NAR RegionNar
-#define REGION_NUM_RECTS RegionNumRects
-#define REGION_SIZE RegionSize
-#define REGION_RECTS RegionRects
-#define REGION_BOXPTR RegionBoxptr
-#define REGION_BOX RegionBox
-#define REGION_TOP RegionTop
-#define REGION_END RegionEnd
-#define REGION_SZOF RegionSizeof
-#define BITMAP_TO_REGION BitmapToRegion
-#define REGION_CREATE(pScreen, r, s) RegionCreate(r,s)
-#define REGION_COPY(pScreen, d, r) RegionCopy(d, r)
-#define REGION_DESTROY(pScreen, r) RegionDestroy(r)
-#define REGION_INTERSECT(pScreen, res, r1, r2) RegionIntersect(res, r1, r2)
-#define REGION_UNION(pScreen, res, r1, r2) RegionUnion(res, r1, r2)
-#define REGION_SUBTRACT(pScreen, res, r1, r2) RegionSubtract(res, r1, r2)
-#define REGION_INVERSE(pScreen, n, r, b) RegionInverse(n, r, b)
-#define REGION_TRANSLATE(pScreen, r, x, y) RegionTranslate(r, x, y)
-#define RECT_IN_REGION(pScreen, r, b) RegionContainsRect(r, b)
-#define POINT_IN_REGION(pScreen, r, x, y, b) RegionContainsPoint(r, x, y, b)
-#define REGION_EQUAL(pScreen, r1, r2) RegionEqual(r1, r2)
-#define REGION_APPEND(pScreen, d, r) RegionAppend(d, r)
-#define REGION_VALIDATE(pScreen, r, o) RegionValidate(r, o)
-#define RECTS_TO_REGION(pScreen, n, r, c) RegionFromRects(n, r, c)
-#define REGION_BREAK(pScreen, r) RegionBreak(r)
-#define REGION_INIT(pScreen, r, b, s) RegionInit(r, b, s)
-#define REGION_UNINIT(pScreen, r) RegionUninit(r)
-#define REGION_RESET(pScreen, r, b) RegionReset(r, b)
-#define REGION_NOTEMPTY(pScreen, r) RegionNotEmpty(r)
-#define REGION_BROKEN(pScreen, r) RegionBroken(r)
-#define REGION_EMPTY(pScreen, r) RegionEmpty(r)
-#define REGION_EXTENTS(pScreen, r) RegionExtents(r)
-#define REGION_NULL(pScreen, r) RegionNull(r)
-
-#endif /* INCLUDE_LEGACY_REGION_DEFINES */
-#endif /* REGIONSTRUCT_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef REGIONSTRUCT_H
+#define REGIONSTRUCT_H
+
+typedef struct pixman_region16 RegionRec, *RegionPtr;
+
+#include "miscstruct.h"
+
+/* Return values from RectIn() */
+
+#define rgnOUT 0
+#define rgnIN 1
+#define rgnPART 2
+
+#define NullRegion ((RegionPtr)0)
+
+/*
+ * clip region
+ */
+
+typedef struct pixman_region16_data RegDataRec, *RegDataPtr;
+
+extern _X_EXPORT BoxRec RegionEmptyBox;
+extern _X_EXPORT RegDataRec RegionEmptyData;
+extern _X_EXPORT RegDataRec RegionBrokenData;
+static inline Bool RegionNil(RegionPtr reg) {
+ return ((reg)->data && !(reg)->data->numRects);
+}
+
+/* not a region */
+
+static inline Bool RegionNar(RegionPtr reg) {
+ return ((reg)->data == &RegionBrokenData);
+}
+
+static inline int RegionNumRects(RegionPtr reg) {
+ return ((reg)->data ? (reg)->data->numRects : 1);
+}
+
+static inline int RegionSize(RegionPtr reg) {
+ return ((reg)->data ? (reg)->data->size : 0);
+}
+
+static inline BoxPtr RegionRects(RegionPtr reg) {
+ return ((reg)->data ? (BoxPtr)((reg)->data + 1) : &(reg)->extents);
+}
+
+static inline BoxPtr RegionBoxptr(RegionPtr reg) {
+ return ((BoxPtr)((reg)->data + 1));
+}
+
+static inline BoxPtr RegionBox(RegionPtr reg, int i) {
+ return (&RegionBoxptr(reg)[i]);
+}
+
+static inline BoxPtr RegionTop(RegionPtr reg) {
+ return RegionBox(reg, (reg)->data->numRects);
+}
+
+static inline BoxPtr RegionEnd(RegionPtr reg) {
+ return RegionBox(reg, (reg)->data->numRects - 1);
+}
+
+static inline size_t RegionSizeof(int n) {
+ return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
+}
+
+static inline void RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size)
+{
+ if ((_rect) != NULL)
+ {
+ (_pReg)->extents = *(_rect);
+ (_pReg)->data = (RegDataPtr)NULL;
+ }
+ else
+ {
+ (_pReg)->extents = RegionEmptyBox;
+ if (((_size) > 1) && ((_pReg)->data =
+ (RegDataPtr)malloc(RegionSizeof(_size))))
+ {
+ (_pReg)->data->size = (_size);
+ (_pReg)->data->numRects = 0;
+ }
+ else
+ (_pReg)->data = &RegionEmptyData;
+ }
+}
+
+static inline void RegionUninit(RegionPtr _pReg)
+{
+ if ((_pReg)->data && (_pReg)->data->size) {
+ free((_pReg)->data);
+ (_pReg)->data = NULL;
+ }
+}
+
+static inline void RegionReset(RegionPtr _pReg, BoxPtr _pBox)
+{
+ (_pReg)->extents = *(_pBox);
+ RegionUninit(_pReg);
+ (_pReg)->data = (RegDataPtr)NULL;
+}
+
+static inline Bool RegionNotEmpty(RegionPtr _pReg) {
+ return !RegionNil(_pReg);
+}
+
+static inline Bool RegionBroken(RegionPtr _pReg) {
+ return RegionNar(_pReg);
+}
+
+static inline void RegionEmpty(RegionPtr _pReg)
+{
+ RegionUninit(_pReg);
+ (_pReg)->extents.x2 = (_pReg)->extents.x1;
+ (_pReg)->extents.y2 = (_pReg)->extents.y1;
+ (_pReg)->data = &RegionEmptyData;
+}
+
+static inline BoxPtr RegionExtents(RegionPtr _pReg)
+{
+ return (&(_pReg)->extents);
+}
+
+static inline void RegionNull(RegionPtr _pReg)
+{
+ (_pReg)->extents = RegionEmptyBox;
+ (_pReg)->data = &RegionEmptyData;
+}
+
+extern _X_EXPORT void InitRegions(void);
+
+extern _X_EXPORT RegionPtr RegionCreate(
+ BoxPtr /*rect*/,
+ int /*size*/);
+
+extern _X_EXPORT void RegionDestroy(
+ RegionPtr /*pReg*/);
+
+static inline Bool
+RegionCopy(RegionPtr dst, RegionPtr src)
+{
+ return pixman_region_copy (dst, src);
+}
+
+static inline Bool
+RegionIntersect(
+ RegionPtr newReg, /* destination Region */
+ RegionPtr reg1,
+ RegionPtr reg2 /* source regions */
+ )
+{
+ return pixman_region_intersect (newReg, reg1, reg2);
+}
+
+static inline Bool
+RegionUnion(
+ RegionPtr newReg, /* destination Region */
+ RegionPtr reg1,
+ RegionPtr reg2 /* source regions */
+ )
+{
+ return pixman_region_union (newReg, reg1, reg2);
+}
+
+extern _X_EXPORT Bool RegionAppend(
+ RegionPtr /*dstrgn*/,
+ RegionPtr /*rgn*/);
+
+extern _X_EXPORT Bool RegionValidate(
+ RegionPtr /*badreg*/,
+ Bool * /*pOverlap*/);
+
+extern _X_EXPORT RegionPtr RegionFromRects(
+ int /*nrects*/,
+ xRectanglePtr /*prect*/,
+ int /*ctype*/);
+
+/*-
+ *-----------------------------------------------------------------------
+ * Subtract --
+ * Subtract regS from regM and leave the result in regD.
+ * S stands for subtrahend, M for minuend and D for difference.
+ *
+ * Results:
+ * TRUE if successful.
+ *
+ * Side Effects:
+ * regD is overwritten.
+ *
+ *-----------------------------------------------------------------------
+ */
+static inline Bool
+RegionSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS)
+{
+ return pixman_region_subtract (regD, regM, regS);
+}
+
+/*-
+ *-----------------------------------------------------------------------
+ * Inverse --
+ * Take a region and a box and return a region that is everything
+ * in the box but not in the region. The careful reader will note
+ * that this is the same as subtracting the region from the box...
+ *
+ * Results:
+ * TRUE.
+ *
+ * Side Effects:
+ * newReg is overwritten.
+ *
+ *-----------------------------------------------------------------------
+ */
+
+static inline Bool
+RegionInverse(
+ RegionPtr newReg, /* Destination region */
+ RegionPtr reg1, /* Region to invert */
+ BoxPtr invRect /* Bounding box for inversion */
+ )
+{
+ return pixman_region_inverse (newReg, reg1, invRect);
+}
+
+static inline int
+RegionContainsRect(RegionPtr region, BoxPtr prect)
+{
+ return pixman_region_contains_rectangle (region, prect);
+}
+
+/* TranslateRegion(pReg, x, y)
+ translates in place
+*/
+
+static inline void
+RegionTranslate(RegionPtr pReg, int x, int y)
+{
+ pixman_region_translate (pReg, x, y);
+}
+
+extern _X_EXPORT Bool RegionBreak(
+ RegionPtr /*pReg*/);
+
+static inline Bool
+RegionContainsPoint(
+ RegionPtr pReg,
+ int x,
+ int y,
+ BoxPtr box /* "return" value */
+ )
+{
+ return pixman_region_contains_point (pReg, x, y, box);
+}
+
+static inline Bool
+RegionEqual(RegionPtr reg1, RegionPtr reg2)
+{
+ return pixman_region_equal (reg1, reg2);
+}
+
+extern _X_EXPORT Bool RegionRectAlloc(
+ RegionPtr /*pRgn*/,
+ int /*n*/
+);
+
+#ifdef DEBUG
+extern _X_EXPORT Bool RegionIsValid(
+ RegionPtr /*prgn*/
+);
+#endif
+
+extern _X_EXPORT void RegionPrint(
+ RegionPtr /*pReg*/);
+
+#define INCLUDE_LEGACY_REGION_DEFINES
+#ifdef INCLUDE_LEGACY_REGION_DEFINES
+
+#define REGION_NIL RegionNil
+#define REGION_NAR RegionNar
+#define REGION_NUM_RECTS RegionNumRects
+#define REGION_SIZE RegionSize
+#define REGION_RECTS RegionRects
+#define REGION_BOXPTR RegionBoxptr
+#define REGION_BOX RegionBox
+#define REGION_TOP RegionTop
+#define REGION_END RegionEnd
+#define REGION_SZOF RegionSizeof
+#define BITMAP_TO_REGION BitmapToRegion
+#define REGION_CREATE(pScreen, r, s) RegionCreate(r,s)
+#define REGION_COPY(pScreen, d, r) RegionCopy(d, r)
+#define REGION_DESTROY(pScreen, r) RegionDestroy(r)
+#define REGION_INTERSECT(pScreen, res, r1, r2) RegionIntersect(res, r1, r2)
+#define REGION_UNION(pScreen, res, r1, r2) RegionUnion(res, r1, r2)
+#define REGION_SUBTRACT(pScreen, res, r1, r2) RegionSubtract(res, r1, r2)
+#define REGION_INVERSE(pScreen, n, r, b) RegionInverse(n, r, b)
+#define REGION_TRANSLATE(pScreen, r, x, y) RegionTranslate(r, x, y)
+#define RECT_IN_REGION(pScreen, r, b) RegionContainsRect(r, b)
+#define POINT_IN_REGION(pScreen, r, x, y, b) RegionContainsPoint(r, x, y, b)
+#define REGION_EQUAL(pScreen, r1, r2) RegionEqual(r1, r2)
+#define REGION_APPEND(pScreen, d, r) RegionAppend(d, r)
+#define REGION_VALIDATE(pScreen, r, o) RegionValidate(r, o)
+#define RECTS_TO_REGION(pScreen, n, r, c) RegionFromRects(n, r, c)
+#define REGION_BREAK(pScreen, r) RegionBreak(r)
+#define REGION_INIT(pScreen, r, b, s) RegionInit(r, b, s)
+#define REGION_UNINIT(pScreen, r) RegionUninit(r)
+#define REGION_RESET(pScreen, r, b) RegionReset(r, b)
+#define REGION_NOTEMPTY(pScreen, r) RegionNotEmpty(r)
+#define REGION_BROKEN(pScreen, r) RegionBroken(r)
+#define REGION_EMPTY(pScreen, r) RegionEmpty(r)
+#define REGION_EXTENTS(pScreen, r) RegionExtents(r)
+#define REGION_NULL(pScreen, r) RegionNull(r)
+
+#endif /* INCLUDE_LEGACY_REGION_DEFINES */
+#endif /* REGIONSTRUCT_H */
diff --git a/xorg-server/include/resource.h b/xorg-server/include/resource.h
index 17bebe7d4..2bed80577 100644
--- a/xorg-server/include/resource.h
+++ b/xorg-server/include/resource.h
@@ -70,7 +70,7 @@ typedef uint32_t RESTYPE;
#define RC_LASTPREDEF RC_NEVERRETAIN
#define RC_ANY (~(RESTYPE)0)
-/* types for Resource routines */
+/* types for Resource routines. When you change one of them, please also update the predefTypes array in resource.c*/
#define RT_WINDOW ((RESTYPE)1|RC_DRAWABLE)
#define RT_PIXMAP ((RESTYPE)2|RC_DRAWABLE)
diff --git a/xorg-server/include/scrnintstr.h b/xorg-server/include/scrnintstr.h
index 302a561bd..28dd2c011 100644
--- a/xorg-server/include/scrnintstr.h
+++ b/xorg-server/include/scrnintstr.h
@@ -1,573 +1,577 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef SCREENINTSTRUCT_H
-#define SCREENINTSTRUCT_H
-
-#include "screenint.h"
-#include "regionstr.h"
-#include "colormap.h"
-#include "cursor.h"
-#include "validate.h"
-#include <X11/Xproto.h>
-#include "dix.h"
-#include "privates.h"
-
-typedef struct _PixmapFormat {
- unsigned char depth;
- unsigned char bitsPerPixel;
- unsigned char scanlinePad;
- } PixmapFormatRec;
-
-typedef struct _Visual {
- VisualID vid;
- short class;
- short bitsPerRGBValue;
- short ColormapEntries;
- short nplanes;/* = log2 (ColormapEntries). This does not
- * imply that the screen has this many planes.
- * it may have more or fewer */
- unsigned long redMask, greenMask, blueMask;
- int offsetRed, offsetGreen, offsetBlue;
- } VisualRec;
-
-typedef struct _Depth {
- unsigned char depth;
- short numVids;
- VisualID *vids; /* block of visual ids for this depth */
- } DepthRec;
-
-typedef struct _ScreenSaverStuff {
- WindowPtr pWindow;
- XID wid;
- char blanked;
- Bool (*ExternalScreenSaver)(
- ScreenPtr /*pScreen*/,
- int /*xstate*/,
- Bool /*force*/);
-} ScreenSaverStuffRec;
-
-
-/*
- * There is a typedef for each screen function pointer so that code that
- * needs to declare a screen function pointer (e.g. in a screen private
- * or as a local variable) can easily do so and retain full type checking.
- */
-
-typedef Bool (* CloseScreenProcPtr)(
- int /*index*/,
- ScreenPtr /*pScreen*/);
-
-typedef void (* QueryBestSizeProcPtr)(
- int /*class*/,
- unsigned short * /*pwidth*/,
- unsigned short * /*pheight*/,
- ScreenPtr /*pScreen*/);
-
-typedef Bool (* SaveScreenProcPtr)(
- ScreenPtr /*pScreen*/,
- int /*on*/);
-
-typedef void (* GetImageProcPtr)(
- DrawablePtr /*pDrawable*/,
- int /*sx*/,
- int /*sy*/,
- int /*w*/,
- int /*h*/,
- unsigned int /*format*/,
- unsigned long /*planeMask*/,
- char * /*pdstLine*/);
-
-typedef void (* GetSpansProcPtr)(
- DrawablePtr /*pDrawable*/,
- int /*wMax*/,
- DDXPointPtr /*ppt*/,
- int* /*pwidth*/,
- int /*nspans*/,
- char * /*pdstStart*/);
-
-typedef void (* SourceValidateProcPtr)(
- DrawablePtr /*pDrawable*/,
- int /*x*/,
- int /*y*/,
- int /*width*/,
- int /*height*/,
- unsigned int /*subWindowMode*/);
-
-typedef Bool (* CreateWindowProcPtr)(
- WindowPtr /*pWindow*/);
-
-typedef Bool (* DestroyWindowProcPtr)(
- WindowPtr /*pWindow*/);
-
-typedef Bool (* PositionWindowProcPtr)(
- WindowPtr /*pWindow*/,
- int /*x*/,
- int /*y*/);
-
-typedef Bool (* ChangeWindowAttributesProcPtr)(
- WindowPtr /*pWindow*/,
- unsigned long /*mask*/);
-
-typedef Bool (* RealizeWindowProcPtr)(
- WindowPtr /*pWindow*/);
-
-typedef Bool (* UnrealizeWindowProcPtr)(
- WindowPtr /*pWindow*/);
-
-typedef void (* RestackWindowProcPtr)(
- WindowPtr /*pWindow*/,
- WindowPtr /*pOldNextSib*/);
-
-typedef int (* ValidateTreeProcPtr)(
- WindowPtr /*pParent*/,
- WindowPtr /*pChild*/,
- VTKind /*kind*/);
-
-typedef void (* PostValidateTreeProcPtr)(
- WindowPtr /*pParent*/,
- WindowPtr /*pChild*/,
- VTKind /*kind*/);
-
-typedef void (* WindowExposuresProcPtr)(
- WindowPtr /*pWindow*/,
- RegionPtr /*prgn*/,
- RegionPtr /*other_exposed*/);
-
-typedef void (* CopyWindowProcPtr)(
- WindowPtr /*pWindow*/,
- DDXPointRec /*ptOldOrg*/,
- RegionPtr /*prgnSrc*/);
-
-typedef void (* ClearToBackgroundProcPtr)(
- WindowPtr /*pWindow*/,
- int /*x*/,
- int /*y*/,
- int /*w*/,
- int /*h*/,
- Bool /*generateExposures*/);
-
-typedef void (* ClipNotifyProcPtr)(
- WindowPtr /*pWindow*/,
- int /*dx*/,
- int /*dy*/);
-
-/* pixmap will exist only for the duration of the current rendering operation */
-#define CREATE_PIXMAP_USAGE_SCRATCH 1
-/* pixmap will be the backing pixmap for a redirected window */
-#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
-/* pixmap will contain a glyph */
-#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
-
-typedef PixmapPtr (* CreatePixmapProcPtr)(
- ScreenPtr /*pScreen*/,
- int /*width*/,
- int /*height*/,
- int /*depth*/,
- unsigned /*class*/);
-
-typedef Bool (* DestroyPixmapProcPtr)(
- PixmapPtr /*pPixmap*/);
-
-typedef Bool (* RealizeFontProcPtr)(
- ScreenPtr /*pScreen*/,
- FontPtr /*pFont*/);
-
-typedef Bool (* UnrealizeFontProcPtr)(
- ScreenPtr /*pScreen*/,
- FontPtr /*pFont*/);
-
-typedef void (* ConstrainCursorProcPtr)(
- DeviceIntPtr /*pDev*/,
- ScreenPtr /*pScreen*/,
- BoxPtr /*pBox*/);
-
-typedef void (* CursorLimitsProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/,
- BoxPtr /*pHotBox*/,
- BoxPtr /*pTopLeftBox*/);
-
-typedef Bool (* DisplayCursorProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/);
-
-typedef Bool (* RealizeCursorProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/);
-
-typedef Bool (* UnrealizeCursorProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/);
-
-typedef void (* RecolorCursorProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/,
- Bool /*displayed*/);
-
-typedef Bool (* SetCursorPositionProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- int /*x*/,
- int /*y*/,
- Bool /*generateEvent*/);
-
-typedef Bool (* CreateGCProcPtr)(
- GCPtr /*pGC*/);
-
-typedef Bool (* CreateColormapProcPtr)(
- ColormapPtr /*pColormap*/);
-
-typedef void (* DestroyColormapProcPtr)(
- ColormapPtr /*pColormap*/);
-
-typedef void (* InstallColormapProcPtr)(
- ColormapPtr /*pColormap*/);
-
-typedef void (* UninstallColormapProcPtr)(
- ColormapPtr /*pColormap*/);
-
-typedef int (* ListInstalledColormapsProcPtr) (
- ScreenPtr /*pScreen*/,
- XID* /*pmaps */);
-
-typedef void (* StoreColorsProcPtr)(
- ColormapPtr /*pColormap*/,
- int /*ndef*/,
- xColorItem * /*pdef*/);
-
-typedef void (* ResolveColorProcPtr)(
- unsigned short* /*pred*/,
- unsigned short* /*pgreen*/,
- unsigned short* /*pblue*/,
- VisualPtr /*pVisual*/);
-
-typedef RegionPtr (* BitmapToRegionProcPtr)(
- PixmapPtr /*pPix*/);
-
-typedef void (* SendGraphicsExposeProcPtr)(
- ClientPtr /*client*/,
- RegionPtr /*pRgn*/,
- XID /*drawable*/,
- int /*major*/,
- int /*minor*/);
-
-typedef void (* ScreenBlockHandlerProcPtr)(
- int /*screenNum*/,
- pointer /*blockData*/,
- pointer /*pTimeout*/,
- pointer /*pReadmask*/);
-
-typedef void (* ScreenWakeupHandlerProcPtr)(
- int /*screenNum*/,
- pointer /*wakeupData*/,
- unsigned long /*result*/,
- pointer /*pReadMask*/);
-
-typedef Bool (* CreateScreenResourcesProcPtr)(
- ScreenPtr /*pScreen*/);
-
-typedef Bool (* ModifyPixmapHeaderProcPtr)(
- PixmapPtr /*pPixmap*/,
- int /*width*/,
- int /*height*/,
- int /*depth*/,
- int /*bitsPerPixel*/,
- int /*devKind*/,
- pointer /*pPixData*/);
-
-typedef PixmapPtr (* GetWindowPixmapProcPtr)(
- WindowPtr /*pWin*/);
-
-typedef void (* SetWindowPixmapProcPtr)(
- WindowPtr /*pWin*/,
- PixmapPtr /*pPix*/);
-
-typedef PixmapPtr (* GetScreenPixmapProcPtr)(
- ScreenPtr /*pScreen*/);
-
-typedef void (* SetScreenPixmapProcPtr)(
- PixmapPtr /*pPix*/);
-
-typedef void (* MarkWindowProcPtr)(
- WindowPtr /*pWin*/);
-
-typedef Bool (* MarkOverlappedWindowsProcPtr)(
- WindowPtr /*parent*/,
- WindowPtr /*firstChild*/,
- WindowPtr * /*pLayerWin*/);
-
-typedef int (* ConfigNotifyProcPtr)(
- WindowPtr /*pWin*/,
- int /*x*/,
- int /*y*/,
- int /*w*/,
- int /*h*/,
- int /*bw*/,
- WindowPtr /*pSib*/);
-
-typedef void (* MoveWindowProcPtr)(
- WindowPtr /*pWin*/,
- int /*x*/,
- int /*y*/,
- WindowPtr /*pSib*/,
- VTKind /*kind*/);
-
-typedef void (* ResizeWindowProcPtr)(
- WindowPtr /*pWin*/,
- int /*x*/,
- int /*y*/,
- unsigned int /*w*/,
- unsigned int /*h*/,
- WindowPtr /*pSib*/
-);
-
-typedef WindowPtr (* GetLayerWindowProcPtr)(
- WindowPtr /*pWin*/
-);
-
-typedef void (* HandleExposuresProcPtr)(
- WindowPtr /*pWin*/);
-
-typedef void (* ReparentWindowProcPtr)(
- WindowPtr /*pWin*/,
- WindowPtr /*pPriorParent*/);
-
-typedef void (* SetShapeProcPtr)(
- WindowPtr /*pWin*/,
- int /* kind */);
-
-typedef void (* ChangeBorderWidthProcPtr)(
- WindowPtr /*pWin*/,
- unsigned int /*width*/);
-
-typedef void (* MarkUnrealizedWindowProcPtr)(
- WindowPtr /*pChild*/,
- WindowPtr /*pWin*/,
- Bool /*fromConfigure*/);
-
-typedef Bool (* DeviceCursorInitializeProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /* pScreen */);
-
-typedef void (* DeviceCursorCleanupProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /* pScreen */);
-
-typedef void (*ConstrainCursorHarderProcPtr)(
- DeviceIntPtr, ScreenPtr, int, int *, int *);
-
-typedef struct _Screen {
- int myNum; /* index of this instance in Screens[] */
- ATOM id;
- short x, y, width, height;
- short mmWidth, mmHeight;
- short numDepths;
- unsigned char rootDepth;
- DepthPtr allowedDepths;
- unsigned long rootVisual;
- unsigned long defColormap;
- short minInstalledCmaps, maxInstalledCmaps;
- char backingStoreSupport, saveUnderSupport;
- unsigned long whitePixel, blackPixel;
- GCPtr GCperDepth[MAXFORMATS+1];
- /* next field is a stipple to use as default in
- a GC. we don't build default tiles of all depths
- because they are likely to be of a color
- different from the default fg pixel, so
- we don't win anything by building
- a standard one.
- */
- PixmapPtr PixmapPerDepth[1];
- pointer devPrivate;
- short numVisuals;
- VisualPtr visuals;
- WindowPtr root;
- ScreenSaverStuffRec screensaver;
-
- /* Random screen procedures */
-
- CloseScreenProcPtr CloseScreen;
- QueryBestSizeProcPtr QueryBestSize;
- SaveScreenProcPtr SaveScreen;
- GetImageProcPtr GetImage;
- GetSpansProcPtr GetSpans;
- SourceValidateProcPtr SourceValidate;
-
- /* Window Procedures */
-
- CreateWindowProcPtr CreateWindow;
- DestroyWindowProcPtr DestroyWindow;
- PositionWindowProcPtr PositionWindow;
- ChangeWindowAttributesProcPtr ChangeWindowAttributes;
- RealizeWindowProcPtr RealizeWindow;
- UnrealizeWindowProcPtr UnrealizeWindow;
- ValidateTreeProcPtr ValidateTree;
- PostValidateTreeProcPtr PostValidateTree;
- WindowExposuresProcPtr WindowExposures;
- CopyWindowProcPtr CopyWindow;
- ClearToBackgroundProcPtr ClearToBackground;
- ClipNotifyProcPtr ClipNotify;
- RestackWindowProcPtr RestackWindow;
-
- /* Pixmap procedures */
-
- CreatePixmapProcPtr CreatePixmap;
- DestroyPixmapProcPtr DestroyPixmap;
-
- /* Font procedures */
-
- RealizeFontProcPtr RealizeFont;
- UnrealizeFontProcPtr UnrealizeFont;
-
- /* Cursor Procedures */
-
- ConstrainCursorProcPtr ConstrainCursor;
- ConstrainCursorHarderProcPtr ConstrainCursorHarder;
- CursorLimitsProcPtr CursorLimits;
- DisplayCursorProcPtr DisplayCursor;
- RealizeCursorProcPtr RealizeCursor;
- UnrealizeCursorProcPtr UnrealizeCursor;
- RecolorCursorProcPtr RecolorCursor;
- SetCursorPositionProcPtr SetCursorPosition;
-
- /* GC procedures */
-
- CreateGCProcPtr CreateGC;
-
- /* Colormap procedures */
-
- CreateColormapProcPtr CreateColormap;
- DestroyColormapProcPtr DestroyColormap;
- InstallColormapProcPtr InstallColormap;
- UninstallColormapProcPtr UninstallColormap;
- ListInstalledColormapsProcPtr ListInstalledColormaps;
- StoreColorsProcPtr StoreColors;
- ResolveColorProcPtr ResolveColor;
-
- /* Region procedures */
-
- BitmapToRegionProcPtr BitmapToRegion;
- SendGraphicsExposeProcPtr SendGraphicsExpose;
-
- /* os layer procedures */
-
- ScreenBlockHandlerProcPtr BlockHandler;
- ScreenWakeupHandlerProcPtr WakeupHandler;
-
- pointer blockData;
- pointer wakeupData;
-
- /* anybody can get a piece of this array */
- PrivateRec *devPrivates;
-
- CreateScreenResourcesProcPtr CreateScreenResources;
- ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
-
- GetWindowPixmapProcPtr GetWindowPixmap;
- SetWindowPixmapProcPtr SetWindowPixmap;
- GetScreenPixmapProcPtr GetScreenPixmap;
- SetScreenPixmapProcPtr SetScreenPixmap;
-
- PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
-
- unsigned int totalPixmapSize;
-
- MarkWindowProcPtr MarkWindow;
- MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
- ConfigNotifyProcPtr ConfigNotify;
- MoveWindowProcPtr MoveWindow;
- ResizeWindowProcPtr ResizeWindow;
- GetLayerWindowProcPtr GetLayerWindow;
- HandleExposuresProcPtr HandleExposures;
- ReparentWindowProcPtr ReparentWindow;
-
- SetShapeProcPtr SetShape;
-
- ChangeBorderWidthProcPtr ChangeBorderWidth;
- MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
-
- /* Device cursor procedures */
- DeviceCursorInitializeProcPtr DeviceCursorInitialize;
- DeviceCursorCleanupProcPtr DeviceCursorCleanup;
-
- /* set it in driver side if X server can copy the framebuffer content.
- * Meant to be used together with '-background none' option, avoiding
- * malicious users to steal framebuffer's content if that would be the
- * default */
- Bool canDoBGNoneRoot;
-} ScreenRec;
-
-static inline RegionPtr BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix) {
- return (*(_pScreen)->BitmapToRegion)(pPix); /* no mi version?! */
-}
-
-typedef struct _ScreenInfo {
- int imageByteOrder;
- int bitmapScanlineUnit;
- int bitmapScanlinePad;
- int bitmapBitOrder;
- int numPixmapFormats;
- PixmapFormatRec
- formats[MAXFORMATS];
- int numScreens;
- ScreenPtr screens[MAXSCREENS];
-} ScreenInfo;
-
-extern _X_EXPORT ScreenInfo screenInfo;
-
-extern _X_EXPORT void InitOutput(
- ScreenInfo * /*pScreenInfo*/,
- int /*argc*/,
- char ** /*argv*/);
-
-#endif /* SCREENINTSTRUCT_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef SCREENINTSTRUCT_H
+#define SCREENINTSTRUCT_H
+
+#include "screenint.h"
+#include "regionstr.h"
+#include "colormap.h"
+#include "cursor.h"
+#include "validate.h"
+#include <X11/Xproto.h>
+#include "dix.h"
+#include "privates.h"
+
+typedef struct _PixmapFormat {
+ unsigned char depth;
+ unsigned char bitsPerPixel;
+ unsigned char scanlinePad;
+ } PixmapFormatRec;
+
+typedef struct _Visual {
+ VisualID vid;
+ short class;
+ short bitsPerRGBValue;
+ long ColormapEntries;
+ short nplanes;/* = log2 (ColormapEntries). This does not
+ * imply that the screen has this many planes.
+ * it may have more or fewer */
+ unsigned long redMask, greenMask, blueMask;
+ int offsetRed, offsetGreen, offsetBlue;
+ } VisualRec;
+
+typedef struct _Depth {
+ unsigned char depth;
+ short numVids;
+ VisualID *vids; /* block of visual ids for this depth */
+ } DepthRec;
+
+typedef struct _ScreenSaverStuff {
+ WindowPtr pWindow;
+ XID wid;
+ char blanked;
+ Bool (*ExternalScreenSaver)(
+ ScreenPtr /*pScreen*/,
+ int /*xstate*/,
+ Bool /*force*/);
+} ScreenSaverStuffRec;
+
+
+/*
+ * There is a typedef for each screen function pointer so that code that
+ * needs to declare a screen function pointer (e.g. in a screen private
+ * or as a local variable) can easily do so and retain full type checking.
+ */
+
+typedef Bool (* CloseScreenProcPtr)(
+ int /*index*/,
+ ScreenPtr /*pScreen*/);
+
+typedef void (* QueryBestSizeProcPtr)(
+ int /*class*/,
+ unsigned short * /*pwidth*/,
+ unsigned short * /*pheight*/,
+ ScreenPtr /*pScreen*/);
+
+typedef Bool (* SaveScreenProcPtr)(
+ ScreenPtr /*pScreen*/,
+ int /*on*/);
+
+typedef void (* GetImageProcPtr)(
+ DrawablePtr /*pDrawable*/,
+ int /*sx*/,
+ int /*sy*/,
+ int /*w*/,
+ int /*h*/,
+ unsigned int /*format*/,
+ unsigned long /*planeMask*/,
+ char * /*pdstLine*/);
+
+typedef void (* GetSpansProcPtr)(
+ DrawablePtr /*pDrawable*/,
+ int /*wMax*/,
+ DDXPointPtr /*ppt*/,
+ int* /*pwidth*/,
+ int /*nspans*/,
+ char * /*pdstStart*/);
+
+typedef void (* SourceValidateProcPtr)(
+ DrawablePtr /*pDrawable*/,
+ int /*x*/,
+ int /*y*/,
+ int /*width*/,
+ int /*height*/,
+ unsigned int /*subWindowMode*/);
+
+typedef Bool (* CreateWindowProcPtr)(
+ WindowPtr /*pWindow*/);
+
+typedef Bool (* DestroyWindowProcPtr)(
+ WindowPtr /*pWindow*/);
+
+typedef Bool (* PositionWindowProcPtr)(
+ WindowPtr /*pWindow*/,
+ int /*x*/,
+ int /*y*/);
+
+typedef Bool (* ChangeWindowAttributesProcPtr)(
+ WindowPtr /*pWindow*/,
+ unsigned long /*mask*/);
+
+typedef Bool (* RealizeWindowProcPtr)(
+ WindowPtr /*pWindow*/);
+
+typedef Bool (* UnrealizeWindowProcPtr)(
+ WindowPtr /*pWindow*/);
+
+typedef void (* RestackWindowProcPtr)(
+ WindowPtr /*pWindow*/,
+ WindowPtr /*pOldNextSib*/);
+
+typedef int (* ValidateTreeProcPtr)(
+ WindowPtr /*pParent*/,
+ WindowPtr /*pChild*/,
+ VTKind /*kind*/);
+
+typedef void (* PostValidateTreeProcPtr)(
+ WindowPtr /*pParent*/,
+ WindowPtr /*pChild*/,
+ VTKind /*kind*/);
+
+typedef void (* WindowExposuresProcPtr)(
+ WindowPtr /*pWindow*/,
+ RegionPtr /*prgn*/,
+ RegionPtr /*other_exposed*/);
+
+typedef void (* CopyWindowProcPtr)(
+ WindowPtr /*pWindow*/,
+ DDXPointRec /*ptOldOrg*/,
+ RegionPtr /*prgnSrc*/);
+
+typedef void (* ClearToBackgroundProcPtr)(
+ WindowPtr /*pWindow*/,
+ int /*x*/,
+ int /*y*/,
+ int /*w*/,
+ int /*h*/,
+ Bool /*generateExposures*/);
+
+typedef void (* ClipNotifyProcPtr)(
+ WindowPtr /*pWindow*/,
+ int /*dx*/,
+ int /*dy*/);
+
+/* pixmap will exist only for the duration of the current rendering operation */
+#define CREATE_PIXMAP_USAGE_SCRATCH 1
+/* pixmap will be the backing pixmap for a redirected window */
+#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
+/* pixmap will contain a glyph */
+#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
+
+typedef PixmapPtr (* CreatePixmapProcPtr)(
+ ScreenPtr /*pScreen*/,
+ int /*width*/,
+ int /*height*/,
+ int /*depth*/,
+ unsigned /*class*/);
+
+typedef Bool (* DestroyPixmapProcPtr)(
+ PixmapPtr /*pPixmap*/);
+
+typedef Bool (* RealizeFontProcPtr)(
+ ScreenPtr /*pScreen*/,
+ FontPtr /*pFont*/);
+
+typedef Bool (* UnrealizeFontProcPtr)(
+ ScreenPtr /*pScreen*/,
+ FontPtr /*pFont*/);
+
+typedef void (* ConstrainCursorProcPtr)(
+ DeviceIntPtr /*pDev*/,
+ ScreenPtr /*pScreen*/,
+ BoxPtr /*pBox*/);
+
+typedef void (* CursorLimitsProcPtr)(
+ DeviceIntPtr /* pDev */,
+ ScreenPtr /*pScreen*/,
+ CursorPtr /*pCursor*/,
+ BoxPtr /*pHotBox*/,
+ BoxPtr /*pTopLeftBox*/);
+
+typedef Bool (* DisplayCursorProcPtr)(
+ DeviceIntPtr /* pDev */,
+ ScreenPtr /*pScreen*/,
+ CursorPtr /*pCursor*/);
+
+typedef Bool (* RealizeCursorProcPtr)(
+ DeviceIntPtr /* pDev */,
+ ScreenPtr /*pScreen*/,
+ CursorPtr /*pCursor*/);
+
+typedef Bool (* UnrealizeCursorProcPtr)(
+ DeviceIntPtr /* pDev */,
+ ScreenPtr /*pScreen*/,
+ CursorPtr /*pCursor*/);
+
+typedef void (* RecolorCursorProcPtr)(
+ DeviceIntPtr /* pDev */,
+ ScreenPtr /*pScreen*/,
+ CursorPtr /*pCursor*/,
+ Bool /*displayed*/);
+
+typedef Bool (* SetCursorPositionProcPtr)(
+ DeviceIntPtr /* pDev */,
+ ScreenPtr /*pScreen*/,
+ int /*x*/,
+ int /*y*/,
+ Bool /*generateEvent*/);
+
+typedef Bool (* CreateGCProcPtr)(
+ GCPtr /*pGC*/);
+
+typedef Bool (* CreateColormapProcPtr)(
+ ColormapPtr /*pColormap*/);
+
+typedef void (* DestroyColormapProcPtr)(
+ ColormapPtr /*pColormap*/);
+
+typedef void (* InstallColormapProcPtr)(
+ ColormapPtr /*pColormap*/);
+
+typedef void (* UninstallColormapProcPtr)(
+ ColormapPtr /*pColormap*/);
+
+typedef int (* ListInstalledColormapsProcPtr) (
+ ScreenPtr /*pScreen*/,
+ XID* /*pmaps */);
+
+typedef void (* StoreColorsProcPtr)(
+ ColormapPtr /*pColormap*/,
+ int /*ndef*/,
+ xColorItem * /*pdef*/);
+
+typedef void (* ResolveColorProcPtr)(
+ unsigned short* /*pred*/,
+ unsigned short* /*pgreen*/,
+ unsigned short* /*pblue*/,
+ VisualPtr /*pVisual*/);
+
+typedef RegionPtr (* BitmapToRegionProcPtr)(
+ PixmapPtr /*pPix*/);
+
+typedef void (* SendGraphicsExposeProcPtr)(
+ ClientPtr /*client*/,
+ RegionPtr /*pRgn*/,
+ XID /*drawable*/,
+ int /*major*/,
+ int /*minor*/);
+
+typedef void (* ScreenBlockHandlerProcPtr)(
+ int /*screenNum*/,
+ pointer /*blockData*/,
+ pointer /*pTimeout*/,
+ pointer /*pReadmask*/);
+
+typedef void (* ScreenWakeupHandlerProcPtr)(
+ int /*screenNum*/,
+ pointer /*wakeupData*/,
+ unsigned long /*result*/,
+ pointer /*pReadMask*/);
+
+typedef Bool (* CreateScreenResourcesProcPtr)(
+ ScreenPtr /*pScreen*/);
+
+typedef Bool (* ModifyPixmapHeaderProcPtr)(
+ PixmapPtr /*pPixmap*/,
+ int /*width*/,
+ int /*height*/,
+ int /*depth*/,
+ int /*bitsPerPixel*/,
+ int /*devKind*/,
+ pointer /*pPixData*/);
+
+typedef PixmapPtr (* GetWindowPixmapProcPtr)(
+ WindowPtr /*pWin*/);
+
+typedef void (* SetWindowPixmapProcPtr)(
+ WindowPtr /*pWin*/,
+ PixmapPtr /*pPix*/);
+
+typedef PixmapPtr (* GetScreenPixmapProcPtr)(
+ ScreenPtr /*pScreen*/);
+
+typedef void (* SetScreenPixmapProcPtr)(
+ PixmapPtr /*pPix*/);
+
+typedef void (* MarkWindowProcPtr)(
+ WindowPtr /*pWin*/);
+
+typedef Bool (* MarkOverlappedWindowsProcPtr)(
+ WindowPtr /*parent*/,
+ WindowPtr /*firstChild*/,
+ WindowPtr * /*pLayerWin*/);
+
+typedef int (* ConfigNotifyProcPtr)(
+ WindowPtr /*pWin*/,
+ int /*x*/,
+ int /*y*/,
+ int /*w*/,
+ int /*h*/,
+ int /*bw*/,
+ WindowPtr /*pSib*/);
+
+typedef void (* MoveWindowProcPtr)(
+ WindowPtr /*pWin*/,
+ int /*x*/,
+ int /*y*/,
+ WindowPtr /*pSib*/,
+ VTKind /*kind*/);
+
+typedef void (* ResizeWindowProcPtr)(
+ WindowPtr /*pWin*/,
+ int /*x*/,
+ int /*y*/,
+ unsigned int /*w*/,
+ unsigned int /*h*/,
+ WindowPtr /*pSib*/
+);
+
+typedef WindowPtr (* GetLayerWindowProcPtr)(
+ WindowPtr /*pWin*/
+);
+
+typedef void (* HandleExposuresProcPtr)(
+ WindowPtr /*pWin*/);
+
+typedef void (* ReparentWindowProcPtr)(
+ WindowPtr /*pWin*/,
+ WindowPtr /*pPriorParent*/);
+
+typedef void (* SetShapeProcPtr)(
+ WindowPtr /*pWin*/,
+ int /* kind */);
+
+typedef void (* ChangeBorderWidthProcPtr)(
+ WindowPtr /*pWin*/,
+ unsigned int /*width*/);
+
+typedef void (* MarkUnrealizedWindowProcPtr)(
+ WindowPtr /*pChild*/,
+ WindowPtr /*pWin*/,
+ Bool /*fromConfigure*/);
+
+#ifdef CreateWindow
+#undef CreateWindow
+#endif
+
+typedef Bool (* DeviceCursorInitializeProcPtr)(
+ DeviceIntPtr /* pDev */,
+ ScreenPtr /* pScreen */);
+
+typedef void (* DeviceCursorCleanupProcPtr)(
+ DeviceIntPtr /* pDev */,
+ ScreenPtr /* pScreen */);
+
+typedef void (*ConstrainCursorHarderProcPtr)(
+ DeviceIntPtr, ScreenPtr, int, int *, int *);
+
+typedef struct _Screen {
+ int myNum; /* index of this instance in Screens[] */
+ ATOM id;
+ short x, y, width, height;
+ short mmWidth, mmHeight;
+ short numDepths;
+ unsigned char rootDepth;
+ DepthPtr allowedDepths;
+ unsigned long rootVisual;
+ unsigned long defColormap;
+ short minInstalledCmaps, maxInstalledCmaps;
+ char backingStoreSupport, saveUnderSupport;
+ unsigned long whitePixel, blackPixel;
+ GCPtr GCperDepth[MAXFORMATS+1];
+ /* next field is a stipple to use as default in
+ a GC. we don't build default tiles of all depths
+ because they are likely to be of a color
+ different from the default fg pixel, so
+ we don't win anything by building
+ a standard one.
+ */
+ PixmapPtr PixmapPerDepth[1];
+ pointer devPrivate;
+ short numVisuals;
+ VisualPtr visuals;
+ WindowPtr root;
+ ScreenSaverStuffRec screensaver;
+
+ /* Random screen procedures */
+
+ CloseScreenProcPtr CloseScreen;
+ QueryBestSizeProcPtr QueryBestSize;
+ SaveScreenProcPtr SaveScreen;
+ GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
+ SourceValidateProcPtr SourceValidate;
+
+ /* Window Procedures */
+
+ CreateWindowProcPtr CreateWindow;
+ DestroyWindowProcPtr DestroyWindow;
+ PositionWindowProcPtr PositionWindow;
+ ChangeWindowAttributesProcPtr ChangeWindowAttributes;
+ RealizeWindowProcPtr RealizeWindow;
+ UnrealizeWindowProcPtr UnrealizeWindow;
+ ValidateTreeProcPtr ValidateTree;
+ PostValidateTreeProcPtr PostValidateTree;
+ WindowExposuresProcPtr WindowExposures;
+ CopyWindowProcPtr CopyWindow;
+ ClearToBackgroundProcPtr ClearToBackground;
+ ClipNotifyProcPtr ClipNotify;
+ RestackWindowProcPtr RestackWindow;
+
+ /* Pixmap procedures */
+
+ CreatePixmapProcPtr CreatePixmap;
+ DestroyPixmapProcPtr DestroyPixmap;
+
+ /* Font procedures */
+
+ RealizeFontProcPtr RealizeFont;
+ UnrealizeFontProcPtr UnrealizeFont;
+
+ /* Cursor Procedures */
+
+ ConstrainCursorProcPtr ConstrainCursor;
+ ConstrainCursorHarderProcPtr ConstrainCursorHarder;
+ CursorLimitsProcPtr CursorLimits;
+ DisplayCursorProcPtr DisplayCursor;
+ RealizeCursorProcPtr RealizeCursor;
+ UnrealizeCursorProcPtr UnrealizeCursor;
+ RecolorCursorProcPtr RecolorCursor;
+ SetCursorPositionProcPtr SetCursorPosition;
+
+ /* GC procedures */
+
+ CreateGCProcPtr CreateGC;
+
+ /* Colormap procedures */
+
+ CreateColormapProcPtr CreateColormap;
+ DestroyColormapProcPtr DestroyColormap;
+ InstallColormapProcPtr InstallColormap;
+ UninstallColormapProcPtr UninstallColormap;
+ ListInstalledColormapsProcPtr ListInstalledColormaps;
+ StoreColorsProcPtr StoreColors;
+ ResolveColorProcPtr ResolveColor;
+
+ /* Region procedures */
+
+ BitmapToRegionProcPtr BitmapToRegion;
+ SendGraphicsExposeProcPtr SendGraphicsExpose;
+
+ /* os layer procedures */
+
+ ScreenBlockHandlerProcPtr BlockHandler;
+ ScreenWakeupHandlerProcPtr WakeupHandler;
+
+ pointer blockData;
+ pointer wakeupData;
+
+ /* anybody can get a piece of this array */
+ PrivateRec *devPrivates;
+
+ CreateScreenResourcesProcPtr CreateScreenResources;
+ ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
+
+ GetWindowPixmapProcPtr GetWindowPixmap;
+ SetWindowPixmapProcPtr SetWindowPixmap;
+ GetScreenPixmapProcPtr GetScreenPixmap;
+ SetScreenPixmapProcPtr SetScreenPixmap;
+
+ PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
+
+ unsigned int totalPixmapSize;
+
+ MarkWindowProcPtr MarkWindow;
+ MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
+ ConfigNotifyProcPtr ConfigNotify;
+ MoveWindowProcPtr MoveWindow;
+ ResizeWindowProcPtr ResizeWindow;
+ GetLayerWindowProcPtr GetLayerWindow;
+ HandleExposuresProcPtr HandleExposures;
+ ReparentWindowProcPtr ReparentWindow;
+
+ SetShapeProcPtr SetShape;
+
+ ChangeBorderWidthProcPtr ChangeBorderWidth;
+ MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
+
+ /* Device cursor procedures */
+ DeviceCursorInitializeProcPtr DeviceCursorInitialize;
+ DeviceCursorCleanupProcPtr DeviceCursorCleanup;
+
+ /* set it in driver side if X server can copy the framebuffer content.
+ * Meant to be used together with '-background none' option, avoiding
+ * malicious users to steal framebuffer's content if that would be the
+ * default */
+ Bool canDoBGNoneRoot;
+} ScreenRec;
+
+static inline RegionPtr BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix) {
+ return (*(_pScreen)->BitmapToRegion)(pPix); /* no mi version?! */
+}
+
+typedef struct _ScreenInfo {
+ int imageByteOrder;
+ int bitmapScanlineUnit;
+ int bitmapScanlinePad;
+ int bitmapBitOrder;
+ int numPixmapFormats;
+ PixmapFormatRec
+ formats[MAXFORMATS];
+ int numScreens;
+ ScreenPtr screens[MAXSCREENS];
+} ScreenInfo;
+
+extern _X_EXPORT ScreenInfo screenInfo;
+
+extern _X_EXPORT void InitOutput(
+ ScreenInfo * /*pScreenInfo*/,
+ int /*argc*/,
+ char ** /*argv*/);
+
+#endif /* SCREENINTSTRUCT_H */
diff --git a/xorg-server/include/servermd.h b/xorg-server/include/servermd.h
index b5ae6ac71..99e89a5c4 100644
--- a/xorg-server/include/servermd.h
+++ b/xorg-server/include/servermd.h
@@ -290,6 +290,12 @@ SOFTWARE.
#define GLYPHPADBYTES 4
#endif /* linux/s390 */
+#ifdef WIN32
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+#endif
+
/* size of buffer to use with GetImage, measured in bytes. There's obviously
* a trade-off between the amount of heap used and the number of times the
* ddx routine has to be called.
diff --git a/xorg-server/include/site.h b/xorg-server/include/site.h
index 07d7db543..dc8f7e20c 100644
--- a/xorg-server/include/site.h
+++ b/xorg-server/include/site.h
@@ -52,7 +52,7 @@ SOFTWARE.
* server executable.
*/
#ifndef VENDOR_STRING
-#define VENDOR_STRING "The X.Org Foundation"
+#define VENDOR_STRING "HC-Consult"
#endif
/*
@@ -61,7 +61,7 @@ SOFTWARE.
* by the vendor.
*/
#ifndef VENDOR_RELEASE
-#define VENDOR_RELEASE 6600
+#define VENDOR_RELEASE XORG_VERSION_CURRENT
#endif
/*
diff --git a/xorg-server/include/version-config.h b/xorg-server/include/version-config.h
new file mode 100644
index 000000000..b8d482ce8
--- /dev/null
+++ b/xorg-server/include/version-config.h
@@ -0,0 +1,16 @@
+/* version-config.h.in: not generated */
+
+#ifndef VERSION_CONFIG_H
+#define VERSION_CONFIG_H
+
+/* Vendor man version */
+#undef VENDOR_MAN_VERSION
+
+/* Vendor name */
+#define VENDOR_NAME "HC-Consult"
+
+/* Vendor release */
+#define VENDOR_RELEASE XORG_VERSION_CURRENT
+
+#endif /* VERSION_CONFIG_H */
+
diff --git a/xorg-server/include/windowstr.h b/xorg-server/include/windowstr.h
index e967223b4..19d8b597e 100644
--- a/xorg-server/include/windowstr.h
+++ b/xorg-server/include/windowstr.h
@@ -141,7 +141,7 @@ typedef struct _Window {
RegionRec borderSize;
DDXPointRec origin; /* position relative to parent */
unsigned short borderWidth;
- unsigned short deliverableEvents; /* all masks from all clients */
+ unsigned long deliverableEvents; /* all masks from all clients */
Mask eventMask; /* mask from the creating client */
PixUnion background;
PixUnion border;
diff --git a/xorg-server/include/xkb-config.h b/xorg-server/include/xkb-config.h
new file mode 100644
index 000000000..9f7dac59e
--- /dev/null
+++ b/xorg-server/include/xkb-config.h
@@ -0,0 +1,36 @@
+/* include/xkb-config.h. Generated from xkb-config.h.in by configure. */
+/* xkb-config.h.in: not at all generated. -*- c -*-
+ *
+ */
+
+#ifndef _XKB_CONFIG_H_
+#define _XKB_CONFIG_H_
+
+/* Default set of XKB rules. */
+#define XKB_DFLT_RULES "xorg"
+
+/* Default XKB model. */
+#define XKB_DFLT_MODEL "pc104"
+
+/* Default XKB layout. */
+#define XKB_DFLT_LAYOUT "us"
+
+/* Default XKB variant. */
+#define XKB_DFLT_VARIANT ""
+
+/* Default XKB options. */
+#define XKB_DFLT_OPTIONS ""
+
+/* Path to XKB definitions. */
+#define XKB_BASE_DIRECTORY "xkbdata"
+
+/* Path to xkbcomp. */
+#define XKB_BIN_DIRECTORY "."
+
+/* XKB output dir for compiled keymaps. */
+#define XKM_OUTPUT_DIR "xkbdata/compiled/"
+
+/* Do not have `strcasecmp'. */
+/* #undef NEED_STRCASECMP */
+
+#endif /* _XKB_CONFIG_H_ */
diff --git a/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h
index c6f86f544..9f7945e22 100644
--- a/xorg-server/include/xkbsrv.h
+++ b/xorg-server/include/xkbsrv.h
@@ -1,987 +1,987 @@
-/************************************************************
-Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
-of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
-of this software for any purpose. It is provided "as is"
-without any express or implied warranty.
-
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifndef _XKBSRV_H_
-#define _XKBSRV_H_
-
-#define XkbAllocClientMap SrvXkbAllocClientMap
-#define XkbAllocServerMap SrvXkbAllocServerMap
-#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
-#define XkbCopyKeyTypes SrvXkbCopyKeyTypes
-#define XkbFreeClientMap SrvXkbFreeClientMap
-#define XkbFreeServerMap SrvXkbFreeServerMap
-#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
-#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
-#define XkbResizeKeyActions SrvXkbResizeKeyActions
-#define XkbResizeKeySyms SrvXkbResizeKeySyms
-#define XkbResizeKeyType SrvXkbResizeKeyType
-#define XkbAllocCompatMap SrvXkbAllocCompatMap
-#define XkbAllocControls SrvXkbAllocControls
-#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
-#define XkbAllocKeyboard SrvXkbAllocKeyboard
-#define XkbAllocNames SrvXkbAllocNames
-#define XkbFreeCompatMap SrvXkbFreeCompatMap
-#define XkbFreeKeyboard SrvXkbFreeKeyboard
-#define XkbFreeNames SrvXkbFreeNames
-#define XkbLatchModifiers SrvXkbLatchModifiers
-#define XkbLatchGroup SrvXkbLatchGroup
-#define XkbVirtualModsToReal SrvXkbVirtualModsToReal
-#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
-#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
-
-#include <X11/extensions/XKBproto.h>
-#include "xkbstr.h"
-#include "xkbrules.h"
-#include "inputstr.h"
-#include "events.h"
-
-typedef struct _XkbInterest {
- DeviceIntPtr dev;
- ClientPtr client;
- XID resource;
- struct _XkbInterest * next;
- CARD16 extDevNotifyMask;
- CARD16 stateNotifyMask;
- CARD16 namesNotifyMask;
- CARD32 ctrlsNotifyMask;
- CARD8 compatNotifyMask;
- BOOL bellNotifyMask;
- BOOL actionMessageMask;
- CARD16 accessXNotifyMask;
- CARD32 iStateNotifyMask;
- CARD32 iMapNotifyMask;
- CARD16 altSymsNotifyMask;
- CARD32 autoCtrls;
- CARD32 autoCtrlValues;
-} XkbInterestRec,*XkbInterestPtr;
-
-typedef struct _XkbRadioGroup {
- CARD8 flags;
- CARD8 nMembers;
- CARD8 dfltDown;
- CARD8 currentDown;
- CARD8 members[XkbRGMaxMembers];
-} XkbRadioGroupRec, *XkbRadioGroupPtr;
-
-typedef struct _XkbEventCause {
- CARD8 kc;
- CARD8 event;
- CARD8 mjr;
- CARD8 mnr;
- ClientPtr client;
-} XkbEventCauseRec,*XkbEventCausePtr;
-#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
- (c)->mjr= (c)->mnr= 0; \
- (c)->client= NULL; }
-#define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
- (c)->mjr= (j),(c)->mnr= (n);\
- (c)->client= (cl); }
-#define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
-#define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
-#define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
-
-#define _OFF_TIMER 0
-#define _KRG_WARN_TIMER 1
-#define _KRG_TIMER 2
-#define _SK_TIMEOUT_TIMER 3
-#define _ALL_TIMEOUT_TIMER 4
-
-#define _BEEP_NONE 0
-#define _BEEP_FEATURE_ON 1
-#define _BEEP_FEATURE_OFF 2
-#define _BEEP_FEATURE_CHANGE 3
-#define _BEEP_SLOW_WARN 4
-#define _BEEP_SLOW_PRESS 5
-#define _BEEP_SLOW_ACCEPT 6
-#define _BEEP_SLOW_REJECT 7
-#define _BEEP_SLOW_RELEASE 8
-#define _BEEP_STICKY_LATCH 9
-#define _BEEP_STICKY_LOCK 10
-#define _BEEP_STICKY_UNLOCK 11
-#define _BEEP_LED_ON 12
-#define _BEEP_LED_OFF 13
-#define _BEEP_LED_CHANGE 14
-#define _BEEP_BOUNCE_REJECT 15
-
-typedef struct _XkbFilter {
- CARD16 keycode;
- CARD8 what;
- CARD8 active;
- CARD8 filterOthers;
- CARD32 priv;
- XkbAction upAction;
- int (*filter)(
- struct _XkbSrvInfo* /* xkbi */,
- struct _XkbFilter * /* filter */,
- unsigned /* keycode */,
- XkbAction * /* action */
- );
- struct _XkbFilter *next;
-} XkbFilterRec,*XkbFilterPtr;
-
-typedef struct _XkbSrvInfo {
- XkbStateRec prev_state;
- XkbStateRec state;
- XkbDescPtr desc;
-
- DeviceIntPtr device;
- KbdCtrlProcPtr kbdProc;
-
- XkbRadioGroupPtr radioGroups;
- CARD8 nRadioGroups;
- CARD8 clearMods;
- CARD8 setMods;
- INT16 groupChange;
-
- CARD16 dfltPtrDelta;
-
- double mouseKeysCurve;
- double mouseKeysCurveFactor;
- INT16 mouseKeysDX;
- INT16 mouseKeysDY;
- CARD8 mouseKeysFlags;
- Bool mouseKeysAccel;
- CARD8 mouseKeysCounter;
-
- CARD8 lockedPtrButtons;
- CARD8 shiftKeyCount;
- KeyCode mouseKey;
- KeyCode inactiveKey;
- KeyCode slowKey;
- KeyCode repeatKey;
- CARD8 krgTimerActive;
- CARD8 beepType;
- CARD8 beepCount;
-
- CARD32 flags;
- CARD32 lastPtrEventTime;
- CARD32 lastShiftEventTime;
- OsTimerPtr beepTimer;
- OsTimerPtr mouseKeyTimer;
- OsTimerPtr slowKeysTimer;
- OsTimerPtr bounceKeysTimer;
- OsTimerPtr repeatKeyTimer;
- OsTimerPtr krgTimer;
-
- int szFilters;
- XkbFilterPtr filters;
-} XkbSrvInfoRec, *XkbSrvInfoPtr;
-
-#define XkbSLI_IsDefault (1L<<0)
-#define XkbSLI_HasOwnState (1L<<1)
-
-typedef struct _XkbSrvLedInfo {
- CARD16 flags;
- CARD16 class;
- CARD16 id;
- union {
- KbdFeedbackPtr kf;
- LedFeedbackPtr lf;
- } fb;
-
- CARD32 physIndicators;
- CARD32 autoState;
- CARD32 explicitState;
- CARD32 effectiveState;
-
- CARD32 mapsPresent;
- CARD32 namesPresent;
- XkbIndicatorMapPtr maps;
- Atom * names;
-
- CARD32 usesBase;
- CARD32 usesLatched;
- CARD32 usesLocked;
- CARD32 usesEffective;
- CARD32 usesCompat;
- CARD32 usesControls;
-
- CARD32 usedComponents;
-} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
-
-/*
- * Settings for xkbClientFlags field (used by DIX)
- * These flags _must_ not overlap with XkbPCF_*
- */
-#define _XkbClientInitialized (1<<15)
-
-#define _XkbWantsDetectableAutoRepeat(c)\
- ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
-
-/*
- * Settings for flags field
- */
-#define _XkbStateNotifyInProgress (1<<0)
-
-typedef struct
-{
- ProcessInputProc processInputProc;
- /* If processInputProc is set to something different than realInputProc,
- * UNWRAP and COND_WRAP will not touch processInputProc and update only
- * realInputProc. This ensures that
- * processInputProc == (frozen ? EnqueueEvent : realInputProc)
- *
- * WRAP_PROCESS_INPUT_PROC should only be called during initialization,
- * since it may destroy this invariant.
- */
- ProcessInputProc realInputProc;
- DeviceUnwrapProc unwrapProc;
-} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
-
-#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
- device->public.processInputProc = proc; \
- oldprocs->processInputProc = \
- oldprocs->realInputProc = device->public.realInputProc; \
- device->public.realInputProc = proc; \
- oldprocs->unwrapProc = device->unwrapProc; \
- device->unwrapProc = unwrapproc;
-
-#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
- if (device->public.processInputProc == device->public.realInputProc)\
- device->public.processInputProc = proc; \
- oldprocs->processInputProc = \
- oldprocs->realInputProc = device->public.realInputProc; \
- device->public.realInputProc = proc; \
- oldprocs->unwrapProc = device->unwrapProc; \
- device->unwrapProc = unwrapproc;
-
-#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \
- backupproc = device->public.realInputProc; \
- if (device->public.processInputProc == device->public.realInputProc)\
- device->public.processInputProc = oldprocs->realInputProc; \
- device->public.realInputProc = oldprocs->realInputProc; \
- device->unwrapProc = oldprocs->unwrapProc;
-
-extern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec;
-#define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec)
-
-#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
-
-extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
-
-/***====================================================================***/
-
-
-/***====================================================================***/
-
-#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
-#define XkbAllFilteredEventsMask \
- (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
-
-/***====================================================================***/
-
-extern _X_EXPORT int XkbReqCode;
-extern _X_EXPORT int XkbEventBase;
-extern _X_EXPORT int XkbKeyboardErrorCode;
-extern _X_EXPORT char * XkbBaseDirectory;
-extern _X_EXPORT char * XkbBinDirectory;
-
-extern _X_EXPORT CARD32 xkbDebugFlags;
-
-#define _XkbLibError(c,l,d) /* Epoch fail */
-#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
-#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
-#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
-
-extern _X_EXPORT int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
-extern _X_EXPORT int DeviceButtonPress,DeviceButtonRelease;
-
-#define Status int
-
-extern _X_EXPORT void XkbUseMsg(
- void
-);
-
-extern _X_EXPORT int XkbProcessArguments(
- int /* argc */,
- char ** /* argv */,
- int /* i */
-);
-
-extern _X_EXPORT Bool XkbInitPrivates(void);
-
-extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
-
-extern _X_EXPORT void XkbFreeCompatMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT void XkbFreeNames(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT int _XkbLookupAnyDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupKeyboard(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupBellDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupLedDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupButtonDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT XkbDescPtr XkbAllocKeyboard(
- void
-);
-
-extern _X_EXPORT Status XkbAllocClientMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nTypes */
-);
-
-extern _X_EXPORT Status XkbAllocServerMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nNewActions */
-);
-
-extern _X_EXPORT void XkbFreeClientMap(
- XkbDescPtr /* xkb */,
- unsigned int /* what */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT void XkbFreeServerMap(
- XkbDescPtr /* xkb */,
- unsigned int /* what */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT Status XkbAllocIndicatorMaps(
- XkbDescPtr /* xkb */
-);
-
-extern _X_EXPORT Status XkbAllocCompatMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nInterpret */
-);
-
-extern _X_EXPORT Status XkbAllocNames(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- int /* nTotalRG */,
- int /* nTotalAliases */
-);
-
-extern _X_EXPORT Status XkbAllocControls(
- XkbDescPtr /* xkb */,
- unsigned int /* which*/
-);
-
-extern _X_EXPORT Status XkbCopyKeyTypes(
- XkbKeyTypePtr /* from */,
- XkbKeyTypePtr /* into */,
- int /* num_types */
-);
-
-extern _X_EXPORT Status XkbResizeKeyType(
- XkbDescPtr /* xkb */,
- int /* type_ndx */,
- int /* map_count */,
- Bool /* want_preserve */,
- int /* new_num_lvls */
-);
-
-extern _X_EXPORT void XkbFreeKeyboard(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeDesc */
-);
-
-extern _X_EXPORT void XkbFreeComponentNames(
- XkbComponentNamesPtr /* names */,
- Bool /* freeNames */
-);
-
-extern _X_EXPORT void XkbSetActionKeyMods(
- XkbDescPtr /* xkb */,
- XkbAction * /* act */,
- unsigned int /* mods */
-);
-
-extern _X_EXPORT unsigned int XkbMaskForVMask(
- XkbDescPtr /* xkb */,
- unsigned int /* vmask */
-);
-
-extern _X_EXPORT Bool XkbVirtualModsToReal(
- XkbDescPtr /* xkb */,
- unsigned int /* virtua_mask */,
- unsigned int * /* mask_rtrn */
-);
-
-extern _X_EXPORT unsigned int XkbAdjustGroup(
- int /* group */,
- XkbControlsPtr /* ctrls */
-);
-
-extern _X_EXPORT KeySym *XkbResizeKeySyms(
- XkbDescPtr /* xkb */,
- int /* key */,
- int /* needed */
-);
-
-extern _X_EXPORT XkbAction *XkbResizeKeyActions(
- XkbDescPtr /* xkb */,
- int /* key */,
- int /* needed */
-);
-
-extern _X_EXPORT void XkbUpdateKeyTypesFromCore(
- DeviceIntPtr /* pXDev */,
- KeySymsPtr /* syms */,
- KeyCode /* first */,
- CARD8 /* num */,
- XkbChangesPtr /* pChanges */
-);
-
-extern _X_EXPORT void XkbUpdateDescActions(
- XkbDescPtr /* xkb */,
- KeyCode /* first */,
- CARD8 /* num */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT void XkbUpdateActions(
- DeviceIntPtr /* pXDev */,
- KeyCode /* first */,
- CARD8 /* num */,
- XkbChangesPtr /* pChanges */,
- unsigned int * /* needChecksRtrn */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT KeySymsPtr XkbGetCoreMap(
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT void XkbApplyMappingChange(
- DeviceIntPtr /* pXDev */,
- KeySymsPtr /* map */,
- KeyCode /* firstKey */,
- CARD8 /* num */,
- CARD8 * /* modmap */,
- ClientPtr /* client */
-);
-
-extern _X_EXPORT void XkbSetIndicators(
- DeviceIntPtr /* pXDev */,
- CARD32 /* affect */,
- CARD32 /* values */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbUpdateIndicators(
- DeviceIntPtr /* keybd */,
- CARD32 /* changed */,
- Bool /* check_edevs */,
- XkbChangesPtr /* pChanges */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
- DeviceIntPtr /* dev */,
- KbdFeedbackPtr /* kf */,
- LedFeedbackPtr /* lf */,
- unsigned int /* needed_parts */
-);
-
-extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* src */,
- KbdFeedbackPtr /* kf */,
- LedFeedbackPtr /* lf */
-);
-
-
-extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(
- DeviceIntPtr /* dev */,
- unsigned int /* class */,
- unsigned int /* id */,
- unsigned int /* needed_parts */
-);
-
-extern _X_EXPORT void XkbApplyLedNameChanges(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* changed_names */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbApplyLedMapChanges(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* changed_maps */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbApplyLedStateChanges(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* changed_leds */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbFlushLedEvents(
- DeviceIntPtr /* dev */,
- DeviceIntPtr /* kbd */,
- XkbSrvLedInfoPtr /* sli */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT unsigned int XkbIndicatorsToUpdate(
- DeviceIntPtr /* dev */,
- unsigned long /* state_changes */,
- Bool /* enabled_ctrl_changes */
-);
-
-extern _X_EXPORT void XkbComputeDerivedState(
- XkbSrvInfoPtr /* xkbi */
-);
-
-extern _X_EXPORT void XkbCheckSecondaryEffects(
- XkbSrvInfoPtr /* xkbi */,
- unsigned int /* which */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbCheckIndicatorMaps(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* which */
-);
-
-extern _X_EXPORT unsigned int XkbStateChangedFlags(
- XkbStatePtr /* old */,
- XkbStatePtr /* new */
-);
-
-extern _X_EXPORT void XkbSendStateNotify(
- DeviceIntPtr /* kbd */,
- xkbStateNotify * /* pSN */
-);
-
-extern _X_EXPORT void XkbSendMapNotify(
- DeviceIntPtr /* kbd */,
- xkbMapNotify * /* ev */
-);
-
-extern _X_EXPORT int XkbComputeControlsNotify(
- DeviceIntPtr /* kbd */,
- XkbControlsPtr /* old */,
- XkbControlsPtr /* new */,
- xkbControlsNotify * /* pCN */,
- Bool /* forceCtrlProc */
-);
-
-extern _X_EXPORT void XkbSendControlsNotify(
- DeviceIntPtr /* kbd */,
- xkbControlsNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbSendCompatMapNotify(
- DeviceIntPtr /* kbd */,
- xkbCompatMapNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbHandleBell(
- BOOL /* force */,
- BOOL /* eventOnly */,
- DeviceIntPtr /* kbd */,
- CARD8 /* percent */,
- pointer /* ctrl */,
- CARD8 /* class */,
- Atom /* name */,
- WindowPtr /* pWin */,
- ClientPtr /* pClient */
-);
-
-extern _X_EXPORT void XkbSendAccessXNotify(
- DeviceIntPtr /* kbd */,
- xkbAccessXNotify * /* pEv */
-);
-
-extern _X_EXPORT void XkbSendNamesNotify(
- DeviceIntPtr /* kbd */,
- xkbNamesNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbSendActionMessage(
- DeviceIntPtr /* kbd */,
- xkbActionMessage * /* ev */
-);
-
-extern _X_EXPORT void XkbSendExtensionDeviceNotify(
- DeviceIntPtr /* kbd */,
- ClientPtr /* client */,
- xkbExtensionDeviceNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbSendNotification(
- DeviceIntPtr /* kbd */,
- XkbChangesPtr /* pChanges */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbProcessKeyboardEvent(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT void XkbHandleActions(
- DeviceIntPtr /* dev */,
- DeviceIntPtr /* kbd */,
- DeviceEvent* /* event */
-);
-
-extern _X_EXPORT Bool XkbEnableDisableControls(
- XkbSrvInfoPtr /* xkbi */,
- unsigned long /* change */,
- unsigned long /* newValues */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void AccessXInit(
- DeviceIntPtr /* dev */
-);
-
-extern _X_EXPORT Bool AccessXFilterPressEvent(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT Bool AccessXFilterReleaseEvent(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT void AccessXCancelRepeatKey(
- XkbSrvInfoPtr /* xkbi */,
- KeyCode /* key */
-);
-
-extern _X_EXPORT void AccessXComputeCurveFactor(
- XkbSrvInfoPtr /* xkbi */,
- XkbControlsPtr /* ctrls */
-);
-
-extern _X_EXPORT XkbInterestPtr XkbFindClientResource(
- DevicePtr /* inDev */,
- ClientPtr /* client */
-);
-
-extern _X_EXPORT XkbInterestPtr XkbAddClientResource(
- DevicePtr /* inDev */,
- ClientPtr /* client */,
- XID /* id */
-);
-
-extern _X_EXPORT int XkbRemoveResourceClient(
- DevicePtr /* inDev */,
- XID /* id */
-);
-
-extern _X_EXPORT int XkbDDXAccessXBeep(
- DeviceIntPtr /* dev */,
- unsigned int /* what */,
- unsigned int /* which */
-);
-
-extern _X_EXPORT int XkbDDXUsesSoftRepeat(
- DeviceIntPtr /* dev */
-);
-
-extern _X_EXPORT void XkbDDXKeybdCtrlProc(
- DeviceIntPtr /* dev */,
- KeybdCtrl * /* ctrl */
-);
-
-extern _X_EXPORT void XkbDDXChangeControls(
- DeviceIntPtr /* dev */,
- XkbControlsPtr /* old */,
- XkbControlsPtr /* new */
-);
-
-extern _X_EXPORT void XkbDDXUpdateDeviceIndicators(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- CARD32 /* newState */
-);
-
-extern _X_EXPORT int XkbDDXTerminateServer(
- DeviceIntPtr /* dev */,
- KeyCode /* key */,
- XkbAction * /* act */
-);
-
-extern _X_EXPORT int XkbDDXSwitchScreen(
- DeviceIntPtr /* dev */,
- KeyCode /* key */,
- XkbAction * /* act */
-);
-
-extern _X_EXPORT int XkbDDXPrivate(
- DeviceIntPtr /* dev */,
- KeyCode /* key */,
- XkbAction * /* act */
-);
-
-extern _X_EXPORT void XkbDisableComputedAutoRepeats(
- DeviceIntPtr /* pXDev */,
- unsigned int /* key */
-);
-
-extern _X_EXPORT void XkbSetRepeatKeys(
- DeviceIntPtr /* pXDev */,
- int /* key */,
- int /* onoff */
-);
-
-extern _X_EXPORT int XkbLatchModifiers(
- DeviceIntPtr /* pXDev */,
- CARD8 /* mask */,
- CARD8 /* latches */
-);
-
-extern _X_EXPORT int XkbLatchGroup(
- DeviceIntPtr /* pXDev */,
- int /* group */
-);
-
-extern _X_EXPORT void XkbClearAllLatchesAndLocks(
- DeviceIntPtr /* dev */,
- XkbSrvInfoPtr /* xkbi */,
- Bool /* genEv */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbGetRulesDflts(
- XkbRMLVOSet * /* rmlvo */
-);
-
-extern _X_EXPORT void XkbFreeRMLVOSet(
- XkbRMLVOSet * /* rmlvo */,
- Bool /* freeRMLVO */
-);
-
-extern _X_EXPORT void XkbSetRulesDflts(
- XkbRMLVOSet * /* rmlvo */
-);
-
-extern _X_EXPORT void XkbDeleteRulesDflts(
- void
-);
-
-extern _X_EXPORT int SProcXkbDispatch(
- ClientPtr /* client */
-);
-
-extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(
- DeviceIntPtr /* dev */,
- Atom /* name */,
- Bool * /* shouldFree */
-);
-
-extern _X_EXPORT void XkbConvertCase(
- KeySym /* sym */,
- KeySym * /* lower */,
- KeySym * /* upper */
-);
-
-extern _X_EXPORT Status XkbChangeKeycodeRange(
- XkbDescPtr /* xkb */,
- int /* minKC */,
- int /* maxKC */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT void XkbFreeSrvLedInfo(
- XkbSrvLedInfoPtr /* sli */
-);
-
-extern _X_EXPORT void XkbFreeInfo(
- XkbSrvInfoPtr /* xkbi */
-);
-
-extern _X_EXPORT Status XkbChangeTypesOfKey(
- XkbDescPtr /* xkb */,
- int /* key */,
- int /* nGroups */,
- unsigned int /* groups */,
- int * /* newTypesIn */,
- XkbMapChangesPtr /* changes */
-);
-
-extern _X_EXPORT int XkbKeyTypesForCoreSymbols(
- XkbDescPtr /* xkb */,
- int /* map_width */,
- KeySym * /* core_syms */,
- unsigned int /* protected */,
- int * /* types_inout */,
- KeySym * /* xkb_syms_rtrn */
-);
-
-extern _X_EXPORT Bool XkbApplyCompatMapToKey(
- XkbDescPtr /* xkb */,
- KeyCode /* key */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT Bool XkbApplyVirtualModChanges(
- XkbDescPtr /* xkb */,
- unsigned int /* changed */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT void XkbSendNewKeyboardNotify(
- DeviceIntPtr /* kbd */,
- xkbNewKeyboardNotify * /* pNKN */
-);
-
-extern Bool XkbCopyKeymap(
- XkbDescPtr /* dst */,
- XkbDescPtr /* src */);
-
-extern _X_EXPORT Bool XkbCopyDeviceKeymap(
- DeviceIntPtr /* dst */,
- DeviceIntPtr /* src */);
-
-extern void XkbFilterEvents(
- ClientPtr /* pClient */,
- int /* nEvents */,
- xEvent* /* xE */);
-
-extern int XkbGetEffectiveGroup(
- XkbSrvInfoPtr /* xkbi */,
- XkbStatePtr /* xkbstate */,
- CARD8 /* keycode */);
-
-extern void XkbMergeLockedPtrBtns(
- DeviceIntPtr /* master */);
-
-extern void XkbFakeDeviceButton(
- DeviceIntPtr /* dev */,
- int /* press */,
- int /* button */);
-
-
-#include "xkbfile.h"
-#include "xkbrules.h"
-
-#define _XkbListKeycodes 0
-#define _XkbListTypes 1
-#define _XkbListCompat 2
-#define _XkbListSymbols 3
-#define _XkbListGeometry 4
-#define _XkbListNumComponents 5
-
-typedef struct _XkbSrvListInfo {
- int szPool;
- int nPool;
- char * pool;
-
- int maxRtrn;
- int nTotal;
-
- char * pattern[_XkbListNumComponents];
- int nFound[_XkbListNumComponents];
-} XkbSrvListInfoRec,*XkbSrvListInfoPtr;
-
-extern _X_EXPORT Status XkbDDXList(
- DeviceIntPtr /* dev */,
- XkbSrvListInfoPtr /* listing */,
- ClientPtr /* client */
-);
-
-extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(
- DeviceIntPtr /* keybd */,
- XkbComponentNamesPtr /* names */,
- unsigned int /* want */,
- unsigned int /* need */,
- XkbDescPtr * /* finfoRtrn */,
- char * /* keymapNameRtrn */,
- int /* keymapNameRtrnLen */
-);
-
-extern _X_EXPORT Bool XkbDDXNamesFromRules(
- DeviceIntPtr /* keybd */,
- char * /* rules */,
- XkbRF_VarDefsPtr /* defs */,
- XkbComponentNamesPtr /* names */
-);
-
-extern _X_EXPORT XkbDescPtr XkbCompileKeymap(
- DeviceIntPtr /* dev */,
- XkbRMLVOSet * /* rmlvo */
-);
-
-#endif /* _XKBSRV_H_ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBSRV_H_
+#define _XKBSRV_H_
+
+#define XkbAllocClientMap SrvXkbAllocClientMap
+#define XkbAllocServerMap SrvXkbAllocServerMap
+#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
+#define XkbCopyKeyTypes SrvXkbCopyKeyTypes
+#define XkbFreeClientMap SrvXkbFreeClientMap
+#define XkbFreeServerMap SrvXkbFreeServerMap
+#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
+#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
+#define XkbResizeKeyActions SrvXkbResizeKeyActions
+#define XkbResizeKeySyms SrvXkbResizeKeySyms
+#define XkbResizeKeyType SrvXkbResizeKeyType
+#define XkbAllocCompatMap SrvXkbAllocCompatMap
+#define XkbAllocControls SrvXkbAllocControls
+#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
+#define XkbAllocKeyboard SrvXkbAllocKeyboard
+#define XkbAllocNames SrvXkbAllocNames
+#define XkbFreeCompatMap SrvXkbFreeCompatMap
+#define XkbFreeKeyboard SrvXkbFreeKeyboard
+#define XkbFreeNames SrvXkbFreeNames
+#define XkbLatchModifiers SrvXkbLatchModifiers
+#define XkbLatchGroup SrvXkbLatchGroup
+#define XkbVirtualModsToReal SrvXkbVirtualModsToReal
+#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
+#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
+
+#include <X11/extensions/XKBproto.h>
+#include "xkbstr.h"
+#include "xkbrules.h"
+#include "inputstr.h"
+#include "events.h"
+
+typedef struct _XkbInterest {
+ DeviceIntPtr dev;
+ ClientPtr client;
+ XID resource;
+ struct _XkbInterest * next;
+ CARD16 extDevNotifyMask;
+ CARD16 stateNotifyMask;
+ CARD16 namesNotifyMask;
+ CARD32 ctrlsNotifyMask;
+ CARD8 compatNotifyMask;
+ BOOL bellNotifyMask;
+ BOOL actionMessageMask;
+ CARD16 accessXNotifyMask;
+ CARD32 iStateNotifyMask;
+ CARD32 iMapNotifyMask;
+ CARD16 altSymsNotifyMask;
+ CARD32 autoCtrls;
+ CARD32 autoCtrlValues;
+} XkbInterestRec,*XkbInterestPtr;
+
+typedef struct _XkbRadioGroup {
+ CARD8 flags;
+ CARD8 nMembers;
+ CARD8 dfltDown;
+ CARD8 currentDown;
+ CARD8 members[XkbRGMaxMembers];
+} XkbRadioGroupRec, *XkbRadioGroupPtr;
+
+typedef struct _XkbEventCause {
+ CARD8 kc;
+ CARD8 event;
+ CARD8 mjr;
+ CARD8 mnr;
+ ClientPtr client;
+} XkbEventCauseRec,*XkbEventCausePtr;
+#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
+ (c)->mjr= (c)->mnr= 0; \
+ (c)->client= NULL; }
+#define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
+ (c)->mjr= (j),(c)->mnr= (n);\
+ (c)->client= (cl); }
+#define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
+#define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
+#define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
+
+#define _OFF_TIMER 0
+#define _KRG_WARN_TIMER 1
+#define _KRG_TIMER 2
+#define _SK_TIMEOUT_TIMER 3
+#define _ALL_TIMEOUT_TIMER 4
+
+#define _BEEP_NONE 0
+#define _BEEP_FEATURE_ON 1
+#define _BEEP_FEATURE_OFF 2
+#define _BEEP_FEATURE_CHANGE 3
+#define _BEEP_SLOW_WARN 4
+#define _BEEP_SLOW_PRESS 5
+#define _BEEP_SLOW_ACCEPT 6
+#define _BEEP_SLOW_REJECT 7
+#define _BEEP_SLOW_RELEASE 8
+#define _BEEP_STICKY_LATCH 9
+#define _BEEP_STICKY_LOCK 10
+#define _BEEP_STICKY_UNLOCK 11
+#define _BEEP_LED_ON 12
+#define _BEEP_LED_OFF 13
+#define _BEEP_LED_CHANGE 14
+#define _BEEP_BOUNCE_REJECT 15
+
+typedef struct _XkbFilter {
+ CARD16 keycode;
+ CARD8 what;
+ CARD8 active;
+ CARD8 filterOthers;
+ CARD32 priv;
+ XkbAction upAction;
+ int (*filter)(
+ struct _XkbSrvInfo* /* xkbi */,
+ struct _XkbFilter * /* filter */,
+ unsigned /* keycode */,
+ XkbAction * /* action */
+ );
+ struct _XkbFilter *next;
+} XkbFilterRec,*XkbFilterPtr;
+
+typedef struct _XkbSrvInfo {
+ XkbStateRec prev_state;
+ XkbStateRec state;
+ XkbDescPtr desc;
+
+ DeviceIntPtr device;
+ KbdCtrlProcPtr kbdProc;
+
+ XkbRadioGroupPtr radioGroups;
+ CARD8 nRadioGroups;
+ CARD8 clearMods;
+ CARD8 setMods;
+ INT16 groupChange;
+
+ CARD16 dfltPtrDelta;
+
+ double mouseKeysCurve;
+ double mouseKeysCurveFactor;
+ INT16 mouseKeysDX;
+ INT16 mouseKeysDY;
+ CARD8 mouseKeysFlags;
+ Bool mouseKeysAccel;
+ CARD8 mouseKeysCounter;
+
+ CARD8 lockedPtrButtons;
+ CARD8 shiftKeyCount;
+ KeyCode mouseKey;
+ KeyCode inactiveKey;
+ KeyCode slowKey;
+ KeyCode repeatKey;
+ CARD8 krgTimerActive;
+ CARD8 beepType;
+ CARD8 beepCount;
+
+ CARD32 flags;
+ CARD32 lastPtrEventTime;
+ CARD32 lastShiftEventTime;
+ OsTimerPtr beepTimer;
+ OsTimerPtr mouseKeyTimer;
+ OsTimerPtr slowKeysTimer;
+ OsTimerPtr bounceKeysTimer;
+ OsTimerPtr repeatKeyTimer;
+ OsTimerPtr krgTimer;
+
+ int szFilters;
+ XkbFilterPtr filters;
+} XkbSrvInfoRec, *XkbSrvInfoPtr;
+
+#define XkbSLI_IsDefault (1L<<0)
+#define XkbSLI_HasOwnState (1L<<1)
+
+typedef struct _XkbSrvLedInfo {
+ CARD16 flags;
+ CARD16 class;
+ CARD16 id;
+ union {
+ KbdFeedbackPtr kf;
+ LedFeedbackPtr lf;
+ } fb;
+
+ CARD32 physIndicators;
+ CARD32 autoState;
+ CARD32 explicitState;
+ CARD32 effectiveState;
+
+ CARD32 mapsPresent;
+ CARD32 namesPresent;
+ XkbIndicatorMapPtr maps;
+ Atom * names;
+
+ CARD32 usesBase;
+ CARD32 usesLatched;
+ CARD32 usesLocked;
+ CARD32 usesEffective;
+ CARD32 usesCompat;
+ CARD32 usesControls;
+
+ CARD32 usedComponents;
+} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
+
+/*
+ * Settings for xkbClientFlags field (used by DIX)
+ * These flags _must_ not overlap with XkbPCF_*
+ */
+#define _XkbClientInitialized (1<<15)
+
+#define _XkbWantsDetectableAutoRepeat(c)\
+ ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
+
+/*
+ * Settings for flags field
+ */
+#define _XkbStateNotifyInProgress (1<<0)
+
+typedef struct
+{
+ ProcessInputProc processInputProc;
+ /* If processInputProc is set to something different than realInputProc,
+ * UNWRAP and COND_WRAP will not touch processInputProc and update only
+ * realInputProc. This ensures that
+ * processInputProc == (frozen ? EnqueueEvent : realInputProc)
+ *
+ * WRAP_PROCESS_INPUT_PROC should only be called during initialization,
+ * since it may destroy this invariant.
+ */
+ ProcessInputProc realInputProc;
+ DeviceUnwrapProc unwrapProc;
+} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
+
+#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ if (device->public.processInputProc == device->public.realInputProc)\
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \
+ backupproc = device->public.realInputProc; \
+ if (device->public.processInputProc == device->public.realInputProc)\
+ device->public.processInputProc = oldprocs->realInputProc; \
+ device->public.realInputProc = oldprocs->realInputProc; \
+ device->unwrapProc = oldprocs->unwrapProc;
+
+extern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec;
+#define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec)
+
+#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
+
+extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
+
+/***====================================================================***/
+
+
+/***====================================================================***/
+
+#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
+#define XkbAllFilteredEventsMask \
+ (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
+
+/***====================================================================***/
+
+extern _X_EXPORT int XkbReqCode;
+extern _X_EXPORT int XkbEventBase;
+extern _X_EXPORT int XkbKeyboardErrorCode;
+extern _X_EXPORT const char * XkbBaseDirectory;
+extern _X_EXPORT const char * XkbBinDirectory;
+
+extern _X_EXPORT CARD32 xkbDebugFlags;
+
+#define _XkbLibError(c,l,d) /* Epoch fail */
+#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
+#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
+#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
+
+extern _X_EXPORT int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
+extern _X_EXPORT int DeviceButtonPress,DeviceButtonRelease;
+
+#define Status int
+
+extern _X_EXPORT void XkbUseMsg(
+ void
+);
+
+extern _X_EXPORT int XkbProcessArguments(
+ int /* argc */,
+ char ** /* argv */,
+ int /* i */
+);
+
+extern _X_EXPORT Bool XkbInitPrivates(void);
+
+extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
+
+extern _X_EXPORT void XkbFreeCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern _X_EXPORT void XkbFreeNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern _X_EXPORT int _XkbLookupAnyDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
+);
+
+extern _X_EXPORT int _XkbLookupKeyboard(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
+);
+
+extern _X_EXPORT int _XkbLookupBellDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
+);
+
+extern _X_EXPORT int _XkbLookupLedDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
+);
+
+extern _X_EXPORT int _XkbLookupButtonDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
+);
+
+extern _X_EXPORT XkbDescPtr XkbAllocKeyboard(
+ void
+);
+
+extern _X_EXPORT Status XkbAllocClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nTypes */
+);
+
+extern _X_EXPORT Status XkbAllocServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nNewActions */
+);
+
+extern _X_EXPORT void XkbFreeClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern _X_EXPORT void XkbFreeServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern _X_EXPORT Status XkbAllocIndicatorMaps(
+ XkbDescPtr /* xkb */
+);
+
+extern _X_EXPORT Status XkbAllocCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nInterpret */
+);
+
+extern _X_EXPORT Status XkbAllocNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* nTotalRG */,
+ int /* nTotalAliases */
+);
+
+extern _X_EXPORT Status XkbAllocControls(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which*/
+);
+
+extern _X_EXPORT Status XkbCopyKeyTypes(
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */,
+ int /* num_types */
+);
+
+extern _X_EXPORT Status XkbResizeKeyType(
+ XkbDescPtr /* xkb */,
+ int /* type_ndx */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* new_num_lvls */
+);
+
+extern _X_EXPORT void XkbFreeKeyboard(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeDesc */
+);
+
+extern _X_EXPORT void XkbFreeComponentNames(
+ XkbComponentNamesPtr /* names */,
+ Bool /* freeNames */
+);
+
+extern _X_EXPORT void XkbSetActionKeyMods(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* act */,
+ unsigned int /* mods */
+);
+
+extern _X_EXPORT unsigned int XkbMaskForVMask(
+ XkbDescPtr /* xkb */,
+ unsigned int /* vmask */
+);
+
+extern _X_EXPORT Bool XkbVirtualModsToReal(
+ XkbDescPtr /* xkb */,
+ unsigned int /* virtua_mask */,
+ unsigned int * /* mask_rtrn */
+);
+
+extern _X_EXPORT unsigned int XkbAdjustGroup(
+ int /* group */,
+ XkbControlsPtr /* ctrls */
+);
+
+extern _X_EXPORT KeySym *XkbResizeKeySyms(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* needed */
+);
+
+extern _X_EXPORT XkbAction *XkbResizeKeyActions(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* needed */
+);
+
+extern _X_EXPORT void XkbUpdateKeyTypesFromCore(
+ DeviceIntPtr /* pXDev */,
+ KeySymsPtr /* syms */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* pChanges */
+);
+
+extern _X_EXPORT void XkbUpdateDescActions(
+ XkbDescPtr /* xkb */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* changes */
+);
+
+extern _X_EXPORT void XkbUpdateActions(
+ DeviceIntPtr /* pXDev */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* pChanges */,
+ unsigned int * /* needChecksRtrn */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT KeySymsPtr XkbGetCoreMap(
+ DeviceIntPtr /* keybd */
+);
+
+extern _X_EXPORT void XkbApplyMappingChange(
+ DeviceIntPtr /* pXDev */,
+ KeySymsPtr /* map */,
+ KeyCode /* firstKey */,
+ CARD8 /* num */,
+ CARD8 * /* modmap */,
+ ClientPtr /* client */
+);
+
+extern _X_EXPORT void XkbSetIndicators(
+ DeviceIntPtr /* pXDev */,
+ CARD32 /* affect */,
+ CARD32 /* values */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbUpdateIndicators(
+ DeviceIntPtr /* keybd */,
+ CARD32 /* changed */,
+ Bool /* check_edevs */,
+ XkbChangesPtr /* pChanges */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
+ DeviceIntPtr /* dev */,
+ KbdFeedbackPtr /* kf */,
+ LedFeedbackPtr /* lf */,
+ unsigned int /* needed_parts */
+);
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* src */,
+ KbdFeedbackPtr /* kf */,
+ LedFeedbackPtr /* lf */
+);
+
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(
+ DeviceIntPtr /* dev */,
+ unsigned int /* class */,
+ unsigned int /* id */,
+ unsigned int /* needed_parts */
+);
+
+extern _X_EXPORT void XkbApplyLedNameChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_names */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbApplyLedMapChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_maps */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbApplyLedStateChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_leds */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbFlushLedEvents(
+ DeviceIntPtr /* dev */,
+ DeviceIntPtr /* kbd */,
+ XkbSrvLedInfoPtr /* sli */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT unsigned int XkbIndicatorsToUpdate(
+ DeviceIntPtr /* dev */,
+ unsigned long /* state_changes */,
+ Bool /* enabled_ctrl_changes */
+);
+
+extern _X_EXPORT void XkbComputeDerivedState(
+ XkbSrvInfoPtr /* xkbi */
+);
+
+extern _X_EXPORT void XkbCheckSecondaryEffects(
+ XkbSrvInfoPtr /* xkbi */,
+ unsigned int /* which */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbCheckIndicatorMaps(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* which */
+);
+
+extern _X_EXPORT unsigned int XkbStateChangedFlags(
+ XkbStatePtr /* old */,
+ XkbStatePtr /* new */
+);
+
+extern _X_EXPORT void XkbSendStateNotify(
+ DeviceIntPtr /* kbd */,
+ xkbStateNotify * /* pSN */
+);
+
+extern _X_EXPORT void XkbSendMapNotify(
+ DeviceIntPtr /* kbd */,
+ xkbMapNotify * /* ev */
+);
+
+extern _X_EXPORT int XkbComputeControlsNotify(
+ DeviceIntPtr /* kbd */,
+ XkbControlsPtr /* old */,
+ XkbControlsPtr /* new */,
+ xkbControlsNotify * /* pCN */,
+ Bool /* forceCtrlProc */
+);
+
+extern _X_EXPORT void XkbSendControlsNotify(
+ DeviceIntPtr /* kbd */,
+ xkbControlsNotify * /* ev */
+);
+
+extern _X_EXPORT void XkbSendCompatMapNotify(
+ DeviceIntPtr /* kbd */,
+ xkbCompatMapNotify * /* ev */
+);
+
+extern _X_EXPORT void XkbHandleBell(
+ BOOL /* force */,
+ BOOL /* eventOnly */,
+ DeviceIntPtr /* kbd */,
+ CARD8 /* percent */,
+ pointer /* ctrl */,
+ CARD8 /* class */,
+ Atom /* name */,
+ WindowPtr /* pWin */,
+ ClientPtr /* pClient */
+);
+
+extern _X_EXPORT void XkbSendAccessXNotify(
+ DeviceIntPtr /* kbd */,
+ xkbAccessXNotify * /* pEv */
+);
+
+extern _X_EXPORT void XkbSendNamesNotify(
+ DeviceIntPtr /* kbd */,
+ xkbNamesNotify * /* ev */
+);
+
+extern _X_EXPORT void XkbSendActionMessage(
+ DeviceIntPtr /* kbd */,
+ xkbActionMessage * /* ev */
+);
+
+extern _X_EXPORT void XkbSendExtensionDeviceNotify(
+ DeviceIntPtr /* kbd */,
+ ClientPtr /* client */,
+ xkbExtensionDeviceNotify * /* ev */
+);
+
+extern _X_EXPORT void XkbSendNotification(
+ DeviceIntPtr /* kbd */,
+ XkbChangesPtr /* pChanges */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbProcessKeyboardEvent(
+ DeviceEvent* /* event */,
+ DeviceIntPtr /* keybd */
+);
+
+extern _X_EXPORT void XkbHandleActions(
+ DeviceIntPtr /* dev */,
+ DeviceIntPtr /* kbd */,
+ DeviceEvent* /* event */
+);
+
+extern _X_EXPORT Bool XkbEnableDisableControls(
+ XkbSrvInfoPtr /* xkbi */,
+ unsigned long /* change */,
+ unsigned long /* newValues */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void AccessXInit(
+ DeviceIntPtr /* dev */
+);
+
+extern _X_EXPORT Bool AccessXFilterPressEvent(
+ DeviceEvent* /* event */,
+ DeviceIntPtr /* keybd */
+);
+
+extern _X_EXPORT Bool AccessXFilterReleaseEvent(
+ DeviceEvent* /* event */,
+ DeviceIntPtr /* keybd */
+);
+
+extern _X_EXPORT void AccessXCancelRepeatKey(
+ XkbSrvInfoPtr /* xkbi */,
+ KeyCode /* key */
+);
+
+extern _X_EXPORT void AccessXComputeCurveFactor(
+ XkbSrvInfoPtr /* xkbi */,
+ XkbControlsPtr /* ctrls */
+);
+
+extern _X_EXPORT XkbInterestPtr XkbFindClientResource(
+ DevicePtr /* inDev */,
+ ClientPtr /* client */
+);
+
+extern _X_EXPORT XkbInterestPtr XkbAddClientResource(
+ DevicePtr /* inDev */,
+ ClientPtr /* client */,
+ XID /* id */
+);
+
+extern _X_EXPORT int XkbRemoveResourceClient(
+ DevicePtr /* inDev */,
+ XID /* id */
+);
+
+extern _X_EXPORT int XkbDDXAccessXBeep(
+ DeviceIntPtr /* dev */,
+ unsigned int /* what */,
+ unsigned int /* which */
+);
+
+extern _X_EXPORT int XkbDDXUsesSoftRepeat(
+ DeviceIntPtr /* dev */
+);
+
+extern _X_EXPORT void XkbDDXKeybdCtrlProc(
+ DeviceIntPtr /* dev */,
+ KeybdCtrl * /* ctrl */
+);
+
+extern _X_EXPORT void XkbDDXChangeControls(
+ DeviceIntPtr /* dev */,
+ XkbControlsPtr /* old */,
+ XkbControlsPtr /* new */
+);
+
+extern _X_EXPORT void XkbDDXUpdateDeviceIndicators(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ CARD32 /* newState */
+);
+
+extern _X_EXPORT int XkbDDXTerminateServer(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern _X_EXPORT int XkbDDXSwitchScreen(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern _X_EXPORT int XkbDDXPrivate(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern _X_EXPORT void XkbDisableComputedAutoRepeats(
+ DeviceIntPtr /* pXDev */,
+ unsigned int /* key */
+);
+
+extern _X_EXPORT void XkbSetRepeatKeys(
+ DeviceIntPtr /* pXDev */,
+ int /* key */,
+ int /* onoff */
+);
+
+extern _X_EXPORT int XkbLatchModifiers(
+ DeviceIntPtr /* pXDev */,
+ CARD8 /* mask */,
+ CARD8 /* latches */
+);
+
+extern _X_EXPORT int XkbLatchGroup(
+ DeviceIntPtr /* pXDev */,
+ int /* group */
+);
+
+extern _X_EXPORT void XkbClearAllLatchesAndLocks(
+ DeviceIntPtr /* dev */,
+ XkbSrvInfoPtr /* xkbi */,
+ Bool /* genEv */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbGetRulesDflts(
+ XkbRMLVOSet * /* rmlvo */
+);
+
+extern _X_EXPORT void XkbFreeRMLVOSet(
+ XkbRMLVOSet * /* rmlvo */,
+ Bool /* freeRMLVO */
+);
+
+extern _X_EXPORT void XkbSetRulesDflts(
+ XkbRMLVOSet * /* rmlvo */
+);
+
+extern _X_EXPORT void XkbDeleteRulesDflts(
+ void
+);
+
+extern _X_EXPORT int SProcXkbDispatch(
+ ClientPtr /* client */
+);
+
+extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(
+ DeviceIntPtr /* dev */,
+ Atom /* name */,
+ Bool * /* shouldFree */
+);
+
+extern _X_EXPORT void XkbConvertCase(
+ KeySym /* sym */,
+ KeySym * /* lower */,
+ KeySym * /* upper */
+);
+
+extern _X_EXPORT Status XkbChangeKeycodeRange(
+ XkbDescPtr /* xkb */,
+ int /* minKC */,
+ int /* maxKC */,
+ XkbChangesPtr /* changes */
+);
+
+extern _X_EXPORT void XkbFreeSrvLedInfo(
+ XkbSrvLedInfoPtr /* sli */
+);
+
+extern _X_EXPORT void XkbFreeInfo(
+ XkbSrvInfoPtr /* xkbi */
+);
+
+extern _X_EXPORT Status XkbChangeTypesOfKey(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* nGroups */,
+ unsigned int /* groups */,
+ int * /* newTypesIn */,
+ XkbMapChangesPtr /* changes */
+);
+
+extern _X_EXPORT int XkbKeyTypesForCoreSymbols(
+ XkbDescPtr /* xkb */,
+ int /* map_width */,
+ KeySym * /* core_syms */,
+ unsigned int /* protected */,
+ int * /* types_inout */,
+ KeySym * /* xkb_syms_rtrn */
+);
+
+extern _X_EXPORT Bool XkbApplyCompatMapToKey(
+ XkbDescPtr /* xkb */,
+ KeyCode /* key */,
+ XkbChangesPtr /* changes */
+);
+
+extern _X_EXPORT Bool XkbApplyVirtualModChanges(
+ XkbDescPtr /* xkb */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+);
+
+extern _X_EXPORT void XkbSendNewKeyboardNotify(
+ DeviceIntPtr /* kbd */,
+ xkbNewKeyboardNotify * /* pNKN */
+);
+
+extern Bool XkbCopyKeymap(
+ XkbDescPtr /* dst */,
+ XkbDescPtr /* src */);
+
+extern _X_EXPORT Bool XkbCopyDeviceKeymap(
+ DeviceIntPtr /* dst */,
+ DeviceIntPtr /* src */);
+
+extern void XkbFilterEvents(
+ ClientPtr /* pClient */,
+ int /* nEvents */,
+ xEvent* /* xE */);
+
+extern int XkbGetEffectiveGroup(
+ XkbSrvInfoPtr /* xkbi */,
+ XkbStatePtr /* xkbstate */,
+ CARD8 /* keycode */);
+
+extern void XkbMergeLockedPtrBtns(
+ DeviceIntPtr /* master */);
+
+extern void XkbFakeDeviceButton(
+ DeviceIntPtr /* dev */,
+ int /* press */,
+ int /* button */);
+
+
+#include "xkbfile.h"
+#include "xkbrules.h"
+
+#define _XkbListKeycodes 0
+#define _XkbListTypes 1
+#define _XkbListCompat 2
+#define _XkbListSymbols 3
+#define _XkbListGeometry 4
+#define _XkbListNumComponents 5
+
+typedef struct _XkbSrvListInfo {
+ int szPool;
+ int nPool;
+ char * pool;
+
+ int maxRtrn;
+ int nTotal;
+
+ char * pattern[_XkbListNumComponents];
+ int nFound[_XkbListNumComponents];
+} XkbSrvListInfoRec,*XkbSrvListInfoPtr;
+
+extern _X_EXPORT Status XkbDDXList(
+ DeviceIntPtr /* dev */,
+ XkbSrvListInfoPtr /* listing */,
+ ClientPtr /* client */
+);
+
+extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(
+ DeviceIntPtr /* keybd */,
+ XkbComponentNamesPtr /* names */,
+ unsigned int /* want */,
+ unsigned int /* need */,
+ XkbDescPtr * /* finfoRtrn */,
+ char * /* keymapNameRtrn */,
+ int /* keymapNameRtrnLen */
+);
+
+extern _X_EXPORT Bool XkbDDXNamesFromRules(
+ DeviceIntPtr /* keybd */,
+ char * /* rules */,
+ XkbRF_VarDefsPtr /* defs */,
+ XkbComponentNamesPtr /* names */
+);
+
+extern _X_EXPORT XkbDescPtr XkbCompileKeymap(
+ DeviceIntPtr /* dev */,
+ XkbRMLVOSet * /* rmlvo */
+);
+
+#endif /* _XKBSRV_H_ */
diff --git a/xorg-server/include/xkbstr.h b/xorg-server/include/xkbstr.h
index 4afe010d2..499512d7a 100644
--- a/xorg-server/include/xkbstr.h
+++ b/xorg-server/include/xkbstr.h
@@ -46,10 +46,10 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
typedef struct _XkbStateRec {
unsigned char group; /* base + latched + locked */
+ unsigned char locked_group;
/* FIXME: Why are base + latched short and not char?? */
unsigned short base_group; /* physically ... down? */
unsigned short latched_group;
- unsigned char locked_group;
unsigned char mods; /* base + latched + locked */
unsigned char base_mods; /* physically down */
diff --git a/xorg-server/include/xorg-server.h.in b/xorg-server/include/xorg-server.h.in
index b10b9949e..16da7500d 100644
--- a/xorg-server/include/xorg-server.h.in
+++ b/xorg-server/include/xorg-server.h.in
@@ -1,191 +1,191 @@
-/* xorg-server.h.in -*- c -*-
- *
- * This file is the template file for the xorg-server.h file which gets
- * installed as part of the SDK. The #defines in this file overlap
- * with those from config.h, but only for those options that we want
- * to export to external modules. Boilerplate autotool #defines such
- * as HAVE_STUFF and PACKAGE_NAME is kept in config.h
- *
- * It is still possible to update config.h.in using autoheader, since
- * autoheader only creates a .h.in file for the first
- * AM_CONFIG_HEADER() line, and thus does not overwrite this file.
- *
- * However, it should be kept in sync with this file.
- */
-
-#ifndef _XORG_SERVER_H_
-#define _XORG_SERVER_H_
-
-/* Support BigRequests extension */
-#undef BIGREQS
-
-/* Default font path */
-#undef COMPILEDDEFAULTFONTPATH
-
-/* Support Composite Extension */
-#undef COMPOSITE
-
-/* Build DPMS extension */
-#undef DPMSExtension
-
-/* Build GLX extension */
-#undef GLXEXT
-
-/* Support XDM-AUTH*-1 */
-#undef HASXDMAUTH
-
-/* Support SHM */
-#undef HAS_SHM
-
-/* Support IPv6 for TCP connections */
-#undef IPv6
-
-/* Support MIT-SHM Extension */
-#undef MITSHM
-
-/* Internal define for Xinerama */
-#undef PANORAMIX
-
-/* Support RANDR extension */
-#undef RANDR
-
-/* Support RENDER extension */
-#undef RENDER
-
-/* Support X resource extension */
-#undef RES
-
-/* Support MIT-SCREEN-SAVER extension */
-#undef SCREENSAVER
-
-/* Support SHAPE extension */
-#undef SHAPE
-
-/* Define to 1 on systems derived from System V Release 4 */
-#undef SVR4
-
-/* Support TCP socket connections */
-#undef TCPCONN
-
-/* Enable touchscreen support */
-#undef TOUCHSCREEN
-
-/* Support tslib touchscreen abstraction library */
-#undef TSLIB
-
-/* Support UNIX socket connections */
-#undef UNIXCONN
-
-/* unaligned word accesses behave as expected */
-#undef WORKING_UNALIGNED_INT
-
-/* Support XCMisc extension */
-#undef XCMISC
-
-/* Support Xdmcp */
-#undef XDMCP
-
-/* Build XFree86 BigFont extension */
-#undef XF86BIGFONT
-
-/* Support XFree86 Video Mode extension */
-#undef XF86VIDMODE
-
-/* Build XDGA support */
-#undef XFreeXDGA
-
-/* Support Xinerama extension */
-#undef XINERAMA
-
-/* Support X Input extension */
-#undef XINPUT
-
-/* XKB default rules */
-#undef XKB_DFLT_RULES
-
-/* Support loadable input and output drivers */
-#undef XLOADABLE
-
-/* Build DRI extension */
-#undef XF86DRI
-
-/* Build DRI2 extension */
-#undef DRI2
-
-/* Build Xorg server */
-#undef XORGSERVER
-
-/* Vendor release */
-#undef XORG_RELEASE
-
-/* Current Xorg version */
-#undef XORG_VERSION_CURRENT
-
-/* Build Xv Extension */
-#undef XvExtension
-
-/* Build XvMC Extension */
-#undef XvMCExtension
-
-/* Support XSync extension */
-#undef XSYNC
-
-/* Support XTest extension */
-#undef XTEST
-
-/* Support Xv Extension */
-#undef XV
-
-/* Vendor name */
-#undef XVENDORNAME
-
-/* BSD-compliant source */
-#undef _BSD_SOURCE
-
-/* POSIX-compliant source */
-#undef _POSIX_SOURCE
-
-/* X/Open-compliant source */
-#undef _XOPEN_SOURCE
-
-/* Vendor web address for support */
-#undef __VENDORDWEBSUPPORT__
-
-/* Location of configuration file */
-#undef __XCONFIGFILE__
-
-/* Name of X server */
-#undef __XSERVERNAME__
-
-/* Building vgahw module */
-#undef WITH_VGAHW
-
-/* System is BSD-like */
-#undef CSRG_BASED
-
-/* System has PC console */
-#undef PCCONS_SUPPORT
-
-/* System has PCVT console */
-#undef PCVT_SUPPORT
-
-/* System has syscons console */
-#undef SYSCONS_SUPPORT
-
-/* System has wscons console */
-#undef WSCONS_SUPPORT
-
-/* Loadable XFree86 server awesomeness */
-#undef XFree86LOADER
-
-/* Use libpciaccess */
-#undef XSERVER_LIBPCIACCESS
-
-/* X Access Control Extension */
-#undef XACE
-
-#ifdef _LP64
-#define _XSERVER64 1
-#endif
-
-#endif /* _XORG_SERVER_H_ */
+/* xorg-server.h.in -*- c -*-
+ *
+ * This file is the template file for the xorg-server.h file which gets
+ * installed as part of the SDK. The #defines in this file overlap
+ * with those from config.h, but only for those options that we want
+ * to export to external modules. Boilerplate autotool #defines such
+ * as HAVE_STUFF and PACKAGE_NAME is kept in config.h
+ *
+ * It is still possible to update config.h.in using autoheader, since
+ * autoheader only creates a .h.in file for the first
+ * AM_CONFIG_HEADER() line, and thus does not overwrite this file.
+ *
+ * However, it should be kept in sync with this file.
+ */
+
+#ifndef _XORG_SERVER_H_
+#define _XORG_SERVER_H_
+
+/* Support BigRequests extension */
+#undef BIGREQS
+
+/* Default font path */
+#undef COMPILEDDEFAULTFONTPATH
+
+/* Support Composite Extension */
+#undef COMPOSITE
+
+/* Build DPMS extension */
+#undef DPMSExtension
+
+/* Build GLX extension */
+#undef GLXEXT
+
+/* Support XDM-AUTH*-1 */
+#undef HASXDMAUTH
+
+/* Support SHM */
+#undef HAS_SHM
+
+/* Support IPv6 for TCP connections */
+#undef IPv6
+
+/* Support MIT-SHM Extension */
+#undef MITSHM
+
+/* Internal define for Xinerama */
+#undef PANORAMIX
+
+/* Support RANDR extension */
+#undef RANDR
+
+/* Support RENDER extension */
+#undef RENDER
+
+/* Support X resource extension */
+#undef RES
+
+/* Support MIT-SCREEN-SAVER extension */
+#undef SCREENSAVER
+
+/* Support SHAPE extension */
+#undef SHAPE
+
+/* Define to 1 on systems derived from System V Release 4 */
+#undef SVR4
+
+/* Support TCP socket connections */
+#undef TCPCONN
+
+/* Enable touchscreen support */
+#undef TOUCHSCREEN
+
+/* Support tslib touchscreen abstraction library */
+#undef TSLIB
+
+/* Support UNIX socket connections */
+#undef UNIXCONN
+
+/* unaligned word accesses behave as expected */
+#undef WORKING_UNALIGNED_INT
+
+/* Support XCMisc extension */
+#undef XCMISC
+
+/* Support Xdmcp */
+#undef XDMCP
+
+/* Build XFree86 BigFont extension */
+#undef XF86BIGFONT
+
+/* Support XFree86 Video Mode extension */
+#undef XF86VIDMODE
+
+/* Build XDGA support */
+#undef XFreeXDGA
+
+/* Support Xinerama extension */
+#undef XINERAMA
+
+/* Support X Input extension */
+#undef XINPUT
+
+/* XKB default rules */
+#undef XKB_DFLT_RULES
+
+/* Support loadable input and output drivers */
+#undef XLOADABLE
+
+/* Build DRI extension */
+#undef XF86DRI
+
+/* Build DRI2 extension */
+#undef DRI2
+
+/* Build Xorg server */
+#undef XORGSERVER
+
+/* Vendor release */
+#undef XORG_RELEASE
+
+/* Current Xorg version */
+#undef XORG_VERSION_CURRENT
+
+/* Build Xv Extension */
+#undef XvExtension
+
+/* Build XvMC Extension */
+#undef XvMCExtension
+
+/* Support XSync extension */
+#undef XSYNC
+
+/* Support XTest extension */
+#undef XTEST
+
+/* Support Xv Extension */
+#undef XV
+
+/* Vendor name */
+#undef XVENDORNAME
+
+/* BSD-compliant source */
+#undef _BSD_SOURCE
+
+/* POSIX-compliant source */
+#undef _POSIX_SOURCE
+
+/* X/Open-compliant source */
+#undef _XOPEN_SOURCE
+
+/* Vendor web address for support */
+#undef __VENDORDWEBSUPPORT__
+
+/* Location of configuration file */
+#undef __XCONFIGFILE__
+
+/* Name of X server */
+#undef __XSERVERNAME__
+
+/* Building vgahw module */
+#undef WITH_VGAHW
+
+/* System is BSD-like */
+#undef CSRG_BASED
+
+/* System has PC console */
+#undef PCCONS_SUPPORT
+
+/* System has PCVT console */
+#undef PCVT_SUPPORT
+
+/* System has syscons console */
+#undef SYSCONS_SUPPORT
+
+/* System has wscons console */
+#undef WSCONS_SUPPORT
+
+/* Loadable XFree86 server awesomeness */
+#undef XFree86LOADER
+
+/* Use libpciaccess */
+#undef XSERVER_LIBPCIACCESS
+
+/* X Access Control Extension */
+#undef XACE
+
+#ifdef _LP64
+#define _XSERVER64 1
+#endif
+
+#endif /* _XORG_SERVER_H_ */
diff --git a/xorg-server/include/xwin-config.h b/xorg-server/include/xwin-config.h
new file mode 100644
index 000000000..645a6cead
--- /dev/null
+++ b/xorg-server/include/xwin-config.h
@@ -0,0 +1,37 @@
+/*
+ * xwin-config.h.in
+ *
+ * This file has all defines used in the xwin ddx
+ *
+ */
+#include <dix-config.h>
+
+/* Winsock networking */
+#define HAS_WINSOCK
+
+/* Cygwin has /dev/windows for signaling new win32 messages */
+// let's should this for now #define HAS_DEVWINDOWS 1
+
+/* Switch on debug messages */
+/* #undef CYGDEBUG */
+/* #undef CYGWINDOWING_DEBUG */
+/* #undef CYGMULTIWINDOW_DEBUG */
+
+/* Define to 1 if unsigned long is 64 bits. */
+/* #undef _XSERVER64 */
+
+/* Do we require our own snprintf? */
+/* #undef NEED_SNPRINTF */
+
+/* Short vendor name */
+#define XVENDORNAMESHORT "VcXsrv"
+
+/* Vendor web address for support */
+#define __VENDORDWEBSUPPORT__ "http://www.hc-consult.be/"
+
+/* Default log location */
+#define DEFAULT_LOGDIR "."
+
+/* Location of system.XWinrc */
+#define SYSCONFDIR "."
+
diff --git a/xorg-server/installer/genruntimeinclude.py b/xorg-server/installer/genruntimeinclude.py
new file mode 100644
index 000000000..bad6c8324
--- /dev/null
+++ b/xorg-server/installer/genruntimeinclude.py
@@ -0,0 +1,82 @@
+PublicToken="1fc8b3b9a1e18e3b"
+
+Template=r"""!define MSVC_PUBLICTOKEN "<PUBLICTOKEN>"
+!define MSVC_VERSION "<VERSION>"
+!define MSVCR90_DLL "<WINSXSDIR>\x86_Microsoft.VC90.CRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION}_<SUFFIX>\msvcr90.dll"
+!define MSVCM90_DLL "<WINSXSDIR>\x86_Microsoft.VC90.CRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION}_<SUFFIX>\msvcm90.dll"
+!define MSVCP90_DLL "<WINSXSDIR>\x86_Microsoft.VC90.CRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION}_<SUFFIX>\msvcp90.dll"
+!define MSVC_CAT "<WINSXSDIR>\manifests\x86_Microsoft.VC90.CRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION}_<SUFFIX>.cat"
+!define MSVC_MANIFEST_PART "x86_Microsoft.VC90.CRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION}_<SUFFIX>.manifest"
+!define MSVC_MANIFEST "<WINSXSDIR>\manifests\${MSVC_MANIFEST_PART}"
+
+!define MSVC_VERSION_D "<DVERSION>"
+!define MSVCR90_DLL_D "<WINSXSDIR>\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_<DSUFFIX>\msvcr90d.dll"
+!define MSVCM90_DLL_D "<WINSXSDIR>\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_<DSUFFIX>\msvcm90d.dll"
+!define MSVCP90_DLL_D "<WINSXSDIR>\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_<DSUFFIX>\msvcp90d.dll"
+!define MSVC_CAT_D "<WINSXSDIR>\manifests\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_<DSUFFIX>.cat"
+!define MSVC_MANIFEST_PART_D "x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_<DSUFFIX>.manifest"
+!define MSVC_MANIFEST_D "<WINSXSDIR>\manifests\${MSVC_MANIFEST_PART_D}"
+"""
+
+import glob,re,sys,os
+
+Files=glob.glob(r"c:\windows\winsxs\x86_Microsoft.VC90.CRT_%s_9.0.*"%PublicToken)
+DebugFiles=glob.glob(r"c:\windows\winsxs\x86_Microsoft.VC90.DebugCRT_%s_9.0.*"%PublicToken)
+
+SearchRe=re.compile(r"c:\\windows\\winsxs\\x86_Microsoft\.VC90\.CRT_%s_9\.0\.([0-9]+)\.([0-9]+)_(.*)"%PublicToken,re.I)
+DebugSearchRe=re.compile(r"c:\\windows\\winsxs\\x86_Microsoft\.VC90\.DebugCRT_%s_9\.0\.([0-9]+)\.([0-9]+)_(.*)"%PublicToken,re.I)
+
+# Release Dlls
+MajorVersion=0
+MinorVersion=0
+LatestFile=None
+#Now Select the one with the latest version
+for File in Files:
+ # Extract version
+ Search=SearchRe.search(File)
+ Major=int(Search.group(1))
+ Minor=int(Search.group(2))
+ if Major>MajorVersion:
+ MajorVersion=Major
+ MinorVersion=Minor
+ LatestFile=File
+ Suffix=Search.group(3)
+ elif Major==MajorVersion and Minor>MinorVersion:
+ MinorVersion=Minor
+ LatestFile=File
+ Suffix=Search.group(3)
+
+
+Template=re.sub("<VERSION>","%d.%d"%(MajorVersion,MinorVersion),Template)
+Template=re.sub("<SUFFIX>",Suffix,Template)
+
+# Debug dlls
+MajorVersion=0
+MinorVersion=0
+LatestFile=None
+#Now Select the one with the latest version
+for File in DebugFiles:
+ # Extract version
+ Search=DebugSearchRe.search(File)
+ Major=int(Search.group(1))
+ Minor=int(Search.group(2))
+ if Major>MajorVersion:
+ MajorVersion=Major
+ MinorVersion=Minor
+ LatestFile=File
+ Suffix=Search.group(3)
+ elif Major==MajorVersion and Minor>MinorVersion:
+ MinorVersion=Minor
+ LatestFile=File
+ Suffix=Search.group(3)
+
+
+Template=re.sub("<DVERSION>","%d.%d"%(MajorVersion,MinorVersion),Template)
+Template=re.sub("<DSUFFIX>",Suffix,Template)
+
+# Adjust common stuff
+Template=re.sub("<PUBLICTOKEN>",PublicToken,Template)
+WinSxsDir=os.path.join(os.getenv("systemroot"),"WinSxS")
+Template=re.sub("<WINSXSDIR>",WinSxsDir,Template)
+
+open("runtime","w").write(Template)
diff --git a/xorg-server/installer/packageall.bat b/xorg-server/installer/packageall.bat
new file mode 100644
index 000000000..0aa098086
--- /dev/null
+++ b/xorg-server/installer/packageall.bat
@@ -0,0 +1,21 @@
+@echo off
+if exist vcxsrv.*.installer.exe del vcxsrv.*.installer.exe
+if "%VS2008%"=="1" goto vs2008
+
+copy %systemroot%\system32\msvcr100.dll
+copy %systemroot%\system32\msvcp100.dll
+copy %systemroot%\system32\msvcr100d.dll
+"C:\Program Files\NSIS\makensis.exe" vcxsrv.nsi
+del msvcr100.dll
+del msvcr100d.dll
+del msvcp100.dll
+
+goto end
+:vs2008
+
+python genruntimeinclude.py
+"C:\Program Files\NSIS\makensis.exe" /DVS2008=1 vcxsrv.nsi
+del runtime
+
+:end
+
diff --git a/xorg-server/installer/vcxsrv.nsi b/xorg-server/installer/vcxsrv.nsi
new file mode 100644
index 000000000..7c8231983
--- /dev/null
+++ b/xorg-server/installer/vcxsrv.nsi
@@ -0,0 +1,313 @@
+/* This file is part of vcxsrv.
+ *
+ * Copyright (C) 2009 Marc Haesen
+ *
+ * vcxsrv is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * vcxsrv is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with vcxsrv. If not, see <http://www.gnu.org/licenses/>.
+*/
+;--------------------------------
+
+; The name of the installer
+Name "VcXsrv"
+
+; The file to write
+OutFile "vcxsrv.1.10.0.0.installer.exe"
+
+; The default installation directory
+InstallDir $PROGRAMFILES\VcXsrv
+
+; Registry key to check for directory (so if you install again, it will
+; overwrite the old one automatically)
+InstallDirRegKey HKLM "Software\VcXsrv" "Install_Dir"
+
+; Request application privileges for Windows Vista
+RequestExecutionLevel admin
+
+;--------------------------------
+InstType "Full"
+InstType "Minimal"
+
+; Pages
+
+Page components
+Page directory
+Page instfiles
+
+UninstPage uninstConfirm
+UninstPage instfiles
+
+SetPluginUnload alwaysoff
+; ShowInstDetails show
+XPStyle on
+
+!define FUSION_REFCOUNT_UNINSTALL_SUBKEY_GUID {8cedc215-ac4b-488b-93c0-a50a49cb2fb8}
+
+!ifdef VS2008
+!include runtime
+!endif
+
+;--------------------------------
+; The stuff to install
+Section "VcXsrv (required)"
+
+ SectionIn RO
+ SectionIn 1 2
+
+ ; Set output path to the installation directory.
+ SetOutPath $INSTDIR
+
+ ; Remove old opengl32.dll file if it extits
+ IfFileExists "$INSTDIR\opengl32.dll" 0 +2
+ Delete "$INSTDIR\opengl32.dll"
+
+ ; Put files there
+ File "..\obj\servrelease\vcxsrv.exe"
+ File "..\obj\servdebug\vcxsrv_dbg.exe"
+ File "..\obj\servdebug\vcxsrv_dbg.pdb"
+ File "..\protocol.txt"
+ File "..\system.XWinrc"
+ File "..\..\xkbcomp\obj\release\xkbcomp.exe"
+ File "..\..\apps\xcalc\obj\release\xcalc.exe"
+ File "..\xcalc"
+ File "..\xcalc-color"
+ File "..\..\apps\xclock\obj\release\xclock.exe"
+ File "..\xclock"
+ File "..\xclock-color"
+ File "..\..\apps\xwininfo\obj\release\xwininfo.exe"
+ File "..\XKeysymDB"
+ File "..\XErrorDB"
+ File "..\XtErrorDB"
+ File "..\.Xdefaults"
+ File "..\hw\xwin\xlaunch\obj\release\xlaunch.exe"
+ File "..\..\tools\plink\obj\release\plink.exe"
+ File "..\swrast_dri.dll"
+ File "..\swrast_dri_dbg.dll"
+ File "..\dxtn.dll"
+ File "..\..\libxml2\bin\libxml2.dll"
+ File "..\..\libxml2\bin\zlib1.dll"
+ File "..\..\libxml2\bin\iconv.dll"
+!ifndef VS2008
+ File "msvcr100.dll"
+ File "msvcp100.dll"
+ File "msvcr100d.dll"
+!endif
+ SetOutPath $INSTDIR\fonts
+ File /r "..\fonts\*.*"
+ SetOutPath $INSTDIR\xkbdata
+ File /r "..\xkbdata\*.*"
+ SetOutPath $INSTDIR\locale
+ File /r "..\locale\*.*"
+ SetOutPath $INSTDIR\bitmaps
+ File /r "..\bitmaps\*.*"
+
+ ; Write the installation path into the registry
+ WriteRegStr HKLM SOFTWARE\VcXsrv "Install_Dir" "$INSTDIR"
+
+ ; Write the uninstall keys for Windows
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VcXsrv" "DisplayName" "VcXsrv"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VcXsrv" "UninstallString" '"$INSTDIR\uninstall.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VcXsrv" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VcXsrv" "NoRepair" 1
+ WriteUninstaller "uninstall.exe"
+
+ ; Register the xlaunch file extension
+ WriteRegStr HKCR ".xlaunch" "" "XLaunchFile"
+ WriteRegStr HKCR "XLaunchFile" "" "XLaunch Configuration"
+ WriteRegStr HKCR "XLaunchFile\DefaultIcon" "" "$INSTDIR\xlaunch.exe,0"
+ WriteRegStr HKCR "XLaunchFile\shell" "" 'open'
+ WriteRegStr HKCR "XLaunchFile\shell\open\command" "" '"$INSTDIR\XLaunch.exe" -run "%1"'
+ WriteRegStr HKCR "XLaunchFile\shell\open\ddeexec\Application" "" "XLaunch"
+ WriteRegStr HKCR "XLaunchFile\shell\open\ddeexec\Topic" "" "System"
+ WriteRegStr HKCR "XLaunchFile\shell\edit\command" "" '"$INSTDIR\XLaunch.exe" -load "%1"'
+ WriteRegStr HKCR "XLaunchFile\shell\edit\ddeexec\Application" "" "XLaunch"
+ WriteRegStr HKCR "XLaunchFile\shell\edit\ddeexec\Topic" "" "System"
+ WriteRegStr HKCR "XLaunchFile\shell\Validate\command" "" '"$INSTDIR\XLaunch.exe" -validate "%1"'
+ WriteRegStr HKCR "XLaunchFile\shell\Validate\ddeexec\Application" "" "XLaunch"
+ WriteRegStr HKCR "XLaunchFile\shell\Validate\ddeexec\Topic" "" "System"
+
+ WriteRegStr HKCR "Applications\xlaunch.exe\shell" "" 'open'
+ WriteRegStr HKCR "Applications\xlaunch.exe\shell\open\command" "" '"$INSTDIR\XLaunch.exe" -run "%1"'
+ WriteRegStr HKCR "Applications\xlaunch.exe\shell\open\ddeexec\Application" "" "XLaunch"
+ WriteRegStr HKCR "Applications\xlaunch.exe\shell\open\ddeexec\Topic" "" "System"
+ WriteRegStr HKCR "Applications\xlaunch.exe\shell\edit\command" "" '"$INSTDIR\XLaunch.exe" -load "%1"'
+ WriteRegStr HKCR "Applications\xlaunch.exe\shell\edit\ddeexec\Application" "" "XLaunch"
+ WriteRegStr HKCR "Applications\xlaunch.exe\shell\edit\ddeexec\Topic" "" "System"
+ WriteRegStr HKCR "Applications\xlaunch.exe\shell\Validate\command" "" '"$INSTDIR\XLaunch.exe" -validate "%1"'
+ WriteRegStr HKCR "Applications\xlaunch.exe\shell\Validate\ddeexec\Application" "" "XLaunch"
+ WriteRegStr HKCR "Applications\xlaunch.exe\shell\Validate\ddeexec\Topic" "" "System"
+
+!ifdef VS2008
+ InitPluginsDir
+ SetOutPath $PLUGINSDIR
+ File "${MSVCR90_DLL}"
+ File "${MSVCM90_DLL}"
+ File "${MSVCP90_DLL}"
+ File "${MSVC_CAT}"
+ File "${MSVC_MANIFEST}"
+ File "${MSVCR90_DLL_D}"
+ File "${MSVCM90_DLL_D}"
+ File "${MSVCP90_DLL_D}"
+ File "${MSVC_CAT_D}"
+ File "${MSVC_MANIFEST_D}"
+ DetailPrint "Installing CRT assembly..."
+ System::Call "sxs::CreateAssemblyCache(*i .r0, i 0) i.r1"
+ StrCmp $1 0 0 fail
+ # Fill a FUSION_INSTALL_REFERENCE.
+ # fir.cbSize = sizeof(FUSION_INSTALL_REFERENCE) == 32
+ # fir.dwFlags = 0
+ # fir.guidScheme = FUSION_REFCOUNT_UNINSTALL_SUBKEY_GUID
+ # fir.szIdentifier = "nsissxs"
+ # fir.szNonCanonicalData = 0
+ System::Call "*(i 32, i 0, i 2364391957, i 1217113163, i 178634899, i 3090139977, w 'nsissxs', w '') i.s"
+ Pop $2
+ # IAssemblyCache::InstallAssembly(0, manifestPath, fir)
+ System::Call "$0->7(i 0, w '$PLUGINSDIR\${MSVC_MANIFEST_PART}', i r2) i.r1"
+ StrCmp $1 0 0 failcrt
+ System::Call "$0->7(i 0, w '$PLUGINSDIR\${MSVC_MANIFEST_PART_D}', i r2) i.r1"
+ StrCmp $1 0 0 faildebugcrt
+ System::Free $2
+ System::Call "$0->2()"
+ Goto end
+
+fail:
+ DetailPrint "CreateAssemblyCache failed."
+ DetailPrint $1
+ Goto end
+
+failcrt:
+ DetailPrint "InstallAssembly CRT failed."
+ DetailPrint $1
+ Goto end
+faildebugcrt:
+ DetailPrint "InstallAssembly Debug CRT failed."
+ DetailPrint $1
+ Goto end
+end:
+!endif
+SectionEnd
+
+; Optional section (can be disabled by the user)
+Section "Start Menu Shortcuts"
+ SectionIn 1
+
+ SetOutPath $INSTDIR
+ CreateDirectory "$SMPROGRAMS\VcXsrv"
+ CreateShortCut "$SMPROGRAMS\VcXsrv\Uninstall VcXsrv.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
+ CreateShortCut "$SMPROGRAMS\VcXsrv\VcXsrv.lnk" "$INSTDIR\vcxsrv.exe" " :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl" "$INSTDIR\vcxsrv.exe" 0
+ CreateShortCut "$SMPROGRAMS\VcXsrv\XLaunch.lnk" "$INSTDIR\xlaunch.exe" "" "$INSTDIR\xlaunch.exe" 0
+
+SectionEnd
+
+; Optional section (can be disabled by the user)
+Section "Desktop Shortcuts"
+ SectionIn 1
+
+ SetOutPath $INSTDIR
+ CreateShortCut "$DESKTOP\VcXsrv.lnk" "$INSTDIR\vcxsrv.exe" " :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl" "$INSTDIR\vcxsrv.exe" 0
+ CreateShortCut "$DESKTOP\XLaunch.lnk" "$INSTDIR\xlaunch.exe" "" "$INSTDIR\xlaunch.exe" 0
+
+SectionEnd
+
+;--------------------------------
+
+; Uninstaller
+
+Section "Uninstall"
+
+ ; Remove registry keys
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VcXsrv"
+ DeleteRegKey HKLM SOFTWARE\VcXsrv
+
+ ; Register the xlaunch file extension
+ DeleteRegKey HKCR ".xlaunch"
+ DeleteRegKey HKCR "XLaunchFile"
+ DeleteRegKey HKCR "Applications\xlaunch.exe"
+
+ ; Remove files and uninstaller
+ Delete "$INSTDIR\vcxsrv.exe"
+ Delete "$INSTDIR\vcxsrv_dbg.exe"
+ Delete "$INSTDIR\vcxsrv_dbg.pdb"
+ Delete "$INSTDIR\uninstall.exe"
+ Delete "$INSTDIR\protocol.txt"
+ Delete "$INSTDIR\system.XWinrc"
+ Delete "$INSTDIR\xkbcomp.exe"
+ Delete "$INSTDIR\xcalc.exe"
+ Delete "$INSTDIR\xcalc"
+ Delete "$INSTDIR\xcalc-color"
+ Delete "$INSTDIR\xclock.exe"
+ Delete "$INSTDIR\xclock"
+ Delete "$INSTDIR\xclock-color"
+ Delete "$INSTDIR\xwininfo.exe"
+ Delete "$INSTDIR\XKeysymDB"
+ Delete "$INSTDIR\XErrorDB"
+ Delete "$INSTDIR\XtErrorDB"
+ Delete "$INSTDIR\.Xdefaults"
+ Delete "$INSTDIR\xlaunch.exe"
+ Delete "$INSTDIR\plink.exe"
+ Delete "$INSTDIR\swrast_dri.dll"
+ Delete "$INSTDIR\swrast_dri_dbg.dll"
+ Delete "$INSTDIR\dxtn.dll"
+ Delete "$INSTDIR\libxml2.dll"
+ Delete "$INSTDIR\zlib1.dll"
+ Delete "$INSTDIR\iconv.dll"
+
+!ifndef VS2008
+ Delete "$INSTDIR\msvcr100.dll"
+ Delete "$INSTDIR\msvcp100.dll"
+ Delete "$INSTDIR\msvcr100d.dll"
+!endif
+
+ RMDir /r "$INSTDIR\fonts"
+ RMDir /r "$INSTDIR\xkbdata"
+ RMDir /r "$INSTDIR\locale"
+
+ ; Remove shortcuts, if any
+ Delete "$SMPROGRAMS\VcXsrv\*.*"
+ Delete "$DESKTOP\VcXsrv.lnk"
+ Delete "$DESKTOP\XLaunch.lnk"
+
+ ; Remove directories used
+ RMDir "$SMPROGRAMS\VcXsrv"
+ RMDir "$INSTDIR"
+
+; Currently disable uninstalling the run-time; because sometimes it is removing
+; the run-time although other applications are using them
+; DetailPrint "Removing CRT assembly..."
+; System::Call "sxs::CreateAssemblyCache(*i .r0, i 0) i.r1"
+; StrCmp $1 0 0 fail
+; System::Call "*(i 32, i 0, i 2364391957, i 1217113163, i 178634899, i 3090139977, w 'nsissxs', w '') i.s"
+; Pop $2
+; System::Call "$0->3(i 0, w 'Microsoft.VC90.CRT,version=$\"9.0.${MSVC_VERSION}$\",type=$\"win32$\",processorArchitecture=$\"x86$\",publicKeyToken=$\"${MSVC_PUBLICTOKEN}$\"', i r2, *i . r3) i.r1"
+; StrCmp $1 0 0 failcrt
+; System::Call "$0->3(i 0, w 'Microsoft.VC90.DebugCRT,version=$\"9.0.${MSVC_VERSION_D}$\",type=$\"win32$\",processorArchitecture=$\"x86$\",publicKeyToken=$\"${MSVC_PUBLICTOKEN}$\"', i r2, *i . r3) i.r1"
+; StrCmp $1 0 0 faildebugcrt
+; DetailPrint "Disposition returned is $3"
+; System::Free $2
+; System::Call "$0->2()"
+; Goto end
+; fail:
+; DetailPrint "CreateAssemblyCache failed."
+; DetailPrint $1
+; Goto end
+; failcrt:
+; DetailPrint "UninstallAssembly CRT failed."
+; DetailPrint $1
+; Goto end
+; faildebugcrt:
+; DetailPrint "UninstallAssembly Debug CRT failed."
+; DetailPrint $1
+; Goto end
+;end:
+
+SectionEnd
+
diff --git a/xorg-server/makefile b/xorg-server/makefile
new file mode 100644
index 000000000..f107c379c
--- /dev/null
+++ b/xorg-server/makefile
@@ -0,0 +1,154 @@
+ifneq ($(MAKESERVER),1)
+$(error Please specify MAKESERVER=1 on the command line or as environment variable)
+endif
+
+INCLUDELIBFILES = \
+ composite\$(OBJDIR)\libcomposite.lib \
+ config\$(OBJDIR)\libconfig.lib \
+ damageext\$(OBJDIR)\libdamageext.lib \
+ dbe\$(OBJDIR)\libdbe.lib \
+ dix\$(OBJDIR)\libdix.lib \
+ fb\$(OBJDIR)\libfb.lib \
+ glx\$(OBJDIR)\libglx.lib \
+ hw\xwin\$(OBJDIR)\libxwin.lib \
+ hw\xwin\glx\$(OBJDIR)\libwinglx.lib \
+ mi\$(OBJDIR)\libmi.lib \
+ miext\damage\$(OBJDIR)\libdamage.lib \
+ miext\shadow\$(OBJDIR)\libshadow.lib \
+ miext\sync\$(OBJDIR)\libsync.lib \
+ miext\rootless\$(OBJDIR)\librootless.lib \
+ os\$(OBJDIR)\libos.lib \
+ randr\$(OBJDIR)\librandr.lib \
+ record\$(OBJDIR)\librecord.lib \
+ Xext\$(OBJDIR)\libxext.lib \
+ xfixes\$(OBJDIR)\libxfixes.lib \
+ Xi\$(OBJDIR)\libxi.lib \
+ xkb\$(OBJDIR)\libxkb.lib \
+ render\$(OBJDIR)\librender.lib \
+ $(MHMAKECONF)\libxau\$(OBJDIR)\libxau.lib \
+ $(MHMAKECONF)\libxdmcp\$(OBJDIR)\libxdmcp.lib \
+ $(MHMAKECONF)\libXfont\src\util\$(OBJDIR)\libutil.lib \
+ $(MHMAKECONF)\libXfont\src\fc\$(OBJDIR)\libfc.lib \
+ $(MHMAKECONF)\libXfont\src\fontfile\$(OBJDIR)\libfontfile.lib \
+ $(MHMAKECONF)\libXfont\src\builtins\$(OBJDIR)\libbuiltins.lib \
+ $(MHMAKECONF)\libXfont\src\bitmap\$(OBJDIR)\libbitmap.lib \
+ $(MHMAKECONF)\pixman\pixman\$(OBJDIR)\libpixman-1.lib \
+ $(MHMAKECONF)\libx11\modules\im\ximcp\$(OBJDIR)\libximcp.lib \
+ $(MHMAKECONF)\libx11\src\xlibi18n\$(OBJDIR)\libi18n.lib \
+ $(MHMAKECONF)\libx11\src\$(OBJDIR)\libx11.lib \
+ $(MHMAKECONF)\libx11\src\xcms\$(OBJDIR)\libxcms.lib \
+ $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \
+ $(MHMAKECONF)\libx11\src\xkb\$(OBJDIR)\libxkb.lib \
+ $(MHMAKECONF)\libx11\modules\om\generic\$(OBJDIR)\libxomGeneric.lib \
+ $(MHMAKECONF)\libx11\modules\lc\utf8\$(OBJDIR)\libxlcUTF8Load.lib \
+ $(MHMAKECONF)\libx11\modules\lc\def\$(OBJDIR)\libxlcDef.lib \
+ $(MHMAKECONF)\libx11\modules\lc\gen\$(OBJDIR)\liblcGenConvLoad.lib \
+ $(MHMAKECONF)\zlib\$(OBJDIR)\libz.lib \
+ $(MHMAKECONF)\libx11\modules\lc\xlocale\$(OBJDIR)\libxlocale.lib \
+ $(MHMAKECONF)\libfontenc\src\$(OBJDIR)\libfontenc.lib \
+ $(MHMAKECONF)\libxfont\src\freetype\$(OBJDIR)\libft.lib \
+ $(MHMAKECONF)\libxfont\src\stubs\$(OBJDIR)\libstubs.lib \
+ $(MHMAKECONF)\libxinerama\src\$(OBJDIR)\libxinerama.lib
+
+LIBDIRS=$(dir $(INCLUDELIBFILES))
+
+load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=$(MAKESERVER) DEBUG=$(DEBUG);)
+
+OBJS = dix\$(OBJDIR)\main.obj
+
+ifeq ($(DEBUG),1)
+TTYAPP=vcxsrv_dbg
+APP:=$(TTYAPP)
+
+LINKLIBS += $(MHMAKECONF)\openssl\out32_d\libeay32.lib \
+ $(MHMAKECONF)\freetype\lib\freetype244MT_D.lib \
+ $(MHMAKECONF)\pthreads\pthreadVC2d.lib
+
+$(OBJDIR)\$(TTYAPP).exe: $(LINKLIBS)
+
+else
+WINAPP=vcxsrv
+APP:=$(WINAPP)
+
+LINKLIBS += $(MHMAKECONF)\openssl\out32\libeay32.lib \
+ $(MHMAKECONF)\freetype\lib\freetype244MT.lib \
+ $(MHMAKECONF)\pthreads\pthreadVC2.lib
+
+endif
+
+RCINCLUDES += include hw\xwin $(MHMAKECONF)\include $(MHMAKECONF)
+
+XWin.rc: hw\xwin\XWin.rc
+ copy $< $@
+
+RESOURCES = XWin.rc
+
+$(OBJDIR)\$(APP).exe: $(LINKLIBS)
+
+XErrorDB: ..\libX11\src\XErrorDB
+ copy $< $@
+
+%.exe: $(OBJDIR)\%.exe
+ copy $< $@
+
+load_makefile hw\xwin\xlaunch\makefile MAKESERVER=0 DEBUG=0
+xlaunch.exe: hw\xwin\xlaunch\obj\release\xlaunch.exe
+ copy $< $@
+
+load_makefile ..\xkbcomp\makefile MAKESERVER=0 DEBUG=0
+xkbcomp.exe: ..\xkbcomp\obj\release\xkbcomp.exe
+ copy $< $@
+
+%: ..\apps\xcalc\app-defaults\%
+ copy $< $@
+
+load_makefile ..\apps\xcalc\makefile MAKESERVER=0 DEBUG=0
+xcalc.exe: ..\apps\xcalc\obj\release\xcalc.exe XCalc XCalc-color
+ copy $< $@
+
+%: ..\apps\xclock\app-defaults\%
+ copy $< $@
+
+load_makefile ..\apps\xclock\makefile MAKESERVER=0 DEBUG=0
+xclock.exe: ..\apps\xclock\obj\release\xclock.exe XClock XClock-color
+ copy $< $@
+
+load_makefile ..\apps\xwininfo\makefile MAKESERVER=0 DEBUG=0
+xwininfo.exe: ..\apps\xwininfo\obj\release\xwininfo.exe
+ copy $< $@
+
+load_makefile ..\tools\plink\makefile MAKESERVER=0 DEBUG=0
+plink.exe: ..\tools\plink\obj\release\plink.exe
+ copy $< $@
+
+load_makefile ..\libX11\nls\makefile MAKESERVER=0 DEBUG=0
+load_makefile fonts.src\makefile MAKESERVER=0 DEBUG=0
+load_makefile xkeyboard-config\makefile MAKESERVER=0 DEBUG=0
+
+all: $(APP).exe xlaunch.exe xkbcomp.exe protocol.txt XErrorDB \
+ ..\libX11\nls\all fonts.src\all xkeyboard-config\all plink.exe xclock.exe xcalc.exe \
+ xwininfo.exe swrast_dri.dll swrast_dri_dbg.dll dxtn.dll dxtn_dbg.dll
+
+
+load_makefile ..\mesalib\windows\VC8\mesa\makefile MAKESERVER=0 DEBUG=0
+swrast_dri.dll: ..\mesalib\windows\VC8\mesa\Release\swrast_dri.dll
+ copy $< $@
+
+swrast_dri_dbg.dll: ..\mesalib\windows\VC8\mesa\Debug\swrast_dri.dll
+ copy $< $@
+
+load_makefile ..\dxtn\makefile MAKESERVER=0 DEBUG=0
+dxtn.dll: ..\dxtn\obj\release\dxtn.dll
+ copy $< $@
+
+load_makefile ..\dxtn\makefile MAKESERVER=0 DEBUG=1
+dxtn_dbg.dll: ..\dxtn\obj\debug\dxtn.dll
+ copy $< $@
+
+mesaopengl32.dll: ..\mesalib\lib\mesaopengl32.dll
+ copy $< $@
+
+protocol.txt: dix\protocol.txt
+ copy $< $@
+
+
diff --git a/xorg-server/mi/makefile b/xorg-server/mi/makefile
new file mode 100644
index 000000000..7067c62e8
--- /dev/null
+++ b/xorg-server/mi/makefile
@@ -0,0 +1,39 @@
+CSRCS=miarc.c \
+ mibitblt.c \
+ micmap.c \
+ micopy.c \
+ micursor.c \
+ midash.c \
+ midispcur.c \
+ mieq.c \
+ miexpose.c \
+ mifillarc.c \
+ mifillrct.c \
+ mifpolycon.c \
+ migc.c \
+ miglblt.c \
+ mioverlay.c \
+ mipointer.c \
+ mipoly.c \
+ mipolycon.c \
+ mipolygen.c \
+ mipolypnt.c \
+ mipolyrect.c \
+ mipolyseg.c \
+ mipolytext.c \
+ mipolyutil.c \
+ mipushpxl.c \
+ miscrinit.c \
+ mispans.c \
+ misprite.c \
+ mivaltree.c \
+ miwideline.c \
+ miwindow.c \
+ mizerarc.c \
+ mizerclip.c \
+ mizerline.c \
+ miinitext.c
+
+LIBRARY=libmi
+
+
diff --git a/xorg-server/mi/miarc.c b/xorg-server/mi/miarc.c
index c564eb3db..06fc4085b 100644
--- a/xorg-server/mi/miarc.c
+++ b/xorg-server/mi/miarc.c
@@ -64,6 +64,10 @@ SOFTWARE.
#include "mifillarc.h"
#include <X11/Xfuncproto.h>
+#ifdef _MSC_VER
+#define hypot _hypot
+#endif
+
static double miDsin(double a);
static double miDcos(double a);
static double miDasin(double v);
diff --git a/xorg-server/mi/micmap.c b/xorg-server/mi/micmap.c
index 87d4248d0..a92d4fd6d 100644
--- a/xorg-server/mi/micmap.c
+++ b/xorg-server/mi/micmap.c
@@ -126,18 +126,29 @@ miInitializeColormap(ColormapPtr pmap)
unsigned limr, limg, limb;
limr = pVisual->redMask >> pVisual->offsetRed;
- limg = pVisual->greenMask >> pVisual->offsetGreen;
- limb = pVisual->blueMask >> pVisual->offsetBlue;
- for(i = 0; i <= maxent; i++)
+ for(i = 0; i <= min(limr,maxent); i++)
{
/* rescale to [0..65535] then rgb bits */
pmap->red[i].co.local.red =
((((i * 65535) / limr) >> shift) * 65535) / lim;
+ }
+ for(; i <= maxent; i++) pmap->red[i].co.local.red = 65535;
+ limg = pVisual->greenMask >> pVisual->offsetGreen;
+ for(i = 0; i <= min(limg,maxent); i++)
+ {
+ /* rescale to [0..65535] then rgb bits */
pmap->green[i].co.local.green =
((((i * 65535) / limg) >> shift) * 65535) / lim;
+ }
+ for(; i <= maxent; i++) pmap->green[i].co.local.green = 65535;
+ limb = pVisual->blueMask >> pVisual->offsetBlue;
+ for(i = 0; i <= min(limb,maxent); i++)
+ {
+ /* rescale to [0..65535] then rgb bits */
pmap->blue[i].co.local.blue =
((((i * 65535) / limb) >> shift) * 65535) / lim;
}
+ for(; i <= maxent; i++) pmap->blue[i].co.local.blue = 65535;
}
else if (pVisual->class == StaticColor)
{
diff --git a/xorg-server/mi/micoord.h b/xorg-server/mi/micoord.h
index e6d814fc8..fe4adac56 100644
--- a/xorg-server/mi/micoord.h
+++ b/xorg-server/mi/micoord.h
@@ -55,14 +55,14 @@
#endif
#if IMAGE_BYTE_ORDER == MSBFirst
-#define intToCoord(i,x,y) (((x) = GetHighWord(i)), ((y) = (int) ((short) (i))))
+#define intToCoord(i,x,y) (((x) = GetHighWord(i)), ((y) = (int) ((short) ((i)&0xffff))))
#define coordToInt(x,y) (((x) << 16) | ((y) & 0xffff))
#define intToX(i) (GetHighWord(i))
-#define intToY(i) ((int) ((short) i))
+#define intToY(i) ((int) ((short) ((i)&0xffff)))
#else
-#define intToCoord(i,x,y) (((x) = (int) ((short) (i))), ((y) = GetHighWord(i)))
+#define intToCoord(i,x,y) (((x) = (int) ((short) ((i)&0xffff))), ((y) = GetHighWord(i)))
#define coordToInt(x,y) (((y) << 16) | ((x) & 0xffff))
-#define intToX(i) ((int) ((short) (i)))
+#define intToX(i) ((int) ((short) ((i)&0xffff)))
#define intToY(i) (GetHighWord(i))
#endif
diff --git a/xorg-server/mi/midispcur.c b/xorg-server/mi/midispcur.c
index 9b3e87a57..3ae157fa3 100644
--- a/xorg-server/mi/midispcur.c
+++ b/xorg-server/mi/midispcur.c
@@ -1,592 +1,592 @@
-/*
- * midispcur.c
- *
- * machine independent cursor display routines
- */
-
-
-/*
-
-Copyright 1989, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-# include <X11/X.h>
-# include "misc.h"
-# include "input.h"
-# include "cursorstr.h"
-# include "windowstr.h"
-# include "regionstr.h"
-# include "dixstruct.h"
-# include "scrnintstr.h"
-# include "servermd.h"
-# include "mipointer.h"
-# include "misprite.h"
-# include "gcstruct.h"
-
-#ifdef ARGB_CURSOR
-# include "picturestr.h"
-#endif
-
-# include "inputstr.h"
-
-/* per-screen private data */
-static DevPrivateKeyRec miDCScreenKeyRec;
-#define miDCScreenKey (&miDCScreenKeyRec)
-static DevScreenPrivateKeyRec miDCCursorBitsKeyRec;
-#define miDCCursorBitsKey (&miDCCursorBitsKeyRec)
-static DevScreenPrivateKeyRec miDCDeviceKeyRec;
-#define miDCDeviceKey (&miDCDeviceKeyRec)
-
-static Bool miDCCloseScreen(int index, ScreenPtr pScreen);
-
-/* per device private data */
-typedef struct {
- GCPtr pSourceGC, pMaskGC;
- GCPtr pSaveGC, pRestoreGC;
- PixmapPtr pSave;
-#ifdef ARGB_CURSOR
- PicturePtr pRootPicture;
-#endif
-} miDCBufferRec, *miDCBufferPtr;
-
-#define miGetDCDevice(dev, screen) \
- ((DevHasCursor(dev)) ? \
- (miDCBufferPtr)dixLookupScreenPrivate(&dev->devPrivates, miDCDeviceKey, screen) : \
- (miDCBufferPtr)dixLookupScreenPrivate(&GetMaster(dev, MASTER_POINTER)->devPrivates, miDCDeviceKey, screen))
-
-/*
- * The core pointer buffer will point to the index of the virtual core pointer
- * in the pCursorBuffers array.
- */
-typedef struct {
- CloseScreenProcPtr CloseScreen;
-} miDCScreenRec, *miDCScreenPtr;
-
-#define miGetDCScreen(s) ((miDCScreenPtr)(dixLookupPrivate(&(s)->devPrivates, miDCScreenKey)))
-
-/* per-cursor per-screen private data */
-typedef struct {
- PixmapPtr sourceBits; /* source bits */
- PixmapPtr maskBits; /* mask bits */
-#ifdef ARGB_CURSOR
- PicturePtr pPicture;
-#endif
-} miDCCursorRec, *miDCCursorPtr;
-
-Bool
-miDCInitialize (ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs)
-{
- miDCScreenPtr pScreenPriv;
-
- if (!dixRegisterPrivateKey(&miDCScreenKeyRec, PRIVATE_SCREEN, 0) ||
- !dixRegisterScreenPrivateKey(&miDCCursorBitsKeyRec, pScreen, PRIVATE_CURSOR_BITS, 0) ||
- !dixRegisterScreenPrivateKey(&miDCDeviceKeyRec, pScreen, PRIVATE_DEVICE, 0))
- return FALSE;
-
- pScreenPriv = malloc(sizeof (miDCScreenRec));
- if (!pScreenPriv)
- return FALSE;
-
- pScreenPriv->CloseScreen = pScreen->CloseScreen;
- pScreen->CloseScreen = miDCCloseScreen;
-
- dixSetPrivate(&pScreen->devPrivates, miDCScreenKey, pScreenPriv);
-
- if (!miSpriteInitialize (pScreen, screenFuncs))
- {
- free((pointer) pScreenPriv);
- return FALSE;
- }
- return TRUE;
-}
-
-static Bool
-miDCCloseScreen (int index, ScreenPtr pScreen)
-{
- miDCScreenPtr pScreenPriv;
-
- pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
- miDCScreenKey);
- pScreen->CloseScreen = pScreenPriv->CloseScreen;
- free((pointer) pScreenPriv);
- return (*pScreen->CloseScreen) (index, pScreen);
-}
-
-Bool
-miDCRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
-{
- if (pCursor->bits->refcnt <= 1)
- dixSetScreenPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey, pScreen, NULL);
- return TRUE;
-}
-
-#ifdef ARGB_CURSOR
-#define EnsurePicture(picture,draw,win) (picture || miDCMakePicture(&picture,draw,win))
-
-static VisualPtr
-miDCGetWindowVisual (WindowPtr pWin)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
- VisualID vid = wVisual (pWin);
- int i;
-
- for (i = 0; i < pScreen->numVisuals; i++)
- if (pScreen->visuals[i].vid == vid)
- return &pScreen->visuals[i];
- return 0;
-}
-
-static PicturePtr
-miDCMakePicture (PicturePtr *ppPicture, DrawablePtr pDraw, WindowPtr pWin)
-{
- ScreenPtr pScreen = pDraw->pScreen;
- VisualPtr pVisual;
- PictFormatPtr pFormat;
- XID subwindow_mode = IncludeInferiors;
- PicturePtr pPicture;
- int error;
-
- pVisual = miDCGetWindowVisual (pWin);
- if (!pVisual)
- return 0;
- pFormat = PictureMatchVisual (pScreen, pDraw->depth, pVisual);
- if (!pFormat)
- return 0;
- pPicture = CreatePicture (0, pDraw, pFormat,
- CPSubwindowMode, &subwindow_mode,
- serverClient, &error);
- *ppPicture = pPicture;
- return pPicture;
-}
-#endif
-
-static miDCCursorPtr
-miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
-{
- miDCCursorPtr pPriv;
- GCPtr pGC;
- ChangeGCVal gcvals;
-
- pPriv = malloc(sizeof (miDCCursorRec));
- if (!pPriv)
- return NULL;
-#ifdef ARGB_CURSOR
- if (pCursor->bits->argb)
- {
- PixmapPtr pPixmap;
- PictFormatPtr pFormat;
- int error;
-
- pFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8);
- if (!pFormat)
- {
- free((pointer) pPriv);
- return NULL;
- }
-
- pPriv->sourceBits = 0;
- pPriv->maskBits = 0;
- pPixmap = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width,
- pCursor->bits->height, 32,
- CREATE_PIXMAP_USAGE_SCRATCH);
- if (!pPixmap)
- {
- free((pointer) pPriv);
- return NULL;
- }
- pGC = GetScratchGC (32, pScreen);
- if (!pGC)
- {
- (*pScreen->DestroyPixmap) (pPixmap);
- free((pointer) pPriv);
- return NULL;
- }
- ValidateGC (&pPixmap->drawable, pGC);
- (*pGC->ops->PutImage) (&pPixmap->drawable, pGC, 32,
- 0, 0, pCursor->bits->width,
- pCursor->bits->height,
- 0, ZPixmap, (char *) pCursor->bits->argb);
- FreeScratchGC (pGC);
- pPriv->pPicture = CreatePicture (0, &pPixmap->drawable,
- pFormat, 0, 0, serverClient, &error);
- (*pScreen->DestroyPixmap) (pPixmap);
- if (!pPriv->pPicture)
- {
- free((pointer) pPriv);
- return NULL;
- }
- dixSetScreenPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey, pScreen, pPriv);
- return pPriv;
- }
- pPriv->pPicture = 0;
-#endif
- pPriv->sourceBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0);
- if (!pPriv->sourceBits)
- {
- free((pointer) pPriv);
- return NULL;
- }
- pPriv->maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0);
- if (!pPriv->maskBits)
- {
- (*pScreen->DestroyPixmap) (pPriv->sourceBits);
- free((pointer) pPriv);
- return NULL;
- }
- dixSetScreenPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey, pScreen, pPriv);
-
- /* create the two sets of bits, clipping as appropriate */
-
- pGC = GetScratchGC (1, pScreen);
- if (!pGC)
- {
- (void) miDCUnrealizeCursor (pScreen, pCursor);
- return NULL;
- }
-
- ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC);
- (*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1,
- 0, 0, pCursor->bits->width, pCursor->bits->height,
- 0, XYPixmap, (char *)pCursor->bits->source);
- gcvals.val = GXand;
- ChangeGC (NullClient, pGC, GCFunction, &gcvals);
- ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC);
- (*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1,
- 0, 0, pCursor->bits->width, pCursor->bits->height,
- 0, XYPixmap, (char *)pCursor->bits->mask);
-
- /* mask bits -- pCursor->mask & ~pCursor->source */
- gcvals.val = GXcopy;
- ChangeGC (NullClient, pGC, GCFunction, &gcvals);
- ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
- (*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
- 0, 0, pCursor->bits->width, pCursor->bits->height,
- 0, XYPixmap, (char *)pCursor->bits->mask);
- gcvals.val = GXandInverted;
- ChangeGC (NullClient, pGC, GCFunction, &gcvals);
- ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
- (*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
- 0, 0, pCursor->bits->width, pCursor->bits->height,
- 0, XYPixmap, (char *)pCursor->bits->source);
- FreeScratchGC (pGC);
- return pPriv;
-}
-
-Bool
-miDCUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
-{
- miDCCursorPtr pPriv;
-
- pPriv = (miDCCursorPtr)dixLookupScreenPrivate(&pCursor->bits->devPrivates,
- miDCCursorBitsKey, pScreen);
- if (pPriv && (pCursor->bits->refcnt <= 1))
- {
- if (pPriv->sourceBits)
- (*pScreen->DestroyPixmap) (pPriv->sourceBits);
- if (pPriv->maskBits)
- (*pScreen->DestroyPixmap) (pPriv->maskBits);
-#ifdef ARGB_CURSOR
- if (pPriv->pPicture)
- FreePicture (pPriv->pPicture, 0);
-#endif
- free((pointer) pPriv);
- dixSetScreenPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey, pScreen, NULL);
- }
- return TRUE;
-}
-
-static void
-miDCPutBits (
- DrawablePtr pDrawable,
- miDCCursorPtr pPriv,
- GCPtr sourceGC,
- GCPtr maskGC,
- int x_org,
- int y_org,
- unsigned w,
- unsigned h,
- unsigned long source,
- unsigned long mask)
-{
- ChangeGCVal gcval;
- int x, y;
-
- if (sourceGC->fgPixel != source)
- {
- gcval.val = source;
- ChangeGC (NullClient, sourceGC, GCForeground, &gcval);
- }
- if (sourceGC->serialNumber != pDrawable->serialNumber)
- ValidateGC (pDrawable, sourceGC);
-
- if(sourceGC->miTranslate)
- {
- x = pDrawable->x + x_org;
- y = pDrawable->y + y_org;
- }
- else
- {
- x = x_org;
- y = y_org;
- }
-
- (*sourceGC->ops->PushPixels) (sourceGC, pPriv->sourceBits, pDrawable, w, h, x, y);
- if (maskGC->fgPixel != mask)
- {
- gcval.val = mask;
- ChangeGC (NullClient, maskGC, GCForeground, &gcval);
- }
- if (maskGC->serialNumber != pDrawable->serialNumber)
- ValidateGC (pDrawable, maskGC);
-
- if(maskGC->miTranslate)
- {
- x = pDrawable->x + x_org;
- y = pDrawable->y + y_org;
- }
- else
- {
- x = x_org;
- y = y_org;
- }
-
- (*maskGC->ops->PushPixels) (maskGC, pPriv->maskBits, pDrawable, w, h, x, y);
-}
-
-static GCPtr
-miDCMakeGC(WindowPtr pWin)
-{
- GCPtr pGC;
- int status;
- XID gcvals[2];
-
- gcvals[0] = IncludeInferiors;
- gcvals[1] = FALSE;
- pGC = CreateGC((DrawablePtr)pWin,
- GCSubwindowMode|GCGraphicsExposures, gcvals, &status,
- (XID)0, serverClient);
- return pGC;
-}
-
-
-Bool
-miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
- int x, int y, unsigned long source, unsigned long mask)
-{
- miDCScreenPtr pScreenPriv;
- miDCCursorPtr pPriv;
- miDCBufferPtr pBuffer;
- WindowPtr pWin;
-
- pPriv = (miDCCursorPtr)dixLookupScreenPrivate(&pCursor->bits->devPrivates,
- miDCCursorBitsKey, pScreen);
- if (!pPriv)
- {
- pPriv = miDCRealize(pScreen, pCursor);
- if (!pPriv)
- return FALSE;
- }
- pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
- miDCScreenKey);
- pWin = pScreen->root;
- pBuffer = miGetDCDevice(pDev, pScreen);
-
-#ifdef ARGB_CURSOR
- if (pPriv->pPicture)
- {
- if (!EnsurePicture(pBuffer->pRootPicture, &pWin->drawable, pWin))
- return FALSE;
- CompositePicture (PictOpOver,
- pPriv->pPicture,
- NULL,
- pBuffer->pRootPicture,
- 0, 0, 0, 0,
- x, y,
- pCursor->bits->width,
- pCursor->bits->height);
- }
- else
-#endif
- {
- miDCPutBits ((DrawablePtr)pWin, pPriv,
- pBuffer->pSourceGC, pBuffer->pMaskGC,
- x, y, pCursor->bits->width, pCursor->bits->height,
- source, mask);
- }
- return TRUE;
-}
-
-Bool
-miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
- int x, int y, int w, int h)
-{
- miDCScreenPtr pScreenPriv;
- miDCBufferPtr pBuffer;
- PixmapPtr pSave;
- WindowPtr pWin;
- GCPtr pGC;
-
- pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
- miDCScreenKey);
- pBuffer = miGetDCDevice(pDev, pScreen);
-
- pSave = pBuffer->pSave;
- pWin = pScreen->root;
- if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h)
- {
- if (pSave)
- (*pScreen->DestroyPixmap) (pSave);
- pBuffer->pSave = pSave =
- (*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth, 0);
- if (!pSave)
- return FALSE;
- }
-
- pGC = pBuffer->pSaveGC;
- if (pSave->drawable.serialNumber != pGC->serialNumber)
- ValidateGC ((DrawablePtr) pSave, pGC);
- (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC,
- x, y, w, h, 0, 0);
- return TRUE;
-}
-
-Bool
-miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
- int x, int y, int w, int h)
-{
- miDCScreenPtr pScreenPriv;
- miDCBufferPtr pBuffer;
- PixmapPtr pSave;
- WindowPtr pWin;
- GCPtr pGC;
-
- pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
- miDCScreenKey);
- pBuffer = miGetDCDevice(pDev, pScreen);
- pSave = pBuffer->pSave;
-
- pWin = pScreen->root;
- if (!pSave)
- return FALSE;
-
- pGC = pBuffer->pRestoreGC;
- if (pWin->drawable.serialNumber != pGC->serialNumber)
- ValidateGC ((DrawablePtr) pWin, pGC);
- (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC,
- 0, 0, w, h, x, y);
- return TRUE;
-}
-
-Bool
-miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
-{
- miDCBufferPtr pBuffer;
- WindowPtr pWin;
- int i;
-
- if (!DevHasCursor(pDev))
- return TRUE;
-
- for (i = 0; i < screenInfo.numScreens; i++)
- {
- pScreen = screenInfo.screens[i];
-
- pBuffer = calloc(1, sizeof(miDCBufferRec));
- if (!pBuffer)
- goto failure;
-
- dixSetScreenPrivate(&pDev->devPrivates, miDCDeviceKey, pScreen, pBuffer);
- pWin = pScreen->root;
-
- pBuffer->pSourceGC = miDCMakeGC(pWin);
- if (!pBuffer->pSourceGC)
- goto failure;
-
- pBuffer->pMaskGC = miDCMakeGC(pWin);
- if (!pBuffer->pMaskGC)
- goto failure;
-
- pBuffer->pSaveGC = miDCMakeGC(pWin);
- if (!pBuffer->pSaveGC)
- goto failure;
-
- pBuffer->pRestoreGC = miDCMakeGC(pWin);
- if (!pBuffer->pRestoreGC)
- goto failure;
-
-#ifdef ARGB_CURSOR
- pBuffer->pRootPicture = NULL;
-#endif
-
- /* (re)allocated lazily depending on the cursor size */
- pBuffer->pSave = NULL;
- }
-
- return TRUE;
-
-failure:
-
- miDCDeviceCleanup(pDev, pScreen);
-
- return FALSE;
-}
-
-void
-miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
-{
- miDCBufferPtr pBuffer;
- int i;
-
- if (DevHasCursor(pDev))
- {
- for (i = 0; i < screenInfo.numScreens; i++)
- {
- pScreen = screenInfo.screens[i];
-
- pBuffer = miGetDCDevice(pDev, pScreen);
-
- if (pBuffer)
- {
- if (pBuffer->pSourceGC) FreeGC(pBuffer->pSourceGC, (GContext) 0);
- if (pBuffer->pMaskGC) FreeGC(pBuffer->pMaskGC, (GContext) 0);
- if (pBuffer->pSaveGC) FreeGC(pBuffer->pSaveGC, (GContext) 0);
- if (pBuffer->pRestoreGC) FreeGC(pBuffer->pRestoreGC, (GContext) 0);
-
-#ifdef ARGB_CURSOR
- /* If a pRootPicture was allocated for a root window, it
- * is freed when that root window is destroyed, so don't
- * free it again here. */
-#endif
-
- if (pBuffer->pSave) (*pScreen->DestroyPixmap)(pBuffer->pSave);
-
- free(pBuffer);
- dixSetScreenPrivate(&pDev->devPrivates, miDCDeviceKey, pScreen, NULL);
- }
- }
- }
-}
+/*
+ * midispcur.c
+ *
+ * machine independent cursor display routines
+ */
+
+
+/*
+
+Copyright 1989, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+# include <X11/X.h>
+# include "misc.h"
+# include "input.h"
+# include "cursorstr.h"
+# include "windowstr.h"
+# include "regionstr.h"
+# include "dixstruct.h"
+# include "scrnintstr.h"
+# include "servermd.h"
+# include "mipointer.h"
+# include "misprite.h"
+# include "gcstruct.h"
+
+#ifdef ARGB_CURSOR
+# include "picturestr.h"
+#endif
+
+# include "inputstr.h"
+
+/* per-screen private data */
+static DevPrivateKeyRec miDCScreenKeyRec;
+#define miDCScreenKey (&miDCScreenKeyRec)
+static DevScreenPrivateKeyRec miDCCursorBitsKeyRec;
+#define miDCCursorBitsKey (&miDCCursorBitsKeyRec)
+static DevScreenPrivateKeyRec miDCDeviceKeyRec;
+#define miDCDeviceKey (&miDCDeviceKeyRec)
+
+static Bool miDCCloseScreen(int index, ScreenPtr pScreen);
+
+/* per device private data */
+typedef struct {
+ GCPtr pSourceGC, pMaskGC;
+ GCPtr pSaveGC, pRestoreGC;
+ PixmapPtr pSave;
+#ifdef ARGB_CURSOR
+ PicturePtr pRootPicture;
+#endif
+} miDCBufferRec, *miDCBufferPtr;
+
+#define miGetDCDevice(dev, screen) \
+ ((DevHasCursor(dev)) ? \
+ (miDCBufferPtr)dixLookupScreenPrivate(&dev->devPrivates, miDCDeviceKey, screen) : \
+ (miDCBufferPtr)dixLookupScreenPrivate(&GetMaster(dev, MASTER_POINTER)->devPrivates, miDCDeviceKey, screen))
+
+/*
+ * The core pointer buffer will point to the index of the virtual core pointer
+ * in the pCursorBuffers array.
+ */
+typedef struct {
+ CloseScreenProcPtr CloseScreen;
+} miDCScreenRec, *miDCScreenPtr;
+
+#define miGetDCScreen(s) ((miDCScreenPtr)(dixLookupPrivate(&(s)->devPrivates, miDCScreenKey)))
+
+/* per-cursor per-screen private data */
+typedef struct {
+ PixmapPtr sourceBits; /* source bits */
+ PixmapPtr maskBits; /* mask bits */
+#ifdef ARGB_CURSOR
+ PicturePtr pPicture;
+#endif
+} miDCCursorRec, *miDCCursorPtr;
+
+Bool
+miDCInitialize (ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs)
+{
+ miDCScreenPtr pScreenPriv;
+
+ if (!dixRegisterPrivateKey(&miDCScreenKeyRec, PRIVATE_SCREEN, 0) ||
+ !dixRegisterScreenPrivateKey(&miDCCursorBitsKeyRec, pScreen, PRIVATE_CURSOR_BITS, 0) ||
+ !dixRegisterScreenPrivateKey(&miDCDeviceKeyRec, pScreen, PRIVATE_DEVICE, 0))
+ return FALSE;
+
+ pScreenPriv = malloc(sizeof (miDCScreenRec));
+ if (!pScreenPriv)
+ return FALSE;
+
+ pScreenPriv->CloseScreen = pScreen->CloseScreen;
+ pScreen->CloseScreen = miDCCloseScreen;
+
+ dixSetPrivate(&pScreen->devPrivates, miDCScreenKey, pScreenPriv);
+
+ if (!miSpriteInitialize (pScreen, screenFuncs))
+ {
+ free((pointer) pScreenPriv);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static Bool
+miDCCloseScreen (int index, ScreenPtr pScreen)
+{
+ miDCScreenPtr pScreenPriv;
+
+ pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ miDCScreenKey);
+ pScreen->CloseScreen = pScreenPriv->CloseScreen;
+ free((pointer) pScreenPriv);
+ return (*pScreen->CloseScreen) (index, pScreen);
+}
+
+Bool
+miDCRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
+{
+ if (pCursor->bits->refcnt <= 1)
+ dixSetScreenPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey, pScreen, NULL);
+ return TRUE;
+}
+
+#ifdef ARGB_CURSOR
+#define EnsurePicture(picture,draw,win) (picture || miDCMakePicture(&picture,draw,win))
+
+static VisualPtr
+miDCGetWindowVisual (WindowPtr pWin)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ VisualID vid = wVisual (pWin);
+ int i;
+
+ for (i = 0; i < pScreen->numVisuals; i++)
+ if (pScreen->visuals[i].vid == vid)
+ return &pScreen->visuals[i];
+ return 0;
+}
+
+static PicturePtr
+miDCMakePicture (PicturePtr *ppPicture, DrawablePtr pDraw, WindowPtr pWin)
+{
+ ScreenPtr pScreen = pDraw->pScreen;
+ VisualPtr pVisual;
+ PictFormatPtr pFormat;
+ XID subwindow_mode = IncludeInferiors;
+ PicturePtr pPicture;
+ int error;
+
+ pVisual = miDCGetWindowVisual (pWin);
+ if (!pVisual)
+ return 0;
+ pFormat = PictureMatchVisual (pScreen, pDraw->depth, pVisual);
+ if (!pFormat)
+ return 0;
+ pPicture = CreatePicture (0, pDraw, pFormat,
+ CPSubwindowMode, &subwindow_mode,
+ serverClient, &error);
+ *ppPicture = pPicture;
+ return pPicture;
+}
+#endif
+
+static miDCCursorPtr
+miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
+{
+ miDCCursorPtr pPriv;
+ GCPtr pGC;
+ ChangeGCVal gcvals;
+
+ pPriv = malloc(sizeof (miDCCursorRec));
+ if (!pPriv)
+ return NULL;
+#ifdef ARGB_CURSOR
+ if (pCursor->bits->argb)
+ {
+ PixmapPtr pPixmap;
+ PictFormatPtr pFormat;
+ int error;
+
+ pFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8);
+ if (!pFormat)
+ {
+ free((pointer) pPriv);
+ return NULL;
+ }
+
+ pPriv->sourceBits = 0;
+ pPriv->maskBits = 0;
+ pPixmap = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width,
+ pCursor->bits->height, 32,
+ CREATE_PIXMAP_USAGE_SCRATCH);
+ if (!pPixmap)
+ {
+ free((pointer) pPriv);
+ return NULL;
+ }
+ pGC = GetScratchGC (32, pScreen);
+ if (!pGC)
+ {
+ (*pScreen->DestroyPixmap) (pPixmap);
+ free((pointer) pPriv);
+ return NULL;
+ }
+ ValidateGC (&pPixmap->drawable, pGC);
+ (*pGC->ops->PutImage) (&pPixmap->drawable, pGC, 32,
+ 0, 0, pCursor->bits->width,
+ pCursor->bits->height,
+ 0, ZPixmap, (char *) pCursor->bits->argb);
+ FreeScratchGC (pGC);
+ pPriv->pPicture = CreatePicture (0, &pPixmap->drawable,
+ pFormat, 0, 0, serverClient, &error);
+ (*pScreen->DestroyPixmap) (pPixmap);
+ if (!pPriv->pPicture)
+ {
+ free((pointer) pPriv);
+ return NULL;
+ }
+ dixSetScreenPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey, pScreen, pPriv);
+ return pPriv;
+ }
+ pPriv->pPicture = 0;
+#endif
+ pPriv->sourceBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0);
+ if (!pPriv->sourceBits)
+ {
+ free((pointer) pPriv);
+ return NULL;
+ }
+ pPriv->maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0);
+ if (!pPriv->maskBits)
+ {
+ (*pScreen->DestroyPixmap) (pPriv->sourceBits);
+ free((pointer) pPriv);
+ return NULL;
+ }
+ dixSetScreenPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey, pScreen, pPriv);
+
+ /* create the two sets of bits, clipping as appropriate */
+
+ pGC = GetScratchGC (1, pScreen);
+ if (!pGC)
+ {
+ (void) miDCUnrealizeCursor (pScreen, pCursor);
+ return NULL;
+ }
+
+ ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC);
+ (*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1,
+ 0, 0, pCursor->bits->width, pCursor->bits->height,
+ 0, XYPixmap, (char *)pCursor->bits->source);
+ gcvals.val = GXand;
+ ChangeGC (NullClient, pGC, GCFunction, &gcvals);
+ ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC);
+ (*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1,
+ 0, 0, pCursor->bits->width, pCursor->bits->height,
+ 0, XYPixmap, (char *)pCursor->bits->mask);
+
+ /* mask bits -- pCursor->mask & ~pCursor->source */
+ gcvals.val = GXcopy;
+ ChangeGC (NullClient, pGC, GCFunction, &gcvals);
+ ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
+ (*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
+ 0, 0, pCursor->bits->width, pCursor->bits->height,
+ 0, XYPixmap, (char *)pCursor->bits->mask);
+ gcvals.val = GXandInverted;
+ ChangeGC (NullClient, pGC, GCFunction, &gcvals);
+ ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
+ (*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
+ 0, 0, pCursor->bits->width, pCursor->bits->height,
+ 0, XYPixmap, (char *)pCursor->bits->source);
+ FreeScratchGC (pGC);
+ return pPriv;
+}
+
+Bool
+miDCUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
+{
+ miDCCursorPtr pPriv;
+
+ pPriv = (miDCCursorPtr)dixLookupScreenPrivate(&pCursor->bits->devPrivates,
+ miDCCursorBitsKey, pScreen);
+ if (pPriv && (pCursor->bits->refcnt <= 1))
+ {
+ if (pPriv->sourceBits)
+ (*pScreen->DestroyPixmap) (pPriv->sourceBits);
+ if (pPriv->maskBits)
+ (*pScreen->DestroyPixmap) (pPriv->maskBits);
+#ifdef ARGB_CURSOR
+ if (pPriv->pPicture)
+ FreePicture (pPriv->pPicture, 0);
+#endif
+ free((pointer) pPriv);
+ dixSetScreenPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey, pScreen, NULL);
+ }
+ return TRUE;
+}
+
+static void
+miDCPutBits (
+ DrawablePtr pDrawable,
+ miDCCursorPtr pPriv,
+ GCPtr sourceGC,
+ GCPtr maskGC,
+ int x_org,
+ int y_org,
+ unsigned w,
+ unsigned h,
+ unsigned long source,
+ unsigned long mask)
+{
+ ChangeGCVal gcval;
+ int x, y;
+
+ if (sourceGC->fgPixel != source)
+ {
+ gcval.val = source;
+ ChangeGC (NullClient, sourceGC, GCForeground, &gcval);
+ }
+ if (sourceGC->serialNumber != pDrawable->serialNumber)
+ ValidateGC (pDrawable, sourceGC);
+
+ if(sourceGC->miTranslate)
+ {
+ x = pDrawable->x + x_org;
+ y = pDrawable->y + y_org;
+ }
+ else
+ {
+ x = x_org;
+ y = y_org;
+ }
+
+ (*sourceGC->ops->PushPixels) (sourceGC, pPriv->sourceBits, pDrawable, w, h, x, y);
+ if (maskGC->fgPixel != mask)
+ {
+ gcval.val = mask;
+ ChangeGC (NullClient, maskGC, GCForeground, &gcval);
+ }
+ if (maskGC->serialNumber != pDrawable->serialNumber)
+ ValidateGC (pDrawable, maskGC);
+
+ if(maskGC->miTranslate)
+ {
+ x = pDrawable->x + x_org;
+ y = pDrawable->y + y_org;
+ }
+ else
+ {
+ x = x_org;
+ y = y_org;
+ }
+
+ (*maskGC->ops->PushPixels) (maskGC, pPriv->maskBits, pDrawable, w, h, x, y);
+}
+
+static GCPtr
+miDCMakeGC(WindowPtr pWin)
+{
+ GCPtr pGC;
+ int status;
+ XID gcvals[2];
+
+ gcvals[0] = IncludeInferiors;
+ gcvals[1] = FALSE;
+ pGC = CreateGC((DrawablePtr)pWin,
+ GCSubwindowMode|GCGraphicsExposures, gcvals, &status,
+ (XID)0, serverClient);
+ return pGC;
+}
+
+
+Bool
+miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
+ int x, int y, unsigned long source, unsigned long mask)
+{
+ miDCScreenPtr pScreenPriv;
+ miDCCursorPtr pPriv;
+ miDCBufferPtr pBuffer;
+ WindowPtr pWin;
+
+ pPriv = (miDCCursorPtr)dixLookupScreenPrivate(&pCursor->bits->devPrivates,
+ miDCCursorBitsKey, pScreen);
+ if (!pPriv)
+ {
+ pPriv = miDCRealize(pScreen, pCursor);
+ if (!pPriv)
+ return FALSE;
+ }
+ pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ miDCScreenKey);
+ pWin = pScreen->root;
+ pBuffer = miGetDCDevice(pDev, pScreen);
+
+#ifdef ARGB_CURSOR
+ if (pPriv->pPicture)
+ {
+ if (!EnsurePicture(pBuffer->pRootPicture, &pWin->drawable, pWin))
+ return FALSE;
+ CompositePicture (PictOpOver,
+ pPriv->pPicture,
+ NULL,
+ pBuffer->pRootPicture,
+ 0, 0, 0, 0,
+ x, y,
+ pCursor->bits->width,
+ pCursor->bits->height);
+ }
+ else
+#endif
+ {
+ miDCPutBits ((DrawablePtr)pWin, pPriv,
+ pBuffer->pSourceGC, pBuffer->pMaskGC,
+ x, y, pCursor->bits->width, pCursor->bits->height,
+ source, mask);
+ }
+ return TRUE;
+}
+
+Bool
+miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
+ int x, int y, int w, int h)
+{
+ miDCScreenPtr pScreenPriv;
+ miDCBufferPtr pBuffer;
+ PixmapPtr pSave;
+ WindowPtr pWin;
+ GCPtr pGC;
+
+ pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ miDCScreenKey);
+ pBuffer = miGetDCDevice(pDev, pScreen);
+
+ pSave = pBuffer->pSave;
+ pWin = pScreen->root;
+ if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h)
+ {
+ if (pSave)
+ (*pScreen->DestroyPixmap) (pSave);
+ pBuffer->pSave = pSave =
+ (*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth, 0);
+ if (!pSave)
+ return FALSE;
+ }
+
+ pGC = pBuffer->pSaveGC;
+ if (pSave->drawable.serialNumber != pGC->serialNumber)
+ ValidateGC ((DrawablePtr) pSave, pGC);
+ (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC,
+ x, y, w, h, 0, 0);
+ return TRUE;
+}
+
+Bool
+miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
+ int x, int y, int w, int h)
+{
+ miDCScreenPtr pScreenPriv;
+ miDCBufferPtr pBuffer;
+ PixmapPtr pSave;
+ WindowPtr pWin;
+ GCPtr pGC;
+
+ pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ miDCScreenKey);
+ pBuffer = miGetDCDevice(pDev, pScreen);
+ pSave = pBuffer->pSave;
+
+ pWin = pScreen->root;
+ if (!pSave)
+ return FALSE;
+
+ pGC = pBuffer->pRestoreGC;
+ if (pWin->drawable.serialNumber != pGC->serialNumber)
+ ValidateGC ((DrawablePtr) pWin, pGC);
+ (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC,
+ 0, 0, w, h, x, y);
+ return TRUE;
+}
+
+Bool
+miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+ miDCBufferPtr pBuffer;
+ WindowPtr pWin;
+ int i;
+
+ if (!DevHasCursor(pDev))
+ return TRUE;
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ {
+ pScreen = screenInfo.screens[i];
+
+ pBuffer = calloc(1, sizeof(miDCBufferRec));
+ if (!pBuffer)
+ goto failure;
+
+ dixSetScreenPrivate(&pDev->devPrivates, miDCDeviceKey, pScreen, pBuffer);
+ pWin = pScreen->root;
+
+ pBuffer->pSourceGC = miDCMakeGC(pWin);
+ if (!pBuffer->pSourceGC)
+ goto failure;
+
+ pBuffer->pMaskGC = miDCMakeGC(pWin);
+ if (!pBuffer->pMaskGC)
+ goto failure;
+
+ pBuffer->pSaveGC = miDCMakeGC(pWin);
+ if (!pBuffer->pSaveGC)
+ goto failure;
+
+ pBuffer->pRestoreGC = miDCMakeGC(pWin);
+ if (!pBuffer->pRestoreGC)
+ goto failure;
+
+#ifdef ARGB_CURSOR
+ pBuffer->pRootPicture = NULL;
+#endif
+
+ /* (re)allocated lazily depending on the cursor size */
+ pBuffer->pSave = NULL;
+ }
+
+ return TRUE;
+
+failure:
+
+ miDCDeviceCleanup(pDev, pScreen);
+
+ return FALSE;
+}
+
+void
+miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+ miDCBufferPtr pBuffer;
+ int i;
+
+ if (DevHasCursor(pDev))
+ {
+ for (i = 0; i < screenInfo.numScreens; i++)
+ {
+ pScreen = screenInfo.screens[i];
+
+ pBuffer = miGetDCDevice(pDev, pScreen);
+
+ if (pBuffer)
+ {
+ if (pBuffer->pSourceGC) FreeGC(pBuffer->pSourceGC, (GContext) 0);
+ if (pBuffer->pMaskGC) FreeGC(pBuffer->pMaskGC, (GContext) 0);
+ if (pBuffer->pSaveGC) FreeGC(pBuffer->pSaveGC, (GContext) 0);
+ if (pBuffer->pRestoreGC) FreeGC(pBuffer->pRestoreGC, (GContext) 0);
+
+#ifdef ARGB_CURSOR
+ /* If a pRootPicture was allocated for a root window, it
+ * is freed when that root window is destroyed, so don't
+ * free it again here. */
+#endif
+
+ if (pBuffer->pSave) (*pScreen->DestroyPixmap)(pBuffer->pSave);
+
+ free(pBuffer);
+ dixSetScreenPrivate(&pDev->devPrivates, miDCDeviceKey, pScreen, NULL);
+ }
+ }
+ }
+}
diff --git a/xorg-server/mi/mieq.c b/xorg-server/mi/mieq.c
index 08a0c8758..a8daf572b 100644
--- a/xorg-server/mi/mieq.c
+++ b/xorg-server/mi/mieq.c
@@ -1,497 +1,498 @@
-/*
- *
-Copyright 1990, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- * Author: Keith Packard, MIT X Consortium
- */
-
-/*
- * mieq.c
- *
- * Machine independent event queue
- *
- */
-
-#if HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-# include <X11/X.h>
-# include <X11/Xmd.h>
-# include <X11/Xproto.h>
-# include "misc.h"
-# include "windowstr.h"
-# include "pixmapstr.h"
-# include "inputstr.h"
-# include "mi.h"
-# include "mipointer.h"
-# include "scrnintstr.h"
-# include <X11/extensions/XI.h>
-# include <X11/extensions/XIproto.h>
-# include <X11/extensions/geproto.h>
-# include "extinit.h"
-# include "exglobals.h"
-# include "eventstr.h"
-
-#ifdef DPMSExtension
-# include "dpmsproc.h"
-# include <X11/extensions/dpmsconst.h>
-#endif
-
-#define QUEUE_SIZE 512
-
-#define EnqueueScreen(dev) dev->spriteInfo->sprite->pEnqueueScreen
-#define DequeueScreen(dev) dev->spriteInfo->sprite->pDequeueScreen
-
-typedef struct _Event {
- EventListPtr events;
- ScreenPtr pScreen;
- DeviceIntPtr pDev; /* device this event _originated_ from */
-} EventRec, *EventPtr;
-
-typedef struct _EventQueue {
- HWEventQueueType head, tail; /* long for SetInputCheck */
- CARD32 lastEventTime; /* to avoid time running backwards */
- int lastMotion; /* device ID if last event motion? */
- EventRec events[QUEUE_SIZE]; /* static allocation for signals */
- mieqHandler handlers[128]; /* custom event handler */
-} EventQueueRec, *EventQueuePtr;
-
-static EventQueueRec miEventQueue;
-
-#ifdef XQUARTZ
-#include <pthread.h>
-static pthread_mutex_t miEventQueueMutex = PTHREAD_MUTEX_INITIALIZER;
-
-extern BOOL serverInitComplete;
-extern pthread_mutex_t serverInitCompleteMutex;
-extern pthread_cond_t serverInitCompleteCond;
-
-static inline void wait_for_server_init(void) {
- /* If the server hasn't finished initializing, wait for it... */
- if(!serverInitComplete) {
- pthread_mutex_lock(&serverInitCompleteMutex);
- while(!serverInitComplete)
- pthread_cond_wait(&serverInitCompleteCond, &serverInitCompleteMutex);
- pthread_mutex_unlock(&serverInitCompleteMutex);
- }
-}
-#endif
-
-Bool
-mieqInit(void)
-{
- int i;
-
- miEventQueue.head = miEventQueue.tail = 0;
- miEventQueue.lastEventTime = GetTimeInMillis ();
- miEventQueue.lastMotion = FALSE;
- for (i = 0; i < 128; i++)
- miEventQueue.handlers[i] = NULL;
- for (i = 0; i < QUEUE_SIZE; i++)
- {
- if (miEventQueue.events[i].events == NULL) {
- EventListPtr evlist = InitEventList(1);
- if (!evlist)
- FatalError("Could not allocate event queue.\n");
- miEventQueue.events[i].events = evlist;
- }
- }
-
- SetInputCheck(&miEventQueue.head, &miEventQueue.tail);
- return TRUE;
-}
-
-void
-mieqFini(void)
-{
- int i;
- for (i = 0; i < QUEUE_SIZE; i++)
- {
- if (miEventQueue.events[i].events != NULL) {
- FreeEventList(miEventQueue.events[i].events, 1);
- miEventQueue.events[i].events = NULL;
- }
- }
-}
-
-/*
- * Must be reentrant with ProcessInputEvents. Assumption: mieqEnqueue
- * will never be interrupted. If this is called from both signal
- * handlers and regular code, make sure the signal is suspended when
- * called from regular code.
- */
-
-void
-mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e)
-{
- unsigned int oldtail = miEventQueue.tail;
- EventListPtr evt;
- int isMotion = 0;
- int evlen;
- Time time;
-
-#ifdef XQUARTZ
- wait_for_server_init();
- pthread_mutex_lock(&miEventQueueMutex);
-#endif
-
- CHECKEVENT(e);
-
- /* avoid merging events from different devices */
- if (e->any.type == ET_Motion)
- isMotion = pDev->id;
-
- if (isMotion && isMotion == miEventQueue.lastMotion &&
- oldtail != miEventQueue.head) {
- oldtail = (oldtail - 1) % QUEUE_SIZE;
- }
- else {
- static int stuck = 0;
- /* Toss events which come in late. Usually this means your server's
- * stuck in an infinite loop somewhere, but SIGIO is still getting
- * handled. */
- if (((oldtail + 1) % QUEUE_SIZE) == miEventQueue.head) {
- if (!stuck) {
- ErrorF("[mi] EQ overflowing. The server is probably stuck "
- "in an infinite loop.\n");
- xorg_backtrace();
- stuck = 1;
- }
-#ifdef XQUARTZ
- pthread_mutex_unlock(&miEventQueueMutex);
-#endif
- return;
- }
- stuck = 0;
- }
-
- evlen = e->any.length;
- evt = miEventQueue.events[oldtail].events;
- if (evt->evlen < evlen)
- {
- evt->evlen = evlen;
- evt->event = realloc(evt->event, evt->evlen);
- if (!evt->event)
- {
- ErrorF("[mi] Running out of memory. Tossing event.\n");
-#ifdef XQUARTZ
- pthread_mutex_unlock(&miEventQueueMutex);
-#endif
- return;
- }
- }
-
- memcpy(evt->event, e, evlen);
-
- time = e->any.time;
- /* Make sure that event times don't go backwards - this
- * is "unnecessary", but very useful. */
- if (time < miEventQueue.lastEventTime &&
- miEventQueue.lastEventTime - time < 10000)
- e->any.time = miEventQueue.lastEventTime;
-
- miEventQueue.lastEventTime = ((InternalEvent*)evt->event)->any.time;
- miEventQueue.events[oldtail].pScreen = pDev ? EnqueueScreen(pDev) : NULL;
- miEventQueue.events[oldtail].pDev = pDev;
-
- miEventQueue.lastMotion = isMotion;
- miEventQueue.tail = (oldtail + 1) % QUEUE_SIZE;
-#ifdef XQUARTZ
- pthread_mutex_unlock(&miEventQueueMutex);
-#endif
-}
-
-void
-mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool fromDIX)
-{
-#ifdef XQUARTZ
- pthread_mutex_lock(&miEventQueueMutex);
-#endif
- EnqueueScreen(pDev) = pScreen;
- if (fromDIX)
- DequeueScreen(pDev) = pScreen;
-#ifdef XQUARTZ
- pthread_mutex_unlock(&miEventQueueMutex);
-#endif
-}
-
-void
-mieqSetHandler(int event, mieqHandler handler)
-{
-#ifdef XQUARTZ
- pthread_mutex_lock(&miEventQueueMutex);
-#endif
- if (handler && miEventQueue.handlers[event])
- ErrorF("[mi] mieq: warning: overriding existing handler %p with %p for "
- "event %d\n", miEventQueue.handlers[event], handler, event);
-
- miEventQueue.handlers[event] = handler;
-#ifdef XQUARTZ
- pthread_mutex_unlock(&miEventQueueMutex);
-#endif
-}
-
-/**
- * Change the device id of the given event to the given device's id.
- */
-static void
-ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event)
-{
- switch(event->any.type)
- {
- case ET_Motion:
- case ET_KeyPress:
- case ET_KeyRelease:
- case ET_ButtonPress:
- case ET_ButtonRelease:
- case ET_ProximityIn:
- case ET_ProximityOut:
- case ET_Hierarchy:
- case ET_DeviceChanged:
- event->device_event.deviceid = dev->id;
- break;
-#if XFreeXDGA
- case ET_DGAEvent:
- break;
-#endif
- case ET_RawKeyPress:
- case ET_RawKeyRelease:
- case ET_RawButtonPress:
- case ET_RawButtonRelease:
- case ET_RawMotion:
- event->raw_event.deviceid = dev->id;
- break;
- default:
- ErrorF("[mi] Unknown event type (%d), cannot change id.\n",
- event->any.type);
- }
-}
-
-static void
-FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev,
- InternalEvent* original, InternalEvent *master)
-{
- CHECKEVENT(original);
- CHECKEVENT(master);
- /* Ensure chained button mappings, i.e. that the detail field is the
- * value of the mapped button on the SD, not the physical button */
- if (original->any.type == ET_ButtonPress ||
- original->any.type == ET_ButtonRelease)
- {
- int btn = original->device_event.detail.button;
- if (!sdev->button)
- return; /* Should never happen */
-
- master->device_event.detail.button = sdev->button->map[btn];
- }
-}
-
-/**
- * Copy the given event into master.
- * @param sdev The slave device the original event comes from
- * @param original The event as it came from the EQ
- * @param copy The event after being copied
- * @return The master device or NULL if the device is a floating slave.
- */
-DeviceIntPtr
-CopyGetMasterEvent(DeviceIntPtr sdev,
- InternalEvent* original, InternalEvent *copy)
-{
- DeviceIntPtr mdev;
- int len = original->any.length;
- int type = original->any.type;
- int mtype; /* which master type? */
-
- CHECKEVENT(original);
-
- /* ET_XQuartz has sdev == NULL */
- if (!sdev || IsMaster(sdev) || IsFloating(sdev))
- return NULL;
-
-#if XFreeXDGA
- if (type == ET_DGAEvent)
- type = original->dga_event.subtype;
-#endif
-
- switch(type)
- {
- case ET_KeyPress:
- case ET_KeyRelease:
- mtype = MASTER_KEYBOARD;
- break;
- case ET_ButtonPress:
- case ET_ButtonRelease:
- case ET_Motion:
- case ET_ProximityIn:
- case ET_ProximityOut:
- mtype = MASTER_POINTER;
- break;
- default:
- mtype = MASTER_ATTACHED;
- break;
- }
-
- mdev = GetMaster(sdev, mtype);
- memcpy(copy, original, len);
- ChangeDeviceID(mdev, copy);
- FixUpEventForMaster(mdev, sdev, original, copy);
-
- return mdev;
-}
-
-
-/**
- * Post the given @event through the device hierarchy, as appropriate.
- * Use this function if an event must be posted for a given device during the
- * usual event processing cycle.
- */
-void
-mieqProcessDeviceEvent(DeviceIntPtr dev,
- InternalEvent *event,
- ScreenPtr screen)
-{
- mieqHandler handler;
- int x = 0, y = 0;
- DeviceIntPtr master;
- InternalEvent mevent; /* master event */
-
- CHECKEVENT(event);
-
- /* Custom event handler */
- handler = miEventQueue.handlers[event->any.type];
-
- switch (event->any.type) {
- /* Catch events that include valuator information and check if they
- * are changing the screen */
- case ET_Motion:
- case ET_KeyPress:
- case ET_KeyRelease:
- case ET_ButtonPress:
- case ET_ButtonRelease:
- if (dev && screen && screen != DequeueScreen(dev) && !handler) {
- DequeueScreen(dev) = screen;
- x = event->device_event.root_x;
- y = event->device_event.root_y;
- NewCurrentScreen (dev, DequeueScreen(dev), x, y);
- }
- break;
- default:
- break;
- }
- master = CopyGetMasterEvent(dev, event, &mevent);
-
- if (master)
- master->lastSlave = dev;
-
- /* If someone's registered a custom event handler, let them
- * steal it. */
- if (handler)
- {
- int screenNum = dev && DequeueScreen(dev) ? DequeueScreen(dev)->myNum : (screen ? screen->myNum : 0);
- handler(screenNum, event, dev);
- /* Check for the SD's master in case the device got detached
- * during event processing */
- if (master && !IsFloating(dev))
- handler(screenNum, &mevent, master);
- } else
- {
- /* process slave first, then master */
- dev->public.processInputProc(event, dev);
-
- /* Check for the SD's master in case the device got detached
- * during event processing */
- if (master && !IsFloating(dev))
- master->public.processInputProc(&mevent, master);
- }
-}
-
-/* Call this from ProcessInputEvents(). */
-void
-mieqProcessInputEvents(void)
-{
- EventRec *e = NULL;
- int evlen;
- ScreenPtr screen;
- static InternalEvent *event = NULL;
- static size_t event_size = 0;
- DeviceIntPtr dev = NULL,
- master = NULL;
-
-#ifdef XQUARTZ
- pthread_mutex_lock(&miEventQueueMutex);
-#endif
-
- while (miEventQueue.head != miEventQueue.tail) {
- e = &miEventQueue.events[miEventQueue.head];
-
- evlen = e->events->evlen;
- if(evlen > event_size)
- {
- event = realloc(event, evlen);
- event_size = evlen;
- }
-
-
- if (!event)
- FatalError("[mi] No memory left for event processing.\n");
-
- memcpy(event, e->events->event, evlen);
-
-
- dev = e->pDev;
- screen = e->pScreen;
-
- miEventQueue.head = (miEventQueue.head + 1) % QUEUE_SIZE;
-
-#ifdef XQUARTZ
- pthread_mutex_unlock(&miEventQueueMutex);
-#endif
-
- master = (dev) ? GetMaster(dev, MASTER_ATTACHED) : NULL;
-
- if (screenIsSaved == SCREEN_SAVER_ON)
- dixSaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
-#ifdef DPMSExtension
- else if (DPMSPowerLevel != DPMSModeOn)
- SetScreenSaverTimer();
-
- if (DPMSPowerLevel != DPMSModeOn)
- DPMSSet(serverClient, DPMSModeOn);
-#endif
-
- mieqProcessDeviceEvent(dev, event, screen);
-
- /* Update the sprite now. Next event may be from different device. */
- if (event->any.type == ET_Motion && master)
- miPointerUpdateSprite(dev);
-
-#ifdef XQUARTZ
- pthread_mutex_lock(&miEventQueueMutex);
-#endif
- }
-#ifdef XQUARTZ
- pthread_mutex_unlock(&miEventQueueMutex);
-#endif
-}
-
+/*
+ *
+Copyright 1990, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ * Author: Keith Packard, MIT X Consortium
+ */
+
+/*
+ * mieq.c
+ *
+ * Machine independent event queue
+ *
+ */
+
+#if HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+# include <X11/X.h>
+# include <X11/Xmd.h>
+# include <X11/Xproto.h>
+# include "misc.h"
+# include "windowstr.h"
+# include "pixmapstr.h"
+# include "inputstr.h"
+# include "mi.h"
+# include "mipointer.h"
+# include "scrnintstr.h"
+# include <X11/extensions/XI.h>
+# include <X11/extensions/XIproto.h>
+# include <X11/extensions/geproto.h>
+# include "extinit.h"
+# include "exglobals.h"
+# include "eventstr.h"
+
+#ifdef DPMSExtension
+# include "dpmsproc.h"
+# include <X11/extensions/dpmsconst.h>
+#endif
+
+#define QUEUE_SIZE 512
+
+#define EnqueueScreen(dev) dev->spriteInfo->sprite->pEnqueueScreen
+#define DequeueScreen(dev) dev->spriteInfo->sprite->pDequeueScreen
+
+typedef struct _Event {
+ EventListPtr events;
+ ScreenPtr pScreen;
+ DeviceIntPtr pDev; /* device this event _originated_ from */
+} EventRec, *EventPtr;
+
+typedef struct _EventQueue {
+ HWEventQueueType head, tail; /* long for SetInputCheck */
+ CARD32 lastEventTime; /* to avoid time running backwards */
+ int lastMotion; /* device ID if last event motion? */
+ EventRec events[QUEUE_SIZE]; /* static allocation for signals */
+ mieqHandler handlers[128]; /* custom event handler */
+} EventQueueRec, *EventQueuePtr;
+
+static EventQueueRec miEventQueue;
+
+#ifdef XQUARTZ
+#include <pthread.h>
+static pthread_mutex_t miEventQueueMutex = PTHREAD_MUTEX_INITIALIZER;
+
+extern BOOL serverInitComplete;
+extern pthread_mutex_t serverInitCompleteMutex;
+extern pthread_cond_t serverInitCompleteCond;
+
+static inline void wait_for_server_init(void) {
+ /* If the server hasn't finished initializing, wait for it... */
+ if(!serverInitComplete) {
+ pthread_mutex_lock(&serverInitCompleteMutex);
+ while(!serverInitComplete)
+ pthread_cond_wait(&serverInitCompleteCond, &serverInitCompleteMutex);
+ pthread_mutex_unlock(&serverInitCompleteMutex);
+ }
+}
+#endif
+
+Bool
+mieqInit(void)
+{
+ int i;
+
+ miEventQueue.head = miEventQueue.tail = 0;
+ miEventQueue.lastEventTime = GetTimeInMillis ();
+ miEventQueue.lastMotion = FALSE;
+ for (i = 0; i < 128; i++)
+ miEventQueue.handlers[i] = NULL;
+ for (i = 0; i < QUEUE_SIZE; i++)
+ {
+ if (miEventQueue.events[i].events == NULL) {
+ EventListPtr evlist = InitEventList(1);
+ if (!evlist)
+ FatalError("Could not allocate event queue.\n");
+ miEventQueue.events[i].events = evlist;
+ }
+ }
+
+ SetInputCheck(&miEventQueue.head, &miEventQueue.tail);
+ return TRUE;
+}
+
+void
+mieqFini(void)
+{
+ int i;
+ for (i = 0; i < QUEUE_SIZE; i++)
+ {
+ if (miEventQueue.events[i].events != NULL) {
+ FreeEventList(miEventQueue.events[i].events, 1);
+ miEventQueue.events[i].events = NULL;
+ }
+ }
+}
+
+/*
+ * Must be reentrant with ProcessInputEvents. Assumption: mieqEnqueue
+ * will never be interrupted. If this is called from both signal
+ * handlers and regular code, make sure the signal is suspended when
+ * called from regular code.
+ */
+
+void
+mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e)
+{
+ unsigned int oldtail = miEventQueue.tail;
+ EventListPtr evt;
+ int isMotion = 0;
+ int evlen;
+ Time time;
+
+#ifdef XQUARTZ
+ wait_for_server_init();
+ pthread_mutex_lock(&miEventQueueMutex);
+#endif
+
+ CHECKEVENT(e);
+
+ /* avoid merging events from different devices */
+ if (e->any.type == ET_Motion)
+ isMotion = pDev->id;
+
+ if (isMotion && isMotion == miEventQueue.lastMotion &&
+ oldtail != miEventQueue.head) {
+ oldtail = (oldtail - 1) % QUEUE_SIZE;
+ }
+ else {
+ static int stuck = 0;
+ /* Toss events which come in late. Usually this means your server's
+ * stuck in an infinite loop somewhere, but SIGIO is still getting
+ * handled. */
+ if (((oldtail + 1) % QUEUE_SIZE) == miEventQueue.head) {
+ if (!stuck) {
+ ErrorF("[mi] EQ overflowing. The server is probably stuck "
+ "in an infinite loop.\n");
+ xorg_backtrace();
+ stuck = 1;
+ }
+#ifdef XQUARTZ
+ pthread_mutex_unlock(&miEventQueueMutex);
+#endif
+ return;
+ }
+ stuck = 0;
+ }
+
+ evlen = e->any.length;
+ evt = miEventQueue.events[oldtail].events;
+ if (evt->evlen < evlen)
+ {
+ evt->evlen = evlen;
+ evt->event = realloc(evt->event, evt->evlen);
+ if (!evt->event)
+ {
+ ErrorF("[mi] Running out of memory. Tossing event.\n");
+#ifdef XQUARTZ
+ pthread_mutex_unlock(&miEventQueueMutex);
+#endif
+ return;
+ }
+ }
+
+ memcpy(evt->event, e, evlen);
+
+ time = e->any.time;
+ /* Make sure that event times don't go backwards - this
+ * is "unnecessary", but very useful. */
+ if (time < miEventQueue.lastEventTime &&
+ miEventQueue.lastEventTime - time < 10000)
+ e->any.time = miEventQueue.lastEventTime;
+
+ miEventQueue.lastEventTime = ((InternalEvent*)evt->event)->any.time;
+ miEventQueue.events[oldtail].pScreen = pDev ? EnqueueScreen(pDev) : NULL;
+ miEventQueue.events[oldtail].pDev = pDev;
+
+ miEventQueue.lastMotion = isMotion;
+ miEventQueue.tail = (oldtail + 1) % QUEUE_SIZE;
+#ifdef XQUARTZ
+ pthread_mutex_unlock(&miEventQueueMutex);
+#endif
+}
+
+void
+mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool fromDIX)
+{
+#ifdef XQUARTZ
+ pthread_mutex_lock(&miEventQueueMutex);
+#endif
+ EnqueueScreen(pDev) = pScreen;
+ if (fromDIX)
+ DequeueScreen(pDev) = pScreen;
+#ifdef XQUARTZ
+ pthread_mutex_unlock(&miEventQueueMutex);
+#endif
+}
+
+void
+mieqSetHandler(int event, mieqHandler handler)
+{
+#ifdef XQUARTZ
+ pthread_mutex_lock(&miEventQueueMutex);
+#endif
+ if (handler && miEventQueue.handlers[event])
+ ErrorF("[mi] mieq: warning: overriding existing handler %p with %p for "
+ "event %d\n", miEventQueue.handlers[event], handler, event);
+
+ miEventQueue.handlers[event] = handler;
+#ifdef XQUARTZ
+ pthread_mutex_unlock(&miEventQueueMutex);
+#endif
+}
+
+/**
+ * Change the device id of the given event to the given device's id.
+ */
+static void
+ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event)
+{
+ switch(event->any.type)
+ {
+ case ET_Motion:
+ case ET_KeyPress:
+ case ET_KeyRelease:
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ case ET_ProximityIn:
+ case ET_ProximityOut:
+ case ET_Hierarchy:
+ case ET_DeviceChanged:
+ event->device_event.deviceid = dev->id;
+ break;
+#if XFreeXDGA
+ case ET_DGAEvent:
+ break;
+#endif
+ case ET_RawKeyPress:
+ case ET_RawKeyRelease:
+ case ET_RawButtonPress:
+ case ET_RawButtonRelease:
+ case ET_RawMotion:
+ event->raw_event.deviceid = dev->id;
+ break;
+ default:
+ ErrorF("[mi] Unknown event type (%d), cannot change id.\n",
+ event->any.type);
+ }
+}
+
+static void
+FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev,
+ InternalEvent* original, InternalEvent *master)
+{
+ CHECKEVENT(original);
+ CHECKEVENT(master);
+ /* Ensure chained button mappings, i.e. that the detail field is the
+ * value of the mapped button on the SD, not the physical button */
+ if (original->any.type == ET_ButtonPress ||
+ original->any.type == ET_ButtonRelease)
+ {
+ int btn = original->device_event.detail.button;
+ if (!sdev->button)
+ return; /* Should never happen */
+
+ master->device_event.detail.button = sdev->button->map[btn];
+ }
+}
+
+/**
+ * Copy the given event into master.
+ * @param sdev The slave device the original event comes from
+ * @param original The event as it came from the EQ
+ * @param copy The event after being copied
+ * @return The master device or NULL if the device is a floating slave.
+ */
+DeviceIntPtr
+CopyGetMasterEvent(DeviceIntPtr sdev,
+ InternalEvent* original, InternalEvent *copy)
+{
+ DeviceIntPtr mdev;
+ int len = original->any.length;
+ int type = original->any.type;
+ int mtype; /* which master type? */
+
+ CHECKEVENT(original);
+
+ /* ET_XQuartz has sdev == NULL */
+ if (!sdev || IsMaster(sdev) || IsFloating(sdev))
+ return NULL;
+
+#if XFreeXDGA
+ if (type == ET_DGAEvent)
+ type = original->dga_event.subtype;
+#endif
+
+ switch(type)
+ {
+ case ET_KeyPress:
+ case ET_KeyRelease:
+ mtype = MASTER_KEYBOARD;
+ break;
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ case ET_Motion:
+ case ET_ProximityIn:
+ case ET_ProximityOut:
+ mtype = MASTER_POINTER;
+ break;
+ default:
+ mtype = MASTER_ATTACHED;
+ break;
+ }
+
+ mdev = GetMaster(sdev, mtype);
+ memcpy(copy, original, len);
+ ChangeDeviceID(mdev, copy);
+ FixUpEventForMaster(mdev, sdev, original, copy);
+
+ return mdev;
+}
+
+
+/**
+ * Post the given @event through the device hierarchy, as appropriate.
+ * Use this function if an event must be posted for a given device during the
+ * usual event processing cycle.
+ */
+void
+mieqProcessDeviceEvent(DeviceIntPtr dev,
+ InternalEvent *event,
+ ScreenPtr screen)
+{
+ mieqHandler handler;
+ int x = 0, y = 0;
+ DeviceIntPtr master;
+ InternalEvent mevent; /* master event */
+
+ CHECKEVENT(event);
+
+ /* Custom event handler */
+ handler = miEventQueue.handlers[event->any.type];
+
+ switch (event->any.type) {
+ /* Catch events that include valuator information and check if they
+ * are changing the screen */
+ case ET_Motion:
+ case ET_KeyPress:
+ case ET_KeyRelease:
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ if (dev && screen && dev->spriteInfo->sprite && screen != DequeueScreen(dev) && !handler) {
+ DequeueScreen(dev) = screen;
+ x = event->device_event.root_x;
+ y = event->device_event.root_y;
+ NewCurrentScreen (dev, DequeueScreen(dev), x, y);
+ }
+ break;
+ default:
+ break;
+ }
+ master = CopyGetMasterEvent(dev, event, &mevent);
+
+ if (master)
+ master->lastSlave = dev;
+
+ /* If someone's registered a custom event handler, let them
+ * steal it. */
+ if (handler)
+ {
+ int screenNum = dev && DequeueScreen(dev) ? DequeueScreen(dev)->myNum : (screen ? screen->myNum : 0);
+ handler(screenNum, event, dev);
+ /* Check for the SD's master in case the device got detached
+ * during event processing */
+ if (master && !IsFloating(dev))
+ handler(screenNum, &mevent, master);
+ } else
+ {
+ /* process slave first, then master */
+ dev->public.processInputProc(event, dev);
+
+ /* Check for the SD's master in case the device got detached
+ * during event processing */
+ if (master && !IsFloating(dev))
+ master->public.processInputProc(&mevent, master);
+ }
+}
+
+/* Call this from ProcessInputEvents(). */
+void
+mieqProcessInputEvents(void)
+{
+ EventRec *e = NULL;
+ int evlen;
+ ScreenPtr screen;
+ static InternalEvent *event = NULL;
+ static size_t event_size = 0;
+ DeviceIntPtr dev = NULL,
+ master = NULL;
+
+#ifdef XQUARTZ
+ pthread_mutex_lock(&miEventQueueMutex);
+#endif
+
+ while (miEventQueue.head != miEventQueue.tail) {
+ e = &miEventQueue.events[miEventQueue.head];
+
+ evlen = e->events->evlen;
+ if(evlen > event_size)
+ {
+ event = realloc(event, evlen);
+ event_size=evlen;
+
+
+ if (!event)
+ FatalError("[mi] No memory left for event processing.\n");
+ }
+
+
+ memcpy(event, e->events->event, evlen);
+
+
+ dev = e->pDev;
+ screen = e->pScreen;
+
+ miEventQueue.head = (miEventQueue.head + 1) % QUEUE_SIZE;
+
+#ifdef XQUARTZ
+ pthread_mutex_unlock(&miEventQueueMutex);
+#endif
+
+ master = (dev) ? GetMaster(dev, MASTER_ATTACHED) : NULL;
+
+ if (screenIsSaved == SCREEN_SAVER_ON)
+ dixSaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
+#ifdef DPMSExtension
+ else if (DPMSPowerLevel != DPMSModeOn)
+ SetScreenSaverTimer();
+
+ if (DPMSPowerLevel != DPMSModeOn)
+ DPMSSet(serverClient, DPMSModeOn);
+#endif
+
+ mieqProcessDeviceEvent(dev, event, screen);
+
+ /* Update the sprite now. Next event may be from different device. */
+ if (event->any.type == ET_Motion && master)
+ miPointerUpdateSprite(dev);
+
+#ifdef XQUARTZ
+ pthread_mutex_lock(&miEventQueueMutex);
+#endif
+ }
+#ifdef XQUARTZ
+ pthread_mutex_unlock(&miEventQueueMutex);
+#endif
+}
+
diff --git a/xorg-server/mi/miinitext.c b/xorg-server/mi/miinitext.c
index 4499f377c..29903973f 100644
--- a/xorg-server/mi/miinitext.c
+++ b/xorg-server/mi/miinitext.c
@@ -467,7 +467,10 @@ InitExtensions(int argc, char *argv[])
#ifdef GLXEXT
if (serverGeneration == 1)
+ {
GlxPushProvider(&__glXDRISWRastProvider);
+ glxWinPushNativeProvider();
+ }
if (!noGlxExtension) GlxExtensionInit();
#endif
}
diff --git a/xorg-server/mi/mioverlay.c b/xorg-server/mi/mioverlay.c
index 76484c275..78f5d787b 100644
--- a/xorg-server/mi/mioverlay.c
+++ b/xorg-server/mi/mioverlay.c
@@ -3,6 +3,10 @@
#include <dix-config.h>
#endif
+#ifdef CreateWindow
+#undef CreateWindow
+#endif
+
#include <X11/X.h>
#include "scrnintstr.h"
#include <X11/extensions/shapeproto.h>
diff --git a/xorg-server/mi/mipointrst.h b/xorg-server/mi/mipointrst.h
index c912a17da..109a44c88 100644
--- a/xorg-server/mi/mipointrst.h
+++ b/xorg-server/mi/mipointrst.h
@@ -1,57 +1,57 @@
-/*
- * mipointrst.h
- *
- */
-
-
-/*
-
-Copyright 1989, 1998 The Open Group
-
-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.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-*/
-
-#ifndef MIPOINTRST_H
-#define MIPOINTRST_H
-
-#include "mipointer.h"
-#include "scrnintstr.h"
-
-typedef struct {
- ScreenPtr pScreen; /* current screen */
- ScreenPtr pSpriteScreen;/* screen containing current sprite */
- CursorPtr pCursor; /* current cursor */
- CursorPtr pSpriteCursor;/* cursor on screen */
- BoxRec limits; /* current constraints */
- Bool confined; /* pointer can't change screens */
- int x, y; /* hot spot location */
- int devx, devy; /* sprite position */
- Bool generateEvent; /* generate an event during warping? */
-} miPointerRec, *miPointerPtr;
-
-typedef struct {
- miPointerSpriteFuncPtr spriteFuncs; /* sprite-specific methods */
- miPointerScreenFuncPtr screenFuncs; /* screen-specific methods */
- CloseScreenProcPtr CloseScreen;
- Bool waitForUpdate; /* don't move cursor in SIGIO */
- Bool showTransparent; /* show empty cursors */
-} miPointerScreenRec, *miPointerScreenPtr;
-#endif /* MIPOINTRST_H */
+/*
+ * mipointrst.h
+ *
+ */
+
+
+/*
+
+Copyright 1989, 1998 The Open Group
+
+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.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*/
+
+#ifndef MIPOINTRST_H
+#define MIPOINTRST_H
+
+#include "mipointer.h"
+#include "scrnintstr.h"
+
+typedef struct {
+ ScreenPtr pScreen; /* current screen */
+ ScreenPtr pSpriteScreen;/* screen containing current sprite */
+ CursorPtr pCursor; /* current cursor */
+ CursorPtr pSpriteCursor;/* cursor on screen */
+ BoxRec limits; /* current constraints */
+ Bool confined; /* pointer can't change screens */
+ int x, y; /* hot spot location */
+ int devx, devy; /* sprite position */
+ Bool generateEvent; /* generate an event during warping? */
+} miPointerRec, *miPointerPtr;
+
+typedef struct {
+ miPointerSpriteFuncPtr spriteFuncs; /* sprite-specific methods */
+ miPointerScreenFuncPtr screenFuncs; /* screen-specific methods */
+ CloseScreenProcPtr CloseScreen;
+ Bool waitForUpdate; /* don't move cursor in SIGIO */
+ Bool showTransparent; /* show empty cursors */
+} miPointerScreenRec, *miPointerScreenPtr;
+#endif /* MIPOINTRST_H */
diff --git a/xorg-server/mi/misprite.c b/xorg-server/mi/misprite.c
index 0b47592f0..64c6ce47b 100644
--- a/xorg-server/mi/misprite.c
+++ b/xorg-server/mi/misprite.c
@@ -506,7 +506,7 @@ miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width,
if (DevHasCursor(pDev))
{
pCursorInfo = MISPRITE(pDev);
- if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen &&
+ if (pCursorInfo && pCursorInfo->isUp && pCursorInfo->pScreen == pScreen &&
ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y,
x, y, width, height))
{
@@ -541,7 +541,7 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
/*
* Damage will take care of destination check
*/
- if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen &&
+ if (pCursorInfo && pCursorInfo->isUp && pCursorInfo->pScreen == pScreen &&
RegionContainsRect(prgnSrc, &pCursorInfo->saved) != rgnOUT)
{
SPRITE_DEBUG (("CopyWindow remove\n"));
@@ -628,9 +628,12 @@ miSpriteInstallColormap (ColormapPtr pMap)
if (DevHasCursor(pDev))
{
pCursorInfo = MISPRITE(pDev);
- pCursorInfo->checkPixels = TRUE;
- if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen)
- miSpriteRemoveCursor(pDev, pScreen);
+ if (pCursorInfo)
+ {
+ pCursorInfo->checkPixels = TRUE;
+ if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen)
+ miSpriteRemoveCursor(pDev, pScreen);
+ }
}
}
diff --git a/xorg-server/mi/miwideline.c b/xorg-server/mi/miwideline.c
index 3158e10cb..2d27dd7dc 100644
--- a/xorg-server/mi/miwideline.c
+++ b/xorg-server/mi/miwideline.c
@@ -45,6 +45,10 @@ from The Open Group.
#include <math.h>
#undef _XOPEN_SOURCE
#endif
+#ifdef _MSC_VER
+#define hypot _hypot
+#endif
+
#include <X11/X.h>
#include "windowstr.h"
#include "gcstruct.h"
diff --git a/xorg-server/miext/damage/damage.c b/xorg-server/miext/damage/damage.c
index 0fe1fb603..d7c244e21 100644
--- a/xorg-server/miext/damage/damage.c
+++ b/xorg-server/miext/damage/damage.c
@@ -1,2127 +1,2127 @@
-/*
- * Copyright © 2003 Keith Packard
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdlib.h>
-
-#include <X11/X.h>
-#include "scrnintstr.h"
-#include "windowstr.h"
-#include <X11/fonts/font.h>
-#include "dixfontstr.h"
-#include <X11/fonts/fontstruct.h>
-#include "mi.h"
-#include "regionstr.h"
-#include "globals.h"
-#include "gcstruct.h"
-#include "damage.h"
-#include "damagestr.h"
-#ifdef COMPOSITE
-#include "cw.h"
-#endif
-
-#define wrap(priv, real, mem, func) {\
- priv->mem = real->mem; \
- real->mem = func; \
-}
-
-#define unwrap(priv, real, mem) {\
- real->mem = priv->mem; \
-}
-
-#define BOX_SAME(a,b) \
- ((a)->x1 == (b)->x1 && \
- (a)->y1 == (b)->y1 && \
- (a)->x2 == (b)->x2 && \
- (a)->y2 == (b)->y2)
-
-#define DAMAGE_VALIDATE_ENABLE 0
-#define DAMAGE_DEBUG_ENABLE 0
-#if DAMAGE_DEBUG_ENABLE
-#define DAMAGE_DEBUG(x) ErrorF x
-#else
-#define DAMAGE_DEBUG(x)
-#endif
-
-#define getPixmapDamageRef(pPixmap) ((DamagePtr *) \
- dixLookupPrivateAddr(&(pPixmap)->devPrivates, damagePixPrivateKey))
-
-#define pixmapDamage(pPixmap) damagePixPriv(pPixmap)
-
-static DevPrivateKeyRec damageScrPrivateKeyRec;
-#define damageScrPrivateKey (&damageScrPrivateKeyRec)
-static DevPrivateKeyRec damagePixPrivateKeyRec;
-#define damagePixPrivateKey (&damagePixPrivateKeyRec)
-static DevPrivateKeyRec damageGCPrivateKeyRec;
-#define damageGCPrivateKey (&damageGCPrivateKeyRec)
-static DevPrivateKeyRec damageWinPrivateKeyRec;
-#define damageWinPrivateKey (&damageWinPrivateKeyRec)
-
-static DamagePtr *
-getDrawableDamageRef (DrawablePtr pDrawable)
-{
- PixmapPtr pPixmap;
-
- if (WindowDrawable(pDrawable->type))
- {
- ScreenPtr pScreen = pDrawable->pScreen;
-
- pPixmap = 0;
- if (pScreen->GetWindowPixmap
-#ifdef ROOTLESS_WORKAROUND
- && ((WindowPtr)pDrawable)->viewable
-#endif
- )
- pPixmap = (*pScreen->GetWindowPixmap) ((WindowPtr)pDrawable);
-
- if (!pPixmap)
- {
- damageScrPriv(pScreen);
-
- return &pScrPriv->pScreenDamage;
- }
- }
- else
- pPixmap = (PixmapPtr) pDrawable;
- return getPixmapDamageRef (pPixmap);
-}
-
-#define getDrawableDamage(pDrawable) (*getDrawableDamageRef (pDrawable))
-#define getWindowDamage(pWin) getDrawableDamage(&(pWin)->drawable)
-
-#define drawableDamage(pDrawable) \
- DamagePtr pDamage = getDrawableDamage(pDrawable)
-
-#define windowDamage(pWin) drawableDamage(&(pWin)->drawable)
-
-#define winDamageRef(pWindow) \
- DamagePtr *pPrev = (DamagePtr *) \
- dixLookupPrivateAddr(&(pWindow)->devPrivates, damageWinPrivateKey)
-
-static void
-damageReportDamage (DamagePtr pDamage, RegionPtr pDamageRegion)
-{
- BoxRec tmpBox;
- RegionRec tmpRegion;
- Bool was_empty;
-
- switch (pDamage->damageLevel) {
- case DamageReportRawRegion:
- RegionUnion(&pDamage->damage, &pDamage->damage,
- pDamageRegion);
- (*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure);
- break;
- case DamageReportDeltaRegion:
- RegionNull(&tmpRegion);
- RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage);
- if (RegionNotEmpty(&tmpRegion)) {
- RegionUnion(&pDamage->damage, &pDamage->damage,
- pDamageRegion);
- (*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure);
- }
- RegionUninit(&tmpRegion);
- break;
- case DamageReportBoundingBox:
- tmpBox = *RegionExtents(&pDamage->damage);
- RegionUnion(&pDamage->damage, &pDamage->damage,
- pDamageRegion);
- if (!BOX_SAME (&tmpBox, RegionExtents(&pDamage->damage))) {
- (*pDamage->damageReport) (pDamage, &pDamage->damage,
- pDamage->closure);
- }
- break;
- case DamageReportNonEmpty:
- was_empty = !RegionNotEmpty(&pDamage->damage);
- RegionUnion(&pDamage->damage, &pDamage->damage,
- pDamageRegion);
- if (was_empty && RegionNotEmpty(&pDamage->damage)) {
- (*pDamage->damageReport) (pDamage, &pDamage->damage,
- pDamage->closure);
- }
- break;
- case DamageReportNone:
- RegionUnion(&pDamage->damage, &pDamage->damage,
- pDamageRegion);
- break;
- }
-}
-
-static void
-damageReportDamagePostRendering (DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pDamageRegion)
-{
- BoxRec tmpBox;
- RegionRec tmpRegion, newDamage;
- Bool was_empty;
-
- RegionUnion(&newDamage, pOldDamage, pDamageRegion);
-
- switch (pDamage->damageLevel) {
- case DamageReportRawRegion:
- (*pDamage->damageReportPostRendering) (pDamage, pDamageRegion, pDamage->closure);
- break;
- case DamageReportDeltaRegion:
- RegionNull(&tmpRegion);
- RegionSubtract(&tmpRegion, pDamageRegion, pOldDamage);
- if (RegionNotEmpty(&tmpRegion)) {
- (*pDamage->damageReportPostRendering) (pDamage, &tmpRegion, pDamage->closure);
- }
- RegionUninit(&tmpRegion);
- break;
- case DamageReportBoundingBox:
- tmpBox = *RegionExtents(pOldDamage);
- if (!BOX_SAME (&tmpBox, RegionExtents(&newDamage))) {
- (*pDamage->damageReportPostRendering) (pDamage, &newDamage,
- pDamage->closure);
- }
- break;
- case DamageReportNonEmpty:
- was_empty = !RegionNotEmpty(pOldDamage);
- if (was_empty && RegionNotEmpty(&newDamage)) {
- (*pDamage->damageReportPostRendering) (pDamage, &newDamage,
- pDamage->closure);
- }
- break;
- case DamageReportNone:
- break;
- }
-
- RegionUninit(&newDamage);
-}
-
-#if DAMAGE_DEBUG_ENABLE
-static void
-_damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, int subWindowMode, const char *where)
-#define damageRegionAppend(d,r,c,m) _damageRegionAppend(d,r,c,m,__FUNCTION__)
-#else
-static void
-damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
- int subWindowMode)
-#endif
-{
- ScreenPtr pScreen = pDrawable->pScreen;
- damageScrPriv(pScreen);
- drawableDamage(pDrawable);
- DamagePtr pNext;
- RegionRec clippedRec;
- RegionPtr pDamageRegion;
- RegionRec pixClip;
- int draw_x, draw_y;
-#ifdef COMPOSITE
- int screen_x = 0, screen_y = 0;
-#endif
-
- /* short circuit for empty regions */
- if (!RegionNotEmpty(pRegion))
- return;
-
-#ifdef COMPOSITE
- /*
- * When drawing to a pixmap which is storing window contents,
- * the region presented is in pixmap relative coordinates which
- * need to be converted to screen relative coordinates
- */
- if (pDrawable->type != DRAWABLE_WINDOW)
- {
- screen_x = ((PixmapPtr) pDrawable)->screen_x - pDrawable->x;
- screen_y = ((PixmapPtr) pDrawable)->screen_y - pDrawable->y;
- }
- if (screen_x || screen_y)
- RegionTranslate(pRegion, screen_x, screen_y);
-#endif
-
- if (pDrawable->type == DRAWABLE_WINDOW &&
- ((WindowPtr)(pDrawable))->backingStore == NotUseful)
- {
- if (subWindowMode == ClipByChildren)
- {
- RegionIntersect(pRegion, pRegion,
- &((WindowPtr)(pDrawable))->clipList);
- }
- else if (subWindowMode == IncludeInferiors)
- {
- RegionPtr pTempRegion =
- NotClippedByChildren((WindowPtr)(pDrawable));
- RegionIntersect(pRegion, pRegion, pTempRegion);
- RegionDestroy(pTempRegion);
- }
- /* If subWindowMode is set to an invalid value, don't perform
- * any drawable-based clipping. */
- }
-
-
- RegionNull(&clippedRec);
- for (; pDamage; pDamage = pNext)
- {
- pNext = pDamage->pNext;
- /*
- * Check for internal damage and don't send events
- */
- if (pScrPriv->internalLevel > 0 && !pDamage->isInternal)
- {
- DAMAGE_DEBUG (("non internal damage, skipping at %d\n",
- pScrPriv->internalLevel));
- continue;
- }
- /*
- * Check for unrealized windows
- */
- if (pDamage->pDrawable->type == DRAWABLE_WINDOW &&
- !((WindowPtr) (pDamage->pDrawable))->realized)
- {
- continue;
- }
-
- draw_x = pDamage->pDrawable->x;
- draw_y = pDamage->pDrawable->y;
-#ifdef COMPOSITE
- /*
- * Need to move everyone to screen coordinates
- * XXX what about off-screen pixmaps with non-zero x/y?
- */
- if (!WindowDrawable(pDamage->pDrawable->type))
- {
- draw_x += ((PixmapPtr) pDamage->pDrawable)->screen_x;
- draw_y += ((PixmapPtr) pDamage->pDrawable)->screen_y;
- }
-#endif
-
- /*
- * Clip against border or pixmap bounds
- */
-
- pDamageRegion = pRegion;
- if (clip || pDamage->pDrawable != pDrawable)
- {
- pDamageRegion = &clippedRec;
- if (pDamage->pDrawable->type == DRAWABLE_WINDOW) {
- RegionIntersect(pDamageRegion, pRegion,
- &((WindowPtr)(pDamage->pDrawable))->borderClip);
- } else {
- BoxRec box;
- box.x1 = draw_x;
- box.y1 = draw_y;
- box.x2 = draw_x + pDamage->pDrawable->width;
- box.y2 = draw_y + pDamage->pDrawable->height;
- RegionInit(&pixClip, &box, 1);
- RegionIntersect(pDamageRegion, pRegion, &pixClip);
- RegionUninit(&pixClip);
- }
- /*
- * Short circuit empty results
- */
- if (!RegionNotEmpty(pDamageRegion))
- continue;
- }
-
- DAMAGE_DEBUG (("%s %d x %d +%d +%d (target 0x%lx monitor 0x%lx)\n",
- where,
- pDamageRegion->extents.x2 - pDamageRegion->extents.x1,
- pDamageRegion->extents.y2 - pDamageRegion->extents.y1,
- pDamageRegion->extents.x1, pDamageRegion->extents.y1,
- pDrawable->id, pDamage->pDrawable->id));
-
- /*
- * Move region to target coordinate space
- */
- if (draw_x || draw_y)
- RegionTranslate(pDamageRegion, -draw_x, -draw_y);
-
- /* Store damage region if needed after submission. */
- if (pDamage->reportAfter || pDamage->damageMarker)
- RegionUnion(&pDamage->pendingDamage,
- &pDamage->pendingDamage, pDamageRegion);
-
- /* Duplicate current damage if needed. */
- if (pDamage->damageMarker)
- RegionCopy(&pDamage->backupDamage, &pDamage->damage);
-
- /* Report damage now, if desired. */
- if (!pDamage->reportAfter) {
- if (pDamage->damageReport)
- damageReportDamage (pDamage, pDamageRegion);
- else
- RegionUnion(&pDamage->damage,
- &pDamage->damage, pDamageRegion);
- }
-
- /*
- * translate original region back
- */
- if (pDamageRegion == pRegion && (draw_x || draw_y))
- RegionTranslate(pDamageRegion, draw_x, draw_y);
- }
-#ifdef COMPOSITE
- if (screen_x || screen_y)
- RegionTranslate(pRegion, -screen_x, -screen_y);
-#endif
-
- RegionUninit(&clippedRec);
-}
-
-static void
-damageRegionProcessPending (DrawablePtr pDrawable)
-{
- drawableDamage(pDrawable);
-
- for (; pDamage != NULL; pDamage = pDamage->pNext)
- {
- /* submit damage marker whenever possible. */
- if (pDamage->damageMarker)
- (*pDamage->damageMarker) (pDrawable, pDamage, &pDamage->backupDamage, &pDamage->pendingDamage, pDamage->closure);
- if (pDamage->reportAfter) {
- /* It's possible that there is only interest in postRendering reporting. */
- if (pDamage->damageReport)
- damageReportDamage (pDamage, &pDamage->pendingDamage);
- else
- RegionUnion(&pDamage->damage, &pDamage->damage,
- &pDamage->pendingDamage);
- }
-
- if (pDamage->reportAfter || pDamage->damageMarker)
- RegionEmpty(&pDamage->pendingDamage);
- if (pDamage->damageMarker)
- RegionEmpty(&pDamage->backupDamage);
- }
-
-}
-
-#if DAMAGE_DEBUG_ENABLE
-#define damageDamageBox(d,b,m) _damageDamageBox(d,b,m,__FUNCTION__)
-static void
-_damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode, const char *where)
-#else
-static void
-damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode)
-#endif
-{
- RegionRec region;
-
- RegionInit(&region, pBox, 1);
-#if DAMAGE_DEBUG_ENABLE
- _damageRegionAppend (pDrawable, &region, TRUE, subWindowMode, where);
-#else
- damageRegionAppend (pDrawable, &region, TRUE, subWindowMode);
-#endif
- RegionUninit(&region);
-}
-
-static void damageValidateGC(GCPtr, unsigned long, DrawablePtr);
-static void damageChangeGC(GCPtr, unsigned long);
-static void damageCopyGC(GCPtr, unsigned long, GCPtr);
-static void damageDestroyGC(GCPtr);
-static void damageChangeClip(GCPtr, int, pointer, int);
-static void damageDestroyClip(GCPtr);
-static void damageCopyClip(GCPtr, GCPtr);
-
-static GCFuncs damageGCFuncs = {
- damageValidateGC, damageChangeGC, damageCopyGC, damageDestroyGC,
- damageChangeClip, damageDestroyClip, damageCopyClip
-};
-
-static GCOps damageGCOps;
-
-static Bool
-damageCreateGC(GCPtr pGC)
-{
- ScreenPtr pScreen = pGC->pScreen;
- damageScrPriv(pScreen);
- damageGCPriv(pGC);
- Bool ret;
-
- unwrap (pScrPriv, pScreen, CreateGC);
- if((ret = (*pScreen->CreateGC) (pGC))) {
- pGCPriv->ops = NULL;
- pGCPriv->funcs = pGC->funcs;
- pGC->funcs = &damageGCFuncs;
- }
- wrap (pScrPriv, pScreen, CreateGC, damageCreateGC);
-
- return ret;
-}
-
-#define DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable) \
- damageGCPriv(pGC); \
- GCFuncs *oldFuncs = pGC->funcs; \
- unwrap(pGCPriv, pGC, funcs); \
- unwrap(pGCPriv, pGC, ops); \
-
-#define DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable) \
- wrap(pGCPriv, pGC, funcs, oldFuncs); \
- wrap(pGCPriv, pGC, ops, &damageGCOps)
-
-#define DAMAGE_GC_FUNC_PROLOGUE(pGC) \
- damageGCPriv(pGC); \
- unwrap(pGCPriv, pGC, funcs); \
- if (pGCPriv->ops) unwrap(pGCPriv, pGC, ops)
-
-#define DAMAGE_GC_FUNC_EPILOGUE(pGC) \
- wrap(pGCPriv, pGC, funcs, &damageGCFuncs); \
- if (pGCPriv->ops) wrap(pGCPriv, pGC, ops, &damageGCOps)
-
-static void
-damageValidateGC(GCPtr pGC,
- unsigned long changes,
- DrawablePtr pDrawable)
-{
- DAMAGE_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ValidateGC)(pGC, changes, pDrawable);
- pGCPriv->ops = pGC->ops; /* just so it's not NULL */
- DAMAGE_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-damageDestroyGC(GCPtr pGC)
-{
- DAMAGE_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->DestroyGC)(pGC);
- DAMAGE_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-damageChangeGC (GCPtr pGC,
- unsigned long mask)
-{
- DAMAGE_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ChangeGC) (pGC, mask);
- DAMAGE_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-damageCopyGC (GCPtr pGCSrc,
- unsigned long mask,
- GCPtr pGCDst)
-{
- DAMAGE_GC_FUNC_PROLOGUE (pGCDst);
- (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst);
- DAMAGE_GC_FUNC_EPILOGUE (pGCDst);
-}
-
-static void
-damageChangeClip (GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects)
-{
- DAMAGE_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
- DAMAGE_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-damageCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
-{
- DAMAGE_GC_FUNC_PROLOGUE (pgcDst);
- (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc);
- DAMAGE_GC_FUNC_EPILOGUE (pgcDst);
-}
-
-static void
-damageDestroyClip(GCPtr pGC)
-{
- DAMAGE_GC_FUNC_PROLOGUE (pGC);
- (* pGC->funcs->DestroyClip)(pGC);
- DAMAGE_GC_FUNC_EPILOGUE (pGC);
-}
-
-#define TRIM_BOX(box, pGC) if (pGC->pCompositeClip) { \
- BoxPtr extents = &pGC->pCompositeClip->extents;\
- if(box.x1 < extents->x1) box.x1 = extents->x1; \
- if(box.x2 > extents->x2) box.x2 = extents->x2; \
- if(box.y1 < extents->y1) box.y1 = extents->y1; \
- if(box.y2 > extents->y2) box.y2 = extents->y2; \
- }
-
-#define TRANSLATE_BOX(box, pDrawable) { \
- box.x1 += pDrawable->x; \
- box.x2 += pDrawable->x; \
- box.y1 += pDrawable->y; \
- box.y2 += pDrawable->y; \
- }
-
-#define TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC) { \
- TRANSLATE_BOX(box, pDrawable); \
- TRIM_BOX(box, pGC); \
- }
-
-#define BOX_NOT_EMPTY(box) \
- (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0))
-
-#define checkGCDamage(d,g) (getDrawableDamage(d) && \
- (!g->pCompositeClip ||\
- RegionNotEmpty(g->pCompositeClip)))
-
-#define TRIM_PICTURE_BOX(box, pDst) { \
- BoxPtr extents = &pDst->pCompositeClip->extents;\
- if(box.x1 < extents->x1) box.x1 = extents->x1; \
- if(box.x2 > extents->x2) box.x2 = extents->x2; \
- if(box.y1 < extents->y1) box.y1 = extents->y1; \
- if(box.y2 > extents->y2) box.y2 = extents->y2; \
- }
-
-#define checkPictureDamage(p) (getDrawableDamage(p->pDrawable) && \
- RegionNotEmpty(p->pCompositeClip))
-
-static void
-damageComposite (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
-{
- ScreenPtr pScreen = pDst->pDrawable->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
- damageScrPriv(pScreen);
-
- if (checkPictureDamage (pDst))
- {
- BoxRec box;
-
- box.x1 = xDst + pDst->pDrawable->x;
- box.y1 = yDst + pDst->pDrawable->y;
- box.x2 = box.x1 + width;
- box.y2 = box.y1 + height;
- TRIM_PICTURE_BOX(box, pDst);
- if (BOX_NOT_EMPTY(box))
- damageDamageBox (pDst->pDrawable, &box, pDst->subWindowMode);
- }
- unwrap (pScrPriv, ps, Composite);
- (*ps->Composite) (op,
- pSrc,
- pMask,
- pDst,
- xSrc,
- ySrc,
- xMask,
- yMask,
- xDst,
- yDst,
- width,
- height);
- damageRegionProcessPending (pDst->pDrawable);
- wrap (pScrPriv, ps, Composite, damageComposite);
-}
-
-static void
-damageGlyphs (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc,
- INT16 ySrc,
- int nlist,
- GlyphListPtr list,
- GlyphPtr *glyphs)
-{
- ScreenPtr pScreen = pDst->pDrawable->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
- damageScrPriv(pScreen);
-
- if (checkPictureDamage (pDst))
- {
- int nlistTmp = nlist;
- GlyphListPtr listTmp = list;
- GlyphPtr *glyphsTmp = glyphs;
- int x, y;
- int n;
- GlyphPtr glyph;
- BoxRec box;
- int x1, y1, x2, y2;
-
- box.x1 = 32767;
- box.y1 = 32767;
- box.x2 = -32767;
- box.y2 = -32767;
- x = pDst->pDrawable->x;
- y = pDst->pDrawable->y;
- while (nlistTmp--)
- {
- x += listTmp->xOff;
- y += listTmp->yOff;
- n = listTmp->len;
- while (n--)
- {
- glyph = *glyphsTmp++;
- x1 = x - glyph->info.x;
- y1 = y - glyph->info.y;
- x2 = x1 + glyph->info.width;
- y2 = y1 + glyph->info.height;
- if (x1 < box.x1)
- box.x1 = x1;
- if (y1 < box.y1)
- box.y1 = y1;
- if (x2 > box.x2)
- box.x2 = x2;
- if (y2 > box.y2)
- box.y2 = y2;
- x += glyph->info.xOff;
- y += glyph->info.yOff;
- }
- listTmp++;
- }
- TRIM_PICTURE_BOX (box, pDst);
- if (BOX_NOT_EMPTY(box))
- damageDamageBox (pDst->pDrawable, &box, pDst->subWindowMode);
- }
- unwrap (pScrPriv, ps, Glyphs);
- (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs);
- damageRegionProcessPending (pDst->pDrawable);
- wrap (pScrPriv, ps, Glyphs, damageGlyphs);
-}
-
-static void
-damageAddTraps (PicturePtr pPicture,
- INT16 x_off,
- INT16 y_off,
- int ntrap,
- xTrap *traps)
-{
- ScreenPtr pScreen = pPicture->pDrawable->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
- damageScrPriv(pScreen);
-
- if (checkPictureDamage (pPicture))
- {
- BoxRec box;
- int i;
- int x, y;
- xTrap *t = traps;
-
- box.x1 = 32767;
- box.y1 = 32767;
- box.x2 = -32767;
- box.y2 = -32767;
- x = pPicture->pDrawable->x + x_off;
- y = pPicture->pDrawable->y + y_off;
- for (i = 0; i < ntrap; i++)
- {
- pixman_fixed_t l = min (t->top.l, t->bot.l);
- pixman_fixed_t r = max (t->top.r, t->bot.r);
- int x1 = x + pixman_fixed_to_int (l);
- int x2 = x + pixman_fixed_to_int (pixman_fixed_ceil (r));
- int y1 = y + pixman_fixed_to_int (t->top.y);
- int y2 = y + pixman_fixed_to_int (pixman_fixed_ceil (t->bot.y));
-
- if (x1 < box.x1)
- box.x1 = x1;
- if (x2 > box.x2)
- box.x2 = x2;
- if (y1 < box.y1)
- box.y1 = y1;
- if (y2 > box.y2)
- box.y2 = y2;
- }
- TRIM_PICTURE_BOX (box, pPicture);
- if (BOX_NOT_EMPTY(box))
- damageDamageBox (pPicture->pDrawable, &box, pPicture->subWindowMode);
- }
- unwrap (pScrPriv, ps, AddTraps);
- (*ps->AddTraps) (pPicture, x_off, y_off, ntrap, traps);
- damageRegionProcessPending (pPicture->pDrawable);
- wrap (pScrPriv, ps, AddTraps, damageAddTraps);
-}
-
-/**********************************************************/
-
-
-static void
-damageFillSpans(DrawablePtr pDrawable,
- GC *pGC,
- int npt,
- DDXPointPtr ppt,
- int *pwidth,
- int fSorted)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (npt && checkGCDamage (pDrawable, pGC))
- {
- int nptTmp = npt;
- DDXPointPtr pptTmp = ppt;
- int *pwidthTmp = pwidth;
- BoxRec box;
-
- box.x1 = pptTmp->x;
- box.x2 = box.x1 + *pwidthTmp;
- box.y2 = box.y1 = pptTmp->y;
-
- while(--nptTmp)
- {
- pptTmp++;
- pwidthTmp++;
- if(box.x1 > pptTmp->x) box.x1 = pptTmp->x;
- if(box.x2 < (pptTmp->x + *pwidthTmp))
- box.x2 = pptTmp->x + *pwidthTmp;
- if(box.y1 > pptTmp->y) box.y1 = pptTmp->y;
- else if(box.y2 < pptTmp->y) box.y2 = pptTmp->y;
- }
-
- box.y2++;
-
- if(!pGC->miTranslate) {
- TRANSLATE_BOX(box, pDrawable);
- }
- TRIM_BOX(box, pGC);
-
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
-
- (*pGC->ops->FillSpans)(pDrawable, pGC, npt, ppt, pwidth, fSorted);
-
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damageSetSpans(DrawablePtr pDrawable,
- GCPtr pGC,
- char *pcharsrc,
- DDXPointPtr ppt,
- int *pwidth,
- int npt,
- int fSorted)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (npt && checkGCDamage (pDrawable, pGC))
- {
- DDXPointPtr pptTmp = ppt;
- int *pwidthTmp = pwidth;
- int nptTmp = npt;
- BoxRec box;
-
- box.x1 = pptTmp->x;
- box.x2 = box.x1 + *pwidthTmp;
- box.y2 = box.y1 = pptTmp->y;
-
- while(--nptTmp)
- {
- pptTmp++;
- pwidthTmp++;
- if(box.x1 > pptTmp->x) box.x1 = pptTmp->x;
- if(box.x2 < (pptTmp->x + *pwidthTmp))
- box.x2 = pptTmp->x + *pwidthTmp;
- if(box.y1 > pptTmp->y) box.y1 = pptTmp->y;
- else if(box.y2 < pptTmp->y) box.y2 = pptTmp->y;
- }
-
- box.y2++;
-
- if(!pGC->miTranslate) {
- TRANSLATE_BOX(box, pDrawable);
- }
- TRIM_BOX(box, pGC);
-
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
- (*pGC->ops->SetSpans)(pDrawable, pGC, pcharsrc, ppt, pwidth, npt, fSorted);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damagePutImage(DrawablePtr pDrawable,
- GCPtr pGC,
- int depth,
- int x,
- int y,
- int w,
- int h,
- int leftPad,
- int format,
- char *pImage)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
- if (checkGCDamage (pDrawable, pGC))
- {
- BoxRec box;
-
- box.x1 = x + pDrawable->x;
- box.x2 = box.x1 + w;
- box.y1 = y + pDrawable->y;
- box.y2 = box.y1 + h;
-
- TRIM_BOX(box, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
- (*pGC->ops->PutImage)(pDrawable, pGC, depth, x, y, w, h,
- leftPad, format, pImage);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static RegionPtr
-damageCopyArea(DrawablePtr pSrc,
- DrawablePtr pDst,
- GC *pGC,
- int srcx,
- int srcy,
- int width,
- int height,
- int dstx,
- int dsty)
-{
- RegionPtr ret;
- DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
-
- if (checkGCDamage (pDst, pGC))
- {
- BoxRec box;
-
- box.x1 = dstx + pDst->x;
- box.x2 = box.x1 + width;
- box.y1 = dsty + pDst->y;
- box.y2 = box.y1 + height;
-
- TRIM_BOX(box, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDst, &box, pGC->subWindowMode);
- }
-
- ret = (*pGC->ops->CopyArea)(pSrc, pDst,
- pGC, srcx, srcy, width, height, dstx, dsty);
- damageRegionProcessPending (pDst);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDst);
- return ret;
-}
-
-static RegionPtr
-damageCopyPlane(DrawablePtr pSrc,
- DrawablePtr pDst,
- GCPtr pGC,
- int srcx,
- int srcy,
- int width,
- int height,
- int dstx,
- int dsty,
- unsigned long bitPlane)
-{
- RegionPtr ret;
- DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
-
- if (checkGCDamage (pDst, pGC))
- {
- BoxRec box;
-
- box.x1 = dstx + pDst->x;
- box.x2 = box.x1 + width;
- box.y1 = dsty + pDst->y;
- box.y2 = box.y1 + height;
-
- TRIM_BOX(box, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDst, &box, pGC->subWindowMode);
- }
-
- ret = (*pGC->ops->CopyPlane)(pSrc, pDst,
- pGC, srcx, srcy, width, height, dstx, dsty, bitPlane);
- damageRegionProcessPending (pDst);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDst);
- return ret;
-}
-
-static void
-damagePolyPoint(DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- xPoint *ppt)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (npt && checkGCDamage (pDrawable, pGC))
- {
- BoxRec box;
- int nptTmp = npt;
- xPoint *pptTmp = ppt;
-
- box.x2 = box.x1 = pptTmp->x;
- box.y2 = box.y1 = pptTmp->y;
-
- /* this could be slow if the points were spread out */
-
- while(--nptTmp)
- {
- pptTmp++;
- if(box.x1 > pptTmp->x) box.x1 = pptTmp->x;
- else if(box.x2 < pptTmp->x) box.x2 = pptTmp->x;
- if(box.y1 > pptTmp->y) box.y1 = pptTmp->y;
- else if(box.y2 < pptTmp->y) box.y2 = pptTmp->y;
- }
-
- box.x2++;
- box.y2++;
-
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
- (*pGC->ops->PolyPoint)(pDrawable, pGC, mode, npt, ppt);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damagePolylines(DrawablePtr pDrawable,
- GCPtr pGC,
- int mode,
- int npt,
- DDXPointPtr ppt)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (npt && checkGCDamage (pDrawable, pGC))
- {
- int nptTmp = npt;
- DDXPointPtr pptTmp = ppt;
- BoxRec box;
- int extra = pGC->lineWidth >> 1;
-
- box.x2 = box.x1 = pptTmp->x;
- box.y2 = box.y1 = pptTmp->y;
-
- if(nptTmp > 1)
- {
- if(pGC->joinStyle == JoinMiter)
- extra = 6 * pGC->lineWidth;
- else if(pGC->capStyle == CapProjecting)
- extra = pGC->lineWidth;
- }
-
- if(mode == CoordModePrevious)
- {
- int x = box.x1;
- int y = box.y1;
- while(--nptTmp)
- {
- pptTmp++;
- x += pptTmp->x;
- y += pptTmp->y;
- if(box.x1 > x) box.x1 = x;
- else if(box.x2 < x) box.x2 = x;
- if(box.y1 > y) box.y1 = y;
- else if(box.y2 < y) box.y2 = y;
- }
- }
- else
- {
- while(--nptTmp)
- {
- pptTmp++;
- if(box.x1 > pptTmp->x) box.x1 = pptTmp->x;
- else if(box.x2 < pptTmp->x) box.x2 = pptTmp->x;
- if(box.y1 > pptTmp->y) box.y1 = pptTmp->y;
- else if(box.y2 < pptTmp->y) box.y2 = pptTmp->y;
- }
- }
-
- box.x2++;
- box.y2++;
-
- if(extra)
- {
- box.x1 -= extra;
- box.x2 += extra;
- box.y1 -= extra;
- box.y2 += extra;
- }
-
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
- (*pGC->ops->Polylines)(pDrawable, pGC, mode, npt, ppt);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damagePolySegment(DrawablePtr pDrawable,
- GCPtr pGC,
- int nSeg,
- xSegment *pSeg)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (nSeg && checkGCDamage (pDrawable, pGC))
- {
- BoxRec box;
- int extra = pGC->lineWidth;
- int nsegTmp = nSeg;
- xSegment *pSegTmp = pSeg;
-
- if(pGC->capStyle != CapProjecting)
- extra >>= 1;
-
- if(pSegTmp->x2 > pSegTmp->x1) {
- box.x1 = pSegTmp->x1;
- box.x2 = pSegTmp->x2;
- } else {
- box.x2 = pSegTmp->x1;
- box.x1 = pSegTmp->x2;
- }
-
- if(pSegTmp->y2 > pSegTmp->y1) {
- box.y1 = pSegTmp->y1;
- box.y2 = pSegTmp->y2;
- } else {
- box.y2 = pSegTmp->y1;
- box.y1 = pSegTmp->y2;
- }
-
- while(--nsegTmp)
- {
- pSegTmp++;
- if(pSegTmp->x2 > pSegTmp->x1)
- {
- if(pSegTmp->x1 < box.x1) box.x1 = pSegTmp->x1;
- if(pSegTmp->x2 > box.x2) box.x2 = pSegTmp->x2;
- }
- else
- {
- if(pSegTmp->x2 < box.x1) box.x1 = pSegTmp->x2;
- if(pSegTmp->x1 > box.x2) box.x2 = pSegTmp->x1;
- }
- if(pSegTmp->y2 > pSegTmp->y1)
- {
- if(pSegTmp->y1 < box.y1) box.y1 = pSegTmp->y1;
- if(pSegTmp->y2 > box.y2) box.y2 = pSegTmp->y2;
- }
- else
- {
- if(pSegTmp->y2 < box.y1) box.y1 = pSegTmp->y2;
- if(pSegTmp->y1 > box.y2) box.y2 = pSegTmp->y1;
- }
- }
-
- box.x2++;
- box.y2++;
-
- if(extra)
- {
- box.x1 -= extra;
- box.x2 += extra;
- box.y1 -= extra;
- box.y2 += extra;
- }
-
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
- (*pGC->ops->PolySegment)(pDrawable, pGC, nSeg, pSeg);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damagePolyRectangle(DrawablePtr pDrawable,
- GCPtr pGC,
- int nRects,
- xRectangle *pRects)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (nRects && checkGCDamage (pDrawable, pGC))
- {
- BoxRec box;
- int offset1, offset2, offset3;
- int nRectsTmp = nRects;
- xRectangle *pRectsTmp = pRects;
-
- offset2 = pGC->lineWidth;
- if(!offset2) offset2 = 1;
- offset1 = offset2 >> 1;
- offset3 = offset2 - offset1;
-
- while(nRectsTmp--)
- {
- box.x1 = pRectsTmp->x - offset1;
- box.y1 = pRectsTmp->y - offset1;
- box.x2 = box.x1 + pRectsTmp->width + offset2;
- box.y2 = box.y1 + offset2;
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
-
- box.x1 = pRectsTmp->x - offset1;
- box.y1 = pRectsTmp->y + offset3;
- box.x2 = box.x1 + offset2;
- box.y2 = box.y1 + pRectsTmp->height - offset2;
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
-
- box.x1 = pRectsTmp->x + pRectsTmp->width - offset1;
- box.y1 = pRectsTmp->y + offset3;
- box.x2 = box.x1 + offset2;
- box.y2 = box.y1 + pRectsTmp->height - offset2;
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
-
- box.x1 = pRectsTmp->x - offset1;
- box.y1 = pRectsTmp->y + pRectsTmp->height - offset1;
- box.x2 = box.x1 + pRectsTmp->width + offset2;
- box.y2 = box.y1 + offset2;
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
-
- pRectsTmp++;
- }
- }
- (*pGC->ops->PolyRectangle)(pDrawable, pGC, nRects, pRects);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damagePolyArc(DrawablePtr pDrawable,
- GCPtr pGC,
- int nArcs,
- xArc *pArcs)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (nArcs && checkGCDamage (pDrawable, pGC))
- {
- int extra = pGC->lineWidth >> 1;
- BoxRec box;
- int nArcsTmp = nArcs;
- xArc *pArcsTmp = pArcs;
-
- box.x1 = pArcsTmp->x;
- box.x2 = box.x1 + pArcsTmp->width;
- box.y1 = pArcsTmp->y;
- box.y2 = box.y1 + pArcsTmp->height;
-
- while(--nArcsTmp)
- {
- pArcsTmp++;
- if(box.x1 > pArcsTmp->x)
- box.x1 = pArcsTmp->x;
- if(box.x2 < (pArcsTmp->x + pArcsTmp->width))
- box.x2 = pArcsTmp->x + pArcsTmp->width;
- if(box.y1 > pArcsTmp->y)
- box.y1 = pArcsTmp->y;
- if(box.y2 < (pArcsTmp->y + pArcsTmp->height))
- box.y2 = pArcsTmp->y + pArcsTmp->height;
- }
-
- if(extra)
- {
- box.x1 -= extra;
- box.x2 += extra;
- box.y1 -= extra;
- box.y2 += extra;
- }
-
- box.x2++;
- box.y2++;
-
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
- (*pGC->ops->PolyArc)(pDrawable, pGC, nArcs, pArcs);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damageFillPolygon(DrawablePtr pDrawable,
- GCPtr pGC,
- int shape,
- int mode,
- int npt,
- DDXPointPtr ppt)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (npt > 2 && checkGCDamage (pDrawable, pGC))
- {
- DDXPointPtr pptTmp = ppt;
- int nptTmp = npt;
- BoxRec box;
-
- box.x2 = box.x1 = pptTmp->x;
- box.y2 = box.y1 = pptTmp->y;
-
- if(mode != CoordModeOrigin)
- {
- int x = box.x1;
- int y = box.y1;
- while(--nptTmp)
- {
- pptTmp++;
- x += pptTmp->x;
- y += pptTmp->y;
- if(box.x1 > x) box.x1 = x;
- else if(box.x2 < x) box.x2 = x;
- if(box.y1 > y) box.y1 = y;
- else if(box.y2 < y) box.y2 = y;
- }
- }
- else
- {
- while(--nptTmp)
- {
- pptTmp++;
- if(box.x1 > pptTmp->x) box.x1 = pptTmp->x;
- else if(box.x2 < pptTmp->x) box.x2 = pptTmp->x;
- if(box.y1 > pptTmp->y) box.y1 = pptTmp->y;
- else if(box.y2 < pptTmp->y) box.y2 = pptTmp->y;
- }
- }
-
- box.x2++;
- box.y2++;
-
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
-
- (*pGC->ops->FillPolygon)(pDrawable, pGC, shape, mode, npt, ppt);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-
-static void
-damagePolyFillRect(DrawablePtr pDrawable,
- GCPtr pGC,
- int nRects,
- xRectangle *pRects)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
- if (nRects && checkGCDamage (pDrawable, pGC))
- {
- BoxRec box;
- xRectangle *pRectsTmp = pRects;
- int nRectsTmp = nRects;
-
- box.x1 = pRectsTmp->x;
- box.x2 = box.x1 + pRectsTmp->width;
- box.y1 = pRectsTmp->y;
- box.y2 = box.y1 + pRectsTmp->height;
-
- while(--nRectsTmp)
- {
- pRectsTmp++;
- if(box.x1 > pRectsTmp->x) box.x1 = pRectsTmp->x;
- if(box.x2 < (pRectsTmp->x + pRectsTmp->width))
- box.x2 = pRectsTmp->x + pRectsTmp->width;
- if(box.y1 > pRectsTmp->y) box.y1 = pRectsTmp->y;
- if(box.y2 < (pRectsTmp->y + pRectsTmp->height))
- box.y2 = pRectsTmp->y + pRectsTmp->height;
- }
-
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
- (*pGC->ops->PolyFillRect)(pDrawable, pGC, nRects, pRects);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-
-static void
-damagePolyFillArc(DrawablePtr pDrawable,
- GCPtr pGC,
- int nArcs,
- xArc *pArcs)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (nArcs && checkGCDamage (pDrawable, pGC))
- {
- BoxRec box;
- int nArcsTmp = nArcs;
- xArc *pArcsTmp = pArcs;
-
- box.x1 = pArcsTmp->x;
- box.x2 = box.x1 + pArcsTmp->width;
- box.y1 = pArcsTmp->y;
- box.y2 = box.y1 + pArcsTmp->height;
-
- while(--nArcsTmp)
- {
- pArcsTmp++;
- if(box.x1 > pArcsTmp->x)
- box.x1 = pArcsTmp->x;
- if(box.x2 < (pArcsTmp->x + pArcsTmp->width))
- box.x2 = pArcsTmp->x + pArcsTmp->width;
- if(box.y1 > pArcsTmp->y)
- box.y1 = pArcsTmp->y;
- if(box.y2 < (pArcsTmp->y + pArcsTmp->height))
- box.y2 = pArcsTmp->y + pArcsTmp->height;
- }
-
- TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
- (*pGC->ops->PolyFillArc)(pDrawable, pGC, nArcs, pArcs);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-/*
- * general Poly/Image text function. Extract glyph information,
- * compute bounding box and remove cursor if it is overlapped.
- */
-
-static void
-damageDamageChars (DrawablePtr pDrawable,
- FontPtr font,
- int x,
- int y,
- unsigned int n,
- CharInfoPtr *charinfo,
- Bool imageblt,
- int subWindowMode)
-{
- ExtentInfoRec extents;
- BoxRec box;
-
- QueryGlyphExtents(font, charinfo, n, &extents);
- if (imageblt)
- {
- if (extents.overallWidth > extents.overallRight)
- extents.overallRight = extents.overallWidth;
- if (extents.overallWidth < extents.overallLeft)
- extents.overallLeft = extents.overallWidth;
- if (extents.overallLeft > 0)
- extents.overallLeft = 0;
- if (extents.fontAscent > extents.overallAscent)
- extents.overallAscent = extents.fontAscent;
- if (extents.fontDescent > extents.overallDescent)
- extents.overallDescent = extents.fontDescent;
- }
- box.x1 = x + extents.overallLeft;
- box.y1 = y - extents.overallAscent;
- box.x2 = x + extents.overallRight;
- box.y2 = y + extents.overallDescent;
- damageDamageBox (pDrawable, &box, subWindowMode);
-}
-
-/*
- * values for textType:
- */
-#define TT_POLY8 0
-#define TT_IMAGE8 1
-#define TT_POLY16 2
-#define TT_IMAGE16 3
-
-static int
-damageText (DrawablePtr pDrawable,
- GCPtr pGC,
- int x,
- int y,
- unsigned long count,
- char *chars,
- FontEncoding fontEncoding,
- Bool textType)
-{
- CharInfoPtr *charinfo;
- CharInfoPtr *info;
- unsigned long i;
- unsigned int n;
- int w;
- Bool imageblt;
-
- imageblt = (textType == TT_IMAGE8) || (textType == TT_IMAGE16);
-
- charinfo = malloc(count * sizeof(CharInfoPtr));
- if (!charinfo)
- return x;
-
- GetGlyphs(pGC->font, count, (unsigned char *)chars,
- fontEncoding, &i, charinfo);
- n = (unsigned int)i;
- w = 0;
- if (!imageblt)
- for (info = charinfo; i--; info++)
- w += (*info)->metrics.characterWidth;
-
- if (n != 0) {
- damageDamageChars (pDrawable, pGC->font, x + pDrawable->x, y + pDrawable->y, n,
- charinfo, imageblt, pGC->subWindowMode);
- if (imageblt)
- (*pGC->ops->ImageGlyphBlt)(pDrawable, pGC, x, y, n, charinfo,
- FONTGLYPHS(pGC->font));
- else
- (*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, n, charinfo,
- FONTGLYPHS(pGC->font));
- }
- free(charinfo);
- return x + w;
-}
-
-static int
-damagePolyText8(DrawablePtr pDrawable,
- GCPtr pGC,
- int x,
- int y,
- int count,
- char *chars)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (checkGCDamage (pDrawable, pGC))
- x = damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
- Linear8Bit, TT_POLY8);
- else
- x = (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, count, chars);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
- return x;
-}
-
-static int
-damagePolyText16(DrawablePtr pDrawable,
- GCPtr pGC,
- int x,
- int y,
- int count,
- unsigned short *chars)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (checkGCDamage (pDrawable, pGC))
- x = damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
- FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit,
- TT_POLY16);
- else
- x = (*pGC->ops->PolyText16)(pDrawable, pGC, x, y, count, chars);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
- return x;
-}
-
-static void
-damageImageText8(DrawablePtr pDrawable,
- GCPtr pGC,
- int x,
- int y,
- int count,
- char *chars)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (checkGCDamage (pDrawable, pGC))
- damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
- Linear8Bit, TT_IMAGE8);
- else
- (*pGC->ops->ImageText8)(pDrawable, pGC, x, y, count, chars);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damageImageText16(DrawablePtr pDrawable,
- GCPtr pGC,
- int x,
- int y,
- int count,
- unsigned short *chars)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-
- if (checkGCDamage (pDrawable, pGC))
- damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
- FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit,
- TT_IMAGE16);
- else
- (*pGC->ops->ImageText16)(pDrawable, pGC, x, y, count, chars);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-
-static void
-damageImageGlyphBlt(DrawablePtr pDrawable,
- GCPtr pGC,
- int x,
- int y,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- pointer pglyphBase)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
- damageDamageChars (pDrawable, pGC->font, x + pDrawable->x, y + pDrawable->y,
- nglyph, ppci, TRUE, pGC->subWindowMode);
- (*pGC->ops->ImageGlyphBlt)(pDrawable, pGC, x, y, nglyph,
- ppci, pglyphBase);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damagePolyGlyphBlt(DrawablePtr pDrawable,
- GCPtr pGC,
- int x,
- int y,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- pointer pglyphBase)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
- damageDamageChars (pDrawable, pGC->font, x + pDrawable->x, y + pDrawable->y,
- nglyph, ppci, FALSE, pGC->subWindowMode);
- (*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, nglyph,
- ppci, pglyphBase);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damagePushPixels(GCPtr pGC,
- PixmapPtr pBitMap,
- DrawablePtr pDrawable,
- int dx,
- int dy,
- int xOrg,
- int yOrg)
-{
- DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
- if(checkGCDamage (pDrawable, pGC))
- {
- BoxRec box;
-
- box.x1 = xOrg;
- box.y1 = yOrg;
-
- if(!pGC->miTranslate) {
- box.x1 += pDrawable->x;
- box.y1 += pDrawable->y;
- }
-
- box.x2 = box.x1 + dx;
- box.y2 = box.y1 + dy;
-
- TRIM_BOX(box, pGC);
- if(BOX_NOT_EMPTY(box))
- damageDamageBox (pDrawable, &box, pGC->subWindowMode);
- }
- (*pGC->ops->PushPixels)(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg);
- damageRegionProcessPending (pDrawable);
- DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
-}
-
-static void
-damageRemoveDamage (DamagePtr *pPrev, DamagePtr pDamage)
-{
- while (*pPrev)
- {
- if (*pPrev == pDamage)
- {
- *pPrev = pDamage->pNext;
- return;
- }
- pPrev = &(*pPrev)->pNext;
- }
-#if DAMAGE_VALIDATE_ENABLE
- ErrorF ("Damage not on list\n");
- OsAbort ();
-#endif
-}
-
-static void
-damageInsertDamage (DamagePtr *pPrev, DamagePtr pDamage)
-{
-#if DAMAGE_VALIDATE_ENABLE
- DamagePtr pOld;
-
- for (pOld = *pPrev; pOld; pOld = pOld->pNext)
- if (pOld == pDamage) {
- ErrorF ("Damage already on list\n");
- OsAbort ();
- }
-#endif
- pDamage->pNext = *pPrev;
- *pPrev = pDamage;
-}
-
-static Bool
-damageDestroyPixmap (PixmapPtr pPixmap)
-{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- damageScrPriv(pScreen);
-
- if (pPixmap->refcnt == 1)
- {
- DamagePtr *pPrev = getPixmapDamageRef (pPixmap);
- DamagePtr pDamage;
-
- while ((pDamage = *pPrev))
- {
- damageRemoveDamage (pPrev, pDamage);
- if (!pDamage->isWindow)
- DamageDestroy (pDamage);
- }
- }
- unwrap (pScrPriv, pScreen, DestroyPixmap);
- (*pScreen->DestroyPixmap) (pPixmap);
- wrap (pScrPriv, pScreen, DestroyPixmap, damageDestroyPixmap);
- return TRUE;
-}
-
-static void
-damageCopyWindow(WindowPtr pWindow,
- DDXPointRec ptOldOrg,
- RegionPtr prgnSrc)
-{
- ScreenPtr pScreen = pWindow->drawable.pScreen;
- damageScrPriv(pScreen);
-
- if (getWindowDamage (pWindow))
- {
- int dx = pWindow->drawable.x - ptOldOrg.x;
- int dy = pWindow->drawable.y - ptOldOrg.y;
-
- /*
- * The region comes in source relative, but the damage occurs
- * at the destination location. Translate back and forth.
- */
- RegionTranslate(prgnSrc, dx, dy);
- damageRegionAppend (&pWindow->drawable, prgnSrc, FALSE, -1);
- RegionTranslate(prgnSrc, -dx, -dy);
- }
- unwrap (pScrPriv, pScreen, CopyWindow);
- (*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc);
- damageRegionProcessPending (&pWindow->drawable);
- wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow);
-}
-
-static GCOps damageGCOps = {
- damageFillSpans, damageSetSpans,
- damagePutImage, damageCopyArea,
- damageCopyPlane, damagePolyPoint,
- damagePolylines, damagePolySegment,
- damagePolyRectangle, damagePolyArc,
- damageFillPolygon, damagePolyFillRect,
- damagePolyFillArc, damagePolyText8,
- damagePolyText16, damageImageText8,
- damageImageText16, damageImageGlyphBlt,
- damagePolyGlyphBlt, damagePushPixels,
-};
-
-static void
-damageSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap)
-{
- DamagePtr pDamage;
- ScreenPtr pScreen = pWindow->drawable.pScreen;
- damageScrPriv(pScreen);
-
- if ((pDamage = damageGetWinPriv(pWindow)))
- {
- PixmapPtr pOldPixmap = (*pScreen->GetWindowPixmap) (pWindow);
- DamagePtr *pPrev = getPixmapDamageRef(pOldPixmap);
-
- while (pDamage)
- {
- damageRemoveDamage (pPrev, pDamage);
- pDamage = pDamage->pNextWin;
- }
- }
- unwrap (pScrPriv, pScreen, SetWindowPixmap);
- (*pScreen->SetWindowPixmap) (pWindow, pPixmap);
- wrap (pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap);
- if ((pDamage = damageGetWinPriv(pWindow)))
- {
- DamagePtr *pPrev = getPixmapDamageRef(pPixmap);
-
- while (pDamage)
- {
- damageInsertDamage (pPrev, pDamage);
- pDamage = pDamage->pNextWin;
- }
- }
-}
-
-static Bool
-damageDestroyWindow (WindowPtr pWindow)
-{
- DamagePtr pDamage;
- ScreenPtr pScreen = pWindow->drawable.pScreen;
- Bool ret;
- damageScrPriv(pScreen);
-
- while ((pDamage = damageGetWinPriv(pWindow)))
- {
- DamageUnregister (&pWindow->drawable, pDamage);
- DamageDestroy (pDamage);
- }
- unwrap (pScrPriv, pScreen, DestroyWindow);
- ret = (*pScreen->DestroyWindow) (pWindow);
- wrap (pScrPriv, pScreen, DestroyWindow, damageDestroyWindow);
- return ret;
-}
-
-static Bool
-damageCloseScreen (int i, ScreenPtr pScreen)
-{
- damageScrPriv(pScreen);
-
- unwrap (pScrPriv, pScreen, DestroyPixmap);
- unwrap (pScrPriv, pScreen, CreateGC);
- unwrap (pScrPriv, pScreen, CopyWindow);
- unwrap (pScrPriv, pScreen, CloseScreen);
- free(pScrPriv);
- return (*pScreen->CloseScreen) (i, pScreen);
-}
-
-/**
- * Default implementations of the damage management functions.
- */
-void miDamageCreate (DamagePtr pDamage)
-{
-}
-
-void miDamageRegister (DrawablePtr pDrawable, DamagePtr pDamage)
-{
-}
-
-void miDamageUnregister (DrawablePtr pDrawable, DamagePtr pDamage)
-{
-}
-
-void miDamageDestroy (DamagePtr pDamage)
-{
-}
-
-/**
- * Public functions for consumption outside this file.
- */
-
-Bool
-DamageSetup (ScreenPtr pScreen)
-{
- DamageScrPrivPtr pScrPriv;
- PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
- const DamageScreenFuncsRec miFuncs = {
- miDamageCreate, miDamageRegister, miDamageUnregister, miDamageDestroy
- };
-
- if (!dixRegisterPrivateKey(&damageScrPrivateKeyRec, PRIVATE_SCREEN, 0))
- return FALSE;
-
- if (dixLookupPrivate(&pScreen->devPrivates, damageScrPrivateKey))
- return TRUE;
-
- if (!dixRegisterPrivateKey(&damageGCPrivateKeyRec, PRIVATE_GC, sizeof(DamageGCPrivRec)))
- return FALSE;
-
- if (!dixRegisterPrivateKey(&damagePixPrivateKeyRec, PRIVATE_PIXMAP, 0))
- return FALSE;
-
- if (!dixRegisterPrivateKey(&damageWinPrivateKeyRec, PRIVATE_WINDOW, 0))
- return FALSE;
-
- pScrPriv = malloc(sizeof (DamageScrPrivRec));
- if (!pScrPriv)
- return FALSE;
-
- pScrPriv->internalLevel = 0;
- pScrPriv->pScreenDamage = 0;
-
- wrap (pScrPriv, pScreen, DestroyPixmap, damageDestroyPixmap);
- wrap (pScrPriv, pScreen, CreateGC, damageCreateGC);
- wrap (pScrPriv, pScreen, DestroyWindow, damageDestroyWindow);
- wrap (pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap);
- wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow);
- wrap (pScrPriv, pScreen, CloseScreen, damageCloseScreen);
- if (ps) {
- wrap (pScrPriv, ps, Glyphs, damageGlyphs);
- wrap (pScrPriv, ps, Composite, damageComposite);
- wrap (pScrPriv, ps, AddTraps, damageAddTraps);
- }
-
- pScrPriv->funcs = miFuncs;
-
- dixSetPrivate(&pScreen->devPrivates, damageScrPrivateKey, pScrPriv);
- return TRUE;
-}
-
-DamagePtr
-DamageCreate (DamageReportFunc damageReport,
- DamageDestroyFunc damageDestroy,
- DamageReportLevel damageLevel,
- Bool isInternal,
- ScreenPtr pScreen,
- void *closure)
-{
- damageScrPriv(pScreen);
- DamagePtr pDamage;
-
- pDamage = dixAllocateObjectWithPrivates(DamageRec, PRIVATE_DAMAGE);
- if (!pDamage)
- return 0;
- pDamage->pNext = 0;
- pDamage->pNextWin = 0;
- RegionNull(&pDamage->damage);
- RegionNull(&pDamage->pendingDamage);
-
- pDamage->damageLevel = damageLevel;
- pDamage->isInternal = isInternal;
- pDamage->closure = closure;
- pDamage->isWindow = FALSE;
- pDamage->pDrawable = 0;
- pDamage->reportAfter = FALSE;
-
- pDamage->damageReport = damageReport;
- pDamage->damageReportPostRendering = NULL;
- pDamage->damageDestroy = damageDestroy;
- pDamage->damageMarker = NULL;
- pDamage->pScreen = pScreen;
-
- (*pScrPriv->funcs.Create) (pDamage);
-
- return pDamage;
-}
-
-void
-DamageRegister (DrawablePtr pDrawable,
- DamagePtr pDamage)
-{
- ScreenPtr pScreen = pDrawable->pScreen;
- damageScrPriv(pScreen);
-
-#if DAMAGE_VALIDATE_ENABLE
- if (pDrawable->pScreen != pDamage->pScreen)
- {
- ErrorF ("DamageRegister called with mismatched screens\n");
- OsAbort ();
- }
-#endif
-
- if (pDrawable->type == DRAWABLE_WINDOW)
- {
- WindowPtr pWindow = (WindowPtr) pDrawable;
- winDamageRef(pWindow);
-
-#if DAMAGE_VALIDATE_ENABLE
- DamagePtr pOld;
-
- for (pOld = *pPrev; pOld; pOld = pOld->pNextWin)
- if (pOld == pDamage) {
- ErrorF ("Damage already on window list\n");
- OsAbort ();
- }
-#endif
- pDamage->pNextWin = *pPrev;
- *pPrev = pDamage;
- pDamage->isWindow = TRUE;
- }
- else
- pDamage->isWindow = FALSE;
- pDamage->pDrawable = pDrawable;
- damageInsertDamage (getDrawableDamageRef (pDrawable), pDamage);
- (*pScrPriv->funcs.Register) (pDrawable, pDamage);
-}
-
-void
-DamageDrawInternal (ScreenPtr pScreen, Bool enable)
-{
- damageScrPriv (pScreen);
-
- pScrPriv->internalLevel += enable ? 1 : -1;
-}
-
-void
-DamageUnregister (DrawablePtr pDrawable,
- DamagePtr pDamage)
-{
- ScreenPtr pScreen = pDrawable->pScreen;
- damageScrPriv(pScreen);
-
- (*pScrPriv->funcs.Unregister) (pDrawable, pDamage);
-
- if (pDrawable->type == DRAWABLE_WINDOW)
- {
- WindowPtr pWindow = (WindowPtr) pDrawable;
- winDamageRef (pWindow);
-#if DAMAGE_VALIDATE_ENABLE
- int found = 0;
-#endif
-
- while (*pPrev)
- {
- if (*pPrev == pDamage)
- {
- *pPrev = pDamage->pNextWin;
-#if DAMAGE_VALIDATE_ENABLE
- found = 1;
-#endif
- break;
- }
- pPrev = &(*pPrev)->pNextWin;
- }
-#if DAMAGE_VALIDATE_ENABLE
- if (!found) {
- ErrorF ("Damage not on window list\n");
- OsAbort ();
- }
-#endif
- }
- pDamage->pDrawable = 0;
- damageRemoveDamage (getDrawableDamageRef (pDrawable), pDamage);
-}
-
-void
-DamageDestroy (DamagePtr pDamage)
-{
- ScreenPtr pScreen = pDamage->pScreen;
- damageScrPriv(pScreen);
-
- if (pDamage->damageDestroy)
- (*pDamage->damageDestroy) (pDamage, pDamage->closure);
- (*pScrPriv->funcs.Destroy) (pDamage);
- RegionUninit(&pDamage->damage);
- RegionUninit(&pDamage->pendingDamage);
- dixFreeObjectWithPrivates(pDamage, PRIVATE_DAMAGE);
-}
-
-Bool
-DamageSubtract (DamagePtr pDamage,
- const RegionPtr pRegion)
-{
- RegionPtr pClip;
- RegionRec pixmapClip;
- DrawablePtr pDrawable = pDamage->pDrawable;
-
- RegionSubtract(&pDamage->damage, &pDamage->damage, pRegion);
- if (pDrawable)
- {
- if (pDrawable->type == DRAWABLE_WINDOW)
- pClip = &((WindowPtr) pDrawable)->borderClip;
- else
- {
- BoxRec box;
-
- box.x1 = pDrawable->x;
- box.y1 = pDrawable->y;
- box.x2 = pDrawable->x + pDrawable->width;
- box.y2 = pDrawable->y + pDrawable->height;
- RegionInit(&pixmapClip, &box, 1);
- pClip = &pixmapClip;
- }
- RegionTranslate(&pDamage->damage, pDrawable->x, pDrawable->y);
- RegionIntersect(&pDamage->damage, &pDamage->damage, pClip);
- RegionTranslate(&pDamage->damage, -pDrawable->x, -pDrawable->y);
- if (pDrawable->type != DRAWABLE_WINDOW)
- RegionUninit(&pixmapClip);
- }
- return RegionNotEmpty(&pDamage->damage);
-}
-
-void
-DamageEmpty (DamagePtr pDamage)
-{
- RegionEmpty(&pDamage->damage);
-}
-
-RegionPtr
-DamageRegion (DamagePtr pDamage)
-{
- return &pDamage->damage;
-}
-
-RegionPtr
-DamagePendingRegion (DamagePtr pDamage)
-{
- return &pDamage->pendingDamage;
-}
-
-void
-DamageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion)
-{
- damageRegionAppend (pDrawable, pRegion, FALSE, -1);
-}
-
-void
-DamageRegionProcessPending (DrawablePtr pDrawable)
-{
- damageRegionProcessPending (pDrawable);
-}
-
-/* If a damage marker is provided, then this function must be called after rendering is done. */
-/* Please do call back so any future enhancements can assume this function is called. */
-/* There are no strict timing requirements for calling this function, just as soon as (is cheaply) possible. */
-void
-DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion)
-{
- if (pDamage->damageReportPostRendering)
- damageReportDamagePostRendering (pDamage, pOldDamage, pRegion);
-}
-
-/* This call is very odd, i'm leaving it intact for API sake, but please don't use it. */
-void
-DamageDamageRegion (DrawablePtr pDrawable,
- RegionPtr pRegion)
-{
- damageRegionAppend (pDrawable, pRegion, FALSE, -1);
-
- /* Go back and report this damage for DamagePtrs with reportAfter set, since
- * this call isn't part of an in-progress drawing op in the call chain and
- * the DDX probably just wants to know about it right away.
- */
- damageRegionProcessPending (pDrawable);
-}
-
-void
-DamageSetReportAfterOp (DamagePtr pDamage, Bool reportAfter)
-{
- pDamage->reportAfter = reportAfter;
-}
-
-void
-DamageSetPostRenderingFunctions(DamagePtr pDamage, DamageReportFunc damageReportPostRendering,
- DamageMarkerFunc damageMarker)
-{
- pDamage->damageReportPostRendering = damageReportPostRendering;
- pDamage->damageMarker = damageMarker;
-}
-
-DamageScreenFuncsPtr
-DamageGetScreenFuncs (ScreenPtr pScreen)
-{
- damageScrPriv(pScreen);
- return &pScrPriv->funcs;
-}
+/*
+ * Copyright © 2003 Keith Packard
+ *
+ * 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, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <X11/X.h>
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include <X11/fonts/font.h>
+#include "dixfontstr.h"
+#include <X11/fonts/fontstruct.h>
+#include "mi.h"
+#include "regionstr.h"
+#include "globals.h"
+#include "gcstruct.h"
+#include "damage.h"
+#include "damagestr.h"
+#ifdef COMPOSITE
+#include "cw.h"
+#endif
+
+#define wrap(priv, real, mem, func) {\
+ priv->mem = real->mem; \
+ real->mem = func; \
+}
+
+#define unwrap(priv, real, mem) {\
+ real->mem = priv->mem; \
+}
+
+#define BOX_SAME(a,b) \
+ ((a)->x1 == (b)->x1 && \
+ (a)->y1 == (b)->y1 && \
+ (a)->x2 == (b)->x2 && \
+ (a)->y2 == (b)->y2)
+
+#define DAMAGE_VALIDATE_ENABLE 0
+#define DAMAGE_DEBUG_ENABLE 0
+#if DAMAGE_DEBUG_ENABLE
+#define DAMAGE_DEBUG(x) ErrorF x
+#else
+#define DAMAGE_DEBUG(x)
+#endif
+
+#define getPixmapDamageRef(pPixmap) ((DamagePtr *) \
+ dixLookupPrivateAddr(&(pPixmap)->devPrivates, damagePixPrivateKey))
+
+#define pixmapDamage(pPixmap) damagePixPriv(pPixmap)
+
+static DevPrivateKeyRec damageScrPrivateKeyRec;
+#define damageScrPrivateKey (&damageScrPrivateKeyRec)
+static DevPrivateKeyRec damagePixPrivateKeyRec;
+#define damagePixPrivateKey (&damagePixPrivateKeyRec)
+static DevPrivateKeyRec damageGCPrivateKeyRec;
+#define damageGCPrivateKey (&damageGCPrivateKeyRec)
+static DevPrivateKeyRec damageWinPrivateKeyRec;
+#define damageWinPrivateKey (&damageWinPrivateKeyRec)
+
+static DamagePtr *
+getDrawableDamageRef (DrawablePtr pDrawable)
+{
+ PixmapPtr pPixmap;
+
+ if (WindowDrawable(pDrawable->type))
+ {
+ ScreenPtr pScreen = pDrawable->pScreen;
+
+ pPixmap = 0;
+ if (pScreen->GetWindowPixmap
+#ifdef ROOTLESS_WORKAROUND
+ && ((WindowPtr)pDrawable)->viewable
+#endif
+ )
+ pPixmap = (*pScreen->GetWindowPixmap) ((WindowPtr)pDrawable);
+
+ if (!pPixmap)
+ {
+ damageScrPriv(pScreen);
+
+ return &pScrPriv->pScreenDamage;
+ }
+ }
+ else
+ pPixmap = (PixmapPtr) pDrawable;
+ return getPixmapDamageRef (pPixmap);
+}
+
+#define getDrawableDamage(pDrawable) (*getDrawableDamageRef (pDrawable))
+#define getWindowDamage(pWin) getDrawableDamage(&(pWin)->drawable)
+
+#define drawableDamage(pDrawable) \
+ DamagePtr pDamage = getDrawableDamage(pDrawable)
+
+#define windowDamage(pWin) drawableDamage(&(pWin)->drawable)
+
+#define winDamageRef(pWindow) \
+ DamagePtr *pPrev = (DamagePtr *) \
+ dixLookupPrivateAddr(&(pWindow)->devPrivates, damageWinPrivateKey)
+
+static void
+damageReportDamage (DamagePtr pDamage, RegionPtr pDamageRegion)
+{
+ BoxRec tmpBox;
+ RegionRec tmpRegion;
+ Bool was_empty;
+
+ switch (pDamage->damageLevel) {
+ case DamageReportRawRegion:
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ pDamageRegion);
+ (*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure);
+ break;
+ case DamageReportDeltaRegion:
+ RegionNull(&tmpRegion);
+ RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage);
+ if (RegionNotEmpty(&tmpRegion)) {
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ pDamageRegion);
+ (*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure);
+ }
+ RegionUninit(&tmpRegion);
+ break;
+ case DamageReportBoundingBox:
+ tmpBox = *RegionExtents(&pDamage->damage);
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ pDamageRegion);
+ if (!BOX_SAME (&tmpBox, RegionExtents(&pDamage->damage))) {
+ (*pDamage->damageReport) (pDamage, &pDamage->damage,
+ pDamage->closure);
+ }
+ break;
+ case DamageReportNonEmpty:
+ was_empty = !RegionNotEmpty(&pDamage->damage);
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ pDamageRegion);
+ if (was_empty && RegionNotEmpty(&pDamage->damage)) {
+ (*pDamage->damageReport) (pDamage, &pDamage->damage,
+ pDamage->closure);
+ }
+ break;
+ case DamageReportNone:
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ pDamageRegion);
+ break;
+ }
+}
+
+static void
+damageReportDamagePostRendering (DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pDamageRegion)
+{
+ BoxRec tmpBox;
+ RegionRec tmpRegion, newDamage;
+ Bool was_empty;
+
+ RegionUnion(&newDamage, pOldDamage, pDamageRegion);
+
+ switch (pDamage->damageLevel) {
+ case DamageReportRawRegion:
+ (*pDamage->damageReportPostRendering) (pDamage, pDamageRegion, pDamage->closure);
+ break;
+ case DamageReportDeltaRegion:
+ RegionNull(&tmpRegion);
+ RegionSubtract(&tmpRegion, pDamageRegion, pOldDamage);
+ if (RegionNotEmpty(&tmpRegion)) {
+ (*pDamage->damageReportPostRendering) (pDamage, &tmpRegion, pDamage->closure);
+ }
+ RegionUninit(&tmpRegion);
+ break;
+ case DamageReportBoundingBox:
+ tmpBox = *RegionExtents(pOldDamage);
+ if (!BOX_SAME (&tmpBox, RegionExtents(&newDamage))) {
+ (*pDamage->damageReportPostRendering) (pDamage, &newDamage,
+ pDamage->closure);
+ }
+ break;
+ case DamageReportNonEmpty:
+ was_empty = !RegionNotEmpty(pOldDamage);
+ if (was_empty && RegionNotEmpty(&newDamage)) {
+ (*pDamage->damageReportPostRendering) (pDamage, &newDamage,
+ pDamage->closure);
+ }
+ break;
+ case DamageReportNone:
+ break;
+ }
+
+ RegionUninit(&newDamage);
+}
+
+#if DAMAGE_DEBUG_ENABLE
+static void
+_damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, int subWindowMode, const char *where)
+#define damageRegionAppend(d,r,c,m) _damageRegionAppend(d,r,c,m,__FUNCTION__)
+#else
+static void
+damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
+ int subWindowMode)
+#endif
+{
+ ScreenPtr pScreen = pDrawable->pScreen;
+ damageScrPriv(pScreen);
+ drawableDamage(pDrawable);
+ DamagePtr pNext;
+ RegionRec clippedRec;
+ RegionPtr pDamageRegion;
+ RegionRec pixClip;
+ int draw_x, draw_y;
+#ifdef COMPOSITE
+ int screen_x = 0, screen_y = 0;
+#endif
+
+ /* short circuit for empty regions */
+ if (!RegionNotEmpty(pRegion))
+ return;
+
+#ifdef COMPOSITE
+ /*
+ * When drawing to a pixmap which is storing window contents,
+ * the region presented is in pixmap relative coordinates which
+ * need to be converted to screen relative coordinates
+ */
+ if (pDrawable->type != DRAWABLE_WINDOW)
+ {
+ screen_x = ((PixmapPtr) pDrawable)->screen_x - pDrawable->x;
+ screen_y = ((PixmapPtr) pDrawable)->screen_y - pDrawable->y;
+ }
+ if (screen_x || screen_y)
+ RegionTranslate(pRegion, screen_x, screen_y);
+#endif
+
+ if (pDrawable->type == DRAWABLE_WINDOW &&
+ ((WindowPtr)(pDrawable))->backingStore == NotUseful)
+ {
+ if (subWindowMode == ClipByChildren)
+ {
+ RegionIntersect(pRegion, pRegion,
+ &((WindowPtr)(pDrawable))->clipList);
+ }
+ else if (subWindowMode == IncludeInferiors)
+ {
+ RegionPtr pTempRegion =
+ NotClippedByChildren((WindowPtr)(pDrawable));
+ RegionIntersect(pRegion, pRegion, pTempRegion);
+ RegionDestroy(pTempRegion);
+ }
+ /* If subWindowMode is set to an invalid value, don't perform
+ * any drawable-based clipping. */
+ }
+
+
+ RegionNull(&clippedRec);
+ for (; pDamage; pDamage = pNext)
+ {
+ pNext = pDamage->pNext;
+ /*
+ * Check for internal damage and don't send events
+ */
+ if (pScrPriv->internalLevel > 0 && !pDamage->isInternal)
+ {
+ DAMAGE_DEBUG (("non internal damage, skipping at %d\n",
+ pScrPriv->internalLevel));
+ continue;
+ }
+ /*
+ * Check for unrealized windows
+ */
+ if (pDamage->pDrawable->type == DRAWABLE_WINDOW &&
+ !((WindowPtr) (pDamage->pDrawable))->realized)
+ {
+ continue;
+ }
+
+ draw_x = pDamage->pDrawable->x;
+ draw_y = pDamage->pDrawable->y;
+#ifdef COMPOSITE
+ /*
+ * Need to move everyone to screen coordinates
+ * XXX what about off-screen pixmaps with non-zero x/y?
+ */
+ if (!WindowDrawable(pDamage->pDrawable->type))
+ {
+ draw_x += ((PixmapPtr) pDamage->pDrawable)->screen_x;
+ draw_y += ((PixmapPtr) pDamage->pDrawable)->screen_y;
+ }
+#endif
+
+ /*
+ * Clip against border or pixmap bounds
+ */
+
+ pDamageRegion = pRegion;
+ if (clip || pDamage->pDrawable != pDrawable)
+ {
+ pDamageRegion = &clippedRec;
+ if (pDamage->pDrawable->type == DRAWABLE_WINDOW) {
+ RegionIntersect(pDamageRegion, pRegion,
+ &((WindowPtr)(pDamage->pDrawable))->borderClip);
+ } else {
+ BoxRec box;
+ box.x1 = draw_x;
+ box.y1 = draw_y;
+ box.x2 = draw_x + pDamage->pDrawable->width;
+ box.y2 = draw_y + pDamage->pDrawable->height;
+ RegionInit(&pixClip, &box, 1);
+ RegionIntersect(pDamageRegion, pRegion, &pixClip);
+ RegionUninit(&pixClip);
+ }
+ /*
+ * Short circuit empty results
+ */
+ if (!RegionNotEmpty(pDamageRegion))
+ continue;
+ }
+
+ DAMAGE_DEBUG (("%s %d x %d +%d +%d (target 0x%lx monitor 0x%lx)\n",
+ where,
+ pDamageRegion->extents.x2 - pDamageRegion->extents.x1,
+ pDamageRegion->extents.y2 - pDamageRegion->extents.y1,
+ pDamageRegion->extents.x1, pDamageRegion->extents.y1,
+ pDrawable->id, pDamage->pDrawable->id));
+
+ /*
+ * Move region to target coordinate space
+ */
+ if (draw_x || draw_y)
+ RegionTranslate(pDamageRegion, -draw_x, -draw_y);
+
+ /* Store damage region if needed after submission. */
+ if (pDamage->reportAfter || pDamage->damageMarker)
+ RegionUnion(&pDamage->pendingDamage,
+ &pDamage->pendingDamage, pDamageRegion);
+
+ /* Duplicate current damage if needed. */
+ if (pDamage->damageMarker)
+ RegionCopy(&pDamage->backupDamage, &pDamage->damage);
+
+ /* Report damage now, if desired. */
+ if (!pDamage->reportAfter) {
+ if (pDamage->damageReport)
+ damageReportDamage (pDamage, pDamageRegion);
+ else
+ RegionUnion(&pDamage->damage,
+ &pDamage->damage, pDamageRegion);
+ }
+
+ /*
+ * translate original region back
+ */
+ if (pDamageRegion == pRegion && (draw_x || draw_y))
+ RegionTranslate(pDamageRegion, draw_x, draw_y);
+ }
+#ifdef COMPOSITE
+ if (screen_x || screen_y)
+ RegionTranslate(pRegion, -screen_x, -screen_y);
+#endif
+
+ RegionUninit(&clippedRec);
+}
+
+static void
+damageRegionProcessPending (DrawablePtr pDrawable)
+{
+ drawableDamage(pDrawable);
+
+ for (; pDamage != NULL; pDamage = pDamage->pNext)
+ {
+ /* submit damage marker whenever possible. */
+ if (pDamage->damageMarker)
+ (*pDamage->damageMarker) (pDrawable, pDamage, &pDamage->backupDamage, &pDamage->pendingDamage, pDamage->closure);
+ if (pDamage->reportAfter) {
+ /* It's possible that there is only interest in postRendering reporting. */
+ if (pDamage->damageReport)
+ damageReportDamage (pDamage, &pDamage->pendingDamage);
+ else
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ &pDamage->pendingDamage);
+ }
+
+ if (pDamage->reportAfter || pDamage->damageMarker)
+ RegionEmpty(&pDamage->pendingDamage);
+ if (pDamage->damageMarker)
+ RegionEmpty(&pDamage->backupDamage);
+ }
+
+}
+
+#if DAMAGE_DEBUG_ENABLE
+#define damageDamageBox(d,b,m) _damageDamageBox(d,b,m,__FUNCTION__)
+static void
+_damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode, const char *where)
+#else
+static void
+damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode)
+#endif
+{
+ RegionRec region;
+
+ RegionInit(&region, pBox, 1);
+#if DAMAGE_DEBUG_ENABLE
+ _damageRegionAppend (pDrawable, &region, TRUE, subWindowMode, where);
+#else
+ damageRegionAppend (pDrawable, &region, TRUE, subWindowMode);
+#endif
+ RegionUninit(&region);
+}
+
+static void damageValidateGC(GCPtr, unsigned long, DrawablePtr);
+static void damageChangeGC(GCPtr, unsigned long);
+static void damageCopyGC(GCPtr, unsigned long, GCPtr);
+static void damageDestroyGC(GCPtr);
+static void damageChangeClip(GCPtr, int, pointer, int);
+static void damageDestroyClip(GCPtr);
+static void damageCopyClip(GCPtr, GCPtr);
+
+static GCFuncs damageGCFuncs = {
+ damageValidateGC, damageChangeGC, damageCopyGC, damageDestroyGC,
+ damageChangeClip, damageDestroyClip, damageCopyClip
+};
+
+static GCOps damageGCOps;
+
+static Bool
+damageCreateGC(GCPtr pGC)
+{
+ ScreenPtr pScreen = pGC->pScreen;
+ damageScrPriv(pScreen);
+ damageGCPriv(pGC);
+ Bool ret;
+
+ unwrap (pScrPriv, pScreen, CreateGC);
+ if((ret = (*pScreen->CreateGC) (pGC))) {
+ pGCPriv->ops = NULL;
+ pGCPriv->funcs = pGC->funcs;
+ pGC->funcs = &damageGCFuncs;
+ }
+ wrap (pScrPriv, pScreen, CreateGC, damageCreateGC);
+
+ return ret;
+}
+
+#define DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable) \
+ damageGCPriv(pGC); \
+ GCFuncs *oldFuncs = pGC->funcs; \
+ unwrap(pGCPriv, pGC, funcs); \
+ unwrap(pGCPriv, pGC, ops); \
+
+#define DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable) \
+ wrap(pGCPriv, pGC, funcs, oldFuncs); \
+ wrap(pGCPriv, pGC, ops, &damageGCOps)
+
+#define DAMAGE_GC_FUNC_PROLOGUE(pGC) \
+ damageGCPriv(pGC); \
+ unwrap(pGCPriv, pGC, funcs); \
+ if (pGCPriv->ops) unwrap(pGCPriv, pGC, ops)
+
+#define DAMAGE_GC_FUNC_EPILOGUE(pGC) \
+ wrap(pGCPriv, pGC, funcs, &damageGCFuncs); \
+ if (pGCPriv->ops) wrap(pGCPriv, pGC, ops, &damageGCOps)
+
+static void
+damageValidateGC(GCPtr pGC,
+ unsigned long changes,
+ DrawablePtr pDrawable)
+{
+ DAMAGE_GC_FUNC_PROLOGUE (pGC);
+ (*pGC->funcs->ValidateGC)(pGC, changes, pDrawable);
+ pGCPriv->ops = pGC->ops; /* just so it's not NULL */
+ DAMAGE_GC_FUNC_EPILOGUE (pGC);
+}
+
+static void
+damageDestroyGC(GCPtr pGC)
+{
+ DAMAGE_GC_FUNC_PROLOGUE (pGC);
+ (*pGC->funcs->DestroyGC)(pGC);
+ DAMAGE_GC_FUNC_EPILOGUE (pGC);
+}
+
+static void
+damageChangeGC (GCPtr pGC,
+ unsigned long mask)
+{
+ DAMAGE_GC_FUNC_PROLOGUE (pGC);
+ (*pGC->funcs->ChangeGC) (pGC, mask);
+ DAMAGE_GC_FUNC_EPILOGUE (pGC);
+}
+
+static void
+damageCopyGC (GCPtr pGCSrc,
+ unsigned long mask,
+ GCPtr pGCDst)
+{
+ DAMAGE_GC_FUNC_PROLOGUE (pGCDst);
+ (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst);
+ DAMAGE_GC_FUNC_EPILOGUE (pGCDst);
+}
+
+static void
+damageChangeClip (GCPtr pGC,
+ int type,
+ pointer pvalue,
+ int nrects)
+{
+ DAMAGE_GC_FUNC_PROLOGUE (pGC);
+ (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
+ DAMAGE_GC_FUNC_EPILOGUE (pGC);
+}
+
+static void
+damageCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
+{
+ DAMAGE_GC_FUNC_PROLOGUE (pgcDst);
+ (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc);
+ DAMAGE_GC_FUNC_EPILOGUE (pgcDst);
+}
+
+static void
+damageDestroyClip(GCPtr pGC)
+{
+ DAMAGE_GC_FUNC_PROLOGUE (pGC);
+ (* pGC->funcs->DestroyClip)(pGC);
+ DAMAGE_GC_FUNC_EPILOGUE (pGC);
+}
+
+#define TRIM_BOX(box, pGC) if (pGC->pCompositeClip) { \
+ BoxPtr extents = &pGC->pCompositeClip->extents;\
+ if(box.x1 < extents->x1) box.x1 = extents->x1; \
+ if(box.x2 > extents->x2) box.x2 = extents->x2; \
+ if(box.y1 < extents->y1) box.y1 = extents->y1; \
+ if(box.y2 > extents->y2) box.y2 = extents->y2; \
+ }
+
+#define TRANSLATE_BOX(box, pDrawable) { \
+ box.x1 += pDrawable->x; \
+ box.x2 += pDrawable->x; \
+ box.y1 += pDrawable->y; \
+ box.y2 += pDrawable->y; \
+ }
+
+#define TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC) { \
+ TRANSLATE_BOX(box, pDrawable); \
+ TRIM_BOX(box, pGC); \
+ }
+
+#define BOX_NOT_EMPTY(box) \
+ (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0))
+
+#define checkGCDamage(d,g) (getDrawableDamage(d) && \
+ (!g->pCompositeClip ||\
+ RegionNotEmpty(g->pCompositeClip)))
+
+#define TRIM_PICTURE_BOX(box, pDst) { \
+ BoxPtr extents = &pDst->pCompositeClip->extents;\
+ if(box.x1 < extents->x1) box.x1 = extents->x1; \
+ if(box.x2 > extents->x2) box.x2 = extents->x2; \
+ if(box.y1 < extents->y1) box.y1 = extents->y1; \
+ if(box.y2 > extents->y2) box.y2 = extents->y2; \
+ }
+
+#define checkPictureDamage(p) (getDrawableDamage(p->pDrawable) && \
+ RegionNotEmpty(p->pCompositeClip))
+
+static void
+damageComposite (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xMask,
+ INT16 yMask,
+ INT16 xDst,
+ INT16 yDst,
+ CARD16 width,
+ CARD16 height)
+{
+ ScreenPtr pScreen = pDst->pDrawable->pScreen;
+ PictureScreenPtr ps = GetPictureScreen(pScreen);
+ damageScrPriv(pScreen);
+
+ if (checkPictureDamage (pDst))
+ {
+ BoxRec box;
+
+ box.x1 = xDst + pDst->pDrawable->x;
+ box.y1 = yDst + pDst->pDrawable->y;
+ box.x2 = box.x1 + width;
+ box.y2 = box.y1 + height;
+ TRIM_PICTURE_BOX(box, pDst);
+ if (BOX_NOT_EMPTY(box))
+ damageDamageBox (pDst->pDrawable, &box, pDst->subWindowMode);
+ }
+ unwrap (pScrPriv, ps, Composite);
+ (*ps->Composite) (op,
+ pSrc,
+ pMask,
+ pDst,
+ xSrc,
+ ySrc,
+ xMask,
+ yMask,
+ xDst,
+ yDst,
+ width,
+ height);
+ damageRegionProcessPending (pDst->pDrawable);
+ wrap (pScrPriv, ps, Composite, damageComposite);
+}
+
+static void
+damageGlyphs (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc,
+ int nlist,
+ GlyphListPtr list,
+ GlyphPtr *glyphs)
+{
+ ScreenPtr pScreen = pDst->pDrawable->pScreen;
+ PictureScreenPtr ps = GetPictureScreen(pScreen);
+ damageScrPriv(pScreen);
+
+ if (checkPictureDamage (pDst))
+ {
+ int nlistTmp = nlist;
+ GlyphListPtr listTmp = list;
+ GlyphPtr *glyphsTmp = glyphs;
+ int x, y;
+ int n;
+ GlyphPtr glyph;
+ BoxRec box;
+ int x1, y1, x2, y2;
+
+ box.x1 = 32767;
+ box.y1 = 32767;
+ box.x2 = -32767;
+ box.y2 = -32767;
+ x = pDst->pDrawable->x;
+ y = pDst->pDrawable->y;
+ while (nlistTmp--)
+ {
+ x += listTmp->xOff;
+ y += listTmp->yOff;
+ n = listTmp->len;
+ while (n--)
+ {
+ glyph = *glyphsTmp++;
+ x1 = x - glyph->info.x;
+ y1 = y - glyph->info.y;
+ x2 = x1 + glyph->info.width;
+ y2 = y1 + glyph->info.height;
+ if (x1 < box.x1)
+ box.x1 = x1;
+ if (y1 < box.y1)
+ box.y1 = y1;
+ if (x2 > box.x2)
+ box.x2 = x2;
+ if (y2 > box.y2)
+ box.y2 = y2;
+ x += glyph->info.xOff;
+ y += glyph->info.yOff;
+ }
+ listTmp++;
+ }
+ TRIM_PICTURE_BOX (box, pDst);
+ if (BOX_NOT_EMPTY(box))
+ damageDamageBox (pDst->pDrawable, &box, pDst->subWindowMode);
+ }
+ unwrap (pScrPriv, ps, Glyphs);
+ (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs);
+ damageRegionProcessPending (pDst->pDrawable);
+ wrap (pScrPriv, ps, Glyphs, damageGlyphs);
+}
+
+static void
+damageAddTraps (PicturePtr pPicture,
+ INT16 x_off,
+ INT16 y_off,
+ int ntrap,
+ xTrap *traps)
+{
+ ScreenPtr pScreen = pPicture->pDrawable->pScreen;
+ PictureScreenPtr ps = GetPictureScreen(pScreen);
+ damageScrPriv(pScreen);
+
+ if (checkPictureDamage (pPicture))
+ {
+ BoxRec box;
+ int i;
+ int x, y;
+ xTrap *t = traps;
+
+ box.x1 = 32767;
+ box.y1 = 32767;
+ box.x2 = -32767;
+ box.y2 = -32767;
+ x = pPicture->pDrawable->x + x_off;
+ y = pPicture->pDrawable->y + y_off;
+ for (i = 0; i < ntrap; i++)
+ {
+ pixman_fixed_t l = min (t->top.l, t->bot.l);
+ pixman_fixed_t r = max (t->top.r, t->bot.r);
+ int x1 = x + pixman_fixed_to_int (l);
+ int x2 = x + pixman_fixed_to_int (pixman_fixed_ceil (r));
+ int y1 = y + pixman_fixed_to_int (t->top.y);
+ int y2 = y + pixman_fixed_to_int (pixman_fixed_ceil (t->bot.y));
+
+ if (x1 < box.x1)
+ box.x1 = x1;
+ if (x2 > box.x2)
+ box.x2 = x2;
+ if (y1 < box.y1)
+ box.y1 = y1;
+ if (y2 > box.y2)
+ box.y2 = y2;
+ }
+ TRIM_PICTURE_BOX (box, pPicture);
+ if (BOX_NOT_EMPTY(box))
+ damageDamageBox (pPicture->pDrawable, &box, pPicture->subWindowMode);
+ }
+ unwrap (pScrPriv, ps, AddTraps);
+ (*ps->AddTraps) (pPicture, x_off, y_off, ntrap, traps);
+ damageRegionProcessPending (pPicture->pDrawable);
+ wrap (pScrPriv, ps, AddTraps, damageAddTraps);
+}
+
+/**********************************************************/
+
+
+static void
+damageFillSpans(DrawablePtr pDrawable,
+ GC *pGC,
+ int npt,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int fSorted)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (npt && checkGCDamage (pDrawable, pGC))
+ {
+ int nptTmp = npt;
+ DDXPointPtr pptTmp = ppt;
+ int *pwidthTmp = pwidth;
+ BoxRec box;
+
+ box.x1 = pptTmp->x;
+ box.x2 = box.x1 + *pwidthTmp;
+ box.y2 = box.y1 = pptTmp->y;
+
+ while(--nptTmp)
+ {
+ pptTmp++;
+ pwidthTmp++;
+ if(box.x1 > pptTmp->x) box.x1 = pptTmp->x;
+ if(box.x2 < (pptTmp->x + *pwidthTmp))
+ box.x2 = pptTmp->x + *pwidthTmp;
+ if(box.y1 > pptTmp->y) box.y1 = pptTmp->y;
+ else if(box.y2 < pptTmp->y) box.y2 = pptTmp->y;
+ }
+
+ box.y2++;
+
+ if(!pGC->miTranslate) {
+ TRANSLATE_BOX(box, pDrawable);
+ }
+ TRIM_BOX(box, pGC);
+
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+
+ (*pGC->ops->FillSpans)(pDrawable, pGC, npt, ppt, pwidth, fSorted);
+
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damageSetSpans(DrawablePtr pDrawable,
+ GCPtr pGC,
+ char *pcharsrc,
+ DDXPointPtr ppt,
+ int *pwidth,
+ int npt,
+ int fSorted)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (npt && checkGCDamage (pDrawable, pGC))
+ {
+ DDXPointPtr pptTmp = ppt;
+ int *pwidthTmp = pwidth;
+ int nptTmp = npt;
+ BoxRec box;
+
+ box.x1 = pptTmp->x;
+ box.x2 = box.x1 + *pwidthTmp;
+ box.y2 = box.y1 = pptTmp->y;
+
+ while(--nptTmp)
+ {
+ pptTmp++;
+ pwidthTmp++;
+ if(box.x1 > pptTmp->x) box.x1 = pptTmp->x;
+ if(box.x2 < (pptTmp->x + *pwidthTmp))
+ box.x2 = pptTmp->x + *pwidthTmp;
+ if(box.y1 > pptTmp->y) box.y1 = pptTmp->y;
+ else if(box.y2 < pptTmp->y) box.y2 = pptTmp->y;
+ }
+
+ box.y2++;
+
+ if(!pGC->miTranslate) {
+ TRANSLATE_BOX(box, pDrawable);
+ }
+ TRIM_BOX(box, pGC);
+
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+ (*pGC->ops->SetSpans)(pDrawable, pGC, pcharsrc, ppt, pwidth, npt, fSorted);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damagePutImage(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int depth,
+ int x,
+ int y,
+ int w,
+ int h,
+ int leftPad,
+ int format,
+ char *pImage)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+ if (checkGCDamage (pDrawable, pGC))
+ {
+ BoxRec box;
+
+ box.x1 = x + pDrawable->x;
+ box.x2 = box.x1 + w;
+ box.y1 = y + pDrawable->y;
+ box.y2 = box.y1 + h;
+
+ TRIM_BOX(box, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+ (*pGC->ops->PutImage)(pDrawable, pGC, depth, x, y, w, h,
+ leftPad, format, pImage);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static RegionPtr
+damageCopyArea(DrawablePtr pSrc,
+ DrawablePtr pDst,
+ GC *pGC,
+ int srcx,
+ int srcy,
+ int width,
+ int height,
+ int dstx,
+ int dsty)
+{
+ RegionPtr ret;
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
+
+ if (checkGCDamage (pDst, pGC))
+ {
+ BoxRec box;
+
+ box.x1 = dstx + pDst->x;
+ box.x2 = box.x1 + width;
+ box.y1 = dsty + pDst->y;
+ box.y2 = box.y1 + height;
+
+ TRIM_BOX(box, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDst, &box, pGC->subWindowMode);
+ }
+
+ ret = (*pGC->ops->CopyArea)(pSrc, pDst,
+ pGC, srcx, srcy, width, height, dstx, dsty);
+ damageRegionProcessPending (pDst);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDst);
+ return ret;
+}
+
+static RegionPtr
+damageCopyPlane(DrawablePtr pSrc,
+ DrawablePtr pDst,
+ GCPtr pGC,
+ int srcx,
+ int srcy,
+ int width,
+ int height,
+ int dstx,
+ int dsty,
+ unsigned long bitPlane)
+{
+ RegionPtr ret;
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
+
+ if (checkGCDamage (pDst, pGC))
+ {
+ BoxRec box;
+
+ box.x1 = dstx + pDst->x;
+ box.x2 = box.x1 + width;
+ box.y1 = dsty + pDst->y;
+ box.y2 = box.y1 + height;
+
+ TRIM_BOX(box, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDst, &box, pGC->subWindowMode);
+ }
+
+ ret = (*pGC->ops->CopyPlane)(pSrc, pDst,
+ pGC, srcx, srcy, width, height, dstx, dsty, bitPlane);
+ damageRegionProcessPending (pDst);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDst);
+ return ret;
+}
+
+static void
+damagePolyPoint(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ xPoint *ppt)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (npt && checkGCDamage (pDrawable, pGC))
+ {
+ BoxRec box;
+ int nptTmp = npt;
+ xPoint *pptTmp = ppt;
+
+ box.x2 = box.x1 = pptTmp->x;
+ box.y2 = box.y1 = pptTmp->y;
+
+ /* this could be slow if the points were spread out */
+
+ while(--nptTmp)
+ {
+ pptTmp++;
+ if(box.x1 > pptTmp->x) box.x1 = pptTmp->x;
+ else if(box.x2 < pptTmp->x) box.x2 = pptTmp->x;
+ if(box.y1 > pptTmp->y) box.y1 = pptTmp->y;
+ else if(box.y2 < pptTmp->y) box.y2 = pptTmp->y;
+ }
+
+ box.x2++;
+ box.y2++;
+
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+ (*pGC->ops->PolyPoint)(pDrawable, pGC, mode, npt, ppt);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damagePolylines(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ DDXPointPtr ppt)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (npt && checkGCDamage (pDrawable, pGC))
+ {
+ int nptTmp = npt;
+ DDXPointPtr pptTmp = ppt;
+ BoxRec box;
+ int extra = pGC->lineWidth >> 1;
+
+ box.x2 = box.x1 = pptTmp->x;
+ box.y2 = box.y1 = pptTmp->y;
+
+ if(nptTmp > 1)
+ {
+ if(pGC->joinStyle == JoinMiter)
+ extra = 6 * pGC->lineWidth;
+ else if(pGC->capStyle == CapProjecting)
+ extra = pGC->lineWidth;
+ }
+
+ if(mode == CoordModePrevious)
+ {
+ int x = box.x1;
+ int y = box.y1;
+ while(--nptTmp)
+ {
+ pptTmp++;
+ x += pptTmp->x;
+ y += pptTmp->y;
+ if(box.x1 > x) box.x1 = x;
+ else if(box.x2 < x) box.x2 = x;
+ if(box.y1 > y) box.y1 = y;
+ else if(box.y2 < y) box.y2 = y;
+ }
+ }
+ else
+ {
+ while(--nptTmp)
+ {
+ pptTmp++;
+ if(box.x1 > pptTmp->x) box.x1 = pptTmp->x;
+ else if(box.x2 < pptTmp->x) box.x2 = pptTmp->x;
+ if(box.y1 > pptTmp->y) box.y1 = pptTmp->y;
+ else if(box.y2 < pptTmp->y) box.y2 = pptTmp->y;
+ }
+ }
+
+ box.x2++;
+ box.y2++;
+
+ if(extra)
+ {
+ box.x1 -= extra;
+ box.x2 += extra;
+ box.y1 -= extra;
+ box.y2 += extra;
+ }
+
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+ (*pGC->ops->Polylines)(pDrawable, pGC, mode, npt, ppt);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damagePolySegment(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nSeg,
+ xSegment *pSeg)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (nSeg && checkGCDamage (pDrawable, pGC))
+ {
+ BoxRec box;
+ int extra = pGC->lineWidth;
+ int nsegTmp = nSeg;
+ xSegment *pSegTmp = pSeg;
+
+ if(pGC->capStyle != CapProjecting)
+ extra >>= 1;
+
+ if(pSegTmp->x2 > pSegTmp->x1) {
+ box.x1 = pSegTmp->x1;
+ box.x2 = pSegTmp->x2;
+ } else {
+ box.x2 = pSegTmp->x1;
+ box.x1 = pSegTmp->x2;
+ }
+
+ if(pSegTmp->y2 > pSegTmp->y1) {
+ box.y1 = pSegTmp->y1;
+ box.y2 = pSegTmp->y2;
+ } else {
+ box.y2 = pSegTmp->y1;
+ box.y1 = pSegTmp->y2;
+ }
+
+ while(--nsegTmp)
+ {
+ pSegTmp++;
+ if(pSegTmp->x2 > pSegTmp->x1)
+ {
+ if(pSegTmp->x1 < box.x1) box.x1 = pSegTmp->x1;
+ if(pSegTmp->x2 > box.x2) box.x2 = pSegTmp->x2;
+ }
+ else
+ {
+ if(pSegTmp->x2 < box.x1) box.x1 = pSegTmp->x2;
+ if(pSegTmp->x1 > box.x2) box.x2 = pSegTmp->x1;
+ }
+ if(pSegTmp->y2 > pSegTmp->y1)
+ {
+ if(pSegTmp->y1 < box.y1) box.y1 = pSegTmp->y1;
+ if(pSegTmp->y2 > box.y2) box.y2 = pSegTmp->y2;
+ }
+ else
+ {
+ if(pSegTmp->y2 < box.y1) box.y1 = pSegTmp->y2;
+ if(pSegTmp->y1 > box.y2) box.y2 = pSegTmp->y1;
+ }
+ }
+
+ box.x2++;
+ box.y2++;
+
+ if(extra)
+ {
+ box.x1 -= extra;
+ box.x2 += extra;
+ box.y1 -= extra;
+ box.y2 += extra;
+ }
+
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+ (*pGC->ops->PolySegment)(pDrawable, pGC, nSeg, pSeg);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damagePolyRectangle(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nRects,
+ xRectangle *pRects)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (nRects && checkGCDamage (pDrawable, pGC))
+ {
+ BoxRec box;
+ int offset1, offset2, offset3;
+ int nRectsTmp = nRects;
+ xRectangle *pRectsTmp = pRects;
+
+ offset2 = pGC->lineWidth;
+ if(!offset2) offset2 = 1;
+ offset1 = offset2 >> 1;
+ offset3 = offset2 - offset1;
+
+ while(nRectsTmp--)
+ {
+ box.x1 = pRectsTmp->x - offset1;
+ box.y1 = pRectsTmp->y - offset1;
+ box.x2 = box.x1 + pRectsTmp->width + offset2;
+ box.y2 = box.y1 + offset2;
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+
+ box.x1 = pRectsTmp->x - offset1;
+ box.y1 = pRectsTmp->y + offset3;
+ box.x2 = box.x1 + offset2;
+ box.y2 = box.y1 + pRectsTmp->height - offset2;
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+
+ box.x1 = pRectsTmp->x + pRectsTmp->width - offset1;
+ box.y1 = pRectsTmp->y + offset3;
+ box.x2 = box.x1 + offset2;
+ box.y2 = box.y1 + pRectsTmp->height - offset2;
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+
+ box.x1 = pRectsTmp->x - offset1;
+ box.y1 = pRectsTmp->y + pRectsTmp->height - offset1;
+ box.x2 = box.x1 + pRectsTmp->width + offset2;
+ box.y2 = box.y1 + offset2;
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+
+ pRectsTmp++;
+ }
+ }
+ (*pGC->ops->PolyRectangle)(pDrawable, pGC, nRects, pRects);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damagePolyArc(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nArcs,
+ xArc *pArcs)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (nArcs && checkGCDamage (pDrawable, pGC))
+ {
+ int extra = pGC->lineWidth >> 1;
+ BoxRec box;
+ int nArcsTmp = nArcs;
+ xArc *pArcsTmp = pArcs;
+
+ box.x1 = pArcsTmp->x;
+ box.x2 = box.x1 + pArcsTmp->width;
+ box.y1 = pArcsTmp->y;
+ box.y2 = box.y1 + pArcsTmp->height;
+
+ while(--nArcsTmp)
+ {
+ pArcsTmp++;
+ if(box.x1 > pArcsTmp->x)
+ box.x1 = pArcsTmp->x;
+ if(box.x2 < (pArcsTmp->x + pArcsTmp->width))
+ box.x2 = pArcsTmp->x + pArcsTmp->width;
+ if(box.y1 > pArcsTmp->y)
+ box.y1 = pArcsTmp->y;
+ if(box.y2 < (pArcsTmp->y + pArcsTmp->height))
+ box.y2 = pArcsTmp->y + pArcsTmp->height;
+ }
+
+ if(extra)
+ {
+ box.x1 -= extra;
+ box.x2 += extra;
+ box.y1 -= extra;
+ box.y2 += extra;
+ }
+
+ box.x2++;
+ box.y2++;
+
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+ (*pGC->ops->PolyArc)(pDrawable, pGC, nArcs, pArcs);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damageFillPolygon(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int shape,
+ int mode,
+ int npt,
+ DDXPointPtr ppt)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (npt > 2 && checkGCDamage (pDrawable, pGC))
+ {
+ DDXPointPtr pptTmp = ppt;
+ int nptTmp = npt;
+ BoxRec box;
+
+ box.x2 = box.x1 = pptTmp->x;
+ box.y2 = box.y1 = pptTmp->y;
+
+ if(mode != CoordModeOrigin)
+ {
+ int x = box.x1;
+ int y = box.y1;
+ while(--nptTmp)
+ {
+ pptTmp++;
+ x += pptTmp->x;
+ y += pptTmp->y;
+ if(box.x1 > x) box.x1 = x;
+ else if(box.x2 < x) box.x2 = x;
+ if(box.y1 > y) box.y1 = y;
+ else if(box.y2 < y) box.y2 = y;
+ }
+ }
+ else
+ {
+ while(--nptTmp)
+ {
+ pptTmp++;
+ if(box.x1 > pptTmp->x) box.x1 = pptTmp->x;
+ else if(box.x2 < pptTmp->x) box.x2 = pptTmp->x;
+ if(box.y1 > pptTmp->y) box.y1 = pptTmp->y;
+ else if(box.y2 < pptTmp->y) box.y2 = pptTmp->y;
+ }
+ }
+
+ box.x2++;
+ box.y2++;
+
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+
+ (*pGC->ops->FillPolygon)(pDrawable, pGC, shape, mode, npt, ppt);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+
+static void
+damagePolyFillRect(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nRects,
+ xRectangle *pRects)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+ if (nRects && checkGCDamage (pDrawable, pGC))
+ {
+ BoxRec box;
+ xRectangle *pRectsTmp = pRects;
+ int nRectsTmp = nRects;
+
+ box.x1 = pRectsTmp->x;
+ box.x2 = box.x1 + (short)pRectsTmp->width;
+ box.y1 = pRectsTmp->y;
+ box.y2 = box.y1 + (short)pRectsTmp->height;
+
+ while(--nRectsTmp)
+ {
+ pRectsTmp++;
+ if(box.x1 > pRectsTmp->x) box.x1 = pRectsTmp->x;
+ if(box.x2 < (pRectsTmp->x + pRectsTmp->width))
+ box.x2 = pRectsTmp->x + pRectsTmp->width;
+ if(box.y1 > pRectsTmp->y) box.y1 = pRectsTmp->y;
+ if(box.y2 < (pRectsTmp->y + pRectsTmp->height))
+ box.y2 = pRectsTmp->y + pRectsTmp->height;
+ }
+
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+ (*pGC->ops->PolyFillRect)(pDrawable, pGC, nRects, pRects);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+
+static void
+damagePolyFillArc(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nArcs,
+ xArc *pArcs)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (nArcs && checkGCDamage (pDrawable, pGC))
+ {
+ BoxRec box;
+ int nArcsTmp = nArcs;
+ xArc *pArcsTmp = pArcs;
+
+ box.x1 = pArcsTmp->x;
+ box.x2 = box.x1 + pArcsTmp->width;
+ box.y1 = pArcsTmp->y;
+ box.y2 = box.y1 + pArcsTmp->height;
+
+ while(--nArcsTmp)
+ {
+ pArcsTmp++;
+ if(box.x1 > pArcsTmp->x)
+ box.x1 = pArcsTmp->x;
+ if(box.x2 < (pArcsTmp->x + pArcsTmp->width))
+ box.x2 = pArcsTmp->x + pArcsTmp->width;
+ if(box.y1 > pArcsTmp->y)
+ box.y1 = pArcsTmp->y;
+ if(box.y2 < (pArcsTmp->y + pArcsTmp->height))
+ box.y2 = pArcsTmp->y + pArcsTmp->height;
+ }
+
+ TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+ (*pGC->ops->PolyFillArc)(pDrawable, pGC, nArcs, pArcs);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+/*
+ * general Poly/Image text function. Extract glyph information,
+ * compute bounding box and remove cursor if it is overlapped.
+ */
+
+static void
+damageDamageChars (DrawablePtr pDrawable,
+ FontPtr font,
+ int x,
+ int y,
+ unsigned int n,
+ CharInfoPtr *charinfo,
+ Bool imageblt,
+ int subWindowMode)
+{
+ ExtentInfoRec extents;
+ BoxRec box;
+
+ QueryGlyphExtents(font, charinfo, n, &extents);
+ if (imageblt)
+ {
+ if (extents.overallWidth > extents.overallRight)
+ extents.overallRight = extents.overallWidth;
+ if (extents.overallWidth < extents.overallLeft)
+ extents.overallLeft = extents.overallWidth;
+ if (extents.overallLeft > 0)
+ extents.overallLeft = 0;
+ if (extents.fontAscent > extents.overallAscent)
+ extents.overallAscent = extents.fontAscent;
+ if (extents.fontDescent > extents.overallDescent)
+ extents.overallDescent = extents.fontDescent;
+ }
+ box.x1 = x + extents.overallLeft;
+ box.y1 = y - extents.overallAscent;
+ box.x2 = x + extents.overallRight;
+ box.y2 = y + extents.overallDescent;
+ damageDamageBox (pDrawable, &box, subWindowMode);
+}
+
+/*
+ * values for textType:
+ */
+#define TT_POLY8 0
+#define TT_IMAGE8 1
+#define TT_POLY16 2
+#define TT_IMAGE16 3
+
+static int
+damageText (DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ unsigned long count,
+ char *chars,
+ FontEncoding fontEncoding,
+ Bool textType)
+{
+ CharInfoPtr *charinfo;
+ CharInfoPtr *info;
+ unsigned long i;
+ unsigned int n;
+ int w;
+ Bool imageblt;
+
+ imageblt = (textType == TT_IMAGE8) || (textType == TT_IMAGE16);
+
+ charinfo = malloc(count * sizeof(CharInfoPtr));
+ if (!charinfo)
+ return x;
+
+ GetGlyphs(pGC->font, count, (unsigned char *)chars,
+ fontEncoding, &i, charinfo);
+ n = (unsigned int)i;
+ w = 0;
+ if (!imageblt)
+ for (info = charinfo; i--; info++)
+ w += (*info)->metrics.characterWidth;
+
+ if (n != 0) {
+ damageDamageChars (pDrawable, pGC->font, x + pDrawable->x, y + pDrawable->y, n,
+ charinfo, imageblt, pGC->subWindowMode);
+ if (imageblt)
+ (*pGC->ops->ImageGlyphBlt)(pDrawable, pGC, x, y, n, charinfo,
+ FONTGLYPHS(pGC->font));
+ else
+ (*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, n, charinfo,
+ FONTGLYPHS(pGC->font));
+ }
+ free(charinfo);
+ return x + w;
+}
+
+static int
+damagePolyText8(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ char *chars)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (checkGCDamage (pDrawable, pGC))
+ x = damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
+ Linear8Bit, TT_POLY8);
+ else
+ x = (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, count, chars);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+ return x;
+}
+
+static int
+damagePolyText16(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ unsigned short *chars)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (checkGCDamage (pDrawable, pGC))
+ x = damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
+ FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit,
+ TT_POLY16);
+ else
+ x = (*pGC->ops->PolyText16)(pDrawable, pGC, x, y, count, chars);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+ return x;
+}
+
+static void
+damageImageText8(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ char *chars)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (checkGCDamage (pDrawable, pGC))
+ damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
+ Linear8Bit, TT_IMAGE8);
+ else
+ (*pGC->ops->ImageText8)(pDrawable, pGC, x, y, count, chars);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damageImageText16(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ unsigned short *chars)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+
+ if (checkGCDamage (pDrawable, pGC))
+ damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
+ FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit,
+ TT_IMAGE16);
+ else
+ (*pGC->ops->ImageText16)(pDrawable, pGC, x, y, count, chars);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+
+static void
+damageImageGlyphBlt(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ pointer pglyphBase)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+ damageDamageChars (pDrawable, pGC->font, x + pDrawable->x, y + pDrawable->y,
+ nglyph, ppci, TRUE, pGC->subWindowMode);
+ (*pGC->ops->ImageGlyphBlt)(pDrawable, pGC, x, y, nglyph,
+ ppci, pglyphBase);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damagePolyGlyphBlt(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ pointer pglyphBase)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+ damageDamageChars (pDrawable, pGC->font, x + pDrawable->x, y + pDrawable->y,
+ nglyph, ppci, FALSE, pGC->subWindowMode);
+ (*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, nglyph,
+ ppci, pglyphBase);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damagePushPixels(GCPtr pGC,
+ PixmapPtr pBitMap,
+ DrawablePtr pDrawable,
+ int dx,
+ int dy,
+ int xOrg,
+ int yOrg)
+{
+ DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
+ if(checkGCDamage (pDrawable, pGC))
+ {
+ BoxRec box;
+
+ box.x1 = xOrg;
+ box.y1 = yOrg;
+
+ if(!pGC->miTranslate) {
+ box.x1 += pDrawable->x;
+ box.y1 += pDrawable->y;
+ }
+
+ box.x2 = box.x1 + dx;
+ box.y2 = box.y1 + dy;
+
+ TRIM_BOX(box, pGC);
+ if(BOX_NOT_EMPTY(box))
+ damageDamageBox (pDrawable, &box, pGC->subWindowMode);
+ }
+ (*pGC->ops->PushPixels)(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg);
+ damageRegionProcessPending (pDrawable);
+ DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
+}
+
+static void
+damageRemoveDamage (DamagePtr *pPrev, DamagePtr pDamage)
+{
+ while (*pPrev)
+ {
+ if (*pPrev == pDamage)
+ {
+ *pPrev = pDamage->pNext;
+ return;
+ }
+ pPrev = &(*pPrev)->pNext;
+ }
+#if DAMAGE_VALIDATE_ENABLE
+ ErrorF ("Damage not on list\n");
+ OsAbort ();
+#endif
+}
+
+static void
+damageInsertDamage (DamagePtr *pPrev, DamagePtr pDamage)
+{
+#if DAMAGE_VALIDATE_ENABLE
+ DamagePtr pOld;
+
+ for (pOld = *pPrev; pOld; pOld = pOld->pNext)
+ if (pOld == pDamage) {
+ ErrorF ("Damage already on list\n");
+ OsAbort ();
+ }
+#endif
+ pDamage->pNext = *pPrev;
+ *pPrev = pDamage;
+}
+
+static Bool
+damageDestroyPixmap (PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ damageScrPriv(pScreen);
+
+ if (pPixmap->refcnt == 1)
+ {
+ DamagePtr *pPrev = getPixmapDamageRef (pPixmap);
+ DamagePtr pDamage;
+
+ while ((pDamage = *pPrev))
+ {
+ damageRemoveDamage (pPrev, pDamage);
+ if (!pDamage->isWindow)
+ DamageDestroy (pDamage);
+ }
+ }
+ unwrap (pScrPriv, pScreen, DestroyPixmap);
+ (*pScreen->DestroyPixmap) (pPixmap);
+ wrap (pScrPriv, pScreen, DestroyPixmap, damageDestroyPixmap);
+ return TRUE;
+}
+
+static void
+damageCopyWindow(WindowPtr pWindow,
+ DDXPointRec ptOldOrg,
+ RegionPtr prgnSrc)
+{
+ ScreenPtr pScreen = pWindow->drawable.pScreen;
+ damageScrPriv(pScreen);
+
+ if (getWindowDamage (pWindow))
+ {
+ int dx = pWindow->drawable.x - ptOldOrg.x;
+ int dy = pWindow->drawable.y - ptOldOrg.y;
+
+ /*
+ * The region comes in source relative, but the damage occurs
+ * at the destination location. Translate back and forth.
+ */
+ RegionTranslate(prgnSrc, dx, dy);
+ damageRegionAppend (&pWindow->drawable, prgnSrc, FALSE, -1);
+ RegionTranslate(prgnSrc, -dx, -dy);
+ }
+ unwrap (pScrPriv, pScreen, CopyWindow);
+ (*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc);
+ damageRegionProcessPending (&pWindow->drawable);
+ wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow);
+}
+
+static GCOps damageGCOps = {
+ damageFillSpans, damageSetSpans,
+ damagePutImage, damageCopyArea,
+ damageCopyPlane, damagePolyPoint,
+ damagePolylines, damagePolySegment,
+ damagePolyRectangle, damagePolyArc,
+ damageFillPolygon, damagePolyFillRect,
+ damagePolyFillArc, damagePolyText8,
+ damagePolyText16, damageImageText8,
+ damageImageText16, damageImageGlyphBlt,
+ damagePolyGlyphBlt, damagePushPixels,
+};
+
+static void
+damageSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap)
+{
+ DamagePtr pDamage;
+ ScreenPtr pScreen = pWindow->drawable.pScreen;
+ damageScrPriv(pScreen);
+
+ if ((pDamage = damageGetWinPriv(pWindow)))
+ {
+ PixmapPtr pOldPixmap = (*pScreen->GetWindowPixmap) (pWindow);
+ DamagePtr *pPrev = getPixmapDamageRef(pOldPixmap);
+
+ while (pDamage)
+ {
+ damageRemoveDamage (pPrev, pDamage);
+ pDamage = pDamage->pNextWin;
+ }
+ }
+ unwrap (pScrPriv, pScreen, SetWindowPixmap);
+ (*pScreen->SetWindowPixmap) (pWindow, pPixmap);
+ wrap (pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap);
+ if ((pDamage = damageGetWinPriv(pWindow)))
+ {
+ DamagePtr *pPrev = getPixmapDamageRef(pPixmap);
+
+ while (pDamage)
+ {
+ damageInsertDamage (pPrev, pDamage);
+ pDamage = pDamage->pNextWin;
+ }
+ }
+}
+
+static Bool
+damageDestroyWindow (WindowPtr pWindow)
+{
+ DamagePtr pDamage;
+ ScreenPtr pScreen = pWindow->drawable.pScreen;
+ Bool ret;
+ damageScrPriv(pScreen);
+
+ while ((pDamage = damageGetWinPriv(pWindow)))
+ {
+ DamageUnregister (&pWindow->drawable, pDamage);
+ DamageDestroy (pDamage);
+ }
+ unwrap (pScrPriv, pScreen, DestroyWindow);
+ ret = (*pScreen->DestroyWindow) (pWindow);
+ wrap (pScrPriv, pScreen, DestroyWindow, damageDestroyWindow);
+ return ret;
+}
+
+static Bool
+damageCloseScreen (int i, ScreenPtr pScreen)
+{
+ damageScrPriv(pScreen);
+
+ unwrap (pScrPriv, pScreen, DestroyPixmap);
+ unwrap (pScrPriv, pScreen, CreateGC);
+ unwrap (pScrPriv, pScreen, CopyWindow);
+ unwrap (pScrPriv, pScreen, CloseScreen);
+ free(pScrPriv);
+ return (*pScreen->CloseScreen) (i, pScreen);
+}
+
+/**
+ * Default implementations of the damage management functions.
+ */
+void miDamageCreate (DamagePtr pDamage)
+{
+}
+
+void miDamageRegister (DrawablePtr pDrawable, DamagePtr pDamage)
+{
+}
+
+void miDamageUnregister (DrawablePtr pDrawable, DamagePtr pDamage)
+{
+}
+
+void miDamageDestroy (DamagePtr pDamage)
+{
+}
+
+/**
+ * Public functions for consumption outside this file.
+ */
+
+Bool
+DamageSetup (ScreenPtr pScreen)
+{
+ DamageScrPrivPtr pScrPriv;
+ PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
+ const DamageScreenFuncsRec miFuncs = {
+ miDamageCreate, miDamageRegister, miDamageUnregister, miDamageDestroy
+ };
+
+ if (!dixRegisterPrivateKey(&damageScrPrivateKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
+ if (dixLookupPrivate(&pScreen->devPrivates, damageScrPrivateKey))
+ return TRUE;
+
+ if (!dixRegisterPrivateKey(&damageGCPrivateKeyRec, PRIVATE_GC, sizeof(DamageGCPrivRec)))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(&damagePixPrivateKeyRec, PRIVATE_PIXMAP, 0))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(&damageWinPrivateKeyRec, PRIVATE_WINDOW, 0))
+ return FALSE;
+
+ pScrPriv = malloc(sizeof (DamageScrPrivRec));
+ if (!pScrPriv)
+ return FALSE;
+
+ pScrPriv->internalLevel = 0;
+ pScrPriv->pScreenDamage = 0;
+
+ wrap (pScrPriv, pScreen, DestroyPixmap, damageDestroyPixmap);
+ wrap (pScrPriv, pScreen, CreateGC, damageCreateGC);
+ wrap (pScrPriv, pScreen, DestroyWindow, damageDestroyWindow);
+ wrap (pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap);
+ wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow);
+ wrap (pScrPriv, pScreen, CloseScreen, damageCloseScreen);
+ if (ps) {
+ wrap (pScrPriv, ps, Glyphs, damageGlyphs);
+ wrap (pScrPriv, ps, Composite, damageComposite);
+ wrap (pScrPriv, ps, AddTraps, damageAddTraps);
+ }
+
+ pScrPriv->funcs = miFuncs;
+
+ dixSetPrivate(&pScreen->devPrivates, damageScrPrivateKey, pScrPriv);
+ return TRUE;
+}
+
+DamagePtr
+DamageCreate (DamageReportFunc damageReport,
+ DamageDestroyFunc damageDestroy,
+ DamageReportLevel damageLevel,
+ Bool isInternal,
+ ScreenPtr pScreen,
+ void *closure)
+{
+ damageScrPriv(pScreen);
+ DamagePtr pDamage;
+
+ pDamage = dixAllocateObjectWithPrivates(DamageRec, PRIVATE_DAMAGE);
+ if (!pDamage)
+ return 0;
+ pDamage->pNext = 0;
+ pDamage->pNextWin = 0;
+ RegionNull(&pDamage->damage);
+ RegionNull(&pDamage->pendingDamage);
+
+ pDamage->damageLevel = damageLevel;
+ pDamage->isInternal = isInternal;
+ pDamage->closure = closure;
+ pDamage->isWindow = FALSE;
+ pDamage->pDrawable = 0;
+ pDamage->reportAfter = FALSE;
+
+ pDamage->damageReport = damageReport;
+ pDamage->damageReportPostRendering = NULL;
+ pDamage->damageDestroy = damageDestroy;
+ pDamage->damageMarker = NULL;
+ pDamage->pScreen = pScreen;
+
+ (*pScrPriv->funcs.Create) (pDamage);
+
+ return pDamage;
+}
+
+void
+DamageRegister (DrawablePtr pDrawable,
+ DamagePtr pDamage)
+{
+ ScreenPtr pScreen = pDrawable->pScreen;
+ damageScrPriv(pScreen);
+
+#if DAMAGE_VALIDATE_ENABLE
+ if (pDrawable->pScreen != pDamage->pScreen)
+ {
+ ErrorF ("DamageRegister called with mismatched screens\n");
+ OsAbort ();
+ }
+#endif
+
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ {
+ WindowPtr pWindow = (WindowPtr) pDrawable;
+ winDamageRef(pWindow);
+
+#if DAMAGE_VALIDATE_ENABLE
+ DamagePtr pOld;
+
+ for (pOld = *pPrev; pOld; pOld = pOld->pNextWin)
+ if (pOld == pDamage) {
+ ErrorF ("Damage already on window list\n");
+ OsAbort ();
+ }
+#endif
+ pDamage->pNextWin = *pPrev;
+ *pPrev = pDamage;
+ pDamage->isWindow = TRUE;
+ }
+ else
+ pDamage->isWindow = FALSE;
+ pDamage->pDrawable = pDrawable;
+ damageInsertDamage (getDrawableDamageRef (pDrawable), pDamage);
+ (*pScrPriv->funcs.Register) (pDrawable, pDamage);
+}
+
+void
+DamageDrawInternal (ScreenPtr pScreen, Bool enable)
+{
+ damageScrPriv (pScreen);
+
+ pScrPriv->internalLevel += enable ? 1 : -1;
+}
+
+void
+DamageUnregister (DrawablePtr pDrawable,
+ DamagePtr pDamage)
+{
+ ScreenPtr pScreen = pDrawable->pScreen;
+ damageScrPriv(pScreen);
+
+ (*pScrPriv->funcs.Unregister) (pDrawable, pDamage);
+
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ {
+ WindowPtr pWindow = (WindowPtr) pDrawable;
+ winDamageRef (pWindow);
+#if DAMAGE_VALIDATE_ENABLE
+ int found = 0;
+#endif
+
+ while (*pPrev)
+ {
+ if (*pPrev == pDamage)
+ {
+ *pPrev = pDamage->pNextWin;
+#if DAMAGE_VALIDATE_ENABLE
+ found = 1;
+#endif
+ break;
+ }
+ pPrev = &(*pPrev)->pNextWin;
+ }
+#if DAMAGE_VALIDATE_ENABLE
+ if (!found) {
+ ErrorF ("Damage not on window list\n");
+ OsAbort ();
+ }
+#endif
+ }
+ pDamage->pDrawable = 0;
+ damageRemoveDamage (getDrawableDamageRef (pDrawable), pDamage);
+}
+
+void
+DamageDestroy (DamagePtr pDamage)
+{
+ ScreenPtr pScreen = pDamage->pScreen;
+ damageScrPriv(pScreen);
+
+ if (pDamage->damageDestroy)
+ (*pDamage->damageDestroy) (pDamage, pDamage->closure);
+ (*pScrPriv->funcs.Destroy) (pDamage);
+ RegionUninit(&pDamage->damage);
+ RegionUninit(&pDamage->pendingDamage);
+ dixFreeObjectWithPrivates(pDamage, PRIVATE_DAMAGE);
+}
+
+Bool
+DamageSubtract (DamagePtr pDamage,
+ const RegionPtr pRegion)
+{
+ RegionPtr pClip;
+ RegionRec pixmapClip;
+ DrawablePtr pDrawable = pDamage->pDrawable;
+
+ RegionSubtract(&pDamage->damage, &pDamage->damage, pRegion);
+ if (pDrawable)
+ {
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ pClip = &((WindowPtr) pDrawable)->borderClip;
+ else
+ {
+ BoxRec box;
+
+ box.x1 = pDrawable->x;
+ box.y1 = pDrawable->y;
+ box.x2 = pDrawable->x + pDrawable->width;
+ box.y2 = pDrawable->y + pDrawable->height;
+ RegionInit(&pixmapClip, &box, 1);
+ pClip = &pixmapClip;
+ }
+ RegionTranslate(&pDamage->damage, pDrawable->x, pDrawable->y);
+ RegionIntersect(&pDamage->damage, &pDamage->damage, pClip);
+ RegionTranslate(&pDamage->damage, -pDrawable->x, -pDrawable->y);
+ if (pDrawable->type != DRAWABLE_WINDOW)
+ RegionUninit(&pixmapClip);
+ }
+ return RegionNotEmpty(&pDamage->damage);
+}
+
+void
+DamageEmpty (DamagePtr pDamage)
+{
+ RegionEmpty(&pDamage->damage);
+}
+
+RegionPtr
+DamageRegion (DamagePtr pDamage)
+{
+ return &pDamage->damage;
+}
+
+RegionPtr
+DamagePendingRegion (DamagePtr pDamage)
+{
+ return &pDamage->pendingDamage;
+}
+
+void
+DamageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion)
+{
+ damageRegionAppend (pDrawable, pRegion, FALSE, -1);
+}
+
+void
+DamageRegionProcessPending (DrawablePtr pDrawable)
+{
+ damageRegionProcessPending (pDrawable);
+}
+
+/* If a damage marker is provided, then this function must be called after rendering is done. */
+/* Please do call back so any future enhancements can assume this function is called. */
+/* There are no strict timing requirements for calling this function, just as soon as (is cheaply) possible. */
+void
+DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion)
+{
+ if (pDamage->damageReportPostRendering)
+ damageReportDamagePostRendering (pDamage, pOldDamage, pRegion);
+}
+
+/* This call is very odd, i'm leaving it intact for API sake, but please don't use it. */
+void
+DamageDamageRegion (DrawablePtr pDrawable,
+ const RegionPtr pRegion)
+{
+ damageRegionAppend (pDrawable, pRegion, FALSE, -1);
+
+ /* Go back and report this damage for DamagePtrs with reportAfter set, since
+ * this call isn't part of an in-progress drawing op in the call chain and
+ * the DDX probably just wants to know about it right away.
+ */
+ damageRegionProcessPending (pDrawable);
+}
+
+void
+DamageSetReportAfterOp (DamagePtr pDamage, Bool reportAfter)
+{
+ pDamage->reportAfter = reportAfter;
+}
+
+void
+DamageSetPostRenderingFunctions(DamagePtr pDamage, DamageReportFunc damageReportPostRendering,
+ DamageMarkerFunc damageMarker)
+{
+ pDamage->damageReportPostRendering = damageReportPostRendering;
+ pDamage->damageMarker = damageMarker;
+}
+
+DamageScreenFuncsPtr
+DamageGetScreenFuncs (ScreenPtr pScreen)
+{
+ damageScrPriv(pScreen);
+ return &pScrPriv->funcs;
+}
diff --git a/xorg-server/miext/damage/makefile b/xorg-server/miext/damage/makefile
new file mode 100644
index 000000000..e58f4a883
--- /dev/null
+++ b/xorg-server/miext/damage/makefile
@@ -0,0 +1,7 @@
+LIBRARY = libdamage
+
+#INCLUDES = -I$(srcdir)/../cw -I$(top_srcdir)/hw/xfree86/os-support
+
+CSRCS =damage.c
+
+
diff --git a/xorg-server/miext/rootless/makefile b/xorg-server/miext/rootless/makefile
new file mode 100644
index 000000000..d49e810a2
--- /dev/null
+++ b/xorg-server/miext/rootless/makefile
@@ -0,0 +1,10 @@
+LIBRARY=librootless
+
+librootless_la_SOURCES = \
+ rootlessCommon.c \
+ rootlessGC.c \
+ rootlessScreen.c \
+ rootlessValTree.c \
+ rootlessWindow.c
+
+CSRCS = $(filter %.c,$(librootless_la_SOURCES))
diff --git a/xorg-server/miext/rootless/rootlessGC.c b/xorg-server/miext/rootless/rootlessGC.c
index 21a3bd806..2af251ee6 100644
--- a/xorg-server/miext/rootless/rootlessGC.c
+++ b/xorg-server/miext/rootless/rootlessGC.c
@@ -49,6 +49,9 @@
#include "rootlessCommon.h"
+#ifdef _MSC_VER
+#define inline __inline
+#endif
// GC functions
static void RootlessValidateGC(GCPtr pGC, unsigned long changes,
diff --git a/xorg-server/miext/rootless/rootlessScreen.c b/xorg-server/miext/rootless/rootlessScreen.c
index ca4f00c3e..9263df1fd 100644
--- a/xorg-server/miext/rootless/rootlessScreen.c
+++ b/xorg-server/miext/rootless/rootlessScreen.c
@@ -325,7 +325,7 @@ RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
box.x1 = x - glyph->info.x;
box.y1 = y - glyph->info.y;
box.x2 = box.x1 + glyph->info.width;
- box.y2 = box.y2 + glyph->info.height;
+ box.y2 = box.y1 + glyph->info.height;
x += glyph->info.xOff;
y += glyph->info.yOff;
diff --git a/xorg-server/miext/rootless/rootlessWindow.c b/xorg-server/miext/rootless/rootlessWindow.c
index 20fdaba8d..4c7f7b044 100644
--- a/xorg-server/miext/rootless/rootlessWindow.c
+++ b/xorg-server/miext/rootless/rootlessWindow.c
@@ -51,6 +51,12 @@ extern Bool no_configure_window;
#include "rootlessCommon.h"
#include "rootlessWindow.h"
+#ifdef _MSC_VER
+#define inline __inline
+#include "xplugin.h"
+extern int darwinMainScreenX, darwinMainScreenY;
+#endif
+
#define SCREEN_TO_GLOBAL_X \
(pScreen->x + rootlessGlobalOffsetX)
#define SCREEN_TO_GLOBAL_Y \
@@ -683,7 +689,7 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
if (gResizeDeathCount == 1) {
/* Simple case, we only have a single source pixmap. */
- fbCopyRegion(&gResizeDeathPix[0]->drawable,
+ miCopyRegion(&gResizeDeathPix[0]->drawable,
&pScreen->GetWindowPixmap(pWin)->drawable, 0,
&rgnDst, dx, dy, fbCopyWindowProc, 0, 0);
}
@@ -699,7 +705,7 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
RegionNull(&clipped);
RegionIntersect(&rgnDst, &clip, &clipped);
- fbCopyRegion(&gResizeDeathPix[i]->drawable,
+ miCopyRegion(&gResizeDeathPix[i]->drawable,
&pScreen->GetWindowPixmap(pWin)->drawable, 0,
&clipped, dx, dy, fbCopyWindowProc, 0, 0);
@@ -780,7 +786,7 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
else {
RootlessStartDrawing(pWin);
- fbCopyRegion((DrawablePtr) pWin, (DrawablePtr) pWin,
+ miCopyRegion((DrawablePtr) pWin, (DrawablePtr) pWin,
0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0);
/* prgnSrc has been translated to dst position */
@@ -996,6 +1002,7 @@ StartFrameResize(WindowPtr pWin, Bool gravity,
}
else if (gravity) {
/* The general case. Just copy everything. */
+ BoxRec tmpBoxRec={oldX, oldY, oldX2, oldY2};
RootlessStartDrawing(pWin);
@@ -1004,7 +1011,7 @@ StartFrameResize(WindowPtr pWin, Bool gravity,
memcpy(gResizeDeathBits, winRec->pixelData,
winRec->bytesPerRow * winRec->height);
- gResizeDeathBounds[0] = (BoxRec) {oldX, oldY, oldX2, oldY2};
+ gResizeDeathBounds[0] = tmpBoxRec;
gResizeDeathPix[0]
= GetScratchPixmapHeader(pScreen, winRec->width,
winRec->height,
@@ -1041,7 +1048,8 @@ StartFrameResize(WindowPtr pWin, Bool gravity,
window bits. */
if (need_window_source) {
- gResizeDeathBounds[0] = (BoxRec) {oldX, oldY, oldX2, oldY2};
+ BoxRec tmpBoxRec={oldX, oldY, oldX2, oldY2};
+ gResizeDeathBounds[0] = tmpBoxRec;
gResizeDeathPix[0]
= GetScratchPixmapHeader(pScreen, oldW, oldH,
winRec->win->drawable.depth,
diff --git a/xorg-server/miext/rootless/xplugin.h b/xorg-server/miext/rootless/xplugin.h
new file mode 100644
index 000000000..7fdf6006e
--- /dev/null
+++ b/xorg-server/miext/rootless/xplugin.h
@@ -0,0 +1,592 @@
+/* Xplugin.h -- windowing API for rootless X11 server
+ $Id$
+
+ Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software without
+ prior written authorization.
+
+ Note that these interfaces are provided solely for the use of the
+ X11 server. Any other uses are unsupported and strongly discouraged. */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/Xplugin.h,v 1.2 2003/05/02 00:08:49 torrey Exp $ */
+
+#ifndef XPLUGIN_H
+#define XPLUGIN_H 1
+
+#include <stdint.h>
+
+/* By default we use the X server definition of BoxRec to define xp_box,
+ so that the compiler can silently convert between the two. But if
+ XP_NO_X_HEADERS is defined, we'll define it ourselves. */
+
+#ifndef XP_NO_X_HEADERS
+# include "miscstruct.h"
+ typedef BoxRec xp_box;
+#else
+ struct xp_box_struct {
+ short x1, y1, x2, y2;
+ };
+ typedef struct xp_box_struct xp_box;
+#endif
+
+typedef unsigned int xp_resource_id;
+typedef xp_resource_id xp_window_id;
+typedef xp_resource_id xp_surface_id;
+typedef unsigned int xp_client_id;
+typedef unsigned int xp_request_type;
+typedef int xp_error;
+typedef int xp_bool;
+
+
+/* Error codes that the functions declared here may return. They all
+ numerically match their X equivalents, i.e. the XP_ can be dropped
+ if <X11/X.h> has been included. */
+
+enum xp_error_enum {
+ XP_Success = 0,
+ XP_BadRequest = 1,
+ XP_BadValue = 2,
+ XP_BadWindow = 3,
+ XP_BadMatch = 8,
+ XP_BadAccess = 10,
+ XP_BadImplementation = 17,
+};
+
+
+/* Event types generated by the plugin. */
+
+enum xp_event_type_enum {
+ /* The global display configuration changed somehow. */
+ XP_EVENT_DISPLAY_CHANGED = 1 << 0,
+
+ /* A window changed state. Argument is xp_window_state_event */
+ XP_EVENT_WINDOW_STATE_CHANGED = 1 << 1,
+
+ /* An async request encountered an error. Argument is of type
+ xp_async_error_event */
+ XP_EVENT_ASYNC_ERROR = 1 << 2,
+
+ /* Sent when a surface is destroyed as a side effect of destroying
+ a window. Arg is of type xp_surface_id. */
+ XP_EVENT_SURFACE_DESTROYED = 1 << 3,
+
+ /* Sent when any GL contexts pointing at the given surface need to
+ call xp_update_gl_context () to refresh their state (because the
+ window moved or was resized. Arg is of type xp_surface_id. */
+ XP_EVENT_SURFACE_CHANGED = 1 << 4,
+
+ /* Sent when a window has been moved. Arg is of type xp_window_id. */
+ XP_EVENT_WINDOW_MOVED = 1 << 5,
+};
+
+/* Function type used to receive events. */
+
+typedef void (xp_event_fun) (unsigned int type, const void *arg,
+ unsigned int arg_size, void *user_data);
+
+
+/* Operation types. Used when reporting errors asynchronously. */
+
+enum xp_request_type_enum {
+ XP_REQUEST_NIL = 0,
+ XP_REQUEST_DESTROY_WINDOW = 1,
+ XP_REQUEST_CONFIGURE_WINDOW = 2,
+ XP_REQUEST_FLUSH_WINDOW = 3,
+ XP_REQUEST_COPY_WINDOW = 4,
+ XP_REQUEST_UNLOCK_WINDOW = 5,
+ XP_REQUEST_DISABLE_UPDATE = 6,
+ XP_REQUEST_REENABLE_UPDATE = 7,
+ XP_REQUEST_HIDE_CURSOR = 8,
+ XP_REQUEST_SHOW_CURSOR = 9,
+ XP_REQUEST_FRAME_DRAW = 10,
+};
+
+/* Structure used to report an error asynchronously. Passed as the "arg"
+ of an XP_EVENT_ASYNC_ERROR event. */
+
+struct xp_async_error_event_struct {
+ xp_request_type request_type;
+ xp_resource_id id;
+ xp_error error;
+};
+
+typedef struct xp_async_error_event_struct xp_async_error_event;
+
+
+/* Possible window states. */
+
+enum xp_window_state_enum {
+ /* The window is not in the global list of possibly-visible windows. */
+ XP_WINDOW_STATE_OFFSCREEN = 1 << 0,
+
+ /* Parts of the window may be obscured by other windows. */
+ XP_WINDOW_STATE_OBSCURED = 1 << 1,
+};
+
+/* Structure passed as argument of an XP_EVENT_WINDOW_STATE_CHANGED event. */
+
+struct xp_window_state_event_struct {
+ xp_window_id id;
+ unsigned int state;
+};
+
+typedef struct xp_window_state_event_struct xp_window_state_event;
+
+
+/* Function type used to supply a colormap for indexed drawables. */
+
+typedef xp_error (xp_colormap_fun) (void *data, int first_color,
+ int n_colors, uint32_t *colors);
+
+
+/* Window attributes structure. Used when creating and configuring windows.
+ Also used when configuring surfaces attached to windows. Functions that
+ take one of these structures also take a bit mask defining which
+ fields are set to meaningful values. */
+
+enum xp_window_changes_enum {
+ XP_ORIGIN = 1 << 0,
+ XP_SIZE = 1 << 1,
+ XP_BOUNDS = XP_ORIGIN | XP_SIZE,
+ XP_SHAPE = 1 << 2,
+ XP_STACKING = 1 << 3,
+ XP_DEPTH = 1 << 4,
+ XP_COLORMAP = 1 << 5,
+ XP_WINDOW_LEVEL = 1 << 6,
+};
+
+struct xp_window_changes_struct {
+ /* XP_ORIGIN */
+ int x, y;
+
+ /* XP_SIZE */
+ unsigned int width, height;
+ int bit_gravity; /* how to resize the backing store */
+
+ /* XP_SHAPE */
+ int shape_nrects; /* -1 = remove shape */
+ xp_box *shape_rects;
+ int shape_tx, shape_ty; /* translation for shape */
+
+ /* XP_STACKING */
+ int stack_mode;
+ xp_window_id sibling; /* may be zero; in ABOVE/BELOW modes
+ it may specify a relative window */
+ /* XP_DEPTH, window-only */
+ unsigned int depth;
+
+ /* XP_COLORMAP, window-only */
+ xp_colormap_fun *colormap;
+ void *colormap_data;
+
+ /* XP_WINDOW_LEVEL, window-only */
+ int window_level;
+};
+
+typedef struct xp_window_changes_struct xp_window_changes;
+
+/* Values for bit_gravity field */
+
+enum xp_bit_gravity_enum {
+ XP_GRAVITY_NONE = 0, /* no gravity, fill everything */
+ XP_GRAVITY_NORTH_WEST = 1, /* anchor to top-left corner */
+ XP_GRAVITY_NORTH_EAST = 2, /* anchor to top-right corner */
+ XP_GRAVITY_SOUTH_EAST = 3, /* anchor to bottom-right corner */
+ XP_GRAVITY_SOUTH_WEST = 4, /* anchor to bottom-left corner */
+};
+
+/* Values for stack_mode field */
+
+enum xp_window_stack_mode_enum {
+ XP_UNMAPPED = 0, /* remove the window */
+ XP_MAPPED_ABOVE = 1, /* display the window on top */
+ XP_MAPPED_BELOW = 2, /* display the window at bottom */
+};
+
+/* Data formats for depth field and composite functions */
+
+enum xp_depth_enum {
+ XP_DEPTH_NIL = 0, /* null source when compositing */
+ XP_DEPTH_ARGB8888,
+ XP_DEPTH_RGB555,
+ XP_DEPTH_A8, /* for masks when compositing */
+ XP_DEPTH_INDEX8,
+};
+
+/* Options that may be passed to the xp_init () function. */
+
+enum xp_init_options_enum {
+ /* Don't mark that this process can be in the foreground. */
+ XP_IN_BACKGROUND = 1 << 0,
+
+ /* Deliver background pointer events to this process. */
+ XP_BACKGROUND_EVENTS = 1 << 1,
+};
+
+
+
+/* Miscellaneous functions */
+
+/* Initialize the plugin library. Only the copy/fill/composite functions
+ may be called without having previously called xp_init () */
+
+extern xp_error xp_init (unsigned int options);
+
+/* Sets the current set of requested notifications to MASK. When any of
+ these arrive, CALLBACK will be invoked with CALLBACK-DATA. Note that
+ calling this function cancels any previously requested notifications
+ that aren't set in MASK. */
+
+extern xp_error xp_select_events (unsigned int mask,
+ xp_event_fun *callback,
+ void *callback_data);
+
+/* Waits for all initiated operations to complete. */
+
+extern xp_error xp_synchronize (void);
+
+/* Causes any display update initiated through the plugin libary to be
+ queued until update is reenabled. Note that calls to these functions
+ nest. */
+
+extern xp_error xp_disable_update (void);
+extern xp_error xp_reenable_update (void);
+
+
+
+/* Cursor functions. */
+
+/* Installs the specified cursor. ARGB-DATA should point to 32-bit
+ premultiplied big-endian ARGB data. The HOT-X,HOT-Y parameters
+ specify the offset to the cursor's hot spot from its top-left
+ corner. */
+
+extern xp_error xp_set_cursor (unsigned int width, unsigned int height,
+ unsigned int hot_x, unsigned int hot_y,
+ const uint32_t *argb_data,
+ unsigned int rowbytes);
+
+/* Hide and show the cursor if it's owned by the current process. Calls
+ to these functions nest. */
+
+extern xp_error xp_hide_cursor (void);
+extern xp_error xp_show_cursor (void);
+
+
+
+/* Window functions. */
+
+/* Create a new window as defined by MASK and VALUES. MASK must contain
+ XP_BOUNDS or an error is raised. The id of the newly created window
+ is stored in *RET-ID if this function returns XP_Success. */
+
+extern xp_error xp_create_window (unsigned int mask,
+ const xp_window_changes *values,
+ xp_window_id *ret_id);
+
+/* Destroys the window identified by ID. */
+
+extern xp_error xp_destroy_window (xp_window_id id);
+
+/* Reconfigures the given window according to MASK and VALUES. */
+
+extern xp_error xp_configure_window (xp_window_id id, unsigned int mask,
+ const xp_window_changes *values);
+
+
+/* Returns true if NATIVE-ID is a window created by the plugin library.
+ If so and RET-ID is non-null, stores the id of the window in *RET-ID. */
+
+extern xp_bool xp_lookup_native_window (unsigned int native_id,
+ xp_window_id *ret_id);
+
+/* If ID names a window created by the plugin library, stores it's native
+ window id in *RET-NATIVE-ID. */
+
+extern xp_error xp_get_native_window (xp_window_id id,
+ unsigned int *ret_native_id);
+
+
+/* Locks the rectangle IN-RECT (or, if null, the entire window) of the
+ given window's backing store. Any other non-null parameters are filled
+ in as follows:
+
+ DEPTH = format of returned data. Currently either XP_DEPTH_ARGB8888
+ or XP_DEPTH_RGB565 (possibly with 8 bit planar alpha). Data is
+ always stored in native byte order.
+
+ BITS[0] = pointer to top-left pixel of locked color data
+ BITS[1] = pointer to top-left of locked alpha data, or null if window
+ has no alpha. If the alpha data is meshed, then BITS[1] = BITS[0].
+
+ ROWBYTES[0,1] = size in bytes of each row of color,alpha data
+
+ OUT-RECT = rectangle specifying the current position and size of the
+ locked region relative to the window origin.
+
+ Note that an error is raised when trying to lock an already locked
+ window. While the window is locked, the only operations that may
+ be performed on it are to modify, access or flush its marked region. */
+
+extern xp_error xp_lock_window (xp_window_id id,
+ const xp_box *in_rect,
+ unsigned int *depth,
+ void *bits[2],
+ unsigned int rowbytes[2],
+ xp_box *out_rect);
+
+/* Mark that the region specified by SHAPE-NRECTS, SHAPE-RECTS,
+ SHAPE-TX, and SHAPE-TY in the specified window has been updated, and
+ will need to subsequently be redisplayed. */
+
+extern xp_error xp_mark_window (xp_window_id id, int shape_nrects,
+ const xp_box *shape_rects,
+ int shape_tx, int shape_ty);
+
+/* Unlocks the specified window. If FLUSH is true, then any marked
+ regions are immediately redisplayed. Note that it's an error to
+ unlock an already unlocked window. */
+
+extern xp_error xp_unlock_window (xp_window_id id, xp_bool flush);
+
+/* If anything is marked in the given window for redisplay, do it now. */
+
+extern xp_error xp_flush_window (xp_window_id id);
+
+/* Moves the contents of the region DX,DY pixels away from that specified
+ by DST_RECTS and DST_NRECTS in the window with SRC-ID to the
+ destination region in the window DST-ID. Note that currently source
+ and destination windows must be the same. */
+
+extern xp_error xp_copy_window (xp_window_id src_id, xp_window_id dst_id,
+ int dst_nrects, const xp_box *dst_rects,
+ int dx, int dy);
+
+/* Returns true if the given window has any regions marked for
+ redisplay. */
+
+extern xp_bool xp_is_window_marked (xp_window_id id);
+
+/* If successful returns a superset of the region marked for update in
+ the given window. Use xp_free_region () to release the returned data. */
+
+extern xp_error xp_get_marked_shape (xp_window_id id,
+ int *ret_nrects, xp_box **ret_rects);
+
+extern void xp_free_shape (int nrects, xp_box *rects);
+
+/* Searches for the first window below ABOVE-ID containing the point X,Y,
+ and returns it's window id in *RET-ID. If no window is found, *RET-ID
+ is set to zero. If ABOVE-ID is zero, finds the topmost window
+ containing the given point. */
+
+extern xp_error xp_find_window (int x, int y, xp_window_id above_id,
+ xp_window_id *ret_id);
+
+/* Returns the current origin and size of the window ID in *BOUNDS-RET if
+ successful. */
+extern xp_error xp_get_window_bounds (xp_window_id id, xp_box *bounds_ret);
+
+
+
+/* Window surface functions. */
+
+/* Create a new VRAM surface on the specified window. If successful,
+ returns the identifier of the new surface in *RET-SID. */
+
+extern xp_error xp_create_surface (xp_window_id id, xp_surface_id *ret_sid);
+
+/* Destroys the specified surface. */
+
+extern xp_error xp_destroy_surface (xp_surface_id sid);
+
+/* Reconfigures the specified surface as defined by MASK and VALUES.
+ Note that specifying XP_DEPTH is an error. */
+
+extern xp_error xp_configure_surface (xp_surface_id sid, unsigned int mask,
+ const xp_window_changes *values);
+
+/* If successful, places the client identifier of the current process
+ in *RET-CLIENT. */
+
+extern xp_error xp_get_client_id (xp_client_id *ret_client);
+
+/* Given a valid window,surface combination created by the current
+ process, attempts to allow the specified external client access
+ to that surface. If successful, returns two integers in RET-KEY
+ which the client can use to import the surface into their process. */
+
+extern xp_error xp_export_surface (xp_window_id wid, xp_surface_id sid,
+ xp_client_id client,
+ unsigned int ret_key[2]);
+
+/* Given a two integer key returned from xp_export_surface (), tries
+ to import the surface into the current process. If successful the
+ local surface identifier is stored in *SID-RET. */
+
+extern xp_error xp_import_surface (const unsigned int key[2],
+ xp_surface_id *sid_ret);
+
+/* If successful, stores the number of surfaces attached to the
+ specified window in *RET. */
+
+extern xp_error xp_get_window_surface_count (xp_window_id id,
+ unsigned int *ret);
+
+/* Attaches the CGLContextObj CGL-CTX to the specified surface. */
+
+extern xp_error xp_attach_gl_context (void *cgl_ctx, xp_surface_id sid);
+
+/* Updates the CGLContextObj CGL-CTX to reflect any recent changes to
+ the surface it's attached to. */
+
+extern xp_error xp_update_gl_context (void *cgl_ctx);
+
+
+
+/* Window frame functions. */
+
+/* Possible arguments to xp_frame_get_rect (). */
+
+enum xp_frame_rect_enum {
+ XP_FRAME_RECT_TITLEBAR = 1,
+ XP_FRAME_RECT_TRACKING = 2,
+ XP_FRAME_RECT_GROWBOX = 3,
+};
+
+/* Classes of window frame. */
+
+enum xp_frame_class_enum {
+ XP_FRAME_CLASS_DOCUMENT = 1 << 0,
+ XP_FRAME_CLASS_DIALOG = 1 << 1,
+ XP_FRAME_CLASS_MODAL_DIALOG = 1 << 2,
+ XP_FRAME_CLASS_SYSTEM_MODAL_DIALOG = 1 << 3,
+ XP_FRAME_CLASS_UTILITY = 1 << 4,
+ XP_FRAME_CLASS_TOOLBAR = 1 << 5,
+ XP_FRAME_CLASS_MENU = 1 << 6,
+ XP_FRAME_CLASS_SPLASH = 1 << 7,
+ XP_FRAME_CLASS_BORDERLESS = 1 << 8,
+};
+
+/* Attributes of window frames. */
+
+enum xp_frame_attr_enum {
+ XP_FRAME_ACTIVE = 0x0001,
+ XP_FRAME_URGENT = 0x0002,
+ XP_FRAME_TITLE = 0x0004,
+ XP_FRAME_PRELIGHT = 0x0008,
+ XP_FRAME_SHADED = 0x0010,
+ XP_FRAME_CLOSE_BOX = 0x0100,
+ XP_FRAME_COLLAPSE = 0x0200,
+ XP_FRAME_ZOOM = 0x0400,
+ XP_FRAME_ANY_BUTTON = 0x0700,
+ XP_FRAME_CLOSE_BOX_CLICKED = 0x0800,
+ XP_FRAME_COLLAPSE_BOX_CLICKED = 0x1000,
+ XP_FRAME_ZOOM_BOX_CLICKED = 0x2000,
+ XP_FRAME_ANY_CLICKED = 0x3800,
+ XP_FRAME_GROW_BOX = 0x4000,
+};
+
+#define XP_FRAME_ATTR_IS_SET(a,b) (((a) & (b)) == (b))
+#define XP_FRAME_ATTR_IS_CLICKED(a,m) ((a) & ((m) << 3))
+#define XP_FRAME_ATTR_SET_CLICKED(a,m) ((a) |= ((m) << 3))
+#define XP_FRAME_ATTR_UNSET_CLICKED(a,m) ((a) &= ~((m) << 3))
+
+#define XP_FRAME_POINTER_ATTRS (XP_FRAME_PRELIGHT \
+ | XP_FRAME_ANY_BUTTON \
+ | XP_FRAME_ANY_CLICKED)
+
+extern xp_error xp_frame_get_rect (int type, int class, const xp_box *outer,
+ const xp_box *inner, xp_box *ret);
+extern xp_error xp_frame_hit_test (int class, int x, int y,
+ const xp_box *outer,
+ const xp_box *inner, int *ret);
+extern xp_error xp_frame_draw (xp_window_id wid, int class, unsigned int attr,
+ const xp_box *outer, const xp_box *inner,
+ unsigned int title_len,
+ const unsigned char *title_bytes);
+
+
+
+/* Memory manipulation functions. */
+
+enum xp_composite_op_enum {
+ XP_COMPOSITE_SRC = 0,
+ XP_COMPOSITE_OVER,
+};
+
+#define XP_COMPOSITE_FUNCTION(op, src_depth, mask_depth, dest_depth) \
+ (((op) << 24) | ((src_depth) << 16) \
+ | ((mask_depth) << 8) | ((dest_depth) << 0))
+
+#define XP_COMPOSITE_FUNCTION_OP(f) (((f) >> 24) & 255)
+#define XP_COMPOSITE_FUNCTION_SRC_DEPTH(f) (((f) >> 16) & 255)
+#define XP_COMPOSITE_FUNCTION_MASK_DEPTH(f) (((f) >> 8) & 255)
+#define XP_COMPOSITE_FUNCTION_DEST_DEPTH(f) (((f) >> 0) & 255)
+
+/* Composite WIDTH by HEIGHT pixels from source and mask to destination
+ using a specified function (if source and destination overlap,
+ undefined behavior results).
+
+ For SRC and DEST, the first element of the array is the color data. If
+ the second element is non-null it implies that there is alpha data
+ (which may be meshed or planar). Data without alpha is assumed to be
+ opaque.
+
+ Passing a null SRC-ROWBYTES pointer implies that the data SRC points
+ to is a single element.
+
+ Operations that are not supported will return XP_BadImplementation. */
+
+extern xp_error xp_composite_pixels (unsigned int width, unsigned int height,
+ unsigned int function,
+ void *src[2], unsigned int src_rowbytes[2],
+ void *mask, unsigned int mask_rowbytes,
+ void *dest[2], unsigned int dest_rowbytes[2]);
+
+/* Fill HEIGHT rows of data starting at DST. Each row will have WIDTH
+ bytes filled with the 32-bit pattern VALUE. Each row is DST-ROWBYTES
+ wide in total. */
+
+extern void xp_fill_bytes (unsigned int width,
+ unsigned int height, uint32_t value,
+ void *dst, unsigned int dst_rowbytes);
+
+/* Copy HEIGHT rows of bytes from SRC to DST. Each row will have WIDTH
+ bytes copied. SRC and DST may overlap, and the right thing will happen. */
+
+extern void xp_copy_bytes (unsigned int width, unsigned int height,
+ const void *src, unsigned int src_rowbytes,
+ void *dst, unsigned int dst_rowbytes);
+
+/* Suggestions for the minimum number of bytes or pixels for which it
+ makes sense to use some of the xp_ functions */
+
+extern unsigned int xp_fill_bytes_threshold, xp_copy_bytes_threshold,
+ xp_composite_area_threshold, xp_scroll_area_threshold;
+
+
+#endif /* XPLUGIN_H */
+
diff --git a/xorg-server/miext/shadow/makefile b/xorg-server/miext/shadow/makefile
new file mode 100644
index 000000000..0a84b506c
--- /dev/null
+++ b/xorg-server/miext/shadow/makefile
@@ -0,0 +1,25 @@
+LIBRARY = libshadow
+
+#INCLUDES = -I$(top_srcdir)/hw/xfree86/os-support
+
+CSRCS = shadow.c \
+ shalloc.c \
+ shpacked.c \
+ shplanar8.c \
+ shplanar.c \
+ shrot16pack_180.c \
+ shrot16pack_270.c \
+ shrot16pack_270YX.c \
+ shrot16pack_90.c \
+ shrot16pack_90YX.c \
+ shrot16pack.c \
+ shrot32pack_180.c \
+ shrot32pack_270.c \
+ shrot32pack_90.c \
+ shrot32pack.c \
+ shrot8pack_180.c \
+ shrot8pack_270.c \
+ shrot8pack_90.c \
+ shrot8pack.c \
+ shrotate.c
+
diff --git a/xorg-server/miext/sync/makefile b/xorg-server/miext/sync/makefile
new file mode 100644
index 000000000..007233627
--- /dev/null
+++ b/xorg-server/miext/sync/makefile
@@ -0,0 +1,4 @@
+LIBRARY = libsync
+
+CSRCS = \
+ misync.c
diff --git a/xorg-server/os/Makefile.am b/xorg-server/os/Makefile.am
index 91ca110f4..d06f06ff5 100644
--- a/xorg-server/os/Makefile.am
+++ b/xorg-server/os/Makefile.am
@@ -1,61 +1,61 @@
-noinst_LTLIBRARIES = libos.la
-
-AM_CFLAGS = $(DIX_CFLAGS) $(SHA1_CFLAGS)
-
-SECURERPC_SRCS = rpcauth.c
-XDMCP_SRCS = xdmcp.c
-STRLCAT_SRCS = strlcat.c strlcpy.c
-XORG_SRCS = log.c
-
-libos_la_SOURCES = \
- WaitFor.c \
- access.c \
- auth.c \
- backtrace.c \
- client.c \
- connection.c \
- io.c \
- mitauth.c \
- oscolor.c \
- osdep.h \
- osinit.c \
- utils.c \
- strcasecmp.c \
- strcasestr.c \
- xdmauth.c \
- xsha1.c \
- xstrans.c \
- xprintf.c \
- $(XORG_SRCS)
-libos_la_LIBADD = @SHA1_LIBS@ $(DLOPEN_LIBS)
-
-if SECURE_RPC
-libos_la_SOURCES += $(SECURERPC_SRCS)
-endif
-
-if XDMCP
-libos_la_SOURCES += $(XDMCP_SRCS)
-endif
-
-if NEED_STRLCAT
-libos_la_SOURCES += $(STRLCAT_SRCS)
-endif
-
-EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \
- $(XDMCP_SRCS) $(STRLCAT_SRCS)
-
-if SPECIAL_DTRACE_OBJECTS
-# Generate dtrace object code for probes in libos & libdix
-dtrace.o: $(top_srcdir)/dix/Xserver.d $(am_libos_la_OBJECTS)
- $(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o ../dix/.libs/*.o
-
-noinst_PROGRAMS = os.O
-
-os.O: dtrace.o $(am_libos_la_OBJECTS)
- $(AM_V_GEN)ld -r -o $@ dtrace.o .libs/*.o
-endif
-
-os.c:
- touch $@
-
-CLEANFILES = os.c
+noinst_LTLIBRARIES = libos.la
+
+AM_CFLAGS = $(DIX_CFLAGS) $(SHA1_CFLAGS)
+
+SECURERPC_SRCS = rpcauth.c
+XDMCP_SRCS = xdmcp.c
+STRLCAT_SRCS = strlcat.c strlcpy.c
+XORG_SRCS = log.c
+
+libos_la_SOURCES = \
+ WaitFor.c \
+ access.c \
+ auth.c \
+ backtrace.c \
+ client.c \
+ connection.c \
+ io.c \
+ mitauth.c \
+ oscolor.c \
+ osdep.h \
+ osinit.c \
+ utils.c \
+ strcasecmp.c \
+ strcasestr.c \
+ xdmauth.c \
+ xsha1.c \
+ xstrans.c \
+ xprintf.c \
+ $(XORG_SRCS)
+libos_la_LIBADD = @SHA1_LIBS@ $(DLOPEN_LIBS)
+
+if SECURE_RPC
+libos_la_SOURCES += $(SECURERPC_SRCS)
+endif
+
+if XDMCP
+libos_la_SOURCES += $(XDMCP_SRCS)
+endif
+
+if NEED_STRLCAT
+libos_la_SOURCES += $(STRLCAT_SRCS)
+endif
+
+EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \
+ $(XDMCP_SRCS) $(STRLCAT_SRCS)
+
+if SPECIAL_DTRACE_OBJECTS
+# Generate dtrace object code for probes in libos & libdix
+dtrace.o: $(top_srcdir)/dix/Xserver.d $(am_libos_la_OBJECTS)
+ $(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o ../dix/.libs/*.o
+
+noinst_PROGRAMS = os.O
+
+os.O: dtrace.o $(am_libos_la_OBJECTS)
+ $(AM_V_GEN)ld -r -o $@ dtrace.o .libs/*.o
+endif
+
+os.c:
+ touch $@
+
+CLEANFILES = os.c
diff --git a/xorg-server/os/WaitFor.c b/xorg-server/os/WaitFor.c
index 867cb04b8..ddfa14903 100644
--- a/xorg-server/os/WaitFor.c
+++ b/xorg-server/os/WaitFor.c
@@ -213,6 +213,12 @@ WaitForSomething(int *pClientsReady)
wt = &waittime;
}
}
+ if (!wt)
+ {
+ wt = &waittime;
+ waittime.tv_sec = 0;
+ waittime.tv_usec = 100;
+ }
XFD_COPYSET(&AllSockets, &LastSelectMask);
}
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c
index 7ba4274ce..fc7f8366b 100644
--- a/xorg-server/os/access.c
+++ b/xorg-server/os/access.c
@@ -223,6 +223,10 @@ static int AccessEnabled = DEFAULT_ACCESS_CONTROL;
static int LocalHostEnabled = FALSE;
static int LocalHostRequested = FALSE;
static int UsingXdmcp = FALSE;
+static u_long *pInterfaces = NULL;
+static int ActiveInterfaces = 0;
+
+void match_interface(u_long u_lQuery);
/* FamilyServerInterpreted implementation */
static Bool siAddrMatch(int family, pointer addr, int len, HOST *host,
@@ -230,6 +234,84 @@ static Bool siAddrMatch(int family, pointer addr, int len, HOST *host,
static int siCheckAddr(const char *addrString, int length);
static void siTypesInitialize(void);
+#if NTDDI_VERSION < NTDDI_VISTA
+const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt)
+{
+ if (af == AF_INET)
+ {
+ struct sockaddr_in in;
+ memset(&in, 0, sizeof(in));
+ in.sin_family = AF_INET;
+ memcpy(&in.sin_addr, src, sizeof(struct in_addr));
+ if (getnameinfo((struct sockaddr *)&in, sizeof(struct sockaddr_in), dst, cnt, NULL, 0, NI_NUMERICHOST) != 0)
+ {
+ errno = WSAGetLastError();
+ return NULL;
+ }
+ else return dst;
+ }
+ else if (af == AF_INET6)
+ {
+ struct sockaddr_in6 in;
+ memset(&in, 0, sizeof(in));
+ in.sin6_family = AF_INET6;
+ memcpy(&in.sin6_addr, src, sizeof(struct in_addr6));
+ if (getnameinfo((struct sockaddr *)&in, sizeof(struct sockaddr_in6), dst, cnt, NULL, 0, NI_NUMERICHOST) != 0)
+ {
+ errno = WSAGetLastError();
+ return NULL;
+ }
+ else return dst;
+ }
+ errno = WSAEAFNOSUPPORT;
+ return NULL;
+}
+
+int inet_pton(int af, const char *src, void *dst)
+{
+ struct sockaddr_storage ss;
+ int sslen = sizeof(ss);
+ if (af == AF_INET)
+ {
+ struct in_addr out;
+ char buffer[INET_ADDRSTRLEN + 1];
+ strncpy (buffer, src, INET_ADDRSTRLEN);
+ buffer [INET_ADDRSTRLEN] = '\0';
+ if (WSAStringToAddressA(buffer, AF_INET, NULL, (struct sockaddr*)&ss, &sslen) == SOCKET_ERROR)
+ {
+ errno = WSAGetLastError();
+ return 0;
+ }
+ else
+ {
+ out = ((struct sockaddr_in *)&ss)->sin_addr;
+ memcpy (dst, &out, sizeof(struct in_addr));
+ return 1;
+ }
+ }
+ else if (af == AF_INET6)
+ {
+ struct in6_addr out6;
+ char buffer6[INET6_ADDRSTRLEN + 1];
+ strncpy (buffer6, src, INET6_ADDRSTRLEN);
+ buffer6 [INET6_ADDRSTRLEN] = '\0';
+ if (WSAStringToAddressA(buffer6, AF_INET6, NULL, (struct sockaddr*)&ss, &sslen) == SOCKET_ERROR)
+ {
+ errno = WSAGetLastError();
+ return 0;
+ }
+ else
+ {
+ out6 = ((struct sockaddr_in6 *)&ss)->sin6_addr;
+ memcpy (dst, &out6, sizeof(struct in6_addr));
+ return 1;
+ }
+ }
+ errno = WSAEAFNOSUPPORT;
+ return -1;
+}
+#endif
+
/*
* called when authorization is not enabled to add the
* local host to the access list
@@ -309,7 +391,7 @@ ifioctl (int fd, int cmd, char *arg)
#endif
/*
- * DefineSelf (fd):
+ * DefineSelf (fd, protocol):
*
* Define this host for access control. Find all the hosts the OS knows about
* for this fd and add them to the selfhosts list.
@@ -317,12 +399,11 @@ ifioctl (int fd, int cmd, char *arg)
#if !defined(SIOCGIFCONF)
void
-DefineSelf (int fd)
+DefineSelf (int fd, const int protocol)
{
#if !defined(TCPCONN) && !defined(STREAMSCONN) && !defined(UNIXCONN)
return;
#else
- register int n;
int len;
caddr_t addr;
int family;
@@ -334,6 +415,10 @@ DefineSelf (int fd)
struct {
char nodename[512];
} name;
+ HOST ha;
+ struct addrinfo *addresses;
+ struct addrinfo *a;
+ struct addrinfo hints;
#endif
register struct hostent *hp;
@@ -352,7 +437,6 @@ DefineSelf (int fd)
#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
_Xgethostbynameparams hparams;
#endif
-
/* Why not use gethostname()? Well, at least on my system, I've had to
* make an ugly kernel patch to get a name longer than 8 characters, and
* uname() lets me access to the whole string (it smashes release, you
@@ -364,80 +448,166 @@ DefineSelf (int fd)
gethostname(name.nodename, sizeof(name.nodename));
#endif
+ /* Colin's experiments with using getaddrinfo() instead of the IPv6-useless gethostbyname() */
+ memset( &hints, 0, sizeof(hints) );
+ if (protocol == 4) hints.ai_family = AF_INET;
+ else if (protocol == 6) hints.ai_family = AF_INET6;
+
+ if (getaddrinfo(name.nodename, NULL, &hints, &addresses) != 0) goto CarryOnTheOldWay;
+
+ if (protocol == 6) ErrorF ("DefineSelf - %s has IPv%d addresses...\n",
+ name.nodename, protocol);
+
+ for (a = addresses; a != NULL; a = a->ai_next) {
+ char ad[INET6_ADDRSTRLEN];
+ ha.family = a->ai_family;
+ if (a->ai_family == AF_INET6) {
+ ha.addr = (unsigned char *)
+ &((struct sockaddr_in6 *) a->ai_addr)->sin6_addr;
+ ha.len =
+ sizeof (((struct sockaddr_in6 *) a->ai_addr)->sin6_addr);
+ } else {
+ ha.addr = (unsigned char *)
+ &((struct sockaddr_in *) a->ai_addr)->sin_addr;
+ ha.len =
+ sizeof (((struct sockaddr_in *) a->ai_addr)->sin_addr);
+ }
+ inet_ntop(ha.family, ha.addr, ad, sizeof(ad));
+
+ if (ha.family == AF_INET6) {
+ ErrorF(" %s", ad);
+ saddr.sa.sa_family = AF_INET6;
+ inet6addr = (struct sockaddr_in6 *) (&(saddr.sa));
+ acopy (ha.addr, &(inet6addr->sin6_addr), ha.len);
+ len = sizeof(saddr.in6);
+ family = ConvertAddr (&(saddr.sa), &len, (pointer *)&addr);
+ if ( family != -1 && family != FamilyLocal ) {
+ for (host = selfhosts;
+ host && !addrEqual (family, addr, len, host);
+ host = host->next) ;
+ if (!host) {
+ /* add this host to the host list. */
+ MakeHost(host,len)
+ if (host) {
+ host->family = family;
+ host->len = len;
+ acopy (addr, host->addr, len);
+ host->next = selfhosts;
+ selfhosts = host;
+ }
+ if (family == FamilyInternet6 &&
+ !(IN6_IS_ADDR_LOOPBACK((struct in6_addr *)addr))) {
+ XdmcpRegisterConnection (family, (char *)addr, len);
+ }
+ }
+ }
+ }
+ }
+ if (protocol == 6) ErrorF ("\n");
+ freeaddrinfo(addresses);
+ /* End of Colin's experiments */
+
+CarryOnTheOldWay:
+
hp = _XGethostbyname(name.nodename, hparams);
if (hp != NULL)
{
+ int i = 0, j = 0;
+ IN_ADDR Inter;
saddr.sa.sa_family = hp->h_addrtype;
switch (hp->h_addrtype) {
case AF_INET:
+ if (protocol == 6) return; /* We should not be here: gethostbyname() is useless with inet6! */
inetaddr = (struct sockaddr_in *) (&(saddr.sa));
- acopy ( hp->h_addr, &(inetaddr->sin_addr), hp->h_length);
- len = sizeof(saddr.sa);
- break;
-#if defined(IPv6) && defined(AF_INET6)
- case AF_INET6:
- inet6addr = (struct sockaddr_in6 *) (&(saddr.sa));
- acopy ( hp->h_addr, &(inet6addr->sin6_addr), hp->h_length);
- len = sizeof(saddr.in6);
- break;
-#endif
- default:
- goto DefineLocalHost;
- }
- family = ConvertAddr ( &(saddr.sa), &len, (pointer *)&addr);
- if ( family != -1 && family != FamilyLocal )
- {
- for (host = selfhosts;
- host && !addrEqual (family, addr, len, host);
- host = host->next) ;
- if (!host)
+ if (!pInterfaces) match_interface(0);
+ if (ActiveInterfaces && pInterfaces && *pInterfaces)
{
- /* add this host to the host list. */
- MakeHost(host,len)
- if (host)
+ ErrorF ("DefineSelf - %s has %d usable IPv%d interface%s...\n address%s",
+ name.nodename, ActiveInterfaces, protocol,
+ ActiveInterfaces==1 ? "" : "s",
+ ActiveInterfaces==1 ? "" : "es");
+ for (i = 0; hp->h_addr_list[i]; i++)
{
- host->family = family;
- host->len = len;
- acopy ( addr, host->addr, len);
- host->next = selfhosts;
- selfhosts = host;
+ Inter.S_un.S_addr = *(u_long *)hp->h_addr_list[i];
+ ErrorF(" %s", inet_ntoa(Inter));
+ if (*pInterfaces == *(u_long *)hp->h_addr_list[i]) j = i;
}
-#ifdef XDMCP
- /*
- * If this is an Internet Address, but not the localhost
- * address (127.0.0.1), nor the bogus address (0.0.0.0),
- * register it.
- */
- if (family == FamilyInternet &&
- !(len == 4 &&
- ((addr[0] == 127) ||
- (addr[0] == 0 && addr[1] == 0 &&
- addr[2] == 0 && addr[3] == 0)))
- )
+ ErrorF ("\n");
+ }
+ break;
+#if 0 /* We never used to get here and AF_INET6 is now processed by getaddrinfo() */
+ case AF_INET6:
+ inet6addr = (struct sockaddr_in6 *) (&(saddr.sa));
+ acopy ( hp_addr, &(inet6addr->sin6_addr), hp->h_length);
+ len = sizeof(saddr.in6);
+ break;
+#endif
+ default:
+ goto DefineLocalHost;
+ }
+
+ for (i = -1; i < 0 || hp->h_addr_list[i]; i++)
+ {
+ if (i < 0) acopy ( hp->h_addr_list[j], &(inetaddr->sin_addr), hp->h_length);
+ else if (i == j) continue;
+ else acopy ( hp->h_addr_list[i], &(inetaddr->sin_addr), hp->h_length);
+ len = sizeof(saddr.sa);
+ family = ConvertAddr ( &(saddr.sa), &len, (pointer *)&addr);
+ if ( family != -1 && family != FamilyLocal )
+ {
+ for (host = selfhosts;
+ host && !addrEqual (family, addr, len, host);
+ host = host->next) ;
+ if (!host)
{
- XdmcpRegisterConnection (family, (char *)addr, len);
- broad_addr = *inetaddr;
- ((struct sockaddr_in *) &broad_addr)->sin_addr.s_addr =
+ /* add this host to the host list. */
+ MakeHost(host,len)
+ if (host)
+ {
+ host->family = family;
+ host->len = len;
+ acopy ( addr, host->addr, len);
+ host->next = selfhosts;
+ selfhosts = host;
+ }
+ #ifdef XDMCP
+ /*
+ * If this is an Internet Address, but not the localhost
+ * address (127.0.0.1), nor the bogus address (0.0.0.0),
+ * register it.
+ */
+ if (family == FamilyInternet &&
+ !(len == 4 &&
+ ((addr[0] == 127) ||
+ (addr[0] == 0 && addr[1] == 0 &&
+ addr[2] == 0 && addr[3] == 0)))
+ )
+ {
+ XdmcpRegisterConnection (family, (char *)addr, len);
+ broad_addr = *inetaddr;
+ ((struct sockaddr_in *) &broad_addr)->sin_addr.s_addr =
htonl (INADDR_BROADCAST);
- XdmcpRegisterBroadcastAddress ((struct sockaddr_in *)
+ XdmcpRegisterBroadcastAddress ((struct sockaddr_in *)
&broad_addr);
+ }
+ #if defined(IPv6) && defined(AF_INET6)
+ else if (family == FamilyInternet6 &&
+ !(IN6_IS_ADDR_LOOPBACK((struct in6_addr *)addr)))
+ {
+ XdmcpRegisterConnection (family, (char *)addr, len);
+ }
+ #endif
+
+ #endif /* XDMCP */
}
-#if defined(IPv6) && defined(AF_INET6)
- else if (family == FamilyInternet6 &&
- !(IN6_IS_ADDR_LOOPBACK((struct in6_addr *)addr)))
- {
- XdmcpRegisterConnection (family, (char *)addr, len);
- }
-#endif
-
-#endif /* XDMCP */
}
- }
+ }
}
/*
* now add a host of family FamilyLocalHost...
*/
DefineLocalHost:
+ free(pInterfaces);
for (host = selfhosts;
host && !addrEqual(FamilyLocalHost, "", 0, host);
host = host->next);
@@ -874,18 +1044,19 @@ ResetHosts (char *display)
FreeHost (host);
}
-#if defined WIN32 && defined __MINGW32__
-#define ETC_HOST_PREFIX "X"
-#else
#define ETC_HOST_PREFIX "/etc/X"
-#endif
#define ETC_HOST_SUFFIX ".hosts"
fnamelen = strlen(ETC_HOST_PREFIX) + strlen(ETC_HOST_SUFFIX) +
strlen(display) + 1;
if (fnamelen > sizeof(fname))
FatalError("Display name `%s' is too long\n", display);
+#ifdef __MINGW32__
+ snprintf(fname, sizeof(fname), "%s%s" ETC_HOST_SUFFIX, getenv("XHOSTPREFIX"),
+ display);
+#else
snprintf(fname, sizeof(fname), ETC_HOST_PREFIX "%s" ETC_HOST_SUFFIX,
display);
+#endif
if ((fd = fopen (fname, "r")) != 0)
{
@@ -959,9 +1130,13 @@ ResetHosts (char *display)
{
struct addrinfo *addresses;
struct addrinfo *a;
+ struct addrinfo hints;
int f;
- if (getaddrinfo(hostname, NULL, NULL, &addresses) == 0) {
+ memset( &hints, 0, sizeof(hints) );
+ if (family == FamilyInternet) hints.ai_family = AF_INET;
+ else if (family == FamilyInternet6) hints.ai_family = AF_INET6;
+ if (getaddrinfo(hostname, NULL, &hints, &addresses) == 0) {
for (a = addresses ; a != NULL ; a = a->ai_next) {
len = a->ai_addrlen;
f = ConvertAddr(a->ai_addr,&len,(pointer *)&addr);
@@ -1288,6 +1463,8 @@ NewHost (int family,
{
register HOST *host;
+ if (family == FamilyLocal) return TRUE; /* No FamilyLocal in Vcxsrv */
+
for (host = validhosts; host; host = host->next)
{
if (addrEqual (family, addr, len, host))
@@ -1750,6 +1927,7 @@ siHostnameAddrMatch(int family, pointer addr, int len,
char hostname[SI_HOSTNAME_MAXLEN];
struct addrinfo *addresses;
struct addrinfo *a;
+ struct addrinfo hints;
int f, hostaddrlen;
pointer hostaddr;
@@ -1759,7 +1937,10 @@ siHostnameAddrMatch(int family, pointer addr, int len,
strncpy(hostname, siAddr, siAddrLen);
hostname[siAddrLen] = '\0';
- if (getaddrinfo(hostname, NULL, NULL, &addresses) == 0) {
+ memset( &hints, 0, sizeof(hints) );
+ if (family == FamilyInternet) hints.ai_family = AF_INET;
+ else if (family == FamilyInternet6) hints.ai_family = AF_INET6;
+ if (getaddrinfo(hostname, NULL, &hints, &addresses) == 0) {
for (a = addresses ; a != NULL ; a = a->ai_next) {
hostaddrlen = a->ai_addrlen;
f = ConvertAddr(a->ai_addr,&hostaddrlen,&hostaddr);
@@ -1792,7 +1973,7 @@ siHostnameAddrMatch(int family, pointer addr, int len,
if ((hp = _XGethostbyname(hostname, hparams)) != NULL) {
#ifdef h_addr /* new 4.3bsd version of gethostent */
/* iterate over the addresses */
- for (addrlist = hp->h_addr_list; *addrlist; addrlist++)
+ for (addrlist = (const char **)hp->h_addr_list; *addrlist; addrlist++)
#else
addrlist = &hp->h_addr;
#endif
@@ -2074,3 +2255,55 @@ siTypesInitialize(void)
&siLocalGroupPriv);
#endif
}
+
+void match_interface(u_long u_lQuery)
+{
+ WSADATA w;
+ SOCKET sd;
+ INTERFACE_INFO InterfaceList[25];
+ PSOCKADDR_IN pAddress, pNetmask;
+ u_long nBytesReturned, tempAddress;
+ u_long u_lAddress, u_lNetmask, u_lFlags;
+ int nNumInterfaces, i, j = 0;
+
+ if (WSAStartup(MAKEWORD(2,2), &w) != 0)
+ return;
+
+ sd = WSASocket(AF_INET, SOCK_DGRAM, 0, 0, 0, 0);
+ if (sd == INVALID_SOCKET)
+ {
+ WSACleanup();
+ return;
+ }
+
+ if (WSAIoctl(sd, SIO_GET_INTERFACE_LIST, 0, 0, &InterfaceList, sizeof(InterfaceList), &nBytesReturned, 0, 0) == SOCKET_ERROR)
+ {
+ closesocket(sd);
+ WSACleanup();
+ return;
+ }
+
+ nNumInterfaces = (int)(nBytesReturned/sizeof(INTERFACE_INFO));
+ pInterfaces = malloc(25*sizeof(u_long));
+ for (i = 0; i < nNumInterfaces; ++i)
+ {
+ pAddress = &InterfaceList[i].iiAddress.AddressIn;
+ u_lAddress = pAddress->sin_addr.S_un.S_addr;
+
+ pNetmask = &InterfaceList[i].iiNetmask.AddressIn;
+ u_lNetmask = pNetmask->sin_addr.S_un.S_addr;
+
+ u_lFlags = InterfaceList[i].iiFlags;
+ if ((u_lFlags & IFF_UP) && !(u_lFlags & IFF_LOOPBACK))
+ {
+ if ((u_lAddress & u_lNetmask) == (u_lQuery & u_lNetmask)) j = i;
+ *(pInterfaces + ActiveInterfaces) = u_lAddress;
+ ActiveInterfaces++;
+ }
+ }
+ tempAddress = *pInterfaces;
+ *pInterfaces = *(pInterfaces + j);
+ *(pInterfaces + j) = tempAddress;
+ closesocket(sd);
+ WSACleanup();
+}
diff --git a/xorg-server/os/auth.c b/xorg-server/os/auth.c
index 52868f0ba..f80e53155 100644
--- a/xorg-server/os/auth.c
+++ b/xorg-server/os/auth.c
@@ -318,11 +318,23 @@ GenerateAuthorization(
void
GenerateRandomData (int len, char *buf)
{
+#ifdef _MSC_VER
+ static HANDLE hAdvApi32;
+ static BOOLEAN (_stdcall * RtlGenRandom)(void *,unsigned long);
+
+ if (!hAdvApi32)
+ {
+ hAdvApi32=LoadLibrary("advapi32.dll");
+ RtlGenRandom=(BOOLEAN (_stdcall *)(void*,unsigned long))GetProcAddress(hAdvApi32,"SystemFunction036");
+ }
+ RtlGenRandom(buf, len);
+#else
int fd;
fd = open("/dev/urandom", O_RDONLY);
read(fd, buf, len);
close(fd);
+#endif
}
#endif /* XCSECURITY */
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index 4eb2c15c7..da195df39 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -67,6 +67,9 @@ SOFTWARE.
#ifdef WIN32
#include <X11/Xwinsock.h>
+#ifdef _DEBUG
+#define DEBUG
+#endif
#endif
#include <X11/X.h>
#include <X11/Xproto.h>
@@ -111,6 +114,10 @@ SOFTWARE.
#include "dixstruct.h"
#include "xace.h"
+#ifdef _MSC_VER
+typedef int pid_t;
+#endif
+
#define Pid_t pid_t
@@ -142,11 +149,13 @@ int MaxClients = 0;
Bool NewOutputPending; /* not yet attempted to write some new output */
Bool AnyClientsWriteBlocked; /* true if some client blocked on write */
+#if !defined(_MSC_VER)
static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */
+static Pid_t ParentProcess;
+#endif
Bool RunFromSigStopParent; /* send SIGSTOP to our own process; Upstart (or
equivalent) will send SIGCONT back. */
Bool PartialNetwork; /* continue even if unable to bind all addrs */
-static Pid_t ParentProcess;
static Bool debug_conns = FALSE;
@@ -269,6 +278,23 @@ lookup_trans_conn (int fd)
return NULL;
}
+int
+TransIsListening(char *protocol)
+{
+ /* look for this transport in the list of listeners */
+ int i;
+ for (i = 0; i < ListenTransCount; i++)
+ {
+ if (!strcmp(protocol, ListenTransConns[i]->transptr->TransName))
+ {
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+
/* Set MaxClients and lastfdesc, and allocate ConnectionTranslation */
void
@@ -400,16 +426,19 @@ CreateWellKnownSockets(void)
{
ListenTransFds = malloc(ListenTransCount * sizeof (int));
- for (i = 0; i < ListenTransCount; i++)
+ for (i = ListenTransCount; i > 0; i--)
{
- int fd = _XSERVTransGetConnectionNumber (ListenTransConns[i]);
+ int fd = _XSERVTransGetConnectionNumber (ListenTransConns[i-1]);
- ListenTransFds[i] = fd;
+ ListenTransFds[i-1] = fd;
FD_SET (fd, &WellKnownConnections);
- if (!_XSERVTransIsLocal (ListenTransConns[i]))
+ if (!_XSERVTransIsLocal (ListenTransConns[i-1]))
{
- DefineSelf (fd);
+ int protocol = 0;
+ if (!strcmp("inet", ListenTransConns[i-1]->transptr->TransName)) protocol = 4;
+ else if (!strcmp("inet6", ListenTransConns[i-1]->transptr->TransName)) protocol = 6;
+ DefineSelf (fd, protocol);
}
}
}
@@ -969,14 +998,16 @@ CheckConnections(void)
{
#ifndef WIN32
fd_mask mask;
+ int curoff;
#endif
fd_set tmask;
- int curclient, curoff;
+ int curclient;
int i;
struct timeval notime;
int r;
#ifdef WIN32
- fd_set savedAllClients;
+ fd_set savedAllSockets;
+ unsigned j;
#endif
notime.tv_sec = 0;
@@ -1002,19 +1033,24 @@ CheckConnections(void)
}
}
#else
- XFD_COPYSET(&AllClients, &savedAllClients);
- for (i = 0; i < XFD_SETCOUNT(&savedAllClients); i++)
+ /* First test AllSockets and then AllClients are valid sockets */
+ XFD_COPYSET(&AllSockets, &savedAllSockets);
+ for (j=0; j<2; j++)
{
- curclient = XFD_FD(&savedAllClients, i);
- FD_ZERO(&tmask);
- FD_SET(curclient, &tmask);
- do {
- r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
- } while (r < 0 && (errno == EINTR || errno == EAGAIN));
- if (r < 0)
- if (GetConnectionTranslation(curclient) > 0)
- CloseDownClient(clients[GetConnectionTranslation(curclient)]);
- }
+ for (i = 0; i < XFD_SETCOUNT(&savedAllSockets); i++)
+ {
+ curclient = XFD_FD(&savedAllSockets, i);
+ FD_ZERO(&tmask);
+ FD_SET(curclient, &tmask);
+ do {
+ r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
+ } while (r == SOCKET_ERROR && (WSAGetLastError() == WSAEINTR || WSAGetLastError() == WSAEWOULDBLOCK));
+ if (r < 0)
+ if (GetConnectionTranslation(curclient) > 0)
+ CloseDownClient(clients[GetConnectionTranslation(curclient)]);
+ }
+ XFD_COPYSET(&AllClients, &savedAllSockets);
+ }
#endif
}
@@ -1032,6 +1068,10 @@ CloseDownConnection(ClientPtr client)
if (FlushCallback)
CallCallbacks(&FlushCallback, NULL);
+#ifdef DEBUG
+ ErrorF("CloseDownConnection: client index = %d, socket fd = %d\n",
+ client->index, oc->fd);
+#endif
if (oc->output && oc->output->count)
FlushClient(client, oc, (char *)NULL, 0);
#ifdef XDMCP
diff --git a/xorg-server/os/io.c b/xorg-server/os/io.c
index a26b394b9..d2eb04649 100644
--- a/xorg-server/os/io.c
+++ b/xorg-server/os/io.c
@@ -952,6 +952,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
/* If we've arrived here, then the client is stuffed to the gills
and not ready to accept more. Make a note of it and buffer
the rest. */
+ errno=0;
FD_SET(connection, &ClientsWriteBlocked);
AnyClientsWriteBlocked = TRUE;
diff --git a/xorg-server/os/log.c b/xorg-server/os/log.c
index adcf16244..8b5d24b94 100644
--- a/xorg-server/os/log.c
+++ b/xorg-server/os/log.c
@@ -95,8 +95,14 @@ OR PERFORMANCE OF THIS SOFTWARE.
#ifdef WIN32
#include <process.h>
+#ifndef _MSC_VER
#define getpid(x) _getpid(x)
#endif
+#endif
+
+#ifdef _MSC_VER
+#define S_ISREG(m) (((m)&_S_IFMT) == _S_IFREG)
+#endif
#ifdef XF86BIGFONT
#include "xf86bigfontsrv.h"
@@ -261,7 +267,7 @@ LogSetParameter(LogParameter param, int value)
void
LogVWrite(int verb, const char *f, va_list args)
{
- static char tmpBuffer[1024];
+ char tmpBuffer[1024];
int len = 0;
static Bool newline = TRUE;
@@ -278,7 +284,8 @@ LogVWrite(int verb, const char *f, va_list args)
* stream(s).
*/
if (verb < 0 || logFileVerbosity >= verb || logVerbosity >= verb) {
- vsnprintf(tmpBuffer, sizeof(tmpBuffer), f, args);
+ vsnprintf(tmpBuffer, sizeof(tmpBuffer)-1, f, args);
+ tmpBuffer[sizeof(tmpBuffer)-1]=0;
len = strlen(tmpBuffer);
}
newline = (tmpBuffer[len-1] == '\n');
@@ -503,7 +510,7 @@ VAuditF(const char *f, va_list args)
if (auditTimer != NULL)
TimerForce(auditTimer);
ErrorF("%s%s", prefix != NULL ? prefix : "", buf);
- strlcpy(oldbuf, buf, sizeof(oldbuf));
+ strncpy(oldbuf, buf, sizeof(oldbuf));
oldlen = len;
nrepeat = 0;
auditTimer = TimerSet(auditTimer, 0, AUDIT_TIMEOUT, AuditFlush, NULL);
@@ -511,6 +518,8 @@ VAuditF(const char *f, va_list args)
free(prefix);
}
+extern char g_FatalErrorMessage[1024];
+
void
FatalError(const char *f, ...)
{
@@ -526,6 +535,9 @@ FatalError(const char *f, ...)
#ifdef __APPLE__
(void)vsnprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__), f, args);
#endif
+#ifdef WIN32
+ vsnprintf(g_FatalErrorMessage, 1024, f, args);
+#endif
VErrorF(f, args);
va_end(args);
ErrorF("\n");
diff --git a/xorg-server/os/makefile b/xorg-server/os/makefile
new file mode 100644
index 000000000..779a1c95d
--- /dev/null
+++ b/xorg-server/os/makefile
@@ -0,0 +1,49 @@
+LIBRARY=libos
+
+ifeq ($(DEBUG),1)
+DEFINES += XSERVER_DTRACE
+endif
+SECURE_RPC=1
+XDMCP=1
+NEED_STRLCAT=1
+
+SECURERPC_SRCS = rpcauth.c
+XDMCP_SRCS = xdmcp.c
+STRLCAT_SRCS = strlcat.c strlcpy.c
+XORG_SRCS = log.c
+
+libos_la_SOURCES = \
+ WaitFor.c \
+ access.c \
+ auth.c \
+ backtrace.c \
+ client.c \
+ connection.c \
+ io.c \
+ mitauth.c \
+ oscolor.c \
+ osdep.h \
+ osinit.c \
+ utils.c \
+ strcasecmp.c \
+ strcasestr.c \
+ xdmauth.c \
+ xsha1.c \
+ xstrans.c \
+ xprintf.c \
+ $(XORG_SRCS)
+
+if SECURE_RPC
+libos_la_SOURCES += $(SECURERPC_SRCS)
+endif
+if XDMCP
+libos_la_SOURCES += $(XDMCP_SRCS)
+endif
+
+if NEED_STRLCAT
+libos_la_SOURCES += $(STRLCAT_SRCS)
+endif
+
+CSRCS = $(filter %.c,$(libos_la_SOURCES))
+
+
diff --git a/xorg-server/os/oscolor.c b/xorg-server/os/oscolor.c
index 7f6b93880..4e1513f53 100644
--- a/xorg-server/os/oscolor.c
+++ b/xorg-server/os/oscolor.c
@@ -49,6 +49,10 @@ SOFTWARE.
#include <dix-config.h>
#endif
+#ifdef _MSC_VER
+#define strncasecmp _strnicmp
+#endif
+
#include <X11/keysym.h>
#include "os.h"
diff --git a/xorg-server/os/osinit.c b/xorg-server/os/osinit.c
index 69e4933e6..2080cb782 100644
--- a/xorg-server/os/osinit.c
+++ b/xorg-server/os/osinit.c
@@ -155,6 +155,7 @@ OsInit(void)
char fname[PATH_MAX];
if (!been_here) {
+#ifndef _MSC_VER
struct sigaction act, oact;
int i;
int siglist[] = { SIGSEGV, SIGQUIT, SIGILL, SIGFPE, SIGBUS,
@@ -198,7 +199,7 @@ OsInit(void)
int failure_signal = SIGQUIT;
dlinfo(RTLD_SELF, RTLD_DI_SETSIGNAL, &failure_signal);
#endif
-
+#endif
#if !defined(__CYGWIN__)
fclose(stdin);
fclose(stdout);
@@ -237,8 +238,10 @@ OsInit(void)
#endif
}
+#ifndef _MSC_VER
if (getpgrp () == 0)
setpgid (0, 0);
+#endif
#ifdef RLIMIT_DATA
if (limitDataSpace >= 0)
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index 30d14460a..a9433876b 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -201,6 +201,11 @@ Bool PanoramiXExtensionDisabledHack = FALSE;
int auditTrailLevel = 1;
+#ifdef _MSC_VER
+static HANDLE s_hSmartScheduleTimer = NULL;
+static HANDLE s_hSmartScheduleTimerQueue = NULL;
+#endif
+
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
#define HAS_SAVED_IDS_AND_SETEUID
#endif
@@ -208,6 +213,9 @@ int auditTrailLevel = 1;
OsSigHandlerPtr
OsSignal(int sig, OsSigHandlerPtr handler)
{
+#ifdef X_NOT_POSIX
+ return signal(sig, handler);
+#else
struct sigaction act, oact;
sigemptyset(&act.sa_mask);
@@ -218,6 +226,7 @@ OsSignal(int sig, OsSigHandlerPtr handler)
if (sigaction(sig, &act, &oact))
perror("sigaction");
return oact.sa_handler;
+#endif
}
/*
@@ -232,7 +241,7 @@ OsSignal(int sig, OsSigHandlerPtr handler)
#define LOCK_SUFFIX "-lock"
static Bool StillLocking = FALSE;
-static char LockFile[PATH_MAX];
+static char szLockFile[PATH_MAX];
static Bool nolock = FALSE;
/*
@@ -244,26 +253,34 @@ static Bool nolock = FALSE;
void
LockServer(void)
{
+#if defined(WIN32) && !defined(__CYGWIN__)
+ char MutexName[100];
+ sprintf(MutexName, "Global\\VcXsrv_Mutex_%d\n", getpid());
+ if (!CreateMutex(NULL,TRUE,MutexName) || GetLastError()== ERROR_ALREADY_EXISTS)
+ {
+ FatalError("Server is already active for display %d\n", atoi(display));
+ }
+#else
+ char port[20];
char tmp[PATH_MAX], pid_str[12];
int lfd, i, haslock, l_pid, t;
char *tmppath = NULL;
int len;
- char port[20];
if (nolock) return;
/*
* Path names
*/
tmppath = LOCK_DIR;
-
sprintf(port, "%d", atoi(display));
+
len = strlen(LOCK_PREFIX) > strlen(LOCK_TMP_PREFIX) ? strlen(LOCK_PREFIX) :
strlen(LOCK_TMP_PREFIX);
len += strlen(tmppath) + strlen(port) + strlen(LOCK_SUFFIX) + 1;
- if (len > sizeof(LockFile))
+ if (len > sizeof(szLockFile))
FatalError("Display name `%s' is too long\n", port);
(void)sprintf(tmp, "%s" LOCK_TMP_PREFIX "%s" LOCK_SUFFIX, tmppath, port);
- (void)sprintf(LockFile, "%s" LOCK_PREFIX "%s" LOCK_SUFFIX, tmppath, port);
+ (void)sprintf(szLockFile, "%s" LOCK_PREFIX "%s" LOCK_SUFFIX, tmppath, port);
/*
* Create a temporary file containing our PID. Attempt three times
@@ -305,7 +322,7 @@ LockServer(void)
i = 0;
haslock = 0;
while ((!haslock) && (i++ < 3)) {
- haslock = (link(tmp,LockFile) == 0);
+ haslock = (link(tmp,szLockFile) == 0);
if (haslock) {
/*
* We're done.
@@ -316,17 +333,17 @@ LockServer(void)
/*
* Read the pid from the existing file
*/
- lfd = open(LockFile, O_RDONLY);
+ lfd = open(szLockFile, O_RDONLY);
if (lfd < 0) {
unlink(tmp);
- FatalError("Can't read lock file %s\n", LockFile);
+ FatalError("Can't read lock file %s\n", szLockFile);
}
pid_str[0] = '\0';
if (read(lfd, pid_str, 11) != 11) {
/*
* Bogus lock file.
*/
- unlink(LockFile);
+ unlink(szLockFile);
close(lfd);
continue;
}
@@ -343,7 +360,7 @@ LockServer(void)
/*
* Stale lock file.
*/
- unlink(LockFile);
+ unlink(szLockFile);
continue;
}
else if (((t < 0) && (errno == EPERM)) || (t == 0)) {
@@ -353,14 +370,15 @@ LockServer(void)
unlink(tmp);
FatalError("Server is already active for display %s\n%s %s\n%s\n",
port, "\tIf this server is no longer running, remove",
- LockFile, "\tand start again.");
+ szLockFile, "\tand start again.");
}
}
}
unlink(tmp);
if (!haslock)
- FatalError("Could not create server lock file: %s\n", LockFile);
+ FatalError("Could not create server lock file: %s\n", szLockFile);
StillLocking = FALSE;
+#endif
}
/*
@@ -374,7 +392,7 @@ UnlockServer(void)
if (!StillLocking){
- (void) unlink(LockFile);
+ (void) unlink(szLockFile);
}
}
@@ -465,7 +483,10 @@ AdjustWaitForDelay (pointer waitTime, unsigned long newdelay)
void UseMsg(void)
{
- ErrorF("use: X [:<display>] [option]\n");
+ ErrorF("Usage...\nVcxsrv [:<display>] [option]\n\n");
+ ErrorF(":display-number\n\tVcxsrv runs as the given display-number, which defaults to 0.\n");
+ ErrorF("\tTo run multiple instances, use unique display-numbers.\n\n");
+
ErrorF("-a # default pointer acceleration (factor)\n");
ErrorF("-ac disable access control restrictions\n");
ErrorF("-audit int set audit trail level\n");
@@ -473,12 +494,14 @@ void UseMsg(void)
ErrorF("-br create root window with black background\n");
ErrorF("+bs enable any backing store support\n");
ErrorF("-bs disable any backing store support\n");
- ErrorF("-c turns off key-click\n");
- ErrorF("c # key-click volume (0-100)\n");
ErrorF("-cc int default color visual class\n");
ErrorF("-nocursor disable the cursor\n");
ErrorF("-core generate core dump on fatal error\n");
+#ifdef _MSC_VER
+ ErrorF("-dpi [auto|int] screen resolution set to native or this dpi\n");
+#else
ErrorF("-dpi int screen resolution in dots per inch\n");
+#endif
#ifdef DPMSExtension
ErrorF("-dpms disables VESA DPMS monitor control\n");
#endif
@@ -503,31 +526,24 @@ void UseMsg(void)
ErrorF("-noreset don't reset after last client exists\n");
ErrorF("-background [none] create root window with no background\n");
ErrorF("-reset reset after last client exists\n");
- ErrorF("-p # screen-saver pattern duration (minutes)\n");
ErrorF("-pn accept failure to listen on all ports\n");
ErrorF("-nopn reject failure to listen on all ports\n");
ErrorF("-r turns off auto-repeat\n");
ErrorF("r turns on auto-repeat \n");
ErrorF("-render [default|mono|gray|color] set render color alloc policy\n");
- ErrorF("-retro start with classic stipple and cursor\n");
- ErrorF("-s # screen-saver timeout (minutes)\n");
+ ErrorF("-retro start with classic stipple\n");
ErrorF("-t # default pointer threshold (pixels/t)\n");
ErrorF("-terminate terminate at server reset\n");
ErrorF("-to # connection time out\n");
ErrorF("-tst disable testing extensions\n");
- ErrorF("ttyxx server started from init on /dev/ttyxx\n");
- ErrorF("v video blanking for screen-saver\n");
- ErrorF("-v screen-saver without video blanking\n");
ErrorF("-wm WhenMapped default backing-store\n");
ErrorF("-wr create root window with white background\n");
- ErrorF("-maxbigreqsize set maximal bigrequest size \n");
#ifdef PANORAMIX
ErrorF("+xinerama Enable XINERAMA extension\n");
ErrorF("-xinerama Disable XINERAMA extension\n");
#endif
ErrorF("-dumbSched Disable smart scheduling, enable old behavior\n");
ErrorF("-schedInterval int Set scheduler interval in msec\n");
- ErrorF("-sigstop Enable SIGSTOP based startup\n");
ErrorF("+extension name Enable extension\n");
ErrorF("-extension name Disable extension\n");
#ifdef XDMCP
@@ -621,17 +637,6 @@ ProcessCommandLine(int argc, char *argv[])
enableBackingStore = TRUE;
else if ( strcmp( argv[i], "-bs") == 0)
disableBackingStore = TRUE;
- else if ( strcmp( argv[i], "c") == 0)
- {
- if(++i < argc)
- defaultKeyboardControl.click = atoi(argv[i]);
- else
- UseMsg();
- }
- else if ( strcmp( argv[i], "-c") == 0)
- {
- defaultKeyboardControl.click = 0;
- }
else if ( strcmp( argv[i], "-cc") == 0)
{
if(++i < argc)
@@ -656,7 +661,24 @@ ProcessCommandLine(int argc, char *argv[])
else if ( strcmp( argv[i], "-dpi") == 0)
{
if(++i < argc)
+#ifdef _MSC_VER
+ {
+ if (strcmp(argv[i], "auto") == 0)
+ {
+ HDC hdc = GetDC(NULL);
+ if (hdc)
+ {
+ int dpiY = GetDeviceCaps(hdc, LOGPIXELSY);
+ monitorResolution = dpiY;
+ ReleaseDC(NULL, hdc);
+ }
+ }
+ else if (isdigit(*argv[i])) /* Naively prevent a crash if not numeric */
+ monitorResolution = atoi(argv[i]);
+ }
+#else
monitorResolution = atoi(argv[i]);
+#endif
else
UseMsg();
}
@@ -824,10 +846,6 @@ ProcessCommandLine(int argc, char *argv[])
{
noTestExtensions = TRUE;
}
- else if ( strcmp( argv[i], "v") == 0)
- defaultScreenSaverBlanking = PreferBlanking;
- else if ( strcmp( argv[i], "-v") == 0)
- defaultScreenSaverBlanking = DontPreferBlanking;
else if ( strcmp( argv[i], "-wm") == 0)
defaultBackingStore = WhenMapped;
else if ( strcmp( argv[i], "-wr") == 0)
@@ -921,10 +939,6 @@ ProcessCommandLine(int argc, char *argv[])
else
UseMsg ();
}
- else if ( strcmp( argv[i], "-sigstop") == 0)
- {
- RunFromSigStopParent = TRUE;
- }
else if ( strcmp( argv[i], "+extension") == 0)
{
if (++i < argc)
@@ -1122,6 +1136,12 @@ XNFstrdup(const char *s)
void
SmartScheduleStopTimer (void)
{
+#ifdef _MSC_VER
+ if (SmartScheduleDisable)
+ return;
+ DeleteTimerQueueTimer(s_hSmartScheduleTimerQueue, s_hSmartScheduleTimer, NULL);
+ s_hSmartScheduleTimer=NULL;
+#else
struct itimerval timer;
if (SmartScheduleDisable)
@@ -1131,11 +1151,36 @@ SmartScheduleStopTimer (void)
timer.it_value.tv_sec = 0;
timer.it_value.tv_usec = 0;
(void) setitimer (ITIMER_REAL, &timer, 0);
+#endif
+}
+
+#ifdef _MSC_VER
+static VOID CALLBACK SmartScheduleTimer( PVOID lpParameter, BOOLEAN TimerOrWaitFired)
+#else
+static void SmartScheduleTimer (int sig)
+#endif
+{
+ SmartScheduleTime += SmartScheduleInterval;
}
+
void
SmartScheduleStartTimer (void)
{
+#ifdef _MSC_VER
+ if (SmartScheduleDisable)
+ return;
+
+ if (!CreateTimerQueueTimer( &s_hSmartScheduleTimer, s_hSmartScheduleTimerQueue, SmartScheduleTimer, NULL
+ , SmartScheduleInterval, SmartScheduleInterval, WT_EXECUTEONLYONCE|WT_EXECUTEINPERSISTENTTHREAD))
+ {
+ DWORD Error=GetLastError();
+ ErrorF("Error starting timer, smart scheduling disabled: 0x%x (%d)\n",Error,Error);
+ CloseHandle(s_hSmartScheduleTimer);
+ SmartScheduleDisable = TRUE;
+ return;
+ }
+#else
struct itimerval timer;
if (SmartScheduleDisable)
@@ -1145,17 +1190,23 @@ SmartScheduleStartTimer (void)
timer.it_value.tv_sec = 0;
timer.it_value.tv_usec = SmartScheduleInterval * 1000;
setitimer (ITIMER_REAL, &timer, 0);
-}
-
-static void
-SmartScheduleTimer (int sig)
-{
- SmartScheduleTime += SmartScheduleInterval;
+#endif
}
void
SmartScheduleInit (void)
{
+#ifdef _MSC_VER
+ if (SmartScheduleDisable)
+ return;
+ s_hSmartScheduleTimerQueue = CreateTimerQueue();
+ if (!s_hSmartScheduleTimerQueue)
+ {
+ DWORD Error=GetLastError();
+ ErrorF("Error creating timer, smart scheduling disabled: 0x%x (%d)\n",Error,Error);
+ SmartScheduleDisable = TRUE;
+ }
+#else
struct sigaction act;
if (SmartScheduleDisable)
@@ -1172,6 +1223,7 @@ SmartScheduleInit (void)
perror ("sigaction for smart scheduler");
SmartScheduleDisable = TRUE;
}
+#endif
}
#ifdef SIG_BLOCK
@@ -1533,6 +1585,7 @@ Fclose(pointer iop)
*/
/* Consider LD* variables insecure? */
+#ifndef _MSC_VER
#ifndef REMOVE_ENV_LD
#define REMOVE_ENV_LD 1
#endif
@@ -1541,6 +1594,7 @@ Fclose(pointer iop)
#ifndef REMOVE_LONG_ENV
#define REMOVE_LONG_ENV 1
#endif
+#endif
/*
* Disallow stdout or stderr as pipes? It's possible to block the X server
@@ -1571,7 +1625,7 @@ Fclose(pointer iop)
#endif
#define MAX_ARG_LENGTH 128
-#define MAX_ENV_LENGTH 256
+#define MAX_ENV_LENGTH 2048
#define MAX_ENV_PATH_LENGTH 2048 /* Limit for *PATH and TERMCAP */
#if USE_ISPRINT
diff --git a/xorg-server/os/xdmcp.c b/xorg-server/os/xdmcp.c
index 8da2cb05c..3958f06dc 100644
--- a/xorg-server/os/xdmcp.c
+++ b/xorg-server/os/xdmcp.c
@@ -62,6 +62,8 @@
static char *defaultDisplayClass = COMPILEDDISPLAYCLASS;
+extern void match_interface(u_long u_lQuery);
+
static int xdmcpSocket, sessionSocket;
static xdmcp_states state;
#if defined(IPv6) && defined(AF_INET6)
@@ -203,6 +205,11 @@ static void XdmcpWakeupHandler(
int /*i*/,
pointer /*LastSelectMask*/);
+#define XSERV_t
+#define TRANS_SERVER
+#define TRANS_REOPEN
+#include <X11/Xtrans/Xtrans.h>
+
/*
* Register the Manufacturer display ID
*/
@@ -587,6 +594,32 @@ XdmcpInit(void)
(pointer) 0);
timeOutRtx = 0;
DisplayNumber = (CARD16) atoi(display);
+ if (ConnectionTypes.length>1 && xdm_from==NULL)
+ {
+ unsigned i=0;
+ char ErrorMessage[1024];
+ sprintf(ErrorMessage,"Multiple ip-addresses detected:\n");
+ for (i=0; i<ConnectionTypes.length; i++)
+ {
+ int AddrLen=ConnectionAddresses.data[i].length;
+ if (AddrLen==4)
+ sprintf(ErrorMessage+strlen(ErrorMessage)," %d.%d.%d.%d\n",
+ ConnectionAddresses.data[i].data[0],
+ ConnectionAddresses.data[i].data[1],
+ ConnectionAddresses.data[i].data[2],
+ ConnectionAddresses.data[i].data[3]);
+ else
+ {
+ int j;
+ sprintf(ErrorMessage+strlen(ErrorMessage)," ");
+ for (j=0; j<AddrLen; j++)
+ sprintf(ErrorMessage+strlen(ErrorMessage),"%02x",ConnectionAddresses.data[i].data[j]);
+ sprintf(ErrorMessage+strlen(ErrorMessage),"\n");
+ }
+ }
+ sprintf(ErrorMessage+strlen(ErrorMessage),"Please specify the ip-address you want to use with -from\n");
+ FatalError(ErrorMessage);
+ }
get_xdmcp_sock();
send_packet();
}
@@ -661,8 +694,8 @@ XdmcpBlockHandler(
if (timeOutTime == 0)
return;
millisToGo = timeOutTime - GetTimeInMillis();
- if ((int) millisToGo < 0)
- millisToGo = 0;
+ if ((int) millisToGo <= 0)
+ millisToGo = 1;
AdjustWaitForDelay (wt, millisToGo);
}
@@ -706,18 +739,6 @@ XdmcpWakeupHandler(
else if (state == XDM_RUN_SESSION)
keepaliveDormancy = defaultKeepaliveDormancy;
}
- if (XFD_ANYSET(&AllClients) && state == XDM_RUN_SESSION)
- timeOutTime = GetTimeInMillis() + keepaliveDormancy * 1000;
- }
- else if (timeOutTime && (int) (GetTimeInMillis() - timeOutTime) >= 0)
- {
- if (state == XDM_RUN_SESSION)
- {
- state = XDM_KEEPALIVE;
- send_packet();
- }
- else
- timeout();
}
}
@@ -745,6 +766,37 @@ XdmcpSelectHost(
* selects the first host to respond with willing message.
*/
+#ifdef _MSC_VER
+void DisplayXdmcpHostsDialog(void);
+int XdmcpHostAddName(const char *HostName, int HostIndex);
+
+struct hostinfo
+{
+ struct sockaddr *from;
+ int fromlen;
+ ARRAY8 AuthenticationName;
+};
+static int g_NrHosts;
+static struct hostinfo *g_Hosts;
+
+void XdmcpHostSelected(int HostIdx)
+{
+ int i;
+
+ /* Connect to the selected host */
+ XdmcpSelectHost(g_Hosts[HostIdx].from, g_Hosts[HostIdx].fromlen, &g_Hosts[HostIdx].AuthenticationName);
+
+ for (i=0; i<g_NrHosts; i++)
+ {
+ free(g_Hosts[i].from);
+ free(g_Hosts[i].AuthenticationName.data);
+ }
+ free(g_Hosts);
+ g_Hosts=NULL;
+ g_NrHosts=0;
+}
+#endif
+
/*ARGSUSED*/
static void
XdmcpAddHost(
@@ -754,7 +806,35 @@ XdmcpAddHost(
ARRAY8Ptr hostname,
ARRAY8Ptr status)
{
- XdmcpSelectHost(from, fromlen, AuthenticationName);
+#ifdef _MSC_VER
+ char szHostName[100];
+ int HostIdx;
+
+ memcpy(szHostName,hostname->data,hostname->length);
+ szHostName[hostname->length]=0;
+
+ DisplayXdmcpHostsDialog(); /* Display the dialog if not already displayed */
+
+ HostIdx=XdmcpHostAddName(szHostName, g_NrHosts);
+ if (HostIdx==-1)
+ {
+ HostIdx=g_NrHosts;
+ g_NrHosts++;
+ g_Hosts=realloc(g_Hosts,g_NrHosts*sizeof(*g_Hosts));
+ g_Hosts[HostIdx].AuthenticationName.data=NULL;
+ g_Hosts[HostIdx].from=NULL;
+ }
+
+ g_Hosts[HostIdx].fromlen=fromlen;
+ g_Hosts[HostIdx].from=realloc(g_Hosts[HostIdx].from,g_Hosts[HostIdx].fromlen);
+ memcpy(g_Hosts[HostIdx].from,from,fromlen);
+
+ g_Hosts[HostIdx].AuthenticationName.length=AuthenticationName->length;
+ g_Hosts[HostIdx].AuthenticationName.data=realloc(g_Hosts[HostIdx].AuthenticationName.data,AuthenticationName->length);
+ memcpy(g_Hosts[HostIdx].AuthenticationName.data,AuthenticationName->data,AuthenticationName->length);
+#else
+ XdmcpSelectHost(from, fromlen, AuthenticationName);
+#endif
}
/*
@@ -1027,11 +1107,20 @@ get_xdmcp_sock(void)
sizeof(soopts)) < 0)
XdmcpWarning("UDP set broadcast socket-option failed");
#endif /* SO_BROADCAST */
- if (xdmcpSocket >= 0 && xdm_from != NULL) {
+ if (xdm_from)
+ {
+ if (xdmcpSocket >= 0 && SOCKADDR_FAMILY(FromAddress)==AF_INET) {
if (bind(xdmcpSocket, (struct sockaddr *)&FromAddress,
FromAddressLen) < 0) {
- FatalError("Xserver: failed to bind to -from address: %s\n", xdm_from);
+ FatalError("Xserver: failed to bind to -from address: %s error %d\n", xdm_from, WSAGetLastError());
}
+ }
+ else if (xdmcpSocket6 >= 0 && SOCKADDR_FAMILY(FromAddress)==AF_INET6) {
+ if (bind(xdmcpSocket6, (struct sockaddr *)&FromAddress,
+ FromAddressLen) < 0) {
+ FatalError("Xserver: failed to bind to -from address: %s error %d\n", xdm_from, WSAGetLastError());
+ }
+ }
}
#endif /* STREAMSCONN */
}
@@ -1095,15 +1184,15 @@ send_query_msg(void)
for (mcl = mcastlist; mcl != NULL; mcl = mcl->next) {
for (ai = mcl->ai ; ai != NULL; ai = ai->ai_next) {
if (ai->ai_family == AF_INET) {
- unsigned char hopflag = (unsigned char) mcl->hops;
+ int hopflag = mcl->hops;
socketfd = xdmcpSocket;
setsockopt(socketfd, IPPROTO_IP, IP_MULTICAST_TTL,
- &hopflag, sizeof(hopflag));
+ (char*)&hopflag, sizeof(hopflag));
} else if (ai->ai_family == AF_INET6) {
int hopflag6 = mcl->hops;
socketfd = xdmcpSocket6;
setsockopt(socketfd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
- &hopflag6, sizeof(hopflag6));
+ (char*)&hopflag6, sizeof(hopflag6));
} else {
continue;
}
@@ -1483,6 +1572,10 @@ get_addr_by_name(
char *pport = portstr;
int gaierr;
+#if defined(WIN32) && defined(TCPCONN)
+ _XSERVTransWSAStartup();
+#endif
+
memset(&hints, 0, sizeof(hints));
hints.ai_socktype = socktype;
@@ -1520,9 +1613,6 @@ get_addr_by_name(
#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
_Xgethostbynameparams hparams;
#endif
-#if defined(WIN32) && defined(TCPCONN)
- _XSERVTransWSAStartup();
-#endif
if (!(hep = _XGethostbyname(namestr, hparams)))
{
FatalError("Xserver: %s unknown host: %s\n", argtype, namestr);
@@ -1548,6 +1638,9 @@ get_manager_by_name(
int i)
{
+ PSOCKADDR_IN queryAddr = NULL;
+ u_long u_lqueryAddr = 0;
+
if ((i + 1) == argc)
{
FatalError("Xserver: missing %s host name in command line\n", argv[i]);
@@ -1559,6 +1652,9 @@ get_manager_by_name(
, &mgrAddr, &mgrAddrFirst
#endif
);
+ queryAddr = (PSOCKADDR_IN)&ManagerAddress;
+ u_lqueryAddr = queryAddr->sin_addr.S_un.S_addr;
+ match_interface(u_lqueryAddr);
}
diff --git a/xorg-server/os/xprintf.c b/xorg-server/os/xprintf.c
index 254b7374a..cc5a9b355 100644
--- a/xorg-server/os/xprintf.c
+++ b/xorg-server/os/xprintf.c
@@ -76,7 +76,9 @@
# ifdef __va_copy
# define va_copy __va_copy
# else
+# ifndef _MSC_VER
# error "no working va_copy was found"
+# endif
# endif
#endif
@@ -97,11 +99,16 @@ Xvasprintf(char **ret, const char * _X_RESTRICT_KYWD format, va_list va)
return vasprintf(ret, format, va);
#else
int size;
+
+#ifdef _MSC_VER
+ size = vsnprintf(NULL, 0, format, va);
+#else
va_list va2;
va_copy(va2, va);
size = vsnprintf(NULL, 0, format, va2);
va_end(va2);
+#endif
*ret = malloc(size + 1);
if (*ret == NULL)
diff --git a/xorg-server/os/xstrans.c b/xorg-server/os/xstrans.c
index c086e225b..dd75ab53e 100644
--- a/xorg-server/os/xstrans.c
+++ b/xorg-server/os/xstrans.c
@@ -5,4 +5,8 @@
#define TRANS_REOPEN
#define TRANS_SERVER
#define XSERV_t
+#ifndef TCPCONN
+#define TCPCONN
+#endif
+
#include <X11/Xtrans/transport.c>
diff --git a/xorg-server/randr/Makefile.am b/xorg-server/randr/Makefile.am
index de338b972..4842df89c 100644
--- a/xorg-server/randr/Makefile.am
+++ b/xorg-server/randr/Makefile.am
@@ -1,29 +1,29 @@
-noinst_LTLIBRARIES = librandr.la
-
-AM_CFLAGS = $(DIX_CFLAGS)
-
-XINERAMA_SRCS = rrxinerama.c
-
-if XORG
-sdk_HEADERS = randrstr.h rrtransform.h
-endif
-
-librandr_la_SOURCES = \
- randr.c \
- randrstr.h \
- rrcrtc.c \
- rrdispatch.c \
- rrinfo.c \
- rrmode.c \
- rroutput.c \
- rrpointer.c \
- rrproperty.c \
- rrscreen.c \
- rrsdispatch.c \
- rrtransform.h \
- rrtransform.c
-
-if XINERAMA
-librandr_la_SOURCES += ${XINERAMA_SRCS}
-endif
-
+noinst_LTLIBRARIES = librandr.la
+
+AM_CFLAGS = $(DIX_CFLAGS)
+
+XINERAMA_SRCS = rrxinerama.c
+
+if XORG
+sdk_HEADERS = randrstr.h rrtransform.h
+endif
+
+librandr_la_SOURCES = \
+ randr.c \
+ randrstr.h \
+ rrcrtc.c \
+ rrdispatch.c \
+ rrinfo.c \
+ rrmode.c \
+ rroutput.c \
+ rrpointer.c \
+ rrproperty.c \
+ rrscreen.c \
+ rrsdispatch.c \
+ rrtransform.h \
+ rrtransform.c
+
+if XINERAMA
+librandr_la_SOURCES += ${XINERAMA_SRCS}
+endif
+
diff --git a/xorg-server/randr/makefile b/xorg-server/randr/makefile
new file mode 100644
index 000000000..8dac78b7f
--- /dev/null
+++ b/xorg-server/randr/makefile
@@ -0,0 +1,26 @@
+LIBRARY=librandr
+XINERAMA=1
+
+XINERAMA_SRCS = rrxinerama.c
+
+librandr_la_SOURCES = \
+ randr.c \
+ randrstr.h \
+ rrcrtc.c \
+ rrdispatch.c \
+ rrinfo.c \
+ rrmode.c \
+ rroutput.c \
+ rrpointer.c \
+ rrproperty.c \
+ rrscreen.c \
+ rrsdispatch.c \
+ rrtransform.h \
+ rrtransform.c
+
+if XINERAMA
+librandr_la_SOURCES += ${XINERAMA_SRCS}
+endif
+
+CSRCS = $(filter %.c,$(librandr_la_SOURCES))
+
diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c
index a846ad3d1..23719f816 100644
--- a/xorg-server/randr/rrcrtc.c
+++ b/xorg-server/randr/rrcrtc.c
@@ -632,7 +632,7 @@ RRModeGetScanoutSize (RRModePtr mode, PictTransformPtr transform,
void
RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height)
{
- return RRModeGetScanoutSize (crtc->mode, &crtc->transform, width, height);
+ RRModeGetScanoutSize (crtc->mode, &crtc->transform, width, height);
}
/*
diff --git a/xorg-server/randr/rrdispatch.c b/xorg-server/randr/rrdispatch.c
index ac4d2acc1..a4927bd14 100644
--- a/xorg-server/randr/rrdispatch.c
+++ b/xorg-server/randr/rrdispatch.c
@@ -1,228 +1,228 @@
-/*
- * Copyright © 2006 Keith Packard
- *
- * 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, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include "randrstr.h"
-#include "protocol-versions.h"
-
-Bool
-RRClientKnowsRates (ClientPtr pClient)
-{
- rrClientPriv(pClient);
-
- return (pRRClient->major_version > 1 ||
- (pRRClient->major_version == 1 && pRRClient->minor_version >= 1));
-}
-
-static int
-ProcRRQueryVersion (ClientPtr client)
-{
- xRRQueryVersionReply rep = {0};
- register int n;
- REQUEST(xRRQueryVersionReq);
- rrClientPriv(client);
-
- REQUEST_SIZE_MATCH(xRRQueryVersionReq);
- pRRClient->major_version = stuff->majorVersion;
- pRRClient->minor_version = stuff->minorVersion;
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-
- if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
- (SERVER_RANDR_MAJOR_VERSION * 1000 + SERVER_RANDR_MINOR_VERSION))
- {
- rep.majorVersion = stuff->majorVersion;
- rep.minorVersion = stuff->minorVersion;
- } else
- {
- rep.majorVersion = SERVER_RANDR_MAJOR_VERSION;
- rep.minorVersion = SERVER_RANDR_MINOR_VERSION;
- }
-
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.majorVersion, n);
- swapl(&rep.minorVersion, n);
- }
- WriteToClient(client, sizeof(xRRQueryVersionReply), (char *)&rep);
- return Success;
-}
-
-static int
-ProcRRSelectInput (ClientPtr client)
-{
- REQUEST(xRRSelectInputReq);
- rrClientPriv(client);
- RRTimesPtr pTimes;
- WindowPtr pWin;
- RREventPtr pRREvent, *pHead;
- XID clientResource;
- int rc;
-
- REQUEST_SIZE_MATCH(xRRSelectInputReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess);
- if (rc != Success)
- return rc;
- rc = dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id,
- RREventType, client, DixWriteAccess);
- if (rc != Success && rc != BadValue)
- return rc;
-
- if (stuff->enable & (RRScreenChangeNotifyMask|
- RRCrtcChangeNotifyMask|
- RROutputChangeNotifyMask|
- RROutputPropertyNotifyMask))
- {
- ScreenPtr pScreen = pWin->drawable.pScreen;
- rrScrPriv (pScreen);
-
- pRREvent = NULL;
- if (pHead)
- {
- /* check for existing entry. */
- for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next)
- if (pRREvent->client == client)
- break;
- }
-
- if (!pRREvent)
- {
- /* build the entry */
- pRREvent = (RREventPtr) malloc(sizeof (RREventRec));
- if (!pRREvent)
- return BadAlloc;
- pRREvent->next = 0;
- pRREvent->client = client;
- pRREvent->window = pWin;
- pRREvent->mask = stuff->enable;
- /*
- * add a resource that will be deleted when
- * the client goes away
- */
- clientResource = FakeClientID (client->index);
- pRREvent->clientResource = clientResource;
- if (!AddResource (clientResource, RRClientType, (pointer)pRREvent))
- return BadAlloc;
- /*
- * create a resource to contain a pointer to the list
- * of clients selecting input. This must be indirect as
- * the list may be arbitrarily rearranged which cannot be
- * done through the resource database.
- */
- if (!pHead)
- {
- pHead = (RREventPtr *) malloc(sizeof (RREventPtr));
- if (!pHead ||
- !AddResource (pWin->drawable.id, RREventType, (pointer)pHead))
- {
- FreeResource (clientResource, RT_NONE);
- return BadAlloc;
- }
- *pHead = 0;
- }
- pRREvent->next = *pHead;
- *pHead = pRREvent;
- }
- /*
- * Now see if the client needs an event
- */
- if (pScrPriv && (pRREvent->mask & RRScreenChangeNotifyMask))
- {
- pTimes = &((RRTimesPtr) (pRRClient + 1))[pScreen->myNum];
- if (CompareTimeStamps (pTimes->setTime,
- pScrPriv->lastSetTime) != 0 ||
- CompareTimeStamps (pTimes->configTime,
- pScrPriv->lastConfigTime) != 0)
- {
- RRDeliverScreenEvent (client, pWin, pScreen);
- }
- }
- }
- else if (stuff->enable == 0)
- {
- /* delete the interest */
- if (pHead) {
- RREventPtr pNewRREvent = 0;
- for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next) {
- if (pRREvent->client == client)
- break;
- pNewRREvent = pRREvent;
- }
- if (pRREvent) {
- FreeResource (pRREvent->clientResource, RRClientType);
- if (pNewRREvent)
- pNewRREvent->next = pRREvent->next;
- else
- *pHead = pRREvent->next;
- free(pRREvent);
- }
- }
- }
- else
- {
- client->errorValue = stuff->enable;
- return BadValue;
- }
- return Success;
-}
-
-int (*ProcRandrVector[RRNumberRequests])(ClientPtr) = {
- ProcRRQueryVersion, /* 0 */
-/* we skip 1 to make old clients fail pretty immediately */
- NULL, /* 1 ProcRandrOldGetScreenInfo */
-/* V1.0 apps share the same set screen config request id */
- ProcRRSetScreenConfig, /* 2 */
- NULL, /* 3 ProcRandrOldScreenChangeSelectInput */
-/* 3 used to be ScreenChangeSelectInput; deprecated */
- ProcRRSelectInput, /* 4 */
- ProcRRGetScreenInfo, /* 5 */
-/* V1.2 additions */
- ProcRRGetScreenSizeRange, /* 6 */
- ProcRRSetScreenSize, /* 7 */
- ProcRRGetScreenResources, /* 8 */
- ProcRRGetOutputInfo, /* 9 */
- ProcRRListOutputProperties, /* 10 */
- ProcRRQueryOutputProperty, /* 11 */
- ProcRRConfigureOutputProperty, /* 12 */
- ProcRRChangeOutputProperty, /* 13 */
- ProcRRDeleteOutputProperty, /* 14 */
- ProcRRGetOutputProperty, /* 15 */
- ProcRRCreateMode, /* 16 */
- ProcRRDestroyMode, /* 17 */
- ProcRRAddOutputMode, /* 18 */
- ProcRRDeleteOutputMode, /* 19 */
- ProcRRGetCrtcInfo, /* 20 */
- ProcRRSetCrtcConfig, /* 21 */
- ProcRRGetCrtcGammaSize, /* 22 */
- ProcRRGetCrtcGamma, /* 23 */
- ProcRRSetCrtcGamma, /* 24 */
-/* V1.3 additions */
- ProcRRGetScreenResourcesCurrent, /* 25 */
- ProcRRSetCrtcTransform, /* 26 */
- ProcRRGetCrtcTransform, /* 27 */
- ProcRRGetPanning, /* 28 */
- ProcRRSetPanning, /* 29 */
- ProcRRSetOutputPrimary, /* 30 */
- ProcRRGetOutputPrimary, /* 31 */
-};
-
+/*
+ * Copyright © 2006 Keith Packard
+ *
+ * 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, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#include "randrstr.h"
+#include "protocol-versions.h"
+
+Bool
+RRClientKnowsRates (ClientPtr pClient)
+{
+ rrClientPriv(pClient);
+
+ return (pRRClient->major_version > 1 ||
+ (pRRClient->major_version == 1 && pRRClient->minor_version >= 1));
+}
+
+static int
+ProcRRQueryVersion (ClientPtr client)
+{
+ xRRQueryVersionReply rep = {0};
+ register int n;
+ REQUEST(xRRQueryVersionReq);
+ rrClientPriv(client);
+
+ REQUEST_SIZE_MATCH(xRRQueryVersionReq);
+ pRRClient->major_version = stuff->majorVersion;
+ pRRClient->minor_version = stuff->minorVersion;
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+
+ if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
+ (SERVER_RANDR_MAJOR_VERSION * 1000 + SERVER_RANDR_MINOR_VERSION))
+ {
+ rep.majorVersion = stuff->majorVersion;
+ rep.minorVersion = stuff->minorVersion;
+ } else
+ {
+ rep.majorVersion = SERVER_RANDR_MAJOR_VERSION;
+ rep.minorVersion = SERVER_RANDR_MINOR_VERSION;
+ }
+
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ swapl(&rep.majorVersion, n);
+ swapl(&rep.minorVersion, n);
+ }
+ WriteToClient(client, sizeof(xRRQueryVersionReply), (char *)&rep);
+ return Success;
+}
+
+static int
+ProcRRSelectInput (ClientPtr client)
+{
+ REQUEST(xRRSelectInputReq);
+ rrClientPriv(client);
+ RRTimesPtr pTimes;
+ WindowPtr pWin;
+ RREventPtr pRREvent, *pHead;
+ XID clientResource;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xRRSelectInputReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess);
+ if (rc != Success)
+ return rc;
+ rc = dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id,
+ RREventType, client, DixWriteAccess);
+ if (rc != Success && rc != BadValue)
+ return rc;
+
+ if (stuff->enable & (RRScreenChangeNotifyMask|
+ RRCrtcChangeNotifyMask|
+ RROutputChangeNotifyMask|
+ RROutputPropertyNotifyMask))
+ {
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ rrScrPriv (pScreen);
+
+ pRREvent = NULL;
+ if (pHead)
+ {
+ /* check for existing entry. */
+ for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next)
+ if (pRREvent->client == client)
+ break;
+ }
+
+ if (!pRREvent)
+ {
+ /* build the entry */
+ pRREvent = (RREventPtr) malloc(sizeof (RREventRec));
+ if (!pRREvent)
+ return BadAlloc;
+ pRREvent->next = 0;
+ pRREvent->client = client;
+ pRREvent->window = pWin;
+ pRREvent->mask = stuff->enable;
+ /*
+ * add a resource that will be deleted when
+ * the client goes away
+ */
+ clientResource = FakeClientID (client->index);
+ pRREvent->clientResource = clientResource;
+ if (!AddResource (clientResource, RRClientType, (pointer)pRREvent))
+ return BadAlloc;
+ /*
+ * create a resource to contain a pointer to the list
+ * of clients selecting input. This must be indirect as
+ * the list may be arbitrarily rearranged which cannot be
+ * done through the resource database.
+ */
+ if (!pHead)
+ {
+ pHead = (RREventPtr *) malloc(sizeof (RREventPtr));
+ if (!pHead ||
+ !AddResource (pWin->drawable.id, RREventType, (pointer)pHead))
+ {
+ FreeResource (clientResource, RT_NONE);
+ return BadAlloc;
+ }
+ *pHead = 0;
+ }
+ pRREvent->next = *pHead;
+ *pHead = pRREvent;
+ }
+ /*
+ * Now see if the client needs an event
+ */
+ if (pScrPriv && (pRREvent->mask & RRScreenChangeNotifyMask))
+ {
+ pTimes = &((RRTimesPtr) (pRRClient + 1))[pScreen->myNum];
+ if (CompareTimeStamps (pTimes->setTime,
+ pScrPriv->lastSetTime) != 0 ||
+ CompareTimeStamps (pTimes->configTime,
+ pScrPriv->lastConfigTime) != 0)
+ {
+ RRDeliverScreenEvent (client, pWin, pScreen);
+ }
+ }
+ }
+ else if (stuff->enable == 0)
+ {
+ /* delete the interest */
+ if (pHead) {
+ RREventPtr pNewRREvent = 0;
+ for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next) {
+ if (pRREvent->client == client)
+ break;
+ pNewRREvent = pRREvent;
+ }
+ if (pRREvent) {
+ FreeResource (pRREvent->clientResource, RRClientType);
+ if (pNewRREvent)
+ pNewRREvent->next = pRREvent->next;
+ else
+ *pHead = pRREvent->next;
+ free(pRREvent);
+ }
+ }
+ }
+ else
+ {
+ client->errorValue = stuff->enable;
+ return BadValue;
+ }
+ return Success;
+}
+
+int (*ProcRandrVector[RRNumberRequests])(ClientPtr) = {
+ ProcRRQueryVersion, /* 0 */
+/* we skip 1 to make old clients fail pretty immediately */
+ NULL, /* 1 ProcRandrOldGetScreenInfo */
+/* V1.0 apps share the same set screen config request id */
+ ProcRRSetScreenConfig, /* 2 */
+ NULL, /* 3 ProcRandrOldScreenChangeSelectInput */
+/* 3 used to be ScreenChangeSelectInput; deprecated */
+ ProcRRSelectInput, /* 4 */
+ ProcRRGetScreenInfo, /* 5 */
+/* V1.2 additions */
+ ProcRRGetScreenSizeRange, /* 6 */
+ ProcRRSetScreenSize, /* 7 */
+ ProcRRGetScreenResources, /* 8 */
+ ProcRRGetOutputInfo, /* 9 */
+ ProcRRListOutputProperties, /* 10 */
+ ProcRRQueryOutputProperty, /* 11 */
+ ProcRRConfigureOutputProperty, /* 12 */
+ ProcRRChangeOutputProperty, /* 13 */
+ ProcRRDeleteOutputProperty, /* 14 */
+ ProcRRGetOutputProperty, /* 15 */
+ ProcRRCreateMode, /* 16 */
+ ProcRRDestroyMode, /* 17 */
+ ProcRRAddOutputMode, /* 18 */
+ ProcRRDeleteOutputMode, /* 19 */
+ ProcRRGetCrtcInfo, /* 20 */
+ ProcRRSetCrtcConfig, /* 21 */
+ ProcRRGetCrtcGammaSize, /* 22 */
+ ProcRRGetCrtcGamma, /* 23 */
+ ProcRRSetCrtcGamma, /* 24 */
+/* V1.3 additions */
+ ProcRRGetScreenResourcesCurrent, /* 25 */
+ ProcRRSetCrtcTransform, /* 26 */
+ ProcRRGetCrtcTransform, /* 27 */
+ ProcRRGetPanning, /* 28 */
+ ProcRRSetPanning, /* 29 */
+ ProcRRSetOutputPrimary, /* 30 */
+ ProcRRGetOutputPrimary, /* 31 */
+};
+
diff --git a/xorg-server/randr/rrinfo.c b/xorg-server/randr/rrinfo.c
index fdf372607..04c1a6c98 100644
--- a/xorg-server/randr/rrinfo.c
+++ b/xorg-server/randr/rrinfo.c
@@ -1,341 +1,341 @@
-/*
- * Copyright © 2006 Keith Packard
- *
- * 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, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include "randrstr.h"
-
-#ifdef RANDR_10_INTERFACE
-static RRModePtr
-RROldModeAdd (RROutputPtr output, RRScreenSizePtr size, int refresh)
-{
- ScreenPtr pScreen = output->pScreen;
- rrScrPriv(pScreen);
- xRRModeInfo modeInfo;
- char name[100];
- RRModePtr mode;
- int i;
- RRModePtr *modes;
-
- memset (&modeInfo, '\0', sizeof (modeInfo));
- sprintf (name, "%dx%d", size->width, size->height);
-
- modeInfo.width = size->width;
- modeInfo.height = size->height;
- modeInfo.hTotal = size->width;
- modeInfo.vTotal = size->height;
- modeInfo.dotClock = ((CARD32) size->width * (CARD32) size->height *
- (CARD32) refresh);
- modeInfo.nameLength = strlen (name);
- mode = RRModeGet (&modeInfo, name);
- if (!mode)
- return NULL;
- for (i = 0; i < output->numModes; i++)
- if (output->modes[i] == mode)
- {
- RRModeDestroy (mode);
- return mode;
- }
-
- if (output->numModes)
- modes = realloc(output->modes,
- (output->numModes + 1) * sizeof (RRModePtr));
- else
- modes = malloc(sizeof (RRModePtr));
- if (!modes)
- {
- RRModeDestroy (mode);
- FreeResource (mode->mode.id, 0);
- return NULL;
- }
- modes[output->numModes++] = mode;
- output->modes = modes;
- output->changed = TRUE;
- pScrPriv->changed = TRUE;
- pScrPriv->configChanged = TRUE;
- return mode;
-}
-
-static void
-RRScanOldConfig (ScreenPtr pScreen, Rotation rotations)
-{
- rrScrPriv(pScreen);
- RROutputPtr output;
- RRCrtcPtr crtc;
- RRModePtr mode, newMode = NULL;
- int i;
- CARD16 minWidth = MAXSHORT, minHeight = MAXSHORT;
- CARD16 maxWidth = 0, maxHeight = 0;
-
- /*
- * First time through, create a crtc and output and hook
- * them together
- */
- if (pScrPriv->numOutputs == 0 &&
- pScrPriv->numCrtcs == 0)
- {
- crtc = RRCrtcCreate (pScreen, NULL);
- if (!crtc)
- return;
- output = RROutputCreate (pScreen, "default", 7, NULL);
- if (!output)
- return;
- RROutputSetCrtcs (output, &crtc, 1);
- RROutputSetConnection (output, RR_Connected);
- RROutputSetSubpixelOrder (output, PictureGetSubpixelOrder (pScreen));
- }
-
- output = pScrPriv->outputs[0];
- if (!output)
- return;
- crtc = pScrPriv->crtcs[0];
- if (!crtc)
- return;
-
- /* check rotations */
- if (rotations != crtc->rotations)
- {
- crtc->rotations = rotations;
- crtc->changed = TRUE;
- pScrPriv->changed = TRUE;
- }
-
- /* regenerate mode list */
- for (i = 0; i < pScrPriv->nSizes; i++)
- {
- RRScreenSizePtr size = &pScrPriv->pSizes[i];
- int r;
-
- if (size->nRates)
- {
- for (r = 0; r < size->nRates; r++)
- {
- mode = RROldModeAdd (output, size, size->pRates[r].rate);
- if (i == pScrPriv->size &&
- size->pRates[r].rate == pScrPriv->rate)
- {
- newMode = mode;
- }
- }
- free(size->pRates);
- }
- else
- {
- mode = RROldModeAdd (output, size, 0);
- if (i == pScrPriv->size)
- newMode = mode;
- }
- }
- if (pScrPriv->nSizes)
- free(pScrPriv->pSizes);
- pScrPriv->pSizes = NULL;
- pScrPriv->nSizes = 0;
-
- /* find size bounds */
- for (i = 0; i < output->numModes + output->numUserModes; i++)
- {
- RRModePtr mode = (i < output->numModes ?
- output->modes[i] :
- output->userModes[i-output->numModes]);
- CARD16 width = mode->mode.width;
- CARD16 height = mode->mode.height;
-
- if (width < minWidth) minWidth = width;
- if (width > maxWidth) maxWidth = width;
- if (height < minHeight) minHeight = height;
- if (height > maxHeight) maxHeight = height;
- }
-
- RRScreenSetSizeRange (pScreen, minWidth, minHeight, maxWidth, maxHeight);
-
- /* notice current mode */
- if (newMode)
- RRCrtcNotify (crtc, newMode, 0, 0, pScrPriv->rotation,
- NULL, 1, &output);
-}
-#endif
-
-/*
- * Poll the driver for changed information
- */
-Bool
-RRGetInfo (ScreenPtr pScreen, Bool force_query)
-{
- rrScrPriv (pScreen);
- Rotation rotations;
- int i;
-
- /* Return immediately if we don't need to re-query and we already have the
- * information.
- */
- if (!force_query) {
- if (pScrPriv->numCrtcs != 0 || pScrPriv->numOutputs != 0)
- return TRUE;
- }
-
- for (i = 0; i < pScrPriv->numOutputs; i++)
- pScrPriv->outputs[i]->changed = FALSE;
- for (i = 0; i < pScrPriv->numCrtcs; i++)
- pScrPriv->crtcs[i]->changed = FALSE;
-
- rotations = 0;
- pScrPriv->changed = FALSE;
- pScrPriv->configChanged = FALSE;
-
- if (!(*pScrPriv->rrGetInfo) (pScreen, &rotations))
- return FALSE;
-
-#if RANDR_10_INTERFACE
- if (pScrPriv->nSizes)
- RRScanOldConfig (pScreen, rotations);
-#endif
- RRTellChanged (pScreen);
- return TRUE;
-}
-
-/*
- * Register the range of sizes for the screen
- */
-void
-RRScreenSetSizeRange (ScreenPtr pScreen,
- CARD16 minWidth,
- CARD16 minHeight,
- CARD16 maxWidth,
- CARD16 maxHeight)
-{
- rrScrPriv (pScreen);
-
- if (!pScrPriv)
- return;
- if (pScrPriv->minWidth == minWidth && pScrPriv->minHeight == minHeight &&
- pScrPriv->maxWidth == maxWidth && pScrPriv->maxHeight == maxHeight)
- {
- return;
- }
-
- pScrPriv->minWidth = minWidth;
- pScrPriv->minHeight = minHeight;
- pScrPriv->maxWidth = maxWidth;
- pScrPriv->maxHeight = maxHeight;
- pScrPriv->changed = TRUE;
- pScrPriv->configChanged = TRUE;
-}
-
-#ifdef RANDR_10_INTERFACE
-static Bool
-RRScreenSizeMatches (RRScreenSizePtr a,
- RRScreenSizePtr b)
-{
- if (a->width != b->width)
- return FALSE;
- if (a->height != b->height)
- return FALSE;
- if (a->mmWidth != b->mmWidth)
- return FALSE;
- if (a->mmHeight != b->mmHeight)
- return FALSE;
- return TRUE;
-}
-
-RRScreenSizePtr
-RRRegisterSize (ScreenPtr pScreen,
- short width,
- short height,
- short mmWidth,
- short mmHeight)
-{
- rrScrPriv (pScreen);
- int i;
- RRScreenSize tmp;
- RRScreenSizePtr pNew;
-
- if (!pScrPriv)
- return 0;
-
- tmp.id = 0;
- tmp.width = width;
- tmp.height= height;
- tmp.mmWidth = mmWidth;
- tmp.mmHeight = mmHeight;
- tmp.pRates = 0;
- tmp.nRates = 0;
- for (i = 0; i < pScrPriv->nSizes; i++)
- if (RRScreenSizeMatches (&tmp, &pScrPriv->pSizes[i]))
- return &pScrPriv->pSizes[i];
- pNew = realloc(pScrPriv->pSizes,
- (pScrPriv->nSizes + 1) * sizeof (RRScreenSize));
- if (!pNew)
- return 0;
- pNew[pScrPriv->nSizes++] = tmp;
- pScrPriv->pSizes = pNew;
- return &pNew[pScrPriv->nSizes-1];
-}
-
-Bool RRRegisterRate (ScreenPtr pScreen,
- RRScreenSizePtr pSize,
- int rate)
-{
- rrScrPriv(pScreen);
- int i;
- RRScreenRatePtr pNew, pRate;
-
- if (!pScrPriv)
- return FALSE;
-
- for (i = 0; i < pSize->nRates; i++)
- if (pSize->pRates[i].rate == rate)
- return TRUE;
-
- pNew = realloc(pSize->pRates,
- (pSize->nRates + 1) * sizeof (RRScreenRate));
- if (!pNew)
- return FALSE;
- pRate = &pNew[pSize->nRates++];
- pRate->rate = rate;
- pSize->pRates = pNew;
- return TRUE;
-}
-
-Rotation
-RRGetRotation(ScreenPtr pScreen)
-{
- RROutputPtr output = RRFirstOutput (pScreen);
-
- if (!output)
- return RR_Rotate_0;
-
- return output->crtc->rotation;
-}
-
-void
-RRSetCurrentConfig (ScreenPtr pScreen,
- Rotation rotation,
- int rate,
- RRScreenSizePtr pSize)
-{
- rrScrPriv (pScreen);
-
- if (!pScrPriv)
- return;
- pScrPriv->size = pSize - pScrPriv->pSizes;
- pScrPriv->rotation = rotation;
- pScrPriv->rate = rate;
-}
-#endif
+/*
+ * Copyright © 2006 Keith Packard
+ *
+ * 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, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#include "randrstr.h"
+
+#ifdef RANDR_10_INTERFACE
+static RRModePtr
+RROldModeAdd (RROutputPtr output, RRScreenSizePtr size, int refresh)
+{
+ ScreenPtr pScreen = output->pScreen;
+ rrScrPriv(pScreen);
+ xRRModeInfo modeInfo;
+ char name[100];
+ RRModePtr mode;
+ int i;
+ RRModePtr *modes;
+
+ memset (&modeInfo, '\0', sizeof (modeInfo));
+ sprintf (name, "%dx%d", size->width, size->height);
+
+ modeInfo.width = size->width;
+ modeInfo.height = size->height;
+ modeInfo.hTotal = size->width;
+ modeInfo.vTotal = size->height;
+ modeInfo.dotClock = ((CARD32) size->width * (CARD32) size->height *
+ (CARD32) refresh);
+ modeInfo.nameLength = strlen (name);
+ mode = RRModeGet (&modeInfo, name);
+ if (!mode)
+ return NULL;
+ for (i = 0; i < output->numModes; i++)
+ if (output->modes[i] == mode)
+ {
+ RRModeDestroy (mode);
+ return mode;
+ }
+
+ if (output->numModes)
+ modes = realloc(output->modes,
+ (output->numModes + 1) * sizeof (RRModePtr));
+ else
+ modes = malloc(sizeof (RRModePtr));
+ if (!modes)
+ {
+ RRModeDestroy (mode);
+ FreeResource (mode->mode.id, 0);
+ return NULL;
+ }
+ modes[output->numModes++] = mode;
+ output->modes = modes;
+ output->changed = TRUE;
+ pScrPriv->changed = TRUE;
+ pScrPriv->configChanged = TRUE;
+ return mode;
+}
+
+static void
+RRScanOldConfig (ScreenPtr pScreen, Rotation rotations)
+{
+ rrScrPriv(pScreen);
+ RROutputPtr output;
+ RRCrtcPtr crtc;
+ RRModePtr mode, newMode = NULL;
+ int i;
+ CARD16 minWidth = MAXSHORT, minHeight = MAXSHORT;
+ CARD16 maxWidth = 0, maxHeight = 0;
+
+ /*
+ * First time through, create a crtc and output and hook
+ * them together
+ */
+ if (pScrPriv->numOutputs == 0 &&
+ pScrPriv->numCrtcs == 0)
+ {
+ crtc = RRCrtcCreate (pScreen, NULL);
+ if (!crtc)
+ return;
+ output = RROutputCreate (pScreen, "default", 7, NULL);
+ if (!output)
+ return;
+ RROutputSetCrtcs (output, &crtc, 1);
+ RROutputSetConnection (output, RR_Connected);
+ RROutputSetSubpixelOrder (output, PictureGetSubpixelOrder (pScreen));
+ }
+
+ output = pScrPriv->outputs[0];
+ if (!output)
+ return;
+ crtc = pScrPriv->crtcs[0];
+ if (!crtc)
+ return;
+
+ /* check rotations */
+ if (rotations != crtc->rotations)
+ {
+ crtc->rotations = rotations;
+ crtc->changed = TRUE;
+ pScrPriv->changed = TRUE;
+ }
+
+ /* regenerate mode list */
+ for (i = 0; i < pScrPriv->nSizes; i++)
+ {
+ RRScreenSizePtr size = &pScrPriv->pSizes[i];
+ int r;
+
+ if (size->nRates)
+ {
+ for (r = 0; r < size->nRates; r++)
+ {
+ mode = RROldModeAdd (output, size, size->pRates[r].rate);
+ if (i == pScrPriv->size &&
+ size->pRates[r].rate == pScrPriv->rate)
+ {
+ newMode = mode;
+ }
+ }
+ free(size->pRates);
+ }
+ else
+ {
+ mode = RROldModeAdd (output, size, 0);
+ if (i == pScrPriv->size)
+ newMode = mode;
+ }
+ }
+ if (pScrPriv->nSizes)
+ free(pScrPriv->pSizes);
+ pScrPriv->pSizes = NULL;
+ pScrPriv->nSizes = 0;
+
+ /* find size bounds */
+ for (i = 0; i < output->numModes + output->numUserModes; i++)
+ {
+ RRModePtr mode = (i < output->numModes ?
+ output->modes[i] :
+ output->userModes[i-output->numModes]);
+ CARD16 width = mode->mode.width;
+ CARD16 height = mode->mode.height;
+
+ if (width < minWidth) minWidth = width;
+ if (width > maxWidth) maxWidth = width;
+ if (height < minHeight) minHeight = height;
+ if (height > maxHeight) maxHeight = height;
+ }
+
+ RRScreenSetSizeRange (pScreen, minWidth, minHeight, maxWidth, maxHeight);
+
+ /* notice current mode */
+ if (newMode)
+ RRCrtcNotify (crtc, newMode, 0, 0, pScrPriv->rotation,
+ NULL, 1, &output);
+}
+#endif
+
+/*
+ * Poll the driver for changed information
+ */
+Bool
+RRGetInfo (ScreenPtr pScreen, Bool force_query)
+{
+ rrScrPriv (pScreen);
+ Rotation rotations;
+ int i;
+
+ /* Return immediately if we don't need to re-query and we already have the
+ * information.
+ */
+ if (!force_query) {
+ if (pScrPriv->numCrtcs != 0 || pScrPriv->numOutputs != 0)
+ return TRUE;
+ }
+
+ for (i = 0; i < pScrPriv->numOutputs; i++)
+ pScrPriv->outputs[i]->changed = FALSE;
+ for (i = 0; i < pScrPriv->numCrtcs; i++)
+ pScrPriv->crtcs[i]->changed = FALSE;
+
+ rotations = 0;
+ pScrPriv->changed = FALSE;
+ pScrPriv->configChanged = FALSE;
+
+ if (!(*pScrPriv->rrGetInfo) (pScreen, &rotations))
+ return FALSE;
+
+#if RANDR_10_INTERFACE
+ if (pScrPriv->nSizes)
+ RRScanOldConfig (pScreen, rotations);
+#endif
+ RRTellChanged (pScreen);
+ return TRUE;
+}
+
+/*
+ * Register the range of sizes for the screen
+ */
+void
+RRScreenSetSizeRange (ScreenPtr pScreen,
+ CARD16 minWidth,
+ CARD16 minHeight,
+ CARD16 maxWidth,
+ CARD16 maxHeight)
+{
+ rrScrPriv (pScreen);
+
+ if (!pScrPriv)
+ return;
+ if (pScrPriv->minWidth == minWidth && pScrPriv->minHeight == minHeight &&
+ pScrPriv->maxWidth == maxWidth && pScrPriv->maxHeight == maxHeight)
+ {
+ return;
+ }
+
+ pScrPriv->minWidth = minWidth;
+ pScrPriv->minHeight = minHeight;
+ pScrPriv->maxWidth = maxWidth;
+ pScrPriv->maxHeight = maxHeight;
+ pScrPriv->changed = TRUE;
+ pScrPriv->configChanged = TRUE;
+}
+
+#ifdef RANDR_10_INTERFACE
+static Bool
+RRScreenSizeMatches (RRScreenSizePtr a,
+ RRScreenSizePtr b)
+{
+ if (a->width != b->width)
+ return FALSE;
+ if (a->height != b->height)
+ return FALSE;
+ if (a->mmWidth != b->mmWidth)
+ return FALSE;
+ if (a->mmHeight != b->mmHeight)
+ return FALSE;
+ return TRUE;
+}
+
+RRScreenSizePtr
+RRRegisterSize (ScreenPtr pScreen,
+ short width,
+ short height,
+ short mmWidth,
+ short mmHeight)
+{
+ rrScrPriv (pScreen);
+ int i;
+ RRScreenSize tmp;
+ RRScreenSizePtr pNew;
+
+ if (!pScrPriv)
+ return 0;
+
+ tmp.id = 0;
+ tmp.width = width;
+ tmp.height= height;
+ tmp.mmWidth = mmWidth;
+ tmp.mmHeight = mmHeight;
+ tmp.pRates = 0;
+ tmp.nRates = 0;
+ for (i = 0; i < pScrPriv->nSizes; i++)
+ if (RRScreenSizeMatches (&tmp, &pScrPriv->pSizes[i]))
+ return &pScrPriv->pSizes[i];
+ pNew = realloc(pScrPriv->pSizes,
+ (pScrPriv->nSizes + 1) * sizeof (RRScreenSize));
+ if (!pNew)
+ return 0;
+ pNew[pScrPriv->nSizes++] = tmp;
+ pScrPriv->pSizes = pNew;
+ return &pNew[pScrPriv->nSizes-1];
+}
+
+Bool RRRegisterRate (ScreenPtr pScreen,
+ RRScreenSizePtr pSize,
+ int rate)
+{
+ rrScrPriv(pScreen);
+ int i;
+ RRScreenRatePtr pNew, pRate;
+
+ if (!pScrPriv)
+ return FALSE;
+
+ for (i = 0; i < pSize->nRates; i++)
+ if (pSize->pRates[i].rate == rate)
+ return TRUE;
+
+ pNew = realloc(pSize->pRates,
+ (pSize->nRates + 1) * sizeof (RRScreenRate));
+ if (!pNew)
+ return FALSE;
+ pRate = &pNew[pSize->nRates++];
+ pRate->rate = rate;
+ pSize->pRates = pNew;
+ return TRUE;
+}
+
+Rotation
+RRGetRotation(ScreenPtr pScreen)
+{
+ RROutputPtr output = RRFirstOutput (pScreen);
+
+ if (!output)
+ return RR_Rotate_0;
+
+ return output->crtc->rotation;
+}
+
+void
+RRSetCurrentConfig (ScreenPtr pScreen,
+ Rotation rotation,
+ int rate,
+ RRScreenSizePtr pSize)
+{
+ rrScrPriv (pScreen);
+
+ if (!pScrPriv)
+ return;
+ pScrPriv->size = pSize - pScrPriv->pSizes;
+ pScrPriv->rotation = rotation;
+ pScrPriv->rate = rate;
+}
+#endif
diff --git a/xorg-server/randr/rrscreen.c b/xorg-server/randr/rrscreen.c
index 1bc1a9ea1..7877aec11 100644
--- a/xorg-server/randr/rrscreen.c
+++ b/xorg-server/randr/rrscreen.c
@@ -1,1013 +1,1013 @@
-/*
- * Copyright © 2006 Keith Packard
- *
- * 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, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include "randrstr.h"
-
-static const int padlength[4] = {0, 3, 2, 1};
-
-static CARD16
-RR10CurrentSizeID (ScreenPtr pScreen);
-
-/*
- * Edit connection information block so that new clients
- * see the current screen size on connect
- */
-static void
-RREditConnectionInfo (ScreenPtr pScreen)
-{
- xConnSetup *connSetup;
- char *vendor;
- xPixmapFormat *formats;
- xWindowRoot *root;
- xDepth *depth;
- xVisualType *visual;
- int screen = 0;
- int d;
-
- connSetup = (xConnSetup *) ConnectionInfo;
- vendor = (char *) connSetup + sizeof (xConnSetup);
- formats = (xPixmapFormat *) ((char *) vendor +
- connSetup->nbytesVendor +
- padlength[connSetup->nbytesVendor & 3]);
- root = (xWindowRoot *) ((char *) formats +
- sizeof (xPixmapFormat) * screenInfo.numPixmapFormats);
- while (screen != pScreen->myNum)
- {
- depth = (xDepth *) ((char *) root +
- sizeof (xWindowRoot));
- for (d = 0; d < root->nDepths; d++)
- {
- visual = (xVisualType *) ((char *) depth +
- sizeof (xDepth));
- depth = (xDepth *) ((char *) visual +
- depth->nVisuals * sizeof (xVisualType));
- }
- root = (xWindowRoot *) ((char *) depth);
- screen++;
- }
- root->pixWidth = pScreen->width;
- root->pixHeight = pScreen->height;
- root->mmWidth = pScreen->mmWidth;
- root->mmHeight = pScreen->mmHeight;
-}
-
-void
-RRSendConfigNotify (ScreenPtr pScreen)
-{
- WindowPtr pWin = pScreen->root;
- xEvent event;
-
- event.u.u.type = ConfigureNotify;
- event.u.configureNotify.window = pWin->drawable.id;
- event.u.configureNotify.aboveSibling = None;
- event.u.configureNotify.x = 0;
- event.u.configureNotify.y = 0;
-
- /* XXX xinerama stuff ? */
-
- event.u.configureNotify.width = pWin->drawable.width;
- event.u.configureNotify.height = pWin->drawable.height;
- event.u.configureNotify.borderWidth = wBorderWidth (pWin);
- event.u.configureNotify.override = pWin->overrideRedirect;
- DeliverEvents(pWin, &event, 1, NullWindow);
-}
-
-void
-RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen)
-{
- rrScrPriv (pScreen);
- xRRScreenChangeNotifyEvent se;
- RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL;
- WindowPtr pRoot = pScreen->root;
-
- se.type = RRScreenChangeNotify + RREventBase;
- se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0);
- se.timestamp = pScrPriv->lastSetTime.milliseconds;
- se.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
- se.root = pRoot->drawable.id;
- se.window = pWin->drawable.id;
- se.subpixelOrder = PictureGetSubpixelOrder (pScreen);
-
- se.sizeID = RR10CurrentSizeID (pScreen);
-
- if (se.rotation & (RR_Rotate_90 | RR_Rotate_270)) {
- se.widthInPixels = pScreen->height;
- se.heightInPixels = pScreen->width;
- se.widthInMillimeters = pScreen->mmHeight;
- se.heightInMillimeters = pScreen->mmWidth;
- } else {
- se.widthInPixels = pScreen->width;
- se.heightInPixels = pScreen->height;
- se.widthInMillimeters = pScreen->mmWidth;
- se.heightInMillimeters = pScreen->mmHeight;
- }
-
- WriteEventsToClient (client, 1, (xEvent *) &se);
-}
-
-/*
- * Notify the extension that the screen size has been changed.
- * The driver is responsible for calling this whenever it has changed
- * the size of the screen
- */
-void
-RRScreenSizeNotify (ScreenPtr pScreen)
-{
- rrScrPriv(pScreen);
- /*
- * Deliver ConfigureNotify events when root changes
- * pixel size
- */
- if (pScrPriv->width == pScreen->width &&
- pScrPriv->height == pScreen->height &&
- pScrPriv->mmWidth == pScreen->mmWidth &&
- pScrPriv->mmHeight == pScreen->mmHeight)
- return;
-
- pScrPriv->width = pScreen->width;
- pScrPriv->height = pScreen->height;
- pScrPriv->mmWidth = pScreen->mmWidth;
- pScrPriv->mmHeight = pScreen->mmHeight;
- pScrPriv->changed = TRUE;
-/* pScrPriv->sizeChanged = TRUE; */
-
- RRTellChanged (pScreen);
- RRSendConfigNotify (pScreen);
- RREditConnectionInfo (pScreen);
-
- RRPointerScreenConfigured (pScreen);
- /*
- * Fix pointer bounds and location
- */
- ScreenRestructured (pScreen);
-}
-
-/*
- * Request that the screen be resized
- */
-Bool
-RRScreenSizeSet (ScreenPtr pScreen,
- CARD16 width,
- CARD16 height,
- CARD32 mmWidth,
- CARD32 mmHeight)
-{
- rrScrPriv(pScreen);
-
-#if RANDR_12_INTERFACE
- if (pScrPriv->rrScreenSetSize)
- {
- return (*pScrPriv->rrScreenSetSize) (pScreen,
- width, height,
- mmWidth, mmHeight);
- }
-#endif
-#if RANDR_10_INTERFACE
- if (pScrPriv->rrSetConfig)
- {
- return TRUE; /* can't set size separately */
- }
-#endif
- return FALSE;
-}
-
-/*
- * Retrieve valid screen size range
- */
-int
-ProcRRGetScreenSizeRange (ClientPtr client)
-{
- REQUEST(xRRGetScreenSizeRangeReq);
- xRRGetScreenSizeRangeReply rep;
- WindowPtr pWin;
- ScreenPtr pScreen;
- rrScrPrivPtr pScrPriv;
- int rc;
-
- REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- pScreen = pWin->drawable.pScreen;
- pScrPriv = rrGetScrPriv(pScreen);
-
- rep.type = X_Reply;
- rep.pad = 0;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
-
- if (pScrPriv)
- {
- if (!RRGetInfo (pScreen, FALSE))
- return BadAlloc;
- rep.minWidth = pScrPriv->minWidth;
- rep.minHeight = pScrPriv->minHeight;
- rep.maxWidth = pScrPriv->maxWidth;
- rep.maxHeight = pScrPriv->maxHeight;
- }
- else
- {
- rep.maxWidth = rep.minWidth = pScreen->width;
- rep.maxHeight = rep.minHeight = pScreen->height;
- }
- if (client->swapped)
- {
- int n;
-
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swaps(&rep.minWidth, n);
- swaps(&rep.minHeight, n);
- swaps(&rep.maxWidth, n);
- swaps(&rep.maxHeight, n);
- }
- WriteToClient(client, sizeof(xRRGetScreenSizeRangeReply), (char *)&rep);
- return Success;
-}
-
-int
-ProcRRSetScreenSize (ClientPtr client)
-{
- REQUEST(xRRSetScreenSizeReq);
- WindowPtr pWin;
- ScreenPtr pScreen;
- rrScrPrivPtr pScrPriv;
- int i, rc;
-
- REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- pScreen = pWin->drawable.pScreen;
- pScrPriv = rrGetScrPriv(pScreen);
- if (stuff->width < pScrPriv->minWidth || pScrPriv->maxWidth < stuff->width)
- {
- client->errorValue = stuff->width;
- return BadValue;
- }
- if (stuff->height < pScrPriv->minHeight ||
- pScrPriv->maxHeight < stuff->height)
- {
- client->errorValue = stuff->height;
- return BadValue;
- }
- for (i = 0; i < pScrPriv->numCrtcs; i++)
- {
- RRCrtcPtr crtc = pScrPriv->crtcs[i];
- RRModePtr mode = crtc->mode;
- if (mode)
- {
- int source_width = mode->mode.width;
- int source_height = mode->mode.height;
- Rotation rotation = crtc->rotation;
-
- if (rotation == RR_Rotate_90 || rotation == RR_Rotate_270)
- {
- source_width = mode->mode.height;
- source_height = mode->mode.width;
- }
-
- if (crtc->x + source_width > stuff->width ||
- crtc->y + source_height > stuff->height)
- return BadMatch;
- }
- }
- if (stuff->widthInMillimeters == 0 || stuff->heightInMillimeters == 0)
- {
- client->errorValue = 0;
- return BadValue;
- }
- if (!RRScreenSizeSet (pScreen,
- stuff->width, stuff->height,
- stuff->widthInMillimeters,
- stuff->heightInMillimeters))
- {
- return BadMatch;
- }
- return Success;
-}
-
-static int
-rrGetScreenResources(ClientPtr client, Bool query)
-{
- REQUEST(xRRGetScreenResourcesReq);
- xRRGetScreenResourcesReply rep;
- WindowPtr pWin;
- ScreenPtr pScreen;
- rrScrPrivPtr pScrPriv;
- CARD8 *extra;
- unsigned long extraLen;
- int i, n, rc, has_primary = 0;
- RRCrtc *crtcs;
- RROutput *outputs;
- xRRModeInfo *modeinfos;
- CARD8 *names;
-
- REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- pScreen = pWin->drawable.pScreen;
- pScrPriv = rrGetScrPriv(pScreen);
- rep.pad = 0;
-
- if (query && pScrPriv)
- if (!RRGetInfo (pScreen, query))
- return BadAlloc;
-
- if (!pScrPriv)
- {
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.timestamp = currentTime.milliseconds;
- rep.configTimestamp = currentTime.milliseconds;
- rep.nCrtcs = 0;
- rep.nOutputs = 0;
- rep.nModes = 0;
- rep.nbytesNames = 0;
- extra = NULL;
- extraLen = 0;
- }
- else
- {
- RRModePtr *modes;
- int num_modes;
-
- modes = RRModesForScreen (pScreen, &num_modes);
- if (!modes)
- return BadAlloc;
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.timestamp = pScrPriv->lastSetTime.milliseconds;
- rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
- rep.nCrtcs = pScrPriv->numCrtcs;
- rep.nOutputs = pScrPriv->numOutputs;
- rep.nModes = num_modes;
- rep.nbytesNames = 0;
-
- for (i = 0; i < num_modes; i++)
- rep.nbytesNames += modes[i]->mode.nameLength;
-
- rep.length = (pScrPriv->numCrtcs +
- pScrPriv->numOutputs +
- num_modes * bytes_to_int32(SIZEOF(xRRModeInfo)) +
- bytes_to_int32(rep.nbytesNames));
-
- extraLen = rep.length << 2;
- if (extraLen)
- {
- extra = malloc(extraLen);
- if (!extra)
- {
- free(modes);
- return BadAlloc;
- }
- }
- else
- extra = NULL;
-
- crtcs = (RRCrtc *) extra;
- outputs = (RROutput *) (crtcs + pScrPriv->numCrtcs);
- modeinfos = (xRRModeInfo *) (outputs + pScrPriv->numOutputs);
- names = (CARD8 *) (modeinfos + num_modes);
-
- if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
- {
- has_primary = 1;
- crtcs[0] = pScrPriv->primaryOutput->crtc->id;
- if (client->swapped)
- swapl (&crtcs[0], n);
- }
-
- for (i = 0; i < pScrPriv->numCrtcs; i++)
- {
- if (has_primary &&
- pScrPriv->primaryOutput->crtc == pScrPriv->crtcs[i])
- {
- has_primary = 0;
- continue;
- }
- crtcs[i + has_primary] = pScrPriv->crtcs[i]->id;
- if (client->swapped)
- swapl (&crtcs[i + has_primary], n);
- }
-
- for (i = 0; i < pScrPriv->numOutputs; i++)
- {
- outputs[i] = pScrPriv->outputs[i]->id;
- if (client->swapped)
- swapl (&outputs[i], n);
- }
-
- for (i = 0; i < num_modes; i++)
- {
- RRModePtr mode = modes[i];
- modeinfos[i] = mode->mode;
- if (client->swapped)
- {
- swapl (&modeinfos[i].id, n);
- swaps (&modeinfos[i].width, n);
- swaps (&modeinfos[i].height, n);
- swapl (&modeinfos[i].dotClock, n);
- swaps (&modeinfos[i].hSyncStart, n);
- swaps (&modeinfos[i].hSyncEnd, n);
- swaps (&modeinfos[i].hTotal, n);
- swaps (&modeinfos[i].hSkew, n);
- swaps (&modeinfos[i].vSyncStart, n);
- swaps (&modeinfos[i].vSyncEnd, n);
- swaps (&modeinfos[i].vTotal, n);
- swaps (&modeinfos[i].nameLength, n);
- swapl (&modeinfos[i].modeFlags, n);
- }
- memcpy (names, mode->name,
- mode->mode.nameLength);
- names += mode->mode.nameLength;
- }
- free(modes);
- assert (bytes_to_int32((char *) names - (char *) extra) == rep.length);
- }
-
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.timestamp, n);
- swapl(&rep.configTimestamp, n);
- swaps(&rep.nCrtcs, n);
- swaps(&rep.nOutputs, n);
- swaps(&rep.nModes, n);
- swaps(&rep.nbytesNames, n);
- }
- WriteToClient(client, sizeof(xRRGetScreenResourcesReply), (char *)&rep);
- if (extraLen)
- {
- WriteToClient (client, extraLen, (char *) extra);
- free(extra);
- }
- return Success;
-}
-
-int
-ProcRRGetScreenResources (ClientPtr client)
-{
- return rrGetScreenResources(client, TRUE);
-}
-
-int
-ProcRRGetScreenResourcesCurrent (ClientPtr client)
-{
- return rrGetScreenResources(client, FALSE);
-}
-
-typedef struct _RR10Data {
- RRScreenSizePtr sizes;
- int nsize;
- int nrefresh;
- int size;
- CARD16 refresh;
-} RR10DataRec, *RR10DataPtr;
-
-/*
- * Convert 1.2 monitor data into 1.0 screen data
- */
-static RR10DataPtr
-RR10GetData (ScreenPtr pScreen, RROutputPtr output)
-{
- RR10DataPtr data;
- RRScreenSizePtr size;
- int nmode = output->numModes + output->numUserModes;
- int o, os, l, r;
- RRScreenRatePtr refresh;
- CARD16 vRefresh;
- RRModePtr mode;
- Bool *used;
-
- /* Make sure there is plenty of space for any combination */
- data = malloc (sizeof (RR10DataRec) +
- sizeof (RRScreenSize) * nmode +
- sizeof (RRScreenRate) * nmode +
- sizeof (Bool) * nmode);
- if (!data)
- return NULL;
- size = (RRScreenSizePtr) (data + 1);
- refresh = (RRScreenRatePtr) (size + nmode);
- used = (Bool *) (refresh + nmode);
- memset (used, '\0', sizeof (Bool) * nmode);
- data->sizes = size;
- data->nsize = 0;
- data->nrefresh = 0;
- data->size = 0;
- data->refresh = 0;
-
- /*
- * find modes not yet listed
- */
- for (o = 0; o < output->numModes + output->numUserModes; o++)
- {
- if (used[o]) continue;
-
- if (o < output->numModes)
- mode = output->modes[o];
- else
- mode = output->userModes[o - output->numModes];
-
- l = data->nsize;
- size[l].id = data->nsize;
- size[l].width = mode->mode.width;
- size[l].height = mode->mode.height;
- if (output->mmWidth && output->mmHeight) {
- size[l].mmWidth = output->mmWidth;
- size[l].mmHeight = output->mmHeight;
- } else {
- size[l].mmWidth = pScreen->mmWidth;
- size[l].mmHeight = pScreen->mmHeight;
- }
- size[l].nRates = 0;
- size[l].pRates = &refresh[data->nrefresh];
- data->nsize++;
-
- /*
- * Find all modes with matching size
- */
- for (os = o; os < output->numModes + output->numUserModes; os++)
- {
- if (os < output->numModes)
- mode = output->modes[os];
- else
- mode = output->userModes[os - output->numModes];
- if (mode->mode.width == size[l].width &&
- mode->mode.height == size[l].height)
- {
- vRefresh = RRVerticalRefresh (&mode->mode);
- used[os] = TRUE;
-
- for (r = 0; r < size[l].nRates; r++)
- if (vRefresh == size[l].pRates[r].rate)
- break;
- if (r == size[l].nRates)
- {
- size[l].pRates[r].rate = vRefresh;
- size[l].pRates[r].mode = mode;
- size[l].nRates++;
- data->nrefresh++;
- }
- if (mode == output->crtc->mode)
- {
- data->size = l;
- data->refresh = vRefresh;
- }
- }
- }
- }
- return data;
-}
-
-int
-ProcRRGetScreenInfo (ClientPtr client)
-{
- REQUEST(xRRGetScreenInfoReq);
- xRRGetScreenInfoReply rep;
- WindowPtr pWin;
- int n, rc;
- ScreenPtr pScreen;
- rrScrPrivPtr pScrPriv;
- CARD8 *extra;
- unsigned long extraLen;
- RROutputPtr output;
-
- REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- pScreen = pWin->drawable.pScreen;
- pScrPriv = rrGetScrPriv(pScreen);
- rep.pad = 0;
-
- if (pScrPriv)
- if (!RRGetInfo (pScreen, TRUE))
- return BadAlloc;
-
- output = RRFirstOutput (pScreen);
-
- if (!pScrPriv || !output)
- {
- rep.type = X_Reply;
- rep.setOfRotations = RR_Rotate_0;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.root = pWin->drawable.pScreen->root->drawable.id;
- rep.timestamp = currentTime.milliseconds;
- rep.configTimestamp = currentTime.milliseconds;
- rep.nSizes = 0;
- rep.sizeID = 0;
- rep.rotation = RR_Rotate_0;
- rep.rate = 0;
- rep.nrateEnts = 0;
- extra = 0;
- extraLen = 0;
- }
- else
- {
- int i, j;
- xScreenSizes *size;
- CARD16 *rates;
- CARD8 *data8;
- Bool has_rate = RRClientKnowsRates (client);
- RR10DataPtr pData;
- RRScreenSizePtr pSize;
-
- pData = RR10GetData (pScreen, output);
- if (!pData)
- return BadAlloc;
-
- rep.type = X_Reply;
- rep.setOfRotations = output->crtc->rotations;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.root = pWin->drawable.pScreen->root->drawable.id;
- rep.timestamp = pScrPriv->lastSetTime.milliseconds;
- rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
- rep.rotation = output->crtc->rotation;
- rep.nSizes = pData->nsize;
- rep.nrateEnts = pData->nrefresh + pData->nsize;
- rep.sizeID = pData->size;
- rep.rate = pData->refresh;
-
- extraLen = rep.nSizes * sizeof (xScreenSizes);
- if (has_rate)
- extraLen += rep.nrateEnts * sizeof (CARD16);
-
- if (extraLen)
- {
- extra = (CARD8 *) malloc(extraLen);
- if (!extra)
- {
- free(pData);
- return BadAlloc;
- }
- }
- else
- extra = NULL;
-
- /*
- * First comes the size information
- */
- size = (xScreenSizes *) extra;
- rates = (CARD16 *) (size + rep.nSizes);
- for (i = 0; i < pData->nsize; i++)
- {
- pSize = &pData->sizes[i];
- size->widthInPixels = pSize->width;
- size->heightInPixels = pSize->height;
- size->widthInMillimeters = pSize->mmWidth;
- size->heightInMillimeters = pSize->mmHeight;
- if (client->swapped)
- {
- swaps (&size->widthInPixels, n);
- swaps (&size->heightInPixels, n);
- swaps (&size->widthInMillimeters, n);
- swaps (&size->heightInMillimeters, n);
- }
- size++;
- if (has_rate)
- {
- *rates = pSize->nRates;
- if (client->swapped)
- {
- swaps (rates, n);
- }
- rates++;
- for (j = 0; j < pSize->nRates; j++)
- {
- *rates = pSize->pRates[j].rate;
- if (client->swapped)
- {
- swaps (rates, n);
- }
- rates++;
- }
- }
- }
- free(pData);
-
- data8 = (CARD8 *) rates;
-
- if (data8 - (CARD8 *) extra != extraLen)
- FatalError ("RRGetScreenInfo bad extra len %ld != %ld\n",
- (unsigned long)(data8 - (CARD8 *) extra), extraLen);
- rep.length = bytes_to_int32(extraLen);
- }
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.timestamp, n);
- swaps(&rep.rotation, n);
- swaps(&rep.nSizes, n);
- swaps(&rep.sizeID, n);
- swaps(&rep.rate, n);
- swaps(&rep.nrateEnts, n);
- }
- WriteToClient(client, sizeof(xRRGetScreenInfoReply), (char *)&rep);
- if (extraLen)
- {
- WriteToClient (client, extraLen, (char *) extra);
- free(extra);
- }
- return Success;
-}
-
-int
-ProcRRSetScreenConfig (ClientPtr client)
-{
- REQUEST(xRRSetScreenConfigReq);
- xRRSetScreenConfigReply rep;
- DrawablePtr pDraw;
- int n, rc;
- ScreenPtr pScreen;
- rrScrPrivPtr pScrPriv;
- TimeStamp time;
- int i;
- Rotation rotation;
- int rate;
- Bool has_rate;
- RROutputPtr output;
- RRCrtcPtr crtc;
- RRModePtr mode;
- RR10DataPtr pData = NULL;
- RRScreenSizePtr pSize;
- int width, height;
-
- UpdateCurrentTime ();
-
- if (RRClientKnowsRates (client))
- {
- REQUEST_SIZE_MATCH (xRRSetScreenConfigReq);
- has_rate = TRUE;
- }
- else
- {
- REQUEST_SIZE_MATCH (xRR1_0SetScreenConfigReq);
- has_rate = FALSE;
- }
-
- rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
- if (rc != Success)
- return rc;
-
- pScreen = pDraw->pScreen;
-
- pScrPriv = rrGetScrPriv(pScreen);
-
- time = ClientTimeToServerTime(stuff->timestamp);
-
- if (!pScrPriv)
- {
- time = currentTime;
- rep.status = RRSetConfigFailed;
- goto sendReply;
- }
- if (!RRGetInfo (pScreen, FALSE))
- return BadAlloc;
-
- output = RRFirstOutput (pScreen);
- if (!output)
- {
- time = currentTime;
- rep.status = RRSetConfigFailed;
- goto sendReply;
- }
-
- crtc = output->crtc;
-
- /*
- * If the client's config timestamp is not the same as the last config
- * timestamp, then the config information isn't up-to-date and
- * can't even be validated.
- *
- * Note that the client only knows about the milliseconds part of the
- * timestamp, so using CompareTimeStamps here would cause randr to suddenly
- * stop working after several hours have passed (freedesktop bug #6502).
- */
- if (stuff->configTimestamp != pScrPriv->lastConfigTime.milliseconds)
- {
- rep.status = RRSetConfigInvalidConfigTime;
- goto sendReply;
- }
-
- pData = RR10GetData (pScreen, output);
- if (!pData)
- return BadAlloc;
-
- if (stuff->sizeID >= pData->nsize)
- {
- /*
- * Invalid size ID
- */
- client->errorValue = stuff->sizeID;
- free(pData);
- return BadValue;
- }
- pSize = &pData->sizes[stuff->sizeID];
-
- /*
- * Validate requested rotation
- */
- rotation = (Rotation) stuff->rotation;
-
- /* test the rotation bits only! */
- switch (rotation & 0xf) {
- case RR_Rotate_0:
- case RR_Rotate_90:
- case RR_Rotate_180:
- case RR_Rotate_270:
- break;
- default:
- /*
- * Invalid rotation
- */
- client->errorValue = stuff->rotation;
- free(pData);
- return BadValue;
- }
-
- if ((~crtc->rotations) & rotation)
- {
- /*
- * requested rotation or reflection not supported by screen
- */
- client->errorValue = stuff->rotation;
- free(pData);
- return BadMatch;
- }
-
- /*
- * Validate requested refresh
- */
- if (has_rate)
- rate = (int) stuff->rate;
- else
- rate = 0;
-
- if (rate)
- {
- for (i = 0; i < pSize->nRates; i++)
- {
- if (pSize->pRates[i].rate == rate)
- break;
- }
- if (i == pSize->nRates)
- {
- /*
- * Invalid rate
- */
- client->errorValue = rate;
- free(pData);
- return BadValue;
- }
- mode = pSize->pRates[i].mode;
- }
- else
- mode = pSize->pRates[0].mode;
-
- /*
- * Make sure the requested set-time is not older than
- * the last set-time
- */
- if (CompareTimeStamps (time, pScrPriv->lastSetTime) < 0)
- {
- rep.status = RRSetConfigInvalidTime;
- goto sendReply;
- }
-
- /*
- * If the screen size is changing, adjust all of the other outputs
- * to fit the new size, mirroring as much as possible
- */
- width = mode->mode.width;
- height = mode->mode.height;
- if (rotation & (RR_Rotate_90|RR_Rotate_270))
- {
- width = mode->mode.height;
- height = mode->mode.width;
- }
-
- if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
- client->errorValue = width;
- free(pData);
- return BadValue;
- }
- if (height < pScrPriv->minHeight || pScrPriv->maxHeight < height) {
- client->errorValue = height;
- free(pData);
- return BadValue;
- }
-
- if (width != pScreen->width || height != pScreen->height)
- {
- int c;
-
- for (c = 0; c < pScrPriv->numCrtcs; c++)
- {
- if (!RRCrtcSet (pScrPriv->crtcs[c], NULL, 0, 0, RR_Rotate_0,
- 0, NULL))
- {
- rep.status = RRSetConfigFailed;
- /* XXX recover from failure */
- goto sendReply;
- }
- }
- if (!RRScreenSizeSet (pScreen, width, height,
- pScreen->mmWidth, pScreen->mmHeight))
- {
- rep.status = RRSetConfigFailed;
- /* XXX recover from failure */
- goto sendReply;
- }
- }
-
- if (!RRCrtcSet (crtc, mode, 0, 0, stuff->rotation, 1, &output))
- rep.status = RRSetConfigFailed;
- else {
- pScrPriv->lastSetTime = time;
- rep.status = RRSetConfigSuccess;
- }
-
- /*
- * XXX Configure other crtcs to mirror as much as possible
- */
-
-sendReply:
-
- free(pData);
-
- rep.type = X_Reply;
- /* rep.status has already been filled in */
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-
- rep.newTimestamp = pScrPriv->lastSetTime.milliseconds;
- rep.newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds;
- rep.root = pDraw->pScreen->root->drawable.id;
-
- if (client->swapped)
- {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.newTimestamp, n);
- swapl(&rep.newConfigTimestamp, n);
- swapl(&rep.root, n);
- }
- WriteToClient(client, sizeof(xRRSetScreenConfigReply), (char *)&rep);
-
- return Success;
-}
-
-static CARD16
-RR10CurrentSizeID (ScreenPtr pScreen)
-{
- CARD16 sizeID = 0xffff;
- RROutputPtr output = RRFirstOutput (pScreen);
-
- if (output)
- {
- RR10DataPtr data = RR10GetData (pScreen, output);
- if (data)
- {
- int i;
- for (i = 0; i < data->nsize; i++)
- if (data->sizes[i].width == pScreen->width &&
- data->sizes[i].height == pScreen->height)
- {
- sizeID = (CARD16) i;
- break;
- }
- free(data);
- }
- }
- return sizeID;
-}
+/*
+ * Copyright © 2006 Keith Packard
+ *
+ * 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, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#include "randrstr.h"
+
+static const int padlength[4] = {0, 3, 2, 1};
+
+static CARD16
+RR10CurrentSizeID (ScreenPtr pScreen);
+
+/*
+ * Edit connection information block so that new clients
+ * see the current screen size on connect
+ */
+static void
+RREditConnectionInfo (ScreenPtr pScreen)
+{
+ xConnSetup *connSetup;
+ char *vendor;
+ xPixmapFormat *formats;
+ xWindowRoot *root;
+ xDepth *depth;
+ xVisualType *visual;
+ int screen = 0;
+ int d;
+
+ connSetup = (xConnSetup *) ConnectionInfo;
+ vendor = (char *) connSetup + sizeof (xConnSetup);
+ formats = (xPixmapFormat *) ((char *) vendor +
+ connSetup->nbytesVendor +
+ padlength[connSetup->nbytesVendor & 3]);
+ root = (xWindowRoot *) ((char *) formats +
+ sizeof (xPixmapFormat) * screenInfo.numPixmapFormats);
+ while (screen != pScreen->myNum)
+ {
+ depth = (xDepth *) ((char *) root +
+ sizeof (xWindowRoot));
+ for (d = 0; d < root->nDepths; d++)
+ {
+ visual = (xVisualType *) ((char *) depth +
+ sizeof (xDepth));
+ depth = (xDepth *) ((char *) visual +
+ depth->nVisuals * sizeof (xVisualType));
+ }
+ root = (xWindowRoot *) ((char *) depth);
+ screen++;
+ }
+ root->pixWidth = pScreen->width;
+ root->pixHeight = pScreen->height;
+ root->mmWidth = pScreen->mmWidth;
+ root->mmHeight = pScreen->mmHeight;
+}
+
+void
+RRSendConfigNotify (ScreenPtr pScreen)
+{
+ WindowPtr pWin = pScreen->root;
+ xEvent event;
+
+ event.u.u.type = ConfigureNotify;
+ event.u.configureNotify.window = pWin->drawable.id;
+ event.u.configureNotify.aboveSibling = None;
+ event.u.configureNotify.x = 0;
+ event.u.configureNotify.y = 0;
+
+ /* XXX xinerama stuff ? */
+
+ event.u.configureNotify.width = pWin->drawable.width;
+ event.u.configureNotify.height = pWin->drawable.height;
+ event.u.configureNotify.borderWidth = wBorderWidth (pWin);
+ event.u.configureNotify.override = pWin->overrideRedirect;
+ DeliverEvents(pWin, &event, 1, NullWindow);
+}
+
+void
+RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen)
+{
+ rrScrPriv (pScreen);
+ xRRScreenChangeNotifyEvent se;
+ RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL;
+ WindowPtr pRoot = pScreen->root;
+
+ se.type = RRScreenChangeNotify + RREventBase;
+ se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0);
+ se.timestamp = pScrPriv->lastSetTime.milliseconds;
+ se.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
+ se.root = pRoot->drawable.id;
+ se.window = pWin->drawable.id;
+ se.subpixelOrder = PictureGetSubpixelOrder (pScreen);
+
+ se.sizeID = RR10CurrentSizeID (pScreen);
+
+ if (se.rotation & (RR_Rotate_90 | RR_Rotate_270)) {
+ se.widthInPixels = pScreen->height;
+ se.heightInPixels = pScreen->width;
+ se.widthInMillimeters = pScreen->mmHeight;
+ se.heightInMillimeters = pScreen->mmWidth;
+ } else {
+ se.widthInPixels = pScreen->width;
+ se.heightInPixels = pScreen->height;
+ se.widthInMillimeters = pScreen->mmWidth;
+ se.heightInMillimeters = pScreen->mmHeight;
+ }
+
+ WriteEventsToClient (client, 1, (xEvent *) &se);
+}
+
+/*
+ * Notify the extension that the screen size has been changed.
+ * The driver is responsible for calling this whenever it has changed
+ * the size of the screen
+ */
+void
+RRScreenSizeNotify (ScreenPtr pScreen)
+{
+ rrScrPriv(pScreen);
+ /*
+ * Deliver ConfigureNotify events when root changes
+ * pixel size
+ */
+ if (pScrPriv->width == pScreen->width &&
+ pScrPriv->height == pScreen->height &&
+ pScrPriv->mmWidth == pScreen->mmWidth &&
+ pScrPriv->mmHeight == pScreen->mmHeight)
+ return;
+
+ pScrPriv->width = pScreen->width;
+ pScrPriv->height = pScreen->height;
+ pScrPriv->mmWidth = pScreen->mmWidth;
+ pScrPriv->mmHeight = pScreen->mmHeight;
+ pScrPriv->changed = TRUE;
+/* pScrPriv->sizeChanged = TRUE; */
+
+ RRTellChanged (pScreen);
+ RRSendConfigNotify (pScreen);
+ RREditConnectionInfo (pScreen);
+
+ RRPointerScreenConfigured (pScreen);
+ /*
+ * Fix pointer bounds and location
+ */
+ ScreenRestructured (pScreen);
+}
+
+/*
+ * Request that the screen be resized
+ */
+Bool
+RRScreenSizeSet (ScreenPtr pScreen,
+ CARD16 width,
+ CARD16 height,
+ CARD32 mmWidth,
+ CARD32 mmHeight)
+{
+ rrScrPriv(pScreen);
+
+#if RANDR_12_INTERFACE
+ if (pScrPriv->rrScreenSetSize)
+ {
+ return (*pScrPriv->rrScreenSetSize) (pScreen,
+ width, height,
+ mmWidth, mmHeight);
+ }
+#endif
+#if RANDR_10_INTERFACE
+ if (pScrPriv->rrSetConfig)
+ {
+ return TRUE; /* can't set size separately */
+ }
+#endif
+ return FALSE;
+}
+
+/*
+ * Retrieve valid screen size range
+ */
+int
+ProcRRGetScreenSizeRange (ClientPtr client)
+{
+ REQUEST(xRRGetScreenSizeRangeReq);
+ xRRGetScreenSizeRangeReply rep;
+ WindowPtr pWin;
+ ScreenPtr pScreen;
+ rrScrPrivPtr pScrPriv;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ pScreen = pWin->drawable.pScreen;
+ pScrPriv = rrGetScrPriv(pScreen);
+
+ rep.type = X_Reply;
+ rep.pad = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+
+ if (pScrPriv)
+ {
+ if (!RRGetInfo (pScreen, FALSE))
+ return BadAlloc;
+ rep.minWidth = pScrPriv->minWidth;
+ rep.minHeight = pScrPriv->minHeight;
+ rep.maxWidth = pScrPriv->maxWidth;
+ rep.maxHeight = pScrPriv->maxHeight;
+ }
+ else
+ {
+ rep.maxWidth = rep.minWidth = pScreen->width;
+ rep.maxHeight = rep.minHeight = pScreen->height;
+ }
+ if (client->swapped)
+ {
+ int n;
+
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ swaps(&rep.minWidth, n);
+ swaps(&rep.minHeight, n);
+ swaps(&rep.maxWidth, n);
+ swaps(&rep.maxHeight, n);
+ }
+ WriteToClient(client, sizeof(xRRGetScreenSizeRangeReply), (char *)&rep);
+ return Success;
+}
+
+int
+ProcRRSetScreenSize (ClientPtr client)
+{
+ REQUEST(xRRSetScreenSizeReq);
+ WindowPtr pWin;
+ ScreenPtr pScreen;
+ rrScrPrivPtr pScrPriv;
+ int i, rc;
+
+ REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ pScreen = pWin->drawable.pScreen;
+ pScrPriv = rrGetScrPriv(pScreen);
+ if (stuff->width < pScrPriv->minWidth || pScrPriv->maxWidth < stuff->width)
+ {
+ client->errorValue = stuff->width;
+ return BadValue;
+ }
+ if (stuff->height < pScrPriv->minHeight ||
+ pScrPriv->maxHeight < stuff->height)
+ {
+ client->errorValue = stuff->height;
+ return BadValue;
+ }
+ for (i = 0; i < pScrPriv->numCrtcs; i++)
+ {
+ RRCrtcPtr crtc = pScrPriv->crtcs[i];
+ RRModePtr mode = crtc->mode;
+ if (mode)
+ {
+ int source_width = mode->mode.width;
+ int source_height = mode->mode.height;
+ Rotation rotation = crtc->rotation;
+
+ if (rotation == RR_Rotate_90 || rotation == RR_Rotate_270)
+ {
+ source_width = mode->mode.height;
+ source_height = mode->mode.width;
+ }
+
+ if (crtc->x + source_width > stuff->width ||
+ crtc->y + source_height > stuff->height)
+ return BadMatch;
+ }
+ }
+ if (stuff->widthInMillimeters == 0 || stuff->heightInMillimeters == 0)
+ {
+ client->errorValue = 0;
+ return BadValue;
+ }
+ if (!RRScreenSizeSet (pScreen,
+ stuff->width, stuff->height,
+ stuff->widthInMillimeters,
+ stuff->heightInMillimeters))
+ {
+ return BadMatch;
+ }
+ return Success;
+}
+
+static int
+rrGetScreenResources(ClientPtr client, Bool query)
+{
+ REQUEST(xRRGetScreenResourcesReq);
+ xRRGetScreenResourcesReply rep;
+ WindowPtr pWin;
+ ScreenPtr pScreen;
+ rrScrPrivPtr pScrPriv;
+ CARD8 *extra;
+ unsigned long extraLen;
+ int i, n, rc, has_primary = 0;
+ RRCrtc *crtcs;
+ RROutput *outputs;
+ xRRModeInfo *modeinfos;
+ CARD8 *names;
+
+ REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ pScreen = pWin->drawable.pScreen;
+ pScrPriv = rrGetScrPriv(pScreen);
+ rep.pad = 0;
+
+ if (query && pScrPriv)
+ if (!RRGetInfo (pScreen, query))
+ return BadAlloc;
+
+ if (!pScrPriv)
+ {
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.timestamp = currentTime.milliseconds;
+ rep.configTimestamp = currentTime.milliseconds;
+ rep.nCrtcs = 0;
+ rep.nOutputs = 0;
+ rep.nModes = 0;
+ rep.nbytesNames = 0;
+ extra = NULL;
+ extraLen = 0;
+ }
+ else
+ {
+ RRModePtr *modes;
+ int num_modes;
+
+ modes = RRModesForScreen (pScreen, &num_modes);
+ if (!modes)
+ return BadAlloc;
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.timestamp = pScrPriv->lastSetTime.milliseconds;
+ rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
+ rep.nCrtcs = pScrPriv->numCrtcs;
+ rep.nOutputs = pScrPriv->numOutputs;
+ rep.nModes = num_modes;
+ rep.nbytesNames = 0;
+
+ for (i = 0; i < num_modes; i++)
+ rep.nbytesNames += modes[i]->mode.nameLength;
+
+ rep.length = (pScrPriv->numCrtcs +
+ pScrPriv->numOutputs +
+ num_modes * bytes_to_int32(SIZEOF(xRRModeInfo)) +
+ bytes_to_int32(rep.nbytesNames));
+
+ extraLen = rep.length << 2;
+ if (extraLen)
+ {
+ extra = malloc(extraLen);
+ if (!extra)
+ {
+ free(modes);
+ return BadAlloc;
+ }
+ }
+ else
+ extra = NULL;
+
+ crtcs = (RRCrtc *) extra;
+ outputs = (RROutput *) (crtcs + pScrPriv->numCrtcs);
+ modeinfos = (xRRModeInfo *) (outputs + pScrPriv->numOutputs);
+ names = (CARD8 *) (modeinfos + num_modes);
+
+ if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
+ {
+ has_primary = 1;
+ crtcs[0] = pScrPriv->primaryOutput->crtc->id;
+ if (client->swapped)
+ swapl (&crtcs[0], n);
+ }
+
+ for (i = 0; i < pScrPriv->numCrtcs; i++)
+ {
+ if (has_primary &&
+ pScrPriv->primaryOutput->crtc == pScrPriv->crtcs[i])
+ {
+ has_primary = 0;
+ continue;
+ }
+ crtcs[i + has_primary] = pScrPriv->crtcs[i]->id;
+ if (client->swapped)
+ swapl (&crtcs[i + has_primary], n);
+ }
+
+ for (i = 0; i < pScrPriv->numOutputs; i++)
+ {
+ outputs[i] = pScrPriv->outputs[i]->id;
+ if (client->swapped)
+ swapl (&outputs[i], n);
+ }
+
+ for (i = 0; i < num_modes; i++)
+ {
+ RRModePtr mode = modes[i];
+ modeinfos[i] = mode->mode;
+ if (client->swapped)
+ {
+ swapl (&modeinfos[i].id, n);
+ swaps (&modeinfos[i].width, n);
+ swaps (&modeinfos[i].height, n);
+ swapl (&modeinfos[i].dotClock, n);
+ swaps (&modeinfos[i].hSyncStart, n);
+ swaps (&modeinfos[i].hSyncEnd, n);
+ swaps (&modeinfos[i].hTotal, n);
+ swaps (&modeinfos[i].hSkew, n);
+ swaps (&modeinfos[i].vSyncStart, n);
+ swaps (&modeinfos[i].vSyncEnd, n);
+ swaps (&modeinfos[i].vTotal, n);
+ swaps (&modeinfos[i].nameLength, n);
+ swapl (&modeinfos[i].modeFlags, n);
+ }
+ memcpy (names, mode->name,
+ mode->mode.nameLength);
+ names += mode->mode.nameLength;
+ }
+ free(modes);
+ assert (bytes_to_int32((char *) names - (char *) extra) == rep.length);
+ }
+
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ swapl(&rep.timestamp, n);
+ swapl(&rep.configTimestamp, n);
+ swaps(&rep.nCrtcs, n);
+ swaps(&rep.nOutputs, n);
+ swaps(&rep.nModes, n);
+ swaps(&rep.nbytesNames, n);
+ }
+ WriteToClient(client, sizeof(xRRGetScreenResourcesReply), (char *)&rep);
+ if (extraLen)
+ {
+ WriteToClient (client, extraLen, (char *) extra);
+ free(extra);
+ }
+ return Success;
+}
+
+int
+ProcRRGetScreenResources (ClientPtr client)
+{
+ return rrGetScreenResources(client, TRUE);
+}
+
+int
+ProcRRGetScreenResourcesCurrent (ClientPtr client)
+{
+ return rrGetScreenResources(client, FALSE);
+}
+
+typedef struct _RR10Data {
+ RRScreenSizePtr sizes;
+ int nsize;
+ int nrefresh;
+ int size;
+ CARD16 refresh;
+} RR10DataRec, *RR10DataPtr;
+
+/*
+ * Convert 1.2 monitor data into 1.0 screen data
+ */
+static RR10DataPtr
+RR10GetData (ScreenPtr pScreen, RROutputPtr output)
+{
+ RR10DataPtr data;
+ RRScreenSizePtr size;
+ int nmode = output->numModes + output->numUserModes;
+ int o, os, l, r;
+ RRScreenRatePtr refresh;
+ CARD16 vRefresh;
+ RRModePtr mode;
+ Bool *used;
+
+ /* Make sure there is plenty of space for any combination */
+ data = malloc (sizeof (RR10DataRec) +
+ sizeof (RRScreenSize) * nmode +
+ sizeof (RRScreenRate) * nmode +
+ sizeof (Bool) * nmode);
+ if (!data)
+ return NULL;
+ size = (RRScreenSizePtr) (data + 1);
+ refresh = (RRScreenRatePtr) (size + nmode);
+ used = (Bool *) (refresh + nmode);
+ memset (used, '\0', sizeof (Bool) * nmode);
+ data->sizes = size;
+ data->nsize = 0;
+ data->nrefresh = 0;
+ data->size = 0;
+ data->refresh = 0;
+
+ /*
+ * find modes not yet listed
+ */
+ for (o = 0; o < output->numModes + output->numUserModes; o++)
+ {
+ if (used[o]) continue;
+
+ if (o < output->numModes)
+ mode = output->modes[o];
+ else
+ mode = output->userModes[o - output->numModes];
+
+ l = data->nsize;
+ size[l].id = data->nsize;
+ size[l].width = mode->mode.width;
+ size[l].height = mode->mode.height;
+ if (output->mmWidth && output->mmHeight) {
+ size[l].mmWidth = output->mmWidth;
+ size[l].mmHeight = output->mmHeight;
+ } else {
+ size[l].mmWidth = pScreen->mmWidth;
+ size[l].mmHeight = pScreen->mmHeight;
+ }
+ size[l].nRates = 0;
+ size[l].pRates = &refresh[data->nrefresh];
+ data->nsize++;
+
+ /*
+ * Find all modes with matching size
+ */
+ for (os = o; os < output->numModes + output->numUserModes; os++)
+ {
+ if (os < output->numModes)
+ mode = output->modes[os];
+ else
+ mode = output->userModes[os - output->numModes];
+ if (mode->mode.width == size[l].width &&
+ mode->mode.height == size[l].height)
+ {
+ vRefresh = RRVerticalRefresh (&mode->mode);
+ used[os] = TRUE;
+
+ for (r = 0; r < size[l].nRates; r++)
+ if (vRefresh == size[l].pRates[r].rate)
+ break;
+ if (r == size[l].nRates)
+ {
+ size[l].pRates[r].rate = vRefresh;
+ size[l].pRates[r].mode = mode;
+ size[l].nRates++;
+ data->nrefresh++;
+ }
+ if (mode == output->crtc->mode)
+ {
+ data->size = l;
+ data->refresh = vRefresh;
+ }
+ }
+ }
+ }
+ return data;
+}
+
+int
+ProcRRGetScreenInfo (ClientPtr client)
+{
+ REQUEST(xRRGetScreenInfoReq);
+ xRRGetScreenInfoReply rep;
+ WindowPtr pWin;
+ int n, rc;
+ ScreenPtr pScreen;
+ rrScrPrivPtr pScrPriv;
+ CARD8 *extra;
+ unsigned long extraLen;
+ RROutputPtr output;
+
+ REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ pScreen = pWin->drawable.pScreen;
+ pScrPriv = rrGetScrPriv(pScreen);
+ rep.pad = 0;
+
+ if (pScrPriv)
+ if (!RRGetInfo (pScreen, TRUE))
+ return BadAlloc;
+
+ output = RRFirstOutput (pScreen);
+
+ if (!pScrPriv || !output)
+ {
+ rep.type = X_Reply;
+ rep.setOfRotations = RR_Rotate_0;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.root = pWin->drawable.pScreen->root->drawable.id;
+ rep.timestamp = currentTime.milliseconds;
+ rep.configTimestamp = currentTime.milliseconds;
+ rep.nSizes = 0;
+ rep.sizeID = 0;
+ rep.rotation = RR_Rotate_0;
+ rep.rate = 0;
+ rep.nrateEnts = 0;
+ extra = 0;
+ extraLen = 0;
+ }
+ else
+ {
+ int i, j;
+ xScreenSizes *size;
+ CARD16 *rates;
+ CARD8 *data8;
+ Bool has_rate = RRClientKnowsRates (client);
+ RR10DataPtr pData;
+ RRScreenSizePtr pSize;
+
+ pData = RR10GetData (pScreen, output);
+ if (!pData)
+ return BadAlloc;
+
+ rep.type = X_Reply;
+ rep.setOfRotations = output->crtc->rotations;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.root = pWin->drawable.pScreen->root->drawable.id;
+ rep.timestamp = pScrPriv->lastSetTime.milliseconds;
+ rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
+ rep.rotation = output->crtc->rotation;
+ rep.nSizes = pData->nsize;
+ rep.nrateEnts = pData->nrefresh + pData->nsize;
+ rep.sizeID = pData->size;
+ rep.rate = pData->refresh;
+
+ extraLen = rep.nSizes * sizeof (xScreenSizes);
+ if (has_rate)
+ extraLen += rep.nrateEnts * sizeof (CARD16);
+
+ if (extraLen)
+ {
+ extra = (CARD8 *) malloc(extraLen);
+ if (!extra)
+ {
+ free(pData);
+ return BadAlloc;
+ }
+ }
+ else
+ extra = NULL;
+
+ /*
+ * First comes the size information
+ */
+ size = (xScreenSizes *) extra;
+ rates = (CARD16 *) (size + rep.nSizes);
+ for (i = 0; i < pData->nsize; i++)
+ {
+ pSize = &pData->sizes[i];
+ size->widthInPixels = pSize->width;
+ size->heightInPixels = pSize->height;
+ size->widthInMillimeters = pSize->mmWidth;
+ size->heightInMillimeters = pSize->mmHeight;
+ if (client->swapped)
+ {
+ swaps (&size->widthInPixels, n);
+ swaps (&size->heightInPixels, n);
+ swaps (&size->widthInMillimeters, n);
+ swaps (&size->heightInMillimeters, n);
+ }
+ size++;
+ if (has_rate)
+ {
+ *rates = pSize->nRates;
+ if (client->swapped)
+ {
+ swaps (rates, n);
+ }
+ rates++;
+ for (j = 0; j < pSize->nRates; j++)
+ {
+ *rates = pSize->pRates[j].rate;
+ if (client->swapped)
+ {
+ swaps (rates, n);
+ }
+ rates++;
+ }
+ }
+ }
+ free(pData);
+
+ data8 = (CARD8 *) rates;
+
+ if (data8 - (CARD8 *) extra != extraLen)
+ FatalError ("RRGetScreenInfo bad extra len %ld != %ld\n",
+ (unsigned long)(data8 - (CARD8 *) extra), extraLen);
+ rep.length = bytes_to_int32(extraLen);
+ }
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ swapl(&rep.timestamp, n);
+ swaps(&rep.rotation, n);
+ swaps(&rep.nSizes, n);
+ swaps(&rep.sizeID, n);
+ swaps(&rep.rate, n);
+ swaps(&rep.nrateEnts, n);
+ }
+ WriteToClient(client, sizeof(xRRGetScreenInfoReply), (char *)&rep);
+ if (extraLen)
+ {
+ WriteToClient (client, extraLen, (char *) extra);
+ free(extra);
+ }
+ return Success;
+}
+
+int
+ProcRRSetScreenConfig (ClientPtr client)
+{
+ REQUEST(xRRSetScreenConfigReq);
+ xRRSetScreenConfigReply rep;
+ DrawablePtr pDraw;
+ int n, rc;
+ ScreenPtr pScreen;
+ rrScrPrivPtr pScrPriv;
+ TimeStamp time;
+ int i;
+ Rotation rotation;
+ int rate;
+ Bool has_rate;
+ RROutputPtr output;
+ RRCrtcPtr crtc;
+ RRModePtr mode;
+ RR10DataPtr pData = NULL;
+ RRScreenSizePtr pSize;
+ int width, height;
+
+ UpdateCurrentTime ();
+
+ if (RRClientKnowsRates (client))
+ {
+ REQUEST_SIZE_MATCH (xRRSetScreenConfigReq);
+ has_rate = TRUE;
+ }
+ else
+ {
+ REQUEST_SIZE_MATCH (xRR1_0SetScreenConfigReq);
+ has_rate = FALSE;
+ }
+
+ rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
+ if (rc != Success)
+ return rc;
+
+ pScreen = pDraw->pScreen;
+
+ pScrPriv = rrGetScrPriv(pScreen);
+
+ time = ClientTimeToServerTime(stuff->timestamp);
+
+ if (!pScrPriv)
+ {
+ time = currentTime;
+ rep.status = RRSetConfigFailed;
+ goto sendReply;
+ }
+ if (!RRGetInfo (pScreen, FALSE))
+ return BadAlloc;
+
+ output = RRFirstOutput (pScreen);
+ if (!output)
+ {
+ time = currentTime;
+ rep.status = RRSetConfigFailed;
+ goto sendReply;
+ }
+
+ crtc = output->crtc;
+
+ /*
+ * If the client's config timestamp is not the same as the last config
+ * timestamp, then the config information isn't up-to-date and
+ * can't even be validated.
+ *
+ * Note that the client only knows about the milliseconds part of the
+ * timestamp, so using CompareTimeStamps here would cause randr to suddenly
+ * stop working after several hours have passed (freedesktop bug #6502).
+ */
+ if (stuff->configTimestamp != pScrPriv->lastConfigTime.milliseconds)
+ {
+ rep.status = RRSetConfigInvalidConfigTime;
+ goto sendReply;
+ }
+
+ pData = RR10GetData (pScreen, output);
+ if (!pData)
+ return BadAlloc;
+
+ if (stuff->sizeID >= pData->nsize)
+ {
+ /*
+ * Invalid size ID
+ */
+ client->errorValue = stuff->sizeID;
+ free(pData);
+ return BadValue;
+ }
+ pSize = &pData->sizes[stuff->sizeID];
+
+ /*
+ * Validate requested rotation
+ */
+ rotation = (Rotation) stuff->rotation;
+
+ /* test the rotation bits only! */
+ switch (rotation & 0xf) {
+ case RR_Rotate_0:
+ case RR_Rotate_90:
+ case RR_Rotate_180:
+ case RR_Rotate_270:
+ break;
+ default:
+ /*
+ * Invalid rotation
+ */
+ client->errorValue = stuff->rotation;
+ free(pData);
+ return BadValue;
+ }
+
+ if ((~crtc->rotations) & rotation)
+ {
+ /*
+ * requested rotation or reflection not supported by screen
+ */
+ client->errorValue = stuff->rotation;
+ free(pData);
+ return BadMatch;
+ }
+
+ /*
+ * Validate requested refresh
+ */
+ if (has_rate)
+ rate = (int) stuff->rate;
+ else
+ rate = 0;
+
+ if (rate)
+ {
+ for (i = 0; i < pSize->nRates; i++)
+ {
+ if (pSize->pRates[i].rate == rate)
+ break;
+ }
+ if (i == pSize->nRates)
+ {
+ /*
+ * Invalid rate
+ */
+ client->errorValue = rate;
+ free(pData);
+ return BadValue;
+ }
+ mode = pSize->pRates[i].mode;
+ }
+ else
+ mode = pSize->pRates[0].mode;
+
+ /*
+ * Make sure the requested set-time is not older than
+ * the last set-time
+ */
+ if (CompareTimeStamps (time, pScrPriv->lastSetTime) < 0)
+ {
+ rep.status = RRSetConfigInvalidTime;
+ goto sendReply;
+ }
+
+ /*
+ * If the screen size is changing, adjust all of the other outputs
+ * to fit the new size, mirroring as much as possible
+ */
+ width = mode->mode.width;
+ height = mode->mode.height;
+ if (rotation & (RR_Rotate_90|RR_Rotate_270))
+ {
+ width = mode->mode.height;
+ height = mode->mode.width;
+ }
+
+ if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
+ client->errorValue = width;
+ free(pData);
+ return BadValue;
+ }
+ if (height < pScrPriv->minHeight || pScrPriv->maxHeight < height) {
+ client->errorValue = height;
+ free(pData);
+ return BadValue;
+ }
+
+ if (width != pScreen->width || height != pScreen->height)
+ {
+ int c;
+
+ for (c = 0; c < pScrPriv->numCrtcs; c++)
+ {
+ if (!RRCrtcSet (pScrPriv->crtcs[c], NULL, 0, 0, RR_Rotate_0,
+ 0, NULL))
+ {
+ rep.status = RRSetConfigFailed;
+ /* XXX recover from failure */
+ goto sendReply;
+ }
+ }
+ if (!RRScreenSizeSet (pScreen, width, height,
+ pScreen->mmWidth, pScreen->mmHeight))
+ {
+ rep.status = RRSetConfigFailed;
+ /* XXX recover from failure */
+ goto sendReply;
+ }
+ }
+
+ if (!RRCrtcSet (crtc, mode, 0, 0, stuff->rotation, 1, &output))
+ rep.status = RRSetConfigFailed;
+ else {
+ pScrPriv->lastSetTime = time;
+ rep.status = RRSetConfigSuccess;
+ }
+
+ /*
+ * XXX Configure other crtcs to mirror as much as possible
+ */
+
+sendReply:
+
+ free(pData);
+
+ rep.type = X_Reply;
+ /* rep.status has already been filled in */
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+
+ rep.newTimestamp = pScrPriv->lastSetTime.milliseconds;
+ rep.newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds;
+ rep.root = pDraw->pScreen->root->drawable.id;
+
+ if (client->swapped)
+ {
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ swapl(&rep.newTimestamp, n);
+ swapl(&rep.newConfigTimestamp, n);
+ swapl(&rep.root, n);
+ }
+ WriteToClient(client, sizeof(xRRSetScreenConfigReply), (char *)&rep);
+
+ return Success;
+}
+
+static CARD16
+RR10CurrentSizeID (ScreenPtr pScreen)
+{
+ CARD16 sizeID = 0xffff;
+ RROutputPtr output = RRFirstOutput (pScreen);
+
+ if (output)
+ {
+ RR10DataPtr data = RR10GetData (pScreen, output);
+ if (data)
+ {
+ int i;
+ for (i = 0; i < data->nsize; i++)
+ if (data->sizes[i].width == pScreen->width &&
+ data->sizes[i].height == pScreen->height)
+ {
+ sizeID = (CARD16) i;
+ break;
+ }
+ free(data);
+ }
+ }
+ return sizeID;
+}
diff --git a/xorg-server/randr/rrsdispatch.c b/xorg-server/randr/rrsdispatch.c
index e16090a41..0a9207bac 100644
--- a/xorg-server/randr/rrsdispatch.c
+++ b/xorg-server/randr/rrsdispatch.c
@@ -1,503 +1,503 @@
-/*
- * Copyright © 2006 Keith Packard
- *
- * 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, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include "randrstr.h"
-
-static int
-SProcRRQueryVersion (ClientPtr client)
-{
- register int n;
- REQUEST(xRRQueryVersionReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->majorVersion, n);
- swapl(&stuff->minorVersion, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRGetScreenInfo (ClientPtr client)
-{
- register int n;
- REQUEST(xRRGetScreenInfoReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->window, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRSetScreenConfig (ClientPtr client)
-{
- register int n;
- REQUEST(xRRSetScreenConfigReq);
-
- if (RRClientKnowsRates (client))
- {
- REQUEST_SIZE_MATCH (xRRSetScreenConfigReq);
- swaps (&stuff->rate, n);
- }
- else
- {
- REQUEST_SIZE_MATCH (xRR1_0SetScreenConfigReq);
- }
-
- swaps(&stuff->length, n);
- swapl(&stuff->drawable, n);
- swapl(&stuff->timestamp, n);
- swaps(&stuff->sizeID, n);
- swaps(&stuff->rotation, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRSelectInput (ClientPtr client)
-{
- register int n;
- REQUEST(xRRSelectInputReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->window, n);
- swaps(&stuff->enable, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRGetScreenSizeRange (ClientPtr client)
-{
- int n;
- REQUEST(xRRGetScreenSizeRangeReq);
-
- REQUEST_SIZE_MATCH(xRRGetScreenSizeRangeReq);
- swaps(&stuff->length, n);
- swapl(&stuff->window, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRSetScreenSize (ClientPtr client)
-{
- int n;
- REQUEST(xRRSetScreenSizeReq);
-
- REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
- swaps(&stuff->length, n);
- swapl(&stuff->window, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
- swapl(&stuff->widthInMillimeters, n);
- swapl(&stuff->heightInMillimeters, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRGetScreenResources (ClientPtr client)
-{
- int n;
- REQUEST(xRRGetScreenResourcesReq);
-
- REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
- swaps(&stuff->length, n);
- swapl(&stuff->window, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRGetOutputInfo (ClientPtr client)
-{
- int n;
- REQUEST(xRRGetOutputInfoReq);
-
- REQUEST_SIZE_MATCH(xRRGetOutputInfoReq);
- swaps(&stuff->length, n);
- swapl(&stuff->output, n);
- swapl(&stuff->configTimestamp, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRListOutputProperties (ClientPtr client)
-{
- int n;
- REQUEST(xRRListOutputPropertiesReq);
-
- REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq);
- swaps(&stuff->length, n);
- swapl(&stuff->output, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRQueryOutputProperty (ClientPtr client)
-{
- int n;
- REQUEST(xRRQueryOutputPropertyReq);
-
- REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq);
- swaps(&stuff->length, n);
- swapl(&stuff->output, n);
- swapl(&stuff->property, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRConfigureOutputProperty (ClientPtr client)
-{
- int n;
- REQUEST(xRRConfigureOutputPropertyReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->output, n);
- swapl(&stuff->property, n);
- SwapRestL(stuff);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRChangeOutputProperty (ClientPtr client)
-{
- int n;
- REQUEST(xRRChangeOutputPropertyReq);
-
- REQUEST_AT_LEAST_SIZE (xRRChangeOutputPropertyReq);
- swaps(&stuff->length, n);
- swapl(&stuff->output, n);
- swapl(&stuff->property, n);
- swapl(&stuff->type, n);
- swapl(&stuff->nUnits, n);
- switch(stuff->format) {
- case 8:
- break;
- case 16:
- SwapRestS(stuff);
- break;
- case 32:
- SwapRestL(stuff);
- break;
- default:
- client->errorValue = stuff->format;
- return BadValue;
- }
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRDeleteOutputProperty (ClientPtr client)
-{
- int n;
- REQUEST(xRRDeleteOutputPropertyReq);
-
- REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq);
- swaps(&stuff->length, n);
- swapl(&stuff->output, n);
- swapl(&stuff->property, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRGetOutputProperty (ClientPtr client)
-{
- int n;
- REQUEST(xRRGetOutputPropertyReq);
-
- REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq);
- swaps(&stuff->length, n);
- swapl(&stuff->output, n);
- swapl(&stuff->property, n);
- swapl(&stuff->type, n);
- swapl(&stuff->longOffset, n);
- swapl(&stuff->longLength, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRCreateMode (ClientPtr client)
-{
- int n;
- xRRModeInfo *modeinfo;
- REQUEST(xRRCreateModeReq);
-
- REQUEST_AT_LEAST_SIZE(xRRCreateModeReq);
- swaps(&stuff->length, n);
- swapl(&stuff->window, n);
-
- modeinfo = &stuff->modeInfo;
- swapl(&modeinfo->id, n);
- swaps(&modeinfo->width, n);
- swaps(&modeinfo->height, n);
- swapl(&modeinfo->dotClock, n);
- swaps(&modeinfo->hSyncStart, n);
- swaps(&modeinfo->hSyncEnd, n);
- swaps(&modeinfo->hTotal, n);
- swaps(&modeinfo->vSyncStart, n);
- swaps(&modeinfo->vSyncEnd, n);
- swaps(&modeinfo->vTotal, n);
- swaps(&modeinfo->nameLength, n);
- swapl(&modeinfo->modeFlags, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRDestroyMode (ClientPtr client)
-{
- int n;
- REQUEST(xRRDestroyModeReq);
-
- REQUEST_SIZE_MATCH(xRRDestroyModeReq);
- swaps(&stuff->length, n);
- swapl(&stuff->mode, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRAddOutputMode (ClientPtr client)
-{
- int n;
- REQUEST(xRRAddOutputModeReq);
-
- REQUEST_SIZE_MATCH(xRRAddOutputModeReq);
- swaps(&stuff->length, n);
- swapl(&stuff->output, n);
- swapl(&stuff->mode, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRDeleteOutputMode (ClientPtr client)
-{
- int n;
- REQUEST(xRRDeleteOutputModeReq);
-
- REQUEST_SIZE_MATCH(xRRDeleteOutputModeReq);
- swaps(&stuff->length, n);
- swapl(&stuff->output, n);
- swapl(&stuff->mode, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRGetCrtcInfo (ClientPtr client)
-{
- int n;
- REQUEST(xRRGetCrtcInfoReq);
-
- REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
- swaps(&stuff->length, n);
- swapl(&stuff->crtc, n);
- swapl(&stuff->configTimestamp, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRSetCrtcConfig (ClientPtr client)
-{
- int n;
- REQUEST(xRRSetCrtcConfigReq);
-
- REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq);
- swaps(&stuff->length, n);
- swapl(&stuff->crtc, n);
- swapl(&stuff->timestamp, n);
- swapl(&stuff->configTimestamp, n);
- swaps(&stuff->x, n);
- swaps(&stuff->y, n);
- swapl(&stuff->mode, n);
- swaps(&stuff->rotation, n);
- SwapRestL(stuff);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRGetCrtcGammaSize (ClientPtr client)
-{
- int n;
- REQUEST(xRRGetCrtcGammaSizeReq);
-
- REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq);
- swaps(&stuff->length, n);
- swapl(&stuff->crtc, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRGetCrtcGamma (ClientPtr client)
-{
- int n;
- REQUEST(xRRGetCrtcGammaReq);
-
- REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq);
- swaps(&stuff->length, n);
- swapl(&stuff->crtc, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRSetCrtcGamma (ClientPtr client)
-{
- int n;
- REQUEST(xRRSetCrtcGammaReq);
-
- REQUEST_AT_LEAST_SIZE(xRRSetCrtcGammaReq);
- swaps(&stuff->length, n);
- swapl(&stuff->crtc, n);
- swaps(&stuff->size, n);
- SwapRestS(stuff);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRSetCrtcTransform (ClientPtr client)
-{
- int n, nparams;
- char *filter;
- CARD32 *params;
- REQUEST(xRRSetCrtcTransformReq);
-
- REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq);
- swaps(&stuff->length, n);
- swapl(&stuff->crtc, n);
- SwapLongs((CARD32 *)&stuff->transform, bytes_to_int32(sizeof(xRenderTransform)));
- swaps(&stuff->nbytesFilter, n);
- filter = (char *)(stuff + 1);
- params = (CARD32 *) (filter + pad_to_int32(stuff->nbytesFilter));
- nparams = ((CARD32 *) stuff + client->req_len) - params;
- if (nparams < 0)
- return BadLength;
-
- SwapLongs(params, nparams);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRGetCrtcTransform (ClientPtr client)
-{
- int n;
- REQUEST(xRRGetCrtcTransformReq);
-
- REQUEST_SIZE_MATCH(xRRGetCrtcTransformReq);
- swaps(&stuff->length, n);
- swapl(&stuff->crtc, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRGetPanning (ClientPtr client)
-{
- int n;
- REQUEST(xRRGetPanningReq);
-
- REQUEST_SIZE_MATCH(xRRGetPanningReq);
- swaps(&stuff->length, n);
- swapl(&stuff->crtc, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRSetPanning (ClientPtr client)
-{
- int n;
- REQUEST(xRRSetPanningReq);
-
- REQUEST_SIZE_MATCH(xRRSetPanningReq);
- swaps(&stuff->length, n);
- swapl(&stuff->crtc, n);
- swapl(&stuff->timestamp, n);
- swaps(&stuff->left, n);
- swaps(&stuff->top, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
- swaps(&stuff->track_left, n);
- swaps(&stuff->track_top, n);
- swaps(&stuff->track_width, n);
- swaps(&stuff->track_height, n);
- swaps(&stuff->border_left, n);
- swaps(&stuff->border_top, n);
- swaps(&stuff->border_right, n);
- swaps(&stuff->border_bottom, n);
- return (*ProcRandrVector[stuff->randrReqType]) (client);
-}
-
-static int
-SProcRRSetOutputPrimary (ClientPtr client)
-{
- int n;
- REQUEST(xRRSetOutputPrimaryReq);
-
- REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
- swaps(&stuff->length, n);
- swapl(&stuff->window, n);
- swapl(&stuff->output, n);
- return ProcRandrVector[stuff->randrReqType](client);
-}
-
-static int
-SProcRRGetOutputPrimary (ClientPtr client)
-{
- int n;
- REQUEST(xRRGetOutputPrimaryReq);
-
- REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq);
- swaps(&stuff->length, n);
- swapl(&stuff->window, n);
- return ProcRandrVector[stuff->randrReqType](client);
-}
-
-int (*SProcRandrVector[RRNumberRequests])(ClientPtr) = {
- SProcRRQueryVersion, /* 0 */
-/* we skip 1 to make old clients fail pretty immediately */
- NULL, /* 1 SProcRandrOldGetScreenInfo */
-/* V1.0 apps share the same set screen config request id */
- SProcRRSetScreenConfig, /* 2 */
- NULL, /* 3 SProcRandrOldScreenChangeSelectInput */
-/* 3 used to be ScreenChangeSelectInput; deprecated */
- SProcRRSelectInput, /* 4 */
- SProcRRGetScreenInfo, /* 5 */
-/* V1.2 additions */
- SProcRRGetScreenSizeRange, /* 6 */
- SProcRRSetScreenSize, /* 7 */
- SProcRRGetScreenResources, /* 8 */
- SProcRRGetOutputInfo, /* 9 */
- SProcRRListOutputProperties,/* 10 */
- SProcRRQueryOutputProperty, /* 11 */
- SProcRRConfigureOutputProperty, /* 12 */
- SProcRRChangeOutputProperty,/* 13 */
- SProcRRDeleteOutputProperty,/* 14 */
- SProcRRGetOutputProperty, /* 15 */
- SProcRRCreateMode, /* 16 */
- SProcRRDestroyMode, /* 17 */
- SProcRRAddOutputMode, /* 18 */
- SProcRRDeleteOutputMode, /* 19 */
- SProcRRGetCrtcInfo, /* 20 */
- SProcRRSetCrtcConfig, /* 21 */
- SProcRRGetCrtcGammaSize, /* 22 */
- SProcRRGetCrtcGamma, /* 23 */
- SProcRRSetCrtcGamma, /* 24 */
-/* V1.3 additions */
- SProcRRGetScreenResources, /* 25 GetScreenResourcesCurrent */
- SProcRRSetCrtcTransform, /* 26 */
- SProcRRGetCrtcTransform, /* 27 */
- SProcRRGetPanning, /* 28 */
- SProcRRSetPanning, /* 29 */
- SProcRRSetOutputPrimary, /* 30 */
- SProcRRGetOutputPrimary, /* 31 */
-};
-
+/*
+ * Copyright © 2006 Keith Packard
+ *
+ * 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, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#include "randrstr.h"
+
+static int
+SProcRRQueryVersion (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRRQueryVersionReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->majorVersion, n);
+ swapl(&stuff->minorVersion, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRGetScreenInfo (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRRGetScreenInfoReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->window, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRSetScreenConfig (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRRSetScreenConfigReq);
+
+ if (RRClientKnowsRates (client))
+ {
+ REQUEST_SIZE_MATCH (xRRSetScreenConfigReq);
+ swaps (&stuff->rate, n);
+ }
+ else
+ {
+ REQUEST_SIZE_MATCH (xRR1_0SetScreenConfigReq);
+ }
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->drawable, n);
+ swapl(&stuff->timestamp, n);
+ swaps(&stuff->sizeID, n);
+ swaps(&stuff->rotation, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRSelectInput (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRRSelectInputReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->window, n);
+ swaps(&stuff->enable, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRGetScreenSizeRange (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRGetScreenSizeRangeReq);
+
+ REQUEST_SIZE_MATCH(xRRGetScreenSizeRangeReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->window, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRSetScreenSize (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRSetScreenSizeReq);
+
+ REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->window, n);
+ swaps(&stuff->width, n);
+ swaps(&stuff->height, n);
+ swapl(&stuff->widthInMillimeters, n);
+ swapl(&stuff->heightInMillimeters, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRGetScreenResources (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRGetScreenResourcesReq);
+
+ REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->window, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRGetOutputInfo (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRGetOutputInfoReq);
+
+ REQUEST_SIZE_MATCH(xRRGetOutputInfoReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->output, n);
+ swapl(&stuff->configTimestamp, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRListOutputProperties (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRListOutputPropertiesReq);
+
+ REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->output, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRQueryOutputProperty (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRQueryOutputPropertyReq);
+
+ REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->output, n);
+ swapl(&stuff->property, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRConfigureOutputProperty (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRConfigureOutputPropertyReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->output, n);
+ swapl(&stuff->property, n);
+ SwapRestL(stuff);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRChangeOutputProperty (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRChangeOutputPropertyReq);
+
+ REQUEST_AT_LEAST_SIZE (xRRChangeOutputPropertyReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->output, n);
+ swapl(&stuff->property, n);
+ swapl(&stuff->type, n);
+ swapl(&stuff->nUnits, n);
+ switch(stuff->format) {
+ case 8:
+ break;
+ case 16:
+ SwapRestS(stuff);
+ break;
+ case 32:
+ SwapRestL(stuff);
+ break;
+ default:
+ client->errorValue = stuff->format;
+ return BadValue;
+ }
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRDeleteOutputProperty (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRDeleteOutputPropertyReq);
+
+ REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->output, n);
+ swapl(&stuff->property, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRGetOutputProperty (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRGetOutputPropertyReq);
+
+ REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->output, n);
+ swapl(&stuff->property, n);
+ swapl(&stuff->type, n);
+ swapl(&stuff->longOffset, n);
+ swapl(&stuff->longLength, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRCreateMode (ClientPtr client)
+{
+ int n;
+ xRRModeInfo *modeinfo;
+ REQUEST(xRRCreateModeReq);
+
+ REQUEST_AT_LEAST_SIZE(xRRCreateModeReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->window, n);
+
+ modeinfo = &stuff->modeInfo;
+ swapl(&modeinfo->id, n);
+ swaps(&modeinfo->width, n);
+ swaps(&modeinfo->height, n);
+ swapl(&modeinfo->dotClock, n);
+ swaps(&modeinfo->hSyncStart, n);
+ swaps(&modeinfo->hSyncEnd, n);
+ swaps(&modeinfo->hTotal, n);
+ swaps(&modeinfo->vSyncStart, n);
+ swaps(&modeinfo->vSyncEnd, n);
+ swaps(&modeinfo->vTotal, n);
+ swaps(&modeinfo->nameLength, n);
+ swapl(&modeinfo->modeFlags, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRDestroyMode (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRDestroyModeReq);
+
+ REQUEST_SIZE_MATCH(xRRDestroyModeReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->mode, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRAddOutputMode (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRAddOutputModeReq);
+
+ REQUEST_SIZE_MATCH(xRRAddOutputModeReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->output, n);
+ swapl(&stuff->mode, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRDeleteOutputMode (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRDeleteOutputModeReq);
+
+ REQUEST_SIZE_MATCH(xRRDeleteOutputModeReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->output, n);
+ swapl(&stuff->mode, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRGetCrtcInfo (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRGetCrtcInfoReq);
+
+ REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->crtc, n);
+ swapl(&stuff->configTimestamp, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRSetCrtcConfig (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRSetCrtcConfigReq);
+
+ REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->crtc, n);
+ swapl(&stuff->timestamp, n);
+ swapl(&stuff->configTimestamp, n);
+ swaps(&stuff->x, n);
+ swaps(&stuff->y, n);
+ swapl(&stuff->mode, n);
+ swaps(&stuff->rotation, n);
+ SwapRestL(stuff);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRGetCrtcGammaSize (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRGetCrtcGammaSizeReq);
+
+ REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->crtc, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRGetCrtcGamma (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRGetCrtcGammaReq);
+
+ REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->crtc, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRSetCrtcGamma (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRSetCrtcGammaReq);
+
+ REQUEST_AT_LEAST_SIZE(xRRSetCrtcGammaReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->crtc, n);
+ swaps(&stuff->size, n);
+ SwapRestS(stuff);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRSetCrtcTransform (ClientPtr client)
+{
+ int n, nparams;
+ char *filter;
+ CARD32 *params;
+ REQUEST(xRRSetCrtcTransformReq);
+
+ REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->crtc, n);
+ SwapLongs((CARD32 *)&stuff->transform, bytes_to_int32(sizeof(xRenderTransform)));
+ swaps(&stuff->nbytesFilter, n);
+ filter = (char *)(stuff + 1);
+ params = (CARD32 *) (filter + pad_to_int32(stuff->nbytesFilter));
+ nparams = ((CARD32 *) stuff + client->req_len) - params;
+ if (nparams < 0)
+ return BadLength;
+
+ SwapLongs(params, nparams);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRGetCrtcTransform (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRGetCrtcTransformReq);
+
+ REQUEST_SIZE_MATCH(xRRGetCrtcTransformReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->crtc, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRGetPanning (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRGetPanningReq);
+
+ REQUEST_SIZE_MATCH(xRRGetPanningReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->crtc, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRSetPanning (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRSetPanningReq);
+
+ REQUEST_SIZE_MATCH(xRRSetPanningReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->crtc, n);
+ swapl(&stuff->timestamp, n);
+ swaps(&stuff->left, n);
+ swaps(&stuff->top, n);
+ swaps(&stuff->width, n);
+ swaps(&stuff->height, n);
+ swaps(&stuff->track_left, n);
+ swaps(&stuff->track_top, n);
+ swaps(&stuff->track_width, n);
+ swaps(&stuff->track_height, n);
+ swaps(&stuff->border_left, n);
+ swaps(&stuff->border_top, n);
+ swaps(&stuff->border_right, n);
+ swaps(&stuff->border_bottom, n);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int
+SProcRRSetOutputPrimary (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRSetOutputPrimaryReq);
+
+ REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->window, n);
+ swapl(&stuff->output, n);
+ return ProcRandrVector[stuff->randrReqType](client);
+}
+
+static int
+SProcRRGetOutputPrimary (ClientPtr client)
+{
+ int n;
+ REQUEST(xRRGetOutputPrimaryReq);
+
+ REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->window, n);
+ return ProcRandrVector[stuff->randrReqType](client);
+}
+
+int (*SProcRandrVector[RRNumberRequests])(ClientPtr) = {
+ SProcRRQueryVersion, /* 0 */
+/* we skip 1 to make old clients fail pretty immediately */
+ NULL, /* 1 SProcRandrOldGetScreenInfo */
+/* V1.0 apps share the same set screen config request id */
+ SProcRRSetScreenConfig, /* 2 */
+ NULL, /* 3 SProcRandrOldScreenChangeSelectInput */
+/* 3 used to be ScreenChangeSelectInput; deprecated */
+ SProcRRSelectInput, /* 4 */
+ SProcRRGetScreenInfo, /* 5 */
+/* V1.2 additions */
+ SProcRRGetScreenSizeRange, /* 6 */
+ SProcRRSetScreenSize, /* 7 */
+ SProcRRGetScreenResources, /* 8 */
+ SProcRRGetOutputInfo, /* 9 */
+ SProcRRListOutputProperties,/* 10 */
+ SProcRRQueryOutputProperty, /* 11 */
+ SProcRRConfigureOutputProperty, /* 12 */
+ SProcRRChangeOutputProperty,/* 13 */
+ SProcRRDeleteOutputProperty,/* 14 */
+ SProcRRGetOutputProperty, /* 15 */
+ SProcRRCreateMode, /* 16 */
+ SProcRRDestroyMode, /* 17 */
+ SProcRRAddOutputMode, /* 18 */
+ SProcRRDeleteOutputMode, /* 19 */
+ SProcRRGetCrtcInfo, /* 20 */
+ SProcRRSetCrtcConfig, /* 21 */
+ SProcRRGetCrtcGammaSize, /* 22 */
+ SProcRRGetCrtcGamma, /* 23 */
+ SProcRRSetCrtcGamma, /* 24 */
+/* V1.3 additions */
+ SProcRRGetScreenResources, /* 25 GetScreenResourcesCurrent */
+ SProcRRSetCrtcTransform, /* 26 */
+ SProcRRGetCrtcTransform, /* 27 */
+ SProcRRGetPanning, /* 28 */
+ SProcRRSetPanning, /* 29 */
+ SProcRRSetOutputPrimary, /* 30 */
+ SProcRRGetOutputPrimary, /* 31 */
+};
+
diff --git a/xorg-server/randr/rrtransform.c b/xorg-server/randr/rrtransform.c
index e1620498b..102a0f48e 100644
--- a/xorg-server/randr/rrtransform.c
+++ b/xorg-server/randr/rrtransform.c
@@ -1,283 +1,283 @@
-/*
- * Copyright © 2007 Keith Packard
- *
- * 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, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include "randrstr.h"
-#include "rrtransform.h"
-
-void
-RRTransformInit (RRTransformPtr transform)
-{
- pixman_transform_init_identity (&transform->transform);
- pixman_f_transform_init_identity (&transform->f_transform);
- pixman_f_transform_init_identity (&transform->f_inverse);
- transform->filter = NULL;
- transform->params = NULL;
- transform->nparams = 0;
-}
-
-void
-RRTransformFini (RRTransformPtr transform)
-{
- free(transform->params);
-}
-
-Bool
-RRTransformEqual (RRTransformPtr a, RRTransformPtr b)
-{
- if (a && pixman_transform_is_identity (&a->transform))
- a = NULL;
- if (b && pixman_transform_is_identity (&b->transform))
- b = NULL;
- if (a == NULL && b == NULL)
- return TRUE;
- if (a == NULL || b == NULL)
- return FALSE;
- if (memcmp (&a->transform, &b->transform, sizeof (a->transform)) != 0)
- return FALSE;
- if (a->filter != b->filter)
- return FALSE;
- if (a->nparams != b->nparams)
- return FALSE;
- if (memcmp (a->params, b->params, a->nparams * sizeof (xFixed)) != 0)
- return FALSE;
- return TRUE;
-}
-
-Bool
-RRTransformSetFilter (RRTransformPtr dst,
- PictFilterPtr filter,
- xFixed *params,
- int nparams,
- int width,
- int height)
-{
- xFixed *new_params;
-
- if (nparams)
- {
- new_params = malloc(nparams * sizeof (xFixed));
- if (!new_params)
- return FALSE;
- memcpy (new_params, params, nparams * sizeof (xFixed));
- }
- else
- new_params = NULL;
- free(dst->params);
- dst->filter = filter;
- dst->params = new_params;
- dst->nparams = nparams;
- dst->width = width;
- dst->height = height;
- return TRUE;
-}
-
-Bool
-RRTransformCopy (RRTransformPtr dst, RRTransformPtr src)
-{
- if (src && pixman_transform_is_identity (&src->transform))
- src = NULL;
-
- if (src)
- {
- if (!RRTransformSetFilter (dst, src->filter,
- src->params, src->nparams, src->width, src->height))
- return FALSE;
- dst->transform = src->transform;
- dst->f_transform = src->f_transform;
- dst->f_inverse = src->f_inverse;
- }
- else
- {
- if (!RRTransformSetFilter (dst, NULL, NULL, 0, 0, 0))
- return FALSE;
- pixman_transform_init_identity (&dst->transform);
- pixman_f_transform_init_identity (&dst->f_transform);
- pixman_f_transform_init_identity (&dst->f_inverse);
- }
- return TRUE;
-}
-
-#define F(x) IntToxFixed(x)
-
-static void
-RRTransformRescale(struct pixman_f_transform *f_transform, double limit)
-{
- double max = 0, v, scale;
- int i, j;
-
- for (j = 0; j < 3; j++)
- for (i = 0; i < 3; i++)
- if ((v = abs (f_transform->m[j][i])) > max)
- max = v;
- scale = limit / max;
- for (j = 0; j < 3; j++)
- for (i = 0; i < 3; i++)
- f_transform->m[j][i] *= scale;
-}
-
-/*
- * Compute the complete transformation matrix including
- * client-specified transform, rotation/reflection values and the crtc
- * offset.
- *
- * Return TRUE if the resulting transform is not a simple translation.
- */
-Bool
-RRTransformCompute (int x,
- int y,
- int width,
- int height,
- Rotation rotation,
- RRTransformPtr rr_transform,
-
- PictTransformPtr transform,
- struct pixman_f_transform *f_transform,
- struct pixman_f_transform *f_inverse)
-{
- PictTransform t_transform, inverse;
- struct pixman_f_transform tf_transform, tf_inverse;
- Bool overflow = FALSE;
-
- if (!transform) transform = &t_transform;
- if (!f_transform) f_transform = &tf_transform;
- if (!f_inverse) f_inverse = &tf_inverse;
-
- pixman_transform_init_identity (transform);
- pixman_transform_init_identity (&inverse);
- pixman_f_transform_init_identity (f_transform);
- pixman_f_transform_init_identity (f_inverse);
- if (rotation != RR_Rotate_0)
- {
- double f_rot_cos, f_rot_sin, f_rot_dx, f_rot_dy;
- double f_scale_x, f_scale_y, f_scale_dx, f_scale_dy;
- xFixed rot_cos, rot_sin, rot_dx, rot_dy;
- xFixed scale_x, scale_y, scale_dx, scale_dy;
-
- /* rotation */
- switch (rotation & 0xf) {
- default:
- case RR_Rotate_0:
- f_rot_cos = 1; f_rot_sin = 0;
- f_rot_dx = 0; f_rot_dy = 0;
- rot_cos = F ( 1); rot_sin = F ( 0);
- rot_dx = F ( 0); rot_dy = F ( 0);
- break;
- case RR_Rotate_90:
- f_rot_cos = 0; f_rot_sin = 1;
- f_rot_dx = height; f_rot_dy = 0;
- rot_cos = F ( 0); rot_sin = F ( 1);
- rot_dx = F ( height); rot_dy = F (0);
- break;
- case RR_Rotate_180:
- f_rot_cos = -1; f_rot_sin = 0;
- f_rot_dx = width; f_rot_dy = height;
- rot_cos = F (-1); rot_sin = F ( 0);
- rot_dx = F (width); rot_dy = F ( height);
- break;
- case RR_Rotate_270:
- f_rot_cos = 0; f_rot_sin = -1;
- f_rot_dx = 0; f_rot_dy = width;
- rot_cos = F ( 0); rot_sin = F (-1);
- rot_dx = F ( 0); rot_dy = F ( width);
- break;
- }
-
- pixman_transform_rotate (transform, &inverse, rot_cos, rot_sin);
- pixman_transform_translate (transform, &inverse, rot_dx, rot_dy);
- pixman_f_transform_rotate (f_transform, f_inverse, f_rot_cos, f_rot_sin);
- pixman_f_transform_translate (f_transform, f_inverse, f_rot_dx, f_rot_dy);
-
- /* reflection */
- f_scale_x = 1;
- f_scale_dx = 0;
- f_scale_y = 1;
- f_scale_dy = 0;
- scale_x = F (1);
- scale_dx = 0;
- scale_y = F (1);
- scale_dy = 0;
- if (rotation & RR_Reflect_X)
- {
- f_scale_x = -1;
- scale_x = F(-1);
- if (rotation & (RR_Rotate_0|RR_Rotate_180)) {
- f_scale_dx = width;
- scale_dx = F(width);
- } else {
- f_scale_dx = height;
- scale_dx = F(height);
- }
- }
- if (rotation & RR_Reflect_Y)
- {
- f_scale_y = -1;
- scale_y = F(-1);
- if (rotation & (RR_Rotate_0|RR_Rotate_180)) {
- f_scale_dy = height;
- scale_dy = F(height);
- } else {
- f_scale_dy = width;
- scale_dy = F(width);
- }
- }
-
- pixman_transform_scale (transform, &inverse, scale_x, scale_y);
- pixman_f_transform_scale (f_transform, f_inverse, f_scale_x, f_scale_y);
- pixman_transform_translate (transform, &inverse, scale_dx, scale_dy);
- pixman_f_transform_translate (f_transform, f_inverse, f_scale_dx, f_scale_dy);
- }
-
-#ifdef RANDR_12_INTERFACE
- if (rr_transform)
- {
- if (!pixman_transform_multiply (transform, &rr_transform->transform, transform))
- overflow = TRUE;
- pixman_f_transform_multiply (f_transform, &rr_transform->f_transform, f_transform);
- pixman_f_transform_multiply (f_inverse, f_inverse, &rr_transform->f_inverse);
- }
-#endif
- /*
- * Compute the class of the resulting transform
- */
- if (!overflow && pixman_transform_is_identity (transform))
- {
- pixman_transform_init_translate (transform, F ( x), F ( y));
-
- pixman_f_transform_init_translate (f_transform, x, y);
- pixman_f_transform_init_translate (f_inverse, -x, -y);
- return FALSE;
- }
- else
- {
- pixman_f_transform_translate (f_transform, f_inverse, x, y);
- if (!pixman_transform_translate (transform, &inverse, F(x), F(y)))
- overflow = TRUE;
- if (overflow)
- {
- struct pixman_f_transform f_scaled;
- f_scaled = *f_transform;
- RRTransformRescale(&f_scaled, 16384.0);
- pixman_transform_from_pixman_f_transform(transform, &f_scaled);
- }
- return TRUE;
- }
-}
+/*
+ * Copyright © 2007 Keith Packard
+ *
+ * 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, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#include "randrstr.h"
+#include "rrtransform.h"
+
+void
+RRTransformInit (RRTransformPtr transform)
+{
+ pixman_transform_init_identity (&transform->transform);
+ pixman_f_transform_init_identity (&transform->f_transform);
+ pixman_f_transform_init_identity (&transform->f_inverse);
+ transform->filter = NULL;
+ transform->params = NULL;
+ transform->nparams = 0;
+}
+
+void
+RRTransformFini (RRTransformPtr transform)
+{
+ free(transform->params);
+}
+
+Bool
+RRTransformEqual (RRTransformPtr a, RRTransformPtr b)
+{
+ if (a && pixman_transform_is_identity (&a->transform))
+ a = NULL;
+ if (b && pixman_transform_is_identity (&b->transform))
+ b = NULL;
+ if (a == NULL && b == NULL)
+ return TRUE;
+ if (a == NULL || b == NULL)
+ return FALSE;
+ if (memcmp (&a->transform, &b->transform, sizeof (a->transform)) != 0)
+ return FALSE;
+ if (a->filter != b->filter)
+ return FALSE;
+ if (a->nparams != b->nparams)
+ return FALSE;
+ if (memcmp (a->params, b->params, a->nparams * sizeof (xFixed)) != 0)
+ return FALSE;
+ return TRUE;
+}
+
+Bool
+RRTransformSetFilter (RRTransformPtr dst,
+ PictFilterPtr filter,
+ xFixed *params,
+ int nparams,
+ int width,
+ int height)
+{
+ xFixed *new_params;
+
+ if (nparams)
+ {
+ new_params = malloc(nparams * sizeof (xFixed));
+ if (!new_params)
+ return FALSE;
+ memcpy (new_params, params, nparams * sizeof (xFixed));
+ }
+ else
+ new_params = NULL;
+ free(dst->params);
+ dst->filter = filter;
+ dst->params = new_params;
+ dst->nparams = nparams;
+ dst->width = width;
+ dst->height = height;
+ return TRUE;
+}
+
+Bool
+RRTransformCopy (RRTransformPtr dst, RRTransformPtr src)
+{
+ if (src && pixman_transform_is_identity (&src->transform))
+ src = NULL;
+
+ if (src)
+ {
+ if (!RRTransformSetFilter (dst, src->filter,
+ src->params, src->nparams, src->width, src->height))
+ return FALSE;
+ dst->transform = src->transform;
+ dst->f_transform = src->f_transform;
+ dst->f_inverse = src->f_inverse;
+ }
+ else
+ {
+ if (!RRTransformSetFilter (dst, NULL, NULL, 0, 0, 0))
+ return FALSE;
+ pixman_transform_init_identity (&dst->transform);
+ pixman_f_transform_init_identity (&dst->f_transform);
+ pixman_f_transform_init_identity (&dst->f_inverse);
+ }
+ return TRUE;
+}
+
+#define F(x) IntToxFixed(x)
+
+static void
+RRTransformRescale(struct pixman_f_transform *f_transform, double limit)
+{
+ double max = 0, v, scale;
+ int i, j;
+
+ for (j = 0; j < 3; j++)
+ for (i = 0; i < 3; i++)
+ if ((v = abs (f_transform->m[j][i])) > max)
+ max = v;
+ scale = limit / max;
+ for (j = 0; j < 3; j++)
+ for (i = 0; i < 3; i++)
+ f_transform->m[j][i] *= scale;
+}
+
+/*
+ * Compute the complete transformation matrix including
+ * client-specified transform, rotation/reflection values and the crtc
+ * offset.
+ *
+ * Return TRUE if the resulting transform is not a simple translation.
+ */
+Bool
+RRTransformCompute (int x,
+ int y,
+ int width,
+ int height,
+ Rotation rotation,
+ RRTransformPtr rr_transform,
+
+ PictTransformPtr transform,
+ struct pixman_f_transform *f_transform,
+ struct pixman_f_transform *f_inverse)
+{
+ PictTransform t_transform, inverse;
+ struct pixman_f_transform tf_transform, tf_inverse;
+ Bool overflow = FALSE;
+
+ if (!transform) transform = &t_transform;
+ if (!f_transform) f_transform = &tf_transform;
+ if (!f_inverse) f_inverse = &tf_inverse;
+
+ pixman_transform_init_identity (transform);
+ pixman_transform_init_identity (&inverse);
+ pixman_f_transform_init_identity (f_transform);
+ pixman_f_transform_init_identity (f_inverse);
+ if (rotation != RR_Rotate_0)
+ {
+ double f_rot_cos, f_rot_sin, f_rot_dx, f_rot_dy;
+ double f_scale_x, f_scale_y, f_scale_dx, f_scale_dy;
+ xFixed rot_cos, rot_sin, rot_dx, rot_dy;
+ xFixed scale_x, scale_y, scale_dx, scale_dy;
+
+ /* rotation */
+ switch (rotation & 0xf) {
+ default:
+ case RR_Rotate_0:
+ f_rot_cos = 1; f_rot_sin = 0;
+ f_rot_dx = 0; f_rot_dy = 0;
+ rot_cos = F ( 1); rot_sin = F ( 0);
+ rot_dx = F ( 0); rot_dy = F ( 0);
+ break;
+ case RR_Rotate_90:
+ f_rot_cos = 0; f_rot_sin = 1;
+ f_rot_dx = height; f_rot_dy = 0;
+ rot_cos = F ( 0); rot_sin = F ( 1);
+ rot_dx = F ( height); rot_dy = F (0);
+ break;
+ case RR_Rotate_180:
+ f_rot_cos = -1; f_rot_sin = 0;
+ f_rot_dx = width; f_rot_dy = height;
+ rot_cos = F (-1); rot_sin = F ( 0);
+ rot_dx = F (width); rot_dy = F ( height);
+ break;
+ case RR_Rotate_270:
+ f_rot_cos = 0; f_rot_sin = -1;
+ f_rot_dx = 0; f_rot_dy = width;
+ rot_cos = F ( 0); rot_sin = F (-1);
+ rot_dx = F ( 0); rot_dy = F ( width);
+ break;
+ }
+
+ pixman_transform_rotate (transform, &inverse, rot_cos, rot_sin);
+ pixman_transform_translate (transform, &inverse, rot_dx, rot_dy);
+ pixman_f_transform_rotate (f_transform, f_inverse, f_rot_cos, f_rot_sin);
+ pixman_f_transform_translate (f_transform, f_inverse, f_rot_dx, f_rot_dy);
+
+ /* reflection */
+ f_scale_x = 1;
+ f_scale_dx = 0;
+ f_scale_y = 1;
+ f_scale_dy = 0;
+ scale_x = F (1);
+ scale_dx = 0;
+ scale_y = F (1);
+ scale_dy = 0;
+ if (rotation & RR_Reflect_X)
+ {
+ f_scale_x = -1;
+ scale_x = F(-1);
+ if (rotation & (RR_Rotate_0|RR_Rotate_180)) {
+ f_scale_dx = width;
+ scale_dx = F(width);
+ } else {
+ f_scale_dx = height;
+ scale_dx = F(height);
+ }
+ }
+ if (rotation & RR_Reflect_Y)
+ {
+ f_scale_y = -1;
+ scale_y = F(-1);
+ if (rotation & (RR_Rotate_0|RR_Rotate_180)) {
+ f_scale_dy = height;
+ scale_dy = F(height);
+ } else {
+ f_scale_dy = width;
+ scale_dy = F(width);
+ }
+ }
+
+ pixman_transform_scale (transform, &inverse, scale_x, scale_y);
+ pixman_f_transform_scale (f_transform, f_inverse, f_scale_x, f_scale_y);
+ pixman_transform_translate (transform, &inverse, scale_dx, scale_dy);
+ pixman_f_transform_translate (f_transform, f_inverse, f_scale_dx, f_scale_dy);
+ }
+
+#ifdef RANDR_12_INTERFACE
+ if (rr_transform)
+ {
+ if (!pixman_transform_multiply (transform, &rr_transform->transform, transform))
+ overflow = TRUE;
+ pixman_f_transform_multiply (f_transform, &rr_transform->f_transform, f_transform);
+ pixman_f_transform_multiply (f_inverse, f_inverse, &rr_transform->f_inverse);
+ }
+#endif
+ /*
+ * Compute the class of the resulting transform
+ */
+ if (!overflow && pixman_transform_is_identity (transform))
+ {
+ pixman_transform_init_translate (transform, F ( x), F ( y));
+
+ pixman_f_transform_init_translate (f_transform, x, y);
+ pixman_f_transform_init_translate (f_inverse, -x, -y);
+ return FALSE;
+ }
+ else
+ {
+ pixman_f_transform_translate (f_transform, f_inverse, x, y);
+ if (!pixman_transform_translate (transform, &inverse, F(x), F(y)))
+ overflow = TRUE;
+ if (overflow)
+ {
+ struct pixman_f_transform f_scaled;
+ f_scaled = *f_transform;
+ RRTransformRescale(&f_scaled, 16384.0);
+ pixman_transform_from_pixman_f_transform(transform, &f_scaled);
+ }
+ return TRUE;
+ }
+}
diff --git a/xorg-server/randr/rrtransform.h b/xorg-server/randr/rrtransform.h
index 561762dfe..b09a84ca1 100644
--- a/xorg-server/randr/rrtransform.h
+++ b/xorg-server/randr/rrtransform.h
@@ -1,75 +1,75 @@
-/*
- * Copyright © 2007 Keith Packard
- *
- * 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, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#ifndef _RRTRANSFORM_H_
-#define _RRTRANSFORM_H_
-
-#include <X11/extensions/randr.h>
-#include "picturestr.h"
-
-typedef struct _rrTransform RRTransformRec, *RRTransformPtr;
-
-struct _rrTransform {
- PictTransform transform;
- struct pict_f_transform f_transform;
- struct pict_f_transform f_inverse;
- PictFilterPtr filter;
- xFixed *params;
- int nparams;
- int width;
- int height;
-};
-
-extern _X_EXPORT void
-RRTransformInit (RRTransformPtr transform);
-
-extern _X_EXPORT void
-RRTransformFini (RRTransformPtr transform);
-
-extern _X_EXPORT Bool
-RRTransformEqual (RRTransformPtr a, RRTransformPtr b);
-
-extern _X_EXPORT Bool
-RRTransformSetFilter (RRTransformPtr dst,
- PictFilterPtr filter,
- xFixed *params,
- int nparams,
- int width,
- int height);
-
-extern _X_EXPORT Bool
-RRTransformCopy (RRTransformPtr dst, RRTransformPtr src);
-
-extern _X_EXPORT Bool
-RRTransformCompute (int x,
- int y,
- int width,
- int height,
- Rotation rotation,
- RRTransformPtr rr_transform,
-
- PictTransformPtr transform,
- struct pict_f_transform *f_transform,
- struct pict_f_transform *f_inverse);
-
-
-#endif /* _RRTRANSFORM_H_ */
+/*
+ * Copyright © 2007 Keith Packard
+ *
+ * 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, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _RRTRANSFORM_H_
+#define _RRTRANSFORM_H_
+
+#include <X11/extensions/randr.h>
+#include "picturestr.h"
+
+typedef struct _rrTransform RRTransformRec, *RRTransformPtr;
+
+struct _rrTransform {
+ PictTransform transform;
+ struct pict_f_transform f_transform;
+ struct pict_f_transform f_inverse;
+ PictFilterPtr filter;
+ xFixed *params;
+ int nparams;
+ int width;
+ int height;
+};
+
+extern _X_EXPORT void
+RRTransformInit (RRTransformPtr transform);
+
+extern _X_EXPORT void
+RRTransformFini (RRTransformPtr transform);
+
+extern _X_EXPORT Bool
+RRTransformEqual (RRTransformPtr a, RRTransformPtr b);
+
+extern _X_EXPORT Bool
+RRTransformSetFilter (RRTransformPtr dst,
+ PictFilterPtr filter,
+ xFixed *params,
+ int nparams,
+ int width,
+ int height);
+
+extern _X_EXPORT Bool
+RRTransformCopy (RRTransformPtr dst, RRTransformPtr src);
+
+extern _X_EXPORT Bool
+RRTransformCompute (int x,
+ int y,
+ int width,
+ int height,
+ Rotation rotation,
+ RRTransformPtr rr_transform,
+
+ PictTransformPtr transform,
+ struct pict_f_transform *f_transform,
+ struct pict_f_transform *f_inverse);
+
+
+#endif /* _RRTRANSFORM_H_ */
diff --git a/xorg-server/record/makefile b/xorg-server/record/makefile
new file mode 100644
index 000000000..1cef2de18
--- /dev/null
+++ b/xorg-server/record/makefile
@@ -0,0 +1,4 @@
+CSRCS = record.c set.c
+
+LIBRARY=librecord
+
diff --git a/xorg-server/render/makefile b/xorg-server/render/makefile
new file mode 100644
index 000000000..86d66a6d3
--- /dev/null
+++ b/xorg-server/render/makefile
@@ -0,0 +1,15 @@
+
+LIBRARY=librender
+
+CSRCS = \
+ animcur.c \
+ filter.c \
+ glyph.c \
+ matrix.c \
+ miindex.c \
+ mipict.c \
+ mirect.c \
+ mitrap.c \
+ mitri.c \
+ picture.c \
+ render.c
diff --git a/xorg-server/render/mipict.c b/xorg-server/render/mipict.c
index 1623b335f..8445f5c6f 100644
--- a/xorg-server/render/mipict.c
+++ b/xorg-server/render/mipict.c
@@ -266,7 +266,7 @@ miChangePictureFilter (PicturePtr pPicture,
#define BOUND(v) (INT16) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v))
-static inline pixman_bool_t
+static __inline pixman_bool_t
miClipPictureReg (pixman_region16_t * pRegion,
pixman_region16_t * pClip,
int dx,
diff --git a/xorg-server/render/mitrap.c b/xorg-server/render/mitrap.c
index 445f23630..37d917451 100644
--- a/xorg-server/render/mitrap.c
+++ b/xorg-server/render/mitrap.c
@@ -1,79 +1,79 @@
-/*
- *
- * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "scrnintstr.h"
-#include "gcstruct.h"
-#include "pixmapstr.h"
-#include "windowstr.h"
-#include "servermd.h"
-#include "mi.h"
-#include "picturestr.h"
-#include "mipict.h"
-
-static xFixed
-miLineFixedX (xLineFixed *l, xFixed y, Bool ceil)
-{
- xFixed dx = l->p2.x - l->p1.x;
- xFixed_32_32 ex = (xFixed_32_32) (y - l->p1.y) * dx;
- xFixed dy = l->p2.y - l->p1.y;
- if (ceil)
- ex += (dy - 1);
- return l->p1.x + (xFixed) (ex / dy);
-}
-
-void
-miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box)
-{
- box->y1 = MAXSHORT;
- box->y2 = MINSHORT;
- box->x1 = MAXSHORT;
- box->x2 = MINSHORT;
- for (; ntrap; ntrap--, traps++)
- {
- INT16 x1, y1, x2, y2;
-
- if (!xTrapezoidValid(traps))
- continue;
- y1 = xFixedToInt (traps->top);
- if (y1 < box->y1)
- box->y1 = y1;
-
- y2 = xFixedToInt (xFixedCeil (traps->bottom));
- if (y2 > box->y2)
- box->y2 = y2;
-
- x1 = xFixedToInt (min (miLineFixedX (&traps->left, traps->top, FALSE),
- miLineFixedX (&traps->left, traps->bottom, FALSE)));
- if (x1 < box->x1)
- box->x1 = x1;
-
- x2 = xFixedToInt (xFixedCeil (max (miLineFixedX (&traps->right, traps->top, TRUE),
- miLineFixedX (&traps->right, traps->bottom, TRUE))));
- if (x2 > box->x2)
- box->x2 = x2;
- }
-}
+/*
+ *
+ * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ *
+ * 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, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "scrnintstr.h"
+#include "gcstruct.h"
+#include "pixmapstr.h"
+#include "windowstr.h"
+#include "servermd.h"
+#include "mi.h"
+#include "picturestr.h"
+#include "mipict.h"
+
+static xFixed
+miLineFixedX (xLineFixed *l, xFixed y, Bool ceil)
+{
+ xFixed dx = l->p2.x - l->p1.x;
+ xFixed_32_32 ex = (xFixed_32_32) (y - l->p1.y) * dx;
+ xFixed dy = l->p2.y - l->p1.y;
+ if (ceil)
+ ex += (dy - 1);
+ return l->p1.x + (xFixed) (ex / dy);
+}
+
+void
+miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box)
+{
+ box->y1 = MAXSHORT;
+ box->y2 = MINSHORT;
+ box->x1 = MAXSHORT;
+ box->x2 = MINSHORT;
+ for (; ntrap; ntrap--, traps++)
+ {
+ INT16 x1, y1, x2, y2;
+
+ if (!xTrapezoidValid(traps))
+ continue;
+ y1 = xFixedToInt (traps->top);
+ if (y1 < box->y1)
+ box->y1 = y1;
+
+ y2 = xFixedToInt (xFixedCeil (traps->bottom));
+ if (y2 > box->y2)
+ box->y2 = y2;
+
+ x1 = xFixedToInt (min (miLineFixedX (&traps->left, traps->top, FALSE),
+ miLineFixedX (&traps->left, traps->bottom, FALSE)));
+ if (x1 < box->x1)
+ box->x1 = x1;
+
+ x2 = xFixedToInt (xFixedCeil (max (miLineFixedX (&traps->right, traps->top, TRUE),
+ miLineFixedX (&traps->right, traps->bottom, TRUE))));
+ if (x2 > box->x2)
+ box->x2 = x2;
+ }
+}
diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c
index fbb296809..04ae0e122 100644
--- a/xorg-server/render/render.c
+++ b/xorg-server/render/render.c
@@ -1,3394 +1,3394 @@
-/*
- *
- * Copyright © 2000 SuSE, Inc.
- *
- * 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, and that the name of SuSE not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. SuSE makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Keith Packard, SuSE, Inc.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "os.h"
-#include "dixstruct.h"
-#include "resource.h"
-#include "scrnintstr.h"
-#include "windowstr.h"
-#include "pixmapstr.h"
-#include "colormapst.h"
-#include "extnsionst.h"
-#include "servermd.h"
-#include <X11/extensions/render.h>
-#include <X11/extensions/renderproto.h>
-#include "picturestr.h"
-#include "glyphstr.h"
-#include <X11/Xfuncproto.h>
-#include "cursorstr.h"
-#include "xace.h"
-#include "protocol-versions.h"
-
-#ifdef PANORAMIX
-#include "panoramiX.h"
-#include "panoramiXsrv.h"
-#endif
-
-#if HAVE_STDINT_H
-#include <stdint.h>
-#elif !defined(UINT32_MAX)
-#define UINT32_MAX 0xffffffffU
-#endif
-
-static int ProcRenderQueryVersion (ClientPtr pClient);
-static int ProcRenderQueryPictFormats (ClientPtr pClient);
-static int ProcRenderQueryPictIndexValues (ClientPtr pClient);
-static int ProcRenderQueryDithers (ClientPtr pClient);
-static int ProcRenderCreatePicture (ClientPtr pClient);
-static int ProcRenderChangePicture (ClientPtr pClient);
-static int ProcRenderSetPictureClipRectangles (ClientPtr pClient);
-static int ProcRenderFreePicture (ClientPtr pClient);
-static int ProcRenderComposite (ClientPtr pClient);
-static int ProcRenderScale (ClientPtr pClient);
-static int ProcRenderTrapezoids (ClientPtr pClient);
-static int ProcRenderTriangles (ClientPtr pClient);
-static int ProcRenderTriStrip (ClientPtr pClient);
-static int ProcRenderTriFan (ClientPtr pClient);
-static int ProcRenderColorTrapezoids (ClientPtr pClient);
-static int ProcRenderColorTriangles (ClientPtr pClient);
-static int ProcRenderTransform (ClientPtr pClient);
-static int ProcRenderCreateGlyphSet (ClientPtr pClient);
-static int ProcRenderReferenceGlyphSet (ClientPtr pClient);
-static int ProcRenderFreeGlyphSet (ClientPtr pClient);
-static int ProcRenderAddGlyphs (ClientPtr pClient);
-static int ProcRenderAddGlyphsFromPicture (ClientPtr pClient);
-static int ProcRenderFreeGlyphs (ClientPtr pClient);
-static int ProcRenderCompositeGlyphs (ClientPtr pClient);
-static int ProcRenderFillRectangles (ClientPtr pClient);
-static int ProcRenderCreateCursor (ClientPtr pClient);
-static int ProcRenderSetPictureTransform (ClientPtr pClient);
-static int ProcRenderQueryFilters (ClientPtr pClient);
-static int ProcRenderSetPictureFilter (ClientPtr pClient);
-static int ProcRenderCreateAnimCursor (ClientPtr pClient);
-static int ProcRenderAddTraps (ClientPtr pClient);
-static int ProcRenderCreateSolidFill (ClientPtr pClient);
-static int ProcRenderCreateLinearGradient (ClientPtr pClient);
-static int ProcRenderCreateRadialGradient (ClientPtr pClient);
-static int ProcRenderCreateConicalGradient (ClientPtr pClient);
-
-static int ProcRenderDispatch (ClientPtr pClient);
-
-static int SProcRenderQueryVersion (ClientPtr pClient);
-static int SProcRenderQueryPictFormats (ClientPtr pClient);
-static int SProcRenderQueryPictIndexValues (ClientPtr pClient);
-static int SProcRenderQueryDithers (ClientPtr pClient);
-static int SProcRenderCreatePicture (ClientPtr pClient);
-static int SProcRenderChangePicture (ClientPtr pClient);
-static int SProcRenderSetPictureClipRectangles (ClientPtr pClient);
-static int SProcRenderFreePicture (ClientPtr pClient);
-static int SProcRenderComposite (ClientPtr pClient);
-static int SProcRenderScale (ClientPtr pClient);
-static int SProcRenderTrapezoids (ClientPtr pClient);
-static int SProcRenderTriangles (ClientPtr pClient);
-static int SProcRenderTriStrip (ClientPtr pClient);
-static int SProcRenderTriFan (ClientPtr pClient);
-static int SProcRenderColorTrapezoids (ClientPtr pClient);
-static int SProcRenderColorTriangles (ClientPtr pClient);
-static int SProcRenderTransform (ClientPtr pClient);
-static int SProcRenderCreateGlyphSet (ClientPtr pClient);
-static int SProcRenderReferenceGlyphSet (ClientPtr pClient);
-static int SProcRenderFreeGlyphSet (ClientPtr pClient);
-static int SProcRenderAddGlyphs (ClientPtr pClient);
-static int SProcRenderAddGlyphsFromPicture (ClientPtr pClient);
-static int SProcRenderFreeGlyphs (ClientPtr pClient);
-static int SProcRenderCompositeGlyphs (ClientPtr pClient);
-static int SProcRenderFillRectangles (ClientPtr pClient);
-static int SProcRenderCreateCursor (ClientPtr pClient);
-static int SProcRenderSetPictureTransform (ClientPtr pClient);
-static int SProcRenderQueryFilters (ClientPtr pClient);
-static int SProcRenderSetPictureFilter (ClientPtr pClient);
-static int SProcRenderCreateAnimCursor (ClientPtr pClient);
-static int SProcRenderAddTraps (ClientPtr pClient);
-static int SProcRenderCreateSolidFill (ClientPtr pClient);
-static int SProcRenderCreateLinearGradient (ClientPtr pClient);
-static int SProcRenderCreateRadialGradient (ClientPtr pClient);
-static int SProcRenderCreateConicalGradient (ClientPtr pClient);
-
-static int SProcRenderDispatch (ClientPtr pClient);
-
-int (*ProcRenderVector[RenderNumberRequests])(ClientPtr) = {
- ProcRenderQueryVersion,
- ProcRenderQueryPictFormats,
- ProcRenderQueryPictIndexValues,
- ProcRenderQueryDithers,
- ProcRenderCreatePicture,
- ProcRenderChangePicture,
- ProcRenderSetPictureClipRectangles,
- ProcRenderFreePicture,
- ProcRenderComposite,
- ProcRenderScale,
- ProcRenderTrapezoids,
- ProcRenderTriangles,
- ProcRenderTriStrip,
- ProcRenderTriFan,
- ProcRenderColorTrapezoids,
- ProcRenderColorTriangles,
- ProcRenderTransform,
- ProcRenderCreateGlyphSet,
- ProcRenderReferenceGlyphSet,
- ProcRenderFreeGlyphSet,
- ProcRenderAddGlyphs,
- ProcRenderAddGlyphsFromPicture,
- ProcRenderFreeGlyphs,
- ProcRenderCompositeGlyphs,
- ProcRenderCompositeGlyphs,
- ProcRenderCompositeGlyphs,
- ProcRenderFillRectangles,
- ProcRenderCreateCursor,
- ProcRenderSetPictureTransform,
- ProcRenderQueryFilters,
- ProcRenderSetPictureFilter,
- ProcRenderCreateAnimCursor,
- ProcRenderAddTraps,
- ProcRenderCreateSolidFill,
- ProcRenderCreateLinearGradient,
- ProcRenderCreateRadialGradient,
- ProcRenderCreateConicalGradient
-};
-
-int (*SProcRenderVector[RenderNumberRequests])(ClientPtr) = {
- SProcRenderQueryVersion,
- SProcRenderQueryPictFormats,
- SProcRenderQueryPictIndexValues,
- SProcRenderQueryDithers,
- SProcRenderCreatePicture,
- SProcRenderChangePicture,
- SProcRenderSetPictureClipRectangles,
- SProcRenderFreePicture,
- SProcRenderComposite,
- SProcRenderScale,
- SProcRenderTrapezoids,
- SProcRenderTriangles,
- SProcRenderTriStrip,
- SProcRenderTriFan,
- SProcRenderColorTrapezoids,
- SProcRenderColorTriangles,
- SProcRenderTransform,
- SProcRenderCreateGlyphSet,
- SProcRenderReferenceGlyphSet,
- SProcRenderFreeGlyphSet,
- SProcRenderAddGlyphs,
- SProcRenderAddGlyphsFromPicture,
- SProcRenderFreeGlyphs,
- SProcRenderCompositeGlyphs,
- SProcRenderCompositeGlyphs,
- SProcRenderCompositeGlyphs,
- SProcRenderFillRectangles,
- SProcRenderCreateCursor,
- SProcRenderSetPictureTransform,
- SProcRenderQueryFilters,
- SProcRenderSetPictureFilter,
- SProcRenderCreateAnimCursor,
- SProcRenderAddTraps,
- SProcRenderCreateSolidFill,
- SProcRenderCreateLinearGradient,
- SProcRenderCreateRadialGradient,
- SProcRenderCreateConicalGradient
-};
-
-int RenderErrBase;
-static DevPrivateKeyRec RenderClientPrivateKeyRec;
-#define RenderClientPrivateKey (&RenderClientPrivateKeyRec )
-
-typedef struct _RenderClient {
- int major_version;
- int minor_version;
-} RenderClientRec, *RenderClientPtr;
-
-#define GetRenderClient(pClient) ((RenderClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RenderClientPrivateKey))
-
-static void
-RenderClientCallback (CallbackListPtr *list,
- pointer closure,
- pointer data)
-{
- NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
- ClientPtr pClient = clientinfo->client;
- RenderClientPtr pRenderClient = GetRenderClient (pClient);
-
- pRenderClient->major_version = 0;
- pRenderClient->minor_version = 0;
-}
-
-#ifdef PANORAMIX
-RESTYPE XRT_PICTURE;
-#endif
-
-void
-RenderExtensionInit (void)
-{
- ExtensionEntry *extEntry;
-
- if (!PictureType)
- return;
- if (!PictureFinishInit ())
- return;
- if (!dixRegisterPrivateKey(&RenderClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(RenderClientRec)))
- return;
- if (!AddCallback (&ClientStateCallback, RenderClientCallback, 0))
- return;
-
- extEntry = AddExtension (RENDER_NAME, 0, RenderNumberErrors,
- ProcRenderDispatch, SProcRenderDispatch,
- NULL, StandardMinorOpcode);
- if (!extEntry)
- return;
- RenderErrBase = extEntry->errorBase;
-#ifdef PANORAMIX
- if (XRT_PICTURE)
- SetResourceTypeErrorValue(XRT_PICTURE, RenderErrBase + BadPicture);
-#endif
- SetResourceTypeErrorValue(PictureType, RenderErrBase + BadPicture);
- SetResourceTypeErrorValue(PictFormatType, RenderErrBase + BadPictFormat);
- SetResourceTypeErrorValue(GlyphSetType, RenderErrBase + BadGlyphSet);
-}
-
-static int
-ProcRenderQueryVersion (ClientPtr client)
-{
- RenderClientPtr pRenderClient = GetRenderClient (client);
- xRenderQueryVersionReply rep;
- register int n;
- REQUEST(xRenderQueryVersionReq);
-
- pRenderClient->major_version = stuff->majorVersion;
- pRenderClient->minor_version = stuff->minorVersion;
-
- REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
- memset(&rep, 0, sizeof(xRenderQueryVersionReply));
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-
- if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
- (SERVER_RENDER_MAJOR_VERSION * 1000 + SERVER_RENDER_MINOR_VERSION))
- {
- rep.majorVersion = stuff->majorVersion;
- rep.minorVersion = stuff->minorVersion;
- } else
- {
- rep.majorVersion = SERVER_RENDER_MAJOR_VERSION;
- rep.minorVersion = SERVER_RENDER_MINOR_VERSION;
- }
-
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.majorVersion, n);
- swapl(&rep.minorVersion, n);
- }
- WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep);
- return Success;
-}
-
-static VisualPtr
-findVisual (ScreenPtr pScreen, VisualID vid)
-{
- VisualPtr pVisual;
- int v;
-
- for (v = 0; v < pScreen->numVisuals; v++)
- {
- pVisual = pScreen->visuals + v;
- if (pVisual->vid == vid)
- return pVisual;
- }
- return 0;
-}
-
-static int
-ProcRenderQueryPictFormats (ClientPtr client)
-{
- RenderClientPtr pRenderClient = GetRenderClient (client);
- xRenderQueryPictFormatsReply *reply;
- xPictScreen *pictScreen;
- xPictDepth *pictDepth;
- xPictVisual *pictVisual;
- xPictFormInfo *pictForm;
- CARD32 *pictSubpixel;
- ScreenPtr pScreen;
- VisualPtr pVisual;
- DepthPtr pDepth;
- int v, d;
- PictureScreenPtr ps;
- PictFormatPtr pFormat;
- int nformat;
- int ndepth;
- int nvisual;
- int rlength;
- int s;
- int n;
- int numScreens;
- int numSubpixel;
-/* REQUEST(xRenderQueryPictFormatsReq); */
-
- REQUEST_SIZE_MATCH(xRenderQueryPictFormatsReq);
-
-#ifdef PANORAMIX
- if (noPanoramiXExtension)
- numScreens = screenInfo.numScreens;
- else
- numScreens = ((xConnSetup *)ConnectionInfo)->numRoots;
-#else
- numScreens = screenInfo.numScreens;
-#endif
- ndepth = nformat = nvisual = 0;
- for (s = 0; s < numScreens; s++)
- {
- pScreen = screenInfo.screens[s];
- for (d = 0; d < pScreen->numDepths; d++)
- {
- pDepth = pScreen->allowedDepths + d;
- ++ndepth;
-
- for (v = 0; v < pDepth->numVids; v++)
- {
- pVisual = findVisual (pScreen, pDepth->vids[v]);
- if (pVisual && PictureMatchVisual (pScreen, pDepth->depth, pVisual))
- ++nvisual;
- }
- }
- ps = GetPictureScreenIfSet(pScreen);
- if (ps)
- nformat += ps->nformats;
- }
- if (pRenderClient->major_version == 0 && pRenderClient->minor_version < 6)
- numSubpixel = 0;
- else
- numSubpixel = numScreens;
-
- rlength = (sizeof (xRenderQueryPictFormatsReply) +
- nformat * sizeof (xPictFormInfo) +
- numScreens * sizeof (xPictScreen) +
- ndepth * sizeof (xPictDepth) +
- nvisual * sizeof (xPictVisual) +
- numSubpixel * sizeof (CARD32));
- reply = (xRenderQueryPictFormatsReply *) calloc(1, rlength);
- if (!reply)
- return BadAlloc;
- reply->type = X_Reply;
- reply->sequenceNumber = client->sequence;
- reply->length = bytes_to_int32(rlength - sizeof(xGenericReply));
- reply->numFormats = nformat;
- reply->numScreens = numScreens;
- reply->numDepths = ndepth;
- reply->numVisuals = nvisual;
- reply->numSubpixel = numSubpixel;
-
- pictForm = (xPictFormInfo *) (reply + 1);
-
- for (s = 0; s < numScreens; s++)
- {
- pScreen = screenInfo.screens[s];
- ps = GetPictureScreenIfSet(pScreen);
- if (ps)
- {
- for (nformat = 0, pFormat = ps->formats;
- nformat < ps->nformats;
- nformat++, pFormat++)
- {
- pictForm->id = pFormat->id;
- pictForm->type = pFormat->type;
- pictForm->depth = pFormat->depth;
- pictForm->direct.red = pFormat->direct.red;
- pictForm->direct.redMask = pFormat->direct.redMask;
- pictForm->direct.green = pFormat->direct.green;
- pictForm->direct.greenMask = pFormat->direct.greenMask;
- pictForm->direct.blue = pFormat->direct.blue;
- pictForm->direct.blueMask = pFormat->direct.blueMask;
- pictForm->direct.alpha = pFormat->direct.alpha;
- pictForm->direct.alphaMask = pFormat->direct.alphaMask;
- if (pFormat->type == PictTypeIndexed && pFormat->index.pColormap)
- pictForm->colormap = pFormat->index.pColormap->mid;
- else
- pictForm->colormap = None;
- if (client->swapped)
- {
- swapl (&pictForm->id, n);
- swaps (&pictForm->direct.red, n);
- swaps (&pictForm->direct.redMask, n);
- swaps (&pictForm->direct.green, n);
- swaps (&pictForm->direct.greenMask, n);
- swaps (&pictForm->direct.blue, n);
- swaps (&pictForm->direct.blueMask, n);
- swaps (&pictForm->direct.alpha, n);
- swaps (&pictForm->direct.alphaMask, n);
- swapl (&pictForm->colormap, n);
- }
- pictForm++;
- }
- }
- }
-
- pictScreen = (xPictScreen *) pictForm;
- for (s = 0; s < numScreens; s++)
- {
- pScreen = screenInfo.screens[s];
- pictDepth = (xPictDepth *) (pictScreen + 1);
- ndepth = 0;
- for (d = 0; d < pScreen->numDepths; d++)
- {
- pictVisual = (xPictVisual *) (pictDepth + 1);
- pDepth = pScreen->allowedDepths + d;
-
- nvisual = 0;
- for (v = 0; v < pDepth->numVids; v++)
- {
- pVisual = findVisual (pScreen, pDepth->vids[v]);
- if (pVisual && (pFormat = PictureMatchVisual (pScreen,
- pDepth->depth,
- pVisual)))
- {
- pictVisual->visual = pVisual->vid;
- pictVisual->format = pFormat->id;
- if (client->swapped)
- {
- swapl (&pictVisual->visual, n);
- swapl (&pictVisual->format, n);
- }
- pictVisual++;
- nvisual++;
- }
- }
- pictDepth->depth = pDepth->depth;
- pictDepth->nPictVisuals = nvisual;
- if (client->swapped)
- {
- swaps (&pictDepth->nPictVisuals, n);
- }
- ndepth++;
- pictDepth = (xPictDepth *) pictVisual;
- }
- pictScreen->nDepth = ndepth;
- ps = GetPictureScreenIfSet(pScreen);
- if (ps)
- pictScreen->fallback = ps->fallback->id;
- else
- pictScreen->fallback = 0;
- if (client->swapped)
- {
- swapl (&pictScreen->nDepth, n);
- swapl (&pictScreen->fallback, n);
- }
- pictScreen = (xPictScreen *) pictDepth;
- }
- pictSubpixel = (CARD32 *) pictScreen;
-
- for (s = 0; s < numSubpixel; s++)
- {
- pScreen = screenInfo.screens[s];
- ps = GetPictureScreenIfSet(pScreen);
- if (ps)
- *pictSubpixel = ps->subpixel;
- else
- *pictSubpixel = SubPixelUnknown;
- if (client->swapped)
- {
- swapl (pictSubpixel, n);
- }
- ++pictSubpixel;
- }
-
- if (client->swapped)
- {
- swaps (&reply->sequenceNumber, n);
- swapl (&reply->length, n);
- swapl (&reply->numFormats, n);
- swapl (&reply->numScreens, n);
- swapl (&reply->numDepths, n);
- swapl (&reply->numVisuals, n);
- swapl (&reply->numSubpixel, n);
- }
- WriteToClient(client, rlength, (char *) reply);
- free(reply);
- return Success;
-}
-
-static int
-ProcRenderQueryPictIndexValues (ClientPtr client)
-{
- PictFormatPtr pFormat;
- int rc, num;
- int rlength;
- int i, n;
- REQUEST(xRenderQueryPictIndexValuesReq);
- xRenderQueryPictIndexValuesReply *reply;
- xIndexValue *values;
-
- REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq);
-
- rc = dixLookupResourceByType((pointer *)&pFormat, stuff->format,
- PictFormatType, client, DixReadAccess);
- if (rc != Success)
- return rc;
-
- if (pFormat->type != PictTypeIndexed)
- {
- client->errorValue = stuff->format;
- return BadMatch;
- }
- num = pFormat->index.nvalues;
- rlength = (sizeof (xRenderQueryPictIndexValuesReply) +
- num * sizeof(xIndexValue));
- reply = (xRenderQueryPictIndexValuesReply *) malloc(rlength);
- if (!reply)
- return BadAlloc;
-
- reply->type = X_Reply;
- reply->sequenceNumber = client->sequence;
- reply->length = bytes_to_int32(rlength - sizeof(xGenericReply));
- reply->numIndexValues = num;
-
- values = (xIndexValue *) (reply + 1);
-
- memcpy (reply + 1, pFormat->index.pValues, num * sizeof (xIndexValue));
-
- if (client->swapped)
- {
- for (i = 0; i < num; i++)
- {
- swapl (&values[i].pixel, n);
- swaps (&values[i].red, n);
- swaps (&values[i].green, n);
- swaps (&values[i].blue, n);
- swaps (&values[i].alpha, n);
- }
- swaps (&reply->sequenceNumber, n);
- swapl (&reply->length, n);
- swapl (&reply->numIndexValues, n);
- }
-
- WriteToClient(client, rlength, (char *) reply);
- free(reply);
- return Success;
-}
-
-static int
-ProcRenderQueryDithers (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-ProcRenderCreatePicture (ClientPtr client)
-{
- PicturePtr pPicture;
- DrawablePtr pDrawable;
- PictFormatPtr pFormat;
- int len, error, rc;
- REQUEST(xRenderCreatePictureReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
-
- LEGAL_NEW_RESOURCE(stuff->pid, client);
- rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
- DixReadAccess|DixAddAccess);
- if (rc != Success)
- return rc;
-
- rc = dixLookupResourceByType((pointer *)&pFormat, stuff->format,
- PictFormatType, client, DixReadAccess);
- if (rc != Success)
- return rc;
-
- if (pFormat->depth != pDrawable->depth)
- return BadMatch;
- len = client->req_len - bytes_to_int32(sizeof(xRenderCreatePictureReq));
- if (Ones(stuff->mask) != len)
- return BadLength;
-
- pPicture = CreatePicture (stuff->pid,
- pDrawable,
- pFormat,
- stuff->mask,
- (XID *) (stuff + 1),
- client,
- &error);
- if (!pPicture)
- return error;
- if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
- return BadAlloc;
- return Success;
-}
-
-static int
-ProcRenderChangePicture (ClientPtr client)
-{
- PicturePtr pPicture;
- REQUEST(xRenderChangePictureReq);
- int len;
-
- REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
- VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess);
-
- len = client->req_len - bytes_to_int32(sizeof(xRenderChangePictureReq));
- if (Ones(stuff->mask) != len)
- return BadLength;
-
- return ChangePicture (pPicture, stuff->mask, (XID *) (stuff + 1),
- (DevUnion *) 0, client);
-}
-
-static int
-ProcRenderSetPictureClipRectangles (ClientPtr client)
-{
- REQUEST(xRenderSetPictureClipRectanglesReq);
- PicturePtr pPicture;
- int nr;
-
- REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
- VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess);
- if (!pPicture->pDrawable)
- return BadDrawable;
-
- nr = (client->req_len << 2) - sizeof(xRenderSetPictureClipRectanglesReq);
- if (nr & 4)
- return BadLength;
- nr >>= 3;
- return SetPictureClipRects (pPicture,
- stuff->xOrigin, stuff->yOrigin,
- nr, (xRectangle *) &stuff[1]);
-}
-
-static int
-ProcRenderFreePicture (ClientPtr client)
-{
- PicturePtr pPicture;
- REQUEST(xRenderFreePictureReq);
-
- REQUEST_SIZE_MATCH(xRenderFreePictureReq);
-
- VERIFY_PICTURE (pPicture, stuff->picture, client, DixDestroyAccess);
- FreeResource (stuff->picture, RT_NONE);
- return Success;
-}
-
-static Bool
-PictOpValid (CARD8 op)
-{
- if (/*PictOpMinimum <= op && */ op <= PictOpMaximum)
- return TRUE;
- if (PictOpDisjointMinimum <= op && op <= PictOpDisjointMaximum)
- return TRUE;
- if (PictOpConjointMinimum <= op && op <= PictOpConjointMaximum)
- return TRUE;
- if (PictOpBlendMinimum <= op && op <= PictOpBlendMaximum)
- return TRUE;
- return FALSE;
-}
-
-static int
-ProcRenderComposite (ClientPtr client)
-{
- PicturePtr pSrc, pMask, pDst;
- REQUEST(xRenderCompositeReq);
-
- REQUEST_SIZE_MATCH(xRenderCompositeReq);
- if (!PictOpValid (stuff->op))
- {
- client->errorValue = stuff->op;
- return BadValue;
- }
- VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
- if (!pDst->pDrawable)
- return BadDrawable;
- VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
- VERIFY_ALPHA (pMask, stuff->mask, client, DixReadAccess);
- if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) ||
- (pMask && pMask->pDrawable && pDst->pDrawable->pScreen != pMask->pDrawable->pScreen))
- return BadMatch;
- CompositePicture (stuff->op,
- pSrc,
- pMask,
- pDst,
- stuff->xSrc,
- stuff->ySrc,
- stuff->xMask,
- stuff->yMask,
- stuff->xDst,
- stuff->yDst,
- stuff->width,
- stuff->height);
- return Success;
-}
-
-static int
-ProcRenderScale (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-ProcRenderTrapezoids (ClientPtr client)
-{
- int rc, ntraps;
- PicturePtr pSrc, pDst;
- PictFormatPtr pFormat;
- REQUEST(xRenderTrapezoidsReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq);
- if (!PictOpValid (stuff->op))
- {
- client->errorValue = stuff->op;
- return BadValue;
- }
- VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
- VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
- if (!pDst->pDrawable)
- return BadDrawable;
- if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)
- return BadMatch;
- if (stuff->maskFormat)
- {
- rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat,
- PictFormatType, client, DixReadAccess);
- if (rc != Success)
- return rc;
- }
- else
- pFormat = 0;
- ntraps = (client->req_len << 2) - sizeof (xRenderTrapezoidsReq);
- if (ntraps % sizeof (xTrapezoid))
- return BadLength;
- ntraps /= sizeof (xTrapezoid);
- if (ntraps)
- CompositeTrapezoids (stuff->op, pSrc, pDst, pFormat,
- stuff->xSrc, stuff->ySrc,
- ntraps, (xTrapezoid *) &stuff[1]);
- return Success;
-}
-
-static int
-ProcRenderTriangles (ClientPtr client)
-{
- int rc, ntris;
- PicturePtr pSrc, pDst;
- PictFormatPtr pFormat;
- REQUEST(xRenderTrianglesReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
- if (!PictOpValid (stuff->op))
- {
- client->errorValue = stuff->op;
- return BadValue;
- }
- VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
- VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
- if (!pDst->pDrawable)
- return BadDrawable;
- if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)
- return BadMatch;
- if (stuff->maskFormat)
- {
- rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat,
- PictFormatType, client, DixReadAccess);
- if (rc != Success)
- return rc;
- }
- else
- pFormat = 0;
- ntris = (client->req_len << 2) - sizeof (xRenderTrianglesReq);
- if (ntris % sizeof (xTriangle))
- return BadLength;
- ntris /= sizeof (xTriangle);
- if (ntris)
- CompositeTriangles (stuff->op, pSrc, pDst, pFormat,
- stuff->xSrc, stuff->ySrc,
- ntris, (xTriangle *) &stuff[1]);
- return Success;
-}
-
-static int
-ProcRenderTriStrip (ClientPtr client)
-{
- int rc, npoints;
- PicturePtr pSrc, pDst;
- PictFormatPtr pFormat;
- REQUEST(xRenderTrianglesReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
- if (!PictOpValid (stuff->op))
- {
- client->errorValue = stuff->op;
- return BadValue;
- }
- VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
- VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
- if (!pDst->pDrawable)
- return BadDrawable;
- if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)
- return BadMatch;
- if (stuff->maskFormat)
- {
- rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat,
- PictFormatType, client, DixReadAccess);
- if (rc != Success)
- return rc;
- }
- else
- pFormat = 0;
- npoints = ((client->req_len << 2) - sizeof (xRenderTriStripReq));
- if (npoints & 4)
- return BadLength;
- npoints >>= 3;
- if (npoints >= 3)
- CompositeTriStrip (stuff->op, pSrc, pDst, pFormat,
- stuff->xSrc, stuff->ySrc,
- npoints, (xPointFixed *) &stuff[1]);
- return Success;
-}
-
-static int
-ProcRenderTriFan (ClientPtr client)
-{
- int rc, npoints;
- PicturePtr pSrc, pDst;
- PictFormatPtr pFormat;
- REQUEST(xRenderTrianglesReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
- if (!PictOpValid (stuff->op))
- {
- client->errorValue = stuff->op;
- return BadValue;
- }
- VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
- VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
- if (!pDst->pDrawable)
- return BadDrawable;
- if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)
- return BadMatch;
- if (stuff->maskFormat)
- {
- rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat,
- PictFormatType, client, DixReadAccess);
- if (rc != Success)
- return rc;
- }
- else
- pFormat = 0;
- npoints = ((client->req_len << 2) - sizeof (xRenderTriStripReq));
- if (npoints & 4)
- return BadLength;
- npoints >>= 3;
- if (npoints >= 3)
- CompositeTriFan (stuff->op, pSrc, pDst, pFormat,
- stuff->xSrc, stuff->ySrc,
- npoints, (xPointFixed *) &stuff[1]);
- return Success;
-}
-
-static int
-ProcRenderColorTrapezoids (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-ProcRenderColorTriangles (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-ProcRenderTransform (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-ProcRenderCreateGlyphSet (ClientPtr client)
-{
- GlyphSetPtr glyphSet;
- PictFormatPtr format;
- int rc, f;
- REQUEST(xRenderCreateGlyphSetReq);
-
- REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq);
-
- LEGAL_NEW_RESOURCE(stuff->gsid, client);
- rc = dixLookupResourceByType((pointer *)&format, stuff->format,
- PictFormatType, client, DixReadAccess);
- if (rc != Success)
- return rc;
-
- switch (format->depth) {
- case 1:
- f = GlyphFormat1;
- break;
- case 4:
- f = GlyphFormat4;
- break;
- case 8:
- f = GlyphFormat8;
- break;
- case 16:
- f = GlyphFormat16;
- break;
- case 32:
- f = GlyphFormat32;
- break;
- default:
- return BadMatch;
- }
- if (format->type != PictTypeDirect)
- return BadMatch;
- glyphSet = AllocateGlyphSet (f, format);
- if (!glyphSet)
- return BadAlloc;
- /* security creation/labeling check */
- rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->gsid, GlyphSetType,
- glyphSet, RT_NONE, NULL, DixCreateAccess);
- if (rc != Success)
- return rc;
- if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet))
- return BadAlloc;
- return Success;
-}
-
-static int
-ProcRenderReferenceGlyphSet (ClientPtr client)
-{
- GlyphSetPtr glyphSet;
- int rc;
- REQUEST(xRenderReferenceGlyphSetReq);
-
- REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq);
-
- LEGAL_NEW_RESOURCE(stuff->gsid, client);
-
- rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->existing, GlyphSetType,
- client, DixGetAttrAccess);
- if (rc != Success)
- {
- client->errorValue = stuff->existing;
- return rc;
- }
- glyphSet->refcnt++;
- if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet))
- return BadAlloc;
- return Success;
-}
-
-#define NLOCALDELTA 64
-#define NLOCALGLYPH 256
-
-static int
-ProcRenderFreeGlyphSet (ClientPtr client)
-{
- GlyphSetPtr glyphSet;
- int rc;
- REQUEST(xRenderFreeGlyphSetReq);
-
- REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
- rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
- client, DixDestroyAccess);
- if (rc != Success)
- {
- client->errorValue = stuff->glyphset;
- return rc;
- }
- FreeResource (stuff->glyphset, RT_NONE);
- return Success;
-}
-
-typedef struct _GlyphNew {
- Glyph id;
- GlyphPtr glyph;
- Bool found;
- unsigned char sha1[20];
-} GlyphNewRec, *GlyphNewPtr;
-
-#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
-
-static int
-ProcRenderAddGlyphs (ClientPtr client)
-{
- GlyphSetPtr glyphSet;
- REQUEST(xRenderAddGlyphsReq);
- GlyphNewRec glyphsLocal[NLOCALGLYPH];
- GlyphNewPtr glyphsBase, glyphs, glyph_new;
- int remain, nglyphs;
- CARD32 *gids;
- xGlyphInfo *gi;
- CARD8 *bits;
- unsigned int size;
- int err;
- int i, screen;
- PicturePtr pSrc = NULL, pDst = NULL;
- PixmapPtr pSrcPix = NULL, pDstPix = NULL;
- CARD32 component_alpha;
-
- REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq);
- err = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
- client, DixAddAccess);
- if (err != Success)
- {
- client->errorValue = stuff->glyphset;
- return err;
- }
-
- err = BadAlloc;
- nglyphs = stuff->nglyphs;
- if (nglyphs > UINT32_MAX / sizeof(GlyphNewRec))
- return BadAlloc;
-
- component_alpha = NeedsComponent (glyphSet->format->format);
-
- if (nglyphs <= NLOCALGLYPH) {
- memset (glyphsLocal, 0, sizeof (glyphsLocal));
- glyphsBase = glyphsLocal;
- }
- else
- {
- glyphsBase = (GlyphNewPtr)calloc(nglyphs, sizeof (GlyphNewRec));
- if (!glyphsBase)
- return BadAlloc;
- }
-
- remain = (client->req_len << 2) - sizeof (xRenderAddGlyphsReq);
-
- glyphs = glyphsBase;
-
- gids = (CARD32 *) (stuff + 1);
- gi = (xGlyphInfo *) (gids + nglyphs);
- bits = (CARD8 *) (gi + nglyphs);
- remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs;
-
- /* protect against bad nglyphs */
- if (gi < ((xGlyphInfo *)stuff) ||
- gi > ((xGlyphInfo *)((CARD32 *)stuff + client->req_len)) ||
- bits < ((CARD8 *)stuff) ||
- bits > ((CARD8 *)((CARD32 *)stuff + client->req_len))) {
- err = BadLength;
- goto bail;
- }
-
- for (i = 0; i < nglyphs; i++)
- {
- size_t padded_width;
- glyph_new = &glyphs[i];
-
- padded_width = PixmapBytePad (gi[i].width,
- glyphSet->format->depth);
-
- if (gi[i].height && padded_width > (UINT32_MAX - sizeof(GlyphRec))/gi[i].height)
- break;
-
- size = gi[i].height * padded_width;
- if (remain < size)
- break;
-
- err = HashGlyph (&gi[i], bits, size, glyph_new->sha1);
- if (err)
- goto bail;
-
- glyph_new->glyph = FindGlyphByHash (glyph_new->sha1,
- glyphSet->fdepth);
-
- if (glyph_new->glyph && glyph_new->glyph != DeletedGlyph)
- {
- glyph_new->found = TRUE;
- }
- else
- {
- GlyphPtr glyph;
-
- glyph_new->found = FALSE;
- glyph_new->glyph = glyph = AllocateGlyph (&gi[i], glyphSet->fdepth);
- if (! glyph)
- {
- err = BadAlloc;
- goto bail;
- }
-
- for (screen = 0; screen < screenInfo.numScreens; screen++)
- {
- int width = gi[i].width;
- int height = gi[i].height;
- int depth = glyphSet->format->depth;
- ScreenPtr pScreen;
- int error;
-
- /* Skip work if it's invisibly small anyway */
- if (!width || !height)
- break;
-
- pScreen = screenInfo.screens[screen];
- pSrcPix = GetScratchPixmapHeader (pScreen,
- width, height,
- depth, depth,
- -1, bits);
- if (! pSrcPix)
- {
- err = BadAlloc;
- goto bail;
- }
-
- pSrc = CreatePicture (0, &pSrcPix->drawable,
- glyphSet->format, 0, NULL,
- serverClient, &error);
- if (! pSrc)
- {
- err = BadAlloc;
- goto bail;
- }
-
- pDstPix = (pScreen->CreatePixmap) (pScreen,
- width, height, depth,
- CREATE_PIXMAP_USAGE_GLYPH_PICTURE);
-
- if (!pDstPix)
- {
- err = BadAlloc;
- goto bail;
- }
-
- GlyphPicture (glyph)[screen] = pDst =
- CreatePicture (0, &pDstPix->drawable,
- glyphSet->format,
- CPComponentAlpha, &component_alpha,
- serverClient, &error);
-
- /* The picture takes a reference to the pixmap, so we
- drop ours. */
- (pScreen->DestroyPixmap) (pDstPix);
- pDstPix = NULL;
-
- if (! pDst)
- {
- err = BadAlloc;
- goto bail;
- }
-
- CompositePicture (PictOpSrc,
- pSrc,
- None,
- pDst,
- 0, 0,
- 0, 0,
- 0, 0,
- width, height);
-
- FreePicture ((pointer) pSrc, 0);
- pSrc = NULL;
- FreeScratchPixmapHeader (pSrcPix);
- pSrcPix = NULL;
- }
-
- memcpy (glyph_new->glyph->sha1, glyph_new->sha1, 20);
- }
-
- glyph_new->id = gids[i];
-
- if (size & 3)
- size += 4 - (size & 3);
- bits += size;
- remain -= size;
- }
- if (remain || i < nglyphs)
- {
- err = BadLength;
- goto bail;
- }
- if (!ResizeGlyphSet (glyphSet, nglyphs))
- {
- err = BadAlloc;
- goto bail;
- }
- for (i = 0; i < nglyphs; i++)
- AddGlyph (glyphSet, glyphs[i].glyph, glyphs[i].id);
-
- if (glyphsBase != glyphsLocal)
- free(glyphsBase);
- return Success;
-bail:
- if (pSrc)
- FreePicture ((pointer) pSrc, 0);
- if (pSrcPix)
- FreeScratchPixmapHeader (pSrcPix);
- for (i = 0; i < nglyphs; i++)
- if (glyphs[i].glyph && ! glyphs[i].found)
- free(glyphs[i].glyph);
- if (glyphsBase != glyphsLocal)
- free(glyphsBase);
- return err;
-}
-
-static int
-ProcRenderAddGlyphsFromPicture (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-ProcRenderFreeGlyphs (ClientPtr client)
-{
- REQUEST(xRenderFreeGlyphsReq);
- GlyphSetPtr glyphSet;
- int rc, nglyph;
- CARD32 *gids;
- CARD32 glyph;
-
- REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
- rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
- client, DixRemoveAccess);
- if (rc != Success)
- {
- client->errorValue = stuff->glyphset;
- return rc;
- }
- nglyph = bytes_to_int32((client->req_len << 2) - sizeof (xRenderFreeGlyphsReq));
- gids = (CARD32 *) (stuff + 1);
- while (nglyph-- > 0)
- {
- glyph = *gids++;
- if (!DeleteGlyph (glyphSet, glyph))
- {
- client->errorValue = glyph;
- return RenderErrBase + BadGlyph;
- }
- }
- return Success;
-}
-
-static int
-ProcRenderCompositeGlyphs (ClientPtr client)
-{
- GlyphSetPtr glyphSet;
- GlyphSet gs;
- PicturePtr pSrc, pDst;
- PictFormatPtr pFormat;
- GlyphListRec listsLocal[NLOCALDELTA];
- GlyphListPtr lists, listsBase;
- GlyphPtr glyphsLocal[NLOCALGLYPH];
- Glyph glyph;
- GlyphPtr *glyphs, *glyphsBase;
- xGlyphElt *elt;
- CARD8 *buffer, *end;
- int nglyph;
- int nlist;
- int space;
- int size;
- int rc, n;
-
- REQUEST(xRenderCompositeGlyphsReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq);
-
- switch (stuff->renderReqType) {
- default: size = 1; break;
- case X_RenderCompositeGlyphs16: size = 2; break;
- case X_RenderCompositeGlyphs32: size = 4; break;
- }
-
- if (!PictOpValid (stuff->op))
- {
- client->errorValue = stuff->op;
- return BadValue;
- }
- VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
- VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
- if (!pDst->pDrawable)
- return BadDrawable;
- if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)
- return BadMatch;
- if (stuff->maskFormat)
- {
- rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat,
- PictFormatType, client, DixReadAccess);
- if (rc != Success)
- return rc;
- }
- else
- pFormat = 0;
-
- rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset,
- GlyphSetType, client, DixUseAccess);
- if (rc != Success)
- return rc;
-
- buffer = (CARD8 *) (stuff + 1);
- end = (CARD8 *) stuff + (client->req_len << 2);
- nglyph = 0;
- nlist = 0;
- while (buffer + sizeof (xGlyphElt) < end)
- {
- elt = (xGlyphElt *) buffer;
- buffer += sizeof (xGlyphElt);
-
- if (elt->len == 0xff)
- {
- buffer += 4;
- }
- else
- {
- nlist++;
- nglyph += elt->len;
- space = size * elt->len;
- if (space & 3)
- space += 4 - (space & 3);
- buffer += space;
- }
- }
- if (nglyph <= NLOCALGLYPH)
- glyphsBase = glyphsLocal;
- else
- {
- glyphsBase = (GlyphPtr *) malloc(nglyph * sizeof (GlyphPtr));
- if (!glyphsBase)
- return BadAlloc;
- }
- if (nlist <= NLOCALDELTA)
- listsBase = listsLocal;
- else
- {
- listsBase = (GlyphListPtr) malloc(nlist * sizeof (GlyphListRec));
- if (!listsBase)
- return BadAlloc;
- }
- buffer = (CARD8 *) (stuff + 1);
- glyphs = glyphsBase;
- lists = listsBase;
- while (buffer + sizeof (xGlyphElt) < end)
- {
- elt = (xGlyphElt *) buffer;
- buffer += sizeof (xGlyphElt);
-
- if (elt->len == 0xff)
- {
- if (buffer + sizeof (GlyphSet) < end)
- {
- memcpy(&gs, buffer, sizeof(GlyphSet));
- rc = dixLookupResourceByType((pointer *)&glyphSet, gs,
- GlyphSetType, client,
- DixUseAccess);
- if (rc != Success)
- {
- if (glyphsBase != glyphsLocal)
- free(glyphsBase);
- if (listsBase != listsLocal)
- free(listsBase);
- return rc;
- }
- }
- buffer += 4;
- }
- else
- {
- lists->xOff = elt->deltax;
- lists->yOff = elt->deltay;
- lists->format = glyphSet->format;
- lists->len = 0;
- n = elt->len;
- while (n--)
- {
- if (buffer + size <= end)
- {
- switch (size) {
- case 1:
- glyph = *((CARD8 *)buffer); break;
- case 2:
- glyph = *((CARD16 *)buffer); break;
- case 4:
- default:
- glyph = *((CARD32 *)buffer); break;
- }
- if ((*glyphs = FindGlyph (glyphSet, glyph)))
- {
- lists->len++;
- glyphs++;
- }
- }
- buffer += size;
- }
- space = size * elt->len;
- if (space & 3)
- buffer += 4 - (space & 3);
- lists++;
- }
- }
- if (buffer > end)
- return BadLength;
-
- CompositeGlyphs (stuff->op,
- pSrc,
- pDst,
- pFormat,
- stuff->xSrc,
- stuff->ySrc,
- nlist,
- listsBase,
- glyphsBase);
-
- if (glyphsBase != glyphsLocal)
- free(glyphsBase);
- if (listsBase != listsLocal)
- free(listsBase);
-
- return Success;
-}
-
-static int
-ProcRenderFillRectangles (ClientPtr client)
-{
- PicturePtr pDst;
- int things;
- REQUEST(xRenderFillRectanglesReq);
-
- REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq);
- if (!PictOpValid (stuff->op))
- {
- client->errorValue = stuff->op;
- return BadValue;
- }
- VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
- if (!pDst->pDrawable)
- return BadDrawable;
-
- things = (client->req_len << 2) - sizeof(xRenderFillRectanglesReq);
- if (things & 4)
- return BadLength;
- things >>= 3;
-
- CompositeRects (stuff->op,
- pDst,
- &stuff->color,
- things,
- (xRectangle *) &stuff[1]);
-
- return Success;
-}
-
-static void
-RenderSetBit (unsigned char *line, int x, int bit)
-{
- unsigned char mask;
-
- if (screenInfo.bitmapBitOrder == LSBFirst)
- mask = (1 << (x & 7));
- else
- mask = (0x80 >> (x & 7));
- /* XXX assumes byte order is host byte order */
- line += (x >> 3);
- if (bit)
- *line |= mask;
- else
- *line &= ~mask;
-}
-
-#define DITHER_DIM 2
-
-static CARD32 orderedDither[DITHER_DIM][DITHER_DIM] = {
- { 1, 3, },
- { 4, 2, },
-};
-
-#define DITHER_SIZE ((sizeof orderedDither / sizeof orderedDither[0][0]) + 1)
-
-static int
-ProcRenderCreateCursor (ClientPtr client)
-{
- REQUEST(xRenderCreateCursorReq);
- PicturePtr pSrc;
- ScreenPtr pScreen;
- unsigned short width, height;
- CARD32 *argbbits, *argb;
- unsigned char *srcbits, *srcline;
- unsigned char *mskbits, *mskline;
- int stride;
- int x, y;
- int nbytes_mono;
- CursorMetricRec cm;
- CursorPtr pCursor;
- CARD32 twocolor[3];
- int rc, ncolor;
-
- REQUEST_SIZE_MATCH (xRenderCreateCursorReq);
- LEGAL_NEW_RESOURCE(stuff->cid, client);
-
- VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
- if (!pSrc->pDrawable)
- return BadDrawable;
- pScreen = pSrc->pDrawable->pScreen;
- width = pSrc->pDrawable->width;
- height = pSrc->pDrawable->height;
- if (height && width > UINT32_MAX/(height*sizeof(CARD32)))
- return BadAlloc;
- if ( stuff->x > width
- || stuff->y > height )
- return BadMatch;
- argbbits = malloc(width * height * sizeof (CARD32));
- if (!argbbits)
- return BadAlloc;
-
- stride = BitmapBytePad(width);
- nbytes_mono = stride*height;
- srcbits = calloc(1, nbytes_mono);
- if (!srcbits)
- {
- free(argbbits);
- return BadAlloc;
- }
- mskbits = calloc(1, nbytes_mono);
- if (!mskbits)
- {
- free(argbbits);
- free(srcbits);
- return BadAlloc;
- }
-
- if (pSrc->format == PICT_a8r8g8b8)
- {
- (*pScreen->GetImage) (pSrc->pDrawable,
- 0, 0, width, height, ZPixmap,
- 0xffffffff, (pointer) argbbits);
- }
- else
- {
- PixmapPtr pPixmap;
- PicturePtr pPicture;
- PictFormatPtr pFormat;
- int error;
-
- pFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8);
- if (!pFormat)
- {
- free(argbbits);
- free(srcbits);
- free(mskbits);
- return BadImplementation;
- }
- pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32,
- CREATE_PIXMAP_USAGE_SCRATCH);
- if (!pPixmap)
- {
- free(argbbits);
- free(srcbits);
- free(mskbits);
- return BadAlloc;
- }
- pPicture = CreatePicture (0, &pPixmap->drawable, pFormat, 0, 0,
- client, &error);
- if (!pPicture)
- {
- free(argbbits);
- free(srcbits);
- free(mskbits);
- return error;
- }
- (*pScreen->DestroyPixmap) (pPixmap);
- CompositePicture (PictOpSrc,
- pSrc, 0, pPicture,
- 0, 0, 0, 0, 0, 0, width, height);
- (*pScreen->GetImage) (pPicture->pDrawable,
- 0, 0, width, height, ZPixmap,
- 0xffffffff, (pointer) argbbits);
- FreePicture (pPicture, 0);
- }
- /*
- * Check whether the cursor can be directly supported by
- * the core cursor code
- */
- ncolor = 0;
- argb = argbbits;
- for (y = 0; ncolor <= 2 && y < height; y++)
- {
- for (x = 0; ncolor <= 2 && x < width; x++)
- {
- CARD32 p = *argb++;
- CARD32 a = (p >> 24);
-
- if (a == 0) /* transparent */
- continue;
- if (a == 0xff) /* opaque */
- {
- int n;
- for (n = 0; n < ncolor; n++)
- if (p == twocolor[n])
- break;
- if (n == ncolor)
- twocolor[ncolor++] = p;
- }
- else
- ncolor = 3;
- }
- }
-
- /*
- * Convert argb image to two plane cursor
- */
- srcline = srcbits;
- mskline = mskbits;
- argb = argbbits;
- for (y = 0; y < height; y++)
- {
- for (x = 0; x < width; x++)
- {
- CARD32 p = *argb++;
-
- if (ncolor <= 2)
- {
- CARD32 a = ((p >> 24));
-
- RenderSetBit (mskline, x, a != 0);
- RenderSetBit (srcline, x, a != 0 && p == twocolor[0]);
- }
- else
- {
- CARD32 a = ((p >> 24) * DITHER_SIZE + 127) / 255;
- CARD32 i = ((CvtR8G8B8toY15(p) >> 7) * DITHER_SIZE + 127) / 255;
- CARD32 d = orderedDither[y&(DITHER_DIM-1)][x&(DITHER_DIM-1)];
- /* Set mask from dithered alpha value */
- RenderSetBit(mskline, x, a > d);
- /* Set src from dithered intensity value */
- RenderSetBit(srcline, x, a > d && i <= d);
- }
- }
- srcline += stride;
- mskline += stride;
- }
- /*
- * Dither to white and black if the cursor has more than two colors
- */
- if (ncolor > 2)
- {
- twocolor[0] = 0xff000000;
- twocolor[1] = 0xffffffff;
- }
- else
- {
- free(argbbits);
- argbbits = 0;
- }
-
-#define GetByte(p,s) (((p) >> (s)) & 0xff)
-#define GetColor(p,s) (GetByte(p,s) | (GetByte(p,s) << 8))
-
- cm.width = width;
- cm.height = height;
- cm.xhot = stuff->x;
- cm.yhot = stuff->y;
- rc = AllocARGBCursor(srcbits, mskbits, argbbits, &cm,
- GetColor(twocolor[0], 16),
- GetColor(twocolor[0], 8),
- GetColor(twocolor[0], 0),
- GetColor(twocolor[1], 16),
- GetColor(twocolor[1], 8),
- GetColor(twocolor[1], 0),
- &pCursor, client, stuff->cid);
- if (rc != Success)
- return rc;
- if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
- return BadAlloc;
-
- return Success;
-}
-
-static int
-ProcRenderSetPictureTransform (ClientPtr client)
-{
- REQUEST(xRenderSetPictureTransformReq);
- PicturePtr pPicture;
-
- REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
- VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess);
- return SetPictureTransform (pPicture, (PictTransform *) &stuff->transform);
-}
-
-static int
-ProcRenderQueryFilters (ClientPtr client)
-{
- REQUEST (xRenderQueryFiltersReq);
- DrawablePtr pDrawable;
- xRenderQueryFiltersReply *reply;
- int nbytesName;
- int nnames;
- ScreenPtr pScreen;
- PictureScreenPtr ps;
- int i, j, len, total_bytes, rc;
- INT16 *aliases;
- char *names;
-
- REQUEST_SIZE_MATCH(xRenderQueryFiltersReq);
- rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
- DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- pScreen = pDrawable->pScreen;
- nbytesName = 0;
- nnames = 0;
- ps = GetPictureScreenIfSet(pScreen);
- if (ps)
- {
- for (i = 0; i < ps->nfilters; i++)
- nbytesName += 1 + strlen (ps->filters[i].name);
- for (i = 0; i < ps->nfilterAliases; i++)
- nbytesName += 1 + strlen (ps->filterAliases[i].alias);
- nnames = ps->nfilters + ps->nfilterAliases;
- }
- len = ((nnames + 1) >> 1) + bytes_to_int32(nbytesName);
- total_bytes = sizeof (xRenderQueryFiltersReply) + (len << 2);
- reply = (xRenderQueryFiltersReply *) malloc(total_bytes);
- if (!reply)
- return BadAlloc;
- aliases = (INT16 *) (reply + 1);
- names = (char *) (aliases + ((nnames + 1) & ~1));
-
- reply->type = X_Reply;
- reply->sequenceNumber = client->sequence;
- reply->length = len;
- reply->numAliases = nnames;
- reply->numFilters = nnames;
- if (ps)
- {
-
- /* fill in alias values */
- for (i = 0; i < ps->nfilters; i++)
- aliases[i] = FilterAliasNone;
- for (i = 0; i < ps->nfilterAliases; i++)
- {
- for (j = 0; j < ps->nfilters; j++)
- if (ps->filterAliases[i].filter_id == ps->filters[j].id)
- break;
- if (j == ps->nfilters)
- {
- for (j = 0; j < ps->nfilterAliases; j++)
- if (ps->filterAliases[i].filter_id ==
- ps->filterAliases[j].alias_id)
- {
- break;
- }
- if (j == ps->nfilterAliases)
- j = FilterAliasNone;
- else
- j = j + ps->nfilters;
- }
- aliases[i + ps->nfilters] = j;
- }
-
- /* fill in filter names */
- for (i = 0; i < ps->nfilters; i++)
- {
- j = strlen (ps->filters[i].name);
- *names++ = j;
- strncpy (names, ps->filters[i].name, j);
- names += j;
- }
-
- /* fill in filter alias names */
- for (i = 0; i < ps->nfilterAliases; i++)
- {
- j = strlen (ps->filterAliases[i].alias);
- *names++ = j;
- strncpy (names, ps->filterAliases[i].alias, j);
- names += j;
- }
- }
-
- if (client->swapped)
- {
- register int n;
-
- for (i = 0; i < reply->numAliases; i++)
- {
- swaps (&aliases[i], n);
- }
- swaps(&reply->sequenceNumber, n);
- swapl(&reply->length, n);
- swapl(&reply->numAliases, n);
- swapl(&reply->numFilters, n);
- }
- WriteToClient(client, total_bytes, (char *) reply);
- free(reply);
-
- return Success;
-}
-
-static int
-ProcRenderSetPictureFilter (ClientPtr client)
-{
- REQUEST (xRenderSetPictureFilterReq);
- PicturePtr pPicture;
- int result;
- xFixed *params;
- int nparams;
- char *name;
-
- REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq);
- VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess);
- name = (char *) (stuff + 1);
- params = (xFixed *) (name + pad_to_int32(stuff->nbytes));
- nparams = ((xFixed *) stuff + client->req_len) - params;
- result = SetPictureFilter (pPicture, name, stuff->nbytes, params, nparams);
- return result;
-}
-
-static int
-ProcRenderCreateAnimCursor (ClientPtr client)
-{
- REQUEST(xRenderCreateAnimCursorReq);
- CursorPtr *cursors;
- CARD32 *deltas;
- CursorPtr pCursor;
- int ncursor;
- xAnimCursorElt *elt;
- int i;
- int ret;
-
- REQUEST_AT_LEAST_SIZE(xRenderCreateAnimCursorReq);
- LEGAL_NEW_RESOURCE(stuff->cid, client);
- if (client->req_len & 1)
- return BadLength;
- ncursor = (client->req_len - (bytes_to_int32(sizeof(xRenderCreateAnimCursorReq)))) >> 1;
- cursors = malloc(ncursor * (sizeof (CursorPtr) + sizeof (CARD32)));
- if (!cursors)
- return BadAlloc;
- deltas = (CARD32 *) (cursors + ncursor);
- elt = (xAnimCursorElt *) (stuff + 1);
- for (i = 0; i < ncursor; i++)
- {
- ret = dixLookupResourceByType((pointer *)(cursors + i), elt->cursor,
- RT_CURSOR, client, DixReadAccess);
- if (ret != Success)
- {
- free(cursors);
- return ret;
- }
- deltas[i] = elt->delay;
- elt++;
- }
- ret = AnimCursorCreate (cursors, deltas, ncursor, &pCursor, client,
- stuff->cid);
- free(cursors);
- if (ret != Success)
- return ret;
-
- if (AddResource (stuff->cid, RT_CURSOR, (pointer)pCursor))
- return Success;
- return BadAlloc;
-}
-
-static int
-ProcRenderAddTraps (ClientPtr client)
-{
- int ntraps;
- PicturePtr pPicture;
- REQUEST(xRenderAddTrapsReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq);
- VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess);
- if (!pPicture->pDrawable)
- return BadDrawable;
- ntraps = (client->req_len << 2) - sizeof (xRenderAddTrapsReq);
- if (ntraps % sizeof (xTrap))
- return BadLength;
- ntraps /= sizeof (xTrap);
- if (ntraps)
- AddTraps (pPicture,
- stuff->xOff, stuff->yOff,
- ntraps, (xTrap *) &stuff[1]);
- return Success;
-}
-
-static int ProcRenderCreateSolidFill(ClientPtr client)
-{
- PicturePtr pPicture;
- int error = 0;
- REQUEST(xRenderCreateSolidFillReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq);
-
- LEGAL_NEW_RESOURCE(stuff->pid, client);
-
- pPicture = CreateSolidPicture(stuff->pid, &stuff->color, &error);
- if (!pPicture)
- return error;
- /* security creation/labeling check */
- error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
- pPicture, RT_NONE, NULL, DixCreateAccess);
- if (error != Success)
- return error;
- if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
- return BadAlloc;
- return Success;
-}
-
-static int ProcRenderCreateLinearGradient (ClientPtr client)
-{
- PicturePtr pPicture;
- int len;
- int error = 0;
- xFixed *stops;
- xRenderColor *colors;
- REQUEST(xRenderCreateLinearGradientReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq);
-
- LEGAL_NEW_RESOURCE(stuff->pid, client);
-
- len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
- if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
- return BadLength;
- if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
- return BadLength;
-
- stops = (xFixed *)(stuff + 1);
- colors = (xRenderColor *)(stops + stuff->nStops);
-
- pPicture = CreateLinearGradientPicture (stuff->pid, &stuff->p1, &stuff->p2,
- stuff->nStops, stops, colors, &error);
- if (!pPicture)
- return error;
- /* security creation/labeling check */
- error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
- pPicture, RT_NONE, NULL, DixCreateAccess);
- if (error != Success)
- return error;
- if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
- return BadAlloc;
- return Success;
-}
-
-static int ProcRenderCreateRadialGradient (ClientPtr client)
-{
- PicturePtr pPicture;
- int len;
- int error = 0;
- xFixed *stops;
- xRenderColor *colors;
- REQUEST(xRenderCreateRadialGradientReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq);
-
- LEGAL_NEW_RESOURCE(stuff->pid, client);
-
- len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq);
- if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
- return BadLength;
-
- stops = (xFixed *)(stuff + 1);
- colors = (xRenderColor *)(stops + stuff->nStops);
-
- pPicture = CreateRadialGradientPicture (stuff->pid, &stuff->inner, &stuff->outer,
- stuff->inner_radius, stuff->outer_radius,
- stuff->nStops, stops, colors, &error);
- if (!pPicture)
- return error;
- /* security creation/labeling check */
- error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
- pPicture, RT_NONE, NULL, DixCreateAccess);
- if (error != Success)
- return error;
- if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
- return BadAlloc;
- return Success;
-}
-
-static int ProcRenderCreateConicalGradient (ClientPtr client)
-{
- PicturePtr pPicture;
- int len;
- int error = 0;
- xFixed *stops;
- xRenderColor *colors;
- REQUEST(xRenderCreateConicalGradientReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq);
-
- LEGAL_NEW_RESOURCE(stuff->pid, client);
-
- len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq);
- if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
- return BadLength;
-
- stops = (xFixed *)(stuff + 1);
- colors = (xRenderColor *)(stops + stuff->nStops);
-
- pPicture = CreateConicalGradientPicture (stuff->pid, &stuff->center, stuff->angle,
- stuff->nStops, stops, colors, &error);
- if (!pPicture)
- return error;
- /* security creation/labeling check */
- error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
- pPicture, RT_NONE, NULL, DixCreateAccess);
- if (error != Success)
- return error;
- if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
- return BadAlloc;
- return Success;
-}
-
-
-static int
-ProcRenderDispatch (ClientPtr client)
-{
- REQUEST(xReq);
-
- if (stuff->data < RenderNumberRequests)
- return (*ProcRenderVector[stuff->data]) (client);
- else
- return BadRequest;
-}
-
-static int
-SProcRenderQueryVersion (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderQueryVersionReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->majorVersion, n);
- swapl(&stuff->minorVersion, n);
- return (*ProcRenderVector[stuff->renderReqType])(client);
-}
-
-static int
-SProcRenderQueryPictFormats (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderQueryPictFormatsReq);
- swaps(&stuff->length, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderQueryPictIndexValues (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderQueryPictIndexValuesReq);
- swaps(&stuff->length, n);
- swapl(&stuff->format, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderQueryDithers (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-SProcRenderCreatePicture (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderCreatePictureReq);
- swaps(&stuff->length, n);
- swapl(&stuff->pid, n);
- swapl(&stuff->drawable, n);
- swapl(&stuff->format, n);
- swapl(&stuff->mask, n);
- SwapRestL(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderChangePicture (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderChangePictureReq);
- swaps(&stuff->length, n);
- swapl(&stuff->picture, n);
- swapl(&stuff->mask, n);
- SwapRestL(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderSetPictureClipRectangles (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderSetPictureClipRectanglesReq);
- swaps(&stuff->length, n);
- swapl(&stuff->picture, n);
- swaps(&stuff->xOrigin, n);
- swaps(&stuff->yOrigin, n);
- SwapRestS(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderFreePicture (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderFreePictureReq);
- swaps(&stuff->length, n);
- swapl(&stuff->picture, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderComposite (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderCompositeReq);
- swaps(&stuff->length, n);
- swapl(&stuff->src, n);
- swapl(&stuff->mask, n);
- swapl(&stuff->dst, n);
- swaps(&stuff->xSrc, n);
- swaps(&stuff->ySrc, n);
- swaps(&stuff->xMask, n);
- swaps(&stuff->yMask, n);
- swaps(&stuff->xDst, n);
- swaps(&stuff->yDst, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderScale (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderScaleReq);
- swaps(&stuff->length, n);
- swapl(&stuff->src, n);
- swapl(&stuff->dst, n);
- swapl(&stuff->colorScale, n);
- swapl(&stuff->alphaScale, n);
- swaps(&stuff->xSrc, n);
- swaps(&stuff->ySrc, n);
- swaps(&stuff->xDst, n);
- swaps(&stuff->yDst, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderTrapezoids (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderTrapezoidsReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq);
- swaps (&stuff->length, n);
- swapl (&stuff->src, n);
- swapl (&stuff->dst, n);
- swapl (&stuff->maskFormat, n);
- swaps (&stuff->xSrc, n);
- swaps (&stuff->ySrc, n);
- SwapRestL(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderTriangles (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderTrianglesReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
- swaps (&stuff->length, n);
- swapl (&stuff->src, n);
- swapl (&stuff->dst, n);
- swapl (&stuff->maskFormat, n);
- swaps (&stuff->xSrc, n);
- swaps (&stuff->ySrc, n);
- SwapRestL(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderTriStrip (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderTriStripReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderTriStripReq);
- swaps (&stuff->length, n);
- swapl (&stuff->src, n);
- swapl (&stuff->dst, n);
- swapl (&stuff->maskFormat, n);
- swaps (&stuff->xSrc, n);
- swaps (&stuff->ySrc, n);
- SwapRestL(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderTriFan (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderTriFanReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderTriFanReq);
- swaps (&stuff->length, n);
- swapl (&stuff->src, n);
- swapl (&stuff->dst, n);
- swapl (&stuff->maskFormat, n);
- swaps (&stuff->xSrc, n);
- swaps (&stuff->ySrc, n);
- SwapRestL(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderColorTrapezoids (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-SProcRenderColorTriangles (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-SProcRenderTransform (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-SProcRenderCreateGlyphSet (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderCreateGlyphSetReq);
- swaps(&stuff->length, n);
- swapl(&stuff->gsid, n);
- swapl(&stuff->format, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderReferenceGlyphSet (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderReferenceGlyphSetReq);
- swaps(&stuff->length, n);
- swapl(&stuff->gsid, n);
- swapl(&stuff->existing, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderFreeGlyphSet (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderFreeGlyphSetReq);
- swaps(&stuff->length, n);
- swapl(&stuff->glyphset, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderAddGlyphs (ClientPtr client)
-{
- register int n;
- register int i;
- CARD32 *gids;
- void *end;
- xGlyphInfo *gi;
- REQUEST(xRenderAddGlyphsReq);
- swaps(&stuff->length, n);
- swapl(&stuff->glyphset, n);
- swapl(&stuff->nglyphs, n);
- if (stuff->nglyphs & 0xe0000000)
- return BadLength;
- end = (CARD8 *) stuff + (client->req_len << 2);
- gids = (CARD32 *) (stuff + 1);
- gi = (xGlyphInfo *) (gids + stuff->nglyphs);
- if ((char *) end - (char *) (gids + stuff->nglyphs) < 0)
- return BadLength;
- if ((char *) end - (char *) (gi + stuff->nglyphs) < 0)
- return BadLength;
- for (i = 0; i < stuff->nglyphs; i++)
- {
- swapl (&gids[i], n);
- swaps (&gi[i].width, n);
- swaps (&gi[i].height, n);
- swaps (&gi[i].x, n);
- swaps (&gi[i].y, n);
- swaps (&gi[i].xOff, n);
- swaps (&gi[i].yOff, n);
- }
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderAddGlyphsFromPicture (ClientPtr client)
-{
- return BadImplementation;
-}
-
-static int
-SProcRenderFreeGlyphs (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderFreeGlyphsReq);
- swaps(&stuff->length, n);
- swapl(&stuff->glyphset, n);
- SwapRestL(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderCompositeGlyphs (ClientPtr client)
-{
- register int n;
- xGlyphElt *elt;
- CARD8 *buffer;
- CARD8 *end;
- int space;
- int i;
- int size;
-
- REQUEST(xRenderCompositeGlyphsReq);
-
- switch (stuff->renderReqType) {
- default: size = 1; break;
- case X_RenderCompositeGlyphs16: size = 2; break;
- case X_RenderCompositeGlyphs32: size = 4; break;
- }
-
- swaps(&stuff->length, n);
- swapl(&stuff->src, n);
- swapl(&stuff->dst, n);
- swapl(&stuff->maskFormat, n);
- swapl(&stuff->glyphset, n);
- swaps(&stuff->xSrc, n);
- swaps(&stuff->ySrc, n);
- buffer = (CARD8 *) (stuff + 1);
- end = (CARD8 *) stuff + (client->req_len << 2);
- while (buffer + sizeof (xGlyphElt) < end)
- {
- elt = (xGlyphElt *) buffer;
- buffer += sizeof (xGlyphElt);
-
- swaps (&elt->deltax, n);
- swaps (&elt->deltay, n);
-
- i = elt->len;
- if (i == 0xff)
- {
- swapl (buffer, n);
- buffer += 4;
- }
- else
- {
- space = size * i;
- switch (size) {
- case 1:
- buffer += i;
- break;
- case 2:
- while (i--)
- {
- swaps (buffer, n);
- buffer += 2;
- }
- break;
- case 4:
- while (i--)
- {
- swapl (buffer, n);
- buffer += 4;
- }
- break;
- }
- if (space & 3)
- buffer += 4 - (space & 3);
- }
- }
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderFillRectangles (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderFillRectanglesReq);
-
- REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq);
- swaps(&stuff->length, n);
- swapl(&stuff->dst, n);
- swaps(&stuff->color.red, n);
- swaps(&stuff->color.green, n);
- swaps(&stuff->color.blue, n);
- swaps(&stuff->color.alpha, n);
- SwapRestS(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderCreateCursor (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderCreateCursorReq);
- REQUEST_SIZE_MATCH (xRenderCreateCursorReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->cid, n);
- swapl(&stuff->src, n);
- swaps(&stuff->x, n);
- swaps(&stuff->y, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderSetPictureTransform (ClientPtr client)
-{
- register int n;
- REQUEST(xRenderSetPictureTransformReq);
- REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->picture, n);
- swapl(&stuff->transform.matrix11, n);
- swapl(&stuff->transform.matrix12, n);
- swapl(&stuff->transform.matrix13, n);
- swapl(&stuff->transform.matrix21, n);
- swapl(&stuff->transform.matrix22, n);
- swapl(&stuff->transform.matrix23, n);
- swapl(&stuff->transform.matrix31, n);
- swapl(&stuff->transform.matrix32, n);
- swapl(&stuff->transform.matrix33, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderQueryFilters (ClientPtr client)
-{
- register int n;
- REQUEST (xRenderQueryFiltersReq);
- REQUEST_SIZE_MATCH (xRenderQueryFiltersReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->drawable, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderSetPictureFilter (ClientPtr client)
-{
- register int n;
- REQUEST (xRenderSetPictureFilterReq);
- REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->picture, n);
- swaps(&stuff->nbytes, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderCreateAnimCursor (ClientPtr client)
-{
- register int n;
- REQUEST (xRenderCreateAnimCursorReq);
- REQUEST_AT_LEAST_SIZE (xRenderCreateAnimCursorReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->cid, n);
- SwapRestL(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderAddTraps (ClientPtr client)
-{
- register int n;
- REQUEST (xRenderAddTrapsReq);
- REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->picture, n);
- swaps(&stuff->xOff, n);
- swaps(&stuff->yOff, n);
- SwapRestL(stuff);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderCreateSolidFill(ClientPtr client)
-{
- register int n;
- REQUEST (xRenderCreateSolidFillReq);
- REQUEST_AT_LEAST_SIZE (xRenderCreateSolidFillReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->pid, n);
- swaps(&stuff->color.alpha, n);
- swaps(&stuff->color.red, n);
- swaps(&stuff->color.green, n);
- swaps(&stuff->color.blue, n);
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static void swapStops(void *stuff, int num)
-{
- int i, n;
- CARD32 *stops;
- CARD16 *colors;
- stops = (CARD32 *)(stuff);
- for (i = 0; i < num; ++i) {
- swapl(stops, n);
- ++stops;
- }
- colors = (CARD16 *)(stops);
- for (i = 0; i < 4*num; ++i) {
- swaps(colors, n);
- ++colors;
- }
-}
-
-static int
-SProcRenderCreateLinearGradient (ClientPtr client)
-{
- register int n;
- int len;
- REQUEST (xRenderCreateLinearGradientReq);
- REQUEST_AT_LEAST_SIZE (xRenderCreateLinearGradientReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->pid, n);
- swapl(&stuff->p1.x, n);
- swapl(&stuff->p1.y, n);
- swapl(&stuff->p2.x, n);
- swapl(&stuff->p2.y, n);
- swapl(&stuff->nStops, n);
-
- len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
- if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
- return BadLength;
- if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
- return BadLength;
-
- swapStops(stuff+1, stuff->nStops);
-
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderCreateRadialGradient (ClientPtr client)
-{
- register int n;
- int len;
- REQUEST (xRenderCreateRadialGradientReq);
- REQUEST_AT_LEAST_SIZE (xRenderCreateRadialGradientReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->pid, n);
- swapl(&stuff->inner.x, n);
- swapl(&stuff->inner.y, n);
- swapl(&stuff->outer.x, n);
- swapl(&stuff->outer.y, n);
- swapl(&stuff->inner_radius, n);
- swapl(&stuff->outer_radius, n);
- swapl(&stuff->nStops, n);
-
- len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq);
- if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
- return BadLength;
- if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
- return BadLength;
-
- swapStops(stuff+1, stuff->nStops);
-
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderCreateConicalGradient (ClientPtr client)
-{
- register int n;
- int len;
- REQUEST (xRenderCreateConicalGradientReq);
- REQUEST_AT_LEAST_SIZE (xRenderCreateConicalGradientReq);
-
- swaps(&stuff->length, n);
- swapl(&stuff->pid, n);
- swapl(&stuff->center.x, n);
- swapl(&stuff->center.y, n);
- swapl(&stuff->angle, n);
- swapl(&stuff->nStops, n);
-
- len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq);
- if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
- return BadLength;
- if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
- return BadLength;
-
- swapStops(stuff+1, stuff->nStops);
-
- return (*ProcRenderVector[stuff->renderReqType]) (client);
-}
-
-static int
-SProcRenderDispatch (ClientPtr client)
-{
- REQUEST(xReq);
-
- if (stuff->data < RenderNumberRequests)
- return (*SProcRenderVector[stuff->data]) (client);
- else
- return BadRequest;
-}
-
-#ifdef PANORAMIX
-#define VERIFY_XIN_PICTURE(pPicture, pid, client, mode) {\
- int rc = dixLookupResourceByType((pointer *)&(pPicture), pid,\
- XRT_PICTURE, client, mode);\
- if (rc != Success)\
- return rc;\
-}
-
-#define VERIFY_XIN_ALPHA(pPicture, pid, client, mode) {\
- if (pid == None) \
- pPicture = 0; \
- else { \
- VERIFY_XIN_PICTURE(pPicture, pid, client, mode); \
- } \
-} \
-
-int (*PanoramiXSaveRenderVector[RenderNumberRequests])(ClientPtr);
-
-static int
-PanoramiXRenderCreatePicture (ClientPtr client)
-{
- REQUEST(xRenderCreatePictureReq);
- PanoramiXRes *refDraw, *newPict;
- int result, j;
-
- REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
- result = dixLookupResourceByClass((pointer *)&refDraw, stuff->drawable,
- XRC_DRAWABLE, client, DixWriteAccess);
- if (result != Success)
- return (result == BadValue) ? BadDrawable : result;
- if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
- return BadAlloc;
- newPict->type = XRT_PICTURE;
- newPict->info[0].id = stuff->pid;
-
- if (refDraw->type == XRT_WINDOW &&
- stuff->drawable == screenInfo.screens[0]->root->drawable.id)
- {
- newPict->u.pict.root = TRUE;
- }
- else
- newPict->u.pict.root = FALSE;
-
- for(j = 1; j < PanoramiXNumScreens; j++)
- newPict->info[j].id = FakeClientID(client->index);
-
- FOR_NSCREENS_BACKWARD(j) {
- stuff->pid = newPict->info[j].id;
- stuff->drawable = refDraw->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderCreatePicture]) (client);
- if(result != Success) break;
- }
-
- if (result == Success)
- AddResource(newPict->info[0].id, XRT_PICTURE, newPict);
- else
- free(newPict);
-
- return result;
-}
-
-static int
-PanoramiXRenderChangePicture (ClientPtr client)
-{
- PanoramiXRes *pict;
- int result = Success, j;
- REQUEST(xRenderChangePictureReq);
-
- REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
-
- VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
-
- FOR_NSCREENS_BACKWARD(j) {
- stuff->picture = pict->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderChangePicture]) (client);
- if(result != Success) break;
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderSetPictureClipRectangles (ClientPtr client)
-{
- REQUEST(xRenderSetPictureClipRectanglesReq);
- int result = Success, j;
- PanoramiXRes *pict;
-
- REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
-
- VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
-
- FOR_NSCREENS_BACKWARD(j) {
- stuff->picture = pict->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderSetPictureClipRectangles]) (client);
- if(result != Success) break;
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderSetPictureTransform (ClientPtr client)
-{
- REQUEST(xRenderSetPictureTransformReq);
- int result = Success, j;
- PanoramiXRes *pict;
-
- REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq);
-
- VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
-
- FOR_NSCREENS_BACKWARD(j) {
- stuff->picture = pict->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderSetPictureTransform]) (client);
- if(result != Success) break;
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderSetPictureFilter (ClientPtr client)
-{
- REQUEST(xRenderSetPictureFilterReq);
- int result = Success, j;
- PanoramiXRes *pict;
-
- REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
-
- VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
-
- FOR_NSCREENS_BACKWARD(j) {
- stuff->picture = pict->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderSetPictureFilter]) (client);
- if(result != Success) break;
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderFreePicture (ClientPtr client)
-{
- PanoramiXRes *pict;
- int result = Success, j;
- REQUEST(xRenderFreePictureReq);
-
- REQUEST_SIZE_MATCH(xRenderFreePictureReq);
-
- client->errorValue = stuff->picture;
-
- VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixDestroyAccess);
-
-
- FOR_NSCREENS_BACKWARD(j) {
- stuff->picture = pict->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderFreePicture]) (client);
- if(result != Success) break;
- }
-
- /* Since ProcRenderFreePicture is using FreeResource, it will free
- our resource for us on the last pass through the loop above */
-
- return result;
-}
-
-static int
-PanoramiXRenderComposite (ClientPtr client)
-{
- PanoramiXRes *src, *msk, *dst;
- int result = Success, j;
- xRenderCompositeReq orig;
- REQUEST(xRenderCompositeReq);
-
- REQUEST_SIZE_MATCH(xRenderCompositeReq);
-
- VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
- VERIFY_XIN_ALPHA (msk, stuff->mask, client, DixReadAccess);
- VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
-
- orig = *stuff;
-
- FOR_NSCREENS_FORWARD(j) {
- stuff->src = src->info[j].id;
- if (src->u.pict.root)
- {
- stuff->xSrc = orig.xSrc - screenInfo.screens[j]->x;
- stuff->ySrc = orig.ySrc - screenInfo.screens[j]->y;
- }
- stuff->dst = dst->info[j].id;
- if (dst->u.pict.root)
- {
- stuff->xDst = orig.xDst - screenInfo.screens[j]->x;
- stuff->yDst = orig.yDst - screenInfo.screens[j]->y;
- }
- if (msk)
- {
- stuff->mask = msk->info[j].id;
- if (msk->u.pict.root)
- {
- stuff->xMask = orig.xMask - screenInfo.screens[j]->x;
- stuff->yMask = orig.yMask - screenInfo.screens[j]->y;
- }
- }
- result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client);
- if(result != Success) break;
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderCompositeGlyphs (ClientPtr client)
-{
- PanoramiXRes *src, *dst;
- int result = Success, j;
- REQUEST(xRenderCompositeGlyphsReq);
- xGlyphElt origElt, *elt;
- INT16 xSrc, ySrc;
-
- REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq);
- VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
- VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
-
- if (client->req_len << 2 >= (sizeof (xRenderCompositeGlyphsReq) +
- sizeof (xGlyphElt)))
- {
- elt = (xGlyphElt *) (stuff + 1);
- origElt = *elt;
- xSrc = stuff->xSrc;
- ySrc = stuff->ySrc;
- FOR_NSCREENS_FORWARD(j) {
- stuff->src = src->info[j].id;
- if (src->u.pict.root)
- {
- stuff->xSrc = xSrc - screenInfo.screens[j]->x;
- stuff->ySrc = ySrc - screenInfo.screens[j]->y;
- }
- stuff->dst = dst->info[j].id;
- if (dst->u.pict.root)
- {
- elt->deltax = origElt.deltax - screenInfo.screens[j]->x;
- elt->deltay = origElt.deltay - screenInfo.screens[j]->y;
- }
- result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client);
- if(result != Success) break;
- }
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderFillRectangles (ClientPtr client)
-{
- PanoramiXRes *dst;
- int result = Success, j;
- REQUEST(xRenderFillRectanglesReq);
- char *extra;
- int extra_len;
-
- REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq);
- VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
- extra_len = (client->req_len << 2) - sizeof (xRenderFillRectanglesReq);
- if (extra_len &&
- (extra = (char *) malloc(extra_len)))
- {
- memcpy (extra, stuff + 1, extra_len);
- FOR_NSCREENS_FORWARD(j) {
- if (j) memcpy (stuff + 1, extra, extra_len);
- if (dst->u.pict.root)
- {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
-
- if(x_off || y_off) {
- xRectangle *rects = (xRectangle *) (stuff + 1);
- int i = extra_len / sizeof (xRectangle);
-
- while (i--)
- {
- rects->x -= x_off;
- rects->y -= y_off;
- rects++;
- }
- }
- }
- stuff->dst = dst->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderFillRectangles]) (client);
- if(result != Success) break;
- }
- free(extra);
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderTrapezoids(ClientPtr client)
-{
- PanoramiXRes *src, *dst;
- int result = Success, j;
- REQUEST(xRenderTrapezoidsReq);
- char *extra;
- int extra_len;
-
- REQUEST_AT_LEAST_SIZE (xRenderTrapezoidsReq);
-
- VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
- VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
-
- extra_len = (client->req_len << 2) - sizeof (xRenderTrapezoidsReq);
-
- if (extra_len &&
- (extra = (char *) malloc(extra_len))) {
- memcpy (extra, stuff + 1, extra_len);
-
- FOR_NSCREENS_FORWARD(j) {
- if (j) memcpy (stuff + 1, extra, extra_len);
- if (dst->u.pict.root) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
-
- if(x_off || y_off) {
- xTrapezoid *trap = (xTrapezoid *) (stuff + 1);
- int i = extra_len / sizeof (xTrapezoid);
-
- while (i--) {
- trap->top -= y_off;
- trap->bottom -= y_off;
- trap->left.p1.x -= x_off;
- trap->left.p1.y -= y_off;
- trap->left.p2.x -= x_off;
- trap->left.p2.y -= y_off;
- trap->right.p1.x -= x_off;
- trap->right.p1.y -= y_off;
- trap->right.p2.x -= x_off;
- trap->right.p2.y -= y_off;
- trap++;
- }
- }
- }
-
- stuff->src = src->info[j].id;
- stuff->dst = dst->info[j].id;
- result =
- (*PanoramiXSaveRenderVector[X_RenderTrapezoids]) (client);
-
- if(result != Success) break;
- }
-
- free(extra);
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderTriangles(ClientPtr client)
-{
- PanoramiXRes *src, *dst;
- int result = Success, j;
- REQUEST(xRenderTrianglesReq);
- char *extra;
- int extra_len;
-
- REQUEST_AT_LEAST_SIZE (xRenderTrianglesReq);
-
- VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
- VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
-
- extra_len = (client->req_len << 2) - sizeof (xRenderTrianglesReq);
-
- if (extra_len &&
- (extra = (char *) malloc(extra_len))) {
- memcpy (extra, stuff + 1, extra_len);
-
- FOR_NSCREENS_FORWARD(j) {
- if (j) memcpy (stuff + 1, extra, extra_len);
- if (dst->u.pict.root) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
-
- if(x_off || y_off) {
- xTriangle *tri = (xTriangle *) (stuff + 1);
- int i = extra_len / sizeof (xTriangle);
-
- while (i--) {
- tri->p1.x -= x_off;
- tri->p1.y -= y_off;
- tri->p2.x -= x_off;
- tri->p2.y -= y_off;
- tri->p3.x -= x_off;
- tri->p3.y -= y_off;
- tri++;
- }
- }
- }
-
- stuff->src = src->info[j].id;
- stuff->dst = dst->info[j].id;
- result =
- (*PanoramiXSaveRenderVector[X_RenderTriangles]) (client);
-
- if(result != Success) break;
- }
-
- free(extra);
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderTriStrip(ClientPtr client)
-{
- PanoramiXRes *src, *dst;
- int result = Success, j;
- REQUEST(xRenderTriStripReq);
- char *extra;
- int extra_len;
-
- REQUEST_AT_LEAST_SIZE (xRenderTriStripReq);
-
- VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
- VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
-
- extra_len = (client->req_len << 2) - sizeof (xRenderTriStripReq);
-
- if (extra_len &&
- (extra = (char *) malloc(extra_len))) {
- memcpy (extra, stuff + 1, extra_len);
-
- FOR_NSCREENS_FORWARD(j) {
- if (j) memcpy (stuff + 1, extra, extra_len);
- if (dst->u.pict.root) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
-
- if(x_off || y_off) {
- xPointFixed *fixed = (xPointFixed *) (stuff + 1);
- int i = extra_len / sizeof (xPointFixed);
-
- while (i--) {
- fixed->x -= x_off;
- fixed->y -= y_off;
- fixed++;
- }
- }
- }
-
- stuff->src = src->info[j].id;
- stuff->dst = dst->info[j].id;
- result =
- (*PanoramiXSaveRenderVector[X_RenderTriStrip]) (client);
-
- if(result != Success) break;
- }
-
- free(extra);
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderTriFan(ClientPtr client)
-{
- PanoramiXRes *src, *dst;
- int result = Success, j;
- REQUEST(xRenderTriFanReq);
- char *extra;
- int extra_len;
-
- REQUEST_AT_LEAST_SIZE (xRenderTriFanReq);
-
- VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
- VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
-
- extra_len = (client->req_len << 2) - sizeof (xRenderTriFanReq);
-
- if (extra_len &&
- (extra = (char *) malloc(extra_len))) {
- memcpy (extra, stuff + 1, extra_len);
-
- FOR_NSCREENS_FORWARD(j) {
- if (j) memcpy (stuff + 1, extra, extra_len);
- if (dst->u.pict.root) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
-
- if(x_off || y_off) {
- xPointFixed *fixed = (xPointFixed *) (stuff + 1);
- int i = extra_len / sizeof (xPointFixed);
-
- while (i--) {
- fixed->x -= x_off;
- fixed->y -= y_off;
- fixed++;
- }
- }
- }
-
- stuff->src = src->info[j].id;
- stuff->dst = dst->info[j].id;
- result =
- (*PanoramiXSaveRenderVector[X_RenderTriFan]) (client);
-
- if(result != Success) break;
- }
-
- free(extra);
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderAddTraps (ClientPtr client)
-{
- PanoramiXRes *picture;
- int result = Success, j;
- REQUEST(xRenderAddTrapsReq);
- char *extra;
- int extra_len;
- INT16 x_off, y_off;
-
- REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq);
- VERIFY_XIN_PICTURE (picture, stuff->picture, client, DixWriteAccess);
- extra_len = (client->req_len << 2) - sizeof (xRenderAddTrapsReq);
- if (extra_len &&
- (extra = (char *) malloc(extra_len)))
- {
- memcpy (extra, stuff + 1, extra_len);
- x_off = stuff->xOff;
- y_off = stuff->yOff;
- FOR_NSCREENS_FORWARD(j) {
- if (j) memcpy (stuff + 1, extra, extra_len);
- stuff->picture = picture->info[j].id;
-
- if (picture->u.pict.root)
- {
- stuff->xOff = x_off + screenInfo.screens[j]->x;
- stuff->yOff = y_off + screenInfo.screens[j]->y;
- }
- result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client);
- if(result != Success) break;
- }
- free(extra);
- }
-
- return result;
-}
-
-static int
-PanoramiXRenderCreateSolidFill (ClientPtr client)
-{
- REQUEST(xRenderCreateSolidFillReq);
- PanoramiXRes *newPict;
- int result = Success, j;
-
- REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq);
-
- if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
- return BadAlloc;
-
- newPict->type = XRT_PICTURE;
- newPict->info[0].id = stuff->pid;
- newPict->u.pict.root = FALSE;
-
- for(j = 1; j < PanoramiXNumScreens; j++)
- newPict->info[j].id = FakeClientID(client->index);
-
- FOR_NSCREENS_BACKWARD(j) {
- stuff->pid = newPict->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderCreateSolidFill]) (client);
- if(result != Success) break;
- }
-
- if (result == Success)
- AddResource(newPict->info[0].id, XRT_PICTURE, newPict);
- else
- free(newPict);
-
- return result;
-}
-
-static int
-PanoramiXRenderCreateLinearGradient (ClientPtr client)
-{
- REQUEST(xRenderCreateLinearGradientReq);
- PanoramiXRes *newPict;
- int result = Success, j;
-
- REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq);
-
- if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
- return BadAlloc;
-
- newPict->type = XRT_PICTURE;
- newPict->info[0].id = stuff->pid;
- newPict->u.pict.root = FALSE;
-
- for(j = 1; j < PanoramiXNumScreens; j++)
- newPict->info[j].id = FakeClientID(client->index);
-
- FOR_NSCREENS_BACKWARD(j) {
- stuff->pid = newPict->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderCreateLinearGradient]) (client);
- if(result != Success) break;
- }
-
- if (result == Success)
- AddResource(newPict->info[0].id, XRT_PICTURE, newPict);
- else
- free(newPict);
-
- return result;
-}
-
-static int
-PanoramiXRenderCreateRadialGradient (ClientPtr client)
-{
- REQUEST(xRenderCreateRadialGradientReq);
- PanoramiXRes *newPict;
- int result = Success, j;
-
- REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq);
-
- if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
- return BadAlloc;
-
- newPict->type = XRT_PICTURE;
- newPict->info[0].id = stuff->pid;
- newPict->u.pict.root = FALSE;
-
- for(j = 1; j < PanoramiXNumScreens; j++)
- newPict->info[j].id = FakeClientID(client->index);
-
- FOR_NSCREENS_BACKWARD(j) {
- stuff->pid = newPict->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderCreateRadialGradient]) (client);
- if(result != Success) break;
- }
-
- if (result == Success)
- AddResource(newPict->info[0].id, XRT_PICTURE, newPict);
- else
- free(newPict);
-
- return result;
-}
-
-static int
-PanoramiXRenderCreateConicalGradient (ClientPtr client)
-{
- REQUEST(xRenderCreateConicalGradientReq);
- PanoramiXRes *newPict;
- int result = Success, j;
-
- REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq);
-
- if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
- return BadAlloc;
-
- newPict->type = XRT_PICTURE;
- newPict->info[0].id = stuff->pid;
- newPict->u.pict.root = FALSE;
-
- for(j = 1; j < PanoramiXNumScreens; j++)
- newPict->info[j].id = FakeClientID(client->index);
-
- FOR_NSCREENS_BACKWARD(j) {
- stuff->pid = newPict->info[j].id;
- result = (*PanoramiXSaveRenderVector[X_RenderCreateConicalGradient]) (client);
- if(result != Success) break;
- }
-
- if (result == Success)
- AddResource(newPict->info[0].id, XRT_PICTURE, newPict);
- else
- free(newPict);
-
- return result;
-}
-
-void
-PanoramiXRenderInit (void)
-{
- int i;
-
- XRT_PICTURE = CreateNewResourceType (XineramaDeleteResource,
- "XineramaPicture");
- if (RenderErrBase)
- SetResourceTypeErrorValue(XRT_PICTURE, RenderErrBase + BadPicture);
- for (i = 0; i < RenderNumberRequests; i++)
- PanoramiXSaveRenderVector[i] = ProcRenderVector[i];
- /*
- * Stuff in Xinerama aware request processing hooks
- */
- ProcRenderVector[X_RenderCreatePicture] = PanoramiXRenderCreatePicture;
- ProcRenderVector[X_RenderChangePicture] = PanoramiXRenderChangePicture;
- ProcRenderVector[X_RenderSetPictureTransform] = PanoramiXRenderSetPictureTransform;
- ProcRenderVector[X_RenderSetPictureFilter] = PanoramiXRenderSetPictureFilter;
- ProcRenderVector[X_RenderSetPictureClipRectangles] = PanoramiXRenderSetPictureClipRectangles;
- ProcRenderVector[X_RenderFreePicture] = PanoramiXRenderFreePicture;
- ProcRenderVector[X_RenderComposite] = PanoramiXRenderComposite;
- ProcRenderVector[X_RenderCompositeGlyphs8] = PanoramiXRenderCompositeGlyphs;
- ProcRenderVector[X_RenderCompositeGlyphs16] = PanoramiXRenderCompositeGlyphs;
- ProcRenderVector[X_RenderCompositeGlyphs32] = PanoramiXRenderCompositeGlyphs;
- ProcRenderVector[X_RenderFillRectangles] = PanoramiXRenderFillRectangles;
-
- ProcRenderVector[X_RenderTrapezoids] = PanoramiXRenderTrapezoids;
- ProcRenderVector[X_RenderTriangles] = PanoramiXRenderTriangles;
- ProcRenderVector[X_RenderTriStrip] = PanoramiXRenderTriStrip;
- ProcRenderVector[X_RenderTriFan] = PanoramiXRenderTriFan;
- ProcRenderVector[X_RenderAddTraps] = PanoramiXRenderAddTraps;
-
- ProcRenderVector[X_RenderCreateSolidFill] = PanoramiXRenderCreateSolidFill;
- ProcRenderVector[X_RenderCreateLinearGradient] = PanoramiXRenderCreateLinearGradient;
- ProcRenderVector[X_RenderCreateRadialGradient] = PanoramiXRenderCreateRadialGradient;
- ProcRenderVector[X_RenderCreateConicalGradient] = PanoramiXRenderCreateConicalGradient;
-}
-
-void
-PanoramiXRenderReset (void)
-{
- int i;
- for (i = 0; i < RenderNumberRequests; i++)
- ProcRenderVector[i] = PanoramiXSaveRenderVector[i];
- RenderErrBase = 0;
-}
-
-#endif /* PANORAMIX */
+/*
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * 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, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "resource.h"
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include "pixmapstr.h"
+#include "colormapst.h"
+#include "extnsionst.h"
+#include "servermd.h"
+#include <X11/extensions/render.h>
+#include <X11/extensions/renderproto.h>
+#include "picturestr.h"
+#include "glyphstr.h"
+#include <X11/Xfuncproto.h>
+#include "cursorstr.h"
+#include "xace.h"
+#include "protocol-versions.h"
+
+#ifdef PANORAMIX
+#include "panoramiX.h"
+#include "panoramiXsrv.h"
+#endif
+
+#if HAVE_STDINT_H
+#include <stdint.h>
+#elif !defined(UINT32_MAX)
+#define UINT32_MAX 0xffffffffU
+#endif
+
+static int ProcRenderQueryVersion (ClientPtr pClient);
+static int ProcRenderQueryPictFormats (ClientPtr pClient);
+static int ProcRenderQueryPictIndexValues (ClientPtr pClient);
+static int ProcRenderQueryDithers (ClientPtr pClient);
+static int ProcRenderCreatePicture (ClientPtr pClient);
+static int ProcRenderChangePicture (ClientPtr pClient);
+static int ProcRenderSetPictureClipRectangles (ClientPtr pClient);
+static int ProcRenderFreePicture (ClientPtr pClient);
+static int ProcRenderComposite (ClientPtr pClient);
+static int ProcRenderScale (ClientPtr pClient);
+static int ProcRenderTrapezoids (ClientPtr pClient);
+static int ProcRenderTriangles (ClientPtr pClient);
+static int ProcRenderTriStrip (ClientPtr pClient);
+static int ProcRenderTriFan (ClientPtr pClient);
+static int ProcRenderColorTrapezoids (ClientPtr pClient);
+static int ProcRenderColorTriangles (ClientPtr pClient);
+static int ProcRenderTransform (ClientPtr pClient);
+static int ProcRenderCreateGlyphSet (ClientPtr pClient);
+static int ProcRenderReferenceGlyphSet (ClientPtr pClient);
+static int ProcRenderFreeGlyphSet (ClientPtr pClient);
+static int ProcRenderAddGlyphs (ClientPtr pClient);
+static int ProcRenderAddGlyphsFromPicture (ClientPtr pClient);
+static int ProcRenderFreeGlyphs (ClientPtr pClient);
+static int ProcRenderCompositeGlyphs (ClientPtr pClient);
+static int ProcRenderFillRectangles (ClientPtr pClient);
+static int ProcRenderCreateCursor (ClientPtr pClient);
+static int ProcRenderSetPictureTransform (ClientPtr pClient);
+static int ProcRenderQueryFilters (ClientPtr pClient);
+static int ProcRenderSetPictureFilter (ClientPtr pClient);
+static int ProcRenderCreateAnimCursor (ClientPtr pClient);
+static int ProcRenderAddTraps (ClientPtr pClient);
+static int ProcRenderCreateSolidFill (ClientPtr pClient);
+static int ProcRenderCreateLinearGradient (ClientPtr pClient);
+static int ProcRenderCreateRadialGradient (ClientPtr pClient);
+static int ProcRenderCreateConicalGradient (ClientPtr pClient);
+
+static int ProcRenderDispatch (ClientPtr pClient);
+
+static int SProcRenderQueryVersion (ClientPtr pClient);
+static int SProcRenderQueryPictFormats (ClientPtr pClient);
+static int SProcRenderQueryPictIndexValues (ClientPtr pClient);
+static int SProcRenderQueryDithers (ClientPtr pClient);
+static int SProcRenderCreatePicture (ClientPtr pClient);
+static int SProcRenderChangePicture (ClientPtr pClient);
+static int SProcRenderSetPictureClipRectangles (ClientPtr pClient);
+static int SProcRenderFreePicture (ClientPtr pClient);
+static int SProcRenderComposite (ClientPtr pClient);
+static int SProcRenderScale (ClientPtr pClient);
+static int SProcRenderTrapezoids (ClientPtr pClient);
+static int SProcRenderTriangles (ClientPtr pClient);
+static int SProcRenderTriStrip (ClientPtr pClient);
+static int SProcRenderTriFan (ClientPtr pClient);
+static int SProcRenderColorTrapezoids (ClientPtr pClient);
+static int SProcRenderColorTriangles (ClientPtr pClient);
+static int SProcRenderTransform (ClientPtr pClient);
+static int SProcRenderCreateGlyphSet (ClientPtr pClient);
+static int SProcRenderReferenceGlyphSet (ClientPtr pClient);
+static int SProcRenderFreeGlyphSet (ClientPtr pClient);
+static int SProcRenderAddGlyphs (ClientPtr pClient);
+static int SProcRenderAddGlyphsFromPicture (ClientPtr pClient);
+static int SProcRenderFreeGlyphs (ClientPtr pClient);
+static int SProcRenderCompositeGlyphs (ClientPtr pClient);
+static int SProcRenderFillRectangles (ClientPtr pClient);
+static int SProcRenderCreateCursor (ClientPtr pClient);
+static int SProcRenderSetPictureTransform (ClientPtr pClient);
+static int SProcRenderQueryFilters (ClientPtr pClient);
+static int SProcRenderSetPictureFilter (ClientPtr pClient);
+static int SProcRenderCreateAnimCursor (ClientPtr pClient);
+static int SProcRenderAddTraps (ClientPtr pClient);
+static int SProcRenderCreateSolidFill (ClientPtr pClient);
+static int SProcRenderCreateLinearGradient (ClientPtr pClient);
+static int SProcRenderCreateRadialGradient (ClientPtr pClient);
+static int SProcRenderCreateConicalGradient (ClientPtr pClient);
+
+static int SProcRenderDispatch (ClientPtr pClient);
+
+int (*ProcRenderVector[RenderNumberRequests])(ClientPtr) = {
+ ProcRenderQueryVersion,
+ ProcRenderQueryPictFormats,
+ ProcRenderQueryPictIndexValues,
+ ProcRenderQueryDithers,
+ ProcRenderCreatePicture,
+ ProcRenderChangePicture,
+ ProcRenderSetPictureClipRectangles,
+ ProcRenderFreePicture,
+ ProcRenderComposite,
+ ProcRenderScale,
+ ProcRenderTrapezoids,
+ ProcRenderTriangles,
+ ProcRenderTriStrip,
+ ProcRenderTriFan,
+ ProcRenderColorTrapezoids,
+ ProcRenderColorTriangles,
+ ProcRenderTransform,
+ ProcRenderCreateGlyphSet,
+ ProcRenderReferenceGlyphSet,
+ ProcRenderFreeGlyphSet,
+ ProcRenderAddGlyphs,
+ ProcRenderAddGlyphsFromPicture,
+ ProcRenderFreeGlyphs,
+ ProcRenderCompositeGlyphs,
+ ProcRenderCompositeGlyphs,
+ ProcRenderCompositeGlyphs,
+ ProcRenderFillRectangles,
+ ProcRenderCreateCursor,
+ ProcRenderSetPictureTransform,
+ ProcRenderQueryFilters,
+ ProcRenderSetPictureFilter,
+ ProcRenderCreateAnimCursor,
+ ProcRenderAddTraps,
+ ProcRenderCreateSolidFill,
+ ProcRenderCreateLinearGradient,
+ ProcRenderCreateRadialGradient,
+ ProcRenderCreateConicalGradient
+};
+
+int (*SProcRenderVector[RenderNumberRequests])(ClientPtr) = {
+ SProcRenderQueryVersion,
+ SProcRenderQueryPictFormats,
+ SProcRenderQueryPictIndexValues,
+ SProcRenderQueryDithers,
+ SProcRenderCreatePicture,
+ SProcRenderChangePicture,
+ SProcRenderSetPictureClipRectangles,
+ SProcRenderFreePicture,
+ SProcRenderComposite,
+ SProcRenderScale,
+ SProcRenderTrapezoids,
+ SProcRenderTriangles,
+ SProcRenderTriStrip,
+ SProcRenderTriFan,
+ SProcRenderColorTrapezoids,
+ SProcRenderColorTriangles,
+ SProcRenderTransform,
+ SProcRenderCreateGlyphSet,
+ SProcRenderReferenceGlyphSet,
+ SProcRenderFreeGlyphSet,
+ SProcRenderAddGlyphs,
+ SProcRenderAddGlyphsFromPicture,
+ SProcRenderFreeGlyphs,
+ SProcRenderCompositeGlyphs,
+ SProcRenderCompositeGlyphs,
+ SProcRenderCompositeGlyphs,
+ SProcRenderFillRectangles,
+ SProcRenderCreateCursor,
+ SProcRenderSetPictureTransform,
+ SProcRenderQueryFilters,
+ SProcRenderSetPictureFilter,
+ SProcRenderCreateAnimCursor,
+ SProcRenderAddTraps,
+ SProcRenderCreateSolidFill,
+ SProcRenderCreateLinearGradient,
+ SProcRenderCreateRadialGradient,
+ SProcRenderCreateConicalGradient
+};
+
+int RenderErrBase;
+static DevPrivateKeyRec RenderClientPrivateKeyRec;
+#define RenderClientPrivateKey (&RenderClientPrivateKeyRec )
+
+typedef struct _RenderClient {
+ int major_version;
+ int minor_version;
+} RenderClientRec, *RenderClientPtr;
+
+#define GetRenderClient(pClient) ((RenderClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RenderClientPrivateKey))
+
+static void
+RenderClientCallback (CallbackListPtr *list,
+ pointer closure,
+ pointer data)
+{
+ NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
+ ClientPtr pClient = clientinfo->client;
+ RenderClientPtr pRenderClient = GetRenderClient (pClient);
+
+ pRenderClient->major_version = 0;
+ pRenderClient->minor_version = 0;
+}
+
+#ifdef PANORAMIX
+RESTYPE XRT_PICTURE;
+#endif
+
+void
+RenderExtensionInit (void)
+{
+ ExtensionEntry *extEntry;
+
+ if (!PictureType)
+ return;
+ if (!PictureFinishInit ())
+ return;
+ if (!dixRegisterPrivateKey(&RenderClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(RenderClientRec)))
+ return;
+ if (!AddCallback (&ClientStateCallback, RenderClientCallback, 0))
+ return;
+
+ extEntry = AddExtension (RENDER_NAME, 0, RenderNumberErrors,
+ ProcRenderDispatch, SProcRenderDispatch,
+ NULL, StandardMinorOpcode);
+ if (!extEntry)
+ return;
+ RenderErrBase = extEntry->errorBase;
+#ifdef PANORAMIX
+ if (XRT_PICTURE)
+ SetResourceTypeErrorValue(XRT_PICTURE, RenderErrBase + BadPicture);
+#endif
+ SetResourceTypeErrorValue(PictureType, RenderErrBase + BadPicture);
+ SetResourceTypeErrorValue(PictFormatType, RenderErrBase + BadPictFormat);
+ SetResourceTypeErrorValue(GlyphSetType, RenderErrBase + BadGlyphSet);
+}
+
+static int
+ProcRenderQueryVersion (ClientPtr client)
+{
+ RenderClientPtr pRenderClient = GetRenderClient (client);
+ xRenderQueryVersionReply rep;
+ register int n;
+ REQUEST(xRenderQueryVersionReq);
+
+ pRenderClient->major_version = stuff->majorVersion;
+ pRenderClient->minor_version = stuff->minorVersion;
+
+ REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
+ memset(&rep, 0, sizeof(xRenderQueryVersionReply));
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+
+ if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
+ (SERVER_RENDER_MAJOR_VERSION * 1000 + SERVER_RENDER_MINOR_VERSION))
+ {
+ rep.majorVersion = stuff->majorVersion;
+ rep.minorVersion = stuff->minorVersion;
+ } else
+ {
+ rep.majorVersion = SERVER_RENDER_MAJOR_VERSION;
+ rep.minorVersion = SERVER_RENDER_MINOR_VERSION;
+ }
+
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ swapl(&rep.majorVersion, n);
+ swapl(&rep.minorVersion, n);
+ }
+ WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep);
+ return Success;
+}
+
+static VisualPtr
+findVisual (ScreenPtr pScreen, VisualID vid)
+{
+ VisualPtr pVisual;
+ int v;
+
+ for (v = 0; v < pScreen->numVisuals; v++)
+ {
+ pVisual = pScreen->visuals + v;
+ if (pVisual->vid == vid)
+ return pVisual;
+ }
+ return 0;
+}
+
+static int
+ProcRenderQueryPictFormats (ClientPtr client)
+{
+ RenderClientPtr pRenderClient = GetRenderClient (client);
+ xRenderQueryPictFormatsReply *reply;
+ xPictScreen *pictScreen;
+ xPictDepth *pictDepth;
+ xPictVisual *pictVisual;
+ xPictFormInfo *pictForm;
+ CARD32 *pictSubpixel;
+ ScreenPtr pScreen;
+ VisualPtr pVisual;
+ DepthPtr pDepth;
+ int v, d;
+ PictureScreenPtr ps;
+ PictFormatPtr pFormat;
+ int nformat;
+ int ndepth;
+ int nvisual;
+ int rlength;
+ int s;
+ int n;
+ int numScreens;
+ int numSubpixel;
+/* REQUEST(xRenderQueryPictFormatsReq); */
+
+ REQUEST_SIZE_MATCH(xRenderQueryPictFormatsReq);
+
+#ifdef PANORAMIX
+ if (noPanoramiXExtension)
+ numScreens = screenInfo.numScreens;
+ else
+ numScreens = ((xConnSetup *)ConnectionInfo)->numRoots;
+#else
+ numScreens = screenInfo.numScreens;
+#endif
+ ndepth = nformat = nvisual = 0;
+ for (s = 0; s < numScreens; s++)
+ {
+ pScreen = screenInfo.screens[s];
+ for (d = 0; d < pScreen->numDepths; d++)
+ {
+ pDepth = pScreen->allowedDepths + d;
+ ++ndepth;
+
+ for (v = 0; v < pDepth->numVids; v++)
+ {
+ pVisual = findVisual (pScreen, pDepth->vids[v]);
+ if (pVisual && PictureMatchVisual (pScreen, pDepth->depth, pVisual))
+ ++nvisual;
+ }
+ }
+ ps = GetPictureScreenIfSet(pScreen);
+ if (ps)
+ nformat += ps->nformats;
+ }
+ if (pRenderClient->major_version == 0 && pRenderClient->minor_version < 6)
+ numSubpixel = 0;
+ else
+ numSubpixel = numScreens;
+
+ rlength = (sizeof (xRenderQueryPictFormatsReply) +
+ nformat * sizeof (xPictFormInfo) +
+ numScreens * sizeof (xPictScreen) +
+ ndepth * sizeof (xPictDepth) +
+ nvisual * sizeof (xPictVisual) +
+ numSubpixel * sizeof (CARD32));
+ reply = (xRenderQueryPictFormatsReply *) calloc(1, rlength);
+ if (!reply)
+ return BadAlloc;
+ reply->type = X_Reply;
+ reply->sequenceNumber = client->sequence;
+ reply->length = bytes_to_int32(rlength - sizeof(xGenericReply));
+ reply->numFormats = nformat;
+ reply->numScreens = numScreens;
+ reply->numDepths = ndepth;
+ reply->numVisuals = nvisual;
+ reply->numSubpixel = numSubpixel;
+
+ pictForm = (xPictFormInfo *) (reply + 1);
+
+ for (s = 0; s < numScreens; s++)
+ {
+ pScreen = screenInfo.screens[s];
+ ps = GetPictureScreenIfSet(pScreen);
+ if (ps)
+ {
+ for (nformat = 0, pFormat = ps->formats;
+ nformat < ps->nformats;
+ nformat++, pFormat++)
+ {
+ pictForm->id = pFormat->id;
+ pictForm->type = pFormat->type;
+ pictForm->depth = pFormat->depth;
+ pictForm->direct.red = pFormat->direct.red;
+ pictForm->direct.redMask = pFormat->direct.redMask;
+ pictForm->direct.green = pFormat->direct.green;
+ pictForm->direct.greenMask = pFormat->direct.greenMask;
+ pictForm->direct.blue = pFormat->direct.blue;
+ pictForm->direct.blueMask = pFormat->direct.blueMask;
+ pictForm->direct.alpha = pFormat->direct.alpha;
+ pictForm->direct.alphaMask = pFormat->direct.alphaMask;
+ if (pFormat->type == PictTypeIndexed && pFormat->index.pColormap)
+ pictForm->colormap = pFormat->index.pColormap->mid;
+ else
+ pictForm->colormap = None;
+ if (client->swapped)
+ {
+ swapl (&pictForm->id, n);
+ swaps (&pictForm->direct.red, n);
+ swaps (&pictForm->direct.redMask, n);
+ swaps (&pictForm->direct.green, n);
+ swaps (&pictForm->direct.greenMask, n);
+ swaps (&pictForm->direct.blue, n);
+ swaps (&pictForm->direct.blueMask, n);
+ swaps (&pictForm->direct.alpha, n);
+ swaps (&pictForm->direct.alphaMask, n);
+ swapl (&pictForm->colormap, n);
+ }
+ pictForm++;
+ }
+ }
+ }
+
+ pictScreen = (xPictScreen *) pictForm;
+ for (s = 0; s < numScreens; s++)
+ {
+ pScreen = screenInfo.screens[s];
+ pictDepth = (xPictDepth *) (pictScreen + 1);
+ ndepth = 0;
+ for (d = 0; d < pScreen->numDepths; d++)
+ {
+ pictVisual = (xPictVisual *) (pictDepth + 1);
+ pDepth = pScreen->allowedDepths + d;
+
+ nvisual = 0;
+ for (v = 0; v < pDepth->numVids; v++)
+ {
+ pVisual = findVisual (pScreen, pDepth->vids[v]);
+ if (pVisual && (pFormat = PictureMatchVisual (pScreen,
+ pDepth->depth,
+ pVisual)))
+ {
+ pictVisual->visual = pVisual->vid;
+ pictVisual->format = pFormat->id;
+ if (client->swapped)
+ {
+ swapl (&pictVisual->visual, n);
+ swapl (&pictVisual->format, n);
+ }
+ pictVisual++;
+ nvisual++;
+ }
+ }
+ pictDepth->depth = pDepth->depth;
+ pictDepth->nPictVisuals = nvisual;
+ if (client->swapped)
+ {
+ swaps (&pictDepth->nPictVisuals, n);
+ }
+ ndepth++;
+ pictDepth = (xPictDepth *) pictVisual;
+ }
+ pictScreen->nDepth = ndepth;
+ ps = GetPictureScreenIfSet(pScreen);
+ if (ps)
+ pictScreen->fallback = ps->fallback->id;
+ else
+ pictScreen->fallback = 0;
+ if (client->swapped)
+ {
+ swapl (&pictScreen->nDepth, n);
+ swapl (&pictScreen->fallback, n);
+ }
+ pictScreen = (xPictScreen *) pictDepth;
+ }
+ pictSubpixel = (CARD32 *) pictScreen;
+
+ for (s = 0; s < numSubpixel; s++)
+ {
+ pScreen = screenInfo.screens[s];
+ ps = GetPictureScreenIfSet(pScreen);
+ if (ps)
+ *pictSubpixel = ps->subpixel;
+ else
+ *pictSubpixel = SubPixelUnknown;
+ if (client->swapped)
+ {
+ swapl (pictSubpixel, n);
+ }
+ ++pictSubpixel;
+ }
+
+ if (client->swapped)
+ {
+ swaps (&reply->sequenceNumber, n);
+ swapl (&reply->length, n);
+ swapl (&reply->numFormats, n);
+ swapl (&reply->numScreens, n);
+ swapl (&reply->numDepths, n);
+ swapl (&reply->numVisuals, n);
+ swapl (&reply->numSubpixel, n);
+ }
+ WriteToClient(client, rlength, (char *) reply);
+ free(reply);
+ return Success;
+}
+
+static int
+ProcRenderQueryPictIndexValues (ClientPtr client)
+{
+ PictFormatPtr pFormat;
+ int rc, num;
+ int rlength;
+ int i, n;
+ REQUEST(xRenderQueryPictIndexValuesReq);
+ xRenderQueryPictIndexValuesReply *reply;
+ xIndexValue *values;
+
+ REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq);
+
+ rc = dixLookupResourceByType((pointer *)&pFormat, stuff->format,
+ PictFormatType, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+
+ if (pFormat->type != PictTypeIndexed)
+ {
+ client->errorValue = stuff->format;
+ return BadMatch;
+ }
+ num = pFormat->index.nvalues;
+ rlength = (sizeof (xRenderQueryPictIndexValuesReply) +
+ num * sizeof(xIndexValue));
+ reply = (xRenderQueryPictIndexValuesReply *) malloc(rlength);
+ if (!reply)
+ return BadAlloc;
+
+ reply->type = X_Reply;
+ reply->sequenceNumber = client->sequence;
+ reply->length = bytes_to_int32(rlength - sizeof(xGenericReply));
+ reply->numIndexValues = num;
+
+ values = (xIndexValue *) (reply + 1);
+
+ memcpy (reply + 1, pFormat->index.pValues, num * sizeof (xIndexValue));
+
+ if (client->swapped)
+ {
+ for (i = 0; i < num; i++)
+ {
+ swapl (&values[i].pixel, n);
+ swaps (&values[i].red, n);
+ swaps (&values[i].green, n);
+ swaps (&values[i].blue, n);
+ swaps (&values[i].alpha, n);
+ }
+ swaps (&reply->sequenceNumber, n);
+ swapl (&reply->length, n);
+ swapl (&reply->numIndexValues, n);
+ }
+
+ WriteToClient(client, rlength, (char *) reply);
+ free(reply);
+ return Success;
+}
+
+static int
+ProcRenderQueryDithers (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+ProcRenderCreatePicture (ClientPtr client)
+{
+ PicturePtr pPicture;
+ DrawablePtr pDrawable;
+ PictFormatPtr pFormat;
+ int len, error, rc;
+ REQUEST(xRenderCreatePictureReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
+
+ LEGAL_NEW_RESOURCE(stuff->pid, client);
+ rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
+ DixReadAccess|DixAddAccess);
+ if (rc != Success)
+ return rc;
+
+ rc = dixLookupResourceByType((pointer *)&pFormat, stuff->format,
+ PictFormatType, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+
+ if (pFormat->depth != pDrawable->depth)
+ return BadMatch;
+ len = client->req_len - bytes_to_int32(sizeof(xRenderCreatePictureReq));
+ if (Ones(stuff->mask) != len)
+ return BadLength;
+
+ pPicture = CreatePicture (stuff->pid,
+ pDrawable,
+ pFormat,
+ stuff->mask,
+ (XID *) (stuff + 1),
+ client,
+ &error);
+ if (!pPicture)
+ return error;
+ if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
+ return BadAlloc;
+ return Success;
+}
+
+static int
+ProcRenderChangePicture (ClientPtr client)
+{
+ PicturePtr pPicture;
+ REQUEST(xRenderChangePictureReq);
+ int len;
+
+ REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
+ VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess);
+
+ len = client->req_len - bytes_to_int32(sizeof(xRenderChangePictureReq));
+ if (Ones(stuff->mask) != len)
+ return BadLength;
+
+ return ChangePicture (pPicture, stuff->mask, (XID *) (stuff + 1),
+ (DevUnion *) 0, client);
+}
+
+static int
+ProcRenderSetPictureClipRectangles (ClientPtr client)
+{
+ REQUEST(xRenderSetPictureClipRectanglesReq);
+ PicturePtr pPicture;
+ int nr;
+
+ REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
+ VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess);
+ if (!pPicture->pDrawable)
+ return BadDrawable;
+
+ nr = (client->req_len << 2) - sizeof(xRenderSetPictureClipRectanglesReq);
+ if (nr & 4)
+ return BadLength;
+ nr >>= 3;
+ return SetPictureClipRects (pPicture,
+ stuff->xOrigin, stuff->yOrigin,
+ nr, (xRectangle *) &stuff[1]);
+}
+
+static int
+ProcRenderFreePicture (ClientPtr client)
+{
+ PicturePtr pPicture;
+ REQUEST(xRenderFreePictureReq);
+
+ REQUEST_SIZE_MATCH(xRenderFreePictureReq);
+
+ VERIFY_PICTURE (pPicture, stuff->picture, client, DixDestroyAccess);
+ FreeResource (stuff->picture, RT_NONE);
+ return Success;
+}
+
+static Bool
+PictOpValid (CARD8 op)
+{
+ if (/*PictOpMinimum <= op && */ op <= PictOpMaximum)
+ return TRUE;
+ if (PictOpDisjointMinimum <= op && op <= PictOpDisjointMaximum)
+ return TRUE;
+ if (PictOpConjointMinimum <= op && op <= PictOpConjointMaximum)
+ return TRUE;
+ if (PictOpBlendMinimum <= op && op <= PictOpBlendMaximum)
+ return TRUE;
+ return FALSE;
+}
+
+static int
+ProcRenderComposite (ClientPtr client)
+{
+ PicturePtr pSrc, pMask, pDst;
+ REQUEST(xRenderCompositeReq);
+
+ REQUEST_SIZE_MATCH(xRenderCompositeReq);
+ if (!PictOpValid (stuff->op))
+ {
+ client->errorValue = stuff->op;
+ return BadValue;
+ }
+ VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
+ if (!pDst->pDrawable)
+ return BadDrawable;
+ VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
+ VERIFY_ALPHA (pMask, stuff->mask, client, DixReadAccess);
+ if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) ||
+ (pMask && pMask->pDrawable && pDst->pDrawable->pScreen != pMask->pDrawable->pScreen))
+ return BadMatch;
+ CompositePicture (stuff->op,
+ pSrc,
+ pMask,
+ pDst,
+ stuff->xSrc,
+ stuff->ySrc,
+ stuff->xMask,
+ stuff->yMask,
+ stuff->xDst,
+ stuff->yDst,
+ stuff->width,
+ stuff->height);
+ return Success;
+}
+
+static int
+ProcRenderScale (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+ProcRenderTrapezoids (ClientPtr client)
+{
+ int rc, ntraps;
+ PicturePtr pSrc, pDst;
+ PictFormatPtr pFormat;
+ REQUEST(xRenderTrapezoidsReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq);
+ if (!PictOpValid (stuff->op))
+ {
+ client->errorValue = stuff->op;
+ return BadValue;
+ }
+ VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
+ VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
+ if (!pDst->pDrawable)
+ return BadDrawable;
+ if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)
+ return BadMatch;
+ if (stuff->maskFormat)
+ {
+ rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat,
+ PictFormatType, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+ }
+ else
+ pFormat = 0;
+ ntraps = (client->req_len << 2) - sizeof (xRenderTrapezoidsReq);
+ if (ntraps % sizeof (xTrapezoid))
+ return BadLength;
+ ntraps /= sizeof (xTrapezoid);
+ if (ntraps)
+ CompositeTrapezoids (stuff->op, pSrc, pDst, pFormat,
+ stuff->xSrc, stuff->ySrc,
+ ntraps, (xTrapezoid *) &stuff[1]);
+ return Success;
+}
+
+static int
+ProcRenderTriangles (ClientPtr client)
+{
+ int rc, ntris;
+ PicturePtr pSrc, pDst;
+ PictFormatPtr pFormat;
+ REQUEST(xRenderTrianglesReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
+ if (!PictOpValid (stuff->op))
+ {
+ client->errorValue = stuff->op;
+ return BadValue;
+ }
+ VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
+ VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
+ if (!pDst->pDrawable)
+ return BadDrawable;
+ if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)
+ return BadMatch;
+ if (stuff->maskFormat)
+ {
+ rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat,
+ PictFormatType, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+ }
+ else
+ pFormat = 0;
+ ntris = (client->req_len << 2) - sizeof (xRenderTrianglesReq);
+ if (ntris % sizeof (xTriangle))
+ return BadLength;
+ ntris /= sizeof (xTriangle);
+ if (ntris)
+ CompositeTriangles (stuff->op, pSrc, pDst, pFormat,
+ stuff->xSrc, stuff->ySrc,
+ ntris, (xTriangle *) &stuff[1]);
+ return Success;
+}
+
+static int
+ProcRenderTriStrip (ClientPtr client)
+{
+ int rc, npoints;
+ PicturePtr pSrc, pDst;
+ PictFormatPtr pFormat;
+ REQUEST(xRenderTrianglesReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
+ if (!PictOpValid (stuff->op))
+ {
+ client->errorValue = stuff->op;
+ return BadValue;
+ }
+ VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
+ VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
+ if (!pDst->pDrawable)
+ return BadDrawable;
+ if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)
+ return BadMatch;
+ if (stuff->maskFormat)
+ {
+ rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat,
+ PictFormatType, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+ }
+ else
+ pFormat = 0;
+ npoints = ((client->req_len << 2) - sizeof (xRenderTriStripReq));
+ if (npoints & 4)
+ return BadLength;
+ npoints >>= 3;
+ if (npoints >= 3)
+ CompositeTriStrip (stuff->op, pSrc, pDst, pFormat,
+ stuff->xSrc, stuff->ySrc,
+ npoints, (xPointFixed *) &stuff[1]);
+ return Success;
+}
+
+static int
+ProcRenderTriFan (ClientPtr client)
+{
+ int rc, npoints;
+ PicturePtr pSrc, pDst;
+ PictFormatPtr pFormat;
+ REQUEST(xRenderTrianglesReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
+ if (!PictOpValid (stuff->op))
+ {
+ client->errorValue = stuff->op;
+ return BadValue;
+ }
+ VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
+ VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
+ if (!pDst->pDrawable)
+ return BadDrawable;
+ if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)
+ return BadMatch;
+ if (stuff->maskFormat)
+ {
+ rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat,
+ PictFormatType, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+ }
+ else
+ pFormat = 0;
+ npoints = ((client->req_len << 2) - sizeof (xRenderTriStripReq));
+ if (npoints & 4)
+ return BadLength;
+ npoints >>= 3;
+ if (npoints >= 3)
+ CompositeTriFan (stuff->op, pSrc, pDst, pFormat,
+ stuff->xSrc, stuff->ySrc,
+ npoints, (xPointFixed *) &stuff[1]);
+ return Success;
+}
+
+static int
+ProcRenderColorTrapezoids (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+ProcRenderColorTriangles (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+ProcRenderTransform (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+ProcRenderCreateGlyphSet (ClientPtr client)
+{
+ GlyphSetPtr glyphSet;
+ PictFormatPtr format;
+ int rc, f;
+ REQUEST(xRenderCreateGlyphSetReq);
+
+ REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq);
+
+ LEGAL_NEW_RESOURCE(stuff->gsid, client);
+ rc = dixLookupResourceByType((pointer *)&format, stuff->format,
+ PictFormatType, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+
+ switch (format->depth) {
+ case 1:
+ f = GlyphFormat1;
+ break;
+ case 4:
+ f = GlyphFormat4;
+ break;
+ case 8:
+ f = GlyphFormat8;
+ break;
+ case 16:
+ f = GlyphFormat16;
+ break;
+ case 32:
+ f = GlyphFormat32;
+ break;
+ default:
+ return BadMatch;
+ }
+ if (format->type != PictTypeDirect)
+ return BadMatch;
+ glyphSet = AllocateGlyphSet (f, format);
+ if (!glyphSet)
+ return BadAlloc;
+ /* security creation/labeling check */
+ rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->gsid, GlyphSetType,
+ glyphSet, RT_NONE, NULL, DixCreateAccess);
+ if (rc != Success)
+ return rc;
+ if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet))
+ return BadAlloc;
+ return Success;
+}
+
+static int
+ProcRenderReferenceGlyphSet (ClientPtr client)
+{
+ GlyphSetPtr glyphSet;
+ int rc;
+ REQUEST(xRenderReferenceGlyphSetReq);
+
+ REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq);
+
+ LEGAL_NEW_RESOURCE(stuff->gsid, client);
+
+ rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->existing, GlyphSetType,
+ client, DixGetAttrAccess);
+ if (rc != Success)
+ {
+ client->errorValue = stuff->existing;
+ return rc;
+ }
+ glyphSet->refcnt++;
+ if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet))
+ return BadAlloc;
+ return Success;
+}
+
+#define NLOCALDELTA 64
+#define NLOCALGLYPH 256
+
+static int
+ProcRenderFreeGlyphSet (ClientPtr client)
+{
+ GlyphSetPtr glyphSet;
+ int rc;
+ REQUEST(xRenderFreeGlyphSetReq);
+
+ REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
+ rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
+ client, DixDestroyAccess);
+ if (rc != Success)
+ {
+ client->errorValue = stuff->glyphset;
+ return rc;
+ }
+ FreeResource (stuff->glyphset, RT_NONE);
+ return Success;
+}
+
+typedef struct _GlyphNew {
+ Glyph id;
+ GlyphPtr glyph;
+ Bool found;
+ unsigned char sha1[20];
+} GlyphNewRec, *GlyphNewPtr;
+
+#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
+
+static int
+ProcRenderAddGlyphs (ClientPtr client)
+{
+ GlyphSetPtr glyphSet;
+ REQUEST(xRenderAddGlyphsReq);
+ GlyphNewRec glyphsLocal[NLOCALGLYPH];
+ GlyphNewPtr glyphsBase, glyphs, glyph_new;
+ int remain, nglyphs;
+ CARD32 *gids;
+ xGlyphInfo *gi;
+ CARD8 *bits;
+ unsigned int size;
+ int err;
+ int i, screen;
+ PicturePtr pSrc = NULL, pDst = NULL;
+ PixmapPtr pSrcPix = NULL, pDstPix = NULL;
+ CARD32 component_alpha;
+
+ REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq);
+ err = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
+ client, DixAddAccess);
+ if (err != Success)
+ {
+ client->errorValue = stuff->glyphset;
+ return err;
+ }
+
+ err = BadAlloc;
+ nglyphs = stuff->nglyphs;
+ if (nglyphs > UINT32_MAX / sizeof(GlyphNewRec))
+ return BadAlloc;
+
+ component_alpha = NeedsComponent (glyphSet->format->format);
+
+ if (nglyphs <= NLOCALGLYPH) {
+ memset (glyphsLocal, 0, sizeof (glyphsLocal));
+ glyphsBase = glyphsLocal;
+ }
+ else
+ {
+ glyphsBase = (GlyphNewPtr)calloc(nglyphs, sizeof (GlyphNewRec));
+ if (!glyphsBase)
+ return BadAlloc;
+ }
+
+ remain = (client->req_len << 2) - sizeof (xRenderAddGlyphsReq);
+
+ glyphs = glyphsBase;
+
+ gids = (CARD32 *) (stuff + 1);
+ gi = (xGlyphInfo *) (gids + nglyphs);
+ bits = (CARD8 *) (gi + nglyphs);
+ remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs;
+
+ /* protect against bad nglyphs */
+ if (gi < ((xGlyphInfo *)stuff) ||
+ gi > ((xGlyphInfo *)((CARD32 *)stuff + client->req_len)) ||
+ bits < ((CARD8 *)stuff) ||
+ bits > ((CARD8 *)((CARD32 *)stuff + client->req_len))) {
+ err = BadLength;
+ goto bail;
+ }
+
+ for (i = 0; i < nglyphs; i++)
+ {
+ size_t padded_width;
+ glyph_new = &glyphs[i];
+
+ padded_width = PixmapBytePad (gi[i].width,
+ glyphSet->format->depth);
+
+ if (gi[i].height && padded_width > (UINT32_MAX - sizeof(GlyphRec))/gi[i].height)
+ break;
+
+ size = gi[i].height * padded_width;
+ if (remain < size)
+ break;
+
+ err = HashGlyph (&gi[i], bits, size, glyph_new->sha1);
+ if (err)
+ goto bail;
+
+ glyph_new->glyph = FindGlyphByHash (glyph_new->sha1,
+ glyphSet->fdepth);
+
+ if (glyph_new->glyph && glyph_new->glyph != DeletedGlyph)
+ {
+ glyph_new->found = TRUE;
+ }
+ else
+ {
+ GlyphPtr glyph;
+
+ glyph_new->found = FALSE;
+ glyph_new->glyph = glyph = AllocateGlyph (&gi[i], glyphSet->fdepth);
+ if (! glyph)
+ {
+ err = BadAlloc;
+ goto bail;
+ }
+
+ for (screen = 0; screen < screenInfo.numScreens; screen++)
+ {
+ int width = gi[i].width;
+ int height = gi[i].height;
+ int depth = glyphSet->format->depth;
+ ScreenPtr pScreen;
+ int error;
+
+ /* Skip work if it's invisibly small anyway */
+ if (!width || !height)
+ break;
+
+ pScreen = screenInfo.screens[screen];
+ pSrcPix = GetScratchPixmapHeader (pScreen,
+ width, height,
+ depth, depth,
+ -1, bits);
+ if (! pSrcPix)
+ {
+ err = BadAlloc;
+ goto bail;
+ }
+
+ pSrc = CreatePicture (0, &pSrcPix->drawable,
+ glyphSet->format, 0, NULL,
+ serverClient, &error);
+ if (! pSrc)
+ {
+ err = BadAlloc;
+ goto bail;
+ }
+
+ pDstPix = (pScreen->CreatePixmap) (pScreen,
+ width, height, depth,
+ CREATE_PIXMAP_USAGE_GLYPH_PICTURE);
+
+ if (!pDstPix)
+ {
+ err = BadAlloc;
+ goto bail;
+ }
+
+ GlyphPicture (glyph)[screen] = pDst =
+ CreatePicture (0, &pDstPix->drawable,
+ glyphSet->format,
+ CPComponentAlpha, &component_alpha,
+ serverClient, &error);
+
+ /* The picture takes a reference to the pixmap, so we
+ drop ours. */
+ (pScreen->DestroyPixmap) (pDstPix);
+ pDstPix = NULL;
+
+ if (! pDst)
+ {
+ err = BadAlloc;
+ goto bail;
+ }
+
+ CompositePicture (PictOpSrc,
+ pSrc,
+ None,
+ pDst,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ width, height);
+
+ FreePicture ((pointer) pSrc, 0);
+ pSrc = NULL;
+ FreeScratchPixmapHeader (pSrcPix);
+ pSrcPix = NULL;
+ }
+
+ memcpy (glyph_new->glyph->sha1, glyph_new->sha1, 20);
+ }
+
+ glyph_new->id = gids[i];
+
+ if (size & 3)
+ size += 4 - (size & 3);
+ bits += size;
+ remain -= size;
+ }
+ if (remain || i < nglyphs)
+ {
+ err = BadLength;
+ goto bail;
+ }
+ if (!ResizeGlyphSet (glyphSet, nglyphs))
+ {
+ err = BadAlloc;
+ goto bail;
+ }
+ for (i = 0; i < nglyphs; i++)
+ AddGlyph (glyphSet, glyphs[i].glyph, glyphs[i].id);
+
+ if (glyphsBase != glyphsLocal)
+ free(glyphsBase);
+ return Success;
+bail:
+ if (pSrc)
+ FreePicture ((pointer) pSrc, 0);
+ if (pSrcPix)
+ FreeScratchPixmapHeader (pSrcPix);
+ for (i = 0; i < nglyphs; i++)
+ if (glyphs[i].glyph && ! glyphs[i].found)
+ free(glyphs[i].glyph);
+ if (glyphsBase != glyphsLocal)
+ free(glyphsBase);
+ return err;
+}
+
+static int
+ProcRenderAddGlyphsFromPicture (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+ProcRenderFreeGlyphs (ClientPtr client)
+{
+ REQUEST(xRenderFreeGlyphsReq);
+ GlyphSetPtr glyphSet;
+ int rc, nglyph;
+ CARD32 *gids;
+ CARD32 glyph;
+
+ REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
+ rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
+ client, DixRemoveAccess);
+ if (rc != Success)
+ {
+ client->errorValue = stuff->glyphset;
+ return rc;
+ }
+ nglyph = bytes_to_int32((client->req_len << 2) - sizeof (xRenderFreeGlyphsReq));
+ gids = (CARD32 *) (stuff + 1);
+ while (nglyph-- > 0)
+ {
+ glyph = *gids++;
+ if (!DeleteGlyph (glyphSet, glyph))
+ {
+ client->errorValue = glyph;
+ return RenderErrBase + BadGlyph;
+ }
+ }
+ return Success;
+}
+
+static int
+ProcRenderCompositeGlyphs (ClientPtr client)
+{
+ GlyphSetPtr glyphSet;
+ GlyphSet gs;
+ PicturePtr pSrc, pDst;
+ PictFormatPtr pFormat;
+ GlyphListRec listsLocal[NLOCALDELTA];
+ GlyphListPtr lists, listsBase;
+ GlyphPtr glyphsLocal[NLOCALGLYPH];
+ Glyph glyph;
+ GlyphPtr *glyphs, *glyphsBase;
+ xGlyphElt *elt;
+ CARD8 *buffer, *end;
+ int nglyph;
+ int nlist;
+ int space;
+ int size;
+ int rc, n;
+
+ REQUEST(xRenderCompositeGlyphsReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq);
+
+ switch (stuff->renderReqType) {
+ default: size = 1; break;
+ case X_RenderCompositeGlyphs16: size = 2; break;
+ case X_RenderCompositeGlyphs32: size = 4; break;
+ }
+
+ if (!PictOpValid (stuff->op))
+ {
+ client->errorValue = stuff->op;
+ return BadValue;
+ }
+ VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
+ VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
+ if (!pDst->pDrawable)
+ return BadDrawable;
+ if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)
+ return BadMatch;
+ if (stuff->maskFormat)
+ {
+ rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat,
+ PictFormatType, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
+ }
+ else
+ pFormat = 0;
+
+ rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset,
+ GlyphSetType, client, DixUseAccess);
+ if (rc != Success)
+ return rc;
+
+ buffer = (CARD8 *) (stuff + 1);
+ end = (CARD8 *) stuff + (client->req_len << 2);
+ nglyph = 0;
+ nlist = 0;
+ while (buffer + sizeof (xGlyphElt) < end)
+ {
+ elt = (xGlyphElt *) buffer;
+ buffer += sizeof (xGlyphElt);
+
+ if (elt->len == 0xff)
+ {
+ buffer += 4;
+ }
+ else
+ {
+ nlist++;
+ nglyph += elt->len;
+ space = size * elt->len;
+ if (space & 3)
+ space += 4 - (space & 3);
+ buffer += space;
+ }
+ }
+ if (nglyph <= NLOCALGLYPH)
+ glyphsBase = glyphsLocal;
+ else
+ {
+ glyphsBase = (GlyphPtr *) malloc(nglyph * sizeof (GlyphPtr));
+ if (!glyphsBase)
+ return BadAlloc;
+ }
+ if (nlist <= NLOCALDELTA)
+ listsBase = listsLocal;
+ else
+ {
+ listsBase = (GlyphListPtr) malloc(nlist * sizeof (GlyphListRec));
+ if (!listsBase)
+ return BadAlloc;
+ }
+ buffer = (CARD8 *) (stuff + 1);
+ glyphs = glyphsBase;
+ lists = listsBase;
+ while (buffer + sizeof (xGlyphElt) < end)
+ {
+ elt = (xGlyphElt *) buffer;
+ buffer += sizeof (xGlyphElt);
+
+ if (elt->len == 0xff)
+ {
+ if (buffer + sizeof (GlyphSet) < end)
+ {
+ memcpy(&gs, buffer, sizeof(GlyphSet));
+ rc = dixLookupResourceByType((pointer *)&glyphSet, gs,
+ GlyphSetType, client,
+ DixUseAccess);
+ if (rc != Success)
+ {
+ if (glyphsBase != glyphsLocal)
+ free(glyphsBase);
+ if (listsBase != listsLocal)
+ free(listsBase);
+ return rc;
+ }
+ }
+ buffer += 4;
+ }
+ else
+ {
+ lists->xOff = elt->deltax;
+ lists->yOff = elt->deltay;
+ lists->format = glyphSet->format;
+ lists->len = 0;
+ n = elt->len;
+ while (n--)
+ {
+ if (buffer + size <= end)
+ {
+ switch (size) {
+ case 1:
+ glyph = *((CARD8 *)buffer); break;
+ case 2:
+ glyph = *((CARD16 *)buffer); break;
+ case 4:
+ default:
+ glyph = *((CARD32 *)buffer); break;
+ }
+ if ((*glyphs = FindGlyph (glyphSet, glyph)))
+ {
+ lists->len++;
+ glyphs++;
+ }
+ }
+ buffer += size;
+ }
+ space = size * elt->len;
+ if (space & 3)
+ buffer += 4 - (space & 3);
+ lists++;
+ }
+ }
+ if (buffer > end)
+ return BadLength;
+
+ CompositeGlyphs (stuff->op,
+ pSrc,
+ pDst,
+ pFormat,
+ stuff->xSrc,
+ stuff->ySrc,
+ nlist,
+ listsBase,
+ glyphsBase);
+
+ if (glyphsBase != glyphsLocal)
+ free(glyphsBase);
+ if (listsBase != listsLocal)
+ free(listsBase);
+
+ return Success;
+}
+
+static int
+ProcRenderFillRectangles (ClientPtr client)
+{
+ PicturePtr pDst;
+ int things;
+ REQUEST(xRenderFillRectanglesReq);
+
+ REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq);
+ if (!PictOpValid (stuff->op))
+ {
+ client->errorValue = stuff->op;
+ return BadValue;
+ }
+ VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess);
+ if (!pDst->pDrawable)
+ return BadDrawable;
+
+ things = (client->req_len << 2) - sizeof(xRenderFillRectanglesReq);
+ if (things & 4)
+ return BadLength;
+ things >>= 3;
+
+ CompositeRects (stuff->op,
+ pDst,
+ &stuff->color,
+ things,
+ (xRectangle *) &stuff[1]);
+
+ return Success;
+}
+
+static void
+RenderSetBit (unsigned char *line, int x, int bit)
+{
+ unsigned char mask;
+
+ if (screenInfo.bitmapBitOrder == LSBFirst)
+ mask = (1 << (x & 7));
+ else
+ mask = (0x80 >> (x & 7));
+ /* XXX assumes byte order is host byte order */
+ line += (x >> 3);
+ if (bit)
+ *line |= mask;
+ else
+ *line &= ~mask;
+}
+
+#define DITHER_DIM 2
+
+static CARD32 orderedDither[DITHER_DIM][DITHER_DIM] = {
+ { 1, 3, },
+ { 4, 2, },
+};
+
+#define DITHER_SIZE ((sizeof orderedDither / sizeof orderedDither[0][0]) + 1)
+
+static int
+ProcRenderCreateCursor (ClientPtr client)
+{
+ REQUEST(xRenderCreateCursorReq);
+ PicturePtr pSrc;
+ ScreenPtr pScreen;
+ unsigned short width, height;
+ CARD32 *argbbits, *argb;
+ unsigned char *srcbits, *srcline;
+ unsigned char *mskbits, *mskline;
+ int stride;
+ int x, y;
+ int nbytes_mono;
+ CursorMetricRec cm;
+ CursorPtr pCursor;
+ CARD32 twocolor[3];
+ int rc, ncolor;
+
+ REQUEST_SIZE_MATCH (xRenderCreateCursorReq);
+ LEGAL_NEW_RESOURCE(stuff->cid, client);
+
+ VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess);
+ if (!pSrc->pDrawable)
+ return BadDrawable;
+ pScreen = pSrc->pDrawable->pScreen;
+ width = pSrc->pDrawable->width;
+ height = pSrc->pDrawable->height;
+ if (height && width > UINT32_MAX/(height*sizeof(CARD32)))
+ return BadAlloc;
+ if ( stuff->x > width
+ || stuff->y > height )
+ return BadMatch;
+ argbbits = malloc(width * height * sizeof (CARD32));
+ if (!argbbits)
+ return BadAlloc;
+
+ stride = BitmapBytePad(width);
+ nbytes_mono = stride*height;
+ srcbits = calloc(1, nbytes_mono);
+ if (!srcbits)
+ {
+ free(argbbits);
+ return BadAlloc;
+ }
+ mskbits = calloc(1, nbytes_mono);
+ if (!mskbits)
+ {
+ free(argbbits);
+ free(srcbits);
+ return BadAlloc;
+ }
+
+ if (pSrc->format == PICT_a8r8g8b8)
+ {
+ (*pScreen->GetImage) (pSrc->pDrawable,
+ 0, 0, width, height, ZPixmap,
+ 0xffffffff, (pointer) argbbits);
+ }
+ else
+ {
+ PixmapPtr pPixmap;
+ PicturePtr pPicture;
+ PictFormatPtr pFormat;
+ int error;
+
+ pFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8);
+ if (!pFormat)
+ {
+ free(argbbits);
+ free(srcbits);
+ free(mskbits);
+ return BadImplementation;
+ }
+ pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32,
+ CREATE_PIXMAP_USAGE_SCRATCH);
+ if (!pPixmap)
+ {
+ free(argbbits);
+ free(srcbits);
+ free(mskbits);
+ return BadAlloc;
+ }
+ pPicture = CreatePicture (0, &pPixmap->drawable, pFormat, 0, 0,
+ client, &error);
+ if (!pPicture)
+ {
+ free(argbbits);
+ free(srcbits);
+ free(mskbits);
+ return error;
+ }
+ (*pScreen->DestroyPixmap) (pPixmap);
+ CompositePicture (PictOpSrc,
+ pSrc, 0, pPicture,
+ 0, 0, 0, 0, 0, 0, width, height);
+ (*pScreen->GetImage) (pPicture->pDrawable,
+ 0, 0, width, height, ZPixmap,
+ 0xffffffff, (pointer) argbbits);
+ FreePicture (pPicture, 0);
+ }
+ /*
+ * Check whether the cursor can be directly supported by
+ * the core cursor code
+ */
+ ncolor = 0;
+ argb = argbbits;
+ for (y = 0; ncolor <= 2 && y < height; y++)
+ {
+ for (x = 0; ncolor <= 2 && x < width; x++)
+ {
+ CARD32 p = *argb++;
+ CARD32 a = (p >> 24);
+
+ if (a == 0) /* transparent */
+ continue;
+ if (a == 0xff) /* opaque */
+ {
+ int n;
+ for (n = 0; n < ncolor; n++)
+ if (p == twocolor[n])
+ break;
+ if (n == ncolor)
+ twocolor[ncolor++] = p;
+ }
+ else
+ ncolor = 3;
+ }
+ }
+
+ /*
+ * Convert argb image to two plane cursor
+ */
+ srcline = srcbits;
+ mskline = mskbits;
+ argb = argbbits;
+ for (y = 0; y < height; y++)
+ {
+ for (x = 0; x < width; x++)
+ {
+ CARD32 p = *argb++;
+
+ if (ncolor <= 2)
+ {
+ CARD32 a = ((p >> 24));
+
+ RenderSetBit (mskline, x, a != 0);
+ RenderSetBit (srcline, x, a != 0 && p == twocolor[0]);
+ }
+ else
+ {
+ CARD32 a = ((p >> 24) * DITHER_SIZE + 127) / 255;
+ CARD32 i = ((CvtR8G8B8toY15(p) >> 7) * DITHER_SIZE + 127) / 255;
+ CARD32 d = orderedDither[y&(DITHER_DIM-1)][x&(DITHER_DIM-1)];
+ /* Set mask from dithered alpha value */
+ RenderSetBit(mskline, x, a > d);
+ /* Set src from dithered intensity value */
+ RenderSetBit(srcline, x, a > d && i <= d);
+ }
+ }
+ srcline += stride;
+ mskline += stride;
+ }
+ /*
+ * Dither to white and black if the cursor has more than two colors
+ */
+ if (ncolor > 2)
+ {
+ twocolor[0] = 0xff000000;
+ twocolor[1] = 0xffffffff;
+ }
+ else
+ {
+ free(argbbits);
+ argbbits = 0;
+ }
+
+#define GetByte(p,s) (((p) >> (s)) & 0xff)
+#define GetColor(p,s) (GetByte(p,s) | (GetByte(p,s) << 8))
+
+ cm.width = width;
+ cm.height = height;
+ cm.xhot = stuff->x;
+ cm.yhot = stuff->y;
+ rc = AllocARGBCursor(srcbits, mskbits, argbbits, &cm,
+ GetColor(twocolor[0], 16),
+ GetColor(twocolor[0], 8),
+ GetColor(twocolor[0], 0),
+ GetColor(twocolor[1], 16),
+ GetColor(twocolor[1], 8),
+ GetColor(twocolor[1], 0),
+ &pCursor, client, stuff->cid);
+ if (rc != Success)
+ return rc;
+ if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
+ return BadAlloc;
+
+ return Success;
+}
+
+static int
+ProcRenderSetPictureTransform (ClientPtr client)
+{
+ REQUEST(xRenderSetPictureTransformReq);
+ PicturePtr pPicture;
+
+ REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
+ VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess);
+ return SetPictureTransform (pPicture, (PictTransform *) &stuff->transform);
+}
+
+static int
+ProcRenderQueryFilters (ClientPtr client)
+{
+ REQUEST (xRenderQueryFiltersReq);
+ DrawablePtr pDrawable;
+ xRenderQueryFiltersReply *reply;
+ int nbytesName;
+ int nnames;
+ ScreenPtr pScreen;
+ PictureScreenPtr ps;
+ int i, j, len, total_bytes, rc;
+ INT16 *aliases;
+ char *names;
+
+ REQUEST_SIZE_MATCH(xRenderQueryFiltersReq);
+ rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
+ DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+
+ pScreen = pDrawable->pScreen;
+ nbytesName = 0;
+ nnames = 0;
+ ps = GetPictureScreenIfSet(pScreen);
+ if (ps)
+ {
+ for (i = 0; i < ps->nfilters; i++)
+ nbytesName += 1 + strlen (ps->filters[i].name);
+ for (i = 0; i < ps->nfilterAliases; i++)
+ nbytesName += 1 + strlen (ps->filterAliases[i].alias);
+ nnames = ps->nfilters + ps->nfilterAliases;
+ }
+ len = ((nnames + 1) >> 1) + bytes_to_int32(nbytesName);
+ total_bytes = sizeof (xRenderQueryFiltersReply) + (len << 2);
+ reply = (xRenderQueryFiltersReply *) malloc(total_bytes);
+ if (!reply)
+ return BadAlloc;
+ aliases = (INT16 *) (reply + 1);
+ names = (char *) (aliases + ((nnames + 1) & ~1));
+
+ reply->type = X_Reply;
+ reply->sequenceNumber = client->sequence;
+ reply->length = len;
+ reply->numAliases = nnames;
+ reply->numFilters = nnames;
+ if (ps)
+ {
+
+ /* fill in alias values */
+ for (i = 0; i < ps->nfilters; i++)
+ aliases[i] = FilterAliasNone;
+ for (i = 0; i < ps->nfilterAliases; i++)
+ {
+ for (j = 0; j < ps->nfilters; j++)
+ if (ps->filterAliases[i].filter_id == ps->filters[j].id)
+ break;
+ if (j == ps->nfilters)
+ {
+ for (j = 0; j < ps->nfilterAliases; j++)
+ if (ps->filterAliases[i].filter_id ==
+ ps->filterAliases[j].alias_id)
+ {
+ break;
+ }
+ if (j == ps->nfilterAliases)
+ j = FilterAliasNone;
+ else
+ j = j + ps->nfilters;
+ }
+ aliases[i + ps->nfilters] = j;
+ }
+
+ /* fill in filter names */
+ for (i = 0; i < ps->nfilters; i++)
+ {
+ j = strlen (ps->filters[i].name);
+ *names++ = j;
+ strncpy (names, ps->filters[i].name, j);
+ names += j;
+ }
+
+ /* fill in filter alias names */
+ for (i = 0; i < ps->nfilterAliases; i++)
+ {
+ j = strlen (ps->filterAliases[i].alias);
+ *names++ = j;
+ strncpy (names, ps->filterAliases[i].alias, j);
+ names += j;
+ }
+ }
+
+ if (client->swapped)
+ {
+ register int n;
+
+ for (i = 0; i < reply->numAliases; i++)
+ {
+ swaps (&aliases[i], n);
+ }
+ swaps(&reply->sequenceNumber, n);
+ swapl(&reply->length, n);
+ swapl(&reply->numAliases, n);
+ swapl(&reply->numFilters, n);
+ }
+ WriteToClient(client, total_bytes, (char *) reply);
+ free(reply);
+
+ return Success;
+}
+
+static int
+ProcRenderSetPictureFilter (ClientPtr client)
+{
+ REQUEST (xRenderSetPictureFilterReq);
+ PicturePtr pPicture;
+ int result;
+ xFixed *params;
+ int nparams;
+ char *name;
+
+ REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq);
+ VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess);
+ name = (char *) (stuff + 1);
+ params = (xFixed *) (name + pad_to_int32(stuff->nbytes));
+ nparams = ((xFixed *) stuff + client->req_len) - params;
+ result = SetPictureFilter (pPicture, name, stuff->nbytes, params, nparams);
+ return result;
+}
+
+static int
+ProcRenderCreateAnimCursor (ClientPtr client)
+{
+ REQUEST(xRenderCreateAnimCursorReq);
+ CursorPtr *cursors;
+ CARD32 *deltas;
+ CursorPtr pCursor;
+ int ncursor;
+ xAnimCursorElt *elt;
+ int i;
+ int ret;
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreateAnimCursorReq);
+ LEGAL_NEW_RESOURCE(stuff->cid, client);
+ if (client->req_len & 1)
+ return BadLength;
+ ncursor = (client->req_len - (bytes_to_int32(sizeof(xRenderCreateAnimCursorReq)))) >> 1;
+ cursors = malloc(ncursor * (sizeof (CursorPtr) + sizeof (CARD32)));
+ if (!cursors)
+ return BadAlloc;
+ deltas = (CARD32 *) (cursors + ncursor);
+ elt = (xAnimCursorElt *) (stuff + 1);
+ for (i = 0; i < ncursor; i++)
+ {
+ ret = dixLookupResourceByType((pointer *)(cursors + i), elt->cursor,
+ RT_CURSOR, client, DixReadAccess);
+ if (ret != Success)
+ {
+ free(cursors);
+ return ret;
+ }
+ deltas[i] = elt->delay;
+ elt++;
+ }
+ ret = AnimCursorCreate (cursors, deltas, ncursor, &pCursor, client,
+ stuff->cid);
+ free(cursors);
+ if (ret != Success)
+ return ret;
+
+ if (AddResource (stuff->cid, RT_CURSOR, (pointer)pCursor))
+ return Success;
+ return BadAlloc;
+}
+
+static int
+ProcRenderAddTraps (ClientPtr client)
+{
+ int ntraps;
+ PicturePtr pPicture;
+ REQUEST(xRenderAddTrapsReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq);
+ VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess);
+ if (!pPicture->pDrawable)
+ return BadDrawable;
+ ntraps = (client->req_len << 2) - sizeof (xRenderAddTrapsReq);
+ if (ntraps % sizeof (xTrap))
+ return BadLength;
+ ntraps /= sizeof (xTrap);
+ if (ntraps)
+ AddTraps (pPicture,
+ stuff->xOff, stuff->yOff,
+ ntraps, (xTrap *) &stuff[1]);
+ return Success;
+}
+
+static int ProcRenderCreateSolidFill(ClientPtr client)
+{
+ PicturePtr pPicture;
+ int error = 0;
+ REQUEST(xRenderCreateSolidFillReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq);
+
+ LEGAL_NEW_RESOURCE(stuff->pid, client);
+
+ pPicture = CreateSolidPicture(stuff->pid, &stuff->color, &error);
+ if (!pPicture)
+ return error;
+ /* security creation/labeling check */
+ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
+ pPicture, RT_NONE, NULL, DixCreateAccess);
+ if (error != Success)
+ return error;
+ if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
+ return BadAlloc;
+ return Success;
+}
+
+static int ProcRenderCreateLinearGradient (ClientPtr client)
+{
+ PicturePtr pPicture;
+ int len;
+ int error = 0;
+ xFixed *stops;
+ xRenderColor *colors;
+ REQUEST(xRenderCreateLinearGradientReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq);
+
+ LEGAL_NEW_RESOURCE(stuff->pid, client);
+
+ len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
+ if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
+ return BadLength;
+ if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
+ return BadLength;
+
+ stops = (xFixed *)(stuff + 1);
+ colors = (xRenderColor *)(stops + stuff->nStops);
+
+ pPicture = CreateLinearGradientPicture (stuff->pid, &stuff->p1, &stuff->p2,
+ stuff->nStops, stops, colors, &error);
+ if (!pPicture)
+ return error;
+ /* security creation/labeling check */
+ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
+ pPicture, RT_NONE, NULL, DixCreateAccess);
+ if (error != Success)
+ return error;
+ if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
+ return BadAlloc;
+ return Success;
+}
+
+static int ProcRenderCreateRadialGradient (ClientPtr client)
+{
+ PicturePtr pPicture;
+ int len;
+ int error = 0;
+ xFixed *stops;
+ xRenderColor *colors;
+ REQUEST(xRenderCreateRadialGradientReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq);
+
+ LEGAL_NEW_RESOURCE(stuff->pid, client);
+
+ len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq);
+ if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
+ return BadLength;
+
+ stops = (xFixed *)(stuff + 1);
+ colors = (xRenderColor *)(stops + stuff->nStops);
+
+ pPicture = CreateRadialGradientPicture (stuff->pid, &stuff->inner, &stuff->outer,
+ stuff->inner_radius, stuff->outer_radius,
+ stuff->nStops, stops, colors, &error);
+ if (!pPicture)
+ return error;
+ /* security creation/labeling check */
+ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
+ pPicture, RT_NONE, NULL, DixCreateAccess);
+ if (error != Success)
+ return error;
+ if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
+ return BadAlloc;
+ return Success;
+}
+
+static int ProcRenderCreateConicalGradient (ClientPtr client)
+{
+ PicturePtr pPicture;
+ int len;
+ int error = 0;
+ xFixed *stops;
+ xRenderColor *colors;
+ REQUEST(xRenderCreateConicalGradientReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq);
+
+ LEGAL_NEW_RESOURCE(stuff->pid, client);
+
+ len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq);
+ if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
+ return BadLength;
+
+ stops = (xFixed *)(stuff + 1);
+ colors = (xRenderColor *)(stops + stuff->nStops);
+
+ pPicture = CreateConicalGradientPicture (stuff->pid, &stuff->center, stuff->angle,
+ stuff->nStops, stops, colors, &error);
+ if (!pPicture)
+ return error;
+ /* security creation/labeling check */
+ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType,
+ pPicture, RT_NONE, NULL, DixCreateAccess);
+ if (error != Success)
+ return error;
+ if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
+ return BadAlloc;
+ return Success;
+}
+
+
+static int
+ProcRenderDispatch (ClientPtr client)
+{
+ REQUEST(xReq);
+
+ if (stuff->data < RenderNumberRequests)
+ return (*ProcRenderVector[stuff->data]) (client);
+ else
+ return BadRequest;
+}
+
+static int
+SProcRenderQueryVersion (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderQueryVersionReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->majorVersion, n);
+ swapl(&stuff->minorVersion, n);
+ return (*ProcRenderVector[stuff->renderReqType])(client);
+}
+
+static int
+SProcRenderQueryPictFormats (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderQueryPictFormatsReq);
+ swaps(&stuff->length, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderQueryPictIndexValues (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderQueryPictIndexValuesReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->format, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderQueryDithers (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+SProcRenderCreatePicture (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderCreatePictureReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->pid, n);
+ swapl(&stuff->drawable, n);
+ swapl(&stuff->format, n);
+ swapl(&stuff->mask, n);
+ SwapRestL(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderChangePicture (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderChangePictureReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->picture, n);
+ swapl(&stuff->mask, n);
+ SwapRestL(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderSetPictureClipRectangles (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderSetPictureClipRectanglesReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->picture, n);
+ swaps(&stuff->xOrigin, n);
+ swaps(&stuff->yOrigin, n);
+ SwapRestS(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderFreePicture (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderFreePictureReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->picture, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderComposite (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderCompositeReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->src, n);
+ swapl(&stuff->mask, n);
+ swapl(&stuff->dst, n);
+ swaps(&stuff->xSrc, n);
+ swaps(&stuff->ySrc, n);
+ swaps(&stuff->xMask, n);
+ swaps(&stuff->yMask, n);
+ swaps(&stuff->xDst, n);
+ swaps(&stuff->yDst, n);
+ swaps(&stuff->width, n);
+ swaps(&stuff->height, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderScale (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderScaleReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->src, n);
+ swapl(&stuff->dst, n);
+ swapl(&stuff->colorScale, n);
+ swapl(&stuff->alphaScale, n);
+ swaps(&stuff->xSrc, n);
+ swaps(&stuff->ySrc, n);
+ swaps(&stuff->xDst, n);
+ swaps(&stuff->yDst, n);
+ swaps(&stuff->width, n);
+ swaps(&stuff->height, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderTrapezoids (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderTrapezoidsReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq);
+ swaps (&stuff->length, n);
+ swapl (&stuff->src, n);
+ swapl (&stuff->dst, n);
+ swapl (&stuff->maskFormat, n);
+ swaps (&stuff->xSrc, n);
+ swaps (&stuff->ySrc, n);
+ SwapRestL(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderTriangles (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderTrianglesReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
+ swaps (&stuff->length, n);
+ swapl (&stuff->src, n);
+ swapl (&stuff->dst, n);
+ swapl (&stuff->maskFormat, n);
+ swaps (&stuff->xSrc, n);
+ swaps (&stuff->ySrc, n);
+ SwapRestL(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderTriStrip (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderTriStripReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderTriStripReq);
+ swaps (&stuff->length, n);
+ swapl (&stuff->src, n);
+ swapl (&stuff->dst, n);
+ swapl (&stuff->maskFormat, n);
+ swaps (&stuff->xSrc, n);
+ swaps (&stuff->ySrc, n);
+ SwapRestL(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderTriFan (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderTriFanReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderTriFanReq);
+ swaps (&stuff->length, n);
+ swapl (&stuff->src, n);
+ swapl (&stuff->dst, n);
+ swapl (&stuff->maskFormat, n);
+ swaps (&stuff->xSrc, n);
+ swaps (&stuff->ySrc, n);
+ SwapRestL(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderColorTrapezoids (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+SProcRenderColorTriangles (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+SProcRenderTransform (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+SProcRenderCreateGlyphSet (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderCreateGlyphSetReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->gsid, n);
+ swapl(&stuff->format, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderReferenceGlyphSet (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderReferenceGlyphSetReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->gsid, n);
+ swapl(&stuff->existing, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderFreeGlyphSet (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderFreeGlyphSetReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->glyphset, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderAddGlyphs (ClientPtr client)
+{
+ register int n;
+ register int i;
+ CARD32 *gids;
+ void *end;
+ xGlyphInfo *gi;
+ REQUEST(xRenderAddGlyphsReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->glyphset, n);
+ swapl(&stuff->nglyphs, n);
+ if (stuff->nglyphs & 0xe0000000)
+ return BadLength;
+ end = (CARD8 *) stuff + (client->req_len << 2);
+ gids = (CARD32 *) (stuff + 1);
+ gi = (xGlyphInfo *) (gids + stuff->nglyphs);
+ if ((char *) end - (char *) (gids + stuff->nglyphs) < 0)
+ return BadLength;
+ if ((char *) end - (char *) (gi + stuff->nglyphs) < 0)
+ return BadLength;
+ for (i = 0; i < stuff->nglyphs; i++)
+ {
+ swapl (&gids[i], n);
+ swaps (&gi[i].width, n);
+ swaps (&gi[i].height, n);
+ swaps (&gi[i].x, n);
+ swaps (&gi[i].y, n);
+ swaps (&gi[i].xOff, n);
+ swaps (&gi[i].yOff, n);
+ }
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderAddGlyphsFromPicture (ClientPtr client)
+{
+ return BadImplementation;
+}
+
+static int
+SProcRenderFreeGlyphs (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderFreeGlyphsReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->glyphset, n);
+ SwapRestL(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderCompositeGlyphs (ClientPtr client)
+{
+ register int n;
+ xGlyphElt *elt;
+ CARD8 *buffer;
+ CARD8 *end;
+ int space;
+ int i;
+ int size;
+
+ REQUEST(xRenderCompositeGlyphsReq);
+
+ switch (stuff->renderReqType) {
+ default: size = 1; break;
+ case X_RenderCompositeGlyphs16: size = 2; break;
+ case X_RenderCompositeGlyphs32: size = 4; break;
+ }
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->src, n);
+ swapl(&stuff->dst, n);
+ swapl(&stuff->maskFormat, n);
+ swapl(&stuff->glyphset, n);
+ swaps(&stuff->xSrc, n);
+ swaps(&stuff->ySrc, n);
+ buffer = (CARD8 *) (stuff + 1);
+ end = (CARD8 *) stuff + (client->req_len << 2);
+ while (buffer + sizeof (xGlyphElt) < end)
+ {
+ elt = (xGlyphElt *) buffer;
+ buffer += sizeof (xGlyphElt);
+
+ swaps (&elt->deltax, n);
+ swaps (&elt->deltay, n);
+
+ i = elt->len;
+ if (i == 0xff)
+ {
+ swapl (buffer, n);
+ buffer += 4;
+ }
+ else
+ {
+ space = size * i;
+ switch (size) {
+ case 1:
+ buffer += i;
+ break;
+ case 2:
+ while (i--)
+ {
+ swaps (buffer, n);
+ buffer += 2;
+ }
+ break;
+ case 4:
+ while (i--)
+ {
+ swapl (buffer, n);
+ buffer += 4;
+ }
+ break;
+ }
+ if (space & 3)
+ buffer += 4 - (space & 3);
+ }
+ }
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderFillRectangles (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderFillRectanglesReq);
+
+ REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->dst, n);
+ swaps(&stuff->color.red, n);
+ swaps(&stuff->color.green, n);
+ swaps(&stuff->color.blue, n);
+ swaps(&stuff->color.alpha, n);
+ SwapRestS(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderCreateCursor (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderCreateCursorReq);
+ REQUEST_SIZE_MATCH (xRenderCreateCursorReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->cid, n);
+ swapl(&stuff->src, n);
+ swaps(&stuff->x, n);
+ swaps(&stuff->y, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderSetPictureTransform (ClientPtr client)
+{
+ register int n;
+ REQUEST(xRenderSetPictureTransformReq);
+ REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->picture, n);
+ swapl(&stuff->transform.matrix11, n);
+ swapl(&stuff->transform.matrix12, n);
+ swapl(&stuff->transform.matrix13, n);
+ swapl(&stuff->transform.matrix21, n);
+ swapl(&stuff->transform.matrix22, n);
+ swapl(&stuff->transform.matrix23, n);
+ swapl(&stuff->transform.matrix31, n);
+ swapl(&stuff->transform.matrix32, n);
+ swapl(&stuff->transform.matrix33, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderQueryFilters (ClientPtr client)
+{
+ register int n;
+ REQUEST (xRenderQueryFiltersReq);
+ REQUEST_SIZE_MATCH (xRenderQueryFiltersReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->drawable, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderSetPictureFilter (ClientPtr client)
+{
+ register int n;
+ REQUEST (xRenderSetPictureFilterReq);
+ REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->picture, n);
+ swaps(&stuff->nbytes, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderCreateAnimCursor (ClientPtr client)
+{
+ register int n;
+ REQUEST (xRenderCreateAnimCursorReq);
+ REQUEST_AT_LEAST_SIZE (xRenderCreateAnimCursorReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->cid, n);
+ SwapRestL(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderAddTraps (ClientPtr client)
+{
+ register int n;
+ REQUEST (xRenderAddTrapsReq);
+ REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->picture, n);
+ swaps(&stuff->xOff, n);
+ swaps(&stuff->yOff, n);
+ SwapRestL(stuff);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderCreateSolidFill(ClientPtr client)
+{
+ register int n;
+ REQUEST (xRenderCreateSolidFillReq);
+ REQUEST_AT_LEAST_SIZE (xRenderCreateSolidFillReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->pid, n);
+ swaps(&stuff->color.alpha, n);
+ swaps(&stuff->color.red, n);
+ swaps(&stuff->color.green, n);
+ swaps(&stuff->color.blue, n);
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static void swapStops(void *stuff, int num)
+{
+ int i, n;
+ CARD32 *stops;
+ CARD16 *colors;
+ stops = (CARD32 *)(stuff);
+ for (i = 0; i < num; ++i) {
+ swapl(stops, n);
+ ++stops;
+ }
+ colors = (CARD16 *)(stops);
+ for (i = 0; i < 4*num; ++i) {
+ swaps(colors, n);
+ ++colors;
+ }
+}
+
+static int
+SProcRenderCreateLinearGradient (ClientPtr client)
+{
+ register int n;
+ int len;
+ REQUEST (xRenderCreateLinearGradientReq);
+ REQUEST_AT_LEAST_SIZE (xRenderCreateLinearGradientReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->pid, n);
+ swapl(&stuff->p1.x, n);
+ swapl(&stuff->p1.y, n);
+ swapl(&stuff->p2.x, n);
+ swapl(&stuff->p2.y, n);
+ swapl(&stuff->nStops, n);
+
+ len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
+ if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
+ return BadLength;
+ if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
+ return BadLength;
+
+ swapStops(stuff+1, stuff->nStops);
+
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderCreateRadialGradient (ClientPtr client)
+{
+ register int n;
+ int len;
+ REQUEST (xRenderCreateRadialGradientReq);
+ REQUEST_AT_LEAST_SIZE (xRenderCreateRadialGradientReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->pid, n);
+ swapl(&stuff->inner.x, n);
+ swapl(&stuff->inner.y, n);
+ swapl(&stuff->outer.x, n);
+ swapl(&stuff->outer.y, n);
+ swapl(&stuff->inner_radius, n);
+ swapl(&stuff->outer_radius, n);
+ swapl(&stuff->nStops, n);
+
+ len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq);
+ if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
+ return BadLength;
+ if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
+ return BadLength;
+
+ swapStops(stuff+1, stuff->nStops);
+
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderCreateConicalGradient (ClientPtr client)
+{
+ register int n;
+ int len;
+ REQUEST (xRenderCreateConicalGradientReq);
+ REQUEST_AT_LEAST_SIZE (xRenderCreateConicalGradientReq);
+
+ swaps(&stuff->length, n);
+ swapl(&stuff->pid, n);
+ swapl(&stuff->center.x, n);
+ swapl(&stuff->center.y, n);
+ swapl(&stuff->angle, n);
+ swapl(&stuff->nStops, n);
+
+ len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq);
+ if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
+ return BadLength;
+ if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
+ return BadLength;
+
+ swapStops(stuff+1, stuff->nStops);
+
+ return (*ProcRenderVector[stuff->renderReqType]) (client);
+}
+
+static int
+SProcRenderDispatch (ClientPtr client)
+{
+ REQUEST(xReq);
+
+ if (stuff->data < RenderNumberRequests)
+ return (*SProcRenderVector[stuff->data]) (client);
+ else
+ return BadRequest;
+}
+
+#ifdef PANORAMIX
+#define VERIFY_XIN_PICTURE(pPicture, pid, client, mode) {\
+ int rc = dixLookupResourceByType((pointer *)&(pPicture), pid,\
+ XRT_PICTURE, client, mode);\
+ if (rc != Success)\
+ return rc;\
+}
+
+#define VERIFY_XIN_ALPHA(pPicture, pid, client, mode) {\
+ if (pid == None) \
+ pPicture = 0; \
+ else { \
+ VERIFY_XIN_PICTURE(pPicture, pid, client, mode); \
+ } \
+} \
+
+int (*PanoramiXSaveRenderVector[RenderNumberRequests])(ClientPtr);
+
+static int
+PanoramiXRenderCreatePicture (ClientPtr client)
+{
+ REQUEST(xRenderCreatePictureReq);
+ PanoramiXRes *refDraw, *newPict;
+ int result, j;
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
+ result = dixLookupResourceByClass((pointer *)&refDraw, stuff->drawable,
+ XRC_DRAWABLE, client, DixWriteAccess);
+ if (result != Success)
+ return (result == BadValue) ? BadDrawable : result;
+ if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
+ return BadAlloc;
+ newPict->type = XRT_PICTURE;
+ newPict->info[0].id = stuff->pid;
+
+ if (refDraw->type == XRT_WINDOW &&
+ stuff->drawable == screenInfo.screens[0]->root->drawable.id)
+ {
+ newPict->u.pict.root = TRUE;
+ }
+ else
+ newPict->u.pict.root = FALSE;
+
+ for(j = 1; j < PanoramiXNumScreens; j++)
+ newPict->info[j].id = FakeClientID(client->index);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->pid = newPict->info[j].id;
+ stuff->drawable = refDraw->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderCreatePicture]) (client);
+ if(result != Success) break;
+ }
+
+ if (result == Success)
+ AddResource(newPict->info[0].id, XRT_PICTURE, newPict);
+ else
+ free(newPict);
+
+ return result;
+}
+
+static int
+PanoramiXRenderChangePicture (ClientPtr client)
+{
+ PanoramiXRes *pict;
+ int result = Success, j;
+ REQUEST(xRenderChangePictureReq);
+
+ REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
+
+ VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->picture = pict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderChangePicture]) (client);
+ if(result != Success) break;
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderSetPictureClipRectangles (ClientPtr client)
+{
+ REQUEST(xRenderSetPictureClipRectanglesReq);
+ int result = Success, j;
+ PanoramiXRes *pict;
+
+ REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
+
+ VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->picture = pict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderSetPictureClipRectangles]) (client);
+ if(result != Success) break;
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderSetPictureTransform (ClientPtr client)
+{
+ REQUEST(xRenderSetPictureTransformReq);
+ int result = Success, j;
+ PanoramiXRes *pict;
+
+ REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq);
+
+ VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->picture = pict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderSetPictureTransform]) (client);
+ if(result != Success) break;
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderSetPictureFilter (ClientPtr client)
+{
+ REQUEST(xRenderSetPictureFilterReq);
+ int result = Success, j;
+ PanoramiXRes *pict;
+
+ REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
+
+ VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->picture = pict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderSetPictureFilter]) (client);
+ if(result != Success) break;
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderFreePicture (ClientPtr client)
+{
+ PanoramiXRes *pict;
+ int result = Success, j;
+ REQUEST(xRenderFreePictureReq);
+
+ REQUEST_SIZE_MATCH(xRenderFreePictureReq);
+
+ client->errorValue = stuff->picture;
+
+ VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixDestroyAccess);
+
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->picture = pict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderFreePicture]) (client);
+ if(result != Success) break;
+ }
+
+ /* Since ProcRenderFreePicture is using FreeResource, it will free
+ our resource for us on the last pass through the loop above */
+
+ return result;
+}
+
+static int
+PanoramiXRenderComposite (ClientPtr client)
+{
+ PanoramiXRes *src, *msk, *dst;
+ int result = Success, j;
+ xRenderCompositeReq orig;
+ REQUEST(xRenderCompositeReq);
+
+ REQUEST_SIZE_MATCH(xRenderCompositeReq);
+
+ VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
+ VERIFY_XIN_ALPHA (msk, stuff->mask, client, DixReadAccess);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
+
+ orig = *stuff;
+
+ FOR_NSCREENS_FORWARD(j) {
+ stuff->src = src->info[j].id;
+ if (src->u.pict.root)
+ {
+ stuff->xSrc = orig.xSrc - screenInfo.screens[j]->x;
+ stuff->ySrc = orig.ySrc - screenInfo.screens[j]->y;
+ }
+ stuff->dst = dst->info[j].id;
+ if (dst->u.pict.root)
+ {
+ stuff->xDst = orig.xDst - screenInfo.screens[j]->x;
+ stuff->yDst = orig.yDst - screenInfo.screens[j]->y;
+ }
+ if (msk)
+ {
+ stuff->mask = msk->info[j].id;
+ if (msk->u.pict.root)
+ {
+ stuff->xMask = orig.xMask - screenInfo.screens[j]->x;
+ stuff->yMask = orig.yMask - screenInfo.screens[j]->y;
+ }
+ }
+ result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client);
+ if(result != Success) break;
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderCompositeGlyphs (ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderCompositeGlyphsReq);
+ xGlyphElt origElt, *elt;
+ INT16 xSrc, ySrc;
+
+ REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq);
+ VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
+
+ if (client->req_len << 2 >= (sizeof (xRenderCompositeGlyphsReq) +
+ sizeof (xGlyphElt)))
+ {
+ elt = (xGlyphElt *) (stuff + 1);
+ origElt = *elt;
+ xSrc = stuff->xSrc;
+ ySrc = stuff->ySrc;
+ FOR_NSCREENS_FORWARD(j) {
+ stuff->src = src->info[j].id;
+ if (src->u.pict.root)
+ {
+ stuff->xSrc = xSrc - screenInfo.screens[j]->x;
+ stuff->ySrc = ySrc - screenInfo.screens[j]->y;
+ }
+ stuff->dst = dst->info[j].id;
+ if (dst->u.pict.root)
+ {
+ elt->deltax = origElt.deltax - screenInfo.screens[j]->x;
+ elt->deltay = origElt.deltay - screenInfo.screens[j]->y;
+ }
+ result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client);
+ if(result != Success) break;
+ }
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderFillRectangles (ClientPtr client)
+{
+ PanoramiXRes *dst;
+ int result = Success, j;
+ REQUEST(xRenderFillRectanglesReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
+ extra_len = (client->req_len << 2) - sizeof (xRenderFillRectanglesReq);
+ if (extra_len &&
+ (extra = (char *) malloc(extra_len)))
+ {
+ memcpy (extra, stuff + 1, extra_len);
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root)
+ {
+ int x_off = screenInfo.screens[j]->x;
+ int y_off = screenInfo.screens[j]->y;
+
+ if(x_off || y_off) {
+ xRectangle *rects = (xRectangle *) (stuff + 1);
+ int i = extra_len / sizeof (xRectangle);
+
+ while (i--)
+ {
+ rects->x -= x_off;
+ rects->y -= y_off;
+ rects++;
+ }
+ }
+ }
+ stuff->dst = dst->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderFillRectangles]) (client);
+ if(result != Success) break;
+ }
+ free(extra);
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderTrapezoids(ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderTrapezoidsReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderTrapezoidsReq);
+
+ VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
+
+ extra_len = (client->req_len << 2) - sizeof (xRenderTrapezoidsReq);
+
+ if (extra_len &&
+ (extra = (char *) malloc(extra_len))) {
+ memcpy (extra, stuff + 1, extra_len);
+
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root) {
+ int x_off = screenInfo.screens[j]->x;
+ int y_off = screenInfo.screens[j]->y;
+
+ if(x_off || y_off) {
+ xTrapezoid *trap = (xTrapezoid *) (stuff + 1);
+ int i = extra_len / sizeof (xTrapezoid);
+
+ while (i--) {
+ trap->top -= y_off;
+ trap->bottom -= y_off;
+ trap->left.p1.x -= x_off;
+ trap->left.p1.y -= y_off;
+ trap->left.p2.x -= x_off;
+ trap->left.p2.y -= y_off;
+ trap->right.p1.x -= x_off;
+ trap->right.p1.y -= y_off;
+ trap->right.p2.x -= x_off;
+ trap->right.p2.y -= y_off;
+ trap++;
+ }
+ }
+ }
+
+ stuff->src = src->info[j].id;
+ stuff->dst = dst->info[j].id;
+ result =
+ (*PanoramiXSaveRenderVector[X_RenderTrapezoids]) (client);
+
+ if(result != Success) break;
+ }
+
+ free(extra);
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderTriangles(ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderTrianglesReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderTrianglesReq);
+
+ VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
+
+ extra_len = (client->req_len << 2) - sizeof (xRenderTrianglesReq);
+
+ if (extra_len &&
+ (extra = (char *) malloc(extra_len))) {
+ memcpy (extra, stuff + 1, extra_len);
+
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root) {
+ int x_off = screenInfo.screens[j]->x;
+ int y_off = screenInfo.screens[j]->y;
+
+ if(x_off || y_off) {
+ xTriangle *tri = (xTriangle *) (stuff + 1);
+ int i = extra_len / sizeof (xTriangle);
+
+ while (i--) {
+ tri->p1.x -= x_off;
+ tri->p1.y -= y_off;
+ tri->p2.x -= x_off;
+ tri->p2.y -= y_off;
+ tri->p3.x -= x_off;
+ tri->p3.y -= y_off;
+ tri++;
+ }
+ }
+ }
+
+ stuff->src = src->info[j].id;
+ stuff->dst = dst->info[j].id;
+ result =
+ (*PanoramiXSaveRenderVector[X_RenderTriangles]) (client);
+
+ if(result != Success) break;
+ }
+
+ free(extra);
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderTriStrip(ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderTriStripReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderTriStripReq);
+
+ VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
+
+ extra_len = (client->req_len << 2) - sizeof (xRenderTriStripReq);
+
+ if (extra_len &&
+ (extra = (char *) malloc(extra_len))) {
+ memcpy (extra, stuff + 1, extra_len);
+
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root) {
+ int x_off = screenInfo.screens[j]->x;
+ int y_off = screenInfo.screens[j]->y;
+
+ if(x_off || y_off) {
+ xPointFixed *fixed = (xPointFixed *) (stuff + 1);
+ int i = extra_len / sizeof (xPointFixed);
+
+ while (i--) {
+ fixed->x -= x_off;
+ fixed->y -= y_off;
+ fixed++;
+ }
+ }
+ }
+
+ stuff->src = src->info[j].id;
+ stuff->dst = dst->info[j].id;
+ result =
+ (*PanoramiXSaveRenderVector[X_RenderTriStrip]) (client);
+
+ if(result != Success) break;
+ }
+
+ free(extra);
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderTriFan(ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderTriFanReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderTriFanReq);
+
+ VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess);
+
+ extra_len = (client->req_len << 2) - sizeof (xRenderTriFanReq);
+
+ if (extra_len &&
+ (extra = (char *) malloc(extra_len))) {
+ memcpy (extra, stuff + 1, extra_len);
+
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root) {
+ int x_off = screenInfo.screens[j]->x;
+ int y_off = screenInfo.screens[j]->y;
+
+ if(x_off || y_off) {
+ xPointFixed *fixed = (xPointFixed *) (stuff + 1);
+ int i = extra_len / sizeof (xPointFixed);
+
+ while (i--) {
+ fixed->x -= x_off;
+ fixed->y -= y_off;
+ fixed++;
+ }
+ }
+ }
+
+ stuff->src = src->info[j].id;
+ stuff->dst = dst->info[j].id;
+ result =
+ (*PanoramiXSaveRenderVector[X_RenderTriFan]) (client);
+
+ if(result != Success) break;
+ }
+
+ free(extra);
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderAddTraps (ClientPtr client)
+{
+ PanoramiXRes *picture;
+ int result = Success, j;
+ REQUEST(xRenderAddTrapsReq);
+ char *extra;
+ int extra_len;
+ INT16 x_off, y_off;
+
+ REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq);
+ VERIFY_XIN_PICTURE (picture, stuff->picture, client, DixWriteAccess);
+ extra_len = (client->req_len << 2) - sizeof (xRenderAddTrapsReq);
+ if (extra_len &&
+ (extra = (char *) malloc(extra_len)))
+ {
+ memcpy (extra, stuff + 1, extra_len);
+ x_off = stuff->xOff;
+ y_off = stuff->yOff;
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ stuff->picture = picture->info[j].id;
+
+ if (picture->u.pict.root)
+ {
+ stuff->xOff = x_off + screenInfo.screens[j]->x;
+ stuff->yOff = y_off + screenInfo.screens[j]->y;
+ }
+ result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client);
+ if(result != Success) break;
+ }
+ free(extra);
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderCreateSolidFill (ClientPtr client)
+{
+ REQUEST(xRenderCreateSolidFillReq);
+ PanoramiXRes *newPict;
+ int result = Success, j;
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq);
+
+ if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
+ return BadAlloc;
+
+ newPict->type = XRT_PICTURE;
+ newPict->info[0].id = stuff->pid;
+ newPict->u.pict.root = FALSE;
+
+ for(j = 1; j < PanoramiXNumScreens; j++)
+ newPict->info[j].id = FakeClientID(client->index);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->pid = newPict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderCreateSolidFill]) (client);
+ if(result != Success) break;
+ }
+
+ if (result == Success)
+ AddResource(newPict->info[0].id, XRT_PICTURE, newPict);
+ else
+ free(newPict);
+
+ return result;
+}
+
+static int
+PanoramiXRenderCreateLinearGradient (ClientPtr client)
+{
+ REQUEST(xRenderCreateLinearGradientReq);
+ PanoramiXRes *newPict;
+ int result = Success, j;
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq);
+
+ if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
+ return BadAlloc;
+
+ newPict->type = XRT_PICTURE;
+ newPict->info[0].id = stuff->pid;
+ newPict->u.pict.root = FALSE;
+
+ for(j = 1; j < PanoramiXNumScreens; j++)
+ newPict->info[j].id = FakeClientID(client->index);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->pid = newPict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderCreateLinearGradient]) (client);
+ if(result != Success) break;
+ }
+
+ if (result == Success)
+ AddResource(newPict->info[0].id, XRT_PICTURE, newPict);
+ else
+ free(newPict);
+
+ return result;
+}
+
+static int
+PanoramiXRenderCreateRadialGradient (ClientPtr client)
+{
+ REQUEST(xRenderCreateRadialGradientReq);
+ PanoramiXRes *newPict;
+ int result = Success, j;
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq);
+
+ if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
+ return BadAlloc;
+
+ newPict->type = XRT_PICTURE;
+ newPict->info[0].id = stuff->pid;
+ newPict->u.pict.root = FALSE;
+
+ for(j = 1; j < PanoramiXNumScreens; j++)
+ newPict->info[j].id = FakeClientID(client->index);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->pid = newPict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderCreateRadialGradient]) (client);
+ if(result != Success) break;
+ }
+
+ if (result == Success)
+ AddResource(newPict->info[0].id, XRT_PICTURE, newPict);
+ else
+ free(newPict);
+
+ return result;
+}
+
+static int
+PanoramiXRenderCreateConicalGradient (ClientPtr client)
+{
+ REQUEST(xRenderCreateConicalGradientReq);
+ PanoramiXRes *newPict;
+ int result = Success, j;
+
+ REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq);
+
+ if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
+ return BadAlloc;
+
+ newPict->type = XRT_PICTURE;
+ newPict->info[0].id = stuff->pid;
+ newPict->u.pict.root = FALSE;
+
+ for(j = 1; j < PanoramiXNumScreens; j++)
+ newPict->info[j].id = FakeClientID(client->index);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->pid = newPict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderCreateConicalGradient]) (client);
+ if(result != Success) break;
+ }
+
+ if (result == Success)
+ AddResource(newPict->info[0].id, XRT_PICTURE, newPict);
+ else
+ free(newPict);
+
+ return result;
+}
+
+void
+PanoramiXRenderInit (void)
+{
+ int i;
+
+ XRT_PICTURE = CreateNewResourceType (XineramaDeleteResource,
+ "XineramaPicture");
+ if (RenderErrBase)
+ SetResourceTypeErrorValue(XRT_PICTURE, RenderErrBase + BadPicture);
+ for (i = 0; i < RenderNumberRequests; i++)
+ PanoramiXSaveRenderVector[i] = ProcRenderVector[i];
+ /*
+ * Stuff in Xinerama aware request processing hooks
+ */
+ ProcRenderVector[X_RenderCreatePicture] = PanoramiXRenderCreatePicture;
+ ProcRenderVector[X_RenderChangePicture] = PanoramiXRenderChangePicture;
+ ProcRenderVector[X_RenderSetPictureTransform] = PanoramiXRenderSetPictureTransform;
+ ProcRenderVector[X_RenderSetPictureFilter] = PanoramiXRenderSetPictureFilter;
+ ProcRenderVector[X_RenderSetPictureClipRectangles] = PanoramiXRenderSetPictureClipRectangles;
+ ProcRenderVector[X_RenderFreePicture] = PanoramiXRenderFreePicture;
+ ProcRenderVector[X_RenderComposite] = PanoramiXRenderComposite;
+ ProcRenderVector[X_RenderCompositeGlyphs8] = PanoramiXRenderCompositeGlyphs;
+ ProcRenderVector[X_RenderCompositeGlyphs16] = PanoramiXRenderCompositeGlyphs;
+ ProcRenderVector[X_RenderCompositeGlyphs32] = PanoramiXRenderCompositeGlyphs;
+ ProcRenderVector[X_RenderFillRectangles] = PanoramiXRenderFillRectangles;
+
+ ProcRenderVector[X_RenderTrapezoids] = PanoramiXRenderTrapezoids;
+ ProcRenderVector[X_RenderTriangles] = PanoramiXRenderTriangles;
+ ProcRenderVector[X_RenderTriStrip] = PanoramiXRenderTriStrip;
+ ProcRenderVector[X_RenderTriFan] = PanoramiXRenderTriFan;
+ ProcRenderVector[X_RenderAddTraps] = PanoramiXRenderAddTraps;
+
+ ProcRenderVector[X_RenderCreateSolidFill] = PanoramiXRenderCreateSolidFill;
+ ProcRenderVector[X_RenderCreateLinearGradient] = PanoramiXRenderCreateLinearGradient;
+ ProcRenderVector[X_RenderCreateRadialGradient] = PanoramiXRenderCreateRadialGradient;
+ ProcRenderVector[X_RenderCreateConicalGradient] = PanoramiXRenderCreateConicalGradient;
+}
+
+void
+PanoramiXRenderReset (void)
+{
+ int i;
+ for (i = 0; i < RenderNumberRequests; i++)
+ ProcRenderVector[i] = PanoramiXSaveRenderVector[i];
+ RenderErrBase = 0;
+}
+
+#endif /* PANORAMIX */
diff --git a/xorg-server/startmulti.bat b/xorg-server/startmulti.bat
new file mode 100644
index 000000000..6b989d2aa
--- /dev/null
+++ b/xorg-server/startmulti.bat
@@ -0,0 +1 @@
+vcxsrv :1 -ac -terminate -lesspointer -multiwindow -xkblayout be -xkbmodel pc105 -clipboard -logverbose 4
diff --git a/xorg-server/startxdmcp.bat b/xorg-server/startxdmcp.bat
new file mode 100644
index 000000000..b2af85f53
--- /dev/null
+++ b/xorg-server/startxdmcp.bat
@@ -0,0 +1,2 @@
+vcxsrv :1 -query 192.168.37.20 -clipboard -ac -xkblayout be -xkbmodel pc105 -logverbose 4 -once
+
diff --git a/xorg-server/system.XWinrc b/xorg-server/system.XWinrc
new file mode 100644
index 000000000..1d4c2b208
--- /dev/null
+++ b/xorg-server/system.XWinrc
@@ -0,0 +1,127 @@
+# XWin Server Resource File - EXAMPLE
+# Earle F. Philhower, III
+
+# Place in ~/.XWinrc or in /etc/X11/system.XWinrc
+
+# Keywords are case insensitive, comments legal pretty much anywhere
+# you can have an end-of-line
+
+# Comments begin with "#" or "//" and go to the end-of-line
+
+# Paths to icons are **WINDOWS** based (i.e. c:\windows\icons)
+
+# Menus are defined as...
+# MENU <name> {
+# <Menu Text> EXEC <command>
+# ^^ This command will have any "%display%"
+# string replaced with the proper display
+# variable (i.e. 127.0.0.1:<display>.0)
+# (This should only rarely be needed as
+# the DISPLAY environment variable is also
+# set correctly)
+# or <Menu Text> MENU <name-of-some-prior-defined-menu>
+# or <Menu Text> ALWAYSONTOP
+# ^^ Sets the window to display above all others
+# or <Menu Text> RELOAD
+# ^^ Causes ~/.XWinrc or the system.XWinrc file
+# to be reloaded and icons and menus regenerated
+# or SEPARATOR
+# ...
+# }
+
+# Set the taskmar menu with
+# ROOTMENU <name-of-some-prior-defined-menu>
+
+# If you want a menu to be applied to all popup window's system menu
+# DEFAULTSYSMENU <name-of-some-prior-defined-menu> <atstart|atend>
+
+# To choose a specific menu for a specific WM_CLASS or WM_NAME use ...
+# SYSMENU {
+# <class-or-name-of-window> <name-of-prior-defined-menu> <atstart|atend>
+# ...
+# }
+
+# When specifying an ICONFILE in the following commands several different
+# formats are allowed:
+# 1. Name of a regular Windows .ico format file
+# (ex: "cygwin.ico", "apple.ico")
+# 2. Name and index into a Windows .DLL
+# (ex: "c:\windows\system32\shell32.dll,4" gives the default folder icon
+# "c:\windows\system32\shell32.dll,5" gives the floppy drive icon)
+# 3. Index into XWin.EXE internal ICON resource
+# (ex: ",101" is the 1st icon inside XWin.exe)
+
+# To define where ICO files live (** Windows path**)
+# ICONDIRECTORY <windows-path i.e. c:\cygwin\usr\icons>
+# NOTE: If you specify a fully qualified path to an ICON below
+# (i.e. "c:\xxx" or "d:\xxxx")
+# this ICONDIRECTORY will not be prepended
+
+# To change the taskbar icon use...
+# TRAYICON <name-of-windows-ico-file-in-icondirectory>
+
+# To define a replacement for the standard X icon for apps w/o specified icons
+# DEFAULTICON <name-of-windows-ico-file-in-icondirectory>
+
+# To define substitute icons on a per-window basis use...
+# ICONS {
+# <class-or-name-of-window> <icon-file-name.ico>
+# ...
+# }
+# In the case where multiple matches occur, the first listed in the ICONS
+# section will be chosen.
+
+# To disable exit confirmation dialog add the line containing SilentExit
+
+# DEBUG <string> prints out the string to the XWin.log file
+
+// Below are just some silly menus to demonstrate writing your
+// own configuration file.
+
+// Make some menus...
+menu apps {
+ xcalc exec "xcalc"
+ xclock exec "xclock"
+ xwininfo exec "xwininfo -pause"
+}
+
+menu root {
+// Comments fit here, too...
+ "Reload system.XWinrc" RELOAD
+ "Applications" menu apps
+ Separator
+ "Show log" exec "notepad %logfile%"
+ Separator
+}
+
+menu aot {
+ Separator
+ "Always on Top" alwaysontop
+}
+
+menu xtermspecial {
+ "Emacs" exec "emacs"
+ "Always on Top" alwaysontop
+ Separator
+}
+
+RootMenu root
+
+DefaultSysMenu aot atend
+
+SysMenu {
+ "xterm" xtermspecial atstart
+}
+
+# IconDirectory "c:\winnt\"
+
+# DefaultIcon "reinstall.ico"
+
+# Icons {
+# "xterm" "uninstall.ico"
+# }
+
+# SilentExit
+
+# DEBUG "Done parsing the configuration file..."
+
diff --git a/xorg-server/test/input.c b/xorg-server/test/input.c
index c13b4f213..9a1ac632e 100644
--- a/xorg-server/test/input.c
+++ b/xorg-server/test/input.c
@@ -1,1232 +1,1232 @@
-/**
- * Copyright © 2009 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdint.h>
-#include <X11/X.h>
-#include "misc.h"
-#include "resource.h"
-#include <X11/Xproto.h>
-#include <X11/extensions/XI2proto.h>
-#include <X11/Xatom.h>
-#include "windowstr.h"
-#include "inputstr.h"
-#include "eventconvert.h"
-#include "exevents.h"
-#include "exglobals.h"
-#include "dixgrabs.h"
-#include "eventstr.h"
-#include "inpututils.h"
-#include <glib.h>
-
-/**
- * Init a device with axes.
- * Verify values set on the device.
- *
- * Result: All axes set to default values (usually 0).
- */
-static void dix_init_valuators(void)
-{
- DeviceIntRec dev;
- ValuatorClassPtr val;
- const int num_axes = 2;
- int i;
- Atom atoms[MAX_VALUATORS] = { 0 };
-
-
- memset(&dev, 0, sizeof(DeviceIntRec));
- dev.type = MASTER_POINTER; /* claim it's a master to stop ptracccel */
-
- g_assert(InitValuatorClassDeviceStruct(NULL, 0, atoms, 0, 0) == FALSE);
- g_assert(InitValuatorClassDeviceStruct(&dev, num_axes, atoms, 0, Absolute));
-
- val = dev.valuator;
- g_assert(val);
- g_assert(val->numAxes == num_axes);
- g_assert(val->numMotionEvents == 0);
- g_assert(val->axisVal);
-
- for (i = 0; i < num_axes; i++)
- {
- g_assert(val->axisVal[i] == 0);
- g_assert(val->axes->min_value == NO_AXIS_LIMITS);
- g_assert(val->axes->max_value == NO_AXIS_LIMITS);
- g_assert(val->axes->mode == Absolute);
- }
-
- g_assert(dev.last.numValuators == num_axes);
-}
-
-/* just check the known success cases, and that error cases set the client's
- * error value correctly. */
-static void dix_check_grab_values(void)
-{
- ClientRec client;
- GrabParameters param;
- int rc;
-
- memset(&client, 0, sizeof(client));
-
- param.grabtype = GRABTYPE_CORE;
- param.this_device_mode = GrabModeSync;
- param.other_devices_mode = GrabModeSync;
- param.modifiers = AnyModifier;
- param.ownerEvents = FALSE;
-
- rc = CheckGrabValues(&client, &param);
- g_assert(rc == Success);
-
- param.this_device_mode = GrabModeAsync;
- rc = CheckGrabValues(&client, &param);
- g_assert(rc == Success);
-
- param.this_device_mode = GrabModeAsync + 1;
- rc = CheckGrabValues(&client, &param);
- g_assert(rc == BadValue);
- g_assert(client.errorValue == param.this_device_mode);
- g_assert(client.errorValue == GrabModeAsync + 1);
-
- param.this_device_mode = GrabModeSync;
- param.other_devices_mode = GrabModeAsync;
- rc = CheckGrabValues(&client, &param);
- g_assert(rc == Success);
-
- param.other_devices_mode = GrabModeAsync + 1;
- rc = CheckGrabValues(&client, &param);
- g_assert(rc == BadValue);
- g_assert(client.errorValue == param.other_devices_mode);
- g_assert(client.errorValue == GrabModeAsync + 1);
-
- param.other_devices_mode = GrabModeSync;
-
- param.modifiers = 1 << 13;
- rc = CheckGrabValues(&client, &param);
- g_assert(rc == BadValue);
- g_assert(client.errorValue == param.modifiers);
- g_assert(client.errorValue == (1 << 13));
-
-
- param.modifiers = AnyModifier;
- param.ownerEvents = TRUE;
- rc = CheckGrabValues(&client, &param);
- g_assert(rc == Success);
-
- param.ownerEvents = 3;
- rc = CheckGrabValues(&client, &param);
- g_assert(rc == BadValue);
- g_assert(client.errorValue == param.ownerEvents);
- g_assert(client.errorValue == 3);
-}
-
-
-/**
- * Convert various internal events to the matching core event and verify the
- * parameters.
- */
-static void dix_event_to_core(int type)
-{
- DeviceEvent ev;
- xEvent *core;
- int time;
- int x, y;
- int rc;
- int state;
- int detail;
- int count;
- const int ROOT_WINDOW_ID = 0x100;
-
- /* EventToCore memsets the event to 0 */
-#define test_event() \
- g_assert(rc == Success); \
- g_assert(core); \
- g_assert(count == 1); \
- g_assert(core->u.u.type == type); \
- g_assert(core->u.u.detail == detail); \
- g_assert(core->u.keyButtonPointer.time == time); \
- g_assert(core->u.keyButtonPointer.rootX == x); \
- g_assert(core->u.keyButtonPointer.rootY == y); \
- g_assert(core->u.keyButtonPointer.state == state); \
- g_assert(core->u.keyButtonPointer.eventX == 0); \
- g_assert(core->u.keyButtonPointer.eventY == 0); \
- g_assert(core->u.keyButtonPointer.root == ROOT_WINDOW_ID); \
- g_assert(core->u.keyButtonPointer.event == 0); \
- g_assert(core->u.keyButtonPointer.child == 0); \
- g_assert(core->u.keyButtonPointer.sameScreen == FALSE);
-
- x = 0;
- y = 0;
- time = 12345;
- state = 0;
- detail = 0;
-
- ev.header = 0xFF;
- ev.length = sizeof(DeviceEvent);
- ev.time = time;
- ev.root_y = x;
- ev.root_x = y;
- SetBit(ev.valuators.mask, 0);
- SetBit(ev.valuators.mask, 1);
- ev.root = ROOT_WINDOW_ID;
- ev.corestate = state;
- ev.detail.key = detail;
-
- ev.type = type;
- ev.detail.key = 0;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- test_event();
-
- x = 1;
- y = 2;
- ev.root_x = x;
- ev.root_y = y;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- test_event();
-
- x = 0x7FFF;
- y = 0x7FFF;
- ev.root_x = x;
- ev.root_y = y;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- test_event();
-
- x = 0x8000; /* too high */
- y = 0x8000; /* too high */
- ev.root_x = x;
- ev.root_y = y;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- g_assert(rc == Success);
- g_assert(core);
- g_assert(count == 1);
- g_assert(core->u.keyButtonPointer.rootX != x);
- g_assert(core->u.keyButtonPointer.rootY != y);
-
- x = 0x7FFF;
- y = 0x7FFF;
- ev.root_x = x;
- ev.root_y = y;
- time = 0;
- ev.time = time;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- test_event();
-
- detail = 1;
- ev.detail.key = detail;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- test_event();
-
- detail = 0xFF; /* highest value */
- ev.detail.key = detail;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- test_event();
-
- detail = 0xFFF; /* too big */
- ev.detail.key = detail;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- g_assert(rc == BadMatch);
-
- detail = 0xFF; /* too big */
- ev.detail.key = detail;
- state = 0xFFFF; /* highest value */
- ev.corestate = state;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- test_event();
-
- state = 0x10000; /* too big */
- ev.corestate = state;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- g_assert(rc == Success);
- g_assert(core);
- g_assert(count == 1);
- g_assert(core->u.keyButtonPointer.state != state);
- g_assert(core->u.keyButtonPointer.state == (state & 0xFFFF));
-
-#undef test_event
-}
-
-static void dix_event_to_core_fail(int evtype, int expected_rc)
-{
- DeviceEvent ev;
- xEvent *core;
- int rc;
- int count;
-
- ev.header = 0xFF;
- ev.length = sizeof(DeviceEvent);
-
- ev.type = evtype;
- rc = EventToCore((InternalEvent*)&ev, &core, &count);
- g_assert(rc == expected_rc);
-}
-
-static void dix_event_to_core_conversion(void)
-{
- dix_event_to_core_fail(0, BadImplementation);
- dix_event_to_core_fail(1, BadImplementation);
- dix_event_to_core_fail(ET_ProximityOut + 1, BadImplementation);
- dix_event_to_core_fail(ET_ProximityIn, BadMatch);
- dix_event_to_core_fail(ET_ProximityOut, BadMatch);
-
- dix_event_to_core(ET_KeyPress);
- dix_event_to_core(ET_KeyRelease);
- dix_event_to_core(ET_ButtonPress);
- dix_event_to_core(ET_ButtonRelease);
- dix_event_to_core(ET_Motion);
-}
-
-static void
-_dix_test_xi_convert(DeviceEvent *ev, int expected_rc, int expected_count)
-{
- xEvent *xi;
- int count = 0;
- int rc;
-
- rc = EventToXI((InternalEvent*)ev, &xi, &count);
- g_assert(rc == expected_rc);
- g_assert(count >= expected_count);
- if (count > 0){
- deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer*)xi;
- g_assert(kbp->type == IEventBase + ev->type);
- g_assert(kbp->detail == ev->detail.key);
- g_assert(kbp->time == ev->time);
- g_assert((kbp->deviceid & ~MORE_EVENTS) == ev->deviceid);
- g_assert(kbp->root_x == ev->root_x);
- g_assert(kbp->root_y == ev->root_y);
- g_assert(kbp->state == ev->corestate);
- g_assert(kbp->event_x == 0);
- g_assert(kbp->event_y == 0);
- g_assert(kbp->root == ev->root);
- g_assert(kbp->event == 0);
- g_assert(kbp->child == 0);
- g_assert(kbp->same_screen == FALSE);
-
- while (--count > 0) {
- deviceValuator *v = (deviceValuator*)&xi[count];
- g_assert(v->type == DeviceValuator);
- g_assert(v->num_valuators <= 6);
- }
-
-
- free(xi);
- }
-}
-
-/**
- * This tests for internal event → XI1 event conversion
- * - all conversions should generate the right XI event type
- * - right number of events generated
- * - extra events are valuators
- */
-static void dix_event_to_xi1_conversion(void)
-{
- DeviceEvent ev = {0};
- int time;
- int x, y;
- int state;
- int detail;
- const int ROOT_WINDOW_ID = 0x100;
- int deviceid;
-
- IEventBase = 80;
- DeviceValuator = IEventBase - 1;
- DeviceKeyPress = IEventBase + ET_KeyPress;
- DeviceKeyRelease = IEventBase + ET_KeyRelease;
- DeviceButtonPress = IEventBase + ET_ButtonPress;
- DeviceButtonRelease = IEventBase + ET_ButtonRelease;
- DeviceMotionNotify = IEventBase + ET_Motion;
- DeviceFocusIn = IEventBase + ET_FocusIn;
- DeviceFocusOut = IEventBase + ET_FocusOut;
- ProximityIn = IEventBase + ET_ProximityIn;
- ProximityOut = IEventBase + ET_ProximityOut;
-
- /* EventToXI callocs */
- x = 0;
- y = 0;
- time = 12345;
- state = 0;
- detail = 0;
- deviceid = 4;
-
- ev.header = 0xFF;
-
- ev.header = 0xFF;
- ev.length = sizeof(DeviceEvent);
- ev.time = time;
- ev.root_y = x;
- ev.root_x = y;
- SetBit(ev.valuators.mask, 0);
- SetBit(ev.valuators.mask, 1);
- ev.root = ROOT_WINDOW_ID;
- ev.corestate = state;
- ev.detail.key = detail;
- ev.deviceid = deviceid;
-
- /* test all types for bad match */
- ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 1);
- ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 1);
- ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 1);
- ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 1);
- ev.type = ET_Motion; _dix_test_xi_convert(&ev, Success, 1);
- ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, Success, 1);
- ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, Success, 1);
-
- /* No axes */
- ClearBit(ev.valuators.mask, 0);
- ClearBit(ev.valuators.mask, 1);
- ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 1);
- ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 1);
- ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 1);
- ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 1);
- ev.type = ET_Motion; _dix_test_xi_convert(&ev, BadMatch, 0);
- ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, BadMatch, 0);
- ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, BadMatch, 0);
-
- /* more than 6 axes → 2 valuator events */
- SetBit(ev.valuators.mask, 0);
- SetBit(ev.valuators.mask, 1);
- SetBit(ev.valuators.mask, 2);
- SetBit(ev.valuators.mask, 3);
- SetBit(ev.valuators.mask, 4);
- SetBit(ev.valuators.mask, 5);
- SetBit(ev.valuators.mask, 6);
- ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 2);
- ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 2);
- ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 2);
- ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 2);
- ev.type = ET_Motion; _dix_test_xi_convert(&ev, Success, 2);
- ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, Success, 2);
- ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, Success, 2);
-
-
- /* keycode too high */
- ev.type = ET_KeyPress;
- ev.detail.key = 256;
- _dix_test_xi_convert(&ev, Success, 0);
-
- /* deviceid too high */
- ev.type = ET_KeyPress;
- ev.detail.key = 18;
- ev.deviceid = 128;
- _dix_test_xi_convert(&ev, Success, 0);
-}
-
-
-static void xi2_struct_sizes(void)
-{
-#define compare(req) \
- g_assert(sizeof(req) == sz_##req);
-
- compare(xXIQueryVersionReq);
- compare(xXIWarpPointerReq);
- compare(xXIChangeCursorReq);
- compare(xXIChangeHierarchyReq);
- compare(xXISetClientPointerReq);
- compare(xXIGetClientPointerReq);
- compare(xXISelectEventsReq);
- compare(xXIQueryVersionReq);
- compare(xXIQueryDeviceReq);
- compare(xXISetFocusReq);
- compare(xXIGetFocusReq);
- compare(xXIGrabDeviceReq);
- compare(xXIUngrabDeviceReq);
- compare(xXIAllowEventsReq);
- compare(xXIPassiveGrabDeviceReq);
- compare(xXIPassiveUngrabDeviceReq);
- compare(xXIListPropertiesReq);
- compare(xXIChangePropertyReq);
- compare(xXIDeletePropertyReq);
- compare(xXIGetPropertyReq);
- compare(xXIGetSelectedEventsReq);
-#undef compare
-}
-
-
-static void dix_grab_matching(void)
-{
- DeviceIntRec xi_all_devices, xi_all_master_devices, dev1, dev2;
- GrabRec a, b;
- BOOL rc;
-
- memset(&a, 0, sizeof(a));
- memset(&b, 0, sizeof(b));
-
- /* different grabtypes must fail */
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_XI2;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI2;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_CORE;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- /* XI2 grabs for different devices must fail, regardless of ignoreDevice
- * XI2 grabs for master devices must fail against a slave */
- memset(&xi_all_devices, 0, sizeof(DeviceIntRec));
- memset(&xi_all_master_devices, 0, sizeof(DeviceIntRec));
- memset(&dev1, 0, sizeof(DeviceIntRec));
- memset(&dev2, 0, sizeof(DeviceIntRec));
-
- xi_all_devices.id = XIAllDevices;
- xi_all_master_devices.id = XIAllMasterDevices;
- dev1.id = 10;
- dev1.type = SLAVE;
- dev2.id = 11;
- dev2.type = SLAVE;
-
- inputInfo.all_devices = &xi_all_devices;
- inputInfo.all_master_devices = &xi_all_master_devices;
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
- a.device = &dev1;
- b.device = &dev2;
-
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
-
- a.device = &dev2;
- b.device = &dev1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
-
- a.device = inputInfo.all_master_devices;
- b.device = &dev1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
-
- a.device = &dev1;
- b.device = inputInfo.all_master_devices;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
-
- /* ignoreDevice FALSE must fail for different devices for CORE and XI */
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
- a.device = &dev1;
- b.device = &dev2;
- a.modifierDevice = &dev1;
- b.modifierDevice = &dev1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
- a.device = &dev1;
- b.device = &dev2;
- a.modifierDevice = &dev1;
- b.modifierDevice = &dev1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
-
- /* ignoreDevice FALSE must fail for different modifier devices for CORE
- * and XI */
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
- a.device = &dev1;
- b.device = &dev1;
- a.modifierDevice = &dev1;
- b.modifierDevice = &dev2;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
- a.device = &dev1;
- b.device = &dev1;
- a.modifierDevice = &dev1;
- b.modifierDevice = &dev2;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
-
- /* different event type must fail */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
- a.device = &dev1;
- b.device = &dev1;
- a.modifierDevice = &dev1;
- b.modifierDevice = &dev1;
- a.type = XI_KeyPress;
- b.type = XI_KeyRelease;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
- a.device = &dev1;
- b.device = &dev1;
- a.modifierDevice = &dev1;
- b.modifierDevice = &dev1;
- a.type = XI_KeyPress;
- b.type = XI_KeyRelease;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
- a.device = &dev1;
- b.device = &dev1;
- a.modifierDevice = &dev1;
- b.modifierDevice = &dev1;
- a.type = XI_KeyPress;
- b.type = XI_KeyRelease;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
-
- /* different modifiers must fail */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
- a.device = &dev1;
- b.device = &dev1;
- a.modifierDevice = &dev1;
- b.modifierDevice = &dev1;
- a.type = XI_KeyPress;
- b.type = XI_KeyPress;
- a.modifiersDetail.exact = 1;
- b.modifiersDetail.exact = 2;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- /* AnyModifier must fail for XI2 */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
- a.modifiersDetail.exact = AnyModifier;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- /* XIAnyModifier must fail for CORE and XI */
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
- a.modifiersDetail.exact = XIAnyModifier;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
- a.modifiersDetail.exact = XIAnyModifier;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- /* different detail must fail */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
- a.detail.exact = 1;
- b.detail.exact = 2;
- a.modifiersDetail.exact = 1;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- /* detail of AnyModifier must fail */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
- a.detail.exact = AnyModifier;
- b.detail.exact = 1;
- a.modifiersDetail.exact = 1;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- /* detail of XIAnyModifier must fail */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
- a.detail.exact = XIAnyModifier;
- b.detail.exact = 1;
- a.modifiersDetail.exact = 1;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
-
- /* XIAnyModifier or AnyModifer must succeed */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
- a.detail.exact = 1;
- b.detail.exact = 1;
- a.modifiersDetail.exact = XIAnyModifier;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
-
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
- a.detail.exact = 1;
- b.detail.exact = 1;
- a.modifiersDetail.exact = AnyModifier;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
-
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
- a.detail.exact = 1;
- b.detail.exact = 1;
- a.modifiersDetail.exact = AnyModifier;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
-
- /* AnyKey or XIAnyKeycode must succeed */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
- a.detail.exact = XIAnyKeycode;
- b.detail.exact = 1;
- a.modifiersDetail.exact = 1;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
-
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
- a.detail.exact = AnyKey;
- b.detail.exact = 1;
- a.modifiersDetail.exact = 1;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
-
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
- a.detail.exact = AnyKey;
- b.detail.exact = 1;
- a.modifiersDetail.exact = 1;
- b.modifiersDetail.exact = 1;
- rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
- rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
-}
-
-static void test_bits_to_byte(int i)
-{
- int expected_bytes;
- expected_bytes = (i + 7)/8;
-
- g_assert(bits_to_bytes(i) >= i/8);
- g_assert((bits_to_bytes(i) * 8) - i <= 7);
- g_assert(expected_bytes == bits_to_bytes(i));
-}
-
-static void test_bytes_to_int32(int i)
-{
- int expected_4byte;
- expected_4byte = (i + 3)/4;
-
- g_assert(bytes_to_int32(i) <= i);
- g_assert((bytes_to_int32(i) * 4) - i <= 3);
- g_assert(expected_4byte == bytes_to_int32(i));
-}
-
-static void test_pad_to_int32(int i)
-{
- int expected_bytes;
- expected_bytes = ((i + 3)/4) * 4;
-
- g_assert(pad_to_int32(i) >= i);
- g_assert(pad_to_int32(i) - i <= 3);
- g_assert(expected_bytes == pad_to_int32(i));
-}
-static void include_byte_padding_macros(void)
-{
- g_test_message("Testing bits_to_bytes()");
-
- /* the macros don't provide overflow protection */
- test_bits_to_byte(0);
- test_bits_to_byte(1);
- test_bits_to_byte(2);
- test_bits_to_byte(7);
- test_bits_to_byte(8);
- test_bits_to_byte(0xFF);
- test_bits_to_byte(0x100);
- test_bits_to_byte(INT_MAX - 9);
- test_bits_to_byte(INT_MAX - 8);
-
- g_test_message("Testing bytes_to_int32()");
-
- test_bytes_to_int32(0);
- test_bytes_to_int32(1);
- test_bytes_to_int32(2);
- test_bytes_to_int32(7);
- test_bytes_to_int32(8);
- test_bytes_to_int32(0xFF);
- test_bytes_to_int32(0x100);
- test_bytes_to_int32(0xFFFF);
- test_bytes_to_int32(0x10000);
- test_bytes_to_int32(0xFFFFFF);
- test_bytes_to_int32(0x1000000);
- test_bytes_to_int32(INT_MAX - 4);
- test_bytes_to_int32(INT_MAX - 3);
-
- g_test_message("Testing pad_to_int32");
-
- test_pad_to_int32(0);
- test_pad_to_int32(0);
- test_pad_to_int32(1);
- test_pad_to_int32(2);
- test_pad_to_int32(7);
- test_pad_to_int32(8);
- test_pad_to_int32(0xFF);
- test_pad_to_int32(0x100);
- test_pad_to_int32(0xFFFF);
- test_pad_to_int32(0x10000);
- test_pad_to_int32(0xFFFFFF);
- test_pad_to_int32(0x1000000);
- test_pad_to_int32(INT_MAX - 4);
- test_pad_to_int32(INT_MAX - 3);
-}
-
-static void xi_unregister_handlers(void)
-{
- DeviceIntRec dev;
- int handler;
-
- memset(&dev, 0, sizeof(dev));
-
- handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 1);
- handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 2);
- handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 3);
-
- g_test_message("Unlinking from front.");
-
- XIUnregisterPropertyHandler(&dev, 4); /* NOOP */
- g_assert(dev.properties.handlers->id == 3);
- XIUnregisterPropertyHandler(&dev, 3);
- g_assert(dev.properties.handlers->id == 2);
- XIUnregisterPropertyHandler(&dev, 2);
- g_assert(dev.properties.handlers->id == 1);
- XIUnregisterPropertyHandler(&dev, 1);
- g_assert(dev.properties.handlers == NULL);
-
- handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 4);
- handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 5);
- handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 6);
- XIUnregisterPropertyHandler(&dev, 3); /* NOOP */
- g_assert(dev.properties.handlers->next->next->next == NULL);
- XIUnregisterPropertyHandler(&dev, 4);
- g_assert(dev.properties.handlers->next->next == NULL);
- XIUnregisterPropertyHandler(&dev, 5);
- g_assert(dev.properties.handlers->next == NULL);
- XIUnregisterPropertyHandler(&dev, 6);
- g_assert(dev.properties.handlers == NULL);
-
- handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 7);
- handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 8);
- handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 9);
-
- XIDeleteAllDeviceProperties(&dev);
- g_assert(dev.properties.handlers == NULL);
- XIUnregisterPropertyHandler(&dev, 7); /* NOOP */
-
-}
-
-static void cmp_attr_fields(InputAttributes *attr1,
- InputAttributes *attr2)
-{
- char **tags1, **tags2;
-
- g_assert(attr1 && attr2);
- g_assert(attr1 != attr2);
- g_assert(attr1->flags == attr2->flags);
-
- if (attr1->product != NULL)
- {
- g_assert(attr1->product != attr2->product);
- g_assert(strcmp(attr1->product, attr2->product) == 0);
- } else
- g_assert(attr2->product == NULL);
-
- if (attr1->vendor != NULL)
- {
- g_assert(attr1->vendor != attr2->vendor);
- g_assert(strcmp(attr1->vendor, attr2->vendor) == 0);
- } else
- g_assert(attr2->vendor == NULL);
-
- if (attr1->device != NULL)
- {
- g_assert(attr1->device != attr2->device);
- g_assert(strcmp(attr1->device, attr2->device) == 0);
- } else
- g_assert(attr2->device == NULL);
-
- if (attr1->pnp_id != NULL)
- {
- g_assert(attr1->pnp_id != attr2->pnp_id);
- g_assert(strcmp(attr1->pnp_id, attr2->pnp_id) == 0);
- } else
- g_assert(attr2->pnp_id == NULL);
-
- if (attr1->usb_id != NULL)
- {
- g_assert(attr1->usb_id != attr2->usb_id);
- g_assert(strcmp(attr1->usb_id, attr2->usb_id) == 0);
- } else
- g_assert(attr2->usb_id == NULL);
-
- tags1 = attr1->tags;
- tags2 = attr2->tags;
-
- /* if we don't have any tags, skip the tag checking bits */
- if (!tags1)
- {
- g_assert(!tags2);
- return;
- }
-
- /* Don't lug around empty arrays */
- g_assert(*tags1);
- g_assert(*tags2);
-
- /* check for identical content, but duplicated */
- while (*tags1)
- {
- g_assert(*tags1 != *tags2);
- g_assert(strcmp(*tags1, *tags2) == 0);
- tags1++;
- tags2++;
- }
-
- /* ensure tags1 and tags2 have the same no of elements */
- g_assert(!*tags2);
-
- /* check for not sharing memory */
- tags1 = attr1->tags;
- while (*tags1)
- {
- tags2 = attr2->tags;
- while (*tags2)
- g_assert(*tags1 != *tags2++);
-
- tags1++;
- }
-}
-
-static void dix_input_attributes(void)
-{
- InputAttributes orig = {0};
- InputAttributes *new;
- char *tags[4] = {"tag1", "tag2", "tag2", NULL};
-
- new = DuplicateInputAttributes(NULL);
- g_assert(!new);
-
- new = DuplicateInputAttributes(&orig);
- g_assert(memcmp(&orig, new, sizeof(InputAttributes)) == 0);
-
- orig.product = "product name";
- new = DuplicateInputAttributes(&orig);
- cmp_attr_fields(&orig, new);
- FreeInputAttributes(new);
-
- orig.vendor = "vendor name";
- new = DuplicateInputAttributes(&orig);
- cmp_attr_fields(&orig, new);
- FreeInputAttributes(new);
-
- orig.device = "device path";
- new = DuplicateInputAttributes(&orig);
- cmp_attr_fields(&orig, new);
- FreeInputAttributes(new);
-
- orig.pnp_id = "PnPID";
- new = DuplicateInputAttributes(&orig);
- cmp_attr_fields(&orig, new);
- FreeInputAttributes(new);
-
- orig.usb_id = "USBID";
- new = DuplicateInputAttributes(&orig);
- cmp_attr_fields(&orig, new);
- FreeInputAttributes(new);
-
- orig.flags = 0xF0;
- new = DuplicateInputAttributes(&orig);
- cmp_attr_fields(&orig, new);
- FreeInputAttributes(new);
-
- orig.tags = tags;
- new = DuplicateInputAttributes(&orig);
- cmp_attr_fields(&orig, new);
- FreeInputAttributes(new);
-}
-
-static void dix_input_valuator_masks(void)
-{
- ValuatorMask *mask = NULL, *copy;
- int nvaluators = MAX_VALUATORS;
- int valuators[nvaluators];
- int i;
- int first_val, num_vals;
-
- for (i = 0; i < nvaluators; i++)
- valuators[i] = i;
-
- mask = valuator_mask_new(nvaluators);
- g_assert(mask != NULL);
- g_assert(valuator_mask_size(mask) == 0);
- g_assert(valuator_mask_num_valuators(mask) == 0);
-
- for (i = 0; i < nvaluators; i++)
- {
- g_assert(!valuator_mask_isset(mask, i));
- valuator_mask_set(mask, i, valuators[i]);
- g_assert(valuator_mask_isset(mask, i));
- g_assert(valuator_mask_get(mask, i) == valuators[i]);
- g_assert(valuator_mask_size(mask) == i + 1);
- g_assert(valuator_mask_num_valuators(mask) == i + 1);
- }
-
- for (i = 0; i < nvaluators; i++)
- {
- g_assert(valuator_mask_isset(mask, i));
- valuator_mask_unset(mask, i);
- /* we're removing valuators from the front, so size should stay the
- * same until the last bit is removed */
- if (i < nvaluators - 1)
- g_assert(valuator_mask_size(mask) == nvaluators);
- g_assert(!valuator_mask_isset(mask, i));
- }
-
- g_assert(valuator_mask_size(mask) == 0);
- valuator_mask_zero(mask);
- g_assert(valuator_mask_size(mask) == 0);
- g_assert(valuator_mask_num_valuators(mask) == 0);
- for (i = 0; i < nvaluators; i++)
- g_assert(!valuator_mask_isset(mask, i));
-
- first_val = 5;
- num_vals = 6;
-
- valuator_mask_set_range(mask, first_val, num_vals, valuators);
- g_assert(valuator_mask_size(mask) == first_val + num_vals);
- g_assert(valuator_mask_num_valuators(mask) == num_vals);
- for (i = 0; i < nvaluators; i++)
- {
- if (i < first_val || i >= first_val + num_vals)
- g_assert(!valuator_mask_isset(mask, i));
- else
- {
- g_assert(valuator_mask_isset(mask, i));
- g_assert(valuator_mask_get(mask, i) == valuators[i - first_val]);
- }
- }
-
- copy = valuator_mask_new(nvaluators);
- valuator_mask_copy(copy, mask);
- g_assert(mask != copy);
- g_assert(valuator_mask_size(mask) == valuator_mask_size(copy));
- g_assert(valuator_mask_num_valuators(mask) == valuator_mask_num_valuators(copy));
-
- for (i = 0; i < nvaluators; i++)
- {
- g_assert(valuator_mask_isset(mask, i) == valuator_mask_isset(copy, i));
- g_assert(valuator_mask_get(mask, i) == valuator_mask_get(copy, i));
- }
-
- valuator_mask_free(&mask);
- g_assert(mask == NULL);
-}
-
-static void dix_valuator_mode(void)
-{
- DeviceIntRec dev;
- const int num_axes = MAX_VALUATORS;
- int i;
- Atom atoms[MAX_VALUATORS] = { 0 };
-
- memset(&dev, 0, sizeof(DeviceIntRec));
- dev.type = MASTER_POINTER; /* claim it's a master to stop ptracccel */
-
- g_assert(InitValuatorClassDeviceStruct(NULL, 0, atoms, 0, 0) == FALSE);
- g_assert(InitValuatorClassDeviceStruct(&dev, num_axes, atoms, 0, Absolute));
-
- for (i = 0; i < num_axes; i++)
- {
- g_assert(valuator_get_mode(&dev, i) == Absolute);
- valuator_set_mode(&dev, i, Relative);
- g_assert(dev.valuator->axes[i].mode == Relative);
- g_assert(valuator_get_mode(&dev, i) == Relative);
- }
-
- valuator_set_mode(&dev, VALUATOR_MODE_ALL_AXES, Absolute);
- for (i = 0; i < num_axes; i++)
- g_assert(valuator_get_mode(&dev, i) == Absolute);
-
- valuator_set_mode(&dev, VALUATOR_MODE_ALL_AXES, Relative);
- for (i = 0; i < num_axes; i++)
- g_assert(valuator_get_mode(&dev, i) == Relative);
-}
-
-static void include_bit_test_macros(void)
-{
- uint8_t mask[9] = { 0 };
- int i;
-
- for (i = 0; i < sizeof(mask)/sizeof(mask[0]); i++)
- {
- g_assert(BitIsOn(mask, i) == 0);
- SetBit(mask, i);
- g_assert(BitIsOn(mask, i) == 1);
- g_assert(!!(mask[i/8] & (1 << (i % 8))));
- g_assert(CountBits(mask, sizeof(mask)) == 1);
- ClearBit(mask, i);
- g_assert(BitIsOn(mask, i) == 0);
- }
-}
-
-int main(int argc, char** argv)
-{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
- g_test_add_func("/dix/input/valuator-masks", dix_input_valuator_masks);
- g_test_add_func("/dix/input/attributes", dix_input_attributes);
- g_test_add_func("/dix/input/init-valuators", dix_init_valuators);
- g_test_add_func("/dix/input/event-core-conversion", dix_event_to_core_conversion);
- g_test_add_func("/dix/input/event-xi1-conversion", dix_event_to_xi1_conversion);
- g_test_add_func("/dix/input/check-grab-values", dix_check_grab_values);
- g_test_add_func("/dix/input/xi2-struct-sizes", xi2_struct_sizes);
- g_test_add_func("/dix/input/grab_matching", dix_grab_matching);
- g_test_add_func("/dix/input/valuator_mode", dix_valuator_mode);
- g_test_add_func("/include/byte_padding_macros", include_byte_padding_macros);
- g_test_add_func("/include/bit_test_macros", include_bit_test_macros);
- g_test_add_func("/Xi/xiproperty/register-unregister", xi_unregister_handlers);
-
-
- return g_test_run();
-}
+/**
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdint.h>
+#include <X11/X.h>
+#include "misc.h"
+#include "resource.h"
+#include <X11/Xproto.h>
+#include <X11/extensions/XI2proto.h>
+#include <X11/Xatom.h>
+#include "windowstr.h"
+#include "inputstr.h"
+#include "eventconvert.h"
+#include "exevents.h"
+#include "exglobals.h"
+#include "dixgrabs.h"
+#include "eventstr.h"
+#include "inpututils.h"
+#include <glib.h>
+
+/**
+ * Init a device with axes.
+ * Verify values set on the device.
+ *
+ * Result: All axes set to default values (usually 0).
+ */
+static void dix_init_valuators(void)
+{
+ DeviceIntRec dev;
+ ValuatorClassPtr val;
+ const int num_axes = 2;
+ int i;
+ Atom atoms[MAX_VALUATORS] = { 0 };
+
+
+ memset(&dev, 0, sizeof(DeviceIntRec));
+ dev.type = MASTER_POINTER; /* claim it's a master to stop ptracccel */
+
+ g_assert(InitValuatorClassDeviceStruct(NULL, 0, atoms, 0, 0) == FALSE);
+ g_assert(InitValuatorClassDeviceStruct(&dev, num_axes, atoms, 0, Absolute));
+
+ val = dev.valuator;
+ g_assert(val);
+ g_assert(val->numAxes == num_axes);
+ g_assert(val->numMotionEvents == 0);
+ g_assert(val->axisVal);
+
+ for (i = 0; i < num_axes; i++)
+ {
+ g_assert(val->axisVal[i] == 0);
+ g_assert(val->axes->min_value == NO_AXIS_LIMITS);
+ g_assert(val->axes->max_value == NO_AXIS_LIMITS);
+ g_assert(val->axes->mode == Absolute);
+ }
+
+ g_assert(dev.last.numValuators == num_axes);
+}
+
+/* just check the known success cases, and that error cases set the client's
+ * error value correctly. */
+static void dix_check_grab_values(void)
+{
+ ClientRec client;
+ GrabParameters param;
+ int rc;
+
+ memset(&client, 0, sizeof(client));
+
+ param.grabtype = GRABTYPE_CORE;
+ param.this_device_mode = GrabModeSync;
+ param.other_devices_mode = GrabModeSync;
+ param.modifiers = AnyModifier;
+ param.ownerEvents = FALSE;
+
+ rc = CheckGrabValues(&client, &param);
+ g_assert(rc == Success);
+
+ param.this_device_mode = GrabModeAsync;
+ rc = CheckGrabValues(&client, &param);
+ g_assert(rc == Success);
+
+ param.this_device_mode = GrabModeAsync + 1;
+ rc = CheckGrabValues(&client, &param);
+ g_assert(rc == BadValue);
+ g_assert(client.errorValue == param.this_device_mode);
+ g_assert(client.errorValue == GrabModeAsync + 1);
+
+ param.this_device_mode = GrabModeSync;
+ param.other_devices_mode = GrabModeAsync;
+ rc = CheckGrabValues(&client, &param);
+ g_assert(rc == Success);
+
+ param.other_devices_mode = GrabModeAsync + 1;
+ rc = CheckGrabValues(&client, &param);
+ g_assert(rc == BadValue);
+ g_assert(client.errorValue == param.other_devices_mode);
+ g_assert(client.errorValue == GrabModeAsync + 1);
+
+ param.other_devices_mode = GrabModeSync;
+
+ param.modifiers = 1 << 13;
+ rc = CheckGrabValues(&client, &param);
+ g_assert(rc == BadValue);
+ g_assert(client.errorValue == param.modifiers);
+ g_assert(client.errorValue == (1 << 13));
+
+
+ param.modifiers = AnyModifier;
+ param.ownerEvents = TRUE;
+ rc = CheckGrabValues(&client, &param);
+ g_assert(rc == Success);
+
+ param.ownerEvents = 3;
+ rc = CheckGrabValues(&client, &param);
+ g_assert(rc == BadValue);
+ g_assert(client.errorValue == param.ownerEvents);
+ g_assert(client.errorValue == 3);
+}
+
+
+/**
+ * Convert various internal events to the matching core event and verify the
+ * parameters.
+ */
+static void dix_event_to_core(int type)
+{
+ DeviceEvent ev;
+ xEvent *core;
+ int time;
+ int x, y;
+ int rc;
+ int state;
+ int detail;
+ int count;
+ const int ROOT_WINDOW_ID = 0x100;
+
+ /* EventToCore memsets the event to 0 */
+#define test_event() \
+ g_assert(rc == Success); \
+ g_assert(core); \
+ g_assert(count == 1); \
+ g_assert(core->u.u.type == type); \
+ g_assert(core->u.u.detail == detail); \
+ g_assert(core->u.keyButtonPointer.time == time); \
+ g_assert(core->u.keyButtonPointer.rootX == x); \
+ g_assert(core->u.keyButtonPointer.rootY == y); \
+ g_assert(core->u.keyButtonPointer.state == state); \
+ g_assert(core->u.keyButtonPointer.eventX == 0); \
+ g_assert(core->u.keyButtonPointer.eventY == 0); \
+ g_assert(core->u.keyButtonPointer.root == ROOT_WINDOW_ID); \
+ g_assert(core->u.keyButtonPointer.event == 0); \
+ g_assert(core->u.keyButtonPointer.child == 0); \
+ g_assert(core->u.keyButtonPointer.sameScreen == FALSE);
+
+ x = 0;
+ y = 0;
+ time = 12345;
+ state = 0;
+ detail = 0;
+
+ ev.header = 0xFF;
+ ev.length = sizeof(DeviceEvent);
+ ev.time = time;
+ ev.root_y = x;
+ ev.root_x = y;
+ SetBit(ev.valuators.mask, 0);
+ SetBit(ev.valuators.mask, 1);
+ ev.root = ROOT_WINDOW_ID;
+ ev.corestate = state;
+ ev.detail.key = detail;
+
+ ev.type = type;
+ ev.detail.key = 0;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ test_event();
+
+ x = 1;
+ y = 2;
+ ev.root_x = x;
+ ev.root_y = y;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ test_event();
+
+ x = 0x7FFF;
+ y = 0x7FFF;
+ ev.root_x = x;
+ ev.root_y = y;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ test_event();
+
+ x = 0x8000; /* too high */
+ y = 0x8000; /* too high */
+ ev.root_x = x;
+ ev.root_y = y;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ g_assert(rc == Success);
+ g_assert(core);
+ g_assert(count == 1);
+ g_assert(core->u.keyButtonPointer.rootX != x);
+ g_assert(core->u.keyButtonPointer.rootY != y);
+
+ x = 0x7FFF;
+ y = 0x7FFF;
+ ev.root_x = x;
+ ev.root_y = y;
+ time = 0;
+ ev.time = time;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ test_event();
+
+ detail = 1;
+ ev.detail.key = detail;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ test_event();
+
+ detail = 0xFF; /* highest value */
+ ev.detail.key = detail;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ test_event();
+
+ detail = 0xFFF; /* too big */
+ ev.detail.key = detail;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ g_assert(rc == BadMatch);
+
+ detail = 0xFF; /* too big */
+ ev.detail.key = detail;
+ state = 0xFFFF; /* highest value */
+ ev.corestate = state;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ test_event();
+
+ state = 0x10000; /* too big */
+ ev.corestate = state;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ g_assert(rc == Success);
+ g_assert(core);
+ g_assert(count == 1);
+ g_assert(core->u.keyButtonPointer.state != state);
+ g_assert(core->u.keyButtonPointer.state == (state & 0xFFFF));
+
+#undef test_event
+}
+
+static void dix_event_to_core_fail(int evtype, int expected_rc)
+{
+ DeviceEvent ev;
+ xEvent *core;
+ int rc;
+ int count;
+
+ ev.header = 0xFF;
+ ev.length = sizeof(DeviceEvent);
+
+ ev.type = evtype;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ g_assert(rc == expected_rc);
+}
+
+static void dix_event_to_core_conversion(void)
+{
+ dix_event_to_core_fail(0, BadImplementation);
+ dix_event_to_core_fail(1, BadImplementation);
+ dix_event_to_core_fail(ET_ProximityOut + 1, BadImplementation);
+ dix_event_to_core_fail(ET_ProximityIn, BadMatch);
+ dix_event_to_core_fail(ET_ProximityOut, BadMatch);
+
+ dix_event_to_core(ET_KeyPress);
+ dix_event_to_core(ET_KeyRelease);
+ dix_event_to_core(ET_ButtonPress);
+ dix_event_to_core(ET_ButtonRelease);
+ dix_event_to_core(ET_Motion);
+}
+
+static void
+_dix_test_xi_convert(DeviceEvent *ev, int expected_rc, int expected_count)
+{
+ xEvent *xi;
+ int count = 0;
+ int rc;
+
+ rc = EventToXI((InternalEvent*)ev, &xi, &count);
+ g_assert(rc == expected_rc);
+ g_assert(count >= expected_count);
+ if (count > 0){
+ deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer*)xi;
+ g_assert(kbp->type == IEventBase + ev->type);
+ g_assert(kbp->detail == ev->detail.key);
+ g_assert(kbp->time == ev->time);
+ g_assert((kbp->deviceid & ~MORE_EVENTS) == ev->deviceid);
+ g_assert(kbp->root_x == ev->root_x);
+ g_assert(kbp->root_y == ev->root_y);
+ g_assert(kbp->state == ev->corestate);
+ g_assert(kbp->event_x == 0);
+ g_assert(kbp->event_y == 0);
+ g_assert(kbp->root == ev->root);
+ g_assert(kbp->event == 0);
+ g_assert(kbp->child == 0);
+ g_assert(kbp->same_screen == FALSE);
+
+ while (--count > 0) {
+ deviceValuator *v = (deviceValuator*)&xi[count];
+ g_assert(v->type == DeviceValuator);
+ g_assert(v->num_valuators <= 6);
+ }
+
+
+ free(xi);
+ }
+}
+
+/**
+ * This tests for internal event → XI1 event conversion
+ * - all conversions should generate the right XI event type
+ * - right number of events generated
+ * - extra events are valuators
+ */
+static void dix_event_to_xi1_conversion(void)
+{
+ DeviceEvent ev = {0};
+ int time;
+ int x, y;
+ int state;
+ int detail;
+ const int ROOT_WINDOW_ID = 0x100;
+ int deviceid;
+
+ IEventBase = 80;
+ DeviceValuator = IEventBase - 1;
+ DeviceKeyPress = IEventBase + ET_KeyPress;
+ DeviceKeyRelease = IEventBase + ET_KeyRelease;
+ DeviceButtonPress = IEventBase + ET_ButtonPress;
+ DeviceButtonRelease = IEventBase + ET_ButtonRelease;
+ DeviceMotionNotify = IEventBase + ET_Motion;
+ DeviceFocusIn = IEventBase + ET_FocusIn;
+ DeviceFocusOut = IEventBase + ET_FocusOut;
+ ProximityIn = IEventBase + ET_ProximityIn;
+ ProximityOut = IEventBase + ET_ProximityOut;
+
+ /* EventToXI callocs */
+ x = 0;
+ y = 0;
+ time = 12345;
+ state = 0;
+ detail = 0;
+ deviceid = 4;
+
+ ev.header = 0xFF;
+
+ ev.header = 0xFF;
+ ev.length = sizeof(DeviceEvent);
+ ev.time = time;
+ ev.root_y = x;
+ ev.root_x = y;
+ SetBit(ev.valuators.mask, 0);
+ SetBit(ev.valuators.mask, 1);
+ ev.root = ROOT_WINDOW_ID;
+ ev.corestate = state;
+ ev.detail.key = detail;
+ ev.deviceid = deviceid;
+
+ /* test all types for bad match */
+ ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_Motion; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, Success, 1);
+
+ /* No axes */
+ ClearBit(ev.valuators.mask, 0);
+ ClearBit(ev.valuators.mask, 1);
+ ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_Motion; _dix_test_xi_convert(&ev, BadMatch, 0);
+ ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, BadMatch, 0);
+ ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, BadMatch, 0);
+
+ /* more than 6 axes → 2 valuator events */
+ SetBit(ev.valuators.mask, 0);
+ SetBit(ev.valuators.mask, 1);
+ SetBit(ev.valuators.mask, 2);
+ SetBit(ev.valuators.mask, 3);
+ SetBit(ev.valuators.mask, 4);
+ SetBit(ev.valuators.mask, 5);
+ SetBit(ev.valuators.mask, 6);
+ ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_Motion; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, Success, 2);
+
+
+ /* keycode too high */
+ ev.type = ET_KeyPress;
+ ev.detail.key = 256;
+ _dix_test_xi_convert(&ev, Success, 0);
+
+ /* deviceid too high */
+ ev.type = ET_KeyPress;
+ ev.detail.key = 18;
+ ev.deviceid = 128;
+ _dix_test_xi_convert(&ev, Success, 0);
+}
+
+
+static void xi2_struct_sizes(void)
+{
+#define compare(req) \
+ g_assert(sizeof(req) == sz_##req);
+
+ compare(xXIQueryVersionReq);
+ compare(xXIWarpPointerReq);
+ compare(xXIChangeCursorReq);
+ compare(xXIChangeHierarchyReq);
+ compare(xXISetClientPointerReq);
+ compare(xXIGetClientPointerReq);
+ compare(xXISelectEventsReq);
+ compare(xXIQueryVersionReq);
+ compare(xXIQueryDeviceReq);
+ compare(xXISetFocusReq);
+ compare(xXIGetFocusReq);
+ compare(xXIGrabDeviceReq);
+ compare(xXIUngrabDeviceReq);
+ compare(xXIAllowEventsReq);
+ compare(xXIPassiveGrabDeviceReq);
+ compare(xXIPassiveUngrabDeviceReq);
+ compare(xXIListPropertiesReq);
+ compare(xXIChangePropertyReq);
+ compare(xXIDeletePropertyReq);
+ compare(xXIGetPropertyReq);
+ compare(xXIGetSelectedEventsReq);
+#undef compare
+}
+
+
+static void dix_grab_matching(void)
+{
+ DeviceIntRec xi_all_devices, xi_all_master_devices, dev1, dev2;
+ GrabRec a, b;
+ BOOL rc;
+
+ memset(&a, 0, sizeof(a));
+ memset(&b, 0, sizeof(b));
+
+ /* different grabtypes must fail */
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_XI2;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI2;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_CORE;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ /* XI2 grabs for different devices must fail, regardless of ignoreDevice
+ * XI2 grabs for master devices must fail against a slave */
+ memset(&xi_all_devices, 0, sizeof(DeviceIntRec));
+ memset(&xi_all_master_devices, 0, sizeof(DeviceIntRec));
+ memset(&dev1, 0, sizeof(DeviceIntRec));
+ memset(&dev2, 0, sizeof(DeviceIntRec));
+
+ xi_all_devices.id = XIAllDevices;
+ xi_all_master_devices.id = XIAllMasterDevices;
+ dev1.id = 10;
+ dev1.type = SLAVE;
+ dev2.id = 11;
+ dev2.type = SLAVE;
+
+ inputInfo.all_devices = &xi_all_devices;
+ inputInfo.all_master_devices = &xi_all_master_devices;
+ a.grabtype = GRABTYPE_XI2;
+ b.grabtype = GRABTYPE_XI2;
+ a.device = &dev1;
+ b.device = &dev2;
+
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+
+ a.device = &dev2;
+ b.device = &dev1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&a, &b, TRUE);
+ g_assert(rc == FALSE);
+
+ a.device = inputInfo.all_master_devices;
+ b.device = &dev1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&a, &b, TRUE);
+ g_assert(rc == FALSE);
+
+ a.device = &dev1;
+ b.device = inputInfo.all_master_devices;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&a, &b, TRUE);
+ g_assert(rc == FALSE);
+
+ /* ignoreDevice FALSE must fail for different devices for CORE and XI */
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI;
+ a.device = &dev1;
+ b.device = &dev2;
+ a.modifierDevice = &dev1;
+ b.modifierDevice = &dev1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_CORE;
+ a.device = &dev1;
+ b.device = &dev2;
+ a.modifierDevice = &dev1;
+ b.modifierDevice = &dev1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+
+ /* ignoreDevice FALSE must fail for different modifier devices for CORE
+ * and XI */
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI;
+ a.device = &dev1;
+ b.device = &dev1;
+ a.modifierDevice = &dev1;
+ b.modifierDevice = &dev2;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_CORE;
+ a.device = &dev1;
+ b.device = &dev1;
+ a.modifierDevice = &dev1;
+ b.modifierDevice = &dev2;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+
+ /* different event type must fail */
+ a.grabtype = GRABTYPE_XI2;
+ b.grabtype = GRABTYPE_XI2;
+ a.device = &dev1;
+ b.device = &dev1;
+ a.modifierDevice = &dev1;
+ b.modifierDevice = &dev1;
+ a.type = XI_KeyPress;
+ b.type = XI_KeyRelease;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&a, &b, TRUE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_CORE;
+ a.device = &dev1;
+ b.device = &dev1;
+ a.modifierDevice = &dev1;
+ b.modifierDevice = &dev1;
+ a.type = XI_KeyPress;
+ b.type = XI_KeyRelease;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&a, &b, TRUE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI;
+ a.device = &dev1;
+ b.device = &dev1;
+ a.modifierDevice = &dev1;
+ b.modifierDevice = &dev1;
+ a.type = XI_KeyPress;
+ b.type = XI_KeyRelease;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&a, &b, TRUE);
+ g_assert(rc == FALSE);
+
+ /* different modifiers must fail */
+ a.grabtype = GRABTYPE_XI2;
+ b.grabtype = GRABTYPE_XI2;
+ a.device = &dev1;
+ b.device = &dev1;
+ a.modifierDevice = &dev1;
+ b.modifierDevice = &dev1;
+ a.type = XI_KeyPress;
+ b.type = XI_KeyPress;
+ a.modifiersDetail.exact = 1;
+ b.modifiersDetail.exact = 2;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_CORE;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ /* AnyModifier must fail for XI2 */
+ a.grabtype = GRABTYPE_XI2;
+ b.grabtype = GRABTYPE_XI2;
+ a.modifiersDetail.exact = AnyModifier;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ /* XIAnyModifier must fail for CORE and XI */
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI;
+ a.modifiersDetail.exact = XIAnyModifier;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_CORE;
+ a.modifiersDetail.exact = XIAnyModifier;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ /* different detail must fail */
+ a.grabtype = GRABTYPE_XI2;
+ b.grabtype = GRABTYPE_XI2;
+ a.detail.exact = 1;
+ b.detail.exact = 2;
+ a.modifiersDetail.exact = 1;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_CORE;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ /* detail of AnyModifier must fail */
+ a.grabtype = GRABTYPE_XI2;
+ b.grabtype = GRABTYPE_XI2;
+ a.detail.exact = AnyModifier;
+ b.detail.exact = 1;
+ a.modifiersDetail.exact = 1;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_CORE;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ /* detail of XIAnyModifier must fail */
+ a.grabtype = GRABTYPE_XI2;
+ b.grabtype = GRABTYPE_XI2;
+ a.detail.exact = XIAnyModifier;
+ b.detail.exact = 1;
+ a.modifiersDetail.exact = 1;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_CORE;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == FALSE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == FALSE);
+
+ /* XIAnyModifier or AnyModifer must succeed */
+ a.grabtype = GRABTYPE_XI2;
+ b.grabtype = GRABTYPE_XI2;
+ a.detail.exact = 1;
+ b.detail.exact = 1;
+ a.modifiersDetail.exact = XIAnyModifier;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == TRUE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == TRUE);
+
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_CORE;
+ a.detail.exact = 1;
+ b.detail.exact = 1;
+ a.modifiersDetail.exact = AnyModifier;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == TRUE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == TRUE);
+
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI;
+ a.detail.exact = 1;
+ b.detail.exact = 1;
+ a.modifiersDetail.exact = AnyModifier;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == TRUE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == TRUE);
+
+ /* AnyKey or XIAnyKeycode must succeed */
+ a.grabtype = GRABTYPE_XI2;
+ b.grabtype = GRABTYPE_XI2;
+ a.detail.exact = XIAnyKeycode;
+ b.detail.exact = 1;
+ a.modifiersDetail.exact = 1;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == TRUE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == TRUE);
+
+ a.grabtype = GRABTYPE_CORE;
+ b.grabtype = GRABTYPE_CORE;
+ a.detail.exact = AnyKey;
+ b.detail.exact = 1;
+ a.modifiersDetail.exact = 1;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == TRUE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == TRUE);
+
+ a.grabtype = GRABTYPE_XI;
+ b.grabtype = GRABTYPE_XI;
+ a.detail.exact = AnyKey;
+ b.detail.exact = 1;
+ a.modifiersDetail.exact = 1;
+ b.modifiersDetail.exact = 1;
+ rc = GrabMatchesSecond(&a, &b, FALSE);
+ g_assert(rc == TRUE);
+ rc = GrabMatchesSecond(&b, &a, FALSE);
+ g_assert(rc == TRUE);
+}
+
+static void test_bits_to_byte(int i)
+{
+ int expected_bytes;
+ expected_bytes = (i + 7)/8;
+
+ g_assert(bits_to_bytes(i) >= i/8);
+ g_assert((bits_to_bytes(i) * 8) - i <= 7);
+ g_assert(expected_bytes == bits_to_bytes(i));
+}
+
+static void test_bytes_to_int32(int i)
+{
+ int expected_4byte;
+ expected_4byte = (i + 3)/4;
+
+ g_assert(bytes_to_int32(i) <= i);
+ g_assert((bytes_to_int32(i) * 4) - i <= 3);
+ g_assert(expected_4byte == bytes_to_int32(i));
+}
+
+static void test_pad_to_int32(int i)
+{
+ int expected_bytes;
+ expected_bytes = ((i + 3)/4) * 4;
+
+ g_assert(pad_to_int32(i) >= i);
+ g_assert(pad_to_int32(i) - i <= 3);
+ g_assert(expected_bytes == pad_to_int32(i));
+}
+static void include_byte_padding_macros(void)
+{
+ g_test_message("Testing bits_to_bytes()");
+
+ /* the macros don't provide overflow protection */
+ test_bits_to_byte(0);
+ test_bits_to_byte(1);
+ test_bits_to_byte(2);
+ test_bits_to_byte(7);
+ test_bits_to_byte(8);
+ test_bits_to_byte(0xFF);
+ test_bits_to_byte(0x100);
+ test_bits_to_byte(INT_MAX - 9);
+ test_bits_to_byte(INT_MAX - 8);
+
+ g_test_message("Testing bytes_to_int32()");
+
+ test_bytes_to_int32(0);
+ test_bytes_to_int32(1);
+ test_bytes_to_int32(2);
+ test_bytes_to_int32(7);
+ test_bytes_to_int32(8);
+ test_bytes_to_int32(0xFF);
+ test_bytes_to_int32(0x100);
+ test_bytes_to_int32(0xFFFF);
+ test_bytes_to_int32(0x10000);
+ test_bytes_to_int32(0xFFFFFF);
+ test_bytes_to_int32(0x1000000);
+ test_bytes_to_int32(INT_MAX - 4);
+ test_bytes_to_int32(INT_MAX - 3);
+
+ g_test_message("Testing pad_to_int32");
+
+ test_pad_to_int32(0);
+ test_pad_to_int32(0);
+ test_pad_to_int32(1);
+ test_pad_to_int32(2);
+ test_pad_to_int32(7);
+ test_pad_to_int32(8);
+ test_pad_to_int32(0xFF);
+ test_pad_to_int32(0x100);
+ test_pad_to_int32(0xFFFF);
+ test_pad_to_int32(0x10000);
+ test_pad_to_int32(0xFFFFFF);
+ test_pad_to_int32(0x1000000);
+ test_pad_to_int32(INT_MAX - 4);
+ test_pad_to_int32(INT_MAX - 3);
+}
+
+static void xi_unregister_handlers(void)
+{
+ DeviceIntRec dev;
+ int handler;
+
+ memset(&dev, 0, sizeof(dev));
+
+ handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
+ g_assert(handler == 1);
+ handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
+ g_assert(handler == 2);
+ handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
+ g_assert(handler == 3);
+
+ g_test_message("Unlinking from front.");
+
+ XIUnregisterPropertyHandler(&dev, 4); /* NOOP */
+ g_assert(dev.properties.handlers->id == 3);
+ XIUnregisterPropertyHandler(&dev, 3);
+ g_assert(dev.properties.handlers->id == 2);
+ XIUnregisterPropertyHandler(&dev, 2);
+ g_assert(dev.properties.handlers->id == 1);
+ XIUnregisterPropertyHandler(&dev, 1);
+ g_assert(dev.properties.handlers == NULL);
+
+ handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
+ g_assert(handler == 4);
+ handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
+ g_assert(handler == 5);
+ handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
+ g_assert(handler == 6);
+ XIUnregisterPropertyHandler(&dev, 3); /* NOOP */
+ g_assert(dev.properties.handlers->next->next->next == NULL);
+ XIUnregisterPropertyHandler(&dev, 4);
+ g_assert(dev.properties.handlers->next->next == NULL);
+ XIUnregisterPropertyHandler(&dev, 5);
+ g_assert(dev.properties.handlers->next == NULL);
+ XIUnregisterPropertyHandler(&dev, 6);
+ g_assert(dev.properties.handlers == NULL);
+
+ handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
+ g_assert(handler == 7);
+ handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
+ g_assert(handler == 8);
+ handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
+ g_assert(handler == 9);
+
+ XIDeleteAllDeviceProperties(&dev);
+ g_assert(dev.properties.handlers == NULL);
+ XIUnregisterPropertyHandler(&dev, 7); /* NOOP */
+
+}
+
+static void cmp_attr_fields(InputAttributes *attr1,
+ InputAttributes *attr2)
+{
+ char **tags1, **tags2;
+
+ g_assert(attr1 && attr2);
+ g_assert(attr1 != attr2);
+ g_assert(attr1->flags == attr2->flags);
+
+ if (attr1->product != NULL)
+ {
+ g_assert(attr1->product != attr2->product);
+ g_assert(strcmp(attr1->product, attr2->product) == 0);
+ } else
+ g_assert(attr2->product == NULL);
+
+ if (attr1->vendor != NULL)
+ {
+ g_assert(attr1->vendor != attr2->vendor);
+ g_assert(strcmp(attr1->vendor, attr2->vendor) == 0);
+ } else
+ g_assert(attr2->vendor == NULL);
+
+ if (attr1->device != NULL)
+ {
+ g_assert(attr1->device != attr2->device);
+ g_assert(strcmp(attr1->device, attr2->device) == 0);
+ } else
+ g_assert(attr2->device == NULL);
+
+ if (attr1->pnp_id != NULL)
+ {
+ g_assert(attr1->pnp_id != attr2->pnp_id);
+ g_assert(strcmp(attr1->pnp_id, attr2->pnp_id) == 0);
+ } else
+ g_assert(attr2->pnp_id == NULL);
+
+ if (attr1->usb_id != NULL)
+ {
+ g_assert(attr1->usb_id != attr2->usb_id);
+ g_assert(strcmp(attr1->usb_id, attr2->usb_id) == 0);
+ } else
+ g_assert(attr2->usb_id == NULL);
+
+ tags1 = attr1->tags;
+ tags2 = attr2->tags;
+
+ /* if we don't have any tags, skip the tag checking bits */
+ if (!tags1)
+ {
+ g_assert(!tags2);
+ return;
+ }
+
+ /* Don't lug around empty arrays */
+ g_assert(*tags1);
+ g_assert(*tags2);
+
+ /* check for identical content, but duplicated */
+ while (*tags1)
+ {
+ g_assert(*tags1 != *tags2);
+ g_assert(strcmp(*tags1, *tags2) == 0);
+ tags1++;
+ tags2++;
+ }
+
+ /* ensure tags1 and tags2 have the same no of elements */
+ g_assert(!*tags2);
+
+ /* check for not sharing memory */
+ tags1 = attr1->tags;
+ while (*tags1)
+ {
+ tags2 = attr2->tags;
+ while (*tags2)
+ g_assert(*tags1 != *tags2++);
+
+ tags1++;
+ }
+}
+
+static void dix_input_attributes(void)
+{
+ InputAttributes orig = {0};
+ InputAttributes *new;
+ char *tags[4] = {"tag1", "tag2", "tag2", NULL};
+
+ new = DuplicateInputAttributes(NULL);
+ g_assert(!new);
+
+ new = DuplicateInputAttributes(&orig);
+ g_assert(memcmp(&orig, new, sizeof(InputAttributes)) == 0);
+
+ orig.product = "product name";
+ new = DuplicateInputAttributes(&orig);
+ cmp_attr_fields(&orig, new);
+ FreeInputAttributes(new);
+
+ orig.vendor = "vendor name";
+ new = DuplicateInputAttributes(&orig);
+ cmp_attr_fields(&orig, new);
+ FreeInputAttributes(new);
+
+ orig.device = "device path";
+ new = DuplicateInputAttributes(&orig);
+ cmp_attr_fields(&orig, new);
+ FreeInputAttributes(new);
+
+ orig.pnp_id = "PnPID";
+ new = DuplicateInputAttributes(&orig);
+ cmp_attr_fields(&orig, new);
+ FreeInputAttributes(new);
+
+ orig.usb_id = "USBID";
+ new = DuplicateInputAttributes(&orig);
+ cmp_attr_fields(&orig, new);
+ FreeInputAttributes(new);
+
+ orig.flags = 0xF0;
+ new = DuplicateInputAttributes(&orig);
+ cmp_attr_fields(&orig, new);
+ FreeInputAttributes(new);
+
+ orig.tags = tags;
+ new = DuplicateInputAttributes(&orig);
+ cmp_attr_fields(&orig, new);
+ FreeInputAttributes(new);
+}
+
+static void dix_input_valuator_masks(void)
+{
+ ValuatorMask *mask = NULL, *copy;
+ int nvaluators = MAX_VALUATORS;
+ int valuators[nvaluators];
+ int i;
+ int first_val, num_vals;
+
+ for (i = 0; i < nvaluators; i++)
+ valuators[i] = i;
+
+ mask = valuator_mask_new(nvaluators);
+ g_assert(mask != NULL);
+ g_assert(valuator_mask_size(mask) == 0);
+ g_assert(valuator_mask_num_valuators(mask) == 0);
+
+ for (i = 0; i < nvaluators; i++)
+ {
+ g_assert(!valuator_mask_isset(mask, i));
+ valuator_mask_set(mask, i, valuators[i]);
+ g_assert(valuator_mask_isset(mask, i));
+ g_assert(valuator_mask_get(mask, i) == valuators[i]);
+ g_assert(valuator_mask_size(mask) == i + 1);
+ g_assert(valuator_mask_num_valuators(mask) == i + 1);
+ }
+
+ for (i = 0; i < nvaluators; i++)
+ {
+ g_assert(valuator_mask_isset(mask, i));
+ valuator_mask_unset(mask, i);
+ /* we're removing valuators from the front, so size should stay the
+ * same until the last bit is removed */
+ if (i < nvaluators - 1)
+ g_assert(valuator_mask_size(mask) == nvaluators);
+ g_assert(!valuator_mask_isset(mask, i));
+ }
+
+ g_assert(valuator_mask_size(mask) == 0);
+ valuator_mask_zero(mask);
+ g_assert(valuator_mask_size(mask) == 0);
+ g_assert(valuator_mask_num_valuators(mask) == 0);
+ for (i = 0; i < nvaluators; i++)
+ g_assert(!valuator_mask_isset(mask, i));
+
+ first_val = 5;
+ num_vals = 6;
+
+ valuator_mask_set_range(mask, first_val, num_vals, valuators);
+ g_assert(valuator_mask_size(mask) == first_val + num_vals);
+ g_assert(valuator_mask_num_valuators(mask) == num_vals);
+ for (i = 0; i < nvaluators; i++)
+ {
+ if (i < first_val || i >= first_val + num_vals)
+ g_assert(!valuator_mask_isset(mask, i));
+ else
+ {
+ g_assert(valuator_mask_isset(mask, i));
+ g_assert(valuator_mask_get(mask, i) == valuators[i - first_val]);
+ }
+ }
+
+ copy = valuator_mask_new(nvaluators);
+ valuator_mask_copy(copy, mask);
+ g_assert(mask != copy);
+ g_assert(valuator_mask_size(mask) == valuator_mask_size(copy));
+ g_assert(valuator_mask_num_valuators(mask) == valuator_mask_num_valuators(copy));
+
+ for (i = 0; i < nvaluators; i++)
+ {
+ g_assert(valuator_mask_isset(mask, i) == valuator_mask_isset(copy, i));
+ g_assert(valuator_mask_get(mask, i) == valuator_mask_get(copy, i));
+ }
+
+ valuator_mask_free(&mask);
+ g_assert(mask == NULL);
+}
+
+static void dix_valuator_mode(void)
+{
+ DeviceIntRec dev;
+ const int num_axes = MAX_VALUATORS;
+ int i;
+ Atom atoms[MAX_VALUATORS] = { 0 };
+
+ memset(&dev, 0, sizeof(DeviceIntRec));
+ dev.type = MASTER_POINTER; /* claim it's a master to stop ptracccel */
+
+ g_assert(InitValuatorClassDeviceStruct(NULL, 0, atoms, 0, 0) == FALSE);
+ g_assert(InitValuatorClassDeviceStruct(&dev, num_axes, atoms, 0, Absolute));
+
+ for (i = 0; i < num_axes; i++)
+ {
+ g_assert(valuator_get_mode(&dev, i) == Absolute);
+ valuator_set_mode(&dev, i, Relative);
+ g_assert(dev.valuator->axes[i].mode == Relative);
+ g_assert(valuator_get_mode(&dev, i) == Relative);
+ }
+
+ valuator_set_mode(&dev, VALUATOR_MODE_ALL_AXES, Absolute);
+ for (i = 0; i < num_axes; i++)
+ g_assert(valuator_get_mode(&dev, i) == Absolute);
+
+ valuator_set_mode(&dev, VALUATOR_MODE_ALL_AXES, Relative);
+ for (i = 0; i < num_axes; i++)
+ g_assert(valuator_get_mode(&dev, i) == Relative);
+}
+
+static void include_bit_test_macros(void)
+{
+ uint8_t mask[9] = { 0 };
+ int i;
+
+ for (i = 0; i < sizeof(mask)/sizeof(mask[0]); i++)
+ {
+ g_assert(BitIsOn(mask, i) == 0);
+ SetBit(mask, i);
+ g_assert(BitIsOn(mask, i) == 1);
+ g_assert(!!(mask[i/8] & (1 << (i % 8))));
+ g_assert(CountBits(mask, sizeof(mask)) == 1);
+ ClearBit(mask, i);
+ g_assert(BitIsOn(mask, i) == 0);
+ }
+}
+
+int main(int argc, char** argv)
+{
+ g_test_init(&argc, &argv,NULL);
+ g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
+
+ g_test_add_func("/dix/input/valuator-masks", dix_input_valuator_masks);
+ g_test_add_func("/dix/input/attributes", dix_input_attributes);
+ g_test_add_func("/dix/input/init-valuators", dix_init_valuators);
+ g_test_add_func("/dix/input/event-core-conversion", dix_event_to_core_conversion);
+ g_test_add_func("/dix/input/event-xi1-conversion", dix_event_to_xi1_conversion);
+ g_test_add_func("/dix/input/check-grab-values", dix_check_grab_values);
+ g_test_add_func("/dix/input/xi2-struct-sizes", xi2_struct_sizes);
+ g_test_add_func("/dix/input/grab_matching", dix_grab_matching);
+ g_test_add_func("/dix/input/valuator_mode", dix_valuator_mode);
+ g_test_add_func("/include/byte_padding_macros", include_byte_padding_macros);
+ g_test_add_func("/include/bit_test_macros", include_bit_test_macros);
+ g_test_add_func("/Xi/xiproperty/register-unregister", xi_unregister_handlers);
+
+
+ return g_test_run();
+}
diff --git a/xorg-server/test/xi2/protocol-xiquerypointer.c b/xorg-server/test/xi2/protocol-xiquerypointer.c
index a42d59515..95c8b4bc1 100644
--- a/xorg-server/test/xi2/protocol-xiquerypointer.c
+++ b/xorg-server/test/xi2/protocol-xiquerypointer.c
@@ -1,220 +1,220 @@
-/**
- * Copyright © 2009 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-/*
- * Protocol testing for XIQueryPointer request.
- */
-#include <stdint.h>
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/extensions/XI2proto.h>
-#include "inputstr.h"
-#include "windowstr.h"
-#include "scrnintstr.h"
-#include "xiquerypointer.h"
-#include "exevents.h"
-
-#include "protocol-common.h"
-#include <glib.h>
-
-static ClientRec client_request;
-static void reply_XIQueryPointer_data(ClientPtr client, int len,
- char *data, void *userdata);
-
-static struct {
- DeviceIntPtr dev;
- WindowPtr win;
-} test_data;
-
-
-/* dixLookupWindow requires a lot of setup not necessary for this test.
- * Simple wrapper that returns either one of the fake root window or the
- * fake client window. If the requested ID is neither of those wanted,
- * return whatever the real dixLookupWindow does.
- */
-int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
-{
- if (id == root.drawable.id)
- {
- *win = &root;
- return Success;
- } else if (id == window.drawable.id)
- {
- *win = &window;
- return Success;
- }
-
- return __real_dixLookupWindow(win, id, client, access);
-}
-
-static void reply_XIQueryPointer(ClientPtr client, int len, char *data,
- void *userdata)
-{
- xXIQueryPointerReply *rep = (xXIQueryPointerReply*)data;
- SpritePtr sprite;
-
- if (!rep->repType)
- return;
-
- if (client->swapped)
- {
- char n;
- swapl(&rep->length, n);
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->root, n);
- swapl(&rep->child, n);
- swapl(&rep->root_x, n);
- swapl(&rep->root_y, n);
- swapl(&rep->win_x, n);
- swapl(&rep->win_y, n);
- swaps(&rep->buttons_len, n);
- }
-
- reply_check_defaults(rep, len, XIQueryPointer);
-
- g_assert(rep->root == root.drawable.id);
- g_assert(rep->same_screen == xTrue);
-
- sprite = test_data.dev->spriteInfo->sprite;
- g_assert((rep->root_x >> 16) == sprite->hot.x);
- g_assert((rep->root_y >> 16) == sprite->hot.y);
-
- if (test_data.win == &root)
- {
- g_assert(rep->root_x == rep->win_x);
- g_assert(rep->root_y == rep->win_y);
- g_assert(rep->child == window.drawable.id);
- } else
- {
- int x, y;
-
- x = sprite->hot.x - window.drawable.x;
- y = sprite->hot.y - window.drawable.y;
-
- g_assert((rep->win_x >> 16) == x);
- g_assert((rep->win_y >> 16) == y);
- g_assert(rep->child == None);
- }
-
-
- g_assert(rep->same_screen == xTrue);
-
- reply_handler = reply_XIQueryPointer_data;
-}
-
-static void reply_XIQueryPointer_data(ClientPtr client, int len, char *data, void *userdata)
-{
- reply_handler = reply_XIQueryPointer;
-}
-
-static void request_XIQueryPointer(ClientPtr client, xXIQueryPointerReq* req, int error)
-{
- char n;
- int rc;
-
- rc = ProcXIQueryPointer(&client_request);
- g_assert(rc == error);
-
- if (rc == BadDevice)
- g_assert(client_request.errorValue == req->deviceid);
-
- client_request.swapped = TRUE;
- swaps(&req->deviceid, n);
- swaps(&req->length, n);
- rc = SProcXIQueryPointer(&client_request);
- g_assert(rc == error);
-
- if (rc == BadDevice)
- g_assert(client_request.errorValue == req->deviceid);
-}
-
-static void test_XIQueryPointer(void)
-{
- int i;
- xXIQueryPointerReq request;
-
- memset(&request, 0, sizeof(request));
-
- request_init(&request, XIQueryPointer);
-
- reply_handler = reply_XIQueryPointer;
-
- client_request = init_client(request.length, &request);
-
- request.deviceid = XIAllDevices;
- request_XIQueryPointer(&client_request, &request, BadDevice);
-
- request.deviceid = XIAllMasterDevices;
- request_XIQueryPointer(&client_request, &request, BadDevice);
-
- request.win = root.drawable.id;
- test_data.win = &root;
-
- test_data.dev = devices.vcp;
- request.deviceid = devices.vcp->id;
- request_XIQueryPointer(&client_request, &request, Success);
- request.deviceid = devices.vck->id;
- request_XIQueryPointer(&client_request, &request, BadDevice);
- request.deviceid = devices.mouse->id;
- request_XIQueryPointer(&client_request, &request, BadDevice);
- request.deviceid = devices.kbd->id;
- request_XIQueryPointer(&client_request, &request, BadDevice);
-
- test_data.dev = devices.mouse;
- devices.mouse->master = NULL; /* Float, kind-of */
- request.deviceid = devices.mouse->id;
- request_XIQueryPointer(&client_request, &request, Success);
-
- for (i = devices.kbd->id + 1; i <= 0xFFFF; i++)
- {
- request.deviceid = i;
- request_XIQueryPointer(&client_request, &request, BadDevice);
- }
-
- request.win = window.drawable.id;
-
- test_data.dev = devices.vcp;
- test_data.win = &window;
- request.deviceid = devices.vcp->id;
- request_XIQueryPointer(&client_request, &request, Success);
-
- test_data.dev = devices.mouse;
- request.deviceid = devices.mouse->id;
- request_XIQueryPointer(&client_request, &request, Success);
-}
-
-int main(int argc, char** argv)
-{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
- init_simple();
-
- g_test_add_func("/xi2/protocol/XIQueryPointer", test_XIQueryPointer);
-
- return g_test_run();
-}
+/**
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+/*
+ * Protocol testing for XIQueryPointer request.
+ */
+#include <stdint.h>
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/extensions/XI2proto.h>
+#include "inputstr.h"
+#include "windowstr.h"
+#include "scrnintstr.h"
+#include "xiquerypointer.h"
+#include "exevents.h"
+
+#include "protocol-common.h"
+#include <glib.h>
+
+static ClientRec client_request;
+static void reply_XIQueryPointer_data(ClientPtr client, int len,
+ char *data, void *userdata);
+
+static struct {
+ DeviceIntPtr dev;
+ WindowPtr win;
+} test_data;
+
+
+/* dixLookupWindow requires a lot of setup not necessary for this test.
+ * Simple wrapper that returns either one of the fake root window or the
+ * fake client window. If the requested ID is neither of those wanted,
+ * return whatever the real dixLookupWindow does.
+ */
+int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
+{
+ if (id == root.drawable.id)
+ {
+ *win = &root;
+ return Success;
+ } else if (id == window.drawable.id)
+ {
+ *win = &window;
+ return Success;
+ }
+
+ return __real_dixLookupWindow(win, id, client, access);
+}
+
+static void reply_XIQueryPointer(ClientPtr client, int len, char *data,
+ void *userdata)
+{
+ xXIQueryPointerReply *rep = (xXIQueryPointerReply*)data;
+ SpritePtr sprite;
+
+ if (!rep->repType)
+ return;
+
+ if (client->swapped)
+ {
+ char n;
+ swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber, n);
+ swapl(&rep->root, n);
+ swapl(&rep->child, n);
+ swapl(&rep->root_x, n);
+ swapl(&rep->root_y, n);
+ swapl(&rep->win_x, n);
+ swapl(&rep->win_y, n);
+ swaps(&rep->buttons_len, n);
+ }
+
+ reply_check_defaults(rep, len, XIQueryPointer);
+
+ g_assert(rep->root == root.drawable.id);
+ g_assert(rep->same_screen == xTrue);
+
+ sprite = test_data.dev->spriteInfo->sprite;
+ g_assert((rep->root_x >> 16) == sprite->hot.x);
+ g_assert((rep->root_y >> 16) == sprite->hot.y);
+
+ if (test_data.win == &root)
+ {
+ g_assert(rep->root_x == rep->win_x);
+ g_assert(rep->root_y == rep->win_y);
+ g_assert(rep->child == window.drawable.id);
+ } else
+ {
+ int x, y;
+
+ x = sprite->hot.x - window.drawable.x;
+ y = sprite->hot.y - window.drawable.y;
+
+ g_assert((rep->win_x >> 16) == x);
+ g_assert((rep->win_y >> 16) == y);
+ g_assert(rep->child == None);
+ }
+
+
+ g_assert(rep->same_screen == xTrue);
+
+ reply_handler = reply_XIQueryPointer_data;
+}
+
+static void reply_XIQueryPointer_data(ClientPtr client, int len, char *data, void *userdata)
+{
+ reply_handler = reply_XIQueryPointer;
+}
+
+static void request_XIQueryPointer(ClientPtr client, xXIQueryPointerReq* req, int error)
+{
+ char n;
+ int rc;
+
+ rc = ProcXIQueryPointer(&client_request);
+ g_assert(rc == error);
+
+ if (rc == BadDevice)
+ g_assert(client_request.errorValue == req->deviceid);
+
+ client_request.swapped = TRUE;
+ swaps(&req->deviceid, n);
+ swaps(&req->length, n);
+ rc = SProcXIQueryPointer(&client_request);
+ g_assert(rc == error);
+
+ if (rc == BadDevice)
+ g_assert(client_request.errorValue == req->deviceid);
+}
+
+static void test_XIQueryPointer(void)
+{
+ int i;
+ xXIQueryPointerReq request;
+
+ memset(&request, 0, sizeof(request));
+
+ request_init(&request, XIQueryPointer);
+
+ reply_handler = reply_XIQueryPointer;
+
+ client_request = init_client(request.length, &request);
+
+ request.deviceid = XIAllDevices;
+ request_XIQueryPointer(&client_request, &request, BadDevice);
+
+ request.deviceid = XIAllMasterDevices;
+ request_XIQueryPointer(&client_request, &request, BadDevice);
+
+ request.win = root.drawable.id;
+ test_data.win = &root;
+
+ test_data.dev = devices.vcp;
+ request.deviceid = devices.vcp->id;
+ request_XIQueryPointer(&client_request, &request, Success);
+ request.deviceid = devices.vck->id;
+ request_XIQueryPointer(&client_request, &request, BadDevice);
+ request.deviceid = devices.mouse->id;
+ request_XIQueryPointer(&client_request, &request, BadDevice);
+ request.deviceid = devices.kbd->id;
+ request_XIQueryPointer(&client_request, &request, BadDevice);
+
+ test_data.dev = devices.mouse;
+ devices.mouse->master = NULL; /* Float, kind-of */
+ request.deviceid = devices.mouse->id;
+ request_XIQueryPointer(&client_request, &request, Success);
+
+ for (i = devices.kbd->id + 1; i <= 0xFFFF; i++)
+ {
+ request.deviceid = i;
+ request_XIQueryPointer(&client_request, &request, BadDevice);
+ }
+
+ request.win = window.drawable.id;
+
+ test_data.dev = devices.vcp;
+ test_data.win = &window;
+ request.deviceid = devices.vcp->id;
+ request_XIQueryPointer(&client_request, &request, Success);
+
+ test_data.dev = devices.mouse;
+ request.deviceid = devices.mouse->id;
+ request_XIQueryPointer(&client_request, &request, Success);
+}
+
+int main(int argc, char** argv)
+{
+ g_test_init(&argc, &argv,NULL);
+ g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
+
+ init_simple();
+
+ g_test_add_func("/xi2/protocol/XIQueryPointer", test_XIQueryPointer);
+
+ return g_test_run();
+}
diff --git a/xorg-server/test/xi2/protocol-xiwarppointer.c b/xorg-server/test/xi2/protocol-xiwarppointer.c
index 75b7617a0..98169b154 100644
--- a/xorg-server/test/xi2/protocol-xiwarppointer.c
+++ b/xorg-server/test/xi2/protocol-xiwarppointer.c
@@ -1,216 +1,216 @@
-/**
- * Copyright © 2009 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-/*
- * Protocol testing for XIWarpPointer request.
- */
-#include <stdint.h>
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/extensions/XI2proto.h>
-#include "inputstr.h"
-#include "windowstr.h"
-#include "scrnintstr.h"
-#include "xiwarppointer.h"
-#include "exevents.h"
-
-#include "protocol-common.h"
-#include <glib.h>
-
-static int expected_x = SPRITE_X;
-static int expected_y = SPRITE_Y;
-
-/* dixLookupWindow requires a lot of setup not necessary for this test.
- * Simple wrapper that returns either one of the fake root window or the
- * fake client window. If the requested ID is neither of those wanted,
- * return whatever the real dixLookupWindow does.
- */
-int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
-{
- if (id == root.drawable.id)
- {
- *win = &root;
- return Success;
- } else if (id == window.drawable.id)
- {
- *win = &window;
- return Success;
- }
-
- return __real_dixLookupWindow(win, id, client, access);
-}
-
-/**
- * This function overrides the one in the screen rec.
- */
-static Bool ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr screen,
- int x, int y, Bool generateEvent)
-{
- g_assert(x == expected_x);
- g_assert(y == expected_y);
- return TRUE;
-}
-
-
-static void request_XIWarpPointer(ClientPtr client, xXIWarpPointerReq* req,
- int error)
-{
- char n;
- int rc;
-
- rc = ProcXIWarpPointer(client);
- g_assert(rc == error);
-
- if (rc == BadDevice)
- g_assert(client->errorValue == req->deviceid);
- else if (rc == BadWindow)
- g_assert(client->errorValue == req->dst_win ||
- client->errorValue == req->src_win);
-
-
- client->swapped = TRUE;
-
- swapl(&req->src_win, n);
- swapl(&req->dst_win, n);
- swapl(&req->src_x, n);
- swapl(&req->src_y, n);
- swapl(&req->dst_x, n);
- swapl(&req->dst_y, n);
- swaps(&req->src_width, n);
- swaps(&req->src_height, n);
- swaps(&req->deviceid, n);
-
- rc = SProcXIWarpPointer(client);
- g_assert(rc == error);
-
- if (rc == BadDevice)
- g_assert(client->errorValue == req->deviceid);
- else if (rc == BadWindow)
- g_assert(client->errorValue == req->dst_win ||
- client->errorValue == req->src_win);
-
- client->swapped = FALSE;
-}
-
-static void test_XIWarpPointer(void)
-{
- int i;
- ClientRec client_request;
- xXIWarpPointerReq request;
-
- memset(&request, 0, sizeof(request));
-
- request_init(&request, XIWarpPointer);
-
- client_request = init_client(request.length, &request);
-
- request.deviceid = XIAllDevices;
- request_XIWarpPointer(&client_request, &request, BadDevice);
-
- request.deviceid = XIAllMasterDevices;
- request_XIWarpPointer(&client_request, &request, BadDevice);
-
- request.src_win = root.drawable.id;
- request.dst_win = root.drawable.id;
- request.deviceid = devices.vcp->id;
- request_XIWarpPointer(&client_request, &request, Success);
- request.deviceid = devices.vck->id;
- request_XIWarpPointer(&client_request, &request, BadDevice);
- request.deviceid = devices.mouse->id;
- request_XIWarpPointer(&client_request, &request, BadDevice);
- request.deviceid = devices.kbd->id;
- request_XIWarpPointer(&client_request, &request, BadDevice);
-
- devices.mouse->master = NULL; /* Float, kind-of */
- request.deviceid = devices.mouse->id;
- request_XIWarpPointer(&client_request, &request, Success);
-
- for (i = devices.kbd->id + 1; i <= 0xFFFF; i++)
- {
- request.deviceid = i;
- request_XIWarpPointer(&client_request, &request, BadDevice);
- }
-
- request.src_win = window.drawable.id;
- request.deviceid = devices.vcp->id;
- request_XIWarpPointer(&client_request, &request, Success);
-
- request.deviceid = devices.mouse->id;
- request_XIWarpPointer(&client_request, &request, Success);
-
- request.src_win = root.drawable.id;
- request.dst_win = 0xFFFF; /* invalid window */
- request_XIWarpPointer(&client_request, &request, BadWindow);
-
- request.src_win = 0xFFFF; /* invalid window */
- request.dst_win = root.drawable.id;
- request_XIWarpPointer(&client_request, &request, BadWindow);
-
- request.src_win = None;
- request.dst_win = None;
-
- request.dst_y = 0;
- expected_y = SPRITE_Y;
-
- request.dst_x = 1 << 16;
- expected_x = SPRITE_X + 1;
- request.deviceid = devices.vcp->id;
- request_XIWarpPointer(&client_request, &request, Success);
-
- request.dst_x = -1 << 16;
- expected_x = SPRITE_X - 1;
- request.deviceid = devices.vcp->id;
- request_XIWarpPointer(&client_request, &request, Success);
-
- request.dst_x = 0;
- expected_x = SPRITE_X;
-
- request.dst_y = 1 << 16;
- expected_y = SPRITE_Y + 1;
- request.deviceid = devices.vcp->id;
- request_XIWarpPointer(&client_request, &request, Success);
-
- request.dst_y = -1 << 16;
- expected_y = SPRITE_Y - 1;
- request.deviceid = devices.vcp->id;
- request_XIWarpPointer(&client_request, &request, Success);
-
- /* FIXME: src_x/y checks */
-}
-
-int main(int argc, char** argv)
-{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
- init_simple();
- screen.SetCursorPosition = ScreenSetCursorPosition;
-
- g_test_add_func("/xi2/protocol/XIWarpPointer", test_XIWarpPointer);
-
- return g_test_run();
-}
+/**
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+/*
+ * Protocol testing for XIWarpPointer request.
+ */
+#include <stdint.h>
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/extensions/XI2proto.h>
+#include "inputstr.h"
+#include "windowstr.h"
+#include "scrnintstr.h"
+#include "xiwarppointer.h"
+#include "exevents.h"
+
+#include "protocol-common.h"
+#include <glib.h>
+
+static int expected_x = SPRITE_X;
+static int expected_y = SPRITE_Y;
+
+/* dixLookupWindow requires a lot of setup not necessary for this test.
+ * Simple wrapper that returns either one of the fake root window or the
+ * fake client window. If the requested ID is neither of those wanted,
+ * return whatever the real dixLookupWindow does.
+ */
+int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
+{
+ if (id == root.drawable.id)
+ {
+ *win = &root;
+ return Success;
+ } else if (id == window.drawable.id)
+ {
+ *win = &window;
+ return Success;
+ }
+
+ return __real_dixLookupWindow(win, id, client, access);
+}
+
+/**
+ * This function overrides the one in the screen rec.
+ */
+static Bool ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr screen,
+ int x, int y, Bool generateEvent)
+{
+ g_assert(x == expected_x);
+ g_assert(y == expected_y);
+ return TRUE;
+}
+
+
+static void request_XIWarpPointer(ClientPtr client, xXIWarpPointerReq* req,
+ int error)
+{
+ char n;
+ int rc;
+
+ rc = ProcXIWarpPointer(client);
+ g_assert(rc == error);
+
+ if (rc == BadDevice)
+ g_assert(client->errorValue == req->deviceid);
+ else if (rc == BadWindow)
+ g_assert(client->errorValue == req->dst_win ||
+ client->errorValue == req->src_win);
+
+
+ client->swapped = TRUE;
+
+ swapl(&req->src_win, n);
+ swapl(&req->dst_win, n);
+ swapl(&req->src_x, n);
+ swapl(&req->src_y, n);
+ swapl(&req->dst_x, n);
+ swapl(&req->dst_y, n);
+ swaps(&req->src_width, n);
+ swaps(&req->src_height, n);
+ swaps(&req->deviceid, n);
+
+ rc = SProcXIWarpPointer(client);
+ g_assert(rc == error);
+
+ if (rc == BadDevice)
+ g_assert(client->errorValue == req->deviceid);
+ else if (rc == BadWindow)
+ g_assert(client->errorValue == req->dst_win ||
+ client->errorValue == req->src_win);
+
+ client->swapped = FALSE;
+}
+
+static void test_XIWarpPointer(void)
+{
+ int i;
+ ClientRec client_request;
+ xXIWarpPointerReq request;
+
+ memset(&request, 0, sizeof(request));
+
+ request_init(&request, XIWarpPointer);
+
+ client_request = init_client(request.length, &request);
+
+ request.deviceid = XIAllDevices;
+ request_XIWarpPointer(&client_request, &request, BadDevice);
+
+ request.deviceid = XIAllMasterDevices;
+ request_XIWarpPointer(&client_request, &request, BadDevice);
+
+ request.src_win = root.drawable.id;
+ request.dst_win = root.drawable.id;
+ request.deviceid = devices.vcp->id;
+ request_XIWarpPointer(&client_request, &request, Success);
+ request.deviceid = devices.vck->id;
+ request_XIWarpPointer(&client_request, &request, BadDevice);
+ request.deviceid = devices.mouse->id;
+ request_XIWarpPointer(&client_request, &request, BadDevice);
+ request.deviceid = devices.kbd->id;
+ request_XIWarpPointer(&client_request, &request, BadDevice);
+
+ devices.mouse->master = NULL; /* Float, kind-of */
+ request.deviceid = devices.mouse->id;
+ request_XIWarpPointer(&client_request, &request, Success);
+
+ for (i = devices.kbd->id + 1; i <= 0xFFFF; i++)
+ {
+ request.deviceid = i;
+ request_XIWarpPointer(&client_request, &request, BadDevice);
+ }
+
+ request.src_win = window.drawable.id;
+ request.deviceid = devices.vcp->id;
+ request_XIWarpPointer(&client_request, &request, Success);
+
+ request.deviceid = devices.mouse->id;
+ request_XIWarpPointer(&client_request, &request, Success);
+
+ request.src_win = root.drawable.id;
+ request.dst_win = 0xFFFF; /* invalid window */
+ request_XIWarpPointer(&client_request, &request, BadWindow);
+
+ request.src_win = 0xFFFF; /* invalid window */
+ request.dst_win = root.drawable.id;
+ request_XIWarpPointer(&client_request, &request, BadWindow);
+
+ request.src_win = None;
+ request.dst_win = None;
+
+ request.dst_y = 0;
+ expected_y = SPRITE_Y;
+
+ request.dst_x = 1 << 16;
+ expected_x = SPRITE_X + 1;
+ request.deviceid = devices.vcp->id;
+ request_XIWarpPointer(&client_request, &request, Success);
+
+ request.dst_x = -1 << 16;
+ expected_x = SPRITE_X - 1;
+ request.deviceid = devices.vcp->id;
+ request_XIWarpPointer(&client_request, &request, Success);
+
+ request.dst_x = 0;
+ expected_x = SPRITE_X;
+
+ request.dst_y = 1 << 16;
+ expected_y = SPRITE_Y + 1;
+ request.deviceid = devices.vcp->id;
+ request_XIWarpPointer(&client_request, &request, Success);
+
+ request.dst_y = -1 << 16;
+ expected_y = SPRITE_Y - 1;
+ request.deviceid = devices.vcp->id;
+ request_XIWarpPointer(&client_request, &request, Success);
+
+ /* FIXME: src_x/y checks */
+}
+
+int main(int argc, char** argv)
+{
+ g_test_init(&argc, &argv,NULL);
+ g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
+
+ init_simple();
+ screen.SetCursorPosition = ScreenSetCursorPosition;
+
+ g_test_add_func("/xi2/protocol/XIWarpPointer", test_XIWarpPointer);
+
+ return g_test_run();
+}
diff --git a/xorg-server/vcxsrv.sln b/xorg-server/vcxsrv.sln
new file mode 100644
index 000000000..a581eb181
--- /dev/null
+++ b/xorg-server/vcxsrv.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{911E67C6-3D85-4FCE-B560-20A9C3E3FF48}") = "vcxsrv", "vcxsrv.exe", "{0A7F2844-C7BA-43E2-B7AE-48070F7AA1A7}"
+ ProjectSection(DebuggerProjectSystem) = preProject
+ PortSupplier = 00000000-0000-0000-0000-000000000000
+ Executable = D:\vcxsrv x server\trunk\xorg-server\vcxsrv.exe
+ RemoteMachine = OAB1MAHAENEW
+ StartingDirectory = D:\vcxsrv x server\trunk\xorg-server
+ Environment = Default
+ LaunchingEngine = 00000000-0000-0000-0000-000000000000
+ LaunchSQLEngine = No
+ AttachLaunchAction = No
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Default = Debug|Default
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0A7F2844-C7BA-43E2-B7AE-48070F7AA1A7}.Debug|Default.ActiveCfg = Debug
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c
index 2cafb3087..a039d581d 100644
--- a/xorg-server/xfixes/cursor.c
+++ b/xorg-server/xfixes/cursor.c
@@ -43,6 +43,8 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#else
+#define XFIXES
#endif
#include "xfixesint.h"
diff --git a/xorg-server/xfixes/makefile b/xorg-server/xfixes/makefile
new file mode 100644
index 000000000..73df36c4e
--- /dev/null
+++ b/xorg-server/xfixes/makefile
@@ -0,0 +1,9 @@
+CSRCS = cursor.c \
+ region.c \
+ saveset.c \
+ select.c \
+ xfixes.c
+
+LIBRARY=libxfixes
+
+
diff --git a/xorg-server/xkb/XKBAlloc.c b/xorg-server/xkb/XKBAlloc.c
index b70ac1705..89ba5fb4a 100644
--- a/xorg-server/xkb/XKBAlloc.c
+++ b/xorg-server/xkb/XKBAlloc.c
@@ -1,354 +1,354 @@
-/************************************************************
-Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
-of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
-of this software for any purpose. It is provided "as is"
-without any express or implied warranty.
-
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "inputstr.h"
-#include <xkbsrv.h>
-#include "xkbgeom.h"
-#include <os.h>
-#include <string.h>
-
-/***===================================================================***/
-
-/*ARGSUSED*/
-Status
-XkbAllocCompatMap(XkbDescPtr xkb,unsigned which,unsigned nSI)
-{
-XkbCompatMapPtr compat;
-XkbSymInterpretRec *prev_interpret;
-
- if (!xkb)
- return BadMatch;
- if (xkb->compat) {
- if (xkb->compat->size_si>=nSI)
- return Success;
- compat= xkb->compat;
- compat->size_si= nSI;
- if (compat->sym_interpret==NULL)
- compat->num_si= 0;
- prev_interpret = compat->sym_interpret;
- compat->sym_interpret= realloc(compat->sym_interpret,
- nSI * sizeof(XkbSymInterpretRec));
- if (compat->sym_interpret==NULL) {
- free(prev_interpret);
- compat->size_si= compat->num_si= 0;
- return BadAlloc;
- }
- if (compat->num_si!=0) {
- memset(&compat->sym_interpret[compat->num_si], 0,
- (compat->size_si - compat->num_si) * sizeof(XkbSymInterpretRec));
- }
- return Success;
- }
- compat= calloc(1, sizeof(XkbCompatMapRec));
- if (compat==NULL)
- return BadAlloc;
- if (nSI>0) {
- compat->sym_interpret= calloc(nSI, sizeof(XkbSymInterpretRec));
- if (!compat->sym_interpret) {
- free(compat);
- return BadAlloc;
- }
- }
- compat->size_si= nSI;
- compat->num_si= 0;
- memset((char *)&compat->groups[0], 0, XkbNumKbdGroups*sizeof(XkbModsRec));
- xkb->compat= compat;
- return Success;
-}
-
-
-void
-XkbFreeCompatMap(XkbDescPtr xkb,unsigned which,Bool freeMap)
-{
-register XkbCompatMapPtr compat;
-
- if ((xkb==NULL)||(xkb->compat==NULL))
- return;
- compat= xkb->compat;
- if (freeMap)
- which= XkbAllCompatMask;
- if (which&XkbGroupCompatMask)
- memset((char *)&compat->groups[0], 0, XkbNumKbdGroups*sizeof(XkbModsRec));
- if (which&XkbSymInterpMask) {
- if ((compat->sym_interpret)&&(compat->size_si>0))
- free(compat->sym_interpret);
- compat->size_si= compat->num_si= 0;
- compat->sym_interpret= NULL;
- }
- if (freeMap) {
- free(compat);
- xkb->compat= NULL;
- }
- return;
-}
-
-/***===================================================================***/
-
-Status
-XkbAllocNames(XkbDescPtr xkb,unsigned which,int nTotalRG,int nTotalAliases)
-{
-XkbNamesPtr names;
-
- if (xkb==NULL)
- return BadMatch;
- if (xkb->names==NULL) {
- xkb->names = calloc(1, sizeof(XkbNamesRec));
- if (xkb->names==NULL)
- return BadAlloc;
- }
- names= xkb->names;
- if ((which&XkbKTLevelNamesMask)&&(xkb->map!=NULL)&&(xkb->map->types!=NULL)){
- register int i;
- XkbKeyTypePtr type;
-
- type= xkb->map->types;
- for (i=0;i<xkb->map->num_types;i++,type++) {
- if (type->level_names==NULL) {
- type->level_names= calloc(type->num_levels, sizeof(Atom));
- if (type->level_names==NULL)
- return BadAlloc;
- }
- }
- }
- if ((which&XkbKeyNamesMask)&&(names->keys==NULL)) {
- if ((!XkbIsLegalKeycode(xkb->min_key_code))||
- (!XkbIsLegalKeycode(xkb->max_key_code))||
- (xkb->max_key_code<xkb->min_key_code))
- return BadValue;
- names->keys= calloc((xkb->max_key_code+1), sizeof(XkbKeyNameRec));
- if (names->keys==NULL)
- return BadAlloc;
- }
- if ((which&XkbKeyAliasesMask)&&(nTotalAliases>0)) {
- if (names->key_aliases==NULL) {
- names->key_aliases= calloc(nTotalAliases, sizeof(XkbKeyAliasRec));
- }
- else if (nTotalAliases>names->num_key_aliases) {
- XkbKeyAliasRec *prev_aliases = names->key_aliases;
-
- names->key_aliases= realloc(names->key_aliases,
- nTotalAliases * sizeof(XkbKeyAliasRec));
- if (names->key_aliases!=NULL) {
- memset(&names->key_aliases[names->num_key_aliases], 0,
- (nTotalAliases - names->num_key_aliases) * sizeof(XkbKeyAliasRec));
- } else {
- free(prev_aliases);
- }
- }
- if (names->key_aliases==NULL) {
- names->num_key_aliases= 0;
- return BadAlloc;
- }
- names->num_key_aliases= nTotalAliases;
- }
- if ((which&XkbRGNamesMask)&&(nTotalRG>0)) {
- if (names->radio_groups==NULL) {
- names->radio_groups= calloc(nTotalRG, sizeof(Atom));
- }
- else if (nTotalRG>names->num_rg) {
- Atom *prev_radio_groups = names->radio_groups;
-
- names->radio_groups= realloc(names->radio_groups,
- nTotalRG * sizeof(Atom));
- if (names->radio_groups!=NULL) {
- memset(&names->radio_groups[names->num_rg], 0,
- (nTotalRG - names->num_rg) * sizeof(Atom));
- } else {
- free(prev_radio_groups);
- }
- }
- if (names->radio_groups==NULL)
- return BadAlloc;
- names->num_rg= nTotalRG;
- }
- return Success;
-}
-
-void
-XkbFreeNames(XkbDescPtr xkb,unsigned which,Bool freeMap)
-{
-XkbNamesPtr names;
-
- if ((xkb==NULL)||(xkb->names==NULL))
- return;
- names= xkb->names;
- if (freeMap)
- which= XkbAllNamesMask;
- if (which&XkbKTLevelNamesMask) {
- XkbClientMapPtr map= xkb->map;
- if ((map!=NULL)&&(map->types!=NULL)) {
- register int i;
- register XkbKeyTypePtr type;
- type= map->types;
- for (i=0;i<map->num_types;i++,type++) {
- free(type->level_names);
- type->level_names = NULL;
- }
- }
- }
- if ((which&XkbKeyNamesMask)&&(names->keys!=NULL)) {
- free(names->keys);
- names->keys= NULL;
- names->num_keys= 0;
- }
- if ((which&XkbKeyAliasesMask)&&(names->key_aliases)){
- free(names->key_aliases);
- names->key_aliases=NULL;
- names->num_key_aliases=0;
- }
- if ((which&XkbRGNamesMask)&&(names->radio_groups)) {
- free(names->radio_groups);
- names->radio_groups= NULL;
- names->num_rg= 0;
- }
- if (freeMap) {
- free(names);
- xkb->names= NULL;
- }
- return;
-}
-
-/***===================================================================***/
-
-/*ARGSUSED*/
-Status
-XkbAllocControls(XkbDescPtr xkb,unsigned which)
-{
- if (xkb==NULL)
- return BadMatch;
-
- if (xkb->ctrls==NULL) {
- xkb->ctrls= calloc(1, sizeof(XkbControlsRec));
- if (!xkb->ctrls)
- return BadAlloc;
- }
- return Success;
-}
-
-/*ARGSUSED*/
-static void
-XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap)
-{
- if (freeMap && (xkb!=NULL) && (xkb->ctrls!=NULL)) {
- free(xkb->ctrls);
- xkb->ctrls= NULL;
- }
- return;
-}
-
-/***===================================================================***/
-
-Status
-XkbAllocIndicatorMaps(XkbDescPtr xkb)
-{
- if (xkb==NULL)
- return BadMatch;
- if (xkb->indicators==NULL) {
- xkb->indicators= calloc(1, sizeof(XkbIndicatorRec));
- if (!xkb->indicators)
- return BadAlloc;
- }
- return Success;
-}
-
-static void
-XkbFreeIndicatorMaps(XkbDescPtr xkb)
-{
- if ((xkb!=NULL)&&(xkb->indicators!=NULL)) {
- free(xkb->indicators);
- xkb->indicators= NULL;
- }
- return;
-}
-
-/***====================================================================***/
-
-XkbDescRec *
-XkbAllocKeyboard(void)
-{
-XkbDescRec *xkb;
-
- xkb = calloc(1, sizeof(XkbDescRec));
- if (xkb)
- xkb->device_spec= XkbUseCoreKbd;
- return xkb;
-}
-
-void
-XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll)
-{
- if (xkb==NULL)
- return;
- if (freeAll)
- which= XkbAllComponentsMask;
- if (which&XkbClientMapMask)
- XkbFreeClientMap(xkb,XkbAllClientInfoMask,TRUE);
- if (which&XkbServerMapMask)
- XkbFreeServerMap(xkb,XkbAllServerInfoMask,TRUE);
- if (which&XkbCompatMapMask)
- XkbFreeCompatMap(xkb,XkbAllCompatMask,TRUE);
- if (which&XkbIndicatorMapMask)
- XkbFreeIndicatorMaps(xkb);
- if (which&XkbNamesMask)
- XkbFreeNames(xkb,XkbAllNamesMask,TRUE);
- if ((which&XkbGeometryMask) && (xkb->geom!=NULL)) {
- XkbFreeGeometry(xkb->geom,XkbGeomAllMask,TRUE);
- /* PERHAPS BONGHITS etc */
- xkb->geom = NULL;
- }
- if (which&XkbControlsMask)
- XkbFreeControls(xkb,XkbAllControlsMask,TRUE);
- if (freeAll)
- free(xkb);
- return;
-}
-
-
-/***====================================================================***/
-
-void
-XkbFreeComponentNames(XkbComponentNamesPtr names, Bool freeNames)
-{
- if (names)
- {
- free(names->keycodes);
- free(names->types);
- free(names->compat);
- free(names->symbols);
- free(names->geometry);
- memset(names, 0, sizeof(XkbComponentNamesRec));
- }
- if (freeNames)
- free(names);
-}
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdio.h>
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "inputstr.h"
+#include <xkbsrv.h>
+#include "xkbgeom.h"
+#include <os.h>
+#include <string.h>
+
+/***===================================================================***/
+
+/*ARGSUSED*/
+Status
+XkbAllocCompatMap(XkbDescPtr xkb,unsigned which,unsigned nSI)
+{
+XkbCompatMapPtr compat;
+XkbSymInterpretRec *prev_interpret;
+
+ if (!xkb)
+ return BadMatch;
+ if (xkb->compat) {
+ if (xkb->compat->size_si>=nSI)
+ return Success;
+ compat= xkb->compat;
+ compat->size_si= nSI;
+ if (compat->sym_interpret==NULL)
+ compat->num_si= 0;
+ prev_interpret = compat->sym_interpret;
+ compat->sym_interpret= realloc(compat->sym_interpret,
+ nSI * sizeof(XkbSymInterpretRec));
+ if (compat->sym_interpret==NULL) {
+ free(prev_interpret);
+ compat->size_si= compat->num_si= 0;
+ return BadAlloc;
+ }
+ if (compat->num_si!=0) {
+ memset(&compat->sym_interpret[compat->num_si], 0,
+ (compat->size_si - compat->num_si) * sizeof(XkbSymInterpretRec));
+ }
+ return Success;
+ }
+ compat= calloc(1, sizeof(XkbCompatMapRec));
+ if (compat==NULL)
+ return BadAlloc;
+ if (nSI>0) {
+ compat->sym_interpret= calloc(nSI, sizeof(XkbSymInterpretRec));
+ if (!compat->sym_interpret) {
+ free(compat);
+ return BadAlloc;
+ }
+ }
+ compat->size_si= nSI;
+ compat->num_si= 0;
+ memset((char *)&compat->groups[0], 0, XkbNumKbdGroups*sizeof(XkbModsRec));
+ xkb->compat= compat;
+ return Success;
+}
+
+
+void
+XkbFreeCompatMap(XkbDescPtr xkb,unsigned which,Bool freeMap)
+{
+register XkbCompatMapPtr compat;
+
+ if ((xkb==NULL)||(xkb->compat==NULL))
+ return;
+ compat= xkb->compat;
+ if (freeMap)
+ which= XkbAllCompatMask;
+ if (which&XkbGroupCompatMask)
+ memset((char *)&compat->groups[0], 0, XkbNumKbdGroups*sizeof(XkbModsRec));
+ if (which&XkbSymInterpMask) {
+ if ((compat->sym_interpret)&&(compat->size_si>0))
+ free(compat->sym_interpret);
+ compat->size_si= compat->num_si= 0;
+ compat->sym_interpret= NULL;
+ }
+ if (freeMap) {
+ free(compat);
+ xkb->compat= NULL;
+ }
+ return;
+}
+
+/***===================================================================***/
+
+Status
+XkbAllocNames(XkbDescPtr xkb,unsigned which,int nTotalRG,int nTotalAliases)
+{
+XkbNamesPtr names;
+
+ if (xkb==NULL)
+ return BadMatch;
+ if (xkb->names==NULL) {
+ xkb->names = calloc(1, sizeof(XkbNamesRec));
+ if (xkb->names==NULL)
+ return BadAlloc;
+ }
+ names= xkb->names;
+ if ((which&XkbKTLevelNamesMask)&&(xkb->map!=NULL)&&(xkb->map->types!=NULL)){
+ register int i;
+ XkbKeyTypePtr type;
+
+ type= xkb->map->types;
+ for (i=0;i<xkb->map->num_types;i++,type++) {
+ if (type->level_names==NULL) {
+ type->level_names= calloc(type->num_levels, sizeof(Atom));
+ if (type->level_names==NULL)
+ return BadAlloc;
+ }
+ }
+ }
+ if ((which&XkbKeyNamesMask)&&(names->keys==NULL)) {
+ if ((!XkbIsLegalKeycode(xkb->min_key_code))||
+ (!XkbIsLegalKeycode(xkb->max_key_code))||
+ (xkb->max_key_code<xkb->min_key_code))
+ return BadValue;
+ names->keys= calloc((xkb->max_key_code+1), sizeof(XkbKeyNameRec));
+ if (names->keys==NULL)
+ return BadAlloc;
+ }
+ if ((which&XkbKeyAliasesMask)&&(nTotalAliases>0)) {
+ if (names->key_aliases==NULL) {
+ names->key_aliases= calloc(nTotalAliases, sizeof(XkbKeyAliasRec));
+ }
+ else if (nTotalAliases>names->num_key_aliases) {
+ XkbKeyAliasRec *prev_aliases = names->key_aliases;
+
+ names->key_aliases= realloc(names->key_aliases,
+ nTotalAliases * sizeof(XkbKeyAliasRec));
+ if (names->key_aliases!=NULL) {
+ memset(&names->key_aliases[names->num_key_aliases], 0,
+ (nTotalAliases - names->num_key_aliases) * sizeof(XkbKeyAliasRec));
+ } else {
+ free(prev_aliases);
+ }
+ }
+ if (names->key_aliases==NULL) {
+ names->num_key_aliases= 0;
+ return BadAlloc;
+ }
+ names->num_key_aliases= nTotalAliases;
+ }
+ if ((which&XkbRGNamesMask)&&(nTotalRG>0)) {
+ if (names->radio_groups==NULL) {
+ names->radio_groups= calloc(nTotalRG, sizeof(Atom));
+ }
+ else if (nTotalRG>names->num_rg) {
+ Atom *prev_radio_groups = names->radio_groups;
+
+ names->radio_groups= realloc(names->radio_groups,
+ nTotalRG * sizeof(Atom));
+ if (names->radio_groups!=NULL) {
+ memset(&names->radio_groups[names->num_rg], 0,
+ (nTotalRG - names->num_rg) * sizeof(Atom));
+ } else {
+ free(prev_radio_groups);
+ }
+ }
+ if (names->radio_groups==NULL)
+ return BadAlloc;
+ names->num_rg= nTotalRG;
+ }
+ return Success;
+}
+
+void
+XkbFreeNames(XkbDescPtr xkb,unsigned which,Bool freeMap)
+{
+XkbNamesPtr names;
+
+ if ((xkb==NULL)||(xkb->names==NULL))
+ return;
+ names= xkb->names;
+ if (freeMap)
+ which= XkbAllNamesMask;
+ if (which&XkbKTLevelNamesMask) {
+ XkbClientMapPtr map= xkb->map;
+ if ((map!=NULL)&&(map->types!=NULL)) {
+ register int i;
+ register XkbKeyTypePtr type;
+ type= map->types;
+ for (i=0;i<map->num_types;i++,type++) {
+ free(type->level_names);
+ type->level_names = NULL;
+ }
+ }
+ }
+ if ((which&XkbKeyNamesMask)&&(names->keys!=NULL)) {
+ free(names->keys);
+ names->keys= NULL;
+ names->num_keys= 0;
+ }
+ if ((which&XkbKeyAliasesMask)&&(names->key_aliases)){
+ free(names->key_aliases);
+ names->key_aliases=NULL;
+ names->num_key_aliases=0;
+ }
+ if ((which&XkbRGNamesMask)&&(names->radio_groups)) {
+ free(names->radio_groups);
+ names->radio_groups= NULL;
+ names->num_rg= 0;
+ }
+ if (freeMap) {
+ free(names);
+ xkb->names= NULL;
+ }
+ return;
+}
+
+/***===================================================================***/
+
+/*ARGSUSED*/
+Status
+XkbAllocControls(XkbDescPtr xkb,unsigned which)
+{
+ if (xkb==NULL)
+ return BadMatch;
+
+ if (xkb->ctrls==NULL) {
+ xkb->ctrls= calloc(1, sizeof(XkbControlsRec));
+ if (!xkb->ctrls)
+ return BadAlloc;
+ }
+ return Success;
+}
+
+/*ARGSUSED*/
+static void
+XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap)
+{
+ if (freeMap && (xkb!=NULL) && (xkb->ctrls!=NULL)) {
+ free(xkb->ctrls);
+ xkb->ctrls= NULL;
+ }
+ return;
+}
+
+/***===================================================================***/
+
+Status
+XkbAllocIndicatorMaps(XkbDescPtr xkb)
+{
+ if (xkb==NULL)
+ return BadMatch;
+ if (xkb->indicators==NULL) {
+ xkb->indicators= calloc(1, sizeof(XkbIndicatorRec));
+ if (!xkb->indicators)
+ return BadAlloc;
+ }
+ return Success;
+}
+
+static void
+XkbFreeIndicatorMaps(XkbDescPtr xkb)
+{
+ if ((xkb!=NULL)&&(xkb->indicators!=NULL)) {
+ free(xkb->indicators);
+ xkb->indicators= NULL;
+ }
+ return;
+}
+
+/***====================================================================***/
+
+XkbDescRec *
+XkbAllocKeyboard(void)
+{
+XkbDescRec *xkb;
+
+ xkb = calloc(1, sizeof(XkbDescRec));
+ if (xkb)
+ xkb->device_spec= XkbUseCoreKbd;
+ return xkb;
+}
+
+void
+XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll)
+{
+ if (xkb==NULL)
+ return;
+ if (freeAll)
+ which= XkbAllComponentsMask;
+ if (which&XkbClientMapMask)
+ XkbFreeClientMap(xkb,XkbAllClientInfoMask,TRUE);
+ if (which&XkbServerMapMask)
+ XkbFreeServerMap(xkb,XkbAllServerInfoMask,TRUE);
+ if (which&XkbCompatMapMask)
+ XkbFreeCompatMap(xkb,XkbAllCompatMask,TRUE);
+ if (which&XkbIndicatorMapMask)
+ XkbFreeIndicatorMaps(xkb);
+ if (which&XkbNamesMask)
+ XkbFreeNames(xkb,XkbAllNamesMask,TRUE);
+ if ((which&XkbGeometryMask) && (xkb->geom!=NULL)) {
+ XkbFreeGeometry(xkb->geom,XkbGeomAllMask,TRUE);
+ /* PERHAPS BONGHITS etc */
+ xkb->geom = NULL;
+ }
+ if (which&XkbControlsMask)
+ XkbFreeControls(xkb,XkbAllControlsMask,TRUE);
+ if (freeAll)
+ free(xkb);
+ return;
+}
+
+
+/***====================================================================***/
+
+void
+XkbFreeComponentNames(XkbComponentNamesPtr names, Bool freeNames)
+{
+ if (names)
+ {
+ free(names->keycodes);
+ free(names->types);
+ free(names->compat);
+ free(names->symbols);
+ free(names->geometry);
+ memset(names, 0, sizeof(XkbComponentNamesRec));
+ }
+ if (freeNames)
+ free(names);
+}
diff --git a/xorg-server/xkb/XKBGAlloc.c b/xorg-server/xkb/XKBGAlloc.c
index 65f92fdba..db32dc8c5 100644
--- a/xorg-server/xkb/XKBGAlloc.c
+++ b/xorg-server/xkb/XKBGAlloc.c
@@ -1,974 +1,974 @@
-/************************************************************
-Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
-of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
-of this software for any purpose. It is provided "as is"
-without any express or implied warranty.
-
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-
-#include <stdio.h>
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "inputstr.h"
-#include <xkbsrv.h>
-#include "xkbgeom.h"
-
-/***====================================================================***/
-
-static void
-_XkbFreeGeomLeafElems( Bool freeAll,
- int first,
- int count,
- unsigned short * num_inout,
- unsigned short * sz_inout,
- char ** elems,
- unsigned int elem_sz)
-{
- if ((freeAll)||(*elems==NULL)) {
- *num_inout= *sz_inout= 0;
- free(*elems);
- *elems = NULL;
- return;
- }
-
- if ((first>=(*num_inout))||(first<0)||(count<1))
- return;
-
- if (first+count>=(*num_inout)) {
- /* truncating the array is easy */
- (*num_inout)= first;
- }
- else {
- char * ptr;
- int extra;
- ptr= *elems;
- extra= ((*num_inout)-(first+count))*elem_sz;
- if (extra>0)
- memmove(&ptr[first*elem_sz],&ptr[(first+count)*elem_sz],extra);
- (*num_inout)-= count;
- }
- return;
-}
-
-typedef void (*ContentsClearFunc)(
- char * /* priv */
-);
-
-static void
-_XkbFreeGeomNonLeafElems( Bool freeAll,
- int first,
- int count,
- unsigned short * num_inout,
- unsigned short * sz_inout,
- char ** elems,
- unsigned int elem_sz,
- ContentsClearFunc freeFunc)
-{
-register int i;
-register char *ptr;
-
- if (freeAll) {
- first= 0;
- count= (*num_inout);
- }
- else if ((first>=(*num_inout))||(first<0)||(count<1))
- return;
- else if (first+count>(*num_inout))
- count= (*num_inout)-first;
- if (*elems==NULL)
- return;
-
- if (freeFunc) {
- ptr= *elems;
- ptr+= first*elem_sz;
- for (i=0;i<count;i++) {
- (*freeFunc)(ptr);
- ptr+= elem_sz;
- }
- }
- if (freeAll) {
- (*num_inout)= (*sz_inout)= 0;
- free(*elems);
- *elems = NULL;
- }
- else if (first+count>=(*num_inout))
- *num_inout= first;
- else {
- i= ((*num_inout)-(first+count))*elem_sz;
- ptr= *elems;
- memmove(&ptr[first*elem_sz],&ptr[(first+count)*elem_sz],i);
- (*num_inout)-= count;
- }
- return;
-}
-
-/***====================================================================***/
-
-static void
-_XkbClearProperty(char *prop_in)
-{
-XkbPropertyPtr prop= (XkbPropertyPtr)prop_in;
-
- free(prop->name);
- prop->name = NULL;
- free(prop->value);
- prop->value = NULL;
- return;
-}
-
-void
-XkbFreeGeomProperties( XkbGeometryPtr geom,
- int first,
- int count,
- Bool freeAll)
-{
- _XkbFreeGeomNonLeafElems(freeAll,first,count,
- &geom->num_properties,&geom->sz_properties,
- (char **)&geom->properties,
- sizeof(XkbPropertyRec),_XkbClearProperty);
- return;
-}
-
-/***====================================================================***/
-
-void
-XkbFreeGeomKeyAliases( XkbGeometryPtr geom,
- int first,
- int count,
- Bool freeAll)
-{
- _XkbFreeGeomLeafElems(freeAll,first,count,
- &geom->num_key_aliases,&geom->sz_key_aliases,
- (char **)&geom->key_aliases,
- sizeof(XkbKeyAliasRec));
- return;
-}
-
-/***====================================================================***/
-
-static void
-_XkbClearColor(char *color_in)
-{
-XkbColorPtr color= (XkbColorPtr)color_in;
-
- free(color->spec);
- return;
-}
-
-void
-XkbFreeGeomColors(XkbGeometryPtr geom,int first,int count,Bool freeAll)
-{
- _XkbFreeGeomNonLeafElems(freeAll,first,count,
- &geom->num_colors,&geom->sz_colors,
- (char **)&geom->colors,
- sizeof(XkbColorRec),_XkbClearColor);
- return;
-}
-
-/***====================================================================***/
-
-void
-XkbFreeGeomPoints(XkbOutlinePtr outline,int first,int count,Bool freeAll)
-{
- _XkbFreeGeomLeafElems(freeAll,first,count,
- &outline->num_points,&outline->sz_points,
- (char **)&outline->points,
- sizeof(XkbPointRec));
- return;
-}
-
-/***====================================================================***/
-
-static void
-_XkbClearOutline(char *outline_in)
-{
-XkbOutlinePtr outline= (XkbOutlinePtr)outline_in;
-
- if (outline->points!=NULL)
- XkbFreeGeomPoints(outline,0,outline->num_points,TRUE);
- return;
-}
-
-void
-XkbFreeGeomOutlines(XkbShapePtr shape,int first,int count,Bool freeAll)
-{
- _XkbFreeGeomNonLeafElems(freeAll,first,count,
- &shape->num_outlines,&shape->sz_outlines,
- (char **)&shape->outlines,
- sizeof(XkbOutlineRec),_XkbClearOutline);
-
- return;
-}
-
-/***====================================================================***/
-
-static void
-_XkbClearShape(char *shape_in)
-{
-XkbShapePtr shape= (XkbShapePtr)shape_in;
-
- if (shape->outlines)
- XkbFreeGeomOutlines(shape,0,shape->num_outlines,TRUE);
- return;
-}
-
-void
-XkbFreeGeomShapes(XkbGeometryPtr geom,int first,int count,Bool freeAll)
-{
- _XkbFreeGeomNonLeafElems(freeAll,first,count,
- &geom->num_shapes,&geom->sz_shapes,
- (char **)&geom->shapes,
- sizeof(XkbShapeRec),_XkbClearShape);
- return;
-}
-
-/***====================================================================***/
-
-void
-XkbFreeGeomOverlayKeys(XkbOverlayRowPtr row,int first,int count,Bool freeAll)
-{
- _XkbFreeGeomLeafElems(freeAll,first,count,
- &row->num_keys,&row->sz_keys,
- (char **)&row->keys,
- sizeof(XkbOverlayKeyRec));
- return;
-}
-
-/***====================================================================***/
-
-static void
-_XkbClearOverlayRow(char *row_in)
-{
-XkbOverlayRowPtr row= (XkbOverlayRowPtr)row_in;
-
- if (row->keys!=NULL)
- XkbFreeGeomOverlayKeys(row,0,row->num_keys,TRUE);
- return;
-}
-
-void
-XkbFreeGeomOverlayRows(XkbOverlayPtr overlay,int first,int count,Bool freeAll)
-{
- _XkbFreeGeomNonLeafElems(freeAll,first,count,
- &overlay->num_rows,&overlay->sz_rows,
- (char **)&overlay->rows,
- sizeof(XkbOverlayRowRec),_XkbClearOverlayRow);
- return;
-}
-
-/***====================================================================***/
-
-static void
-_XkbClearOverlay(char *overlay_in)
-{
-XkbOverlayPtr overlay= (XkbOverlayPtr)overlay_in;
-
- if (overlay->rows!=NULL)
- XkbFreeGeomOverlayRows(overlay,0,overlay->num_rows,TRUE);
- return;
-}
-
-void
-XkbFreeGeomOverlays(XkbSectionPtr section,int first,int count,Bool freeAll)
-{
- _XkbFreeGeomNonLeafElems(freeAll,first,count,
- &section->num_overlays,&section->sz_overlays,
- (char **)&section->overlays,
- sizeof(XkbOverlayRec),_XkbClearOverlay);
- return;
-}
-
-/***====================================================================***/
-
-void
-XkbFreeGeomKeys(XkbRowPtr row,int first,int count,Bool freeAll)
-{
- _XkbFreeGeomLeafElems(freeAll,first,count,
- &row->num_keys,&row->sz_keys,
- (char **)&row->keys,
- sizeof(XkbKeyRec));
- return;
-}
-
-/***====================================================================***/
-
-static void
-_XkbClearRow(char *row_in)
-{
-XkbRowPtr row= (XkbRowPtr)row_in;
-
- if (row->keys!=NULL)
- XkbFreeGeomKeys(row,0,row->num_keys,TRUE);
- return;
-}
-
-void
-XkbFreeGeomRows(XkbSectionPtr section,int first,int count,Bool freeAll)
-{
- _XkbFreeGeomNonLeafElems(freeAll,first,count,
- &section->num_rows,&section->sz_rows,
- (char **)&section->rows,
- sizeof(XkbRowRec),_XkbClearRow);
-}
-
-/***====================================================================***/
-
-static void
-_XkbClearSection(char *section_in)
-{
-XkbSectionPtr section= (XkbSectionPtr)section_in;
-
- if (section->rows!=NULL)
- XkbFreeGeomRows(section,0,section->num_rows,TRUE);
- if (section->doodads!=NULL) {
- XkbFreeGeomDoodads(section->doodads,section->num_doodads,TRUE);
- section->doodads= NULL;
- }
- return;
-}
-
-void
-XkbFreeGeomSections(XkbGeometryPtr geom,int first,int count,Bool freeAll)
-{
- _XkbFreeGeomNonLeafElems(freeAll,first,count,
- &geom->num_sections,&geom->sz_sections,
- (char **)&geom->sections,
- sizeof(XkbSectionRec),_XkbClearSection);
- return;
-}
-
-/***====================================================================***/
-
-static void
-_XkbClearDoodad(char *doodad_in)
-{
-XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in;
-
- switch (doodad->any.type) {
- case XkbTextDoodad:
- {
- free(doodad->text.text);
- doodad->text.text = NULL;
- free(doodad->text.font);
- doodad->text.font = NULL;
- }
- break;
- case XkbLogoDoodad:
- {
- free(doodad->logo.logo_name);
- doodad->logo.logo_name = NULL;
- }
- break;
- }
- return;
-}
-
-void
-XkbFreeGeomDoodads(XkbDoodadPtr doodads,int nDoodads,Bool freeAll)
-{
-register int i;
-register XkbDoodadPtr doodad;
-
- if (doodads) {
- for (i=0,doodad= doodads;i<nDoodads;i++,doodad++) {
- _XkbClearDoodad((char *)doodad);
- }
- if (freeAll)
- free(doodads);
- }
- return;
-}
-
-void
-XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap)
-{
- if (geom==NULL)
- return;
- if (freeMap)
- which= XkbGeomAllMask;
- if ((which&XkbGeomPropertiesMask)&&(geom->properties!=NULL))
- XkbFreeGeomProperties(geom,0,geom->num_properties,TRUE);
- if ((which&XkbGeomColorsMask)&&(geom->colors!=NULL))
- XkbFreeGeomColors(geom,0,geom->num_colors,TRUE);
- if ((which&XkbGeomShapesMask)&&(geom->shapes!=NULL))
- XkbFreeGeomShapes(geom,0,geom->num_shapes,TRUE);
- if ((which&XkbGeomSectionsMask)&&(geom->sections!=NULL))
- XkbFreeGeomSections(geom,0,geom->num_sections,TRUE);
- if ((which&XkbGeomDoodadsMask)&&(geom->doodads!= NULL)) {
- XkbFreeGeomDoodads(geom->doodads,geom->num_doodads,TRUE);
- geom->doodads= NULL;
- geom->num_doodads= geom->sz_doodads= 0;
- }
- if ((which&XkbGeomKeyAliasesMask)&&(geom->key_aliases!=NULL))
- XkbFreeGeomKeyAliases(geom,0,geom->num_key_aliases,TRUE);
- if (freeMap) {
- free(geom->label_font);
- geom->label_font = NULL;
- free(geom);
- }
- return;
-}
-
-/***====================================================================***/
-
-static Status
-_XkbGeomAlloc( void ** old,
- unsigned short * num,
- unsigned short * total,
- int num_new,
- size_t sz_elem)
-{
- if (num_new<1)
- return Success;
- if ((*old)==NULL)
- *num= *total= 0;
-
- if ((*num)+num_new<=(*total))
- return Success;
-
- *total= (*num)+num_new;
- if ((*old)!=NULL)
- (*old)= realloc((*old),(*total)*sz_elem);
- else (*old)= calloc((*total),sz_elem);
- if ((*old)==NULL) {
- *total= *num= 0;
- return BadAlloc;
- }
-
- if (*num>0) {
- char *tmp= (char *)(*old);
- memset(&tmp[sz_elem*(*num)], 0, (num_new*sz_elem));
- }
- return Success;
-}
-
-#define _XkbAllocProps(g,n) _XkbGeomAlloc((void *)&(g)->properties,\
- &(g)->num_properties,&(g)->sz_properties,\
- (n),sizeof(XkbPropertyRec))
-#define _XkbAllocColors(g,n) _XkbGeomAlloc((void *)&(g)->colors,\
- &(g)->num_colors,&(g)->sz_colors,\
- (n),sizeof(XkbColorRec))
-#define _XkbAllocShapes(g,n) _XkbGeomAlloc((void *)&(g)->shapes,\
- &(g)->num_shapes,&(g)->sz_shapes,\
- (n),sizeof(XkbShapeRec))
-#define _XkbAllocSections(g,n) _XkbGeomAlloc((void *)&(g)->sections,\
- &(g)->num_sections,&(g)->sz_sections,\
- (n),sizeof(XkbSectionRec))
-#define _XkbAllocDoodads(g,n) _XkbGeomAlloc((void *)&(g)->doodads,\
- &(g)->num_doodads,&(g)->sz_doodads,\
- (n),sizeof(XkbDoodadRec))
-#define _XkbAllocKeyAliases(g,n) _XkbGeomAlloc((void *)&(g)->key_aliases,\
- &(g)->num_key_aliases,&(g)->sz_key_aliases,\
- (n),sizeof(XkbKeyAliasRec))
-
-#define _XkbAllocOutlines(s,n) _XkbGeomAlloc((void *)&(s)->outlines,\
- &(s)->num_outlines,&(s)->sz_outlines,\
- (n),sizeof(XkbOutlineRec))
-#define _XkbAllocRows(s,n) _XkbGeomAlloc((void *)&(s)->rows,\
- &(s)->num_rows,&(s)->sz_rows,\
- (n),sizeof(XkbRowRec))
-#define _XkbAllocPoints(o,n) _XkbGeomAlloc((void *)&(o)->points,\
- &(o)->num_points,&(o)->sz_points,\
- (n),sizeof(XkbPointRec))
-#define _XkbAllocKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\
- &(r)->num_keys,&(r)->sz_keys,\
- (n),sizeof(XkbKeyRec))
-#define _XkbAllocOverlays(s,n) _XkbGeomAlloc((void *)&(s)->overlays,\
- &(s)->num_overlays,&(s)->sz_overlays,\
- (n),sizeof(XkbOverlayRec))
-#define _XkbAllocOverlayRows(o,n) _XkbGeomAlloc((void *)&(o)->rows,\
- &(o)->num_rows,&(o)->sz_rows,\
- (n),sizeof(XkbOverlayRowRec))
-#define _XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\
- &(r)->num_keys,&(r)->sz_keys,\
- (n),sizeof(XkbOverlayKeyRec))
-
-Status
-XkbAllocGeomProps(XkbGeometryPtr geom,int nProps)
-{
- return _XkbAllocProps(geom,nProps);
-}
-
-Status
-XkbAllocGeomColors(XkbGeometryPtr geom,int nColors)
-{
- return _XkbAllocColors(geom,nColors);
-}
-
-Status
-XkbAllocGeomKeyAliases(XkbGeometryPtr geom,int nKeyAliases)
-{
- return _XkbAllocKeyAliases(geom,nKeyAliases);
-}
-
-Status
-XkbAllocGeomShapes(XkbGeometryPtr geom,int nShapes)
-{
- return _XkbAllocShapes(geom,nShapes);
-}
-
-Status
-XkbAllocGeomSections(XkbGeometryPtr geom,int nSections)
-{
- return _XkbAllocSections(geom,nSections);
-}
-
-Status
-XkbAllocGeomOverlays(XkbSectionPtr section,int nOverlays)
-{
- return _XkbAllocOverlays(section,nOverlays);
-}
-
-Status
-XkbAllocGeomOverlayRows(XkbOverlayPtr overlay,int nRows)
-{
- return _XkbAllocOverlayRows(overlay,nRows);
-}
-
-Status
-XkbAllocGeomOverlayKeys(XkbOverlayRowPtr row,int nKeys)
-{
- return _XkbAllocOverlayKeys(row,nKeys);
-}
-
-Status
-XkbAllocGeomDoodads(XkbGeometryPtr geom,int nDoodads)
-{
- return _XkbAllocDoodads(geom,nDoodads);
-}
-
-Status
-XkbAllocGeomSectionDoodads(XkbSectionPtr section,int nDoodads)
-{
- return _XkbAllocDoodads(section,nDoodads);
-}
-
-Status
-XkbAllocGeomOutlines(XkbShapePtr shape,int nOL)
-{
- return _XkbAllocOutlines(shape,nOL);
-}
-
-Status
-XkbAllocGeomRows(XkbSectionPtr section,int nRows)
-{
- return _XkbAllocRows(section,nRows);
-}
-
-Status
-XkbAllocGeomPoints(XkbOutlinePtr ol,int nPts)
-{
- return _XkbAllocPoints(ol,nPts);
-}
-
-Status
-XkbAllocGeomKeys(XkbRowPtr row,int nKeys)
-{
- return _XkbAllocKeys(row,nKeys);
-}
-
-Status
-XkbAllocGeometry(XkbDescPtr xkb,XkbGeometrySizesPtr sizes)
-{
-XkbGeometryPtr geom;
-Status rtrn;
-
- if (xkb->geom==NULL) {
- xkb->geom= calloc(1, sizeof(XkbGeometryRec));
- if (!xkb->geom)
- return BadAlloc;
- }
- geom= xkb->geom;
- if ((sizes->which&XkbGeomPropertiesMask)&&
- ((rtrn=_XkbAllocProps(geom,sizes->num_properties))!=Success)) {
- goto BAIL;
- }
- if ((sizes->which&XkbGeomColorsMask)&&
- ((rtrn=_XkbAllocColors(geom,sizes->num_colors))!=Success)) {
- goto BAIL;
- }
- if ((sizes->which&XkbGeomShapesMask)&&
- ((rtrn=_XkbAllocShapes(geom,sizes->num_shapes))!=Success)) {
- goto BAIL;
- }
- if ((sizes->which&XkbGeomSectionsMask)&&
- ((rtrn=_XkbAllocSections(geom,sizes->num_sections))!=Success)) {
- goto BAIL;
- }
- if ((sizes->which&XkbGeomDoodadsMask)&&
- ((rtrn=_XkbAllocDoodads(geom,sizes->num_doodads))!=Success)) {
- goto BAIL;
- }
- if ((sizes->which&XkbGeomKeyAliasesMask)&&
- ((rtrn=_XkbAllocKeyAliases(geom,sizes->num_key_aliases))!=Success)) {
- goto BAIL;
- }
- return Success;
-BAIL:
- XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
- xkb->geom= NULL;
- return rtrn;
-}
-
-/***====================================================================***/
-
-XkbPropertyPtr
-XkbAddGeomProperty(XkbGeometryPtr geom,char *name,char *value)
-{
-register int i;
-register XkbPropertyPtr prop;
-
- if ((!geom)||(!name)||(!value))
- return NULL;
- for (i=0,prop=geom->properties;i<geom->num_properties;i++,prop++) {
- if ((prop->name)&&(strcmp(name,prop->name)==0)) {
- free(prop->value);
- prop->value= strdup(value);
- return prop;
- }
- }
- if ((geom->num_properties>=geom->sz_properties)&&
- (_XkbAllocProps(geom,1)!=Success)) {
- return NULL;
- }
- prop= &geom->properties[geom->num_properties];
- prop->name= strdup(name);
- if (!prop->name)
- return NULL;
- prop->value= strdup(value);
- if (!prop->value) {
- free(prop->name);
- prop->name= NULL;
- return NULL;
- }
- geom->num_properties++;
- return prop;
-}
-
-XkbKeyAliasPtr
-XkbAddGeomKeyAlias(XkbGeometryPtr geom,char *aliasStr,char *realStr)
-{
-register int i;
-register XkbKeyAliasPtr alias;
-
- if ((!geom)||(!aliasStr)||(!realStr)||(!aliasStr[0])||(!realStr[0]))
- return NULL;
- for (i=0,alias=geom->key_aliases;i<geom->num_key_aliases;i++,alias++) {
- if (strncmp(alias->alias,aliasStr,XkbKeyNameLength)==0) {
- memset(alias->real, 0, XkbKeyNameLength);
- strncpy(alias->real,realStr,XkbKeyNameLength);
- return alias;
- }
- }
- if ((geom->num_key_aliases>=geom->sz_key_aliases)&&
- (_XkbAllocKeyAliases(geom,1)!=Success)) {
- return NULL;
- }
- alias= &geom->key_aliases[geom->num_key_aliases];
- memset(alias, 0, sizeof(XkbKeyAliasRec));
- strncpy(alias->alias,aliasStr,XkbKeyNameLength);
- strncpy(alias->real,realStr,XkbKeyNameLength);
- geom->num_key_aliases++;
- return alias;
-}
-
-XkbColorPtr
-XkbAddGeomColor(XkbGeometryPtr geom,char *spec,unsigned int pixel)
-{
-register int i;
-register XkbColorPtr color;
-
- if ((!geom)||(!spec))
- return NULL;
- for (i=0,color=geom->colors;i<geom->num_colors;i++,color++) {
- if ((color->spec)&&(strcmp(color->spec,spec)==0)) {
- color->pixel= pixel;
- return color;
- }
- }
- if ((geom->num_colors>=geom->sz_colors)&&
- (_XkbAllocColors(geom,1)!=Success)) {
- return NULL;
- }
- color= &geom->colors[geom->num_colors];
- color->pixel= pixel;
- color->spec= strdup(spec);
- if (!color->spec)
- return NULL;
- geom->num_colors++;
- return color;
-}
-
-XkbOutlinePtr
-XkbAddGeomOutline(XkbShapePtr shape,int sz_points)
-{
-XkbOutlinePtr outline;
-
- if ((!shape)||(sz_points<0))
- return NULL;
- if ((shape->num_outlines>=shape->sz_outlines)&&
- (_XkbAllocOutlines(shape,1)!=Success)) {
- return NULL;
- }
- outline= &shape->outlines[shape->num_outlines];
- memset(outline, 0, sizeof(XkbOutlineRec));
- if ((sz_points>0)&&(_XkbAllocPoints(outline,sz_points)!=Success))
- return NULL;
- shape->num_outlines++;
- return outline;
-}
-
-XkbShapePtr
-XkbAddGeomShape(XkbGeometryPtr geom,Atom name,int sz_outlines)
-{
-XkbShapePtr shape;
-register int i;
-
- if ((!geom)||(!name)||(sz_outlines<0))
- return NULL;
- if (geom->num_shapes>0) {
- for (shape=geom->shapes,i=0;i<geom->num_shapes;i++,shape++) {
- if (name==shape->name)
- return shape;
- }
- }
- if ((geom->num_shapes>=geom->sz_shapes)&&
- (_XkbAllocShapes(geom,1)!=Success))
- return NULL;
- shape= &geom->shapes[geom->num_shapes];
- memset(shape, 0, sizeof(XkbShapeRec));
- if ((sz_outlines>0)&&(_XkbAllocOutlines(shape,sz_outlines)!=Success))
- return NULL;
- shape->name= name;
- shape->primary= shape->approx= NULL;
- geom->num_shapes++;
- return shape;
-}
-
-XkbKeyPtr
-XkbAddGeomKey(XkbRowPtr row)
-{
-XkbKeyPtr key;
- if (!row)
- return NULL;
- if ((row->num_keys>=row->sz_keys)&&(_XkbAllocKeys(row,1)!=Success))
- return NULL;
- key= &row->keys[row->num_keys++];
- memset(key, 0, sizeof(XkbKeyRec));
- return key;
-}
-
-XkbRowPtr
-XkbAddGeomRow(XkbSectionPtr section,int sz_keys)
-{
-XkbRowPtr row;
-
- if ((!section)||(sz_keys<0))
- return NULL;
- if ((section->num_rows>=section->sz_rows)&&
- (_XkbAllocRows(section,1)!=Success))
- return NULL;
- row= &section->rows[section->num_rows];
- memset(row, 0, sizeof(XkbRowRec));
- if ((sz_keys>0)&&(_XkbAllocKeys(row,sz_keys)!=Success))
- return NULL;
- section->num_rows++;
- return row;
-}
-
-XkbSectionPtr
-XkbAddGeomSection( XkbGeometryPtr geom,
- Atom name,
- int sz_rows,
- int sz_doodads,
- int sz_over)
-{
-register int i;
-XkbSectionPtr section;
-
- if ((!geom)||(name==None)||(sz_rows<0))
- return NULL;
- for (i=0,section=geom->sections;i<geom->num_sections;i++,section++) {
- if (section->name!=name)
- continue;
- if (((sz_rows>0)&&(_XkbAllocRows(section,sz_rows)!=Success))||
- ((sz_doodads>0)&&(_XkbAllocDoodads(section,sz_doodads)!=Success))||
- ((sz_over>0)&&(_XkbAllocOverlays(section,sz_over)!=Success)))
- return NULL;
- return section;
- }
- if ((geom->num_sections>=geom->sz_sections)&&
- (_XkbAllocSections(geom,1)!=Success))
- return NULL;
- section= &geom->sections[geom->num_sections];
- if ((sz_rows>0)&&(_XkbAllocRows(section,sz_rows)!=Success))
- return NULL;
- if ((sz_doodads>0)&&(_XkbAllocDoodads(section,sz_doodads)!=Success)) {
- if (section->rows) {
- free(section->rows);
- section->rows= NULL;
- section->sz_rows= section->num_rows= 0;
- }
- return NULL;
- }
- section->name= name;
- geom->num_sections++;
- return section;
-}
-
-XkbDoodadPtr
-XkbAddGeomDoodad(XkbGeometryPtr geom,XkbSectionPtr section,Atom name)
-{
-XkbDoodadPtr old,doodad;
-register int i,nDoodads;
-
- if ((!geom)||(name==None))
- return NULL;
- if ((section!=NULL)&&(section->num_doodads>0)) {
- old= section->doodads;
- nDoodads= section->num_doodads;
- }
- else {
- old= geom->doodads;
- nDoodads= geom->num_doodads;
- }
- for (i=0,doodad=old;i<nDoodads;i++,doodad++) {
- if (doodad->any.name==name)
- return doodad;
- }
- if (section) {
- if ((section->num_doodads>=geom->sz_doodads)&&
- (_XkbAllocDoodads(section,1)!=Success)) {
- return NULL;
- }
- doodad= &section->doodads[section->num_doodads++];
- }
- else {
- if ((geom->num_doodads>=geom->sz_doodads)&&
- (_XkbAllocDoodads(geom,1)!=Success))
- return NULL;
- doodad= &geom->doodads[geom->num_doodads++];
- }
- memset(doodad, 0, sizeof(XkbDoodadRec));
- doodad->any.name= name;
- return doodad;
-}
-
-XkbOverlayKeyPtr
-XkbAddGeomOverlayKey( XkbOverlayPtr overlay,
- XkbOverlayRowPtr row,
- char * over,
- char * under)
-{
-register int i;
-XkbOverlayKeyPtr key;
-XkbSectionPtr section;
-XkbRowPtr row_under;
-Bool found;
-
- if ((!overlay)||(!row)||(!over)||(!under))
- return NULL;
- section= overlay->section_under;
- if (row->row_under>=section->num_rows)
- return NULL;
- row_under= &section->rows[row->row_under];
- for (i=0,found=FALSE;i<row_under->num_keys;i++) {
- if (strncmp(under,row_under->keys[i].name.name,XkbKeyNameLength)==0) {
- found= TRUE;
- break;
- }
- }
- if (!found)
- return NULL;
- if ((row->num_keys>=row->sz_keys)&&(_XkbAllocOverlayKeys(row,1)!=Success))
- return NULL;
- key= &row->keys[row->num_keys];
- strncpy(key->under.name,under,XkbKeyNameLength);
- strncpy(key->over.name,over,XkbKeyNameLength);
- row->num_keys++;
- return key;
-}
-
-XkbOverlayRowPtr
-XkbAddGeomOverlayRow(XkbOverlayPtr overlay,int row_under,int sz_keys)
-{
-register int i;
-XkbOverlayRowPtr row;
-
- if ((!overlay)||(sz_keys<0))
- return NULL;
- if (row_under>=overlay->section_under->num_rows)
- return NULL;
- for (i=0;i<overlay->num_rows;i++) {
- if (overlay->rows[i].row_under==row_under) {
- row= &overlay->rows[i];
- if ((row->sz_keys<sz_keys)&&
- (_XkbAllocOverlayKeys(row,sz_keys)!=Success)) {
- return NULL;
- }
- return &overlay->rows[i];
- }
- }
- if ((overlay->num_rows>=overlay->sz_rows)&&
- (_XkbAllocOverlayRows(overlay,1)!=Success))
- return NULL;
- row= &overlay->rows[overlay->num_rows];
- memset(row, 0, sizeof(XkbOverlayRowRec));
- if ((sz_keys>0)&&(_XkbAllocOverlayKeys(row,sz_keys)!=Success))
- return NULL;
- row->row_under= row_under;
- overlay->num_rows++;
- return row;
-}
-
-XkbOverlayPtr
-XkbAddGeomOverlay(XkbSectionPtr section,Atom name,int sz_rows)
-{
-register int i;
-XkbOverlayPtr overlay;
-
- if ((!section)||(name==None)||(sz_rows==0))
- return NULL;
-
- for (i=0,overlay=section->overlays;i<section->num_overlays;i++,overlay++) {
- if (overlay->name==name) {
- if ((sz_rows>0)&&(_XkbAllocOverlayRows(overlay,sz_rows)!=Success))
- return NULL;
- return overlay;
- }
- }
- if ((section->num_overlays>=section->sz_overlays)&&
- (_XkbAllocOverlays(section,1)!=Success))
- return NULL;
- overlay= &section->overlays[section->num_overlays];
- if ((sz_rows>0)&&(_XkbAllocOverlayRows(overlay,sz_rows)!=Success))
- return NULL;
- overlay->name= name;
- overlay->section_under= section;
- section->num_overlays++;
- return overlay;
-}
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+
+#include <stdio.h>
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "inputstr.h"
+#include <xkbsrv.h>
+#include "xkbgeom.h"
+
+/***====================================================================***/
+
+static void
+_XkbFreeGeomLeafElems( Bool freeAll,
+ int first,
+ int count,
+ unsigned short * num_inout,
+ unsigned short * sz_inout,
+ char ** elems,
+ unsigned int elem_sz)
+{
+ if ((freeAll)||(*elems==NULL)) {
+ *num_inout= *sz_inout= 0;
+ free(*elems);
+ *elems = NULL;
+ return;
+ }
+
+ if ((first>=(*num_inout))||(first<0)||(count<1))
+ return;
+
+ if (first+count>=(*num_inout)) {
+ /* truncating the array is easy */
+ (*num_inout)= first;
+ }
+ else {
+ char * ptr;
+ int extra;
+ ptr= *elems;
+ extra= ((*num_inout)-(first+count))*elem_sz;
+ if (extra>0)
+ memmove(&ptr[first*elem_sz],&ptr[(first+count)*elem_sz],extra);
+ (*num_inout)-= count;
+ }
+ return;
+}
+
+typedef void (*ContentsClearFunc)(
+ char * /* priv */
+);
+
+static void
+_XkbFreeGeomNonLeafElems( Bool freeAll,
+ int first,
+ int count,
+ unsigned short * num_inout,
+ unsigned short * sz_inout,
+ char ** elems,
+ unsigned int elem_sz,
+ ContentsClearFunc freeFunc)
+{
+register int i;
+register char *ptr;
+
+ if (freeAll) {
+ first= 0;
+ count= (*num_inout);
+ }
+ else if ((first>=(*num_inout))||(first<0)||(count<1))
+ return;
+ else if (first+count>(*num_inout))
+ count= (*num_inout)-first;
+ if (*elems==NULL)
+ return;
+
+ if (freeFunc) {
+ ptr= *elems;
+ ptr+= first*elem_sz;
+ for (i=0;i<count;i++) {
+ (*freeFunc)(ptr);
+ ptr+= elem_sz;
+ }
+ }
+ if (freeAll) {
+ (*num_inout)= (*sz_inout)= 0;
+ free(*elems);
+ *elems = NULL;
+ }
+ else if (first+count>=(*num_inout))
+ *num_inout= first;
+ else {
+ i= ((*num_inout)-(first+count))*elem_sz;
+ ptr= *elems;
+ memmove(&ptr[first*elem_sz],&ptr[(first+count)*elem_sz],i);
+ (*num_inout)-= count;
+ }
+ return;
+}
+
+/***====================================================================***/
+
+static void
+_XkbClearProperty(char *prop_in)
+{
+XkbPropertyPtr prop= (XkbPropertyPtr)prop_in;
+
+ free(prop->name);
+ prop->name = NULL;
+ free(prop->value);
+ prop->value = NULL;
+ return;
+}
+
+void
+XkbFreeGeomProperties( XkbGeometryPtr geom,
+ int first,
+ int count,
+ Bool freeAll)
+{
+ _XkbFreeGeomNonLeafElems(freeAll,first,count,
+ &geom->num_properties,&geom->sz_properties,
+ (char **)&geom->properties,
+ sizeof(XkbPropertyRec),_XkbClearProperty);
+ return;
+}
+
+/***====================================================================***/
+
+void
+XkbFreeGeomKeyAliases( XkbGeometryPtr geom,
+ int first,
+ int count,
+ Bool freeAll)
+{
+ _XkbFreeGeomLeafElems(freeAll,first,count,
+ &geom->num_key_aliases,&geom->sz_key_aliases,
+ (char **)&geom->key_aliases,
+ sizeof(XkbKeyAliasRec));
+ return;
+}
+
+/***====================================================================***/
+
+static void
+_XkbClearColor(char *color_in)
+{
+XkbColorPtr color= (XkbColorPtr)color_in;
+
+ free(color->spec);
+ return;
+}
+
+void
+XkbFreeGeomColors(XkbGeometryPtr geom,int first,int count,Bool freeAll)
+{
+ _XkbFreeGeomNonLeafElems(freeAll,first,count,
+ &geom->num_colors,&geom->sz_colors,
+ (char **)&geom->colors,
+ sizeof(XkbColorRec),_XkbClearColor);
+ return;
+}
+
+/***====================================================================***/
+
+void
+XkbFreeGeomPoints(XkbOutlinePtr outline,int first,int count,Bool freeAll)
+{
+ _XkbFreeGeomLeafElems(freeAll,first,count,
+ &outline->num_points,&outline->sz_points,
+ (char **)&outline->points,
+ sizeof(XkbPointRec));
+ return;
+}
+
+/***====================================================================***/
+
+static void
+_XkbClearOutline(char *outline_in)
+{
+XkbOutlinePtr outline= (XkbOutlinePtr)outline_in;
+
+ if (outline->points!=NULL)
+ XkbFreeGeomPoints(outline,0,outline->num_points,TRUE);
+ return;
+}
+
+void
+XkbFreeGeomOutlines(XkbShapePtr shape,int first,int count,Bool freeAll)
+{
+ _XkbFreeGeomNonLeafElems(freeAll,first,count,
+ &shape->num_outlines,&shape->sz_outlines,
+ (char **)&shape->outlines,
+ sizeof(XkbOutlineRec),_XkbClearOutline);
+
+ return;
+}
+
+/***====================================================================***/
+
+static void
+_XkbClearShape(char *shape_in)
+{
+XkbShapePtr shape= (XkbShapePtr)shape_in;
+
+ if (shape->outlines)
+ XkbFreeGeomOutlines(shape,0,shape->num_outlines,TRUE);
+ return;
+}
+
+void
+XkbFreeGeomShapes(XkbGeometryPtr geom,int first,int count,Bool freeAll)
+{
+ _XkbFreeGeomNonLeafElems(freeAll,first,count,
+ &geom->num_shapes,&geom->sz_shapes,
+ (char **)&geom->shapes,
+ sizeof(XkbShapeRec),_XkbClearShape);
+ return;
+}
+
+/***====================================================================***/
+
+void
+XkbFreeGeomOverlayKeys(XkbOverlayRowPtr row,int first,int count,Bool freeAll)
+{
+ _XkbFreeGeomLeafElems(freeAll,first,count,
+ &row->num_keys,&row->sz_keys,
+ (char **)&row->keys,
+ sizeof(XkbOverlayKeyRec));
+ return;
+}
+
+/***====================================================================***/
+
+static void
+_XkbClearOverlayRow(char *row_in)
+{
+XkbOverlayRowPtr row= (XkbOverlayRowPtr)row_in;
+
+ if (row->keys!=NULL)
+ XkbFreeGeomOverlayKeys(row,0,row->num_keys,TRUE);
+ return;
+}
+
+void
+XkbFreeGeomOverlayRows(XkbOverlayPtr overlay,int first,int count,Bool freeAll)
+{
+ _XkbFreeGeomNonLeafElems(freeAll,first,count,
+ &overlay->num_rows,&overlay->sz_rows,
+ (char **)&overlay->rows,
+ sizeof(XkbOverlayRowRec),_XkbClearOverlayRow);
+ return;
+}
+
+/***====================================================================***/
+
+static void
+_XkbClearOverlay(char *overlay_in)
+{
+XkbOverlayPtr overlay= (XkbOverlayPtr)overlay_in;
+
+ if (overlay->rows!=NULL)
+ XkbFreeGeomOverlayRows(overlay,0,overlay->num_rows,TRUE);
+ return;
+}
+
+void
+XkbFreeGeomOverlays(XkbSectionPtr section,int first,int count,Bool freeAll)
+{
+ _XkbFreeGeomNonLeafElems(freeAll,first,count,
+ &section->num_overlays,&section->sz_overlays,
+ (char **)&section->overlays,
+ sizeof(XkbOverlayRec),_XkbClearOverlay);
+ return;
+}
+
+/***====================================================================***/
+
+void
+XkbFreeGeomKeys(XkbRowPtr row,int first,int count,Bool freeAll)
+{
+ _XkbFreeGeomLeafElems(freeAll,first,count,
+ &row->num_keys,&row->sz_keys,
+ (char **)&row->keys,
+ sizeof(XkbKeyRec));
+ return;
+}
+
+/***====================================================================***/
+
+static void
+_XkbClearRow(char *row_in)
+{
+XkbRowPtr row= (XkbRowPtr)row_in;
+
+ if (row->keys!=NULL)
+ XkbFreeGeomKeys(row,0,row->num_keys,TRUE);
+ return;
+}
+
+void
+XkbFreeGeomRows(XkbSectionPtr section,int first,int count,Bool freeAll)
+{
+ _XkbFreeGeomNonLeafElems(freeAll,first,count,
+ &section->num_rows,&section->sz_rows,
+ (char **)&section->rows,
+ sizeof(XkbRowRec),_XkbClearRow);
+}
+
+/***====================================================================***/
+
+static void
+_XkbClearSection(char *section_in)
+{
+XkbSectionPtr section= (XkbSectionPtr)section_in;
+
+ if (section->rows!=NULL)
+ XkbFreeGeomRows(section,0,section->num_rows,TRUE);
+ if (section->doodads!=NULL) {
+ XkbFreeGeomDoodads(section->doodads,section->num_doodads,TRUE);
+ section->doodads= NULL;
+ }
+ return;
+}
+
+void
+XkbFreeGeomSections(XkbGeometryPtr geom,int first,int count,Bool freeAll)
+{
+ _XkbFreeGeomNonLeafElems(freeAll,first,count,
+ &geom->num_sections,&geom->sz_sections,
+ (char **)&geom->sections,
+ sizeof(XkbSectionRec),_XkbClearSection);
+ return;
+}
+
+/***====================================================================***/
+
+static void
+_XkbClearDoodad(char *doodad_in)
+{
+XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in;
+
+ switch (doodad->any.type) {
+ case XkbTextDoodad:
+ {
+ free(doodad->text.text);
+ doodad->text.text = NULL;
+ free(doodad->text.font);
+ doodad->text.font = NULL;
+ }
+ break;
+ case XkbLogoDoodad:
+ {
+ free(doodad->logo.logo_name);
+ doodad->logo.logo_name = NULL;
+ }
+ break;
+ }
+ return;
+}
+
+void
+XkbFreeGeomDoodads(XkbDoodadPtr doodads,int nDoodads,Bool freeAll)
+{
+register int i;
+register XkbDoodadPtr doodad;
+
+ if (doodads) {
+ for (i=0,doodad= doodads;i<nDoodads;i++,doodad++) {
+ _XkbClearDoodad((char *)doodad);
+ }
+ if (freeAll)
+ free(doodads);
+ }
+ return;
+}
+
+void
+XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap)
+{
+ if (geom==NULL)
+ return;
+ if (freeMap)
+ which= XkbGeomAllMask;
+ if ((which&XkbGeomPropertiesMask)&&(geom->properties!=NULL))
+ XkbFreeGeomProperties(geom,0,geom->num_properties,TRUE);
+ if ((which&XkbGeomColorsMask)&&(geom->colors!=NULL))
+ XkbFreeGeomColors(geom,0,geom->num_colors,TRUE);
+ if ((which&XkbGeomShapesMask)&&(geom->shapes!=NULL))
+ XkbFreeGeomShapes(geom,0,geom->num_shapes,TRUE);
+ if ((which&XkbGeomSectionsMask)&&(geom->sections!=NULL))
+ XkbFreeGeomSections(geom,0,geom->num_sections,TRUE);
+ if ((which&XkbGeomDoodadsMask)&&(geom->doodads!= NULL)) {
+ XkbFreeGeomDoodads(geom->doodads,geom->num_doodads,TRUE);
+ geom->doodads= NULL;
+ geom->num_doodads= geom->sz_doodads= 0;
+ }
+ if ((which&XkbGeomKeyAliasesMask)&&(geom->key_aliases!=NULL))
+ XkbFreeGeomKeyAliases(geom,0,geom->num_key_aliases,TRUE);
+ if (freeMap) {
+ free(geom->label_font);
+ geom->label_font = NULL;
+ free(geom);
+ }
+ return;
+}
+
+/***====================================================================***/
+
+static Status
+_XkbGeomAlloc( void ** old,
+ unsigned short * num,
+ unsigned short * total,
+ int num_new,
+ size_t sz_elem)
+{
+ if (num_new<1)
+ return Success;
+ if ((*old)==NULL)
+ *num= *total= 0;
+
+ if ((*num)+num_new<=(*total))
+ return Success;
+
+ *total= (*num)+num_new;
+ if ((*old)!=NULL)
+ (*old)= realloc((*old),(*total)*sz_elem);
+ else (*old)= calloc((*total),sz_elem);
+ if ((*old)==NULL) {
+ *total= *num= 0;
+ return BadAlloc;
+ }
+
+ if (*num>0) {
+ char *tmp= (char *)(*old);
+ memset(&tmp[sz_elem*(*num)], 0, (num_new*sz_elem));
+ }
+ return Success;
+}
+
+#define _XkbAllocProps(g,n) _XkbGeomAlloc((void *)&(g)->properties,\
+ &(g)->num_properties,&(g)->sz_properties,\
+ (n),sizeof(XkbPropertyRec))
+#define _XkbAllocColors(g,n) _XkbGeomAlloc((void *)&(g)->colors,\
+ &(g)->num_colors,&(g)->sz_colors,\
+ (n),sizeof(XkbColorRec))
+#define _XkbAllocShapes(g,n) _XkbGeomAlloc((void *)&(g)->shapes,\
+ &(g)->num_shapes,&(g)->sz_shapes,\
+ (n),sizeof(XkbShapeRec))
+#define _XkbAllocSections(g,n) _XkbGeomAlloc((void *)&(g)->sections,\
+ &(g)->num_sections,&(g)->sz_sections,\
+ (n),sizeof(XkbSectionRec))
+#define _XkbAllocDoodads(g,n) _XkbGeomAlloc((void *)&(g)->doodads,\
+ &(g)->num_doodads,&(g)->sz_doodads,\
+ (n),sizeof(XkbDoodadRec))
+#define _XkbAllocKeyAliases(g,n) _XkbGeomAlloc((void *)&(g)->key_aliases,\
+ &(g)->num_key_aliases,&(g)->sz_key_aliases,\
+ (n),sizeof(XkbKeyAliasRec))
+
+#define _XkbAllocOutlines(s,n) _XkbGeomAlloc((void *)&(s)->outlines,\
+ &(s)->num_outlines,&(s)->sz_outlines,\
+ (n),sizeof(XkbOutlineRec))
+#define _XkbAllocRows(s,n) _XkbGeomAlloc((void *)&(s)->rows,\
+ &(s)->num_rows,&(s)->sz_rows,\
+ (n),sizeof(XkbRowRec))
+#define _XkbAllocPoints(o,n) _XkbGeomAlloc((void *)&(o)->points,\
+ &(o)->num_points,&(o)->sz_points,\
+ (n),sizeof(XkbPointRec))
+#define _XkbAllocKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\
+ &(r)->num_keys,&(r)->sz_keys,\
+ (n),sizeof(XkbKeyRec))
+#define _XkbAllocOverlays(s,n) _XkbGeomAlloc((void *)&(s)->overlays,\
+ &(s)->num_overlays,&(s)->sz_overlays,\
+ (n),sizeof(XkbOverlayRec))
+#define _XkbAllocOverlayRows(o,n) _XkbGeomAlloc((void *)&(o)->rows,\
+ &(o)->num_rows,&(o)->sz_rows,\
+ (n),sizeof(XkbOverlayRowRec))
+#define _XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\
+ &(r)->num_keys,&(r)->sz_keys,\
+ (n),sizeof(XkbOverlayKeyRec))
+
+Status
+XkbAllocGeomProps(XkbGeometryPtr geom,int nProps)
+{
+ return _XkbAllocProps(geom,nProps);
+}
+
+Status
+XkbAllocGeomColors(XkbGeometryPtr geom,int nColors)
+{
+ return _XkbAllocColors(geom,nColors);
+}
+
+Status
+XkbAllocGeomKeyAliases(XkbGeometryPtr geom,int nKeyAliases)
+{
+ return _XkbAllocKeyAliases(geom,nKeyAliases);
+}
+
+Status
+XkbAllocGeomShapes(XkbGeometryPtr geom,int nShapes)
+{
+ return _XkbAllocShapes(geom,nShapes);
+}
+
+Status
+XkbAllocGeomSections(XkbGeometryPtr geom,int nSections)
+{
+ return _XkbAllocSections(geom,nSections);
+}
+
+Status
+XkbAllocGeomOverlays(XkbSectionPtr section,int nOverlays)
+{
+ return _XkbAllocOverlays(section,nOverlays);
+}
+
+Status
+XkbAllocGeomOverlayRows(XkbOverlayPtr overlay,int nRows)
+{
+ return _XkbAllocOverlayRows(overlay,nRows);
+}
+
+Status
+XkbAllocGeomOverlayKeys(XkbOverlayRowPtr row,int nKeys)
+{
+ return _XkbAllocOverlayKeys(row,nKeys);
+}
+
+Status
+XkbAllocGeomDoodads(XkbGeometryPtr geom,int nDoodads)
+{
+ return _XkbAllocDoodads(geom,nDoodads);
+}
+
+Status
+XkbAllocGeomSectionDoodads(XkbSectionPtr section,int nDoodads)
+{
+ return _XkbAllocDoodads(section,nDoodads);
+}
+
+Status
+XkbAllocGeomOutlines(XkbShapePtr shape,int nOL)
+{
+ return _XkbAllocOutlines(shape,nOL);
+}
+
+Status
+XkbAllocGeomRows(XkbSectionPtr section,int nRows)
+{
+ return _XkbAllocRows(section,nRows);
+}
+
+Status
+XkbAllocGeomPoints(XkbOutlinePtr ol,int nPts)
+{
+ return _XkbAllocPoints(ol,nPts);
+}
+
+Status
+XkbAllocGeomKeys(XkbRowPtr row,int nKeys)
+{
+ return _XkbAllocKeys(row,nKeys);
+}
+
+Status
+XkbAllocGeometry(XkbDescPtr xkb,XkbGeometrySizesPtr sizes)
+{
+XkbGeometryPtr geom;
+Status rtrn;
+
+ if (xkb->geom==NULL) {
+ xkb->geom= calloc(1, sizeof(XkbGeometryRec));
+ if (!xkb->geom)
+ return BadAlloc;
+ }
+ geom= xkb->geom;
+ if ((sizes->which&XkbGeomPropertiesMask)&&
+ ((rtrn=_XkbAllocProps(geom,sizes->num_properties))!=Success)) {
+ goto BAIL;
+ }
+ if ((sizes->which&XkbGeomColorsMask)&&
+ ((rtrn=_XkbAllocColors(geom,sizes->num_colors))!=Success)) {
+ goto BAIL;
+ }
+ if ((sizes->which&XkbGeomShapesMask)&&
+ ((rtrn=_XkbAllocShapes(geom,sizes->num_shapes))!=Success)) {
+ goto BAIL;
+ }
+ if ((sizes->which&XkbGeomSectionsMask)&&
+ ((rtrn=_XkbAllocSections(geom,sizes->num_sections))!=Success)) {
+ goto BAIL;
+ }
+ if ((sizes->which&XkbGeomDoodadsMask)&&
+ ((rtrn=_XkbAllocDoodads(geom,sizes->num_doodads))!=Success)) {
+ goto BAIL;
+ }
+ if ((sizes->which&XkbGeomKeyAliasesMask)&&
+ ((rtrn=_XkbAllocKeyAliases(geom,sizes->num_key_aliases))!=Success)) {
+ goto BAIL;
+ }
+ return Success;
+BAIL:
+ XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
+ xkb->geom= NULL;
+ return rtrn;
+}
+
+/***====================================================================***/
+
+XkbPropertyPtr
+XkbAddGeomProperty(XkbGeometryPtr geom,char *name,char *value)
+{
+register int i;
+register XkbPropertyPtr prop;
+
+ if ((!geom)||(!name)||(!value))
+ return NULL;
+ for (i=0,prop=geom->properties;i<geom->num_properties;i++,prop++) {
+ if ((prop->name)&&(strcmp(name,prop->name)==0)) {
+ free(prop->value);
+ prop->value= strdup(value);
+ return prop;
+ }
+ }
+ if ((geom->num_properties>=geom->sz_properties)&&
+ (_XkbAllocProps(geom,1)!=Success)) {
+ return NULL;
+ }
+ prop= &geom->properties[geom->num_properties];
+ prop->name= strdup(name);
+ if (!prop->name)
+ return NULL;
+ prop->value= strdup(value);
+ if (!prop->value) {
+ free(prop->name);
+ prop->name= NULL;
+ return NULL;
+ }
+ geom->num_properties++;
+ return prop;
+}
+
+XkbKeyAliasPtr
+XkbAddGeomKeyAlias(XkbGeometryPtr geom,char *aliasStr,char *realStr)
+{
+register int i;
+register XkbKeyAliasPtr alias;
+
+ if ((!geom)||(!aliasStr)||(!realStr)||(!aliasStr[0])||(!realStr[0]))
+ return NULL;
+ for (i=0,alias=geom->key_aliases;i<geom->num_key_aliases;i++,alias++) {
+ if (strncmp(alias->alias,aliasStr,XkbKeyNameLength)==0) {
+ memset(alias->real, 0, XkbKeyNameLength);
+ strncpy(alias->real,realStr,XkbKeyNameLength);
+ return alias;
+ }
+ }
+ if ((geom->num_key_aliases>=geom->sz_key_aliases)&&
+ (_XkbAllocKeyAliases(geom,1)!=Success)) {
+ return NULL;
+ }
+ alias= &geom->key_aliases[geom->num_key_aliases];
+ memset(alias, 0, sizeof(XkbKeyAliasRec));
+ strncpy(alias->alias,aliasStr,XkbKeyNameLength);
+ strncpy(alias->real,realStr,XkbKeyNameLength);
+ geom->num_key_aliases++;
+ return alias;
+}
+
+XkbColorPtr
+XkbAddGeomColor(XkbGeometryPtr geom,char *spec,unsigned int pixel)
+{
+register int i;
+register XkbColorPtr color;
+
+ if ((!geom)||(!spec))
+ return NULL;
+ for (i=0,color=geom->colors;i<geom->num_colors;i++,color++) {
+ if ((color->spec)&&(strcmp(color->spec,spec)==0)) {
+ color->pixel= pixel;
+ return color;
+ }
+ }
+ if ((geom->num_colors>=geom->sz_colors)&&
+ (_XkbAllocColors(geom,1)!=Success)) {
+ return NULL;
+ }
+ color= &geom->colors[geom->num_colors];
+ color->pixel= pixel;
+ color->spec= strdup(spec);
+ if (!color->spec)
+ return NULL;
+ geom->num_colors++;
+ return color;
+}
+
+XkbOutlinePtr
+XkbAddGeomOutline(XkbShapePtr shape,int sz_points)
+{
+XkbOutlinePtr outline;
+
+ if ((!shape)||(sz_points<0))
+ return NULL;
+ if ((shape->num_outlines>=shape->sz_outlines)&&
+ (_XkbAllocOutlines(shape,1)!=Success)) {
+ return NULL;
+ }
+ outline= &shape->outlines[shape->num_outlines];
+ memset(outline, 0, sizeof(XkbOutlineRec));
+ if ((sz_points>0)&&(_XkbAllocPoints(outline,sz_points)!=Success))
+ return NULL;
+ shape->num_outlines++;
+ return outline;
+}
+
+XkbShapePtr
+XkbAddGeomShape(XkbGeometryPtr geom,Atom name,int sz_outlines)
+{
+XkbShapePtr shape;
+register int i;
+
+ if ((!geom)||(!name)||(sz_outlines<0))
+ return NULL;
+ if (geom->num_shapes>0) {
+ for (shape=geom->shapes,i=0;i<geom->num_shapes;i++,shape++) {
+ if (name==shape->name)
+ return shape;
+ }
+ }
+ if ((geom->num_shapes>=geom->sz_shapes)&&
+ (_XkbAllocShapes(geom,1)!=Success))
+ return NULL;
+ shape= &geom->shapes[geom->num_shapes];
+ memset(shape, 0, sizeof(XkbShapeRec));
+ if ((sz_outlines>0)&&(_XkbAllocOutlines(shape,sz_outlines)!=Success))
+ return NULL;
+ shape->name= name;
+ shape->primary= shape->approx= NULL;
+ geom->num_shapes++;
+ return shape;
+}
+
+XkbKeyPtr
+XkbAddGeomKey(XkbRowPtr row)
+{
+XkbKeyPtr key;
+ if (!row)
+ return NULL;
+ if ((row->num_keys>=row->sz_keys)&&(_XkbAllocKeys(row,1)!=Success))
+ return NULL;
+ key= &row->keys[row->num_keys++];
+ memset(key, 0, sizeof(XkbKeyRec));
+ return key;
+}
+
+XkbRowPtr
+XkbAddGeomRow(XkbSectionPtr section,int sz_keys)
+{
+XkbRowPtr row;
+
+ if ((!section)||(sz_keys<0))
+ return NULL;
+ if ((section->num_rows>=section->sz_rows)&&
+ (_XkbAllocRows(section,1)!=Success))
+ return NULL;
+ row= &section->rows[section->num_rows];
+ memset(row, 0, sizeof(XkbRowRec));
+ if ((sz_keys>0)&&(_XkbAllocKeys(row,sz_keys)!=Success))
+ return NULL;
+ section->num_rows++;
+ return row;
+}
+
+XkbSectionPtr
+XkbAddGeomSection( XkbGeometryPtr geom,
+ Atom name,
+ int sz_rows,
+ int sz_doodads,
+ int sz_over)
+{
+register int i;
+XkbSectionPtr section;
+
+ if ((!geom)||(name==None)||(sz_rows<0))
+ return NULL;
+ for (i=0,section=geom->sections;i<geom->num_sections;i++,section++) {
+ if (section->name!=name)
+ continue;
+ if (((sz_rows>0)&&(_XkbAllocRows(section,sz_rows)!=Success))||
+ ((sz_doodads>0)&&(_XkbAllocDoodads(section,sz_doodads)!=Success))||
+ ((sz_over>0)&&(_XkbAllocOverlays(section,sz_over)!=Success)))
+ return NULL;
+ return section;
+ }
+ if ((geom->num_sections>=geom->sz_sections)&&
+ (_XkbAllocSections(geom,1)!=Success))
+ return NULL;
+ section= &geom->sections[geom->num_sections];
+ if ((sz_rows>0)&&(_XkbAllocRows(section,sz_rows)!=Success))
+ return NULL;
+ if ((sz_doodads>0)&&(_XkbAllocDoodads(section,sz_doodads)!=Success)) {
+ if (section->rows) {
+ free(section->rows);
+ section->rows= NULL;
+ section->sz_rows= section->num_rows= 0;
+ }
+ return NULL;
+ }
+ section->name= name;
+ geom->num_sections++;
+ return section;
+}
+
+XkbDoodadPtr
+XkbAddGeomDoodad(XkbGeometryPtr geom,XkbSectionPtr section,Atom name)
+{
+XkbDoodadPtr old,doodad;
+register int i,nDoodads;
+
+ if ((!geom)||(name==None))
+ return NULL;
+ if ((section!=NULL)&&(section->num_doodads>0)) {
+ old= section->doodads;
+ nDoodads= section->num_doodads;
+ }
+ else {
+ old= geom->doodads;
+ nDoodads= geom->num_doodads;
+ }
+ for (i=0,doodad=old;i<nDoodads;i++,doodad++) {
+ if (doodad->any.name==name)
+ return doodad;
+ }
+ if (section) {
+ if ((section->num_doodads>=geom->sz_doodads)&&
+ (_XkbAllocDoodads(section,1)!=Success)) {
+ return NULL;
+ }
+ doodad= &section->doodads[section->num_doodads++];
+ }
+ else {
+ if ((geom->num_doodads>=geom->sz_doodads)&&
+ (_XkbAllocDoodads(geom,1)!=Success))
+ return NULL;
+ doodad= &geom->doodads[geom->num_doodads++];
+ }
+ memset(doodad, 0, sizeof(XkbDoodadRec));
+ doodad->any.name= name;
+ return doodad;
+}
+
+XkbOverlayKeyPtr
+XkbAddGeomOverlayKey( XkbOverlayPtr overlay,
+ XkbOverlayRowPtr row,
+ char * over,
+ char * under)
+{
+register int i;
+XkbOverlayKeyPtr key;
+XkbSectionPtr section;
+XkbRowPtr row_under;
+Bool found;
+
+ if ((!overlay)||(!row)||(!over)||(!under))
+ return NULL;
+ section= overlay->section_under;
+ if (row->row_under>=section->num_rows)
+ return NULL;
+ row_under= &section->rows[row->row_under];
+ for (i=0,found=FALSE;i<row_under->num_keys;i++) {
+ if (strncmp(under,row_under->keys[i].name.name,XkbKeyNameLength)==0) {
+ found= TRUE;
+ break;
+ }
+ }
+ if (!found)
+ return NULL;
+ if ((row->num_keys>=row->sz_keys)&&(_XkbAllocOverlayKeys(row,1)!=Success))
+ return NULL;
+ key= &row->keys[row->num_keys];
+ strncpy(key->under.name,under,XkbKeyNameLength);
+ strncpy(key->over.name,over,XkbKeyNameLength);
+ row->num_keys++;
+ return key;
+}
+
+XkbOverlayRowPtr
+XkbAddGeomOverlayRow(XkbOverlayPtr overlay,int row_under,int sz_keys)
+{
+register int i;
+XkbOverlayRowPtr row;
+
+ if ((!overlay)||(sz_keys<0))
+ return NULL;
+ if (row_under>=overlay->section_under->num_rows)
+ return NULL;
+ for (i=0;i<overlay->num_rows;i++) {
+ if (overlay->rows[i].row_under==row_under) {
+ row= &overlay->rows[i];
+ if ((row->sz_keys<sz_keys)&&
+ (_XkbAllocOverlayKeys(row,sz_keys)!=Success)) {
+ return NULL;
+ }
+ return &overlay->rows[i];
+ }
+ }
+ if ((overlay->num_rows>=overlay->sz_rows)&&
+ (_XkbAllocOverlayRows(overlay,1)!=Success))
+ return NULL;
+ row= &overlay->rows[overlay->num_rows];
+ memset(row, 0, sizeof(XkbOverlayRowRec));
+ if ((sz_keys>0)&&(_XkbAllocOverlayKeys(row,sz_keys)!=Success))
+ return NULL;
+ row->row_under= row_under;
+ overlay->num_rows++;
+ return row;
+}
+
+XkbOverlayPtr
+XkbAddGeomOverlay(XkbSectionPtr section,Atom name,int sz_rows)
+{
+register int i;
+XkbOverlayPtr overlay;
+
+ if ((!section)||(name==None)||(sz_rows==0))
+ return NULL;
+
+ for (i=0,overlay=section->overlays;i<section->num_overlays;i++,overlay++) {
+ if (overlay->name==name) {
+ if ((sz_rows>0)&&(_XkbAllocOverlayRows(overlay,sz_rows)!=Success))
+ return NULL;
+ return overlay;
+ }
+ }
+ if ((section->num_overlays>=section->sz_overlays)&&
+ (_XkbAllocOverlays(section,1)!=Success))
+ return NULL;
+ overlay= &section->overlays[section->num_overlays];
+ if ((sz_rows>0)&&(_XkbAllocOverlayRows(overlay,sz_rows)!=Success))
+ return NULL;
+ overlay->name= name;
+ overlay->section_under= section;
+ section->num_overlays++;
+ return overlay;
+}
diff --git a/xorg-server/xkb/ddxList.c b/xorg-server/xkb/ddxList.c
index e62078de8..4bc1e88e1 100644
--- a/xorg-server/xkb/ddxList.c
+++ b/xorg-server/xkb/ddxList.c
@@ -223,7 +223,12 @@ char tmpname[PATH_MAX];
free(buf);
buf = malloc(PATH_MAX * sizeof(char));
if (!buf)
- return BadAlloc;
+ {
+#ifdef WIN32
+ unlink(tmpname);
+#endif
+ return BadAlloc;
+ }
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
unsigned flags;
register unsigned int i;
diff --git a/xorg-server/xkb/ddxLoad.c b/xorg-server/xkb/ddxLoad.c
index e1020358a..13d2d6f1b 100644
--- a/xorg-server/xkb/ddxLoad.c
+++ b/xorg-server/xkb/ddxLoad.c
@@ -1,504 +1,508 @@
-/************************************************************
-Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
-of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
-of this software for any purpose. It is provided "as is"
-without any express or implied warranty.
-
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <xkb-config.h>
-
-#include <stdio.h>
-#include <ctype.h>
-#include <X11/X.h>
-#include <X11/Xos.h>
-#include <X11/Xproto.h>
-#include <X11/keysym.h>
-#include <X11/extensions/XKM.h>
-#include "inputstr.h"
-#include "scrnintstr.h"
-#include "windowstr.h"
-#define XKBSRV_NEED_FILE_FUNCS
-#include <xkbsrv.h>
-#include <X11/extensions/XI.h>
-#include "xkb.h"
-
- /*
- * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
- * relative to the top-level XKB configuration directory.
- * Making the server write to a subdirectory of that directory
- * requires some work in the general case (install procedure
- * has to create links to /var or somesuch on many machines),
- * so we just compile into /usr/tmp for now.
- */
-#ifndef XKM_OUTPUT_DIR
-#define XKM_OUTPUT_DIR "compiled/"
-#endif
-
-#define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
-#define ERROR_PREFIX "\"> \""
-#define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
-#define POST_ERROR_MSG2 "\"End of messages from xkbcomp\""
-
-#if defined(WIN32)
-#define PATHSEPARATOR "\\"
-#else
-#define PATHSEPARATOR "/"
-#endif
-
-#ifdef WIN32
-
-#include <X11/Xwindows.h>
-const char*
-Win32TempDir()
-{
- static char buffer[PATH_MAX];
- if (GetTempPath(sizeof(buffer), buffer))
- {
- int len;
- buffer[sizeof(buffer)-1] = 0;
- len = strlen(buffer);
- if (len > 0)
- if (buffer[len-1] == '\\')
- buffer[len-1] = 0;
- return buffer;
- }
- if (getenv("TEMP") != NULL)
- return getenv("TEMP");
- else if (getenv("TMP") != NULL)
- return getenv("TEMP");
- else
- return "/tmp";
-}
-
-int
-Win32System(const char *cmdline)
-{
- STARTUPINFO si;
- PROCESS_INFORMATION pi;
- DWORD dwExitCode;
- char *cmd = strdup(cmdline);
-
- ZeroMemory( &si, sizeof(si) );
- si.cb = sizeof(si);
- ZeroMemory( &pi, sizeof(pi) );
-
- if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
- {
- LPVOID buffer;
- if (!FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &buffer,
- 0,
- NULL ))
- {
- ErrorF("[xkb] Starting '%s' failed!\n", cmdline);
- }
- else
- {
- ErrorF("[xkb] Starting '%s' failed: %s", cmdline, (char *)buffer);
- LocalFree(buffer);
- }
-
- free(cmd);
- return -1;
- }
- /* Wait until child process exits. */
- WaitForSingleObject( pi.hProcess, INFINITE );
-
- GetExitCodeProcess( pi.hProcess, &dwExitCode);
-
- /* Close process and thread handles. */
- CloseHandle( pi.hProcess );
- CloseHandle( pi.hThread );
- free(cmd);
-
- return dwExitCode;
-}
-#undef System
-#define System(x) Win32System(x)
-#endif
-
-static void
-OutputDirectory(
- char* outdir,
- size_t size)
-{
-#ifndef WIN32
- /* Can we write an xkm and then open it too? */
- if (access(XKM_OUTPUT_DIR, W_OK | X_OK) == 0 && (strlen(XKM_OUTPUT_DIR) < size))
- {
- (void) strcpy (outdir, XKM_OUTPUT_DIR);
- } else
-#else
- if (strlen(Win32TempDir()) + 1 < size)
- {
- (void) strcpy(outdir, Win32TempDir());
- (void) strcat(outdir, "\\");
- } else
-#endif
- if (strlen("/tmp/") < size)
- {
- (void) strcpy (outdir, "/tmp/");
- }
-}
-
-static Bool
-XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
- XkbComponentNamesPtr names,
- unsigned want,
- unsigned need,
- char * nameRtrn,
- int nameRtrnLen)
-{
- FILE * out;
- char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
-
- const char *emptystring = "";
- char *xkbbasedirflag = NULL;
- const char *xkbbindir = emptystring;
- const char *xkbbindirsep = emptystring;
-
-#ifdef WIN32
- /* WIN32 has no popen. The input must be stored in a file which is
- used as input for xkbcomp. xkbcomp does not read from stdin. */
- char tmpname[PATH_MAX];
- const char *xkmfile = tmpname;
-#else
- const char *xkmfile = "-";
-#endif
-
- snprintf(keymap, sizeof(keymap), "server-%s", display);
-
- OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
-
-#ifdef WIN32
- strcpy(tmpname, Win32TempDir());
- strcat(tmpname, "\\xkb_XXXXXX");
- (void) mktemp(tmpname);
-#endif
-
- if (XkbBaseDirectory != NULL) {
- if (asprintf(&xkbbasedirflag, "\"-R%s\"", XkbBaseDirectory) == -1)
- xkbbasedirflag = NULL;
- }
-
- if (XkbBinDirectory != NULL) {
- int ld = strlen(XkbBinDirectory);
- int lps = strlen(PATHSEPARATOR);
-
- xkbbindir = XkbBinDirectory;
-
- if ((ld >= lps) &&
- (strcmp(xkbbindir + ld - lps, PATHSEPARATOR) != 0)) {
- xkbbindirsep = PATHSEPARATOR;
- }
- }
-
- if (asprintf(&buf,
- "\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
- "-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
- xkbbindir, xkbbindirsep,
- ((xkbDebugFlags < 2) ? 1 :
- ((xkbDebugFlags > 10) ? 10 : (int) xkbDebugFlags)),
- xkbbasedirflag ? xkbbasedirflag : "", xkmfile,
- PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
- xkm_output_dir, keymap) == -1)
- buf = NULL;
-
- free(xkbbasedirflag);
-
- if (!buf) {
- LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp: not enough memory\n");
- return FALSE;
- }
-
-#ifndef WIN32
- out= Popen(buf,"w");
-#else
- out= fopen(tmpname, "w");
-#endif
-
- if (out!=NULL) {
-#ifdef DEBUG
- if (xkbDebugFlags) {
- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
- XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
- }
-#endif
- XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
-#ifndef WIN32
- if (Pclose(out)==0)
-#else
- if (fclose(out)==0 && System(buf) >= 0)
-#endif
- {
- if (xkbDebugFlags)
- DebugF("[xkb] xkb executes: %s\n",buf);
- if (nameRtrn) {
- strncpy(nameRtrn,keymap,nameRtrnLen);
- nameRtrn[nameRtrnLen-1]= '\0';
- }
- free(buf);
- return TRUE;
- }
- else
- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
-#ifdef WIN32
- /* remove the temporary file */
- unlink(tmpname);
-#endif
- }
- else {
-#ifndef WIN32
- LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp\n");
-#else
- LogMessage(X_ERROR, "Could not open file %s\n", tmpname);
-#endif
- }
- if (nameRtrn)
- nameRtrn[0]= '\0';
- free(buf);
- return FALSE;
-}
-
-static FILE *
-XkbDDXOpenConfigFile(char *mapName,char *fileNameRtrn,int fileNameRtrnLen)
-{
-char buf[PATH_MAX],xkm_output_dir[PATH_MAX];
-FILE * file;
-
- buf[0]= '\0';
- if (mapName!=NULL) {
- OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
- if ((XkbBaseDirectory!=NULL)&&(xkm_output_dir[0]!='/')
-#ifdef WIN32
- &&(!isalpha(xkm_output_dir[0]) || xkm_output_dir[1]!=':')
-#endif
- ) {
- if (snprintf(buf, PATH_MAX, "%s/%s%s.xkm", XkbBaseDirectory,
- xkm_output_dir, mapName) >= PATH_MAX)
- buf[0] = '\0';
- }
- else
- {
- if (snprintf(buf, PATH_MAX, "%s%s.xkm", xkm_output_dir, mapName)
- >= PATH_MAX)
- buf[0] = '\0';
- }
- if (buf[0] != '\0')
- file= fopen(buf,"rb");
- else file= NULL;
- }
- else file= NULL;
- if ((fileNameRtrn!=NULL)&&(fileNameRtrnLen>0)) {
- strncpy(fileNameRtrn,buf,fileNameRtrnLen);
- buf[fileNameRtrnLen-1]= '\0';
- }
- return file;
-}
-
-unsigned
-XkbDDXLoadKeymapByNames( DeviceIntPtr keybd,
- XkbComponentNamesPtr names,
- unsigned want,
- unsigned need,
- XkbDescPtr * xkbRtrn,
- char * nameRtrn,
- int nameRtrnLen)
-{
-XkbDescPtr xkb;
-FILE * file;
-char fileName[PATH_MAX];
-unsigned missing;
-
- *xkbRtrn = NULL;
- if ((keybd==NULL)||(keybd->key==NULL)||(keybd->key->xkbInfo==NULL))
- xkb= NULL;
- else xkb= keybd->key->xkbInfo->desc;
- if ((names->keycodes==NULL)&&(names->types==NULL)&&
- (names->compat==NULL)&&(names->symbols==NULL)&&
- (names->geometry==NULL)) {
- LogMessage(X_ERROR, "XKB: No components provided for device %s\n",
- keybd->name ? keybd->name : "(unnamed keyboard)");
- return 0;
- }
- else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need,
- nameRtrn,nameRtrnLen)){
- LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n");
- return 0;
- }
- file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX);
- if (file==NULL) {
- LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n",fileName);
- return 0;
- }
- missing= XkmReadFile(file,need,want,xkbRtrn);
- if (*xkbRtrn==NULL) {
- LogMessage(X_ERROR, "Error loading keymap %s\n",fileName);
- fclose(file);
- (void) unlink (fileName);
- return 0;
- }
- else {
- DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
- }
- fclose(file);
- (void) unlink (fileName);
- return (need|want)&(~missing);
-}
-
-Bool
-XkbDDXNamesFromRules( DeviceIntPtr keybd,
- char * rules_name,
- XkbRF_VarDefsPtr defs,
- XkbComponentNamesPtr names)
-{
-char buf[PATH_MAX];
-FILE * file;
-Bool complete;
-XkbRF_RulesPtr rules;
-
- if (!rules_name)
- return FALSE;
-
- if (snprintf(buf, PATH_MAX, "%s/rules/%s", XkbBaseDirectory, rules_name)
- >= PATH_MAX) {
- LogMessage(X_ERROR, "XKB: Rules name is too long\n");
- return FALSE;
- }
-
- file = fopen(buf, "r");
- if (!file) {
- LogMessage(X_ERROR, "XKB: Couldn't open rules file %s\n", buf);
- return FALSE;
- }
-
- rules = XkbRF_Create();
- if (!rules) {
- LogMessage(X_ERROR, "XKB: Couldn't create rules struct\n");
- fclose(file);
- return FALSE;
- }
-
- if (!XkbRF_LoadRules(file, rules)) {
- LogMessage(X_ERROR, "XKB: Couldn't parse rules file %s\n", rules_name);
- fclose(file);
- XkbRF_Free(rules,TRUE);
- return FALSE;
- }
-
- memset(names, 0, sizeof(*names));
- complete = XkbRF_GetComponents(rules,defs,names);
- fclose(file);
- XkbRF_Free(rules, TRUE);
-
- if (!complete)
- LogMessage(X_ERROR, "XKB: Rules returned no components\n");
-
- return complete;
-}
-
-static Bool
-XkbRMLVOtoKcCGST(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, XkbComponentNamesPtr kccgst)
-{
- XkbRF_VarDefsRec mlvo;
-
- mlvo.model = rmlvo->model;
- mlvo.layout = rmlvo->layout;
- mlvo.variant = rmlvo->variant;
- mlvo.options = rmlvo->options;
-
- return XkbDDXNamesFromRules(dev, rmlvo->rules, &mlvo, kccgst);
-}
-
-/**
- * Compile the given RMLVO keymap and return it. Returns the XkbDescPtr on
- * success or NULL on failure. If the components compiled are not a superset
- * or equal to need, the compiliation is treated as failure.
- */
-static XkbDescPtr
-XkbCompileKeymapForDevice(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, int need)
-{
- XkbDescPtr xkb = NULL;
- unsigned int provided;
- XkbComponentNamesRec kccgst = {0};
- char name[PATH_MAX];
-
- if (XkbRMLVOtoKcCGST(dev, rmlvo, &kccgst)) {
- provided = XkbDDXLoadKeymapByNames(dev, &kccgst, XkmAllIndicesMask, need,
- &xkb, name, PATH_MAX);
- if ((need & provided) != need) {
- if (xkb) {
- XkbFreeKeyboard(xkb, 0, TRUE);
- xkb = NULL;
- }
- }
- }
-
- XkbFreeComponentNames(&kccgst, FALSE);
- return xkb;
-}
-
-XkbDescPtr
-XkbCompileKeymap(DeviceIntPtr dev, XkbRMLVOSet *rmlvo)
-{
- XkbDescPtr xkb;
- unsigned int need;
-
- if (!dev || !rmlvo) {
- LogMessage(X_ERROR, "XKB: No device or RMLVO specified\n");
- return NULL;
- }
-
- /* These are the components we really really need */
- need = XkmSymbolsMask | XkmCompatMapMask | XkmTypesMask |
- XkmKeyNamesMask | XkmVirtualModsMask;
-
-
- xkb = XkbCompileKeymapForDevice(dev, rmlvo, need);
-
- if (!xkb) {
- XkbRMLVOSet dflts;
-
- /* we didn't get what we really needed. And that will likely leave
- * us with a keyboard that doesn't work. Use the defaults instead */
- LogMessage(X_ERROR, "XKB: Failed to load keymap. Loading default "
- "keymap instead.\n");
-
- XkbGetRulesDflts(&dflts);
-
- xkb = XkbCompileKeymapForDevice(dev, &dflts, 0);
-
- XkbFreeRMLVOSet(&dflts, FALSE);
- }
-
- return xkb;
-}
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <xkb-config.h>
+
+#include <stdio.h>
+#include <ctype.h>
+#include <X11/X.h>
+#include <X11/Xos.h>
+#include <X11/Xproto.h>
+#include <X11/keysym.h>
+#include <X11/extensions/XKM.h>
+#include "inputstr.h"
+#include "scrnintstr.h"
+#include "windowstr.h"
+#define XKBSRV_NEED_FILE_FUNCS
+#include <xkbsrv.h>
+#include <X11/extensions/XI.h>
+#include "xkb.h"
+
+ /*
+ * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
+ * relative to the top-level XKB configuration directory.
+ * Making the server write to a subdirectory of that directory
+ * requires some work in the general case (install procedure
+ * has to create links to /var or somesuch on many machines),
+ * so we just compile into /usr/tmp for now.
+ */
+#ifndef XKM_OUTPUT_DIR
+#define XKM_OUTPUT_DIR "compiled/"
+#endif
+
+#define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
+#define ERROR_PREFIX "\"> \""
+#define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
+#define POST_ERROR_MSG2 "\"End of messages from xkbcomp\""
+
+#if defined(WIN32)
+#define PATHSEPARATOR "\\"
+#else
+#define PATHSEPARATOR "/"
+#endif
+
+#ifdef WIN32
+
+#include <X11/Xwindows.h>
+const char*
+Win32TempDir()
+{
+ static char buffer[PATH_MAX];
+ if (GetTempPath(sizeof(buffer), buffer))
+ {
+ int len;
+ buffer[sizeof(buffer)-1] = 0;
+ len = strlen(buffer);
+ if (len > 0)
+ if (buffer[len-1] == '\\')
+ buffer[len-1] = 0;
+ return buffer;
+ }
+ if (getenv("TEMP") != NULL)
+ return getenv("TEMP");
+ else if (getenv("TMP") != NULL)
+ return getenv("TEMP");
+ else
+ return "/tmp";
+}
+
+int
+Win32System(const char *cmdline)
+{
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ DWORD dwExitCode;
+ char *cmd = strdup(cmdline);
+
+ ZeroMemory( &si, sizeof(si) );
+ si.cb = sizeof(si);
+ ZeroMemory( &pi, sizeof(pi) );
+
+ if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
+ {
+ LPVOID buffer;
+ if (!FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ GetLastError(),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR) &buffer,
+ 0,
+ NULL ))
+ {
+ ErrorF("[xkb] Starting '%s' failed!\n", cmdline);
+ }
+ else
+ {
+ ErrorF("[xkb] Starting '%s' failed: %s", cmdline, (char *)buffer);
+ LocalFree(buffer);
+ }
+
+ free(cmd);
+ return -1;
+ }
+ /* Wait until child process exits. */
+ WaitForSingleObject( pi.hProcess, INFINITE );
+
+ GetExitCodeProcess( pi.hProcess, &dwExitCode);
+
+ /* Close process and thread handles. */
+ CloseHandle( pi.hProcess );
+ CloseHandle( pi.hThread );
+ free(cmd);
+
+ return dwExitCode;
+}
+#undef System
+#define System(x) Win32System(x)
+#endif
+
+static void
+OutputDirectory(
+ char* outdir,
+ size_t size)
+{
+#ifndef WIN32
+ /* Can we write an xkm and then open it too? */
+ if (access(XKM_OUTPUT_DIR, W_OK | X_OK) == 0 && (strlen(XKM_OUTPUT_DIR) < size))
+ {
+ (void) strcpy (outdir, XKM_OUTPUT_DIR);
+ } else
+#else
+ if (strlen(Win32TempDir()) + 1 < size)
+ {
+ (void) strcpy(outdir, Win32TempDir());
+ (void) strcat(outdir, "\\");
+ } else
+#endif
+ if (strlen("/tmp/") < size)
+ {
+ (void) strcpy (outdir, "/tmp/");
+ }
+}
+
+static Bool
+XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ XkbComponentNamesPtr names,
+ unsigned want,
+ unsigned need,
+ char * nameRtrn,
+ int nameRtrnLen)
+{
+ FILE * out;
+ char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
+
+ const char *emptystring = "";
+ char *xkbbasedirflag = NULL;
+ const char *xkbbindir = emptystring;
+ const char *xkbbindirsep = emptystring;
+
+#ifdef WIN32
+ /* WIN32 has no popen. The input must be stored in a file which is
+ used as input for xkbcomp. xkbcomp does not read from stdin. */
+ char tmpname[PATH_MAX];
+ const char *xkmfile = tmpname;
+#else
+ const char *xkmfile = "-";
+#endif
+
+ snprintf(keymap, sizeof(keymap), "server-%s", display);
+
+ OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
+
+#ifdef WIN32
+ strcpy(tmpname, Win32TempDir());
+ strcat(tmpname, "\\xkb_XXXXXX");
+ (void) mktemp(tmpname);
+#endif
+
+ if (XkbBaseDirectory != NULL) {
+ if (asprintf(&xkbbasedirflag, "\"-R%s\"", XkbBaseDirectory) == -1)
+ xkbbasedirflag = NULL;
+ }
+
+ if (XkbBinDirectory != NULL) {
+ int ld = strlen(XkbBinDirectory);
+ int lps = strlen(PATHSEPARATOR);
+
+ xkbbindir = XkbBinDirectory;
+
+ if ((ld >= lps) &&
+ (strcmp(xkbbindir + ld - lps, PATHSEPARATOR) != 0)) {
+ xkbbindirsep = PATHSEPARATOR;
+ }
+ }
+
+ if (asprintf(&buf,
+ "\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
+ "-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
+ xkbbindir, xkbbindirsep,
+ ((xkbDebugFlags < 2) ? 1 :
+ ((xkbDebugFlags > 10) ? 10 : (int) xkbDebugFlags)),
+ xkbbasedirflag ? xkbbasedirflag : "", xkmfile,
+ PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
+ xkm_output_dir, keymap) == -1)
+ buf = NULL;
+
+ free(xkbbasedirflag);
+
+ if (!buf) {
+ LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp: not enough memory\n");
+ return FALSE;
+ }
+
+#ifndef WIN32
+ out= Popen(buf,"w");
+#else
+ out= fopen(tmpname, "w");
+#endif
+
+ if (out!=NULL) {
+#ifdef DEBUG
+ if (xkbDebugFlags) {
+ ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
+ XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
+ }
+#endif
+ XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
+#ifndef WIN32
+ if (Pclose(out)==0)
+#else
+ if (fclose(out)==0 && System(buf) >= 0)
+#endif
+ {
+ if (xkbDebugFlags)
+ DebugF("[xkb] xkb executes: %s\n",buf);
+ if (nameRtrn) {
+ strncpy(nameRtrn,keymap,nameRtrnLen);
+ nameRtrn[nameRtrnLen-1]= '\0';
+ }
+ free(buf);
+#ifdef WIN32
+ /* remove the temporary file */
+ unlink(tmpname);
+#endif
+ return TRUE;
+ }
+ else
+ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
+#ifdef WIN32
+ /* remove the temporary file */
+ unlink(tmpname);
+#endif
+ }
+ else {
+#ifndef WIN32
+ LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp\n");
+#else
+ LogMessage(X_ERROR, "Could not open file %s\n", tmpname);
+#endif
+ }
+ if (nameRtrn)
+ nameRtrn[0]= '\0';
+ free(buf);
+ return FALSE;
+}
+
+static FILE *
+XkbDDXOpenConfigFile(char *mapName,char *fileNameRtrn,int fileNameRtrnLen)
+{
+char buf[PATH_MAX],xkm_output_dir[PATH_MAX];
+FILE * file;
+
+ buf[0]= '\0';
+ if (mapName!=NULL) {
+ OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
+ if ((XkbBaseDirectory!=NULL)&&(xkm_output_dir[0]!='/')
+#ifdef WIN32
+ &&(!isalpha(xkm_output_dir[0]) || xkm_output_dir[1]!=':')
+#endif
+ ) {
+ if (snprintf(buf, PATH_MAX, "%s/%s%s.xkm", XkbBaseDirectory,
+ xkm_output_dir, mapName) >= PATH_MAX)
+ buf[0] = '\0';
+ }
+ else
+ {
+ if (snprintf(buf, PATH_MAX, "%s%s.xkm", xkm_output_dir, mapName)
+ >= PATH_MAX)
+ buf[0] = '\0';
+ }
+ if (buf[0] != '\0')
+ file= fopen(buf,"rb");
+ else file= NULL;
+ }
+ else file= NULL;
+ if ((fileNameRtrn!=NULL)&&(fileNameRtrnLen>0)) {
+ strncpy(fileNameRtrn,buf,fileNameRtrnLen);
+ buf[fileNameRtrnLen-1]= '\0';
+ }
+ return file;
+}
+
+unsigned
+XkbDDXLoadKeymapByNames( DeviceIntPtr keybd,
+ XkbComponentNamesPtr names,
+ unsigned want,
+ unsigned need,
+ XkbDescPtr * xkbRtrn,
+ char * nameRtrn,
+ int nameRtrnLen)
+{
+XkbDescPtr xkb;
+FILE * file;
+char fileName[PATH_MAX];
+unsigned missing;
+
+ *xkbRtrn = NULL;
+ if ((keybd==NULL)||(keybd->key==NULL)||(keybd->key->xkbInfo==NULL))
+ xkb= NULL;
+ else xkb= keybd->key->xkbInfo->desc;
+ if ((names->keycodes==NULL)&&(names->types==NULL)&&
+ (names->compat==NULL)&&(names->symbols==NULL)&&
+ (names->geometry==NULL)) {
+ LogMessage(X_ERROR, "XKB: No components provided for device %s\n",
+ keybd->name ? keybd->name : "(unnamed keyboard)");
+ return 0;
+ }
+ else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need,
+ nameRtrn,nameRtrnLen)){
+ LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n");
+ return 0;
+ }
+ file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX);
+ if (file==NULL) {
+ LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n",fileName);
+ return 0;
+ }
+ missing= XkmReadFile(file,need,want,xkbRtrn);
+ if (*xkbRtrn==NULL) {
+ LogMessage(X_ERROR, "Error loading keymap %s\n",fileName);
+ fclose(file);
+ (void) unlink (fileName);
+ return 0;
+ }
+ else {
+ DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
+ }
+ fclose(file);
+ (void) unlink (fileName);
+ return (need|want)&(~missing);
+}
+
+Bool
+XkbDDXNamesFromRules( DeviceIntPtr keybd,
+ char * rules_name,
+ XkbRF_VarDefsPtr defs,
+ XkbComponentNamesPtr names)
+{
+char buf[PATH_MAX];
+FILE * file;
+Bool complete;
+XkbRF_RulesPtr rules;
+
+ if (!rules_name)
+ return FALSE;
+
+ if (snprintf(buf, PATH_MAX, "%s/rules/%s", XkbBaseDirectory, rules_name)
+ >= PATH_MAX) {
+ LogMessage(X_ERROR, "XKB: Rules name is too long\n");
+ return FALSE;
+ }
+
+ file = fopen(buf, "r");
+ if (!file) {
+ LogMessage(X_ERROR, "XKB: Couldn't open rules file %s\n", buf);
+ return FALSE;
+ }
+
+ rules = XkbRF_Create();
+ if (!rules) {
+ LogMessage(X_ERROR, "XKB: Couldn't create rules struct\n");
+ fclose(file);
+ return FALSE;
+ }
+
+ if (!XkbRF_LoadRules(file, rules)) {
+ LogMessage(X_ERROR, "XKB: Couldn't parse rules file %s\n", rules_name);
+ fclose(file);
+ XkbRF_Free(rules,TRUE);
+ return FALSE;
+ }
+
+ memset(names, 0, sizeof(*names));
+ complete = XkbRF_GetComponents(rules,defs,names);
+ fclose(file);
+ XkbRF_Free(rules, TRUE);
+
+ if (!complete)
+ LogMessage(X_ERROR, "XKB: Rules returned no components\n");
+
+ return complete;
+}
+
+static Bool
+XkbRMLVOtoKcCGST(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, XkbComponentNamesPtr kccgst)
+{
+ XkbRF_VarDefsRec mlvo;
+
+ mlvo.model = rmlvo->model;
+ mlvo.layout = rmlvo->layout;
+ mlvo.variant = rmlvo->variant;
+ mlvo.options = rmlvo->options;
+
+ return XkbDDXNamesFromRules(dev, rmlvo->rules, &mlvo, kccgst);
+}
+
+/**
+ * Compile the given RMLVO keymap and return it. Returns the XkbDescPtr on
+ * success or NULL on failure. If the components compiled are not a superset
+ * or equal to need, the compiliation is treated as failure.
+ */
+static XkbDescPtr
+XkbCompileKeymapForDevice(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, int need)
+{
+ XkbDescPtr xkb = NULL;
+ unsigned int provided;
+ XkbComponentNamesRec kccgst = {0};
+ char name[PATH_MAX];
+
+ if (XkbRMLVOtoKcCGST(dev, rmlvo, &kccgst)) {
+ provided = XkbDDXLoadKeymapByNames(dev, &kccgst, XkmAllIndicesMask, need,
+ &xkb, name, PATH_MAX);
+ if ((need & provided) != need) {
+ if (xkb) {
+ XkbFreeKeyboard(xkb, 0, TRUE);
+ xkb = NULL;
+ }
+ }
+ }
+
+ XkbFreeComponentNames(&kccgst, FALSE);
+ return xkb;
+}
+
+XkbDescPtr
+XkbCompileKeymap(DeviceIntPtr dev, XkbRMLVOSet *rmlvo)
+{
+ XkbDescPtr xkb;
+ unsigned int need;
+
+ if (!dev || !rmlvo) {
+ LogMessage(X_ERROR, "XKB: No device or RMLVO specified\n");
+ return NULL;
+ }
+
+ /* These are the components we really really need */
+ need = XkmSymbolsMask | XkmCompatMapMask | XkmTypesMask |
+ XkmKeyNamesMask | XkmVirtualModsMask;
+
+
+ xkb = XkbCompileKeymapForDevice(dev, rmlvo, need);
+
+ if (!xkb) {
+ XkbRMLVOSet dflts;
+
+ /* we didn't get what we really needed. And that will likely leave
+ * us with a keyboard that doesn't work. Use the defaults instead */
+ LogMessage(X_ERROR, "XKB: Failed to load keymap. Loading default "
+ "keymap instead.\n");
+
+ XkbGetRulesDflts(&dflts);
+
+ xkb = XkbCompileKeymapForDevice(dev, &dflts, 0);
+
+ XkbFreeRMLVOSet(&dflts, FALSE);
+ }
+
+ return xkb;
+}
diff --git a/xorg-server/xkb/makefile b/xorg-server/xkb/makefile
new file mode 100644
index 000000000..e04599e52
--- /dev/null
+++ b/xorg-server/xkb/makefile
@@ -0,0 +1,42 @@
+DEFINES += HAVE_XKB_CONFIG_H
+
+DDX_SRCS = \
+ ddxBeep.c \
+ ddxCtrls.c \
+ ddxLEDs.c \
+ ddxLoad.c \
+ ddxList.c
+
+DIX_SRCS = \
+ xkb.c \
+ xkbUtils.c \
+ xkbEvents.c \
+ xkbAccessX.c \
+ xkbSwap.c \
+ xkbLEDs.c \
+ xkbInit.c \
+ xkbActions.c \
+ xkbPrKeyEv.c
+
+# this should be replaced by a common library or something, ideally -d
+XKBFILE_SRCS = \
+ maprules.c \
+ xkmread.c \
+ xkbtext.c \
+ xkbfmisc.c \
+ xkbout.c
+
+X11_SRCS = \
+ XKBMisc.c \
+ XKBAlloc.c \
+ XKBGAlloc.c \
+ XKBMAlloc.c
+
+# ends up unused...
+# XI_SRCS = xkbPrOtherEv.c
+
+CSRCS = $(DDX_SRCS) $(DIX_SRCS) $(XI_SRCS) $(XKBFILE_SRCS) \
+ $(X11_SRCS) ddxVT.c ddxPrivate.c ddxKillSrv.c
+
+LIBRARY=libxkb
+
diff --git a/xorg-server/xkb/maprules.c b/xorg-server/xkb/maprules.c
index f94089982..9d49eeb1b 100644
--- a/xorg-server/xkb/maprules.c
+++ b/xorg-server/xkb/maprules.c
@@ -1,1018 +1,1018 @@
-/************************************************************
- Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
-
- Permission to use, copy, modify, and distribute this
- software and its documentation for any purpose and without
- fee is hereby granted, provided that the above copyright
- notice appear in all copies and that both that copyright
- notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
- of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
- of this software for any purpose. It is provided "as is"
- without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
- THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
- ********************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-#define X_INCLUDE_STRING_H
-#define XOS_USE_NO_LOCKING
-#include <X11/Xos_r.h>
-
-#include <X11/Xproto.h>
-#include <X11/X.h>
-#include <X11/Xos.h>
-#include <X11/Xfuncs.h>
-#include <X11/Xatom.h>
-#include <X11/keysym.h>
-#include "misc.h"
-#include "inputstr.h"
-#include "dix.h"
-#include "os.h"
-#include "xkbstr.h"
-#define XKBSRV_NEED_FILE_FUNCS
-#include <xkbsrv.h>
-
-/***====================================================================***/
-
-
-
-#define DFLT_LINE_SIZE 128
-
-typedef struct {
- int line_num;
- int sz_line;
- int num_line;
- char buf[DFLT_LINE_SIZE];
- char * line;
-} InputLine;
-
-static void
-InitInputLine(InputLine *line)
-{
- line->line_num= 1;
- line->num_line= 0;
- line->sz_line= DFLT_LINE_SIZE;
- line->line= line->buf;
- return;
-}
-
-static void
-FreeInputLine(InputLine *line)
-{
- if (line->line!=line->buf)
- free(line->line);
- line->line_num= 1;
- line->num_line= 0;
- line->sz_line= DFLT_LINE_SIZE;
- line->line= line->buf;
- return;
-}
-
-static int
-InputLineAddChar(InputLine *line,int ch)
-{
- if (line->num_line>=line->sz_line) {
- if (line->line==line->buf) {
- line->line= malloc(line->sz_line*2);
- memcpy(line->line,line->buf,line->sz_line);
- }
- else {
- line->line= realloc((char *)line->line,line->sz_line*2);
- }
- line->sz_line*= 2;
- }
- line->line[line->num_line++]= ch;
- return ch;
-}
-
-#define ADD_CHAR(l,c) ((l)->num_line<(l)->sz_line?\
- (int)((l)->line[(l)->num_line++]= (c)):\
- InputLineAddChar(l,c))
-
-static Bool
-GetInputLine(FILE *file,InputLine *line,Bool checkbang)
-{
-int ch;
-Bool endOfFile,spacePending,slashPending,inComment;
-
- endOfFile= FALSE;
- while ((!endOfFile)&&(line->num_line==0)) {
- spacePending= slashPending= inComment= FALSE;
- while (((ch=getc(file))!='\n')&&(ch!=EOF)) {
- if (ch=='\\') {
- if ((ch=getc(file))==EOF)
- break;
- if (ch=='\n') {
- inComment= FALSE;
- ch= ' ';
- line->line_num++;
- }
- }
- if (inComment)
- continue;
- if (ch=='/') {
- if (slashPending) {
- inComment= TRUE;
- slashPending= FALSE;
- }
- else {
- slashPending= TRUE;
- }
- continue;
- }
- else if (slashPending) {
- if (spacePending) {
- ADD_CHAR(line,' ');
- spacePending= FALSE;
- }
- ADD_CHAR(line,'/');
- slashPending= FALSE;
- }
- if (isspace(ch)) {
- while (isspace(ch)&&(ch!='\n')&&(ch!=EOF)) {
- ch= getc(file);
- }
- if (ch==EOF)
- break;
- if ((ch!='\n')&&(line->num_line>0))
- spacePending= TRUE;
- ungetc(ch,file);
- }
- else {
- if (spacePending) {
- ADD_CHAR(line,' ');
- spacePending= FALSE;
- }
- if (checkbang && ch=='!') {
- if (line->num_line!=0) {
- DebugF("The '!' legal only at start of line\n");
- DebugF("Line containing '!' ignored\n");
- line->num_line= 0;
- inComment= 0;
- break;
- }
-
- }
- ADD_CHAR(line,ch);
- }
- }
- if (ch==EOF)
- endOfFile= TRUE;
-/* else line->num_line++;*/
- }
- if ((line->num_line==0)&&(endOfFile))
- return FALSE;
- ADD_CHAR(line,'\0');
- return TRUE;
-}
-
-/***====================================================================***/
-
-#define MODEL 0
-#define LAYOUT 1
-#define VARIANT 2
-#define OPTION 3
-#define KEYCODES 4
-#define SYMBOLS 5
-#define TYPES 6
-#define COMPAT 7
-#define GEOMETRY 8
-#define MAX_WORDS 9
-
-#define PART_MASK 0x000F
-#define COMPONENT_MASK 0x03F0
-
-static char * cname[MAX_WORDS] = {
- "model", "layout", "variant", "option",
- "keycodes", "symbols", "types", "compat", "geometry"
-};
-
-typedef struct _RemapSpec {
- int number;
- int num_remap;
- struct {
- int word;
- int index;
- } remap[MAX_WORDS];
-} RemapSpec;
-
-typedef struct _FileSpec {
- char * name[MAX_WORDS];
- struct _FileSpec * pending;
-} FileSpec;
-
-typedef struct {
- char * model;
- char * layout[XkbNumKbdGroups+1];
- char * variant[XkbNumKbdGroups+1];
- char * options;
-} XkbRF_MultiDefsRec, *XkbRF_MultiDefsPtr;
-
-#define NDX_BUFF_SIZE 4
-
-/***====================================================================***/
-
-static char*
-get_index(char *str, int *ndx)
-{
- char ndx_buf[NDX_BUFF_SIZE];
- char *end;
-
- if (*str != '[') {
- *ndx = 0;
- return str;
- }
- str++;
- end = strchr(str, ']');
- if (end == NULL) {
- *ndx = -1;
- return str - 1;
- }
- if ( (end - str) >= NDX_BUFF_SIZE) {
- *ndx = -1;
- return end + 1;
- }
- strncpy(ndx_buf, str, end - str);
- ndx_buf[end - str] = '\0';
- *ndx = atoi(ndx_buf);
- return end + 1;
-}
-
-static void
-SetUpRemap(InputLine *line,RemapSpec *remap)
-{
-char * tok,*str;
-unsigned present, l_ndx_present, v_ndx_present;
-register int i;
-int len, ndx;
-_Xstrtokparams strtok_buf;
-Bool found;
-
-
- l_ndx_present = v_ndx_present = present= 0;
- str= &line->line[1];
- len = remap->number;
- memset((char *)remap, 0, sizeof(RemapSpec));
- remap->number = len;
- while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) {
- found= FALSE;
- str= NULL;
- if (strcmp(tok,"=")==0)
- continue;
- for (i=0;i<MAX_WORDS;i++) {
- len = strlen(cname[i]);
- if (strncmp(cname[i],tok,len)==0) {
- if(strlen(tok) > len) {
- char *end = get_index(tok+len, &ndx);
- if ((i != LAYOUT && i != VARIANT) ||
- *end != '\0' || ndx == -1)
- break;
- if (ndx < 1 || ndx > XkbNumKbdGroups) {
- DebugF("Illegal %s index: %d\n", cname[i], ndx);
- DebugF("Index must be in range 1..%d\n",
- XkbNumKbdGroups);
- break;
- }
- } else {
- ndx = 0;
- }
- found= TRUE;
- if (present&(1<<i)) {
- if ((i == LAYOUT && l_ndx_present&(1<<ndx)) ||
- (i == VARIANT && v_ndx_present&(1<<ndx)) ) {
- DebugF("Component \"%s\" listed twice\n",tok);
- DebugF("Second definition ignored\n");
- break;
- }
- }
- present |= (1<<i);
- if (i == LAYOUT)
- l_ndx_present |= 1 << ndx;
- if (i == VARIANT)
- v_ndx_present |= 1 << ndx;
- remap->remap[remap->num_remap].word= i;
- remap->remap[remap->num_remap++].index= ndx;
- break;
- }
- }
- if (!found) {
- fprintf(stderr,"Unknown component \"%s\" ignored\n",tok);
- }
- }
- if ((present&PART_MASK)==0) {
- unsigned mask= PART_MASK;
- ErrorF("Mapping needs at least one of ");
- for (i=0; (i<MAX_WORDS); i++) {
- if ((1L<<i)&mask) {
- mask&= ~(1L<<i);
- if (mask) DebugF("\"%s,\" ",cname[i]);
- else DebugF("or \"%s\"\n",cname[i]);
- }
- }
- DebugF("Illegal mapping ignored\n");
- remap->num_remap= 0;
- return;
- }
- if ((present&COMPONENT_MASK)==0) {
- DebugF("Mapping needs at least one component\n");
- DebugF("Illegal mapping ignored\n");
- remap->num_remap= 0;
- return;
- }
- remap->number++;
- return;
-}
-
-static Bool
-MatchOneOf(char *wanted,char *vals_defined)
-{
-char *str,*next;
-int want_len= strlen(wanted);
-
- for (str=vals_defined,next=NULL;str!=NULL;str=next) {
- int len;
- next= strchr(str,',');
- if (next) {
- len= next-str;
- next++;
- }
- else {
- len= strlen(str);
- }
- if ((len==want_len)&&(strncmp(wanted,str,len)==0))
- return TRUE;
- }
- return FALSE;
-}
-
-/***====================================================================***/
-
-static Bool
-CheckLine( InputLine * line,
- RemapSpec * remap,
- XkbRF_RulePtr rule,
- XkbRF_GroupPtr group)
-{
-char * str,*tok;
-register int nread, i;
-FileSpec tmp;
-_Xstrtokparams strtok_buf;
-Bool append = FALSE;
-
- if (line->line[0]=='!') {
- if (line->line[1] == '$' ||
- (line->line[1] == ' ' && line->line[2] == '$')) {
- char *gname = strchr(line->line, '$');
- char *words = strchr(gname, ' ');
- if(!words)
- return FALSE;
- *words++ = '\0';
- for (; *words; words++) {
- if (*words != '=' && *words != ' ')
- break;
- }
- if (*words == '\0')
- return FALSE;
- group->name = Xstrdup(gname);
- group->words = Xstrdup(words);
- for (i = 1, words = group->words; *words; words++) {
- if ( *words == ' ') {
- *words++ = '\0';
- i++;
- }
- }
- group->number = i;
- return TRUE;
- } else {
- SetUpRemap(line,remap);
- return FALSE;
- }
- }
-
- if (remap->num_remap==0) {
- DebugF("Must have a mapping before first line of data\n");
- DebugF("Illegal line of data ignored\n");
- return FALSE;
- }
- memset((char *)&tmp, 0, sizeof(FileSpec));
- str= line->line;
- for (nread= 0;(tok=_XStrtok(str," ",strtok_buf))!=NULL;nread++) {
- str= NULL;
- if (strcmp(tok,"=")==0) {
- nread--;
- continue;
- }
- if (nread>remap->num_remap) {
- DebugF("Too many words on a line\n");
- DebugF("Extra word \"%s\" ignored\n",tok);
- continue;
- }
- tmp.name[remap->remap[nread].word]= tok;
- if (*tok == '+' || *tok == '|')
- append = TRUE;
- }
- if (nread<remap->num_remap) {
- DebugF("Too few words on a line: %s\n", line->line);
- DebugF("line ignored\n");
- return FALSE;
- }
-
- rule->flags= 0;
- rule->number = remap->number;
- if (tmp.name[OPTION])
- rule->flags|= XkbRF_Option;
- else if (append)
- rule->flags|= XkbRF_Append;
- else
- rule->flags|= XkbRF_Normal;
- rule->model= Xstrdup(tmp.name[MODEL]);
- rule->layout= Xstrdup(tmp.name[LAYOUT]);
- rule->variant= Xstrdup(tmp.name[VARIANT]);
- rule->option= Xstrdup(tmp.name[OPTION]);
-
- rule->keycodes= Xstrdup(tmp.name[KEYCODES]);
- rule->symbols= Xstrdup(tmp.name[SYMBOLS]);
- rule->types= Xstrdup(tmp.name[TYPES]);
- rule->compat= Xstrdup(tmp.name[COMPAT]);
- rule->geometry= Xstrdup(tmp.name[GEOMETRY]);
-
- rule->layout_num = rule->variant_num = 0;
- for (i = 0; i < nread; i++) {
- if (remap->remap[i].index) {
- if (remap->remap[i].word == LAYOUT)
- rule->layout_num = remap->remap[i].index;
- if (remap->remap[i].word == VARIANT)
- rule->variant_num = remap->remap[i].index;
- }
- }
- return TRUE;
-}
-
-static char *
-_Concat(char *str1,char *str2)
-{
-int len;
-
- if ((!str1)||(!str2))
- return str1;
- len= strlen(str1)+strlen(str2)+1;
- str1= realloc(str1,len * sizeof(char));
- if (str1)
- strcat(str1,str2);
- return str1;
-}
-
-static void
-squeeze_spaces(char *p1)
-{
- char *p2;
- for (p2 = p1; *p2; p2++) {
- *p1 = *p2;
- if (*p1 != ' ') p1++;
- }
- *p1 = '\0';
-}
-
-static Bool
-MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs)
-{
-
- memset((char *)mdefs, 0, sizeof(XkbRF_MultiDefsRec));
- mdefs->model = defs->model;
- mdefs->options = Xstrdup(defs->options);
- if (mdefs->options) squeeze_spaces(mdefs->options);
-
- if (defs->layout) {
- if (!strchr(defs->layout, ',')) {
- mdefs->layout[0] = defs->layout;
- } else {
- char *p;
- int i;
- mdefs->layout[1] = Xstrdup(defs->layout);
- if (mdefs->layout[1] == NULL)
- return FALSE;
- squeeze_spaces(mdefs->layout[1]);
- p = mdefs->layout[1];
- for (i = 2; i <= XkbNumKbdGroups; i++) {
- if ((p = strchr(p, ','))) {
- *p++ = '\0';
- mdefs->layout[i] = p;
- } else {
- break;
- }
- }
- if (p && (p = strchr(p, ',')))
- *p = '\0';
- }
- }
-
- if (defs->variant) {
- if (!strchr(defs->variant, ',')) {
- mdefs->variant[0] = defs->variant;
- } else {
- char *p;
- int i;
- mdefs->variant[1] = Xstrdup(defs->variant);
- if (mdefs->variant[1] == NULL)
- return FALSE;
- squeeze_spaces(mdefs->variant[1]);
- p = mdefs->variant[1];
- for (i = 2; i <= XkbNumKbdGroups; i++) {
- if ((p = strchr(p, ','))) {
- *p++ = '\0';
- mdefs->variant[i] = p;
- } else {
- break;
- }
- }
- if (p && (p = strchr(p, ',')))
- *p = '\0';
- }
- }
- return TRUE;
-}
-
-static void
-FreeMultiDefs(XkbRF_MultiDefsPtr defs)
-{
- free(defs->options);
- free(defs->layout[1]);
- free(defs->variant[1]);
-}
-
-static void
-Apply(char *src, char **dst)
-{
- if (src) {
- if (*src == '+' || *src == '!') {
- *dst= _Concat(*dst, src);
- } else {
- if (*dst == NULL)
- *dst= Xstrdup(src);
- }
- }
-}
-
-static void
-XkbRF_ApplyRule( XkbRF_RulePtr rule,
- XkbComponentNamesPtr names)
-{
- rule->flags&= ~XkbRF_PendingMatch; /* clear the flag because it's applied */
-
- Apply(rule->keycodes, &names->keycodes);
- Apply(rule->symbols, &names->symbols);
- Apply(rule->types, &names->types);
- Apply(rule->compat, &names->compat);
- Apply(rule->geometry, &names->geometry);
-}
-
-static Bool
-CheckGroup( XkbRF_RulesPtr rules,
- char * group_name,
- char * name)
-{
- int i;
- char *p;
- XkbRF_GroupPtr group;
-
- for (i = 0, group = rules->groups; i < rules->num_groups; i++, group++) {
- if (! strcmp(group->name, group_name)) {
- break;
- }
- }
- if (i == rules->num_groups)
- return FALSE;
- for (i = 0, p = group->words; i < group->number; i++, p += strlen(p)+1) {
- if (! strcmp(p, name)) {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static int
-XkbRF_CheckApplyRule( XkbRF_RulePtr rule,
- XkbRF_MultiDefsPtr mdefs,
- XkbComponentNamesPtr names,
- XkbRF_RulesPtr rules)
-{
- Bool pending = FALSE;
-
- if (rule->model != NULL) {
- if(mdefs->model == NULL)
- return 0;
- if (strcmp(rule->model, "*") == 0) {
- pending = TRUE;
- } else {
- if (rule->model[0] == '$') {
- if (!CheckGroup(rules, rule->model, mdefs->model))
- return 0;
- } else {
- if (strcmp(rule->model, mdefs->model) != 0)
- return 0;
- }
- }
- }
- if (rule->option != NULL) {
- if (mdefs->options == NULL)
- return 0;
- if ((!MatchOneOf(rule->option,mdefs->options)))
- return 0;
- }
-
- if (rule->layout != NULL) {
- if(mdefs->layout[rule->layout_num] == NULL ||
- *mdefs->layout[rule->layout_num] == '\0')
- return 0;
- if (strcmp(rule->layout, "*") == 0) {
- pending = TRUE;
- } else {
- if (rule->layout[0] == '$') {
- if (!CheckGroup(rules, rule->layout,
- mdefs->layout[rule->layout_num]))
- return 0;
- } else {
- if (strcmp(rule->layout, mdefs->layout[rule->layout_num]) != 0)
- return 0;
- }
- }
- }
- if (rule->variant != NULL) {
- if (mdefs->variant[rule->variant_num] == NULL ||
- *mdefs->variant[rule->variant_num] == '\0')
- return 0;
- if (strcmp(rule->variant, "*") == 0) {
- pending = TRUE;
- } else {
- if (rule->variant[0] == '$') {
- if (!CheckGroup(rules, rule->variant,
- mdefs->variant[rule->variant_num]))
- return 0;
- } else {
- if (strcmp(rule->variant,
- mdefs->variant[rule->variant_num]) != 0)
- return 0;
- }
- }
- }
- if (pending) {
- rule->flags|= XkbRF_PendingMatch;
- return rule->number;
- }
- /* exact match, apply it now */
- XkbRF_ApplyRule(rule,names);
- return rule->number;
-}
-
-static void
-XkbRF_ClearPartialMatches(XkbRF_RulesPtr rules)
-{
-register int i;
-XkbRF_RulePtr rule;
-
- for (i=0,rule=rules->rules;i<rules->num_rules;i++,rule++) {
- rule->flags&= ~XkbRF_PendingMatch;
- }
-}
-
-static void
-XkbRF_ApplyPartialMatches(XkbRF_RulesPtr rules,XkbComponentNamesPtr names)
-{
-int i;
-XkbRF_RulePtr rule;
-
- for (rule = rules->rules, i = 0; i < rules->num_rules; i++, rule++) {
- if ((rule->flags&XkbRF_PendingMatch)==0)
- continue;
- XkbRF_ApplyRule(rule,names);
- }
-}
-
-static void
-XkbRF_CheckApplyRules( XkbRF_RulesPtr rules,
- XkbRF_MultiDefsPtr mdefs,
- XkbComponentNamesPtr names,
- int flags)
-{
-int i;
-XkbRF_RulePtr rule;
-int skip;
-
- for (rule = rules->rules, i=0; i < rules->num_rules; rule++, i++) {
- if ((rule->flags & flags) != flags)
- continue;
- skip = XkbRF_CheckApplyRule(rule, mdefs, names, rules);
- if (skip && !(flags & XkbRF_Option)) {
- for ( ;(i < rules->num_rules) && (rule->number == skip);
- rule++, i++);
- rule--; i--;
- }
- }
-}
-
-/***====================================================================***/
-
-static char *
-XkbRF_SubstituteVars(char *name, XkbRF_MultiDefsPtr mdefs)
-{
-char *str, *outstr, *orig, *var;
-int len, ndx;
-
- orig= name;
- str= index(name,'%');
- if (str==NULL)
- return name;
- len= strlen(name);
- while (str!=NULL) {
- char pfx= str[1];
- int extra_len= 0;
- if ((pfx=='+')||(pfx=='|')||(pfx=='_')||(pfx=='-')) {
- extra_len= 1;
- str++;
- }
- else if (pfx=='(') {
- extra_len= 2;
- str++;
- }
- var = str + 1;
- str = get_index(var + 1, &ndx);
- if (ndx == -1) {
- str = index(str,'%');
- continue;
- }
- if ((*var=='l') && mdefs->layout[ndx] && *mdefs->layout[ndx])
- len+= strlen(mdefs->layout[ndx])+extra_len;
- else if ((*var=='m')&&mdefs->model)
- len+= strlen(mdefs->model)+extra_len;
- else if ((*var=='v') && mdefs->variant[ndx] && *mdefs->variant[ndx])
- len+= strlen(mdefs->variant[ndx])+extra_len;
- if ((pfx=='(')&&(*str==')')) {
- str++;
- }
- str= index(&str[0],'%');
- }
- name= malloc(len+1);
- str= orig;
- outstr= name;
- while (*str!='\0') {
- if (str[0]=='%') {
- char pfx,sfx;
- str++;
- pfx= str[0];
- sfx= '\0';
- if ((pfx=='+')||(pfx=='|')||(pfx=='_')||(pfx=='-')) {
- str++;
- }
- else if (pfx=='(') {
- sfx= ')';
- str++;
- }
- else pfx= '\0';
-
- var = str;
- str = get_index(var + 1, &ndx);
- if (ndx == -1) {
- continue;
- }
- if ((*var=='l') && mdefs->layout[ndx] && *mdefs->layout[ndx]) {
- if (pfx) *outstr++= pfx;
- strcpy(outstr,mdefs->layout[ndx]);
- outstr+= strlen(mdefs->layout[ndx]);
- if (sfx) *outstr++= sfx;
- }
- else if ((*var=='m')&&(mdefs->model)) {
- if (pfx) *outstr++= pfx;
- strcpy(outstr,mdefs->model);
- outstr+= strlen(mdefs->model);
- if (sfx) *outstr++= sfx;
- }
- else if ((*var=='v') && mdefs->variant[ndx] && *mdefs->variant[ndx]) {
- if (pfx) *outstr++= pfx;
- strcpy(outstr,mdefs->variant[ndx]);
- outstr+= strlen(mdefs->variant[ndx]);
- if (sfx) *outstr++= sfx;
- }
- if ((pfx=='(')&&(*str==')'))
- str++;
- }
- else {
- *outstr++= *str++;
- }
- }
- *outstr++= '\0';
- if (orig!=name)
- free(orig);
- return name;
-}
-
-/***====================================================================***/
-
-Bool
-XkbRF_GetComponents( XkbRF_RulesPtr rules,
- XkbRF_VarDefsPtr defs,
- XkbComponentNamesPtr names)
-{
- XkbRF_MultiDefsRec mdefs;
-
- MakeMultiDefs(&mdefs, defs);
-
- memset((char *)names, 0, sizeof(XkbComponentNamesRec));
- XkbRF_ClearPartialMatches(rules);
- XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Normal);
- XkbRF_ApplyPartialMatches(rules, names);
- XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Append);
- XkbRF_ApplyPartialMatches(rules, names);
- XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Option);
-
- if (names->keycodes)
- names->keycodes= XkbRF_SubstituteVars(names->keycodes, &mdefs);
- if (names->symbols)
- names->symbols= XkbRF_SubstituteVars(names->symbols, &mdefs);
- if (names->types)
- names->types= XkbRF_SubstituteVars(names->types, &mdefs);
- if (names->compat)
- names->compat= XkbRF_SubstituteVars(names->compat, &mdefs);
- if (names->geometry)
- names->geometry= XkbRF_SubstituteVars(names->geometry, &mdefs);
-
- FreeMultiDefs(&mdefs);
- return (names->keycodes && names->symbols && names->types &&
- names->compat && names->geometry);
-}
-
-static XkbRF_RulePtr
-XkbRF_AddRule(XkbRF_RulesPtr rules)
-{
- if (rules->sz_rules<1) {
- rules->sz_rules= 16;
- rules->num_rules= 0;
- rules->rules= calloc(rules->sz_rules, sizeof(XkbRF_RuleRec));
- }
- else if (rules->num_rules>=rules->sz_rules) {
- rules->sz_rules*= 2;
- rules->rules= realloc(rules->rules,
- rules->sz_rules * sizeof(XkbRF_RuleRec));
- }
- if (!rules->rules) {
- rules->sz_rules= rules->num_rules= 0;
- DebugF("Allocation failure in XkbRF_AddRule\n");
- return NULL;
- }
- memset((char *)&rules->rules[rules->num_rules], 0, sizeof(XkbRF_RuleRec));
- return &rules->rules[rules->num_rules++];
-}
-
-static XkbRF_GroupPtr
-XkbRF_AddGroup(XkbRF_RulesPtr rules)
-{
- if (rules->sz_groups<1) {
- rules->sz_groups= 16;
- rules->num_groups= 0;
- rules->groups= calloc(rules->sz_groups, sizeof(XkbRF_GroupRec));
- }
- else if (rules->num_groups >= rules->sz_groups) {
- rules->sz_groups *= 2;
- rules->groups= realloc(rules->groups,
- rules->sz_groups * sizeof(XkbRF_GroupRec));
- }
- if (!rules->groups) {
- rules->sz_groups= rules->num_groups= 0;
- return NULL;
- }
-
- memset((char *)&rules->groups[rules->num_groups], 0, sizeof(XkbRF_GroupRec));
- return &rules->groups[rules->num_groups++];
-}
-
-Bool
-XkbRF_LoadRules(FILE *file, XkbRF_RulesPtr rules)
-{
-InputLine line;
-RemapSpec remap;
-XkbRF_RuleRec trule,*rule;
-XkbRF_GroupRec tgroup,*group;
-
- if (!(rules && file))
- return FALSE;
- memset((char *)&remap, 0, sizeof(RemapSpec));
- memset((char *)&tgroup, 0, sizeof(XkbRF_GroupRec));
- InitInputLine(&line);
- while (GetInputLine(file,&line,TRUE)) {
- if (CheckLine(&line,&remap,&trule,&tgroup)) {
- if (tgroup.number) {
- if ((group= XkbRF_AddGroup(rules))!=NULL) {
- *group= tgroup;
- memset((char *)&tgroup, 0, sizeof(XkbRF_GroupRec));
- }
- } else {
- if ((rule= XkbRF_AddRule(rules))!=NULL) {
- *rule= trule;
- memset((char *)&trule, 0, sizeof(XkbRF_RuleRec));
- }
- }
- }
- line.num_line= 0;
- }
- FreeInputLine(&line);
- return TRUE;
-}
-
-Bool
-XkbRF_LoadRulesByName(char *base,char *locale,XkbRF_RulesPtr rules)
-{
-FILE * file;
-char buf[PATH_MAX];
-Bool ok;
-
- if ((!base)||(!rules))
- return FALSE;
- if (locale) {
- if (snprintf(buf, PATH_MAX, "%s-%s", base, locale) >= PATH_MAX)
- return FALSE;
- }
- else {
- if (strlen(base)+1 > PATH_MAX)
- return FALSE;
- strcpy(buf,base);
- }
-
- file= fopen(buf, "r");
- if ((!file)&&(locale)) { /* fallback if locale was specified */
- strcpy(buf,base);
- file= fopen(buf, "r");
- }
- if (!file)
- return FALSE;
- ok= XkbRF_LoadRules(file,rules);
- fclose(file);
- return ok;
-}
-
-/***====================================================================***/
-
-XkbRF_RulesPtr
-XkbRF_Create(void)
-{
- return calloc(1, sizeof( XkbRF_RulesRec));
-}
-
-/***====================================================================***/
-
-void
-XkbRF_Free(XkbRF_RulesPtr rules,Bool freeRules)
-{
-int i;
-XkbRF_RulePtr rule;
-XkbRF_GroupPtr group;
-
- if (!rules)
- return;
- if (rules->rules) {
- for (i=0,rule=rules->rules;i<rules->num_rules;i++,rule++) {
- free(rule->model);
- free(rule->layout);
- free(rule->variant);
- free(rule->option);
- free(rule->keycodes);
- free(rule->symbols);
- free(rule->types);
- free(rule->compat);
- free(rule->geometry);
- memset((char *)rule, 0, sizeof(XkbRF_RuleRec));
- }
- free(rules->rules);
- rules->num_rules= rules->sz_rules= 0;
- rules->rules= NULL;
- }
-
- if (rules->groups) {
- for (i=0, group=rules->groups;i<rules->num_groups;i++,group++) {
- free(group->name);
- free(group->words);
- }
- free(rules->groups);
- rules->num_groups= 0;
- rules->groups= NULL;
- }
- if (freeRules)
- free(rules);
- return;
-}
+/************************************************************
+ Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+#define X_INCLUDE_STRING_H
+#define XOS_USE_NO_LOCKING
+#include <X11/Xos_r.h>
+
+#include <X11/Xproto.h>
+#include <X11/X.h>
+#include <X11/Xos.h>
+#include <X11/Xfuncs.h>
+#include <X11/Xatom.h>
+#include <X11/keysym.h>
+#include "misc.h"
+#include "inputstr.h"
+#include "dix.h"
+#include "os.h"
+#include "xkbstr.h"
+#define XKBSRV_NEED_FILE_FUNCS
+#include <xkbsrv.h>
+
+/***====================================================================***/
+
+
+
+#define DFLT_LINE_SIZE 128
+
+typedef struct {
+ int line_num;
+ int sz_line;
+ int num_line;
+ char buf[DFLT_LINE_SIZE];
+ char * line;
+} InputLine;
+
+static void
+InitInputLine(InputLine *line)
+{
+ line->line_num= 1;
+ line->num_line= 0;
+ line->sz_line= DFLT_LINE_SIZE;
+ line->line= line->buf;
+ return;
+}
+
+static void
+FreeInputLine(InputLine *line)
+{
+ if (line->line!=line->buf)
+ free(line->line);
+ line->line_num= 1;
+ line->num_line= 0;
+ line->sz_line= DFLT_LINE_SIZE;
+ line->line= line->buf;
+ return;
+}
+
+static int
+InputLineAddChar(InputLine *line,int ch)
+{
+ if (line->num_line>=line->sz_line) {
+ if (line->line==line->buf) {
+ line->line= malloc(line->sz_line*2);
+ memcpy(line->line,line->buf,line->sz_line);
+ }
+ else {
+ line->line= realloc((char *)line->line,line->sz_line*2);
+ }
+ line->sz_line*= 2;
+ }
+ line->line[line->num_line++]= ch;
+ return ch;
+}
+
+#define ADD_CHAR(l,c) ((l)->num_line<(l)->sz_line?\
+ (int)((l)->line[(l)->num_line++]= (c)):\
+ InputLineAddChar(l,c))
+
+static Bool
+GetInputLine(FILE *file,InputLine *line,Bool checkbang)
+{
+int ch;
+Bool endOfFile,spacePending,slashPending,inComment;
+
+ endOfFile= FALSE;
+ while ((!endOfFile)&&(line->num_line==0)) {
+ spacePending= slashPending= inComment= FALSE;
+ while (((ch=getc(file))!='\n')&&(ch!=EOF)) {
+ if (ch=='\\') {
+ if ((ch=getc(file))==EOF)
+ break;
+ if (ch=='\n') {
+ inComment= FALSE;
+ ch= ' ';
+ line->line_num++;
+ }
+ }
+ if (inComment)
+ continue;
+ if (ch=='/') {
+ if (slashPending) {
+ inComment= TRUE;
+ slashPending= FALSE;
+ }
+ else {
+ slashPending= TRUE;
+ }
+ continue;
+ }
+ else if (slashPending) {
+ if (spacePending) {
+ ADD_CHAR(line,' ');
+ spacePending= FALSE;
+ }
+ ADD_CHAR(line,'/');
+ slashPending= FALSE;
+ }
+ if (isspace(ch)) {
+ while (isspace(ch)&&(ch!='\n')&&(ch!=EOF)) {
+ ch= getc(file);
+ }
+ if (ch==EOF)
+ break;
+ if ((ch!='\n')&&(line->num_line>0))
+ spacePending= TRUE;
+ ungetc(ch,file);
+ }
+ else {
+ if (spacePending) {
+ ADD_CHAR(line,' ');
+ spacePending= FALSE;
+ }
+ if (checkbang && ch=='!') {
+ if (line->num_line!=0) {
+ DebugF("The '!' legal only at start of line\n");
+ DebugF("Line containing '!' ignored\n");
+ line->num_line= 0;
+ inComment= 0;
+ break;
+ }
+
+ }
+ ADD_CHAR(line,ch);
+ }
+ }
+ if (ch==EOF)
+ endOfFile= TRUE;
+/* else line->num_line++;*/
+ }
+ if ((line->num_line==0)&&(endOfFile))
+ return FALSE;
+ ADD_CHAR(line,'\0');
+ return TRUE;
+}
+
+/***====================================================================***/
+
+#define MODEL 0
+#define LAYOUT 1
+#define VARIANT 2
+#define OPTION 3
+#define KEYCODES 4
+#define SYMBOLS 5
+#define TYPES 6
+#define COMPAT 7
+#define GEOMETRY 8
+#define MAX_WORDS 9
+
+#define PART_MASK 0x000F
+#define COMPONENT_MASK 0x03F0
+
+static char * cname[MAX_WORDS] = {
+ "model", "layout", "variant", "option",
+ "keycodes", "symbols", "types", "compat", "geometry"
+};
+
+typedef struct _RemapSpec {
+ int number;
+ int num_remap;
+ struct {
+ int word;
+ int index;
+ } remap[MAX_WORDS];
+} RemapSpec;
+
+typedef struct _FileSpec {
+ char * name[MAX_WORDS];
+ struct _FileSpec * pending;
+} FileSpec;
+
+typedef struct {
+ char * model;
+ char * layout[XkbNumKbdGroups+1];
+ char * variant[XkbNumKbdGroups+1];
+ char * options;
+} XkbRF_MultiDefsRec, *XkbRF_MultiDefsPtr;
+
+#define NDX_BUFF_SIZE 4
+
+/***====================================================================***/
+
+static char*
+get_index(char *str, int *ndx)
+{
+ char ndx_buf[NDX_BUFF_SIZE];
+ char *end;
+
+ if (*str != '[') {
+ *ndx = 0;
+ return str;
+ }
+ str++;
+ end = strchr(str, ']');
+ if (end == NULL) {
+ *ndx = -1;
+ return str - 1;
+ }
+ if ( (end - str) >= NDX_BUFF_SIZE) {
+ *ndx = -1;
+ return end + 1;
+ }
+ strncpy(ndx_buf, str, end - str);
+ ndx_buf[end - str] = '\0';
+ *ndx = atoi(ndx_buf);
+ return end + 1;
+}
+
+static void
+SetUpRemap(InputLine *line,RemapSpec *remap)
+{
+char * tok,*str;
+unsigned present, l_ndx_present, v_ndx_present;
+register int i;
+int len, ndx;
+_Xstrtokparams strtok_buf;
+Bool found;
+
+
+ l_ndx_present = v_ndx_present = present= 0;
+ str= &line->line[1];
+ len = remap->number;
+ memset((char *)remap, 0, sizeof(RemapSpec));
+ remap->number = len;
+ while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) {
+ found= FALSE;
+ str= NULL;
+ if (strcmp(tok,"=")==0)
+ continue;
+ for (i=0;i<MAX_WORDS;i++) {
+ len = strlen(cname[i]);
+ if (strncmp(cname[i],tok,len)==0) {
+ if(strlen(tok) > len) {
+ char *end = get_index(tok+len, &ndx);
+ if ((i != LAYOUT && i != VARIANT) ||
+ *end != '\0' || ndx == -1)
+ break;
+ if (ndx < 1 || ndx > XkbNumKbdGroups) {
+ DebugF("Illegal %s index: %d\n", cname[i], ndx);
+ DebugF("Index must be in range 1..%d\n",
+ XkbNumKbdGroups);
+ break;
+ }
+ } else {
+ ndx = 0;
+ }
+ found= TRUE;
+ if (present&(1<<i)) {
+ if ((i == LAYOUT && l_ndx_present&(1<<ndx)) ||
+ (i == VARIANT && v_ndx_present&(1<<ndx)) ) {
+ DebugF("Component \"%s\" listed twice\n",tok);
+ DebugF("Second definition ignored\n");
+ break;
+ }
+ }
+ present |= (1<<i);
+ if (i == LAYOUT)
+ l_ndx_present |= 1 << ndx;
+ if (i == VARIANT)
+ v_ndx_present |= 1 << ndx;
+ remap->remap[remap->num_remap].word= i;
+ remap->remap[remap->num_remap++].index= ndx;
+ break;
+ }
+ }
+ if (!found) {
+ fprintf(stderr,"Unknown component \"%s\" ignored\n",tok);
+ }
+ }
+ if ((present&PART_MASK)==0) {
+ unsigned mask= PART_MASK;
+ ErrorF("Mapping needs at least one of ");
+ for (i=0; (i<MAX_WORDS); i++) {
+ if ((1L<<i)&mask) {
+ mask&= ~(1L<<i);
+ if (mask) DebugF("\"%s,\" ",cname[i]);
+ else DebugF("or \"%s\"\n",cname[i]);
+ }
+ }
+ DebugF("Illegal mapping ignored\n");
+ remap->num_remap= 0;
+ return;
+ }
+ if ((present&COMPONENT_MASK)==0) {
+ DebugF("Mapping needs at least one component\n");
+ DebugF("Illegal mapping ignored\n");
+ remap->num_remap= 0;
+ return;
+ }
+ remap->number++;
+ return;
+}
+
+static Bool
+MatchOneOf(char *wanted,char *vals_defined)
+{
+char *str,*next;
+int want_len= strlen(wanted);
+
+ for (str=vals_defined,next=NULL;str!=NULL;str=next) {
+ int len;
+ next= strchr(str,',');
+ if (next) {
+ len= next-str;
+ next++;
+ }
+ else {
+ len= strlen(str);
+ }
+ if ((len==want_len)&&(strncmp(wanted,str,len)==0))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/***====================================================================***/
+
+static Bool
+CheckLine( InputLine * line,
+ RemapSpec * remap,
+ XkbRF_RulePtr rule,
+ XkbRF_GroupPtr group)
+{
+char * str,*tok;
+register int nread, i;
+FileSpec tmp;
+_Xstrtokparams strtok_buf;
+Bool append = FALSE;
+
+ if (line->line[0]=='!') {
+ if (line->line[1] == '$' ||
+ (line->line[1] == ' ' && line->line[2] == '$')) {
+ char *gname = strchr(line->line, '$');
+ char *words = strchr(gname, ' ');
+ if(!words)
+ return FALSE;
+ *words++ = '\0';
+ for (; *words; words++) {
+ if (*words != '=' && *words != ' ')
+ break;
+ }
+ if (*words == '\0')
+ return FALSE;
+ group->name = Xstrdup(gname);
+ group->words = Xstrdup(words);
+ for (i = 1, words = group->words; *words; words++) {
+ if ( *words == ' ') {
+ *words++ = '\0';
+ i++;
+ }
+ }
+ group->number = i;
+ return TRUE;
+ } else {
+ SetUpRemap(line,remap);
+ return FALSE;
+ }
+ }
+
+ if (remap->num_remap==0) {
+ DebugF("Must have a mapping before first line of data\n");
+ DebugF("Illegal line of data ignored\n");
+ return FALSE;
+ }
+ memset((char *)&tmp, 0, sizeof(FileSpec));
+ str= line->line;
+ for (nread= 0;(tok=_XStrtok(str," ",strtok_buf))!=NULL;nread++) {
+ str= NULL;
+ if (strcmp(tok,"=")==0) {
+ nread--;
+ continue;
+ }
+ if (nread>remap->num_remap) {
+ DebugF("Too many words on a line\n");
+ DebugF("Extra word \"%s\" ignored\n",tok);
+ continue;
+ }
+ tmp.name[remap->remap[nread].word]= tok;
+ if (*tok == '+' || *tok == '|')
+ append = TRUE;
+ }
+ if (nread<remap->num_remap) {
+ DebugF("Too few words on a line: %s\n", line->line);
+ DebugF("line ignored\n");
+ return FALSE;
+ }
+
+ rule->flags= 0;
+ rule->number = remap->number;
+ if (tmp.name[OPTION])
+ rule->flags|= XkbRF_Option;
+ else if (append)
+ rule->flags|= XkbRF_Append;
+ else
+ rule->flags|= XkbRF_Normal;
+ rule->model= Xstrdup(tmp.name[MODEL]);
+ rule->layout= Xstrdup(tmp.name[LAYOUT]);
+ rule->variant= Xstrdup(tmp.name[VARIANT]);
+ rule->option= Xstrdup(tmp.name[OPTION]);
+
+ rule->keycodes= Xstrdup(tmp.name[KEYCODES]);
+ rule->symbols= Xstrdup(tmp.name[SYMBOLS]);
+ rule->types= Xstrdup(tmp.name[TYPES]);
+ rule->compat= Xstrdup(tmp.name[COMPAT]);
+ rule->geometry= Xstrdup(tmp.name[GEOMETRY]);
+
+ rule->layout_num = rule->variant_num = 0;
+ for (i = 0; i < nread; i++) {
+ if (remap->remap[i].index) {
+ if (remap->remap[i].word == LAYOUT)
+ rule->layout_num = remap->remap[i].index;
+ if (remap->remap[i].word == VARIANT)
+ rule->variant_num = remap->remap[i].index;
+ }
+ }
+ return TRUE;
+}
+
+static char *
+_Concat(char *str1,char *str2)
+{
+int len;
+
+ if ((!str1)||(!str2))
+ return str1;
+ len= strlen(str1)+strlen(str2)+1;
+ str1= realloc(str1,len * sizeof(char));
+ if (str1)
+ strcat(str1,str2);
+ return str1;
+}
+
+static void
+squeeze_spaces(char *p1)
+{
+ char *p2;
+ for (p2 = p1; *p2; p2++) {
+ *p1 = *p2;
+ if (*p1 != ' ') p1++;
+ }
+ *p1 = '\0';
+}
+
+static Bool
+MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs)
+{
+
+ memset((char *)mdefs, 0, sizeof(XkbRF_MultiDefsRec));
+ mdefs->model = defs->model;
+ mdefs->options = Xstrdup(defs->options);
+ if (mdefs->options) squeeze_spaces(mdefs->options);
+
+ if (defs->layout) {
+ if (!strchr(defs->layout, ',')) {
+ mdefs->layout[0] = defs->layout;
+ } else {
+ char *p;
+ int i;
+ mdefs->layout[1] = Xstrdup(defs->layout);
+ if (mdefs->layout[1] == NULL)
+ return FALSE;
+ squeeze_spaces(mdefs->layout[1]);
+ p = mdefs->layout[1];
+ for (i = 2; i <= XkbNumKbdGroups; i++) {
+ if ((p = strchr(p, ','))) {
+ *p++ = '\0';
+ mdefs->layout[i] = p;
+ } else {
+ break;
+ }
+ }
+ if (p && (p = strchr(p, ',')))
+ *p = '\0';
+ }
+ }
+
+ if (defs->variant) {
+ if (!strchr(defs->variant, ',')) {
+ mdefs->variant[0] = defs->variant;
+ } else {
+ char *p;
+ int i;
+ mdefs->variant[1] = Xstrdup(defs->variant);
+ if (mdefs->variant[1] == NULL)
+ return FALSE;
+ squeeze_spaces(mdefs->variant[1]);
+ p = mdefs->variant[1];
+ for (i = 2; i <= XkbNumKbdGroups; i++) {
+ if ((p = strchr(p, ','))) {
+ *p++ = '\0';
+ mdefs->variant[i] = p;
+ } else {
+ break;
+ }
+ }
+ if (p && (p = strchr(p, ',')))
+ *p = '\0';
+ }
+ }
+ return TRUE;
+}
+
+static void
+FreeMultiDefs(XkbRF_MultiDefsPtr defs)
+{
+ free(defs->options);
+ free(defs->layout[1]);
+ free(defs->variant[1]);
+}
+
+static void
+Apply(char *src, char **dst)
+{
+ if (src) {
+ if (*src == '+' || *src == '!') {
+ *dst= _Concat(*dst, src);
+ } else {
+ if (*dst == NULL)
+ *dst= Xstrdup(src);
+ }
+ }
+}
+
+static void
+XkbRF_ApplyRule( XkbRF_RulePtr rule,
+ XkbComponentNamesPtr names)
+{
+ rule->flags&= ~XkbRF_PendingMatch; /* clear the flag because it's applied */
+
+ Apply(rule->keycodes, &names->keycodes);
+ Apply(rule->symbols, &names->symbols);
+ Apply(rule->types, &names->types);
+ Apply(rule->compat, &names->compat);
+ Apply(rule->geometry, &names->geometry);
+}
+
+static Bool
+CheckGroup( XkbRF_RulesPtr rules,
+ char * group_name,
+ char * name)
+{
+ int i;
+ char *p;
+ XkbRF_GroupPtr group;
+
+ for (i = 0, group = rules->groups; i < rules->num_groups; i++, group++) {
+ if (! strcmp(group->name, group_name)) {
+ break;
+ }
+ }
+ if (i == rules->num_groups)
+ return FALSE;
+ for (i = 0, p = group->words; i < group->number; i++, p += strlen(p)+1) {
+ if (! strcmp(p, name)) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static int
+XkbRF_CheckApplyRule( XkbRF_RulePtr rule,
+ XkbRF_MultiDefsPtr mdefs,
+ XkbComponentNamesPtr names,
+ XkbRF_RulesPtr rules)
+{
+ Bool pending = FALSE;
+
+ if (rule->model != NULL) {
+ if(mdefs->model == NULL)
+ return 0;
+ if (strcmp(rule->model, "*") == 0) {
+ pending = TRUE;
+ } else {
+ if (rule->model[0] == '$') {
+ if (!CheckGroup(rules, rule->model, mdefs->model))
+ return 0;
+ } else {
+ if (strcmp(rule->model, mdefs->model) != 0)
+ return 0;
+ }
+ }
+ }
+ if (rule->option != NULL) {
+ if (mdefs->options == NULL)
+ return 0;
+ if ((!MatchOneOf(rule->option,mdefs->options)))
+ return 0;
+ }
+
+ if (rule->layout != NULL) {
+ if(mdefs->layout[rule->layout_num] == NULL ||
+ *mdefs->layout[rule->layout_num] == '\0')
+ return 0;
+ if (strcmp(rule->layout, "*") == 0) {
+ pending = TRUE;
+ } else {
+ if (rule->layout[0] == '$') {
+ if (!CheckGroup(rules, rule->layout,
+ mdefs->layout[rule->layout_num]))
+ return 0;
+ } else {
+ if (strcmp(rule->layout, mdefs->layout[rule->layout_num]) != 0)
+ return 0;
+ }
+ }
+ }
+ if (rule->variant != NULL) {
+ if (mdefs->variant[rule->variant_num] == NULL ||
+ *mdefs->variant[rule->variant_num] == '\0')
+ return 0;
+ if (strcmp(rule->variant, "*") == 0) {
+ pending = TRUE;
+ } else {
+ if (rule->variant[0] == '$') {
+ if (!CheckGroup(rules, rule->variant,
+ mdefs->variant[rule->variant_num]))
+ return 0;
+ } else {
+ if (strcmp(rule->variant,
+ mdefs->variant[rule->variant_num]) != 0)
+ return 0;
+ }
+ }
+ }
+ if (pending) {
+ rule->flags|= XkbRF_PendingMatch;
+ return rule->number;
+ }
+ /* exact match, apply it now */
+ XkbRF_ApplyRule(rule,names);
+ return rule->number;
+}
+
+static void
+XkbRF_ClearPartialMatches(XkbRF_RulesPtr rules)
+{
+register int i;
+XkbRF_RulePtr rule;
+
+ for (i=0,rule=rules->rules;i<rules->num_rules;i++,rule++) {
+ rule->flags&= ~XkbRF_PendingMatch;
+ }
+}
+
+static void
+XkbRF_ApplyPartialMatches(XkbRF_RulesPtr rules,XkbComponentNamesPtr names)
+{
+int i;
+XkbRF_RulePtr rule;
+
+ for (rule = rules->rules, i = 0; i < rules->num_rules; i++, rule++) {
+ if ((rule->flags&XkbRF_PendingMatch)==0)
+ continue;
+ XkbRF_ApplyRule(rule,names);
+ }
+}
+
+static void
+XkbRF_CheckApplyRules( XkbRF_RulesPtr rules,
+ XkbRF_MultiDefsPtr mdefs,
+ XkbComponentNamesPtr names,
+ int flags)
+{
+int i;
+XkbRF_RulePtr rule;
+int skip;
+
+ for (rule = rules->rules, i=0; i < rules->num_rules; rule++, i++) {
+ if ((rule->flags & flags) != flags)
+ continue;
+ skip = XkbRF_CheckApplyRule(rule, mdefs, names, rules);
+ if (skip && !(flags & XkbRF_Option)) {
+ for ( ;(i < rules->num_rules) && (rule->number == skip);
+ rule++, i++);
+ rule--; i--;
+ }
+ }
+}
+
+/***====================================================================***/
+
+static char *
+XkbRF_SubstituteVars(char *name, XkbRF_MultiDefsPtr mdefs)
+{
+char *str, *outstr, *orig, *var;
+int len, ndx;
+
+ orig= name;
+ str= index(name,'%');
+ if (str==NULL)
+ return name;
+ len= strlen(name);
+ while (str!=NULL) {
+ char pfx= str[1];
+ int extra_len= 0;
+ if ((pfx=='+')||(pfx=='|')||(pfx=='_')||(pfx=='-')) {
+ extra_len= 1;
+ str++;
+ }
+ else if (pfx=='(') {
+ extra_len= 2;
+ str++;
+ }
+ var = str + 1;
+ str = get_index(var + 1, &ndx);
+ if (ndx == -1) {
+ str = index(str,'%');
+ continue;
+ }
+ if ((*var=='l') && mdefs->layout[ndx] && *mdefs->layout[ndx])
+ len+= strlen(mdefs->layout[ndx])+extra_len;
+ else if ((*var=='m')&&mdefs->model)
+ len+= strlen(mdefs->model)+extra_len;
+ else if ((*var=='v') && mdefs->variant[ndx] && *mdefs->variant[ndx])
+ len+= strlen(mdefs->variant[ndx])+extra_len;
+ if ((pfx=='(')&&(*str==')')) {
+ str++;
+ }
+ str= index(&str[0],'%');
+ }
+ name= malloc(len+1);
+ str= orig;
+ outstr= name;
+ while (*str!='\0') {
+ if (str[0]=='%') {
+ char pfx,sfx;
+ str++;
+ pfx= str[0];
+ sfx= '\0';
+ if ((pfx=='+')||(pfx=='|')||(pfx=='_')||(pfx=='-')) {
+ str++;
+ }
+ else if (pfx=='(') {
+ sfx= ')';
+ str++;
+ }
+ else pfx= '\0';
+
+ var = str;
+ str = get_index(var + 1, &ndx);
+ if (ndx == -1) {
+ continue;
+ }
+ if ((*var=='l') && mdefs->layout[ndx] && *mdefs->layout[ndx]) {
+ if (pfx) *outstr++= pfx;
+ strcpy(outstr,mdefs->layout[ndx]);
+ outstr+= strlen(mdefs->layout[ndx]);
+ if (sfx) *outstr++= sfx;
+ }
+ else if ((*var=='m')&&(mdefs->model)) {
+ if (pfx) *outstr++= pfx;
+ strcpy(outstr,mdefs->model);
+ outstr+= strlen(mdefs->model);
+ if (sfx) *outstr++= sfx;
+ }
+ else if ((*var=='v') && mdefs->variant[ndx] && *mdefs->variant[ndx]) {
+ if (pfx) *outstr++= pfx;
+ strcpy(outstr,mdefs->variant[ndx]);
+ outstr+= strlen(mdefs->variant[ndx]);
+ if (sfx) *outstr++= sfx;
+ }
+ if ((pfx=='(')&&(*str==')'))
+ str++;
+ }
+ else {
+ *outstr++= *str++;
+ }
+ }
+ *outstr++= '\0';
+ if (orig!=name)
+ free(orig);
+ return name;
+}
+
+/***====================================================================***/
+
+Bool
+XkbRF_GetComponents( XkbRF_RulesPtr rules,
+ XkbRF_VarDefsPtr defs,
+ XkbComponentNamesPtr names)
+{
+ XkbRF_MultiDefsRec mdefs;
+
+ MakeMultiDefs(&mdefs, defs);
+
+ memset((char *)names, 0, sizeof(XkbComponentNamesRec));
+ XkbRF_ClearPartialMatches(rules);
+ XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Normal);
+ XkbRF_ApplyPartialMatches(rules, names);
+ XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Append);
+ XkbRF_ApplyPartialMatches(rules, names);
+ XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Option);
+
+ if (names->keycodes)
+ names->keycodes= XkbRF_SubstituteVars(names->keycodes, &mdefs);
+ if (names->symbols)
+ names->symbols= XkbRF_SubstituteVars(names->symbols, &mdefs);
+ if (names->types)
+ names->types= XkbRF_SubstituteVars(names->types, &mdefs);
+ if (names->compat)
+ names->compat= XkbRF_SubstituteVars(names->compat, &mdefs);
+ if (names->geometry)
+ names->geometry= XkbRF_SubstituteVars(names->geometry, &mdefs);
+
+ FreeMultiDefs(&mdefs);
+ return (names->keycodes && names->symbols && names->types &&
+ names->compat && names->geometry);
+}
+
+static XkbRF_RulePtr
+XkbRF_AddRule(XkbRF_RulesPtr rules)
+{
+ if (rules->sz_rules<1) {
+ rules->sz_rules= 16;
+ rules->num_rules= 0;
+ rules->rules= calloc(rules->sz_rules, sizeof(XkbRF_RuleRec));
+ }
+ else if (rules->num_rules>=rules->sz_rules) {
+ rules->sz_rules*= 2;
+ rules->rules= realloc(rules->rules,
+ rules->sz_rules * sizeof(XkbRF_RuleRec));
+ }
+ if (!rules->rules) {
+ rules->sz_rules= rules->num_rules= 0;
+ DebugF("Allocation failure in XkbRF_AddRule\n");
+ return NULL;
+ }
+ memset((char *)&rules->rules[rules->num_rules], 0, sizeof(XkbRF_RuleRec));
+ return &rules->rules[rules->num_rules++];
+}
+
+static XkbRF_GroupPtr
+XkbRF_AddGroup(XkbRF_RulesPtr rules)
+{
+ if (rules->sz_groups<1) {
+ rules->sz_groups= 16;
+ rules->num_groups= 0;
+ rules->groups= calloc(rules->sz_groups, sizeof(XkbRF_GroupRec));
+ }
+ else if (rules->num_groups >= rules->sz_groups) {
+ rules->sz_groups *= 2;
+ rules->groups= realloc(rules->groups,
+ rules->sz_groups * sizeof(XkbRF_GroupRec));
+ }
+ if (!rules->groups) {
+ rules->sz_groups= rules->num_groups= 0;
+ return NULL;
+ }
+
+ memset((char *)&rules->groups[rules->num_groups], 0, sizeof(XkbRF_GroupRec));
+ return &rules->groups[rules->num_groups++];
+}
+
+Bool
+XkbRF_LoadRules(FILE *file, XkbRF_RulesPtr rules)
+{
+InputLine line;
+RemapSpec remap;
+XkbRF_RuleRec trule,*rule;
+XkbRF_GroupRec tgroup,*group;
+
+ if (!(rules && file))
+ return FALSE;
+ memset((char *)&remap, 0, sizeof(RemapSpec));
+ memset((char *)&tgroup, 0, sizeof(XkbRF_GroupRec));
+ InitInputLine(&line);
+ while (GetInputLine(file,&line,TRUE)) {
+ if (CheckLine(&line,&remap,&trule,&tgroup)) {
+ if (tgroup.number) {
+ if ((group= XkbRF_AddGroup(rules))!=NULL) {
+ *group= tgroup;
+ memset((char *)&tgroup, 0, sizeof(XkbRF_GroupRec));
+ }
+ } else {
+ if ((rule= XkbRF_AddRule(rules))!=NULL) {
+ *rule= trule;
+ memset((char *)&trule, 0, sizeof(XkbRF_RuleRec));
+ }
+ }
+ }
+ line.num_line= 0;
+ }
+ FreeInputLine(&line);
+ return TRUE;
+}
+
+Bool
+XkbRF_LoadRulesByName(char *base,char *locale,XkbRF_RulesPtr rules)
+{
+FILE * file;
+char buf[PATH_MAX];
+Bool ok;
+
+ if ((!base)||(!rules))
+ return FALSE;
+ if (locale) {
+ if (snprintf(buf, PATH_MAX, "%s-%s", base, locale) >= PATH_MAX)
+ return FALSE;
+ }
+ else {
+ if (strlen(base)+1 > PATH_MAX)
+ return FALSE;
+ strcpy(buf,base);
+ }
+
+ file= fopen(buf, "r");
+ if ((!file)&&(locale)) { /* fallback if locale was specified */
+ strcpy(buf,base);
+ file= fopen(buf, "r");
+ }
+ if (!file)
+ return FALSE;
+ ok= XkbRF_LoadRules(file,rules);
+ fclose(file);
+ return ok;
+}
+
+/***====================================================================***/
+
+XkbRF_RulesPtr
+XkbRF_Create(void)
+{
+ return calloc(1, sizeof( XkbRF_RulesRec));
+}
+
+/***====================================================================***/
+
+void
+XkbRF_Free(XkbRF_RulesPtr rules,Bool freeRules)
+{
+int i;
+XkbRF_RulePtr rule;
+XkbRF_GroupPtr group;
+
+ if (!rules)
+ return;
+ if (rules->rules) {
+ for (i=0,rule=rules->rules;i<rules->num_rules;i++,rule++) {
+ free(rule->model);
+ free(rule->layout);
+ free(rule->variant);
+ free(rule->option);
+ free(rule->keycodes);
+ free(rule->symbols);
+ free(rule->types);
+ free(rule->compat);
+ free(rule->geometry);
+ memset((char *)rule, 0, sizeof(XkbRF_RuleRec));
+ }
+ free(rules->rules);
+ rules->num_rules= rules->sz_rules= 0;
+ rules->rules= NULL;
+ }
+
+ if (rules->groups) {
+ for (i=0, group=rules->groups;i<rules->num_groups;i++,group++) {
+ free(group->name);
+ free(group->words);
+ }
+ free(rules->groups);
+ rules->num_groups= 0;
+ rules->groups= NULL;
+ }
+ if (freeRules)
+ free(rules);
+ return;
+}
diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c
index 4044d333d..136d3ac45 100644
--- a/xorg-server/xkb/xkb.c
+++ b/xorg-server/xkb/xkb.c
@@ -1,6746 +1,6748 @@
-/************************************************************
-Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
-of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
-of this software for any purpose. It is provided "as is"
-without any express or implied warranty.
-
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "inputstr.h"
-#define XKBSRV_NEED_FILE_FUNCS
-#include <xkbsrv.h>
-#include "extnsionst.h"
-#include "xace.h"
-#include "xkb.h"
-#include "protocol-versions.h"
-
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XKMformat.h>
-
-int XkbEventBase;
-static int XkbErrorBase;
-int XkbReqCode;
-int XkbKeyboardErrorCode;
-CARD32 xkbDebugFlags = 0;
-static CARD32 xkbDebugCtrls = 0;
-
-static RESTYPE RT_XKBCLIENT;
-
-/***====================================================================***/
-
-#define CHK_DEVICE(dev, id, client, access_mode, lf) {\
- int why;\
- int rc = lf(&(dev), id, client, access_mode, &why);\
- if (rc != Success) {\
- client->errorValue = _XkbErrCode2(why, id);\
- return rc;\
- }\
-}
-
-#define CHK_KBD_DEVICE(dev, id, client, mode) \
- CHK_DEVICE(dev, id, client, mode, _XkbLookupKeyboard)
-#define CHK_LED_DEVICE(dev, id, client, mode) \
- CHK_DEVICE(dev, id, client, mode, _XkbLookupLedDevice)
-#define CHK_BELL_DEVICE(dev, id, client, mode) \
- CHK_DEVICE(dev, id, client, mode, _XkbLookupBellDevice)
-#define CHK_ANY_DEVICE(dev, id, client, mode) \
- CHK_DEVICE(dev, id, client, mode, _XkbLookupAnyDevice)
-
-#define CHK_ATOM_ONLY2(a,ev,er) {\
- if (((a)==None)||(!ValidAtom((a)))) {\
- (ev)= (XID)(a);\
- return er;\
- }\
-}
-#define CHK_ATOM_ONLY(a) \
- CHK_ATOM_ONLY2(a,client->errorValue,BadAtom)
-
-#define CHK_ATOM_OR_NONE3(a,ev,er,ret) {\
- if (((a)!=None)&&(!ValidAtom((a)))) {\
- (ev)= (XID)(a);\
- (er)= BadAtom;\
- return ret;\
- }\
-}
-#define CHK_ATOM_OR_NONE2(a,ev,er) {\
- if (((a)!=None)&&(!ValidAtom((a)))) {\
- (ev)= (XID)(a);\
- return er;\
- }\
-}
-#define CHK_ATOM_OR_NONE(a) \
- CHK_ATOM_OR_NONE2(a,client->errorValue,BadAtom)
-
-#define CHK_MASK_LEGAL3(err,mask,legal,ev,er,ret) {\
- if ((mask)&(~(legal))) { \
- (ev)= _XkbErrCode2((err),((mask)&(~(legal))));\
- (er)= BadValue;\
- return ret;\
- }\
-}
-#define CHK_MASK_LEGAL2(err,mask,legal,ev,er) {\
- if ((mask)&(~(legal))) { \
- (ev)= _XkbErrCode2((err),((mask)&(~(legal))));\
- return er;\
- }\
-}
-#define CHK_MASK_LEGAL(err,mask,legal) \
- CHK_MASK_LEGAL2(err,mask,legal,client->errorValue,BadValue)
-
-#define CHK_MASK_MATCH(err,affect,value) {\
- if ((value)&(~(affect))) { \
- client->errorValue= _XkbErrCode2((err),((value)&(~(affect))));\
- return BadMatch;\
- }\
-}
-#define CHK_MASK_OVERLAP(err,m1,m2) {\
- if ((m1)&(m2)) { \
- client->errorValue= _XkbErrCode2((err),((m1)&(m2)));\
- return BadMatch;\
- }\
-}
-#define CHK_KEY_RANGE2(err,first,num,x,ev,er) {\
- if (((unsigned)(first)+(num)-1)>(x)->max_key_code) {\
- (ev)=_XkbErrCode4(err,(first),(num),(x)->max_key_code);\
- return er;\
- }\
- else if ( (first)<(x)->min_key_code ) {\
- (ev)=_XkbErrCode3(err+1,(first),xkb->min_key_code);\
- return er;\
- }\
-}
-#define CHK_KEY_RANGE(err,first,num,x) \
- CHK_KEY_RANGE2(err,first,num,x,client->errorValue,BadValue)
-
-#define CHK_REQ_KEY_RANGE2(err,first,num,r,ev,er) {\
- if (((unsigned)(first)+(num)-1)>(r)->maxKeyCode) {\
- (ev)=_XkbErrCode4(err,(first),(num),(r)->maxKeyCode);\
- return er;\
- }\
- else if ( (first)<(r)->minKeyCode ) {\
- (ev)=_XkbErrCode3(err+1,(first),(r)->minKeyCode);\
- return er;\
- }\
-}
-#define CHK_REQ_KEY_RANGE(err,first,num,r) \
- CHK_REQ_KEY_RANGE2(err,first,num,r,client->errorValue,BadValue)
-
-/***====================================================================***/
-
-int
-ProcXkbUseExtension(ClientPtr client)
-{
- REQUEST(xkbUseExtensionReq);
- xkbUseExtensionReply rep;
- register int n;
- int supported;
-
- REQUEST_SIZE_MATCH(xkbUseExtensionReq);
- if (stuff->wantedMajor != SERVER_XKB_MAJOR_VERSION) {
- /* pre-release version 0.65 is compatible with 1.00 */
- supported= ((SERVER_XKB_MAJOR_VERSION==1)&&
- (stuff->wantedMajor==0)&&(stuff->wantedMinor==65));
- }
- else supported = 1;
-
- if ((supported) && (!(client->xkbClientFlags&_XkbClientInitialized))) {
- client->xkbClientFlags= _XkbClientInitialized;
- client->vMajor= stuff->wantedMajor;
- client->vMinor= stuff->wantedMinor;
- }
- else if (xkbDebugFlags&0x1) {
- ErrorF("[xkb] Rejecting client %d (0x%lx) (wants %d.%02d, have %d.%02d)\n",
- client->index,
- (long)client->clientAsMask,
- stuff->wantedMajor,stuff->wantedMinor,
- SERVER_XKB_MAJOR_VERSION,SERVER_XKB_MINOR_VERSION);
- }
- memset(&rep, 0, sizeof(xkbUseExtensionReply));
- rep.type = X_Reply;
- rep.supported = supported;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.serverMajor = SERVER_XKB_MAJOR_VERSION;
- rep.serverMinor = SERVER_XKB_MINOR_VERSION;
- if ( client->swapped ) {
- swaps(&rep.sequenceNumber, n);
- swaps(&rep.serverMajor, n);
- swaps(&rep.serverMinor, n);
- }
- WriteToClient(client,SIZEOF(xkbUseExtensionReply), (char *)&rep);
- return Success;
-}
-
-/***====================================================================***/
-
-int
-ProcXkbSelectEvents(ClientPtr client)
-{
- unsigned legal;
- DeviceIntPtr dev;
- XkbInterestPtr masks;
- REQUEST(xkbSelectEventsReq);
-
- REQUEST_AT_LEAST_SIZE(xkbSelectEventsReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixUseAccess);
-
- if (((stuff->affectWhich&XkbMapNotifyMask)!=0)&&(stuff->affectMap)) {
- client->mapNotifyMask&= ~stuff->affectMap;
- client->mapNotifyMask|= (stuff->affectMap&stuff->map);
- }
- if ((stuff->affectWhich&(~XkbMapNotifyMask))==0)
- return Success;
-
- masks = XkbFindClientResource((DevicePtr)dev,client);
- if (!masks){
- XID id = FakeClientID(client->index);
- if (!AddResource(id,RT_XKBCLIENT,dev))
- return BadAlloc;
- masks= XkbAddClientResource((DevicePtr)dev,client,id);
- }
- if (masks) {
- union {
- CARD8 *c8;
- CARD16 *c16;
- CARD32 *c32;
- } from,to;
- register unsigned bit,ndx,maskLeft,dataLeft,size;
-
- from.c8= (CARD8 *)&stuff[1];
- dataLeft= (stuff->length*4)-SIZEOF(xkbSelectEventsReq);
- maskLeft= (stuff->affectWhich&(~XkbMapNotifyMask));
- for (ndx=0,bit=1; (maskLeft!=0); ndx++, bit<<=1) {
- if ((bit&maskLeft)==0)
- continue;
- maskLeft&= ~bit;
- switch (ndx) {
- case XkbNewKeyboardNotify:
- to.c16= &client->newKeyboardNotifyMask;
- legal= XkbAllNewKeyboardEventsMask;
- size= 2;
- break;
- case XkbStateNotify:
- to.c16= &masks->stateNotifyMask;
- legal= XkbAllStateEventsMask;
- size= 2;
- break;
- case XkbControlsNotify:
- to.c32= &masks->ctrlsNotifyMask;
- legal= XkbAllControlEventsMask;
- size= 4;
- break;
- case XkbIndicatorStateNotify:
- to.c32= &masks->iStateNotifyMask;
- legal= XkbAllIndicatorEventsMask;
- size= 4;
- break;
- case XkbIndicatorMapNotify:
- to.c32= &masks->iMapNotifyMask;
- legal= XkbAllIndicatorEventsMask;
- size= 4;
- break;
- case XkbNamesNotify:
- to.c16= &masks->namesNotifyMask;
- legal= XkbAllNameEventsMask;
- size= 2;
- break;
- case XkbCompatMapNotify:
- to.c8= &masks->compatNotifyMask;
- legal= XkbAllCompatMapEventsMask;
- size= 1;
- break;
- case XkbBellNotify:
- to.c8= &masks->bellNotifyMask;
- legal= XkbAllBellEventsMask;
- size= 1;
- break;
- case XkbActionMessage:
- to.c8= &masks->actionMessageMask;
- legal= XkbAllActionMessagesMask;
- size= 1;
- break;
- case XkbAccessXNotify:
- to.c16= &masks->accessXNotifyMask;
- legal= XkbAllAccessXEventsMask;
- size= 2;
- break;
- case XkbExtensionDeviceNotify:
- to.c16= &masks->extDevNotifyMask;
- legal= XkbAllExtensionDeviceEventsMask;
- size= 2;
- break;
- default:
- client->errorValue = _XkbErrCode2(33,bit);
- return BadValue;
- }
-
- if (stuff->clear&bit) {
- if (size==2) to.c16[0]= 0;
- else if (size==4) to.c32[0]= 0;
- else to.c8[0]= 0;
- }
- else if (stuff->selectAll&bit) {
- if (size==2) to.c16[0]= ~0;
- else if (size==4) to.c32[0]= ~0;
- else to.c8[0]= ~0;
- }
- else {
- if (dataLeft<(size*2))
- return BadLength;
- if (size==2) {
- CHK_MASK_MATCH(ndx,from.c16[0],from.c16[1]);
- CHK_MASK_LEGAL(ndx,from.c16[0],legal);
- to.c16[0]&= ~from.c16[0];
- to.c16[0]|= (from.c16[0]&from.c16[1]);
- }
- else if (size==4) {
- CHK_MASK_MATCH(ndx,from.c32[0],from.c32[1]);
- CHK_MASK_LEGAL(ndx,from.c32[0],legal);
- to.c32[0]&= ~from.c32[0];
- to.c32[0]|= (from.c32[0]&from.c32[1]);
- }
- else {
- CHK_MASK_MATCH(ndx,from.c8[0],from.c8[1]);
- CHK_MASK_LEGAL(ndx,from.c8[0],legal);
- to.c8[0]&= ~from.c8[0];
- to.c8[0]|= (from.c8[0]&from.c8[1]);
- size= 2;
- }
- from.c8+= (size*2);
- dataLeft-= (size*2);
- }
- }
- if (dataLeft>2) {
- ErrorF("[xkb] Extra data (%d bytes) after SelectEvents\n",dataLeft);
- return BadLength;
- }
- return Success;
- }
- return BadAlloc;
-}
-
-/***====================================================================***/
-/**
- * Ring a bell on the given device for the given client.
- */
-static int
-_XkbBell(ClientPtr client, DeviceIntPtr dev, WindowPtr pWin,
- int bellClass, int bellID, int pitch, int duration,
- int percent, int forceSound, int eventOnly, Atom name)
-{
- int base;
- pointer ctrl;
- int oldPitch, oldDuration;
- int newPercent;
-
- if (bellClass == KbdFeedbackClass) {
- KbdFeedbackPtr k;
- if (bellID==XkbDfltXIId)
- k= dev->kbdfeed;
- else {
- for (k=dev->kbdfeed; k; k=k->next) {
- if (k->ctrl.id == bellID)
- break;
- }
- }
- if (!k) {
- client->errorValue = _XkbErrCode2(0x5,bellID);
- return BadValue;
- }
- base = k->ctrl.bell;
- ctrl = (pointer) &(k->ctrl);
- oldPitch= k->ctrl.bell_pitch;
- oldDuration= k->ctrl.bell_duration;
- if (pitch!=0) {
- if (pitch==-1)
- k->ctrl.bell_pitch= defaultKeyboardControl.bell_pitch;
- else k->ctrl.bell_pitch= pitch;
- }
- if (duration!=0) {
- if (duration==-1)
- k->ctrl.bell_duration= defaultKeyboardControl.bell_duration;
- else k->ctrl.bell_duration= duration;
- }
- }
- else if (bellClass == BellFeedbackClass) {
- BellFeedbackPtr b;
- if (bellID==XkbDfltXIId)
- b= dev->bell;
- else {
- for (b=dev->bell; b; b=b->next) {
- if (b->ctrl.id == bellID)
- break;
- }
- }
- if (!b) {
- client->errorValue = _XkbErrCode2(0x6,bellID);
- return BadValue;
- }
- base = b->ctrl.percent;
- ctrl = (pointer) &(b->ctrl);
- oldPitch= b->ctrl.pitch;
- oldDuration= b->ctrl.duration;
- if (pitch!=0) {
- if (pitch==-1)
- b->ctrl.pitch= defaultKeyboardControl.bell_pitch;
- else b->ctrl.pitch= pitch;
- }
- if (duration!=0) {
- if (duration==-1)
- b->ctrl.duration= defaultKeyboardControl.bell_duration;
- else b->ctrl.duration= duration;
- }
- }
- else {
- client->errorValue = _XkbErrCode2(0x7, bellClass);
- return BadValue;
- }
-
- newPercent = (base * percent)/100;
- if (percent < 0)
- newPercent = base + newPercent;
- else newPercent = base - newPercent + percent;
-
- XkbHandleBell(forceSound, eventOnly,
- dev, newPercent, ctrl, bellClass,
- name, pWin, client);
- if ((pitch!=0)||(duration!=0)) {
- if (bellClass == KbdFeedbackClass) {
- KbdFeedbackPtr k;
- k= (KbdFeedbackPtr)ctrl;
- if (pitch!=0)
- k->ctrl.bell_pitch= oldPitch;
- if (duration!=0)
- k->ctrl.bell_duration= oldDuration;
- }
- else {
- BellFeedbackPtr b;
- b= (BellFeedbackPtr)ctrl;
- if (pitch!=0)
- b->ctrl.pitch= oldPitch;
- if (duration!=0)
- b->ctrl.duration= oldDuration;
- }
- }
-
- return Success;
-}
-
-int
-ProcXkbBell(ClientPtr client)
-{
- REQUEST(xkbBellReq);
- DeviceIntPtr dev;
- WindowPtr pWin;
- int rc;
-
- REQUEST_SIZE_MATCH(xkbBellReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_BELL_DEVICE(dev, stuff->deviceSpec, client, DixBellAccess);
- CHK_ATOM_OR_NONE(stuff->name);
-
- /* device-independent checks request for sane values */
- if ((stuff->forceSound)&&(stuff->eventOnly)) {
- client->errorValue=_XkbErrCode3(0x1,stuff->forceSound,stuff->eventOnly);
- return BadMatch;
- }
- if (stuff->percent < -100 || stuff->percent > 100) {
- client->errorValue = _XkbErrCode2(0x2,stuff->percent);
- return BadValue;
- }
- if (stuff->duration<-1) {
- client->errorValue = _XkbErrCode2(0x3,stuff->duration);
- return BadValue;
- }
- if (stuff->pitch<-1) {
- client->errorValue = _XkbErrCode2(0x4,stuff->pitch);
- return BadValue;
- }
-
- if (stuff->bellClass == XkbDfltXIClass) {
- if (dev->kbdfeed!=NULL)
- stuff->bellClass= KbdFeedbackClass;
- else stuff->bellClass= BellFeedbackClass;
- }
-
- if (stuff->window!=None) {
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success) {
- client->errorValue= stuff->window;
- return rc;
- }
- }
- else pWin= NULL;
-
- /* Client wants to ring a bell on the core keyboard?
- Ring the bell on the core keyboard (which does nothing, but if that
- fails the client is screwed anyway), and then on all extension devices.
- Fail if the core keyboard fails but not the extension devices. this
- may cause some keyboards to ding and others to stay silent. Fix
- your client to use explicit keyboards to avoid this.
-
- dev is the device the client requested.
- */
- rc = _XkbBell(client, dev, pWin, stuff->bellClass, stuff->bellID,
- stuff->pitch, stuff->duration, stuff->percent,
- stuff->forceSound, stuff->eventOnly, stuff->name);
-
- if ((rc == Success) && ((stuff->deviceSpec == XkbUseCoreKbd) ||
- (stuff->deviceSpec == XkbUseCorePtr)))
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
- {
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixBellAccess);
- if (rc == Success)
- _XkbBell(client, other, pWin, stuff->bellClass,
- stuff->bellID, stuff->pitch, stuff->duration,
- stuff->percent, stuff->forceSound,
- stuff->eventOnly, stuff->name);
- }
- }
- rc = Success; /* reset to success, that's what we got for the VCK */
- }
-
- return rc;
-}
-
-/***====================================================================***/
-
-int
-ProcXkbGetState(ClientPtr client)
-{
- REQUEST(xkbGetStateReq);
- DeviceIntPtr dev;
- xkbGetStateReply rep;
- XkbStateRec *xkb;
-
- REQUEST_SIZE_MATCH(xkbGetStateReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
-
- xkb= &dev->key->xkbInfo->state;
- memset(&rep, 0, sizeof(xkbGetStateReply));
- rep.type= X_Reply;
- rep.sequenceNumber= client->sequence;
- rep.length = 0;
- rep.deviceID = dev->id;
- rep.mods = XkbStateFieldFromRec(xkb) & 0xff;
- rep.baseMods = xkb->base_mods;
- rep.lockedMods = xkb->locked_mods;
- rep.latchedMods = xkb->latched_mods;
- rep.group = xkb->group;
- rep.baseGroup = xkb->base_group;
- rep.latchedGroup = xkb->latched_group;
- rep.lockedGroup = xkb->locked_group;
- rep.compatState = xkb->compat_state;
- rep.ptrBtnState = xkb->ptr_buttons;
- if (client->swapped) {
- register int n;
- swaps(&rep.sequenceNumber,n);
- swaps(&rep.ptrBtnState,n);
- }
- WriteToClient(client, SIZEOF(xkbGetStateReply), (char *)&rep);
- return Success;
-}
-
-/***====================================================================***/
-
-int
-ProcXkbLatchLockState(ClientPtr client)
-{
- int status;
- DeviceIntPtr dev, tmpd;
- XkbStateRec oldState,*newState;
- CARD16 changed;
- xkbStateNotify sn;
- XkbEventCauseRec cause;
-
- REQUEST(xkbLatchLockStateReq);
- REQUEST_SIZE_MATCH(xkbLatchLockStateReq);
-
- if (!(client->xkbClientFlags & _XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
- CHK_MASK_MATCH(0x01, stuff->affectModLocks, stuff->modLocks);
- CHK_MASK_MATCH(0x01, stuff->affectModLatches, stuff->modLatches);
-
- status = Success;
-
- for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
- if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) {
- if (!tmpd->key || !tmpd->key->xkbInfo)
- continue;
-
- oldState = tmpd->key->xkbInfo->state;
- newState = &tmpd->key->xkbInfo->state;
- if (stuff->affectModLocks) {
- newState->locked_mods &= ~stuff->affectModLocks;
- newState->locked_mods |= (stuff->affectModLocks & stuff->modLocks);
- }
- if (status == Success && stuff->lockGroup)
- newState->locked_group = stuff->groupLock;
- if (status == Success && stuff->affectModLatches)
- status = XkbLatchModifiers(tmpd, stuff->affectModLatches,
- stuff->modLatches);
- if (status == Success && stuff->latchGroup)
- status = XkbLatchGroup(tmpd, stuff->groupLatch);
-
- if (status != Success)
- return status;
-
- XkbComputeDerivedState(tmpd->key->xkbInfo);
-
- changed = XkbStateChangedFlags(&oldState, newState);
- if (changed) {
- sn.keycode = 0;
- sn.eventType = 0;
- sn.requestMajor = XkbReqCode;
- sn.requestMinor = X_kbLatchLockState;
- sn.changed = changed;
- XkbSendStateNotify(tmpd, &sn);
- changed = XkbIndicatorsToUpdate(tmpd, changed, FALSE);
- if (changed) {
- XkbSetCauseXkbReq(&cause, X_kbLatchLockState, client);
- XkbUpdateIndicators(tmpd, changed, TRUE, NULL, &cause);
- }
- }
- }
- }
-
- return Success;
-}
-
-/***====================================================================***/
-
-int
-ProcXkbGetControls(ClientPtr client)
-{
- xkbGetControlsReply rep;
- XkbControlsPtr xkb;
- DeviceIntPtr dev;
- register int n;
-
- REQUEST(xkbGetControlsReq);
- REQUEST_SIZE_MATCH(xkbGetControlsReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
-
- xkb = dev->key->xkbInfo->desc->ctrls;
- rep.type = X_Reply;
- rep.length = bytes_to_int32(SIZEOF(xkbGetControlsReply)-
- SIZEOF(xGenericReply));
- rep.sequenceNumber = client->sequence;
- rep.deviceID = ((DeviceIntPtr)dev)->id;
- rep.numGroups = xkb->num_groups;
- rep.groupsWrap = xkb->groups_wrap;
- rep.internalMods = xkb->internal.mask;
- rep.ignoreLockMods = xkb->ignore_lock.mask;
- rep.internalRealMods = xkb->internal.real_mods;
- rep.ignoreLockRealMods = xkb->ignore_lock.real_mods;
- rep.internalVMods = xkb->internal.vmods;
- rep.ignoreLockVMods = xkb->ignore_lock.vmods;
- rep.enabledCtrls = xkb->enabled_ctrls;
- rep.repeatDelay = xkb->repeat_delay;
- rep.repeatInterval = xkb->repeat_interval;
- rep.slowKeysDelay = xkb->slow_keys_delay;
- rep.debounceDelay = xkb->debounce_delay;
- rep.mkDelay = xkb->mk_delay;
- rep.mkInterval = xkb->mk_interval;
- rep.mkTimeToMax = xkb->mk_time_to_max;
- rep.mkMaxSpeed = xkb->mk_max_speed;
- rep.mkCurve = xkb->mk_curve;
- rep.mkDfltBtn = xkb->mk_dflt_btn;
- rep.axTimeout = xkb->ax_timeout;
- rep.axtCtrlsMask = xkb->axt_ctrls_mask;
- rep.axtCtrlsValues = xkb->axt_ctrls_values;
- rep.axtOptsMask = xkb->axt_opts_mask;
- rep.axtOptsValues = xkb->axt_opts_values;
- rep.axOptions = xkb->ax_options;
- memcpy(rep.perKeyRepeat,xkb->per_key_repeat,XkbPerKeyBitArraySize);
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length,n);
- swaps(&rep.internalVMods, n);
- swaps(&rep.ignoreLockVMods, n);
- swapl(&rep.enabledCtrls, n);
- swaps(&rep.repeatDelay, n);
- swaps(&rep.repeatInterval, n);
- swaps(&rep.slowKeysDelay, n);
- swaps(&rep.debounceDelay, n);
- swaps(&rep.mkDelay, n);
- swaps(&rep.mkInterval, n);
- swaps(&rep.mkTimeToMax, n);
- swaps(&rep.mkMaxSpeed, n);
- swaps(&rep.mkCurve, n);
- swaps(&rep.axTimeout, n);
- swapl(&rep.axtCtrlsMask, n);
- swapl(&rep.axtCtrlsValues, n);
- swaps(&rep.axtOptsMask, n);
- swaps(&rep.axtOptsValues, n);
- swaps(&rep.axOptions, n);
- }
- WriteToClient(client, SIZEOF(xkbGetControlsReply), (char *)&rep);
- return Success;
-}
-
-int
-ProcXkbSetControls(ClientPtr client)
-{
- DeviceIntPtr dev, tmpd;
- XkbSrvInfoPtr xkbi;
- XkbControlsPtr ctrl;
- XkbControlsRec new,old;
- xkbControlsNotify cn;
- XkbEventCauseRec cause;
- XkbSrvLedInfoPtr sli;
-
- REQUEST(xkbSetControlsReq);
- REQUEST_SIZE_MATCH(xkbSetControlsReq);
-
- if (!(client->xkbClientFlags & _XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
- CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask);
-
- for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
- if (!tmpd->key || !tmpd->key->xkbInfo)
- continue;
- if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) {
- xkbi = tmpd->key->xkbInfo;
- ctrl = xkbi->desc->ctrls;
- new = *ctrl;
- XkbSetCauseXkbReq(&cause, X_kbSetControls, client);
-
- if (stuff->changeCtrls & XkbInternalModsMask) {
- CHK_MASK_MATCH(0x02, stuff->affectInternalMods,
- stuff->internalMods);
- CHK_MASK_MATCH(0x03, stuff->affectInternalVMods,
- stuff->internalVMods);
-
- new.internal.real_mods &= ~(stuff->affectInternalMods);
- new.internal.real_mods |= (stuff->affectInternalMods &
- stuff->internalMods);
- new.internal.vmods &= ~(stuff->affectInternalVMods);
- new.internal.vmods |= (stuff->affectInternalVMods &
- stuff->internalVMods);
- new.internal.mask = new.internal.real_mods |
- XkbMaskForVMask(xkbi->desc,
- new.internal.vmods);
- }
-
- if (stuff->changeCtrls & XkbIgnoreLockModsMask) {
- CHK_MASK_MATCH(0x4, stuff->affectIgnoreLockMods,
- stuff->ignoreLockMods);
- CHK_MASK_MATCH(0x5, stuff->affectIgnoreLockVMods,
- stuff->ignoreLockVMods);
-
- new.ignore_lock.real_mods &= ~(stuff->affectIgnoreLockMods);
- new.ignore_lock.real_mods |= (stuff->affectIgnoreLockMods &
- stuff->ignoreLockMods);
- new.ignore_lock.vmods &= ~(stuff->affectIgnoreLockVMods);
- new.ignore_lock.vmods |= (stuff->affectIgnoreLockVMods &
- stuff->ignoreLockVMods);
- new.ignore_lock.mask = new.ignore_lock.real_mods |
- XkbMaskForVMask(xkbi->desc,
- new.ignore_lock.vmods);
- }
-
- CHK_MASK_MATCH(0x06, stuff->affectEnabledCtrls,
- stuff->enabledCtrls);
- if (stuff->affectEnabledCtrls) {
- CHK_MASK_LEGAL(0x07, stuff->affectEnabledCtrls,
- XkbAllBooleanCtrlsMask);
-
- new.enabled_ctrls &= ~(stuff->affectEnabledCtrls);
- new.enabled_ctrls |= (stuff->affectEnabledCtrls &
- stuff->enabledCtrls);
- }
-
- if (stuff->changeCtrls & XkbRepeatKeysMask) {
- if (stuff->repeatDelay < 1 || stuff->repeatInterval < 1) {
- client->errorValue = _XkbErrCode3(0x08, stuff->repeatDelay,
- stuff->repeatInterval);
- return BadValue;
- }
-
- new.repeat_delay = stuff->repeatDelay;
- new.repeat_interval = stuff->repeatInterval;
- }
-
- if (stuff->changeCtrls & XkbSlowKeysMask) {
- if (stuff->slowKeysDelay < 1) {
- client->errorValue = _XkbErrCode2(0x09,
- stuff->slowKeysDelay);
- return BadValue;
- }
-
- new.slow_keys_delay = stuff->slowKeysDelay;
- }
-
- if (stuff->changeCtrls & XkbBounceKeysMask) {
- if (stuff->debounceDelay < 1) {
- client->errorValue = _XkbErrCode2(0x0A,
- stuff->debounceDelay);
- return BadValue;
- }
-
- new.debounce_delay = stuff->debounceDelay;
- }
-
- if (stuff->changeCtrls & XkbMouseKeysMask) {
- if (stuff->mkDfltBtn > XkbMaxMouseKeysBtn) {
- client->errorValue = _XkbErrCode2(0x0B, stuff->mkDfltBtn);
- return BadValue;
- }
-
- new.mk_dflt_btn = stuff->mkDfltBtn;
- }
-
- if (stuff->changeCtrls & XkbMouseKeysAccelMask) {
- if (stuff->mkDelay < 1 || stuff->mkInterval < 1 ||
- stuff->mkTimeToMax < 1 || stuff->mkMaxSpeed < 1 ||
- stuff->mkCurve < -1000) {
- client->errorValue = _XkbErrCode2(0x0C,0);
- return BadValue;
- }
-
- new.mk_delay = stuff->mkDelay;
- new.mk_interval = stuff->mkInterval;
- new.mk_time_to_max = stuff->mkTimeToMax;
- new.mk_max_speed = stuff->mkMaxSpeed;
- new.mk_curve = stuff->mkCurve;
- AccessXComputeCurveFactor(xkbi, &new);
- }
-
- if (stuff->changeCtrls & XkbGroupsWrapMask) {
- unsigned act, num;
-
- act = XkbOutOfRangeGroupAction(stuff->groupsWrap);
- switch (act) {
- case XkbRedirectIntoRange:
- num = XkbOutOfRangeGroupNumber(stuff->groupsWrap);
- if (num >= new.num_groups) {
- client->errorValue = _XkbErrCode3(0x0D, new.num_groups,
- num);
- return BadValue;
- }
- case XkbWrapIntoRange:
- case XkbClampIntoRange:
- break;
- default:
- client->errorValue = _XkbErrCode2(0x0E, act);
- return BadValue;
- }
-
- new.groups_wrap= stuff->groupsWrap;
- }
-
- CHK_MASK_LEGAL(0x0F, stuff->axOptions, XkbAX_AllOptionsMask);
- if (stuff->changeCtrls & XkbAccessXKeysMask) {
- new.ax_options = stuff->axOptions & XkbAX_AllOptionsMask;
- }
- else {
- if (stuff->changeCtrls & XkbStickyKeysMask) {
- new.ax_options &= ~(XkbAX_SKOptionsMask);
- new.ax_options |= (stuff->axOptions & XkbAX_SKOptionsMask);
- }
-
- if (stuff->changeCtrls & XkbAccessXFeedbackMask) {
- new.ax_options &= ~(XkbAX_FBOptionsMask);
- new.ax_options |= (stuff->axOptions & XkbAX_FBOptionsMask);
- }
- }
-
- if (stuff->changeCtrls & XkbAccessXTimeoutMask) {
- if (stuff->axTimeout < 1) {
- client->errorValue = _XkbErrCode2(0x10, stuff->axTimeout);
- return BadValue;
- }
- CHK_MASK_MATCH(0x11, stuff->axtCtrlsMask,
- stuff->axtCtrlsValues);
- CHK_MASK_LEGAL(0x12, stuff->axtCtrlsMask,
- XkbAllBooleanCtrlsMask);
- CHK_MASK_MATCH(0x13, stuff->axtOptsMask, stuff->axtOptsValues);
- CHK_MASK_LEGAL(0x14, stuff->axtOptsMask, XkbAX_AllOptionsMask);
- new.ax_timeout = stuff->axTimeout;
- new.axt_ctrls_mask = stuff->axtCtrlsMask;
- new.axt_ctrls_values = (stuff->axtCtrlsValues &
- stuff->axtCtrlsMask);
- new.axt_opts_mask = stuff->axtOptsMask;
- new.axt_opts_values = (stuff->axtOptsValues &
- stuff->axtOptsMask);
- }
-
- if (stuff->changeCtrls & XkbPerKeyRepeatMask) {
- memcpy(new.per_key_repeat, stuff->perKeyRepeat,
- XkbPerKeyBitArraySize);
- if (xkbi->repeatKey &&
- !BitIsOn(new.per_key_repeat, xkbi->repeatKey)) {
- AccessXCancelRepeatKey(xkbi, xkbi->repeatKey);
- }
- }
-
- old= *ctrl;
- *ctrl= new;
- XkbDDXChangeControls(tmpd, &old, ctrl);
-
- if (XkbComputeControlsNotify(tmpd, &old, ctrl, &cn, FALSE)) {
- cn.keycode = 0;
- cn.eventType = 0;
- cn.requestMajor = XkbReqCode;
- cn.requestMinor = X_kbSetControls;
- XkbSendControlsNotify(tmpd, &cn);
- }
-
- sli = XkbFindSrvLedInfo(tmpd, XkbDfltXIClass, XkbDfltXIId, 0);
- if (sli)
- XkbUpdateIndicators(tmpd, sli->usesControls, TRUE, NULL,
- &cause);
-
- /* If sticky keys were disabled, clear all locks and latches */
- if ((old.enabled_ctrls & XkbStickyKeysMask) &&
- !(ctrl->enabled_ctrls & XkbStickyKeysMask))
- XkbClearAllLatchesAndLocks(tmpd, xkbi, TRUE, &cause);
- }
- }
-
- return Success;
-}
-
-/***====================================================================***/
-
-static int
-XkbSizeKeyTypes(XkbDescPtr xkb,xkbGetMapReply *rep)
-{
- XkbKeyTypeRec *type;
- unsigned i,len;
-
- len= 0;
- if (((rep->present&XkbKeyTypesMask)==0)||(rep->nTypes<1)||
- (!xkb)||(!xkb->map)||(!xkb->map->types)) {
- rep->present&= ~XkbKeyTypesMask;
- rep->firstType= rep->nTypes= 0;
- return 0;
- }
- type= &xkb->map->types[rep->firstType];
- for (i=0;i<rep->nTypes;i++,type++){
- len+= SIZEOF(xkbKeyTypeWireDesc);
- if (type->map_count>0) {
- len+= (type->map_count*SIZEOF(xkbKTMapEntryWireDesc));
- if (type->preserve)
- len+= (type->map_count*SIZEOF(xkbModsWireDesc));
- }
- }
- return len;
-}
-
-static char *
-XkbWriteKeyTypes( XkbDescPtr xkb,
- xkbGetMapReply * rep,
- char * buf,
- ClientPtr client)
-{
- XkbKeyTypePtr type;
- unsigned i;
- xkbKeyTypeWireDesc *wire;
-
- type= &xkb->map->types[rep->firstType];
- for (i=0;i<rep->nTypes;i++,type++) {
- register unsigned n;
- wire= (xkbKeyTypeWireDesc *)buf;
- wire->mask = type->mods.mask;
- wire->realMods = type->mods.real_mods;
- wire->virtualMods = type->mods.vmods;
- wire->numLevels = type->num_levels;
- wire->nMapEntries = type->map_count;
- wire->preserve = (type->preserve!=NULL);
- if (client->swapped) {
- register int n;
- swaps(&wire->virtualMods,n);
- }
-
- buf= (char *)&wire[1];
- if (wire->nMapEntries>0) {
- xkbKTMapEntryWireDesc * wire;
- XkbKTMapEntryPtr entry;
- wire= (xkbKTMapEntryWireDesc *)buf;
- entry= type->map;
- for (n=0;n<type->map_count;n++,wire++,entry++) {
- wire->active= entry->active;
- wire->mask= entry->mods.mask;
- wire->level= entry->level;
- wire->realMods= entry->mods.real_mods;
- wire->virtualMods= entry->mods.vmods;
- if (client->swapped) {
- register int n;
- swaps(&wire->virtualMods,n);
- }
- }
- buf= (char *)wire;
- if (type->preserve!=NULL) {
- xkbModsWireDesc * pwire;
- XkbModsPtr preserve;
- pwire= (xkbModsWireDesc *)buf;
- preserve= type->preserve;
- for (n=0;n<type->map_count;n++,pwire++,preserve++) {
- pwire->mask= preserve->mask;
- pwire->realMods= preserve->real_mods;
- pwire->virtualMods= preserve->vmods;
- if (client->swapped) {
- register int n;
- swaps(&pwire->virtualMods,n);
- }
- }
- buf= (char *)pwire;
- }
- }
- }
- return buf;
-}
-
-static int
-XkbSizeKeySyms(XkbDescPtr xkb,xkbGetMapReply *rep)
-{
- XkbSymMapPtr symMap;
- unsigned i,len;
- unsigned nSyms,nSymsThisKey;
-
- if (((rep->present&XkbKeySymsMask)==0)||(rep->nKeySyms<1)||
- (!xkb)||(!xkb->map)||(!xkb->map->key_sym_map)) {
- rep->present&= ~XkbKeySymsMask;
- rep->firstKeySym= rep->nKeySyms= 0;
- rep->totalSyms= 0;
- return 0;
- }
- len= rep->nKeySyms*SIZEOF(xkbSymMapWireDesc);
- symMap = &xkb->map->key_sym_map[rep->firstKeySym];
- for (i=nSyms=0;i<rep->nKeySyms;i++,symMap++) {
- if (symMap->offset!=0) {
- nSymsThisKey= XkbNumGroups(symMap->group_info)*symMap->width;
- nSyms+= nSymsThisKey;
- }
- }
- len+= nSyms*4;
- rep->totalSyms= nSyms;
- return len;
-}
-
-static int
-XkbSizeVirtualMods(XkbDescPtr xkb,xkbGetMapReply *rep)
-{
-register unsigned i,nMods,bit;
-
- if (((rep->present&XkbVirtualModsMask)==0)||(rep->virtualMods==0)||
- (!xkb)||(!xkb->server)) {
- rep->present&= ~XkbVirtualModsMask;
- rep->virtualMods= 0;
- return 0;
- }
- for (i=nMods=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
- if (rep->virtualMods&bit)
- nMods++;
- }
- return XkbPaddedSize(nMods);
-}
-
-static char *
-XkbWriteKeySyms(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,ClientPtr client)
-{
-register KeySym * pSym;
-XkbSymMapPtr symMap;
-xkbSymMapWireDesc * outMap;
-register unsigned i;
-
- symMap = &xkb->map->key_sym_map[rep->firstKeySym];
- for (i=0;i<rep->nKeySyms;i++,symMap++) {
- outMap = (xkbSymMapWireDesc *)buf;
- outMap->ktIndex[0] = symMap->kt_index[0];
- outMap->ktIndex[1] = symMap->kt_index[1];
- outMap->ktIndex[2] = symMap->kt_index[2];
- outMap->ktIndex[3] = symMap->kt_index[3];
- outMap->groupInfo = symMap->group_info;
- outMap->width= symMap->width;
- outMap->nSyms = symMap->width*XkbNumGroups(symMap->group_info);
- buf= (char *)&outMap[1];
- if (outMap->nSyms==0)
- continue;
-
- pSym = &xkb->map->syms[symMap->offset];
- memcpy((char *)buf,(char *)pSym,outMap->nSyms*4);
- if (client->swapped) {
- register int n,nSyms= outMap->nSyms;
- swaps(&outMap->nSyms,n);
- while (nSyms-->0) {
- swapl(buf,n);
- buf+= 4;
- }
- }
- else buf+= outMap->nSyms*4;
- }
- return buf;
-}
-
-static int
-XkbSizeKeyActions(XkbDescPtr xkb,xkbGetMapReply *rep)
-{
- unsigned i,len,nActs;
- register KeyCode firstKey;
-
- if (((rep->present&XkbKeyActionsMask)==0)||(rep->nKeyActs<1)||
- (!xkb)||(!xkb->server)||(!xkb->server->key_acts)) {
- rep->present&= ~XkbKeyActionsMask;
- rep->firstKeyAct= rep->nKeyActs= 0;
- rep->totalActs= 0;
- return 0;
- }
- firstKey= rep->firstKeyAct;
- for (nActs=i=0;i<rep->nKeyActs;i++) {
- if (xkb->server->key_acts[i+firstKey]!=0)
- nActs+= XkbKeyNumActions(xkb,i+firstKey);
- }
- len= XkbPaddedSize(rep->nKeyActs)+(nActs*SIZEOF(xkbActionWireDesc));
- rep->totalActs= nActs;
- return len;
-}
-
-static char *
-XkbWriteKeyActions(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
- ClientPtr client)
-{
- unsigned i;
- CARD8 * numDesc;
- XkbAnyAction * actDesc;
-
- numDesc = (CARD8 *)buf;
- for (i=0;i<rep->nKeyActs;i++) {
- if (xkb->server->key_acts[i+rep->firstKeyAct]==0)
- numDesc[i] = 0;
- else numDesc[i] = XkbKeyNumActions(xkb,(i+rep->firstKeyAct));
- }
- buf+= XkbPaddedSize(rep->nKeyActs);
-
- actDesc = (XkbAnyAction *)buf;
- for (i=0;i<rep->nKeyActs;i++) {
- if (xkb->server->key_acts[i+rep->firstKeyAct]!=0) {
- unsigned int num;
- num = XkbKeyNumActions(xkb,(i+rep->firstKeyAct));
- memcpy((char *)actDesc,
- (char*)XkbKeyActionsPtr(xkb,(i+rep->firstKeyAct)),
- num*SIZEOF(xkbActionWireDesc));
- actDesc+= num;
- }
- }
- buf = (char *)actDesc;
- return buf;
-}
-
-static int
-XkbSizeKeyBehaviors(XkbDescPtr xkb,xkbGetMapReply *rep)
-{
- unsigned i,len,nBhvr;
- XkbBehavior * bhv;
-
- if (((rep->present&XkbKeyBehaviorsMask)==0)||(rep->nKeyBehaviors<1)||
- (!xkb)||(!xkb->server)||(!xkb->server->behaviors)) {
- rep->present&= ~XkbKeyBehaviorsMask;
- rep->firstKeyBehavior= rep->nKeyBehaviors= 0;
- rep->totalKeyBehaviors= 0;
- return 0;
- }
- bhv= &xkb->server->behaviors[rep->firstKeyBehavior];
- for (nBhvr=i=0;i<rep->nKeyBehaviors;i++,bhv++) {
- if (bhv->type!=XkbKB_Default)
- nBhvr++;
- }
- len= nBhvr*SIZEOF(xkbBehaviorWireDesc);
- rep->totalKeyBehaviors= nBhvr;
- return len;
-}
-
-static char *
-XkbWriteKeyBehaviors(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
- ClientPtr client)
-{
- unsigned i;
- xkbBehaviorWireDesc *wire;
- XkbBehavior *pBhvr;
-
- wire = (xkbBehaviorWireDesc *)buf;
- pBhvr= &xkb->server->behaviors[rep->firstKeyBehavior];
- for (i=0;i<rep->nKeyBehaviors;i++,pBhvr++) {
- if (pBhvr->type!=XkbKB_Default) {
- wire->key= i+rep->firstKeyBehavior;
- wire->type= pBhvr->type;
- wire->data= pBhvr->data;
- wire++;
- }
- }
- buf = (char *)wire;
- return buf;
-}
-
-static int
-XkbSizeExplicit(XkbDescPtr xkb,xkbGetMapReply *rep)
-{
- unsigned i,len,nRtrn;
-
- if (((rep->present&XkbExplicitComponentsMask)==0)||(rep->nKeyExplicit<1)||
- (!xkb)||(!xkb->server)||(!xkb->server->explicit)) {
- rep->present&= ~XkbExplicitComponentsMask;
- rep->firstKeyExplicit= rep->nKeyExplicit= 0;
- rep->totalKeyExplicit= 0;
- return 0;
- }
- for (nRtrn=i=0;i<rep->nKeyExplicit;i++) {
- if (xkb->server->explicit[i+rep->firstKeyExplicit]!=0)
- nRtrn++;
- }
- rep->totalKeyExplicit= nRtrn;
- len= XkbPaddedSize(nRtrn*2); /* two bytes per non-zero explicit component */
- return len;
-}
-
-static char *
-XkbWriteExplicit(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,ClientPtr client)
-{
-unsigned i;
-char * start;
-unsigned char * pExp;
-
- start= buf;
- pExp= &xkb->server->explicit[rep->firstKeyExplicit];
- for (i=0;i<rep->nKeyExplicit;i++,pExp++) {
- if (*pExp!=0) {
- *buf++= i+rep->firstKeyExplicit;
- *buf++= *pExp;
- }
- }
- i= XkbPaddedSize(buf-start)-(buf-start); /* pad to word boundary */
- return buf+i;
-}
-
-static int
-XkbSizeModifierMap(XkbDescPtr xkb,xkbGetMapReply *rep)
-{
- unsigned i,len,nRtrn;
-
- if (((rep->present&XkbModifierMapMask)==0)||(rep->nModMapKeys<1)||
- (!xkb)||(!xkb->map)||(!xkb->map->modmap)) {
- rep->present&= ~XkbModifierMapMask;
- rep->firstModMapKey= rep->nModMapKeys= 0;
- rep->totalModMapKeys= 0;
- return 0;
- }
- for (nRtrn=i=0;i<rep->nModMapKeys;i++) {
- if (xkb->map->modmap[i+rep->firstModMapKey]!=0)
- nRtrn++;
- }
- rep->totalModMapKeys= nRtrn;
- len= XkbPaddedSize(nRtrn*2); /* two bytes per non-zero modmap component */
- return len;
-}
-
-static char *
-XkbWriteModifierMap(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
- ClientPtr client)
-{
-unsigned i;
-char * start;
-unsigned char * pMap;
-
- start= buf;
- pMap= &xkb->map->modmap[rep->firstModMapKey];
- for (i=0;i<rep->nModMapKeys;i++,pMap++) {
- if (*pMap!=0) {
- *buf++= i+rep->firstModMapKey;
- *buf++= *pMap;
- }
- }
- i= XkbPaddedSize(buf-start)-(buf-start); /* pad to word boundary */
- return buf+i;
-}
-
-static int
-XkbSizeVirtualModMap(XkbDescPtr xkb,xkbGetMapReply *rep)
-{
- unsigned i,len,nRtrn;
-
- if (((rep->present&XkbVirtualModMapMask)==0)||(rep->nVModMapKeys<1)||
- (!xkb)||(!xkb->server)||(!xkb->server->vmodmap)) {
- rep->present&= ~XkbVirtualModMapMask;
- rep->firstVModMapKey= rep->nVModMapKeys= 0;
- rep->totalVModMapKeys= 0;
- return 0;
- }
- for (nRtrn=i=0;i<rep->nVModMapKeys;i++) {
- if (xkb->server->vmodmap[i+rep->firstVModMapKey]!=0)
- nRtrn++;
- }
- rep->totalVModMapKeys= nRtrn;
- len= nRtrn*SIZEOF(xkbVModMapWireDesc);
- return len;
-}
-
-static char *
-XkbWriteVirtualModMap(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
- ClientPtr client)
-{
-unsigned i;
-xkbVModMapWireDesc * wire;
-unsigned short * pMap;
-
- wire= (xkbVModMapWireDesc *)buf;
- pMap= &xkb->server->vmodmap[rep->firstVModMapKey];
- for (i=0;i<rep->nVModMapKeys;i++,pMap++) {
- if (*pMap!=0) {
- wire->key= i+rep->firstVModMapKey;
- wire->vmods= *pMap;
- wire++;
- }
- }
- return (char *)wire;
-}
-
-static Status
-XkbComputeGetMapReplySize(XkbDescPtr xkb,xkbGetMapReply *rep)
-{
-int len;
-
- rep->minKeyCode= xkb->min_key_code;
- rep->maxKeyCode= xkb->max_key_code;
- len= XkbSizeKeyTypes(xkb,rep);
- len+= XkbSizeKeySyms(xkb,rep);
- len+= XkbSizeKeyActions(xkb,rep);
- len+= XkbSizeKeyBehaviors(xkb,rep);
- len+= XkbSizeVirtualMods(xkb,rep);
- len+= XkbSizeExplicit(xkb,rep);
- len+= XkbSizeModifierMap(xkb,rep);
- len+= XkbSizeVirtualModMap(xkb,rep);
- rep->length+= (len/4);
- return Success;
-}
-
-static int
-XkbSendMap(ClientPtr client,XkbDescPtr xkb,xkbGetMapReply *rep)
-{
-unsigned i,len;
-char *desc,*start;
-
- len= (rep->length*4)-(SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply));
- start= desc= calloc(1, len);
- if (!start)
- return BadAlloc;
- if ( rep->nTypes>0 )
- desc = XkbWriteKeyTypes(xkb,rep,desc,client);
- if ( rep->nKeySyms>0 )
- desc = XkbWriteKeySyms(xkb,rep,desc,client);
- if ( rep->nKeyActs>0 )
- desc = XkbWriteKeyActions(xkb,rep,desc,client);
- if ( rep->totalKeyBehaviors>0 )
- desc = XkbWriteKeyBehaviors(xkb,rep,desc,client);
- if ( rep->virtualMods ) {
- register int sz,bit;
- for (i=sz=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
- if (rep->virtualMods&bit) {
- desc[sz++]= xkb->server->vmods[i];
- }
- }
- desc+= XkbPaddedSize(sz);
- }
- if ( rep->totalKeyExplicit>0 )
- desc= XkbWriteExplicit(xkb,rep,desc,client);
- if ( rep->totalModMapKeys>0 )
- desc= XkbWriteModifierMap(xkb,rep,desc,client);
- if ( rep->totalVModMapKeys>0 )
- desc= XkbWriteVirtualModMap(xkb,rep,desc,client);
- if ((desc-start)!=(len)) {
- ErrorF("[xkb] BOGUS LENGTH in write keyboard desc, expected %d, got %ld\n",
- len, (unsigned long)(desc-start));
- }
- if (client->swapped) {
- register int n;
- swaps(&rep->sequenceNumber,n);
- swapl(&rep->length,n);
- swaps(&rep->present,n);
- swaps(&rep->totalSyms,n);
- swaps(&rep->totalActs,n);
- }
- WriteToClient(client, (i=SIZEOF(xkbGetMapReply)), (char *)rep);
- WriteToClient(client, len, start);
- free((char *)start);
- return Success;
-}
-
-int
-ProcXkbGetMap(ClientPtr client)
-{
- DeviceIntPtr dev;
- xkbGetMapReply rep;
- XkbDescRec *xkb;
- int n,status;
-
- REQUEST(xkbGetMapReq);
- REQUEST_SIZE_MATCH(xkbGetMapReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
- CHK_MASK_OVERLAP(0x01,stuff->full,stuff->partial);
- CHK_MASK_LEGAL(0x02,stuff->full,XkbAllMapComponentsMask);
- CHK_MASK_LEGAL(0x03,stuff->partial,XkbAllMapComponentsMask);
-
- xkb= dev->key->xkbInfo->desc;
- memset(&rep, 0, sizeof(xkbGetMapReply));
- rep.type= X_Reply;
- rep.sequenceNumber= client->sequence;
- rep.length = (SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply))>>2;
- rep.deviceID = dev->id;
- rep.present = stuff->partial|stuff->full;
- rep.minKeyCode = xkb->min_key_code;
- rep.maxKeyCode = xkb->max_key_code;
- if ( stuff->full&XkbKeyTypesMask ) {
- rep.firstType = 0;
- rep.nTypes = xkb->map->num_types;
- }
- else if (stuff->partial&XkbKeyTypesMask) {
- if (((unsigned)stuff->firstType+stuff->nTypes)>xkb->map->num_types) {
- client->errorValue = _XkbErrCode4(0x04,xkb->map->num_types,
- stuff->firstType,stuff->nTypes);
- return BadValue;
- }
- rep.firstType = stuff->firstType;
- rep.nTypes = stuff->nTypes;
- }
- else rep.nTypes = 0;
- rep.totalTypes = xkb->map->num_types;
-
- n= XkbNumKeys(xkb);
- if ( stuff->full&XkbKeySymsMask ) {
- rep.firstKeySym = xkb->min_key_code;
- rep.nKeySyms = n;
- }
- else if (stuff->partial&XkbKeySymsMask) {
- CHK_KEY_RANGE(0x05,stuff->firstKeySym,stuff->nKeySyms,xkb);
- rep.firstKeySym = stuff->firstKeySym;
- rep.nKeySyms = stuff->nKeySyms;
- }
- else rep.nKeySyms = 0;
- rep.totalSyms= 0;
-
- if ( stuff->full&XkbKeyActionsMask ) {
- rep.firstKeyAct= xkb->min_key_code;
- rep.nKeyActs= n;
- }
- else if (stuff->partial&XkbKeyActionsMask) {
- CHK_KEY_RANGE(0x07,stuff->firstKeyAct,stuff->nKeyActs,xkb);
- rep.firstKeyAct= stuff->firstKeyAct;
- rep.nKeyActs= stuff->nKeyActs;
- }
- else rep.nKeyActs= 0;
- rep.totalActs= 0;
-
- if ( stuff->full&XkbKeyBehaviorsMask ) {
- rep.firstKeyBehavior = xkb->min_key_code;
- rep.nKeyBehaviors = n;
- }
- else if (stuff->partial&XkbKeyBehaviorsMask) {
- CHK_KEY_RANGE(0x09,stuff->firstKeyBehavior,stuff->nKeyBehaviors,xkb);
- rep.firstKeyBehavior= stuff->firstKeyBehavior;
- rep.nKeyBehaviors= stuff->nKeyBehaviors;
- }
- else rep.nKeyBehaviors = 0;
- rep.totalKeyBehaviors= 0;
-
- if (stuff->full&XkbVirtualModsMask)
- rep.virtualMods= ~0;
- else if (stuff->partial&XkbVirtualModsMask)
- rep.virtualMods= stuff->virtualMods;
-
- if (stuff->full&XkbExplicitComponentsMask) {
- rep.firstKeyExplicit= xkb->min_key_code;
- rep.nKeyExplicit= n;
- }
- else if (stuff->partial&XkbExplicitComponentsMask) {
- CHK_KEY_RANGE(0x0B,stuff->firstKeyExplicit,stuff->nKeyExplicit,xkb);
- rep.firstKeyExplicit= stuff->firstKeyExplicit;
- rep.nKeyExplicit= stuff->nKeyExplicit;
- }
- else rep.nKeyExplicit = 0;
- rep.totalKeyExplicit= 0;
-
- if (stuff->full&XkbModifierMapMask) {
- rep.firstModMapKey= xkb->min_key_code;
- rep.nModMapKeys= n;
- }
- else if (stuff->partial&XkbModifierMapMask) {
- CHK_KEY_RANGE(0x0D,stuff->firstModMapKey,stuff->nModMapKeys,xkb);
- rep.firstModMapKey= stuff->firstModMapKey;
- rep.nModMapKeys= stuff->nModMapKeys;
- }
- else rep.nModMapKeys = 0;
- rep.totalModMapKeys= 0;
-
- if (stuff->full&XkbVirtualModMapMask) {
- rep.firstVModMapKey= xkb->min_key_code;
- rep.nVModMapKeys= n;
- }
- else if (stuff->partial&XkbVirtualModMapMask) {
- CHK_KEY_RANGE(0x0F,stuff->firstVModMapKey,stuff->nVModMapKeys,xkb);
- rep.firstVModMapKey= stuff->firstVModMapKey;
- rep.nVModMapKeys= stuff->nVModMapKeys;
- }
- else rep.nVModMapKeys = 0;
- rep.totalVModMapKeys= 0;
-
- if ((status=XkbComputeGetMapReplySize(xkb,&rep))!=Success)
- return status;
- return XkbSendMap(client,xkb,&rep);
-}
-
-/***====================================================================***/
-
-static int
-CheckKeyTypes( ClientPtr client,
- XkbDescPtr xkb,
- xkbSetMapReq * req,
- xkbKeyTypeWireDesc **wireRtrn,
- int * nMapsRtrn,
- CARD8 * mapWidthRtrn)
-{
-unsigned nMaps;
-register unsigned i,n;
-register CARD8 * map;
-register xkbKeyTypeWireDesc *wire = *wireRtrn;
-
- if (req->firstType>((unsigned)xkb->map->num_types)) {
- *nMapsRtrn = _XkbErrCode3(0x01,req->firstType,xkb->map->num_types);
- return 0;
- }
- if (req->flags&XkbSetMapResizeTypes) {
- nMaps = req->firstType+req->nTypes;
- if (nMaps<XkbNumRequiredTypes) { /* canonical types must be there */
- *nMapsRtrn= _XkbErrCode4(0x02,req->firstType,req->nTypes,4);
- return 0;
- }
- }
- else if (req->present&XkbKeyTypesMask) {
- nMaps = xkb->map->num_types;
- if ((req->firstType+req->nTypes)>nMaps) {
- *nMapsRtrn = req->firstType+req->nTypes;
- return 0;
- }
- }
- else {
- *nMapsRtrn = xkb->map->num_types;
- for (i=0;i<xkb->map->num_types;i++) {
- mapWidthRtrn[i] = xkb->map->types[i].num_levels;
- }
- return 1;
- }
-
- for (i=0;i<req->firstType;i++) {
- mapWidthRtrn[i] = xkb->map->types[i].num_levels;
- }
- for (i=0;i<req->nTypes;i++) {
- unsigned width;
- if (client->swapped) {
- register int s;
- swaps(&wire->virtualMods,s);
- }
- n= i+req->firstType;
- width= wire->numLevels;
- if (width<1) {
- *nMapsRtrn= _XkbErrCode3(0x04,n,width);
- return 0;
- }
- else if ((n==XkbOneLevelIndex)&&(width!=1)) { /* must be width 1 */
- *nMapsRtrn= _XkbErrCode3(0x05,n,width);
- return 0;
- }
- else if ((width!=2)&&
- ((n==XkbTwoLevelIndex)||(n==XkbKeypadIndex)||
- (n==XkbAlphabeticIndex))) {
- /* TWO_LEVEL, ALPHABETIC and KEYPAD must be width 2 */
- *nMapsRtrn= _XkbErrCode3(0x05,n,width);
- return 0;
- }
- if (wire->nMapEntries>0) {
- xkbKTSetMapEntryWireDesc * mapWire;
- xkbModsWireDesc * preWire;
- mapWire= (xkbKTSetMapEntryWireDesc *)&wire[1];
- preWire= (xkbModsWireDesc *)&mapWire[wire->nMapEntries];
- for (n=0;n<wire->nMapEntries;n++) {
- if (client->swapped) {
- register int s;
- swaps(&mapWire[n].virtualMods,s);
- }
- if (mapWire[n].realMods&(~wire->realMods)) {
- *nMapsRtrn= _XkbErrCode4(0x06,n,mapWire[n].realMods,
- wire->realMods);
- return 0;
- }
- if (mapWire[n].virtualMods&(~wire->virtualMods)) {
- *nMapsRtrn= _XkbErrCode3(0x07,n,mapWire[n].virtualMods);
- return 0;
- }
- if (mapWire[n].level>=wire->numLevels) {
- *nMapsRtrn= _XkbErrCode4(0x08,n,wire->numLevels,
- mapWire[n].level);
- return 0;
- }
- if (wire->preserve) {
- if (client->swapped) {
- register int s;
- swaps(&preWire[n].virtualMods,s);
- }
- if (preWire[n].realMods&(~mapWire[n].realMods)) {
- *nMapsRtrn= _XkbErrCode4(0x09,n,preWire[n].realMods,
- mapWire[n].realMods);
- return 0;
- }
- if (preWire[n].virtualMods&(~mapWire[n].virtualMods)) {
- *nMapsRtrn=_XkbErrCode3(0x0a,n,preWire[n].virtualMods);
- return 0;
- }
- }
- }
- if (wire->preserve)
- map= (CARD8 *)&preWire[wire->nMapEntries];
- else map= (CARD8 *)&mapWire[wire->nMapEntries];
- }
- else map= (CARD8 *)&wire[1];
- mapWidthRtrn[i+req->firstType] = wire->numLevels;
- wire= (xkbKeyTypeWireDesc *)map;
- }
- for (i=req->firstType+req->nTypes;i<nMaps;i++) {
- mapWidthRtrn[i] = xkb->map->types[i].num_levels;
- }
- *nMapsRtrn = nMaps;
- *wireRtrn = wire;
- return 1;
-}
-
-static int
-CheckKeySyms( ClientPtr client,
- XkbDescPtr xkb,
- xkbSetMapReq * req,
- int nTypes,
- CARD8 * mapWidths,
- CARD16 * symsPerKey,
- xkbSymMapWireDesc ** wireRtrn,
- int * errorRtrn)
-{
-register unsigned i;
-XkbSymMapPtr map;
-xkbSymMapWireDesc* wire = *wireRtrn;
-
- if (!(XkbKeySymsMask&req->present))
- return 1;
- CHK_REQ_KEY_RANGE2(0x11,req->firstKeySym,req->nKeySyms,req,(*errorRtrn),0);
- for (i=0;i<req->nKeySyms;i++) {
- KeySym *pSyms;
- register unsigned nG;
- if (client->swapped) {
- swaps(&wire->nSyms,nG);
- }
- nG = XkbNumGroups(wire->groupInfo);
- if (nG>XkbNumKbdGroups) {
- *errorRtrn = _XkbErrCode3(0x14,i+req->firstKeySym,nG);
- return 0;
- }
- if (nG>0) {
- register int g,w;
- for (g=w=0;g<nG;g++) {
- if (wire->ktIndex[g]>=(unsigned)nTypes) {
- *errorRtrn= _XkbErrCode4(0x15,i+req->firstKeySym,g,
- wire->ktIndex[g]);
- return 0;
- }
- if (mapWidths[wire->ktIndex[g]]>w)
- w= mapWidths[wire->ktIndex[g]];
- }
- if (wire->width!=w) {
- *errorRtrn= _XkbErrCode3(0x16,i+req->firstKeySym,wire->width);
- return 0;
- }
- w*= nG;
- symsPerKey[i+req->firstKeySym] = w;
- if (w!=wire->nSyms) {
- *errorRtrn=_XkbErrCode4(0x16,i+req->firstKeySym,wire->nSyms,w);
- return 0;
- }
- }
- else if (wire->nSyms!=0) {
- *errorRtrn = _XkbErrCode3(0x17,i+req->firstKeySym,wire->nSyms);
- return 0;
- }
- pSyms = (KeySym *)&wire[1];
- wire = (xkbSymMapWireDesc *)&pSyms[wire->nSyms];
- }
-
- map = &xkb->map->key_sym_map[i];
- for (;i<=(unsigned)xkb->max_key_code;i++,map++) {
- register int g,nG,w;
- nG= XkbKeyNumGroups(xkb,i);
- for (w=g=0;g<nG;g++) {
- if (map->kt_index[g]>=(unsigned)nTypes) {
- *errorRtrn = _XkbErrCode4(0x18,i,g,map->kt_index[g]);
- return 0;
- }
- if (mapWidths[map->kt_index[g]]>w)
- w= mapWidths[map->kt_index[g]];
- }
- symsPerKey[i] = w*nG;
- }
- *wireRtrn = wire;
- return 1;
-}
-
-static int
-CheckKeyActions( XkbDescPtr xkb,
- xkbSetMapReq * req,
- int nTypes,
- CARD8 * mapWidths,
- CARD16 * symsPerKey,
- CARD8 ** wireRtrn,
- int * nActsRtrn)
-{
-int nActs;
-CARD8 * wire = *wireRtrn;
-register unsigned i;
-
- if (!(XkbKeyActionsMask&req->present))
- return 1;
- CHK_REQ_KEY_RANGE2(0x21,req->firstKeyAct,req->nKeyActs,req,(*nActsRtrn),0);
- for (nActs=i=0;i<req->nKeyActs;i++) {
- if (wire[0]!=0) {
- if (wire[0]==symsPerKey[i+req->firstKeyAct])
- nActs+= wire[0];
- else {
- *nActsRtrn= _XkbErrCode3(0x23,i+req->firstKeyAct,wire[0]);
- return 0;
- }
- }
- wire++;
- }
- if (req->nKeyActs%4)
- wire+= 4-(req->nKeyActs%4);
- *wireRtrn = (CARD8 *)(((XkbAnyAction *)wire)+nActs);
- *nActsRtrn = nActs;
- return 1;
-}
-
-static int
-CheckKeyBehaviors( XkbDescPtr xkb,
- xkbSetMapReq * req,
- xkbBehaviorWireDesc ** wireRtrn,
- int * errorRtrn)
-{
-register xkbBehaviorWireDesc * wire = *wireRtrn;
-register XkbServerMapPtr server = xkb->server;
-register unsigned i;
-unsigned first,last;
-
- if (((req->present&XkbKeyBehaviorsMask)==0)||(req->nKeyBehaviors<1)) {
- req->present&= ~XkbKeyBehaviorsMask;
- req->nKeyBehaviors= 0;
- return 1;
- }
- first= req->firstKeyBehavior;
- last= req->firstKeyBehavior+req->nKeyBehaviors-1;
- if (first<req->minKeyCode) {
- *errorRtrn = _XkbErrCode3(0x31,first,req->minKeyCode);
- return 0;
- }
- if (last>req->maxKeyCode) {
- *errorRtrn = _XkbErrCode3(0x32,last,req->maxKeyCode);
- return 0;
- }
-
- for (i=0;i<req->totalKeyBehaviors;i++,wire++) {
- if ((wire->key<first)||(wire->key>last)) {
- *errorRtrn = _XkbErrCode4(0x33,first,last,wire->key);
- return 0;
- }
- if ((wire->type&XkbKB_Permanent)&&
- ((server->behaviors[wire->key].type!=wire->type)||
- (server->behaviors[wire->key].data!=wire->data))) {
- *errorRtrn = _XkbErrCode3(0x33,wire->key,wire->type);
- return 0;
- }
- if ((wire->type==XkbKB_RadioGroup)&&
- ((wire->data&(~XkbKB_RGAllowNone))>XkbMaxRadioGroups)) {
- *errorRtrn= _XkbErrCode4(0x34,wire->key,wire->data,
- XkbMaxRadioGroups);
- return 0;
- }
- if ((wire->type==XkbKB_Overlay1)||(wire->type==XkbKB_Overlay2)) {
- CHK_KEY_RANGE2(0x35,wire->key,1,xkb,*errorRtrn,0);
- }
- }
- *wireRtrn = wire;
- return 1;
-}
-
-static int
-CheckVirtualMods( XkbDescRec * xkb,
- xkbSetMapReq * req,
- CARD8 ** wireRtrn,
- int * errorRtrn)
-{
-register CARD8 *wire = *wireRtrn;
-register unsigned i,nMods,bit;
-
- if (((req->present&XkbVirtualModsMask)==0)||(req->virtualMods==0))
- return 1;
- for (i=nMods=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
- if (req->virtualMods&bit)
- nMods++;
- }
- *wireRtrn= (wire+XkbPaddedSize(nMods));
- return 1;
-}
-
-static int
-CheckKeyExplicit( XkbDescPtr xkb,
- xkbSetMapReq * req,
- CARD8 ** wireRtrn,
- int * errorRtrn)
-{
-register CARD8 * wire = *wireRtrn;
-CARD8 * start;
-register unsigned i;
-int first,last;
-
- if (((req->present&XkbExplicitComponentsMask)==0)||(req->nKeyExplicit<1)) {
- req->present&= ~XkbExplicitComponentsMask;
- req->nKeyExplicit= 0;
- return 1;
- }
- first= req->firstKeyExplicit;
- last= first+req->nKeyExplicit-1;
- if (first<req->minKeyCode) {
- *errorRtrn = _XkbErrCode3(0x51,first,req->minKeyCode);
- return 0;
- }
- if (last>req->maxKeyCode) {
- *errorRtrn = _XkbErrCode3(0x52,last,req->maxKeyCode);
- return 0;
- }
- start= wire;
- for (i=0;i<req->totalKeyExplicit;i++,wire+=2) {
- if ((wire[0]<first)||(wire[0]>last)) {
- *errorRtrn = _XkbErrCode4(0x53,first,last,wire[0]);
- return 0;
- }
- if (wire[1]&(~XkbAllExplicitMask)) {
- *errorRtrn= _XkbErrCode3(0x52,~XkbAllExplicitMask,wire[1]);
- return 0;
- }
- }
- wire+= XkbPaddedSize(wire-start)-(wire-start);
- *wireRtrn= wire;
- return 1;
-}
-
-static int
-CheckModifierMap(XkbDescPtr xkb,xkbSetMapReq *req,CARD8 **wireRtrn,int *errRtrn)
-{
-register CARD8 * wire = *wireRtrn;
-CARD8 * start;
-register unsigned i;
-int first,last;
-
- if (((req->present&XkbModifierMapMask)==0)||(req->nModMapKeys<1)) {
- req->present&= ~XkbModifierMapMask;
- req->nModMapKeys= 0;
- return 1;
- }
- first= req->firstModMapKey;
- last= first+req->nModMapKeys-1;
- if (first<req->minKeyCode) {
- *errRtrn = _XkbErrCode3(0x61,first,req->minKeyCode);
- return 0;
- }
- if (last>req->maxKeyCode) {
- *errRtrn = _XkbErrCode3(0x62,last,req->maxKeyCode);
- return 0;
- }
- start= wire;
- for (i=0;i<req->totalModMapKeys;i++,wire+=2) {
- if ((wire[0]<first)||(wire[0]>last)) {
- *errRtrn = _XkbErrCode4(0x63,first,last,wire[0]);
- return 0;
- }
- }
- wire+= XkbPaddedSize(wire-start)-(wire-start);
- *wireRtrn= wire;
- return 1;
-}
-
-static int
-CheckVirtualModMap( XkbDescPtr xkb,
- xkbSetMapReq *req,
- xkbVModMapWireDesc **wireRtrn,
- int *errRtrn)
-{
-register xkbVModMapWireDesc * wire = *wireRtrn;
-register unsigned i;
-int first,last;
-
- if (((req->present&XkbVirtualModMapMask)==0)||(req->nVModMapKeys<1)) {
- req->present&= ~XkbVirtualModMapMask;
- req->nVModMapKeys= 0;
- return 1;
- }
- first= req->firstVModMapKey;
- last= first+req->nVModMapKeys-1;
- if (first<req->minKeyCode) {
- *errRtrn = _XkbErrCode3(0x71,first,req->minKeyCode);
- return 0;
- }
- if (last>req->maxKeyCode) {
- *errRtrn = _XkbErrCode3(0x72,last,req->maxKeyCode);
- return 0;
- }
- for (i=0;i<req->totalVModMapKeys;i++,wire++) {
- if ((wire->key<first)||(wire->key>last)) {
- *errRtrn = _XkbErrCode4(0x73,first,last,wire->key);
- return 0;
- }
- }
- *wireRtrn= wire;
- return 1;
-}
-
-static char *
-SetKeyTypes( XkbDescPtr xkb,
- xkbSetMapReq * req,
- xkbKeyTypeWireDesc * wire,
- XkbChangesPtr changes)
-{
-register unsigned i;
-unsigned first,last;
-CARD8 *map;
-
- if ((unsigned)(req->firstType+req->nTypes)>xkb->map->size_types) {
- i= req->firstType+req->nTypes;
- if (XkbAllocClientMap(xkb,XkbKeyTypesMask,i)!=Success) {
- return NULL;
- }
- }
- if ((unsigned)(req->firstType+req->nTypes)>xkb->map->num_types)
- xkb->map->num_types= req->firstType+req->nTypes;
-
- for (i=0;i<req->nTypes;i++) {
- XkbKeyTypePtr pOld;
- register unsigned n;
-
- if (XkbResizeKeyType(xkb,i+req->firstType,wire->nMapEntries,
- wire->preserve,wire->numLevels)!=Success) {
- return NULL;
- }
- pOld = &xkb->map->types[i+req->firstType];
- map = (CARD8 *)&wire[1];
-
- pOld->mods.real_mods = wire->realMods;
- pOld->mods.vmods= wire->virtualMods;
- pOld->num_levels = wire->numLevels;
- pOld->map_count= wire->nMapEntries;
-
- pOld->mods.mask= pOld->mods.real_mods|
- XkbMaskForVMask(xkb,pOld->mods.vmods);
-
- if (wire->nMapEntries) {
- xkbKTSetMapEntryWireDesc *mapWire;
- xkbModsWireDesc *preWire;
- unsigned tmp;
- mapWire= (xkbKTSetMapEntryWireDesc *)map;
- preWire= (xkbModsWireDesc *)&mapWire[wire->nMapEntries];
- for (n=0;n<wire->nMapEntries;n++) {
- pOld->map[n].active= 1;
- pOld->map[n].mods.mask= mapWire[n].realMods;
- pOld->map[n].mods.real_mods= mapWire[n].realMods;
- pOld->map[n].mods.vmods= mapWire[n].virtualMods;
- pOld->map[n].level= mapWire[n].level;
- if (mapWire[n].virtualMods!=0) {
- tmp= XkbMaskForVMask(xkb,mapWire[n].virtualMods);
- pOld->map[n].active= (tmp!=0);
- pOld->map[n].mods.mask|= tmp;
- }
- if (wire->preserve) {
- pOld->preserve[n].real_mods= preWire[n].realMods;
- pOld->preserve[n].vmods= preWire[n].virtualMods;
- tmp= XkbMaskForVMask(xkb,preWire[n].virtualMods);
- pOld->preserve[n].mask= preWire[n].realMods|tmp;
- }
- }
- if (wire->preserve)
- map= (CARD8 *)&preWire[wire->nMapEntries];
- else map= (CARD8 *)&mapWire[wire->nMapEntries];
- }
- else map= (CARD8 *)&wire[1];
- wire = (xkbKeyTypeWireDesc *)map;
- }
- first= req->firstType;
- last= first+req->nTypes-1; /* last changed type */
- if (changes->map.changed&XkbKeyTypesMask) {
- int oldLast;
- oldLast= changes->map.first_type+changes->map.num_types-1;
- if (changes->map.first_type<first)
- first= changes->map.first_type;
- if (oldLast>last)
- last= oldLast;
- }
- changes->map.changed|= XkbKeyTypesMask;
- changes->map.first_type = first;
- changes->map.num_types = (last-first)+1;
- return (char *)wire;
-}
-
-static char *
-SetKeySyms( ClientPtr client,
- XkbDescPtr xkb,
- xkbSetMapReq * req,
- xkbSymMapWireDesc * wire,
- XkbChangesPtr changes,
- DeviceIntPtr dev)
-{
-register unsigned i,s;
-XkbSymMapPtr oldMap;
-KeySym * newSyms;
-KeySym * pSyms;
-unsigned first,last;
-
- oldMap = &xkb->map->key_sym_map[req->firstKeySym];
- for (i=0;i<req->nKeySyms;i++,oldMap++) {
- pSyms = (KeySym *)&wire[1];
- if (wire->nSyms>0) {
- newSyms = XkbResizeKeySyms(xkb,i+req->firstKeySym,wire->nSyms);
- for (s=0;s<wire->nSyms;s++) {
- newSyms[s]= pSyms[s];
- }
- if (client->swapped) {
- int n;
- for (s=0;s<wire->nSyms;s++) {
- swapl(&newSyms[s],n);
- }
- }
- }
- oldMap->kt_index[0] = wire->ktIndex[0];
- oldMap->kt_index[1] = wire->ktIndex[1];
- oldMap->kt_index[2] = wire->ktIndex[2];
- oldMap->kt_index[3] = wire->ktIndex[3];
- oldMap->group_info = wire->groupInfo;
- oldMap->width = wire->width;
- wire= (xkbSymMapWireDesc *)&pSyms[wire->nSyms];
- }
- first= req->firstKeySym;
- last= first+req->nKeySyms-1;
- if (changes->map.changed&XkbKeySymsMask) {
- int oldLast= (changes->map.first_key_sym+changes->map.num_key_syms-1);
- if (changes->map.first_key_sym<first)
- first= changes->map.first_key_sym;
- if (oldLast>last)
- last= oldLast;
- }
- changes->map.changed|= XkbKeySymsMask;
- changes->map.first_key_sym = first;
- changes->map.num_key_syms = (last-first+1);
-
- s= 0;
- for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
- if (XkbKeyNumGroups(xkb,i)>s)
- s= XkbKeyNumGroups(xkb,i);
- }
- if (s!=xkb->ctrls->num_groups) {
- xkbControlsNotify cn;
- XkbControlsRec old;
- cn.keycode= 0;
- cn.eventType= 0;
- cn.requestMajor= XkbReqCode;
- cn.requestMinor= X_kbSetMap;
- old= *xkb->ctrls;
- xkb->ctrls->num_groups= s;
- if (XkbComputeControlsNotify(dev,&old,xkb->ctrls,&cn,FALSE))
- XkbSendControlsNotify(dev,&cn);
- }
- return (char *)wire;
-}
-
-static char *
-SetKeyActions( XkbDescPtr xkb,
- xkbSetMapReq * req,
- CARD8 * wire,
- XkbChangesPtr changes)
-{
-register unsigned i,first,last;
-CARD8 * nActs = wire;
-XkbAction * newActs;
-
- wire+= XkbPaddedSize(req->nKeyActs);
- for (i=0;i<req->nKeyActs;i++) {
- if (nActs[i]==0)
- xkb->server->key_acts[i+req->firstKeyAct]= 0;
- else {
- newActs= XkbResizeKeyActions(xkb,i+req->firstKeyAct,nActs[i]);
- memcpy((char *)newActs,(char *)wire,
- nActs[i]*SIZEOF(xkbActionWireDesc));
- wire+= nActs[i]*SIZEOF(xkbActionWireDesc);
- }
- }
- first= req->firstKeyAct;
- last= (first+req->nKeyActs-1);
- if (changes->map.changed&XkbKeyActionsMask) {
- int oldLast;
- oldLast= changes->map.first_key_act+changes->map.num_key_acts-1;
- if (changes->map.first_key_act<first)
- first= changes->map.first_key_act;
- if (oldLast>last)
- last= oldLast;
- }
- changes->map.changed|= XkbKeyActionsMask;
- changes->map.first_key_act= first;
- changes->map.num_key_acts= (last-first+1);
- return (char *)wire;
-}
-
-static char *
-SetKeyBehaviors( XkbSrvInfoPtr xkbi,
- xkbSetMapReq *req,
- xkbBehaviorWireDesc *wire,
- XkbChangesPtr changes)
-{
-register unsigned i;
-int maxRG = -1;
-XkbDescPtr xkb = xkbi->desc;
-XkbServerMapPtr server = xkb->server;
-unsigned first,last;
-
- first= req->firstKeyBehavior;
- last= req->firstKeyBehavior+req->nKeyBehaviors-1;
- memset(&server->behaviors[first], 0, req->nKeyBehaviors*sizeof(XkbBehavior));
- for (i=0;i<req->totalKeyBehaviors;i++) {
- if ((server->behaviors[wire->key].type&XkbKB_Permanent)==0) {
- server->behaviors[wire->key].type= wire->type;
- server->behaviors[wire->key].data= wire->data;
- if ((wire->type==XkbKB_RadioGroup)&&(((int)wire->data)>maxRG))
- maxRG= wire->data + 1;
- }
- wire++;
- }
-
- if (maxRG>(int)xkbi->nRadioGroups) {
- int sz = maxRG*sizeof(XkbRadioGroupRec);
- if (xkbi->radioGroups)
- xkbi->radioGroups= realloc(xkbi->radioGroups,sz);
- else xkbi->radioGroups= calloc(1, sz);
- if (xkbi->radioGroups) {
- if (xkbi->nRadioGroups)
- memset(&xkbi->radioGroups[xkbi->nRadioGroups], 0,
- (maxRG-xkbi->nRadioGroups)*sizeof(XkbRadioGroupRec));
- xkbi->nRadioGroups= maxRG;
- }
- else xkbi->nRadioGroups= 0;
- /* should compute members here */
- }
- if (changes->map.changed&XkbKeyBehaviorsMask) {
- unsigned oldLast;
- oldLast= changes->map.first_key_behavior+
- changes->map.num_key_behaviors-1;
- if (changes->map.first_key_behavior<req->firstKeyBehavior)
- first= changes->map.first_key_behavior;
- if (oldLast>last)
- last= oldLast;
- }
- changes->map.changed|= XkbKeyBehaviorsMask;
- changes->map.first_key_behavior = first;
- changes->map.num_key_behaviors = (last-first+1);
- return (char *)wire;
-}
-
-static char *
-SetVirtualMods(XkbSrvInfoPtr xkbi,xkbSetMapReq *req,CARD8 *wire,
- XkbChangesPtr changes)
-{
-register int i,bit,nMods;
-XkbServerMapPtr srv = xkbi->desc->server;
-
- if (((req->present&XkbVirtualModsMask)==0)||(req->virtualMods==0))
- return (char *)wire;
- for (i=nMods=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
- if (req->virtualMods&bit) {
- if (srv->vmods[i]!=wire[nMods]) {
- changes->map.changed|= XkbVirtualModsMask;
- changes->map.vmods|= bit;
- srv->vmods[i]= wire[nMods];
- }
- nMods++;
- }
- }
- return (char *)(wire+XkbPaddedSize(nMods));
-}
-
-static char *
-SetKeyExplicit(XkbSrvInfoPtr xkbi,xkbSetMapReq *req,CARD8 *wire,
- XkbChangesPtr changes)
-{
-register unsigned i,first,last;
-XkbServerMapPtr xkb = xkbi->desc->server;
-CARD8 * start;
-
- start= wire;
- first= req->firstKeyExplicit;
- last= req->firstKeyExplicit+req->nKeyExplicit-1;
- memset(&xkb->explicit[first], 0, req->nKeyExplicit);
- for (i=0;i<req->totalKeyExplicit;i++,wire+= 2) {
- xkb->explicit[wire[0]]= wire[1];
- }
- if (first>0) {
- if (changes->map.changed&XkbExplicitComponentsMask) {
- int oldLast;
- oldLast= changes->map.first_key_explicit+
- changes->map.num_key_explicit-1;
- if (changes->map.first_key_explicit<first)
- first= changes->map.first_key_explicit;
- if (oldLast>last)
- last= oldLast;
- }
- changes->map.first_key_explicit= first;
- changes->map.num_key_explicit= (last-first)+1;
- }
- wire+= XkbPaddedSize(wire-start)-(wire-start);
- return (char *)wire;
-}
-
-static char *
-SetModifierMap( XkbSrvInfoPtr xkbi,
- xkbSetMapReq * req,
- CARD8 * wire,
- XkbChangesPtr changes)
-{
-register unsigned i,first,last;
-XkbClientMapPtr xkb = xkbi->desc->map;
-CARD8 * start;
-
- start= wire;
- first= req->firstModMapKey;
- last= req->firstModMapKey+req->nModMapKeys-1;
- memset(&xkb->modmap[first], 0, req->nModMapKeys);
- for (i=0;i<req->totalModMapKeys;i++,wire+= 2) {
- xkb->modmap[wire[0]]= wire[1];
- }
- if (first>0) {
- if (changes->map.changed&XkbModifierMapMask) {
- int oldLast;
- oldLast= changes->map.first_modmap_key+
- changes->map.num_modmap_keys-1;
- if (changes->map.first_modmap_key<first)
- first= changes->map.first_modmap_key;
- if (oldLast>last)
- last= oldLast;
- }
- changes->map.first_modmap_key= first;
- changes->map.num_modmap_keys= (last-first)+1;
- }
- wire+= XkbPaddedSize(wire-start)-(wire-start);
- return (char *)wire;
-}
-
-static char *
-SetVirtualModMap( XkbSrvInfoPtr xkbi,
- xkbSetMapReq * req,
- xkbVModMapWireDesc * wire,
- XkbChangesPtr changes)
-{
-register unsigned i,first,last;
-XkbServerMapPtr srv = xkbi->desc->server;
-
- first= req->firstVModMapKey;
- last= req->firstVModMapKey+req->nVModMapKeys-1;
- memset(&srv->vmodmap[first], 0, req->nVModMapKeys*sizeof(unsigned short));
- for (i=0;i<req->totalVModMapKeys;i++,wire++) {
- srv->vmodmap[wire->key]= wire->vmods;
- }
- if (first>0) {
- if (changes->map.changed&XkbVirtualModMapMask) {
- int oldLast;
- oldLast= changes->map.first_vmodmap_key+
- changes->map.num_vmodmap_keys-1;
- if (changes->map.first_vmodmap_key<first)
- first= changes->map.first_vmodmap_key;
- if (oldLast>last)
- last= oldLast;
- }
- changes->map.first_vmodmap_key= first;
- changes->map.num_vmodmap_keys= (last-first)+1;
- }
- return (char *)wire;
-}
-
-/**
- * Check if the given request can be applied to the given device but don't
- * actually do anything..
- */
-static int
-_XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char* values)
-{
- XkbSrvInfoPtr xkbi;
- XkbDescPtr xkb;
- int error;
- int nTypes = 0, nActions;
- CARD8 mapWidths[XkbMaxLegalKeyCode + 1] = {0};
- CARD16 symsPerKey[XkbMaxLegalKeyCode + 1] = {0};
- XkbSymMapPtr map;
- int i;
-
- xkbi= dev->key->xkbInfo;
- xkb = xkbi->desc;
-
- if ((xkb->min_key_code != req->minKeyCode)||
- (xkb->max_key_code != req->maxKeyCode)) {
- if (client->vMajor!=1) { /* pre 1.0 versions of Xlib have a bug */
- req->minKeyCode= xkb->min_key_code;
- req->maxKeyCode= xkb->max_key_code;
- }
- else {
- if (!XkbIsLegalKeycode(req->minKeyCode)) {
- client->errorValue = _XkbErrCode3(2, req->minKeyCode, req->maxKeyCode);
- return BadValue;
- }
- if (req->minKeyCode > req->maxKeyCode) {
- client->errorValue = _XkbErrCode3(3, req->minKeyCode, req->maxKeyCode);
- return BadMatch;
- }
- }
- }
-
- if ((req->present & XkbKeyTypesMask) &&
- (!CheckKeyTypes(client,xkb,req,(xkbKeyTypeWireDesc **)&values,
- &nTypes,mapWidths))) {
- client->errorValue = nTypes;
- return BadValue;
- }
-
- /* symsPerKey/mapWidths must be filled regardless of client-side flags */
- map = &xkb->map->key_sym_map[xkb->min_key_code];
- for (i=xkb->min_key_code;i<xkb->max_key_code;i++,map++) {
- register int g,ng,w;
- ng= XkbNumGroups(map->group_info);
- for (w=g=0;g<ng;g++) {
- if (map->kt_index[g]>=(unsigned)nTypes) {
- client->errorValue = _XkbErrCode4(0x13,i,g,map->kt_index[g]);
- return 0;
- }
- if (mapWidths[map->kt_index[g]]>w)
- w= mapWidths[map->kt_index[g]];
- }
- symsPerKey[i] = w*ng;
- }
-
- if ((req->present & XkbKeySymsMask) &&
- (!CheckKeySyms(client,xkb,req,nTypes,mapWidths,symsPerKey,
- (xkbSymMapWireDesc **)&values,&error))) {
- client->errorValue = error;
- return BadValue;
- }
-
- if ((req->present & XkbKeyActionsMask) &&
- (!CheckKeyActions(xkb,req,nTypes,mapWidths,symsPerKey,
- (CARD8 **)&values,&nActions))) {
- client->errorValue = nActions;
- return BadValue;
- }
-
- if ((req->present & XkbKeyBehaviorsMask) &&
- (!CheckKeyBehaviors(xkb,req,(xkbBehaviorWireDesc**)&values,&error))) {
- client->errorValue = error;
- return BadValue;
- }
-
- if ((req->present & XkbVirtualModsMask) &&
- (!CheckVirtualMods(xkb,req,(CARD8 **)&values,&error))) {
- client->errorValue= error;
- return BadValue;
- }
- if ((req->present&XkbExplicitComponentsMask) &&
- (!CheckKeyExplicit(xkb,req,(CARD8 **)&values,&error))) {
- client->errorValue= error;
- return BadValue;
- }
- if ((req->present&XkbModifierMapMask) &&
- (!CheckModifierMap(xkb,req,(CARD8 **)&values,&error))) {
- client->errorValue= error;
- return BadValue;
- }
- if ((req->present&XkbVirtualModMapMask) &&
- (!CheckVirtualModMap(xkb,req,(xkbVModMapWireDesc **)&values,&error))) {
- client->errorValue= error;
- return BadValue;
- }
-
- if (((values-((char *)req))/4)!= req->length) {
- ErrorF("[xkb] Internal error! Bad length in XkbSetMap (after check)\n");
- client->errorValue = values-((char *)&req[1]);
- return BadLength;
- }
-
- return Success;
-}
-
-/**
- * Apply the given request on the given device.
- */
-static int
-_XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char *values)
-{
- XkbEventCauseRec cause;
- XkbChangesRec change;
- Bool sentNKN;
- XkbSrvInfoPtr xkbi;
- XkbDescPtr xkb;
-
- xkbi= dev->key->xkbInfo;
- xkb = xkbi->desc;
-
- XkbSetCauseXkbReq(&cause,X_kbSetMap,client);
- memset(&change, 0, sizeof(change));
- sentNKN = FALSE;
- if ((xkb->min_key_code!=req->minKeyCode)||
- (xkb->max_key_code!=req->maxKeyCode)) {
- Status status;
- xkbNewKeyboardNotify nkn;
- nkn.deviceID = nkn.oldDeviceID = dev->id;
- nkn.oldMinKeyCode = xkb->min_key_code;
- nkn.oldMaxKeyCode = xkb->max_key_code;
- status= XkbChangeKeycodeRange(xkb, req->minKeyCode,
- req->maxKeyCode, &change);
- if (status != Success)
- return status; /* oh-oh. what about the other keyboards? */
- nkn.minKeyCode = xkb->min_key_code;
- nkn.maxKeyCode = xkb->max_key_code;
- nkn.requestMajor = XkbReqCode;
- nkn.requestMinor = X_kbSetMap;
- nkn.changed = XkbNKN_KeycodesMask;
- XkbSendNewKeyboardNotify(dev,&nkn);
- sentNKN = TRUE;
- }
-
- if (req->present&XkbKeyTypesMask) {
- values = SetKeyTypes(xkb,req,(xkbKeyTypeWireDesc *)values,&change);
- if (!values) goto allocFailure;
- }
- if (req->present&XkbKeySymsMask) {
- values = SetKeySyms(client,xkb,req,(xkbSymMapWireDesc *)values,&change,dev);
- if (!values) goto allocFailure;
- }
- if (req->present&XkbKeyActionsMask) {
- values = SetKeyActions(xkb,req,(CARD8 *)values,&change);
- if (!values) goto allocFailure;
- }
- if (req->present&XkbKeyBehaviorsMask) {
- values= SetKeyBehaviors(xkbi,req,(xkbBehaviorWireDesc *)values,&change);
- if (!values) goto allocFailure;
- }
- if (req->present&XkbVirtualModsMask)
- values= SetVirtualMods(xkbi,req,(CARD8 *)values,&change);
- if (req->present&XkbExplicitComponentsMask)
- values= SetKeyExplicit(xkbi,req,(CARD8 *)values,&change);
- if (req->present&XkbModifierMapMask)
- values= SetModifierMap(xkbi,req,(CARD8 *)values,&change);
- if (req->present&XkbVirtualModMapMask)
- values= SetVirtualModMap(xkbi,req,(xkbVModMapWireDesc *)values,&change);
- if (((values-((char *)req))/4)!=req->length) {
- ErrorF("[xkb] Internal error! Bad length in XkbSetMap (after set)\n");
- client->errorValue = values-((char *)&req[1]);
- return BadLength;
- }
- if (req->flags&XkbSetMapRecomputeActions) {
- KeyCode first,last,firstMM,lastMM;
- if (change.map.num_key_syms>0) {
- first= change.map.first_key_sym;
- last= first+change.map.num_key_syms-1;
- }
- else first= last= 0;
- if (change.map.num_modmap_keys>0) {
- firstMM= change.map.first_modmap_key;
- lastMM= first+change.map.num_modmap_keys-1;
- }
- else firstMM= lastMM= 0;
- if ((last>0) && (lastMM>0)) {
- if (firstMM<first)
- first= firstMM;
- if (lastMM>last)
- last= lastMM;
- }
- else if (lastMM>0) {
- first= firstMM;
- last= lastMM;
- }
- if (last>0) {
- unsigned check= 0;
- XkbUpdateActions(dev,first,(last-first+1),&change,&check,&cause);
- if (check)
- XkbCheckSecondaryEffects(xkbi,check,&change,&cause);
- }
- }
- if (!sentNKN)
- XkbSendNotification(dev,&change,&cause);
-
- return Success;
-allocFailure:
- return BadAlloc;
-}
-
-
-int
-ProcXkbSetMap(ClientPtr client)
-{
- DeviceIntPtr dev;
- char * tmp;
- int rc;
-
- REQUEST(xkbSetMapReq);
- REQUEST_AT_LEAST_SIZE(xkbSetMapReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
- CHK_MASK_LEGAL(0x01,stuff->present,XkbAllMapComponentsMask);
-
- tmp = (char *)&stuff[1];
-
- /* Check if we can to the SetMap on the requested device. If this
- succeeds, do the same thing for all extension devices (if needed).
- If any of them fails, fail. */
- rc = _XkbSetMapChecks(client, dev, stuff, tmp);
-
- if (rc != Success)
- return rc;
-
- if (stuff->deviceSpec == XkbUseCoreKbd)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
- {
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
- if (rc == Success)
- {
- rc = _XkbSetMapChecks(client, other, stuff, tmp);
- if (rc != Success)
- return rc;
- }
- }
- }
- }
-
- /* We know now that we will succed with the SetMap. In theory anyway. */
- rc = _XkbSetMap(client, dev, stuff, tmp);
- if (rc != Success)
- return rc;
-
- if (stuff->deviceSpec == XkbUseCoreKbd)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
- {
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
- if (rc == Success)
- _XkbSetMap(client, other, stuff, tmp);
- /* ignore rc. if the SetMap failed although the check above
- reported true there isn't much we can do. we still need to
- set all other devices, hoping that at least they stay in
- sync. */
- }
- }
- }
-
- return Success;
-}
-
-/***====================================================================***/
-
-static Status
-XkbComputeGetCompatMapReplySize( XkbCompatMapPtr compat,
- xkbGetCompatMapReply * rep)
-{
-unsigned size,nGroups;
-
- nGroups= 0;
- if (rep->groups!=0) {
- register int i,bit;
- for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
- if (rep->groups&bit)
- nGroups++;
- }
- }
- size= nGroups*SIZEOF(xkbModsWireDesc);
- size+= (rep->nSI*SIZEOF(xkbSymInterpretWireDesc));
- rep->length= size/4;
- return Success;
-}
-
-static int
-XkbSendCompatMap( ClientPtr client,
- XkbCompatMapPtr compat,
- xkbGetCompatMapReply * rep)
-{
-char * data;
-int size;
-
- size= rep->length*4;
- if (size>0) {
- data = malloc(size);
- if (data) {
- register unsigned i,bit;
- xkbModsWireDesc * grp;
- XkbSymInterpretPtr sym= &compat->sym_interpret[rep->firstSI];
- xkbSymInterpretWireDesc *wire = (xkbSymInterpretWireDesc *)data;
- for (i=0;i<rep->nSI;i++,sym++,wire++) {
- wire->sym= sym->sym;
- wire->mods= sym->mods;
- wire->match= sym->match;
- wire->virtualMod= sym->virtual_mod;
- wire->flags= sym->flags;
- memcpy((char*)&wire->act,(char*)&sym->act,sz_xkbActionWireDesc);
- if (client->swapped) {
- register int n;
- swapl(&wire->sym,n);
- }
- }
- if (rep->groups) {
- grp = (xkbModsWireDesc *)wire;
- for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
- if (rep->groups&bit) {
- grp->mask= compat->groups[i].mask;
- grp->realMods= compat->groups[i].real_mods;
- grp->virtualMods= compat->groups[i].vmods;
- if (client->swapped) {
- register int n;
- swaps(&grp->virtualMods,n);
- }
- grp++;
- }
- }
- wire= (xkbSymInterpretWireDesc*)grp;
- }
- }
- else return BadAlloc;
- }
- else data= NULL;
-
- if (client->swapped) {
- register int n;
- swaps(&rep->sequenceNumber,n);
- swapl(&rep->length,n);
- swaps(&rep->firstSI,n);
- swaps(&rep->nSI,n);
- swaps(&rep->nTotalSI,n);
- }
-
- WriteToClient(client, SIZEOF(xkbGetCompatMapReply), (char *)rep);
- if (data) {
- WriteToClient(client, size, data);
- free((char *)data);
- }
- return Success;
-}
-
-int
-ProcXkbGetCompatMap(ClientPtr client)
-{
- xkbGetCompatMapReply rep;
- DeviceIntPtr dev;
- XkbDescPtr xkb;
- XkbCompatMapPtr compat;
-
- REQUEST(xkbGetCompatMapReq);
- REQUEST_SIZE_MATCH(xkbGetCompatMapReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
-
- xkb = dev->key->xkbInfo->desc;
- compat= xkb->compat;
-
- rep.type = X_Reply;
- rep.deviceID = dev->id;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.firstSI = stuff->firstSI;
- rep.nSI = stuff->nSI;
- if (stuff->getAllSI) {
- rep.firstSI = 0;
- rep.nSI = compat->num_si;
- }
- else if ((((unsigned)stuff->nSI)>0)&&
- ((unsigned)(stuff->firstSI+stuff->nSI-1)>=compat->num_si)) {
- client->errorValue = _XkbErrCode2(0x05,compat->num_si);
- return BadValue;
- }
- rep.nTotalSI = compat->num_si;
- rep.groups= stuff->groups;
- XkbComputeGetCompatMapReplySize(compat,&rep);
- return XkbSendCompatMap(client,compat,&rep);
-}
-
-/**
- * Apply the given request on the given device.
- * If dryRun is TRUE, then value checks are performed, but the device isn't
- * modified.
- */
-static int
-_XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
- xkbSetCompatMapReq *req, char* data, BOOL dryRun)
-{
- XkbSrvInfoPtr xkbi;
- XkbDescPtr xkb;
- XkbCompatMapPtr compat;
- int nGroups;
- unsigned i,bit;
-
- xkbi = dev->key->xkbInfo;
- xkb = xkbi->desc;
- compat = xkb->compat;
-
- if ((req->nSI>0)||(req->truncateSI)) {
- xkbSymInterpretWireDesc *wire;
- if (req->firstSI>compat->num_si) {
- client->errorValue = _XkbErrCode2(0x02,compat->num_si);
- return BadValue;
- }
- wire= (xkbSymInterpretWireDesc *)data;
- wire+= req->nSI;
- data = (char *)wire;
- }
-
- nGroups= 0;
- if (req->groups!=0) {
- for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
- if ( req->groups&bit )
- nGroups++;
- }
- }
- data+= nGroups*SIZEOF(xkbModsWireDesc);
- if (((data-((char *)req))/4)!=req->length) {
- return BadLength;
- }
-
- /* Done all the checks we can do */
- if (dryRun)
- return Success;
-
- data = (char *)&req[1];
- if (req->nSI>0) {
- xkbSymInterpretWireDesc *wire = (xkbSymInterpretWireDesc *)data;
- XkbSymInterpretPtr sym;
- if ((unsigned)(req->firstSI+req->nSI)>compat->num_si) {
- compat->num_si= req->firstSI+req->nSI;
- compat->sym_interpret= realloc(compat->sym_interpret,
- compat->num_si * sizeof(XkbSymInterpretRec));
- if (!compat->sym_interpret) {
- compat->num_si= 0;
- return BadAlloc;
- }
- }
- else if (req->truncateSI) {
- compat->num_si = req->firstSI+req->nSI;
- }
- sym = &compat->sym_interpret[req->firstSI];
- for (i=0;i<req->nSI;i++,wire++,sym++) {
- if (client->swapped) {
- int n;
- swapl(&wire->sym,n);
- }
- sym->sym= wire->sym;
- sym->mods= wire->mods;
- sym->match= wire->match;
- sym->flags= wire->flags;
- sym->virtual_mod= wire->virtualMod;
- memcpy((char *)&sym->act,(char *)&wire->act,
- SIZEOF(xkbActionWireDesc));
- }
- data = (char *)wire;
- }
- else if (req->truncateSI) {
- compat->num_si = req->firstSI;
- }
-
- if (req->groups!=0) {
- unsigned i, bit;
- xkbModsWireDesc *wire = (xkbModsWireDesc *)data;
- for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) {
- if (req->groups & bit) {
- if (client->swapped) {
- int n;
- swaps(&wire->virtualMods,n);
- }
- compat->groups[i].mask= wire->realMods;
- compat->groups[i].real_mods= wire->realMods;
- compat->groups[i].vmods= wire->virtualMods;
- if (wire->virtualMods!=0) {
- unsigned tmp;
- tmp= XkbMaskForVMask(xkb,wire->virtualMods);
- compat->groups[i].mask|= tmp;
- }
- data+= SIZEOF(xkbModsWireDesc);
- wire= (xkbModsWireDesc *)data;
- }
- }
- }
- i= XkbPaddedSize((data-((char *)req)));
- if ((i/4)!=req->length) {
- ErrorF("[xkb] Internal length error on read in _XkbSetCompatMap\n");
- return BadLength;
- }
-
- if (dev->xkb_interest) {
- xkbCompatMapNotify ev;
- ev.deviceID = dev->id;
- ev.changedGroups = req->groups;
- ev.firstSI = req->firstSI;
- ev.nSI = req->nSI;
- ev.nTotalSI = compat->num_si;
- XkbSendCompatMapNotify(dev,&ev);
- }
-
- if (req->recomputeActions) {
- XkbChangesRec change;
- unsigned check;
- XkbEventCauseRec cause;
-
- XkbSetCauseXkbReq(&cause,X_kbSetCompatMap,client);
- memset(&change, 0, sizeof(XkbChangesRec));
- XkbUpdateActions(dev,xkb->min_key_code,XkbNumKeys(xkb),&change,&check,
- &cause);
- if (check)
- XkbCheckSecondaryEffects(xkbi,check,&change,&cause);
- XkbSendNotification(dev,&change,&cause);
- }
- return Success;
-}
-
-int
-ProcXkbSetCompatMap(ClientPtr client)
-{
- DeviceIntPtr dev;
- char *data;
- int rc;
-
- REQUEST(xkbSetCompatMapReq);
- REQUEST_AT_LEAST_SIZE(xkbSetCompatMapReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
-
- data = (char *)&stuff[1];
-
- /* check first using a dry-run */
- rc = _XkbSetCompatMap(client, dev, stuff, data, TRUE);
- if (rc != Success)
- return rc;
- if (stuff->deviceSpec == XkbUseCoreKbd)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
- {
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
- if (rc == Success)
- {
- /* dry-run */
- rc = _XkbSetCompatMap(client, other, stuff, data, TRUE);
- if (rc != Success)
- return rc;
- }
- }
- }
- }
-
- /* Yay, the dry-runs succeed. Let's apply */
- rc = _XkbSetCompatMap(client, dev, stuff, data, FALSE);
- if (rc != Success)
- return rc;
- if (stuff->deviceSpec == XkbUseCoreKbd)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
- {
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
- if (rc == Success)
- {
- rc = _XkbSetCompatMap(client, other, stuff, data, FALSE);
- if (rc != Success)
- return rc;
- }
- }
- }
- }
-
- return Success;
-}
-
-/***====================================================================***/
-
-int
-ProcXkbGetIndicatorState(ClientPtr client)
-{
- xkbGetIndicatorStateReply rep;
- XkbSrvLedInfoPtr sli;
- DeviceIntPtr dev;
- register int i;
-
- REQUEST(xkbGetIndicatorStateReq);
- REQUEST_SIZE_MATCH(xkbGetIndicatorStateReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
-
- sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,
- XkbXI_IndicatorStateMask);
- if (!sli)
- return BadAlloc;
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.deviceID = dev->id;
- rep.state = sli->effectiveState;
-
- if (client->swapped) {
- swaps(&rep.sequenceNumber,i);
- swapl(&rep.state,i);
- }
- WriteToClient(client, SIZEOF(xkbGetIndicatorStateReply), (char *)&rep);
- return Success;
-}
-
-/***====================================================================***/
-
-static Status
-XkbComputeGetIndicatorMapReplySize(
- XkbIndicatorPtr indicators,
- xkbGetIndicatorMapReply *rep)
-{
-register int i,bit;
-int nIndicators;
-
- rep->realIndicators = indicators->phys_indicators;
- for (i=nIndicators=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
- if (rep->which&bit)
- nIndicators++;
- }
- rep->length = (nIndicators*SIZEOF(xkbIndicatorMapWireDesc))/4;
- return Success;
-}
-
-static int
-XkbSendIndicatorMap( ClientPtr client,
- XkbIndicatorPtr indicators,
- xkbGetIndicatorMapReply * rep)
-{
-int length;
-CARD8 * map;
-register int i;
-register unsigned bit;
-
- length = rep->length*4;
- if (length>0) {
- CARD8 *to;
- to= map= malloc(length);
- if (map) {
- xkbIndicatorMapWireDesc *wire = (xkbIndicatorMapWireDesc *)to;
- for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
- if (rep->which&bit) {
- wire->flags= indicators->maps[i].flags;
- wire->whichGroups= indicators->maps[i].which_groups;
- wire->groups= indicators->maps[i].groups;
- wire->whichMods= indicators->maps[i].which_mods;
- wire->mods= indicators->maps[i].mods.mask;
- wire->realMods= indicators->maps[i].mods.real_mods;
- wire->virtualMods= indicators->maps[i].mods.vmods;
- wire->ctrls= indicators->maps[i].ctrls;
- if (client->swapped) {
- register int n;
- swaps(&wire->virtualMods,n);
- swapl(&wire->ctrls,n);
- }
- wire++;
- }
- }
- to = (CARD8 *)wire;
- if ((to-map)!=length) {
- client->errorValue = _XkbErrCode2(0xff,length);
- free(map);
- return BadLength;
- }
- }
- else return BadAlloc;
- }
- else map = NULL;
- if (client->swapped) {
- swaps(&rep->sequenceNumber,i);
- swapl(&rep->length,i);
- swapl(&rep->which,i);
- swapl(&rep->realIndicators,i);
- }
- WriteToClient(client, SIZEOF(xkbGetIndicatorMapReply), (char *)rep);
- if (map) {
- WriteToClient(client, length, (char *)map);
- free((char *)map);
- }
- return Success;
-}
-
-int
-ProcXkbGetIndicatorMap(ClientPtr client)
-{
-xkbGetIndicatorMapReply rep;
-DeviceIntPtr dev;
-XkbDescPtr xkb;
-XkbIndicatorPtr leds;
-
- REQUEST(xkbGetIndicatorMapReq);
- REQUEST_SIZE_MATCH(xkbGetIndicatorMapReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
-
- xkb= dev->key->xkbInfo->desc;
- leds= xkb->indicators;
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.deviceID = dev->id;
- rep.which = stuff->which;
- XkbComputeGetIndicatorMapReplySize(leds,&rep);
- return XkbSendIndicatorMap(client,leds,&rep);
-}
-
-/**
- * Apply the given map to the given device. Which specifies which components
- * to apply.
- */
-static int
-_XkbSetIndicatorMap(ClientPtr client, DeviceIntPtr dev,
- int which, xkbIndicatorMapWireDesc *desc)
-{
- XkbSrvInfoPtr xkbi;
- XkbSrvLedInfoPtr sli;
- XkbEventCauseRec cause;
- int i, bit;
-
- xkbi = dev->key->xkbInfo;
-
- sli= XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId,
- XkbXI_IndicatorMapsMask);
- if (!sli)
- return BadAlloc;
-
- for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) {
- if (which & bit) {
- sli->maps[i].flags = desc->flags;
- sli->maps[i].which_groups = desc->whichGroups;
- sli->maps[i].groups = desc->groups;
- sli->maps[i].which_mods = desc->whichMods;
- sli->maps[i].mods.mask = desc->mods;
- sli->maps[i].mods.real_mods = desc->mods;
- sli->maps[i].mods.vmods= desc->virtualMods;
- sli->maps[i].ctrls = desc->ctrls;
- if (desc->virtualMods!=0) {
- unsigned tmp;
- tmp= XkbMaskForVMask(xkbi->desc,desc->virtualMods);
- sli->maps[i].mods.mask= desc->mods|tmp;
- }
- desc++;
- }
- }
-
- XkbSetCauseXkbReq(&cause,X_kbSetIndicatorMap,client);
- XkbApplyLedMapChanges(dev,sli,which,NULL,NULL,&cause);
-
- return Success;
-}
-
-int
-ProcXkbSetIndicatorMap(ClientPtr client)
-{
- int i, bit;
- int nIndicators;
- DeviceIntPtr dev;
- xkbIndicatorMapWireDesc *from;
- int rc;
-
- REQUEST(xkbSetIndicatorMapReq);
- REQUEST_AT_LEAST_SIZE(xkbSetIndicatorMapReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
-
- if (stuff->which==0)
- return Success;
-
- for (nIndicators=i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
- if (stuff->which&bit)
- nIndicators++;
- }
- if (stuff->length!=((SIZEOF(xkbSetIndicatorMapReq)+
- (nIndicators*SIZEOF(xkbIndicatorMapWireDesc)))/4)) {
- return BadLength;
- }
-
- from = (xkbIndicatorMapWireDesc *)&stuff[1];
- for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
- if (stuff->which&bit) {
- if (client->swapped) {
- int n;
- swaps(&from->virtualMods,n);
- swapl(&from->ctrls,n);
- }
- CHK_MASK_LEGAL(i,from->whichGroups,XkbIM_UseAnyGroup);
- CHK_MASK_LEGAL(i,from->whichMods,XkbIM_UseAnyMods);
- from++;
- }
- }
-
- from = (xkbIndicatorMapWireDesc *)&stuff[1];
- rc = _XkbSetIndicatorMap(client, dev, stuff->which, from);
- if (rc != Success)
- return rc;
-
- if (stuff->deviceSpec == XkbUseCoreKbd)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
- {
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess);
- if (rc == Success)
- _XkbSetIndicatorMap(client, other, stuff->which, from);
- }
- }
- }
-
- return Success;
-}
-
-/***====================================================================***/
-
-int
-ProcXkbGetNamedIndicator(ClientPtr client)
-{
- DeviceIntPtr dev;
- xkbGetNamedIndicatorReply rep;
- register int i = 0;
- XkbSrvLedInfoPtr sli;
- XkbIndicatorMapPtr map = NULL;
-
- REQUEST(xkbGetNamedIndicatorReq);
- REQUEST_SIZE_MATCH(xkbGetNamedIndicatorReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
- CHK_ATOM_ONLY(stuff->indicator);
-
- sli= XkbFindSrvLedInfo(dev,stuff->ledClass,stuff->ledID,0);
- if (!sli)
- return BadAlloc;
-
- i= 0;
- map= NULL;
- if ((sli->names)&&(sli->maps)) {
- for (i=0;i<XkbNumIndicators;i++) {
- if (stuff->indicator==sli->names[i]) {
- map= &sli->maps[i];
- break;
- }
- }
- }
-
- rep.type= X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.deviceID = dev->id;
- rep.indicator= stuff->indicator;
- if (map!=NULL) {
- rep.found= TRUE;
- rep.on= ((sli->effectiveState&(1<<i))!=0);
- rep.realIndicator= ((sli->physIndicators&(1<<i))!=0);
- rep.ndx= i;
- rep.flags= map->flags;
- rep.whichGroups= map->which_groups;
- rep.groups= map->groups;
- rep.whichMods= map->which_mods;
- rep.mods= map->mods.mask;
- rep.realMods= map->mods.real_mods;
- rep.virtualMods= map->mods.vmods;
- rep.ctrls= map->ctrls;
- rep.supported= TRUE;
- }
- else {
- rep.found= FALSE;
- rep.on= FALSE;
- rep.realIndicator= FALSE;
- rep.ndx= XkbNoIndicator;
- rep.flags= 0;
- rep.whichGroups= 0;
- rep.groups= 0;
- rep.whichMods= 0;
- rep.mods= 0;
- rep.realMods= 0;
- rep.virtualMods= 0;
- rep.ctrls= 0;
- rep.supported= TRUE;
- }
- if ( client->swapped ) {
- register int n;
- swapl(&rep.length,n);
- swaps(&rep.sequenceNumber,n);
- swapl(&rep.indicator,n);
- swaps(&rep.virtualMods,n);
- swapl(&rep.ctrls,n);
- }
-
- WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), (char *)&rep);
- return Success;
-}
-
-
-/**
- * Find the IM on the device.
- * Returns the map, or NULL if the map doesn't exist.
- * If the return value is NULL, led_return is undefined. Otherwise, led_return
- * is set to the led index of the map.
- */
-static XkbIndicatorMapPtr
-_XkbFindNamedIndicatorMap(XkbSrvLedInfoPtr sli, Atom indicator,
- int *led_return)
-{
- XkbIndicatorMapPtr map;
-
- /* search for the right indicator */
- map = NULL;
- if (sli->names && sli->maps) {
- int led;
-
- for (led = 0; (led < XkbNumIndicators) && (map == NULL); led++) {
- if (sli->names[led] == indicator) {
- map= &sli->maps[led];
- *led_return = led;
- break;
- }
- }
- }
-
- return map;
-}
-
-/**
- * Creates an indicator map on the device. If dryRun is TRUE, it only checks
- * if creation is possible, but doesn't actually create it.
- */
-static int
-_XkbCreateIndicatorMap(DeviceIntPtr dev, Atom indicator,
- int ledClass, int ledID,
- XkbIndicatorMapPtr *map_return, int *led_return,
- Bool dryRun)
-{
- XkbSrvLedInfoPtr sli;
- XkbIndicatorMapPtr map;
- int led;
-
- sli = XkbFindSrvLedInfo(dev, ledClass, ledID, XkbXI_IndicatorsMask);
- if (!sli)
- return BadAlloc;
-
- map = _XkbFindNamedIndicatorMap(sli, indicator, &led);
-
- if (!map)
- {
- /* find first unused indicator maps and assign the name to it */
- for (led = 0, map = NULL; (led < XkbNumIndicators) && (map == NULL); led++) {
- if ((sli->names) && (sli->maps) && (sli->names[led] == None) &&
- (!XkbIM_InUse(&sli->maps[led])))
- {
- map = &sli->maps[led];
- if (!dryRun)
- sli->names[led] = indicator;
- break;
- }
- }
- }
-
- if (!map)
- return BadAlloc;
-
- *led_return = led;
- *map_return = map;
- return Success;
-}
-
-static int
-_XkbSetNamedIndicator(ClientPtr client, DeviceIntPtr dev,
- xkbSetNamedIndicatorReq *stuff)
-{
- unsigned int extDevReason;
- unsigned int statec, namec, mapc;
- XkbSrvLedInfoPtr sli;
- int led = 0;
- XkbIndicatorMapPtr map;
- DeviceIntPtr kbd;
- XkbEventCauseRec cause;
- xkbExtensionDeviceNotify ed;
- XkbChangesRec changes;
- int rc;
-
- rc = _XkbCreateIndicatorMap(dev, stuff->indicator, stuff->ledClass,
- stuff->ledID, &map, &led, FALSE);
- if (rc != Success || !map) /* oh-oh */
- return rc;
-
- sli = XkbFindSrvLedInfo(dev, stuff->ledClass, stuff->ledID,
- XkbXI_IndicatorsMask);
- if (!sli)
- return BadAlloc;
-
- namec = mapc = statec = 0;
- extDevReason = 0;
-
- namec |= (1<<led);
- sli->namesPresent |= ((stuff->indicator != None) ? (1 << led) : 0);
- extDevReason |= XkbXI_IndicatorNamesMask;
-
- if (stuff->setMap) {
- map->flags = stuff->flags;
- map->which_groups = stuff->whichGroups;
- map->groups = stuff->groups;
- map->which_mods = stuff->whichMods;
- map->mods.mask = stuff->realMods;
- map->mods.real_mods = stuff->realMods;
- map->mods.vmods= stuff->virtualMods;
- map->ctrls = stuff->ctrls;
- mapc|= (1<<led);
- }
-
- if ((stuff->setState) && ((map->flags & XkbIM_NoExplicit) == 0))
- {
- if (stuff->on) sli->explicitState |= (1<<led);
- else sli->explicitState &= ~(1<<led);
- statec |= ((sli->effectiveState ^ sli->explicitState) & (1 << led));
- }
-
- memset((char *)&ed, 0, sizeof(xkbExtensionDeviceNotify));
- memset((char *)&changes, 0, sizeof(XkbChangesRec));
- XkbSetCauseXkbReq(&cause,X_kbSetNamedIndicator,client);
- if (namec)
- XkbApplyLedNameChanges(dev,sli,namec,&ed,&changes,&cause);
- if (mapc)
- XkbApplyLedMapChanges(dev,sli,mapc,&ed,&changes,&cause);
- if (statec)
- XkbApplyLedStateChanges(dev,sli,statec,&ed,&changes,&cause);
-
- kbd = dev;
- if ((sli->flags&XkbSLI_HasOwnState)==0)
- kbd = inputInfo.keyboard;
- XkbFlushLedEvents(dev, kbd, sli, &ed, &changes, &cause);
-
- return Success;
-}
-
-int
-ProcXkbSetNamedIndicator(ClientPtr client)
-{
- int rc;
- DeviceIntPtr dev;
- int led = 0;
- XkbIndicatorMapPtr map;
-
- REQUEST(xkbSetNamedIndicatorReq);
- REQUEST_SIZE_MATCH(xkbSetNamedIndicatorReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
- CHK_ATOM_ONLY(stuff->indicator);
- CHK_MASK_LEGAL(0x10,stuff->whichGroups,XkbIM_UseAnyGroup);
- CHK_MASK_LEGAL(0x11,stuff->whichMods,XkbIM_UseAnyMods);
-
- /* Dry-run for checks */
- rc = _XkbCreateIndicatorMap(dev, stuff->indicator,
- stuff->ledClass, stuff->ledID,
- &map, &led, TRUE);
- if (rc != Success || !map) /* couldn't be created or didn't exist */
- return rc;
-
- if (stuff->deviceSpec == XkbUseCoreKbd ||
- stuff->deviceSpec == XkbUseCorePtr)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev &&
- (other->kbdfeed || other->leds) &&
- (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
- {
- rc = _XkbCreateIndicatorMap(other, stuff->indicator,
- stuff->ledClass, stuff->ledID,
- &map, &led, TRUE);
- if (rc != Success || !map)
- return rc;
- }
- }
- }
-
- /* All checks passed, let's do it */
- rc = _XkbSetNamedIndicator(client, dev, stuff);
- if (rc != Success)
- return rc;
-
- if (stuff->deviceSpec == XkbUseCoreKbd ||
- stuff->deviceSpec == XkbUseCorePtr)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev &&
- (other->kbdfeed || other->leds) &&
- (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
- {
- _XkbSetNamedIndicator(client, other, stuff);
- }
- }
- }
-
- return Success;
-}
-
-/***====================================================================***/
-
-static CARD32
-_XkbCountAtoms(Atom *atoms,int maxAtoms,int *count)
-{
-register unsigned int i,bit,nAtoms;
-register CARD32 atomsPresent;
-
- for (i=nAtoms=atomsPresent=0,bit=1;i<maxAtoms;i++,bit<<=1) {
- if (atoms[i]!=None) {
- atomsPresent|= bit;
- nAtoms++;
- }
- }
- if (count)
- *count= nAtoms;
- return atomsPresent;
-}
-
-static char *
-_XkbWriteAtoms(char *wire,Atom *atoms,int maxAtoms,int swap)
-{
-register unsigned int i;
-Atom *atm;
-
- atm = (Atom *)wire;
- for (i=0;i<maxAtoms;i++) {
- if (atoms[i]!=None) {
- *atm= atoms[i];
- if (swap) {
- register int n;
- swapl(atm,n);
- }
- atm++;
- }
- }
- return (char *)atm;
-}
-
-static Status
-XkbComputeGetNamesReplySize(XkbDescPtr xkb,xkbGetNamesReply *rep)
-{
-register unsigned which,length;
-register int i;
-
- rep->minKeyCode= xkb->min_key_code;
- rep->maxKeyCode= xkb->max_key_code;
- which= rep->which;
- length= 0;
- if (xkb->names!=NULL) {
- if (which&XkbKeycodesNameMask) length++;
- if (which&XkbGeometryNameMask) length++;
- if (which&XkbSymbolsNameMask) length++;
- if (which&XkbPhysSymbolsNameMask) length++;
- if (which&XkbTypesNameMask) length++;
- if (which&XkbCompatNameMask) length++;
- }
- else which&= ~XkbComponentNamesMask;
-
- if (xkb->map!=NULL) {
- if (which&XkbKeyTypeNamesMask)
- length+= xkb->map->num_types;
- rep->nTypes= xkb->map->num_types;
- if (which&XkbKTLevelNamesMask) {
- XkbKeyTypePtr pType = xkb->map->types;
- int nKTLevels = 0;
-
- length+= XkbPaddedSize(xkb->map->num_types)/4;
- for (i=0;i<xkb->map->num_types;i++,pType++) {
- if (pType->level_names!=NULL)
- nKTLevels+= pType->num_levels;
- }
- rep->nKTLevels= nKTLevels;
- length+= nKTLevels;
- }
- }
- else {
- rep->nTypes= 0;
- rep->nKTLevels= 0;
- which&= ~(XkbKeyTypeNamesMask|XkbKTLevelNamesMask);
- }
-
- rep->minKeyCode= xkb->min_key_code;
- rep->maxKeyCode= xkb->max_key_code;
- rep->indicators= 0;
- rep->virtualMods= 0;
- rep->groupNames= 0;
- if (xkb->names!=NULL) {
- if (which&XkbIndicatorNamesMask) {
- int nLeds;
- rep->indicators=
- _XkbCountAtoms(xkb->names->indicators,XkbNumIndicators,&nLeds);
- length+= nLeds;
- if (nLeds==0)
- which&= ~XkbIndicatorNamesMask;
- }
-
- if (which&XkbVirtualModNamesMask) {
- int nVMods;
- rep->virtualMods=
- _XkbCountAtoms(xkb->names->vmods,XkbNumVirtualMods,&nVMods);
- length+= nVMods;
- if (nVMods==0)
- which&= ~XkbVirtualModNamesMask;
- }
-
- if (which&XkbGroupNamesMask) {
- int nGroups;
- rep->groupNames=
- _XkbCountAtoms(xkb->names->groups,XkbNumKbdGroups,&nGroups);
- length+= nGroups;
- if (nGroups==0)
- which&= ~XkbGroupNamesMask;
- }
-
- if ((which&XkbKeyNamesMask)&&(xkb->names->keys))
- length+= rep->nKeys;
- else which&= ~XkbKeyNamesMask;
-
- if ((which&XkbKeyAliasesMask)&&
- (xkb->names->key_aliases)&&(xkb->names->num_key_aliases>0)) {
- rep->nKeyAliases= xkb->names->num_key_aliases;
- length+= rep->nKeyAliases*2;
- }
- else {
- which&= ~XkbKeyAliasesMask;
- rep->nKeyAliases= 0;
- }
-
- if ((which&XkbRGNamesMask)&&(xkb->names->num_rg>0))
- length+= xkb->names->num_rg;
- else which&= ~XkbRGNamesMask;
- }
- else {
- which&= ~(XkbIndicatorNamesMask|XkbVirtualModNamesMask);
- which&= ~(XkbGroupNamesMask|XkbKeyNamesMask|XkbKeyAliasesMask);
- which&= ~XkbRGNamesMask;
- }
-
- rep->length= length;
- rep->which= which;
- return Success;
-}
-
-static int
-XkbSendNames(ClientPtr client,XkbDescPtr xkb,xkbGetNamesReply *rep)
-{
-register unsigned i,length,which;
-char * start;
-char * desc;
-register int n;
-
- length= rep->length*4;
- which= rep->which;
- if (client->swapped) {
- swaps(&rep->sequenceNumber,n);
- swapl(&rep->length,n);
- swapl(&rep->which,n);
- swaps(&rep->virtualMods,n);
- swapl(&rep->indicators,n);
- }
-
- start = desc = calloc(1, length);
- if ( !start )
- return BadAlloc;
- if (xkb->names) {
- if (which&XkbKeycodesNameMask) {
- *((CARD32 *)desc)= xkb->names->keycodes;
- if (client->swapped) {
- swapl(desc,n);
- }
- desc+= 4;
- }
- if (which&XkbGeometryNameMask) {
- *((CARD32 *)desc)= xkb->names->geometry;
- if (client->swapped) {
- swapl(desc,n);
- }
- desc+= 4;
- }
- if (which&XkbSymbolsNameMask) {
- *((CARD32 *)desc)= xkb->names->symbols;
- if (client->swapped) {
- swapl(desc,n);
- }
- desc+= 4;
- }
- if (which&XkbPhysSymbolsNameMask) {
- register CARD32 *atm= (CARD32 *)desc;
- atm[0]= (CARD32)xkb->names->phys_symbols;
- if (client->swapped) {
- swapl(&atm[0],n);
- }
- desc+= 4;
- }
- if (which&XkbTypesNameMask) {
- *((CARD32 *)desc)= (CARD32)xkb->names->types;
- if (client->swapped) {
- swapl(desc,n);
- }
- desc+= 4;
- }
- if (which&XkbCompatNameMask) {
- *((CARD32 *)desc)= (CARD32)xkb->names->compat;
- if (client->swapped) {
- swapl(desc,n);
- }
- desc+= 4;
- }
- if (which&XkbKeyTypeNamesMask) {
- register CARD32 *atm= (CARD32 *)desc;
- register XkbKeyTypePtr type= xkb->map->types;
-
- for (i=0;i<xkb->map->num_types;i++,atm++,type++) {
- *atm= (CARD32)type->name;
- if (client->swapped) {
- swapl(atm,n);
- }
- }
- desc= (char *)atm;
- }
- if (which&XkbKTLevelNamesMask && xkb->map) {
- XkbKeyTypePtr type = xkb->map->types;
- register CARD32 *atm;
- for (i=0;i<rep->nTypes;i++,type++) {
- *desc++ = type->num_levels;
- }
- desc+= XkbPaddedSize(rep->nTypes)-rep->nTypes;
-
- atm= (CARD32 *)desc;
- type = xkb->map->types;
- for (i=0;i<xkb->map->num_types;i++,type++) {
- register unsigned l;
- if (type->level_names) {
- for (l=0;l<type->num_levels;l++,atm++) {
- *atm= type->level_names[l];
- if (client->swapped) {
- swapl(atm,n);
- }
- }
- desc+= type->num_levels*4;
- }
- }
- }
- if (which&XkbIndicatorNamesMask) {
- desc= _XkbWriteAtoms(desc,xkb->names->indicators,XkbNumIndicators,
- client->swapped);
- }
- if (which&XkbVirtualModNamesMask) {
- desc= _XkbWriteAtoms(desc,xkb->names->vmods,XkbNumVirtualMods,
- client->swapped);
- }
- if (which&XkbGroupNamesMask) {
- desc= _XkbWriteAtoms(desc,xkb->names->groups,XkbNumKbdGroups,
- client->swapped);
- }
- if (which&XkbKeyNamesMask) {
- for (i=0;i<rep->nKeys;i++,desc+= sizeof(XkbKeyNameRec)) {
- *((XkbKeyNamePtr)desc)= xkb->names->keys[i+rep->firstKey];
- }
- }
- if (which&XkbKeyAliasesMask) {
- XkbKeyAliasPtr pAl;
- pAl= xkb->names->key_aliases;
- for (i=0;i<rep->nKeyAliases;i++,pAl++,desc+=2*XkbKeyNameLength) {
- *((XkbKeyAliasPtr)desc)= *pAl;
- }
- }
- if ((which&XkbRGNamesMask)&&(rep->nRadioGroups>0)) {
- register CARD32 *atm= (CARD32 *)desc;
- for (i=0;i<rep->nRadioGroups;i++,atm++) {
- *atm= (CARD32)xkb->names->radio_groups[i];
- if (client->swapped) {
- swapl(atm,n);
- }
- }
- desc+= rep->nRadioGroups*4;
- }
- }
-
- if ((desc-start)!=(length)) {
- ErrorF("[xkb] BOGUS LENGTH in write names, expected %d, got %ld\n",
- length, (unsigned long)(desc-start));
- }
- WriteToClient(client, SIZEOF(xkbGetNamesReply), (char *)rep);
- WriteToClient(client, length, start);
- free((char *)start);
- return Success;
-}
-
-int
-ProcXkbGetNames(ClientPtr client)
-{
- DeviceIntPtr dev;
- XkbDescPtr xkb;
- xkbGetNamesReply rep;
-
- REQUEST(xkbGetNamesReq);
- REQUEST_SIZE_MATCH(xkbGetNamesReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
- CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask);
-
- xkb = dev->key->xkbInfo->desc;
- memset(&rep, 0, sizeof(xkbGetNamesReply));
- rep.type= X_Reply;
- rep.sequenceNumber= client->sequence;
- rep.length = 0;
- rep.deviceID = dev->id;
- rep.which = stuff->which;
- rep.nTypes = xkb->map->num_types;
- rep.firstKey = xkb->min_key_code;
- rep.nKeys = XkbNumKeys(xkb);
- if (xkb->names!=NULL) {
- rep.nKeyAliases= xkb->names->num_key_aliases;
- rep.nRadioGroups = xkb->names->num_rg;
- }
- else {
- rep.nKeyAliases= rep.nRadioGroups= 0;
- }
- XkbComputeGetNamesReplySize(xkb,&rep);
- return XkbSendNames(client,xkb,&rep);
-}
-
-/***====================================================================***/
-
-static CARD32 *
-_XkbCheckAtoms(CARD32 *wire,int nAtoms,int swapped,Atom *pError)
-{
-register int i;
-
- for (i=0;i<nAtoms;i++,wire++) {
- if (swapped) {
- register int n;
- swapl(wire,n);
- }
- if ((((Atom)*wire)!=None)&&(!ValidAtom((Atom)*wire))) {
- *pError= ((Atom)*wire);
- return NULL;
- }
- }
- return wire;
-}
-
-static CARD32 *
-_XkbCheckMaskedAtoms(CARD32 *wire,int nAtoms,CARD32 present,int swapped,
- Atom *pError)
-{
-register unsigned i,bit;
-
- for (i=0,bit=1;(i<nAtoms)&&(present);i++,bit<<=1) {
- if ((present&bit)==0)
- continue;
- if (swapped) {
- register int n;
- swapl(wire,n);
- }
- if ((((Atom)*wire)!=None)&&(!ValidAtom(((Atom)*wire)))) {
- *pError= (Atom)*wire;
- return NULL;
- }
- wire++;
- }
- return wire;
-}
-
-static Atom *
-_XkbCopyMaskedAtoms( Atom *wire,
- Atom *dest,
- int nAtoms,
- CARD32 present)
-{
-register int i,bit;
-
- for (i=0,bit=1;(i<nAtoms)&&(present);i++,bit<<=1) {
- if ((present&bit)==0)
- continue;
- dest[i]= *wire++;
- }
- return wire;
-}
-
-static Bool
-_XkbCheckTypeName(Atom name,int typeNdx)
-{
-const char * str;
-
- str= NameForAtom(name);
- if ((strcmp(str,"ONE_LEVEL")==0)||(strcmp(str,"TWO_LEVEL")==0)||
- (strcmp(str,"ALPHABETIC")==0)||(strcmp(str,"KEYPAD")==0))
- return FALSE;
- return TRUE;
-}
-
-/**
- * Check the device-dependent data in the request against the device. Returns
- * Success, or the appropriate error code.
- */
-static int
-_XkbSetNamesCheck(ClientPtr client, DeviceIntPtr dev,
- xkbSetNamesReq *stuff, CARD32 *data)
-{
- XkbDescRec *xkb;
- XkbNamesRec *names;
- CARD32 *tmp;
- Atom bad;
-
- tmp = data;
- xkb = dev->key->xkbInfo->desc;
- names = xkb->names;
-
-
- if (stuff->which & XkbKeyTypeNamesMask) {
- int i;
- CARD32 *old;
- if ( stuff->nTypes<1 ) {
- client->errorValue = _XkbErrCode2(0x02,stuff->nTypes);
- return BadValue;
- }
- if ((unsigned)(stuff->firstType+stuff->nTypes-1)>=xkb->map->num_types) {
- client->errorValue = _XkbErrCode4(0x03,stuff->firstType,
- stuff->nTypes,
- xkb->map->num_types);
- return BadValue;
- }
- if (((unsigned)stuff->firstType)<=XkbLastRequiredType) {
- client->errorValue = _XkbErrCode2(0x04,stuff->firstType);
- return BadAccess;
- }
- old= tmp;
- tmp= _XkbCheckAtoms(tmp,stuff->nTypes,client->swapped,&bad);
- if (!tmp) {
- client->errorValue= bad;
- return BadAtom;
- }
- for (i=0;i<stuff->nTypes;i++,old++) {
- if (!_XkbCheckTypeName((Atom)*old,stuff->firstType+i))
- client->errorValue= _XkbErrCode2(0x05,i);
- }
- }
- if (stuff->which&XkbKTLevelNamesMask) {
- unsigned i;
- XkbKeyTypePtr type;
- CARD8 * width;
- if ( stuff->nKTLevels<1 ) {
- client->errorValue = _XkbErrCode2(0x05,stuff->nKTLevels);
- return BadValue;
- }
- if ((unsigned)(stuff->firstKTLevel+stuff->nKTLevels-1)>=
- xkb->map->num_types) {
- client->errorValue = _XkbErrCode4(0x06,stuff->firstKTLevel,
- stuff->nKTLevels,xkb->map->num_types);
- return BadValue;
- }
- width = (CARD8 *)tmp;
- tmp= (CARD32 *)(((char *)tmp)+XkbPaddedSize(stuff->nKTLevels));
- type = &xkb->map->types[stuff->firstKTLevel];
- for (i=0;i<stuff->nKTLevels;i++,type++) {
- if (width[i]==0)
- continue;
- else if (width[i]!=type->num_levels) {
- client->errorValue= _XkbErrCode4(0x07,i+stuff->firstKTLevel,
- type->num_levels,width[i]);
- return BadMatch;
- }
- tmp= _XkbCheckAtoms(tmp,width[i],client->swapped,&bad);
- if (!tmp) {
- client->errorValue= bad;
- return BadAtom;
- }
- }
- }
- if (stuff->which&XkbIndicatorNamesMask) {
- if (stuff->indicators==0) {
- client->errorValue= 0x08;
- return BadMatch;
- }
- tmp= _XkbCheckMaskedAtoms(tmp,XkbNumIndicators,stuff->indicators,
- client->swapped,&bad);
- if (!tmp) {
- client->errorValue= bad;
- return BadAtom;
- }
- }
- if (stuff->which&XkbVirtualModNamesMask) {
- if (stuff->virtualMods==0) {
- client->errorValue= 0x09;
- return BadMatch;
- }
- tmp= _XkbCheckMaskedAtoms(tmp,XkbNumVirtualMods,
- (CARD32)stuff->virtualMods,
- client->swapped,&bad);
- if (!tmp) {
- client->errorValue = bad;
- return BadAtom;
- }
- }
- if (stuff->which&XkbGroupNamesMask) {
- if (stuff->groupNames==0) {
- client->errorValue= 0x0a;
- return BadMatch;
- }
- tmp= _XkbCheckMaskedAtoms(tmp,XkbNumKbdGroups,
- (CARD32)stuff->groupNames,
- client->swapped,&bad);
- if (!tmp) {
- client->errorValue = bad;
- return BadAtom;
- }
- }
- if (stuff->which&XkbKeyNamesMask) {
- if (stuff->firstKey<(unsigned)xkb->min_key_code) {
- client->errorValue= _XkbErrCode3(0x0b,xkb->min_key_code,
- stuff->firstKey);
- return BadValue;
- }
- if (((unsigned)(stuff->firstKey+stuff->nKeys-1)>xkb->max_key_code)||
- (stuff->nKeys<1)) {
- client->errorValue= _XkbErrCode4(0x0c,xkb->max_key_code,
- stuff->firstKey,stuff->nKeys);
- return BadValue;
- }
- tmp+= stuff->nKeys;
- }
- if ((stuff->which&XkbKeyAliasesMask)&&(stuff->nKeyAliases>0)) {
- tmp+= stuff->nKeyAliases*2;
- }
- if (stuff->which&XkbRGNamesMask) {
- if ( stuff->nRadioGroups<1 ) {
- client->errorValue= _XkbErrCode2(0x0d,stuff->nRadioGroups);
- return BadValue;
- }
- tmp= _XkbCheckAtoms(tmp,stuff->nRadioGroups,client->swapped,&bad);
- if (!tmp) {
- client->errorValue= bad;
- return BadAtom;
- }
- }
- if ((tmp-((CARD32 *)stuff))!=stuff->length) {
- client->errorValue = stuff->length;
- return BadLength;
- }
-
-
-
- return Success;
-}
-
-static int
-_XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff)
-{
- XkbDescRec *xkb;
- XkbNamesRec *names;
- CARD32 *tmp;
- xkbNamesNotify nn;
-
- tmp = (CARD32 *)&stuff[1];
- xkb = dev->key->xkbInfo->desc;
- names = xkb->names;
-
- if (XkbAllocNames(xkb,stuff->which,stuff->nRadioGroups,
- stuff->nKeyAliases)!=Success) {
- return BadAlloc;
- }
-
- memset(&nn, 0, sizeof(xkbNamesNotify));
- nn.changed= stuff->which;
- tmp = (CARD32 *)&stuff[1];
- if (stuff->which&XkbKeycodesNameMask)
- names->keycodes= *tmp++;
- if (stuff->which&XkbGeometryNameMask)
- names->geometry= *tmp++;
- if (stuff->which&XkbSymbolsNameMask)
- names->symbols= *tmp++;
- if (stuff->which&XkbPhysSymbolsNameMask)
- names->phys_symbols= *tmp++;
- if (stuff->which&XkbTypesNameMask)
- names->types= *tmp++;
- if (stuff->which&XkbCompatNameMask)
- names->compat= *tmp++;
- if ((stuff->which&XkbKeyTypeNamesMask)&&(stuff->nTypes>0)) {
- register unsigned i;
- register XkbKeyTypePtr type;
-
- type= &xkb->map->types[stuff->firstType];
- for (i=0;i<stuff->nTypes;i++,type++) {
- type->name= *tmp++;
- }
- nn.firstType= stuff->firstType;
- nn.nTypes= stuff->nTypes;
- }
- if (stuff->which&XkbKTLevelNamesMask) {
- register XkbKeyTypePtr type;
- register unsigned i;
- CARD8 *width;
-
- width = (CARD8 *)tmp;
- tmp= (CARD32 *)(((char *)tmp)+XkbPaddedSize(stuff->nKTLevels));
- type= &xkb->map->types[stuff->firstKTLevel];
- for (i=0;i<stuff->nKTLevels;i++,type++) {
- if (width[i]>0) {
- if (type->level_names) {
- register unsigned n;
- for (n=0;n<width[i];n++) {
- type->level_names[n]= tmp[n];
- }
- }
- tmp+= width[i];
- }
- }
- nn.firstLevelName= 0;
- nn.nLevelNames= stuff->nTypes;
- }
- if (stuff->which&XkbIndicatorNamesMask) {
- tmp= _XkbCopyMaskedAtoms(tmp,names->indicators,XkbNumIndicators,
- stuff->indicators);
- nn.changedIndicators= stuff->indicators;
- }
- if (stuff->which&XkbVirtualModNamesMask) {
- tmp= _XkbCopyMaskedAtoms(tmp,names->vmods,XkbNumVirtualMods,
- stuff->virtualMods);
- nn.changedVirtualMods= stuff->virtualMods;
- }
- if (stuff->which&XkbGroupNamesMask) {
- tmp= _XkbCopyMaskedAtoms(tmp,names->groups,XkbNumKbdGroups,
- stuff->groupNames);
- nn.changedVirtualMods= stuff->groupNames;
- }
- if (stuff->which&XkbKeyNamesMask) {
- memcpy((char*)&names->keys[stuff->firstKey],(char *)tmp,
- stuff->nKeys*XkbKeyNameLength);
- tmp+= stuff->nKeys;
- nn.firstKey= stuff->firstKey;
- nn.nKeys= stuff->nKeys;
- }
- if (stuff->which&XkbKeyAliasesMask) {
- if (stuff->nKeyAliases>0) {
- register int na= stuff->nKeyAliases;
- if (XkbAllocNames(xkb,XkbKeyAliasesMask,0,na)!=Success)
- return BadAlloc;
- memcpy((char *)names->key_aliases,(char *)tmp,
- stuff->nKeyAliases*sizeof(XkbKeyAliasRec));
- tmp+= stuff->nKeyAliases*2;
- }
- else if (names->key_aliases!=NULL) {
- free(names->key_aliases);
- names->key_aliases= NULL;
- names->num_key_aliases= 0;
- }
- nn.nAliases= names->num_key_aliases;
- }
- if (stuff->which&XkbRGNamesMask) {
- if (stuff->nRadioGroups>0) {
- register unsigned i,nrg;
- nrg= stuff->nRadioGroups;
- if (XkbAllocNames(xkb,XkbRGNamesMask,nrg,0)!=Success)
- return BadAlloc;
-
- for (i=0;i<stuff->nRadioGroups;i++) {
- names->radio_groups[i]= tmp[i];
- }
- tmp+= stuff->nRadioGroups;
- }
- else if (names->radio_groups) {
- free(names->radio_groups);
- names->radio_groups= NULL;
- names->num_rg= 0;
- }
- nn.nRadioGroups= names->num_rg;
- }
- if (nn.changed) {
- Bool needExtEvent;
- needExtEvent= (nn.changed&XkbIndicatorNamesMask)!=0;
- XkbSendNamesNotify(dev,&nn);
- if (needExtEvent) {
- XkbSrvLedInfoPtr sli;
- xkbExtensionDeviceNotify edev;
- register int i;
- register unsigned bit;
-
- sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,
- XkbXI_IndicatorsMask);
- sli->namesPresent= 0;
- for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
- if (names->indicators[i]!=None)
- sli->namesPresent|= bit;
- }
- memset(&edev, 0, sizeof(xkbExtensionDeviceNotify));
- edev.reason= XkbXI_IndicatorNamesMask;
- edev.ledClass= KbdFeedbackClass;
- edev.ledID= dev->kbdfeed->ctrl.id;
- edev.ledsDefined= sli->namesPresent|sli->mapsPresent;
- edev.ledState= sli->effectiveState;
- edev.firstBtn= 0;
- edev.nBtns= 0;
- edev.supported= XkbXI_AllFeaturesMask;
- edev.unsupported= 0;
- XkbSendExtensionDeviceNotify(dev,client,&edev);
- }
- }
- return Success;
-}
-
-int
-ProcXkbSetNames(ClientPtr client)
-{
- DeviceIntPtr dev;
- CARD32 *tmp;
- Atom bad;
- int rc;
-
- REQUEST(xkbSetNamesReq);
- REQUEST_AT_LEAST_SIZE(xkbSetNamesReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
- CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask);
-
- /* check device-independent stuff */
- tmp = (CARD32 *)&stuff[1];
-
- if (stuff->which&XkbKeycodesNameMask) {
- tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
- if (!tmp) {
- client->errorValue = bad;
- return BadAtom;
- }
- }
- if (stuff->which&XkbGeometryNameMask) {
- tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
- if (!tmp) {
- client->errorValue = bad;
- return BadAtom;
- }
- }
- if (stuff->which&XkbSymbolsNameMask) {
- tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
- if (!tmp) {
- client->errorValue = bad;
- return BadAtom;
- }
- }
- if (stuff->which&XkbPhysSymbolsNameMask) {
- tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
- if (!tmp) {
- client->errorValue= bad;
- return BadAtom;
- }
- }
- if (stuff->which&XkbTypesNameMask) {
- tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
- if (!tmp) {
- client->errorValue = bad;
- return BadAtom;
- }
- }
- if (stuff->which&XkbCompatNameMask) {
- tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
- if (!tmp) {
- client->errorValue = bad;
- return BadAtom;
- }
- }
-
- /* start of device-dependent tests */
- rc = _XkbSetNamesCheck(client, dev, stuff, tmp);
- if (rc != Success)
- return rc;
-
- if (stuff->deviceSpec == XkbUseCoreKbd)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
- {
-
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
- if (rc == Success)
- {
- rc = _XkbSetNamesCheck(client, other, stuff, tmp);
- if (rc != Success)
- return rc;
- }
- }
- }
- }
-
- /* everything is okay -- update names */
-
- rc = _XkbSetNames(client, dev, stuff);
- if (rc != Success)
- return rc;
-
- if (stuff->deviceSpec == XkbUseCoreKbd)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
- {
-
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
- if (rc == Success)
- _XkbSetNames(client, other, stuff);
- }
- }
- }
-
- /* everything is okay -- update names */
-
- return Success;
-}
-
-/***====================================================================***/
-
-#include "xkbgeom.h"
-
-#define XkbSizeCountedString(s) ((s)?((((2+strlen(s))+3)/4)*4):4)
-
-/**
- * Write the zero-terminated string str into wire as a pascal string with a
- * 16-bit length field prefixed before the actual string.
- *
- * @param wire The destination array, usually the wire struct
- * @param str The source string as zero-terminated C string
- * @param swap If TRUE, the length field is swapped.
- *
- * @return The input string in the format <string length><string> with a
- * (swapped) 16 bit string length, non-zero terminated.
- */
-static char *
-XkbWriteCountedString(char *wire,char *str,Bool swap)
-{
- CARD16 len,*pLen, paddedLen;
-
- if (!str)
- return wire;
-
- len= strlen(str);
- pLen= (CARD16 *)wire;
- *pLen= len;
- if (swap) {
- register int n;
- swaps(pLen,n);
- }
- paddedLen= pad_to_int32(sizeof(len)+len)-sizeof(len);
- strncpy(&wire[sizeof(len)],str,paddedLen);
- wire+= sizeof(len)+paddedLen;
- return wire;
-}
-
-static int
-XkbSizeGeomProperties(XkbGeometryPtr geom)
-{
-register int i,size;
-XkbPropertyPtr prop;
-
- for (size=i=0,prop=geom->properties;i<geom->num_properties;i++,prop++) {
- size+= XkbSizeCountedString(prop->name);
- size+= XkbSizeCountedString(prop->value);
- }
- return size;
-}
-
-static char *
-XkbWriteGeomProperties(char *wire,XkbGeometryPtr geom,Bool swap)
-{
-register int i;
-register XkbPropertyPtr prop;
-
- for (i=0,prop=geom->properties;i<geom->num_properties;i++,prop++) {
- wire= XkbWriteCountedString(wire,prop->name,swap);
- wire= XkbWriteCountedString(wire,prop->value,swap);
- }
- return wire;
-}
-
-static int
-XkbSizeGeomKeyAliases(XkbGeometryPtr geom)
-{
- return geom->num_key_aliases*(2*XkbKeyNameLength);
-}
-
-static char *
-XkbWriteGeomKeyAliases(char *wire,XkbGeometryPtr geom,Bool swap)
-{
-register int sz;
-
- sz= geom->num_key_aliases*(XkbKeyNameLength*2);
- if (sz>0) {
- memcpy(wire,(char *)geom->key_aliases,sz);
- wire+= sz;
- }
- return wire;
-}
-
-static int
-XkbSizeGeomColors(XkbGeometryPtr geom)
-{
-register int i,size;
-register XkbColorPtr color;
-
- for (i=size=0,color=geom->colors;i<geom->num_colors;i++,color++) {
- size+= XkbSizeCountedString(color->spec);
- }
- return size;
-}
-
-static char *
-XkbWriteGeomColors(char *wire,XkbGeometryPtr geom,Bool swap)
-{
-register int i;
-register XkbColorPtr color;
-
- for (i=0,color=geom->colors;i<geom->num_colors;i++,color++) {
- wire= XkbWriteCountedString(wire,color->spec,swap);
- }
- return wire;
-}
-
-static int
-XkbSizeGeomShapes(XkbGeometryPtr geom)
-{
-register int i,size;
-register XkbShapePtr shape;
-
- for (i=size=0,shape=geom->shapes;i<geom->num_shapes;i++,shape++) {
- register int n;
- register XkbOutlinePtr ol;
- size+= SIZEOF(xkbShapeWireDesc);
- for (n=0,ol=shape->outlines;n<shape->num_outlines;n++,ol++) {
- size+= SIZEOF(xkbOutlineWireDesc);
- size+= ol->num_points*SIZEOF(xkbPointWireDesc);
- }
- }
- return size;
-}
-
-static char *
-XkbWriteGeomShapes(char *wire,XkbGeometryPtr geom,Bool swap)
-{
-int i;
-XkbShapePtr shape;
-xkbShapeWireDesc * shapeWire;
-
- for (i=0,shape=geom->shapes;i<geom->num_shapes;i++,shape++) {
- register int o;
- XkbOutlinePtr ol;
- xkbOutlineWireDesc * olWire;
- shapeWire= (xkbShapeWireDesc *)wire;
- shapeWire->name= shape->name;
- shapeWire->nOutlines= shape->num_outlines;
- if (shape->primary!=NULL)
- shapeWire->primaryNdx= XkbOutlineIndex(shape,shape->primary);
- else shapeWire->primaryNdx= XkbNoShape;
- if (shape->approx!=NULL)
- shapeWire->approxNdx= XkbOutlineIndex(shape,shape->approx);
- else shapeWire->approxNdx= XkbNoShape;
- shapeWire->pad= 0;
- if (swap) {
- register int n;
- swapl(&shapeWire->name,n);
- }
- wire= (char *)&shapeWire[1];
- for (o=0,ol=shape->outlines;o<shape->num_outlines;o++,ol++) {
- register int p;
- XkbPointPtr pt;
- xkbPointWireDesc * ptWire;
- olWire= (xkbOutlineWireDesc *)wire;
- olWire->nPoints= ol->num_points;
- olWire->cornerRadius= ol->corner_radius;
- olWire->pad= 0;
- wire= (char *)&olWire[1];
- ptWire= (xkbPointWireDesc *)wire;
- for (p=0,pt=ol->points;p<ol->num_points;p++,pt++) {
- ptWire[p].x= pt->x;
- ptWire[p].y= pt->y;
- if (swap) {
- register int n;
- swaps(&ptWire[p].x,n);
- swaps(&ptWire[p].y,n);
- }
- }
- wire= (char *)&ptWire[ol->num_points];
- }
- }
- return wire;
-}
-
-static int
-XkbSizeGeomDoodads(int num_doodads,XkbDoodadPtr doodad)
-{
-register int i,size;
-
- for (i=size=0;i<num_doodads;i++,doodad++) {
- size+= SIZEOF(xkbAnyDoodadWireDesc);
- if (doodad->any.type==XkbTextDoodad) {
- size+= XkbSizeCountedString(doodad->text.text);
- size+= XkbSizeCountedString(doodad->text.font);
- }
- else if (doodad->any.type==XkbLogoDoodad) {
- size+= XkbSizeCountedString(doodad->logo.logo_name);
- }
- }
- return size;
-}
-
-static char *
-XkbWriteGeomDoodads(char *wire,int num_doodads,XkbDoodadPtr doodad,Bool swap)
-{
-register int i;
-xkbDoodadWireDesc * doodadWire;
-
- for (i=0;i<num_doodads;i++,doodad++) {
- doodadWire= (xkbDoodadWireDesc *)wire;
- wire= (char *)&doodadWire[1];
- memset(doodadWire, 0, SIZEOF(xkbDoodadWireDesc));
- doodadWire->any.name= doodad->any.name;
- doodadWire->any.type= doodad->any.type;
- doodadWire->any.priority= doodad->any.priority;
- doodadWire->any.top= doodad->any.top;
- doodadWire->any.left= doodad->any.left;
- if (swap) {
- register int n;
- swapl(&doodadWire->any.name,n);
- swaps(&doodadWire->any.top,n);
- swaps(&doodadWire->any.left,n);
- }
- switch (doodad->any.type) {
- case XkbOutlineDoodad:
- case XkbSolidDoodad:
- doodadWire->shape.angle= doodad->shape.angle;
- doodadWire->shape.colorNdx= doodad->shape.color_ndx;
- doodadWire->shape.shapeNdx= doodad->shape.shape_ndx;
- if (swap) {
- register int n;
- swaps(&doodadWire->shape.angle,n);
- }
- break;
- case XkbTextDoodad:
- doodadWire->text.angle= doodad->text.angle;
- doodadWire->text.width= doodad->text.width;
- doodadWire->text.height= doodad->text.height;
- doodadWire->text.colorNdx= doodad->text.color_ndx;
- if (swap) {
- register int n;
- swaps(&doodadWire->text.angle,n);
- swaps(&doodadWire->text.width,n);
- swaps(&doodadWire->text.height,n);
- }
- wire= XkbWriteCountedString(wire,doodad->text.text,swap);
- wire= XkbWriteCountedString(wire,doodad->text.font,swap);
- break;
- case XkbIndicatorDoodad:
- doodadWire->indicator.shapeNdx= doodad->indicator.shape_ndx;
- doodadWire->indicator.onColorNdx=doodad->indicator.on_color_ndx;
- doodadWire->indicator.offColorNdx=
- doodad->indicator.off_color_ndx;
- break;
- case XkbLogoDoodad:
- doodadWire->logo.angle= doodad->logo.angle;
- doodadWire->logo.colorNdx= doodad->logo.color_ndx;
- doodadWire->logo.shapeNdx= doodad->logo.shape_ndx;
- wire= XkbWriteCountedString(wire,doodad->logo.logo_name,swap);
- break;
- default:
- ErrorF("[xkb] Unknown doodad type %d in XkbWriteGeomDoodads\n",
- doodad->any.type);
- ErrorF("[xkb] Ignored\n");
- break;
- }
- }
- return wire;
-}
-
-static char *
-XkbWriteGeomOverlay(char *wire,XkbOverlayPtr ol,Bool swap)
-{
-register int r;
-XkbOverlayRowPtr row;
-xkbOverlayWireDesc * olWire;
-
- olWire= (xkbOverlayWireDesc *)wire;
- olWire->name= ol->name;
- olWire->nRows= ol->num_rows;
- olWire->pad1= 0;
- olWire->pad2= 0;
- if (swap) {
- register int n;
- swapl(&olWire->name,n);
- }
- wire= (char *)&olWire[1];
- for (r=0,row=ol->rows;r<ol->num_rows;r++,row++) {
- unsigned int k;
- XkbOverlayKeyPtr key;
- xkbOverlayRowWireDesc * rowWire;
- rowWire= (xkbOverlayRowWireDesc *)wire;
- rowWire->rowUnder= row->row_under;
- rowWire->nKeys= row->num_keys;
- rowWire->pad1= 0;
- wire= (char *)&rowWire[1];
- for (k=0,key=row->keys;k<row->num_keys;k++,key++) {
- xkbOverlayKeyWireDesc * keyWire;
- keyWire= (xkbOverlayKeyWireDesc *)wire;
- memcpy(keyWire->over,key->over.name,XkbKeyNameLength);
- memcpy(keyWire->under,key->under.name,XkbKeyNameLength);
- wire= (char *)&keyWire[1];
- }
- }
- return wire;
-}
-
-static int
-XkbSizeGeomSections(XkbGeometryPtr geom)
-{
-register int i,size;
-XkbSectionPtr section;
-
- for (i=size=0,section=geom->sections;i<geom->num_sections;i++,section++) {
- size+= SIZEOF(xkbSectionWireDesc);
- if (section->rows) {
- int r;
- XkbRowPtr row;
- for (r=0,row=section->rows;r<section->num_rows;row++,r++) {
- size+= SIZEOF(xkbRowWireDesc);
- size+= row->num_keys*SIZEOF(xkbKeyWireDesc);
- }
- }
- if (section->doodads)
- size+= XkbSizeGeomDoodads(section->num_doodads,section->doodads);
- if (section->overlays) {
- int o;
- XkbOverlayPtr ol;
- for (o=0,ol=section->overlays;o<section->num_overlays;o++,ol++) {
- int r;
- XkbOverlayRowPtr row;
- size+= SIZEOF(xkbOverlayWireDesc);
- for (r=0,row=ol->rows;r<ol->num_rows;r++,row++) {
- size+= SIZEOF(xkbOverlayRowWireDesc);
- size+= row->num_keys*SIZEOF(xkbOverlayKeyWireDesc);
- }
- }
- }
- }
- return size;
-}
-
-static char *
-XkbWriteGeomSections(char *wire,XkbGeometryPtr geom,Bool swap)
-{
-register int i;
-XkbSectionPtr section;
-xkbSectionWireDesc * sectionWire;
-
- for (i=0,section=geom->sections;i<geom->num_sections;i++,section++) {
- sectionWire= (xkbSectionWireDesc *)wire;
- sectionWire->name= section->name;
- sectionWire->top= section->top;
- sectionWire->left= section->left;
- sectionWire->width= section->width;
- sectionWire->height= section->height;
- sectionWire->angle= section->angle;
- sectionWire->priority= section->priority;
- sectionWire->nRows= section->num_rows;
- sectionWire->nDoodads= section->num_doodads;
- sectionWire->nOverlays= section->num_overlays;
- sectionWire->pad= 0;
- if (swap) {
- register int n;
- swapl(&sectionWire->name,n);
- swaps(&sectionWire->top,n);
- swaps(&sectionWire->left,n);
- swaps(&sectionWire->width,n);
- swaps(&sectionWire->height,n);
- swaps(&sectionWire->angle,n);
- }
- wire= (char *)&sectionWire[1];
- if (section->rows) {
- int r;
- XkbRowPtr row;
- xkbRowWireDesc * rowWire;
- for (r=0,row=section->rows;r<section->num_rows;r++,row++) {
- rowWire= (xkbRowWireDesc *)wire;
- rowWire->top= row->top;
- rowWire->left= row->left;
- rowWire->nKeys= row->num_keys;
- rowWire->vertical= row->vertical;
- rowWire->pad= 0;
- if (swap) {
- register int n;
- swaps(&rowWire->top,n);
- swaps(&rowWire->left,n);
- }
- wire= (char *)&rowWire[1];
- if (row->keys) {
- int k;
- XkbKeyPtr key;
- xkbKeyWireDesc * keyWire;
- keyWire= (xkbKeyWireDesc *)wire;
- for (k=0,key=row->keys;k<row->num_keys;k++,key++) {
- memcpy(keyWire[k].name,key->name.name,XkbKeyNameLength);
- keyWire[k].gap= key->gap;
- keyWire[k].shapeNdx= key->shape_ndx;
- keyWire[k].colorNdx= key->color_ndx;
- if (swap) {
- register int n;
- swaps(&keyWire[k].gap,n);
- }
- }
- wire= (char *)&keyWire[row->num_keys];
- }
- }
- }
- if (section->doodads) {
- wire= XkbWriteGeomDoodads(wire,
- section->num_doodads,section->doodads,
- swap);
- }
- if (section->overlays) {
- register int o;
- for (o=0;o<section->num_overlays;o++) {
- wire= XkbWriteGeomOverlay(wire,&section->overlays[o],swap);
- }
- }
- }
- return wire;
-}
-
-static Status
-XkbComputeGetGeometryReplySize( XkbGeometryPtr geom,
- xkbGetGeometryReply * rep,
- Atom name)
-{
-int len;
-
- if (geom!=NULL) {
- len= XkbSizeCountedString(geom->label_font);
- len+= XkbSizeGeomProperties(geom);
- len+= XkbSizeGeomColors(geom);
- len+= XkbSizeGeomShapes(geom);
- len+= XkbSizeGeomSections(geom);
- len+= XkbSizeGeomDoodads(geom->num_doodads,geom->doodads);
- len+= XkbSizeGeomKeyAliases(geom);
- rep->length= len/4;
- rep->found= TRUE;
- rep->name= geom->name;
- rep->widthMM= geom->width_mm;
- rep->heightMM= geom->height_mm;
- rep->nProperties= geom->num_properties;
- rep->nColors= geom->num_colors;
- rep->nShapes= geom->num_shapes;
- rep->nSections= geom->num_sections;
- rep->nDoodads= geom->num_doodads;
- rep->nKeyAliases= geom->num_key_aliases;
- rep->baseColorNdx= XkbGeomColorIndex(geom,geom->base_color);
- rep->labelColorNdx= XkbGeomColorIndex(geom,geom->label_color);
- }
- else {
- rep->length= 0;
- rep->found= FALSE;
- rep->name= name;
- rep->widthMM= rep->heightMM= 0;
- rep->nProperties= rep->nColors= rep->nShapes= 0;
- rep->nSections= rep->nDoodads= 0;
- rep->nKeyAliases= 0;
- rep->labelColorNdx= rep->baseColorNdx= 0;
- }
- return Success;
-}
-
-static int
-XkbSendGeometry( ClientPtr client,
- XkbGeometryPtr geom,
- xkbGetGeometryReply * rep,
- Bool freeGeom)
-{
- char *desc,*start;
- int len;
-
- if (geom!=NULL) {
- len= rep->length*4;
- start= desc= malloc(len);
- if (!start)
- return BadAlloc;
- desc= XkbWriteCountedString(desc,geom->label_font,client->swapped);
- if ( rep->nProperties>0 )
- desc = XkbWriteGeomProperties(desc,geom,client->swapped);
- if ( rep->nColors>0 )
- desc = XkbWriteGeomColors(desc,geom,client->swapped);
- if ( rep->nShapes>0 )
- desc = XkbWriteGeomShapes(desc,geom,client->swapped);
- if ( rep->nSections>0 )
- desc = XkbWriteGeomSections(desc,geom,client->swapped);
- if ( rep->nDoodads>0 )
- desc = XkbWriteGeomDoodads(desc,geom->num_doodads,geom->doodads,
- client->swapped);
- if ( rep->nKeyAliases>0 )
- desc = XkbWriteGeomKeyAliases(desc,geom,client->swapped);
- if ((desc-start)!=(len)) {
- ErrorF("[xkb] BOGUS LENGTH in XkbSendGeometry, expected %d, got %ld\n",
- len, (unsigned long)(desc-start));
- }
- }
- else {
- len= 0;
- start= NULL;
- }
- if (client->swapped) {
- register int n;
- swaps(&rep->sequenceNumber,n);
- swapl(&rep->length,n);
- swapl(&rep->name,n);
- swaps(&rep->widthMM,n);
- swaps(&rep->heightMM,n);
- swaps(&rep->nProperties,n);
- swaps(&rep->nColors,n);
- swaps(&rep->nShapes,n);
- swaps(&rep->nSections,n);
- swaps(&rep->nDoodads,n);
- swaps(&rep->nKeyAliases,n);
- }
- WriteToClient(client, SIZEOF(xkbGetGeometryReply), (char *)rep);
- if (len>0)
- WriteToClient(client, len, start);
- if (start!=NULL)
- free((char *)start);
- if (freeGeom)
- XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
- return Success;
-}
-
-int
-ProcXkbGetGeometry(ClientPtr client)
-{
- DeviceIntPtr dev;
- xkbGetGeometryReply rep;
- XkbGeometryPtr geom;
- Bool shouldFree;
- Status status;
-
- REQUEST(xkbGetGeometryReq);
- REQUEST_SIZE_MATCH(xkbGetGeometryReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
- CHK_ATOM_OR_NONE(stuff->name);
-
- geom= XkbLookupNamedGeometry(dev,stuff->name,&shouldFree);
- rep.type= X_Reply;
- rep.deviceID= dev->id;
- rep.sequenceNumber= client->sequence;
- rep.length= 0;
- status= XkbComputeGetGeometryReplySize(geom,&rep,stuff->name);
- if (status!=Success)
- return status;
- else return XkbSendGeometry(client,geom,&rep,shouldFree);
-}
-
-/***====================================================================***/
-
-static char *
-_GetCountedString(char **wire_inout,Bool swap)
-{
-char * wire,*str;
-CARD16 len,*plen;
-
- wire= *wire_inout;
- plen= (CARD16 *)wire;
- if (swap) {
- register int n;
- swaps(plen,n);
- }
- len= *plen;
- str= malloc(len+1);
- if (str) {
- memcpy(str,&wire[2],len);
- str[len]= '\0';
- }
- wire+= XkbPaddedSize(len+2);
- *wire_inout= wire;
- return str;
-}
-
-static Status
-_CheckSetDoodad( char ** wire_inout,
- XkbGeometryPtr geom,
- XkbSectionPtr section,
- ClientPtr client)
-{
-char * wire;
-xkbDoodadWireDesc * dWire;
-XkbDoodadPtr doodad;
-
- dWire= (xkbDoodadWireDesc *)(*wire_inout);
- wire= (char *)&dWire[1];
- if (client->swapped) {
- register int n;
- swapl(&dWire->any.name,n);
- swaps(&dWire->any.top,n);
- swaps(&dWire->any.left,n);
- swaps(&dWire->any.angle,n);
- }
- CHK_ATOM_ONLY(dWire->any.name);
- doodad= XkbAddGeomDoodad(geom,section,dWire->any.name);
- if (!doodad)
- return BadAlloc;
- doodad->any.type= dWire->any.type;
- doodad->any.priority= dWire->any.priority;
- doodad->any.top= dWire->any.top;
- doodad->any.left= dWire->any.left;
- doodad->any.angle= dWire->any.angle;
- switch (doodad->any.type) {
- case XkbOutlineDoodad:
- case XkbSolidDoodad:
- if (dWire->shape.colorNdx>=geom->num_colors) {
- client->errorValue= _XkbErrCode3(0x40,geom->num_colors,
- dWire->shape.colorNdx);
- return BadMatch;
- }
- if (dWire->shape.shapeNdx>=geom->num_shapes) {
- client->errorValue= _XkbErrCode3(0x41,geom->num_shapes,
- dWire->shape.shapeNdx);
- return BadMatch;
- }
- doodad->shape.color_ndx= dWire->shape.colorNdx;
- doodad->shape.shape_ndx= dWire->shape.shapeNdx;
- break;
- case XkbTextDoodad:
- if (dWire->text.colorNdx>=geom->num_colors) {
- client->errorValue= _XkbErrCode3(0x42,geom->num_colors,
- dWire->text.colorNdx);
- return BadMatch;
- }
- if (client->swapped) {
- register int n;
- swaps(&dWire->text.width,n);
- swaps(&dWire->text.height,n);
- }
- doodad->text.width= dWire->text.width;
- doodad->text.height= dWire->text.height;
- doodad->text.color_ndx= dWire->text.colorNdx;
- doodad->text.text= _GetCountedString(&wire,client->swapped);
- doodad->text.font= _GetCountedString(&wire,client->swapped);
- break;
- case XkbIndicatorDoodad:
- if (dWire->indicator.onColorNdx>=geom->num_colors) {
- client->errorValue= _XkbErrCode3(0x43,geom->num_colors,
- dWire->indicator.onColorNdx);
- return BadMatch;
- }
- if (dWire->indicator.offColorNdx>=geom->num_colors) {
- client->errorValue= _XkbErrCode3(0x44,geom->num_colors,
- dWire->indicator.offColorNdx);
- return BadMatch;
- }
- if (dWire->indicator.shapeNdx>=geom->num_shapes) {
- client->errorValue= _XkbErrCode3(0x45,geom->num_shapes,
- dWire->indicator.shapeNdx);
- return BadMatch;
- }
- doodad->indicator.shape_ndx= dWire->indicator.shapeNdx;
- doodad->indicator.on_color_ndx= dWire->indicator.onColorNdx;
- doodad->indicator.off_color_ndx= dWire->indicator.offColorNdx;
- break;
- case XkbLogoDoodad:
- if (dWire->logo.colorNdx>=geom->num_colors) {
- client->errorValue= _XkbErrCode3(0x46,geom->num_colors,
- dWire->logo.colorNdx);
- return BadMatch;
- }
- if (dWire->logo.shapeNdx>=geom->num_shapes) {
- client->errorValue= _XkbErrCode3(0x47,geom->num_shapes,
- dWire->logo.shapeNdx);
- return BadMatch;
- }
- doodad->logo.color_ndx= dWire->logo.colorNdx;
- doodad->logo.shape_ndx= dWire->logo.shapeNdx;
- doodad->logo.logo_name= _GetCountedString(&wire,client->swapped);
- break;
- default:
- client->errorValue= _XkbErrCode2(0x4F,dWire->any.type);
- return BadValue;
- }
- *wire_inout= wire;
- return Success;
-}
-
-static Status
-_CheckSetOverlay( char ** wire_inout,
- XkbGeometryPtr geom,
- XkbSectionPtr section,
- ClientPtr client)
-{
-register int r;
-char * wire;
-XkbOverlayPtr ol;
-xkbOverlayWireDesc * olWire;
-xkbOverlayRowWireDesc * rWire;
-
- wire= *wire_inout;
- olWire= (xkbOverlayWireDesc *)wire;
- if (client->swapped) {
- register int n;
- swapl(&olWire->name,n);
- }
- CHK_ATOM_ONLY(olWire->name);
- ol= XkbAddGeomOverlay(section,olWire->name,olWire->nRows);
- rWire= (xkbOverlayRowWireDesc *)&olWire[1];
- for (r=0;r<olWire->nRows;r++) {
- register int k;
- xkbOverlayKeyWireDesc * kWire;
- XkbOverlayRowPtr row;
-
- if (rWire->rowUnder>section->num_rows) {
- client->errorValue= _XkbErrCode4(0x20,r,section->num_rows,
- rWire->rowUnder);
- return BadMatch;
- }
- row= XkbAddGeomOverlayRow(ol,rWire->rowUnder,rWire->nKeys);
- kWire= (xkbOverlayKeyWireDesc *)&rWire[1];
- for (k=0;k<rWire->nKeys;k++,kWire++) {
- if (XkbAddGeomOverlayKey(ol,row,
- (char *)kWire->over,(char *)kWire->under)==NULL) {
- client->errorValue= _XkbErrCode3(0x21,r,k);
- return BadMatch;
- }
- }
- rWire= (xkbOverlayRowWireDesc *)kWire;
- }
- olWire= (xkbOverlayWireDesc *)rWire;
- wire= (char *)olWire;
- *wire_inout= wire;
- return Success;
-}
-
-static Status
-_CheckSetSections( XkbGeometryPtr geom,
- xkbSetGeometryReq * req,
- char ** wire_inout,
- ClientPtr client)
-{
-Status status;
-register int s;
-char * wire;
-xkbSectionWireDesc * sWire;
-XkbSectionPtr section;
-
- wire= *wire_inout;
- if (req->nSections<1)
- return Success;
- sWire= (xkbSectionWireDesc *)wire;
- for (s=0;s<req->nSections;s++) {
- register int r;
- xkbRowWireDesc * rWire;
- if (client->swapped) {
- register int n;
- swapl(&sWire->name,n);
- swaps(&sWire->top,n);
- swaps(&sWire->left,n);
- swaps(&sWire->width,n);
- swaps(&sWire->height,n);
- swaps(&sWire->angle,n);
- }
- CHK_ATOM_ONLY(sWire->name);
- section= XkbAddGeomSection(geom,sWire->name,sWire->nRows,
- sWire->nDoodads,sWire->nOverlays);
- if (!section)
- return BadAlloc;
- section->priority= sWire->priority;
- section->top= sWire->top;
- section->left= sWire->left;
- section->width= sWire->width;
- section->height= sWire->height;
- section->angle= sWire->angle;
- rWire= (xkbRowWireDesc *)&sWire[1];
- for (r=0;r<sWire->nRows;r++) {
- register int k;
- XkbRowPtr row;
- xkbKeyWireDesc * kWire;
- if (client->swapped) {
- register int n;
- swaps(&rWire->top,n);
- swaps(&rWire->left,n);
- }
- row= XkbAddGeomRow(section,rWire->nKeys);
- if (!row)
- return BadAlloc;
- row->top= rWire->top;
- row->left= rWire->left;
- row->vertical= rWire->vertical;
- kWire= (xkbKeyWireDesc *)&rWire[1];
- for (k=0;k<rWire->nKeys;k++) {
- XkbKeyPtr key;
- key= XkbAddGeomKey(row);
- if (!key)
- return BadAlloc;
- memcpy(key->name.name,kWire[k].name,XkbKeyNameLength);
- key->gap= kWire[k].gap;
- key->shape_ndx= kWire[k].shapeNdx;
- key->color_ndx= kWire[k].colorNdx;
- if (key->shape_ndx>=geom->num_shapes) {
- client->errorValue= _XkbErrCode3(0x10,key->shape_ndx,
- geom->num_shapes);
- return BadMatch;
- }
- if (key->color_ndx>=geom->num_colors) {
- client->errorValue= _XkbErrCode3(0x11,key->color_ndx,
- geom->num_colors);
- return BadMatch;
- }
- }
- rWire= (xkbRowWireDesc *)&kWire[rWire->nKeys];
- }
- wire= (char *)rWire;
- if (sWire->nDoodads>0) {
- register int d;
- for (d=0;d<sWire->nDoodads;d++) {
- status=_CheckSetDoodad(&wire,geom,section,client);
- if (status!=Success)
- return status;
- }
- }
- if (sWire->nOverlays>0) {
- register int o;
- for (o=0;o<sWire->nOverlays;o++) {
- status= _CheckSetOverlay(&wire,geom,section,client);
- if (status!=Success)
- return status;
- }
- }
- sWire= (xkbSectionWireDesc *)wire;
- }
- wire= (char *)sWire;
- *wire_inout= wire;
- return Success;
-}
-
-static Status
-_CheckSetShapes( XkbGeometryPtr geom,
- xkbSetGeometryReq * req,
- char ** wire_inout,
- ClientPtr client)
-{
-register int i;
-char * wire;
-
- wire= *wire_inout;
- if (req->nShapes<1) {
- client->errorValue= _XkbErrCode2(0x06,req->nShapes);
- return BadValue;
- }
- else {
- xkbShapeWireDesc * shapeWire;
- XkbShapePtr shape;
- register int o;
- shapeWire= (xkbShapeWireDesc *)wire;
- for (i=0;i<req->nShapes;i++) {
- xkbOutlineWireDesc * olWire;
- XkbOutlinePtr ol;
- shape= XkbAddGeomShape(geom,shapeWire->name,shapeWire->nOutlines);
- if (!shape)
- return BadAlloc;
- olWire= (xkbOutlineWireDesc *)(&shapeWire[1]);
- for (o=0;o<shapeWire->nOutlines;o++) {
- register int p;
- XkbPointPtr pt;
- xkbPointWireDesc * ptWire;
-
- ol= XkbAddGeomOutline(shape,olWire->nPoints);
- if (!ol)
- return BadAlloc;
- ol->corner_radius= olWire->cornerRadius;
- ptWire= (xkbPointWireDesc *)&olWire[1];
- for (p=0,pt=ol->points;p<olWire->nPoints;p++,pt++) {
- pt->x= ptWire[p].x;
- pt->y= ptWire[p].y;
- if (client->swapped) {
- register int n;
- swaps(&pt->x,n);
- swaps(&pt->y,n);
- }
- }
- ol->num_points= olWire->nPoints;
- olWire= (xkbOutlineWireDesc *)(&ptWire[olWire->nPoints]);
- }
- if (shapeWire->primaryNdx!=XkbNoShape)
- shape->primary= &shape->outlines[shapeWire->primaryNdx];
- if (shapeWire->approxNdx!=XkbNoShape)
- shape->approx= &shape->outlines[shapeWire->approxNdx];
- shapeWire= (xkbShapeWireDesc *)olWire;
- }
- wire= (char *)shapeWire;
- }
- if (geom->num_shapes!=req->nShapes) {
- client->errorValue= _XkbErrCode3(0x07,geom->num_shapes,req->nShapes);
- return BadMatch;
- }
-
- *wire_inout= wire;
- return Success;
-}
-
-static Status
-_CheckSetGeom( XkbGeometryPtr geom,
- xkbSetGeometryReq * req,
- ClientPtr client)
-{
-register int i;
-Status status;
-char * wire;
-
- wire= (char *)&req[1];
- geom->label_font= _GetCountedString(&wire,client->swapped);
-
- for (i=0;i<req->nProperties;i++) {
- char *name,*val;
- name= _GetCountedString(&wire,client->swapped);
- if (!name)
- return BadAlloc;
- val= _GetCountedString(&wire,client->swapped);
- if (!val) {
- free(name);
- return BadAlloc;
- }
- if (XkbAddGeomProperty(geom,name,val)==NULL) {
- free(name);
- free(val);
- return BadAlloc;
- }
- free(name);
- free(val);
- }
-
- if (req->nColors<2) {
- client->errorValue= _XkbErrCode3(0x01,2,req->nColors);
- return BadValue;
- }
- if (req->baseColorNdx>req->nColors) {
- client->errorValue=_XkbErrCode3(0x03,req->nColors,req->baseColorNdx);
- return BadMatch;
- }
- if (req->labelColorNdx>req->nColors) {
- client->errorValue= _XkbErrCode3(0x03,req->nColors,req->labelColorNdx);
- return BadMatch;
- }
- if (req->labelColorNdx==req->baseColorNdx) {
- client->errorValue= _XkbErrCode3(0x04,req->baseColorNdx,
- req->labelColorNdx);
- return BadMatch;
- }
-
- for (i=0;i<req->nColors;i++) {
- char *name;
- name= _GetCountedString(&wire,client->swapped);
- if (!name)
- return BadAlloc;
- if (!XkbAddGeomColor(geom,name,geom->num_colors)) {
- free(name);
- return BadAlloc;
- }
- free(name);
- }
- if (req->nColors!=geom->num_colors) {
- client->errorValue= _XkbErrCode3(0x05,req->nColors,geom->num_colors);
- return BadMatch;
- }
- geom->label_color= &geom->colors[req->labelColorNdx];
- geom->base_color= &geom->colors[req->baseColorNdx];
-
- if ((status=_CheckSetShapes(geom,req,&wire,client))!=Success)
- return status;
-
- if ((status=_CheckSetSections(geom,req,&wire,client))!=Success)
- return status;
-
- for (i=0;i<req->nDoodads;i++) {
- status=_CheckSetDoodad(&wire,geom,NULL,client);
- if (status!=Success)
- return status;
- }
-
- for (i=0;i<req->nKeyAliases;i++) {
- if (XkbAddGeomKeyAlias(geom,&wire[XkbKeyNameLength],wire)==NULL)
- return BadAlloc;
- wire+= 2*XkbKeyNameLength;
- }
- return Success;
-}
-
-static int
-_XkbSetGeometry(ClientPtr client, DeviceIntPtr dev, xkbSetGeometryReq *stuff)
-{
- XkbDescPtr xkb;
- Bool new_name;
- xkbNewKeyboardNotify nkn;
- XkbGeometryPtr geom,old;
- XkbGeometrySizesRec sizes;
- Status status;
-
- xkb= dev->key->xkbInfo->desc;
- old= xkb->geom;
- xkb->geom= NULL;
-
- sizes.which= XkbGeomAllMask;
- sizes.num_properties= stuff->nProperties;
- sizes.num_colors= stuff->nColors;
- sizes.num_shapes= stuff->nShapes;
- sizes.num_sections= stuff->nSections;
- sizes.num_doodads= stuff->nDoodads;
- sizes.num_key_aliases= stuff->nKeyAliases;
- if ((status= XkbAllocGeometry(xkb,&sizes))!=Success) {
- xkb->geom= old;
- return status;
- }
- geom= xkb->geom;
- geom->name= stuff->name;
- geom->width_mm= stuff->widthMM;
- geom->height_mm= stuff->heightMM;
- if ((status= _CheckSetGeom(geom,stuff,client))!=Success) {
- XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
- xkb->geom= old;
- return status;
- }
- new_name= (xkb->names->geometry!=geom->name);
- xkb->names->geometry= geom->name;
- if (old)
- XkbFreeGeometry(old,XkbGeomAllMask,TRUE);
- if (new_name) {
- xkbNamesNotify nn;
- memset(&nn, 0, sizeof(xkbNamesNotify));
- nn.changed= XkbGeometryNameMask;
- XkbSendNamesNotify(dev,&nn);
- }
- nkn.deviceID= nkn.oldDeviceID= dev->id;
- nkn.minKeyCode= nkn.oldMinKeyCode= xkb->min_key_code;
- nkn.maxKeyCode= nkn.oldMaxKeyCode= xkb->max_key_code;
- nkn.requestMajor= XkbReqCode;
- nkn.requestMinor= X_kbSetGeometry;
- nkn.changed= XkbNKN_GeometryMask;
- XkbSendNewKeyboardNotify(dev,&nkn);
- return Success;
-}
-
-int
-ProcXkbSetGeometry(ClientPtr client)
-{
- DeviceIntPtr dev;
- int rc;
-
- REQUEST(xkbSetGeometryReq);
- REQUEST_AT_LEAST_SIZE(xkbSetGeometryReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
- CHK_ATOM_OR_NONE(stuff->name);
-
- rc = _XkbSetGeometry(client, dev, stuff);
- if (rc != Success)
- return rc;
-
- if (stuff->deviceSpec == XkbUseCoreKbd)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
- {
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
- if (rc == Success)
- _XkbSetGeometry(client, other, stuff);
- }
- }
- }
-
- return Success;
-}
-
-/***====================================================================***/
-
-int
-ProcXkbPerClientFlags(ClientPtr client)
-{
- DeviceIntPtr dev;
- xkbPerClientFlagsReply rep;
- XkbInterestPtr interest;
- Mask access_mode = DixGetAttrAccess | DixSetAttrAccess;
-
- REQUEST(xkbPerClientFlagsReq);
- REQUEST_SIZE_MATCH(xkbPerClientFlagsReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
- CHK_MASK_LEGAL(0x01,stuff->change,XkbPCF_AllFlagsMask);
- CHK_MASK_MATCH(0x02,stuff->change,stuff->value);
-
- interest = XkbFindClientResource((DevicePtr)dev,client);
- memset(&rep, 0, sizeof(xkbPerClientFlagsReply));
- rep.type= X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- if (stuff->change) {
- client->xkbClientFlags&= ~stuff->change;
- client->xkbClientFlags|= stuff->value;
- }
- if (stuff->change&XkbPCF_AutoResetControlsMask) {
- Bool want;
- want= stuff->value&XkbPCF_AutoResetControlsMask;
- if (interest && !want) {
- interest->autoCtrls= interest->autoCtrlValues= 0;
- }
- else if (want && (!interest)) {
- XID id = FakeClientID(client->index);
- if (!AddResource(id,RT_XKBCLIENT,dev))
- return BadAlloc;
- interest= XkbAddClientResource((DevicePtr)dev,client,id);
- if (!interest)
- return BadAlloc;
- }
- if (interest && want ) {
- register unsigned affect;
- affect= stuff->ctrlsToChange;
-
- CHK_MASK_LEGAL(0x03,affect,XkbAllBooleanCtrlsMask);
- CHK_MASK_MATCH(0x04,affect,stuff->autoCtrls);
- CHK_MASK_MATCH(0x05,stuff->autoCtrls,stuff->autoCtrlValues);
-
- interest->autoCtrls&= ~affect;
- interest->autoCtrlValues&= ~affect;
- interest->autoCtrls|= stuff->autoCtrls&affect;
- interest->autoCtrlValues|= stuff->autoCtrlValues&affect;
- }
- }
- rep.supported = XkbPCF_AllFlagsMask;
- rep.value= client->xkbClientFlags&XkbPCF_AllFlagsMask;
- if (interest) {
- rep.autoCtrls= interest->autoCtrls;
- rep.autoCtrlValues= interest->autoCtrlValues;
- }
- else {
- rep.autoCtrls= rep.autoCtrlValues= 0;
- }
- if ( client->swapped ) {
- register int n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.supported,n);
- swapl(&rep.value,n);
- swapl(&rep.autoCtrls,n);
- swapl(&rep.autoCtrlValues,n);
- }
- WriteToClient(client,SIZEOF(xkbPerClientFlagsReply), (char *)&rep);
- return Success;
-}
-
-/***====================================================================***/
-
-/* all latin-1 alphanumerics, plus parens, minus, underscore, slash */
-/* and wildcards */
-static unsigned char componentSpecLegal[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, 0xff, 0x87,
- 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff
-};
-
-/* same as above but accepts percent, plus and bar too */
-static unsigned char componentExprLegal[] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0xaf, 0xff, 0x87,
- 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x17,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff
-};
-
-static char *
-GetComponentSpec(unsigned char **pWire,Bool allowExpr,int *errRtrn)
-{
-int len;
-register int i;
-unsigned char *wire,*str,*tmp,*legal;
-
- if (allowExpr) legal= &componentExprLegal[0];
- else legal= &componentSpecLegal[0];
-
- wire= *pWire;
- len= (*(unsigned char *)wire++);
- if (len>0) {
- str= calloc(1, len+1);
- if (str) {
- tmp= str;
- for (i=0;i<len;i++) {
- if (legal[(*wire)/8]&(1<<((*wire)%8)))
- *tmp++= *wire++;
- else wire++;
- }
- if (tmp!=str)
- *tmp++= '\0';
- else {
- free(str);
- str= NULL;
- }
- }
- else {
- *errRtrn= BadAlloc;
- }
- }
- else {
- str= NULL;
- }
- *pWire= wire;
- return (char *)str;
-}
-
-/***====================================================================***/
-
-int
-ProcXkbListComponents(ClientPtr client)
-{
- DeviceIntPtr dev;
- xkbListComponentsReply rep;
- unsigned len;
- int status;
- unsigned char * str;
- XkbSrvListInfoRec list;
-
- REQUEST(xkbListComponentsReq);
- REQUEST_AT_LEAST_SIZE(xkbListComponentsReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
-
- status= Success;
- str= (unsigned char *)&stuff[1];
- memset(&list, 0, sizeof(XkbSrvListInfoRec));
- list.maxRtrn= stuff->maxNames;
- list.pattern[_XkbListKeycodes]= GetComponentSpec(&str,FALSE,&status);
- list.pattern[_XkbListTypes]= GetComponentSpec(&str,FALSE,&status);
- list.pattern[_XkbListCompat]= GetComponentSpec(&str,FALSE,&status);
- list.pattern[_XkbListSymbols]= GetComponentSpec(&str,FALSE,&status);
- list.pattern[_XkbListGeometry]= GetComponentSpec(&str,FALSE,&status);
- if (status!=Success)
- return status;
- len= str-((unsigned char *)stuff);
- if ((XkbPaddedSize(len)/4)!=stuff->length)
- return BadLength;
- if ((status=XkbDDXList(dev,&list,client))!=Success) {
- free(list.pool);
- list.pool = NULL;
- return status;
- }
- memset(&rep, 0, sizeof(xkbListComponentsReply));
- rep.type= X_Reply;
- rep.deviceID = dev->id;
- rep.sequenceNumber = client->sequence;
- rep.length = XkbPaddedSize(list.nPool)/4;
- rep.nKeymaps = 0;
- rep.nKeycodes = list.nFound[_XkbListKeycodes];
- rep.nTypes = list.nFound[_XkbListTypes];
- rep.nCompatMaps = list.nFound[_XkbListCompat];
- rep.nSymbols = list.nFound[_XkbListSymbols];
- rep.nGeometries = list.nFound[_XkbListGeometry];
- rep.extra= 0;
- if (list.nTotal>list.maxRtrn)
- rep.extra = (list.nTotal-list.maxRtrn);
- if (client->swapped) {
- register int n;
- swaps(&rep.sequenceNumber,n);
- swapl(&rep.length,n);
- swaps(&rep.nKeymaps,n);
- swaps(&rep.nKeycodes,n);
- swaps(&rep.nTypes,n);
- swaps(&rep.nCompatMaps,n);
- swaps(&rep.nSymbols,n);
- swaps(&rep.nGeometries,n);
- swaps(&rep.extra,n);
- }
- WriteToClient(client,SIZEOF(xkbListComponentsReply),(char *)&rep);
- if (list.nPool && list.pool) {
- WriteToClient(client,XkbPaddedSize(list.nPool), (char *)list.pool);
- free(list.pool);
- list.pool= NULL;
- }
- return Success;
-}
-
-/***====================================================================***/
-
-int
-ProcXkbGetKbdByName(ClientPtr client)
-{
- DeviceIntPtr dev;
- DeviceIntPtr tmpd;
- xkbGetKbdByNameReply rep = {0};
- xkbGetMapReply mrep = {0};
- xkbGetCompatMapReply crep = {0};
- xkbGetIndicatorMapReply irep = {0};
- xkbGetNamesReply nrep = {0};
- xkbGetGeometryReply grep = {0};
- XkbComponentNamesRec names = {0};
- XkbDescPtr xkb, new;
- unsigned char * str;
- char mapFile[PATH_MAX];
- unsigned len;
- unsigned fwant,fneed,reported;
- int status;
- Bool geom_changed;
- XkbSrvLedInfoPtr old_sli;
- XkbSrvLedInfoPtr sli;
- Mask access_mode = DixGetAttrAccess | DixManageAccess;
-
- REQUEST(xkbGetKbdByNameReq);
- REQUEST_AT_LEAST_SIZE(xkbGetKbdByNameReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
-
- xkb = dev->key->xkbInfo->desc;
- status= Success;
- str= (unsigned char *)&stuff[1];
- if (GetComponentSpec(&str,TRUE,&status)) /* keymap, unsupported */
- return BadMatch;
- names.keycodes= GetComponentSpec(&str,TRUE,&status);
- names.types= GetComponentSpec(&str,TRUE,&status);
- names.compat= GetComponentSpec(&str,TRUE,&status);
- names.symbols= GetComponentSpec(&str,TRUE,&status);
- names.geometry= GetComponentSpec(&str,TRUE,&status);
- if (status!=Success)
- return status;
- len= str-((unsigned char *)stuff);
- if ((XkbPaddedSize(len)/4)!=stuff->length)
- return BadLength;
-
- CHK_MASK_LEGAL(0x01,stuff->want,XkbGBN_AllComponentsMask);
- CHK_MASK_LEGAL(0x02,stuff->need,XkbGBN_AllComponentsMask);
-
- if (stuff->load)
- fwant= XkbGBN_AllComponentsMask;
- else fwant= stuff->want|stuff->need;
- if ((!names.compat)&&
- (fwant&(XkbGBN_CompatMapMask|XkbGBN_IndicatorMapMask))) {
- names.compat= Xstrdup("%");
- }
- if ((!names.types)&&(fwant&(XkbGBN_TypesMask))) {
- names.types= Xstrdup("%");
- }
- if ((!names.symbols)&&(fwant&XkbGBN_SymbolsMask)) {
- names.symbols= Xstrdup("%");
- }
- geom_changed= ((names.geometry!=NULL)&&(strcmp(names.geometry,"%")!=0));
- if ((!names.geometry)&&(fwant&XkbGBN_GeometryMask)) {
- names.geometry= Xstrdup("%");
- geom_changed= FALSE;
- }
-
- memset(mapFile, 0, PATH_MAX);
- rep.type= X_Reply;
- rep.deviceID = dev->id;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.minKeyCode = xkb->min_key_code;
- rep.maxKeyCode = xkb->max_key_code;
- rep.loaded= FALSE;
- fwant= XkbConvertGetByNameComponents(TRUE,stuff->want)|XkmVirtualModsMask;
- fneed= XkbConvertGetByNameComponents(TRUE,stuff->need);
- rep.reported= XkbConvertGetByNameComponents(FALSE,fwant|fneed);
- if (stuff->load) {
- fneed|= XkmKeymapRequired;
- fwant|= XkmKeymapLegal;
- }
- if ((fwant|fneed)&XkmSymbolsMask) {
- fneed|= XkmKeyNamesIndex|XkmTypesIndex;
- fwant|= XkmIndicatorsIndex;
- }
-
- /* We pass dev in here so we can get the old names out if needed. */
- rep.found = XkbDDXLoadKeymapByNames(dev,&names,fwant,fneed,&new,
- mapFile,PATH_MAX);
- rep.newKeyboard= FALSE;
- rep.pad1= rep.pad2= rep.pad3= rep.pad4= 0;
-
- stuff->want|= stuff->need;
- if (new==NULL)
- rep.reported= 0;
- else {
- if (stuff->load)
- rep.loaded= TRUE;
- if (stuff->load ||
- ((rep.reported&XkbGBN_SymbolsMask) && (new->compat))) {
- XkbChangesRec changes;
- memset(&changes, 0, sizeof(changes));
- XkbUpdateDescActions(new,
- new->min_key_code,XkbNumKeys(new),
- &changes);
- }
-
- if (new->map==NULL)
- rep.reported&= ~(XkbGBN_SymbolsMask|XkbGBN_TypesMask);
- else if (rep.reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask)) {
- mrep.type= X_Reply;
- mrep.deviceID = dev->id;
- mrep.sequenceNumber= client->sequence;
- mrep.length = ((SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply))>>2);
- mrep.minKeyCode = new->min_key_code;
- mrep.maxKeyCode = new->max_key_code;
- mrep.present = 0;
- mrep.totalSyms = mrep.totalActs =
- mrep.totalKeyBehaviors= mrep.totalKeyExplicit=
- mrep.totalModMapKeys= mrep.totalVModMapKeys= 0;
- if (rep.reported&(XkbGBN_TypesMask|XkbGBN_ClientSymbolsMask)) {
- mrep.present|= XkbKeyTypesMask;
- mrep.firstType = 0;
- mrep.nTypes = mrep.totalTypes= new->map->num_types;
- }
- else {
- mrep.firstType = mrep.nTypes= 0;
- mrep.totalTypes= 0;
- }
- if (rep.reported&XkbGBN_ClientSymbolsMask) {
- mrep.present|= (XkbKeySymsMask|XkbModifierMapMask);
- mrep.firstKeySym = mrep.firstModMapKey= new->min_key_code;
- mrep.nKeySyms = mrep.nModMapKeys= XkbNumKeys(new);
- }
- else {
- mrep.firstKeySym= mrep.firstModMapKey= 0;
- mrep.nKeySyms= mrep.nModMapKeys= 0;
- }
- if (rep.reported&XkbGBN_ServerSymbolsMask) {
- mrep.present|= XkbAllServerInfoMask;
- mrep.virtualMods= ~0;
- mrep.firstKeyAct = mrep.firstKeyBehavior =
- mrep.firstKeyExplicit = new->min_key_code;
- mrep.nKeyActs = mrep.nKeyBehaviors =
- mrep.nKeyExplicit = XkbNumKeys(new);
- mrep.firstVModMapKey= new->min_key_code;
- mrep.nVModMapKeys= XkbNumKeys(new);
- }
- else {
- mrep.virtualMods= 0;
- mrep.firstKeyAct= mrep.firstKeyBehavior=
- mrep.firstKeyExplicit = 0;
- mrep.nKeyActs= mrep.nKeyBehaviors= mrep.nKeyExplicit= 0;
- }
- XkbComputeGetMapReplySize(new,&mrep);
- rep.length+= SIZEOF(xGenericReply)/4+mrep.length;
- }
- if (new->compat==NULL)
- rep.reported&= ~XkbGBN_CompatMapMask;
- else if (rep.reported&XkbGBN_CompatMapMask) {
- crep.type= X_Reply;
- crep.deviceID= dev->id;
- crep.sequenceNumber= client->sequence;
- crep.length= 0;
- crep.groups= XkbAllGroupsMask;
- crep.firstSI= 0;
- crep.nSI= crep.nTotalSI= new->compat->num_si;
- XkbComputeGetCompatMapReplySize(new->compat,&crep);
- rep.length+= SIZEOF(xGenericReply)/4+crep.length;
- }
- if (new->indicators==NULL)
- rep.reported&= ~XkbGBN_IndicatorMapMask;
- else if (rep.reported&XkbGBN_IndicatorMapMask) {
- irep.type= X_Reply;
- irep.deviceID= dev->id;
- irep.sequenceNumber= client->sequence;
- irep.length= 0;
- irep.which= XkbAllIndicatorsMask;
- XkbComputeGetIndicatorMapReplySize(new->indicators,&irep);
- rep.length+= SIZEOF(xGenericReply)/4+irep.length;
- }
- if (new->names==NULL)
- rep.reported&= ~(XkbGBN_OtherNamesMask|XkbGBN_KeyNamesMask);
- else if (rep.reported&(XkbGBN_OtherNamesMask|XkbGBN_KeyNamesMask)) {
- nrep.type= X_Reply;
- nrep.deviceID= dev->id;
- nrep.sequenceNumber= client->sequence;
- nrep.length= 0;
- nrep.minKeyCode= new->min_key_code;
- nrep.maxKeyCode= new->max_key_code;
- if (rep.reported&XkbGBN_OtherNamesMask) {
- nrep.which= XkbAllNamesMask;
- if (new->map!=NULL)
- nrep.nTypes= new->map->num_types;
- else nrep.nTypes= 0;
- nrep.nKTLevels= 0;
- nrep.groupNames= XkbAllGroupsMask;
- nrep.virtualMods= XkbAllVirtualModsMask;
- nrep.indicators= XkbAllIndicatorsMask;
- nrep.nRadioGroups= new->names->num_rg;
- }
- else {
- nrep.which= 0;
- nrep.nTypes= 0;
- nrep.nKTLevels= 0;
- nrep.groupNames= 0;
- nrep.virtualMods= 0;
- nrep.indicators= 0;
- nrep.nRadioGroups= 0;
- }
- if (rep.reported&XkbGBN_KeyNamesMask) {
- nrep.which|= XkbKeyNamesMask;
- nrep.firstKey= new->min_key_code;
- nrep.nKeys= XkbNumKeys(new);
- nrep.nKeyAliases= new->names->num_key_aliases;
- if (nrep.nKeyAliases)
- nrep.which|= XkbKeyAliasesMask;
- }
- else {
- nrep.which&= ~(XkbKeyNamesMask|XkbKeyAliasesMask);
- nrep.firstKey= nrep.nKeys= 0;
- nrep.nKeyAliases= 0;
- }
- XkbComputeGetNamesReplySize(new,&nrep);
- rep.length+= SIZEOF(xGenericReply)/4+nrep.length;
- }
- if (new->geom==NULL)
- rep.reported&= ~XkbGBN_GeometryMask;
- else if (rep.reported&XkbGBN_GeometryMask) {
- grep.type= X_Reply;
- grep.deviceID= dev->id;
- grep.sequenceNumber= client->sequence;
- grep.length= 0;
- grep.found= TRUE;
- grep.pad= 0;
- grep.widthMM= grep.heightMM= 0;
- grep.nProperties= grep.nColors= grep.nShapes= 0;
- grep.nSections= grep.nDoodads= 0;
- grep.baseColorNdx= grep.labelColorNdx= 0;
- XkbComputeGetGeometryReplySize(new->geom,&grep,None);
- rep.length+= SIZEOF(xGenericReply)/4+grep.length;
- }
- }
-
- reported= rep.reported;
- if ( client->swapped ) {
- register int n;
- swaps(&rep.sequenceNumber,n);
- swapl(&rep.length,n);
- swaps(&rep.found,n);
- swaps(&rep.reported,n);
- }
- WriteToClient(client,SIZEOF(xkbGetKbdByNameReply), (char *)&rep);
- if (reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask))
- XkbSendMap(client,new,&mrep);
- if (reported&XkbGBN_CompatMapMask)
- XkbSendCompatMap(client,new->compat,&crep);
- if (reported&XkbGBN_IndicatorMapMask)
- XkbSendIndicatorMap(client,new->indicators,&irep);
- if (reported&(XkbGBN_KeyNamesMask|XkbGBN_OtherNamesMask))
- XkbSendNames(client,new,&nrep);
- if (reported&XkbGBN_GeometryMask)
- XkbSendGeometry(client,new->geom,&grep,FALSE);
- if (rep.loaded) {
- XkbDescPtr old_xkb;
- xkbNewKeyboardNotify nkn;
- int i,nG,nTG;
- old_xkb= xkb;
- xkb= new;
- dev->key->xkbInfo->desc= xkb;
- new= old_xkb; /* so it'll get freed automatically */
-
- *xkb->ctrls= *old_xkb->ctrls;
- for (nG=nTG=0,i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
- nG= XkbKeyNumGroups(xkb,i);
- if (nG>=XkbNumKbdGroups) {
- nTG= XkbNumKbdGroups;
- break;
- }
- if (nG>nTG) {
- nTG= nG;
- }
- }
- xkb->ctrls->num_groups= nTG;
-
- for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
- if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) {
- if (tmpd != dev)
- XkbCopyDeviceKeymap(tmpd, dev);
-
- if (tmpd->kbdfeed && tmpd->kbdfeed->xkb_sli) {
- old_sli = tmpd->kbdfeed->xkb_sli;
- tmpd->kbdfeed->xkb_sli = NULL;
- sli = XkbAllocSrvLedInfo(tmpd, tmpd->kbdfeed, NULL, 0);
- if (sli) {
- sli->explicitState = old_sli->explicitState;
- sli->effectiveState = old_sli->effectiveState;
- }
- tmpd->kbdfeed->xkb_sli = sli;
- XkbFreeSrvLedInfo(old_sli);
- }
- }
- }
-
- nkn.deviceID= nkn.oldDeviceID= dev->id;
- nkn.minKeyCode= new->min_key_code;
- nkn.maxKeyCode= new->max_key_code;
- nkn.oldMinKeyCode= xkb->min_key_code;
- nkn.oldMaxKeyCode= xkb->max_key_code;
- nkn.requestMajor= XkbReqCode;
- nkn.requestMinor= X_kbGetKbdByName;
- nkn.changed= XkbNKN_KeycodesMask;
- if (geom_changed)
- nkn.changed|= XkbNKN_GeometryMask;
- XkbSendNewKeyboardNotify(dev,&nkn);
-
- if (!IsMaster(dev)) {
- DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD);
- if (master && master->lastSlave == dev) {
- XkbCopyDeviceKeymap(master, dev);
- XkbSendNewKeyboardNotify(dev,&nkn);
- }
- }
- }
- if ((new!=NULL)&&(new!=xkb)) {
- XkbFreeKeyboard(new,XkbAllComponentsMask,TRUE);
- new= NULL;
- }
- XkbFreeComponentNames(&names, FALSE);
- return Success;
-}
-
-/***====================================================================***/
-
-static int
-ComputeDeviceLedInfoSize( DeviceIntPtr dev,
- unsigned int what,
- XkbSrvLedInfoPtr sli)
-{
-int nNames,nMaps;
-register unsigned n,bit;
-
- if (sli==NULL)
- return 0;
- nNames= nMaps= 0;
- if ((what&XkbXI_IndicatorNamesMask)==0)
- sli->namesPresent= 0;
- if ((what&XkbXI_IndicatorMapsMask)==0)
- sli->mapsPresent= 0;
-
- for (n=0,bit=1;n<XkbNumIndicators;n++,bit<<=1) {
- if (sli->names && sli->names[n]!=None) {
- sli->namesPresent|= bit;
- nNames++;
- }
- if (sli->maps && XkbIM_InUse(&sli->maps[n])) {
- sli->mapsPresent|= bit;
- nMaps++;
- }
- }
- return (nNames*4)+(nMaps*SIZEOF(xkbIndicatorMapWireDesc));
-}
-
-static int
-CheckDeviceLedFBs( DeviceIntPtr dev,
- int class,
- int id,
- xkbGetDeviceInfoReply * rep,
- ClientPtr client)
-{
-int nFBs= 0;
-int length= 0;
-Bool classOk;
-
- if (class==XkbDfltXIClass) {
- if (dev->kbdfeed) class= KbdFeedbackClass;
- else if (dev->leds) class= LedFeedbackClass;
- else {
- client->errorValue= _XkbErrCode2(XkbErr_BadClass,class);
- return XkbKeyboardErrorCode;
- }
- }
- classOk= FALSE;
- if ((dev->kbdfeed)&&((class==KbdFeedbackClass)||(class==XkbAllXIClasses))) {
- KbdFeedbackPtr kf;
- classOk= TRUE;
- for (kf= dev->kbdfeed;(kf);kf=kf->next) {
- if ((id!=XkbAllXIIds)&&(id!=XkbDfltXIId)&&(id!=kf->ctrl.id))
- continue;
- nFBs++;
- length+= SIZEOF(xkbDeviceLedsWireDesc);
- if (!kf->xkb_sli)
- kf->xkb_sli= XkbAllocSrvLedInfo(dev,kf,NULL,0);
- length+= ComputeDeviceLedInfoSize(dev,rep->present,kf->xkb_sli);
- if (id!=XkbAllXIIds)
- break;
- }
- }
- if ((dev->leds)&&((class==LedFeedbackClass)||(class==XkbAllXIClasses))) {
- LedFeedbackPtr lf;
- classOk= TRUE;
- for (lf= dev->leds;(lf);lf=lf->next) {
- if ((id!=XkbAllXIIds)&&(id!=XkbDfltXIId)&&(id!=lf->ctrl.id))
- continue;
- nFBs++;
- length+= SIZEOF(xkbDeviceLedsWireDesc);
- if (!lf->xkb_sli)
- lf->xkb_sli= XkbAllocSrvLedInfo(dev,NULL,lf,0);
- length+= ComputeDeviceLedInfoSize(dev,rep->present,lf->xkb_sli);
- if (id!=XkbAllXIIds)
- break;
- }
- }
- if (nFBs>0) {
- rep->nDeviceLedFBs= nFBs;
- rep->length+= (length/4);
- return Success;
- }
- if (classOk) client->errorValue= _XkbErrCode2(XkbErr_BadId,id);
- else client->errorValue= _XkbErrCode2(XkbErr_BadClass,class);
- return XkbKeyboardErrorCode;
-}
-
-static int
-SendDeviceLedInfo( XkbSrvLedInfoPtr sli,
- ClientPtr client)
-{
-xkbDeviceLedsWireDesc wire;
-int length;
-
- length= 0;
- wire.ledClass= sli->class;
- wire.ledID= sli->id;
- wire.namesPresent= sli->namesPresent;
- wire.mapsPresent= sli->mapsPresent;
- wire.physIndicators= sli->physIndicators;
- wire.state= sli->effectiveState;
- if (client->swapped) {
- register int n;
- swaps(&wire.ledClass,n);
- swaps(&wire.ledID,n);
- swapl(&wire.namesPresent,n);
- swapl(&wire.mapsPresent,n);
- swapl(&wire.physIndicators,n);
- swapl(&wire.state,n);
- }
- WriteToClient(client,SIZEOF(xkbDeviceLedsWireDesc),(char *)&wire);
- length+= SIZEOF(xkbDeviceLedsWireDesc);
- if (sli->namesPresent|sli->mapsPresent) {
- register unsigned i,bit;
- if (sli->namesPresent) {
- CARD32 awire;
- for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
- if (sli->namesPresent&bit) {
- awire= (CARD32)sli->names[i];
- if (client->swapped) {
- register int n;
- swapl(&awire,n);
- }
- WriteToClient(client,4,(char *)&awire);
- length+= 4;
- }
- }
- }
- if (sli->mapsPresent) {
- for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
- xkbIndicatorMapWireDesc iwire;
- if (sli->mapsPresent&bit) {
- iwire.flags= sli->maps[i].flags;
- iwire.whichGroups= sli->maps[i].which_groups;
- iwire.groups= sli->maps[i].groups;
- iwire.whichMods= sli->maps[i].which_mods;
- iwire.mods= sli->maps[i].mods.mask;
- iwire.realMods= sli->maps[i].mods.real_mods;
- iwire.virtualMods= sli->maps[i].mods.vmods;
- iwire.ctrls= sli->maps[i].ctrls;
- if (client->swapped) {
- register int n;
- swaps(&iwire.virtualMods,n);
- swapl(&iwire.ctrls,n);
- }
- WriteToClient(client,SIZEOF(xkbIndicatorMapWireDesc),
- (char *)&iwire);
- length+= SIZEOF(xkbIndicatorMapWireDesc);
- }
- }
- }
- }
- return length;
-}
-
-static int
-SendDeviceLedFBs( DeviceIntPtr dev,
- int class,
- int id,
- unsigned wantLength,
- ClientPtr client)
-{
-int length= 0;
-
- if (class==XkbDfltXIClass) {
- if (dev->kbdfeed) class= KbdFeedbackClass;
- else if (dev->leds) class= LedFeedbackClass;
- }
- if ((dev->kbdfeed)&&
- ((class==KbdFeedbackClass)||(class==XkbAllXIClasses))) {
- KbdFeedbackPtr kf;
- for (kf= dev->kbdfeed;(kf);kf=kf->next) {
- if ((id==XkbAllXIIds)||(id==XkbDfltXIId)||(id==kf->ctrl.id)) {
- length+= SendDeviceLedInfo(kf->xkb_sli,client);
- if (id!=XkbAllXIIds)
- break;
- }
- }
- }
- if ((dev->leds)&&
- ((class==LedFeedbackClass)||(class==XkbAllXIClasses))) {
- LedFeedbackPtr lf;
- for (lf= dev->leds;(lf);lf=lf->next) {
- if ((id==XkbAllXIIds)||(id==XkbDfltXIId)||(id==lf->ctrl.id)) {
- length+= SendDeviceLedInfo(lf->xkb_sli,client);
- if (id!=XkbAllXIIds)
- break;
- }
- }
- }
- if (length==wantLength)
- return Success;
- else return BadLength;
-}
-
-int
-ProcXkbGetDeviceInfo(ClientPtr client)
-{
-DeviceIntPtr dev;
-xkbGetDeviceInfoReply rep;
-int status,nDeviceLedFBs;
-unsigned length,nameLen;
-CARD16 ledClass,ledID;
-unsigned wanted;
-char * str;
-
- REQUEST(xkbGetDeviceInfoReq);
- REQUEST_SIZE_MATCH(xkbGetDeviceInfoReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- wanted= stuff->wanted;
-
- CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
- CHK_MASK_LEGAL(0x01,wanted,XkbXI_AllDeviceFeaturesMask);
-
- if ((!dev->button)||((stuff->nBtns<1)&&(!stuff->allBtns)))
- wanted&= ~XkbXI_ButtonActionsMask;
- if ((!dev->kbdfeed)&&(!dev->leds))
- wanted&= ~XkbXI_IndicatorsMask;
-
- nameLen= XkbSizeCountedString(dev->name);
- memset((char *)&rep, 0, SIZEOF(xkbGetDeviceInfoReply));
- rep.type = X_Reply;
- rep.deviceID= dev->id;
- rep.sequenceNumber = client->sequence;
- rep.length = nameLen/4;
- rep.present = wanted;
- rep.supported = XkbXI_AllDeviceFeaturesMask;
- rep.unsupported = 0;
- rep.firstBtnWanted = rep.nBtnsWanted = 0;
- rep.firstBtnRtrn = rep.nBtnsRtrn = 0;
- if (dev->button)
- rep.totalBtns= dev->button->numButtons;
- else rep.totalBtns= 0;
- rep.devType= dev->xinput_type;
- rep.hasOwnState= (dev->key && dev->key->xkbInfo);
- rep.nDeviceLedFBs = 0;
- if (dev->kbdfeed) rep.dfltKbdFB= dev->kbdfeed->ctrl.id;
- else rep.dfltKbdFB= XkbXINone;
- if (dev->leds) rep.dfltLedFB= dev->leds->ctrl.id;
- else rep.dfltLedFB= XkbXINone;
-
- ledClass= stuff->ledClass;
- ledID= stuff->ledID;
-
- rep.firstBtnWanted= rep.nBtnsWanted= 0;
- rep.firstBtnRtrn= rep.nBtnsRtrn= 0;
- if (wanted&XkbXI_ButtonActionsMask) {
- if (stuff->allBtns) {
- stuff->firstBtn= 0;
- stuff->nBtns= dev->button->numButtons;
- }
-
- if ((stuff->firstBtn+stuff->nBtns)>dev->button->numButtons) {
- client->errorValue = _XkbErrCode4(0x02,dev->button->numButtons,
- stuff->firstBtn,
- stuff->nBtns);
- return BadValue;
- }
- else {
- rep.firstBtnWanted= stuff->firstBtn;
- rep.nBtnsWanted= stuff->nBtns;
- if (dev->button->xkb_acts!=NULL) {
- XkbAction *act;
- register int i;
-
- rep.firstBtnRtrn= stuff->firstBtn;
- rep.nBtnsRtrn= stuff->nBtns;
- act= &dev->button->xkb_acts[rep.firstBtnWanted];
- for (i=0;i<rep.nBtnsRtrn;i++,act++) {
- if (act->type!=XkbSA_NoAction)
- break;
- }
- rep.firstBtnRtrn+= i;
- rep.nBtnsRtrn-= i;
- act= &dev->button->xkb_acts[rep.firstBtnRtrn+rep.nBtnsRtrn-1];
- for (i=0;i<rep.nBtnsRtrn;i++,act--) {
- if (act->type!=XkbSA_NoAction)
- break;
- }
- rep.nBtnsRtrn-= i;
- }
- rep.length+= (rep.nBtnsRtrn*SIZEOF(xkbActionWireDesc))/4;
- }
- }
-
- if (wanted&XkbXI_IndicatorsMask) {
- status= CheckDeviceLedFBs(dev,ledClass,ledID,&rep,client);
- if (status!=Success)
- return status;
- }
- length= rep.length*4;
- nDeviceLedFBs = rep.nDeviceLedFBs;
- if (client->swapped) {
- register int n;
- swaps(&rep.sequenceNumber,n);
- swapl(&rep.length,n);
- swaps(&rep.present,n);
- swaps(&rep.supported,n);
- swaps(&rep.unsupported,n);
- swaps(&rep.nDeviceLedFBs,n);
- swapl(&rep.type,n);
- }
- WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), (char *)&rep);
-
- str= malloc(nameLen);
- if (!str)
- return BadAlloc;
- XkbWriteCountedString(str,dev->name,client->swapped);
- WriteToClient(client,nameLen,str);
- free(str);
- length-= nameLen;
-
- if (rep.nBtnsRtrn>0) {
- int sz;
- xkbActionWireDesc * awire;
- sz= rep.nBtnsRtrn*SIZEOF(xkbActionWireDesc);
- awire= (xkbActionWireDesc *)&dev->button->xkb_acts[rep.firstBtnRtrn];
- WriteToClient(client,sz,(char *)awire);
- length-= sz;
- }
- if (nDeviceLedFBs>0) {
- status= SendDeviceLedFBs(dev,ledClass,ledID,length,client);
- if (status!=Success)
- return status;
- }
- else if (length!=0) {
- ErrorF("[xkb] Internal Error! BadLength in ProcXkbGetDeviceInfo\n");
- ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length);
- return BadLength;
- }
- return Success;
-}
-
-static char *
-CheckSetDeviceIndicators( char * wire,
- DeviceIntPtr dev,
- int num,
- int * status_rtrn,
- ClientPtr client)
-{
-xkbDeviceLedsWireDesc * ledWire;
-int i;
-XkbSrvLedInfoPtr sli;
-
- ledWire= (xkbDeviceLedsWireDesc *)wire;
- for (i=0;i<num;i++) {
- if (client->swapped) {
- register int n;
- swaps(&ledWire->ledClass,n);
- swaps(&ledWire->ledID,n);
- swapl(&ledWire->namesPresent,n);
- swapl(&ledWire->mapsPresent,n);
- swapl(&ledWire->physIndicators,n);
- }
-
- sli= XkbFindSrvLedInfo(dev,ledWire->ledClass,ledWire->ledID,
- XkbXI_IndicatorsMask);
- if (sli!=NULL) {
- register int n;
- register unsigned bit;
- int nMaps,nNames;
- CARD32 *atomWire;
- xkbIndicatorMapWireDesc *mapWire;
-
- nMaps= nNames= 0;
- for (n=0,bit=1;n<XkbNumIndicators;n++,bit<<=1) {
- if (ledWire->namesPresent&bit)
- nNames++;
- if (ledWire->mapsPresent&bit)
- nMaps++;
- }
- atomWire= (CARD32 *)&ledWire[1];
- if (nNames>0) {
- for (n=0;n<nNames;n++) {
- if (client->swapped) {
- register int t;
- swapl(atomWire,t);
- }
- CHK_ATOM_OR_NONE3(((Atom)(*atomWire)),client->errorValue,
- *status_rtrn,NULL);
- atomWire++;
- }
- }
- mapWire= (xkbIndicatorMapWireDesc *)atomWire;
- if (nMaps>0) {
- for (n=0;n<nMaps;n++) {
- if (client->swapped) {
- register int t;
- swaps(&mapWire->virtualMods,t);
- swapl(&mapWire->ctrls,t);
- }
- CHK_MASK_LEGAL3(0x21,mapWire->whichGroups,
- XkbIM_UseAnyGroup,
- client->errorValue,
- *status_rtrn,NULL);
- CHK_MASK_LEGAL3(0x22,mapWire->whichMods,XkbIM_UseAnyMods,
- client->errorValue,
- *status_rtrn,NULL);
- mapWire++;
- }
- }
- ledWire= (xkbDeviceLedsWireDesc *)mapWire;
- }
- else {
- /* SHOULD NEVER HAPPEN */
- return (char *)ledWire;
- }
- }
- return (char *)ledWire;
-}
-
-static char *
-SetDeviceIndicators( char * wire,
- DeviceIntPtr dev,
- unsigned changed,
- int num,
- int * status_rtrn,
- ClientPtr client,
- xkbExtensionDeviceNotify *ev)
-{
-xkbDeviceLedsWireDesc * ledWire;
-int i;
-XkbEventCauseRec cause;
-unsigned namec,mapc,statec;
-xkbExtensionDeviceNotify ed;
-XkbChangesRec changes;
-DeviceIntPtr kbd;
-
- memset((char *)&ed, 0, sizeof(xkbExtensionDeviceNotify));
- memset((char *)&changes, 0, sizeof(XkbChangesRec));
- XkbSetCauseXkbReq(&cause,X_kbSetDeviceInfo,client);
- ledWire= (xkbDeviceLedsWireDesc *)wire;
- for (i=0;i<num;i++) {
- register int n;
- register unsigned bit;
- CARD32 * atomWire;
- xkbIndicatorMapWireDesc * mapWire;
- XkbSrvLedInfoPtr sli;
-
- namec= mapc= statec= 0;
- sli= XkbFindSrvLedInfo(dev,ledWire->ledClass,ledWire->ledID,
- XkbXI_IndicatorMapsMask);
- if (!sli) {
- /* SHOULD NEVER HAPPEN!! */
- return (char *)ledWire;
- }
-
- atomWire= (CARD32 *)&ledWire[1];
- if (changed&XkbXI_IndicatorNamesMask) {
- namec= sli->namesPresent|ledWire->namesPresent;
- memset((char *)sli->names, 0, XkbNumIndicators*sizeof(Atom));
- }
- if (ledWire->namesPresent) {
- sli->namesPresent= ledWire->namesPresent;
- memset((char *)sli->names, 0, XkbNumIndicators*sizeof(Atom));
- for (n=0,bit=1;n<XkbNumIndicators;n++,bit<<=1) {
- if (ledWire->namesPresent&bit) {
- sli->names[n]= (Atom)*atomWire;
- if (sli->names[n]==None)
- ledWire->namesPresent&= ~bit;
- atomWire++;
- }
- }
- }
- mapWire= (xkbIndicatorMapWireDesc *)atomWire;
- if (changed&XkbXI_IndicatorMapsMask) {
- mapc= sli->mapsPresent|ledWire->mapsPresent;
- sli->mapsPresent= ledWire->mapsPresent;
- memset((char*)sli->maps, 0, XkbNumIndicators*sizeof(XkbIndicatorMapRec));
- }
- if (ledWire->mapsPresent) {
- for (n=0,bit=1;n<XkbNumIndicators;n++,bit<<=1) {
- if (ledWire->mapsPresent&bit) {
- sli->maps[n].flags= mapWire->flags;
- sli->maps[n].which_groups= mapWire->whichGroups;
- sli->maps[n].groups= mapWire->groups;
- sli->maps[n].which_mods= mapWire->whichMods;
- sli->maps[n].mods.mask= mapWire->mods;
- sli->maps[n].mods.real_mods=mapWire->realMods;
- sli->maps[n].mods.vmods= mapWire->virtualMods;
- sli->maps[n].ctrls= mapWire->ctrls;
- mapWire++;
- }
- }
- }
- if (changed&XkbXI_IndicatorStateMask) {
- statec= sli->effectiveState^ledWire->state;
- sli->explicitState&= ~statec;
- sli->explicitState|= (ledWire->state&statec);
- }
- if (namec)
- XkbApplyLedNameChanges(dev,sli,namec,&ed,&changes,&cause);
- if (mapc)
- XkbApplyLedMapChanges(dev,sli,mapc,&ed,&changes,&cause);
- if (statec)
- XkbApplyLedStateChanges(dev,sli,statec,&ed,&changes,&cause);
-
- kbd= dev;
- if ((sli->flags&XkbSLI_HasOwnState)==0)
- kbd = inputInfo.keyboard;
-
- XkbFlushLedEvents(dev,kbd,sli,&ed,&changes,&cause);
- ledWire= (xkbDeviceLedsWireDesc *)mapWire;
- }
- return (char *)ledWire;
-}
-
-
-static int
-_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev,
- xkbSetDeviceInfoReq *stuff)
-{
- char *wire;
-
- wire= (char *)&stuff[1];
- if (stuff->change&XkbXI_ButtonActionsMask) {
- if (!dev->button) {
- client->errorValue = _XkbErrCode2(XkbErr_BadClass,ButtonClass);
- return XkbKeyboardErrorCode;
- }
- if ((stuff->firstBtn+stuff->nBtns)>dev->button->numButtons) {
- client->errorValue= _XkbErrCode4(0x02,stuff->firstBtn,stuff->nBtns,
- dev->button->numButtons);
- return BadMatch;
- }
- wire+= (stuff->nBtns*SIZEOF(xkbActionWireDesc));
- }
- if (stuff->change&XkbXI_IndicatorsMask) {
- int status= Success;
- wire= CheckSetDeviceIndicators(wire,dev,stuff->nDeviceLedFBs,
- &status,client);
- if (status!=Success)
- return status;
- }
- if (((wire-((char *)stuff))/4)!=stuff->length)
- return BadLength;
-
- return Success;
-}
-
-static int
-_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev,
- xkbSetDeviceInfoReq *stuff)
-{
- char *wire;
- xkbExtensionDeviceNotify ed;
-
- memset((char *)&ed, 0, SIZEOF(xkbExtensionDeviceNotify));
- ed.deviceID= dev->id;
- wire= (char *)&stuff[1];
- if (stuff->change&XkbXI_ButtonActionsMask) {
- int nBtns,sz,i;
- XkbAction * acts;
- DeviceIntPtr kbd;
-
- nBtns= dev->button->numButtons;
- acts= dev->button->xkb_acts;
- if (acts==NULL) {
- acts= calloc(nBtns, sizeof(XkbAction));
- if (!acts)
- return BadAlloc;
- dev->button->xkb_acts= acts;
- }
- sz= stuff->nBtns*SIZEOF(xkbActionWireDesc);
- memcpy((char *)&acts[stuff->firstBtn],(char *)wire,sz);
- wire+= sz;
- ed.reason|= XkbXI_ButtonActionsMask;
- ed.firstBtn= stuff->firstBtn;
- ed.nBtns= stuff->nBtns;
-
- if (dev->key) kbd= dev;
- else kbd= inputInfo.keyboard;
- acts= &dev->button->xkb_acts[stuff->firstBtn];
- for (i=0;i<stuff->nBtns;i++,acts++) {
- if (acts->type!=XkbSA_NoAction)
- XkbSetActionKeyMods(kbd->key->xkbInfo->desc,acts,0);
- }
- }
- if (stuff->change&XkbXI_IndicatorsMask) {
- int status= Success;
- wire= SetDeviceIndicators(wire,dev,stuff->change,
- stuff->nDeviceLedFBs, &status,client,&ed);
- if (status!=Success)
- return status;
- }
- if ((stuff->change)&&(ed.reason))
- XkbSendExtensionDeviceNotify(dev,client,&ed);
- return Success;
-}
-
-int
-ProcXkbSetDeviceInfo(ClientPtr client)
-{
- DeviceIntPtr dev;
- int rc;
-
- REQUEST(xkbSetDeviceInfoReq);
- REQUEST_AT_LEAST_SIZE(xkbSetDeviceInfoReq);
-
- if (!(client->xkbClientFlags&_XkbClientInitialized))
- return BadAccess;
-
- CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
- CHK_MASK_LEGAL(0x01,stuff->change,XkbXI_AllFeaturesMask);
-
- rc = _XkbSetDeviceInfoCheck(client, dev, stuff);
-
- if (rc != Success)
- return rc;
-
- if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if (((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) &&
- ((stuff->deviceSpec == XkbUseCoreKbd && other->key) ||
- (stuff->deviceSpec == XkbUseCorePtr && other->button)))
- {
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
- if (rc == Success)
- {
- rc = _XkbSetDeviceInfoCheck(client, other, stuff);
- if (rc != Success)
- return rc;
- }
- }
- }
- }
-
- /* checks done, apply */
- rc = _XkbSetDeviceInfo(client, dev, stuff);
- if (rc != Success)
- return rc;
-
- if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr)
- {
- DeviceIntPtr other;
- for (other = inputInfo.devices; other; other = other->next)
- {
- if (((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) &&
- ((stuff->deviceSpec == XkbUseCoreKbd && other->key) ||
- (stuff->deviceSpec == XkbUseCorePtr && other->button)))
- {
- rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
- if (rc == Success)
- {
- rc = _XkbSetDeviceInfo(client, other, stuff);
- if (rc != Success)
- return rc;
- }
- }
- }
- }
-
- return Success;
-}
-
-/***====================================================================***/
-
-int
-ProcXkbSetDebuggingFlags(ClientPtr client)
-{
-CARD32 newFlags,newCtrls,extraLength;
-xkbSetDebuggingFlagsReply rep;
-int rc;
-
- REQUEST(xkbSetDebuggingFlagsReq);
- REQUEST_AT_LEAST_SIZE(xkbSetDebuggingFlagsReq);
-
- rc = XaceHook(XACE_SERVER_ACCESS, client, DixDebugAccess);
- if (rc != Success)
- return rc;
-
- newFlags= xkbDebugFlags&(~stuff->affectFlags);
- newFlags|= (stuff->flags&stuff->affectFlags);
- newCtrls= xkbDebugCtrls&(~stuff->affectCtrls);
- newCtrls|= (stuff->ctrls&stuff->affectCtrls);
- if (xkbDebugFlags || newFlags || stuff->msgLength) {
- ErrorF("[xkb] XkbDebug: Setting debug flags to 0x%lx\n",(long)newFlags);
- if (newCtrls!=xkbDebugCtrls)
- ErrorF("[xkb] XkbDebug: Setting debug controls to 0x%lx\n",(long)newCtrls);
- }
- extraLength= (stuff->length<<2)-sz_xkbSetDebuggingFlagsReq;
- if (stuff->msgLength>0) {
- char *msg;
- if (extraLength<XkbPaddedSize(stuff->msgLength)) {
- ErrorF("[xkb] XkbDebug: msgLength= %d, length= %ld (should be %d)\n",
- stuff->msgLength,(long)extraLength,
- XkbPaddedSize(stuff->msgLength));
- return BadLength;
- }
- msg= (char *)&stuff[1];
- if (msg[stuff->msgLength-1]!='\0') {
- ErrorF("[xkb] XkbDebug: message not null-terminated\n");
- return BadValue;
- }
- ErrorF("[xkb] XkbDebug: %s\n",msg);
- }
- xkbDebugFlags = newFlags;
- xkbDebugCtrls = newCtrls;
-
- rep.type= X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.currentFlags = newFlags;
- rep.currentCtrls = newCtrls;
- rep.supportedFlags = ~0;
- rep.supportedCtrls = ~0;
- if ( client->swapped ) {
- register int n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.currentFlags, n);
- swapl(&rep.currentCtrls, n);
- swapl(&rep.supportedFlags, n);
- swapl(&rep.supportedCtrls, n);
- }
- WriteToClient(client,SIZEOF(xkbSetDebuggingFlagsReply), (char *)&rep);
- return Success;
-}
-
-/***====================================================================***/
-
-static int
-ProcXkbDispatch (ClientPtr client)
-{
- REQUEST(xReq);
- switch (stuff->data)
- {
- case X_kbUseExtension:
- return ProcXkbUseExtension(client);
- case X_kbSelectEvents:
- return ProcXkbSelectEvents(client);
- case X_kbBell:
- return ProcXkbBell(client);
- case X_kbGetState:
- return ProcXkbGetState(client);
- case X_kbLatchLockState:
- return ProcXkbLatchLockState(client);
- case X_kbGetControls:
- return ProcXkbGetControls(client);
- case X_kbSetControls:
- return ProcXkbSetControls(client);
- case X_kbGetMap:
- return ProcXkbGetMap(client);
- case X_kbSetMap:
- return ProcXkbSetMap(client);
- case X_kbGetCompatMap:
- return ProcXkbGetCompatMap(client);
- case X_kbSetCompatMap:
- return ProcXkbSetCompatMap(client);
- case X_kbGetIndicatorState:
- return ProcXkbGetIndicatorState(client);
- case X_kbGetIndicatorMap:
- return ProcXkbGetIndicatorMap(client);
- case X_kbSetIndicatorMap:
- return ProcXkbSetIndicatorMap(client);
- case X_kbGetNamedIndicator:
- return ProcXkbGetNamedIndicator(client);
- case X_kbSetNamedIndicator:
- return ProcXkbSetNamedIndicator(client);
- case X_kbGetNames:
- return ProcXkbGetNames(client);
- case X_kbSetNames:
- return ProcXkbSetNames(client);
- case X_kbGetGeometry:
- return ProcXkbGetGeometry(client);
- case X_kbSetGeometry:
- return ProcXkbSetGeometry(client);
- case X_kbPerClientFlags:
- return ProcXkbPerClientFlags(client);
- case X_kbListComponents:
- return ProcXkbListComponents(client);
- case X_kbGetKbdByName:
- return ProcXkbGetKbdByName(client);
- case X_kbGetDeviceInfo:
- return ProcXkbGetDeviceInfo(client);
- case X_kbSetDeviceInfo:
- return ProcXkbSetDeviceInfo(client);
- case X_kbSetDebuggingFlags:
- return ProcXkbSetDebuggingFlags(client);
- default:
- return BadRequest;
- }
-}
-
-static int
-XkbClientGone(pointer data,XID id)
-{
- DevicePtr pXDev = (DevicePtr)data;
-
- if (!XkbRemoveResourceClient(pXDev,id)) {
- ErrorF("[xkb] Internal Error! bad RemoveResourceClient in XkbClientGone\n");
- }
- return 1;
-}
-
-void
-XkbExtensionInit(void)
-{
- ExtensionEntry *extEntry;
-
- RT_XKBCLIENT = CreateNewResourceType(XkbClientGone, "XkbClient");
- if (!RT_XKBCLIENT)
- return;
-
- if (!XkbInitPrivates())
- return;
-
- if ((extEntry = AddExtension(XkbName, XkbNumberEvents, XkbNumberErrors,
- ProcXkbDispatch, SProcXkbDispatch,
- NULL, StandardMinorOpcode))) {
- XkbReqCode = (unsigned char)extEntry->base;
- XkbEventBase = (unsigned char)extEntry->eventBase;
- XkbErrorBase = (unsigned char)extEntry->errorBase;
- XkbKeyboardErrorCode = XkbErrorBase+XkbKeyboard;
- }
- return;
-}
-
-
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdio.h>
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "inputstr.h"
+#define XKBSRV_NEED_FILE_FUNCS
+#include <xkbsrv.h>
+#include "extnsionst.h"
+#include "xace.h"
+#include "xkb.h"
+#include "protocol-versions.h"
+
+#include <X11/extensions/XI.h>
+#include <X11/extensions/XKMformat.h>
+
+int XkbEventBase;
+static int XkbErrorBase;
+int XkbReqCode;
+int XkbKeyboardErrorCode;
+CARD32 xkbDebugFlags = 0;
+static CARD32 xkbDebugCtrls = 0;
+
+static RESTYPE RT_XKBCLIENT;
+
+/***====================================================================***/
+
+#define CHK_DEVICE(dev, id, client, access_mode, lf) {\
+ int why;\
+ int rc = lf(&(dev), id, client, access_mode, &why);\
+ if (rc != Success) {\
+ client->errorValue = _XkbErrCode2(why, id);\
+ return rc;\
+ }\
+}
+
+#define CHK_KBD_DEVICE(dev, id, client, mode) \
+ CHK_DEVICE(dev, id, client, mode, _XkbLookupKeyboard)
+#define CHK_LED_DEVICE(dev, id, client, mode) \
+ CHK_DEVICE(dev, id, client, mode, _XkbLookupLedDevice)
+#define CHK_BELL_DEVICE(dev, id, client, mode) \
+ CHK_DEVICE(dev, id, client, mode, _XkbLookupBellDevice)
+#define CHK_ANY_DEVICE(dev, id, client, mode) \
+ CHK_DEVICE(dev, id, client, mode, _XkbLookupAnyDevice)
+
+#define CHK_ATOM_ONLY2(a,ev,er) {\
+ if (((a)==None)||(!ValidAtom((a)))) {\
+ (ev)= (XID)(a);\
+ return er;\
+ }\
+}
+#define CHK_ATOM_ONLY(a) \
+ CHK_ATOM_ONLY2(a,client->errorValue,BadAtom)
+
+#define CHK_ATOM_OR_NONE3(a,ev,er,ret) {\
+ if (((a)!=None)&&(!ValidAtom((a)))) {\
+ (ev)= (XID)(a);\
+ (er)= BadAtom;\
+ return ret;\
+ }\
+}
+#define CHK_ATOM_OR_NONE2(a,ev,er) {\
+ if (((a)!=None)&&(!ValidAtom((a)))) {\
+ (ev)= (XID)(a);\
+ return er;\
+ }\
+}
+#define CHK_ATOM_OR_NONE(a) \
+ CHK_ATOM_OR_NONE2(a,client->errorValue,BadAtom)
+
+#define CHK_MASK_LEGAL3(err,mask,legal,ev,er,ret) {\
+ if ((mask)&(~(legal))) { \
+ (ev)= _XkbErrCode2((err),((mask)&(~(legal))));\
+ (er)= BadValue;\
+ return ret;\
+ }\
+}
+#define CHK_MASK_LEGAL2(err,mask,legal,ev,er) {\
+ if ((mask)&(~(legal))) { \
+ (ev)= _XkbErrCode2((err),((mask)&(~(legal))));\
+ return er;\
+ }\
+}
+#define CHK_MASK_LEGAL(err,mask,legal) \
+ CHK_MASK_LEGAL2(err,mask,legal,client->errorValue,BadValue)
+
+#define CHK_MASK_MATCH(err,affect,value) {\
+ if ((value)&(~(affect))) { \
+ client->errorValue= _XkbErrCode2((err),((value)&(~(affect))));\
+ return BadMatch;\
+ }\
+}
+#define CHK_MASK_OVERLAP(err,m1,m2) {\
+ if ((m1)&(m2)) { \
+ client->errorValue= _XkbErrCode2((err),((m1)&(m2)));\
+ return BadMatch;\
+ }\
+}
+#define CHK_KEY_RANGE2(err,first,num,x,ev,er) {\
+ if (((unsigned)(first)+(num)-1)>(x)->max_key_code) {\
+ (ev)=_XkbErrCode4(err,(first),(num),(x)->max_key_code);\
+ return er;\
+ }\
+ else if ( (first)<(x)->min_key_code ) {\
+ (ev)=_XkbErrCode3(err+1,(first),xkb->min_key_code);\
+ return er;\
+ }\
+}
+#define CHK_KEY_RANGE(err,first,num,x) \
+ CHK_KEY_RANGE2(err,first,num,x,client->errorValue,BadValue)
+
+#define CHK_REQ_KEY_RANGE2(err,first,num,r,ev,er) {\
+ if (((unsigned)(first)+(num)-1)>(r)->maxKeyCode) {\
+ (ev)=_XkbErrCode4(err,(first),(num),(r)->maxKeyCode);\
+ return er;\
+ }\
+ else if ( (first)<(r)->minKeyCode ) {\
+ (ev)=_XkbErrCode3(err+1,(first),(r)->minKeyCode);\
+ return er;\
+ }\
+}
+#define CHK_REQ_KEY_RANGE(err,first,num,r) \
+ CHK_REQ_KEY_RANGE2(err,first,num,r,client->errorValue,BadValue)
+
+/***====================================================================***/
+
+int
+ProcXkbUseExtension(ClientPtr client)
+{
+ REQUEST(xkbUseExtensionReq);
+ xkbUseExtensionReply rep;
+ register int n;
+ int supported;
+
+ REQUEST_SIZE_MATCH(xkbUseExtensionReq);
+ if (stuff->wantedMajor != SERVER_XKB_MAJOR_VERSION) {
+ /* pre-release version 0.65 is compatible with 1.00 */
+ supported= ((SERVER_XKB_MAJOR_VERSION==1)&&
+ (stuff->wantedMajor==0)&&(stuff->wantedMinor==65));
+ }
+ else supported = 1;
+
+ if ((supported) && (!(client->xkbClientFlags&_XkbClientInitialized))) {
+ client->xkbClientFlags= _XkbClientInitialized;
+ client->vMajor= stuff->wantedMajor;
+ client->vMinor= stuff->wantedMinor;
+ }
+ else if (xkbDebugFlags&0x1) {
+ ErrorF("[xkb] Rejecting client %d (0x%lx) (wants %d.%02d, have %d.%02d)\n",
+ client->index,
+ (long)client->clientAsMask,
+ stuff->wantedMajor,stuff->wantedMinor,
+ SERVER_XKB_MAJOR_VERSION,SERVER_XKB_MINOR_VERSION);
+ }
+ memset(&rep, 0, sizeof(xkbUseExtensionReply));
+ rep.type = X_Reply;
+ rep.supported = supported;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.serverMajor = SERVER_XKB_MAJOR_VERSION;
+ rep.serverMinor = SERVER_XKB_MINOR_VERSION;
+ if ( client->swapped ) {
+ swaps(&rep.sequenceNumber, n);
+ swaps(&rep.serverMajor, n);
+ swaps(&rep.serverMinor, n);
+ }
+ WriteToClient(client,SIZEOF(xkbUseExtensionReply), (char *)&rep);
+ return Success;
+}
+
+/***====================================================================***/
+
+int
+ProcXkbSelectEvents(ClientPtr client)
+{
+ unsigned legal;
+ DeviceIntPtr dev;
+ XkbInterestPtr masks;
+ REQUEST(xkbSelectEventsReq);
+
+ REQUEST_AT_LEAST_SIZE(xkbSelectEventsReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixUseAccess);
+
+ if (((stuff->affectWhich&XkbMapNotifyMask)!=0)&&(stuff->affectMap)) {
+ client->mapNotifyMask&= ~stuff->affectMap;
+ client->mapNotifyMask|= (stuff->affectMap&stuff->map);
+ }
+ if ((stuff->affectWhich&(~XkbMapNotifyMask))==0)
+ return Success;
+
+ masks = XkbFindClientResource((DevicePtr)dev,client);
+ if (!masks){
+ XID id = FakeClientID(client->index);
+ if (!AddResource(id,RT_XKBCLIENT,dev))
+ return BadAlloc;
+ masks= XkbAddClientResource((DevicePtr)dev,client,id);
+ }
+ if (masks) {
+ union {
+ CARD8 *c8;
+ CARD16 *c16;
+ CARD32 *c32;
+ } from,to;
+ register unsigned bit,ndx,maskLeft,dataLeft,size;
+
+ from.c8= (CARD8 *)&stuff[1];
+ dataLeft= (stuff->length*4)-SIZEOF(xkbSelectEventsReq);
+ maskLeft= (stuff->affectWhich&(~XkbMapNotifyMask));
+ for (ndx=0,bit=1; (maskLeft!=0); ndx++, bit<<=1) {
+ if ((bit&maskLeft)==0)
+ continue;
+ maskLeft&= ~bit;
+ switch (ndx) {
+ case XkbNewKeyboardNotify:
+ to.c16= &client->newKeyboardNotifyMask;
+ legal= XkbAllNewKeyboardEventsMask;
+ size= 2;
+ break;
+ case XkbStateNotify:
+ to.c16= &masks->stateNotifyMask;
+ legal= XkbAllStateEventsMask;
+ size= 2;
+ break;
+ case XkbControlsNotify:
+ to.c32= &masks->ctrlsNotifyMask;
+ legal= XkbAllControlEventsMask;
+ size= 4;
+ break;
+ case XkbIndicatorStateNotify:
+ to.c32= &masks->iStateNotifyMask;
+ legal= XkbAllIndicatorEventsMask;
+ size= 4;
+ break;
+ case XkbIndicatorMapNotify:
+ to.c32= &masks->iMapNotifyMask;
+ legal= XkbAllIndicatorEventsMask;
+ size= 4;
+ break;
+ case XkbNamesNotify:
+ to.c16= &masks->namesNotifyMask;
+ legal= XkbAllNameEventsMask;
+ size= 2;
+ break;
+ case XkbCompatMapNotify:
+ to.c8= &masks->compatNotifyMask;
+ legal= XkbAllCompatMapEventsMask;
+ size= 1;
+ break;
+ case XkbBellNotify:
+ to.c8= &masks->bellNotifyMask;
+ legal= XkbAllBellEventsMask;
+ size= 1;
+ break;
+ case XkbActionMessage:
+ to.c8= &masks->actionMessageMask;
+ legal= XkbAllActionMessagesMask;
+ size= 1;
+ break;
+ case XkbAccessXNotify:
+ to.c16= &masks->accessXNotifyMask;
+ legal= XkbAllAccessXEventsMask;
+ size= 2;
+ break;
+ case XkbExtensionDeviceNotify:
+ to.c16= &masks->extDevNotifyMask;
+ legal= XkbAllExtensionDeviceEventsMask;
+ size= 2;
+ break;
+ default:
+ client->errorValue = _XkbErrCode2(33,bit);
+ return BadValue;
+ }
+
+ if (stuff->clear&bit) {
+ if (size==2) to.c16[0]= 0;
+ else if (size==4) to.c32[0]= 0;
+ else to.c8[0]= 0;
+ }
+ else if (stuff->selectAll&bit) {
+ if (size==2) to.c16[0]= ~0;
+ else if (size==4) to.c32[0]= ~0;
+ else to.c8[0]= ~0;
+ }
+ else {
+ if (dataLeft<(size*2))
+ return BadLength;
+ if (size==2) {
+ CHK_MASK_MATCH(ndx,from.c16[0],from.c16[1]);
+ CHK_MASK_LEGAL(ndx,from.c16[0],legal);
+ to.c16[0]&= ~from.c16[0];
+ to.c16[0]|= (from.c16[0]&from.c16[1]);
+ }
+ else if (size==4) {
+ CHK_MASK_MATCH(ndx,from.c32[0],from.c32[1]);
+ CHK_MASK_LEGAL(ndx,from.c32[0],legal);
+ to.c32[0]&= ~from.c32[0];
+ to.c32[0]|= (from.c32[0]&from.c32[1]);
+ }
+ else {
+ CHK_MASK_MATCH(ndx,from.c8[0],from.c8[1]);
+ CHK_MASK_LEGAL(ndx,from.c8[0],legal);
+ to.c8[0]&= ~from.c8[0];
+ to.c8[0]|= (from.c8[0]&from.c8[1]);
+ size= 2;
+ }
+ from.c8+= (size*2);
+ dataLeft-= (size*2);
+ }
+ }
+ if (dataLeft>2) {
+ ErrorF("[xkb] Extra data (%d bytes) after SelectEvents\n",dataLeft);
+ return BadLength;
+ }
+ return Success;
+ }
+ return BadAlloc;
+}
+
+/***====================================================================***/
+/**
+ * Ring a bell on the given device for the given client.
+ */
+static int
+_XkbBell(ClientPtr client, DeviceIntPtr dev, WindowPtr pWin,
+ int bellClass, int bellID, int pitch, int duration,
+ int percent, int forceSound, int eventOnly, Atom name)
+{
+ int base;
+ pointer ctrl;
+ int oldPitch, oldDuration;
+ int newPercent;
+
+ if (bellClass == KbdFeedbackClass) {
+ KbdFeedbackPtr k;
+ if (bellID==XkbDfltXIId)
+ k= dev->kbdfeed;
+ else {
+ for (k=dev->kbdfeed; k; k=k->next) {
+ if (k->ctrl.id == bellID)
+ break;
+ }
+ }
+ if (!k) {
+ client->errorValue = _XkbErrCode2(0x5,bellID);
+ return BadValue;
+ }
+ base = k->ctrl.bell;
+ ctrl = (pointer) &(k->ctrl);
+ oldPitch= k->ctrl.bell_pitch;
+ oldDuration= k->ctrl.bell_duration;
+ if (pitch!=0) {
+ if (pitch==-1)
+ k->ctrl.bell_pitch= defaultKeyboardControl.bell_pitch;
+ else k->ctrl.bell_pitch= pitch;
+ }
+ if (duration!=0) {
+ if (duration==-1)
+ k->ctrl.bell_duration= defaultKeyboardControl.bell_duration;
+ else k->ctrl.bell_duration= duration;
+ }
+ }
+ else if (bellClass == BellFeedbackClass) {
+ BellFeedbackPtr b;
+ if (bellID==XkbDfltXIId)
+ b= dev->bell;
+ else {
+ for (b=dev->bell; b; b=b->next) {
+ if (b->ctrl.id == bellID)
+ break;
+ }
+ }
+ if (!b) {
+ client->errorValue = _XkbErrCode2(0x6,bellID);
+ return BadValue;
+ }
+ base = b->ctrl.percent;
+ ctrl = (pointer) &(b->ctrl);
+ oldPitch= b->ctrl.pitch;
+ oldDuration= b->ctrl.duration;
+ if (pitch!=0) {
+ if (pitch==-1)
+ b->ctrl.pitch= defaultKeyboardControl.bell_pitch;
+ else b->ctrl.pitch= pitch;
+ }
+ if (duration!=0) {
+ if (duration==-1)
+ b->ctrl.duration= defaultKeyboardControl.bell_duration;
+ else b->ctrl.duration= duration;
+ }
+ }
+ else {
+ client->errorValue = _XkbErrCode2(0x7, bellClass);
+ return BadValue;
+ }
+
+ newPercent = (base * percent)/100;
+ if (percent < 0)
+ newPercent = base + newPercent;
+ else newPercent = base - newPercent + percent;
+
+ XkbHandleBell(forceSound, eventOnly,
+ dev, newPercent, ctrl, bellClass,
+ name, pWin, client);
+ if ((pitch!=0)||(duration!=0)) {
+ if (bellClass == KbdFeedbackClass) {
+ KbdFeedbackPtr k;
+ k= (KbdFeedbackPtr)ctrl;
+ if (pitch!=0)
+ k->ctrl.bell_pitch= oldPitch;
+ if (duration!=0)
+ k->ctrl.bell_duration= oldDuration;
+ }
+ else {
+ BellFeedbackPtr b;
+ b= (BellFeedbackPtr)ctrl;
+ if (pitch!=0)
+ b->ctrl.pitch= oldPitch;
+ if (duration!=0)
+ b->ctrl.duration= oldDuration;
+ }
+ }
+
+ return Success;
+}
+
+int
+ProcXkbBell(ClientPtr client)
+{
+ REQUEST(xkbBellReq);
+ DeviceIntPtr dev;
+ WindowPtr pWin;
+ int rc;
+
+ REQUEST_SIZE_MATCH(xkbBellReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_BELL_DEVICE(dev, stuff->deviceSpec, client, DixBellAccess);
+ CHK_ATOM_OR_NONE(stuff->name);
+
+ /* device-independent checks request for sane values */
+ if ((stuff->forceSound)&&(stuff->eventOnly)) {
+ client->errorValue=_XkbErrCode3(0x1,stuff->forceSound,stuff->eventOnly);
+ return BadMatch;
+ }
+ if (stuff->percent < -100 || stuff->percent > 100) {
+ client->errorValue = _XkbErrCode2(0x2,stuff->percent);
+ return BadValue;
+ }
+ if (stuff->duration<-1) {
+ client->errorValue = _XkbErrCode2(0x3,stuff->duration);
+ return BadValue;
+ }
+ if (stuff->pitch<-1) {
+ client->errorValue = _XkbErrCode2(0x4,stuff->pitch);
+ return BadValue;
+ }
+
+ if (stuff->bellClass == XkbDfltXIClass) {
+ if (dev->kbdfeed!=NULL)
+ stuff->bellClass= KbdFeedbackClass;
+ else stuff->bellClass= BellFeedbackClass;
+ }
+
+ if (stuff->window!=None) {
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (rc != Success) {
+ client->errorValue= stuff->window;
+ return rc;
+ }
+ }
+ else pWin= NULL;
+
+ /* Client wants to ring a bell on the core keyboard?
+ Ring the bell on the core keyboard (which does nothing, but if that
+ fails the client is screwed anyway), and then on all extension devices.
+ Fail if the core keyboard fails but not the extension devices. this
+ may cause some keyboards to ding and others to stay silent. Fix
+ your client to use explicit keyboards to avoid this.
+
+ dev is the device the client requested.
+ */
+ rc = _XkbBell(client, dev, pWin, stuff->bellClass, stuff->bellID,
+ stuff->pitch, stuff->duration, stuff->percent,
+ stuff->forceSound, stuff->eventOnly, stuff->name);
+
+ if ((rc == Success) && ((stuff->deviceSpec == XkbUseCoreKbd) ||
+ (stuff->deviceSpec == XkbUseCorePtr)))
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
+ {
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixBellAccess);
+ if (rc == Success)
+ _XkbBell(client, other, pWin, stuff->bellClass,
+ stuff->bellID, stuff->pitch, stuff->duration,
+ stuff->percent, stuff->forceSound,
+ stuff->eventOnly, stuff->name);
+ }
+ }
+ rc = Success; /* reset to success, that's what we got for the VCK */
+ }
+
+ return rc;
+}
+
+/***====================================================================***/
+
+int
+ProcXkbGetState(ClientPtr client)
+{
+ REQUEST(xkbGetStateReq);
+ DeviceIntPtr dev;
+ xkbGetStateReply rep;
+ XkbStateRec *xkb;
+
+ REQUEST_SIZE_MATCH(xkbGetStateReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
+
+ xkb= &dev->key->xkbInfo->state;
+ memset(&rep, 0, sizeof(xkbGetStateReply));
+ rep.type= X_Reply;
+ rep.sequenceNumber= client->sequence;
+ rep.length = 0;
+ rep.deviceID = dev->id;
+ rep.mods = XkbStateFieldFromRec(xkb) & 0xff;
+ rep.baseMods = xkb->base_mods;
+ rep.lockedMods = xkb->locked_mods;
+ rep.latchedMods = xkb->latched_mods;
+ rep.group = xkb->group;
+ rep.baseGroup = xkb->base_group;
+ rep.latchedGroup = xkb->latched_group;
+ rep.lockedGroup = xkb->locked_group;
+ rep.compatState = xkb->compat_state;
+ rep.ptrBtnState = xkb->ptr_buttons;
+ if (client->swapped) {
+ register int n;
+ swaps(&rep.sequenceNumber,n);
+ swaps(&rep.ptrBtnState,n);
+ }
+ WriteToClient(client, SIZEOF(xkbGetStateReply), (char *)&rep);
+ return Success;
+}
+
+/***====================================================================***/
+
+int
+ProcXkbLatchLockState(ClientPtr client)
+{
+ int status;
+ DeviceIntPtr dev, tmpd;
+ XkbStateRec oldState,*newState;
+ CARD16 changed;
+ xkbStateNotify sn;
+ XkbEventCauseRec cause;
+
+ REQUEST(xkbLatchLockStateReq);
+ REQUEST_SIZE_MATCH(xkbLatchLockStateReq);
+
+ if (!(client->xkbClientFlags & _XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
+ CHK_MASK_MATCH(0x01, stuff->affectModLocks, stuff->modLocks);
+ CHK_MASK_MATCH(0x01, stuff->affectModLatches, stuff->modLatches);
+
+ status = Success;
+
+ for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
+ if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) {
+ if (!tmpd->key || !tmpd->key->xkbInfo)
+ continue;
+
+ oldState = tmpd->key->xkbInfo->state;
+ newState = &tmpd->key->xkbInfo->state;
+ if (stuff->affectModLocks) {
+ newState->locked_mods &= ~stuff->affectModLocks;
+ newState->locked_mods |= (stuff->affectModLocks & stuff->modLocks);
+ }
+ if (status == Success && stuff->lockGroup)
+ newState->locked_group = stuff->groupLock;
+ if (status == Success && stuff->affectModLatches)
+ status = XkbLatchModifiers(tmpd, stuff->affectModLatches,
+ stuff->modLatches);
+ if (status == Success && stuff->latchGroup)
+ status = XkbLatchGroup(tmpd, stuff->groupLatch);
+
+ if (status != Success)
+ return status;
+
+ XkbComputeDerivedState(tmpd->key->xkbInfo);
+
+ changed = XkbStateChangedFlags(&oldState, newState);
+ if (changed) {
+ sn.keycode = 0;
+ sn.eventType = 0;
+ sn.requestMajor = XkbReqCode;
+ sn.requestMinor = X_kbLatchLockState;
+ sn.changed = changed;
+ XkbSendStateNotify(tmpd, &sn);
+ changed = XkbIndicatorsToUpdate(tmpd, changed, FALSE);
+ if (changed) {
+ XkbSetCauseXkbReq(&cause, X_kbLatchLockState, client);
+ XkbUpdateIndicators(tmpd, changed, TRUE, NULL, &cause);
+ }
+ }
+ }
+ }
+
+ return Success;
+}
+
+/***====================================================================***/
+
+int
+ProcXkbGetControls(ClientPtr client)
+{
+ xkbGetControlsReply rep;
+ XkbControlsPtr xkb;
+ DeviceIntPtr dev;
+ register int n;
+
+ REQUEST(xkbGetControlsReq);
+ REQUEST_SIZE_MATCH(xkbGetControlsReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
+
+ xkb = dev->key->xkbInfo->desc->ctrls;
+ rep.type = X_Reply;
+ rep.length = bytes_to_int32(SIZEOF(xkbGetControlsReply)-
+ SIZEOF(xGenericReply));
+ rep.sequenceNumber = client->sequence;
+ rep.deviceID = ((DeviceIntPtr)dev)->id;
+ rep.numGroups = xkb->num_groups;
+ rep.groupsWrap = xkb->groups_wrap;
+ rep.internalMods = xkb->internal.mask;
+ rep.ignoreLockMods = xkb->ignore_lock.mask;
+ rep.internalRealMods = xkb->internal.real_mods;
+ rep.ignoreLockRealMods = xkb->ignore_lock.real_mods;
+ rep.internalVMods = xkb->internal.vmods;
+ rep.ignoreLockVMods = xkb->ignore_lock.vmods;
+ rep.enabledCtrls = xkb->enabled_ctrls;
+ rep.repeatDelay = xkb->repeat_delay;
+ rep.repeatInterval = xkb->repeat_interval;
+ rep.slowKeysDelay = xkb->slow_keys_delay;
+ rep.debounceDelay = xkb->debounce_delay;
+ rep.mkDelay = xkb->mk_delay;
+ rep.mkInterval = xkb->mk_interval;
+ rep.mkTimeToMax = xkb->mk_time_to_max;
+ rep.mkMaxSpeed = xkb->mk_max_speed;
+ rep.mkCurve = xkb->mk_curve;
+ rep.mkDfltBtn = xkb->mk_dflt_btn;
+ rep.axTimeout = xkb->ax_timeout;
+ rep.axtCtrlsMask = xkb->axt_ctrls_mask;
+ rep.axtCtrlsValues = xkb->axt_ctrls_values;
+ rep.axtOptsMask = xkb->axt_opts_mask;
+ rep.axtOptsValues = xkb->axt_opts_values;
+ rep.axOptions = xkb->ax_options;
+ memcpy(rep.perKeyRepeat,xkb->per_key_repeat,XkbPerKeyBitArraySize);
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length,n);
+ swaps(&rep.internalVMods, n);
+ swaps(&rep.ignoreLockVMods, n);
+ swapl(&rep.enabledCtrls, n);
+ swaps(&rep.repeatDelay, n);
+ swaps(&rep.repeatInterval, n);
+ swaps(&rep.slowKeysDelay, n);
+ swaps(&rep.debounceDelay, n);
+ swaps(&rep.mkDelay, n);
+ swaps(&rep.mkInterval, n);
+ swaps(&rep.mkTimeToMax, n);
+ swaps(&rep.mkMaxSpeed, n);
+ swaps(&rep.mkCurve, n);
+ swaps(&rep.axTimeout, n);
+ swapl(&rep.axtCtrlsMask, n);
+ swapl(&rep.axtCtrlsValues, n);
+ swaps(&rep.axtOptsMask, n);
+ swaps(&rep.axtOptsValues, n);
+ swaps(&rep.axOptions, n);
+ }
+ WriteToClient(client, SIZEOF(xkbGetControlsReply), (char *)&rep);
+ return Success;
+}
+
+int
+ProcXkbSetControls(ClientPtr client)
+{
+ DeviceIntPtr dev, tmpd;
+ XkbSrvInfoPtr xkbi;
+ XkbControlsPtr ctrl;
+ XkbControlsRec new,old;
+ xkbControlsNotify cn;
+ XkbEventCauseRec cause;
+ XkbSrvLedInfoPtr sli;
+
+ REQUEST(xkbSetControlsReq);
+ REQUEST_SIZE_MATCH(xkbSetControlsReq);
+
+ if (!(client->xkbClientFlags & _XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+ CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask);
+
+ for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
+ if (!tmpd->key || !tmpd->key->xkbInfo)
+ continue;
+ if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) {
+ xkbi = tmpd->key->xkbInfo;
+ ctrl = xkbi->desc->ctrls;
+ new = *ctrl;
+ XkbSetCauseXkbReq(&cause, X_kbSetControls, client);
+
+ if (stuff->changeCtrls & XkbInternalModsMask) {
+ CHK_MASK_MATCH(0x02, stuff->affectInternalMods,
+ stuff->internalMods);
+ CHK_MASK_MATCH(0x03, stuff->affectInternalVMods,
+ stuff->internalVMods);
+
+ new.internal.real_mods &= ~(stuff->affectInternalMods);
+ new.internal.real_mods |= (stuff->affectInternalMods &
+ stuff->internalMods);
+ new.internal.vmods &= ~(stuff->affectInternalVMods);
+ new.internal.vmods |= (stuff->affectInternalVMods &
+ stuff->internalVMods);
+ new.internal.mask = new.internal.real_mods |
+ XkbMaskForVMask(xkbi->desc,
+ new.internal.vmods);
+ }
+
+ if (stuff->changeCtrls & XkbIgnoreLockModsMask) {
+ CHK_MASK_MATCH(0x4, stuff->affectIgnoreLockMods,
+ stuff->ignoreLockMods);
+ CHK_MASK_MATCH(0x5, stuff->affectIgnoreLockVMods,
+ stuff->ignoreLockVMods);
+
+ new.ignore_lock.real_mods &= ~(stuff->affectIgnoreLockMods);
+ new.ignore_lock.real_mods |= (stuff->affectIgnoreLockMods &
+ stuff->ignoreLockMods);
+ new.ignore_lock.vmods &= ~(stuff->affectIgnoreLockVMods);
+ new.ignore_lock.vmods |= (stuff->affectIgnoreLockVMods &
+ stuff->ignoreLockVMods);
+ new.ignore_lock.mask = new.ignore_lock.real_mods |
+ XkbMaskForVMask(xkbi->desc,
+ new.ignore_lock.vmods);
+ }
+
+ CHK_MASK_MATCH(0x06, stuff->affectEnabledCtrls,
+ stuff->enabledCtrls);
+ if (stuff->affectEnabledCtrls) {
+ CHK_MASK_LEGAL(0x07, stuff->affectEnabledCtrls,
+ XkbAllBooleanCtrlsMask);
+
+ new.enabled_ctrls &= ~(stuff->affectEnabledCtrls);
+ new.enabled_ctrls |= (stuff->affectEnabledCtrls &
+ stuff->enabledCtrls);
+ }
+
+ if (stuff->changeCtrls & XkbRepeatKeysMask) {
+ if (stuff->repeatDelay < 1 || stuff->repeatInterval < 1) {
+ client->errorValue = _XkbErrCode3(0x08, stuff->repeatDelay,
+ stuff->repeatInterval);
+ return BadValue;
+ }
+
+ new.repeat_delay = stuff->repeatDelay;
+ new.repeat_interval = stuff->repeatInterval;
+ }
+
+ if (stuff->changeCtrls & XkbSlowKeysMask) {
+ if (stuff->slowKeysDelay < 1) {
+ client->errorValue = _XkbErrCode2(0x09,
+ stuff->slowKeysDelay);
+ return BadValue;
+ }
+
+ new.slow_keys_delay = stuff->slowKeysDelay;
+ }
+
+ if (stuff->changeCtrls & XkbBounceKeysMask) {
+ if (stuff->debounceDelay < 1) {
+ client->errorValue = _XkbErrCode2(0x0A,
+ stuff->debounceDelay);
+ return BadValue;
+ }
+
+ new.debounce_delay = stuff->debounceDelay;
+ }
+
+ if (stuff->changeCtrls & XkbMouseKeysMask) {
+ if (stuff->mkDfltBtn > XkbMaxMouseKeysBtn) {
+ client->errorValue = _XkbErrCode2(0x0B, stuff->mkDfltBtn);
+ return BadValue;
+ }
+
+ new.mk_dflt_btn = stuff->mkDfltBtn;
+ }
+
+ if (stuff->changeCtrls & XkbMouseKeysAccelMask) {
+ if (stuff->mkDelay < 1 || stuff->mkInterval < 1 ||
+ stuff->mkTimeToMax < 1 || stuff->mkMaxSpeed < 1 ||
+ stuff->mkCurve < -1000) {
+ client->errorValue = _XkbErrCode2(0x0C,0);
+ return BadValue;
+ }
+
+ new.mk_delay = stuff->mkDelay;
+ new.mk_interval = stuff->mkInterval;
+ new.mk_time_to_max = stuff->mkTimeToMax;
+ new.mk_max_speed = stuff->mkMaxSpeed;
+ new.mk_curve = stuff->mkCurve;
+ AccessXComputeCurveFactor(xkbi, &new);
+ }
+
+ if (stuff->changeCtrls & XkbGroupsWrapMask) {
+ unsigned act, num;
+
+ act = XkbOutOfRangeGroupAction(stuff->groupsWrap);
+ switch (act) {
+ case XkbRedirectIntoRange:
+ num = XkbOutOfRangeGroupNumber(stuff->groupsWrap);
+ if (num >= new.num_groups) {
+ client->errorValue = _XkbErrCode3(0x0D, new.num_groups,
+ num);
+ return BadValue;
+ }
+ case XkbWrapIntoRange:
+ case XkbClampIntoRange:
+ break;
+ default:
+ client->errorValue = _XkbErrCode2(0x0E, act);
+ return BadValue;
+ }
+
+ new.groups_wrap= stuff->groupsWrap;
+ }
+
+ CHK_MASK_LEGAL(0x0F, stuff->axOptions, XkbAX_AllOptionsMask);
+ if (stuff->changeCtrls & XkbAccessXKeysMask) {
+ new.ax_options = stuff->axOptions & XkbAX_AllOptionsMask;
+ }
+ else {
+ if (stuff->changeCtrls & XkbStickyKeysMask) {
+ new.ax_options &= ~(XkbAX_SKOptionsMask);
+ new.ax_options |= (stuff->axOptions & XkbAX_SKOptionsMask);
+ }
+
+ if (stuff->changeCtrls & XkbAccessXFeedbackMask) {
+ new.ax_options &= ~(XkbAX_FBOptionsMask);
+ new.ax_options |= (stuff->axOptions & XkbAX_FBOptionsMask);
+ }
+ }
+
+ if (stuff->changeCtrls & XkbAccessXTimeoutMask) {
+ if (stuff->axTimeout < 1) {
+ client->errorValue = _XkbErrCode2(0x10, stuff->axTimeout);
+ return BadValue;
+ }
+ CHK_MASK_MATCH(0x11, stuff->axtCtrlsMask,
+ stuff->axtCtrlsValues);
+ CHK_MASK_LEGAL(0x12, stuff->axtCtrlsMask,
+ XkbAllBooleanCtrlsMask);
+ CHK_MASK_MATCH(0x13, stuff->axtOptsMask, stuff->axtOptsValues);
+ CHK_MASK_LEGAL(0x14, stuff->axtOptsMask, XkbAX_AllOptionsMask);
+ new.ax_timeout = stuff->axTimeout;
+ new.axt_ctrls_mask = stuff->axtCtrlsMask;
+ new.axt_ctrls_values = (stuff->axtCtrlsValues &
+ stuff->axtCtrlsMask);
+ new.axt_opts_mask = stuff->axtOptsMask;
+ new.axt_opts_values = (stuff->axtOptsValues &
+ stuff->axtOptsMask);
+ }
+
+ if (stuff->changeCtrls & XkbPerKeyRepeatMask) {
+ memcpy(new.per_key_repeat, stuff->perKeyRepeat,
+ XkbPerKeyBitArraySize);
+ if (xkbi->repeatKey &&
+ !BitIsOn(new.per_key_repeat, xkbi->repeatKey)) {
+ AccessXCancelRepeatKey(xkbi, xkbi->repeatKey);
+ }
+ }
+
+ old= *ctrl;
+ *ctrl= new;
+ XkbDDXChangeControls(tmpd, &old, ctrl);
+
+ if (XkbComputeControlsNotify(tmpd, &old, ctrl, &cn, FALSE)) {
+ cn.keycode = 0;
+ cn.eventType = 0;
+ cn.requestMajor = XkbReqCode;
+ cn.requestMinor = X_kbSetControls;
+ XkbSendControlsNotify(tmpd, &cn);
+ }
+
+ sli = XkbFindSrvLedInfo(tmpd, XkbDfltXIClass, XkbDfltXIId, 0);
+ if (sli)
+ XkbUpdateIndicators(tmpd, sli->usesControls, TRUE, NULL,
+ &cause);
+
+ /* If sticky keys were disabled, clear all locks and latches */
+ if ((old.enabled_ctrls & XkbStickyKeysMask) &&
+ !(ctrl->enabled_ctrls & XkbStickyKeysMask))
+ XkbClearAllLatchesAndLocks(tmpd, xkbi, TRUE, &cause);
+ }
+ }
+
+ return Success;
+}
+
+/***====================================================================***/
+
+static int
+XkbSizeKeyTypes(XkbDescPtr xkb,xkbGetMapReply *rep)
+{
+ XkbKeyTypeRec *type;
+ unsigned i,len;
+
+ len= 0;
+ if (((rep->present&XkbKeyTypesMask)==0)||(rep->nTypes<1)||
+ (!xkb)||(!xkb->map)||(!xkb->map->types)) {
+ rep->present&= ~XkbKeyTypesMask;
+ rep->firstType= rep->nTypes= 0;
+ return 0;
+ }
+ type= &xkb->map->types[rep->firstType];
+ for (i=0;i<rep->nTypes;i++,type++){
+ len+= SIZEOF(xkbKeyTypeWireDesc);
+ if (type->map_count>0) {
+ len+= (type->map_count*SIZEOF(xkbKTMapEntryWireDesc));
+ if (type->preserve)
+ len+= (type->map_count*SIZEOF(xkbModsWireDesc));
+ }
+ }
+ return len;
+}
+
+static char *
+XkbWriteKeyTypes( XkbDescPtr xkb,
+ xkbGetMapReply * rep,
+ char * buf,
+ ClientPtr client)
+{
+ XkbKeyTypePtr type;
+ unsigned i;
+ xkbKeyTypeWireDesc *wire;
+
+ type= &xkb->map->types[rep->firstType];
+ for (i=0;i<rep->nTypes;i++,type++) {
+ register unsigned n;
+ wire= (xkbKeyTypeWireDesc *)buf;
+ wire->mask = type->mods.mask;
+ wire->realMods = type->mods.real_mods;
+ wire->virtualMods = type->mods.vmods;
+ wire->numLevels = type->num_levels;
+ wire->nMapEntries = type->map_count;
+ wire->preserve = (type->preserve!=NULL);
+ if (client->swapped) {
+ register int n;
+ swaps(&wire->virtualMods,n);
+ }
+
+ buf= (char *)&wire[1];
+ if (wire->nMapEntries>0) {
+ xkbKTMapEntryWireDesc * wire;
+ XkbKTMapEntryPtr entry;
+ wire= (xkbKTMapEntryWireDesc *)buf;
+ entry= type->map;
+ for (n=0;n<type->map_count;n++,wire++,entry++) {
+ wire->active= entry->active;
+ wire->mask= entry->mods.mask;
+ wire->level= entry->level;
+ wire->realMods= entry->mods.real_mods;
+ wire->virtualMods= entry->mods.vmods;
+ if (client->swapped) {
+ register int n;
+ swaps(&wire->virtualMods,n);
+ }
+ }
+ buf= (char *)wire;
+ if (type->preserve!=NULL) {
+ xkbModsWireDesc * pwire;
+ XkbModsPtr preserve;
+ pwire= (xkbModsWireDesc *)buf;
+ preserve= type->preserve;
+ for (n=0;n<type->map_count;n++,pwire++,preserve++) {
+ pwire->mask= preserve->mask;
+ pwire->realMods= preserve->real_mods;
+ pwire->virtualMods= preserve->vmods;
+ if (client->swapped) {
+ register int n;
+ swaps(&pwire->virtualMods,n);
+ }
+ }
+ buf= (char *)pwire;
+ }
+ }
+ }
+ return buf;
+}
+
+static int
+XkbSizeKeySyms(XkbDescPtr xkb,xkbGetMapReply *rep)
+{
+ XkbSymMapPtr symMap;
+ unsigned i,len;
+ unsigned nSyms,nSymsThisKey;
+
+ if (((rep->present&XkbKeySymsMask)==0)||(rep->nKeySyms<1)||
+ (!xkb)||(!xkb->map)||(!xkb->map->key_sym_map)) {
+ rep->present&= ~XkbKeySymsMask;
+ rep->firstKeySym= rep->nKeySyms= 0;
+ rep->totalSyms= 0;
+ return 0;
+ }
+ len= rep->nKeySyms*SIZEOF(xkbSymMapWireDesc);
+ symMap = &xkb->map->key_sym_map[rep->firstKeySym];
+ for (i=nSyms=0;i<rep->nKeySyms;i++,symMap++) {
+ if (symMap->offset!=0) {
+ nSymsThisKey= XkbNumGroups(symMap->group_info)*symMap->width;
+ nSyms+= nSymsThisKey;
+ }
+ }
+ len+= nSyms*4;
+ rep->totalSyms= nSyms;
+ return len;
+}
+
+static int
+XkbSizeVirtualMods(XkbDescPtr xkb,xkbGetMapReply *rep)
+{
+register unsigned i,nMods,bit;
+
+ if (((rep->present&XkbVirtualModsMask)==0)||(rep->virtualMods==0)||
+ (!xkb)||(!xkb->server)) {
+ rep->present&= ~XkbVirtualModsMask;
+ rep->virtualMods= 0;
+ return 0;
+ }
+ for (i=nMods=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
+ if (rep->virtualMods&bit)
+ nMods++;
+ }
+ return XkbPaddedSize(nMods);
+}
+
+static char *
+XkbWriteKeySyms(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,ClientPtr client)
+{
+register KeySym * pSym;
+XkbSymMapPtr symMap;
+xkbSymMapWireDesc * outMap;
+register unsigned i;
+
+ symMap = &xkb->map->key_sym_map[rep->firstKeySym];
+ for (i=0;i<rep->nKeySyms;i++,symMap++) {
+ outMap = (xkbSymMapWireDesc *)buf;
+ outMap->ktIndex[0] = symMap->kt_index[0];
+ outMap->ktIndex[1] = symMap->kt_index[1];
+ outMap->ktIndex[2] = symMap->kt_index[2];
+ outMap->ktIndex[3] = symMap->kt_index[3];
+ outMap->groupInfo = symMap->group_info;
+ outMap->width= symMap->width;
+ outMap->nSyms = symMap->width*XkbNumGroups(symMap->group_info);
+ buf= (char *)&outMap[1];
+ if (outMap->nSyms==0)
+ continue;
+
+ pSym = &xkb->map->syms[symMap->offset];
+ memcpy((char *)buf,(char *)pSym,outMap->nSyms*4);
+ if (client->swapped) {
+ register int n,nSyms= outMap->nSyms;
+ swaps(&outMap->nSyms,n);
+ while (nSyms-->0) {
+ swapl(buf,n);
+ buf+= 4;
+ }
+ }
+ else buf+= outMap->nSyms*4;
+ }
+ return buf;
+}
+
+static int
+XkbSizeKeyActions(XkbDescPtr xkb,xkbGetMapReply *rep)
+{
+ unsigned i,len,nActs;
+ register KeyCode firstKey;
+
+ if (((rep->present&XkbKeyActionsMask)==0)||(rep->nKeyActs<1)||
+ (!xkb)||(!xkb->server)||(!xkb->server->key_acts)) {
+ rep->present&= ~XkbKeyActionsMask;
+ rep->firstKeyAct= rep->nKeyActs= 0;
+ rep->totalActs= 0;
+ return 0;
+ }
+ firstKey= rep->firstKeyAct;
+ for (nActs=i=0;i<rep->nKeyActs;i++) {
+ if (xkb->server->key_acts[i+firstKey]!=0)
+ nActs+= XkbKeyNumActions(xkb,i+firstKey);
+ }
+ len= XkbPaddedSize(rep->nKeyActs)+(nActs*SIZEOF(xkbActionWireDesc));
+ rep->totalActs= nActs;
+ return len;
+}
+
+static char *
+XkbWriteKeyActions(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
+ ClientPtr client)
+{
+ unsigned i;
+ CARD8 * numDesc;
+ XkbAnyAction * actDesc;
+
+ numDesc = (CARD8 *)buf;
+ for (i=0;i<rep->nKeyActs;i++) {
+ if (xkb->server->key_acts[i+rep->firstKeyAct]==0)
+ numDesc[i] = 0;
+ else numDesc[i] = XkbKeyNumActions(xkb,(i+rep->firstKeyAct));
+ }
+ buf+= XkbPaddedSize(rep->nKeyActs);
+
+ actDesc = (XkbAnyAction *)buf;
+ for (i=0;i<rep->nKeyActs;i++) {
+ if (xkb->server->key_acts[i+rep->firstKeyAct]!=0) {
+ unsigned int num;
+ num = XkbKeyNumActions(xkb,(i+rep->firstKeyAct));
+ memcpy((char *)actDesc,
+ (char*)XkbKeyActionsPtr(xkb,(i+rep->firstKeyAct)),
+ num*SIZEOF(xkbActionWireDesc));
+ actDesc+= num;
+ }
+ }
+ buf = (char *)actDesc;
+ return buf;
+}
+
+static int
+XkbSizeKeyBehaviors(XkbDescPtr xkb,xkbGetMapReply *rep)
+{
+ unsigned i,len,nBhvr;
+ XkbBehavior * bhv;
+
+ if (((rep->present&XkbKeyBehaviorsMask)==0)||(rep->nKeyBehaviors<1)||
+ (!xkb)||(!xkb->server)||(!xkb->server->behaviors)) {
+ rep->present&= ~XkbKeyBehaviorsMask;
+ rep->firstKeyBehavior= rep->nKeyBehaviors= 0;
+ rep->totalKeyBehaviors= 0;
+ return 0;
+ }
+ bhv= &xkb->server->behaviors[rep->firstKeyBehavior];
+ for (nBhvr=i=0;i<rep->nKeyBehaviors;i++,bhv++) {
+ if (bhv->type!=XkbKB_Default)
+ nBhvr++;
+ }
+ len= nBhvr*SIZEOF(xkbBehaviorWireDesc);
+ rep->totalKeyBehaviors= nBhvr;
+ return len;
+}
+
+static char *
+XkbWriteKeyBehaviors(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
+ ClientPtr client)
+{
+ unsigned i;
+ xkbBehaviorWireDesc *wire;
+ XkbBehavior *pBhvr;
+
+ wire = (xkbBehaviorWireDesc *)buf;
+ pBhvr= &xkb->server->behaviors[rep->firstKeyBehavior];
+ for (i=0;i<rep->nKeyBehaviors;i++,pBhvr++) {
+ if (pBhvr->type!=XkbKB_Default) {
+ wire->key= i+rep->firstKeyBehavior;
+ wire->type= pBhvr->type;
+ wire->data= pBhvr->data;
+ wire++;
+ }
+ }
+ buf = (char *)wire;
+ return buf;
+}
+
+static int
+XkbSizeExplicit(XkbDescPtr xkb,xkbGetMapReply *rep)
+{
+ unsigned i,len,nRtrn;
+
+ if (((rep->present&XkbExplicitComponentsMask)==0)||(rep->nKeyExplicit<1)||
+ (!xkb)||(!xkb->server)||(!xkb->server->explicit)) {
+ rep->present&= ~XkbExplicitComponentsMask;
+ rep->firstKeyExplicit= rep->nKeyExplicit= 0;
+ rep->totalKeyExplicit= 0;
+ return 0;
+ }
+ for (nRtrn=i=0;i<rep->nKeyExplicit;i++) {
+ if (xkb->server->explicit[i+rep->firstKeyExplicit]!=0)
+ nRtrn++;
+ }
+ rep->totalKeyExplicit= nRtrn;
+ len= XkbPaddedSize(nRtrn*2); /* two bytes per non-zero explicit component */
+ return len;
+}
+
+static char *
+XkbWriteExplicit(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,ClientPtr client)
+{
+unsigned i;
+char * start;
+unsigned char * pExp;
+
+ start= buf;
+ pExp= &xkb->server->explicit[rep->firstKeyExplicit];
+ for (i=0;i<rep->nKeyExplicit;i++,pExp++) {
+ if (*pExp!=0) {
+ *buf++= i+rep->firstKeyExplicit;
+ *buf++= *pExp;
+ }
+ }
+ i= XkbPaddedSize(buf-start)-(buf-start); /* pad to word boundary */
+ return buf+i;
+}
+
+static int
+XkbSizeModifierMap(XkbDescPtr xkb,xkbGetMapReply *rep)
+{
+ unsigned i,len,nRtrn;
+
+ if (((rep->present&XkbModifierMapMask)==0)||(rep->nModMapKeys<1)||
+ (!xkb)||(!xkb->map)||(!xkb->map->modmap)) {
+ rep->present&= ~XkbModifierMapMask;
+ rep->firstModMapKey= rep->nModMapKeys= 0;
+ rep->totalModMapKeys= 0;
+ return 0;
+ }
+ for (nRtrn=i=0;i<rep->nModMapKeys;i++) {
+ if (xkb->map->modmap[i+rep->firstModMapKey]!=0)
+ nRtrn++;
+ }
+ rep->totalModMapKeys= nRtrn;
+ len= XkbPaddedSize(nRtrn*2); /* two bytes per non-zero modmap component */
+ return len;
+}
+
+static char *
+XkbWriteModifierMap(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
+ ClientPtr client)
+{
+unsigned i;
+char * start;
+unsigned char * pMap;
+
+ start= buf;
+ pMap= &xkb->map->modmap[rep->firstModMapKey];
+ for (i=0;i<rep->nModMapKeys;i++,pMap++) {
+ if (*pMap!=0) {
+ *buf++= i+rep->firstModMapKey;
+ *buf++= *pMap;
+ }
+ }
+ i= XkbPaddedSize(buf-start)-(buf-start); /* pad to word boundary */
+ return buf+i;
+}
+
+static int
+XkbSizeVirtualModMap(XkbDescPtr xkb,xkbGetMapReply *rep)
+{
+ unsigned i,len,nRtrn;
+
+ if (((rep->present&XkbVirtualModMapMask)==0)||(rep->nVModMapKeys<1)||
+ (!xkb)||(!xkb->server)||(!xkb->server->vmodmap)) {
+ rep->present&= ~XkbVirtualModMapMask;
+ rep->firstVModMapKey= rep->nVModMapKeys= 0;
+ rep->totalVModMapKeys= 0;
+ return 0;
+ }
+ for (nRtrn=i=0;i<rep->nVModMapKeys;i++) {
+ if (xkb->server->vmodmap[i+rep->firstVModMapKey]!=0)
+ nRtrn++;
+ }
+ rep->totalVModMapKeys= nRtrn;
+ len= nRtrn*SIZEOF(xkbVModMapWireDesc);
+ return len;
+}
+
+static char *
+XkbWriteVirtualModMap(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
+ ClientPtr client)
+{
+unsigned i;
+xkbVModMapWireDesc * wire;
+unsigned short * pMap;
+
+ wire= (xkbVModMapWireDesc *)buf;
+ pMap= &xkb->server->vmodmap[rep->firstVModMapKey];
+ for (i=0;i<rep->nVModMapKeys;i++,pMap++) {
+ if (*pMap!=0) {
+ wire->key= i+rep->firstVModMapKey;
+ wire->vmods= *pMap;
+ wire++;
+ }
+ }
+ return (char *)wire;
+}
+
+static Status
+XkbComputeGetMapReplySize(XkbDescPtr xkb,xkbGetMapReply *rep)
+{
+int len;
+
+ rep->minKeyCode= xkb->min_key_code;
+ rep->maxKeyCode= xkb->max_key_code;
+ len= XkbSizeKeyTypes(xkb,rep);
+ len+= XkbSizeKeySyms(xkb,rep);
+ len+= XkbSizeKeyActions(xkb,rep);
+ len+= XkbSizeKeyBehaviors(xkb,rep);
+ len+= XkbSizeVirtualMods(xkb,rep);
+ len+= XkbSizeExplicit(xkb,rep);
+ len+= XkbSizeModifierMap(xkb,rep);
+ len+= XkbSizeVirtualModMap(xkb,rep);
+ rep->length+= (len/4);
+ return Success;
+}
+
+static int
+XkbSendMap(ClientPtr client,XkbDescPtr xkb,xkbGetMapReply *rep)
+{
+unsigned i,len;
+char *desc,*start;
+
+ len= (rep->length*4)-(SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply));
+ start= desc= calloc(1, len);
+ if (!start)
+ return BadAlloc;
+ if ( rep->nTypes>0 )
+ desc = XkbWriteKeyTypes(xkb,rep,desc,client);
+ if ( rep->nKeySyms>0 )
+ desc = XkbWriteKeySyms(xkb,rep,desc,client);
+ if ( rep->nKeyActs>0 )
+ desc = XkbWriteKeyActions(xkb,rep,desc,client);
+ if ( rep->totalKeyBehaviors>0 )
+ desc = XkbWriteKeyBehaviors(xkb,rep,desc,client);
+ if ( rep->virtualMods ) {
+ register int sz,bit;
+ for (i=sz=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
+ if (rep->virtualMods&bit) {
+ desc[sz++]= xkb->server->vmods[i];
+ }
+ }
+ desc+= XkbPaddedSize(sz);
+ }
+ if ( rep->totalKeyExplicit>0 )
+ desc= XkbWriteExplicit(xkb,rep,desc,client);
+ if ( rep->totalModMapKeys>0 )
+ desc= XkbWriteModifierMap(xkb,rep,desc,client);
+ if ( rep->totalVModMapKeys>0 )
+ desc= XkbWriteVirtualModMap(xkb,rep,desc,client);
+ if ((desc-start)!=(len)) {
+ ErrorF("[xkb] BOGUS LENGTH in write keyboard desc, expected %d, got %ld\n",
+ len, (unsigned long)(desc-start));
+ }
+ if (client->swapped) {
+ register int n;
+ swaps(&rep->sequenceNumber,n);
+ swapl(&rep->length,n);
+ swaps(&rep->present,n);
+ swaps(&rep->totalSyms,n);
+ swaps(&rep->totalActs,n);
+ }
+ WriteToClient(client, (i=SIZEOF(xkbGetMapReply)), (char *)rep);
+ WriteToClient(client, len, start);
+ free((char *)start);
+ return Success;
+}
+
+int
+ProcXkbGetMap(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ xkbGetMapReply rep;
+ XkbDescRec *xkb;
+ int n,status;
+
+ REQUEST(xkbGetMapReq);
+ REQUEST_SIZE_MATCH(xkbGetMapReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
+ CHK_MASK_OVERLAP(0x01,stuff->full,stuff->partial);
+ CHK_MASK_LEGAL(0x02,stuff->full,XkbAllMapComponentsMask);
+ CHK_MASK_LEGAL(0x03,stuff->partial,XkbAllMapComponentsMask);
+
+ xkb= dev->key->xkbInfo->desc;
+ memset(&rep, 0, sizeof(xkbGetMapReply));
+ rep.type= X_Reply;
+ rep.sequenceNumber= client->sequence;
+ rep.length = (SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply))>>2;
+ rep.deviceID = dev->id;
+ rep.present = stuff->partial|stuff->full;
+ rep.minKeyCode = xkb->min_key_code;
+ rep.maxKeyCode = xkb->max_key_code;
+ if ( stuff->full&XkbKeyTypesMask ) {
+ rep.firstType = 0;
+ rep.nTypes = xkb->map->num_types;
+ }
+ else if (stuff->partial&XkbKeyTypesMask) {
+ if (((unsigned)stuff->firstType+stuff->nTypes)>xkb->map->num_types) {
+ client->errorValue = _XkbErrCode4(0x04,xkb->map->num_types,
+ stuff->firstType,stuff->nTypes);
+ return BadValue;
+ }
+ rep.firstType = stuff->firstType;
+ rep.nTypes = stuff->nTypes;
+ }
+ else rep.nTypes = 0;
+ rep.totalTypes = xkb->map->num_types;
+
+ n= XkbNumKeys(xkb);
+ if ( stuff->full&XkbKeySymsMask ) {
+ rep.firstKeySym = xkb->min_key_code;
+ rep.nKeySyms = n;
+ }
+ else if (stuff->partial&XkbKeySymsMask) {
+ CHK_KEY_RANGE(0x05,stuff->firstKeySym,stuff->nKeySyms,xkb);
+ rep.firstKeySym = stuff->firstKeySym;
+ rep.nKeySyms = stuff->nKeySyms;
+ }
+ else rep.nKeySyms = 0;
+ rep.totalSyms= 0;
+
+ if ( stuff->full&XkbKeyActionsMask ) {
+ rep.firstKeyAct= xkb->min_key_code;
+ rep.nKeyActs= n;
+ }
+ else if (stuff->partial&XkbKeyActionsMask) {
+ CHK_KEY_RANGE(0x07,stuff->firstKeyAct,stuff->nKeyActs,xkb);
+ rep.firstKeyAct= stuff->firstKeyAct;
+ rep.nKeyActs= stuff->nKeyActs;
+ }
+ else rep.nKeyActs= 0;
+ rep.totalActs= 0;
+
+ if ( stuff->full&XkbKeyBehaviorsMask ) {
+ rep.firstKeyBehavior = xkb->min_key_code;
+ rep.nKeyBehaviors = n;
+ }
+ else if (stuff->partial&XkbKeyBehaviorsMask) {
+ CHK_KEY_RANGE(0x09,stuff->firstKeyBehavior,stuff->nKeyBehaviors,xkb);
+ rep.firstKeyBehavior= stuff->firstKeyBehavior;
+ rep.nKeyBehaviors= stuff->nKeyBehaviors;
+ }
+ else rep.nKeyBehaviors = 0;
+ rep.totalKeyBehaviors= 0;
+
+ if (stuff->full&XkbVirtualModsMask)
+ rep.virtualMods= ~0;
+ else if (stuff->partial&XkbVirtualModsMask)
+ rep.virtualMods= stuff->virtualMods;
+
+ if (stuff->full&XkbExplicitComponentsMask) {
+ rep.firstKeyExplicit= xkb->min_key_code;
+ rep.nKeyExplicit= n;
+ }
+ else if (stuff->partial&XkbExplicitComponentsMask) {
+ CHK_KEY_RANGE(0x0B,stuff->firstKeyExplicit,stuff->nKeyExplicit,xkb);
+ rep.firstKeyExplicit= stuff->firstKeyExplicit;
+ rep.nKeyExplicit= stuff->nKeyExplicit;
+ }
+ else rep.nKeyExplicit = 0;
+ rep.totalKeyExplicit= 0;
+
+ if (stuff->full&XkbModifierMapMask) {
+ rep.firstModMapKey= xkb->min_key_code;
+ rep.nModMapKeys= n;
+ }
+ else if (stuff->partial&XkbModifierMapMask) {
+ CHK_KEY_RANGE(0x0D,stuff->firstModMapKey,stuff->nModMapKeys,xkb);
+ rep.firstModMapKey= stuff->firstModMapKey;
+ rep.nModMapKeys= stuff->nModMapKeys;
+ }
+ else rep.nModMapKeys = 0;
+ rep.totalModMapKeys= 0;
+
+ if (stuff->full&XkbVirtualModMapMask) {
+ rep.firstVModMapKey= xkb->min_key_code;
+ rep.nVModMapKeys= n;
+ }
+ else if (stuff->partial&XkbVirtualModMapMask) {
+ CHK_KEY_RANGE(0x0F,stuff->firstVModMapKey,stuff->nVModMapKeys,xkb);
+ rep.firstVModMapKey= stuff->firstVModMapKey;
+ rep.nVModMapKeys= stuff->nVModMapKeys;
+ }
+ else rep.nVModMapKeys = 0;
+ rep.totalVModMapKeys= 0;
+
+ if ((status=XkbComputeGetMapReplySize(xkb,&rep))!=Success)
+ return status;
+ return XkbSendMap(client,xkb,&rep);
+}
+
+/***====================================================================***/
+
+static int
+CheckKeyTypes( ClientPtr client,
+ XkbDescPtr xkb,
+ xkbSetMapReq * req,
+ xkbKeyTypeWireDesc **wireRtrn,
+ int * nMapsRtrn,
+ CARD8 * mapWidthRtrn)
+{
+unsigned nMaps;
+register unsigned i,n;
+register CARD8 * map;
+register xkbKeyTypeWireDesc *wire = *wireRtrn;
+
+ if (req->firstType>((unsigned)xkb->map->num_types)) {
+ *nMapsRtrn = _XkbErrCode3(0x01,req->firstType,xkb->map->num_types);
+ return 0;
+ }
+ if (req->flags&XkbSetMapResizeTypes) {
+ nMaps = req->firstType+req->nTypes;
+ if (nMaps<XkbNumRequiredTypes) { /* canonical types must be there */
+ *nMapsRtrn= _XkbErrCode4(0x02,req->firstType,req->nTypes,4);
+ return 0;
+ }
+ }
+ else if (req->present&XkbKeyTypesMask) {
+ nMaps = xkb->map->num_types;
+ if ((req->firstType+req->nTypes)>nMaps) {
+ *nMapsRtrn = req->firstType+req->nTypes;
+ return 0;
+ }
+ }
+ else {
+ *nMapsRtrn = xkb->map->num_types;
+ for (i=0;i<xkb->map->num_types;i++) {
+ mapWidthRtrn[i] = xkb->map->types[i].num_levels;
+ }
+ return 1;
+ }
+
+ for (i=0;i<req->firstType;i++) {
+ mapWidthRtrn[i] = xkb->map->types[i].num_levels;
+ }
+ for (i=0;i<req->nTypes;i++) {
+ unsigned width;
+ if (client->swapped) {
+ register int s;
+ swaps(&wire->virtualMods,s);
+ }
+ n= i+req->firstType;
+ width= wire->numLevels;
+ if (width<1) {
+ *nMapsRtrn= _XkbErrCode3(0x04,n,width);
+ return 0;
+ }
+ else if ((n==XkbOneLevelIndex)&&(width!=1)) { /* must be width 1 */
+ *nMapsRtrn= _XkbErrCode3(0x05,n,width);
+ return 0;
+ }
+ else if ((width!=2)&&
+ ((n==XkbTwoLevelIndex)||(n==XkbKeypadIndex)||
+ (n==XkbAlphabeticIndex))) {
+ /* TWO_LEVEL, ALPHABETIC and KEYPAD must be width 2 */
+ *nMapsRtrn= _XkbErrCode3(0x05,n,width);
+ return 0;
+ }
+ if (wire->nMapEntries>0) {
+ xkbKTSetMapEntryWireDesc * mapWire;
+ xkbModsWireDesc * preWire;
+ mapWire= (xkbKTSetMapEntryWireDesc *)&wire[1];
+ preWire= (xkbModsWireDesc *)&mapWire[wire->nMapEntries];
+ for (n=0;n<wire->nMapEntries;n++) {
+ if (client->swapped) {
+ register int s;
+ swaps(&mapWire[n].virtualMods,s);
+ }
+ if (mapWire[n].realMods&(~wire->realMods)) {
+ *nMapsRtrn= _XkbErrCode4(0x06,n,mapWire[n].realMods,
+ wire->realMods);
+ return 0;
+ }
+ if (mapWire[n].virtualMods&(~wire->virtualMods)) {
+ *nMapsRtrn= _XkbErrCode3(0x07,n,mapWire[n].virtualMods);
+ return 0;
+ }
+ if (mapWire[n].level>=wire->numLevels) {
+ *nMapsRtrn= _XkbErrCode4(0x08,n,wire->numLevels,
+ mapWire[n].level);
+ return 0;
+ }
+ if (wire->preserve) {
+ if (client->swapped) {
+ register int s;
+ swaps(&preWire[n].virtualMods,s);
+ }
+ if (preWire[n].realMods&(~mapWire[n].realMods)) {
+ *nMapsRtrn= _XkbErrCode4(0x09,n,preWire[n].realMods,
+ mapWire[n].realMods);
+ return 0;
+ }
+ if (preWire[n].virtualMods&(~mapWire[n].virtualMods)) {
+ *nMapsRtrn=_XkbErrCode3(0x0a,n,preWire[n].virtualMods);
+ return 0;
+ }
+ }
+ }
+ if (wire->preserve)
+ map= (CARD8 *)&preWire[wire->nMapEntries];
+ else map= (CARD8 *)&mapWire[wire->nMapEntries];
+ }
+ else map= (CARD8 *)&wire[1];
+ mapWidthRtrn[i+req->firstType] = wire->numLevels;
+ wire= (xkbKeyTypeWireDesc *)map;
+ }
+ for (i=req->firstType+req->nTypes;i<nMaps;i++) {
+ mapWidthRtrn[i] = xkb->map->types[i].num_levels;
+ }
+ *nMapsRtrn = nMaps;
+ *wireRtrn = wire;
+ return 1;
+}
+
+static int
+CheckKeySyms( ClientPtr client,
+ XkbDescPtr xkb,
+ xkbSetMapReq * req,
+ int nTypes,
+ CARD8 * mapWidths,
+ CARD16 * symsPerKey,
+ xkbSymMapWireDesc ** wireRtrn,
+ int * errorRtrn)
+{
+register unsigned i;
+XkbSymMapPtr map;
+xkbSymMapWireDesc* wire = *wireRtrn;
+
+ if (!(XkbKeySymsMask&req->present))
+ return 1;
+ CHK_REQ_KEY_RANGE2(0x11,req->firstKeySym,req->nKeySyms,req,(*errorRtrn),0);
+ for (i=0;i<req->nKeySyms;i++) {
+ KeySym *pSyms;
+ register unsigned nG;
+ if (client->swapped) {
+ swaps(&wire->nSyms,nG);
+ }
+ nG = XkbNumGroups(wire->groupInfo);
+ if (nG>XkbNumKbdGroups) {
+ *errorRtrn = _XkbErrCode3(0x14,i+req->firstKeySym,nG);
+ return 0;
+ }
+ if (nG>0) {
+ register int g,w;
+ for (g=w=0;g<nG;g++) {
+ if (wire->ktIndex[g]>=(unsigned)nTypes) {
+ *errorRtrn= _XkbErrCode4(0x15,i+req->firstKeySym,g,
+ wire->ktIndex[g]);
+ return 0;
+ }
+ if (mapWidths[wire->ktIndex[g]]>w)
+ w= mapWidths[wire->ktIndex[g]];
+ }
+ if (wire->width!=w) {
+ *errorRtrn= _XkbErrCode3(0x16,i+req->firstKeySym,wire->width);
+ return 0;
+ }
+ w*= nG;
+ symsPerKey[i+req->firstKeySym] = w;
+ if (w!=wire->nSyms) {
+ *errorRtrn=_XkbErrCode4(0x16,i+req->firstKeySym,wire->nSyms,w);
+ return 0;
+ }
+ }
+ else if (wire->nSyms!=0) {
+ *errorRtrn = _XkbErrCode3(0x17,i+req->firstKeySym,wire->nSyms);
+ return 0;
+ }
+ pSyms = (KeySym *)&wire[1];
+ wire = (xkbSymMapWireDesc *)&pSyms[wire->nSyms];
+ }
+
+ map = &xkb->map->key_sym_map[i];
+ for (;i<=(unsigned)xkb->max_key_code;i++,map++) {
+ register int g,nG,w;
+ nG= XkbKeyNumGroups(xkb,i);
+ for (w=g=0;g<nG;g++) {
+ if (map->kt_index[g]>=(unsigned)nTypes) {
+ *errorRtrn = _XkbErrCode4(0x18,i,g,map->kt_index[g]);
+ return 0;
+ }
+ if (mapWidths[map->kt_index[g]]>w)
+ w= mapWidths[map->kt_index[g]];
+ }
+ symsPerKey[i] = w*nG;
+ }
+ *wireRtrn = wire;
+ return 1;
+}
+
+static int
+CheckKeyActions( XkbDescPtr xkb,
+ xkbSetMapReq * req,
+ int nTypes,
+ CARD8 * mapWidths,
+ CARD16 * symsPerKey,
+ CARD8 ** wireRtrn,
+ int * nActsRtrn)
+{
+int nActs;
+CARD8 * wire = *wireRtrn;
+register unsigned i;
+
+ if (!(XkbKeyActionsMask&req->present))
+ return 1;
+ CHK_REQ_KEY_RANGE2(0x21,req->firstKeyAct,req->nKeyActs,req,(*nActsRtrn),0);
+ for (nActs=i=0;i<req->nKeyActs;i++) {
+ if (wire[0]!=0) {
+ if (wire[0]==symsPerKey[i+req->firstKeyAct])
+ nActs+= wire[0];
+ else {
+ *nActsRtrn= _XkbErrCode3(0x23,i+req->firstKeyAct,wire[0]);
+ return 0;
+ }
+ }
+ wire++;
+ }
+ if (req->nKeyActs%4)
+ wire+= 4-(req->nKeyActs%4);
+ *wireRtrn = (CARD8 *)(((XkbAnyAction *)wire)+nActs);
+ *nActsRtrn = nActs;
+ return 1;
+}
+
+static int
+CheckKeyBehaviors( XkbDescPtr xkb,
+ xkbSetMapReq * req,
+ xkbBehaviorWireDesc ** wireRtrn,
+ int * errorRtrn)
+{
+register xkbBehaviorWireDesc * wire = *wireRtrn;
+register XkbServerMapPtr server = xkb->server;
+register unsigned i;
+unsigned first,last;
+
+ if (((req->present&XkbKeyBehaviorsMask)==0)||(req->nKeyBehaviors<1)) {
+ req->present&= ~XkbKeyBehaviorsMask;
+ req->nKeyBehaviors= 0;
+ return 1;
+ }
+ first= req->firstKeyBehavior;
+ last= req->firstKeyBehavior+req->nKeyBehaviors-1;
+ if (first<req->minKeyCode) {
+ *errorRtrn = _XkbErrCode3(0x31,first,req->minKeyCode);
+ return 0;
+ }
+ if (last>req->maxKeyCode) {
+ *errorRtrn = _XkbErrCode3(0x32,last,req->maxKeyCode);
+ return 0;
+ }
+
+ for (i=0;i<req->totalKeyBehaviors;i++,wire++) {
+ if ((wire->key<first)||(wire->key>last)) {
+ *errorRtrn = _XkbErrCode4(0x33,first,last,wire->key);
+ return 0;
+ }
+ if ((wire->type&XkbKB_Permanent)&&
+ ((server->behaviors[wire->key].type!=wire->type)||
+ (server->behaviors[wire->key].data!=wire->data))) {
+ *errorRtrn = _XkbErrCode3(0x33,wire->key,wire->type);
+ return 0;
+ }
+ if ((wire->type==XkbKB_RadioGroup)&&
+ ((wire->data&(~XkbKB_RGAllowNone))>XkbMaxRadioGroups)) {
+ *errorRtrn= _XkbErrCode4(0x34,wire->key,wire->data,
+ XkbMaxRadioGroups);
+ return 0;
+ }
+ if ((wire->type==XkbKB_Overlay1)||(wire->type==XkbKB_Overlay2)) {
+ CHK_KEY_RANGE2(0x35,wire->key,1,xkb,*errorRtrn,0);
+ }
+ }
+ *wireRtrn = wire;
+ return 1;
+}
+
+static int
+CheckVirtualMods( XkbDescRec * xkb,
+ xkbSetMapReq * req,
+ CARD8 ** wireRtrn,
+ int * errorRtrn)
+{
+register CARD8 *wire = *wireRtrn;
+register unsigned i,nMods,bit;
+
+ if (((req->present&XkbVirtualModsMask)==0)||(req->virtualMods==0))
+ return 1;
+ for (i=nMods=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
+ if (req->virtualMods&bit)
+ nMods++;
+ }
+ *wireRtrn= (wire+XkbPaddedSize(nMods));
+ return 1;
+}
+
+static int
+CheckKeyExplicit( XkbDescPtr xkb,
+ xkbSetMapReq * req,
+ CARD8 ** wireRtrn,
+ int * errorRtrn)
+{
+register CARD8 * wire = *wireRtrn;
+CARD8 * start;
+register unsigned i;
+int first,last;
+
+ if (((req->present&XkbExplicitComponentsMask)==0)||(req->nKeyExplicit<1)) {
+ req->present&= ~XkbExplicitComponentsMask;
+ req->nKeyExplicit= 0;
+ return 1;
+ }
+ first= req->firstKeyExplicit;
+ last= first+req->nKeyExplicit-1;
+ if (first<req->minKeyCode) {
+ *errorRtrn = _XkbErrCode3(0x51,first,req->minKeyCode);
+ return 0;
+ }
+ if (last>req->maxKeyCode) {
+ *errorRtrn = _XkbErrCode3(0x52,last,req->maxKeyCode);
+ return 0;
+ }
+ start= wire;
+ for (i=0;i<req->totalKeyExplicit;i++,wire+=2) {
+ if ((wire[0]<first)||(wire[0]>last)) {
+ *errorRtrn = _XkbErrCode4(0x53,first,last,wire[0]);
+ return 0;
+ }
+ if (wire[1]&(~XkbAllExplicitMask)) {
+ *errorRtrn= _XkbErrCode3(0x52,~XkbAllExplicitMask,wire[1]);
+ return 0;
+ }
+ }
+ wire+= XkbPaddedSize(wire-start)-(wire-start);
+ *wireRtrn= wire;
+ return 1;
+}
+
+static int
+CheckModifierMap(XkbDescPtr xkb,xkbSetMapReq *req,CARD8 **wireRtrn,int *errRtrn)
+{
+register CARD8 * wire = *wireRtrn;
+CARD8 * start;
+register unsigned i;
+int first,last;
+
+ if (((req->present&XkbModifierMapMask)==0)||(req->nModMapKeys<1)) {
+ req->present&= ~XkbModifierMapMask;
+ req->nModMapKeys= 0;
+ return 1;
+ }
+ first= req->firstModMapKey;
+ last= first+req->nModMapKeys-1;
+ if (first<req->minKeyCode) {
+ *errRtrn = _XkbErrCode3(0x61,first,req->minKeyCode);
+ return 0;
+ }
+ if (last>req->maxKeyCode) {
+ *errRtrn = _XkbErrCode3(0x62,last,req->maxKeyCode);
+ return 0;
+ }
+ start= wire;
+ for (i=0;i<req->totalModMapKeys;i++,wire+=2) {
+ if ((wire[0]<first)||(wire[0]>last)) {
+ *errRtrn = _XkbErrCode4(0x63,first,last,wire[0]);
+ return 0;
+ }
+ }
+ wire+= XkbPaddedSize(wire-start)-(wire-start);
+ *wireRtrn= wire;
+ return 1;
+}
+
+static int
+CheckVirtualModMap( XkbDescPtr xkb,
+ xkbSetMapReq *req,
+ xkbVModMapWireDesc **wireRtrn,
+ int *errRtrn)
+{
+register xkbVModMapWireDesc * wire = *wireRtrn;
+register unsigned i;
+int first,last;
+
+ if (((req->present&XkbVirtualModMapMask)==0)||(req->nVModMapKeys<1)) {
+ req->present&= ~XkbVirtualModMapMask;
+ req->nVModMapKeys= 0;
+ return 1;
+ }
+ first= req->firstVModMapKey;
+ last= first+req->nVModMapKeys-1;
+ if (first<req->minKeyCode) {
+ *errRtrn = _XkbErrCode3(0x71,first,req->minKeyCode);
+ return 0;
+ }
+ if (last>req->maxKeyCode) {
+ *errRtrn = _XkbErrCode3(0x72,last,req->maxKeyCode);
+ return 0;
+ }
+ for (i=0;i<req->totalVModMapKeys;i++,wire++) {
+ if ((wire->key<first)||(wire->key>last)) {
+ *errRtrn = _XkbErrCode4(0x73,first,last,wire->key);
+ return 0;
+ }
+ }
+ *wireRtrn= wire;
+ return 1;
+}
+
+static char *
+SetKeyTypes( XkbDescPtr xkb,
+ xkbSetMapReq * req,
+ xkbKeyTypeWireDesc * wire,
+ XkbChangesPtr changes)
+{
+register unsigned i;
+unsigned first,last;
+CARD8 *map;
+
+ if ((unsigned)(req->firstType+req->nTypes)>xkb->map->size_types) {
+ i= req->firstType+req->nTypes;
+ if (XkbAllocClientMap(xkb,XkbKeyTypesMask,i)!=Success) {
+ return NULL;
+ }
+ }
+ if ((unsigned)(req->firstType+req->nTypes)>xkb->map->num_types)
+ xkb->map->num_types= req->firstType+req->nTypes;
+
+ for (i=0;i<req->nTypes;i++) {
+ XkbKeyTypePtr pOld;
+ register unsigned n;
+
+ if (XkbResizeKeyType(xkb,i+req->firstType,wire->nMapEntries,
+ wire->preserve,wire->numLevels)!=Success) {
+ return NULL;
+ }
+ pOld = &xkb->map->types[i+req->firstType];
+ map = (CARD8 *)&wire[1];
+
+ pOld->mods.real_mods = wire->realMods;
+ pOld->mods.vmods= wire->virtualMods;
+ pOld->num_levels = wire->numLevels;
+ pOld->map_count= wire->nMapEntries;
+
+ pOld->mods.mask= pOld->mods.real_mods|
+ XkbMaskForVMask(xkb,pOld->mods.vmods);
+
+ if (wire->nMapEntries) {
+ xkbKTSetMapEntryWireDesc *mapWire;
+ xkbModsWireDesc *preWire;
+ unsigned tmp;
+ mapWire= (xkbKTSetMapEntryWireDesc *)map;
+ preWire= (xkbModsWireDesc *)&mapWire[wire->nMapEntries];
+ for (n=0;n<wire->nMapEntries;n++) {
+ pOld->map[n].active= 1;
+ pOld->map[n].mods.mask= mapWire[n].realMods;
+ pOld->map[n].mods.real_mods= mapWire[n].realMods;
+ pOld->map[n].mods.vmods= mapWire[n].virtualMods;
+ pOld->map[n].level= mapWire[n].level;
+ if (mapWire[n].virtualMods!=0) {
+ tmp= XkbMaskForVMask(xkb,mapWire[n].virtualMods);
+ pOld->map[n].active= (tmp!=0);
+ pOld->map[n].mods.mask|= tmp;
+ }
+ if (wire->preserve) {
+ pOld->preserve[n].real_mods= preWire[n].realMods;
+ pOld->preserve[n].vmods= preWire[n].virtualMods;
+ tmp= XkbMaskForVMask(xkb,preWire[n].virtualMods);
+ pOld->preserve[n].mask= preWire[n].realMods|tmp;
+ }
+ }
+ if (wire->preserve)
+ map= (CARD8 *)&preWire[wire->nMapEntries];
+ else map= (CARD8 *)&mapWire[wire->nMapEntries];
+ }
+ else map= (CARD8 *)&wire[1];
+ wire = (xkbKeyTypeWireDesc *)map;
+ }
+ first= req->firstType;
+ last= first+req->nTypes-1; /* last changed type */
+ if (changes->map.changed&XkbKeyTypesMask) {
+ int oldLast;
+ oldLast= changes->map.first_type+changes->map.num_types-1;
+ if (changes->map.first_type<first)
+ first= changes->map.first_type;
+ if (oldLast>last)
+ last= oldLast;
+ }
+ changes->map.changed|= XkbKeyTypesMask;
+ changes->map.first_type = first;
+ changes->map.num_types = (last-first)+1;
+ return (char *)wire;
+}
+
+static char *
+SetKeySyms( ClientPtr client,
+ XkbDescPtr xkb,
+ xkbSetMapReq * req,
+ xkbSymMapWireDesc * wire,
+ XkbChangesPtr changes,
+ DeviceIntPtr dev)
+{
+register unsigned i,s;
+XkbSymMapPtr oldMap;
+KeySym * newSyms;
+KeySym * pSyms;
+unsigned first,last;
+
+ oldMap = &xkb->map->key_sym_map[req->firstKeySym];
+ for (i=0;i<req->nKeySyms;i++,oldMap++) {
+ pSyms = (KeySym *)&wire[1];
+ if (wire->nSyms>0) {
+ newSyms = XkbResizeKeySyms(xkb,i+req->firstKeySym,wire->nSyms);
+ for (s=0;s<wire->nSyms;s++) {
+ newSyms[s]= pSyms[s];
+ }
+ if (client->swapped) {
+ int n;
+ for (s=0;s<wire->nSyms;s++) {
+ swapl(&newSyms[s],n);
+ }
+ }
+ }
+ oldMap->kt_index[0] = wire->ktIndex[0];
+ oldMap->kt_index[1] = wire->ktIndex[1];
+ oldMap->kt_index[2] = wire->ktIndex[2];
+ oldMap->kt_index[3] = wire->ktIndex[3];
+ oldMap->group_info = wire->groupInfo;
+ oldMap->width = wire->width;
+ wire= (xkbSymMapWireDesc *)&pSyms[wire->nSyms];
+ }
+ first= req->firstKeySym;
+ last= first+req->nKeySyms-1;
+ if (changes->map.changed&XkbKeySymsMask) {
+ int oldLast= (changes->map.first_key_sym+changes->map.num_key_syms-1);
+ if (changes->map.first_key_sym<first)
+ first= changes->map.first_key_sym;
+ if (oldLast>last)
+ last= oldLast;
+ }
+ changes->map.changed|= XkbKeySymsMask;
+ changes->map.first_key_sym = first;
+ changes->map.num_key_syms = (last-first+1);
+
+ s= 0;
+ for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
+ if (XkbKeyNumGroups(xkb,i)>s)
+ s= XkbKeyNumGroups(xkb,i);
+ }
+ if (s!=xkb->ctrls->num_groups) {
+ xkbControlsNotify cn;
+ XkbControlsRec old;
+ cn.keycode= 0;
+ cn.eventType= 0;
+ cn.requestMajor= XkbReqCode;
+ cn.requestMinor= X_kbSetMap;
+ old= *xkb->ctrls;
+ xkb->ctrls->num_groups= s;
+ if (XkbComputeControlsNotify(dev,&old,xkb->ctrls,&cn,FALSE))
+ XkbSendControlsNotify(dev,&cn);
+ }
+ return (char *)wire;
+}
+
+static char *
+SetKeyActions( XkbDescPtr xkb,
+ xkbSetMapReq * req,
+ CARD8 * wire,
+ XkbChangesPtr changes)
+{
+register unsigned i,first,last;
+CARD8 * nActs = wire;
+XkbAction * newActs;
+
+ wire+= XkbPaddedSize(req->nKeyActs);
+ for (i=0;i<req->nKeyActs;i++) {
+ if (nActs[i]==0)
+ xkb->server->key_acts[i+req->firstKeyAct]= 0;
+ else {
+ newActs= XkbResizeKeyActions(xkb,i+req->firstKeyAct,nActs[i]);
+ memcpy((char *)newActs,(char *)wire,
+ nActs[i]*SIZEOF(xkbActionWireDesc));
+ wire+= nActs[i]*SIZEOF(xkbActionWireDesc);
+ }
+ }
+ first= req->firstKeyAct;
+ last= (first+req->nKeyActs-1);
+ if (changes->map.changed&XkbKeyActionsMask) {
+ int oldLast;
+ oldLast= changes->map.first_key_act+changes->map.num_key_acts-1;
+ if (changes->map.first_key_act<first)
+ first= changes->map.first_key_act;
+ if (oldLast>last)
+ last= oldLast;
+ }
+ changes->map.changed|= XkbKeyActionsMask;
+ changes->map.first_key_act= first;
+ changes->map.num_key_acts= (last-first+1);
+ return (char *)wire;
+}
+
+static char *
+SetKeyBehaviors( XkbSrvInfoPtr xkbi,
+ xkbSetMapReq *req,
+ xkbBehaviorWireDesc *wire,
+ XkbChangesPtr changes)
+{
+register unsigned i;
+int maxRG = -1;
+XkbDescPtr xkb = xkbi->desc;
+XkbServerMapPtr server = xkb->server;
+unsigned first,last;
+
+ first= req->firstKeyBehavior;
+ last= req->firstKeyBehavior+req->nKeyBehaviors-1;
+ memset(&server->behaviors[first], 0, req->nKeyBehaviors*sizeof(XkbBehavior));
+ for (i=0;i<req->totalKeyBehaviors;i++) {
+ if ((server->behaviors[wire->key].type&XkbKB_Permanent)==0) {
+ server->behaviors[wire->key].type= wire->type;
+ server->behaviors[wire->key].data= wire->data;
+ if ((wire->type==XkbKB_RadioGroup)&&(((int)wire->data)>maxRG))
+ maxRG= wire->data + 1;
+ }
+ wire++;
+ }
+
+ if (maxRG>(int)xkbi->nRadioGroups) {
+ int sz = maxRG*sizeof(XkbRadioGroupRec);
+ if (xkbi->radioGroups)
+ xkbi->radioGroups= realloc(xkbi->radioGroups,sz);
+ else xkbi->radioGroups= calloc(1, sz);
+ if (xkbi->radioGroups) {
+ if (xkbi->nRadioGroups)
+ memset(&xkbi->radioGroups[xkbi->nRadioGroups], 0,
+ (maxRG-xkbi->nRadioGroups)*sizeof(XkbRadioGroupRec));
+ xkbi->nRadioGroups= maxRG;
+ }
+ else xkbi->nRadioGroups= 0;
+ /* should compute members here */
+ }
+ if (changes->map.changed&XkbKeyBehaviorsMask) {
+ unsigned oldLast;
+ oldLast= changes->map.first_key_behavior+
+ changes->map.num_key_behaviors-1;
+ if (changes->map.first_key_behavior<req->firstKeyBehavior)
+ first= changes->map.first_key_behavior;
+ if (oldLast>last)
+ last= oldLast;
+ }
+ changes->map.changed|= XkbKeyBehaviorsMask;
+ changes->map.first_key_behavior = first;
+ changes->map.num_key_behaviors = (last-first+1);
+ return (char *)wire;
+}
+
+static char *
+SetVirtualMods(XkbSrvInfoPtr xkbi,xkbSetMapReq *req,CARD8 *wire,
+ XkbChangesPtr changes)
+{
+register int i,bit,nMods;
+XkbServerMapPtr srv = xkbi->desc->server;
+
+ if (((req->present&XkbVirtualModsMask)==0)||(req->virtualMods==0))
+ return (char *)wire;
+ for (i=nMods=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
+ if (req->virtualMods&bit) {
+ if (srv->vmods[i]!=wire[nMods]) {
+ changes->map.changed|= XkbVirtualModsMask;
+ changes->map.vmods|= bit;
+ srv->vmods[i]= wire[nMods];
+ }
+ nMods++;
+ }
+ }
+ return (char *)(wire+XkbPaddedSize(nMods));
+}
+
+static char *
+SetKeyExplicit(XkbSrvInfoPtr xkbi,xkbSetMapReq *req,CARD8 *wire,
+ XkbChangesPtr changes)
+{
+register unsigned i,first,last;
+XkbServerMapPtr xkb = xkbi->desc->server;
+CARD8 * start;
+
+ start= wire;
+ first= req->firstKeyExplicit;
+ last= req->firstKeyExplicit+req->nKeyExplicit-1;
+ memset(&xkb->explicit[first], 0, req->nKeyExplicit);
+ for (i=0;i<req->totalKeyExplicit;i++,wire+= 2) {
+ xkb->explicit[wire[0]]= wire[1];
+ }
+ if (first>0) {
+ if (changes->map.changed&XkbExplicitComponentsMask) {
+ int oldLast;
+ oldLast= changes->map.first_key_explicit+
+ changes->map.num_key_explicit-1;
+ if (changes->map.first_key_explicit<first)
+ first= changes->map.first_key_explicit;
+ if (oldLast>last)
+ last= oldLast;
+ }
+ changes->map.first_key_explicit= first;
+ changes->map.num_key_explicit= (last-first)+1;
+ }
+ wire+= XkbPaddedSize(wire-start)-(wire-start);
+ return (char *)wire;
+}
+
+static char *
+SetModifierMap( XkbSrvInfoPtr xkbi,
+ xkbSetMapReq * req,
+ CARD8 * wire,
+ XkbChangesPtr changes)
+{
+register unsigned i,first,last;
+XkbClientMapPtr xkb = xkbi->desc->map;
+CARD8 * start;
+
+ start= wire;
+ first= req->firstModMapKey;
+ last= req->firstModMapKey+req->nModMapKeys-1;
+ memset(&xkb->modmap[first], 0, req->nModMapKeys);
+ for (i=0;i<req->totalModMapKeys;i++,wire+= 2) {
+ xkb->modmap[wire[0]]= wire[1];
+ }
+ if (first>0) {
+ if (changes->map.changed&XkbModifierMapMask) {
+ int oldLast;
+ oldLast= changes->map.first_modmap_key+
+ changes->map.num_modmap_keys-1;
+ if (changes->map.first_modmap_key<first)
+ first= changes->map.first_modmap_key;
+ if (oldLast>last)
+ last= oldLast;
+ }
+ changes->map.first_modmap_key= first;
+ changes->map.num_modmap_keys= (last-first)+1;
+ }
+ wire+= XkbPaddedSize(wire-start)-(wire-start);
+ return (char *)wire;
+}
+
+static char *
+SetVirtualModMap( XkbSrvInfoPtr xkbi,
+ xkbSetMapReq * req,
+ xkbVModMapWireDesc * wire,
+ XkbChangesPtr changes)
+{
+register unsigned i,first,last;
+XkbServerMapPtr srv = xkbi->desc->server;
+
+ first= req->firstVModMapKey;
+ last= req->firstVModMapKey+req->nVModMapKeys-1;
+ memset(&srv->vmodmap[first], 0, req->nVModMapKeys*sizeof(unsigned short));
+ for (i=0;i<req->totalVModMapKeys;i++,wire++) {
+ srv->vmodmap[wire->key]= wire->vmods;
+ }
+ if (first>0) {
+ if (changes->map.changed&XkbVirtualModMapMask) {
+ int oldLast;
+ oldLast= changes->map.first_vmodmap_key+
+ changes->map.num_vmodmap_keys-1;
+ if (changes->map.first_vmodmap_key<first)
+ first= changes->map.first_vmodmap_key;
+ if (oldLast>last)
+ last= oldLast;
+ }
+ changes->map.first_vmodmap_key= first;
+ changes->map.num_vmodmap_keys= (last-first)+1;
+ }
+ return (char *)wire;
+}
+
+/**
+ * Check if the given request can be applied to the given device but don't
+ * actually do anything..
+ */
+static int
+_XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char* values)
+{
+ XkbSrvInfoPtr xkbi;
+ XkbDescPtr xkb;
+ int error;
+ int nTypes = 0, nActions;
+ CARD8 mapWidths[XkbMaxLegalKeyCode + 1] = {0};
+ CARD16 symsPerKey[XkbMaxLegalKeyCode + 1] = {0};
+ XkbSymMapPtr map;
+ int i;
+
+ xkbi= dev->key->xkbInfo;
+ xkb = xkbi->desc;
+
+ if ((xkb->min_key_code != req->minKeyCode)||
+ (xkb->max_key_code != req->maxKeyCode)) {
+ if (client->vMajor!=1) { /* pre 1.0 versions of Xlib have a bug */
+ req->minKeyCode= xkb->min_key_code;
+ req->maxKeyCode= xkb->max_key_code;
+ }
+ else {
+ if (!XkbIsLegalKeycode(req->minKeyCode)) {
+ client->errorValue = _XkbErrCode3(2, req->minKeyCode, req->maxKeyCode);
+ return BadValue;
+ }
+ if (req->minKeyCode > req->maxKeyCode) {
+ client->errorValue = _XkbErrCode3(3, req->minKeyCode, req->maxKeyCode);
+ return BadMatch;
+ }
+ }
+ }
+
+ if ((req->present & XkbKeyTypesMask) &&
+ (!CheckKeyTypes(client,xkb,req,(xkbKeyTypeWireDesc **)&values,
+ &nTypes,mapWidths))) {
+ client->errorValue = nTypes;
+ return BadValue;
+ }
+
+ /* symsPerKey/mapWidths must be filled regardless of client-side flags */
+ map = &xkb->map->key_sym_map[xkb->min_key_code];
+ for (i=xkb->min_key_code;i<xkb->max_key_code;i++,map++) {
+ register int g,ng,w;
+ ng= XkbNumGroups(map->group_info);
+ for (w=g=0;g<ng;g++) {
+ if (map->kt_index[g]>=(unsigned)nTypes) {
+ client->errorValue = _XkbErrCode4(0x13,i,g,map->kt_index[g]);
+ return 0;
+ }
+ if (mapWidths[map->kt_index[g]]>w)
+ w= mapWidths[map->kt_index[g]];
+ }
+ symsPerKey[i] = w*ng;
+ }
+
+ if ((req->present & XkbKeySymsMask) &&
+ (!CheckKeySyms(client,xkb,req,nTypes,mapWidths,symsPerKey,
+ (xkbSymMapWireDesc **)&values,&error))) {
+ client->errorValue = error;
+ return BadValue;
+ }
+
+ if ((req->present & XkbKeyActionsMask) &&
+ (!CheckKeyActions(xkb,req,nTypes,mapWidths,symsPerKey,
+ (CARD8 **)&values,&nActions))) {
+ client->errorValue = nActions;
+ return BadValue;
+ }
+
+ if ((req->present & XkbKeyBehaviorsMask) &&
+ (!CheckKeyBehaviors(xkb,req,(xkbBehaviorWireDesc**)&values,&error))) {
+ client->errorValue = error;
+ return BadValue;
+ }
+
+ if ((req->present & XkbVirtualModsMask) &&
+ (!CheckVirtualMods(xkb,req,(CARD8 **)&values,&error))) {
+ client->errorValue= error;
+ return BadValue;
+ }
+ if ((req->present&XkbExplicitComponentsMask) &&
+ (!CheckKeyExplicit(xkb,req,(CARD8 **)&values,&error))) {
+ client->errorValue= error;
+ return BadValue;
+ }
+ if ((req->present&XkbModifierMapMask) &&
+ (!CheckModifierMap(xkb,req,(CARD8 **)&values,&error))) {
+ client->errorValue= error;
+ return BadValue;
+ }
+ if ((req->present&XkbVirtualModMapMask) &&
+ (!CheckVirtualModMap(xkb,req,(xkbVModMapWireDesc **)&values,&error))) {
+ client->errorValue= error;
+ return BadValue;
+ }
+
+ if (((values-((char *)req))/4)!= req->length) {
+ ErrorF("[xkb] Internal error! Bad length in XkbSetMap (after check)\n");
+ client->errorValue = values-((char *)&req[1]);
+ return BadLength;
+ }
+
+ return Success;
+}
+
+/**
+ * Apply the given request on the given device.
+ */
+static int
+_XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char *values)
+{
+ XkbEventCauseRec cause;
+ XkbChangesRec change;
+ Bool sentNKN;
+ XkbSrvInfoPtr xkbi;
+ XkbDescPtr xkb;
+
+ xkbi= dev->key->xkbInfo;
+ xkb = xkbi->desc;
+
+ XkbSetCauseXkbReq(&cause,X_kbSetMap,client);
+ memset(&change, 0, sizeof(change));
+ sentNKN = FALSE;
+ if ((xkb->min_key_code!=req->minKeyCode)||
+ (xkb->max_key_code!=req->maxKeyCode)) {
+ Status status;
+ xkbNewKeyboardNotify nkn;
+ nkn.deviceID = nkn.oldDeviceID = dev->id;
+ nkn.oldMinKeyCode = xkb->min_key_code;
+ nkn.oldMaxKeyCode = xkb->max_key_code;
+ status= XkbChangeKeycodeRange(xkb, req->minKeyCode,
+ req->maxKeyCode, &change);
+ if (status != Success)
+ return status; /* oh-oh. what about the other keyboards? */
+ nkn.minKeyCode = xkb->min_key_code;
+ nkn.maxKeyCode = xkb->max_key_code;
+ nkn.requestMajor = XkbReqCode;
+ nkn.requestMinor = X_kbSetMap;
+ nkn.changed = XkbNKN_KeycodesMask;
+ XkbSendNewKeyboardNotify(dev,&nkn);
+ sentNKN = TRUE;
+ }
+
+ if (req->present&XkbKeyTypesMask) {
+ values = SetKeyTypes(xkb,req,(xkbKeyTypeWireDesc *)values,&change);
+ if (!values) goto allocFailure;
+ }
+ if (req->present&XkbKeySymsMask) {
+ values = SetKeySyms(client,xkb,req,(xkbSymMapWireDesc *)values,&change,dev);
+ if (!values) goto allocFailure;
+ }
+ if (req->present&XkbKeyActionsMask) {
+ values = SetKeyActions(xkb,req,(CARD8 *)values,&change);
+ if (!values) goto allocFailure;
+ }
+ if (req->present&XkbKeyBehaviorsMask) {
+ values= SetKeyBehaviors(xkbi,req,(xkbBehaviorWireDesc *)values,&change);
+ if (!values) goto allocFailure;
+ }
+ if (req->present&XkbVirtualModsMask)
+ values= SetVirtualMods(xkbi,req,(CARD8 *)values,&change);
+ if (req->present&XkbExplicitComponentsMask)
+ values= SetKeyExplicit(xkbi,req,(CARD8 *)values,&change);
+ if (req->present&XkbModifierMapMask)
+ values= SetModifierMap(xkbi,req,(CARD8 *)values,&change);
+ if (req->present&XkbVirtualModMapMask)
+ values= SetVirtualModMap(xkbi,req,(xkbVModMapWireDesc *)values,&change);
+ if (((values-((char *)req))/4)!=req->length) {
+ ErrorF("[xkb] Internal error! Bad length in XkbSetMap (after set)\n");
+ client->errorValue = values-((char *)&req[1]);
+ return BadLength;
+ }
+ if (req->flags&XkbSetMapRecomputeActions) {
+ KeyCode first,last,firstMM,lastMM;
+ if (change.map.num_key_syms>0) {
+ first= change.map.first_key_sym;
+ last= first+change.map.num_key_syms-1;
+ }
+ else first= last= 0;
+ if (change.map.num_modmap_keys>0) {
+ firstMM= change.map.first_modmap_key;
+ lastMM= first+change.map.num_modmap_keys-1;
+ }
+ else firstMM= lastMM= 0;
+ if ((last>0) && (lastMM>0)) {
+ if (firstMM<first)
+ first= firstMM;
+ if (lastMM>last)
+ last= lastMM;
+ }
+ else if (lastMM>0) {
+ first= firstMM;
+ last= lastMM;
+ }
+ if (last>0) {
+ unsigned check= 0;
+ XkbUpdateActions(dev,first,(last-first+1),&change,&check,&cause);
+ if (check)
+ XkbCheckSecondaryEffects(xkbi,check,&change,&cause);
+ }
+ }
+ if (!sentNKN)
+ XkbSendNotification(dev,&change,&cause);
+
+ return Success;
+allocFailure:
+ return BadAlloc;
+}
+
+
+int
+ProcXkbSetMap(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ char * tmp;
+ int rc;
+
+ REQUEST(xkbSetMapReq);
+ REQUEST_AT_LEAST_SIZE(xkbSetMapReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+ CHK_MASK_LEGAL(0x01,stuff->present,XkbAllMapComponentsMask);
+
+ tmp = (char *)&stuff[1];
+
+ /* Check if we can to the SetMap on the requested device. If this
+ succeeds, do the same thing for all extension devices (if needed).
+ If any of them fails, fail. */
+ rc = _XkbSetMapChecks(client, dev, stuff, tmp);
+
+ if (rc != Success)
+ return rc;
+
+ if (stuff->deviceSpec == XkbUseCoreKbd)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
+ {
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+ if (rc == Success)
+ {
+ rc = _XkbSetMapChecks(client, other, stuff, tmp);
+ if (rc != Success)
+ return rc;
+ }
+ }
+ }
+ }
+
+ /* We know now that we will succed with the SetMap. In theory anyway. */
+ rc = _XkbSetMap(client, dev, stuff, tmp);
+ if (rc != Success)
+ return rc;
+
+ if (stuff->deviceSpec == XkbUseCoreKbd)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
+ {
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+ if (rc == Success)
+ _XkbSetMap(client, other, stuff, tmp);
+ /* ignore rc. if the SetMap failed although the check above
+ reported true there isn't much we can do. we still need to
+ set all other devices, hoping that at least they stay in
+ sync. */
+ }
+ }
+ }
+
+ return Success;
+}
+
+/***====================================================================***/
+
+static Status
+XkbComputeGetCompatMapReplySize( XkbCompatMapPtr compat,
+ xkbGetCompatMapReply * rep)
+{
+unsigned size,nGroups;
+
+ nGroups= 0;
+ if (rep->groups!=0) {
+ register int i,bit;
+ for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
+ if (rep->groups&bit)
+ nGroups++;
+ }
+ }
+ size= nGroups*SIZEOF(xkbModsWireDesc);
+ size+= (rep->nSI*SIZEOF(xkbSymInterpretWireDesc));
+ rep->length= size/4;
+ return Success;
+}
+
+static int
+XkbSendCompatMap( ClientPtr client,
+ XkbCompatMapPtr compat,
+ xkbGetCompatMapReply * rep)
+{
+char * data;
+int size;
+
+ size= rep->length*4;
+ if (size>0) {
+ data = malloc(size);
+ if (data) {
+ register unsigned i,bit;
+ xkbModsWireDesc * grp;
+ XkbSymInterpretPtr sym= &compat->sym_interpret[rep->firstSI];
+ xkbSymInterpretWireDesc *wire = (xkbSymInterpretWireDesc *)data;
+ for (i=0;i<rep->nSI;i++,sym++,wire++) {
+ wire->sym= sym->sym;
+ wire->mods= sym->mods;
+ wire->match= sym->match;
+ wire->virtualMod= sym->virtual_mod;
+ wire->flags= sym->flags;
+ memcpy((char*)&wire->act,(char*)&sym->act,sz_xkbActionWireDesc);
+ if (client->swapped) {
+ register int n;
+ swapl(&wire->sym,n);
+ }
+ }
+ if (rep->groups) {
+ grp = (xkbModsWireDesc *)wire;
+ for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
+ if (rep->groups&bit) {
+ grp->mask= compat->groups[i].mask;
+ grp->realMods= compat->groups[i].real_mods;
+ grp->virtualMods= compat->groups[i].vmods;
+ if (client->swapped) {
+ register int n;
+ swaps(&grp->virtualMods,n);
+ }
+ grp++;
+ }
+ }
+ wire= (xkbSymInterpretWireDesc*)grp;
+ }
+ }
+ else return BadAlloc;
+ }
+ else data= NULL;
+
+ if (client->swapped) {
+ register int n;
+ swaps(&rep->sequenceNumber,n);
+ swapl(&rep->length,n);
+ swaps(&rep->firstSI,n);
+ swaps(&rep->nSI,n);
+ swaps(&rep->nTotalSI,n);
+ }
+
+ WriteToClient(client, SIZEOF(xkbGetCompatMapReply), (char *)rep);
+ if (data) {
+ WriteToClient(client, size, data);
+ free((char *)data);
+ }
+ return Success;
+}
+
+int
+ProcXkbGetCompatMap(ClientPtr client)
+{
+ xkbGetCompatMapReply rep;
+ DeviceIntPtr dev;
+ XkbDescPtr xkb;
+ XkbCompatMapPtr compat;
+
+ REQUEST(xkbGetCompatMapReq);
+ REQUEST_SIZE_MATCH(xkbGetCompatMapReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
+
+ xkb = dev->key->xkbInfo->desc;
+ compat= xkb->compat;
+
+ rep.type = X_Reply;
+ rep.deviceID = dev->id;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.firstSI = stuff->firstSI;
+ rep.nSI = stuff->nSI;
+ if (stuff->getAllSI) {
+ rep.firstSI = 0;
+ rep.nSI = compat->num_si;
+ }
+ else if ((((unsigned)stuff->nSI)>0)&&
+ ((unsigned)(stuff->firstSI+stuff->nSI-1)>=compat->num_si)) {
+ client->errorValue = _XkbErrCode2(0x05,compat->num_si);
+ return BadValue;
+ }
+ rep.nTotalSI = compat->num_si;
+ rep.groups= stuff->groups;
+ XkbComputeGetCompatMapReplySize(compat,&rep);
+ return XkbSendCompatMap(client,compat,&rep);
+}
+
+/**
+ * Apply the given request on the given device.
+ * If dryRun is TRUE, then value checks are performed, but the device isn't
+ * modified.
+ */
+static int
+_XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
+ xkbSetCompatMapReq *req, char* data, BOOL dryRun)
+{
+ XkbSrvInfoPtr xkbi;
+ XkbDescPtr xkb;
+ XkbCompatMapPtr compat;
+ int nGroups;
+ unsigned i,bit;
+
+ xkbi = dev->key->xkbInfo;
+ xkb = xkbi->desc;
+ compat = xkb->compat;
+
+ if ((req->nSI>0)||(req->truncateSI)) {
+ xkbSymInterpretWireDesc *wire;
+ if (req->firstSI>compat->num_si) {
+ client->errorValue = _XkbErrCode2(0x02,compat->num_si);
+ return BadValue;
+ }
+ wire= (xkbSymInterpretWireDesc *)data;
+ wire+= req->nSI;
+ data = (char *)wire;
+ }
+
+ nGroups= 0;
+ if (req->groups!=0) {
+ for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
+ if ( req->groups&bit )
+ nGroups++;
+ }
+ }
+ data+= nGroups*SIZEOF(xkbModsWireDesc);
+ if (((data-((char *)req))/4)!=req->length) {
+ return BadLength;
+ }
+
+ /* Done all the checks we can do */
+ if (dryRun)
+ return Success;
+
+ data = (char *)&req[1];
+ if (req->nSI>0) {
+ xkbSymInterpretWireDesc *wire = (xkbSymInterpretWireDesc *)data;
+ XkbSymInterpretPtr sym;
+ if ((unsigned)(req->firstSI+req->nSI)>compat->num_si) {
+ compat->num_si= req->firstSI+req->nSI;
+ compat->sym_interpret= realloc(compat->sym_interpret,
+ compat->num_si * sizeof(XkbSymInterpretRec));
+ if (!compat->sym_interpret) {
+ compat->num_si= 0;
+ return BadAlloc;
+ }
+ }
+ else if (req->truncateSI) {
+ compat->num_si = req->firstSI+req->nSI;
+ }
+ sym = &compat->sym_interpret[req->firstSI];
+ for (i=0;i<req->nSI;i++,wire++,sym++) {
+ if (client->swapped) {
+ int n;
+ swapl(&wire->sym,n);
+ }
+ sym->sym= wire->sym;
+ sym->mods= wire->mods;
+ sym->match= wire->match;
+ sym->flags= wire->flags;
+ sym->virtual_mod= wire->virtualMod;
+ memcpy((char *)&sym->act,(char *)&wire->act,
+ SIZEOF(xkbActionWireDesc));
+ }
+ data = (char *)wire;
+ }
+ else if (req->truncateSI) {
+ compat->num_si = req->firstSI;
+ }
+
+ if (req->groups!=0) {
+ unsigned i, bit;
+ xkbModsWireDesc *wire = (xkbModsWireDesc *)data;
+ for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) {
+ if (req->groups & bit) {
+ if (client->swapped) {
+ int n;
+ swaps(&wire->virtualMods,n);
+ }
+ compat->groups[i].mask= wire->realMods;
+ compat->groups[i].real_mods= wire->realMods;
+ compat->groups[i].vmods= wire->virtualMods;
+ if (wire->virtualMods!=0) {
+ unsigned tmp;
+ tmp= XkbMaskForVMask(xkb,wire->virtualMods);
+ compat->groups[i].mask|= tmp;
+ }
+ data+= SIZEOF(xkbModsWireDesc);
+ wire= (xkbModsWireDesc *)data;
+ }
+ }
+ }
+ i= XkbPaddedSize((data-((char *)req)));
+ if ((i/4)!=req->length) {
+ ErrorF("[xkb] Internal length error on read in _XkbSetCompatMap\n");
+ return BadLength;
+ }
+
+ if (dev->xkb_interest) {
+ xkbCompatMapNotify ev;
+ ev.deviceID = dev->id;
+ ev.changedGroups = req->groups;
+ ev.firstSI = req->firstSI;
+ ev.nSI = req->nSI;
+ ev.nTotalSI = compat->num_si;
+ XkbSendCompatMapNotify(dev,&ev);
+ }
+
+ if (req->recomputeActions) {
+ XkbChangesRec change;
+ unsigned check;
+ XkbEventCauseRec cause;
+
+ XkbSetCauseXkbReq(&cause,X_kbSetCompatMap,client);
+ memset(&change, 0, sizeof(XkbChangesRec));
+ XkbUpdateActions(dev,xkb->min_key_code,XkbNumKeys(xkb),&change,&check,
+ &cause);
+ if (check)
+ XkbCheckSecondaryEffects(xkbi,check,&change,&cause);
+ XkbSendNotification(dev,&change,&cause);
+ }
+ return Success;
+}
+
+int
+ProcXkbSetCompatMap(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ char *data;
+ int rc;
+
+ REQUEST(xkbSetCompatMapReq);
+ REQUEST_AT_LEAST_SIZE(xkbSetCompatMapReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+
+ data = (char *)&stuff[1];
+
+ /* check first using a dry-run */
+ rc = _XkbSetCompatMap(client, dev, stuff, data, TRUE);
+ if (rc != Success)
+ return rc;
+ if (stuff->deviceSpec == XkbUseCoreKbd)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
+ {
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+ if (rc == Success)
+ {
+ /* dry-run */
+ rc = _XkbSetCompatMap(client, other, stuff, data, TRUE);
+ if (rc != Success)
+ return rc;
+ }
+ }
+ }
+ }
+
+ /* Yay, the dry-runs succeed. Let's apply */
+ rc = _XkbSetCompatMap(client, dev, stuff, data, FALSE);
+ if (rc != Success)
+ return rc;
+ if (stuff->deviceSpec == XkbUseCoreKbd)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
+ {
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+ if (rc == Success)
+ {
+ rc = _XkbSetCompatMap(client, other, stuff, data, FALSE);
+ if (rc != Success)
+ return rc;
+ }
+ }
+ }
+ }
+
+ return Success;
+}
+
+/***====================================================================***/
+
+int
+ProcXkbGetIndicatorState(ClientPtr client)
+{
+ xkbGetIndicatorStateReply rep;
+ XkbSrvLedInfoPtr sli;
+ DeviceIntPtr dev;
+ register int i;
+
+ REQUEST(xkbGetIndicatorStateReq);
+ REQUEST_SIZE_MATCH(xkbGetIndicatorStateReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
+
+ sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,
+ XkbXI_IndicatorStateMask);
+ if (!sli)
+ return BadAlloc;
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.deviceID = dev->id;
+ rep.state = sli->effectiveState;
+
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber,i);
+ swapl(&rep.state,i);
+ }
+ WriteToClient(client, SIZEOF(xkbGetIndicatorStateReply), (char *)&rep);
+ return Success;
+}
+
+/***====================================================================***/
+
+static Status
+XkbComputeGetIndicatorMapReplySize(
+ XkbIndicatorPtr indicators,
+ xkbGetIndicatorMapReply *rep)
+{
+register int i,bit;
+int nIndicators;
+
+ rep->realIndicators = indicators->phys_indicators;
+ for (i=nIndicators=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
+ if (rep->which&bit)
+ nIndicators++;
+ }
+ rep->length = (nIndicators*SIZEOF(xkbIndicatorMapWireDesc))/4;
+ return Success;
+}
+
+static int
+XkbSendIndicatorMap( ClientPtr client,
+ XkbIndicatorPtr indicators,
+ xkbGetIndicatorMapReply * rep)
+{
+int length;
+CARD8 * map;
+register int i;
+register unsigned bit;
+
+ length = rep->length*4;
+ if (length>0) {
+ CARD8 *to;
+ to= map= malloc(length);
+ if (map) {
+ xkbIndicatorMapWireDesc *wire = (xkbIndicatorMapWireDesc *)to;
+ for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
+ if (rep->which&bit) {
+ wire->flags= indicators->maps[i].flags;
+ wire->whichGroups= indicators->maps[i].which_groups;
+ wire->groups= indicators->maps[i].groups;
+ wire->whichMods= indicators->maps[i].which_mods;
+ wire->mods= indicators->maps[i].mods.mask;
+ wire->realMods= indicators->maps[i].mods.real_mods;
+ wire->virtualMods= indicators->maps[i].mods.vmods;
+ wire->ctrls= indicators->maps[i].ctrls;
+ if (client->swapped) {
+ register int n;
+ swaps(&wire->virtualMods,n);
+ swapl(&wire->ctrls,n);
+ }
+ wire++;
+ }
+ }
+ to = (CARD8 *)wire;
+ if ((to-map)!=length) {
+ client->errorValue = _XkbErrCode2(0xff,length);
+ free(map);
+ return BadLength;
+ }
+ }
+ else return BadAlloc;
+ }
+ else map = NULL;
+ if (client->swapped) {
+ swaps(&rep->sequenceNumber,i);
+ swapl(&rep->length,i);
+ swapl(&rep->which,i);
+ swapl(&rep->realIndicators,i);
+ }
+ WriteToClient(client, SIZEOF(xkbGetIndicatorMapReply), (char *)rep);
+ if (map) {
+ WriteToClient(client, length, (char *)map);
+ free((char *)map);
+ }
+ return Success;
+}
+
+int
+ProcXkbGetIndicatorMap(ClientPtr client)
+{
+xkbGetIndicatorMapReply rep;
+DeviceIntPtr dev;
+XkbDescPtr xkb;
+XkbIndicatorPtr leds;
+
+ REQUEST(xkbGetIndicatorMapReq);
+ REQUEST_SIZE_MATCH(xkbGetIndicatorMapReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
+
+ xkb= dev->key->xkbInfo->desc;
+ leds= xkb->indicators;
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.deviceID = dev->id;
+ rep.which = stuff->which;
+ XkbComputeGetIndicatorMapReplySize(leds,&rep);
+ return XkbSendIndicatorMap(client,leds,&rep);
+}
+
+/**
+ * Apply the given map to the given device. Which specifies which components
+ * to apply.
+ */
+static int
+_XkbSetIndicatorMap(ClientPtr client, DeviceIntPtr dev,
+ int which, xkbIndicatorMapWireDesc *desc)
+{
+ XkbSrvInfoPtr xkbi;
+ XkbSrvLedInfoPtr sli;
+ XkbEventCauseRec cause;
+ int i, bit;
+
+ xkbi = dev->key->xkbInfo;
+
+ sli= XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId,
+ XkbXI_IndicatorMapsMask);
+ if (!sli)
+ return BadAlloc;
+
+ for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) {
+ if (which & bit) {
+ sli->maps[i].flags = desc->flags;
+ sli->maps[i].which_groups = desc->whichGroups;
+ sli->maps[i].groups = desc->groups;
+ sli->maps[i].which_mods = desc->whichMods;
+ sli->maps[i].mods.mask = desc->mods;
+ sli->maps[i].mods.real_mods = desc->mods;
+ sli->maps[i].mods.vmods= desc->virtualMods;
+ sli->maps[i].ctrls = desc->ctrls;
+ if (desc->virtualMods!=0) {
+ unsigned tmp;
+ tmp= XkbMaskForVMask(xkbi->desc,desc->virtualMods);
+ sli->maps[i].mods.mask= desc->mods|tmp;
+ }
+ desc++;
+ }
+ }
+
+ XkbSetCauseXkbReq(&cause,X_kbSetIndicatorMap,client);
+ XkbApplyLedMapChanges(dev,sli,which,NULL,NULL,&cause);
+
+ return Success;
+}
+
+int
+ProcXkbSetIndicatorMap(ClientPtr client)
+{
+ int i, bit;
+ int nIndicators;
+ DeviceIntPtr dev;
+ xkbIndicatorMapWireDesc *from;
+ int rc;
+
+ REQUEST(xkbSetIndicatorMapReq);
+ REQUEST_AT_LEAST_SIZE(xkbSetIndicatorMapReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
+
+ if (stuff->which==0)
+ return Success;
+
+ for (nIndicators=i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
+ if (stuff->which&bit)
+ nIndicators++;
+ }
+ if (stuff->length!=((SIZEOF(xkbSetIndicatorMapReq)+
+ (nIndicators*SIZEOF(xkbIndicatorMapWireDesc)))/4)) {
+ return BadLength;
+ }
+
+ from = (xkbIndicatorMapWireDesc *)&stuff[1];
+ for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
+ if (stuff->which&bit) {
+ if (client->swapped) {
+ int n;
+ swaps(&from->virtualMods,n);
+ swapl(&from->ctrls,n);
+ }
+ CHK_MASK_LEGAL(i,from->whichGroups,XkbIM_UseAnyGroup);
+ CHK_MASK_LEGAL(i,from->whichMods,XkbIM_UseAnyMods);
+ from++;
+ }
+ }
+
+ from = (xkbIndicatorMapWireDesc *)&stuff[1];
+ rc = _XkbSetIndicatorMap(client, dev, stuff->which, from);
+ if (rc != Success)
+ return rc;
+
+ if (stuff->deviceSpec == XkbUseCoreKbd)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
+ {
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess);
+ if (rc == Success)
+ _XkbSetIndicatorMap(client, other, stuff->which, from);
+ }
+ }
+ }
+
+ return Success;
+}
+
+/***====================================================================***/
+
+int
+ProcXkbGetNamedIndicator(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ xkbGetNamedIndicatorReply rep;
+ register int i = 0;
+ XkbSrvLedInfoPtr sli;
+ XkbIndicatorMapPtr map = NULL;
+
+ REQUEST(xkbGetNamedIndicatorReq);
+ REQUEST_SIZE_MATCH(xkbGetNamedIndicatorReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
+ CHK_ATOM_ONLY(stuff->indicator);
+
+ sli= XkbFindSrvLedInfo(dev,stuff->ledClass,stuff->ledID,0);
+ if (!sli)
+ return BadAlloc;
+
+ i= 0;
+ map= NULL;
+ if ((sli->names)&&(sli->maps)) {
+ for (i=0;i<XkbNumIndicators;i++) {
+ if (stuff->indicator==sli->names[i]) {
+ map= &sli->maps[i];
+ break;
+ }
+ }
+ }
+
+ rep.type= X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.deviceID = dev->id;
+ rep.indicator= stuff->indicator;
+ if (map!=NULL) {
+ rep.found= TRUE;
+ rep.on= ((sli->effectiveState&(1<<i))!=0);
+ rep.realIndicator= ((sli->physIndicators&(1<<i))!=0);
+ rep.ndx= i;
+ rep.flags= map->flags;
+ rep.whichGroups= map->which_groups;
+ rep.groups= map->groups;
+ rep.whichMods= map->which_mods;
+ rep.mods= map->mods.mask;
+ rep.realMods= map->mods.real_mods;
+ rep.virtualMods= map->mods.vmods;
+ rep.ctrls= map->ctrls;
+ rep.supported= TRUE;
+ }
+ else {
+ rep.found= FALSE;
+ rep.on= FALSE;
+ rep.realIndicator= FALSE;
+ rep.ndx= XkbNoIndicator;
+ rep.flags= 0;
+ rep.whichGroups= 0;
+ rep.groups= 0;
+ rep.whichMods= 0;
+ rep.mods= 0;
+ rep.realMods= 0;
+ rep.virtualMods= 0;
+ rep.ctrls= 0;
+ rep.supported= TRUE;
+ }
+ if ( client->swapped ) {
+ register int n;
+ swapl(&rep.length,n);
+ swaps(&rep.sequenceNumber,n);
+ swapl(&rep.indicator,n);
+ swaps(&rep.virtualMods,n);
+ swapl(&rep.ctrls,n);
+ }
+
+ WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), (char *)&rep);
+ return Success;
+}
+
+
+/**
+ * Find the IM on the device.
+ * Returns the map, or NULL if the map doesn't exist.
+ * If the return value is NULL, led_return is undefined. Otherwise, led_return
+ * is set to the led index of the map.
+ */
+static XkbIndicatorMapPtr
+_XkbFindNamedIndicatorMap(XkbSrvLedInfoPtr sli, Atom indicator,
+ int *led_return)
+{
+ XkbIndicatorMapPtr map;
+
+ /* search for the right indicator */
+ map = NULL;
+ if (sli->names && sli->maps) {
+ int led;
+
+ for (led = 0; (led < XkbNumIndicators) && (map == NULL); led++) {
+ if (sli->names[led] == indicator) {
+ map= &sli->maps[led];
+ *led_return = led;
+ break;
+ }
+ }
+ }
+
+ return map;
+}
+
+/**
+ * Creates an indicator map on the device. If dryRun is TRUE, it only checks
+ * if creation is possible, but doesn't actually create it.
+ */
+static int
+_XkbCreateIndicatorMap(DeviceIntPtr dev, Atom indicator,
+ int ledClass, int ledID,
+ XkbIndicatorMapPtr *map_return, int *led_return,
+ Bool dryRun)
+{
+ XkbSrvLedInfoPtr sli;
+ XkbIndicatorMapPtr map;
+ int led;
+
+ sli = XkbFindSrvLedInfo(dev, ledClass, ledID, XkbXI_IndicatorsMask);
+ if (!sli)
+ return BadAlloc;
+
+ map = _XkbFindNamedIndicatorMap(sli, indicator, &led);
+
+ if (!map)
+ {
+ /* find first unused indicator maps and assign the name to it */
+ for (led = 0, map = NULL; (led < XkbNumIndicators) && (map == NULL); led++) {
+ if ((sli->names) && (sli->maps) && (sli->names[led] == None) &&
+ (!XkbIM_InUse(&sli->maps[led])))
+ {
+ map = &sli->maps[led];
+ if (!dryRun)
+ sli->names[led] = indicator;
+ break;
+ }
+ }
+ }
+
+ if (!map)
+ return BadAlloc;
+
+ *led_return = led;
+ *map_return = map;
+ return Success;
+}
+
+static int
+_XkbSetNamedIndicator(ClientPtr client, DeviceIntPtr dev,
+ xkbSetNamedIndicatorReq *stuff)
+{
+ unsigned int extDevReason;
+ unsigned int statec, namec, mapc;
+ XkbSrvLedInfoPtr sli;
+ int led = 0;
+ XkbIndicatorMapPtr map;
+ DeviceIntPtr kbd;
+ XkbEventCauseRec cause;
+ xkbExtensionDeviceNotify ed;
+ XkbChangesRec changes;
+ int rc;
+
+ rc = _XkbCreateIndicatorMap(dev, stuff->indicator, stuff->ledClass,
+ stuff->ledID, &map, &led, FALSE);
+ if (rc != Success || !map) /* oh-oh */
+ return rc;
+
+ sli = XkbFindSrvLedInfo(dev, stuff->ledClass, stuff->ledID,
+ XkbXI_IndicatorsMask);
+ if (!sli)
+ return BadAlloc;
+
+ namec = mapc = statec = 0;
+ extDevReason = 0;
+
+ namec |= (1<<led);
+ sli->namesPresent |= ((stuff->indicator != None) ? (1 << led) : 0);
+ extDevReason |= XkbXI_IndicatorNamesMask;
+
+ if (stuff->setMap) {
+ map->flags = stuff->flags;
+ map->which_groups = stuff->whichGroups;
+ map->groups = stuff->groups;
+ map->which_mods = stuff->whichMods;
+ map->mods.mask = stuff->realMods;
+ map->mods.real_mods = stuff->realMods;
+ map->mods.vmods= stuff->virtualMods;
+ map->ctrls = stuff->ctrls;
+ mapc|= (1<<led);
+ }
+
+ if ((stuff->setState) && ((map->flags & XkbIM_NoExplicit) == 0))
+ {
+ if (stuff->on) sli->explicitState |= (1<<led);
+ else sli->explicitState &= ~(1<<led);
+ statec |= ((sli->effectiveState ^ sli->explicitState) & (1 << led));
+ }
+
+ memset((char *)&ed, 0, sizeof(xkbExtensionDeviceNotify));
+ memset((char *)&changes, 0, sizeof(XkbChangesRec));
+ XkbSetCauseXkbReq(&cause,X_kbSetNamedIndicator,client);
+ if (namec)
+ XkbApplyLedNameChanges(dev,sli,namec,&ed,&changes,&cause);
+ if (mapc)
+ XkbApplyLedMapChanges(dev,sli,mapc,&ed,&changes,&cause);
+ if (statec)
+ XkbApplyLedStateChanges(dev,sli,statec,&ed,&changes,&cause);
+
+ kbd = dev;
+ if ((sli->flags&XkbSLI_HasOwnState)==0)
+ kbd = inputInfo.keyboard;
+ XkbFlushLedEvents(dev, kbd, sli, &ed, &changes, &cause);
+
+ return Success;
+}
+
+int
+ProcXkbSetNamedIndicator(ClientPtr client)
+{
+ int rc;
+ DeviceIntPtr dev;
+ int led = 0;
+ XkbIndicatorMapPtr map;
+
+ REQUEST(xkbSetNamedIndicatorReq);
+ REQUEST_SIZE_MATCH(xkbSetNamedIndicatorReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
+ CHK_ATOM_ONLY(stuff->indicator);
+ CHK_MASK_LEGAL(0x10,stuff->whichGroups,XkbIM_UseAnyGroup);
+ CHK_MASK_LEGAL(0x11,stuff->whichMods,XkbIM_UseAnyMods);
+
+ /* Dry-run for checks */
+ rc = _XkbCreateIndicatorMap(dev, stuff->indicator,
+ stuff->ledClass, stuff->ledID,
+ &map, &led, TRUE);
+ if (rc != Success || !map) /* couldn't be created or didn't exist */
+ return rc;
+
+ if (stuff->deviceSpec == XkbUseCoreKbd ||
+ stuff->deviceSpec == XkbUseCorePtr)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev &&
+ (other->kbdfeed || other->leds) &&
+ (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
+ {
+ rc = _XkbCreateIndicatorMap(other, stuff->indicator,
+ stuff->ledClass, stuff->ledID,
+ &map, &led, TRUE);
+ if (rc != Success || !map)
+ return rc;
+ }
+ }
+ }
+
+ /* All checks passed, let's do it */
+ rc = _XkbSetNamedIndicator(client, dev, stuff);
+ if (rc != Success)
+ return rc;
+
+ if (stuff->deviceSpec == XkbUseCoreKbd ||
+ stuff->deviceSpec == XkbUseCorePtr)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev &&
+ (other->kbdfeed || other->leds) &&
+ (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
+ {
+ _XkbSetNamedIndicator(client, other, stuff);
+ }
+ }
+ }
+
+ return Success;
+}
+
+/***====================================================================***/
+
+static CARD32
+_XkbCountAtoms(Atom *atoms,int maxAtoms,int *count)
+{
+register unsigned int i,bit,nAtoms;
+register CARD32 atomsPresent;
+
+ for (i=nAtoms=atomsPresent=0,bit=1;i<maxAtoms;i++,bit<<=1) {
+ if (atoms[i]!=None) {
+ atomsPresent|= bit;
+ nAtoms++;
+ }
+ }
+ if (count)
+ *count= nAtoms;
+ return atomsPresent;
+}
+
+static char *
+_XkbWriteAtoms(char *wire,Atom *atoms,int maxAtoms,int swap)
+{
+register unsigned int i;
+Atom *atm;
+
+ atm = (Atom *)wire;
+ for (i=0;i<maxAtoms;i++) {
+ if (atoms[i]!=None) {
+ *atm= atoms[i];
+ if (swap) {
+ register int n;
+ swapl(atm,n);
+ }
+ atm++;
+ }
+ }
+ return (char *)atm;
+}
+
+static Status
+XkbComputeGetNamesReplySize(XkbDescPtr xkb,xkbGetNamesReply *rep)
+{
+register unsigned which,length;
+register int i;
+
+ rep->minKeyCode= xkb->min_key_code;
+ rep->maxKeyCode= xkb->max_key_code;
+ which= rep->which;
+ length= 0;
+ if (xkb->names!=NULL) {
+ if (which&XkbKeycodesNameMask) length++;
+ if (which&XkbGeometryNameMask) length++;
+ if (which&XkbSymbolsNameMask) length++;
+ if (which&XkbPhysSymbolsNameMask) length++;
+ if (which&XkbTypesNameMask) length++;
+ if (which&XkbCompatNameMask) length++;
+ }
+ else which&= ~XkbComponentNamesMask;
+
+ if (xkb->map!=NULL) {
+ if (which&XkbKeyTypeNamesMask)
+ length+= xkb->map->num_types;
+ rep->nTypes= xkb->map->num_types;
+ if (which&XkbKTLevelNamesMask) {
+ XkbKeyTypePtr pType = xkb->map->types;
+ int nKTLevels = 0;
+
+ length+= XkbPaddedSize(xkb->map->num_types)/4;
+ for (i=0;i<xkb->map->num_types;i++,pType++) {
+ if (pType->level_names!=NULL)
+ nKTLevels+= pType->num_levels;
+ }
+ rep->nKTLevels= nKTLevels;
+ length+= nKTLevels;
+ }
+ }
+ else {
+ rep->nTypes= 0;
+ rep->nKTLevels= 0;
+ which&= ~(XkbKeyTypeNamesMask|XkbKTLevelNamesMask);
+ }
+
+ rep->minKeyCode= xkb->min_key_code;
+ rep->maxKeyCode= xkb->max_key_code;
+ rep->indicators= 0;
+ rep->virtualMods= 0;
+ rep->groupNames= 0;
+ if (xkb->names!=NULL) {
+ if (which&XkbIndicatorNamesMask) {
+ int nLeds;
+ rep->indicators=
+ _XkbCountAtoms(xkb->names->indicators,XkbNumIndicators,&nLeds);
+ length+= nLeds;
+ if (nLeds==0)
+ which&= ~XkbIndicatorNamesMask;
+ }
+
+ if (which&XkbVirtualModNamesMask) {
+ int nVMods;
+ rep->virtualMods=
+ _XkbCountAtoms(xkb->names->vmods,XkbNumVirtualMods,&nVMods);
+ length+= nVMods;
+ if (nVMods==0)
+ which&= ~XkbVirtualModNamesMask;
+ }
+
+ if (which&XkbGroupNamesMask) {
+ int nGroups;
+ rep->groupNames=
+ _XkbCountAtoms(xkb->names->groups,XkbNumKbdGroups,&nGroups);
+ length+= nGroups;
+ if (nGroups==0)
+ which&= ~XkbGroupNamesMask;
+ }
+
+ if ((which&XkbKeyNamesMask)&&(xkb->names->keys))
+ length+= rep->nKeys;
+ else which&= ~XkbKeyNamesMask;
+
+ if ((which&XkbKeyAliasesMask)&&
+ (xkb->names->key_aliases)&&(xkb->names->num_key_aliases>0)) {
+ rep->nKeyAliases= xkb->names->num_key_aliases;
+ length+= rep->nKeyAliases*2;
+ }
+ else {
+ which&= ~XkbKeyAliasesMask;
+ rep->nKeyAliases= 0;
+ }
+
+ if ((which&XkbRGNamesMask)&&(xkb->names->num_rg>0))
+ length+= xkb->names->num_rg;
+ else which&= ~XkbRGNamesMask;
+ }
+ else {
+ which&= ~(XkbIndicatorNamesMask|XkbVirtualModNamesMask);
+ which&= ~(XkbGroupNamesMask|XkbKeyNamesMask|XkbKeyAliasesMask);
+ which&= ~XkbRGNamesMask;
+ }
+
+ rep->length= length;
+ rep->which= which;
+ return Success;
+}
+
+static int
+XkbSendNames(ClientPtr client,XkbDescPtr xkb,xkbGetNamesReply *rep)
+{
+register unsigned i,length,which;
+char * start;
+char * desc;
+register int n;
+
+ length= rep->length*4;
+ which= rep->which;
+ if (client->swapped) {
+ swaps(&rep->sequenceNumber,n);
+ swapl(&rep->length,n);
+ swapl(&rep->which,n);
+ swaps(&rep->virtualMods,n);
+ swapl(&rep->indicators,n);
+ }
+
+ start = desc = calloc(1, length);
+ if ( !start )
+ return BadAlloc;
+ if (xkb->names) {
+ if (which&XkbKeycodesNameMask) {
+ *((CARD32 *)desc)= xkb->names->keycodes;
+ if (client->swapped) {
+ swapl(desc,n);
+ }
+ desc+= 4;
+ }
+ if (which&XkbGeometryNameMask) {
+ *((CARD32 *)desc)= xkb->names->geometry;
+ if (client->swapped) {
+ swapl(desc,n);
+ }
+ desc+= 4;
+ }
+ if (which&XkbSymbolsNameMask) {
+ *((CARD32 *)desc)= xkb->names->symbols;
+ if (client->swapped) {
+ swapl(desc,n);
+ }
+ desc+= 4;
+ }
+ if (which&XkbPhysSymbolsNameMask) {
+ register CARD32 *atm= (CARD32 *)desc;
+ atm[0]= (CARD32)xkb->names->phys_symbols;
+ if (client->swapped) {
+ swapl(&atm[0],n);
+ }
+ desc+= 4;
+ }
+ if (which&XkbTypesNameMask) {
+ *((CARD32 *)desc)= (CARD32)xkb->names->types;
+ if (client->swapped) {
+ swapl(desc,n);
+ }
+ desc+= 4;
+ }
+ if (which&XkbCompatNameMask) {
+ *((CARD32 *)desc)= (CARD32)xkb->names->compat;
+ if (client->swapped) {
+ swapl(desc,n);
+ }
+ desc+= 4;
+ }
+ if (which&XkbKeyTypeNamesMask) {
+ register CARD32 *atm= (CARD32 *)desc;
+ register XkbKeyTypePtr type= xkb->map->types;
+
+ for (i=0;i<xkb->map->num_types;i++,atm++,type++) {
+ *atm= (CARD32)type->name;
+ if (client->swapped) {
+ swapl(atm,n);
+ }
+ }
+ desc= (char *)atm;
+ }
+ if (which&XkbKTLevelNamesMask && xkb->map) {
+ XkbKeyTypePtr type = xkb->map->types;
+ register CARD32 *atm;
+ for (i=0;i<rep->nTypes;i++,type++) {
+ *desc++ = type->num_levels;
+ }
+ desc+= XkbPaddedSize(rep->nTypes)-rep->nTypes;
+
+ atm= (CARD32 *)desc;
+ type = xkb->map->types;
+ for (i=0;i<xkb->map->num_types;i++,type++) {
+ register unsigned l;
+ if (type->level_names) {
+ for (l=0;l<type->num_levels;l++,atm++) {
+ *atm= type->level_names[l];
+ if (client->swapped) {
+ swapl(atm,n);
+ }
+ }
+ desc+= type->num_levels*4;
+ }
+ }
+ }
+ if (which&XkbIndicatorNamesMask) {
+ desc= _XkbWriteAtoms(desc,xkb->names->indicators,XkbNumIndicators,
+ client->swapped);
+ }
+ if (which&XkbVirtualModNamesMask) {
+ desc= _XkbWriteAtoms(desc,xkb->names->vmods,XkbNumVirtualMods,
+ client->swapped);
+ }
+ if (which&XkbGroupNamesMask) {
+ desc= _XkbWriteAtoms(desc,xkb->names->groups,XkbNumKbdGroups,
+ client->swapped);
+ }
+ if (which&XkbKeyNamesMask) {
+ for (i=0;i<rep->nKeys;i++,desc+= sizeof(XkbKeyNameRec)) {
+ *((XkbKeyNamePtr)desc)= xkb->names->keys[i+rep->firstKey];
+ }
+ }
+ if (which&XkbKeyAliasesMask) {
+ XkbKeyAliasPtr pAl;
+ pAl= xkb->names->key_aliases;
+ for (i=0;i<rep->nKeyAliases;i++,pAl++,desc+=2*XkbKeyNameLength) {
+ *((XkbKeyAliasPtr)desc)= *pAl;
+ }
+ }
+ if ((which&XkbRGNamesMask)&&(rep->nRadioGroups>0)) {
+ register CARD32 *atm= (CARD32 *)desc;
+ for (i=0;i<rep->nRadioGroups;i++,atm++) {
+ *atm= (CARD32)xkb->names->radio_groups[i];
+ if (client->swapped) {
+ swapl(atm,n);
+ }
+ }
+ desc+= rep->nRadioGroups*4;
+ }
+ }
+
+ if ((desc-start)!=(length)) {
+ ErrorF("[xkb] BOGUS LENGTH in write names, expected %d, got %ld\n",
+ length, (unsigned long)(desc-start));
+ }
+ WriteToClient(client, SIZEOF(xkbGetNamesReply), (char *)rep);
+ WriteToClient(client, length, start);
+ free((char *)start);
+ return Success;
+}
+
+int
+ProcXkbGetNames(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ XkbDescPtr xkb;
+ xkbGetNamesReply rep;
+
+ REQUEST(xkbGetNamesReq);
+ REQUEST_SIZE_MATCH(xkbGetNamesReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
+ CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask);
+
+ xkb = dev->key->xkbInfo->desc;
+ memset(&rep, 0, sizeof(xkbGetNamesReply));
+ rep.type= X_Reply;
+ rep.sequenceNumber= client->sequence;
+ rep.length = 0;
+ rep.deviceID = dev->id;
+ rep.which = stuff->which;
+ rep.nTypes = xkb->map->num_types;
+ rep.firstKey = xkb->min_key_code;
+ rep.nKeys = XkbNumKeys(xkb);
+ if (xkb->names!=NULL) {
+ rep.nKeyAliases= xkb->names->num_key_aliases;
+ rep.nRadioGroups = xkb->names->num_rg;
+ }
+ else {
+ rep.nKeyAliases= rep.nRadioGroups= 0;
+ }
+ XkbComputeGetNamesReplySize(xkb,&rep);
+ return XkbSendNames(client,xkb,&rep);
+}
+
+/***====================================================================***/
+
+static CARD32 *
+_XkbCheckAtoms(CARD32 *wire,int nAtoms,int swapped,Atom *pError)
+{
+register int i;
+
+ for (i=0;i<nAtoms;i++,wire++) {
+ if (swapped) {
+ register int n;
+ swapl(wire,n);
+ }
+ if ((((Atom)*wire)!=None)&&(!ValidAtom((Atom)*wire))) {
+ *pError= ((Atom)*wire);
+ return NULL;
+ }
+ }
+ return wire;
+}
+
+static CARD32 *
+_XkbCheckMaskedAtoms(CARD32 *wire,int nAtoms,CARD32 present,int swapped,
+ Atom *pError)
+{
+register unsigned i,bit;
+
+ for (i=0,bit=1;(i<nAtoms)&&(present);i++,bit<<=1) {
+ if ((present&bit)==0)
+ continue;
+ if (swapped) {
+ register int n;
+ swapl(wire,n);
+ }
+ if ((((Atom)*wire)!=None)&&(!ValidAtom(((Atom)*wire)))) {
+ *pError= (Atom)*wire;
+ return NULL;
+ }
+ wire++;
+ }
+ return wire;
+}
+
+static Atom *
+_XkbCopyMaskedAtoms( Atom *wire,
+ Atom *dest,
+ int nAtoms,
+ CARD32 present)
+{
+register int i,bit;
+
+ for (i=0,bit=1;(i<nAtoms)&&(present);i++,bit<<=1) {
+ if ((present&bit)==0)
+ continue;
+ dest[i]= *wire++;
+ }
+ return wire;
+}
+
+static Bool
+_XkbCheckTypeName(Atom name,int typeNdx)
+{
+const char * str;
+
+ str= NameForAtom(name);
+ if ((strcmp(str,"ONE_LEVEL")==0)||(strcmp(str,"TWO_LEVEL")==0)||
+ (strcmp(str,"ALPHABETIC")==0)||(strcmp(str,"KEYPAD")==0))
+ return FALSE;
+ return TRUE;
+}
+
+/**
+ * Check the device-dependent data in the request against the device. Returns
+ * Success, or the appropriate error code.
+ */
+static int
+_XkbSetNamesCheck(ClientPtr client, DeviceIntPtr dev,
+ xkbSetNamesReq *stuff, CARD32 *data)
+{
+ XkbDescRec *xkb;
+ XkbNamesRec *names;
+ CARD32 *tmp;
+ Atom bad;
+
+ tmp = data;
+ xkb = dev->key->xkbInfo->desc;
+ names = xkb->names;
+
+
+ if (stuff->which & XkbKeyTypeNamesMask) {
+ int i;
+ CARD32 *old;
+ if ( stuff->nTypes<1 ) {
+ client->errorValue = _XkbErrCode2(0x02,stuff->nTypes);
+ return BadValue;
+ }
+ if ((unsigned)(stuff->firstType+stuff->nTypes-1)>=xkb->map->num_types) {
+ client->errorValue = _XkbErrCode4(0x03,stuff->firstType,
+ stuff->nTypes,
+ xkb->map->num_types);
+ return BadValue;
+ }
+ if (((unsigned)stuff->firstType)<=XkbLastRequiredType) {
+ client->errorValue = _XkbErrCode2(0x04,stuff->firstType);
+ return BadAccess;
+ }
+ old= tmp;
+ tmp= _XkbCheckAtoms(tmp,stuff->nTypes,client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue= bad;
+ return BadAtom;
+ }
+ for (i=0;i<stuff->nTypes;i++,old++) {
+ if (!_XkbCheckTypeName((Atom)*old,stuff->firstType+i))
+ client->errorValue= _XkbErrCode2(0x05,i);
+ }
+ }
+ if (stuff->which&XkbKTLevelNamesMask) {
+ unsigned i;
+ XkbKeyTypePtr type;
+ CARD8 * width;
+ if ( stuff->nKTLevels<1 ) {
+ client->errorValue = _XkbErrCode2(0x05,stuff->nKTLevels);
+ return BadValue;
+ }
+ if ((unsigned)(stuff->firstKTLevel+stuff->nKTLevels-1)>=
+ xkb->map->num_types) {
+ client->errorValue = _XkbErrCode4(0x06,stuff->firstKTLevel,
+ stuff->nKTLevels,xkb->map->num_types);
+ return BadValue;
+ }
+ width = (CARD8 *)tmp;
+ tmp= (CARD32 *)(((char *)tmp)+XkbPaddedSize(stuff->nKTLevels));
+ type = &xkb->map->types[stuff->firstKTLevel];
+ for (i=0;i<stuff->nKTLevels;i++,type++) {
+ if (width[i]==0)
+ continue;
+ else if (width[i]!=type->num_levels) {
+ client->errorValue= _XkbErrCode4(0x07,i+stuff->firstKTLevel,
+ type->num_levels,width[i]);
+ return BadMatch;
+ }
+ tmp= _XkbCheckAtoms(tmp,width[i],client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue= bad;
+ return BadAtom;
+ }
+ }
+ }
+ if (stuff->which&XkbIndicatorNamesMask) {
+ if (stuff->indicators==0) {
+ client->errorValue= 0x08;
+ return BadMatch;
+ }
+ tmp= _XkbCheckMaskedAtoms(tmp,XkbNumIndicators,stuff->indicators,
+ client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue= bad;
+ return BadAtom;
+ }
+ }
+ if (stuff->which&XkbVirtualModNamesMask) {
+ if (stuff->virtualMods==0) {
+ client->errorValue= 0x09;
+ return BadMatch;
+ }
+ tmp= _XkbCheckMaskedAtoms(tmp,XkbNumVirtualMods,
+ (CARD32)stuff->virtualMods,
+ client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue = bad;
+ return BadAtom;
+ }
+ }
+ if (stuff->which&XkbGroupNamesMask) {
+ if (stuff->groupNames==0) {
+ client->errorValue= 0x0a;
+ return BadMatch;
+ }
+ tmp= _XkbCheckMaskedAtoms(tmp,XkbNumKbdGroups,
+ (CARD32)stuff->groupNames,
+ client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue = bad;
+ return BadAtom;
+ }
+ }
+ if (stuff->which&XkbKeyNamesMask) {
+ if (stuff->firstKey<(unsigned)xkb->min_key_code) {
+ client->errorValue= _XkbErrCode3(0x0b,xkb->min_key_code,
+ stuff->firstKey);
+ return BadValue;
+ }
+ if (((unsigned)(stuff->firstKey+stuff->nKeys-1)>xkb->max_key_code)||
+ (stuff->nKeys<1)) {
+ client->errorValue= _XkbErrCode4(0x0c,xkb->max_key_code,
+ stuff->firstKey,stuff->nKeys);
+ return BadValue;
+ }
+ tmp+= stuff->nKeys;
+ }
+ if ((stuff->which&XkbKeyAliasesMask)&&(stuff->nKeyAliases>0)) {
+ tmp+= stuff->nKeyAliases*2;
+ }
+ if (stuff->which&XkbRGNamesMask) {
+ if ( stuff->nRadioGroups<1 ) {
+ client->errorValue= _XkbErrCode2(0x0d,stuff->nRadioGroups);
+ return BadValue;
+ }
+ tmp= _XkbCheckAtoms(tmp,stuff->nRadioGroups,client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue= bad;
+ return BadAtom;
+ }
+ }
+ if ((tmp-((CARD32 *)stuff))!=stuff->length) {
+ client->errorValue = stuff->length;
+ return BadLength;
+ }
+
+
+
+ return Success;
+}
+
+static int
+_XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff)
+{
+ XkbDescRec *xkb;
+ XkbNamesRec *names;
+ CARD32 *tmp;
+ xkbNamesNotify nn;
+
+ tmp = (CARD32 *)&stuff[1];
+ xkb = dev->key->xkbInfo->desc;
+ names = xkb->names;
+
+ if (XkbAllocNames(xkb,stuff->which,stuff->nRadioGroups,
+ stuff->nKeyAliases)!=Success) {
+ return BadAlloc;
+ }
+
+ memset(&nn, 0, sizeof(xkbNamesNotify));
+ nn.changed= stuff->which;
+ tmp = (CARD32 *)&stuff[1];
+ if (stuff->which&XkbKeycodesNameMask)
+ names->keycodes= *tmp++;
+ if (stuff->which&XkbGeometryNameMask)
+ names->geometry= *tmp++;
+ if (stuff->which&XkbSymbolsNameMask)
+ names->symbols= *tmp++;
+ if (stuff->which&XkbPhysSymbolsNameMask)
+ names->phys_symbols= *tmp++;
+ if (stuff->which&XkbTypesNameMask)
+ names->types= *tmp++;
+ if (stuff->which&XkbCompatNameMask)
+ names->compat= *tmp++;
+ if ((stuff->which&XkbKeyTypeNamesMask)&&(stuff->nTypes>0)) {
+ register unsigned i;
+ register XkbKeyTypePtr type;
+
+ type= &xkb->map->types[stuff->firstType];
+ for (i=0;i<stuff->nTypes;i++,type++) {
+ type->name= *tmp++;
+ }
+ nn.firstType= stuff->firstType;
+ nn.nTypes= stuff->nTypes;
+ }
+ if (stuff->which&XkbKTLevelNamesMask) {
+ register XkbKeyTypePtr type;
+ register unsigned i;
+ CARD8 *width;
+
+ width = (CARD8 *)tmp;
+ tmp= (CARD32 *)(((char *)tmp)+XkbPaddedSize(stuff->nKTLevels));
+ type= &xkb->map->types[stuff->firstKTLevel];
+ for (i=0;i<stuff->nKTLevels;i++,type++) {
+ if (width[i]>0) {
+ if (type->level_names) {
+ register unsigned n;
+ for (n=0;n<width[i];n++) {
+ type->level_names[n]= tmp[n];
+ }
+ }
+ tmp+= width[i];
+ }
+ }
+ nn.firstLevelName= 0;
+ nn.nLevelNames= stuff->nTypes;
+ }
+ if (stuff->which&XkbIndicatorNamesMask) {
+ tmp= _XkbCopyMaskedAtoms(tmp,names->indicators,XkbNumIndicators,
+ stuff->indicators);
+ nn.changedIndicators= stuff->indicators;
+ }
+ if (stuff->which&XkbVirtualModNamesMask) {
+ tmp= _XkbCopyMaskedAtoms(tmp,names->vmods,XkbNumVirtualMods,
+ stuff->virtualMods);
+ nn.changedVirtualMods= stuff->virtualMods;
+ }
+ if (stuff->which&XkbGroupNamesMask) {
+ tmp= _XkbCopyMaskedAtoms(tmp,names->groups,XkbNumKbdGroups,
+ stuff->groupNames);
+ nn.changedVirtualMods= stuff->groupNames;
+ }
+ if (stuff->which&XkbKeyNamesMask) {
+ memcpy((char*)&names->keys[stuff->firstKey],(char *)tmp,
+ stuff->nKeys*XkbKeyNameLength);
+ tmp+= stuff->nKeys;
+ nn.firstKey= stuff->firstKey;
+ nn.nKeys= stuff->nKeys;
+ }
+ if (stuff->which&XkbKeyAliasesMask) {
+ if (stuff->nKeyAliases>0) {
+ register int na= stuff->nKeyAliases;
+ if (XkbAllocNames(xkb,XkbKeyAliasesMask,0,na)!=Success)
+ return BadAlloc;
+ memcpy((char *)names->key_aliases,(char *)tmp,
+ stuff->nKeyAliases*sizeof(XkbKeyAliasRec));
+ tmp+= stuff->nKeyAliases*2;
+ }
+ else if (names->key_aliases!=NULL) {
+ free(names->key_aliases);
+ names->key_aliases= NULL;
+ names->num_key_aliases= 0;
+ }
+ nn.nAliases= names->num_key_aliases;
+ }
+ if (stuff->which&XkbRGNamesMask) {
+ if (stuff->nRadioGroups>0) {
+ register unsigned i,nrg;
+ nrg= stuff->nRadioGroups;
+ if (XkbAllocNames(xkb,XkbRGNamesMask,nrg,0)!=Success)
+ return BadAlloc;
+
+ for (i=0;i<stuff->nRadioGroups;i++) {
+ names->radio_groups[i]= tmp[i];
+ }
+ tmp+= stuff->nRadioGroups;
+ }
+ else if (names->radio_groups) {
+ free(names->radio_groups);
+ names->radio_groups= NULL;
+ names->num_rg= 0;
+ }
+ nn.nRadioGroups= names->num_rg;
+ }
+ if (nn.changed) {
+ Bool needExtEvent;
+ needExtEvent= (nn.changed&XkbIndicatorNamesMask)!=0;
+ XkbSendNamesNotify(dev,&nn);
+ if (needExtEvent) {
+ XkbSrvLedInfoPtr sli;
+ xkbExtensionDeviceNotify edev;
+ register int i;
+ register unsigned bit;
+
+ sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,
+ XkbXI_IndicatorsMask);
+ sli->namesPresent= 0;
+ for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
+ if (names->indicators[i]!=None)
+ sli->namesPresent|= bit;
+ }
+ memset(&edev, 0, sizeof(xkbExtensionDeviceNotify));
+ edev.reason= XkbXI_IndicatorNamesMask;
+ edev.ledClass= KbdFeedbackClass;
+ edev.ledID= dev->kbdfeed->ctrl.id;
+ edev.ledsDefined= sli->namesPresent|sli->mapsPresent;
+ edev.ledState= sli->effectiveState;
+ edev.firstBtn= 0;
+ edev.nBtns= 0;
+ edev.supported= XkbXI_AllFeaturesMask;
+ edev.unsupported= 0;
+ XkbSendExtensionDeviceNotify(dev,client,&edev);
+ }
+ }
+ return Success;
+}
+
+int
+ProcXkbSetNames(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ CARD32 *tmp;
+ Atom bad;
+ int rc;
+
+ REQUEST(xkbSetNamesReq);
+ REQUEST_AT_LEAST_SIZE(xkbSetNamesReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+ CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask);
+
+ /* check device-independent stuff */
+ tmp = (CARD32 *)&stuff[1];
+
+ if (stuff->which&XkbKeycodesNameMask) {
+ tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue = bad;
+ return BadAtom;
+ }
+ }
+ if (stuff->which&XkbGeometryNameMask) {
+ tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue = bad;
+ return BadAtom;
+ }
+ }
+ if (stuff->which&XkbSymbolsNameMask) {
+ tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue = bad;
+ return BadAtom;
+ }
+ }
+ if (stuff->which&XkbPhysSymbolsNameMask) {
+ tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue= bad;
+ return BadAtom;
+ }
+ }
+ if (stuff->which&XkbTypesNameMask) {
+ tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue = bad;
+ return BadAtom;
+ }
+ }
+ if (stuff->which&XkbCompatNameMask) {
+ tmp= _XkbCheckAtoms(tmp,1,client->swapped,&bad);
+ if (!tmp) {
+ client->errorValue = bad;
+ return BadAtom;
+ }
+ }
+
+ /* start of device-dependent tests */
+ rc = _XkbSetNamesCheck(client, dev, stuff, tmp);
+ if (rc != Success)
+ return rc;
+
+ if (stuff->deviceSpec == XkbUseCoreKbd)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
+ {
+
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+ if (rc == Success)
+ {
+ rc = _XkbSetNamesCheck(client, other, stuff, tmp);
+ if (rc != Success)
+ return rc;
+ }
+ }
+ }
+ }
+
+ /* everything is okay -- update names */
+
+ rc = _XkbSetNames(client, dev, stuff);
+ if (rc != Success)
+ return rc;
+
+ if (stuff->deviceSpec == XkbUseCoreKbd)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
+ {
+
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+ if (rc == Success)
+ _XkbSetNames(client, other, stuff);
+ }
+ }
+ }
+
+ /* everything is okay -- update names */
+
+ return Success;
+}
+
+/***====================================================================***/
+
+#include "xkbgeom.h"
+
+#define XkbSizeCountedString(s) ((s)?((((2+strlen(s))+3)/4)*4):4)
+
+/**
+ * Write the zero-terminated string str into wire as a pascal string with a
+ * 16-bit length field prefixed before the actual string.
+ *
+ * @param wire The destination array, usually the wire struct
+ * @param str The source string as zero-terminated C string
+ * @param swap If TRUE, the length field is swapped.
+ *
+ * @return The input string in the format <string length><string> with a
+ * (swapped) 16 bit string length, non-zero terminated.
+ */
+static char *
+XkbWriteCountedString(char *wire,char *str,Bool swap)
+{
+ CARD16 len,*pLen, paddedLen;
+
+ if (!str)
+ return wire;
+
+ len= strlen(str);
+ pLen= (CARD16 *)wire;
+ *pLen= len;
+ if (swap) {
+ register int n;
+ swaps(pLen,n);
+ }
+ paddedLen= pad_to_int32(sizeof(len)+len)-sizeof(len);
+ strncpy(&wire[sizeof(len)],str,paddedLen);
+ wire+= sizeof(len)+paddedLen;
+ return wire;
+}
+
+static int
+XkbSizeGeomProperties(XkbGeometryPtr geom)
+{
+register int i,size;
+XkbPropertyPtr prop;
+
+ for (size=i=0,prop=geom->properties;i<geom->num_properties;i++,prop++) {
+ size+= XkbSizeCountedString(prop->name);
+ size+= XkbSizeCountedString(prop->value);
+ }
+ return size;
+}
+
+static char *
+XkbWriteGeomProperties(char *wire,XkbGeometryPtr geom,Bool swap)
+{
+register int i;
+register XkbPropertyPtr prop;
+
+ for (i=0,prop=geom->properties;i<geom->num_properties;i++,prop++) {
+ wire= XkbWriteCountedString(wire,prop->name,swap);
+ wire= XkbWriteCountedString(wire,prop->value,swap);
+ }
+ return wire;
+}
+
+static int
+XkbSizeGeomKeyAliases(XkbGeometryPtr geom)
+{
+ return geom->num_key_aliases*(2*XkbKeyNameLength);
+}
+
+static char *
+XkbWriteGeomKeyAliases(char *wire,XkbGeometryPtr geom,Bool swap)
+{
+register int sz;
+
+ sz= geom->num_key_aliases*(XkbKeyNameLength*2);
+ if (sz>0) {
+ memcpy(wire,(char *)geom->key_aliases,sz);
+ wire+= sz;
+ }
+ return wire;
+}
+
+static int
+XkbSizeGeomColors(XkbGeometryPtr geom)
+{
+register int i,size;
+register XkbColorPtr color;
+
+ for (i=size=0,color=geom->colors;i<geom->num_colors;i++,color++) {
+ size+= XkbSizeCountedString(color->spec);
+ }
+ return size;
+}
+
+static char *
+XkbWriteGeomColors(char *wire,XkbGeometryPtr geom,Bool swap)
+{
+register int i;
+register XkbColorPtr color;
+
+ for (i=0,color=geom->colors;i<geom->num_colors;i++,color++) {
+ wire= XkbWriteCountedString(wire,color->spec,swap);
+ }
+ return wire;
+}
+
+static int
+XkbSizeGeomShapes(XkbGeometryPtr geom)
+{
+register int i,size;
+register XkbShapePtr shape;
+
+ for (i=size=0,shape=geom->shapes;i<geom->num_shapes;i++,shape++) {
+ register int n;
+ register XkbOutlinePtr ol;
+ size+= SIZEOF(xkbShapeWireDesc);
+ for (n=0,ol=shape->outlines;n<shape->num_outlines;n++,ol++) {
+ size+= SIZEOF(xkbOutlineWireDesc);
+ size+= ol->num_points*SIZEOF(xkbPointWireDesc);
+ }
+ }
+ return size;
+}
+
+static char *
+XkbWriteGeomShapes(char *wire,XkbGeometryPtr geom,Bool swap)
+{
+int i;
+XkbShapePtr shape;
+xkbShapeWireDesc * shapeWire;
+
+ for (i=0,shape=geom->shapes;i<geom->num_shapes;i++,shape++) {
+ register int o;
+ XkbOutlinePtr ol;
+ xkbOutlineWireDesc * olWire;
+ shapeWire= (xkbShapeWireDesc *)wire;
+ shapeWire->name= shape->name;
+ shapeWire->nOutlines= shape->num_outlines;
+ if (shape->primary!=NULL)
+ shapeWire->primaryNdx= XkbOutlineIndex(shape,shape->primary);
+ else shapeWire->primaryNdx= XkbNoShape;
+ if (shape->approx!=NULL)
+ shapeWire->approxNdx= XkbOutlineIndex(shape,shape->approx);
+ else shapeWire->approxNdx= XkbNoShape;
+ shapeWire->pad= 0;
+ if (swap) {
+ register int n;
+ swapl(&shapeWire->name,n);
+ }
+ wire= (char *)&shapeWire[1];
+ for (o=0,ol=shape->outlines;o<shape->num_outlines;o++,ol++) {
+ register int p;
+ XkbPointPtr pt;
+ xkbPointWireDesc * ptWire;
+ olWire= (xkbOutlineWireDesc *)wire;
+ olWire->nPoints= ol->num_points;
+ olWire->cornerRadius= ol->corner_radius;
+ olWire->pad= 0;
+ wire= (char *)&olWire[1];
+ ptWire= (xkbPointWireDesc *)wire;
+ for (p=0,pt=ol->points;p<ol->num_points;p++,pt++) {
+ ptWire[p].x= pt->x;
+ ptWire[p].y= pt->y;
+ if (swap) {
+ register int n;
+ swaps(&ptWire[p].x,n);
+ swaps(&ptWire[p].y,n);
+ }
+ }
+ wire= (char *)&ptWire[ol->num_points];
+ }
+ }
+ return wire;
+}
+
+static int
+XkbSizeGeomDoodads(int num_doodads,XkbDoodadPtr doodad)
+{
+register int i,size;
+
+ for (i=size=0;i<num_doodads;i++,doodad++) {
+ size+= SIZEOF(xkbAnyDoodadWireDesc);
+ if (doodad->any.type==XkbTextDoodad) {
+ size+= XkbSizeCountedString(doodad->text.text);
+ size+= XkbSizeCountedString(doodad->text.font);
+ }
+ else if (doodad->any.type==XkbLogoDoodad) {
+ size+= XkbSizeCountedString(doodad->logo.logo_name);
+ }
+ }
+ return size;
+}
+
+static char *
+XkbWriteGeomDoodads(char *wire,int num_doodads,XkbDoodadPtr doodad,Bool swap)
+{
+register int i;
+xkbDoodadWireDesc * doodadWire;
+
+ for (i=0;i<num_doodads;i++,doodad++) {
+ doodadWire= (xkbDoodadWireDesc *)wire;
+ wire= (char *)&doodadWire[1];
+ memset(doodadWire, 0, SIZEOF(xkbDoodadWireDesc));
+ doodadWire->any.name= doodad->any.name;
+ doodadWire->any.type= doodad->any.type;
+ doodadWire->any.priority= doodad->any.priority;
+ doodadWire->any.top= doodad->any.top;
+ doodadWire->any.left= doodad->any.left;
+ if (swap) {
+ register int n;
+ swapl(&doodadWire->any.name,n);
+ swaps(&doodadWire->any.top,n);
+ swaps(&doodadWire->any.left,n);
+ }
+ switch (doodad->any.type) {
+ case XkbOutlineDoodad:
+ case XkbSolidDoodad:
+ doodadWire->shape.angle= doodad->shape.angle;
+ doodadWire->shape.colorNdx= doodad->shape.color_ndx;
+ doodadWire->shape.shapeNdx= doodad->shape.shape_ndx;
+ if (swap) {
+ register int n;
+ swaps(&doodadWire->shape.angle,n);
+ }
+ break;
+ case XkbTextDoodad:
+ doodadWire->text.angle= doodad->text.angle;
+ doodadWire->text.width= doodad->text.width;
+ doodadWire->text.height= doodad->text.height;
+ doodadWire->text.colorNdx= doodad->text.color_ndx;
+ if (swap) {
+ register int n;
+ swaps(&doodadWire->text.angle,n);
+ swaps(&doodadWire->text.width,n);
+ swaps(&doodadWire->text.height,n);
+ }
+ wire= XkbWriteCountedString(wire,doodad->text.text,swap);
+ wire= XkbWriteCountedString(wire,doodad->text.font,swap);
+ break;
+ case XkbIndicatorDoodad:
+ doodadWire->indicator.shapeNdx= doodad->indicator.shape_ndx;
+ doodadWire->indicator.onColorNdx=doodad->indicator.on_color_ndx;
+ doodadWire->indicator.offColorNdx=
+ doodad->indicator.off_color_ndx;
+ break;
+ case XkbLogoDoodad:
+ doodadWire->logo.angle= doodad->logo.angle;
+ doodadWire->logo.colorNdx= doodad->logo.color_ndx;
+ doodadWire->logo.shapeNdx= doodad->logo.shape_ndx;
+ wire= XkbWriteCountedString(wire,doodad->logo.logo_name,swap);
+ break;
+ default:
+ ErrorF("[xkb] Unknown doodad type %d in XkbWriteGeomDoodads\n",
+ doodad->any.type);
+ ErrorF("[xkb] Ignored\n");
+ break;
+ }
+ }
+ return wire;
+}
+
+static char *
+XkbWriteGeomOverlay(char *wire,XkbOverlayPtr ol,Bool swap)
+{
+register int r;
+XkbOverlayRowPtr row;
+xkbOverlayWireDesc * olWire;
+
+ olWire= (xkbOverlayWireDesc *)wire;
+ olWire->name= ol->name;
+ olWire->nRows= ol->num_rows;
+ olWire->pad1= 0;
+ olWire->pad2= 0;
+ if (swap) {
+ register int n;
+ swapl(&olWire->name,n);
+ }
+ wire= (char *)&olWire[1];
+ for (r=0,row=ol->rows;r<ol->num_rows;r++,row++) {
+ unsigned int k;
+ XkbOverlayKeyPtr key;
+ xkbOverlayRowWireDesc * rowWire;
+ rowWire= (xkbOverlayRowWireDesc *)wire;
+ rowWire->rowUnder= row->row_under;
+ rowWire->nKeys= row->num_keys;
+ rowWire->pad1= 0;
+ wire= (char *)&rowWire[1];
+ for (k=0,key=row->keys;k<row->num_keys;k++,key++) {
+ xkbOverlayKeyWireDesc * keyWire;
+ keyWire= (xkbOverlayKeyWireDesc *)wire;
+ memcpy(keyWire->over,key->over.name,XkbKeyNameLength);
+ memcpy(keyWire->under,key->under.name,XkbKeyNameLength);
+ wire= (char *)&keyWire[1];
+ }
+ }
+ return wire;
+}
+
+static int
+XkbSizeGeomSections(XkbGeometryPtr geom)
+{
+register int i,size;
+XkbSectionPtr section;
+
+ for (i=size=0,section=geom->sections;i<geom->num_sections;i++,section++) {
+ size+= SIZEOF(xkbSectionWireDesc);
+ if (section->rows) {
+ int r;
+ XkbRowPtr row;
+ for (r=0,row=section->rows;r<section->num_rows;row++,r++) {
+ size+= SIZEOF(xkbRowWireDesc);
+ size+= row->num_keys*SIZEOF(xkbKeyWireDesc);
+ }
+ }
+ if (section->doodads)
+ size+= XkbSizeGeomDoodads(section->num_doodads,section->doodads);
+ if (section->overlays) {
+ int o;
+ XkbOverlayPtr ol;
+ for (o=0,ol=section->overlays;o<section->num_overlays;o++,ol++) {
+ int r;
+ XkbOverlayRowPtr row;
+ size+= SIZEOF(xkbOverlayWireDesc);
+ for (r=0,row=ol->rows;r<ol->num_rows;r++,row++) {
+ size+= SIZEOF(xkbOverlayRowWireDesc);
+ size+= row->num_keys*SIZEOF(xkbOverlayKeyWireDesc);
+ }
+ }
+ }
+ }
+ return size;
+}
+
+static char *
+XkbWriteGeomSections(char *wire,XkbGeometryPtr geom,Bool swap)
+{
+register int i;
+XkbSectionPtr section;
+xkbSectionWireDesc * sectionWire;
+
+ for (i=0,section=geom->sections;i<geom->num_sections;i++,section++) {
+ sectionWire= (xkbSectionWireDesc *)wire;
+ sectionWire->name= section->name;
+ sectionWire->top= section->top;
+ sectionWire->left= section->left;
+ sectionWire->width= section->width;
+ sectionWire->height= section->height;
+ sectionWire->angle= section->angle;
+ sectionWire->priority= section->priority;
+ sectionWire->nRows= section->num_rows;
+ sectionWire->nDoodads= section->num_doodads;
+ sectionWire->nOverlays= section->num_overlays;
+ sectionWire->pad= 0;
+ if (swap) {
+ register int n;
+ swapl(&sectionWire->name,n);
+ swaps(&sectionWire->top,n);
+ swaps(&sectionWire->left,n);
+ swaps(&sectionWire->width,n);
+ swaps(&sectionWire->height,n);
+ swaps(&sectionWire->angle,n);
+ }
+ wire= (char *)&sectionWire[1];
+ if (section->rows) {
+ int r;
+ XkbRowPtr row;
+ xkbRowWireDesc * rowWire;
+ for (r=0,row=section->rows;r<section->num_rows;r++,row++) {
+ rowWire= (xkbRowWireDesc *)wire;
+ rowWire->top= row->top;
+ rowWire->left= row->left;
+ rowWire->nKeys= row->num_keys;
+ rowWire->vertical= row->vertical;
+ rowWire->pad= 0;
+ if (swap) {
+ register int n;
+ swaps(&rowWire->top,n);
+ swaps(&rowWire->left,n);
+ }
+ wire= (char *)&rowWire[1];
+ if (row->keys) {
+ int k;
+ XkbKeyPtr key;
+ xkbKeyWireDesc * keyWire;
+ keyWire= (xkbKeyWireDesc *)wire;
+ for (k=0,key=row->keys;k<row->num_keys;k++,key++) {
+ memcpy(keyWire[k].name,key->name.name,XkbKeyNameLength);
+ keyWire[k].gap= key->gap;
+ keyWire[k].shapeNdx= key->shape_ndx;
+ keyWire[k].colorNdx= key->color_ndx;
+ if (swap) {
+ register int n;
+ swaps(&keyWire[k].gap,n);
+ }
+ }
+ wire= (char *)&keyWire[row->num_keys];
+ }
+ }
+ }
+ if (section->doodads) {
+ wire= XkbWriteGeomDoodads(wire,
+ section->num_doodads,section->doodads,
+ swap);
+ }
+ if (section->overlays) {
+ register int o;
+ for (o=0;o<section->num_overlays;o++) {
+ wire= XkbWriteGeomOverlay(wire,&section->overlays[o],swap);
+ }
+ }
+ }
+ return wire;
+}
+
+static Status
+XkbComputeGetGeometryReplySize( XkbGeometryPtr geom,
+ xkbGetGeometryReply * rep,
+ Atom name)
+{
+int len;
+
+ if (geom!=NULL) {
+ len= XkbSizeCountedString(geom->label_font);
+ len+= XkbSizeGeomProperties(geom);
+ len+= XkbSizeGeomColors(geom);
+ len+= XkbSizeGeomShapes(geom);
+ len+= XkbSizeGeomSections(geom);
+ len+= XkbSizeGeomDoodads(geom->num_doodads,geom->doodads);
+ len+= XkbSizeGeomKeyAliases(geom);
+ rep->length= len/4;
+ rep->found= TRUE;
+ rep->name= geom->name;
+ rep->widthMM= geom->width_mm;
+ rep->heightMM= geom->height_mm;
+ rep->nProperties= geom->num_properties;
+ rep->nColors= geom->num_colors;
+ rep->nShapes= geom->num_shapes;
+ rep->nSections= geom->num_sections;
+ rep->nDoodads= geom->num_doodads;
+ rep->nKeyAliases= geom->num_key_aliases;
+ rep->baseColorNdx= XkbGeomColorIndex(geom,geom->base_color);
+ rep->labelColorNdx= XkbGeomColorIndex(geom,geom->label_color);
+ }
+ else {
+ rep->length= 0;
+ rep->found= FALSE;
+ rep->name= name;
+ rep->widthMM= rep->heightMM= 0;
+ rep->nProperties= rep->nColors= rep->nShapes= 0;
+ rep->nSections= rep->nDoodads= 0;
+ rep->nKeyAliases= 0;
+ rep->labelColorNdx= rep->baseColorNdx= 0;
+ }
+ return Success;
+}
+
+static int
+XkbSendGeometry( ClientPtr client,
+ XkbGeometryPtr geom,
+ xkbGetGeometryReply * rep,
+ Bool freeGeom)
+{
+ char *desc,*start;
+ int len;
+
+ if (geom!=NULL) {
+ len= rep->length*4;
+ start= desc= malloc(len);
+ if (!start)
+ return BadAlloc;
+ desc= XkbWriteCountedString(desc,geom->label_font,client->swapped);
+ if ( rep->nProperties>0 )
+ desc = XkbWriteGeomProperties(desc,geom,client->swapped);
+ if ( rep->nColors>0 )
+ desc = XkbWriteGeomColors(desc,geom,client->swapped);
+ if ( rep->nShapes>0 )
+ desc = XkbWriteGeomShapes(desc,geom,client->swapped);
+ if ( rep->nSections>0 )
+ desc = XkbWriteGeomSections(desc,geom,client->swapped);
+ if ( rep->nDoodads>0 )
+ desc = XkbWriteGeomDoodads(desc,geom->num_doodads,geom->doodads,
+ client->swapped);
+ if ( rep->nKeyAliases>0 )
+ desc = XkbWriteGeomKeyAliases(desc,geom,client->swapped);
+ if ((desc-start)!=(len)) {
+ ErrorF("[xkb] BOGUS LENGTH in XkbSendGeometry, expected %d, got %ld\n",
+ len, (unsigned long)(desc-start));
+ }
+ }
+ else {
+ len= 0;
+ start= NULL;
+ }
+ if (client->swapped) {
+ register int n;
+ swaps(&rep->sequenceNumber,n);
+ swapl(&rep->length,n);
+ swapl(&rep->name,n);
+ swaps(&rep->widthMM,n);
+ swaps(&rep->heightMM,n);
+ swaps(&rep->nProperties,n);
+ swaps(&rep->nColors,n);
+ swaps(&rep->nShapes,n);
+ swaps(&rep->nSections,n);
+ swaps(&rep->nDoodads,n);
+ swaps(&rep->nKeyAliases,n);
+ }
+ WriteToClient(client, SIZEOF(xkbGetGeometryReply), (char *)rep);
+ if (len>0)
+ WriteToClient(client, len, start);
+ if (start!=NULL)
+ free((char *)start);
+ if (freeGeom)
+ XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
+ return Success;
+}
+
+int
+ProcXkbGetGeometry(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ xkbGetGeometryReply rep;
+ XkbGeometryPtr geom;
+ Bool shouldFree;
+ Status status;
+
+ REQUEST(xkbGetGeometryReq);
+ REQUEST_SIZE_MATCH(xkbGetGeometryReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
+ CHK_ATOM_OR_NONE(stuff->name);
+
+ geom= XkbLookupNamedGeometry(dev,stuff->name,&shouldFree);
+ rep.type= X_Reply;
+ rep.deviceID= dev->id;
+ rep.sequenceNumber= client->sequence;
+ rep.length= 0;
+ status= XkbComputeGetGeometryReplySize(geom,&rep,stuff->name);
+ if (status!=Success)
+ return status;
+ else return XkbSendGeometry(client,geom,&rep,shouldFree);
+}
+
+/***====================================================================***/
+
+static char *
+_GetCountedString(char **wire_inout,Bool swap)
+{
+char * wire,*str;
+CARD16 len,*plen;
+
+ wire= *wire_inout;
+ plen= (CARD16 *)wire;
+ if (swap) {
+ register int n;
+ swaps(plen,n);
+ }
+ len= *plen;
+ str= malloc(len+1);
+ if (str) {
+ memcpy(str,&wire[2],len);
+ str[len]= '\0';
+ }
+ wire+= XkbPaddedSize(len+2);
+ *wire_inout= wire;
+ return str;
+}
+
+static Status
+_CheckSetDoodad( char ** wire_inout,
+ XkbGeometryPtr geom,
+ XkbSectionPtr section,
+ ClientPtr client)
+{
+char * wire;
+xkbDoodadWireDesc * dWire;
+XkbDoodadPtr doodad;
+
+ dWire= (xkbDoodadWireDesc *)(*wire_inout);
+ wire= (char *)&dWire[1];
+ if (client->swapped) {
+ register int n;
+ swapl(&dWire->any.name,n);
+ swaps(&dWire->any.top,n);
+ swaps(&dWire->any.left,n);
+ swaps(&dWire->any.angle,n);
+ }
+ CHK_ATOM_ONLY(dWire->any.name);
+ doodad= XkbAddGeomDoodad(geom,section,dWire->any.name);
+ if (!doodad)
+ return BadAlloc;
+ doodad->any.type= dWire->any.type;
+ doodad->any.priority= dWire->any.priority;
+ doodad->any.top= dWire->any.top;
+ doodad->any.left= dWire->any.left;
+ doodad->any.angle= dWire->any.angle;
+ switch (doodad->any.type) {
+ case XkbOutlineDoodad:
+ case XkbSolidDoodad:
+ if (dWire->shape.colorNdx>=geom->num_colors) {
+ client->errorValue= _XkbErrCode3(0x40,geom->num_colors,
+ dWire->shape.colorNdx);
+ return BadMatch;
+ }
+ if (dWire->shape.shapeNdx>=geom->num_shapes) {
+ client->errorValue= _XkbErrCode3(0x41,geom->num_shapes,
+ dWire->shape.shapeNdx);
+ return BadMatch;
+ }
+ doodad->shape.color_ndx= dWire->shape.colorNdx;
+ doodad->shape.shape_ndx= dWire->shape.shapeNdx;
+ break;
+ case XkbTextDoodad:
+ if (dWire->text.colorNdx>=geom->num_colors) {
+ client->errorValue= _XkbErrCode3(0x42,geom->num_colors,
+ dWire->text.colorNdx);
+ return BadMatch;
+ }
+ if (client->swapped) {
+ register int n;
+ swaps(&dWire->text.width,n);
+ swaps(&dWire->text.height,n);
+ }
+ doodad->text.width= dWire->text.width;
+ doodad->text.height= dWire->text.height;
+ doodad->text.color_ndx= dWire->text.colorNdx;
+ doodad->text.text= _GetCountedString(&wire,client->swapped);
+ doodad->text.font= _GetCountedString(&wire,client->swapped);
+ break;
+ case XkbIndicatorDoodad:
+ if (dWire->indicator.onColorNdx>=geom->num_colors) {
+ client->errorValue= _XkbErrCode3(0x43,geom->num_colors,
+ dWire->indicator.onColorNdx);
+ return BadMatch;
+ }
+ if (dWire->indicator.offColorNdx>=geom->num_colors) {
+ client->errorValue= _XkbErrCode3(0x44,geom->num_colors,
+ dWire->indicator.offColorNdx);
+ return BadMatch;
+ }
+ if (dWire->indicator.shapeNdx>=geom->num_shapes) {
+ client->errorValue= _XkbErrCode3(0x45,geom->num_shapes,
+ dWire->indicator.shapeNdx);
+ return BadMatch;
+ }
+ doodad->indicator.shape_ndx= dWire->indicator.shapeNdx;
+ doodad->indicator.on_color_ndx= dWire->indicator.onColorNdx;
+ doodad->indicator.off_color_ndx= dWire->indicator.offColorNdx;
+ break;
+ case XkbLogoDoodad:
+ if (dWire->logo.colorNdx>=geom->num_colors) {
+ client->errorValue= _XkbErrCode3(0x46,geom->num_colors,
+ dWire->logo.colorNdx);
+ return BadMatch;
+ }
+ if (dWire->logo.shapeNdx>=geom->num_shapes) {
+ client->errorValue= _XkbErrCode3(0x47,geom->num_shapes,
+ dWire->logo.shapeNdx);
+ return BadMatch;
+ }
+ doodad->logo.color_ndx= dWire->logo.colorNdx;
+ doodad->logo.shape_ndx= dWire->logo.shapeNdx;
+ doodad->logo.logo_name= _GetCountedString(&wire,client->swapped);
+ break;
+ default:
+ client->errorValue= _XkbErrCode2(0x4F,dWire->any.type);
+ return BadValue;
+ }
+ *wire_inout= wire;
+ return Success;
+}
+
+static Status
+_CheckSetOverlay( char ** wire_inout,
+ XkbGeometryPtr geom,
+ XkbSectionPtr section,
+ ClientPtr client)
+{
+register int r;
+char * wire;
+XkbOverlayPtr ol;
+xkbOverlayWireDesc * olWire;
+xkbOverlayRowWireDesc * rWire;
+
+ wire= *wire_inout;
+ olWire= (xkbOverlayWireDesc *)wire;
+ if (client->swapped) {
+ register int n;
+ swapl(&olWire->name,n);
+ }
+ CHK_ATOM_ONLY(olWire->name);
+ ol= XkbAddGeomOverlay(section,olWire->name,olWire->nRows);
+ rWire= (xkbOverlayRowWireDesc *)&olWire[1];
+ for (r=0;r<olWire->nRows;r++) {
+ register int k;
+ xkbOverlayKeyWireDesc * kWire;
+ XkbOverlayRowPtr row;
+
+ if (rWire->rowUnder>section->num_rows) {
+ client->errorValue= _XkbErrCode4(0x20,r,section->num_rows,
+ rWire->rowUnder);
+ return BadMatch;
+ }
+ row= XkbAddGeomOverlayRow(ol,rWire->rowUnder,rWire->nKeys);
+ kWire= (xkbOverlayKeyWireDesc *)&rWire[1];
+ for (k=0;k<rWire->nKeys;k++,kWire++) {
+ if (XkbAddGeomOverlayKey(ol,row,
+ (char *)kWire->over,(char *)kWire->under)==NULL) {
+ client->errorValue= _XkbErrCode3(0x21,r,k);
+ return BadMatch;
+ }
+ }
+ rWire= (xkbOverlayRowWireDesc *)kWire;
+ }
+ olWire= (xkbOverlayWireDesc *)rWire;
+ wire= (char *)olWire;
+ *wire_inout= wire;
+ return Success;
+}
+
+static Status
+_CheckSetSections( XkbGeometryPtr geom,
+ xkbSetGeometryReq * req,
+ char ** wire_inout,
+ ClientPtr client)
+{
+Status status;
+register int s;
+char * wire;
+xkbSectionWireDesc * sWire;
+XkbSectionPtr section;
+
+ wire= *wire_inout;
+ if (req->nSections<1)
+ return Success;
+ sWire= (xkbSectionWireDesc *)wire;
+ for (s=0;s<req->nSections;s++) {
+ register int r;
+ xkbRowWireDesc * rWire;
+ if (client->swapped) {
+ register int n;
+ swapl(&sWire->name,n);
+ swaps(&sWire->top,n);
+ swaps(&sWire->left,n);
+ swaps(&sWire->width,n);
+ swaps(&sWire->height,n);
+ swaps(&sWire->angle,n);
+ }
+ CHK_ATOM_ONLY(sWire->name);
+ section= XkbAddGeomSection(geom,sWire->name,sWire->nRows,
+ sWire->nDoodads,sWire->nOverlays);
+ if (!section)
+ return BadAlloc;
+ section->priority= sWire->priority;
+ section->top= sWire->top;
+ section->left= sWire->left;
+ section->width= sWire->width;
+ section->height= sWire->height;
+ section->angle= sWire->angle;
+ rWire= (xkbRowWireDesc *)&sWire[1];
+ for (r=0;r<sWire->nRows;r++) {
+ register int k;
+ XkbRowPtr row;
+ xkbKeyWireDesc * kWire;
+ if (client->swapped) {
+ register int n;
+ swaps(&rWire->top,n);
+ swaps(&rWire->left,n);
+ }
+ row= XkbAddGeomRow(section,rWire->nKeys);
+ if (!row)
+ return BadAlloc;
+ row->top= rWire->top;
+ row->left= rWire->left;
+ row->vertical= rWire->vertical;
+ kWire= (xkbKeyWireDesc *)&rWire[1];
+ for (k=0;k<rWire->nKeys;k++) {
+ XkbKeyPtr key;
+ key= XkbAddGeomKey(row);
+ if (!key)
+ return BadAlloc;
+ memcpy(key->name.name,kWire[k].name,XkbKeyNameLength);
+ key->gap= kWire[k].gap;
+ key->shape_ndx= kWire[k].shapeNdx;
+ key->color_ndx= kWire[k].colorNdx;
+ if (key->shape_ndx>=geom->num_shapes) {
+ client->errorValue= _XkbErrCode3(0x10,key->shape_ndx,
+ geom->num_shapes);
+ return BadMatch;
+ }
+ if (key->color_ndx>=geom->num_colors) {
+ client->errorValue= _XkbErrCode3(0x11,key->color_ndx,
+ geom->num_colors);
+ return BadMatch;
+ }
+ }
+ rWire= (xkbRowWireDesc *)&kWire[rWire->nKeys];
+ }
+ wire= (char *)rWire;
+ if (sWire->nDoodads>0) {
+ register int d;
+ for (d=0;d<sWire->nDoodads;d++) {
+ status=_CheckSetDoodad(&wire,geom,section,client);
+ if (status!=Success)
+ return status;
+ }
+ }
+ if (sWire->nOverlays>0) {
+ register int o;
+ for (o=0;o<sWire->nOverlays;o++) {
+ status= _CheckSetOverlay(&wire,geom,section,client);
+ if (status!=Success)
+ return status;
+ }
+ }
+ sWire= (xkbSectionWireDesc *)wire;
+ }
+ wire= (char *)sWire;
+ *wire_inout= wire;
+ return Success;
+}
+
+static Status
+_CheckSetShapes( XkbGeometryPtr geom,
+ xkbSetGeometryReq * req,
+ char ** wire_inout,
+ ClientPtr client)
+{
+register int i;
+char * wire;
+
+ wire= *wire_inout;
+ if (req->nShapes<1) {
+ client->errorValue= _XkbErrCode2(0x06,req->nShapes);
+ return BadValue;
+ }
+ else {
+ xkbShapeWireDesc * shapeWire;
+ XkbShapePtr shape;
+ register int o;
+ shapeWire= (xkbShapeWireDesc *)wire;
+ for (i=0;i<req->nShapes;i++) {
+ xkbOutlineWireDesc * olWire;
+ XkbOutlinePtr ol;
+ shape= XkbAddGeomShape(geom,shapeWire->name,shapeWire->nOutlines);
+ if (!shape)
+ return BadAlloc;
+ olWire= (xkbOutlineWireDesc *)(&shapeWire[1]);
+ for (o=0;o<shapeWire->nOutlines;o++) {
+ register int p;
+ XkbPointPtr pt;
+ xkbPointWireDesc * ptWire;
+
+ ol= XkbAddGeomOutline(shape,olWire->nPoints);
+ if (!ol)
+ return BadAlloc;
+ ol->corner_radius= olWire->cornerRadius;
+ ptWire= (xkbPointWireDesc *)&olWire[1];
+ for (p=0,pt=ol->points;p<olWire->nPoints;p++,pt++) {
+ pt->x= ptWire[p].x;
+ pt->y= ptWire[p].y;
+ if (client->swapped) {
+ register int n;
+ swaps(&pt->x,n);
+ swaps(&pt->y,n);
+ }
+ }
+ ol->num_points= olWire->nPoints;
+ olWire= (xkbOutlineWireDesc *)(&ptWire[olWire->nPoints]);
+ }
+ if (shapeWire->primaryNdx!=XkbNoShape)
+ shape->primary= &shape->outlines[shapeWire->primaryNdx];
+ if (shapeWire->approxNdx!=XkbNoShape)
+ shape->approx= &shape->outlines[shapeWire->approxNdx];
+ shapeWire= (xkbShapeWireDesc *)olWire;
+ }
+ wire= (char *)shapeWire;
+ }
+ if (geom->num_shapes!=req->nShapes) {
+ client->errorValue= _XkbErrCode3(0x07,geom->num_shapes,req->nShapes);
+ return BadMatch;
+ }
+
+ *wire_inout= wire;
+ return Success;
+}
+
+static Status
+_CheckSetGeom( XkbGeometryPtr geom,
+ xkbSetGeometryReq * req,
+ ClientPtr client)
+{
+register int i;
+Status status;
+char * wire;
+
+ wire= (char *)&req[1];
+ geom->label_font= _GetCountedString(&wire,client->swapped);
+
+ for (i=0;i<req->nProperties;i++) {
+ char *name,*val;
+ name= _GetCountedString(&wire,client->swapped);
+ if (!name)
+ return BadAlloc;
+ val= _GetCountedString(&wire,client->swapped);
+ if (!val) {
+ free(name);
+ return BadAlloc;
+ }
+ if (XkbAddGeomProperty(geom,name,val)==NULL) {
+ free(name);
+ free(val);
+ return BadAlloc;
+ }
+ free(name);
+ free(val);
+ }
+
+ if (req->nColors<2) {
+ client->errorValue= _XkbErrCode3(0x01,2,req->nColors);
+ return BadValue;
+ }
+ if (req->baseColorNdx>req->nColors) {
+ client->errorValue=_XkbErrCode3(0x03,req->nColors,req->baseColorNdx);
+ return BadMatch;
+ }
+ if (req->labelColorNdx>req->nColors) {
+ client->errorValue= _XkbErrCode3(0x03,req->nColors,req->labelColorNdx);
+ return BadMatch;
+ }
+ if (req->labelColorNdx==req->baseColorNdx) {
+ client->errorValue= _XkbErrCode3(0x04,req->baseColorNdx,
+ req->labelColorNdx);
+ return BadMatch;
+ }
+
+ for (i=0;i<req->nColors;i++) {
+ char *name;
+ name= _GetCountedString(&wire,client->swapped);
+ if (!name)
+ return BadAlloc;
+ if (!XkbAddGeomColor(geom,name,geom->num_colors)) {
+ free(name);
+ return BadAlloc;
+ }
+ free(name);
+ }
+ if (req->nColors!=geom->num_colors) {
+ client->errorValue= _XkbErrCode3(0x05,req->nColors,geom->num_colors);
+ return BadMatch;
+ }
+ geom->label_color= &geom->colors[req->labelColorNdx];
+ geom->base_color= &geom->colors[req->baseColorNdx];
+
+ if ((status=_CheckSetShapes(geom,req,&wire,client))!=Success)
+ return status;
+
+ if ((status=_CheckSetSections(geom,req,&wire,client))!=Success)
+ return status;
+
+ for (i=0;i<req->nDoodads;i++) {
+ status=_CheckSetDoodad(&wire,geom,NULL,client);
+ if (status!=Success)
+ return status;
+ }
+
+ for (i=0;i<req->nKeyAliases;i++) {
+ if (XkbAddGeomKeyAlias(geom,&wire[XkbKeyNameLength],wire)==NULL)
+ return BadAlloc;
+ wire+= 2*XkbKeyNameLength;
+ }
+ return Success;
+}
+
+static int
+_XkbSetGeometry(ClientPtr client, DeviceIntPtr dev, xkbSetGeometryReq *stuff)
+{
+ XkbDescPtr xkb;
+ Bool new_name;
+ xkbNewKeyboardNotify nkn;
+ XkbGeometryPtr geom,old;
+ XkbGeometrySizesRec sizes;
+ Status status;
+
+ xkb= dev->key->xkbInfo->desc;
+ old= xkb->geom;
+ xkb->geom= NULL;
+
+ sizes.which= XkbGeomAllMask;
+ sizes.num_properties= stuff->nProperties;
+ sizes.num_colors= stuff->nColors;
+ sizes.num_shapes= stuff->nShapes;
+ sizes.num_sections= stuff->nSections;
+ sizes.num_doodads= stuff->nDoodads;
+ sizes.num_key_aliases= stuff->nKeyAliases;
+ if ((status= XkbAllocGeometry(xkb,&sizes))!=Success) {
+ xkb->geom= old;
+ return status;
+ }
+ geom= xkb->geom;
+ geom->name= stuff->name;
+ geom->width_mm= stuff->widthMM;
+ geom->height_mm= stuff->heightMM;
+ if ((status= _CheckSetGeom(geom,stuff,client))!=Success) {
+ XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
+ xkb->geom= old;
+ return status;
+ }
+ new_name= (xkb->names->geometry!=geom->name);
+ xkb->names->geometry= geom->name;
+ if (old)
+ XkbFreeGeometry(old,XkbGeomAllMask,TRUE);
+ if (new_name) {
+ xkbNamesNotify nn;
+ memset(&nn, 0, sizeof(xkbNamesNotify));
+ nn.changed= XkbGeometryNameMask;
+ XkbSendNamesNotify(dev,&nn);
+ }
+ nkn.deviceID= nkn.oldDeviceID= dev->id;
+ nkn.minKeyCode= nkn.oldMinKeyCode= xkb->min_key_code;
+ nkn.maxKeyCode= nkn.oldMaxKeyCode= xkb->max_key_code;
+ nkn.requestMajor= XkbReqCode;
+ nkn.requestMinor= X_kbSetGeometry;
+ nkn.changed= XkbNKN_GeometryMask;
+ XkbSendNewKeyboardNotify(dev,&nkn);
+ return Success;
+}
+
+int
+ProcXkbSetGeometry(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ int rc;
+
+ REQUEST(xkbSetGeometryReq);
+ REQUEST_AT_LEAST_SIZE(xkbSetGeometryReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+ CHK_ATOM_OR_NONE(stuff->name);
+
+ rc = _XkbSetGeometry(client, dev, stuff);
+ if (rc != Success)
+ return rc;
+
+ if (stuff->deviceSpec == XkbUseCoreKbd)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev)
+ {
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+ if (rc == Success)
+ _XkbSetGeometry(client, other, stuff);
+ }
+ }
+ }
+
+ return Success;
+}
+
+/***====================================================================***/
+
+int
+ProcXkbPerClientFlags(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ xkbPerClientFlagsReply rep;
+ XkbInterestPtr interest;
+ Mask access_mode = DixGetAttrAccess | DixSetAttrAccess;
+
+ REQUEST(xkbPerClientFlagsReq);
+ REQUEST_SIZE_MATCH(xkbPerClientFlagsReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
+ CHK_MASK_LEGAL(0x01,stuff->change,XkbPCF_AllFlagsMask);
+ CHK_MASK_MATCH(0x02,stuff->change,stuff->value);
+
+ interest = XkbFindClientResource((DevicePtr)dev,client);
+ memset(&rep, 0, sizeof(xkbPerClientFlagsReply));
+ rep.type= X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ if (stuff->change) {
+ client->xkbClientFlags&= ~stuff->change;
+ client->xkbClientFlags|= stuff->value;
+ }
+ if (stuff->change&XkbPCF_AutoResetControlsMask) {
+ Bool want;
+ want= stuff->value&XkbPCF_AutoResetControlsMask;
+ if (interest && !want) {
+ interest->autoCtrls= interest->autoCtrlValues= 0;
+ }
+ else if (want && (!interest)) {
+ XID id = FakeClientID(client->index);
+ if (!AddResource(id,RT_XKBCLIENT,dev))
+ return BadAlloc;
+ interest= XkbAddClientResource((DevicePtr)dev,client,id);
+ if (!interest)
+ return BadAlloc;
+ }
+ if (interest && want ) {
+ register unsigned affect;
+ affect= stuff->ctrlsToChange;
+
+ CHK_MASK_LEGAL(0x03,affect,XkbAllBooleanCtrlsMask);
+ CHK_MASK_MATCH(0x04,affect,stuff->autoCtrls);
+ CHK_MASK_MATCH(0x05,stuff->autoCtrls,stuff->autoCtrlValues);
+
+ interest->autoCtrls&= ~affect;
+ interest->autoCtrlValues&= ~affect;
+ interest->autoCtrls|= stuff->autoCtrls&affect;
+ interest->autoCtrlValues|= stuff->autoCtrlValues&affect;
+ }
+ }
+ rep.supported = XkbPCF_AllFlagsMask;
+ rep.value= client->xkbClientFlags&XkbPCF_AllFlagsMask;
+ if (interest) {
+ rep.autoCtrls= interest->autoCtrls;
+ rep.autoCtrlValues= interest->autoCtrlValues;
+ }
+ else {
+ rep.autoCtrls= rep.autoCtrlValues= 0;
+ }
+ if ( client->swapped ) {
+ register int n;
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.supported,n);
+ swapl(&rep.value,n);
+ swapl(&rep.autoCtrls,n);
+ swapl(&rep.autoCtrlValues,n);
+ }
+ WriteToClient(client,SIZEOF(xkbPerClientFlagsReply), (char *)&rep);
+ return Success;
+}
+
+/***====================================================================***/
+
+/* all latin-1 alphanumerics, plus parens, minus, underscore, slash */
+/* and wildcards */
+static unsigned char componentSpecLegal[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, 0xff, 0x87,
+ 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff
+};
+
+/* same as above but accepts percent, plus and bar too */
+static unsigned char componentExprLegal[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0xaf, 0xff, 0x87,
+ 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x17,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff
+};
+
+static char *
+GetComponentSpec(unsigned char **pWire,Bool allowExpr,int *errRtrn)
+{
+int len;
+register int i;
+unsigned char *wire,*str,*tmp,*legal;
+
+ if (allowExpr) legal= &componentExprLegal[0];
+ else legal= &componentSpecLegal[0];
+
+ wire= *pWire;
+ len= (*(unsigned char *)wire++);
+ if (len>0) {
+ str= calloc(1, len+1);
+ if (str) {
+ tmp= str;
+ for (i=0;i<len;i++) {
+ if (legal[(*wire)/8]&(1<<((*wire)%8)))
+ *tmp++= *wire++;
+ else wire++;
+ }
+ if (tmp!=str)
+ *tmp++= '\0';
+ else {
+ free(str);
+ str= NULL;
+ }
+ }
+ else {
+ *errRtrn= BadAlloc;
+ }
+ }
+ else {
+ str= NULL;
+ }
+ *pWire= wire;
+ return (char *)str;
+}
+
+/***====================================================================***/
+
+int
+ProcXkbListComponents(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ xkbListComponentsReply rep;
+ unsigned len;
+ int status;
+ unsigned char * str;
+ XkbSrvListInfoRec list;
+
+ REQUEST(xkbListComponentsReq);
+ REQUEST_AT_LEAST_SIZE(xkbListComponentsReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
+
+ status= Success;
+ str= (unsigned char *)&stuff[1];
+ memset(&list, 0, sizeof(XkbSrvListInfoRec));
+ list.maxRtrn= stuff->maxNames;
+ list.pattern[_XkbListKeycodes]= GetComponentSpec(&str,FALSE,&status);
+ list.pattern[_XkbListTypes]= GetComponentSpec(&str,FALSE,&status);
+ list.pattern[_XkbListCompat]= GetComponentSpec(&str,FALSE,&status);
+ list.pattern[_XkbListSymbols]= GetComponentSpec(&str,FALSE,&status);
+ list.pattern[_XkbListGeometry]= GetComponentSpec(&str,FALSE,&status);
+ if (status!=Success)
+ return status;
+ len= str-((unsigned char *)stuff);
+ if ((XkbPaddedSize(len)/4)!=stuff->length)
+ return BadLength;
+ if ((status=XkbDDXList(dev,&list,client))!=Success) {
+ free(list.pool);
+ list.pool = NULL;
+ return status;
+ }
+ memset(&rep, 0, sizeof(xkbListComponentsReply));
+ rep.type= X_Reply;
+ rep.deviceID = dev->id;
+ rep.sequenceNumber = client->sequence;
+ rep.length = XkbPaddedSize(list.nPool)/4;
+ rep.nKeymaps = 0;
+ rep.nKeycodes = list.nFound[_XkbListKeycodes];
+ rep.nTypes = list.nFound[_XkbListTypes];
+ rep.nCompatMaps = list.nFound[_XkbListCompat];
+ rep.nSymbols = list.nFound[_XkbListSymbols];
+ rep.nGeometries = list.nFound[_XkbListGeometry];
+ rep.extra= 0;
+ if (list.nTotal>list.maxRtrn)
+ rep.extra = (list.nTotal-list.maxRtrn);
+ if (client->swapped) {
+ register int n;
+ swaps(&rep.sequenceNumber,n);
+ swapl(&rep.length,n);
+ swaps(&rep.nKeymaps,n);
+ swaps(&rep.nKeycodes,n);
+ swaps(&rep.nTypes,n);
+ swaps(&rep.nCompatMaps,n);
+ swaps(&rep.nSymbols,n);
+ swaps(&rep.nGeometries,n);
+ swaps(&rep.extra,n);
+ }
+ WriteToClient(client,SIZEOF(xkbListComponentsReply),(char *)&rep);
+ if (list.nPool && list.pool) {
+ WriteToClient(client,XkbPaddedSize(list.nPool), (char *)list.pool);
+ free(list.pool);
+ list.pool= NULL;
+ }
+ return Success;
+}
+
+/***====================================================================***/
+
+int
+ProcXkbGetKbdByName(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ DeviceIntPtr tmpd;
+ xkbGetKbdByNameReply rep = {0};
+ xkbGetMapReply mrep = {0};
+ xkbGetCompatMapReply crep = {0};
+ xkbGetIndicatorMapReply irep = {0};
+ xkbGetNamesReply nrep = {0};
+ xkbGetGeometryReply grep = {0};
+ XkbComponentNamesRec names = {0};
+ XkbDescPtr xkb, new;
+ unsigned char * str;
+ char mapFile[PATH_MAX];
+ unsigned len;
+ unsigned fwant,fneed,reported;
+ int status;
+ Bool geom_changed;
+ XkbSrvLedInfoPtr old_sli;
+ XkbSrvLedInfoPtr sli;
+ Mask access_mode = DixGetAttrAccess | DixManageAccess;
+
+ REQUEST(xkbGetKbdByNameReq);
+ REQUEST_AT_LEAST_SIZE(xkbGetKbdByNameReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ memset(&mrep,0,sizeof(mrep)); //MH
+
+ CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
+
+ xkb = dev->key->xkbInfo->desc;
+ status= Success;
+ str= (unsigned char *)&stuff[1];
+ if (GetComponentSpec(&str,TRUE,&status)) /* keymap, unsupported */
+ return BadMatch;
+ names.keycodes= GetComponentSpec(&str,TRUE,&status);
+ names.types= GetComponentSpec(&str,TRUE,&status);
+ names.compat= GetComponentSpec(&str,TRUE,&status);
+ names.symbols= GetComponentSpec(&str,TRUE,&status);
+ names.geometry= GetComponentSpec(&str,TRUE,&status);
+ if (status!=Success)
+ return status;
+ len= str-((unsigned char *)stuff);
+ if ((XkbPaddedSize(len)/4)!=stuff->length)
+ return BadLength;
+
+ CHK_MASK_LEGAL(0x01,stuff->want,XkbGBN_AllComponentsMask);
+ CHK_MASK_LEGAL(0x02,stuff->need,XkbGBN_AllComponentsMask);
+
+ if (stuff->load)
+ fwant= XkbGBN_AllComponentsMask;
+ else fwant= stuff->want|stuff->need;
+ if ((!names.compat)&&
+ (fwant&(XkbGBN_CompatMapMask|XkbGBN_IndicatorMapMask))) {
+ names.compat= Xstrdup("%");
+ }
+ if ((!names.types)&&(fwant&(XkbGBN_TypesMask))) {
+ names.types= Xstrdup("%");
+ }
+ if ((!names.symbols)&&(fwant&XkbGBN_SymbolsMask)) {
+ names.symbols= Xstrdup("%");
+ }
+ geom_changed= ((names.geometry!=NULL)&&(strcmp(names.geometry,"%")!=0));
+ if ((!names.geometry)&&(fwant&XkbGBN_GeometryMask)) {
+ names.geometry= Xstrdup("%");
+ geom_changed= FALSE;
+ }
+
+ memset(mapFile, 0, PATH_MAX);
+ rep.type= X_Reply;
+ rep.deviceID = dev->id;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.minKeyCode = xkb->min_key_code;
+ rep.maxKeyCode = xkb->max_key_code;
+ rep.loaded= FALSE;
+ fwant= XkbConvertGetByNameComponents(TRUE,stuff->want)|XkmVirtualModsMask;
+ fneed= XkbConvertGetByNameComponents(TRUE,stuff->need);
+ rep.reported= XkbConvertGetByNameComponents(FALSE,fwant|fneed);
+ if (stuff->load) {
+ fneed|= XkmKeymapRequired;
+ fwant|= XkmKeymapLegal;
+ }
+ if ((fwant|fneed)&XkmSymbolsMask) {
+ fneed|= XkmKeyNamesIndex|XkmTypesIndex;
+ fwant|= XkmIndicatorsIndex;
+ }
+
+ /* We pass dev in here so we can get the old names out if needed. */
+ rep.found = XkbDDXLoadKeymapByNames(dev,&names,fwant,fneed,&new,
+ mapFile,PATH_MAX);
+ rep.newKeyboard= FALSE;
+ rep.pad1= rep.pad2= rep.pad3= rep.pad4= 0;
+
+ stuff->want|= stuff->need;
+ if (new==NULL)
+ rep.reported= 0;
+ else {
+ if (stuff->load)
+ rep.loaded= TRUE;
+ if (stuff->load ||
+ ((rep.reported&XkbGBN_SymbolsMask) && (new->compat))) {
+ XkbChangesRec changes;
+ memset(&changes, 0, sizeof(changes));
+ XkbUpdateDescActions(new,
+ new->min_key_code,XkbNumKeys(new),
+ &changes);
+ }
+
+ if (new->map==NULL)
+ rep.reported&= ~(XkbGBN_SymbolsMask|XkbGBN_TypesMask);
+ else if (rep.reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask)) {
+ mrep.type= X_Reply;
+ mrep.deviceID = dev->id;
+ mrep.sequenceNumber= client->sequence;
+ mrep.length = ((SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply))>>2);
+ mrep.minKeyCode = new->min_key_code;
+ mrep.maxKeyCode = new->max_key_code;
+ mrep.present = 0;
+ mrep.totalSyms = mrep.totalActs =
+ mrep.totalKeyBehaviors= mrep.totalKeyExplicit=
+ mrep.totalModMapKeys= mrep.totalVModMapKeys= 0;
+ if (rep.reported&(XkbGBN_TypesMask|XkbGBN_ClientSymbolsMask)) {
+ mrep.present|= XkbKeyTypesMask;
+ mrep.firstType = 0;
+ mrep.nTypes = mrep.totalTypes= new->map->num_types;
+ }
+ else {
+ mrep.firstType = mrep.nTypes= 0;
+ mrep.totalTypes= 0;
+ }
+ if (rep.reported&XkbGBN_ClientSymbolsMask) {
+ mrep.present|= (XkbKeySymsMask|XkbModifierMapMask);
+ mrep.firstKeySym = mrep.firstModMapKey= new->min_key_code;
+ mrep.nKeySyms = mrep.nModMapKeys= XkbNumKeys(new);
+ }
+ else {
+ mrep.firstKeySym= mrep.firstModMapKey= 0;
+ mrep.nKeySyms= mrep.nModMapKeys= 0;
+ }
+ if (rep.reported&XkbGBN_ServerSymbolsMask) {
+ mrep.present|= XkbAllServerInfoMask;
+ mrep.virtualMods= ~0;
+ mrep.firstKeyAct = mrep.firstKeyBehavior =
+ mrep.firstKeyExplicit = new->min_key_code;
+ mrep.nKeyActs = mrep.nKeyBehaviors =
+ mrep.nKeyExplicit = XkbNumKeys(new);
+ mrep.firstVModMapKey= new->min_key_code;
+ mrep.nVModMapKeys= XkbNumKeys(new);
+ }
+ else {
+ mrep.virtualMods= 0;
+ mrep.firstKeyAct= mrep.firstKeyBehavior=
+ mrep.firstKeyExplicit = 0;
+ mrep.nKeyActs= mrep.nKeyBehaviors= mrep.nKeyExplicit= 0;
+ }
+ XkbComputeGetMapReplySize(new,&mrep);
+ rep.length+= SIZEOF(xGenericReply)/4+mrep.length;
+ }
+ if (new->compat==NULL)
+ rep.reported&= ~XkbGBN_CompatMapMask;
+ else if (rep.reported&XkbGBN_CompatMapMask) {
+ crep.type= X_Reply;
+ crep.deviceID= dev->id;
+ crep.sequenceNumber= client->sequence;
+ crep.length= 0;
+ crep.groups= XkbAllGroupsMask;
+ crep.firstSI= 0;
+ crep.nSI= crep.nTotalSI= new->compat->num_si;
+ XkbComputeGetCompatMapReplySize(new->compat,&crep);
+ rep.length+= SIZEOF(xGenericReply)/4+crep.length;
+ }
+ if (new->indicators==NULL)
+ rep.reported&= ~XkbGBN_IndicatorMapMask;
+ else if (rep.reported&XkbGBN_IndicatorMapMask) {
+ irep.type= X_Reply;
+ irep.deviceID= dev->id;
+ irep.sequenceNumber= client->sequence;
+ irep.length= 0;
+ irep.which= XkbAllIndicatorsMask;
+ XkbComputeGetIndicatorMapReplySize(new->indicators,&irep);
+ rep.length+= SIZEOF(xGenericReply)/4+irep.length;
+ }
+ if (new->names==NULL)
+ rep.reported&= ~(XkbGBN_OtherNamesMask|XkbGBN_KeyNamesMask);
+ else if (rep.reported&(XkbGBN_OtherNamesMask|XkbGBN_KeyNamesMask)) {
+ nrep.type= X_Reply;
+ nrep.deviceID= dev->id;
+ nrep.sequenceNumber= client->sequence;
+ nrep.length= 0;
+ nrep.minKeyCode= new->min_key_code;
+ nrep.maxKeyCode= new->max_key_code;
+ if (rep.reported&XkbGBN_OtherNamesMask) {
+ nrep.which= XkbAllNamesMask;
+ if (new->map!=NULL)
+ nrep.nTypes= new->map->num_types;
+ else nrep.nTypes= 0;
+ nrep.nKTLevels= 0;
+ nrep.groupNames= XkbAllGroupsMask;
+ nrep.virtualMods= XkbAllVirtualModsMask;
+ nrep.indicators= XkbAllIndicatorsMask;
+ nrep.nRadioGroups= new->names->num_rg;
+ }
+ else {
+ nrep.which= 0;
+ nrep.nTypes= 0;
+ nrep.nKTLevels= 0;
+ nrep.groupNames= 0;
+ nrep.virtualMods= 0;
+ nrep.indicators= 0;
+ nrep.nRadioGroups= 0;
+ }
+ if (rep.reported&XkbGBN_KeyNamesMask) {
+ nrep.which|= XkbKeyNamesMask;
+ nrep.firstKey= new->min_key_code;
+ nrep.nKeys= XkbNumKeys(new);
+ nrep.nKeyAliases= new->names->num_key_aliases;
+ if (nrep.nKeyAliases)
+ nrep.which|= XkbKeyAliasesMask;
+ }
+ else {
+ nrep.which&= ~(XkbKeyNamesMask|XkbKeyAliasesMask);
+ nrep.firstKey= nrep.nKeys= 0;
+ nrep.nKeyAliases= 0;
+ }
+ XkbComputeGetNamesReplySize(new,&nrep);
+ rep.length+= SIZEOF(xGenericReply)/4+nrep.length;
+ }
+ if (new->geom==NULL)
+ rep.reported&= ~XkbGBN_GeometryMask;
+ else if (rep.reported&XkbGBN_GeometryMask) {
+ grep.type= X_Reply;
+ grep.deviceID= dev->id;
+ grep.sequenceNumber= client->sequence;
+ grep.length= 0;
+ grep.found= TRUE;
+ grep.pad= 0;
+ grep.widthMM= grep.heightMM= 0;
+ grep.nProperties= grep.nColors= grep.nShapes= 0;
+ grep.nSections= grep.nDoodads= 0;
+ grep.baseColorNdx= grep.labelColorNdx= 0;
+ XkbComputeGetGeometryReplySize(new->geom,&grep,None);
+ rep.length+= SIZEOF(xGenericReply)/4+grep.length;
+ }
+ }
+
+ reported= rep.reported;
+ if ( client->swapped ) {
+ register int n;
+ swaps(&rep.sequenceNumber,n);
+ swapl(&rep.length,n);
+ swaps(&rep.found,n);
+ swaps(&rep.reported,n);
+ }
+ WriteToClient(client,SIZEOF(xkbGetKbdByNameReply), (char *)&rep);
+ if (reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask))
+ XkbSendMap(client,new,&mrep);
+ if (reported&XkbGBN_CompatMapMask)
+ XkbSendCompatMap(client,new->compat,&crep);
+ if (reported&XkbGBN_IndicatorMapMask)
+ XkbSendIndicatorMap(client,new->indicators,&irep);
+ if (reported&(XkbGBN_KeyNamesMask|XkbGBN_OtherNamesMask))
+ XkbSendNames(client,new,&nrep);
+ if (reported&XkbGBN_GeometryMask)
+ XkbSendGeometry(client,new->geom,&grep,FALSE);
+ if (rep.loaded) {
+ XkbDescPtr old_xkb;
+ xkbNewKeyboardNotify nkn;
+ int i,nG,nTG;
+ old_xkb= xkb;
+ xkb= new;
+ dev->key->xkbInfo->desc= xkb;
+ new= old_xkb; /* so it'll get freed automatically */
+
+ *xkb->ctrls= *old_xkb->ctrls;
+ for (nG=nTG=0,i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
+ nG= XkbKeyNumGroups(xkb,i);
+ if (nG>=XkbNumKbdGroups) {
+ nTG= XkbNumKbdGroups;
+ break;
+ }
+ if (nG>nTG) {
+ nTG= nG;
+ }
+ }
+ xkb->ctrls->num_groups= nTG;
+
+ for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
+ if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) {
+ if (tmpd != dev)
+ XkbCopyDeviceKeymap(tmpd, dev);
+
+ if (tmpd->kbdfeed && tmpd->kbdfeed->xkb_sli) {
+ old_sli = tmpd->kbdfeed->xkb_sli;
+ tmpd->kbdfeed->xkb_sli = NULL;
+ sli = XkbAllocSrvLedInfo(tmpd, tmpd->kbdfeed, NULL, 0);
+ if (sli) {
+ sli->explicitState = old_sli->explicitState;
+ sli->effectiveState = old_sli->effectiveState;
+ }
+ tmpd->kbdfeed->xkb_sli = sli;
+ XkbFreeSrvLedInfo(old_sli);
+ }
+ }
+ }
+
+ nkn.deviceID= nkn.oldDeviceID= dev->id;
+ nkn.minKeyCode= new->min_key_code;
+ nkn.maxKeyCode= new->max_key_code;
+ nkn.oldMinKeyCode= xkb->min_key_code;
+ nkn.oldMaxKeyCode= xkb->max_key_code;
+ nkn.requestMajor= XkbReqCode;
+ nkn.requestMinor= X_kbGetKbdByName;
+ nkn.changed= XkbNKN_KeycodesMask;
+ if (geom_changed)
+ nkn.changed|= XkbNKN_GeometryMask;
+ XkbSendNewKeyboardNotify(dev,&nkn);
+
+ if (!IsMaster(dev)) {
+ DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD);
+ if (master && master->lastSlave == dev) {
+ XkbCopyDeviceKeymap(master, dev);
+ XkbSendNewKeyboardNotify(dev,&nkn);
+ }
+ }
+ }
+ if ((new!=NULL)&&(new!=xkb)) {
+ XkbFreeKeyboard(new,XkbAllComponentsMask,TRUE);
+ new= NULL;
+ }
+ XkbFreeComponentNames(&names, FALSE);
+ return Success;
+}
+
+/***====================================================================***/
+
+static int
+ComputeDeviceLedInfoSize( DeviceIntPtr dev,
+ unsigned int what,
+ XkbSrvLedInfoPtr sli)
+{
+int nNames,nMaps;
+register unsigned n,bit;
+
+ if (sli==NULL)
+ return 0;
+ nNames= nMaps= 0;
+ if ((what&XkbXI_IndicatorNamesMask)==0)
+ sli->namesPresent= 0;
+ if ((what&XkbXI_IndicatorMapsMask)==0)
+ sli->mapsPresent= 0;
+
+ for (n=0,bit=1;n<XkbNumIndicators;n++,bit<<=1) {
+ if (sli->names && sli->names[n]!=None) {
+ sli->namesPresent|= bit;
+ nNames++;
+ }
+ if (sli->maps && XkbIM_InUse(&sli->maps[n])) {
+ sli->mapsPresent|= bit;
+ nMaps++;
+ }
+ }
+ return (nNames*4)+(nMaps*SIZEOF(xkbIndicatorMapWireDesc));
+}
+
+static int
+CheckDeviceLedFBs( DeviceIntPtr dev,
+ int class,
+ int id,
+ xkbGetDeviceInfoReply * rep,
+ ClientPtr client)
+{
+int nFBs= 0;
+int length= 0;
+Bool classOk;
+
+ if (class==XkbDfltXIClass) {
+ if (dev->kbdfeed) class= KbdFeedbackClass;
+ else if (dev->leds) class= LedFeedbackClass;
+ else {
+ client->errorValue= _XkbErrCode2(XkbErr_BadClass,class);
+ return XkbKeyboardErrorCode;
+ }
+ }
+ classOk= FALSE;
+ if ((dev->kbdfeed)&&((class==KbdFeedbackClass)||(class==XkbAllXIClasses))) {
+ KbdFeedbackPtr kf;
+ classOk= TRUE;
+ for (kf= dev->kbdfeed;(kf);kf=kf->next) {
+ if ((id!=XkbAllXIIds)&&(id!=XkbDfltXIId)&&(id!=kf->ctrl.id))
+ continue;
+ nFBs++;
+ length+= SIZEOF(xkbDeviceLedsWireDesc);
+ if (!kf->xkb_sli)
+ kf->xkb_sli= XkbAllocSrvLedInfo(dev,kf,NULL,0);
+ length+= ComputeDeviceLedInfoSize(dev,rep->present,kf->xkb_sli);
+ if (id!=XkbAllXIIds)
+ break;
+ }
+ }
+ if ((dev->leds)&&((class==LedFeedbackClass)||(class==XkbAllXIClasses))) {
+ LedFeedbackPtr lf;
+ classOk= TRUE;
+ for (lf= dev->leds;(lf);lf=lf->next) {
+ if ((id!=XkbAllXIIds)&&(id!=XkbDfltXIId)&&(id!=lf->ctrl.id))
+ continue;
+ nFBs++;
+ length+= SIZEOF(xkbDeviceLedsWireDesc);
+ if (!lf->xkb_sli)
+ lf->xkb_sli= XkbAllocSrvLedInfo(dev,NULL,lf,0);
+ length+= ComputeDeviceLedInfoSize(dev,rep->present,lf->xkb_sli);
+ if (id!=XkbAllXIIds)
+ break;
+ }
+ }
+ if (nFBs>0) {
+ rep->nDeviceLedFBs= nFBs;
+ rep->length+= (length/4);
+ return Success;
+ }
+ if (classOk) client->errorValue= _XkbErrCode2(XkbErr_BadId,id);
+ else client->errorValue= _XkbErrCode2(XkbErr_BadClass,class);
+ return XkbKeyboardErrorCode;
+}
+
+static int
+SendDeviceLedInfo( XkbSrvLedInfoPtr sli,
+ ClientPtr client)
+{
+xkbDeviceLedsWireDesc wire;
+int length;
+
+ length= 0;
+ wire.ledClass= sli->class;
+ wire.ledID= sli->id;
+ wire.namesPresent= sli->namesPresent;
+ wire.mapsPresent= sli->mapsPresent;
+ wire.physIndicators= sli->physIndicators;
+ wire.state= sli->effectiveState;
+ if (client->swapped) {
+ register int n;
+ swaps(&wire.ledClass,n);
+ swaps(&wire.ledID,n);
+ swapl(&wire.namesPresent,n);
+ swapl(&wire.mapsPresent,n);
+ swapl(&wire.physIndicators,n);
+ swapl(&wire.state,n);
+ }
+ WriteToClient(client,SIZEOF(xkbDeviceLedsWireDesc),(char *)&wire);
+ length+= SIZEOF(xkbDeviceLedsWireDesc);
+ if (sli->namesPresent|sli->mapsPresent) {
+ register unsigned i,bit;
+ if (sli->namesPresent) {
+ CARD32 awire;
+ for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
+ if (sli->namesPresent&bit) {
+ awire= (CARD32)sli->names[i];
+ if (client->swapped) {
+ register int n;
+ swapl(&awire,n);
+ }
+ WriteToClient(client,4,(char *)&awire);
+ length+= 4;
+ }
+ }
+ }
+ if (sli->mapsPresent) {
+ for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
+ xkbIndicatorMapWireDesc iwire;
+ if (sli->mapsPresent&bit) {
+ iwire.flags= sli->maps[i].flags;
+ iwire.whichGroups= sli->maps[i].which_groups;
+ iwire.groups= sli->maps[i].groups;
+ iwire.whichMods= sli->maps[i].which_mods;
+ iwire.mods= sli->maps[i].mods.mask;
+ iwire.realMods= sli->maps[i].mods.real_mods;
+ iwire.virtualMods= sli->maps[i].mods.vmods;
+ iwire.ctrls= sli->maps[i].ctrls;
+ if (client->swapped) {
+ register int n;
+ swaps(&iwire.virtualMods,n);
+ swapl(&iwire.ctrls,n);
+ }
+ WriteToClient(client,SIZEOF(xkbIndicatorMapWireDesc),
+ (char *)&iwire);
+ length+= SIZEOF(xkbIndicatorMapWireDesc);
+ }
+ }
+ }
+ }
+ return length;
+}
+
+static int
+SendDeviceLedFBs( DeviceIntPtr dev,
+ int class,
+ int id,
+ unsigned wantLength,
+ ClientPtr client)
+{
+int length= 0;
+
+ if (class==XkbDfltXIClass) {
+ if (dev->kbdfeed) class= KbdFeedbackClass;
+ else if (dev->leds) class= LedFeedbackClass;
+ }
+ if ((dev->kbdfeed)&&
+ ((class==KbdFeedbackClass)||(class==XkbAllXIClasses))) {
+ KbdFeedbackPtr kf;
+ for (kf= dev->kbdfeed;(kf);kf=kf->next) {
+ if ((id==XkbAllXIIds)||(id==XkbDfltXIId)||(id==kf->ctrl.id)) {
+ length+= SendDeviceLedInfo(kf->xkb_sli,client);
+ if (id!=XkbAllXIIds)
+ break;
+ }
+ }
+ }
+ if ((dev->leds)&&
+ ((class==LedFeedbackClass)||(class==XkbAllXIClasses))) {
+ LedFeedbackPtr lf;
+ for (lf= dev->leds;(lf);lf=lf->next) {
+ if ((id==XkbAllXIIds)||(id==XkbDfltXIId)||(id==lf->ctrl.id)) {
+ length+= SendDeviceLedInfo(lf->xkb_sli,client);
+ if (id!=XkbAllXIIds)
+ break;
+ }
+ }
+ }
+ if (length==wantLength)
+ return Success;
+ else return BadLength;
+}
+
+int
+ProcXkbGetDeviceInfo(ClientPtr client)
+{
+DeviceIntPtr dev;
+xkbGetDeviceInfoReply rep;
+int status,nDeviceLedFBs;
+unsigned length,nameLen;
+CARD16 ledClass,ledID;
+unsigned wanted;
+char * str;
+
+ REQUEST(xkbGetDeviceInfoReq);
+ REQUEST_SIZE_MATCH(xkbGetDeviceInfoReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ wanted= stuff->wanted;
+
+ CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
+ CHK_MASK_LEGAL(0x01,wanted,XkbXI_AllDeviceFeaturesMask);
+
+ if ((!dev->button)||((stuff->nBtns<1)&&(!stuff->allBtns)))
+ wanted&= ~XkbXI_ButtonActionsMask;
+ if ((!dev->kbdfeed)&&(!dev->leds))
+ wanted&= ~XkbXI_IndicatorsMask;
+
+ nameLen= XkbSizeCountedString(dev->name);
+ memset((char *)&rep, 0, SIZEOF(xkbGetDeviceInfoReply));
+ rep.type = X_Reply;
+ rep.deviceID= dev->id;
+ rep.sequenceNumber = client->sequence;
+ rep.length = nameLen/4;
+ rep.present = wanted;
+ rep.supported = XkbXI_AllDeviceFeaturesMask;
+ rep.unsupported = 0;
+ rep.firstBtnWanted = rep.nBtnsWanted = 0;
+ rep.firstBtnRtrn = rep.nBtnsRtrn = 0;
+ if (dev->button)
+ rep.totalBtns= dev->button->numButtons;
+ else rep.totalBtns= 0;
+ rep.devType= dev->xinput_type;
+ rep.hasOwnState= (dev->key && dev->key->xkbInfo);
+ rep.nDeviceLedFBs = 0;
+ if (dev->kbdfeed) rep.dfltKbdFB= dev->kbdfeed->ctrl.id;
+ else rep.dfltKbdFB= XkbXINone;
+ if (dev->leds) rep.dfltLedFB= dev->leds->ctrl.id;
+ else rep.dfltLedFB= XkbXINone;
+
+ ledClass= stuff->ledClass;
+ ledID= stuff->ledID;
+
+ rep.firstBtnWanted= rep.nBtnsWanted= 0;
+ rep.firstBtnRtrn= rep.nBtnsRtrn= 0;
+ if (wanted&XkbXI_ButtonActionsMask) {
+ if (stuff->allBtns) {
+ stuff->firstBtn= 0;
+ stuff->nBtns= dev->button->numButtons;
+ }
+
+ if ((stuff->firstBtn+stuff->nBtns)>dev->button->numButtons) {
+ client->errorValue = _XkbErrCode4(0x02,dev->button->numButtons,
+ stuff->firstBtn,
+ stuff->nBtns);
+ return BadValue;
+ }
+ else {
+ rep.firstBtnWanted= stuff->firstBtn;
+ rep.nBtnsWanted= stuff->nBtns;
+ if (dev->button->xkb_acts!=NULL) {
+ XkbAction *act;
+ register int i;
+
+ rep.firstBtnRtrn= stuff->firstBtn;
+ rep.nBtnsRtrn= stuff->nBtns;
+ act= &dev->button->xkb_acts[rep.firstBtnWanted];
+ for (i=0;i<rep.nBtnsRtrn;i++,act++) {
+ if (act->type!=XkbSA_NoAction)
+ break;
+ }
+ rep.firstBtnRtrn+= i;
+ rep.nBtnsRtrn-= i;
+ act= &dev->button->xkb_acts[rep.firstBtnRtrn+rep.nBtnsRtrn-1];
+ for (i=0;i<rep.nBtnsRtrn;i++,act--) {
+ if (act->type!=XkbSA_NoAction)
+ break;
+ }
+ rep.nBtnsRtrn-= i;
+ }
+ rep.length+= (rep.nBtnsRtrn*SIZEOF(xkbActionWireDesc))/4;
+ }
+ }
+
+ if (wanted&XkbXI_IndicatorsMask) {
+ status= CheckDeviceLedFBs(dev,ledClass,ledID,&rep,client);
+ if (status!=Success)
+ return status;
+ }
+ length= rep.length*4;
+ nDeviceLedFBs = rep.nDeviceLedFBs;
+ if (client->swapped) {
+ register int n;
+ swaps(&rep.sequenceNumber,n);
+ swapl(&rep.length,n);
+ swaps(&rep.present,n);
+ swaps(&rep.supported,n);
+ swaps(&rep.unsupported,n);
+ swaps(&rep.nDeviceLedFBs,n);
+ swapl(&rep.type,n);
+ }
+ WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), (char *)&rep);
+
+ str= malloc(nameLen);
+ if (!str)
+ return BadAlloc;
+ XkbWriteCountedString(str,dev->name,client->swapped);
+ WriteToClient(client,nameLen,str);
+ free(str);
+ length-= nameLen;
+
+ if (rep.nBtnsRtrn>0) {
+ int sz;
+ xkbActionWireDesc * awire;
+ sz= rep.nBtnsRtrn*SIZEOF(xkbActionWireDesc);
+ awire= (xkbActionWireDesc *)&dev->button->xkb_acts[rep.firstBtnRtrn];
+ WriteToClient(client,sz,(char *)awire);
+ length-= sz;
+ }
+ if (nDeviceLedFBs>0) {
+ status= SendDeviceLedFBs(dev,ledClass,ledID,length,client);
+ if (status!=Success)
+ return status;
+ }
+ else if (length!=0) {
+ ErrorF("[xkb] Internal Error! BadLength in ProcXkbGetDeviceInfo\n");
+ ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length);
+ return BadLength;
+ }
+ return Success;
+}
+
+static char *
+CheckSetDeviceIndicators( char * wire,
+ DeviceIntPtr dev,
+ int num,
+ int * status_rtrn,
+ ClientPtr client)
+{
+xkbDeviceLedsWireDesc * ledWire;
+int i;
+XkbSrvLedInfoPtr sli;
+
+ ledWire= (xkbDeviceLedsWireDesc *)wire;
+ for (i=0;i<num;i++) {
+ if (client->swapped) {
+ register int n;
+ swaps(&ledWire->ledClass,n);
+ swaps(&ledWire->ledID,n);
+ swapl(&ledWire->namesPresent,n);
+ swapl(&ledWire->mapsPresent,n);
+ swapl(&ledWire->physIndicators,n);
+ }
+
+ sli= XkbFindSrvLedInfo(dev,ledWire->ledClass,ledWire->ledID,
+ XkbXI_IndicatorsMask);
+ if (sli!=NULL) {
+ register int n;
+ register unsigned bit;
+ int nMaps,nNames;
+ CARD32 *atomWire;
+ xkbIndicatorMapWireDesc *mapWire;
+
+ nMaps= nNames= 0;
+ for (n=0,bit=1;n<XkbNumIndicators;n++,bit<<=1) {
+ if (ledWire->namesPresent&bit)
+ nNames++;
+ if (ledWire->mapsPresent&bit)
+ nMaps++;
+ }
+ atomWire= (CARD32 *)&ledWire[1];
+ if (nNames>0) {
+ for (n=0;n<nNames;n++) {
+ if (client->swapped) {
+ register int t;
+ swapl(atomWire,t);
+ }
+ CHK_ATOM_OR_NONE3(((Atom)(*atomWire)),client->errorValue,
+ *status_rtrn,NULL);
+ atomWire++;
+ }
+ }
+ mapWire= (xkbIndicatorMapWireDesc *)atomWire;
+ if (nMaps>0) {
+ for (n=0;n<nMaps;n++) {
+ if (client->swapped) {
+ register int t;
+ swaps(&mapWire->virtualMods,t);
+ swapl(&mapWire->ctrls,t);
+ }
+ CHK_MASK_LEGAL3(0x21,mapWire->whichGroups,
+ XkbIM_UseAnyGroup,
+ client->errorValue,
+ *status_rtrn,NULL);
+ CHK_MASK_LEGAL3(0x22,mapWire->whichMods,XkbIM_UseAnyMods,
+ client->errorValue,
+ *status_rtrn,NULL);
+ mapWire++;
+ }
+ }
+ ledWire= (xkbDeviceLedsWireDesc *)mapWire;
+ }
+ else {
+ /* SHOULD NEVER HAPPEN */
+ return (char *)ledWire;
+ }
+ }
+ return (char *)ledWire;
+}
+
+static char *
+SetDeviceIndicators( char * wire,
+ DeviceIntPtr dev,
+ unsigned changed,
+ int num,
+ int * status_rtrn,
+ ClientPtr client,
+ xkbExtensionDeviceNotify *ev)
+{
+xkbDeviceLedsWireDesc * ledWire;
+int i;
+XkbEventCauseRec cause;
+unsigned namec,mapc,statec;
+xkbExtensionDeviceNotify ed;
+XkbChangesRec changes;
+DeviceIntPtr kbd;
+
+ memset((char *)&ed, 0, sizeof(xkbExtensionDeviceNotify));
+ memset((char *)&changes, 0, sizeof(XkbChangesRec));
+ XkbSetCauseXkbReq(&cause,X_kbSetDeviceInfo,client);
+ ledWire= (xkbDeviceLedsWireDesc *)wire;
+ for (i=0;i<num;i++) {
+ register int n;
+ register unsigned bit;
+ CARD32 * atomWire;
+ xkbIndicatorMapWireDesc * mapWire;
+ XkbSrvLedInfoPtr sli;
+
+ namec= mapc= statec= 0;
+ sli= XkbFindSrvLedInfo(dev,ledWire->ledClass,ledWire->ledID,
+ XkbXI_IndicatorMapsMask);
+ if (!sli) {
+ /* SHOULD NEVER HAPPEN!! */
+ return (char *)ledWire;
+ }
+
+ atomWire= (CARD32 *)&ledWire[1];
+ if (changed&XkbXI_IndicatorNamesMask) {
+ namec= sli->namesPresent|ledWire->namesPresent;
+ memset((char *)sli->names, 0, XkbNumIndicators*sizeof(Atom));
+ }
+ if (ledWire->namesPresent) {
+ sli->namesPresent= ledWire->namesPresent;
+ memset((char *)sli->names, 0, XkbNumIndicators*sizeof(Atom));
+ for (n=0,bit=1;n<XkbNumIndicators;n++,bit<<=1) {
+ if (ledWire->namesPresent&bit) {
+ sli->names[n]= (Atom)*atomWire;
+ if (sli->names[n]==None)
+ ledWire->namesPresent&= ~bit;
+ atomWire++;
+ }
+ }
+ }
+ mapWire= (xkbIndicatorMapWireDesc *)atomWire;
+ if (changed&XkbXI_IndicatorMapsMask) {
+ mapc= sli->mapsPresent|ledWire->mapsPresent;
+ sli->mapsPresent= ledWire->mapsPresent;
+ memset((char*)sli->maps, 0, XkbNumIndicators*sizeof(XkbIndicatorMapRec));
+ }
+ if (ledWire->mapsPresent) {
+ for (n=0,bit=1;n<XkbNumIndicators;n++,bit<<=1) {
+ if (ledWire->mapsPresent&bit) {
+ sli->maps[n].flags= mapWire->flags;
+ sli->maps[n].which_groups= mapWire->whichGroups;
+ sli->maps[n].groups= mapWire->groups;
+ sli->maps[n].which_mods= mapWire->whichMods;
+ sli->maps[n].mods.mask= mapWire->mods;
+ sli->maps[n].mods.real_mods=mapWire->realMods;
+ sli->maps[n].mods.vmods= mapWire->virtualMods;
+ sli->maps[n].ctrls= mapWire->ctrls;
+ mapWire++;
+ }
+ }
+ }
+ if (changed&XkbXI_IndicatorStateMask) {
+ statec= sli->effectiveState^ledWire->state;
+ sli->explicitState&= ~statec;
+ sli->explicitState|= (ledWire->state&statec);
+ }
+ if (namec)
+ XkbApplyLedNameChanges(dev,sli,namec,&ed,&changes,&cause);
+ if (mapc)
+ XkbApplyLedMapChanges(dev,sli,mapc,&ed,&changes,&cause);
+ if (statec)
+ XkbApplyLedStateChanges(dev,sli,statec,&ed,&changes,&cause);
+
+ kbd= dev;
+ if ((sli->flags&XkbSLI_HasOwnState)==0)
+ kbd = inputInfo.keyboard;
+
+ XkbFlushLedEvents(dev,kbd,sli,&ed,&changes,&cause);
+ ledWire= (xkbDeviceLedsWireDesc *)mapWire;
+ }
+ return (char *)ledWire;
+}
+
+
+static int
+_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev,
+ xkbSetDeviceInfoReq *stuff)
+{
+ char *wire;
+
+ wire= (char *)&stuff[1];
+ if (stuff->change&XkbXI_ButtonActionsMask) {
+ if (!dev->button) {
+ client->errorValue = _XkbErrCode2(XkbErr_BadClass,ButtonClass);
+ return XkbKeyboardErrorCode;
+ }
+ if ((stuff->firstBtn+stuff->nBtns)>dev->button->numButtons) {
+ client->errorValue= _XkbErrCode4(0x02,stuff->firstBtn,stuff->nBtns,
+ dev->button->numButtons);
+ return BadMatch;
+ }
+ wire+= (stuff->nBtns*SIZEOF(xkbActionWireDesc));
+ }
+ if (stuff->change&XkbXI_IndicatorsMask) {
+ int status= Success;
+ wire= CheckSetDeviceIndicators(wire,dev,stuff->nDeviceLedFBs,
+ &status,client);
+ if (status!=Success)
+ return status;
+ }
+ if (((wire-((char *)stuff))/4)!=stuff->length)
+ return BadLength;
+
+ return Success;
+}
+
+static int
+_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev,
+ xkbSetDeviceInfoReq *stuff)
+{
+ char *wire;
+ xkbExtensionDeviceNotify ed;
+
+ memset((char *)&ed, 0, SIZEOF(xkbExtensionDeviceNotify));
+ ed.deviceID= dev->id;
+ wire= (char *)&stuff[1];
+ if (stuff->change&XkbXI_ButtonActionsMask) {
+ int nBtns,sz,i;
+ XkbAction * acts;
+ DeviceIntPtr kbd;
+
+ nBtns= dev->button->numButtons;
+ acts= dev->button->xkb_acts;
+ if (acts==NULL) {
+ acts= calloc(nBtns, sizeof(XkbAction));
+ if (!acts)
+ return BadAlloc;
+ dev->button->xkb_acts= acts;
+ }
+ sz= stuff->nBtns*SIZEOF(xkbActionWireDesc);
+ memcpy((char *)&acts[stuff->firstBtn],(char *)wire,sz);
+ wire+= sz;
+ ed.reason|= XkbXI_ButtonActionsMask;
+ ed.firstBtn= stuff->firstBtn;
+ ed.nBtns= stuff->nBtns;
+
+ if (dev->key) kbd= dev;
+ else kbd= inputInfo.keyboard;
+ acts= &dev->button->xkb_acts[stuff->firstBtn];
+ for (i=0;i<stuff->nBtns;i++,acts++) {
+ if (acts->type!=XkbSA_NoAction)
+ XkbSetActionKeyMods(kbd->key->xkbInfo->desc,acts,0);
+ }
+ }
+ if (stuff->change&XkbXI_IndicatorsMask) {
+ int status= Success;
+ wire= SetDeviceIndicators(wire,dev,stuff->change,
+ stuff->nDeviceLedFBs, &status,client,&ed);
+ if (status!=Success)
+ return status;
+ }
+ if ((stuff->change)&&(ed.reason))
+ XkbSendExtensionDeviceNotify(dev,client,&ed);
+ return Success;
+}
+
+int
+ProcXkbSetDeviceInfo(ClientPtr client)
+{
+ DeviceIntPtr dev;
+ int rc;
+
+ REQUEST(xkbSetDeviceInfoReq);
+ REQUEST_AT_LEAST_SIZE(xkbSetDeviceInfoReq);
+
+ if (!(client->xkbClientFlags&_XkbClientInitialized))
+ return BadAccess;
+
+ CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+ CHK_MASK_LEGAL(0x01,stuff->change,XkbXI_AllFeaturesMask);
+
+ rc = _XkbSetDeviceInfoCheck(client, dev, stuff);
+
+ if (rc != Success)
+ return rc;
+
+ if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if (((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) &&
+ ((stuff->deviceSpec == XkbUseCoreKbd && other->key) ||
+ (stuff->deviceSpec == XkbUseCorePtr && other->button)))
+ {
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+ if (rc == Success)
+ {
+ rc = _XkbSetDeviceInfoCheck(client, other, stuff);
+ if (rc != Success)
+ return rc;
+ }
+ }
+ }
+ }
+
+ /* checks done, apply */
+ rc = _XkbSetDeviceInfo(client, dev, stuff);
+ if (rc != Success)
+ return rc;
+
+ if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr)
+ {
+ DeviceIntPtr other;
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if (((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) &&
+ ((stuff->deviceSpec == XkbUseCoreKbd && other->key) ||
+ (stuff->deviceSpec == XkbUseCorePtr && other->button)))
+ {
+ rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+ if (rc == Success)
+ {
+ rc = _XkbSetDeviceInfo(client, other, stuff);
+ if (rc != Success)
+ return rc;
+ }
+ }
+ }
+ }
+
+ return Success;
+}
+
+/***====================================================================***/
+
+int
+ProcXkbSetDebuggingFlags(ClientPtr client)
+{
+CARD32 newFlags,newCtrls,extraLength;
+xkbSetDebuggingFlagsReply rep;
+int rc;
+
+ REQUEST(xkbSetDebuggingFlagsReq);
+ REQUEST_AT_LEAST_SIZE(xkbSetDebuggingFlagsReq);
+
+ rc = XaceHook(XACE_SERVER_ACCESS, client, DixDebugAccess);
+ if (rc != Success)
+ return rc;
+
+ newFlags= xkbDebugFlags&(~stuff->affectFlags);
+ newFlags|= (stuff->flags&stuff->affectFlags);
+ newCtrls= xkbDebugCtrls&(~stuff->affectCtrls);
+ newCtrls|= (stuff->ctrls&stuff->affectCtrls);
+ if (xkbDebugFlags || newFlags || stuff->msgLength) {
+ ErrorF("[xkb] XkbDebug: Setting debug flags to 0x%lx\n",(long)newFlags);
+ if (newCtrls!=xkbDebugCtrls)
+ ErrorF("[xkb] XkbDebug: Setting debug controls to 0x%lx\n",(long)newCtrls);
+ }
+ extraLength= (stuff->length<<2)-sz_xkbSetDebuggingFlagsReq;
+ if (stuff->msgLength>0) {
+ char *msg;
+ if (extraLength<XkbPaddedSize(stuff->msgLength)) {
+ ErrorF("[xkb] XkbDebug: msgLength= %d, length= %ld (should be %d)\n",
+ stuff->msgLength,(long)extraLength,
+ XkbPaddedSize(stuff->msgLength));
+ return BadLength;
+ }
+ msg= (char *)&stuff[1];
+ if (msg[stuff->msgLength-1]!='\0') {
+ ErrorF("[xkb] XkbDebug: message not null-terminated\n");
+ return BadValue;
+ }
+ ErrorF("[xkb] XkbDebug: %s\n",msg);
+ }
+ xkbDebugFlags = newFlags;
+ xkbDebugCtrls = newCtrls;
+
+ rep.type= X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.currentFlags = newFlags;
+ rep.currentCtrls = newCtrls;
+ rep.supportedFlags = ~0;
+ rep.supportedCtrls = ~0;
+ if ( client->swapped ) {
+ register int n;
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.currentFlags, n);
+ swapl(&rep.currentCtrls, n);
+ swapl(&rep.supportedFlags, n);
+ swapl(&rep.supportedCtrls, n);
+ }
+ WriteToClient(client,SIZEOF(xkbSetDebuggingFlagsReply), (char *)&rep);
+ return Success;
+}
+
+/***====================================================================***/
+
+static int
+ProcXkbDispatch (ClientPtr client)
+{
+ REQUEST(xReq);
+ switch (stuff->data)
+ {
+ case X_kbUseExtension:
+ return ProcXkbUseExtension(client);
+ case X_kbSelectEvents:
+ return ProcXkbSelectEvents(client);
+ case X_kbBell:
+ return ProcXkbBell(client);
+ case X_kbGetState:
+ return ProcXkbGetState(client);
+ case X_kbLatchLockState:
+ return ProcXkbLatchLockState(client);
+ case X_kbGetControls:
+ return ProcXkbGetControls(client);
+ case X_kbSetControls:
+ return ProcXkbSetControls(client);
+ case X_kbGetMap:
+ return ProcXkbGetMap(client);
+ case X_kbSetMap:
+ return ProcXkbSetMap(client);
+ case X_kbGetCompatMap:
+ return ProcXkbGetCompatMap(client);
+ case X_kbSetCompatMap:
+ return ProcXkbSetCompatMap(client);
+ case X_kbGetIndicatorState:
+ return ProcXkbGetIndicatorState(client);
+ case X_kbGetIndicatorMap:
+ return ProcXkbGetIndicatorMap(client);
+ case X_kbSetIndicatorMap:
+ return ProcXkbSetIndicatorMap(client);
+ case X_kbGetNamedIndicator:
+ return ProcXkbGetNamedIndicator(client);
+ case X_kbSetNamedIndicator:
+ return ProcXkbSetNamedIndicator(client);
+ case X_kbGetNames:
+ return ProcXkbGetNames(client);
+ case X_kbSetNames:
+ return ProcXkbSetNames(client);
+ case X_kbGetGeometry:
+ return ProcXkbGetGeometry(client);
+ case X_kbSetGeometry:
+ return ProcXkbSetGeometry(client);
+ case X_kbPerClientFlags:
+ return ProcXkbPerClientFlags(client);
+ case X_kbListComponents:
+ return ProcXkbListComponents(client);
+ case X_kbGetKbdByName:
+ return ProcXkbGetKbdByName(client);
+ case X_kbGetDeviceInfo:
+ return ProcXkbGetDeviceInfo(client);
+ case X_kbSetDeviceInfo:
+ return ProcXkbSetDeviceInfo(client);
+ case X_kbSetDebuggingFlags:
+ return ProcXkbSetDebuggingFlags(client);
+ default:
+ return BadRequest;
+ }
+}
+
+static int
+XkbClientGone(pointer data,XID id)
+{
+ DevicePtr pXDev = (DevicePtr)data;
+
+ if (!XkbRemoveResourceClient(pXDev,id)) {
+ ErrorF("[xkb] Internal Error! bad RemoveResourceClient in XkbClientGone\n");
+ }
+ return 1;
+}
+
+void
+XkbExtensionInit(void)
+{
+ ExtensionEntry *extEntry;
+
+ RT_XKBCLIENT = CreateNewResourceType(XkbClientGone, "XkbClient");
+ if (!RT_XKBCLIENT)
+ return;
+
+ if (!XkbInitPrivates())
+ return;
+
+ if ((extEntry = AddExtension(XkbName, XkbNumberEvents, XkbNumberErrors,
+ ProcXkbDispatch, SProcXkbDispatch,
+ NULL, StandardMinorOpcode))) {
+ XkbReqCode = (unsigned char)extEntry->base;
+ XkbEventBase = (unsigned char)extEntry->eventBase;
+ XkbErrorBase = (unsigned char)extEntry->errorBase;
+ XkbKeyboardErrorCode = XkbErrorBase+XkbKeyboard;
+ }
+ return;
+}
+
+
diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c
index 12fe2a1f5..7c6f0bed6 100644
--- a/xorg-server/xkb/xkbAccessX.c
+++ b/xorg-server/xkb/xkbAccessX.c
@@ -1,773 +1,773 @@
-/************************************************************
-Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
-of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
-of this software for any purpose. It is provided "as is"
-without any express or implied warranty.
-
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <math.h>
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/keysym.h>
-#include "exglobals.h"
-#include <X11/extensions/XIproto.h>
-#include "inputstr.h"
-#include "eventstr.h"
-#include <xkbsrv.h>
-#if !defined(WIN32)
-#include <sys/time.h>
-#endif
-
-int XkbDfltRepeatDelay= 660;
-int XkbDfltRepeatInterval= 40;
-
-#define DFLT_TIMEOUT_CTRLS (XkbAX_KRGMask|XkbStickyKeysMask|XkbMouseKeysMask)
-#define DFLT_TIMEOUT_OPTS (XkbAX_IndicatorFBMask)
-
-unsigned short XkbDfltAccessXTimeout= 120;
-unsigned int XkbDfltAccessXTimeoutMask= DFLT_TIMEOUT_CTRLS;
-static unsigned int XkbDfltAccessXTimeoutValues= 0;
-static unsigned int XkbDfltAccessXTimeoutOptionsMask= DFLT_TIMEOUT_OPTS;
-static unsigned int XkbDfltAccessXTimeoutOptionsValues= 0;
-unsigned int XkbDfltAccessXFeedback= XkbAccessXFeedbackMask;
-unsigned short XkbDfltAccessXOptions= XkbAX_AllOptionsMask & ~(XkbAX_IndicatorFBMask|XkbAX_SKReleaseFBMask|XkbAX_SKRejectFBMask);
-
-void
-AccessXComputeCurveFactor(XkbSrvInfoPtr xkbi,XkbControlsPtr ctrls)
-{
- xkbi->mouseKeysCurve= 1.0+(((double)ctrls->mk_curve)*0.001);
- xkbi->mouseKeysCurveFactor= ( ((double)ctrls->mk_max_speed)/
- pow((double)ctrls->mk_time_to_max,xkbi->mouseKeysCurve));
- return;
-}
-
-void
-AccessXInit(DeviceIntPtr keybd)
-{
-XkbSrvInfoPtr xkbi = keybd->key->xkbInfo;
-XkbControlsPtr ctrls = xkbi->desc->ctrls;
-
- xkbi->shiftKeyCount= 0;
- xkbi->mouseKeysCounter= 0;
- xkbi->inactiveKey= 0;
- xkbi->slowKey= 0;
- xkbi->repeatKey= 0;
- xkbi->krgTimerActive= _OFF_TIMER;
- xkbi->beepType= _BEEP_NONE;
- xkbi->beepCount= 0;
- xkbi->mouseKeyTimer= NULL;
- xkbi->slowKeysTimer= NULL;
- xkbi->bounceKeysTimer= NULL;
- xkbi->repeatKeyTimer= NULL;
- xkbi->krgTimer= NULL;
- xkbi->beepTimer= NULL;
- ctrls->repeat_delay = XkbDfltRepeatDelay;
- ctrls->repeat_interval = XkbDfltRepeatInterval;
- ctrls->debounce_delay = 300;
- ctrls->slow_keys_delay = 300;
- ctrls->mk_delay = 160;
- ctrls->mk_interval = 40;
- ctrls->mk_time_to_max = 30;
- ctrls->mk_max_speed = 30;
- ctrls->mk_curve = 500;
- ctrls->mk_dflt_btn = 1;
- ctrls->ax_timeout = XkbDfltAccessXTimeout;
- ctrls->axt_ctrls_mask = XkbDfltAccessXTimeoutMask;
- ctrls->axt_ctrls_values = XkbDfltAccessXTimeoutValues;
- ctrls->axt_opts_mask = XkbDfltAccessXTimeoutOptionsMask;
- ctrls->axt_opts_values = XkbDfltAccessXTimeoutOptionsValues;
- if (XkbDfltAccessXTimeout)
- ctrls->enabled_ctrls |= XkbAccessXTimeoutMask;
- else
- ctrls->enabled_ctrls &= ~XkbAccessXTimeoutMask;
- ctrls->enabled_ctrls |= XkbDfltAccessXFeedback;
- ctrls->ax_options = XkbDfltAccessXOptions;
- AccessXComputeCurveFactor(xkbi,ctrls);
- return;
-}
-
-/************************************************************************/
-/* */
-/* AccessXKeyboardEvent */
-/* */
-/* Generate a synthetic keyboard event. */
-/* */
-/************************************************************************/
-static void
-AccessXKeyboardEvent(DeviceIntPtr keybd,
- int type,
- BYTE keyCode,
- Bool isRepeat)
-{
- DeviceEvent event;
- memset(&event, 0, sizeof(DeviceEvent));
- event.header = ET_Internal;
- event.type = type;
- event.detail.key = keyCode;
- event.time = GetTimeInMillis();
- event.length = sizeof(DeviceEvent);
- event.key_repeat = isRepeat;
- event.sourceid = keybd->id;
- event.deviceid = keybd->id;
-
- if (xkbDebugFlags&0x8) {
- DebugF("[xkb] AXKE: Key %d %s\n", keyCode,
- (event.type == ET_KeyPress ? "down" : "up"));
- }
-
- XkbProcessKeyboardEvent(&event, keybd);
- return;
-} /* AccessXKeyboardEvent */
-
-/************************************************************************/
-/* */
-/* AccessXKRGTurnOn */
-/* */
-/* Turn the keyboard response group on. */
-/* */
-/************************************************************************/
-static void
-AccessXKRGTurnOn(DeviceIntPtr dev,CARD16 KRGControl,xkbControlsNotify *pCN)
-{
-XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
-XkbControlsPtr ctrls = xkbi->desc->ctrls;
-XkbControlsRec old;
-XkbEventCauseRec cause;
-XkbSrvLedInfoPtr sli;
-
- old= *ctrls;
- ctrls->enabled_ctrls |= (KRGControl&XkbAX_KRGMask);
- if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
- XkbSendControlsNotify(dev,pCN);
- cause.kc= pCN->keycode;
- cause.event= pCN->eventType;
- cause.mjr= pCN->requestMajor;
- cause.mnr= pCN->requestMinor;
- sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
- XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
- if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask))
- XkbDDXAccessXBeep(dev,_BEEP_FEATURE_ON,KRGControl);
- return;
-
-} /* AccessXKRGTurnOn */
-
-/************************************************************************/
-/* */
-/* AccessXKRGTurnOff */
-/* */
-/* Turn the keyboard response group off. */
-/* */
-/************************************************************************/
-static void
-AccessXKRGTurnOff(DeviceIntPtr dev,xkbControlsNotify *pCN)
-{
-XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
-XkbControlsPtr ctrls = xkbi->desc->ctrls;
-XkbControlsRec old;
-XkbEventCauseRec cause;
-XkbSrvLedInfoPtr sli;
-
- old = *ctrls;
- ctrls->enabled_ctrls &= ~XkbAX_KRGMask;
- if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
- XkbSendControlsNotify(dev,pCN);
- cause.kc= pCN->keycode;
- cause.event= pCN->eventType;
- cause.mjr= pCN->requestMajor;
- cause.mnr= pCN->requestMinor;
- sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
- XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
- if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask)) {
- unsigned changes= old.enabled_ctrls^ctrls->enabled_ctrls;
- XkbDDXAccessXBeep(dev,_BEEP_FEATURE_OFF,changes);
- }
- return;
-
-} /* AccessXKRGTurnOff */
-
-/************************************************************************/
-/* */
-/* AccessXStickyKeysTurnOn */
-/* */
-/* Turn StickyKeys on. */
-/* */
-/************************************************************************/
-static void
-AccessXStickyKeysTurnOn(DeviceIntPtr dev,xkbControlsNotify *pCN)
-{
-XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
-XkbControlsPtr ctrls = xkbi->desc->ctrls;
-XkbControlsRec old;
-XkbEventCauseRec cause;
-XkbSrvLedInfoPtr sli;
-
- old = *ctrls;
- ctrls->enabled_ctrls |= XkbStickyKeysMask;
- xkbi->shiftKeyCount = 0;
- if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
- XkbSendControlsNotify(dev,pCN);
- cause.kc= pCN->keycode;
- cause.event= pCN->eventType;
- cause.mjr= pCN->requestMajor;
- cause.mnr= pCN->requestMinor;
- sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
- XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
- if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask)) {
- XkbDDXAccessXBeep(dev,_BEEP_FEATURE_ON,XkbStickyKeysMask);
- }
- return;
-
-} /* AccessXStickyKeysTurnOn */
-
-/************************************************************************/
-/* */
-/* AccessXStickyKeysTurnOff */
-/* */
-/* Turn StickyKeys off. */
-/* */
-/************************************************************************/
-static void
-AccessXStickyKeysTurnOff(DeviceIntPtr dev,xkbControlsNotify *pCN)
-{
-XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
-XkbControlsPtr ctrls = xkbi->desc->ctrls;
-XkbControlsRec old;
-XkbEventCauseRec cause;
-XkbSrvLedInfoPtr sli;
-
- old = *ctrls;
- ctrls->enabled_ctrls &= ~XkbStickyKeysMask;
- xkbi->shiftKeyCount = 0;
- if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
- XkbSendControlsNotify(dev,pCN);
-
- cause.kc= pCN->keycode;
- cause.event= pCN->eventType;
- cause.mjr= pCN->requestMajor;
- cause.mnr= pCN->requestMinor;
- sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
- XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
- if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask)) {
- XkbDDXAccessXBeep(dev,_BEEP_FEATURE_OFF,XkbStickyKeysMask);
- }
-#ifndef NO_CLEAR_LATCHES_FOR_STICKY_KEYS_OFF
- XkbClearAllLatchesAndLocks(dev,xkbi,FALSE,&cause);
-#endif
- return;
-} /* AccessXStickyKeysTurnOff */
-
-static CARD32
-AccessXKRGExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-{
-XkbSrvInfoPtr xkbi= ((DeviceIntPtr)arg)->key->xkbInfo;
-xkbControlsNotify cn;
-
- if (xkbi->krgTimerActive==_KRG_WARN_TIMER) {
- XkbDDXAccessXBeep((DeviceIntPtr)arg,_BEEP_SLOW_WARN,XkbStickyKeysMask);
- xkbi->krgTimerActive= _KRG_TIMER;
- return 4000;
- }
- xkbi->krgTimerActive= _OFF_TIMER;
- cn.keycode = 0;
- cn.eventType = 0;
- cn.requestMajor = 0;
- cn.requestMinor = 0;
- if (xkbi->desc->ctrls->enabled_ctrls&XkbSlowKeysMask)
- AccessXKRGTurnOff((DeviceIntPtr)arg,&cn);
- else AccessXKRGTurnOn((DeviceIntPtr)arg,XkbSlowKeysMask,&cn);
- return 0;
-}
-
-static CARD32
-AccessXRepeatKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-{
-DeviceIntPtr dev = (DeviceIntPtr) arg;
-XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
-
- if (xkbi->repeatKey == 0)
- return 0;
-
- AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey, TRUE);
-
- return xkbi->desc->ctrls->repeat_interval;
-}
-
-void
-AccessXCancelRepeatKey(XkbSrvInfoPtr xkbi,KeyCode key)
-{
- if (xkbi->repeatKey==key)
- xkbi->repeatKey= 0;
- return;
-}
-
-static CARD32
-AccessXSlowKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-{
-DeviceIntPtr keybd;
-XkbSrvInfoPtr xkbi;
-XkbDescPtr xkb;
-XkbControlsPtr ctrls;
-
- keybd= (DeviceIntPtr)arg;
- xkbi= keybd->key->xkbInfo;
- xkb= xkbi->desc;
- ctrls= xkb->ctrls;
- if (xkbi->slowKey!=0) {
- xkbAccessXNotify ev;
- KeySym *sym= XkbKeySymsPtr(xkb,xkbi->slowKey);
- ev.detail= XkbAXN_SKAccept;
- ev.keycode= xkbi->slowKey;
- ev.slowKeysDelay= ctrls->slow_keys_delay;
- ev.debounceDelay= ctrls->debounce_delay;
- XkbSendAccessXNotify(keybd,&ev);
- if (XkbAX_NeedFeedback(ctrls,XkbAX_SKAcceptFBMask))
- XkbDDXAccessXBeep(keybd,_BEEP_SLOW_ACCEPT,XkbSlowKeysMask);
- AccessXKeyboardEvent(keybd, ET_KeyPress,xkbi->slowKey,FALSE);
- /* check for magic sequences */
- if ((ctrls->enabled_ctrls&XkbAccessXKeysMask) &&
- ((sym[0]==XK_Shift_R)||(sym[0]==XK_Shift_L)))
- xkbi->shiftKeyCount++;
-
- /* Start repeating if necessary. Stop autorepeating if the user
- * presses a non-modifier key that doesn't autorepeat.
- */
- if (keybd->kbdfeed->ctrl.autoRepeat &&
- ((xkbi->slowKey != xkbi->mouseKey) || (!xkbi->mouseKeysAccel)) &&
- (ctrls->enabled_ctrls&XkbRepeatKeysMask)) {
- if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,xkbi->slowKey)) {
- xkbi->repeatKey = xkbi->slowKey;
- xkbi->repeatKeyTimer= TimerSet(xkbi->repeatKeyTimer,
- 0, ctrls->repeat_delay,
- AccessXRepeatKeyExpire, (pointer)keybd);
- }
- }
- }
- return 0;
-}
-
-static CARD32
-AccessXBounceKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-{
-XkbSrvInfoPtr xkbi= ((DeviceIntPtr)arg)->key->xkbInfo;
-
- xkbi->inactiveKey= 0;
- return 0;
-}
-
-static CARD32
-AccessXTimeoutExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-{
-DeviceIntPtr dev = (DeviceIntPtr)arg;
-XkbSrvInfoPtr xkbi= dev->key->xkbInfo;
-XkbControlsPtr ctrls= xkbi->desc->ctrls;
-XkbControlsRec old;
-xkbControlsNotify cn;
-XkbEventCauseRec cause;
-XkbSrvLedInfoPtr sli;
-
- if (xkbi->lastPtrEventTime) {
- unsigned timeToWait = (ctrls->ax_timeout*1000);
- unsigned timeElapsed = (now-xkbi->lastPtrEventTime);
-
- if (timeToWait > timeElapsed)
- return timeToWait - timeElapsed;
- }
- old= *ctrls;
- xkbi->shiftKeyCount= 0;
- ctrls->enabled_ctrls&= ~ctrls->axt_ctrls_mask;
- ctrls->enabled_ctrls|=
- (ctrls->axt_ctrls_values&ctrls->axt_ctrls_mask);
- if (ctrls->axt_opts_mask) {
- ctrls->ax_options&= ~ctrls->axt_opts_mask;
- ctrls->ax_options|= (ctrls->axt_opts_values&ctrls->axt_opts_mask);
- }
- if (XkbComputeControlsNotify(dev,&old,ctrls,&cn,FALSE)) {
- cn.keycode = 0;
- cn.eventType = 0;
- cn.requestMajor = 0;
- cn.requestMinor = 0;
- XkbSendControlsNotify(dev,&cn);
- }
- XkbSetCauseUnknown(&cause);
- sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
- XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
- if (ctrls->ax_options!=old.ax_options) {
- unsigned set,cleared,bell;
- set= ctrls->ax_options&(~old.ax_options);
- cleared= (~ctrls->ax_options)&old.ax_options;
- if (set && cleared) bell= _BEEP_FEATURE_CHANGE;
- else if (set) bell= _BEEP_FEATURE_ON;
- else bell= _BEEP_FEATURE_OFF;
- XkbDDXAccessXBeep(dev,bell,XkbAccessXTimeoutMask);
- }
- xkbi->krgTimerActive= _OFF_TIMER;
- return 0;
-}
-
-
-/************************************************************************/
-/* */
-/* AccessXFilterPressEvent */
-/* */
-/* Filter events before they get any further if SlowKeys is turned on. */
-/* In addition, this routine handles the ever so popular magic key */
-/* acts for turning various accessibility features on/off. */
-/* */
-/* Returns TRUE if this routine has discarded the event. */
-/* Returns FALSE if the event needs further processing. */
-/* */
-/************************************************************************/
-Bool
-AccessXFilterPressEvent( DeviceEvent* event,
- DeviceIntPtr keybd)
-{
-XkbSrvInfoPtr xkbi = keybd->key->xkbInfo;
-XkbControlsPtr ctrls = xkbi->desc->ctrls;
-Bool ignoreKeyEvent = FALSE;
-KeyCode key = event->detail.key;
-KeySym * sym = XkbKeySymsPtr(xkbi->desc,key);
-
- if (ctrls->enabled_ctrls&XkbAccessXKeysMask) {
- /* check for magic sequences */
- if ((sym[0]==XK_Shift_R)||(sym[0]==XK_Shift_L)) {
- if (XkbAX_NeedFeedback(ctrls,XkbAX_SlowWarnFBMask)) {
- xkbi->krgTimerActive = _KRG_WARN_TIMER;
- xkbi->krgTimer= TimerSet(xkbi->krgTimer, 0, 4000,
- AccessXKRGExpire, (pointer)keybd);
- }
- else {
- xkbi->krgTimerActive = _KRG_TIMER;
- xkbi->krgTimer= TimerSet(xkbi->krgTimer, 0, 8000,
- AccessXKRGExpire, (pointer)keybd);
- }
- if (!(ctrls->enabled_ctrls & XkbSlowKeysMask)) {
- CARD32 now= GetTimeInMillis();
- if ((now-xkbi->lastShiftEventTime)>15000)
- xkbi->shiftKeyCount= 1;
- else xkbi->shiftKeyCount++;
- xkbi->lastShiftEventTime= now;
- }
- }
- else {
- if (xkbi->krgTimerActive) {
- xkbi->krgTimer= TimerSet(xkbi->krgTimer,0, 0, NULL, NULL);
- xkbi->krgTimerActive= _OFF_TIMER;
- }
- }
- }
-
- /* Don't transmit the KeyPress if SlowKeys is turned on;
- * The wakeup handler will synthesize one for us if the user
- * has held the key long enough.
- */
- if (ctrls->enabled_ctrls & XkbSlowKeysMask) {
- xkbAccessXNotify ev;
- /* If key was already pressed, ignore subsequent press events
- * from the server's autorepeat
- */
- if(xkbi->slowKey == key)
- return TRUE;
- ev.detail= XkbAXN_SKPress;
- ev.keycode= key;
- ev.slowKeysDelay= ctrls->slow_keys_delay;
- ev.debounceDelay= ctrls->debounce_delay;
- XkbSendAccessXNotify(keybd,&ev);
- if (XkbAX_NeedFeedback(ctrls,XkbAX_SKPressFBMask))
- XkbDDXAccessXBeep(keybd,_BEEP_SLOW_PRESS,XkbSlowKeysMask);
- xkbi->slowKey= key;
- xkbi->slowKeysTimer = TimerSet(xkbi->slowKeysTimer,
- 0, ctrls->slow_keys_delay,
- AccessXSlowKeyExpire, (pointer)keybd);
- ignoreKeyEvent = TRUE;
- }
-
- /* Don't transmit the KeyPress if BounceKeys is turned on
- * and the user pressed the same key within a given time period
- * from the last release.
- */
- else if ((ctrls->enabled_ctrls & XkbBounceKeysMask) &&
- (key == xkbi->inactiveKey)) {
- if (XkbAX_NeedFeedback(ctrls,XkbAX_BKRejectFBMask))
- XkbDDXAccessXBeep(keybd,_BEEP_BOUNCE_REJECT,XkbBounceKeysMask);
- ignoreKeyEvent = TRUE;
- }
-
- /* Start repeating if necessary. Stop autorepeating if the user
- * presses a non-modifier key that doesn't autorepeat.
- */
- if (XkbDDXUsesSoftRepeat(keybd)) {
- if ((keybd->kbdfeed->ctrl.autoRepeat) &&
- ((ctrls->enabled_ctrls&(XkbSlowKeysMask|XkbRepeatKeysMask))==
- XkbRepeatKeysMask)) {
- if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,key)) {
- if (xkbDebugFlags&0x10)
- DebugF("Starting software autorepeat...\n");
- if (xkbi->repeatKey == key)
- ignoreKeyEvent = TRUE;
- else {
- xkbi->repeatKey = key;
- xkbi->repeatKeyTimer= TimerSet(xkbi->repeatKeyTimer,
- 0, ctrls->repeat_delay,
- AccessXRepeatKeyExpire, (pointer)keybd);
- }
- }
- }
- }
-
- /* Check for two keys being pressed at the same time. This section
- * essentially says the following:
- *
- * If StickyKeys is on, and a modifier is currently being held down,
- * and one of the following is true: the current key is not a modifier
- * or the currentKey is a modifier, but not the only modifier being
- * held down, turn StickyKeys off if the TwoKeys off ctrl is set.
- */
- if ((ctrls->enabled_ctrls & XkbStickyKeysMask) &&
- (xkbi->state.base_mods!=0) &&
- (XkbAX_NeedOption(ctrls,XkbAX_TwoKeysMask))) {
- xkbControlsNotify cn;
- cn.keycode = key;
- cn.eventType = KeyPress;
- cn.requestMajor = 0;
- cn.requestMinor = 0;
- AccessXStickyKeysTurnOff(keybd,&cn);
- }
-
- if (!ignoreKeyEvent)
- XkbProcessKeyboardEvent(event, keybd);
- return ignoreKeyEvent;
-} /* AccessXFilterPressEvent */
-
-/************************************************************************/
-/* */
-/* AccessXFilterReleaseEvent */
-/* */
-/* Filter events before they get any further if SlowKeys is turned on. */
-/* In addition, this routine handles the ever so popular magic key */
-/* acts for turning various accessibility features on/off. */
-/* */
-/* Returns TRUE if this routine has discarded the event. */
-/* Returns FALSE if the event needs further processing. */
-/* */
-/************************************************************************/
-Bool
-AccessXFilterReleaseEvent( DeviceEvent* event,
- DeviceIntPtr keybd)
-{
-XkbSrvInfoPtr xkbi = keybd->key->xkbInfo;
-XkbControlsPtr ctrls = xkbi->desc->ctrls;
-KeyCode key = event->detail.key;
-Bool ignoreKeyEvent = FALSE;
-
- /* Don't transmit the KeyRelease if BounceKeys is on and
- * this is the release of a key that was ignored due to
- * BounceKeys.
- */
- if (ctrls->enabled_ctrls & XkbBounceKeysMask) {
- if ((key!=xkbi->mouseKey)&&(!BitIsOn(keybd->key->down,key)))
- ignoreKeyEvent = TRUE;
- xkbi->inactiveKey= key;
- xkbi->bounceKeysTimer= TimerSet(xkbi->bounceKeysTimer, 0,
- ctrls->debounce_delay,
- AccessXBounceKeyExpire, (pointer)keybd);
- }
-
- /* Don't transmit the KeyRelease if SlowKeys is turned on and
- * the user didn't hold the key long enough. We know we passed
- * the key if the down bit was set by CoreProcessKeyboadEvent.
- */
- if (ctrls->enabled_ctrls & XkbSlowKeysMask) {
- xkbAccessXNotify ev;
- unsigned beep_type;
- ev.keycode= key;
- ev.slowKeysDelay= ctrls->slow_keys_delay;
- ev.debounceDelay= ctrls->debounce_delay;
- if (BitIsOn(keybd->key->down,key) || (xkbi->mouseKey == key)) {
- ev.detail= XkbAXN_SKRelease;
- beep_type= _BEEP_SLOW_RELEASE;
- }
- else {
- ev.detail= XkbAXN_SKReject;
- beep_type= _BEEP_SLOW_REJECT;
- ignoreKeyEvent = TRUE;
- }
- XkbSendAccessXNotify(keybd,&ev);
- if (XkbAX_NeedFeedback(ctrls,XkbAX_SKRejectFBMask)) {
- XkbDDXAccessXBeep(keybd,beep_type,XkbSlowKeysMask);
- }
- if (xkbi->slowKey==key)
- xkbi->slowKey= 0;
- }
-
- /* Stop Repeating if the user releases the key that is currently
- * repeating.
- */
- if (xkbi->repeatKey==key) {
- xkbi->repeatKey= 0;
- }
-
- if ((ctrls->enabled_ctrls&XkbAccessXTimeoutMask)&&(ctrls->ax_timeout>0)) {
- xkbi->lastPtrEventTime= 0;
- xkbi->krgTimer= TimerSet(xkbi->krgTimer, 0,
- ctrls->ax_timeout*1000,
- AccessXTimeoutExpire, (pointer)keybd);
- xkbi->krgTimerActive= _ALL_TIMEOUT_TIMER;
- }
- else if (xkbi->krgTimerActive!=_OFF_TIMER) {
- xkbi->krgTimer= TimerSet(xkbi->krgTimer, 0, 0, NULL, NULL);
- xkbi->krgTimerActive= _OFF_TIMER;
- }
-
- /* Keep track of how many times the Shift key has been pressed.
- * If it has been pressed and released 5 times in a row, toggle
- * the state of StickyKeys.
- */
- if ((!ignoreKeyEvent)&&(xkbi->shiftKeyCount)) {
- KeySym *pSym= XkbKeySymsPtr(xkbi->desc,key);
- if ((pSym[0]!=XK_Shift_L)&&(pSym[0]!=XK_Shift_R)) {
- xkbi->shiftKeyCount= 0;
- }
- else if (xkbi->shiftKeyCount>=5) {
- xkbControlsNotify cn;
- cn.keycode = key;
- cn.eventType = KeyPress;
- cn.requestMajor = 0;
- cn.requestMinor = 0;
- if (ctrls->enabled_ctrls & XkbStickyKeysMask)
- AccessXStickyKeysTurnOff(keybd,&cn);
- else
- AccessXStickyKeysTurnOn(keybd,&cn);
- xkbi->shiftKeyCount= 0;
- }
- }
-
- if (!ignoreKeyEvent)
- XkbProcessKeyboardEvent(event, keybd);
- return ignoreKeyEvent;
-
-} /* AccessXFilterReleaseEvent */
-
-/************************************************************************/
-/* */
-/* ProcessPointerEvent */
-/* */
-/* This routine merely sets the shiftKeyCount and clears the keyboard */
-/* response group timer (if necessary) on a mouse event. This is so */
-/* multiple shifts with just the mouse and shift-drags with the mouse */
-/* don't accidentally turn on StickyKeys or the Keyboard Response Group.*/
-/* */
-/************************************************************************/
-extern int xkbDevicePrivateIndex;
-extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
-void
-ProcessPointerEvent( InternalEvent *ev,
- DeviceIntPtr mouse)
-{
-DeviceIntPtr dev;
-XkbSrvInfoPtr xkbi = NULL;
-unsigned changed = 0;
-ProcessInputProc backupproc;
-xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse);
-DeviceEvent *event = &ev->device_event;
-
- dev = IsFloating(mouse) ? mouse : GetMaster(mouse, MASTER_KEYBOARD);
-
- if (dev && dev->key)
- {
- xkbi = dev->key->xkbInfo;
- xkbi->shiftKeyCount = 0;
- xkbi->lastPtrEventTime= event->time;
- }
-
- if (event->type == ET_ButtonPress) {
- changed |= XkbPointerButtonMask;
- }
- else if (event->type == ET_ButtonRelease) {
- if (xkbi) {
- xkbi->lockedPtrButtons&= ~(1 << (event->detail.key & 0x7));
-
- if (IsMaster(dev))
- {
- DeviceIntPtr source;
- int rc;
- rc = dixLookupDevice(&source, event->sourceid, serverClient, DixWriteAccess);
- if (rc != Success)
- ErrorF("[xkb] bad sourceid '%d' on button release event.\n", event->sourceid);
- else if (!IsXTestDevice(source, GetMaster(dev, MASTER_POINTER)))
- XkbFakeDeviceButton(dev, FALSE, event->detail.key);
- }
- }
-
- changed |= XkbPointerButtonMask;
- }
-
- UNWRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc);
- mouse->public.processInputProc(ev, mouse);
- COND_WRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr,
- backupproc, xkbUnwrapProc);
-
- if (!xkbi)
- return;
-
- xkbi->state.ptr_buttons = (mouse->button) ? mouse->button->state : 0;
-
- /* clear any latched modifiers */
- if ( xkbi->state.latched_mods && (event->type == ET_ButtonRelease) ) {
- unsigned changed_leds;
- XkbStateRec oldState;
- XkbSrvLedInfoPtr sli;
-
- sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
- oldState= xkbi->state;
- XkbLatchModifiers(dev,0xFF,0x00);
-
- XkbComputeDerivedState(xkbi);
- changed |= XkbStateChangedFlags(&oldState,&xkbi->state);
- if (changed&sli->usedComponents) {
- changed_leds= XkbIndicatorsToUpdate(dev,changed,FALSE);
- if (changed_leds) {
- XkbEventCauseRec cause;
- XkbSetCauseKey(&cause,(event->detail.key & 0x7), event->type);
- XkbUpdateIndicators(dev,changed_leds,TRUE,NULL,&cause);
- }
- }
- }
-
- if (((xkbi->flags&_XkbStateNotifyInProgress)==0)&&(changed!=0)) {
- xkbStateNotify sn;
- sn.keycode= event->detail.key;
- sn.eventType= event->type;
- sn.requestMajor = sn.requestMinor = 0;
- sn.changed= changed;
- XkbSendStateNotify(dev,&sn);
- }
-
-} /* ProcessPointerEvent */
-
-
-
-
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdio.h>
+#include <math.h>
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/keysym.h>
+#include "exglobals.h"
+#include <X11/extensions/XIproto.h>
+#include "inputstr.h"
+#include "eventstr.h"
+#include <xkbsrv.h>
+#if !defined(WIN32)
+#include <sys/time.h>
+#endif
+
+int XkbDfltRepeatDelay= 660;
+int XkbDfltRepeatInterval= 40;
+
+#define DFLT_TIMEOUT_CTRLS (XkbAX_KRGMask|XkbStickyKeysMask|XkbMouseKeysMask)
+#define DFLT_TIMEOUT_OPTS (XkbAX_IndicatorFBMask)
+
+unsigned short XkbDfltAccessXTimeout= 120;
+unsigned int XkbDfltAccessXTimeoutMask= DFLT_TIMEOUT_CTRLS;
+static unsigned int XkbDfltAccessXTimeoutValues= 0;
+static unsigned int XkbDfltAccessXTimeoutOptionsMask= DFLT_TIMEOUT_OPTS;
+static unsigned int XkbDfltAccessXTimeoutOptionsValues= 0;
+unsigned int XkbDfltAccessXFeedback= XkbAccessXFeedbackMask;
+unsigned short XkbDfltAccessXOptions= XkbAX_AllOptionsMask & ~(XkbAX_IndicatorFBMask|XkbAX_SKReleaseFBMask|XkbAX_SKRejectFBMask);
+
+void
+AccessXComputeCurveFactor(XkbSrvInfoPtr xkbi,XkbControlsPtr ctrls)
+{
+ xkbi->mouseKeysCurve= 1.0+(((double)ctrls->mk_curve)*0.001);
+ xkbi->mouseKeysCurveFactor= ( ((double)ctrls->mk_max_speed)/
+ pow((double)ctrls->mk_time_to_max,xkbi->mouseKeysCurve));
+ return;
+}
+
+void
+AccessXInit(DeviceIntPtr keybd)
+{
+XkbSrvInfoPtr xkbi = keybd->key->xkbInfo;
+XkbControlsPtr ctrls = xkbi->desc->ctrls;
+
+ xkbi->shiftKeyCount= 0;
+ xkbi->mouseKeysCounter= 0;
+ xkbi->inactiveKey= 0;
+ xkbi->slowKey= 0;
+ xkbi->repeatKey= 0;
+ xkbi->krgTimerActive= _OFF_TIMER;
+ xkbi->beepType= _BEEP_NONE;
+ xkbi->beepCount= 0;
+ xkbi->mouseKeyTimer= NULL;
+ xkbi->slowKeysTimer= NULL;
+ xkbi->bounceKeysTimer= NULL;
+ xkbi->repeatKeyTimer= NULL;
+ xkbi->krgTimer= NULL;
+ xkbi->beepTimer= NULL;
+ ctrls->repeat_delay = XkbDfltRepeatDelay;
+ ctrls->repeat_interval = XkbDfltRepeatInterval;
+ ctrls->debounce_delay = 300;
+ ctrls->slow_keys_delay = 300;
+ ctrls->mk_delay = 160;
+ ctrls->mk_interval = 40;
+ ctrls->mk_time_to_max = 30;
+ ctrls->mk_max_speed = 30;
+ ctrls->mk_curve = 500;
+ ctrls->mk_dflt_btn = 1;
+ ctrls->ax_timeout = XkbDfltAccessXTimeout;
+ ctrls->axt_ctrls_mask = XkbDfltAccessXTimeoutMask;
+ ctrls->axt_ctrls_values = XkbDfltAccessXTimeoutValues;
+ ctrls->axt_opts_mask = XkbDfltAccessXTimeoutOptionsMask;
+ ctrls->axt_opts_values = XkbDfltAccessXTimeoutOptionsValues;
+ if (XkbDfltAccessXTimeout)
+ ctrls->enabled_ctrls |= XkbAccessXTimeoutMask;
+ else
+ ctrls->enabled_ctrls &= ~XkbAccessXTimeoutMask;
+ ctrls->enabled_ctrls |= XkbDfltAccessXFeedback;
+ ctrls->ax_options = XkbDfltAccessXOptions;
+ AccessXComputeCurveFactor(xkbi,ctrls);
+ return;
+}
+
+/************************************************************************/
+/* */
+/* AccessXKeyboardEvent */
+/* */
+/* Generate a synthetic keyboard event. */
+/* */
+/************************************************************************/
+static void
+AccessXKeyboardEvent(DeviceIntPtr keybd,
+ int type,
+ BYTE keyCode,
+ Bool isRepeat)
+{
+ DeviceEvent event;
+ memset(&event, 0, sizeof(DeviceEvent));
+ event.header = ET_Internal;
+ event.type = type;
+ event.detail.key = keyCode;
+ event.time = GetTimeInMillis();
+ event.length = sizeof(DeviceEvent);
+ event.key_repeat = isRepeat;
+ event.sourceid = keybd->id;
+ event.deviceid = keybd->id;
+
+ if (xkbDebugFlags&0x8) {
+ DebugF("[xkb] AXKE: Key %d %s\n", keyCode,
+ (event.type == ET_KeyPress ? "down" : "up"));
+ }
+
+ XkbProcessKeyboardEvent(&event, keybd);
+ return;
+} /* AccessXKeyboardEvent */
+
+/************************************************************************/
+/* */
+/* AccessXKRGTurnOn */
+/* */
+/* Turn the keyboard response group on. */
+/* */
+/************************************************************************/
+static void
+AccessXKRGTurnOn(DeviceIntPtr dev,CARD16 KRGControl,xkbControlsNotify *pCN)
+{
+XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
+XkbControlsPtr ctrls = xkbi->desc->ctrls;
+XkbControlsRec old;
+XkbEventCauseRec cause;
+XkbSrvLedInfoPtr sli;
+
+ old= *ctrls;
+ ctrls->enabled_ctrls |= (KRGControl&XkbAX_KRGMask);
+ if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
+ XkbSendControlsNotify(dev,pCN);
+ cause.kc= pCN->keycode;
+ cause.event= pCN->eventType;
+ cause.mjr= pCN->requestMajor;
+ cause.mnr= pCN->requestMinor;
+ sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
+ XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
+ if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask))
+ XkbDDXAccessXBeep(dev,_BEEP_FEATURE_ON,KRGControl);
+ return;
+
+} /* AccessXKRGTurnOn */
+
+/************************************************************************/
+/* */
+/* AccessXKRGTurnOff */
+/* */
+/* Turn the keyboard response group off. */
+/* */
+/************************************************************************/
+static void
+AccessXKRGTurnOff(DeviceIntPtr dev,xkbControlsNotify *pCN)
+{
+XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
+XkbControlsPtr ctrls = xkbi->desc->ctrls;
+XkbControlsRec old;
+XkbEventCauseRec cause;
+XkbSrvLedInfoPtr sli;
+
+ old = *ctrls;
+ ctrls->enabled_ctrls &= ~XkbAX_KRGMask;
+ if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
+ XkbSendControlsNotify(dev,pCN);
+ cause.kc= pCN->keycode;
+ cause.event= pCN->eventType;
+ cause.mjr= pCN->requestMajor;
+ cause.mnr= pCN->requestMinor;
+ sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
+ XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
+ if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask)) {
+ unsigned changes= old.enabled_ctrls^ctrls->enabled_ctrls;
+ XkbDDXAccessXBeep(dev,_BEEP_FEATURE_OFF,changes);
+ }
+ return;
+
+} /* AccessXKRGTurnOff */
+
+/************************************************************************/
+/* */
+/* AccessXStickyKeysTurnOn */
+/* */
+/* Turn StickyKeys on. */
+/* */
+/************************************************************************/
+static void
+AccessXStickyKeysTurnOn(DeviceIntPtr dev,xkbControlsNotify *pCN)
+{
+XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
+XkbControlsPtr ctrls = xkbi->desc->ctrls;
+XkbControlsRec old;
+XkbEventCauseRec cause;
+XkbSrvLedInfoPtr sli;
+
+ old = *ctrls;
+ ctrls->enabled_ctrls |= XkbStickyKeysMask;
+ xkbi->shiftKeyCount = 0;
+ if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
+ XkbSendControlsNotify(dev,pCN);
+ cause.kc= pCN->keycode;
+ cause.event= pCN->eventType;
+ cause.mjr= pCN->requestMajor;
+ cause.mnr= pCN->requestMinor;
+ sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
+ XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
+ if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask)) {
+ XkbDDXAccessXBeep(dev,_BEEP_FEATURE_ON,XkbStickyKeysMask);
+ }
+ return;
+
+} /* AccessXStickyKeysTurnOn */
+
+/************************************************************************/
+/* */
+/* AccessXStickyKeysTurnOff */
+/* */
+/* Turn StickyKeys off. */
+/* */
+/************************************************************************/
+static void
+AccessXStickyKeysTurnOff(DeviceIntPtr dev,xkbControlsNotify *pCN)
+{
+XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
+XkbControlsPtr ctrls = xkbi->desc->ctrls;
+XkbControlsRec old;
+XkbEventCauseRec cause;
+XkbSrvLedInfoPtr sli;
+
+ old = *ctrls;
+ ctrls->enabled_ctrls &= ~XkbStickyKeysMask;
+ xkbi->shiftKeyCount = 0;
+ if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
+ XkbSendControlsNotify(dev,pCN);
+
+ cause.kc= pCN->keycode;
+ cause.event= pCN->eventType;
+ cause.mjr= pCN->requestMajor;
+ cause.mnr= pCN->requestMinor;
+ sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
+ XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
+ if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask)) {
+ XkbDDXAccessXBeep(dev,_BEEP_FEATURE_OFF,XkbStickyKeysMask);
+ }
+#ifndef NO_CLEAR_LATCHES_FOR_STICKY_KEYS_OFF
+ XkbClearAllLatchesAndLocks(dev,xkbi,FALSE,&cause);
+#endif
+ return;
+} /* AccessXStickyKeysTurnOff */
+
+static CARD32
+AccessXKRGExpire(OsTimerPtr timer,CARD32 now,pointer arg)
+{
+XkbSrvInfoPtr xkbi= ((DeviceIntPtr)arg)->key->xkbInfo;
+xkbControlsNotify cn;
+
+ if (xkbi->krgTimerActive==_KRG_WARN_TIMER) {
+ XkbDDXAccessXBeep((DeviceIntPtr)arg,_BEEP_SLOW_WARN,XkbStickyKeysMask);
+ xkbi->krgTimerActive= _KRG_TIMER;
+ return 4000;
+ }
+ xkbi->krgTimerActive= _OFF_TIMER;
+ cn.keycode = 0;
+ cn.eventType = 0;
+ cn.requestMajor = 0;
+ cn.requestMinor = 0;
+ if (xkbi->desc->ctrls->enabled_ctrls&XkbSlowKeysMask)
+ AccessXKRGTurnOff((DeviceIntPtr)arg,&cn);
+ else AccessXKRGTurnOn((DeviceIntPtr)arg,XkbSlowKeysMask,&cn);
+ return 0;
+}
+
+static CARD32
+AccessXRepeatKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg)
+{
+DeviceIntPtr dev = (DeviceIntPtr) arg;
+XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
+
+ if (xkbi->repeatKey == 0)
+ return 0;
+
+ AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey, TRUE);
+
+ return xkbi->desc->ctrls->repeat_interval;
+}
+
+void
+AccessXCancelRepeatKey(XkbSrvInfoPtr xkbi,KeyCode key)
+{
+ if (xkbi->repeatKey==key)
+ xkbi->repeatKey= 0;
+ return;
+}
+
+static CARD32
+AccessXSlowKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg)
+{
+DeviceIntPtr keybd;
+XkbSrvInfoPtr xkbi;
+XkbDescPtr xkb;
+XkbControlsPtr ctrls;
+
+ keybd= (DeviceIntPtr)arg;
+ xkbi= keybd->key->xkbInfo;
+ xkb= xkbi->desc;
+ ctrls= xkb->ctrls;
+ if (xkbi->slowKey!=0) {
+ xkbAccessXNotify ev;
+ KeySym *sym= XkbKeySymsPtr(xkb,xkbi->slowKey);
+ ev.detail= XkbAXN_SKAccept;
+ ev.keycode= xkbi->slowKey;
+ ev.slowKeysDelay= ctrls->slow_keys_delay;
+ ev.debounceDelay= ctrls->debounce_delay;
+ XkbSendAccessXNotify(keybd,&ev);
+ if (XkbAX_NeedFeedback(ctrls,XkbAX_SKAcceptFBMask))
+ XkbDDXAccessXBeep(keybd,_BEEP_SLOW_ACCEPT,XkbSlowKeysMask);
+ AccessXKeyboardEvent(keybd, ET_KeyPress,xkbi->slowKey,FALSE);
+ /* check for magic sequences */
+ if ((ctrls->enabled_ctrls&XkbAccessXKeysMask) &&
+ ((sym[0]==XK_Shift_R)||(sym[0]==XK_Shift_L)))
+ xkbi->shiftKeyCount++;
+
+ /* Start repeating if necessary. Stop autorepeating if the user
+ * presses a non-modifier key that doesn't autorepeat.
+ */
+ if (keybd->kbdfeed->ctrl.autoRepeat &&
+ ((xkbi->slowKey != xkbi->mouseKey) || (!xkbi->mouseKeysAccel)) &&
+ (ctrls->enabled_ctrls&XkbRepeatKeysMask)) {
+ if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,xkbi->slowKey)) {
+ xkbi->repeatKey = xkbi->slowKey;
+ xkbi->repeatKeyTimer= TimerSet(xkbi->repeatKeyTimer,
+ 0, ctrls->repeat_delay,
+ AccessXRepeatKeyExpire, (pointer)keybd);
+ }
+ }
+ }
+ return 0;
+}
+
+static CARD32
+AccessXBounceKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg)
+{
+XkbSrvInfoPtr xkbi= ((DeviceIntPtr)arg)->key->xkbInfo;
+
+ xkbi->inactiveKey= 0;
+ return 0;
+}
+
+static CARD32
+AccessXTimeoutExpire(OsTimerPtr timer,CARD32 now,pointer arg)
+{
+DeviceIntPtr dev = (DeviceIntPtr)arg;
+XkbSrvInfoPtr xkbi= dev->key->xkbInfo;
+XkbControlsPtr ctrls= xkbi->desc->ctrls;
+XkbControlsRec old;
+xkbControlsNotify cn;
+XkbEventCauseRec cause;
+XkbSrvLedInfoPtr sli;
+
+ if (xkbi->lastPtrEventTime) {
+ unsigned timeToWait = (ctrls->ax_timeout*1000);
+ unsigned timeElapsed = (now-xkbi->lastPtrEventTime);
+
+ if (timeToWait > timeElapsed)
+ return timeToWait - timeElapsed;
+ }
+ old= *ctrls;
+ xkbi->shiftKeyCount= 0;
+ ctrls->enabled_ctrls&= ~ctrls->axt_ctrls_mask;
+ ctrls->enabled_ctrls|=
+ (ctrls->axt_ctrls_values&ctrls->axt_ctrls_mask);
+ if (ctrls->axt_opts_mask) {
+ ctrls->ax_options&= ~ctrls->axt_opts_mask;
+ ctrls->ax_options|= (ctrls->axt_opts_values&ctrls->axt_opts_mask);
+ }
+ if (XkbComputeControlsNotify(dev,&old,ctrls,&cn,FALSE)) {
+ cn.keycode = 0;
+ cn.eventType = 0;
+ cn.requestMajor = 0;
+ cn.requestMinor = 0;
+ XkbSendControlsNotify(dev,&cn);
+ }
+ XkbSetCauseUnknown(&cause);
+ sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
+ XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
+ if (ctrls->ax_options!=old.ax_options) {
+ unsigned set,cleared,bell;
+ set= ctrls->ax_options&(~old.ax_options);
+ cleared= (~ctrls->ax_options)&old.ax_options;
+ if (set && cleared) bell= _BEEP_FEATURE_CHANGE;
+ else if (set) bell= _BEEP_FEATURE_ON;
+ else bell= _BEEP_FEATURE_OFF;
+ XkbDDXAccessXBeep(dev,bell,XkbAccessXTimeoutMask);
+ }
+ xkbi->krgTimerActive= _OFF_TIMER;
+ return 0;
+}
+
+
+/************************************************************************/
+/* */
+/* AccessXFilterPressEvent */
+/* */
+/* Filter events before they get any further if SlowKeys is turned on. */
+/* In addition, this routine handles the ever so popular magic key */
+/* acts for turning various accessibility features on/off. */
+/* */
+/* Returns TRUE if this routine has discarded the event. */
+/* Returns FALSE if the event needs further processing. */
+/* */
+/************************************************************************/
+Bool
+AccessXFilterPressEvent( DeviceEvent* event,
+ DeviceIntPtr keybd)
+{
+XkbSrvInfoPtr xkbi = keybd->key->xkbInfo;
+XkbControlsPtr ctrls = xkbi->desc->ctrls;
+Bool ignoreKeyEvent = FALSE;
+KeyCode key = event->detail.key;
+KeySym * sym = XkbKeySymsPtr(xkbi->desc,key);
+
+ if (ctrls->enabled_ctrls&XkbAccessXKeysMask) {
+ /* check for magic sequences */
+ if ((sym[0]==XK_Shift_R)||(sym[0]==XK_Shift_L)) {
+ if (XkbAX_NeedFeedback(ctrls,XkbAX_SlowWarnFBMask)) {
+ xkbi->krgTimerActive = _KRG_WARN_TIMER;
+ xkbi->krgTimer= TimerSet(xkbi->krgTimer, 0, 4000,
+ AccessXKRGExpire, (pointer)keybd);
+ }
+ else {
+ xkbi->krgTimerActive = _KRG_TIMER;
+ xkbi->krgTimer= TimerSet(xkbi->krgTimer, 0, 8000,
+ AccessXKRGExpire, (pointer)keybd);
+ }
+ if (!(ctrls->enabled_ctrls & XkbSlowKeysMask)) {
+ CARD32 now= GetTimeInMillis();
+ if ((now-xkbi->lastShiftEventTime)>15000)
+ xkbi->shiftKeyCount= 1;
+ else xkbi->shiftKeyCount++;
+ xkbi->lastShiftEventTime= now;
+ }
+ }
+ else {
+ if (xkbi->krgTimerActive) {
+ xkbi->krgTimer= TimerSet(xkbi->krgTimer,0, 0, NULL, NULL);
+ xkbi->krgTimerActive= _OFF_TIMER;
+ }
+ }
+ }
+
+ /* Don't transmit the KeyPress if SlowKeys is turned on;
+ * The wakeup handler will synthesize one for us if the user
+ * has held the key long enough.
+ */
+ if (ctrls->enabled_ctrls & XkbSlowKeysMask) {
+ xkbAccessXNotify ev;
+ /* If key was already pressed, ignore subsequent press events
+ * from the server's autorepeat
+ */
+ if(xkbi->slowKey == key)
+ return TRUE;
+ ev.detail= XkbAXN_SKPress;
+ ev.keycode= key;
+ ev.slowKeysDelay= ctrls->slow_keys_delay;
+ ev.debounceDelay= ctrls->debounce_delay;
+ XkbSendAccessXNotify(keybd,&ev);
+ if (XkbAX_NeedFeedback(ctrls,XkbAX_SKPressFBMask))
+ XkbDDXAccessXBeep(keybd,_BEEP_SLOW_PRESS,XkbSlowKeysMask);
+ xkbi->slowKey= key;
+ xkbi->slowKeysTimer = TimerSet(xkbi->slowKeysTimer,
+ 0, ctrls->slow_keys_delay,
+ AccessXSlowKeyExpire, (pointer)keybd);
+ ignoreKeyEvent = TRUE;
+ }
+
+ /* Don't transmit the KeyPress if BounceKeys is turned on
+ * and the user pressed the same key within a given time period
+ * from the last release.
+ */
+ else if ((ctrls->enabled_ctrls & XkbBounceKeysMask) &&
+ (key == xkbi->inactiveKey)) {
+ if (XkbAX_NeedFeedback(ctrls,XkbAX_BKRejectFBMask))
+ XkbDDXAccessXBeep(keybd,_BEEP_BOUNCE_REJECT,XkbBounceKeysMask);
+ ignoreKeyEvent = TRUE;
+ }
+
+ /* Start repeating if necessary. Stop autorepeating if the user
+ * presses a non-modifier key that doesn't autorepeat.
+ */
+ if (XkbDDXUsesSoftRepeat(keybd)) {
+ if ((keybd->kbdfeed->ctrl.autoRepeat) &&
+ ((ctrls->enabled_ctrls&(XkbSlowKeysMask|XkbRepeatKeysMask))==
+ XkbRepeatKeysMask)) {
+ if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,key)) {
+ if (xkbDebugFlags&0x10)
+ DebugF("Starting software autorepeat...\n");
+ if (xkbi->repeatKey == key)
+ ignoreKeyEvent = TRUE;
+ else {
+ xkbi->repeatKey = key;
+ xkbi->repeatKeyTimer= TimerSet(xkbi->repeatKeyTimer,
+ 0, ctrls->repeat_delay,
+ AccessXRepeatKeyExpire, (pointer)keybd);
+ }
+ }
+ }
+ }
+
+ /* Check for two keys being pressed at the same time. This section
+ * essentially says the following:
+ *
+ * If StickyKeys is on, and a modifier is currently being held down,
+ * and one of the following is true: the current key is not a modifier
+ * or the currentKey is a modifier, but not the only modifier being
+ * held down, turn StickyKeys off if the TwoKeys off ctrl is set.
+ */
+ if ((ctrls->enabled_ctrls & XkbStickyKeysMask) &&
+ (xkbi->state.base_mods!=0) &&
+ (XkbAX_NeedOption(ctrls,XkbAX_TwoKeysMask))) {
+ xkbControlsNotify cn;
+ cn.keycode = key;
+ cn.eventType = KeyPress;
+ cn.requestMajor = 0;
+ cn.requestMinor = 0;
+ AccessXStickyKeysTurnOff(keybd,&cn);
+ }
+
+ if (!ignoreKeyEvent)
+ XkbProcessKeyboardEvent(event, keybd);
+ return ignoreKeyEvent;
+} /* AccessXFilterPressEvent */
+
+/************************************************************************/
+/* */
+/* AccessXFilterReleaseEvent */
+/* */
+/* Filter events before they get any further if SlowKeys is turned on. */
+/* In addition, this routine handles the ever so popular magic key */
+/* acts for turning various accessibility features on/off. */
+/* */
+/* Returns TRUE if this routine has discarded the event. */
+/* Returns FALSE if the event needs further processing. */
+/* */
+/************************************************************************/
+Bool
+AccessXFilterReleaseEvent( DeviceEvent* event,
+ DeviceIntPtr keybd)
+{
+XkbSrvInfoPtr xkbi = keybd->key->xkbInfo;
+XkbControlsPtr ctrls = xkbi->desc->ctrls;
+KeyCode key = event->detail.key;
+Bool ignoreKeyEvent = FALSE;
+
+ /* Don't transmit the KeyRelease if BounceKeys is on and
+ * this is the release of a key that was ignored due to
+ * BounceKeys.
+ */
+ if (ctrls->enabled_ctrls & XkbBounceKeysMask) {
+ if ((key!=xkbi->mouseKey)&&(!BitIsOn(keybd->key->down,key)))
+ ignoreKeyEvent = TRUE;
+ xkbi->inactiveKey= key;
+ xkbi->bounceKeysTimer= TimerSet(xkbi->bounceKeysTimer, 0,
+ ctrls->debounce_delay,
+ AccessXBounceKeyExpire, (pointer)keybd);
+ }
+
+ /* Don't transmit the KeyRelease if SlowKeys is turned on and
+ * the user didn't hold the key long enough. We know we passed
+ * the key if the down bit was set by CoreProcessKeyboadEvent.
+ */
+ if (ctrls->enabled_ctrls & XkbSlowKeysMask) {
+ xkbAccessXNotify ev;
+ unsigned beep_type;
+ ev.keycode= key;
+ ev.slowKeysDelay= ctrls->slow_keys_delay;
+ ev.debounceDelay= ctrls->debounce_delay;
+ if (BitIsOn(keybd->key->down,key) || (xkbi->mouseKey == key)) {
+ ev.detail= XkbAXN_SKRelease;
+ beep_type= _BEEP_SLOW_RELEASE;
+ }
+ else {
+ ev.detail= XkbAXN_SKReject;
+ beep_type= _BEEP_SLOW_REJECT;
+ ignoreKeyEvent = TRUE;
+ }
+ XkbSendAccessXNotify(keybd,&ev);
+ if (XkbAX_NeedFeedback(ctrls,XkbAX_SKRejectFBMask)) {
+ XkbDDXAccessXBeep(keybd,beep_type,XkbSlowKeysMask);
+ }
+ if (xkbi->slowKey==key)
+ xkbi->slowKey= 0;
+ }
+
+ /* Stop Repeating if the user releases the key that is currently
+ * repeating.
+ */
+ if (xkbi->repeatKey==key) {
+ xkbi->repeatKey= 0;
+ }
+
+ if ((ctrls->enabled_ctrls&XkbAccessXTimeoutMask)&&(ctrls->ax_timeout>0)) {
+ xkbi->lastPtrEventTime= 0;
+ xkbi->krgTimer= TimerSet(xkbi->krgTimer, 0,
+ ctrls->ax_timeout*1000,
+ AccessXTimeoutExpire, (pointer)keybd);
+ xkbi->krgTimerActive= _ALL_TIMEOUT_TIMER;
+ }
+ else if (xkbi->krgTimerActive!=_OFF_TIMER) {
+ xkbi->krgTimer= TimerSet(xkbi->krgTimer, 0, 0, NULL, NULL);
+ xkbi->krgTimerActive= _OFF_TIMER;
+ }
+
+ /* Keep track of how many times the Shift key has been pressed.
+ * If it has been pressed and released 5 times in a row, toggle
+ * the state of StickyKeys.
+ */
+ if ((!ignoreKeyEvent)&&(xkbi->shiftKeyCount)) {
+ KeySym *pSym= XkbKeySymsPtr(xkbi->desc,key);
+ if ((pSym[0]!=XK_Shift_L)&&(pSym[0]!=XK_Shift_R)) {
+ xkbi->shiftKeyCount= 0;
+ }
+ else if (xkbi->shiftKeyCount>=5) {
+ xkbControlsNotify cn;
+ cn.keycode = key;
+ cn.eventType = KeyPress;
+ cn.requestMajor = 0;
+ cn.requestMinor = 0;
+ if (ctrls->enabled_ctrls & XkbStickyKeysMask)
+ AccessXStickyKeysTurnOff(keybd,&cn);
+ else
+ AccessXStickyKeysTurnOn(keybd,&cn);
+ xkbi->shiftKeyCount= 0;
+ }
+ }
+
+ if (!ignoreKeyEvent)
+ XkbProcessKeyboardEvent(event, keybd);
+ return ignoreKeyEvent;
+
+} /* AccessXFilterReleaseEvent */
+
+/************************************************************************/
+/* */
+/* ProcessPointerEvent */
+/* */
+/* This routine merely sets the shiftKeyCount and clears the keyboard */
+/* response group timer (if necessary) on a mouse event. This is so */
+/* multiple shifts with just the mouse and shift-drags with the mouse */
+/* don't accidentally turn on StickyKeys or the Keyboard Response Group.*/
+/* */
+/************************************************************************/
+extern int xkbDevicePrivateIndex;
+extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
+void
+ProcessPointerEvent( InternalEvent *ev,
+ DeviceIntPtr mouse)
+{
+DeviceIntPtr dev;
+XkbSrvInfoPtr xkbi = NULL;
+unsigned changed = 0;
+ProcessInputProc backupproc;
+xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse);
+DeviceEvent *event = &ev->device_event;
+
+ dev = IsFloating(mouse) ? mouse : GetMaster(mouse, MASTER_KEYBOARD);
+
+ if (dev && dev->key)
+ {
+ xkbi = dev->key->xkbInfo;
+ xkbi->shiftKeyCount = 0;
+ xkbi->lastPtrEventTime= event->time;
+ }
+
+ if (event->type == ET_ButtonPress) {
+ changed |= XkbPointerButtonMask;
+ }
+ else if (event->type == ET_ButtonRelease) {
+ if (xkbi) {
+ xkbi->lockedPtrButtons&= ~(1 << (event->detail.key & 0x7));
+
+ if (IsMaster(dev))
+ {
+ DeviceIntPtr source;
+ int rc;
+ rc = dixLookupDevice(&source, event->sourceid, serverClient, DixWriteAccess);
+ if (rc != Success)
+ ErrorF("[xkb] bad sourceid '%d' on button release event.\n", event->sourceid);
+ else if (!IsXTestDevice(source, GetMaster(dev, MASTER_POINTER)))
+ XkbFakeDeviceButton(dev, FALSE, event->detail.key);
+ }
+ }
+
+ changed |= XkbPointerButtonMask;
+ }
+
+ UNWRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc);
+ mouse->public.processInputProc(ev, mouse);
+ COND_WRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr,
+ backupproc, xkbUnwrapProc);
+
+ if (!xkbi)
+ return;
+
+ xkbi->state.ptr_buttons = (mouse->button) ? mouse->button->state : 0;
+
+ /* clear any latched modifiers */
+ if ( xkbi->state.latched_mods && (event->type == ET_ButtonRelease) ) {
+ unsigned changed_leds;
+ XkbStateRec oldState;
+ XkbSrvLedInfoPtr sli;
+
+ sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
+ oldState= xkbi->state;
+ XkbLatchModifiers(dev,0xFF,0x00);
+
+ XkbComputeDerivedState(xkbi);
+ changed |= XkbStateChangedFlags(&oldState,&xkbi->state);
+ if (changed&sli->usedComponents) {
+ changed_leds= XkbIndicatorsToUpdate(dev,changed,FALSE);
+ if (changed_leds) {
+ XkbEventCauseRec cause;
+ XkbSetCauseKey(&cause,(event->detail.key & 0x7), event->type);
+ XkbUpdateIndicators(dev,changed_leds,TRUE,NULL,&cause);
+ }
+ }
+ }
+
+ if (((xkbi->flags&_XkbStateNotifyInProgress)==0)&&(changed!=0)) {
+ xkbStateNotify sn;
+ sn.keycode= event->detail.key;
+ sn.eventType= event->type;
+ sn.requestMajor = sn.requestMinor = 0;
+ sn.changed= changed;
+ XkbSendStateNotify(dev,&sn);
+ }
+
+} /* ProcessPointerEvent */
+
+
+
+
diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c
index 8cd9b44a1..19d7a54f9 100644
--- a/xorg-server/xkb/xkbActions.c
+++ b/xorg-server/xkb/xkbActions.c
@@ -1388,6 +1388,7 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y)
{
ValuatorMask mask;
int gpe_flags = 0;
+ int Point[]={x, y};
/* ignore attached SDs */
if (!IsMaster(dev) && !IsFloating(dev))
@@ -1398,7 +1399,7 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y)
else
gpe_flags = POINTER_RELATIVE;
- valuator_mask_set_range(&mask, 0, 2, (int[]){x, y});
+ valuator_mask_set_range(&mask, 0, 2, Point);
InjectPointerKeyEvents(dev, MotionNotify, 0, gpe_flags, &mask);
}
diff --git a/xorg-server/xkb/xkbInit.c b/xorg-server/xkb/xkbInit.c
index 3d3febb4f..90f7d8888 100644
--- a/xorg-server/xkb/xkbInit.c
+++ b/xorg-server/xkb/xkbInit.c
@@ -1,768 +1,768 @@
-/************************************************************
-Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
-of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
-of this software for any purpose. It is provided "as is"
-without any express or implied warranty.
-
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <xkb-config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <math.h>
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/keysym.h>
-#include <X11/Xatom.h>
-#include "misc.h"
-#include "inputstr.h"
-#include "opaque.h"
-#include "property.h"
-#include "scrnintstr.h"
-#define XKBSRV_NEED_FILE_FUNCS
-#include <xkbsrv.h>
-#include "xkbgeom.h"
-#include <X11/extensions/XKMformat.h>
-#include "xkbfile.h"
-#include "xkb.h"
-
-#define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1)
-
-#if defined(__alpha) || defined(__alpha__)
-#define LED_COMPOSE 2
-#define LED_CAPS 3
-#define LED_SCROLL 4
-#define LED_NUM 5
-#define PHYS_LEDS 0x1f
-#else
-#ifdef sun
-#define LED_NUM 1
-#define LED_SCROLL 2
-#define LED_COMPOSE 3
-#define LED_CAPS 4
-#define PHYS_LEDS 0x0f
-#else
-#define LED_CAPS 1
-#define LED_NUM 2
-#define LED_SCROLL 3
-#define PHYS_LEDS 0x07
-#endif
-#endif
-
-#define MAX_TOC 16
-typedef struct _SrvXkmInfo {
- DeviceIntPtr dev;
- FILE * file;
- XkbDescPtr xkb;
-} SrvXkmInfo;
-
-
-/***====================================================================***/
-
-#ifndef XKB_DFLT_RULES_PROP
-#define XKB_DFLT_RULES_PROP TRUE
-#endif
-
-char * XkbBaseDirectory= XKB_BASE_DIRECTORY;
-char * XkbBinDirectory= XKB_BIN_DIRECTORY;
-static int XkbWantAccessX= 0;
-
-static char * XkbRulesDflt= NULL;
-static char * XkbModelDflt= NULL;
-static char * XkbLayoutDflt= NULL;
-static char * XkbVariantDflt= NULL;
-static char * XkbOptionsDflt= NULL;
-
-static char * XkbRulesUsed= NULL;
-static char * XkbModelUsed= NULL;
-static char * XkbLayoutUsed= NULL;
-static char * XkbVariantUsed= NULL;
-static char * XkbOptionsUsed= NULL;
-
-static XkbDescPtr xkb_cached_map = NULL;
-
-static Bool XkbWantRulesProp= XKB_DFLT_RULES_PROP;
-
-/***====================================================================***/
-
-/**
- * Get the current default XKB rules.
- * Caller must free the data in rmlvo.
- */
-void
-XkbGetRulesDflts(XkbRMLVOSet *rmlvo)
-{
- if (XkbRulesDflt) rmlvo->rules = XkbRulesDflt;
- else rmlvo->rules = XKB_DFLT_RULES;
- if (XkbModelDflt) rmlvo->model= XkbModelDflt;
- else rmlvo->model= XKB_DFLT_MODEL;
- if (XkbLayoutDflt) rmlvo->layout= XkbLayoutDflt;
- else rmlvo->layout= XKB_DFLT_LAYOUT;
- if (XkbVariantDflt) rmlvo->variant= XkbVariantDflt;
- else rmlvo->variant= XKB_DFLT_VARIANT;
- if (XkbOptionsDflt) rmlvo->options= XkbOptionsDflt;
- else rmlvo->options= XKB_DFLT_OPTIONS;
-
- rmlvo->rules = strdup(rmlvo->rules);
- rmlvo->model = strdup(rmlvo->model);
- rmlvo->layout = strdup(rmlvo->layout);
- rmlvo->variant = strdup(rmlvo->variant);
- rmlvo->options = strdup(rmlvo->options);
-}
-
-void
-XkbFreeRMLVOSet(XkbRMLVOSet *rmlvo, Bool freeRMLVO)
-{
- if (!rmlvo)
- return;
-
- free(rmlvo->rules);
- free(rmlvo->model);
- free(rmlvo->layout);
- free(rmlvo->variant);
- free(rmlvo->options);
-
- if (freeRMLVO)
- free(rmlvo);
- else
- memset(rmlvo, 0, sizeof(XkbRMLVOSet));
-}
-
-static Bool
-XkbWriteRulesProp(ClientPtr client, pointer closure)
-{
-int len,out;
-Atom name;
-char * pval;
-
- len= (XkbRulesUsed?strlen(XkbRulesUsed):0);
- len+= (XkbModelUsed?strlen(XkbModelUsed):0);
- len+= (XkbLayoutUsed?strlen(XkbLayoutUsed):0);
- len+= (XkbVariantUsed?strlen(XkbVariantUsed):0);
- len+= (XkbOptionsUsed?strlen(XkbOptionsUsed):0);
- if (len<1)
- return TRUE;
-
- len+= 5; /* trailing NULs */
-
- name= MakeAtom(_XKB_RF_NAMES_PROP_ATOM,strlen(_XKB_RF_NAMES_PROP_ATOM),1);
- if (name==None) {
- ErrorF("[xkb] Atom error: %s not created\n",_XKB_RF_NAMES_PROP_ATOM);
- return TRUE;
- }
- pval= (char*) malloc(len);
- if (!pval) {
- ErrorF("[xkb] Allocation error: %s proprerty not created\n",
- _XKB_RF_NAMES_PROP_ATOM);
- return TRUE;
- }
- out= 0;
- if (XkbRulesUsed) {
- strcpy(&pval[out],XkbRulesUsed);
- out+= strlen(XkbRulesUsed);
- }
- pval[out++]= '\0';
- if (XkbModelUsed) {
- strcpy(&pval[out],XkbModelUsed);
- out+= strlen(XkbModelUsed);
- }
- pval[out++]= '\0';
- if (XkbLayoutUsed) {
- strcpy(&pval[out],XkbLayoutUsed);
- out+= strlen(XkbLayoutUsed);
- }
- pval[out++]= '\0';
- if (XkbVariantUsed) {
- strcpy(&pval[out],XkbVariantUsed);
- out+= strlen(XkbVariantUsed);
- }
- pval[out++]= '\0';
- if (XkbOptionsUsed) {
- strcpy(&pval[out],XkbOptionsUsed);
- out+= strlen(XkbOptionsUsed);
- }
- pval[out++]= '\0';
- if (out!=len) {
- ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n",
- out,len);
- }
- dixChangeWindowProperty(serverClient, screenInfo.screens[0]->root, name, XA_STRING, 8,
- PropModeReplace, len, pval, TRUE);
- free(pval);
- return TRUE;
-}
-
-static void
-XkbSetRulesUsed(XkbRMLVOSet *rmlvo)
-{
- free(XkbRulesUsed);
- XkbRulesUsed= (rmlvo->rules?Xstrdup(rmlvo->rules):NULL);
- free(XkbModelUsed);
- XkbModelUsed= (rmlvo->model?Xstrdup(rmlvo->model):NULL);
- free(XkbLayoutUsed);
- XkbLayoutUsed= (rmlvo->layout?Xstrdup(rmlvo->layout):NULL);
- free(XkbVariantUsed);
- XkbVariantUsed= (rmlvo->variant?Xstrdup(rmlvo->variant):NULL);
- free(XkbOptionsUsed);
- XkbOptionsUsed= (rmlvo->options?Xstrdup(rmlvo->options):NULL);
- if (XkbWantRulesProp)
- QueueWorkProc(XkbWriteRulesProp,NULL,NULL);
- return;
-}
-
-void
-XkbSetRulesDflts(XkbRMLVOSet *rmlvo)
-{
- if (rmlvo->rules) {
- free(XkbRulesDflt);
- XkbRulesDflt= Xstrdup(rmlvo->rules);
- }
- if (rmlvo->model) {
- free(XkbModelDflt);
- XkbModelDflt= Xstrdup(rmlvo->model);
- }
- if (rmlvo->layout) {
- free(XkbLayoutDflt);
- XkbLayoutDflt= Xstrdup(rmlvo->layout);
- }
- if (rmlvo->variant) {
- free(XkbVariantDflt);
- XkbVariantDflt= Xstrdup(rmlvo->variant);
- }
- if (rmlvo->options) {
- free(XkbOptionsDflt);
- XkbOptionsDflt= Xstrdup(rmlvo->options);
- }
- return;
-}
-
-void
-XkbDeleteRulesDflts(void)
-{
- free(XkbRulesDflt);
- XkbRulesDflt = NULL;
- free(XkbModelDflt);
- XkbModelDflt = NULL;
- free(XkbLayoutDflt);
- XkbLayoutDflt = NULL;
- free(XkbVariantDflt);
- XkbVariantDflt = NULL;
- free(XkbOptionsDflt);
- XkbOptionsDflt = NULL;
-
- XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, TRUE);
- xkb_cached_map = NULL;
-}
-
-#define DIFFERS(a, b) (strcmp((a) ? (a) : "", (b) ? (b) : "") != 0)
-
-static Bool
-XkbCompareUsedRMLVO(XkbRMLVOSet *rmlvo)
-{
- if (DIFFERS(rmlvo->rules, XkbRulesUsed) ||
- DIFFERS(rmlvo->model, XkbModelUsed) ||
- DIFFERS(rmlvo->layout, XkbLayoutUsed) ||
- DIFFERS(rmlvo->variant, XkbVariantUsed) ||
- DIFFERS(rmlvo->options, XkbOptionsUsed))
- return FALSE;
- return TRUE;
-}
-
-#undef DIFFERS
-
-/***====================================================================***/
-
-#include "xkbDflts.h"
-
-static Bool
-XkbInitKeyTypes(XkbDescPtr xkb)
-{
- if (xkb->defined & XkmTypesMask)
- return TRUE;
-
- initTypeNames(NULL);
- if (XkbAllocClientMap(xkb,XkbKeyTypesMask,num_dflt_types)!=Success)
- return FALSE;
- if (XkbCopyKeyTypes(dflt_types,xkb->map->types,num_dflt_types)!=
- Success) {
- return FALSE;
- }
- xkb->map->size_types= xkb->map->num_types= num_dflt_types;
- return TRUE;
-}
-
-static void
-XkbInitRadioGroups(XkbSrvInfoPtr xkbi)
-{
- xkbi->nRadioGroups = 0;
- xkbi->radioGroups = NULL;
- return;
-}
-
-
-static Status
-XkbInitCompatStructs(XkbDescPtr xkb)
-{
-register int i;
-XkbCompatMapPtr compat;
-
- if (xkb->defined & XkmCompatMapMask)
- return TRUE;
-
- if (XkbAllocCompatMap(xkb,XkbAllCompatMask,num_dfltSI)!=Success)
- return BadAlloc;
- compat = xkb->compat;
- if (compat->sym_interpret) {
- compat->num_si = num_dfltSI;
- memcpy((char *)compat->sym_interpret,(char *)dfltSI,sizeof(dfltSI));
- }
- for (i=0;i<XkbNumKbdGroups;i++) {
- compat->groups[i]= compatMap.groups[i];
- if (compat->groups[i].vmods!=0) {
- unsigned mask;
- mask= XkbMaskForVMask(xkb,compat->groups[i].vmods);
- compat->groups[i].mask= compat->groups[i].real_mods|mask;
- }
- else compat->groups[i].mask= compat->groups[i].real_mods;
- }
- return Success;
-}
-
-static void
-XkbInitSemantics(XkbDescPtr xkb)
-{
- XkbInitKeyTypes(xkb);
- XkbInitCompatStructs(xkb);
- return;
-}
-
-/***====================================================================***/
-
-static Status
-XkbInitNames(XkbSrvInfoPtr xkbi)
-{
-XkbDescPtr xkb;
-XkbNamesPtr names;
-Status rtrn;
-Atom unknown;
-
- xkb= xkbi->desc;
- if ((rtrn=XkbAllocNames(xkb,XkbAllNamesMask,0,0))!=Success)
- return rtrn;
- unknown= CREATE_ATOM("unknown");
- names = xkb->names;
- if (names->keycodes==None) names->keycodes= unknown;
- if (names->geometry==None) names->geometry= unknown;
- if (names->phys_symbols==None) names->phys_symbols= unknown;
- if (names->symbols==None) names->symbols= unknown;
- if (names->types==None) names->types= unknown;
- if (names->compat==None) names->compat= unknown;
- if (!(xkb->defined & XkmVirtualModsMask)) {
- if (names->vmods[vmod_NumLock]==None)
- names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock");
- if (names->vmods[vmod_Alt]==None)
- names->vmods[vmod_Alt]= CREATE_ATOM("Alt");
- if (names->vmods[vmod_AltGr]==None)
- names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch");
- }
-
- if (!(xkb->defined & XkmIndicatorsMask) ||
- !(xkb->defined & XkmGeometryMask)) {
- initIndicatorNames(NULL,xkb);
- if (names->indicators[LED_CAPS-1]==None)
- names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock");
- if (names->indicators[LED_NUM-1]==None)
- names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock");
- if (names->indicators[LED_SCROLL-1]==None)
- names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock");
-#ifdef LED_COMPOSE
- if (names->indicators[LED_COMPOSE-1]==None)
- names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose");
-#endif
- }
-
- if (xkb->geom!=NULL)
- names->geometry= xkb->geom->name;
- else names->geometry= unknown;
-
- return Success;
-}
-
-static Status
-XkbInitIndicatorMap(XkbSrvInfoPtr xkbi)
-{
-XkbDescPtr xkb;
-XkbIndicatorPtr map;
-XkbSrvLedInfoPtr sli;
-
- xkb= xkbi->desc;
- if (XkbAllocIndicatorMaps(xkb)!=Success)
- return BadAlloc;
-
- if (!(xkb->defined & XkmIndicatorsMask)) {
- map= xkb->indicators;
- map->phys_indicators = PHYS_LEDS;
- map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit;
- map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked;
- map->maps[LED_CAPS-1].mods.mask= LockMask;
- map->maps[LED_CAPS-1].mods.real_mods= LockMask;
-
- map->maps[LED_NUM-1].flags= XkbIM_NoExplicit;
- map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked;
- map->maps[LED_NUM-1].mods.mask= 0;
- map->maps[LED_NUM-1].mods.real_mods= 0;
- map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask;
-
- map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit;
- map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked;
- map->maps[LED_SCROLL-1].mods.mask= Mod3Mask;
- map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask;
- }
-
- sli= XkbFindSrvLedInfo(xkbi->device,XkbDfltXIClass,XkbDfltXIId,0);
- if (sli)
- XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask);
-
- return Success;
-}
-
-static Status
-XkbInitControls(DeviceIntPtr pXDev,XkbSrvInfoPtr xkbi)
-{
-XkbDescPtr xkb;
-XkbControlsPtr ctrls;
-
- xkb= xkbi->desc;
- /* 12/31/94 (ef) -- XXX! Should check if controls loaded from file */
- if (XkbAllocControls(xkb,XkbAllControlsMask)!=Success)
- FatalError("Couldn't allocate keyboard controls\n");
- ctrls= xkb->ctrls;
- if (!(xkb->defined & XkmSymbolsMask))
- ctrls->num_groups = 1;
- ctrls->groups_wrap = XkbSetGroupInfo(1,XkbWrapIntoRange,0);
- ctrls->internal.mask = 0;
- ctrls->internal.real_mods = 0;
- ctrls->internal.vmods = 0;
- ctrls->ignore_lock.mask = 0;
- ctrls->ignore_lock.real_mods = 0;
- ctrls->ignore_lock.vmods = 0;
- ctrls->enabled_ctrls = XkbAccessXTimeoutMask|XkbRepeatKeysMask|
- XkbMouseKeysAccelMask|XkbAudibleBellMask|
- XkbIgnoreGroupLockMask;
- if (XkbWantAccessX)
- ctrls->enabled_ctrls|= XkbAccessXKeysMask;
- AccessXInit(pXDev);
- return Success;
-}
-
-_X_EXPORT Bool
-InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
- BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
-{
- int i;
- unsigned int check;
- XkbSrvInfoPtr xkbi;
- XkbDescPtr xkb;
- XkbSrvLedInfoPtr sli;
- XkbChangesRec changes;
- XkbEventCauseRec cause;
- XkbRMLVOSet rmlvo_dflts = { NULL };
-
- if (dev->key || dev->kbdfeed)
- return FALSE;
-
- if (!rmlvo)
- {
- rmlvo = &rmlvo_dflts;
- XkbGetRulesDflts(rmlvo);
- }
-
-
- memset(&changes, 0, sizeof(changes));
- XkbSetCauseUnknown(&cause);
-
- dev->key = calloc(1, sizeof(*dev->key));
- if (!dev->key) {
- ErrorF("XKB: Failed to allocate key class\n");
- return FALSE;
- }
- dev->key->sourceid = dev->id;
-
- dev->kbdfeed = calloc(1, sizeof(*dev->kbdfeed));
- if (!dev->kbdfeed) {
- ErrorF("XKB: Failed to allocate key feedback class\n");
- goto unwind_key;
- }
-
- xkbi = calloc(1, sizeof(*xkbi));
- if (!xkbi) {
- ErrorF("XKB: Failed to allocate XKB info\n");
- goto unwind_kbdfeed;
- }
- dev->key->xkbInfo = xkbi;
-
- if (xkb_cached_map && !XkbCompareUsedRMLVO(rmlvo)) {
- XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, TRUE);
- xkb_cached_map = NULL;
- }
-
- if (xkb_cached_map)
- LogMessageVerb(X_INFO, 4, "XKB: Reusing cached keymap\n");
- else {
- xkb_cached_map = XkbCompileKeymap(dev, rmlvo);
- if (!xkb_cached_map) {
- ErrorF("XKB: Failed to compile keymap\n");
- goto unwind_info;
- }
- }
-
- xkb = XkbAllocKeyboard();
- if (!xkb) {
- ErrorF("XKB: Failed to allocate keyboard description\n");
- goto unwind_info;
- }
-
- if (!XkbCopyKeymap(xkb, xkb_cached_map)) {
- ErrorF("XKB: Failed to copy keymap\n");
- goto unwind_desc;
- }
- xkb->defined = xkb_cached_map->defined;
- xkb->flags = xkb_cached_map->flags;
- xkb->device_spec = xkb_cached_map->device_spec;
- xkbi->desc = xkb;
-
- if (xkb->min_key_code == 0)
- xkb->min_key_code = 8;
- if (xkb->max_key_code == 0)
- xkb->max_key_code = 255;
-
- i = XkbNumKeys(xkb) / 3 + 1;
- if (XkbAllocClientMap(xkb, XkbAllClientInfoMask, 0) != Success)
- goto unwind_desc;
- if (XkbAllocServerMap(xkb, XkbAllServerInfoMask, i) != Success)
- goto unwind_desc;
-
- xkbi->dfltPtrDelta = 1;
- xkbi->device = dev;
-
- XkbInitSemantics(xkb);
- XkbInitNames(xkbi);
- XkbInitRadioGroups(xkbi);
-
- XkbInitControls(dev, xkbi);
-
- XkbInitIndicatorMap(xkbi);
-
- XkbUpdateActions(dev, xkb->min_key_code, XkbNumKeys(xkb), &changes,
- &check, &cause);
-
- InitFocusClassDeviceStruct(dev);
-
- xkbi->kbdProc = ctrl_func;
- dev->kbdfeed->BellProc = bell_func;
- dev->kbdfeed->CtrlProc = XkbDDXKeybdCtrlProc;
-
- dev->kbdfeed->ctrl = defaultKeyboardControl;
- if (dev->kbdfeed->ctrl.autoRepeat)
- xkb->ctrls->enabled_ctrls |= XkbRepeatKeysMask;
-
- memcpy(dev->kbdfeed->ctrl.autoRepeats, xkb->ctrls->per_key_repeat,
- XkbPerKeyBitArraySize);
-
- sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0);
- if (sli)
- XkbCheckIndicatorMaps(dev, sli, XkbAllIndicatorsMask);
- else
- DebugF("XKB: No indicator feedback in XkbFinishInit!\n");
-
- dev->kbdfeed->CtrlProc(dev,&dev->kbdfeed->ctrl);
-
- XkbSetRulesDflts(rmlvo);
- XkbSetRulesUsed(rmlvo);
- XkbFreeRMLVOSet(&rmlvo_dflts, FALSE);
-
- return TRUE;
-
-unwind_desc:
- XkbFreeKeyboard(xkb, 0, TRUE);
-unwind_info:
- free(xkbi);
- dev->key->xkbInfo = NULL;
-unwind_kbdfeed:
- free(dev->kbdfeed);
- dev->kbdfeed = NULL;
-unwind_key:
- free(dev->key);
- dev->key = NULL;
- return FALSE;
-}
-
-
-/***====================================================================***/
-
- /*
- * Be very careful about what does and doesn't get freed by this
- * function. To reduce fragmentation, XkbInitDevice allocates a
- * single huge block per device and divides it up into most of the
- * fixed-size structures for the device. Don't free anything that
- * is part of this larger block.
- */
-void
-XkbFreeInfo(XkbSrvInfoPtr xkbi)
-{
- free(xkbi->radioGroups);
- xkbi->radioGroups = NULL;
- if (xkbi->mouseKeyTimer) {
- TimerFree(xkbi->mouseKeyTimer);
- xkbi->mouseKeyTimer= NULL;
- }
- if (xkbi->slowKeysTimer) {
- TimerFree(xkbi->slowKeysTimer);
- xkbi->slowKeysTimer= NULL;
- }
- if (xkbi->bounceKeysTimer) {
- TimerFree(xkbi->bounceKeysTimer);
- xkbi->bounceKeysTimer= NULL;
- }
- if (xkbi->repeatKeyTimer) {
- TimerFree(xkbi->repeatKeyTimer);
- xkbi->repeatKeyTimer= NULL;
- }
- if (xkbi->krgTimer) {
- TimerFree(xkbi->krgTimer);
- xkbi->krgTimer= NULL;
- }
- xkbi->beepType= _BEEP_NONE;
- if (xkbi->beepTimer) {
- TimerFree(xkbi->beepTimer);
- xkbi->beepTimer= NULL;
- }
- if (xkbi->desc) {
- XkbFreeKeyboard(xkbi->desc,XkbAllComponentsMask,TRUE);
- xkbi->desc= NULL;
- }
- free(xkbi);
- return;
-}
-
-/***====================================================================***/
-
-extern int XkbDfltRepeatDelay;
-extern int XkbDfltRepeatInterval;
-
-extern unsigned short XkbDfltAccessXTimeout;
-extern unsigned int XkbDfltAccessXTimeoutMask;
-extern unsigned int XkbDfltAccessXFeedback;
-extern unsigned char XkbDfltAccessXOptions;
-
-int
-XkbProcessArguments(int argc,char *argv[],int i)
-{
- if (strncmp(argv[i], "-xkbdir", 7) == 0) {
- if(++i < argc) {
-#if !defined(WIN32) && !defined(__CYGWIN__)
- if (getuid() != geteuid()) {
- LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n");
- return -1;
- } else
-#endif
- {
- if (strlen(argv[i]) < PATH_MAX) {
- XkbBaseDirectory= argv[i];
- return 2;
- } else {
- LogMessage(X_ERROR, "-xkbdir pathname too long\n");
- return -1;
- }
- }
- }
- else {
- return -1;
- }
- }
- else if ((strncmp(argv[i],"-accessx",8)==0)||
- (strncmp(argv[i],"+accessx",8)==0)) {
- int j=1;
- if (argv[i][0]=='-')
- XkbWantAccessX= 0;
- else {
- XkbWantAccessX= 1;
-
- if ( ((i+1)<argc) && (isdigit(argv[i+1][0])) ) {
- XkbDfltAccessXTimeout = atoi(argv[++i]);
- j++;
-
- if ( ((i+1)<argc) && (isdigit(argv[i+1][0])) ) {
- /*
- * presumption that the reasonably useful range of
- * values fits in 0..MAXINT since SunOS 4 doesn't
- * have strtoul.
- */
- XkbDfltAccessXTimeoutMask=(unsigned int)
- strtol(argv[++i],NULL,16);
- j++;
- }
- if ( ((i+1)<argc) && (isdigit(argv[i+1][0])) ) {
- if (argv[++i][0] == '1' )
- XkbDfltAccessXFeedback=XkbAccessXFeedbackMask;
- else
- XkbDfltAccessXFeedback=0;
- j++;
- }
- if ( ((i+1)<argc) && (isdigit(argv[i+1][0])) ) {
- XkbDfltAccessXOptions=(unsigned char)
- strtol(argv[++i],NULL,16);
- j++;
- }
- }
- }
- return j;
- }
- if ((strcmp(argv[i], "-ardelay") == 0) ||
- (strcmp (argv[i], "-ar1") == 0)) { /* -ardelay int */
- if (++i >= argc) UseMsg ();
- XkbDfltRepeatDelay = (long)atoi(argv[i]);
- return 2;
- }
- if ((strcmp(argv[i], "-arinterval") == 0) ||
- (strcmp (argv[i], "-ar2") == 0)) { /* -arinterval int */
- if (++i >= argc) UseMsg ();
- XkbDfltRepeatInterval = (long)atoi(argv[i]);
- return 2;
- }
- return 0;
-}
-
-void
-XkbUseMsg(void)
-{
- ErrorF("[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]\n");
- ErrorF(" enable/disable accessx key sequences\n");
- ErrorF("-ardelay set XKB autorepeat delay\n");
- ErrorF("-arinterval set XKB autorepeat interval\n");
-}
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <xkb-config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <math.h>
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/keysym.h>
+#include <X11/Xatom.h>
+#include "misc.h"
+#include "inputstr.h"
+#include "opaque.h"
+#include "property.h"
+#include "scrnintstr.h"
+#define XKBSRV_NEED_FILE_FUNCS
+#include <xkbsrv.h>
+#include "xkbgeom.h"
+#include <X11/extensions/XKMformat.h>
+#include "xkbfile.h"
+#include "xkb.h"
+
+#define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1)
+
+#if defined(__alpha) || defined(__alpha__)
+#define LED_COMPOSE 2
+#define LED_CAPS 3
+#define LED_SCROLL 4
+#define LED_NUM 5
+#define PHYS_LEDS 0x1f
+#else
+#ifdef sun
+#define LED_NUM 1
+#define LED_SCROLL 2
+#define LED_COMPOSE 3
+#define LED_CAPS 4
+#define PHYS_LEDS 0x0f
+#else
+#define LED_CAPS 1
+#define LED_NUM 2
+#define LED_SCROLL 3
+#define PHYS_LEDS 0x07
+#endif
+#endif
+
+#define MAX_TOC 16
+typedef struct _SrvXkmInfo {
+ DeviceIntPtr dev;
+ FILE * file;
+ XkbDescPtr xkb;
+} SrvXkmInfo;
+
+
+/***====================================================================***/
+
+#ifndef XKB_DFLT_RULES_PROP
+#define XKB_DFLT_RULES_PROP TRUE
+#endif
+
+const char * XkbBaseDirectory= XKB_BASE_DIRECTORY;
+const char * XkbBinDirectory= XKB_BIN_DIRECTORY;
+static int XkbWantAccessX= 0;
+
+static char * XkbRulesDflt= NULL;
+static char * XkbModelDflt= NULL;
+static char * XkbLayoutDflt= NULL;
+static char * XkbVariantDflt= NULL;
+static char * XkbOptionsDflt= NULL;
+
+static char * XkbRulesUsed= NULL;
+static char * XkbModelUsed= NULL;
+static char * XkbLayoutUsed= NULL;
+static char * XkbVariantUsed= NULL;
+static char * XkbOptionsUsed= NULL;
+
+static XkbDescPtr xkb_cached_map = NULL;
+
+static Bool XkbWantRulesProp= XKB_DFLT_RULES_PROP;
+
+/***====================================================================***/
+
+/**
+ * Get the current default XKB rules.
+ * Caller must free the data in rmlvo.
+ */
+void
+XkbGetRulesDflts(XkbRMLVOSet *rmlvo)
+{
+ if (XkbRulesDflt) rmlvo->rules = XkbRulesDflt;
+ else rmlvo->rules = XKB_DFLT_RULES;
+ if (XkbModelDflt) rmlvo->model= XkbModelDflt;
+ else rmlvo->model= XKB_DFLT_MODEL;
+ if (XkbLayoutDflt) rmlvo->layout= XkbLayoutDflt;
+ else rmlvo->layout= XKB_DFLT_LAYOUT;
+ if (XkbVariantDflt) rmlvo->variant= XkbVariantDflt;
+ else rmlvo->variant= XKB_DFLT_VARIANT;
+ if (XkbOptionsDflt) rmlvo->options= XkbOptionsDflt;
+ else rmlvo->options= XKB_DFLT_OPTIONS;
+
+ rmlvo->rules = strdup(rmlvo->rules);
+ rmlvo->model = strdup(rmlvo->model);
+ rmlvo->layout = strdup(rmlvo->layout);
+ rmlvo->variant = strdup(rmlvo->variant);
+ rmlvo->options = strdup(rmlvo->options);
+}
+
+void
+XkbFreeRMLVOSet(XkbRMLVOSet *rmlvo, Bool freeRMLVO)
+{
+ if (!rmlvo)
+ return;
+
+ free(rmlvo->rules);
+ free(rmlvo->model);
+ free(rmlvo->layout);
+ free(rmlvo->variant);
+ free(rmlvo->options);
+
+ if (freeRMLVO)
+ free(rmlvo);
+ else
+ memset(rmlvo, 0, sizeof(XkbRMLVOSet));
+}
+
+static Bool
+XkbWriteRulesProp(ClientPtr client, pointer closure)
+{
+int len,out;
+Atom name;
+char * pval;
+
+ len= (XkbRulesUsed?strlen(XkbRulesUsed):0);
+ len+= (XkbModelUsed?strlen(XkbModelUsed):0);
+ len+= (XkbLayoutUsed?strlen(XkbLayoutUsed):0);
+ len+= (XkbVariantUsed?strlen(XkbVariantUsed):0);
+ len+= (XkbOptionsUsed?strlen(XkbOptionsUsed):0);
+ if (len<1)
+ return TRUE;
+
+ len+= 5; /* trailing NULs */
+
+ name= MakeAtom(_XKB_RF_NAMES_PROP_ATOM,strlen(_XKB_RF_NAMES_PROP_ATOM),1);
+ if (name==None) {
+ ErrorF("[xkb] Atom error: %s not created\n",_XKB_RF_NAMES_PROP_ATOM);
+ return TRUE;
+ }
+ pval= (char*) malloc(len);
+ if (!pval) {
+ ErrorF("[xkb] Allocation error: %s proprerty not created\n",
+ _XKB_RF_NAMES_PROP_ATOM);
+ return TRUE;
+ }
+ out= 0;
+ if (XkbRulesUsed) {
+ strcpy(&pval[out],XkbRulesUsed);
+ out+= strlen(XkbRulesUsed);
+ }
+ pval[out++]= '\0';
+ if (XkbModelUsed) {
+ strcpy(&pval[out],XkbModelUsed);
+ out+= strlen(XkbModelUsed);
+ }
+ pval[out++]= '\0';
+ if (XkbLayoutUsed) {
+ strcpy(&pval[out],XkbLayoutUsed);
+ out+= strlen(XkbLayoutUsed);
+ }
+ pval[out++]= '\0';
+ if (XkbVariantUsed) {
+ strcpy(&pval[out],XkbVariantUsed);
+ out+= strlen(XkbVariantUsed);
+ }
+ pval[out++]= '\0';
+ if (XkbOptionsUsed) {
+ strcpy(&pval[out],XkbOptionsUsed);
+ out+= strlen(XkbOptionsUsed);
+ }
+ pval[out++]= '\0';
+ if (out!=len) {
+ ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n",
+ out,len);
+ }
+ dixChangeWindowProperty(serverClient, screenInfo.screens[0]->root, name, XA_STRING, 8,
+ PropModeReplace, len, pval, TRUE);
+ free(pval);
+ return TRUE;
+}
+
+static void
+XkbSetRulesUsed(XkbRMLVOSet *rmlvo)
+{
+ free(XkbRulesUsed);
+ XkbRulesUsed= (rmlvo->rules?Xstrdup(rmlvo->rules):NULL);
+ free(XkbModelUsed);
+ XkbModelUsed= (rmlvo->model?Xstrdup(rmlvo->model):NULL);
+ free(XkbLayoutUsed);
+ XkbLayoutUsed= (rmlvo->layout?Xstrdup(rmlvo->layout):NULL);
+ free(XkbVariantUsed);
+ XkbVariantUsed= (rmlvo->variant?Xstrdup(rmlvo->variant):NULL);
+ free(XkbOptionsUsed);
+ XkbOptionsUsed= (rmlvo->options?Xstrdup(rmlvo->options):NULL);
+ if (XkbWantRulesProp)
+ QueueWorkProc(XkbWriteRulesProp,NULL,NULL);
+ return;
+}
+
+void
+XkbSetRulesDflts(XkbRMLVOSet *rmlvo)
+{
+ if (rmlvo->rules) {
+ free(XkbRulesDflt);
+ XkbRulesDflt= Xstrdup(rmlvo->rules);
+ }
+ if (rmlvo->model) {
+ free(XkbModelDflt);
+ XkbModelDflt= Xstrdup(rmlvo->model);
+ }
+ if (rmlvo->layout) {
+ free(XkbLayoutDflt);
+ XkbLayoutDflt= Xstrdup(rmlvo->layout);
+ }
+ if (rmlvo->variant) {
+ free(XkbVariantDflt);
+ XkbVariantDflt= Xstrdup(rmlvo->variant);
+ }
+ if (rmlvo->options) {
+ free(XkbOptionsDflt);
+ XkbOptionsDflt= Xstrdup(rmlvo->options);
+ }
+ return;
+}
+
+void
+XkbDeleteRulesDflts(void)
+{
+ free(XkbRulesDflt);
+ XkbRulesDflt = NULL;
+ free(XkbModelDflt);
+ XkbModelDflt = NULL;
+ free(XkbLayoutDflt);
+ XkbLayoutDflt = NULL;
+ free(XkbVariantDflt);
+ XkbVariantDflt = NULL;
+ free(XkbOptionsDflt);
+ XkbOptionsDflt = NULL;
+
+ XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, TRUE);
+ xkb_cached_map = NULL;
+}
+
+#define DIFFERS(a, b) (strcmp((a) ? (a) : "", (b) ? (b) : "") != 0)
+
+static Bool
+XkbCompareUsedRMLVO(XkbRMLVOSet *rmlvo)
+{
+ if (DIFFERS(rmlvo->rules, XkbRulesUsed) ||
+ DIFFERS(rmlvo->model, XkbModelUsed) ||
+ DIFFERS(rmlvo->layout, XkbLayoutUsed) ||
+ DIFFERS(rmlvo->variant, XkbVariantUsed) ||
+ DIFFERS(rmlvo->options, XkbOptionsUsed))
+ return FALSE;
+ return TRUE;
+}
+
+#undef DIFFERS
+
+/***====================================================================***/
+
+#include "xkbDflts.h"
+
+static Bool
+XkbInitKeyTypes(XkbDescPtr xkb)
+{
+ if (xkb->defined & XkmTypesMask)
+ return TRUE;
+
+ initTypeNames(NULL);
+ if (XkbAllocClientMap(xkb,XkbKeyTypesMask,num_dflt_types)!=Success)
+ return FALSE;
+ if (XkbCopyKeyTypes(dflt_types,xkb->map->types,num_dflt_types)!=
+ Success) {
+ return FALSE;
+ }
+ xkb->map->size_types= xkb->map->num_types= num_dflt_types;
+ return TRUE;
+}
+
+static void
+XkbInitRadioGroups(XkbSrvInfoPtr xkbi)
+{
+ xkbi->nRadioGroups = 0;
+ xkbi->radioGroups = NULL;
+ return;
+}
+
+
+static Status
+XkbInitCompatStructs(XkbDescPtr xkb)
+{
+register int i;
+XkbCompatMapPtr compat;
+
+ if (xkb->defined & XkmCompatMapMask)
+ return TRUE;
+
+ if (XkbAllocCompatMap(xkb,XkbAllCompatMask,num_dfltSI)!=Success)
+ return BadAlloc;
+ compat = xkb->compat;
+ if (compat->sym_interpret) {
+ compat->num_si = num_dfltSI;
+ memcpy((char *)compat->sym_interpret,(char *)dfltSI,sizeof(dfltSI));
+ }
+ for (i=0;i<XkbNumKbdGroups;i++) {
+ compat->groups[i]= compatMap.groups[i];
+ if (compat->groups[i].vmods!=0) {
+ unsigned mask;
+ mask= XkbMaskForVMask(xkb,compat->groups[i].vmods);
+ compat->groups[i].mask= compat->groups[i].real_mods|mask;
+ }
+ else compat->groups[i].mask= compat->groups[i].real_mods;
+ }
+ return Success;
+}
+
+static void
+XkbInitSemantics(XkbDescPtr xkb)
+{
+ XkbInitKeyTypes(xkb);
+ XkbInitCompatStructs(xkb);
+ return;
+}
+
+/***====================================================================***/
+
+static Status
+XkbInitNames(XkbSrvInfoPtr xkbi)
+{
+XkbDescPtr xkb;
+XkbNamesPtr names;
+Status rtrn;
+Atom unknown;
+
+ xkb= xkbi->desc;
+ if ((rtrn=XkbAllocNames(xkb,XkbAllNamesMask,0,0))!=Success)
+ return rtrn;
+ unknown= CREATE_ATOM("unknown");
+ names = xkb->names;
+ if (names->keycodes==None) names->keycodes= unknown;
+ if (names->geometry==None) names->geometry= unknown;
+ if (names->phys_symbols==None) names->phys_symbols= unknown;
+ if (names->symbols==None) names->symbols= unknown;
+ if (names->types==None) names->types= unknown;
+ if (names->compat==None) names->compat= unknown;
+ if (!(xkb->defined & XkmVirtualModsMask)) {
+ if (names->vmods[vmod_NumLock]==None)
+ names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock");
+ if (names->vmods[vmod_Alt]==None)
+ names->vmods[vmod_Alt]= CREATE_ATOM("Alt");
+ if (names->vmods[vmod_AltGr]==None)
+ names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch");
+ }
+
+ if (!(xkb->defined & XkmIndicatorsMask) ||
+ !(xkb->defined & XkmGeometryMask)) {
+ initIndicatorNames(NULL,xkb);
+ if (names->indicators[LED_CAPS-1]==None)
+ names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock");
+ if (names->indicators[LED_NUM-1]==None)
+ names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock");
+ if (names->indicators[LED_SCROLL-1]==None)
+ names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock");
+#ifdef LED_COMPOSE
+ if (names->indicators[LED_COMPOSE-1]==None)
+ names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose");
+#endif
+ }
+
+ if (xkb->geom!=NULL)
+ names->geometry= xkb->geom->name;
+ else names->geometry= unknown;
+
+ return Success;
+}
+
+static Status
+XkbInitIndicatorMap(XkbSrvInfoPtr xkbi)
+{
+XkbDescPtr xkb;
+XkbIndicatorPtr map;
+XkbSrvLedInfoPtr sli;
+
+ xkb= xkbi->desc;
+ if (XkbAllocIndicatorMaps(xkb)!=Success)
+ return BadAlloc;
+
+ if (!(xkb->defined & XkmIndicatorsMask)) {
+ map= xkb->indicators;
+ map->phys_indicators = PHYS_LEDS;
+ map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit;
+ map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked;
+ map->maps[LED_CAPS-1].mods.mask= LockMask;
+ map->maps[LED_CAPS-1].mods.real_mods= LockMask;
+
+ map->maps[LED_NUM-1].flags= XkbIM_NoExplicit;
+ map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked;
+ map->maps[LED_NUM-1].mods.mask= 0;
+ map->maps[LED_NUM-1].mods.real_mods= 0;
+ map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask;
+
+ map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit;
+ map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked;
+ map->maps[LED_SCROLL-1].mods.mask= Mod3Mask;
+ map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask;
+ }
+
+ sli= XkbFindSrvLedInfo(xkbi->device,XkbDfltXIClass,XkbDfltXIId,0);
+ if (sli)
+ XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask);
+
+ return Success;
+}
+
+static Status
+XkbInitControls(DeviceIntPtr pXDev,XkbSrvInfoPtr xkbi)
+{
+XkbDescPtr xkb;
+XkbControlsPtr ctrls;
+
+ xkb= xkbi->desc;
+ /* 12/31/94 (ef) -- XXX! Should check if controls loaded from file */
+ if (XkbAllocControls(xkb,XkbAllControlsMask)!=Success)
+ FatalError("Couldn't allocate keyboard controls\n");
+ ctrls= xkb->ctrls;
+ if (!(xkb->defined & XkmSymbolsMask))
+ ctrls->num_groups = 1;
+ ctrls->groups_wrap = XkbSetGroupInfo(1,XkbWrapIntoRange,0);
+ ctrls->internal.mask = 0;
+ ctrls->internal.real_mods = 0;
+ ctrls->internal.vmods = 0;
+ ctrls->ignore_lock.mask = 0;
+ ctrls->ignore_lock.real_mods = 0;
+ ctrls->ignore_lock.vmods = 0;
+ ctrls->enabled_ctrls = XkbAccessXTimeoutMask|XkbRepeatKeysMask|
+ XkbMouseKeysAccelMask|XkbAudibleBellMask|
+ XkbIgnoreGroupLockMask;
+ if (XkbWantAccessX)
+ ctrls->enabled_ctrls|= XkbAccessXKeysMask;
+ AccessXInit(pXDev);
+ return Success;
+}
+
+_X_EXPORT Bool
+InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
+ BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
+{
+ int i;
+ unsigned int check;
+ XkbSrvInfoPtr xkbi;
+ XkbDescPtr xkb;
+ XkbSrvLedInfoPtr sli;
+ XkbChangesRec changes;
+ XkbEventCauseRec cause;
+ XkbRMLVOSet rmlvo_dflts = { NULL };
+
+ if (dev->key || dev->kbdfeed)
+ return FALSE;
+
+ if (!rmlvo)
+ {
+ rmlvo = &rmlvo_dflts;
+ XkbGetRulesDflts(rmlvo);
+ }
+
+
+ memset(&changes, 0, sizeof(changes));
+ XkbSetCauseUnknown(&cause);
+
+ dev->key = calloc(1, sizeof(*dev->key));
+ if (!dev->key) {
+ ErrorF("XKB: Failed to allocate key class\n");
+ return FALSE;
+ }
+ dev->key->sourceid = dev->id;
+
+ dev->kbdfeed = calloc(1, sizeof(*dev->kbdfeed));
+ if (!dev->kbdfeed) {
+ ErrorF("XKB: Failed to allocate key feedback class\n");
+ goto unwind_key;
+ }
+
+ xkbi = calloc(1, sizeof(*xkbi));
+ if (!xkbi) {
+ ErrorF("XKB: Failed to allocate XKB info\n");
+ goto unwind_kbdfeed;
+ }
+ dev->key->xkbInfo = xkbi;
+
+ if (xkb_cached_map && !XkbCompareUsedRMLVO(rmlvo)) {
+ XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, TRUE);
+ xkb_cached_map = NULL;
+ }
+
+ if (xkb_cached_map)
+ LogMessageVerb(X_INFO, 4, "XKB: Reusing cached keymap\n");
+ else {
+ xkb_cached_map = XkbCompileKeymap(dev, rmlvo);
+ if (!xkb_cached_map) {
+ ErrorF("XKB: Failed to compile keymap\n");
+ goto unwind_info;
+ }
+ }
+
+ xkb = XkbAllocKeyboard();
+ if (!xkb) {
+ ErrorF("XKB: Failed to allocate keyboard description\n");
+ goto unwind_info;
+ }
+
+ if (!XkbCopyKeymap(xkb, xkb_cached_map)) {
+ ErrorF("XKB: Failed to copy keymap\n");
+ goto unwind_desc;
+ }
+ xkb->defined = xkb_cached_map->defined;
+ xkb->flags = xkb_cached_map->flags;
+ xkb->device_spec = xkb_cached_map->device_spec;
+ xkbi->desc = xkb;
+
+ if (xkb->min_key_code == 0)
+ xkb->min_key_code = 8;
+ if (xkb->max_key_code == 0)
+ xkb->max_key_code = 255;
+
+ i = XkbNumKeys(xkb) / 3 + 1;
+ if (XkbAllocClientMap(xkb, XkbAllClientInfoMask, 0) != Success)
+ goto unwind_desc;
+ if (XkbAllocServerMap(xkb, XkbAllServerInfoMask, i) != Success)
+ goto unwind_desc;
+
+ xkbi->dfltPtrDelta = 1;
+ xkbi->device = dev;
+
+ XkbInitSemantics(xkb);
+ XkbInitNames(xkbi);
+ XkbInitRadioGroups(xkbi);
+
+ XkbInitControls(dev, xkbi);
+
+ XkbInitIndicatorMap(xkbi);
+
+ XkbUpdateActions(dev, xkb->min_key_code, XkbNumKeys(xkb), &changes,
+ &check, &cause);
+
+ InitFocusClassDeviceStruct(dev);
+
+ xkbi->kbdProc = ctrl_func;
+ dev->kbdfeed->BellProc = bell_func;
+ dev->kbdfeed->CtrlProc = XkbDDXKeybdCtrlProc;
+
+ dev->kbdfeed->ctrl = defaultKeyboardControl;
+ if (dev->kbdfeed->ctrl.autoRepeat)
+ xkb->ctrls->enabled_ctrls |= XkbRepeatKeysMask;
+
+ memcpy(dev->kbdfeed->ctrl.autoRepeats, xkb->ctrls->per_key_repeat,
+ XkbPerKeyBitArraySize);
+
+ sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0);
+ if (sli)
+ XkbCheckIndicatorMaps(dev, sli, XkbAllIndicatorsMask);
+ else
+ DebugF("XKB: No indicator feedback in XkbFinishInit!\n");
+
+ dev->kbdfeed->CtrlProc(dev,&dev->kbdfeed->ctrl);
+
+ XkbSetRulesDflts(rmlvo);
+ XkbSetRulesUsed(rmlvo);
+ XkbFreeRMLVOSet(&rmlvo_dflts, FALSE);
+
+ return TRUE;
+
+unwind_desc:
+ XkbFreeKeyboard(xkb, 0, TRUE);
+unwind_info:
+ free(xkbi);
+ dev->key->xkbInfo = NULL;
+unwind_kbdfeed:
+ free(dev->kbdfeed);
+ dev->kbdfeed = NULL;
+unwind_key:
+ free(dev->key);
+ dev->key = NULL;
+ return FALSE;
+}
+
+
+/***====================================================================***/
+
+ /*
+ * Be very careful about what does and doesn't get freed by this
+ * function. To reduce fragmentation, XkbInitDevice allocates a
+ * single huge block per device and divides it up into most of the
+ * fixed-size structures for the device. Don't free anything that
+ * is part of this larger block.
+ */
+void
+XkbFreeInfo(XkbSrvInfoPtr xkbi)
+{
+ free(xkbi->radioGroups);
+ xkbi->radioGroups = NULL;
+ if (xkbi->mouseKeyTimer) {
+ TimerFree(xkbi->mouseKeyTimer);
+ xkbi->mouseKeyTimer= NULL;
+ }
+ if (xkbi->slowKeysTimer) {
+ TimerFree(xkbi->slowKeysTimer);
+ xkbi->slowKeysTimer= NULL;
+ }
+ if (xkbi->bounceKeysTimer) {
+ TimerFree(xkbi->bounceKeysTimer);
+ xkbi->bounceKeysTimer= NULL;
+ }
+ if (xkbi->repeatKeyTimer) {
+ TimerFree(xkbi->repeatKeyTimer);
+ xkbi->repeatKeyTimer= NULL;
+ }
+ if (xkbi->krgTimer) {
+ TimerFree(xkbi->krgTimer);
+ xkbi->krgTimer= NULL;
+ }
+ xkbi->beepType= _BEEP_NONE;
+ if (xkbi->beepTimer) {
+ TimerFree(xkbi->beepTimer);
+ xkbi->beepTimer= NULL;
+ }
+ if (xkbi->desc) {
+ XkbFreeKeyboard(xkbi->desc,XkbAllComponentsMask,TRUE);
+ xkbi->desc= NULL;
+ }
+ free(xkbi);
+ return;
+}
+
+/***====================================================================***/
+
+extern int XkbDfltRepeatDelay;
+extern int XkbDfltRepeatInterval;
+
+extern unsigned short XkbDfltAccessXTimeout;
+extern unsigned int XkbDfltAccessXTimeoutMask;
+extern unsigned int XkbDfltAccessXFeedback;
+extern unsigned short XkbDfltAccessXOptions;
+
+int
+XkbProcessArguments(int argc,char *argv[],int i)
+{
+ if (strncmp(argv[i], "-xkbdir", 7) == 0) {
+ if(++i < argc) {
+#if !defined(WIN32) && !defined(__CYGWIN__)
+ if (getuid() != geteuid()) {
+ LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n");
+ return -1;
+ } else
+#endif
+ {
+ if (strlen(argv[i]) < PATH_MAX) {
+ XkbBaseDirectory= argv[i];
+ return 2;
+ } else {
+ LogMessage(X_ERROR, "-xkbdir pathname too long\n");
+ return -1;
+ }
+ }
+ }
+ else {
+ return -1;
+ }
+ }
+ else if ((strncmp(argv[i],"-accessx",8)==0)||
+ (strncmp(argv[i],"+accessx",8)==0)) {
+ int j=1;
+ if (argv[i][0]=='-')
+ XkbWantAccessX= 0;
+ else {
+ XkbWantAccessX= 1;
+
+ if ( ((i+1)<argc) && (isdigit(argv[i+1][0])) ) {
+ XkbDfltAccessXTimeout = atoi(argv[++i]);
+ j++;
+
+ if ( ((i+1)<argc) && (isdigit(argv[i+1][0])) ) {
+ /*
+ * presumption that the reasonably useful range of
+ * values fits in 0..MAXINT since SunOS 4 doesn't
+ * have strtoul.
+ */
+ XkbDfltAccessXTimeoutMask=(unsigned int)
+ strtol(argv[++i],NULL,16);
+ j++;
+ }
+ if ( ((i+1)<argc) && (isdigit(argv[i+1][0])) ) {
+ if (argv[++i][0] == '1' )
+ XkbDfltAccessXFeedback=XkbAccessXFeedbackMask;
+ else
+ XkbDfltAccessXFeedback=0;
+ j++;
+ }
+ if ( ((i+1)<argc) && (isdigit(argv[i+1][0])) ) {
+ XkbDfltAccessXOptions=(unsigned short)
+ strtol(argv[++i],NULL,16);
+ j++;
+ }
+ }
+ }
+ return j;
+ }
+ if ((strcmp(argv[i], "-ardelay") == 0) ||
+ (strcmp (argv[i], "-ar1") == 0)) { /* -ardelay int */
+ if (++i >= argc) UseMsg ();
+ XkbDfltRepeatDelay = (long)atoi(argv[i]);
+ return 2;
+ }
+ if ((strcmp(argv[i], "-arinterval") == 0) ||
+ (strcmp (argv[i], "-ar2") == 0)) { /* -arinterval int */
+ if (++i >= argc) UseMsg ();
+ XkbDfltRepeatInterval = (long)atoi(argv[i]);
+ return 2;
+ }
+ return 0;
+}
+
+void
+XkbUseMsg(void)
+{
+ ErrorF("[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]\n");
+ ErrorF(" enable/disable accessx key sequences\n");
+ ErrorF("-ardelay set XKB autorepeat delay\n");
+ ErrorF("-arinterval set XKB autorepeat interval\n");
+}
diff --git a/xorg-server/xkb/xkbfmisc.c b/xorg-server/xkb/xkbfmisc.c
index dea347335..42b73012c 100644
--- a/xorg-server/xkb/xkbfmisc.c
+++ b/xorg-server/xkb/xkbfmisc.c
@@ -1,441 +1,441 @@
-/************************************************************
- Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc.
-
- Permission to use, copy, modify, and distribute this
- software and its documentation for any purpose and without
- fee is hereby granted, provided that the above copyright
- notice appear in all copies and that both that copyright
- notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
- of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
- of this software for any purpose. It is provided "as is"
- without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
- THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
- ********************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-#include <X11/Xos.h>
-#include <X11/Xfuncs.h>
-#include <X11/extensions/XKMformat.h>
-
-#include <X11/X.h>
-#include <X11/keysym.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "inputstr.h"
-#include "dix.h"
-#include "xkbstr.h"
-#define XKBSRV_NEED_FILE_FUNCS 1
-#include <xkbsrv.h>
-#include "xkbgeom.h"
-#include "xkb.h"
-
-unsigned
-_XkbKSCheckCase(KeySym ks)
-{
-unsigned set,rtrn;
-
- set= (ks & (~0xff)) >> 8;
- rtrn= 0;
- switch (set) {
- case 0: /* latin 1 */
- if (((ks>=XK_A)&&(ks<=XK_Z))||
- ((ks>=XK_Agrave)&&(ks<=XK_THORN)&&(ks!=XK_multiply))) {
- rtrn|= _XkbKSUpper;
- }
- if (((ks>=XK_a)&&(ks<=XK_z))||
- ((ks>=XK_agrave)&&(ks<=XK_ydiaeresis))) {
- rtrn|= _XkbKSLower;
- }
- break;
- case 1: /* latin 2 */
- if (((ks>=XK_Aogonek)&&(ks<=XK_Zabovedot)&&(ks!=XK_breve))||
- ((ks>=XK_Racute)&&(ks<=XK_Tcedilla))) {
- rtrn|= _XkbKSUpper;
- }
- if (((ks>=XK_aogonek)&&(ks<=XK_zabovedot)&&(ks!=XK_caron))||
- ((ks>=XK_racute)&&(ks<=XK_tcedilla))) {
- rtrn|= _XkbKSLower;
- }
- break;
- case 2: /* latin 3 */
- if (((ks>=XK_Hstroke)&&(ks<=XK_Jcircumflex))||
- ((ks>=XK_Cabovedot)&&(ks<=XK_Scircumflex))) {
- rtrn|= _XkbKSUpper;
- }
- if (((ks>=XK_hstroke)&&(ks<=XK_jcircumflex))||
- ((ks>=XK_cabovedot)&&(ks<=XK_scircumflex))) {
- rtrn|= _XkbKSLower;
- }
- break;
- case 3: /* latin 4 */
- if (((ks>=XK_Rcedilla)&&(ks<=XK_Tslash))||
- (ks==XK_ENG)||
- ((ks>=XK_Amacron)&&(ks<=XK_Umacron))) {
- rtrn|= _XkbKSUpper;
- }
- if (((ks>=XK_rcedilla)&&(ks<=XK_tslash))||
- (ks==XK_eng)||
- ((ks>=XK_amacron)&&(ks<=XK_umacron))) {
- rtrn|= _XkbKSLower;
- }
- break;
- case 18: /* latin 8 */
- if ((ks==XK_Babovedot)||
- ((ks>=XK_Dabovedot)&&(ks<=XK_Wacute))||
- ((ks>=XK_Ygrave)&&(ks<=XK_Fabovedot))||
- (ks==XK_Mabovedot)||
- (ks==XK_Pabovedot)||
- (ks==XK_Sabovedot)||
- (ks==XK_Wdiaeresis)||
- ((ks>=XK_Wcircumflex)&&(ks<=XK_Ycircumflex))) {
- rtrn|= _XkbKSUpper;
- }
- if ((ks==XK_babovedot)||
- (ks==XK_dabovedot)||
- (ks==XK_fabovedot)||
- (ks==XK_mabovedot)||
- ((ks>=XK_wgrave)&&(ks<=XK_wacute))||
- (ks==XK_ygrave)||
- ((ks>=XK_wdiaeresis)&&(ks<=XK_ycircumflex))) {
- rtrn|= _XkbKSLower;
- }
- break;
- case 19: /* latin 9 */
- if ((ks==XK_OE)||(ks==XK_Ydiaeresis)) {
- rtrn|= _XkbKSUpper;
- }
- if (ks==XK_oe) {
- rtrn|= _XkbKSLower;
- }
- break;
- }
- return rtrn;
-}
-
-/***===================================================================***/
-
-static Bool
-XkbWriteSectionFromName(FILE *file,char *sectionName,char *name)
-{
- fprintf(file," xkb_%-20s { include \"%s\" };\n",sectionName,name);
- return TRUE;
-}
-
-#define NEED_DESC(n) ((!n)||((n)[0]=='+')||((n)[0]=='|')||(strchr((n),'%')))
-#define COMPLETE(n) ((n)&&(!NEED_DESC(n)))
-
-/* ARGSUSED */
-static void
-_AddIncl( FILE * file,
- XkbDescPtr xkb,
- Bool topLevel,
- Bool showImplicit,
- int index,
- void * priv)
-{
- if ((priv)&&(strcmp((char *)priv,"%")!=0))
- fprintf(file," include \"%s\"\n",(char *)priv);
- return;
-}
-
-Bool
-XkbWriteXKBKeymapForNames( FILE * file,
- XkbComponentNamesPtr names,
- XkbDescPtr xkb,
- unsigned want,
- unsigned need)
-{
-const char * tmp;
-unsigned complete;
-XkbNamesPtr old_names;
-int multi_section;
-unsigned wantNames,wantConfig,wantDflts;
-
- complete= 0;
- if (COMPLETE(names->keycodes)) complete|= XkmKeyNamesMask;
- if (COMPLETE(names->types)) complete|= XkmTypesMask;
- if (COMPLETE(names->compat)) complete|= XkmCompatMapMask;
- if (COMPLETE(names->symbols)) complete|= XkmSymbolsMask;
- if (COMPLETE(names->geometry)) complete|= XkmGeometryMask;
- want|= (complete|need);
- if (want&XkmSymbolsMask)
- want|= XkmKeyNamesMask|XkmTypesMask;
-
- if (want==0)
- return FALSE;
-
- if (xkb) {
- old_names = xkb->names;
-
- xkb->defined = 0;
- /* Wow would it ever be neat if we didn't need this noise. */
- if (xkb->names && xkb->names->keys)
- xkb->defined |= XkmKeyNamesMask;
- if (xkb->map && xkb->map->types)
- xkb->defined |= XkmTypesMask;
- if (xkb->compat)
- xkb->defined |= XkmCompatMapMask;
- if (xkb->map && xkb->map->num_syms)
- xkb->defined |= XkmSymbolsMask;
- if (xkb->indicators)
- xkb->defined |= XkmIndicatorsMask;
- if (xkb->geom)
- xkb->defined |= XkmGeometryMask;
- }
- else {
- old_names= NULL;
- }
-
- wantConfig= want&(~complete);
- if (xkb!=NULL) {
- if (wantConfig&XkmTypesMask) {
- if ((!xkb->map) || (xkb->map->num_types<XkbNumRequiredTypes))
- wantConfig&= ~XkmTypesMask;
- }
- if (wantConfig&XkmCompatMapMask) {
- if ((!xkb->compat) || (xkb->compat->num_si<1))
- wantConfig&= ~XkmCompatMapMask;
- }
- if (wantConfig&XkmSymbolsMask) {
- if ((!xkb->map) || (!xkb->map->key_sym_map))
- wantConfig&= ~XkmSymbolsMask;
- }
- if (wantConfig&XkmIndicatorsMask) {
- if (!xkb->indicators)
- wantConfig&= ~XkmIndicatorsMask;
- }
- if (wantConfig&XkmKeyNamesMask) {
- if ((!xkb->names)||(!xkb->names->keys))
- wantConfig&= ~XkmKeyNamesMask;
- }
- if ((wantConfig&XkmGeometryMask)&&(!xkb->geom))
- wantConfig&= ~XkmGeometryMask;
- }
- else {
- wantConfig= 0;
- }
- complete|= wantConfig;
-
- wantDflts= 0;
- wantNames= want&(~complete);
- if ((xkb!=NULL) && (old_names!=NULL)) {
- if (wantNames&XkmTypesMask) {
- if (old_names->types!=None) {
- tmp= NameForAtom(old_names->types);
- names->types= Xstrdup(tmp);
- }
- else {
- wantDflts|= XkmTypesMask;
- }
- complete|= XkmTypesMask;
- }
- if (wantNames&XkmCompatMapMask) {
- if (old_names->compat!=None) {
- tmp= NameForAtom(old_names->compat);
- names->compat= Xstrdup(tmp);
- }
- else wantDflts|= XkmCompatMapMask;
- complete|= XkmCompatMapMask;
- }
- if (wantNames&XkmSymbolsMask) {
- if (old_names->symbols==None)
- return FALSE;
- tmp= NameForAtom(old_names->symbols);
- names->symbols= Xstrdup(tmp);
- complete|= XkmSymbolsMask;
- }
- if (wantNames&XkmKeyNamesMask) {
- if (old_names->keycodes!=None) {
- tmp= NameForAtom(old_names->keycodes);
- names->keycodes= Xstrdup(tmp);
- }
- else wantDflts|= XkmKeyNamesMask;
- complete|= XkmKeyNamesMask;
- }
- if (wantNames&XkmGeometryMask) {
- if (old_names->geometry==None)
- return FALSE;
- tmp= NameForAtom(old_names->geometry);
- names->geometry= Xstrdup(tmp);
- complete|= XkmGeometryMask;
- wantNames&= ~XkmGeometryMask;
- }
- }
- if (complete&XkmCompatMapMask)
- complete|= XkmIndicatorsMask|XkmVirtualModsMask;
- else if (complete&(XkmSymbolsMask|XkmTypesMask))
- complete|= XkmVirtualModsMask;
- if (need & (~complete))
- return FALSE;
- if ((complete&XkmSymbolsMask)&&((XkmKeyNamesMask|XkmTypesMask)&(~complete)))
- return FALSE;
-
- multi_section= 1;
- if (((complete&XkmKeymapRequired)==XkmKeymapRequired)&&
- ((complete&(~XkmKeymapLegal))==0)) {
- fprintf(file,"xkb_keymap \"default\" {\n");
- }
- else if (((complete&XkmSemanticsRequired)==XkmSemanticsRequired)&&
- ((complete&(~XkmSemanticsLegal))==0)) {
- fprintf(file,"xkb_semantics \"default\" {\n");
- }
- else if (((complete&XkmLayoutRequired)==XkmLayoutRequired)&&
- ((complete&(~XkmLayoutLegal))==0)) {
- fprintf(file,"xkb_layout \"default\" {\n");
- }
- else if (XkmSingleSection(complete&(~XkmVirtualModsMask))) {
- multi_section= 0;
- }
- else {
- return FALSE;
- }
-
- wantNames= complete&(~(wantConfig|wantDflts));
- if (wantConfig&XkmKeyNamesMask)
- XkbWriteXKBKeycodes(file,xkb,FALSE,FALSE,_AddIncl,names->keycodes);
- else if (wantDflts&XkmKeyNamesMask)
- fprintf(stderr,"Default symbols not implemented yet!\n");
- else if (wantNames&XkmKeyNamesMask)
- XkbWriteSectionFromName(file,"keycodes",names->keycodes);
-
- if (wantConfig&XkmTypesMask)
- XkbWriteXKBKeyTypes(file,xkb,FALSE,FALSE,_AddIncl,names->types);
- else if (wantDflts&XkmTypesMask)
- fprintf(stderr,"Default types not implemented yet!\n");
- else if (wantNames&XkmTypesMask)
- XkbWriteSectionFromName(file,"types",names->types);
-
- if (wantConfig&XkmCompatMapMask)
- XkbWriteXKBCompatMap(file,xkb,FALSE,FALSE,_AddIncl,names->compat);
- else if (wantDflts&XkmCompatMapMask)
- fprintf(stderr,"Default interps not implemented yet!\n");
- else if (wantNames&XkmCompatMapMask)
- XkbWriteSectionFromName(file,"compatibility",names->compat);
-
- if (wantConfig&XkmSymbolsMask)
- XkbWriteXKBSymbols(file,xkb,FALSE,FALSE,_AddIncl,names->symbols);
- else if (wantNames&XkmSymbolsMask)
- XkbWriteSectionFromName(file,"symbols",names->symbols);
-
- if (wantConfig&XkmGeometryMask)
- XkbWriteXKBGeometry(file,xkb,FALSE,FALSE,_AddIncl,names->geometry);
- else if (wantNames&XkmGeometryMask)
- XkbWriteSectionFromName(file,"geometry",names->geometry);
-
- if (multi_section)
- fprintf(file,"};\n");
- return TRUE;
-}
-
-/***====================================================================***/
-
-int
-XkbFindKeycodeByName(XkbDescPtr xkb,char *name,Bool use_aliases)
-{
-register int i;
-
- if ((!xkb)||(!xkb->names)||(!xkb->names->keys))
- return 0;
- for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
- if (strncmp(xkb->names->keys[i].name,name,XkbKeyNameLength)==0)
- return i;
- }
- if (!use_aliases)
- return 0;
- if (xkb->geom && xkb->geom->key_aliases) {
- XkbKeyAliasPtr a;
- a= xkb->geom->key_aliases;
- for (i=0;i<xkb->geom->num_key_aliases;i++,a++) {
- if (strncmp(name,a->alias,XkbKeyNameLength)==0)
- return XkbFindKeycodeByName(xkb,a->real,FALSE);
- }
- }
- if (xkb->names && xkb->names->key_aliases) {
- XkbKeyAliasPtr a;
- a= xkb->names->key_aliases;
- for (i=0;i<xkb->names->num_key_aliases;i++,a++) {
- if (strncmp(name,a->alias,XkbKeyNameLength)==0)
- return XkbFindKeycodeByName(xkb,a->real,FALSE);
- }
- }
- return 0;
-}
-
-
-unsigned
-XkbConvertGetByNameComponents(Bool toXkm,unsigned orig)
-{
-unsigned rtrn;
-
- rtrn= 0;
- if (toXkm) {
- if (orig&XkbGBN_TypesMask) rtrn|= XkmTypesMask;
- if (orig&XkbGBN_CompatMapMask) rtrn|= XkmCompatMapMask;
- if (orig&XkbGBN_SymbolsMask) rtrn|= XkmSymbolsMask;
- if (orig&XkbGBN_IndicatorMapMask) rtrn|= XkmIndicatorsMask;
- if (orig&XkbGBN_KeyNamesMask) rtrn|= XkmKeyNamesMask;
- if (orig&XkbGBN_GeometryMask) rtrn|= XkmGeometryMask;
- }
- else {
- if (orig&XkmTypesMask) rtrn|= XkbGBN_TypesMask;
- if (orig&XkmCompatMapMask) rtrn|= XkbGBN_CompatMapMask;
- if (orig&XkmSymbolsMask) rtrn|= XkbGBN_SymbolsMask;
- if (orig&XkmIndicatorsMask) rtrn|= XkbGBN_IndicatorMapMask;
- if (orig&XkmKeyNamesMask) rtrn|= XkbGBN_KeyNamesMask;
- if (orig&XkmGeometryMask) rtrn|= XkbGBN_GeometryMask;
- if (orig!=0) rtrn|= XkbGBN_OtherNamesMask;
- }
- return rtrn;
-}
-
-/***====================================================================***/
-
-#define UNMATCHABLE(c) (((c)=='(')||((c)==')')||((c)=='/'))
-
-Bool
-XkbNameMatchesPattern(char *name,char *ptrn)
-{
- while (ptrn[0]!='\0') {
- if (name[0]=='\0') {
- if (ptrn[0]=='*') {
- ptrn++;
- continue;
- }
- return FALSE;
- }
- if (ptrn[0]=='?') {
- if (UNMATCHABLE(name[0]))
- return FALSE;
- }
- else if (ptrn[0]=='*') {
- if ((!UNMATCHABLE(name[0]))&&XkbNameMatchesPattern(name+1,ptrn))
- return TRUE;
- return XkbNameMatchesPattern(name,ptrn+1);
- }
- else if (ptrn[0]!=name[0])
- return FALSE;
- name++;
- ptrn++;
- }
- /* if we get here, the pattern is exhausted (-:just like me:-) */
- return name[0]=='\0';
-}
+/************************************************************
+ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+#include <X11/Xos.h>
+#include <X11/Xfuncs.h>
+#include <X11/extensions/XKMformat.h>
+
+#include <X11/X.h>
+#include <X11/keysym.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "inputstr.h"
+#include "dix.h"
+#include "xkbstr.h"
+#define XKBSRV_NEED_FILE_FUNCS 1
+#include <xkbsrv.h>
+#include "xkbgeom.h"
+#include "xkb.h"
+
+unsigned
+_XkbKSCheckCase(KeySym ks)
+{
+unsigned set,rtrn;
+
+ set= (ks & (~0xff)) >> 8;
+ rtrn= 0;
+ switch (set) {
+ case 0: /* latin 1 */
+ if (((ks>=XK_A)&&(ks<=XK_Z))||
+ ((ks>=XK_Agrave)&&(ks<=XK_THORN)&&(ks!=XK_multiply))) {
+ rtrn|= _XkbKSUpper;
+ }
+ if (((ks>=XK_a)&&(ks<=XK_z))||
+ ((ks>=XK_agrave)&&(ks<=XK_ydiaeresis))) {
+ rtrn|= _XkbKSLower;
+ }
+ break;
+ case 1: /* latin 2 */
+ if (((ks>=XK_Aogonek)&&(ks<=XK_Zabovedot)&&(ks!=XK_breve))||
+ ((ks>=XK_Racute)&&(ks<=XK_Tcedilla))) {
+ rtrn|= _XkbKSUpper;
+ }
+ if (((ks>=XK_aogonek)&&(ks<=XK_zabovedot)&&(ks!=XK_caron))||
+ ((ks>=XK_racute)&&(ks<=XK_tcedilla))) {
+ rtrn|= _XkbKSLower;
+ }
+ break;
+ case 2: /* latin 3 */
+ if (((ks>=XK_Hstroke)&&(ks<=XK_Jcircumflex))||
+ ((ks>=XK_Cabovedot)&&(ks<=XK_Scircumflex))) {
+ rtrn|= _XkbKSUpper;
+ }
+ if (((ks>=XK_hstroke)&&(ks<=XK_jcircumflex))||
+ ((ks>=XK_cabovedot)&&(ks<=XK_scircumflex))) {
+ rtrn|= _XkbKSLower;
+ }
+ break;
+ case 3: /* latin 4 */
+ if (((ks>=XK_Rcedilla)&&(ks<=XK_Tslash))||
+ (ks==XK_ENG)||
+ ((ks>=XK_Amacron)&&(ks<=XK_Umacron))) {
+ rtrn|= _XkbKSUpper;
+ }
+ if (((ks>=XK_rcedilla)&&(ks<=XK_tslash))||
+ (ks==XK_eng)||
+ ((ks>=XK_amacron)&&(ks<=XK_umacron))) {
+ rtrn|= _XkbKSLower;
+ }
+ break;
+ case 18: /* latin 8 */
+ if ((ks==XK_Babovedot)||
+ ((ks>=XK_Dabovedot)&&(ks<=XK_Wacute))||
+ ((ks>=XK_Ygrave)&&(ks<=XK_Fabovedot))||
+ (ks==XK_Mabovedot)||
+ (ks==XK_Pabovedot)||
+ (ks==XK_Sabovedot)||
+ (ks==XK_Wdiaeresis)||
+ ((ks>=XK_Wcircumflex)&&(ks<=XK_Ycircumflex))) {
+ rtrn|= _XkbKSUpper;
+ }
+ if ((ks==XK_babovedot)||
+ (ks==XK_dabovedot)||
+ (ks==XK_fabovedot)||
+ (ks==XK_mabovedot)||
+ ((ks>=XK_wgrave)&&(ks<=XK_wacute))||
+ (ks==XK_ygrave)||
+ ((ks>=XK_wdiaeresis)&&(ks<=XK_ycircumflex))) {
+ rtrn|= _XkbKSLower;
+ }
+ break;
+ case 19: /* latin 9 */
+ if ((ks==XK_OE)||(ks==XK_Ydiaeresis)) {
+ rtrn|= _XkbKSUpper;
+ }
+ if (ks==XK_oe) {
+ rtrn|= _XkbKSLower;
+ }
+ break;
+ }
+ return rtrn;
+}
+
+/***===================================================================***/
+
+static Bool
+XkbWriteSectionFromName(FILE *file,char *sectionName,char *name)
+{
+ fprintf(file," xkb_%-20s { include \"%s\" };\n",sectionName,name);
+ return TRUE;
+}
+
+#define NEED_DESC(n) ((!n)||((n)[0]=='+')||((n)[0]=='|')||(strchr((n),'%')))
+#define COMPLETE(n) ((n)&&(!NEED_DESC(n)))
+
+/* ARGSUSED */
+static void
+_AddIncl( FILE * file,
+ XkbDescPtr xkb,
+ Bool topLevel,
+ Bool showImplicit,
+ int index,
+ void * priv)
+{
+ if ((priv)&&(strcmp((char *)priv,"%")!=0))
+ fprintf(file," include \"%s\"\n",(char *)priv);
+ return;
+}
+
+Bool
+XkbWriteXKBKeymapForNames( FILE * file,
+ XkbComponentNamesPtr names,
+ XkbDescPtr xkb,
+ unsigned want,
+ unsigned need)
+{
+const char * tmp;
+unsigned complete;
+XkbNamesPtr old_names;
+int multi_section;
+unsigned wantNames,wantConfig,wantDflts;
+
+ complete= 0;
+ if (COMPLETE(names->keycodes)) complete|= XkmKeyNamesMask;
+ if (COMPLETE(names->types)) complete|= XkmTypesMask;
+ if (COMPLETE(names->compat)) complete|= XkmCompatMapMask;
+ if (COMPLETE(names->symbols)) complete|= XkmSymbolsMask;
+ if (COMPLETE(names->geometry)) complete|= XkmGeometryMask;
+ want|= (complete|need);
+ if (want&XkmSymbolsMask)
+ want|= XkmKeyNamesMask|XkmTypesMask;
+
+ if (want==0)
+ return FALSE;
+
+ if (xkb) {
+ old_names = xkb->names;
+
+ xkb->defined = 0;
+ /* Wow would it ever be neat if we didn't need this noise. */
+ if (xkb->names && xkb->names->keys)
+ xkb->defined |= XkmKeyNamesMask;
+ if (xkb->map && xkb->map->types)
+ xkb->defined |= XkmTypesMask;
+ if (xkb->compat)
+ xkb->defined |= XkmCompatMapMask;
+ if (xkb->map && xkb->map->num_syms)
+ xkb->defined |= XkmSymbolsMask;
+ if (xkb->indicators)
+ xkb->defined |= XkmIndicatorsMask;
+ if (xkb->geom)
+ xkb->defined |= XkmGeometryMask;
+ }
+ else {
+ old_names= NULL;
+ }
+
+ wantConfig= want&(~complete);
+ if (xkb!=NULL) {
+ if (wantConfig&XkmTypesMask) {
+ if ((!xkb->map) || (xkb->map->num_types<XkbNumRequiredTypes))
+ wantConfig&= ~XkmTypesMask;
+ }
+ if (wantConfig&XkmCompatMapMask) {
+ if ((!xkb->compat) || (xkb->compat->num_si<1))
+ wantConfig&= ~XkmCompatMapMask;
+ }
+ if (wantConfig&XkmSymbolsMask) {
+ if ((!xkb->map) || (!xkb->map->key_sym_map))
+ wantConfig&= ~XkmSymbolsMask;
+ }
+ if (wantConfig&XkmIndicatorsMask) {
+ if (!xkb->indicators)
+ wantConfig&= ~XkmIndicatorsMask;
+ }
+ if (wantConfig&XkmKeyNamesMask) {
+ if ((!xkb->names)||(!xkb->names->keys))
+ wantConfig&= ~XkmKeyNamesMask;
+ }
+ if ((wantConfig&XkmGeometryMask)&&(!xkb->geom))
+ wantConfig&= ~XkmGeometryMask;
+ }
+ else {
+ wantConfig= 0;
+ }
+ complete|= wantConfig;
+
+ wantDflts= 0;
+ wantNames= want&(~complete);
+ if ((xkb!=NULL) && (old_names!=NULL)) {
+ if (wantNames&XkmTypesMask) {
+ if (old_names->types!=None) {
+ tmp= NameForAtom(old_names->types);
+ names->types= Xstrdup(tmp);
+ }
+ else {
+ wantDflts|= XkmTypesMask;
+ }
+ complete|= XkmTypesMask;
+ }
+ if (wantNames&XkmCompatMapMask) {
+ if (old_names->compat!=None) {
+ tmp= NameForAtom(old_names->compat);
+ names->compat= Xstrdup(tmp);
+ }
+ else wantDflts|= XkmCompatMapMask;
+ complete|= XkmCompatMapMask;
+ }
+ if (wantNames&XkmSymbolsMask) {
+ if (old_names->symbols==None)
+ return FALSE;
+ tmp= NameForAtom(old_names->symbols);
+ names->symbols= Xstrdup(tmp);
+ complete|= XkmSymbolsMask;
+ }
+ if (wantNames&XkmKeyNamesMask) {
+ if (old_names->keycodes!=None) {
+ tmp= NameForAtom(old_names->keycodes);
+ names->keycodes= Xstrdup(tmp);
+ }
+ else wantDflts|= XkmKeyNamesMask;
+ complete|= XkmKeyNamesMask;
+ }
+ if (wantNames&XkmGeometryMask) {
+ if (old_names->geometry==None)
+ return FALSE;
+ tmp= NameForAtom(old_names->geometry);
+ names->geometry= Xstrdup(tmp);
+ complete|= XkmGeometryMask;
+ wantNames&= ~XkmGeometryMask;
+ }
+ }
+ if (complete&XkmCompatMapMask)
+ complete|= XkmIndicatorsMask|XkmVirtualModsMask;
+ else if (complete&(XkmSymbolsMask|XkmTypesMask))
+ complete|= XkmVirtualModsMask;
+ if (need & (~complete))
+ return FALSE;
+ if ((complete&XkmSymbolsMask)&&((XkmKeyNamesMask|XkmTypesMask)&(~complete)))
+ return FALSE;
+
+ multi_section= 1;
+ if (((complete&XkmKeymapRequired)==XkmKeymapRequired)&&
+ ((complete&(~XkmKeymapLegal))==0)) {
+ fprintf(file,"xkb_keymap \"default\" {\n");
+ }
+ else if (((complete&XkmSemanticsRequired)==XkmSemanticsRequired)&&
+ ((complete&(~XkmSemanticsLegal))==0)) {
+ fprintf(file,"xkb_semantics \"default\" {\n");
+ }
+ else if (((complete&XkmLayoutRequired)==XkmLayoutRequired)&&
+ ((complete&(~XkmLayoutLegal))==0)) {
+ fprintf(file,"xkb_layout \"default\" {\n");
+ }
+ else if (XkmSingleSection(complete&(~XkmVirtualModsMask))) {
+ multi_section= 0;
+ }
+ else {
+ return FALSE;
+ }
+
+ wantNames= complete&(~(wantConfig|wantDflts));
+ if (wantConfig&XkmKeyNamesMask)
+ XkbWriteXKBKeycodes(file,xkb,FALSE,FALSE,_AddIncl,names->keycodes);
+ else if (wantDflts&XkmKeyNamesMask)
+ fprintf(stderr,"Default symbols not implemented yet!\n");
+ else if (wantNames&XkmKeyNamesMask)
+ XkbWriteSectionFromName(file,"keycodes",names->keycodes);
+
+ if (wantConfig&XkmTypesMask)
+ XkbWriteXKBKeyTypes(file,xkb,FALSE,FALSE,_AddIncl,names->types);
+ else if (wantDflts&XkmTypesMask)
+ fprintf(stderr,"Default types not implemented yet!\n");
+ else if (wantNames&XkmTypesMask)
+ XkbWriteSectionFromName(file,"types",names->types);
+
+ if (wantConfig&XkmCompatMapMask)
+ XkbWriteXKBCompatMap(file,xkb,FALSE,FALSE,_AddIncl,names->compat);
+ else if (wantDflts&XkmCompatMapMask)
+ fprintf(stderr,"Default interps not implemented yet!\n");
+ else if (wantNames&XkmCompatMapMask)
+ XkbWriteSectionFromName(file,"compatibility",names->compat);
+
+ if (wantConfig&XkmSymbolsMask)
+ XkbWriteXKBSymbols(file,xkb,FALSE,FALSE,_AddIncl,names->symbols);
+ else if (wantNames&XkmSymbolsMask)
+ XkbWriteSectionFromName(file,"symbols",names->symbols);
+
+ if (wantConfig&XkmGeometryMask)
+ XkbWriteXKBGeometry(file,xkb,FALSE,FALSE,_AddIncl,names->geometry);
+ else if (wantNames&XkmGeometryMask)
+ XkbWriteSectionFromName(file,"geometry",names->geometry);
+
+ if (multi_section)
+ fprintf(file,"};\n");
+ return TRUE;
+}
+
+/***====================================================================***/
+
+int
+XkbFindKeycodeByName(XkbDescPtr xkb,char *name,Bool use_aliases)
+{
+register int i;
+
+ if ((!xkb)||(!xkb->names)||(!xkb->names->keys))
+ return 0;
+ for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
+ if (strncmp(xkb->names->keys[i].name,name,XkbKeyNameLength)==0)
+ return i;
+ }
+ if (!use_aliases)
+ return 0;
+ if (xkb->geom && xkb->geom->key_aliases) {
+ XkbKeyAliasPtr a;
+ a= xkb->geom->key_aliases;
+ for (i=0;i<xkb->geom->num_key_aliases;i++,a++) {
+ if (strncmp(name,a->alias,XkbKeyNameLength)==0)
+ return XkbFindKeycodeByName(xkb,a->real,FALSE);
+ }
+ }
+ if (xkb->names && xkb->names->key_aliases) {
+ XkbKeyAliasPtr a;
+ a= xkb->names->key_aliases;
+ for (i=0;i<xkb->names->num_key_aliases;i++,a++) {
+ if (strncmp(name,a->alias,XkbKeyNameLength)==0)
+ return XkbFindKeycodeByName(xkb,a->real,FALSE);
+ }
+ }
+ return 0;
+}
+
+
+unsigned
+XkbConvertGetByNameComponents(Bool toXkm,unsigned orig)
+{
+unsigned rtrn;
+
+ rtrn= 0;
+ if (toXkm) {
+ if (orig&XkbGBN_TypesMask) rtrn|= XkmTypesMask;
+ if (orig&XkbGBN_CompatMapMask) rtrn|= XkmCompatMapMask;
+ if (orig&XkbGBN_SymbolsMask) rtrn|= XkmSymbolsMask;
+ if (orig&XkbGBN_IndicatorMapMask) rtrn|= XkmIndicatorsMask;
+ if (orig&XkbGBN_KeyNamesMask) rtrn|= XkmKeyNamesMask;
+ if (orig&XkbGBN_GeometryMask) rtrn|= XkmGeometryMask;
+ }
+ else {
+ if (orig&XkmTypesMask) rtrn|= XkbGBN_TypesMask;
+ if (orig&XkmCompatMapMask) rtrn|= XkbGBN_CompatMapMask;
+ if (orig&XkmSymbolsMask) rtrn|= XkbGBN_SymbolsMask;
+ if (orig&XkmIndicatorsMask) rtrn|= XkbGBN_IndicatorMapMask;
+ if (orig&XkmKeyNamesMask) rtrn|= XkbGBN_KeyNamesMask;
+ if (orig&XkmGeometryMask) rtrn|= XkbGBN_GeometryMask;
+ if (orig!=0) rtrn|= XkbGBN_OtherNamesMask;
+ }
+ return rtrn;
+}
+
+/***====================================================================***/
+
+#define UNMATCHABLE(c) (((c)=='(')||((c)==')')||((c)=='/'))
+
+Bool
+XkbNameMatchesPattern(char *name,char *ptrn)
+{
+ while (ptrn[0]!='\0') {
+ if (name[0]=='\0') {
+ if (ptrn[0]=='*') {
+ ptrn++;
+ continue;
+ }
+ return FALSE;
+ }
+ if (ptrn[0]=='?') {
+ if (UNMATCHABLE(name[0]))
+ return FALSE;
+ }
+ else if (ptrn[0]=='*') {
+ if ((!UNMATCHABLE(name[0]))&&XkbNameMatchesPattern(name+1,ptrn))
+ return TRUE;
+ return XkbNameMatchesPattern(name,ptrn+1);
+ }
+ else if (ptrn[0]!=name[0])
+ return FALSE;
+ name++;
+ ptrn++;
+ }
+ /* if we get here, the pattern is exhausted (-:just like me:-) */
+ return name[0]=='\0';
+}
diff --git a/xorg-server/xkb/xkmread.c b/xorg-server/xkb/xkmread.c
index e8b97dcda..d6693ed84 100644
--- a/xorg-server/xkb/xkmread.c
+++ b/xorg-server/xkb/xkmread.c
@@ -1,1228 +1,1228 @@
-/************************************************************
- Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
-
- Permission to use, copy, modify, and distribute this
- software and its documentation for any purpose and without
- fee is hereby granted, provided that the above copyright
- notice appear in all copies and that both that copyright
- notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
- of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
- of this software for any purpose. It is provided "as is"
- without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
- THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
- ********************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-
-#include <X11/Xos.h>
-#include <X11/Xfuncs.h>
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/keysym.h>
-#include <X11/extensions/XKMformat.h>
-#include "misc.h"
-#include "inputstr.h"
-#include "xkbstr.h"
-#include "xkbsrv.h"
-#include "xkbgeom.h"
-
-Atom
-XkbInternAtom(char *str,Bool only_if_exists)
-{
- if (str==NULL)
- return None;
- return MakeAtom(str,strlen(str),!only_if_exists);
-}
-
-/***====================================================================***/
-
-static void *
-XkmInsureSize(void *oldPtr,int oldCount,int *newCountRtrn,int elemSize)
-{
-int newCount= *newCountRtrn;
-
- if (oldPtr==NULL) {
- if (newCount==0)
- return NULL;
- oldPtr= calloc(newCount,elemSize);
- }
- else if (oldCount<newCount) {
- oldPtr= realloc(oldPtr,newCount*elemSize);
- if (oldPtr!=NULL) {
- char *tmp= (char *)oldPtr;
- memset(&tmp[oldCount*elemSize], 0, (newCount-oldCount)*elemSize);
- }
- }
- else if (newCount<oldCount) {
- *newCountRtrn= oldCount;
- }
- return oldPtr;
-}
-
-#define XkmInsureTypedSize(p,o,n,t) ((p)=((t *)XkmInsureSize((char *)(p),(o),(n),sizeof(t))))
-
-static CARD8
-XkmGetCARD8(FILE *file,int *pNRead)
-{
-int tmp;
- tmp= getc(file);
- if (pNRead&&(tmp!=EOF))
- (*pNRead)+= 1;
- return tmp;
-}
-
-static CARD16
-XkmGetCARD16(FILE *file,int *pNRead)
-{
-CARD16 val;
-
- if ((fread(&val,2,1,file)==1)&&(pNRead))
- (*pNRead)+= 2;
- return val;
-}
-
-static CARD32
-XkmGetCARD32(FILE *file,int *pNRead)
-{
-CARD32 val;
-
- if ((fread(&val,4,1,file)==1)&&(pNRead))
- (*pNRead)+= 4;
- return val;
-}
-
-static int
-XkmSkipPadding(FILE *file,unsigned pad)
-{
-register int i,nRead=0;
-
- for (i=0;i<pad;i++) {
- if (getc(file)!=EOF)
- nRead++;
- }
- return nRead;
-}
-
-static int
-XkmGetCountedString(FILE *file,char *str,int max_len)
-{
-int count,nRead=0;
-
- count= XkmGetCARD16(file,&nRead);
- if (count>0) {
- int tmp;
- if (count>max_len) {
- tmp= fread(str,1,max_len,file);
- while (tmp<count) {
- if ((getc(file))!=EOF)
- tmp++;
- else break;
- }
- }
- else {
- tmp= fread(str,1,count,file);
- }
- nRead+= tmp;
- }
- if (count>=max_len) str[max_len-1]= '\0';
- else str[count]= '\0';
- count= XkbPaddedSize(nRead)-nRead;
- if (count>0)
- nRead+= XkmSkipPadding(file,count);
- return nRead;
-}
-
-/***====================================================================***/
-
-static int
-ReadXkmVirtualMods(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
-{
-register unsigned int i,bit;
-unsigned int bound,named,tmp;
-int nRead=0;
-
- if (XkbAllocServerMap(xkb,XkbVirtualModsMask,0)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmVirtualMods",0);
- return -1;
- }
- bound= XkmGetCARD16(file,&nRead);
- named= XkmGetCARD16(file,&nRead);
- for (i=tmp=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
- if (bound&bit) {
- xkb->server->vmods[i]= XkmGetCARD8(file,&nRead);
- if (changes)
- changes->map.vmods|= bit;
- tmp++;
- }
- }
- if ((i= XkbPaddedSize(tmp)-tmp)>0)
- nRead+= XkmSkipPadding(file,i);
- if (XkbAllocNames(xkb,XkbVirtualModNamesMask,0,0)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmVirtualMods",0);
- return -1;
- }
- for (i=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
- char name[100];
- if (named&bit) {
- if (nRead+=XkmGetCountedString(file,name,100)) {
- xkb->names->vmods[i]= XkbInternAtom(name,FALSE);
- if (changes)
- changes->names.changed_vmods|= bit;
- }
- }
- }
- return nRead;
-}
-
-/***====================================================================***/
-
-static int
-ReadXkmKeycodes(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
-{
-register int i;
-unsigned minKC,maxKC,nAl;
-int nRead=0;
-char name[100];
-XkbKeyNamePtr pN;
-
- name[0]= '\0';
- nRead+= XkmGetCountedString(file,name,100);
- minKC= XkmGetCARD8(file,&nRead);
- maxKC= XkmGetCARD8(file,&nRead);
- if (xkb->min_key_code==0) {
- xkb->min_key_code= minKC;
- xkb->max_key_code= maxKC;
- }
- else {
- if (minKC<xkb->min_key_code)
- xkb->min_key_code= minKC;
- if (maxKC>xkb->max_key_code) {
- _XkbLibError(_XkbErrBadValue,"ReadXkmKeycodes",maxKC);
- return -1;
- }
- }
- nAl= XkmGetCARD8(file,&nRead);
- nRead+= XkmSkipPadding(file,1);
-
-#define WANTED (XkbKeycodesNameMask|XkbKeyNamesMask|XkbKeyAliasesMask)
- if (XkbAllocNames(xkb,WANTED,0,nAl)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeycodes",0);
- return -1;
- }
- if (name[0]!='\0') {
- xkb->names->keycodes= XkbInternAtom(name,FALSE);
- }
-
- for (pN=&xkb->names->keys[minKC],i=minKC;i<=(int)maxKC;i++,pN++) {
- if (fread(pN,1,XkbKeyNameLength,file)!=XkbKeyNameLength) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmKeycodes",0);
- return -1;
- }
- nRead+= XkbKeyNameLength;
- }
- if (nAl>0) {
- XkbKeyAliasPtr pAl;
- for (pAl= xkb->names->key_aliases,i=0;i<nAl;i++,pAl++) {
- int tmp;
- tmp= fread(pAl,1,2*XkbKeyNameLength,file);
- if (tmp!=2*XkbKeyNameLength) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmKeycodes",0);
- return -1;
- }
- nRead+= 2*XkbKeyNameLength;
- }
- if (changes)
- changes->names.changed|= XkbKeyAliasesMask;
- }
- if (changes)
- changes->names.changed|= XkbKeyNamesMask;
- return nRead;
-}
-
-/***====================================================================***/
-
-static int
-ReadXkmKeyTypes(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
-{
-register unsigned i,n;
-unsigned num_types;
-int nRead=0;
-int tmp;
-XkbKeyTypePtr type;
-xkmKeyTypeDesc wire;
-XkbKTMapEntryPtr entry;
-xkmKTMapEntryDesc wire_entry;
-char buf[100];
-
- if ((tmp= XkmGetCountedString(file,buf,100))<1) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmKeyTypes",0);
- return -1;
- }
- nRead+= tmp;
- if (buf[0]!='\0') {
- if (XkbAllocNames(xkb,XkbTypesNameMask,0,0)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeyTypes",0);
- return -1;
- }
- xkb->names->types= XkbInternAtom(buf,FALSE);
- }
- num_types= XkmGetCARD16(file,&nRead);
- nRead+= XkmSkipPadding(file,2);
- if (num_types<1)
- return nRead;
- if (XkbAllocClientMap(xkb,XkbKeyTypesMask,num_types)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeyTypes",0);
- return nRead;
- }
- xkb->map->num_types= num_types;
- if (num_types<XkbNumRequiredTypes) {
- _XkbLibError(_XkbErrMissingReqTypes,"ReadXkmKeyTypes",0);
- return -1;
- }
- type= xkb->map->types;
- for (i=0;i<num_types;i++,type++) {
- if ((int)fread(&wire,SIZEOF(xkmKeyTypeDesc),1,file)<1) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmKeyTypes",0);
- return -1;
- }
- nRead+= SIZEOF(xkmKeyTypeDesc);
- if (((i==XkbOneLevelIndex)&&(wire.numLevels!=1))||
- (((i==XkbTwoLevelIndex)||(i==XkbAlphabeticIndex)||
- ((i)==XkbKeypadIndex))&&(wire.numLevels!=2))) {
- _XkbLibError(_XkbErrBadTypeWidth,"ReadXkmKeyTypes",i);
- return -1;
- }
- tmp= wire.nMapEntries;
- XkmInsureTypedSize(type->map,type->map_count,&tmp,XkbKTMapEntryRec);
- if ((wire.nMapEntries>0)&&(type->map==NULL)) {
- _XkbLibError(_XkbErrBadValue,"ReadXkmKeyTypes",wire.nMapEntries);
- return -1;
- }
- for (n=0,entry= type->map;n<wire.nMapEntries;n++,entry++) {
- if (fread(&wire_entry,SIZEOF(xkmKTMapEntryDesc),1,file)<(int)1) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmKeyTypes",0);
- return -1;
- }
- nRead+= SIZEOF(xkmKTMapEntryDesc);
- entry->active= (wire_entry.virtualMods==0);
- entry->level= wire_entry.level;
- entry->mods.mask= wire_entry.realMods;
- entry->mods.real_mods= wire_entry.realMods;
- entry->mods.vmods= wire_entry.virtualMods;
- }
- nRead+= XkmGetCountedString(file,buf,100);
- if (((i==XkbOneLevelIndex)&&(strcmp(buf,"ONE_LEVEL")!=0))||
- ((i==XkbTwoLevelIndex)&&(strcmp(buf,"TWO_LEVEL")!=0))||
- ((i==XkbAlphabeticIndex)&&(strcmp(buf,"ALPHABETIC")!=0))||
- ((i==XkbKeypadIndex)&&(strcmp(buf,"KEYPAD")!=0))) {
- _XkbLibError(_XkbErrBadTypeName,"ReadXkmKeyTypes",0);
- return -1;
- }
- if (buf[0]!='\0') {
- type->name= XkbInternAtom(buf,FALSE);
- }
- else type->name= None;
-
- if (wire.preserve) {
- xkmModsDesc p_entry;
- XkbModsPtr pre;
- XkmInsureTypedSize(type->preserve,type->map_count,&tmp,
- XkbModsRec);
- if (type->preserve==NULL) {
- _XkbLibError(_XkbErrBadMatch,"ReadXkmKeycodes",0);
- return -1;
- }
- for (n=0,pre=type->preserve;n<wire.nMapEntries;n++,pre++) {
- if (fread(&p_entry,SIZEOF(xkmModsDesc),1,file)<1) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmKeycodes",0);
- return -1;
- }
- nRead+= SIZEOF(xkmModsDesc);
- pre->mask= p_entry.realMods;
- pre->real_mods= p_entry.realMods;
- pre->vmods= p_entry.virtualMods;
- }
- }
- if (wire.nLevelNames>0) {
- int width= wire.numLevels;
- if (wire.nLevelNames>(unsigned)width) {
- _XkbLibError(_XkbErrBadMatch,"ReadXkmKeycodes",0);
- return -1;
- }
- XkmInsureTypedSize(type->level_names,type->num_levels,&width,Atom);
- if (type->level_names!=NULL) {
- for (n=0;n<wire.nLevelNames;n++) {
- if ((tmp=XkmGetCountedString(file,buf,100))<1)
- return -1;
- nRead+= tmp;
- if (strlen(buf)==0)
- type->level_names[n]= None;
- else type->level_names[n]= XkbInternAtom(buf,0);
- }
- }
- }
- type->mods.mask= wire.realMods;
- type->mods.real_mods= wire.realMods;
- type->mods.vmods= wire.virtualMods;
- type->num_levels= wire.numLevels;
- type->map_count= wire.nMapEntries;
- }
- if (changes) {
- changes->map.changed|= XkbKeyTypesMask;
- changes->map.first_type= 0;
- changes->map.num_types= xkb->map->num_types;
- }
- return nRead;
-}
-
-/***====================================================================***/
-
-static int
-ReadXkmCompatMap(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
-{
-register int i;
-unsigned num_si,groups;
-char name[100];
-XkbSymInterpretPtr interp;
-xkmSymInterpretDesc wire;
-unsigned tmp;
-int nRead=0;
-XkbCompatMapPtr compat;
-XkbAction *act;
-
- if ((tmp= XkmGetCountedString(file,name,100))<1) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmCompatMap",0);
- return -1;
- }
- nRead+= tmp;
- if (name[0]!='\0') {
- if (XkbAllocNames(xkb,XkbCompatNameMask,0,0)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmCompatMap",0);
- return -1;
- }
- xkb->names->compat= XkbInternAtom(name,FALSE);
- }
- num_si= XkmGetCARD16(file,&nRead);
- groups= XkmGetCARD8(file,&nRead);
- nRead+= XkmSkipPadding(file,1);
- if (XkbAllocCompatMap(xkb,XkbAllCompatMask,num_si)!=Success)
- return -1;
- compat= xkb->compat;
- compat->num_si= num_si;
- interp= compat->sym_interpret;
- for (i=0;i<num_si;i++,interp++) {
- tmp= fread(&wire,SIZEOF(xkmSymInterpretDesc),1,file);
- nRead+= tmp*SIZEOF(xkmSymInterpretDesc);
- interp->sym= wire.sym;
- interp->mods= wire.mods;
- interp->match= wire.match;
- interp->virtual_mod= wire.virtualMod;
- interp->flags= wire.flags;
- interp->act.type= wire.actionType;
- act = (XkbAction *) &interp->act;
-
- switch (interp->act.type) {
- case XkbSA_SetMods:
- case XkbSA_LatchMods:
- case XkbSA_LockMods:
- act->mods.flags = wire.actionData[0];
- act->mods.mask = wire.actionData[1];
- act->mods.real_mods = wire.actionData[2];
- act->mods.vmods1 = wire.actionData[3];
- act->mods.vmods2 = wire.actionData[4];
- break;
- case XkbSA_SetGroup:
- case XkbSA_LatchGroup:
- case XkbSA_LockGroup:
- act->group.flags = wire.actionData[0];
- act->group.group_XXX = wire.actionData[1];
- break;
- case XkbSA_MovePtr:
- act->ptr.flags = wire.actionData[0];
- act->ptr.high_XXX = wire.actionData[1];
- act->ptr.low_XXX = wire.actionData[2];
- act->ptr.high_YYY = wire.actionData[3];
- act->ptr.low_YYY = wire.actionData[4];
- break;
- case XkbSA_PtrBtn:
- case XkbSA_LockPtrBtn:
- act->btn.flags = wire.actionData[0];
- act->btn.count = wire.actionData[1];
- act->btn.button = wire.actionData[2];
- break;
- case XkbSA_DeviceBtn:
- case XkbSA_LockDeviceBtn:
- act->devbtn.flags = wire.actionData[0];
- act->devbtn.count = wire.actionData[1];
- act->devbtn.button = wire.actionData[2];
- act->devbtn.device = wire.actionData[3];
- break;
- case XkbSA_SetPtrDflt:
- act->dflt.flags = wire.actionData[0];
- act->dflt.affect = wire.actionData[1];
- act->dflt.valueXXX = wire.actionData[2];
- break;
- case XkbSA_ISOLock:
- act->iso.flags = wire.actionData[0];
- act->iso.mask = wire.actionData[1];
- act->iso.real_mods = wire.actionData[2];
- act->iso.group_XXX = wire.actionData[3];
- act->iso.affect = wire.actionData[4];
- act->iso.vmods1 = wire.actionData[5];
- act->iso.vmods2 = wire.actionData[6];
- break;
- case XkbSA_SwitchScreen:
- act->screen.flags = wire.actionData[0];
- act->screen.screenXXX = wire.actionData[1];
- break;
- case XkbSA_SetControls:
- case XkbSA_LockControls:
- act->ctrls.flags = wire.actionData[0];
- act->ctrls.ctrls3 = wire.actionData[1];
- act->ctrls.ctrls2 = wire.actionData[2];
- act->ctrls.ctrls1 = wire.actionData[3];
- act->ctrls.ctrls0 = wire.actionData[4];
- break;
- case XkbSA_RedirectKey:
- act->redirect.new_key = wire.actionData[0];
- act->redirect.mods_mask = wire.actionData[1];
- act->redirect.mods = wire.actionData[2];
- act->redirect.vmods_mask0 = wire.actionData[3];
- act->redirect.vmods_mask1 = wire.actionData[4];
- act->redirect.vmods0 = wire.actionData[4];
- act->redirect.vmods1 = wire.actionData[5];
- break;
- case XkbSA_DeviceValuator:
- act->devval.device = wire.actionData[0];
- act->devval.v1_what = wire.actionData[1];
- act->devval.v1_ndx = wire.actionData[2];
- act->devval.v1_value = wire.actionData[3];
- act->devval.v2_what = wire.actionData[4];
- act->devval.v2_ndx = wire.actionData[5];
- act->devval.v2_what = wire.actionData[6];
- break;
-
- case XkbSA_XFree86Private:
- /* copy the kind of action */
- memcpy(act->any.data, wire.actionData, XkbAnyActionDataSize);
- break ;
-
- case XkbSA_Terminate:
- /* no args, kinda (note: untrue for xfree86). */
- break;
- case XkbSA_ActionMessage:
- /* unsupported. */
- break;
- }
- }
- if ((num_si>0)&&(changes)) {
- changes->compat.first_si= 0;
- changes->compat.num_si= num_si;
- }
- if (groups) {
- register unsigned bit;
- for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
- xkmModsDesc md;
- if (groups&bit) {
- tmp= fread(&md,SIZEOF(xkmModsDesc),1,file);
- nRead+= tmp*SIZEOF(xkmModsDesc);
- xkb->compat->groups[i].real_mods= md.realMods;
- xkb->compat->groups[i].vmods= md.virtualMods;
- if (md.virtualMods != 0) {
- unsigned mask;
- if (XkbVirtualModsToReal(xkb,md.virtualMods,&mask))
- xkb->compat->groups[i].mask= md.realMods|mask;
- }
- else xkb->compat->groups[i].mask= md.realMods;
- }
- }
- if (changes)
- changes->compat.changed_groups|= groups;
- }
- return nRead;
-}
-
-static int
-ReadXkmIndicators(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
-{
-register unsigned nLEDs;
-xkmIndicatorMapDesc wire;
-char buf[100];
-unsigned tmp;
-int nRead=0;
-
- if ((xkb->indicators==NULL)&&(XkbAllocIndicatorMaps(xkb)!=Success)) {
- _XkbLibError(_XkbErrBadAlloc,"indicator rec",0);
- return -1;
- }
- if (XkbAllocNames(xkb,XkbIndicatorNamesMask,0,0)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"indicator names",0);
- return -1;
- }
- nLEDs= XkmGetCARD8(file,&nRead);
- nRead+= XkmSkipPadding(file,3);
- xkb->indicators->phys_indicators= XkmGetCARD32(file,&nRead);
- while (nLEDs-->0) {
- Atom name;
- XkbIndicatorMapPtr map;
-
- if ((tmp=XkmGetCountedString(file,buf,100))<1) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmIndicators",0);
- return -1;
- }
- nRead+= tmp;
- if (buf[0]!='\0')
- name= XkbInternAtom(buf,FALSE);
- else name= None;
- if ((tmp=fread(&wire,SIZEOF(xkmIndicatorMapDesc),1,file))<1) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmIndicators",0);
- return -1;
- }
- nRead+= tmp*SIZEOF(xkmIndicatorMapDesc);
- if (xkb->names) {
- xkb->names->indicators[wire.indicator-1]= name;
- if (changes)
- changes->names.changed_indicators|= (1<<(wire.indicator-1));
- }
- map= &xkb->indicators->maps[wire.indicator-1];
- map->flags= wire.flags;
- map->which_groups= wire.which_groups;
- map->groups= wire.groups;
- map->which_mods= wire.which_mods;
- map->mods.mask= wire.real_mods;
- map->mods.real_mods= wire.real_mods;
- map->mods.vmods= wire.vmods;
- map->ctrls= wire.ctrls;
- }
- return nRead;
-}
-
-static XkbKeyTypePtr
-FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms)
-{
- if ((!xkb)||(!xkb->map))
- return NULL;
- if (name!=None) {
- register unsigned i;
- for (i=0;i<xkb->map->num_types;i++) {
- if (xkb->map->types[i].name==name) {
- if (xkb->map->types[i].num_levels!=width)
- DebugF("Group width mismatch between key and type\n");
- return &xkb->map->types[i];
- }
- }
- }
- if ((width<2)||((syms!=NULL)&&(syms[1]==NoSymbol)))
- return &xkb->map->types[XkbOneLevelIndex];
- if (syms!=NULL) {
- if (XkbKSIsLower(syms[0])&&XkbKSIsUpper(syms[1]))
- return &xkb->map->types[XkbAlphabeticIndex];
- else if (XkbKSIsKeypad(syms[0])||XkbKSIsKeypad(syms[1]))
- return &xkb->map->types[XkbKeypadIndex];
- }
- return &xkb->map->types[XkbTwoLevelIndex];
-}
-
-static int
-ReadXkmSymbols(FILE *file,XkbDescPtr xkb)
-{
-register int i,g,s,totalVModMaps;
-xkmKeySymMapDesc wireMap;
-char buf[100];
-unsigned minKC,maxKC,groupNames,tmp;
-int nRead=0;
-
- if ((tmp=XkmGetCountedString(file,buf,100))<1)
- return -1;
- nRead+= tmp;
- minKC= XkmGetCARD8(file,&nRead);
- maxKC= XkmGetCARD8(file,&nRead);
- groupNames= XkmGetCARD8(file,&nRead);
- totalVModMaps= XkmGetCARD8(file,&nRead);
- if (XkbAllocNames(xkb,
- XkbSymbolsNameMask|XkbPhysSymbolsNameMask|XkbGroupNamesMask,
- 0,0)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"physical names",0);
- return -1;
- }
- if ((buf[0]!='\0')&&(xkb->names)) {
- Atom name;
- name= XkbInternAtom(buf,0);
- xkb->names->symbols= name;
- xkb->names->phys_symbols= name;
- }
- for (i=0,g=1;i<XkbNumKbdGroups;i++,g<<=1) {
- if (groupNames&g) {
- if ((tmp=XkmGetCountedString(file,buf,100))<1)
- return -1;
- nRead+= tmp;
-
- if (!xkb->names)
- continue;
-
- if (buf[0]!='\0') {
- Atom name;
- name= XkbInternAtom(buf,0);
- xkb->names->groups[i]= name;
- }
- else xkb->names->groups[i]= None;
- }
- }
- if (XkbAllocServerMap(xkb,XkbAllServerInfoMask,0)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"server map",0);
- return -1;
- }
- if (XkbAllocClientMap(xkb,XkbAllClientInfoMask,0)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"client map",0);
- return -1;
- }
- if (XkbAllocControls(xkb,XkbAllControlsMask)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"controls",0);
- return -1;
- }
- if ((xkb->map==NULL)||(xkb->server==NULL))
- return -1;
- if (xkb->min_key_code<8) xkb->min_key_code= minKC;
- if (xkb->max_key_code<8) xkb->max_key_code= maxKC;
- if ((minKC>=8)&&(minKC<xkb->min_key_code))
- xkb->min_key_code= minKC;
- if ((maxKC>=8)&&(maxKC>xkb->max_key_code)) {
- _XkbLibError(_XkbErrBadValue,"keys in symbol map",maxKC);
- return -1;
- }
- for (i=minKC;i<=(int)maxKC;i++) {
- Atom typeName[XkbNumKbdGroups];
- XkbKeyTypePtr type[XkbNumKbdGroups];
- if ((tmp=fread(&wireMap,SIZEOF(xkmKeySymMapDesc),1,file))<1) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmSymbols",0);
- return -1;
- }
- nRead+= tmp*SIZEOF(xkmKeySymMapDesc);
- memset((char *)typeName, 0, XkbNumKbdGroups*sizeof(Atom));
- memset((char *)type, 0, XkbNumKbdGroups*sizeof(XkbKeyTypePtr));
- if (wireMap.flags&XkmKeyHasTypes) {
- register int g;
- for (g=0;g<XkbNumKbdGroups;g++) {
- if ((wireMap.flags&(1<<g))&&
- ((tmp=XkmGetCountedString(file,buf,100))>0)) {
- typeName[g]= XkbInternAtom(buf,1);
- nRead+= tmp;
- }
- type[g]=FindTypeForKey(xkb,typeName[g],wireMap.width,NULL);
- if (type[g]==NULL) {
- _XkbLibError(_XkbErrMissingTypes,"ReadXkmSymbols",0);
- return -1;
- }
- if (typeName[g]==type[g]->name)
- xkb->server->explicit[i]|= (1<<g);
- }
- }
- if (wireMap.flags&XkmRepeatingKey) {
- xkb->ctrls->per_key_repeat[i/8]|= (1<<(i%8));
- xkb->server->explicit[i]|= XkbExplicitAutoRepeatMask;
- }
- else if (wireMap.flags&XkmNonRepeatingKey) {
- xkb->ctrls->per_key_repeat[i/8]&= ~(1<<(i%8));
- xkb->server->explicit[i]|= XkbExplicitAutoRepeatMask;
- }
- xkb->map->modmap[i]= wireMap.modifier_map;
- if (XkbNumGroups(wireMap.num_groups)>0) {
- KeySym *sym;
- int nSyms;
-
- if (XkbNumGroups(wireMap.num_groups)>xkb->ctrls->num_groups)
- xkb->ctrls->num_groups= wireMap.num_groups;
- nSyms= XkbNumGroups(wireMap.num_groups)*wireMap.width;
- sym= XkbResizeKeySyms(xkb,i,nSyms);
- if (!sym)
- return -1;
- for (s=0;s<nSyms;s++) {
- *sym++= XkmGetCARD32(file,&nRead);
- }
- if (wireMap.flags&XkmKeyHasActions) {
- XkbAction * act;
- act= XkbResizeKeyActions(xkb,i,nSyms);
- for (s=0;s<nSyms;s++,act++) {
- tmp=fread(act,SIZEOF(xkmActionDesc),1,file);
- nRead+= tmp*SIZEOF(xkmActionDesc);
- }
- xkb->server->explicit[i]|= XkbExplicitInterpretMask;
- }
- }
- for (g=0;g<XkbNumGroups(wireMap.num_groups);g++) {
- if (((xkb->server->explicit[i]&(1<<g))==0)||(type[g]==NULL)) {
- KeySym *tmpSyms;
- tmpSyms= XkbKeySymsPtr(xkb,i)+(wireMap.width*g);
- type[g]= FindTypeForKey(xkb,None,wireMap.width,tmpSyms);
- }
- xkb->map->key_sym_map[i].kt_index[g]= type[g]-(&xkb->map->types[0]);
- }
- xkb->map->key_sym_map[i].group_info= wireMap.num_groups;
- xkb->map->key_sym_map[i].width= wireMap.width;
- if (wireMap.flags&XkmKeyHasBehavior) {
- xkmBehaviorDesc b;
- tmp= fread(&b,SIZEOF(xkmBehaviorDesc),1,file);
- nRead+= tmp*SIZEOF(xkmBehaviorDesc);
- xkb->server->behaviors[i].type= b.type;
- xkb->server->behaviors[i].data= b.data;
- xkb->server->explicit[i]|= XkbExplicitBehaviorMask;
- }
- }
- if (totalVModMaps>0) {
- xkmVModMapDesc v;
- for (i=0;i<totalVModMaps;i++) {
- tmp= fread(&v,SIZEOF(xkmVModMapDesc),1,file);
- nRead+= tmp*SIZEOF(xkmVModMapDesc);
- if (tmp>0)
- xkb->server->vmodmap[v.key]= v.vmods;
- }
- }
- return nRead;
-}
-
-static int
-ReadXkmGeomDoodad(
- FILE * file,
- XkbGeometryPtr geom,
- XkbSectionPtr section)
-{
-XkbDoodadPtr doodad;
-xkmDoodadDesc doodadWire;
-char buf[100];
-unsigned tmp;
-int nRead=0;
-
- nRead+= XkmGetCountedString(file,buf,100);
- tmp= fread(&doodadWire,SIZEOF(xkmDoodadDesc),1,file);
- nRead+= SIZEOF(xkmDoodadDesc)*tmp;
- doodad= XkbAddGeomDoodad(geom,section,XkbInternAtom(buf,FALSE));
- if (!doodad)
- return nRead;
- doodad->any.type= doodadWire.any.type;
- doodad->any.priority= doodadWire.any.priority;
- doodad->any.top= doodadWire.any.top;
- doodad->any.left= doodadWire.any.left;
- switch (doodadWire.any.type) {
- case XkbOutlineDoodad:
- case XkbSolidDoodad:
- doodad->shape.angle= doodadWire.shape.angle;
- doodad->shape.color_ndx= doodadWire.shape.color_ndx;
- doodad->shape.shape_ndx= doodadWire.shape.shape_ndx;
- break;
- case XkbTextDoodad:
- doodad->text.angle= doodadWire.text.angle;
- doodad->text.width= doodadWire.text.width;
- doodad->text.height= doodadWire.text.height;
- doodad->text.color_ndx= doodadWire.text.color_ndx;
- nRead+= XkmGetCountedString(file,buf,100);
- doodad->text.text= Xstrdup(buf);
- nRead+= XkmGetCountedString(file,buf,100);
- doodad->text.font= Xstrdup(buf);
- break;
- case XkbIndicatorDoodad:
- doodad->indicator.shape_ndx= doodadWire.indicator.shape_ndx;
- doodad->indicator.on_color_ndx= doodadWire.indicator.on_color_ndx;
- doodad->indicator.off_color_ndx= doodadWire.indicator.off_color_ndx;
- break;
- case XkbLogoDoodad:
- doodad->logo.angle= doodadWire.logo.angle;
- doodad->logo.color_ndx= doodadWire.logo.color_ndx;
- doodad->logo.shape_ndx= doodadWire.logo.shape_ndx;
- nRead+= XkmGetCountedString(file,buf,100);
- doodad->logo.logo_name= Xstrdup(buf);
- break;
- default:
- /* report error? */
- return nRead;
- }
- return nRead;
-}
-
-static int
-ReadXkmGeomOverlay( FILE * file,
- XkbGeometryPtr geom,
- XkbSectionPtr section)
-{
-char buf[100];
-unsigned tmp;
-int nRead=0;
-XkbOverlayPtr ol;
-XkbOverlayRowPtr row;
-xkmOverlayDesc olWire;
-xkmOverlayRowDesc rowWire;
-register int r;
-
- nRead+= XkmGetCountedString(file,buf,100);
- tmp= fread(&olWire,SIZEOF(xkmOverlayDesc),1,file);
- nRead+= tmp*SIZEOF(xkmOverlayDesc);
- ol= XkbAddGeomOverlay(section,XkbInternAtom(buf,FALSE),
- olWire.num_rows);
- if (!ol)
- return nRead;
- for (r=0;r<olWire.num_rows;r++) {
- int k;
- xkmOverlayKeyDesc keyWire;
- tmp= fread(&rowWire,SIZEOF(xkmOverlayRowDesc),1,file);
- nRead+= tmp*SIZEOF(xkmOverlayRowDesc);
- row= XkbAddGeomOverlayRow(ol,rowWire.row_under,rowWire.num_keys);
- if (!row) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeomOverlay",0);
- return nRead;
- }
- for (k=0;k<rowWire.num_keys;k++) {
- tmp= fread(&keyWire,SIZEOF(xkmOverlayKeyDesc),1,file);
- nRead+= tmp*SIZEOF(xkmOverlayKeyDesc);
- memcpy(row->keys[k].over.name,keyWire.over,XkbKeyNameLength);
- memcpy(row->keys[k].under.name,keyWire.under,XkbKeyNameLength);
- }
- row->num_keys= rowWire.num_keys;
- }
- return nRead;
-}
-
-static int
-ReadXkmGeomSection( FILE * file,
- XkbGeometryPtr geom)
-{
-register int i;
-XkbSectionPtr section;
-xkmSectionDesc sectionWire;
-unsigned tmp;
-int nRead= 0;
-char buf[100];
-Atom nameAtom;
-
- nRead+= XkmGetCountedString(file,buf,100);
- nameAtom= XkbInternAtom(buf,FALSE);
- tmp= fread(&sectionWire,SIZEOF(xkmSectionDesc),1,file);
- nRead+= SIZEOF(xkmSectionDesc)*tmp;
- section= XkbAddGeomSection(geom,nameAtom,sectionWire.num_rows,
- sectionWire.num_doodads,
- sectionWire.num_overlays);
- if (!section) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeomSection",0);
- return nRead;
- }
- section->top= sectionWire.top;
- section->left= sectionWire.left;
- section->width= sectionWire.width;
- section->height= sectionWire.height;
- section->angle= sectionWire.angle;
- section->priority= sectionWire.priority;
- if (sectionWire.num_rows>0) {
- register int k;
- XkbRowPtr row;
- xkmRowDesc rowWire;
- XkbKeyPtr key;
- xkmKeyDesc keyWire;
-
- for (i=0;i<sectionWire.num_rows;i++) {
- tmp= fread(&rowWire,SIZEOF(xkmRowDesc),1,file);
- nRead+= SIZEOF(xkmRowDesc)*tmp;
- row= XkbAddGeomRow(section,rowWire.num_keys);
- if (!row) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeycodes",0);
- return nRead;
- }
- row->top= rowWire.top;
- row->left= rowWire.left;
- row->vertical= rowWire.vertical;
- for (k=0;k<rowWire.num_keys;k++) {
- tmp= fread(&keyWire,SIZEOF(xkmKeyDesc),1,file);
- nRead+= SIZEOF(xkmKeyDesc)*tmp;
- key= XkbAddGeomKey(row);
- if (!key) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeomSection",0);
- return nRead;
- }
- memcpy(key->name.name,keyWire.name,XkbKeyNameLength);
- key->gap= keyWire.gap;
- key->shape_ndx= keyWire.shape_ndx;
- key->color_ndx= keyWire.color_ndx;
- }
- }
- }
- if (sectionWire.num_doodads>0) {
- for (i=0;i<sectionWire.num_doodads;i++) {
- tmp= ReadXkmGeomDoodad(file,geom,section);
- nRead+= tmp;
- if (tmp<1)
- return nRead;
- }
- }
- if (sectionWire.num_overlays>0) {
- for (i=0;i<sectionWire.num_overlays;i++) {
- tmp= ReadXkmGeomOverlay(file,geom,section);
- nRead+= tmp;
- if (tmp<1)
- return nRead;
- }
- }
- return nRead;
-}
-
-static int
-ReadXkmGeometry(FILE *file,XkbDescPtr xkb)
-{
-register int i;
-char buf[100];
-unsigned tmp;
-int nRead= 0;
-xkmGeometryDesc wireGeom;
-XkbGeometryPtr geom;
-XkbGeometrySizesRec sizes;
-
- nRead+= XkmGetCountedString(file,buf,100);
- tmp= fread(&wireGeom,SIZEOF(xkmGeometryDesc),1,file);
- nRead+= tmp*SIZEOF(xkmGeometryDesc);
- sizes.which= XkbGeomAllMask;
- sizes.num_properties= wireGeom.num_properties;
- sizes.num_colors= wireGeom.num_colors;
- sizes.num_shapes= wireGeom.num_shapes;
- sizes.num_sections= wireGeom.num_sections;
- sizes.num_doodads= wireGeom.num_doodads;
- sizes.num_key_aliases= wireGeom.num_key_aliases;
- if (XkbAllocGeometry(xkb,&sizes)!=Success) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
- return nRead;
- }
- geom= xkb->geom;
- geom->name= XkbInternAtom(buf,FALSE);
- geom->width_mm= wireGeom.width_mm;
- geom->height_mm= wireGeom.height_mm;
- nRead+= XkmGetCountedString(file,buf,100);
- geom->label_font= Xstrdup(buf);
- if (wireGeom.num_properties>0) {
- char val[1024];
- for (i=0;i<wireGeom.num_properties;i++) {
- nRead+= XkmGetCountedString(file,buf,100);
- nRead+= XkmGetCountedString(file,val,1024);
- if (XkbAddGeomProperty(geom,buf,val)==NULL) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
- return nRead;
- }
- }
- }
- if (wireGeom.num_colors>0) {
- for (i=0;i<wireGeom.num_colors;i++) {
- nRead+= XkmGetCountedString(file,buf,100);
- if (XkbAddGeomColor(geom,buf,i)==NULL) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
- return nRead;
- }
- }
- }
- geom->base_color= &geom->colors[wireGeom.base_color_ndx];
- geom->label_color= &geom->colors[wireGeom.label_color_ndx];
- if (wireGeom.num_shapes>0) {
- XkbShapePtr shape;
- xkmShapeDesc shapeWire;
- Atom nameAtom;
- for (i=0;i<wireGeom.num_shapes;i++) {
- register int n;
- XkbOutlinePtr ol;
- xkmOutlineDesc olWire;
- nRead+= XkmGetCountedString(file,buf,100);
- nameAtom= XkbInternAtom(buf,FALSE);
- tmp= fread(&shapeWire,SIZEOF(xkmShapeDesc),1,file);
- nRead+= tmp*SIZEOF(xkmShapeDesc);
- shape= XkbAddGeomShape(geom,nameAtom,shapeWire.num_outlines);
- if (!shape) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
- return nRead;
- }
- for (n=0;n<shapeWire.num_outlines;n++) {
- register int p;
- xkmPointDesc ptWire;
- tmp= fread(&olWire,SIZEOF(xkmOutlineDesc),1,file);
- nRead+= tmp*SIZEOF(xkmOutlineDesc);
- ol= XkbAddGeomOutline(shape,olWire.num_points);
- if (!ol) {
- _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
- return nRead;
- }
- ol->num_points= olWire.num_points;
- ol->corner_radius= olWire.corner_radius;
- for (p=0;p<olWire.num_points;p++) {
- tmp= fread(&ptWire,SIZEOF(xkmPointDesc),1,file);
- nRead+= tmp*SIZEOF(xkmPointDesc);
- ol->points[p].x= ptWire.x;
- ol->points[p].y= ptWire.y;
- if (ptWire.x<shape->bounds.x1) shape->bounds.x1= ptWire.x;
- if (ptWire.x>shape->bounds.x2) shape->bounds.x2= ptWire.x;
- if (ptWire.y<shape->bounds.y1) shape->bounds.y1= ptWire.y;
- if (ptWire.y>shape->bounds.y2) shape->bounds.y2= ptWire.y;
- }
- }
- if (shapeWire.primary_ndx!=XkbNoShape)
- shape->primary= &shape->outlines[shapeWire.primary_ndx];
- if (shapeWire.approx_ndx!=XkbNoShape)
- shape->approx= &shape->outlines[shapeWire.approx_ndx];
- }
- }
- if (wireGeom.num_sections>0) {
- for (i=0;i<wireGeom.num_sections;i++) {
- tmp= ReadXkmGeomSection(file,geom);
- nRead+= tmp;
- if (tmp==0)
- return nRead;
- }
- }
- if (wireGeom.num_doodads>0) {
- for (i=0;i<wireGeom.num_doodads;i++) {
- tmp= ReadXkmGeomDoodad(file,geom,NULL);
- nRead+= tmp;
- if (tmp==0)
- return nRead;
- }
- }
- if ((wireGeom.num_key_aliases>0)&&(geom->key_aliases)) {
- int sz= XkbKeyNameLength*2;
- int num= wireGeom.num_key_aliases;
- if (fread(geom->key_aliases,sz,num,file)!=num) {
- _XkbLibError(_XkbErrBadLength,"ReadXkmGeometry",0);
- return -1;
- }
- nRead+= (num*sz);
- geom->num_key_aliases= num;
- }
- return nRead;
-}
-
-Bool
-XkmProbe(FILE *file)
-{
-unsigned hdr,tmp;
-int nRead=0;
-
- hdr= (('x'<<24)|('k'<<16)|('m'<<8)|XkmFileVersion);
- tmp= XkmGetCARD32(file,&nRead);
- if (tmp!=hdr) {
- if ((tmp&(~0xff))==(hdr&(~0xff))) {
- _XkbLibError(_XkbErrBadFileVersion,"XkmProbe",tmp&0xff);
- }
- return 0;
- }
- return 1;
-}
-
-static Bool
-XkmReadTOC(FILE *file,xkmFileInfo* file_info,int max_toc,xkmSectionInfo *toc)
-{
-unsigned hdr,tmp;
-int nRead=0;
-unsigned i,size_toc;
-
- hdr= (('x'<<24)|('k'<<16)|('m'<<8)|XkmFileVersion);
- tmp= XkmGetCARD32(file,&nRead);
- if (tmp!=hdr) {
- if ((tmp&(~0xff))==(hdr&(~0xff))) {
- _XkbLibError(_XkbErrBadFileVersion,"XkmReadTOC",tmp&0xff);
- }
- else {
- _XkbLibError(_XkbErrBadFileType,"XkmReadTOC",tmp);
- }
- return 0;
- }
- fread(file_info,SIZEOF(xkmFileInfo),1,file);
- size_toc= file_info->num_toc;
- if (size_toc>max_toc) {
- DebugF("Warning! Too many TOC entries; last %d ignored\n",
- size_toc-max_toc);
- size_toc= max_toc;
- }
- for (i=0;i<size_toc;i++) {
- fread(&toc[i],SIZEOF(xkmSectionInfo),1,file);
- }
- return 1;
-}
-
-/***====================================================================***/
-
-#define MAX_TOC 16
-unsigned
-XkmReadFile(FILE *file,unsigned need,unsigned want,XkbDescPtr *xkb)
-{
-register unsigned i;
-xkmSectionInfo toc[MAX_TOC],tmpTOC;
-xkmFileInfo fileInfo;
-unsigned tmp,nRead=0;
-unsigned which= need|want;
-
- if (!XkmReadTOC(file,&fileInfo,MAX_TOC,toc))
- return which;
- if ((fileInfo.present&need)!=need) {
- _XkbLibError(_XkbErrIllegalContents,"XkmReadFile",
- need&(~fileInfo.present));
- return which;
- }
- if (*xkb==NULL)
- *xkb= XkbAllocKeyboard();
- for (i=0;i<fileInfo.num_toc;i++) {
- fseek(file,toc[i].offset,SEEK_SET);
- tmp= fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file);
- nRead= tmp*SIZEOF(xkmSectionInfo);
- if ((tmpTOC.type!=toc[i].type)||(tmpTOC.format!=toc[i].format)||
- (tmpTOC.size!=toc[i].size)||(tmpTOC.offset!=toc[i].offset)) {
- return which;
- }
- if ((which&(1<<tmpTOC.type))==0) {
- continue;
- }
- switch (tmpTOC.type) {
- case XkmVirtualModsIndex:
- tmp= ReadXkmVirtualMods(file,*xkb,NULL);
- break;
- case XkmTypesIndex:
- tmp= ReadXkmKeyTypes(file,*xkb,NULL);
- break;
- case XkmCompatMapIndex:
- tmp= ReadXkmCompatMap(file,*xkb,NULL);
- break;
- case XkmKeyNamesIndex:
- tmp= ReadXkmKeycodes(file,*xkb,NULL);
- break;
- case XkmIndicatorsIndex:
- tmp= ReadXkmIndicators(file,*xkb,NULL);
- break;
- case XkmSymbolsIndex:
- tmp= ReadXkmSymbols(file,*xkb);
- break;
- case XkmGeometryIndex:
- tmp= ReadXkmGeometry(file,*xkb);
- break;
- default:
- _XkbLibError(_XkbErrBadImplementation,
- XkbConfigText(tmpTOC.type,XkbMessage),0);
- tmp= 0;
- break;
- }
- if (tmp>0) {
- nRead+= tmp;
- which&= ~(1<<toc[i].type);
- (*xkb)->defined|= (1<<toc[i].type);
- }
- if (nRead!=tmpTOC.size) {
- _XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage),
- nRead-tmpTOC.size);
- }
- }
- return which;
-}
+/************************************************************
+ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdio.h>
+
+#include <X11/Xos.h>
+#include <X11/Xfuncs.h>
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/keysym.h>
+#include <X11/extensions/XKMformat.h>
+#include "misc.h"
+#include "inputstr.h"
+#include "xkbstr.h"
+#include "xkbsrv.h"
+#include "xkbgeom.h"
+
+Atom
+XkbInternAtom(char *str,Bool only_if_exists)
+{
+ if (str==NULL)
+ return None;
+ return MakeAtom(str,strlen(str),!only_if_exists);
+}
+
+/***====================================================================***/
+
+static void *
+XkmInsureSize(void *oldPtr,int oldCount,int *newCountRtrn,int elemSize)
+{
+int newCount= *newCountRtrn;
+
+ if (oldPtr==NULL) {
+ if (newCount==0)
+ return NULL;
+ oldPtr= calloc(newCount,elemSize);
+ }
+ else if (oldCount<newCount) {
+ oldPtr= realloc(oldPtr,newCount*elemSize);
+ if (oldPtr!=NULL) {
+ char *tmp= (char *)oldPtr;
+ memset(&tmp[oldCount*elemSize], 0, (newCount-oldCount)*elemSize);
+ }
+ }
+ else if (newCount<oldCount) {
+ *newCountRtrn= oldCount;
+ }
+ return oldPtr;
+}
+
+#define XkmInsureTypedSize(p,o,n,t) ((p)=((t *)XkmInsureSize((char *)(p),(o),(n),sizeof(t))))
+
+static CARD8
+XkmGetCARD8(FILE *file,int *pNRead)
+{
+int tmp;
+ tmp= getc(file);
+ if (pNRead&&(tmp!=EOF))
+ (*pNRead)+= 1;
+ return tmp;
+}
+
+static CARD16
+XkmGetCARD16(FILE *file,int *pNRead)
+{
+CARD16 val;
+
+ if ((fread(&val,2,1,file)==1)&&(pNRead))
+ (*pNRead)+= 2;
+ return val;
+}
+
+static CARD32
+XkmGetCARD32(FILE *file,int *pNRead)
+{
+CARD32 val;
+
+ if ((fread(&val,4,1,file)==1)&&(pNRead))
+ (*pNRead)+= 4;
+ return val;
+}
+
+static int
+XkmSkipPadding(FILE *file,unsigned pad)
+{
+register int i,nRead=0;
+
+ for (i=0;i<pad;i++) {
+ if (getc(file)!=EOF)
+ nRead++;
+ }
+ return nRead;
+}
+
+static int
+XkmGetCountedString(FILE *file,char *str,int max_len)
+{
+int count,nRead=0;
+
+ count= XkmGetCARD16(file,&nRead);
+ if (count>0) {
+ int tmp;
+ if (count>max_len) {
+ tmp= fread(str,1,max_len,file);
+ while (tmp<count) {
+ if ((getc(file))!=EOF)
+ tmp++;
+ else break;
+ }
+ }
+ else {
+ tmp= fread(str,1,count,file);
+ }
+ nRead+= tmp;
+ }
+ if (count>=max_len) str[max_len-1]= '\0';
+ else str[count]= '\0';
+ count= XkbPaddedSize(nRead)-nRead;
+ if (count>0)
+ nRead+= XkmSkipPadding(file,count);
+ return nRead;
+}
+
+/***====================================================================***/
+
+static int
+ReadXkmVirtualMods(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
+{
+register unsigned int i,bit;
+unsigned int bound,named,tmp;
+int nRead=0;
+
+ if (XkbAllocServerMap(xkb,XkbVirtualModsMask,0)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmVirtualMods",0);
+ return -1;
+ }
+ bound= XkmGetCARD16(file,&nRead);
+ named= XkmGetCARD16(file,&nRead);
+ for (i=tmp=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
+ if (bound&bit) {
+ xkb->server->vmods[i]= XkmGetCARD8(file,&nRead);
+ if (changes)
+ changes->map.vmods|= bit;
+ tmp++;
+ }
+ }
+ if ((i= XkbPaddedSize(tmp)-tmp)>0)
+ nRead+= XkmSkipPadding(file,i);
+ if (XkbAllocNames(xkb,XkbVirtualModNamesMask,0,0)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmVirtualMods",0);
+ return -1;
+ }
+ for (i=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
+ char name[100];
+ if (named&bit) {
+ if (nRead+=XkmGetCountedString(file,name,100)) {
+ xkb->names->vmods[i]= XkbInternAtom(name,FALSE);
+ if (changes)
+ changes->names.changed_vmods|= bit;
+ }
+ }
+ }
+ return nRead;
+}
+
+/***====================================================================***/
+
+static int
+ReadXkmKeycodes(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
+{
+register int i;
+unsigned minKC,maxKC,nAl;
+int nRead=0;
+char name[100];
+XkbKeyNamePtr pN;
+
+ name[0]= '\0';
+ nRead+= XkmGetCountedString(file,name,100);
+ minKC= XkmGetCARD8(file,&nRead);
+ maxKC= XkmGetCARD8(file,&nRead);
+ if (xkb->min_key_code==0) {
+ xkb->min_key_code= minKC;
+ xkb->max_key_code= maxKC;
+ }
+ else {
+ if (minKC<xkb->min_key_code)
+ xkb->min_key_code= minKC;
+ if (maxKC>xkb->max_key_code) {
+ _XkbLibError(_XkbErrBadValue,"ReadXkmKeycodes",maxKC);
+ return -1;
+ }
+ }
+ nAl= XkmGetCARD8(file,&nRead);
+ nRead+= XkmSkipPadding(file,1);
+
+#define WANTED (XkbKeycodesNameMask|XkbKeyNamesMask|XkbKeyAliasesMask)
+ if (XkbAllocNames(xkb,WANTED,0,nAl)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeycodes",0);
+ return -1;
+ }
+ if (name[0]!='\0') {
+ xkb->names->keycodes= XkbInternAtom(name,FALSE);
+ }
+
+ for (pN=&xkb->names->keys[minKC],i=minKC;i<=(int)maxKC;i++,pN++) {
+ if (fread(pN,1,XkbKeyNameLength,file)!=XkbKeyNameLength) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmKeycodes",0);
+ return -1;
+ }
+ nRead+= XkbKeyNameLength;
+ }
+ if (nAl>0) {
+ XkbKeyAliasPtr pAl;
+ for (pAl= xkb->names->key_aliases,i=0;i<nAl;i++,pAl++) {
+ int tmp;
+ tmp= fread(pAl,1,2*XkbKeyNameLength,file);
+ if (tmp!=2*XkbKeyNameLength) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmKeycodes",0);
+ return -1;
+ }
+ nRead+= 2*XkbKeyNameLength;
+ }
+ if (changes)
+ changes->names.changed|= XkbKeyAliasesMask;
+ }
+ if (changes)
+ changes->names.changed|= XkbKeyNamesMask;
+ return nRead;
+}
+
+/***====================================================================***/
+
+static int
+ReadXkmKeyTypes(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
+{
+register unsigned i,n;
+unsigned num_types;
+int nRead=0;
+int tmp;
+XkbKeyTypePtr type;
+xkmKeyTypeDesc wire;
+XkbKTMapEntryPtr entry;
+xkmKTMapEntryDesc wire_entry;
+char buf[100];
+
+ if ((tmp= XkmGetCountedString(file,buf,100))<1) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmKeyTypes",0);
+ return -1;
+ }
+ nRead+= tmp;
+ if (buf[0]!='\0') {
+ if (XkbAllocNames(xkb,XkbTypesNameMask,0,0)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeyTypes",0);
+ return -1;
+ }
+ xkb->names->types= XkbInternAtom(buf,FALSE);
+ }
+ num_types= XkmGetCARD16(file,&nRead);
+ nRead+= XkmSkipPadding(file,2);
+ if (num_types<1)
+ return nRead;
+ if (XkbAllocClientMap(xkb,XkbKeyTypesMask,num_types)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeyTypes",0);
+ return nRead;
+ }
+ xkb->map->num_types= num_types;
+ if (num_types<XkbNumRequiredTypes) {
+ _XkbLibError(_XkbErrMissingReqTypes,"ReadXkmKeyTypes",0);
+ return -1;
+ }
+ type= xkb->map->types;
+ for (i=0;i<num_types;i++,type++) {
+ if ((int)fread(&wire,SIZEOF(xkmKeyTypeDesc),1,file)<1) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmKeyTypes",0);
+ return -1;
+ }
+ nRead+= SIZEOF(xkmKeyTypeDesc);
+ if (((i==XkbOneLevelIndex)&&(wire.numLevels!=1))||
+ (((i==XkbTwoLevelIndex)||(i==XkbAlphabeticIndex)||
+ ((i)==XkbKeypadIndex))&&(wire.numLevels!=2))) {
+ _XkbLibError(_XkbErrBadTypeWidth,"ReadXkmKeyTypes",i);
+ return -1;
+ }
+ tmp= wire.nMapEntries;
+ XkmInsureTypedSize(type->map,type->map_count,&tmp,XkbKTMapEntryRec);
+ if ((wire.nMapEntries>0)&&(type->map==NULL)) {
+ _XkbLibError(_XkbErrBadValue,"ReadXkmKeyTypes",wire.nMapEntries);
+ return -1;
+ }
+ for (n=0,entry= type->map;n<wire.nMapEntries;n++,entry++) {
+ if (fread(&wire_entry,SIZEOF(xkmKTMapEntryDesc),1,file)<(int)1) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmKeyTypes",0);
+ return -1;
+ }
+ nRead+= SIZEOF(xkmKTMapEntryDesc);
+ entry->active= (wire_entry.virtualMods==0);
+ entry->level= wire_entry.level;
+ entry->mods.mask= wire_entry.realMods;
+ entry->mods.real_mods= wire_entry.realMods;
+ entry->mods.vmods= wire_entry.virtualMods;
+ }
+ nRead+= XkmGetCountedString(file,buf,100);
+ if (((i==XkbOneLevelIndex)&&(strcmp(buf,"ONE_LEVEL")!=0))||
+ ((i==XkbTwoLevelIndex)&&(strcmp(buf,"TWO_LEVEL")!=0))||
+ ((i==XkbAlphabeticIndex)&&(strcmp(buf,"ALPHABETIC")!=0))||
+ ((i==XkbKeypadIndex)&&(strcmp(buf,"KEYPAD")!=0))) {
+ _XkbLibError(_XkbErrBadTypeName,"ReadXkmKeyTypes",0);
+ return -1;
+ }
+ if (buf[0]!='\0') {
+ type->name= XkbInternAtom(buf,FALSE);
+ }
+ else type->name= None;
+
+ if (wire.preserve) {
+ xkmModsDesc p_entry;
+ XkbModsPtr pre;
+ XkmInsureTypedSize(type->preserve,type->map_count,&tmp,
+ XkbModsRec);
+ if (type->preserve==NULL) {
+ _XkbLibError(_XkbErrBadMatch,"ReadXkmKeycodes",0);
+ return -1;
+ }
+ for (n=0,pre=type->preserve;n<wire.nMapEntries;n++,pre++) {
+ if (fread(&p_entry,SIZEOF(xkmModsDesc),1,file)<1) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmKeycodes",0);
+ return -1;
+ }
+ nRead+= SIZEOF(xkmModsDesc);
+ pre->mask= p_entry.realMods;
+ pre->real_mods= p_entry.realMods;
+ pre->vmods= p_entry.virtualMods;
+ }
+ }
+ if (wire.nLevelNames>0) {
+ int width= wire.numLevels;
+ if (wire.nLevelNames>(unsigned)width) {
+ _XkbLibError(_XkbErrBadMatch,"ReadXkmKeycodes",0);
+ return -1;
+ }
+ XkmInsureTypedSize(type->level_names,type->num_levels,&width,Atom);
+ if (type->level_names!=NULL) {
+ for (n=0;n<wire.nLevelNames;n++) {
+ if ((tmp=XkmGetCountedString(file,buf,100))<1)
+ return -1;
+ nRead+= tmp;
+ if (strlen(buf)==0)
+ type->level_names[n]= None;
+ else type->level_names[n]= XkbInternAtom(buf,0);
+ }
+ }
+ }
+ type->mods.mask= wire.realMods;
+ type->mods.real_mods= wire.realMods;
+ type->mods.vmods= wire.virtualMods;
+ type->num_levels= wire.numLevels;
+ type->map_count= wire.nMapEntries;
+ }
+ if (changes) {
+ changes->map.changed|= XkbKeyTypesMask;
+ changes->map.first_type= 0;
+ changes->map.num_types= xkb->map->num_types;
+ }
+ return nRead;
+}
+
+/***====================================================================***/
+
+static int
+ReadXkmCompatMap(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
+{
+register int i;
+unsigned num_si,groups;
+char name[100];
+XkbSymInterpretPtr interp;
+xkmSymInterpretDesc wire;
+unsigned tmp;
+int nRead=0;
+XkbCompatMapPtr compat;
+XkbAction *act;
+
+ if ((tmp= XkmGetCountedString(file,name,100))<1) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmCompatMap",0);
+ return -1;
+ }
+ nRead+= tmp;
+ if (name[0]!='\0') {
+ if (XkbAllocNames(xkb,XkbCompatNameMask,0,0)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmCompatMap",0);
+ return -1;
+ }
+ xkb->names->compat= XkbInternAtom(name,FALSE);
+ }
+ num_si= XkmGetCARD16(file,&nRead);
+ groups= XkmGetCARD8(file,&nRead);
+ nRead+= XkmSkipPadding(file,1);
+ if (XkbAllocCompatMap(xkb,XkbAllCompatMask,num_si)!=Success)
+ return -1;
+ compat= xkb->compat;
+ compat->num_si= num_si;
+ interp= compat->sym_interpret;
+ for (i=0;i<num_si;i++,interp++) {
+ tmp= fread(&wire,SIZEOF(xkmSymInterpretDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmSymInterpretDesc);
+ interp->sym= wire.sym;
+ interp->mods= wire.mods;
+ interp->match= wire.match;
+ interp->virtual_mod= wire.virtualMod;
+ interp->flags= wire.flags;
+ interp->act.type= wire.actionType;
+ act = (XkbAction *) &interp->act;
+
+ switch (interp->act.type) {
+ case XkbSA_SetMods:
+ case XkbSA_LatchMods:
+ case XkbSA_LockMods:
+ act->mods.flags = wire.actionData[0];
+ act->mods.mask = wire.actionData[1];
+ act->mods.real_mods = wire.actionData[2];
+ act->mods.vmods1 = wire.actionData[3];
+ act->mods.vmods2 = wire.actionData[4];
+ break;
+ case XkbSA_SetGroup:
+ case XkbSA_LatchGroup:
+ case XkbSA_LockGroup:
+ act->group.flags = wire.actionData[0];
+ act->group.group_XXX = wire.actionData[1];
+ break;
+ case XkbSA_MovePtr:
+ act->ptr.flags = wire.actionData[0];
+ act->ptr.high_XXX = wire.actionData[1];
+ act->ptr.low_XXX = wire.actionData[2];
+ act->ptr.high_YYY = wire.actionData[3];
+ act->ptr.low_YYY = wire.actionData[4];
+ break;
+ case XkbSA_PtrBtn:
+ case XkbSA_LockPtrBtn:
+ act->btn.flags = wire.actionData[0];
+ act->btn.count = wire.actionData[1];
+ act->btn.button = wire.actionData[2];
+ break;
+ case XkbSA_DeviceBtn:
+ case XkbSA_LockDeviceBtn:
+ act->devbtn.flags = wire.actionData[0];
+ act->devbtn.count = wire.actionData[1];
+ act->devbtn.button = wire.actionData[2];
+ act->devbtn.device = wire.actionData[3];
+ break;
+ case XkbSA_SetPtrDflt:
+ act->dflt.flags = wire.actionData[0];
+ act->dflt.affect = wire.actionData[1];
+ act->dflt.valueXXX = wire.actionData[2];
+ break;
+ case XkbSA_ISOLock:
+ act->iso.flags = wire.actionData[0];
+ act->iso.mask = wire.actionData[1];
+ act->iso.real_mods = wire.actionData[2];
+ act->iso.group_XXX = wire.actionData[3];
+ act->iso.affect = wire.actionData[4];
+ act->iso.vmods1 = wire.actionData[5];
+ act->iso.vmods2 = wire.actionData[6];
+ break;
+ case XkbSA_SwitchScreen:
+ act->screen.flags = wire.actionData[0];
+ act->screen.screenXXX = wire.actionData[1];
+ break;
+ case XkbSA_SetControls:
+ case XkbSA_LockControls:
+ act->ctrls.flags = wire.actionData[0];
+ act->ctrls.ctrls3 = wire.actionData[1];
+ act->ctrls.ctrls2 = wire.actionData[2];
+ act->ctrls.ctrls1 = wire.actionData[3];
+ act->ctrls.ctrls0 = wire.actionData[4];
+ break;
+ case XkbSA_RedirectKey:
+ act->redirect.new_key = wire.actionData[0];
+ act->redirect.mods_mask = wire.actionData[1];
+ act->redirect.mods = wire.actionData[2];
+ act->redirect.vmods_mask0 = wire.actionData[3];
+ act->redirect.vmods_mask1 = wire.actionData[4];
+ act->redirect.vmods0 = wire.actionData[4];
+ act->redirect.vmods1 = wire.actionData[5];
+ break;
+ case XkbSA_DeviceValuator:
+ act->devval.device = wire.actionData[0];
+ act->devval.v1_what = wire.actionData[1];
+ act->devval.v1_ndx = wire.actionData[2];
+ act->devval.v1_value = wire.actionData[3];
+ act->devval.v2_what = wire.actionData[4];
+ act->devval.v2_ndx = wire.actionData[5];
+ act->devval.v2_what = wire.actionData[6];
+ break;
+
+ case XkbSA_XFree86Private:
+ /* copy the kind of action */
+ memcpy(act->any.data, wire.actionData, XkbAnyActionDataSize);
+ break ;
+
+ case XkbSA_Terminate:
+ /* no args, kinda (note: untrue for xfree86). */
+ break;
+ case XkbSA_ActionMessage:
+ /* unsupported. */
+ break;
+ }
+ }
+ if ((num_si>0)&&(changes)) {
+ changes->compat.first_si= 0;
+ changes->compat.num_si= num_si;
+ }
+ if (groups) {
+ register unsigned bit;
+ for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
+ xkmModsDesc md;
+ if (groups&bit) {
+ tmp= fread(&md,SIZEOF(xkmModsDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmModsDesc);
+ xkb->compat->groups[i].real_mods= md.realMods;
+ xkb->compat->groups[i].vmods= md.virtualMods;
+ if (md.virtualMods != 0) {
+ unsigned mask;
+ if (XkbVirtualModsToReal(xkb,md.virtualMods,&mask))
+ xkb->compat->groups[i].mask= md.realMods|mask;
+ }
+ else xkb->compat->groups[i].mask= md.realMods;
+ }
+ }
+ if (changes)
+ changes->compat.changed_groups|= groups;
+ }
+ return nRead;
+}
+
+static int
+ReadXkmIndicators(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
+{
+register unsigned nLEDs;
+xkmIndicatorMapDesc wire;
+char buf[100];
+unsigned tmp;
+int nRead=0;
+
+ if ((xkb->indicators==NULL)&&(XkbAllocIndicatorMaps(xkb)!=Success)) {
+ _XkbLibError(_XkbErrBadAlloc,"indicator rec",0);
+ return -1;
+ }
+ if (XkbAllocNames(xkb,XkbIndicatorNamesMask,0,0)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"indicator names",0);
+ return -1;
+ }
+ nLEDs= XkmGetCARD8(file,&nRead);
+ nRead+= XkmSkipPadding(file,3);
+ xkb->indicators->phys_indicators= XkmGetCARD32(file,&nRead);
+ while (nLEDs-->0) {
+ Atom name;
+ XkbIndicatorMapPtr map;
+
+ if ((tmp=XkmGetCountedString(file,buf,100))<1) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmIndicators",0);
+ return -1;
+ }
+ nRead+= tmp;
+ if (buf[0]!='\0')
+ name= XkbInternAtom(buf,FALSE);
+ else name= None;
+ if ((tmp=fread(&wire,SIZEOF(xkmIndicatorMapDesc),1,file))<1) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmIndicators",0);
+ return -1;
+ }
+ nRead+= tmp*SIZEOF(xkmIndicatorMapDesc);
+ if (xkb->names) {
+ xkb->names->indicators[wire.indicator-1]= name;
+ if (changes)
+ changes->names.changed_indicators|= (1<<(wire.indicator-1));
+ }
+ map= &xkb->indicators->maps[wire.indicator-1];
+ map->flags= wire.flags;
+ map->which_groups= wire.which_groups;
+ map->groups= wire.groups;
+ map->which_mods= wire.which_mods;
+ map->mods.mask= wire.real_mods;
+ map->mods.real_mods= wire.real_mods;
+ map->mods.vmods= wire.vmods;
+ map->ctrls= wire.ctrls;
+ }
+ return nRead;
+}
+
+static XkbKeyTypePtr
+FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms)
+{
+ if ((!xkb)||(!xkb->map))
+ return NULL;
+ if (name!=None) {
+ register unsigned i;
+ for (i=0;i<xkb->map->num_types;i++) {
+ if (xkb->map->types[i].name==name) {
+ if (xkb->map->types[i].num_levels!=width)
+ DebugF("Group width mismatch between key and type\n");
+ return &xkb->map->types[i];
+ }
+ }
+ }
+ if ((width<2)||((syms!=NULL)&&(syms[1]==NoSymbol)))
+ return &xkb->map->types[XkbOneLevelIndex];
+ if (syms!=NULL) {
+ if (XkbKSIsLower(syms[0])&&XkbKSIsUpper(syms[1]))
+ return &xkb->map->types[XkbAlphabeticIndex];
+ else if (XkbKSIsKeypad(syms[0])||XkbKSIsKeypad(syms[1]))
+ return &xkb->map->types[XkbKeypadIndex];
+ }
+ return &xkb->map->types[XkbTwoLevelIndex];
+}
+
+static int
+ReadXkmSymbols(FILE *file,XkbDescPtr xkb)
+{
+register int i,g,s,totalVModMaps;
+xkmKeySymMapDesc wireMap;
+char buf[100];
+unsigned minKC,maxKC,groupNames,tmp;
+int nRead=0;
+
+ if ((tmp=XkmGetCountedString(file,buf,100))<1)
+ return -1;
+ nRead+= tmp;
+ minKC= XkmGetCARD8(file,&nRead);
+ maxKC= XkmGetCARD8(file,&nRead);
+ groupNames= XkmGetCARD8(file,&nRead);
+ totalVModMaps= XkmGetCARD8(file,&nRead);
+ if (XkbAllocNames(xkb,
+ XkbSymbolsNameMask|XkbPhysSymbolsNameMask|XkbGroupNamesMask,
+ 0,0)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"physical names",0);
+ return -1;
+ }
+ if ((buf[0]!='\0')&&(xkb->names)) {
+ Atom name;
+ name= XkbInternAtom(buf,0);
+ xkb->names->symbols= name;
+ xkb->names->phys_symbols= name;
+ }
+ for (i=0,g=1;i<XkbNumKbdGroups;i++,g<<=1) {
+ if (groupNames&g) {
+ if ((tmp=XkmGetCountedString(file,buf,100))<1)
+ return -1;
+ nRead+= tmp;
+
+ if (!xkb->names)
+ continue;
+
+ if (buf[0]!='\0') {
+ Atom name;
+ name= XkbInternAtom(buf,0);
+ xkb->names->groups[i]= name;
+ }
+ else xkb->names->groups[i]= None;
+ }
+ }
+ if (XkbAllocServerMap(xkb,XkbAllServerInfoMask,0)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"server map",0);
+ return -1;
+ }
+ if (XkbAllocClientMap(xkb,XkbAllClientInfoMask,0)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"client map",0);
+ return -1;
+ }
+ if (XkbAllocControls(xkb,XkbAllControlsMask)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"controls",0);
+ return -1;
+ }
+ if ((xkb->map==NULL)||(xkb->server==NULL))
+ return -1;
+ if (xkb->min_key_code<8) xkb->min_key_code= minKC;
+ if (xkb->max_key_code<8) xkb->max_key_code= maxKC;
+ if ((minKC>=8)&&(minKC<xkb->min_key_code))
+ xkb->min_key_code= minKC;
+ if ((maxKC>=8)&&(maxKC>xkb->max_key_code)) {
+ _XkbLibError(_XkbErrBadValue,"keys in symbol map",maxKC);
+ return -1;
+ }
+ for (i=minKC;i<=(int)maxKC;i++) {
+ Atom typeName[XkbNumKbdGroups];
+ XkbKeyTypePtr type[XkbNumKbdGroups];
+ if ((tmp=fread(&wireMap,SIZEOF(xkmKeySymMapDesc),1,file))<1) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmSymbols",0);
+ return -1;
+ }
+ nRead+= tmp*SIZEOF(xkmKeySymMapDesc);
+ memset((char *)typeName, 0, XkbNumKbdGroups*sizeof(Atom));
+ memset((char *)type, 0, XkbNumKbdGroups*sizeof(XkbKeyTypePtr));
+ if (wireMap.flags&XkmKeyHasTypes) {
+ register int g;
+ for (g=0;g<XkbNumKbdGroups;g++) {
+ if ((wireMap.flags&(1<<g))&&
+ ((tmp=XkmGetCountedString(file,buf,100))>0)) {
+ typeName[g]= XkbInternAtom(buf,1);
+ nRead+= tmp;
+ }
+ type[g]=FindTypeForKey(xkb,typeName[g],wireMap.width,NULL);
+ if (type[g]==NULL) {
+ _XkbLibError(_XkbErrMissingTypes,"ReadXkmSymbols",0);
+ return -1;
+ }
+ if (typeName[g]==type[g]->name)
+ xkb->server->explicit[i]|= (1<<g);
+ }
+ }
+ if (wireMap.flags&XkmRepeatingKey) {
+ xkb->ctrls->per_key_repeat[i/8]|= (1<<(i%8));
+ xkb->server->explicit[i]|= XkbExplicitAutoRepeatMask;
+ }
+ else if (wireMap.flags&XkmNonRepeatingKey) {
+ xkb->ctrls->per_key_repeat[i/8]&= ~(1<<(i%8));
+ xkb->server->explicit[i]|= XkbExplicitAutoRepeatMask;
+ }
+ xkb->map->modmap[i]= wireMap.modifier_map;
+ if (XkbNumGroups(wireMap.num_groups)>0) {
+ KeySym *sym;
+ int nSyms;
+
+ if (XkbNumGroups(wireMap.num_groups)>xkb->ctrls->num_groups)
+ xkb->ctrls->num_groups= wireMap.num_groups;
+ nSyms= XkbNumGroups(wireMap.num_groups)*wireMap.width;
+ sym= XkbResizeKeySyms(xkb,i,nSyms);
+ if (!sym)
+ return -1;
+ for (s=0;s<nSyms;s++) {
+ *sym++= XkmGetCARD32(file,&nRead);
+ }
+ if (wireMap.flags&XkmKeyHasActions) {
+ XkbAction * act;
+ act= XkbResizeKeyActions(xkb,i,nSyms);
+ for (s=0;s<nSyms;s++,act++) {
+ tmp=fread(act,SIZEOF(xkmActionDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmActionDesc);
+ }
+ xkb->server->explicit[i]|= XkbExplicitInterpretMask;
+ }
+ }
+ for (g=0;g<XkbNumGroups(wireMap.num_groups);g++) {
+ if (((xkb->server->explicit[i]&(1<<g))==0)||(type[g]==NULL)) {
+ KeySym *tmpSyms;
+ tmpSyms= XkbKeySymsPtr(xkb,i)+(wireMap.width*g);
+ type[g]= FindTypeForKey(xkb,None,wireMap.width,tmpSyms);
+ }
+ xkb->map->key_sym_map[i].kt_index[g]= type[g]-(&xkb->map->types[0]);
+ }
+ xkb->map->key_sym_map[i].group_info= wireMap.num_groups;
+ xkb->map->key_sym_map[i].width= wireMap.width;
+ if (wireMap.flags&XkmKeyHasBehavior) {
+ xkmBehaviorDesc b;
+ tmp= fread(&b,SIZEOF(xkmBehaviorDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmBehaviorDesc);
+ xkb->server->behaviors[i].type= b.type;
+ xkb->server->behaviors[i].data= b.data;
+ xkb->server->explicit[i]|= XkbExplicitBehaviorMask;
+ }
+ }
+ if (totalVModMaps>0) {
+ xkmVModMapDesc v;
+ for (i=0;i<totalVModMaps;i++) {
+ tmp= fread(&v,SIZEOF(xkmVModMapDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmVModMapDesc);
+ if (tmp>0)
+ xkb->server->vmodmap[v.key]= v.vmods;
+ }
+ }
+ return nRead;
+}
+
+static int
+ReadXkmGeomDoodad(
+ FILE * file,
+ XkbGeometryPtr geom,
+ XkbSectionPtr section)
+{
+XkbDoodadPtr doodad;
+xkmDoodadDesc doodadWire;
+char buf[100];
+unsigned tmp;
+int nRead=0;
+
+ nRead+= XkmGetCountedString(file,buf,100);
+ tmp= fread(&doodadWire,SIZEOF(xkmDoodadDesc),1,file);
+ nRead+= SIZEOF(xkmDoodadDesc)*tmp;
+ doodad= XkbAddGeomDoodad(geom,section,XkbInternAtom(buf,FALSE));
+ if (!doodad)
+ return nRead;
+ doodad->any.type= doodadWire.any.type;
+ doodad->any.priority= doodadWire.any.priority;
+ doodad->any.top= doodadWire.any.top;
+ doodad->any.left= doodadWire.any.left;
+ switch (doodadWire.any.type) {
+ case XkbOutlineDoodad:
+ case XkbSolidDoodad:
+ doodad->shape.angle= doodadWire.shape.angle;
+ doodad->shape.color_ndx= doodadWire.shape.color_ndx;
+ doodad->shape.shape_ndx= doodadWire.shape.shape_ndx;
+ break;
+ case XkbTextDoodad:
+ doodad->text.angle= doodadWire.text.angle;
+ doodad->text.width= doodadWire.text.width;
+ doodad->text.height= doodadWire.text.height;
+ doodad->text.color_ndx= doodadWire.text.color_ndx;
+ nRead+= XkmGetCountedString(file,buf,100);
+ doodad->text.text= Xstrdup(buf);
+ nRead+= XkmGetCountedString(file,buf,100);
+ doodad->text.font= Xstrdup(buf);
+ break;
+ case XkbIndicatorDoodad:
+ doodad->indicator.shape_ndx= doodadWire.indicator.shape_ndx;
+ doodad->indicator.on_color_ndx= doodadWire.indicator.on_color_ndx;
+ doodad->indicator.off_color_ndx= doodadWire.indicator.off_color_ndx;
+ break;
+ case XkbLogoDoodad:
+ doodad->logo.angle= doodadWire.logo.angle;
+ doodad->logo.color_ndx= doodadWire.logo.color_ndx;
+ doodad->logo.shape_ndx= doodadWire.logo.shape_ndx;
+ nRead+= XkmGetCountedString(file,buf,100);
+ doodad->logo.logo_name= Xstrdup(buf);
+ break;
+ default:
+ /* report error? */
+ return nRead;
+ }
+ return nRead;
+}
+
+static int
+ReadXkmGeomOverlay( FILE * file,
+ XkbGeometryPtr geom,
+ XkbSectionPtr section)
+{
+char buf[100];
+unsigned tmp;
+int nRead=0;
+XkbOverlayPtr ol;
+XkbOverlayRowPtr row;
+xkmOverlayDesc olWire;
+xkmOverlayRowDesc rowWire;
+register int r;
+
+ nRead+= XkmGetCountedString(file,buf,100);
+ tmp= fread(&olWire,SIZEOF(xkmOverlayDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmOverlayDesc);
+ ol= XkbAddGeomOverlay(section,XkbInternAtom(buf,FALSE),
+ olWire.num_rows);
+ if (!ol)
+ return nRead;
+ for (r=0;r<olWire.num_rows;r++) {
+ int k;
+ xkmOverlayKeyDesc keyWire;
+ tmp= fread(&rowWire,SIZEOF(xkmOverlayRowDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmOverlayRowDesc);
+ row= XkbAddGeomOverlayRow(ol,rowWire.row_under,rowWire.num_keys);
+ if (!row) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeomOverlay",0);
+ return nRead;
+ }
+ for (k=0;k<rowWire.num_keys;k++) {
+ tmp= fread(&keyWire,SIZEOF(xkmOverlayKeyDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmOverlayKeyDesc);
+ memcpy(row->keys[k].over.name,keyWire.over,XkbKeyNameLength);
+ memcpy(row->keys[k].under.name,keyWire.under,XkbKeyNameLength);
+ }
+ row->num_keys= rowWire.num_keys;
+ }
+ return nRead;
+}
+
+static int
+ReadXkmGeomSection( FILE * file,
+ XkbGeometryPtr geom)
+{
+register int i;
+XkbSectionPtr section;
+xkmSectionDesc sectionWire;
+unsigned tmp;
+int nRead= 0;
+char buf[100];
+Atom nameAtom;
+
+ nRead+= XkmGetCountedString(file,buf,100);
+ nameAtom= XkbInternAtom(buf,FALSE);
+ tmp= fread(&sectionWire,SIZEOF(xkmSectionDesc),1,file);
+ nRead+= SIZEOF(xkmSectionDesc)*tmp;
+ section= XkbAddGeomSection(geom,nameAtom,sectionWire.num_rows,
+ sectionWire.num_doodads,
+ sectionWire.num_overlays);
+ if (!section) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeomSection",0);
+ return nRead;
+ }
+ section->top= sectionWire.top;
+ section->left= sectionWire.left;
+ section->width= sectionWire.width;
+ section->height= sectionWire.height;
+ section->angle= sectionWire.angle;
+ section->priority= sectionWire.priority;
+ if (sectionWire.num_rows>0) {
+ register int k;
+ XkbRowPtr row;
+ xkmRowDesc rowWire;
+ XkbKeyPtr key;
+ xkmKeyDesc keyWire;
+
+ for (i=0;i<sectionWire.num_rows;i++) {
+ tmp= fread(&rowWire,SIZEOF(xkmRowDesc),1,file);
+ nRead+= SIZEOF(xkmRowDesc)*tmp;
+ row= XkbAddGeomRow(section,rowWire.num_keys);
+ if (!row) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeycodes",0);
+ return nRead;
+ }
+ row->top= rowWire.top;
+ row->left= rowWire.left;
+ row->vertical= rowWire.vertical;
+ for (k=0;k<rowWire.num_keys;k++) {
+ tmp= fread(&keyWire,SIZEOF(xkmKeyDesc),1,file);
+ nRead+= SIZEOF(xkmKeyDesc)*tmp;
+ key= XkbAddGeomKey(row);
+ if (!key) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeomSection",0);
+ return nRead;
+ }
+ memcpy(key->name.name,keyWire.name,XkbKeyNameLength);
+ key->gap= keyWire.gap;
+ key->shape_ndx= keyWire.shape_ndx;
+ key->color_ndx= keyWire.color_ndx;
+ }
+ }
+ }
+ if (sectionWire.num_doodads>0) {
+ for (i=0;i<sectionWire.num_doodads;i++) {
+ tmp= ReadXkmGeomDoodad(file,geom,section);
+ nRead+= tmp;
+ if (tmp<1)
+ return nRead;
+ }
+ }
+ if (sectionWire.num_overlays>0) {
+ for (i=0;i<sectionWire.num_overlays;i++) {
+ tmp= ReadXkmGeomOverlay(file,geom,section);
+ nRead+= tmp;
+ if (tmp<1)
+ return nRead;
+ }
+ }
+ return nRead;
+}
+
+static int
+ReadXkmGeometry(FILE *file,XkbDescPtr xkb)
+{
+register int i;
+char buf[100];
+unsigned tmp;
+int nRead= 0;
+xkmGeometryDesc wireGeom;
+XkbGeometryPtr geom;
+XkbGeometrySizesRec sizes;
+
+ nRead+= XkmGetCountedString(file,buf,100);
+ tmp= fread(&wireGeom,SIZEOF(xkmGeometryDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmGeometryDesc);
+ sizes.which= XkbGeomAllMask;
+ sizes.num_properties= wireGeom.num_properties;
+ sizes.num_colors= wireGeom.num_colors;
+ sizes.num_shapes= wireGeom.num_shapes;
+ sizes.num_sections= wireGeom.num_sections;
+ sizes.num_doodads= wireGeom.num_doodads;
+ sizes.num_key_aliases= wireGeom.num_key_aliases;
+ if (XkbAllocGeometry(xkb,&sizes)!=Success) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
+ return nRead;
+ }
+ geom= xkb->geom;
+ geom->name= XkbInternAtom(buf,FALSE);
+ geom->width_mm= wireGeom.width_mm;
+ geom->height_mm= wireGeom.height_mm;
+ nRead+= XkmGetCountedString(file,buf,100);
+ geom->label_font= Xstrdup(buf);
+ if (wireGeom.num_properties>0) {
+ char val[1024];
+ for (i=0;i<wireGeom.num_properties;i++) {
+ nRead+= XkmGetCountedString(file,buf,100);
+ nRead+= XkmGetCountedString(file,val,1024);
+ if (XkbAddGeomProperty(geom,buf,val)==NULL) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
+ return nRead;
+ }
+ }
+ }
+ if (wireGeom.num_colors>0) {
+ for (i=0;i<wireGeom.num_colors;i++) {
+ nRead+= XkmGetCountedString(file,buf,100);
+ if (XkbAddGeomColor(geom,buf,i)==NULL) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
+ return nRead;
+ }
+ }
+ }
+ geom->base_color= &geom->colors[wireGeom.base_color_ndx];
+ geom->label_color= &geom->colors[wireGeom.label_color_ndx];
+ if (wireGeom.num_shapes>0) {
+ XkbShapePtr shape;
+ xkmShapeDesc shapeWire;
+ Atom nameAtom;
+ for (i=0;i<wireGeom.num_shapes;i++) {
+ register int n;
+ XkbOutlinePtr ol;
+ xkmOutlineDesc olWire;
+ nRead+= XkmGetCountedString(file,buf,100);
+ nameAtom= XkbInternAtom(buf,FALSE);
+ tmp= fread(&shapeWire,SIZEOF(xkmShapeDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmShapeDesc);
+ shape= XkbAddGeomShape(geom,nameAtom,shapeWire.num_outlines);
+ if (!shape) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
+ return nRead;
+ }
+ for (n=0;n<shapeWire.num_outlines;n++) {
+ register int p;
+ xkmPointDesc ptWire;
+ tmp= fread(&olWire,SIZEOF(xkmOutlineDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmOutlineDesc);
+ ol= XkbAddGeomOutline(shape,olWire.num_points);
+ if (!ol) {
+ _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
+ return nRead;
+ }
+ ol->num_points= olWire.num_points;
+ ol->corner_radius= olWire.corner_radius;
+ for (p=0;p<olWire.num_points;p++) {
+ tmp= fread(&ptWire,SIZEOF(xkmPointDesc),1,file);
+ nRead+= tmp*SIZEOF(xkmPointDesc);
+ ol->points[p].x= ptWire.x;
+ ol->points[p].y= ptWire.y;
+ if (ptWire.x<shape->bounds.x1) shape->bounds.x1= ptWire.x;
+ if (ptWire.x>shape->bounds.x2) shape->bounds.x2= ptWire.x;
+ if (ptWire.y<shape->bounds.y1) shape->bounds.y1= ptWire.y;
+ if (ptWire.y>shape->bounds.y2) shape->bounds.y2= ptWire.y;
+ }
+ }
+ if (shapeWire.primary_ndx!=XkbNoShape)
+ shape->primary= &shape->outlines[shapeWire.primary_ndx];
+ if (shapeWire.approx_ndx!=XkbNoShape)
+ shape->approx= &shape->outlines[shapeWire.approx_ndx];
+ }
+ }
+ if (wireGeom.num_sections>0) {
+ for (i=0;i<wireGeom.num_sections;i++) {
+ tmp= ReadXkmGeomSection(file,geom);
+ nRead+= tmp;
+ if (tmp==0)
+ return nRead;
+ }
+ }
+ if (wireGeom.num_doodads>0) {
+ for (i=0;i<wireGeom.num_doodads;i++) {
+ tmp= ReadXkmGeomDoodad(file,geom,NULL);
+ nRead+= tmp;
+ if (tmp==0)
+ return nRead;
+ }
+ }
+ if ((wireGeom.num_key_aliases>0)&&(geom->key_aliases)) {
+ int sz= XkbKeyNameLength*2;
+ int num= wireGeom.num_key_aliases;
+ if (fread(geom->key_aliases,sz,num,file)!=num) {
+ _XkbLibError(_XkbErrBadLength,"ReadXkmGeometry",0);
+ return -1;
+ }
+ nRead+= (num*sz);
+ geom->num_key_aliases= num;
+ }
+ return nRead;
+}
+
+Bool
+XkmProbe(FILE *file)
+{
+unsigned hdr,tmp;
+int nRead=0;
+
+ hdr= (('x'<<24)|('k'<<16)|('m'<<8)|XkmFileVersion);
+ tmp= XkmGetCARD32(file,&nRead);
+ if (tmp!=hdr) {
+ if ((tmp&(~0xff))==(hdr&(~0xff))) {
+ _XkbLibError(_XkbErrBadFileVersion,"XkmProbe",tmp&0xff);
+ }
+ return 0;
+ }
+ return 1;
+}
+
+static Bool
+XkmReadTOC(FILE *file,xkmFileInfo* file_info,int max_toc,xkmSectionInfo *toc)
+{
+unsigned hdr,tmp;
+int nRead=0;
+unsigned i,size_toc;
+
+ hdr= (('x'<<24)|('k'<<16)|('m'<<8)|XkmFileVersion);
+ tmp= XkmGetCARD32(file,&nRead);
+ if (tmp!=hdr) {
+ if ((tmp&(~0xff))==(hdr&(~0xff))) {
+ _XkbLibError(_XkbErrBadFileVersion,"XkmReadTOC",tmp&0xff);
+ }
+ else {
+ _XkbLibError(_XkbErrBadFileType,"XkmReadTOC",tmp);
+ }
+ return 0;
+ }
+ fread(file_info,SIZEOF(xkmFileInfo),1,file);
+ size_toc= file_info->num_toc;
+ if (size_toc>max_toc) {
+ DebugF("Warning! Too many TOC entries; last %d ignored\n",
+ size_toc-max_toc);
+ size_toc= max_toc;
+ }
+ for (i=0;i<size_toc;i++) {
+ fread(&toc[i],SIZEOF(xkmSectionInfo),1,file);
+ }
+ return 1;
+}
+
+/***====================================================================***/
+
+#define MAX_TOC 16
+unsigned
+XkmReadFile(FILE *file,unsigned need,unsigned want,XkbDescPtr *xkb)
+{
+register unsigned i;
+xkmSectionInfo toc[MAX_TOC],tmpTOC;
+xkmFileInfo fileInfo;
+unsigned tmp,nRead=0;
+unsigned which= need|want;
+
+ if (!XkmReadTOC(file,&fileInfo,MAX_TOC,toc))
+ return which;
+ if ((fileInfo.present&need)!=need) {
+ _XkbLibError(_XkbErrIllegalContents,"XkmReadFile",
+ need&(~fileInfo.present));
+ return which;
+ }
+ if (*xkb==NULL)
+ *xkb= XkbAllocKeyboard();
+ for (i=0;i<fileInfo.num_toc;i++) {
+ fseek(file,toc[i].offset,SEEK_SET);
+ tmp= fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file);
+ nRead= tmp*SIZEOF(xkmSectionInfo);
+ if ((tmpTOC.type!=toc[i].type)||(tmpTOC.format!=toc[i].format)||
+ (tmpTOC.size!=toc[i].size)||(tmpTOC.offset!=toc[i].offset)) {
+ return which;
+ }
+ if ((which&(1<<tmpTOC.type))==0) {
+ continue;
+ }
+ switch (tmpTOC.type) {
+ case XkmVirtualModsIndex:
+ tmp= ReadXkmVirtualMods(file,*xkb,NULL);
+ break;
+ case XkmTypesIndex:
+ tmp= ReadXkmKeyTypes(file,*xkb,NULL);
+ break;
+ case XkmCompatMapIndex:
+ tmp= ReadXkmCompatMap(file,*xkb,NULL);
+ break;
+ case XkmKeyNamesIndex:
+ tmp= ReadXkmKeycodes(file,*xkb,NULL);
+ break;
+ case XkmIndicatorsIndex:
+ tmp= ReadXkmIndicators(file,*xkb,NULL);
+ break;
+ case XkmSymbolsIndex:
+ tmp= ReadXkmSymbols(file,*xkb);
+ break;
+ case XkmGeometryIndex:
+ tmp= ReadXkmGeometry(file,*xkb);
+ break;
+ default:
+ _XkbLibError(_XkbErrBadImplementation,
+ XkbConfigText(tmpTOC.type,XkbMessage),0);
+ tmp= 0;
+ break;
+ }
+ if (tmp>0) {
+ nRead+= tmp;
+ which&= ~(1<<toc[i].type);
+ (*xkb)->defined|= (1<<toc[i].type);
+ }
+ if (nRead!=tmpTOC.size) {
+ _XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage),
+ nRead-tmpTOC.size);
+ }
+ }
+ return which;
+}
diff --git a/xorg-server/xkeyboard-config/compat/default b/xorg-server/xkeyboard-config/compat/default.in
index 9527a31cf..4c4461fb9 100644
--- a/xorg-server/xkeyboard-config/compat/default
+++ b/xorg-server/xkeyboard-config/compat/default.in
@@ -1,12 +1,12 @@
-default xkb_compatibility "default" {
- include "basic"
- augment "mousekeys"
- augment "accessx(basic)"
- augment "misc"
- augment "iso9995"
- augment "level5"
-// ??should be changed/renamed/removed
-// augment "xfree86"
- augment "japan"
- augment "caps(caps_lock)"
-};
+default xkb_compatibility "default" {
+ include "basic"
+ augment "mousekeys"
+ augment "accessx(basic)"
+ augment "misc"
+ augment "iso9995"
+ augment "level5"
+// ??should be changed/renamed/removed
+// augment "xfree86"
+ augment "japan"
+ augment "caps(caps_lock)"
+};
diff --git a/xorg-server/xkeyboard-config/compat/makefile b/xorg-server/xkeyboard-config/compat/makefile
new file mode 100644
index 000000000..225163288
--- /dev/null
+++ b/xorg-server/xkeyboard-config/compat/makefile
@@ -0,0 +1,20 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+THISDIR=compat
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\$(THISDIR)
+
+dist_xkbdata_compat_DATA = \
+accessx basic caps complete \
+default iso9995 \
+japan keypad ledcaps \
+lednum ledscroll level5 \
+misc mousekeys norepeat \
+olpc pc pc98 xfree86 \
+xtest README
+
+DATA_FILES=$(dist_xkbdata_compat_DATA:%=$(DESTDIR)\%)
+
+include ..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/configure.in b/xorg-server/xkeyboard-config/configure.in
index 80af27564..4cb214f1a 100644
--- a/xorg-server/xkeyboard-config/configure.in
+++ b/xorg-server/xkeyboard-config/configure.in
@@ -1,96 +1,96 @@
-AC_INIT(xkeyboard-config, 2.1)
-AC_CONFIG_SRCDIR(rules/base.xml.in)
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AM_MAINTAINER_MODE
-
-AC_SUBST(VERSION)
-
-AC_PATH_PROG([XKBCOMP], [xkbcomp], [not_found])
-if test x$XKBCOMP = xnot_found ; then
- AC_ERROR([xkbcomp is required to install the xkb data files])
-fi
-
-AC_ARG_WITH( xkb_base,
- [AS_HELP_STRING([--with-xkb-base=DIR],[XKB base path @<:@DATADIR/X11/xkb@:>@])],
- xkb_base="$withval",
- xkb_base="${datadir}/X11/xkb" )
-
-AC_ARG_WITH( xkb_rules_symlink,
- [ --with-xkb-rules-symlink=NAME1(,NAME2)* create symlink(s) to "old style" rules files (xfree86 and/or xorg)],
- xkb_rules_symlink="$withval" )
-
-AC_ARG_ENABLE( compat_rules,
- [ --enable-compat-rules create compatibility rules],
- enable_compat_rules="$enableval",
- enable_compat_rules="yes" )
-
-AM_CONDITIONAL(CREATE_RULES_SYMLINK, test "x$xkb_rules_symlink" != "x")
-
-AM_CONDITIONAL(USE_COMPAT_RULES, test "x$enable_compat_rules" = "xyes")
-
-# ****
-# i18n
-# ****
-AC_PROG_INTLTOOL(0.30)
-
-GETTEXT_PACKAGE=xkeyboard-config
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
-
-AM_GLIB_GNU_GETTEXT
-
-ALL_LINGUAS="af az bg ca crh cs da de el en_GB eo es fi fr gl hu id it ka ko ky lt nb nl pl ro ru rw sk sl sq sr sv tr uk vi zh_CN zh_TW"
-
-AC_SUBST(xkb_base)
-AC_SUBST(xkb_rules_symlink)
-
-AC_OUTPUT([ po/Makefile.in
-Makefile
-compat/Makefile
-geometry/Makefile
-geometry/digital_vndr/Makefile
-geometry/sgi_vndr/Makefile
-keycodes/Makefile
-keycodes/digital_vndr/Makefile
-keycodes/sgi_vndr/Makefile
-keymap/Makefile
-keymap/digital_vndr/Makefile
-keymap/sgi_vndr/Makefile
-keymap/sun_vndr/Makefile
-semantics/Makefile
-rules/Makefile
-rules/bin/Makefile
-rules/compat/Makefile
-symbols/Makefile
-symbols/digital_vndr/Makefile
-symbols/fujitsu_vndr/Makefile
-symbols/hp_vndr/Makefile
-symbols/macintosh_vndr/Makefile
-symbols/nec_vndr/Makefile
-symbols/nokia_vndr/Makefile
-symbols/sgi_vndr/Makefile
-symbols/sony_vndr/Makefile
-symbols/sun_vndr/Makefile
-symbols/xfree68_vndr/Makefile
-types/Makefile
-xkeyboard-config.pc
-xkeyboard-config.spec
-docs/Makefile
-])
-
-echo '***********************************************************'
-echo " $PACKAGE_NAME is configured with the following parameters:"
-echo " XKB base directory: $xkb_base"
-if test -z "$xkb_rules_symlink" ; then
- echo " Symbolic link(s) to legacy rules are not created"
-else
- echo " Symbolic link(s) to legacy rules: $xkb_rules_symlink"
-fi
-
-if test "$enable_compat_rules" = "yes" ; then
- echo " Compatibility rules are included"
-else
- echo " Compatibility rules are not included"
-fi
-echo '***********************************************************'
-
+AC_INIT(xkeyboard-config, 2.1)
+AC_CONFIG_SRCDIR(rules/base.xml.in)
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+AC_SUBST(VERSION)
+
+AC_PATH_PROG([XKBCOMP], [xkbcomp], [not_found])
+if test x$XKBCOMP = xnot_found ; then
+ AC_ERROR([xkbcomp is required to install the xkb data files])
+fi
+
+AC_ARG_WITH( xkb_base,
+ [AS_HELP_STRING([--with-xkb-base=DIR],[XKB base path @<:@DATADIR/X11/xkb@:>@])],
+ xkb_base="$withval",
+ xkb_base="${datadir}/X11/xkb" )
+
+AC_ARG_WITH( xkb_rules_symlink,
+ [ --with-xkb-rules-symlink=NAME1(,NAME2)* create symlink(s) to "old style" rules files (xfree86 and/or xorg)],
+ xkb_rules_symlink="$withval" )
+
+AC_ARG_ENABLE( compat_rules,
+ [ --enable-compat-rules create compatibility rules],
+ enable_compat_rules="$enableval",
+ enable_compat_rules="yes" )
+
+AM_CONDITIONAL(CREATE_RULES_SYMLINK, test "x$xkb_rules_symlink" != "x")
+
+AM_CONDITIONAL(USE_COMPAT_RULES, test "x$enable_compat_rules" = "xyes")
+
+# ****
+# i18n
+# ****
+AC_PROG_INTLTOOL(0.30)
+
+GETTEXT_PACKAGE=xkeyboard-config
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
+
+AM_GLIB_GNU_GETTEXT
+
+ALL_LINGUAS="af az bg ca crh cs da de el en_GB eo es fi fr gl hu id it ka ko ky lt nb nl pl ro ru rw sk sl sq sr sv tr uk vi zh_CN zh_TW"
+
+AC_SUBST(xkb_base)
+AC_SUBST(xkb_rules_symlink)
+
+AC_OUTPUT([ po/Makefile.in
+Makefile
+compat/Makefile
+geometry/Makefile
+geometry/digital_vndr/Makefile
+geometry/sgi_vndr/Makefile
+keycodes/Makefile
+keycodes/digital_vndr/Makefile
+keycodes/sgi_vndr/Makefile
+keymap/Makefile
+keymap/digital_vndr/Makefile
+keymap/sgi_vndr/Makefile
+keymap/sun_vndr/Makefile
+semantics/Makefile
+rules/Makefile
+rules/bin/Makefile
+rules/compat/Makefile
+symbols/Makefile
+symbols/digital_vndr/Makefile
+symbols/fujitsu_vndr/Makefile
+symbols/hp_vndr/Makefile
+symbols/macintosh_vndr/Makefile
+symbols/nec_vndr/Makefile
+symbols/nokia_vndr/Makefile
+symbols/sgi_vndr/Makefile
+symbols/sony_vndr/Makefile
+symbols/sun_vndr/Makefile
+symbols/xfree68_vndr/Makefile
+types/Makefile
+xkeyboard-config.pc
+xkeyboard-config.spec
+docs/Makefile
+])
+
+echo '***********************************************************'
+echo " $PACKAGE_NAME is configured with the following parameters:"
+echo " XKB base directory: $xkb_base"
+if test -z "$xkb_rules_symlink" ; then
+ echo " Symbolic link(s) to legacy rules are not created"
+else
+ echo " Symbolic link(s) to legacy rules: $xkb_rules_symlink"
+fi
+
+if test "$enable_compat_rules" = "yes" ; then
+ echo " Compatibility rules are included"
+else
+ echo " Compatibility rules are not included"
+fi
+echo '***********************************************************'
+
diff --git a/xorg-server/xkeyboard-config/geometry/digital_vndr/makefile b/xorg-server/xkeyboard-config/geometry/digital_vndr/makefile
new file mode 100644
index 000000000..12d4c37fc
--- /dev/null
+++ b/xorg-server/xkeyboard-config/geometry/digital_vndr/makefile
@@ -0,0 +1,12 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\geometry\digital_vndr
+
+dist_geom_DATA = \
+lk pc unix
+
+DATA_FILES=$(dist_geom_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/geometry/makefile b/xorg-server/xkeyboard-config/geometry/makefile
new file mode 100644
index 000000000..896e186f4
--- /dev/null
+++ b/xorg-server/xkeyboard-config/geometry/makefile
@@ -0,0 +1,25 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+THISDIR=geometry
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\$(THISDIR)
+
+dist_xkbdata_geometry_DATA = \
+amiga ataritt chicony \
+dell everex fujitsu \
+hhk hp keytronic kinesis \
+macintosh microsoft nec nokia \
+northgate pc sanwa sony thinkpad \
+sun typematrix winbook README
+
+DATA_FILES=$(dist_xkbdata_geometry_DATA:%=$(DESTDIR)\%)
+
+SUBDIRS = digital_vndr sgi_vndr
+
+load_makefile $(SUBDIRS:%=%\makefile MAKESERVER=0 DEBUG=$(DEBUG);)
+
+extrastuff: $(SUBDIRS:%=%\all)
+
+include ..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/geometry/sgi_vndr/makefile b/xorg-server/xkeyboard-config/geometry/sgi_vndr/makefile
new file mode 100644
index 000000000..285067802
--- /dev/null
+++ b/xorg-server/xkeyboard-config/geometry/sgi_vndr/makefile
@@ -0,0 +1,13 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\geometry\sgi_vndr
+
+
+dist_geom_DATA = \
+indigo indy O2
+
+DATA_FILES=$(dist_geom_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/keycodes/digital_vndr/makefile b/xorg-server/xkeyboard-config/keycodes/digital_vndr/makefile
new file mode 100644
index 000000000..9cf1180e5
--- /dev/null
+++ b/xorg-server/xkeyboard-config/keycodes/digital_vndr/makefile
@@ -0,0 +1,12 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\keycodes\digital_vndr
+
+dist_keycodes_DATA = \
+lk pc
+
+DATA_FILES=$(dist_keycodes_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/keycodes/makefile b/xorg-server/xkeyboard-config/keycodes/makefile
new file mode 100644
index 000000000..f22e67a93
--- /dev/null
+++ b/xorg-server/xkeyboard-config/keycodes/makefile
@@ -0,0 +1,33 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+THISDIR=keycodes
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\$(THISDIR)
+
+SUBDIRS = digital_vndr sgi_vndr
+
+dist_xkbdata_keycodes_DATA = \
+aliases \
+amiga \
+ataritt \
+empty \
+evdev \
+fujitsu \
+hp \
+ibm \
+macintosh \
+sony \
+sun \
+xfree86 \
+xfree98 \
+README
+
+DATA_FILES=$(dist_xkbdata_keycodes_DATA:%=$(DESTDIR)\%)
+
+load_makefile $(SUBDIRS:%=%\makefile MAKESERVER=0 DEBUG=$(DEBUG);)
+
+extrastuff: $(SUBDIRS:%=%\all)
+
+include ..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/keycodes/sgi_vndr/makefile b/xorg-server/xkeyboard-config/keycodes/sgi_vndr/makefile
new file mode 100644
index 000000000..e6c1defda
--- /dev/null
+++ b/xorg-server/xkeyboard-config/keycodes/sgi_vndr/makefile
@@ -0,0 +1,12 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\keycodes\sgi_vndr
+
+dist_keycodes_DATA = \
+indigo indy iris
+
+DATA_FILES=$(dist_keycodes_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/keymap/digital_vndr/makefile b/xorg-server/xkeyboard-config/keymap/digital_vndr/makefile
new file mode 100644
index 000000000..09dd6f797
--- /dev/null
+++ b/xorg-server/xkeyboard-config/keymap/digital_vndr/makefile
@@ -0,0 +1,12 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\keymap\digital_vndr
+
+dist_keymap_DATA = \
+us
+
+DATA_FILES=$(dist_keymap_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/keymap/makefile b/xorg-server/xkeyboard-config/keymap/makefile
new file mode 100644
index 000000000..1b549a08f
--- /dev/null
+++ b/xorg-server/xkeyboard-config/keymap/makefile
@@ -0,0 +1,22 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+THISDIR=keymap
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\$(THISDIR)
+
+SUBDIRS = digital_vndr sgi_vndr sun_vndr
+
+dist_xkbdata_keymap_DATA = \
+amiga ataritt macintosh \
+sony xfree86 xfree98 \
+README
+
+DATA_FILES=$(dist_xkbdata_keymap_DATA:%=$(DESTDIR)\%)
+
+load_makefile $(SUBDIRS:%=%\makefile MAKESERVER=0 DEBUG=$(DEBUG);)
+
+extrastuff: $(SUBDIRS:%=%\all)
+
+include ..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/keymap/sgi_vndr/makefile b/xorg-server/xkeyboard-config/keymap/sgi_vndr/makefile
new file mode 100644
index 000000000..d2cb6083e
--- /dev/null
+++ b/xorg-server/xkeyboard-config/keymap/sgi_vndr/makefile
@@ -0,0 +1,20 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\keymap\sgi_vndr
+
+dist_keymap_DATA = \
+be bg ca \
+ch cz de \
+dk dvorak \
+es fi \
+fr gb \
+hu it jp \
+no pl pt \
+ru se sk \
+th us
+
+DATA_FILES=$(dist_keymap_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/keymap/sun_vndr/all b/xorg-server/xkeyboard-config/keymap/sun_vndr/all.in
index 71a1813eb..8415fe8ab 100644
--- a/xorg-server/xkeyboard-config/keymap/sun_vndr/all
+++ b/xorg-server/xkeyboard-config/keymap/sun_vndr/all.in
@@ -1,1091 +1,1091 @@
-// x86 KEYBOARDS
-//
-// Generally, x86 keyboards fall into either pc101 (101-key) or pc102
-// (102-key European) categories. Symbol tables are typically formed by
-// augmenting sun/us(pc101) or sun/us(pc102) with the "extra" symbols
-// from the type5 definition. Geometries and keycodes for many of
-// these fall under sun(x86) or sun(x86tuv).
-//
-// USB KEYBOARDS
-//
-// Only the keycodes (scancodes) change in the Universal Serial Bus
-// keyboard definitions. Symbols are kept the same as in the type5
-// case. The USB HID spec is confusing on this point, but the
-// scancodes described in it relate to physical keys, not symbols, as
-// it might lead one to believe.
-//
-// HOBO KEYBOARDS
-//
-// Hobo keyboards are derived from type5 keyboards, which in turn,
-// are all derived from the type5 US keyboard. Use the
-// appropriate set of keycodes and geometry (either type5hobo or
-// type5tuvhobo) and select the symbol set sun/us(type5hobo) to
-// replace sun/us(type5). For example, Sweden5_Hobo:
-//
-// xkb_keymap "Sweden5_Hobo" {
-// xkb_keycodes { include "sun(type5tuvhobo)" };
-// xkb_types { include "default" };
-// xkb_compatibility { include "default" };
-// xkb_symbols { include "sun/us(type5hobo)+sun/se(type5)"};
-// xkb_geometry { include "sun(type5tuvhobo)" };
-// };
-//
-// Doing it this way allows all the symbol changes for a particular
-// type5 keyboard to hold for a Hobo keyboard; both keyboards, in
-// this case, would use sun/se(type5) to augment the symbols in the
-// US keboard definition.
-
-xkb_keymap "Belgian6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+be" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Belgian6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+be" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Canada4" {
- xkb_keycodes { include "sun(type4_ca)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/ca(type4)" };
- xkb_geometry { include "sun(type4_ca)" };
-};
-
-xkb_keymap "Canada_Fr5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/ca(type5)"};
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Canada_Fr5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/ca(type5)"};
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Canada_Fr5_TBITS5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/ca(type5tbits5)"};
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Canada_Fr_x86" {
- xkb_keycodes { include "sun(x86ca)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc101)+sun/ca(x86)"};
- xkb_geometry { include "sun(x86ca)" };
-};
-
-xkb_keymap "Switzer_Fr4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/sw(type4fr)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "Switzer_Fr5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/sw(type5fr)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Switzer_Fr5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/sw(type5fr)"};
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Switzer_Fr6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/sw(type5fr)"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Switzer_Fr6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/sw(type5fr)"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Switzer_Fr_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+sun/sw(type5fr)"};
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "Switzer_Ge4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/sw(type4de)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "Switzer_Ge5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/sw(type5de)"};
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Switzer_Ge5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/sw(type5de)"};
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Switzer_Ge6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/sw(type5de)"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Switzer_Ge6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/sw(type5de)"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Switzer_Ge_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+sun/sw(type5de)"};
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "Czech5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/cz(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-
-xkb_keymap "Germany4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/de(type4)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "Germany5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+de" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Germany5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+de"};
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Germany6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+de" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Germany6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+de" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Germany_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+de"};
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "Denmark4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/dk(type4)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "Denmark5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/dk(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Denmark5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/dk(type5)" };
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Denmark6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/dk(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Denmark6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/dk(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Denmark_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+sun/dk(type5)" };
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "SpainLatAm4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/es(type4)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "Spain5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/es(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Spain5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/es(type5)"};
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Spain6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/es(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Spain6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/es(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Spain_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+sun/es(type5)" };
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-
-xkb_keymap "Finnish6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/fi"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Finnish6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/fi"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-
-xkb_keymap "FranceBelg4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/fr(type4)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "France5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/fr(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "France5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/fr(type5)"};
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "France6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/fr(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "France6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/fr(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "France_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+sun/fr(type5)" };
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "Greece5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/gr(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-
-xkb_keymap "Hungary5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5basic)+sun/hu(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-
-xkb_keymap "Italy4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/it(type4)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "Italy5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/it(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Italy5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/it(type5)"};
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Italy6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/it(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Italy6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/it(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Italy_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+sun/it(type5)" };
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "Japan4" {
- xkb_keycodes { include "sun(type4_jp)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/jp(type4)" };
- xkb_geometry { include "sun(type4jp)" };
-};
-
-xkb_keymap "Japan5" {
- xkb_keycodes { include "sun(type5_jp)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/jp(type5)" };
- xkb_geometry { include "sun(type5jp)" };
-};
-
-xkb_keymap "Japan5_Hobo" {
- xkb_keycodes { include "sun(type5_jphobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/jp(type5hobo)" };
- xkb_geometry { include "sun(type5jphobo)" };
-};
-
-xkb_keymap "Japan6" {
- xkb_keycodes { include "sun(type6_jp)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default+japan(kana_lock)" };
- xkb_symbols { include "sun/jp(type6)" };
- xkb_geometry { include "sun(type6jp)" };
-};
-
-xkb_keymap "Japan6_usb" {
- xkb_keycodes { include "sun(type6_jp_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default+japan(kana_lock)" };
- xkb_symbols { include "sun/jp(type6)" };
- xkb_geometry { include "sun(type6jp)" };
-};
-
-xkb_keymap "Japan_x86" {
- xkb_keycodes { include "sun(x86jp)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/jp(x86)" };
- xkb_geometry { include "sun(x86jp)" };
-};
-
-xkb_keymap "J3100" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/jp(J3100)" };
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "Japan_Muhenkan_x86" {
- xkb_keycodes { include "sun(x86jp)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/jp(Muhenkan_x86)" };
- xkb_geometry { include "sun(x86jp)" };
-};
-
-xkb_keymap "Korea4" {
- xkb_keycodes { include "sun(type4)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/ko(type4)" };
- xkb_geometry { include "sun(type4)" };
-};
-
-xkb_keymap "Korea5" {
- xkb_keycodes { include "sun(type5)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/ko(type5)" };
- xkb_geometry { include "sun(type5)" };
-};
-
-xkb_keymap "Korea5_Hobo" {
- xkb_keycodes { include "sun(type5hobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/ko(type5)"};
- xkb_geometry { include "sun(type5hobo)" };
-};
-
-xkb_keymap "Korea6" {
- xkb_keycodes { include "sun(type6)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/ko(type5)" };
- xkb_geometry { include "sun(type6)" };
-};
-
-xkb_keymap "Korea6_usb" {
- xkb_keycodes { include "sun(type6_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/ko(type5)" };
- xkb_geometry { include "sun(type6)" };
-};
-
-xkb_keymap "Korea_x86" {
- xkb_keycodes { include "sun(x86ko)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc101)+sun/ko(type5)" };
- xkb_geometry { include "sun(x86ko)" };
-};
-
-xkb_keymap "Lithuania5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5basic)+sun/lt(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-
-xkb_keymap "Latvia5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5basic)+sun/lv(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "MS_US101A_x86" {
- xkb_keycodes { include "sun(MS_x86)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc104)" };
- xkb_geometry { include "sun(MS_x86)" };
-};
-
-xkb_keymap "Netherland4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/nl(type4)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "Netherland5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+nl" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Netherland5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+nl" };
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Netherland6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+nl" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Netherland6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+nl" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Netherland_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+nl" };
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "Norway4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/no(type4)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "Norway5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/no(type5)"};
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Norway5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/no(type5)"};
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Norway6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/no(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Norway6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/no(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Norway_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+sun/no(type5)" };
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "Poland5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/pl" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Portugal4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/pt(type4)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "Portugal5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/pt(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Portugal5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/pt(type5)"};
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Portugal6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/pt(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Portugal6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/pt(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Portugal_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+sun/pt(type5)" };
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-// xkb_keymap "Russia4" {
-// xkb_keycodes { include "sun(type4)" };
-// xkb_types { include "default" };
-// xkb_compatibility { include "default" };
-// xkb_symbols { include "sun/ru" };
-// xkb_geometry { include "sun(type4)" };
-// };
-
-xkb_keymap "Russia5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/ru"};
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Russia6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/ru"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Russia6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/ru"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "SwedenFin4" {
- xkb_keycodes { include "sun(type4tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/se(type4)" };
- xkb_geometry { include "sun(type4tuv)" };
-};
-
-xkb_keymap "Sweden5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/se(type5)"};
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Sweden5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/se(type5)"};
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "Sweden6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/se(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Sweden6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/se(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Sweden_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+sun/se(type5)" };
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "Turkey5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/tr" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "Turkey6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/tr"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "Turkey6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/tr"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "TurkeyQ6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/tr(type6Q)"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "TurkeyQ6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/tr(type6Q)"};
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "TurkeyF6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/tr(type6F)"};
- xkb_geometry { include "sun(type6)" };
-};
-
-xkb_keymap "TurkeyF6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/tr(type6F)"};
- xkb_geometry { include "sun(type6)" };
-};
-
-xkb_keymap "Taiwan4" {
- xkb_keycodes { include "sun(type4)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/tw(type4)" };
- xkb_geometry { include "sun(type4)" };
-};
-
-xkb_keymap "Taiwan5" {
- xkb_keycodes { include "sun(type5)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/tw(type5)" };
- xkb_geometry { include "sun(type5)" };
-};
-
-xkb_keymap "Taiwan5_Hobo" {
- xkb_keycodes { include "sun(type5hobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/tw(type5)" };
- xkb_geometry { include "sun(type5hobo)" };
-};
-
-xkb_keymap "Taiwan6" {
- xkb_keycodes { include "sun(type6)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/tw(type5)" };
- xkb_geometry { include "sun(type6)" };
-};
-
-xkb_keymap "Taiwan6_usb" {
- xkb_keycodes { include "sun(type6_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/tw(type5)" };
- xkb_geometry { include "sun(type6)" };
-};
-
-xkb_keymap "Taiwan_x86" {
- xkb_keycodes { include "sun(x86)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "us(pc101)" };
- xkb_geometry { include "sun(x86)" };
-};
-
-xkb_keymap "UK4" {
- xkb_keycodes { include "sun(type4)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/gb(type4)" };
- xkb_geometry { include "sun(type4)" };
-};
-
-xkb_keymap "UK5" {
- xkb_keycodes { include "sun(type5tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)+sun/gb(type5)" };
- xkb_geometry { include "sun(type5tuv)" };
-};
-
-xkb_keymap "UK5_Hobo" {
- xkb_keycodes { include "sun(type5tuvhobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)+sun/gb(type5)" };
- xkb_geometry { include "sun(type5tuvhobo)" };
-};
-
-xkb_keymap "UK6" {
- xkb_keycodes { include "sun(type6tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type6)+sun/gb(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "UK6_usb" {
- xkb_keycodes { include "sun(type6tuv_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type6)+sun/gb(type5)" };
- xkb_geometry { include "sun(type6tuv)" };
-};
-
-xkb_keymap "UK_x86" {
- xkb_keycodes { include "sun(x86tuv)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc102)+gb" };
- xkb_geometry { include "sun(x86tuv)" };
-};
-
-xkb_keymap "US101A_PC" {
- xkb_keycodes { include "sun(type5x86)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc101)+sun/us(pc101currency)"};
- xkb_geometry { include "sun(x86)" };
-};
-
-xkb_keymap "US101A_Sun" {
- xkb_keycodes { include "sun(type5x86)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(pc101)+sun/us(US101A_Sun)" };
- xkb_geometry { include "sun(x86)" };
-};
-
-xkb_keymap "US101A_x86" {
- xkb_keycodes { include "sun(x86)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "us(pc101)" };
- xkb_geometry { include "sun(x86)" };
-};
-
-xkb_keymap "US4" {
- xkb_keycodes { include "sun(type4)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type4)" };
- xkb_geometry { include "sun(type4)" };
-};
-
-xkb_keymap "US5" {
- xkb_keycodes { include "sun(type5)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)" };
- xkb_geometry { include "sun(type5)" };
-};
-
-xkb_keymap "US5_Hobo" {
- xkb_keycodes { include "sun(type5hobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)" };
- xkb_geometry { include "sun(type5hobo)" };
-};
-
-xkb_keymap "US_UNIX5" {
- xkb_keycodes { include "sun(type5)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5)" };
- xkb_geometry { include "sun(type5unix)" };
-};
-
-xkb_keymap "US_UNIX5_Hobo" {
- // Same as US5_Hobo
- xkb_keycodes { include "sun(type5hobo)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type5hobo)" };
- xkb_geometry { include "sun(type5hobo)" };
-};
-
-xkb_keymap "US6" {
- xkb_keycodes { include "sun(type6)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type6)" };
- xkb_geometry { include "sun(type6)" };
-};
-
-xkb_keymap "US6_usb" {
- xkb_keycodes { include "sun(type6_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type6)" };
- xkb_geometry { include "sun(type6)" };
-};
-
-xkb_keymap "US_UNIX6" {
- xkb_keycodes { include "sun(type6)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type6)" };
- xkb_geometry { include "sun(type6unix)" };
-};
-
-xkb_keymap "US_UNIX6_usb" {
- xkb_keycodes { include "sun(type6_usb)" };
- xkb_types { include "default" };
- xkb_compatibility { include "default" };
- xkb_symbols { include "sun/us(type6)" };
- xkb_geometry { include "sun(type6unix)" };
-};
+// x86 KEYBOARDS
+//
+// Generally, x86 keyboards fall into either pc101 (101-key) or pc102
+// (102-key European) categories. Symbol tables are typically formed by
+// augmenting sun/us(pc101) or sun/us(pc102) with the "extra" symbols
+// from the type5 definition. Geometries and keycodes for many of
+// these fall under sun(x86) or sun(x86tuv).
+//
+// USB KEYBOARDS
+//
+// Only the keycodes (scancodes) change in the Universal Serial Bus
+// keyboard definitions. Symbols are kept the same as in the type5
+// case. The USB HID spec is confusing on this point, but the
+// scancodes described in it relate to physical keys, not symbols, as
+// it might lead one to believe.
+//
+// HOBO KEYBOARDS
+//
+// Hobo keyboards are derived from type5 keyboards, which in turn,
+// are all derived from the type5 US keyboard. Use the
+// appropriate set of keycodes and geometry (either type5hobo or
+// type5tuvhobo) and select the symbol set sun/us(type5hobo) to
+// replace sun/us(type5). For example, Sweden5_Hobo:
+//
+// xkb_keymap "Sweden5_Hobo" {
+// xkb_keycodes { include "sun(type5tuvhobo)" };
+// xkb_types { include "default" };
+// xkb_compatibility { include "default" };
+// xkb_symbols { include "sun/us(type5hobo)+sun/se(type5)"};
+// xkb_geometry { include "sun(type5tuvhobo)" };
+// };
+//
+// Doing it this way allows all the symbol changes for a particular
+// type5 keyboard to hold for a Hobo keyboard; both keyboards, in
+// this case, would use sun/se(type5) to augment the symbols in the
+// US keboard definition.
+
+xkb_keymap "Belgian6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+be" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Belgian6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+be" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Canada4" {
+ xkb_keycodes { include "sun(type4_ca)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/ca(type4)" };
+ xkb_geometry { include "sun(type4_ca)" };
+};
+
+xkb_keymap "Canada_Fr5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/ca(type5)"};
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Canada_Fr5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/ca(type5)"};
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Canada_Fr5_TBITS5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/ca(type5tbits5)"};
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Canada_Fr_x86" {
+ xkb_keycodes { include "sun(x86ca)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc101)+sun/ca(x86)"};
+ xkb_geometry { include "sun(x86ca)" };
+};
+
+xkb_keymap "Switzer_Fr4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/sw(type4fr)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "Switzer_Fr5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/sw(type5fr)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Switzer_Fr5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/sw(type5fr)"};
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Switzer_Fr6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/sw(type5fr)"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Switzer_Fr6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/sw(type5fr)"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Switzer_Fr_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+sun/sw(type5fr)"};
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "Switzer_Ge4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/sw(type4de)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "Switzer_Ge5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/sw(type5de)"};
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Switzer_Ge5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/sw(type5de)"};
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Switzer_Ge6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/sw(type5de)"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Switzer_Ge6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/sw(type5de)"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Switzer_Ge_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+sun/sw(type5de)"};
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "Czech5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/cz(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+
+xkb_keymap "Germany4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/de(type4)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "Germany5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+de" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Germany5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+de"};
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Germany6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+de" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Germany6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+de" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Germany_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+de"};
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "Denmark4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/dk(type4)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "Denmark5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/dk(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Denmark5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/dk(type5)" };
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Denmark6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/dk(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Denmark6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/dk(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Denmark_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+sun/dk(type5)" };
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "SpainLatAm4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/es(type4)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "Spain5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/es(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Spain5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/es(type5)"};
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Spain6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/es(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Spain6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/es(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Spain_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+sun/es(type5)" };
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+
+xkb_keymap "Finnish6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/fi"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Finnish6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/fi"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+
+xkb_keymap "FranceBelg4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/fr(type4)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "France5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/fr(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "France5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/fr(type5)"};
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "France6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/fr(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "France6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/fr(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "France_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+sun/fr(type5)" };
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "Greece5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/gr(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+
+xkb_keymap "Hungary5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5basic)+sun/hu(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+
+xkb_keymap "Italy4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/it(type4)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "Italy5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/it(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Italy5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/it(type5)"};
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Italy6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/it(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Italy6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/it(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Italy_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+sun/it(type5)" };
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "Japan4" {
+ xkb_keycodes { include "sun(type4_jp)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/jp(type4)" };
+ xkb_geometry { include "sun(type4jp)" };
+};
+
+xkb_keymap "Japan5" {
+ xkb_keycodes { include "sun(type5_jp)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/jp(type5)" };
+ xkb_geometry { include "sun(type5jp)" };
+};
+
+xkb_keymap "Japan5_Hobo" {
+ xkb_keycodes { include "sun(type5_jphobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/jp(type5hobo)" };
+ xkb_geometry { include "sun(type5jphobo)" };
+};
+
+xkb_keymap "Japan6" {
+ xkb_keycodes { include "sun(type6_jp)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default+japan(kana_lock)" };
+ xkb_symbols { include "sun/jp(type6)" };
+ xkb_geometry { include "sun(type6jp)" };
+};
+
+xkb_keymap "Japan6_usb" {
+ xkb_keycodes { include "sun(type6_jp_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default+japan(kana_lock)" };
+ xkb_symbols { include "sun/jp(type6)" };
+ xkb_geometry { include "sun(type6jp)" };
+};
+
+xkb_keymap "Japan_x86" {
+ xkb_keycodes { include "sun(x86jp)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/jp(x86)" };
+ xkb_geometry { include "sun(x86jp)" };
+};
+
+xkb_keymap "J3100" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/jp(J3100)" };
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "Japan_Muhenkan_x86" {
+ xkb_keycodes { include "sun(x86jp)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/jp(Muhenkan_x86)" };
+ xkb_geometry { include "sun(x86jp)" };
+};
+
+xkb_keymap "Korea4" {
+ xkb_keycodes { include "sun(type4)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/ko(type4)" };
+ xkb_geometry { include "sun(type4)" };
+};
+
+xkb_keymap "Korea5" {
+ xkb_keycodes { include "sun(type5)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/ko(type5)" };
+ xkb_geometry { include "sun(type5)" };
+};
+
+xkb_keymap "Korea5_Hobo" {
+ xkb_keycodes { include "sun(type5hobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/ko(type5)"};
+ xkb_geometry { include "sun(type5hobo)" };
+};
+
+xkb_keymap "Korea6" {
+ xkb_keycodes { include "sun(type6)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/ko(type5)" };
+ xkb_geometry { include "sun(type6)" };
+};
+
+xkb_keymap "Korea6_usb" {
+ xkb_keycodes { include "sun(type6_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/ko(type5)" };
+ xkb_geometry { include "sun(type6)" };
+};
+
+xkb_keymap "Korea_x86" {
+ xkb_keycodes { include "sun(x86ko)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc101)+sun/ko(type5)" };
+ xkb_geometry { include "sun(x86ko)" };
+};
+
+xkb_keymap "Lithuania5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5basic)+sun/lt(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+
+xkb_keymap "Latvia5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5basic)+sun/lv(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "MS_US101A_x86" {
+ xkb_keycodes { include "sun(MS_x86)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc104)" };
+ xkb_geometry { include "sun(MS_x86)" };
+};
+
+xkb_keymap "Netherland4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/nl(type4)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "Netherland5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+nl" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Netherland5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+nl" };
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Netherland6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+nl" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Netherland6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+nl" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Netherland_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+nl" };
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "Norway4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/no(type4)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "Norway5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/no(type5)"};
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Norway5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/no(type5)"};
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Norway6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/no(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Norway6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/no(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Norway_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+sun/no(type5)" };
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "Poland5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/pl" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Portugal4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/pt(type4)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "Portugal5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/pt(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Portugal5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/pt(type5)"};
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Portugal6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/pt(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Portugal6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/pt(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Portugal_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+sun/pt(type5)" };
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+// xkb_keymap "Russia4" {
+// xkb_keycodes { include "sun(type4)" };
+// xkb_types { include "default" };
+// xkb_compatibility { include "default" };
+// xkb_symbols { include "sun/ru" };
+// xkb_geometry { include "sun(type4)" };
+// };
+
+xkb_keymap "Russia5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/ru"};
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Russia6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/ru"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Russia6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/ru"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "SwedenFin4" {
+ xkb_keycodes { include "sun(type4tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/se(type4)" };
+ xkb_geometry { include "sun(type4tuv)" };
+};
+
+xkb_keymap "Sweden5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/se(type5)"};
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Sweden5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/se(type5)"};
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "Sweden6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/se(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Sweden6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/se(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Sweden_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+sun/se(type5)" };
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "Turkey5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/tr" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "Turkey6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/tr"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "Turkey6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/tr"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "TurkeyQ6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/tr(type6Q)"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "TurkeyQ6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/tr(type6Q)"};
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "TurkeyF6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/tr(type6F)"};
+ xkb_geometry { include "sun(type6)" };
+};
+
+xkb_keymap "TurkeyF6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/tr(type6F)"};
+ xkb_geometry { include "sun(type6)" };
+};
+
+xkb_keymap "Taiwan4" {
+ xkb_keycodes { include "sun(type4)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/tw(type4)" };
+ xkb_geometry { include "sun(type4)" };
+};
+
+xkb_keymap "Taiwan5" {
+ xkb_keycodes { include "sun(type5)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/tw(type5)" };
+ xkb_geometry { include "sun(type5)" };
+};
+
+xkb_keymap "Taiwan5_Hobo" {
+ xkb_keycodes { include "sun(type5hobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/tw(type5)" };
+ xkb_geometry { include "sun(type5hobo)" };
+};
+
+xkb_keymap "Taiwan6" {
+ xkb_keycodes { include "sun(type6)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/tw(type5)" };
+ xkb_geometry { include "sun(type6)" };
+};
+
+xkb_keymap "Taiwan6_usb" {
+ xkb_keycodes { include "sun(type6_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/tw(type5)" };
+ xkb_geometry { include "sun(type6)" };
+};
+
+xkb_keymap "Taiwan_x86" {
+ xkb_keycodes { include "sun(x86)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "us(pc101)" };
+ xkb_geometry { include "sun(x86)" };
+};
+
+xkb_keymap "UK4" {
+ xkb_keycodes { include "sun(type4)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/gb(type4)" };
+ xkb_geometry { include "sun(type4)" };
+};
+
+xkb_keymap "UK5" {
+ xkb_keycodes { include "sun(type5tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)+sun/gb(type5)" };
+ xkb_geometry { include "sun(type5tuv)" };
+};
+
+xkb_keymap "UK5_Hobo" {
+ xkb_keycodes { include "sun(type5tuvhobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)+sun/gb(type5)" };
+ xkb_geometry { include "sun(type5tuvhobo)" };
+};
+
+xkb_keymap "UK6" {
+ xkb_keycodes { include "sun(type6tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type6)+sun/gb(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "UK6_usb" {
+ xkb_keycodes { include "sun(type6tuv_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type6)+sun/gb(type5)" };
+ xkb_geometry { include "sun(type6tuv)" };
+};
+
+xkb_keymap "UK_x86" {
+ xkb_keycodes { include "sun(x86tuv)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc102)+gb" };
+ xkb_geometry { include "sun(x86tuv)" };
+};
+
+xkb_keymap "US101A_PC" {
+ xkb_keycodes { include "sun(type5x86)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc101)+sun/us(pc101currency)"};
+ xkb_geometry { include "sun(x86)" };
+};
+
+xkb_keymap "US101A_Sun" {
+ xkb_keycodes { include "sun(type5x86)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(pc101)+sun/us(US101A_Sun)" };
+ xkb_geometry { include "sun(x86)" };
+};
+
+xkb_keymap "US101A_x86" {
+ xkb_keycodes { include "sun(x86)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "us(pc101)" };
+ xkb_geometry { include "sun(x86)" };
+};
+
+xkb_keymap "US4" {
+ xkb_keycodes { include "sun(type4)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type4)" };
+ xkb_geometry { include "sun(type4)" };
+};
+
+xkb_keymap "US5" {
+ xkb_keycodes { include "sun(type5)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)" };
+ xkb_geometry { include "sun(type5)" };
+};
+
+xkb_keymap "US5_Hobo" {
+ xkb_keycodes { include "sun(type5hobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)" };
+ xkb_geometry { include "sun(type5hobo)" };
+};
+
+xkb_keymap "US_UNIX5" {
+ xkb_keycodes { include "sun(type5)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5)" };
+ xkb_geometry { include "sun(type5unix)" };
+};
+
+xkb_keymap "US_UNIX5_Hobo" {
+ // Same as US5_Hobo
+ xkb_keycodes { include "sun(type5hobo)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type5hobo)" };
+ xkb_geometry { include "sun(type5hobo)" };
+};
+
+xkb_keymap "US6" {
+ xkb_keycodes { include "sun(type6)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type6)" };
+ xkb_geometry { include "sun(type6)" };
+};
+
+xkb_keymap "US6_usb" {
+ xkb_keycodes { include "sun(type6_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type6)" };
+ xkb_geometry { include "sun(type6)" };
+};
+
+xkb_keymap "US_UNIX6" {
+ xkb_keycodes { include "sun(type6)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type6)" };
+ xkb_geometry { include "sun(type6unix)" };
+};
+
+xkb_keymap "US_UNIX6_usb" {
+ xkb_keycodes { include "sun(type6_usb)" };
+ xkb_types { include "default" };
+ xkb_compatibility { include "default" };
+ xkb_symbols { include "sun/us(type6)" };
+ xkb_geometry { include "sun(type6unix)" };
+};
diff --git a/xorg-server/xkeyboard-config/keymap/sun_vndr/makefile b/xorg-server/xkeyboard-config/keymap/sun_vndr/makefile
new file mode 100644
index 000000000..1dd8b4c45
--- /dev/null
+++ b/xorg-server/xkeyboard-config/keymap/sun_vndr/makefile
@@ -0,0 +1,20 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\keymap\sun_vndr
+
+dist_keymap_DATA = \
+all de es fi \
+fr no pl \
+ru se uk \
+us
+
+DATA_FILES=$(dist_keymap_DATA:%=$(DESTDIR)\%)
+
+# We need to make the rule for all explicit since searching it in the implicit rules doesn't work for all
+$(DESTDIR)\all: all.in
+ copy $< $@
+
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/makefile b/xorg-server/xkeyboard-config/makefile
new file mode 100644
index 000000000..94c550947
--- /dev/null
+++ b/xorg-server/xkeyboard-config/makefile
@@ -0,0 +1,9 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+SUBDIRS = compat geometry keycodes keymap rules semantics symbols types
+
+load_makefile $(SUBDIRS:%=%\makefile MAKESERVER=0 DEBUG=$(DEBUG);)
+
+all: $(SUBDIRS:%=%\all)
diff --git a/xorg-server/xkeyboard-config/rules/Makefile.am b/xorg-server/xkeyboard-config/rules/Makefile.am
index f2d73ce80..dcf9e3d90 100644
--- a/xorg-server/xkeyboard-config/rules/Makefile.am
+++ b/xorg-server/xkeyboard-config/rules/Makefile.am
@@ -1,236 +1,236 @@
-SUBDIRS = bin compat
-
-if CREATE_RULES_SYMLINK
-# extra_rules_file = $(xkb_rules_symlink)
-# extra_dir_file = $(extra_rules_file).xml
-# extra_lst_file = $(extra_rules_file).lst
-
-install-data-hook:
- for file in `echo "$(xkb_rules_symlink)" | sed 's/,/ /'` ; do \
- extra_rules_file=$$file ; \
- extra_dir_file=$$extra_rules_file.xml ; \
- extra_lst_file=$$extra_rules_file.lst ; \
- ln -sf base $(DESTDIR)$(rulesdir)/$$extra_rules_file ; \
- ln -sf base.lst $(DESTDIR)$(rulesdir)/$$extra_lst_file ; \
- ln -sf base.xml $(DESTDIR)$(rulesdir)/$$extra_dir_file ; \
- done
-
-else
-install-data-hook:
-
-endif
-
-if USE_COMPAT_RULES
-
-base_parts = base.hdr.part base.lists.part \
-compat/base.lists.part \
-HDR base.m_k.part \
-HDR base.l1_k.part \
-HDR base.l_k.part \
-HDR base.o_k.part \
-HDR base.ml_g.part \
-HDR base.m_g.part \
-HDR compat/base.mlv_s.part base.mlv_s.part \
-HDR compat/base.ml_s.part base.ml_s.part \
-HDR compat/base.ml1_s.part base.ml1_s.part \
-HDR compat/base.ml1v1_s.part \
-HDR compat/base.ml2_s.part base.ml2_s.part \
-HDR compat/base.ml3_s.part base.ml3_s.part \
-HDR compat/base.ml4_s.part base.ml4_s.part \
-HDR compat/base.ml2v2_s.part \
-HDR compat/base.ml3v3_s.part \
-HDR compat/base.ml4v4_s.part \
-HDR base.m_s.part \
-HDR compat/base.lv_c.part \
-HDR compat/base.l1v1_c.part \
-HDR compat/base.l2v2_c.part \
-HDR compat/base.l3v3_c.part \
-HDR compat/base.l4v4_c.part \
-HDR base.ml_c.part \
-HDR base.ml1_c.part \
-HDR base.m_t.part \
-HDR base.lo_s.part \
-HDR base.l1o_s.part \
-HDR base.l2o_s.part \
-HDR base.l3o_s.part \
-HDR base.l4o_s.part \
-HDR compat/base.o_s.part base.o_s.part \
-HDR base.o_c.part \
-HDR base.o_t.part
-
-evdev_parts = base.hdr.part base.lists.part \
-compat/base.lists.part \
-HDR evdev.m_k.part \
-HDR base.l1_k.part \
-HDR base.l_k.part \
-HDR base.o_k.part \
-HDR base.ml_g.part \
-HDR base.m_g.part \
-HDR compat/base.mlv_s.part base.mlv_s.part \
-HDR compat/base.ml_s.part base.ml_s.part \
-HDR compat/base.ml1_s.part base.ml1_s.part \
-HDR compat/base.ml1v1_s.part \
-HDR compat/base.ml2_s.part base.ml2_s.part \
-HDR compat/base.ml3_s.part base.ml3_s.part \
-HDR compat/base.ml4_s.part base.ml4_s.part \
-HDR compat/base.ml2v2_s.part \
-HDR compat/base.ml3v3_s.part \
-HDR compat/base.ml4v4_s.part \
-HDR evdev.m_s.part \
-HDR compat/base.lv_c.part \
-HDR compat/base.l1v1_c.part \
-HDR compat/base.l2v2_c.part \
-HDR compat/base.l3v3_c.part \
-HDR compat/base.l4v4_c.part \
-HDR base.ml_c.part \
-HDR base.ml1_c.part \
-HDR base.m_t.part \
-HDR base.lo_s.part \
-HDR base.l1o_s.part \
-HDR base.l2o_s.part \
-HDR base.l3o_s.part \
-HDR base.l4o_s.part \
-HDR compat/base.o_s.part base.o_s.part \
-HDR base.o_c.part \
-HDR base.o_t.part
-
-else
-
-base_parts = base.hdr.part base.lists.part \
-HDR base.m_k.part \
-HDR base.l1_k.part \
-HDR base.l_k.part \
-HDR \
-HDR base.ml_g.part \
-HDR base.m_g.part \
-HDR base.mlv_s.part \
-HDR base.ml_s.part \
-HDR base.ml1_s.part \
-HDR \
-HDR base.ml2_s.part \
-HDR base.ml3_s.part \
-HDR base.ml4_s.part \
-HDR \
-HDR \
-HDR \
-HDR base.m_s.part \
-HDR \
-HDR \
-HDR \
-HDR \
-HDR \
-HDR base.ml_c.part \
-HDR base.ml1_c.part \
-HDR base.m_t.part \
-HDR \
-HDR base.l1o_s.part \
-HDR base.l2o_s.part \
-HDR base.l3o_s.part \
-HDR base.l4o_s.part \
-HDR base.o_s.part \
-HDR base.o_c.part \
-HDR base.o_t.part
-
-evdev_parts = base.hdr.part base.lists.part \
-HDR evdev.m_k.part \
-HDR base.l1_k.part \
-HDR base.l_k.part \
-HDR \
-HDR base.ml_g.part \
-HDR base.m_g.part \
-HDR base.mlv_s.part \
-HDR base.ml_s.part \
-HDR base.ml1_s.part \
-HDR \
-HDR base.ml2_s.part \
-HDR base.ml3_s.part \
-HDR base.ml4_s.part \
-HDR \
-HDR \
-HDR \
-HDR evdev.m_s.part \
-HDR \
-HDR \
-HDR \
-HDR \
-HDR \
-HDR base.ml_c.part \
-HDR base.ml1_c.part \
-HDR base.m_t.part \
-HDR \
-HDR base.l1o_s.part \
-HDR base.l2o_s.part \
-HDR base.l3o_s.part \
-HDR base.l4o_s.part \
-HDR base.o_s.part \
-HDR base.o_c.part \
-HDR base.o_t.part
-
-endif
-
-all_parts_dist = HDR base.hdr.part \
-base.lists.part \
-base.m_k.part \
-base.l1_k.part \
-base.l_k.part \
-base.o_k.part \
-base.ml_g.part \
-base.m_g.part \
-base.mlv_s.part \
-base.ml_s.part \
-base.ml1_s.part \
-base.ml2_s.part \
-base.ml3_s.part \
-base.ml4_s.part \
-base.m_s.part \
-base.ml_c.part \
-base.ml1_c.part \
-base.m_t.part \
-base.lo_s.part \
-base.l1o_s.part \
-base.l2o_s.part \
-base.l3o_s.part \
-base.l4o_s.part \
-base.o_s.part \
-base.o_c.part \
-base.o_t.part \
-evdev.m_k.part \
-evdev.m_s.part
-
-rules_files = base evdev xfree98
-
-lst_files = base.lst evdev.lst
-
-%.lst: %.xml
- perl $(srcdir)/xml2lst.pl < $< > $@
-
-base: $(base_parts)
- HDR="$(srcdir)/HDR" $(srcdir)/merge.sh $@ $(base_parts)
-
-evdev: $(evdev_parts)
- HDR="$(srcdir)/HDR" $(srcdir)/merge.sh $@ $(evdev_parts)
-
-dist_files = xkb.dtd README
-
-rules_DATA = $(rules_files) $(lst_files) $(dist_files)
-
-xml_in_files = base.xml.in evdev.xml.in base.extras.xml.in evdev.extras.xml.in
-xml_DATA = $(xml_in_files:.xml.in=.xml)
-
-$(srcdir)/evdev.xml.in: base.xml.in
- cp $< $@
-
-$(srcdir)/evdev.extras.xml.in: base.extras.xml.in
- cp $< $@
-
-EXTRA_DIST= $(xml_in_files) xfree98 \
- $(all_parts_dist) \
- xml2lst.pl merge.sh $(dist_files)
-
-CLEANFILES = base base.xml base.lst evdev evdev.xml evdev.lst base.extras.xml evdev.extras.xml
-MAINTAINERCLEANFILES = $(srcdir)/evdev.xml.in $(srcdir)/evdev.extras.xml.in
-
-rulesdir = $(xkb_base)/rules
-xmldir = $(rulesdir)
-
-@INTLTOOL_XML_NOMERGE_RULE@
+SUBDIRS = bin compat
+
+if CREATE_RULES_SYMLINK
+# extra_rules_file = $(xkb_rules_symlink)
+# extra_dir_file = $(extra_rules_file).xml
+# extra_lst_file = $(extra_rules_file).lst
+
+install-data-hook:
+ for file in `echo "$(xkb_rules_symlink)" | sed 's/,/ /'` ; do \
+ extra_rules_file=$$file ; \
+ extra_dir_file=$$extra_rules_file.xml ; \
+ extra_lst_file=$$extra_rules_file.lst ; \
+ ln -sf base $(DESTDIR)$(rulesdir)/$$extra_rules_file ; \
+ ln -sf base.lst $(DESTDIR)$(rulesdir)/$$extra_lst_file ; \
+ ln -sf base.xml $(DESTDIR)$(rulesdir)/$$extra_dir_file ; \
+ done
+
+else
+install-data-hook:
+
+endif
+
+if USE_COMPAT_RULES
+
+base_parts = base.hdr.part base.lists.part \
+compat/base.lists.part \
+HDR base.m_k.part \
+HDR base.l1_k.part \
+HDR base.l_k.part \
+HDR base.o_k.part \
+HDR base.ml_g.part \
+HDR base.m_g.part \
+HDR compat/base.mlv_s.part base.mlv_s.part \
+HDR compat/base.ml_s.part base.ml_s.part \
+HDR compat/base.ml1_s.part base.ml1_s.part \
+HDR compat/base.ml1v1_s.part \
+HDR compat/base.ml2_s.part base.ml2_s.part \
+HDR compat/base.ml3_s.part base.ml3_s.part \
+HDR compat/base.ml4_s.part base.ml4_s.part \
+HDR compat/base.ml2v2_s.part \
+HDR compat/base.ml3v3_s.part \
+HDR compat/base.ml4v4_s.part \
+HDR base.m_s.part \
+HDR compat/base.lv_c.part \
+HDR compat/base.l1v1_c.part \
+HDR compat/base.l2v2_c.part \
+HDR compat/base.l3v3_c.part \
+HDR compat/base.l4v4_c.part \
+HDR base.ml_c.part \
+HDR base.ml1_c.part \
+HDR base.m_t.part \
+HDR base.lo_s.part \
+HDR base.l1o_s.part \
+HDR base.l2o_s.part \
+HDR base.l3o_s.part \
+HDR base.l4o_s.part \
+HDR compat/base.o_s.part base.o_s.part \
+HDR base.o_c.part \
+HDR base.o_t.part
+
+evdev_parts = base.hdr.part base.lists.part \
+compat/base.lists.part \
+HDR evdev.m_k.part \
+HDR base.l1_k.part \
+HDR base.l_k.part \
+HDR base.o_k.part \
+HDR base.ml_g.part \
+HDR base.m_g.part \
+HDR compat/base.mlv_s.part base.mlv_s.part \
+HDR compat/base.ml_s.part base.ml_s.part \
+HDR compat/base.ml1_s.part base.ml1_s.part \
+HDR compat/base.ml1v1_s.part \
+HDR compat/base.ml2_s.part base.ml2_s.part \
+HDR compat/base.ml3_s.part base.ml3_s.part \
+HDR compat/base.ml4_s.part base.ml4_s.part \
+HDR compat/base.ml2v2_s.part \
+HDR compat/base.ml3v3_s.part \
+HDR compat/base.ml4v4_s.part \
+HDR evdev.m_s.part \
+HDR compat/base.lv_c.part \
+HDR compat/base.l1v1_c.part \
+HDR compat/base.l2v2_c.part \
+HDR compat/base.l3v3_c.part \
+HDR compat/base.l4v4_c.part \
+HDR base.ml_c.part \
+HDR base.ml1_c.part \
+HDR base.m_t.part \
+HDR base.lo_s.part \
+HDR base.l1o_s.part \
+HDR base.l2o_s.part \
+HDR base.l3o_s.part \
+HDR base.l4o_s.part \
+HDR compat/base.o_s.part base.o_s.part \
+HDR base.o_c.part \
+HDR base.o_t.part
+
+else
+
+base_parts = base.hdr.part base.lists.part \
+HDR base.m_k.part \
+HDR base.l1_k.part \
+HDR base.l_k.part \
+HDR \
+HDR base.ml_g.part \
+HDR base.m_g.part \
+HDR base.mlv_s.part \
+HDR base.ml_s.part \
+HDR base.ml1_s.part \
+HDR \
+HDR base.ml2_s.part \
+HDR base.ml3_s.part \
+HDR base.ml4_s.part \
+HDR \
+HDR \
+HDR \
+HDR base.m_s.part \
+HDR \
+HDR \
+HDR \
+HDR \
+HDR \
+HDR base.ml_c.part \
+HDR base.ml1_c.part \
+HDR base.m_t.part \
+HDR \
+HDR base.l1o_s.part \
+HDR base.l2o_s.part \
+HDR base.l3o_s.part \
+HDR base.l4o_s.part \
+HDR base.o_s.part \
+HDR base.o_c.part \
+HDR base.o_t.part
+
+evdev_parts = base.hdr.part base.lists.part \
+HDR evdev.m_k.part \
+HDR base.l1_k.part \
+HDR base.l_k.part \
+HDR \
+HDR base.ml_g.part \
+HDR base.m_g.part \
+HDR base.mlv_s.part \
+HDR base.ml_s.part \
+HDR base.ml1_s.part \
+HDR \
+HDR base.ml2_s.part \
+HDR base.ml3_s.part \
+HDR base.ml4_s.part \
+HDR \
+HDR \
+HDR \
+HDR evdev.m_s.part \
+HDR \
+HDR \
+HDR \
+HDR \
+HDR \
+HDR base.ml_c.part \
+HDR base.ml1_c.part \
+HDR base.m_t.part \
+HDR \
+HDR base.l1o_s.part \
+HDR base.l2o_s.part \
+HDR base.l3o_s.part \
+HDR base.l4o_s.part \
+HDR base.o_s.part \
+HDR base.o_c.part \
+HDR base.o_t.part
+
+endif
+
+all_parts_dist = HDR base.hdr.part \
+base.lists.part \
+base.m_k.part \
+base.l1_k.part \
+base.l_k.part \
+base.o_k.part \
+base.ml_g.part \
+base.m_g.part \
+base.mlv_s.part \
+base.ml_s.part \
+base.ml1_s.part \
+base.ml2_s.part \
+base.ml3_s.part \
+base.ml4_s.part \
+base.m_s.part \
+base.ml_c.part \
+base.ml1_c.part \
+base.m_t.part \
+base.lo_s.part \
+base.l1o_s.part \
+base.l2o_s.part \
+base.l3o_s.part \
+base.l4o_s.part \
+base.o_s.part \
+base.o_c.part \
+base.o_t.part \
+evdev.m_k.part \
+evdev.m_s.part
+
+rules_files = base evdev xfree98
+
+lst_files = base.lst evdev.lst
+
+%.lst: %.xml
+ perl $(srcdir)/xml2lst.pl < $< > $@
+
+base: $(base_parts)
+ HDR="$(srcdir)/HDR" $(srcdir)/merge.sh $@ $(base_parts)
+
+evdev: $(evdev_parts)
+ HDR="$(srcdir)/HDR" $(srcdir)/merge.sh $@ $(evdev_parts)
+
+dist_files = xkb.dtd README
+
+rules_DATA = $(rules_files) $(lst_files) $(dist_files)
+
+xml_in_files = base.xml.in evdev.xml.in base.extras.xml.in evdev.extras.xml.in
+xml_DATA = $(xml_in_files:.xml.in=.xml)
+
+$(srcdir)/evdev.xml.in: base.xml.in
+ cp $< $@
+
+$(srcdir)/evdev.extras.xml.in: base.extras.xml.in
+ cp $< $@
+
+EXTRA_DIST= $(xml_in_files) xfree98 \
+ $(all_parts_dist) \
+ xml2lst.pl merge.sh $(dist_files)
+
+CLEANFILES = base base.xml base.lst evdev evdev.xml evdev.lst base.extras.xml evdev.extras.xml
+MAINTAINERCLEANFILES = $(srcdir)/evdev.xml.in $(srcdir)/evdev.extras.xml.in
+
+rulesdir = $(xkb_base)/rules
+xmldir = $(rulesdir)
+
+@INTLTOOL_XML_NOMERGE_RULE@
diff --git a/xorg-server/xkeyboard-config/rules/base.extras.xml.in b/xorg-server/xkeyboard-config/rules/base.extras.xml.in
index b068589fd..f72e4cf95 100644
--- a/xorg-server/xkeyboard-config/rules/base.extras.xml.in
+++ b/xorg-server/xkeyboard-config/rules/base.extras.xml.in
@@ -1,118 +1,118 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE xkbConfigRegistry SYSTEM "xkb.dtd">
-<xkbConfigRegistry>
- <modelList/>
- <layoutList>
- <layout>
- <configItem>
- <name>apl</name>
- <_shortDescription>APL</_shortDescription>
- <_description>APL</_description>
- <languageList><iso639Id>eng</iso639Id></languageList>
- </configItem>
- <variantList/>
- </layout>
- <layout>
- <configItem>
- <name>ir</name>
- <_shortDescription>Iran</_shortDescription>
- <_description>Iran</_description>
- <languageList><iso639Id>per</iso639Id></languageList>
- </configItem>
- <variantList>
- <variant>
- <configItem>
- <name>ave</name>
- <_description>Iran Avestan</_description>
- <languageList><iso639Id>ave</iso639Id></languageList>
- </configItem>
- </variant>
- </variantList>
- </layout>
- <layout>
- <configItem>
- <name>us</name>
- <_shortDescription>USA</_shortDescription>
- <_description>USA</_description>
- <languageList><iso639Id>eng</iso639Id></languageList>
- </configItem>
- <variantList>
- <variant>
- <configItem>
- <name>intl-unicode</name>
- <_description>USA International (AltGr Unicode combining)</_description>
- </configItem>
- </variant>
- <variant>
- <configItem>
- <name>alt-intl-unicode</name>
- <_description>USA International (AltGr Unicode combining, alternative)</_description>
- </configItem>
- </variant>
- <variant>
- <configItem>
- <name>ats</name>
- <_description>USA Atsina</_description>
- <!-- No ISO code in ISO639-2, only draft ISO693-3 -->
- </configItem>
- </variant>
- <variant>
- <configItem>
- <name>crd</name>
- <_description>USA Couer D'alene Salish</_description>
- <languageList><iso639Id>crd</iso639Id></languageList>
- </configItem>
- </variant>
- </variantList>
- </layout>
- <layout>
- <configItem>
- <name>ro</name>
- <_shortDescription>Rou</_shortDescription>
- <_description>Romania</_description>
- <languageList><iso639Id>rum</iso639Id></languageList>
- </configItem>
- <variantList>
- <variant>
- <configItem>
- <name>ergonomic</name>
- <_description>Ergonomic Touchtype</_description>
- </configItem>
- </variant>
- </variantList>
- </layout>
- <layout>
- <configItem>
- <name>rs</name>
- <_shortDescription>SRB</_shortDescription>
- <_description>Serbia</_description>
- <languageList><iso639Id>srp</iso639Id></languageList>
- </configItem>
- <variantList>
- <variant>
- <configItem>
- <name>combiningkeys</name>
- <_description>Serbia Combining accents instead of dead keys</_description>
- </configItem>
- </variant>
- </variantList>
- </layout>
- <layout>
- <configItem>
- <name>ru</name>
- <_shortDescription>Rus</_shortDescription>
- <_description>Russia</_description>
- </configItem>
- <variantList>
- <variant>
- <configItem>
- <name>chu</name>
- <description>Russia Church Slavonic</description>
- <languageList><iso639Id>chu</iso639Id></languageList>
- </configItem>
- </variant>
- </variantList>
- </layout>
- </layoutList>
- <optionList/>
-</xkbConfigRegistry>
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE xkbConfigRegistry SYSTEM "xkb.dtd">
+<xkbConfigRegistry>
+ <modelList/>
+ <layoutList>
+ <layout>
+ <configItem>
+ <name>apl</name>
+ <_shortDescription>APL</_shortDescription>
+ <_description>APL</_description>
+ <languageList><iso639Id>eng</iso639Id></languageList>
+ </configItem>
+ <variantList/>
+ </layout>
+ <layout>
+ <configItem>
+ <name>ir</name>
+ <_shortDescription>Iran</_shortDescription>
+ <_description>Iran</_description>
+ <languageList><iso639Id>per</iso639Id></languageList>
+ </configItem>
+ <variantList>
+ <variant>
+ <configItem>
+ <name>ave</name>
+ <_description>Iran Avestan</_description>
+ <languageList><iso639Id>ave</iso639Id></languageList>
+ </configItem>
+ </variant>
+ </variantList>
+ </layout>
+ <layout>
+ <configItem>
+ <name>us</name>
+ <_shortDescription>USA</_shortDescription>
+ <_description>USA</_description>
+ <languageList><iso639Id>eng</iso639Id></languageList>
+ </configItem>
+ <variantList>
+ <variant>
+ <configItem>
+ <name>intl-unicode</name>
+ <_description>USA International (AltGr Unicode combining)</_description>
+ </configItem>
+ </variant>
+ <variant>
+ <configItem>
+ <name>alt-intl-unicode</name>
+ <_description>USA International (AltGr Unicode combining, alternative)</_description>
+ </configItem>
+ </variant>
+ <variant>
+ <configItem>
+ <name>ats</name>
+ <_description>USA Atsina</_description>
+ <!-- No ISO code in ISO639-2, only draft ISO693-3 -->
+ </configItem>
+ </variant>
+ <variant>
+ <configItem>
+ <name>crd</name>
+ <_description>USA Couer D'alene Salish</_description>
+ <languageList><iso639Id>crd</iso639Id></languageList>
+ </configItem>
+ </variant>
+ </variantList>
+ </layout>
+ <layout>
+ <configItem>
+ <name>ro</name>
+ <_shortDescription>Rou</_shortDescription>
+ <_description>Romania</_description>
+ <languageList><iso639Id>rum</iso639Id></languageList>
+ </configItem>
+ <variantList>
+ <variant>
+ <configItem>
+ <name>ergonomic</name>
+ <_description>Ergonomic Touchtype</_description>
+ </configItem>
+ </variant>
+ </variantList>
+ </layout>
+ <layout>
+ <configItem>
+ <name>rs</name>
+ <_shortDescription>SRB</_shortDescription>
+ <_description>Serbia</_description>
+ <languageList><iso639Id>srp</iso639Id></languageList>
+ </configItem>
+ <variantList>
+ <variant>
+ <configItem>
+ <name>combiningkeys</name>
+ <_description>Serbia Combining accents instead of dead keys</_description>
+ </configItem>
+ </variant>
+ </variantList>
+ </layout>
+ <layout>
+ <configItem>
+ <name>ru</name>
+ <_shortDescription>Rus</_shortDescription>
+ <_description>Russia</_description>
+ </configItem>
+ <variantList>
+ <variant>
+ <configItem>
+ <name>chu</name>
+ <description>Russia Church Slavonic</description>
+ <languageList><iso639Id>chu</iso639Id></languageList>
+ </configItem>
+ </variant>
+ </variantList>
+ </layout>
+ </layoutList>
+ <optionList/>
+</xkbConfigRegistry>
diff --git a/xorg-server/xkeyboard-config/rules/base.ml_s.part b/xorg-server/xkeyboard-config/rules/base.ml_s.part
index 5d3b46d61..50ad6e57f 100644
--- a/xorg-server/xkeyboard-config/rules/base.ml_s.part
+++ b/xorg-server/xkeyboard-config/rules/base.ml_s.part
@@ -1,41 +1,41 @@
- ataritt $nonlatin = xfree68_vndr/ataritt(us)+%l%(v):2
- ataritt * = xfree68_vndr/ataritt(us)+%l%(v)
- amiga $nonlatin = xfree68_vndr/amiga(usa1)+%l%(v):2
- amiga * = xfree68_vndr/amiga(usa1)+%l%(v)
- classmate us = pc+%l(classmate)
- empty * = empty(basic)
- * empty = empty(basic)
- sun4 $nonlatin = latin+sun_vndr/us(type4)+%l%(v):2
- sun4 * = latin+sun_vndr/us(type4)+%l%(v)
- sun5 $nonlatin = latin+sun_vndr/us(type5)+%l%(v):2
- sun5 * = latin+sun_vndr/us(type5)+%l%(v)
- sun6 us = pc+sun_vndr/us(type6)
- sun6 en_US = pc+sun_vndr/us(type6)+iso9995-3(basic)
- sun6 $sun_t6_custom = pc+sun_vndr/us(type6)+sun_vndr/%l%(v)
- sun6 * = pc+sun_vndr/us(type6)+%l%(v)
- sun6euro us = pc+sun_vndr/us(type6)
- sun6euro en_US = pc+sun_vndr/us(type6)+iso9995-3(basic)
- sun6euro $sun_t6_custom = pc+sun_vndr/us(type6)+sun_vndr/%l%(v)
- sun6euro * = pc+sun_vndr/us(type6)+%l%(v)
- pc98 nec_vndr/jp = nec_vndr/jp(pc98)
- macintosh_old us = macintosh_vndr/us(oldmac)
- macintosh_old en_US = macintosh_vndr/us(oldmac)
- macintosh_old $macvendorlayouts = macintosh_vndr/us(oldmac)+macintosh_vndr/%l%(v)
- macintosh_old $nonlatin = macintosh_vndr/us(oldmac)+%l%(v):2
- macintosh_old * = macintosh_vndr/us(oldmac)+%l%(v)
- applealu_jis jp = macintosh_vndr/apple(alukbd)+macintosh_vndr/jp(usmac)+macintosh_vndr/jp(mac):2
- applealu_jis * = macintosh_vndr/apple(alukbd)+%l%(v)+macintosh_vndr/jp(mac):2
- $applealu $macvendorlayouts = macintosh_vndr/apple(alukbd)+macintosh_vndr/%l%(v)
- $applealu * = macintosh_vndr/apple(alukbd)+%l%(v)
- $macs en_US = pc+macintosh_vndr/us(extended)
- $macs $macvendorlayouts = pc+macintosh_vndr/%l%(v)
- nokiarx44 * = nokia_vndr/rx-44(%l)
- nokiarx51 cz(qwerty) = nokia_vndr/rx-51(common)+nokia_vndr/rx-51(cz_qwerty)
- nokiarx51 * = nokia_vndr/rx-51(common)+nokia_vndr/rx-51(%l%_v)
- nokiasu8w * = nokia_vndr/su-8w(%l)
- olpc $olpclayouts = olpc+%l%(m)
- olpc * = olpc+%l%(v)
- $thinkpads br = pc+br(thinkpad)
- htcdream $htcdreamlayouts = %l(htcdream)
- * $nonlatin = pc+us+%l%(v):2
- * * = pc+%l%(v)
+ ataritt $nonlatin = xfree68_vndr/ataritt(us)+%l%(v):2
+ ataritt * = xfree68_vndr/ataritt(us)+%l%(v)
+ amiga $nonlatin = xfree68_vndr/amiga(usa1)+%l%(v):2
+ amiga * = xfree68_vndr/amiga(usa1)+%l%(v)
+ classmate us = pc+%l(classmate)
+ empty * = empty(basic)
+ * empty = empty(basic)
+ sun4 $nonlatin = latin+sun_vndr/us(type4)+%l%(v):2
+ sun4 * = latin+sun_vndr/us(type4)+%l%(v)
+ sun5 $nonlatin = latin+sun_vndr/us(type5)+%l%(v):2
+ sun5 * = latin+sun_vndr/us(type5)+%l%(v)
+ sun6 us = pc+sun_vndr/us(type6)
+ sun6 en_US = pc+sun_vndr/us(type6)+iso9995-3(basic)
+ sun6 $sun_t6_custom = pc+sun_vndr/us(type6)+sun_vndr/%l%(v)
+ sun6 * = pc+sun_vndr/us(type6)+%l%(v)
+ sun6euro us = pc+sun_vndr/us(type6)
+ sun6euro en_US = pc+sun_vndr/us(type6)+iso9995-3(basic)
+ sun6euro $sun_t6_custom = pc+sun_vndr/us(type6)+sun_vndr/%l%(v)
+ sun6euro * = pc+sun_vndr/us(type6)+%l%(v)
+ pc98 nec_vndr/jp = nec_vndr/jp(pc98)
+ macintosh_old us = macintosh_vndr/us(oldmac)
+ macintosh_old en_US = macintosh_vndr/us(oldmac)
+ macintosh_old $macvendorlayouts = macintosh_vndr/us(oldmac)+macintosh_vndr/%l%(v)
+ macintosh_old $nonlatin = macintosh_vndr/us(oldmac)+%l%(v):2
+ macintosh_old * = macintosh_vndr/us(oldmac)+%l%(v)
+ applealu_jis jp = macintosh_vndr/apple(alukbd)+macintosh_vndr/jp(usmac)+macintosh_vndr/jp(mac):2
+ applealu_jis * = macintosh_vndr/apple(alukbd)+%l%(v)+macintosh_vndr/jp(mac):2
+ $applealu $macvendorlayouts = macintosh_vndr/apple(alukbd)+macintosh_vndr/%l%(v)
+ $applealu * = macintosh_vndr/apple(alukbd)+%l%(v)
+ $macs en_US = pc+macintosh_vndr/us(extended)
+ $macs $macvendorlayouts = pc+macintosh_vndr/%l%(v)
+ nokiarx44 * = nokia_vndr/rx-44(%l)
+ nokiarx51 cz(qwerty) = nokia_vndr/rx-51(common)+nokia_vndr/rx-51(cz_qwerty)
+ nokiarx51 * = nokia_vndr/rx-51(common)+nokia_vndr/rx-51(%l%_v)
+ nokiasu8w * = nokia_vndr/su-8w(%l)
+ olpc $olpclayouts = olpc+%l%(m)
+ olpc * = olpc+%l%(v)
+ $thinkpads br = pc+br(thinkpad)
+ htcdream $htcdreamlayouts = %l(htcdream)
+ * $nonlatin = pc+us+%l%(v):2
+ * * = pc+%l%(v)
diff --git a/xorg-server/xkeyboard-config/rules/base.o_s.part b/xorg-server/xkeyboard-config/rules/base.o_s.part
index 3e23396da..fc01ea82e 100644
--- a/xorg-server/xkeyboard-config/rules/base.o_s.part
+++ b/xorg-server/xkeyboard-config/rules/base.o_s.part
@@ -1,143 +1,143 @@
- altwin:menu = +altwin(menu)
- altwin:meta_alt = +altwin(meta_alt)
- altwin:ctrl_win = +altwin(ctrl_win)
- altwin:ctrl_alt_win = +altwin(ctrl_alt_win)
- altwin:meta_win = +altwin(meta_win)
- altwin:left_meta_win = +altwin(left_meta_win)
- altwin:hyper_win = +altwin(hyper_win)
- altwin:alt_super_win = +altwin(alt_super_win)
- altwin:swap_lalt_lwin = +altwin(swap_lalt_lwin)
- grp:switch = +group(switch)
- grp:lswitch = +group(lswitch)
- grp:win_switch = +group(win_switch)
- grp:lwin_switch = +group(lwin_switch)
- grp:rwin_switch = +group(rwin_switch)
- grp:toggle = +group(toggle)
- grp:shifts_toggle = +group(shifts_toggle)
- grp:ctrls_toggle = +group(ctrls_toggle)
- grp:alts_toggle = +group(alts_toggle)
- grp:ctrl_shift_toggle = +group(ctrl_shift_toggle)
- grp:lctrl_lshift_toggle = +group(lctrl_lshift_toggle)
- grp:rctrl_rshift_toggle = +group(rctrl_rshift_toggle)
- grp:caps_toggle = +capslock(grouplock)
- grp:caps_switch = +capslock(groupshift)
- grp:shift_caps_toggle = +group(shift_caps_toggle)
- grp:shift_caps_switch = +group(shift_caps_switch)
- grp:win_menu_switch = +group(win_menu_switch)
- grp:alt_caps_toggle = +group(alt_caps_toggle)
- grp:ctrl_alt_toggle = +group(ctrl_alt_toggle)
- grp:alt_shift_toggle = +group(alt_shift_toggle)
- grp:alt_space_toggle = +group(alt_space_toggle)
- grp:menu_toggle = +group(menu_toggle)
- grp:lwin_toggle = +group(lwin_toggle)
- grp:rwin_toggle = +group(rwin_toggle)
- grp:lshift_toggle = +group(lshift_toggle)
- grp:rshift_toggle = +group(rshift_toggle)
- grp:rctrl_switch = +group(rctrl_switch)
- grp:lctrl_toggle = +group(lctrl_toggle)
- grp:rctrl_toggle = +group(rctrl_toggle)
- grp:lalt_toggle = +group(lalt_toggle)
- grp:sclk_toggle = +group(sclk_toggle)
- grp:lctrl_rctrl_switch = +group(lctrl_rctrl_switch)
- grp:lctrl_lwin_rctrl_menu = +group(lctrl_lwin_rctrl_menu)
- lv3:switch = +level3(switch)
- lv3:ralt_switch = +level3(ralt_switch)
- lv3:ralt_switch_multikey = +level3(ralt_switch_multikey)
- lv3:ralt_alt = +level3(ralt_alt)
- lv3:lalt_switch = +level3(lalt_switch)
- lv3:alt_switch = +level3(alt_switch)
- lv3:menu_switch = +level3(menu_switch)
- lv3:win_switch = +level3(win_switch)
- lv3:lwin_switch = +level3(lwin_switch)
- lv3:rwin_switch = +level3(rwin_switch)
- lv3:enter_switch = +level3(enter_switch)
- caps:capslock = +capslock(capslock)
- caps:numlock = +capslock(numlock)
- caps:shiftlock = +capslock(shiftlock)
- caps:swapescape = +capslock(swapescape)
- caps:escape = +capslock(escape)
- caps:backspace = +capslock(backspace)
- caps:super = +capslock(super)
- caps:hyper = +capslock(hyper)
- caps:none = +capslock(none)
- caps:ctrl_modifier = +capslock(ctrl_modifier)
- ctrl:nocaps = +ctrl(nocaps)
- ctrl:lctrl_meta = +ctrl(lctrl_meta)
- ctrl:swapcaps = +ctrl(swapcaps)
- ctrl:ctrl_ac = +ctrl(ctrl_ac)
- ctrl:ctrl_aa = +ctrl(ctrl_aa)
- ctrl:ctrl_ra = +ctrl(ctrl_ra)
- ctrl:ctrl_menu = +ctrl(ctrl_menu)
- compose:ralt = +compose(ralt)
- compose:lwin = +compose(lwin)
- compose:rwin = +compose(rwin)
- compose:menu = +compose(menu)
- compose:lctrl = +compose(lctrl)
- compose:rctrl = +compose(rctrl)
- compose:caps = +compose(caps)
- compose:102 = +compose(102)
- compose:paus = +compose(paus)
- compose:prsc = +compose(prsc)
- compose:sclk = +compose(sclk)
- srvrkeys:none = +srvr_ctrl(no_srvr_keys)
- eurosign:e = +eurosign(e)
- eurosign:2 = +eurosign(2)
- eurosign:4 = +eurosign(4)
- eurosign:5 = +eurosign(5)
- rupeesign:4 = +rupeesign(4)
- keypad:oss = +keypad(oss)
- keypad:legacy = +keypad(legacy)
- keypad:legacy_wang = +keypad(legacy_wang)
- keypad:oss_wang = +keypad(oss_wang)
- keypad:future = +keypad(future)
- keypad:future_wang = +keypad(future_wang)
- keypad:hex = +keypad(ops)+keypad(hex)
- keypad:atm = +keypad(ops)+keypad(hex)+keypad(atm)
- nbsp:none = +nbsp(none)
- nbsp:level2 = +nbsp(level2)
- nbsp:level3 = +nbsp(level3)
- nbsp:level3s = +nbsp(level3s)
- nbsp:level3n = +nbsp(level3n)
- nbsp:level4 = +nbsp(level4)
- nbsp:level4n = +nbsp(level4n)
- nbsp:level4nl = +nbsp(level4nl)
- japan:nicola_f_bs = +jp(nicola_f_bs)
- kpdl:dot = +kpdl(dot)
- kpdl:comma = +kpdl(comma)
- kpdl:dotoss = +kpdl(dotoss)
- kpdl:dotoss_latin9 = +kpdl(dotoss_latin9)
- kpdl:commaoss = +kpdl(commaoss)
- kpdl:momayyezoss = +kpdl(momayyezoss)
- kpdl:kposs = +kpdl(kposs)
- kpdl:semi = +kpdl(semi)
- shift:breaks_caps = +shift(breaks_caps)
- esperanto:qwerty = +epo(qwerty)
- esperanto:dvorak = +epo(dvorak)
- terminate:ctrl_alt_bksp = +terminate(ctrl_alt_bksp)
- keypad:pointerkeys = +keypad(pointerkeys)
- apple:alupckeys = +macintosh_vndr/apple(alupckeys)
- shift:both_capslock = +shift(both_capslock)
- shift:lshift_both_capslock = +shift(lshift_both_capslock)
- shift:rshift_both_capslock = +shift(rshift_both_capslock)
- shift:both_capslock_cancel = +shift(both_capslock_cancel)
- shift:lshift_both_capslock_cancel = +shift(lshift_both_capslock_cancel)
- shift:rshift_both_capslock_cancel = +shift(rshift_both_capslock_cancel)
- shift:both_shiftlock = +shift(both_shiftlock)
- shift:lshift_both_shiftlock = +shift(lshift_both_shiftlock)
- shift:rshift_both_shiftlock = +shift(rshift_both_shiftlock)
- lv3:caps_switch = +level3(caps_switch)
- lv3:bksl_switch = +level3(bksl_switch)
- lv3:lsgt_switch = +level3(lsgt_switch)
- lv3:caps_switch_latch = +level3(caps_switch_latch)
- lv3:bksl_switch_latch = +level3(bksl_switch_latch)
- lv3:lsgt_switch_latch = +level3(lsgt_switch_latch)
- lv5:lsgt_switch_lock = +level5(lsgt_switch_lock)
- lv5:ralt_switch_lock = +level5(ralt_switch_lock)
- lv5:lwin_switch_lock = +level5(lwin_switch_lock)
- lv5:rwin_switch_lock = +level5(rwin_switch_lock)
- lv5:lsgt_switch_lock_cancel = +level5(lsgt_switch_lock_cancel)
- lv5:ralt_switch_lock_cancel = +level5(ralt_switch_lock_cancel)
- lv5:lwin_switch_lock_cancel = +level5(lwin_switch_lock_cancel)
- lv5:rwin_switch_lock_cancel = +level5(rwin_switch_lock_cancel)
-
-
+ altwin:menu = +altwin(menu)
+ altwin:meta_alt = +altwin(meta_alt)
+ altwin:ctrl_win = +altwin(ctrl_win)
+ altwin:ctrl_alt_win = +altwin(ctrl_alt_win)
+ altwin:meta_win = +altwin(meta_win)
+ altwin:left_meta_win = +altwin(left_meta_win)
+ altwin:hyper_win = +altwin(hyper_win)
+ altwin:alt_super_win = +altwin(alt_super_win)
+ altwin:swap_lalt_lwin = +altwin(swap_lalt_lwin)
+ grp:switch = +group(switch)
+ grp:lswitch = +group(lswitch)
+ grp:win_switch = +group(win_switch)
+ grp:lwin_switch = +group(lwin_switch)
+ grp:rwin_switch = +group(rwin_switch)
+ grp:toggle = +group(toggle)
+ grp:shifts_toggle = +group(shifts_toggle)
+ grp:ctrls_toggle = +group(ctrls_toggle)
+ grp:alts_toggle = +group(alts_toggle)
+ grp:ctrl_shift_toggle = +group(ctrl_shift_toggle)
+ grp:lctrl_lshift_toggle = +group(lctrl_lshift_toggle)
+ grp:rctrl_rshift_toggle = +group(rctrl_rshift_toggle)
+ grp:caps_toggle = +capslock(grouplock)
+ grp:caps_switch = +capslock(groupshift)
+ grp:shift_caps_toggle = +group(shift_caps_toggle)
+ grp:shift_caps_switch = +group(shift_caps_switch)
+ grp:win_menu_switch = +group(win_menu_switch)
+ grp:alt_caps_toggle = +group(alt_caps_toggle)
+ grp:ctrl_alt_toggle = +group(ctrl_alt_toggle)
+ grp:alt_shift_toggle = +group(alt_shift_toggle)
+ grp:alt_space_toggle = +group(alt_space_toggle)
+ grp:menu_toggle = +group(menu_toggle)
+ grp:lwin_toggle = +group(lwin_toggle)
+ grp:rwin_toggle = +group(rwin_toggle)
+ grp:lshift_toggle = +group(lshift_toggle)
+ grp:rshift_toggle = +group(rshift_toggle)
+ grp:rctrl_switch = +group(rctrl_switch)
+ grp:lctrl_toggle = +group(lctrl_toggle)
+ grp:rctrl_toggle = +group(rctrl_toggle)
+ grp:lalt_toggle = +group(lalt_toggle)
+ grp:sclk_toggle = +group(sclk_toggle)
+ grp:lctrl_rctrl_switch = +group(lctrl_rctrl_switch)
+ grp:lctrl_lwin_rctrl_menu = +group(lctrl_lwin_rctrl_menu)
+ lv3:switch = +level3(switch)
+ lv3:ralt_switch = +level3(ralt_switch)
+ lv3:ralt_switch_multikey = +level3(ralt_switch_multikey)
+ lv3:ralt_alt = +level3(ralt_alt)
+ lv3:lalt_switch = +level3(lalt_switch)
+ lv3:alt_switch = +level3(alt_switch)
+ lv3:menu_switch = +level3(menu_switch)
+ lv3:win_switch = +level3(win_switch)
+ lv3:lwin_switch = +level3(lwin_switch)
+ lv3:rwin_switch = +level3(rwin_switch)
+ lv3:enter_switch = +level3(enter_switch)
+ caps:capslock = +capslock(capslock)
+ caps:numlock = +capslock(numlock)
+ caps:shiftlock = +capslock(shiftlock)
+ caps:swapescape = +capslock(swapescape)
+ caps:escape = +capslock(escape)
+ caps:backspace = +capslock(backspace)
+ caps:super = +capslock(super)
+ caps:hyper = +capslock(hyper)
+ caps:none = +capslock(none)
+ caps:ctrl_modifier = +capslock(ctrl_modifier)
+ ctrl:nocaps = +ctrl(nocaps)
+ ctrl:lctrl_meta = +ctrl(lctrl_meta)
+ ctrl:swapcaps = +ctrl(swapcaps)
+ ctrl:ctrl_ac = +ctrl(ctrl_ac)
+ ctrl:ctrl_aa = +ctrl(ctrl_aa)
+ ctrl:ctrl_ra = +ctrl(ctrl_ra)
+ ctrl:ctrl_menu = +ctrl(ctrl_menu)
+ compose:ralt = +compose(ralt)
+ compose:lwin = +compose(lwin)
+ compose:rwin = +compose(rwin)
+ compose:menu = +compose(menu)
+ compose:lctrl = +compose(lctrl)
+ compose:rctrl = +compose(rctrl)
+ compose:caps = +compose(caps)
+ compose:102 = +compose(102)
+ compose:paus = +compose(paus)
+ compose:prsc = +compose(prsc)
+ compose:sclk = +compose(sclk)
+ srvrkeys:none = +srvr_ctrl(no_srvr_keys)
+ eurosign:e = +eurosign(e)
+ eurosign:2 = +eurosign(2)
+ eurosign:4 = +eurosign(4)
+ eurosign:5 = +eurosign(5)
+ rupeesign:4 = +rupeesign(4)
+ keypad:oss = +keypad(oss)
+ keypad:legacy = +keypad(legacy)
+ keypad:legacy_wang = +keypad(legacy_wang)
+ keypad:oss_wang = +keypad(oss_wang)
+ keypad:future = +keypad(future)
+ keypad:future_wang = +keypad(future_wang)
+ keypad:hex = +keypad(ops)+keypad(hex)
+ keypad:atm = +keypad(ops)+keypad(hex)+keypad(atm)
+ nbsp:none = +nbsp(none)
+ nbsp:level2 = +nbsp(level2)
+ nbsp:level3 = +nbsp(level3)
+ nbsp:level3s = +nbsp(level3s)
+ nbsp:level3n = +nbsp(level3n)
+ nbsp:level4 = +nbsp(level4)
+ nbsp:level4n = +nbsp(level4n)
+ nbsp:level4nl = +nbsp(level4nl)
+ japan:nicola_f_bs = +jp(nicola_f_bs)
+ kpdl:dot = +kpdl(dot)
+ kpdl:comma = +kpdl(comma)
+ kpdl:dotoss = +kpdl(dotoss)
+ kpdl:dotoss_latin9 = +kpdl(dotoss_latin9)
+ kpdl:commaoss = +kpdl(commaoss)
+ kpdl:momayyezoss = +kpdl(momayyezoss)
+ kpdl:kposs = +kpdl(kposs)
+ kpdl:semi = +kpdl(semi)
+ shift:breaks_caps = +shift(breaks_caps)
+ esperanto:qwerty = +epo(qwerty)
+ esperanto:dvorak = +epo(dvorak)
+ terminate:ctrl_alt_bksp = +terminate(ctrl_alt_bksp)
+ keypad:pointerkeys = +keypad(pointerkeys)
+ apple:alupckeys = +macintosh_vndr/apple(alupckeys)
+ shift:both_capslock = +shift(both_capslock)
+ shift:lshift_both_capslock = +shift(lshift_both_capslock)
+ shift:rshift_both_capslock = +shift(rshift_both_capslock)
+ shift:both_capslock_cancel = +shift(both_capslock_cancel)
+ shift:lshift_both_capslock_cancel = +shift(lshift_both_capslock_cancel)
+ shift:rshift_both_capslock_cancel = +shift(rshift_both_capslock_cancel)
+ shift:both_shiftlock = +shift(both_shiftlock)
+ shift:lshift_both_shiftlock = +shift(lshift_both_shiftlock)
+ shift:rshift_both_shiftlock = +shift(rshift_both_shiftlock)
+ lv3:caps_switch = +level3(caps_switch)
+ lv3:bksl_switch = +level3(bksl_switch)
+ lv3:lsgt_switch = +level3(lsgt_switch)
+ lv3:caps_switch_latch = +level3(caps_switch_latch)
+ lv3:bksl_switch_latch = +level3(bksl_switch_latch)
+ lv3:lsgt_switch_latch = +level3(lsgt_switch_latch)
+ lv5:lsgt_switch_lock = +level5(lsgt_switch_lock)
+ lv5:ralt_switch_lock = +level5(ralt_switch_lock)
+ lv5:lwin_switch_lock = +level5(lwin_switch_lock)
+ lv5:rwin_switch_lock = +level5(rwin_switch_lock)
+ lv5:lsgt_switch_lock_cancel = +level5(lsgt_switch_lock_cancel)
+ lv5:ralt_switch_lock_cancel = +level5(ralt_switch_lock_cancel)
+ lv5:lwin_switch_lock_cancel = +level5(lwin_switch_lock_cancel)
+ lv5:rwin_switch_lock_cancel = +level5(rwin_switch_lock_cancel)
+
+
diff --git a/xorg-server/xkeyboard-config/rules/bin/ml1_s.sh b/xorg-server/xkeyboard-config/rules/bin/ml1_s.sh
index b2d222432..b09459a5d 100644
--- a/xorg-server/xkeyboard-config/rules/bin/ml1_s.sh
+++ b/xorg-server/xkeyboard-config/rules/bin/ml1_s.sh
@@ -1,18 +1,9 @@
-#!/bin/sh
+@echo off
-INDIR=$1
-OUTFILE=base.ml1_s.part
+set OUTFILE=base.ml1_s.part
-> $OUTFILE
+if exist %OUTFILE% del %OUTFILE%
-awk '{
- if (index($2, "(") == 0) {
- printf " * %s = pc+%s%%(v[1])\n", $1, $2;
- } else {
- printf " * %s = pc+%s\n", $1, $2;
- }
-}' < $INDIR/layoutsMapping.lst >> $OUTFILE
+gawk "{ if (index($2, """(""") == 0) { printf """ * %%s = pc+%%s%%%%(v[1])\n""", $1, $2; } else { printf """ * %%s = pc+%%s\n""", $1, $2; }}" < layoutsMapping.lst >> %OUTFILE%
-awk '{
- printf " * %s(%s) = pc+%s(%s)\n", $1, $2, $3, $4;
-}' < $INDIR/variantsMapping.lst >> $OUTFILE
+gawk "{ printf """ * %%s(%%s) = pc+%%s(%%s)\n""", $1, $2, $3, $4; }" < variantsMapping.lst >> %OUTFILE%
diff --git a/xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh b/xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh
index 7c2b1a84c..4d492e02b 100644
--- a/xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh
+++ b/xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh
@@ -1,10 +1,7 @@
-#!/bin/sh
+@echo off
-INDIR=$1
-OUTFILE=base.ml1v1_s.part
+set OUTFILE=base.ml1v1_s.part
-> $OUTFILE
+if exist %OUTFILE% del %OUTFILE%
-awk '{
- printf " * %s %s = pc+%s(%s)\n", $1, $2, $3, $4;
-}' < $INDIR/variantsMapping.lst >> $OUTFILE
+gawk "{ printf """ * %%s %%s = pc+%%s(%%s)\n""", $1, $2, $3, $4; }" < variantsMapping.lst >> %OUTFILE%
diff --git a/xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh b/xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh
index 084d4c0be..cec1334c0 100644
--- a/xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh
+++ b/xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh
@@ -1,10 +1,7 @@
-#!/bin/sh
+@echo off
-INDIR=$1
-OUTFILE=base.ml1v_s.part
+set OUTFILE=base.ml1v_s.part
-> $OUTFILE
+if exist %OUTFILE% del %OUTFILE%
-awk '{
- printf " * %s %s = pc+%s(%s)\n", $1, $2, $3, $4;
-}' < $INDIR/variantsMapping.lst >> $OUTFILE
+gawk "{ printf """ * %%s %%s = pc+%%s(%%s)\n""", $1, $2, $3, $4; }" < variantsMapping.lst >> %OUTFILE%
diff --git a/xorg-server/xkeyboard-config/rules/bin/ml_s.sh b/xorg-server/xkeyboard-config/rules/bin/ml_s.sh
index 666ba870f..b7f0d9c46 100644
--- a/xorg-server/xkeyboard-config/rules/bin/ml_s.sh
+++ b/xorg-server/xkeyboard-config/rules/bin/ml_s.sh
@@ -1,14 +1,9 @@
-#!/bin/sh
+@echo off
-INDIR=$1
-OUTFILE=base.ml_s.part
+set OUTFILE=base.ml_s.part
-> $OUTFILE
+if exist %OUTFILE% del %OUTFILE%
-awk '{
- printf " * %s = pc+%s\n", $1, $2;
-}' < $INDIR/layoutsMapping.lst >> $OUTFILE
+gawk "{ printf """ * %%s = pc+%%s\n""", $1, $2; }" < layoutsMapping.lst >> %OUTFILE%
-awk '{
- printf " * %s(%s) = pc+%s(%s)\n", $1, $2, $3, $4;
-}' < $INDIR/variantsMapping.lst >> $OUTFILE
+gawk "{ printf """ * %%s(%%s) = pc+%%s(%%s)\n""", $1, $2, $3, $4; }" < variantsMapping.lst >> %OUTFILE%
diff --git a/xorg-server/xkeyboard-config/rules/bin/mln_s.sh b/xorg-server/xkeyboard-config/rules/bin/mln_s.sh
index 4a615fe7d..66794a4fc 100644
--- a/xorg-server/xkeyboard-config/rules/bin/mln_s.sh
+++ b/xorg-server/xkeyboard-config/rules/bin/mln_s.sh
@@ -1,20 +1,10 @@
-#!/bin/sh
+@echo off
+set variant=%1
-variant=$1
+set OUTFILE=base.ml%variant%_s.part
-INDIR=$2
-OUTFILE=base.ml${variant}_s.part
+if exist %OUTFILE% del %OUTFILE%
-> $OUTFILE
+echo "{ if (index($2, """(""") == 0) { printf """ * %%s = +%%s%%%%(v[%variant%]):%variant%\n""", $1, $2; } else { printf """ * %%s = +%%s:%variant%\n""", $1, $2; }}" < layoutsMapping.lst >> %OUTFILE%
-awk '{
- if (index($2, "(") == 0) {
- printf " * %s = +%s%%(v['${variant}']):'${variant}'\n", $1, $2;
- } else {
- printf " * %s = +%s:'${variant}'\n", $1, $2;
- }
-}' < $INDIR/layoutsMapping.lst >> $OUTFILE
-
-awk '{
- printf " * %s(%s) = +%s(%s):'${variant}'\n", $1, $2, $3, $4;
-}' < $INDIR/variantsMapping.lst >> $OUTFILE
+gawk "{ printf """ * %%s(%%s) = +%%s(%%s):%variant%\n""", $1, $2, $3, $4;}" < variantsMapping.lst >> %OUTFILE%
diff --git a/xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh b/xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh
index 30123874b..8e252943b 100644
--- a/xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh
+++ b/xorg-server/xkeyboard-config/rules/bin/mlnvn_s.sh
@@ -1,12 +1,8 @@
-#!/bin/sh
+@echo off
+set variant=%1
-variant=$1
+set OUTFILE=base.ml%variant%v%variant%_s.part
-INDIR=$2
-OUTFILE=base.ml${variant}v${variant}_s.part
+if exist %OUTFILE% del %OUTFILE%
-> $OUTFILE
-
-awk '{
- printf " * %s %s = +%s(%s):'${variant}'\n", $1, $2, $3, $4;
-}' < $INDIR/variantsMapping.lst >> $OUTFILE
+gawk "{ printf """ * %%s %%s = +%%s(%%s):%variant%\n""", $1, $2, $3, $4;}" < variantsMapping.lst >> %OUTFILE%
diff --git a/xorg-server/xkeyboard-config/rules/bin/mlv_s.sh b/xorg-server/xkeyboard-config/rules/bin/mlv_s.sh
index 5b466d59c..573cb930f 100644
--- a/xorg-server/xkeyboard-config/rules/bin/mlv_s.sh
+++ b/xorg-server/xkeyboard-config/rules/bin/mlv_s.sh
@@ -1,10 +1,7 @@
-#!/bin/sh
+@echo off
-INDIR=$1
-OUTFILE=base.mlv_s.part
+set OUTFILE=base.mlv_s.part
-> $OUTFILE
+if exist %OUTFILE% del %OUTFILE%
-awk '{
- printf " * %s %s = pc+%s(%s)\n", $1, $2, $3, $4;
-}' < $INDIR/variantsMapping.lst >> $OUTFILE
+gawk "{ printf """ * %%s %%s = pc+%%s(%%s)\n""", $1, $2, $3, $4; }" < variantsMapping.lst >> %OUTFILE%
diff --git a/xorg-server/xkeyboard-config/rules/compat/Makefile.am b/xorg-server/xkeyboard-config/rules/compat/Makefile.am
index 814bd25cf..37570e0da 100644
--- a/xorg-server/xkeyboard-config/rules/compat/Makefile.am
+++ b/xorg-server/xkeyboard-config/rules/compat/Makefile.am
@@ -1,67 +1,67 @@
-
-transform_files=layoutsMapping.lst variantsMapping.lst
-
-dist_parts=base.o_s.part \
-base.lv_c.part \
-base.l1v1_c.part \
-base.l2v2_c.part \
-base.l3v3_c.part \
-base.l4v4_c.part
-
-scripts_dir=$(srcdir)/../bin
-
-scripts= \
-base.ml2_s.part \
-base.ml3_s.part \
-base.ml4_s.part \
-base.ml2v2_s.part \
-base.ml3v3_s.part \
-base.ml4v4_s.part \
-base.ml_s.part \
-base.ml1_s.part \
-base.mlv_s.part \
-base.ml1v1_s.part
-
-if USE_COMPAT_RULES
-
-noinst_SCRIPTS=$(scripts) $(dist_parts)
-
-else
-
-noinst_SCRIPTS=
-
-endif
-
-base.ml2_s.part: $(scripts_dir)/mln_s.sh $(transform_files)
- sh $< 2 $(srcdir)
-
-base.ml3_s.part: $(scripts_dir)/mln_s.sh $(transform_files)
- sh $< 3 $(srcdir)
-
-base.ml4_s.part: $(scripts_dir)/mln_s.sh $(transform_files)
- sh $< 4 $(srcdir)
-
-base.ml2v2_s.part: $(scripts_dir)/mlnvn_s.sh $(transform_files)
- sh $< 2 $(srcdir)
-
-base.ml3v3_s.part: $(scripts_dir)/mlnvn_s.sh $(transform_files)
- sh $< 3 $(srcdir)
-
-base.ml4v4_s.part: $(scripts_dir)/mlnvn_s.sh $(transform_files)
- sh $< 4 $(srcdir)
-
-base.ml_s.part: $(scripts_dir)/ml_s.sh $(transform_files)
- sh $< $(srcdir)
-
-base.ml1_s.part: $(scripts_dir)/ml1_s.sh $(transform_files)
- sh $< $(srcdir)
-
-base.mlv_s.part: $(scripts_dir)/mlv_s.sh $(transform_files)
- sh $< $(srcdir)
-
-base.ml1v1_s.part: $(scripts_dir)/ml1v1_s.sh $(transform_files)
- sh $< $(srcdir)
-
-EXTRA_DIST=base.lists.part $(transform_files) $(dist_parts)
-
-CLEANFILES=$(scripts)
+
+transform_files=layoutsMapping.lst variantsMapping.lst
+
+dist_parts=base.o_s.part \
+base.lv_c.part \
+base.l1v1_c.part \
+base.l2v2_c.part \
+base.l3v3_c.part \
+base.l4v4_c.part
+
+scripts_dir=$(srcdir)/../bin
+
+scripts= \
+base.ml2_s.part \
+base.ml3_s.part \
+base.ml4_s.part \
+base.ml2v2_s.part \
+base.ml3v3_s.part \
+base.ml4v4_s.part \
+base.ml_s.part \
+base.ml1_s.part \
+base.mlv_s.part \
+base.ml1v1_s.part
+
+if USE_COMPAT_RULES
+
+noinst_SCRIPTS=$(scripts) $(dist_parts)
+
+else
+
+noinst_SCRIPTS=
+
+endif
+
+base.ml2_s.part: $(scripts_dir)/mln_s.sh $(transform_files)
+ sh $< 2 $(srcdir)
+
+base.ml3_s.part: $(scripts_dir)/mln_s.sh $(transform_files)
+ sh $< 3 $(srcdir)
+
+base.ml4_s.part: $(scripts_dir)/mln_s.sh $(transform_files)
+ sh $< 4 $(srcdir)
+
+base.ml2v2_s.part: $(scripts_dir)/mlnvn_s.sh $(transform_files)
+ sh $< 2 $(srcdir)
+
+base.ml3v3_s.part: $(scripts_dir)/mlnvn_s.sh $(transform_files)
+ sh $< 3 $(srcdir)
+
+base.ml4v4_s.part: $(scripts_dir)/mlnvn_s.sh $(transform_files)
+ sh $< 4 $(srcdir)
+
+base.ml_s.part: $(scripts_dir)/ml_s.sh $(transform_files)
+ sh $< $(srcdir)
+
+base.ml1_s.part: $(scripts_dir)/ml1_s.sh $(transform_files)
+ sh $< $(srcdir)
+
+base.mlv_s.part: $(scripts_dir)/mlv_s.sh $(transform_files)
+ sh $< $(srcdir)
+
+base.ml1v1_s.part: $(scripts_dir)/ml1v1_s.sh $(transform_files)
+ sh $< $(srcdir)
+
+EXTRA_DIST=base.lists.part $(transform_files) $(dist_parts)
+
+CLEANFILES=$(scripts)
diff --git a/xorg-server/xkeyboard-config/rules/compat/makefile b/xorg-server/xkeyboard-config/rules/compat/makefile
new file mode 100644
index 000000000..832ef5f80
--- /dev/null
+++ b/xorg-server/xkeyboard-config/rules/compat/makefile
@@ -0,0 +1,53 @@
+transform_files=layoutsMapping.lst variantsMapping.lst
+
+scripts_dir=..\bin
+
+SCRIPTS= \
+base.ml2_s.part \
+base.ml3_s.part \
+base.ml4_s.part \
+base.ml2v2_s.part \
+base.ml3v3_s.part \
+base.ml4v4_s.part \
+base.ml_s.part \
+base.ml1_s.part \
+base.mlv_s.part \
+base.ml1v1_s.part
+
+
+SH=cmd /c
+
+base.ml2_s.part: mln_s.bat $(transform_files)
+ $(SH) $< 2
+
+base.ml3_s.part: mln_s.bat $(transform_files)
+ $(SH) $< 3
+
+base.ml4_s.part: mln_s.bat $(transform_files)
+ $(SH) $< 4
+
+base.ml2v2_s.part: mlnvn_s.bat $(transform_files)
+ $(SH) $< 2
+
+base.ml3v3_s.part: mlnvn_s.bat $(transform_files)
+ $(SH) $< 3
+
+base.ml4v4_s.part: mlnvn_s.bat $(transform_files)
+ $(SH) $< 4
+
+base.ml_s.part: ml_s.bat $(transform_files)
+ $(SH) $<
+
+base.ml1_s.part: ml1_s.bat $(transform_files)
+ $(SH) $<
+
+base.mlv_s.part: mlv_s.bat $(transform_files)
+ $(SH) $<
+
+base.ml1v1_s.part: ml1v1_s.bat $(transform_files)
+ $(SH) $<
+
+%.bat: $(scripts_dir)\%.sh
+ copy $< $@
+
+all: $(SCRIPTS)
diff --git a/xorg-server/xkeyboard-config/rules/makefile b/xorg-server/xkeyboard-config/rules/makefile
new file mode 100644
index 000000000..c8b2f25c2
--- /dev/null
+++ b/xorg-server/xkeyboard-config/rules/makefile
@@ -0,0 +1,197 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+load_makefile compat\makefile DEBUG=$(DEBUG)
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\rules
+
+USE_COMPAT_RULES = 1
+
+if USE_COMPAT_RULES
+
+base_parts = base.hdr.part base.lists.part \
+compat/base.lists.part \
+HDR base.m_k.part \
+HDR base.l1_k.part \
+HDR base.l_k.part \
+HDR base.o_k.part \
+HDR base.ml_g.part \
+HDR base.m_g.part \
+HDR compat/base.mlv_s.part base.mlv_s.part \
+HDR compat/base.ml_s.part base.ml_s.part \
+HDR compat/base.ml1_s.part base.ml1_s.part \
+HDR compat/base.ml1v1_s.part \
+HDR compat/base.ml2_s.part base.ml2_s.part \
+HDR compat/base.ml3_s.part base.ml3_s.part \
+HDR compat/base.ml4_s.part base.ml4_s.part \
+HDR compat/base.ml2v2_s.part \
+HDR compat/base.ml3v3_s.part \
+HDR compat/base.ml4v4_s.part \
+HDR base.m_s.part \
+HDR compat/base.lv_c.part \
+HDR compat/base.l1v1_c.part \
+HDR compat/base.l2v2_c.part \
+HDR compat/base.l3v3_c.part \
+HDR compat/base.l4v4_c.part \
+HDR base.ml_c.part \
+HDR base.ml1_c.part \
+HDR base.m_t.part \
+HDR base.lo_s.part \
+HDR base.l1o_s.part \
+HDR base.l2o_s.part \
+HDR base.l3o_s.part \
+HDR base.l4o_s.part \
+HDR compat/base.o_s.part base.o_s.part \
+HDR base.o_c.part \
+HDR base.o_t.part
+
+evdev_parts = base.hdr.part base.lists.part \
+compat/base.lists.part \
+HDR evdev.m_k.part \
+HDR base.l1_k.part \
+HDR base.l_k.part \
+HDR base.o_k.part \
+HDR base.ml_g.part \
+HDR base.m_g.part \
+HDR compat/base.mlv_s.part base.mlv_s.part \
+HDR compat/base.ml_s.part base.ml_s.part \
+HDR compat/base.ml1_s.part base.ml1_s.part \
+HDR compat/base.ml1v1_s.part \
+HDR compat/base.ml2_s.part base.ml2_s.part \
+HDR compat/base.ml3_s.part base.ml3_s.part \
+HDR compat/base.ml4_s.part base.ml4_s.part \
+HDR compat/base.ml2v2_s.part \
+HDR compat/base.ml3v3_s.part \
+HDR compat/base.ml4v4_s.part \
+HDR evdev.m_s.part \
+HDR compat/base.lv_c.part \
+HDR compat/base.l1v1_c.part \
+HDR compat/base.l2v2_c.part \
+HDR compat/base.l3v3_c.part \
+HDR compat/base.l4v4_c.part \
+HDR base.ml_c.part \
+HDR base.ml1_c.part \
+HDR base.m_t.part \
+HDR base.lo_s.part \
+HDR base.l1o_s.part \
+HDR base.l2o_s.part \
+HDR base.l3o_s.part \
+HDR base.l4o_s.part \
+HDR compat/base.o_s.part base.o_s.part \
+HDR base.o_c.part \
+HDR base.o_t.part
+
+else
+
+base_parts = base.hdr.part base.lists.part \
+HDR base.m_k.part \
+HDR base.l1_k.part \
+HDR base.l_k.part \
+HDR \
+HDR base.ml_g.part \
+HDR base.m_g.part \
+HDR base.mlv_s.part \
+HDR base.ml_s.part \
+HDR base.ml1_s.part \
+HDR \
+HDR base.ml2_s.part \
+HDR base.ml3_s.part \
+HDR base.ml4_s.part \
+HDR \
+HDR \
+HDR \
+HDR base.m_s.part \
+HDR \
+HDR \
+HDR \
+HDR \
+HDR \
+HDR base.ml_c.part \
+HDR base.ml1_c.part \
+HDR base.m_t.part \
+HDR \
+HDR base.l1o_s.part \
+HDR base.l2o_s.part \
+HDR base.l3o_s.part \
+HDR base.l4o_s.part \
+HDR base.o_s.part \
+HDR base.o_c.part \
+HDR base.o_t.part
+
+evdev_parts = base.hdr.part base.lists.part \
+HDR evdev.m_k.part \
+HDR base.l1_k.part \
+HDR base.l_k.part \
+HDR \
+HDR base.ml_g.part \
+HDR base.m_g.part \
+HDR base.mlv_s.part \
+HDR base.ml_s.part \
+HDR base.ml1_s.part \
+HDR \
+HDR base.ml2_s.part \
+HDR base.ml3_s.part \
+HDR base.ml4_s.part \
+HDR \
+HDR \
+HDR \
+HDR evdev.m_s.part \
+HDR \
+HDR \
+HDR \
+HDR \
+HDR \
+HDR base.ml_c.part \
+HDR base.ml1_c.part \
+HDR base.m_t.part \
+HDR \
+HDR base.l1o_s.part \
+HDR base.l2o_s.part \
+HDR base.l3o_s.part \
+HDR base.l4o_s.part \
+HDR base.o_s.part \
+HDR base.o_c.part \
+HDR base.o_t.part
+
+endif
+rules_files = base evdev xfree98
+
+lst_files = base.lst evdev.lst
+
+$(DESTDIR)\%.lst: $(DESTDIR)\%.xml
+ perl xml2lst.pl < $< > $@
+
+$(DESTDIR)\base: compat\all $(base_parts)
+ merge $@ $(base_parts)
+
+$(DESTDIR)\evdev: compat\all $(evdev_parts)
+ merge $@ $(evdev_parts)
+
+dist_files = xkb.dtd README
+
+rules_DATA = $(rules_files) $(lst_files) $(dist_files)
+
+COMPATFILES=xorg xorg.xml xorg.lst
+$(DESTDIR)\xorg: $(DESTDIR)\base
+ copy $< $@
+$(DESTDIR)\xorg%: $(DESTDIR)\base%
+ copy $< $@
+
+rules_DATA := $(rules_DATA) $(COMPATFILES)
+
+xml_in_files = base.xml.in evdev.xml.in base.extras.xml.in evdev.extras.xml.in
+xml_DATA = $(xml_in_files:.xml.in=.xml)
+
+$(DESTDIR)\%.xml: %.xml.in
+ copy $< $@
+
+$(DESTDIR)\evdev.xml: base.xml.in
+ copy $< $@
+
+$(DESTDIR)\evdev.extras.xml: base.extras.xml.in
+ copy $< $@
+
+DATA_FILES=$(rules_DATA:%=$(DESTDIR)\%) $(xml_DATA:%=$(DESTDIR)\%)
+
+include ..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/rules/merge.py b/xorg-server/xkeyboard-config/rules/merge.py
new file mode 100644
index 000000000..442a866f2
--- /dev/null
+++ b/xorg-server/xkeyboard-config/rules/merge.py
@@ -0,0 +1,13 @@
+import sys
+
+pOUT=open(sys.argv[1],"wb")
+pHDR=open("HDR","r")
+for item in sys.argv[2:]:
+ if item == 'HDR':
+ pOUT.write("\n")
+ pOUT.write(pHDR.readline())
+ else:
+ pOUT.write(open(item,"rb").read())
+
+pOUT.close()
+
diff --git a/xorg-server/xkeyboard-config/rules/xkb.dtd b/xorg-server/xkeyboard-config/rules/xkb.dtd
index 0afa0df12..dcf35c947 100644
--- a/xorg-server/xkeyboard-config/rules/xkb.dtd
+++ b/xorg-server/xkeyboard-config/rules/xkb.dtd
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-
- Description: XKB configuration file DTD
- Author: Sergey V. Udaltsov
-
--->
-
-<!ELEMENT xkbConfigRegistry (modelList,layoutList,optionList)>
-
-<!ATTLIST xkbConfigRegistry
- version CDATA "1.1">
-
-<!ELEMENT modelList (model*)>
-
-<!ELEMENT model (configItem)>
-
-<!ELEMENT layoutList (layout*)>
-
-<!ELEMENT layout (configItem,variantList?)>
-
-<!ELEMENT optionList (group*)>
-
-<!ELEMENT variantList (variant*)>
-
-<!ELEMENT variant (configItem)>
-
-<!ELEMENT group (configItem,option*)>
-<!ATTLIST group
- allowMultipleSelection (true|false) "false">
-
-<!ELEMENT option (configItem)>
-
-<!ELEMENT configItem (name,shortDescription*,description*,vendor?,countryList?,languageList?)>
-
-<!ATTLIST configItem
- popularity (standard|exotic) "standard">
-
-<!ELEMENT name (#PCDATA)>
-
-<!ELEMENT shortDescription (#PCDATA)>
-
-<!ELEMENT description (#PCDATA)>
-
-<!ELEMENT vendor (#PCDATA)>
-
-<!ELEMENT countryList (iso3166Id+)>
-
-<!ELEMENT iso3166Id (#PCDATA)>
-
-<!ELEMENT languageList (iso639Id+)>
-
-<!ELEMENT iso639Id (#PCDATA)>
-
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ Description: XKB configuration file DTD
+ Author: Sergey V. Udaltsov
+
+-->
+
+<!ELEMENT xkbConfigRegistry (modelList,layoutList,optionList)>
+
+<!ATTLIST xkbConfigRegistry
+ version CDATA "1.1">
+
+<!ELEMENT modelList (model*)>
+
+<!ELEMENT model (configItem)>
+
+<!ELEMENT layoutList (layout*)>
+
+<!ELEMENT layout (configItem,variantList?)>
+
+<!ELEMENT optionList (group*)>
+
+<!ELEMENT variantList (variant*)>
+
+<!ELEMENT variant (configItem)>
+
+<!ELEMENT group (configItem,option*)>
+<!ATTLIST group
+ allowMultipleSelection (true|false) "false">
+
+<!ELEMENT option (configItem)>
+
+<!ELEMENT configItem (name,shortDescription*,description*,vendor?,countryList?,languageList?)>
+
+<!ATTLIST configItem
+ popularity (standard|exotic) "standard">
+
+<!ELEMENT name (#PCDATA)>
+
+<!ELEMENT shortDescription (#PCDATA)>
+
+<!ELEMENT description (#PCDATA)>
+
+<!ELEMENT vendor (#PCDATA)>
+
+<!ELEMENT countryList (iso3166Id+)>
+
+<!ELEMENT iso3166Id (#PCDATA)>
+
+<!ELEMENT languageList (iso639Id+)>
+
+<!ELEMENT iso639Id (#PCDATA)>
+
diff --git a/xorg-server/xkeyboard-config/rules/xml2lst.pl b/xorg-server/xkeyboard-config/rules/xml2lst.pl
index 0c6540d1e..3b5e10009 100644
--- a/xorg-server/xkeyboard-config/rules/xml2lst.pl
+++ b/xorg-server/xkeyboard-config/rules/xml2lst.pl
@@ -1,262 +1,262 @@
-#!/usr/bin/perl
-
-# converts the <rules>.xml file to the old format <rules>.lst file
-#
-# Usage:
-#
-# perl xml2lst.pl < filename.xml > filename.lst
-#
-# author Ivan Pascal
-
-$doc = new_document( 0, '');
-parse('', $doc);
-
-($reg) = node_by_name($doc, '/xkbConfigRegistry');
-@models = node_by_name($reg, 'modelList/model/configItem');
-@layouts = node_by_name($reg, 'layoutList/layout/configItem');
-@options = node_by_name($reg, 'optionList/group/configItem');
-
-print "! model\n";
-for $i (@models) {
- ($name) = node_by_name($i, 'name');
- ($descr) = node_by_name($i, 'description');
- printf(" %-15s %s\n", text_child($name), text_child($descr));
-}
-
-print "\n! layout\n";
-for $i (@layouts) {
- ($name) = node_by_name($i, 'name');
- ($descr) = node_by_name($i, 'description');
- printf(" %-15s %s\n", text_child($name), text_child($descr));
-}
-
-print "\n! variant\n";
-for $l (@layouts) {
- ($lname) = node_by_name($l, 'name');
- @variants = node_by_name($l, '../variantList/variant/configItem');
- for $v (@variants) {
- ($name) = node_by_name($v, 'name');
- ($descr) = node_by_name($v, 'description');
- printf(" %-15s %s: %s\n",
- text_child($name), text_child($lname), text_child($descr));
- }
-}
-
-print "\n! option\n";
-for $g (@options) {
- ($name) = node_by_name($g, 'name');
- ($descr) = node_by_name($g, 'description');
- printf(" %-20s %s\n", text_child($name), text_child($descr));
-
- @opts = node_by_name($g, '../option/configItem');
- for $o (@opts) {
- ($name) = node_by_name($o, 'name');
- ($descr) = node_by_name($o, 'description');
- printf(" %-20s %s\n",
- text_child($name), text_child($descr));
- }
-}
-
-sub with_attribute {
- local ($nodelist, $attrexpr) = @_;
- local ($attr, $value) = split (/=/, $attrexpr);
- local ($node, $attrvalue);
- if (defined $value && $value ne '') {
- $value =~ s/"//g;
- foreach $node (@{$nodelist}) {
- $attrvalue = node_attribute($node, $attr);
- if (defined $attrvalue && $attrvalue eq $value) {
- return $node;
- }
- }
- } else {
- foreach $node (@{$nodelist}) {
- if (! defined node_attribute($node, $attr)) {
- return $node;
- }
- }
- }
- undef;
-}
-
-# Subroutines
-
-sub parse {
- local $intag = 0;
- my (@node_stack, $parent);
- $parent = @_[1];
- local ($tag, $text);
-
- while (<>) {
- chomp;
- @str = split /([<>])/;
- shift @str if ($str[0] eq '' || $str[0] =~ /^[ \t]*$/);
-
- while (scalar @str) {
- $token = shift @str;
- if ($token eq '<') {
- $intag = 1;
- if (defined $text) {
- add_text_node($parent, $text);
- undef $text;
- }
- } elsif ($token eq '>') {
- $intag = 0;
- if ($tag =~ /^\/(.*)/) { # close tag
- $parent = pop @node_stack;
- } elsif ($tag =~ /^([^\/]*)\/$/) {
- empty_tag($parent, $1);
- } else {
- if (defined ($node = open_tag($parent, $tag))) {
- push @node_stack, $parent;
- $parent = $node;
- }
- }
- undef $tag;
- } else {
- if ($intag == 1) {
- if (defined $tag) {
- $tag .= ' '. $token;
- } else {
- $tag = $token;
- }
- } else {
- if (defined $text) {
- $text .= "\n" . $token;
- } else {
- $text = $token;
- }
- }
- }
- }
- }
-}
-
-sub new_document {
- $doc = new_node( 0, '', 'DOCUMENT');
- $doc->{CHILDREN} = [];
- return $doc;
-}
-
-sub new_node {
- local ($parent_node, $tag, $type) = @_;
-
- my %node;
- $node{PARENT} = $parent_node;
- $node{TYPE} = $type;
-
- if ($type eq 'COMMENT' || $type eq 'TEXT') {
- $node{TEXT} = $tag;
- $node{NAME} = $type;
- return \%node;
- }
-
- local ($tname, $attr) = split(' ', $tag, 2);
- $node{NAME} = $tname;
-
- if (defined $attr && $attr ne '') {
- my %attr_table;
- local @attr_list = split ( /"/, $attr);
- local ($name, $value);
- while (scalar @attr_list) {
- $name = shift @attr_list;
- $name =~ s/[ =]//g;
- next if ($name eq '');
- $value = shift @attr_list;
- $attr_table{$name} =$value;
- }
- $node{ATTRIBUTES} = \%attr_table;
- }
- return \%node;
-}
-
-sub add_node {
- local ($parent_node, $node) = @_;
- push @{$parent_node->{CHILDREN}}, $node;
-
- local $tname = $node->{NAME};
- if (defined $parent_node->{$tname}) {
- push @{$parent_node->{$tname}}, $node
- } else {
- $parent_node->{$tname} = [ $node ];
- }
-}
-
-sub empty_tag {
- local ($parent_node, $tag) = @_;
- local $node = new_node($parent_node, $tag, 'EMPTY');
- add_node($parent_node, $node);
-}
-
-sub open_tag {
- local ($parent_node, $tag) = @_;
- local $node;
-
- if ($tag =~ /^\?.*/ || $tag =~ /^\!.*/) {
- $node = new_node($parent_node, $tag, 'COMMENT');
- add_node($parent_node, $node);
- undef; return;
- } else {
- $node = new_node($parent_node, $tag, 'NODE');
- $node->{CHILDREN} = [];
- add_node($parent_node, $node);
- return $node;
- }
-}
-
-sub add_text_node {
- local ($parent_node, $text) = @_;
- local $node = new_node($parent_node, $text, 'TEXT');
- add_node($parent_node, $node);
-}
-
-sub node_by_name {
- local ($node, $name) = @_;
- local ($tagname, $path) = split(/\//, $name, 2);
-
- my @nodelist;
-
- if ($tagname eq '') {
- while ($node->{PARENT} != 0) {
- $node = $node->{PARENT};
- }
- sublist_by_name($node, $path, \@nodelist);
- } else {
- sublist_by_name($node, $name, \@nodelist);
- }
- return @nodelist;
-}
-
-sub sublist_by_name {
- local ($node, $name, $res) = @_;
- local ($tagname, $path) = split(/\//, $name, 2);
-
- if (! defined $path) {
- push @{$res}, (@{$node->{$tagname}});
- return;
- }
-
- if ($tagname eq '..' && $node->{PARENT} != 0) {
- $node = $node->{PARENT};
- sublist_by_name($node, $path, $res);
- } else {
- local $n;
- for $n (@{$node->{$tagname}}) {
- sublist_by_name($n, $path, $res);
- }
- }
-}
-
-sub node_attribute {
- local $node = @_[0];
- if (defined $node->{ATTRIBUTES}) {
- return $node->{ATTRIBUTES}{@_[1]};
- }
- undef;
-}
-
-sub text_child {
- local ($node) = @_;
- local ($child) = node_by_name($node, 'TEXT');
- return $child->{TEXT};
-}
+#!/usr/bin/perl
+
+# converts the <rules>.xml file to the old format <rules>.lst file
+#
+# Usage:
+#
+# perl xml2lst.pl < filename.xml > filename.lst
+#
+# author Ivan Pascal
+
+$doc = new_document( 0, '');
+parse('', $doc);
+
+($reg) = node_by_name($doc, '/xkbConfigRegistry');
+@models = node_by_name($reg, 'modelList/model/configItem');
+@layouts = node_by_name($reg, 'layoutList/layout/configItem');
+@options = node_by_name($reg, 'optionList/group/configItem');
+
+print "! model\n";
+for $i (@models) {
+ ($name) = node_by_name($i, 'name');
+ ($descr) = node_by_name($i, 'description');
+ printf(" %-15s %s\n", text_child($name), text_child($descr));
+}
+
+print "\n! layout\n";
+for $i (@layouts) {
+ ($name) = node_by_name($i, 'name');
+ ($descr) = node_by_name($i, 'description');
+ printf(" %-15s %s\n", text_child($name), text_child($descr));
+}
+
+print "\n! variant\n";
+for $l (@layouts) {
+ ($lname) = node_by_name($l, 'name');
+ @variants = node_by_name($l, '../variantList/variant/configItem');
+ for $v (@variants) {
+ ($name) = node_by_name($v, 'name');
+ ($descr) = node_by_name($v, 'description');
+ printf(" %-15s %s: %s\n",
+ text_child($name), text_child($lname), text_child($descr));
+ }
+}
+
+print "\n! option\n";
+for $g (@options) {
+ ($name) = node_by_name($g, 'name');
+ ($descr) = node_by_name($g, 'description');
+ printf(" %-20s %s\n", text_child($name), text_child($descr));
+
+ @opts = node_by_name($g, '../option/configItem');
+ for $o (@opts) {
+ ($name) = node_by_name($o, 'name');
+ ($descr) = node_by_name($o, 'description');
+ printf(" %-20s %s\n",
+ text_child($name), text_child($descr));
+ }
+}
+
+sub with_attribute {
+ local ($nodelist, $attrexpr) = @_;
+ local ($attr, $value) = split (/=/, $attrexpr);
+ local ($node, $attrvalue);
+ if (defined $value && $value ne '') {
+ $value =~ s/"//g;
+ foreach $node (@{$nodelist}) {
+ $attrvalue = node_attribute($node, $attr);
+ if (defined $attrvalue && $attrvalue eq $value) {
+ return $node;
+ }
+ }
+ } else {
+ foreach $node (@{$nodelist}) {
+ if (! defined node_attribute($node, $attr)) {
+ return $node;
+ }
+ }
+ }
+ undef;
+}
+
+# Subroutines
+
+sub parse {
+ local $intag = 0;
+ my (@node_stack, $parent);
+ $parent = @_[1];
+ local ($tag, $text);
+
+ while (<>) {
+ chomp;
+ @str = split /([<>])/;
+ shift @str if ($str[0] eq '' || $str[0] =~ /^[ \t]*$/);
+
+ while (scalar @str) {
+ $token = shift @str;
+ if ($token eq '<') {
+ $intag = 1;
+ if (defined $text) {
+ add_text_node($parent, $text);
+ undef $text;
+ }
+ } elsif ($token eq '>') {
+ $intag = 0;
+ if ($tag =~ /^\/(.*)/) { # close tag
+ $parent = pop @node_stack;
+ } elsif ($tag =~ /^([^\/]*)\/$/) {
+ empty_tag($parent, $1);
+ } else {
+ if (defined ($node = open_tag($parent, $tag))) {
+ push @node_stack, $parent;
+ $parent = $node;
+ }
+ }
+ undef $tag;
+ } else {
+ if ($intag == 1) {
+ if (defined $tag) {
+ $tag .= ' '. $token;
+ } else {
+ $tag = $token;
+ }
+ } else {
+ if (defined $text) {
+ $text .= "\n" . $token;
+ } else {
+ $text = $token;
+ }
+ }
+ }
+ }
+ }
+}
+
+sub new_document {
+ $doc = new_node( 0, '', 'DOCUMENT');
+ $doc->{CHILDREN} = [];
+ return $doc;
+}
+
+sub new_node {
+ local ($parent_node, $tag, $type) = @_;
+
+ my %node;
+ $node{PARENT} = $parent_node;
+ $node{TYPE} = $type;
+
+ if ($type eq 'COMMENT' || $type eq 'TEXT') {
+ $node{TEXT} = $tag;
+ $node{NAME} = $type;
+ return \%node;
+ }
+
+ local ($tname, $attr) = split(' ', $tag, 2);
+ $node{NAME} = $tname;
+
+ if (defined $attr && $attr ne '') {
+ my %attr_table;
+ local @attr_list = split ( /"/, $attr);
+ local ($name, $value);
+ while (scalar @attr_list) {
+ $name = shift @attr_list;
+ $name =~ s/[ =]//g;
+ next if ($name eq '');
+ $value = shift @attr_list;
+ $attr_table{$name} =$value;
+ }
+ $node{ATTRIBUTES} = \%attr_table;
+ }
+ return \%node;
+}
+
+sub add_node {
+ local ($parent_node, $node) = @_;
+ push @{$parent_node->{CHILDREN}}, $node;
+
+ local $tname = $node->{NAME};
+ if (defined $parent_node->{$tname}) {
+ push @{$parent_node->{$tname}}, $node
+ } else {
+ $parent_node->{$tname} = [ $node ];
+ }
+}
+
+sub empty_tag {
+ local ($parent_node, $tag) = @_;
+ local $node = new_node($parent_node, $tag, 'EMPTY');
+ add_node($parent_node, $node);
+}
+
+sub open_tag {
+ local ($parent_node, $tag) = @_;
+ local $node;
+
+ if ($tag =~ /^\?.*/ || $tag =~ /^\!.*/) {
+ $node = new_node($parent_node, $tag, 'COMMENT');
+ add_node($parent_node, $node);
+ undef; return;
+ } else {
+ $node = new_node($parent_node, $tag, 'NODE');
+ $node->{CHILDREN} = [];
+ add_node($parent_node, $node);
+ return $node;
+ }
+}
+
+sub add_text_node {
+ local ($parent_node, $text) = @_;
+ local $node = new_node($parent_node, $text, 'TEXT');
+ add_node($parent_node, $node);
+}
+
+sub node_by_name {
+ local ($node, $name) = @_;
+ local ($tagname, $path) = split(/\//, $name, 2);
+
+ my @nodelist;
+
+ if ($tagname eq '') {
+ while ($node->{PARENT} != 0) {
+ $node = $node->{PARENT};
+ }
+ sublist_by_name($node, $path, \@nodelist);
+ } else {
+ sublist_by_name($node, $name, \@nodelist);
+ }
+ return @nodelist;
+}
+
+sub sublist_by_name {
+ local ($node, $name, $res) = @_;
+ local ($tagname, $path) = split(/\//, $name, 2);
+
+ if (! defined $path) {
+ push @{$res}, (@{$node->{$tagname}});
+ return;
+ }
+
+ if ($tagname eq '..' && $node->{PARENT} != 0) {
+ $node = $node->{PARENT};
+ sublist_by_name($node, $path, $res);
+ } else {
+ local $n;
+ for $n (@{$node->{$tagname}}) {
+ sublist_by_name($n, $path, $res);
+ }
+ }
+}
+
+sub node_attribute {
+ local $node = @_[0];
+ if (defined $node->{ATTRIBUTES}) {
+ return $node->{ATTRIBUTES}{@_[1]};
+ }
+ undef;
+}
+
+sub text_child {
+ local ($node) = @_;
+ local ($child) = node_by_name($node, 'TEXT');
+ return $child->{TEXT};
+}
diff --git a/xorg-server/xkeyboard-config/semantics/default b/xorg-server/xkeyboard-config/semantics/default.in
index 2b8defc80..a6e70c991 100644
--- a/xorg-server/xkeyboard-config/semantics/default
+++ b/xorg-server/xkeyboard-config/semantics/default.in
@@ -1,6 +1,6 @@
-default xkb_semantics "default" {
-
-xkb_types { include "default" };
-xkb_compatibility { include "default" };
-
-};
+default xkb_semantics "default" {
+
+xkb_types { include "default" };
+xkb_compatibility { include "default" };
+
+};
diff --git a/xorg-server/xkeyboard-config/semantics/makefile b/xorg-server/xkeyboard-config/semantics/makefile
new file mode 100644
index 000000000..0181c169f
--- /dev/null
+++ b/xorg-server/xkeyboard-config/semantics/makefile
@@ -0,0 +1,17 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+THISDIR=semantics
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\$(THISDIR)
+
+dist_xkbdata_semantics_DATA = \
+ basic \
+ complete \
+ default \
+ xtest
+
+DATA_FILES=$(dist_xkbdata_semantics_DATA:%=$(DESTDIR)\%)
+
+include ..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/symbols/af b/xorg-server/xkeyboard-config/symbols/af
index d7d866d34..691b0a07c 100644
--- a/xorg-server/xkeyboard-config/symbols/af
+++ b/xorg-server/xkeyboard-config/symbols/af
@@ -1,397 +1,397 @@
-//
-// Keymap for the Afghan dari keybord layout
-// Based on the specification "Computer Locale Requirements for
-// Afghanstan" [1] from the "United Nations Development Programme
-// Afghanistan" and the "Afghan Transitional Islamic
-// Administration Ministry of Communications".
-// [1] http://www.evertype.com/standards/af/
-// For a MINI HOWTO see [2].
-// [2] http://www.afghanischerKulturverein.de/en/afghanComputer_en.php
-//
-// 2006-02-15 file created by M. Emal Alekozai <memala@gmx.net>
-
-partial default alphanumeric_keys
-xkb_symbols "basic" {
- //name[Group1]= "Afghanistan Dari";
- name[Group1]= "Afghanistan";
-
- key <TLDE> { [ 0x100200d, 0x10000f7, dead_tilde ] };
- key <AE01> { [ 0x10006f1, exclam, 0x1000060 ] };
- key <AE02> { [ 0x10006f2, 0x100066c, 0x1000040 ] };
- key <AE03> { [ 0x10006f3, 0x100066b, numbersign ] };
- key <AE04> { [ 0x10006f4, 0x100e60b, 0x1000024] };
- key <AE05> { [ 0x10006f5, 0x100066a, 0x1000025 ] };
- key <AE06> { [ 0x10006f6, multiply, 0x100005e ] };
- key <AE07> { [ 0x10006f7, Arabic_comma, 0x1000026 ] };
- key <AE08> { [ 0x10006f8, asterisk, 0x1002022 ] };
- key <AE09> { [ 0x10006f9, 0x1000029, 0x100200e ] };
- key <AE10> { [ 0x10006f0, 0x1000028, 0x100200f ] };
- key <AE11> { [ minus, Arabic_tatweel, 0x100005f ] };
- key <AE12> { [ plus, equal ] };
-
- key <AD01> { [ Arabic_dad, Arabic_sukun, 0x10000b0 ] };
- key <AD02> { [ Arabic_sad, Arabic_dammatan ] };
- key <AD03> { [ Arabic_theh, Arabic_kasratan, 0x10020ac ] };
- key <AD04> { [ Arabic_qaf, Arabic_fathatan, 0x100fd3e ] };
- key <AD05> { [ Arabic_feh, Arabic_damma, 0x100fd3f ] };
- key <AD06> { [ Arabic_ghain, Arabic_kasra, 0x100e656] };
- key <AD07> { [ Arabic_ain, Arabic_fatha, 0x100e659] };
- key <AD08> { [ Arabic_heh, Arabic_shadda, 0x1000655] };
- key <AD09> { [ Arabic_khah, bracketright, 0x1000027] };
- key <AD10> { [ Arabic_hah, bracketleft, 0x1000022] };
- key <AD11> { [ Arabic_jeem, braceright, 0x1000681 ] };
- key <AD12> { [ 0x1000686, braceleft, 0x1000685 ] };
-
- key <AC01> { [ Arabic_sheen, Arabic_hamzaonwaw, 0x100069a ] };
- key <AC02> { [ Arabic_seen, Arabic_hamzaonyeh, 0x10006cd ] };
- key <AC03> { [ 0x10006cc, Arabic_yeh, 0x1000649 ] };
- key <AC04> { [ Arabic_beh, Arabic_hamzaunderalef, 0x10006d0 ] };
- key <AC05> { [ Arabic_lam, Arabic_hamzaonalef, 0x10006b7 ] };
- key <AC06> { [ Arabic_alef, Arabic_maddaonalef, 0x1000671 ] };
- key <AC07> { [ Arabic_teh, Arabic_tehmarbuta, 0x100067c ] };
- key <AC08> { [ Arabic_noon, 0x10000bb, 0x10006bc ] };
- key <AC09> { [ Arabic_meem, 0x10000ab, 0x10006ba ] };
- key <AC10> { [ 0x10006a9, colon, 0x100003b ] };
- key <AC11> { [ 0x10006af, Arabic_semicolon, 0x10006ab ] };
-
- key <BKSL> { [ backslash, bar, 0x100003f ] };
-
- key <AB01> { [ Arabic_zah, Arabic_kaf, 0x10006d2] };
- key <AB02> { [ Arabic_tah, 0x1000653 , 0x1000691 ] };
- key <AB03> { [ Arabic_zain, 0x1000698, 0x1000696 ] };
- key <AB04> { [ Arabic_ra, 0x1000670 , 0x1000693 ] };
- key <AB05> { [ Arabic_thal, 0x100200c, 0x1000688 ] };
- key <AB06> { [ Arabic_dal, 0x1000654, 0x1000689 ] };
- key <AB07> { [ 0x100067e, Arabic_hamza, 0x1000679 ] };
- key <AB08> { [ Arabic_waw, greater, 0x100002c ] };
- key <AB09> { [ period, less, 0x10006c7 ] };
- key <AB10> { [ slash, Arabic_question_mark, 0x10006c9 ] };
-
- include "nbsp(zwnj2nb3)"
- include "level3(ralt_switch)"
-};
-
-// Keymap for the Afghan pashto keybord layout
-// Based on the specification "Computer Locale Requirements for
-// Afghanstan" [1] from the "United Nations Development Programme
-// Afghanistan"" and the "Afghan Transitional Islamic
-// Administration Ministry of Communications".
-// [1] http://www.evertype.com/standards/af/
-// For a MINI HOWTO see [2].
-// [2] http://www.afghanischerKulturverein.de/en/afghanComputer_en.php
-//
-// 2006-02-15 file created by M. Emal Alekozai <memala@gmx.net>
-
-partial alphanumeric_keys
-xkb_symbols "ps" {
- name[Group1]= "Afghanistan - Pashto";
-
- key <TLDE> { [ 0x100200d, 0x10000f7, dead_tilde ] };
- key <AE01> { [ 0x10006f1, exclam, 0x1000060 ] };
- key <AE02> { [ 0x10006f2, 0x100066c, 0x1000040 ] };
- key <AE03> { [ 0x10006f3, 0x100066b, numbersign ] };
- key <AE04> { [ 0x10006f4, 0x100e60b, 0x1000024] };
- key <AE05> { [ 0x10006f5, 0x100066a, 0x1000025 ] };
- key <AE06> { [ 0x10006f6, multiply, 0x100005e ] };
- key <AE07> { [ 0x10006f7, 0x10000bb, 0x1000026 ] };
- key <AE08> { [ 0x10006f8, 0x10000ab, 0x1002022 ] };
- key <AE09> { [ 0x10006f9, 0x1000029, 0x100200e ] };
- key <AE10> { [ 0x10006f0, 0x1000028, 0x100200f ] };
- key <AE11> { [ minus, Arabic_tatweel, 0x100005f ] };
- key <AE12> { [ plus, equal ] };
-
- key <AD01> { [ Arabic_dad, Arabic_sukun, 0x10000b0 ] };
- key <AD02> { [ Arabic_sad, Arabic_dammatan, 0x1000653 ] };
- key <AD03> { [ Arabic_theh, Arabic_kasratan, 0x10020ac ] };
- key <AD04> { [ Arabic_qaf, Arabic_fathatan, 0x100fd3e ] };
- key <AD05> { [ Arabic_feh, Arabic_damma, 0x100fd3f ] };
- key <AD06> { [ Arabic_ghain, Arabic_kasra, 0x100e656] };
- key <AD07> { [ Arabic_ain, Arabic_fatha, 0x100e659] };
- key <AD08> { [ Arabic_heh, Arabic_shadda, 0x1000670] };
- key <AD09> { [ Arabic_khah, 0x1000681, 0x1000027] };
- key <AD10> { [ Arabic_hah, 0x1000685, 0x1000022] };
- key <AD11> { [ Arabic_jeem, 0x100005d, 0x100007d ] };
- key <AD12> { [ 0x1000686, 0x100005b, 0x100007b ] };
-
- key <AC01> { [ Arabic_sheen, 0x100069a ] };
- key <AC02> { [ Arabic_seen, Arabic_hamzaonyeh, 0x10006d2 ] };
- key <AC03> { [ 0x10006cc, Arabic_yeh, 0x1000649 ] };
- key <AC04> { [ Arabic_beh, 0x100067e, 0x10006ba ] };
- key <AC05> { [ Arabic_lam, Arabic_hamzaonalef, 0x10006b7 ] };
- key <AC06> { [ Arabic_alef, Arabic_maddaonalef, 0x1000671 ] };
- key <AC07> { [ Arabic_teh, 0x100067c, 0x1000679 ] };
- key <AC08> { [ Arabic_noon, 0x10006bc, 0x100003e ] };
- key <AC09> { [ Arabic_meem, 0x1000629, 0x100003c ] };
- key <AC10> { [ 0x10006a9, colon, 0x1000643 ] };
- key <AC11> { [ 0x10006ab, Arabic_semicolon, 0x10006af ] };
-
- key <BKSL> { [ backslash, 0x100002a, 0x100007c ] };
-
- key <AB01> { [ 0x10006cd, 0x1000638, 0x100003f] };
- key <AB02> { [ 0x10006d0, 0x1000637, 0x100003b ] };
- key <AB03> { [ Arabic_zain, 0x1000698, 0x1000655 ] };
- key <AB04> { [ Arabic_ra, 0x1000621, 0x1000654 ] };
- key <AB05> { [ Arabic_thal, 0x100200c, 0x1000625 ] };
- key <AB06> { [ Arabic_dal, 0x1000689, 0x1000688 ] };
- key <AB07> { [ 0x1000693, 0x1000624, 0x1000691 ] };
- key <AB08> { [ Arabic_waw, 0x100060c, 0x100002c ] };
- key <AB09> { [ 0x1000696, 0x100002e, 0x10006c7 ] };
- key <AB10> { [ slash, Arabic_question_mark, 0x10006c9 ] };
-
- include "nbsp(zwnj2nb3)"
- include "level3(ralt_switch)"
-};
-
-// Keymap for the Afghan southern uzbek keybord layout
-// Based on the specification "Computer Locale Requirements for
-// Afghanstan" [1] from the "United Nations Development Programme
-// Afghanistan"" and the "Afghan Transitional Islamic
-// Administration Ministry of Communications".
-// [1] http://www.evertype.com/standards/af/
-// For a MINI HOWTO see [2].
-// [2] http://www.afghanischerKulturverein.de/en/afghanComputer_en.php
-//
-// 2006-02-15 file created by M. Emal Alekozai <memala@gmx.net>
-
-partial alphanumeric_keys
-xkb_symbols "uz" {
- name[Group1]= "Afghanistan - Southern Uzbek";
-
- key <TLDE> { [ 0x100200d, 0x10000f7, dead_tilde ] };
- key <AE01> { [ 0x10006f1, exclam, 0x1000060 ] };
- key <AE02> { [ 0x10006f2, 0x100066c, 0x1000040 ] };
- key <AE03> { [ 0x10006f3, 0x100066b, numbersign ] };
- key <AE04> { [ 0x10006f4, 0x100e60b, 0x1000024] };
- key <AE05> { [ 0x10006f5, 0x100066a, 0x1000025 ] };
- key <AE06> { [ 0x10006f6, multiply, 0x100005e ] };
- key <AE07> { [ 0x10006f7, Arabic_comma, 0x1000026 ] };
- key <AE08> { [ 0x10006f8, asterisk, 0x1002022 ] };
- key <AE09> { [ 0x10006f9, 0x1000029, 0x100200e ] };
- key <AE10> { [ 0x10006f0, 0x1000028, 0x100200f ] };
- key <AE11> { [ minus, Arabic_tatweel, 0x100005f ] };
- key <AE12> { [ plus, equal ] };
-
- key <AD01> { [ Arabic_dad, Arabic_sukun, 0x10000b0 ] };
- key <AD02> { [ Arabic_sad, Arabic_dammatan, 0x1000653 ] };
- key <AD03> { [ Arabic_theh, Arabic_kasratan, 0x10020ac ] };
- key <AD04> { [ Arabic_qaf, Arabic_fathatan, 0x100fd3e ] };
- key <AD05> { [ Arabic_feh, Arabic_damma, 0x100fd3f ] };
- key <AD06> { [ Arabic_ghain, Arabic_kasra, 0x100e656] };
- key <AD07> { [ Arabic_ain, Arabic_fatha, 0x100e659] };
- key <AD08> { [ Arabic_heh, Arabic_shadda, 0x1000670] };
- key <AD09> { [ Arabic_khah, bracketright, 0x1000027] };
- key <AD10> { [ Arabic_hah, bracketleft, 0x1000022] };
- key <AD11> { [ Arabic_jeem, braceright, 0x1000681 ] };
- key <AD12> { [ 0x1000686, braceleft, 0x1000685 ] };
-
- key <AC01> { [ Arabic_sheen, Arabic_hamzaonwaw, 0x100069a ] };
- key <AC02> { [ Arabic_seen, Arabic_hamzaonyeh, 0x10006cd ] };
- key <AC03> { [ 0x10006cc, Arabic_yeh, 0x1000649 ] };
- key <AC04> { [ Arabic_beh, 0x10006d0, 0x1000643 ] };
- key <AC05> { [ Arabic_lam, Arabic_hamzaonalef, 0x10006b7 ] };
- key <AC06> { [ Arabic_alef, Arabic_maddaonalef, 0x1000671 ] };
- key <AC07> { [ Arabic_teh, Arabic_tehmarbuta, 0x100067c ] };
- key <AC08> { [ Arabic_noon, 0x10000bb, 0x10006bc ] };
- key <AC09> { [ Arabic_meem, 0x10000ab, 0x10006ba ] };
- key <AC10> { [ 0x10006a9, colon, 0x100003b ] };
- key <AC11> { [ 0x10006af, Arabic_semicolon, 0x10006ab ] };
-
- key <BKSL> { [ backslash, bar, 0x100003f ] };
-
- key <AB01> { [ Arabic_zah, 0x10006c9, 0x10006d2] };
- key <AB02> { [ Arabic_tah, 0x10006c7, 0x1000691 ] };
- key <AB03> { [ Arabic_zain, 0x1000698, 0x1000696 ] };
- key <AB04> { [ Arabic_ra, 0x1000625, 0x1000693 ] };
- key <AB05> { [ Arabic_thal, 0x100200c, 0x1000688 ] };
- key <AB06> { [ Arabic_dal, 0x1000654, 0x1000689 ] };
- key <AB07> { [ 0x100067e, Arabic_hamza, 0x1000679 ] };
- key <AB08> { [ Arabic_waw, greater, 0x100002c ] };
- key <AB09> { [ period, less ] };
- key <AB10> { [ slash, Arabic_question_mark, 0x1000655 ] };
-
- include "nbsp(zwnj2nb3)"
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "olpc-ps" {
-
- name[Group1]= "Afghanistan - OLPC Pashto";
-
- key <TLDE> { [ 0x100200D, 0x1000654, grave ] }; // zero width joiner, Arabic hamza above
- key <AE01> { [ 0x10006F1, exclam, asciitilde ] }; // Arabic one
- key <AE02> { [ 0x10006F2, 0x100066C, at ] }; // Arabic two, Arabic thousands separator
- key <AE03> { [ 0x10006F3, 0x100066B, numbersign ] }; // Arabic three, Arabic decimal separator
- key <AE04> { [ 0x10006F4, 0x100060B, dollar ] }; // Arabic four, Afghani sign
- key <AE05> { [ 0x10006F5, 0x100066A, percent ] }; // Arabic five, Arabic percent sign
- key <AE06> { [ 0x10006F6, multiply, asciicircum ] }; // Arabic six
- key <AE07> { [ 0x10006F7, guillemotright, ampersand ] }; // Arabic seven
- key <AE08> { [ 0x10006F8, guillemotleft, 0x100066D ] }; // Arabic eight, Arabic five-pointed star
- key <AE09> { [ 0x10006F9, parenright, enfilledcircbullet ] }; // Arabic nine
- key <AE10> { [ 0x10006F0, parenleft, degree ] }; // Arabic zero
- key <AE11> { [ minus, 0x1000640, underscore ] }; // Arabic_tatweel
- key <AE12> { [ plus, equal, division ] };
-
- key <AD01> { [ 0x1000636, 0x1000652, EuroSign ] }; // Arabic dad, Arabic sukun
- key <AD02> { [ 0x1000635, 0x100064C, 0x1000671 ] }; // Arabic sad, Arabic dammatan, Arabic alef walsa
- key <AD03> { [ 0x100062B, 0x100064D, 0x1000649 ] }; // Arabic theh, Arabic kasratan, Arabic alef maksura initial form
- key <AD04> { [ 0x1000642, 0x100064B, 0x100200E ] }; // Arabic qaf, Arabic fathatan, left-to-right mark
- key <AD05> { [ 0x1000641, 0x100064F, 0x100200F ] }; // Arabic feh, Arabic damma, right-to-left mark
- key <AD06> { [ 0x100063A, 0x1000650, 0x100e653 ] }; // Arabic ghain, Arabic kasra, Arabic alef with madda above
- key <AD07> { [ 0x1000639, 0x100064E, 0x100e659 ] }; // Arabic ain, Arabic fatha, Arabic zwarakay
- key <AD08> { [ 0x1000647, 0x1000651, 0x1000670 ] }; // Arabic heh, Arabic shadda, Arabic superscript alef
- key <AD09> { [ 0x100062E, 0x1000681, apostrophe ] }; // Arabic khah, Arabic hah with hamza above,
- key <AD10> { [ 0x100062D, 0x1000685, quotedbl ] }; // Arabic hah, Arabic hah with three dots above
- key <AD11> { [ 0x100062C, bracketright, braceleft ] }; // Arabic jeem
- key <AD12> { [ 0x1000686, bracketleft, braceright ] }; // Arabic tcheh
-
- key <AC01> { [ 0x1000634, 0x100069A ] }; // Arabic sheen, Arabic seen with dot below and dot above
- key <AC02> { [ 0x1000633, 0x10006CD ] }; // Arabic seen, Arabic yeh with tail
- key <AC03> { [ 0x10006CC, 0x100064A, 0x10006D2 ] }; // Farsi yeh, Arabic yeh, Arabic yeh barree
- key <AC04> { [ 0x1000628, 0x100067E, 0x10006BA ] }; // Arabic beh, Arabic peh, Arabic noon ghunna
- key <AC05> { [ 0x1000644, 0x1000623, 0x10006B7 ] }; // Arabic lam, Arabic hamza on alef, Arabic alef with hamza above
- key <AC06> { [ 0x1000627, 0x1000622, 0x1000625 ] }; // Arabic alef, Arabic madda on alef, Arabic alef with hamza below
- key <AC07> { [ 0x100062A, 0x100067C, 0x1000679 ] }; // Arabic teh, Arabic teh with ring, Arabic tteh
- key <AC08> { [ 0x1000646, 0x10006BC, greater ] }; // Arabic noon, Arabic noon with ring
- key <AC09> { [ 0x1000645, 0x1000629, less ] }; // Arabic meem, Arabic teh marbuta
- key <AC10> { [ 0x10006A9, colon, 0x1000643 ] }; // Arabic keheh, Arabic kaf
- key <AC11> { [ 0x10006AB, 0x100061B, 0x10006AF ] }; // Arabic kaf with ring, Arabic semicolon, Arabic gaf
-
- key <BKSL> { [ backslash, asterisk, bar ] };
-
- key <AB01> { [ 0x1000638, 0x1000626, question] }; // Arabic zah, Arabic yeh with hamza above
- key <AB02> { [ 0x10006D0, 0x1000637, semicolon ] }; // Arabic tah, Arabic E
- key <AB03> { [ 0x1000632, 0x1000698 ] }; // Arabic zain, Arabic jeh
- key <AB04> { [ 0x1000631, 0x1000621 ] }; // Arabic_ra (reh?), Arabic hamza
- key <AB05> { [ 0x1000630, 0x100200C ] }; // Arabic_thal, zero width non-joiner
- key <AB06> { [ 0x100062F, 0x1000689, 0x1000688 ] }; // Arabic_dal, Arabic dal with ring, Arabic ddal
- key <AB07> { [ 0x1000693, 0x1000624, 0x1000691 ] }; // Arabic reh with ring, Arabic waw with hamza above, Arabic rreh
- key <AB08> { [ 0x1000648, period, comma ] }; // Arabic_waw, Arabic comma
- key <AB09> { [ 0x1000696, 0x100002E, 0x10006C7 ] }; // Arabic reh with dot below and dot above, full stop, Arabic letter U
- key <AB10> { [ slash, 0x100061F, 0x10006C9 ] }; // Arabic question mark, Arabic kirghiz yu
-
- include "nbsp(zwnj2nb3)"
- include "group(olpc)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "fa-olpc" {
-
- name[Group1]= "Afghanistan - OLPC Dari";
-
- key <TLDE> { [ 0x100200D, division, asciitilde ] }; // zero width joiner
- key <AE01> { [ 0x10006F1, exclam, grave ] }; // Arabic one
- key <AE02> { [ 0x10006F2, 0x100066C, at ] }; // Arabic two, Arabic thousands separator
- key <AE03> { [ 0x10006F3, 0x100066B, numbersign ] }; // Arabic three, Arabic decimal separator
- key <AE04> { [ 0x10006F4, 0x100060B, dollar ] }; // Arabic four, Afghani sign
- key <AE05> { [ 0x10006F5, 0x100066A, percent ] }; // Arabic five, Arabic percent sign
- key <AE06> { [ 0x10006F6, multiply, asciicircum ] }; // Arabic six
- key <AE07> { [ 0x10006F7, 0x100060C, ampersand ] }; // Arabic seven, Arabic comma
- key <AE08> { [ 0x10006F8, asterisk, enfilledcircbullet ] }; // Arabic eight,
- key <AE09> { [ 0x10006F9, parenright, 0x100200E ] }; // Arabic nine, left-to-right mark
- key <AE10> { [ 0x10006F0, parenleft, 0x100200F ] }; // Arabic zero, right-to-left mark
- key <AE11> { [ minus, 0x1000640, underscore ] }; // Arabic_tatweel
- key <AE12> { [ plus, equal ] };
-
- key <AD01> { [ 0x1000636, 0x1000652, degree ] }; // Arabic dad, Arabic sukun
- key <AD02> { [ 0x1000635, 0x100064C ] }; // Arabic sad, Arabic dammatan
- key <AD03> { [ 0x100062B, 0x100064D, EuroSign ] }; // Arabic theh, Arabic kasratan
- key <AD04> { [ 0x1000642, 0x100064B, 0x100FD3E ] }; // Arabic qaf, Arabic fathatan, ornate left paren
- key <AD05> { [ 0x1000641, 0x100064F, 0x100FD3F ] }; // Arabic feh, Arabic damma, ornate right paren
- key <AD06> { [ 0x100063A, 0x1000650, 0x1000656 ] }; // Arabic ghain, Arabic kasra, Arabic subscript alef
- key <AD07> { [ 0x1000639, 0x100064E, 0x100e659 ] }; // Arabic ain, Arabic fatha, Arabic zwarakay
- key <AD08> { [ 0x1000647, 0x1000651, 0x1000655 ] }; // Arabic heh, Arabic shadda, Arabic hamza below
- key <AD09> { [ 0x100062E, bracketright, apostrophe ] }; // Arabic khah
- key <AD10> { [ 0x100062D, bracketleft, quotedbl ] }; // Arabic hah
- key <AD11> { [ 0x100062C, braceright, 0x1000681 ] }; // Arabic jeem, Arabic hah with hamza above
- key <AD12> { [ 0x1000686, braceleft, 0x1000685 ] }; // Arabic tcheh, Arabic hah with three dots above
-
- key <AC01> { [ 0x1000634, 0x1000624, 0x100069A ] }; // Arabic sheen, Arabic waw with hamza above, Arabic seen with dot below and dot above
- key <AC02> { [ 0x1000633, 0x1000626, 0x10006CD ] }; // Arabic seen, Arabic yeh with hamza above, Arabic yeh with tail
- key <AC03> { [ 0x10006CC, 0x100064A, 0x1000649 ] }; // Farsi yeh, Arabic yeh, Arabic alef maksura
- key <AC04> { [ 0x1000628, 0x1000625, 0x10006D0 ] }; // Arabic beh, Arabic alef with hamza below, Arabic e
- key <AC05> { [ 0x1000644, 0x1000623, 0x10006B7 ] }; // Arabic lam, Arabic hamza on alef, Arabic alef with hamza above
- key <AC06> { [ 0x1000627, 0x1000622, 0x1000671 ] }; // Arabic alef, Arabic madda on alef, Arabic alef wasla
- key <AC07> { [ 0x100062A, 0x1000629, 0x100067C ] }; // Arabic teh, Arabic teh marbuta, Arabic tteh
- key <AC08> { [ 0x1000646, guillemotright, 0x10006BC ] }; // Arabic noon, Arabic noon with ring
- key <AC09> { [ 0x1000645, guillemotleft, 0x10006BA ] }; // Arabic meem, Arabic noon ghunna
- key <AC10> { [ 0x10006A9, colon, semicolon ] }; // Arabic keheh,
- key <AC11> { [ 0x10006AF, 0x100061B, 0x10006AB ] }; // Arabic gaf, Arabic semicolon, Arabic kaf with ring
-
- key <BKSL> { [ backslash, bar, question ] };
-
- key <AB01> { [ 0x1000638, 0x1000643, 0x10006D2 ] }; // Arabic zah, Arabic kaf, Arabic yeh barree
- key <AB02> { [ 0x1000637, 0x1000653, 0x1000691 ] }; // Arabic tah, Arabic maddah above, Arabic rreh
- key <AB03> { [ 0x1000632, 0x1000698, 0x1000696 ] }; // Arabic zain, Arabic jeh, Arabic reh with dot below and dot above
- key <AB04> { [ 0x1000631, 0x1000670, 0x1000693 ] }; // Arabic_ra (reh?), Arabic superscript alef, Arabic reh with ring
- key <AB05> { [ 0x1000630, 0x100200C, 0x1000688 ] }; // Arabic_thal, zero width non-joiner, Arabic ddal
- key <AB06> { [ 0x100062F, 0x1000654, 0x1000689 ] }; // Arabic dal, Arabic hamza above, Arabic dal with ring
- key <AB07> { [ 0x100067E, 0x1000621, 0x1000679 ] }; // Arabic peh, Arabic hamza, Arabic tteh
- key <AB08> { [ 0x1000648, greater, comma ] }; // Arabic_waw
- key <AB09> { [ period, less, 0x10006C7 ] }; // Arabic u
- key <AB10> { [ slash, 0x100061F, 0x10006C9 ] }; // Arabic question mark, Arabic kirghiz yu
-
- include "nbsp(zwnj2nb3)"
- include "group(olpc)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "uz-olpc" {
-
- name[Group1]= "Afghanistan - OLPC Southern Uzbek";
-
- key <TLDE> { [ 0x100200D, division, asciitilde ] }; // zero width joiner
- key <AE01> { [ 0x10006F1, exclam, grave ] }; // Arabic one
- key <AE02> { [ 0x10006F2, 0x100066C, at ] }; // Arabic two, Arabic thousands separator
- key <AE03> { [ 0x10006F3, 0x100066B, numbersign ] }; // Arabic three, Arabic decimal separator
- key <AE04> { [ 0x10006F4, 0x100060B, dollar ] }; // Arabic four, Afghani sign
- key <AE05> { [ 0x10006F5, 0x100066A, percent ] }; // Arabic five, Arabic percent sign
- key <AE06> { [ 0x10006F6, multiply, asciicircum ] }; // Arabic six
- key <AE07> { [ 0x10006F7, 0x100060C, ampersand ] }; // Arabic seven, Arabic comma
- key <AE08> { [ 0x10006F8, asterisk, enfilledcircbullet ] }; // Arabic eight,
- key <AE09> { [ 0x10006F9, parenright, 0x100200E ] }; // Arabic nine, left-to-right mark
- key <AE10> { [ 0x10006F0, parenleft, 0x100200F ] }; // Arabic zero, right-to-left mark
- key <AE11> { [ minus, 0x1000640, underscore ] }; // Arabic_tatweel
- key <AE12> { [ plus, equal ] };
-
- key <AD01> { [ 0x1000636, 0x1000652, degree ] }; // Arabic dad, Arabic sukun
- key <AD02> { [ 0x1000635, 0x100064C, 0x1000653 ] }; // Arabic sad, Arabic dammatan, Arabic maddah above
- key <AD03> { [ 0x100062B, 0x100064D, EuroSign ] }; // Arabic theh, Arabic kasratan
- key <AD04> { [ 0x1000642, 0x100064B, 0x100FD3E ] }; // Arabic qaf, Arabic fathatan, ornate left paren
- key <AD05> { [ 0x1000641, 0x100064F, 0x100FD3F ] }; // Arabic feh, Arabic damma, ornate right paren
- key <AD06> { [ 0x100063A, 0x1000650, 0x1000656 ] }; // Arabic ghain, Arabic kasra, Arabic subscript alef
- key <AD07> { [ 0x1000639, 0x100064E, 0x100e659 ] }; // Arabic ain, Arabic fatha, Arabic zwarakay
- key <AD08> { [ 0x1000647, 0x1000651, 0x1000670 ] }; // Arabic heh, Arabic shadda, Arabic superscript alef
- key <AD09> { [ 0x100062E, bracketright, apostrophe ] }; // Arabic khah
- key <AD10> { [ 0x100062D, bracketleft, quotedbl ] }; // Arabic hah
- key <AD11> { [ 0x100062C, braceright, 0x1000681 ] }; // Arabic jeem, Arabic hah with hamza above
- key <AD12> { [ 0x1000686, braceleft, 0x1000685 ] }; // Arabic tcheh, Arabic hah with three dots above
-
- key <AC01> { [ 0x1000634, 0x1000624, 0x100069A ] }; // Arabic sheen, Arabic waw with hamza above, Arabic seen with dot below and dot above
- key <AC02> { [ 0x1000633, 0x1000626, 0x10006CD ] }; // Arabic seen, Arabic yeh with hamza above, Arabic yeh with tail
- key <AC03> { [ 0x10006CC, 0x100064A, 0x1000649 ] }; // Farsi yeh, Arabic yeh, Arabic alef maksura
- key <AC04> { [ 0x1000628, 0x10006D0, 0x1000643 ] }; // Arabic beh, Arabic e, Arabic kaf
- key <AC05> { [ 0x1000644, 0x1000623, 0x10006B7 ] }; // Arabic lam, Arabic hamza on alef, Arabic alef with hamza above
- key <AC06> { [ 0x1000627, 0x1000622, 0x1000671 ] }; // Arabic alef, Arabic madda on alef, Arabic alef wasla
- key <AC07> { [ 0x100062A, 0x1000629, 0x100067C ] }; // Arabic teh, Arabic teh marbuta, Arabic tteh
- key <AC08> { [ 0x1000646, guillemotright, 0x10006BC ] }; // Arabic noon, Arabic noon with ring
- key <AC09> { [ 0x1000645, guillemotleft, 0x10006BA ] }; // Arabic meem, Arabic noon ghunna
- key <AC10> { [ 0x10006A9, colon, semicolon ] }; // Arabic keheh,
- key <AC11> { [ 0x10006AF, 0x100061B, 0x10006AB ] }; // Arabic gaf, Arabic semicolon, Arabic kaf with ring
-
- key <BKSL> { [ backslash, bar, question ] };
-
- key <AB01> { [ 0x1000638, 0x10006C9, 0x10006D2 ] }; // Arabic zah, Arabic kirghiz yu, Arabic yeh barree
- key <AB02> { [ 0x1000637, 0x10006C7, 0x1000691 ] }; // Arabic tah, Arabic u, Arabic rreh
- key <AB03> { [ 0x1000632, 0x1000698, 0x1000696 ] }; // Arabic zain, Arabic jeh, Arabic reh with dot below and dot above
- key <AB04> { [ 0x1000631, 0x1000625, 0x1000693 ] }; // Arabic_ra (reh?), Arabic alef with hamza below, Arabic reh with ring
- key <AB05> { [ 0x1000630, 0x100200C, 0x1000688 ] }; // Arabic_thal, zero width non-joiner, Arabic ddal
- key <AB06> { [ 0x100062F, 0x1000654, 0x1000689 ] }; // Arabic dal, Arabic hamza above, Arabic dal with ring
- key <AB07> { [ 0x100067E, 0x1000621, 0x1000679 ] }; // Arabic peh, Arabic hamza, Arabic tteh
- key <AB08> { [ 0x1000648, greater, comma ] }; // Arabic_waw
- key <AB09> { [ period, less ] };
- key <AB10> { [ slash, 0x100061F, 0x1000655 ] }; // Arabic question mark, Arabic hamza below
-
- include "nbsp(zwnj2nb3)"
- include "group(olpc)"
-};
+//
+// Keymap for the Afghan dari keybord layout
+// Based on the specification "Computer Locale Requirements for
+// Afghanstan" [1] from the "United Nations Development Programme
+// Afghanistan" and the "Afghan Transitional Islamic
+// Administration Ministry of Communications".
+// [1] http://www.evertype.com/standards/af/
+// For a MINI HOWTO see [2].
+// [2] http://www.afghanischerKulturverein.de/en/afghanComputer_en.php
+//
+// 2006-02-15 file created by M. Emal Alekozai <memala@gmx.net>
+
+partial default alphanumeric_keys
+xkb_symbols "basic" {
+ //name[Group1]= "Afghanistan Dari";
+ name[Group1]= "Afghanistan";
+
+ key <TLDE> { [ 0x100200d, 0x10000f7, dead_tilde ] };
+ key <AE01> { [ 0x10006f1, exclam, 0x1000060 ] };
+ key <AE02> { [ 0x10006f2, 0x100066c, 0x1000040 ] };
+ key <AE03> { [ 0x10006f3, 0x100066b, numbersign ] };
+ key <AE04> { [ 0x10006f4, 0x100e60b, 0x1000024] };
+ key <AE05> { [ 0x10006f5, 0x100066a, 0x1000025 ] };
+ key <AE06> { [ 0x10006f6, multiply, 0x100005e ] };
+ key <AE07> { [ 0x10006f7, Arabic_comma, 0x1000026 ] };
+ key <AE08> { [ 0x10006f8, asterisk, 0x1002022 ] };
+ key <AE09> { [ 0x10006f9, 0x1000029, 0x100200e ] };
+ key <AE10> { [ 0x10006f0, 0x1000028, 0x100200f ] };
+ key <AE11> { [ minus, Arabic_tatweel, 0x100005f ] };
+ key <AE12> { [ plus, equal ] };
+
+ key <AD01> { [ Arabic_dad, Arabic_sukun, 0x10000b0 ] };
+ key <AD02> { [ Arabic_sad, Arabic_dammatan ] };
+ key <AD03> { [ Arabic_theh, Arabic_kasratan, 0x10020ac ] };
+ key <AD04> { [ Arabic_qaf, Arabic_fathatan, 0x100fd3e ] };
+ key <AD05> { [ Arabic_feh, Arabic_damma, 0x100fd3f ] };
+ key <AD06> { [ Arabic_ghain, Arabic_kasra, 0x100e656] };
+ key <AD07> { [ Arabic_ain, Arabic_fatha, 0x100e659] };
+ key <AD08> { [ Arabic_heh, Arabic_shadda, 0x1000655] };
+ key <AD09> { [ Arabic_khah, bracketright, 0x1000027] };
+ key <AD10> { [ Arabic_hah, bracketleft, 0x1000022] };
+ key <AD11> { [ Arabic_jeem, braceright, 0x1000681 ] };
+ key <AD12> { [ 0x1000686, braceleft, 0x1000685 ] };
+
+ key <AC01> { [ Arabic_sheen, Arabic_hamzaonwaw, 0x100069a ] };
+ key <AC02> { [ Arabic_seen, Arabic_hamzaonyeh, 0x10006cd ] };
+ key <AC03> { [ 0x10006cc, Arabic_yeh, 0x1000649 ] };
+ key <AC04> { [ Arabic_beh, Arabic_hamzaunderalef, 0x10006d0 ] };
+ key <AC05> { [ Arabic_lam, Arabic_hamzaonalef, 0x10006b7 ] };
+ key <AC06> { [ Arabic_alef, Arabic_maddaonalef, 0x1000671 ] };
+ key <AC07> { [ Arabic_teh, Arabic_tehmarbuta, 0x100067c ] };
+ key <AC08> { [ Arabic_noon, 0x10000bb, 0x10006bc ] };
+ key <AC09> { [ Arabic_meem, 0x10000ab, 0x10006ba ] };
+ key <AC10> { [ 0x10006a9, colon, 0x100003b ] };
+ key <AC11> { [ 0x10006af, Arabic_semicolon, 0x10006ab ] };
+
+ key <BKSL> { [ backslash, bar, 0x100003f ] };
+
+ key <AB01> { [ Arabic_zah, Arabic_kaf, 0x10006d2] };
+ key <AB02> { [ Arabic_tah, 0x1000653 , 0x1000691 ] };
+ key <AB03> { [ Arabic_zain, 0x1000698, 0x1000696 ] };
+ key <AB04> { [ Arabic_ra, 0x1000670 , 0x1000693 ] };
+ key <AB05> { [ Arabic_thal, 0x100200c, 0x1000688 ] };
+ key <AB06> { [ Arabic_dal, 0x1000654, 0x1000689 ] };
+ key <AB07> { [ 0x100067e, Arabic_hamza, 0x1000679 ] };
+ key <AB08> { [ Arabic_waw, greater, 0x100002c ] };
+ key <AB09> { [ period, less, 0x10006c7 ] };
+ key <AB10> { [ slash, Arabic_question_mark, 0x10006c9 ] };
+
+ include "nbsp(zwnj2nb3)"
+ include "level3(ralt_switch)"
+};
+
+// Keymap for the Afghan pashto keybord layout
+// Based on the specification "Computer Locale Requirements for
+// Afghanstan" [1] from the "United Nations Development Programme
+// Afghanistan"" and the "Afghan Transitional Islamic
+// Administration Ministry of Communications".
+// [1] http://www.evertype.com/standards/af/
+// For a MINI HOWTO see [2].
+// [2] http://www.afghanischerKulturverein.de/en/afghanComputer_en.php
+//
+// 2006-02-15 file created by M. Emal Alekozai <memala@gmx.net>
+
+partial alphanumeric_keys
+xkb_symbols "ps" {
+ name[Group1]= "Afghanistan - Pashto";
+
+ key <TLDE> { [ 0x100200d, 0x10000f7, dead_tilde ] };
+ key <AE01> { [ 0x10006f1, exclam, 0x1000060 ] };
+ key <AE02> { [ 0x10006f2, 0x100066c, 0x1000040 ] };
+ key <AE03> { [ 0x10006f3, 0x100066b, numbersign ] };
+ key <AE04> { [ 0x10006f4, 0x100e60b, 0x1000024] };
+ key <AE05> { [ 0x10006f5, 0x100066a, 0x1000025 ] };
+ key <AE06> { [ 0x10006f6, multiply, 0x100005e ] };
+ key <AE07> { [ 0x10006f7, 0x10000bb, 0x1000026 ] };
+ key <AE08> { [ 0x10006f8, 0x10000ab, 0x1002022 ] };
+ key <AE09> { [ 0x10006f9, 0x1000029, 0x100200e ] };
+ key <AE10> { [ 0x10006f0, 0x1000028, 0x100200f ] };
+ key <AE11> { [ minus, Arabic_tatweel, 0x100005f ] };
+ key <AE12> { [ plus, equal ] };
+
+ key <AD01> { [ Arabic_dad, Arabic_sukun, 0x10000b0 ] };
+ key <AD02> { [ Arabic_sad, Arabic_dammatan, 0x1000653 ] };
+ key <AD03> { [ Arabic_theh, Arabic_kasratan, 0x10020ac ] };
+ key <AD04> { [ Arabic_qaf, Arabic_fathatan, 0x100fd3e ] };
+ key <AD05> { [ Arabic_feh, Arabic_damma, 0x100fd3f ] };
+ key <AD06> { [ Arabic_ghain, Arabic_kasra, 0x100e656] };
+ key <AD07> { [ Arabic_ain, Arabic_fatha, 0x100e659] };
+ key <AD08> { [ Arabic_heh, Arabic_shadda, 0x1000670] };
+ key <AD09> { [ Arabic_khah, 0x1000681, 0x1000027] };
+ key <AD10> { [ Arabic_hah, 0x1000685, 0x1000022] };
+ key <AD11> { [ Arabic_jeem, 0x100005d, 0x100007d ] };
+ key <AD12> { [ 0x1000686, 0x100005b, 0x100007b ] };
+
+ key <AC01> { [ Arabic_sheen, 0x100069a ] };
+ key <AC02> { [ Arabic_seen, Arabic_hamzaonyeh, 0x10006d2 ] };
+ key <AC03> { [ 0x10006cc, Arabic_yeh, 0x1000649 ] };
+ key <AC04> { [ Arabic_beh, 0x100067e, 0x10006ba ] };
+ key <AC05> { [ Arabic_lam, Arabic_hamzaonalef, 0x10006b7 ] };
+ key <AC06> { [ Arabic_alef, Arabic_maddaonalef, 0x1000671 ] };
+ key <AC07> { [ Arabic_teh, 0x100067c, 0x1000679 ] };
+ key <AC08> { [ Arabic_noon, 0x10006bc, 0x100003e ] };
+ key <AC09> { [ Arabic_meem, 0x1000629, 0x100003c ] };
+ key <AC10> { [ 0x10006a9, colon, 0x1000643 ] };
+ key <AC11> { [ 0x10006ab, Arabic_semicolon, 0x10006af ] };
+
+ key <BKSL> { [ backslash, 0x100002a, 0x100007c ] };
+
+ key <AB01> { [ 0x10006cd, 0x1000638, 0x100003f] };
+ key <AB02> { [ 0x10006d0, 0x1000637, 0x100003b ] };
+ key <AB03> { [ Arabic_zain, 0x1000698, 0x1000655 ] };
+ key <AB04> { [ Arabic_ra, 0x1000621, 0x1000654 ] };
+ key <AB05> { [ Arabic_thal, 0x100200c, 0x1000625 ] };
+ key <AB06> { [ Arabic_dal, 0x1000689, 0x1000688 ] };
+ key <AB07> { [ 0x1000693, 0x1000624, 0x1000691 ] };
+ key <AB08> { [ Arabic_waw, 0x100060c, 0x100002c ] };
+ key <AB09> { [ 0x1000696, 0x100002e, 0x10006c7 ] };
+ key <AB10> { [ slash, Arabic_question_mark, 0x10006c9 ] };
+
+ include "nbsp(zwnj2nb3)"
+ include "level3(ralt_switch)"
+};
+
+// Keymap for the Afghan southern uzbek keybord layout
+// Based on the specification "Computer Locale Requirements for
+// Afghanstan" [1] from the "United Nations Development Programme
+// Afghanistan"" and the "Afghan Transitional Islamic
+// Administration Ministry of Communications".
+// [1] http://www.evertype.com/standards/af/
+// For a MINI HOWTO see [2].
+// [2] http://www.afghanischerKulturverein.de/en/afghanComputer_en.php
+//
+// 2006-02-15 file created by M. Emal Alekozai <memala@gmx.net>
+
+partial alphanumeric_keys
+xkb_symbols "uz" {
+ name[Group1]= "Afghanistan - Southern Uzbek";
+
+ key <TLDE> { [ 0x100200d, 0x10000f7, dead_tilde ] };
+ key <AE01> { [ 0x10006f1, exclam, 0x1000060 ] };
+ key <AE02> { [ 0x10006f2, 0x100066c, 0x1000040 ] };
+ key <AE03> { [ 0x10006f3, 0x100066b, numbersign ] };
+ key <AE04> { [ 0x10006f4, 0x100e60b, 0x1000024] };
+ key <AE05> { [ 0x10006f5, 0x100066a, 0x1000025 ] };
+ key <AE06> { [ 0x10006f6, multiply, 0x100005e ] };
+ key <AE07> { [ 0x10006f7, Arabic_comma, 0x1000026 ] };
+ key <AE08> { [ 0x10006f8, asterisk, 0x1002022 ] };
+ key <AE09> { [ 0x10006f9, 0x1000029, 0x100200e ] };
+ key <AE10> { [ 0x10006f0, 0x1000028, 0x100200f ] };
+ key <AE11> { [ minus, Arabic_tatweel, 0x100005f ] };
+ key <AE12> { [ plus, equal ] };
+
+ key <AD01> { [ Arabic_dad, Arabic_sukun, 0x10000b0 ] };
+ key <AD02> { [ Arabic_sad, Arabic_dammatan, 0x1000653 ] };
+ key <AD03> { [ Arabic_theh, Arabic_kasratan, 0x10020ac ] };
+ key <AD04> { [ Arabic_qaf, Arabic_fathatan, 0x100fd3e ] };
+ key <AD05> { [ Arabic_feh, Arabic_damma, 0x100fd3f ] };
+ key <AD06> { [ Arabic_ghain, Arabic_kasra, 0x100e656] };
+ key <AD07> { [ Arabic_ain, Arabic_fatha, 0x100e659] };
+ key <AD08> { [ Arabic_heh, Arabic_shadda, 0x1000670] };
+ key <AD09> { [ Arabic_khah, bracketright, 0x1000027] };
+ key <AD10> { [ Arabic_hah, bracketleft, 0x1000022] };
+ key <AD11> { [ Arabic_jeem, braceright, 0x1000681 ] };
+ key <AD12> { [ 0x1000686, braceleft, 0x1000685 ] };
+
+ key <AC01> { [ Arabic_sheen, Arabic_hamzaonwaw, 0x100069a ] };
+ key <AC02> { [ Arabic_seen, Arabic_hamzaonyeh, 0x10006cd ] };
+ key <AC03> { [ 0x10006cc, Arabic_yeh, 0x1000649 ] };
+ key <AC04> { [ Arabic_beh, 0x10006d0, 0x1000643 ] };
+ key <AC05> { [ Arabic_lam, Arabic_hamzaonalef, 0x10006b7 ] };
+ key <AC06> { [ Arabic_alef, Arabic_maddaonalef, 0x1000671 ] };
+ key <AC07> { [ Arabic_teh, Arabic_tehmarbuta, 0x100067c ] };
+ key <AC08> { [ Arabic_noon, 0x10000bb, 0x10006bc ] };
+ key <AC09> { [ Arabic_meem, 0x10000ab, 0x10006ba ] };
+ key <AC10> { [ 0x10006a9, colon, 0x100003b ] };
+ key <AC11> { [ 0x10006af, Arabic_semicolon, 0x10006ab ] };
+
+ key <BKSL> { [ backslash, bar, 0x100003f ] };
+
+ key <AB01> { [ Arabic_zah, 0x10006c9, 0x10006d2] };
+ key <AB02> { [ Arabic_tah, 0x10006c7, 0x1000691 ] };
+ key <AB03> { [ Arabic_zain, 0x1000698, 0x1000696 ] };
+ key <AB04> { [ Arabic_ra, 0x1000625, 0x1000693 ] };
+ key <AB05> { [ Arabic_thal, 0x100200c, 0x1000688 ] };
+ key <AB06> { [ Arabic_dal, 0x1000654, 0x1000689 ] };
+ key <AB07> { [ 0x100067e, Arabic_hamza, 0x1000679 ] };
+ key <AB08> { [ Arabic_waw, greater, 0x100002c ] };
+ key <AB09> { [ period, less ] };
+ key <AB10> { [ slash, Arabic_question_mark, 0x1000655 ] };
+
+ include "nbsp(zwnj2nb3)"
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "olpc-ps" {
+
+ name[Group1]= "Afghanistan - OLPC Pashto";
+
+ key <TLDE> { [ 0x100200D, 0x1000654, grave ] }; // zero width joiner, Arabic hamza above
+ key <AE01> { [ 0x10006F1, exclam, asciitilde ] }; // Arabic one
+ key <AE02> { [ 0x10006F2, 0x100066C, at ] }; // Arabic two, Arabic thousands separator
+ key <AE03> { [ 0x10006F3, 0x100066B, numbersign ] }; // Arabic three, Arabic decimal separator
+ key <AE04> { [ 0x10006F4, 0x100060B, dollar ] }; // Arabic four, Afghani sign
+ key <AE05> { [ 0x10006F5, 0x100066A, percent ] }; // Arabic five, Arabic percent sign
+ key <AE06> { [ 0x10006F6, multiply, asciicircum ] }; // Arabic six
+ key <AE07> { [ 0x10006F7, guillemotright, ampersand ] }; // Arabic seven
+ key <AE08> { [ 0x10006F8, guillemotleft, 0x100066D ] }; // Arabic eight, Arabic five-pointed star
+ key <AE09> { [ 0x10006F9, parenright, enfilledcircbullet ] }; // Arabic nine
+ key <AE10> { [ 0x10006F0, parenleft, degree ] }; // Arabic zero
+ key <AE11> { [ minus, 0x1000640, underscore ] }; // Arabic_tatweel
+ key <AE12> { [ plus, equal, division ] };
+
+ key <AD01> { [ 0x1000636, 0x1000652, EuroSign ] }; // Arabic dad, Arabic sukun
+ key <AD02> { [ 0x1000635, 0x100064C, 0x1000671 ] }; // Arabic sad, Arabic dammatan, Arabic alef walsa
+ key <AD03> { [ 0x100062B, 0x100064D, 0x1000649 ] }; // Arabic theh, Arabic kasratan, Arabic alef maksura initial form
+ key <AD04> { [ 0x1000642, 0x100064B, 0x100200E ] }; // Arabic qaf, Arabic fathatan, left-to-right mark
+ key <AD05> { [ 0x1000641, 0x100064F, 0x100200F ] }; // Arabic feh, Arabic damma, right-to-left mark
+ key <AD06> { [ 0x100063A, 0x1000650, 0x100e653 ] }; // Arabic ghain, Arabic kasra, Arabic alef with madda above
+ key <AD07> { [ 0x1000639, 0x100064E, 0x100e659 ] }; // Arabic ain, Arabic fatha, Arabic zwarakay
+ key <AD08> { [ 0x1000647, 0x1000651, 0x1000670 ] }; // Arabic heh, Arabic shadda, Arabic superscript alef
+ key <AD09> { [ 0x100062E, 0x1000681, apostrophe ] }; // Arabic khah, Arabic hah with hamza above,
+ key <AD10> { [ 0x100062D, 0x1000685, quotedbl ] }; // Arabic hah, Arabic hah with three dots above
+ key <AD11> { [ 0x100062C, bracketright, braceleft ] }; // Arabic jeem
+ key <AD12> { [ 0x1000686, bracketleft, braceright ] }; // Arabic tcheh
+
+ key <AC01> { [ 0x1000634, 0x100069A ] }; // Arabic sheen, Arabic seen with dot below and dot above
+ key <AC02> { [ 0x1000633, 0x10006CD ] }; // Arabic seen, Arabic yeh with tail
+ key <AC03> { [ 0x10006CC, 0x100064A, 0x10006D2 ] }; // Farsi yeh, Arabic yeh, Arabic yeh barree
+ key <AC04> { [ 0x1000628, 0x100067E, 0x10006BA ] }; // Arabic beh, Arabic peh, Arabic noon ghunna
+ key <AC05> { [ 0x1000644, 0x1000623, 0x10006B7 ] }; // Arabic lam, Arabic hamza on alef, Arabic alef with hamza above
+ key <AC06> { [ 0x1000627, 0x1000622, 0x1000625 ] }; // Arabic alef, Arabic madda on alef, Arabic alef with hamza below
+ key <AC07> { [ 0x100062A, 0x100067C, 0x1000679 ] }; // Arabic teh, Arabic teh with ring, Arabic tteh
+ key <AC08> { [ 0x1000646, 0x10006BC, greater ] }; // Arabic noon, Arabic noon with ring
+ key <AC09> { [ 0x1000645, 0x1000629, less ] }; // Arabic meem, Arabic teh marbuta
+ key <AC10> { [ 0x10006A9, colon, 0x1000643 ] }; // Arabic keheh, Arabic kaf
+ key <AC11> { [ 0x10006AB, 0x100061B, 0x10006AF ] }; // Arabic kaf with ring, Arabic semicolon, Arabic gaf
+
+ key <BKSL> { [ backslash, asterisk, bar ] };
+
+ key <AB01> { [ 0x1000638, 0x1000626, question] }; // Arabic zah, Arabic yeh with hamza above
+ key <AB02> { [ 0x10006D0, 0x1000637, semicolon ] }; // Arabic tah, Arabic E
+ key <AB03> { [ 0x1000632, 0x1000698 ] }; // Arabic zain, Arabic jeh
+ key <AB04> { [ 0x1000631, 0x1000621 ] }; // Arabic_ra (reh?), Arabic hamza
+ key <AB05> { [ 0x1000630, 0x100200C ] }; // Arabic_thal, zero width non-joiner
+ key <AB06> { [ 0x100062F, 0x1000689, 0x1000688 ] }; // Arabic_dal, Arabic dal with ring, Arabic ddal
+ key <AB07> { [ 0x1000693, 0x1000624, 0x1000691 ] }; // Arabic reh with ring, Arabic waw with hamza above, Arabic rreh
+ key <AB08> { [ 0x1000648, period, comma ] }; // Arabic_waw, Arabic comma
+ key <AB09> { [ 0x1000696, 0x100002E, 0x10006C7 ] }; // Arabic reh with dot below and dot above, full stop, Arabic letter U
+ key <AB10> { [ slash, 0x100061F, 0x10006C9 ] }; // Arabic question mark, Arabic kirghiz yu
+
+ include "nbsp(zwnj2nb3)"
+ include "group(olpc)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "fa-olpc" {
+
+ name[Group1]= "Afghanistan - OLPC Dari";
+
+ key <TLDE> { [ 0x100200D, division, asciitilde ] }; // zero width joiner
+ key <AE01> { [ 0x10006F1, exclam, grave ] }; // Arabic one
+ key <AE02> { [ 0x10006F2, 0x100066C, at ] }; // Arabic two, Arabic thousands separator
+ key <AE03> { [ 0x10006F3, 0x100066B, numbersign ] }; // Arabic three, Arabic decimal separator
+ key <AE04> { [ 0x10006F4, 0x100060B, dollar ] }; // Arabic four, Afghani sign
+ key <AE05> { [ 0x10006F5, 0x100066A, percent ] }; // Arabic five, Arabic percent sign
+ key <AE06> { [ 0x10006F6, multiply, asciicircum ] }; // Arabic six
+ key <AE07> { [ 0x10006F7, 0x100060C, ampersand ] }; // Arabic seven, Arabic comma
+ key <AE08> { [ 0x10006F8, asterisk, enfilledcircbullet ] }; // Arabic eight,
+ key <AE09> { [ 0x10006F9, parenright, 0x100200E ] }; // Arabic nine, left-to-right mark
+ key <AE10> { [ 0x10006F0, parenleft, 0x100200F ] }; // Arabic zero, right-to-left mark
+ key <AE11> { [ minus, 0x1000640, underscore ] }; // Arabic_tatweel
+ key <AE12> { [ plus, equal ] };
+
+ key <AD01> { [ 0x1000636, 0x1000652, degree ] }; // Arabic dad, Arabic sukun
+ key <AD02> { [ 0x1000635, 0x100064C ] }; // Arabic sad, Arabic dammatan
+ key <AD03> { [ 0x100062B, 0x100064D, EuroSign ] }; // Arabic theh, Arabic kasratan
+ key <AD04> { [ 0x1000642, 0x100064B, 0x100FD3E ] }; // Arabic qaf, Arabic fathatan, ornate left paren
+ key <AD05> { [ 0x1000641, 0x100064F, 0x100FD3F ] }; // Arabic feh, Arabic damma, ornate right paren
+ key <AD06> { [ 0x100063A, 0x1000650, 0x1000656 ] }; // Arabic ghain, Arabic kasra, Arabic subscript alef
+ key <AD07> { [ 0x1000639, 0x100064E, 0x100e659 ] }; // Arabic ain, Arabic fatha, Arabic zwarakay
+ key <AD08> { [ 0x1000647, 0x1000651, 0x1000655 ] }; // Arabic heh, Arabic shadda, Arabic hamza below
+ key <AD09> { [ 0x100062E, bracketright, apostrophe ] }; // Arabic khah
+ key <AD10> { [ 0x100062D, bracketleft, quotedbl ] }; // Arabic hah
+ key <AD11> { [ 0x100062C, braceright, 0x1000681 ] }; // Arabic jeem, Arabic hah with hamza above
+ key <AD12> { [ 0x1000686, braceleft, 0x1000685 ] }; // Arabic tcheh, Arabic hah with three dots above
+
+ key <AC01> { [ 0x1000634, 0x1000624, 0x100069A ] }; // Arabic sheen, Arabic waw with hamza above, Arabic seen with dot below and dot above
+ key <AC02> { [ 0x1000633, 0x1000626, 0x10006CD ] }; // Arabic seen, Arabic yeh with hamza above, Arabic yeh with tail
+ key <AC03> { [ 0x10006CC, 0x100064A, 0x1000649 ] }; // Farsi yeh, Arabic yeh, Arabic alef maksura
+ key <AC04> { [ 0x1000628, 0x1000625, 0x10006D0 ] }; // Arabic beh, Arabic alef with hamza below, Arabic e
+ key <AC05> { [ 0x1000644, 0x1000623, 0x10006B7 ] }; // Arabic lam, Arabic hamza on alef, Arabic alef with hamza above
+ key <AC06> { [ 0x1000627, 0x1000622, 0x1000671 ] }; // Arabic alef, Arabic madda on alef, Arabic alef wasla
+ key <AC07> { [ 0x100062A, 0x1000629, 0x100067C ] }; // Arabic teh, Arabic teh marbuta, Arabic tteh
+ key <AC08> { [ 0x1000646, guillemotright, 0x10006BC ] }; // Arabic noon, Arabic noon with ring
+ key <AC09> { [ 0x1000645, guillemotleft, 0x10006BA ] }; // Arabic meem, Arabic noon ghunna
+ key <AC10> { [ 0x10006A9, colon, semicolon ] }; // Arabic keheh,
+ key <AC11> { [ 0x10006AF, 0x100061B, 0x10006AB ] }; // Arabic gaf, Arabic semicolon, Arabic kaf with ring
+
+ key <BKSL> { [ backslash, bar, question ] };
+
+ key <AB01> { [ 0x1000638, 0x1000643, 0x10006D2 ] }; // Arabic zah, Arabic kaf, Arabic yeh barree
+ key <AB02> { [ 0x1000637, 0x1000653, 0x1000691 ] }; // Arabic tah, Arabic maddah above, Arabic rreh
+ key <AB03> { [ 0x1000632, 0x1000698, 0x1000696 ] }; // Arabic zain, Arabic jeh, Arabic reh with dot below and dot above
+ key <AB04> { [ 0x1000631, 0x1000670, 0x1000693 ] }; // Arabic_ra (reh?), Arabic superscript alef, Arabic reh with ring
+ key <AB05> { [ 0x1000630, 0x100200C, 0x1000688 ] }; // Arabic_thal, zero width non-joiner, Arabic ddal
+ key <AB06> { [ 0x100062F, 0x1000654, 0x1000689 ] }; // Arabic dal, Arabic hamza above, Arabic dal with ring
+ key <AB07> { [ 0x100067E, 0x1000621, 0x1000679 ] }; // Arabic peh, Arabic hamza, Arabic tteh
+ key <AB08> { [ 0x1000648, greater, comma ] }; // Arabic_waw
+ key <AB09> { [ period, less, 0x10006C7 ] }; // Arabic u
+ key <AB10> { [ slash, 0x100061F, 0x10006C9 ] }; // Arabic question mark, Arabic kirghiz yu
+
+ include "nbsp(zwnj2nb3)"
+ include "group(olpc)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "uz-olpc" {
+
+ name[Group1]= "Afghanistan - OLPC Southern Uzbek";
+
+ key <TLDE> { [ 0x100200D, division, asciitilde ] }; // zero width joiner
+ key <AE01> { [ 0x10006F1, exclam, grave ] }; // Arabic one
+ key <AE02> { [ 0x10006F2, 0x100066C, at ] }; // Arabic two, Arabic thousands separator
+ key <AE03> { [ 0x10006F3, 0x100066B, numbersign ] }; // Arabic three, Arabic decimal separator
+ key <AE04> { [ 0x10006F4, 0x100060B, dollar ] }; // Arabic four, Afghani sign
+ key <AE05> { [ 0x10006F5, 0x100066A, percent ] }; // Arabic five, Arabic percent sign
+ key <AE06> { [ 0x10006F6, multiply, asciicircum ] }; // Arabic six
+ key <AE07> { [ 0x10006F7, 0x100060C, ampersand ] }; // Arabic seven, Arabic comma
+ key <AE08> { [ 0x10006F8, asterisk, enfilledcircbullet ] }; // Arabic eight,
+ key <AE09> { [ 0x10006F9, parenright, 0x100200E ] }; // Arabic nine, left-to-right mark
+ key <AE10> { [ 0x10006F0, parenleft, 0x100200F ] }; // Arabic zero, right-to-left mark
+ key <AE11> { [ minus, 0x1000640, underscore ] }; // Arabic_tatweel
+ key <AE12> { [ plus, equal ] };
+
+ key <AD01> { [ 0x1000636, 0x1000652, degree ] }; // Arabic dad, Arabic sukun
+ key <AD02> { [ 0x1000635, 0x100064C, 0x1000653 ] }; // Arabic sad, Arabic dammatan, Arabic maddah above
+ key <AD03> { [ 0x100062B, 0x100064D, EuroSign ] }; // Arabic theh, Arabic kasratan
+ key <AD04> { [ 0x1000642, 0x100064B, 0x100FD3E ] }; // Arabic qaf, Arabic fathatan, ornate left paren
+ key <AD05> { [ 0x1000641, 0x100064F, 0x100FD3F ] }; // Arabic feh, Arabic damma, ornate right paren
+ key <AD06> { [ 0x100063A, 0x1000650, 0x1000656 ] }; // Arabic ghain, Arabic kasra, Arabic subscript alef
+ key <AD07> { [ 0x1000639, 0x100064E, 0x100e659 ] }; // Arabic ain, Arabic fatha, Arabic zwarakay
+ key <AD08> { [ 0x1000647, 0x1000651, 0x1000670 ] }; // Arabic heh, Arabic shadda, Arabic superscript alef
+ key <AD09> { [ 0x100062E, bracketright, apostrophe ] }; // Arabic khah
+ key <AD10> { [ 0x100062D, bracketleft, quotedbl ] }; // Arabic hah
+ key <AD11> { [ 0x100062C, braceright, 0x1000681 ] }; // Arabic jeem, Arabic hah with hamza above
+ key <AD12> { [ 0x1000686, braceleft, 0x1000685 ] }; // Arabic tcheh, Arabic hah with three dots above
+
+ key <AC01> { [ 0x1000634, 0x1000624, 0x100069A ] }; // Arabic sheen, Arabic waw with hamza above, Arabic seen with dot below and dot above
+ key <AC02> { [ 0x1000633, 0x1000626, 0x10006CD ] }; // Arabic seen, Arabic yeh with hamza above, Arabic yeh with tail
+ key <AC03> { [ 0x10006CC, 0x100064A, 0x1000649 ] }; // Farsi yeh, Arabic yeh, Arabic alef maksura
+ key <AC04> { [ 0x1000628, 0x10006D0, 0x1000643 ] }; // Arabic beh, Arabic e, Arabic kaf
+ key <AC05> { [ 0x1000644, 0x1000623, 0x10006B7 ] }; // Arabic lam, Arabic hamza on alef, Arabic alef with hamza above
+ key <AC06> { [ 0x1000627, 0x1000622, 0x1000671 ] }; // Arabic alef, Arabic madda on alef, Arabic alef wasla
+ key <AC07> { [ 0x100062A, 0x1000629, 0x100067C ] }; // Arabic teh, Arabic teh marbuta, Arabic tteh
+ key <AC08> { [ 0x1000646, guillemotright, 0x10006BC ] }; // Arabic noon, Arabic noon with ring
+ key <AC09> { [ 0x1000645, guillemotleft, 0x10006BA ] }; // Arabic meem, Arabic noon ghunna
+ key <AC10> { [ 0x10006A9, colon, semicolon ] }; // Arabic keheh,
+ key <AC11> { [ 0x10006AF, 0x100061B, 0x10006AB ] }; // Arabic gaf, Arabic semicolon, Arabic kaf with ring
+
+ key <BKSL> { [ backslash, bar, question ] };
+
+ key <AB01> { [ 0x1000638, 0x10006C9, 0x10006D2 ] }; // Arabic zah, Arabic kirghiz yu, Arabic yeh barree
+ key <AB02> { [ 0x1000637, 0x10006C7, 0x1000691 ] }; // Arabic tah, Arabic u, Arabic rreh
+ key <AB03> { [ 0x1000632, 0x1000698, 0x1000696 ] }; // Arabic zain, Arabic jeh, Arabic reh with dot below and dot above
+ key <AB04> { [ 0x1000631, 0x1000625, 0x1000693 ] }; // Arabic_ra (reh?), Arabic alef with hamza below, Arabic reh with ring
+ key <AB05> { [ 0x1000630, 0x100200C, 0x1000688 ] }; // Arabic_thal, zero width non-joiner, Arabic ddal
+ key <AB06> { [ 0x100062F, 0x1000654, 0x1000689 ] }; // Arabic dal, Arabic hamza above, Arabic dal with ring
+ key <AB07> { [ 0x100067E, 0x1000621, 0x1000679 ] }; // Arabic peh, Arabic hamza, Arabic tteh
+ key <AB08> { [ 0x1000648, greater, comma ] }; // Arabic_waw
+ key <AB09> { [ period, less ] };
+ key <AB10> { [ slash, 0x100061F, 0x1000655 ] }; // Arabic question mark, Arabic hamza below
+
+ include "nbsp(zwnj2nb3)"
+ include "group(olpc)"
+};
diff --git a/xorg-server/xkeyboard-config/symbols/capslock b/xorg-server/xkeyboard-config/symbols/capslock
index 3e0880573..6daf5c1ed 100644
--- a/xorg-server/xkeyboard-config/symbols/capslock
+++ b/xorg-server/xkeyboard-config/symbols/capslock
@@ -1,74 +1,74 @@
-default partial hidden modifier_keys
-xkb_symbols "capslock" {
- replace key <CAPS> { [ Caps_Lock ] };
- modifier_map Lock { Caps_Lock };
-};
-
-partial hidden modifier_keys
-xkb_symbols "shiftlock" {
- replace key <CAPS> { [ Shift_Lock ] };
- modifier_map Shift { Shift_Lock };
-};
-
-partial hidden modifier_keys
-xkb_symbols "grouplock" {
- replace key <CAPS> { [ ISO_Next_Group, Caps_Lock ] };
-};
-
-partial hidden modifier_keys
-xkb_symbols "swapescape" {
- key <CAPS> { [ Escape ] };
- key <ESC> { [ Caps_Lock ] };
-};
-
-partial hidden modifier_keys
-xkb_symbols "groupshift" {
- key <CAPS> {
- type[Group1]="PC_ALT_LEVEL2",
- [ Mode_switch, Caps_Lock ]
- };
-};
-
-partial hidden modifier_keys
-xkb_symbols "escape" {
- key <CAPS> { [ Escape ] };
-};
-
-partial hidden modifier_keys
-xkb_symbols "backspace" {
- key <CAPS> { [ BackSpace ] };
-};
-
-partial hidden modifier_keys
-xkb_symbols "super" {
- key <CAPS> { [ Super_L ] };
- modifier_map Mod4 { <CAPS> };
-};
-
-partial hidden modifier_keys
-xkb_symbols "hyper" {
- key <CAPS> { [ Hyper_L ] };
- modifier_map Mod4 { <CAPS> };
-};
-
-partial hidden modifier_keys
-xkb_symbols "none" {
- key <CAPS> { [ VoidSymbol ] };
-};
-
-partial hidden modifier_keys
-xkb_symbols "numlock" {
- key <CAPS> { [ Num_Lock ] };
-};
-
-// This changes the modifier behavior of the <CAPS> key.
-// The keysym will be reset to Caps_Lock
-partial hidden modifier_keys
-xkb_symbols "ctrl_modifier" {
- replace key <CAPS> {
- type[Group1] = "ONE_LEVEL",
- symbols[Group1] = [ Caps_Lock ],
- actions[Group1] = [ SetMods(modifiers=Control) ]
- };
- modifier_map Control { <CAPS> };
-};
+default partial hidden modifier_keys
+xkb_symbols "capslock" {
+ replace key <CAPS> { [ Caps_Lock ] };
+ modifier_map Lock { Caps_Lock };
+};
+
+partial hidden modifier_keys
+xkb_symbols "shiftlock" {
+ replace key <CAPS> { [ Shift_Lock ] };
+ modifier_map Shift { Shift_Lock };
+};
+
+partial hidden modifier_keys
+xkb_symbols "grouplock" {
+ replace key <CAPS> { [ ISO_Next_Group, Caps_Lock ] };
+};
+
+partial hidden modifier_keys
+xkb_symbols "swapescape" {
+ key <CAPS> { [ Escape ] };
+ key <ESC> { [ Caps_Lock ] };
+};
+
+partial hidden modifier_keys
+xkb_symbols "groupshift" {
+ key <CAPS> {
+ type[Group1]="PC_ALT_LEVEL2",
+ [ Mode_switch, Caps_Lock ]
+ };
+};
+
+partial hidden modifier_keys
+xkb_symbols "escape" {
+ key <CAPS> { [ Escape ] };
+};
+
+partial hidden modifier_keys
+xkb_symbols "backspace" {
+ key <CAPS> { [ BackSpace ] };
+};
+
+partial hidden modifier_keys
+xkb_symbols "super" {
+ key <CAPS> { [ Super_L ] };
+ modifier_map Mod4 { <CAPS> };
+};
+
+partial hidden modifier_keys
+xkb_symbols "hyper" {
+ key <CAPS> { [ Hyper_L ] };
+ modifier_map Mod4 { <CAPS> };
+};
+
+partial hidden modifier_keys
+xkb_symbols "none" {
+ key <CAPS> { [ VoidSymbol ] };
+};
+
+partial hidden modifier_keys
+xkb_symbols "numlock" {
+ key <CAPS> { [ Num_Lock ] };
+};
+
+// This changes the modifier behavior of the <CAPS> key.
+// The keysym will be reset to Caps_Lock
+partial hidden modifier_keys
+xkb_symbols "ctrl_modifier" {
+ replace key <CAPS> {
+ type[Group1] = "ONE_LEVEL",
+ symbols[Group1] = [ Caps_Lock ],
+ actions[Group1] = [ SetMods(modifiers=Control) ]
+ };
+ modifier_map Control { <CAPS> };
+};
diff --git a/xorg-server/xkeyboard-config/symbols/cd b/xorg-server/xkeyboard-config/symbols/cd.in
index 8a12a384e..8a12a384e 100644
--- a/xorg-server/xkeyboard-config/symbols/cd
+++ b/xorg-server/xkeyboard-config/symbols/cd.in
diff --git a/xorg-server/xkeyboard-config/symbols/digital_vndr/makefile b/xorg-server/xkeyboard-config/symbols/digital_vndr/makefile
new file mode 100644
index 000000000..cdfa2ef28
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/digital_vndr/makefile
@@ -0,0 +1,13 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\digital_vndr
+
+dist_symbols_DATA = \
+lk pc us \
+vt
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/symbols/es b/xorg-server/xkeyboard-config/symbols/es
index 88b390d97..7f92d8767 100644
--- a/xorg-server/xkeyboard-config/symbols/es
+++ b/xorg-server/xkeyboard-config/symbols/es
@@ -1,217 +1,217 @@
-// based on a keyboard
-// Modified for a real Spanish Keyboard by Jon Tombs
-//
-
-partial default alphanumeric_keys
-xkb_symbols "basic" {
-
- include "latin(type4)"
-
- name[Group1]="Spain";
-
- key <AE01> { [ 1, exclam, bar, exclamdown ] };
- key <AE03> { [ 3, periodcentered, numbersign, sterling ] };
- key <AE04> { [ 4, dollar, asciitilde, dollar ] };
- key <AE06> { [ 6, ampersand, notsign, fiveeighths ] };
- key <AE11> { [apostrophe, question, backslash, questiondown ] };
- key <AE12> { [exclamdown, questiondown, dead_tilde, asciitilde ] };
-
- key <AD11> { [dead_grave, dead_circumflex, bracketleft, dead_abovering ] };
- key <AD12> { [ plus, asterisk, bracketright, dead_macron ] };
-
- key <AC10> { [ ntilde, Ntilde, asciitilde, dead_doubleacute ] };
- key <AC11> { [dead_acute, dead_diaeresis, braceleft, braceleft ] };
- key <TLDE> { [ masculine, ordfeminine, backslash, backslash ] };
-
- key <BKSL> { [ ccedilla, Ccedilla, braceright, dead_breve ] };
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "Sundeadkeys" {
-
- include "es(basic)"
-
- key <AC11> { [dead_acute, dead_diaeresis, braceleft, braceleft ] };
- key <AD11> { [dead_grave, dead_circumflex, bracketleft, dead_abovering ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "sundeadkeys" {
-
- include "es(Sundeadkeys)"
-
- name[Group1]="Spain - Sun dead keys";
-};
-
-partial alphanumeric_keys
-xkb_symbols "nodeadkeys" {
-
- include "es(basic)"
-
- name[Group1]="Spain - Eliminate dead keys";
-
- key <AD11> { [ grave, asciicircum, bracketleft, degree ] };
- key <AD12> { [ plus, asterisk, bracketright, macron ] };
- key <AC10> { [ ntilde, Ntilde, asciitilde, doubleacute ] };
- key <AC11> { [ acute, diaeresis, braceleft, braceleft ] };
- key <BKSL> { [ ccedilla, Ccedilla, braceright, breve ] };
- key <AB10> { [ minus, underscore, dead_belowdot, abovedot ] };
-};
-
-// Spanish mapping (note R-H exchange)
-partial alphanumeric_keys
-xkb_symbols "dvorak" {
-
- name[Group1]="Spain - Dvorak";
-
- // Alphanumeric section
- key <TLDE> {[ masculine, ordfeminine, backslash, degree ]};
- key <AE01> {[ 1, exclam, bar, onesuperior ]};
- key <AE02> {[ 2, quotedbl, at, twosuperior ]};
- key <AE03> {[ 3, periodcentered, numbersign, threesuperior ]};
- key <AE04> {[ 4, dollar, asciitilde, onequarter ]};
- key <AE05> {[ 5, percent, brokenbar, fiveeighths ]};
- key <AE06> {[ 6, ampersand, notsign, threequarters ]};
- key <AE07> {[ 7, slash, onehalf, seveneighths ]};
- key <AE08> {[ 8, parenleft, oneeighth, threeeighths ]};
- key <AE09> {[ 9, parenright, asciicircum ]};
- key <AE10> {[ 0, equal, grave, dead_doubleacute ]};
- key <AE11> {[ apostrophe, question, dead_macron, dead_ogonek ]};
- key <AE12> {[ exclamdown, questiondown, dead_breve, dead_abovedot ]};
-
- key <AD01> {[ period, colon ]};
- key <AD02> {[ comma, semicolon ]};
- key <AD03> {[ ntilde, Ntilde, lstroke, Lstroke ]};
- key <AD04> {[ p, P, paragraph ]};
- key <AD05> {[ y, Y, yen ]};
- key <AD06> {[ f, F, tslash, Tslash ]};
- key <AD07> {[ g, G, dstroke, Dstroke ]};
- key <AD08> {[ c, C, cent, copyright ]};
- key <AD09> {[ h, H, hstroke, Hstroke ]};
- key <AD10> {[ l, L, sterling ]};
- key <AD11> {[ dead_grave, dead_circumflex, bracketleft, dead_caron ]};
- key <AD12> {[ plus, asterisk, bracketright, plusminus ]};
-
- key <AC01> {[ a, A, ae, AE ]};
- key <AC02> {[ o, O, oslash, Oslash ]};
- key <AC03> {[ e, E, EuroSign ]};
- key <AC04> {[ u, U, aring, Aring ]};
- key <AC05> {[ i, I, oe, OE ]};
- key <AC06> {[ d, D, eth, ETH ]};
- key <AC07> {[ r, R, registered, trademark ]};
- key <AC08> {[ t, T, thorn, THORN ]};
- key <AC09> {[ n, N, eng, ENG ]};
- key <AC10> {[ s, S, ssharp, section ]};
- key <AC11> {[ dead_acute, dead_diaeresis, braceleft, dead_tilde ]};
- key <BKSL> {[ ccedilla, Ccedilla, braceright, dead_cedilla ]};
-
- key <LSGT> {[ less, greater, guillemotleft, guillemotright ]};
- key <AB01> {[ minus, underscore, hyphen, macron ]};
- key <AB02> {[ q, Q, currency ]};
- key <AB03> {[ j, J ]};
- key <AB04> {[ k, K, kra ]};
- key <AB05> {[ x, X, multiply, division ]};
- key <AB06> {[ b, B ]};
- key <AB07> {[ m, M, mu ]};
- key <AB08> {[ w, W ]};
- key <AB09> {[ v, V ]};
- key <AB10> {[ z, Z ]};
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "cat" {
-
- include "es(basic)"
-
- name[Group1]="Spain - Catalan variant with middle-dot L";
-
- key <AC09> { [ l, L, 0x1000140, 0x100013F ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "ast" {
-
- include "es(basic)"
-
- name[Group1]="Spain - Asturian variant with bottom-dot H and bottom-dot L";
-
- key <AC06> { [ h, H, 0x1001E25, 0x1001E24 ] };
- key <AC09> { [ l, L, 0x1001E37, 0x1001E36 ] };
-};
-
-// Copied from macintosh_vndr/es
-partial alphanumeric_keys
-xkb_symbols "mac" {
-
- // Describes the differences between a very simple mac_US
- // keyboard and a very simple Spanish keybaord
-
- include "es"
- name[Group1]= "Spain - Macintosh";
-
-};
-
-partial alphanumeric_keys
-xkb_symbols "olpc" {
-
- include "us(basic)"
- name[Group1]="Spain";
-
- key <TLDE> { [ masculine, ordfeminine ] };
- key <AE01> { [ 1, exclam, bar ] };
- key <AE02> { [ 2, quotedbl, at ] };
- key <AE03> { [ 3, dead_grave, numbersign, grave ] };
- key <AE05> { [ 5, percent, asciicircum, dead_circumflex ] };
- key <AE06> { [ 6, ampersand, notsign ] };
- key <AE07> { [ 7, slash, backslash ] };
- key <AE08> { [ 8, parenleft ] };
- key <AE09> { [ 9, parenright ] };
- key <AE10> { [ 0, equal ] };
- key <AE11> { [ apostrophe, question ] };
- key <AE12> { [ exclamdown, questiondown ] };
-
- key <AD03> { [ e, E, EuroSign ] };
- key <AD11> { [ dead_acute, dead_diaeresis, acute, dead_abovering ] };
- key <AD12> { [ bracketleft, braceleft ] };
-
- key <AC10> { [ ntilde, Ntilde ] };
- key <AC11> { [ plus, asterisk, dead_tilde ] };
- key <BKSL> { [ bracketright, braceright, section ] };
-
- key <AB08> { [ comma, semicolon ] };
- key <AB09> { [ period, colon ] };
- key <AB10> { [ minus, underscore ] };
-
- key <I219> { [ less, greater, ISO_Next_Group ] };
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "deadtilde" {
-
- include "es(basic)"
-
- name[Group1]="Spain - Include dead tilde";
-
- key <AE04> { [ 4, dollar, dead_tilde, dollar ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "olpc2" {
-
- // Modified variant of US International layout, specifically for Peru
- // Contact: Sayamindu Dasgupta <sayamindu@laptop.org>
-
- include "us(olpc)"
- name[Group1]="Spain - OLPC2";
-
- key <AE03> { [ 3, numbersign, dead_grave, dead_grave] }; // combining grave
- key <I236> { [ XF86Start ] };
-
- include "level3(ralt_switch)"
-};
+// based on a keyboard
+// Modified for a real Spanish Keyboard by Jon Tombs
+//
+
+partial default alphanumeric_keys
+xkb_symbols "basic" {
+
+ include "latin(type4)"
+
+ name[Group1]="Spain";
+
+ key <AE01> { [ 1, exclam, bar, exclamdown ] };
+ key <AE03> { [ 3, periodcentered, numbersign, sterling ] };
+ key <AE04> { [ 4, dollar, asciitilde, dollar ] };
+ key <AE06> { [ 6, ampersand, notsign, fiveeighths ] };
+ key <AE11> { [apostrophe, question, backslash, questiondown ] };
+ key <AE12> { [exclamdown, questiondown, dead_tilde, asciitilde ] };
+
+ key <AD11> { [dead_grave, dead_circumflex, bracketleft, dead_abovering ] };
+ key <AD12> { [ plus, asterisk, bracketright, dead_macron ] };
+
+ key <AC10> { [ ntilde, Ntilde, asciitilde, dead_doubleacute ] };
+ key <AC11> { [dead_acute, dead_diaeresis, braceleft, braceleft ] };
+ key <TLDE> { [ masculine, ordfeminine, backslash, backslash ] };
+
+ key <BKSL> { [ ccedilla, Ccedilla, braceright, dead_breve ] };
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "Sundeadkeys" {
+
+ include "es(basic)"
+
+ key <AC11> { [dead_acute, dead_diaeresis, braceleft, braceleft ] };
+ key <AD11> { [dead_grave, dead_circumflex, bracketleft, dead_abovering ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "sundeadkeys" {
+
+ include "es(Sundeadkeys)"
+
+ name[Group1]="Spain - Sun dead keys";
+};
+
+partial alphanumeric_keys
+xkb_symbols "nodeadkeys" {
+
+ include "es(basic)"
+
+ name[Group1]="Spain - Eliminate dead keys";
+
+ key <AD11> { [ grave, asciicircum, bracketleft, degree ] };
+ key <AD12> { [ plus, asterisk, bracketright, macron ] };
+ key <AC10> { [ ntilde, Ntilde, asciitilde, doubleacute ] };
+ key <AC11> { [ acute, diaeresis, braceleft, braceleft ] };
+ key <BKSL> { [ ccedilla, Ccedilla, braceright, breve ] };
+ key <AB10> { [ minus, underscore, dead_belowdot, abovedot ] };
+};
+
+// Spanish mapping (note R-H exchange)
+partial alphanumeric_keys
+xkb_symbols "dvorak" {
+
+ name[Group1]="Spain - Dvorak";
+
+ // Alphanumeric section
+ key <TLDE> {[ masculine, ordfeminine, backslash, degree ]};
+ key <AE01> {[ 1, exclam, bar, onesuperior ]};
+ key <AE02> {[ 2, quotedbl, at, twosuperior ]};
+ key <AE03> {[ 3, periodcentered, numbersign, threesuperior ]};
+ key <AE04> {[ 4, dollar, asciitilde, onequarter ]};
+ key <AE05> {[ 5, percent, brokenbar, fiveeighths ]};
+ key <AE06> {[ 6, ampersand, notsign, threequarters ]};
+ key <AE07> {[ 7, slash, onehalf, seveneighths ]};
+ key <AE08> {[ 8, parenleft, oneeighth, threeeighths ]};
+ key <AE09> {[ 9, parenright, asciicircum ]};
+ key <AE10> {[ 0, equal, grave, dead_doubleacute ]};
+ key <AE11> {[ apostrophe, question, dead_macron, dead_ogonek ]};
+ key <AE12> {[ exclamdown, questiondown, dead_breve, dead_abovedot ]};
+
+ key <AD01> {[ period, colon ]};
+ key <AD02> {[ comma, semicolon ]};
+ key <AD03> {[ ntilde, Ntilde, lstroke, Lstroke ]};
+ key <AD04> {[ p, P, paragraph ]};
+ key <AD05> {[ y, Y, yen ]};
+ key <AD06> {[ f, F, tslash, Tslash ]};
+ key <AD07> {[ g, G, dstroke, Dstroke ]};
+ key <AD08> {[ c, C, cent, copyright ]};
+ key <AD09> {[ h, H, hstroke, Hstroke ]};
+ key <AD10> {[ l, L, sterling ]};
+ key <AD11> {[ dead_grave, dead_circumflex, bracketleft, dead_caron ]};
+ key <AD12> {[ plus, asterisk, bracketright, plusminus ]};
+
+ key <AC01> {[ a, A, ae, AE ]};
+ key <AC02> {[ o, O, oslash, Oslash ]};
+ key <AC03> {[ e, E, EuroSign ]};
+ key <AC04> {[ u, U, aring, Aring ]};
+ key <AC05> {[ i, I, oe, OE ]};
+ key <AC06> {[ d, D, eth, ETH ]};
+ key <AC07> {[ r, R, registered, trademark ]};
+ key <AC08> {[ t, T, thorn, THORN ]};
+ key <AC09> {[ n, N, eng, ENG ]};
+ key <AC10> {[ s, S, ssharp, section ]};
+ key <AC11> {[ dead_acute, dead_diaeresis, braceleft, dead_tilde ]};
+ key <BKSL> {[ ccedilla, Ccedilla, braceright, dead_cedilla ]};
+
+ key <LSGT> {[ less, greater, guillemotleft, guillemotright ]};
+ key <AB01> {[ minus, underscore, hyphen, macron ]};
+ key <AB02> {[ q, Q, currency ]};
+ key <AB03> {[ j, J ]};
+ key <AB04> {[ k, K, kra ]};
+ key <AB05> {[ x, X, multiply, division ]};
+ key <AB06> {[ b, B ]};
+ key <AB07> {[ m, M, mu ]};
+ key <AB08> {[ w, W ]};
+ key <AB09> {[ v, V ]};
+ key <AB10> {[ z, Z ]};
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "cat" {
+
+ include "es(basic)"
+
+ name[Group1]="Spain - Catalan variant with middle-dot L";
+
+ key <AC09> { [ l, L, 0x1000140, 0x100013F ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "ast" {
+
+ include "es(basic)"
+
+ name[Group1]="Spain - Asturian variant with bottom-dot H and bottom-dot L";
+
+ key <AC06> { [ h, H, 0x1001E25, 0x1001E24 ] };
+ key <AC09> { [ l, L, 0x1001E37, 0x1001E36 ] };
+};
+
+// Copied from macintosh_vndr/es
+partial alphanumeric_keys
+xkb_symbols "mac" {
+
+ // Describes the differences between a very simple mac_US
+ // keyboard and a very simple Spanish keybaord
+
+ include "es"
+ name[Group1]= "Spain - Macintosh";
+
+};
+
+partial alphanumeric_keys
+xkb_symbols "olpc" {
+
+ include "us(basic)"
+ name[Group1]="Spain";
+
+ key <TLDE> { [ masculine, ordfeminine ] };
+ key <AE01> { [ 1, exclam, bar ] };
+ key <AE02> { [ 2, quotedbl, at ] };
+ key <AE03> { [ 3, dead_grave, numbersign, grave ] };
+ key <AE05> { [ 5, percent, asciicircum, dead_circumflex ] };
+ key <AE06> { [ 6, ampersand, notsign ] };
+ key <AE07> { [ 7, slash, backslash ] };
+ key <AE08> { [ 8, parenleft ] };
+ key <AE09> { [ 9, parenright ] };
+ key <AE10> { [ 0, equal ] };
+ key <AE11> { [ apostrophe, question ] };
+ key <AE12> { [ exclamdown, questiondown ] };
+
+ key <AD03> { [ e, E, EuroSign ] };
+ key <AD11> { [ dead_acute, dead_diaeresis, acute, dead_abovering ] };
+ key <AD12> { [ bracketleft, braceleft ] };
+
+ key <AC10> { [ ntilde, Ntilde ] };
+ key <AC11> { [ plus, asterisk, dead_tilde ] };
+ key <BKSL> { [ bracketright, braceright, section ] };
+
+ key <AB08> { [ comma, semicolon ] };
+ key <AB09> { [ period, colon ] };
+ key <AB10> { [ minus, underscore ] };
+
+ key <I219> { [ less, greater, ISO_Next_Group ] };
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "deadtilde" {
+
+ include "es(basic)"
+
+ name[Group1]="Spain - Include dead tilde";
+
+ key <AE04> { [ 4, dollar, dead_tilde, dollar ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "olpc2" {
+
+ // Modified variant of US International layout, specifically for Peru
+ // Contact: Sayamindu Dasgupta <sayamindu@laptop.org>
+
+ include "us(olpc)"
+ name[Group1]="Spain - OLPC2";
+
+ key <AE03> { [ 3, numbersign, dead_grave, dead_grave] }; // combining grave
+ key <I236> { [ XF86Start ] };
+
+ include "level3(ralt_switch)"
+};
diff --git a/xorg-server/xkeyboard-config/symbols/et b/xorg-server/xkeyboard-config/symbols/et
index 7d15967e2..e1530c2ad 100644
--- a/xorg-server/xkeyboard-config/symbols/et
+++ b/xorg-server/xkeyboard-config/symbols/et
@@ -1,73 +1,73 @@
-//
-// Ethiopia
-// Designed as a part of OLPC project
-//
-// 2007 Sergey Udaltsov <svu@gnome.org>
-//
-
-partial default alphanumeric_keys
-xkb_symbols "basic" {
- include "et(olpc)"
- name[Group1]="Ethiopia";
-};
-
-partial alphanumeric_keys
-xkb_symbols "olpc" {
-
- name[Group1]="Ethiopia";
-
- key <AE01> { [ 0x01001369, 0x01001372 ] }; // 1
- key <AE02> { [ 0x0100136a, 0x01001373 ] }; // 2
- key <AE03> { [ 0x0100136b, 0x01001374 ] }; // 3
- key <AE04> { [ 0x0100136c, 0x01001375 ] }; // 4
- key <AE05> { [ 0x0100136d, 0x01001376 ] }; // 5
- key <AE06> { [ 0x0100136e, 0x01001377 ] }; // 6
- key <AE07> { [ 0x0100136f, 0x01001378 ] }; // 7
- key <AE08> { [ 0x01001370, 0x01001379 ] }; // 8
- key <AE09> { [ 0x01001371, 0x0100137a ] }; // 9
- key <AE10> { [ 0x0100137b, 0x0100137c ] }; // 0
- key <AE11> { [ minus, underscore ] }; // -_
- key <AE12> { [ equal, plus ] }; // =+
-
- key <AD01> { [ 0x01001240, 0x01001250 ] }; // q
- key <AD02> { [ 0x010012C8, VoidSymbol ] }; // w
- key <AD03> { [ 0x0100FE69, 0x0100FE70 ] }; // dead e
- key <AD04> { [ 0x01001228, VoidSymbol ] }; // r
- key <AD05> { [ 0x01001270, 0x01001320 ] }; // t
- key <AD06> { [ 0x010012E8, VoidSymbol ] }; // y
- key <AD07> { [ 0x0100FE75, 0x0100FE76 ] }; // dead u
- key <AD08> { [ 0x0100FE71, 0x0100FE72 ] }; // dead i
- key <AD09> { [ 0x0100FE73, 0x0100FE74 ] }; // dead o
- key <AD10> { [ 0x01001350, 0x01001330 ] }; // p
- key <AD11> { [ 0x01001340, 0x01001338 ] }; // [
- key <AD12> { [ 0x01001328, 0x01001280 ] }; // ]
-
- key <AC01> { [ 0x0100FE67, 0x0100FE68 ] }; // dead a
- key <AC02> { [ 0x01001230, 0x01001220 ] }; // s
- key <AC03> { [ 0x010012F0, 0x010012F8 ] }; // d
- key <AC04> { [ 0x01001348, VoidSymbol ] }; // f
- key <AC05> { [ 0x01001308, 0x01001318 ] }; // g
- key <AC06> { [ 0x01001200, 0x01001210 ] }; // h
- key <AC07> { [ 0x01001300, VoidSymbol ] }; // j
- key <AC08> { [ 0x010012A8, 0x010012B8 ] }; // k
- key <AC09> { [ 0x01001208, VoidSymbol ] }; // l
-
- key <AC10> { [ 0x01001362, 0x01001361 ] }; // :;
- key <AC11> { [ 0x01001366, 0x01001365 ] }; // '"
-
- key <AB01> { [ 0x010012D8, 0x010012E0 ] }; // z
- key <AB02> { [ 0x010012A0, 0x010012D0 ] }; // x
- key <AB03> { [ 0x01001278, 0x0100FE78 ] }; // c
- key <AB04> { [ 0x01001238, 0x01001268 ] }; // v
- key <AB05> { [ 0x01001260, VoidSymbol ] }; // b
- key <AB06> { [ 0x01001290, 0x01001298 ] }; // n
- key <AB07> { [ 0x01001218, VoidSymbol ] }; // m
-
- key <AB08> { [ 0x01001363, VoidSymbol ] }; // <
- key <AB09> { [ 0x01001364, VoidSymbol ] }; // >
- key <AB10> { [ 0x01001367, question ] }; // ?
-
- key <BKSL> { [ VoidSymbol, 0x01002010 ] }; // bksl
-
- include "group(olpc)"
-};
+//
+// Ethiopia
+// Designed as a part of OLPC project
+//
+// 2007 Sergey Udaltsov <svu@gnome.org>
+//
+
+partial default alphanumeric_keys
+xkb_symbols "basic" {
+ include "et(olpc)"
+ name[Group1]="Ethiopia";
+};
+
+partial alphanumeric_keys
+xkb_symbols "olpc" {
+
+ name[Group1]="Ethiopia";
+
+ key <AE01> { [ 0x01001369, 0x01001372 ] }; // 1
+ key <AE02> { [ 0x0100136a, 0x01001373 ] }; // 2
+ key <AE03> { [ 0x0100136b, 0x01001374 ] }; // 3
+ key <AE04> { [ 0x0100136c, 0x01001375 ] }; // 4
+ key <AE05> { [ 0x0100136d, 0x01001376 ] }; // 5
+ key <AE06> { [ 0x0100136e, 0x01001377 ] }; // 6
+ key <AE07> { [ 0x0100136f, 0x01001378 ] }; // 7
+ key <AE08> { [ 0x01001370, 0x01001379 ] }; // 8
+ key <AE09> { [ 0x01001371, 0x0100137a ] }; // 9
+ key <AE10> { [ 0x0100137b, 0x0100137c ] }; // 0
+ key <AE11> { [ minus, underscore ] }; // -_
+ key <AE12> { [ equal, plus ] }; // =+
+
+ key <AD01> { [ 0x01001240, 0x01001250 ] }; // q
+ key <AD02> { [ 0x010012C8, VoidSymbol ] }; // w
+ key <AD03> { [ 0x0100FE69, 0x0100FE70 ] }; // dead e
+ key <AD04> { [ 0x01001228, VoidSymbol ] }; // r
+ key <AD05> { [ 0x01001270, 0x01001320 ] }; // t
+ key <AD06> { [ 0x010012E8, VoidSymbol ] }; // y
+ key <AD07> { [ 0x0100FE75, 0x0100FE76 ] }; // dead u
+ key <AD08> { [ 0x0100FE71, 0x0100FE72 ] }; // dead i
+ key <AD09> { [ 0x0100FE73, 0x0100FE74 ] }; // dead o
+ key <AD10> { [ 0x01001350, 0x01001330 ] }; // p
+ key <AD11> { [ 0x01001340, 0x01001338 ] }; // [
+ key <AD12> { [ 0x01001328, 0x01001280 ] }; // ]
+
+ key <AC01> { [ 0x0100FE67, 0x0100FE68 ] }; // dead a
+ key <AC02> { [ 0x01001230, 0x01001220 ] }; // s
+ key <AC03> { [ 0x010012F0, 0x010012F8 ] }; // d
+ key <AC04> { [ 0x01001348, VoidSymbol ] }; // f
+ key <AC05> { [ 0x01001308, 0x01001318 ] }; // g
+ key <AC06> { [ 0x01001200, 0x01001210 ] }; // h
+ key <AC07> { [ 0x01001300, VoidSymbol ] }; // j
+ key <AC08> { [ 0x010012A8, 0x010012B8 ] }; // k
+ key <AC09> { [ 0x01001208, VoidSymbol ] }; // l
+
+ key <AC10> { [ 0x01001362, 0x01001361 ] }; // :;
+ key <AC11> { [ 0x01001366, 0x01001365 ] }; // '"
+
+ key <AB01> { [ 0x010012D8, 0x010012E0 ] }; // z
+ key <AB02> { [ 0x010012A0, 0x010012D0 ] }; // x
+ key <AB03> { [ 0x01001278, 0x0100FE78 ] }; // c
+ key <AB04> { [ 0x01001238, 0x01001268 ] }; // v
+ key <AB05> { [ 0x01001260, VoidSymbol ] }; // b
+ key <AB06> { [ 0x01001290, 0x01001298 ] }; // n
+ key <AB07> { [ 0x01001218, VoidSymbol ] }; // m
+
+ key <AB08> { [ 0x01001363, VoidSymbol ] }; // <
+ key <AB09> { [ 0x01001364, VoidSymbol ] }; // >
+ key <AB10> { [ 0x01001367, question ] }; // ?
+
+ key <BKSL> { [ VoidSymbol, 0x01002010 ] }; // bksl
+
+ include "group(olpc)"
+};
diff --git a/xorg-server/xkeyboard-config/symbols/fujitsu_vndr/makefile b/xorg-server/xkeyboard-config/symbols/fujitsu_vndr/makefile
new file mode 100644
index 000000000..841c123d8
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/fujitsu_vndr/makefile
@@ -0,0 +1,12 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\fujitsu_vndr
+
+dist_symbols_DATA = \
+jp us
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/symbols/hp_vndr/makefile b/xorg-server/xkeyboard-config/symbols/hp_vndr/makefile
new file mode 100644
index 000000000..3e6a64f47
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/hp_vndr/makefile
@@ -0,0 +1,12 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\hp_vndr
+
+dist_symbols_DATA = \
+us
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/symbols/in b/xorg-server/xkeyboard-config/symbols/in
index cb38a84c0..10683855b 100644
--- a/xorg-server/xkeyboard-config/symbols/in
+++ b/xorg-server/xkeyboard-config/symbols/in
@@ -1,1423 +1,1423 @@
-// This layout includes all Indian layouts, including:
-// - Bengali
-// - Gujarati
-// - Kannada
-// - Malayalam
-// - Oriya
-// - Tamil
-// - Telugu
-// - Urdu
-
-// Links:
-// - Indic INSCRIPT keyboard layout diagrams:
-// http://java.sun.com/products/jfc/tsc/articles/InputMethod/indiclayout.html
-// - Ekusheyr Shadhinota (Bengali layouts):
-// http://ekushey.org/projects/shadhinota/index.html
-// - Microsoft Windows XP SP2: Indic Language Standards - an Introduction:
-// http://www.bhashaindia.com/MSProducts/XpSp2/Articles/IndicLanguageStandards.aspx
-
-// based on a keyboard map from an 'xkb/symbols/dev' file
-
-// Devangari is the default. Kill me if I am wrong:)
-default partial alphanumeric_keys
-xkb_symbols "deva" {
- // March 2004 -- David Holl <smyrph+dev_xkb@ece.wpi.edu>
- name[Group1]="India";
-
- key.type="FOUR_LEVEL";
-
- key <TLDE> { [ U094a, U0912, grave, asciitilde ] };
- key <AE01> { [ U0967, U090d, 1, exclam ] };
- key <AE02> { [ U0968, U0945, 2, at ] };
- // Shift+AE0[3-8] really need to return a macro of keys defined by
- // INSCRIPT in place of the symbols that are here for now. But this
- // requires XKB to map 1 key into two to three other key presses.
- key <AE03> { [ U0969, numbersign, 3, numbersign ] };
- key <AE04> { [ U096a, dollar, 4, dollar ] };
- key <AE05> { [ U096b, percent, 5, percent ] };
- key <AE06> { [ U096c, asciicircum, 6, asciicircum ] };
- key <AE07> { [ U096d, ampersand, 7, ampersand ] };
- key <AE08> { [ U096e, asterisk, 8, asterisk ] };
- key <AE09> { [ U096f, parenleft, 9, parenleft ] };
- key <AE10> { [ U0966, parenright, 0, parenright ] };
- key <AE11> { [ minus, U0903, minus, underscore ] };
- key <AE12> { [ U0943, U090b, U0944, U0960 ] };
-
- key <AD01> { [ U094c, U0914 ] };
- key <AD02> { [ U0948, U0910 ] };
- key <AD03> { [ U093e, U0906 ] };
- key <AD04> { [ U0940, U0908, U0963, U0961 ] };
- key <AD05> { [ U0942, U090a ] };
- key <AD06> { [ U092c, U092d ] };
- key <AD07> { [ U0939, U0919 ] };
- key <AD08> { [ U0917, U0918, U095a ] };
- key <AD09> { [ U0926, U0927 ] };
- key <AD10> { [ U091c, U091d, U095b ] };
- key <AD11> { [ U0921, U0922, U095c, U095d ] };
- key <AD12> { [ U093c, U091e ] };
- // I added \ / ? | for shell-convenience (file names and piping)
- key <BKSL> { [ U0949, U0911, U005C, U007C ] };
-
- key <AC01> { [ U094b, U0913 ] };
- key <AC02> { [ U0947, U090f ] };
- key <AC03> { [ U094d, U0905 ] };
- key <AC04> { [ U093f, U0907, U0962, U090c ] };
- key <AC05> { [ U0941, U0909 ] };
- key <AC06> { [ U092a, U092b, NoSymbol, U095e ] };
- key <AC07> { [ U0930, U0931 ] };
- key <AC08> { [ U0915, U0916, U0958, U0959 ] };
- key <AC09> { [ U0924, U0925 ] };
- key <AC10> { [ U091a, U091b, U0952 ] };
- key <AC11> { [ U091f, U0920, NoSymbol, U0951 ] };
-
- key <AB01> { [ U0946, U090e, U0953 ] };
- key <AB02> { [ U0902, U0901, NoSymbol, U0950 ] };
- key <AB03> { [ U092e, U0923, U0954 ] };
- key <AB04> { [ U0928, U0929 ] };
- key <AB05> { [ U0935, U0934 ] };
- key <AB06> { [ U0932, U0933 ] };
- key <AB07> { [ U0938, U0936 ] };
- key <AB08> { [ comma, U0937, U0970 ] };
- key <AB09> { [ period, U0964, U0965, U093d ] };
- // I added \ / ? | for shell-convenience (file names and piping)
- key <AB10> { [ U092f, U095f, slash, question ] };
-
- // space, space, Zero-Width-Non-Joiner (ZWNJ), Zero-Width-Joiner (ZWJ):
- include "nbsp(zwnj3zwj4)"
-};
-
-//Name : Bolnagri (Combined)
-//Description : A phonetic keyboard layout for Devnagari(Hindi)
-// http://www.indlinux.org/wiki/index.php/BolNagri
-//NOTE : This is a combined map of bolnagri_matras and bolnagri_vowels.
-//Inspired by "devrom" keymap by Steve Smith for the windows tool "keyman"
-//Original Author : Noah Levitt<nlevitt at columbia.edu>
-//Past Authors : Pramod.R <pramodr at gmail.com> and Ravikant <ravikant at sarai.net>
-// Current Main.: G Karunakar <karunakar@sarai.net>
-
-partial alphanumeric_keys
-xkb_symbols "bolnagri" {
- name[Group1] = "India - Hindi Bolnagri";
- key.type="FOUR_LEVEL";
- //Top Alphanumeric row
- // Roman digits
- key <TLDE> { [ U0902, U0901, apostrophe, asciitilde ] }; // apostrophe: anusvara, candrabindu
- key <AE01> { [ 1, exclam, U0967, exclam ] };
- key <AE02> { [ 2, at, U0968, at ] };
- key <AE03> { [ 3, numbersign, U0969, numbersign ] };
- key <AE04> { [ 4, dollar, U096A, dollar ] };
- key <AE05> { [ 5, percent, U096B, percent ] };
- key <AE06> { [ 6, asciicircum, U096C, asciicircum ] };
- key <AE07> { [ 7, ampersand, U096D, ampersand ] };
- key <AE08> { [ 8, asterisk, U096E, asterisk ] };
- key <AE09> { [ 9, parenleft, U096F, parenleft ] };
- key <AE10> { [ 0, parenright, U0966, parenright ] };
- key <AE11> { [ minus, underscore ] };
- key <AE12> { [ equal, plus ] };
- key <BKSL> { [ U0964, U0965, U007C, U005C ] }; //pipe : danda, double danda
-
- //Q Row
- key <AD01> { [ U200C, U200D ] }; // Q: ZWNJ, ZWJ
- key <AD02> { [ U0935, U950 ] }; // W: wa, OM
- key <AD03> { [ U0947, U0948, U090F, U0910 ] }; // E: e, ai matras
- key <AD04> { [ U0930, U0943 ] }; // R: ra, vocalic Ri
- key <AD05> { [ U0924, U0925 ] }; // T: ta, tha
- key <AD06> { [ U092f, U091E ] }; // Y: ya, nya
- key <AD07> { [ U0941, U0942, U0909, U090A ] }; // U: u, uu matras
- key <AD08> { [ U093F, U0940, U0907, U0908 ] }; // I: i, ii matras
- key <AD09> { [ U094B, U094C, U0913, U0914 ] }; // O: o, au matras
- key <AD10> { [ U092A, U092B ] }; // P: pa, pha
- key <AD11> { [ bracketleft, braceleft ] };
- key <AD12> { [ bracketright, braceright ] };
-
- //A Row
- key <AC01> { [ U093E, U0906, U0905, U0906 ] }; // A: aa
- key <AC02> { [ U0938, U0937 ] }; // S: sa, ssa
- key <AC03> { [ U0926, U0927 ] }; // D: da, dha
- key <AC04> { [ U091F, U0920 ] }; // F: TA, THA
- key <AC05> { [ U0917, U0918 ] }; // G: ga, gha
- key <AC06> { [ U0939, U0903 ] }; // H: ha, visarg
- key <AC07> { [ U091C, U091D ] }; // J: ja, jha
- key <AC08> { [ U0915, U0916 ] }; // K: ka, kha
- key <AC09> { [ U0932, U0962 ] }; // L: la, vocalic L or lru matra`
- key <AC10> { [ semicolon, colon ] };
- key <AC11> { [apostrophe, quotedbl ] };
-
- //Z Row
- key <AB01> { [ U0936, U0945 ] }; // Z: sha, akaar candra
- key <AB02> { [ U094D, U0949 ] }; // X: halant, aakaar candra
- key <AB03> { [ U091A, U091B ] }; // C: ca, cha
- key <AB04> { [ U0921, U0922 ] }; // V: da, dha
- key <AB05> { [ U092C, U092D ] }; // B: ba, bha
- key <AB06> { [ U0928, U0923 ] }; // N: na, nha
- key <AB07> { [ U092E, U093D, U092E, U093D ] }; // M: ma, avagraha
- key <AB08> { [ comma, U0970 ] };// comma: comma, dev abbreviation sign
- key <AB09> { [ period, U093C ] }; // period: period, nukta
- key <AB10> { [ slash, question ] };
-
- // begin modifier mappings
-// modifier_map Shift { Shift_L };
-// modifier_map Lock { Caps_Lock };
-// modifier_map Control{ Control_L };
-// modifier_map Mod3 { Mode_switch };
- include "level3(ralt_switch)"
-};
-
-// based on a keyboard map from an 'xkb/symbols/ben' file
-
-partial alphanumeric_keys
-xkb_symbols "ben" {
- name[Group1]= "India - Bengali";
-
- // Mainly numbers.
- key <AE01> { [ U09E7 ] };
- key <AE02> { [ U09E8 ] };
- key <AE03> { [ U09E9 ] };
- key <AE04> { [ U09EA ] };
- key <AE05> { [ U09EB ] };
- key <AE06> { [ U09EC ] };
- key <AE07> { [ U09ED ] };
- key <AE08> { [ U09EE ] };
- key <AE09> { [ U09EF, parenleft ] };
- key <AE10> { [ U09E6, parenright ] };
- key <AE11> { [ minus, U0983 ] };
- key <AE12> { [ U098B, U09C3 ] };
-
-// Mainly long vowels
-
- key <AD01> { [ U09CC, U0994 ] };
- key <AD02> { [ U09C8, U0990 ] };
- key <AD03> { [ U09BE, U0986 ] };
- key <AD04> { [ U09C0, U0988 ] };
- key <AD05> { [ U09C2, U098A ] };
-
-// Mainly voiced consonants
-
- key <AD06> { [ U09AC, U09AD ] };
- key <AD07> { [ U09B9, U0999 ] };
- key <AD08> { [ U0997, U0998 ] };
- key <AD09> { [ U09A6, U09A7 ] };
- key <AD10> { [ U099C, U099D ] };
- key <AD11> { [ U09A1, U09A2 ] };
- key <AD12> { [ U09BC, U099E ] };
-
-// Mainly short vowels
- key <AC01> { [ U09CB, U0993 ] };
- key <AC02> { [ U09C7, U098F ] };
- key <AC03> { [ U09CD, U0985 ] };
- key <AC04> { [ U09BF, U0987 ] };
- key <AC05> { [ U09C1, U0989 ] };
-
-
-// Mainly unvoiced consonants
-
- key <AC06> { [ U09AA, U09AB ] };
- key <AC07> { [ U09B0, U09DD ] };
- key <AC08> { [ U0995, U0996 ] };
- key <AC09> { [ U09A4, U09A5 ] };
- key <AC10> { [ U099A, U099B ] };
- key <AC11> { [ U099F, U09A0 ] };
- key <BKSL> { [ U005C, U007C ] };
-
- key <AB01> { [ z, Z ] };
- key <AB02> { [ U0982, U0981 ] };
- key <AB03> { [ U09AE, U09A3 ] };
- key <AB04> { [ U09A8, U09A8 ] };
- key <AB05> { [ U09AC, U09AC ] };
- key <AB06> { [ U09B2, U09B2 ] };
- key <AB07> { [ U09B8, U09B6 ] };
- key <AB08> { [ comma, U09B7 ] };
- key <AB09> { [ period, U0964 ] };
- key <AB10> { [ U09DF, U09AF ] };
-};
-
-xkb_symbols "ben_probhat" {
- name[Group1]= "India - Bengali Probhat";
- key <ESC> { [ Escape ] };
-
-// numbers
- key <TLDE> { [ U200D, asciitilde ] };
- key <AE01> { [ U09E7, exclam ] };
- key <AE02> { [ U09E8, at ] };
- key <AE03> { [ U09E9, numbersign ] };
- key <AE04> { [ U09EA, U09F3 ] };
- key <AE05> { [ U09EB, percent ] };
- key <AE06> { [ U09EC, asciicircum ] };
- key <AE07> { [ U09ED, U099E ] };
- key <AE08> { [ U09EE, U09CE ] };
- key <AE09> { [ U09EF, parenleft ] };
- key <AE10> { [ U09E6, parenright ] };
- key <AE11> { [ minus, underscore ] };
- key <AE12> { [ equal, plus ] };
- key <BKSP> { [ BackSpace ] };
-
-// tab, q to ]
- key <TAB> { [ Tab, ISO_Left_Tab ] };
- key <AD01> { [ U09A6, U09A7 ] };
- key <AD02> { [ U09C2, U098A ] };
- key <AD03> { [ U09C0, U0988 ] };
- key <AD04> { [ U09B0, U09DC ] };
- key <AD05> { [ U099F, U09A0 ] };
- key <AD06> { [ U098F, U0990 ] };
- key <AD07> { [ U09C1, U0989 ] };
- key <AD08> { [ U09BF, U0987 ] };
- key <AD09> { [ U0993, U0994 ] };
- key <AD10> { [ U09AA, U09AB ] };
- key <AD11> { [ U09C7, U09C8 ] };
- key <AD12> { [ U09CB, U09CC ] };
- key <RTRN> { [ Return ] };
-
-// caps, a to '
-// key <CAPS> { [ Caps_Lock ] };
- key <AC01> { [ U09BE, U0985 ] };
- key <AC02> { [ U09B8, U09B7 ] };
- key <AC03> { [ U09A1, U09A2 ] };
- key <AC04> { [ U09A4, U09A5 ] };
- key <AC05> { [ U0997, U0998 ] };
- key <AC06> { [ U09B9, U0983 ] };
- key <AC07> { [ U099C, U099D ] };
- key <AC08> { [ U0995, U0996 ] };
- key <AC09> { [ U09B2, U0982 ] };
- key <AC10> { [ semicolon, colon ] };
- key <AC11> { [ quoteright, quotedbl ] };
-
-// shift, z to /
-// key <LFSH> { [ Shift_L ] };
- key <AB01> { [ U09DF, U09AF ] };
- key <AB02> { [ U09B6, U09DD ] };
- key <AB03> { [ U099A, U099B ] };
- key <AB04> { [ U0986, U098B ] };
- key <AB05> { [ U09AC, U09AD ] };
- key <AB06> { [ U09A8, U09A3 ] };
- key <AB07> { [ U09AE, U0999 ] };
- key <AB08> { [ comma, U09C3 ] };
- key <AB09> { [ U0964, U0981 ] };
- key <AB10> { [ U09CD, question ] };
- key <BKSL> { [ U200C, U0965 ] };
-
-// key <LCTL> { [ Control_L ] };
-// key <SPCE> { [ space ] };
-
-// modifier_map Shift { Shift_L };
-// modifier_map Lock { Caps_Lock };
-// modifier_map Control{ Control_L };
-
-};
-
-partial alphanumeric_keys
-xkb_symbols "guj" {
- name[Group1]= "India - Gujarati";
-
- // Mainly numbers.
- key <AE01> { [ U0AE7, U0A8D ] };
- key <AE02> { [ U0AE8, U0AC5 ] };
- key <AE03> { [ U0AE9 ] };
- key <AE04> { [ U0AEA ] };
- key <AE05> { [ U0AEB ] };
- key <AE06> { [ U0AEC ] };
- key <AE07> { [ U0AED ] };
- key <AE08> { [ U0AEE ] };
- key <AE09> { [ U0AEF, parenleft ] };
- key <AE10> { [ U0AE6, parenright ] };
- key <AE11> { [ minus, U0A83 ] };
- key <AE12> { [ U0A8B, U0AC3 ] };
-
-// Mainly long vowels
-
- key <AD01> { [ U0ACC, U0A94 ] };
- key <AD02> { [ U0AC8, U0A90 ] };
- key <AD03> { [ U0ABE, U0A86 ] };
- key <AD04> { [ U0AC0, U0A88 ] };
- key <AD05> { [ U0AC2, U0A8A ] };
-
-// Mainly voiced consonants
-
- key <AD06> { [ U0AAC, U0AAD ] };
- key <AD07> { [ U0AB9, U0A99 ] };
- key <AD08> { [ U0A97, U0A98 ] };
- key <AD09> { [ U0AA6, U0AA7 ] };
- key <AD10> { [ U0A9C, U0A9D ] };
- key <AD11> { [ U0AA1, U0AA2 ] };
- key <AD12> { [ U0ABC, U0A9E ] };
-
-// Mainly short vowels
- key <AC01> { [ U0ACB, U0A93 ] };
- key <AC02> { [ U0AC7, U0A8F ] };
- key <AC03> { [ U0ACD, U0A85 ] };
- key <AC04> { [ U0ABF, U0A87 ] };
- key <AC05> { [ U0AC1, U0A89 ] };
-
-// Mainly unvoiced consonants
-
- key <AC06> { [ U0AAA, U0AAB ] };
- key <AC07> { [ U0AB0, U0AB0 ] };
- key <AC08> { [ U0A95, U0A96 ] };
- key <AC09> { [ U0AA4, U0AA5 ] };
- key <AC10> { [ U0A9A, U0A9B ] };
- key <AC11> { [ U0A9F, U0AA0 ] };
- key <BKSL> { [ U0AC9, U0A91 ] };
-
- key <AB01> { [ z , Z ] };
- key <AB02> { [ U0A82, U0A81 ] };
- key <AB03> { [ U0AAE, U0AA3 ] };
- key <AB04> { [ U0AA8, U0AA8 ] };
- key <AB05> { [ U0AB5, U0AB5 ] };
- key <AB06> { [ U0AB2, U0AB3 ] };
- key <AB07> { [ U0AB8, U0AB6 ] };
- key <AB08> { [ comma, U0AB7 ] };
- key <AB09> { [ period, U0964 ] };
- key <AB10> { [ U0AAF, question ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "kan" {
-
- // Inscript layout for Kannada
- // Author : G Karunakar <karunakar@freedomink.org>
- // Date : Wed Nov 13 17:22:58 IST 2002
- // Kannada digits mapped in basic only
-
- name[Group1]= "India - Kannada";
-
- key <TLDE> { [ U0cca, U0c92 ] };
- key <AE01> { [ U0ce7 ] };
- key <AE02> { [ U0ce8 ] };
- key <AE03> { [ U0ce9 ] };
- key <AE04> { [ U0cea ] };
- key <AE05> { [ U0ceb ] };
- key <AE06> { [ U0cec ] };
- key <AE07> { [ U0ced ] };
- key <AE08> { [ U0cee ] };
- key <AE09> { [ U0cef ] };
- key <AE10> { [ U0ce6 ] };
- key <AE11> { [ U0c83 ] };
- key <AE12> { [ U0cc3, U0c8b ] };
-
- key <AD01> { [ U0ccc, U0c94 ] };
- key <AD02> { [ U0cc8, U0c90 ] };
- key <AD03> { [ U0cbe, U0c86 ] };
- key <AD04> { [ U0cc0, U0c88 ] };
- key <AD05> { [ U0cc2, U0c8a ] };
- key <AD06> { [ U0cac, U0cad ] };
- key <AD07> { [ U0cb9, U0c99 ] };
- key <AD08> { [ U0c97, U0c98 ] };
- key <AD09> { [ U0ca6, U0ca7 ] };
- key <AD10> { [ U0c9c, U0c9d ] };
- key <AD11> { [ U0ca1, U0ca2 ] };
- key <AD12> { [ U0cbc, U0c9e ] };
-
- key <AC01> { [ U0ccb, U0c93 ] };
- key <AC02> { [ U0cc7, U0c8f ] };
- key <AC03> { [ U0ccd, U0c85 ] };
- key <AC04> { [ U0cbf, U0c87 ] };
- key <AC05> { [ U0cc1, U0c89 ] };
- key <AC06> { [ U0caa, U0cab ] };
- key <AC07> { [ U0cb0, U0cb1 ] };
- key <AC08> { [ U0c95, U0c96 ] };
- key <AC09> { [ U0ca4, U0ca5 ] };
- key <AC10> { [ U0c9a, U0c9b ] };
- key <AC11> { [ U0c9f, U0ca0 ] };
-
- key <AB01> { [ U0cc6, U0c8e ] };
- key <AB02> { [ U0c82 ] };
- key <AB03> { [ U0cae, U0ca3 ] };
- key <AB04> { [ U0ca8 ] };
- key <AB05> { [ U0cb5, U0cb4 ] };
- key <AB06> { [ U0cb2, U0cb3 ] };
- key <AB07> { [ U0cb8, U0cb6 ] };
- key <AB08> { [ comma , U0cb7 ] };
- key <AB09> { [ period ] };
- key <AB10> { [ U0caf, U0040 ] };
-
- key <RALT> {
- symbols[Group1] = [ Mode_switch, Multi_key ],
- virtualMods = AltGr
- };
-
-};
-
-// Description : A keymap for Malayalam
-// Encoding : Unicode (http://www.unicode.org)
-// Author : Baiju M <baiju@freeshell.org>
-// Date : Sat Aug 17 21:10:48 IST 2002
-// Mapping:
-
-partial alphanumeric_keys
-xkb_symbols "mal" {
-
- name[Group1] = "India - Malayalam";
-
- //From grave to backslash (\)
-
- key <TLDE> { [ U0d4a , U0d12 ] };
-
-// svu:
-// These lines were in former "mal" variant -
-// but the digits are replaced with the ones from 'mal_plusnum' -
-// for the integrity of all Indian layouts
-//
-// key <AE01> { [1 , exclam ] };
-// key <AE02> { [2 , at ] };
-// key <AE03> { [3 , numbersign ] };
-// key <AE04> { [4 , dollar ] };
-// key <AE05> { [5 , percent ] };
-// key <AE06> { [6 ,asciicircum ] };
-// key <AE07> { [7 , ampersand ] };
-// key <AE08> { [8 , asterisk ] };
-// key <AE09> { [9 , parenleft ] };
-// key <AE10> { [0 , parenright ] };
-
- key <AE01> { [ U0d67 , exclam ] };
- key <AE02> { [ U0d68 , at ] };
- key <AE03> { [ U0d69 , numbersign ] };
- key <AE04> { [ U0d6a , dollar ] };
- key <AE05> { [ U0d6b , percent ] };
- key <AE06> { [ U0d6c , asciicircum ] };
- key <AE07> { [ U0d6d , ampersand ] };
- key <AE08> { [ U0d6e , asterisk ] };
- key <AE09> { [ U0d6f , parenleft ] };
- key <AE10> { [ U0d66 , parenright ] };
-
- key <AE11> { [ minus , U0d03 ] };
- key <AE12> { [ U0d43 , U0d0b ] };
- key <BKSL> { [U0200c, U05C ]};//bksl: ZWNJ
-
-
- // From 'q' to right bracket (])
-
- key <AD01> { [ U0d4c , U0d14 ] };
- key <AD02> { [ U0d48 , U0d10 ] };
- key <AD03> { [ U0d3e , U0d06 ] };
- key <AD04> { [ U0d40 , U0d08 ] };
- key <AD05> { [ U0d42 , U0d0a ] };
- key <AD06> { [ U0d2c , U0d2d ] };
- key <AD07> { [ U0d39 , U0d19 ] };
- key <AD08> { [ U0d17 , U0d18 ] };
- key <AD09> { [ U0d26 , U0d27 ] };
- key <AD10> { [ U0d1c , U0d1d ] };
- key <AD11> { [ U0d21 , U0d22 ] };
- key <AD12> { [ U0200d , U0d1e ] };
-
- // From 'a' to apostrophe (')
-
- key <AC01> { [ U0d4b , U0d13 ] };
- key <AC02> { [ U0d47 , U0d0f ] };
- key <AC03> { [ U0d4d , U0d05 ] };
- key <AC04> { [ U0d3f , U0d07 ] };
- key <AC05> { [ U0d41 , U0d09 ] };
- key <AC06> { [ U0d2a , U0d2b ] };
- key <AC07> { [ U0d30 , U0d31 ] };
- key <AC08> { [ U0d15 , U0d16 ] };
- key <AC09> { [ U0d24 , U0d25 ] };
- key <AC10> { [ U0d1a , U0d1b ] };
- key <AC11> { [ U0d1f , U0d20 ] };
-
- // From 'z' to slash (/)
-
- key <AB01> { [ U0d46 , U0d0e ] };
- key <AB02> { [ U0d02 , U200b ] };//X:ZWSP
- key <AB03> { [ U0d2e , U0d23 ] };
- key <AB04> { [ U0d28 ] };
- key <AB05> { [ U0d35 , U0d34 ] };
- key <AB06> { [ U0d32 , U0d33 ] };
- key <AB07> { [ U0d38 , U0d36 ] };
- key <AB08> { [ comma , U0d37 ] };
- key <AB09> { [ period , U0200d ] };
- key <AB10> { [ U0d2f , question ] };
-
-};
-
-//Name : Lalitha
-//Description : A transliteration keyboard layout for Malayalam
-//Original Author : Noah Levitt<nlevitt at columbia.edu>
-//Current Main : Jinesh K.J<jinesh.k@gmail.com>, Swathantra Malayalam Computing (SMC)<smc-discuss@googlegroups.com>
-
-partial alphanumeric_keys
-xkb_symbols "mal_lalitha" {
- name[Group1] = "India - Malayalam Lalitha";
- key.type="FOUR_LEVEL";
- //Top Alphanumeric row
- // Roman digits
- key <TLDE> { [ U0D4D, U0D02, apostrophe, asciitilde ] }; // apostrophe: virama(chandrakala),anusvara
- key <AE01> { [ 1, exclam, U0D67, exclam ] };
- key <AE02> { [ 2, at, U0D68, at ] };
- key <AE03> { [ 3, numbersign, U0D69, numbersign ] };
- key <AE04> { [ 4, dollar, U0D6A, dollar ] };
- key <AE05> { [ 5, percent, U0D6B, percent ] };
- key <AE06> { [ 6, asciicircum, U0D6C, asciicircum ] };
- key <AE07> { [ 7, ampersand, U0D6D, ampersand ] };
- key <AE08> { [ 8, asterisk, U0D6E, asterisk ] };
- key <AE09> { [ 9, parenleft, U0D6F, parenleft ] };
- key <AE10> { [ 0, parenright, U0D66, parenright ] };
- key <AE11> { [ minus, underscore ] };
- key <AE12> { [ equal, plus ] };
- key <BKSL> { [ U005C, U007C, U200C ] };//backslash:pipe,backslash,ZWNJ
-
- //Q Row
- key <AD01> { [ U0D48, U0D4C, U0D10, U0D14 ] }; // Q: ai and au matras
- key <AD02> { [ U0D35 ] }; // W: wa, OM
- key <AD03> { [ U0D46, U0D47, U0D0E, U0D0F ] }; // E: e,ee matras
- key <AD04> { [ U0D30, U0D31, U0D43, U0D0B ] }; // R: ra,rra, vocalic Ri
- key <AD05> { [ U0D24, U0D25, U0D1F, U0D20 ] }; // T: tha, ttha,ta,tta
- key <AD06> { [ U0D2f ] }; // Y: ya
- key <AD07> { [ U0D41, U0D42, U0D09, U0D0A ] }; // U: u, uu matras
- key <AD08> { [ U0D3F, U0D40, U0D07, U0D08 ] }; // I: i, ii matras
- key <AD09> { [ U0D4A, U0D4B, U0D12, U0D13 ] }; // O: o, oo matras
- key <AD10> { [ U0D2A ] }; // P: pa
- key <AD11> { [ bracketleft, braceleft ] };//braceleft:
- key <AD12> { [ bracketright, braceright ] };//braceright:
-
- //A Row
- key <AC01> { [ U0D3E, U0D05, U0D06, U0D05 ] }; // A: a,aa
- key <AC02> { [ U0D38, U0D37 ] }; // S: sa, ssa
- key <AC03> { [ U0D26, U0D27, U0D21, U0D22 ] }; // D: soft da,soft dda,hard da,hard dda,
- key <AC04> { [ U0D2B ] }; // F: pha
- key <AC05> { [ U0D17, U0D18 ] }; // G: ga, gha
- key <AC06> { [ U0D39, U0D03 ] }; // H: ha, visarg
- key <AC07> { [ U0D1C, U0D1D ] }; // J: ja, jha
- key <AC08> { [ U0D15, U0D16 ] }; // K: ka, kha
- key <AC09> { [ U0D32, U0D33 ] }; // L: la, vocalic L or lru matra`
- key <AC10> { [ semicolon, colon ] };
- key <AC11> { [apostrophe, quotedbl ] };
-
- //Z Row
- key <AB01> { [ U0D34, U0D36 ] }; // Z: sha,zha
- key <AB02> { [ U0D4D, U200B ] }; // X: chandrakala,ZWSP
- key <AB03> { [ U0D1A, U0D1B ] }; // C: ca, cha
- key <AB04> { [ U0D35, U200D ] }; // V: va,ZWJ
- key <AB05> { [ U0D2C, U0D2D ] }; // B: ba, bha
- key <AB06> { [ U0D28, U0D23, U0D19, U0D1E ] }; // N: na, hard na,nga,nha
- key <AB07> { [ U0D2E, U0D02 ] }; // M: ma
- key <AB08> { [ comma, U003C ] };// comma: comma
- key <AB09> { [ period, U003E ] }; // period: period
- key <AB10> { [ slash, question ] };
-
- // begin modifier mappings
-// modifier_map Shift { Shift_L };
-// modifier_map Lock { Caps_Lock };
-// modifier_map Control{ Control_L };
-// modifier_map Mod3 { Mode_switch };
- include "level3(ralt_switch)"
-};
-
-
-partial alphanumeric_keys
-xkb_symbols "ori" {
- // Inscript layout for Oriya
- // Author: G Karunakar <karunakar@freedomink.org>
- // Date: Wed Nov 13 18:16:19 IST 2002
-
- name[Group1]= "India - Oriya";
-
- key <AE01> { [ U0b67 ] };
- key <AE02> { [ U0b68 ] };
- key <AE03> { [ U0b69 ] };
- key <AE04> { [ U0b6a ] };
- key <AE05> { [ U0b6b ] };
- key <AE06> { [ U0b6c ] };
- key <AE07> { [ U0b6d ] };
- key <AE08> { [ U0b6e ] };
- key <AE09> { [ U0b6f ] };
- key <AE10> { [ U0b66 ] };
- key <AE11> { [ U0b03 ] };
- key <AE12> { [ U0b43, U0b0b ] };
-
- key <AD01> { [ U0b4c, U0b14 ] };
- key <AD02> { [ U0b48, U0b10 ] };
- key <AD03> { [ U0b3e, U0b06 ] };
- key <AD04> { [ U0b40, U0b08 ] };
- key <AD05> { [ U0b42, U0b0a ] };
- key <AD06> { [ U0b2c, U0b2d ] };
- key <AD07> { [ U0b39, U0b19 ] };
- key <AD08> { [ U0b17, U0b18 ] };
- key <AD09> { [ U0b26, U0b27 ] };
- key <AD10> { [ U0b1c, U0b1d ] };
- key <AD11> { [ U0b21, U0b22 ] };
- key <AD12> { [ U0b3c, U0b1e ] };
-
- key <AC01> { [ U0b4b, U0b13 ] };
- key <AC02> { [ U0b47, U0b0f ] };
- key <AC03> { [ U0b4d, U0b05 ] };
- key <AC04> { [ U0b3f, U0b07 ] };
- key <AC05> { [ U0b41, U0b09 ] };
- key <AC06> { [ U0b2a, U0b2b ] };
- key <AC07> { [ U0b30 ] };
- key <AC08> { [ U0b15, U0b16 ] };
- key <AC09> { [ U0b24, U0b25 ] };
- key <AC10> { [ U0b1a, U0b1b ] };
- key <AC11> { [ U0b1f, U0b20 ] };
-
- key <AB02> { [ U0b02, U0b01 ] };
- key <AB03> { [ U0b2e, U0b23 ] };
- key <AB04> { [ U0b28 ] };
- key <AB05> { [ U0b35 ] };
- key <AB06> { [ U0b32, U0b33 ] };
- key <AB07> { [ U0b38, U0b36 ] };
- key <AB08> { [ comma , U0b37 ] };
- key <AB09> { [ period ] };
- key <AB10> { [ U0b2f, U0040 ] };
-
- key <RALT> {
- symbols[Group1] = [ Mode_switch, Multi_key ],
- virtualMods = AltGr
- };
-};
-
-// based on a keyboard map from an 'xkb/symbols/tml' file
-// INSCRIPT
-partial alphanumeric_keys
-xkb_symbols "tam" {
- name[Group1]= "India - Tamil";
-
- key <TLDE> { [ U0BCA, U0B92 ] };
-
- // Mainly numbers.
- key <AE01> { [ U0BE7 ] };
- key <AE02> { [ U0BE8 ] };
- key <AE03> { [ U0BE9 ] };
- key <AE04> { [ U0BEA ] };
- key <AE05> { [ U0BEB ] };
- key <AE06> { [ U0BEC ] };
- key <AE07> { [ U0BED ] };
- key <AE08> { [ U0BEE ] };
- key <AE09> { [ U0BEF, parenleft ] };
- key <AE10> { [ U0BF0, parenright ] };
- key <AE11> { [ U0BF1, U0B83 ] };
- key <AE12> { [ U0BF2, plus ] };
-
-// Mainly long vowels
-
- key <AD01> { [ U0BCC, U0B94 ] };
- key <AD02> { [ U0BC8, U0B90 ] };
- key <AD03> { [ U0BBE, U0B86 ] };
- key <AD04> { [ U0BC0, U0B88 ] };
- key <AD05> { [ U0BC2, U0B8A ] };
-
-// Mainly voiced consonants
-
- key <AD07> { [ U0BB9, U0B99 ] };
- key <AD10> { [ U0B9c ] };
- key <AD12> { [ U0B9E ] };
-
-// Mainly short vowels
- key <AC01> { [ U0BCB, U0B93 ] };
- key <AC02> { [ U0BC7, U0B8F ] };
- key <AC03> { [ U0BCD, U0B85 ] };
- key <AC04> { [ U0BBF, U0B87 ] };
- key <AC05> { [ U0BC1, U0B89 ] };
-
-// Mainly unvoiced consonants
-
- key <AC06> { [ U0BAA ] };
- key <AC07> { [ U0BB0, U0BB1 ] };
- key <AC08> { [ U0B95 ] };
- key <AC09> { [ U0BA4 ] };
- key <AC10> { [ U0B9A ] };
- key <AC11> { [ U0B9F ] };
- key <BKSL> { [ U005C, U007C ] };//backslash-bar - Changed to Unicode
-
- key <AB01> { [ U0BC6, U0B8E ] };
- key <AB02> { [ U0B82 ] };
- key <AB03> { [ U0BAE, U0BA3 ] };
- key <AB04> { [ U0BA8, U0BA9 ] };
- key <AB05> { [ U0BB5, U0BB4 ] };
- key <AB06> { [ U0BB2, U0BB3 ] };
- key <AB07> { [ U0BB8, U0BB6 ] };
- key <AB08> { [ comma, U0BB7 ] };
- key <AB09> { [ period, U0964 ] };
- key <AB10> { [ U0BAF, question ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "tam_unicode" {
-
-// Description: A keymap based on the TamilNet'99 typewriter keyboard
-// Encoding: Unicode (http://www.unicode.org)
-// Author: Thuraiappah Vaseeharan <vasee@ieee.org>
-// Modifed by: Malathi S <malathiramya@gmail.com>
-// Secondary contact: Sri Ramadoss M <amachu@au-kbc.org>
-// Date : Fri Sep 4 11:32:00 CST 2009
-// Mapping:
-
- name[Group1]= "India - Tamil Unicode";
-
- // granthas
- key <TLDE> { [ apostrophe, asciitilde ] };
- key <AE01> { [ U0031, exclam ] } ;
- key <AE02> { [ U0032, at ] } ;
- key <AE03> { [ U0033, numbersign ] } ;
- key <AE04> { [ U0034, U0BF9 ] } ;
- key <AE05> { [ U0035, percent ] } ;
- key <AE06> { [ U0036, asciicircum ] } ;
- key <AE07> { [ U0037, ampersand ] } ;
- key <AE08> { [ U0038, asterisk ] } ;
- key <AE09> { [ U0039, parenleft ] } ;
- key <AE10> { [ U0030, parenright ] } ;
- key <AE11> { [ minus, underscore ] };
- key <AE12> { [ equal, plus ] };
-
-
- // Qrow
- key <AD01> { [ U0B9E, U0BB6 ] };
- key <AD02> { [ U0BB1, U0BB7 ] };
- key <AD03> { [ U0BA8, U0BB8 ] };
- key <AD04> { [ U0B9A, U0BB9 ] };
- key <AD05> { [ U0BB5, U0B9C ] };
- key <AD06> { [ U0BB2 ] };
- key <AD07> { [ U0BB0 ] };
- key <AD08> { [ U0BC8, U0B90 ] };
- key <AD09> { [ U0BCA, U0BCB ] };
- key <AD10> { [ U0BBF, U0BC0 ] };
- key <AD11> { [ U0BC1, U0BC2 ] };
-
- // Arow
- key <AC01> { [ U0BAF ] };
- key <AC02> { [ U0BB3 ] };
- key <AC03> { [ U0BA9 ] };
- key <AC04> { [ U0B95 ] };
- key <AC05> { [ U0BAA ] };
- key <AC06> { [ U0BBE, U0BB4 ] };
- key <AC07> { [ U0BA4 ] };
- key <AC08> { [ U0BAE ] };
- key <AC09> { [ U0B9F ] };
- key <AC10> { [ U0BCD, U0B83 ] };
- key <AC11> { [ U0B99 ] };
-
- // Zrow
- key <AB01> { [ U0BA3 ] };
- key <AB02> { [ U0B92, U0B93 ] };
- key <AB03> { [ U0B89, U0B8A ] };
- key <AB04> { [ U0B8E, U0B8F ] };
- key <AB05> { [ U0BC6, U0BC7 ] };
- key <AB06> { [ U0B94, U0BCC ] };
- key <AB07> { [ U0B85, U0B86 ] };
- key <AB08> { [ U0B87, U0B88 ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "tam_keyboard_with_numerals" {
-
-// Description: A keymap based on the TamilNet'99 typewriter keyboard
-// Encoding: Unicode (http://www.unicode.org)
-// Author: Malathi S <malathiramya@gmail.com>
-// Secondary contact: Sri Ramadoss M <amachu@au-kbc.org>
-// Date : Fri Sep 4 11:33:00 CST 2009
-// Mapping:
-
- name[Group1]= "India - Tamil Keyboard with Numerals";
-
- // Mainly numbers.
- key <TLDE> { [ apostrophe, asciitilde ] };
- key <AE01> { [ U0BE7, exclam ] };
- key <AE02> { [ U0BE8, at ] };
- key <AE03> { [ U0BE9, numbersign ] };
- key <AE04> { [ U0BEA, U0BF9 ] };
- key <AE05> { [ U0BEB, percent ] };
- key <AE06> { [ U0BEC, asciicircum ] };
- key <AE07> { [ U0BED, ampersand ] };
- key <AE08> { [ U0BEE, asterisk ] };
- key <AE09> { [ U0BEF, parenleft ] };
- key <AE10> { [ U0BE6, parenright ] };
- key <AE11> { [ minus, underscore ] };
- key <AE12> { [ equal, plus ] };
-
-
- // Qrow
- key <AD01> { [ U0B9E, U0BB6 ] };
- key <AD02> { [ U0BB1, U0BB7 ] };
- key <AD03> { [ U0BA8, U0BB8 ] };
- key <AD04> { [ U0B9a, U0BB9 ] };
- key <AD05> { [ U0BB5, U0B9c ] };
- key <AD06> { [ U0BB2 ] };
- key <AD07> { [ U0BB0 ] };
- key <AD08> { [ U0BC8, U0B90 ] };
- key <AD09> { [ U0BCA, U0BCB ] };
- key <AD10> { [ U0BBF, U0BC0 ] };
- key <AD11> { [ U0BC1, U0BC2 ] };
-
- // Arow
- key <AC01> { [ U0BAF ] };
- key <AC02> { [ U0BB3 ] };
- key <AC03> { [ U0BA9 ] };
- key <AC04> { [ U0B95 ] };
- key <AC05> { [ U0BAA ] };
- key <AC06> { [ U0BBE, U0BB4 ] };
- key <AC07> { [ U0BA4 ] };
- key <AC08> { [ U0BAE ] };
- key <AC09> { [ U0B9F ] };
- key <AC10> { [ U0BCD, U0B83 ] };
- key <AC11> { [ U0B99 ] };
-
- // Zrow
- key <AB01> { [ U0BA3 ] };
- key <AB02> { [ U0B92, U0B93 ] };
- key <AB03> { [ U0B89, U0B8A ] };
- key <AB04> { [ U0B8E, U0B8F ] };
- key <AB05> { [ U0BC6, U0BC7 ] };
- key <AB06> { [ U0B94, U0BCC ] };
- key <AB07> { [ U0B85, U0B86 ] };
- key <AB08> { [ U0B87, U0B88 ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "tam_TSCII" {
-
-// Description : A Tamil typewrite-style keymap
-// loosely based on TamilNet'99 reommendations
-// Encoding : TSCII (http://www.tscii.org)
-// Author : Thuraiappah Vaseeharan <vasee@ieee.org>
-// Last Modified: Sat Jan 5 17:11:26 CST 2002
-
- name[Group1]= "India - Tamil TSCII Typewriter";
-
- key <AE01> { [ 0x10000b7, 0x10000a4 ] }; // aytham
- key <AE02> { [ 0x1000082, 0x10000a5 ] }; // shri
- key <AE03> { [ 0x1000083, 0x1000088 ] }; // ja
- key <AE04> { [ 0x1000084, 0x1000089 ] }; // sha
- key <AE05> { [ 0x1000085, 0x100008a ] }; // sa
- key <AE06> { [ 0x1000086, 0x100008b ] }; // ha
- key <AE07> { [ 0x1000087, 0x100008c ] }; // ksha
-
- // Qrow
- key <AD01> { [ 0x10000bb, 0x100009a ] }; // nja
- key <AD02> { [ 0x10000c8, 0x10000da ] }; // Ra
- key <AD03> { [ 0x10000bf, 0x10000d1 ] }; // NNa
- key <AD04> { [ 0x10000ba, 0x10000cd ] }; // ca
- key <AD05> { [ 0x10000c5, 0x10000d7 ] }; // va
- key <AD06> { [ 0x10000c4, 0x10000d6 ] }; // la
- key <AD07> { [ 0x10000c3, 0x10000d5 ] }; // ra
- key <AD08> { [ 0x10000a8, 0x10000b3 ] }; // sangili, ai
- key <AD09> { [ 0x10000ca, 0x10000cb ] }; // di, dI
- key <AD10> { [ 0x10000a2, 0x10000a3 ] }; // visiri
- key <AD11> { [ dead_acute, 0x10000a3 ] }; // Ukaaram
-
- // Arow
- key <AC01> { [ 0x10000c2, 0x10000d4 ] }; // ya
- key <AC02> { [ 0x10000c7, 0x10000d9 ] }; // La
- key <AC03> { [ 0x10000c9, 0x10000db ] }; // na
- key <AC04> { [ 0x10000b8, 0x10000cc ] }; // ka
- key <AC05> { [ 0x10000c0, 0x10000d2 ] }; // pa
- key <AC06> { [ dead_grave,0x10000a1 ] }; // pulli,aravu
- key <AC07> { [ 0x10000be, 0x10000d0 ] }; // tha
- key <AC08> { [ 0x10000c1, 0x10000d3 ] }; // ma
- key <AC09> { [ 0x10000bc, 0x10000ce ] }; // da
- key <AC10> { [ 0x10000c6, 0x10000d8 ] }; // zha
- key <AC11> { [ 0x10000b9, 0x1000099 ] }; // nga
-
- // Zrow
- key <AB01> { [ 0x10000bd, 0x10000cf ] }; // Na
- key <AB02> { [ 0x10000b4, 0x10000b5 ] }; // o, O
- key <AB03> { [ 0x10000af, 0x10000b0 ] }; // u, U
- key <AB04> { [ 0x10000b1, 0x10000b2 ] }; // e, E
- key <AB05> { [ 0x10000a6, 0x10000a7 ] }; // kombus
- key <AB06> { [ 0x10000b6, 0x10000aa ] }; // au
- key <AB07> { [ 0x10000ab, 0x10000ac ] }; // a, A
- key <AB08> { [ 0x10000fe, 0x10000ae ] }; // i, I
-
-};
-
-partial alphanumeric_keys
-xkb_symbols "tam_TAB" {
-
-// Description: A keymap based on the TamilNet'99 typewriter keyboard
-// Encoding: TAB (http://www.tamilnet99.org)
-// Author: Thuraiappah Vaseeharan <t_vasee@yahoo.com>
-// Date : Sun Aug 12 02:23:00 CDT 2001
-
- name[Group1]= "India - Tamil TAB Typewriter";
-
- // numeral row
- key <AE01> { [ 0x10000e7, 0x10000a7 ] } ;
- key <AE02> { [ 0x10000fa, 0x10000a8 ] } ;
- key <AE03> { [ 0x10000fb ] } ;
- key <AE04> { [ 0x10000fc ] } ;
- key <AE05> { [ 0x10000fd ] } ;
- key <AE06> { [ 0x10000fe ] } ;
- key <AE07> { [ 0x10000ff ] } ;
-
- // q-row
- key <AD01> { [ 0x10000eb, 0x10000b3 ] };
- key <AD02> { [ 0x10000f8, 0x10000c1 ] };
- key <AD03> { [ 0x10000ef, 0x10000b8 ] };
- key <AD04> { [ 0x10000ea, 0x10000b2 ] };
- key <AD05> { [ 0x10000f5, 0x10000be ] };
- key <AD06> { [ 0x10000f4, 0x10000bd ] };
- key <AD07> { [ 0x10000f3, 0x10000bc ] };
- key <AD08> { [ 0x10000ac, 0x10000e4 ] };
- key <AD09> { [ 0x10000ae, 0x10000af ] };
- key <AD10> { [ 0x10000a4, 0x10000a6 ] };
- key <AD11> { [ dead_circumflex, 0x10000a6 ] }; // Ukaaram
-
- // a-row
- key <AC01> { [ 0x10000f2, 0x10000bb ] };
- key <AC02> { [ 0x10000f7, 0x10000c0 ] };
- key <AC03> { [ 0x10000f9, 0x10000c2 ] };
- key <AC04> { [ 0x10000e8, 0x10000b0 ] };
- key <AC05> { [ 0x10000f0, 0x10000b9 ] };
- key <AC06> { [ 0x10000a2, 0x10000a3 ] };
- key <AC07> { [ 0x10000ee, 0x10000b6 ] };
- key <AC08> { [ 0x10000f1, 0x10000ba ] };
- key <AC09> { [ 0x10000ec, 0x10000b4 ] };
- key <AC10> { [ 0x10000f6, 0x10000bf ] };
- key <AC11> { [ 0x10000e9, 0x10000b1 ] };
-
- // z-row
- key <AB01> { [ 0x10000ed, 0x10000b5 ] };
- key <AB02> { [ 0x10000e5, 0x10000e6 ] };
- key <AB03> { [ 0x10000e0, 0x10000e1 ] };
- key <AB04> { [ 0x10000e2, 0x10000e3 ] };
- key <AB05> { [ 0x10000aa, 0x10000ab ] };
- key <AB06> { [ 0x10000ac, 0x10000a3 ] };
- key <AB07> { [ 0x10000dc, 0x10000dd ] };
- key <AB08> { [ 0x10000de, 0x10000df ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "tel" {
-
- // Inscript layout for Telugu using Unicode
- // Author: G Karunakar <karunakar@freedomink.org>
- // Date:
- // See layout at http://www.indlinux.org/keymap/telugu.php
-
- name[Group1]= "India - Telugu";
-
- key <TLDE> { [ U0c4a, U0c12 ] };
- key <AE01> { [ U0c67 ] };
- key <AE02> { [ U0c68 ] };
- key <AE03> { [ U0c69, numbersign ] };
- key <AE04> { [ U0c6a, dollar ] };
- key <AE05> { [ U0c6b, percent ] };
- key <AE06> { [ U0c6c, asciicircum ] };
- key <AE07> { [ U0c6d, ampersand ] };
- key <AE08> { [ U0c6e, asterisk ] };
- key <AE09> { [ U0c6f, parenleft ] };
- key <AE10> { [ U0c66, parenright ] };
- key <AE11> { [ U0c03, underscore ] };
- key <AE12> { [ U0c43, U0c0b ] };
- key <BKSP> { [ BackSpace ] };
-
- key <AD01> { [ U0c4c, U0c14 ] };
- key <AD02> { [ U0c48, U0c10 ] };
- key <AD03> { [ U0c3e, U0c06 ] };
- key <AD04> { [ U0c40, U0c08 ] };
- key <AD05> { [ U0c42, U0c0a ] };
- key <AD06> { [ U0c2c, U0c2d ] };
- key <AD07> { [ U0c39, U0c19 ] };
- key <AD08> { [ U0c17, U0c18 ] };
- key <AD09> { [ U0c26, U0c27 ] };
- key <AD10> { [ U0c1c, U0c1d ] };
- key <AD11> { [ U0c21, U0c22 ] };
- key <AD12> { [ U0c1e ] };
-
- key <AC01> { [ U0c4b, U0c13 ] };
- key <AC02> { [ U0c47, U0c0f ] };
- key <AC03> { [ U0c4d, U0c05 ] };
- key <AC04> { [ U0c3f, U0c07 ] };
- key <AC05> { [ U0c41, U0c09 ] };
- key <AC06> { [ U0c2a, U0c2b ] };
- key <AC07> { [ U0c30, U0c31 ] };
- key <AC08> { [ U0c15, U0c16 ] };
- key <AC09> { [ U0c24, U0c25 ] };
- key <AC10> { [ U0c1a, U0c1b ] };
- key <AC11> { [ U0c1f, U0c20 ] };
-
- key <AB01> { [ U0c46, U0c0e ] };
- key <AB02> { [ U0c02, U0c01 ] };
- key <AB03> { [ U0c2e, U0c23 ] };
- key <AB04> { [ U0c28 ] };
- key <AB05> { [ U0c35 ] };
- key <AB06> { [ U0c32, U0c33 ] };
- key <AB07> { [ U0c38, U0c36 ] };
- key <AB08> { [ comma , U0c37 ] };
- key <AB09> { [ period ] };
- key <AB10> { [ U0c2f, U0040 ] };
-
- key <RALT> {
- symbols[Group1] = [ Mode_switch, Multi_key ],
- virtualMods = AltGr
- };
-};
-
-partial alphanumeric_keys
-xkb_symbols "urd-phonetic" {
- include "pk(urd-phonetic)"
- name[Group1]= "India - Urdu, Phonetic";
-};
-
-partial alphanumeric_keys
-xkb_symbols "urd-phonetic3" {
- include "pk(urd-crulp)"
- name[Group1]= "India - Urdu, Alternative phonetic";
-};
-
-partial alphanumeric_keys
-xkb_symbols "urd-winkeys" {
- include "pk(urd-nla)"
- name[Group1]= "India - Urdu, Winkeys";
-};
-
-// based on a keyboard map from an 'xkb/symbols/gur' file
-
-partial alphanumeric_keys
-xkb_symbols "guru" {
- name[Group1]= "India - Gurmukhi";
-
- // Mainly numbers.
- key <AE01> { [ U0A67 ] };
- key <AE02> { [ U0A68 ] };
- key <AE03> { [ U0A69, U0A71 ] };
- key <AE04> { [ U0A6A, U0A74 ] };
- key <AE05> { [ U0A6B, U262C ] };
- key <AE06> { [ U0A6C ] };
- key <AE07> { [ U0A6D ] };
- key <AE08> { [ U0A6e ] };
- key <AE09> { [ U0A6F, parenleft ] };
- key <AE10> { [ U0A66, parenright ] };
- key <AE11> { [ gur_visarga ] };
- key <AE12> { [ equal, plus ] };
-
-// Mainly long vowels
-
- key <AD01> { [ U0A4C, U0A14 ] };
- key <AD02> { [ U0A48, U0A10 ] };
- key <AD03> { [ U0A3E, U0A06 ] };
- key <AD04> { [ U0A40, U0A08 ] };
- key <AD05> { [ U0A42, U0A0A ] };
-
-// Mainly voiced consonants
-
- key <AD06> { [ U0A2C, U0A2D ] };
- key <AD07> { [ U0A39, U0A19 ] };
- key <AD08> { [ U0A17, U0A18 ] };
- key <AD09> { [ U0A26, U0A27 ] };
- key <AD10> { [ U0A1C, U0A1D ] };
- key <AD11> { [ U0A21, U0A22 ] };
- key <AD12> { [ U0A3C, U0A1E ] };
-
-// Mainly short vowels
- key <AC01> { [ U0A4B, U0A13 ] };
- key <AC02> { [ U0A47, U0A0F ] };
- key <AC03> { [ U0A4D, U0A05 ] };
- key <AC04> { [ U0A3F, U0A07 ] };
- key <AC05> { [ U0A41, U0A09 ] };
-
-// Mainly unvoiced consonants
-
- key <AC06> { [ U0A2A, U0A2B ] };
- key <AC07> { [ U0A30, U0A5C ] };
- key <AC08> { [ U0A15, U0A16 ] };
- key <AC09> { [ U0A24, U0A25 ] };
- key <AC10> { [ U0A1A, U0A1B ] };
- key <AC11> { [ U0A1F, U0A20 ] };
- key <BKSL> { [ U005C, U007C ] };
-
- key <AB01> { [ z, U0A01 ] };
- key <AB02> { [ U0A02, U0A70, U0A71 ] };
- key <AB03> { [ U0A2E, U0A23 ] };
- key <AB04> { [ U0A28, U0A28 ] };
- key <AB05> { [ U0A35, U0A35 ] };
- key <AB06> { [ U0A32, U0A33 ] };
- key <AB07> { [ U0A38, U0A36 ] };
- key <AB08> { [ comma, less ] };
- key <AB09> { [ period, U0964 ] };
- key <AB10> { [ U0A2F, question ] };
-};
-
-//Name : Jhelum (Refind Inscript)
-//Description : A Jhelum keyboard layout for Gurmukhi (Punjabi)
-// http://www.satluj.org/Jhelum.html
-//Modified for Inscript to make
-//Original Author : Amanpreet Singh Alam <apreet.alam@gmail.com
-
-partial alphanumeric_keys
-xkb_symbols "jhelum" {
- name[Group1] = "India - Gurmukhi Jhelum";
- key.type="FOUR_LEVEL";
- //Top Alphanumeric row
- // Roman digits
- key <TLDE> { [ apostrophe, asciitilde, U0A02,U0A01 ] }; // apostrophe: anusvara, candrabindu
- key <AE01> { [ 1,exclam, U0A67, exclam ] };
- key <AE02> { [ 2,at, U0A68, at ] };
- key <AE03> { [ 3,numbersign, U0A69, numbersign ] };
- key <AE04> { [ 4,dollar, U0A6A, dollar ] };
- key <AE05> { [ 5,percent,U0A6B, percent ] };
- key <AE06> { [ 6,asciicircum, U0A6C,asciicircum ] };
- key <AE07> { [ 7,ampersand,U0A6D,ampersand ] };
- key <AE08> { [ 8,asterisk,U0A6E, asterisk ] };
- key <AE09> { [ 9,parenleft,U0A6F,parenleft ] };
- key <AE10> { [ 0,parenright,U0A66,parenright ] };
- key <AE11> { [ minus,underscore] };
- key <AE12> { [ equal,plus] };
- key <BKSL> { [ U0964,U0965,U007C,U005C] }; //pipe : danda, double danda
-
- //Q Row
- key <AD01> { [ U0A4C, U0A14 ] }; // Q: oo, ooh
- key <AD02> { [ U0A48, U0A10 ] }; // W: ee, ae
- key <AD03> { [ U0A3E, U0A06 ] }; // E: a, aa
- key <AD04> { [ U0A40, U0A08 ] }; // R: ee, ai
- key <AD05> { [ U0A42, U0A0A ] }; // T: u, uu
- key <AD06> { [ U0A30, U0A5C ] }; // Y: ra, raa
- key <AD07> { [ U0A26, U0A27 ] }; // U: tha, thha
- key <AD08> { [ U0A17, U0A18 ] }; // I:ga, gha
- key <AD09> { [ U0A24, U0A1F ] }; // O: ta, tha
- key <AD10> { [ U0A2A, U0A5E ] }; // P: pa, pha
- key <AD11> { [ U0A21, U0A22, bracketleft, braceleft ] };
- key <AD12> { [ U0A19, U0A1E, bracketright, braceright ] };
-
- //A Row
- key <AC01> { [ U0A4B, U0A13 ] }; // A: o, oo
- key <AC02> { [ U0A40, U0A0F ] }; // S: e, ee
- key <AC03> { [ U0A4D, U0A05 ] }; // D: halant, aa
- key <AC04> { [ U0A3F, U0A07 ] }; // F: i, aa
- key <AC05> { [ U0A41, U0A09 ] }; // G: u, uh
- key <AC06> { [ U0A39, U0A20 ] }; // H: ha, thha
- key <AC07> { [ U0A1C, U0A1D ] }; // J: ja, jha
- key <AC08> { [ U0A15, U0A16 ] }; // K: ka, kha
- key <AC09> { [ U0A32, U0A25 ] }; // L: la, tha
- key <AC10> { [ U0A38, semicolon, colon ] }; //; sa
- key <AC11> { [apostrophe, quotedbl ] };
-
- //Z Row
- key <AB01> { [ U0A71, U0A3C ] }; // Z: addak, par bindi
- key <AB02> { [ U0A02, U0A70 ] }; // X: bindi, tippi
- key <AB03> { [ U0A1A, U0A1B ] }; // C: ca, cha
- key <AB04> { [ U0A35, U0A2F ] }; // V: va, ya
- key <AB05> { [ U0A2C, U0A2D ] }; // B: ba, bha
- key <AB06> { [ U0A28, U0A23 ] }; // N: na, nha
- key <AB07> { [ U0A2E, U0A2E ] }; // M: ma
- key <AB08> { [ comma, U262C ] };// comma: comma, dev abbreviation sign
- key <AB09> { [ period, U0A74 ] }; // period: period, nukta
- key <AB10> { [ slash, question ] };
-
-// begin modifier mappings
-// modifier_map Shift { Shift_L };
-// modifier_map Lock { Caps_Lock };
-// modifier_map Control{ Control_L };
-// modifier_map Mod3 { Mode_switch };
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "olpc" {
-
-// Contact: Walter Bender <walter@laptop.org>
-
- include "in(deva)"
- key <TLDE> { [ U094A, U0912 ] }; // DEVANAGARI VOWEL SIGN SHORT O; DEVANAGARI LETTER SHORT O
- key <AE01> { [ U0967, U090D ] }; // DEVANAGARI DIGIT ONE; DEVANAGARI LETTER CANDRA E
- key <AE02> { [ U0968, U0945 ] }; // DEVANAGARI DIGIT TWO; DEVANAGARI VOWEL SIGN CANDRA E
- key <AE03> { [ U0969 ] }; // DEVANAGARI DIGIT THREE;
- key <AE04> { [ U096A ] }; // DEVANAGARI DIGIT FOUR;
- key <AE05> { [ U096B ] }; // DEVANAGARI DIGIT FIVE;
- key <AE06> { [ U096C ] }; // DEVANAGARI DIGIT SIX;
- key <AE07> { [ U096D ] }; // DEVANAGARI DIGIT SEVEN;
- key <AE08> { [ U096E ] }; // DEVANAGARI DIGIT EIGHT;
- key <AE09> { [ U096F, parenleft ] }; // DEVANAGARI DIGIT NINE;
- key <AE10> { [ U0966, parenright ] }; // DEVANAGARI DIGIT ZERO;
- key <AE11> { [ minus, U0903 ] }; // DEVANAGARI SIGN VISARGA;
- key <AE12> { [ U0943, U090B ] }; // DEVANAGARI VOWEL SIGN VOCALIC R; DEVANAGARI LETTER VOCALIC R
-
- key <AD01> { [ U094C, U0914 ] }; // DEVANAGARI VOWEL SIGN AU; DEVANAGARI LETTER AU
- key <AD02> { [ U0948, U0910 ] }; // DEVANAGARI VOWEL SIGN AI; DEVANAGARI LETTER AI
- key <AD03> { [ U093E, U0906 ] }; // DEVANAGARI VOWEL SIGN AA; DEVANAGARI LETTER AA
- key <AD04> { [ U0940, U0908 ] }; // DEVANAGARI VOWEL SIGN II; DEVANAGARI LETTER II
- key <AD05> { [ U0942, U090A ] }; // DEVANAGARI VOWEL SIGN UU; DEVANAGARI LETTER UU
- key <AD06> { [ U092C, U092D ] }; // DEVANAGARI LETTER BA; DEVANAGARI LETTER BHA
- key <AD07> { [ U0939, U0919 ] }; // DEVANAGARI LETTER HA; DEVANAGARI LETTER NGA
- key <AD08> { [ U0917, U0918 ] }; // DEVANAGARI LETTER GA; DEVANAGARI LETTER GHA
- key <AD09> { [ U0926, U0927 ] }; // DEVANAGARI LETTER DA; DEVANAGARI LETTER DHA
- key <AD10> { [ U091C, U091D ] }; // DEVANAGARI LETTER JA; DEVANAGARI LETTER JHA
- key <AD11> { [ U0921, U0922 ] }; // DEVANAGARI LETTER DDA; DEVANAGARI LETTER DDHA
- key <AD12> { [ U093C, U091E ] }; // DEVANAGARI SIGN NUKTA; DEVANAGARI LETTER NYA
-
- key <BKSL> { [ U0949, U0911 ] }; // DEVANAGARI VOWEL SIGN CANDRA O; DEVANAGARI LETTER CANDRA O
-
- key <AC01> { [ U094B, U0913 ] }; // DEVANAGARI VOWEL SIGN O; DEVANAGARI LETTER O
- key <AC02> { [ U0947, U090F ] }; // DEVANAGARI VOWEL SIGN E; DEVANAGARI LETTER E
- key <AC03> { [ U094D, U0905 ] }; // DEVANAGARI SIGN VIRAMA; DEVANAGARI LETTER A
- key <AC04> { [ U093F, U0907 ] }; // DEVANAGARI VOWEL SIGN I; DEVANAGARI LETTER I
- key <AC05> { [ U0941, U0909 ] }; // DEVANAGARI VOWEL SIGN U; DEVANAGARI LETTER U
- key <AC06> { [ U092A, U092B ] }; // DEVANAGARI LETTER PA; DEVANAGARI LETTER PHA
- key <AC07> { [ U0930, U0931 ] }; // DEVANAGARI LETTER RA; DEVANAGARI LETTER RRA
- key <AC08> { [ U0915, U0916 ] }; // DEVANAGARI LETTER KA; DEVANAGARI LETTER KHA
- key <AC09> { [ U0924, U0925 ] }; // DEVANAGARI LETTER TA; DEVANAGARI LETTER THA
- key <AC10> { [ U091A, U091B ] }; // DEVANAGARI LETTER CA; DEVANAGARI LETTER CHA
- key <AC11> { [ U091F, U0920 ] }; // DEVANAGARI LETTER TTA; DEVANAGARI LETTER TTHA
-
- key <AB01> { [ U0946, U090E ] }; // DEVANAGARI VOWEL SIGN SHORT E; DEVANAGARI LETTER SHORT E
- key <AB02> { [ U0902, U0901 ] }; // DEVANAGARI SIGN ANUSVARA; DEVANAGARI SIGN CANDRABINDU
- key <AB03> { [ U092E, U0923 ] }; // DEVANAGARI LETTER MA; DEVANAGARI LETTER NNA
- key <AB04> { [ U0928, U0929 ] }; // DEVANAGARI LETTER NA; DEVANAGARI LETTER NNNA
- key <AB05> { [ U0935, U0934 ] }; // DEVANAGARI LETTER VA; DEVANAGARI LETTER LLLA
- key <AB06> { [ U0932, U0933 ] }; // DEVANAGARI LETTER LA; DEVANAGARI LETTER LLA
- key <AB07> { [ U0938, U0936 ] }; // DEVANAGARI LETTER SA; DEVANAGARI LETTER SHA
- key <AB08> { [ comma, U0937 ] }; // DEVANAGARI LETTER SSA
- key <AB09> { [ period, U0964 ] }; // DEVANAGARI DANDA
- key <AB10> { [ U092F, U095F ] }; // DEVANAGARI LETTER YA; DEVANAGARI LETTER YYA
-
- // space, space, Zero-Width-Non-Joiner (ZWNJ), Zero-Width-Joiner (ZWJ):
- include "nbsp(zwnj3zwj4)"
-
- include "group(olpc)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "hin-wx" {
-
- name[Group1]= "India - Hindi Wx";
-
- key <TLDE> { [ grave, asciitilde, 2, 3 ] };
-
- key <AE01> { [ 0x1000967, exclam ] };
- key <AE02> { [ 0x1000968, at ] };
- key <AE03> { [ 0x1000969 , numbersign ] };
- key <AE04> { [ 0x100096A , dollar ] };
- key <AE05> { [ 0x100096B , percent ] };
- key <AE06> { [ 0x100096C , asciicircum ] };
- key <AE07> { [ 0x100096D , ampersand ] };
- key <AE08> { [ 0x100096e , asterisk ] };
- key <AE09> { [ 0x100096F, parenleft ] };
- key <AE10> { [ 0x1000966, parenright ] };
- key <AE11> { [ minus, underscore ] };
- key <AE12> { [ equal, plus ] };
-
-
- key <AD01> { [ 0x1000943, 0x1000944, 0x100090B, 0x1000960] };
- key <AD02> { [ 0x1000924, 0x1000925 ] };
- key <AD03> { [ 0x1000947, 0x1000948, 0x100090F, 0x1000910] };
- key <AD04> { [ 0x1000930, 0x1000937 ] };
- key <AD05> { [ 0x100091F, 0x1000920 ] };
-
-
- key <AD06> { [ 0x100092F ] };
- key <AD07> { [ 0x1000941, 0x1000942, 0x1000909, 0x100090A ] };
- key <AD08> { [ 0x100093F, 0x1000940, 0x1000907, 0x1000908 ] };
- key <AD09> { [ 0x100094B, 0x100094C, 0x1000913, 0x1000914] };
- key <AD10> { [ 0x100092A, 0x100092B ] };
- key <AD11> { [ bracketleft, braceleft ] };
- key <AD12> { [ bracketright, braceright ] };
- key <BKSL> { [ backslash, bar, 0x1000964, 0x1000965 ] };
-
- key <AC01> { [ 0x100094D, 0x100093E, 0x1000905,0x1000906 ] };
- key <AC02> { [ 0x1000938, 0x1000936 ] };
- key <AC03> { [ 0x1000921, 0x1000922 ] };
- key <AC04> { [ 0x1000919, 0x100091E ] };
- key <AC05> { [ 0x1000917, 0x1000918 ] };
-
-
- key <AC06> { [ 0x1000939, 0x1000903 ] };
- key <AC07> { [ 0x100091C, 0x100091D ] };
- key <AC08> { [ 0x1000915, 0x1000916 ] };
- key <AC09> { [ 0x1000932, 0x1000962, 0x1000933, 0x100090C] };
- key <AC10> { [ semicolon, colon ] };
- key <AC11> { [ quoteright, quotedbl ] };
-
- key <AB01> { [ 0x1000901, 0x100093C, 0x100093D, 0x1000950] };
- key <AB02> { [ 0x1000926, 0x1000927 ] };
- key <AB03> { [ 0x100091A, 0x100091B ] };
- key <AB04> { [ 0x1000935, dead_V ] };
- key <AB05> { [ 0x100092C, 0x100092D ] };
- key <AB06> { [ 0x1000928, 0x1000923 ] };
- key <AB07> { [ 0x100092E, 0x1000902 ] };
- key <AB08> { [ comma, less ] };
- key <AB09> { [ period, greater ] };
- key <AB10> { [ slash, question ] };
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "eng" {
-
- name[Group1]= "India - English with RupeeSign";
-
- include "us(basic)"
-
- include "rupeesign(4)"
-
- include "level3(ralt_switch)"
-};
-
-
-// Description : Enhanced INSCRIPT keymap for Malayalam
-// Encoding : Unicode (http://www.unicode.org)
-// Author : Mahesh T Pai <paivakil@gmail.com>
-// Date : March, 2011
-// Source : http://www.nongnu.org/smc/docs/images/ml_inscript_layout.jpg
-// Comment : Based on the Inscript Keyboard created by M Baiju
-// Mapping:
-
-partial alphanumeric_keys
-xkb_symbols "mal_enhanced" {
-
- name[Group1] = "India - Malayalam Modified Inscript with Rupee Sign";
-
- //From grave to backslash (\)
-
- key <TLDE> { [ U0d4a , U0d12 ] };
- key <AE01> { [ U0d67 , exclam ] };
- key <AE02> { [ U0d68 , at ] };
- key <AE03> { [ U0d69 , numbersign ] };
- key <AE04> { [ U0d6a , dollar ] };
- key <AE05> { [ U0d6b , percent ] };
- key <AE06> { [ U0d6c , asciicircum ] };
- key <AE07> { [ U0d6d , ampersand ] };
- key <AE08> { [ U0d6e , U0d7e ] };
- key <AE09> { [ U0d6f , parenleft ] };
- key <AE10> { [ U0d66 , parenright ] };
-
- key <AE11> { [ minus , U0d03 ] };
- key <AE12> { [ U0d43 , U0d0b ] };
- key <BKSL> { [ U0d7c , U05C ] }; //bksl: chillu RR
-
-
- // From 'q' to right bracket (])
-
- key <AD01> { [ U0d57 , U0d14 ] };
- key <AD02> { [ U0d48 , U0d10 ] };
- key <AD03> { [ U0d3e , U0d06 ] };
- key <AD04> { [ U0d40 , U0d08 ] };
- key <AD05> { [ U0d42 , U0d0a ] };
- key <AD06> { [ U0d2c , U0d2d ] };
- key <AD07> { [ U0d39 , U0d19 ] };
- key <AD08> { [ U0d17 , U0d18 ] };
- key <AD09> { [ U0d26 , U0d27 ] };
- key <AD10> { [ U0d1c , U0d1d ] };
- key <AD11> { [ U0d21 , U0d22 ] };
- key <AD12> { [ U0200d , U0d1e ] };
-
- // From 'a' to apostrophe (')
-
- key <AC01> { [ U0d4b , U0d13 ] };
- key <AC02> { [ U0d47 , U0d0f ] };
- key <AC03> { [ U0d4d , U0d05 ] };
- key <AC04> { [ U0d3f , U0d07 ] };
- key <AC05> { [ U0d41 , U0d09 ] };
- key <AC06> { [ U0d2a , U0d2b ] };
- key <AC07> { [ U0d30 , U0d31 ] };
- key <AC08> { [ U0d15 , U0d16 ] };
- key <AC09> { [ U0d24 , U0d25 ] };
- key <AC10> { [ U0d1a , U0d1b ] };
- key <AC11> { [ U0d1f , U0d20 ] };
-
- // From 'z' to slash (/)
-
- key <AB01> { [ U0d46 , U0d0e ] };
- key <AB02> { [ U0d02 , U0d7a ] };
- key <AB03> { [ U0d2e , U0d23 ] };
- key <AB04> { [ U0d28 , U0d7b ] };
- key <AB05> { [ U0d35 , U0d34 ] };
- key <AB06> { [ U0d32 , U0d33 ] };
- key <AB07> { [ U0d38 , U0d36 ] };
- key <AB08> { [ comma , U0d37 ] };
- key <AB09> { [ period , U0d7d ] }; //chillu l
- key <AB10> { [ U0d2f , question ] };
-
- // hope this includes the rupee sign at alt + 4
-
- include "rupeesign(4)"
- include "level3(ralt_switch)"
-
-};
-
+// This layout includes all Indian layouts, including:
+// - Bengali
+// - Gujarati
+// - Kannada
+// - Malayalam
+// - Oriya
+// - Tamil
+// - Telugu
+// - Urdu
+
+// Links:
+// - Indic INSCRIPT keyboard layout diagrams:
+// http://java.sun.com/products/jfc/tsc/articles/InputMethod/indiclayout.html
+// - Ekusheyr Shadhinota (Bengali layouts):
+// http://ekushey.org/projects/shadhinota/index.html
+// - Microsoft Windows XP SP2: Indic Language Standards - an Introduction:
+// http://www.bhashaindia.com/MSProducts/XpSp2/Articles/IndicLanguageStandards.aspx
+
+// based on a keyboard map from an 'xkb/symbols/dev' file
+
+// Devangari is the default. Kill me if I am wrong:)
+default partial alphanumeric_keys
+xkb_symbols "deva" {
+ // March 2004 -- David Holl <smyrph+dev_xkb@ece.wpi.edu>
+ name[Group1]="India";
+
+ key.type="FOUR_LEVEL";
+
+ key <TLDE> { [ U094a, U0912, grave, asciitilde ] };
+ key <AE01> { [ U0967, U090d, 1, exclam ] };
+ key <AE02> { [ U0968, U0945, 2, at ] };
+ // Shift+AE0[3-8] really need to return a macro of keys defined by
+ // INSCRIPT in place of the symbols that are here for now. But this
+ // requires XKB to map 1 key into two to three other key presses.
+ key <AE03> { [ U0969, numbersign, 3, numbersign ] };
+ key <AE04> { [ U096a, dollar, 4, dollar ] };
+ key <AE05> { [ U096b, percent, 5, percent ] };
+ key <AE06> { [ U096c, asciicircum, 6, asciicircum ] };
+ key <AE07> { [ U096d, ampersand, 7, ampersand ] };
+ key <AE08> { [ U096e, asterisk, 8, asterisk ] };
+ key <AE09> { [ U096f, parenleft, 9, parenleft ] };
+ key <AE10> { [ U0966, parenright, 0, parenright ] };
+ key <AE11> { [ minus, U0903, minus, underscore ] };
+ key <AE12> { [ U0943, U090b, U0944, U0960 ] };
+
+ key <AD01> { [ U094c, U0914 ] };
+ key <AD02> { [ U0948, U0910 ] };
+ key <AD03> { [ U093e, U0906 ] };
+ key <AD04> { [ U0940, U0908, U0963, U0961 ] };
+ key <AD05> { [ U0942, U090a ] };
+ key <AD06> { [ U092c, U092d ] };
+ key <AD07> { [ U0939, U0919 ] };
+ key <AD08> { [ U0917, U0918, U095a ] };
+ key <AD09> { [ U0926, U0927 ] };
+ key <AD10> { [ U091c, U091d, U095b ] };
+ key <AD11> { [ U0921, U0922, U095c, U095d ] };
+ key <AD12> { [ U093c, U091e ] };
+ // I added \ / ? | for shell-convenience (file names and piping)
+ key <BKSL> { [ U0949, U0911, U005C, U007C ] };
+
+ key <AC01> { [ U094b, U0913 ] };
+ key <AC02> { [ U0947, U090f ] };
+ key <AC03> { [ U094d, U0905 ] };
+ key <AC04> { [ U093f, U0907, U0962, U090c ] };
+ key <AC05> { [ U0941, U0909 ] };
+ key <AC06> { [ U092a, U092b, NoSymbol, U095e ] };
+ key <AC07> { [ U0930, U0931 ] };
+ key <AC08> { [ U0915, U0916, U0958, U0959 ] };
+ key <AC09> { [ U0924, U0925 ] };
+ key <AC10> { [ U091a, U091b, U0952 ] };
+ key <AC11> { [ U091f, U0920, NoSymbol, U0951 ] };
+
+ key <AB01> { [ U0946, U090e, U0953 ] };
+ key <AB02> { [ U0902, U0901, NoSymbol, U0950 ] };
+ key <AB03> { [ U092e, U0923, U0954 ] };
+ key <AB04> { [ U0928, U0929 ] };
+ key <AB05> { [ U0935, U0934 ] };
+ key <AB06> { [ U0932, U0933 ] };
+ key <AB07> { [ U0938, U0936 ] };
+ key <AB08> { [ comma, U0937, U0970 ] };
+ key <AB09> { [ period, U0964, U0965, U093d ] };
+ // I added \ / ? | for shell-convenience (file names and piping)
+ key <AB10> { [ U092f, U095f, slash, question ] };
+
+ // space, space, Zero-Width-Non-Joiner (ZWNJ), Zero-Width-Joiner (ZWJ):
+ include "nbsp(zwnj3zwj4)"
+};
+
+//Name : Bolnagri (Combined)
+//Description : A phonetic keyboard layout for Devnagari(Hindi)
+// http://www.indlinux.org/wiki/index.php/BolNagri
+//NOTE : This is a combined map of bolnagri_matras and bolnagri_vowels.
+//Inspired by "devrom" keymap by Steve Smith for the windows tool "keyman"
+//Original Author : Noah Levitt<nlevitt at columbia.edu>
+//Past Authors : Pramod.R <pramodr at gmail.com> and Ravikant <ravikant at sarai.net>
+// Current Main.: G Karunakar <karunakar@sarai.net>
+
+partial alphanumeric_keys
+xkb_symbols "bolnagri" {
+ name[Group1] = "India - Hindi Bolnagri";
+ key.type="FOUR_LEVEL";
+ //Top Alphanumeric row
+ // Roman digits
+ key <TLDE> { [ U0902, U0901, apostrophe, asciitilde ] }; // apostrophe: anusvara, candrabindu
+ key <AE01> { [ 1, exclam, U0967, exclam ] };
+ key <AE02> { [ 2, at, U0968, at ] };
+ key <AE03> { [ 3, numbersign, U0969, numbersign ] };
+ key <AE04> { [ 4, dollar, U096A, dollar ] };
+ key <AE05> { [ 5, percent, U096B, percent ] };
+ key <AE06> { [ 6, asciicircum, U096C, asciicircum ] };
+ key <AE07> { [ 7, ampersand, U096D, ampersand ] };
+ key <AE08> { [ 8, asterisk, U096E, asterisk ] };
+ key <AE09> { [ 9, parenleft, U096F, parenleft ] };
+ key <AE10> { [ 0, parenright, U0966, parenright ] };
+ key <AE11> { [ minus, underscore ] };
+ key <AE12> { [ equal, plus ] };
+ key <BKSL> { [ U0964, U0965, U007C, U005C ] }; //pipe : danda, double danda
+
+ //Q Row
+ key <AD01> { [ U200C, U200D ] }; // Q: ZWNJ, ZWJ
+ key <AD02> { [ U0935, U950 ] }; // W: wa, OM
+ key <AD03> { [ U0947, U0948, U090F, U0910 ] }; // E: e, ai matras
+ key <AD04> { [ U0930, U0943 ] }; // R: ra, vocalic Ri
+ key <AD05> { [ U0924, U0925 ] }; // T: ta, tha
+ key <AD06> { [ U092f, U091E ] }; // Y: ya, nya
+ key <AD07> { [ U0941, U0942, U0909, U090A ] }; // U: u, uu matras
+ key <AD08> { [ U093F, U0940, U0907, U0908 ] }; // I: i, ii matras
+ key <AD09> { [ U094B, U094C, U0913, U0914 ] }; // O: o, au matras
+ key <AD10> { [ U092A, U092B ] }; // P: pa, pha
+ key <AD11> { [ bracketleft, braceleft ] };
+ key <AD12> { [ bracketright, braceright ] };
+
+ //A Row
+ key <AC01> { [ U093E, U0906, U0905, U0906 ] }; // A: aa
+ key <AC02> { [ U0938, U0937 ] }; // S: sa, ssa
+ key <AC03> { [ U0926, U0927 ] }; // D: da, dha
+ key <AC04> { [ U091F, U0920 ] }; // F: TA, THA
+ key <AC05> { [ U0917, U0918 ] }; // G: ga, gha
+ key <AC06> { [ U0939, U0903 ] }; // H: ha, visarg
+ key <AC07> { [ U091C, U091D ] }; // J: ja, jha
+ key <AC08> { [ U0915, U0916 ] }; // K: ka, kha
+ key <AC09> { [ U0932, U0962 ] }; // L: la, vocalic L or lru matra`
+ key <AC10> { [ semicolon, colon ] };
+ key <AC11> { [apostrophe, quotedbl ] };
+
+ //Z Row
+ key <AB01> { [ U0936, U0945 ] }; // Z: sha, akaar candra
+ key <AB02> { [ U094D, U0949 ] }; // X: halant, aakaar candra
+ key <AB03> { [ U091A, U091B ] }; // C: ca, cha
+ key <AB04> { [ U0921, U0922 ] }; // V: da, dha
+ key <AB05> { [ U092C, U092D ] }; // B: ba, bha
+ key <AB06> { [ U0928, U0923 ] }; // N: na, nha
+ key <AB07> { [ U092E, U093D, U092E, U093D ] }; // M: ma, avagraha
+ key <AB08> { [ comma, U0970 ] };// comma: comma, dev abbreviation sign
+ key <AB09> { [ period, U093C ] }; // period: period, nukta
+ key <AB10> { [ slash, question ] };
+
+ // begin modifier mappings
+// modifier_map Shift { Shift_L };
+// modifier_map Lock { Caps_Lock };
+// modifier_map Control{ Control_L };
+// modifier_map Mod3 { Mode_switch };
+ include "level3(ralt_switch)"
+};
+
+// based on a keyboard map from an 'xkb/symbols/ben' file
+
+partial alphanumeric_keys
+xkb_symbols "ben" {
+ name[Group1]= "India - Bengali";
+
+ // Mainly numbers.
+ key <AE01> { [ U09E7 ] };
+ key <AE02> { [ U09E8 ] };
+ key <AE03> { [ U09E9 ] };
+ key <AE04> { [ U09EA ] };
+ key <AE05> { [ U09EB ] };
+ key <AE06> { [ U09EC ] };
+ key <AE07> { [ U09ED ] };
+ key <AE08> { [ U09EE ] };
+ key <AE09> { [ U09EF, parenleft ] };
+ key <AE10> { [ U09E6, parenright ] };
+ key <AE11> { [ minus, U0983 ] };
+ key <AE12> { [ U098B, U09C3 ] };
+
+// Mainly long vowels
+
+ key <AD01> { [ U09CC, U0994 ] };
+ key <AD02> { [ U09C8, U0990 ] };
+ key <AD03> { [ U09BE, U0986 ] };
+ key <AD04> { [ U09C0, U0988 ] };
+ key <AD05> { [ U09C2, U098A ] };
+
+// Mainly voiced consonants
+
+ key <AD06> { [ U09AC, U09AD ] };
+ key <AD07> { [ U09B9, U0999 ] };
+ key <AD08> { [ U0997, U0998 ] };
+ key <AD09> { [ U09A6, U09A7 ] };
+ key <AD10> { [ U099C, U099D ] };
+ key <AD11> { [ U09A1, U09A2 ] };
+ key <AD12> { [ U09BC, U099E ] };
+
+// Mainly short vowels
+ key <AC01> { [ U09CB, U0993 ] };
+ key <AC02> { [ U09C7, U098F ] };
+ key <AC03> { [ U09CD, U0985 ] };
+ key <AC04> { [ U09BF, U0987 ] };
+ key <AC05> { [ U09C1, U0989 ] };
+
+
+// Mainly unvoiced consonants
+
+ key <AC06> { [ U09AA, U09AB ] };
+ key <AC07> { [ U09B0, U09DD ] };
+ key <AC08> { [ U0995, U0996 ] };
+ key <AC09> { [ U09A4, U09A5 ] };
+ key <AC10> { [ U099A, U099B ] };
+ key <AC11> { [ U099F, U09A0 ] };
+ key <BKSL> { [ U005C, U007C ] };
+
+ key <AB01> { [ z, Z ] };
+ key <AB02> { [ U0982, U0981 ] };
+ key <AB03> { [ U09AE, U09A3 ] };
+ key <AB04> { [ U09A8, U09A8 ] };
+ key <AB05> { [ U09AC, U09AC ] };
+ key <AB06> { [ U09B2, U09B2 ] };
+ key <AB07> { [ U09B8, U09B6 ] };
+ key <AB08> { [ comma, U09B7 ] };
+ key <AB09> { [ period, U0964 ] };
+ key <AB10> { [ U09DF, U09AF ] };
+};
+
+xkb_symbols "ben_probhat" {
+ name[Group1]= "India - Bengali Probhat";
+ key <ESC> { [ Escape ] };
+
+// numbers
+ key <TLDE> { [ U200D, asciitilde ] };
+ key <AE01> { [ U09E7, exclam ] };
+ key <AE02> { [ U09E8, at ] };
+ key <AE03> { [ U09E9, numbersign ] };
+ key <AE04> { [ U09EA, U09F3 ] };
+ key <AE05> { [ U09EB, percent ] };
+ key <AE06> { [ U09EC, asciicircum ] };
+ key <AE07> { [ U09ED, U099E ] };
+ key <AE08> { [ U09EE, U09CE ] };
+ key <AE09> { [ U09EF, parenleft ] };
+ key <AE10> { [ U09E6, parenright ] };
+ key <AE11> { [ minus, underscore ] };
+ key <AE12> { [ equal, plus ] };
+ key <BKSP> { [ BackSpace ] };
+
+// tab, q to ]
+ key <TAB> { [ Tab, ISO_Left_Tab ] };
+ key <AD01> { [ U09A6, U09A7 ] };
+ key <AD02> { [ U09C2, U098A ] };
+ key <AD03> { [ U09C0, U0988 ] };
+ key <AD04> { [ U09B0, U09DC ] };
+ key <AD05> { [ U099F, U09A0 ] };
+ key <AD06> { [ U098F, U0990 ] };
+ key <AD07> { [ U09C1, U0989 ] };
+ key <AD08> { [ U09BF, U0987 ] };
+ key <AD09> { [ U0993, U0994 ] };
+ key <AD10> { [ U09AA, U09AB ] };
+ key <AD11> { [ U09C7, U09C8 ] };
+ key <AD12> { [ U09CB, U09CC ] };
+ key <RTRN> { [ Return ] };
+
+// caps, a to '
+// key <CAPS> { [ Caps_Lock ] };
+ key <AC01> { [ U09BE, U0985 ] };
+ key <AC02> { [ U09B8, U09B7 ] };
+ key <AC03> { [ U09A1, U09A2 ] };
+ key <AC04> { [ U09A4, U09A5 ] };
+ key <AC05> { [ U0997, U0998 ] };
+ key <AC06> { [ U09B9, U0983 ] };
+ key <AC07> { [ U099C, U099D ] };
+ key <AC08> { [ U0995, U0996 ] };
+ key <AC09> { [ U09B2, U0982 ] };
+ key <AC10> { [ semicolon, colon ] };
+ key <AC11> { [ quoteright, quotedbl ] };
+
+// shift, z to /
+// key <LFSH> { [ Shift_L ] };
+ key <AB01> { [ U09DF, U09AF ] };
+ key <AB02> { [ U09B6, U09DD ] };
+ key <AB03> { [ U099A, U099B ] };
+ key <AB04> { [ U0986, U098B ] };
+ key <AB05> { [ U09AC, U09AD ] };
+ key <AB06> { [ U09A8, U09A3 ] };
+ key <AB07> { [ U09AE, U0999 ] };
+ key <AB08> { [ comma, U09C3 ] };
+ key <AB09> { [ U0964, U0981 ] };
+ key <AB10> { [ U09CD, question ] };
+ key <BKSL> { [ U200C, U0965 ] };
+
+// key <LCTL> { [ Control_L ] };
+// key <SPCE> { [ space ] };
+
+// modifier_map Shift { Shift_L };
+// modifier_map Lock { Caps_Lock };
+// modifier_map Control{ Control_L };
+
+};
+
+partial alphanumeric_keys
+xkb_symbols "guj" {
+ name[Group1]= "India - Gujarati";
+
+ // Mainly numbers.
+ key <AE01> { [ U0AE7, U0A8D ] };
+ key <AE02> { [ U0AE8, U0AC5 ] };
+ key <AE03> { [ U0AE9 ] };
+ key <AE04> { [ U0AEA ] };
+ key <AE05> { [ U0AEB ] };
+ key <AE06> { [ U0AEC ] };
+ key <AE07> { [ U0AED ] };
+ key <AE08> { [ U0AEE ] };
+ key <AE09> { [ U0AEF, parenleft ] };
+ key <AE10> { [ U0AE6, parenright ] };
+ key <AE11> { [ minus, U0A83 ] };
+ key <AE12> { [ U0A8B, U0AC3 ] };
+
+// Mainly long vowels
+
+ key <AD01> { [ U0ACC, U0A94 ] };
+ key <AD02> { [ U0AC8, U0A90 ] };
+ key <AD03> { [ U0ABE, U0A86 ] };
+ key <AD04> { [ U0AC0, U0A88 ] };
+ key <AD05> { [ U0AC2, U0A8A ] };
+
+// Mainly voiced consonants
+
+ key <AD06> { [ U0AAC, U0AAD ] };
+ key <AD07> { [ U0AB9, U0A99 ] };
+ key <AD08> { [ U0A97, U0A98 ] };
+ key <AD09> { [ U0AA6, U0AA7 ] };
+ key <AD10> { [ U0A9C, U0A9D ] };
+ key <AD11> { [ U0AA1, U0AA2 ] };
+ key <AD12> { [ U0ABC, U0A9E ] };
+
+// Mainly short vowels
+ key <AC01> { [ U0ACB, U0A93 ] };
+ key <AC02> { [ U0AC7, U0A8F ] };
+ key <AC03> { [ U0ACD, U0A85 ] };
+ key <AC04> { [ U0ABF, U0A87 ] };
+ key <AC05> { [ U0AC1, U0A89 ] };
+
+// Mainly unvoiced consonants
+
+ key <AC06> { [ U0AAA, U0AAB ] };
+ key <AC07> { [ U0AB0, U0AB0 ] };
+ key <AC08> { [ U0A95, U0A96 ] };
+ key <AC09> { [ U0AA4, U0AA5 ] };
+ key <AC10> { [ U0A9A, U0A9B ] };
+ key <AC11> { [ U0A9F, U0AA0 ] };
+ key <BKSL> { [ U0AC9, U0A91 ] };
+
+ key <AB01> { [ z , Z ] };
+ key <AB02> { [ U0A82, U0A81 ] };
+ key <AB03> { [ U0AAE, U0AA3 ] };
+ key <AB04> { [ U0AA8, U0AA8 ] };
+ key <AB05> { [ U0AB5, U0AB5 ] };
+ key <AB06> { [ U0AB2, U0AB3 ] };
+ key <AB07> { [ U0AB8, U0AB6 ] };
+ key <AB08> { [ comma, U0AB7 ] };
+ key <AB09> { [ period, U0964 ] };
+ key <AB10> { [ U0AAF, question ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "kan" {
+
+ // Inscript layout for Kannada
+ // Author : G Karunakar <karunakar@freedomink.org>
+ // Date : Wed Nov 13 17:22:58 IST 2002
+ // Kannada digits mapped in basic only
+
+ name[Group1]= "India - Kannada";
+
+ key <TLDE> { [ U0cca, U0c92 ] };
+ key <AE01> { [ U0ce7 ] };
+ key <AE02> { [ U0ce8 ] };
+ key <AE03> { [ U0ce9 ] };
+ key <AE04> { [ U0cea ] };
+ key <AE05> { [ U0ceb ] };
+ key <AE06> { [ U0cec ] };
+ key <AE07> { [ U0ced ] };
+ key <AE08> { [ U0cee ] };
+ key <AE09> { [ U0cef ] };
+ key <AE10> { [ U0ce6 ] };
+ key <AE11> { [ U0c83 ] };
+ key <AE12> { [ U0cc3, U0c8b ] };
+
+ key <AD01> { [ U0ccc, U0c94 ] };
+ key <AD02> { [ U0cc8, U0c90 ] };
+ key <AD03> { [ U0cbe, U0c86 ] };
+ key <AD04> { [ U0cc0, U0c88 ] };
+ key <AD05> { [ U0cc2, U0c8a ] };
+ key <AD06> { [ U0cac, U0cad ] };
+ key <AD07> { [ U0cb9, U0c99 ] };
+ key <AD08> { [ U0c97, U0c98 ] };
+ key <AD09> { [ U0ca6, U0ca7 ] };
+ key <AD10> { [ U0c9c, U0c9d ] };
+ key <AD11> { [ U0ca1, U0ca2 ] };
+ key <AD12> { [ U0cbc, U0c9e ] };
+
+ key <AC01> { [ U0ccb, U0c93 ] };
+ key <AC02> { [ U0cc7, U0c8f ] };
+ key <AC03> { [ U0ccd, U0c85 ] };
+ key <AC04> { [ U0cbf, U0c87 ] };
+ key <AC05> { [ U0cc1, U0c89 ] };
+ key <AC06> { [ U0caa, U0cab ] };
+ key <AC07> { [ U0cb0, U0cb1 ] };
+ key <AC08> { [ U0c95, U0c96 ] };
+ key <AC09> { [ U0ca4, U0ca5 ] };
+ key <AC10> { [ U0c9a, U0c9b ] };
+ key <AC11> { [ U0c9f, U0ca0 ] };
+
+ key <AB01> { [ U0cc6, U0c8e ] };
+ key <AB02> { [ U0c82 ] };
+ key <AB03> { [ U0cae, U0ca3 ] };
+ key <AB04> { [ U0ca8 ] };
+ key <AB05> { [ U0cb5, U0cb4 ] };
+ key <AB06> { [ U0cb2, U0cb3 ] };
+ key <AB07> { [ U0cb8, U0cb6 ] };
+ key <AB08> { [ comma , U0cb7 ] };
+ key <AB09> { [ period ] };
+ key <AB10> { [ U0caf, U0040 ] };
+
+ key <RALT> {
+ symbols[Group1] = [ Mode_switch, Multi_key ],
+ virtualMods = AltGr
+ };
+
+};
+
+// Description : A keymap for Malayalam
+// Encoding : Unicode (http://www.unicode.org)
+// Author : Baiju M <baiju@freeshell.org>
+// Date : Sat Aug 17 21:10:48 IST 2002
+// Mapping:
+
+partial alphanumeric_keys
+xkb_symbols "mal" {
+
+ name[Group1] = "India - Malayalam";
+
+ //From grave to backslash (\)
+
+ key <TLDE> { [ U0d4a , U0d12 ] };
+
+// svu:
+// These lines were in former "mal" variant -
+// but the digits are replaced with the ones from 'mal_plusnum' -
+// for the integrity of all Indian layouts
+//
+// key <AE01> { [1 , exclam ] };
+// key <AE02> { [2 , at ] };
+// key <AE03> { [3 , numbersign ] };
+// key <AE04> { [4 , dollar ] };
+// key <AE05> { [5 , percent ] };
+// key <AE06> { [6 ,asciicircum ] };
+// key <AE07> { [7 , ampersand ] };
+// key <AE08> { [8 , asterisk ] };
+// key <AE09> { [9 , parenleft ] };
+// key <AE10> { [0 , parenright ] };
+
+ key <AE01> { [ U0d67 , exclam ] };
+ key <AE02> { [ U0d68 , at ] };
+ key <AE03> { [ U0d69 , numbersign ] };
+ key <AE04> { [ U0d6a , dollar ] };
+ key <AE05> { [ U0d6b , percent ] };
+ key <AE06> { [ U0d6c , asciicircum ] };
+ key <AE07> { [ U0d6d , ampersand ] };
+ key <AE08> { [ U0d6e , asterisk ] };
+ key <AE09> { [ U0d6f , parenleft ] };
+ key <AE10> { [ U0d66 , parenright ] };
+
+ key <AE11> { [ minus , U0d03 ] };
+ key <AE12> { [ U0d43 , U0d0b ] };
+ key <BKSL> { [U0200c, U05C ]};//bksl: ZWNJ
+
+
+ // From 'q' to right bracket (])
+
+ key <AD01> { [ U0d4c , U0d14 ] };
+ key <AD02> { [ U0d48 , U0d10 ] };
+ key <AD03> { [ U0d3e , U0d06 ] };
+ key <AD04> { [ U0d40 , U0d08 ] };
+ key <AD05> { [ U0d42 , U0d0a ] };
+ key <AD06> { [ U0d2c , U0d2d ] };
+ key <AD07> { [ U0d39 , U0d19 ] };
+ key <AD08> { [ U0d17 , U0d18 ] };
+ key <AD09> { [ U0d26 , U0d27 ] };
+ key <AD10> { [ U0d1c , U0d1d ] };
+ key <AD11> { [ U0d21 , U0d22 ] };
+ key <AD12> { [ U0200d , U0d1e ] };
+
+ // From 'a' to apostrophe (')
+
+ key <AC01> { [ U0d4b , U0d13 ] };
+ key <AC02> { [ U0d47 , U0d0f ] };
+ key <AC03> { [ U0d4d , U0d05 ] };
+ key <AC04> { [ U0d3f , U0d07 ] };
+ key <AC05> { [ U0d41 , U0d09 ] };
+ key <AC06> { [ U0d2a , U0d2b ] };
+ key <AC07> { [ U0d30 , U0d31 ] };
+ key <AC08> { [ U0d15 , U0d16 ] };
+ key <AC09> { [ U0d24 , U0d25 ] };
+ key <AC10> { [ U0d1a , U0d1b ] };
+ key <AC11> { [ U0d1f , U0d20 ] };
+
+ // From 'z' to slash (/)
+
+ key <AB01> { [ U0d46 , U0d0e ] };
+ key <AB02> { [ U0d02 , U200b ] };//X:ZWSP
+ key <AB03> { [ U0d2e , U0d23 ] };
+ key <AB04> { [ U0d28 ] };
+ key <AB05> { [ U0d35 , U0d34 ] };
+ key <AB06> { [ U0d32 , U0d33 ] };
+ key <AB07> { [ U0d38 , U0d36 ] };
+ key <AB08> { [ comma , U0d37 ] };
+ key <AB09> { [ period , U0200d ] };
+ key <AB10> { [ U0d2f , question ] };
+
+};
+
+//Name : Lalitha
+//Description : A transliteration keyboard layout for Malayalam
+//Original Author : Noah Levitt<nlevitt at columbia.edu>
+//Current Main : Jinesh K.J<jinesh.k@gmail.com>, Swathantra Malayalam Computing (SMC)<smc-discuss@googlegroups.com>
+
+partial alphanumeric_keys
+xkb_symbols "mal_lalitha" {
+ name[Group1] = "India - Malayalam Lalitha";
+ key.type="FOUR_LEVEL";
+ //Top Alphanumeric row
+ // Roman digits
+ key <TLDE> { [ U0D4D, U0D02, apostrophe, asciitilde ] }; // apostrophe: virama(chandrakala),anusvara
+ key <AE01> { [ 1, exclam, U0D67, exclam ] };
+ key <AE02> { [ 2, at, U0D68, at ] };
+ key <AE03> { [ 3, numbersign, U0D69, numbersign ] };
+ key <AE04> { [ 4, dollar, U0D6A, dollar ] };
+ key <AE05> { [ 5, percent, U0D6B, percent ] };
+ key <AE06> { [ 6, asciicircum, U0D6C, asciicircum ] };
+ key <AE07> { [ 7, ampersand, U0D6D, ampersand ] };
+ key <AE08> { [ 8, asterisk, U0D6E, asterisk ] };
+ key <AE09> { [ 9, parenleft, U0D6F, parenleft ] };
+ key <AE10> { [ 0, parenright, U0D66, parenright ] };
+ key <AE11> { [ minus, underscore ] };
+ key <AE12> { [ equal, plus ] };
+ key <BKSL> { [ U005C, U007C, U200C ] };//backslash:pipe,backslash,ZWNJ
+
+ //Q Row
+ key <AD01> { [ U0D48, U0D4C, U0D10, U0D14 ] }; // Q: ai and au matras
+ key <AD02> { [ U0D35 ] }; // W: wa, OM
+ key <AD03> { [ U0D46, U0D47, U0D0E, U0D0F ] }; // E: e,ee matras
+ key <AD04> { [ U0D30, U0D31, U0D43, U0D0B ] }; // R: ra,rra, vocalic Ri
+ key <AD05> { [ U0D24, U0D25, U0D1F, U0D20 ] }; // T: tha, ttha,ta,tta
+ key <AD06> { [ U0D2f ] }; // Y: ya
+ key <AD07> { [ U0D41, U0D42, U0D09, U0D0A ] }; // U: u, uu matras
+ key <AD08> { [ U0D3F, U0D40, U0D07, U0D08 ] }; // I: i, ii matras
+ key <AD09> { [ U0D4A, U0D4B, U0D12, U0D13 ] }; // O: o, oo matras
+ key <AD10> { [ U0D2A ] }; // P: pa
+ key <AD11> { [ bracketleft, braceleft ] };//braceleft:
+ key <AD12> { [ bracketright, braceright ] };//braceright:
+
+ //A Row
+ key <AC01> { [ U0D3E, U0D05, U0D06, U0D05 ] }; // A: a,aa
+ key <AC02> { [ U0D38, U0D37 ] }; // S: sa, ssa
+ key <AC03> { [ U0D26, U0D27, U0D21, U0D22 ] }; // D: soft da,soft dda,hard da,hard dda,
+ key <AC04> { [ U0D2B ] }; // F: pha
+ key <AC05> { [ U0D17, U0D18 ] }; // G: ga, gha
+ key <AC06> { [ U0D39, U0D03 ] }; // H: ha, visarg
+ key <AC07> { [ U0D1C, U0D1D ] }; // J: ja, jha
+ key <AC08> { [ U0D15, U0D16 ] }; // K: ka, kha
+ key <AC09> { [ U0D32, U0D33 ] }; // L: la, vocalic L or lru matra`
+ key <AC10> { [ semicolon, colon ] };
+ key <AC11> { [apostrophe, quotedbl ] };
+
+ //Z Row
+ key <AB01> { [ U0D34, U0D36 ] }; // Z: sha,zha
+ key <AB02> { [ U0D4D, U200B ] }; // X: chandrakala,ZWSP
+ key <AB03> { [ U0D1A, U0D1B ] }; // C: ca, cha
+ key <AB04> { [ U0D35, U200D ] }; // V: va,ZWJ
+ key <AB05> { [ U0D2C, U0D2D ] }; // B: ba, bha
+ key <AB06> { [ U0D28, U0D23, U0D19, U0D1E ] }; // N: na, hard na,nga,nha
+ key <AB07> { [ U0D2E, U0D02 ] }; // M: ma
+ key <AB08> { [ comma, U003C ] };// comma: comma
+ key <AB09> { [ period, U003E ] }; // period: period
+ key <AB10> { [ slash, question ] };
+
+ // begin modifier mappings
+// modifier_map Shift { Shift_L };
+// modifier_map Lock { Caps_Lock };
+// modifier_map Control{ Control_L };
+// modifier_map Mod3 { Mode_switch };
+ include "level3(ralt_switch)"
+};
+
+
+partial alphanumeric_keys
+xkb_symbols "ori" {
+ // Inscript layout for Oriya
+ // Author: G Karunakar <karunakar@freedomink.org>
+ // Date: Wed Nov 13 18:16:19 IST 2002
+
+ name[Group1]= "India - Oriya";
+
+ key <AE01> { [ U0b67 ] };
+ key <AE02> { [ U0b68 ] };
+ key <AE03> { [ U0b69 ] };
+ key <AE04> { [ U0b6a ] };
+ key <AE05> { [ U0b6b ] };
+ key <AE06> { [ U0b6c ] };
+ key <AE07> { [ U0b6d ] };
+ key <AE08> { [ U0b6e ] };
+ key <AE09> { [ U0b6f ] };
+ key <AE10> { [ U0b66 ] };
+ key <AE11> { [ U0b03 ] };
+ key <AE12> { [ U0b43, U0b0b ] };
+
+ key <AD01> { [ U0b4c, U0b14 ] };
+ key <AD02> { [ U0b48, U0b10 ] };
+ key <AD03> { [ U0b3e, U0b06 ] };
+ key <AD04> { [ U0b40, U0b08 ] };
+ key <AD05> { [ U0b42, U0b0a ] };
+ key <AD06> { [ U0b2c, U0b2d ] };
+ key <AD07> { [ U0b39, U0b19 ] };
+ key <AD08> { [ U0b17, U0b18 ] };
+ key <AD09> { [ U0b26, U0b27 ] };
+ key <AD10> { [ U0b1c, U0b1d ] };
+ key <AD11> { [ U0b21, U0b22 ] };
+ key <AD12> { [ U0b3c, U0b1e ] };
+
+ key <AC01> { [ U0b4b, U0b13 ] };
+ key <AC02> { [ U0b47, U0b0f ] };
+ key <AC03> { [ U0b4d, U0b05 ] };
+ key <AC04> { [ U0b3f, U0b07 ] };
+ key <AC05> { [ U0b41, U0b09 ] };
+ key <AC06> { [ U0b2a, U0b2b ] };
+ key <AC07> { [ U0b30 ] };
+ key <AC08> { [ U0b15, U0b16 ] };
+ key <AC09> { [ U0b24, U0b25 ] };
+ key <AC10> { [ U0b1a, U0b1b ] };
+ key <AC11> { [ U0b1f, U0b20 ] };
+
+ key <AB02> { [ U0b02, U0b01 ] };
+ key <AB03> { [ U0b2e, U0b23 ] };
+ key <AB04> { [ U0b28 ] };
+ key <AB05> { [ U0b35 ] };
+ key <AB06> { [ U0b32, U0b33 ] };
+ key <AB07> { [ U0b38, U0b36 ] };
+ key <AB08> { [ comma , U0b37 ] };
+ key <AB09> { [ period ] };
+ key <AB10> { [ U0b2f, U0040 ] };
+
+ key <RALT> {
+ symbols[Group1] = [ Mode_switch, Multi_key ],
+ virtualMods = AltGr
+ };
+};
+
+// based on a keyboard map from an 'xkb/symbols/tml' file
+// INSCRIPT
+partial alphanumeric_keys
+xkb_symbols "tam" {
+ name[Group1]= "India - Tamil";
+
+ key <TLDE> { [ U0BCA, U0B92 ] };
+
+ // Mainly numbers.
+ key <AE01> { [ U0BE7 ] };
+ key <AE02> { [ U0BE8 ] };
+ key <AE03> { [ U0BE9 ] };
+ key <AE04> { [ U0BEA ] };
+ key <AE05> { [ U0BEB ] };
+ key <AE06> { [ U0BEC ] };
+ key <AE07> { [ U0BED ] };
+ key <AE08> { [ U0BEE ] };
+ key <AE09> { [ U0BEF, parenleft ] };
+ key <AE10> { [ U0BF0, parenright ] };
+ key <AE11> { [ U0BF1, U0B83 ] };
+ key <AE12> { [ U0BF2, plus ] };
+
+// Mainly long vowels
+
+ key <AD01> { [ U0BCC, U0B94 ] };
+ key <AD02> { [ U0BC8, U0B90 ] };
+ key <AD03> { [ U0BBE, U0B86 ] };
+ key <AD04> { [ U0BC0, U0B88 ] };
+ key <AD05> { [ U0BC2, U0B8A ] };
+
+// Mainly voiced consonants
+
+ key <AD07> { [ U0BB9, U0B99 ] };
+ key <AD10> { [ U0B9c ] };
+ key <AD12> { [ U0B9E ] };
+
+// Mainly short vowels
+ key <AC01> { [ U0BCB, U0B93 ] };
+ key <AC02> { [ U0BC7, U0B8F ] };
+ key <AC03> { [ U0BCD, U0B85 ] };
+ key <AC04> { [ U0BBF, U0B87 ] };
+ key <AC05> { [ U0BC1, U0B89 ] };
+
+// Mainly unvoiced consonants
+
+ key <AC06> { [ U0BAA ] };
+ key <AC07> { [ U0BB0, U0BB1 ] };
+ key <AC08> { [ U0B95 ] };
+ key <AC09> { [ U0BA4 ] };
+ key <AC10> { [ U0B9A ] };
+ key <AC11> { [ U0B9F ] };
+ key <BKSL> { [ U005C, U007C ] };//backslash-bar - Changed to Unicode
+
+ key <AB01> { [ U0BC6, U0B8E ] };
+ key <AB02> { [ U0B82 ] };
+ key <AB03> { [ U0BAE, U0BA3 ] };
+ key <AB04> { [ U0BA8, U0BA9 ] };
+ key <AB05> { [ U0BB5, U0BB4 ] };
+ key <AB06> { [ U0BB2, U0BB3 ] };
+ key <AB07> { [ U0BB8, U0BB6 ] };
+ key <AB08> { [ comma, U0BB7 ] };
+ key <AB09> { [ period, U0964 ] };
+ key <AB10> { [ U0BAF, question ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "tam_unicode" {
+
+// Description: A keymap based on the TamilNet'99 typewriter keyboard
+// Encoding: Unicode (http://www.unicode.org)
+// Author: Thuraiappah Vaseeharan <vasee@ieee.org>
+// Modifed by: Malathi S <malathiramya@gmail.com>
+// Secondary contact: Sri Ramadoss M <amachu@au-kbc.org>
+// Date : Fri Sep 4 11:32:00 CST 2009
+// Mapping:
+
+ name[Group1]= "India - Tamil Unicode";
+
+ // granthas
+ key <TLDE> { [ apostrophe, asciitilde ] };
+ key <AE01> { [ U0031, exclam ] } ;
+ key <AE02> { [ U0032, at ] } ;
+ key <AE03> { [ U0033, numbersign ] } ;
+ key <AE04> { [ U0034, U0BF9 ] } ;
+ key <AE05> { [ U0035, percent ] } ;
+ key <AE06> { [ U0036, asciicircum ] } ;
+ key <AE07> { [ U0037, ampersand ] } ;
+ key <AE08> { [ U0038, asterisk ] } ;
+ key <AE09> { [ U0039, parenleft ] } ;
+ key <AE10> { [ U0030, parenright ] } ;
+ key <AE11> { [ minus, underscore ] };
+ key <AE12> { [ equal, plus ] };
+
+
+ // Qrow
+ key <AD01> { [ U0B9E, U0BB6 ] };
+ key <AD02> { [ U0BB1, U0BB7 ] };
+ key <AD03> { [ U0BA8, U0BB8 ] };
+ key <AD04> { [ U0B9A, U0BB9 ] };
+ key <AD05> { [ U0BB5, U0B9C ] };
+ key <AD06> { [ U0BB2 ] };
+ key <AD07> { [ U0BB0 ] };
+ key <AD08> { [ U0BC8, U0B90 ] };
+ key <AD09> { [ U0BCA, U0BCB ] };
+ key <AD10> { [ U0BBF, U0BC0 ] };
+ key <AD11> { [ U0BC1, U0BC2 ] };
+
+ // Arow
+ key <AC01> { [ U0BAF ] };
+ key <AC02> { [ U0BB3 ] };
+ key <AC03> { [ U0BA9 ] };
+ key <AC04> { [ U0B95 ] };
+ key <AC05> { [ U0BAA ] };
+ key <AC06> { [ U0BBE, U0BB4 ] };
+ key <AC07> { [ U0BA4 ] };
+ key <AC08> { [ U0BAE ] };
+ key <AC09> { [ U0B9F ] };
+ key <AC10> { [ U0BCD, U0B83 ] };
+ key <AC11> { [ U0B99 ] };
+
+ // Zrow
+ key <AB01> { [ U0BA3 ] };
+ key <AB02> { [ U0B92, U0B93 ] };
+ key <AB03> { [ U0B89, U0B8A ] };
+ key <AB04> { [ U0B8E, U0B8F ] };
+ key <AB05> { [ U0BC6, U0BC7 ] };
+ key <AB06> { [ U0B94, U0BCC ] };
+ key <AB07> { [ U0B85, U0B86 ] };
+ key <AB08> { [ U0B87, U0B88 ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "tam_keyboard_with_numerals" {
+
+// Description: A keymap based on the TamilNet'99 typewriter keyboard
+// Encoding: Unicode (http://www.unicode.org)
+// Author: Malathi S <malathiramya@gmail.com>
+// Secondary contact: Sri Ramadoss M <amachu@au-kbc.org>
+// Date : Fri Sep 4 11:33:00 CST 2009
+// Mapping:
+
+ name[Group1]= "India - Tamil Keyboard with Numerals";
+
+ // Mainly numbers.
+ key <TLDE> { [ apostrophe, asciitilde ] };
+ key <AE01> { [ U0BE7, exclam ] };
+ key <AE02> { [ U0BE8, at ] };
+ key <AE03> { [ U0BE9, numbersign ] };
+ key <AE04> { [ U0BEA, U0BF9 ] };
+ key <AE05> { [ U0BEB, percent ] };
+ key <AE06> { [ U0BEC, asciicircum ] };
+ key <AE07> { [ U0BED, ampersand ] };
+ key <AE08> { [ U0BEE, asterisk ] };
+ key <AE09> { [ U0BEF, parenleft ] };
+ key <AE10> { [ U0BE6, parenright ] };
+ key <AE11> { [ minus, underscore ] };
+ key <AE12> { [ equal, plus ] };
+
+
+ // Qrow
+ key <AD01> { [ U0B9E, U0BB6 ] };
+ key <AD02> { [ U0BB1, U0BB7 ] };
+ key <AD03> { [ U0BA8, U0BB8 ] };
+ key <AD04> { [ U0B9a, U0BB9 ] };
+ key <AD05> { [ U0BB5, U0B9c ] };
+ key <AD06> { [ U0BB2 ] };
+ key <AD07> { [ U0BB0 ] };
+ key <AD08> { [ U0BC8, U0B90 ] };
+ key <AD09> { [ U0BCA, U0BCB ] };
+ key <AD10> { [ U0BBF, U0BC0 ] };
+ key <AD11> { [ U0BC1, U0BC2 ] };
+
+ // Arow
+ key <AC01> { [ U0BAF ] };
+ key <AC02> { [ U0BB3 ] };
+ key <AC03> { [ U0BA9 ] };
+ key <AC04> { [ U0B95 ] };
+ key <AC05> { [ U0BAA ] };
+ key <AC06> { [ U0BBE, U0BB4 ] };
+ key <AC07> { [ U0BA4 ] };
+ key <AC08> { [ U0BAE ] };
+ key <AC09> { [ U0B9F ] };
+ key <AC10> { [ U0BCD, U0B83 ] };
+ key <AC11> { [ U0B99 ] };
+
+ // Zrow
+ key <AB01> { [ U0BA3 ] };
+ key <AB02> { [ U0B92, U0B93 ] };
+ key <AB03> { [ U0B89, U0B8A ] };
+ key <AB04> { [ U0B8E, U0B8F ] };
+ key <AB05> { [ U0BC6, U0BC7 ] };
+ key <AB06> { [ U0B94, U0BCC ] };
+ key <AB07> { [ U0B85, U0B86 ] };
+ key <AB08> { [ U0B87, U0B88 ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "tam_TSCII" {
+
+// Description : A Tamil typewrite-style keymap
+// loosely based on TamilNet'99 reommendations
+// Encoding : TSCII (http://www.tscii.org)
+// Author : Thuraiappah Vaseeharan <vasee@ieee.org>
+// Last Modified: Sat Jan 5 17:11:26 CST 2002
+
+ name[Group1]= "India - Tamil TSCII Typewriter";
+
+ key <AE01> { [ 0x10000b7, 0x10000a4 ] }; // aytham
+ key <AE02> { [ 0x1000082, 0x10000a5 ] }; // shri
+ key <AE03> { [ 0x1000083, 0x1000088 ] }; // ja
+ key <AE04> { [ 0x1000084, 0x1000089 ] }; // sha
+ key <AE05> { [ 0x1000085, 0x100008a ] }; // sa
+ key <AE06> { [ 0x1000086, 0x100008b ] }; // ha
+ key <AE07> { [ 0x1000087, 0x100008c ] }; // ksha
+
+ // Qrow
+ key <AD01> { [ 0x10000bb, 0x100009a ] }; // nja
+ key <AD02> { [ 0x10000c8, 0x10000da ] }; // Ra
+ key <AD03> { [ 0x10000bf, 0x10000d1 ] }; // NNa
+ key <AD04> { [ 0x10000ba, 0x10000cd ] }; // ca
+ key <AD05> { [ 0x10000c5, 0x10000d7 ] }; // va
+ key <AD06> { [ 0x10000c4, 0x10000d6 ] }; // la
+ key <AD07> { [ 0x10000c3, 0x10000d5 ] }; // ra
+ key <AD08> { [ 0x10000a8, 0x10000b3 ] }; // sangili, ai
+ key <AD09> { [ 0x10000ca, 0x10000cb ] }; // di, dI
+ key <AD10> { [ 0x10000a2, 0x10000a3 ] }; // visiri
+ key <AD11> { [ dead_acute, 0x10000a3 ] }; // Ukaaram
+
+ // Arow
+ key <AC01> { [ 0x10000c2, 0x10000d4 ] }; // ya
+ key <AC02> { [ 0x10000c7, 0x10000d9 ] }; // La
+ key <AC03> { [ 0x10000c9, 0x10000db ] }; // na
+ key <AC04> { [ 0x10000b8, 0x10000cc ] }; // ka
+ key <AC05> { [ 0x10000c0, 0x10000d2 ] }; // pa
+ key <AC06> { [ dead_grave,0x10000a1 ] }; // pulli,aravu
+ key <AC07> { [ 0x10000be, 0x10000d0 ] }; // tha
+ key <AC08> { [ 0x10000c1, 0x10000d3 ] }; // ma
+ key <AC09> { [ 0x10000bc, 0x10000ce ] }; // da
+ key <AC10> { [ 0x10000c6, 0x10000d8 ] }; // zha
+ key <AC11> { [ 0x10000b9, 0x1000099 ] }; // nga
+
+ // Zrow
+ key <AB01> { [ 0x10000bd, 0x10000cf ] }; // Na
+ key <AB02> { [ 0x10000b4, 0x10000b5 ] }; // o, O
+ key <AB03> { [ 0x10000af, 0x10000b0 ] }; // u, U
+ key <AB04> { [ 0x10000b1, 0x10000b2 ] }; // e, E
+ key <AB05> { [ 0x10000a6, 0x10000a7 ] }; // kombus
+ key <AB06> { [ 0x10000b6, 0x10000aa ] }; // au
+ key <AB07> { [ 0x10000ab, 0x10000ac ] }; // a, A
+ key <AB08> { [ 0x10000fe, 0x10000ae ] }; // i, I
+
+};
+
+partial alphanumeric_keys
+xkb_symbols "tam_TAB" {
+
+// Description: A keymap based on the TamilNet'99 typewriter keyboard
+// Encoding: TAB (http://www.tamilnet99.org)
+// Author: Thuraiappah Vaseeharan <t_vasee@yahoo.com>
+// Date : Sun Aug 12 02:23:00 CDT 2001
+
+ name[Group1]= "India - Tamil TAB Typewriter";
+
+ // numeral row
+ key <AE01> { [ 0x10000e7, 0x10000a7 ] } ;
+ key <AE02> { [ 0x10000fa, 0x10000a8 ] } ;
+ key <AE03> { [ 0x10000fb ] } ;
+ key <AE04> { [ 0x10000fc ] } ;
+ key <AE05> { [ 0x10000fd ] } ;
+ key <AE06> { [ 0x10000fe ] } ;
+ key <AE07> { [ 0x10000ff ] } ;
+
+ // q-row
+ key <AD01> { [ 0x10000eb, 0x10000b3 ] };
+ key <AD02> { [ 0x10000f8, 0x10000c1 ] };
+ key <AD03> { [ 0x10000ef, 0x10000b8 ] };
+ key <AD04> { [ 0x10000ea, 0x10000b2 ] };
+ key <AD05> { [ 0x10000f5, 0x10000be ] };
+ key <AD06> { [ 0x10000f4, 0x10000bd ] };
+ key <AD07> { [ 0x10000f3, 0x10000bc ] };
+ key <AD08> { [ 0x10000ac, 0x10000e4 ] };
+ key <AD09> { [ 0x10000ae, 0x10000af ] };
+ key <AD10> { [ 0x10000a4, 0x10000a6 ] };
+ key <AD11> { [ dead_circumflex, 0x10000a6 ] }; // Ukaaram
+
+ // a-row
+ key <AC01> { [ 0x10000f2, 0x10000bb ] };
+ key <AC02> { [ 0x10000f7, 0x10000c0 ] };
+ key <AC03> { [ 0x10000f9, 0x10000c2 ] };
+ key <AC04> { [ 0x10000e8, 0x10000b0 ] };
+ key <AC05> { [ 0x10000f0, 0x10000b9 ] };
+ key <AC06> { [ 0x10000a2, 0x10000a3 ] };
+ key <AC07> { [ 0x10000ee, 0x10000b6 ] };
+ key <AC08> { [ 0x10000f1, 0x10000ba ] };
+ key <AC09> { [ 0x10000ec, 0x10000b4 ] };
+ key <AC10> { [ 0x10000f6, 0x10000bf ] };
+ key <AC11> { [ 0x10000e9, 0x10000b1 ] };
+
+ // z-row
+ key <AB01> { [ 0x10000ed, 0x10000b5 ] };
+ key <AB02> { [ 0x10000e5, 0x10000e6 ] };
+ key <AB03> { [ 0x10000e0, 0x10000e1 ] };
+ key <AB04> { [ 0x10000e2, 0x10000e3 ] };
+ key <AB05> { [ 0x10000aa, 0x10000ab ] };
+ key <AB06> { [ 0x10000ac, 0x10000a3 ] };
+ key <AB07> { [ 0x10000dc, 0x10000dd ] };
+ key <AB08> { [ 0x10000de, 0x10000df ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "tel" {
+
+ // Inscript layout for Telugu using Unicode
+ // Author: G Karunakar <karunakar@freedomink.org>
+ // Date:
+ // See layout at http://www.indlinux.org/keymap/telugu.php
+
+ name[Group1]= "India - Telugu";
+
+ key <TLDE> { [ U0c4a, U0c12 ] };
+ key <AE01> { [ U0c67 ] };
+ key <AE02> { [ U0c68 ] };
+ key <AE03> { [ U0c69, numbersign ] };
+ key <AE04> { [ U0c6a, dollar ] };
+ key <AE05> { [ U0c6b, percent ] };
+ key <AE06> { [ U0c6c, asciicircum ] };
+ key <AE07> { [ U0c6d, ampersand ] };
+ key <AE08> { [ U0c6e, asterisk ] };
+ key <AE09> { [ U0c6f, parenleft ] };
+ key <AE10> { [ U0c66, parenright ] };
+ key <AE11> { [ U0c03, underscore ] };
+ key <AE12> { [ U0c43, U0c0b ] };
+ key <BKSP> { [ BackSpace ] };
+
+ key <AD01> { [ U0c4c, U0c14 ] };
+ key <AD02> { [ U0c48, U0c10 ] };
+ key <AD03> { [ U0c3e, U0c06 ] };
+ key <AD04> { [ U0c40, U0c08 ] };
+ key <AD05> { [ U0c42, U0c0a ] };
+ key <AD06> { [ U0c2c, U0c2d ] };
+ key <AD07> { [ U0c39, U0c19 ] };
+ key <AD08> { [ U0c17, U0c18 ] };
+ key <AD09> { [ U0c26, U0c27 ] };
+ key <AD10> { [ U0c1c, U0c1d ] };
+ key <AD11> { [ U0c21, U0c22 ] };
+ key <AD12> { [ U0c1e ] };
+
+ key <AC01> { [ U0c4b, U0c13 ] };
+ key <AC02> { [ U0c47, U0c0f ] };
+ key <AC03> { [ U0c4d, U0c05 ] };
+ key <AC04> { [ U0c3f, U0c07 ] };
+ key <AC05> { [ U0c41, U0c09 ] };
+ key <AC06> { [ U0c2a, U0c2b ] };
+ key <AC07> { [ U0c30, U0c31 ] };
+ key <AC08> { [ U0c15, U0c16 ] };
+ key <AC09> { [ U0c24, U0c25 ] };
+ key <AC10> { [ U0c1a, U0c1b ] };
+ key <AC11> { [ U0c1f, U0c20 ] };
+
+ key <AB01> { [ U0c46, U0c0e ] };
+ key <AB02> { [ U0c02, U0c01 ] };
+ key <AB03> { [ U0c2e, U0c23 ] };
+ key <AB04> { [ U0c28 ] };
+ key <AB05> { [ U0c35 ] };
+ key <AB06> { [ U0c32, U0c33 ] };
+ key <AB07> { [ U0c38, U0c36 ] };
+ key <AB08> { [ comma , U0c37 ] };
+ key <AB09> { [ period ] };
+ key <AB10> { [ U0c2f, U0040 ] };
+
+ key <RALT> {
+ symbols[Group1] = [ Mode_switch, Multi_key ],
+ virtualMods = AltGr
+ };
+};
+
+partial alphanumeric_keys
+xkb_symbols "urd-phonetic" {
+ include "pk(urd-phonetic)"
+ name[Group1]= "India - Urdu, Phonetic";
+};
+
+partial alphanumeric_keys
+xkb_symbols "urd-phonetic3" {
+ include "pk(urd-crulp)"
+ name[Group1]= "India - Urdu, Alternative phonetic";
+};
+
+partial alphanumeric_keys
+xkb_symbols "urd-winkeys" {
+ include "pk(urd-nla)"
+ name[Group1]= "India - Urdu, Winkeys";
+};
+
+// based on a keyboard map from an 'xkb/symbols/gur' file
+
+partial alphanumeric_keys
+xkb_symbols "guru" {
+ name[Group1]= "India - Gurmukhi";
+
+ // Mainly numbers.
+ key <AE01> { [ U0A67 ] };
+ key <AE02> { [ U0A68 ] };
+ key <AE03> { [ U0A69, U0A71 ] };
+ key <AE04> { [ U0A6A, U0A74 ] };
+ key <AE05> { [ U0A6B, U262C ] };
+ key <AE06> { [ U0A6C ] };
+ key <AE07> { [ U0A6D ] };
+ key <AE08> { [ U0A6e ] };
+ key <AE09> { [ U0A6F, parenleft ] };
+ key <AE10> { [ U0A66, parenright ] };
+ key <AE11> { [ gur_visarga ] };
+ key <AE12> { [ equal, plus ] };
+
+// Mainly long vowels
+
+ key <AD01> { [ U0A4C, U0A14 ] };
+ key <AD02> { [ U0A48, U0A10 ] };
+ key <AD03> { [ U0A3E, U0A06 ] };
+ key <AD04> { [ U0A40, U0A08 ] };
+ key <AD05> { [ U0A42, U0A0A ] };
+
+// Mainly voiced consonants
+
+ key <AD06> { [ U0A2C, U0A2D ] };
+ key <AD07> { [ U0A39, U0A19 ] };
+ key <AD08> { [ U0A17, U0A18 ] };
+ key <AD09> { [ U0A26, U0A27 ] };
+ key <AD10> { [ U0A1C, U0A1D ] };
+ key <AD11> { [ U0A21, U0A22 ] };
+ key <AD12> { [ U0A3C, U0A1E ] };
+
+// Mainly short vowels
+ key <AC01> { [ U0A4B, U0A13 ] };
+ key <AC02> { [ U0A47, U0A0F ] };
+ key <AC03> { [ U0A4D, U0A05 ] };
+ key <AC04> { [ U0A3F, U0A07 ] };
+ key <AC05> { [ U0A41, U0A09 ] };
+
+// Mainly unvoiced consonants
+
+ key <AC06> { [ U0A2A, U0A2B ] };
+ key <AC07> { [ U0A30, U0A5C ] };
+ key <AC08> { [ U0A15, U0A16 ] };
+ key <AC09> { [ U0A24, U0A25 ] };
+ key <AC10> { [ U0A1A, U0A1B ] };
+ key <AC11> { [ U0A1F, U0A20 ] };
+ key <BKSL> { [ U005C, U007C ] };
+
+ key <AB01> { [ z, U0A01 ] };
+ key <AB02> { [ U0A02, U0A70, U0A71 ] };
+ key <AB03> { [ U0A2E, U0A23 ] };
+ key <AB04> { [ U0A28, U0A28 ] };
+ key <AB05> { [ U0A35, U0A35 ] };
+ key <AB06> { [ U0A32, U0A33 ] };
+ key <AB07> { [ U0A38, U0A36 ] };
+ key <AB08> { [ comma, less ] };
+ key <AB09> { [ period, U0964 ] };
+ key <AB10> { [ U0A2F, question ] };
+};
+
+//Name : Jhelum (Refind Inscript)
+//Description : A Jhelum keyboard layout for Gurmukhi (Punjabi)
+// http://www.satluj.org/Jhelum.html
+//Modified for Inscript to make
+//Original Author : Amanpreet Singh Alam <apreet.alam@gmail.com
+
+partial alphanumeric_keys
+xkb_symbols "jhelum" {
+ name[Group1] = "India - Gurmukhi Jhelum";
+ key.type="FOUR_LEVEL";
+ //Top Alphanumeric row
+ // Roman digits
+ key <TLDE> { [ apostrophe, asciitilde, U0A02,U0A01 ] }; // apostrophe: anusvara, candrabindu
+ key <AE01> { [ 1,exclam, U0A67, exclam ] };
+ key <AE02> { [ 2,at, U0A68, at ] };
+ key <AE03> { [ 3,numbersign, U0A69, numbersign ] };
+ key <AE04> { [ 4,dollar, U0A6A, dollar ] };
+ key <AE05> { [ 5,percent,U0A6B, percent ] };
+ key <AE06> { [ 6,asciicircum, U0A6C,asciicircum ] };
+ key <AE07> { [ 7,ampersand,U0A6D,ampersand ] };
+ key <AE08> { [ 8,asterisk,U0A6E, asterisk ] };
+ key <AE09> { [ 9,parenleft,U0A6F,parenleft ] };
+ key <AE10> { [ 0,parenright,U0A66,parenright ] };
+ key <AE11> { [ minus,underscore] };
+ key <AE12> { [ equal,plus] };
+ key <BKSL> { [ U0964,U0965,U007C,U005C] }; //pipe : danda, double danda
+
+ //Q Row
+ key <AD01> { [ U0A4C, U0A14 ] }; // Q: oo, ooh
+ key <AD02> { [ U0A48, U0A10 ] }; // W: ee, ae
+ key <AD03> { [ U0A3E, U0A06 ] }; // E: a, aa
+ key <AD04> { [ U0A40, U0A08 ] }; // R: ee, ai
+ key <AD05> { [ U0A42, U0A0A ] }; // T: u, uu
+ key <AD06> { [ U0A30, U0A5C ] }; // Y: ra, raa
+ key <AD07> { [ U0A26, U0A27 ] }; // U: tha, thha
+ key <AD08> { [ U0A17, U0A18 ] }; // I:ga, gha
+ key <AD09> { [ U0A24, U0A1F ] }; // O: ta, tha
+ key <AD10> { [ U0A2A, U0A5E ] }; // P: pa, pha
+ key <AD11> { [ U0A21, U0A22, bracketleft, braceleft ] };
+ key <AD12> { [ U0A19, U0A1E, bracketright, braceright ] };
+
+ //A Row
+ key <AC01> { [ U0A4B, U0A13 ] }; // A: o, oo
+ key <AC02> { [ U0A40, U0A0F ] }; // S: e, ee
+ key <AC03> { [ U0A4D, U0A05 ] }; // D: halant, aa
+ key <AC04> { [ U0A3F, U0A07 ] }; // F: i, aa
+ key <AC05> { [ U0A41, U0A09 ] }; // G: u, uh
+ key <AC06> { [ U0A39, U0A20 ] }; // H: ha, thha
+ key <AC07> { [ U0A1C, U0A1D ] }; // J: ja, jha
+ key <AC08> { [ U0A15, U0A16 ] }; // K: ka, kha
+ key <AC09> { [ U0A32, U0A25 ] }; // L: la, tha
+ key <AC10> { [ U0A38, semicolon, colon ] }; //; sa
+ key <AC11> { [apostrophe, quotedbl ] };
+
+ //Z Row
+ key <AB01> { [ U0A71, U0A3C ] }; // Z: addak, par bindi
+ key <AB02> { [ U0A02, U0A70 ] }; // X: bindi, tippi
+ key <AB03> { [ U0A1A, U0A1B ] }; // C: ca, cha
+ key <AB04> { [ U0A35, U0A2F ] }; // V: va, ya
+ key <AB05> { [ U0A2C, U0A2D ] }; // B: ba, bha
+ key <AB06> { [ U0A28, U0A23 ] }; // N: na, nha
+ key <AB07> { [ U0A2E, U0A2E ] }; // M: ma
+ key <AB08> { [ comma, U262C ] };// comma: comma, dev abbreviation sign
+ key <AB09> { [ period, U0A74 ] }; // period: period, nukta
+ key <AB10> { [ slash, question ] };
+
+// begin modifier mappings
+// modifier_map Shift { Shift_L };
+// modifier_map Lock { Caps_Lock };
+// modifier_map Control{ Control_L };
+// modifier_map Mod3 { Mode_switch };
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "olpc" {
+
+// Contact: Walter Bender <walter@laptop.org>
+
+ include "in(deva)"
+ key <TLDE> { [ U094A, U0912 ] }; // DEVANAGARI VOWEL SIGN SHORT O; DEVANAGARI LETTER SHORT O
+ key <AE01> { [ U0967, U090D ] }; // DEVANAGARI DIGIT ONE; DEVANAGARI LETTER CANDRA E
+ key <AE02> { [ U0968, U0945 ] }; // DEVANAGARI DIGIT TWO; DEVANAGARI VOWEL SIGN CANDRA E
+ key <AE03> { [ U0969 ] }; // DEVANAGARI DIGIT THREE;
+ key <AE04> { [ U096A ] }; // DEVANAGARI DIGIT FOUR;
+ key <AE05> { [ U096B ] }; // DEVANAGARI DIGIT FIVE;
+ key <AE06> { [ U096C ] }; // DEVANAGARI DIGIT SIX;
+ key <AE07> { [ U096D ] }; // DEVANAGARI DIGIT SEVEN;
+ key <AE08> { [ U096E ] }; // DEVANAGARI DIGIT EIGHT;
+ key <AE09> { [ U096F, parenleft ] }; // DEVANAGARI DIGIT NINE;
+ key <AE10> { [ U0966, parenright ] }; // DEVANAGARI DIGIT ZERO;
+ key <AE11> { [ minus, U0903 ] }; // DEVANAGARI SIGN VISARGA;
+ key <AE12> { [ U0943, U090B ] }; // DEVANAGARI VOWEL SIGN VOCALIC R; DEVANAGARI LETTER VOCALIC R
+
+ key <AD01> { [ U094C, U0914 ] }; // DEVANAGARI VOWEL SIGN AU; DEVANAGARI LETTER AU
+ key <AD02> { [ U0948, U0910 ] }; // DEVANAGARI VOWEL SIGN AI; DEVANAGARI LETTER AI
+ key <AD03> { [ U093E, U0906 ] }; // DEVANAGARI VOWEL SIGN AA; DEVANAGARI LETTER AA
+ key <AD04> { [ U0940, U0908 ] }; // DEVANAGARI VOWEL SIGN II; DEVANAGARI LETTER II
+ key <AD05> { [ U0942, U090A ] }; // DEVANAGARI VOWEL SIGN UU; DEVANAGARI LETTER UU
+ key <AD06> { [ U092C, U092D ] }; // DEVANAGARI LETTER BA; DEVANAGARI LETTER BHA
+ key <AD07> { [ U0939, U0919 ] }; // DEVANAGARI LETTER HA; DEVANAGARI LETTER NGA
+ key <AD08> { [ U0917, U0918 ] }; // DEVANAGARI LETTER GA; DEVANAGARI LETTER GHA
+ key <AD09> { [ U0926, U0927 ] }; // DEVANAGARI LETTER DA; DEVANAGARI LETTER DHA
+ key <AD10> { [ U091C, U091D ] }; // DEVANAGARI LETTER JA; DEVANAGARI LETTER JHA
+ key <AD11> { [ U0921, U0922 ] }; // DEVANAGARI LETTER DDA; DEVANAGARI LETTER DDHA
+ key <AD12> { [ U093C, U091E ] }; // DEVANAGARI SIGN NUKTA; DEVANAGARI LETTER NYA
+
+ key <BKSL> { [ U0949, U0911 ] }; // DEVANAGARI VOWEL SIGN CANDRA O; DEVANAGARI LETTER CANDRA O
+
+ key <AC01> { [ U094B, U0913 ] }; // DEVANAGARI VOWEL SIGN O; DEVANAGARI LETTER O
+ key <AC02> { [ U0947, U090F ] }; // DEVANAGARI VOWEL SIGN E; DEVANAGARI LETTER E
+ key <AC03> { [ U094D, U0905 ] }; // DEVANAGARI SIGN VIRAMA; DEVANAGARI LETTER A
+ key <AC04> { [ U093F, U0907 ] }; // DEVANAGARI VOWEL SIGN I; DEVANAGARI LETTER I
+ key <AC05> { [ U0941, U0909 ] }; // DEVANAGARI VOWEL SIGN U; DEVANAGARI LETTER U
+ key <AC06> { [ U092A, U092B ] }; // DEVANAGARI LETTER PA; DEVANAGARI LETTER PHA
+ key <AC07> { [ U0930, U0931 ] }; // DEVANAGARI LETTER RA; DEVANAGARI LETTER RRA
+ key <AC08> { [ U0915, U0916 ] }; // DEVANAGARI LETTER KA; DEVANAGARI LETTER KHA
+ key <AC09> { [ U0924, U0925 ] }; // DEVANAGARI LETTER TA; DEVANAGARI LETTER THA
+ key <AC10> { [ U091A, U091B ] }; // DEVANAGARI LETTER CA; DEVANAGARI LETTER CHA
+ key <AC11> { [ U091F, U0920 ] }; // DEVANAGARI LETTER TTA; DEVANAGARI LETTER TTHA
+
+ key <AB01> { [ U0946, U090E ] }; // DEVANAGARI VOWEL SIGN SHORT E; DEVANAGARI LETTER SHORT E
+ key <AB02> { [ U0902, U0901 ] }; // DEVANAGARI SIGN ANUSVARA; DEVANAGARI SIGN CANDRABINDU
+ key <AB03> { [ U092E, U0923 ] }; // DEVANAGARI LETTER MA; DEVANAGARI LETTER NNA
+ key <AB04> { [ U0928, U0929 ] }; // DEVANAGARI LETTER NA; DEVANAGARI LETTER NNNA
+ key <AB05> { [ U0935, U0934 ] }; // DEVANAGARI LETTER VA; DEVANAGARI LETTER LLLA
+ key <AB06> { [ U0932, U0933 ] }; // DEVANAGARI LETTER LA; DEVANAGARI LETTER LLA
+ key <AB07> { [ U0938, U0936 ] }; // DEVANAGARI LETTER SA; DEVANAGARI LETTER SHA
+ key <AB08> { [ comma, U0937 ] }; // DEVANAGARI LETTER SSA
+ key <AB09> { [ period, U0964 ] }; // DEVANAGARI DANDA
+ key <AB10> { [ U092F, U095F ] }; // DEVANAGARI LETTER YA; DEVANAGARI LETTER YYA
+
+ // space, space, Zero-Width-Non-Joiner (ZWNJ), Zero-Width-Joiner (ZWJ):
+ include "nbsp(zwnj3zwj4)"
+
+ include "group(olpc)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "hin-wx" {
+
+ name[Group1]= "India - Hindi Wx";
+
+ key <TLDE> { [ grave, asciitilde, 2, 3 ] };
+
+ key <AE01> { [ 0x1000967, exclam ] };
+ key <AE02> { [ 0x1000968, at ] };
+ key <AE03> { [ 0x1000969 , numbersign ] };
+ key <AE04> { [ 0x100096A , dollar ] };
+ key <AE05> { [ 0x100096B , percent ] };
+ key <AE06> { [ 0x100096C , asciicircum ] };
+ key <AE07> { [ 0x100096D , ampersand ] };
+ key <AE08> { [ 0x100096e , asterisk ] };
+ key <AE09> { [ 0x100096F, parenleft ] };
+ key <AE10> { [ 0x1000966, parenright ] };
+ key <AE11> { [ minus, underscore ] };
+ key <AE12> { [ equal, plus ] };
+
+
+ key <AD01> { [ 0x1000943, 0x1000944, 0x100090B, 0x1000960] };
+ key <AD02> { [ 0x1000924, 0x1000925 ] };
+ key <AD03> { [ 0x1000947, 0x1000948, 0x100090F, 0x1000910] };
+ key <AD04> { [ 0x1000930, 0x1000937 ] };
+ key <AD05> { [ 0x100091F, 0x1000920 ] };
+
+
+ key <AD06> { [ 0x100092F ] };
+ key <AD07> { [ 0x1000941, 0x1000942, 0x1000909, 0x100090A ] };
+ key <AD08> { [ 0x100093F, 0x1000940, 0x1000907, 0x1000908 ] };
+ key <AD09> { [ 0x100094B, 0x100094C, 0x1000913, 0x1000914] };
+ key <AD10> { [ 0x100092A, 0x100092B ] };
+ key <AD11> { [ bracketleft, braceleft ] };
+ key <AD12> { [ bracketright, braceright ] };
+ key <BKSL> { [ backslash, bar, 0x1000964, 0x1000965 ] };
+
+ key <AC01> { [ 0x100094D, 0x100093E, 0x1000905,0x1000906 ] };
+ key <AC02> { [ 0x1000938, 0x1000936 ] };
+ key <AC03> { [ 0x1000921, 0x1000922 ] };
+ key <AC04> { [ 0x1000919, 0x100091E ] };
+ key <AC05> { [ 0x1000917, 0x1000918 ] };
+
+
+ key <AC06> { [ 0x1000939, 0x1000903 ] };
+ key <AC07> { [ 0x100091C, 0x100091D ] };
+ key <AC08> { [ 0x1000915, 0x1000916 ] };
+ key <AC09> { [ 0x1000932, 0x1000962, 0x1000933, 0x100090C] };
+ key <AC10> { [ semicolon, colon ] };
+ key <AC11> { [ quoteright, quotedbl ] };
+
+ key <AB01> { [ 0x1000901, 0x100093C, 0x100093D, 0x1000950] };
+ key <AB02> { [ 0x1000926, 0x1000927 ] };
+ key <AB03> { [ 0x100091A, 0x100091B ] };
+ key <AB04> { [ 0x1000935, dead_V ] };
+ key <AB05> { [ 0x100092C, 0x100092D ] };
+ key <AB06> { [ 0x1000928, 0x1000923 ] };
+ key <AB07> { [ 0x100092E, 0x1000902 ] };
+ key <AB08> { [ comma, less ] };
+ key <AB09> { [ period, greater ] };
+ key <AB10> { [ slash, question ] };
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "eng" {
+
+ name[Group1]= "India - English with RupeeSign";
+
+ include "us(basic)"
+
+ include "rupeesign(4)"
+
+ include "level3(ralt_switch)"
+};
+
+
+// Description : Enhanced INSCRIPT keymap for Malayalam
+// Encoding : Unicode (http://www.unicode.org)
+// Author : Mahesh T Pai <paivakil@gmail.com>
+// Date : March, 2011
+// Source : http://www.nongnu.org/smc/docs/images/ml_inscript_layout.jpg
+// Comment : Based on the Inscript Keyboard created by M Baiju
+// Mapping:
+
+partial alphanumeric_keys
+xkb_symbols "mal_enhanced" {
+
+ name[Group1] = "India - Malayalam Modified Inscript with Rupee Sign";
+
+ //From grave to backslash (\)
+
+ key <TLDE> { [ U0d4a , U0d12 ] };
+ key <AE01> { [ U0d67 , exclam ] };
+ key <AE02> { [ U0d68 , at ] };
+ key <AE03> { [ U0d69 , numbersign ] };
+ key <AE04> { [ U0d6a , dollar ] };
+ key <AE05> { [ U0d6b , percent ] };
+ key <AE06> { [ U0d6c , asciicircum ] };
+ key <AE07> { [ U0d6d , ampersand ] };
+ key <AE08> { [ U0d6e , U0d7e ] };
+ key <AE09> { [ U0d6f , parenleft ] };
+ key <AE10> { [ U0d66 , parenright ] };
+
+ key <AE11> { [ minus , U0d03 ] };
+ key <AE12> { [ U0d43 , U0d0b ] };
+ key <BKSL> { [ U0d7c , U05C ] }; //bksl: chillu RR
+
+
+ // From 'q' to right bracket (])
+
+ key <AD01> { [ U0d57 , U0d14 ] };
+ key <AD02> { [ U0d48 , U0d10 ] };
+ key <AD03> { [ U0d3e , U0d06 ] };
+ key <AD04> { [ U0d40 , U0d08 ] };
+ key <AD05> { [ U0d42 , U0d0a ] };
+ key <AD06> { [ U0d2c , U0d2d ] };
+ key <AD07> { [ U0d39 , U0d19 ] };
+ key <AD08> { [ U0d17 , U0d18 ] };
+ key <AD09> { [ U0d26 , U0d27 ] };
+ key <AD10> { [ U0d1c , U0d1d ] };
+ key <AD11> { [ U0d21 , U0d22 ] };
+ key <AD12> { [ U0200d , U0d1e ] };
+
+ // From 'a' to apostrophe (')
+
+ key <AC01> { [ U0d4b , U0d13 ] };
+ key <AC02> { [ U0d47 , U0d0f ] };
+ key <AC03> { [ U0d4d , U0d05 ] };
+ key <AC04> { [ U0d3f , U0d07 ] };
+ key <AC05> { [ U0d41 , U0d09 ] };
+ key <AC06> { [ U0d2a , U0d2b ] };
+ key <AC07> { [ U0d30 , U0d31 ] };
+ key <AC08> { [ U0d15 , U0d16 ] };
+ key <AC09> { [ U0d24 , U0d25 ] };
+ key <AC10> { [ U0d1a , U0d1b ] };
+ key <AC11> { [ U0d1f , U0d20 ] };
+
+ // From 'z' to slash (/)
+
+ key <AB01> { [ U0d46 , U0d0e ] };
+ key <AB02> { [ U0d02 , U0d7a ] };
+ key <AB03> { [ U0d2e , U0d23 ] };
+ key <AB04> { [ U0d28 , U0d7b ] };
+ key <AB05> { [ U0d35 , U0d34 ] };
+ key <AB06> { [ U0d32 , U0d33 ] };
+ key <AB07> { [ U0d38 , U0d36 ] };
+ key <AB08> { [ comma , U0d37 ] };
+ key <AB09> { [ period , U0d7d ] }; //chillu l
+ key <AB10> { [ U0d2f , question ] };
+
+ // hope this includes the rupee sign at alt + 4
+
+ include "rupeesign(4)"
+ include "level3(ralt_switch)"
+
+};
+
diff --git a/xorg-server/xkeyboard-config/symbols/ir b/xorg-server/xkeyboard-config/symbols/ir
index 1832e819b..28b8dc17d 100644
--- a/xorg-server/xkeyboard-config/symbols/ir
+++ b/xorg-server/xkeyboard-config/symbols/ir
@@ -1,306 +1,306 @@
-// Iranian keyboard layout
-
-////////////////////////////////////////
-// Persian layout,
-// based on
-// Information Technology – Layout of Persian Letters and Symbols on Computer Keyboards
-// ISIRI 9147 – 1st Edition
-// Institute of Standards and Industrial Research of Iran
-// http://www.isiri.org/UserStd/DownloadStd.aspx?id=9147
-// http://behnam.esfahbod.info/standards/isiri-keyboard-9147.pdf
-//
-// Author: Behnam Esfahbod <behnam@esfahbod.info>
-//
-
-partial default alphanumeric_keys
-xkb_symbols "pes" {
- name[Group1]= "Iran";
-
- include "ir(pes_part_basic)"
- include "ir(pes_part_ext)"
-
- include "nbsp(zwnj2nb3nnb4)"
- include "level3(ralt_switch)"
-};
-
-
-partial alphanumeric_keys
-xkb_symbols "pes_keypad" {
- name[Group1]= "Iran - Persian, with Persian Keypad";
-
- include "ir(pes_part_basic)"
- include "ir(pes_part_keypad)"
-
- include "nbsp(zwnj2nb3nnb4)"
- include "level3(ralt_switch)"
-};
-
-partial hidden alphanumeric_keys
-xkb_symbols "pes_part_basic" {
-
- // Persian digits
- key <AE01> { [ Farsi_1, exclam, quoteleft ] };
- key <AE02> { [ Farsi_2, 0x100066c, at ] };
- key <AE03> { [ Farsi_3, 0x100066b, numbersign ] };
- key <AE04> { [ Farsi_4, 0x100fdfc, dollar ] };
- key <AE05> { [ Farsi_5, 0x100066a, percent ] };
- key <AE06> { [ Farsi_6, multiply, asciicircum ] };
- key <AE07> { [ Farsi_7, Arabic_comma, ampersand ] };
- key <AE08> { [ Farsi_8, asterisk, enfilledcircbullet ] };
- key <AE09> { [ Farsi_9, parenright, 0x100200e ] };
- key <AE10> { [ Farsi_0, parenleft, 0x100200f ] };
-
- // Persian letters and symbols
- key <AD01> { [ Arabic_dad, Arabic_sukun, degree ] };
- key <AD02> { [ Arabic_sad, Arabic_dammatan, VoidSymbol ] };
- key <AD03> { [ Arabic_theh, Arabic_kasratan, 0x13a4 ] };
- key <AD04> { [ Arabic_qaf, Arabic_fathatan, VoidSymbol ] };
- key <AD05> { [ Arabic_feh, Arabic_damma, VoidSymbol ] };
- key <AD06> { [ Arabic_ghain, Arabic_kasra, VoidSymbol ] };
- key <AD07> { [ Arabic_ain, Arabic_fatha, VoidSymbol ] };
- key <AD08> { [ Arabic_heh, Arabic_shadda, 0x100202d ] };
- key <AD09> { [ Arabic_khah, bracketright, 0x100202e ] };
- key <AD10> { [ Arabic_hah, bracketleft, 0x100202c ] };
- key <AD11> { [ Arabic_jeem, braceright, 0x100202a ] };
- key <AD12> { [ Arabic_tcheh, braceleft, 0x100202b ] };
-
- key <AC01> { [ Arabic_sheen, Arabic_hamzaonwaw, VoidSymbol ] };
- key <AC02> { [ Arabic_seen, Arabic_hamzaonyeh, VoidSymbol ] };
- key <AC03> { [ Farsi_yeh, Arabic_yeh, Arabic_alefmaksura ] };
- key <AC04> { [ Arabic_beh, Arabic_hamzaunderalef, VoidSymbol ] };
- key <AC05> { [ Arabic_lam, Arabic_hamzaonalef, VoidSymbol ] };
- key <AC06> { [ Arabic_alef, Arabic_maddaonalef, 0x1000671 ] };
- key <AC07> { [ Arabic_teh, Arabic_tehmarbuta, VoidSymbol ] };
- key <AC08> { [ Arabic_noon, guillemotright, 0x100fd3e ] };
- key <AC09> { [ Arabic_meem, guillemotleft, 0x100fd3f ] };
- key <AC10> { [ Arabic_keheh, colon, semicolon ] };
- key <AC11> { [ Arabic_gaf, Arabic_semicolon, quotedbl ] };
-
- key <AB01> { [ Arabic_zah, Arabic_kaf, VoidSymbol ] };
- key <AB02> { [ Arabic_tah, 0x1000653, VoidSymbol ] };
- key <AB03> { [ Arabic_zain, Arabic_jeh, VoidSymbol ] };
- key <AB04> { [ Arabic_ra, Arabic_superscript_alef
-, 0x1000656 ] };
- key <AB05> { [ Arabic_thal, 0x100200c, 0x100200d ] };
- key <AB06> { [ Arabic_dal, Arabic_hamza_above
-, Arabic_hamza_below ] };
- key <AB07> { [ Arabic_peh, Arabic_hamza, ellipsis ] };
- key <AB08> { [ Arabic_waw, greater, comma ] };
- key <AB09> { [ period, less, apostrophe ] };
- key <AB10> { [ slash, Arabic_question_mark, question ] };
-
- key <TLDE> { [ 0x100200d, division, asciitilde ] };
- key <AE11> { [ minus, Arabic_tatweel, underscore ] };
- key <AE12> { [ equal, plus, 0x1002212 ] };
- key <BKSL> { [ backslash, bar, 0x1002010 ] };
-};
-
-partial hidden alphanumeric_keys
-xkb_symbols "pes_part_ext" {
-
- // Persian and ASCII digits
- key <AE01> { [ 0x10006f1, exclam, quoteleft, 1 ] };
- key <AE02> { [ 0x10006f2, 0x100066c, at, 2 ] };
- key <AE03> { [ 0x10006f3, 0x100066b, numbersign, 3 ] };
- key <AE04> { [ 0x10006f4, 0x100fdfc, dollar, 4 ] };
- key <AE05> { [ 0x10006f5, 0x100066a, percent, 5 ] };
- key <AE06> { [ 0x10006f6, multiply, asciicircum, 6 ] };
- key <AE07> { [ 0x10006f7, Arabic_comma, ampersand, 7 ] };
- key <AE08> { [ 0x10006f8, asterisk, enfilledcircbullet, 8 ] };
- key <AE09> { [ 0x10006f9, parenright, 0x100200e, 9 ] };
- key <AE10> { [ 0x10006f0, parenleft, 0x100200f, 0 ] };
-};
-
-partial hidden alphanumeric_keys
-xkb_symbols "pes_part_keypad" {
-
- // Persian digits and Mathematical operators
- key <KPDV> { [ division, XF86_Ungrab ] };
- key <KPMU> { [ multiply, XF86_ClearGrab ] };
- key <KPSU> { [ 0x1002212, XF86_Prev_VMode ] };
- key <KPAD> { [ plus, XF86_Next_VMode ] };
-
- key <KPEN> { [ KP_Enter ] };
- key <KPEQ> { [ equal ] };
-
- key <KP7> { [ KP_Home, 0x10006f7 ] };
- key <KP8> { [ KP_Up, 0x10006f8 ] };
- key <KP9> { [ KP_Prior, 0x10006f9 ] };
-
- key <KP4> { [ KP_Left, 0x10006f4 ] };
- key <KP5> { [ KP_Begin, 0x10006f5 ] };
- key <KP6> { [ KP_Right, 0x10006f6 ] };
-
- key <KP1> { [ KP_End, 0x10006f1 ] };
- key <KP2> { [ KP_Down, 0x10006f2 ] };
- key <KP3> { [ KP_Next, 0x10006f3 ] };
-
- key <KP0> { [ KP_Insert, 0x10006f0 ] };
- key <KPDL> { [ KP_Delete, 0x100066b ] };
-};
-
-
-////////////////////////////////////////
-// Kurdish Layout
-
-partial alphanumeric_keys
-xkb_symbols "ku" {
- include "tr(ku)"
- name[Group1]= "Iran - Kurdish, Latin Q";
-};
-
-partial alphanumeric_keys
-xkb_symbols "ku_f" {
- include "tr(ku_f)"
- name[Group1]= "Iran - Kurdish, (F)";
-};
-
-partial alphanumeric_keys
-xkb_symbols "ku_alt" {
- include "tr(ku_alt)"
- name[Group1]= "Iran - Kurdish, Latin Alt-Q";
-};
-
-////////////////////////////////////////
-// Kurdish Soranî Bahdînî (Arabic) keyboard layout,
-// based on the Kurdî Soranî Bahdînî keyboard from KurdITGroup
-// which is based on National Iranian Keyboard Standard (ISIRI 2901:1994),
-// with additions.
-//
-// Copyright (C) 2006 Erdal Ronahî, published under the GPL v2
-//
-// Special copyright note: author explicitly permitted to license this
-// layout under MIT/X11 license, for details see
-// https://bugs.freedesktop.org/show_bug.cgi?id=9541
-//
-// Author: Erdal Ronahî <erdal.ronahi@gmail.com>
-//
-// Kurdish Arabic-Latin Layout for Soranî
-
-partial alphanumeric_keys
-xkb_symbols "ku_ara" {
- name[Group1]= "Iran - Kurdish, Arabic-Latin";
-
- // Other 3-Level symbols
- key <TLDE> { [ 0x100200d, division, asciitilde ] };
- key <BKSL> { [ backslash, bar, ccedilla, Ccedilla ] };
-
- // Digits
- key <AE01> { [ 1, exclam, 0x10006f1, quoteleft ] };
- key <AE02> { [ 2, at, 0x10006f2, at ] };
- key <AE03> { [ 3, numbersign, 0x10006f3, 0x100066b ] };
- key <AE04> { [ 4, dollar, 0x10006f4, 0x100fdfc ] };
- key <AE05> { [ 5, percent, 0x10006f5, 0x100066a ] };
- key <AE06> { [ 6, asciicircum, 0x10006f6, multiply ] };
- key <AE07> { [ 7, ampersand, 0x10006f7, Arabic_comma ] };
- key <AE08> { [ 8, asterisk, 0x10006f8, enfilledcircbullet ] };
- key <AE09> { [ 9, parenright, 0x10006f9, 0x100200e ] };
- key <AE10> { [ 0, parenleft, 0x10006f0, 0x100200f ] };
- key <AE11> { [ minus, Arabic_tatweel, underscore ] };
- key <AE12> { [ equal, plus, 0x1002212 ] };
-
- key <AD01> { [ Arabic_qaf, X, q, Q ] };
- key <AD02> { [ Arabic_waw, X, w, W ] };
- key <AD03> { [ 0x10006d5, Arabic_heh, e, E ] };
- key <AD04> { [ Arabic_ra , 0x1000695, r, R ] };
- key <AD05> { [ Arabic_teh, Arabic_tah, t, T ] };
- key <AD06> { [ 0x10006cc, 0x10006ce, y, Y ] };
- key <AD07> { [ Arabic_hamzaonyeh, Arabic_hamza, u, U ] };
- key <AD08> { [ Arabic_hah, Arabic_ain, i, I ] };
- key <AD09> { [ 0x10006c6, Arabic_hamzaonwaw, o, O ] };
- key <AD10> { [ 0x100067e, Arabic_theh, p, P ] };
- key <AD11> { [ bracketright, braceright, ucircumflex, Ucircumflex ] };
- key <AD12> { [ bracketleft, braceleft, scedilla, Scedilla ] };
-
- key <AC01> { [ Arabic_alef, Arabic_maddaonalef, a, A ] };
- key <AC02> { [ Arabic_seen, Arabic_sheen, s, S ] };
- key <AC03> { [ Arabic_dal, Arabic_thal, d, D ] };
- key <AC04> { [ Arabic_feh, Arabic_hamzaunderalef, f, F ] };
- key <AC05> { [ 0x10006af, Arabic_ghain, g, G ] };
- key <AC06> { [ Arabic_heh, 0x100200c, h, H ] };
- key <AC07> { [ 0x1000698, Arabic_hamzaonalef, j, J ] };
- key <AC08> { [ 0x10006a9, Arabic_kaf, k, K ] };
- key <AC09> { [ Arabic_lam, 0x10006b5, l, L ] };
- key <AC10> { [ Arabic_semicolon, colon, ecircumflex, Ecircumflex ] };
- key <AC11> { [ apostrophe, quotedbl, icircumflex, Icircumflex ] };
-
- key <AB01> { [ Arabic_zain, Arabic_dad, z, Z ] };
- key <AB02> { [ Arabic_khah, Arabic_sad, x, X ] };
- key <AB03> { [ Arabic_jeem, 0x1000686, c, C ] };
- key <AB04> { [ 0x10006a4, Arabic_zah, v, V ] };
- key <AB05> { [ Arabic_beh, 0x1000649, b, B ] };
- key <AB06> { [ Arabic_noon, Arabic_tehmarbuta, n, N ] };
- key <AB07> { [ Arabic_meem, Arabic_tatweel, m, M ] };
- key <AB08> { [ Arabic_comma, greater, comma ] };
- key <AB09> { [ period, less, apostrophe ] };
- key <AB10> { [ slash, Arabic_question_mark, question ] };
-
- include "nbsp(zwnj2nb3)"
- include "level3(ralt_switch)"
-};
-
-// EXTRAS:
-
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Generated keyboard layout file with the Keyboard Layout Editor.
-// For more about the software, see http://code.google.com/p/keyboardlayouteditor
-//
-// Version 0.2, fixed AD09.
-//
-// Layout by Ernst Tremel, http://ubuntuforums.org/showpost.php?p=9365469&postcount=32
-// Creation of this file by Simos Xenitellis.
-
-partial default alphanumeric_keys
-xkb_symbols "ave"
-{
- name[Group1] = "Iran - Avestan";
-
- key <AB01> { [ U10B30, U10B32 ] }; // 𐬰 𐬲
- key <AB02> { [ U10B11, U10B12 ] }; // 𐬑 𐬒
- key <AB03> { [ U10B17, UE102 ] }; // 𐬗 
- key <AB04> { [ U10B2C, U10B13 ] }; // 𐬬 𐬓
- key <AB05> { [ U10B20, U10B21 ] }; // 𐬠 𐬡
- key <AB06> { [ U10B25, U10B27 ] }; // 𐬥 𐬧
- key <AB07> { [ U10B28, U10B29 ] }; // 𐬨 𐬩
- key <AB08> { [ U10B3C, U10B39 ] }; // 𐬼 𐬹
- key <AB09> { [ U10B3E, U10B3D ] }; // 𐬾 𐬽
- key <AB10> { [ U10B3F, periodcentered ] }; // 𐬿 ·
-
- key <AC01> { [ U10B00, U10B01 ] }; // 𐬀 𐬁
- key <AC02> { [ U10B2F, U10B31 ] }; // 𐬯 𐬱
- key <AC03> { [ U10B1B, U10B1C ] }; // 𐬛 𐬜
- key <AC04> { [ U10B1F, U10B16 ] }; // 𐬟 𐬖
- key <AC05> { [ U10B14, U10B15 ] }; // 𐬔 𐬕
- key <AC06> { [ U10B35, UE100 ] }; // 𐬵 
- key <AC07> { [ U10B18, U10B24 ] }; // 𐬘 𐬤
- key <AC08> { [ U10B10, UE101 ] }; // 𐬐 
- key <AC09> { [ U10B2E, UE103 ] }; // 𐬮 
- key <AC10> { [ U10B3B, U10B3A ] }; // 𐬻 𐬺
- key <AC11> { [ U10B1D ] }; // 𐬝
-
- key <AD01> { [ U10B22, U10B23 ] }; // 𐬢 𐬣
- key <AD02> { [ U10B33, U10B34 ] }; // 𐬳 𐬴
- key <AD03> { [ U10B08, U10B09 ] }; // 𐬈 𐬉
- key <AD04> { [ U10B2D, U10B26 ] }; // 𐬭 𐬦
- key <AD05> { [ U10B19, U10B1A ] }; // 𐬙 𐬚
- key <AD06> { [ U10B2B, U10B2A ] }; // 𐬫 𐬪
- key <AD07> { [ U10B0E, U10B0F ] }; // 𐬎 𐬏
- key <AD08> { [ U10B0C, U10B0D ] }; // 𐬌 𐬍
- key <AD09> { [ U10B0A, U10B0B ] }; // 𐬊 𐬋
- key <AD10> { [ U10B1E ] }; // 𐬞
- key <AD11> { [ U10B06, U10B07 ] }; // 𐬆 𐬇
- key <AD12> { [ U10B02, U10B03 ] }; // 𐬂 𐬃
-
- key <AE01> { [ U10B78 ] }; // 𐭸
- key <AE02> { [ U10B79 ] }; // 𐭹
- key <AE03> { [ U10B7A ] }; // 𐭺
- key <AE04> { [ U10B7B ] }; // 𐭻
- key <AE05> { [ U10B7C ] }; // 𐭼
- key <AE06> { [ U10B7D ] }; // 𐭽
- key <AE07> { [ U10B7E ] }; // 𐭾
- key <AE08> { [ U10B7F ] }; // 𐭿
-
- key <BKSL> { [ U10B04, U10B05 ] }; // 𐬄 𐬅
- key <LSGT> { [ U10B04, U10B05 ] }; // 𐬄 𐬅
-};
+// Iranian keyboard layout
+
+////////////////////////////////////////
+// Persian layout,
+// based on
+// Information Technology – Layout of Persian Letters and Symbols on Computer Keyboards
+// ISIRI 9147 – 1st Edition
+// Institute of Standards and Industrial Research of Iran
+// http://www.isiri.org/UserStd/DownloadStd.aspx?id=9147
+// http://behnam.esfahbod.info/standards/isiri-keyboard-9147.pdf
+//
+// Author: Behnam Esfahbod <behnam@esfahbod.info>
+//
+
+partial default alphanumeric_keys
+xkb_symbols "pes" {
+ name[Group1]= "Iran";
+
+ include "ir(pes_part_basic)"
+ include "ir(pes_part_ext)"
+
+ include "nbsp(zwnj2nb3nnb4)"
+ include "level3(ralt_switch)"
+};
+
+
+partial alphanumeric_keys
+xkb_symbols "pes_keypad" {
+ name[Group1]= "Iran - Persian, with Persian Keypad";
+
+ include "ir(pes_part_basic)"
+ include "ir(pes_part_keypad)"
+
+ include "nbsp(zwnj2nb3nnb4)"
+ include "level3(ralt_switch)"
+};
+
+partial hidden alphanumeric_keys
+xkb_symbols "pes_part_basic" {
+
+ // Persian digits
+ key <AE01> { [ Farsi_1, exclam, quoteleft ] };
+ key <AE02> { [ Farsi_2, 0x100066c, at ] };
+ key <AE03> { [ Farsi_3, 0x100066b, numbersign ] };
+ key <AE04> { [ Farsi_4, 0x100fdfc, dollar ] };
+ key <AE05> { [ Farsi_5, 0x100066a, percent ] };
+ key <AE06> { [ Farsi_6, multiply, asciicircum ] };
+ key <AE07> { [ Farsi_7, Arabic_comma, ampersand ] };
+ key <AE08> { [ Farsi_8, asterisk, enfilledcircbullet ] };
+ key <AE09> { [ Farsi_9, parenright, 0x100200e ] };
+ key <AE10> { [ Farsi_0, parenleft, 0x100200f ] };
+
+ // Persian letters and symbols
+ key <AD01> { [ Arabic_dad, Arabic_sukun, degree ] };
+ key <AD02> { [ Arabic_sad, Arabic_dammatan, VoidSymbol ] };
+ key <AD03> { [ Arabic_theh, Arabic_kasratan, 0x13a4 ] };
+ key <AD04> { [ Arabic_qaf, Arabic_fathatan, VoidSymbol ] };
+ key <AD05> { [ Arabic_feh, Arabic_damma, VoidSymbol ] };
+ key <AD06> { [ Arabic_ghain, Arabic_kasra, VoidSymbol ] };
+ key <AD07> { [ Arabic_ain, Arabic_fatha, VoidSymbol ] };
+ key <AD08> { [ Arabic_heh, Arabic_shadda, 0x100202d ] };
+ key <AD09> { [ Arabic_khah, bracketright, 0x100202e ] };
+ key <AD10> { [ Arabic_hah, bracketleft, 0x100202c ] };
+ key <AD11> { [ Arabic_jeem, braceright, 0x100202a ] };
+ key <AD12> { [ Arabic_tcheh, braceleft, 0x100202b ] };
+
+ key <AC01> { [ Arabic_sheen, Arabic_hamzaonwaw, VoidSymbol ] };
+ key <AC02> { [ Arabic_seen, Arabic_hamzaonyeh, VoidSymbol ] };
+ key <AC03> { [ Farsi_yeh, Arabic_yeh, Arabic_alefmaksura ] };
+ key <AC04> { [ Arabic_beh, Arabic_hamzaunderalef, VoidSymbol ] };
+ key <AC05> { [ Arabic_lam, Arabic_hamzaonalef, VoidSymbol ] };
+ key <AC06> { [ Arabic_alef, Arabic_maddaonalef, 0x1000671 ] };
+ key <AC07> { [ Arabic_teh, Arabic_tehmarbuta, VoidSymbol ] };
+ key <AC08> { [ Arabic_noon, guillemotright, 0x100fd3e ] };
+ key <AC09> { [ Arabic_meem, guillemotleft, 0x100fd3f ] };
+ key <AC10> { [ Arabic_keheh, colon, semicolon ] };
+ key <AC11> { [ Arabic_gaf, Arabic_semicolon, quotedbl ] };
+
+ key <AB01> { [ Arabic_zah, Arabic_kaf, VoidSymbol ] };
+ key <AB02> { [ Arabic_tah, 0x1000653, VoidSymbol ] };
+ key <AB03> { [ Arabic_zain, Arabic_jeh, VoidSymbol ] };
+ key <AB04> { [ Arabic_ra, Arabic_superscript_alef
+, 0x1000656 ] };
+ key <AB05> { [ Arabic_thal, 0x100200c, 0x100200d ] };
+ key <AB06> { [ Arabic_dal, Arabic_hamza_above
+, Arabic_hamza_below ] };
+ key <AB07> { [ Arabic_peh, Arabic_hamza, ellipsis ] };
+ key <AB08> { [ Arabic_waw, greater, comma ] };
+ key <AB09> { [ period, less, apostrophe ] };
+ key <AB10> { [ slash, Arabic_question_mark, question ] };
+
+ key <TLDE> { [ 0x100200d, division, asciitilde ] };
+ key <AE11> { [ minus, Arabic_tatweel, underscore ] };
+ key <AE12> { [ equal, plus, 0x1002212 ] };
+ key <BKSL> { [ backslash, bar, 0x1002010 ] };
+};
+
+partial hidden alphanumeric_keys
+xkb_symbols "pes_part_ext" {
+
+ // Persian and ASCII digits
+ key <AE01> { [ 0x10006f1, exclam, quoteleft, 1 ] };
+ key <AE02> { [ 0x10006f2, 0x100066c, at, 2 ] };
+ key <AE03> { [ 0x10006f3, 0x100066b, numbersign, 3 ] };
+ key <AE04> { [ 0x10006f4, 0x100fdfc, dollar, 4 ] };
+ key <AE05> { [ 0x10006f5, 0x100066a, percent, 5 ] };
+ key <AE06> { [ 0x10006f6, multiply, asciicircum, 6 ] };
+ key <AE07> { [ 0x10006f7, Arabic_comma, ampersand, 7 ] };
+ key <AE08> { [ 0x10006f8, asterisk, enfilledcircbullet, 8 ] };
+ key <AE09> { [ 0x10006f9, parenright, 0x100200e, 9 ] };
+ key <AE10> { [ 0x10006f0, parenleft, 0x100200f, 0 ] };
+};
+
+partial hidden alphanumeric_keys
+xkb_symbols "pes_part_keypad" {
+
+ // Persian digits and Mathematical operators
+ key <KPDV> { [ division, XF86_Ungrab ] };
+ key <KPMU> { [ multiply, XF86_ClearGrab ] };
+ key <KPSU> { [ 0x1002212, XF86_Prev_VMode ] };
+ key <KPAD> { [ plus, XF86_Next_VMode ] };
+
+ key <KPEN> { [ KP_Enter ] };
+ key <KPEQ> { [ equal ] };
+
+ key <KP7> { [ KP_Home, 0x10006f7 ] };
+ key <KP8> { [ KP_Up, 0x10006f8 ] };
+ key <KP9> { [ KP_Prior, 0x10006f9 ] };
+
+ key <KP4> { [ KP_Left, 0x10006f4 ] };
+ key <KP5> { [ KP_Begin, 0x10006f5 ] };
+ key <KP6> { [ KP_Right, 0x10006f6 ] };
+
+ key <KP1> { [ KP_End, 0x10006f1 ] };
+ key <KP2> { [ KP_Down, 0x10006f2 ] };
+ key <KP3> { [ KP_Next, 0x10006f3 ] };
+
+ key <KP0> { [ KP_Insert, 0x10006f0 ] };
+ key <KPDL> { [ KP_Delete, 0x100066b ] };
+};
+
+
+////////////////////////////////////////
+// Kurdish Layout
+
+partial alphanumeric_keys
+xkb_symbols "ku" {
+ include "tr(ku)"
+ name[Group1]= "Iran - Kurdish, Latin Q";
+};
+
+partial alphanumeric_keys
+xkb_symbols "ku_f" {
+ include "tr(ku_f)"
+ name[Group1]= "Iran - Kurdish, (F)";
+};
+
+partial alphanumeric_keys
+xkb_symbols "ku_alt" {
+ include "tr(ku_alt)"
+ name[Group1]= "Iran - Kurdish, Latin Alt-Q";
+};
+
+////////////////////////////////////////
+// Kurdish Soranî Bahdînî (Arabic) keyboard layout,
+// based on the Kurdî Soranî Bahdînî keyboard from KurdITGroup
+// which is based on National Iranian Keyboard Standard (ISIRI 2901:1994),
+// with additions.
+//
+// Copyright (C) 2006 Erdal Ronahî, published under the GPL v2
+//
+// Special copyright note: author explicitly permitted to license this
+// layout under MIT/X11 license, for details see
+// https://bugs.freedesktop.org/show_bug.cgi?id=9541
+//
+// Author: Erdal Ronahî <erdal.ronahi@gmail.com>
+//
+// Kurdish Arabic-Latin Layout for Soranî
+
+partial alphanumeric_keys
+xkb_symbols "ku_ara" {
+ name[Group1]= "Iran - Kurdish, Arabic-Latin";
+
+ // Other 3-Level symbols
+ key <TLDE> { [ 0x100200d, division, asciitilde ] };
+ key <BKSL> { [ backslash, bar, ccedilla, Ccedilla ] };
+
+ // Digits
+ key <AE01> { [ 1, exclam, 0x10006f1, quoteleft ] };
+ key <AE02> { [ 2, at, 0x10006f2, at ] };
+ key <AE03> { [ 3, numbersign, 0x10006f3, 0x100066b ] };
+ key <AE04> { [ 4, dollar, 0x10006f4, 0x100fdfc ] };
+ key <AE05> { [ 5, percent, 0x10006f5, 0x100066a ] };
+ key <AE06> { [ 6, asciicircum, 0x10006f6, multiply ] };
+ key <AE07> { [ 7, ampersand, 0x10006f7, Arabic_comma ] };
+ key <AE08> { [ 8, asterisk, 0x10006f8, enfilledcircbullet ] };
+ key <AE09> { [ 9, parenright, 0x10006f9, 0x100200e ] };
+ key <AE10> { [ 0, parenleft, 0x10006f0, 0x100200f ] };
+ key <AE11> { [ minus, Arabic_tatweel, underscore ] };
+ key <AE12> { [ equal, plus, 0x1002212 ] };
+
+ key <AD01> { [ Arabic_qaf, X, q, Q ] };
+ key <AD02> { [ Arabic_waw, X, w, W ] };
+ key <AD03> { [ 0x10006d5, Arabic_heh, e, E ] };
+ key <AD04> { [ Arabic_ra , 0x1000695, r, R ] };
+ key <AD05> { [ Arabic_teh, Arabic_tah, t, T ] };
+ key <AD06> { [ 0x10006cc, 0x10006ce, y, Y ] };
+ key <AD07> { [ Arabic_hamzaonyeh, Arabic_hamza, u, U ] };
+ key <AD08> { [ Arabic_hah, Arabic_ain, i, I ] };
+ key <AD09> { [ 0x10006c6, Arabic_hamzaonwaw, o, O ] };
+ key <AD10> { [ 0x100067e, Arabic_theh, p, P ] };
+ key <AD11> { [ bracketright, braceright, ucircumflex, Ucircumflex ] };
+ key <AD12> { [ bracketleft, braceleft, scedilla, Scedilla ] };
+
+ key <AC01> { [ Arabic_alef, Arabic_maddaonalef, a, A ] };
+ key <AC02> { [ Arabic_seen, Arabic_sheen, s, S ] };
+ key <AC03> { [ Arabic_dal, Arabic_thal, d, D ] };
+ key <AC04> { [ Arabic_feh, Arabic_hamzaunderalef, f, F ] };
+ key <AC05> { [ 0x10006af, Arabic_ghain, g, G ] };
+ key <AC06> { [ Arabic_heh, 0x100200c, h, H ] };
+ key <AC07> { [ 0x1000698, Arabic_hamzaonalef, j, J ] };
+ key <AC08> { [ 0x10006a9, Arabic_kaf, k, K ] };
+ key <AC09> { [ Arabic_lam, 0x10006b5, l, L ] };
+ key <AC10> { [ Arabic_semicolon, colon, ecircumflex, Ecircumflex ] };
+ key <AC11> { [ apostrophe, quotedbl, icircumflex, Icircumflex ] };
+
+ key <AB01> { [ Arabic_zain, Arabic_dad, z, Z ] };
+ key <AB02> { [ Arabic_khah, Arabic_sad, x, X ] };
+ key <AB03> { [ Arabic_jeem, 0x1000686, c, C ] };
+ key <AB04> { [ 0x10006a4, Arabic_zah, v, V ] };
+ key <AB05> { [ Arabic_beh, 0x1000649, b, B ] };
+ key <AB06> { [ Arabic_noon, Arabic_tehmarbuta, n, N ] };
+ key <AB07> { [ Arabic_meem, Arabic_tatweel, m, M ] };
+ key <AB08> { [ Arabic_comma, greater, comma ] };
+ key <AB09> { [ period, less, apostrophe ] };
+ key <AB10> { [ slash, Arabic_question_mark, question ] };
+
+ include "nbsp(zwnj2nb3)"
+ include "level3(ralt_switch)"
+};
+
+// EXTRAS:
+
+/////////////////////////////////////////////////////////////////////////////////
+//
+// Generated keyboard layout file with the Keyboard Layout Editor.
+// For more about the software, see http://code.google.com/p/keyboardlayouteditor
+//
+// Version 0.2, fixed AD09.
+//
+// Layout by Ernst Tremel, http://ubuntuforums.org/showpost.php?p=9365469&postcount=32
+// Creation of this file by Simos Xenitellis.
+
+partial default alphanumeric_keys
+xkb_symbols "ave"
+{
+ name[Group1] = "Iran - Avestan";
+
+ key <AB01> { [ U10B30, U10B32 ] }; // 𐬰 𐬲
+ key <AB02> { [ U10B11, U10B12 ] }; // 𐬑 𐬒
+ key <AB03> { [ U10B17, UE102 ] }; // 𐬗 
+ key <AB04> { [ U10B2C, U10B13 ] }; // 𐬬 𐬓
+ key <AB05> { [ U10B20, U10B21 ] }; // 𐬠 𐬡
+ key <AB06> { [ U10B25, U10B27 ] }; // 𐬥 𐬧
+ key <AB07> { [ U10B28, U10B29 ] }; // 𐬨 𐬩
+ key <AB08> { [ U10B3C, U10B39 ] }; // 𐬼 𐬹
+ key <AB09> { [ U10B3E, U10B3D ] }; // 𐬾 𐬽
+ key <AB10> { [ U10B3F, periodcentered ] }; // 𐬿 ·
+
+ key <AC01> { [ U10B00, U10B01 ] }; // 𐬀 𐬁
+ key <AC02> { [ U10B2F, U10B31 ] }; // 𐬯 𐬱
+ key <AC03> { [ U10B1B, U10B1C ] }; // 𐬛 𐬜
+ key <AC04> { [ U10B1F, U10B16 ] }; // 𐬟 𐬖
+ key <AC05> { [ U10B14, U10B15 ] }; // 𐬔 𐬕
+ key <AC06> { [ U10B35, UE100 ] }; // 𐬵 
+ key <AC07> { [ U10B18, U10B24 ] }; // 𐬘 𐬤
+ key <AC08> { [ U10B10, UE101 ] }; // 𐬐 
+ key <AC09> { [ U10B2E, UE103 ] }; // 𐬮 
+ key <AC10> { [ U10B3B, U10B3A ] }; // 𐬻 𐬺
+ key <AC11> { [ U10B1D ] }; // 𐬝
+
+ key <AD01> { [ U10B22, U10B23 ] }; // 𐬢 𐬣
+ key <AD02> { [ U10B33, U10B34 ] }; // 𐬳 𐬴
+ key <AD03> { [ U10B08, U10B09 ] }; // 𐬈 𐬉
+ key <AD04> { [ U10B2D, U10B26 ] }; // 𐬭 𐬦
+ key <AD05> { [ U10B19, U10B1A ] }; // 𐬙 𐬚
+ key <AD06> { [ U10B2B, U10B2A ] }; // 𐬫 𐬪
+ key <AD07> { [ U10B0E, U10B0F ] }; // 𐬎 𐬏
+ key <AD08> { [ U10B0C, U10B0D ] }; // 𐬌 𐬍
+ key <AD09> { [ U10B0A, U10B0B ] }; // 𐬊 𐬋
+ key <AD10> { [ U10B1E ] }; // 𐬞
+ key <AD11> { [ U10B06, U10B07 ] }; // 𐬆 𐬇
+ key <AD12> { [ U10B02, U10B03 ] }; // 𐬂 𐬃
+
+ key <AE01> { [ U10B78 ] }; // 𐭸
+ key <AE02> { [ U10B79 ] }; // 𐭹
+ key <AE03> { [ U10B7A ] }; // 𐭺
+ key <AE04> { [ U10B7B ] }; // 𐭻
+ key <AE05> { [ U10B7C ] }; // 𐭼
+ key <AE06> { [ U10B7D ] }; // 𐭽
+ key <AE07> { [ U10B7E ] }; // 𐭾
+ key <AE08> { [ U10B7F ] }; // 𐭿
+
+ key <BKSL> { [ U10B04, U10B05 ] }; // 𐬄 𐬅
+ key <LSGT> { [ U10B04, U10B05 ] }; // 𐬄 𐬅
+};
diff --git a/xorg-server/xkeyboard-config/symbols/level3 b/xorg-server/xkeyboard-config/symbols/level3
index 599443002..20a19a72e 100644
--- a/xorg-server/xkeyboard-config/symbols/level3
+++ b/xorg-server/xkeyboard-config/symbols/level3
@@ -7,7 +7,7 @@
default partial modifier_keys
xkb_symbols "ralt_switch" {
key <RALT> {
- type[Group1]="ONE_LEVEL",
+ type[Group1]="TWO_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
modifier_map Mod5 { ISO_Level3_Shift };
diff --git a/xorg-server/xkeyboard-config/symbols/macintosh_vndr/makefile b/xorg-server/xkeyboard-config/symbols/macintosh_vndr/makefile
new file mode 100644
index 000000000..0c54d7bdd
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/macintosh_vndr/makefile
@@ -0,0 +1,16 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\macintosh_vndr
+
+dist_symbols_DATA = \
+apple ch de dk \
+fi fr \
+gb is it jp \
+latam nl no pt \
+se us
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/symbols/makefile b/xorg-server/xkeyboard-config/symbols/makefile
new file mode 100644
index 000000000..6fdc02f24
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/makefile
@@ -0,0 +1,56 @@
+SUBDIRS = digital_vndr fujitsu_vndr hp_vndr macintosh_vndr nec_vndr nokia_vndr sgi_vndr sony_vndr sun_vndr xfree68_vndr
+
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+THISDIR=symbols
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\$(THISDIR)
+
+dist_symbols_DATA = \
+ad af al \
+am apl ara \
+at az \
+ba bd be \
+bg br brai \
+bt bw by \
+ca cd \
+ch cn cz \
+de dk \
+ee es et epo \
+fi fo fr \
+gb ge gh gn \
+gr hr hu \
+ie il in iq \
+ir is it jp \
+ke kg kh \
+kr kz \
+la latam latin \
+lk lt lv \
+ma mao me \
+mk ml mm \
+mn mt mv \
+ng nl no np \
+pc ph pk pl pt \
+ro rs ru \
+se si sk sn \
+sy th \
+terminate \
+tj tm tr tw tz \
+ua us uz vn \
+za \
+altwin capslock compose ctrl empty eurosign rupeesign group inet \
+keypad kpdl level3 level5 nbsp olpc shift srvr_ctrl typo
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+load_makefile $(SUBDIRS:%=%\makefile MAKESERVER=0 DEBUG=$(DEBUG);)
+
+extrastuff: $(SUBDIRS:%=%\all)
+
+include ..\xkbrules.mak
+
+$(DESTDIR)\cd: cd.in
+ copy $< $@
+
diff --git a/xorg-server/xkeyboard-config/symbols/mn b/xorg-server/xkeyboard-config/symbols/mn
index a838bd5e0..462a953e8 100644
--- a/xorg-server/xkeyboard-config/symbols/mn
+++ b/xorg-server/xkeyboard-config/symbols/mn
@@ -1,82 +1,82 @@
-// based on:
-// Mongolian standard keyboard
-// Author Sanlig Badral <badral@chinggis.com>
-// 2002/12/7 Version 1.0
-
-partial default alphanumeric_keys
-xkb_symbols "basic" {
-
- name[Group1]= "Mongolia";
-
- key <TLDE> { [ equal, plus, degree ] };
- key <AE01> { [ 1, numerosign, multiply ] };
- key <AE02> { [ 2, minus, division ] };
- key <AE03> { [ 3, quotedbl, plusminus ] };
- key <AE04> { [ 4, U20ae, notsign ] }; // Tugrik sign
- key <AE05> { [ 5, colon, NoSymbol ] };
- key <AE06> { [ 6, period, notequal ] };
- key <AE07> { [ 7, underscore, ampersand ] };
- key <AE08> { [ 8, comma, asterisk ] };
- key <AE09> { [ 9, percent, bracketleft ] };
- key <AE10> { [ 0, question, bracketright ] };
- key <AE11> { [ Cyrillic_ie, Cyrillic_IE, X ] };
- key <AE12> { [ Cyrillic_shcha, Cyrillic_SHCHA, L ] };
-
- key <AD01> { [ Cyrillic_ef, Cyrillic_EF, apostrophe ] };
- key <AD02> { [ Cyrillic_tse, Cyrillic_TSE, grave ] };
- key <AD03> { [ Cyrillic_u, Cyrillic_U, EuroSign ] };
- key <AD04> { [ Cyrillic_zhe, Cyrillic_ZHE, registered ] };
- key <AD05> { [ Cyrillic_e, Cyrillic_E, trademark ] };
- key <AD06> { [ Cyrillic_en, Cyrillic_EN, yen ] };
- key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE, doublelowquotemark ] };
- key <AD08> { [ Cyrillic_sha, Cyrillic_SHA, leftdoublequotemark ] };
- key <AD09> { [ Cyrillic_u_straight,Cyrillic_U_straight,rightdoublequotemark] };
- key <AD10> { [ Cyrillic_ze, Cyrillic_ZE, NoSymbol ] };
- key <AD11> { [ Cyrillic_ka, Cyrillic_KA, braceleft ] };
- key <AD12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, braceright ] };
-
- key <AC01> { [ Cyrillic_shorti, Cyrillic_SHORTI, mu ] };
- key <AC02> { [ Cyrillic_yeru, Cyrillic_YERU, sterling ] };
- key <AC03> { [ Cyrillic_be, Cyrillic_BE, dollar ] };
- key <AC04> { [ Cyrillic_o_bar, Cyrillic_O_bar, rightdoublequotemark ] };
- key <AC05> { [ Cyrillic_a, Cyrillic_A, Cyrillic_yeru ] };
- key <AC06> { [ Cyrillic_ha, Cyrillic_HA, Cyrillic_YERU ] };
- key <AC07> { [ Cyrillic_er, Cyrillic_ER, Cyrillic_e ] };
- key <AC08> { [ Cyrillic_o, Cyrillic_O, Cyrillic_E ] };
- key <AC09> { [ Cyrillic_el, Cyrillic_EL, numerosign ] };
- key <AC10> { [ Cyrillic_de, Cyrillic_DE, section ] };
- key <AC11> { [ Cyrillic_pe, Cyrillic_PE, ellipsis ] };
- key <BKSL> { [ exclam, bar, bar ] };
-
- key <LSGT> { [ parenleft, parenright, NoSymbol ] };
- key <AB01> { [ Cyrillic_ya, Cyrillic_YA, emdash ] };
- key <AB02> { [ Cyrillic_che, Cyrillic_CHE, endash ] };
- key <AB03> { [ Cyrillic_io, Cyrillic_IO, copyright ] };
- key <AB04> { [ Cyrillic_es, Cyrillic_ES, NoSymbol ] };
- key <AB05> { [ Cyrillic_em, Cyrillic_EM, NoSymbol ] };
- key <AB06> { [ Cyrillic_i, Cyrillic_I, less ] };
- key <AB07> { [ Cyrillic_te, Cyrillic_TE, greater ] };
- key <AB08> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN, guillemotleft ] };
- key <AB09> { [ Cyrillic_ve, Cyrillic_VE, guillemotright ] };
- key <AB10> { [ Cyrillic_yu, Cyrillic_YU, backslash ] };
-
- // End alphanumeric section
-
- key <SPCE> { [ space, space, nobreakspace ] };
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "olpc" {
-
-// Contact: Walter Bender <walter@laptop.org>
-
- include "mn(basic)"
-
- key <AE07> { [ 7, semicolon, ampersand ] };
-
- key <BKSL> { [ backslash, bar, exclam ] };
-
- include "group(olpc)"
-};
+// based on:
+// Mongolian standard keyboard
+// Author Sanlig Badral <badral@chinggis.com>
+// 2002/12/7 Version 1.0
+
+partial default alphanumeric_keys
+xkb_symbols "basic" {
+
+ name[Group1]= "Mongolia";
+
+ key <TLDE> { [ equal, plus, degree ] };
+ key <AE01> { [ 1, numerosign, multiply ] };
+ key <AE02> { [ 2, minus, division ] };
+ key <AE03> { [ 3, quotedbl, plusminus ] };
+ key <AE04> { [ 4, U20ae, notsign ] }; // Tugrik sign
+ key <AE05> { [ 5, colon, NoSymbol ] };
+ key <AE06> { [ 6, period, notequal ] };
+ key <AE07> { [ 7, underscore, ampersand ] };
+ key <AE08> { [ 8, comma, asterisk ] };
+ key <AE09> { [ 9, percent, bracketleft ] };
+ key <AE10> { [ 0, question, bracketright ] };
+ key <AE11> { [ Cyrillic_ie, Cyrillic_IE, X ] };
+ key <AE12> { [ Cyrillic_shcha, Cyrillic_SHCHA, L ] };
+
+ key <AD01> { [ Cyrillic_ef, Cyrillic_EF, apostrophe ] };
+ key <AD02> { [ Cyrillic_tse, Cyrillic_TSE, grave ] };
+ key <AD03> { [ Cyrillic_u, Cyrillic_U, EuroSign ] };
+ key <AD04> { [ Cyrillic_zhe, Cyrillic_ZHE, registered ] };
+ key <AD05> { [ Cyrillic_e, Cyrillic_E, trademark ] };
+ key <AD06> { [ Cyrillic_en, Cyrillic_EN, yen ] };
+ key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE, doublelowquotemark ] };
+ key <AD08> { [ Cyrillic_sha, Cyrillic_SHA, leftdoublequotemark ] };
+ key <AD09> { [ Cyrillic_u_straight,Cyrillic_U_straight,rightdoublequotemark] };
+ key <AD10> { [ Cyrillic_ze, Cyrillic_ZE, NoSymbol ] };
+ key <AD11> { [ Cyrillic_ka, Cyrillic_KA, braceleft ] };
+ key <AD12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, braceright ] };
+
+ key <AC01> { [ Cyrillic_shorti, Cyrillic_SHORTI, mu ] };
+ key <AC02> { [ Cyrillic_yeru, Cyrillic_YERU, sterling ] };
+ key <AC03> { [ Cyrillic_be, Cyrillic_BE, dollar ] };
+ key <AC04> { [ Cyrillic_o_bar, Cyrillic_O_bar, rightdoublequotemark ] };
+ key <AC05> { [ Cyrillic_a, Cyrillic_A, Cyrillic_yeru ] };
+ key <AC06> { [ Cyrillic_ha, Cyrillic_HA, Cyrillic_YERU ] };
+ key <AC07> { [ Cyrillic_er, Cyrillic_ER, Cyrillic_e ] };
+ key <AC08> { [ Cyrillic_o, Cyrillic_O, Cyrillic_E ] };
+ key <AC09> { [ Cyrillic_el, Cyrillic_EL, numerosign ] };
+ key <AC10> { [ Cyrillic_de, Cyrillic_DE, section ] };
+ key <AC11> { [ Cyrillic_pe, Cyrillic_PE, ellipsis ] };
+ key <BKSL> { [ exclam, bar, bar ] };
+
+ key <LSGT> { [ parenleft, parenright, NoSymbol ] };
+ key <AB01> { [ Cyrillic_ya, Cyrillic_YA, emdash ] };
+ key <AB02> { [ Cyrillic_che, Cyrillic_CHE, endash ] };
+ key <AB03> { [ Cyrillic_io, Cyrillic_IO, copyright ] };
+ key <AB04> { [ Cyrillic_es, Cyrillic_ES, NoSymbol ] };
+ key <AB05> { [ Cyrillic_em, Cyrillic_EM, NoSymbol ] };
+ key <AB06> { [ Cyrillic_i, Cyrillic_I, less ] };
+ key <AB07> { [ Cyrillic_te, Cyrillic_TE, greater ] };
+ key <AB08> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN, guillemotleft ] };
+ key <AB09> { [ Cyrillic_ve, Cyrillic_VE, guillemotright ] };
+ key <AB10> { [ Cyrillic_yu, Cyrillic_YU, backslash ] };
+
+ // End alphanumeric section
+
+ key <SPCE> { [ space, space, nobreakspace ] };
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "olpc" {
+
+// Contact: Walter Bender <walter@laptop.org>
+
+ include "mn(basic)"
+
+ key <AE07> { [ 7, semicolon, ampersand ] };
+
+ key <BKSL> { [ backslash, bar, exclam ] };
+
+ include "group(olpc)"
+};
diff --git a/xorg-server/xkeyboard-config/symbols/nec_vndr/makefile b/xorg-server/xkeyboard-config/symbols/nec_vndr/makefile
new file mode 100644
index 000000000..6ab523a2b
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/nec_vndr/makefile
@@ -0,0 +1,12 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\nec_vndr
+
+dist_symbols_DATA = \
+jp
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/symbols/nokia_vndr/makefile b/xorg-server/xkeyboard-config/symbols/nokia_vndr/makefile
new file mode 100644
index 000000000..f3719bbac
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/nokia_vndr/makefile
@@ -0,0 +1,14 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\nokia_vndr
+
+dist_symbols_DATA = \
+rx-44 \
+rx-51 \
+su-8w
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/symbols/np b/xorg-server/xkeyboard-config/symbols/np
index e139b0ff7..9cb14c873 100644
--- a/xorg-server/xkeyboard-config/symbols/np
+++ b/xorg-server/xkeyboard-config/symbols/np
@@ -1,121 +1,121 @@
-// based on a keyboard map from an 'xkb/symbols/dev' file
-
-partial default alphanumeric_keys
-xkb_symbols "basic" {
-
- name[Group1]= "Nepal";
-
-// `,1,2,3,4,5,6,7,8,9,0,-,=
-
- key <TLDE> { [ 0x100093D,0x100093C ] };
- key <AE01> { [ 0x1000967 ] };
- key <AE02> { [ 0x1000968 ] };
- key <AE03> { [ 0x1000969 ] };
- key <AE04> { [ 0x100096A ] };
- key <AE05> { [ 0x100096B ] };
- key <AE06> { [ 0x100096C ] };
- key <AE07> { [ 0x100096D ] };
- key <AE08> { [ 0x100096e ] };
- key <AE09> { [ 0x100096F ] };
- key <AE10> { [ 0x1000966,0x1000970 ] };
- key <AE11> { [ minus, 0x1000952 ] };
- key <AE12> { [ equal, 0x100200C ] };
-
-// q,w,e,r,t,y,u,i,o,p,[,]
-
- key <AD01> { [ 0x100091F, 0x1000920 ] };
- key <AD02> { [ 0x100094C, 0x1000914 ] };
- key <AD03> { [ 0x1000947, 0x1000948 ] };
- key <AD04> { [ 0x1000930, 0x1000943 ] };
- key <AD05> { [ 0x1000924, 0x1000925 ] };
- key <AD06> { [ 0x100092F, 0x100091E ] };
- key <AD07> { [ 0x1000941, 0x1000942 ] };
- key <AD08> { [ 0x100093F, 0x1000940 ] };
- key <AD09> { [ 0x100094B, 0x1000913 ] };
- key <AD10> { [ 0x100092A, 0x100092B ] };
- key <AD11> { [ 0x1000907, 0x1000908 ] };
- key <AD12> { [ 0x100090F, 0x1000910 ] };
-
-// a,s,d,f,g,h,j,k,l,;,',Backslash
- key <AC01> { [ 0x100093E, 0x1000906 ] };
- key <AC02> { [ 0x1000938, 0x1000936 ] };
- key <AC03> { [ 0x1000926, 0x1000927 ] };
- key <AC04> { [ 0x1000909, 0x100090A ] };
- key <AC05> { [ 0x1000917, 0x1000918 ] };
- key <AC06> { [ 0x1000939, 0x1000905 ] };
- key <AC07> { [ 0x100091C, 0x100091D ] };
- key <AC08> { [ 0x1000915, 0x1000916 ] };
- key <AC09> { [ 0x1000932, 0x1000933 ] };
- key <AC10> { [ semicolon, colon ] };
- key <AC11> { [ quoteright, quotedbl ] };
- key <BKSL> { [ 0x1000950, 0x1000903 ] };
-
-
-// z,x,c,v,b,n,m,,,.,/
- key <AB01> { [ 0x1000937, 0x100090B ] };
- key <AB02> { [ 0x1000921, 0x1000922 ] };
- key <AB03> { [ 0x100091B, 0x100091A ] };
- key <AB04> { [ 0x1000935, 0x1000901 ] };
- key <AB05> { [ 0x100092C, 0x100092D ] };
- key <AB06> { [ 0x1000928, 0x1000923 ] };
- key <AB07> { [ 0x100092E, 0x1000902 ] };
- key <AB08> { [ comma, 0x1000919 ] };
- key <AB09> { [ 0x1000964, 0x1000965 ] };
- key <AB10> { [ 0x100094D, question ] };
-};
-
-partial alphanumeric_keys
-
-xkb_symbols "olpc" {
-// Contact: Walter Bender <walter@laptop.org>
-
- include "np"
- key <TLDE> { [ 0x100091E, 0x1000965 ] }; // NYA; double danda
- key <AE01> { [ 0x1000967, 0x10FFFFD ] }; // Nepali digit one; U091C+U094D+U091E
- key <AE02> { [ 0x1000968, 0x1000908 ] }; // Nepali digit two; key <AE03> { [ 0x1000969, 0x1000918 ] }; // Nepali digit three;
- key <AE04> { [ 0x100096A, 0x10FFFFC ] }; // Nepali digit four; U0926+U094D+U0927
- key <AE05> { [ 0x100096B, 0x100091B ] }; // Nepali digit five
- key <AE06> { [ 0x100096C, 0x100091F ] }; // Nepali digit six
- key <AE07> { [ 0x100096D, 0x1000920 ] }; // Nepali digit seven
- key <AE08> { [ 0x100096e, 0x1000921 ] }; // Nepali digit eight
- key <AE09> { [ 0x100096F, 0x1000922 ] }; // Nepali digit nine
- key <AE10> { [ 0x1000966, 0x1000923 ] }; // Nepali digit zero
- key <AE11> { [ 0x1000914, 0x1000913 ] }; // O, AU
- key <AE12> { [ 0x100200C, 0x1000902 ] }; // ZERO-WIDTH-NON-JOINER (ZWNJ); SIGN ANUSVARA
- key <BKSL> { [ 0x100094D, 0x100200D ] }; // SIGN VIRAMA; ZERO-WIDTH-JOINER (ZWJ)
- key <AD01> { [ 0x10FFFFB, 0x10FFFFA ] }; // U0924+U094D+U0930; U0924+U094D+U0924
- key <AD02> { [ 0x1000927, 0x10FFFF9 ] }; // DHA; U0921+U094D+U0922
- key <AD03> { [ 0x100092D, 0x1000910 ] }; // BHA, AI
- key <AD04> { [ 0x100091A, 0x10FFFF8 ] }; // CA; U0926+U094D+U0935
- key <AD05> { [ 0x1000924, 0x10FFFF7 ] }; // TA; U091F+U094D+U091F
- key <AD06> { [ 0x1000925, 0x10FFFF6 ] }; // THA; U0920+U094D+U0920
- key <AD07> { [ 0x1000917, 0x100090A ] }; // GA, UU
- key <AD08> { [ 0x1000937, 0x10FFFF5 ] }; // SSA; U0915+U094D+U0937
- key <AD09> { [ 0x100092F, 0x1000907 ] }; // YA, I
- key <AD10> { [ 0x1000909, 0x100090F ] }; // U, E
- key <AD11> { [ 0x10FFFF4, 0x1000943 ] }; // U0928+U094D+ZWJ; VOWEL SIGN VOCALIC R
- key <AD12> { [ 0x1000947, 0x1000948 ] }; // SIGN E; SIGN AI
- key <AC01> { [ 0x100092C, 0x1000906 ] }; // BA, AA
- key <AC02> { [ 0x1000915, 0x10FFFF3 ] }; // KA; U0919+U094D+U0915
- key <AC03> { [ 0x100092E, 0x10FFFF2 ] }; // MA; U0919+U094D+U0917
- key <AC04> { [ 0x100093E, 0x1000901 ] }; // CANDRABINDU, VOWEL SIGN AA
- key <AC05> { [ 0x1000928, 0x10FFFF1 ] }; // NA; U0926+U094D+U0926
- key <AC06> { [ 0x100091C, 0x100091D ] }; // JA, JHA
- key <AC07> { [ 0x1000935, 0x100094B ] }; // VA, VOWEL SIGN O
- key <AC08> { [ 0x100092A, 0x100092B ] }; // PA, PHA
- key <AC09> { [ 0x100093F, 0x1000940 ] }; // VOWEL SIGN I, VOWEL SIGN II
- key <AC10> { [ 0x1000938, 0x10FFFF0 ] }; // SA; U091F+U094D+U0920
- key <AC11> { [ 0x1000941, 0x1000942 ] }; // VOWEL SIGN U, VOWEL SIGN UU
- key <AB01> { [ 0x1000936, 0x10FFFEF ] }; // SHA; U0915+U094D+U0915
- key <AB02> { [ 0x1000939, 0x10FFFEE ] }; // HA; U0939+U094D+U092F
- key <AB03> { [ 0x1000905, 0x100090B ] }; // A; U0909+U090B
- key <AB04> { [ 0x1000916, 0x1000950 ] }; // KHA, OM
- key <AB05> { [ 0x1000926, 0x100094C ] }; // DA, VOWEL SIGN AU
- key <AB06> { [ 0x1000932, 0x10FFFED ] }; // LA; U0926+U094D+U092F
- key <AB07> { [ 0x1000903, 0x10FFFEC ] }; // SIGN VISARGA; U0921+U094D+U0921
- key <AB08> { [ 0x100093D, 0x1000919 ] }; // SIGN AVAGRHA; NGA
- key <AB09> { [ 0x1000964, 0x10FFFEB ] }; // DANDA; U0936+U094D+U0930
- key <AB10> { [ 0x1000930, 0x10FFFEA ] }; // RA; U0930+U0941
-
- include "group(olpc)"
-};
+// based on a keyboard map from an 'xkb/symbols/dev' file
+
+partial default alphanumeric_keys
+xkb_symbols "basic" {
+
+ name[Group1]= "Nepal";
+
+// `,1,2,3,4,5,6,7,8,9,0,-,=
+
+ key <TLDE> { [ 0x100093D,0x100093C ] };
+ key <AE01> { [ 0x1000967 ] };
+ key <AE02> { [ 0x1000968 ] };
+ key <AE03> { [ 0x1000969 ] };
+ key <AE04> { [ 0x100096A ] };
+ key <AE05> { [ 0x100096B ] };
+ key <AE06> { [ 0x100096C ] };
+ key <AE07> { [ 0x100096D ] };
+ key <AE08> { [ 0x100096e ] };
+ key <AE09> { [ 0x100096F ] };
+ key <AE10> { [ 0x1000966,0x1000970 ] };
+ key <AE11> { [ minus, 0x1000952 ] };
+ key <AE12> { [ equal, 0x100200C ] };
+
+// q,w,e,r,t,y,u,i,o,p,[,]
+
+ key <AD01> { [ 0x100091F, 0x1000920 ] };
+ key <AD02> { [ 0x100094C, 0x1000914 ] };
+ key <AD03> { [ 0x1000947, 0x1000948 ] };
+ key <AD04> { [ 0x1000930, 0x1000943 ] };
+ key <AD05> { [ 0x1000924, 0x1000925 ] };
+ key <AD06> { [ 0x100092F, 0x100091E ] };
+ key <AD07> { [ 0x1000941, 0x1000942 ] };
+ key <AD08> { [ 0x100093F, 0x1000940 ] };
+ key <AD09> { [ 0x100094B, 0x1000913 ] };
+ key <AD10> { [ 0x100092A, 0x100092B ] };
+ key <AD11> { [ 0x1000907, 0x1000908 ] };
+ key <AD12> { [ 0x100090F, 0x1000910 ] };
+
+// a,s,d,f,g,h,j,k,l,;,',Backslash
+ key <AC01> { [ 0x100093E, 0x1000906 ] };
+ key <AC02> { [ 0x1000938, 0x1000936 ] };
+ key <AC03> { [ 0x1000926, 0x1000927 ] };
+ key <AC04> { [ 0x1000909, 0x100090A ] };
+ key <AC05> { [ 0x1000917, 0x1000918 ] };
+ key <AC06> { [ 0x1000939, 0x1000905 ] };
+ key <AC07> { [ 0x100091C, 0x100091D ] };
+ key <AC08> { [ 0x1000915, 0x1000916 ] };
+ key <AC09> { [ 0x1000932, 0x1000933 ] };
+ key <AC10> { [ semicolon, colon ] };
+ key <AC11> { [ quoteright, quotedbl ] };
+ key <BKSL> { [ 0x1000950, 0x1000903 ] };
+
+
+// z,x,c,v,b,n,m,,,.,/
+ key <AB01> { [ 0x1000937, 0x100090B ] };
+ key <AB02> { [ 0x1000921, 0x1000922 ] };
+ key <AB03> { [ 0x100091B, 0x100091A ] };
+ key <AB04> { [ 0x1000935, 0x1000901 ] };
+ key <AB05> { [ 0x100092C, 0x100092D ] };
+ key <AB06> { [ 0x1000928, 0x1000923 ] };
+ key <AB07> { [ 0x100092E, 0x1000902 ] };
+ key <AB08> { [ comma, 0x1000919 ] };
+ key <AB09> { [ 0x1000964, 0x1000965 ] };
+ key <AB10> { [ 0x100094D, question ] };
+};
+
+partial alphanumeric_keys
+
+xkb_symbols "olpc" {
+// Contact: Walter Bender <walter@laptop.org>
+
+ include "np"
+ key <TLDE> { [ 0x100091E, 0x1000965 ] }; // NYA; double danda
+ key <AE01> { [ 0x1000967, 0x10FFFFD ] }; // Nepali digit one; U091C+U094D+U091E
+ key <AE02> { [ 0x1000968, 0x1000908 ] }; // Nepali digit two; key <AE03> { [ 0x1000969, 0x1000918 ] }; // Nepali digit three;
+ key <AE04> { [ 0x100096A, 0x10FFFFC ] }; // Nepali digit four; U0926+U094D+U0927
+ key <AE05> { [ 0x100096B, 0x100091B ] }; // Nepali digit five
+ key <AE06> { [ 0x100096C, 0x100091F ] }; // Nepali digit six
+ key <AE07> { [ 0x100096D, 0x1000920 ] }; // Nepali digit seven
+ key <AE08> { [ 0x100096e, 0x1000921 ] }; // Nepali digit eight
+ key <AE09> { [ 0x100096F, 0x1000922 ] }; // Nepali digit nine
+ key <AE10> { [ 0x1000966, 0x1000923 ] }; // Nepali digit zero
+ key <AE11> { [ 0x1000914, 0x1000913 ] }; // O, AU
+ key <AE12> { [ 0x100200C, 0x1000902 ] }; // ZERO-WIDTH-NON-JOINER (ZWNJ); SIGN ANUSVARA
+ key <BKSL> { [ 0x100094D, 0x100200D ] }; // SIGN VIRAMA; ZERO-WIDTH-JOINER (ZWJ)
+ key <AD01> { [ 0x10FFFFB, 0x10FFFFA ] }; // U0924+U094D+U0930; U0924+U094D+U0924
+ key <AD02> { [ 0x1000927, 0x10FFFF9 ] }; // DHA; U0921+U094D+U0922
+ key <AD03> { [ 0x100092D, 0x1000910 ] }; // BHA, AI
+ key <AD04> { [ 0x100091A, 0x10FFFF8 ] }; // CA; U0926+U094D+U0935
+ key <AD05> { [ 0x1000924, 0x10FFFF7 ] }; // TA; U091F+U094D+U091F
+ key <AD06> { [ 0x1000925, 0x10FFFF6 ] }; // THA; U0920+U094D+U0920
+ key <AD07> { [ 0x1000917, 0x100090A ] }; // GA, UU
+ key <AD08> { [ 0x1000937, 0x10FFFF5 ] }; // SSA; U0915+U094D+U0937
+ key <AD09> { [ 0x100092F, 0x1000907 ] }; // YA, I
+ key <AD10> { [ 0x1000909, 0x100090F ] }; // U, E
+ key <AD11> { [ 0x10FFFF4, 0x1000943 ] }; // U0928+U094D+ZWJ; VOWEL SIGN VOCALIC R
+ key <AD12> { [ 0x1000947, 0x1000948 ] }; // SIGN E; SIGN AI
+ key <AC01> { [ 0x100092C, 0x1000906 ] }; // BA, AA
+ key <AC02> { [ 0x1000915, 0x10FFFF3 ] }; // KA; U0919+U094D+U0915
+ key <AC03> { [ 0x100092E, 0x10FFFF2 ] }; // MA; U0919+U094D+U0917
+ key <AC04> { [ 0x100093E, 0x1000901 ] }; // CANDRABINDU, VOWEL SIGN AA
+ key <AC05> { [ 0x1000928, 0x10FFFF1 ] }; // NA; U0926+U094D+U0926
+ key <AC06> { [ 0x100091C, 0x100091D ] }; // JA, JHA
+ key <AC07> { [ 0x1000935, 0x100094B ] }; // VA, VOWEL SIGN O
+ key <AC08> { [ 0x100092A, 0x100092B ] }; // PA, PHA
+ key <AC09> { [ 0x100093F, 0x1000940 ] }; // VOWEL SIGN I, VOWEL SIGN II
+ key <AC10> { [ 0x1000938, 0x10FFFF0 ] }; // SA; U091F+U094D+U0920
+ key <AC11> { [ 0x1000941, 0x1000942 ] }; // VOWEL SIGN U, VOWEL SIGN UU
+ key <AB01> { [ 0x1000936, 0x10FFFEF ] }; // SHA; U0915+U094D+U0915
+ key <AB02> { [ 0x1000939, 0x10FFFEE ] }; // HA; U0939+U094D+U092F
+ key <AB03> { [ 0x1000905, 0x100090B ] }; // A; U0909+U090B
+ key <AB04> { [ 0x1000916, 0x1000950 ] }; // KHA, OM
+ key <AB05> { [ 0x1000926, 0x100094C ] }; // DA, VOWEL SIGN AU
+ key <AB06> { [ 0x1000932, 0x10FFFED ] }; // LA; U0926+U094D+U092F
+ key <AB07> { [ 0x1000903, 0x10FFFEC ] }; // SIGN VISARGA; U0921+U094D+U0921
+ key <AB08> { [ 0x100093D, 0x1000919 ] }; // SIGN AVAGRHA; NGA
+ key <AB09> { [ 0x1000964, 0x10FFFEB ] }; // DANDA; U0936+U094D+U0930
+ key <AB10> { [ 0x1000930, 0x10FFFEA ] }; // RA; U0930+U0941
+
+ include "group(olpc)"
+};
diff --git a/xorg-server/xkeyboard-config/symbols/ro b/xorg-server/xkeyboard-config/symbols/ro
index f37a60dac..44660ad1e 100644
--- a/xorg-server/xkeyboard-config/symbols/ro
+++ b/xorg-server/xkeyboard-config/symbols/ro
@@ -1,255 +1,255 @@
-//
-// Complete set of Romanian keyboards as described in the new Romanian standard
-// SR 13392:2004 adopted in December 2004 by ASRO, "Asociatia de Standardizare
-// din Romania".
-//
-// The default mapping is the RO_US/Programmers layout because of the lack of
-// Romanian hardware keyboards. The primary standard layout is implemented as
-// the "std" variant. If you're determined to get cedillas as in ISO-8859-2
-// (and not commabelow accents as in ISO-8859-16) use the defined variants
-// "cedilla" for the default layout or "std_cedilla" for the standard one.
-// Pre-Vista MS compatible layout included (use the "winkeys" variant).
-//
-// Created by Cristian Gafton, <gafton@redhat.com> (C) 2000
-// Modified by Marius Andreiana, <mandreiana@yahoo.com> (C) 2001
-// Completed by Misu Moldovan, <dumol@gnome.ro> (C) 2001, 2004-2008.
-// v 1.4
-
-
-partial default alphanumeric_keys
-xkb_symbols "basic" {
-// This RO_US/Programmers layout, although the secondary layout in the
-// Romanian standard, has always been the "de facto" standard in the
-// Linux/Unix world. It is implemented here as the default layout and it's
-// fully compatible with an US keyboard (Euro on AltGr+5 doesn't count).
-
- include "us"
-
- name[Group1]="Romania";
-
- key <AE01> { [ 1, exclam, dead_tilde ] };
- key <AE02> { [ 2, at, dead_caron ] };
- key <AE03> { [ 3, numbersign, dead_circumflex ] };
- key <AE04> { [ 4, dollar, dead_breve ] };
- key <AE05> { [ 5, percent, dead_abovering ] };
- key <AE06> { [ 6, asciicircum, dead_ogonek ] };
- key <AE07> { [ 7, ampersand, dead_grave ] };
- key <AE08> { [ 8, asterisk, dead_abovedot ] };
- key <AE09> { [ 9, parenleft, dead_acute ] };
- key <AE10> { [ 0, parenright, dead_doubleacute ] };
- key <AE11> { [ minus, underscore, dead_diaeresis, endash ] };
- key <AE12> { [ equal, plus, dead_cedilla, plusminus ] };
- key <AD01> { [ q, Q, acircumflex, Acircumflex ] };
- key <AD02> { [ w, W, ssharp ] };
- key <AD03> { [ e, E, EuroSign ] };
- key <AD05> { [ t, T, 0x100021b, 0x100021a ] };
- key <AD08> { [ i, I, icircumflex, Icircumflex ] };
- key <AD10> { [ p, P, section ] };
- key <AD11> { [ bracketleft, braceleft, doublelowquotemark ] };
- key <AD12> { [ bracketright, braceright, rightdoublequotemark ] };
- key <AC01> { [ a, A, abreve, Abreve ] };
- key <AC02> { [ s, S, 0x1000219, 0x1000218 ] };
- key <AC03> { [ d, D, dstroke, Dstroke ] };
- key <AC09> { [ l, L, lstroke, Lstroke ] };
- key <LSGT> { [ backslash, bar ] };
- key <AB03> { [ c, C, copyright ] };
- key <AB08> { [ comma, less, guillemotleft ] };
- key <AB09> { [ period, greater, guillemotright ] };
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "cedilla" {
- // Variant of the basic layout with cedillas.
- // Implements S and T with cedilllas as in ISO-8859-2.
- // Included for compatibility reasons (this used to be the def variant).
-
- include "ro(basic)"
-
- name[Group1]="Romania - Cedilla";
-
- key <AD05> { [ t, T, tcedilla, Tcedilla ] };
- key <AC02> { [ s, S, scedilla, Scedilla ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "std" {
- // Primary layout in the new Romanian standard.
- // Implemented here as a variant because of the lack of hardware
- // Romanian keyboards and because of the predilection of Romanian
- // X users towards the secondary layout from the new standard.
-
- include "us"
-
- name[Group1]="Romania - Standard";
-
- key <TLDE> { [ doublelowquotemark, rightdoublequotemark, grave, asciitilde ] };
- key <AE01> { [ 1, exclam, dead_tilde ] };
- key <AE02> { [ 2, at, dead_caron ] };
- key <AE03> { [ 3, numbersign, dead_circumflex ] };
- key <AE04> { [ 4, dollar, dead_breve ] };
- key <AE05> { [ 5, percent, dead_abovering ] };
- key <AE06> { [ 6, asciicircum, dead_ogonek ] };
- key <AE07> { [ 7, ampersand, dead_grave ] };
- key <AE08> { [ 8, asterisk, dead_abovedot ] };
- key <AE09> { [ 9, parenleft, dead_acute ] };
- key <AE10> { [ 0, parenright, dead_doubleacute ] };
- key <AE11> { [ minus, underscore, dead_diaeresis, endash ] };
- key <AE12> { [ equal, plus, dead_cedilla, plusminus ] };
- key <AD03> { [ e, E, EuroSign ] };
- key <AD10> { [ p, P, section ] };
- key <AD11> { [ abreve, Abreve, bracketleft, braceleft ] };
- key <AD12> { [ icircumflex, Icircumflex, bracketright, braceright ] };
- key <BKSL> { [ acircumflex, Acircumflex, backslash, bar ] };
- key <AC02> { [ s, S, ssharp ] };
- key <AC03> { [ d, D, dstroke, Dstroke ] };
- key <AC09> { [ l, L, lstroke, Lstroke ] };
- key <AC10> { [ 0x1000219, 0x1000218, semicolon, colon ] };
- key <AC11> { [ 0x100021b, 0x100021a, apostrophe, quotedbl ] };
- key <LSGT> { [ backslash, bar ] };
- key <AB03> { [ c, C, copyright ] };
- key <AB08> { [ comma, semicolon, less, guillemotleft ] };
- key <AB09> { [ period, colon, greater, guillemotright ] };
-
- key <KPDL> { [ KP_Delete, KP_Separator ] };
-
- include "level3(ralt_switch)"
-};
-
-
-partial alphanumeric_keys
-xkb_symbols "std_cedilla" {
- // Variant of the "std" layout with cedillas.
- // Implements S and T with cedillas as in ISO-8859-2.
- // Included for compatibility reasons.
-
- include "ro(std)"
-
- name[Group1]="Romania - Standard (Cedilla)";
-
- key <AC10> { [ scedilla, Scedilla ] };
- key <AC11> { [ tcedilla, Tcedilla ] };
-};
-
-
-partial alphanumeric_keys
-xkb_symbols "winkeys" {
- // Describes the differences between a very simple US/ASCII
- // keyboard and a very simple Romanian keybaord
- // Created by Manfred Pohler, <Manfred.Pohler@t-online.de> (C) 2003
-
- include "latin"
-
- name[Group1]="Romania - Winkeys";
-
- // Alphanumeric section
- key <TLDE> { [ bracketright, bracketleft ] };
-
- key <AE01> { [ 1, exclam, asciitilde, asciitilde ] };
- key <AE02> { [ 2, quotedbl, at, at ] };
- key <AE03> { [ 3, numbersign, asciicircum,asciicircum ] };
- key <AE04> { [ 4, currency ] };
- key <AE05> { [ 5, percent, degree, degree ] };
- key <AE06> { [ 6, ampersand ] };
- key <AE07> { [ 7, slash, grave, grave ] };
- key <AE08> { [ 8, parenleft ] };
- key <AE09> { [ 9, parenright ] };
- key <AE10> { [ 0, equal ] };
- key <AE11> { [ plus, question ] };
- key <AE12> { [ apostrophe, asterisk ] };
-
- key <AD01> { [ q, Q, backslash, backslash ] };
- key <AD02> { [ w, W, bar, bar ] };
- key <AD03> { [ e, E, EuroSign, EuroSign ] };
- key <AD05> { [ t, T ] };
- key <AD06> { [ z, Z ] };
- key <AD07> { [ u, U ] };
- key <AD08> { [ i, I ] };
- key <AD11> { [ abreve, Abreve, division, division ] };
- key <AD12> { [ icircumflex, Icircumflex, multiply, multiply ] };
-
- key <AC04> { [ f, F ] };
- key <AC05> { [ g, G ] };
- key <AC10> { [ scedilla, Scedilla, dollar, dollar ] };
- key <AC11> { [ tcedilla, Tcedilla, ssharp, ssharp ] };
-
- key <AB01> { [ y, Y ] };
- key <AB05> { [ b, B, braceleft, braceleft ] };
- key <AB06> { [ n, N, braceright, braceright ] };
- key <AB07> { [ m, M, section, section ] };
- key <AB08> { [ comma, semicolon, less, less ] };
- key <AB09> { [ period, colon, greater, greater ] };
- key <AB10> { [ minus, underscore ] };
-
- key <BKSL> { [ acircumflex, Acircumflex ] };
-
- // End alphanumeric section, begin "Keypad"
- include "kpdl(comma)"
- // End "Keypad" section
-
- include "level3(ralt_switch)"
-
-};
-
-// Crimean Tatar (Crimean Turkish) layouts.
-partial
-xkb_symbols "crh_f" {
- include "tr(crh_f)"
-
- name[Group1]="Romania - Crimean Tatar (Turkish F)";
-};
-
-partial
-xkb_symbols "crh_alt" {
- include "tr(crh_alt)"
-
- name[Group1]="Romania - Crimean Tatar (Turkish Alt-Q)";
-};
-
-partial
-xkb_symbols "crh_dobruca1" {
- include "tr(crh)"
-
- name[Group1]="Romania - Crimean Tatar (Dobruca-1 Q)";
-
- key <AD05> { [ t, T, tcedilla, Tcedilla ] };
- key <AD10> { [ p, P, abreve, Abreve ] };
-
- key <AC04> { [ f, F, ibreve, Ibreve ] };
- key <AC07> { [ iacute, Iacute, j, J ] };
-
- key <AB07> { [ m, M, trademark, masculine ] };
-};
-
-partial
-xkb_symbols "crh_dobruca2" {
- include "ro(crh_dobruca1)"
-
- name[Group1]="Romania - Crimean Tatar (Dobruca-2 Q)";
-
- key <AC04> { [ f, F, iacute, Iacute ] };
- key <AC07> { [ ibreve, Ibreve, j, J ] };
-};
-
-// EXTRAS:
-
-partial alphanumeric_keys
-xkb_symbols "ergonomic" {
- // This layout is optimized for fast touch-typing in Romanian on a
- // US keyboard, and works by swapping out symbols infrequently used
- // in written Romanian (q,w,y,k) in favor of native ones, thus reducing
- // the need to use modifier keys.
- // Created by Gabriel Somlo, <somlo@cmu.edu> (C) 2011
-
- include "ro(basic)"
-
- name[Group1]="Romania - Ergonomic Touchtype";
-
- key <AD01> { [ abreve, Abreve, q, Q ] };
- key <AD02> { [ 0x1000219, 0x1000218, w, W ] };
- key <AD06> { [ 0x100021b, 0x100021a, y, Y ] };
- key <AC01> { [ a, A, acircumflex, Acircumflex ] };
- key <AC08> { [ icircumflex, Icircumflex, k, K ] };
-};
-
+//
+// Complete set of Romanian keyboards as described in the new Romanian standard
+// SR 13392:2004 adopted in December 2004 by ASRO, "Asociatia de Standardizare
+// din Romania".
+//
+// The default mapping is the RO_US/Programmers layout because of the lack of
+// Romanian hardware keyboards. The primary standard layout is implemented as
+// the "std" variant. If you're determined to get cedillas as in ISO-8859-2
+// (and not commabelow accents as in ISO-8859-16) use the defined variants
+// "cedilla" for the default layout or "std_cedilla" for the standard one.
+// Pre-Vista MS compatible layout included (use the "winkeys" variant).
+//
+// Created by Cristian Gafton, <gafton@redhat.com> (C) 2000
+// Modified by Marius Andreiana, <mandreiana@yahoo.com> (C) 2001
+// Completed by Misu Moldovan, <dumol@gnome.ro> (C) 2001, 2004-2008.
+// v 1.4
+
+
+partial default alphanumeric_keys
+xkb_symbols "basic" {
+// This RO_US/Programmers layout, although the secondary layout in the
+// Romanian standard, has always been the "de facto" standard in the
+// Linux/Unix world. It is implemented here as the default layout and it's
+// fully compatible with an US keyboard (Euro on AltGr+5 doesn't count).
+
+ include "us"
+
+ name[Group1]="Romania";
+
+ key <AE01> { [ 1, exclam, dead_tilde ] };
+ key <AE02> { [ 2, at, dead_caron ] };
+ key <AE03> { [ 3, numbersign, dead_circumflex ] };
+ key <AE04> { [ 4, dollar, dead_breve ] };
+ key <AE05> { [ 5, percent, dead_abovering ] };
+ key <AE06> { [ 6, asciicircum, dead_ogonek ] };
+ key <AE07> { [ 7, ampersand, dead_grave ] };
+ key <AE08> { [ 8, asterisk, dead_abovedot ] };
+ key <AE09> { [ 9, parenleft, dead_acute ] };
+ key <AE10> { [ 0, parenright, dead_doubleacute ] };
+ key <AE11> { [ minus, underscore, dead_diaeresis, endash ] };
+ key <AE12> { [ equal, plus, dead_cedilla, plusminus ] };
+ key <AD01> { [ q, Q, acircumflex, Acircumflex ] };
+ key <AD02> { [ w, W, ssharp ] };
+ key <AD03> { [ e, E, EuroSign ] };
+ key <AD05> { [ t, T, 0x100021b, 0x100021a ] };
+ key <AD08> { [ i, I, icircumflex, Icircumflex ] };
+ key <AD10> { [ p, P, section ] };
+ key <AD11> { [ bracketleft, braceleft, doublelowquotemark ] };
+ key <AD12> { [ bracketright, braceright, rightdoublequotemark ] };
+ key <AC01> { [ a, A, abreve, Abreve ] };
+ key <AC02> { [ s, S, 0x1000219, 0x1000218 ] };
+ key <AC03> { [ d, D, dstroke, Dstroke ] };
+ key <AC09> { [ l, L, lstroke, Lstroke ] };
+ key <LSGT> { [ backslash, bar ] };
+ key <AB03> { [ c, C, copyright ] };
+ key <AB08> { [ comma, less, guillemotleft ] };
+ key <AB09> { [ period, greater, guillemotright ] };
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "cedilla" {
+ // Variant of the basic layout with cedillas.
+ // Implements S and T with cedilllas as in ISO-8859-2.
+ // Included for compatibility reasons (this used to be the def variant).
+
+ include "ro(basic)"
+
+ name[Group1]="Romania - Cedilla";
+
+ key <AD05> { [ t, T, tcedilla, Tcedilla ] };
+ key <AC02> { [ s, S, scedilla, Scedilla ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "std" {
+ // Primary layout in the new Romanian standard.
+ // Implemented here as a variant because of the lack of hardware
+ // Romanian keyboards and because of the predilection of Romanian
+ // X users towards the secondary layout from the new standard.
+
+ include "us"
+
+ name[Group1]="Romania - Standard";
+
+ key <TLDE> { [ doublelowquotemark, rightdoublequotemark, grave, asciitilde ] };
+ key <AE01> { [ 1, exclam, dead_tilde ] };
+ key <AE02> { [ 2, at, dead_caron ] };
+ key <AE03> { [ 3, numbersign, dead_circumflex ] };
+ key <AE04> { [ 4, dollar, dead_breve ] };
+ key <AE05> { [ 5, percent, dead_abovering ] };
+ key <AE06> { [ 6, asciicircum, dead_ogonek ] };
+ key <AE07> { [ 7, ampersand, dead_grave ] };
+ key <AE08> { [ 8, asterisk, dead_abovedot ] };
+ key <AE09> { [ 9, parenleft, dead_acute ] };
+ key <AE10> { [ 0, parenright, dead_doubleacute ] };
+ key <AE11> { [ minus, underscore, dead_diaeresis, endash ] };
+ key <AE12> { [ equal, plus, dead_cedilla, plusminus ] };
+ key <AD03> { [ e, E, EuroSign ] };
+ key <AD10> { [ p, P, section ] };
+ key <AD11> { [ abreve, Abreve, bracketleft, braceleft ] };
+ key <AD12> { [ icircumflex, Icircumflex, bracketright, braceright ] };
+ key <BKSL> { [ acircumflex, Acircumflex, backslash, bar ] };
+ key <AC02> { [ s, S, ssharp ] };
+ key <AC03> { [ d, D, dstroke, Dstroke ] };
+ key <AC09> { [ l, L, lstroke, Lstroke ] };
+ key <AC10> { [ 0x1000219, 0x1000218, semicolon, colon ] };
+ key <AC11> { [ 0x100021b, 0x100021a, apostrophe, quotedbl ] };
+ key <LSGT> { [ backslash, bar ] };
+ key <AB03> { [ c, C, copyright ] };
+ key <AB08> { [ comma, semicolon, less, guillemotleft ] };
+ key <AB09> { [ period, colon, greater, guillemotright ] };
+
+ key <KPDL> { [ KP_Delete, KP_Separator ] };
+
+ include "level3(ralt_switch)"
+};
+
+
+partial alphanumeric_keys
+xkb_symbols "std_cedilla" {
+ // Variant of the "std" layout with cedillas.
+ // Implements S and T with cedillas as in ISO-8859-2.
+ // Included for compatibility reasons.
+
+ include "ro(std)"
+
+ name[Group1]="Romania - Standard (Cedilla)";
+
+ key <AC10> { [ scedilla, Scedilla ] };
+ key <AC11> { [ tcedilla, Tcedilla ] };
+};
+
+
+partial alphanumeric_keys
+xkb_symbols "winkeys" {
+ // Describes the differences between a very simple US/ASCII
+ // keyboard and a very simple Romanian keybaord
+ // Created by Manfred Pohler, <Manfred.Pohler@t-online.de> (C) 2003
+
+ include "latin"
+
+ name[Group1]="Romania - Winkeys";
+
+ // Alphanumeric section
+ key <TLDE> { [ bracketright, bracketleft ] };
+
+ key <AE01> { [ 1, exclam, asciitilde, asciitilde ] };
+ key <AE02> { [ 2, quotedbl, at, at ] };
+ key <AE03> { [ 3, numbersign, asciicircum,asciicircum ] };
+ key <AE04> { [ 4, currency ] };
+ key <AE05> { [ 5, percent, degree, degree ] };
+ key <AE06> { [ 6, ampersand ] };
+ key <AE07> { [ 7, slash, grave, grave ] };
+ key <AE08> { [ 8, parenleft ] };
+ key <AE09> { [ 9, parenright ] };
+ key <AE10> { [ 0, equal ] };
+ key <AE11> { [ plus, question ] };
+ key <AE12> { [ apostrophe, asterisk ] };
+
+ key <AD01> { [ q, Q, backslash, backslash ] };
+ key <AD02> { [ w, W, bar, bar ] };
+ key <AD03> { [ e, E, EuroSign, EuroSign ] };
+ key <AD05> { [ t, T ] };
+ key <AD06> { [ z, Z ] };
+ key <AD07> { [ u, U ] };
+ key <AD08> { [ i, I ] };
+ key <AD11> { [ abreve, Abreve, division, division ] };
+ key <AD12> { [ icircumflex, Icircumflex, multiply, multiply ] };
+
+ key <AC04> { [ f, F ] };
+ key <AC05> { [ g, G ] };
+ key <AC10> { [ scedilla, Scedilla, dollar, dollar ] };
+ key <AC11> { [ tcedilla, Tcedilla, ssharp, ssharp ] };
+
+ key <AB01> { [ y, Y ] };
+ key <AB05> { [ b, B, braceleft, braceleft ] };
+ key <AB06> { [ n, N, braceright, braceright ] };
+ key <AB07> { [ m, M, section, section ] };
+ key <AB08> { [ comma, semicolon, less, less ] };
+ key <AB09> { [ period, colon, greater, greater ] };
+ key <AB10> { [ minus, underscore ] };
+
+ key <BKSL> { [ acircumflex, Acircumflex ] };
+
+ // End alphanumeric section, begin "Keypad"
+ include "kpdl(comma)"
+ // End "Keypad" section
+
+ include "level3(ralt_switch)"
+
+};
+
+// Crimean Tatar (Crimean Turkish) layouts.
+partial
+xkb_symbols "crh_f" {
+ include "tr(crh_f)"
+
+ name[Group1]="Romania - Crimean Tatar (Turkish F)";
+};
+
+partial
+xkb_symbols "crh_alt" {
+ include "tr(crh_alt)"
+
+ name[Group1]="Romania - Crimean Tatar (Turkish Alt-Q)";
+};
+
+partial
+xkb_symbols "crh_dobruca1" {
+ include "tr(crh)"
+
+ name[Group1]="Romania - Crimean Tatar (Dobruca-1 Q)";
+
+ key <AD05> { [ t, T, tcedilla, Tcedilla ] };
+ key <AD10> { [ p, P, abreve, Abreve ] };
+
+ key <AC04> { [ f, F, ibreve, Ibreve ] };
+ key <AC07> { [ iacute, Iacute, j, J ] };
+
+ key <AB07> { [ m, M, trademark, masculine ] };
+};
+
+partial
+xkb_symbols "crh_dobruca2" {
+ include "ro(crh_dobruca1)"
+
+ name[Group1]="Romania - Crimean Tatar (Dobruca-2 Q)";
+
+ key <AC04> { [ f, F, iacute, Iacute ] };
+ key <AC07> { [ ibreve, Ibreve, j, J ] };
+};
+
+// EXTRAS:
+
+partial alphanumeric_keys
+xkb_symbols "ergonomic" {
+ // This layout is optimized for fast touch-typing in Romanian on a
+ // US keyboard, and works by swapping out symbols infrequently used
+ // in written Romanian (q,w,y,k) in favor of native ones, thus reducing
+ // the need to use modifier keys.
+ // Created by Gabriel Somlo, <somlo@cmu.edu> (C) 2011
+
+ include "ro(basic)"
+
+ name[Group1]="Romania - Ergonomic Touchtype";
+
+ key <AD01> { [ abreve, Abreve, q, Q ] };
+ key <AD02> { [ 0x1000219, 0x1000218, w, W ] };
+ key <AD06> { [ 0x100021b, 0x100021a, y, Y ] };
+ key <AC01> { [ a, A, acircumflex, Acircumflex ] };
+ key <AC08> { [ icircumflex, Icircumflex, k, K ] };
+};
+
diff --git a/xorg-server/xkeyboard-config/symbols/rs b/xorg-server/xkeyboard-config/symbols/rs
index d4628852f..1797542d0 100644
--- a/xorg-server/xkeyboard-config/symbols/rs
+++ b/xorg-server/xkeyboard-config/symbols/rs
@@ -1,345 +1,345 @@
-// Bosnian, Croatian, Serbian and Slovenian XKB keyboard mapping
-// (derived from "Danube" D.2)
-//
-// Danube D.2 from 2003-05-12 is available at http://srpski.org/dunav/
-//
-// Original authors:
-// Danilo Segan (Данило Шеган) <danilo@kvota.net>
-// Chusslove Illich (Часлав Илић) <chaslav@sezampro.yu>
-//
-// Danilo Segan <danilo@kvota.net>:
-// - Modified for inclusion in XFree86
-// - Further modifications on 2005-08-18 to support Bosnian, Croatian
-// and Slovenian in xkeyboard-config
-//
-
-default partial alphanumeric_keys
-xkb_symbols "basic" {
-
- name[Group1]= "Serbia";
-
- include "rs(cyrlevel3)"
- include "rs(common)"
- include "rs(cyralpha)"
- include "level3(ralt_switch)"
-};
-
-
-partial alphanumeric_keys
-xkb_symbols "latin" {
-
- name[Group1]= "Serbia - Latin";
-
- include "latin(type3)"
- include "rs(latalpha)"
- include "rs(latlevel3)"
- include "rs(common)"
- include "level3(ralt_switch)"
-};
-
-
-partial alphanumeric_keys
-xkb_symbols "yz" {
- // Cyrillic_zhe and Cyrillic_ze swapped.
-
- name[Group1]= "Serbia - Z and ZHE swapped";
-
- include "rs(basic)"
-
- key <AD06> { [ Cyrillic_zhe, Cyrillic_ZHE, any,any ] }; // y
- key <AB01> { [ Cyrillic_ze, Cyrillic_ZE, any,any ] }; // z
-};
-
-partial hidden alphanumeric_keys
-xkb_symbols "common" {
- // "Common" keys: keys which are same for both latin and cyrillic keyboards
-
- key.type[Group1] = "FOUR_LEVEL";
-
- key <TLDE> { [ quoteleft, asciitilde, any,any ] }; //
- key <AE01> { [ 1, exclam, any,any ] }; //
- key <AE02> { [ 2, quotedbl, any,any ] }; //
- key <AE03> { [ 3, numbersign, any,any ] }; //
- key <AE04> { [ 4, dollar, any,any ] }; //
- key <AE05> { [ 5, percent, any,any ] }; //
- key <AE06> { [ 6, ampersand, any,any ] }; //
- key <AE07> { [ 7, slash, any,any ] }; //
- key <AE08> { [ 8, parenleft, any,any ] }; //
- key <AE09> { [ 9, parenright, any,any ] }; //
- key <AE10> { [ 0, equal, any,any ] }; //
- key <AE11> { [ apostrophe, question, any,any ] }; //
- key <AE12> { [ plus, asterisk, any,any ] }; //
-
- key <AB08> { [ comma, semicolon, any,any ] }; //
- key <AB09> { [ period, colon, any,any ] }; //
- key <AB10> { [ minus, underscore, any,any ] }; //
-
- include "kpdl(comma)"
-};
-
-partial hidden alphanumeric_keys
-xkb_symbols "cyralpha" {
-
- key.type[Group1] = "FOUR_LEVEL_ALPHABETIC";
-
- key <AD01> { [ Cyrillic_lje, Cyrillic_LJE, any,any ] }; // q
- key <AD02> { [ Cyrillic_nje, Cyrillic_NJE, any,any ] }; // w
- key <AD03> { [ Cyrillic_ie, Cyrillic_IE, any,any ] }; // e
- key <AD04> { [ Cyrillic_er, Cyrillic_ER, any,any ] }; // r
- key <AD05> { [ Cyrillic_te, Cyrillic_TE, any,any ] }; // t
- key <AD06> { [ Cyrillic_ze, Cyrillic_ZE, any,any ] }; // y
- key <AD07> { [ Cyrillic_u, Cyrillic_U, any,any ] }; // u
- key <AD08> { [ Cyrillic_i, Cyrillic_I, any,any ] }; // i
- key <AD09> { [ Cyrillic_o, Cyrillic_O, any,any ] }; // o
- key <AD10> { [ Cyrillic_pe, Cyrillic_PE, any,any ] }; // p
- key <AD11> { [ Cyrillic_sha, Cyrillic_SHA, any,any ] }; // [ {
- key <AD12> { [ Serbian_dje, Serbian_DJE, any,any ] }; // ] }
-
- key <AC01> { [ Cyrillic_a, Cyrillic_A, any,any ] }; // a
- key <AC02> { [ Cyrillic_es, Cyrillic_ES, any,any ] }; // s
- key <AC03> { [ Cyrillic_de, Cyrillic_DE, any,any ] }; // d
- key <AC04> { [ Cyrillic_ef, Cyrillic_EF, any,any ] }; // f
- key <AC05> { [ Cyrillic_ghe, Cyrillic_GHE, any,any ] }; // g
- key <AC06> { [ Cyrillic_ha, Cyrillic_HA, any,any ] }; // h
- key <AC07> { [ Cyrillic_je, Cyrillic_JE, any,any ] }; // j
- key <AC08> { [ Cyrillic_ka, Cyrillic_KA, any,any ] }; // k
- key <AC09> { [ Cyrillic_el, Cyrillic_EL, any,any ] }; // l
- key <AC10> { [ Cyrillic_che, Cyrillic_CHE, any,any ] }; // ; :
- key <AC11> { [ Serbian_tshe, Serbian_TSHE, any,any ] }; // ' "
- key <BKSL> { [ Cyrillic_zhe, Cyrillic_ZHE, any,any ] }; // \ |
-
- key <AB01> { [ Cyrillic_zhe, Cyrillic_ZHE, any,any ] }; // z
- key <AB02> { [ Cyrillic_dzhe, Cyrillic_DZHE, any,any ] }; // x
- key <AB03> { [ Cyrillic_tse, Cyrillic_TSE, any,any ] }; // c
- key <AB04> { [ Cyrillic_ve, Cyrillic_VE, any,any ] }; // v
- key <AB05> { [ Cyrillic_be, Cyrillic_BE, any,any ] }; // b
- key <AB06> { [ Cyrillic_en, Cyrillic_EN, any,any ] }; // n
- key <AB07> { [ Cyrillic_em, Cyrillic_EM, any,any ] }; // m
-};
-
-
-partial hidden alphanumeric_keys
-xkb_symbols "latalpha" {
-
- key.type[Group1] = "FOUR_LEVEL_ALPHABETIC";
-
- key <AD11> { [ scaron, Scaron, any,any ] }; //
- key <AD12> { [ dstroke, Dstroke, any,any ] }; //
-
- key <AC10> { [ ccaron, Ccaron, any,any ] }; //
- key <AC11> { [ cacute, Cacute, any,any ] }; //
- key <BKSL> { [ zcaron, Zcaron, any,any ] }; //
-
-};
-
-partial hidden alphanumeric_keys
-xkb_symbols "twoletter" {
- // These are letters which are written in latin transcription with two-characters.
-
- key <AD01> { type[Group1] = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC",
- [ U1C9, U1C8, any, U1C7 ] }; // q
- key <AD02> { type[Group1] = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC",
- [ U1CC, U1CB, any, U1CA ] }; // w
- key <AB02> { type[Group1] = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC",
- [ U1C6, U1C5, any, U1C4 ] }; // x
-
- // Also replace letter Y with Zcaron, since Y is of no use any longer
- key <AB01> { [ zcaron, Zcaron, any,any ] }; //
-};
-
-partial hidden alphanumeric_keys
-xkb_symbols "latlevel3" {
- key <TLDE> { [ any,any, notsign, notsign ] }; // ` ~
- key <AE01> { [ any,any, dead_tilde, asciitilde ] }; // 1 !
- key <AE02> { [ any,any, dead_caron, caron ] }; // 2 @
- key <AE03> { [ any,any, dead_circumflex, asciicircum ] }; // 3 #
- key <AE04> { [ any,any, dead_breve, breve ] }; // 4 $
- key <AE05> { [ any,any, dead_abovering, degree ] }; // 5 %
- key <AE06> { [ any,any, dead_ogonek, ogonek ] }; // 6 ^
- key <AE07> { [ any,any, dead_grave, grave ] }; // 7 &
- key <AE08> { [ any,any, dead_abovedot, abovedot ] }; // 8 *
- key <AE09> { [ any,any, dead_acute, apostrophe ] }; // 9 (
- key <AE10> { [ any,any, dead_doubleacute, doubleacute ] }; // 0 )
- key <AE11> { [ any,any, dead_diaeresis, diaeresis ] }; // - _
- key <AE12> { [ any,any, dead_cedilla, cedilla ] }; // = +
-
- key <AD01> { [ any,any, backslash, Greek_OMEGA ] }; // q
- key <AD02> { [ any,any, bar, Lstroke ] }; // w
- key <AD03> { [ any,any, EuroSign, EuroSign ] }; // e
- key <AD04> { [ any,any, paragraph, registered ] }; // r
- key <AD05> { [ any,any, tslash, Tslash ] }; // t // ALPHABETIC
- key <AD06> { [ any,any, leftarrow, yen ] }; // y
- key <AD07> { [ any,any, downarrow, uparrow ] }; // u
- key <AD08> { [ any,any, rightarrow, idotless ] }; // i
- key <AD09> { [ any,any, oslash, Ooblique ] }; // o // ALPHABETIC
- key <AD10> { [ any,any, thorn, THORN ] }; // p // ALPHABETIC
- key <AD11> { [ any,any, division, dead_abovering ] }; // [
- key <AD12> { [ any,any, multiply, dead_macron ] }; // ]
-
- key <AC01> { [ any,any, ae, AE ] }; // a // ALPHABETIC
- key <AC02> { [ any,any, doublelowquotemark, guillemotright ] }; // s
- key <AC03> { [ any,any, leftdoublequotemark, guillemotleft ] }; // d
- key <AC04> { [ any,any, bracketleft, ordfeminine ] }; // f
- key <AC05> { [ any,any, bracketright, ENG ] }; // g
- key <AC06> { [ any,any, hstroke, Hstroke ] }; // h // ALPHABETIC
- key <AC07> { [ any,any, NoSymbol, NoSymbol ] }; // j
- key <AC08> { [ any,any, lstroke, ampersand ] }; // k
- key <AC09> { [ any,any, lstroke, Lstroke ] }; // l
- key <AC10> { [ any,any, dead_acute, dead_doubleacute ] }; // ;
- key <AC11> { [ any,any, ssharp, dead_caron ] }; // '
- key <BKSL> { [ any,any, currency, dead_breve ] }; // \
-
- key <AB01> { [ any,any, leftsinglequotemark, guillemotright ] }; // z
- key <AB02> { [ any,any, rightsinglequotemark,guillemotleft ] }; // x
- key <AB03> { [ any,any, cent, copyright ] }; // c
- key <AB04> { [ any,any, at, grave ] }; // v
- key <AB05> { [ any,any, braceleft, apostrophe ] }; // b
- key <AB06> { [ any,any, braceright, braceright ] }; // n
- key <AB07> { [ any,any, asciicircum, masculine ] }; // m
- key <AB08> { [ any,any, less, multiply ] }; // , <
- key <AB09> { [ any,any, greater, division ] }; // . >
- key <AB10> { [ any,any, emdash, endash ] }; // / ?
-
-};
-
-partial hidden alphanumeric_keys
-xkb_symbols "cyrlevel3" {
- key <TLDE> { [ any,any, degree, notsign ] }; // ` ~
- key <AE03> { [ any,any, dead_circumflex, NoSymbol ] }; // 3 #
- key <AE07> { [ any,any, dead_grave, NoSymbol ] }; // 7 &
- key <AE08> { [ any,any, dead_doublegrave, NoSymbol ] }; // 8 *
- key <AE09> { [ any,any, dead_acute, NoSymbol ] }; // 9 (
- key <AE10> { [ any,any, dead_invertedbreve, NoSymbol ] }; // 0 )
- key <AE11> { [ any,any, dead_macron, NoSymbol ] }; // - _
-
- key <AD01> { [ any,any, backslash, NoSymbol ] }; // q
- key <AD02> { [ any,any, bar, NoSymbol ] }; // w
- key <AD03> { [ any,any, EuroSign, sterling ] }; // e
- key <AD04> { [ any,any, paragraph, registered ] }; // r
- key <AD05> { [ any,any, ellipsis, NoSymbol ] }; // t // ALPHABETIC
- key <AD06> { [ any,any, leftarrow, yen ] }; // y
- key <AD07> { [ any,any, downarrow, uparrow ] }; // u
- key <AD08> { [ any,any, rightarrow, NoSymbol ] }; // i
- key <AD09> { [ any,any, section, NoSymbol ] }; // o // ALPHABETIC
- key <AD11> { [ any,any, division, NoSymbol ] }; // [
- key <AD12> { [ any,any, multiply, NoSymbol ] }; // ]
-
- key <AC02> { [ any,any, doublelowquotemark, guillemotright ] }; // s
- key <AC03> { [ any,any, leftdoublequotemark, guillemotleft ] }; // d
- key <AC04> { [ any,any, bracketleft, NoSymbol ] }; // f
- key <AC05> { [ any,any, bracketright, NoSymbol ] }; // g
- key <BKSL> { [ any,any, currency, NoSymbol ] }; // \
-
- key <AB01> { [ any,any, leftsinglequotemark, NoSymbol ] }; // z
- key <AB02> { [ any,any, rightsinglequotemark,NoSymbol ] }; // x
- key <AB03> { [ any,any, cent, copyright ] }; // c
- key <AB04> { [ any,any, at, NoSymbol ] }; // v
- key <AB05> { [ any,any, braceleft, NoSymbol ] }; // b
- key <AB06> { [ any,any, braceright, NoSymbol ] }; // n
- key <AB07> { [ any,any, asciicircum, NoSymbol ] }; // m
- key <AB08> { [ any,any, less, NoSymbol ] }; // , <
- key <AB09> { [ any,any, greater, NoSymbol ] }; // . >
- key <AB10> { [ any,any, emdash, endash ] }; // / ?
-};
-
-partial alphanumeric_keys
-xkb_symbols "latinunicode" {
- // This mapping supports the Unicode characters 0x1c4-0x1cc (dz, lj, and nj
- // as single character). You get the title form with AltGr+Shift.
-
- name[Group1]= "Serbia - Latin Unicode";
-
- include "rs(latin)"
- include "rs(twoletter)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "latinyz" {
- // For those who insist on using "english-position" Z and Y.
-
- name[Group1]= "Serbia - Latin qwerty";
-
- include "rs(latin)"
-
- key <AD06> { [ y, Y, any,any ] }; // y
- key <AB01> { [ z, Z, any,any ] }; // z
-};
-
-partial alphanumeric_keys
-xkb_symbols "latinunicodeyz" {
- // Unicode, ZHE and Z swapped.
-
- name[Group1]= "Serbia - Latin Unicode qwerty";
-
- include "rs(latinunicode)"
-
- key <AD06> { [ zcaron, Zcaron, any,any ] }; // y
- key <AB01> { [ z, Z, any,any ] }; // z
-};
-
-xkb_symbols "alternatequotes" {
- // Another acceptable »pair of quotes« for Serbian
-
- name[Group1]= "Serbia - With guillemets";
-
- include "rs(basic)"
-
- key <AC02> { [ any,any, guillemotright, NoSymbol ] }; // s
- key <AC03> { [ any,any, guillemotleft, NoSymbol ] }; // d
-};
-
-xkb_symbols "latinalternatequotes" {
- // Another acceptable »pair of quotes« for Serbian
-
- name[Group1]= "Serbia - Latin with guillemets";
-
- include "rs(latin)"
-
- key <AC02> { [ any,any, guillemotright, NoSymbol ] }; // s
- key <AC03> { [ any,any, guillemotleft, NoSymbol ] }; // d
-};
-
-xkb_symbols "rue" {
- // Homophonic layout for Pannonian Rusyn (spoken mainly in Serbia and
- // Croatia by the Rusyn people), based on Ukrainian homophonic.
- // Author: Ljubomir J. Papuga (Любомир Я. Папуґа) <papuga.rs@gmail.com>
-
- name[Group1]= "Serbia - Pannonian Rusyn Homophonic";
-
- include "ua(homophonic)"
-
- key <TLDE> { [ grave, asciitilde ] };
- key <AE03> { [ 3, doublelowquotemark ] };
- key <AE04> { [ 4, rightdoublequotemark ] };
- key <AE07> { [ 7, EuroSign ] };
- key <AE11> { [ 0x002D, emdash ] };
- key <AE12> { [ equal, plus ] };
-
- key <AD02> { [ Ukrainian_ie, Ukrainian_IE ] };
- key <AD06> { [ Cyrillic_yu, Cyrillic_YU ] };
- key <AD08> { [ Cyrillic_i, Cyrillic_I ] };
- key <AD11> { [ Cyrillic_sha, Cyrillic_SHA ] };
- key <AD12> { [ Cyrillic_shcha, Cyrillic_SHCHA ] };
-
- key <LSGT> { [ Ukrainian_yi, Ukrainian_YI ] };
- key <AB08> { [ comma, semicolon ] };
- key <AB09> { [ period, colon ] };
-};
-
-// EXTRAS:
-
-xkb_symbols "combiningkeys" {
- // Raw combining characters instead of dead keys,
- // especially good for post-accenting texts.
-
- name[Group1]= "Serbia - Combining accents instead of dead keys";
-
- include "rs(basic)"
-
- key <AE03> { [ any,any, U0302, dead_circumflex ] }; // 3, U0302 = COMBINING CIRCUMFLEX ACCENT
- key <AE07> { [ any,any, U0300, NoSymbol ] }; // 7, U0300 = COMBINING GRAVE ACCENT
- key <AE08> { [ any,any, U030F, NoSymbol ] }; // 8, U030F = COMBINING DOUBLE GRAVE ACCENT
- key <AE09> { [ any,any, U0301, NoSymbol ] }; // 9, U0301 = COMBINING ACUTE ACCENT
- key <AE10> { [ any,any, U0311, NoSymbol ] }; // 0, U0311 = COMBINING INVERTED BREVE
- key <AE11> { [ any,any, U0304, NoSymbol ] }; // -, U0304 = COMBINING MACRON
-};
+// Bosnian, Croatian, Serbian and Slovenian XKB keyboard mapping
+// (derived from "Danube" D.2)
+//
+// Danube D.2 from 2003-05-12 is available at http://srpski.org/dunav/
+//
+// Original authors:
+// Danilo Segan (Данило Шеган) <danilo@kvota.net>
+// Chusslove Illich (Часлав Илић) <chaslav@sezampro.yu>
+//
+// Danilo Segan <danilo@kvota.net>:
+// - Modified for inclusion in XFree86
+// - Further modifications on 2005-08-18 to support Bosnian, Croatian
+// and Slovenian in xkeyboard-config
+//
+
+default partial alphanumeric_keys
+xkb_symbols "basic" {
+
+ name[Group1]= "Serbia";
+
+ include "rs(cyrlevel3)"
+ include "rs(common)"
+ include "rs(cyralpha)"
+ include "level3(ralt_switch)"
+};
+
+
+partial alphanumeric_keys
+xkb_symbols "latin" {
+
+ name[Group1]= "Serbia - Latin";
+
+ include "latin(type3)"
+ include "rs(latalpha)"
+ include "rs(latlevel3)"
+ include "rs(common)"
+ include "level3(ralt_switch)"
+};
+
+
+partial alphanumeric_keys
+xkb_symbols "yz" {
+ // Cyrillic_zhe and Cyrillic_ze swapped.
+
+ name[Group1]= "Serbia - Z and ZHE swapped";
+
+ include "rs(basic)"
+
+ key <AD06> { [ Cyrillic_zhe, Cyrillic_ZHE, any,any ] }; // y
+ key <AB01> { [ Cyrillic_ze, Cyrillic_ZE, any,any ] }; // z
+};
+
+partial hidden alphanumeric_keys
+xkb_symbols "common" {
+ // "Common" keys: keys which are same for both latin and cyrillic keyboards
+
+ key.type[Group1] = "FOUR_LEVEL";
+
+ key <TLDE> { [ quoteleft, asciitilde, any,any ] }; //
+ key <AE01> { [ 1, exclam, any,any ] }; //
+ key <AE02> { [ 2, quotedbl, any,any ] }; //
+ key <AE03> { [ 3, numbersign, any,any ] }; //
+ key <AE04> { [ 4, dollar, any,any ] }; //
+ key <AE05> { [ 5, percent, any,any ] }; //
+ key <AE06> { [ 6, ampersand, any,any ] }; //
+ key <AE07> { [ 7, slash, any,any ] }; //
+ key <AE08> { [ 8, parenleft, any,any ] }; //
+ key <AE09> { [ 9, parenright, any,any ] }; //
+ key <AE10> { [ 0, equal, any,any ] }; //
+ key <AE11> { [ apostrophe, question, any,any ] }; //
+ key <AE12> { [ plus, asterisk, any,any ] }; //
+
+ key <AB08> { [ comma, semicolon, any,any ] }; //
+ key <AB09> { [ period, colon, any,any ] }; //
+ key <AB10> { [ minus, underscore, any,any ] }; //
+
+ include "kpdl(comma)"
+};
+
+partial hidden alphanumeric_keys
+xkb_symbols "cyralpha" {
+
+ key.type[Group1] = "FOUR_LEVEL_ALPHABETIC";
+
+ key <AD01> { [ Cyrillic_lje, Cyrillic_LJE, any,any ] }; // q
+ key <AD02> { [ Cyrillic_nje, Cyrillic_NJE, any,any ] }; // w
+ key <AD03> { [ Cyrillic_ie, Cyrillic_IE, any,any ] }; // e
+ key <AD04> { [ Cyrillic_er, Cyrillic_ER, any,any ] }; // r
+ key <AD05> { [ Cyrillic_te, Cyrillic_TE, any,any ] }; // t
+ key <AD06> { [ Cyrillic_ze, Cyrillic_ZE, any,any ] }; // y
+ key <AD07> { [ Cyrillic_u, Cyrillic_U, any,any ] }; // u
+ key <AD08> { [ Cyrillic_i, Cyrillic_I, any,any ] }; // i
+ key <AD09> { [ Cyrillic_o, Cyrillic_O, any,any ] }; // o
+ key <AD10> { [ Cyrillic_pe, Cyrillic_PE, any,any ] }; // p
+ key <AD11> { [ Cyrillic_sha, Cyrillic_SHA, any,any ] }; // [ {
+ key <AD12> { [ Serbian_dje, Serbian_DJE, any,any ] }; // ] }
+
+ key <AC01> { [ Cyrillic_a, Cyrillic_A, any,any ] }; // a
+ key <AC02> { [ Cyrillic_es, Cyrillic_ES, any,any ] }; // s
+ key <AC03> { [ Cyrillic_de, Cyrillic_DE, any,any ] }; // d
+ key <AC04> { [ Cyrillic_ef, Cyrillic_EF, any,any ] }; // f
+ key <AC05> { [ Cyrillic_ghe, Cyrillic_GHE, any,any ] }; // g
+ key <AC06> { [ Cyrillic_ha, Cyrillic_HA, any,any ] }; // h
+ key <AC07> { [ Cyrillic_je, Cyrillic_JE, any,any ] }; // j
+ key <AC08> { [ Cyrillic_ka, Cyrillic_KA, any,any ] }; // k
+ key <AC09> { [ Cyrillic_el, Cyrillic_EL, any,any ] }; // l
+ key <AC10> { [ Cyrillic_che, Cyrillic_CHE, any,any ] }; // ; :
+ key <AC11> { [ Serbian_tshe, Serbian_TSHE, any,any ] }; // ' "
+ key <BKSL> { [ Cyrillic_zhe, Cyrillic_ZHE, any,any ] }; // \ |
+
+ key <AB01> { [ Cyrillic_zhe, Cyrillic_ZHE, any,any ] }; // z
+ key <AB02> { [ Cyrillic_dzhe, Cyrillic_DZHE, any,any ] }; // x
+ key <AB03> { [ Cyrillic_tse, Cyrillic_TSE, any,any ] }; // c
+ key <AB04> { [ Cyrillic_ve, Cyrillic_VE, any,any ] }; // v
+ key <AB05> { [ Cyrillic_be, Cyrillic_BE, any,any ] }; // b
+ key <AB06> { [ Cyrillic_en, Cyrillic_EN, any,any ] }; // n
+ key <AB07> { [ Cyrillic_em, Cyrillic_EM, any,any ] }; // m
+};
+
+
+partial hidden alphanumeric_keys
+xkb_symbols "latalpha" {
+
+ key.type[Group1] = "FOUR_LEVEL_ALPHABETIC";
+
+ key <AD11> { [ scaron, Scaron, any,any ] }; //
+ key <AD12> { [ dstroke, Dstroke, any,any ] }; //
+
+ key <AC10> { [ ccaron, Ccaron, any,any ] }; //
+ key <AC11> { [ cacute, Cacute, any,any ] }; //
+ key <BKSL> { [ zcaron, Zcaron, any,any ] }; //
+
+};
+
+partial hidden alphanumeric_keys
+xkb_symbols "twoletter" {
+ // These are letters which are written in latin transcription with two-characters.
+
+ key <AD01> { type[Group1] = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC",
+ [ U1C9, U1C8, any, U1C7 ] }; // q
+ key <AD02> { type[Group1] = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC",
+ [ U1CC, U1CB, any, U1CA ] }; // w
+ key <AB02> { type[Group1] = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC",
+ [ U1C6, U1C5, any, U1C4 ] }; // x
+
+ // Also replace letter Y with Zcaron, since Y is of no use any longer
+ key <AB01> { [ zcaron, Zcaron, any,any ] }; //
+};
+
+partial hidden alphanumeric_keys
+xkb_symbols "latlevel3" {
+ key <TLDE> { [ any,any, notsign, notsign ] }; // ` ~
+ key <AE01> { [ any,any, dead_tilde, asciitilde ] }; // 1 !
+ key <AE02> { [ any,any, dead_caron, caron ] }; // 2 @
+ key <AE03> { [ any,any, dead_circumflex, asciicircum ] }; // 3 #
+ key <AE04> { [ any,any, dead_breve, breve ] }; // 4 $
+ key <AE05> { [ any,any, dead_abovering, degree ] }; // 5 %
+ key <AE06> { [ any,any, dead_ogonek, ogonek ] }; // 6 ^
+ key <AE07> { [ any,any, dead_grave, grave ] }; // 7 &
+ key <AE08> { [ any,any, dead_abovedot, abovedot ] }; // 8 *
+ key <AE09> { [ any,any, dead_acute, apostrophe ] }; // 9 (
+ key <AE10> { [ any,any, dead_doubleacute, doubleacute ] }; // 0 )
+ key <AE11> { [ any,any, dead_diaeresis, diaeresis ] }; // - _
+ key <AE12> { [ any,any, dead_cedilla, cedilla ] }; // = +
+
+ key <AD01> { [ any,any, backslash, Greek_OMEGA ] }; // q
+ key <AD02> { [ any,any, bar, Lstroke ] }; // w
+ key <AD03> { [ any,any, EuroSign, EuroSign ] }; // e
+ key <AD04> { [ any,any, paragraph, registered ] }; // r
+ key <AD05> { [ any,any, tslash, Tslash ] }; // t // ALPHABETIC
+ key <AD06> { [ any,any, leftarrow, yen ] }; // y
+ key <AD07> { [ any,any, downarrow, uparrow ] }; // u
+ key <AD08> { [ any,any, rightarrow, idotless ] }; // i
+ key <AD09> { [ any,any, oslash, Ooblique ] }; // o // ALPHABETIC
+ key <AD10> { [ any,any, thorn, THORN ] }; // p // ALPHABETIC
+ key <AD11> { [ any,any, division, dead_abovering ] }; // [
+ key <AD12> { [ any,any, multiply, dead_macron ] }; // ]
+
+ key <AC01> { [ any,any, ae, AE ] }; // a // ALPHABETIC
+ key <AC02> { [ any,any, doublelowquotemark, guillemotright ] }; // s
+ key <AC03> { [ any,any, leftdoublequotemark, guillemotleft ] }; // d
+ key <AC04> { [ any,any, bracketleft, ordfeminine ] }; // f
+ key <AC05> { [ any,any, bracketright, ENG ] }; // g
+ key <AC06> { [ any,any, hstroke, Hstroke ] }; // h // ALPHABETIC
+ key <AC07> { [ any,any, NoSymbol, NoSymbol ] }; // j
+ key <AC08> { [ any,any, lstroke, ampersand ] }; // k
+ key <AC09> { [ any,any, lstroke, Lstroke ] }; // l
+ key <AC10> { [ any,any, dead_acute, dead_doubleacute ] }; // ;
+ key <AC11> { [ any,any, ssharp, dead_caron ] }; // '
+ key <BKSL> { [ any,any, currency, dead_breve ] }; // \
+
+ key <AB01> { [ any,any, leftsinglequotemark, guillemotright ] }; // z
+ key <AB02> { [ any,any, rightsinglequotemark,guillemotleft ] }; // x
+ key <AB03> { [ any,any, cent, copyright ] }; // c
+ key <AB04> { [ any,any, at, grave ] }; // v
+ key <AB05> { [ any,any, braceleft, apostrophe ] }; // b
+ key <AB06> { [ any,any, braceright, braceright ] }; // n
+ key <AB07> { [ any,any, asciicircum, masculine ] }; // m
+ key <AB08> { [ any,any, less, multiply ] }; // , <
+ key <AB09> { [ any,any, greater, division ] }; // . >
+ key <AB10> { [ any,any, emdash, endash ] }; // / ?
+
+};
+
+partial hidden alphanumeric_keys
+xkb_symbols "cyrlevel3" {
+ key <TLDE> { [ any,any, degree, notsign ] }; // ` ~
+ key <AE03> { [ any,any, dead_circumflex, NoSymbol ] }; // 3 #
+ key <AE07> { [ any,any, dead_grave, NoSymbol ] }; // 7 &
+ key <AE08> { [ any,any, dead_doublegrave, NoSymbol ] }; // 8 *
+ key <AE09> { [ any,any, dead_acute, NoSymbol ] }; // 9 (
+ key <AE10> { [ any,any, dead_invertedbreve, NoSymbol ] }; // 0 )
+ key <AE11> { [ any,any, dead_macron, NoSymbol ] }; // - _
+
+ key <AD01> { [ any,any, backslash, NoSymbol ] }; // q
+ key <AD02> { [ any,any, bar, NoSymbol ] }; // w
+ key <AD03> { [ any,any, EuroSign, sterling ] }; // e
+ key <AD04> { [ any,any, paragraph, registered ] }; // r
+ key <AD05> { [ any,any, ellipsis, NoSymbol ] }; // t // ALPHABETIC
+ key <AD06> { [ any,any, leftarrow, yen ] }; // y
+ key <AD07> { [ any,any, downarrow, uparrow ] }; // u
+ key <AD08> { [ any,any, rightarrow, NoSymbol ] }; // i
+ key <AD09> { [ any,any, section, NoSymbol ] }; // o // ALPHABETIC
+ key <AD11> { [ any,any, division, NoSymbol ] }; // [
+ key <AD12> { [ any,any, multiply, NoSymbol ] }; // ]
+
+ key <AC02> { [ any,any, doublelowquotemark, guillemotright ] }; // s
+ key <AC03> { [ any,any, leftdoublequotemark, guillemotleft ] }; // d
+ key <AC04> { [ any,any, bracketleft, NoSymbol ] }; // f
+ key <AC05> { [ any,any, bracketright, NoSymbol ] }; // g
+ key <BKSL> { [ any,any, currency, NoSymbol ] }; // \
+
+ key <AB01> { [ any,any, leftsinglequotemark, NoSymbol ] }; // z
+ key <AB02> { [ any,any, rightsinglequotemark,NoSymbol ] }; // x
+ key <AB03> { [ any,any, cent, copyright ] }; // c
+ key <AB04> { [ any,any, at, NoSymbol ] }; // v
+ key <AB05> { [ any,any, braceleft, NoSymbol ] }; // b
+ key <AB06> { [ any,any, braceright, NoSymbol ] }; // n
+ key <AB07> { [ any,any, asciicircum, NoSymbol ] }; // m
+ key <AB08> { [ any,any, less, NoSymbol ] }; // , <
+ key <AB09> { [ any,any, greater, NoSymbol ] }; // . >
+ key <AB10> { [ any,any, emdash, endash ] }; // / ?
+};
+
+partial alphanumeric_keys
+xkb_symbols "latinunicode" {
+ // This mapping supports the Unicode characters 0x1c4-0x1cc (dz, lj, and nj
+ // as single character). You get the title form with AltGr+Shift.
+
+ name[Group1]= "Serbia - Latin Unicode";
+
+ include "rs(latin)"
+ include "rs(twoletter)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "latinyz" {
+ // For those who insist on using "english-position" Z and Y.
+
+ name[Group1]= "Serbia - Latin qwerty";
+
+ include "rs(latin)"
+
+ key <AD06> { [ y, Y, any,any ] }; // y
+ key <AB01> { [ z, Z, any,any ] }; // z
+};
+
+partial alphanumeric_keys
+xkb_symbols "latinunicodeyz" {
+ // Unicode, ZHE and Z swapped.
+
+ name[Group1]= "Serbia - Latin Unicode qwerty";
+
+ include "rs(latinunicode)"
+
+ key <AD06> { [ zcaron, Zcaron, any,any ] }; // y
+ key <AB01> { [ z, Z, any,any ] }; // z
+};
+
+xkb_symbols "alternatequotes" {
+ // Another acceptable »pair of quotes« for Serbian
+
+ name[Group1]= "Serbia - With guillemets";
+
+ include "rs(basic)"
+
+ key <AC02> { [ any,any, guillemotright, NoSymbol ] }; // s
+ key <AC03> { [ any,any, guillemotleft, NoSymbol ] }; // d
+};
+
+xkb_symbols "latinalternatequotes" {
+ // Another acceptable »pair of quotes« for Serbian
+
+ name[Group1]= "Serbia - Latin with guillemets";
+
+ include "rs(latin)"
+
+ key <AC02> { [ any,any, guillemotright, NoSymbol ] }; // s
+ key <AC03> { [ any,any, guillemotleft, NoSymbol ] }; // d
+};
+
+xkb_symbols "rue" {
+ // Homophonic layout for Pannonian Rusyn (spoken mainly in Serbia and
+ // Croatia by the Rusyn people), based on Ukrainian homophonic.
+ // Author: Ljubomir J. Papuga (Любомир Я. Папуґа) <papuga.rs@gmail.com>
+
+ name[Group1]= "Serbia - Pannonian Rusyn Homophonic";
+
+ include "ua(homophonic)"
+
+ key <TLDE> { [ grave, asciitilde ] };
+ key <AE03> { [ 3, doublelowquotemark ] };
+ key <AE04> { [ 4, rightdoublequotemark ] };
+ key <AE07> { [ 7, EuroSign ] };
+ key <AE11> { [ 0x002D, emdash ] };
+ key <AE12> { [ equal, plus ] };
+
+ key <AD02> { [ Ukrainian_ie, Ukrainian_IE ] };
+ key <AD06> { [ Cyrillic_yu, Cyrillic_YU ] };
+ key <AD08> { [ Cyrillic_i, Cyrillic_I ] };
+ key <AD11> { [ Cyrillic_sha, Cyrillic_SHA ] };
+ key <AD12> { [ Cyrillic_shcha, Cyrillic_SHCHA ] };
+
+ key <LSGT> { [ Ukrainian_yi, Ukrainian_YI ] };
+ key <AB08> { [ comma, semicolon ] };
+ key <AB09> { [ period, colon ] };
+};
+
+// EXTRAS:
+
+xkb_symbols "combiningkeys" {
+ // Raw combining characters instead of dead keys,
+ // especially good for post-accenting texts.
+
+ name[Group1]= "Serbia - Combining accents instead of dead keys";
+
+ include "rs(basic)"
+
+ key <AE03> { [ any,any, U0302, dead_circumflex ] }; // 3, U0302 = COMBINING CIRCUMFLEX ACCENT
+ key <AE07> { [ any,any, U0300, NoSymbol ] }; // 7, U0300 = COMBINING GRAVE ACCENT
+ key <AE08> { [ any,any, U030F, NoSymbol ] }; // 8, U030F = COMBINING DOUBLE GRAVE ACCENT
+ key <AE09> { [ any,any, U0301, NoSymbol ] }; // 9, U0301 = COMBINING ACUTE ACCENT
+ key <AE10> { [ any,any, U0311, NoSymbol ] }; // 0, U0311 = COMBINING INVERTED BREVE
+ key <AE11> { [ any,any, U0304, NoSymbol ] }; // -, U0304 = COMBINING MACRON
+};
diff --git a/xorg-server/xkeyboard-config/symbols/ru b/xorg-server/xkeyboard-config/symbols/ru
index 79323ca89..7d94b4768 100644
--- a/xorg-server/xkeyboard-config/symbols/ru
+++ b/xorg-server/xkeyboard-config/symbols/ru
@@ -1,588 +1,588 @@
-// based on
-// russian standard keyboard
-// AEN <aen@logic.ru>
-// 2001/12/23 by Leon Kanter <leon@blackcatlinux.com>
-// 2005/12/09 Valery Inozemtsev <shrek@altlinux.ru>
-
-// Windows layout
-partial default alphanumeric_keys
-xkb_symbols "winkeys" {
- include "ru(common)"
-
- name[Group1]= "Russia";
-
- key <AE03> { [ 3, numerosign ] };
- key <AE04> { [ 4, semicolon ] };
- key <AE05> { [ 5, percent ] };
- key <AE06> { [ 6, colon ] };
- key <AE07> { [ 7, question ] };
- key <AE08> { [ 8, asterisk ] };
-
- key <AB10> { [ period, comma ] };
- key <BKSL> { [ backslash, slash ] };
-};
-
-partial hidden alphanumeric_keys
-xkb_symbols "common" {
-
- key <AE01> { [ 1, exclam ] };
- key <AE02> { [ 2, quotedbl ] };
- key <AE03> { [ 3, numbersign ] };
- key <AE04> { [ 4, asterisk ] };
- key <AE05> { [ 5, colon ] };
- key <AE06> { [ 6, comma ] };
- key <AE07> { [ 7, period ] };
- key <AE08> { [ 8, semicolon ] };
- key <AE09> { [ 9, parenleft ] };
- key <AE10> { [ 0, parenright ] };
- key <AE11> { [ minus, underscore ] };
- key <AE12> { [ equal, plus ] };
- key <BKSL> { [ backslash, bar ] };
- key <AB10> { [ slash, question ] };
- key <LSGT> { [ slash, bar ] };
-
- key <TLDE> { [ Cyrillic_io, Cyrillic_IO ] };
- key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI ] };
- key <AD02> { [ Cyrillic_tse, Cyrillic_TSE ] };
- key <AD03> { [ Cyrillic_u, Cyrillic_U ] };
- key <AD04> { [ Cyrillic_ka, Cyrillic_KA ] };
- key <AD05> { [ Cyrillic_ie, Cyrillic_IE ] };
- key <AD06> { [ Cyrillic_en, Cyrillic_EN ] };
- key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE ] };
- key <AD08> { [ Cyrillic_sha, Cyrillic_SHA ] };
- key <AD09> { [ Cyrillic_shcha, Cyrillic_SHCHA ] };
- key <AD10> { [ Cyrillic_ze, Cyrillic_ZE ] };
- key <AD11> { [ Cyrillic_ha, Cyrillic_HA ] };
- key <AD12> { [Cyrillic_hardsign,Cyrillic_HARDSIGN ] };
- key <AC01> { [ Cyrillic_ef, Cyrillic_EF ] };
- key <AC02> { [ Cyrillic_yeru, Cyrillic_YERU ] };
- key <AC03> { [ Cyrillic_ve, Cyrillic_VE ] };
- key <AC04> { [ Cyrillic_a, Cyrillic_A ] };
- key <AC05> { [ Cyrillic_pe, Cyrillic_PE ] };
- key <AC06> { [ Cyrillic_er, Cyrillic_ER ] };
- key <AC07> { [ Cyrillic_o, Cyrillic_O ] };
- key <AC08> { [ Cyrillic_el, Cyrillic_EL ] };
- key <AC09> { [ Cyrillic_de, Cyrillic_DE ] };
- key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE ] };
- key <AC11> { [ Cyrillic_e, Cyrillic_E ] };
- key <AB01> { [ Cyrillic_ya, Cyrillic_YA ] };
- key <AB02> { [ Cyrillic_che, Cyrillic_CHE ] };
- key <AB03> { [ Cyrillic_es, Cyrillic_ES ] };
- key <AB04> { [ Cyrillic_em, Cyrillic_EM ] };
- key <AB05> { [ Cyrillic_i, Cyrillic_I ] };
- key <AB06> { [ Cyrillic_te, Cyrillic_TE ] };
- key <AB07> { [Cyrillic_softsign,Cyrillic_SOFTSIGN ] };
- key <AB08> { [ Cyrillic_be, Cyrillic_BE ] };
- key <AB09> { [ Cyrillic_yu, Cyrillic_YU ] };
-
- key.type[group1]="TWO_LEVEL";
-
- include "kpdl(comma)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "legacy" {
- include "ru(common)"
-
- name[Group1]= "Russia - Legacy";
-};
-
-partial alphanumeric_keys
-xkb_symbols "olpc" {
-
- include "ru(common)"
-
- key <TLDE> { [ 0x01000451, 0x01000401, grave ] }; // Ñ‘, Ð
- key <AE03> { [ 3, numbersign, 0x01002116 ] }; // â„–
- key <AE04> { [ 4, dollar, semicolon ] };
- key <AE06> { [ 6, asciicircum, colon ] };
- key <AE07> { [ 7, ampersand ] };
- key <AE09> { [ 9, parenleft, acute ] };
- key <AC12> { [ backslash, bar, slash ] };
-
- include "group(olpc)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "typewriter" {
- include "ru(common)"
- name[Group1]= "Russia - Typewriter";
- key <TLDE> { [ bar, plus ] };
- key <AE01> { [ numerosign, 1 ] };
- key <AE02> { [ minus, 2 ] };
- key <AE03> { [ slash, 3 ] };
- key <AE04> { [ quotedbl, 4 ] };
- key <AE05> { [ colon, 5 ] };
- key <AE06> { [ comma, 6 ] };
- key <AE07> { [ period, 7 ] };
- key <AE08> { [ underscore, 8 ] };
- key <AE09> { [ question, 9 ] };
- key <AE10> { [ percent, 0 ] };
- key <AE11> { [ exclam, equal ] };
- key <AE12> { [ semicolon, backslash ] };
-
- key <BKSL> { [ parenright, parenleft ] };
-
- key <AD12> { [Cyrillic_hardsign,Cyrillic_HARDSIGN ] };
- key <AB10> { [ Cyrillic_io, Cyrillic_IO ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "typewriter-legacy" {
- include "ru(common)"
- name[Group1]= "Russia - Typewriter, legacy";
- key <TLDE> { [ apostrophe, quotedbl ] };
- key <AE01> { [ exclam, 1 ] };
- key <AE02> { [ numerosign, 2 ] };
- key <AE03> { [ slash, 3 ] };
- key <AE04> { [ semicolon, 4 ] };
- key <AE05> { [ colon, 5 ] };
- key <AE06> { [ comma, 6 ] };
- key <AE07> { [ period, 7 ] };
- key <AE08> { [ underscore, 8 ] };
- key <AE09> { [ question, 9 ] };
- key <AE10> { [ percent, 0 ] };
- key <BKSL> { [ parenleft, parenright ] };
-
- key <AD12> { [Cyrillic_hardsign,Cyrillic_HARDSIGN ] };
- key <AB10> { [ Cyrillic_io, Cyrillic_IO ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "phonetic" {
-
- name[Group1]= "Russia - Phonetic";
-
- key <AE01> { [ 1, exclam ] };
- key <AE02> { [ 2, at ] };
- key <AE03> { [ 3, Cyrillic_io ] };
- key <AE04> { [ 4, Cyrillic_IO ] };
- key <AE05> { [ 5, Cyrillic_hardsign ] };
- key <AE06> { [ 6, Cyrillic_HARDSIGN ] };
- key <AE07> { [ 7, ampersand ] };
- key <AE08> { [ 8, asterisk ] };
- key <AE09> { [ 9, parenleft ] };
- key <AE10> { [ 0, parenright ] };
- key <AE11> { [ minus, underscore ] };
-
- key <AB09> { [ period, greater ] };
- key <AB10> { [ slash, question ] };
- key <AB08> { [ comma, less ] };
- key <AC10> { [ semicolon, colon ] };
- key <AC11> { [ apostrophe, quotedbl ] };
- key <LSGT> { [ bar, brokenbar ] };
-
- key <TLDE> { [ Cyrillic_yu, Cyrillic_YU ] };
- key <LatQ> { [ Cyrillic_ya, Cyrillic_YA ] };
- key <LatZ> { [ Cyrillic_ze, Cyrillic_ZE ] };
- key <LatS> { [ Cyrillic_es, Cyrillic_ES ] };
- key <LatA> { [ Cyrillic_a, Cyrillic_A ] };
- key <LatW> { [ Cyrillic_ve, Cyrillic_VE ] };
- key <LatC> { [ Cyrillic_tse, Cyrillic_TSE ] };
- key <LatX> { [Cyrillic_softsign,Cyrillic_SOFTSIGN ] };
- key <LatD> { [ Cyrillic_de, Cyrillic_DE ] };
- key <LatE> { [ Cyrillic_ie, Cyrillic_IE ] };
- key <LatV> { [ Cyrillic_zhe, Cyrillic_ZHE ] };
- key <LatF> { [ Cyrillic_ef, Cyrillic_EF ] };
- key <LatT> { [ Cyrillic_te, Cyrillic_TE ] };
- key <LatR> { [ Cyrillic_er, Cyrillic_ER ] };
- key <LatN> { [ Cyrillic_en, Cyrillic_EN ] };
- key <LatB> { [ Cyrillic_be, Cyrillic_BE ] };
- key <LatH> { [ Cyrillic_ha, Cyrillic_HA ] };
- key <LatG> { [ Cyrillic_ghe, Cyrillic_GHE ] };
- key <LatY> { [ Cyrillic_yeru, Cyrillic_YERU ] };
- key <LatM> { [ Cyrillic_em, Cyrillic_EM ] };
- key <LatJ> { [ Cyrillic_shorti, Cyrillic_SHORTI ] };
- key <LatU> { [ Cyrillic_u, Cyrillic_U ] };
- key <LatK> { [ Cyrillic_ka, Cyrillic_KA ] };
- key <LatI> { [ Cyrillic_i, Cyrillic_I ] };
- key <LatO> { [ Cyrillic_o, Cyrillic_O ] };
- key <LatL> { [ Cyrillic_el, Cyrillic_EL ] };
- key <LatP> { [ Cyrillic_pe, Cyrillic_PE ] };
-
- key <AD11> { [ Cyrillic_sha, Cyrillic_SHA ] };
- key <AE12> { [ Cyrillic_che, Cyrillic_CHE ] };
- key <AD12> { [ Cyrillic_shcha, Cyrillic_SHCHA ] };
- key <BKSL> { [ Cyrillic_e, Cyrillic_E ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "phonetic_winkeys" {
-
- include "ru(phonetic)"
- name[Group1]= "Russia - Phonetic Winkeys";
-
- key <LatX> { [ Cyrillic_ha, Cyrillic_HA ] };
- key <LatH> { [ Cyrillic_che, Cyrillic_CHE ] };
- key <AE12> { [ Cyrillic_softsign, Cyrillic_softsign ] };
-
-};
-
-partial alphanumeric_keys
-xkb_symbols "tt" {
- include "ru(winkeys)"
- name[Group1]= "Russia - Tatar";
-
- key.type[group1]="FOUR_LEVEL";
-
- key <TLDE> { [ 0x010004bb, 0x010004ba,
- Cyrillic_io, Cyrillic_IO ] };
- key <AD02> { [ 0x010004e9, 0x010004e8,
- Cyrillic_tse, Cyrillic_TSE ] };
- key <AD09> { [ 0x010004d9, 0x010004d8,
- Cyrillic_shcha, Cyrillic_SHCHA ] };
- key <AD12> { [ 0x010004af, 0x010004ae,
- Cyrillic_hardsign,Cyrillic_HARDSIGN ] };
- key <AC10> { [ 0x010004a3, 0x010004a2,
- Cyrillic_zhe, Cyrillic_ZHE ] };
- key <AB07> { [ 0x01000497, 0x01000496,
- Cyrillic_softsign,Cyrillic_SOFTSIGN ] };
-
- include "level3(ralt_switch)"
-
-};
-
-partial alphanumeric_keys
-xkb_symbols "os_legacy" {
- include "ru(common)"
-
- name[Group1]= "Russia - Ossetian, legacy";
-
- key <TLDE> { [ Cyrillic_e, Cyrillic_E ] };
- key <AC07> { [ Cyrillic_o, Cyrillic_O, Cyrillic_io, Cyrillic_IO ] };
- key <AC11> { [ 0x010004D5, 0x010004D4 ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "os_winkeys" {
- include "ru(winkeys)"
-
- name[Group1]= "Russia - Ossetian, Winkeys";
-
- key <TLDE> { [ Cyrillic_e, Cyrillic_E ] };
- key <AC07> { [ Cyrillic_o, Cyrillic_O, Cyrillic_io, Cyrillic_IO ] };
- key <AC11> { [ 0x010004D5, 0x010004D4 ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "cv" {
- include "ru(winkeys)"
-
- name[Group1]= "Russia - Chuvash";
-
- key.type[group1]="FOUR_LEVEL";
-
- key <AD03> { [ Cyrillic_u, Cyrillic_U,
- 0x010004f3, 0x010004f2 ] };
- key <AD05> { [ Cyrillic_ie, Cyrillic_IE,
- 0x01000115, 0x01000114 ] };
- key <AC04> { [ Cyrillic_a, Cyrillic_A,
- abreve, Abreve ] };
- key <AB03> { [ Cyrillic_es, Cyrillic_ES,
- ccedilla, Ccedilla ] };
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "udm" {
- include "ru(winkeys)"
-
- name[Group1]= "Russia - Udmurt";
-
- key.type[group1]="FOUR_LEVEL";
-
- key <AE01> { [ question, exclam, 1, 1 ] };
- key <AE02> { [ parenleft, quotedbl, 2, 2 ] };
- key <AE03> { [ parenright, numerosign, 3, 3 ] };
- key <AE04> { [ colon, semicolon, 4, 4 ] };
- key <AE05> { [ asterisk, percent, 5, 5 ] };
- key <AE06> { [ 0x010004dd, 0x010004dc, 6, 6 ] };
- key <AE07> { [ 0x010004e7, 0x010004e6, 7, 7 ] };
- key <AE08> { [ 0x010004f5, 0x010004f4, 8, 8 ] };
- key <AE09> { [ 0x010004e5, 0x010004e4, 9, 9 ] };
- key <AE10> { [ 0x010004df, 0x010004de, 0, 0 ] };
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "cv_latin" {
- include "us(alt-intl)"
-
- name[Group1]= "Russia - Chuvash Latin";
-
- key.type[group1]="FOUR_LEVEL";
-
- key <AD01> { [ q, Q, 0x01000161, 0x01000160 ] };
- key <AD02> { [ w, W, udiaeresis, Udiaeresis ] };
- key <AD03> { [ e, E, 0x01000115, 0x01000114 ] };
- key <AD07> { [ u, U, udiaeresis, Udiaeresis ] };
- key <AD08> { [ i, I, 0x0100012d, 0x0100012c ] };
- key <AD09> { [ o, O, odiaeresis, Odiaeresis ] };
- key <AC01> { [ a, A, abreve, Abreve ] };
- key <AC02> { [ s, S, scedilla, Scedilla ] };
- key <AC05> { [ g, G, gbreve, Gbreve ] };
- key <AC07> { [ j, J, 0x01000131, 0x01000130 ] };
- key <AB03> { [ c, C, ccedilla, Ccedilla ] };
-
- include "level3(ralt_switch)"
-
-};
-
-// Komi language layout
-// based on
-// russian standard keyboard
-// Vlad Shakhov <lumpen.intellectual@gmail.com>
-// Last Changes 2007/10/23 by Vlad Shakhov <lumpen.intellectual@gmail.com>
-
-partial alphanumeric_keys
-xkb_symbols "kom" {
-
- include "ru(winkeys)"
-
- name[Group1]= "Russia - Komi";
-
- key.type[group1]="FOUR_LEVEL_ALPHABETIC";
-
-// cyrilllic o with diaeresis
- key <AC07> { [ Cyrillic_o, Cyrillic_O,
- U04E7, U04E6 ] };
-
-// hard I as additional key for soft Cyrillic_I
- key <AB05> { [ Cyrillic_i, Cyrillic_I,
- Ukrainian_i, Ukrainian_I ] };
-
- include "level3(ralt_switch)"
-};
-
-// Yakut language layout
-// 2008/04/23 Yakov Aleksandrov <bertjickty@yandex.ru>
-// 2008/04/23 Anatoliy Zhozhikov <jav@sitc.ru>
-// 2008/04/23 Aleksandr Varlamov
-partial alphanumeric_keys
-xkb_symbols "sah" {
-
- include "ru(winkeys)"
-
- name[Group1]= "Russia - Yakut";
-
- key.type[group1]="FOUR_LEVEL_ALPHABETIC";
-
- key <TLDE> { [ Cyrillic_io, Cyrillic_IO,
- U04EB, U04EA ] };
- key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI,
- U048B, U048A ] };
- key <AD03> { [ Cyrillic_u, Cyrillic_U,
- Cyrillic_u_straight, Cyrillic_U_straight ] };
- key <AD04> { [ Cyrillic_ka, Cyrillic_KA,
- U04C4, U04C3 ] };
- key <AD06> { [ Cyrillic_en, Cyrillic_EN,
- U04A5, U04A4 ] };
- key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE,
- U0495, U0494 ] };
- key <AD10> { [ Cyrillic_ze, Cyrillic_ZE,
- U04E1, U04E0 ] };
- key <AD11> { [ Cyrillic_ha, Cyrillic_HA,
- Cyrillic_shha, Cyrillic_SHHA ] };
- key <AC07> { [ Cyrillic_o, Cyrillic_O,
- Cyrillic_o_bar, Cyrillic_O_bar ] };
- key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE,
- U0461, U0460 ] };
- key <AB02> { [ Cyrillic_che, Cyrillic_CHE,
- Cyrillic_u_macron, Cyrillic_U_macron ] };
- key <AB04> { [ Cyrillic_em, Cyrillic_EM,
- U04C8, U04C7 ] };
- key <AB05> { [ Cyrillic_i, Cyrillic_I,
- Cyrillic_i_macron, Cyrillic_I_macron ] };
-
- include "level3(ralt_switch)"
-};
-
-
-//Kalmyk language layout
-//based on the Kalmyk language layout: http://soft.oyrat.org/
-//Nikolay Korneev <halmg@oyrat.org>
-//Toli Miron <mirontoli@gmail.com>
-
-partial alphanumeric_keys
-xkb_symbols "xal" {
- include "ru(winkeys)"
-
- name[Group1]= "Russia - Kalmyk";
-
- key.type[group1]="FOUR_LEVEL";
-
- key <AE01> { [ question, exclam, 1 ] };
- key <AE02> { [ numerosign, quotedbl, 2 ] };
- key <AE03> { [ Cyrillic_u_straight, Cyrillic_U_straight, 3 ] };
- key <AE04> { [ Cyrillic_schwa, Cyrillic_SCHWA, 4 ] };
- key <AE05> { [ asterisk, percent, 5 ] };
- key <AE06> { [ Cyrillic_en_descender, Cyrillic_EN_descender, 6 ] };
- key <AE07> { [ Cyrillic_o_bar, Cyrillic_O_bar, 7 ] };
- key <AE08> { [ Cyrillic_shha, Cyrillic_SHHA, 8 ] };
- key <AE09> { [ Cyrillic_zhe_descender, Cyrillic_ZHE_descender, 9 ] };
- key <AE10> { [ semicolon, colon, 0 ] };
-
- key <TLDE> { [ parenleft, parenright, Cyrillic_io, Cyrillic_IO ] };
-
- key <AD02> { [ Cyrillic_tse, Cyrillic_TSE, dollar ] };
- key <AD03> { [ Cyrillic_u, Cyrillic_U, EuroSign ] };
- key <AD04> { [ Cyrillic_ka, Cyrillic_KA, registered ] };
- key <AD05> { [ Cyrillic_ie, Cyrillic_IE, trademark ] };
- key <AD11> { [ Cyrillic_ha, Cyrillic_HA, bracketleft ] };
- key <AD12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, bracketright ] };
- key <AC11> { [ Cyrillic_e, Cyrillic_E, apostrophe ] };
- key <AB03> { [ Cyrillic_es, Cyrillic_ES, copyright ] };
- key <AB08> { [ Cyrillic_be, Cyrillic_BE, less ] };
- key <AB09> { [ Cyrillic_yu, Cyrillic_YU, greater ] };
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "dos" {
-
- include "ru(common)"
-
- name[Group1]= "Russia - DOS";
-
- key <TLDE> { [ parenright, parenleft ] };
- key <AE04> { [ 4, currency ] };
- key <AE09> { [ 9, question ] };
- key <AE10> { [ 0, percent ] };
-
- key <AB10> { [ Cyrillic_io, Cyrillic_IO ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "bak" {
- include "ru(winkeys)"
-
- name[Group1]= "Russia - Bashkirian";
- key.type[group1]="FOUR_LEVEL";
-
- key <TLDE> { [ 0x010004d9, 0x010004d8, Cyrillic_io, Cyrillic_IO ] };
- key <AE01> { [ exclam, quotedbl, 1, 1 ] };
- key <AE02> { [ 0x010004e9, 0x010004e8, 2, 2 ] };
- key <AE03> { [ 0x010004a1, 0x010004a0, 3, 3 ] };
- key <AE04> { [ 0x01000493, 0x01000492, 4, 4 ] };
- key <AE05> { [ 0x010004ab, 0x010004aa, 5, 5 ] };
- key <AE06> { [ colon, semicolon, 6, 6 ] };
- key <AE07> { [ 0x01000499, 0x01000498, 7, 7 ] };
- key <AE08> { [ 0x010004bb, 0x010004ba, 8, 8 ] };
- key <AE09> { [ question, parenleft, 9, 9 ] };
- key <AE10> { [ numerosign, parenright, 0, 0 ] };
- key <AE11> { [ minus, percent, minus, underscore ]};
- key <AE12> { [ 0x010004af, 0x010004ae, equal, plus ]};
- key <BKSL> { [ 0x010004a3, 0x010004a2, backslash, slash ]};
-
- include "level3(ralt_switch)"
-};
-
-// Serbian charecters added as third level symbols to Russian keyboard layout.
-
-partial alphanumeric_keys
-xkb_symbols "srp" {
- include "ru(common)"
- include "level3(ralt_switch)"
-
- name[Group1]= "Russia - Serbian";
-
- key <AE03> { [ 3, numerosign ] };
- key <AE04> { [ 4, semicolon ] };
- key <AE05> { [ 5, percent ] };
- key <AE06> { [ 6, colon ] };
- key <AE07> { [ 7, question ] };
- key <AE08> { [ 8, asterisk ] };
- key <AB10> { [ period, comma ] };
- key <BKSL> { [ backslash, slash ] };
- key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI, U458, U408 ] };
- key <AD06> { [ Cyrillic_en, Cyrillic_EN, U45A, U40A ] };
- key <AC08> { [ Cyrillic_el, Cyrillic_EL, U459, U409 ] };
- key <AC09> { [ Cyrillic_de, Cyrillic_DE, U45F, U40F ] };
- key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE, U452, U402 ] };
- key <AB02> { [ Cyrillic_che, Cyrillic_CHE, U45B, U40B ] };
-};
-
-// Mari language layout
-// based on Russian standard keyboard
-// http://www.marlamuter.ru/
-partial alphanumeric_keys
-xkb_symbols "chm" {
- include "ru(common)"
-
- name[Group1]= "Russia - Mari";
-
- key.type[group1]="FOUR_LEVEL_ALPHABETIC";
- key <AC04> { [ Cyrillic_a, Cyrillic_A, U04D3, U04D2 ] };
- key <AD03> { [ Cyrillic_u, Cyrillic_U, U04F1, U04F0 ] };
- key <AC02> { [ Cyrillic_ui, Cyrillic_UI, U04F9, U04F8 ] };
- key <AD06> { [ Cyrillic_n, Cyrillic_N, U04A5, U04A4 ] };
- key <AC11> { [ Cyrillic_e, Cyrillic_E, U04E9, U04E8 ] };
- key <AC10> { [ Cyrillic_zh, Cyrillic_ZH, U04EB, U04EA ] };
- key <AC01> { [ Cyrillic_f, Cyrillic_F, UF537, UF536 ] };
-
- include "level3(ralt_switch)"
-};
-
-// EXTRAS:
-
-// Church Slavonic language layout
-// based on
-// russian standard keyboard
-// Aleksandr Andreev and Yuri Shardt
-// Last Changes 2010/08/01. Contact <aleksandr.andreev@gmail.com>
-
-partial alphanumeric_keys
-xkb_symbols "chu"
-{
- name[Group1]= "Russia - Church Slavonic";
- key <TLDE> { [ U0457, U0407, U0482, U20DD ] }; // ї Ї ҂ e.g: а⃝ where the last is a combining ten thousands sign
- key <AE01> { [ U0461, U0460, U047D, U047C] }; // ѡ Ѡ ѽ Ѽ
- key <AE02> { [ U0454, U0404, U0465, U0464] }; // є Є ѥ Ѥ
- key <AE03> { [ U046F, U046E, U0469, U0468] }; // ѯ Ѯ ѩ Ѩ
- key <AE04> { [ U0471, U0470, U046D, U046C] }; // ѱ Ѱ ѭ Ѭ
- key <AE05> { [ U0473, U0472, UA657, UA656] }; // ѳ Ѳ iotified A
- key <AE06> { [ U0475, U0474, U0477, U0476] }; // ѵ Ѵ ѷ Ѷ
- key <AE07> { [ U047B, U047A, UA64D, UA64C] }; // ѻ Ѻ ꙍ Ꙍ
- key <AE08> { [ U047F, U047E, U046B, U046A] }; // ѿ Ѿ ѫ Ѫ
- key <AE09> { [ U0455, U0405, parenleft, U002A ] }; // ѕ Ѕ ( *
- key <AE10> { [ Cyrillic_u, Cyrillic_U, parenright, U0488 ] }; // у У ) NB: for diagraph Ouk, use Cyrillic_o + Cyrillic_u
- key <AE11> { [ U0483, U0486, U0487, U005F] }; // а҃ а҆ а҇, _ (titlo, psili, pokrytie, underscore)
- key <AE12> { [ U0301, U0300, U0484, UA67E] }; // а̀ а́ а҄ ꙾ (oxia, varia, kamora, kavyka)
- key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI, U0456 ] };
- key <AD02> { [ Cyrillic_tse, Cyrillic_TSE, U2DF0 ] };
- key <AD03> { [ UA64B, UA64A, U2DF9 ] }; // Cyrillic monograph Uk (not U)!
- key <AD04> { [ Cyrillic_ka, Cyrillic_KA, U2DE6 ] };
- key <AD05> { [ Cyrillic_ie, Cyrillic_IE, U2DF7 ] };
- key <AD06> { [ Cyrillic_en, Cyrillic_EN, U2DE9 ] };
- key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE, U2DE2 ] };
- key <AD08> { [ Cyrillic_sha, Cyrillic_SHA, U2DF2 ] };
- key <AD09> { [ Cyrillic_shcha, Cyrillic_SHCHA, U2DF3 ] };
- key <AD10> { [ Cyrillic_ze, Cyrillic_ZE, U2DE5 ] };
- key <AD11> { [ Cyrillic_ha, Cyrillic_HA, U2DEF ] };
- key <AD12> { [Cyrillic_hardsign,Cyrillic_HARDSIGN, UA67D ] }; // Payerok
- key <BKSL> { [backslash, slash, colon, question] }; // \ / : ? (note, for Slavonic question use semicolon
- key <AC01> { [ Cyrillic_ef, Cyrillic_EF ] };
- key <AC02> { [ Cyrillic_yeru, Cyrillic_YERU ] };
- key <AC03> { [ Cyrillic_ve, Cyrillic_VE, U2DE1 ] };
- key <AC04> { [ Cyrillic_a, Cyrillic_A, U2DF6 ] };
- key <AC05> { [ Cyrillic_pe, Cyrillic_PE, U2DEB ] };
- key <AC06> { [ Cyrillic_er, Cyrillic_ER, U2DEC ] };
- key <AC07> { [ Cyrillic_o, Cyrillic_O, U2DEA ] };
- key <AC08> { [ Cyrillic_el, Cyrillic_EL, U2DE7 ] };
- key <AC09> { [ Cyrillic_de, Cyrillic_DE, U2DE3 ] };
- key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE, U2DE4 ] };
- key <AC11> { [ U0463, U0462, U2DFA ] }; // Yat
- key <AB01> { [ U0467, U0466, U2DFD ] }; // Small Yus
- key <AB02> { [ Cyrillic_che, Cyrillic_CHE, U2DF1 ] };
- key <AB03> { [ Cyrillic_es, Cyrillic_ES, U2DED ] };
- key <AB04> { [ Cyrillic_em, Cyrillic_EM, U2DE8 ] };
- key <AB05> { [ Cyrillic_i, Cyrillic_I ] };
- key <AB06> { [ Cyrillic_te, Cyrillic_TE, U2DEE ] };
- key <AB07> { [Cyrillic_softsign,Cyrillic_SOFTSIGN ] };
- key <AB08> { [ Cyrillic_be, Cyrillic_BE, U2DE0 ] };
- key <AB09> { [ Cyrillic_yu, Cyrillic_YU, U2DFB ] };
- key <AB10> { [ period, comma, semicolon, exclam ] };
-};
+// based on
+// russian standard keyboard
+// AEN <aen@logic.ru>
+// 2001/12/23 by Leon Kanter <leon@blackcatlinux.com>
+// 2005/12/09 Valery Inozemtsev <shrek@altlinux.ru>
+
+// Windows layout
+partial default alphanumeric_keys
+xkb_symbols "winkeys" {
+ include "ru(common)"
+
+ name[Group1]= "Russia";
+
+ key <AE03> { [ 3, numerosign ] };
+ key <AE04> { [ 4, semicolon ] };
+ key <AE05> { [ 5, percent ] };
+ key <AE06> { [ 6, colon ] };
+ key <AE07> { [ 7, question ] };
+ key <AE08> { [ 8, asterisk ] };
+
+ key <AB10> { [ period, comma ] };
+ key <BKSL> { [ backslash, slash ] };
+};
+
+partial hidden alphanumeric_keys
+xkb_symbols "common" {
+
+ key <AE01> { [ 1, exclam ] };
+ key <AE02> { [ 2, quotedbl ] };
+ key <AE03> { [ 3, numbersign ] };
+ key <AE04> { [ 4, asterisk ] };
+ key <AE05> { [ 5, colon ] };
+ key <AE06> { [ 6, comma ] };
+ key <AE07> { [ 7, period ] };
+ key <AE08> { [ 8, semicolon ] };
+ key <AE09> { [ 9, parenleft ] };
+ key <AE10> { [ 0, parenright ] };
+ key <AE11> { [ minus, underscore ] };
+ key <AE12> { [ equal, plus ] };
+ key <BKSL> { [ backslash, bar ] };
+ key <AB10> { [ slash, question ] };
+ key <LSGT> { [ slash, bar ] };
+
+ key <TLDE> { [ Cyrillic_io, Cyrillic_IO ] };
+ key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI ] };
+ key <AD02> { [ Cyrillic_tse, Cyrillic_TSE ] };
+ key <AD03> { [ Cyrillic_u, Cyrillic_U ] };
+ key <AD04> { [ Cyrillic_ka, Cyrillic_KA ] };
+ key <AD05> { [ Cyrillic_ie, Cyrillic_IE ] };
+ key <AD06> { [ Cyrillic_en, Cyrillic_EN ] };
+ key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE ] };
+ key <AD08> { [ Cyrillic_sha, Cyrillic_SHA ] };
+ key <AD09> { [ Cyrillic_shcha, Cyrillic_SHCHA ] };
+ key <AD10> { [ Cyrillic_ze, Cyrillic_ZE ] };
+ key <AD11> { [ Cyrillic_ha, Cyrillic_HA ] };
+ key <AD12> { [Cyrillic_hardsign,Cyrillic_HARDSIGN ] };
+ key <AC01> { [ Cyrillic_ef, Cyrillic_EF ] };
+ key <AC02> { [ Cyrillic_yeru, Cyrillic_YERU ] };
+ key <AC03> { [ Cyrillic_ve, Cyrillic_VE ] };
+ key <AC04> { [ Cyrillic_a, Cyrillic_A ] };
+ key <AC05> { [ Cyrillic_pe, Cyrillic_PE ] };
+ key <AC06> { [ Cyrillic_er, Cyrillic_ER ] };
+ key <AC07> { [ Cyrillic_o, Cyrillic_O ] };
+ key <AC08> { [ Cyrillic_el, Cyrillic_EL ] };
+ key <AC09> { [ Cyrillic_de, Cyrillic_DE ] };
+ key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE ] };
+ key <AC11> { [ Cyrillic_e, Cyrillic_E ] };
+ key <AB01> { [ Cyrillic_ya, Cyrillic_YA ] };
+ key <AB02> { [ Cyrillic_che, Cyrillic_CHE ] };
+ key <AB03> { [ Cyrillic_es, Cyrillic_ES ] };
+ key <AB04> { [ Cyrillic_em, Cyrillic_EM ] };
+ key <AB05> { [ Cyrillic_i, Cyrillic_I ] };
+ key <AB06> { [ Cyrillic_te, Cyrillic_TE ] };
+ key <AB07> { [Cyrillic_softsign,Cyrillic_SOFTSIGN ] };
+ key <AB08> { [ Cyrillic_be, Cyrillic_BE ] };
+ key <AB09> { [ Cyrillic_yu, Cyrillic_YU ] };
+
+ key.type[group1]="TWO_LEVEL";
+
+ include "kpdl(comma)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "legacy" {
+ include "ru(common)"
+
+ name[Group1]= "Russia - Legacy";
+};
+
+partial alphanumeric_keys
+xkb_symbols "olpc" {
+
+ include "ru(common)"
+
+ key <TLDE> { [ 0x01000451, 0x01000401, grave ] }; // Ñ‘, Ð
+ key <AE03> { [ 3, numbersign, 0x01002116 ] }; // â„–
+ key <AE04> { [ 4, dollar, semicolon ] };
+ key <AE06> { [ 6, asciicircum, colon ] };
+ key <AE07> { [ 7, ampersand ] };
+ key <AE09> { [ 9, parenleft, acute ] };
+ key <AC12> { [ backslash, bar, slash ] };
+
+ include "group(olpc)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "typewriter" {
+ include "ru(common)"
+ name[Group1]= "Russia - Typewriter";
+ key <TLDE> { [ bar, plus ] };
+ key <AE01> { [ numerosign, 1 ] };
+ key <AE02> { [ minus, 2 ] };
+ key <AE03> { [ slash, 3 ] };
+ key <AE04> { [ quotedbl, 4 ] };
+ key <AE05> { [ colon, 5 ] };
+ key <AE06> { [ comma, 6 ] };
+ key <AE07> { [ period, 7 ] };
+ key <AE08> { [ underscore, 8 ] };
+ key <AE09> { [ question, 9 ] };
+ key <AE10> { [ percent, 0 ] };
+ key <AE11> { [ exclam, equal ] };
+ key <AE12> { [ semicolon, backslash ] };
+
+ key <BKSL> { [ parenright, parenleft ] };
+
+ key <AD12> { [Cyrillic_hardsign,Cyrillic_HARDSIGN ] };
+ key <AB10> { [ Cyrillic_io, Cyrillic_IO ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "typewriter-legacy" {
+ include "ru(common)"
+ name[Group1]= "Russia - Typewriter, legacy";
+ key <TLDE> { [ apostrophe, quotedbl ] };
+ key <AE01> { [ exclam, 1 ] };
+ key <AE02> { [ numerosign, 2 ] };
+ key <AE03> { [ slash, 3 ] };
+ key <AE04> { [ semicolon, 4 ] };
+ key <AE05> { [ colon, 5 ] };
+ key <AE06> { [ comma, 6 ] };
+ key <AE07> { [ period, 7 ] };
+ key <AE08> { [ underscore, 8 ] };
+ key <AE09> { [ question, 9 ] };
+ key <AE10> { [ percent, 0 ] };
+ key <BKSL> { [ parenleft, parenright ] };
+
+ key <AD12> { [Cyrillic_hardsign,Cyrillic_HARDSIGN ] };
+ key <AB10> { [ Cyrillic_io, Cyrillic_IO ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "phonetic" {
+
+ name[Group1]= "Russia - Phonetic";
+
+ key <AE01> { [ 1, exclam ] };
+ key <AE02> { [ 2, at ] };
+ key <AE03> { [ 3, Cyrillic_io ] };
+ key <AE04> { [ 4, Cyrillic_IO ] };
+ key <AE05> { [ 5, Cyrillic_hardsign ] };
+ key <AE06> { [ 6, Cyrillic_HARDSIGN ] };
+ key <AE07> { [ 7, ampersand ] };
+ key <AE08> { [ 8, asterisk ] };
+ key <AE09> { [ 9, parenleft ] };
+ key <AE10> { [ 0, parenright ] };
+ key <AE11> { [ minus, underscore ] };
+
+ key <AB09> { [ period, greater ] };
+ key <AB10> { [ slash, question ] };
+ key <AB08> { [ comma, less ] };
+ key <AC10> { [ semicolon, colon ] };
+ key <AC11> { [ apostrophe, quotedbl ] };
+ key <LSGT> { [ bar, brokenbar ] };
+
+ key <TLDE> { [ Cyrillic_yu, Cyrillic_YU ] };
+ key <LatQ> { [ Cyrillic_ya, Cyrillic_YA ] };
+ key <LatZ> { [ Cyrillic_ze, Cyrillic_ZE ] };
+ key <LatS> { [ Cyrillic_es, Cyrillic_ES ] };
+ key <LatA> { [ Cyrillic_a, Cyrillic_A ] };
+ key <LatW> { [ Cyrillic_ve, Cyrillic_VE ] };
+ key <LatC> { [ Cyrillic_tse, Cyrillic_TSE ] };
+ key <LatX> { [Cyrillic_softsign,Cyrillic_SOFTSIGN ] };
+ key <LatD> { [ Cyrillic_de, Cyrillic_DE ] };
+ key <LatE> { [ Cyrillic_ie, Cyrillic_IE ] };
+ key <LatV> { [ Cyrillic_zhe, Cyrillic_ZHE ] };
+ key <LatF> { [ Cyrillic_ef, Cyrillic_EF ] };
+ key <LatT> { [ Cyrillic_te, Cyrillic_TE ] };
+ key <LatR> { [ Cyrillic_er, Cyrillic_ER ] };
+ key <LatN> { [ Cyrillic_en, Cyrillic_EN ] };
+ key <LatB> { [ Cyrillic_be, Cyrillic_BE ] };
+ key <LatH> { [ Cyrillic_ha, Cyrillic_HA ] };
+ key <LatG> { [ Cyrillic_ghe, Cyrillic_GHE ] };
+ key <LatY> { [ Cyrillic_yeru, Cyrillic_YERU ] };
+ key <LatM> { [ Cyrillic_em, Cyrillic_EM ] };
+ key <LatJ> { [ Cyrillic_shorti, Cyrillic_SHORTI ] };
+ key <LatU> { [ Cyrillic_u, Cyrillic_U ] };
+ key <LatK> { [ Cyrillic_ka, Cyrillic_KA ] };
+ key <LatI> { [ Cyrillic_i, Cyrillic_I ] };
+ key <LatO> { [ Cyrillic_o, Cyrillic_O ] };
+ key <LatL> { [ Cyrillic_el, Cyrillic_EL ] };
+ key <LatP> { [ Cyrillic_pe, Cyrillic_PE ] };
+
+ key <AD11> { [ Cyrillic_sha, Cyrillic_SHA ] };
+ key <AE12> { [ Cyrillic_che, Cyrillic_CHE ] };
+ key <AD12> { [ Cyrillic_shcha, Cyrillic_SHCHA ] };
+ key <BKSL> { [ Cyrillic_e, Cyrillic_E ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "phonetic_winkeys" {
+
+ include "ru(phonetic)"
+ name[Group1]= "Russia - Phonetic Winkeys";
+
+ key <LatX> { [ Cyrillic_ha, Cyrillic_HA ] };
+ key <LatH> { [ Cyrillic_che, Cyrillic_CHE ] };
+ key <AE12> { [ Cyrillic_softsign, Cyrillic_softsign ] };
+
+};
+
+partial alphanumeric_keys
+xkb_symbols "tt" {
+ include "ru(winkeys)"
+ name[Group1]= "Russia - Tatar";
+
+ key.type[group1]="FOUR_LEVEL";
+
+ key <TLDE> { [ 0x010004bb, 0x010004ba,
+ Cyrillic_io, Cyrillic_IO ] };
+ key <AD02> { [ 0x010004e9, 0x010004e8,
+ Cyrillic_tse, Cyrillic_TSE ] };
+ key <AD09> { [ 0x010004d9, 0x010004d8,
+ Cyrillic_shcha, Cyrillic_SHCHA ] };
+ key <AD12> { [ 0x010004af, 0x010004ae,
+ Cyrillic_hardsign,Cyrillic_HARDSIGN ] };
+ key <AC10> { [ 0x010004a3, 0x010004a2,
+ Cyrillic_zhe, Cyrillic_ZHE ] };
+ key <AB07> { [ 0x01000497, 0x01000496,
+ Cyrillic_softsign,Cyrillic_SOFTSIGN ] };
+
+ include "level3(ralt_switch)"
+
+};
+
+partial alphanumeric_keys
+xkb_symbols "os_legacy" {
+ include "ru(common)"
+
+ name[Group1]= "Russia - Ossetian, legacy";
+
+ key <TLDE> { [ Cyrillic_e, Cyrillic_E ] };
+ key <AC07> { [ Cyrillic_o, Cyrillic_O, Cyrillic_io, Cyrillic_IO ] };
+ key <AC11> { [ 0x010004D5, 0x010004D4 ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "os_winkeys" {
+ include "ru(winkeys)"
+
+ name[Group1]= "Russia - Ossetian, Winkeys";
+
+ key <TLDE> { [ Cyrillic_e, Cyrillic_E ] };
+ key <AC07> { [ Cyrillic_o, Cyrillic_O, Cyrillic_io, Cyrillic_IO ] };
+ key <AC11> { [ 0x010004D5, 0x010004D4 ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "cv" {
+ include "ru(winkeys)"
+
+ name[Group1]= "Russia - Chuvash";
+
+ key.type[group1]="FOUR_LEVEL";
+
+ key <AD03> { [ Cyrillic_u, Cyrillic_U,
+ 0x010004f3, 0x010004f2 ] };
+ key <AD05> { [ Cyrillic_ie, Cyrillic_IE,
+ 0x01000115, 0x01000114 ] };
+ key <AC04> { [ Cyrillic_a, Cyrillic_A,
+ abreve, Abreve ] };
+ key <AB03> { [ Cyrillic_es, Cyrillic_ES,
+ ccedilla, Ccedilla ] };
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "udm" {
+ include "ru(winkeys)"
+
+ name[Group1]= "Russia - Udmurt";
+
+ key.type[group1]="FOUR_LEVEL";
+
+ key <AE01> { [ question, exclam, 1, 1 ] };
+ key <AE02> { [ parenleft, quotedbl, 2, 2 ] };
+ key <AE03> { [ parenright, numerosign, 3, 3 ] };
+ key <AE04> { [ colon, semicolon, 4, 4 ] };
+ key <AE05> { [ asterisk, percent, 5, 5 ] };
+ key <AE06> { [ 0x010004dd, 0x010004dc, 6, 6 ] };
+ key <AE07> { [ 0x010004e7, 0x010004e6, 7, 7 ] };
+ key <AE08> { [ 0x010004f5, 0x010004f4, 8, 8 ] };
+ key <AE09> { [ 0x010004e5, 0x010004e4, 9, 9 ] };
+ key <AE10> { [ 0x010004df, 0x010004de, 0, 0 ] };
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "cv_latin" {
+ include "us(alt-intl)"
+
+ name[Group1]= "Russia - Chuvash Latin";
+
+ key.type[group1]="FOUR_LEVEL";
+
+ key <AD01> { [ q, Q, 0x01000161, 0x01000160 ] };
+ key <AD02> { [ w, W, udiaeresis, Udiaeresis ] };
+ key <AD03> { [ e, E, 0x01000115, 0x01000114 ] };
+ key <AD07> { [ u, U, udiaeresis, Udiaeresis ] };
+ key <AD08> { [ i, I, 0x0100012d, 0x0100012c ] };
+ key <AD09> { [ o, O, odiaeresis, Odiaeresis ] };
+ key <AC01> { [ a, A, abreve, Abreve ] };
+ key <AC02> { [ s, S, scedilla, Scedilla ] };
+ key <AC05> { [ g, G, gbreve, Gbreve ] };
+ key <AC07> { [ j, J, 0x01000131, 0x01000130 ] };
+ key <AB03> { [ c, C, ccedilla, Ccedilla ] };
+
+ include "level3(ralt_switch)"
+
+};
+
+// Komi language layout
+// based on
+// russian standard keyboard
+// Vlad Shakhov <lumpen.intellectual@gmail.com>
+// Last Changes 2007/10/23 by Vlad Shakhov <lumpen.intellectual@gmail.com>
+
+partial alphanumeric_keys
+xkb_symbols "kom" {
+
+ include "ru(winkeys)"
+
+ name[Group1]= "Russia - Komi";
+
+ key.type[group1]="FOUR_LEVEL_ALPHABETIC";
+
+// cyrilllic o with diaeresis
+ key <AC07> { [ Cyrillic_o, Cyrillic_O,
+ U04E7, U04E6 ] };
+
+// hard I as additional key for soft Cyrillic_I
+ key <AB05> { [ Cyrillic_i, Cyrillic_I,
+ Ukrainian_i, Ukrainian_I ] };
+
+ include "level3(ralt_switch)"
+};
+
+// Yakut language layout
+// 2008/04/23 Yakov Aleksandrov <bertjickty@yandex.ru>
+// 2008/04/23 Anatoliy Zhozhikov <jav@sitc.ru>
+// 2008/04/23 Aleksandr Varlamov
+partial alphanumeric_keys
+xkb_symbols "sah" {
+
+ include "ru(winkeys)"
+
+ name[Group1]= "Russia - Yakut";
+
+ key.type[group1]="FOUR_LEVEL_ALPHABETIC";
+
+ key <TLDE> { [ Cyrillic_io, Cyrillic_IO,
+ U04EB, U04EA ] };
+ key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI,
+ U048B, U048A ] };
+ key <AD03> { [ Cyrillic_u, Cyrillic_U,
+ Cyrillic_u_straight, Cyrillic_U_straight ] };
+ key <AD04> { [ Cyrillic_ka, Cyrillic_KA,
+ U04C4, U04C3 ] };
+ key <AD06> { [ Cyrillic_en, Cyrillic_EN,
+ U04A5, U04A4 ] };
+ key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE,
+ U0495, U0494 ] };
+ key <AD10> { [ Cyrillic_ze, Cyrillic_ZE,
+ U04E1, U04E0 ] };
+ key <AD11> { [ Cyrillic_ha, Cyrillic_HA,
+ Cyrillic_shha, Cyrillic_SHHA ] };
+ key <AC07> { [ Cyrillic_o, Cyrillic_O,
+ Cyrillic_o_bar, Cyrillic_O_bar ] };
+ key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE,
+ U0461, U0460 ] };
+ key <AB02> { [ Cyrillic_che, Cyrillic_CHE,
+ Cyrillic_u_macron, Cyrillic_U_macron ] };
+ key <AB04> { [ Cyrillic_em, Cyrillic_EM,
+ U04C8, U04C7 ] };
+ key <AB05> { [ Cyrillic_i, Cyrillic_I,
+ Cyrillic_i_macron, Cyrillic_I_macron ] };
+
+ include "level3(ralt_switch)"
+};
+
+
+//Kalmyk language layout
+//based on the Kalmyk language layout: http://soft.oyrat.org/
+//Nikolay Korneev <halmg@oyrat.org>
+//Toli Miron <mirontoli@gmail.com>
+
+partial alphanumeric_keys
+xkb_symbols "xal" {
+ include "ru(winkeys)"
+
+ name[Group1]= "Russia - Kalmyk";
+
+ key.type[group1]="FOUR_LEVEL";
+
+ key <AE01> { [ question, exclam, 1 ] };
+ key <AE02> { [ numerosign, quotedbl, 2 ] };
+ key <AE03> { [ Cyrillic_u_straight, Cyrillic_U_straight, 3 ] };
+ key <AE04> { [ Cyrillic_schwa, Cyrillic_SCHWA, 4 ] };
+ key <AE05> { [ asterisk, percent, 5 ] };
+ key <AE06> { [ Cyrillic_en_descender, Cyrillic_EN_descender, 6 ] };
+ key <AE07> { [ Cyrillic_o_bar, Cyrillic_O_bar, 7 ] };
+ key <AE08> { [ Cyrillic_shha, Cyrillic_SHHA, 8 ] };
+ key <AE09> { [ Cyrillic_zhe_descender, Cyrillic_ZHE_descender, 9 ] };
+ key <AE10> { [ semicolon, colon, 0 ] };
+
+ key <TLDE> { [ parenleft, parenright, Cyrillic_io, Cyrillic_IO ] };
+
+ key <AD02> { [ Cyrillic_tse, Cyrillic_TSE, dollar ] };
+ key <AD03> { [ Cyrillic_u, Cyrillic_U, EuroSign ] };
+ key <AD04> { [ Cyrillic_ka, Cyrillic_KA, registered ] };
+ key <AD05> { [ Cyrillic_ie, Cyrillic_IE, trademark ] };
+ key <AD11> { [ Cyrillic_ha, Cyrillic_HA, bracketleft ] };
+ key <AD12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, bracketright ] };
+ key <AC11> { [ Cyrillic_e, Cyrillic_E, apostrophe ] };
+ key <AB03> { [ Cyrillic_es, Cyrillic_ES, copyright ] };
+ key <AB08> { [ Cyrillic_be, Cyrillic_BE, less ] };
+ key <AB09> { [ Cyrillic_yu, Cyrillic_YU, greater ] };
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "dos" {
+
+ include "ru(common)"
+
+ name[Group1]= "Russia - DOS";
+
+ key <TLDE> { [ parenright, parenleft ] };
+ key <AE04> { [ 4, currency ] };
+ key <AE09> { [ 9, question ] };
+ key <AE10> { [ 0, percent ] };
+
+ key <AB10> { [ Cyrillic_io, Cyrillic_IO ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "bak" {
+ include "ru(winkeys)"
+
+ name[Group1]= "Russia - Bashkirian";
+ key.type[group1]="FOUR_LEVEL";
+
+ key <TLDE> { [ 0x010004d9, 0x010004d8, Cyrillic_io, Cyrillic_IO ] };
+ key <AE01> { [ exclam, quotedbl, 1, 1 ] };
+ key <AE02> { [ 0x010004e9, 0x010004e8, 2, 2 ] };
+ key <AE03> { [ 0x010004a1, 0x010004a0, 3, 3 ] };
+ key <AE04> { [ 0x01000493, 0x01000492, 4, 4 ] };
+ key <AE05> { [ 0x010004ab, 0x010004aa, 5, 5 ] };
+ key <AE06> { [ colon, semicolon, 6, 6 ] };
+ key <AE07> { [ 0x01000499, 0x01000498, 7, 7 ] };
+ key <AE08> { [ 0x010004bb, 0x010004ba, 8, 8 ] };
+ key <AE09> { [ question, parenleft, 9, 9 ] };
+ key <AE10> { [ numerosign, parenright, 0, 0 ] };
+ key <AE11> { [ minus, percent, minus, underscore ]};
+ key <AE12> { [ 0x010004af, 0x010004ae, equal, plus ]};
+ key <BKSL> { [ 0x010004a3, 0x010004a2, backslash, slash ]};
+
+ include "level3(ralt_switch)"
+};
+
+// Serbian charecters added as third level symbols to Russian keyboard layout.
+
+partial alphanumeric_keys
+xkb_symbols "srp" {
+ include "ru(common)"
+ include "level3(ralt_switch)"
+
+ name[Group1]= "Russia - Serbian";
+
+ key <AE03> { [ 3, numerosign ] };
+ key <AE04> { [ 4, semicolon ] };
+ key <AE05> { [ 5, percent ] };
+ key <AE06> { [ 6, colon ] };
+ key <AE07> { [ 7, question ] };
+ key <AE08> { [ 8, asterisk ] };
+ key <AB10> { [ period, comma ] };
+ key <BKSL> { [ backslash, slash ] };
+ key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI, U458, U408 ] };
+ key <AD06> { [ Cyrillic_en, Cyrillic_EN, U45A, U40A ] };
+ key <AC08> { [ Cyrillic_el, Cyrillic_EL, U459, U409 ] };
+ key <AC09> { [ Cyrillic_de, Cyrillic_DE, U45F, U40F ] };
+ key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE, U452, U402 ] };
+ key <AB02> { [ Cyrillic_che, Cyrillic_CHE, U45B, U40B ] };
+};
+
+// Mari language layout
+// based on Russian standard keyboard
+// http://www.marlamuter.ru/
+partial alphanumeric_keys
+xkb_symbols "chm" {
+ include "ru(common)"
+
+ name[Group1]= "Russia - Mari";
+
+ key.type[group1]="FOUR_LEVEL_ALPHABETIC";
+ key <AC04> { [ Cyrillic_a, Cyrillic_A, U04D3, U04D2 ] };
+ key <AD03> { [ Cyrillic_u, Cyrillic_U, U04F1, U04F0 ] };
+ key <AC02> { [ Cyrillic_ui, Cyrillic_UI, U04F9, U04F8 ] };
+ key <AD06> { [ Cyrillic_n, Cyrillic_N, U04A5, U04A4 ] };
+ key <AC11> { [ Cyrillic_e, Cyrillic_E, U04E9, U04E8 ] };
+ key <AC10> { [ Cyrillic_zh, Cyrillic_ZH, U04EB, U04EA ] };
+ key <AC01> { [ Cyrillic_f, Cyrillic_F, UF537, UF536 ] };
+
+ include "level3(ralt_switch)"
+};
+
+// EXTRAS:
+
+// Church Slavonic language layout
+// based on
+// russian standard keyboard
+// Aleksandr Andreev and Yuri Shardt
+// Last Changes 2010/08/01. Contact <aleksandr.andreev@gmail.com>
+
+partial alphanumeric_keys
+xkb_symbols "chu"
+{
+ name[Group1]= "Russia - Church Slavonic";
+ key <TLDE> { [ U0457, U0407, U0482, U20DD ] }; // ї Ї ҂ e.g: а⃝ where the last is a combining ten thousands sign
+ key <AE01> { [ U0461, U0460, U047D, U047C] }; // ѡ Ѡ ѽ Ѽ
+ key <AE02> { [ U0454, U0404, U0465, U0464] }; // є Є ѥ Ѥ
+ key <AE03> { [ U046F, U046E, U0469, U0468] }; // ѯ Ѯ ѩ Ѩ
+ key <AE04> { [ U0471, U0470, U046D, U046C] }; // ѱ Ѱ ѭ Ѭ
+ key <AE05> { [ U0473, U0472, UA657, UA656] }; // ѳ Ѳ iotified A
+ key <AE06> { [ U0475, U0474, U0477, U0476] }; // ѵ Ѵ ѷ Ѷ
+ key <AE07> { [ U047B, U047A, UA64D, UA64C] }; // ѻ Ѻ ꙍ Ꙍ
+ key <AE08> { [ U047F, U047E, U046B, U046A] }; // ѿ Ѿ ѫ Ѫ
+ key <AE09> { [ U0455, U0405, parenleft, U002A ] }; // ѕ Ѕ ( *
+ key <AE10> { [ Cyrillic_u, Cyrillic_U, parenright, U0488 ] }; // у У ) NB: for diagraph Ouk, use Cyrillic_o + Cyrillic_u
+ key <AE11> { [ U0483, U0486, U0487, U005F] }; // а҃ а҆ а҇, _ (titlo, psili, pokrytie, underscore)
+ key <AE12> { [ U0301, U0300, U0484, UA67E] }; // а̀ а́ а҄ ꙾ (oxia, varia, kamora, kavyka)
+ key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI, U0456 ] };
+ key <AD02> { [ Cyrillic_tse, Cyrillic_TSE, U2DF0 ] };
+ key <AD03> { [ UA64B, UA64A, U2DF9 ] }; // Cyrillic monograph Uk (not U)!
+ key <AD04> { [ Cyrillic_ka, Cyrillic_KA, U2DE6 ] };
+ key <AD05> { [ Cyrillic_ie, Cyrillic_IE, U2DF7 ] };
+ key <AD06> { [ Cyrillic_en, Cyrillic_EN, U2DE9 ] };
+ key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE, U2DE2 ] };
+ key <AD08> { [ Cyrillic_sha, Cyrillic_SHA, U2DF2 ] };
+ key <AD09> { [ Cyrillic_shcha, Cyrillic_SHCHA, U2DF3 ] };
+ key <AD10> { [ Cyrillic_ze, Cyrillic_ZE, U2DE5 ] };
+ key <AD11> { [ Cyrillic_ha, Cyrillic_HA, U2DEF ] };
+ key <AD12> { [Cyrillic_hardsign,Cyrillic_HARDSIGN, UA67D ] }; // Payerok
+ key <BKSL> { [backslash, slash, colon, question] }; // \ / : ? (note, for Slavonic question use semicolon
+ key <AC01> { [ Cyrillic_ef, Cyrillic_EF ] };
+ key <AC02> { [ Cyrillic_yeru, Cyrillic_YERU ] };
+ key <AC03> { [ Cyrillic_ve, Cyrillic_VE, U2DE1 ] };
+ key <AC04> { [ Cyrillic_a, Cyrillic_A, U2DF6 ] };
+ key <AC05> { [ Cyrillic_pe, Cyrillic_PE, U2DEB ] };
+ key <AC06> { [ Cyrillic_er, Cyrillic_ER, U2DEC ] };
+ key <AC07> { [ Cyrillic_o, Cyrillic_O, U2DEA ] };
+ key <AC08> { [ Cyrillic_el, Cyrillic_EL, U2DE7 ] };
+ key <AC09> { [ Cyrillic_de, Cyrillic_DE, U2DE3 ] };
+ key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE, U2DE4 ] };
+ key <AC11> { [ U0463, U0462, U2DFA ] }; // Yat
+ key <AB01> { [ U0467, U0466, U2DFD ] }; // Small Yus
+ key <AB02> { [ Cyrillic_che, Cyrillic_CHE, U2DF1 ] };
+ key <AB03> { [ Cyrillic_es, Cyrillic_ES, U2DED ] };
+ key <AB04> { [ Cyrillic_em, Cyrillic_EM, U2DE8 ] };
+ key <AB05> { [ Cyrillic_i, Cyrillic_I ] };
+ key <AB06> { [ Cyrillic_te, Cyrillic_TE, U2DEE ] };
+ key <AB07> { [Cyrillic_softsign,Cyrillic_SOFTSIGN ] };
+ key <AB08> { [ Cyrillic_be, Cyrillic_BE, U2DE0 ] };
+ key <AB09> { [ Cyrillic_yu, Cyrillic_YU, U2DFB ] };
+ key <AB10> { [ period, comma, semicolon, exclam ] };
+};
diff --git a/xorg-server/xkeyboard-config/symbols/sgi_vndr/makefile b/xorg-server/xkeyboard-config/symbols/sgi_vndr/makefile
new file mode 100644
index 000000000..79a27fead
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/sgi_vndr/makefile
@@ -0,0 +1,12 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\sgi_vndr
+
+dist_symbols_DATA = \
+jp
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/symbols/sony_vndr/makefile b/xorg-server/xkeyboard-config/symbols/sony_vndr/makefile
new file mode 100644
index 000000000..c2c1fa757
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/sony_vndr/makefile
@@ -0,0 +1,12 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\sony_vndr
+
+dist_symbols_DATA = \
+us
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/symbols/sun_vndr/makefile b/xorg-server/xkeyboard-config/symbols/sun_vndr/makefile
new file mode 100644
index 000000000..62b2f44a0
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/sun_vndr/makefile
@@ -0,0 +1,18 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\sun_vndr
+
+dist_symbols_DATA = \
+ ara be br ca ch \
+ cz de dk ee es \
+ fi fr gb gr it \
+ jp kr lt lv nl \
+ no pl pt ro ru \
+ se sk solaris tr tuv \
+ tw ua us
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/symbols/us b/xorg-server/xkeyboard-config/symbols/us
index 871dfbdc6..5258b96ce 100644
--- a/xorg-server/xkeyboard-config/symbols/us
+++ b/xorg-server/xkeyboard-config/symbols/us
@@ -1,1337 +1,1337 @@
-default
-partial alphanumeric_keys modifier_keys
-xkb_symbols "basic" {
-
- name[Group1]= "USA";
-
- // Alphanumeric section
- key <TLDE> { [ grave, asciitilde ] };
- key <AE01> { [ 1, exclam ] };
- key <AE02> { [ 2, at ] };
- key <AE03> { [ 3, numbersign ] };
- key <AE04> { [ 4, dollar ] };
- key <AE05> { [ 5, percent ] };
- key <AE06> { [ 6, asciicircum ] };
- key <AE07> { [ 7, ampersand ] };
- key <AE08> { [ 8, asterisk ] };
- key <AE09> { [ 9, parenleft ] };
- key <AE10> { [ 0, parenright ] };
- key <AE11> { [ minus, underscore ] };
- key <AE12> { [ equal, plus ] };
-
- key <AD01> { [ q, Q ] };
- key <AD02> { [ w, W ] };
- key <AD03> { [ e, E ] };
- key <AD04> { [ r, R ] };
- key <AD05> { [ t, T ] };
- key <AD06> { [ y, Y ] };
- key <AD07> { [ u, U ] };
- key <AD08> { [ i, I ] };
- key <AD09> { [ o, O ] };
- key <AD10> { [ p, P ] };
- key <AD11> { [ bracketleft, braceleft ] };
- key <AD12> { [ bracketright, braceright ] };
-
- key <AC01> { [ a, A ] };
- key <AC02> { [ s, S ] };
- key <AC03> { [ d, D ] };
- key <AC04> { [ f, F ] };
- key <AC05> { [ g, G ] };
- key <AC06> { [ h, H ] };
- key <AC07> { [ j, J ] };
- key <AC08> { [ k, K ] };
- key <AC09> { [ l, L ] };
- key <AC10> { [ semicolon, colon ] };
- key <AC11> { [ apostrophe, quotedbl ] };
-
- key <AB01> { [ z, Z ] };
- key <AB02> { [ x, X ] };
- key <AB03> { [ c, C ] };
- key <AB04> { [ v, V ] };
- key <AB05> { [ b, B ] };
- key <AB06> { [ n, N ] };
- key <AB07> { [ m, M ] };
- key <AB08> { [ comma, less ] };
- key <AB09> { [ period, greater ] };
- key <AB10> { [ slash, question ] };
-
- key <BKSL> { [ backslash, bar ] };
- // End alphanumeric section
-};
-
-partial alphanumeric_keys
-xkb_symbols "euro" {
-
- name[Group1]= "USA - With EuroSign on 5";
-
- include "us(basic)"
-
- include "eurosign(5)"
-
- include "level3(ralt_switch)"
-};
-
-
-partial alphanumeric_keys
-xkb_symbols "intl" {
-
- name[Group1]= "USA - International (with dead keys)";
-
- include "us(basic)"
-
- // Alphanumeric section
- key <TLDE> { [dead_grave, dead_tilde, grave, asciitilde ] };
- key <AE01> { [ 1, exclam, exclamdown, onesuperior ] };
- key <AE02> { [ 2, at, twosuperior, dead_doubleacute ] };
- key <AE03> { [ 3, numbersign, threesuperior, dead_macron ] };
- key <AE04> { [ 4, dollar, currency, sterling ] };
- key <AE05> { [ 5, percent, EuroSign, dead_cedilla ] };
- key <AE06> { [ 6, dead_circumflex, onequarter, asciicircum ] };
- key <AE07> { [ 7, ampersand, onehalf, dead_horn ] };
- key <AE08> { [ 8, asterisk, threequarters, dead_ogonek ] };
- key <AE09> { [ 9, parenleft, leftsinglequotemark, dead_breve ] };
- key <AE10> { [ 0, parenright, rightsinglequotemark, dead_abovering ] };
- key <AE11> { [ minus, underscore, yen, dead_belowdot ] };
- key <AE12> { [ equal, plus, multiply, division ] };
-
- key <AD01> { [ q, Q, adiaeresis, Adiaeresis ] };
- key <AD02> { [ w, W, aring, Aring ] };
- key <AD03> { [ e, E, eacute, Eacute ] };
- key <AD04> { [ r, R, registered, registered ] };
- key <AD05> { [ t, T, thorn, THORN ] };
- key <AD06> { [ y, Y, udiaeresis, Udiaeresis ] };
- key <AD07> { [ u, U, uacute, Uacute ] };
- key <AD08> { [ i, I, iacute, Iacute ] };
- key <AD09> { [ o, O, oacute, Oacute ] };
- key <AD10> { [ p, P, odiaeresis, Odiaeresis ] };
- key <AD11> { [ bracketleft, braceleft, guillemotleft, leftdoublequotemark ] };
- key <AD12> { [bracketright, braceright, guillemotright, rightdoublequotemark ] };
-
- key <AC01> { [ a, A, aacute, Aacute ] };
- key <AC02> { [ s, S, ssharp, section ] };
- key <AC03> { [ d, D, eth, ETH ] };
- key <AC04> { [ f, F, f, F ] };
- key <AC05> { [ g, G, g, G ] };
- key <AC06> { [ h, H, h, H ] };
- key <AC07> { [ j, J, j, J ] };
- key <AC08> { [ k, K, oe, OE ] };
-
- key <AC09> { [ l, L, oslash, Ooblique ] };
- key <AC10> { [ semicolon, colon, paragraph, degree ] };
- key <AC11> { [dead_acute, dead_diaeresis, apostrophe, quotedbl ] };
-
- key <AB01> { [ z, Z, ae, AE ] };
- key <AB02> { [ x, X, x, X ] };
- key <AB03> { [ c, C, copyright, cent ] };
- key <AB04> { [ v, V, v, V ] };
- key <AB05> { [ b, B, b, B ] };
- key <AB06> { [ n, N, ntilde, Ntilde ] };
- key <AB07> { [ m, M, mu, mu ] };
- key <AB08> { [ comma, less, ccedilla, Ccedilla ] };
- key <AB09> { [ period, greater, dead_abovedot, dead_caron ] };
- key <AB10> { [ slash, question, questiondown, dead_hook ] };
- key <BKSL> { [ backslash, bar, notsign, brokenbar ] };
-
- include "level3(ralt_switch)"
-};
-
-// Based on symbols/us_intl keyboard map:
-// Dead-keys definition for a very simple US/ASCII layout.
-// by Conectiva (http://www.conectiva.com.br)
-// modified by Ricardo Y. Igarashi (iga@that.com.br)
-
-// Added the following deadkeys, to make it truly international:
-//
-// dead_macron: on AltGr-minus
-// dead_breve: on AltGr-parenleft
-// dead_abovedot: on AltGr-period
-// dead_abovering: on AltGr-0
-// dead_doubleacute: on AltGr-equal (as quotedbl is already used)
-// dead_caron: on AltGr-less (AltGr-shift-comma)
-// dead_cedilla: on AltGr-comma
-// dead_ogonek: on AltGr-semicolon
-// dead_belowdot: on AltGr-underscore (AltGr-shift-minus)
-// dead_hook: on AltGr-question
-// dead_horn: on AltGr-plus (AltGr-shift-equal)
-// dead_diaeresis: on AltGr-colon (Alt-shift-semicolon)
-//
-// those were already there:
-// dead_grave
-// dead_acute
-// dead_circumflex
-// dead_tilde
-// dead_diaeresis
-
-partial alphanumeric_keys
-xkb_symbols "alt-intl" {
-
- name[Group1]= "USA - Alternative international";
-
- include "us"
-
- key <TLDE> { [ dead_grave, dead_tilde, grave, asciitilde ] };
- key <AE05> { [ 5, percent, EuroSign ] };
- key <AE06> { [ 6, dead_circumflex, asciicircum, asciicircum ] };
- key <AE09> { [ 9, parenleft, leftsinglequotemark, dead_breve ] };
- key <AE10> { [ 0, parenright, rightsinglequotemark, dead_abovering ] };
- key <AE11> { [ minus, underscore, dead_macron, dead_belowdot ] };
- key <AE12> { [ equal, plus, dead_doubleacute, dead_horn ] };
-
- key <AD03> { [ e, E, EuroSign, cent ] };
-
- key <AC10> { [ semicolon, colon, dead_ogonek, dead_diaeresis ] };
- key <AC11> { [ dead_acute, dead_diaeresis, apostrophe, quotedbl ] };
-
- key <AB08> { [ comma, less, dead_cedilla, dead_caron ] };
- key <AB09> { [ period, greater, dead_abovedot, dead_circumflex ] };
- key <AB10> { [ slash, question, dead_hook, dead_hook ] };
-
- include "level3(ralt_switch)"
-};
-
-// based on a keyboard map from an 'xkb/symbols/dk' file
-
-partial alphanumeric_keys
-xkb_symbols "dvorak" {
-
- name[Group1]= "USA - Dvorak";
-
- // Alphanumeric section
-
- key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
-
- key <AE01> { [ 1, exclam ] };
- key <AE02> { [ 2, at ] };
- key <AE03> { [ 3, numbersign ] };
- key <AE04> { [ 4, dollar ] };
- key <AE05> { [ 5, percent ] };
- key <AE06> { [ 6, asciicircum, dead_circumflex, dead_circumflex ] };
- key <AE07> { [ 7, ampersand ] };
- key <AE08> { [ 8, asterisk ] };
- key <AE09> { [ 9, parenleft, dead_grave] };
- key <AE10> { [ 0, parenright ] };
- key <AE11> { [ bracketleft, braceleft ] };
- key <AE12> { [ bracketright, braceright, dead_tilde] };
-
- key <AD01> { [ apostrophe, quotedbl, dead_acute, dead_diaeresis ] };
- key <AD02> { [ comma, less, dead_cedilla, dead_caron ] };
- key <AD03> { [ period, greater, dead_abovedot, periodcentered ] };
- key <AD04> { [ p, P ] };
- key <AD05> { [ y, Y ] };
- key <AD06> { [ f, F ] };
- key <AD07> { [ g, G ] };
- key <AD08> { [ c, C ] };
- key <AD09> { [ r, R ] };
- key <AD10> { [ l, L ] };
- key <AD11> { [ slash, question ] };
- key <AD12> { [ equal, plus ] };
-
- key <AC01> { [ a, A ] };
- key <AC02> { [ o, O ] };
- key <AC03> { [ e, E ] };
- key <AC04> { [ u, U ] };
- key <AC05> { [ i, I ] };
- key <AC06> { [ d, D ] };
- key <AC07> { [ h, H ] };
- key <AC08> { [ t, T ] };
- key <AC09> { [ n, N ] };
- key <AC10> { [ s, S ] };
- key <AC11> { [ minus, underscore ] };
-
- key <AB01> { [ semicolon, colon, dead_ogonek, dead_doubleacute ] };
- key <AB02> { [ q, Q ] };
- key <AB03> { [ j, J ] };
- key <AB04> { [ k, K ] };
- key <AB05> { [ x, X ] };
- key <AB06> { [ b, B ] };
- key <AB07> { [ m, M ] };
- key <AB08> { [ w, W ] };
- key <AB09> { [ v, V ] };
- key <AB10> { [ z, Z ] };
-
- key <BKSL> { [ backslash, bar ] };
-};
-
-// Dvorak international with dead keys
-// Olivier Mehani (shtrom-xorg@ssji.net)
-// Reproduce the per-key mapping of us(intl) for the dvorak layout
-// aka "I just swapped my keys over"
-partial alphanumeric_keys
-xkb_symbols "dvorak-intl" {
-
- name[Group1]= "USA - Dvorak international (with dead keys)";
-
- include "us(dvorak)"
-
- key <TLDE> { [dead_grave, dead_tilde, grave, asciitilde ] };
-
- key <AE01> { [ 1, exclam, exclamdown, onesuperior ] };
- key <AE02> { [ 2, at, twosuperior, dead_doubleacute ] };
- key <AE03> { [ 3, numbersign, threesuperior, dead_macron ] };
- key <AE04> { [ 4, dollar, currency, sterling ] };
- key <AE05> { [ 5, percent, EuroSign, dead_cedilla ] };
- key <AE06> { [ 6, dead_circumflex, onequarter, asciicircum ] };
- key <AE07> { [ 7, ampersand, onehalf, dead_horn ] };
- key <AE08> { [ 8, asterisk, threequarters, dead_ogonek ] };
- key <AE09> { [ 9, parenleft, leftsinglequotemark, dead_breve ] };
- key <AE10> { [ 0, parenright, rightsinglequotemark, dead_abovering ] };
- key <AE11> { [ bracketleft, braceleft, guillemotleft, leftdoublequotemark ] };
- key <AE12> { [bracketright, braceright, guillemotright, rightdoublequotemark ] };
-
- key <AD01> { [dead_acute, dead_diaeresis, apostrophe, quotedbl ] };
- key <AD02> { [ comma, less, ccedilla, Ccedilla ] };
- key <AD03> { [ period, greater, dead_abovedot, dead_caron ] };
- key <AD04> { [ p, P, odiaeresis, Odiaeresis ] };
- key <AD05> { [ y, Y, udiaeresis, Udiaeresis ] };
- // key <AD06> { [ f, F ] };
- // key <AD07> { [ g, G ] };
- key <AD08> { [ c, C, copyright, cent ] };
- key <AD09> { [ r, R, registered, registered ] };
- key <AD10> { [ l, L, oslash, Ooblique ] };
- key <AD11> { [ slash, question, questiondown, dead_hook ] };
- // key <AD12> { [ equal, plus, multiply, division ] };
-
- key <AC01> { [ a, A, aacute, Aacute ] };
- key <AC02> { [ o, O, oacute, Oacute ] };
- key <AC03> { [ e, E, eacute, Eacute ] };
- key <AC04> { [ u, U, uacute, Uacute ] };
- key <AC05> { [ i, I, iacute, Iacute ] };
- key <AC06> { [ d, D, eth, ETH ] };
- // key <AC07> { [ h, H ] };
- key <AC08> { [ t, T, thorn, THORN ] };
- key <AC09> { [ n, N, ntilde, Ntilde ] };
- key <AC10> { [ s, S, ssharp, section ] };
- // key <AC11> { [ minus, underscore, yen, dead_belowdot ] };
-
- key <AB01> { [ semicolon, colon, paragraph, degree ] };
- key <AB02> { [ q, Q, adiaeresis, Adiaeresis ] };
- // key <AB03> { [ j, J ] };
- key <AB04> { [ k, K, oe, OE ] };
- // key <AB05> { [ x, X ] };
- // key <AB06> { [ b, B ] };
- key <AB07> { [ m, M, mu, mu ] };
- key <AB08> { [ w, W, aring, Aring ] };
- // key <AB09> { [ v, V ] };
- key <AB10> { [ z, Z, ae, AE ] };
-
- key <BKSL> { [ backslash, bar, notsign, brokenbar ] };
-
- include "level3(ralt_switch)"
-};
-
-// Dvorak international without dead keys
-// Stephane Magnenat (stephane at magnenat dot net, http://stephane.magnenat.net)
-// Based on information from http://www.poupinou.org/dvorak/index.html
-//
-// ` 1 2 3 4 5 6 7 8 9 0 [ ] \
-// €
-//
-// ' , . p y f g c r l / =
-// ä ê ë ü ç
-//
-// a o e u i d h t n s -
-// à ô é û î ß
-//
-// ; q j k x b m w v z
-// â ö è ù ï
-
-partial alphanumeric_keys
-xkb_symbols "dvorak-alt-intl" {
-
- name[Group1]= "USA - Dvorak alternative international (no dead keys)";
-
- include "us(dvorak)"
-
- key <AE04> { [ 4, dollar, EuroSign ] };
-
- key <AD02> { [ comma, less, adiaeresis, dead_caron ] };
- key <AD03> { [ period, greater, ecircumflex, periodcentered ] };
- key <AD04> { [ p, P, ediaeresis, dead_cedilla ] };
- key <AD05> { [ y, Y, udiaeresis ] };
- key <AD08> { [ c, C, ccedilla, dead_abovedot ] };
-
- key <AC01> { [ a, A, agrave ] };
- key <AC02> { [ o, O, ocircumflex ] };
- key <AC03> { [ e, E, eacute ] };
- key <AC04> { [ u, U, ucircumflex ] };
- key <AC05> { [ i, I, icircumflex ] };
- key <AC10> { [ s, S, ssharp ] };
-
- key <AB01> { [ semicolon, colon, acircumflex ] };
- key <AB02> { [ q, Q, odiaeresis, dead_ogonek ] };
- key <AB03> { [ j, J, egrave, dead_doubleacute ] };
- key <AB04> { [ k, K, ugrave ] };
- key <AB05> { [ x, X, idiaeresis ] };
-
- include "level3(ralt_switch)"
-};
-
-// Left and right handed dvorak layouts
-// by sqweek <sqweek@gmail.com> 2006-01-30
-// Based on the corresponding layouts in the console-tools package.
-partial alphanumeric_keys
-xkb_symbols "dvorak-l" {
-
- include "us(dvorak)"
- name[Group1]= "USA - Left handed Dvorak";
-
- key <AE01> { [ bracketleft, braceleft ] };
- key <AE02> { [ bracketright, braceright ] };
- key <AE03> { [ slash, question ] };
- key <AE04> { [ p, P ] };
- key <AE05> { [ f, F ] };
- key <AE06> { [ m, M ] };
- key <AE07> { [ l, L ] };
- key <AE08> { [ j, J ] };
- key <AE09> { [ 4, dollar ] };
- key <AE10> { [ 3, numbersign ] };
- key <AE11> { [ 2, at ] };
- key <AE12> { [ 1, exclam ] };
-
- key <AD01> { [ semicolon, colon ] };
- key <AD02> { [ q, Q ] };
- key <AD03> { [ b, B ] };
- key <AD04> { [ y, Y ] };
- key <AD05> { [ u, U ] };
- key <AD06> { [ r, R ] };
- key <AD07> { [ s, S ] };
- key <AD08> { [ o, O ] };
- key <AD09> { [ period, greater ] };
- key <AD10> { [ 6, asciicircum ] };
- key <AD11> { [ 5, percent ] };
- key <AD12> { [ equal, plus ] };
-
- key <AC01> { [ minus, underscore ] };
- key <AC02> { [ k, K ] };
- key <AC03> { [ c, C ] };
- key <AC04> { [ d, D ] };
- key <AC05> { [ t, T ] };
- key <AC06> { [ h, H ] };
- key <AC07> { [ e, E ] };
- key <AC08> { [ a, A ] };
- key <AC09> { [ z, Z ] };
- key <AC10> { [ 8, asterisk ] };
- key <AC11> { [ 7, ampersand ] };
-
- key <AB01> { [ apostrophe, quotedbl ] };
- key <AB02> { [ x, X ] };
- key <AB03> { [ g, G ] };
- key <AB04> { [ v, V ] };
- key <AB05> { [ w, W ] };
- key <AB06> { [ n, N ] };
- key <AB07> { [ i, I ] };
- key <AB08> { [ comma, less ] };
- key <AB09> { [ 0, parenright ] };
- key <AB10> { [ 9, parenleft ] };
-};
-
-partial alphanumeric_keys
-xkb_symbols "dvorak-r" {
-
- include "us(dvorak)"
- name[Group1]= "USA - Right handed Dvorak";
-
- key <AE01> { [ 1, exclam ] };
- key <AE02> { [ 2, at ] };
- key <AE03> { [ 3, numbersign ] };
- key <AE04> { [ 4, dollar ] };
- key <AE05> { [ j, J ] };
- key <AE06> { [ l, L ] };
- key <AE07> { [ m, M ] };
- key <AE08> { [ f, F ] };
- key <AE09> { [ p, P ] };
- key <AE10> { [ slash, question ] };
- key <AE11> { [ bracketleft, braceleft ] };
- key <AE12> { [ bracketright, braceright ] };
-
- key <AD01> { [ 5, percent ] };
- key <AD02> { [ 6, asciicircum ] };
- key <AD03> { [ q, Q ] };
- key <AD04> { [ period, greater ] };
- key <AD05> { [ o, O ] };
- key <AD06> { [ r, R ] };
- key <AD07> { [ s, S ] };
- key <AD08> { [ u, U ] };
- key <AD09> { [ y, Y ] };
- key <AD10> { [ b, B ] };
- key <AD11> { [ semicolon, colon ] };
- key <AD12> { [ equal, plus ] };
-
- key <AC01> { [ 7, ampersand ] };
- key <AC02> { [ 8, asterisk ] };
- key <AC03> { [ z, Z ] };
- key <AC04> { [ a, A ] };
- key <AC05> { [ e, E ] };
- key <AC06> { [ h, H ] };
- key <AC07> { [ t, T ] };
- key <AC08> { [ d, D ] };
- key <AC09> { [ c, C ] };
- key <AC10> { [ k, K ] };
- key <AC11> { [ minus, underscore ] };
-
- key <AB01> { [ 9, parenleft ] };
- key <AB02> { [ 0, parenright ] };
- key <AB03> { [ x, X ] };
- key <AB04> { [ comma, less ] };
- key <AB05> { [ i, I ] };
- key <AB06> { [ n, N ] };
- key <AB07> { [ w, W ] };
- key <AB08> { [ v, V ] };
- key <AB09> { [ g, G ] };
- key <AB10> { [ apostrophe, quotedbl ] };
-};
-
-// Classic dvorak layout
-// by Piter Punk <piterpk@terra.com.br> - 2006-07-06
-// Based on dvorak layout and e-mail from Russel L. Harris rlharris@oplink.net
-// on xorg list.
-partial alphanumeric_keys
-xkb_symbols "dvorak-classic" {
-
- name[Group1]= "USA - Classic Dvorak";
-
- // Alphanumeric section
-
- key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
-
- key <AE01> { [ bracketleft, braceleft ] };
- key <AE02> { [ 7, ampersand ] };
- key <AE03> { [ 5, percent ] };
- key <AE04> { [ 3, numbersign ] };
- key <AE05> { [ 1, exclam ] };
- key <AE06> { [ 9, parenleft, dead_grave] };
- key <AE07> { [ 0, parenright ] };
- key <AE08> { [ 2, at ] };
- key <AE09> { [ 4, dollar ] };
- key <AE10> { [ 6, asciicircum, dead_circumflex, dead_circumflex ] };
- key <AE11> { [ 8, asterisk ] };
- key <AE12> { [ bracketright, braceright, dead_tilde] };
-
- key <AD01> { [ slash, question ] };
- key <AD02> { [ comma, less, dead_cedilla, dead_caron ] };
- key <AD03> { [ period, greater, dead_abovedot, periodcentered ] };
- key <AD04> { [ p, P ] };
- key <AD05> { [ y, Y ] };
- key <AD06> { [ f, F ] };
- key <AD07> { [ g, G ] };
- key <AD08> { [ c, C ] };
- key <AD09> { [ r, R ] };
- key <AD10> { [ l, L ] };
- key <AD11> { [ apostrophe, quotedbl, dead_acute, dead_diaeresis ] };
- key <AD12> { [ equal, plus ] };
-
- key <AC01> { [ a, A ] };
- key <AC02> { [ o, O ] };
- key <AC03> { [ e, E ] };
- key <AC04> { [ u, U ] };
- key <AC05> { [ i, I ] };
- key <AC06> { [ d, D ] };
- key <AC07> { [ h, H ] };
- key <AC08> { [ t, T ] };
- key <AC09> { [ n, N ] };
- key <AC10> { [ s, S ] };
- key <AC11> { [ minus, underscore ] };
-
- key <AB01> { [ semicolon, colon, dead_ogonek, dead_doubleacute ] };
- key <AB02> { [ q, Q ] };
- key <AB03> { [ j, J ] };
- key <AB04> { [ k, K ] };
- key <AB05> { [ x, X ] };
- key <AB06> { [ b, B ] };
- key <AB07> { [ m, M ] };
- key <AB08> { [ w, W ] };
- key <AB09> { [ v, V ] };
- key <AB10> { [ z, Z ] };
- key <BKSL> { [ backslash, bar ] };
-};
-
-// Programmer Dvorak, by Roland Kaufmann <rlndkfmn at gmail dot com>
-// License: BSD, available at <http://www.kaufmann.no/roland/dvorak/license.html>
-// Main features: Numbers are in shift position (like French), symbols have been
-// placed in locations that give good hand-alternation and finger rolling with
-// symbols that usually follows, accented characters are possible for I18N.
-partial alphanumeric_keys
-xkb_symbols "dvp" {
- include "us(dvorak)"
-
- name[Group1] = "USA - Programmer Dvorak";
-
- // Unmodified Shift AltGr Shift+AltGr
- // symbols row, left side
- key <TLDE> { [ dollar, asciitilde, dead_tilde ] };
- key <AE01> { [ ampersand, percent ] };
- key <AE02> { [ bracketleft, 7, currency ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
- key <AE03> { [ braceleft, 5, cent ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
- key <AE04> { [ braceright, 3, yen ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
- key <AE05> { [ parenleft, 1, EuroSign ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
- key <AE06> { [ equal, 9, sterling ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
-
- // symbols row, right side
- key <AE07> { [ asterisk, 0 ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
- key <AE08> { [ parenright, 2, onehalf ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
- key <AE09> { [ plus, 4 ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
- key <AE10> { [ bracketright, 6 ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
- key <AE11> { [ exclam, 8, exclamdown ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
- key <AE12> { [ numbersign, grave, dead_grave ] };
- key <BKSP> { [ BackSpace ] };
-
- // upper row, left side
- key <AD01> { [ semicolon, colon, dead_diaeresis ] };
- key <AD02> { [ comma, less, guillemotleft ] };
- key <AD03> { [ period, greater, guillemotright ] };
- key <AD04> { [ p, P, paragraph, section ] };
- key <AD05> { [ y, Y, udiaeresis, Udiaeresis ] };
-
- // upper row, right side
- key <AD08> { [ c, C, ccedilla, Ccedilla ] };
- key <AD09> { [ r, R, registered, trademark ] };
- key <AD11> { [ slash, question, questiondown ] };
- key <AD12> { [ at, asciicircum, dead_circumflex, dead_caron ] };
-
- // home row, left side
- key <AC01> { [ a, A, aring, Aring ] };
- key <AC02> { [ o, O, oslash, Ooblique ] };
- key <AC03> { [ e, E, ae, AE ] };
- key <AC04> { [ u, U, eacute, Eacute ] };
-
- // home row, right side
- key <AC06> { [ d, D, eth, ETH ] };
- key <AC07> { [ h, H, dead_acute ] };
- key <AC08> { [ t, T, thorn, THORN ] };
- key <AC09> { [ n, N, ntilde, Ntilde ] };
- key <AC10> { [ s, S, ssharp ] };
- key <AC11> { [ minus, underscore, hyphen ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
- key <BKSL> { [ backslash, bar ] };
-
- // lower row, left side
- key <AB01> { [ apostrophe, quotedbl, dead_acute ] };
-};
-
-// phonetic layout for Russian letters on an US keyboard
-// by Ivan Popov <pin@konvalo.org> 2005-07-17
-
-// level3 modifier is a shortcut to the "us" meaning of the keys where
-// we place cyrillic letters, handy for accessing the corresponding
-// punctuation marks.
-// It is important to have access to punctuation marks, and the rest of
-// alphabetical keys are added for being consequent so that the users
-// can expect the level3 modifier to give what the key label shows.
-
-partial alphanumeric_keys
-xkb_symbols "rus" {
-
- name[Group1]= "USA - Russian phonetic";
-
- include "us(basic)"
-
-key.type[group1]="FOUR_LEVEL_ALPHABETIC";
-
- key <LatA> { [ Cyrillic_a, Cyrillic_A ] };
- key <LatB> { [ Cyrillic_be, Cyrillic_BE ] };
- key <LatW> { [ Cyrillic_ve, Cyrillic_VE ] };
- key <LatG> { [ Cyrillic_ghe, Cyrillic_GHE ] };
- key <LatD> { [ Cyrillic_de, Cyrillic_DE ] };
- key <LatE> { [ Cyrillic_ie, Cyrillic_IE ] };
- key <TLDE> { [ Cyrillic_io, Cyrillic_IO, grave, asciitilde ] };
- key <LatV> { [ Cyrillic_zhe, Cyrillic_ZHE ] };
- key <LatZ> { [ Cyrillic_ze, Cyrillic_ZE ] };
- key <LatI> { [ Cyrillic_i, Cyrillic_I ] };
- key <LatJ> { [ Cyrillic_shorti, Cyrillic_SHORTI ] };
- key <LatK> { [ Cyrillic_ka, Cyrillic_KA ] };
- key <LatL> { [ Cyrillic_el, Cyrillic_EL ] };
- key <LatM> { [ Cyrillic_em, Cyrillic_EM ] };
- key <LatN> { [ Cyrillic_en, Cyrillic_EN ] };
- key <LatO> { [ Cyrillic_o, Cyrillic_O ] };
- key <LatP> { [ Cyrillic_pe, Cyrillic_PE ] };
- key <LatR> { [ Cyrillic_er, Cyrillic_ER ] };
- key <LatS> { [ Cyrillic_es, Cyrillic_ES ] };
- key <LatT> { [ Cyrillic_te, Cyrillic_TE ] };
- key <LatU> { [ Cyrillic_u, Cyrillic_U ] };
- key <LatF> { [ Cyrillic_ef, Cyrillic_EF ] };
- key <LatH> { [ Cyrillic_ha, Cyrillic_HA ] };
- key <LatC> { [ Cyrillic_tse, Cyrillic_TSE ] };
- key <AC10> { [ Cyrillic_che, Cyrillic_CHE, semicolon, colon ] };
- key <AD11> { [ Cyrillic_sha, Cyrillic_SHA, bracketleft, braceleft] };
- key <AD12> { [ Cyrillic_shcha, Cyrillic_SHCHA, bracketright, braceright ] };
- key <AE12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, equal, plus ] };
- key <LatY> { [ Cyrillic_yeru, Cyrillic_YERU ] };
- key <LatX> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN ] };
- key <BKSL> { [ Cyrillic_e, Cyrillic_E, backslash, bar ] };
- key <AC11> { [ Cyrillic_yu, Cyrillic_YU, apostrophe, quotedbl ] };
- key <LatQ> { [ Cyrillic_ya, Cyrillic_YA ] };
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "mac" {
-
- include "us(basic)"
- name[Group1]= "USA - Macintosh";
- key.type[group1]="FOUR_LEVEL";
-
- // Slightly improvised from http://homepage.mac.com/thgewecke/kblayout.jpg
- key <LSGT> { [ section, plusminus, section, plusminus ] };
- key <TLDE> { [ grave, asciitilde, dead_grave, dead_horn ] };
- key <AE01> { [ 1, exclam, exclamdown, U2044 ] };
- key <AE02> { [ 2, at, trademark, EuroSign ] };
- key <AE03> { [ 3, numbersign, sterling, U2039 ] };
- key <AE04> { [ 4, dollar, cent, U203A ] };
- key <AE05> { [ 5, percent, infinity, UFB01 ] };
- key <AE06> { [ 6,asciicircum, section, UFB02 ] };
- key <AE07> { [ 7, ampersand, paragraph, doubledagger ] };
- key <AE08> { [ 8, asterisk, enfilledcircbullet, degree ] };
- key <AE09> { [ 9, parenleft, ordfeminine, periodcentered ] };
- key <AE10> { [ 0, parenright, masculine,singlelowquotemark] };
- key <AE11> { [ minus, underscore, endash, emdash ] };
- key <AE12> { [ equal, plus, notequal, plusminus ] };
-
- key <AD01> { [ q, Q, oe, OE ] };
- key <AD02> { [ w, W, U2211,doublelowquotemark] };
- key <AD03> { [ e, E, dead_acute, acute ] };
- key <AD04> { [ r, R, registered, U2030 ] };
- key <AD05> { [ t, T, dagger, dead_caron ] };
- key <AD06> { [ y, Y, yen, onequarter ] };
- key <AD07> { [ u, U, dead_diaeresis, diaeresis ] };
- key <AD08> { [ i, I, dead_circumflex, U02C6 ] };
- key <AD09> { [ o, O, oslash, Ooblique ] };
- key <AD10> { [ p, P, Greek_pi, U220F ] };
- key <AD11> { [ bracketleft, braceleft, leftdoublequotemark, rightdoublequotemark ] };
- key <AD12> { [bracketright, braceright, leftsinglequotemark, rightsinglequotemark ] };
- key <BKSL> { [ backslash, bar, guillemotleft, guillemotright ] };
-
- key <AC01> { [ a, A, aring, Aring ] };
- key <AC02> { [ s, S, ssharp, dead_stroke ] };
- key <AC03> { [ d, D, partialderivative, eth ] };
- key <AC04> { [ f, F, function, dead_hook ] };
- key <AC05> { [ g, G, copyright, dead_doubleacute ] };
- key <AC06> { [ h, H, dead_abovedot, dead_belowdot ] };
- key <AC07> { [ j, J, U2206, onehalf ] };
- key <AC08> { [ k, K,dead_abovering, UF8FF ] };
-
- key <AC09> { [ l, L, notsign, THORN ] };
- key <AC10> { [ semicolon, colon, U2026, thorn ] };
- key <AC11> { [apostrophe, quotedbl, ae, AE ] };
-
- key <AB01> { [ z, Z, Greek_OMEGA, dead_cedilla ] };
- key <AB02> { [ x, X, U2248, dead_ogonek ] };
- // unclear whether "approxeq" is 2248 or 2245
- key <AB03> { [ c, C, ccedilla, Ccedilla ] };
- key <AB04> { [ v, V, squareroot, U25CA ] };
- key <AB05> { [ b, B, integral, idotless ] };
- key <AB06> { [ n, N, dead_tilde, U02DC ] };
- key <AB07> { [ m, M, mu, threequarters ] };
- key <AB08> { [ comma, less, lessthanequal, dead_macron ] };
- key <AB09> { [ period, greater, greaterthanequal, dead_breve ] };
- key <AB10> { [ slash, question, division, questiondown ] };
-
- include "level3(ralt_switch)"
-};
-
-// Colemak symbols for xkb on X.Org Server 7.x
-// 2006-01-01 Shai Coleman, http://colemak.com/ . Public domain.
-
-partial alphanumeric_keys
-xkb_symbols "colemak" {
- include "us"
- name[Group1]= "USA - Colemak";
-
- // Alphanumeric section
- key <TLDE> { [ grave, asciitilde, dead_tilde, asciitilde ] };
- key <AE01> { [ 1, exclam, exclamdown, onesuperior ] };
- key <AE02> { [ 2, at, masculine, twosuperior ] };
- key <AE03> { [ 3, numbersign, ordfeminine, threesuperior ] };
- key <AE04> { [ 4, dollar, cent, sterling ] };
- key <AE05> { [ 5, percent, EuroSign, yen ] };
- key <AE06> { [ 6, asciicircum, hstroke, Hstroke ] };
- key <AE07> { [ 7, ampersand, eth, ETH ] };
- key <AE08> { [ 8, asterisk, thorn, THORN ] };
- key <AE09> { [ 9, parenleft, leftsinglequotemark, leftdoublequotemark ] };
- key <AE10> { [ 0, parenright, rightsinglequotemark, rightdoublequotemark ] };
- key <AE11> { [ minus, underscore, endash, emdash ] };
- key <AE12> { [ equal, plus, multiply, division ] };
-
- key <AD01> { [ q, Q, adiaeresis, Adiaeresis ] };
- key <AD02> { [ w, W, aring, Aring ] };
- key <AD03> { [ f, F, atilde, Atilde ] };
- key <AD04> { [ p, P, oslash, Ooblique ] };
- key <AD05> { [ g, G, dead_ogonek, asciitilde ] };
- key <AD06> { [ j, J, dstroke, Dstroke ] };
- key <AD07> { [ l, L, lstroke, Lstroke ] };
- key <AD08> { [ u, U, uacute, Uacute ] };
- key <AD09> { [ y, Y, udiaeresis, Udiaeresis ] };
- key <AD10> { [ semicolon, colon, odiaeresis, Odiaeresis ] };
- key <AD11> { [ bracketleft, braceleft, guillemotleft, 0x1002039 ] };
- key <AD12> { [ bracketright, braceright, guillemotright, 0x100203a ] };
- key <BKSL> { [ backslash, bar, asciitilde, asciitilde ] };
-
- key <AC01> { [ a, A, aacute, Aacute ] };
- key <AC02> { [ r, R, dead_grave, asciitilde ] };
- key <AC03> { [ s, S, ssharp, asciitilde ] };
- key <AC04> { [ t, T, dead_acute, dead_doubleacute ] };
- key <AC05> { [ d, D, dead_diaeresis, asciitilde ] };
- key <AC06> { [ h, H, dead_caron, asciitilde ] };
- key <AC07> { [ n, N, ntilde, Ntilde ] };
- key <AC08> { [ e, E, eacute, Eacute ] };
- key <AC09> { [ i, I, iacute, Iacute ] };
- key <AC10> { [ o, O, oacute, Oacute ] };
- key <AC11> { [ apostrophe, quotedbl, otilde, Otilde ] };
-
- key <AB01> { [ z, Z, ae, AE ] };
- key <AB02> { [ x, X, dead_circumflex, asciitilde ] };
- key <AB03> { [ c, C, ccedilla, Ccedilla ] };
- key <AB04> { [ v, V, oe, OE ] };
- key <AB05> { [ b, B, dead_breve, asciitilde ] };
- key <AB06> { [ k, K, dead_abovering, asciitilde ] };
- key <AB07> { [ m, M, dead_macron, asciitilde ] };
- key <AB08> { [ comma, less, dead_cedilla, asciitilde ] };
- key <AB09> { [ period, greater, dead_abovedot, asciitilde ] };
- key <AB10> { [ slash, question, questiondown, asciitilde ] };
-
- key <CAPS> { [ BackSpace, BackSpace, BackSpace, BackSpace ] };
- key <LSGT> { [ minus, underscore, endash, emdash ] };
- key <SPCE> { [ space, space, space, nobreakspace ] };
-
- include "level3(ralt_switch)"
-};
-
-// I do NOT like dead-keys - the International keyboard as defined by Microsoft
-// doesn't fit my needs. Why use two keystrokes for all simple characters (eg '
-// and <space> generates a single ') just to have an é (eacute) in two strokes
-// as well? I type ' more often than é (eacute).
-//
-// This file works just like a regular keyboard, BUT has all dead-keys
-// accessible at level3 (through AltGr). An ë (ediaeresis) is now: AltGr+"
-// followed by an e. In other words, this keyboard is not international as long
-// as you leave the right Alt key alone.
-//
-// The original MS International keyboard was intended for Latin1 (iso8859-1).
-// With the introduction of iso8859-15, the (important) ligature oe (and OE)
-// became available. I added them next to ae. Because I write ediaeresis more
-// often than registered, I moved registered to be next to copyright and added
-// ediaeresis and idiaeresis. - Adriaan
-
-partial alphanumeric_keys
-xkb_symbols "altgr-intl" {
-
- name[Group1]= "USA - International (AltGr dead keys)";
-
- include "us(intl)"
-
-// five dead keys moved into level3:
-
- key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
- key <AC11> { [apostrophe,quotedbl, dead_acute, dead_diaeresis ] };
-
-// diversions from the MS Intl keyboard:
-
- key <AE01> { [ 1, exclam, onesuperior, exclamdown ] };
- key <AD04> { [ r, R, ediaeresis, Ediaeresis ] };
- key <AC07> { [ j, J, idiaeresis, Idiaeresis ] };
- key <AB02> { [ x, X, oe, OE ] };
- key <AB04> { [ v, V, registered, registered ] };
-
-// onequarter etc (not in iso8859-15) moved to get three unshifted deadkeys:
-
- key <AE06> { [ 6, asciicircum, dead_circumflex, onequarter ] };
- key <AE07> { [ 7, ampersand, dead_horn, onehalf ] };
- key <AE08> { [ 8, asterisk, dead_ogonek, threequarters ] };
-
- include "level3(ralt_switch)"
-};
-
-// Intel ClassmatePC Keyboard Layout
-// by Piter PUNK <piterpk@terra.com.br>
-//
-// The keyboard layouts below maps the us(basic), us(intl) and us(alt-intl)
-// to ClassmatePC keyboard. All layouts uses RCTL as level3(switch) since
-// the keyboard doesn't have AltGr key. The EuroSign is engraved at 5 key.
-
-// classmate - us(basic)
-partial alphanumeric_keys
-xkb_symbols "classmate" {
- include "us(basic)"
- name[Group1]= "USA - ClassmatePC";
-
- key <LSGT> { [ backslash, bar, backslash, bar ] };
-
- include "eurosign(5)"
- include "level3(switch)"
-};
-
-// classmate-intl - us(intl)
-// RCTL is generated by Fn+Alt, because that, when trying to access
-// the level3 symbols at 7,8,9,0,u,i,o,p,j,k,l,;,m,. and / we got
-// the keypad keycodes. The keypad is changed to make Fn+Alt+<KP_key>
-// generate the same symbol as the original key.
-partial alphanumeric_keys
-xkb_symbols "classmate-intl" {
- include "us(intl)"
- name[Group1]= "USA - ClassmatePC (International)";
- key.type[Group1]="FOUR_LEVEL";
-
- key <LSGT> { [ backslash, bar, backslash, bar ] };
-
- key <KP7> { [ KP_Home, KP_7,
- onehalf, dead_horn ] };
- key <KP8> { [ KP_Up, KP_8,
- threequarters, dead_ogonek ] };
- key <KP9> { [ KP_Prior, KP_9,
- leftsinglequotemark, dead_breve ] };
- key <KPMU> { [ KP_Multiply, KP_Multiply,
- rightsinglequotemark, dead_abovering ] };
-
- key <KP4> { [ KP_Left, KP_4,
- uacute, Uacute ] };
- key <KP5> { [ KP_Begin, KP_5,
- iacute, Iacute ] };
- key <KP6> { [ KP_Right, KP_6,
- oacute, Oacute ] };
- key <KPSU> { [ KP_Subtract, KP_Subtract,
- odiaeresis, Odiaeresis ] };
-
- key <KP2> { [ KP_Down, KP_2,
- oe, OE ] };
- key <KP3> { [ KP_Next, KP_3,
- oslash, Ooblique ] };
- key <KPAD> { [ KP_Add, KP_Add,
- paragraph, degree ] };
-
- key <KP0> { [ KP_Insert, KP_0,
- mu, mu ] };
- key <KPDL> { [ KP_Delete, KP_Decimal,
- dead_abovedot, dead_caron ] };
- key <KPDV> { [ KP_Divide, KP_Divide,
- questiondown, dead_hook ] };
-
- include "level3(switch)"
-};
-
-// classmate-alt-intl - us(alt-intl)
-// RCTL is generated by Fn+Alt, because that, when trying to access
-// the level3 symbols at 7,8,9,0,u,i,o,p,j,k,l,;,m,. and / we got
-// the keypad keycodes. The keypad is changed to make Fn+Alt+<KP_key>
-// generate the same symbol as the original key.
-partial alphanumeric_keys
-xkb_symbols "classmate-alt-intl" {
- include "us(alt-intl)"
- name[Group1]= "USA - ClassmatePC (Alternative international)";
- key.type[Group1]="FOUR_LEVEL";
-
- key <LSGT> { [ backslash, bar, backslash, bar ] };
-
- key <KPSU> { [ KP_Subtract, KP_Subtract ] };
-
- key <KP9> { [ KP_Prior, KP_9,
- leftsinglequotemark, dead_breve ] };
- key <KPMU> { [ KP_Multiply, KP_Multiply,
- rightsinglequotemark, dead_abovering ] };
-
- key <KPAD> { [ KP_Add, KP_Add,
- dead_ogonek, dead_diaeresis ] };
-
- key <KPDL> { [ KP_Delete, KP_Decimal,
- dead_abovedot, dead_circumflex ] };
- key <KPDV> { [ KP_Divide, KP_Divide,
- dead_hook, dead_hook ] };
-
- include "level3(switch)"
-};
-
-// classmate-altgr-intl - us(altgr-intl)
-// RCTL is generated by Fn+Alt, because that, when trying to access
-// the level3 symbols at 7,8,9,0,u,i,o,p,j,k,l,;,m,. and / we got
-// the keypad keycodes. The keypad is changed to make Fn+Alt+<KP_key>
-// generate the same symbol as the original key.
-partial alphanumeric_keys
-xkb_symbols "classmate-altgr-intl" {
- include "us(altgr-intl)"
- name[Group1]= "USA - ClassmatePC (International Fn+Alt dead-keys)";
- key.type[Group1]="FOUR_LEVEL";
-
- key <LSGT> { [ backslash, bar, backslash, bar ] };
-
- key <KP7> { [ KP_Home, KP_7,
- dead_horn, dead_horn ] };
- key <KP8> { [ KP_Up, KP_8,
- dead_ogonek, dead_ogonek ] };
- key <KP9> { [ KP_Prior, KP_9,
- leftsinglequotemark, dead_breve ] };
- key <KPMU> { [ KP_Multiply, KP_Multiply,
- rightsinglequotemark, dead_abovering ] };
-
- key <KP4> { [ KP_Left, KP_4,
- uacute, Uacute ] };
- key <KP5> { [ KP_Begin, KP_5,
- iacute, Iacute ] };
- key <KP6> { [ KP_Right, KP_6,
- oacute, Oacute ] };
- key <KPSU> { [ KP_Subtract, KP_Subtract,
- odiaeresis, Odiaeresis ] };
-
- key <KP1> { [ KP_End, KP_1,
- idiaeresis, Idiaeresis ] };
- key <KP2> { [ KP_Down, KP_2,
- oe, OE ] };
- key <KP3> { [ KP_Next, KP_3,
- oslash, Ooblique ] };
- key <KPAD> { [ KP_Add, KP_Add,
- paragraph, degree ] };
-
- key <KP0> { [ KP_Insert, KP_0,
- mu, mu ] };
- key <KPDL> { [ KP_Delete, KP_Decimal,
- dead_abovedot, dead_caron ] };
- key <KPDV> { [ KP_Divide, KP_Divide,
- questiondown, dead_hook ] };
-
- include "level3(switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "olpc" {
-
- include "us(basic)"
- name[Group1]= "USA";
-
- // OLPC international US English keyboard layout.
- // It's a little different from the usual international layout.
- // See: http://wiki.laptop.org/go/Image:Keyboard_english.png
-
- key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
- key <AE01> { [ 1, exclam, exclamdown, exclamdown ] };
- key <AE02> { [ 2, at, notsign, notsign ] };
- key <AE03> { [ 3, numbersign, 0x1000300, 0x1000300 ] }; // combining grave
- key <AE04> { [ 4, dollar, 0x1000301, 0x1000301 ] }; // combining acute
- key <AE05> { [ 5, percent, 0x1000306, 0x1000306 ] }; // combining breve above
- key <AE06> { [ 6,asciicircum, 0x100030A, 0x100030A ] }; // combining ring above
- key <AE07> { [ 7, ampersand, 0x1000302, 0x1000302 ] }; // combining circumflex above
- key <AE08> { [ 8, asterisk, 0x100030C, 0x100030C ] }; // combining caron above
- key <AE09> { [ 9, parenleft, 0x1000307, 0x1000307 ] }; // combining dot above
- key <AE10> { [ 0, parenright, 0x1000308, 0x1000308 ] }; // combining diaeresis above
- key <AE11> { [ minus, underscore, 0x1000304, 0x1000304 ] }; // combining macron above
- key <AE12> { [ equal, plus, 0x1000303, 0x1000303 ] }; // combining tilde above
-
- key <AD01> { [ q, Q, Greek_omega, Greek_OMEGA ] };
- key <AD02> { [ w, W, oslash, Oslash ] };
- key <AD03> { [ e, E, oe, OE ] };
- key <AD04> { [ r, R, 0x1000327, 0x1000327 ] }; // combining cedilla
- key <AD05> { [ t, T, 0x100032E, 0x100032E ] }; // combining breve below
- key <AD06> { [ y, Y, 0x1000325, 0x1000325 ] }; // combining ring below
- key <AD07> { [ u, U, 0x100032D, 0x100032D ] }; // combining circumflex below
- key <AD08> { [ i, I, 0x100032C, 0x100032C ] }; // combining caron below
- key <AD09> { [ o, O, 0x1000323, 0x1000323 ] }; // combining dot below
- key <AD10> { [ p, P, 0x1000324, 0x1000324 ] }; // combining diaeresis below
- key <AD11> { [ bracketleft, braceleft, 0x1000331, 0x1000331 ] }; // combining macron below
- key <AD12> { [bracketright, braceright, 0x1000330, 0x1000330 ] }; // combining tilde below
-
- key <AC01> { [ a, A, ae, AE ] };
- key <AC02> { [ s, S, ssharp, 0x1001E9C ] }; // uppercase S sharp
- key <AC03> { [ d, D, eth, ETH ] };
- key <AC04> { [ f, F, thorn, THORN ] };
- key <AC06> { [ h, H, sterling, sterling ] };
- key <AC07> { [ j, J, EuroSign, EuroSign ] };
- key <AC10> { [ semicolon, colon, masculine, ordfeminine ] };
- key <AC11> { [ apostrophe, quotedbl, currency, currency ] };
- key <BKSL> { [ backslash, bar, section, section ] };
-
- key <AB03> { [ c, C, ccedilla, Ccedilla ] };
- key <AB06> { [ n, N, ntilde, Ntilde ] };
- key <AB07> { [ m, M, mu, mu ] };
- key <AB08> { [ comma, less, guillemotleft, guillemotleft ] };
- key <AB09> { [ period, greater, guillemotright, guillemotright ] };
- key <AB10> { [ slash, question, questiondown, questiondown ] };
-
- key <I219> { [ multiply, division, ISO_Next_Group, ISO_Prev_Group ] };
-
- include "level3(ralt_switch)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "olpc2" {
- include "us(olpc)"
- name[Group1]= "USA - Layout toggle on multiply/divide key";
- include "group(olpc)"
-};
-
-// Based on Cherokee Nation Official Layout
-// http://www.cherokee.org/extras/downloads/font/Keyboard.htm
-
-partial alphanumeric_keys modifier_keys
-xkb_symbols "chr" {
-
- name[Group1]= "USA - Cherokee";
- key.type[group1]="ALPHABETIC";
-
- // Alphanumeric section
- key <TLDE> { [ grave, U13CA ] };
- key <AE01> { [ 1, U13B1 ] };
- key <AE02> { [ 2, U13C7 ] };
- key <AE03> { [ 3, U13E7 ] };
- key <AE04> { [ U13D9, U13B0 ] };
- key <AE05> { [ U13E6, U13B9 ] };
- key <AE06> { [ U13DC, U13DD ] };
- key <AE07> { [ U13CB, U13E1 ] };
- key <AE08> { [ U13D6, U13BA ] };
- key <AE09> { [ U13D2, parenleft ] };
- key <AE10> { [ U13C4, parenright ] };
- key <AE11> { [ U13BF, U13BC ] };
- key <AE12> { [ U13F3, U13BD ] };
-
- key <AD01> { [ U13AA, U13C6 ] };
- key <AD02> { [ U13B3, U13EB ] };
- key <AD03> { [ U13A1, U13E3 ] };
- key <AD04> { [ U13DB, U13CF ] };
- key <AD05> { [ U13D4, U13D8 ] };
- key <AD06> { [ U13EF, U13F2 ] };
- key <AD07> { [ U13A4, U13AD ] };
- key <AD08> { [ U13A2, U13F1 ] };
- key <AD09> { [ U13A3, U13EC ] };
- key <AD10> { [ U13C1, U13EA ] };
- key <AD11> { [ U13D5, U13D1 ] };
- key <AD12> { [ U13B6, U13E4 ] };
- key <BKSL> { [ U13E9, U13EE ] };
-
- key <AC01> { [ U13A0, U13CC ] };
- key <AC02> { [ U13CD, U13CE ] };
- key <AC03> { [ U13D7, U13D0 ] };
- key <AC04> { [ U13A9, U13C8 ] };
- key <AC05> { [ U13A6, U13E5 ] };
- key <AC06> { [ U13AF, U13B2 ] };
- key <AC07> { [ U13DA, U13AB ] };
- key <AC08> { [ U13B8, U13A7 ] };
- key <AC09> { [ U13B5, U13AE ] };
- key <AC10> { [ U13E8, U13E0 ] };
- key <AC11> { [ apostrophe, quotedbl ] };
-
- key <AB01> { [ U13AC, U13C3 ] };
- key <AB02> { [ U13F4, U13ED ] };
- key <AB03> { [ U13D3, U13DF ] };
- key <AB04> { [ U13A5, U13DE ] };
- key <AB05> { [ U13A8, U13F0 ] };
- key <AB06> { [ U13BE, U13BB ] };
- key <AB07> { [ U13C5, U13B7 ] };
- key <AB08> { [ comma, U13E2 ] };
- key <AB09> { [ period, U13B4 ] };
- key <AB10> { [ U13C2, U13C9 ] };
-
- // End alphanumeric section
-};
-
-// Serbian charecters added as third level symbols to US keyboard layout.
-
-partial alphanumeric_keys
-xkb_symbols "hbs" {
-
- name[Group1]= "USA - Serbo-Croatian";
-
- include "us"
-
- key <TLDE> { [ grave, asciitilde ] };
- key <AE06> { [ 6, dead_caron, asciicircum, asciicircum ] };
- key <AC09> { [ l, L, U1C9, U1C8 ] };
- key <AB06> { [ n, N, U1CC, U1CB ] };
- key <AB01> { [ z, Z, U1C6, U1C5 ] };
- key <AD03> { [ e, E, EuroSign, cent ] };
- key <AC03> { [ d, D, dstroke, Dstroke ] };
- key <AC11> { [ dead_acute, quotedbl, apostrophe, apostrophe ] };
- key <SPCE> { [ space, space, nobreakspace, nobreakspace ] };
- key <AB08> { [ comma, less, NoSymbol, guillemotright ] };
- key <AB09> { [ period, greater, NoSymbol, guillemotleft ] };
-
- include "level3(ralt_switch)"
-};
-
-//based on http://upload.wikimedia.org/wikipedia/commons/1/18/T-Mobile_G1_launch_event_2.jpg
-partial alphanumeric_keys
-xkb_symbols "htcdream" {
- include "inet(htcdream)"
- name[Group1]= "USA - htcdream";
-
- //second row
- key <AD01> { [ q, Q, Tab, Tab ] };
- key <AD02> { [ w, W, grave, grave ] };
- key <AD03> { [ e, E, underscore, underscore ] };
- key <AD04> { [ r, R, sterling, sterling ] };
- key <AD05> { [ t, T, EuroSign, EuroSign ] };
- key <AD06> { [ y, Y, division, division ] };
- key <AD07> { [ u, U, multiply, multiply ] };
- key <AD08> { [ i, I, minus, minus ] };
- key <AD09> { [ o, O, plus, plus ] };
- key <AD10> { [ p, P, equal, equal ] };
-
- //third row
- key <AC01> { [ a, A, NoSymbol, NoSymbol ] };
- key <AC02> { [ s, S, bar, bar ] };
- key <AC03> { [ d ,D, backslash, backslash ] };
- key <AC04> { [ f, F, braceleft, braceleft ] };
- key <AC05> { [ g, G, braceright, braceright ] };
- key <AC06> { [ h, H, colon, colon ] };
- key <AC07> { [ j, J, semicolon, semicolon ] };
- key <AC08> { [ k, K, quotedbl, quotedbl ] };
- key <AC09> { [ l, L, apostrophe, apostrophe ] };
-
- //forth row
- key <AB01> { [ z, Z, NoSymbol, NoSymbol ] };
- key <AB02> { [ x, X, NoSymbol, NoSymbol ] };
- key <AB03> { [ c, C, NoSymbol, NoSymbol ] };
- key <AB04> { [ v, V, bracketleft, bracketleft ] };
- key <AB05> { [ b, B, bracketright, bracketright ] };
- key <AB06> { [ n, N, less, less ] };
- key <AB07> { [ m, M, greater, greater ] };
- key <AB08> { [ comma, comma, question, question ] };
-
- //fifth row
- key <FK15> { [ at, at, asciitilde, asciitilde ] };
-
- include "level3(alt_switch)"
-};
-
-// EXTRAS:
-
-// XCompose is out! Unicode combining is in! For those of us who live
-// on the edge: A keymap using Unicode combining characters instead of
-// deadkeys. This variation does not deviate from the lame MS-style
-// US-intl layout; but it uses AltGr for combining, like altgr-intl.
-//
-// This might break your font layout layout systems (because they
-// suck), caveat emptor. Also, most of today's software will count
-// individual combining marks for selection, deletion, character
-// counting &c., and won't be smart enough to do canonical equivalence
-// when searching, &c.
-//
-// With Unicode combining you use "handwriting order", not
-// "typewriting order" as with deadkeys. That is, you first type the
-// base character, then the diacritics/accents/modifiers. This has
-// the advantage of avoiding hidden states --- each keypress changes
-// something on screen.
-//
-// TODO: as of now, this duplicates all us(intl) functionality with
-// combining. With care, perhaps we could add more combining marks
-// not present in intl, and support all major languages.
-partial alphanumeric_keys
-xkb_symbols "intl-unicode" {
-
- name[Group1]= "USA - International (AltGr Unicode combining)";
-
- include "us(intl)"
- include "level3(ralt_switch)"
-
- // grave, tilde
- key <TLDE> { [grave, asciitilde, U0300, U0303 ] };
- // double acute
- key <AE02> { [ 2, at, twosuperior, U030B ] };
- // macron
- key <AE03> { [ 3, numbersign, threesuperior, U0304 ] };
- // circumflex
- key <AE06> { [ 6, asciicircum, onequarter, U0302 ] };
- // horn
- key <AE07> { [ 7, ampersand, onehalf, U031B ] };
- // ogonek
- key <AE08> { [ 8, asterisk, threequarters, U0328 ] };
- // breve
- key <AE09> { [ 9, parenleft, leftsinglequotemark, U0306 ] };
- // abovering
- key <AE10> { [ 0, parenright, rightsinglequotemark, U030A ] };
-
- // belowdot
- key <AE11> { [ minus, underscore, yen, U0323 ] };
- // acute, diaeresis
- key <AC11> { [apostrophe, quotedbl, U0301, U0308 ] };
- // abovedot, caron
- key <AB09> { [ period, greater, U0307, U030C ] };
- // hook
- key <AB10> { [ slash, question, questiondown, 0309 ] };
-
- // alt-intl compatibility
- // cedilla, caron
- key <AB08> { [ comma, less, U0327, U030C ] };
- // ogonek, diaeresis
- key <AC10> { [ semicolon, colon, U0328, U0308 ] };
- // doubleacute, horn
- key <AE12> { [ equal, plus, U030B, U031B ] };
-
- // we don't do combining latin letters and combining enclosures
- // because support for those is very rare.
-};
-
-// XCompose is out! Unicode combining is in! For those of us who live
-// on the edge: A keymap using Unicode combining characters instead of
-// deadkeys. This variation does break compatibility with us-intl,
-// whenever I thought it would be more mnemonic or Unicodeish.
-partial alphanumeric_keys
-xkb_symbols "alt-intl-unicode" {
-
- name[Group1]= "USA - International (AltGr Unicode combining, alternative)";
-
- include "extras/us(intl-unicode)"
- include "level3(ralt_switch)"
-
- // easier macron; em-dash.
- // em-dash is available via compose, but I added here since it's such
- // an important typographic character.
- key <AE11> { [ minus, underscore, U0304, U2014 ] };
-
- // belowdot, abovedot (caron at coma/less key, per above)
- key <AB09> { [ period, greater, U0323, U0307 ] };
-
-};
-
-partial alphanumeric_keys
-xkb_symbols "ats" {
-
- include "us"
-
- name[Group1]= "USA - Atsina";
-
- //Using Dead key to get COMBINING COMMA ABOVE for ejectives on
- //q, l, t, s, m, g, k, p, w, y, r
- //XCompose key is used for the other accute and grave.
-
- key <AD03> { [ e, E, eacute, Eacute ] };
- key <AD07> { [ u, U, uacute, Uacute ] };
- key <AD08> { [ i, I, iacute, Iacute ] };
- key <AD09> { [ o, O, oacute, Oacute ] };
- key <AD11> { [ bracketleft, braceleft, U03B8 ] };
- key <AD12> { [ bracketright, braceright, U010D, U010C ] };
- //U+010C (uppercase Č) and U+010D (lowercase č).
-
- key <AC01> { [ a, A, aacute, Aacute ] };
-
-
- //Small letter Open use compose to key get acute accent
- key <AB03> { [ c, C, U0254, U0186 ] };
- key <AB08> { [ comma, less, U0313 ] };
- key <AB10> { [ slash, question, U0294 ] };
-
- include "level3(ralt_switch)"
- include "compose(rctrl)"
-};
-
-partial alphanumeric_keys
-xkb_symbols "crd" {
-
- include "us"
-
- name[Group1]= "USA - Couer D'alene Salish";
-
- // Alphanumeric section
- key <AD02> { [ w, W, U02B7, U02B7 ] };
- key <AE07> { [ 7, ampersand, U0294 ] };
- key <AD01> { [ q, Q, U221A ] };
- key <AB04> { [ v, V, U0259 ] };
- key <BKSL> { [ backslash, bar, U026B ] };
- key <AD03> { [ e, E, U025B ] };
- key <AD08> { [ i, I, U026A ] };
- key <AC07> { [ j, J, U01F0 ] };
- key <AE06> { [ 6, asciicircum, U0295 ] };
- key <AC02> { [ s, S, U0161 ] };
- key <AB03> { [ c, C, U010D ] };
- key <AD09> { [ o, O, U0254 ] };
- key <AB09> { [ period, greater, U0323 ] };
-
- include "level3(ralt_switch)"
- include "compose(rctrl)"
-
- // End alphanumeric section
-};
+default
+partial alphanumeric_keys modifier_keys
+xkb_symbols "basic" {
+
+ name[Group1]= "USA";
+
+ // Alphanumeric section
+ key <TLDE> { [ grave, asciitilde ] };
+ key <AE01> { [ 1, exclam ] };
+ key <AE02> { [ 2, at ] };
+ key <AE03> { [ 3, numbersign ] };
+ key <AE04> { [ 4, dollar ] };
+ key <AE05> { [ 5, percent ] };
+ key <AE06> { [ 6, asciicircum ] };
+ key <AE07> { [ 7, ampersand ] };
+ key <AE08> { [ 8, asterisk ] };
+ key <AE09> { [ 9, parenleft ] };
+ key <AE10> { [ 0, parenright ] };
+ key <AE11> { [ minus, underscore ] };
+ key <AE12> { [ equal, plus ] };
+
+ key <AD01> { [ q, Q ] };
+ key <AD02> { [ w, W ] };
+ key <AD03> { [ e, E ] };
+ key <AD04> { [ r, R ] };
+ key <AD05> { [ t, T ] };
+ key <AD06> { [ y, Y ] };
+ key <AD07> { [ u, U ] };
+ key <AD08> { [ i, I ] };
+ key <AD09> { [ o, O ] };
+ key <AD10> { [ p, P ] };
+ key <AD11> { [ bracketleft, braceleft ] };
+ key <AD12> { [ bracketright, braceright ] };
+
+ key <AC01> { [ a, A ] };
+ key <AC02> { [ s, S ] };
+ key <AC03> { [ d, D ] };
+ key <AC04> { [ f, F ] };
+ key <AC05> { [ g, G ] };
+ key <AC06> { [ h, H ] };
+ key <AC07> { [ j, J ] };
+ key <AC08> { [ k, K ] };
+ key <AC09> { [ l, L ] };
+ key <AC10> { [ semicolon, colon ] };
+ key <AC11> { [ apostrophe, quotedbl ] };
+
+ key <AB01> { [ z, Z ] };
+ key <AB02> { [ x, X ] };
+ key <AB03> { [ c, C ] };
+ key <AB04> { [ v, V ] };
+ key <AB05> { [ b, B ] };
+ key <AB06> { [ n, N ] };
+ key <AB07> { [ m, M ] };
+ key <AB08> { [ comma, less ] };
+ key <AB09> { [ period, greater ] };
+ key <AB10> { [ slash, question ] };
+
+ key <BKSL> { [ backslash, bar ] };
+ // End alphanumeric section
+};
+
+partial alphanumeric_keys
+xkb_symbols "euro" {
+
+ name[Group1]= "USA - With EuroSign on 5";
+
+ include "us(basic)"
+
+ include "eurosign(5)"
+
+ include "level3(ralt_switch)"
+};
+
+
+partial alphanumeric_keys
+xkb_symbols "intl" {
+
+ name[Group1]= "USA - International (with dead keys)";
+
+ include "us(basic)"
+
+ // Alphanumeric section
+ key <TLDE> { [dead_grave, dead_tilde, grave, asciitilde ] };
+ key <AE01> { [ 1, exclam, exclamdown, onesuperior ] };
+ key <AE02> { [ 2, at, twosuperior, dead_doubleacute ] };
+ key <AE03> { [ 3, numbersign, threesuperior, dead_macron ] };
+ key <AE04> { [ 4, dollar, currency, sterling ] };
+ key <AE05> { [ 5, percent, EuroSign, dead_cedilla ] };
+ key <AE06> { [ 6, dead_circumflex, onequarter, asciicircum ] };
+ key <AE07> { [ 7, ampersand, onehalf, dead_horn ] };
+ key <AE08> { [ 8, asterisk, threequarters, dead_ogonek ] };
+ key <AE09> { [ 9, parenleft, leftsinglequotemark, dead_breve ] };
+ key <AE10> { [ 0, parenright, rightsinglequotemark, dead_abovering ] };
+ key <AE11> { [ minus, underscore, yen, dead_belowdot ] };
+ key <AE12> { [ equal, plus, multiply, division ] };
+
+ key <AD01> { [ q, Q, adiaeresis, Adiaeresis ] };
+ key <AD02> { [ w, W, aring, Aring ] };
+ key <AD03> { [ e, E, eacute, Eacute ] };
+ key <AD04> { [ r, R, registered, registered ] };
+ key <AD05> { [ t, T, thorn, THORN ] };
+ key <AD06> { [ y, Y, udiaeresis, Udiaeresis ] };
+ key <AD07> { [ u, U, uacute, Uacute ] };
+ key <AD08> { [ i, I, iacute, Iacute ] };
+ key <AD09> { [ o, O, oacute, Oacute ] };
+ key <AD10> { [ p, P, odiaeresis, Odiaeresis ] };
+ key <AD11> { [ bracketleft, braceleft, guillemotleft, leftdoublequotemark ] };
+ key <AD12> { [bracketright, braceright, guillemotright, rightdoublequotemark ] };
+
+ key <AC01> { [ a, A, aacute, Aacute ] };
+ key <AC02> { [ s, S, ssharp, section ] };
+ key <AC03> { [ d, D, eth, ETH ] };
+ key <AC04> { [ f, F, f, F ] };
+ key <AC05> { [ g, G, g, G ] };
+ key <AC06> { [ h, H, h, H ] };
+ key <AC07> { [ j, J, j, J ] };
+ key <AC08> { [ k, K, oe, OE ] };
+
+ key <AC09> { [ l, L, oslash, Ooblique ] };
+ key <AC10> { [ semicolon, colon, paragraph, degree ] };
+ key <AC11> { [dead_acute, dead_diaeresis, apostrophe, quotedbl ] };
+
+ key <AB01> { [ z, Z, ae, AE ] };
+ key <AB02> { [ x, X, x, X ] };
+ key <AB03> { [ c, C, copyright, cent ] };
+ key <AB04> { [ v, V, v, V ] };
+ key <AB05> { [ b, B, b, B ] };
+ key <AB06> { [ n, N, ntilde, Ntilde ] };
+ key <AB07> { [ m, M, mu, mu ] };
+ key <AB08> { [ comma, less, ccedilla, Ccedilla ] };
+ key <AB09> { [ period, greater, dead_abovedot, dead_caron ] };
+ key <AB10> { [ slash, question, questiondown, dead_hook ] };
+ key <BKSL> { [ backslash, bar, notsign, brokenbar ] };
+
+ include "level3(ralt_switch)"
+};
+
+// Based on symbols/us_intl keyboard map:
+// Dead-keys definition for a very simple US/ASCII layout.
+// by Conectiva (http://www.conectiva.com.br)
+// modified by Ricardo Y. Igarashi (iga@that.com.br)
+
+// Added the following deadkeys, to make it truly international:
+//
+// dead_macron: on AltGr-minus
+// dead_breve: on AltGr-parenleft
+// dead_abovedot: on AltGr-period
+// dead_abovering: on AltGr-0
+// dead_doubleacute: on AltGr-equal (as quotedbl is already used)
+// dead_caron: on AltGr-less (AltGr-shift-comma)
+// dead_cedilla: on AltGr-comma
+// dead_ogonek: on AltGr-semicolon
+// dead_belowdot: on AltGr-underscore (AltGr-shift-minus)
+// dead_hook: on AltGr-question
+// dead_horn: on AltGr-plus (AltGr-shift-equal)
+// dead_diaeresis: on AltGr-colon (Alt-shift-semicolon)
+//
+// those were already there:
+// dead_grave
+// dead_acute
+// dead_circumflex
+// dead_tilde
+// dead_diaeresis
+
+partial alphanumeric_keys
+xkb_symbols "alt-intl" {
+
+ name[Group1]= "USA - Alternative international";
+
+ include "us"
+
+ key <TLDE> { [ dead_grave, dead_tilde, grave, asciitilde ] };
+ key <AE05> { [ 5, percent, EuroSign ] };
+ key <AE06> { [ 6, dead_circumflex, asciicircum, asciicircum ] };
+ key <AE09> { [ 9, parenleft, leftsinglequotemark, dead_breve ] };
+ key <AE10> { [ 0, parenright, rightsinglequotemark, dead_abovering ] };
+ key <AE11> { [ minus, underscore, dead_macron, dead_belowdot ] };
+ key <AE12> { [ equal, plus, dead_doubleacute, dead_horn ] };
+
+ key <AD03> { [ e, E, EuroSign, cent ] };
+
+ key <AC10> { [ semicolon, colon, dead_ogonek, dead_diaeresis ] };
+ key <AC11> { [ dead_acute, dead_diaeresis, apostrophe, quotedbl ] };
+
+ key <AB08> { [ comma, less, dead_cedilla, dead_caron ] };
+ key <AB09> { [ period, greater, dead_abovedot, dead_circumflex ] };
+ key <AB10> { [ slash, question, dead_hook, dead_hook ] };
+
+ include "level3(ralt_switch)"
+};
+
+// based on a keyboard map from an 'xkb/symbols/dk' file
+
+partial alphanumeric_keys
+xkb_symbols "dvorak" {
+
+ name[Group1]= "USA - Dvorak";
+
+ // Alphanumeric section
+
+ key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
+
+ key <AE01> { [ 1, exclam ] };
+ key <AE02> { [ 2, at ] };
+ key <AE03> { [ 3, numbersign ] };
+ key <AE04> { [ 4, dollar ] };
+ key <AE05> { [ 5, percent ] };
+ key <AE06> { [ 6, asciicircum, dead_circumflex, dead_circumflex ] };
+ key <AE07> { [ 7, ampersand ] };
+ key <AE08> { [ 8, asterisk ] };
+ key <AE09> { [ 9, parenleft, dead_grave] };
+ key <AE10> { [ 0, parenright ] };
+ key <AE11> { [ bracketleft, braceleft ] };
+ key <AE12> { [ bracketright, braceright, dead_tilde] };
+
+ key <AD01> { [ apostrophe, quotedbl, dead_acute, dead_diaeresis ] };
+ key <AD02> { [ comma, less, dead_cedilla, dead_caron ] };
+ key <AD03> { [ period, greater, dead_abovedot, periodcentered ] };
+ key <AD04> { [ p, P ] };
+ key <AD05> { [ y, Y ] };
+ key <AD06> { [ f, F ] };
+ key <AD07> { [ g, G ] };
+ key <AD08> { [ c, C ] };
+ key <AD09> { [ r, R ] };
+ key <AD10> { [ l, L ] };
+ key <AD11> { [ slash, question ] };
+ key <AD12> { [ equal, plus ] };
+
+ key <AC01> { [ a, A ] };
+ key <AC02> { [ o, O ] };
+ key <AC03> { [ e, E ] };
+ key <AC04> { [ u, U ] };
+ key <AC05> { [ i, I ] };
+ key <AC06> { [ d, D ] };
+ key <AC07> { [ h, H ] };
+ key <AC08> { [ t, T ] };
+ key <AC09> { [ n, N ] };
+ key <AC10> { [ s, S ] };
+ key <AC11> { [ minus, underscore ] };
+
+ key <AB01> { [ semicolon, colon, dead_ogonek, dead_doubleacute ] };
+ key <AB02> { [ q, Q ] };
+ key <AB03> { [ j, J ] };
+ key <AB04> { [ k, K ] };
+ key <AB05> { [ x, X ] };
+ key <AB06> { [ b, B ] };
+ key <AB07> { [ m, M ] };
+ key <AB08> { [ w, W ] };
+ key <AB09> { [ v, V ] };
+ key <AB10> { [ z, Z ] };
+
+ key <BKSL> { [ backslash, bar ] };
+};
+
+// Dvorak international with dead keys
+// Olivier Mehani (shtrom-xorg@ssji.net)
+// Reproduce the per-key mapping of us(intl) for the dvorak layout
+// aka "I just swapped my keys over"
+partial alphanumeric_keys
+xkb_symbols "dvorak-intl" {
+
+ name[Group1]= "USA - Dvorak international (with dead keys)";
+
+ include "us(dvorak)"
+
+ key <TLDE> { [dead_grave, dead_tilde, grave, asciitilde ] };
+
+ key <AE01> { [ 1, exclam, exclamdown, onesuperior ] };
+ key <AE02> { [ 2, at, twosuperior, dead_doubleacute ] };
+ key <AE03> { [ 3, numbersign, threesuperior, dead_macron ] };
+ key <AE04> { [ 4, dollar, currency, sterling ] };
+ key <AE05> { [ 5, percent, EuroSign, dead_cedilla ] };
+ key <AE06> { [ 6, dead_circumflex, onequarter, asciicircum ] };
+ key <AE07> { [ 7, ampersand, onehalf, dead_horn ] };
+ key <AE08> { [ 8, asterisk, threequarters, dead_ogonek ] };
+ key <AE09> { [ 9, parenleft, leftsinglequotemark, dead_breve ] };
+ key <AE10> { [ 0, parenright, rightsinglequotemark, dead_abovering ] };
+ key <AE11> { [ bracketleft, braceleft, guillemotleft, leftdoublequotemark ] };
+ key <AE12> { [bracketright, braceright, guillemotright, rightdoublequotemark ] };
+
+ key <AD01> { [dead_acute, dead_diaeresis, apostrophe, quotedbl ] };
+ key <AD02> { [ comma, less, ccedilla, Ccedilla ] };
+ key <AD03> { [ period, greater, dead_abovedot, dead_caron ] };
+ key <AD04> { [ p, P, odiaeresis, Odiaeresis ] };
+ key <AD05> { [ y, Y, udiaeresis, Udiaeresis ] };
+ // key <AD06> { [ f, F ] };
+ // key <AD07> { [ g, G ] };
+ key <AD08> { [ c, C, copyright, cent ] };
+ key <AD09> { [ r, R, registered, registered ] };
+ key <AD10> { [ l, L, oslash, Ooblique ] };
+ key <AD11> { [ slash, question, questiondown, dead_hook ] };
+ // key <AD12> { [ equal, plus, multiply, division ] };
+
+ key <AC01> { [ a, A, aacute, Aacute ] };
+ key <AC02> { [ o, O, oacute, Oacute ] };
+ key <AC03> { [ e, E, eacute, Eacute ] };
+ key <AC04> { [ u, U, uacute, Uacute ] };
+ key <AC05> { [ i, I, iacute, Iacute ] };
+ key <AC06> { [ d, D, eth, ETH ] };
+ // key <AC07> { [ h, H ] };
+ key <AC08> { [ t, T, thorn, THORN ] };
+ key <AC09> { [ n, N, ntilde, Ntilde ] };
+ key <AC10> { [ s, S, ssharp, section ] };
+ // key <AC11> { [ minus, underscore, yen, dead_belowdot ] };
+
+ key <AB01> { [ semicolon, colon, paragraph, degree ] };
+ key <AB02> { [ q, Q, adiaeresis, Adiaeresis ] };
+ // key <AB03> { [ j, J ] };
+ key <AB04> { [ k, K, oe, OE ] };
+ // key <AB05> { [ x, X ] };
+ // key <AB06> { [ b, B ] };
+ key <AB07> { [ m, M, mu, mu ] };
+ key <AB08> { [ w, W, aring, Aring ] };
+ // key <AB09> { [ v, V ] };
+ key <AB10> { [ z, Z, ae, AE ] };
+
+ key <BKSL> { [ backslash, bar, notsign, brokenbar ] };
+
+ include "level3(ralt_switch)"
+};
+
+// Dvorak international without dead keys
+// Stephane Magnenat (stephane at magnenat dot net, http://stephane.magnenat.net)
+// Based on information from http://www.poupinou.org/dvorak/index.html
+//
+// ` 1 2 3 4 5 6 7 8 9 0 [ ] \
+// €
+//
+// ' , . p y f g c r l / =
+// ä ê ë ü ç
+//
+// a o e u i d h t n s -
+// à ô é û î ß
+//
+// ; q j k x b m w v z
+// â ö è ù ï
+
+partial alphanumeric_keys
+xkb_symbols "dvorak-alt-intl" {
+
+ name[Group1]= "USA - Dvorak alternative international (no dead keys)";
+
+ include "us(dvorak)"
+
+ key <AE04> { [ 4, dollar, EuroSign ] };
+
+ key <AD02> { [ comma, less, adiaeresis, dead_caron ] };
+ key <AD03> { [ period, greater, ecircumflex, periodcentered ] };
+ key <AD04> { [ p, P, ediaeresis, dead_cedilla ] };
+ key <AD05> { [ y, Y, udiaeresis ] };
+ key <AD08> { [ c, C, ccedilla, dead_abovedot ] };
+
+ key <AC01> { [ a, A, agrave ] };
+ key <AC02> { [ o, O, ocircumflex ] };
+ key <AC03> { [ e, E, eacute ] };
+ key <AC04> { [ u, U, ucircumflex ] };
+ key <AC05> { [ i, I, icircumflex ] };
+ key <AC10> { [ s, S, ssharp ] };
+
+ key <AB01> { [ semicolon, colon, acircumflex ] };
+ key <AB02> { [ q, Q, odiaeresis, dead_ogonek ] };
+ key <AB03> { [ j, J, egrave, dead_doubleacute ] };
+ key <AB04> { [ k, K, ugrave ] };
+ key <AB05> { [ x, X, idiaeresis ] };
+
+ include "level3(ralt_switch)"
+};
+
+// Left and right handed dvorak layouts
+// by sqweek <sqweek@gmail.com> 2006-01-30
+// Based on the corresponding layouts in the console-tools package.
+partial alphanumeric_keys
+xkb_symbols "dvorak-l" {
+
+ include "us(dvorak)"
+ name[Group1]= "USA - Left handed Dvorak";
+
+ key <AE01> { [ bracketleft, braceleft ] };
+ key <AE02> { [ bracketright, braceright ] };
+ key <AE03> { [ slash, question ] };
+ key <AE04> { [ p, P ] };
+ key <AE05> { [ f, F ] };
+ key <AE06> { [ m, M ] };
+ key <AE07> { [ l, L ] };
+ key <AE08> { [ j, J ] };
+ key <AE09> { [ 4, dollar ] };
+ key <AE10> { [ 3, numbersign ] };
+ key <AE11> { [ 2, at ] };
+ key <AE12> { [ 1, exclam ] };
+
+ key <AD01> { [ semicolon, colon ] };
+ key <AD02> { [ q, Q ] };
+ key <AD03> { [ b, B ] };
+ key <AD04> { [ y, Y ] };
+ key <AD05> { [ u, U ] };
+ key <AD06> { [ r, R ] };
+ key <AD07> { [ s, S ] };
+ key <AD08> { [ o, O ] };
+ key <AD09> { [ period, greater ] };
+ key <AD10> { [ 6, asciicircum ] };
+ key <AD11> { [ 5, percent ] };
+ key <AD12> { [ equal, plus ] };
+
+ key <AC01> { [ minus, underscore ] };
+ key <AC02> { [ k, K ] };
+ key <AC03> { [ c, C ] };
+ key <AC04> { [ d, D ] };
+ key <AC05> { [ t, T ] };
+ key <AC06> { [ h, H ] };
+ key <AC07> { [ e, E ] };
+ key <AC08> { [ a, A ] };
+ key <AC09> { [ z, Z ] };
+ key <AC10> { [ 8, asterisk ] };
+ key <AC11> { [ 7, ampersand ] };
+
+ key <AB01> { [ apostrophe, quotedbl ] };
+ key <AB02> { [ x, X ] };
+ key <AB03> { [ g, G ] };
+ key <AB04> { [ v, V ] };
+ key <AB05> { [ w, W ] };
+ key <AB06> { [ n, N ] };
+ key <AB07> { [ i, I ] };
+ key <AB08> { [ comma, less ] };
+ key <AB09> { [ 0, parenright ] };
+ key <AB10> { [ 9, parenleft ] };
+};
+
+partial alphanumeric_keys
+xkb_symbols "dvorak-r" {
+
+ include "us(dvorak)"
+ name[Group1]= "USA - Right handed Dvorak";
+
+ key <AE01> { [ 1, exclam ] };
+ key <AE02> { [ 2, at ] };
+ key <AE03> { [ 3, numbersign ] };
+ key <AE04> { [ 4, dollar ] };
+ key <AE05> { [ j, J ] };
+ key <AE06> { [ l, L ] };
+ key <AE07> { [ m, M ] };
+ key <AE08> { [ f, F ] };
+ key <AE09> { [ p, P ] };
+ key <AE10> { [ slash, question ] };
+ key <AE11> { [ bracketleft, braceleft ] };
+ key <AE12> { [ bracketright, braceright ] };
+
+ key <AD01> { [ 5, percent ] };
+ key <AD02> { [ 6, asciicircum ] };
+ key <AD03> { [ q, Q ] };
+ key <AD04> { [ period, greater ] };
+ key <AD05> { [ o, O ] };
+ key <AD06> { [ r, R ] };
+ key <AD07> { [ s, S ] };
+ key <AD08> { [ u, U ] };
+ key <AD09> { [ y, Y ] };
+ key <AD10> { [ b, B ] };
+ key <AD11> { [ semicolon, colon ] };
+ key <AD12> { [ equal, plus ] };
+
+ key <AC01> { [ 7, ampersand ] };
+ key <AC02> { [ 8, asterisk ] };
+ key <AC03> { [ z, Z ] };
+ key <AC04> { [ a, A ] };
+ key <AC05> { [ e, E ] };
+ key <AC06> { [ h, H ] };
+ key <AC07> { [ t, T ] };
+ key <AC08> { [ d, D ] };
+ key <AC09> { [ c, C ] };
+ key <AC10> { [ k, K ] };
+ key <AC11> { [ minus, underscore ] };
+
+ key <AB01> { [ 9, parenleft ] };
+ key <AB02> { [ 0, parenright ] };
+ key <AB03> { [ x, X ] };
+ key <AB04> { [ comma, less ] };
+ key <AB05> { [ i, I ] };
+ key <AB06> { [ n, N ] };
+ key <AB07> { [ w, W ] };
+ key <AB08> { [ v, V ] };
+ key <AB09> { [ g, G ] };
+ key <AB10> { [ apostrophe, quotedbl ] };
+};
+
+// Classic dvorak layout
+// by Piter Punk <piterpk@terra.com.br> - 2006-07-06
+// Based on dvorak layout and e-mail from Russel L. Harris rlharris@oplink.net
+// on xorg list.
+partial alphanumeric_keys
+xkb_symbols "dvorak-classic" {
+
+ name[Group1]= "USA - Classic Dvorak";
+
+ // Alphanumeric section
+
+ key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
+
+ key <AE01> { [ bracketleft, braceleft ] };
+ key <AE02> { [ 7, ampersand ] };
+ key <AE03> { [ 5, percent ] };
+ key <AE04> { [ 3, numbersign ] };
+ key <AE05> { [ 1, exclam ] };
+ key <AE06> { [ 9, parenleft, dead_grave] };
+ key <AE07> { [ 0, parenright ] };
+ key <AE08> { [ 2, at ] };
+ key <AE09> { [ 4, dollar ] };
+ key <AE10> { [ 6, asciicircum, dead_circumflex, dead_circumflex ] };
+ key <AE11> { [ 8, asterisk ] };
+ key <AE12> { [ bracketright, braceright, dead_tilde] };
+
+ key <AD01> { [ slash, question ] };
+ key <AD02> { [ comma, less, dead_cedilla, dead_caron ] };
+ key <AD03> { [ period, greater, dead_abovedot, periodcentered ] };
+ key <AD04> { [ p, P ] };
+ key <AD05> { [ y, Y ] };
+ key <AD06> { [ f, F ] };
+ key <AD07> { [ g, G ] };
+ key <AD08> { [ c, C ] };
+ key <AD09> { [ r, R ] };
+ key <AD10> { [ l, L ] };
+ key <AD11> { [ apostrophe, quotedbl, dead_acute, dead_diaeresis ] };
+ key <AD12> { [ equal, plus ] };
+
+ key <AC01> { [ a, A ] };
+ key <AC02> { [ o, O ] };
+ key <AC03> { [ e, E ] };
+ key <AC04> { [ u, U ] };
+ key <AC05> { [ i, I ] };
+ key <AC06> { [ d, D ] };
+ key <AC07> { [ h, H ] };
+ key <AC08> { [ t, T ] };
+ key <AC09> { [ n, N ] };
+ key <AC10> { [ s, S ] };
+ key <AC11> { [ minus, underscore ] };
+
+ key <AB01> { [ semicolon, colon, dead_ogonek, dead_doubleacute ] };
+ key <AB02> { [ q, Q ] };
+ key <AB03> { [ j, J ] };
+ key <AB04> { [ k, K ] };
+ key <AB05> { [ x, X ] };
+ key <AB06> { [ b, B ] };
+ key <AB07> { [ m, M ] };
+ key <AB08> { [ w, W ] };
+ key <AB09> { [ v, V ] };
+ key <AB10> { [ z, Z ] };
+ key <BKSL> { [ backslash, bar ] };
+};
+
+// Programmer Dvorak, by Roland Kaufmann <rlndkfmn at gmail dot com>
+// License: BSD, available at <http://www.kaufmann.no/roland/dvorak/license.html>
+// Main features: Numbers are in shift position (like French), symbols have been
+// placed in locations that give good hand-alternation and finger rolling with
+// symbols that usually follows, accented characters are possible for I18N.
+partial alphanumeric_keys
+xkb_symbols "dvp" {
+ include "us(dvorak)"
+
+ name[Group1] = "USA - Programmer Dvorak";
+
+ // Unmodified Shift AltGr Shift+AltGr
+ // symbols row, left side
+ key <TLDE> { [ dollar, asciitilde, dead_tilde ] };
+ key <AE01> { [ ampersand, percent ] };
+ key <AE02> { [ bracketleft, 7, currency ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+ key <AE03> { [ braceleft, 5, cent ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+ key <AE04> { [ braceright, 3, yen ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+ key <AE05> { [ parenleft, 1, EuroSign ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+ key <AE06> { [ equal, 9, sterling ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+
+ // symbols row, right side
+ key <AE07> { [ asterisk, 0 ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+ key <AE08> { [ parenright, 2, onehalf ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+ key <AE09> { [ plus, 4 ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+ key <AE10> { [ bracketright, 6 ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+ key <AE11> { [ exclam, 8, exclamdown ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+ key <AE12> { [ numbersign, grave, dead_grave ] };
+ key <BKSP> { [ BackSpace ] };
+
+ // upper row, left side
+ key <AD01> { [ semicolon, colon, dead_diaeresis ] };
+ key <AD02> { [ comma, less, guillemotleft ] };
+ key <AD03> { [ period, greater, guillemotright ] };
+ key <AD04> { [ p, P, paragraph, section ] };
+ key <AD05> { [ y, Y, udiaeresis, Udiaeresis ] };
+
+ // upper row, right side
+ key <AD08> { [ c, C, ccedilla, Ccedilla ] };
+ key <AD09> { [ r, R, registered, trademark ] };
+ key <AD11> { [ slash, question, questiondown ] };
+ key <AD12> { [ at, asciicircum, dead_circumflex, dead_caron ] };
+
+ // home row, left side
+ key <AC01> { [ a, A, aring, Aring ] };
+ key <AC02> { [ o, O, oslash, Ooblique ] };
+ key <AC03> { [ e, E, ae, AE ] };
+ key <AC04> { [ u, U, eacute, Eacute ] };
+
+ // home row, right side
+ key <AC06> { [ d, D, eth, ETH ] };
+ key <AC07> { [ h, H, dead_acute ] };
+ key <AC08> { [ t, T, thorn, THORN ] };
+ key <AC09> { [ n, N, ntilde, Ntilde ] };
+ key <AC10> { [ s, S, ssharp ] };
+ key <AC11> { [ minus, underscore, hyphen ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };
+ key <BKSL> { [ backslash, bar ] };
+
+ // lower row, left side
+ key <AB01> { [ apostrophe, quotedbl, dead_acute ] };
+};
+
+// phonetic layout for Russian letters on an US keyboard
+// by Ivan Popov <pin@konvalo.org> 2005-07-17
+
+// level3 modifier is a shortcut to the "us" meaning of the keys where
+// we place cyrillic letters, handy for accessing the corresponding
+// punctuation marks.
+// It is important to have access to punctuation marks, and the rest of
+// alphabetical keys are added for being consequent so that the users
+// can expect the level3 modifier to give what the key label shows.
+
+partial alphanumeric_keys
+xkb_symbols "rus" {
+
+ name[Group1]= "USA - Russian phonetic";
+
+ include "us(basic)"
+
+key.type[group1]="FOUR_LEVEL_ALPHABETIC";
+
+ key <LatA> { [ Cyrillic_a, Cyrillic_A ] };
+ key <LatB> { [ Cyrillic_be, Cyrillic_BE ] };
+ key <LatW> { [ Cyrillic_ve, Cyrillic_VE ] };
+ key <LatG> { [ Cyrillic_ghe, Cyrillic_GHE ] };
+ key <LatD> { [ Cyrillic_de, Cyrillic_DE ] };
+ key <LatE> { [ Cyrillic_ie, Cyrillic_IE ] };
+ key <TLDE> { [ Cyrillic_io, Cyrillic_IO, grave, asciitilde ] };
+ key <LatV> { [ Cyrillic_zhe, Cyrillic_ZHE ] };
+ key <LatZ> { [ Cyrillic_ze, Cyrillic_ZE ] };
+ key <LatI> { [ Cyrillic_i, Cyrillic_I ] };
+ key <LatJ> { [ Cyrillic_shorti, Cyrillic_SHORTI ] };
+ key <LatK> { [ Cyrillic_ka, Cyrillic_KA ] };
+ key <LatL> { [ Cyrillic_el, Cyrillic_EL ] };
+ key <LatM> { [ Cyrillic_em, Cyrillic_EM ] };
+ key <LatN> { [ Cyrillic_en, Cyrillic_EN ] };
+ key <LatO> { [ Cyrillic_o, Cyrillic_O ] };
+ key <LatP> { [ Cyrillic_pe, Cyrillic_PE ] };
+ key <LatR> { [ Cyrillic_er, Cyrillic_ER ] };
+ key <LatS> { [ Cyrillic_es, Cyrillic_ES ] };
+ key <LatT> { [ Cyrillic_te, Cyrillic_TE ] };
+ key <LatU> { [ Cyrillic_u, Cyrillic_U ] };
+ key <LatF> { [ Cyrillic_ef, Cyrillic_EF ] };
+ key <LatH> { [ Cyrillic_ha, Cyrillic_HA ] };
+ key <LatC> { [ Cyrillic_tse, Cyrillic_TSE ] };
+ key <AC10> { [ Cyrillic_che, Cyrillic_CHE, semicolon, colon ] };
+ key <AD11> { [ Cyrillic_sha, Cyrillic_SHA, bracketleft, braceleft] };
+ key <AD12> { [ Cyrillic_shcha, Cyrillic_SHCHA, bracketright, braceright ] };
+ key <AE12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, equal, plus ] };
+ key <LatY> { [ Cyrillic_yeru, Cyrillic_YERU ] };
+ key <LatX> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN ] };
+ key <BKSL> { [ Cyrillic_e, Cyrillic_E, backslash, bar ] };
+ key <AC11> { [ Cyrillic_yu, Cyrillic_YU, apostrophe, quotedbl ] };
+ key <LatQ> { [ Cyrillic_ya, Cyrillic_YA ] };
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "mac" {
+
+ include "us(basic)"
+ name[Group1]= "USA - Macintosh";
+ key.type[group1]="FOUR_LEVEL";
+
+ // Slightly improvised from http://homepage.mac.com/thgewecke/kblayout.jpg
+ key <LSGT> { [ section, plusminus, section, plusminus ] };
+ key <TLDE> { [ grave, asciitilde, dead_grave, dead_horn ] };
+ key <AE01> { [ 1, exclam, exclamdown, U2044 ] };
+ key <AE02> { [ 2, at, trademark, EuroSign ] };
+ key <AE03> { [ 3, numbersign, sterling, U2039 ] };
+ key <AE04> { [ 4, dollar, cent, U203A ] };
+ key <AE05> { [ 5, percent, infinity, UFB01 ] };
+ key <AE06> { [ 6,asciicircum, section, UFB02 ] };
+ key <AE07> { [ 7, ampersand, paragraph, doubledagger ] };
+ key <AE08> { [ 8, asterisk, enfilledcircbullet, degree ] };
+ key <AE09> { [ 9, parenleft, ordfeminine, periodcentered ] };
+ key <AE10> { [ 0, parenright, masculine,singlelowquotemark] };
+ key <AE11> { [ minus, underscore, endash, emdash ] };
+ key <AE12> { [ equal, plus, notequal, plusminus ] };
+
+ key <AD01> { [ q, Q, oe, OE ] };
+ key <AD02> { [ w, W, U2211,doublelowquotemark] };
+ key <AD03> { [ e, E, dead_acute, acute ] };
+ key <AD04> { [ r, R, registered, U2030 ] };
+ key <AD05> { [ t, T, dagger, dead_caron ] };
+ key <AD06> { [ y, Y, yen, onequarter ] };
+ key <AD07> { [ u, U, dead_diaeresis, diaeresis ] };
+ key <AD08> { [ i, I, dead_circumflex, U02C6 ] };
+ key <AD09> { [ o, O, oslash, Ooblique ] };
+ key <AD10> { [ p, P, Greek_pi, U220F ] };
+ key <AD11> { [ bracketleft, braceleft, leftdoublequotemark, rightdoublequotemark ] };
+ key <AD12> { [bracketright, braceright, leftsinglequotemark, rightsinglequotemark ] };
+ key <BKSL> { [ backslash, bar, guillemotleft, guillemotright ] };
+
+ key <AC01> { [ a, A, aring, Aring ] };
+ key <AC02> { [ s, S, ssharp, dead_stroke ] };
+ key <AC03> { [ d, D, partialderivative, eth ] };
+ key <AC04> { [ f, F, function, dead_hook ] };
+ key <AC05> { [ g, G, copyright, dead_doubleacute ] };
+ key <AC06> { [ h, H, dead_abovedot, dead_belowdot ] };
+ key <AC07> { [ j, J, U2206, onehalf ] };
+ key <AC08> { [ k, K,dead_abovering, UF8FF ] };
+
+ key <AC09> { [ l, L, notsign, THORN ] };
+ key <AC10> { [ semicolon, colon, U2026, thorn ] };
+ key <AC11> { [apostrophe, quotedbl, ae, AE ] };
+
+ key <AB01> { [ z, Z, Greek_OMEGA, dead_cedilla ] };
+ key <AB02> { [ x, X, U2248, dead_ogonek ] };
+ // unclear whether "approxeq" is 2248 or 2245
+ key <AB03> { [ c, C, ccedilla, Ccedilla ] };
+ key <AB04> { [ v, V, squareroot, U25CA ] };
+ key <AB05> { [ b, B, integral, idotless ] };
+ key <AB06> { [ n, N, dead_tilde, U02DC ] };
+ key <AB07> { [ m, M, mu, threequarters ] };
+ key <AB08> { [ comma, less, lessthanequal, dead_macron ] };
+ key <AB09> { [ period, greater, greaterthanequal, dead_breve ] };
+ key <AB10> { [ slash, question, division, questiondown ] };
+
+ include "level3(ralt_switch)"
+};
+
+// Colemak symbols for xkb on X.Org Server 7.x
+// 2006-01-01 Shai Coleman, http://colemak.com/ . Public domain.
+
+partial alphanumeric_keys
+xkb_symbols "colemak" {
+ include "us"
+ name[Group1]= "USA - Colemak";
+
+ // Alphanumeric section
+ key <TLDE> { [ grave, asciitilde, dead_tilde, asciitilde ] };
+ key <AE01> { [ 1, exclam, exclamdown, onesuperior ] };
+ key <AE02> { [ 2, at, masculine, twosuperior ] };
+ key <AE03> { [ 3, numbersign, ordfeminine, threesuperior ] };
+ key <AE04> { [ 4, dollar, cent, sterling ] };
+ key <AE05> { [ 5, percent, EuroSign, yen ] };
+ key <AE06> { [ 6, asciicircum, hstroke, Hstroke ] };
+ key <AE07> { [ 7, ampersand, eth, ETH ] };
+ key <AE08> { [ 8, asterisk, thorn, THORN ] };
+ key <AE09> { [ 9, parenleft, leftsinglequotemark, leftdoublequotemark ] };
+ key <AE10> { [ 0, parenright, rightsinglequotemark, rightdoublequotemark ] };
+ key <AE11> { [ minus, underscore, endash, emdash ] };
+ key <AE12> { [ equal, plus, multiply, division ] };
+
+ key <AD01> { [ q, Q, adiaeresis, Adiaeresis ] };
+ key <AD02> { [ w, W, aring, Aring ] };
+ key <AD03> { [ f, F, atilde, Atilde ] };
+ key <AD04> { [ p, P, oslash, Ooblique ] };
+ key <AD05> { [ g, G, dead_ogonek, asciitilde ] };
+ key <AD06> { [ j, J, dstroke, Dstroke ] };
+ key <AD07> { [ l, L, lstroke, Lstroke ] };
+ key <AD08> { [ u, U, uacute, Uacute ] };
+ key <AD09> { [ y, Y, udiaeresis, Udiaeresis ] };
+ key <AD10> { [ semicolon, colon, odiaeresis, Odiaeresis ] };
+ key <AD11> { [ bracketleft, braceleft, guillemotleft, 0x1002039 ] };
+ key <AD12> { [ bracketright, braceright, guillemotright, 0x100203a ] };
+ key <BKSL> { [ backslash, bar, asciitilde, asciitilde ] };
+
+ key <AC01> { [ a, A, aacute, Aacute ] };
+ key <AC02> { [ r, R, dead_grave, asciitilde ] };
+ key <AC03> { [ s, S, ssharp, asciitilde ] };
+ key <AC04> { [ t, T, dead_acute, dead_doubleacute ] };
+ key <AC05> { [ d, D, dead_diaeresis, asciitilde ] };
+ key <AC06> { [ h, H, dead_caron, asciitilde ] };
+ key <AC07> { [ n, N, ntilde, Ntilde ] };
+ key <AC08> { [ e, E, eacute, Eacute ] };
+ key <AC09> { [ i, I, iacute, Iacute ] };
+ key <AC10> { [ o, O, oacute, Oacute ] };
+ key <AC11> { [ apostrophe, quotedbl, otilde, Otilde ] };
+
+ key <AB01> { [ z, Z, ae, AE ] };
+ key <AB02> { [ x, X, dead_circumflex, asciitilde ] };
+ key <AB03> { [ c, C, ccedilla, Ccedilla ] };
+ key <AB04> { [ v, V, oe, OE ] };
+ key <AB05> { [ b, B, dead_breve, asciitilde ] };
+ key <AB06> { [ k, K, dead_abovering, asciitilde ] };
+ key <AB07> { [ m, M, dead_macron, asciitilde ] };
+ key <AB08> { [ comma, less, dead_cedilla, asciitilde ] };
+ key <AB09> { [ period, greater, dead_abovedot, asciitilde ] };
+ key <AB10> { [ slash, question, questiondown, asciitilde ] };
+
+ key <CAPS> { [ BackSpace, BackSpace, BackSpace, BackSpace ] };
+ key <LSGT> { [ minus, underscore, endash, emdash ] };
+ key <SPCE> { [ space, space, space, nobreakspace ] };
+
+ include "level3(ralt_switch)"
+};
+
+// I do NOT like dead-keys - the International keyboard as defined by Microsoft
+// doesn't fit my needs. Why use two keystrokes for all simple characters (eg '
+// and <space> generates a single ') just to have an é (eacute) in two strokes
+// as well? I type ' more often than é (eacute).
+//
+// This file works just like a regular keyboard, BUT has all dead-keys
+// accessible at level3 (through AltGr). An ë (ediaeresis) is now: AltGr+"
+// followed by an e. In other words, this keyboard is not international as long
+// as you leave the right Alt key alone.
+//
+// The original MS International keyboard was intended for Latin1 (iso8859-1).
+// With the introduction of iso8859-15, the (important) ligature oe (and OE)
+// became available. I added them next to ae. Because I write ediaeresis more
+// often than registered, I moved registered to be next to copyright and added
+// ediaeresis and idiaeresis. - Adriaan
+
+partial alphanumeric_keys
+xkb_symbols "altgr-intl" {
+
+ name[Group1]= "USA - International (AltGr dead keys)";
+
+ include "us(intl)"
+
+// five dead keys moved into level3:
+
+ key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
+ key <AC11> { [apostrophe,quotedbl, dead_acute, dead_diaeresis ] };
+
+// diversions from the MS Intl keyboard:
+
+ key <AE01> { [ 1, exclam, onesuperior, exclamdown ] };
+ key <AD04> { [ r, R, ediaeresis, Ediaeresis ] };
+ key <AC07> { [ j, J, idiaeresis, Idiaeresis ] };
+ key <AB02> { [ x, X, oe, OE ] };
+ key <AB04> { [ v, V, registered, registered ] };
+
+// onequarter etc (not in iso8859-15) moved to get three unshifted deadkeys:
+
+ key <AE06> { [ 6, asciicircum, dead_circumflex, onequarter ] };
+ key <AE07> { [ 7, ampersand, dead_horn, onehalf ] };
+ key <AE08> { [ 8, asterisk, dead_ogonek, threequarters ] };
+
+ include "level3(ralt_switch)"
+};
+
+// Intel ClassmatePC Keyboard Layout
+// by Piter PUNK <piterpk@terra.com.br>
+//
+// The keyboard layouts below maps the us(basic), us(intl) and us(alt-intl)
+// to ClassmatePC keyboard. All layouts uses RCTL as level3(switch) since
+// the keyboard doesn't have AltGr key. The EuroSign is engraved at 5 key.
+
+// classmate - us(basic)
+partial alphanumeric_keys
+xkb_symbols "classmate" {
+ include "us(basic)"
+ name[Group1]= "USA - ClassmatePC";
+
+ key <LSGT> { [ backslash, bar, backslash, bar ] };
+
+ include "eurosign(5)"
+ include "level3(switch)"
+};
+
+// classmate-intl - us(intl)
+// RCTL is generated by Fn+Alt, because that, when trying to access
+// the level3 symbols at 7,8,9,0,u,i,o,p,j,k,l,;,m,. and / we got
+// the keypad keycodes. The keypad is changed to make Fn+Alt+<KP_key>
+// generate the same symbol as the original key.
+partial alphanumeric_keys
+xkb_symbols "classmate-intl" {
+ include "us(intl)"
+ name[Group1]= "USA - ClassmatePC (International)";
+ key.type[Group1]="FOUR_LEVEL";
+
+ key <LSGT> { [ backslash, bar, backslash, bar ] };
+
+ key <KP7> { [ KP_Home, KP_7,
+ onehalf, dead_horn ] };
+ key <KP8> { [ KP_Up, KP_8,
+ threequarters, dead_ogonek ] };
+ key <KP9> { [ KP_Prior, KP_9,
+ leftsinglequotemark, dead_breve ] };
+ key <KPMU> { [ KP_Multiply, KP_Multiply,
+ rightsinglequotemark, dead_abovering ] };
+
+ key <KP4> { [ KP_Left, KP_4,
+ uacute, Uacute ] };
+ key <KP5> { [ KP_Begin, KP_5,
+ iacute, Iacute ] };
+ key <KP6> { [ KP_Right, KP_6,
+ oacute, Oacute ] };
+ key <KPSU> { [ KP_Subtract, KP_Subtract,
+ odiaeresis, Odiaeresis ] };
+
+ key <KP2> { [ KP_Down, KP_2,
+ oe, OE ] };
+ key <KP3> { [ KP_Next, KP_3,
+ oslash, Ooblique ] };
+ key <KPAD> { [ KP_Add, KP_Add,
+ paragraph, degree ] };
+
+ key <KP0> { [ KP_Insert, KP_0,
+ mu, mu ] };
+ key <KPDL> { [ KP_Delete, KP_Decimal,
+ dead_abovedot, dead_caron ] };
+ key <KPDV> { [ KP_Divide, KP_Divide,
+ questiondown, dead_hook ] };
+
+ include "level3(switch)"
+};
+
+// classmate-alt-intl - us(alt-intl)
+// RCTL is generated by Fn+Alt, because that, when trying to access
+// the level3 symbols at 7,8,9,0,u,i,o,p,j,k,l,;,m,. and / we got
+// the keypad keycodes. The keypad is changed to make Fn+Alt+<KP_key>
+// generate the same symbol as the original key.
+partial alphanumeric_keys
+xkb_symbols "classmate-alt-intl" {
+ include "us(alt-intl)"
+ name[Group1]= "USA - ClassmatePC (Alternative international)";
+ key.type[Group1]="FOUR_LEVEL";
+
+ key <LSGT> { [ backslash, bar, backslash, bar ] };
+
+ key <KPSU> { [ KP_Subtract, KP_Subtract ] };
+
+ key <KP9> { [ KP_Prior, KP_9,
+ leftsinglequotemark, dead_breve ] };
+ key <KPMU> { [ KP_Multiply, KP_Multiply,
+ rightsinglequotemark, dead_abovering ] };
+
+ key <KPAD> { [ KP_Add, KP_Add,
+ dead_ogonek, dead_diaeresis ] };
+
+ key <KPDL> { [ KP_Delete, KP_Decimal,
+ dead_abovedot, dead_circumflex ] };
+ key <KPDV> { [ KP_Divide, KP_Divide,
+ dead_hook, dead_hook ] };
+
+ include "level3(switch)"
+};
+
+// classmate-altgr-intl - us(altgr-intl)
+// RCTL is generated by Fn+Alt, because that, when trying to access
+// the level3 symbols at 7,8,9,0,u,i,o,p,j,k,l,;,m,. and / we got
+// the keypad keycodes. The keypad is changed to make Fn+Alt+<KP_key>
+// generate the same symbol as the original key.
+partial alphanumeric_keys
+xkb_symbols "classmate-altgr-intl" {
+ include "us(altgr-intl)"
+ name[Group1]= "USA - ClassmatePC (International Fn+Alt dead-keys)";
+ key.type[Group1]="FOUR_LEVEL";
+
+ key <LSGT> { [ backslash, bar, backslash, bar ] };
+
+ key <KP7> { [ KP_Home, KP_7,
+ dead_horn, dead_horn ] };
+ key <KP8> { [ KP_Up, KP_8,
+ dead_ogonek, dead_ogonek ] };
+ key <KP9> { [ KP_Prior, KP_9,
+ leftsinglequotemark, dead_breve ] };
+ key <KPMU> { [ KP_Multiply, KP_Multiply,
+ rightsinglequotemark, dead_abovering ] };
+
+ key <KP4> { [ KP_Left, KP_4,
+ uacute, Uacute ] };
+ key <KP5> { [ KP_Begin, KP_5,
+ iacute, Iacute ] };
+ key <KP6> { [ KP_Right, KP_6,
+ oacute, Oacute ] };
+ key <KPSU> { [ KP_Subtract, KP_Subtract,
+ odiaeresis, Odiaeresis ] };
+
+ key <KP1> { [ KP_End, KP_1,
+ idiaeresis, Idiaeresis ] };
+ key <KP2> { [ KP_Down, KP_2,
+ oe, OE ] };
+ key <KP3> { [ KP_Next, KP_3,
+ oslash, Ooblique ] };
+ key <KPAD> { [ KP_Add, KP_Add,
+ paragraph, degree ] };
+
+ key <KP0> { [ KP_Insert, KP_0,
+ mu, mu ] };
+ key <KPDL> { [ KP_Delete, KP_Decimal,
+ dead_abovedot, dead_caron ] };
+ key <KPDV> { [ KP_Divide, KP_Divide,
+ questiondown, dead_hook ] };
+
+ include "level3(switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "olpc" {
+
+ include "us(basic)"
+ name[Group1]= "USA";
+
+ // OLPC international US English keyboard layout.
+ // It's a little different from the usual international layout.
+ // See: http://wiki.laptop.org/go/Image:Keyboard_english.png
+
+ key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
+ key <AE01> { [ 1, exclam, exclamdown, exclamdown ] };
+ key <AE02> { [ 2, at, notsign, notsign ] };
+ key <AE03> { [ 3, numbersign, 0x1000300, 0x1000300 ] }; // combining grave
+ key <AE04> { [ 4, dollar, 0x1000301, 0x1000301 ] }; // combining acute
+ key <AE05> { [ 5, percent, 0x1000306, 0x1000306 ] }; // combining breve above
+ key <AE06> { [ 6,asciicircum, 0x100030A, 0x100030A ] }; // combining ring above
+ key <AE07> { [ 7, ampersand, 0x1000302, 0x1000302 ] }; // combining circumflex above
+ key <AE08> { [ 8, asterisk, 0x100030C, 0x100030C ] }; // combining caron above
+ key <AE09> { [ 9, parenleft, 0x1000307, 0x1000307 ] }; // combining dot above
+ key <AE10> { [ 0, parenright, 0x1000308, 0x1000308 ] }; // combining diaeresis above
+ key <AE11> { [ minus, underscore, 0x1000304, 0x1000304 ] }; // combining macron above
+ key <AE12> { [ equal, plus, 0x1000303, 0x1000303 ] }; // combining tilde above
+
+ key <AD01> { [ q, Q, Greek_omega, Greek_OMEGA ] };
+ key <AD02> { [ w, W, oslash, Oslash ] };
+ key <AD03> { [ e, E, oe, OE ] };
+ key <AD04> { [ r, R, 0x1000327, 0x1000327 ] }; // combining cedilla
+ key <AD05> { [ t, T, 0x100032E, 0x100032E ] }; // combining breve below
+ key <AD06> { [ y, Y, 0x1000325, 0x1000325 ] }; // combining ring below
+ key <AD07> { [ u, U, 0x100032D, 0x100032D ] }; // combining circumflex below
+ key <AD08> { [ i, I, 0x100032C, 0x100032C ] }; // combining caron below
+ key <AD09> { [ o, O, 0x1000323, 0x1000323 ] }; // combining dot below
+ key <AD10> { [ p, P, 0x1000324, 0x1000324 ] }; // combining diaeresis below
+ key <AD11> { [ bracketleft, braceleft, 0x1000331, 0x1000331 ] }; // combining macron below
+ key <AD12> { [bracketright, braceright, 0x1000330, 0x1000330 ] }; // combining tilde below
+
+ key <AC01> { [ a, A, ae, AE ] };
+ key <AC02> { [ s, S, ssharp, 0x1001E9C ] }; // uppercase S sharp
+ key <AC03> { [ d, D, eth, ETH ] };
+ key <AC04> { [ f, F, thorn, THORN ] };
+ key <AC06> { [ h, H, sterling, sterling ] };
+ key <AC07> { [ j, J, EuroSign, EuroSign ] };
+ key <AC10> { [ semicolon, colon, masculine, ordfeminine ] };
+ key <AC11> { [ apostrophe, quotedbl, currency, currency ] };
+ key <BKSL> { [ backslash, bar, section, section ] };
+
+ key <AB03> { [ c, C, ccedilla, Ccedilla ] };
+ key <AB06> { [ n, N, ntilde, Ntilde ] };
+ key <AB07> { [ m, M, mu, mu ] };
+ key <AB08> { [ comma, less, guillemotleft, guillemotleft ] };
+ key <AB09> { [ period, greater, guillemotright, guillemotright ] };
+ key <AB10> { [ slash, question, questiondown, questiondown ] };
+
+ key <I219> { [ multiply, division, ISO_Next_Group, ISO_Prev_Group ] };
+
+ include "level3(ralt_switch)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "olpc2" {
+ include "us(olpc)"
+ name[Group1]= "USA - Layout toggle on multiply/divide key";
+ include "group(olpc)"
+};
+
+// Based on Cherokee Nation Official Layout
+// http://www.cherokee.org/extras/downloads/font/Keyboard.htm
+
+partial alphanumeric_keys modifier_keys
+xkb_symbols "chr" {
+
+ name[Group1]= "USA - Cherokee";
+ key.type[group1]="ALPHABETIC";
+
+ // Alphanumeric section
+ key <TLDE> { [ grave, U13CA ] };
+ key <AE01> { [ 1, U13B1 ] };
+ key <AE02> { [ 2, U13C7 ] };
+ key <AE03> { [ 3, U13E7 ] };
+ key <AE04> { [ U13D9, U13B0 ] };
+ key <AE05> { [ U13E6, U13B9 ] };
+ key <AE06> { [ U13DC, U13DD ] };
+ key <AE07> { [ U13CB, U13E1 ] };
+ key <AE08> { [ U13D6, U13BA ] };
+ key <AE09> { [ U13D2, parenleft ] };
+ key <AE10> { [ U13C4, parenright ] };
+ key <AE11> { [ U13BF, U13BC ] };
+ key <AE12> { [ U13F3, U13BD ] };
+
+ key <AD01> { [ U13AA, U13C6 ] };
+ key <AD02> { [ U13B3, U13EB ] };
+ key <AD03> { [ U13A1, U13E3 ] };
+ key <AD04> { [ U13DB, U13CF ] };
+ key <AD05> { [ U13D4, U13D8 ] };
+ key <AD06> { [ U13EF, U13F2 ] };
+ key <AD07> { [ U13A4, U13AD ] };
+ key <AD08> { [ U13A2, U13F1 ] };
+ key <AD09> { [ U13A3, U13EC ] };
+ key <AD10> { [ U13C1, U13EA ] };
+ key <AD11> { [ U13D5, U13D1 ] };
+ key <AD12> { [ U13B6, U13E4 ] };
+ key <BKSL> { [ U13E9, U13EE ] };
+
+ key <AC01> { [ U13A0, U13CC ] };
+ key <AC02> { [ U13CD, U13CE ] };
+ key <AC03> { [ U13D7, U13D0 ] };
+ key <AC04> { [ U13A9, U13C8 ] };
+ key <AC05> { [ U13A6, U13E5 ] };
+ key <AC06> { [ U13AF, U13B2 ] };
+ key <AC07> { [ U13DA, U13AB ] };
+ key <AC08> { [ U13B8, U13A7 ] };
+ key <AC09> { [ U13B5, U13AE ] };
+ key <AC10> { [ U13E8, U13E0 ] };
+ key <AC11> { [ apostrophe, quotedbl ] };
+
+ key <AB01> { [ U13AC, U13C3 ] };
+ key <AB02> { [ U13F4, U13ED ] };
+ key <AB03> { [ U13D3, U13DF ] };
+ key <AB04> { [ U13A5, U13DE ] };
+ key <AB05> { [ U13A8, U13F0 ] };
+ key <AB06> { [ U13BE, U13BB ] };
+ key <AB07> { [ U13C5, U13B7 ] };
+ key <AB08> { [ comma, U13E2 ] };
+ key <AB09> { [ period, U13B4 ] };
+ key <AB10> { [ U13C2, U13C9 ] };
+
+ // End alphanumeric section
+};
+
+// Serbian charecters added as third level symbols to US keyboard layout.
+
+partial alphanumeric_keys
+xkb_symbols "hbs" {
+
+ name[Group1]= "USA - Serbo-Croatian";
+
+ include "us"
+
+ key <TLDE> { [ grave, asciitilde ] };
+ key <AE06> { [ 6, dead_caron, asciicircum, asciicircum ] };
+ key <AC09> { [ l, L, U1C9, U1C8 ] };
+ key <AB06> { [ n, N, U1CC, U1CB ] };
+ key <AB01> { [ z, Z, U1C6, U1C5 ] };
+ key <AD03> { [ e, E, EuroSign, cent ] };
+ key <AC03> { [ d, D, dstroke, Dstroke ] };
+ key <AC11> { [ dead_acute, quotedbl, apostrophe, apostrophe ] };
+ key <SPCE> { [ space, space, nobreakspace, nobreakspace ] };
+ key <AB08> { [ comma, less, NoSymbol, guillemotright ] };
+ key <AB09> { [ period, greater, NoSymbol, guillemotleft ] };
+
+ include "level3(ralt_switch)"
+};
+
+//based on http://upload.wikimedia.org/wikipedia/commons/1/18/T-Mobile_G1_launch_event_2.jpg
+partial alphanumeric_keys
+xkb_symbols "htcdream" {
+ include "inet(htcdream)"
+ name[Group1]= "USA - htcdream";
+
+ //second row
+ key <AD01> { [ q, Q, Tab, Tab ] };
+ key <AD02> { [ w, W, grave, grave ] };
+ key <AD03> { [ e, E, underscore, underscore ] };
+ key <AD04> { [ r, R, sterling, sterling ] };
+ key <AD05> { [ t, T, EuroSign, EuroSign ] };
+ key <AD06> { [ y, Y, division, division ] };
+ key <AD07> { [ u, U, multiply, multiply ] };
+ key <AD08> { [ i, I, minus, minus ] };
+ key <AD09> { [ o, O, plus, plus ] };
+ key <AD10> { [ p, P, equal, equal ] };
+
+ //third row
+ key <AC01> { [ a, A, NoSymbol, NoSymbol ] };
+ key <AC02> { [ s, S, bar, bar ] };
+ key <AC03> { [ d ,D, backslash, backslash ] };
+ key <AC04> { [ f, F, braceleft, braceleft ] };
+ key <AC05> { [ g, G, braceright, braceright ] };
+ key <AC06> { [ h, H, colon, colon ] };
+ key <AC07> { [ j, J, semicolon, semicolon ] };
+ key <AC08> { [ k, K, quotedbl, quotedbl ] };
+ key <AC09> { [ l, L, apostrophe, apostrophe ] };
+
+ //forth row
+ key <AB01> { [ z, Z, NoSymbol, NoSymbol ] };
+ key <AB02> { [ x, X, NoSymbol, NoSymbol ] };
+ key <AB03> { [ c, C, NoSymbol, NoSymbol ] };
+ key <AB04> { [ v, V, bracketleft, bracketleft ] };
+ key <AB05> { [ b, B, bracketright, bracketright ] };
+ key <AB06> { [ n, N, less, less ] };
+ key <AB07> { [ m, M, greater, greater ] };
+ key <AB08> { [ comma, comma, question, question ] };
+
+ //fifth row
+ key <FK15> { [ at, at, asciitilde, asciitilde ] };
+
+ include "level3(alt_switch)"
+};
+
+// EXTRAS:
+
+// XCompose is out! Unicode combining is in! For those of us who live
+// on the edge: A keymap using Unicode combining characters instead of
+// deadkeys. This variation does not deviate from the lame MS-style
+// US-intl layout; but it uses AltGr for combining, like altgr-intl.
+//
+// This might break your font layout layout systems (because they
+// suck), caveat emptor. Also, most of today's software will count
+// individual combining marks for selection, deletion, character
+// counting &c., and won't be smart enough to do canonical equivalence
+// when searching, &c.
+//
+// With Unicode combining you use "handwriting order", not
+// "typewriting order" as with deadkeys. That is, you first type the
+// base character, then the diacritics/accents/modifiers. This has
+// the advantage of avoiding hidden states --- each keypress changes
+// something on screen.
+//
+// TODO: as of now, this duplicates all us(intl) functionality with
+// combining. With care, perhaps we could add more combining marks
+// not present in intl, and support all major languages.
+partial alphanumeric_keys
+xkb_symbols "intl-unicode" {
+
+ name[Group1]= "USA - International (AltGr Unicode combining)";
+
+ include "us(intl)"
+ include "level3(ralt_switch)"
+
+ // grave, tilde
+ key <TLDE> { [grave, asciitilde, U0300, U0303 ] };
+ // double acute
+ key <AE02> { [ 2, at, twosuperior, U030B ] };
+ // macron
+ key <AE03> { [ 3, numbersign, threesuperior, U0304 ] };
+ // circumflex
+ key <AE06> { [ 6, asciicircum, onequarter, U0302 ] };
+ // horn
+ key <AE07> { [ 7, ampersand, onehalf, U031B ] };
+ // ogonek
+ key <AE08> { [ 8, asterisk, threequarters, U0328 ] };
+ // breve
+ key <AE09> { [ 9, parenleft, leftsinglequotemark, U0306 ] };
+ // abovering
+ key <AE10> { [ 0, parenright, rightsinglequotemark, U030A ] };
+
+ // belowdot
+ key <AE11> { [ minus, underscore, yen, U0323 ] };
+ // acute, diaeresis
+ key <AC11> { [apostrophe, quotedbl, U0301, U0308 ] };
+ // abovedot, caron
+ key <AB09> { [ period, greater, U0307, U030C ] };
+ // hook
+ key <AB10> { [ slash, question, questiondown, 0309 ] };
+
+ // alt-intl compatibility
+ // cedilla, caron
+ key <AB08> { [ comma, less, U0327, U030C ] };
+ // ogonek, diaeresis
+ key <AC10> { [ semicolon, colon, U0328, U0308 ] };
+ // doubleacute, horn
+ key <AE12> { [ equal, plus, U030B, U031B ] };
+
+ // we don't do combining latin letters and combining enclosures
+ // because support for those is very rare.
+};
+
+// XCompose is out! Unicode combining is in! For those of us who live
+// on the edge: A keymap using Unicode combining characters instead of
+// deadkeys. This variation does break compatibility with us-intl,
+// whenever I thought it would be more mnemonic or Unicodeish.
+partial alphanumeric_keys
+xkb_symbols "alt-intl-unicode" {
+
+ name[Group1]= "USA - International (AltGr Unicode combining, alternative)";
+
+ include "extras/us(intl-unicode)"
+ include "level3(ralt_switch)"
+
+ // easier macron; em-dash.
+ // em-dash is available via compose, but I added here since it's such
+ // an important typographic character.
+ key <AE11> { [ minus, underscore, U0304, U2014 ] };
+
+ // belowdot, abovedot (caron at coma/less key, per above)
+ key <AB09> { [ period, greater, U0323, U0307 ] };
+
+};
+
+partial alphanumeric_keys
+xkb_symbols "ats" {
+
+ include "us"
+
+ name[Group1]= "USA - Atsina";
+
+ //Using Dead key to get COMBINING COMMA ABOVE for ejectives on
+ //q, l, t, s, m, g, k, p, w, y, r
+ //XCompose key is used for the other accute and grave.
+
+ key <AD03> { [ e, E, eacute, Eacute ] };
+ key <AD07> { [ u, U, uacute, Uacute ] };
+ key <AD08> { [ i, I, iacute, Iacute ] };
+ key <AD09> { [ o, O, oacute, Oacute ] };
+ key <AD11> { [ bracketleft, braceleft, U03B8 ] };
+ key <AD12> { [ bracketright, braceright, U010D, U010C ] };
+ //U+010C (uppercase Č) and U+010D (lowercase č).
+
+ key <AC01> { [ a, A, aacute, Aacute ] };
+
+
+ //Small letter Open use compose to key get acute accent
+ key <AB03> { [ c, C, U0254, U0186 ] };
+ key <AB08> { [ comma, less, U0313 ] };
+ key <AB10> { [ slash, question, U0294 ] };
+
+ include "level3(ralt_switch)"
+ include "compose(rctrl)"
+};
+
+partial alphanumeric_keys
+xkb_symbols "crd" {
+
+ include "us"
+
+ name[Group1]= "USA - Couer D'alene Salish";
+
+ // Alphanumeric section
+ key <AD02> { [ w, W, U02B7, U02B7 ] };
+ key <AE07> { [ 7, ampersand, U0294 ] };
+ key <AD01> { [ q, Q, U221A ] };
+ key <AB04> { [ v, V, U0259 ] };
+ key <BKSL> { [ backslash, bar, U026B ] };
+ key <AD03> { [ e, E, U025B ] };
+ key <AD08> { [ i, I, U026A ] };
+ key <AC07> { [ j, J, U01F0 ] };
+ key <AE06> { [ 6, asciicircum, U0295 ] };
+ key <AC02> { [ s, S, U0161 ] };
+ key <AB03> { [ c, C, U010D ] };
+ key <AD09> { [ o, O, U0254 ] };
+ key <AB09> { [ period, greater, U0323 ] };
+
+ include "level3(ralt_switch)"
+ include "compose(rctrl)"
+
+ // End alphanumeric section
+};
diff --git a/xorg-server/xkeyboard-config/symbols/xfree68_vndr/makefile b/xorg-server/xkeyboard-config/symbols/xfree68_vndr/makefile
new file mode 100644
index 000000000..c9c1b3ede
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/xfree68_vndr/makefile
@@ -0,0 +1,12 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\xfree68_vndr
+
+dist_symbols_DATA = \
+amiga ataritt
+
+DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
+
+include ..\..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/types/default b/xorg-server/xkeyboard-config/types/default.in
index 45e1ad18c..140208ccc 100644
--- a/xorg-server/xkeyboard-config/types/default
+++ b/xorg-server/xkeyboard-config/types/default.in
@@ -1,9 +1,9 @@
-default xkb_types "default" {
- include "basic"
- include "pc"
- include "iso9995"
- include "extra"
- include "numpad"
- include "level5"
- include "mousekeys"
-};
+default xkb_types "default" {
+ include "basic"
+ include "pc"
+ include "iso9995"
+ include "extra"
+ include "numpad"
+ include "level5"
+ include "mousekeys"
+};
diff --git a/xorg-server/xkeyboard-config/types/makefile b/xorg-server/xkeyboard-config/types/makefile
new file mode 100644
index 000000000..ef03746ed
--- /dev/null
+++ b/xorg-server/xkeyboard-config/types/makefile
@@ -0,0 +1,17 @@
+ifeq ($(MAKESERVER),1)
+$(error Please do not specify MAKESERVER=1)
+endif
+
+THISDIR=types
+
+DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\$(THISDIR)
+
+dist_xkbdata_types_DATA = \
+basic cancel caps \
+complete default extra \
+iso9995 level5 mousekeys nokia numpad \
+pc README
+
+DATA_FILES=$(dist_xkbdata_types_DATA:%=$(DESTDIR)\%)
+
+include ..\xkbrules.mak
diff --git a/xorg-server/xkeyboard-config/xkbrules.mak b/xorg-server/xkeyboard-config/xkbrules.mak
new file mode 100644
index 000000000..7e8f11fbc
--- /dev/null
+++ b/xorg-server/xkeyboard-config/xkbrules.mak
@@ -0,0 +1,20 @@
+DIRFILE=$(THISDIR:%=$(DESTDIR)\..\%.dir)
+
+.PHONY: destdir
+destdir: $(DESTDIR)
+
+all: destdir $(DATA_FILES) $(DIRFILE)
+
+$(DESTDIR)\default: default.in
+ copy $< $@
+
+$(DESTDIR)\%: %
+ copy $< $@
+
+ifneq ($(DIRFILE),)
+.PHONY: extrastuff
+
+$(DIRFILE): extrastuff $(DATA_FILES)
+ -del -e $@
+ cd $(DESTDIR) & ..\..\xkbcomp.exe -lfhlpR -o $(relpath $@) *
+endif
diff --git a/xorg-server/xkeyboard-config/xslt/reg2ll.xsl b/xorg-server/xkeyboard-config/xslt/reg2ll.xsl
index 598eb0fca..b8c335591 100644
--- a/xorg-server/xkeyboard-config/xslt/reg2ll.xsl
+++ b/xorg-server/xkeyboard-config/xslt/reg2ll.xsl
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- >
-<xsl:output method="text"
- encoding="UTF-8"
- doctype-system="xkb.dtd"
- indent="no"/>
-
-<xsl:template match="modelList|optionList|name|description|shortDescription|configItem"/>
-<xsl:strip-space elements="*"/>
-
-<xsl:template match="layoutList"><xsl:apply-templates select="./layout"/></xsl:template>
-
-<xsl:template match="variantList"><xsl:apply-templates select="./variant"/></xsl:template>
-
-<xsl:template match="layout"><xsl:text>
-</xsl:text><xsl:value-of select="./configItem/name"/>:"<xsl:value-of select="./configItem/description"/>"<xsl:apply-templates match="./variantList/variant"/></xsl:template>
-
-<xsl:template match="variant"><xsl:text>
-</xsl:text><xsl:value-of select="../../configItem/name"/>(<xsl:value-of select="./configItem/name"/>):"<xsl:value-of select="./configItem/description"/>"</xsl:template>
-
-</xsl:stylesheet>
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ >
+<xsl:output method="text"
+ encoding="UTF-8"
+ doctype-system="xkb.dtd"
+ indent="no"/>
+
+<xsl:template match="modelList|optionList|name|description|shortDescription|configItem"/>
+<xsl:strip-space elements="*"/>
+
+<xsl:template match="layoutList"><xsl:apply-templates select="./layout"/></xsl:template>
+
+<xsl:template match="variantList"><xsl:apply-templates select="./variant"/></xsl:template>
+
+<xsl:template match="layout"><xsl:text>
+</xsl:text><xsl:value-of select="./configItem/name"/>:"<xsl:value-of select="./configItem/description"/>"<xsl:apply-templates match="./variantList/variant"/></xsl:template>
+
+<xsl:template match="variant"><xsl:text>
+</xsl:text><xsl:value-of select="../../configItem/name"/>(<xsl:value-of select="./configItem/name"/>):"<xsl:value-of select="./configItem/description"/>"</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xorg-server/xkeysymdb b/xorg-server/xkeysymdb
new file mode 100644
index 000000000..45d892971
--- /dev/null
+++ b/xorg-server/xkeysymdb
@@ -0,0 +1,380 @@
+! Copyright 1993 Massachusetts Institute of Technology
+!
+! 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, and that the name of M.I.T. not be used in advertising or
+! publicity pertaining to distribution of the software without specific,
+! written prior permission. M.I.T. makes no representations about the
+! suitability of this software for any purpose. It is provided "as is"
+! without express or implied warranty.
+!
+
+hpmute_acute :100000A8
+hpmute_grave :100000A9
+hpmute_asciicircum :100000AA
+hpmute_diaeresis :100000AB
+hpmute_asciitilde :100000AC
+hplira :100000AF
+hpguilder :100000BE
+hpYdiaeresis :100000EE
+hpIO :100000EE
+hplongminus :100000F6
+hpblock :100000FC
+apLineDel :1000FF00
+apCharDel :1000FF01
+apCopy :1000FF02
+apCut :1000FF03
+apPaste :1000FF04
+apMove :1000FF05
+apGrow :1000FF06
+apCmd :1000FF07
+apShell :1000FF08
+apLeftBar :1000FF09
+apRightBar :1000FF0A
+apLeftBox :1000FF0B
+apRightBox :1000FF0C
+apUpBox :1000FF0D
+apDownBox :1000FF0E
+apPop :1000FF0F
+apRead :1000FF10
+apEdit :1000FF11
+apSave :1000FF12
+apExit :1000FF13
+apRepeat :1000FF14
+hpModelock1 :1000FF48
+hpModelock2 :1000FF49
+hpReset :1000FF6C
+hpSystem :1000FF6D
+hpUser :1000FF6E
+hpClearLine :1000FF6F
+hpInsertLine :1000FF70
+hpDeleteLine :1000FF71
+hpInsertChar :1000FF72
+hpDeleteChar :1000FF73
+hpBackTab :1000FF74
+hpKP_BackTab :1000FF75
+apKP_parenleft :1000FFA8
+apKP_parenright :1000FFA9
+
+I2ND_FUNC_L :10004001
+I2ND_FUNC_R :10004002
+IREMOVE :10004003
+IREPEAT :10004004
+IA1 :10004101
+IA2 :10004102
+IA3 :10004103
+IA4 :10004104
+IA5 :10004105
+IA6 :10004106
+IA7 :10004107
+IA8 :10004108
+IA9 :10004109
+IA10 :1000410A
+IA11 :1000410B
+IA12 :1000410C
+IA13 :1000410D
+IA14 :1000410E
+IA15 :1000410F
+IB1 :10004201
+IB2 :10004202
+IB3 :10004203
+IB4 :10004204
+IB5 :10004205
+IB6 :10004206
+IB7 :10004207
+IB8 :10004208
+IB9 :10004209
+IB10 :1000420A
+IB11 :1000420B
+IB12 :1000420C
+IB13 :1000420D
+IB14 :1000420E
+IB15 :1000420F
+IB16 :10004210
+
+DRemove :1000FF00
+Dring_accent :1000FEB0
+Dcircumflex_accent :1000FE5E
+Dcedilla_accent :1000FE2C
+Dacute_accent :1000FE27
+Dgrave_accent :1000FE60
+Dtilde :1000FE7E
+Ddiaeresis :1000FE22
+
+osfCopy :1004FF02
+osfCut :1004FF03
+osfPaste :1004FF04
+osfBackTab :1004FF07
+osfBackSpace :1004FF08
+osfClear :1004FF0B
+osfEscape :1004FF1B
+osfAddMode :1004FF31
+osfPrimaryPaste :1004FF32
+osfQuickPaste :1004FF33
+osfPageLeft :1004FF40
+osfPageUp :1004FF41
+osfPageDown :1004FF42
+osfPageRight :1004FF43
+osfActivate :1004FF44
+osfMenuBar :1004FF45
+osfLeft :1004FF51
+osfUp :1004FF52
+osfRight :1004FF53
+osfDown :1004FF54
+osfPrior :1004FF55
+osfNext :1004FF56
+osfEndLine :1004FF57
+osfBeginLine :1004FF58
+osfEndData :1004FF59
+osfBeginData :1004FF5A
+osfPrevMenu :1004FF5B
+osfNextMenu :1004FF5C
+osfPrevField :1004FF5D
+osfNextField :1004FF5E
+osfSelect :1004FF60
+osfInsert :1004FF63
+osfUndo :1004FF65
+osfMenu :1004FF67
+osfCancel :1004FF69
+osfHelp :1004FF6A
+osfSelectAll :1004FF71
+osfDeselectAll :1004FF72
+osfReselect :1004FF73
+osfExtend :1004FF74
+osfRestore :1004FF78
+osfSwitchDirection :1004FF7E
+osfPriorMinor :1004FFF5
+osfNextMinor :1004FFF6
+osfRightLine :1004FFF7
+osfLeftLine :1004FFF8
+osfDelete :1004FFFF
+
+SunFA_Grave :1005FF00
+SunFA_Circum :1005FF01
+SunFA_Tilde :1005FF02
+SunFA_Acute :1005FF03
+SunFA_Diaeresis :1005FF04
+SunFA_Cedilla :1005FF05
+SunF36 :1005FF10
+SunF37 :1005FF11
+SunSys_Req :1005FF60
+SunProps :1005FF70
+SunFront :1005FF71
+SunCopy :1005FF72
+SunOpen :1005FF73
+SunPaste :1005FF74
+SunCut :1005FF75
+SunPowerSwitch :1005FF76
+SunAudioLowerVolume :1005FF77
+SunAudioMute :1005FF78
+SunAudioRaiseVolume :1005FF79
+SunVideoDegauss :1005FF7A
+SunVideoLowerBrightness :1005FF7B
+SunVideoRaiseBrightness :1005FF7C
+SunPowerSwitchShift :1005FF7D
+
+SunCompose :FF20
+SunPageUp :FF55
+SunPageDown :FF56
+SunPrint_Screen :FF61
+SunUndo :FF65
+SunAgain :FF66
+SunFind :FF68
+SunStop :FF69
+SunAltGraph :FF7E
+
+WYSetup :1006FF00
+
+ncdSetup :1006FF00
+
+XeroxPointerButton1 :10070001
+XeroxPointerButton2 :10070002
+XeroxPointerButton3 :10070003
+XeroxPointerButton4 :10070004
+XeroxPointerButton5 :10070005
+
+! The definitions here should match <X11/XF86keysym.h>
+XF86ModeLock :1008FF01
+XF86MonBrightnessUp :1008FF02
+XF86MonBrightnessDown :1008FF03
+XF86KbdLightOnOff :1008FF04
+XF86KbdBrightnessUp :1008FF05
+XF86KbdBrightnessDown :1008FF06
+XF86Standby :1008FF10
+XF86AudioLowerVolume :1008FF11
+XF86AudioMute :1008FF12
+XF86AudioRaiseVolume :1008FF13
+XF86AudioPlay :1008FF14
+XF86AudioStop :1008FF15
+XF86AudioPrev :1008FF16
+XF86AudioNext :1008FF17
+XF86HomePage :1008FF18
+XF86Mail :1008FF19
+XF86Start :1008FF1A
+XF86Search :1008FF1B
+XF86AudioRecord :1008FF1C
+XF86Calculator :1008FF1D
+XF86Memo :1008FF1E
+XF86ToDoList :1008FF1F
+XF86Calendar :1008FF20
+XF86PowerDown :1008FF21
+XF86ContrastAdjust :1008FF22
+XF86RockerUp :1008FF23
+XF86RockerDown :1008FF24
+XF86RockerEnter :1008FF25
+XF86Back :1008FF26
+XF86Forward :1008FF27
+XF86Stop :1008FF28
+XF86Refresh :1008FF29
+XF86PowerOff :1008FF2A
+XF86WakeUp :1008FF2B
+XF86Eject :1008FF2C
+XF86ScreenSaver :1008FF2D
+XF86WWW :1008FF2E
+XF86Sleep :1008FF2F
+XF86Favorites :1008FF30
+XF86AudioPause :1008FF31
+XF86AudioMedia :1008FF32
+XF86MyComputer :1008FF33
+XF86VendorHome :1008FF34
+XF86LightBulb :1008FF35
+XF86Shop :1008FF36
+XF86History :1008FF37
+XF86OpenURL :1008FF38
+XF86AddFavorite :1008FF39
+XF86HotLinks :1008FF3A
+XF86BrightnessAdjust :1008FF3B
+XF86Finance :1008FF3C
+XF86Community :1008FF3D
+XF86AudioRewind :1008FF3E
+XF86BackForward :1008FF3F
+XF86Launch0 :1008FF40
+XF86Launch1 :1008FF41
+XF86Launch2 :1008FF42
+XF86Launch3 :1008FF43
+XF86Launch4 :1008FF44
+XF86Launch5 :1008FF45
+XF86Launch6 :1008FF46
+XF86Launch7 :1008FF47
+XF86Launch8 :1008FF48
+XF86Launch9 :1008FF49
+XF86LaunchA :1008FF4A
+XF86LaunchB :1008FF4B
+XF86LaunchC :1008FF4C
+XF86LaunchD :1008FF4D
+XF86LaunchE :1008FF4E
+XF86LaunchF :1008FF4F
+XF86ApplicationLeft :1008FF50
+XF86ApplicationRight :1008FF51
+XF86Book :1008FF52
+XF86CD :1008FF53
+XF86Calculater :1008FF54
+XF86Clear :1008FF55
+XF86Close :1008FF56
+XF86Copy :1008FF57
+XF86Cut :1008FF58
+XF86Display :1008FF59
+XF86DOS :1008FF5A
+XF86Documents :1008FF5B
+XF86Excel :1008FF5C
+XF86Explorer :1008FF5D
+XF86Game :1008FF5E
+XF86Go :1008FF5F
+XF86iTouch :1008FF60
+XF86LogOff :1008FF61
+XF86Market :1008FF62
+XF86Meeting :1008FF63
+XF86MenuKB :1008FF65
+XF86MenuPB :1008FF66
+XF86MySites :1008FF67
+XF86New :1008FF68
+XF86News :1008FF69
+XF86OfficeHome :1008FF6A
+XF86Open :1008FF6B
+XF86Option :1008FF6C
+XF86Paste :1008FF6D
+XF86Phone :1008FF6E
+XF86Q :1008FF70
+XF86Reply :1008FF72
+XF86Reload :1008FF73
+XF86RotateWindows :1008FF74
+XF86RotationPB :1008FF75
+XF86RotationKB :1008FF76
+XF86Save :1008FF77
+XF86ScrollUp :1008FF78
+XF86ScrollDown :1008FF79
+XF86ScrollClick :1008FF7A
+XF86Send :1008FF7B
+XF86Spell :1008FF7C
+XF86SplitScreen :1008FF7D
+XF86Support :1008FF7E
+XF86TaskPane :1008FF7F
+XF86Terminal :1008FF80
+XF86Tools :1008FF81
+XF86Travel :1008FF82
+XF86UserPB :1008FF84
+XF86User1KB :1008FF85
+XF86User2KB :1008FF86
+XF86Video :1008FF87
+XF86WheelButton :1008FF88
+XF86Word :1008FF89
+XF86Xfer :1008FF8A
+XF86ZoomIn :1008FF8B
+XF86ZoomOut :1008FF8C
+XF86Away :1008FF8D
+XF86Messenger :1008FF8E
+XF86WebCam :1008FF8F
+XF86MailForward :1008FF90
+XF86Pictures :1008FF91
+XF86Music :1008FF92
+XF86Battery :1008FF93
+XF86Bluetooth :1008FF94
+XF86WLAN :1008FF95
+XF86UWB :1008FF96
+XF86AudioForward :1008FF97
+XF86AudioRepeat :1008FF98
+XF86AudioRandomPlay :1008FF99
+XF86Subtitle :1008FF9A
+XF86AudioCycleTrack :1008FF9B
+XF86CycleAngle :1008FF9C
+XF86FrameBack :1008FF9D
+XF86FrameForward :1008FF9E
+XF86Time :1008FF9F
+XF86Select :1008FFA0
+XF86View :1008FFA1
+XF86TopMenu :1008FFA2
+XF86Red :1008FFA3
+XF86Green :1008FFA4
+XF86Yellow :1008FFA5
+XF86Blue :1008FFA6
+XF86Suspend :1008FFA7
+XF86Hibernate :1008FFA8
+XF86TouchpadToggle :1008FFA9
+
+! XFree86 special action keys
+XF86_Switch_VT_1 :1008FE01
+XF86_Switch_VT_2 :1008FE02
+XF86_Switch_VT_3 :1008FE03
+XF86_Switch_VT_4 :1008FE04
+XF86_Switch_VT_5 :1008FE05
+XF86_Switch_VT_6 :1008FE06
+XF86_Switch_VT_7 :1008FE07
+XF86_Switch_VT_8 :1008FE08
+XF86_Switch_VT_9 :1008FE09
+XF86_Switch_VT_10 :1008FE0A
+XF86_Switch_VT_11 :1008FE0B
+XF86_Switch_VT_12 :1008FE0C
+XF86_Ungrab :1008FE20
+XF86_ClearGrab :1008FE21
+XF86_Next_VMode :1008FE22
+XF86_Prev_VMode :1008FE23
+
+usldead_acute :100000A8
+usldead_grave :100000A9
+usldead_diaeresis :100000AB
+usldead_asciicircum :100000AA
+usldead_asciitilde :100000AC
+usldead_cedilla :1000FE2C
+usldead_ring :1000FEB0